diff --git a/Calculators/Project1.vbp b/Calculators/Project1.vbp new file mode 100644 index 0000000..03f7649 --- /dev/null +++ b/Calculators/Project1.vbp @@ -0,0 +1,33 @@ +Type=Exe +Form=dmflags_calc.frm +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\Windows\SysWOW64\stdole2.tlb#OLE Automation +IconForm="Form1" +Startup="Form1" +HelpFile="" +Title="Project1" +ExeName32="Project1.exe" +Command32="" +Name="Project1" +HelpContextID="0" +CompatibleMode="0" +MajorVer=1 +MinorVer=0 +RevisionVer=0 +AutoIncrementVer=0 +ServerSupportFiles=0 +VersionCompanyName="Author: NeWaGe" +CompilationType=0 +OptimizationType=0 +FavorPentiumPro(tm)=0 +CodeViewDebugInfo=0 +NoAliasing=0 +BoundsCheck=0 +OverflowCheck=0 +FlPointCheck=0 +FDIVCheck=0 +UnroundedFP=0 +StartMode=0 +Unattended=0 +Retained=0 +ThreadPerObject=0 +MaxNumberOfThreads=1 diff --git a/Calculators/Project1.vbw b/Calculators/Project1.vbw new file mode 100644 index 0000000..98d5ca8 --- /dev/null +++ b/Calculators/Project1.vbw @@ -0,0 +1 @@ +Form1 = 46, 46, 1140, 676, C, 23, 23, 1117, 653, C diff --git a/Calculators/admin_calc.frm b/Calculators/admin_calc.frm new file mode 100644 index 0000000..8248cde --- /dev/null +++ b/Calculators/admin_calc.frm @@ -0,0 +1,597 @@ +VERSION 5.00 +Begin VB.Form Form1 + BackColor = &H00000000& + BorderStyle = 1 'Fixed Single + Caption = "Clan Mod - Administration Bitvalue Calculator" + ClientHeight = 4320 + ClientLeft = 45 + ClientTop = 435 + ClientWidth = 7050 + Icon = "admin_calc.frx":0000 + LinkTopic = "Form1" + MaxButton = 0 'False + MinButton = 0 'False + ScaleHeight = 4320 + ScaleWidth = 7050 + StartUpPosition = 3 'Windows Default + Begin VB.CheckBox Check18 + BackColor = &H00000000& + Caption = "ChangeMode" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 3120 + TabIndex = 30 + Top = 1440 + Width = 1335 + End + Begin VB.CheckBox Check17 + BackColor = &H00000000& + Caption = "CSPrint" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 3120 + TabIndex = 29 + Top = 1200 + Width = 1215 + End + Begin VB.CheckBox Check16 + BackColor = &H00000000& + Caption = "LockTeam" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1560 + TabIndex = 28 + Top = 2880 + Width = 1215 + End + Begin VB.CheckBox Check15 + BackColor = &H00000000& + Caption = "Slap" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1560 + TabIndex = 27 + Top = 2640 + Width = 1215 + End + Begin VB.CheckBox Check14 + BackColor = &H00000000& + Caption = "Sleep" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1560 + TabIndex = 26 + Top = 2400 + Width = 1215 + End + Begin VB.CheckBox Check13 + BackColor = &H00000000& + Caption = "Punish" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1560 + TabIndex = 25 + Top = 2160 + Width = 1215 + End + Begin VB.CheckBox Check12 + BackColor = &H00000000& + Caption = "ForceTeam" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1560 + TabIndex = 24 + Top = 1920 + Width = 1215 + End + Begin VB.CheckBox Check11 + BackColor = &H00000000& + Caption = "Rename" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1560 + TabIndex = 23 + Top = 1680 + Width = 1215 + End + Begin VB.CheckBox Check10 + BackColor = &H00000000& + Caption = "Empower" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1560 + TabIndex = 22 + Top = 1440 + Width = 1215 + End + Begin VB.CheckBox Check9 + BackColor = &H00000000& + Caption = "ChangeMap" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1560 + TabIndex = 21 + Top = 1200 + Width = 1215 + End + Begin VB.CheckBox Check8 + BackColor = &H00000000& + Caption = "Slay" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 20 + Top = 2880 + Width = 1095 + End + Begin VB.CheckBox Check7 + BackColor = &H00000000& + Caption = "Terminator" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 19 + Top = 2640 + Width = 1095 + End + Begin VB.CheckBox Check6 + BackColor = &H00000000& + Caption = "G2animent" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 18 + Top = 2400 + Width = 1095 + End + Begin VB.CheckBox Check5 + BackColor = &H00000000& + Caption = "AdminKick" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 17 + Top = 2160 + Width = 1095 + End + Begin VB.CheckBox Check4 + BackColor = &H00000000& + Caption = "AdminBan" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 16 + Top = 1920 + Width = 1095 + End + Begin VB.CheckBox Check3 + BackColor = &H00000000& + Caption = "Protect" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 15 + Top = 1680 + Width = 1095 + End + Begin VB.CheckBox Check2 + BackColor = &H00000000& + Caption = "Silence" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 14 + Top = 1440 + Width = 1095 + End + Begin VB.PictureBox Picture1 + BackColor = &H80000007& + BorderStyle = 0 'None + Height = 735 + Left = 1440 + Picture = "admin_calc.frx":08CA + ScaleHeight = 735 + ScaleWidth = 3495 + TabIndex = 13 + Top = 120 + Width = 3495 + End + Begin VB.Timer Timer1 + Interval = 1 + Left = 4680 + Top = 4440 + End + Begin VB.TextBox Text1 + Alignment = 2 'Center + Appearance = 0 'Flat + BackColor = &H00404040& + ForeColor = &H00FFFFFF& + Height = 285 + Left = 120 + TabIndex = 10 + Top = 3960 + Width = 6855 + End + Begin VB.OptionButton Option5 + BackColor = &H00000000& + Caption = "Admin level4" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 4200 + TabIndex = 5 + Top = 3480 + Width = 1215 + End + Begin VB.OptionButton Option4 + BackColor = &H00000000& + Caption = "Admin level5" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 5520 + TabIndex = 4 + Top = 3480 + Width = 1215 + End + Begin VB.OptionButton Option3 + BackColor = &H00000000& + Caption = "Admin level3" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 2880 + TabIndex = 3 + Top = 3480 + Width = 1215 + End + Begin VB.OptionButton Option2 + BackColor = &H00000000& + Caption = "Admin level2" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1560 + TabIndex = 2 + Top = 3480 + Width = 1215 + End + Begin VB.OptionButton Option1 + BackColor = &H00000000& + Caption = "Admin level1" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 240 + TabIndex = 1 + Top = 3480 + Value = -1 'True + Width = 1215 + End + Begin VB.CheckBox Check1 + BackColor = &H00000000& + Caption = "AdminTele" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 0 + Top = 1200 + Width = 1095 + End + Begin VB.Shape Shape2 + BorderColor = &H00FFFFFF& + BorderWidth = 3 + Height = 255 + Left = 5880 + Top = 3000 + Width = 855 + End + Begin VB.Label Label6 + Alignment = 2 'Center + BackColor = &H00404040& + Caption = "ALL" + BeginProperty Font + Name = "MS Sans Serif" + Size = 9.75 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H00FFFFFF& + Height = 255 + Left = 5880 + TabIndex = 12 + Top = 3000 + Width = 855 + End + Begin VB.Label Label5 + Caption = " " + Height = 375 + Left = 2400 + TabIndex = 11 + Top = 4440 + Width = 255 + End + Begin VB.Label Label4 + Caption = """" + Height = 255 + Left = 2760 + TabIndex = 9 + Top = 4440 + Width = 255 + End + Begin VB.Label Label3 + Caption = "0" + Height = 255 + Left = 3120 + TabIndex = 8 + Top = 4440 + Width = 1455 + End + Begin VB.Label Label2 + Caption = "set cm_adminControl1" + Height = 255 + Left = 120 + TabIndex = 7 + Top = 4440 + Width = 2175 + End + Begin VB.Shape Shape1 + BackColor = &H000000FF& + BorderColor = &H00FFFFFF& + BorderWidth = 3 + Height = 255 + Left = 4920 + Top = 3000 + Width = 855 + End + Begin VB.Label Label1 + Alignment = 2 'Center + BackColor = &H00404040& + Caption = "Reset" + BeginProperty Font + Name = "MS Sans Serif" + Size = 9.75 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H00FFFFFF& + Height = 255 + Left = 4920 + TabIndex = 6 + Top = 3000 + Width = 855 + End + Begin VB.Line Line2 + BorderColor = &H00FFFFFF& + BorderWidth = 3 + X1 = 0 + X2 = 7080 + Y1 = 3840 + Y2 = 3840 + End + Begin VB.Line Line1 + BorderColor = &H00FFFFFF& + BorderWidth = 3 + X1 = 0 + X2 = 7080 + Y1 = 3360 + Y2 = 3360 + End +End +Attribute VB_Name = "Form1" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False +Private Sub Check1_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 1 +Else +Label3.Caption = Label3 + 1 +End If +End Sub + +Private Sub Check10_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 512 +Else +Label3.Caption = Label3 + 512 +End If +End Sub + +Private Sub Check11_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 1024 +Else +Label3.Caption = Label3 + 1024 +End If +End Sub + +Private Sub Check12_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 2048 +Else +Label3.Caption = Label3 + 2048 +End If +End Sub + +Private Sub Check13_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 4096 +Else +Label3.Caption = Label3 + 4096 +End If +End Sub + +Private Sub Check14_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 8192 +Else +Label3.Caption = Label3 + 8192 +End If +End Sub + +Private Sub Check15_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 16384 +Else +Label3.Caption = Label3 + 16384 +End If +End Sub + +Private Sub Check16_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 32768 +Else +Label3.Caption = Label3 + 32768 +End If +End Sub + +Private Sub Check17_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 65536 +Else +Label3.Caption = Label3 + 65536 +End If +End Sub + +Private Sub Check18_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 131072 +Else +Label3.Caption = Label3 + 131072 +End If +End Sub + +Private Sub Check2_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 2 +Else +Label3.Caption = Label3 + 2 +End If +End Sub + +Private Sub Check3_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 4 +Else +Label3.Caption = Label3 + 4 +End If +End Sub + +Private Sub Check4_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 8 +Else +Label3.Caption = Label3 + 8 +End If +End Sub + +Private Sub Check5_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 16 +Else +Label3.Caption = Label3 + 16 +End If +End Sub + +Private Sub Check6_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 32 +Else +Label3.Caption = Label3 + 32 +End If +End Sub + +Private Sub Check7_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 64 +Else +Label3.Caption = Label3 + 64 +End If +End Sub + +Private Sub Check8_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 128 +Else +Label3.Caption = Label3 + 128 +End If +End Sub + +Private Sub Check9_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 256 +Else +Label3.Caption = Label3 + 256 +End If +End Sub + +Private Sub Label1_Click() +Option1.Value = True +Check1.Value = 0 +Check2.Value = 0 +Check3.Value = 0 +Check4.Value = 0 +Check5.Value = 0 +Check6.Value = 0 +Check7.Value = 0 +Check8.Value = 0 +Check9.Value = 0 +Check10.Value = 0 +Check11.Value = 0 +Check12.Value = 0 +Check13.Value = 0 +Check14.Value = 0 +Check15.Value = 0 +Check16.Value = 0 +Check17.Value = 0 +Check18.Value = 0 +Label3.Caption = "0" +End Sub + +Private Sub Label6_Click() +Check1.Value = 1 +Check2.Value = 1 +Check3.Value = 1 +Check4.Value = 1 +Check5.Value = 1 +Check6.Value = 1 +Check7.Value = 1 +Check8.Value = 1 +Check9.Value = 1 +Check10.Value = 1 +Check11.Value = 1 +Check12.Value = 1 +Check13.Value = 1 +Check14.Value = 1 +Check15.Value = 1 +Check16.Value = 1 +Check17.Value = 1 +Check18.Value = 1 +End Sub + +Private Sub Option1_Click() +Label2.Caption = "set cm_adminControl1 " +End Sub + +Private Sub Option2_Click() +Label2.Caption = "set cm_adminControl2 " +End Sub + +Private Sub Option3_Click() +Label2.Caption = "set cm_adminControl3 " +End Sub + +Private Sub Option4_Click() +Label2.Caption = "set cm_adminControl5 " +End Sub + +Private Sub Option5_Click() +Label2.Caption = "set cm_adminControl4 " +End Sub + +Private Sub Timer1_Timer() +Text1.Text = Label2 & Label5 & Label4 & Label3 & Label4 +End Sub diff --git a/Calculators/cm_icon.ico b/Calculators/cm_icon.ico new file mode 100644 index 0000000..0f65c46 Binary files /dev/null and b/Calculators/cm_icon.ico differ diff --git a/Calculators/cm_logo.gif b/Calculators/cm_logo.gif new file mode 100644 index 0000000..be4c98e Binary files /dev/null and b/Calculators/cm_logo.gif differ diff --git a/Calculators/dmflags_calc.frm b/Calculators/dmflags_calc.frm new file mode 100644 index 0000000..886cffe --- /dev/null +++ b/Calculators/dmflags_calc.frm @@ -0,0 +1,322 @@ +VERSION 5.00 +Begin VB.Form Form1 + BackColor = &H00000000& + BorderStyle = 1 'Fixed Single + Caption = "DMFlags Calculator" + ClientHeight = 2835 + ClientLeft = 45 + ClientTop = 435 + ClientWidth = 7050 + Icon = "dmflags_calc.frx":0000 + LinkTopic = "Form1" + MaxButton = 0 'False + MinButton = 0 'False + ScaleHeight = 2835 + ScaleWidth = 7050 + StartUpPosition = 3 'Windows Default + Begin VB.CheckBox Check3 + BackColor = &H00000000& + Caption = "No Footsteps" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 11 + Top = 1920 + Width = 1575 + End + Begin VB.CheckBox Check2 + BackColor = &H00000000& + Caption = "Fixed FOV" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 10 + Top = 1560 + Width = 1575 + End + Begin VB.CheckBox Check1 + BackColor = &H00000000& + Caption = "No Fall Damage" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 9 + Top = 1200 + Width = 1575 + End + Begin VB.TextBox Text3 + BackColor = &H80000007& + BorderStyle = 0 'None + BeginProperty Font + Name = "MS Sans Serif" + Size = 24 + Charset = 0 + Weight = 400 + Underline = 0 'False + Italic = -1 'True + Strikethrough = 0 'False + EndProperty + ForeColor = &H0000FF00& + Height = 555 + Left = 1200 + Locked = -1 'True + TabIndex = 8 + Text = "DMFlags Calculator" + Top = 0 + Width = 4575 + End + Begin VB.TextBox Text2 + BackColor = &H80000007& + BorderStyle = 0 'None + BeginProperty Font + Name = "MS Sans Serif" + Size = 8.25 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H80000005& + Height = 255 + Left = 1680 + Locked = -1 'True + TabIndex = 7 + Text = "Select the dmflags you want." + Top = 600 + Width = 3855 + End + Begin VB.Timer Timer1 + Interval = 1 + Left = 4680 + Top = 3840 + End + Begin VB.TextBox Text1 + Alignment = 2 'Center + Appearance = 0 'Flat + BackColor = &H00404040& + ForeColor = &H00FFFFFF& + Height = 285 + Left = 120 + TabIndex = 4 + Top = 2400 + Width = 6855 + End + Begin VB.Shape Shape2 + BorderColor = &H00FFFFFF& + BorderWidth = 3 + Height = 255 + Left = 6000 + Top = 1920 + Width = 855 + End + Begin VB.Label Label6 + Alignment = 2 'Center + BackColor = &H00404040& + Caption = "ALL" + BeginProperty Font + Name = "MS Sans Serif" + Size = 9.75 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H00FFFFFF& + Height = 255 + Left = 6000 + TabIndex = 6 + Top = 1920 + Width = 855 + End + Begin VB.Label Label5 + Caption = " " + Height = 375 + Left = 2400 + TabIndex = 5 + Top = 3840 + Width = 255 + End + Begin VB.Label Label4 + Caption = """" + Height = 255 + Left = 2760 + TabIndex = 3 + Top = 3840 + Width = 255 + End + Begin VB.Label Label3 + Caption = "0" + Height = 255 + Left = 3120 + TabIndex = 2 + Top = 3840 + Width = 1455 + End + Begin VB.Label Label2 + Caption = "set dmflags" + Height = 255 + Left = 120 + TabIndex = 1 + Top = 3840 + Width = 2175 + End + Begin VB.Shape Shape1 + BackColor = &H000000FF& + BorderColor = &H00FFFFFF& + BorderWidth = 3 + Height = 255 + Left = 5040 + Top = 1920 + Width = 855 + End + Begin VB.Label Label1 + Alignment = 2 'Center + BackColor = &H00404040& + Caption = "Reset" + BeginProperty Font + Name = "MS Sans Serif" + Size = 9.75 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H00FFFFFF& + Height = 255 + Left = 5040 + TabIndex = 0 + Top = 1920 + Width = 855 + End + Begin VB.Line Line1 + BorderColor = &H00FFFFFF& + BorderWidth = 3 + X1 = 0 + X2 = 7080 + Y1 = 2280 + Y2 = 2280 + End +End +Attribute VB_Name = "Form1" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False +Private Sub Check1_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 8 +Else +Label3.Caption = Label3 + 8 +End If +End Sub + +Private Sub Check2_Click() +If Check2.Value = 0 Then +Label3.Caption = Label3 - 16 +Else +Label3.Caption = Label3 + 16 +End If + +End Sub + +Private Sub Check3_Click() +If Check3.Value = 0 Then +Label3.Caption = Label3 - 32 +Else +Label3.Caption = Label3 + 32 +End If +End Sub + +Private Sub Check4_Click() +If Check4.Value = 0 Then +Label3.Caption = Label3 - 8 +Else +Label3.Caption = Label3 + 8 +End If + +End Sub + +Private Sub Check5_Click() +If Check5.Value = 0 Then +Label3.Caption = Label3 - 16 +Else +Label3.Caption = Label3 + 16 +End If + +End Sub + +Private Sub Check6_Click() +If Check6.Value = 0 Then +Label3.Caption = Label3 - 32 +Else +Label3.Caption = Label3 + 32 +End If + +End Sub + +Private Sub Check7_Click() +If Check7.Value = 0 Then +Label3.Caption = Label3 - 64 +Else +Label3.Caption = Label3 + 64 +End If + +End Sub + +Private Sub Check8_Click() +If Check8.Value = 0 Then +Label3.Caption = Label3 - 128 +Else +Label3.Caption = Label3 + 128 +End If + +End Sub + +Private Sub Check9_Click() +If Check9.Value = 0 Then +Label3.Caption = Label3 - 256 +Else +Label3.Caption = Label3 + 256 +End If + +End Sub + +Private Sub Label1_Click() +Check1.Value = 0 +Check2.Value = 0 +Check3.Value = 0 +Label3.Caption = "0" +End Sub + +Private Sub Label6_Click() +Check1.Value = 1 +Check2.Value = 1 +Check3.Value = 1 +End Sub + +Private Sub Option1_Click() +Label2.Caption = "set cm_adminControl1 " +End Sub + +Private Sub Option2_Click() +Label2.Caption = "set cm_adminControl2 " +End Sub + +Private Sub Option3_Click() +Label2.Caption = "set cm_adminControl3 " +End Sub + +Private Sub Option4_Click() +Label2.Caption = "set cm_adminControl5 " +End Sub + +Private Sub Option5_Click() +Label2.Caption = "set cm_adminControl4 " +End Sub + +Private Sub Timer1_Timer() +Text1.Text = Label2 & Label5 & Label4 & Label3 & Label4 +End Sub diff --git a/Calculators/dmflags_calc.frx b/Calculators/dmflags_calc.frx new file mode 100644 index 0000000..36ae556 Binary files /dev/null and b/Calculators/dmflags_calc.frx differ diff --git a/Calculators/dmflags_calc.log b/Calculators/dmflags_calc.log new file mode 100644 index 0000000..061c060 --- /dev/null +++ b/Calculators/dmflags_calc.log @@ -0,0 +1 @@ +Line 10: Property Icon in Form1 had an invalid file reference. diff --git a/Calculators/emote_calc.frm b/Calculators/emote_calc.frm new file mode 100644 index 0000000..4d2fc47 --- /dev/null +++ b/Calculators/emote_calc.frm @@ -0,0 +1,623 @@ +VERSION 5.00 +Begin VB.Form Form1 + BackColor = &H00000000& + BorderStyle = 1 'Fixed Single + Caption = "Clan Mod - Emote Bitvalue Calculator" + ClientHeight = 3600 + ClientLeft = 45 + ClientTop = 435 + ClientWidth = 7050 + Icon = "emote_calc.frx":0000 + LinkTopic = "Form1" + MaxButton = 0 'False + MinButton = 0 'False + ScaleHeight = 3600 + ScaleWidth = 7050 + StartUpPosition = 3 'Windows Default + Begin VB.TextBox Text2 + BackColor = &H80000007& + BorderStyle = 0 'None + BeginProperty Font + Name = "MS Sans Serif" + Size = 8.25 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H80000005& + Height = 255 + Left = 1440 + Locked = -1 'True + TabIndex = 30 + Text = "Select the emotes you want to allow." + Top = 960 + Width = 3855 + End + Begin VB.CheckBox Check22 + BackColor = &H00000000& + Caption = "Shake" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 4320 + TabIndex = 29 + Top = 1320 + Width = 1095 + End + Begin VB.CheckBox Check21 + BackColor = &H00000000& + Caption = "Nod" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 2760 + TabIndex = 28 + Top = 2760 + Width = 1095 + End + Begin VB.CheckBox Check20 + BackColor = &H00000000& + Caption = "Dance2" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 2760 + TabIndex = 27 + Top = 2520 + Width = 1095 + End + Begin VB.CheckBox Check19 + BackColor = &H00000000& + Caption = "Dance" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 2760 + TabIndex = 26 + Top = 2280 + Width = 1095 + End + Begin VB.CheckBox Check18 + BackColor = &H00000000& + Caption = "Draw" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 2760 + TabIndex = 25 + Top = 2040 + Width = 1095 + End + Begin VB.CheckBox Check17 + BackColor = &H00000000& + Caption = "ThumbsDown" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 2760 + TabIndex = 24 + Top = 1800 + Width = 1335 + End + Begin VB.CheckBox Check16 + BackColor = &H00000000& + Caption = "Shrug" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 2760 + TabIndex = 23 + Top = 1560 + Width = 1095 + End + Begin VB.CheckBox Check15 + BackColor = &H00000000& + Caption = "Throw3" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 2760 + TabIndex = 22 + Top = 1320 + Width = 1095 + End + Begin VB.CheckBox Check14 + BackColor = &H00000000& + Caption = "Throw2" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1440 + TabIndex = 21 + Top = 2760 + Width = 1095 + End + Begin VB.CheckBox Check13 + BackColor = &H00000000& + Caption = "Throw" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1440 + TabIndex = 20 + Top = 2520 + Width = 1095 + End + Begin VB.CheckBox Check12 + BackColor = &H00000000& + Caption = "Lol" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1440 + TabIndex = 19 + Top = 2280 + Width = 1095 + End + Begin VB.CheckBox Check11 + BackColor = &H00000000& + Caption = "Power" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1440 + TabIndex = 18 + Top = 2040 + Width = 1095 + End + Begin VB.CheckBox Check10 + BackColor = &H00000000& + Caption = "Dunno" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1440 + TabIndex = 17 + Top = 1800 + Width = 1095 + End + Begin VB.CheckBox Check9 + BackColor = &H00000000& + Caption = "Scratch" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1440 + TabIndex = 16 + Top = 1560 + Width = 1095 + End + Begin VB.CheckBox Check8 + BackColor = &H00000000& + Caption = "Kiss" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1440 + TabIndex = 15 + Top = 1320 + Width = 1095 + End + Begin VB.CheckBox Check7 + BackColor = &H00000000& + Caption = "Kneel" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 14 + Top = 2760 + Width = 1095 + End + Begin VB.CheckBox Check6 + BackColor = &H00000000& + Caption = "BreakDance" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 13 + Top = 2520 + Width = 1215 + End + Begin VB.CheckBox Check5 + BackColor = &H00000000& + Caption = "Bounce" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 12 + Top = 2280 + Width = 1095 + End + Begin VB.CheckBox Check4 + BackColor = &H00000000& + Caption = "Cocky" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 11 + Top = 2040 + Width = 1095 + End + Begin VB.CheckBox Check3 + BackColor = &H00000000& + Caption = "Flip" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 10 + Top = 1800 + Width = 1095 + End + Begin VB.CheckBox Check2 + BackColor = &H00000000& + Caption = "Beg" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 9 + Top = 1560 + Width = 1095 + End + Begin VB.PictureBox Picture1 + BackColor = &H80000008& + BorderStyle = 0 'None + Height = 735 + Left = 1320 + Picture = "emote_calc.frx":08CA + ScaleHeight = 735 + ScaleWidth = 3375 + TabIndex = 8 + Top = 120 + Width = 3375 + End + Begin VB.Timer Timer1 + Interval = 1 + Left = 4680 + Top = 3720 + End + Begin VB.TextBox Text1 + Alignment = 2 'Center + Appearance = 0 'Flat + BackColor = &H00404040& + ForeColor = &H00FFFFFF& + Height = 285 + Left = 120 + TabIndex = 5 + Top = 3240 + Width = 6855 + End + Begin VB.CheckBox Check1 + BackColor = &H00000000& + Caption = "Sit" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 120 + TabIndex = 0 + Top = 1320 + Width = 1095 + End + Begin VB.Shape Shape2 + BorderColor = &H00FFFFFF& + BorderWidth = 3 + Height = 255 + Left = 5880 + Top = 2760 + Width = 855 + End + Begin VB.Label Label6 + Alignment = 2 'Center + BackColor = &H00404040& + Caption = "ALL" + BeginProperty Font + Name = "MS Sans Serif" + Size = 9.75 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H00FFFFFF& + Height = 255 + Left = 5880 + TabIndex = 7 + Top = 2760 + Width = 855 + End + Begin VB.Label Label5 + Caption = " " + Height = 375 + Left = 2400 + TabIndex = 6 + Top = 3720 + Width = 255 + End + Begin VB.Label Label4 + Caption = """" + Height = 255 + Left = 2760 + TabIndex = 4 + Top = 3720 + Width = 255 + End + Begin VB.Label Label3 + Caption = "0" + Height = 255 + Left = 3120 + TabIndex = 3 + Top = 3720 + Width = 1455 + End + Begin VB.Label Label2 + Caption = "set cm_emoteControl " + Height = 255 + Left = 120 + TabIndex = 2 + Top = 3720 + Width = 2175 + End + Begin VB.Shape Shape1 + BackColor = &H000000FF& + BorderColor = &H00FFFFFF& + BorderWidth = 3 + Height = 255 + Left = 4920 + Top = 2760 + Width = 855 + End + Begin VB.Label Label1 + Alignment = 2 'Center + BackColor = &H00404040& + Caption = "Reset" + BeginProperty Font + Name = "MS Sans Serif" + Size = 9.75 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H00FFFFFF& + Height = 255 + Left = 4920 + TabIndex = 1 + Top = 2760 + Width = 855 + End + Begin VB.Line Line1 + BorderColor = &H00FFFFFF& + BorderWidth = 3 + X1 = 0 + X2 = 7080 + Y1 = 3120 + Y2 = 3120 + End +End +Attribute VB_Name = "Form1" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False + +Private Sub Check1_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 1 +Else +Label3.Caption = Label3 + 1 +End If +End Sub + +Private Sub Check10_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 512 +Else +Label3.Caption = Label3 + 512 +End If +End Sub + +Private Sub Check11_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 1024 +Else +Label3.Caption = Label3 + 1024 +End If +End Sub + +Private Sub Check12_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 2048 +Else +Label3.Caption = Label3 + 2048 +End If +End Sub + +Private Sub Check13_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 4096 +Else +Label3.Caption = Label3 + 4096 +End If +End Sub + +Private Sub Check14_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 8192 +Else +Label3.Caption = Label3 + 8192 +End If +End Sub + +Private Sub Check15_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 16384 +Else +Label3.Caption = Label3 + 16384 +End If +End Sub + +Private Sub Check16_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 32768 +Else +Label3.Caption = Label3 + 32768 +End If +End Sub + +Private Sub Check17_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 65536 +Else +Label3.Caption = Label3 + 65536 +End If +End Sub + +Private Sub Check18_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 131072 +Else +Label3.Caption = Label3 + 131072 +End If +End Sub + +Private Sub Check19_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 262144 +Else +Label3.Caption = Label3 + 262144 +End If +End Sub + +Private Sub Check2_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 2 +Else +Label3.Caption = Label3 + 2 +End If +End Sub + +Private Sub Check20_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 524288 +Else +Label3.Caption = Label3 + 524288 +End If +End Sub + +Private Sub Check21_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 1048576 +Else +Label3.Caption = Label3 + 1048576 +End If +End Sub + +Private Sub Check22_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 2097152 +Else +Label3.Caption = Label3 + 2097152 +End If +End Sub + +Private Sub Check3_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 4 +Else +Label3.Caption = Label3 + 4 +End If +End Sub + +Private Sub Check4_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 8 +Else +Label3.Caption = Label3 + 8 +End If +End Sub + +Private Sub Check5_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 16 +Else +Label3.Caption = Label3 + 16 +End If +End Sub + +Private Sub Check6_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 32 +Else +Label3.Caption = Label3 + 32 +End If +End Sub + +Private Sub Check7_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 64 +Else +Label3.Caption = Label3 + 64 +End If +End Sub + +Private Sub Check8_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 128 +Else +Label3.Caption = Label3 + 128 +End If +End Sub + +Private Sub Check9_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 256 +Else +Label3.Caption = Label3 + 256 +End If +End Sub + +Private Sub Label1_Click() +Check1.Value = 0 +Check2.Value = 0 +Check3.Value = 0 +Check4.Value = 0 +Check5.Value = 0 +Check6.Value = 0 +Check7.Value = 0 +Check8.Value = 0 +Check9.Value = 0 +Check10.Value = 0 +Check11.Value = 0 +Check12.Value = 0 +Check13.Value = 0 +Check14.Value = 0 +Check15.Value = 0 +Check16.Value = 0 +Check17.Value = 0 +Check18.Value = 0 +Check19.Value = 0 +Check20.Value = 0 +Check21.Value = 0 +Check22.Value = 0 +Label3.Caption = "0" +End Sub + +Private Sub Label6_Click() +Check1.Value = 1 +Check2.Value = 1 +Check3.Value = 1 +Check4.Value = 1 +Check5.Value = 1 +Check6.Value = 1 +Check7.Value = 1 +Check8.Value = 1 +Check9.Value = 1 +Check10.Value = 1 +Check11.Value = 1 +Check12.Value = 1 +Check13.Value = 1 +Check14.Value = 1 +Check15.Value = 1 +Check16.Value = 1 +Check17.Value = 1 +Check18.Value = 1 +Check19.Value = 1 +Check20.Value = 1 +Check21.Value = 1 +Check22.Value = 1 +End Sub + +Private Sub text_Click() + +End Sub + +Private Sub Timer1_Timer() +Text1.text = Label2 & Label4 & Label3 & Label4 +End Sub diff --git a/Calculators/vote_calc.frm b/Calculators/vote_calc.frm new file mode 100644 index 0000000..3587c17 --- /dev/null +++ b/Calculators/vote_calc.frm @@ -0,0 +1,401 @@ +VERSION 5.00 +Begin VB.Form Form1 + BackColor = &H00000000& + BorderStyle = 1 'Fixed Single + Caption = "Vote Calculator" + ClientHeight = 2760 + ClientLeft = 45 + ClientTop = 435 + ClientWidth = 7050 + LinkTopic = "Form1" + MaxButton = 0 'False + MinButton = 0 'False + ScaleHeight = 2760 + ScaleWidth = 7050 + StartUpPosition = 3 'Windows Default + Begin VB.CheckBox Check3 + BackColor = &H00000000& + Caption = "MAP" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 0 + TabIndex = 17 + Top = 1680 + Width = 1575 + End + Begin VB.CheckBox Check2 + BackColor = &H00000000& + Caption = "NEXTMAP" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 0 + TabIndex = 16 + Top = 1440 + Width = 1575 + End + Begin VB.CheckBox Check1 + BackColor = &H00000000& + Caption = "MAP_RESTART" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 0 + TabIndex = 15 + Top = 1200 + Width = 1575 + End + Begin VB.CheckBox Check4 + BackColor = &H00000000& + Caption = "G_GAMETYPE" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 0 + TabIndex = 14 + Top = 1920 + Width = 1455 + End + Begin VB.CheckBox Check9 + BackColor = &H00000000& + Caption = "FRAGLIMIT" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 3360 + TabIndex = 13 + Top = 1200 + Width = 1455 + End + Begin VB.CheckBox Check5 + BackColor = &H00000000& + Caption = "KICK" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1680 + TabIndex = 12 + Top = 1200 + Width = 1095 + End + Begin VB.TextBox Text3 + BackColor = &H80000007& + BorderStyle = 0 'None + BeginProperty Font + Name = "MS Sans Serif" + Size = 24 + Charset = 0 + Weight = 400 + Underline = 0 'False + Italic = -1 'True + Strikethrough = 0 'False + EndProperty + ForeColor = &H0000FF00& + Height = 555 + Left = 1440 + Locked = -1 'True + TabIndex = 11 + Text = "Vote Calculator" + Top = 0 + Width = 3615 + End + Begin VB.TextBox Text2 + BackColor = &H80000007& + BorderStyle = 0 'None + BeginProperty Font + Name = "MS Sans Serif" + Size = 8.25 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H80000005& + Height = 255 + Left = 1560 + Locked = -1 'True + TabIndex = 10 + Text = "Select the vote options you want to allow." + Top = 600 + Width = 3855 + End + Begin VB.Timer Timer1 + Interval = 1 + Left = 4680 + Top = 3840 + End + Begin VB.TextBox Text1 + Alignment = 2 'Center + Appearance = 0 'Flat + BackColor = &H00404040& + ForeColor = &H00FFFFFF& + Height = 285 + Left = 120 + TabIndex = 7 + Top = 2400 + Width = 6855 + End + Begin VB.CheckBox Check8 + BackColor = &H00000000& + Caption = "TIMELIMIT" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1680 + TabIndex = 2 + Top = 1920 + Width = 1455 + End + Begin VB.CheckBox Check7 + BackColor = &H00000000& + Caption = "G_DOWARMUP" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1680 + TabIndex = 1 + Top = 1680 + Width = 1575 + End + Begin VB.CheckBox Check6 + BackColor = &H00000000& + Caption = "CLIENTKICK" + ForeColor = &H00FFFFFF& + Height = 255 + Left = 1680 + TabIndex = 0 + Top = 1440 + Width = 1335 + End + Begin VB.Shape Shape2 + BorderColor = &H00FFFFFF& + BorderWidth = 3 + Height = 255 + Left = 6000 + Top = 1920 + Width = 855 + End + Begin VB.Label Label6 + Alignment = 2 'Center + BackColor = &H00404040& + Caption = "ALL" + BeginProperty Font + Name = "MS Sans Serif" + Size = 9.75 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H00FFFFFF& + Height = 255 + Left = 6000 + TabIndex = 9 + Top = 1920 + Width = 855 + End + Begin VB.Label Label5 + Caption = " " + Height = 375 + Left = 2400 + TabIndex = 8 + Top = 3840 + Width = 255 + End + Begin VB.Label Label4 + Caption = """" + Height = 255 + Left = 2760 + TabIndex = 6 + Top = 3840 + Width = 255 + End + Begin VB.Label Label3 + Caption = "0" + Height = 255 + Left = 3120 + TabIndex = 5 + Top = 3840 + Width = 1455 + End + Begin VB.Label Label2 + Caption = "set cm_voteControl" + Height = 255 + Left = 120 + TabIndex = 4 + Top = 3840 + Width = 2175 + End + Begin VB.Shape Shape1 + BackColor = &H000000FF& + BorderColor = &H00FFFFFF& + BorderWidth = 3 + Height = 255 + Left = 5040 + Top = 1920 + Width = 855 + End + Begin VB.Label Label1 + Alignment = 2 'Center + BackColor = &H00404040& + Caption = "Reset" + BeginProperty Font + Name = "MS Sans Serif" + Size = 9.75 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H00FFFFFF& + Height = 255 + Left = 5040 + TabIndex = 3 + Top = 1920 + Width = 855 + End + Begin VB.Line Line1 + BorderColor = &H00FFFFFF& + BorderWidth = 3 + X1 = 0 + X2 = 7080 + Y1 = 2280 + Y2 = 2280 + End +End +Attribute VB_Name = "Form1" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False +Private Sub Check1_Click() +If Check1.Value = 0 Then +Label3.Caption = Label3 - 1 +Else +Label3.Caption = Label3 + 1 +End If +End Sub + +Private Sub Check2_Click() +If Check2.Value = 0 Then +Label3.Caption = Label3 - 2 +Else +Label3.Caption = Label3 + 2 +End If + +End Sub + +Private Sub Check3_Click() +If Check3.Value = 0 Then +Label3.Caption = Label3 - 4 +Else +Label3.Caption = Label3 + 4 +End If +End Sub + +Private Sub Check4_Click() +If Check4.Value = 0 Then +Label3.Caption = Label3 - 8 +Else +Label3.Caption = Label3 + 8 +End If + +End Sub + +Private Sub Check5_Click() +If Check5.Value = 0 Then +Label3.Caption = Label3 - 16 +Else +Label3.Caption = Label3 + 16 +End If + +End Sub + +Private Sub Check6_Click() +If Check6.Value = 0 Then +Label3.Caption = Label3 - 32 +Else +Label3.Caption = Label3 + 32 +End If + +End Sub + +Private Sub Check7_Click() +If Check7.Value = 0 Then +Label3.Caption = Label3 - 64 +Else +Label3.Caption = Label3 + 64 +End If + +End Sub + +Private Sub Check8_Click() +If Check8.Value = 0 Then +Label3.Caption = Label3 - 128 +Else +Label3.Caption = Label3 + 128 +End If + +End Sub + +Private Sub Check9_Click() +If Check9.Value = 0 Then +Label3.Caption = Label3 - 256 +Else +Label3.Caption = Label3 + 256 +End If + +End Sub + +Private Sub Label1_Click() +Check1.Value = 0 +Check2.Value = 0 +Check3.Value = 0 +Check4.Value = 0 +Check5.Value = 0 +Check6.Value = 0 +Check7.Value = 0 +Check8.Value = 0 +Check9.Value = 0 +Label3.Caption = "0" +End Sub + +Private Sub Label2_Click() + +End Sub + +Private Sub Label6_Click() +Check1.Value = 1 +Check2.Value = 1 +Check3.Value = 1 +Check4.Value = 1 +Check5.Value = 1 +Check6.Value = 1 +Check7.Value = 1 +Check8.Value = 1 +Check9.Value = 1 +End Sub + +Private Sub Option1_Click() +Label2.Caption = "set cm_adminControl1 " +End Sub + +Private Sub Option2_Click() +Label2.Caption = "set cm_adminControl2 " +End Sub + +Private Sub Option3_Click() +Label2.Caption = "set cm_adminControl3 " +End Sub + +Private Sub Option4_Click() +Label2.Caption = "set cm_adminControl5 " +End Sub + +Private Sub Option5_Click() +Label2.Caption = "set cm_adminControl4 " +End Sub + +Private Sub Text1_Change() + +End Sub + +Private Sub Timer1_Timer() +Text1.Text = Label2 & Label5 & Label4 & Label3 & Label4 +End Sub diff --git a/Files/Dedicated Server (HIGH).bat b/Files/Dedicated Server (HIGH).bat new file mode 100644 index 0000000..f9136db --- /dev/null +++ b/Files/Dedicated Server (HIGH).bat @@ -0,0 +1,4 @@ +rem !!!!!!!!!!!!! change this to the path of your jampded.exe file !!!!!!!!!!!!!!!!!!!!! +cd C:\Program Files\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData + +start "Clan Mod Server (HIGH)" /HIGH jk2Ded.exe +set dedicated 2 +exec server.cfg +set fs_game clanmod \ No newline at end of file diff --git a/Files/Dedicated Server (NORMAL).bat b/Files/Dedicated Server (NORMAL).bat new file mode 100644 index 0000000..4a30c5b --- /dev/null +++ b/Files/Dedicated Server (NORMAL).bat @@ -0,0 +1,4 @@ +rem !!!!!!!!!!!!! change this to the path of your jampded.exe file !!!!!!!!!!!!!!!!!!!!! +cd C:\Program Files\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData + +start "Clan Mod Server (NORMAL)" /NORMAL jk2Ded.exe +set dedicated 2 +exec server.cfg +set fs_game clanmod \ No newline at end of file diff --git a/Files/Dedicated Server (REALTIME).bat b/Files/Dedicated Server (REALTIME).bat new file mode 100644 index 0000000..710c507 --- /dev/null +++ b/Files/Dedicated Server (REALTIME).bat @@ -0,0 +1,4 @@ +rem !!!!!!!!!!!!! change this to the path of your jampded.exe file !!!!!!!!!!!!!!!!!!!!! +cd C:\Program Files\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData + +start "Clan Mod Server (REALTIME)" /REALTIME jk2Ded.exe +set dedicated 2 +exec server.cfg +set fs_game clanmod \ No newline at end of file diff --git a/Files/clanmod/Credits/CREDIT.txt b/Files/clanmod/Credits/CREDIT.txt new file mode 100644 index 0000000..b0baf1c --- /dev/null +++ b/Files/clanmod/Credits/CREDIT.txt @@ -0,0 +1,22 @@ + + ________________________________________________ +| ___ ___ ____ ___ __ __ _____ ___ | +| / | \ | | \ | | / | +| | |__/ |___ | | | | \___ | +| | | \ | | | | | \ | +| \___ | \ |___ |__/ __|__ | ___/ | +|________________________________________________| + + +//////////////////////////////////////////////// +///// JediDog +//////////////////////////////////////////////// + +Finding and fixing various baseJK2 bugs + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++ Clan Mod is not associated with LucasArts in any way. + ++ All material copyright of the respective coders and artists. + ++ Unauthorized redistribution is forbidden. + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/Files/clanmod/Credits/Disclaimer-Jedi Outcast Dedicated Server.doc b/Files/clanmod/Credits/Disclaimer-Jedi Outcast Dedicated Server.doc new file mode 100644 index 0000000..ca0eb11 Binary files /dev/null and b/Files/clanmod/Credits/Disclaimer-Jedi Outcast Dedicated Server.doc differ diff --git a/Files/clanmod/Credits/JK2 Game Source License.doc b/Files/clanmod/Credits/JK2 Game Source License.doc new file mode 100644 index 0000000..323f429 Binary files /dev/null and b/Files/clanmod/Credits/JK2 Game Source License.doc differ diff --git a/Files/clanmod/Tools/Admin Calculator.exe b/Files/clanmod/Tools/Admin Calculator.exe new file mode 100644 index 0000000..d0675c5 Binary files /dev/null and b/Files/clanmod/Tools/Admin Calculator.exe differ diff --git a/Files/clanmod/Tools/DMFlags Calculator.exe b/Files/clanmod/Tools/DMFlags Calculator.exe new file mode 100644 index 0000000..2b16c19 Binary files /dev/null and b/Files/clanmod/Tools/DMFlags Calculator.exe differ diff --git a/Files/clanmod/Tools/Emote Calculator.exe b/Files/clanmod/Tools/Emote Calculator.exe new file mode 100644 index 0000000..1045343 Binary files /dev/null and b/Files/clanmod/Tools/Emote Calculator.exe differ diff --git a/Files/clanmod/Tools/JK2 Force Calculator.exe b/Files/clanmod/Tools/JK2 Force Calculator.exe new file mode 100644 index 0000000..07a02ad Binary files /dev/null and b/Files/clanmod/Tools/JK2 Force Calculator.exe differ diff --git a/Files/clanmod/Tools/JK2 Weapons Calculator.exe b/Files/clanmod/Tools/JK2 Weapons Calculator.exe new file mode 100644 index 0000000..e824e9e Binary files /dev/null and b/Files/clanmod/Tools/JK2 Weapons Calculator.exe differ diff --git a/Files/clanmod/Tools/Vote Calculator.exe b/Files/clanmod/Tools/Vote Calculator.exe new file mode 100644 index 0000000..973e9fc Binary files /dev/null and b/Files/clanmod/Tools/Vote Calculator.exe differ diff --git a/Files/clanmod/Tools/bitrates.txt b/Files/clanmod/Tools/bitrates.txt new file mode 100644 index 0000000..5dc4a62 --- /dev/null +++ b/Files/clanmod/Tools/bitrates.txt @@ -0,0 +1,125 @@ +BitRate values are listed below. + +============================== +dmflags +------- +MP FLAGS + +No Fall damage = 8 +Fixed FoV = 16 +No Footsteps = 32 + +============================== +g_weaponDisable +--------------- +WEAPONS + +Stun Baton = 2 +Bryar Pistol = 8 +Blaster = 16 +Distruptor = 32 +Bowcaster = 64 +Repeater = 128 +Demp2 = 256 +Flechette = 512 +Rocket Launcher = 1024 +Thermal = 2048 +Trip Mine = 4096 +Det Pack = 8192 +Emplaced Gun = 16384 +Turret = 32768 + +============================== +g_forcePowerDisable +------------------- +FORCE POWERS + +Heal = 1 +Jump = 2 +Speed = 4 +Push = 8 +Pull = 16 +Mind Trick = 32 +Grip = 64 +Lightning = 128 +Rage = 256 +Protect = 512 +Absorb = 1024 +Team Heal = 2048 +Team Force = 4096 +Drain = 8192 +Sense = 16384 +Saber Offense = 32768 +Saber Defense = 65536 +Saber Throw = 131072 + +============================== +cm_voteControl +------- +VOTE CONTROL + +Map Restart = 1 +NextMap = 2 +Map = 4 +G_Gametype = 8 +Kick = 16 +ClientKick = 32 +G_DoWarmUp = 64 +TimeLimit = 128 +FragLimit = 256 + +============================== +cm_emoteControl +--------------- +EMOTE CONTROL + +Sit = 1 +Beg = 2 +Flip = 4 +Cocky = 8 +Bounce = 16 +BreakDance = 32 +Kneel = 64 +Kiss = 128 +Scratch = 256 +Dunno = 512 +Power = 1024 +Lol = 2048 +Throw = 4096 +Throw2 = 8192 +Throw3 = 16384 +Shrug = 32768 +ThumbsDown = 65536 +Draw = 131072 +Dance = 262144 +Dance2 = 524288 +Nod = 1048576 +Shake = 2097152 + +============================== +cm_adminControl1 +cm_adminControl2 +cm_adminControl3 +---------------- +ADMIN CONTROL + +AdminTele = 1 +Silence = 2 +Protect = 4 +AdminBan = 8 +AdminKick = 16 +g2animent = 32 +Terminator = 64 +Slay = 128 +ChangeMap = 256 +Empower = 512 +Rename = 1024 +ForceTeam = 2048 +Punish = 4096 +Sleep = 8192 +Slap = 16384 +LockTeam = 32768 +CSPrint = 65536 +ChangeMode = 131072 + +============================== \ No newline at end of file diff --git a/Files/clanmod/banIP.txt b/Files/clanmod/banIP.txt new file mode 100644 index 0000000..e69de29 diff --git a/Files/clanmod/description.txt b/Files/clanmod/description.txt new file mode 100644 index 0000000..13fe079 --- /dev/null +++ b/Files/clanmod/description.txt @@ -0,0 +1 @@ +^3Clan Mod \ No newline at end of file diff --git a/Files/clanmod/dummy.pk3 b/Files/clanmod/dummy.pk3 new file mode 100644 index 0000000..4977580 Binary files /dev/null and b/Files/clanmod/dummy.pk3 differ diff --git a/Files/clanmod/sayings.cfg b/Files/clanmod/sayings.cfg new file mode 100644 index 0000000..5f2ee7f --- /dev/null +++ b/Files/clanmod/sayings.cfg @@ -0,0 +1,38 @@ +seta cm_empower_on_saying "has become ^5EMPOWERED!" +seta cm_empower_off_saying "has lost ^5EMPOWERMENT" + +seta cm_terminator_on_saying "has become the ^1TERMINATOR!" +seta cm_terminator_off_saying "has lost ^1TERMINATOR" + +seta cm_protect_on_saying "has become ^2PROTECTED!" +seta cm_protect_off_saying "has lost ^2PROTECTION" + +seta cm_silence_on_saying "has been ^3SILENCED!" +seta cm_silence_off_saying "may now ^3SPEAK" + +seta cm_punish_on_saying "is being ^0PUNISHED!" +seta cm_punish_off_saying "is no longer ^0PUNISHED" + +seta cm_sleep_on_saying "is going to ^5SLEEP!" +seta cm_sleep_off_saying "is ^5AWAKE" + +seta cm_slap_saying "has been ^4SLAPPED!" + +seta cm_slay_saying "has been ^1SLAIN!" + +seta cm_teleport_saying "has been ^6TELEPORTED!" + +seta cm_clanLogin_saying "is a clan member!" +seta cm_clanLogout_saying "is no longer a clan member." + +seta cm_AdminLogin1_saying "is logged in as an ^5Advisor!" +seta cm_AdminLogin2_saying "is logged in as a ^4Knight!" +seta cm_AdminLogin3_saying "is logged in as ^3Council!" + +seta cm_AdminLogout1_saying "has logged out of ^5Advisor" +seta cm_AdminLogout2_saying "has logged out of ^4Knight" +seta cm_AdminLogout3_saying "has logged out of ^3Council" + + + + diff --git a/Files/clanmod/server.cfg b/Files/clanmod/server.cfg new file mode 100644 index 0000000..0d3954e --- /dev/null +++ b/Files/clanmod/server.cfg @@ -0,0 +1,87 @@ +//////////////////// +// CLAN MOD // +//////////////////// +// AUTHOR: NeWaGe // +//////////////////// +seta sv_hostname "server name" +seta g_motd "message of the day" +//rconpassword "password" + +set timelimit "0" +set fraglimit "100" +set capturelimit "20" + +set sv_pure "0" +seta sv_maxclients "32" +seta g_inactivity "0" +set g_allowvote "0" + +set g_forceRegenTime "0" +set g_forcePowerDisable "0" +seta g_maxForceRank "7" + +set g_weaponDisable "65530" +set g_duelWeaponDisable "65530" + +set dmflags "" + +seta bot_honorableduelacceptance "1" +seta bot_minplayers "0" + +//////////////////////////// +//Clan Mod Configurations +//////////////////////////// +set cm_console_motd "Welcome to the Clan Mod beta server!" + +set cm_motd "Welcome to a Clan Mod server!\n\nwww.ClanMod.org" +set cm_motd_time "5" + +set cm_dualblade "0" +set cm_savedualblade "0" +set cm_pushall "0" +set cm_blacknames "0" +set cm_knockmedown "0" +set cm_report "0" +set cm_samenames "0" + +set cm_autoprotecttime "0" + +set cm_botsattackhumans "0" + +set cm_antiNameCrash "1" +set cm_antiForceCrash "1" + +set cm_multiduels "0" +set cm_duelradius "0" +set cm_duelstatus "0" +set cm_duelhealth "100" +set cm_duelshield "100" +set cm_duelbeginsaberoff "0" + +set cm_clanTag "" +set cm_clanPassword "" + +set cm_emoteControl "4194303" +set cm_voteControl "511" + +set cm_adminLevel1 "^5Advisor" +set cm_adminLevel2 "^4Knight" +set cm_adminLevel3 "^3Council" + +set cm_adminPassword1 "" +set cm_adminPassword2 "" +set cm_adminPassword3 "" + +set cm_adminControl1 "51207" +set cm_adminControl2 "61015" +set cm_adminControl3 "262143" + +//////////////////////////// +exec sayings.cfg + +set g_autoMapCycle "1" +map ffa_bespin + + + + diff --git a/Files/clanmod/vm/jk2mpgame.qvm b/Files/clanmod/vm/jk2mpgame.qvm new file mode 100644 index 0000000..b9cc123 Binary files /dev/null and b/Files/clanmod/vm/jk2mpgame.qvm differ diff --git a/Files/jk2Ded.exe b/Files/jk2Ded.exe new file mode 100644 index 0000000..8edd1fb Binary files /dev/null and b/Files/jk2Ded.exe differ diff --git a/Files/jk2ded b/Files/jk2ded new file mode 100644 index 0000000..d7862a9 Binary files /dev/null and b/Files/jk2ded differ diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..85e8e9a --- /dev/null +++ b/README.txt @@ -0,0 +1,19 @@ +*********************************** +Jedi Knight: Jedi Outcast +*********************************** +TITLE: Clan Mod v2.05 +AUTHOR: Jacob "NeWaGe" Fliss +E-MAIL: jake@newagesoldier.com +WEBSITE: http://newagesoldier.com/clanmod + +CREDITS: Special thanks to jedimod for the tag mode. + +INSTALLATION INSTRUCTIONS: Extract all contents of .zip to your GameData folder. +EXAMPLE: "C:\Program Files\LucasArts\Star Wars JK II Jedi Outcast\GameData" + +DESCRIPTION: A server side mod to help moderate your clan and server. + +THIS MODIFICATION IS NOT MADE, DISTRIBUTED, OR SUPPORTED BY ACTIVISION, RAVEN, OR +LUCASARTS ENTERTAINMENT COMPANY LLC. ELEMENTS TM & © LUCASARTS +ENTERTAINMENT COMPANY LLC AND/OR ITS LICENSORS. + diff --git a/bin/cpp.exe b/bin/cpp.exe new file mode 100644 index 0000000..533bfb1 Binary files /dev/null and b/bin/cpp.exe differ diff --git a/bin/lcc.exe b/bin/lcc.exe new file mode 100644 index 0000000..3c41d1b Binary files /dev/null and b/bin/lcc.exe differ diff --git a/bin/q3asm.exe b/bin/q3asm.exe new file mode 100644 index 0000000..23e8ce3 Binary files /dev/null and b/bin/q3asm.exe differ diff --git a/bin/rcc.exe b/bin/rcc.exe new file mode 100644 index 0000000..1646e1c Binary files /dev/null and b/bin/rcc.exe differ diff --git a/code/ChangeLog.txt b/code/ChangeLog.txt new file mode 100644 index 0000000..e834428 --- /dev/null +++ b/code/ChangeLog.txt @@ -0,0 +1,51 @@ +JediDog: Note: you can find all changes by just searching JediDog in the code. + +v2.04 +-Fixed Anti Flood +-Fixed Anti Force Crash +-Fixed ClientNum Server Crash +-Fixed Server msg next line bug +-Enhanced Anti MSGBoom +-Added Anti Fake Players +-Added Fix for Duel Challenge Get-up Bug +-Added a New Enhanced version of Anti Name Crash +-Removed old Anti Name Crash +-Removed cm_antiNameCrash cmd +-Removed cm_antiFlood cmd +-Removed cm_antiForceCrash cmd +-Removed Anti Name Crash, Anti Force Crash, and Anti MSGBoom Messages & Logs + +G_CLIENTS.C: +-Fixed the anti flood so that the bots don't appear as "ghosts." +-Added command "cm_antiFlood" to turn off and on anti flood. +-Added Anti Fake Players code under ClientConnect +-Added anti name crash in userinfo instead of clientconnect (much better) +-Removed anti name crash out of clientconnect +-Removed anti flood's command + +G_CMDS.C: +-Fixed all commands (client & admin) client number crash bug (if (client_id < 0 || client_id >= MAX_CLIENTS) +-Added a fix for duel challenge bug + +G_LOCAL.H: +-Added "extern vmCvar_t cm_antiFlood;" +-Removed "extern vmCvar_t cm_antiNameCrash;" +-Removed "extern vmCvar_t cm_antiForceCrash;" +-Removed "extern vmCvar_t cm_antiFlood;" + +G_MAIN.C: +-Removed command "cm_antiFlood" +-Removed command "cm_antiNameCrash" +-Removed command "cm_antiForceCrash" + +G_SVCMDS.C: +-Fixed all commands from the clientnumber crash (if (client_id < 0 || client_id >= MAX_CLIENTS) +-Fixed next line bug "...trap_SendServerCommand(-1, va("print\"Server: %s\n\""..." + +G_SYSCALLS.C: +-Enhanced anti msgboom by changing 1022 to 1000 +-Removed logs off of anti msgboom + +W_FORCE.C: +-Changed /0 to 0 because of typo fixing a possible bug allowing clients to crash the server + diff --git a/code/JK2 Game Source License.doc b/code/JK2 Game Source License.doc new file mode 100644 index 0000000..323f429 Binary files /dev/null and b/code/JK2 Game Source License.doc differ diff --git a/code/MakeAMod_readme.txt b/code/MakeAMod_readme.txt new file mode 100644 index 0000000..dab8010 --- /dev/null +++ b/code/MakeAMod_readme.txt @@ -0,0 +1,74 @@ +JK2 Game Source. Copyright (C) 2001-2002 Raven Softare, Lucas Arts + +The Game Source is broken out into 3 areas. + +game - governs the game, runs on the server side. +cgame - governs the client side of the game, runs on the client side. +ui - handles the ui on the client side. + +Making a quick mod is very straightforward. This document assumes Microsoft Visual C++ v6.xx. It covers making a slight mod to the game source, recompiling for debugging and rebuilding the VMs for distribution. + +Slow Rockets - TestMod +---------------------- +1. Open up the jk2mp-SDK.dsw in Microsoft Visual C++. +2. Set the "game" project as the active project. +3. Open the "g_local.h" file and change the GAMEVERSION define from "basejk" to "TestMod" +4. Save "g_local.h" +5. Open the "g_weapon.c" file. +6. Go to line 85 and change the 900 to 300. The old line reads: + + #define ROCKET_VELOCITY 900 + +The new line should read + + #define ROCKET_VELOCITY 300 + +7. Save "g_weapon.c" +8. Perform a Build All command and it should build a DLL for the game. + +At this point you have two options. You can run the debugger, choosing 'jk2MP.exe' as the executable host which will load your DLL for debugging or you can build the VMs for distribution. When you release mods, you must build new VMs and put them in a pk3 file. + +Building the VMs requires the files contained in the 'bin' path are available for execution ( lcc.exe and q3asm.exe ) +(The batch files included will reference them indirectly.) + +To build the sample vm for the slow rocket test, do the following: + +1. Open a DOS window. +2. Go to your mods game directory and run the 'game.bat' file. + +This ultimately produces a 'jk2mpgame.qvm' in the \base\vm\ path. + +5. Make a "TestMod" path under your JK2 directory. This will be a sibling to 'base' +6. Move 'jk2mpgame.qvm' to "\YourJK2Path\TestMod\vm\" +7. Run JK2MP with the following command line "jk2mp +set fs_game TestMod" +8. "TestMod" should be the referenced game and you should be able to catch up with and outrun your rockets. + + +Each of the areas contain a batch file "game.bat", "cgame.bat", and "ui.bat" which will build the appropriate vm files. + +----------------------------------------------- +Using Visual Studio to Build and Debug your Mod + +1. Create a directory to hold your Mod in the STEF directory + \YourJK2Path\TestMod\ +2. In VC, open Project->Settings +3. On the Debug tab Category General: + -set the "Executable for debug session" to your jk2MP.exe + -Set the "Program arguments" to: +set fs_cdpath yourfolderforjk2 +set r_fullscreen 0 +set viewlog 1 +set fs_game TestMod + (note, if you don't have the "set fs_game TestMod", you will need to create + a TestMod.pk3 file for the mod to show up in the menu - see below) +4. On the link tab, change path of the "Output file name" to your TestMod directory + +Do this for each of projects you are making modifications to (cgame, game, ui) + +------------------------------------------------- +Making my Mod show up on the Mod list in the game + +You need to have a TestMod.pk3 file in your mod directory +before it will show up on the in-game menu. Create a "description.txt" +file with some information about your game mod. Use WinZIP to create +the TestMod.pk3 file. You can now put the .dll files in this directory, +or create a "vm" directory and place the .qvm files in the vm directory. + + + diff --git a/code/base/vm/cgame.map b/code/base/vm/cgame.map new file mode 100644 index 0000000..dbd014a --- /dev/null +++ b/code/base/vm/cgame.map @@ -0,0 +1,1635 @@ +0 fffffed1 trap_CG_RegisterSharedMemory +0 fffffed2 trap_G2API_SetNewOrigin +0 fffffed3 trap_G2API_SetSurfaceOnOff +0 fffffed4 trap_G2API_SetRootSurface +0 fffffed5 trap_G2API_SetBoltInfo +0 fffffed6 trap_G2API_AddBolt +0 fffffed7 trap_G2API_RemoveGhoul2Model +0 fffffed8 trap_G2API_HasGhoul2ModelOnIndex +0 fffffed9 trap_G2API_DuplicateGhoul2Instance +0 fffffeda trap_G2API_CopySpecificGhoul2Model +0 fffffedb trap_G2API_CopyGhoul2Instance +0 fffffedc trap_G2API_GetGLAName +0 fffffedd trap_G2API_SetBoneAnim +0 fffffede trap_G2API_SetBoneAngles +0 fffffedf trap_G2API_CleanGhoul2Models +0 fffffee0 trap_G2API_CollisionDetect +0 fffffee1 trap_G2API_InitGhoul2Model +0 fffffee2 trap_G2API_GetBoltMatrix_NoRecNoRot +0 fffffee3 trap_G2API_GetBoltMatrix_NoReconstruct +0 fffffee4 trap_G2API_GetBoltMatrix +0 fffffee5 trap_G2API_GiveMeVectorFromMatrix +0 fffffee6 trap_G2_HaveWeGhoul2Models +0 fffffee7 trap_G2_SetGhoul2ModelIndexes +0 fffffee8 trap_G2_ListModelBones +0 fffffee9 trap_G2_ListModelSurfaces +0 fffffeea trap_ROFF_Purge_Ent +0 fffffeeb trap_ROFF_Play +0 fffffeec trap_ROFF_Cache +0 fffffeed trap_ROFF_UpdateEntities +0 fffffeee trap_ROFF_Clean +0 fffffeef trap_SP_Register +0 fffffef0 trap_SP_GetStringTextString +0 fffffef1 trap_SP_Print +0 fffffef2 trap_FX_AddSprite +0 fffffef3 trap_FX_AddPrimitive +0 fffffef4 trap_FX_AddBezier +0 fffffef5 trap_FX_AddPoly +0 fffffef6 trap_FX_AdjustTime +0 fffffef7 trap_FX_FreeSystem +0 fffffef8 trap_FX_InitSystem +0 fffffef9 trap_FX_AddScheduledEffects +0 fffffefa trap_FX_PlayBoltedEffectID +0 fffffefb trap_FX_PlayEntityEffectID +0 fffffefc trap_FX_PlayEffectID +0 fffffefd trap_FX_PlaySimpleEffectID +0 fffffefe trap_FX_PlayEntityEffect +0 fffffeff trap_FX_PlayEffect +0 ffffff00 trap_FX_PlaySimpleEffect +0 ffffff01 trap_FX_RegisterEffect +0 ffffff02 trap_R_inPVS +0 ffffff03 trap_GetEntityToken +0 ffffff04 trap_CIN_SetExtents +0 ffffff05 trap_CIN_DrawCinematic +0 ffffff06 trap_CIN_RunCinematic +0 ffffff07 trap_CIN_StopCinematic +0 ffffff08 trap_CIN_PlayCinematic +0 ffffff09 trap_SnapVector +0 ffffff0a trap_RealTime +0 ffffff0b trap_S_StopBackgroundTrack +0 ffffff0c trap_PC_RemoveAllGlobalDefines +0 ffffff0d trap_PC_LoadGlobalDefines +0 ffffff0e trap_PC_SourceFileAndLine +0 ffffff0f trap_PC_ReadToken +0 ffffff10 trap_PC_FreeSource +0 ffffff11 trap_PC_LoadSource +0 ffffff12 trap_PC_AddGlobalDefine +0 ffffff13 trap_Key_GetKey +0 ffffff14 trap_Key_SetCatcher +0 ffffff15 trap_Key_GetCatcher +0 ffffff16 trap_Key_IsDown +0 ffffff17 trap_MemoryRemaining +0 ffffff1a trap_OpenUIMenu +0 ffffff1b trap_SetClientTurnExtent +0 ffffff1c trap_SetClientForceAngle +0 ffffff1d trap_SetUserCmdValue +0 ffffff1e trap_GetUserCmd +0 ffffff1f trap_GetCurrentCmdNumber +0 ffffff20 trap_GetServerCommand +0 ffffff21 trap_GetSnapshot +0 ffffff22 trap_GetCurrentSnapshotNumber +0 ffffff23 trap_GetGameState +0 ffffff24 trap_GetGlconfig +0 ffffff25 trap_FX_AddLine +0 ffffff26 trap_R_GetBModelVerts +0 ffffff27 trap_R_SetLightStyle +0 ffffff28 trap_R_GetLightStyle +0 ffffff29 trap_R_RemapShader +0 ffffff2a trap_R_DrawRotatePic2 +0 ffffff2b trap_R_DrawRotatePic +0 ffffff2c trap_R_LerpTag +0 ffffff2d trap_R_ModelBounds +0 ffffff2e trap_R_DrawStretchPic +0 ffffff2f trap_R_SetColor +0 ffffff30 trap_R_RenderScene +0 ffffff31 trap_R_AddAdditiveLightToScene +0 ffffff32 trap_R_AddLightToScene +0 ffffff33 trap_R_LightForPoint +0 ffffff34 trap_R_AddPolysToScene +0 ffffff35 trap_R_AddPolyToScene +0 ffffff36 trap_R_AddRefEntityToScene +0 ffffff37 trap_R_ClearScene +0 ffffff8e asin +0 ffffff8f acos +0 ffffff90 ceil +0 ffffff91 floor +0 ffffff92 perpendicularvector +0 ffffff93 anglevectors +0 ffffff94 matrixmultiply +0 ffffff95 sqrt +0 ffffff96 atan2 +0 ffffff97 cos +0 ffffff98 sin +0 ffffff99 strncpy +0 ffffff9a memcpy +0 ffffff9b memset +0 ffffffc9 trap_AnyLanguage_ReadCharFromString +0 ffffffca trap_Language_UsesSpaces +0 ffffffcb trap_Language_IsAsian +0 ffffffcc trap_R_Font_DrawString +0 ffffffcd trap_R_Font_HeightPixels +0 ffffffce trap_R_Font_StrLenChars +0 ffffffcf trap_R_Font_StrLenPixels +0 ffffffd0 trap_R_RegisterFont +0 ffffffd1 trap_R_RegisterShaderNoMip +0 ffffffd2 trap_R_RegisterShader +0 ffffffd3 trap_R_RegisterSkin +0 ffffffd4 trap_R_RegisterModel +0 ffffffd5 trap_R_LoadWorldMap +0 ffffffd6 trap_S_StartBackgroundTrack +0 ffffffd7 trap_S_RegisterSound +0 ffffffd8 trap_S_Respatialize +0 ffffffd9 trap_S_StopLoopingSound +0 ffffffda trap_S_AddRealLoopingSound +0 ffffffdb trap_S_UpdateEntityPosition +0 ffffffdc trap_S_AddLoopingSound +0 ffffffdd trap_S_ClearLoopingSounds +0 ffffffde trap_S_StartLocalSound +0 ffffffdf trap_S_StartSound +0 ffffffe0 trap_S_MuteSound +0 ffffffe1 trap_CM_MarkFragments +0 ffffffe2 trap_CM_TransformedCapsuleTrace +0 ffffffe3 trap_CM_TransformedBoxTrace +0 ffffffe4 trap_CM_CapsuleTrace +0 ffffffe5 trap_CM_BoxTrace +0 ffffffe6 trap_CM_TransformedPointContents +0 ffffffe7 trap_CM_PointContents +0 ffffffe8 trap_CM_TempCapsuleModel +0 ffffffe9 trap_CM_TempBoxModel +0 ffffffea trap_CM_InlineModel +0 ffffffeb trap_CM_NumInlineModels +0 ffffffec trap_CM_LoadMap +0 ffffffed trap_UpdateScreen +0 ffffffee trap_SendClientCommand +0 ffffffef trap_RemoveCommand +0 fffffff0 trap_AddCommand +0 fffffff1 trap_SendConsoleCommand +0 fffffff2 trap_FS_FCloseFile +0 fffffff3 trap_FS_Write +0 fffffff4 trap_FS_Read +0 fffffff5 trap_FS_FOpenFile +0 fffffff6 trap_Args +0 fffffff7 trap_Argv +0 fffffff8 trap_Argc +0 fffffff9 trap_Cvar_VariableStringBuffer +0 fffffffa trap_Cvar_Set +0 fffffffb trap_Cvar_Update +0 fffffffc trap_Cvar_Register +0 fffffffd trap_Milliseconds +0 fffffffe trap_Error +0 ffffffff trap_Print +0 0 vmMain +0 122 C_PointContents +0 138 C_GetLerpOrigin +0 14a C_GetLerpAngles +0 15c C_GetModelScale +0 16e C_Trace +0 19a C_GetBoltPos +0 20d C_ImpactMark +0 24c CG_RegisterCvars +0 332 CG_ForceModelChange +0 368 CG_UpdateCvars +0 3bb CG_CrosshairPlayer +0 3d4 CG_LastAttacker +0 3e5 CG_Printf +0 3fe CG_Error +0 417 Com_Error +0 432 Com_Printf +0 44d CG_Argv +0 45c CG_RegisterItemSounds +0 4f5 CG_RegisterSounds +0 a8e CG_RegisterEffects +0 abc CG_RegisterGraphics +0 1119 CG_GetStripEdString +0 1149 CG_BuildSpectatorString +0 119d CG_RegisterClients +0 11e8 CG_ConfigString +0 1209 CG_StartMusic +0 124c CG_GetMenuBuffer +0 12b0 CG_Asset_Parse +0 154f CG_ParseMenu +0 15ba CG_Load_Menu +0 160a CG_OwnerDrawHandleKey +0 160f CG_FeederCount +0 166b CG_SetScoreSelection +0 1702 CG_InfoFromScoreIndex +0 1755 CG_FeederItemText +0 18d3 CG_FeederItemImage +0 18d8 CG_FeederSelection +0 1923 CG_Cvar_Get +0 1942 CG_Text_PaintWithCursor +0 1966 CG_OwnerDrawWidth +0 19f7 CG_PlayCinematic +0 1a16 CG_StopCinematic +0 1a1f CG_DrawCinematic +0 1a3e CG_RunCinematicFrame +0 1a47 CG_LoadHudMenu +0 1ae8 CG_AssetCache +0 1b95 CG_Init_CG +0 1ba1 CG_Init_CGents +0 1bad CG_InitItems +0 1bb9 CG_Init +0 1f82 CG_Shutdown +0 1f8e CG_NextForcePower_f +0 1fd2 CG_PrevForcePower_f +0 2016 CG_NextInventory_f +0 2060 CG_PrevInventory_f +0 20aa CG_TargetCommand_f +0 20dc CG_SizeUp_f +0 20f2 CG_SizeDown_f +0 2108 CG_Viewpos_f +0 2122 CG_ScoresDown_f +0 2147 CG_ScoresUp_f +0 2155 CG_scrollScoresDown_f +0 217e CG_scrollScoresUp_f +0 21a7 CG_spWin_f +0 21dc CG_spLose_f +0 2211 CG_TellTarget_f +0 223c CG_TellAttacker_f +0 2267 CG_VoiceTellTarget_f +0 2292 CG_VoiceTellAttacker_f +0 22bd CG_NextTeamMember_f +0 22c3 CG_PrevTeamMember_f +0 22c9 CG_NextOrder_f +0 233c CG_ConfirmOrder_f +0 236c CG_DenyOrder_f +0 238d CG_TaskOffense_f +0 23c4 CG_TaskDefense_f +0 23e3 CG_TaskPatrol_f +0 2402 CG_TaskCamp_f +0 2421 CG_TaskFollow_f +0 2440 CG_TaskRetrieve_f +0 245f CG_TaskEscort_f +0 247e CG_TaskOwnFlag_f +0 248f CG_TauntKillInsult_f +0 2497 CG_TauntPraise_f +0 249f CG_TauntTaunt_f +0 24a7 CG_TauntDeathInsult_f +0 24af CG_TauntGauntlet_f +0 24b7 CG_TaskSuicide_f +0 24d9 CG_StartOrbit_f +0 2521 CG_ConsoleCommand +0 255f CG_InitConsoleCommands +0 2685 MenuFontToHandle +0 26ac CG_Text_Width +0 26ca CG_Text_Height +0 26e5 CG_Text_Paint +0 2755 CG_DrawZoomMask +0 2aad CG_Draw3DModel +0 2b1b CG_DrawHead +0 2b54 CG_DrawFlagModel +0 2c39 DrawAmmo +0 2c42 CG_DrawHUDLeftFrame1 +0 2c62 CG_DrawHUDLeftFrame2 +0 2c82 DrawHealthArmor +0 2ee8 CG_DrawHealth +0 2f8f CG_DrawArmor +0 30d6 CG_DrawHUDRightFrame1 +0 30f6 CG_DrawHUDRightFrame2 +0 3116 CG_DrawAmmo +0 327c CG_DrawForcePower +0 3318 CG_DrawHUD +0 35be ForcePower_Valid +0 35eb CG_DrawForceSelect +0 383f CG_DrawInvenSelect +0 3ada CG_DrawStats +0 3aee CG_DrawTeamBackground +0 3b2b CG_DrawMiniScoreboard +0 3bb8 CG_DrawEnemyInfo +0 3dd2 CG_DrawSnapshot +0 3e12 CG_DrawFPS +0 3e9f CG_DrawTimer +0 3f07 CG_DrawTeamOverlay +0 4246 CG_DrawPowerupIcons +0 432a CG_DrawUpperRight +0 4396 CG_AddLagometerFrameInfo +0 43b6 CG_AddLagometerSnapshotInfo +0 43f9 CG_DrawDisconnect +0 44d2 CG_DrawLagometer +0 46e1 CG_CenterPrint +0 471f CG_DrawCenterString +0 4801 CG_DrawCrosshair +0 4a13 CG_WorldCoordToScreenCoordFloat +0 4abc CG_WorldCoordToScreenCoord +0 4add CG_SaberClashFlare +0 4baf CG_DrawHolocronIcons +0 4c39 CG_IsDurationPower +0 4c62 CG_DrawActivePowers +0 4d28 CG_DrawRocketLocking +0 4ee0 CG_ScanForCrosshairEntity +0 502f CG_DrawCrosshairNames +0 50d8 CG_DrawSpectator +0 52e6 CG_DrawVote +0 5357 CG_DrawTeamVote +0 54a7 CG_DrawScoreboard +0 54b1 CG_DrawIntermission +0 54c0 CG_DrawFollow +0 554b CG_DrawAmmoWarning +0 554e CG_DrawWarmup +0 5766 CG_DrawTimedMenus +0 5787 CG_DrawFlagStatus +0 5859 CG_Draw2D +0 5e69 CG_DrawTourneyScoreboard +0 5e6c CG_DrawActive +0 5ef7 CG_DrawRect +0 5f29 CG_GetColorForHealth +0 5fc7 CG_DrawSides +0 601d CG_DrawTopBottom +0 6073 CG_FillRect2 +0 60a2 CG_FillRect +0 60d1 CG_DrawPic +0 60f8 CG_DrawRotatePic +0 6122 CG_DrawRotatePic2 +0 614c CG_DrawChar +0 61b3 CG_DrawStringExt +0 630f CG_DrawBigString +0 6347 CG_DrawBigStringColor +0 636d CG_DrawSmallString +0 63a1 CG_DrawSmallStringColor +0 63c2 CG_DrawStrlen +0 6412 CG_TileClearBox +0 6459 CG_TileClear +0 64f0 CG_FadeColor +0 6534 CG_ColorForGivenHealth +0 6583 CG_ColorForHealth +0 65e8 CG_DrawNumField +0 6818 UI_DrawProportionalString +0 68a1 UI_DrawScaledProportionalString +0 6918 CG_BubbleTrail +0 6ab6 CG_SmokePuff +0 6c19 CG_TestLine +0 6cea CG_ThrowChunk +0 6d9d CG_DoGlassQuad +0 6f0a CG_CalcBiLerp +0 7507 CG_CalcHeightWidth +0 76b4 CG_InitGlass +0 770b Vector2Set +0 771a CG_DoGlass +0 7996 CG_GlassShatter +0 79ce CG_GlassShatter_Old +0 7b64 CG_CreateDebris +0 7e27 CG_ScorePlum +0 7eef CG_ExplosionEffects +0 7f35 CG_MakeExplosion +0 80f4 CG_SurfaceExplosion +0 8399 CG_Bleed +0 8400 CG_LaunchGib +0 847f CG_PositionEntityOnTag +0 8553 CG_PositionRotatedEntityOnTag +0 8624 CG_SetEntitySoundPosition +0 8681 CG_EntityEffects +0 8775 FX_AddOrientedLine +0 883d FX_DrawPortableShield +0 8951 CG_Special +0 8974 CG_SetGhoul2Info +0 899d CG_CreateBBRefEnts +0 89a0 G2_BoltToGhoul2Model +0 8a51 ScaleModelAxis +0 8b59 CG_General +0 997e CG_Speaker +0 99ef CG_GreyItem +0 9a1c CG_Item +0 a0f4 CG_Missile +0 a4b5 CG_Mover +0 a52f CG_Beam +0 a563 CG_Portal +0 a5da CG_AdjustPositionForMover +0 a691 LerpBoneAngleOverrides +0 a694 CG_InterpolateEntityPosition +0 a75a CG_CalcEntityLerpPositions +0 a7ff CG_TeamBase +0 a856 CG_AddCEntity +0 a911 CG_ManualEntityRender +0 a91a CG_AddPacketEntities +0 aa03 CG_ROFF_NotetrackCallback +0 acdd CG_PlaceString +0 adf9 CG_Obituary +0 b15a CG_ToggleBinoculars +0 b1c4 CG_UseItem +0 b277 CG_ItemPickup +0 b392 CG_PainEvent +0 b3ed CG_ReattachLimb +0 b475 CG_BodyQueueCopy +0 b653 CG_TeamName +0 b670 CG_PrintCTFMessage +0 b78c CG_GetCTFMessageEvent +0 b7cd DoFall +0 b89b CG_InClientBitflags +0 b8ea CG_EntityEvent +0 d283 CG_CheckEvents +0 d319 CG_LoadingString +0 d329 CG_LoadingItem +0 d344 CG_LoadingClient +0 d371 CG_DrawInformation +0 da27 CG_LoadBar +0 dae5 CG_ClearLightStyles +0 db07 CG_RunLightStyles +0 dbd1 CG_SetLightstyle +0 dc5c CG_InitLocalEntities +0 dc92 CG_FreeLocalEntity +0 dccb CG_AllocLocalEntity +0 dd09 CG_BloodTrail +0 dd7e CG_FragmentBounceMark +0 de21 CG_FragmentBounceSound +0 de3a CG_ReflectVelocity +0 df30 CG_AddFragment +0 e0ab CG_AddFadeRGB +0 e17d CG_AddFadeScaleModel +0 e334 CG_AddMoveScaleFade +0 e41f CG_AddPuff +0 e52b CG_AddScaleFade +0 e5c4 CG_AddFallScaleFade +0 e676 CG_AddExplosion +0 e6e7 CG_AddSpriteExplosion +0 e7b3 CG_AddRefEntity +0 e7ce CG_AddScorePlum +0 ea04 CG_AddOLine +0 eb28 CG_AddLine +0 eb3b CG_AddLocalEntities +0 ebeb CG_InitMarkPolys +0 ec21 CG_FreeMarkPoly +0 ec5a CG_AllocMark +0 ecb1 CG_ImpactMark +0 ef8b CG_AddMarks +0 f255 CG_ClearParticles +0 f2f8 CG_AddParticleToScene +0 10b14 CG_AddParticles +0 10d19 CG_ParticleSnowFlurry +0 10eb5 CG_ParticleSnow +0 1100b CG_ParticleBubble +0 1118a CG_ParticleSmoke +0 11289 CG_ParticleBulletDebris +0 1134a CG_ParticleExplosion +0 11455 CG_AddParticleShrapnel +0 11458 CG_NewParticleArea +0 11599 CG_SnowLink +0 115df CG_ParticleImpactSmokePuff +0 116c2 CG_Particle_Bleed +0 117a6 CG_Particle_OilParticle +0 118a8 CG_Particle_OilSlick +0 119e9 CG_OilSlickRemove +0 11a34 ValidBloodPool +0 11b3a CG_BloodPool +0 11c33 CG_ParticleBloodCloud +0 11d6f CG_ParticleSparks +0 11ee5 CG_ParticleDust +0 120eb CG_ParticleMisc +0 1218b CG_CustomSound +0 121f9 CG_NeedAnimSequence +0 1222e CG_IsValidCharacterModel +0 122ab CG_ParseSurfsFile +0 123c6 CG_RegisterClientModelname +0 12989 CG_ColorFromString +0 129ed CG_LoadClientInfo +0 12d4d CG_CopyClientInfoModel +0 12e7c CG_ScanForExistingClientInfo +0 13069 CG_SetDeferredClientInfo +0 13193 CG_NewClientInfo +0 13605 CG_ActualLoadDeferredPlayers +0 1364d CG_LoadDeferredPlayers +0 13653 CG_InRoll +0 1367d CG_InRollAnim +0 1369f CG_SetLerpFrameAnimation +0 13b90 CG_FirstAnimFrame +0 13bd3 CG_InWalkingAnim +0 13c2a CG_FootstepForSurface +0 13cc4 CG_FootStep +0 13d42 CG_RunLerpFrame +0 141f9 CG_ClearLerpFrame +0 1423e CG_PlayerAnimation +0 14324 CG_SwingAngles +0 1442e CG_SwingAnglesATST +0 1455f CG_AddPainTwitch +0 145a6 CG_G2SetBoneAngles +0 145dd CG_InKnockDown +0 14600 CG_G2ClientSpineAngles +0 14906 CG_G2PlayerAngles +0 1520e CG_HasteTrail +0 1528b CG_PlayerFlag +0 153a8 CG_PlayerPowerups +0 15476 CG_PlayerFloatSprite +0 154c2 CG_PlayerSprites +0 1551b CG_PlayerShadow +0 155d8 CG_PlayerSplash +0 156cb CG_ForcePushBlur +0 157ca CG_ForceGripEffect +0 158e7 CG_AddRefEntityWithPowerups +0 15955 CG_PlayerShieldHit +0 159c9 CG_DrawPlayerShield +0 15a7d CG_PlayerHitFX +0 15aa8 CG_LightVerts +0 15bd8 CG_DoSaber +0 15df9 CG_GetTagWorldPosition +0 15ec2 CG_CreateSaberMarks +0 16304 CG_G2TraceCollide +0 163c3 CG_G2SaberEffects +0 1642d CG_AddSaberBlade +0 16abc CG_IsMindTricked +0 16b0e CG_DrawPlayerSphere +0 16bab CG_AddLightningBeam +0 16d4e CG_AddRandomLightning +0 16e44 CG_ThereIsAMaster +0 16e6f CG_FootStepGeneric +0 16ed5 CG_G2EntSetLerpFrameAnimation +0 17174 CG_G2EntRunLerpFrame +0 1760d CG_G2EntAnimation +0 176c1 CG_G2AnimEntSpineAngles +0 17824 CG_G2AnimEntAngles +0 17c23 CG_DrawNoForceSphere +0 17cef CG_G2Animated +0 180bc CG_ForceFPLSPlayerModel +0 18349 CG_Player +0 1a39f CG_ResetPlayerEntity +0 1a504 CG_CheckAmmo +0 1a507 CG_DamageFeedback +0 1a64a CG_Respawn +0 1a65b CG_CheckPlayerstateEvents +0 1a73d CG_CheckChangedPredictableEvents +0 1a7ca CG_CheckLocalSounds +0 1a9c6 CG_TransitionPlayerState +0 1aa7c CG_BuildSolidList +0 1ab0b CG_ClipMoveToEntities +0 1ac1c CG_Trace +0 1ac60 CG_PointContents +0 1acd0 CG_InterpolatePlayerState +0 1ae05 CG_TouchItem +0 1aef7 CG_TouchTriggerPrediction +0 1afae CG_EntityStateToPlayerState +0 1b148 CG_PredictPlayerState +0 1b4c3 CGSagaGetValueGroup +0 1b5be CGSagaGetPairedValue +0 1b796 CG_InitSagaMode +0 1b829 CG_SagaRoundOver +0 1b900 CG_SagaObjectiveCompleted +0 1ba23 CG_DrawClientScore +0 1bce8 CG_TeamScoreboard +0 1bd65 CG_GetTeamCount +0 1bda7 CG_DrawOldScoreboard +0 1c389 CG_ValidOrder +0 1c3bb CG_ParseScores +0 1c5f3 CG_ParseTeamInfo +0 1c6c2 CG_ParseServerinfo +0 1c8cf CG_ParseWarmup +0 1c8ee CG_SetConfigValues +0 1ca0a CG_ShaderStateChanged +0 1cac2 CG_ConfigStringModified +0 1cd79 CG_AddToTeamChat +0 1cefc CG_KillCEntityInstances +0 1d005 CG_MapRestart +0 1d08f CG_ParseVoiceChats +0 1d2f2 CG_LoadVoiceChats +0 1d354 CG_HeadModelVoiceChats +0 1d3ee CG_GetVoiceChat +0 1d462 CG_VoiceChatListForClient +0 1d47e CG_PlayVoiceChat +0 1d4f8 CG_PlayBufferedVoiceChats +0 1d526 CG_AddBufferedVoiceChat +0 1d565 CG_VoiceChatLocal +0 1d617 CG_VoiceChat +0 1d6b0 CG_RemoveChatEscapeChar +0 1d6f6 CG_CheckSVStripEdRef +0 1d823 CG_ServerCommand +0 1db42 CG_ExecuteNewServerCommands +0 1db69 CG_ResetEntity +0 1dbad CG_TransitionEntity +0 1dbda CG_SetInitialSnapshot +0 1dc9b CG_TransitionSnapshot +0 1dda1 CG_SetNextSnap +0 1de88 CG_ReadNextSnapshot +0 1def7 CG_ProcessSnapshots +0 1dfa7 CreepToPosition +0 1e174 TurretClientRun +0 1e476 CG_TestModel_f +0 1e501 CG_TestGun_f +0 1e50d CG_TestModelNextFrame_f +0 1e523 CG_TestModelPrevFrame_f +0 1e540 CG_TestModelNextSkin_f +0 1e556 CG_TestModelPrevSkin_f +0 1e573 CG_AddTestModel +0 1e5fe CG_CalcVrect +0 1e66b CG_StepOffset +0 1e68d CG_CalcIdealThirdPersonViewTarget +0 1e6cd CG_CalcIdealThirdPersonViewLocation +0 1e706 CG_ResetThirdPersonViewDamp +0 1e773 CG_UpdateThirdPersonTargetDamp +0 1e7fa CG_UpdateThirdPersonCameraDamp +0 1e8c0 CG_OffsetThirdPersonView +0 1e9e6 CG_OffsetFirstPersonView +0 1ec13 CG_ZoomDown_f +0 1ec23 CG_ZoomUp_f +0 1ec33 CG_CalcFOVFromX +0 1ec6e CG_CalcFov +0 1edeb CG_DamageBlendBlob +0 1f033 CheckOutOfConstrict +0 1f09e CG_CalcViewValues +0 1f1c5 CG_PowerupTimerSounds +0 1f205 CG_AddBufferedSound +0 1f22f CG_PlayBufferedSounds +0 1f268 CG_UpdateSoundTrackers +0 1f2c1 CG_SE_UpdateShake +0 1f3a4 CG_SE_UpdateMusic +0 1f40d CG_CalcScreenEffects +0 1f41a CGCam_Shake +0 1f430 CGCam_SetMusicMult +0 1f44f CG_DrawActiveFrame +0 1f676 CG_RegisterWeapon +0 201c3 CG_SetGhoul2InfoRef +0 20200 CG_RegisterItemVisuals +0 20362 CG_MapTorsoToWeaponFrame +0 20464 CG_CalculateWeaponPosition +0 20549 CG_LightningBolt +0 2056e CG_AddWeaponWithPowerups +0 2059d CG_AddPlayerWeapon +0 20aa2 CG_AddViewWeapon +0 20c53 CG_DrawIconBackground +0 20e2a CG_WeaponCheck +0 20e63 CG_WeaponSelectable +0 20ec4 CG_DrawWeaponSelect +0 21214 CG_NextWeapon_f +0 2127a CG_PrevWeapon_f +0 212e0 CG_Weapon_f +0 213ec CG_OutOfAmmoChange +0 21435 CG_FireATST +0 21453 CG_GetClientWeaponMuzzleBoltPoint +0 214c9 CG_FireWeapon +0 21691 CG_MissileHitWall +0 21771 CG_MissileHitPlayer +0 2186a CG_Tracer +0 21a77 CG_CalcMuzzlePoint +0 21c65 CG_InitG2Weapons +0 21cf1 CG_ShutDownG2Weapons +0 21d0b CG_CopyG2WeaponInstance +0 21d42 CG_CheckPlayerG2Weapons +0 21e66 FX_BlasterProjectileThink +0 21e88 FX_BlasterAltFireThink +0 21eaa FX_BlasterWeaponHitWall +0 21eb9 FX_BlasterWeaponHitPlayer +0 21eda FX_BowcasterProjectileThink +0 21efc FX_BowcasterHitWall +0 21f0b FX_BowcasterHitPlayer +0 21f1a FX_BowcasterAltProjectileThink +0 21f3c FX_BryarProjectileThink +0 21f5e FX_BryarHitWall +0 21f6d FX_BryarHitPlayer +0 21f8e FX_BryarAltProjectileThink +0 21fd0 FX_BryarAltHitWall +0 22014 FX_BryarAltHitPlayer +0 22035 FX_TurretProjectileThink +0 22057 FX_TurretHitWall +0 22066 FX_TurretHitPlayer +0 22087 FX_DEMP2_ProjectileThink +0 220a9 FX_DEMP2_HitWall +0 220b8 FX_DEMP2_HitPlayer +0 220c7 FX_DEMP2_AltBeam +0 220ca FX_DEMP2_AltDetonate +0 2213c FX_DisruptorMainShot +0 22173 FX_DisruptorAltShot +0 221e0 FX_DisruptorAltMiss +0 222bc FX_DisruptorAltHit +0 222cb FX_DisruptorHitWall +0 222da FX_DisruptorHitPlayer +0 222e9 FX_FlechetteProjectileThink +0 2230b FX_FlechetteWeaponHitWall +0 2231a FX_FlechetteWeaponHitPlayer +0 22329 FX_FlechetteAltProjectileThink +0 2234b FX_RepeaterProjectileThink +0 2236d FX_RepeaterHitWall +0 2237c FX_RepeaterHitPlayer +0 2238b FX_RepeaterAltProjectileThink +0 223ad FX_RepeaterAltHitWall +0 223bc FX_RepeaterAltHitPlayer +0 223cb FX_RocketProjectileThink +0 223ed FX_RocketHitWall +0 223fc FX_RocketHitPlayer +0 2240b FX_RocketAltProjectileThink +0 2242d FX_ForceDrained +0 22464 PM_SlideMove +0 22854 PM_StepSlideMove +0 22ba3 BG_InSpecialJump +0 22bc8 BG_InSaberStandAnim +0 22bee BG_DirectFlippingAnim +0 22c0d BG_SaberInAttack +0 22c3a BG_SaberInSpecial +0 22c57 BG_SaberInIdle +0 22c74 BG_FlippingAnim +0 22cb0 BG_SpinningSaberAnim +0 22d9a BG_SaberInSpecialAttack +0 22dd4 BG_BrokenParryForAttack +0 22e12 BG_BrokenParryForParry +0 22e64 BG_KnockawayForParry +0 22e8d BG_InRoll +0 22eb3 BG_InDeathAnim +0 22ee8 PM_SaberBounceForAttack +0 22f22 PM_SaberDeflectionForQuad +0 22f5b PM_SaberInDeflect +0 22f70 PM_SaberInParry +0 22f85 PM_SaberInKnockaway +0 22f9a PM_SaberInReflect +0 22faf PM_SaberInStart +0 22fc4 PM_SaberInReturn +0 22fde PM_InSaberAnim +0 22ff5 PM_InKnockDown +0 23022 PM_PainAnim +0 23041 PM_JumpingAnim +0 23060 PM_LandingAnim +0 230a7 PM_SpinningAnim +0 230b4 PM_InOnGroundAnim +0 23111 PM_InRollComplete +0 23137 PM_AnimLength +0 23164 PM_DebugLegsAnim +0 231af BG_ParseAnimationFile +0 23327 PM_StartLegsAnim +0 233ac PM_ContinueLegsAnim +0 233cc PM_ForceLegsAnim +0 2343c PM_StartTorsoAnim +0 23471 PM_SetLegsAnimTimer +0 2348f PM_SetTorsoAnimTimer +0 234ad BG_SaberStartTransAnim +0 234fc PM_SetAnimFinal +0 23714 PM_SetAnim +0 2378d PM_GetSaberStance +0 237e3 PM_DoSlowFall +0 23806 PM_AddEvent +0 23815 PM_AddEventWithParm +0 23825 PM_AddTouchEnt +0 2387a PM_ClipVelocity +0 238f3 PM_Friction +0 239ef PM_Accelerate +0 23a6b PM_CmdScale +0 23b02 PM_SetMovementDir +0 23c4e PM_ForceJumpingUp +0 23d0d PM_JumpForDir +0 23db0 PM_SetPMViewAngle +0 23df1 PM_AdjustAngleForWallRun +0 23ff5 PM_SetForceJumpZStart +0 24017 PM_CheckJump +0 24f49 PM_CheckWaterJump +0 25030 PM_WaterJumpMove +0 25071 PM_WaterMove +0 251a2 PM_FlyMove +0 2525c PM_AirMove +0 2531f PM_WalkMove +0 255c1 PM_DeadMove +0 2563a PM_NoclipMove +0 257ac PM_FootstepForSurface +0 257c5 PM_TryRoll +0 259c6 PM_CrashLand +0 25ce4 PM_CorrectAllSolid +0 25dcb PM_GroundTraceMissed +0 25f5c PM_GroundTrace +0 260ef PM_SetWaterLevel +0 261bc PM_CheckDuck +0 26392 PM_Use +0 263db PM_RunningAnim +0 26409 PM_Footsteps +0 267d7 PM_WaterEvents +0 2682e PM_BeginWeaponChange +0 26894 PM_FinishWeaponChange +0 268e7 PM_DoChargedWeapons +0 26dc1 PM_ItemUsable +0 26ff7 PM_Weapon +0 279b0 PM_Animate +0 27a1d PM_DropTimers +0 27aa7 PM_UpdateViewAngles +0 27b4b PM_AdjustAttackStates +0 27ec3 BG_CmdForRoll +0 27f18 BG_AdjustClientSpeed +0 28382 PmoveSingle +0 288c3 Pmove +0 2896f swapfunc +0 289f6 med3 +0 28a79 qsort +0 28e32 strlen +0 28e4d strcat +0 28e90 strcpy +0 28ec5 strcmp +0 28efe strchr +0 28f1d strstr +0 28f63 tolower +0 28f7b toupper +0 28f93 memmove +0 28fda tan +0 28ff1 srand +0 28ff8 rand +0 2900d atof +0 290d2 _atof +0 2919d atoi +0 29215 _atoi +0 29297 abs +0 292ac fabs +0 292c1 AddInt +0 2939c AddFloat +0 294aa AddString +0 29541 vsprintf +0 296d9 sscanf +0 29744 BG_LegalizedForcePowers +0 29b20 vectoyaw +0 29b7a BG_HasYsalamiri +0 29ba9 BG_CanUseFPNow +0 29c27 BG_FindItemForPowerup +0 29c63 BG_FindItemForHoldable +0 29c9d BG_FindItemForWeapon +0 29cd0 BG_FindItem +0 29cf9 BG_PlayerTouchesItem +0 29d59 BG_ProperForceIndex +0 29d7c BG_CycleForce +0 29e54 BG_GetItemIndexByTag +0 29e84 BG_CycleInven +0 29ef0 BG_CanItemBeGrabbed +0 2a156 BG_EvaluateTrajectory +0 2a324 BG_EvaluateTrajectoryDelta +0 2a41e BG_AddPredictableEventToPlayerstate +0 2a459 BG_TouchJumpPad +0 2a4bd BG_PlayerStateToEntityState +0 2a7d2 BG_PlayerStateToEntityStateExtraPolate +0 2aaf4 BG_Alloc +0 2ab34 BG_AllocUnaligned +0 2ab67 BG_TempAlloc +0 2ab9f BG_TempFree +0 2abcc BG_StringAlloc +0 2abef BG_OutOfMemory +0 2ac01 PM_irand_timesync +0 2ac36 BG_ForcePowerDrain +0 2acf4 PM_AttackMoveForQuad +0 2ad29 PM_SaberAnimTransitionAnim +0 2ae4a PM_SaberMoveQuadrantForMovement +0 2aeaf PM_SaberInBounce +0 2aed4 PM_SaberInTransition +0 2aee9 PM_SaberAttackChainAngle +0 2af19 PM_SaberKataDone +0 2b01a PM_SetAnimFrame +0 2b024 PM_SaberLockBreak +0 2b2f9 PM_SaberLocked +0 2b51d PM_SaberInBrokenParry +0 2b542 PM_BrokenParryForParry +0 2b584 PM_CanBackstab +0 2b605 PM_SaberFlipOverAttackMove +0 2b6f2 PM_SomeoneInFront +0 2b782 PM_SaberLungeAttackMove +0 2b7cc PM_SaberJumpAttackMove +0 2b834 PM_GroundDistance +0 2b89d PM_SaberAttackForMovement +0 2ba2a PM_WeaponLightsaber +0 2c2c0 PM_SetSaberMove +0 2c558 Q_rand +0 2c56d Q_random +0 2c57f Q_crandom +0 2c590 VectorCompare +0 2c5c8 VectorLength +0 2c5fb VectorLengthSquared +0 2c627 Distance +0 2c668 DistanceSquared +0 2c6b6 VectorNormalizeFast +0 2c715 VectorInverse +0 2c73d CrossProduct +0 2c7b6 ClampChar +0 2c7cd ClampShort +0 2c7e4 DirToByte +0 2c83f ByteToDir +0 2c85d ColorBytes3 +0 2c8cc ColorBytes4 +0 2c95e NormalizeColor +0 2c9d4 PlaneFromPoints +0 2ca92 RotatePointAroundVector +0 2cb9d RotateAroundDirection +0 2cbe1 vectoangles +0 2cc9d AnglesToAxis +0 2ccd2 AxisClear +0 2cd09 AxisCopy +0 2cd2d ProjectPointOnPlane +0 2cde8 MakeNormalVectors +0 2ce93 VectorRotate +0 2cf30 Q_rsqrt +0 2cf67 Q_fabs +0 2cf77 LerpAngle +0 2cfa8 AngleSubtract +0 2cfcd AnglesSubtract +0 2d01b AngleMod +0 2d02d AngleNormalize360 +0 2d03b AngleNormalize180 +0 2d056 AngleDelta +0 2d066 SetPlaneSignbits +0 2d093 BoxOnPlaneSide +0 2d454 RadiusFromBounds +0 2d4a7 ClearBounds +0 2d4de AddPointToBounds +0 2d577 VectorNormalize +0 2d5e7 VectorNormalize2 +0 2d675 _VectorMA +0 2d6b7 _DotProduct +0 2d6ec _VectorSubtract +0 2d725 _VectorAdd +0 2d75e _VectorCopy +0 2d785 _VectorScale +0 2d7b5 Vector4Scale +0 2d7f7 Q_log2 +0 2d816 MatrixMultiply +0 2d9eb AngleVectors +0 2dae3 PerpendicularVector +0 2db4f Rand_Init +0 2db56 flrand +0 2db91 irand +0 2dbc3 powf +0 2dbe6 GetIDForString +0 2dc2b GetStringForID +0 2dc67 Com_Clamp +0 2dc81 Q_stristr +0 2dd0c COM_SkipPath +0 2dd30 COM_StripExtension +0 2dd66 COM_DefaultExtension +0 2ddae ShortSwap +0 2ddce ShortNoSwap +0 2ddd9 LongSwap +0 2de0c LongNoSwap +0 2de12 Long64Swap +0 2de4f Long64NoSwap +0 2de57 FloatSwap +0 2de6d FloatNoSwap +0 2de74 COM_BeginParseSession +0 2de86 COM_GetCurrentParseLine +0 2de8c COM_Parse +0 2de9b COM_ParseError +0 2debb COM_ParseWarning +0 2dedb SkipWhitespace +0 2df12 COM_Compress +0 2e065 COM_ParseExt +0 2e1b1 COM_ParseString +0 2e1d2 COM_ParseInt +0 2e1ff COM_ParseFloat +0 2e22c COM_ParseVec4 +0 2e259 COM_MatchToken +0 2e282 SkipBracedSection +0 2e2c0 SkipRestOfLine +0 2e2f8 Parse1DMatrix +0 2e337 Parse2DMatrix +0 2e372 Parse3DMatrix +0 2e3b7 Q_isprint +0 2e3cc Q_islower +0 2e3e1 Q_isupper +0 2e3f6 Q_isalpha +0 2e417 Q_strrchr +0 2e44b Q_strncpyz +0 2e486 Q_stricmpn +0 2e511 Q_strncmp +0 2e563 Q_stricmp +0 2e58b Q_strlwr +0 2e5b1 Q_strupr +0 2e5d7 Q_strcat +0 2e603 Q_PrintStrlen +0 2e65b Q_CleanStr +0 2e6c9 Com_sprintf +0 2e708 va +0 2e735 Info_ValueForKey +0 2e815 Info_NextPair +0 2e8b3 Info_RemoveKey +0 2e983 Info_RemoveKey_Big +0 2ea53 Info_Validate +0 2ea7a Info_SetValueForKey +0 2eb4a Info_SetValueForKey_Big +0 2ec12 Q_irand +0 2ec2a UI_Alloc +0 2ec64 UI_InitMemory +0 2ec6d UI_OutOfMemory +0 2ec73 hashForString +0 2ecb3 String_Alloc +0 2ed8c String_Report +0 2edd5 String_Init +0 2ee19 PC_SourceWarning +0 2ee49 PC_SourceError +0 2ee79 LerpColor +0 2eed4 Float_Parse +0 2ef00 PC_Float_Parse +0 2ef55 Color_Parse +0 2ef82 PC_Color_Parse +0 2efaf Int_Parse +0 2efdb PC_Int_Parse +0 2f033 Rect_Parse +0 2f07a PC_Rect_Parse +0 2f0c1 String_Parse +0 2f0ed PC_String_Parse +0 2f162 PC_Script_Parse +0 2f1e4 Init_Display +0 2f1eb GradientBar_Paint +0 2f231 Window_Init +0 2f26d Fade +0 2f2de Window_Paint +0 2f628 Item_SetScreenCoords +0 2f6bc Item_UpdatePosition +0 2f70f Menu_UpdatePosition +0 2f766 Menu_PostParse +0 2f792 Menu_ClearFocus +0 2f815 IsVisible +0 2f838 Rect_ContainsPoint +0 2f87d Menu_ItemsMatchingGroup +0 2f8d9 Menu_GetMatchingItemByNumber +0 2f946 Script_SetColor +0 2f9e0 Script_SetAsset +0 2f9f9 Script_SetBackground +0 2fa1b Menu_FindItemByName +0 2fa6a Script_SetTeamColor +0 2fa9f Script_SetItemColor +0 2fb78 Script_SetItemRect +0 2fbf6 Menu_ShowItemByName +0 2fc68 Menu_FadeItemByName +0 2fce1 Menus_FindByName +0 2fd12 Menus_ShowByName +0 2fd2a Menus_OpenByName +0 2fd33 Menu_RunCloseScript +0 2fd62 Menus_CloseByName +0 2fdc2 Menus_CloseAll +0 2fdf8 Script_Show +0 2fe18 Script_Hide +0 2fe38 Script_FadeIn +0 2fe58 Script_FadeOut +0 2fe78 Script_Open +0 2fe90 Script_Close +0 2feba Menu_TransitionItemByName +0 2ffa5 Script_Defer +0 2ffcc Script_RunDeferred +0 2ffe6 Script_Transition +0 30048 Menu_OrbitItemByName +0 300b5 Script_Orbit +0 30123 Script_SetFocus +0 301ae Script_SetPlayerModel +0 301cc Script_SetPlayerHead +0 301ea Script_SetCvar +0 30216 Script_SetCvarToCvar +0 3024f Script_Exec +0 30276 Script_Play +0 3029f Script_playLooped +0 302cb Item_RunScript +0 30368 Item_EnableShowViaCvar +0 30441 Item_SetFocus +0 305ad Item_TextScroll_MaxScroll +0 305dc Item_TextScroll_ThumbPosition +0 30626 Item_TextScroll_ThumbDrawPosition +0 3068f Item_TextScroll_OverLB +0 30777 Item_TextScroll_MouseEnter +0 307a8 Item_TextScroll_HandleKey +0 3093e Item_ListBox_MaxScroll +0 30998 Item_ListBox_ThumbPosition +0 30a1f Item_ListBox_ThumbDrawPosition +0 30ae4 Item_Slider_ThumbPosition +0 30b7c Item_Slider_OverSlider +0 30bb1 Item_ListBox_OverLB +0 30d7c Item_ListBox_MouseEnter +0 30eb1 Item_MouseEnter +0 30fd3 Item_MouseLeave +0 3101f Menu_HitTest +0 3105d Item_SetMouseOver +0 31086 Item_OwnerDraw_HandleKey +0 310c0 Item_ListBox_HandleKey +0 315dd Item_YesNo_HandleKey +0 31663 Item_Multi_CountSettings +0 3167b Item_Multi_FindCvarByValue +0 31700 Item_Multi_Setting +0 31791 Item_Multi_HandleKey +0 31889 Item_TextField_HandleKey +0 31c0d Scroll_TextScroll_AutoFunc +0 31c6a Scroll_TextScroll_ThumbFunc +0 31d59 Scroll_ListBox_AutoFunc +0 31db6 Scroll_ListBox_ThumbFunc +0 31f3d Scroll_Slider_ThumbFunc +0 31fd7 Item_StartCapture +0 3214c Item_StopCapture +0 3214f Item_Slider_HandleKey +0 3224b Item_HandleKey +0 3235b Item_Action +0 32372 Menu_SetPrevCursorItem +0 32448 Menu_SetNextCursorItem +0 32515 Window_CloseCinematic +0 3253d Menu_CloseCinematics +0 32591 Display_CloseCinematics +0 325ae Menus_Activate +0 32605 Display_VisibleMenuCount +0 3262f Menus_HandleOOBClick +0 326f2 Item_CorrectedTextRect +0 3271a Menu_HandleKey +0 32a3e ToWindowCoords +0 32a86 Rect_ToWindowCoords +0 32a9b Item_SetTextExtents +0 32c3f Item_TextColor +0 32d85 Item_Text_AutoWrapped_Paint +0 32f35 Item_Text_Wrapped_Paint +0 33042 Item_Text_Paint +0 33133 Item_TextField_Paint +0 332a9 Item_YesNo_Paint +0 333dd Item_Multi_Paint +0 334cb Controls_GetKeyAssignment +0 33529 Controls_GetConfig +0 3355b Controls_SetConfig +0 335b2 BindingIDFromName +0 335df BindingFromName +0 33670 Item_Slider_Paint +0 33773 Item_Bind_Paint +0 3394c Display_KeyBindPending +0 33952 Item_Bind_HandleKey +0 33b5d Item_Model_Paint +0 33c8d Item_Image_Paint +0 33cd4 Item_TextScroll_Paint +0 33e66 Item_ListBox_Paint +0 344a0 Item_OwnerDraw_Paint +0 34766 Item_Paint +0 34d50 Menu_Init +0 34d87 Menu_GetFocusedItem +0 34dc6 Menu_GetFocused +0 34e01 Menu_ScrollFeeder +0 34e54 Menu_SetFeederSelection +0 34ee9 Menus_AnyFullScreenVisible +0 34f1d Menus_ActivateByName +0 34fac Item_Init +0 34fc5 Menu_HandleMouseMove +0 3511d Menu_Paint +0 35278 Item_ValidateTypeData +0 3533c KeywordHash_Key +0 353a0 KeywordHash_Add +0 353c6 KeywordHash_Find +0 35401 ItemParse_name +0 3541a ItemParse_focusSound +0 35442 ItemParse_text +0 3545b ItemParse_descText +0 35474 ItemParse_text2 +0 3548d ItemParse_text2alignx +0 354a6 ItemParse_text2aligny +0 354bf ItemParse_group +0 354d8 ItemParse_asset_model +0 35518 ItemParse_asset_shader +0 3553e ItemParse_model_origin +0 35584 ItemParse_model_fovx +0 355aa ItemParse_model_fovy +0 355d0 ItemParse_model_rotation +0 355f6 ItemParse_model_angle +0 3561a ItemParse_rect +0 35633 ItemParse_flag +0 3569e ItemParse_style +0 356bc ItemParse_decoration +0 356cf ItemParse_notselectable +0 356f2 ItemParse_wrapped +0 35705 ItemParse_autowrapped +0 35718 ItemParse_horizontalscroll +0 3572b ItemParse_type +0 3574a ItemParse_elementwidth +0 35770 ItemParse_elementheight +0 35796 ItemParse_feeder +0 357af ItemParse_elementtype +0 357e0 ItemParse_columns +0 35883 ItemParse_border +0 3589c ItemParse_bordersize +0 358b5 ItemParse_visible +0 358dd ItemParse_ownerdraw +0 358fc ItemParse_align +0 35915 ItemParse_textalign +0 35933 ItemParse_textalignx +0 3594c ItemParse_textaligny +0 35965 ItemParse_textscale +0 3597e ItemParse_textstyle +0 35997 ItemParse_backcolor +0 359c6 ItemParse_forecolor +0 35a03 ItemParse_bordercolor +0 35a32 ItemParse_outlinecolor +0 35a4b ItemParse_background +0 35a71 ItemParse_cinematic +0 35a8a ItemParse_doubleClick +0 35abb ItemParse_onFocus +0 35ad4 ItemParse_leaveFocus +0 35aed ItemParse_mouseEnter +0 35b06 ItemParse_mouseExit +0 35b1f ItemParse_mouseEnterText +0 35b38 ItemParse_mouseExitText +0 35b51 ItemParse_action +0 35b6a ItemParse_special +0 35b83 ItemParse_cvarTest +0 35b9c ItemParse_cvar +0 35bfd ItemParse_font +0 35c1c ItemParse_maxChars +0 35c51 ItemParse_maxPaintChars +0 35c86 ItemParse_maxLineChars +0 35cbb ItemParse_lineHeight +0 35cf1 ItemParse_cvarFloat +0 35d50 ItemParse_cvarStrList +0 35e12 ItemParse_cvarFloatList +0 35ed0 ItemParse_addColorRange +0 35f32 ItemParse_ownerdrawFlag +0 35f57 ItemParse_enableCvar +0 35f76 ItemParse_disableCvar +0 35f95 ItemParse_showCvar +0 35fb4 ItemParse_hideCvar +0 35fd3 ItemParse_Appearance_slot +0 35fec Item_SetupKeywordHash +0 36018 Item_Parse +0 36097 Item_TextScroll_BuildLines +0 36239 Item_InitControls +0 36276 MenuParse_font +0 362b9 MenuParse_name +0 362e6 MenuParse_fullscreen +0 36303 MenuParse_rect +0 3631e MenuParse_style +0 36340 MenuParse_visible +0 3636c MenuParse_onOpen +0 36389 MenuParse_onClose +0 363a6 MenuParse_onESC +0 363c3 MenuParse_border +0 363e0 MenuParse_borderSize +0 363fd MenuParse_backcolor +0 36430 MenuParse_descAlignment +0 36452 MenuParse_descX +0 3646f MenuParse_descY +0 3648c MenuParse_descScale +0 364a9 MenuParse_descColor +0 364dc MenuParse_forecolor +0 3651d MenuParse_bordercolor +0 36550 MenuParse_focuscolor +0 36583 MenuParse_disablecolor +0 365b6 MenuParse_outlinecolor +0 365d3 MenuParse_background +0 365fd MenuParse_cinematic +0 3661a MenuParse_ownerdrawFlag +0 36643 MenuParse_ownerdraw +0 36660 MenuParse_popup +0 36677 MenuParse_outOfBounds +0 3668e MenuParse_soundLoop +0 366ab MenuParse_fadeClamp +0 366c8 MenuParse_fadeAmount +0 366e5 MenuParse_fadeCycle +0 36702 MenuParse_itemDef +0 36787 MenuParse_appearanceIncrement +0 367a4 Menu_SetupKeywordHash +0 367d0 Menu_Parse +0 3684f Menu_New +0 36883 Menu_Count +0 36889 Menu_PaintAll +0 36920 Menu_Reset +0 36926 Display_GetContext +0 3692c Display_CaptureItem +0 36961 Display_MouseMove +0 369d9 Display_CursorType +0 36a25 Display_HandleKey +0 36a52 Window_CacheContents +0 36a8b Item_CacheContents +0 36a98 Menu_CacheContents +0 36ae4 Display_CacheAll +0 36b01 Menu_OverActiveItem +0 36bb4 CG_InitTeamChat +0 36bd2 CG_SetPrintString +0 36bf2 CG_CheckOrderPending +0 36cd3 CG_SetSelectedPlayerName +0 36d20 CG_GetSelectedPlayer +0 36d32 CG_SelectNextPlayer +0 36d54 CG_SelectPrevPlayer +0 36d77 CG_StatusHandle +0 36dc3 CG_GetValue +0 36ea9 CG_OtherTeamHasFlag +0 36ede CG_YourTeamHasFlag +0 36f13 CG_OwnerDrawVisible +0 37030 CG_GetKillerText +0 37052 CG_GetGameStatusText +0 370ca CG_GameTypeString +0 37107 CG_Text_Paint_Limit +0 371ff CG_DrawNewTeamInfo +0 3746a CG_DrawTeamSpectators +0 375b5 CG_DrawMedal +0 376fd CG_OwnerDraw +0 37700 CG_MouseEvent +0 37792 CG_HideTeamMenu +0 3779f CG_ShowTeamMenu +0 377a7 CG_EventHandling +0 377c1 CG_KeyEvent +0 3781a CG_ClientNumFromName +0 37851 CG_ShowResponseHead +0 37864 CG_RunMenuScript +0 37867 CG_DeferMenuScript +0 3786c CG_GetTeamColor +1 4 colorTable +1 434 HolocronIcons +1 47c forceModelModificationCount +1 4e4 cvarTable +1 c34 cvarTableSize +1 cdc forceTicPos +1 e2c ammoTicPos +1 f7c commands +1 10fc menuScoreboard +1 1100 bluehudtint +1 1110 redhudtint +1 1120 showPowersName +1 11ac g_saberFlashTime +1 11b0 g_saberFlashPos +1 11d0 cgRageTime +1 11d4 cgRageFadeTime +1 11d8 cgRageFadeVal +1 11dc cgRageRecTime +1 11e0 cgRageRecFadeTime +1 11e4 cgRageRecFadeVal +1 11e8 cgAbsorbTime +1 11ec cgAbsorbFadeTime +1 11f0 cgAbsorbFadeVal +1 11f4 cgProtectTime +1 11f8 cgProtectFadeTime +1 11fc cgProtectFadeVal +1 1200 cgYsalTime +1 1204 cgYsalFadeTime +1 1208 cgYsalFadeVal +1 120c gCGHasFallVector +1 1230 forceHolocronModels +1 1760 shaderAnimNames +1 17e0 shaderAnimCounts +1 1860 shaderAnimSTRatio +1 18e0 cl_numparticles +1 18e4 initparticles +1 18e8 roll +1 18ec cg_customSoundNames +1 1978 cgQueueLoad +1 1ae8 cgFPLSState +1 1aec cgAnnouncerTime +1 1b38 numValidOrders +1 1b3c cameramins +1 1b48 cameramaxs +1 1b54 cameraCurTarget +1 1b60 cameraCurLoc +1 1b6c cameraOldLoc +1 1b78 cameraNewLoc +1 1b84 cameraLastFrame +1 1b88 cameraLastYaw +1 1b8c cameraStiffFactor +1 1bcc cgWeapFrame +1 1bd0 cgWeapFrameTime +1 1cc8 WHITE +1 1ce0 WP_MuzzlePoint +1 1da0 weaponData +1 2120 ammoData +1 2148 animTable +1 4b9c BGPAFtextLoaded +1 4ba0 gPMDoSlowFall +1 4ba4 pm_stopspeed +1 4ba8 pm_duckScale +1 4bac pm_swimScale +1 4bb0 pm_wadeScale +1 4bb4 pm_accelerate +1 4bb8 pm_airaccelerate +1 4bbc pm_wateraccelerate +1 4bc0 pm_flyaccelerate +1 4bc4 pm_friction +1 4bc8 pm_waterfriction +1 4bcc pm_flightfriction +1 4bd0 pm_spectatorfriction +1 4bd4 c_pmove +1 4bd8 forceSpeedLevels +1 4be8 forcePowerNeeded +1 4d08 forceJumpHeight +1 4d18 forceJumpStrength +1 4dbc randSeed +1 4e30 forceMasteryLevels +1 4e50 forceMasteryPoints +1 4e70 bgForcePowerCost +1 4f90 forcePowerSorted +1 4fd8 forcePowerDarkLight +1 5020 WeaponReadyAnim +1 5060 WeaponAttackAnim +1 50a0 bg_itemlist +1 595c bg_numItems +1 59b4 eventnames +1 5b6c bg_poolSize +1 5b70 bg_poolTail +1 5b74 saberMoveData +1 6de4 transitionMove +1 1af0 validOrders +1 7068 saberMoveTransitionAngle +1 71fc vec3_origin +1 7208 axisDefault +1 722c colorBlack +1 723c colorRed +1 724c colorGreen +1 725c colorBlue +1 726c colorYellow +1 727c colorMagenta +1 728c colorCyan +1 729c colorWhite +1 72ac colorLtGrey +1 72bc colorMdGrey +1 72cc colorDkGrey +1 72dc colorLtBlue +1 72ec colorDkBlue +1 72fc g_color_table +1 737c bytedirs +1 7b34 holdrand +1 7b40 captureFunc +1 7b44 captureData +1 7b48 itemCapture +1 7b4c DC +1 7b50 g_waitingForKey +1 7b54 g_editingField +1 7b58 g_bindItem +1 7b5c g_editItem +1 7b60 menuCount +1 7b64 openMenuCount +1 7b68 debugMode +1 7b6c lastListBoxClickTime +1 7b70 itemFlags +1 7b80 styles +1 7b9c alignment +1 7bac types +1 7bec strPoolIndex +1 7bf0 strHandleCount +1 7bfc FPMessageTime +1 7c00 ui_deferredScriptItem +1 7c04 commandList +1 7cc4 scriptCommandCount +1 7d78 g_bindings +1 8648 itemParseKeywords +1 89a8 menuParseKeywords +1 8b5c drawTeamOverlayModificationCount +1 85d0 g_bindCount +2 753f84 _stackStart +2 763f84 _stackEnd +3 8400 cg_pmove_msec +3 8510 cg_debugSaber +3 8620 cgDC +3 b448 cg_debugBB +3 b558 ui_myteam +3 b668 cg_recordSPDemoName +3 b778 cg_recordSPDemo +3 b888 cg_singlePlayerActive +3 b998 cg_enableBreath +3 baa8 cg_enableDust +3 bbb8 cg_singlePlayer +3 bcc8 cg_currentSelectedPlayerName +3 bdd8 cg_currentSelectedPlayer +3 bee8 cg_blueTeamName +3 bff8 cg_redTeamName +3 c108 cg_trueLightning +3 c218 cg_noProjectileTrail +3 c328 cg_noTaunt +3 c438 cg_bigFont +3 c548 cg_smallFont +3 c658 cg_cameraMode +3 c768 cg_timescale +3 c878 cg_timescaleFadeSpeed +3 c988 cg_timescaleFadeEnd +3 ca98 cg_cameraOrbitDelay +3 cba8 cg_cameraOrbit +3 ccb8 pmove_msec +3 cdc8 pmove_fixed +3 ced8 cg_smoothClients +3 cfe8 cg_hudFiles +3 d0f8 cg_scorePlum +3 d208 cg_noVoiceText +3 d318 cg_noVoiceChats +3 d428 cg_teamChatsOnly +3 d538 cg_drawFriend +3 d648 cg_deferPlayers +3 d758 cg_predictItems +3 d868 cg_blood +3 d978 cg_paused +3 da88 cg_buildScript +3 db98 cg_forceModel +3 dca8 cg_stats +3 ddb8 cg_teamChatHeight +3 dec8 cg_teamChatTime +3 dfd8 cg_synchronousClients +3 e0e8 cg_drawEnemyInfo +3 e1f8 cg_lagometer +3 e308 cg_stereoSeparation +3 e418 cg_thirdPersonHorzOffset +3 e528 cg_thirdPersonAlpha +3 e638 cg_thirdPersonTargetDamp +3 e748 cg_thirdPersonCameraDamp +3 e858 cg_thirdPersonVertOffset +3 e968 cg_thirdPersonPitchOffset +3 ea78 cg_thirdPersonAngle +3 eb88 cg_thirdPersonRange +3 ec98 cg_thirdPerson +3 eda8 cg_dismember +3 eeb8 cg_animBlend +3 efc8 cg_auraShell +3 f0d8 cg_speedTrail +3 f1e8 cg_duelHeadAngles +3 f2f8 cg_saberTrail +3 f408 cg_saberContact +3 f518 cg_saberDynamicMarkTime +3 f628 cg_saberDynamicMarks +3 f738 cg_fpls +3 f848 cg_saberModelTraceEffect +3 f958 cg_oldPainSounds +3 fa68 cg_swingAngles +3 fb78 cg_zoomFov +3 fc88 cg_fov +3 fd98 cg_simpleItems +3 fea8 cg_ignore +3 ffb8 cg_autoswitch +3 100c8 cg_tracerLength +3 101d8 cg_tracerWidth +3 102e8 cg_tracerChance +3 103f8 cg_viewsize +3 10508 cg_drawGun +3 10618 cg_gun_z +3 10728 cg_gun_y +3 10838 cg_gun_x +3 10948 cg_gun_frame +3 10a58 cg_addMarks +3 10b68 cg_footsteps +3 10c78 cg_showmiss +3 10d88 cg_noPlayerAnims +3 10e98 cg_nopredict +3 10fa8 cg_errorDecay +3 110b8 cg_debugEvents +3 111c8 cg_debugPosition +3 112d8 cg_debugAnim +3 113e8 cg_animSpeed +3 114f8 cg_draw2D +3 11608 cg_drawStatus +3 11718 cg_crosshairHealth +3 11828 cg_crosshairSize +3 11938 cg_crosshairY +3 11a48 cg_crosshairX +3 11b58 cg_teamOverlayUserinfo +3 11c68 cg_drawTeamOverlay +3 11d78 cg_drawRewards +3 11e88 cg_dynamicCrosshair +3 11f98 cg_drawScores +3 120a8 cg_drawCrosshairNames +3 121b8 cg_drawCrosshair +3 122c8 cg_drawAmmoWarning +3 123d8 cg_drawIcons +3 124e8 cg_draw3dIcons +3 125f8 cg_drawSnapshot +3 12708 cg_drawFPS +3 12818 cg_drawTimer +3 12928 cg_shadows +3 12a38 cg_bobroll +3 12b48 cg_bobpitch +3 12c58 cg_bobup +3 12d68 cg_runroll +3 12e78 cg_runpitch +3 12f88 cg_centertime +3 13098 cg_items +3 16898 cg_weapons +3 17598 cg_entities +3 1f7598 cg +3 220ec4 cgs +3 232710 gCGFallVector +3 23271c lagometer +3 232d24 lastvalidlockdif +3 232d28 hudTintColor +3 232d2c teamChat2 +3 232e2c teamChat1 +3 232f2c systemChat +3 23302c numSortedTeamPlayers +3 233030 sortedTeamPlayers +3 2330cc dbModels_Rocks +3 2330dc dbModels_Chunks +3 2330e8 dbModels_Wood +3 233108 dbModels_Glass +3 233128 offZ +3 233768 offX +3 233de8 lastofs +3 233dec cl_lightstyle +3 237fec cg_freeLocalEntities +3 237ff0 cg_activeLocalEntities +3 2381bc cg_localEntities +3 2719bc oldtime +3 2719c0 rup +3 2719cc rright +3 2719d8 rforward +3 2719e4 pvup +3 2719f0 pvright +3 2719fc pvforward +3 271a08 particles +3 290a08 free_particles +3 290a0c active_particles +3 290a10 numShaderAnims +3 290a14 shaderAnims +3 292a14 markTotal +3 292a18 cg_freeMarkPolys +3 292a1c cg_activeMarkPolys +3 292b3c cg_markPolys +3 2a4b3c cgBoneAnglePostSet +3 2a4b74 cgSendPS +3 2af7f4 cg_triggerEntities +3 2afbf4 cg_numTriggerEntities +3 2afbf8 cg_solidEntities +3 2afff8 cg_numSolidEntities +3 2afffc cg_pmove +3 2b0178 cg_saga_valid +3 2b017c cg_saga_info +3 2b217c localClient +3 2b2180 voiceChatBuffer +3 2b4880 voiceChatLists +3 4dd2c0 zoomFov +3 4dd2c4 cameraIdealLoc +3 4dd2d0 cameraIdealTarget +3 4dd2dc cameraFocusLoc +3 4dd2e8 cameraFocusAngles +3 4dd2f4 cameraup +3 4dd300 camerafwd +3 4dd30c cgScreenEffects +3 4dd32c g2WeaponInstances +3 4dd36c BGPAFtext +3 4e6fac bgGlobalAnimations +3 4ef420 pml +3 4ef8ac pm +3 4ef8b0 bg_pool +3 6f92c8 com_lines +3 6f92cc com_parsename +3 6f96cc com_token +3 6fbadc menuParseKeywordHash +3 6fc2dc itemParseKeywordHash +3 6fcadc g_nameBind2 +3 6fcafc g_nameBind1 +3 6fcb1c ui_deferredScript +3 6fd31c strHandle +3 6ff31c strPool +3 71f31c outOfMemory +3 71f320 allocPoint +3 71f324 memoryPool +3 73f324 menuStack +3 73f364 Menus +3 753f64 scrollInfo diff --git a/code/base/vm/cgame.qvm b/code/base/vm/cgame.qvm new file mode 100644 index 0000000..1782eb3 Binary files /dev/null and b/code/base/vm/cgame.qvm differ diff --git a/code/base/vm/jk2mpgame.map b/code/base/vm/jk2mpgame.map new file mode 100644 index 0000000..87ec243 --- /dev/null +++ b/code/base/vm/jk2mpgame.map @@ -0,0 +1,1794 @@ +0 fffffda6 trap_G2API_CollisionDetect +0 fffffda7 trap_G2API_CleanGhoul2Models +0 fffffda8 trap_G2API_RemoveGhoul2Model +0 fffffda9 trap_G2API_HasGhoul2ModelOnIndex +0 fffffdaa trap_G2API_DuplicateGhoul2Instance +0 fffffdab trap_G2API_CopySpecificGhoul2Model +0 fffffdac trap_G2API_CopyGhoul2Instance +0 fffffdad trap_G2API_GetGLAName +0 fffffdae trap_G2API_SetBoneAnim +0 fffffdaf trap_G2API_SetBoneAngles +0 fffffdb0 trap_G2API_SetBoltInfo +0 fffffdb1 trap_G2API_AddBolt +0 fffffdb2 trap_G2API_InitGhoul2Model +0 fffffdb3 trap_G2API_GetBoltMatrix_NoRecNoRot +0 fffffdb4 trap_G2API_GetBoltMatrix_NoReconstruct +0 fffffdb5 trap_G2API_GetBoltMatrix +0 fffffdb6 trap_G2_SetGhoul2ModelIndexes +0 fffffdb7 trap_G2_HaveWeGhoul2Models +0 fffffdb8 trap_G2_ListModelSurfaces +0 fffffdb9 trap_G2_ListModelBones +0 fffffdba trap_PC_SourceFileAndLine +0 fffffdbb trap_PC_ReadToken +0 fffffdbc trap_PC_FreeSource +0 fffffdbd trap_PC_LoadSource +0 fffffdbe trap_AAS_PointReachabilityAreaIndex +0 fffffdbf trap_AAS_PredictRoute +0 fffffdc0 trap_AAS_AlternativeRouteGoals +0 fffffdc1 trap_BotAddAvoidSpot +0 fffffdc2 trap_BotSetAvoidGoalTime +0 fffffdc3 trap_BotPredictVisiblePosition +0 fffffdc4 trap_BotRemoveFromAvoidGoals +0 fffffdc5 trap_BotGetChatMessage +0 fffffdc6 trap_BotNumInitialChats +0 fffffdc7 trap_BotGetMapLocationGoal +0 fffffdc8 trap_BotGetNextCampSpotGoal +0 fffffdc9 trap_BotMutateGoalFuzzyLogic +0 fffffdca trap_BotInterbreedGoalFuzzyLogic +0 fffffdcb trap_GeneticParentsAndChildSelection +0 fffffdcc trap_BotResetWeaponState +0 fffffdcd trap_BotFreeWeaponState +0 fffffdce trap_BotAllocWeaponState +0 fffffdcf trap_BotLoadWeaponWeights +0 fffffdd0 trap_BotGetWeaponInfo +0 fffffdd1 trap_BotChooseBestFightWeapon +0 fffffdd2 trap_BotInitMoveState +0 fffffdd3 trap_BotFreeMoveState +0 fffffdd4 trap_BotAllocMoveState +0 fffffdd5 trap_BotMovementViewTarget +0 fffffdd6 trap_BotReachabilityArea +0 fffffdd7 trap_BotResetLastAvoidReach +0 fffffdd8 trap_BotResetAvoidReach +0 fffffdd9 trap_BotMoveInDirection +0 fffffdda trap_BotMoveToGoal +0 fffffddb trap_BotResetMoveState +0 fffffddc trap_BotFreeGoalState +0 fffffddd trap_BotAllocGoalState +0 fffffdde trap_BotSaveGoalFuzzyLogic +0 fffffddf trap_BotFreeItemWeights +0 fffffde0 trap_BotLoadItemWeights +0 fffffde1 trap_BotUpdateEntityItems +0 fffffde2 trap_BotInitLevelItems +0 fffffde3 trap_BotAvoidGoalTime +0 fffffde4 trap_BotGetLevelItemGoal +0 fffffde5 trap_BotItemGoalInVisButNotVisible +0 fffffde6 trap_BotTouchingGoal +0 fffffde7 trap_BotChooseNBGItem +0 fffffde8 trap_BotChooseLTGItem +0 fffffde9 trap_BotGetSecondGoal +0 fffffdea trap_BotGetTopGoal +0 fffffdeb trap_BotGoalName +0 fffffdec trap_BotDumpGoalStack +0 fffffded trap_BotDumpAvoidGoals +0 fffffdee trap_BotEmptyGoalStack +0 fffffdef trap_BotPopGoal +0 fffffdf0 trap_BotPushGoal +0 fffffdf1 trap_BotResetAvoidGoals +0 fffffdf2 trap_BotResetGoalState +0 fffffdf3 trap_BotSetChatName +0 fffffdf4 trap_BotSetChatGender +0 fffffdf5 trap_BotLoadChatFile +0 fffffdf6 trap_BotReplaceSynonyms +0 fffffdf7 trap_UnifyWhiteSpaces +0 fffffdf8 trap_BotMatchVariable +0 fffffdf9 trap_BotFindMatch +0 fffffdfa trap_StringContains +0 fffffdfb trap_BotEnterChat +0 fffffdfc trap_BotChatLength +0 fffffdfd trap_BotReplyChat +0 fffffdfe trap_BotInitialChat +0 fffffdff trap_BotNumConsoleMessages +0 fffffe00 trap_BotNextConsoleMessage +0 fffffe01 trap_BotRemoveConsoleMessage +0 fffffe02 trap_BotQueueConsoleMessage +0 fffffe03 trap_BotFreeChatState +0 fffffe04 trap_BotAllocChatState +0 fffffe05 trap_Characteristic_String +0 fffffe06 trap_Characteristic_BInteger +0 fffffe07 trap_Characteristic_Integer +0 fffffe08 trap_Characteristic_BFloat +0 fffffe09 trap_Characteristic_Float +0 fffffe0a trap_BotFreeCharacter +0 fffffe0b trap_BotLoadCharacter +0 fffffe56 trap_EA_ResetInput +0 fffffe57 trap_EA_GetInput +0 fffffe58 trap_EA_EndRegular +0 fffffe59 trap_EA_View +0 fffffe5a trap_EA_Move +0 fffffe5b trap_EA_DelayedJump +0 fffffe5c trap_EA_Jump +0 fffffe5d trap_EA_SelectWeapon +0 fffffe5e trap_EA_MoveRight +0 fffffe5f trap_EA_MoveLeft +0 fffffe60 trap_EA_MoveBack +0 fffffe61 trap_EA_MoveForward +0 fffffe62 trap_EA_MoveDown +0 fffffe63 trap_EA_MoveUp +0 fffffe64 trap_EA_Crouch +0 fffffe65 trap_EA_Respawn +0 fffffe66 trap_EA_Use +0 fffffe67 trap_EA_ForcePower +0 fffffe68 trap_EA_Alt_Attack +0 fffffe69 trap_EA_Attack +0 fffffe6a trap_EA_Talk +0 fffffe6b trap_EA_Gesture +0 fffffe6c trap_EA_Action +0 fffffe6d trap_EA_Command +0 fffffe6e trap_EA_SayTeam +0 fffffe6f trap_EA_Say +0 fffffec1 trap_AAS_PredictClientMovement +0 fffffec2 trap_AAS_Swimming +0 fffffec3 trap_AAS_AreaTravelTimeToGoalArea +0 fffffec4 trap_AAS_AreaReachability +0 fffffec5 trap_AAS_IntForBSPEpairKey +0 fffffec6 trap_AAS_FloatForBSPEpairKey +0 fffffec7 trap_AAS_VectorForBSPEpairKey +0 fffffec8 trap_AAS_ValueForBSPEpairKey +0 fffffec9 trap_AAS_NextBSPEntity +0 fffffeca trap_AAS_PointContents +0 fffffecb trap_AAS_TraceAreas +0 fffffecc trap_AAS_PointAreaNum +0 fffffecd trap_AAS_Time +0 fffffece trap_AAS_PresenceTypeBoundingBox +0 fffffecf trap_AAS_Initialized +0 fffffed0 trap_AAS_EntityInfo +0 fffffed1 trap_AAS_AreaInfo +0 fffffed2 trap_AAS_BBoxAreas +0 fffffed3 trap_AAS_EnableRoutingArea +0 ffffff2c trap_BotUserCommand +0 ffffff2d trap_BotGetServerCommand +0 ffffff2e trap_BotGetSnapshotEntity +0 ffffff2f trap_BotLibTest +0 ffffff30 trap_BotLibUpdateEntity +0 ffffff31 trap_BotLibLoadMap +0 ffffff32 trap_BotLibStartFrame +0 ffffff33 trap_BotLibDefine +0 ffffff34 trap_BotLibVarGet +0 ffffff35 trap_BotLibVarSet +0 ffffff36 trap_BotLibShutdown +0 ffffff37 trap_BotLibSetup +0 ffffff8c asin +0 ffffff8d acos +0 ffffff90 ceil +0 ffffff91 floor +0 ffffff92 perpendicularvector +0 ffffff93 anglevectors +0 ffffff94 matrixmultiply +0 ffffff95 sqrt +0 ffffff96 atan2 +0 ffffff97 cos +0 ffffff98 sin +0 ffffff99 strncpy +0 ffffff9a memcpy +0 ffffff9b memset +0 ffffffcc trap_ROFF_Purge_Ent +0 ffffffcd trap_ROFF_Play +0 ffffffce trap_ROFF_Cache +0 ffffffcf trap_ROFF_UpdateEntities +0 ffffffd0 trap_ROFF_Clean +0 ffffffd1 trap_SP_GetStringTextString +0 ffffffd2 trap_SP_RegisterServer +0 ffffffd3 trap_EntityContactCapsule +0 ffffffd4 trap_TraceCapsule +0 ffffffd5 trap_SnapVector +0 ffffffd6 trap_RealTime +0 ffffffd7 trap_DebugPolygonDelete +0 ffffffd8 trap_DebugPolygonCreate +0 ffffffd9 trap_FS_GetFileList +0 ffffffda trap_GetEntityToken +0 ffffffdb trap_GetUsercmd +0 ffffffdc trap_BotFreeClient +0 ffffffdd trap_BotAllocateClient +0 ffffffde trap_EntityContact +0 ffffffdf trap_EntitiesInBox +0 ffffffe0 trap_UnlinkEntity +0 ffffffe1 trap_LinkEntity +0 ffffffe2 trap_AreasConnected +0 ffffffe3 trap_AdjustAreaPortalState +0 ffffffe4 trap_InPVSIgnorePortals +0 ffffffe5 trap_InPVS +0 ffffffe6 trap_PointContents +0 ffffffe7 trap_Trace +0 ffffffe8 trap_SetBrushModel +0 ffffffe9 trap_GetServerinfo +0 ffffffea trap_SetUserinfo +0 ffffffeb trap_GetUserinfo +0 ffffffec trap_GetConfigstring +0 ffffffed trap_SetConfigstring +0 ffffffee trap_SendServerCommand +0 ffffffef trap_DropClient +0 fffffff0 trap_LocateGameData +0 fffffff1 trap_SendConsoleCommand +0 fffffff2 trap_FS_FCloseFile +0 fffffff3 trap_FS_Write +0 fffffff4 trap_FS_Read +0 fffffff5 trap_FS_FOpenFile +0 fffffff6 trap_Argv +0 fffffff7 trap_Argc +0 fffffff8 trap_Cvar_VariableStringBuffer +0 fffffff9 trap_Cvar_VariableIntegerValue +0 fffffffa trap_Cvar_Set +0 fffffffb trap_Cvar_Update +0 fffffffc trap_Cvar_Register +0 fffffffd trap_Milliseconds +0 fffffffe trap_Error +0 ffffffff trap_Printf +0 0 vmMain +0 a5 G_Printf +0 be G_Error +0 d7 G_FindTeams +0 1db G_RemapTeamShaders +0 1de G_RegisterCvars +0 252 G_UpdateCvars +0 2c6 G_InitGame +0 438 G_ShutdownGame +0 470 Com_Error +0 48b Com_Printf +0 4a6 AddTournamentPlayer +0 51f RemoveTournamentLoser +0 546 RemoveDuelDrawLoser +0 5e8 RemoveTournamentWinner +0 60f AdjustTournamentScores +0 7da SortRanks +0 8af CalculateRanks +0 b69 SendScoreboardMessageToAllClients +0 b92 MoveClientToIntermission +0 c02 FindIntermissionPoint +0 c70 BeginIntermission +0 ce3 DuelLimitHit +0 d1a DuelResetWinsLosses +0 d4b ExitLevel +0 dd8 G_LogPrintf +0 e44 LogExit +0 f2d CheckIntermissionExit +0 124e ScoreIsTied +0 1297 CheckExitRules +0 1497 CheckTournament +0 161e CheckVote +0 175c PrintTeam +0 1787 SetLeader +0 184a CheckTeamLeader +0 18e2 CheckTeamVote +0 19db CheckCvars +0 1a08 G_RunThink +0 1a41 G_RunFrame +0 1cd3 G_GetStripEdString +0 1ce4 BotStraightTPOrderCheck +0 1d4e BotSelectWeapon +0 1d60 BotReportStatus +0 1dbf BotOrder +0 1f5a BotMindTricked +0 1fd1 BotAI_Print +0 1fd4 IsTeamplay +0 1fe1 BotAI_GetClientState +0 2012 BotAI_GetEntityState +0 2057 BotAI_GetSnapshotEntity +0 2088 BotEntityInfo +0 2094 NumBots +0 209a AngleDifference +0 20c2 BotChangeViewAngle +0 212e BotChangeViewAngles +0 22cd BotInputToUserCommand +0 2579 BotUpdateInput +0 263c BotAIRegularUpdate +0 264d RemoveColorEscapeSequences +0 26c9 BotAI +0 281a BotScheduleBotThink +0 2858 PlayersInGame +0 2899 BotAISetupClient +0 29b9 BotAIShutdownClient +0 2a08 BotResetState +0 2af3 BotAILoadMap +0 2b2d OrgVisible +0 2b53 WPOrgVisible +0 2be8 OrgVisibleBox +0 2c18 CheckForFunc +0 2c6b GetNearestVisibleWP +0 2d31 PassWayCheck +0 2dcb TotalTrailDistance +0 2ea4 CheckForShorterRoutes +0 2ff6 WPConstantRoutine +0 3150 BotCTFGuardDuty +0 316c WPTouchRoutine +0 3333 MoveTowardIdealAngles +0 3343 BotTrace_Strafe +0 34e1 BotTrace_Jump +0 361a BotTrace_Duck +0 36fe PassStandardEnemyChecks +0 38e5 BotDamageNotification +0 39f0 BotCanHear +0 3aee UpdateEventTracker +0 3b51 InFieldOfVision +0 3bd3 PassLovedOneCheck +0 3ca3 ScanForEnemies +0 3edf WaitingForNow +0 3fb5 BotGetWeaponRange +0 4005 BotIsAChickenWuss +0 4107 GetNearestBadThing +0 43b6 BotDefendFlag +0 442b BotGetEnemyFlag +0 44a0 BotGetFlagBack +0 4598 BotGuardFlagCarrier +0 4690 BotGetFlagHome +0 4705 GetNewFlagPoint +0 481c CTFTakesPriority +0 4b27 EntityVisibleBox +0 4b64 Saga_TargetClosestObjective +0 4d88 Saga_DefendFromAttackers +0 4e7e Saga_CountDefenders +0 4ee4 Saga_CountTeammates +0 4f35 SagaTakesPriority +0 524d JMTakesPriority +0 5334 BotHasAssociated +0 53f3 GetBestIdleGoal +0 54de GetIdealDestination +0 5ab6 CommanderBotCTFAI +0 5d8c CommanderBotSagaAI +0 5eb7 BotDoTeamplayAI +0 5ee2 CommanderBotTeamplayAI +0 6089 CommanderBotAI +0 60b2 MeleeCombatHandling +0 6210 SaberCombatHandling +0 65c0 BotWeaponCanLead +0 6604 BotAimLeading +0 675b BotAimOffsetGoalAngles +0 695d ShouldSecondaryFire +0 6a65 CombatBotAI +0 6c47 BotFallbackNavigation +0 6cea BotTryAnotherWeapon +0 6d6a BotWeaponSelectable +0 6da0 BotSelectIdealWeapon +0 6f3e BotSelectChoiceWeapon +0 6fcc BotSelectMelee +0 6ffd GetLoveLevel +0 7092 BotLovedOneDied +0 71df BotDeathNotify +0 7265 StrafeTracing +0 734b PrimFiring +0 737c KeepPrimFromFiring +0 73b1 AltFiring +0 73e2 KeepAltFromFiring +0 7417 CheckForFriendInLOF +0 74de BotScanForLeader +0 756e BotReplyGreetings +0 75dd CTFFlagMovement +0 77bf BotCheckDetPacks +0 7905 BotUseInventoryItem +0 79df BotSurfaceNear +0 7a44 BotWeaponBlockable +0 7a79 StandardBotAI +0 9ac4 BotAIStartFrame +0 9bc2 BotAISetup +0 9c57 BotAIShutdown +0 9c95 B_TempAlloc +0 9ca2 B_TempFree +0 9cab B_Alloc +0 9cb8 B_Free +0 9cbb B_InitAlloc +0 9cc7 B_CleanupAlloc +0 9cca GetValueGroup +0 9dc5 GetPairedValue +0 9f6b BotDoChat +0 a238 ParseEmotionalAttachments +0 a37b ReadChatGroups +0 a40b BotUtilizePersonality +0 a8af GetFlagStr +0 abaa G_TestLine +0 abe4 BotWaypointRender +0 ae12 TransferWPData +0 af36 CreateNewWP +0 afd4 CreateNewWP_FromObject +0 b13f RemoveWP +0 b195 RemoveWP_InTrail +0 b27a CreateNewWP_InTrail +0 b3c9 TeleportToWP +0 b44f WPFlagsModify +0 b48e NotWithinRange +0 b4c3 NodeHere +0 b555 CanGetToVector +0 b584 CanGetToVectorTravel +0 b6a8 ConnectTrail +0 bcb9 OpposingEnds +0 bd37 DoorBlockingSection +0 be1a RepairPaths +0 bf4c OrgVisibleCurve +0 bfac CanForceJumpTo +0 c097 CalculatePaths +0 c311 GetObjectThatTargets +0 c340 CalculateSagaGoals +0 c46d GetNearestVisibleWPToItem +0 c559 CalculateWeightGoals +0 c729 CalculateJumpRoutes +0 c84d LoadPathData +0 cbf4 FlagObjects +0 ce20 SavePathData +0 d161 LoadPath_ThisLevel +0 d1fc GetClosestSpawn +0 d29a GetNextSpawnInIndex +0 d33e AcceptBotCommand +0 d7b1 swapfunc +0 d838 med3 +0 d8bb qsort +0 dc74 strlen +0 dc8f strcat +0 dcd2 strcpy +0 dd07 strcmp +0 dd40 strchr +0 dd5f strstr +0 dda5 tolower +0 ddbd toupper +0 ddd5 memmove +0 de1c tan +0 de33 srand +0 de3a rand +0 de4f atof +0 df14 _atof +0 dfdf atoi +0 e057 _atoi +0 e0d9 abs +0 e0ee fabs +0 e103 AddInt +0 e1de AddFloat +0 e2ec AddString +0 e383 vsprintf +0 e51b sscanf +0 e586 BG_LegalizedForcePowers +0 e962 vectoyaw +0 e9bc BG_HasYsalamiri +0 e9eb BG_CanUseFPNow +0 ea69 BG_FindItemForPowerup +0 eaa5 BG_FindItemForHoldable +0 eadf BG_FindItemForWeapon +0 eb12 BG_FindItem +0 eb3b BG_PlayerTouchesItem +0 eb9b BG_ProperForceIndex +0 ebbe BG_CycleForce +0 ec96 BG_GetItemIndexByTag +0 ecc6 BG_CycleInven +0 ed32 BG_CanItemBeGrabbed +0 ef98 BG_EvaluateTrajectory +0 f166 BG_EvaluateTrajectoryDelta +0 f260 BG_AddPredictableEventToPlayerstate +0 f29b BG_TouchJumpPad +0 f2ff BG_PlayerStateToEntityState +0 f614 BG_PlayerStateToEntityStateExtraPolate +0 f936 BG_Alloc +0 f976 BG_AllocUnaligned +0 f9a9 BG_TempAlloc +0 f9e1 BG_TempFree +0 fa0e BG_StringAlloc +0 fa31 BG_OutOfMemory +0 fa43 PM_GetSaberStance +0 fa99 PM_DoSlowFall +0 fabc PM_AddEvent +0 facb PM_AddEventWithParm +0 fadb PM_AddTouchEnt +0 fb30 PM_ClipVelocity +0 fba9 PM_Friction +0 fca5 PM_Accelerate +0 fd21 PM_CmdScale +0 fdb8 PM_SetMovementDir +0 ff04 PM_ForceJumpingUp +0 ffc3 PM_JumpForDir +0 10066 PM_SetPMViewAngle +0 100a7 PM_AdjustAngleForWallRun +0 102ab PM_SetForceJumpZStart +0 102cd PM_CheckJump +0 111ff PM_CheckWaterJump +0 112e6 PM_WaterJumpMove +0 11327 PM_WaterMove +0 11458 PM_FlyMove +0 11512 PM_AirMove +0 115d5 PM_WalkMove +0 11877 PM_DeadMove +0 118f0 PM_NoclipMove +0 11a62 PM_FootstepForSurface +0 11a7b PM_TryRoll +0 11c7c PM_CrashLand +0 11f9a PM_CorrectAllSolid +0 12081 PM_GroundTraceMissed +0 12212 PM_GroundTrace +0 123a5 PM_SetWaterLevel +0 12472 PM_CheckDuck +0 12648 PM_Use +0 12691 PM_RunningAnim +0 126bf PM_Footsteps +0 12a8d PM_WaterEvents +0 12ae4 PM_BeginWeaponChange +0 12b4a PM_FinishWeaponChange +0 12b9d PM_DoChargedWeapons +0 13077 PM_ItemUsable +0 132ad PM_Weapon +0 13c66 PM_Animate +0 13cd3 PM_DropTimers +0 13d5d PM_UpdateViewAngles +0 13e01 PM_AdjustAttackStates +0 14179 BG_CmdForRoll +0 141ce BG_AdjustClientSpeed +0 14638 PmoveSingle +0 14b79 Pmove +0 14c25 BG_InSpecialJump +0 14c4a BG_InSaberStandAnim +0 14c70 BG_DirectFlippingAnim +0 14c8f BG_SaberInAttack +0 14cbc BG_SaberInSpecial +0 14cd9 BG_SaberInIdle +0 14cf6 BG_FlippingAnim +0 14d32 BG_SpinningSaberAnim +0 14e1c BG_SaberInSpecialAttack +0 14e56 BG_BrokenParryForAttack +0 14e94 BG_BrokenParryForParry +0 14ee6 BG_KnockawayForParry +0 14f0f BG_InRoll +0 14f35 BG_InDeathAnim +0 14f6a PM_SaberBounceForAttack +0 14fa4 PM_SaberDeflectionForQuad +0 14fdd PM_SaberInDeflect +0 14ff2 PM_SaberInParry +0 15007 PM_SaberInKnockaway +0 1501c PM_SaberInReflect +0 15031 PM_SaberInStart +0 15046 PM_SaberInReturn +0 15060 PM_InSaberAnim +0 15077 PM_InKnockDown +0 150a4 PM_PainAnim +0 150c3 PM_JumpingAnim +0 150e2 PM_LandingAnim +0 15129 PM_SpinningAnim +0 15136 PM_InOnGroundAnim +0 15193 PM_InRollComplete +0 151b9 PM_AnimLength +0 151e6 PM_DebugLegsAnim +0 15231 BG_ParseAnimationFile +0 153a9 PM_StartLegsAnim +0 1542e PM_ContinueLegsAnim +0 1544e PM_ForceLegsAnim +0 154be PM_StartTorsoAnim +0 154f3 PM_SetLegsAnimTimer +0 15511 PM_SetTorsoAnimTimer +0 1552f BG_SaberStartTransAnim +0 1557e PM_SetAnimFinal +0 15796 PM_SetAnim +0 1580f PM_SlideMove +0 15bff PM_StepSlideMove +0 15f4e PM_irand_timesync +0 15f83 BG_ForcePowerDrain +0 16041 PM_AttackMoveForQuad +0 16076 PM_SaberAnimTransitionAnim +0 16197 PM_SaberMoveQuadrantForMovement +0 161fc PM_SaberInBounce +0 16221 PM_SaberInTransition +0 16236 PM_SaberAttackChainAngle +0 16266 PM_SaberKataDone +0 16367 PM_SetAnimFrame +0 16371 PM_SaberLockBreak +0 16646 PM_SaberLocked +0 1686a PM_SaberInBrokenParry +0 1688f PM_BrokenParryForParry +0 168d1 PM_CanBackstab +0 16952 PM_SaberFlipOverAttackMove +0 16a3f PM_SomeoneInFront +0 16acf PM_SaberLungeAttackMove +0 16b19 PM_SaberJumpAttackMove +0 16b81 PM_GroundDistance +0 16bea PM_SaberAttackForMovement +0 16d77 PM_WeaponLightsaber +0 1760d PM_SetSaberMove +0 178a5 P_SetTwitchInfo +0 178bd M_StringEscapeToEnters +0 17928 P_DamageFeedback +0 17a32 P_WorldEffects +0 17bd9 DoImpact +0 17e53 G_SetClientSound +0 17e84 ClientImpacts +0 17f27 G_TouchTriggers +0 18109 G_MoverTouchPushTriggers +0 182b9 SpectatorThink +0 18360 ClientInactivityTimer +0 18402 ClientTimerActions +0 18608 ClientIntermissionThink +0 18663 ClientEvents +0 187fb SendPendingPredictableEvents +0 188a2 G_UpdateForceSightBroadcasts +0 18982 G_UpdateJediMasterBroadcasts +0 18a64 G_UpdateClientBroadcasts +0 18a7f ClientThink_real +0 19aad G_CheckClientTimeouts +0 19ada ClientThink +0 19b15 G_RunClient +0 19b3c SpectatorClientEndFrame +0 19c13 ClientEndFrame +0 19ceb UpdateTournamentInfo +0 19ed0 trap_Cvar_VariableValue +0 19ee6 G_ParseInfos +0 19fd4 G_LoadArenasFromFile +0 1a054 G_GetMapTypeBits +0 1a0f6 G_DoesMapSupportGametype +0 1a189 G_RefreshNextMap +0 1a296 G_LoadArenas +0 1a348 G_GetArenaInfoByMap +0 1a383 G_AddRandomBot +0 1a4f0 G_RemoveRandomBot +0 1a56c G_CountHumanPlayers +0 1a5bc G_CountBotPlayers +0 1a636 G_CheckMinimumPlayers +0 1a7b3 G_CheckBotSpawn +0 1a7f2 AddBotToSpawnQueue +0 1a82f G_RemoveQueuedBotBegin +0 1a853 G_BotConnect +0 1a8b5 G_AddBot +0 1abce Svcmd_AddBot_f +0 1ac65 Svcmd_BotList_f +0 1ad19 G_LoadBotsFromFile +0 1ad99 G_LoadBots +0 1ae26 G_GetBotInfoByNumber +0 1ae51 G_GetBotInfoByName +0 1ae90 G_InitBots +0 1aea7 SP_info_player_deathmatch +0 1aee0 SP_info_player_start +0 1aeef SP_info_player_imperial +0 1af02 SP_info_player_rebel +0 1af15 SP_info_player_intermission +0 1af18 ThrowSaberToAttacker +0 1b0df JMSaberThink +0 1b1da JMSaberTouch +0 1b35a SP_info_jedimaster_start +0 1b414 SpotWouldTelefrag +0 1b495 SelectNearestDeathmatchSpawnPoint +0 1b4f9 SelectRandomDeathmatchSpawnPoint +0 1b559 SelectRandomFurthestSpawnPoint +0 1b6c9 G_FindClientByName +0 1b712 SelectSpawnPoint +0 1b725 SelectInitialSpawnPoint +0 1b78a SelectSpectatorSpawnPoint +0 1b79a InitBodyQue +0 1b7ca BodySink +0 1b7fc CopyToBodyQue +0 1b9e8 SetClientViewAngle +0 1ba40 respawn +0 1bbd6 TeamCount +0 1bc17 TeamLeader +0 1bc58 PickTeam +0 1bca6 ClientCleanName +0 1bdb7 SetupGameGhoul2Model +0 1bf66 ClientUserinfoChanged +0 1c33d ClientConnect +0 1c58a ClientBegin +0 1c8de AllForceDisabled +0 1c905 ClientSpawn +0 1cfb8 ClientDisconnect +0 1d1f2 uwRename +0 1d21f G_IgnoreClientChat +0 1d28e G_IsClientChatIgnored +0 1d2ba G_RemoveFromAllIgnoreLists +0 1d2f6 Admin_Teleport +0 1d352 DeathmatchScoreboardMessage +0 1d48b Cmd_Score_f +0 1d494 CheatsOk +0 1d4e8 ConcatArgs +0 1d553 SanitizeString +0 1d5a5 ClientNumberFromString +0 1d671 Cmd_Give_f +0 1d91d Cmd_God_f +0 1d962 Cmd_Notarget_f +0 1d9a7 Cmd_Noclip_f +0 1d9fa Cmd_LevelShot_f +0 1da2b Cmd_TeamTask_f +0 1da82 Cmd_Kill_f +0 1db20 G_GetDuelWinner +0 1db65 BroadcastTeamChange +0 1dc3b SetTeam +0 1df8a StopFollowing +0 1e003 Cmd_Team_f +0 1e116 Cmd_ForceChanged_f +0 1e184 Cmd_Follow_f +0 1e21e Cmd_FollowCycle_f +0 1e2c3 G_SayTo +0 1e3bf G_Say +0 1e5ca Cmd_Say_f +0 1e603 Cmd_Tell_f +0 1e6ad G_VoiceTo +0 1e723 G_Voice +0 1e787 Cmd_Voice_f +0 1e7c3 Cmd_VoiceTell_f +0 1e873 Cmd_VoiceTaunt_f +0 1ea32 Cmd_GameCommand_f +0 1eaa7 Cmd_Where_f +0 1eac9 G_ClientNumberFromName +0 1eb0b SanitizeString2 +0 1eb89 G_ClientNumberFromStrippedSubstring +0 1ebdf G_ClientNumberFromArg +0 1ec2f G_ClientNumberFromStrippedName +0 1ec71 Cmd_CallVote_f +0 1f16f Cmd_Vote_f +0 1f26d Cmd_CallTeamVote_f +0 1f5db Cmd_TeamVote_f +0 1f712 Cmd_SetViewpos_f +0 1f7aa Cmd_Stats_f +0 1f7ad G_ItemUsable +0 1f9e2 Cmd_ToggleSaber_f +0 1fb1e Cmd_SaberAttackCycle_f +0 1fb8e G_OtherPlayersDueling +0 1fbd5 Cmd_EngageDuel_f +0 1ff3a StandardSetBodyAnim +0 1ff73 ClientCommand +0 24b78 ObjectDie +0 24b91 G_GetHitLocation +0 24de7 ExplodeDeath +0 24e79 ScorePlum +0 24eae AddScore +0 24ef0 TossClientWeapon +0 2508c TossClientItems +0 25194 LookAtKiller +0 25266 GibEntity +0 25286 BodyRid +0 25295 body_die +0 2533e CheckAlmostCapture +0 25341 G_InKnockDown +0 25367 G_CheckSpecialDeathAnim +0 259ea G_PickDeathAnim +0 25cd0 G_GetJediMaster +0 25d18 player_die +0 2651f CheckArmor +0 265a3 G_ApplyKnockback +0 2673a RaySphereIntersections +0 268e4 LimbTouch +0 268e7 LimbThink +0 2695d G_GetDismemberLoc +0 26be1 G_GetDismemberBolt +0 26dd9 G_Dismember +0 26fc9 DismembermentTest +0 26feb DismembermentByNum +0 27042 G_GetHitQuad +0 2712b G_CheckForDismemberment +0 27216 G_ThereIsAMaster +0 27251 G_Damage +0 27c6c CanDamage +0 27d97 G_RadiusDamage +0 27f14 adjustRespawnTime +0 27f75 ShieldRemove +0 27f98 ShieldThink +0 27fc5 ShieldDie +0 27fd9 ShieldPain +0 27ffc ShieldGoSolid +0 2809d ShieldGoNotSolid +0 280e0 ShieldTouch +0 2813c CreateShield +0 283a7 PlaceShield +0 28572 ItemUse_Binoculars +0 285e7 ItemUse_Shield +0 285f0 SentryTouch +0 285f3 pas_fire +0 2866f G_SetEnemy +0 28682 pas_find_enemies +0 2881f pas_adjust_enemy +0 288ee sentryExpire +0 28905 pas_think +0 28cfa turret_die +0 28da2 SP_PAS +0 28e2d ItemUse_Sentry +0 28ff4 ItemUse_Seeker +0 29022 ItemUse_MedPack +0 290aa Pickup_Powerup +0 29232 Pickup_Holdable +0 2928c Add_Ammo +0 292e2 Pickup_Ammo +0 2932d Pickup_Weapon +0 2942a Pickup_Health +0 294ca Pickup_Armor +0 29536 RespawnItem +0 2964f Touch_Item +0 299d6 LaunchItem +0 29b3f Drop_Item +0 29ba2 Use_Item +0 29bab FinishSpawningItem +0 29e1f G_CheckTeamItems +0 29e75 ClearRegisteredItems +0 29ea5 RegisterItem +0 29ebd SaveRegisteredItems +0 29f05 G_ItemDisabled +0 29f1e G_SpawnItem +0 29fe0 ResetItem +0 2a01d G_BounceItem +0 2a212 G_RunItem +0 2a2e0 G_LogWeaponInit +0 2a33d G_LogWeaponPickup +0 2a35d G_LogWeaponFire +0 2a3c3 G_LogWeaponDamage +0 2a3ea G_LogWeaponKill +0 2a410 G_LogWeaponFrag +0 2a43f G_LogWeaponDeath +0 2a465 G_LogWeaponPowerup +0 2a48b G_LogWeaponItem +0 2a4b1 G_LogWeaponOutput +0 2b349 CalculateEfficiency +0 2b3d7 CalculateSharpshooter +0 2b461 CalculateUntouchable +0 2b4ac CalculateLogistics +0 2b585 CalculateTactician +0 2b6fb CalculateDemolitionist +0 2b7da CalculateStreak +0 2b7df CalculateTeamMVP +0 2b855 CalculateTeamMVPByRank +0 2b8e3 CalculateTeamDefender +0 2b959 CalculateTeamWarrior +0 2b9cf CalculateTeamCarrier +0 2ba45 CalculateTeamInterceptor +0 2bac8 CalculateTeamRedShirt +0 2bb4b CalculateTeamAward +0 2bbc6 CalculateSection31Award +0 2bc22 CalculateAwards +0 2bdc3 GetMaxDeathsForClient +0 2be09 GetMaxKillsForClient +0 2be4f GetFavoriteTargetForClient +0 2be9c GetWorstEnemyForClient +0 2beff GetFavoriteWeaponForClient +0 2bf87 G_ClearClientLog +0 2c0a1 G_Alloc +0 2c0ec G_InitMemory +0 2c0f2 Svcmd_GameMem_f +0 2c0ff SP_info_camp +0 2c111 SP_info_null +0 2c11a SP_info_notnull +0 2c12c SP_light +0 2c135 TeleportPlayer +0 2c260 SP_misc_teleporter_dest +0 2c263 SP_misc_model +0 2c26c SP_misc_G2model +0 2c275 locateCamera +0 2c354 SP_misc_portal_surface +0 2c3c6 SP_misc_portal_camera +0 2c41c HolocronRespawn +0 2c42f HolocronPopOut +0 2c4a8 HolocronTouch +0 2c61c HolocronThink +0 2c8c4 SP_misc_holocron +0 2ca6e Use_Shooter +0 2cb68 InitShooter_Finish +0 2cb8c InitShooter +0 2cbfa SP_shooter_blaster +0 2cc05 check_recharge +0 2cc44 EnergyShieldStationSettings +0 2cc79 shield_power_converter_use +0 2cd7d SP_misc_shield_floor_unit +0 2cee9 SP_misc_model_shield_power_converter +0 2cfaf EnergyAmmoStationSettings +0 2cfcb ammo_power_converter_use +0 2d0cd SP_misc_model_ammo_power_converter +0 2d186 EnergyHealthStationSettings +0 2d1a2 health_power_converter_use +0 2d24b SP_misc_model_health_power_converter +0 2d304 DmgBoxHit +0 2d307 DmgBoxUpdateSelf +0 2d39e DmgBoxAbsorb_Die +0 2d3a7 DmgBoxAbsorb_Pain +0 2d3b0 CreateNewDamageBox +0 2d42d ATST_ManageDamageBoxes +0 2d5fd G_PlayerBecomeATST +0 2d674 fx_runner_think +0 2d6c2 fx_runner_use +0 2d70b fx_runner_link +0 2d7fe SP_fx_runner +0 2d90d ExampleAnimEntCustomData +0 2d940 ExampleAnimEntCustomDataExists +0 2d998 ExampleAnimEntCustomDataEntry +0 2dabf AnimEntCustomSoundPrecache +0 2dba0 ExampleAnimEntCustomSound +0 2dd05 ExampleAnimEntAlignment +0 2dd47 ExampleAnimEntAlertOthers +0 2dddb ExampleAnimEnt_Die +0 2dfab ExampleAnimEnt_Pain +0 2e0e2 ExampleAnimEntTouch +0 2e0e5 ExampleAnimEntMove +0 2e2f2 ExampleAnimEntYaw +0 2e350 ExampleAnimEntLook +0 2e3ba ExampleAnimEntClearLOS +0 2e478 ExampleAnimEntWeaponHandling +0 2e517 ExampleAnimEntWayValidCheck +0 2e58d ExampleAnimEntNavigation +0 2e6db ExampleAnimEntEnemyHandling +0 2eabb ExampleAnimEntUpdateSelf +0 2f13c G_SpawnExampleAnimEnt +0 2f49e AESpawner_CountAnimEnts +0 2f505 AESpawner_NoClientInPVS +0 2f546 AESpawner_PassAnimEntPVSCheck +0 2f59e AESpawner_Think +0 2f672 SP_misc_animent_spawner +0 2f8ce Use_Target_Screenshake +0 2f8fb SP_target_screenshake +0 2f934 Use_Target_Escapetrig +0 2f9e6 SP_target_escapetrig +0 2fa13 G_CreateExampleAnimEnt +0 2fb02 G_ReflectMissile +0 2fd98 G_DeflectMissile +0 2fec3 G_BounceMissile +0 300ab G_ExplodeMissile +0 30179 G_RunStuckMissile +0 301fa G_BounceProjectile +0 302b9 CreateMissile +0 3039c G_MissileImpact +0 3090b G_RunMissile +0 30b2c G_TestEntityPosition +0 30bb3 G_CreateRotationMatrix +0 30bd5 G_TransposeMatrix +0 30c16 G_RotatePoint +0 30c82 G_TryPushingEntity +0 30f74 G_MoverPush +0 312c1 G_MoverTeam +0 313f4 G_RunMover +0 31425 SetMoverState +0 31564 MatchTeam +0 31584 ReturnToPos1 +0 315b9 Reached_BinaryMover +0 316c2 Use_BinaryMover +0 31807 InitMover +0 31997 Blocked_Door +0 31aea Touch_DoorTriggerSpectator +0 31bc3 Touch_DoorTrigger +0 31c15 Think_SpawnNewDoorTrigger +0 31d17 Think_MatchTeam +0 31d2d SP_func_door +0 31f4b Touch_Plat +0 31fcf Touch_PlatCenterTrigger +0 32010 SpawnPlatTrigger +0 320fe SP_func_plat +0 32271 Touch_Button +0 32294 SP_func_button +0 32418 Think_BeginMoving +0 32428 Reached_Train +0 3250d Think_SetupTrainTargets +0 325c4 SP_path_corner +0 325e5 SP_func_train +0 3267a SP_func_static +0 326ad SP_func_rotating +0 32753 SP_func_bobbing +0 32805 SP_func_pendulum +0 328be BreakableBrushDie +0 329be BreakableBrushPain +0 329c1 BrushThink +0 329e4 BreakableBrushUse +0 32a0e SP_func_breakable +0 32bef GlassDie +0 32c89 GlassDie_Old +0 32cfa GlassPain +0 32cfd GlassUse +0 32df2 SP_func_glass +0 32e7f func_wait_return_solid +0 32f0f func_usable_think +0 32f35 func_usable_use +0 33002 func_usable_pain +0 3301d func_usable_die +0 3303a SP_func_usable +0 330e3 pitch_roll_for_slope +0 33271 G_BounceObject +0 333b0 G_RunObject +0 33647 G_StopObjectMoving +0 33686 G_StartObjectMoving +0 336e5 InitSagaMode +0 337c1 UseSagaTarget +0 33838 SagaBroadcast_OBJECTIVECOMPLETE +0 33879 SagaBroadcast_ROUNDOVER +0 338b3 BroadcastObjectiveCompletion +0 338fa AddSagaWinningTeamPoints +0 33957 SagaRoundComplete +0 339b1 SagaObjectiveCompleted +0 33a13 StripTabs +0 33a53 sagaTriggerUse +0 33b59 SP_info_saga_objective +0 33bac G_WriteClientSessionData +0 33c2c G_ReadSessionData +0 33cb5 G_InitSessionData +0 33dda G_InitWorldSession +0 33dfd G_WriteSessionData +0 33e38 G_SpawnString +0 33e7c G_SpawnFloat +0 33e9e G_SpawnInt +0 33ec0 G_SpawnVector +0 33eef SP_item_botroam +0 33ef2 G_CallSpawn +0 33f71 G_NewString +0 33ff5 G_ParseField +0 340dd G_SpawnGEntityFromSpawnVars +0 341c8 G_AddSpawnVarToken +0 34209 G_ParseSpawnVars +0 34299 SP_worldspawn +0 344a6 G_SpawnEntitiesFromString +0 344cf StringToFilter +0 34582 UpdateIPBans +0 345f2 G_FilterPacket +0 346a5 G_CheckMaxConnections +0 34781 AddIP +0 347d7 InitialAddIP +0 3482a G_ProcessIPBans +0 348d2 Svcmd_AddIP_f +0 348f2 Svcmd_RemoveIP_f +0 3495a Svcmd_EntityList_f +0 34a14 ClientForString +0 34aab Svcmd_ForceTeam_f +0 34ae1 Svcmd_LockTeam +0 34cec Svcmd_Slap +0 34de9 Svcmd_Slay +0 34f0f Svcmd_Rename +0 34faa Svcmd_Silence +0 350b9 Svcmd_Punish +0 3521f Svcmd_CSprint +0 3530c Svcmd_ChangeMode +0 3549c Svcmd_Sleep +0 355fa Svcmd_Empower +0 358dd Svcmd_Who +0 3591a Svcmd_Terminator +0 35bb6 Svcmd_Protect +0 35d09 Svcmd_ChangeMap +0 35d5b Svcmd_Teleport +0 35fd5 Svcmd_AdminKick +0 36052 Svcmd_AdminBan +0 360e8 ConsoleCommand +0 362f5 Use_Target_Give +0 3634f SP_target_give +0 36358 Use_target_remove_powerups +0 363a4 SP_target_remove_powerups +0 363ad Think_Target_Delay +0 363c0 Use_Target_Delay +0 36412 SP_target_delay +0 36445 Use_Target_Score +0 3645d SP_target_score +0 36473 Use_Target_Print +0 364fa SP_target_print +0 36503 Use_Target_Speaker +0 36582 SP_target_speaker +0 36664 target_laser_think +0 367c0 target_laser_on +0 367db target_laser_off +0 367ea target_laser_use +0 36809 target_laser_start +0 3689a SP_target_laser +0 368ac target_teleporter_use +0 368e1 SP_target_teleporter +0 36908 target_relay_use +0 36999 SP_target_relay +0 369a2 target_kill_use +0 369c3 SP_target_kill +0 369cc SP_target_position +0 369de target_location_linkup +0 36a4e SP_target_location +0 36a6f Team_InitGame +0 36aa2 OtherTeam +0 36ab8 TeamName +0 36ad5 OtherTeamName +0 36af2 TeamColorString +0 36b0f PrintCTFMessage +0 36b67 AddTeamScore +0 36bf2 OnSameTeam +0 36c7e Team_SetFlagStatus +0 36ce2 Team_CheckDroppedItem +0 36d1c Team_ForceGesture +0 36d61 Team_FragBonuses +0 372c0 Team_CheckHurtCarrier +0 37356 Team_ResetFlag +0 373c0 Team_ResetFlags +0 373d5 Team_ReturnFlagSound +0 37412 Team_TakeFlagSound +0 37481 Team_CaptureFlagSound +0 374be Team_ReturnFlag +0 374e1 Team_FreeEntity +0 37515 Team_DroppedFlagThink +0 37556 Team_TouchOurFlag +0 377ae Team_TouchEnemyFlag +0 377fe Pickup_Team +0 37875 Team_GetLocation +0 378ef Team_GetLocationMsg +0 37956 SelectRandomTeamSpawnPoint +0 37a04 SelectCTFSpawnPoint +0 37a49 SelectSagaSpawnPoint +0 37a8e SortClients +0 37a99 TeamplayInfoMessage +0 37bf7 CheckTeamStatus +0 37cac SP_team_CTF_redplayer +0 37caf SP_team_CTF_blueplayer +0 37cb2 SP_team_CTF_redspawn +0 37cb5 SP_team_CTF_bluespawn +0 37cb8 InitTrigger +0 37cf7 multi_wait +0 37d00 multi_trigger +0 37ebb Use_Multi +0 37ec7 Touch_Multi +0 37edc SP_trigger_multiple +0 37f5f trigger_always_think +0 37f75 SP_trigger_always +0 37f87 trigger_push_touch +0 37f9f AimAtTarget +0 380a4 SP_trigger_push +0 380e1 Use_target_push +0 38133 SP_target_push +0 381ea trigger_teleporter_touch +0 38245 SP_trigger_teleport +0 3828c hurt_use +0 382ce hurt_touch +0 3846d SP_trigger_hurt +0 384d3 func_timer_think +0 38511 func_timer_use +0 38530 SP_func_timer +0 385aa AddRemap +0 38619 BuildShaderStateConfig +0 3865f G_FindConfigstringIndex +0 386cb G_SkinIndex +0 386de G_ModelIndex +0 386f1 G_SoundIndex +0 38704 G_EffectIndex +0 38717 G_TeamCommand +0 38755 G_Find +0 387a4 G_RadiusList +0 388c4 G_PickTarget +0 3892a G_UseTargets +0 389c9 tv +0 389f7 vtos +0 38a33 G_SetMovedir +0 38a88 G_InitGentity +0 38ab0 G_Spawn +0 38b5e G_EntitiesFree +0 38b89 G_SendG2KillQueue +0 38bcd G_KillG2Queue +0 38bfb G_FreeEntity +0 38ca6 G_TempEntity +0 38cf4 GetTrackerEnt +0 38d2a G_SoundTempEntity +0 38d7e G_KillBox +0 38e4a G_AddPredictableEvent +0 38e65 G_AddEvent +0 38ede G_PlayEffect +0 38f06 G_ScreenShake +0 38f56 G_MuteSound +0 38f9a G_Sound +0 3906d G_SoundAtLoc +0 39084 G_EntitySound +0 390ac ValidUseTarget +0 390c9 TryUse +0 3917d G_PointInBounds +0 391bd G_BoxInBounds +0 39270 G_SetAngles +0 39288 G_ClearTrace +0 392b9 G_SetOrigin +0 392f8 DebugLine +0 393fb G_ROFF_NotetrackCallback +0 394ae touch_NULL +0 394b1 W_TraceSetStart +0 39573 WP_FireBryarPistol +0 39649 WP_FireTurretMissile +0 396a0 WP_FireGenericBlasterMissile +0 396e9 WP_FireBlasterMissile +0 39741 WP_FireEmplacedMissile +0 397a4 WP_FireBlaster +0 397fb WP_DisruptorMainFire +0 39a25 WP_DisruptorAltFire +0 39ded WP_FireDisruptor +0 39e47 WP_BowcasterAltFire +0 39ed1 WP_BowcasterMainFire +0 3a022 WP_FireBowcaster +0 3a037 WP_RepeaterMainFire +0 3a07e WP_RepeaterAltFire +0 3a120 WP_FireRepeater +0 3a17a WP_DEMP2_MainFire +0 3a1f6 DEMP2_AltRadiusDamage +0 3a43a DEMP2_AltDetonate +0 3a4bb WP_DEMP2_AltFire +0 3a5b4 WP_FireDEMP2 +0 3a5c9 WP_FlechetteMainFire +0 3a6ae prox_mine_think +0 3a73c WP_TraceSetStart +0 3a7f4 WP_ExplosiveDie +0 3a7fd WP_flechette_alt_blow +0 3a818 WP_CreateFlechetteBouncyThing +0 3a8e9 WP_FlechetteAltFire +0 3a960 WP_FireFlechette +0 3a975 rocketThink +0 3abf6 WP_FireRocket +0 3ad56 thermalDetonatorExplode +0 3ae34 thermalThinkStandard +0 3ae5b WP_FireThermalDetonator +0 3afed WP_DropThermal +0 3b00d laserTrapExplode +0 3b097 laserTrapDelayedExplode +0 3b0df touchLaserTrap +0 3b146 laserTrapThink +0 3b20d laserTrapStick +0 3b320 TrapThink +0 3b332 CreateLaserTrap +0 3b4d3 WP_PlaceLaserTrap +0 3b607 VectorNPos +0 3b66e charge_stick +0 3b8cb DetPackBlow +0 3b934 DetPackPain +0 3b955 DetPackDie +0 3b976 drop_charge +0 3bb19 BlowDetpacks +0 3bb88 CheatsOn +0 3bb95 WP_DropDetPack +0 3bcd7 WP_FireStunBaton +0 3be55 SnapVectorTowards +0 3be9e LogAccuracyHit +0 3beed CalcMuzzlePoint +0 3c022 CalcMuzzlePointOrigin +0 3c0ac FireWeapon +0 3c23f AnimEntCalcMuzzlePoint +0 3c323 AnimEntFireWeapon +0 3c3f3 WP_FireEmplaced +0 3c4f7 emplaced_gun_use +0 3c6f0 emplaced_gun_realuse +0 3c6fe emplaced_gun_pain +0 3c708 emplaced_gun_update +0 3c9ec emplaced_gun_die +0 3ca0d SP_emplaced_gun +0 3cb8b G_PreDefSound +0 3cbac InFront +0 3cc26 CheckForceStringTail +0 3cc91 CheckForceString +0 3cd08 WP_InitForcePowers +0 3d24e WP_SpawnInitForcePowers +0 3d465 ForcePowerUsableOn +0 3d52d WP_ForcePowerAvailable +0 3d57f WP_ForcePowerInUse +0 3d597 WP_ForcePowerUsable +0 3d670 WP_AbsorbConversion +0 3d737 WP_ForcePowerRegenerate +0 3d78f WP_ForcePowerStart +0 3daa4 ForceHeal +0 3dbc5 WP_AddToClientBitflags +0 3dc2a ForceTeamHeal +0 3de6c ForceTeamForceReplenish +0 3e04a ForceGrip +0 3e18b ForceSpeed +0 3e20d ForceSeeing +0 3e27c ForceProtect +0 3e30f ForceAbsorb +0 3e3a2 ForceRage +0 3e44f ForceLightning +0 3e4cd ForceLightningDamage +0 3e5ff ForceShootLightning +0 3e8ef ForceDrain +0 3e96d ForceDrainDamage +0 3eb88 ForceShootDrain +0 3eecb ForceJumpCharge +0 3f005 WP_GetVelocityForForceJump +0 3f1b9 ForceJump +0 3f266 WP_AddAsMindtricked +0 3f2cb ForceTelepathy +0 3f707 GEntity_UseFunc +0 3f71e CanCounterThrow +0 3f788 G_InGetUpAnim +0 3f7c7 ForceThrow +0 40770 WP_ForcePowerStop +0 409b1 DoGripAction +0 40f56 G_IsMindTricked +0 40fbd RemoveTrickedEnt +0 41026 WP_UpdateMindtrickEnts +0 41170 WP_ForcePowerRun +0 41544 WP_DoSpecificPower +0 41759 FindGenericEnemyIndex +0 41890 SeekerDroneUpdate +0 41c72 HolocronUpdate +0 41e09 JediMasterUpdate +0 41f07 WP_HasForcePowers +0 41f41 WP_ForcePowersUpdate +0 42948 Jedi_DodgeEvasion +0 42aaf RandFloat +0 42ac9 SaberUpdateSelf +0 42bca SaberGotHit +0 42be8 WP_SaberInitBladeData +0 42ca7 G_G2ClientSpineAngles +0 42e22 G_G2PlayerAngles +0 43127 SaberAttacking +0 431bf WP_SabersCheckLock2 +0 43564 WP_SabersCheckLock +0 43c5a G_GetParryForBlock +0 43c9b WP_GetSaberDeflectionAngle +0 44199 G_KnockawayForParry +0 441c2 G_GetAttackDamage +0 4428b G_GetAnimPoint +0 44300 G_ClientIdleInWorld +0 44366 G_G2TraceCollide +0 44488 G_SaberInBackAttack +0 444a3 CheckSaberDamage +0 45751 CheckThrownSaberDamaged +0 45bea saberCheckRadiusDamage +0 45c55 saberMoveBack +0 45c8b SaberBounceSound +0 45ca1 DeadSaberThink +0 45cc2 MakeDeadSaber +0 45e10 saberBackToOwner +0 46099 thrownSaberTouch +0 4616e saberFirstThrown +0 46483 WP_SaberPositionUpdate +0 47121 WP_MissileBlockForBlock +0 4714f WP_SaberBlockNonRandom +0 4725b WP_SaberBlock +0 473ba WP_SaberCanBlock +0 4757c HasSetSaberOnly +0 475c3 Q_rand +0 475d8 Q_random +0 475ea Q_crandom +0 475fb VectorCompare +0 47633 VectorLength +0 47666 VectorLengthSquared +0 47692 Distance +0 476d3 DistanceSquared +0 47721 VectorNormalizeFast +0 47780 VectorInverse +0 477a8 CrossProduct +0 47821 ClampChar +0 47838 ClampShort +0 4784f DirToByte +0 478aa ByteToDir +0 478c8 ColorBytes3 +0 47937 ColorBytes4 +0 479c9 NormalizeColor +0 47a3f PlaneFromPoints +0 47afd RotatePointAroundVector +0 47c08 RotateAroundDirection +0 47c4c vectoangles +0 47d08 AnglesToAxis +0 47d3d AxisClear +0 47d74 AxisCopy +0 47d98 ProjectPointOnPlane +0 47e53 MakeNormalVectors +0 47efe VectorRotate +0 47f9b Q_rsqrt +0 47fd2 Q_fabs +0 47fe2 LerpAngle +0 48013 AngleSubtract +0 48038 AnglesSubtract +0 48086 AngleMod +0 48098 AngleNormalize360 +0 480a6 AngleNormalize180 +0 480c1 AngleDelta +0 480d1 SetPlaneSignbits +0 480fe BoxOnPlaneSide +0 484bf RadiusFromBounds +0 48512 ClearBounds +0 48549 AddPointToBounds +0 485e2 VectorNormalize +0 48652 VectorNormalize2 +0 486e0 _VectorMA +0 48722 _DotProduct +0 48757 _VectorSubtract +0 48790 _VectorAdd +0 487c9 _VectorCopy +0 487f0 _VectorScale +0 48820 Vector4Scale +0 48862 Q_log2 +0 48881 MatrixMultiply +0 48a56 AngleVectors +0 48b4e PerpendicularVector +0 48bba Rand_Init +0 48bc1 flrand +0 48bfc irand +0 48c2e powf +0 48c51 GetIDForString +0 48c96 GetStringForID +0 48cd2 Com_Clamp +0 48cec Q_stristr +0 48d77 COM_SkipPath +0 48d9b COM_StripExtension +0 48dd1 COM_DefaultExtension +0 48e19 ShortSwap +0 48e39 ShortNoSwap +0 48e44 LongSwap +0 48e77 LongNoSwap +0 48e7d Long64Swap +0 48eba Long64NoSwap +0 48ec2 FloatSwap +0 48ed8 FloatNoSwap +0 48edf COM_BeginParseSession +0 48ef1 COM_GetCurrentParseLine +0 48ef7 COM_Parse +0 48f06 COM_ParseError +0 48f26 COM_ParseWarning +0 48f46 SkipWhitespace +0 48f7d COM_Compress +0 490d0 COM_ParseExt +0 4921c COM_ParseString +0 4923d COM_ParseInt +0 4926a COM_ParseFloat +0 49297 COM_ParseVec4 +0 492c4 COM_MatchToken +0 492ed SkipBracedSection +0 4932b SkipRestOfLine +0 49363 Parse1DMatrix +0 493a2 Parse2DMatrix +0 493dd Parse3DMatrix +0 49422 Q_isprint +0 49437 Q_islower +0 4944c Q_isupper +0 49461 Q_isalpha +0 49482 Q_strrchr +0 494b6 Q_strncpyz +0 494f1 Q_stricmpn +0 4957c Q_strncmp +0 495ce Q_stricmp +0 495f6 Q_strlwr +0 4961c Q_strupr +0 49642 Q_strcat +0 4966e Q_PrintStrlen +0 496c6 Q_CleanStr +0 49734 Com_sprintf +0 49773 va +0 497a0 Info_ValueForKey +0 49880 Info_NextPair +0 4991e Info_RemoveKey +0 499ee Info_RemoveKey_Big +0 49abe Info_Validate +0 49ae5 Info_SetValueForKey +0 49bb5 Info_SetValueForKey_Big +0 49c7d Q_irand +1 4 gDuelExit +1 8 gDuelist1 +1 c gDuelist2 +1 10 gameCvarTable +1 fd0 gameCvarTableSize +1 1004 gQueueScoreMessage +1 1008 gQueueScoreMessageTime +1 100c gDidDuelStuff +1 1014 g_LastFrameTime +1 1018 g_TimeSinceLastFrame +1 101c gDoSlowMoDuel +1 1020 gSlowMoDuelTime +1 1024 ctfStateNames +1 1040 ctfStateDescriptions +1 1058 sagaStateDescriptions +1 1064 teamplayStateDescriptions +1 112c gWPRenderTime +1 1130 gDeactivated +1 1134 gBotEdit +1 1138 gWPRenderedFrame +1 113c gWPNum +1 1140 gLastPrintedIndex +1 1144 gLevelFlags +1 1148 botGlobalNavWeaponWeights +1 1188 randSeed +1 11fc forceMasteryLevels +1 121c forceMasteryPoints +1 123c bgForcePowerCost +1 135c forcePowerSorted +1 13a4 forcePowerDarkLight +1 13ec WeaponReadyAnim +1 142c WeaponAttackAnim +1 146c bg_itemlist +1 1d28 bg_numItems +1 1d80 eventnames +1 1f38 bg_poolSize +1 1f3c bg_poolTail +1 1f40 gPMDoSlowFall +1 1f44 pm_stopspeed +1 1f48 pm_duckScale +1 1f4c pm_swimScale +1 1f50 pm_wadeScale +1 1f54 pm_accelerate +1 1f58 pm_airaccelerate +1 1f5c pm_wateraccelerate +1 1f60 pm_flyaccelerate +1 1f64 pm_friction +1 1f68 pm_waterfriction +1 1f6c pm_flightfriction +1 1f70 pm_spectatorfriction +1 1f74 c_pmove +1 1f78 forceSpeedLevels +1 1f88 forcePowerNeeded +1 20a8 forceJumpHeight +1 20b8 forceJumpStrength +1 215c animTable +1 4bb0 BGPAFtextLoaded +1 4bb4 WP_MuzzlePoint +1 4c74 weaponData +1 4ff4 ammoData +1 501c saberMoveData +1 628c transitionMove +1 6510 saberMoveTransitionAngle +1 672c playerMins +1 6738 playerMaxs +1 6744 gJMSaberEnt +1 6748 g2SaberInstance +1 6780 gc_orders +1 679c gameNames +1 67d8 modNames +1 6a88 hitLocName +1 6b44 gGAvoidDismember +1 6bc4 shieldLoopSound +1 6bc8 shieldAttachSound +1 6bcc shieldActivateSound +1 6bd0 shieldDeactivateSound +1 6bd4 shieldDamageSound +1 6c14 weaponFromMOD +1 6cac weaponNameFromIndex +1 6cec gAnimEntTypes +1 6cf0 animEntRoot +1 6cf4 gEscaping +1 6cf8 gEscapeTime +1 6d2c fields +1 6eac spawns +1 7100 defaultStyles +1 7280 precachedKyle +1 72bc remapCount +1 72f0 gG2KillNum +1 9388 speedLoopSound +1 938c rageLoopSound +1 9390 protectLoopSound +1 9394 absorbLoopSound +1 9398 seeLoopSound +1 939c ysalamiriLoopSound +1 93a0 forcePowerMinRank +1 94c0 GENERIC_FORCE +1 94c4 FORCE_LOWER +1 94c8 FORCE_UPPER +1 96a0 saberSpinSound +1 96a4 saberOffSound +1 96a8 saberOnSound +1 96ac saberHumSound +1 9798 vec3_origin +1 97a4 axisDefault +1 97c8 colorBlack +1 97d8 colorRed +1 97e8 colorGreen +1 97f8 colorBlue +1 9808 colorYellow +1 9818 colorMagenta +1 9828 colorCyan +1 9838 colorWhite +1 9848 colorLtGrey +1 9858 colorMdGrey +1 9868 colorDkGrey +1 9878 colorLtBlue +1 9888 colorDkBlue +1 9898 g_color_table +1 9918 bytedirs +1 a0d0 holdrand +2 10004 ctfFlagStatusRemap +2 3d9040 _stackStart +2 3e9040 _stackEnd +3 0 g_listEntity +3 110 g_podiumDrop +3 220 g_podiumDist +3 330 g_statLogFile +3 440 g_statLog +3 550 g_logSync +3 660 g_log +3 770 g_MaxHolocronCarry +3 880 g_clients +3 18280 cm_botsattackhumans +3 18390 cm_clanLogout_saying +3 184a0 cm_clanLogin_saying +3 185b0 cm_teleport_saying +3 186c0 cm_slay_saying +3 187d0 cm_sleep_off_saying +3 188e0 cm_sleep_on_saying +3 189f0 cm_punish_off_saying +3 18b00 cm_punish_on_saying +3 18c10 cm_slap_saying +3 18d20 cm_silence_off_saying +3 18e30 cm_silence_on_saying +3 18f40 cm_protect_off_saying +3 19050 cm_protect_on_saying +3 19160 cm_terminator_off_saying +3 19270 cm_terminator_on_saying +3 19380 cm_empower_off_saying +3 19490 cm_empower_on_saying +3 195a0 cm_AdminLogout3_saying +3 196b0 cm_AdminLogout2_saying +3 197c0 cm_AdminLogout1_saying +3 198d0 cm_AdminLogin3_saying +3 199e0 cm_AdminLogin2_saying +3 19af0 cm_AdminLogin1_saying +3 19c00 cm_adminPassword3 +3 19d10 cm_adminPassword2 +3 19e20 cm_adminPassword1 +3 19f30 cm_clanPassword +3 1a040 cm_voteControl +3 1a150 cm_emoteControl +3 1a260 cm_adminControl3 +3 1a370 cm_adminControl2 +3 1a480 cm_adminControl1 +3 1a590 cm_adminLevel3 +3 1a6a0 cm_adminLevel2 +3 1a7b0 cm_adminLevel1 +3 1a8c0 cm_report +3 1a9d0 cm_clanTag +3 1aae0 cm_badwords +3 1abf0 sv_maxConnections +3 1ad00 cm_autoprotecttime +3 1ae10 cm_knockmedown +3 1af20 cm_blacknames +3 1b030 cm_duelshield +3 1b140 cm_duelhealth +3 1b250 cm_duelradius +3 1b360 cm_duelstatus +3 1b470 mod_pushall +3 1b580 cm_samenames +3 1b690 cm_duelbeginsaberoff +3 1b7a0 cm_multiduels +3 1b8b0 cm_savedualblade +3 1b9c0 cm_dualblade +3 1bad0 cm_motd_time +3 1bbe0 cm_motd +3 1bcf0 cm_console_motd +3 1be00 g_austrian +3 1bf10 g_saberDebugPrint +3 1c020 g_saberDmgDelay_Wound +3 1c130 g_saberDmgDelay_Idle +3 1c240 g_saberDmgVelocityScale +3 1c350 g_timeouttospec +3 1c460 g_forceDodge +3 1c570 g_dismember +3 1c680 g_singlePlayer +3 1c790 g_enableBreath +3 1c8a0 g_enableDust +3 1c9b0 g_rankings +3 1cac0 pmove_msec +3 1cbd0 pmove_fixed +3 1cce0 g_smoothClients +3 1cdf0 g_blueteam +3 1cf00 g_redteam +3 1d010 g_debugUp +3 1d120 g_debugRight +3 1d230 g_debugForward +3 1d340 g_filterBan +3 1d450 g_banIPs +3 1d560 g_teamForceBalance +3 1d670 g_teamAutoJoin +3 1d780 g_allowVote +3 1d890 g_blood +3 1d9a0 g_doWarmup +3 1dab0 g_warmup +3 1dbc0 g_motd +3 1dcd0 g_synchronousClients +3 1dde0 g_adaptRespawn +3 1def0 g_weaponTeamRespawn +3 1e000 g_weaponRespawn +3 1e110 g_debugDamage +3 1e220 g_debugAlloc +3 1e330 g_debugMove +3 1e440 g_inactivity +3 1e550 g_forcerespawn +3 1e660 g_quadfactor +3 1e770 g_knockback +3 1e880 g_speed +3 1e990 g_gravity +3 1eaa0 g_needpass +3 1ebb0 g_password +3 1ecc0 g_friendlySaber +3 1edd0 g_friendlyFire +3 1eee0 g_saberInterpolate +3 1eff0 g_capturelimit +3 1f100 g_timelimit +3 1f210 g_duel_fraglimit +3 1f320 g_fraglimit +3 1f430 g_duelWeaponDisable +3 1f540 g_fraglimitVoteCorrection +3 1f650 g_allowDuelSuicide +3 1f760 g_weaponDisable +3 1f870 g_forcePowerDisable +3 1f980 g_spawnInvulnerability +3 1fa90 g_forceRegenTime +3 1fba0 g_saberDamageScale +3 1fcb0 g_slowmoDuelEnd +3 1fdc0 g_logClientInfo +3 1fed0 g_saberBoxTraceSize +3 1ffe0 g_saberAlwaysBoxTrace +3 200f0 g_saberGhoul2Collision +3 20200 g_saberTraceSaberFirst +3 20310 g_saberLockFactor +3 20420 g_saberLocking +3 20530 g_privateDuel +3 20640 g_forceBasedTeams +3 20750 g_maxForceRank +3 20860 g_dmflags +3 20970 g_autoMapCycle +3 20a80 g_trueJedi +3 20b90 g_restarted +3 20ca0 g_maxGameClients +3 20db0 g_maxclients +3 20ec0 g_cheats +3 20fd0 g_dedicated +3 210e0 g_gametype +3 211f0 g_entities +3 f61f0 level +3 f8590 g_ff_objectives +3 f86ac droppedBlueFlag +3 f86b0 droppedRedFlag +3 f86b4 gBotEventTracker +3 f88b4 regularupdate_time +3 f88b8 numbots +3 f88bc botstates +3 f893c floattime +3 f8940 eFlagBlue +3 f8944 eFlagRed +3 f8948 oFlagBlue +3 f894c flagBlue +3 f8950 oFlagRed +3 f8954 flagRed +3 f8958 bot_wp_visconnect +3 f8a68 bot_wp_distconnect +3 f8b78 bot_wp_clearweight +3 f8c88 bot_wp_edit +3 f8d98 bot_wp_info +3 f8ea8 bot_camp +3 f8fb8 bot_attachments +3 f90c8 bot_honorableduelacceptance +3 f91d8 bot_forgimmick +3 f92e8 bot_forcepowers +3 f93f8 gBotChatBuffer +3 1393f8 nodenum +3 1393fc nodetable +3 1593fc gWPArray +3 15d3fc bg_pool +3 3513fc pml +3 351888 pm +3 35188c BGPAFtext +3 35b4cc bgGlobalAnimations +3 363940 podium3 +3 363944 podium2 +3 363948 podium1 +3 363950 bot_minplayers +3 363a60 botSpawnQueue +3 363ae0 g_arenaInfos +3 364ae0 g_numArenas +3 364ae4 g_botInfos +3 365ae4 g_numBots +3 365ee8 Client_Force +3 369df0 itemRegistered +3 36a1f0 G_WeaponLogItems +3 36a9f0 G_WeaponLogPowerups +3 36ad70 G_WeaponLogClientTouch +3 36adf0 G_WeaponLogLastTime +3 36ae70 G_WeaponLogTime +3 36b670 G_WeaponLogFrags +3 36c670 G_WeaponLogDeaths +3 36ce70 G_WeaponLogKills +3 36e170 G_WeaponLogDamage +3 36f470 G_WeaponLogFired +3 36fc70 G_WeaponLogPickups +3 370470 allocPoint +3 370474 memoryPool +3 3b0474 gJanSound_Alert +3 3b0488 gJanSound_Death +3 3b0494 gJanSound_Pain +3 3b04a4 gRodianSound_Alert +3 3b04b8 gRodianSound_Death +3 3b04c4 gRodianSound_Pain +3 3b04d4 gTrooperSound_Alert +3 3b04e8 gTrooperSound_Death +3 3b04f4 gTrooperSound_Pain +3 3b0504 gExplSound +3 3b0508 pushed_p +3 3b050c pushed +3 3b850c imperial_attackers +3 3b8510 rebel_attackers +3 3b8514 rebel_goals_completed +3 3b8518 rebel_goals_required +3 3b851c imperial_goals_completed +3 3b8520 imperial_goals_required +3 3b8524 saga_round_over +3 3b8528 saga_valid +3 3b852c saga_info +3 3ba52c numIPFilters +3 3ba530 ipFilters +3 3bc530 teamgame +3 3bc54c gTrigFallSound +3 3bdaf0 gG2KillIndex +3 3bdbf0 remappedShaders +3 3c1df0 ent_list +3 3c2df0 muzzle +3 3c2dfc up +3 3c2e08 right +3 3c2e14 forward +3 3c2e20 s_quadFactor +3 3d883c com_lines +3 3d8840 com_parsename +3 3d8c40 com_token diff --git a/code/base/vm/jk2mpgame.qvm b/code/base/vm/jk2mpgame.qvm new file mode 100644 index 0000000..e3d040a Binary files /dev/null and b/code/base/vm/jk2mpgame.qvm differ diff --git a/code/base/vm/ui.map b/code/base/vm/ui.map new file mode 100644 index 0000000..46a8dec --- /dev/null +++ b/code/base/vm/ui.map @@ -0,0 +1,1023 @@ +0 ffffff35 trap_G2API_SetBoneAngles +0 ffffff36 trap_SP_GetStringTextString +0 ffffff37 trap_SP_Register +0 ffffff8c matrixmultiply +0 ffffff8d asin +0 ffffff8e acos +0 ffffff91 ceil +0 ffffff92 perpendicularvector +0 ffffff93 anglevectors +0 ffffff94 floor +0 ffffff95 sqrt +0 ffffff96 atan2 +0 ffffff97 cos +0 ffffff98 sin +0 ffffff99 strncpy +0 ffffff9a memcpy +0 ffffff9b memset +0 ffffffa1 trap_LAN_CompareServers +0 ffffffa2 trap_LAN_ServerIsVisible +0 ffffffa3 trap_LAN_GetServerPing +0 ffffffa4 trap_LAN_ServerStatus +0 ffffffa5 trap_R_RemapShader +0 ffffffa6 trap_CIN_SetExtents +0 ffffffa7 trap_CIN_DrawCinematic +0 ffffffa8 trap_CIN_RunCinematic +0 ffffffa9 trap_CIN_StopCinematic +0 ffffffaa trap_CIN_PlayCinematic +0 ffffffab trap_LAN_RemoveServer +0 ffffffac trap_LAN_AddServer +0 ffffffad trap_LAN_SaveCachedServers +0 ffffffae trap_LAN_LoadCachedServers +0 ffffffaf trap_LAN_ResetPings +0 ffffffb0 trap_LAN_UpdateVisiblePings +0 ffffffb1 trap_LAN_MarkServerVisible +0 ffffffb2 trap_LAN_GetServerInfo +0 ffffffb3 trap_LAN_GetServerAddressString +0 ffffffb4 trap_LAN_GetServerCount +0 ffffffb5 trap_RealTime +0 ffffffb6 trap_S_StartBackgroundTrack +0 ffffffb7 trap_S_StopBackgroundTrack +0 ffffffb8 trap_PC_RemoveAllGlobalDefines +0 ffffffb9 trap_PC_LoadGlobalDefines +0 ffffffba trap_PC_SourceFileAndLine +0 ffffffbb trap_PC_ReadToken +0 ffffffbc trap_PC_FreeSource +0 ffffffbd trap_PC_LoadSource +0 ffffffbe trap_PC_AddGlobalDefine +0 ffffffbf trap_R_ModelBounds +0 ffffffc0 trap_AnyLanguage_ReadCharFromString +0 ffffffc1 trap_Language_UsesSpaces +0 ffffffc2 trap_Language_IsAsian +0 ffffffc3 trap_R_Font_DrawString +0 ffffffc4 trap_R_Font_HeightPixels +0 ffffffc5 trap_R_Font_StrLenChars +0 ffffffc6 trap_R_Font_StrLenPixels +0 ffffffc7 trap_R_RegisterFont +0 ffffffc8 trap_VerifyCDKey +0 ffffffc9 trap_SetCDKey +0 ffffffca trap_GetCDKey +0 ffffffcb trap_MemoryRemaining +0 ffffffcc trap_Cvar_Update +0 ffffffcd trap_Cvar_Register +0 ffffffce trap_LAN_GetPingInfo +0 ffffffcf trap_LAN_GetPing +0 ffffffd0 trap_LAN_ClearPing +0 ffffffd1 trap_LAN_GetPingQueueCount +0 ffffffd2 trap_GetConfigString +0 ffffffd3 trap_GetClientState +0 ffffffd4 trap_GetGlconfig +0 ffffffd5 trap_GetClipboardData +0 ffffffd6 trap_Key_SetCatcher +0 ffffffd7 trap_Key_GetCatcher +0 ffffffd8 trap_Key_ClearStates +0 ffffffd9 trap_Key_SetOverstrikeMode +0 ffffffda trap_Key_GetOverstrikeMode +0 ffffffdb trap_Key_IsDown +0 ffffffdc trap_Key_SetBinding +0 ffffffdd trap_Key_GetBindingBuf +0 ffffffde trap_Key_KeynumToStringBuf +0 ffffffdf trap_S_StartLocalSound +0 ffffffe0 trap_S_RegisterSound +0 ffffffe2 trap_CM_LerpTag +0 ffffffe3 trap_UpdateScreen +0 ffffffe4 trap_R_DrawStretchPic +0 ffffffe5 trap_R_SetColor +0 ffffffe6 trap_R_RenderScene +0 ffffffe7 trap_R_AddLightToScene +0 ffffffe8 trap_R_AddPolyToScene +0 ffffffe9 trap_R_AddRefEntityToScene +0 ffffffea trap_R_ClearScene +0 ffffffeb trap_R_RegisterShaderNoMip +0 ffffffec trap_R_RegisterSkin +0 ffffffed trap_R_RegisterModel +0 ffffffee trap_FS_GetFileList +0 ffffffef trap_FS_FCloseFile +0 fffffff0 trap_FS_Write +0 fffffff1 trap_FS_Read +0 fffffff2 trap_FS_FOpenFile +0 fffffff3 trap_Cmd_ExecuteText +0 fffffff4 trap_Argv +0 fffffff5 trap_Argc +0 fffffff6 trap_Cvar_InfoStringBuffer +0 fffffff7 trap_Cvar_Create +0 fffffff8 trap_Cvar_Reset +0 fffffff9 trap_Cvar_SetValue +0 fffffffa trap_Cvar_VariableStringBuffer +0 fffffffb trap_Cvar_VariableValue +0 fffffffc trap_Cvar_Set +0 fffffffd trap_Milliseconds +0 fffffffe trap_Print +0 ffffffff trap_Error +0 0 vmMain +0 7f UI_TeamName +0 9c GetCRDelineatedString +0 f6 GetMonthAbbrevString +0 5d9 UI_GetStripEdString +0 5f4 _UI_Refresh +0 738 _UI_Shutdown +0 73e GetMenuBuffer +0 7a4 Asset_Parse +0 a88 UI_Report +0 a8e UI_ParseMenu +0 afc Load_Menu +0 b45 UI_LoadMenus +0 be5 UI_Load +0 c4e UI_DrawHandicap +0 c98 UI_DrawClanName +0 cc5 UI_SetCapFragLimits +0 d18 UI_DrawGameType +0 d44 UI_DrawNetGameType +0 d87 UI_DrawAutoSwitch +0 def UI_DrawJoinGameType +0 e2b UI_TeamIndexFromName +0 e66 UI_DrawClanLogo +0 f13 UI_DrawClanCinematic +0 1027 UI_DrawPreviewCinematic +0 1091 UI_DrawSkill +0 10dd UI_DrawGenericNum +0 1121 UI_DrawForceMastery +0 116c UI_DrawSkinColor +0 11d1 UI_DrawForceSide +0 1355 UI_HasSetSaberOnly +0 13d9 UI_AllForceDisabled +0 1400 UI_TrueJediEnabled +0 118 GetNetSourceString +0 13a AssetCache +0 212 _UI_DrawSides +0 268 _UI_DrawTopBottom +0 2be _UI_DrawRect +0 2f0 MenuFontToHandle +0 317 Text_Width +0 335 Text_Height +0 350 Text_Paint +0 3c0 Text_PaintWithCursor +0 497 Text_Paint_Limit +0 58f UI_ShowPostGame +0 5b0 UI_DrawCenteredPic +0 1490 UI_DrawJediNonJedi +0 14f6 UI_DrawTeamName +0 1561 UI_DrawTeamMember +0 163d UI_DrawEffects +0 1665 UI_DrawMapPreview +0 1716 UI_DrawMapTimeToBeat +0 177b UI_DrawMapCinematic +0 185c UI_SetForceDisabled +0 18d2 UpdateForceStatus +0 1ae0 UI_DrawNetSource +0 1b2e UI_DrawNetMapPreview +0 1b7d UI_DrawNetMapCinematic +0 1bd5 UI_DrawNetFilter +0 1c21 UI_DrawTier +0 1c6d UI_DrawTierMap +0 1ceb UI_EnglishMapName +0 1d1d UI_DrawTierMapName +0 1d82 UI_DrawTierGameType +0 1de5 UI_AIFromName +0 1e17 UI_NextOpponent +0 1e6a UI_PriorOpponent +0 1ec1 UI_DrawPlayerLogo +0 1f65 UI_DrawPlayerLogoMetal +0 2009 UI_DrawPlayerLogoName +0 20ad UI_DrawOpponentLogo +0 2151 UI_DrawOpponentLogoMetal +0 21f5 UI_DrawOpponentLogoName +0 2299 UI_DrawAllMapsSelection +0 22e0 UI_DrawOpponentName +0 230d UI_OwnerDrawWidth +0 2612 UI_DrawBotName +0 2657 UI_DrawBotSkill +0 2695 UI_DrawRedBlue +0 26c8 UI_DrawCrosshair +0 2706 UI_BuildPlayerList +0 288d UI_DrawSelectedPlayer +0 28c8 UI_DrawServerRefreshDate +0 299b UI_DrawServerMOTD +0 2ae8 UI_DrawKeyBindStatus +0 2b1f UI_DrawGLInfo +0 2cd4 UI_Version +0 2d14 UI_OwnerDraw +0 3184 UI_OwnerDrawVisible +0 330f UI_Handicap_HandleKey +0 3375 UI_Effects_HandleKey +0 33ea UI_ClanName_HandleKey +0 3474 UI_GameType_HandleKey +0 3543 UI_NetGameType_HandleKey +0 35ce UI_AutoSwitch_HandleKey +0 3629 UI_JoinGameType_HandleKey +0 368c UI_Skill_HandleKey +0 36e9 UI_TeamName_HandleKey +0 3764 UI_TeamMember_HandleKey +0 381a UI_NetSource_HandleKey +0 3886 UI_NetFilter_HandleKey +0 38d8 UI_OpponentName_HandleKey +0 3901 UI_BotName_HandleKey +0 3954 UI_BotSkill_HandleKey +0 39a1 UI_RedBlue_HandleKey +0 39c9 UI_Crosshair_HandleKey +0 3a23 UI_SelectedPlayer_HandleKey +0 3aa1 UI_OwnerDrawHandleKey +0 3cd4 UI_GetValue +0 3cd9 UI_ServersQsortCompare +0 3cf4 UI_ServersSort +0 3d12 UI_LoadMods +0 3d93 UI_LoadMovies +0 3e09 UI_LoadDemos +0 3eb3 UI_SetNextMap +0 3eeb UI_StartSkirmish +0 435a UI_Update +0 4605 UI_DeferMenuScript +0 468d UI_UpdateVideoSetup +0 4770 UI_GetVideoSetup +0 4907 UI_RunMenuScript +0 5574 UI_GetTeamColor +0 5577 UI_MapCountByGameType +0 55fd UI_hasSkinForBase +0 564e UI_HeadCountByTeam +0 57ae UI_HeadCountByColor +0 5804 UI_InsertServerIntoDisplayList +0 584b UI_RemoveServerFromDisplayList +0 5896 UI_BinaryServerInsertion +0 5912 UI_BuildServerDisplayList +0 5ade UI_SortServerStatusInfo +0 5bdf UI_GetServerStatusInfo +0 5f5e stristr +0 5fc0 UI_BuildFindPlayerList +0 623f UI_BuildServerStatus +0 62a0 UI_FeederCount +0 6332 UI_SelectedMap +0 6371 UI_SelectedHead +0 63b0 UI_SelectedTeamHead +0 6418 UI_GetIndexFromSelection +0 6449 UI_UpdatePendingPings +0 645b UI_FeederItemText +0 6886 UI_FeederItemImage +0 6a2e UI_FeederSelection +0 6d2e GameType_Parse +0 6e29 MapList_Parse +0 6f6c UI_ParseGameInfo +0 7002 UI_Pause +0 702d UI_PlayCinematic +0 704c UI_StopCinematic +0 70d9 UI_DrawCinematic +0 70f8 UI_RunCinematicFrame +0 7101 UI_LoadForceConfig_List +0 71d1 UI_BuildQ3Model_List +0 7399 _UI_Init +0 758b _UI_KeyEvent +0 75db _UI_MouseEvent +0 7629 UI_LoadNonIngame +0 764e _UI_SetActiveMenu +0 775e _UI_IsFullscreen +0 7768 UI_ReadableSize +0 781d UI_PrintTime +0 787e Text_PaintCenter +0 78b3 UI_DisplayDownloadInfo +0 7bc9 UI_DrawConnectScreen +0 7d76 UI_RegisterCvars +0 7dab UI_UpdateCvars +0 7dce UI_StopServerRefresh +0 7e0c UI_DoServerRefresh +0 7e6d UI_StartServerRefresh +0 7f40 Com_Error +0 7f62 Com_Printf +0 7f84 UI_ClampCvar +0 7f9e UI_StartDemoLoop +0 7fa8 UI_Argv +0 7fb7 UI_Cvar_VariableString +0 7fc6 UI_SetBestScores +0 8255 UI_LoadBestScores +0 82d9 UI_ClearScores +0 835e UI_Cache_f +0 838f UI_CalcPostGameStats +0 860e UI_ConsoleCommand +0 871c UI_Shutdown +0 871f UI_DrawNamedPic +0 8751 UI_DrawHandlePic +0 87a0 UI_FillRect +0 87cf UI_DrawSides +0 881c UI_DrawTopBottom +0 8869 UI_DrawRect +0 8895 UI_SetColor +0 889e UI_UpdateScreen +0 88a4 UI_DrawTextBox +0 8907 UI_CursorInRect +0 8932 UI_InitForceShaders +0 8a25 UI_DrawForceStars +0 8ad8 UI_UpdateClientForcePowers +0 8b54 UI_TranslateFCFIndex +0 8b69 UI_SaveForceTemplate +0 8c9e UpdateForceUsed +0 8ef9 UI_ReadLegalForce +0 9178 UI_UpdateForcePowers +0 9362 UI_SkinColor_HandleKey +0 93b9 UI_ForceSide_HandleKey +0 947e UI_JediNonJedi_HandleKey +0 953d UI_ForceMaxRank_HandleKey +0 95a3 UI_ForcePowerRank_HandleKey +0 96ed UI_ForceConfigHandle +0 9a39 UI_Alloc +0 9a73 UI_InitMemory +0 9a7c UI_OutOfMemory +0 9a82 hashForString +0 9ac2 String_Alloc +0 9b9b String_Report +0 9be4 String_Init +0 9c28 PC_SourceWarning +0 9c58 PC_SourceError +0 9c88 LerpColor +0 9ce3 Float_Parse +0 9d0f PC_Float_Parse +0 9d64 Color_Parse +0 9d91 PC_Color_Parse +0 9dbe Int_Parse +0 9dea PC_Int_Parse +0 9e42 Rect_Parse +0 9e89 PC_Rect_Parse +0 9ed0 String_Parse +0 9efc PC_String_Parse +0 9f71 PC_Script_Parse +0 9ff3 Init_Display +0 9ffa GradientBar_Paint +0 a040 Window_Init +0 a07c Fade +0 a0ed Window_Paint +0 a437 Item_SetScreenCoords +0 a4cb Item_UpdatePosition +0 a51e Menu_UpdatePosition +0 a575 Menu_PostParse +0 a5a1 Menu_ClearFocus +0 a624 IsVisible +0 a647 Rect_ContainsPoint +0 a68c Menu_ItemsMatchingGroup +0 a6e8 Menu_GetMatchingItemByNumber +0 a755 Script_SetColor +0 a7ef Script_SetAsset +0 a808 Script_SetBackground +0 a82a Menu_FindItemByName +0 a879 Script_SetTeamColor +0 a8ae Script_SetItemColor +0 a987 Script_SetItemRect +0 aa05 Menu_ShowItemByName +0 aa77 Menu_FadeItemByName +0 aaf0 Menus_FindByName +0 ab21 Menus_ShowByName +0 ab39 Menus_OpenByName +0 ab42 Menu_RunCloseScript +0 ab71 Menus_CloseByName +0 abd1 Menus_CloseAll +0 ac07 Script_Show +0 ac27 Script_Hide +0 ac47 Script_FadeIn +0 ac67 Script_FadeOut +0 ac87 Script_Open +0 ac9f Script_Close +0 acc9 Menu_TransitionItemByName +0 adb4 Script_Defer +0 addb Script_RunDeferred +0 adf5 Script_Transition +0 ae57 Menu_OrbitItemByName +0 aec4 Script_Orbit +0 af32 Script_SetFocus +0 afbd Script_SetPlayerModel +0 afdb Script_SetPlayerHead +0 aff9 Script_SetCvar +0 b025 Script_SetCvarToCvar +0 b05e Script_Exec +0 b085 Script_Play +0 b0ae Script_playLooped +0 b0da Item_RunScript +0 b177 Item_EnableShowViaCvar +0 b250 Item_SetFocus +0 b3bc Item_TextScroll_MaxScroll +0 b3eb Item_TextScroll_ThumbPosition +0 b435 Item_TextScroll_ThumbDrawPosition +0 b49e Item_TextScroll_OverLB +0 b586 Item_TextScroll_MouseEnter +0 b5b7 Item_TextScroll_HandleKey +0 b74d Item_ListBox_MaxScroll +0 b7a7 Item_ListBox_ThumbPosition +0 b82e Item_ListBox_ThumbDrawPosition +0 b8f3 Item_Slider_ThumbPosition +0 b98b Item_Slider_OverSlider +0 b9c0 Item_ListBox_OverLB +0 bb8b Item_ListBox_MouseEnter +0 bcc0 Item_MouseEnter +0 bde2 Item_MouseLeave +0 be2e Menu_HitTest +0 be6c Item_SetMouseOver +0 be95 Item_OwnerDraw_HandleKey +0 becf Item_ListBox_HandleKey +0 c3ec Item_YesNo_HandleKey +0 c472 Item_Multi_CountSettings +0 c48a Item_Multi_FindCvarByValue +0 c50f Item_Multi_Setting +0 c5a0 Item_Multi_HandleKey +0 c698 Item_TextField_HandleKey +0 ca1c Scroll_TextScroll_AutoFunc +0 ca79 Scroll_TextScroll_ThumbFunc +0 cb68 Scroll_ListBox_AutoFunc +0 cbc5 Scroll_ListBox_ThumbFunc +0 cd4c Scroll_Slider_ThumbFunc +0 cde6 Item_StartCapture +0 cf5b Item_StopCapture +0 cf5e Item_Slider_HandleKey +0 d05a Item_HandleKey +0 d16a Item_Action +0 d181 Menu_SetPrevCursorItem +0 d257 Menu_SetNextCursorItem +0 d324 Window_CloseCinematic +0 d34c Menu_CloseCinematics +0 d3a0 Display_CloseCinematics +0 d3bd Menus_Activate +0 d414 Display_VisibleMenuCount +0 d43e Menus_HandleOOBClick +0 d501 Item_CorrectedTextRect +0 d529 Menu_HandleKey +0 d84d ToWindowCoords +0 d895 Rect_ToWindowCoords +0 d8aa Item_SetTextExtents +0 da4e Item_TextColor +0 db94 Item_Text_AutoWrapped_Paint +0 dd44 Item_Text_Wrapped_Paint +0 de51 Item_Text_Paint +0 df42 Item_TextField_Paint +0 e0b8 Item_YesNo_Paint +0 e1ec Item_Multi_Paint +0 e2da Controls_GetKeyAssignment +0 e338 Controls_GetConfig +0 e36a Controls_SetConfig +0 e3c1 BindingIDFromName +0 e3ee BindingFromName +0 e47f Item_Slider_Paint +0 e582 Item_Bind_Paint +0 e75b Display_KeyBindPending +0 e761 Item_Bind_HandleKey +0 e96c Item_Model_Paint +0 ea9c Item_Image_Paint +0 eae3 Item_TextScroll_Paint +0 ec75 Item_ListBox_Paint +0 f2af Item_OwnerDraw_Paint +0 f575 Item_Paint +0 fb5f Menu_Init +0 fb96 Menu_GetFocusedItem +0 fbd5 Menu_GetFocused +0 fc10 Menu_ScrollFeeder +0 fc63 Menu_SetFeederSelection +0 fcf8 Menus_AnyFullScreenVisible +0 fd2c Menus_ActivateByName +0 fdbb Item_Init +0 fdd4 Menu_HandleMouseMove +0 ff2c Menu_Paint +0 10087 Item_ValidateTypeData +0 1014b KeywordHash_Key +0 101af KeywordHash_Add +0 101d5 KeywordHash_Find +0 10210 ItemParse_name +0 10229 ItemParse_focusSound +0 10251 ItemParse_text +0 1026a ItemParse_descText +0 10283 ItemParse_text2 +0 1029c ItemParse_text2alignx +0 102b5 ItemParse_text2aligny +0 102ce ItemParse_group +0 102e7 ItemParse_asset_model +0 10327 ItemParse_asset_shader +0 1034d ItemParse_model_origin +0 10393 ItemParse_model_fovx +0 103b9 ItemParse_model_fovy +0 103df ItemParse_model_rotation +0 10405 ItemParse_model_angle +0 10429 ItemParse_rect +0 10442 ItemParse_flag +0 104ad ItemParse_style +0 104cb ItemParse_decoration +0 104de ItemParse_notselectable +0 10501 ItemParse_wrapped +0 10514 ItemParse_autowrapped +0 10527 ItemParse_horizontalscroll +0 1053a ItemParse_type +0 10559 ItemParse_elementwidth +0 1057f ItemParse_elementheight +0 105a5 ItemParse_feeder +0 105be ItemParse_elementtype +0 105ef ItemParse_columns +0 10692 ItemParse_border +0 106ab ItemParse_bordersize +0 106c4 ItemParse_visible +0 106ec ItemParse_ownerdraw +0 1070b ItemParse_align +0 10724 ItemParse_textalign +0 10742 ItemParse_textalignx +0 1075b ItemParse_textaligny +0 10774 ItemParse_textscale +0 1078d ItemParse_textstyle +0 107a6 ItemParse_backcolor +0 107d5 ItemParse_forecolor +0 10812 ItemParse_bordercolor +0 10841 ItemParse_outlinecolor +0 1085a ItemParse_background +0 10880 ItemParse_cinematic +0 10899 ItemParse_doubleClick +0 108ca ItemParse_onFocus +0 108e3 ItemParse_leaveFocus +0 108fc ItemParse_mouseEnter +0 10915 ItemParse_mouseExit +0 1092e ItemParse_mouseEnterText +0 10947 ItemParse_mouseExitText +0 10960 ItemParse_action +0 10979 ItemParse_special +0 10992 ItemParse_cvarTest +0 109ab ItemParse_cvar +0 10a0c ItemParse_font +0 10a2b ItemParse_maxChars +0 10a60 ItemParse_maxPaintChars +0 10a95 ItemParse_maxLineChars +0 10aca ItemParse_lineHeight +0 10b00 ItemParse_cvarFloat +0 10b5f ItemParse_cvarStrList +0 10c21 ItemParse_cvarFloatList +0 10cdf ItemParse_addColorRange +0 10d41 ItemParse_ownerdrawFlag +0 10d66 ItemParse_enableCvar +0 10d85 ItemParse_disableCvar +0 10da4 ItemParse_showCvar +0 10dc3 ItemParse_hideCvar +0 10de2 ItemParse_Appearance_slot +0 10dfb Item_SetupKeywordHash +0 10e27 Item_Parse +0 10ea6 Item_TextScroll_BuildLines +0 11048 Item_InitControls +0 11085 MenuParse_font +0 110c8 MenuParse_name +0 110f5 MenuParse_fullscreen +0 11112 MenuParse_rect +0 1112d MenuParse_style +0 1114f MenuParse_visible +0 1117b MenuParse_onOpen +0 11198 MenuParse_onClose +0 111b5 MenuParse_onESC +0 111d2 MenuParse_border +0 111ef MenuParse_borderSize +0 1120c MenuParse_backcolor +0 1123f MenuParse_descAlignment +0 11261 MenuParse_descX +0 1127e MenuParse_descY +0 1129b MenuParse_descScale +0 112b8 MenuParse_descColor +0 112eb MenuParse_forecolor +0 1132c MenuParse_bordercolor +0 1135f MenuParse_focuscolor +0 11392 MenuParse_disablecolor +0 113c5 MenuParse_outlinecolor +0 113e2 MenuParse_background +0 1140c MenuParse_cinematic +0 11429 MenuParse_ownerdrawFlag +0 11452 MenuParse_ownerdraw +0 1146f MenuParse_popup +0 11486 MenuParse_outOfBounds +0 1149d MenuParse_soundLoop +0 114ba MenuParse_fadeClamp +0 114d7 MenuParse_fadeAmount +0 114f4 MenuParse_fadeCycle +0 11511 MenuParse_itemDef +0 11596 MenuParse_appearanceIncrement +0 115b3 Menu_SetupKeywordHash +0 115df Menu_Parse +0 1165e Menu_New +0 11692 Menu_Count +0 11698 Menu_PaintAll +0 1172f Menu_Reset +0 11735 Display_GetContext +0 1173b Display_CaptureItem +0 11770 Display_MouseMove +0 117e8 Display_CursorType +0 11834 Display_HandleKey +0 11861 Window_CacheContents +0 1189a Item_CacheContents +0 118a7 Menu_CacheContents +0 118f3 Display_CacheAll +0 11910 Menu_OverActiveItem +0 119c3 UI_ParseInfos +0 11ab1 UI_LoadArenasFromFile +0 11b31 UI_LoadArenas +0 11d4f UI_LoadBotsFromFile +0 11e00 UI_LoadBots +0 11e81 UI_GetBotInfoByNumber +0 11eac UI_GetBotInfoByName +0 11eeb UI_GetNumBots +0 11ef1 UI_GetBotNameByNumber +0 11f13 BG_LegalizedForcePowers +0 122ef vectoyaw +0 12349 BG_HasYsalamiri +0 12378 BG_CanUseFPNow +0 123f6 BG_FindItemForPowerup +0 12432 BG_FindItemForHoldable +0 1246c BG_FindItemForWeapon +0 1249f BG_FindItem +0 124c8 BG_PlayerTouchesItem +0 12528 BG_ProperForceIndex +0 1254b BG_CycleForce +0 12623 BG_GetItemIndexByTag +0 12653 BG_CycleInven +0 126bf BG_CanItemBeGrabbed +0 12925 BG_EvaluateTrajectory +0 12af3 BG_EvaluateTrajectoryDelta +0 12bed BG_AddPredictableEventToPlayerstate +0 12c28 BG_TouchJumpPad +0 12c8c BG_PlayerStateToEntityState +0 12fa1 BG_PlayerStateToEntityStateExtraPolate +0 132c3 BG_Alloc +0 13303 BG_AllocUnaligned +0 13336 BG_TempAlloc +0 1336e BG_TempFree +0 1339b BG_StringAlloc +0 133be BG_OutOfMemory +0 133d0 swapfunc +0 13457 med3 +0 134da qsort +0 13893 strlen +0 138ae strcat +0 138f1 strcpy +0 13926 strcmp +0 1395f strchr +0 1397e strstr +0 139c4 tolower +0 139dc toupper +0 139f4 memmove +0 13a3b tan +0 13a52 srand +0 13a59 rand +0 13a6e atof +0 13b33 _atof +0 13bfe atoi +0 13c76 _atoi +0 13cf8 abs +0 13d0d fabs +0 13d22 AddInt +0 13dfd AddFloat +0 13f0b AddString +0 13fa2 vsprintf +0 1413a sscanf +0 141a5 Q_rand +0 141ba Q_random +0 141cc Q_crandom +0 141dd VectorCompare +0 14215 VectorLength +0 14248 VectorLengthSquared +0 14274 Distance +0 142b5 DistanceSquared +0 14303 VectorNormalizeFast +0 14362 VectorInverse +0 1438a CrossProduct +0 14403 ClampChar +0 1441a ClampShort +0 14431 DirToByte +0 1448c ByteToDir +0 144aa ColorBytes3 +0 14519 ColorBytes4 +0 145ab NormalizeColor +0 14621 PlaneFromPoints +0 146df RotatePointAroundVector +0 147ea RotateAroundDirection +0 1482e vectoangles +0 148ea AnglesToAxis +0 1491f AxisClear +0 14956 AxisCopy +0 1497a ProjectPointOnPlane +0 14a35 MakeNormalVectors +0 14ae0 VectorRotate +0 14b7d Q_rsqrt +0 14bb4 Q_fabs +0 14bc4 LerpAngle +0 14bf5 AngleSubtract +0 14c1a AnglesSubtract +0 14c68 AngleMod +0 14c7a AngleNormalize360 +0 14c88 AngleNormalize180 +0 14ca3 AngleDelta +0 14cb3 SetPlaneSignbits +0 14ce0 BoxOnPlaneSide +0 150a1 RadiusFromBounds +0 150f4 ClearBounds +0 1512b AddPointToBounds +0 151c4 VectorNormalize +0 15234 VectorNormalize2 +0 152c2 _VectorMA +0 15304 _DotProduct +0 15339 _VectorSubtract +0 15372 _VectorAdd +0 153ab _VectorCopy +0 153d2 _VectorScale +0 15402 Vector4Scale +0 15444 Q_log2 +0 15463 MatrixMultiply +0 15638 AngleVectors +0 15730 PerpendicularVector +0 1579c Rand_Init +0 157a3 flrand +0 157de irand +0 15810 powf +0 15833 GetIDForString +0 15878 GetStringForID +0 158b4 Com_Clamp +0 158ce Q_stristr +0 15959 COM_SkipPath +0 1597d COM_StripExtension +0 159b3 COM_DefaultExtension +0 159fb ShortSwap +0 15a1b ShortNoSwap +0 15a26 LongSwap +0 15a59 LongNoSwap +0 15a5f Long64Swap +0 15a9c Long64NoSwap +0 15aa4 FloatSwap +0 15aba FloatNoSwap +0 15ac1 COM_BeginParseSession +0 15ad3 COM_GetCurrentParseLine +0 15ad9 COM_Parse +0 15ae8 COM_ParseError +0 15b08 COM_ParseWarning +0 15b28 SkipWhitespace +0 15b5f COM_Compress +0 15cb2 COM_ParseExt +0 15dfe COM_ParseString +0 15e1f COM_ParseInt +0 15e4c COM_ParseFloat +0 15e79 COM_ParseVec4 +0 15ea6 COM_MatchToken +0 15ecf SkipBracedSection +0 15f0d SkipRestOfLine +0 15f45 Parse1DMatrix +0 15f84 Parse2DMatrix +0 15fbf Parse3DMatrix +0 16004 Q_isprint +0 16019 Q_islower +0 1602e Q_isupper +0 16043 Q_isalpha +0 16064 Q_strrchr +0 16098 Q_strncpyz +0 160d3 Q_stricmpn +0 1615e Q_strncmp +0 161b0 Q_stricmp +0 161d8 Q_strlwr +0 161fe Q_strupr +0 16224 Q_strcat +0 16250 Q_PrintStrlen +0 162a8 Q_CleanStr +0 16316 Com_sprintf +0 16355 va +0 16382 Info_ValueForKey +0 16462 Info_NextPair +0 16500 Info_RemoveKey +0 165d0 Info_RemoveKey_Big +0 166a0 Info_Validate +0 166c7 Info_SetValueForKey +0 16797 Info_SetValueForKey_Big +0 1685f Q_irand +1 44 numServerFilters +1 48 skillLevels +1 60 teamArenaGameTypes +1 30 uiSkinColor +1 34 serverFilters +1 5c numSkillLevels +1 88 numTeamArenaGameTypes +1 8c netnames +1 9c gamecodetoui +1 b8 uitogamecode +1 f4 frameCount +1 f8 defaultMenu +1 fc handicapValues +1 150 updateModel +1 154 q3Model +1 5a0 gUISelectedMap +1 5a8 serverStatusCvars +1 694 cvarTable +1 de4 cvarTableSize +1 de8 newUI +1 dec uiForceSide +1 df0 uiJediNonJedi +1 df4 uiForceRank +1 df8 uiMaxRank +1 dfc uiMaxPoints +1 e00 uiForceUsed +1 e04 uiForceAvailable +1 e08 gTouchedForce +1 e0c uiForcePowersDisabled +1 e54 uiForcePowersRank +1 e9c uiForcePowerDarkLight +1 ef4 gCustRank +1 ef8 gCustSide +1 efc gCustPowersRank +1 f44 captureFunc +1 f48 captureData +1 f4c itemCapture +1 f50 DC +1 f54 g_waitingForKey +1 f58 g_editingField +1 f5c g_bindItem +1 f60 g_editItem +1 f64 menuCount +1 f68 openMenuCount +1 f6c debugMode +1 f70 lastListBoxClickTime +1 f74 itemFlags +1 f84 styles +1 fa0 alignment +1 fb0 types +1 ff0 strPoolIndex +1 ff4 strHandleCount +1 1000 FPMessageTime +1 1004 ui_deferredScriptItem +1 1008 commandList +1 10c8 scriptCommandCount +1 117c g_bindings +1 d4 numNetSources +1 1a4c itemParseKeywords +1 1dac menuParseKeywords +1 1f60 forceMasteryLevels +1 1f80 forceMasteryPoints +1 1fa0 bgForcePowerCost +1 20c0 forcePowerSorted +1 2108 forcePowerDarkLight +1 2150 WeaponReadyAnim +1 2190 WeaponAttackAnim +1 21d0 bg_itemlist +1 2a8c bg_numItems +1 2ae4 eventnames +1 2c9c bg_poolSize +1 2ca0 bg_poolTail +1 2ca4 WP_MuzzlePoint +1 2d64 weaponData +1 30e4 ammoData +1 310c randSeed +1 3180 vec3_origin +1 318c axisDefault +1 31b0 colorBlack +1 31c0 colorRed +1 31d0 colorGreen +1 31e0 colorBlue +1 31f0 colorYellow +1 3200 colorMagenta +1 3210 colorCyan +1 3220 colorWhite +1 3230 colorLtGrey +1 3240 colorMdGrey +1 3250 colorDkGrey +1 3260 colorLtBlue +1 3270 colorDkBlue +1 3280 g_color_table +1 3300 bytedirs +1 3ab8 holdrand +1 19d4 g_bindCount +2 0 holdSPString +2 4af6fc _stackStart +2 4bf6fc _stackEnd +3 8d60 s_language +3 8e70 ui_realWarmUp +3 8f80 ui_realCaptureLimit +3 9090 ui_recordSPDemo +3 91a0 ui_hudFiles +3 92b0 ui_Q3Model +3 93c0 ui_findPlayer +3 94d0 ui_scoreCaptures +3 95e0 ui_teamName +3 96f0 ui_blueteam8 +3 9800 ui_blueteam7 +3 9910 ui_blueteam6 +3 9a20 ui_blueteam5 +3 9b30 ui_blueteam4 +3 9c40 ui_blueteam3 +3 9d50 ui_blueteam2 +3 9e60 ui_blueteam1 +3 9f70 ui_blueteam +3 a080 ui_redteam8 +3 a190 ui_redteam7 +3 a2a0 ui_redteam6 +3 a3b0 ui_redteam5 +3 a4c0 ui_redteam4 +3 a5d0 ui_redteam3 +3 a6e0 ui_redteam2 +3 a7f0 ui_redteam1 +3 a900 ui_redteam +3 aa10 lastLoadingText +3 ae10 lastConnState +3 ae14 parsedFPMessage +3 b214 ui_rankChange +3 b324 startTime +3 b328 ui_initialized +3 b438 ui_debug +3 b548 uiInfo +3 2292c ui_serverStatusTimeOut +3 22a3c ui_bigFont +3 22b4c ui_smallFont +3 22c5c ui_scoreTime +3 22d6c ui_scoreShutoutBonus +3 22e7c ui_scoreSkillBonus +3 22f8c ui_scoreTimeBonus +3 2309c ui_scoreBase +3 231ac ui_scoreTeam +3 232bc ui_scorePerfect +3 233cc ui_scoreScore +3 234dc ui_scoreGauntlets +3 235ec ui_scoreAssists +3 236fc ui_scoreDefends +3 2380c ui_scoreExcellents +3 2391c ui_scoreImpressives +3 23a2c ui_scoreAccuracy +3 23b3c ui_singlePlayerActive +3 23c4c ui_lastServerRefresh_3 +3 23d5c ui_lastServerRefresh_2 +3 23e6c ui_lastServerRefresh_1 +3 23f7c ui_lastServerRefresh_0 +3 2408c ui_selectedPlayerName +3 2419c ui_selectedPlayer +3 242ac ui_currentOpponent +3 243bc ui_mapIndex +3 244cc ui_currentNetMap +3 245dc ui_currentMap +3 246ec ui_currentTier +3 247fc ui_menuFiles +3 2490c ui_opponentName +3 24a1c ui_dedicated +3 24b2c ui_serverFilterType +3 24c3c ui_netSource +3 24d4c ui_joinGameType +3 24e5c ui_actualNetGameType +3 24f6c ui_netGameType +3 2507c ui_gameType +3 2518c ui_fragLimit +3 2529c ui_captureLimit +3 253ac ui_cdkeychecked +3 254bc ui_server16 +3 255cc ui_server15 +3 256dc ui_server14 +3 257ec ui_server13 +3 258fc ui_server12 +3 25a0c ui_server11 +3 25b1c ui_server10 +3 25c2c ui_server9 +3 25d3c ui_server8 +3 25e4c ui_server7 +3 25f5c ui_server6 +3 2606c ui_server5 +3 2617c ui_server4 +3 2628c ui_server3 +3 2639c ui_server2 +3 264ac ui_server1 +3 265bc ui_marks +3 266cc ui_drawCrosshairNames +3 267dc ui_drawCrosshair +3 268ec ui_browserShowEmpty +3 269fc ui_browserShowFull +3 26b0c ui_browserSortKey +3 26c1c ui_browserGameType +3 26d2c ui_browserMaster +3 26e3c ui_spSelection +3 26f4c ui_spSkill +3 2705c ui_spVideos +3 2716c ui_spAwards +3 2727c ui_spScores5 +3 2738c ui_spScores4 +3 2749c ui_spScores3 +3 275ac ui_spScores2 +3 276bc ui_spScores1 +3 277cc ui_botsFile +3 278dc ui_arenasFile +3 279ec ui_ctf_friendly +3 27afc ui_ctf_timelimit +3 27c0c ui_ctf_capturelimit +3 27d1c ui_team_friendly +3 27e2c ui_team_timelimit +3 27f3c ui_team_fraglimit +3 2804c ui_selectedModelIndex +3 2815c ui_tourney_timelimit +3 2826c ui_tourney_fraglimit +3 2837c ui_ffa_timelimit +3 2848c ui_ffa_fraglimit +3 28d9c m_entersound +3 28da0 uiForceStarShaders +3 28de8 ui_forcePowerDisable +3 28ef8 ui_freeSaber +3 29008 uiSaberColorShaders +3 2b030 menuParseKeywordHash +3 2b830 itemParseKeywordHash +3 2c030 g_nameBind2 +3 2c050 g_nameBind1 +3 2c070 ui_deferredScript +3 2c870 strHandle +3 2e870 strPool +3 8e870 outOfMemory +3 8e874 allocPoint +3 8e878 memoryPool +3 28e878 menuStack +3 28e8b8 Menus +3 2a34b8 scrollInfo +3 2a34d8 ui_arenaInfos +3 2a44d8 ui_numArenas +3 2a44dc ui_botInfos +3 2a54dc ui_numBots +3 2a54e0 bg_pool +3 4aeef8 com_lines +3 4aeefc com_parsename +3 4af2fc com_token diff --git a/code/base/vm/ui.qvm b/code/base/vm/ui.qvm new file mode 100644 index 0000000..1aa88c5 Binary files /dev/null and b/code/base/vm/ui.qvm differ diff --git a/code/buildvms.bat b/code/buildvms.bat new file mode 100644 index 0000000..64ea829 --- /dev/null +++ b/code/buildvms.bat @@ -0,0 +1,8 @@ +set include= +cd game +call game +cd ..\cgame +call cgame +cd ..\ui +call ui +cd .. diff --git a/code/cgame/JK2_cgame (2).def b/code/cgame/JK2_cgame (2).def new file mode 100644 index 0000000..2ee748e --- /dev/null +++ b/code/cgame/JK2_cgame (2).def @@ -0,0 +1,3 @@ +EXPORTS + vmMain + dllEntry diff --git a/code/cgame/JK2_cgame (2).dsp b/code/cgame/JK2_cgame (2).dsp new file mode 100644 index 0000000..2ab27f0 --- /dev/null +++ b/code/cgame/JK2_cgame (2).dsp @@ -0,0 +1,402 @@ +# Microsoft Developer Studio Project File - Name="JK2cgame" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=JK2cgame - Win32 Release JK2 +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "JK2_cgame.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "JK2_cgame.mak" CFG="JK2cgame - Win32 Release JK2" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "JK2cgame - Win32 Release JK2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "JK2cgame - Win32 Debug JK2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "JK2cgame - Win32 Final JK2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "JK2cgame - Win32 Release JK2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "JK2cgame___Win32_Release_TA" +# PROP BASE Intermediate_Dir "JK2cgame___Win32_Release_TA" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../Release" +# PROP Intermediate_Dir "../Release/JK2cgame" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /W4 /GX /O2 /D "WIN32" /D "NDebug" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /G6 /W4 /GX /Zi /O2 /I ".." /I "./../game" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_JK2" /YX /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDebug" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDebug" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDebug" +# ADD RSC /l 0x409 /d "NDebug" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /machine:I386 /def:".\JK2_cgame.def" /out:"../Release/cgamex86.dll" +# SUBTRACT BASE LINK32 /debug +# ADD LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /debug /machine:I386 /def:".\JK2_cgame.def" /out:"../Release/cgamex86.dll" + +!ELSEIF "$(CFG)" == "JK2cgame - Win32 Debug JK2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "JK2cgame___Win32_Debug_TA" +# PROP BASE Intermediate_Dir "JK2cgame___Win32_Debug_TA" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../Debug" +# PROP Intermediate_Dir "../Debug/JK2cgame" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_WINDOWS" /FR /YX /FD /c +# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "./../game" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_JK2" /D "JK2AWARDS" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_Debug" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_Debug" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_Debug" +# ADD RSC /l 0x409 /d "_Debug" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /debug /machine:I386 /out:"..\Debug/cgamex86.dll" +# SUBTRACT BASE LINK32 /profile /nodefaultlib +# ADD LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /debug /machine:I386 /def:".\JK2_cgame.def" /out:"..\Debug\cgamex86.dll" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "JK2cgame - Win32 Final JK2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "../Final" +# PROP BASE Intermediate_Dir "../Final/JK2cgame" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../Final" +# PROP Intermediate_Dir "../Final/JK2cgame" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /W4 /GX /Zi /O2 /I ".." /I "../../jk2/game" /D "NDebug" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_JK2" /YX /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /G6 /W4 /GX /O2 /I ".." /I "./../game" /D "NDEBUG" /D "_WINDOWS" /D "MISSIONPACK" /D "WIN32" /D "_JK2" /D "FINAL_BUILD" /YX /FD /c +# ADD BASE MTL /nologo /D "NDebug" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDebug" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDebug" +# ADD RSC /l 0x409 /d "NDebug" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /machine:I386 /def:".\JK2_cgame.def" /out:"../Final/cgamex86.dll" +# ADD LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /machine:I386 /def:".\JK2_cgame.def" /out:"../Final/cgamex86.dll" + +!ENDIF + +# Begin Target + +# Name "JK2cgame - Win32 Release JK2" +# Name "JK2cgame - Win32 Debug JK2" +# Name "JK2cgame - Win32 Final JK2" +# Begin Group "Source Files" + +# PROP Default_Filter "c" +# Begin Source File + +SOURCE=..\game\bg_lib.c +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=..\game\bg_misc.c +# End Source File +# Begin Source File + +SOURCE=..\game\bg_panimate.c +# End Source File +# Begin Source File + +SOURCE=..\game\bg_pmove.c +# End Source File +# Begin Source File + +SOURCE=..\game\bg_saber.c +# End Source File +# Begin Source File + +SOURCE=..\game\bg_slidemove.c +# End Source File +# Begin Source File + +SOURCE=..\game\bg_weapons.c +# End Source File +# Begin Source File + +SOURCE=.\cg_consolecmds.c +# End Source File +# Begin Source File + +SOURCE=.\cg_draw.c +# End Source File +# Begin Source File + +SOURCE=.\cg_drawtools.c +# End Source File +# Begin Source File + +SOURCE=.\cg_effects.c +# End Source File +# Begin Source File + +SOURCE=.\cg_ents.c +# End Source File +# Begin Source File + +SOURCE=.\cg_event.c +# End Source File +# Begin Source File + +SOURCE=.\cg_info.c +# End Source File +# Begin Source File + +SOURCE=.\cg_light.c +# End Source File +# Begin Source File + +SOURCE=.\cg_localents.c +# End Source File +# Begin Source File + +SOURCE=.\cg_main.c +# End Source File +# Begin Source File + +SOURCE=.\cg_marks.c +# End Source File +# Begin Source File + +SOURCE=.\cg_newDraw.c +# End Source File +# Begin Source File + +SOURCE=.\cg_players.c +# End Source File +# Begin Source File + +SOURCE=.\cg_playerstate.c +# End Source File +# Begin Source File + +SOURCE=.\cg_predict.c +# End Source File +# Begin Source File + +SOURCE=.\cg_saga.c +# End Source File +# Begin Source File + +SOURCE=.\cg_scoreboard.c +# End Source File +# Begin Source File + +SOURCE=.\cg_servercmds.c +# End Source File +# Begin Source File + +SOURCE=.\cg_snapshot.c +# End Source File +# Begin Source File + +SOURCE=.\cg_syscalls.c +# End Source File +# Begin Source File + +SOURCE=.\cg_turret.c +# End Source File +# Begin Source File + +SOURCE=.\cg_view.c +# End Source File +# Begin Source File + +SOURCE=.\cg_weaponinit.c +# End Source File +# Begin Source File + +SOURCE=.\cg_weapons.c +# End Source File +# Begin Source File + +SOURCE=.\fx_blaster.c +# End Source File +# Begin Source File + +SOURCE=.\fx_bowcaster.c +# End Source File +# Begin Source File + +SOURCE=.\fx_bryarpistol.c +# End Source File +# Begin Source File + +SOURCE=.\fx_demp2.c +# End Source File +# Begin Source File + +SOURCE=.\fx_disruptor.c +# End Source File +# Begin Source File + +SOURCE=.\fx_flechette.c +# End Source File +# Begin Source File + +SOURCE=.\fx_force.c +# End Source File +# Begin Source File + +SOURCE=.\fx_heavyrepeater.c +# End Source File +# Begin Source File + +SOURCE=.\fx_rocketlauncher.c +# End Source File +# Begin Source File + +SOURCE=..\game\q_math.c +# End Source File +# Begin Source File + +SOURCE=..\game\q_shared.c +# End Source File +# Begin Source File + +SOURCE=..\ui\ui_shared.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h" +# Begin Source File + +SOURCE=..\game\anims.h +# End Source File +# Begin Source File + +SOURCE=.\animtable.h +# End Source File +# Begin Source File + +SOURCE=..\game\bg_local.h +# End Source File +# Begin Source File + +SOURCE=..\game\bg_public.h +# End Source File +# Begin Source File + +SOURCE=..\game\bg_saga.h +# End Source File +# Begin Source File + +SOURCE=..\game\bg_weapons.h +# End Source File +# Begin Source File + +SOURCE=.\cg_lights.h +# End Source File +# Begin Source File + +SOURCE=.\cg_local.h +# End Source File +# Begin Source File + +SOURCE=.\cg_public.h +# End Source File +# Begin Source File + +SOURCE=..\qcommon\disablewarnings.h +# End Source File +# Begin Source File + +SOURCE=.\fx_local.h +# End Source File +# Begin Source File + +SOURCE=..\ghoul2\G2.h +# End Source File +# Begin Source File + +SOURCE=.\JK2_cgame.def +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=..\ui\keycodes.h +# End Source File +# Begin Source File + +SOURCE=..\..\ui\menudef.h +# End Source File +# Begin Source File + +SOURCE=..\game\q_shared.h +# End Source File +# Begin Source File + +SOURCE=..\qcommon\qfiles.h +# End Source File +# Begin Source File + +SOURCE=..\game\surfaceflags.h +# End Source File +# Begin Source File + +SOURCE=..\qcommon\tags.h +# End Source File +# Begin Source File + +SOURCE=.\tr_types.h +# End Source File +# Begin Source File + +SOURCE=..\ui\ui_shared.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\cgame.bat +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\cgame.q3asm +# PROP Exclude_From_Build 1 +# End Source File +# End Target +# End Project diff --git a/code/cgame/JK2_cgame (2).vcproj b/code/cgame/JK2_cgame (2).vcproj new file mode 100644 index 0000000..30e1531 --- /dev/null +++ b/code/cgame/JK2_cgame (2).vcproj @@ -0,0 +1,1614 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/cgame/JK2_cgame.def b/code/cgame/JK2_cgame.def new file mode 100644 index 0000000..2ee748e --- /dev/null +++ b/code/cgame/JK2_cgame.def @@ -0,0 +1,3 @@ +EXPORTS + vmMain + dllEntry diff --git a/code/cgame/JK2_cgame.dsp b/code/cgame/JK2_cgame.dsp new file mode 100644 index 0000000..2ab27f0 --- /dev/null +++ b/code/cgame/JK2_cgame.dsp @@ -0,0 +1,402 @@ +# Microsoft Developer Studio Project File - Name="JK2cgame" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=JK2cgame - Win32 Release JK2 +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "JK2_cgame.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "JK2_cgame.mak" CFG="JK2cgame - Win32 Release JK2" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "JK2cgame - Win32 Release JK2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "JK2cgame - Win32 Debug JK2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "JK2cgame - Win32 Final JK2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "JK2cgame - Win32 Release JK2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "JK2cgame___Win32_Release_TA" +# PROP BASE Intermediate_Dir "JK2cgame___Win32_Release_TA" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../Release" +# PROP Intermediate_Dir "../Release/JK2cgame" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /W4 /GX /O2 /D "WIN32" /D "NDebug" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /G6 /W4 /GX /Zi /O2 /I ".." /I "./../game" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_JK2" /YX /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDebug" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDebug" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDebug" +# ADD RSC /l 0x409 /d "NDebug" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /machine:I386 /def:".\JK2_cgame.def" /out:"../Release/cgamex86.dll" +# SUBTRACT BASE LINK32 /debug +# ADD LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /debug /machine:I386 /def:".\JK2_cgame.def" /out:"../Release/cgamex86.dll" + +!ELSEIF "$(CFG)" == "JK2cgame - Win32 Debug JK2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "JK2cgame___Win32_Debug_TA" +# PROP BASE Intermediate_Dir "JK2cgame___Win32_Debug_TA" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../Debug" +# PROP Intermediate_Dir "../Debug/JK2cgame" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_WINDOWS" /FR /YX /FD /c +# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "./../game" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_JK2" /D "JK2AWARDS" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_Debug" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_Debug" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_Debug" +# ADD RSC /l 0x409 /d "_Debug" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /debug /machine:I386 /out:"..\Debug/cgamex86.dll" +# SUBTRACT BASE LINK32 /profile /nodefaultlib +# ADD LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /debug /machine:I386 /def:".\JK2_cgame.def" /out:"..\Debug\cgamex86.dll" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "JK2cgame - Win32 Final JK2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "../Final" +# PROP BASE Intermediate_Dir "../Final/JK2cgame" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../Final" +# PROP Intermediate_Dir "../Final/JK2cgame" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /W4 /GX /Zi /O2 /I ".." /I "../../jk2/game" /D "NDebug" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_JK2" /YX /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /G6 /W4 /GX /O2 /I ".." /I "./../game" /D "NDEBUG" /D "_WINDOWS" /D "MISSIONPACK" /D "WIN32" /D "_JK2" /D "FINAL_BUILD" /YX /FD /c +# ADD BASE MTL /nologo /D "NDebug" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDebug" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDebug" +# ADD RSC /l 0x409 /d "NDebug" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /machine:I386 /def:".\JK2_cgame.def" /out:"../Final/cgamex86.dll" +# ADD LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map /machine:I386 /def:".\JK2_cgame.def" /out:"../Final/cgamex86.dll" + +!ENDIF + +# Begin Target + +# Name "JK2cgame - Win32 Release JK2" +# Name "JK2cgame - Win32 Debug JK2" +# Name "JK2cgame - Win32 Final JK2" +# Begin Group "Source Files" + +# PROP Default_Filter "c" +# Begin Source File + +SOURCE=..\game\bg_lib.c +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=..\game\bg_misc.c +# End Source File +# Begin Source File + +SOURCE=..\game\bg_panimate.c +# End Source File +# Begin Source File + +SOURCE=..\game\bg_pmove.c +# End Source File +# Begin Source File + +SOURCE=..\game\bg_saber.c +# End Source File +# Begin Source File + +SOURCE=..\game\bg_slidemove.c +# End Source File +# Begin Source File + +SOURCE=..\game\bg_weapons.c +# End Source File +# Begin Source File + +SOURCE=.\cg_consolecmds.c +# End Source File +# Begin Source File + +SOURCE=.\cg_draw.c +# End Source File +# Begin Source File + +SOURCE=.\cg_drawtools.c +# End Source File +# Begin Source File + +SOURCE=.\cg_effects.c +# End Source File +# Begin Source File + +SOURCE=.\cg_ents.c +# End Source File +# Begin Source File + +SOURCE=.\cg_event.c +# End Source File +# Begin Source File + +SOURCE=.\cg_info.c +# End Source File +# Begin Source File + +SOURCE=.\cg_light.c +# End Source File +# Begin Source File + +SOURCE=.\cg_localents.c +# End Source File +# Begin Source File + +SOURCE=.\cg_main.c +# End Source File +# Begin Source File + +SOURCE=.\cg_marks.c +# End Source File +# Begin Source File + +SOURCE=.\cg_newDraw.c +# End Source File +# Begin Source File + +SOURCE=.\cg_players.c +# End Source File +# Begin Source File + +SOURCE=.\cg_playerstate.c +# End Source File +# Begin Source File + +SOURCE=.\cg_predict.c +# End Source File +# Begin Source File + +SOURCE=.\cg_saga.c +# End Source File +# Begin Source File + +SOURCE=.\cg_scoreboard.c +# End Source File +# Begin Source File + +SOURCE=.\cg_servercmds.c +# End Source File +# Begin Source File + +SOURCE=.\cg_snapshot.c +# End Source File +# Begin Source File + +SOURCE=.\cg_syscalls.c +# End Source File +# Begin Source File + +SOURCE=.\cg_turret.c +# End Source File +# Begin Source File + +SOURCE=.\cg_view.c +# End Source File +# Begin Source File + +SOURCE=.\cg_weaponinit.c +# End Source File +# Begin Source File + +SOURCE=.\cg_weapons.c +# End Source File +# Begin Source File + +SOURCE=.\fx_blaster.c +# End Source File +# Begin Source File + +SOURCE=.\fx_bowcaster.c +# End Source File +# Begin Source File + +SOURCE=.\fx_bryarpistol.c +# End Source File +# Begin Source File + +SOURCE=.\fx_demp2.c +# End Source File +# Begin Source File + +SOURCE=.\fx_disruptor.c +# End Source File +# Begin Source File + +SOURCE=.\fx_flechette.c +# End Source File +# Begin Source File + +SOURCE=.\fx_force.c +# End Source File +# Begin Source File + +SOURCE=.\fx_heavyrepeater.c +# End Source File +# Begin Source File + +SOURCE=.\fx_rocketlauncher.c +# End Source File +# Begin Source File + +SOURCE=..\game\q_math.c +# End Source File +# Begin Source File + +SOURCE=..\game\q_shared.c +# End Source File +# Begin Source File + +SOURCE=..\ui\ui_shared.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h" +# Begin Source File + +SOURCE=..\game\anims.h +# End Source File +# Begin Source File + +SOURCE=.\animtable.h +# End Source File +# Begin Source File + +SOURCE=..\game\bg_local.h +# End Source File +# Begin Source File + +SOURCE=..\game\bg_public.h +# End Source File +# Begin Source File + +SOURCE=..\game\bg_saga.h +# End Source File +# Begin Source File + +SOURCE=..\game\bg_weapons.h +# End Source File +# Begin Source File + +SOURCE=.\cg_lights.h +# End Source File +# Begin Source File + +SOURCE=.\cg_local.h +# End Source File +# Begin Source File + +SOURCE=.\cg_public.h +# End Source File +# Begin Source File + +SOURCE=..\qcommon\disablewarnings.h +# End Source File +# Begin Source File + +SOURCE=.\fx_local.h +# End Source File +# Begin Source File + +SOURCE=..\ghoul2\G2.h +# End Source File +# Begin Source File + +SOURCE=.\JK2_cgame.def +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=..\ui\keycodes.h +# End Source File +# Begin Source File + +SOURCE=..\..\ui\menudef.h +# End Source File +# Begin Source File + +SOURCE=..\game\q_shared.h +# End Source File +# Begin Source File + +SOURCE=..\qcommon\qfiles.h +# End Source File +# Begin Source File + +SOURCE=..\game\surfaceflags.h +# End Source File +# Begin Source File + +SOURCE=..\qcommon\tags.h +# End Source File +# Begin Source File + +SOURCE=.\tr_types.h +# End Source File +# Begin Source File + +SOURCE=..\ui\ui_shared.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\cgame.bat +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\cgame.q3asm +# PROP Exclude_From_Build 1 +# End Source File +# End Target +# End Project diff --git a/code/cgame/JK2_cgame.vcproj b/code/cgame/JK2_cgame.vcproj new file mode 100644 index 0000000..30e1531 --- /dev/null +++ b/code/cgame/JK2_cgame.vcproj @@ -0,0 +1,1614 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/cgame/animtable (2).h b/code/cgame/animtable (2).h new file mode 100644 index 0000000..8ef31d1 --- /dev/null +++ b/code/cgame/animtable (2).h @@ -0,0 +1,1368 @@ +// special file included only by cg_players.cpp & ui_players.cpp +// +// moved it from the original header file for PCH reasons... +// + +stringID_table_t animTable [MAX_ANIMATIONS+1] = +{ + //================================================= + //ANIMS IN WHICH UPPER AND LOWER OBJECTS ARE IN MD3 + //================================================= + ENUM2STRING(BOTH_1CRUFTFORGIL), //# G2 cannot have a reverse anim at beginning of file + //# #sep ENUM2STRING(BOTH_ DEATHS + ENUM2STRING(BOTH_DEATH1), //# First Death anim + ENUM2STRING(BOTH_DEATH2), //# Second Death anim + ENUM2STRING(BOTH_DEATH3), //# Third Death anim + ENUM2STRING(BOTH_DEATH4), //# Fourth Death anim + ENUM2STRING(BOTH_DEATH5), //# Fifth Death anim + ENUM2STRING(BOTH_DEATH6), //# Sixth Death anim + ENUM2STRING(BOTH_DEATH7), //# Seventh Death anim + ENUM2STRING(BOTH_DEATH8), //# + ENUM2STRING(BOTH_DEATH9), //# + ENUM2STRING(BOTH_DEATH10), //# + ENUM2STRING(BOTH_DEATH11), //# + ENUM2STRING(BOTH_DEATH12), //# + ENUM2STRING(BOTH_DEATH13), //# + ENUM2STRING(BOTH_DEATH14), //# + ENUM2STRING(BOTH_DEATH15), //# + ENUM2STRING(BOTH_DEATH16), //# + ENUM2STRING(BOTH_DEATH17), //# + ENUM2STRING(BOTH_DEATH18), //# + ENUM2STRING(BOTH_DEATH19), //# + ENUM2STRING(BOTH_DEATH20), //# + ENUM2STRING(BOTH_DEATH21), //# + ENUM2STRING(BOTH_DEATH22), //# + ENUM2STRING(BOTH_DEATH23), //# + ENUM2STRING(BOTH_DEATH24), //# + ENUM2STRING(BOTH_DEATH25), //# + + ENUM2STRING(BOTH_DEATHFORWARD1), //# First Death in which they get thrown forward + ENUM2STRING(BOTH_DEATHFORWARD2), //# Second Death in which they get thrown forward + ENUM2STRING(BOTH_DEATHFORWARD3), //# Tavion's falling in cin# 23 + ENUM2STRING(BOTH_DEATHBACKWARD1), //# First Death in which they get thrown backward + ENUM2STRING(BOTH_DEATHBACKWARD2), //# Second Death in which they get thrown backward + + ENUM2STRING(BOTH_DEATH1IDLE), //# Idle while close to death + ENUM2STRING(BOTH_LYINGDEATH1), //# Death to play when killed lying down + ENUM2STRING(BOTH_STUMBLEDEATH1), //# Stumble forward and fall face first death + ENUM2STRING(BOTH_FALLDEATH1), //# Fall forward off a high cliff and splat death - start + ENUM2STRING(BOTH_FALLDEATH1INAIR), //# Fall forward off a high cliff and splat death - loop + ENUM2STRING(BOTH_FALLDEATH1LAND), //# Fall forward off a high cliff and splat death - hit bottom + ENUM2STRING(BOTH_DEATH_ROLL), //# Death anim from a roll + ENUM2STRING(BOTH_DEATH_FLIP), //# Death anim from a flip + ENUM2STRING(BOTH_DEATH_SPIN_90_R), //# Death anim when facing 90 degrees right + ENUM2STRING(BOTH_DEATH_SPIN_90_L), //# Death anim when facing 90 degrees left + ENUM2STRING(BOTH_DEATH_SPIN_180), //# Death anim when facing backwards + ENUM2STRING(BOTH_DEATH_LYING_UP), //# Death anim when lying on back + ENUM2STRING(BOTH_DEATH_LYING_DN), //# Death anim when lying on front + ENUM2STRING(BOTH_DEATH_FALLING_DN), //# Death anim when falling on face + ENUM2STRING(BOTH_DEATH_FALLING_UP), //# Death anim when falling on back + ENUM2STRING(BOTH_DEATH_CROUCHED), //# Death anim when crouched + //# #sep ENUM2STRING(BOTH_ DEAD POSES # Should be last frame of corresponding previous anims + ENUM2STRING(BOTH_DEAD1), //# First Death finished pose + ENUM2STRING(BOTH_DEAD2), //# Second Death finished pose + ENUM2STRING(BOTH_DEAD3), //# Third Death finished pose + ENUM2STRING(BOTH_DEAD4), //# Fourth Death finished pose + ENUM2STRING(BOTH_DEAD5), //# Fifth Death finished pose + ENUM2STRING(BOTH_DEAD6), //# Sixth Death finished pose + ENUM2STRING(BOTH_DEAD7), //# Seventh Death finished pose + ENUM2STRING(BOTH_DEAD8), //# + ENUM2STRING(BOTH_DEAD9), //# + ENUM2STRING(BOTH_DEAD10), //# + ENUM2STRING(BOTH_DEAD11), //# + ENUM2STRING(BOTH_DEAD12), //# + ENUM2STRING(BOTH_DEAD13), //# + ENUM2STRING(BOTH_DEAD14), //# + ENUM2STRING(BOTH_DEAD15), //# + ENUM2STRING(BOTH_DEAD16), //# + ENUM2STRING(BOTH_DEAD17), //# + ENUM2STRING(BOTH_DEAD18), //# + ENUM2STRING(BOTH_DEAD19), //# + ENUM2STRING(BOTH_DEAD20), //# + ENUM2STRING(BOTH_DEAD21), //# + ENUM2STRING(BOTH_DEAD22), //# + ENUM2STRING(BOTH_DEAD23), //# + ENUM2STRING(BOTH_DEAD24), //# + ENUM2STRING(BOTH_DEAD25), //# + ENUM2STRING(BOTH_DEADFORWARD1), //# First thrown forward death finished pose + ENUM2STRING(BOTH_DEADFORWARD2), //# Second thrown forward death finished pose + ENUM2STRING(BOTH_DEADBACKWARD1), //# First thrown backward death finished pose + ENUM2STRING(BOTH_DEADBACKWARD2), //# Second thrown backward death finished pose + ENUM2STRING(BOTH_LYINGDEAD1), //# Killed lying down death finished pose + ENUM2STRING(BOTH_STUMBLEDEAD1), //# Stumble forward death finished pose + ENUM2STRING(BOTH_FALLDEAD1LAND), //# Fall forward and splat death finished pose + //# #sep ENUM2STRING(BOTH_ DEAD TWITCH/FLOP # React to being shot from death poses + ENUM2STRING(BOTH_DEADFLOP1), //# React to being shot from First Death finished pose + ENUM2STRING(BOTH_DEADFLOP2), //# React to being shot from Second Death finished pose + ENUM2STRING(BOTH_DEADFLOP3), //# React to being shot from Third Death finished pose + ENUM2STRING(BOTH_DEADFLOP4), //# React to being shot from Fourth Death finished pose + ENUM2STRING(BOTH_DEADFLOP5), //# React to being shot from Fifth Death finished pose + ENUM2STRING(BOTH_DEADFORWARD1_FLOP), //# React to being shot First thrown forward death finished pose + ENUM2STRING(BOTH_DEADFORWARD2_FLOP), //# React to being shot Second thrown forward death finished pose + ENUM2STRING(BOTH_DEADBACKWARD1_FLOP), //# React to being shot First thrown backward death finished pose + ENUM2STRING(BOTH_DEADBACKWARD2_FLOP), //# React to being shot Second thrown backward death finished pose + ENUM2STRING(BOTH_LYINGDEAD1_FLOP), //# React to being shot Killed lying down death finished pose + ENUM2STRING(BOTH_STUMBLEDEAD1_FLOP), //# React to being shot Stumble forward death finished pose + ENUM2STRING(BOTH_FALLDEAD1_FLOP), //# React to being shot Fall forward and splat death finished pose + ENUM2STRING(BOTH_DISMEMBER_HEAD1), //# + ENUM2STRING(BOTH_DISMEMBER_TORSO1), //# + ENUM2STRING(BOTH_DISMEMBER_LLEG), //# + ENUM2STRING(BOTH_DISMEMBER_RLEG), //# + ENUM2STRING(BOTH_DISMEMBER_RARM), //# + ENUM2STRING(BOTH_DISMEMBER_LARM), //# + //# #sep ENUM2STRING(BOTH_ PAINS + ENUM2STRING(BOTH_PAIN1), //# First take pain anim + ENUM2STRING(BOTH_PAIN2), //# Second take pain anim + ENUM2STRING(BOTH_PAIN3), //# Third take pain anim + ENUM2STRING(BOTH_PAIN4), //# Fourth take pain anim + ENUM2STRING(BOTH_PAIN5), //# Fifth take pain anim - from behind + ENUM2STRING(BOTH_PAIN6), //# Sixth take pain anim - from behind + ENUM2STRING(BOTH_PAIN7), //# Seventh take pain anim - from behind + ENUM2STRING(BOTH_PAIN8), //# Eigth take pain anim - from behind + ENUM2STRING(BOTH_PAIN9), //# + ENUM2STRING(BOTH_PAIN10), //# + ENUM2STRING(BOTH_PAIN11), //# + ENUM2STRING(BOTH_PAIN12), //# + ENUM2STRING(BOTH_PAIN13), //# + ENUM2STRING(BOTH_PAIN14), //# + ENUM2STRING(BOTH_PAIN15), //# + ENUM2STRING(BOTH_PAIN16), //# + ENUM2STRING(BOTH_PAIN17), //# + ENUM2STRING(BOTH_PAIN18), //# + ENUM2STRING(BOTH_PAIN19), //# + ENUM2STRING(BOTH_PAIN20), //# GETTING SHOCKED + + //# #sep ENUM2STRING(BOTH_ ATTACKS + ENUM2STRING(BOTH_ATTACK1), //# Attack with stun baton + ENUM2STRING(BOTH_ATTACK2), //# Attack with one-handed pistol + ENUM2STRING(BOTH_ATTACK2IDLE1), //# Idle with one-handed pistol + ENUM2STRING(BOTH_ATTACK3), //# Attack with blaster rifle + ENUM2STRING(BOTH_ATTACK4), //# Attack with disruptor + ENUM2STRING(BOTH_ATTACK5), //# Attack with bow caster + ENUM2STRING(BOTH_ATTACK6), //# Attack with ??? + ENUM2STRING(BOTH_ATTACK7), //# Attack with ??? + ENUM2STRING(BOTH_ATTACK8), //# Attack with ??? + ENUM2STRING(BOTH_ATTACK9), //# Attack with rocket launcher + ENUM2STRING(BOTH_ATTACK10), //# Attack with thermal det + ENUM2STRING(BOTH_ATTACK11), //# Attack with laser trap + ENUM2STRING(BOTH_ATTACK12), //# Attack with detpack + ENUM2STRING(BOTH_MELEE1), //# First melee attack + ENUM2STRING(BOTH_MELEE2), //# Second melee attack + ENUM2STRING(BOTH_MELEE3), //# Third melee attack + ENUM2STRING(BOTH_MELEE4), //# Fourth melee attack + ENUM2STRING(BOTH_MELEE5), //# Fifth melee attack + ENUM2STRING(BOTH_MELEE6), //# Sixth melee attack + ENUM2STRING(BOTH_THERMAL_READY), //# pull back with thermal + ENUM2STRING(BOTH_THERMAL_THROW), //# throw thermal + //* #sep ENUM2STRING(BOTH_ SABER ANIMS + //Saber attack anims - power level 2 + ENUM2STRING(BOTH_A1_T__B_), //# Fast weak vertical attack top to bottom + ENUM2STRING(BOTH_A1__L__R), //# Fast weak horizontal attack left to right + ENUM2STRING(BOTH_A1__R__L), //# Fast weak horizontal attack right to left + ENUM2STRING(BOTH_A1_TL_BR), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A1_BR_TL), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A1_BL_TR), //# Fast weak diagonal attack bottom left to top right + ENUM2STRING(BOTH_A1_TR_BL), //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + ENUM2STRING(BOTH_T1_BR__R), //# Fast arc bottom right to right + ENUM2STRING(BOTH_T1_BR_TL), //# Fast weak spin bottom right to top left + ENUM2STRING(BOTH_T1_BR__L), //# Fast weak spin bottom right to left + ENUM2STRING(BOTH_T1_BR_BL), //# Fast weak spin bottom right to bottom left + ENUM2STRING(BOTH_T1__R_TR), //# Fast arc right to top right + ENUM2STRING(BOTH_T1__R_TL), //# Fast arc right to top left + ENUM2STRING(BOTH_T1__R__L), //# Fast weak spin right to left + ENUM2STRING(BOTH_T1__R_BL), //# Fast weak spin right to bottom left + ENUM2STRING(BOTH_T1_TR_BR), //# Fast arc top right to bottom right + ENUM2STRING(BOTH_T1_TR_TL), //# Fast arc top right to top left + ENUM2STRING(BOTH_T1_TR__L), //# Fast arc top right to left + ENUM2STRING(BOTH_T1_TR_BL), //# Fast weak spin top right to bottom left + ENUM2STRING(BOTH_T1_T__BR), //# Fast arc top to bottom right + ENUM2STRING(BOTH_T1_T___R), //# Fast arc top to right + ENUM2STRING(BOTH_T1_T__TR), //# Fast arc top to top right + ENUM2STRING(BOTH_T1_T__TL), //# Fast arc top to top left + ENUM2STRING(BOTH_T1_T___L), //# Fast arc top to left + ENUM2STRING(BOTH_T1_T__BL), //# Fast arc top to bottom left + ENUM2STRING(BOTH_T1_TL_BR), //# Fast weak spin top left to bottom right + ENUM2STRING(BOTH_T1_TL_BL), //# Fast arc top left to bottom left + ENUM2STRING(BOTH_T1__L_BR), //# Fast weak spin left to bottom right + ENUM2STRING(BOTH_T1__L__R), //# Fast weak spin left to right + ENUM2STRING(BOTH_T1__L_TL), //# Fast arc left to top left + ENUM2STRING(BOTH_T1_BL_BR), //# Fast weak spin bottom left to bottom right + ENUM2STRING(BOTH_T1_BL__R), //# Fast weak spin bottom left to right + ENUM2STRING(BOTH_T1_BL_TR), //# Fast weak spin bottom left to top right + ENUM2STRING(BOTH_T1_BL__L), //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + ENUM2STRING(BOTH_T1_BR_TR), //# Fast arc bottom right to top right (use: ENUM2STRING(BOTH_T1_TR_BR) + ENUM2STRING(BOTH_T1_BR_T_), //# Fast arc bottom right to top (use: ENUM2STRING(BOTH_T1_T__BR) + ENUM2STRING(BOTH_T1__R_BR), //# Fast arc right to bottom right (use: ENUM2STRING(BOTH_T1_BR__R) + ENUM2STRING(BOTH_T1__R_T_), //# Fast ar right to top (use: ENUM2STRING(BOTH_T1_T___R) + ENUM2STRING(BOTH_T1_TR__R), //# Fast arc top right to right (use: ENUM2STRING(BOTH_T1__R_TR) + ENUM2STRING(BOTH_T1_TR_T_), //# Fast arc top right to top (use: ENUM2STRING(BOTH_T1_T__TR) + ENUM2STRING(BOTH_T1_TL__R), //# Fast arc top left to right (use: ENUM2STRING(BOTH_T1__R_TL) + ENUM2STRING(BOTH_T1_TL_TR), //# Fast arc top left to top right (use: ENUM2STRING(BOTH_T1_TR_TL) + ENUM2STRING(BOTH_T1_TL_T_), //# Fast arc top left to top (use: ENUM2STRING(BOTH_T1_T__TL) + ENUM2STRING(BOTH_T1_TL__L), //# Fast arc top left to left (use: ENUM2STRING(BOTH_T1__L_TL) + ENUM2STRING(BOTH_T1__L_TR), //# Fast arc left to top right (use: ENUM2STRING(BOTH_T1_TR__L) + ENUM2STRING(BOTH_T1__L_T_), //# Fast arc left to top (use: ENUM2STRING(BOTH_T1_T___L) + ENUM2STRING(BOTH_T1__L_BL), //# Fast arc left to bottom left (use: ENUM2STRING(BOTH_T1_BL__L) + ENUM2STRING(BOTH_T1_BL_T_), //# Fast arc bottom left to top (use: ENUM2STRING(BOTH_T1_T__BL) + ENUM2STRING(BOTH_T1_BL_TL), //# Fast arc bottom left to top left (use: ENUM2STRING(BOTH_T1_TL_BL) + //Saber Attack Start Transitions + ENUM2STRING(BOTH_S1_S1_T_), //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + ENUM2STRING(BOTH_S1_S1__L), //# Fast plain transition from stance1 to left-to-right Fast weak attack + ENUM2STRING(BOTH_S1_S1__R), //# Fast plain transition from stance1 to right-to-left Fast weak attack + ENUM2STRING(BOTH_S1_S1_TL), //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + ENUM2STRING(BOTH_S1_S1_BR), //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + ENUM2STRING(BOTH_S1_S1_BL), //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + ENUM2STRING(BOTH_S1_S1_TR), //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + ENUM2STRING(BOTH_R1_B__S1), //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + ENUM2STRING(BOTH_R1__L_S1), //# Fast plain transition from left-to-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R1__R_S1), //# Fast plain transition from right-to-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R1_TL_S1), //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R1_BR_S1), //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R1_BL_S1), //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R1_TR_S1), //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack), played backwards) + ENUM2STRING(BOTH_B1_BR___), //# Bounce-back if attack from BR is blocked + ENUM2STRING(BOTH_B1__R___), //# Bounce-back if attack from R is blocked + ENUM2STRING(BOTH_B1_TR___), //# Bounce-back if attack from TR is blocked + ENUM2STRING(BOTH_B1_T____), //# Bounce-back if attack from T is blocked + ENUM2STRING(BOTH_B1_TL___), //# Bounce-back if attack from TL is blocked + ENUM2STRING(BOTH_B1__L___), //# Bounce-back if attack from L is blocked + ENUM2STRING(BOTH_B1_BL___), //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + ENUM2STRING(BOTH_D1_BR___), //# Deflection toward BR + ENUM2STRING(BOTH_D1__R___), //# Deflection toward R + ENUM2STRING(BOTH_D1_TR___), //# Deflection toward TR + ENUM2STRING(BOTH_D1_TL___), //# Deflection toward TL + ENUM2STRING(BOTH_D1__L___), //# Deflection toward L + ENUM2STRING(BOTH_D1_BL___), //# Deflection toward BL + ENUM2STRING(BOTH_D1_B____), //# Deflection toward B + //Saber attack anims - power level 2 + ENUM2STRING(BOTH_A2_T__B_), //# Fast weak vertical attack top to bottom + ENUM2STRING(BOTH_A2__L__R), //# Fast weak horizontal attack left to right + ENUM2STRING(BOTH_A2__R__L), //# Fast weak horizontal attack right to left + ENUM2STRING(BOTH_A2_TL_BR), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A2_BR_TL), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A2_BL_TR), //# Fast weak diagonal attack bottom left to top right + ENUM2STRING(BOTH_A2_TR_BL), //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + ENUM2STRING(BOTH_T2_BR__R), //# Fast arc bottom right to right + ENUM2STRING(BOTH_T2_BR_TL), //# Fast weak spin bottom right to top left + ENUM2STRING(BOTH_T2_BR__L), //# Fast weak spin bottom right to left + ENUM2STRING(BOTH_T2_BR_BL), //# Fast weak spin bottom right to bottom left + ENUM2STRING(BOTH_T2__R_TR), //# Fast arc right to top right + ENUM2STRING(BOTH_T2__R_TL), //# Fast arc right to top left + ENUM2STRING(BOTH_T2__R__L), //# Fast weak spin right to left + ENUM2STRING(BOTH_T2__R_BL), //# Fast weak spin right to bottom left + ENUM2STRING(BOTH_T2_TR_BR), //# Fast arc top right to bottom right + ENUM2STRING(BOTH_T2_TR_TL), //# Fast arc top right to top left + ENUM2STRING(BOTH_T2_TR__L), //# Fast arc top right to left + ENUM2STRING(BOTH_T2_TR_BL), //# Fast weak spin top right to bottom left + ENUM2STRING(BOTH_T2_T__BR), //# Fast arc top to bottom right + ENUM2STRING(BOTH_T2_T___R), //# Fast arc top to right + ENUM2STRING(BOTH_T2_T__TR), //# Fast arc top to top right + ENUM2STRING(BOTH_T2_T__TL), //# Fast arc top to top left + ENUM2STRING(BOTH_T2_T___L), //# Fast arc top to left + ENUM2STRING(BOTH_T2_T__BL), //# Fast arc top to bottom left + ENUM2STRING(BOTH_T2_TL_BR), //# Fast weak spin top left to bottom right + ENUM2STRING(BOTH_T2_TL_BL), //# Fast arc top left to bottom left + ENUM2STRING(BOTH_T2__L_BR), //# Fast weak spin left to bottom right + ENUM2STRING(BOTH_T2__L__R), //# Fast weak spin left to right + ENUM2STRING(BOTH_T2__L_TL), //# Fast arc left to top left + ENUM2STRING(BOTH_T2_BL_BR), //# Fast weak spin bottom left to bottom right + ENUM2STRING(BOTH_T2_BL__R), //# Fast weak spin bottom left to right + ENUM2STRING(BOTH_T2_BL_TR), //# Fast weak spin bottom left to top right + ENUM2STRING(BOTH_T2_BL__L), //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + ENUM2STRING(BOTH_T2_BR_TR), //# Fast arc bottom right to top right (use: ENUM2STRING(BOTH_T2_TR_BR) + ENUM2STRING(BOTH_T2_BR_T_), //# Fast arc bottom right to top (use: ENUM2STRING(BOTH_T2_T__BR) + ENUM2STRING(BOTH_T2__R_BR), //# Fast arc right to bottom right (use: ENUM2STRING(BOTH_T2_BR__R) + ENUM2STRING(BOTH_T2__R_T_), //# Fast ar right to top (use: ENUM2STRING(BOTH_T2_T___R) + ENUM2STRING(BOTH_T2_TR__R), //# Fast arc top right to right (use: ENUM2STRING(BOTH_T2__R_TR) + ENUM2STRING(BOTH_T2_TR_T_), //# Fast arc top right to top (use: ENUM2STRING(BOTH_T2_T__TR) + ENUM2STRING(BOTH_T2_TL__R), //# Fast arc top left to right (use: ENUM2STRING(BOTH_T2__R_TL) + ENUM2STRING(BOTH_T2_TL_TR), //# Fast arc top left to top right (use: ENUM2STRING(BOTH_T2_TR_TL) + ENUM2STRING(BOTH_T2_TL_T_), //# Fast arc top left to top (use: ENUM2STRING(BOTH_T2_T__TL) + ENUM2STRING(BOTH_T2_TL__L), //# Fast arc top left to left (use: ENUM2STRING(BOTH_T2__L_TL) + ENUM2STRING(BOTH_T2__L_TR), //# Fast arc left to top right (use: ENUM2STRING(BOTH_T2_TR__L) + ENUM2STRING(BOTH_T2__L_T_), //# Fast arc left to top (use: ENUM2STRING(BOTH_T2_T___L) + ENUM2STRING(BOTH_T2__L_BL), //# Fast arc left to bottom left (use: ENUM2STRING(BOTH_T2_BL__L) + ENUM2STRING(BOTH_T2_BL_T_), //# Fast arc bottom left to top (use: ENUM2STRING(BOTH_T2_T__BL) + ENUM2STRING(BOTH_T2_BL_TL), //# Fast arc bottom left to top left (use: ENUM2STRING(BOTH_T2_TL_BL) + //Saber Attack Start Transitions + ENUM2STRING(BOTH_S2_S1_T_), //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + ENUM2STRING(BOTH_S2_S1__L), //# Fast plain transition from stance1 to left-to-right Fast weak attack + ENUM2STRING(BOTH_S2_S1__R), //# Fast plain transition from stance1 to right-to-left Fast weak attack + ENUM2STRING(BOTH_S2_S1_TL), //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + ENUM2STRING(BOTH_S2_S1_BR), //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + ENUM2STRING(BOTH_S2_S1_BL), //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + ENUM2STRING(BOTH_S2_S1_TR), //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + ENUM2STRING(BOTH_R2_B__S1), //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + ENUM2STRING(BOTH_R2__L_S1), //# Fast plain transition from left-to-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R2__R_S1), //# Fast plain transition from right-to-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R2_TL_S1), //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R2_BR_S1), //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R2_BL_S1), //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R2_TR_S1), //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack), played backwards) + ENUM2STRING(BOTH_B2_BR___), //# Bounce-back if attack from BR is blocked + ENUM2STRING(BOTH_B2__R___), //# Bounce-back if attack from R is blocked + ENUM2STRING(BOTH_B2_TR___), //# Bounce-back if attack from TR is blocked + ENUM2STRING(BOTH_B2_T____), //# Bounce-back if attack from T is blocked + ENUM2STRING(BOTH_B2_TL___), //# Bounce-back if attack from TL is blocked + ENUM2STRING(BOTH_B2__L___), //# Bounce-back if attack from L is blocked + ENUM2STRING(BOTH_B2_BL___), //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + ENUM2STRING(BOTH_D2_BR___), //# Deflection toward BR + ENUM2STRING(BOTH_D2__R___), //# Deflection toward R + ENUM2STRING(BOTH_D2_TR___), //# Deflection toward TR + ENUM2STRING(BOTH_D2_TL___), //# Deflection toward TL + ENUM2STRING(BOTH_D2__L___), //# Deflection toward L + ENUM2STRING(BOTH_D2_BL___), //# Deflection toward BL + ENUM2STRING(BOTH_D2_B____), //# Deflection toward B + //Saber attack anims - power level 3 + ENUM2STRING(BOTH_A3_T__B_), //# Fast weak vertical attack top to bottom + ENUM2STRING(BOTH_A3__L__R), //# Fast weak horizontal attack left to right + ENUM2STRING(BOTH_A3__R__L), //# Fast weak horizontal attack right to left + ENUM2STRING(BOTH_A3_TL_BR), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A3_BR_TL), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A3_BL_TR), //# Fast weak diagonal attack bottom left to top right + ENUM2STRING(BOTH_A3_TR_BL), //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + ENUM2STRING(BOTH_T3_BR__R), //# Fast arc bottom right to right + ENUM2STRING(BOTH_T3_BR_TL), //# Fast weak spin bottom right to top left + ENUM2STRING(BOTH_T3_BR__L), //# Fast weak spin bottom right to left + ENUM2STRING(BOTH_T3_BR_BL), //# Fast weak spin bottom right to bottom left + ENUM2STRING(BOTH_T3__R_TR), //# Fast arc right to top right + ENUM2STRING(BOTH_T3__R_TL), //# Fast arc right to top left + ENUM2STRING(BOTH_T3__R__L), //# Fast weak spin right to left + ENUM2STRING(BOTH_T3__R_BL), //# Fast weak spin right to bottom left + ENUM2STRING(BOTH_T3_TR_BR), //# Fast arc top right to bottom right + ENUM2STRING(BOTH_T3_TR_TL), //# Fast arc top right to top left + ENUM2STRING(BOTH_T3_TR__L), //# Fast arc top right to left + ENUM2STRING(BOTH_T3_TR_BL), //# Fast weak spin top right to bottom left + ENUM2STRING(BOTH_T3_T__BR), //# Fast arc top to bottom right + ENUM2STRING(BOTH_T3_T___R), //# Fast arc top to right + ENUM2STRING(BOTH_T3_T__TR), //# Fast arc top to top right + ENUM2STRING(BOTH_T3_T__TL), //# Fast arc top to top left + ENUM2STRING(BOTH_T3_T___L), //# Fast arc top to left + ENUM2STRING(BOTH_T3_T__BL), //# Fast arc top to bottom left + ENUM2STRING(BOTH_T3_TL_BR), //# Fast weak spin top left to bottom right + ENUM2STRING(BOTH_T3_TL_BL), //# Fast arc top left to bottom left + ENUM2STRING(BOTH_T3__L_BR), //# Fast weak spin left to bottom right + ENUM2STRING(BOTH_T3__L__R), //# Fast weak spin left to right + ENUM2STRING(BOTH_T3__L_TL), //# Fast arc left to top left + ENUM2STRING(BOTH_T3_BL_BR), //# Fast weak spin bottom left to bottom right + ENUM2STRING(BOTH_T3_BL__R), //# Fast weak spin bottom left to right + ENUM2STRING(BOTH_T3_BL_TR), //# Fast weak spin bottom left to top right + ENUM2STRING(BOTH_T3_BL__L), //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + ENUM2STRING(BOTH_T3_BR_TR), //# Fast arc bottom right to top right (use: ENUM2STRING(BOTH_T3_TR_BR) + ENUM2STRING(BOTH_T3_BR_T_), //# Fast arc bottom right to top (use: ENUM2STRING(BOTH_T3_T__BR) + ENUM2STRING(BOTH_T3__R_BR), //# Fast arc right to bottom right (use: ENUM2STRING(BOTH_T3_BR__R) + ENUM2STRING(BOTH_T3__R_T_), //# Fast ar right to top (use: ENUM2STRING(BOTH_T3_T___R) + ENUM2STRING(BOTH_T3_TR__R), //# Fast arc top right to right (use: ENUM2STRING(BOTH_T3__R_TR) + ENUM2STRING(BOTH_T3_TR_T_), //# Fast arc top right to top (use: ENUM2STRING(BOTH_T3_T__TR) + ENUM2STRING(BOTH_T3_TL__R), //# Fast arc top left to right (use: ENUM2STRING(BOTH_T3__R_TL) + ENUM2STRING(BOTH_T3_TL_TR), //# Fast arc top left to top right (use: ENUM2STRING(BOTH_T3_TR_TL) + ENUM2STRING(BOTH_T3_TL_T_), //# Fast arc top left to top (use: ENUM2STRING(BOTH_T3_T__TL) + ENUM2STRING(BOTH_T3_TL__L), //# Fast arc top left to left (use: ENUM2STRING(BOTH_T3__L_TL) + ENUM2STRING(BOTH_T3__L_TR), //# Fast arc left to top right (use: ENUM2STRING(BOTH_T3_TR__L) + ENUM2STRING(BOTH_T3__L_T_), //# Fast arc left to top (use: ENUM2STRING(BOTH_T3_T___L) + ENUM2STRING(BOTH_T3__L_BL), //# Fast arc left to bottom left (use: ENUM2STRING(BOTH_T3_BL__L) + ENUM2STRING(BOTH_T3_BL_T_), //# Fast arc bottom left to top (use: ENUM2STRING(BOTH_T3_T__BL) + ENUM2STRING(BOTH_T3_BL_TL), //# Fast arc bottom left to top left (use: ENUM2STRING(BOTH_T3_TL_BL) + //Saber Attack Start Transitions + ENUM2STRING(BOTH_S3_S1_T_), //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + ENUM2STRING(BOTH_S3_S1__L), //# Fast plain transition from stance1 to left-to-right Fast weak attack + ENUM2STRING(BOTH_S3_S1__R), //# Fast plain transition from stance1 to right-to-left Fast weak attack + ENUM2STRING(BOTH_S3_S1_TL), //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + ENUM2STRING(BOTH_S3_S1_BR), //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + ENUM2STRING(BOTH_S3_S1_BL), //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + ENUM2STRING(BOTH_S3_S1_TR), //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + ENUM2STRING(BOTH_R3_B__S1), //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + ENUM2STRING(BOTH_R3__L_S1), //# Fast plain transition from left-to-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R3__R_S1), //# Fast plain transition from right-to-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R3_TL_S1), //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R3_BR_S1), //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R3_BL_S1), //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R3_TR_S1), //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack), played backwards) + ENUM2STRING(BOTH_B3_BR___), //# Bounce-back if attack from BR is blocked + ENUM2STRING(BOTH_B3__R___), //# Bounce-back if attack from R is blocked + ENUM2STRING(BOTH_B3_TR___), //# Bounce-back if attack from TR is blocked + ENUM2STRING(BOTH_B3_T____), //# Bounce-back if attack from T is blocked + ENUM2STRING(BOTH_B3_TL___), //# Bounce-back if attack from TL is blocked + ENUM2STRING(BOTH_B3__L___), //# Bounce-back if attack from L is blocked + ENUM2STRING(BOTH_B3_BL___), //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + ENUM2STRING(BOTH_D3_BR___), //# Deflection toward BR + ENUM2STRING(BOTH_D3__R___), //# Deflection toward R + ENUM2STRING(BOTH_D3_TR___), //# Deflection toward TR + ENUM2STRING(BOTH_D3_TL___), //# Deflection toward TL + ENUM2STRING(BOTH_D3__L___), //# Deflection toward L + ENUM2STRING(BOTH_D3_BL___), //# Deflection toward BL + ENUM2STRING(BOTH_D3_B____), //# Deflection toward B + //Saber attack anims - power level 4 - Desann's + ENUM2STRING(BOTH_A4_T__B_), //# Fast weak vertical attack top to bottom + ENUM2STRING(BOTH_A4__L__R), //# Fast weak horizontal attack left to right + ENUM2STRING(BOTH_A4__R__L), //# Fast weak horizontal attack right to left + ENUM2STRING(BOTH_A4_TL_BR), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A4_BR_TL), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A4_BL_TR), //# Fast weak diagonal attack bottom left to top right + ENUM2STRING(BOTH_A4_TR_BL), //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + ENUM2STRING(BOTH_T4_BR__R), //# Fast arc bottom right to right + ENUM2STRING(BOTH_T4_BR_TL), //# Fast weak spin bottom right to top left + ENUM2STRING(BOTH_T4_BR__L), //# Fast weak spin bottom right to left + ENUM2STRING(BOTH_T4_BR_BL), //# Fast weak spin bottom right to bottom left + ENUM2STRING(BOTH_T4__R_TR), //# Fast arc right to top right + ENUM2STRING(BOTH_T4__R_TL), //# Fast arc right to top left + ENUM2STRING(BOTH_T4__R__L), //# Fast weak spin right to left + ENUM2STRING(BOTH_T4__R_BL), //# Fast weak spin right to bottom left + ENUM2STRING(BOTH_T4_TR_BR), //# Fast arc top right to bottom right + ENUM2STRING(BOTH_T4_TR_TL), //# Fast arc top right to top left + ENUM2STRING(BOTH_T4_TR__L), //# Fast arc top right to left + ENUM2STRING(BOTH_T4_TR_BL), //# Fast weak spin top right to bottom left + ENUM2STRING(BOTH_T4_T__BR), //# Fast arc top to bottom right + ENUM2STRING(BOTH_T4_T___R), //# Fast arc top to right + ENUM2STRING(BOTH_T4_T__TR), //# Fast arc top to top right + ENUM2STRING(BOTH_T4_T__TL), //# Fast arc top to top left + ENUM2STRING(BOTH_T4_T___L), //# Fast arc top to left + ENUM2STRING(BOTH_T4_T__BL), //# Fast arc top to bottom left + ENUM2STRING(BOTH_T4_TL_BR), //# Fast weak spin top left to bottom right + ENUM2STRING(BOTH_T4_TL_BL), //# Fast arc top left to bottom left + ENUM2STRING(BOTH_T4__L_BR), //# Fast weak spin left to bottom right + ENUM2STRING(BOTH_T4__L__R), //# Fast weak spin left to right + ENUM2STRING(BOTH_T4__L_TL), //# Fast arc left to top left + ENUM2STRING(BOTH_T4_BL_BR), //# Fast weak spin bottom left to bottom right + ENUM2STRING(BOTH_T4_BL__R), //# Fast weak spin bottom left to right + ENUM2STRING(BOTH_T4_BL_TR), //# Fast weak spin bottom left to top right + ENUM2STRING(BOTH_T4_BL__L), //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + ENUM2STRING(BOTH_T4_BR_TR), //# Fast arc bottom right to top right (use: ENUM2STRING(BOTH_T4_TR_BR) + ENUM2STRING(BOTH_T4_BR_T_), //# Fast arc bottom right to top (use: ENUM2STRING(BOTH_T4_T__BR) + ENUM2STRING(BOTH_T4__R_BR), //# Fast arc right to bottom right (use: ENUM2STRING(BOTH_T4_BR__R) + ENUM2STRING(BOTH_T4__R_T_), //# Fast ar right to top (use: ENUM2STRING(BOTH_T4_T___R) + ENUM2STRING(BOTH_T4_TR__R), //# Fast arc top right to right (use: ENUM2STRING(BOTH_T4__R_TR) + ENUM2STRING(BOTH_T4_TR_T_), //# Fast arc top right to top (use: ENUM2STRING(BOTH_T4_T__TR) + ENUM2STRING(BOTH_T4_TL__R), //# Fast arc top left to right (use: ENUM2STRING(BOTH_T4__R_TL) + ENUM2STRING(BOTH_T4_TL_TR), //# Fast arc top left to top right (use: ENUM2STRING(BOTH_T4_TR_TL) + ENUM2STRING(BOTH_T4_TL_T_), //# Fast arc top left to top (use: ENUM2STRING(BOTH_T4_T__TL) + ENUM2STRING(BOTH_T4_TL__L), //# Fast arc top left to left (use: ENUM2STRING(BOTH_T4__L_TL) + ENUM2STRING(BOTH_T4__L_TR), //# Fast arc left to top right (use: ENUM2STRING(BOTH_T4_TR__L) + ENUM2STRING(BOTH_T4__L_T_), //# Fast arc left to top (use: ENUM2STRING(BOTH_T4_T___L) + ENUM2STRING(BOTH_T4__L_BL), //# Fast arc left to bottom left (use: ENUM2STRING(BOTH_T4_BL__L) + ENUM2STRING(BOTH_T4_BL_T_), //# Fast arc bottom left to top (use: ENUM2STRING(BOTH_T4_T__BL) + ENUM2STRING(BOTH_T4_BL_TL), //# Fast arc bottom left to top left (use: ENUM2STRING(BOTH_T4_TL_BL) + //Saber Attack Start Transitions + ENUM2STRING(BOTH_S4_S1_T_), //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + ENUM2STRING(BOTH_S4_S1__L), //# Fast plain transition from stance1 to left-to-right Fast weak attack + ENUM2STRING(BOTH_S4_S1__R), //# Fast plain transition from stance1 to right-to-left Fast weak attack + ENUM2STRING(BOTH_S4_S1_TL), //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + ENUM2STRING(BOTH_S4_S1_BR), //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + ENUM2STRING(BOTH_S4_S1_BL), //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + ENUM2STRING(BOTH_S4_S1_TR), //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + ENUM2STRING(BOTH_R4_B__S1), //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + ENUM2STRING(BOTH_R4__L_S1), //# Fast plain transition from left-to-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R4__R_S1), //# Fast plain transition from right-to-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R4_TL_S1), //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R4_BR_S1), //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R4_BL_S1), //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R4_TR_S1), //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack), played backwards) + ENUM2STRING(BOTH_B4_BR___), //# Bounce-back if attack from BR is blocked + ENUM2STRING(BOTH_B4__R___), //# Bounce-back if attack from R is blocked + ENUM2STRING(BOTH_B4_TR___), //# Bounce-back if attack from TR is blocked + ENUM2STRING(BOTH_B4_T____), //# Bounce-back if attack from T is blocked + ENUM2STRING(BOTH_B4_TL___), //# Bounce-back if attack from TL is blocked + ENUM2STRING(BOTH_B4__L___), //# Bounce-back if attack from L is blocked + ENUM2STRING(BOTH_B4_BL___), //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + ENUM2STRING(BOTH_D4_BR___), //# Deflection toward BR + ENUM2STRING(BOTH_D4__R___), //# Deflection toward R + ENUM2STRING(BOTH_D4_TR___), //# Deflection toward TR + ENUM2STRING(BOTH_D4_TL___), //# Deflection toward TL + ENUM2STRING(BOTH_D4__L___), //# Deflection toward L + ENUM2STRING(BOTH_D4_BL___), //# Deflection toward BL + ENUM2STRING(BOTH_D4_B____), //# Deflection toward B + //Saber attack anims - power level 5 - Tavion's + ENUM2STRING(BOTH_A5_T__B_), //# Fast weak vertical attack top to bottom + ENUM2STRING(BOTH_A5__L__R), //# Fast weak horizontal attack left to right + ENUM2STRING(BOTH_A5__R__L), //# Fast weak horizontal attack right to left + ENUM2STRING(BOTH_A5_TL_BR), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A5_BR_TL), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A5_BL_TR), //# Fast weak diagonal attack bottom left to top right + ENUM2STRING(BOTH_A5_TR_BL), //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + ENUM2STRING(BOTH_T5_BR__R), //# Fast arc bottom right to right + ENUM2STRING(BOTH_T5_BR_TL), //# Fast weak spin bottom right to top left + ENUM2STRING(BOTH_T5_BR__L), //# Fast weak spin bottom right to left + ENUM2STRING(BOTH_T5_BR_BL), //# Fast weak spin bottom right to bottom left + ENUM2STRING(BOTH_T5__R_TR), //# Fast arc right to top right + ENUM2STRING(BOTH_T5__R_TL), //# Fast arc right to top left + ENUM2STRING(BOTH_T5__R__L), //# Fast weak spin right to left + ENUM2STRING(BOTH_T5__R_BL), //# Fast weak spin right to bottom left + ENUM2STRING(BOTH_T5_TR_BR), //# Fast arc top right to bottom right + ENUM2STRING(BOTH_T5_TR_TL), //# Fast arc top right to top left + ENUM2STRING(BOTH_T5_TR__L), //# Fast arc top right to left + ENUM2STRING(BOTH_T5_TR_BL), //# Fast weak spin top right to bottom left + ENUM2STRING(BOTH_T5_T__BR), //# Fast arc top to bottom right + ENUM2STRING(BOTH_T5_T___R), //# Fast arc top to right + ENUM2STRING(BOTH_T5_T__TR), //# Fast arc top to top right + ENUM2STRING(BOTH_T5_T__TL), //# Fast arc top to top left + ENUM2STRING(BOTH_T5_T___L), //# Fast arc top to left + ENUM2STRING(BOTH_T5_T__BL), //# Fast arc top to bottom left + ENUM2STRING(BOTH_T5_TL_BR), //# Fast weak spin top left to bottom right + ENUM2STRING(BOTH_T5_TL_BL), //# Fast arc top left to bottom left + ENUM2STRING(BOTH_T5__L_BR), //# Fast weak spin left to bottom right + ENUM2STRING(BOTH_T5__L__R), //# Fast weak spin left to right + ENUM2STRING(BOTH_T5__L_TL), //# Fast arc left to top left + ENUM2STRING(BOTH_T5_BL_BR), //# Fast weak spin bottom left to bottom right + ENUM2STRING(BOTH_T5_BL__R), //# Fast weak spin bottom left to right + ENUM2STRING(BOTH_T5_BL_TR), //# Fast weak spin bottom left to top right + ENUM2STRING(BOTH_T5_BL__L), //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + ENUM2STRING(BOTH_T5_BR_TR), //# Fast arc bottom right to top right (use: ENUM2STRING(BOTH_T5_TR_BR) + ENUM2STRING(BOTH_T5_BR_T_), //# Fast arc bottom right to top (use: ENUM2STRING(BOTH_T5_T__BR) + ENUM2STRING(BOTH_T5__R_BR), //# Fast arc right to bottom right (use: ENUM2STRING(BOTH_T5_BR__R) + ENUM2STRING(BOTH_T5__R_T_), //# Fast ar right to top (use: ENUM2STRING(BOTH_T5_T___R) + ENUM2STRING(BOTH_T5_TR__R), //# Fast arc top right to right (use: ENUM2STRING(BOTH_T5__R_TR) + ENUM2STRING(BOTH_T5_TR_T_), //# Fast arc top right to top (use: ENUM2STRING(BOTH_T5_T__TR) + ENUM2STRING(BOTH_T5_TL__R), //# Fast arc top left to right (use: ENUM2STRING(BOTH_T5__R_TL) + ENUM2STRING(BOTH_T5_TL_TR), //# Fast arc top left to top right (use: ENUM2STRING(BOTH_T5_TR_TL) + ENUM2STRING(BOTH_T5_TL_T_), //# Fast arc top left to top (use: ENUM2STRING(BOTH_T5_T__TL) + ENUM2STRING(BOTH_T5_TL__L), //# Fast arc top left to left (use: ENUM2STRING(BOTH_T5__L_TL) + ENUM2STRING(BOTH_T5__L_TR), //# Fast arc left to top right (use: ENUM2STRING(BOTH_T5_TR__L) + ENUM2STRING(BOTH_T5__L_T_), //# Fast arc left to top (use: ENUM2STRING(BOTH_T5_T___L) + ENUM2STRING(BOTH_T5__L_BL), //# Fast arc left to bottom left (use: ENUM2STRING(BOTH_T5_BL__L) + ENUM2STRING(BOTH_T5_BL_T_), //# Fast arc bottom left to top (use: ENUM2STRING(BOTH_T5_T__BL) + ENUM2STRING(BOTH_T5_BL_TL), //# Fast arc bottom left to top left (use: ENUM2STRING(BOTH_T5_TL_BL) + //Saber Attack Start Transitions + ENUM2STRING(BOTH_S5_S1_T_), //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + ENUM2STRING(BOTH_S5_S1__L), //# Fast plain transition from stance1 to left-to-right Fast weak attack + ENUM2STRING(BOTH_S5_S1__R), //# Fast plain transition from stance1 to right-to-left Fast weak attack + ENUM2STRING(BOTH_S5_S1_TL), //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + ENUM2STRING(BOTH_S5_S1_BR), //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + ENUM2STRING(BOTH_S5_S1_BL), //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + ENUM2STRING(BOTH_S5_S1_TR), //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + ENUM2STRING(BOTH_R5_B__S1), //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + ENUM2STRING(BOTH_R5__L_S1), //# Fast plain transition from left-to-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R5__R_S1), //# Fast plain transition from right-to-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R5_TL_S1), //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R5_BR_S1), //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R5_BL_S1), //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R5_TR_S1), //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack), played backwards) + ENUM2STRING(BOTH_B5_BR___), //# Bounce-back if attack from BR is blocked + ENUM2STRING(BOTH_B5__R___), //# Bounce-back if attack from R is blocked + ENUM2STRING(BOTH_B5_TR___), //# Bounce-back if attack from TR is blocked + ENUM2STRING(BOTH_B5_T____), //# Bounce-back if attack from T is blocked + ENUM2STRING(BOTH_B5_TL___), //# Bounce-back if attack from TL is blocked + ENUM2STRING(BOTH_B5__L___), //# Bounce-back if attack from L is blocked + ENUM2STRING(BOTH_B5_BL___), //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + ENUM2STRING(BOTH_D5_BR___), //# Deflection toward BR + ENUM2STRING(BOTH_D5__R___), //# Deflection toward R + ENUM2STRING(BOTH_D5_TR___), //# Deflection toward TR + ENUM2STRING(BOTH_D5_TL___), //# Deflection toward TL + ENUM2STRING(BOTH_D5__L___), //# Deflection toward L + ENUM2STRING(BOTH_D5_BL___), //# Deflection toward BL + ENUM2STRING(BOTH_D5_B____), //# Deflection toward B + //Saber parry anims + ENUM2STRING(BOTH_P1_S1_T_), //# Block shot/saber top + ENUM2STRING(BOTH_P1_S1_TR), //# Block shot/saber top right + ENUM2STRING(BOTH_P1_S1_TL), //# Block shot/saber top left + ENUM2STRING(BOTH_P1_S1_BL), //# Block shot/saber bottom left + ENUM2STRING(BOTH_P1_S1_BR), //# Block shot/saber bottom right + //Saber knockaway + ENUM2STRING(BOTH_K1_S1_T_), //# knockaway saber top + ENUM2STRING(BOTH_K1_S1_TR), //# knockaway saber top right + ENUM2STRING(BOTH_K1_S1_TL), //# knockaway saber top left + ENUM2STRING(BOTH_K1_S1_BL), //# knockaway saber bottom left + ENUM2STRING(BOTH_K1_S1_B_), //# knockaway saber bottom + ENUM2STRING(BOTH_K1_S1_BR), //# knockaway saber bottom right + //Saber attack knocked away + ENUM2STRING(BOTH_V1_BR_S1), //# BR attack knocked away + ENUM2STRING(BOTH_V1__R_S1), //# R attack knocked away + ENUM2STRING(BOTH_V1_TR_S1), //# TR attack knocked away + ENUM2STRING(BOTH_V1_T__S1), //# T attack knocked away + ENUM2STRING(BOTH_V1_TL_S1), //# TL attack knocked away + ENUM2STRING(BOTH_V1__L_S1), //# L attack knocked away + ENUM2STRING(BOTH_V1_BL_S1), //# BL attack knocked away + ENUM2STRING(BOTH_V1_B__S1), //# B attack knocked away + //Saber parry broken + ENUM2STRING(BOTH_H1_S1_T_), //# saber knocked down from top parry + ENUM2STRING(BOTH_H1_S1_TR), //# saber knocked down-left from TR parry + ENUM2STRING(BOTH_H1_S1_TL), //# saber knocked down-right from TL parry + ENUM2STRING(BOTH_H1_S1_BL), //# saber knocked up-right from BL parry + ENUM2STRING(BOTH_H1_S1_B_), //# saber knocked up over head from ready? + ENUM2STRING(BOTH_H1_S1_BR), //# saber knocked up-left from BR parry + //Sabers locked anims + ENUM2STRING(BOTH_BF2RETURN), //# + ENUM2STRING(BOTH_BF2BREAK), //# + ENUM2STRING(BOTH_BF2LOCK), //# + ENUM2STRING(BOTH_BF1RETURN), //# + ENUM2STRING(BOTH_BF1BREAK), //# + ENUM2STRING(BOTH_BF1LOCK), //# + ENUM2STRING(BOTH_CWCIRCLE_R2__R_S1), //# + ENUM2STRING(BOTH_CCWCIRCLE_R2__L_S1), //# + ENUM2STRING(BOTH_CWCIRCLE_A2__L__R), //# + ENUM2STRING(BOTH_CCWCIRCLE_A2__R__L), //# + ENUM2STRING(BOTH_CWCIRCLEBREAK), //# + ENUM2STRING(BOTH_CCWCIRCLEBREAK), //# + ENUM2STRING(BOTH_CWCIRCLELOCK), //# + ENUM2STRING(BOTH_CCWCIRCLELOCK), //# + //other saber anims/attacks + ENUM2STRING(BOTH_SABERFAST_STANCE), + ENUM2STRING(BOTH_SABERSLOW_STANCE), + ENUM2STRING(BOTH_A2_STABBACK1), //# Stab saber backward + ENUM2STRING(BOTH_ATTACK_BACK), //# Swing around backwards and attack + ENUM2STRING(BOTH_JUMPFLIPSLASHDOWN1),//# + ENUM2STRING(BOTH_JUMPFLIPSTABDOWN),//# + ENUM2STRING(BOTH_FORCELEAP2_T__B_),//# + ENUM2STRING(BOTH_LUNGE2_B__T_),//# + ENUM2STRING(BOTH_CROUCHATTACKBACK1),//# + + //# #sep ENUM2STRING(BOTH_ STANDING + ENUM2STRING(BOTH_STAND1), //# Standing idle, no weapon, hands down + ENUM2STRING(BOTH_STAND1IDLE1), //# Random standing idle + ENUM2STRING(BOTH_STAND2), //# Standing idle with a saber + ENUM2STRING(BOTH_STAND2IDLE1), //# Random standing idle + ENUM2STRING(BOTH_STAND2IDLE2), + ENUM2STRING(BOTH_STAND3), //# Standing idle with 2-handed weapon + ENUM2STRING(BOTH_STAND3IDLE1), //# Random standing idle + ENUM2STRING(BOTH_STAND4), //# hands clasp behind back + ENUM2STRING(BOTH_STAND4IDLE1), //# Random standing idle + ENUM2STRING(BOTH_STAND5), //# standing idle, no weapon, hand down, back straight + ENUM2STRING(BOTH_STAND5IDLE1), //# Random standing idle + ENUM2STRING(BOTH_STAND6), //# one handed), gun at side), relaxed stand + ENUM2STRING(BOTH_STAND7), //# both hands on hips (female) + ENUM2STRING(BOTH_STAND8), //# both hands on hips (male) + ENUM2STRING(BOTH_STAND1TO3), //# Transition from stand1 to stand3 + ENUM2STRING(BOTH_STAND3TO1), //# Transition from stand3 to stand1 + ENUM2STRING(BOTH_STAND1TO2), //# Transition from stand1 to stand2 + ENUM2STRING(BOTH_STAND2TO1), //# Transition from stand2 to stand1 + ENUM2STRING(BOTH_STAND2TO4), //# Transition from stand2 to stand4 + ENUM2STRING(BOTH_STAND4TO2), //# Transition from stand4 to stand2 + ENUM2STRING(BOTH_STANDTOWALK1), //# Transition from stand1 to walk1 + ENUM2STRING(BOTH_STAND4TOATTACK2), //# relaxed stand to 1-handed pistol ready + ENUM2STRING(BOTH_STANDUP1), //# standing up and stumbling + ENUM2STRING(BOTH_STANDUP2), //# Luke standing up from his meditation platform (cin # 37) + ENUM2STRING(BOTH_STAND5TOSIT3), //# transition from stand 5 to sit 3 + ENUM2STRING(BOTH_STAND1_REELO), //# Reelo in his stand1 position (cin #18) + ENUM2STRING(BOTH_STAND5_REELO), //# Reelo in his stand5 position (cin #18) + ENUM2STRING(BOTH_STAND1TOSTAND5), //# Transition from stand1 to stand5 + ENUM2STRING(BOTH_STAND5TOSTAND1), //# Transition from stand5 to stand1 + ENUM2STRING(BOTH_STAND5TOAIM), //# Transition of Kye aiming his gun at Desann (cin #9) + ENUM2STRING(BOTH_STAND5STARTLEDLOOKLEFT), //# Kyle turning to watch the bridge drop (cin #9) + ENUM2STRING(BOTH_STARTLEDLOOKLEFTTOSTAND5), //# Kyle returning to stand 5 from watching the bridge drop (cin #9) + ENUM2STRING(BOTH_STAND5TOSTAND8), //# Transition from stand5 to stand8 + ENUM2STRING(BOTH_STAND7TOSTAND8), //# Tavion putting hands on back of chair (cin #11) + ENUM2STRING(BOTH_STAND8TOSTAND5), //# Transition from stand8 to stand5 + ENUM2STRING(BOTH_STAND5SHIFTWEIGHT), //# Weightshift from stand5 to side and back to stand5 + ENUM2STRING(BOTH_STAND5SHIFTWEIGHTSTART), //# From stand5 to side + ENUM2STRING(BOTH_STAND5SHIFTWEIGHTSTOP), //# From side to stand5 + ENUM2STRING(BOTH_STAND5TURNLEFTSTART), //# Start turning left from stand5 + ENUM2STRING(BOTH_STAND5TURNLEFTSTOP), //# Stop turning left from stand5 + ENUM2STRING(BOTH_STAND5TURNRIGHTSTART), //# Start turning right from stand5 + ENUM2STRING(BOTH_STAND5TURNRIGHTSTOP), //# Stop turning right from stand5 + ENUM2STRING(BOTH_STAND5LOOK180LEFTSTART), //# Start looking over left shoulder (cin #17) + ENUM2STRING(BOTH_STAND5LOOK180LEFTSTOP), //# Stop looking over left shoulder (cin #17) + + ENUM2STRING(BOTH_CONSOLE1START), //# typing at a console + ENUM2STRING(BOTH_CONSOLE1), //# typing at a console + ENUM2STRING(BOTH_CONSOLE1STOP), //# typing at a console + ENUM2STRING(BOTH_CONSOLE2START), //# typing at a console with comm link in hand (cin #5) + ENUM2STRING(BOTH_CONSOLE2), //# typing at a console with comm link in hand (cin #5) + ENUM2STRING(BOTH_CONSOLE2STOP), //# typing at a console with comm link in hand (cin #5) + ENUM2STRING(BOTH_CONSOLE2HOLDCOMSTART), //# lean in to type at console while holding comm link in hand (cin #5) + ENUM2STRING(BOTH_CONSOLE2HOLDCOMSTOP), //# lean away after typing at console while holding comm link in hand (cin #5) + + ENUM2STRING(BOTH_GUARD_LOOKAROUND1), //# Cradling weapon and looking around + ENUM2STRING(BOTH_GUARD_IDLE1), //# Cradling weapon and standing + ENUM2STRING(BOTH_ALERT1), //# Startled by something while on guard + ENUM2STRING(BOTH_GESTURE1), //# Generic gesture), non-specific + ENUM2STRING(BOTH_GESTURE2), //# Generic gesture), non-specific + ENUM2STRING(BOTH_GESTURE3), //# Generic gesture), non-specific + ENUM2STRING(BOTH_WALK1TALKCOMM1), //# Talking into coom link while walking + ENUM2STRING(BOTH_TALK1), //# Generic talk anim + ENUM2STRING(BOTH_TALK2), //# Generic talk anim + ENUM2STRING(BOTH_TALKCOMM1START), //# Start talking into a comm link + ENUM2STRING(BOTH_TALKCOMM1), //# Talking into a comm link + ENUM2STRING(BOTH_TALKCOMM1STOP), //# Stop talking into a comm link + ENUM2STRING(BOTH_TALKGESTURE1), //# Generic talk anim + ENUM2STRING(BOTH_TALKGESTURE2), //# Generic talk anim + ENUM2STRING(BOTH_TALKGESTURE3), //# Generic talk anim + + ENUM2STRING(BOTH_TALKGESTURE4START), //# Beginning talk anim 4 + ENUM2STRING(BOTH_TALKGESTURE4), //# Talk gesture 4 + ENUM2STRING(BOTH_TALKGESTURE4STOP), //# Ending talk anim 4 + ENUM2STRING(BOTH_TALKGESTURE5START), //# Start hand on chin + ENUM2STRING(BOTH_TALKGESTURE5), //# Hand on chin + ENUM2STRING(BOTH_TALKGESTURE5STOP), //# Stop hand on chin + ENUM2STRING(BOTH_TALKGESTURE6START), //# Starting Motions to self + ENUM2STRING(BOTH_TALKGESTURE6), //# Pointing at self + ENUM2STRING(BOTH_TALKGESTURE6STOP), //# Ending Motions to self + ENUM2STRING(BOTH_TALKGESTURE7START), //# Start touches Kyle on shoulder + ENUM2STRING(BOTH_TALKGESTURE7), //# Hold touches Kyle on shoulder + ENUM2STRING(BOTH_TALKGESTURE7STOP), //# Ending touches Kyle on shoulder + ENUM2STRING(BOTH_TALKGESTURE8START), //# Lando's chin hold + ENUM2STRING(BOTH_TALKGESTURE8), //# Lando's chin hold + ENUM2STRING(BOTH_TALKGESTURE8STOP), //# Lando's chin hold + ENUM2STRING(BOTH_TALKGESTURE9), //# Same as gesture 2 but with the right hand + ENUM2STRING(BOTH_TALKGESTURE10), //# Shoulder shrug + ENUM2STRING(BOTH_TALKGESTURE11START), //# Arms folded across chest + ENUM2STRING(BOTH_TALKGESTURE11STOP), //# Arms folded across chest + ENUM2STRING(BOTH_TALKGESTURE12), //# Tavion taunting Kyle + ENUM2STRING(BOTH_TALKGESTURE13START), //# Luke warning Kyle + ENUM2STRING(BOTH_TALKGESTURE13), //# Luke warning Kyle + ENUM2STRING(BOTH_TALKGESTURE13STOP), //# Luke warning Kyle + ENUM2STRING(BOTH_TALKGESTURE14), //# Luke gesturing to Kyle + + ENUM2STRING(BOTH_TALKGESTURE15START), //# Desann taunting Kyle + ENUM2STRING(BOTH_TALKGESTURE15), //# Desann taunting Kyle + ENUM2STRING(BOTH_TALKGESTURE15STOP), //# Desann taunting Kyle + ENUM2STRING(BOTH_TALKGESTURE16), //# Bartender gesture cin #15 + ENUM2STRING(BOTH_TALKGESTURE17), //# Bartender gesture cin #15 + ENUM2STRING(BOTH_TALKGESTURE18), //# Bartender gesture cin #15 + ENUM2STRING(BOTH_TALKGESTURE19START), //# Desann lifting his arm "Join me" (cin #34) + ENUM2STRING(BOTH_TALKGESTURE19STOP), //# Desann lifting his arm "Join me" (cin #34) + ENUM2STRING(BOTH_TALKGESTURE20START), //# Kyle lifting his arm "Join us" (cin #34) + ENUM2STRING(BOTH_TALKGESTURE21), //# generic talk gesture from stand3 + ENUM2STRING(BOTH_TALKGESTURE22), //# generic talk gesture from stand3 + ENUM2STRING(BOTH_TALKGESTURE23), //# generic talk gesture from stand3 + ENUM2STRING(BOTH_PAUSE1START), //# Luke pauses to warn Kyle (cin #24) start + ENUM2STRING(BOTH_PAUSE1STOP), //# Luke pauses to warn Kyle (cin #24) stop + + ENUM2STRING(BOTH_HEADTILTLSTART), //# Head tilt to left + ENUM2STRING(BOTH_HEADTILTLSTOP), //# Head tilt to left + ENUM2STRING(BOTH_HEADTILTRSTART), //# Head tilt to right + ENUM2STRING(BOTH_HEADTILTRSTOP), //# Head tilt to right + ENUM2STRING(BOTH_HEADNOD), //# Head shake YES + ENUM2STRING(BOTH_HEADSHAKE), //# Head shake NO + ENUM2STRING(BOTH_HEADSHAKE1_REELO), //# Head shake NO for Reelo + ENUM2STRING(BOTH_SITHEADTILTLSTART), //# Head tilt to left from seated position + ENUM2STRING(BOTH_SITHEADTILTLSTOP), //# Head tilt to left from seated position + ENUM2STRING(BOTH_SITHEADTILTRSTART), //# Head tilt to right from seated position + ENUM2STRING(BOTH_SITHEADTILTRSTOP), //# Head tilt to right from seated position + ENUM2STRING(BOTH_SITHEADNOD), //# Head shake YES from seated position + ENUM2STRING(BOTH_SITHEADSHAKE), //# Head shake NO from seated position + ENUM2STRING(BOTH_SIT2HEADTILTLSTART), //# Head tilt to left from seated position 2 + ENUM2STRING(BOTH_SIT2HEADTILTLSTOP), //# Head tilt to left from seated position 2 + + ENUM2STRING(BOTH_REACH1START), //# Monmothma reaching for crystal + ENUM2STRING(BOTH_REACH1STOP), //# Monmothma reaching for crystal + + ENUM2STRING(BOTH_EXAMINE1START), //# Start Mon Mothma examining crystal + ENUM2STRING(BOTH_EXAMINE1), //# Mon Mothma examining crystal + ENUM2STRING(BOTH_EXAMINE1STOP), //# Stop Mon Mothma examining crystal + ENUM2STRING(BOTH_EXAMINE2START), //# Start Kyle tossing crystal + ENUM2STRING(BOTH_EXAMINE2), //# Hold Kyle tossing crystal + ENUM2STRING(BOTH_EXAMINE2STOP), //# End Kyle tossing crystal + ENUM2STRING(BOTH_EXAMINE3START), //# Start Lando looking around corner + ENUM2STRING(BOTH_EXAMINE3), //# Hold Lando looking around corner + ENUM2STRING(BOTH_EXAMINE3STOP), //# End Lando looking around corner + + ENUM2STRING(BOTH_LEANLEFT2START), //# Start leaning left in chair + ENUM2STRING(BOTH_LEANLEFT2STOP), //# Stop leaning left in chair + ENUM2STRING(BOTH_LEANRIGHT3START), //# Start Lando leaning on wall + ENUM2STRING(BOTH_LEANRIGHT3), //# Lando leaning on wall + ENUM2STRING(BOTH_LEANRIGHT3STOP), //# Stop Lando leaning on wall + + ENUM2STRING(BOTH_FORCEFOUNTAIN1_START), //# Kyle being lifted into the Force Fountain (cin #10) + ENUM2STRING(BOTH_FORCEFOUNTAIN1_MIDDLE),//# Kyle changing to looping position in the Force Fountain (cin #10) + ENUM2STRING(BOTH_FORCEFOUNTAIN1_LOOP), //# Kyle being spun in the Force Fountain (cin #10) + ENUM2STRING(BOTH_FORCEFOUNTAIN1_STOP), //# Kyle being set down out of the Force Fountain (cin #10) + ENUM2STRING(BOTH_THUMBING1), //# Lando gesturing with thumb over his shoulder (cin #19) + ENUM2STRING(BOTH_COME_ON1), //# Jan gesturing to Kyle (cin #32a) + ENUM2STRING(BOTH_STEADYSELF1), //# Jan trying to keep footing (cin #32a) Kyle (cin#5) + ENUM2STRING(BOTH_STEADYSELF1END), //# Return hands to side from STEADSELF1 Kyle (cin#5) + ENUM2STRING(BOTH_SILENCEGESTURE1), //# Luke silencing Kyle with a raised hand (cin #37) + ENUM2STRING(BOTH_REACHFORSABER1), //# Luke holding hand out for Kyle's saber (cin #37) + ENUM2STRING(BOTH_PUNCHER1), //# Jan punching Kyle in the shoulder (cin #37) + ENUM2STRING(BOTH_CONSTRAINER1HOLD), //# Static pose of starting Tavion constraining Jan (cin #9) + ENUM2STRING(BOTH_CONSTRAINEE1HOLD), //# Static pose of starting Jan being constrained by Tavion (cin #9) + ENUM2STRING(BOTH_CONSTRAINER1STAND), //# Tavion constraining Jan in a stand pose (cin #9) + ENUM2STRING(BOTH_CONSTRAINEE1STAND), //# Jan being constrained in a stand pose (cin #9) + ENUM2STRING(BOTH_CONSTRAINER1WALK), //# Tavion shoving jan forward (cin #9) + ENUM2STRING(BOTH_CONSTRAINEE1WALK), //# Jan being shoved forward by Tavion (cin #9) + ENUM2STRING(BOTH_CONSTRAINER1LOOP), //# Tavion walking with Jan in a loop (cin #9) + ENUM2STRING(BOTH_CONSTRAINEE1LOOP), //# Jan walking with Tavion in a loop (cin #9) + ENUM2STRING(BOTH_SABERKILLER1), //# Tavion about to strike Jan with saber (cin #9) + ENUM2STRING(BOTH_SABERKILLEE1), //# Jan about to be struck by Tavion with saber (cin #9) + ENUM2STRING(BOTH_HANDSHAKER1START), //# Luke shaking Kyle's hand (cin #37) + ENUM2STRING(BOTH_HANDSHAKER1LOOP), //# Luke shaking Kyle's hand (cin #37) + ENUM2STRING(BOTH_HANDSHAKEE1START), //# Kyle shaking Luke's hand (cin #37) + ENUM2STRING(BOTH_HANDSHAKEE1LOOP), //# Kyle shaking Luke's hand (cin #37) + ENUM2STRING(BOTH_LAUGH1START), //# Reelo leaning forward before laughing (cin #18) + ENUM2STRING(BOTH_LAUGH1STOP), //# Reelo laughing (cin #18) + ENUM2STRING(BOTH_ESCAPEPOD_LEAVE1), //# Kyle leaving escape pod (cin #33) + ENUM2STRING(BOTH_ESCAPEPOD_LEAVE2), //# Jan leaving escape pod (cin #33) + ENUM2STRING(BOTH_HUGGER1), //# Kyle hugging Jan (cin #29) + ENUM2STRING(BOTH_HUGGERSTOP1), //# Kyle stop hugging Jan but don't let her go (cin #29) + ENUM2STRING(BOTH_HUGGERSTOP2), //# Kyle let go of Jan and step back (cin #29) + ENUM2STRING(BOTH_HUGGEE1), //# Jan being hugged (cin #29) + ENUM2STRING(BOTH_HUGGEESTOP1), //# Jan stop being hugged but don't let go (cin #29) + ENUM2STRING(BOTH_HUGGEESTOP2), //# Jan released from hug (cin #29) + ENUM2STRING(BOTH_KISSER1), //# Temp until the Kiss anim gets split up + ENUM2STRING(BOTH_KISSER1START1), //# Kyle start kissing Jan + ENUM2STRING(BOTH_KISSER1START2), //# Kyle start kissing Jan + ENUM2STRING(BOTH_KISSER1LOOP), //# Kyle loop kissing Jan + ENUM2STRING(BOTH_KISSER1STOP), //# Temp until the Kiss anim gets split up + ENUM2STRING(BOTH_KISSER1STOP1), //# Kyle stop kissing but don't let go + ENUM2STRING(BOTH_KISSER1STOP2), //# Kyle step back from Jan + ENUM2STRING(BOTH_KISSEE1), //# Temp until the Kiss anim gets split up + ENUM2STRING(BOTH_KISSEE1START1), //# Jan start being kissed + ENUM2STRING(BOTH_KISSEE1START2), //# Jan start2 being kissed + ENUM2STRING(BOTH_KISSEE1LOOP), //# Jan loop being kissed + ENUM2STRING(BOTH_KISSEE1STOP), //# Temp until the Kiss anim gets split up + ENUM2STRING(BOTH_KISSEE1STOP1), //# Jan stop being kissed but don't let go + ENUM2STRING(BOTH_KISSEE1STOP2), //# Jan wait for Kyle to step back + ENUM2STRING(BOTH_BARTENDER_IDLE1), //# Bartender idle in cin #15 + ENUM2STRING(BOTH_BARTENDER_THROW1), //# Bartender throws glass in cin #15 + ENUM2STRING(BOTH_BARTENDER_COWERSTART), //# Start of Bartender raising both hands up in surrender (cin #16) + ENUM2STRING(BOTH_BARTENDER_COWERLOOP), //# Loop of Bartender waving both hands in surrender (cin #16) + ENUM2STRING(BOTH_BARTENDER_COWER), //# Single frame of Bartender waving both hands in surrender (cin #16) + ENUM2STRING(BOTH_THREATEN1_START), //# First frame of Kyle threatening Bartender with lightsaber (cin #16) + ENUM2STRING(BOTH_THREATEN1), //# Kyle threatening Bartender with lightsaber (cin #16) + ENUM2STRING(BOTH_RADIO_ONOFF), //# Mech Galak turning on his suit radio (cin #32) + ENUM2STRING(BOTH_TRIUMPHANT1START), //# Mech Galak raising his arms in victory (cin #32) + ENUM2STRING(BOTH_TRIUMPHANT1STARTGESTURE), //# Mech Galak raising his arms in victory (cin #32) + ENUM2STRING(BOTH_TRIUMPHANT1STOP), //# Mech Galak lowering his arms in victory (cin #32) + + ENUM2STRING(BOTH_SABERTHROW1START), //# Desann throwing his light saber (cin #26) + ENUM2STRING(BOTH_SABERTHROW1STOP), //# Desann throwing his light saber (cin #26) + ENUM2STRING(BOTH_SABERTHROW2START), //# Kyle throwing his light saber (cin #32) + ENUM2STRING(BOTH_SABERTHROW2STOP), //# Kyle throwing his light saber (cin #32) + + ENUM2STRING(BOTH_COVERUP1_LOOP), //# animation of getting in line of friendly fire + ENUM2STRING(BOTH_COVERUP1_START), //# transitions from stand to coverup1_loop + ENUM2STRING(BOTH_COVERUP1_END), //# transitions from coverup1_loop to stand + + ENUM2STRING(BOTH_INJURED4), //# Injured pose 4 + ENUM2STRING(BOTH_INJURED4TO5), //# Transition from INJURED4 to INJURED5 + ENUM2STRING(BOTH_INJURED5), //# Injured pose 5 + + //# #sep ENUM2STRING(BOTH_ SITTING/CROUCHING + ENUM2STRING(BOTH_SIT1STAND), //# Stand up from First sitting anim + ENUM2STRING(BOTH_SIT1), //# Normal chair sit. + ENUM2STRING(BOTH_SIT2), //# Lotus position. + ENUM2STRING(BOTH_SIT3), //# Sitting in tired position), elbows on knees + + ENUM2STRING(BOTH_SIT2TO3), //# Trans from sit2 to sit3? + ENUM2STRING(BOTH_SIT2TOSTAND5), //# Transition from sit 2 to stand 5 + ENUM2STRING(BOTH_STAND5TOSIT2), //# Transition from stand 5 to sit 2 + ENUM2STRING(BOTH_SIT2TOSIT4), //# Trans from sit2 to sit4 (cin #12) Luke leaning back from lotus position. + ENUM2STRING(BOTH_SIT3TO1), //# Trans from sit3 to sit1? + ENUM2STRING(BOTH_SIT3TO2), //# Trans from sit3 to sit2? + ENUM2STRING(BOTH_SIT3TOSTAND5), //# transition from sit 3 to stand 5 + + ENUM2STRING(BOTH_SIT4TO5), //# Trans from sit4 to sit5 + ENUM2STRING(BOTH_SIT4TO6), //# Trans from sit4 to sit6 + ENUM2STRING(BOTH_SIT5TO4), //# Trans from sit5 to sit4 + ENUM2STRING(BOTH_SIT5TO6), //# Trans from sit5 to sit6 + ENUM2STRING(BOTH_SIT6TO4), //# Trans from sit6 to sit4 + ENUM2STRING(BOTH_SIT6TO5), //# Trans from sit6 to sit5 + ENUM2STRING(BOTH_SIT7), //# sitting with arms over knees), no weapon + ENUM2STRING(BOTH_SIT7TOSTAND1), //# getting up from sit7 into stand1 + + ENUM2STRING(BOTH_CROUCH1), //# Transition from standing to crouch + ENUM2STRING(BOTH_CROUCH1IDLE), //# Crouching idle + ENUM2STRING(BOTH_CROUCH1WALK), //# Walking while crouched + ENUM2STRING(BOTH_CROUCH1WALKBACK), //# Walking while crouched + ENUM2STRING(BOTH_UNCROUCH1), //# Transition from crouch to standing + ENUM2STRING(BOTH_CROUCH2IDLE), //# crouch and resting on back righ heel), no weapon + ENUM2STRING(BOTH_CROUCH2TOSTAND1), //# going from crouch2 to stand1 + ENUM2STRING(BOTH_CROUCH3), //# Desann crouching down to Kyle (cin 9) + ENUM2STRING(BOTH_UNCROUCH3), //# Desann uncrouching down to Kyle (cin 9) + ENUM2STRING(BOTH_CROUCH4), //# Slower version of crouch1 for cinematics + ENUM2STRING(BOTH_UNCROUCH4), //# Slower version of uncrouch1 for cinematics + ENUM2STRING(BOTH_GET_UP1), //# Get up from the ground), face down + ENUM2STRING(BOTH_GET_UP2), //# Get up from the ground), face up + + ENUM2STRING(BOTH_COCKPIT_SIT), //# sit in a cockpit. + + ENUM2STRING(BOTH_GUNSIT1), //# sitting on an emplaced gun. + + ENUM2STRING(BOTH_DEATH14_UNGRIP), //# Desann's end death (cin #35) + ENUM2STRING(BOTH_DEATH14_SITUP), //# Tavion sitting up after having been thrown (cin #23) + ENUM2STRING(BOTH_KNEES1), //# Tavion on her knees + ENUM2STRING(BOTH_KNEES2), //# Tavion on her knees looking down + ENUM2STRING(BOTH_KNEES2TO1), //# Transition of KNEES2 to KNEES1 + + ENUM2STRING(BOTH_RUMMAGE1START), //# Kyle rummaging for crystal (cin 2) + ENUM2STRING(BOTH_RUMMAGE1), //# Kyle rummaging for crystal (cin 2) + ENUM2STRING(BOTH_RUMMAGE1STOP), //# Kyle rummaging for crystal (cin 2) + + ENUM2STRING(BOTH_HOLDGLASS1), //# Bartender holds glass (cin# 14) + ENUM2STRING(BOTH_SLIDEGLASS1), //# Bartender slides glass (cin# 14) + ENUM2STRING(BOTH_SLAMSABERDOWN), //# Kyle slamming his saber on the bar top (cin# 14) + + //# #sep ENUM2STRING(BOTH_ MOVING + ENUM2STRING(BOTH_WALK1), //# Normal walk + ENUM2STRING(BOTH_WALK2), //# Normal walk + ENUM2STRING(BOTH_WALK3), //# Goes with stand3 + ENUM2STRING(BOTH_WALK4), //# Walk cycle goes to a stand4 + ENUM2STRING(BOTH_WALK5), //# Tavion taunting Kyle (cin 22) + ENUM2STRING(BOTH_WALK6), //# Slow walk for Luke (cin 12) + ENUM2STRING(BOTH_WALK7), //# Fast walk + ENUM2STRING(BOTH_WALK8), //# Normal walk with hands behind back (Luke in cin#12) + ENUM2STRING(BOTH_WALK9), //# Lando walk (cin #17) + ENUM2STRING(BOTH_WALK10), //# Lando walk (cin #17) + ENUM2STRING(BOTH_WALKTORUN1), //# transition from walk to run + ENUM2STRING(BOTH_RUN1), //# Full run + ENUM2STRING(BOTH_RUN1START), //# Start into full run1 + ENUM2STRING(BOTH_RUN1STOP), //# Stop from full run1 + ENUM2STRING(BOTH_RUN2), //# Full run + ENUM2STRING(BOTH_RUNINJURED1), //# Run with injured left leg + ENUM2STRING(BOTH_STRAFE_LEFT1), //# Sidestep left), should loop + ENUM2STRING(BOTH_STRAFE_RIGHT1), //# Sidestep right), should loop + ENUM2STRING(BOTH_RUNSTRAFE_LEFT1), //# Sidestep left), should loop + ENUM2STRING(BOTH_RUNSTRAFE_RIGHT1), //# Sidestep right), should loop + ENUM2STRING(BOTH_TURN_LEFT1), //# Turn left), should loop + ENUM2STRING(BOTH_TURN_RIGHT1), //# Turn right), should loop + ENUM2STRING(BOTH_TURNSTAND1), //# Turn from STAND1 position + ENUM2STRING(BOTH_TURNSTAND2), //# Turn from STAND2 position + ENUM2STRING(BOTH_TURNSTAND3), //# Turn from STAND3 position + ENUM2STRING(BOTH_TURNSTAND4), //# Turn from STAND4 position + ENUM2STRING(BOTH_TURNSTAND5), //# Turn from STAND5 position + ENUM2STRING(BOTH_TURNCROUCH1), //# Turn from CROUCH1 position + ENUM2STRING(BOTH_RUNAWAY1), //# Running scared + ENUM2STRING(BOTH_SWIM1), //# Swimming + + ENUM2STRING(BOTH_WALKBACK1), //# Walk1 backwards + ENUM2STRING(BOTH_WALKBACK2), //# Walk2 backwards + ENUM2STRING(BOTH_RUNBACK1), //# Run1 backwards + ENUM2STRING(BOTH_RUNBACK2), //# Run1 backwards + + //# #sep BOTH_ JUMPING + ENUM2STRING(BOTH_JUMP1), //# Jump - wind-up and leave ground + ENUM2STRING(BOTH_INAIR1), //# In air loop (from jump) + ENUM2STRING(BOTH_LAND1), //# Landing (from in air loop) + ENUM2STRING(BOTH_LAND2), //# Landing Hard (from a great height) + + ENUM2STRING(BOTH_JUMPBACK1), //# Jump backwards - wind-up and leave ground + ENUM2STRING(BOTH_INAIRBACK1), //# In air loop (from jump back) + ENUM2STRING(BOTH_LANDBACK1), //# Landing backwards(from in air loop) + + ENUM2STRING(BOTH_JUMPLEFT1), //# Jump left - wind-up and leave ground + ENUM2STRING(BOTH_INAIRLEFT1), //# In air loop (from jump left) + ENUM2STRING(BOTH_LANDLEFT1), //# Landing left(from in air loop) + + ENUM2STRING(BOTH_JUMPRIGHT1), //# Jump right - wind-up and leave ground + ENUM2STRING(BOTH_INAIRRIGHT1), //# In air loop (from jump right) + ENUM2STRING(BOTH_LANDRIGHT1), //# Landing right(from in air loop) + + ENUM2STRING(BOTH_FORCEJUMP1), //# Jump - wind-up and leave ground + ENUM2STRING(BOTH_FORCEINAIR1), //# In air loop (from jump) + ENUM2STRING(BOTH_FORCELAND1), //# Landing (from in air loop) + + ENUM2STRING(BOTH_FORCEJUMPBACK1), //# Jump backwards - wind-up and leave ground + ENUM2STRING(BOTH_FORCEINAIRBACK1), //# In air loop (from jump back) + ENUM2STRING(BOTH_FORCELANDBACK1), //# Landing backwards(from in air loop) + + ENUM2STRING(BOTH_FORCEJUMPLEFT1), //# Jump left - wind-up and leave ground + ENUM2STRING(BOTH_FORCEINAIRLEFT1), //# In air loop (from jump left) + ENUM2STRING(BOTH_FORCELANDLEFT1), //# Landing left(from in air loop) + + ENUM2STRING(BOTH_FORCEJUMPRIGHT1), //# Jump right - wind-up and leave ground + ENUM2STRING(BOTH_FORCEINAIRRIGHT1), //# In air loop (from jump right) + ENUM2STRING(BOTH_FORCELANDRIGHT1), //# Landing right(from in air loop) + //# #sep BOTH_ ACROBATICS + ENUM2STRING(BOTH_FLIP_F), //# Flip forward + ENUM2STRING(BOTH_FLIP_B), //# Flip backwards + ENUM2STRING(BOTH_FLIP_L), //# Flip left + ENUM2STRING(BOTH_FLIP_R), //# Flip right + + ENUM2STRING(BOTH_ROLL_F), //# Roll forward + ENUM2STRING(BOTH_ROLL_B), //# Roll backward + ENUM2STRING(BOTH_ROLL_L), //# Roll left + ENUM2STRING(BOTH_ROLL_R), //# Roll right + ENUM2STRING(BOTH_ROLL_FR), //# Roll forward right + ENUM2STRING(BOTH_ROLL_FL), //# Roll forward left + ENUM2STRING(BOTH_ROLL_BR), //# Roll back right + ENUM2STRING(BOTH_ROLL_BL), //# Roll back left + + ENUM2STRING(BOTH_HOP_F), //# quickstep forward + ENUM2STRING(BOTH_HOP_B), //# quickstep backwards + ENUM2STRING(BOTH_HOP_L), //# quickstep left + ENUM2STRING(BOTH_HOP_R), //# quickstep right + + ENUM2STRING(BOTH_DODGE_FL), //# lean-dodge forward left + ENUM2STRING(BOTH_DODGE_FR), //# lean-dodge forward right + ENUM2STRING(BOTH_DODGE_BL), //# lean-dodge backwards left + ENUM2STRING(BOTH_DODGE_BR), //# lean-dodge backwards right + ENUM2STRING(BOTH_DODGE_L), //# lean-dodge left + ENUM2STRING(BOTH_DODGE_R), //# lean-dodge right + + ENUM2STRING(BOTH_DIVE1), //# Dive! + + ENUM2STRING(BOTH_ENGAGETAUNT), + ENUM2STRING(BOTH_ARIAL_LEFT), //# + ENUM2STRING(BOTH_ARIAL_RIGHT), //# + ENUM2STRING(BOTH_CARTWHEEL_LEFT), //# + ENUM2STRING(BOTH_CARTWHEEL_RIGHT), //# + ENUM2STRING(BOTH_FLIP_LEFT), //# + ENUM2STRING(BOTH_FLIP_BACK1), //# + ENUM2STRING(BOTH_FLIP_BACK2), //# + ENUM2STRING(BOTH_FLIP_BACK3), //# + ENUM2STRING(BOTH_BUTTERFLY_LEFT), //# + ENUM2STRING(BOTH_BUTTERFLY_RIGHT), //# + ENUM2STRING(BOTH_WALL_RUN_RIGHT), //# + ENUM2STRING(BOTH_WALL_RUN_RIGHT_FLIP),//# + ENUM2STRING(BOTH_WALL_RUN_RIGHT_STOP),//# + ENUM2STRING(BOTH_WALL_RUN_LEFT), //# + ENUM2STRING(BOTH_WALL_RUN_LEFT_FLIP),//# + ENUM2STRING(BOTH_WALL_RUN_LEFT_STOP),//# + ENUM2STRING(BOTH_WALL_FLIP_RIGHT), //# + ENUM2STRING(BOTH_WALL_FLIP_LEFT), //# + ENUM2STRING(BOTH_WALL_FLIP_FWD), //# + ENUM2STRING(BOTH_KNOCKDOWN1), //# knocked backwards + ENUM2STRING(BOTH_KNOCKDOWN2), //# knocked backwards hard + ENUM2STRING(BOTH_KNOCKDOWN3), //# knocked forwards + ENUM2STRING(BOTH_KNOCKDOWN4), //# knocked backwards from crouch + ENUM2STRING(BOTH_KNOCKDOWN5), //# dupe of 3 - will be removed + ENUM2STRING(BOTH_GETUP1), //# + ENUM2STRING(BOTH_GETUP2), //# + ENUM2STRING(BOTH_GETUP3), //# + ENUM2STRING(BOTH_GETUP4), //# + ENUM2STRING(BOTH_GETUP5), //# + ENUM2STRING(BOTH_GETUP_CROUCH_F1), //# + ENUM2STRING(BOTH_GETUP_CROUCH_B1), //# + ENUM2STRING(BOTH_FORCE_GETUP_F1), //# + ENUM2STRING(BOTH_FORCE_GETUP_F2), //# + ENUM2STRING(BOTH_FORCE_GETUP_B1), //# + ENUM2STRING(BOTH_FORCE_GETUP_B2), //# + ENUM2STRING(BOTH_FORCE_GETUP_B3), //# + ENUM2STRING(BOTH_FORCE_GETUP_B4), //# + ENUM2STRING(BOTH_FORCE_GETUP_B5), //# + ENUM2STRING(BOTH_FORCE_GETUP_B6), //# + ENUM2STRING(BOTH_WALL_FLIP_BACK1), //# + ENUM2STRING(BOTH_WALL_FLIP_BACK2), //# + ENUM2STRING(BOTH_SPIN1), //# + ENUM2STRING(BOTH_CEILING_CLING), //# clinging to ceiling + ENUM2STRING(BOTH_CEILING_DROP), //# dropping from ceiling cling + + //TESTING + ENUM2STRING(BOTH_FJSS_TR_BL), //# jump spin slash tr to bl + ENUM2STRING(BOTH_FJSS_TL_BR), //# jump spin slash bl to tr + ENUM2STRING(BOTH_DEATHFROMBACKSLASH),//# + ENUM2STRING(BOTH_RIGHTHANDCHOPPEDOFF),//# + ENUM2STRING(BOTH_DEFLECTSLASH__R__L_FIN),//# + ENUM2STRING(BOTH_BASHED1),//# + ENUM2STRING(BOTH_ARIAL_F1),//# + ENUM2STRING(BOTH_BUTTERFLY_FR1),//# + ENUM2STRING(BOTH_BUTTERFLY_FL1),//# + + //# #sep BOTH_ MISC MOVEMENT + ENUM2STRING(BOTH_HIT1), //# Kyle hit by crate in cin #9 + ENUM2STRING(BOTH_LADDER_UP1), //# Climbing up a ladder with rungs at 16 unit intervals + ENUM2STRING(BOTH_LADDER_DWN1), //# Climbing down a ladder with rungs at 16 unit intervals + ENUM2STRING(BOTH_LADDER_IDLE), //# Just sitting on the ladder + ENUM2STRING(BOTH_ONLADDER_BOT1), //# Getting on the ladder at the bottom + ENUM2STRING(BOTH_OFFLADDER_BOT1), //# Getting off the ladder at the bottom + ENUM2STRING(BOTH_ONLADDER_TOP1), //# Getting on the ladder at the top + ENUM2STRING(BOTH_OFFLADDER_TOP1), //# Getting off the ladder at the top + ENUM2STRING(BOTH_LIFT1), //# Lifting someone/thing over their shoulder + ENUM2STRING(BOTH_STEP1), //# telsia checking out lake cinematic9.2 + ENUM2STRING(BOTH_HITWALL1), //# cin.18), Kenn hit by borg into wall 56 units away + ENUM2STRING(BOTH_AMBUSHLAND1), //# landing from fall on victim + ENUM2STRING(BOTH_BIRTH1), //# birth from jumping through walls + + //# #sep ENUM2STRING(BOTH_ FLYING IDLE + ENUM2STRING(BOTH_FLY_IDLE1), //# Flying Idle 1 + ENUM2STRING(BOTH_FLY_IDLE2), //# Flying Idle 2 + ENUM2STRING(BOTH_FLY_SHIELDED), //# For sentry droid, shields in + + + //# #sep ENUM2STRING(BOTH_ FLYING MOVING + ENUM2STRING(BOTH_FLY_START1), //# Start flying + ENUM2STRING(BOTH_FLY_STOP1), //# Stop flying + ENUM2STRING(BOTH_FLY_LOOP1), //# Normal flying), should loop + ENUM2STRING(BOTH_FLOAT1), //# Crew floating through space 1 + ENUM2STRING(BOTH_FLOAT2), //# Crew floating through space 2 + ENUM2STRING(BOTH_FLOATCONSOLE1), //# Crew floating and working on console + + //# #sep BOTH_ SWIMMING + ENUM2STRING(BOTH_SWIM_IDLE1), //# Swimming Idle 1 + ENUM2STRING(BOTH_SWIMFORWARD), //# Swim forward loop + + //# #sep ENUM2STRING(BOTH_ LYING + ENUM2STRING(BOTH_LIE_DOWN1), //# From a stand position), get down on ground), face down + ENUM2STRING(BOTH_LIE_DOWN2), //# From a stand position), get down on ground), face up + ENUM2STRING(BOTH_LIE_DOWN3), //# reaction to local disnode being destroyed + ENUM2STRING(BOTH_PAIN2WRITHE1), //# Transition from upright position to writhing on ground anim + ENUM2STRING(BOTH_PRONE2RLEG), //# Lying on ground reach to grab right leg + ENUM2STRING(BOTH_PRONE2LLEG), //# Lying on ground reach to grab left leg + ENUM2STRING(BOTH_WRITHING1), //# Lying on ground on back writhing in pain + ENUM2STRING(BOTH_WRITHING1RLEG), //# Lying on ground writhing in pain), holding right leg + ENUM2STRING(BOTH_WRITHING1LLEG), //# Lying on ground writhing in pain), holding left leg + ENUM2STRING(BOTH_WRITHING2), //# Lying on ground on front writhing in pain + ENUM2STRING(BOTH_INJURED1), //# Lying down), against wall - can also be sleeping against wall + ENUM2STRING(BOTH_INJURED2), //# Injured pose 2 + ENUM2STRING(BOTH_INJURED3), //# Injured pose 3 + ENUM2STRING(BOTH_INJURED6), //# Injured pose 6 + ENUM2STRING(BOTH_INJURED6ATTACKSTART), //# Start attack while in injured 6 pose + ENUM2STRING(BOTH_INJURED6ATTACKSTOP), //# End attack while in injured 6 pose + ENUM2STRING(BOTH_INJURED6COMBADGE), //# Hit combadge while in injured 6 pose + ENUM2STRING(BOTH_INJURED6POINT), //# Chang points to door while in injured state + ENUM2STRING(BOTH_INJUREDTOSTAND1), //# Runinjured to stand1 + + ENUM2STRING(BOTH_PROPUP1), //# Kyle getting up from having been knocked down (cin #9 end) + ENUM2STRING(BOTH_CRAWLBACK1), //# Lying on back), crawling backwards with elbows + ENUM2STRING(BOTH_SITWALL1), //# Sitting against a wall + ENUM2STRING(BOTH_SLEEP1), //# laying on back-rknee up-rhand on torso + ENUM2STRING(BOTH_SLEEP2), //# on floor-back against wall-arms crossed + ENUM2STRING(BOTH_SLEEP3), //# Sleeping in a chair + ENUM2STRING(BOTH_SLEEP4), //# Sleeping slumped over table + ENUM2STRING(BOTH_SLEEP5), //# Laying on side sleeping on flat sufrace + ENUM2STRING(BOTH_SLEEP6START), //# Kyle leaning back to sleep (cin 20) + ENUM2STRING(BOTH_SLEEP6STOP), //# Kyle waking up and shaking his head (cin 21) + ENUM2STRING(BOTH_SLEEP1GETUP), //# alarmed and getting up out of sleep1 pose to stand + ENUM2STRING(BOTH_SLEEP1GETUP2), //# + ENUM2STRING(BOTH_SLEEP2GETUP), //# alarmed and getting up out of sleep2 pose to stand + ENUM2STRING(BOTH_SLEEP3GETUP), //# alarmed and getting up out of sleep3 pose to stand + ENUM2STRING(BOTH_SLEEP3DEATH), //# death in chair), from sleep3 idle + ENUM2STRING(BOTH_SLEEP3DEAD), //# death in chair), from sleep3 idle + + ENUM2STRING(BOTH_SLEEP_IDLE1), //# rub face and nose while asleep from sleep pose 1 + ENUM2STRING(BOTH_SLEEP_IDLE2), //# shift position while asleep - stays in sleep2 + ENUM2STRING(BOTH_SLEEP_IDLE3), //# Idle anim from sleep pose 3 + ENUM2STRING(BOTH_SLEEP_IDLE4), //# Idle anim from sleep pose 4 + ENUM2STRING(BOTH_SLEEP1_NOSE), //# Scratch nose from SLEEP1 pose + ENUM2STRING(BOTH_SLEEP2_SHIFT), //# Shift in sleep from SLEEP2 pose + ENUM2STRING(BOTH_RESTRAINED1), //# Telsia tied to medical table + ENUM2STRING(BOTH_RESTRAINED1POINT), //# Telsia tied to medical table pointing at Munro + ENUM2STRING(BOTH_LIFTED1), //# Fits with ENUM2STRING(BOTH_LIFT1), lifted on shoulder + ENUM2STRING(BOTH_CARRIED1), //# Fits with ENUM2STRING(TORSO_CARRY1), carried over shoulder + ENUM2STRING(BOTH_CARRIED2), //# Laying over object + + ENUM2STRING(BOTH_CHOKE1START), //# tavion in force grip choke + ENUM2STRING(BOTH_CHOKE1STARTHOLD), //# loop of tavion in force grip choke + ENUM2STRING(BOTH_CHOKE1), //# tavion in force grip choke + + ENUM2STRING(BOTH_CHOKE2), //# tavion recovering from force grip choke + ENUM2STRING(BOTH_CHOKE3), //# left-handed choke (for people still holding a weapon) + + //# #sep ENUM2STRING(BOTH_ HUNTER-SEEKER BOT-SPECIFIC + ENUM2STRING(BOTH_POWERUP1), //# Wakes up + + ENUM2STRING(BOTH_TURNON), //# Protocol Droid wakes up + ENUM2STRING(BOTH_TURNOFF), //# Protocol Droid shuts off + ENUM2STRING(BOTH_BUTTON1), //# Single button push with right hand + ENUM2STRING(BOTH_BUTTON2), //# Single button push with left finger + ENUM2STRING(BOTH_BUTTON_HOLD), //# Single button hold with left hand + ENUM2STRING(BOTH_BUTTON_RELEASE), //# Single button release with left hand + + //# JEDI-SPECIFIC + ENUM2STRING(BOTH_RESISTPUSH), //# plant yourself to resist force push/pulls. + ENUM2STRING(BOTH_FORCEPUSH), //# Use off-hand to do force power. + ENUM2STRING(BOTH_FORCEPULL), //# Use off-hand to do force power. + ENUM2STRING(BOTH_MINDTRICK1), //# Use off-hand to do mind trick + ENUM2STRING(BOTH_MINDTRICK2), //# Use off-hand to do distraction + ENUM2STRING(BOTH_FORCELIGHTNING), //# Use off-hand to do lightning + ENUM2STRING(BOTH_FORCELIGHTNING_START), //# Use off-hand to do lightning - start + ENUM2STRING(BOTH_FORCELIGHTNING_HOLD), //# Use off-hand to do lightning - hold + ENUM2STRING(BOTH_FORCELIGHTNING_RELEASE),//# Use off-hand to do lightning - release + ENUM2STRING(BOTH_FORCEHEAL_START), //# Healing meditation pose start + ENUM2STRING(BOTH_FORCEHEAL_STOP), //# Healing meditation pose end + ENUM2STRING(BOTH_FORCEHEAL_QUICK), //# Healing meditation gesture + ENUM2STRING(BOTH_SABERPULL), //# Use off-hand to do force power. + ENUM2STRING(BOTH_FORCEGRIP1), //# force-gripping (no anim?) + ENUM2STRING(BOTH_FORCEGRIP3), //# force-gripping (right-hand) + ENUM2STRING(BOTH_FORCEGRIP3THROW), //# throwing while force-gripping (right hand) + ENUM2STRING(BOTH_FORCEGRIP_HOLD), //# Use off-hand to do grip - hold + ENUM2STRING(BOTH_FORCEGRIP_RELEASE),//# Use off-hand to do grip - release + ENUM2STRING(BOTH_TOSS1), //# throwing to left after force gripping + ENUM2STRING(BOTH_TOSS2), //# throwing to right after force gripping + + ENUM2STRING(BOTH_COCKPIT_TALKR1START), //# turn head from straight forward to looking full right + ENUM2STRING(BOTH_COCKPIT_TALKR1STARTTOMID), //# from TALKR1START to looking at hologram (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKR1MIDTOSTART), //# from looking at hologram to TALKR1START (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKR1STOP), //# return head to straight forward from BOTH_COCKPIT_TALKR1 + ENUM2STRING(BOTH_COCKPIT_TALKR1STOPTOMID), //# from TALKR1STOP to TALKR1MID + ENUM2STRING(BOTH_COCKPIT_TALKR1MIDTOSTOP), //# from looking at hologram to TALKR1STOP (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKR1), //# talk to right side + + ENUM2STRING(BOTH_COCKPIT_TALKL1START), //# turn head from straight forward to looking full left + ENUM2STRING(BOTH_COCKPIT_TALKL1STARTTOMID), //# from TALKL1START to looking at hologram (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKL1MIDTOSTART), //# from looking at hologram to TALKL1START (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKL1STOP), //# return head to straight forward from BOTH_COCKPIT_TALKL1 + ENUM2STRING(BOTH_COCKPIT_TALKL1STOPTOMID), //# from TALKL1STOP to TALKL1MID + ENUM2STRING(BOTH_COCKPIT_TALKL1MIDTOSTOP), //# from looking at hologram to TALKL1STOP (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKL1), //# talk to left side + + ENUM2STRING(BOTH_COCKPIT_CONSOLE1), //# type at controls + ENUM2STRING(BOTH_COCKPIT_CONSOLE2), //# type at controls + ENUM2STRING(BOTH_COCKPIT_CONSOLE2_PARTIAL), //# last part of console2 anim (cin #1) used by Jan + + ENUM2STRING(BOTH_COCKPIT_HEADNOD), //# nod head yes while sitting + ENUM2STRING(BOTH_COCKPIT_HEADSHAKE), //# shake head no while sitting + + ENUM2STRING(BOTH_COCKPIT_HEADTILTLSTART), //# start tilt head left while sitting + ENUM2STRING(BOTH_COCKPIT_HEADTILTLSTOP), //# stop tilt head left while sitting + ENUM2STRING(BOTH_COCKPIT_HEADTILTRSTART), //# start tilt head right while sitting + ENUM2STRING(BOTH_COCKPIT_HEADTILTRSTOP), //# stop tilt head right while sitting + + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE7START), //# Lando's supporting hand to Kyle (cin #21) + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE7STOP), //# Lando's supporting hand away from Kyle (cin #21) + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE8START), //# Hand to Lando's chin (cin #21) + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE8STOP), //# hand away from Lando's chin *cin #21) + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE11START), //# + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE11STOP), //# + + ENUM2STRING(BOTH_COCKPIT_SLEEP6START), //# + ENUM2STRING(BOTH_COCKPIT_SLEEP6STOP), //# + + //================================================= + //ANIMS IN WHICH ONLY THE UPPER OBJECTS ARE IN MD3 + //================================================= + //# #sep ENUM2STRING(TORSO_ WEAPON-RELATED + ENUM2STRING(TORSO_DROPWEAP1), //# Put weapon away + ENUM2STRING(TORSO_DROPWEAP2), //# Put weapon away + ENUM2STRING(TORSO_DROPWEAP3), //# Put weapon away + ENUM2STRING(TORSO_DROPWEAP4), //# Put weapon away + ENUM2STRING(TORSO_RAISEWEAP1), //# Draw Weapon + ENUM2STRING(TORSO_RAISEWEAP2), //# Draw Weapon + ENUM2STRING(TORSO_RAISEWEAP3), //# Draw Weapon + ENUM2STRING(TORSO_RAISEWEAP4), //# Draw Weapon + ENUM2STRING(TORSO_WEAPONREADY1), //# Ready to fire stun baton + ENUM2STRING(TORSO_WEAPONREADY2), //# Ready to fire one-handed blaster pistol + ENUM2STRING(TORSO_WEAPONREADY3), //# Ready to fire blaster rifle + ENUM2STRING(TORSO_WEAPONREADY4), //# Ready to fire sniper rifle + ENUM2STRING(TORSO_WEAPONREADY5), //# Ready to fire bowcaster + ENUM2STRING(TORSO_WEAPONREADY6), //# Ready to fire ??? + ENUM2STRING(TORSO_WEAPONREADY7), //# Ready to fire ??? + ENUM2STRING(TORSO_WEAPONREADY8), //# Ready to fire ??? + ENUM2STRING(TORSO_WEAPONREADY9), //# Ready to fire rocket launcher + ENUM2STRING(TORSO_WEAPONREADY10), //# Ready to fire thermal det + ENUM2STRING(TORSO_WEAPONREADY11), //# Ready to fire laser trap + ENUM2STRING(TORSO_WEAPONREADY12), //# Ready to fire detpack + ENUM2STRING(TORSO_WEAPONIDLE1), //# Holding stun baton + ENUM2STRING(TORSO_WEAPONIDLE2), //# Holding one-handed blaster + ENUM2STRING(TORSO_WEAPONIDLE3), //# Holding blaster rifle + ENUM2STRING(TORSO_WEAPONIDLE4), //# Holding sniper rifle + ENUM2STRING(TORSO_WEAPONIDLE5), //# Holding bowcaster + ENUM2STRING(TORSO_WEAPONIDLE6), //# Holding ??? + ENUM2STRING(TORSO_WEAPONIDLE7), //# Holding ??? + ENUM2STRING(TORSO_WEAPONIDLE8), //# Holding ??? + ENUM2STRING(TORSO_WEAPONIDLE9), //# Holding rocket launcher + ENUM2STRING(TORSO_WEAPONIDLE10), //# Holding thermal det + ENUM2STRING(TORSO_WEAPONIDLE11), //# Holding laser trap + ENUM2STRING(TORSO_WEAPONIDLE12), //# Holding detpack + + //# #sep ENUM2STRING(TORSO_ USING NON-WEAPON OBJECTS + + //# #sep ENUM2STRING(TORSO_ MISC + ENUM2STRING(TORSO_HANDGESTURE1), //# gestures to left one hand + ENUM2STRING(TORSO_HANDGESTURE2), //# gestures to right one hand + ENUM2STRING(TORSO_HANDGESTURE3), //# gestures to the left both hands + ENUM2STRING(TORSO_HANDGESTURE4), //# gestures to the right both hands + + ENUM2STRING(TORSO_HANDEXTEND1), //# doctor reaching for hypospray in scav5 + ENUM2STRING(TORSO_HANDRETRACT1), //# doctor taking hypospray from player in scav5 + + ENUM2STRING(TORSO_DROPHELMET1), //# Drop the helmet to the waist + ENUM2STRING(TORSO_RAISEHELMET1), //# Bring the helmet to the head + ENUM2STRING(TORSO_REACHHELMET1), //# reaching for helmet off of 60 tall cabinet + ENUM2STRING(TORSO_GRABLBACKL), //# reach to lower back with left hand + ENUM2STRING(TORSO_GRABUBACKL), //# reach to upper back with left hand + ENUM2STRING(TORSO_GRABLBACKR), //# reach to lower back with right hand + ENUM2STRING(TORSO_GRABUBACKR), //# reach to upper back with right hand + + ENUM2STRING(TORSO_SURRENDER_START), //# arms up + ENUM2STRING(TORSO_SURRENDER_STOP), //# arms back down + ENUM2STRING(TORSO_CHOKING1), //# TEMP + + + //================================================= + //ANIMS IN WHICH ONLY THE LOWER OBJECTS ARE IN MD3 + //================================================= + //# #sep Legs-only anims + ENUM2STRING(LEGS_WALKBACK1), //# Walk1 backwards + ENUM2STRING(LEGS_WALKBACK2), //# Walk2 backwards + ENUM2STRING(LEGS_RUNBACK1), //# Run1 backwards + ENUM2STRING(LEGS_RUNBACK2), //# Run2 backwards + ENUM2STRING(LEGS_TURN1), //# What legs do when you turn your lower body to match your upper body facing + ENUM2STRING(LEGS_TURN2), //# Leg turning from stand2 + ENUM2STRING(LEGS_LEAN_LEFT1), //# Lean left + ENUM2STRING(LEGS_LEAN_RIGHT1), //# Lean Right + ENUM2STRING(LEGS_KNEELDOWN1), //# Get down on one knee? + ENUM2STRING(LEGS_KNEELUP1), //# Get up from one knee? + ENUM2STRING(LEGS_CRLEAN_LEFT1), //# Crouch Lean left + ENUM2STRING(LEGS_CRLEAN_RIGHT1), //# Crouch Lean Right + ENUM2STRING(LEGS_CHOKING1), //# TEMP + ENUM2STRING(LEGS_LEFTUP1), //# On a slope with left foot 4 higher than right + ENUM2STRING(LEGS_LEFTUP2), //# On a slope with left foot 8 higher than right + ENUM2STRING(LEGS_LEFTUP3), //# On a slope with left foot 12 higher than right + ENUM2STRING(LEGS_LEFTUP4), //# On a slope with left foot 16 higher than right + ENUM2STRING(LEGS_LEFTUP5), //# On a slope with left foot 20 higher than right + ENUM2STRING(LEGS_RIGHTUP1), //# On a slope with RIGHT foot 4 higher than left + ENUM2STRING(LEGS_RIGHTUP2), //# On a slope with RIGHT foot 8 higher than left + ENUM2STRING(LEGS_RIGHTUP3), //# On a slope with RIGHT foot 12 higher than left + ENUM2STRING(LEGS_RIGHTUP4), //# On a slope with RIGHT foot 16 higher than left + ENUM2STRING(LEGS_RIGHTUP5), //# On a slope with RIGHT foot 20 higher than left + ENUM2STRING(LEGS_S1_LUP1), + ENUM2STRING(LEGS_S1_LUP2), + ENUM2STRING(LEGS_S1_LUP3), + ENUM2STRING(LEGS_S1_LUP4), + ENUM2STRING(LEGS_S1_LUP5), + ENUM2STRING(LEGS_S1_RUP1), + ENUM2STRING(LEGS_S1_RUP2), + ENUM2STRING(LEGS_S1_RUP3), + ENUM2STRING(LEGS_S1_RUP4), + ENUM2STRING(LEGS_S1_RUP5), + ENUM2STRING(LEGS_S3_LUP1), + ENUM2STRING(LEGS_S3_LUP2), + ENUM2STRING(LEGS_S3_LUP3), + ENUM2STRING(LEGS_S3_LUP4), + ENUM2STRING(LEGS_S3_LUP5), + ENUM2STRING(LEGS_S3_RUP1), + ENUM2STRING(LEGS_S3_RUP2), + ENUM2STRING(LEGS_S3_RUP3), + ENUM2STRING(LEGS_S3_RUP4), + ENUM2STRING(LEGS_S3_RUP5), + ENUM2STRING(LEGS_S4_LUP1), + ENUM2STRING(LEGS_S4_LUP2), + ENUM2STRING(LEGS_S4_LUP3), + ENUM2STRING(LEGS_S4_LUP4), + ENUM2STRING(LEGS_S4_LUP5), + ENUM2STRING(LEGS_S4_RUP1), + ENUM2STRING(LEGS_S4_RUP2), + ENUM2STRING(LEGS_S4_RUP3), + ENUM2STRING(LEGS_S4_RUP4), + ENUM2STRING(LEGS_S4_RUP5), + ENUM2STRING(LEGS_S5_LUP1), + ENUM2STRING(LEGS_S5_LUP2), + ENUM2STRING(LEGS_S5_LUP3), + ENUM2STRING(LEGS_S5_LUP4), + ENUM2STRING(LEGS_S5_LUP5), + ENUM2STRING(LEGS_S5_RUP1), + ENUM2STRING(LEGS_S5_RUP2), + ENUM2STRING(LEGS_S5_RUP3), + ENUM2STRING(LEGS_S5_RUP4), + ENUM2STRING(LEGS_S5_RUP5), + + //================================================= + //HEAD ANIMS + //================================================= + //# #sep Head-only anims + ENUM2STRING(FACE_TALK1), //# quiet + ENUM2STRING(FACE_TALK2), //# semi-quiet + ENUM2STRING(FACE_TALK3), //# semi-loud + ENUM2STRING(FACE_TALK4), //# loud + ENUM2STRING(FACE_ALERT), //# + ENUM2STRING(FACE_SMILE), //# + ENUM2STRING(FACE_FROWN), //# + ENUM2STRING(FACE_DEAD), //# + + //must be terminated + NULL,-1 +}; diff --git a/code/cgame/animtable.h b/code/cgame/animtable.h new file mode 100644 index 0000000..8ef31d1 --- /dev/null +++ b/code/cgame/animtable.h @@ -0,0 +1,1368 @@ +// special file included only by cg_players.cpp & ui_players.cpp +// +// moved it from the original header file for PCH reasons... +// + +stringID_table_t animTable [MAX_ANIMATIONS+1] = +{ + //================================================= + //ANIMS IN WHICH UPPER AND LOWER OBJECTS ARE IN MD3 + //================================================= + ENUM2STRING(BOTH_1CRUFTFORGIL), //# G2 cannot have a reverse anim at beginning of file + //# #sep ENUM2STRING(BOTH_ DEATHS + ENUM2STRING(BOTH_DEATH1), //# First Death anim + ENUM2STRING(BOTH_DEATH2), //# Second Death anim + ENUM2STRING(BOTH_DEATH3), //# Third Death anim + ENUM2STRING(BOTH_DEATH4), //# Fourth Death anim + ENUM2STRING(BOTH_DEATH5), //# Fifth Death anim + ENUM2STRING(BOTH_DEATH6), //# Sixth Death anim + ENUM2STRING(BOTH_DEATH7), //# Seventh Death anim + ENUM2STRING(BOTH_DEATH8), //# + ENUM2STRING(BOTH_DEATH9), //# + ENUM2STRING(BOTH_DEATH10), //# + ENUM2STRING(BOTH_DEATH11), //# + ENUM2STRING(BOTH_DEATH12), //# + ENUM2STRING(BOTH_DEATH13), //# + ENUM2STRING(BOTH_DEATH14), //# + ENUM2STRING(BOTH_DEATH15), //# + ENUM2STRING(BOTH_DEATH16), //# + ENUM2STRING(BOTH_DEATH17), //# + ENUM2STRING(BOTH_DEATH18), //# + ENUM2STRING(BOTH_DEATH19), //# + ENUM2STRING(BOTH_DEATH20), //# + ENUM2STRING(BOTH_DEATH21), //# + ENUM2STRING(BOTH_DEATH22), //# + ENUM2STRING(BOTH_DEATH23), //# + ENUM2STRING(BOTH_DEATH24), //# + ENUM2STRING(BOTH_DEATH25), //# + + ENUM2STRING(BOTH_DEATHFORWARD1), //# First Death in which they get thrown forward + ENUM2STRING(BOTH_DEATHFORWARD2), //# Second Death in which they get thrown forward + ENUM2STRING(BOTH_DEATHFORWARD3), //# Tavion's falling in cin# 23 + ENUM2STRING(BOTH_DEATHBACKWARD1), //# First Death in which they get thrown backward + ENUM2STRING(BOTH_DEATHBACKWARD2), //# Second Death in which they get thrown backward + + ENUM2STRING(BOTH_DEATH1IDLE), //# Idle while close to death + ENUM2STRING(BOTH_LYINGDEATH1), //# Death to play when killed lying down + ENUM2STRING(BOTH_STUMBLEDEATH1), //# Stumble forward and fall face first death + ENUM2STRING(BOTH_FALLDEATH1), //# Fall forward off a high cliff and splat death - start + ENUM2STRING(BOTH_FALLDEATH1INAIR), //# Fall forward off a high cliff and splat death - loop + ENUM2STRING(BOTH_FALLDEATH1LAND), //# Fall forward off a high cliff and splat death - hit bottom + ENUM2STRING(BOTH_DEATH_ROLL), //# Death anim from a roll + ENUM2STRING(BOTH_DEATH_FLIP), //# Death anim from a flip + ENUM2STRING(BOTH_DEATH_SPIN_90_R), //# Death anim when facing 90 degrees right + ENUM2STRING(BOTH_DEATH_SPIN_90_L), //# Death anim when facing 90 degrees left + ENUM2STRING(BOTH_DEATH_SPIN_180), //# Death anim when facing backwards + ENUM2STRING(BOTH_DEATH_LYING_UP), //# Death anim when lying on back + ENUM2STRING(BOTH_DEATH_LYING_DN), //# Death anim when lying on front + ENUM2STRING(BOTH_DEATH_FALLING_DN), //# Death anim when falling on face + ENUM2STRING(BOTH_DEATH_FALLING_UP), //# Death anim when falling on back + ENUM2STRING(BOTH_DEATH_CROUCHED), //# Death anim when crouched + //# #sep ENUM2STRING(BOTH_ DEAD POSES # Should be last frame of corresponding previous anims + ENUM2STRING(BOTH_DEAD1), //# First Death finished pose + ENUM2STRING(BOTH_DEAD2), //# Second Death finished pose + ENUM2STRING(BOTH_DEAD3), //# Third Death finished pose + ENUM2STRING(BOTH_DEAD4), //# Fourth Death finished pose + ENUM2STRING(BOTH_DEAD5), //# Fifth Death finished pose + ENUM2STRING(BOTH_DEAD6), //# Sixth Death finished pose + ENUM2STRING(BOTH_DEAD7), //# Seventh Death finished pose + ENUM2STRING(BOTH_DEAD8), //# + ENUM2STRING(BOTH_DEAD9), //# + ENUM2STRING(BOTH_DEAD10), //# + ENUM2STRING(BOTH_DEAD11), //# + ENUM2STRING(BOTH_DEAD12), //# + ENUM2STRING(BOTH_DEAD13), //# + ENUM2STRING(BOTH_DEAD14), //# + ENUM2STRING(BOTH_DEAD15), //# + ENUM2STRING(BOTH_DEAD16), //# + ENUM2STRING(BOTH_DEAD17), //# + ENUM2STRING(BOTH_DEAD18), //# + ENUM2STRING(BOTH_DEAD19), //# + ENUM2STRING(BOTH_DEAD20), //# + ENUM2STRING(BOTH_DEAD21), //# + ENUM2STRING(BOTH_DEAD22), //# + ENUM2STRING(BOTH_DEAD23), //# + ENUM2STRING(BOTH_DEAD24), //# + ENUM2STRING(BOTH_DEAD25), //# + ENUM2STRING(BOTH_DEADFORWARD1), //# First thrown forward death finished pose + ENUM2STRING(BOTH_DEADFORWARD2), //# Second thrown forward death finished pose + ENUM2STRING(BOTH_DEADBACKWARD1), //# First thrown backward death finished pose + ENUM2STRING(BOTH_DEADBACKWARD2), //# Second thrown backward death finished pose + ENUM2STRING(BOTH_LYINGDEAD1), //# Killed lying down death finished pose + ENUM2STRING(BOTH_STUMBLEDEAD1), //# Stumble forward death finished pose + ENUM2STRING(BOTH_FALLDEAD1LAND), //# Fall forward and splat death finished pose + //# #sep ENUM2STRING(BOTH_ DEAD TWITCH/FLOP # React to being shot from death poses + ENUM2STRING(BOTH_DEADFLOP1), //# React to being shot from First Death finished pose + ENUM2STRING(BOTH_DEADFLOP2), //# React to being shot from Second Death finished pose + ENUM2STRING(BOTH_DEADFLOP3), //# React to being shot from Third Death finished pose + ENUM2STRING(BOTH_DEADFLOP4), //# React to being shot from Fourth Death finished pose + ENUM2STRING(BOTH_DEADFLOP5), //# React to being shot from Fifth Death finished pose + ENUM2STRING(BOTH_DEADFORWARD1_FLOP), //# React to being shot First thrown forward death finished pose + ENUM2STRING(BOTH_DEADFORWARD2_FLOP), //# React to being shot Second thrown forward death finished pose + ENUM2STRING(BOTH_DEADBACKWARD1_FLOP), //# React to being shot First thrown backward death finished pose + ENUM2STRING(BOTH_DEADBACKWARD2_FLOP), //# React to being shot Second thrown backward death finished pose + ENUM2STRING(BOTH_LYINGDEAD1_FLOP), //# React to being shot Killed lying down death finished pose + ENUM2STRING(BOTH_STUMBLEDEAD1_FLOP), //# React to being shot Stumble forward death finished pose + ENUM2STRING(BOTH_FALLDEAD1_FLOP), //# React to being shot Fall forward and splat death finished pose + ENUM2STRING(BOTH_DISMEMBER_HEAD1), //# + ENUM2STRING(BOTH_DISMEMBER_TORSO1), //# + ENUM2STRING(BOTH_DISMEMBER_LLEG), //# + ENUM2STRING(BOTH_DISMEMBER_RLEG), //# + ENUM2STRING(BOTH_DISMEMBER_RARM), //# + ENUM2STRING(BOTH_DISMEMBER_LARM), //# + //# #sep ENUM2STRING(BOTH_ PAINS + ENUM2STRING(BOTH_PAIN1), //# First take pain anim + ENUM2STRING(BOTH_PAIN2), //# Second take pain anim + ENUM2STRING(BOTH_PAIN3), //# Third take pain anim + ENUM2STRING(BOTH_PAIN4), //# Fourth take pain anim + ENUM2STRING(BOTH_PAIN5), //# Fifth take pain anim - from behind + ENUM2STRING(BOTH_PAIN6), //# Sixth take pain anim - from behind + ENUM2STRING(BOTH_PAIN7), //# Seventh take pain anim - from behind + ENUM2STRING(BOTH_PAIN8), //# Eigth take pain anim - from behind + ENUM2STRING(BOTH_PAIN9), //# + ENUM2STRING(BOTH_PAIN10), //# + ENUM2STRING(BOTH_PAIN11), //# + ENUM2STRING(BOTH_PAIN12), //# + ENUM2STRING(BOTH_PAIN13), //# + ENUM2STRING(BOTH_PAIN14), //# + ENUM2STRING(BOTH_PAIN15), //# + ENUM2STRING(BOTH_PAIN16), //# + ENUM2STRING(BOTH_PAIN17), //# + ENUM2STRING(BOTH_PAIN18), //# + ENUM2STRING(BOTH_PAIN19), //# + ENUM2STRING(BOTH_PAIN20), //# GETTING SHOCKED + + //# #sep ENUM2STRING(BOTH_ ATTACKS + ENUM2STRING(BOTH_ATTACK1), //# Attack with stun baton + ENUM2STRING(BOTH_ATTACK2), //# Attack with one-handed pistol + ENUM2STRING(BOTH_ATTACK2IDLE1), //# Idle with one-handed pistol + ENUM2STRING(BOTH_ATTACK3), //# Attack with blaster rifle + ENUM2STRING(BOTH_ATTACK4), //# Attack with disruptor + ENUM2STRING(BOTH_ATTACK5), //# Attack with bow caster + ENUM2STRING(BOTH_ATTACK6), //# Attack with ??? + ENUM2STRING(BOTH_ATTACK7), //# Attack with ??? + ENUM2STRING(BOTH_ATTACK8), //# Attack with ??? + ENUM2STRING(BOTH_ATTACK9), //# Attack with rocket launcher + ENUM2STRING(BOTH_ATTACK10), //# Attack with thermal det + ENUM2STRING(BOTH_ATTACK11), //# Attack with laser trap + ENUM2STRING(BOTH_ATTACK12), //# Attack with detpack + ENUM2STRING(BOTH_MELEE1), //# First melee attack + ENUM2STRING(BOTH_MELEE2), //# Second melee attack + ENUM2STRING(BOTH_MELEE3), //# Third melee attack + ENUM2STRING(BOTH_MELEE4), //# Fourth melee attack + ENUM2STRING(BOTH_MELEE5), //# Fifth melee attack + ENUM2STRING(BOTH_MELEE6), //# Sixth melee attack + ENUM2STRING(BOTH_THERMAL_READY), //# pull back with thermal + ENUM2STRING(BOTH_THERMAL_THROW), //# throw thermal + //* #sep ENUM2STRING(BOTH_ SABER ANIMS + //Saber attack anims - power level 2 + ENUM2STRING(BOTH_A1_T__B_), //# Fast weak vertical attack top to bottom + ENUM2STRING(BOTH_A1__L__R), //# Fast weak horizontal attack left to right + ENUM2STRING(BOTH_A1__R__L), //# Fast weak horizontal attack right to left + ENUM2STRING(BOTH_A1_TL_BR), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A1_BR_TL), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A1_BL_TR), //# Fast weak diagonal attack bottom left to top right + ENUM2STRING(BOTH_A1_TR_BL), //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + ENUM2STRING(BOTH_T1_BR__R), //# Fast arc bottom right to right + ENUM2STRING(BOTH_T1_BR_TL), //# Fast weak spin bottom right to top left + ENUM2STRING(BOTH_T1_BR__L), //# Fast weak spin bottom right to left + ENUM2STRING(BOTH_T1_BR_BL), //# Fast weak spin bottom right to bottom left + ENUM2STRING(BOTH_T1__R_TR), //# Fast arc right to top right + ENUM2STRING(BOTH_T1__R_TL), //# Fast arc right to top left + ENUM2STRING(BOTH_T1__R__L), //# Fast weak spin right to left + ENUM2STRING(BOTH_T1__R_BL), //# Fast weak spin right to bottom left + ENUM2STRING(BOTH_T1_TR_BR), //# Fast arc top right to bottom right + ENUM2STRING(BOTH_T1_TR_TL), //# Fast arc top right to top left + ENUM2STRING(BOTH_T1_TR__L), //# Fast arc top right to left + ENUM2STRING(BOTH_T1_TR_BL), //# Fast weak spin top right to bottom left + ENUM2STRING(BOTH_T1_T__BR), //# Fast arc top to bottom right + ENUM2STRING(BOTH_T1_T___R), //# Fast arc top to right + ENUM2STRING(BOTH_T1_T__TR), //# Fast arc top to top right + ENUM2STRING(BOTH_T1_T__TL), //# Fast arc top to top left + ENUM2STRING(BOTH_T1_T___L), //# Fast arc top to left + ENUM2STRING(BOTH_T1_T__BL), //# Fast arc top to bottom left + ENUM2STRING(BOTH_T1_TL_BR), //# Fast weak spin top left to bottom right + ENUM2STRING(BOTH_T1_TL_BL), //# Fast arc top left to bottom left + ENUM2STRING(BOTH_T1__L_BR), //# Fast weak spin left to bottom right + ENUM2STRING(BOTH_T1__L__R), //# Fast weak spin left to right + ENUM2STRING(BOTH_T1__L_TL), //# Fast arc left to top left + ENUM2STRING(BOTH_T1_BL_BR), //# Fast weak spin bottom left to bottom right + ENUM2STRING(BOTH_T1_BL__R), //# Fast weak spin bottom left to right + ENUM2STRING(BOTH_T1_BL_TR), //# Fast weak spin bottom left to top right + ENUM2STRING(BOTH_T1_BL__L), //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + ENUM2STRING(BOTH_T1_BR_TR), //# Fast arc bottom right to top right (use: ENUM2STRING(BOTH_T1_TR_BR) + ENUM2STRING(BOTH_T1_BR_T_), //# Fast arc bottom right to top (use: ENUM2STRING(BOTH_T1_T__BR) + ENUM2STRING(BOTH_T1__R_BR), //# Fast arc right to bottom right (use: ENUM2STRING(BOTH_T1_BR__R) + ENUM2STRING(BOTH_T1__R_T_), //# Fast ar right to top (use: ENUM2STRING(BOTH_T1_T___R) + ENUM2STRING(BOTH_T1_TR__R), //# Fast arc top right to right (use: ENUM2STRING(BOTH_T1__R_TR) + ENUM2STRING(BOTH_T1_TR_T_), //# Fast arc top right to top (use: ENUM2STRING(BOTH_T1_T__TR) + ENUM2STRING(BOTH_T1_TL__R), //# Fast arc top left to right (use: ENUM2STRING(BOTH_T1__R_TL) + ENUM2STRING(BOTH_T1_TL_TR), //# Fast arc top left to top right (use: ENUM2STRING(BOTH_T1_TR_TL) + ENUM2STRING(BOTH_T1_TL_T_), //# Fast arc top left to top (use: ENUM2STRING(BOTH_T1_T__TL) + ENUM2STRING(BOTH_T1_TL__L), //# Fast arc top left to left (use: ENUM2STRING(BOTH_T1__L_TL) + ENUM2STRING(BOTH_T1__L_TR), //# Fast arc left to top right (use: ENUM2STRING(BOTH_T1_TR__L) + ENUM2STRING(BOTH_T1__L_T_), //# Fast arc left to top (use: ENUM2STRING(BOTH_T1_T___L) + ENUM2STRING(BOTH_T1__L_BL), //# Fast arc left to bottom left (use: ENUM2STRING(BOTH_T1_BL__L) + ENUM2STRING(BOTH_T1_BL_T_), //# Fast arc bottom left to top (use: ENUM2STRING(BOTH_T1_T__BL) + ENUM2STRING(BOTH_T1_BL_TL), //# Fast arc bottom left to top left (use: ENUM2STRING(BOTH_T1_TL_BL) + //Saber Attack Start Transitions + ENUM2STRING(BOTH_S1_S1_T_), //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + ENUM2STRING(BOTH_S1_S1__L), //# Fast plain transition from stance1 to left-to-right Fast weak attack + ENUM2STRING(BOTH_S1_S1__R), //# Fast plain transition from stance1 to right-to-left Fast weak attack + ENUM2STRING(BOTH_S1_S1_TL), //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + ENUM2STRING(BOTH_S1_S1_BR), //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + ENUM2STRING(BOTH_S1_S1_BL), //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + ENUM2STRING(BOTH_S1_S1_TR), //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + ENUM2STRING(BOTH_R1_B__S1), //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + ENUM2STRING(BOTH_R1__L_S1), //# Fast plain transition from left-to-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R1__R_S1), //# Fast plain transition from right-to-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R1_TL_S1), //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R1_BR_S1), //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R1_BL_S1), //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R1_TR_S1), //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack), played backwards) + ENUM2STRING(BOTH_B1_BR___), //# Bounce-back if attack from BR is blocked + ENUM2STRING(BOTH_B1__R___), //# Bounce-back if attack from R is blocked + ENUM2STRING(BOTH_B1_TR___), //# Bounce-back if attack from TR is blocked + ENUM2STRING(BOTH_B1_T____), //# Bounce-back if attack from T is blocked + ENUM2STRING(BOTH_B1_TL___), //# Bounce-back if attack from TL is blocked + ENUM2STRING(BOTH_B1__L___), //# Bounce-back if attack from L is blocked + ENUM2STRING(BOTH_B1_BL___), //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + ENUM2STRING(BOTH_D1_BR___), //# Deflection toward BR + ENUM2STRING(BOTH_D1__R___), //# Deflection toward R + ENUM2STRING(BOTH_D1_TR___), //# Deflection toward TR + ENUM2STRING(BOTH_D1_TL___), //# Deflection toward TL + ENUM2STRING(BOTH_D1__L___), //# Deflection toward L + ENUM2STRING(BOTH_D1_BL___), //# Deflection toward BL + ENUM2STRING(BOTH_D1_B____), //# Deflection toward B + //Saber attack anims - power level 2 + ENUM2STRING(BOTH_A2_T__B_), //# Fast weak vertical attack top to bottom + ENUM2STRING(BOTH_A2__L__R), //# Fast weak horizontal attack left to right + ENUM2STRING(BOTH_A2__R__L), //# Fast weak horizontal attack right to left + ENUM2STRING(BOTH_A2_TL_BR), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A2_BR_TL), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A2_BL_TR), //# Fast weak diagonal attack bottom left to top right + ENUM2STRING(BOTH_A2_TR_BL), //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + ENUM2STRING(BOTH_T2_BR__R), //# Fast arc bottom right to right + ENUM2STRING(BOTH_T2_BR_TL), //# Fast weak spin bottom right to top left + ENUM2STRING(BOTH_T2_BR__L), //# Fast weak spin bottom right to left + ENUM2STRING(BOTH_T2_BR_BL), //# Fast weak spin bottom right to bottom left + ENUM2STRING(BOTH_T2__R_TR), //# Fast arc right to top right + ENUM2STRING(BOTH_T2__R_TL), //# Fast arc right to top left + ENUM2STRING(BOTH_T2__R__L), //# Fast weak spin right to left + ENUM2STRING(BOTH_T2__R_BL), //# Fast weak spin right to bottom left + ENUM2STRING(BOTH_T2_TR_BR), //# Fast arc top right to bottom right + ENUM2STRING(BOTH_T2_TR_TL), //# Fast arc top right to top left + ENUM2STRING(BOTH_T2_TR__L), //# Fast arc top right to left + ENUM2STRING(BOTH_T2_TR_BL), //# Fast weak spin top right to bottom left + ENUM2STRING(BOTH_T2_T__BR), //# Fast arc top to bottom right + ENUM2STRING(BOTH_T2_T___R), //# Fast arc top to right + ENUM2STRING(BOTH_T2_T__TR), //# Fast arc top to top right + ENUM2STRING(BOTH_T2_T__TL), //# Fast arc top to top left + ENUM2STRING(BOTH_T2_T___L), //# Fast arc top to left + ENUM2STRING(BOTH_T2_T__BL), //# Fast arc top to bottom left + ENUM2STRING(BOTH_T2_TL_BR), //# Fast weak spin top left to bottom right + ENUM2STRING(BOTH_T2_TL_BL), //# Fast arc top left to bottom left + ENUM2STRING(BOTH_T2__L_BR), //# Fast weak spin left to bottom right + ENUM2STRING(BOTH_T2__L__R), //# Fast weak spin left to right + ENUM2STRING(BOTH_T2__L_TL), //# Fast arc left to top left + ENUM2STRING(BOTH_T2_BL_BR), //# Fast weak spin bottom left to bottom right + ENUM2STRING(BOTH_T2_BL__R), //# Fast weak spin bottom left to right + ENUM2STRING(BOTH_T2_BL_TR), //# Fast weak spin bottom left to top right + ENUM2STRING(BOTH_T2_BL__L), //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + ENUM2STRING(BOTH_T2_BR_TR), //# Fast arc bottom right to top right (use: ENUM2STRING(BOTH_T2_TR_BR) + ENUM2STRING(BOTH_T2_BR_T_), //# Fast arc bottom right to top (use: ENUM2STRING(BOTH_T2_T__BR) + ENUM2STRING(BOTH_T2__R_BR), //# Fast arc right to bottom right (use: ENUM2STRING(BOTH_T2_BR__R) + ENUM2STRING(BOTH_T2__R_T_), //# Fast ar right to top (use: ENUM2STRING(BOTH_T2_T___R) + ENUM2STRING(BOTH_T2_TR__R), //# Fast arc top right to right (use: ENUM2STRING(BOTH_T2__R_TR) + ENUM2STRING(BOTH_T2_TR_T_), //# Fast arc top right to top (use: ENUM2STRING(BOTH_T2_T__TR) + ENUM2STRING(BOTH_T2_TL__R), //# Fast arc top left to right (use: ENUM2STRING(BOTH_T2__R_TL) + ENUM2STRING(BOTH_T2_TL_TR), //# Fast arc top left to top right (use: ENUM2STRING(BOTH_T2_TR_TL) + ENUM2STRING(BOTH_T2_TL_T_), //# Fast arc top left to top (use: ENUM2STRING(BOTH_T2_T__TL) + ENUM2STRING(BOTH_T2_TL__L), //# Fast arc top left to left (use: ENUM2STRING(BOTH_T2__L_TL) + ENUM2STRING(BOTH_T2__L_TR), //# Fast arc left to top right (use: ENUM2STRING(BOTH_T2_TR__L) + ENUM2STRING(BOTH_T2__L_T_), //# Fast arc left to top (use: ENUM2STRING(BOTH_T2_T___L) + ENUM2STRING(BOTH_T2__L_BL), //# Fast arc left to bottom left (use: ENUM2STRING(BOTH_T2_BL__L) + ENUM2STRING(BOTH_T2_BL_T_), //# Fast arc bottom left to top (use: ENUM2STRING(BOTH_T2_T__BL) + ENUM2STRING(BOTH_T2_BL_TL), //# Fast arc bottom left to top left (use: ENUM2STRING(BOTH_T2_TL_BL) + //Saber Attack Start Transitions + ENUM2STRING(BOTH_S2_S1_T_), //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + ENUM2STRING(BOTH_S2_S1__L), //# Fast plain transition from stance1 to left-to-right Fast weak attack + ENUM2STRING(BOTH_S2_S1__R), //# Fast plain transition from stance1 to right-to-left Fast weak attack + ENUM2STRING(BOTH_S2_S1_TL), //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + ENUM2STRING(BOTH_S2_S1_BR), //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + ENUM2STRING(BOTH_S2_S1_BL), //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + ENUM2STRING(BOTH_S2_S1_TR), //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + ENUM2STRING(BOTH_R2_B__S1), //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + ENUM2STRING(BOTH_R2__L_S1), //# Fast plain transition from left-to-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R2__R_S1), //# Fast plain transition from right-to-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R2_TL_S1), //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R2_BR_S1), //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R2_BL_S1), //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R2_TR_S1), //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack), played backwards) + ENUM2STRING(BOTH_B2_BR___), //# Bounce-back if attack from BR is blocked + ENUM2STRING(BOTH_B2__R___), //# Bounce-back if attack from R is blocked + ENUM2STRING(BOTH_B2_TR___), //# Bounce-back if attack from TR is blocked + ENUM2STRING(BOTH_B2_T____), //# Bounce-back if attack from T is blocked + ENUM2STRING(BOTH_B2_TL___), //# Bounce-back if attack from TL is blocked + ENUM2STRING(BOTH_B2__L___), //# Bounce-back if attack from L is blocked + ENUM2STRING(BOTH_B2_BL___), //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + ENUM2STRING(BOTH_D2_BR___), //# Deflection toward BR + ENUM2STRING(BOTH_D2__R___), //# Deflection toward R + ENUM2STRING(BOTH_D2_TR___), //# Deflection toward TR + ENUM2STRING(BOTH_D2_TL___), //# Deflection toward TL + ENUM2STRING(BOTH_D2__L___), //# Deflection toward L + ENUM2STRING(BOTH_D2_BL___), //# Deflection toward BL + ENUM2STRING(BOTH_D2_B____), //# Deflection toward B + //Saber attack anims - power level 3 + ENUM2STRING(BOTH_A3_T__B_), //# Fast weak vertical attack top to bottom + ENUM2STRING(BOTH_A3__L__R), //# Fast weak horizontal attack left to right + ENUM2STRING(BOTH_A3__R__L), //# Fast weak horizontal attack right to left + ENUM2STRING(BOTH_A3_TL_BR), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A3_BR_TL), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A3_BL_TR), //# Fast weak diagonal attack bottom left to top right + ENUM2STRING(BOTH_A3_TR_BL), //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + ENUM2STRING(BOTH_T3_BR__R), //# Fast arc bottom right to right + ENUM2STRING(BOTH_T3_BR_TL), //# Fast weak spin bottom right to top left + ENUM2STRING(BOTH_T3_BR__L), //# Fast weak spin bottom right to left + ENUM2STRING(BOTH_T3_BR_BL), //# Fast weak spin bottom right to bottom left + ENUM2STRING(BOTH_T3__R_TR), //# Fast arc right to top right + ENUM2STRING(BOTH_T3__R_TL), //# Fast arc right to top left + ENUM2STRING(BOTH_T3__R__L), //# Fast weak spin right to left + ENUM2STRING(BOTH_T3__R_BL), //# Fast weak spin right to bottom left + ENUM2STRING(BOTH_T3_TR_BR), //# Fast arc top right to bottom right + ENUM2STRING(BOTH_T3_TR_TL), //# Fast arc top right to top left + ENUM2STRING(BOTH_T3_TR__L), //# Fast arc top right to left + ENUM2STRING(BOTH_T3_TR_BL), //# Fast weak spin top right to bottom left + ENUM2STRING(BOTH_T3_T__BR), //# Fast arc top to bottom right + ENUM2STRING(BOTH_T3_T___R), //# Fast arc top to right + ENUM2STRING(BOTH_T3_T__TR), //# Fast arc top to top right + ENUM2STRING(BOTH_T3_T__TL), //# Fast arc top to top left + ENUM2STRING(BOTH_T3_T___L), //# Fast arc top to left + ENUM2STRING(BOTH_T3_T__BL), //# Fast arc top to bottom left + ENUM2STRING(BOTH_T3_TL_BR), //# Fast weak spin top left to bottom right + ENUM2STRING(BOTH_T3_TL_BL), //# Fast arc top left to bottom left + ENUM2STRING(BOTH_T3__L_BR), //# Fast weak spin left to bottom right + ENUM2STRING(BOTH_T3__L__R), //# Fast weak spin left to right + ENUM2STRING(BOTH_T3__L_TL), //# Fast arc left to top left + ENUM2STRING(BOTH_T3_BL_BR), //# Fast weak spin bottom left to bottom right + ENUM2STRING(BOTH_T3_BL__R), //# Fast weak spin bottom left to right + ENUM2STRING(BOTH_T3_BL_TR), //# Fast weak spin bottom left to top right + ENUM2STRING(BOTH_T3_BL__L), //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + ENUM2STRING(BOTH_T3_BR_TR), //# Fast arc bottom right to top right (use: ENUM2STRING(BOTH_T3_TR_BR) + ENUM2STRING(BOTH_T3_BR_T_), //# Fast arc bottom right to top (use: ENUM2STRING(BOTH_T3_T__BR) + ENUM2STRING(BOTH_T3__R_BR), //# Fast arc right to bottom right (use: ENUM2STRING(BOTH_T3_BR__R) + ENUM2STRING(BOTH_T3__R_T_), //# Fast ar right to top (use: ENUM2STRING(BOTH_T3_T___R) + ENUM2STRING(BOTH_T3_TR__R), //# Fast arc top right to right (use: ENUM2STRING(BOTH_T3__R_TR) + ENUM2STRING(BOTH_T3_TR_T_), //# Fast arc top right to top (use: ENUM2STRING(BOTH_T3_T__TR) + ENUM2STRING(BOTH_T3_TL__R), //# Fast arc top left to right (use: ENUM2STRING(BOTH_T3__R_TL) + ENUM2STRING(BOTH_T3_TL_TR), //# Fast arc top left to top right (use: ENUM2STRING(BOTH_T3_TR_TL) + ENUM2STRING(BOTH_T3_TL_T_), //# Fast arc top left to top (use: ENUM2STRING(BOTH_T3_T__TL) + ENUM2STRING(BOTH_T3_TL__L), //# Fast arc top left to left (use: ENUM2STRING(BOTH_T3__L_TL) + ENUM2STRING(BOTH_T3__L_TR), //# Fast arc left to top right (use: ENUM2STRING(BOTH_T3_TR__L) + ENUM2STRING(BOTH_T3__L_T_), //# Fast arc left to top (use: ENUM2STRING(BOTH_T3_T___L) + ENUM2STRING(BOTH_T3__L_BL), //# Fast arc left to bottom left (use: ENUM2STRING(BOTH_T3_BL__L) + ENUM2STRING(BOTH_T3_BL_T_), //# Fast arc bottom left to top (use: ENUM2STRING(BOTH_T3_T__BL) + ENUM2STRING(BOTH_T3_BL_TL), //# Fast arc bottom left to top left (use: ENUM2STRING(BOTH_T3_TL_BL) + //Saber Attack Start Transitions + ENUM2STRING(BOTH_S3_S1_T_), //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + ENUM2STRING(BOTH_S3_S1__L), //# Fast plain transition from stance1 to left-to-right Fast weak attack + ENUM2STRING(BOTH_S3_S1__R), //# Fast plain transition from stance1 to right-to-left Fast weak attack + ENUM2STRING(BOTH_S3_S1_TL), //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + ENUM2STRING(BOTH_S3_S1_BR), //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + ENUM2STRING(BOTH_S3_S1_BL), //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + ENUM2STRING(BOTH_S3_S1_TR), //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + ENUM2STRING(BOTH_R3_B__S1), //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + ENUM2STRING(BOTH_R3__L_S1), //# Fast plain transition from left-to-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R3__R_S1), //# Fast plain transition from right-to-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R3_TL_S1), //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R3_BR_S1), //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R3_BL_S1), //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R3_TR_S1), //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack), played backwards) + ENUM2STRING(BOTH_B3_BR___), //# Bounce-back if attack from BR is blocked + ENUM2STRING(BOTH_B3__R___), //# Bounce-back if attack from R is blocked + ENUM2STRING(BOTH_B3_TR___), //# Bounce-back if attack from TR is blocked + ENUM2STRING(BOTH_B3_T____), //# Bounce-back if attack from T is blocked + ENUM2STRING(BOTH_B3_TL___), //# Bounce-back if attack from TL is blocked + ENUM2STRING(BOTH_B3__L___), //# Bounce-back if attack from L is blocked + ENUM2STRING(BOTH_B3_BL___), //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + ENUM2STRING(BOTH_D3_BR___), //# Deflection toward BR + ENUM2STRING(BOTH_D3__R___), //# Deflection toward R + ENUM2STRING(BOTH_D3_TR___), //# Deflection toward TR + ENUM2STRING(BOTH_D3_TL___), //# Deflection toward TL + ENUM2STRING(BOTH_D3__L___), //# Deflection toward L + ENUM2STRING(BOTH_D3_BL___), //# Deflection toward BL + ENUM2STRING(BOTH_D3_B____), //# Deflection toward B + //Saber attack anims - power level 4 - Desann's + ENUM2STRING(BOTH_A4_T__B_), //# Fast weak vertical attack top to bottom + ENUM2STRING(BOTH_A4__L__R), //# Fast weak horizontal attack left to right + ENUM2STRING(BOTH_A4__R__L), //# Fast weak horizontal attack right to left + ENUM2STRING(BOTH_A4_TL_BR), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A4_BR_TL), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A4_BL_TR), //# Fast weak diagonal attack bottom left to top right + ENUM2STRING(BOTH_A4_TR_BL), //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + ENUM2STRING(BOTH_T4_BR__R), //# Fast arc bottom right to right + ENUM2STRING(BOTH_T4_BR_TL), //# Fast weak spin bottom right to top left + ENUM2STRING(BOTH_T4_BR__L), //# Fast weak spin bottom right to left + ENUM2STRING(BOTH_T4_BR_BL), //# Fast weak spin bottom right to bottom left + ENUM2STRING(BOTH_T4__R_TR), //# Fast arc right to top right + ENUM2STRING(BOTH_T4__R_TL), //# Fast arc right to top left + ENUM2STRING(BOTH_T4__R__L), //# Fast weak spin right to left + ENUM2STRING(BOTH_T4__R_BL), //# Fast weak spin right to bottom left + ENUM2STRING(BOTH_T4_TR_BR), //# Fast arc top right to bottom right + ENUM2STRING(BOTH_T4_TR_TL), //# Fast arc top right to top left + ENUM2STRING(BOTH_T4_TR__L), //# Fast arc top right to left + ENUM2STRING(BOTH_T4_TR_BL), //# Fast weak spin top right to bottom left + ENUM2STRING(BOTH_T4_T__BR), //# Fast arc top to bottom right + ENUM2STRING(BOTH_T4_T___R), //# Fast arc top to right + ENUM2STRING(BOTH_T4_T__TR), //# Fast arc top to top right + ENUM2STRING(BOTH_T4_T__TL), //# Fast arc top to top left + ENUM2STRING(BOTH_T4_T___L), //# Fast arc top to left + ENUM2STRING(BOTH_T4_T__BL), //# Fast arc top to bottom left + ENUM2STRING(BOTH_T4_TL_BR), //# Fast weak spin top left to bottom right + ENUM2STRING(BOTH_T4_TL_BL), //# Fast arc top left to bottom left + ENUM2STRING(BOTH_T4__L_BR), //# Fast weak spin left to bottom right + ENUM2STRING(BOTH_T4__L__R), //# Fast weak spin left to right + ENUM2STRING(BOTH_T4__L_TL), //# Fast arc left to top left + ENUM2STRING(BOTH_T4_BL_BR), //# Fast weak spin bottom left to bottom right + ENUM2STRING(BOTH_T4_BL__R), //# Fast weak spin bottom left to right + ENUM2STRING(BOTH_T4_BL_TR), //# Fast weak spin bottom left to top right + ENUM2STRING(BOTH_T4_BL__L), //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + ENUM2STRING(BOTH_T4_BR_TR), //# Fast arc bottom right to top right (use: ENUM2STRING(BOTH_T4_TR_BR) + ENUM2STRING(BOTH_T4_BR_T_), //# Fast arc bottom right to top (use: ENUM2STRING(BOTH_T4_T__BR) + ENUM2STRING(BOTH_T4__R_BR), //# Fast arc right to bottom right (use: ENUM2STRING(BOTH_T4_BR__R) + ENUM2STRING(BOTH_T4__R_T_), //# Fast ar right to top (use: ENUM2STRING(BOTH_T4_T___R) + ENUM2STRING(BOTH_T4_TR__R), //# Fast arc top right to right (use: ENUM2STRING(BOTH_T4__R_TR) + ENUM2STRING(BOTH_T4_TR_T_), //# Fast arc top right to top (use: ENUM2STRING(BOTH_T4_T__TR) + ENUM2STRING(BOTH_T4_TL__R), //# Fast arc top left to right (use: ENUM2STRING(BOTH_T4__R_TL) + ENUM2STRING(BOTH_T4_TL_TR), //# Fast arc top left to top right (use: ENUM2STRING(BOTH_T4_TR_TL) + ENUM2STRING(BOTH_T4_TL_T_), //# Fast arc top left to top (use: ENUM2STRING(BOTH_T4_T__TL) + ENUM2STRING(BOTH_T4_TL__L), //# Fast arc top left to left (use: ENUM2STRING(BOTH_T4__L_TL) + ENUM2STRING(BOTH_T4__L_TR), //# Fast arc left to top right (use: ENUM2STRING(BOTH_T4_TR__L) + ENUM2STRING(BOTH_T4__L_T_), //# Fast arc left to top (use: ENUM2STRING(BOTH_T4_T___L) + ENUM2STRING(BOTH_T4__L_BL), //# Fast arc left to bottom left (use: ENUM2STRING(BOTH_T4_BL__L) + ENUM2STRING(BOTH_T4_BL_T_), //# Fast arc bottom left to top (use: ENUM2STRING(BOTH_T4_T__BL) + ENUM2STRING(BOTH_T4_BL_TL), //# Fast arc bottom left to top left (use: ENUM2STRING(BOTH_T4_TL_BL) + //Saber Attack Start Transitions + ENUM2STRING(BOTH_S4_S1_T_), //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + ENUM2STRING(BOTH_S4_S1__L), //# Fast plain transition from stance1 to left-to-right Fast weak attack + ENUM2STRING(BOTH_S4_S1__R), //# Fast plain transition from stance1 to right-to-left Fast weak attack + ENUM2STRING(BOTH_S4_S1_TL), //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + ENUM2STRING(BOTH_S4_S1_BR), //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + ENUM2STRING(BOTH_S4_S1_BL), //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + ENUM2STRING(BOTH_S4_S1_TR), //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + ENUM2STRING(BOTH_R4_B__S1), //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + ENUM2STRING(BOTH_R4__L_S1), //# Fast plain transition from left-to-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R4__R_S1), //# Fast plain transition from right-to-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R4_TL_S1), //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R4_BR_S1), //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R4_BL_S1), //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R4_TR_S1), //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack), played backwards) + ENUM2STRING(BOTH_B4_BR___), //# Bounce-back if attack from BR is blocked + ENUM2STRING(BOTH_B4__R___), //# Bounce-back if attack from R is blocked + ENUM2STRING(BOTH_B4_TR___), //# Bounce-back if attack from TR is blocked + ENUM2STRING(BOTH_B4_T____), //# Bounce-back if attack from T is blocked + ENUM2STRING(BOTH_B4_TL___), //# Bounce-back if attack from TL is blocked + ENUM2STRING(BOTH_B4__L___), //# Bounce-back if attack from L is blocked + ENUM2STRING(BOTH_B4_BL___), //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + ENUM2STRING(BOTH_D4_BR___), //# Deflection toward BR + ENUM2STRING(BOTH_D4__R___), //# Deflection toward R + ENUM2STRING(BOTH_D4_TR___), //# Deflection toward TR + ENUM2STRING(BOTH_D4_TL___), //# Deflection toward TL + ENUM2STRING(BOTH_D4__L___), //# Deflection toward L + ENUM2STRING(BOTH_D4_BL___), //# Deflection toward BL + ENUM2STRING(BOTH_D4_B____), //# Deflection toward B + //Saber attack anims - power level 5 - Tavion's + ENUM2STRING(BOTH_A5_T__B_), //# Fast weak vertical attack top to bottom + ENUM2STRING(BOTH_A5__L__R), //# Fast weak horizontal attack left to right + ENUM2STRING(BOTH_A5__R__L), //# Fast weak horizontal attack right to left + ENUM2STRING(BOTH_A5_TL_BR), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A5_BR_TL), //# Fast weak diagonal attack top left to botom right + ENUM2STRING(BOTH_A5_BL_TR), //# Fast weak diagonal attack bottom left to top right + ENUM2STRING(BOTH_A5_TR_BL), //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + ENUM2STRING(BOTH_T5_BR__R), //# Fast arc bottom right to right + ENUM2STRING(BOTH_T5_BR_TL), //# Fast weak spin bottom right to top left + ENUM2STRING(BOTH_T5_BR__L), //# Fast weak spin bottom right to left + ENUM2STRING(BOTH_T5_BR_BL), //# Fast weak spin bottom right to bottom left + ENUM2STRING(BOTH_T5__R_TR), //# Fast arc right to top right + ENUM2STRING(BOTH_T5__R_TL), //# Fast arc right to top left + ENUM2STRING(BOTH_T5__R__L), //# Fast weak spin right to left + ENUM2STRING(BOTH_T5__R_BL), //# Fast weak spin right to bottom left + ENUM2STRING(BOTH_T5_TR_BR), //# Fast arc top right to bottom right + ENUM2STRING(BOTH_T5_TR_TL), //# Fast arc top right to top left + ENUM2STRING(BOTH_T5_TR__L), //# Fast arc top right to left + ENUM2STRING(BOTH_T5_TR_BL), //# Fast weak spin top right to bottom left + ENUM2STRING(BOTH_T5_T__BR), //# Fast arc top to bottom right + ENUM2STRING(BOTH_T5_T___R), //# Fast arc top to right + ENUM2STRING(BOTH_T5_T__TR), //# Fast arc top to top right + ENUM2STRING(BOTH_T5_T__TL), //# Fast arc top to top left + ENUM2STRING(BOTH_T5_T___L), //# Fast arc top to left + ENUM2STRING(BOTH_T5_T__BL), //# Fast arc top to bottom left + ENUM2STRING(BOTH_T5_TL_BR), //# Fast weak spin top left to bottom right + ENUM2STRING(BOTH_T5_TL_BL), //# Fast arc top left to bottom left + ENUM2STRING(BOTH_T5__L_BR), //# Fast weak spin left to bottom right + ENUM2STRING(BOTH_T5__L__R), //# Fast weak spin left to right + ENUM2STRING(BOTH_T5__L_TL), //# Fast arc left to top left + ENUM2STRING(BOTH_T5_BL_BR), //# Fast weak spin bottom left to bottom right + ENUM2STRING(BOTH_T5_BL__R), //# Fast weak spin bottom left to right + ENUM2STRING(BOTH_T5_BL_TR), //# Fast weak spin bottom left to top right + ENUM2STRING(BOTH_T5_BL__L), //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + ENUM2STRING(BOTH_T5_BR_TR), //# Fast arc bottom right to top right (use: ENUM2STRING(BOTH_T5_TR_BR) + ENUM2STRING(BOTH_T5_BR_T_), //# Fast arc bottom right to top (use: ENUM2STRING(BOTH_T5_T__BR) + ENUM2STRING(BOTH_T5__R_BR), //# Fast arc right to bottom right (use: ENUM2STRING(BOTH_T5_BR__R) + ENUM2STRING(BOTH_T5__R_T_), //# Fast ar right to top (use: ENUM2STRING(BOTH_T5_T___R) + ENUM2STRING(BOTH_T5_TR__R), //# Fast arc top right to right (use: ENUM2STRING(BOTH_T5__R_TR) + ENUM2STRING(BOTH_T5_TR_T_), //# Fast arc top right to top (use: ENUM2STRING(BOTH_T5_T__TR) + ENUM2STRING(BOTH_T5_TL__R), //# Fast arc top left to right (use: ENUM2STRING(BOTH_T5__R_TL) + ENUM2STRING(BOTH_T5_TL_TR), //# Fast arc top left to top right (use: ENUM2STRING(BOTH_T5_TR_TL) + ENUM2STRING(BOTH_T5_TL_T_), //# Fast arc top left to top (use: ENUM2STRING(BOTH_T5_T__TL) + ENUM2STRING(BOTH_T5_TL__L), //# Fast arc top left to left (use: ENUM2STRING(BOTH_T5__L_TL) + ENUM2STRING(BOTH_T5__L_TR), //# Fast arc left to top right (use: ENUM2STRING(BOTH_T5_TR__L) + ENUM2STRING(BOTH_T5__L_T_), //# Fast arc left to top (use: ENUM2STRING(BOTH_T5_T___L) + ENUM2STRING(BOTH_T5__L_BL), //# Fast arc left to bottom left (use: ENUM2STRING(BOTH_T5_BL__L) + ENUM2STRING(BOTH_T5_BL_T_), //# Fast arc bottom left to top (use: ENUM2STRING(BOTH_T5_T__BL) + ENUM2STRING(BOTH_T5_BL_TL), //# Fast arc bottom left to top left (use: ENUM2STRING(BOTH_T5_TL_BL) + //Saber Attack Start Transitions + ENUM2STRING(BOTH_S5_S1_T_), //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + ENUM2STRING(BOTH_S5_S1__L), //# Fast plain transition from stance1 to left-to-right Fast weak attack + ENUM2STRING(BOTH_S5_S1__R), //# Fast plain transition from stance1 to right-to-left Fast weak attack + ENUM2STRING(BOTH_S5_S1_TL), //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + ENUM2STRING(BOTH_S5_S1_BR), //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + ENUM2STRING(BOTH_S5_S1_BL), //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + ENUM2STRING(BOTH_S5_S1_TR), //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + ENUM2STRING(BOTH_R5_B__S1), //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + ENUM2STRING(BOTH_R5__L_S1), //# Fast plain transition from left-to-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R5__R_S1), //# Fast plain transition from right-to-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R5_TL_S1), //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R5_BR_S1), //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + ENUM2STRING(BOTH_R5_BL_S1), //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + ENUM2STRING(BOTH_R5_TR_S1), //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack), played backwards) + ENUM2STRING(BOTH_B5_BR___), //# Bounce-back if attack from BR is blocked + ENUM2STRING(BOTH_B5__R___), //# Bounce-back if attack from R is blocked + ENUM2STRING(BOTH_B5_TR___), //# Bounce-back if attack from TR is blocked + ENUM2STRING(BOTH_B5_T____), //# Bounce-back if attack from T is blocked + ENUM2STRING(BOTH_B5_TL___), //# Bounce-back if attack from TL is blocked + ENUM2STRING(BOTH_B5__L___), //# Bounce-back if attack from L is blocked + ENUM2STRING(BOTH_B5_BL___), //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + ENUM2STRING(BOTH_D5_BR___), //# Deflection toward BR + ENUM2STRING(BOTH_D5__R___), //# Deflection toward R + ENUM2STRING(BOTH_D5_TR___), //# Deflection toward TR + ENUM2STRING(BOTH_D5_TL___), //# Deflection toward TL + ENUM2STRING(BOTH_D5__L___), //# Deflection toward L + ENUM2STRING(BOTH_D5_BL___), //# Deflection toward BL + ENUM2STRING(BOTH_D5_B____), //# Deflection toward B + //Saber parry anims + ENUM2STRING(BOTH_P1_S1_T_), //# Block shot/saber top + ENUM2STRING(BOTH_P1_S1_TR), //# Block shot/saber top right + ENUM2STRING(BOTH_P1_S1_TL), //# Block shot/saber top left + ENUM2STRING(BOTH_P1_S1_BL), //# Block shot/saber bottom left + ENUM2STRING(BOTH_P1_S1_BR), //# Block shot/saber bottom right + //Saber knockaway + ENUM2STRING(BOTH_K1_S1_T_), //# knockaway saber top + ENUM2STRING(BOTH_K1_S1_TR), //# knockaway saber top right + ENUM2STRING(BOTH_K1_S1_TL), //# knockaway saber top left + ENUM2STRING(BOTH_K1_S1_BL), //# knockaway saber bottom left + ENUM2STRING(BOTH_K1_S1_B_), //# knockaway saber bottom + ENUM2STRING(BOTH_K1_S1_BR), //# knockaway saber bottom right + //Saber attack knocked away + ENUM2STRING(BOTH_V1_BR_S1), //# BR attack knocked away + ENUM2STRING(BOTH_V1__R_S1), //# R attack knocked away + ENUM2STRING(BOTH_V1_TR_S1), //# TR attack knocked away + ENUM2STRING(BOTH_V1_T__S1), //# T attack knocked away + ENUM2STRING(BOTH_V1_TL_S1), //# TL attack knocked away + ENUM2STRING(BOTH_V1__L_S1), //# L attack knocked away + ENUM2STRING(BOTH_V1_BL_S1), //# BL attack knocked away + ENUM2STRING(BOTH_V1_B__S1), //# B attack knocked away + //Saber parry broken + ENUM2STRING(BOTH_H1_S1_T_), //# saber knocked down from top parry + ENUM2STRING(BOTH_H1_S1_TR), //# saber knocked down-left from TR parry + ENUM2STRING(BOTH_H1_S1_TL), //# saber knocked down-right from TL parry + ENUM2STRING(BOTH_H1_S1_BL), //# saber knocked up-right from BL parry + ENUM2STRING(BOTH_H1_S1_B_), //# saber knocked up over head from ready? + ENUM2STRING(BOTH_H1_S1_BR), //# saber knocked up-left from BR parry + //Sabers locked anims + ENUM2STRING(BOTH_BF2RETURN), //# + ENUM2STRING(BOTH_BF2BREAK), //# + ENUM2STRING(BOTH_BF2LOCK), //# + ENUM2STRING(BOTH_BF1RETURN), //# + ENUM2STRING(BOTH_BF1BREAK), //# + ENUM2STRING(BOTH_BF1LOCK), //# + ENUM2STRING(BOTH_CWCIRCLE_R2__R_S1), //# + ENUM2STRING(BOTH_CCWCIRCLE_R2__L_S1), //# + ENUM2STRING(BOTH_CWCIRCLE_A2__L__R), //# + ENUM2STRING(BOTH_CCWCIRCLE_A2__R__L), //# + ENUM2STRING(BOTH_CWCIRCLEBREAK), //# + ENUM2STRING(BOTH_CCWCIRCLEBREAK), //# + ENUM2STRING(BOTH_CWCIRCLELOCK), //# + ENUM2STRING(BOTH_CCWCIRCLELOCK), //# + //other saber anims/attacks + ENUM2STRING(BOTH_SABERFAST_STANCE), + ENUM2STRING(BOTH_SABERSLOW_STANCE), + ENUM2STRING(BOTH_A2_STABBACK1), //# Stab saber backward + ENUM2STRING(BOTH_ATTACK_BACK), //# Swing around backwards and attack + ENUM2STRING(BOTH_JUMPFLIPSLASHDOWN1),//# + ENUM2STRING(BOTH_JUMPFLIPSTABDOWN),//# + ENUM2STRING(BOTH_FORCELEAP2_T__B_),//# + ENUM2STRING(BOTH_LUNGE2_B__T_),//# + ENUM2STRING(BOTH_CROUCHATTACKBACK1),//# + + //# #sep ENUM2STRING(BOTH_ STANDING + ENUM2STRING(BOTH_STAND1), //# Standing idle, no weapon, hands down + ENUM2STRING(BOTH_STAND1IDLE1), //# Random standing idle + ENUM2STRING(BOTH_STAND2), //# Standing idle with a saber + ENUM2STRING(BOTH_STAND2IDLE1), //# Random standing idle + ENUM2STRING(BOTH_STAND2IDLE2), + ENUM2STRING(BOTH_STAND3), //# Standing idle with 2-handed weapon + ENUM2STRING(BOTH_STAND3IDLE1), //# Random standing idle + ENUM2STRING(BOTH_STAND4), //# hands clasp behind back + ENUM2STRING(BOTH_STAND4IDLE1), //# Random standing idle + ENUM2STRING(BOTH_STAND5), //# standing idle, no weapon, hand down, back straight + ENUM2STRING(BOTH_STAND5IDLE1), //# Random standing idle + ENUM2STRING(BOTH_STAND6), //# one handed), gun at side), relaxed stand + ENUM2STRING(BOTH_STAND7), //# both hands on hips (female) + ENUM2STRING(BOTH_STAND8), //# both hands on hips (male) + ENUM2STRING(BOTH_STAND1TO3), //# Transition from stand1 to stand3 + ENUM2STRING(BOTH_STAND3TO1), //# Transition from stand3 to stand1 + ENUM2STRING(BOTH_STAND1TO2), //# Transition from stand1 to stand2 + ENUM2STRING(BOTH_STAND2TO1), //# Transition from stand2 to stand1 + ENUM2STRING(BOTH_STAND2TO4), //# Transition from stand2 to stand4 + ENUM2STRING(BOTH_STAND4TO2), //# Transition from stand4 to stand2 + ENUM2STRING(BOTH_STANDTOWALK1), //# Transition from stand1 to walk1 + ENUM2STRING(BOTH_STAND4TOATTACK2), //# relaxed stand to 1-handed pistol ready + ENUM2STRING(BOTH_STANDUP1), //# standing up and stumbling + ENUM2STRING(BOTH_STANDUP2), //# Luke standing up from his meditation platform (cin # 37) + ENUM2STRING(BOTH_STAND5TOSIT3), //# transition from stand 5 to sit 3 + ENUM2STRING(BOTH_STAND1_REELO), //# Reelo in his stand1 position (cin #18) + ENUM2STRING(BOTH_STAND5_REELO), //# Reelo in his stand5 position (cin #18) + ENUM2STRING(BOTH_STAND1TOSTAND5), //# Transition from stand1 to stand5 + ENUM2STRING(BOTH_STAND5TOSTAND1), //# Transition from stand5 to stand1 + ENUM2STRING(BOTH_STAND5TOAIM), //# Transition of Kye aiming his gun at Desann (cin #9) + ENUM2STRING(BOTH_STAND5STARTLEDLOOKLEFT), //# Kyle turning to watch the bridge drop (cin #9) + ENUM2STRING(BOTH_STARTLEDLOOKLEFTTOSTAND5), //# Kyle returning to stand 5 from watching the bridge drop (cin #9) + ENUM2STRING(BOTH_STAND5TOSTAND8), //# Transition from stand5 to stand8 + ENUM2STRING(BOTH_STAND7TOSTAND8), //# Tavion putting hands on back of chair (cin #11) + ENUM2STRING(BOTH_STAND8TOSTAND5), //# Transition from stand8 to stand5 + ENUM2STRING(BOTH_STAND5SHIFTWEIGHT), //# Weightshift from stand5 to side and back to stand5 + ENUM2STRING(BOTH_STAND5SHIFTWEIGHTSTART), //# From stand5 to side + ENUM2STRING(BOTH_STAND5SHIFTWEIGHTSTOP), //# From side to stand5 + ENUM2STRING(BOTH_STAND5TURNLEFTSTART), //# Start turning left from stand5 + ENUM2STRING(BOTH_STAND5TURNLEFTSTOP), //# Stop turning left from stand5 + ENUM2STRING(BOTH_STAND5TURNRIGHTSTART), //# Start turning right from stand5 + ENUM2STRING(BOTH_STAND5TURNRIGHTSTOP), //# Stop turning right from stand5 + ENUM2STRING(BOTH_STAND5LOOK180LEFTSTART), //# Start looking over left shoulder (cin #17) + ENUM2STRING(BOTH_STAND5LOOK180LEFTSTOP), //# Stop looking over left shoulder (cin #17) + + ENUM2STRING(BOTH_CONSOLE1START), //# typing at a console + ENUM2STRING(BOTH_CONSOLE1), //# typing at a console + ENUM2STRING(BOTH_CONSOLE1STOP), //# typing at a console + ENUM2STRING(BOTH_CONSOLE2START), //# typing at a console with comm link in hand (cin #5) + ENUM2STRING(BOTH_CONSOLE2), //# typing at a console with comm link in hand (cin #5) + ENUM2STRING(BOTH_CONSOLE2STOP), //# typing at a console with comm link in hand (cin #5) + ENUM2STRING(BOTH_CONSOLE2HOLDCOMSTART), //# lean in to type at console while holding comm link in hand (cin #5) + ENUM2STRING(BOTH_CONSOLE2HOLDCOMSTOP), //# lean away after typing at console while holding comm link in hand (cin #5) + + ENUM2STRING(BOTH_GUARD_LOOKAROUND1), //# Cradling weapon and looking around + ENUM2STRING(BOTH_GUARD_IDLE1), //# Cradling weapon and standing + ENUM2STRING(BOTH_ALERT1), //# Startled by something while on guard + ENUM2STRING(BOTH_GESTURE1), //# Generic gesture), non-specific + ENUM2STRING(BOTH_GESTURE2), //# Generic gesture), non-specific + ENUM2STRING(BOTH_GESTURE3), //# Generic gesture), non-specific + ENUM2STRING(BOTH_WALK1TALKCOMM1), //# Talking into coom link while walking + ENUM2STRING(BOTH_TALK1), //# Generic talk anim + ENUM2STRING(BOTH_TALK2), //# Generic talk anim + ENUM2STRING(BOTH_TALKCOMM1START), //# Start talking into a comm link + ENUM2STRING(BOTH_TALKCOMM1), //# Talking into a comm link + ENUM2STRING(BOTH_TALKCOMM1STOP), //# Stop talking into a comm link + ENUM2STRING(BOTH_TALKGESTURE1), //# Generic talk anim + ENUM2STRING(BOTH_TALKGESTURE2), //# Generic talk anim + ENUM2STRING(BOTH_TALKGESTURE3), //# Generic talk anim + + ENUM2STRING(BOTH_TALKGESTURE4START), //# Beginning talk anim 4 + ENUM2STRING(BOTH_TALKGESTURE4), //# Talk gesture 4 + ENUM2STRING(BOTH_TALKGESTURE4STOP), //# Ending talk anim 4 + ENUM2STRING(BOTH_TALKGESTURE5START), //# Start hand on chin + ENUM2STRING(BOTH_TALKGESTURE5), //# Hand on chin + ENUM2STRING(BOTH_TALKGESTURE5STOP), //# Stop hand on chin + ENUM2STRING(BOTH_TALKGESTURE6START), //# Starting Motions to self + ENUM2STRING(BOTH_TALKGESTURE6), //# Pointing at self + ENUM2STRING(BOTH_TALKGESTURE6STOP), //# Ending Motions to self + ENUM2STRING(BOTH_TALKGESTURE7START), //# Start touches Kyle on shoulder + ENUM2STRING(BOTH_TALKGESTURE7), //# Hold touches Kyle on shoulder + ENUM2STRING(BOTH_TALKGESTURE7STOP), //# Ending touches Kyle on shoulder + ENUM2STRING(BOTH_TALKGESTURE8START), //# Lando's chin hold + ENUM2STRING(BOTH_TALKGESTURE8), //# Lando's chin hold + ENUM2STRING(BOTH_TALKGESTURE8STOP), //# Lando's chin hold + ENUM2STRING(BOTH_TALKGESTURE9), //# Same as gesture 2 but with the right hand + ENUM2STRING(BOTH_TALKGESTURE10), //# Shoulder shrug + ENUM2STRING(BOTH_TALKGESTURE11START), //# Arms folded across chest + ENUM2STRING(BOTH_TALKGESTURE11STOP), //# Arms folded across chest + ENUM2STRING(BOTH_TALKGESTURE12), //# Tavion taunting Kyle + ENUM2STRING(BOTH_TALKGESTURE13START), //# Luke warning Kyle + ENUM2STRING(BOTH_TALKGESTURE13), //# Luke warning Kyle + ENUM2STRING(BOTH_TALKGESTURE13STOP), //# Luke warning Kyle + ENUM2STRING(BOTH_TALKGESTURE14), //# Luke gesturing to Kyle + + ENUM2STRING(BOTH_TALKGESTURE15START), //# Desann taunting Kyle + ENUM2STRING(BOTH_TALKGESTURE15), //# Desann taunting Kyle + ENUM2STRING(BOTH_TALKGESTURE15STOP), //# Desann taunting Kyle + ENUM2STRING(BOTH_TALKGESTURE16), //# Bartender gesture cin #15 + ENUM2STRING(BOTH_TALKGESTURE17), //# Bartender gesture cin #15 + ENUM2STRING(BOTH_TALKGESTURE18), //# Bartender gesture cin #15 + ENUM2STRING(BOTH_TALKGESTURE19START), //# Desann lifting his arm "Join me" (cin #34) + ENUM2STRING(BOTH_TALKGESTURE19STOP), //# Desann lifting his arm "Join me" (cin #34) + ENUM2STRING(BOTH_TALKGESTURE20START), //# Kyle lifting his arm "Join us" (cin #34) + ENUM2STRING(BOTH_TALKGESTURE21), //# generic talk gesture from stand3 + ENUM2STRING(BOTH_TALKGESTURE22), //# generic talk gesture from stand3 + ENUM2STRING(BOTH_TALKGESTURE23), //# generic talk gesture from stand3 + ENUM2STRING(BOTH_PAUSE1START), //# Luke pauses to warn Kyle (cin #24) start + ENUM2STRING(BOTH_PAUSE1STOP), //# Luke pauses to warn Kyle (cin #24) stop + + ENUM2STRING(BOTH_HEADTILTLSTART), //# Head tilt to left + ENUM2STRING(BOTH_HEADTILTLSTOP), //# Head tilt to left + ENUM2STRING(BOTH_HEADTILTRSTART), //# Head tilt to right + ENUM2STRING(BOTH_HEADTILTRSTOP), //# Head tilt to right + ENUM2STRING(BOTH_HEADNOD), //# Head shake YES + ENUM2STRING(BOTH_HEADSHAKE), //# Head shake NO + ENUM2STRING(BOTH_HEADSHAKE1_REELO), //# Head shake NO for Reelo + ENUM2STRING(BOTH_SITHEADTILTLSTART), //# Head tilt to left from seated position + ENUM2STRING(BOTH_SITHEADTILTLSTOP), //# Head tilt to left from seated position + ENUM2STRING(BOTH_SITHEADTILTRSTART), //# Head tilt to right from seated position + ENUM2STRING(BOTH_SITHEADTILTRSTOP), //# Head tilt to right from seated position + ENUM2STRING(BOTH_SITHEADNOD), //# Head shake YES from seated position + ENUM2STRING(BOTH_SITHEADSHAKE), //# Head shake NO from seated position + ENUM2STRING(BOTH_SIT2HEADTILTLSTART), //# Head tilt to left from seated position 2 + ENUM2STRING(BOTH_SIT2HEADTILTLSTOP), //# Head tilt to left from seated position 2 + + ENUM2STRING(BOTH_REACH1START), //# Monmothma reaching for crystal + ENUM2STRING(BOTH_REACH1STOP), //# Monmothma reaching for crystal + + ENUM2STRING(BOTH_EXAMINE1START), //# Start Mon Mothma examining crystal + ENUM2STRING(BOTH_EXAMINE1), //# Mon Mothma examining crystal + ENUM2STRING(BOTH_EXAMINE1STOP), //# Stop Mon Mothma examining crystal + ENUM2STRING(BOTH_EXAMINE2START), //# Start Kyle tossing crystal + ENUM2STRING(BOTH_EXAMINE2), //# Hold Kyle tossing crystal + ENUM2STRING(BOTH_EXAMINE2STOP), //# End Kyle tossing crystal + ENUM2STRING(BOTH_EXAMINE3START), //# Start Lando looking around corner + ENUM2STRING(BOTH_EXAMINE3), //# Hold Lando looking around corner + ENUM2STRING(BOTH_EXAMINE3STOP), //# End Lando looking around corner + + ENUM2STRING(BOTH_LEANLEFT2START), //# Start leaning left in chair + ENUM2STRING(BOTH_LEANLEFT2STOP), //# Stop leaning left in chair + ENUM2STRING(BOTH_LEANRIGHT3START), //# Start Lando leaning on wall + ENUM2STRING(BOTH_LEANRIGHT3), //# Lando leaning on wall + ENUM2STRING(BOTH_LEANRIGHT3STOP), //# Stop Lando leaning on wall + + ENUM2STRING(BOTH_FORCEFOUNTAIN1_START), //# Kyle being lifted into the Force Fountain (cin #10) + ENUM2STRING(BOTH_FORCEFOUNTAIN1_MIDDLE),//# Kyle changing to looping position in the Force Fountain (cin #10) + ENUM2STRING(BOTH_FORCEFOUNTAIN1_LOOP), //# Kyle being spun in the Force Fountain (cin #10) + ENUM2STRING(BOTH_FORCEFOUNTAIN1_STOP), //# Kyle being set down out of the Force Fountain (cin #10) + ENUM2STRING(BOTH_THUMBING1), //# Lando gesturing with thumb over his shoulder (cin #19) + ENUM2STRING(BOTH_COME_ON1), //# Jan gesturing to Kyle (cin #32a) + ENUM2STRING(BOTH_STEADYSELF1), //# Jan trying to keep footing (cin #32a) Kyle (cin#5) + ENUM2STRING(BOTH_STEADYSELF1END), //# Return hands to side from STEADSELF1 Kyle (cin#5) + ENUM2STRING(BOTH_SILENCEGESTURE1), //# Luke silencing Kyle with a raised hand (cin #37) + ENUM2STRING(BOTH_REACHFORSABER1), //# Luke holding hand out for Kyle's saber (cin #37) + ENUM2STRING(BOTH_PUNCHER1), //# Jan punching Kyle in the shoulder (cin #37) + ENUM2STRING(BOTH_CONSTRAINER1HOLD), //# Static pose of starting Tavion constraining Jan (cin #9) + ENUM2STRING(BOTH_CONSTRAINEE1HOLD), //# Static pose of starting Jan being constrained by Tavion (cin #9) + ENUM2STRING(BOTH_CONSTRAINER1STAND), //# Tavion constraining Jan in a stand pose (cin #9) + ENUM2STRING(BOTH_CONSTRAINEE1STAND), //# Jan being constrained in a stand pose (cin #9) + ENUM2STRING(BOTH_CONSTRAINER1WALK), //# Tavion shoving jan forward (cin #9) + ENUM2STRING(BOTH_CONSTRAINEE1WALK), //# Jan being shoved forward by Tavion (cin #9) + ENUM2STRING(BOTH_CONSTRAINER1LOOP), //# Tavion walking with Jan in a loop (cin #9) + ENUM2STRING(BOTH_CONSTRAINEE1LOOP), //# Jan walking with Tavion in a loop (cin #9) + ENUM2STRING(BOTH_SABERKILLER1), //# Tavion about to strike Jan with saber (cin #9) + ENUM2STRING(BOTH_SABERKILLEE1), //# Jan about to be struck by Tavion with saber (cin #9) + ENUM2STRING(BOTH_HANDSHAKER1START), //# Luke shaking Kyle's hand (cin #37) + ENUM2STRING(BOTH_HANDSHAKER1LOOP), //# Luke shaking Kyle's hand (cin #37) + ENUM2STRING(BOTH_HANDSHAKEE1START), //# Kyle shaking Luke's hand (cin #37) + ENUM2STRING(BOTH_HANDSHAKEE1LOOP), //# Kyle shaking Luke's hand (cin #37) + ENUM2STRING(BOTH_LAUGH1START), //# Reelo leaning forward before laughing (cin #18) + ENUM2STRING(BOTH_LAUGH1STOP), //# Reelo laughing (cin #18) + ENUM2STRING(BOTH_ESCAPEPOD_LEAVE1), //# Kyle leaving escape pod (cin #33) + ENUM2STRING(BOTH_ESCAPEPOD_LEAVE2), //# Jan leaving escape pod (cin #33) + ENUM2STRING(BOTH_HUGGER1), //# Kyle hugging Jan (cin #29) + ENUM2STRING(BOTH_HUGGERSTOP1), //# Kyle stop hugging Jan but don't let her go (cin #29) + ENUM2STRING(BOTH_HUGGERSTOP2), //# Kyle let go of Jan and step back (cin #29) + ENUM2STRING(BOTH_HUGGEE1), //# Jan being hugged (cin #29) + ENUM2STRING(BOTH_HUGGEESTOP1), //# Jan stop being hugged but don't let go (cin #29) + ENUM2STRING(BOTH_HUGGEESTOP2), //# Jan released from hug (cin #29) + ENUM2STRING(BOTH_KISSER1), //# Temp until the Kiss anim gets split up + ENUM2STRING(BOTH_KISSER1START1), //# Kyle start kissing Jan + ENUM2STRING(BOTH_KISSER1START2), //# Kyle start kissing Jan + ENUM2STRING(BOTH_KISSER1LOOP), //# Kyle loop kissing Jan + ENUM2STRING(BOTH_KISSER1STOP), //# Temp until the Kiss anim gets split up + ENUM2STRING(BOTH_KISSER1STOP1), //# Kyle stop kissing but don't let go + ENUM2STRING(BOTH_KISSER1STOP2), //# Kyle step back from Jan + ENUM2STRING(BOTH_KISSEE1), //# Temp until the Kiss anim gets split up + ENUM2STRING(BOTH_KISSEE1START1), //# Jan start being kissed + ENUM2STRING(BOTH_KISSEE1START2), //# Jan start2 being kissed + ENUM2STRING(BOTH_KISSEE1LOOP), //# Jan loop being kissed + ENUM2STRING(BOTH_KISSEE1STOP), //# Temp until the Kiss anim gets split up + ENUM2STRING(BOTH_KISSEE1STOP1), //# Jan stop being kissed but don't let go + ENUM2STRING(BOTH_KISSEE1STOP2), //# Jan wait for Kyle to step back + ENUM2STRING(BOTH_BARTENDER_IDLE1), //# Bartender idle in cin #15 + ENUM2STRING(BOTH_BARTENDER_THROW1), //# Bartender throws glass in cin #15 + ENUM2STRING(BOTH_BARTENDER_COWERSTART), //# Start of Bartender raising both hands up in surrender (cin #16) + ENUM2STRING(BOTH_BARTENDER_COWERLOOP), //# Loop of Bartender waving both hands in surrender (cin #16) + ENUM2STRING(BOTH_BARTENDER_COWER), //# Single frame of Bartender waving both hands in surrender (cin #16) + ENUM2STRING(BOTH_THREATEN1_START), //# First frame of Kyle threatening Bartender with lightsaber (cin #16) + ENUM2STRING(BOTH_THREATEN1), //# Kyle threatening Bartender with lightsaber (cin #16) + ENUM2STRING(BOTH_RADIO_ONOFF), //# Mech Galak turning on his suit radio (cin #32) + ENUM2STRING(BOTH_TRIUMPHANT1START), //# Mech Galak raising his arms in victory (cin #32) + ENUM2STRING(BOTH_TRIUMPHANT1STARTGESTURE), //# Mech Galak raising his arms in victory (cin #32) + ENUM2STRING(BOTH_TRIUMPHANT1STOP), //# Mech Galak lowering his arms in victory (cin #32) + + ENUM2STRING(BOTH_SABERTHROW1START), //# Desann throwing his light saber (cin #26) + ENUM2STRING(BOTH_SABERTHROW1STOP), //# Desann throwing his light saber (cin #26) + ENUM2STRING(BOTH_SABERTHROW2START), //# Kyle throwing his light saber (cin #32) + ENUM2STRING(BOTH_SABERTHROW2STOP), //# Kyle throwing his light saber (cin #32) + + ENUM2STRING(BOTH_COVERUP1_LOOP), //# animation of getting in line of friendly fire + ENUM2STRING(BOTH_COVERUP1_START), //# transitions from stand to coverup1_loop + ENUM2STRING(BOTH_COVERUP1_END), //# transitions from coverup1_loop to stand + + ENUM2STRING(BOTH_INJURED4), //# Injured pose 4 + ENUM2STRING(BOTH_INJURED4TO5), //# Transition from INJURED4 to INJURED5 + ENUM2STRING(BOTH_INJURED5), //# Injured pose 5 + + //# #sep ENUM2STRING(BOTH_ SITTING/CROUCHING + ENUM2STRING(BOTH_SIT1STAND), //# Stand up from First sitting anim + ENUM2STRING(BOTH_SIT1), //# Normal chair sit. + ENUM2STRING(BOTH_SIT2), //# Lotus position. + ENUM2STRING(BOTH_SIT3), //# Sitting in tired position), elbows on knees + + ENUM2STRING(BOTH_SIT2TO3), //# Trans from sit2 to sit3? + ENUM2STRING(BOTH_SIT2TOSTAND5), //# Transition from sit 2 to stand 5 + ENUM2STRING(BOTH_STAND5TOSIT2), //# Transition from stand 5 to sit 2 + ENUM2STRING(BOTH_SIT2TOSIT4), //# Trans from sit2 to sit4 (cin #12) Luke leaning back from lotus position. + ENUM2STRING(BOTH_SIT3TO1), //# Trans from sit3 to sit1? + ENUM2STRING(BOTH_SIT3TO2), //# Trans from sit3 to sit2? + ENUM2STRING(BOTH_SIT3TOSTAND5), //# transition from sit 3 to stand 5 + + ENUM2STRING(BOTH_SIT4TO5), //# Trans from sit4 to sit5 + ENUM2STRING(BOTH_SIT4TO6), //# Trans from sit4 to sit6 + ENUM2STRING(BOTH_SIT5TO4), //# Trans from sit5 to sit4 + ENUM2STRING(BOTH_SIT5TO6), //# Trans from sit5 to sit6 + ENUM2STRING(BOTH_SIT6TO4), //# Trans from sit6 to sit4 + ENUM2STRING(BOTH_SIT6TO5), //# Trans from sit6 to sit5 + ENUM2STRING(BOTH_SIT7), //# sitting with arms over knees), no weapon + ENUM2STRING(BOTH_SIT7TOSTAND1), //# getting up from sit7 into stand1 + + ENUM2STRING(BOTH_CROUCH1), //# Transition from standing to crouch + ENUM2STRING(BOTH_CROUCH1IDLE), //# Crouching idle + ENUM2STRING(BOTH_CROUCH1WALK), //# Walking while crouched + ENUM2STRING(BOTH_CROUCH1WALKBACK), //# Walking while crouched + ENUM2STRING(BOTH_UNCROUCH1), //# Transition from crouch to standing + ENUM2STRING(BOTH_CROUCH2IDLE), //# crouch and resting on back righ heel), no weapon + ENUM2STRING(BOTH_CROUCH2TOSTAND1), //# going from crouch2 to stand1 + ENUM2STRING(BOTH_CROUCH3), //# Desann crouching down to Kyle (cin 9) + ENUM2STRING(BOTH_UNCROUCH3), //# Desann uncrouching down to Kyle (cin 9) + ENUM2STRING(BOTH_CROUCH4), //# Slower version of crouch1 for cinematics + ENUM2STRING(BOTH_UNCROUCH4), //# Slower version of uncrouch1 for cinematics + ENUM2STRING(BOTH_GET_UP1), //# Get up from the ground), face down + ENUM2STRING(BOTH_GET_UP2), //# Get up from the ground), face up + + ENUM2STRING(BOTH_COCKPIT_SIT), //# sit in a cockpit. + + ENUM2STRING(BOTH_GUNSIT1), //# sitting on an emplaced gun. + + ENUM2STRING(BOTH_DEATH14_UNGRIP), //# Desann's end death (cin #35) + ENUM2STRING(BOTH_DEATH14_SITUP), //# Tavion sitting up after having been thrown (cin #23) + ENUM2STRING(BOTH_KNEES1), //# Tavion on her knees + ENUM2STRING(BOTH_KNEES2), //# Tavion on her knees looking down + ENUM2STRING(BOTH_KNEES2TO1), //# Transition of KNEES2 to KNEES1 + + ENUM2STRING(BOTH_RUMMAGE1START), //# Kyle rummaging for crystal (cin 2) + ENUM2STRING(BOTH_RUMMAGE1), //# Kyle rummaging for crystal (cin 2) + ENUM2STRING(BOTH_RUMMAGE1STOP), //# Kyle rummaging for crystal (cin 2) + + ENUM2STRING(BOTH_HOLDGLASS1), //# Bartender holds glass (cin# 14) + ENUM2STRING(BOTH_SLIDEGLASS1), //# Bartender slides glass (cin# 14) + ENUM2STRING(BOTH_SLAMSABERDOWN), //# Kyle slamming his saber on the bar top (cin# 14) + + //# #sep ENUM2STRING(BOTH_ MOVING + ENUM2STRING(BOTH_WALK1), //# Normal walk + ENUM2STRING(BOTH_WALK2), //# Normal walk + ENUM2STRING(BOTH_WALK3), //# Goes with stand3 + ENUM2STRING(BOTH_WALK4), //# Walk cycle goes to a stand4 + ENUM2STRING(BOTH_WALK5), //# Tavion taunting Kyle (cin 22) + ENUM2STRING(BOTH_WALK6), //# Slow walk for Luke (cin 12) + ENUM2STRING(BOTH_WALK7), //# Fast walk + ENUM2STRING(BOTH_WALK8), //# Normal walk with hands behind back (Luke in cin#12) + ENUM2STRING(BOTH_WALK9), //# Lando walk (cin #17) + ENUM2STRING(BOTH_WALK10), //# Lando walk (cin #17) + ENUM2STRING(BOTH_WALKTORUN1), //# transition from walk to run + ENUM2STRING(BOTH_RUN1), //# Full run + ENUM2STRING(BOTH_RUN1START), //# Start into full run1 + ENUM2STRING(BOTH_RUN1STOP), //# Stop from full run1 + ENUM2STRING(BOTH_RUN2), //# Full run + ENUM2STRING(BOTH_RUNINJURED1), //# Run with injured left leg + ENUM2STRING(BOTH_STRAFE_LEFT1), //# Sidestep left), should loop + ENUM2STRING(BOTH_STRAFE_RIGHT1), //# Sidestep right), should loop + ENUM2STRING(BOTH_RUNSTRAFE_LEFT1), //# Sidestep left), should loop + ENUM2STRING(BOTH_RUNSTRAFE_RIGHT1), //# Sidestep right), should loop + ENUM2STRING(BOTH_TURN_LEFT1), //# Turn left), should loop + ENUM2STRING(BOTH_TURN_RIGHT1), //# Turn right), should loop + ENUM2STRING(BOTH_TURNSTAND1), //# Turn from STAND1 position + ENUM2STRING(BOTH_TURNSTAND2), //# Turn from STAND2 position + ENUM2STRING(BOTH_TURNSTAND3), //# Turn from STAND3 position + ENUM2STRING(BOTH_TURNSTAND4), //# Turn from STAND4 position + ENUM2STRING(BOTH_TURNSTAND5), //# Turn from STAND5 position + ENUM2STRING(BOTH_TURNCROUCH1), //# Turn from CROUCH1 position + ENUM2STRING(BOTH_RUNAWAY1), //# Running scared + ENUM2STRING(BOTH_SWIM1), //# Swimming + + ENUM2STRING(BOTH_WALKBACK1), //# Walk1 backwards + ENUM2STRING(BOTH_WALKBACK2), //# Walk2 backwards + ENUM2STRING(BOTH_RUNBACK1), //# Run1 backwards + ENUM2STRING(BOTH_RUNBACK2), //# Run1 backwards + + //# #sep BOTH_ JUMPING + ENUM2STRING(BOTH_JUMP1), //# Jump - wind-up and leave ground + ENUM2STRING(BOTH_INAIR1), //# In air loop (from jump) + ENUM2STRING(BOTH_LAND1), //# Landing (from in air loop) + ENUM2STRING(BOTH_LAND2), //# Landing Hard (from a great height) + + ENUM2STRING(BOTH_JUMPBACK1), //# Jump backwards - wind-up and leave ground + ENUM2STRING(BOTH_INAIRBACK1), //# In air loop (from jump back) + ENUM2STRING(BOTH_LANDBACK1), //# Landing backwards(from in air loop) + + ENUM2STRING(BOTH_JUMPLEFT1), //# Jump left - wind-up and leave ground + ENUM2STRING(BOTH_INAIRLEFT1), //# In air loop (from jump left) + ENUM2STRING(BOTH_LANDLEFT1), //# Landing left(from in air loop) + + ENUM2STRING(BOTH_JUMPRIGHT1), //# Jump right - wind-up and leave ground + ENUM2STRING(BOTH_INAIRRIGHT1), //# In air loop (from jump right) + ENUM2STRING(BOTH_LANDRIGHT1), //# Landing right(from in air loop) + + ENUM2STRING(BOTH_FORCEJUMP1), //# Jump - wind-up and leave ground + ENUM2STRING(BOTH_FORCEINAIR1), //# In air loop (from jump) + ENUM2STRING(BOTH_FORCELAND1), //# Landing (from in air loop) + + ENUM2STRING(BOTH_FORCEJUMPBACK1), //# Jump backwards - wind-up and leave ground + ENUM2STRING(BOTH_FORCEINAIRBACK1), //# In air loop (from jump back) + ENUM2STRING(BOTH_FORCELANDBACK1), //# Landing backwards(from in air loop) + + ENUM2STRING(BOTH_FORCEJUMPLEFT1), //# Jump left - wind-up and leave ground + ENUM2STRING(BOTH_FORCEINAIRLEFT1), //# In air loop (from jump left) + ENUM2STRING(BOTH_FORCELANDLEFT1), //# Landing left(from in air loop) + + ENUM2STRING(BOTH_FORCEJUMPRIGHT1), //# Jump right - wind-up and leave ground + ENUM2STRING(BOTH_FORCEINAIRRIGHT1), //# In air loop (from jump right) + ENUM2STRING(BOTH_FORCELANDRIGHT1), //# Landing right(from in air loop) + //# #sep BOTH_ ACROBATICS + ENUM2STRING(BOTH_FLIP_F), //# Flip forward + ENUM2STRING(BOTH_FLIP_B), //# Flip backwards + ENUM2STRING(BOTH_FLIP_L), //# Flip left + ENUM2STRING(BOTH_FLIP_R), //# Flip right + + ENUM2STRING(BOTH_ROLL_F), //# Roll forward + ENUM2STRING(BOTH_ROLL_B), //# Roll backward + ENUM2STRING(BOTH_ROLL_L), //# Roll left + ENUM2STRING(BOTH_ROLL_R), //# Roll right + ENUM2STRING(BOTH_ROLL_FR), //# Roll forward right + ENUM2STRING(BOTH_ROLL_FL), //# Roll forward left + ENUM2STRING(BOTH_ROLL_BR), //# Roll back right + ENUM2STRING(BOTH_ROLL_BL), //# Roll back left + + ENUM2STRING(BOTH_HOP_F), //# quickstep forward + ENUM2STRING(BOTH_HOP_B), //# quickstep backwards + ENUM2STRING(BOTH_HOP_L), //# quickstep left + ENUM2STRING(BOTH_HOP_R), //# quickstep right + + ENUM2STRING(BOTH_DODGE_FL), //# lean-dodge forward left + ENUM2STRING(BOTH_DODGE_FR), //# lean-dodge forward right + ENUM2STRING(BOTH_DODGE_BL), //# lean-dodge backwards left + ENUM2STRING(BOTH_DODGE_BR), //# lean-dodge backwards right + ENUM2STRING(BOTH_DODGE_L), //# lean-dodge left + ENUM2STRING(BOTH_DODGE_R), //# lean-dodge right + + ENUM2STRING(BOTH_DIVE1), //# Dive! + + ENUM2STRING(BOTH_ENGAGETAUNT), + ENUM2STRING(BOTH_ARIAL_LEFT), //# + ENUM2STRING(BOTH_ARIAL_RIGHT), //# + ENUM2STRING(BOTH_CARTWHEEL_LEFT), //# + ENUM2STRING(BOTH_CARTWHEEL_RIGHT), //# + ENUM2STRING(BOTH_FLIP_LEFT), //# + ENUM2STRING(BOTH_FLIP_BACK1), //# + ENUM2STRING(BOTH_FLIP_BACK2), //# + ENUM2STRING(BOTH_FLIP_BACK3), //# + ENUM2STRING(BOTH_BUTTERFLY_LEFT), //# + ENUM2STRING(BOTH_BUTTERFLY_RIGHT), //# + ENUM2STRING(BOTH_WALL_RUN_RIGHT), //# + ENUM2STRING(BOTH_WALL_RUN_RIGHT_FLIP),//# + ENUM2STRING(BOTH_WALL_RUN_RIGHT_STOP),//# + ENUM2STRING(BOTH_WALL_RUN_LEFT), //# + ENUM2STRING(BOTH_WALL_RUN_LEFT_FLIP),//# + ENUM2STRING(BOTH_WALL_RUN_LEFT_STOP),//# + ENUM2STRING(BOTH_WALL_FLIP_RIGHT), //# + ENUM2STRING(BOTH_WALL_FLIP_LEFT), //# + ENUM2STRING(BOTH_WALL_FLIP_FWD), //# + ENUM2STRING(BOTH_KNOCKDOWN1), //# knocked backwards + ENUM2STRING(BOTH_KNOCKDOWN2), //# knocked backwards hard + ENUM2STRING(BOTH_KNOCKDOWN3), //# knocked forwards + ENUM2STRING(BOTH_KNOCKDOWN4), //# knocked backwards from crouch + ENUM2STRING(BOTH_KNOCKDOWN5), //# dupe of 3 - will be removed + ENUM2STRING(BOTH_GETUP1), //# + ENUM2STRING(BOTH_GETUP2), //# + ENUM2STRING(BOTH_GETUP3), //# + ENUM2STRING(BOTH_GETUP4), //# + ENUM2STRING(BOTH_GETUP5), //# + ENUM2STRING(BOTH_GETUP_CROUCH_F1), //# + ENUM2STRING(BOTH_GETUP_CROUCH_B1), //# + ENUM2STRING(BOTH_FORCE_GETUP_F1), //# + ENUM2STRING(BOTH_FORCE_GETUP_F2), //# + ENUM2STRING(BOTH_FORCE_GETUP_B1), //# + ENUM2STRING(BOTH_FORCE_GETUP_B2), //# + ENUM2STRING(BOTH_FORCE_GETUP_B3), //# + ENUM2STRING(BOTH_FORCE_GETUP_B4), //# + ENUM2STRING(BOTH_FORCE_GETUP_B5), //# + ENUM2STRING(BOTH_FORCE_GETUP_B6), //# + ENUM2STRING(BOTH_WALL_FLIP_BACK1), //# + ENUM2STRING(BOTH_WALL_FLIP_BACK2), //# + ENUM2STRING(BOTH_SPIN1), //# + ENUM2STRING(BOTH_CEILING_CLING), //# clinging to ceiling + ENUM2STRING(BOTH_CEILING_DROP), //# dropping from ceiling cling + + //TESTING + ENUM2STRING(BOTH_FJSS_TR_BL), //# jump spin slash tr to bl + ENUM2STRING(BOTH_FJSS_TL_BR), //# jump spin slash bl to tr + ENUM2STRING(BOTH_DEATHFROMBACKSLASH),//# + ENUM2STRING(BOTH_RIGHTHANDCHOPPEDOFF),//# + ENUM2STRING(BOTH_DEFLECTSLASH__R__L_FIN),//# + ENUM2STRING(BOTH_BASHED1),//# + ENUM2STRING(BOTH_ARIAL_F1),//# + ENUM2STRING(BOTH_BUTTERFLY_FR1),//# + ENUM2STRING(BOTH_BUTTERFLY_FL1),//# + + //# #sep BOTH_ MISC MOVEMENT + ENUM2STRING(BOTH_HIT1), //# Kyle hit by crate in cin #9 + ENUM2STRING(BOTH_LADDER_UP1), //# Climbing up a ladder with rungs at 16 unit intervals + ENUM2STRING(BOTH_LADDER_DWN1), //# Climbing down a ladder with rungs at 16 unit intervals + ENUM2STRING(BOTH_LADDER_IDLE), //# Just sitting on the ladder + ENUM2STRING(BOTH_ONLADDER_BOT1), //# Getting on the ladder at the bottom + ENUM2STRING(BOTH_OFFLADDER_BOT1), //# Getting off the ladder at the bottom + ENUM2STRING(BOTH_ONLADDER_TOP1), //# Getting on the ladder at the top + ENUM2STRING(BOTH_OFFLADDER_TOP1), //# Getting off the ladder at the top + ENUM2STRING(BOTH_LIFT1), //# Lifting someone/thing over their shoulder + ENUM2STRING(BOTH_STEP1), //# telsia checking out lake cinematic9.2 + ENUM2STRING(BOTH_HITWALL1), //# cin.18), Kenn hit by borg into wall 56 units away + ENUM2STRING(BOTH_AMBUSHLAND1), //# landing from fall on victim + ENUM2STRING(BOTH_BIRTH1), //# birth from jumping through walls + + //# #sep ENUM2STRING(BOTH_ FLYING IDLE + ENUM2STRING(BOTH_FLY_IDLE1), //# Flying Idle 1 + ENUM2STRING(BOTH_FLY_IDLE2), //# Flying Idle 2 + ENUM2STRING(BOTH_FLY_SHIELDED), //# For sentry droid, shields in + + + //# #sep ENUM2STRING(BOTH_ FLYING MOVING + ENUM2STRING(BOTH_FLY_START1), //# Start flying + ENUM2STRING(BOTH_FLY_STOP1), //# Stop flying + ENUM2STRING(BOTH_FLY_LOOP1), //# Normal flying), should loop + ENUM2STRING(BOTH_FLOAT1), //# Crew floating through space 1 + ENUM2STRING(BOTH_FLOAT2), //# Crew floating through space 2 + ENUM2STRING(BOTH_FLOATCONSOLE1), //# Crew floating and working on console + + //# #sep BOTH_ SWIMMING + ENUM2STRING(BOTH_SWIM_IDLE1), //# Swimming Idle 1 + ENUM2STRING(BOTH_SWIMFORWARD), //# Swim forward loop + + //# #sep ENUM2STRING(BOTH_ LYING + ENUM2STRING(BOTH_LIE_DOWN1), //# From a stand position), get down on ground), face down + ENUM2STRING(BOTH_LIE_DOWN2), //# From a stand position), get down on ground), face up + ENUM2STRING(BOTH_LIE_DOWN3), //# reaction to local disnode being destroyed + ENUM2STRING(BOTH_PAIN2WRITHE1), //# Transition from upright position to writhing on ground anim + ENUM2STRING(BOTH_PRONE2RLEG), //# Lying on ground reach to grab right leg + ENUM2STRING(BOTH_PRONE2LLEG), //# Lying on ground reach to grab left leg + ENUM2STRING(BOTH_WRITHING1), //# Lying on ground on back writhing in pain + ENUM2STRING(BOTH_WRITHING1RLEG), //# Lying on ground writhing in pain), holding right leg + ENUM2STRING(BOTH_WRITHING1LLEG), //# Lying on ground writhing in pain), holding left leg + ENUM2STRING(BOTH_WRITHING2), //# Lying on ground on front writhing in pain + ENUM2STRING(BOTH_INJURED1), //# Lying down), against wall - can also be sleeping against wall + ENUM2STRING(BOTH_INJURED2), //# Injured pose 2 + ENUM2STRING(BOTH_INJURED3), //# Injured pose 3 + ENUM2STRING(BOTH_INJURED6), //# Injured pose 6 + ENUM2STRING(BOTH_INJURED6ATTACKSTART), //# Start attack while in injured 6 pose + ENUM2STRING(BOTH_INJURED6ATTACKSTOP), //# End attack while in injured 6 pose + ENUM2STRING(BOTH_INJURED6COMBADGE), //# Hit combadge while in injured 6 pose + ENUM2STRING(BOTH_INJURED6POINT), //# Chang points to door while in injured state + ENUM2STRING(BOTH_INJUREDTOSTAND1), //# Runinjured to stand1 + + ENUM2STRING(BOTH_PROPUP1), //# Kyle getting up from having been knocked down (cin #9 end) + ENUM2STRING(BOTH_CRAWLBACK1), //# Lying on back), crawling backwards with elbows + ENUM2STRING(BOTH_SITWALL1), //# Sitting against a wall + ENUM2STRING(BOTH_SLEEP1), //# laying on back-rknee up-rhand on torso + ENUM2STRING(BOTH_SLEEP2), //# on floor-back against wall-arms crossed + ENUM2STRING(BOTH_SLEEP3), //# Sleeping in a chair + ENUM2STRING(BOTH_SLEEP4), //# Sleeping slumped over table + ENUM2STRING(BOTH_SLEEP5), //# Laying on side sleeping on flat sufrace + ENUM2STRING(BOTH_SLEEP6START), //# Kyle leaning back to sleep (cin 20) + ENUM2STRING(BOTH_SLEEP6STOP), //# Kyle waking up and shaking his head (cin 21) + ENUM2STRING(BOTH_SLEEP1GETUP), //# alarmed and getting up out of sleep1 pose to stand + ENUM2STRING(BOTH_SLEEP1GETUP2), //# + ENUM2STRING(BOTH_SLEEP2GETUP), //# alarmed and getting up out of sleep2 pose to stand + ENUM2STRING(BOTH_SLEEP3GETUP), //# alarmed and getting up out of sleep3 pose to stand + ENUM2STRING(BOTH_SLEEP3DEATH), //# death in chair), from sleep3 idle + ENUM2STRING(BOTH_SLEEP3DEAD), //# death in chair), from sleep3 idle + + ENUM2STRING(BOTH_SLEEP_IDLE1), //# rub face and nose while asleep from sleep pose 1 + ENUM2STRING(BOTH_SLEEP_IDLE2), //# shift position while asleep - stays in sleep2 + ENUM2STRING(BOTH_SLEEP_IDLE3), //# Idle anim from sleep pose 3 + ENUM2STRING(BOTH_SLEEP_IDLE4), //# Idle anim from sleep pose 4 + ENUM2STRING(BOTH_SLEEP1_NOSE), //# Scratch nose from SLEEP1 pose + ENUM2STRING(BOTH_SLEEP2_SHIFT), //# Shift in sleep from SLEEP2 pose + ENUM2STRING(BOTH_RESTRAINED1), //# Telsia tied to medical table + ENUM2STRING(BOTH_RESTRAINED1POINT), //# Telsia tied to medical table pointing at Munro + ENUM2STRING(BOTH_LIFTED1), //# Fits with ENUM2STRING(BOTH_LIFT1), lifted on shoulder + ENUM2STRING(BOTH_CARRIED1), //# Fits with ENUM2STRING(TORSO_CARRY1), carried over shoulder + ENUM2STRING(BOTH_CARRIED2), //# Laying over object + + ENUM2STRING(BOTH_CHOKE1START), //# tavion in force grip choke + ENUM2STRING(BOTH_CHOKE1STARTHOLD), //# loop of tavion in force grip choke + ENUM2STRING(BOTH_CHOKE1), //# tavion in force grip choke + + ENUM2STRING(BOTH_CHOKE2), //# tavion recovering from force grip choke + ENUM2STRING(BOTH_CHOKE3), //# left-handed choke (for people still holding a weapon) + + //# #sep ENUM2STRING(BOTH_ HUNTER-SEEKER BOT-SPECIFIC + ENUM2STRING(BOTH_POWERUP1), //# Wakes up + + ENUM2STRING(BOTH_TURNON), //# Protocol Droid wakes up + ENUM2STRING(BOTH_TURNOFF), //# Protocol Droid shuts off + ENUM2STRING(BOTH_BUTTON1), //# Single button push with right hand + ENUM2STRING(BOTH_BUTTON2), //# Single button push with left finger + ENUM2STRING(BOTH_BUTTON_HOLD), //# Single button hold with left hand + ENUM2STRING(BOTH_BUTTON_RELEASE), //# Single button release with left hand + + //# JEDI-SPECIFIC + ENUM2STRING(BOTH_RESISTPUSH), //# plant yourself to resist force push/pulls. + ENUM2STRING(BOTH_FORCEPUSH), //# Use off-hand to do force power. + ENUM2STRING(BOTH_FORCEPULL), //# Use off-hand to do force power. + ENUM2STRING(BOTH_MINDTRICK1), //# Use off-hand to do mind trick + ENUM2STRING(BOTH_MINDTRICK2), //# Use off-hand to do distraction + ENUM2STRING(BOTH_FORCELIGHTNING), //# Use off-hand to do lightning + ENUM2STRING(BOTH_FORCELIGHTNING_START), //# Use off-hand to do lightning - start + ENUM2STRING(BOTH_FORCELIGHTNING_HOLD), //# Use off-hand to do lightning - hold + ENUM2STRING(BOTH_FORCELIGHTNING_RELEASE),//# Use off-hand to do lightning - release + ENUM2STRING(BOTH_FORCEHEAL_START), //# Healing meditation pose start + ENUM2STRING(BOTH_FORCEHEAL_STOP), //# Healing meditation pose end + ENUM2STRING(BOTH_FORCEHEAL_QUICK), //# Healing meditation gesture + ENUM2STRING(BOTH_SABERPULL), //# Use off-hand to do force power. + ENUM2STRING(BOTH_FORCEGRIP1), //# force-gripping (no anim?) + ENUM2STRING(BOTH_FORCEGRIP3), //# force-gripping (right-hand) + ENUM2STRING(BOTH_FORCEGRIP3THROW), //# throwing while force-gripping (right hand) + ENUM2STRING(BOTH_FORCEGRIP_HOLD), //# Use off-hand to do grip - hold + ENUM2STRING(BOTH_FORCEGRIP_RELEASE),//# Use off-hand to do grip - release + ENUM2STRING(BOTH_TOSS1), //# throwing to left after force gripping + ENUM2STRING(BOTH_TOSS2), //# throwing to right after force gripping + + ENUM2STRING(BOTH_COCKPIT_TALKR1START), //# turn head from straight forward to looking full right + ENUM2STRING(BOTH_COCKPIT_TALKR1STARTTOMID), //# from TALKR1START to looking at hologram (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKR1MIDTOSTART), //# from looking at hologram to TALKR1START (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKR1STOP), //# return head to straight forward from BOTH_COCKPIT_TALKR1 + ENUM2STRING(BOTH_COCKPIT_TALKR1STOPTOMID), //# from TALKR1STOP to TALKR1MID + ENUM2STRING(BOTH_COCKPIT_TALKR1MIDTOSTOP), //# from looking at hologram to TALKR1STOP (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKR1), //# talk to right side + + ENUM2STRING(BOTH_COCKPIT_TALKL1START), //# turn head from straight forward to looking full left + ENUM2STRING(BOTH_COCKPIT_TALKL1STARTTOMID), //# from TALKL1START to looking at hologram (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKL1MIDTOSTART), //# from looking at hologram to TALKL1START (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKL1STOP), //# return head to straight forward from BOTH_COCKPIT_TALKL1 + ENUM2STRING(BOTH_COCKPIT_TALKL1STOPTOMID), //# from TALKL1STOP to TALKL1MID + ENUM2STRING(BOTH_COCKPIT_TALKL1MIDTOSTOP), //# from looking at hologram to TALKL1STOP (cin #1) + ENUM2STRING(BOTH_COCKPIT_TALKL1), //# talk to left side + + ENUM2STRING(BOTH_COCKPIT_CONSOLE1), //# type at controls + ENUM2STRING(BOTH_COCKPIT_CONSOLE2), //# type at controls + ENUM2STRING(BOTH_COCKPIT_CONSOLE2_PARTIAL), //# last part of console2 anim (cin #1) used by Jan + + ENUM2STRING(BOTH_COCKPIT_HEADNOD), //# nod head yes while sitting + ENUM2STRING(BOTH_COCKPIT_HEADSHAKE), //# shake head no while sitting + + ENUM2STRING(BOTH_COCKPIT_HEADTILTLSTART), //# start tilt head left while sitting + ENUM2STRING(BOTH_COCKPIT_HEADTILTLSTOP), //# stop tilt head left while sitting + ENUM2STRING(BOTH_COCKPIT_HEADTILTRSTART), //# start tilt head right while sitting + ENUM2STRING(BOTH_COCKPIT_HEADTILTRSTOP), //# stop tilt head right while sitting + + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE7START), //# Lando's supporting hand to Kyle (cin #21) + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE7STOP), //# Lando's supporting hand away from Kyle (cin #21) + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE8START), //# Hand to Lando's chin (cin #21) + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE8STOP), //# hand away from Lando's chin *cin #21) + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE11START), //# + ENUM2STRING(BOTH_COCKPIT_TALKGESTURE11STOP), //# + + ENUM2STRING(BOTH_COCKPIT_SLEEP6START), //# + ENUM2STRING(BOTH_COCKPIT_SLEEP6STOP), //# + + //================================================= + //ANIMS IN WHICH ONLY THE UPPER OBJECTS ARE IN MD3 + //================================================= + //# #sep ENUM2STRING(TORSO_ WEAPON-RELATED + ENUM2STRING(TORSO_DROPWEAP1), //# Put weapon away + ENUM2STRING(TORSO_DROPWEAP2), //# Put weapon away + ENUM2STRING(TORSO_DROPWEAP3), //# Put weapon away + ENUM2STRING(TORSO_DROPWEAP4), //# Put weapon away + ENUM2STRING(TORSO_RAISEWEAP1), //# Draw Weapon + ENUM2STRING(TORSO_RAISEWEAP2), //# Draw Weapon + ENUM2STRING(TORSO_RAISEWEAP3), //# Draw Weapon + ENUM2STRING(TORSO_RAISEWEAP4), //# Draw Weapon + ENUM2STRING(TORSO_WEAPONREADY1), //# Ready to fire stun baton + ENUM2STRING(TORSO_WEAPONREADY2), //# Ready to fire one-handed blaster pistol + ENUM2STRING(TORSO_WEAPONREADY3), //# Ready to fire blaster rifle + ENUM2STRING(TORSO_WEAPONREADY4), //# Ready to fire sniper rifle + ENUM2STRING(TORSO_WEAPONREADY5), //# Ready to fire bowcaster + ENUM2STRING(TORSO_WEAPONREADY6), //# Ready to fire ??? + ENUM2STRING(TORSO_WEAPONREADY7), //# Ready to fire ??? + ENUM2STRING(TORSO_WEAPONREADY8), //# Ready to fire ??? + ENUM2STRING(TORSO_WEAPONREADY9), //# Ready to fire rocket launcher + ENUM2STRING(TORSO_WEAPONREADY10), //# Ready to fire thermal det + ENUM2STRING(TORSO_WEAPONREADY11), //# Ready to fire laser trap + ENUM2STRING(TORSO_WEAPONREADY12), //# Ready to fire detpack + ENUM2STRING(TORSO_WEAPONIDLE1), //# Holding stun baton + ENUM2STRING(TORSO_WEAPONIDLE2), //# Holding one-handed blaster + ENUM2STRING(TORSO_WEAPONIDLE3), //# Holding blaster rifle + ENUM2STRING(TORSO_WEAPONIDLE4), //# Holding sniper rifle + ENUM2STRING(TORSO_WEAPONIDLE5), //# Holding bowcaster + ENUM2STRING(TORSO_WEAPONIDLE6), //# Holding ??? + ENUM2STRING(TORSO_WEAPONIDLE7), //# Holding ??? + ENUM2STRING(TORSO_WEAPONIDLE8), //# Holding ??? + ENUM2STRING(TORSO_WEAPONIDLE9), //# Holding rocket launcher + ENUM2STRING(TORSO_WEAPONIDLE10), //# Holding thermal det + ENUM2STRING(TORSO_WEAPONIDLE11), //# Holding laser trap + ENUM2STRING(TORSO_WEAPONIDLE12), //# Holding detpack + + //# #sep ENUM2STRING(TORSO_ USING NON-WEAPON OBJECTS + + //# #sep ENUM2STRING(TORSO_ MISC + ENUM2STRING(TORSO_HANDGESTURE1), //# gestures to left one hand + ENUM2STRING(TORSO_HANDGESTURE2), //# gestures to right one hand + ENUM2STRING(TORSO_HANDGESTURE3), //# gestures to the left both hands + ENUM2STRING(TORSO_HANDGESTURE4), //# gestures to the right both hands + + ENUM2STRING(TORSO_HANDEXTEND1), //# doctor reaching for hypospray in scav5 + ENUM2STRING(TORSO_HANDRETRACT1), //# doctor taking hypospray from player in scav5 + + ENUM2STRING(TORSO_DROPHELMET1), //# Drop the helmet to the waist + ENUM2STRING(TORSO_RAISEHELMET1), //# Bring the helmet to the head + ENUM2STRING(TORSO_REACHHELMET1), //# reaching for helmet off of 60 tall cabinet + ENUM2STRING(TORSO_GRABLBACKL), //# reach to lower back with left hand + ENUM2STRING(TORSO_GRABUBACKL), //# reach to upper back with left hand + ENUM2STRING(TORSO_GRABLBACKR), //# reach to lower back with right hand + ENUM2STRING(TORSO_GRABUBACKR), //# reach to upper back with right hand + + ENUM2STRING(TORSO_SURRENDER_START), //# arms up + ENUM2STRING(TORSO_SURRENDER_STOP), //# arms back down + ENUM2STRING(TORSO_CHOKING1), //# TEMP + + + //================================================= + //ANIMS IN WHICH ONLY THE LOWER OBJECTS ARE IN MD3 + //================================================= + //# #sep Legs-only anims + ENUM2STRING(LEGS_WALKBACK1), //# Walk1 backwards + ENUM2STRING(LEGS_WALKBACK2), //# Walk2 backwards + ENUM2STRING(LEGS_RUNBACK1), //# Run1 backwards + ENUM2STRING(LEGS_RUNBACK2), //# Run2 backwards + ENUM2STRING(LEGS_TURN1), //# What legs do when you turn your lower body to match your upper body facing + ENUM2STRING(LEGS_TURN2), //# Leg turning from stand2 + ENUM2STRING(LEGS_LEAN_LEFT1), //# Lean left + ENUM2STRING(LEGS_LEAN_RIGHT1), //# Lean Right + ENUM2STRING(LEGS_KNEELDOWN1), //# Get down on one knee? + ENUM2STRING(LEGS_KNEELUP1), //# Get up from one knee? + ENUM2STRING(LEGS_CRLEAN_LEFT1), //# Crouch Lean left + ENUM2STRING(LEGS_CRLEAN_RIGHT1), //# Crouch Lean Right + ENUM2STRING(LEGS_CHOKING1), //# TEMP + ENUM2STRING(LEGS_LEFTUP1), //# On a slope with left foot 4 higher than right + ENUM2STRING(LEGS_LEFTUP2), //# On a slope with left foot 8 higher than right + ENUM2STRING(LEGS_LEFTUP3), //# On a slope with left foot 12 higher than right + ENUM2STRING(LEGS_LEFTUP4), //# On a slope with left foot 16 higher than right + ENUM2STRING(LEGS_LEFTUP5), //# On a slope with left foot 20 higher than right + ENUM2STRING(LEGS_RIGHTUP1), //# On a slope with RIGHT foot 4 higher than left + ENUM2STRING(LEGS_RIGHTUP2), //# On a slope with RIGHT foot 8 higher than left + ENUM2STRING(LEGS_RIGHTUP3), //# On a slope with RIGHT foot 12 higher than left + ENUM2STRING(LEGS_RIGHTUP4), //# On a slope with RIGHT foot 16 higher than left + ENUM2STRING(LEGS_RIGHTUP5), //# On a slope with RIGHT foot 20 higher than left + ENUM2STRING(LEGS_S1_LUP1), + ENUM2STRING(LEGS_S1_LUP2), + ENUM2STRING(LEGS_S1_LUP3), + ENUM2STRING(LEGS_S1_LUP4), + ENUM2STRING(LEGS_S1_LUP5), + ENUM2STRING(LEGS_S1_RUP1), + ENUM2STRING(LEGS_S1_RUP2), + ENUM2STRING(LEGS_S1_RUP3), + ENUM2STRING(LEGS_S1_RUP4), + ENUM2STRING(LEGS_S1_RUP5), + ENUM2STRING(LEGS_S3_LUP1), + ENUM2STRING(LEGS_S3_LUP2), + ENUM2STRING(LEGS_S3_LUP3), + ENUM2STRING(LEGS_S3_LUP4), + ENUM2STRING(LEGS_S3_LUP5), + ENUM2STRING(LEGS_S3_RUP1), + ENUM2STRING(LEGS_S3_RUP2), + ENUM2STRING(LEGS_S3_RUP3), + ENUM2STRING(LEGS_S3_RUP4), + ENUM2STRING(LEGS_S3_RUP5), + ENUM2STRING(LEGS_S4_LUP1), + ENUM2STRING(LEGS_S4_LUP2), + ENUM2STRING(LEGS_S4_LUP3), + ENUM2STRING(LEGS_S4_LUP4), + ENUM2STRING(LEGS_S4_LUP5), + ENUM2STRING(LEGS_S4_RUP1), + ENUM2STRING(LEGS_S4_RUP2), + ENUM2STRING(LEGS_S4_RUP3), + ENUM2STRING(LEGS_S4_RUP4), + ENUM2STRING(LEGS_S4_RUP5), + ENUM2STRING(LEGS_S5_LUP1), + ENUM2STRING(LEGS_S5_LUP2), + ENUM2STRING(LEGS_S5_LUP3), + ENUM2STRING(LEGS_S5_LUP4), + ENUM2STRING(LEGS_S5_LUP5), + ENUM2STRING(LEGS_S5_RUP1), + ENUM2STRING(LEGS_S5_RUP2), + ENUM2STRING(LEGS_S5_RUP3), + ENUM2STRING(LEGS_S5_RUP4), + ENUM2STRING(LEGS_S5_RUP5), + + //================================================= + //HEAD ANIMS + //================================================= + //# #sep Head-only anims + ENUM2STRING(FACE_TALK1), //# quiet + ENUM2STRING(FACE_TALK2), //# semi-quiet + ENUM2STRING(FACE_TALK3), //# semi-loud + ENUM2STRING(FACE_TALK4), //# loud + ENUM2STRING(FACE_ALERT), //# + ENUM2STRING(FACE_SMILE), //# + ENUM2STRING(FACE_FROWN), //# + ENUM2STRING(FACE_DEAD), //# + + //must be terminated + NULL,-1 +}; diff --git a/code/cgame/cg_consolecmds (2).c b/code/cgame/cg_consolecmds (2).c new file mode 100644 index 0000000..13b1016 --- /dev/null +++ b/code/cgame/cg_consolecmds (2).c @@ -0,0 +1,556 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_consolecmds.c -- text commands typed in at the local console, or +// executed by a key binding + +#include "cg_local.h" +#include "../ui/ui_shared.h" +extern menuDef_t *menuScoreboard; + + + +void CG_TargetCommand_f( void ) { + int targetNum; + char test[4]; + + targetNum = CG_CrosshairPlayer(); + if (!targetNum ) { + return; + } + + trap_Argv( 1, test, 4 ); + trap_SendConsoleCommand( va( "gc %i %i", targetNum, atoi( test ) ) ); +} + + + +/* +================= +CG_SizeUp_f + +Keybinding command +================= +*/ +static void CG_SizeUp_f (void) { + trap_Cvar_Set("cg_viewsize", va("%i",(int)(cg_viewsize.integer+10))); +} + + +/* +================= +CG_SizeDown_f + +Keybinding command +================= +*/ +static void CG_SizeDown_f (void) { + trap_Cvar_Set("cg_viewsize", va("%i",(int)(cg_viewsize.integer-10))); +} + + +/* +============= +CG_Viewpos_f + +Debugging command to print the current position +============= +*/ +static void CG_Viewpos_f (void) { + CG_Printf ("%s (%i %i %i) : %i\n", cgs.mapname, (int)cg.refdef.vieworg[0], + (int)cg.refdef.vieworg[1], (int)cg.refdef.vieworg[2], + (int)cg.refdefViewAngles[YAW]); +} + + +static void CG_ScoresDown_f( void ) { + + CG_BuildSpectatorString(); + if ( cg.scoresRequestTime + 2000 < cg.time ) { + // the scores are more than two seconds out of data, + // so request new ones + cg.scoresRequestTime = cg.time; + trap_SendClientCommand( "score" ); + + // leave the current scores up if they were already + // displayed, but if this is the first hit, clear them out + if ( !cg.showScores ) { + cg.showScores = qtrue; + cg.numScores = 0; + } + } else { + // show the cached contents even if they just pressed if it + // is within two seconds + cg.showScores = qtrue; + } +} + +static void CG_ScoresUp_f( void ) { + if ( cg.showScores ) { + cg.showScores = qfalse; + cg.scoreFadeTime = cg.time; + } +} + +extern menuDef_t *menuScoreboard; +void Menu_Reset(); // FIXME: add to right include file + +static void CG_scrollScoresDown_f( void) { + if (menuScoreboard && cg.scoreBoardShowing) { + Menu_ScrollFeeder(menuScoreboard, FEEDER_SCOREBOARD, qtrue); + Menu_ScrollFeeder(menuScoreboard, FEEDER_REDTEAM_LIST, qtrue); + Menu_ScrollFeeder(menuScoreboard, FEEDER_BLUETEAM_LIST, qtrue); + } +} + + +static void CG_scrollScoresUp_f( void) { + if (menuScoreboard && cg.scoreBoardShowing) { + Menu_ScrollFeeder(menuScoreboard, FEEDER_SCOREBOARD, qfalse); + Menu_ScrollFeeder(menuScoreboard, FEEDER_REDTEAM_LIST, qfalse); + Menu_ScrollFeeder(menuScoreboard, FEEDER_BLUETEAM_LIST, qfalse); + } +} + + +static void CG_spWin_f( void) { + trap_Cvar_Set("cg_cameraOrbit", "2"); + trap_Cvar_Set("cg_cameraOrbitDelay", "35"); + trap_Cvar_Set("cg_thirdPerson", "1"); + trap_Cvar_Set("cg_thirdPersonAngle", "0"); + trap_Cvar_Set("cg_thirdPersonRange", "100"); + CG_AddBufferedSound(cgs.media.winnerSound); + //trap_S_StartLocalSound(cgs.media.winnerSound, CHAN_ANNOUNCER); + CG_CenterPrint("YOU WIN!", SCREEN_HEIGHT * .30, 0); +} + +static void CG_spLose_f( void) { + trap_Cvar_Set("cg_cameraOrbit", "2"); + trap_Cvar_Set("cg_cameraOrbitDelay", "35"); + trap_Cvar_Set("cg_thirdPerson", "1"); + trap_Cvar_Set("cg_thirdPersonAngle", "0"); + trap_Cvar_Set("cg_thirdPersonRange", "100"); + CG_AddBufferedSound(cgs.media.loserSound); + //trap_S_StartLocalSound(cgs.media.loserSound, CHAN_ANNOUNCER); + CG_CenterPrint("YOU LOSE...", SCREEN_HEIGHT * .30, 0); +} + + +static void CG_TellTarget_f( void ) { + int clientNum; + char command[128]; + char message[128]; + + clientNum = CG_CrosshairPlayer(); + if ( clientNum == -1 ) { + return; + } + + trap_Args( message, 128 ); + Com_sprintf( command, 128, "tell %i %s", clientNum, message ); + trap_SendClientCommand( command ); +} + +static void CG_TellAttacker_f( void ) { + int clientNum; + char command[128]; + char message[128]; + + clientNum = CG_LastAttacker(); + if ( clientNum == -1 ) { + return; + } + + trap_Args( message, 128 ); + Com_sprintf( command, 128, "tell %i %s", clientNum, message ); + trap_SendClientCommand( command ); +} + +static void CG_VoiceTellTarget_f( void ) { + int clientNum; + char command[128]; + char message[128]; + + clientNum = CG_CrosshairPlayer(); + if ( clientNum == -1 ) { + return; + } + + trap_Args( message, 128 ); + Com_sprintf( command, 128, "vtell %i %s", clientNum, message ); + trap_SendClientCommand( command ); +} + +static void CG_VoiceTellAttacker_f( void ) { + int clientNum; + char command[128]; + char message[128]; + + clientNum = CG_LastAttacker(); + if ( clientNum == -1 ) { + return; + } + + trap_Args( message, 128 ); + Com_sprintf( command, 128, "vtell %i %s", clientNum, message ); + trap_SendClientCommand( command ); +} + +static void CG_NextTeamMember_f( void ) { + CG_SelectNextPlayer(); +} + +static void CG_PrevTeamMember_f( void ) { + CG_SelectPrevPlayer(); +} + +// ASS U ME's enumeration order as far as task specific orders, OFFENSE is zero, CAMP is last +// +static void CG_NextOrder_f( void ) { + clientInfo_t *ci = cgs.clientinfo + cg.snap->ps.clientNum; + if (ci) { + if (!ci->teamLeader && sortedTeamPlayers[cg_currentSelectedPlayer.integer] != cg.snap->ps.clientNum) { + return; + } + } + if (cgs.currentOrder < TEAMTASK_CAMP) { + cgs.currentOrder++; + + if (cgs.currentOrder == TEAMTASK_RETRIEVE) { + if (!CG_OtherTeamHasFlag()) { + cgs.currentOrder++; + } + } + + if (cgs.currentOrder == TEAMTASK_ESCORT) { + if (!CG_YourTeamHasFlag()) { + cgs.currentOrder++; + } + } + + } else { + cgs.currentOrder = TEAMTASK_OFFENSE; + } + cgs.orderPending = qtrue; + cgs.orderTime = cg.time + 3000; +} + + +static void CG_ConfirmOrder_f (void ) { + trap_SendConsoleCommand(va("cmd vtell %d %s\n", cgs.acceptLeader, VOICECHAT_YES)); + trap_SendConsoleCommand("+button5; wait; -button5"); + if (cg.time < cgs.acceptOrderTime) { + trap_SendClientCommand(va("teamtask %d\n", cgs.acceptTask)); + cgs.acceptOrderTime = 0; + } +} + +static void CG_DenyOrder_f (void ) { + trap_SendConsoleCommand(va("cmd vtell %d %s\n", cgs.acceptLeader, VOICECHAT_NO)); + trap_SendConsoleCommand("+button6; wait; -button6"); + if (cg.time < cgs.acceptOrderTime) { + cgs.acceptOrderTime = 0; + } +} + +static void CG_TaskOffense_f (void ) { + if (cgs.gametype == GT_CTF || cgs.gametype == GT_CTY) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONGETFLAG)); + } else { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONOFFENSE)); + } + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_OFFENSE)); +} + +static void CG_TaskDefense_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONDEFENSE)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_DEFENSE)); +} + +static void CG_TaskPatrol_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONPATROL)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_PATROL)); +} + +static void CG_TaskCamp_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONCAMPING)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_CAMP)); +} + +static void CG_TaskFollow_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONFOLLOW)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_FOLLOW)); +} + +static void CG_TaskRetrieve_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONRETURNFLAG)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_RETRIEVE)); +} + +static void CG_TaskEscort_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONFOLLOWCARRIER)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_ESCORT)); +} + +static void CG_TaskOwnFlag_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_IHAVEFLAG)); +} + +static void CG_TauntKillInsult_f (void ) { + trap_SendConsoleCommand("cmd vsay kill_insult\n"); +} + +static void CG_TauntPraise_f (void ) { + trap_SendConsoleCommand("cmd vsay praise\n"); +} + +static void CG_TauntTaunt_f (void ) { + trap_SendConsoleCommand("cmd vtaunt\n"); +} + +static void CG_TauntDeathInsult_f (void ) { + trap_SendConsoleCommand("cmd vsay death_insult\n"); +} + +static void CG_TauntGauntlet_f (void ) { + trap_SendConsoleCommand("cmd vsay kill_guantlet\n"); +} + +static void CG_TaskSuicide_f (void ) { + int clientNum; + char command[128]; + + clientNum = CG_CrosshairPlayer(); + if ( clientNum == -1 ) { + return; + } + + Com_sprintf( command, 128, "tell %i suicide", clientNum ); + trap_SendClientCommand( command ); +} + + + +/* +================== +CG_TeamMenu_f +================== +*/ +/* +static void CG_TeamMenu_f( void ) { + if (trap_Key_GetCatcher() & KEYCATCH_CGAME) { + CG_EventHandling(CGAME_EVENT_NONE); + trap_Key_SetCatcher(0); + } else { + CG_EventHandling(CGAME_EVENT_TEAMMENU); + //trap_Key_SetCatcher(KEYCATCH_CGAME); + } +} +*/ + +/* +================== +CG_EditHud_f +================== +*/ +/* +static void CG_EditHud_f( void ) { + //cls.keyCatchers ^= KEYCATCH_CGAME; + //VM_Call (cgvm, CG_EVENT_HANDLING, (cls.keyCatchers & KEYCATCH_CGAME) ? CGAME_EVENT_EDITHUD : CGAME_EVENT_NONE); +} +*/ + + +/* +================== +CG_StartOrbit_f +================== +*/ + +static void CG_StartOrbit_f( void ) { + char var[MAX_TOKEN_CHARS]; + + trap_Cvar_VariableStringBuffer( "developer", var, sizeof( var ) ); + if ( !atoi(var) ) { + return; + } + if (cg_cameraOrbit.value != 0) { + trap_Cvar_Set ("cg_cameraOrbit", "0"); + trap_Cvar_Set("cg_thirdPerson", "0"); + } else { + trap_Cvar_Set("cg_cameraOrbit", "5"); + trap_Cvar_Set("cg_thirdPerson", "1"); + trap_Cvar_Set("cg_thirdPersonAngle", "0"); + trap_Cvar_Set("cg_thirdPersonRange", "100"); + } +} + +/* +static void CG_Camera_f( void ) { + char name[1024]; + trap_Argv( 1, name, sizeof(name)); + if (trap_loadCamera(name)) { + cg.cameraMode = qtrue; + trap_startCamera(cg.time); + } else { + CG_Printf ("Unable to load camera %s\n",name); + } +} +*/ + + +typedef struct { + char *cmd; + void (*function)(void); +} consoleCommand_t; + +static consoleCommand_t commands[] = { + { "testgun", CG_TestGun_f }, + { "testmodel", CG_TestModel_f }, + { "nextframe", CG_TestModelNextFrame_f }, + { "prevframe", CG_TestModelPrevFrame_f }, + { "nextskin", CG_TestModelNextSkin_f }, + { "prevskin", CG_TestModelPrevSkin_f }, + { "viewpos", CG_Viewpos_f }, + { "+scores", CG_ScoresDown_f }, + { "-scores", CG_ScoresUp_f }, + { "sizeup", CG_SizeUp_f }, + { "sizedown", CG_SizeDown_f }, + { "weapnext", CG_NextWeapon_f }, + { "weapprev", CG_PrevWeapon_f }, + { "weapon", CG_Weapon_f }, + { "tell_target", CG_TellTarget_f }, + { "tell_attacker", CG_TellAttacker_f }, + { "vtell_target", CG_VoiceTellTarget_f }, + { "vtell_attacker", CG_VoiceTellAttacker_f }, + { "tcmd", CG_TargetCommand_f }, + { "nextTeamMember", CG_NextTeamMember_f }, + { "prevTeamMember", CG_PrevTeamMember_f }, + { "nextOrder", CG_NextOrder_f }, + { "confirmOrder", CG_ConfirmOrder_f }, + { "denyOrder", CG_DenyOrder_f }, + { "taskOffense", CG_TaskOffense_f }, + { "taskDefense", CG_TaskDefense_f }, + { "taskPatrol", CG_TaskPatrol_f }, + { "taskCamp", CG_TaskCamp_f }, + { "taskFollow", CG_TaskFollow_f }, + { "taskRetrieve", CG_TaskRetrieve_f }, + { "taskEscort", CG_TaskEscort_f }, + { "taskSuicide", CG_TaskSuicide_f }, + { "taskOwnFlag", CG_TaskOwnFlag_f }, + { "tauntKillInsult", CG_TauntKillInsult_f }, + { "tauntPraise", CG_TauntPraise_f }, + { "tauntTaunt", CG_TauntTaunt_f }, + { "tauntDeathInsult", CG_TauntDeathInsult_f }, + { "tauntGauntlet", CG_TauntGauntlet_f }, + { "spWin", CG_spWin_f }, + { "spLose", CG_spLose_f }, + { "scoresDown", CG_scrollScoresDown_f }, + { "scoresUp", CG_scrollScoresUp_f }, + { "startOrbit", CG_StartOrbit_f }, + //{ "camera", CG_Camera_f }, + { "loaddeferred", CG_LoadDeferredPlayers }, + { "invnext", CG_NextInventory_f }, + { "invprev", CG_PrevInventory_f }, + { "forcenext", CG_NextForcePower_f }, + { "forceprev", CG_PrevForcePower_f } +}; + + +/* +================= +CG_ConsoleCommand + +The string has been tokenized and can be retrieved with +Cmd_Argc() / Cmd_Argv() +================= +*/ +qboolean CG_ConsoleCommand( void ) { + const char *cmd; + int i; + + cmd = CG_Argv(0); + + for ( i = 0 ; i < sizeof( commands ) / sizeof( commands[0] ) ; i++ ) { + if ( !Q_stricmp( cmd, commands[i].cmd ) ) { + commands[i].function(); + return qtrue; + } + } + + return qfalse; +} + + +/* +================= +CG_InitConsoleCommands + +Let the client system know about all of our commands +so it can perform tab completion +================= +*/ +void CG_InitConsoleCommands( void ) { + int i; + + for ( i = 0 ; i < sizeof( commands ) / sizeof( commands[0] ) ; i++ ) { + trap_AddCommand( commands[i].cmd ); + } + + // + // the game server will interpret these commands, which will be automatically + // forwarded to the server after they are not recognized locally + // + trap_AddCommand ("forcechanged"); + trap_AddCommand ("sv_invnext"); + trap_AddCommand ("sv_invprev"); + trap_AddCommand ("sv_forcenext"); + trap_AddCommand ("sv_forceprev"); + trap_AddCommand ("sv_saberswitch"); + trap_AddCommand ("engage_duel"); + trap_AddCommand ("force_heal"); + trap_AddCommand ("force_speed"); + trap_AddCommand ("force_throw"); + trap_AddCommand ("force_pull"); + trap_AddCommand ("force_distract"); + trap_AddCommand ("force_rage"); + trap_AddCommand ("force_protect"); + trap_AddCommand ("force_absorb"); + trap_AddCommand ("force_healother"); + trap_AddCommand ("force_forcepowerother"); + trap_AddCommand ("force_seeing"); + trap_AddCommand ("use_seeker"); + trap_AddCommand ("use_field"); + trap_AddCommand ("use_bacta"); + trap_AddCommand ("use_electrobinoculars"); + trap_AddCommand ("zoom"); + trap_AddCommand ("use_sentry"); + trap_AddCommand ("bot_order"); + trap_AddCommand ("saberAttackCycle"); + trap_AddCommand ("kill"); + trap_AddCommand ("say"); + trap_AddCommand ("say_team"); + trap_AddCommand ("tell"); + trap_AddCommand ("vsay"); + trap_AddCommand ("vsay_team"); + trap_AddCommand ("vtell"); + trap_AddCommand ("vtaunt"); + trap_AddCommand ("vosay"); + trap_AddCommand ("vosay_team"); + trap_AddCommand ("votell"); + trap_AddCommand ("give"); + trap_AddCommand ("god"); + trap_AddCommand ("notarget"); + trap_AddCommand ("noclip"); + trap_AddCommand ("team"); + trap_AddCommand ("follow"); + trap_AddCommand ("levelshot"); + trap_AddCommand ("addbot"); + trap_AddCommand ("setviewpos"); + trap_AddCommand ("callvote"); + trap_AddCommand ("vote"); + trap_AddCommand ("callteamvote"); + trap_AddCommand ("teamvote"); + trap_AddCommand ("stats"); + trap_AddCommand ("teamtask"); + trap_AddCommand ("loaddefered"); // spelled wrong, but not changing for demo +} diff --git a/code/cgame/cg_consolecmds.c b/code/cgame/cg_consolecmds.c new file mode 100644 index 0000000..13b1016 --- /dev/null +++ b/code/cgame/cg_consolecmds.c @@ -0,0 +1,556 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_consolecmds.c -- text commands typed in at the local console, or +// executed by a key binding + +#include "cg_local.h" +#include "../ui/ui_shared.h" +extern menuDef_t *menuScoreboard; + + + +void CG_TargetCommand_f( void ) { + int targetNum; + char test[4]; + + targetNum = CG_CrosshairPlayer(); + if (!targetNum ) { + return; + } + + trap_Argv( 1, test, 4 ); + trap_SendConsoleCommand( va( "gc %i %i", targetNum, atoi( test ) ) ); +} + + + +/* +================= +CG_SizeUp_f + +Keybinding command +================= +*/ +static void CG_SizeUp_f (void) { + trap_Cvar_Set("cg_viewsize", va("%i",(int)(cg_viewsize.integer+10))); +} + + +/* +================= +CG_SizeDown_f + +Keybinding command +================= +*/ +static void CG_SizeDown_f (void) { + trap_Cvar_Set("cg_viewsize", va("%i",(int)(cg_viewsize.integer-10))); +} + + +/* +============= +CG_Viewpos_f + +Debugging command to print the current position +============= +*/ +static void CG_Viewpos_f (void) { + CG_Printf ("%s (%i %i %i) : %i\n", cgs.mapname, (int)cg.refdef.vieworg[0], + (int)cg.refdef.vieworg[1], (int)cg.refdef.vieworg[2], + (int)cg.refdefViewAngles[YAW]); +} + + +static void CG_ScoresDown_f( void ) { + + CG_BuildSpectatorString(); + if ( cg.scoresRequestTime + 2000 < cg.time ) { + // the scores are more than two seconds out of data, + // so request new ones + cg.scoresRequestTime = cg.time; + trap_SendClientCommand( "score" ); + + // leave the current scores up if they were already + // displayed, but if this is the first hit, clear them out + if ( !cg.showScores ) { + cg.showScores = qtrue; + cg.numScores = 0; + } + } else { + // show the cached contents even if they just pressed if it + // is within two seconds + cg.showScores = qtrue; + } +} + +static void CG_ScoresUp_f( void ) { + if ( cg.showScores ) { + cg.showScores = qfalse; + cg.scoreFadeTime = cg.time; + } +} + +extern menuDef_t *menuScoreboard; +void Menu_Reset(); // FIXME: add to right include file + +static void CG_scrollScoresDown_f( void) { + if (menuScoreboard && cg.scoreBoardShowing) { + Menu_ScrollFeeder(menuScoreboard, FEEDER_SCOREBOARD, qtrue); + Menu_ScrollFeeder(menuScoreboard, FEEDER_REDTEAM_LIST, qtrue); + Menu_ScrollFeeder(menuScoreboard, FEEDER_BLUETEAM_LIST, qtrue); + } +} + + +static void CG_scrollScoresUp_f( void) { + if (menuScoreboard && cg.scoreBoardShowing) { + Menu_ScrollFeeder(menuScoreboard, FEEDER_SCOREBOARD, qfalse); + Menu_ScrollFeeder(menuScoreboard, FEEDER_REDTEAM_LIST, qfalse); + Menu_ScrollFeeder(menuScoreboard, FEEDER_BLUETEAM_LIST, qfalse); + } +} + + +static void CG_spWin_f( void) { + trap_Cvar_Set("cg_cameraOrbit", "2"); + trap_Cvar_Set("cg_cameraOrbitDelay", "35"); + trap_Cvar_Set("cg_thirdPerson", "1"); + trap_Cvar_Set("cg_thirdPersonAngle", "0"); + trap_Cvar_Set("cg_thirdPersonRange", "100"); + CG_AddBufferedSound(cgs.media.winnerSound); + //trap_S_StartLocalSound(cgs.media.winnerSound, CHAN_ANNOUNCER); + CG_CenterPrint("YOU WIN!", SCREEN_HEIGHT * .30, 0); +} + +static void CG_spLose_f( void) { + trap_Cvar_Set("cg_cameraOrbit", "2"); + trap_Cvar_Set("cg_cameraOrbitDelay", "35"); + trap_Cvar_Set("cg_thirdPerson", "1"); + trap_Cvar_Set("cg_thirdPersonAngle", "0"); + trap_Cvar_Set("cg_thirdPersonRange", "100"); + CG_AddBufferedSound(cgs.media.loserSound); + //trap_S_StartLocalSound(cgs.media.loserSound, CHAN_ANNOUNCER); + CG_CenterPrint("YOU LOSE...", SCREEN_HEIGHT * .30, 0); +} + + +static void CG_TellTarget_f( void ) { + int clientNum; + char command[128]; + char message[128]; + + clientNum = CG_CrosshairPlayer(); + if ( clientNum == -1 ) { + return; + } + + trap_Args( message, 128 ); + Com_sprintf( command, 128, "tell %i %s", clientNum, message ); + trap_SendClientCommand( command ); +} + +static void CG_TellAttacker_f( void ) { + int clientNum; + char command[128]; + char message[128]; + + clientNum = CG_LastAttacker(); + if ( clientNum == -1 ) { + return; + } + + trap_Args( message, 128 ); + Com_sprintf( command, 128, "tell %i %s", clientNum, message ); + trap_SendClientCommand( command ); +} + +static void CG_VoiceTellTarget_f( void ) { + int clientNum; + char command[128]; + char message[128]; + + clientNum = CG_CrosshairPlayer(); + if ( clientNum == -1 ) { + return; + } + + trap_Args( message, 128 ); + Com_sprintf( command, 128, "vtell %i %s", clientNum, message ); + trap_SendClientCommand( command ); +} + +static void CG_VoiceTellAttacker_f( void ) { + int clientNum; + char command[128]; + char message[128]; + + clientNum = CG_LastAttacker(); + if ( clientNum == -1 ) { + return; + } + + trap_Args( message, 128 ); + Com_sprintf( command, 128, "vtell %i %s", clientNum, message ); + trap_SendClientCommand( command ); +} + +static void CG_NextTeamMember_f( void ) { + CG_SelectNextPlayer(); +} + +static void CG_PrevTeamMember_f( void ) { + CG_SelectPrevPlayer(); +} + +// ASS U ME's enumeration order as far as task specific orders, OFFENSE is zero, CAMP is last +// +static void CG_NextOrder_f( void ) { + clientInfo_t *ci = cgs.clientinfo + cg.snap->ps.clientNum; + if (ci) { + if (!ci->teamLeader && sortedTeamPlayers[cg_currentSelectedPlayer.integer] != cg.snap->ps.clientNum) { + return; + } + } + if (cgs.currentOrder < TEAMTASK_CAMP) { + cgs.currentOrder++; + + if (cgs.currentOrder == TEAMTASK_RETRIEVE) { + if (!CG_OtherTeamHasFlag()) { + cgs.currentOrder++; + } + } + + if (cgs.currentOrder == TEAMTASK_ESCORT) { + if (!CG_YourTeamHasFlag()) { + cgs.currentOrder++; + } + } + + } else { + cgs.currentOrder = TEAMTASK_OFFENSE; + } + cgs.orderPending = qtrue; + cgs.orderTime = cg.time + 3000; +} + + +static void CG_ConfirmOrder_f (void ) { + trap_SendConsoleCommand(va("cmd vtell %d %s\n", cgs.acceptLeader, VOICECHAT_YES)); + trap_SendConsoleCommand("+button5; wait; -button5"); + if (cg.time < cgs.acceptOrderTime) { + trap_SendClientCommand(va("teamtask %d\n", cgs.acceptTask)); + cgs.acceptOrderTime = 0; + } +} + +static void CG_DenyOrder_f (void ) { + trap_SendConsoleCommand(va("cmd vtell %d %s\n", cgs.acceptLeader, VOICECHAT_NO)); + trap_SendConsoleCommand("+button6; wait; -button6"); + if (cg.time < cgs.acceptOrderTime) { + cgs.acceptOrderTime = 0; + } +} + +static void CG_TaskOffense_f (void ) { + if (cgs.gametype == GT_CTF || cgs.gametype == GT_CTY) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONGETFLAG)); + } else { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONOFFENSE)); + } + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_OFFENSE)); +} + +static void CG_TaskDefense_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONDEFENSE)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_DEFENSE)); +} + +static void CG_TaskPatrol_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONPATROL)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_PATROL)); +} + +static void CG_TaskCamp_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONCAMPING)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_CAMP)); +} + +static void CG_TaskFollow_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONFOLLOW)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_FOLLOW)); +} + +static void CG_TaskRetrieve_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONRETURNFLAG)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_RETRIEVE)); +} + +static void CG_TaskEscort_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONFOLLOWCARRIER)); + trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_ESCORT)); +} + +static void CG_TaskOwnFlag_f (void ) { + trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_IHAVEFLAG)); +} + +static void CG_TauntKillInsult_f (void ) { + trap_SendConsoleCommand("cmd vsay kill_insult\n"); +} + +static void CG_TauntPraise_f (void ) { + trap_SendConsoleCommand("cmd vsay praise\n"); +} + +static void CG_TauntTaunt_f (void ) { + trap_SendConsoleCommand("cmd vtaunt\n"); +} + +static void CG_TauntDeathInsult_f (void ) { + trap_SendConsoleCommand("cmd vsay death_insult\n"); +} + +static void CG_TauntGauntlet_f (void ) { + trap_SendConsoleCommand("cmd vsay kill_guantlet\n"); +} + +static void CG_TaskSuicide_f (void ) { + int clientNum; + char command[128]; + + clientNum = CG_CrosshairPlayer(); + if ( clientNum == -1 ) { + return; + } + + Com_sprintf( command, 128, "tell %i suicide", clientNum ); + trap_SendClientCommand( command ); +} + + + +/* +================== +CG_TeamMenu_f +================== +*/ +/* +static void CG_TeamMenu_f( void ) { + if (trap_Key_GetCatcher() & KEYCATCH_CGAME) { + CG_EventHandling(CGAME_EVENT_NONE); + trap_Key_SetCatcher(0); + } else { + CG_EventHandling(CGAME_EVENT_TEAMMENU); + //trap_Key_SetCatcher(KEYCATCH_CGAME); + } +} +*/ + +/* +================== +CG_EditHud_f +================== +*/ +/* +static void CG_EditHud_f( void ) { + //cls.keyCatchers ^= KEYCATCH_CGAME; + //VM_Call (cgvm, CG_EVENT_HANDLING, (cls.keyCatchers & KEYCATCH_CGAME) ? CGAME_EVENT_EDITHUD : CGAME_EVENT_NONE); +} +*/ + + +/* +================== +CG_StartOrbit_f +================== +*/ + +static void CG_StartOrbit_f( void ) { + char var[MAX_TOKEN_CHARS]; + + trap_Cvar_VariableStringBuffer( "developer", var, sizeof( var ) ); + if ( !atoi(var) ) { + return; + } + if (cg_cameraOrbit.value != 0) { + trap_Cvar_Set ("cg_cameraOrbit", "0"); + trap_Cvar_Set("cg_thirdPerson", "0"); + } else { + trap_Cvar_Set("cg_cameraOrbit", "5"); + trap_Cvar_Set("cg_thirdPerson", "1"); + trap_Cvar_Set("cg_thirdPersonAngle", "0"); + trap_Cvar_Set("cg_thirdPersonRange", "100"); + } +} + +/* +static void CG_Camera_f( void ) { + char name[1024]; + trap_Argv( 1, name, sizeof(name)); + if (trap_loadCamera(name)) { + cg.cameraMode = qtrue; + trap_startCamera(cg.time); + } else { + CG_Printf ("Unable to load camera %s\n",name); + } +} +*/ + + +typedef struct { + char *cmd; + void (*function)(void); +} consoleCommand_t; + +static consoleCommand_t commands[] = { + { "testgun", CG_TestGun_f }, + { "testmodel", CG_TestModel_f }, + { "nextframe", CG_TestModelNextFrame_f }, + { "prevframe", CG_TestModelPrevFrame_f }, + { "nextskin", CG_TestModelNextSkin_f }, + { "prevskin", CG_TestModelPrevSkin_f }, + { "viewpos", CG_Viewpos_f }, + { "+scores", CG_ScoresDown_f }, + { "-scores", CG_ScoresUp_f }, + { "sizeup", CG_SizeUp_f }, + { "sizedown", CG_SizeDown_f }, + { "weapnext", CG_NextWeapon_f }, + { "weapprev", CG_PrevWeapon_f }, + { "weapon", CG_Weapon_f }, + { "tell_target", CG_TellTarget_f }, + { "tell_attacker", CG_TellAttacker_f }, + { "vtell_target", CG_VoiceTellTarget_f }, + { "vtell_attacker", CG_VoiceTellAttacker_f }, + { "tcmd", CG_TargetCommand_f }, + { "nextTeamMember", CG_NextTeamMember_f }, + { "prevTeamMember", CG_PrevTeamMember_f }, + { "nextOrder", CG_NextOrder_f }, + { "confirmOrder", CG_ConfirmOrder_f }, + { "denyOrder", CG_DenyOrder_f }, + { "taskOffense", CG_TaskOffense_f }, + { "taskDefense", CG_TaskDefense_f }, + { "taskPatrol", CG_TaskPatrol_f }, + { "taskCamp", CG_TaskCamp_f }, + { "taskFollow", CG_TaskFollow_f }, + { "taskRetrieve", CG_TaskRetrieve_f }, + { "taskEscort", CG_TaskEscort_f }, + { "taskSuicide", CG_TaskSuicide_f }, + { "taskOwnFlag", CG_TaskOwnFlag_f }, + { "tauntKillInsult", CG_TauntKillInsult_f }, + { "tauntPraise", CG_TauntPraise_f }, + { "tauntTaunt", CG_TauntTaunt_f }, + { "tauntDeathInsult", CG_TauntDeathInsult_f }, + { "tauntGauntlet", CG_TauntGauntlet_f }, + { "spWin", CG_spWin_f }, + { "spLose", CG_spLose_f }, + { "scoresDown", CG_scrollScoresDown_f }, + { "scoresUp", CG_scrollScoresUp_f }, + { "startOrbit", CG_StartOrbit_f }, + //{ "camera", CG_Camera_f }, + { "loaddeferred", CG_LoadDeferredPlayers }, + { "invnext", CG_NextInventory_f }, + { "invprev", CG_PrevInventory_f }, + { "forcenext", CG_NextForcePower_f }, + { "forceprev", CG_PrevForcePower_f } +}; + + +/* +================= +CG_ConsoleCommand + +The string has been tokenized and can be retrieved with +Cmd_Argc() / Cmd_Argv() +================= +*/ +qboolean CG_ConsoleCommand( void ) { + const char *cmd; + int i; + + cmd = CG_Argv(0); + + for ( i = 0 ; i < sizeof( commands ) / sizeof( commands[0] ) ; i++ ) { + if ( !Q_stricmp( cmd, commands[i].cmd ) ) { + commands[i].function(); + return qtrue; + } + } + + return qfalse; +} + + +/* +================= +CG_InitConsoleCommands + +Let the client system know about all of our commands +so it can perform tab completion +================= +*/ +void CG_InitConsoleCommands( void ) { + int i; + + for ( i = 0 ; i < sizeof( commands ) / sizeof( commands[0] ) ; i++ ) { + trap_AddCommand( commands[i].cmd ); + } + + // + // the game server will interpret these commands, which will be automatically + // forwarded to the server after they are not recognized locally + // + trap_AddCommand ("forcechanged"); + trap_AddCommand ("sv_invnext"); + trap_AddCommand ("sv_invprev"); + trap_AddCommand ("sv_forcenext"); + trap_AddCommand ("sv_forceprev"); + trap_AddCommand ("sv_saberswitch"); + trap_AddCommand ("engage_duel"); + trap_AddCommand ("force_heal"); + trap_AddCommand ("force_speed"); + trap_AddCommand ("force_throw"); + trap_AddCommand ("force_pull"); + trap_AddCommand ("force_distract"); + trap_AddCommand ("force_rage"); + trap_AddCommand ("force_protect"); + trap_AddCommand ("force_absorb"); + trap_AddCommand ("force_healother"); + trap_AddCommand ("force_forcepowerother"); + trap_AddCommand ("force_seeing"); + trap_AddCommand ("use_seeker"); + trap_AddCommand ("use_field"); + trap_AddCommand ("use_bacta"); + trap_AddCommand ("use_electrobinoculars"); + trap_AddCommand ("zoom"); + trap_AddCommand ("use_sentry"); + trap_AddCommand ("bot_order"); + trap_AddCommand ("saberAttackCycle"); + trap_AddCommand ("kill"); + trap_AddCommand ("say"); + trap_AddCommand ("say_team"); + trap_AddCommand ("tell"); + trap_AddCommand ("vsay"); + trap_AddCommand ("vsay_team"); + trap_AddCommand ("vtell"); + trap_AddCommand ("vtaunt"); + trap_AddCommand ("vosay"); + trap_AddCommand ("vosay_team"); + trap_AddCommand ("votell"); + trap_AddCommand ("give"); + trap_AddCommand ("god"); + trap_AddCommand ("notarget"); + trap_AddCommand ("noclip"); + trap_AddCommand ("team"); + trap_AddCommand ("follow"); + trap_AddCommand ("levelshot"); + trap_AddCommand ("addbot"); + trap_AddCommand ("setviewpos"); + trap_AddCommand ("callvote"); + trap_AddCommand ("vote"); + trap_AddCommand ("callteamvote"); + trap_AddCommand ("teamvote"); + trap_AddCommand ("stats"); + trap_AddCommand ("teamtask"); + trap_AddCommand ("loaddefered"); // spelled wrong, but not changing for demo +} diff --git a/code/cgame/cg_draw (2).c b/code/cgame/cg_draw (2).c new file mode 100644 index 0000000..cc26a2c --- /dev/null +++ b/code/cgame/cg_draw (2).c @@ -0,0 +1,4491 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_draw.c -- draw all of the graphical elements during +// active (after loading) gameplay + +#include "cg_local.h" + +#include "../ui/ui_shared.h" + +qboolean CG_WorldCoordToScreenCoordFloat(vec3_t worldCoord, float *x, float *y); +qboolean CG_CalcMuzzlePoint( int entityNum, vec3_t muzzle ); + +// used for scoreboard +extern displayContextDef_t cgDC; +menuDef_t *menuScoreboard = NULL; +vec4_t bluehudtint = {0.5, 0.5, 1.0, 1.0}; +vec4_t redhudtint = {1.0, 0.5, 0.5, 1.0}; +float *hudTintColor; + +int sortedTeamPlayers[TEAM_MAXOVERLAY]; +int numSortedTeamPlayers; + +int lastvalidlockdif; + +extern float zoomFov; //this has to be global client-side + +char systemChat[256]; +char teamChat1[256]; +char teamChat2[256]; + +char *showPowersName[] = +{ + "HEAL2",//FP_HEAL + "JUMP2",//FP_LEVITATION + "SPEED2",//FP_SPEED + "PUSH2",//FP_PUSH + "PULL2",//FP_PULL + "MINDTRICK2",//FP_TELEPTAHY + "GRIP2",//FP_GRIP + "LIGHTNING2",//FP_LIGHTNING + "DARK_RAGE2",//FP_RAGE + "PROTECT2",//FP_PROTECT + "ABSORB2",//FP_ABSORB + "TEAM_HEAL2",//FP_TEAM_HEAL + "TEAM_REPLENISH2",//FP_TEAM_FORCE + "DRAIN2",//FP_DRAIN + "SEEING2",//FP_SEE + "SABER_OFFENSE2",//FP_SABERATTACK + "SABER_DEFENSE2",//FP_SABERDEFEND + "SABER_THROW2",//FP_SABERTHROW + NULL +}; + + +int MenuFontToHandle(int iMenuFont) +{ + switch (iMenuFont) + { + case FONT_SMALL: return cgDC.Assets.qhSmallFont; + case FONT_MEDIUM: return cgDC.Assets.qhMediumFont; + case FONT_LARGE: return cgDC.Assets.qhBigFont; + } + + return cgDC.Assets.qhMediumFont; +} + +int CG_Text_Width(const char *text, float scale, int iMenuFont) +{ + int iFontIndex = MenuFontToHandle(iMenuFont); + + return trap_R_Font_StrLenPixels(text, iFontIndex, scale); +} + +int CG_Text_Height(const char *text, float scale, int iMenuFont) +{ + int iFontIndex = MenuFontToHandle(iMenuFont); + + return trap_R_Font_HeightPixels(iFontIndex, scale); +} + +#include "../qcommon/qfiles.h" // for STYLE_BLINK etc +void CG_Text_Paint(float x, float y, float scale, vec4_t color, const char *text, float adjust, int limit, int style, int iMenuFont) +{ + int iStyleOR = 0; + int iFontIndex = MenuFontToHandle(iMenuFont); + + switch (style) + { + case ITEM_TEXTSTYLE_NORMAL: iStyleOR = 0;break; // JK2 normal text + case ITEM_TEXTSTYLE_BLINK: iStyleOR = STYLE_BLINK;break; // JK2 fast blinking + case ITEM_TEXTSTYLE_PULSE: iStyleOR = STYLE_BLINK;break; // JK2 slow pulsing + case ITEM_TEXTSTYLE_SHADOWED: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) + case ITEM_TEXTSTYLE_OUTLINED: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) + case ITEM_TEXTSTYLE_OUTLINESHADOWED: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) + case ITEM_TEXTSTYLE_SHADOWEDMORE: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) + } + + trap_R_Font_DrawString( x, // int ox + y, // int oy + text, // const char *text + color, // paletteRGBA_c c + iStyleOR | iFontIndex, // const int iFontHandle + !limit?-1:limit, // iCharLimit (-1 = none) + scale // const float scale = 1.0f + ); +} + +/* +qboolean CG_WorldCoordToScreenCoord(vec3_t worldCoord, int *x, int *y) + + Take any world coord and convert it to a 2D virtual 640x480 screen coord +*/ +/* +qboolean CG_WorldCoordToScreenCoordFloat(vec3_t worldCoord, float *x, float *y) +{ + int xcenter, ycenter; + vec3_t local, transformed; + +// xcenter = cg.refdef.width / 2;//gives screen coords adjusted for resolution +// ycenter = cg.refdef.height / 2;//gives screen coords adjusted for resolution + + //NOTE: did it this way because most draw functions expect virtual 640x480 coords + // and adjust them for current resolution + xcenter = 640 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn + ycenter = 480 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn + + VectorSubtract (worldCoord, cg.refdef.vieworg, local); + + transformed[0] = DotProduct(local,vright); + transformed[1] = DotProduct(local,vup); + transformed[2] = DotProduct(local,vfwd); + + // Make sure Z is not negative. + if(transformed[2] < 0.01) + { + return qfalse; + } + // Simple convert to screen coords. + float xzi = xcenter / transformed[2] * (90.0/cg.refdef.fov_x); + float yzi = ycenter / transformed[2] * (90.0/cg.refdef.fov_y); + + *x = xcenter + xzi * transformed[0]; + *y = ycenter - yzi * transformed[1]; + + return qtrue; +} + +qboolean CG_WorldCoordToScreenCoord( vec3_t worldCoord, int *x, int *y ) +{ + float xF, yF; + qboolean retVal = CG_WorldCoordToScreenCoordFloat( worldCoord, &xF, &yF ); + *x = (int)xF; + *y = (int)yF; + return retVal; +} +*/ + +/* +================ +CG_DrawZoomMask + +================ +*/ +static void CG_DrawZoomMask( void ) +{ + vec4_t color1; + float level; + static qboolean flip = qtrue; + +// int ammo = cg_entities[0].gent->client->ps.ammo[weaponData[cent->currentState.weapon].ammoIndex]; + float cx, cy; +// int val[5]; + float max, fi; + + // Check for Binocular specific zooming since we'll want to render different bits in each case + if ( cg.predictedPlayerState.zoomMode == 2 ) + { + int val, i; + float off; + + // zoom level + level = (float)(80.0f - cg.predictedPlayerState.zoomFov) / 80.0f; + + // ...so we'll clamp it + if ( level < 0.0f ) + { + level = 0.0f; + } + else if ( level > 1.0f ) + { + level = 1.0f; + } + + // Using a magic number to convert the zoom level to scale amount + level *= 162.0f; + + // draw blue tinted distortion mask, trying to make it as small as is necessary to fill in the viewable area + trap_R_SetColor( colorTable[CT_WHITE] ); + CG_DrawPic( 34, 48, 570, 362, cgs.media.binocularStatic ); + + // Black out the area behind the numbers + trap_R_SetColor( colorTable[CT_BLACK]); + CG_DrawPic( 212, 367, 200, 40, cgs.media.whiteShader ); + + // Numbers should be kind of greenish + color1[0] = 0.2f; + color1[1] = 0.4f; + color1[2] = 0.2f; + color1[3] = 0.3f; + trap_R_SetColor( color1 ); + + // Draw scrolling numbers, use intervals 10 units apart--sorry, this section of code is just kind of hacked + // up with a bunch of magic numbers..... + val = ((int)((cg.refdefViewAngles[YAW] + 180) / 10)) * 10; + off = (cg.refdefViewAngles[YAW] + 180) - val; + + for ( i = -10; i < 30; i += 10 ) + { + val -= 10; + + if ( val < 0 ) + { + val += 360; + } + + // we only want to draw the very far left one some of the time, if it's too far to the left it will + // poke outside the mask. + if (( off > 3.0f && i == -10 ) || i > -10 ) + { + // draw the value, but add 200 just to bump the range up...arbitrary, so change it if you like + CG_DrawNumField( 155 + i * 10 + off * 10, 374, 3, val + 200, 24, 14, NUM_FONT_CHUNKY, qtrue ); + CG_DrawPic( 245 + (i-1) * 10 + off * 10, 376, 6, 6, cgs.media.whiteShader ); + } + } + + CG_DrawPic( 212, 367, 200, 28, cgs.media.binocularOverlay ); + + color1[0] = sin( cg.time * 0.01f ) * 0.5f + 0.5f; + color1[0] = color1[0] * color1[0]; + color1[1] = color1[0]; + color1[2] = color1[0]; + color1[3] = 1.0f; + + trap_R_SetColor( color1 ); + + CG_DrawPic( 82, 94, 16, 16, cgs.media.binocularCircle ); + + // Flickery color + color1[0] = 0.7f + crandom() * 0.1f; + color1[1] = 0.8f + crandom() * 0.1f; + color1[2] = 0.7f + crandom() * 0.1f; + color1[3] = 1.0f; + trap_R_SetColor( color1 ); + + CG_DrawPic( 0, 0, 640, 480, cgs.media.binocularMask ); + + CG_DrawPic( 4, 282 - level, 16, 16, cgs.media.binocularArrow ); + + // The top triangle bit randomly flips + if ( flip ) + { + CG_DrawPic( 330, 60, -26, -30, cgs.media.binocularTri ); + } + else + { + CG_DrawPic( 307, 40, 26, 30, cgs.media.binocularTri ); + } + + if ( random() > 0.98f && ( cg.time & 1024 )) + { + flip = !flip; + } + } + else if ( cg.predictedPlayerState.zoomMode) + { + // disruptor zoom mode + level = (float)(50.0f - zoomFov) / 50.0f;//(float)(80.0f - zoomFov) / 80.0f; + + // ...so we'll clamp it + if ( level < 0.0f ) + { + level = 0.0f; + } + else if ( level > 1.0f ) + { + level = 1.0f; + } + + // Using a magic number to convert the zoom level to a rotation amount that correlates more or less with the zoom artwork. + level *= 103.0f; + + // Draw target mask + trap_R_SetColor( colorTable[CT_WHITE] ); + CG_DrawPic( 0, 0, 640, 480, cgs.media.disruptorMask ); + + // apparently 99.0f is the full zoom level + if ( level >= 99 ) + { + // Fully zoomed, so make the rotating insert pulse + color1[0] = 1.0f; + color1[1] = 1.0f; + color1[2] = 1.0f; + color1[3] = 0.7f + sin( cg.time * 0.01f ) * 0.3f; + + trap_R_SetColor( color1 ); + } + + // Draw rotating insert + CG_DrawRotatePic2( 320, 240, 640, 480, -level, cgs.media.disruptorInsert ); + + // Increase the light levels under the center of the target +// CG_DrawPic( 198, 118, 246, 246, cgs.media.disruptorLight ); + + // weirdness.....converting ammo to a base five number scale just to be geeky. +/* val[0] = ammo % 5; + val[1] = (ammo / 5) % 5; + val[2] = (ammo / 25) % 5; + val[3] = (ammo / 125) % 5; + val[4] = (ammo / 625) % 5; + + color1[0] = 0.2f; + color1[1] = 0.55f + crandom() * 0.1f; + color1[2] = 0.5f + crandom() * 0.1f; + color1[3] = 1.0f; + trap_R_SetColor( color1 ); + + for ( int t = 0; t < 5; t++ ) + { + cx = 320 + sin( (t*10+45)/57.296f ) * 192; + cy = 240 + cos( (t*10+45)/57.296f ) * 192; + + CG_DrawRotatePic2( cx, cy, 24, 38, 45 - t * 10, trap_R_RegisterShader( va("gfx/2d/char%d",val[4-t] ))); + } +*/ + //max = ( cg_entities[0].gent->health / 100.0f ); + + max = cg.snap->ps.ammo[weaponData[WP_DISRUPTOR].ammoIndex] / (float)ammoData[weaponData[WP_DISRUPTOR].ammoIndex].max; + if ( max > 1.0f ) + { + max = 1.0f; + } + + color1[0] = (1.0f - max) * 2.0f; + color1[1] = max * 1.5f; + color1[2] = 0.0f; + color1[3] = 1.0f; + + // If we are low on health, make us flash + if ( max < 0.15f && ( cg.time & 512 )) + { + VectorClear( color1 ); + } + + if ( color1[0] > 1.0f ) + { + color1[0] = 1.0f; + } + + if ( color1[1] > 1.0f ) + { + color1[1] = 1.0f; + } + + trap_R_SetColor( color1 ); + + max *= 58.0f; + + for (fi = 18.5f; fi <= 18.5f + max; fi+= 3 ) // going from 15 to 45 degrees, with 5 degree increments + { + cx = 320 + sin( (fi+90.0f)/57.296f ) * 190; + cy = 240 + cos( (fi+90.0f)/57.296f ) * 190; + + CG_DrawRotatePic2( cx, cy, 12, 24, 90 - fi, cgs.media.disruptorInsertTick ); + } + + if ( cg.predictedPlayerState.weaponstate == WEAPON_CHARGING_ALT ) + { + trap_R_SetColor( colorTable[CT_WHITE] ); + + // draw the charge level + max = ( cg.time - cg.predictedPlayerState.weaponChargeTime ) / ( 50.0f * 30.0f ); // bad hardcodedness 50 is disruptor charge unit and 30 is max charge units allowed. + + if ( max > 1.0f ) + { + max = 1.0f; + } + + trap_R_DrawStretchPic(257, 435, 134*max, 34, 0, 0, max, 1, cgs.media.disruptorChargeShader); + } +// trap_R_SetColor( colorTable[CT_WHITE] ); +// CG_DrawPic( 0, 0, 640, 480, cgs.media.disruptorMask ); + + } +} + + +/* +================ +CG_Draw3DModel + +================ +*/ +void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles ) { + refdef_t refdef; + refEntity_t ent; + + if ( !cg_draw3dIcons.integer || !cg_drawIcons.integer ) { + return; + } + + memset( &refdef, 0, sizeof( refdef ) ); + + memset( &ent, 0, sizeof( ent ) ); + AnglesToAxis( angles, ent.axis ); + VectorCopy( origin, ent.origin ); + ent.hModel = model; + ent.customSkin = skin; + ent.renderfx = RF_NOSHADOW; // no stencil shadows + + refdef.rdflags = RDF_NOWORLDMODEL; + + AxisClear( refdef.viewaxis ); + + refdef.fov_x = 30; + refdef.fov_y = 30; + + refdef.x = x; + refdef.y = y; + refdef.width = w; + refdef.height = h; + + refdef.time = cg.time; + + trap_R_ClearScene(); + trap_R_AddRefEntityToScene( &ent ); + trap_R_RenderScene( &refdef ); +} + +/* +================ +CG_DrawHead + +Used for both the status bar and the scoreboard +================ +*/ +void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec3_t headAngles ) +{ + clientInfo_t *ci; + + ci = &cgs.clientinfo[ clientNum ]; + + CG_DrawPic( x, y, w, h, ci->modelIcon ); + + // if they are deferred, draw a cross out + if ( ci->deferred ) + { + CG_DrawPic( x, y, w, h, cgs.media.deferShader ); + } +} + +/* +================ +CG_DrawFlagModel + +Used for both the status bar and the scoreboard +================ +*/ +void CG_DrawFlagModel( float x, float y, float w, float h, int team, qboolean force2D ) { + qhandle_t cm; + float len; + vec3_t origin, angles; + vec3_t mins, maxs; + qhandle_t handle; + + if ( !force2D && cg_draw3dIcons.integer ) { + + VectorClear( angles ); + + cm = cgs.media.redFlagModel; + + // offset the origin y and z to center the flag + trap_R_ModelBounds( cm, mins, maxs ); + + origin[2] = -0.5 * ( mins[2] + maxs[2] ); + origin[1] = 0.5 * ( mins[1] + maxs[1] ); + + // calculate distance so the flag nearly fills the box + // assume heads are taller than wide + len = 0.5 * ( maxs[2] - mins[2] ); + origin[0] = len / 0.268; // len / tan( fov/2 ) + + angles[YAW] = 60 * sin( cg.time / 2000.0 );; + + if( team == TEAM_RED ) { + handle = cgs.media.redFlagModel; + } else if( team == TEAM_BLUE ) { + handle = cgs.media.blueFlagModel; + } else if( team == TEAM_FREE ) { + handle = cgs.media.neutralFlagModel; + } else { + return; + } + CG_Draw3DModel( x, y, w, h, handle, 0, origin, angles ); + } else if ( cg_drawIcons.integer ) { + gitem_t *item; + + if( team == TEAM_RED ) { + item = BG_FindItemForPowerup( PW_REDFLAG ); + } else if( team == TEAM_BLUE ) { + item = BG_FindItemForPowerup( PW_BLUEFLAG ); + } else if( team == TEAM_FREE ) { + item = BG_FindItemForPowerup( PW_NEUTRALFLAG ); + } else { + return; + } + if (item) { + CG_DrawPic( x, y, w, h, cg_items[ ITEM_INDEX(item) ].icon ); + } + } +} + +/* +================ +DrawAmmo +================ +*/ +void DrawAmmo() +{ + int x, y; + + x = SCREEN_WIDTH-80; + y = SCREEN_HEIGHT-80; + +} + +/* +================ +CG_DrawHUDLeftFrame1 +================ +*/ +void CG_DrawHUDLeftFrame1(int x,int y) +{ + // Inner gray wire frame + trap_R_SetColor( hudTintColor ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDInnerLeft ); +} + +/* +================ +CG_DrawHUDLeftFrame2 +================ +*/ +void CG_DrawHUDLeftFrame2(int x,int y) +{ + // Inner gray wire frame + trap_R_SetColor( hudTintColor ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeftFrame ); // Metal frame +} + +/* +================ +DrawHealthArmor +================ +*/ +void DrawHealthArmor(int x,int y) +{ + vec4_t calcColor; + float armorPercent,hold,healthPercent; + playerState_t *ps; + + int healthAmt; + int armorAmt; + + ps = &cg.snap->ps; + + healthAmt = ps->stats[STAT_HEALTH]; + armorAmt = ps->stats[STAT_ARMOR]; + + if (healthAmt > ps->stats[STAT_MAX_HEALTH]) + { + healthAmt = ps->stats[STAT_MAX_HEALTH]; + } + + if (armorAmt > 100) + { + armorAmt = 100; + } + + trap_R_SetColor( colorTable[CT_WHITE] ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeftFrame ); // Circular black background + + // Outer Armor circular + memcpy(calcColor, colorTable[CT_GREEN], sizeof(vec4_t)); + + hold = armorAmt-(ps->stats[STAT_MAX_HEALTH]/2); + armorPercent = (float) hold/(ps->stats[STAT_MAX_HEALTH]/2); + if (armorPercent <0) + { + armorPercent = 0; + } + calcColor[0] *= armorPercent; + calcColor[1] *= armorPercent; + calcColor[2] *= armorPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor1 ); + + // Inner Armor circular + if (armorPercent>0) + { + armorPercent = 1; + } + else + { + armorPercent = (float) armorAmt/(ps->stats[STAT_MAX_HEALTH]/2); + } + memcpy(calcColor, colorTable[CT_GREEN], sizeof(vec4_t)); + calcColor[0] *= armorPercent; + calcColor[1] *= armorPercent; + calcColor[2] *= armorPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor2 ); // Inner Armor circular + + if (ps->stats[STAT_ARMOR]) // Is there armor? Draw the HUD Armor TIC + { + // Make tic flash if inner armor is at 50% (25% of full armor) + if (armorPercent<.5) // Do whatever the flash timer says + { + if (cg.HUDTickFlashTime < cg.time) // Flip at the same time + { + cg.HUDTickFlashTime = cg.time + 100; + if (cg.HUDArmorFlag) + { + cg.HUDArmorFlag = qfalse; + } + else + { + cg.HUDArmorFlag = qtrue; + } + } + } + else + { + cg.HUDArmorFlag=qtrue; + } + } + else // No armor? Don't show it. + { + cg.HUDArmorFlag=qfalse; + } + + memcpy(calcColor, colorTable[CT_RED], sizeof(vec4_t)); + healthPercent = (float) healthAmt/ps->stats[STAT_MAX_HEALTH]; + calcColor[0] *= healthPercent; + calcColor[1] *= healthPercent; + calcColor[2] *= healthPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealth ); + + // Make tic flash if health is at 20% of full + if (healthPercent>.20) + { + cg.HUDHealthFlag=qtrue; + } + else + { + if (cg.HUDTickFlashTime < cg.time) // Flip at the same time + { + cg.HUDTickFlashTime = cg.time + 100; + + if ((armorPercent>0) && (armorPercent<.5)) // Keep the tics in sync if flashing + { + cg.HUDHealthFlag=cg.HUDArmorFlag; + } + else + { + if (cg.HUDHealthFlag) + { + cg.HUDHealthFlag = qfalse; + } + else + { + cg.HUDHealthFlag = qtrue; + } + } + } + } + + // Draw the ticks + if (cg.HUDHealthFlag) + { + trap_R_SetColor( colorTable[CT_RED] ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealthTic ); + } + + if (cg.HUDArmorFlag) + { + trap_R_SetColor( colorTable[CT_GREEN] ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmorTic ); // + } + + trap_R_SetColor(hudTintColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeftStatic ); // + + trap_R_SetColor( colorTable[CT_RED] ); + CG_DrawNumField (x + 16, y + 40, 3, ps->stats[STAT_HEALTH], 14, 18, + NUM_FONT_SMALL,qfalse); + + trap_R_SetColor( colorTable[CT_GREEN] ); + CG_DrawNumField (x + 18 + 14, y + 40 + 14, 3, ps->stats[STAT_ARMOR], 14, 18, + NUM_FONT_SMALL,qfalse); + + trap_R_SetColor(hudTintColor ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeft ); // Metal frame +} + +/* +================ +CG_DrawHealth +================ +*/ +void CG_DrawHealth(int x,int y) +{ + vec4_t calcColor; + float healthPercent; + playerState_t *ps; + int healthAmt; + + ps = &cg.snap->ps; + + healthAmt = ps->stats[STAT_HEALTH]; + + if (healthAmt > ps->stats[STAT_MAX_HEALTH]) + { + healthAmt = ps->stats[STAT_MAX_HEALTH]; + } + + memcpy(calcColor, colorTable[CT_HUD_RED], sizeof(vec4_t)); + healthPercent = (float) healthAmt/ps->stats[STAT_MAX_HEALTH]; + calcColor[0] *= healthPercent; + calcColor[1] *= healthPercent; + calcColor[2] *= healthPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealth ); + + // Draw the ticks + if (cg.HUDHealthFlag) + { + trap_R_SetColor( colorTable[CT_HUD_RED] ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealthTic ); + } + + trap_R_SetColor( colorTable[CT_HUD_RED] ); + CG_DrawNumField (x + 16, y + 40, 3, ps->stats[STAT_HEALTH], 6, 12, + NUM_FONT_SMALL,qfalse); + +} + +/* +================ +CG_DrawArmor +================ +*/ +void CG_DrawArmor(int x,int y) +{ + vec4_t calcColor; + float armorPercent,hold; + playerState_t *ps; + int armor; + + ps = &cg.snap->ps; + + // Outer Armor circular + memcpy(calcColor, colorTable[CT_HUD_GREEN], sizeof(vec4_t)); + + armor =ps->stats[STAT_ARMOR]; + + if (armor> ps->stats[STAT_MAX_HEALTH]) + { + armor = ps->stats[STAT_MAX_HEALTH]; + } + + hold = armor-(ps->stats[STAT_MAX_HEALTH]/2); + armorPercent = (float) hold/(ps->stats[STAT_MAX_HEALTH]/2); + if (armorPercent <0) + { + armorPercent = 0; + } + calcColor[0] *= armorPercent; + calcColor[1] *= armorPercent; + calcColor[2] *= armorPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor1 ); + + // Inner Armor circular + if (armorPercent>0) + { + armorPercent = 1; + } + else + { + armorPercent = (float) ps->stats[STAT_ARMOR]/(ps->stats[STAT_MAX_HEALTH]/2); + } + memcpy(calcColor, colorTable[CT_HUD_GREEN], sizeof(vec4_t)); + calcColor[0] *= armorPercent; + calcColor[1] *= armorPercent; + calcColor[2] *= armorPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor2 ); // Inner Armor circular + + if (ps->stats[STAT_ARMOR]) // Is there armor? Draw the HUD Armor TIC + { + // Make tic flash if inner armor is at 50% (25% of full armor) + if (armorPercent<.5) // Do whatever the flash timer says + { + if (cg.HUDTickFlashTime < cg.time) // Flip at the same time + { + cg.HUDTickFlashTime = cg.time + 100; + if (cg.HUDArmorFlag) + { + cg.HUDArmorFlag = qfalse; + } + else + { + cg.HUDArmorFlag = qtrue; + } + } + } + else + { + cg.HUDArmorFlag=qtrue; + } + } + else // No armor? Don't show it. + { + cg.HUDArmorFlag=qfalse; + } + + if (cg.HUDArmorFlag) + { + trap_R_SetColor( colorTable[CT_HUD_GREEN] ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmorTic ); + } + + trap_R_SetColor( colorTable[CT_HUD_GREEN] ); + CG_DrawNumField (x + 18 + 14, y + 40 + 14, 3, ps->stats[STAT_ARMOR], 6, 12, + NUM_FONT_SMALL,qfalse); + +} + +/* +================ +CG_DrawHUDRightFrame1 +================ +*/ +void CG_DrawHUDRightFrame1(int x,int y) +{ + trap_R_SetColor( hudTintColor ); + // Inner gray wire frame + CG_DrawPic( x, y, 80, 80, cgs.media.HUDInnerRight ); // +} + +/* +================ +CG_DrawHUDRightFrame2 +================ +*/ +void CG_DrawHUDRightFrame2(int x,int y) +{ + trap_R_SetColor( hudTintColor ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDRightFrame ); // Metal frame +} + +/* +================ +CG_DrawAmmo +================ +*/ +static void CG_DrawAmmo(centity_t *cent,int x,int y) +{ + playerState_t *ps; + int numColor_i; + int i; + vec4_t calcColor; + float value,inc,percent; + + ps = &cg.snap->ps; + + if (!cent->currentState.weapon ) // We don't have a weapon right now + { + return; + } + + if ( cent->currentState.weapon == WP_SABER ) + { + trap_R_SetColor( colorTable[CT_WHITE] ); + // don't need to draw ammo, but we will draw the current saber style in this window + switch ( cg.predictedPlayerState.fd.saberDrawAnimLevel ) + { + case 1://FORCE_LEVEL_1: + CG_DrawPic( x, y, 80, 40, cgs.media.HUDSaberStyle1 ); + break; + case 2://FORCE_LEVEL_2: + CG_DrawPic( x, y, 80, 40, cgs.media.HUDSaberStyle2 ); + break; + case 3://FORCE_LEVEL_3: + CG_DrawPic( x, y, 80, 40, cgs.media.HUDSaberStyle3 ); + break; + } + return; + } + else + { + value = ps->ammo[weaponData[cent->currentState.weapon].ammoIndex]; + } + + if (value < 0) // No ammo + { + return; + } + + + // + // ammo + // +/* if (cg.oldammo < value) + { + cg.oldAmmoTime = cg.time + 200; + } + + cg.oldammo = value; +*/ + // Firing or reloading? +/* if (( pm->ps->weaponstate == WEAPON_FIRING + && cg.predictedPlayerState.weaponTime > 100 )) + { + numColor_i = CT_LTGREY; + } */ + // Overcharged? +// else if ( cent->gent->s.powerups & ( 1 << PW_WEAPON_OVERCHARGE ) ) +// { +// numColor_i = CT_WHITE; +// } +// else +// { +// if ( value > 0 ) +// { +// if (cg.oldAmmoTime > cg.time) +// { +// numColor_i = CT_YELLOW; +// } +// else +// { +// numColor_i = CT_HUD_ORANGE; +// } +// } +// else +// { +// numColor_i = CT_RED; +// } +// } + + numColor_i = CT_HUD_ORANGE; + + trap_R_SetColor( colorTable[numColor_i] ); + CG_DrawNumField (x + 30, y + 26, 3, value, 6, 12, NUM_FONT_SMALL,qfalse); + + +//cg.snap->ps.ammo[weaponData[cg.snap->ps.weapon].ammoIndex] + + inc = (float) ammoData[weaponData[cent->currentState.weapon].ammoIndex].max / MAX_TICS; + value =ps->ammo[weaponData[cent->currentState.weapon].ammoIndex]; + + for (i=MAX_TICS-1;i>=0;i--) + { + + if (value <= 0) // partial tic + { + memcpy(calcColor, colorTable[CT_BLACK], sizeof(vec4_t)); + } + else if (value < inc) // partial tic + { + memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); + percent = value / inc; + calcColor[0] *= percent; + calcColor[1] *= percent; + calcColor[2] *= percent; + } + else + { + memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); + } + + trap_R_SetColor( calcColor); + CG_DrawPic( x + ammoTicPos[i].x, + y + ammoTicPos[i].y, + ammoTicPos[i].width, + ammoTicPos[i].height, + ammoTicPos[i].tic ); + + value -= inc; + } + +} + +/* +================ +CG_DrawForcePower +================ +*/ +void CG_DrawForcePower(int x,int y) +{ + int i; + vec4_t calcColor; + float value,inc,percent; + + inc = (float) 100 / MAX_TICS; + value = cg.snap->ps.fd.forcePower; + + for (i=MAX_TICS-1;i>=0;i--) + { + + if (value <= 0) // partial tic + { + memcpy(calcColor, colorTable[CT_BLACK], sizeof(vec4_t)); + } + else if (value < inc) // partial tic + { + memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); + percent = value / inc; + calcColor[0] *= percent; + calcColor[1] *= percent; + calcColor[2] *= percent; + } + else + { + memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); + } + + trap_R_SetColor( calcColor); + CG_DrawPic( x + forceTicPos[i].x, + y + forceTicPos[i].y, + forceTicPos[i].width, + forceTicPos[i].height, + forceTicPos[i].tic ); + + value -= inc; + } +} + +/* +================ +CG_DrawHUD +================ +*/ +void CG_DrawHUD(centity_t *cent) +{ + menuDef_t *menuHUD = NULL; + const char *scoreStr = NULL; + int scoreBias; + char scoreBiasStr[16]; + + if (cg_hudFiles.integer) + { + int x = 0; + int y = SCREEN_HEIGHT-80; + char ammoString[64]; + int weapX = x; + + UI_DrawProportionalString( x+16, y+40, va( "%i", cg.snap->ps.stats[STAT_HEALTH] ), + UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_HUD_RED] ); + + UI_DrawProportionalString( x+18+14, y+40+14, va( "%i", cg.snap->ps.stats[STAT_ARMOR] ), + UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_HUD_GREEN] ); + + if (cg.snap->ps.weapon == WP_SABER) + { + if (cg.snap->ps.fd.saberDrawAnimLevel == FORCE_LEVEL_3) + { + Com_sprintf(ammoString, sizeof(ammoString), "STRONG"); + weapX += 16; + } + else if (cg.snap->ps.fd.saberDrawAnimLevel == FORCE_LEVEL_2) + { + Com_sprintf(ammoString, sizeof(ammoString), "MEDIUM"); + weapX += 16; + } + else + { + Com_sprintf(ammoString, sizeof(ammoString), "FAST"); + } + } + else + { + Com_sprintf(ammoString, sizeof(ammoString), "%i", cg.snap->ps.ammo[weaponData[cent->currentState.weapon].ammoIndex]); + } + + UI_DrawProportionalString( SCREEN_WIDTH-(weapX+16+32), y+40, va( "%s", ammoString ), + UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_HUD_ORANGE] ); + + UI_DrawProportionalString( SCREEN_WIDTH-(x+18+14+32), y+40+14, va( "%i", cg.snap->ps.fd.forcePower), + UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_ICON_BLUE] ); + + return; + } + + if (cgs.gametype >= GT_TEAM) + { // tint the hud items based on team + if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) + hudTintColor = redhudtint; + else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) + hudTintColor = bluehudtint; + else // If we're not on a team for whatever reason, leave things as they are. + hudTintColor = colorTable[CT_WHITE]; + } + else + { // tint the hud items white (dont' tint) + hudTintColor = colorTable[CT_WHITE]; + } + + menuHUD = Menus_FindByName("lefthud"); + if (menuHUD) + { + CG_DrawHUDLeftFrame1(menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawArmor(menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawHealth(menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawHUDLeftFrame2(menuHUD->window.rect.x,menuHUD->window.rect.y); + } + else + { //Apparently we failed to get proper coordinates from the menu, so resort to manually inputting them. + CG_DrawHUDLeftFrame1(0,SCREEN_HEIGHT-80); + CG_DrawArmor(0,SCREEN_HEIGHT-80); + CG_DrawHealth(0,SCREEN_HEIGHT-80); + CG_DrawHUDLeftFrame2(0,SCREEN_HEIGHT-80); + } + + //scoreStr = va("Score: %i", cgs.clientinfo[cg.snap->ps.clientNum].score); + if ( cgs.gametype == GT_TOURNAMENT ) + {//A duel that requires more than one kill to knock the current enemy back to the queue + //show current kills out of how many needed + scoreStr = va("Score: %i/%i", cg.snap->ps.persistant[PERS_SCORE], cgs.fraglimit); + } + else if (0 && cgs.gametype < GT_TEAM ) + { // This is a teamless mode, draw the score bias. + scoreBias = cg.snap->ps.persistant[PERS_SCORE] - cgs.scores1; + if (scoreBias == 0) + { // We are the leader! + if (cgs.scores2 <= 0) + { // Nobody to be ahead of yet. + Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), ""); + } + else + { + scoreBias = cg.snap->ps.persistant[PERS_SCORE] - cgs.scores2; + if (scoreBias == 0) + { + Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), " (Tie)"); + } + else + { + Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), " (+%d)", scoreBias); + } + } + } + else // if (scoreBias < 0) + { // We are behind! + Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), " (%d)", scoreBias); + } + scoreStr = va("Score: %i%s", cg.snap->ps.persistant[PERS_SCORE], scoreBiasStr); + } + else + { // Don't draw a bias. + scoreStr = va("Score: %i", cg.snap->ps.persistant[PERS_SCORE]); + } + UI_DrawScaledProportionalString(SCREEN_WIDTH-124/*(strlen(scoreStr)*20.5)*/, SCREEN_HEIGHT-23, scoreStr, UI_RIGHT|UI_DROPSHADOW, colorTable[CT_WHITE], 0.7); + + menuHUD = Menus_FindByName("righthud"); + if (menuHUD) + { + CG_DrawHUDRightFrame1(menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawForcePower(menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawAmmo(cent,menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawHUDRightFrame2(menuHUD->window.rect.x,menuHUD->window.rect.y); + + } + else + { //Apparently we failed to get proper coordinates from the menu, so resort to manually inputting them. + CG_DrawHUDRightFrame1(SCREEN_WIDTH-80,SCREEN_HEIGHT-80); + CG_DrawForcePower(SCREEN_WIDTH-80,SCREEN_HEIGHT-80); + CG_DrawAmmo(cent,SCREEN_WIDTH-80,SCREEN_HEIGHT-80); + CG_DrawHUDRightFrame2(SCREEN_WIDTH-80,SCREEN_HEIGHT-80); + } +} + +#define MAX_SHOWPOWERS NUM_FORCE_POWERS + +qboolean ForcePower_Valid(int i) +{ + if (i == FP_LEVITATION || + i == FP_SABERATTACK || + i == FP_SABERDEFEND || + i == FP_SABERTHROW) + { + return qfalse; + } + + if (cg.snap->ps.fd.forcePowersKnown & (1 << i)) + { + return qtrue; + } + + return qfalse; +} + +/* +=================== +CG_DrawForceSelect +=================== +*/ +void CG_DrawForceSelect( void ) +{ + int i; + int count; + int smallIconSize,bigIconSize; + int holdX,x,y,x2,y2,pad,length; + int sideLeftIconCnt,sideRightIconCnt; + int sideMax,holdCount,iconCnt; + + + x2 = 0; + y2 = 0; + + // don't display if dead + if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) + { + return; + } + + if ((cg.forceSelectTime+WEAPON_SELECT_TIME)ps.fd.forcePowerSelected; + return; + } + + if (!cg.snap->ps.fd.forcePowersKnown) + { + return; + } + + // count the number of powers owned + count = 0; + + for (i=0;i < NUM_FORCE_POWERS;++i) + { + if (ForcePower_Valid(i)) + { + count++; + } + } + + if (count == 0) // If no force powers, don't display + { + return; + } + + sideMax = 3; // Max number of icons on the side + + // Calculate how many icons will appear to either side of the center one + holdCount = count - 1; // -1 for the center icon + if (holdCount == 0) // No icons to either side + { + sideLeftIconCnt = 0; + sideRightIconCnt = 0; + } + else if (count > (2*sideMax)) // Go to the max on each side + { + sideLeftIconCnt = sideMax; + sideRightIconCnt = sideMax; + } + else // Less than max, so do the calc + { + sideLeftIconCnt = holdCount/2; + sideRightIconCnt = holdCount - sideLeftIconCnt; + } + + smallIconSize = 30; + bigIconSize = 60; + pad = 12; + + x = 320; + y = 425; + + // Background + length = (sideLeftIconCnt * smallIconSize) + (sideLeftIconCnt*pad) + + bigIconSize + (sideRightIconCnt * smallIconSize) + (sideRightIconCnt*pad) + 12; + + i = BG_ProperForceIndex(cg.forceSelect) - 1; + if (i < 0) + { + i = MAX_SHOWPOWERS; + } + + trap_R_SetColor(NULL); + // Work backwards from current icon + holdX = x - ((bigIconSize/2) + pad + smallIconSize); + for (iconCnt=1;iconCnt<(sideLeftIconCnt+1);i--) + { + if (i < 0) + { + i = MAX_SHOWPOWERS; + } + + if (!ForcePower_Valid(forcePowerSorted[i])) // Does he have this power? + { + continue; + } + + ++iconCnt; // Good icon + + if (cgs.media.forcePowerIcons[forcePowerSorted[i]]) + { + CG_DrawPic( holdX, y, smallIconSize, smallIconSize, cgs.media.forcePowerIcons[forcePowerSorted[i]] ); + holdX -= (smallIconSize+pad); + } + } + + if (ForcePower_Valid(cg.forceSelect)) + { + // Current Center Icon + if (cgs.media.forcePowerIcons[cg.forceSelect]) + { + CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2)), bigIconSize, bigIconSize, cgs.media.forcePowerIcons[cg.forceSelect] ); //only cache the icon for display + } + } + + i = BG_ProperForceIndex(cg.forceSelect) + 1; + if (i>MAX_SHOWPOWERS) + { + i = 0; + } + + // Work forwards from current icon + holdX = x + (bigIconSize/2) + pad; + for (iconCnt=1;iconCnt<(sideRightIconCnt+1);i++) + { + if (i>MAX_SHOWPOWERS) + { + i = 0; + } + + if (!ForcePower_Valid(forcePowerSorted[i])) // Does he have this power? + { + continue; + } + + ++iconCnt; // Good icon + + if (cgs.media.forcePowerIcons[forcePowerSorted[i]]) + { + CG_DrawPic( holdX, y, smallIconSize, smallIconSize, cgs.media.forcePowerIcons[forcePowerSorted[i]] ); //only cache the icon for display + holdX += (smallIconSize+pad); + } + } + + if ( showPowersName[cg.forceSelect] ) + { + UI_DrawProportionalString(320, y + 30, CG_GetStripEdString("INGAME", showPowersName[cg.forceSelect]), UI_CENTER | UI_SMALLFONT, colorTable[CT_ICON_BLUE]); + } +} + +/* +=================== +CG_DrawInventorySelect +=================== +*/ +void CG_DrawInvenSelect( void ) +{ + int i; + int sideMax,holdCount,iconCnt; + int smallIconSize,bigIconSize; + int sideLeftIconCnt,sideRightIconCnt; + int count; + int holdX,x,y,y2,pad; + int height; + float addX; + + // don't display if dead + if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) + { + return; + } + + if ((cg.invenSelectTime+WEAPON_SELECT_TIME)ps.stats[STAT_HOLDABLE_ITEM] || !cg.snap->ps.stats[STAT_HOLDABLE_ITEMS]) + { + return; + } + + if (cg.itemSelect == -1) + { + cg.itemSelect = bg_itemlist[cg.snap->ps.stats[STAT_HOLDABLE_ITEM]].giTag; + } + +//const int bits = cg.snap->ps.stats[ STAT_ITEMS ]; + + // count the number of items owned + count = 0; + for ( i = 0 ; i < HI_NUM_HOLDABLE ; i++ ) + { + if (/*CG_InventorySelectable(i) && inv_icons[i]*/ + (cg.snap->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << i)) ) + { + count++; + } + } + + if (!count) + { + y2 = 0; //err? + UI_DrawProportionalString(320, y2 + 22, "EMPTY INVENTORY", UI_CENTER | UI_SMALLFONT, colorTable[CT_ICON_BLUE]); + return; + } + + sideMax = 3; // Max number of icons on the side + + // Calculate how many icons will appear to either side of the center one + holdCount = count - 1; // -1 for the center icon + if (holdCount == 0) // No icons to either side + { + sideLeftIconCnt = 0; + sideRightIconCnt = 0; + } + else if (count > (2*sideMax)) // Go to the max on each side + { + sideLeftIconCnt = sideMax; + sideRightIconCnt = sideMax; + } + else // Less than max, so do the calc + { + sideLeftIconCnt = holdCount/2; + sideRightIconCnt = holdCount - sideLeftIconCnt; + } + + i = cg.itemSelect - 1; + if (i<0) + { + i = HI_NUM_HOLDABLE-1; + } + + smallIconSize = 40; + bigIconSize = 80; + pad = 16; + + x = 320; + y = 410; + + // Left side ICONS + // Work backwards from current icon + holdX = x - ((bigIconSize/2) + pad + smallIconSize); + height = smallIconSize * cg.iconHUDPercent; + addX = (float) smallIconSize * .75; + + for (iconCnt=0;iconCntps.stats[STAT_HOLDABLE_ITEMS] & (1 << i)) || i == cg.itemSelect ) + { + continue; + } + + ++iconCnt; // Good icon + + if (cgs.media.invenIcons[i]) + { + trap_R_SetColor(NULL); + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.invenIcons[i] ); + + trap_R_SetColor(colorTable[CT_ICON_BLUE]); + /*CG_DrawNumField (holdX + addX, y + smallIconSize, 2, cg.snap->ps.inventory[i], 6, 12, + NUM_FONT_SMALL,qfalse); + */ + + holdX -= (smallIconSize+pad); + } + } + + // Current Center Icon + height = bigIconSize * cg.iconHUDPercent; + if (cgs.media.invenIcons[cg.itemSelect]) + { + int itemNdex; + trap_R_SetColor(NULL); + CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2))+10, bigIconSize, bigIconSize, cgs.media.invenIcons[cg.itemSelect] ); + addX = (float) bigIconSize * .75; + trap_R_SetColor(colorTable[CT_ICON_BLUE]); + /*CG_DrawNumField ((x-(bigIconSize/2)) + addX, y, 2, cg.snap->ps.inventory[cg.inventorySelect], 6, 12, + NUM_FONT_SMALL,qfalse);*/ + + itemNdex = BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE); + if (bg_itemlist[itemNdex].classname) + { + vec4_t textColor = { .312f, .75f, .621f, 1.0f }; + char text[1024]; + + if ( trap_SP_GetStringTextString( va("INGAME_%s",bg_itemlist[itemNdex].classname), text, sizeof( text ))) + { + UI_DrawProportionalString(320, y+45, text, UI_CENTER | UI_SMALLFONT, textColor); + } + else + { + UI_DrawProportionalString(320, y+45, bg_itemlist[itemNdex].classname, UI_CENTER | UI_SMALLFONT, textColor); + } + } + } + + i = cg.itemSelect + 1; + if (i> HI_NUM_HOLDABLE-1) + { + i = 0; + } + + // Right side ICONS + // Work forwards from current icon + holdX = x + (bigIconSize/2) + pad; + height = smallIconSize * cg.iconHUDPercent; + addX = (float) smallIconSize * .75; + for (iconCnt=0;iconCnt HI_NUM_HOLDABLE-1) + { + i = 0; + } + + if ( !(cg.snap->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << i)) || i == cg.itemSelect ) + { + continue; + } + + ++iconCnt; // Good icon + + if (cgs.media.invenIcons[i]) + { + trap_R_SetColor(NULL); + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.invenIcons[i] ); + + trap_R_SetColor(colorTable[CT_ICON_BLUE]); + /*CG_DrawNumField (holdX + addX, y + smallIconSize, 2, cg.snap->ps.inventory[i], 6, 12, + NUM_FONT_SMALL,qfalse);*/ + + holdX += (smallIconSize+pad); + } + } +} + +/* +================ +CG_DrawStats + +================ +*/ +static void CG_DrawStats( void ) +{ + centity_t *cent; +/* playerState_t *ps; + vec3_t angles; +// vec3_t origin; + + if ( cg_drawStatus.integer == 0 ) { + return; + } +*/ + cent = &cg_entities[cg.snap->ps.clientNum]; +/* ps = &cg.snap->ps; + + VectorClear( angles ); + + // Do start + if (!cg.interfaceStartupDone) + { + CG_InterfaceStartup(); + } + + cgi_UI_MenuPaintAll();*/ + + CG_DrawHUD(cent); + /*CG_DrawArmor(cent); + CG_DrawHealth(cent); + CG_DrawAmmo(cent); + + CG_DrawTalk(cent);*/ +} + + +/* +================ +CG_DrawTeamBackground + +================ +*/ +void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int team ) +{ + vec4_t hcolor; + + hcolor[3] = alpha; + if ( team == TEAM_RED ) { + hcolor[0] = 1; + hcolor[1] = .2f; + hcolor[2] = .2f; + } else if ( team == TEAM_BLUE ) { + hcolor[0] = .2f; + hcolor[1] = .2f; + hcolor[2] = 1; + } else { + return; + } +// trap_R_SetColor( hcolor ); + + CG_FillRect ( x, y, w, h, hcolor ); +// CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar ); + trap_R_SetColor( NULL ); +} + + +/* +=========================================================================================== + + UPPER RIGHT CORNER + +=========================================================================================== +*/ + +/* +================ +CG_DrawMiniScoreboard +================ +*/ +static float CG_DrawMiniScoreboard ( float y ) +{ + char temp[MAX_QPATH]; + + if ( !cg_drawScores.integer ) + { + return y; + } + + if ( cgs.gametype >= GT_TEAM ) + { + strcpy ( temp, "Red: " ); + Q_strcat ( temp, MAX_QPATH, cgs.scores1==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores1)) ); + Q_strcat ( temp, MAX_QPATH, " Blue: " ); + Q_strcat ( temp, MAX_QPATH, cgs.scores2==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores2)) ); + + CG_Text_Paint( 630 - CG_Text_Width ( temp, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, temp, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM ); + y += 15; + } + else + { + /* + strcpy ( temp, "1st: " ); + Q_strcat ( temp, MAX_QPATH, cgs.scores1==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores1)) ); + + Q_strcat ( temp, MAX_QPATH, " 2nd: " ); + Q_strcat ( temp, MAX_QPATH, cgs.scores2==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores2)) ); + + CG_Text_Paint( 630 - CG_Text_Width ( temp, 0.7f, FONT_SMALL ), y, 0.7f, colorWhite, temp, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM ); + y += 15; + */ + //rww - no longer doing this. Since the attacker now shows who is first, we print the score there. + } + + + return y; +} + +/* +================ +CG_DrawEnemyInfo +================ +*/ +static float CG_DrawEnemyInfo ( float y ) +{ + float size; + int clientNum; + const char *title; + clientInfo_t *ci; + + if ( !cg_drawEnemyInfo.integer ) + { + return y; + } + + if ( cg.predictedPlayerState.stats[STAT_HEALTH] <= 0 ) + { + return y; + } + + if ( cgs.gametype == GT_JEDIMASTER ) + { + //title = "Jedi Master"; + title = CG_GetStripEdString("INGAMETEXT", "MASTERY7"); + clientNum = cgs.jediMaster; + + if ( clientNum < 0 ) + { + //return y; +// title = "Get Saber!"; + title = CG_GetStripEdString("INGAMETEXT", "GET_SABER"); + + + size = ICON_SIZE * 1.25; + y += 5; + + CG_DrawPic( 640 - size - 12, y, size, size, cgs.media.weaponIcons[WP_SABER] ); + + y += size; + + /* + CG_Text_Paint( 630 - CG_Text_Width ( ci->name, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, ci->name, 0, 0, 0, FONT_MEDIUM ); + y += 15; + */ + + CG_Text_Paint( 630 - CG_Text_Width ( title, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, title, 0, 0, 0, FONT_MEDIUM ); + + return y + BIGCHAR_HEIGHT + 2; + } + } + else if ( cg.snap->ps.duelInProgress ) + { +// title = "Dueling"; + title = CG_GetStripEdString("INGAMETEXT", "DUELING"); + clientNum = cg.snap->ps.duelIndex; + } + else if ( cgs.gametype == GT_TOURNAMENT && cgs.clientinfo[cg.snap->ps.clientNum].team != TEAM_SPECTATOR) + { +// title = "Dueling"; + title = CG_GetStripEdString("INGAMETEXT", "DUELING"); + if (cg.snap->ps.clientNum == cgs.duelist1) + { + clientNum = cgs.duelist2; + } + else if (cg.snap->ps.clientNum == cgs.duelist2) + { + clientNum = cgs.duelist1; + } + else + { + return y; + } + } + else + { + /* + title = "Attacker"; + clientNum = cg.predictedPlayerState.persistant[PERS_ATTACKER]; + + if ( clientNum < 0 || clientNum >= MAX_CLIENTS || clientNum == cg.snap->ps.clientNum ) + { + return y; + } + + if ( cg.time - cg.attackerTime > ATTACKER_HEAD_TIME ) + { + cg.attackerTime = 0; + return y; + } + */ + //As of current, we don't want to draw the attacker. Instead, draw whoever is in first place. + if (cgs.duelWinner < 0 || cgs.duelWinner >= MAX_CLIENTS) + { + return y; + } + + + title = va("%s: %i",CG_GetStripEdString("INGAMETEXT", "LEADER"), cgs.scores1); + + /* + if (cgs.scores1 == 1) + { + title = va("%i kill", cgs.scores1); + } + else + { + title = va("%i kills", cgs.scores1); + } + */ + clientNum = cgs.duelWinner; + } + + ci = &cgs.clientinfo[ clientNum ]; + + if ( !ci ) + { + return y; + } + + size = ICON_SIZE * 1.25; + y += 5; + + if ( ci->modelIcon ) + { + CG_DrawPic( 640 - size - 5, y, size, size, ci->modelIcon ); + } + + y += size; + + CG_Text_Paint( 630 - CG_Text_Width ( ci->name, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, ci->name, 0, 0, 0, FONT_MEDIUM ); + + y += 15; + CG_Text_Paint( 630 - CG_Text_Width ( title, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, title, 0, 0, 0, FONT_MEDIUM ); + + if ( cgs.gametype == GT_TOURNAMENT && cgs.clientinfo[cg.snap->ps.clientNum].team != TEAM_SPECTATOR) + {//also print their score + char text[1024]; + y += 15; + Com_sprintf(text, sizeof(text), "%i/%i", cgs.clientinfo[clientNum].score, cgs.fraglimit ); + CG_Text_Paint( 630 - CG_Text_Width ( text, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, text, 0, 0, 0, FONT_MEDIUM ); + } + + return y + BIGCHAR_HEIGHT + 2; +} + +/* +================== +CG_DrawSnapshot +================== +*/ +static float CG_DrawSnapshot( float y ) { + char *s; + int w; + + s = va( "time:%i snap:%i cmd:%i", cg.snap->serverTime, + cg.latestSnapshotNum, cgs.serverCommandSequence ); + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + + CG_DrawBigString( 635 - w, y + 2, s, 1.0F); + + return y + BIGCHAR_HEIGHT + 4; +} + +/* +================== +CG_DrawFPS +================== +*/ +#define FPS_FRAMES 4 +static float CG_DrawFPS( float y ) { + char *s; + int w; + static int previousTimes[FPS_FRAMES]; + static int index; + int i, total; + int fps; + static int previous; + int t, frameTime; + + // don't use serverTime, because that will be drifting to + // correct for internet lag changes, timescales, timedemos, etc + t = trap_Milliseconds(); + frameTime = t - previous; + previous = t; + + previousTimes[index % FPS_FRAMES] = frameTime; + index++; + if ( index > FPS_FRAMES ) { + // average multiple frames together to smooth changes out a bit + total = 0; + for ( i = 0 ; i < FPS_FRAMES ; i++ ) { + total += previousTimes[i]; + } + if ( !total ) { + total = 1; + } + fps = 1000 * FPS_FRAMES / total; + + s = va( "%ifps", fps ); + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + + CG_DrawBigString( 635 - w, y + 2, s, 1.0F); + } + + return y + BIGCHAR_HEIGHT + 4; +} + +/* +================= +CG_DrawTimer +================= +*/ +static float CG_DrawTimer( float y ) { + char *s; + int w; + int mins, seconds, tens; + int msec; + + msec = cg.time - cgs.levelStartTime; + + seconds = msec / 1000; + mins = seconds / 60; + seconds -= mins * 60; + tens = seconds / 10; + seconds -= tens * 10; + + s = va( "%i:%i%i", mins, tens, seconds ); + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + + CG_DrawBigString( 635 - w, y + 2, s, 1.0F); + + return y + BIGCHAR_HEIGHT + 4; +} + + +/* +================= +CG_DrawTeamOverlay +================= +*/ + +static float CG_DrawTeamOverlay( float y, qboolean right, qboolean upper ) { + int x, w, h, xx; + int i, j, len; + const char *p; + vec4_t hcolor; + int pwidth, lwidth; + int plyrs; + char st[16]; + clientInfo_t *ci; + gitem_t *item; + int ret_y, count; + + if ( !cg_drawTeamOverlay.integer ) { + return y; + } + + if ( cg.snap->ps.persistant[PERS_TEAM] != TEAM_RED && cg.snap->ps.persistant[PERS_TEAM] != TEAM_BLUE ) { + return y; // Not on any team + } + + plyrs = 0; + + // max player name width + pwidth = 0; + count = (numSortedTeamPlayers > 8) ? 8 : numSortedTeamPlayers; + for (i = 0; i < count; i++) { + ci = cgs.clientinfo + sortedTeamPlayers[i]; + if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { + plyrs++; + len = CG_DrawStrlen(ci->name); + if (len > pwidth) + pwidth = len; + } + } + + if (!plyrs) + return y; + + if (pwidth > TEAM_OVERLAY_MAXNAME_WIDTH) + pwidth = TEAM_OVERLAY_MAXNAME_WIDTH; + + // max location name width + lwidth = 0; + for (i = 1; i < MAX_LOCATIONS; i++) { + p = CG_ConfigString(CS_LOCATIONS + i); + if (p && *p) { + len = CG_DrawStrlen(p); + if (len > lwidth) + lwidth = len; + } + } + + if (lwidth > TEAM_OVERLAY_MAXLOCATION_WIDTH) + lwidth = TEAM_OVERLAY_MAXLOCATION_WIDTH; + + w = (pwidth + lwidth + 4 + 7) * TINYCHAR_WIDTH; + + if ( right ) + x = 640 - w; + else + x = 0; + + h = plyrs * TINYCHAR_HEIGHT; + + if ( upper ) { + ret_y = y + h; + } else { + y -= h; + ret_y = y; + } + + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) { + hcolor[0] = 1.0f; + hcolor[1] = 0.0f; + hcolor[2] = 0.0f; + hcolor[3] = 0.33f; + } else { // if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) + hcolor[0] = 0.0f; + hcolor[1] = 0.0f; + hcolor[2] = 1.0f; + hcolor[3] = 0.33f; + } + trap_R_SetColor( hcolor ); + CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar ); + trap_R_SetColor( NULL ); + + for (i = 0; i < count; i++) { + ci = cgs.clientinfo + sortedTeamPlayers[i]; + if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { + + hcolor[0] = hcolor[1] = hcolor[2] = hcolor[3] = 1.0; + + xx = x + TINYCHAR_WIDTH; + + CG_DrawStringExt( xx, y, + ci->name, hcolor, qfalse, qfalse, + TINYCHAR_WIDTH, TINYCHAR_HEIGHT, TEAM_OVERLAY_MAXNAME_WIDTH); + + if (lwidth) { + p = CG_ConfigString(CS_LOCATIONS + ci->location); + if (!p || !*p) + p = "unknown"; + len = CG_DrawStrlen(p); + if (len > lwidth) + len = lwidth; + +// xx = x + TINYCHAR_WIDTH * 2 + TINYCHAR_WIDTH * pwidth + +// ((lwidth/2 - len/2) * TINYCHAR_WIDTH); + xx = x + TINYCHAR_WIDTH * 2 + TINYCHAR_WIDTH * pwidth; + CG_DrawStringExt( xx, y, + p, hcolor, qfalse, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, + TEAM_OVERLAY_MAXLOCATION_WIDTH); + } + + CG_GetColorForHealth( ci->health, ci->armor, hcolor ); + + Com_sprintf (st, sizeof(st), "%3i %3i", ci->health, ci->armor); + + xx = x + TINYCHAR_WIDTH * 3 + + TINYCHAR_WIDTH * pwidth + TINYCHAR_WIDTH * lwidth; + + CG_DrawStringExt( xx, y, + st, hcolor, qfalse, qfalse, + TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 0 ); + + // draw weapon icon + xx += TINYCHAR_WIDTH * 3; + + if ( cg_weapons[ci->curWeapon].weaponIcon ) { + CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, + cg_weapons[ci->curWeapon].weaponIcon ); + } else { + CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, + cgs.media.deferShader ); + } + + // Draw powerup icons + if (right) { + xx = x; + } else { + xx = x + w - TINYCHAR_WIDTH; + } + for (j = 0; j <= PW_NUM_POWERUPS; j++) { + if (ci->powerups & (1 << j)) { + + item = BG_FindItemForPowerup( j ); + + if (item) { + CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, + trap_R_RegisterShader( item->icon ) ); + if (right) { + xx -= TINYCHAR_WIDTH; + } else { + xx += TINYCHAR_WIDTH; + } + } + } + } + + y += TINYCHAR_HEIGHT; + } + } + + return ret_y; +//#endif +} + + +static void CG_DrawPowerupIcons(int y) +{ + int j; + int ico_size = 64; + //int y = ico_size/2; + gitem_t *item; + + if (!cg.snap) + { + return; + } + + y += 16; + + for (j = 0; j <= PW_NUM_POWERUPS; j++) + { + if (cg.snap->ps.powerups[j] > cg.time) + { + int secondsleft = (cg.snap->ps.powerups[j] - cg.time)/1000; + + item = BG_FindItemForPowerup( j ); + + if (item) + { + int icoShader = 0; + if (cgs.gametype == GT_CTY && (j == PW_REDFLAG || j == PW_BLUEFLAG)) + { + if (j == PW_REDFLAG) + { + icoShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_ys" ); + } + else + { + icoShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_ys" ); + } + } + else + { + icoShader = trap_R_RegisterShader( item->icon ); + } + + CG_DrawPic( (640-(ico_size*1.1)), y, ico_size, ico_size, icoShader ); + + y += ico_size; + + if (j != PW_REDFLAG && j != PW_BLUEFLAG && secondsleft < 999) + { + UI_DrawProportionalString((640-(ico_size*1.1))+(ico_size/2), y-8, va("%i", secondsleft), UI_CENTER | UI_BIGFONT | UI_DROPSHADOW, colorTable[CT_WHITE]); + } + + y += (ico_size/3); + } + } + } +} + + +/* +===================== +CG_DrawUpperRight + +===================== +*/ +static void CG_DrawUpperRight( void ) { + float y; + + y = 0; + + if ( cgs.gametype >= GT_TEAM && cg_drawTeamOverlay.integer == 1 ) { + y = CG_DrawTeamOverlay( y, qtrue, qtrue ); + } + if ( cg_drawSnapshot.integer ) { + y = CG_DrawSnapshot( y ); + } + if ( cg_drawFPS.integer ) { + y = CG_DrawFPS( y ); + } + if ( cg_drawTimer.integer ) { + y = CG_DrawTimer( y ); + } + + y = CG_DrawEnemyInfo ( y ); + + y = CG_DrawMiniScoreboard ( y ); + + CG_DrawPowerupIcons(y); +} + +/* +=================== +CG_DrawReward +=================== +*/ +#ifdef JK2AWARDS +static void CG_DrawReward( void ) { + float *color; + int i, count; + float x, y; + char buf[32]; + + if ( !cg_drawRewards.integer ) { + return; + } + + color = CG_FadeColor( cg.rewardTime, REWARD_TIME ); + if ( !color ) { + if (cg.rewardStack > 0) { + for(i = 0; i < cg.rewardStack; i++) { + cg.rewardSound[i] = cg.rewardSound[i+1]; + cg.rewardShader[i] = cg.rewardShader[i+1]; + cg.rewardCount[i] = cg.rewardCount[i+1]; + } + cg.rewardTime = cg.time; + cg.rewardStack--; + color = CG_FadeColor( cg.rewardTime, REWARD_TIME ); + trap_S_StartLocalSound(cg.rewardSound[0], CHAN_ANNOUNCER); + } else { + return; + } + } + + trap_R_SetColor( color ); + + /* + count = cg.rewardCount[0]/10; // number of big rewards to draw + + if (count) { + y = 4; + x = 320 - count * ICON_SIZE; + for ( i = 0 ; i < count ; i++ ) { + CG_DrawPic( x, y, (ICON_SIZE*2)-4, (ICON_SIZE*2)-4, cg.rewardShader[0] ); + x += (ICON_SIZE*2); + } + } + + count = cg.rewardCount[0] - count*10; // number of small rewards to draw + */ + + if ( cg.rewardCount[0] >= 10 ) { + y = 56; + x = 320 - ICON_SIZE/2; + CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] ); + Com_sprintf(buf, sizeof(buf), "%d", cg.rewardCount[0]); + x = ( SCREEN_WIDTH - SMALLCHAR_WIDTH * CG_DrawStrlen( buf ) ) / 2; + CG_DrawStringExt( x, y+ICON_SIZE, buf, color, qfalse, qtrue, + SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 ); + } + else { + + count = cg.rewardCount[0]; + + y = 56; + x = 320 - count * ICON_SIZE/2; + for ( i = 0 ; i < count ; i++ ) { + CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] ); + x += ICON_SIZE; + } + } + trap_R_SetColor( NULL ); +} +#endif + + +/* +=============================================================================== + +LAGOMETER + +=============================================================================== +*/ + +#define LAG_SAMPLES 128 + + +typedef struct { + int frameSamples[LAG_SAMPLES]; + int frameCount; + int snapshotFlags[LAG_SAMPLES]; + int snapshotSamples[LAG_SAMPLES]; + int snapshotCount; +} lagometer_t; + +lagometer_t lagometer; + +/* +============== +CG_AddLagometerFrameInfo + +Adds the current interpolate / extrapolate bar for this frame +============== +*/ +void CG_AddLagometerFrameInfo( void ) { + int offset; + + offset = cg.time - cg.latestSnapshotTime; + lagometer.frameSamples[ lagometer.frameCount & ( LAG_SAMPLES - 1) ] = offset; + lagometer.frameCount++; +} + +/* +============== +CG_AddLagometerSnapshotInfo + +Each time a snapshot is received, log its ping time and +the number of snapshots that were dropped before it. + +Pass NULL for a dropped packet. +============== +*/ +void CG_AddLagometerSnapshotInfo( snapshot_t *snap ) { + // dropped packet + if ( !snap ) { + lagometer.snapshotSamples[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = -1; + lagometer.snapshotCount++; + return; + } + + // add this snapshot's info + lagometer.snapshotSamples[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = snap->ping; + lagometer.snapshotFlags[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = snap->snapFlags; + lagometer.snapshotCount++; +} + +/* +============== +CG_DrawDisconnect + +Should we draw something differnet for long lag vs no packets? +============== +*/ +static void CG_DrawDisconnect( void ) { + float x, y; + int cmdNum; + usercmd_t cmd; + const char *s; + int w; // bk010215 - FIXME char message[1024]; + + if (cg.mMapChange) + { + s = CG_GetStripEdString("INGAMETEXT", "SERVER_CHANGING_MAPS"); // s = "Server Changing Maps"; + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + CG_DrawBigString( 320 - w/2, 100, s, 1.0F); + + s = CG_GetStripEdString("INGAMETEXT", "PLEASE_WAIT"); // s = "Please wait..."; + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + CG_DrawBigString( 320 - w/2, 200, s, 1.0F); + return; + } + + // draw the phone jack if we are completely past our buffers + cmdNum = trap_GetCurrentCmdNumber() - CMD_BACKUP + 1; + trap_GetUserCmd( cmdNum, &cmd ); + if ( cmd.serverTime <= cg.snap->ps.commandTime + || cmd.serverTime > cg.time ) { // special check for map_restart // bk 0102165 - FIXME + return; + } + + // also add text in center of screen + s = CG_GetStripEdString("INGAMETEXT", "CONNECTION_INTERRUPTED"); // s = "Connection Interrupted"; // bk 010215 - FIXME + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + CG_DrawBigString( 320 - w/2, 100, s, 1.0F); + + // blink the icon + if ( ( cg.time >> 9 ) & 1 ) { + return; + } + + x = 640 - 48; + y = 480 - 48; + + CG_DrawPic( x, y, 48, 48, trap_R_RegisterShader("gfx/2d/net.tga" ) ); +} + + +#define MAX_LAGOMETER_PING 900 +#define MAX_LAGOMETER_RANGE 300 + +/* +============== +CG_DrawLagometer +============== +*/ +static void CG_DrawLagometer( void ) { + int a, x, y, i; + float v; + float ax, ay, aw, ah, mid, range; + int color; + float vscale; + + if ( !cg_lagometer.integer || cgs.localServer ) { + CG_DrawDisconnect(); + return; + } + + // + // draw the graph + // + x = 640 - 48; + y = 480 - 144; + + trap_R_SetColor( NULL ); + CG_DrawPic( x, y, 48, 48, cgs.media.lagometerShader ); + + ax = x; + ay = y; + aw = 48; + ah = 48; + + color = -1; + range = ah / 3; + mid = ay + range; + + vscale = range / MAX_LAGOMETER_RANGE; + + // draw the frame interpoalte / extrapolate graph + for ( a = 0 ; a < aw ; a++ ) { + i = ( lagometer.frameCount - 1 - a ) & (LAG_SAMPLES - 1); + v = lagometer.frameSamples[i]; + v *= vscale; + if ( v > 0 ) { + if ( color != 1 ) { + color = 1; + trap_R_SetColor( g_color_table[ColorIndex(COLOR_YELLOW)] ); + } + if ( v > range ) { + v = range; + } + trap_R_DrawStretchPic ( ax + aw - a, mid - v, 1, v, 0, 0, 0, 0, cgs.media.whiteShader ); + } else if ( v < 0 ) { + if ( color != 2 ) { + color = 2; + trap_R_SetColor( g_color_table[ColorIndex(COLOR_BLUE)] ); + } + v = -v; + if ( v > range ) { + v = range; + } + trap_R_DrawStretchPic( ax + aw - a, mid, 1, v, 0, 0, 0, 0, cgs.media.whiteShader ); + } + } + + // draw the snapshot latency / drop graph + range = ah / 2; + vscale = range / MAX_LAGOMETER_PING; + + for ( a = 0 ; a < aw ; a++ ) { + i = ( lagometer.snapshotCount - 1 - a ) & (LAG_SAMPLES - 1); + v = lagometer.snapshotSamples[i]; + if ( v > 0 ) { + if ( lagometer.snapshotFlags[i] & SNAPFLAG_RATE_DELAYED ) { + if ( color != 5 ) { + color = 5; // YELLOW for rate delay + trap_R_SetColor( g_color_table[ColorIndex(COLOR_YELLOW)] ); + } + } else { + if ( color != 3 ) { + color = 3; + trap_R_SetColor( g_color_table[ColorIndex(COLOR_GREEN)] ); + } + } + v = v * vscale; + if ( v > range ) { + v = range; + } + trap_R_DrawStretchPic( ax + aw - a, ay + ah - v, 1, v, 0, 0, 0, 0, cgs.media.whiteShader ); + } else if ( v < 0 ) { + if ( color != 4 ) { + color = 4; // RED for dropped snapshots + trap_R_SetColor( g_color_table[ColorIndex(COLOR_RED)] ); + } + trap_R_DrawStretchPic( ax + aw - a, ay + ah - range, 1, range, 0, 0, 0, 0, cgs.media.whiteShader ); + } + } + + trap_R_SetColor( NULL ); + + if ( cg_nopredict.integer || cg_synchronousClients.integer ) { + CG_DrawBigString( ax, ay, "snc", 1.0 ); + } + + CG_DrawDisconnect(); +} + + + +/* +=============================================================================== + +CENTER PRINTING + +=============================================================================== +*/ + + +/* +============== +CG_CenterPrint + +Called for important messages that should stay in the center of the screen +for a few moments +============== +*/ +void CG_CenterPrint( const char *str, int y, int charWidth ) { + char *s; + + Q_strncpyz( cg.centerPrint, str, sizeof(cg.centerPrint) ); + + cg.centerPrintTime = cg.time; + cg.centerPrintY = y; + cg.centerPrintCharWidth = charWidth; + + // count the number of lines for centering + cg.centerPrintLines = 1; + s = cg.centerPrint; + while( *s ) { + if (*s == '\n') + cg.centerPrintLines++; + s++; + } +} + + +/* +=================== +CG_DrawCenterString +=================== +*/ +static void CG_DrawCenterString( void ) { + char *start; + int l; + int x, y, w; + int h; + float *color; + const float scale = 1.0; //0.5 + + if ( !cg.centerPrintTime ) { + return; + } + + color = CG_FadeColor( cg.centerPrintTime, 1000 * cg_centertime.value ); + if ( !color ) { + return; + } + + trap_R_SetColor( color ); + + start = cg.centerPrint; + + y = cg.centerPrintY - cg.centerPrintLines * BIGCHAR_HEIGHT / 2; + + while ( 1 ) { + char linebuffer[1024]; + + for ( l = 0; l < 50; l++ ) { + if ( !start[l] || start[l] == '\n' ) { + break; + } + linebuffer[l] = start[l]; + } + linebuffer[l] = 0; + + w = CG_Text_Width(linebuffer, scale, FONT_MEDIUM); + h = CG_Text_Height(linebuffer, scale, FONT_MEDIUM); + x = (SCREEN_WIDTH - w) / 2; + CG_Text_Paint(x, y + h, scale, color, linebuffer, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM); + y += h + 6; + + while ( *start && ( *start != '\n' ) ) { + start++; + } + if ( !*start ) { + break; + } + start++; + } + + trap_R_SetColor( NULL ); +} + + + +/* +================================================================================ + +CROSSHAIR + +================================================================================ +*/ + + +/* +================= +CG_DrawCrosshair +================= +*/ +static void CG_DrawCrosshair( vec3_t worldPoint, int chEntValid ) { + float w, h; + qhandle_t hShader; + float f; + float x, y; + + if ( !cg_drawCrosshair.integer ) + { + return; + } + + if (cg.snap->ps.fallingToDeath) + { + return; + } + + if ( cg.predictedPlayerState.zoomMode != 0 ) + {//not while scoped + return; + } + + if ( cg_crosshairHealth.integer ) + { + vec4_t hcolor; + + CG_ColorForHealth( hcolor ); + trap_R_SetColor( hcolor ); + } + else + { + //set color based on what kind of ent is under crosshair + if ( cg.crosshairClientNum >= ENTITYNUM_WORLD ) + { + trap_R_SetColor( NULL ); + } + else if (chEntValid && (cg_entities[cg.crosshairClientNum].currentState.number < MAX_CLIENTS || cg_entities[cg.crosshairClientNum].currentState.shouldtarget)) + { + vec4_t ecolor = {0,0,0,0}; + centity_t *crossEnt = &cg_entities[cg.crosshairClientNum]; + + if ( crossEnt->currentState.number < MAX_CLIENTS ) + { + if (cgs.gametype >= GT_TEAM && + cgs.clientinfo[crossEnt->currentState.number].team == cgs.clientinfo[cg.snap->ps.clientNum].team ) + { + //Allies are green + ecolor[0] = 0.0;//R + ecolor[1] = 1.0;//G + ecolor[2] = 0.0;//B + } + else + { + //Enemies are red + ecolor[0] = 1.0;//R + ecolor[1] = 0.0;//G + ecolor[2] = 0.0;//B + } + + if (cg.snap->ps.duelInProgress) + { + if (crossEnt->currentState.number != cg.snap->ps.duelIndex) + { //grey out crosshair for everyone but your foe if you're in a duel + ecolor[0] = 0.4; + ecolor[1] = 0.4; + ecolor[2] = 0.4; + } + } + else if (crossEnt->currentState.bolt1) + { //this fellow is in a duel. We just checked if we were in a duel above, so + //this means we aren't and he is. Which of course means our crosshair greys out over him. + ecolor[0] = 0.4; + ecolor[1] = 0.4; + ecolor[2] = 0.4; + } + } + else if (crossEnt->currentState.shouldtarget) + { + //VectorCopy( crossEnt->startRGBA, ecolor ); + if ( !ecolor[0] && !ecolor[1] && !ecolor[2] ) + { + // We really don't want black, so set it to yellow + ecolor[0] = 1.0F;//R + ecolor[1] = 0.8F;//G + ecolor[2] = 0.3F;//B + } + + if (crossEnt->currentState.owner == cg.snap->ps.clientNum || + (cgs.gametype >= GT_TEAM && crossEnt->currentState.teamowner == cgs.clientinfo[cg.snap->ps.clientNum].team)) + { + ecolor[0] = 0.0;//R + ecolor[1] = 1.0;//G + ecolor[2] = 0.0;//B + } + else if (crossEnt->currentState.teamowner == 16 || + (cgs.gametype >= GT_TEAM && crossEnt->currentState.teamowner && crossEnt->currentState.teamowner != cgs.clientinfo[cg.snap->ps.clientNum].team)) + { + ecolor[0] = 1.0;//R + ecolor[1] = 0.0;//G + ecolor[2] = 0.0;//B + } + else if (crossEnt->currentState.eType == ET_GRAPPLE) + { + ecolor[0] = 1.0;//R + ecolor[1] = 0.0;//G + ecolor[2] = 0.0;//B + } + } + + ecolor[3] = 1.0; + + trap_R_SetColor( ecolor ); + } + } + + w = h = cg_crosshairSize.value; + + // pulse the size of the crosshair when picking up items + f = cg.time - cg.itemPickupBlendTime; + if ( f > 0 && f < ITEM_BLOB_TIME ) { + f /= ITEM_BLOB_TIME; + w *= ( 1 + f ); + h *= ( 1 + f ); + } + + if ( worldPoint && VectorLength( worldPoint ) ) + { + if ( !CG_WorldCoordToScreenCoordFloat( worldPoint, &x, &y ) ) + {//off screen, don't draw it + return; + } + x -= 320; + y -= 240; + } + else + { + x = cg_crosshairX.integer; + y = cg_crosshairY.integer; + } + + hShader = cgs.media.crosshairShader[ cg_drawCrosshair.integer % NUM_CROSSHAIRS ]; + + trap_R_DrawStretchPic( x + cg.refdef.x + 0.5 * (640 - w), + y + cg.refdef.y + 0.5 * (480 - h), + w, h, 0, 0, 1, 1, hShader ); +} + +qboolean CG_WorldCoordToScreenCoordFloat(vec3_t worldCoord, float *x, float *y) +{ + int xcenter, ycenter; + vec3_t local, transformed; + vec3_t vfwd; + vec3_t vright; + vec3_t vup; + float xzi; + float yzi; + +// xcenter = cg.refdef.width / 2;//gives screen coords adjusted for resolution +// ycenter = cg.refdef.height / 2;//gives screen coords adjusted for resolution + + //NOTE: did it this way because most draw functions expect virtual 640x480 coords + // and adjust them for current resolution + xcenter = 640 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn + ycenter = 480 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn + + AngleVectors (cg.refdefViewAngles, vfwd, vright, vup); + + VectorSubtract (worldCoord, cg.refdef.vieworg, local); + + transformed[0] = DotProduct(local,vright); + transformed[1] = DotProduct(local,vup); + transformed[2] = DotProduct(local,vfwd); + + // Make sure Z is not negative. + if(transformed[2] < 0.01) + { + return qfalse; + } + + xzi = xcenter / transformed[2] * (90.0/cg.refdef.fov_x); + yzi = ycenter / transformed[2] * (90.0/cg.refdef.fov_y); + + *x = xcenter + xzi * transformed[0]; + *y = ycenter - yzi * transformed[1]; + + return qtrue; +} + +qboolean CG_WorldCoordToScreenCoord( vec3_t worldCoord, int *x, int *y ) +{ + float xF, yF; + qboolean retVal = CG_WorldCoordToScreenCoordFloat( worldCoord, &xF, &yF ); + *x = (int)xF; + *y = (int)yF; + return retVal; +} + +/* +==================== +CG_SaberClashFlare +==================== +*/ +int g_saberFlashTime = 0; +vec3_t g_saberFlashPos = {0, 0, 0}; +void CG_SaberClashFlare( void ) +{ + int t, maxTime = 150; + vec3_t dif; + vec3_t color; + int x,y; + float v, len; + trace_t tr; + + t = cg.time - g_saberFlashTime; + + if ( t <= 0 || t >= maxTime ) + { + return; + } + + // Don't do clashes for things that are behind us + VectorSubtract( g_saberFlashPos, cg.refdef.vieworg, dif ); + + if ( DotProduct( dif, cg.refdef.viewaxis[0] ) < 0.2 ) + { + return; + } + + CG_Trace( &tr, cg.refdef.vieworg, NULL, NULL, g_saberFlashPos, -1, CONTENTS_SOLID ); + + if ( tr.fraction < 1.0f ) + { + return; + } + + len = VectorNormalize( dif ); + + // clamp to a known range + if ( len > 800 ) + { + len = 800; + } + + v = ( 1.0f - ((float)t / maxTime )) * ((1.0f - ( len / 800.0f )) * 2.0f + 0.35f); + + CG_WorldCoordToScreenCoord( g_saberFlashPos, &x, &y ); + + VectorSet( color, 0.8f, 0.8f, 0.8f ); + trap_R_SetColor( color ); + + CG_DrawPic( x - ( v * 300 ), y - ( v * 300 ), + v * 600, v * 600, + trap_R_RegisterShader( "gfx/effects/saberFlare" )); +} + +//-------------------------------------------------------------- +static void CG_DrawHolocronIcons(void) +//-------------------------------------------------------------- +{ + int icon_size = 40; + int i = 0; + int startx = 10; + int starty = 10;//SCREEN_HEIGHT - icon_size*3; + + int endx = icon_size; + int endy = icon_size; + + if (cg.snap->ps.zoomMode) + { //don't display over zoom mask + return; + } + + if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) + { + return; + } + + while (i < NUM_FORCE_POWERS) + { + if (cg.snap->ps.holocronBits & (1 << forcePowerSorted[i])) + { + CG_DrawPic( startx, starty, endx, endy, cgs.media.forcePowerIcons[forcePowerSorted[i]]); + starty += (icon_size+2); //+2 for spacing + if ((starty+icon_size) >= SCREEN_HEIGHT-80) + { + starty = 10;//SCREEN_HEIGHT - icon_size*3; + startx += (icon_size+2); + } + } + + i++; + } +} + +static qboolean CG_IsDurationPower(int power) +{ + if (power == FP_HEAL || + power == FP_SPEED || + power == FP_TELEPATHY || + power == FP_RAGE || + power == FP_PROTECT || + power == FP_ABSORB || + power == FP_SEE) + { + return qtrue; + } + + return qfalse; +} + +//-------------------------------------------------------------- +static void CG_DrawActivePowers(void) +//-------------------------------------------------------------- +{ + int icon_size = 40; + int i = 0; + int startx = icon_size*2+16; + int starty = SCREEN_HEIGHT - icon_size*2; + + int endx = icon_size; + int endy = icon_size; + + if (cg.snap->ps.zoomMode) + { //don't display over zoom mask + return; + } + + if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) + { + return; + } + + while (i < NUM_FORCE_POWERS) + { + if ((cg.snap->ps.fd.forcePowersActive & (1 << forcePowerSorted[i])) && + CG_IsDurationPower(forcePowerSorted[i])) + { + CG_DrawPic( startx, starty, endx, endy, cgs.media.forcePowerIcons[forcePowerSorted[i]]); + startx += (icon_size+2); //+2 for spacing + if ((startx+icon_size) >= SCREEN_WIDTH-80) + { + startx = icon_size*2+16; + starty += (icon_size+2); + } + } + + i++; + } + + //additionally, draw an icon force force rage recovery + if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) + { + CG_DrawPic( startx, starty, endx, endy, cgs.media.rageRecShader); + } +} + +//-------------------------------------------------------------- +static void CG_DrawRocketLocking( int lockEntNum, int lockTime ) +//-------------------------------------------------------------- +{ + int cx, cy; + vec3_t org; + static int oldDif = 0; + centity_t *cent = &cg_entities[lockEntNum]; + vec4_t color={0.0f,0.0f,0.0f,0.0f}; + int dif = ( cg.time - cg.snap->ps.rocketLockTime ) / ( 1200.0f / /*8.0f*/16.0f ); + int i; + + if (!cg.snap->ps.rocketLockTime) + { + return; + } + + if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) + { + return; + } + + //We can't check to see in pmove if players are on the same team, so we resort + //to just not drawing the lock if a teammate is the locked on ent + if (cg.snap->ps.rocketLockIndex >= 0 && + cg.snap->ps.rocketLockIndex < MAX_CLIENTS) + { + if (cgs.clientinfo[cg.snap->ps.rocketLockIndex].team == cgs.clientinfo[cg.snap->ps.clientNum].team) + { + if (cgs.gametype >= GT_TEAM) + { + return; + } + } + } + + if (cg.snap->ps.rocketLockTime != -1) + { + lastvalidlockdif = dif; + } + else + { + dif = lastvalidlockdif; + } + + if ( !cent ) + { + return; + } + + VectorCopy( cent->lerpOrigin, org ); + + if ( CG_WorldCoordToScreenCoord( org, &cx, &cy )) + { + // we care about distance from enemy to eye, so this is good enough + float sz = Distance( cent->lerpOrigin, cg.refdef.vieworg ) / 1024.0f; + + if ( sz > 1.0f ) + { + sz = 1.0f; + } + else if ( sz < 0.0f ) + { + sz = 0.0f; + } + + sz = (1.0f - sz) * (1.0f - sz) * 32 + 6; + + cy += sz * 0.5f; + + if ( dif < 0 ) + { + oldDif = 0; + return; + } + else if ( dif > 8 ) + { + dif = 8; + } + + // do sounds + if ( oldDif != dif ) + { + if ( dif == 8 ) + { + trap_S_StartSound( org, 0, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/rocket/lock.wav" )); + } + else + { + trap_S_StartSound( org, 0, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/rocket/tick.wav" )); + } + } + + oldDif = dif; + + for ( i = 0; i < dif; i++ ) + { + color[0] = 1.0f; + color[1] = 0.0f; + color[2] = 0.0f; + color[3] = 0.1f * i + 0.2f; + + trap_R_SetColor( color ); + + // our slices are offset by about 45 degrees. + CG_DrawRotatePic( cx - sz, cy - sz, sz, sz, i * 45.0f, trap_R_RegisterShaderNoMip( "gfx/2d/wedge" )); + } + + // we are locked and loaded baby + if ( dif == 8 ) + { + color[0] = color[1] = color[2] = sin( cg.time * 0.05f ) * 0.5f + 0.5f; + color[3] = 1.0f; // this art is additive, so the alpha value does nothing + + trap_R_SetColor( color ); + + CG_DrawPic( cx - sz, cy - sz * 2, sz * 2, sz * 2, trap_R_RegisterShaderNoMip( "gfx/2d/lock" )); + } + } +} + +/* +================= +CG_ScanForCrosshairEntity +================= +*/ +static void CG_ScanForCrosshairEntity( void ) { + trace_t trace; + vec3_t start, end; + int content; + + if ( cg_dynamicCrosshair.integer ) + { + vec3_t d_f, d_rt, d_up; + /* + if ( cg.snap->ps.weapon == WP_NONE || + cg.snap->ps.weapon == WP_SABER || + cg.snap->ps.weapon == WP_STUN_BATON) + { + VectorCopy( cg.refdef.vieworg, start ); + AngleVectors( cg.refdefViewAngles, d_f, d_rt, d_up ); + } + else + */ + //For now we still want to draw the crosshair in relation to the player's world coordinates + //even if we have a melee weapon/no weapon. + { + if (cg.snap && cg.snap->ps.weapon == WP_EMPLACED_GUN && cg.snap->ps.emplacedIndex) + { + vec3_t pitchConstraint; + + VectorCopy(cg.refdefViewAngles, pitchConstraint); + + if (cg.renderingThirdPerson) + { + VectorCopy(cg.predictedPlayerState.viewangles, pitchConstraint); + } + else + { + VectorCopy(cg.refdefViewAngles, pitchConstraint); + } + + if (pitchConstraint[PITCH] > 40) + { + pitchConstraint[PITCH] = 40; + } + + AngleVectors( pitchConstraint, d_f, d_rt, d_up ); + } + else + { + vec3_t pitchConstraint; + + if (cg.renderingThirdPerson) + { + VectorCopy(cg.predictedPlayerState.viewangles, pitchConstraint); + } + else + { + VectorCopy(cg.refdefViewAngles, pitchConstraint); + } + + AngleVectors( pitchConstraint, d_f, d_rt, d_up ); + } + CG_CalcMuzzlePoint(cg.snap->ps.clientNum, start); + } + + //FIXME: increase this? Increase when zoom in? + VectorMA( start, 4096, d_f, end );//was 8192 + } + else + { + VectorCopy( cg.refdef.vieworg, start ); + VectorMA( start, 131072, cg.refdef.viewaxis[0], end ); + } + + CG_Trace( &trace, start, vec3_origin, vec3_origin, end, + cg.snap->ps.clientNum, CONTENTS_SOLID|CONTENTS_BODY ); + + if (trace.entityNum < MAX_CLIENTS) + { + if (CG_IsMindTricked(cg_entities[trace.entityNum].currentState.trickedentindex, + cg_entities[trace.entityNum].currentState.trickedentindex2, + cg_entities[trace.entityNum].currentState.trickedentindex3, + cg_entities[trace.entityNum].currentState.trickedentindex4, + cg.snap->ps.clientNum)) + { + if (cg.crosshairClientNum == trace.entityNum) + { + cg.crosshairClientNum = ENTITYNUM_NONE; + cg.crosshairClientTime = 0; + } + + CG_DrawCrosshair(trace.endpos, 0); + + return; //this entity is mind-tricking the current client, so don't render it + } + } + + if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR) + { + if (trace.entityNum < /*MAX_CLIENTS*/ENTITYNUM_WORLD) + { + CG_DrawCrosshair(trace.endpos, 1); + } + else + { + CG_DrawCrosshair(trace.endpos, 0); + } + } + +// if ( trace.entityNum >= MAX_CLIENTS ) { +// return; +// } + + // if the player is in fog, don't show it + content = trap_CM_PointContents( trace.endpos, 0 ); + if ( content & CONTENTS_FOG ) { + return; + } + + if ( trace.entityNum >= MAX_CLIENTS ) { + cg.crosshairClientNum = trace.entityNum; + cg.crosshairClientTime = cg.time; + return; + } + + // update the fade timer + cg.crosshairClientNum = trace.entityNum; + cg.crosshairClientTime = cg.time; +} + + +/* +===================== +CG_DrawCrosshairNames +===================== +*/ +static void CG_DrawCrosshairNames( void ) { + float *color; + vec4_t tcolor; + char *name; + int baseColor; + + if ( !cg_drawCrosshair.integer ) { + return; + } + + // scan the known entities to see if the crosshair is sighted on one + CG_ScanForCrosshairEntity(); + + if ( !cg_drawCrosshairNames.integer ) { + return; + } + //rww - still do the trace, our dynamic crosshair depends on it + + if (cg.crosshairClientNum >= MAX_CLIENTS) + { + return; + } + + // draw the name of the player being looked at + color = CG_FadeColor( cg.crosshairClientTime, 1000 ); + if ( !color ) { + trap_R_SetColor( NULL ); + return; + } + + name = cgs.clientinfo[ cg.crosshairClientNum ].name; + + if (cgs.gametype >= GT_TEAM) + { + if (cgs.clientinfo[cg.crosshairClientNum].team == TEAM_RED) + { + baseColor = CT_RED; + } + else + { + baseColor = CT_BLUE; + } + + /* + //For now instead of team-based we'll make it oriented based on which team we're on + if (cgs.clientinfo[cg.crosshairClientNum].team == cgs.clientinfo[cg.snap->ps.clientNum].team) + { + baseColor = CT_GREEN; + } + else + { + baseColor = CT_RED; + } + */ + } + else + { + //baseColor = CT_WHITE; + baseColor = CT_RED; //just make it red in nonteam modes since everyone is hostile and crosshair will be red on them too + } + + if (cg.snap->ps.duelInProgress) + { + if (cg.crosshairClientNum != cg.snap->ps.duelIndex) + { //grey out crosshair for everyone but your foe if you're in a duel + baseColor = CT_BLACK; + } + } + else if (cg_entities[cg.crosshairClientNum].currentState.bolt1) + { //this fellow is in a duel. We just checked if we were in a duel above, so + //this means we aren't and he is. Which of course means our crosshair greys out over him. + baseColor = CT_BLACK; + } + + tcolor[0] = colorTable[baseColor][0]; + tcolor[1] = colorTable[baseColor][1]; + tcolor[2] = colorTable[baseColor][2]; + tcolor[3] = color[3]*0.5f; + + UI_DrawProportionalString(320, 170, name, UI_CENTER, tcolor); + + trap_R_SetColor( NULL ); +} + + +//============================================================================== + +/* +================= +CG_DrawSpectator +================= +*/ +static void CG_DrawSpectator(void) +{ + const char* s; + s = CG_GetStripEdString("INGAMETEXT", "SPECTATOR"); + if (cgs.gametype == GT_TOURNAMENT && + cgs.duelist1 != -1 && + cgs.duelist2 != -1) + { + char text[1024]; + int size = 64; + + Com_sprintf(text, sizeof(text), "%s %s %s", cgs.clientinfo[cgs.duelist1].name, CG_GetStripEdString("INGAMETEXT", "SPECHUD_VERSUS"), cgs.clientinfo[cgs.duelist2].name); + CG_Text_Paint ( 320 - CG_Text_Width ( text, 1.0f, 3 ) / 2, 420, 1.0f, colorWhite, text, 0, 0, 0, 3 ); + + + trap_R_SetColor( colorTable[CT_WHITE] ); + if ( cgs.clientinfo[cgs.duelist1].modelIcon ) + { + CG_DrawPic( 10, SCREEN_HEIGHT-(size*1.5), size, size, cgs.clientinfo[cgs.duelist1].modelIcon ); + } + if ( cgs.clientinfo[cgs.duelist2].modelIcon ) + { + CG_DrawPic( SCREEN_WIDTH-size-10, SCREEN_HEIGHT-(size*1.5), size, size, cgs.clientinfo[cgs.duelist2].modelIcon ); + } + Com_sprintf(text, sizeof(text), "%i/%i", cgs.clientinfo[cgs.duelist1].score, cgs.fraglimit ); + CG_Text_Paint( 42 - CG_Text_Width( text, 1.0f, 2 ) / 2, SCREEN_HEIGHT-(size*1.5) + 64, 1.0f, colorWhite, text, 0, 0, 0, 2 ); + + Com_sprintf(text, sizeof(text), "%i/%i", cgs.clientinfo[cgs.duelist2].score, cgs.fraglimit ); + CG_Text_Paint( SCREEN_WIDTH-size+22 - CG_Text_Width( text, 1.0f, 2 ) / 2, SCREEN_HEIGHT-(size*1.5) + 64, 1.0f, colorWhite, text, 0, 0, 0, 2 ); + } + else + { + CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, 3 ) / 2, 420, 1.0f, colorWhite, s, 0, 0, 0, 3 ); + } + + if ( cgs.gametype == GT_TOURNAMENT ) + { + s = CG_GetStripEdString("INGAMETEXT", "WAITING_TO_PLAY"); // "waiting to play"; + CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, 3 ) / 2, 440, 1.0f, colorWhite, s, 0, 0, 0, 3 ); + } + else //if ( cgs.gametype >= GT_TEAM ) + { + //s = "press ESC and use the JOIN menu to play"; + s = CG_GetStripEdString("INGAMETEXT", "SPEC_CHOOSEJOIN"); + CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, 3 ) / 2, 440, 1.0f, colorWhite, s, 0, 0, 0, 3 ); + } +} + +/* +================= +CG_DrawVote +================= +*/ +static void CG_DrawVote(void) { + const char *s; + int sec; + char sYes[20]; + char sNo[20]; + + if ( !cgs.voteTime ) { + return; + } + + // play a talk beep whenever it is modified + if ( cgs.voteModified ) { + cgs.voteModified = qfalse; +// trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND ); + } + + sec = ( VOTE_TIME - ( cg.time - cgs.voteTime ) ) / 1000; + if ( sec < 0 ) { + sec = 0; + } + + trap_SP_GetStringTextString("MENUS0_YES", sYes, sizeof(sYes) ); + trap_SP_GetStringTextString("MENUS0_NO", sNo, sizeof(sNo) ); + + s = va("VOTE(%i):%s %s:%i %s:%i", sec, cgs.voteString, sYes, cgs.voteYes, sNo, cgs.voteNo); + CG_DrawSmallString( 4, 58, s, 1.0F ); + s = CG_GetStripEdString("INGAMETEXT", "OR_PRESS_ESC_THEN_CLICK_VOTE"); // s = "or press ESC then click Vote"; + CG_DrawSmallString( 4, 58 + SMALLCHAR_HEIGHT + 2, s, 1.0F ); +} + +/* +================= +CG_DrawTeamVote +================= +*/ +static void CG_DrawTeamVote(void) { + char *s; + int sec, cs_offset; + + if ( cgs.clientinfo->team == TEAM_RED ) + cs_offset = 0; + else if ( cgs.clientinfo->team == TEAM_BLUE ) + cs_offset = 1; + else + return; + + if ( !cgs.teamVoteTime[cs_offset] ) { + return; + } + + // play a talk beep whenever it is modified + if ( cgs.teamVoteModified[cs_offset] ) { + cgs.teamVoteModified[cs_offset] = qfalse; +// trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND ); + } + + sec = ( VOTE_TIME - ( cg.time - cgs.teamVoteTime[cs_offset] ) ) / 1000; + if ( sec < 0 ) { + sec = 0; + } + if (strstr(cgs.teamVoteString[cs_offset], "leader")) + { + int i = 0; + + while (cgs.teamVoteString[cs_offset][i] && cgs.teamVoteString[cs_offset][i] != ' ') + { + i++; + } + + if (cgs.teamVoteString[cs_offset][i] == ' ') + { + int voteIndex = 0; + char voteIndexStr[256]; + + i++; + + while (cgs.teamVoteString[cs_offset][i]) + { + voteIndexStr[voteIndex] = cgs.teamVoteString[cs_offset][i]; + voteIndex++; + i++; + } + voteIndexStr[voteIndex] = 0; + + voteIndex = atoi(voteIndexStr); + + s = va("TEAMVOTE(%i):(Make %s the new team leader) yes:%i no:%i", sec, cgs.clientinfo[voteIndex].name, + cgs.teamVoteYes[cs_offset], cgs.teamVoteNo[cs_offset] ); + } + else + { + s = va("TEAMVOTE(%i):%s yes:%i no:%i", sec, cgs.teamVoteString[cs_offset], + cgs.teamVoteYes[cs_offset], cgs.teamVoteNo[cs_offset] ); + } + } + else + { + s = va("TEAMVOTE(%i):%s yes:%i no:%i", sec, cgs.teamVoteString[cs_offset], + cgs.teamVoteYes[cs_offset], cgs.teamVoteNo[cs_offset] ); + } + CG_DrawSmallString( 4, 90, s, 1.0F ); +} + +static qboolean CG_DrawScoreboard() { + return CG_DrawOldScoreboard(); +#if 0 + static qboolean firstTime = qtrue; + float fade, *fadeColor; + + if (menuScoreboard) { + menuScoreboard->window.flags &= ~WINDOW_FORCED; + } + if (cg_paused.integer) { + cg.deferredPlayerLoading = 0; + firstTime = qtrue; + return qfalse; + } + + // should never happen in Team Arena + if (cgs.gametype == GT_SINGLE_PLAYER && cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { + cg.deferredPlayerLoading = 0; + firstTime = qtrue; + return qfalse; + } + + // don't draw scoreboard during death while warmup up + if ( cg.warmup && !cg.showScores ) { + return qfalse; + } + + if ( cg.showScores || cg.predictedPlayerState.pm_type == PM_DEAD || cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { + fade = 1.0; + fadeColor = colorWhite; + } else { + fadeColor = CG_FadeColor( cg.scoreFadeTime, FADE_TIME ); + if ( !fadeColor ) { + // next time scoreboard comes up, don't print killer + cg.deferredPlayerLoading = 0; + cg.killerName[0] = 0; + firstTime = qtrue; + return qfalse; + } + fade = *fadeColor; + } + + + if (menuScoreboard == NULL) { + if ( cgs.gametype >= GT_TEAM ) { + menuScoreboard = Menus_FindByName("teamscore_menu"); + } else { + menuScoreboard = Menus_FindByName("score_menu"); + } + } + + if (menuScoreboard) { + if (firstTime) { + CG_SetScoreSelection(menuScoreboard); + firstTime = qfalse; + } + Menu_Paint(menuScoreboard, qtrue); + } + + // load any models that have been deferred + if ( ++cg.deferredPlayerLoading > 10 ) { + CG_LoadDeferredPlayers(); + } + + return qtrue; +#endif +} + +/* +================= +CG_DrawIntermission +================= +*/ +static void CG_DrawIntermission( void ) { +// int key; + //if (cg_singlePlayer.integer) { + // CG_DrawCenterString(); + // return; + //} + cg.scoreFadeTime = cg.time; + cg.scoreBoardShowing = CG_DrawScoreboard(); +} + +/* +================= +CG_DrawFollow +================= +*/ +static qboolean CG_DrawFollow( void ) +{ + const char *s; + + if ( !(cg.snap->ps.pm_flags & PMF_FOLLOW) ) + { + return qfalse; + } + +// s = "following"; + s = CG_GetStripEdString("INGAMETEXT", "FOLLOWING"); + CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, 60, 1.0f, colorWhite, s, 0, 0, 0, FONT_MEDIUM ); + + s = cgs.clientinfo[ cg.snap->ps.clientNum ].name; + CG_Text_Paint ( 320 - CG_Text_Width ( s, 2.0f, FONT_MEDIUM ) / 2, 80, 2.0f, colorWhite, s, 0, 0, 0, FONT_MEDIUM ); + + return qtrue; +} + +#if 0 +static void CG_DrawTemporaryStats() +{ //placeholder for testing (draws ammo and force power) + char s[512]; + + if (!cg.snap) + { + return; + } + + sprintf(s, "Force: %i", cg.snap->ps.fd.forcePower); + + CG_DrawBigString(SCREEN_WIDTH-164, SCREEN_HEIGHT-128, s, 1.0f); + + sprintf(s, "Ammo: %i", cg.snap->ps.ammo[weaponData[cg.snap->ps.weapon].ammoIndex]); + + CG_DrawBigString(SCREEN_WIDTH-164, SCREEN_HEIGHT-112, s, 1.0f); + + sprintf(s, "Health: %i", cg.snap->ps.stats[STAT_HEALTH]); + + CG_DrawBigString(8, SCREEN_HEIGHT-128, s, 1.0f); + + sprintf(s, "Armor: %i", cg.snap->ps.stats[STAT_ARMOR]); + + CG_DrawBigString(8, SCREEN_HEIGHT-112, s, 1.0f); +} +#endif + +/* +================= +CG_DrawAmmoWarning +================= +*/ +static void CG_DrawAmmoWarning( void ) { +#if 0 + const char *s; + int w; + + if (!cg_drawStatus.integer) + { + return; + } + + if ( cg_drawAmmoWarning.integer == 0 ) { + return; + } + + if ( !cg.lowAmmoWarning ) { + return; + } + + if ( cg.lowAmmoWarning == 2 ) { + s = "OUT OF AMMO"; + } else { + s = "LOW AMMO WARNING"; + } + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + CG_DrawBigString(320 - w / 2, 64, s, 1.0F); +#endif +} + + + +/* +================= +CG_DrawWarmup +================= +*/ +static void CG_DrawWarmup( void ) { + int w; + int sec; + int i; + float scale; + clientInfo_t *ci1, *ci2; + int cw; + const char *s; + + sec = cg.warmup; + if ( !sec ) { + return; + } + + if ( sec < 0 ) { +// s = "Waiting for players"; + s = CG_GetStripEdString("INGAMETEXT", "WAITING_FOR_PLAYERS"); + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + CG_DrawBigString(320 - w / 2, 24, s, 1.0F); + cg.warmupCount = 0; + return; + } + + if (cgs.gametype == GT_TOURNAMENT) { + // find the two active players + ci1 = NULL; + ci2 = NULL; + for ( i = 0 ; i < cgs.maxclients ; i++ ) { + if ( cgs.clientinfo[i].infoValid && cgs.clientinfo[i].team == TEAM_FREE ) { + if ( !ci1 ) { + ci1 = &cgs.clientinfo[i]; + } else { + ci2 = &cgs.clientinfo[i]; + } + } + } + + if ( ci1 && ci2 ) { + s = va( "%s vs %s", ci1->name, ci2->name ); + w = CG_Text_Width(s, 0.6f, FONT_MEDIUM); + CG_Text_Paint(320 - w / 2, 60, 0.6f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE,FONT_MEDIUM); + } + } else { + if ( cgs.gametype == GT_FFA ) { + s = "Free For All"; + } else if ( cgs.gametype == GT_HOLOCRON ) { + s = "Holocron FFA"; + } else if ( cgs.gametype == GT_JEDIMASTER ) { + s = "Jedi Master"; + } else if ( cgs.gametype == GT_TEAM ) { + s = "Team FFA"; + } else if ( cgs.gametype == GT_SAGA ) { + s = "N/A"; + } else if ( cgs.gametype == GT_CTF ) { + s = "Capture the Flag"; + } else if ( cgs.gametype == GT_CTY ) { + s = "Capture the Ysalamiri"; + } else { + s = ""; + } + w = CG_Text_Width(s, 1.5f, FONT_MEDIUM); + CG_Text_Paint(320 - w / 2, 90, 1.5f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE,FONT_MEDIUM); + } + + sec = ( sec - cg.time ) / 1000; + if ( sec < 0 ) { + cg.warmup = 0; + sec = 0; + } +// s = va( "Starts in: %i", sec + 1 ); + s = va( "%s: %i",CG_GetStripEdString("INGAMETEXT", "STARTS_IN"), sec + 1 ); + if ( sec != cg.warmupCount ) { + cg.warmupCount = sec; + switch ( sec ) { + case 0: + trap_S_StartLocalSound( cgs.media.count1Sound, CHAN_ANNOUNCER ); + break; + case 1: + trap_S_StartLocalSound( cgs.media.count2Sound, CHAN_ANNOUNCER ); + break; + case 2: + trap_S_StartLocalSound( cgs.media.count3Sound, CHAN_ANNOUNCER ); + break; + default: + break; + } + } + scale = 0.45f; + switch ( cg.warmupCount ) { + case 0: + cw = 28; + scale = 1.25f; + break; + case 1: + cw = 24; + scale = 1.15f; + break; + case 2: + cw = 20; + scale = 1.05f; + break; + default: + cw = 16; + scale = 0.9f; + break; + } + + w = CG_Text_Width(s, scale, FONT_MEDIUM); + CG_Text_Paint(320 - w / 2, 125, scale, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM); +} + +//================================================================================== +/* +================= +CG_DrawTimedMenus +================= +*/ +void CG_DrawTimedMenus() { + if (cg.voiceTime) { + int t = cg.time - cg.voiceTime; + if ( t > 2500 ) { + Menus_CloseByName("voiceMenu"); + trap_Cvar_Set("cl_conXOffset", "0"); + cg.voiceTime = 0; + } + } +} + +void CG_DrawFlagStatus() +{ + int myFlagTakenShader = 0; + int theirFlagShader = 0; + int team = 0; + int startDrawPos = 2; + int ico_size = 32; + + if (!cg.snap) + { + return; + } + + if (cgs.gametype != GT_CTF && cgs.gametype != GT_CTY) + { + return; + } + + team = cg.snap->ps.persistant[PERS_TEAM]; + + if (cgs.gametype == GT_CTY) + { + if (team == TEAM_RED) + { + myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_x" ); + theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_ys" ); + } + else + { + myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_x" ); + theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_ys" ); + } + } + else + { + if (team == TEAM_RED) + { + myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_x" ); + theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag" ); + } + else + { + myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_x" ); + theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag" ); + } + } + + if (CG_YourTeamHasFlag()) + { + CG_DrawPic( startDrawPos, 365, ico_size, ico_size, theirFlagShader ); + startDrawPos += ico_size+2; + } + + if (CG_OtherTeamHasFlag()) + { + CG_DrawPic( startDrawPos, 365, ico_size, ico_size, myFlagTakenShader ); + } +} + +int cgRageTime = 0; +int cgRageFadeTime = 0; +float cgRageFadeVal = 0; + +int cgRageRecTime = 0; +int cgRageRecFadeTime = 0; +float cgRageRecFadeVal = 0; + +int cgAbsorbTime = 0; +int cgAbsorbFadeTime = 0; +float cgAbsorbFadeVal = 0; + +int cgProtectTime = 0; +int cgProtectFadeTime = 0; +float cgProtectFadeVal = 0; + +int cgYsalTime = 0; +int cgYsalFadeTime = 0; +float cgYsalFadeVal = 0; + +qboolean gCGHasFallVector = qfalse; +vec3_t gCGFallVector; + +/* +================= +CG_Draw2D +================= +*/ +static void CG_Draw2D( void ) { + float inTime = cg.invenSelectTime+WEAPON_SELECT_TIME; + float wpTime = cg.weaponSelectTime+WEAPON_SELECT_TIME; + float bestTime; + int drawSelect = 0; + float fallTime, rageTime, rageRecTime, absorbTime, protectTime, ysalTime; + vec4_t hcolor; + + if (cgs.orderPending && cg.time > cgs.orderTime) { + CG_CheckOrderPending(); + } + // if we are taking a levelshot for the menu, don't draw anything + if ( cg.levelShot ) { + return; + } + + if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) + { + cgRageTime = 0; + cgRageFadeTime = 0; + cgRageFadeVal = 0; + + cgRageRecTime = 0; + cgRageRecFadeTime = 0; + cgRageRecFadeVal = 0; + + cgAbsorbTime = 0; + cgAbsorbFadeTime = 0; + cgAbsorbFadeVal = 0; + + cgProtectTime = 0; + cgProtectFadeTime = 0; + cgProtectFadeVal = 0; + + cgYsalTime = 0; + cgYsalFadeTime = 0; + cgYsalFadeVal = 0; + } + + if ( cg_draw2D.integer == 0 ) { + return; + } + + if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { + CG_DrawIntermission(); + return; + } + + if (cgs.clientinfo[cg.snap->ps.clientNum].team != TEAM_SPECTATOR) + { + if (cg.snap->ps.fd.forcePowersActive & (1 << FP_RAGE)) + { + if (!cgRageTime) + { + cgRageTime = cg.time; + } + + rageTime = (float)(cg.time - cgRageTime); + + rageTime /= 9000; + + if (rageTime < 0) + { + rageTime = 0; + } + if (rageTime > 0.15) + { + rageTime = 0.15; + } + + hcolor[3] = rageTime; + hcolor[0] = 0.7; + hcolor[1] = 0; + hcolor[2] = 0; + + if (!cg.renderingThirdPerson) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + + cgRageFadeTime = 0; + cgRageFadeVal = 0; + } + else if (cgRageTime) + { + if (!cgRageFadeTime) + { + cgRageFadeTime = cg.time; + cgRageFadeVal = 0.15; + } + + rageTime = cgRageFadeVal; + + cgRageFadeVal -= (cg.time - cgRageFadeTime)*0.000005; + + if (rageTime < 0) + { + rageTime = 0; + } + if (rageTime > 0.15) + { + rageTime = 0.15; + } + + if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) + { + float checkRageRecTime = rageTime; + + if (checkRageRecTime < 0.15) + { + checkRageRecTime = 0.15; + } + + hcolor[3] = checkRageRecTime; + hcolor[0] = rageTime*4; + if (hcolor[0] < 0.2) + { + hcolor[0] = 0.2; + } + hcolor[1] = 0.2; + hcolor[2] = 0.2; + } + else + { + hcolor[3] = rageTime; + hcolor[0] = 0.7; + hcolor[1] = 0; + hcolor[2] = 0; + } + + if (!cg.renderingThirdPerson && rageTime) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + else + { + if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) + { + hcolor[3] = 0.15; + hcolor[0] = 0.2; + hcolor[1] = 0.2; + hcolor[2] = 0.2; + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + cgRageTime = 0; + } + } + else if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) + { + if (!cgRageRecTime) + { + cgRageRecTime = cg.time; + } + + rageRecTime = (float)(cg.time - cgRageRecTime); + + rageRecTime /= 9000; + + if (rageRecTime < 0.15)//0) + { + rageRecTime = 0.15;//0; + } + if (rageRecTime > 0.15) + { + rageRecTime = 0.15; + } + + hcolor[3] = rageRecTime; + hcolor[0] = 0.2; + hcolor[1] = 0.2; + hcolor[2] = 0.2; + + if (!cg.renderingThirdPerson) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + + cgRageRecFadeTime = 0; + cgRageRecFadeVal = 0; + } + else if (cgRageRecTime) + { + if (!cgRageRecFadeTime) + { + cgRageRecFadeTime = cg.time; + cgRageRecFadeVal = 0.15; + } + + rageRecTime = cgRageRecFadeVal; + + cgRageRecFadeVal -= (cg.time - cgRageRecFadeTime)*0.000005; + + if (rageRecTime < 0) + { + rageRecTime = 0; + } + if (rageRecTime > 0.15) + { + rageRecTime = 0.15; + } + + hcolor[3] = rageRecTime; + hcolor[0] = 0.2; + hcolor[1] = 0.2; + hcolor[2] = 0.2; + + if (!cg.renderingThirdPerson && rageRecTime) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + else + { + cgRageRecTime = 0; + } + } + + if (cg.snap->ps.fd.forcePowersActive & (1 << FP_ABSORB)) + { + if (!cgAbsorbTime) + { + cgAbsorbTime = cg.time; + } + + absorbTime = (float)(cg.time - cgAbsorbTime); + + absorbTime /= 9000; + + if (absorbTime < 0) + { + absorbTime = 0; + } + if (absorbTime > 0.15) + { + absorbTime = 0.15; + } + + hcolor[3] = absorbTime/2; + hcolor[0] = 0; + hcolor[1] = 0; + hcolor[2] = 0.7; + + if (!cg.renderingThirdPerson) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + + cgAbsorbFadeTime = 0; + cgAbsorbFadeVal = 0; + } + else if (cgAbsorbTime) + { + if (!cgAbsorbFadeTime) + { + cgAbsorbFadeTime = cg.time; + cgAbsorbFadeVal = 0.15; + } + + absorbTime = cgAbsorbFadeVal; + + cgAbsorbFadeVal -= (cg.time - cgAbsorbFadeTime)*0.000005; + + if (absorbTime < 0) + { + absorbTime = 0; + } + if (absorbTime > 0.15) + { + absorbTime = 0.15; + } + + hcolor[3] = absorbTime/2; + hcolor[0] = 0; + hcolor[1] = 0; + hcolor[2] = 0.7; + + if (!cg.renderingThirdPerson && absorbTime) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + else + { + cgAbsorbTime = 0; + } + } + + if (cg.snap->ps.fd.forcePowersActive & (1 << FP_PROTECT)) + { + if (!cgProtectTime) + { + cgProtectTime = cg.time; + } + + protectTime = (float)(cg.time - cgProtectTime); + + protectTime /= 9000; + + if (protectTime < 0) + { + protectTime = 0; + } + if (protectTime > 0.15) + { + protectTime = 0.15; + } + + hcolor[3] = protectTime/2; + hcolor[0] = 0; + hcolor[1] = 0.7; + hcolor[2] = 0; + + if (!cg.renderingThirdPerson) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + + cgProtectFadeTime = 0; + cgProtectFadeVal = 0; + } + else if (cgProtectTime) + { + if (!cgProtectFadeTime) + { + cgProtectFadeTime = cg.time; + cgProtectFadeVal = 0.15; + } + + protectTime = cgProtectFadeVal; + + cgProtectFadeVal -= (cg.time - cgProtectFadeTime)*0.000005; + + if (protectTime < 0) + { + protectTime = 0; + } + if (protectTime > 0.15) + { + protectTime = 0.15; + } + + hcolor[3] = protectTime/2; + hcolor[0] = 0; + hcolor[1] = 0.7; + hcolor[2] = 0; + + if (!cg.renderingThirdPerson && protectTime) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + else + { + cgProtectTime = 0; + } + } + + if (cg.snap->ps.rocketLockIndex != MAX_CLIENTS && (cg.time - cg.snap->ps.rocketLockTime) > 0) + { + CG_DrawRocketLocking( cg.snap->ps.rocketLockIndex, cg.snap->ps.rocketLockTime ); + } + + if (BG_HasYsalamiri(cgs.gametype, &cg.snap->ps)) + { + if (!cgYsalTime) + { + cgYsalTime = cg.time; + } + + ysalTime = (float)(cg.time - cgYsalTime); + + ysalTime /= 9000; + + if (ysalTime < 0) + { + ysalTime = 0; + } + if (ysalTime > 0.15) + { + ysalTime = 0.15; + } + + hcolor[3] = ysalTime/2; + hcolor[0] = 0.7; + hcolor[1] = 0.7; + hcolor[2] = 0; + + if (!cg.renderingThirdPerson) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + + cgYsalFadeTime = 0; + cgYsalFadeVal = 0; + } + else if (cgYsalTime) + { + if (!cgYsalFadeTime) + { + cgYsalFadeTime = cg.time; + cgYsalFadeVal = 0.15; + } + + ysalTime = cgYsalFadeVal; + + cgYsalFadeVal -= (cg.time - cgYsalFadeTime)*0.000005; + + if (ysalTime < 0) + { + ysalTime = 0; + } + if (ysalTime > 0.15) + { + ysalTime = 0.15; + } + + hcolor[3] = ysalTime/2; + hcolor[0] = 0.7; + hcolor[1] = 0.7; + hcolor[2] = 0; + + if (!cg.renderingThirdPerson && ysalTime) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + else + { + cgYsalTime = 0; + } + } + } + + if (cg.snap->ps.rocketLockIndex != MAX_CLIENTS && (cg.time - cg.snap->ps.rocketLockTime) > 0) + { + CG_DrawRocketLocking( cg.snap->ps.rocketLockIndex, cg.snap->ps.rocketLockTime ); + } + + if (cg.snap->ps.holocronBits) + { + CG_DrawHolocronIcons(); + } + if (cg.snap->ps.fd.forcePowersActive || cg.snap->ps.fd.forceRageRecoveryTime > cg.time) + { + CG_DrawActivePowers(); + } + + // Draw this before the text so that any text won't get clipped off + CG_DrawZoomMask(); + +/* + if (cg.cameraMode) { + return; + } +*/ + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ) { + CG_DrawSpectator(); + CG_DrawCrosshair(NULL, 0); + CG_DrawCrosshairNames(); + CG_SaberClashFlare(); + } else { + // don't draw any status if dead or the scoreboard is being explicitly shown + if ( !cg.showScores && cg.snap->ps.stats[STAT_HEALTH] > 0 ) { + + if ( /*cg_drawStatus.integer*/0 ) { + //Reenable if stats are drawn with menu system again + Menu_PaintAll(); + CG_DrawTimedMenus(); + } + + //CG_DrawTemporaryStats(); + + CG_DrawAmmoWarning(); + + CG_DrawCrosshairNames(); + + if (cg_drawStatus.integer) + { + CG_DrawIconBackground(); + } + + if (inTime > wpTime) + { + drawSelect = 1; + bestTime = cg.invenSelectTime; + } + else //only draw the most recent since they're drawn in the same place + { + drawSelect = 2; + bestTime = cg.weaponSelectTime; + } + + if (cg.forceSelectTime > bestTime) + { + drawSelect = 3; + } + + switch(drawSelect) + { + case 1: + CG_DrawInvenSelect(); + break; + case 2: + CG_DrawWeaponSelect(); + break; + case 3: + CG_DrawForceSelect(); + break; + default: + break; + } + + if (cg_drawStatus.integer) + { + //Powerups now done with upperright stuff + //CG_DrawPowerupIcons(); + + CG_DrawFlagStatus(); + } + + CG_SaberClashFlare(); + + if (cg_drawStatus.integer) + { + CG_DrawStats(); + } + + //Do we want to use this system again at some point? + //CG_DrawReward(); + } + + } + + if (cg.snap->ps.fallingToDeath) + { + fallTime = (float)(cg.time - cg.snap->ps.fallingToDeath); + + fallTime /= (FALL_FADE_TIME/2); + + if (fallTime < 0) + { + fallTime = 0; + } + if (fallTime > 1) + { + fallTime = 1; + } + + hcolor[3] = fallTime; + hcolor[0] = 0; + hcolor[1] = 0; + hcolor[2] = 0; + + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + + if (!gCGHasFallVector) + { + VectorCopy(cg.snap->ps.origin, gCGFallVector); + gCGHasFallVector = qtrue; + } + } + else + { + if (gCGHasFallVector) + { + gCGHasFallVector = qfalse; + VectorClear(gCGFallVector); + } + } + + CG_DrawVote(); + CG_DrawTeamVote(); + + CG_DrawLagometer(); + + if (!cg_paused.integer) { + CG_DrawUpperRight(); + } + + if ( !CG_DrawFollow() ) { + CG_DrawWarmup(); + } + + // don't draw center string if scoreboard is up + cg.scoreBoardShowing = CG_DrawScoreboard(); + if ( !cg.scoreBoardShowing) { + CG_DrawCenterString(); + } +} + + +static void CG_DrawTourneyScoreboard() { +} + +/* +===================== +CG_DrawActive + +Perform all drawing needed to completely fill the screen +===================== +*/ +void CG_DrawActive( stereoFrame_t stereoView ) { + float separation; + vec3_t baseOrg; + + // optionally draw the info screen instead + if ( !cg.snap ) { + CG_DrawInformation(); + return; + } + + // optionally draw the tournement scoreboard instead + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR && + ( cg.snap->ps.pm_flags & PMF_SCOREBOARD ) ) { + CG_DrawTourneyScoreboard(); + return; + } + + switch ( stereoView ) { + case STEREO_CENTER: + separation = 0; + break; + case STEREO_LEFT: + separation = -cg_stereoSeparation.value / 2; + break; + case STEREO_RIGHT: + separation = cg_stereoSeparation.value / 2; + break; + default: + separation = 0; + CG_Error( "CG_DrawActive: Undefined stereoView" ); + } + + + // clear around the rendered view if sized down + CG_TileClear(); + + // offset vieworg appropriately if we're doing stereo separation + VectorCopy( cg.refdef.vieworg, baseOrg ); + if ( separation != 0 ) { + VectorMA( cg.refdef.vieworg, -separation, cg.refdef.viewaxis[1], cg.refdef.vieworg ); + } + + // draw 3D view + trap_R_RenderScene( &cg.refdef ); + + // restore original viewpoint if running stereo + if ( separation != 0 ) { + VectorCopy( baseOrg, cg.refdef.vieworg ); + } + + // draw status bar and other floating elements + CG_Draw2D(); +} + + + diff --git a/code/cgame/cg_draw.c b/code/cgame/cg_draw.c new file mode 100644 index 0000000..cc26a2c --- /dev/null +++ b/code/cgame/cg_draw.c @@ -0,0 +1,4491 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_draw.c -- draw all of the graphical elements during +// active (after loading) gameplay + +#include "cg_local.h" + +#include "../ui/ui_shared.h" + +qboolean CG_WorldCoordToScreenCoordFloat(vec3_t worldCoord, float *x, float *y); +qboolean CG_CalcMuzzlePoint( int entityNum, vec3_t muzzle ); + +// used for scoreboard +extern displayContextDef_t cgDC; +menuDef_t *menuScoreboard = NULL; +vec4_t bluehudtint = {0.5, 0.5, 1.0, 1.0}; +vec4_t redhudtint = {1.0, 0.5, 0.5, 1.0}; +float *hudTintColor; + +int sortedTeamPlayers[TEAM_MAXOVERLAY]; +int numSortedTeamPlayers; + +int lastvalidlockdif; + +extern float zoomFov; //this has to be global client-side + +char systemChat[256]; +char teamChat1[256]; +char teamChat2[256]; + +char *showPowersName[] = +{ + "HEAL2",//FP_HEAL + "JUMP2",//FP_LEVITATION + "SPEED2",//FP_SPEED + "PUSH2",//FP_PUSH + "PULL2",//FP_PULL + "MINDTRICK2",//FP_TELEPTAHY + "GRIP2",//FP_GRIP + "LIGHTNING2",//FP_LIGHTNING + "DARK_RAGE2",//FP_RAGE + "PROTECT2",//FP_PROTECT + "ABSORB2",//FP_ABSORB + "TEAM_HEAL2",//FP_TEAM_HEAL + "TEAM_REPLENISH2",//FP_TEAM_FORCE + "DRAIN2",//FP_DRAIN + "SEEING2",//FP_SEE + "SABER_OFFENSE2",//FP_SABERATTACK + "SABER_DEFENSE2",//FP_SABERDEFEND + "SABER_THROW2",//FP_SABERTHROW + NULL +}; + + +int MenuFontToHandle(int iMenuFont) +{ + switch (iMenuFont) + { + case FONT_SMALL: return cgDC.Assets.qhSmallFont; + case FONT_MEDIUM: return cgDC.Assets.qhMediumFont; + case FONT_LARGE: return cgDC.Assets.qhBigFont; + } + + return cgDC.Assets.qhMediumFont; +} + +int CG_Text_Width(const char *text, float scale, int iMenuFont) +{ + int iFontIndex = MenuFontToHandle(iMenuFont); + + return trap_R_Font_StrLenPixels(text, iFontIndex, scale); +} + +int CG_Text_Height(const char *text, float scale, int iMenuFont) +{ + int iFontIndex = MenuFontToHandle(iMenuFont); + + return trap_R_Font_HeightPixels(iFontIndex, scale); +} + +#include "../qcommon/qfiles.h" // for STYLE_BLINK etc +void CG_Text_Paint(float x, float y, float scale, vec4_t color, const char *text, float adjust, int limit, int style, int iMenuFont) +{ + int iStyleOR = 0; + int iFontIndex = MenuFontToHandle(iMenuFont); + + switch (style) + { + case ITEM_TEXTSTYLE_NORMAL: iStyleOR = 0;break; // JK2 normal text + case ITEM_TEXTSTYLE_BLINK: iStyleOR = STYLE_BLINK;break; // JK2 fast blinking + case ITEM_TEXTSTYLE_PULSE: iStyleOR = STYLE_BLINK;break; // JK2 slow pulsing + case ITEM_TEXTSTYLE_SHADOWED: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) + case ITEM_TEXTSTYLE_OUTLINED: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) + case ITEM_TEXTSTYLE_OUTLINESHADOWED: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) + case ITEM_TEXTSTYLE_SHADOWEDMORE: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) + } + + trap_R_Font_DrawString( x, // int ox + y, // int oy + text, // const char *text + color, // paletteRGBA_c c + iStyleOR | iFontIndex, // const int iFontHandle + !limit?-1:limit, // iCharLimit (-1 = none) + scale // const float scale = 1.0f + ); +} + +/* +qboolean CG_WorldCoordToScreenCoord(vec3_t worldCoord, int *x, int *y) + + Take any world coord and convert it to a 2D virtual 640x480 screen coord +*/ +/* +qboolean CG_WorldCoordToScreenCoordFloat(vec3_t worldCoord, float *x, float *y) +{ + int xcenter, ycenter; + vec3_t local, transformed; + +// xcenter = cg.refdef.width / 2;//gives screen coords adjusted for resolution +// ycenter = cg.refdef.height / 2;//gives screen coords adjusted for resolution + + //NOTE: did it this way because most draw functions expect virtual 640x480 coords + // and adjust them for current resolution + xcenter = 640 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn + ycenter = 480 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn + + VectorSubtract (worldCoord, cg.refdef.vieworg, local); + + transformed[0] = DotProduct(local,vright); + transformed[1] = DotProduct(local,vup); + transformed[2] = DotProduct(local,vfwd); + + // Make sure Z is not negative. + if(transformed[2] < 0.01) + { + return qfalse; + } + // Simple convert to screen coords. + float xzi = xcenter / transformed[2] * (90.0/cg.refdef.fov_x); + float yzi = ycenter / transformed[2] * (90.0/cg.refdef.fov_y); + + *x = xcenter + xzi * transformed[0]; + *y = ycenter - yzi * transformed[1]; + + return qtrue; +} + +qboolean CG_WorldCoordToScreenCoord( vec3_t worldCoord, int *x, int *y ) +{ + float xF, yF; + qboolean retVal = CG_WorldCoordToScreenCoordFloat( worldCoord, &xF, &yF ); + *x = (int)xF; + *y = (int)yF; + return retVal; +} +*/ + +/* +================ +CG_DrawZoomMask + +================ +*/ +static void CG_DrawZoomMask( void ) +{ + vec4_t color1; + float level; + static qboolean flip = qtrue; + +// int ammo = cg_entities[0].gent->client->ps.ammo[weaponData[cent->currentState.weapon].ammoIndex]; + float cx, cy; +// int val[5]; + float max, fi; + + // Check for Binocular specific zooming since we'll want to render different bits in each case + if ( cg.predictedPlayerState.zoomMode == 2 ) + { + int val, i; + float off; + + // zoom level + level = (float)(80.0f - cg.predictedPlayerState.zoomFov) / 80.0f; + + // ...so we'll clamp it + if ( level < 0.0f ) + { + level = 0.0f; + } + else if ( level > 1.0f ) + { + level = 1.0f; + } + + // Using a magic number to convert the zoom level to scale amount + level *= 162.0f; + + // draw blue tinted distortion mask, trying to make it as small as is necessary to fill in the viewable area + trap_R_SetColor( colorTable[CT_WHITE] ); + CG_DrawPic( 34, 48, 570, 362, cgs.media.binocularStatic ); + + // Black out the area behind the numbers + trap_R_SetColor( colorTable[CT_BLACK]); + CG_DrawPic( 212, 367, 200, 40, cgs.media.whiteShader ); + + // Numbers should be kind of greenish + color1[0] = 0.2f; + color1[1] = 0.4f; + color1[2] = 0.2f; + color1[3] = 0.3f; + trap_R_SetColor( color1 ); + + // Draw scrolling numbers, use intervals 10 units apart--sorry, this section of code is just kind of hacked + // up with a bunch of magic numbers..... + val = ((int)((cg.refdefViewAngles[YAW] + 180) / 10)) * 10; + off = (cg.refdefViewAngles[YAW] + 180) - val; + + for ( i = -10; i < 30; i += 10 ) + { + val -= 10; + + if ( val < 0 ) + { + val += 360; + } + + // we only want to draw the very far left one some of the time, if it's too far to the left it will + // poke outside the mask. + if (( off > 3.0f && i == -10 ) || i > -10 ) + { + // draw the value, but add 200 just to bump the range up...arbitrary, so change it if you like + CG_DrawNumField( 155 + i * 10 + off * 10, 374, 3, val + 200, 24, 14, NUM_FONT_CHUNKY, qtrue ); + CG_DrawPic( 245 + (i-1) * 10 + off * 10, 376, 6, 6, cgs.media.whiteShader ); + } + } + + CG_DrawPic( 212, 367, 200, 28, cgs.media.binocularOverlay ); + + color1[0] = sin( cg.time * 0.01f ) * 0.5f + 0.5f; + color1[0] = color1[0] * color1[0]; + color1[1] = color1[0]; + color1[2] = color1[0]; + color1[3] = 1.0f; + + trap_R_SetColor( color1 ); + + CG_DrawPic( 82, 94, 16, 16, cgs.media.binocularCircle ); + + // Flickery color + color1[0] = 0.7f + crandom() * 0.1f; + color1[1] = 0.8f + crandom() * 0.1f; + color1[2] = 0.7f + crandom() * 0.1f; + color1[3] = 1.0f; + trap_R_SetColor( color1 ); + + CG_DrawPic( 0, 0, 640, 480, cgs.media.binocularMask ); + + CG_DrawPic( 4, 282 - level, 16, 16, cgs.media.binocularArrow ); + + // The top triangle bit randomly flips + if ( flip ) + { + CG_DrawPic( 330, 60, -26, -30, cgs.media.binocularTri ); + } + else + { + CG_DrawPic( 307, 40, 26, 30, cgs.media.binocularTri ); + } + + if ( random() > 0.98f && ( cg.time & 1024 )) + { + flip = !flip; + } + } + else if ( cg.predictedPlayerState.zoomMode) + { + // disruptor zoom mode + level = (float)(50.0f - zoomFov) / 50.0f;//(float)(80.0f - zoomFov) / 80.0f; + + // ...so we'll clamp it + if ( level < 0.0f ) + { + level = 0.0f; + } + else if ( level > 1.0f ) + { + level = 1.0f; + } + + // Using a magic number to convert the zoom level to a rotation amount that correlates more or less with the zoom artwork. + level *= 103.0f; + + // Draw target mask + trap_R_SetColor( colorTable[CT_WHITE] ); + CG_DrawPic( 0, 0, 640, 480, cgs.media.disruptorMask ); + + // apparently 99.0f is the full zoom level + if ( level >= 99 ) + { + // Fully zoomed, so make the rotating insert pulse + color1[0] = 1.0f; + color1[1] = 1.0f; + color1[2] = 1.0f; + color1[3] = 0.7f + sin( cg.time * 0.01f ) * 0.3f; + + trap_R_SetColor( color1 ); + } + + // Draw rotating insert + CG_DrawRotatePic2( 320, 240, 640, 480, -level, cgs.media.disruptorInsert ); + + // Increase the light levels under the center of the target +// CG_DrawPic( 198, 118, 246, 246, cgs.media.disruptorLight ); + + // weirdness.....converting ammo to a base five number scale just to be geeky. +/* val[0] = ammo % 5; + val[1] = (ammo / 5) % 5; + val[2] = (ammo / 25) % 5; + val[3] = (ammo / 125) % 5; + val[4] = (ammo / 625) % 5; + + color1[0] = 0.2f; + color1[1] = 0.55f + crandom() * 0.1f; + color1[2] = 0.5f + crandom() * 0.1f; + color1[3] = 1.0f; + trap_R_SetColor( color1 ); + + for ( int t = 0; t < 5; t++ ) + { + cx = 320 + sin( (t*10+45)/57.296f ) * 192; + cy = 240 + cos( (t*10+45)/57.296f ) * 192; + + CG_DrawRotatePic2( cx, cy, 24, 38, 45 - t * 10, trap_R_RegisterShader( va("gfx/2d/char%d",val[4-t] ))); + } +*/ + //max = ( cg_entities[0].gent->health / 100.0f ); + + max = cg.snap->ps.ammo[weaponData[WP_DISRUPTOR].ammoIndex] / (float)ammoData[weaponData[WP_DISRUPTOR].ammoIndex].max; + if ( max > 1.0f ) + { + max = 1.0f; + } + + color1[0] = (1.0f - max) * 2.0f; + color1[1] = max * 1.5f; + color1[2] = 0.0f; + color1[3] = 1.0f; + + // If we are low on health, make us flash + if ( max < 0.15f && ( cg.time & 512 )) + { + VectorClear( color1 ); + } + + if ( color1[0] > 1.0f ) + { + color1[0] = 1.0f; + } + + if ( color1[1] > 1.0f ) + { + color1[1] = 1.0f; + } + + trap_R_SetColor( color1 ); + + max *= 58.0f; + + for (fi = 18.5f; fi <= 18.5f + max; fi+= 3 ) // going from 15 to 45 degrees, with 5 degree increments + { + cx = 320 + sin( (fi+90.0f)/57.296f ) * 190; + cy = 240 + cos( (fi+90.0f)/57.296f ) * 190; + + CG_DrawRotatePic2( cx, cy, 12, 24, 90 - fi, cgs.media.disruptorInsertTick ); + } + + if ( cg.predictedPlayerState.weaponstate == WEAPON_CHARGING_ALT ) + { + trap_R_SetColor( colorTable[CT_WHITE] ); + + // draw the charge level + max = ( cg.time - cg.predictedPlayerState.weaponChargeTime ) / ( 50.0f * 30.0f ); // bad hardcodedness 50 is disruptor charge unit and 30 is max charge units allowed. + + if ( max > 1.0f ) + { + max = 1.0f; + } + + trap_R_DrawStretchPic(257, 435, 134*max, 34, 0, 0, max, 1, cgs.media.disruptorChargeShader); + } +// trap_R_SetColor( colorTable[CT_WHITE] ); +// CG_DrawPic( 0, 0, 640, 480, cgs.media.disruptorMask ); + + } +} + + +/* +================ +CG_Draw3DModel + +================ +*/ +void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles ) { + refdef_t refdef; + refEntity_t ent; + + if ( !cg_draw3dIcons.integer || !cg_drawIcons.integer ) { + return; + } + + memset( &refdef, 0, sizeof( refdef ) ); + + memset( &ent, 0, sizeof( ent ) ); + AnglesToAxis( angles, ent.axis ); + VectorCopy( origin, ent.origin ); + ent.hModel = model; + ent.customSkin = skin; + ent.renderfx = RF_NOSHADOW; // no stencil shadows + + refdef.rdflags = RDF_NOWORLDMODEL; + + AxisClear( refdef.viewaxis ); + + refdef.fov_x = 30; + refdef.fov_y = 30; + + refdef.x = x; + refdef.y = y; + refdef.width = w; + refdef.height = h; + + refdef.time = cg.time; + + trap_R_ClearScene(); + trap_R_AddRefEntityToScene( &ent ); + trap_R_RenderScene( &refdef ); +} + +/* +================ +CG_DrawHead + +Used for both the status bar and the scoreboard +================ +*/ +void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec3_t headAngles ) +{ + clientInfo_t *ci; + + ci = &cgs.clientinfo[ clientNum ]; + + CG_DrawPic( x, y, w, h, ci->modelIcon ); + + // if they are deferred, draw a cross out + if ( ci->deferred ) + { + CG_DrawPic( x, y, w, h, cgs.media.deferShader ); + } +} + +/* +================ +CG_DrawFlagModel + +Used for both the status bar and the scoreboard +================ +*/ +void CG_DrawFlagModel( float x, float y, float w, float h, int team, qboolean force2D ) { + qhandle_t cm; + float len; + vec3_t origin, angles; + vec3_t mins, maxs; + qhandle_t handle; + + if ( !force2D && cg_draw3dIcons.integer ) { + + VectorClear( angles ); + + cm = cgs.media.redFlagModel; + + // offset the origin y and z to center the flag + trap_R_ModelBounds( cm, mins, maxs ); + + origin[2] = -0.5 * ( mins[2] + maxs[2] ); + origin[1] = 0.5 * ( mins[1] + maxs[1] ); + + // calculate distance so the flag nearly fills the box + // assume heads are taller than wide + len = 0.5 * ( maxs[2] - mins[2] ); + origin[0] = len / 0.268; // len / tan( fov/2 ) + + angles[YAW] = 60 * sin( cg.time / 2000.0 );; + + if( team == TEAM_RED ) { + handle = cgs.media.redFlagModel; + } else if( team == TEAM_BLUE ) { + handle = cgs.media.blueFlagModel; + } else if( team == TEAM_FREE ) { + handle = cgs.media.neutralFlagModel; + } else { + return; + } + CG_Draw3DModel( x, y, w, h, handle, 0, origin, angles ); + } else if ( cg_drawIcons.integer ) { + gitem_t *item; + + if( team == TEAM_RED ) { + item = BG_FindItemForPowerup( PW_REDFLAG ); + } else if( team == TEAM_BLUE ) { + item = BG_FindItemForPowerup( PW_BLUEFLAG ); + } else if( team == TEAM_FREE ) { + item = BG_FindItemForPowerup( PW_NEUTRALFLAG ); + } else { + return; + } + if (item) { + CG_DrawPic( x, y, w, h, cg_items[ ITEM_INDEX(item) ].icon ); + } + } +} + +/* +================ +DrawAmmo +================ +*/ +void DrawAmmo() +{ + int x, y; + + x = SCREEN_WIDTH-80; + y = SCREEN_HEIGHT-80; + +} + +/* +================ +CG_DrawHUDLeftFrame1 +================ +*/ +void CG_DrawHUDLeftFrame1(int x,int y) +{ + // Inner gray wire frame + trap_R_SetColor( hudTintColor ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDInnerLeft ); +} + +/* +================ +CG_DrawHUDLeftFrame2 +================ +*/ +void CG_DrawHUDLeftFrame2(int x,int y) +{ + // Inner gray wire frame + trap_R_SetColor( hudTintColor ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeftFrame ); // Metal frame +} + +/* +================ +DrawHealthArmor +================ +*/ +void DrawHealthArmor(int x,int y) +{ + vec4_t calcColor; + float armorPercent,hold,healthPercent; + playerState_t *ps; + + int healthAmt; + int armorAmt; + + ps = &cg.snap->ps; + + healthAmt = ps->stats[STAT_HEALTH]; + armorAmt = ps->stats[STAT_ARMOR]; + + if (healthAmt > ps->stats[STAT_MAX_HEALTH]) + { + healthAmt = ps->stats[STAT_MAX_HEALTH]; + } + + if (armorAmt > 100) + { + armorAmt = 100; + } + + trap_R_SetColor( colorTable[CT_WHITE] ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeftFrame ); // Circular black background + + // Outer Armor circular + memcpy(calcColor, colorTable[CT_GREEN], sizeof(vec4_t)); + + hold = armorAmt-(ps->stats[STAT_MAX_HEALTH]/2); + armorPercent = (float) hold/(ps->stats[STAT_MAX_HEALTH]/2); + if (armorPercent <0) + { + armorPercent = 0; + } + calcColor[0] *= armorPercent; + calcColor[1] *= armorPercent; + calcColor[2] *= armorPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor1 ); + + // Inner Armor circular + if (armorPercent>0) + { + armorPercent = 1; + } + else + { + armorPercent = (float) armorAmt/(ps->stats[STAT_MAX_HEALTH]/2); + } + memcpy(calcColor, colorTable[CT_GREEN], sizeof(vec4_t)); + calcColor[0] *= armorPercent; + calcColor[1] *= armorPercent; + calcColor[2] *= armorPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor2 ); // Inner Armor circular + + if (ps->stats[STAT_ARMOR]) // Is there armor? Draw the HUD Armor TIC + { + // Make tic flash if inner armor is at 50% (25% of full armor) + if (armorPercent<.5) // Do whatever the flash timer says + { + if (cg.HUDTickFlashTime < cg.time) // Flip at the same time + { + cg.HUDTickFlashTime = cg.time + 100; + if (cg.HUDArmorFlag) + { + cg.HUDArmorFlag = qfalse; + } + else + { + cg.HUDArmorFlag = qtrue; + } + } + } + else + { + cg.HUDArmorFlag=qtrue; + } + } + else // No armor? Don't show it. + { + cg.HUDArmorFlag=qfalse; + } + + memcpy(calcColor, colorTable[CT_RED], sizeof(vec4_t)); + healthPercent = (float) healthAmt/ps->stats[STAT_MAX_HEALTH]; + calcColor[0] *= healthPercent; + calcColor[1] *= healthPercent; + calcColor[2] *= healthPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealth ); + + // Make tic flash if health is at 20% of full + if (healthPercent>.20) + { + cg.HUDHealthFlag=qtrue; + } + else + { + if (cg.HUDTickFlashTime < cg.time) // Flip at the same time + { + cg.HUDTickFlashTime = cg.time + 100; + + if ((armorPercent>0) && (armorPercent<.5)) // Keep the tics in sync if flashing + { + cg.HUDHealthFlag=cg.HUDArmorFlag; + } + else + { + if (cg.HUDHealthFlag) + { + cg.HUDHealthFlag = qfalse; + } + else + { + cg.HUDHealthFlag = qtrue; + } + } + } + } + + // Draw the ticks + if (cg.HUDHealthFlag) + { + trap_R_SetColor( colorTable[CT_RED] ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealthTic ); + } + + if (cg.HUDArmorFlag) + { + trap_R_SetColor( colorTable[CT_GREEN] ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmorTic ); // + } + + trap_R_SetColor(hudTintColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeftStatic ); // + + trap_R_SetColor( colorTable[CT_RED] ); + CG_DrawNumField (x + 16, y + 40, 3, ps->stats[STAT_HEALTH], 14, 18, + NUM_FONT_SMALL,qfalse); + + trap_R_SetColor( colorTable[CT_GREEN] ); + CG_DrawNumField (x + 18 + 14, y + 40 + 14, 3, ps->stats[STAT_ARMOR], 14, 18, + NUM_FONT_SMALL,qfalse); + + trap_R_SetColor(hudTintColor ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeft ); // Metal frame +} + +/* +================ +CG_DrawHealth +================ +*/ +void CG_DrawHealth(int x,int y) +{ + vec4_t calcColor; + float healthPercent; + playerState_t *ps; + int healthAmt; + + ps = &cg.snap->ps; + + healthAmt = ps->stats[STAT_HEALTH]; + + if (healthAmt > ps->stats[STAT_MAX_HEALTH]) + { + healthAmt = ps->stats[STAT_MAX_HEALTH]; + } + + memcpy(calcColor, colorTable[CT_HUD_RED], sizeof(vec4_t)); + healthPercent = (float) healthAmt/ps->stats[STAT_MAX_HEALTH]; + calcColor[0] *= healthPercent; + calcColor[1] *= healthPercent; + calcColor[2] *= healthPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealth ); + + // Draw the ticks + if (cg.HUDHealthFlag) + { + trap_R_SetColor( colorTable[CT_HUD_RED] ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealthTic ); + } + + trap_R_SetColor( colorTable[CT_HUD_RED] ); + CG_DrawNumField (x + 16, y + 40, 3, ps->stats[STAT_HEALTH], 6, 12, + NUM_FONT_SMALL,qfalse); + +} + +/* +================ +CG_DrawArmor +================ +*/ +void CG_DrawArmor(int x,int y) +{ + vec4_t calcColor; + float armorPercent,hold; + playerState_t *ps; + int armor; + + ps = &cg.snap->ps; + + // Outer Armor circular + memcpy(calcColor, colorTable[CT_HUD_GREEN], sizeof(vec4_t)); + + armor =ps->stats[STAT_ARMOR]; + + if (armor> ps->stats[STAT_MAX_HEALTH]) + { + armor = ps->stats[STAT_MAX_HEALTH]; + } + + hold = armor-(ps->stats[STAT_MAX_HEALTH]/2); + armorPercent = (float) hold/(ps->stats[STAT_MAX_HEALTH]/2); + if (armorPercent <0) + { + armorPercent = 0; + } + calcColor[0] *= armorPercent; + calcColor[1] *= armorPercent; + calcColor[2] *= armorPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor1 ); + + // Inner Armor circular + if (armorPercent>0) + { + armorPercent = 1; + } + else + { + armorPercent = (float) ps->stats[STAT_ARMOR]/(ps->stats[STAT_MAX_HEALTH]/2); + } + memcpy(calcColor, colorTable[CT_HUD_GREEN], sizeof(vec4_t)); + calcColor[0] *= armorPercent; + calcColor[1] *= armorPercent; + calcColor[2] *= armorPercent; + trap_R_SetColor( calcColor); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor2 ); // Inner Armor circular + + if (ps->stats[STAT_ARMOR]) // Is there armor? Draw the HUD Armor TIC + { + // Make tic flash if inner armor is at 50% (25% of full armor) + if (armorPercent<.5) // Do whatever the flash timer says + { + if (cg.HUDTickFlashTime < cg.time) // Flip at the same time + { + cg.HUDTickFlashTime = cg.time + 100; + if (cg.HUDArmorFlag) + { + cg.HUDArmorFlag = qfalse; + } + else + { + cg.HUDArmorFlag = qtrue; + } + } + } + else + { + cg.HUDArmorFlag=qtrue; + } + } + else // No armor? Don't show it. + { + cg.HUDArmorFlag=qfalse; + } + + if (cg.HUDArmorFlag) + { + trap_R_SetColor( colorTable[CT_HUD_GREEN] ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmorTic ); + } + + trap_R_SetColor( colorTable[CT_HUD_GREEN] ); + CG_DrawNumField (x + 18 + 14, y + 40 + 14, 3, ps->stats[STAT_ARMOR], 6, 12, + NUM_FONT_SMALL,qfalse); + +} + +/* +================ +CG_DrawHUDRightFrame1 +================ +*/ +void CG_DrawHUDRightFrame1(int x,int y) +{ + trap_R_SetColor( hudTintColor ); + // Inner gray wire frame + CG_DrawPic( x, y, 80, 80, cgs.media.HUDInnerRight ); // +} + +/* +================ +CG_DrawHUDRightFrame2 +================ +*/ +void CG_DrawHUDRightFrame2(int x,int y) +{ + trap_R_SetColor( hudTintColor ); + CG_DrawPic( x, y, 80, 80, cgs.media.HUDRightFrame ); // Metal frame +} + +/* +================ +CG_DrawAmmo +================ +*/ +static void CG_DrawAmmo(centity_t *cent,int x,int y) +{ + playerState_t *ps; + int numColor_i; + int i; + vec4_t calcColor; + float value,inc,percent; + + ps = &cg.snap->ps; + + if (!cent->currentState.weapon ) // We don't have a weapon right now + { + return; + } + + if ( cent->currentState.weapon == WP_SABER ) + { + trap_R_SetColor( colorTable[CT_WHITE] ); + // don't need to draw ammo, but we will draw the current saber style in this window + switch ( cg.predictedPlayerState.fd.saberDrawAnimLevel ) + { + case 1://FORCE_LEVEL_1: + CG_DrawPic( x, y, 80, 40, cgs.media.HUDSaberStyle1 ); + break; + case 2://FORCE_LEVEL_2: + CG_DrawPic( x, y, 80, 40, cgs.media.HUDSaberStyle2 ); + break; + case 3://FORCE_LEVEL_3: + CG_DrawPic( x, y, 80, 40, cgs.media.HUDSaberStyle3 ); + break; + } + return; + } + else + { + value = ps->ammo[weaponData[cent->currentState.weapon].ammoIndex]; + } + + if (value < 0) // No ammo + { + return; + } + + + // + // ammo + // +/* if (cg.oldammo < value) + { + cg.oldAmmoTime = cg.time + 200; + } + + cg.oldammo = value; +*/ + // Firing or reloading? +/* if (( pm->ps->weaponstate == WEAPON_FIRING + && cg.predictedPlayerState.weaponTime > 100 )) + { + numColor_i = CT_LTGREY; + } */ + // Overcharged? +// else if ( cent->gent->s.powerups & ( 1 << PW_WEAPON_OVERCHARGE ) ) +// { +// numColor_i = CT_WHITE; +// } +// else +// { +// if ( value > 0 ) +// { +// if (cg.oldAmmoTime > cg.time) +// { +// numColor_i = CT_YELLOW; +// } +// else +// { +// numColor_i = CT_HUD_ORANGE; +// } +// } +// else +// { +// numColor_i = CT_RED; +// } +// } + + numColor_i = CT_HUD_ORANGE; + + trap_R_SetColor( colorTable[numColor_i] ); + CG_DrawNumField (x + 30, y + 26, 3, value, 6, 12, NUM_FONT_SMALL,qfalse); + + +//cg.snap->ps.ammo[weaponData[cg.snap->ps.weapon].ammoIndex] + + inc = (float) ammoData[weaponData[cent->currentState.weapon].ammoIndex].max / MAX_TICS; + value =ps->ammo[weaponData[cent->currentState.weapon].ammoIndex]; + + for (i=MAX_TICS-1;i>=0;i--) + { + + if (value <= 0) // partial tic + { + memcpy(calcColor, colorTable[CT_BLACK], sizeof(vec4_t)); + } + else if (value < inc) // partial tic + { + memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); + percent = value / inc; + calcColor[0] *= percent; + calcColor[1] *= percent; + calcColor[2] *= percent; + } + else + { + memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); + } + + trap_R_SetColor( calcColor); + CG_DrawPic( x + ammoTicPos[i].x, + y + ammoTicPos[i].y, + ammoTicPos[i].width, + ammoTicPos[i].height, + ammoTicPos[i].tic ); + + value -= inc; + } + +} + +/* +================ +CG_DrawForcePower +================ +*/ +void CG_DrawForcePower(int x,int y) +{ + int i; + vec4_t calcColor; + float value,inc,percent; + + inc = (float) 100 / MAX_TICS; + value = cg.snap->ps.fd.forcePower; + + for (i=MAX_TICS-1;i>=0;i--) + { + + if (value <= 0) // partial tic + { + memcpy(calcColor, colorTable[CT_BLACK], sizeof(vec4_t)); + } + else if (value < inc) // partial tic + { + memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); + percent = value / inc; + calcColor[0] *= percent; + calcColor[1] *= percent; + calcColor[2] *= percent; + } + else + { + memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); + } + + trap_R_SetColor( calcColor); + CG_DrawPic( x + forceTicPos[i].x, + y + forceTicPos[i].y, + forceTicPos[i].width, + forceTicPos[i].height, + forceTicPos[i].tic ); + + value -= inc; + } +} + +/* +================ +CG_DrawHUD +================ +*/ +void CG_DrawHUD(centity_t *cent) +{ + menuDef_t *menuHUD = NULL; + const char *scoreStr = NULL; + int scoreBias; + char scoreBiasStr[16]; + + if (cg_hudFiles.integer) + { + int x = 0; + int y = SCREEN_HEIGHT-80; + char ammoString[64]; + int weapX = x; + + UI_DrawProportionalString( x+16, y+40, va( "%i", cg.snap->ps.stats[STAT_HEALTH] ), + UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_HUD_RED] ); + + UI_DrawProportionalString( x+18+14, y+40+14, va( "%i", cg.snap->ps.stats[STAT_ARMOR] ), + UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_HUD_GREEN] ); + + if (cg.snap->ps.weapon == WP_SABER) + { + if (cg.snap->ps.fd.saberDrawAnimLevel == FORCE_LEVEL_3) + { + Com_sprintf(ammoString, sizeof(ammoString), "STRONG"); + weapX += 16; + } + else if (cg.snap->ps.fd.saberDrawAnimLevel == FORCE_LEVEL_2) + { + Com_sprintf(ammoString, sizeof(ammoString), "MEDIUM"); + weapX += 16; + } + else + { + Com_sprintf(ammoString, sizeof(ammoString), "FAST"); + } + } + else + { + Com_sprintf(ammoString, sizeof(ammoString), "%i", cg.snap->ps.ammo[weaponData[cent->currentState.weapon].ammoIndex]); + } + + UI_DrawProportionalString( SCREEN_WIDTH-(weapX+16+32), y+40, va( "%s", ammoString ), + UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_HUD_ORANGE] ); + + UI_DrawProportionalString( SCREEN_WIDTH-(x+18+14+32), y+40+14, va( "%i", cg.snap->ps.fd.forcePower), + UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_ICON_BLUE] ); + + return; + } + + if (cgs.gametype >= GT_TEAM) + { // tint the hud items based on team + if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) + hudTintColor = redhudtint; + else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) + hudTintColor = bluehudtint; + else // If we're not on a team for whatever reason, leave things as they are. + hudTintColor = colorTable[CT_WHITE]; + } + else + { // tint the hud items white (dont' tint) + hudTintColor = colorTable[CT_WHITE]; + } + + menuHUD = Menus_FindByName("lefthud"); + if (menuHUD) + { + CG_DrawHUDLeftFrame1(menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawArmor(menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawHealth(menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawHUDLeftFrame2(menuHUD->window.rect.x,menuHUD->window.rect.y); + } + else + { //Apparently we failed to get proper coordinates from the menu, so resort to manually inputting them. + CG_DrawHUDLeftFrame1(0,SCREEN_HEIGHT-80); + CG_DrawArmor(0,SCREEN_HEIGHT-80); + CG_DrawHealth(0,SCREEN_HEIGHT-80); + CG_DrawHUDLeftFrame2(0,SCREEN_HEIGHT-80); + } + + //scoreStr = va("Score: %i", cgs.clientinfo[cg.snap->ps.clientNum].score); + if ( cgs.gametype == GT_TOURNAMENT ) + {//A duel that requires more than one kill to knock the current enemy back to the queue + //show current kills out of how many needed + scoreStr = va("Score: %i/%i", cg.snap->ps.persistant[PERS_SCORE], cgs.fraglimit); + } + else if (0 && cgs.gametype < GT_TEAM ) + { // This is a teamless mode, draw the score bias. + scoreBias = cg.snap->ps.persistant[PERS_SCORE] - cgs.scores1; + if (scoreBias == 0) + { // We are the leader! + if (cgs.scores2 <= 0) + { // Nobody to be ahead of yet. + Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), ""); + } + else + { + scoreBias = cg.snap->ps.persistant[PERS_SCORE] - cgs.scores2; + if (scoreBias == 0) + { + Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), " (Tie)"); + } + else + { + Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), " (+%d)", scoreBias); + } + } + } + else // if (scoreBias < 0) + { // We are behind! + Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), " (%d)", scoreBias); + } + scoreStr = va("Score: %i%s", cg.snap->ps.persistant[PERS_SCORE], scoreBiasStr); + } + else + { // Don't draw a bias. + scoreStr = va("Score: %i", cg.snap->ps.persistant[PERS_SCORE]); + } + UI_DrawScaledProportionalString(SCREEN_WIDTH-124/*(strlen(scoreStr)*20.5)*/, SCREEN_HEIGHT-23, scoreStr, UI_RIGHT|UI_DROPSHADOW, colorTable[CT_WHITE], 0.7); + + menuHUD = Menus_FindByName("righthud"); + if (menuHUD) + { + CG_DrawHUDRightFrame1(menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawForcePower(menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawAmmo(cent,menuHUD->window.rect.x,menuHUD->window.rect.y); + CG_DrawHUDRightFrame2(menuHUD->window.rect.x,menuHUD->window.rect.y); + + } + else + { //Apparently we failed to get proper coordinates from the menu, so resort to manually inputting them. + CG_DrawHUDRightFrame1(SCREEN_WIDTH-80,SCREEN_HEIGHT-80); + CG_DrawForcePower(SCREEN_WIDTH-80,SCREEN_HEIGHT-80); + CG_DrawAmmo(cent,SCREEN_WIDTH-80,SCREEN_HEIGHT-80); + CG_DrawHUDRightFrame2(SCREEN_WIDTH-80,SCREEN_HEIGHT-80); + } +} + +#define MAX_SHOWPOWERS NUM_FORCE_POWERS + +qboolean ForcePower_Valid(int i) +{ + if (i == FP_LEVITATION || + i == FP_SABERATTACK || + i == FP_SABERDEFEND || + i == FP_SABERTHROW) + { + return qfalse; + } + + if (cg.snap->ps.fd.forcePowersKnown & (1 << i)) + { + return qtrue; + } + + return qfalse; +} + +/* +=================== +CG_DrawForceSelect +=================== +*/ +void CG_DrawForceSelect( void ) +{ + int i; + int count; + int smallIconSize,bigIconSize; + int holdX,x,y,x2,y2,pad,length; + int sideLeftIconCnt,sideRightIconCnt; + int sideMax,holdCount,iconCnt; + + + x2 = 0; + y2 = 0; + + // don't display if dead + if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) + { + return; + } + + if ((cg.forceSelectTime+WEAPON_SELECT_TIME)ps.fd.forcePowerSelected; + return; + } + + if (!cg.snap->ps.fd.forcePowersKnown) + { + return; + } + + // count the number of powers owned + count = 0; + + for (i=0;i < NUM_FORCE_POWERS;++i) + { + if (ForcePower_Valid(i)) + { + count++; + } + } + + if (count == 0) // If no force powers, don't display + { + return; + } + + sideMax = 3; // Max number of icons on the side + + // Calculate how many icons will appear to either side of the center one + holdCount = count - 1; // -1 for the center icon + if (holdCount == 0) // No icons to either side + { + sideLeftIconCnt = 0; + sideRightIconCnt = 0; + } + else if (count > (2*sideMax)) // Go to the max on each side + { + sideLeftIconCnt = sideMax; + sideRightIconCnt = sideMax; + } + else // Less than max, so do the calc + { + sideLeftIconCnt = holdCount/2; + sideRightIconCnt = holdCount - sideLeftIconCnt; + } + + smallIconSize = 30; + bigIconSize = 60; + pad = 12; + + x = 320; + y = 425; + + // Background + length = (sideLeftIconCnt * smallIconSize) + (sideLeftIconCnt*pad) + + bigIconSize + (sideRightIconCnt * smallIconSize) + (sideRightIconCnt*pad) + 12; + + i = BG_ProperForceIndex(cg.forceSelect) - 1; + if (i < 0) + { + i = MAX_SHOWPOWERS; + } + + trap_R_SetColor(NULL); + // Work backwards from current icon + holdX = x - ((bigIconSize/2) + pad + smallIconSize); + for (iconCnt=1;iconCnt<(sideLeftIconCnt+1);i--) + { + if (i < 0) + { + i = MAX_SHOWPOWERS; + } + + if (!ForcePower_Valid(forcePowerSorted[i])) // Does he have this power? + { + continue; + } + + ++iconCnt; // Good icon + + if (cgs.media.forcePowerIcons[forcePowerSorted[i]]) + { + CG_DrawPic( holdX, y, smallIconSize, smallIconSize, cgs.media.forcePowerIcons[forcePowerSorted[i]] ); + holdX -= (smallIconSize+pad); + } + } + + if (ForcePower_Valid(cg.forceSelect)) + { + // Current Center Icon + if (cgs.media.forcePowerIcons[cg.forceSelect]) + { + CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2)), bigIconSize, bigIconSize, cgs.media.forcePowerIcons[cg.forceSelect] ); //only cache the icon for display + } + } + + i = BG_ProperForceIndex(cg.forceSelect) + 1; + if (i>MAX_SHOWPOWERS) + { + i = 0; + } + + // Work forwards from current icon + holdX = x + (bigIconSize/2) + pad; + for (iconCnt=1;iconCnt<(sideRightIconCnt+1);i++) + { + if (i>MAX_SHOWPOWERS) + { + i = 0; + } + + if (!ForcePower_Valid(forcePowerSorted[i])) // Does he have this power? + { + continue; + } + + ++iconCnt; // Good icon + + if (cgs.media.forcePowerIcons[forcePowerSorted[i]]) + { + CG_DrawPic( holdX, y, smallIconSize, smallIconSize, cgs.media.forcePowerIcons[forcePowerSorted[i]] ); //only cache the icon for display + holdX += (smallIconSize+pad); + } + } + + if ( showPowersName[cg.forceSelect] ) + { + UI_DrawProportionalString(320, y + 30, CG_GetStripEdString("INGAME", showPowersName[cg.forceSelect]), UI_CENTER | UI_SMALLFONT, colorTable[CT_ICON_BLUE]); + } +} + +/* +=================== +CG_DrawInventorySelect +=================== +*/ +void CG_DrawInvenSelect( void ) +{ + int i; + int sideMax,holdCount,iconCnt; + int smallIconSize,bigIconSize; + int sideLeftIconCnt,sideRightIconCnt; + int count; + int holdX,x,y,y2,pad; + int height; + float addX; + + // don't display if dead + if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) + { + return; + } + + if ((cg.invenSelectTime+WEAPON_SELECT_TIME)ps.stats[STAT_HOLDABLE_ITEM] || !cg.snap->ps.stats[STAT_HOLDABLE_ITEMS]) + { + return; + } + + if (cg.itemSelect == -1) + { + cg.itemSelect = bg_itemlist[cg.snap->ps.stats[STAT_HOLDABLE_ITEM]].giTag; + } + +//const int bits = cg.snap->ps.stats[ STAT_ITEMS ]; + + // count the number of items owned + count = 0; + for ( i = 0 ; i < HI_NUM_HOLDABLE ; i++ ) + { + if (/*CG_InventorySelectable(i) && inv_icons[i]*/ + (cg.snap->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << i)) ) + { + count++; + } + } + + if (!count) + { + y2 = 0; //err? + UI_DrawProportionalString(320, y2 + 22, "EMPTY INVENTORY", UI_CENTER | UI_SMALLFONT, colorTable[CT_ICON_BLUE]); + return; + } + + sideMax = 3; // Max number of icons on the side + + // Calculate how many icons will appear to either side of the center one + holdCount = count - 1; // -1 for the center icon + if (holdCount == 0) // No icons to either side + { + sideLeftIconCnt = 0; + sideRightIconCnt = 0; + } + else if (count > (2*sideMax)) // Go to the max on each side + { + sideLeftIconCnt = sideMax; + sideRightIconCnt = sideMax; + } + else // Less than max, so do the calc + { + sideLeftIconCnt = holdCount/2; + sideRightIconCnt = holdCount - sideLeftIconCnt; + } + + i = cg.itemSelect - 1; + if (i<0) + { + i = HI_NUM_HOLDABLE-1; + } + + smallIconSize = 40; + bigIconSize = 80; + pad = 16; + + x = 320; + y = 410; + + // Left side ICONS + // Work backwards from current icon + holdX = x - ((bigIconSize/2) + pad + smallIconSize); + height = smallIconSize * cg.iconHUDPercent; + addX = (float) smallIconSize * .75; + + for (iconCnt=0;iconCntps.stats[STAT_HOLDABLE_ITEMS] & (1 << i)) || i == cg.itemSelect ) + { + continue; + } + + ++iconCnt; // Good icon + + if (cgs.media.invenIcons[i]) + { + trap_R_SetColor(NULL); + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.invenIcons[i] ); + + trap_R_SetColor(colorTable[CT_ICON_BLUE]); + /*CG_DrawNumField (holdX + addX, y + smallIconSize, 2, cg.snap->ps.inventory[i], 6, 12, + NUM_FONT_SMALL,qfalse); + */ + + holdX -= (smallIconSize+pad); + } + } + + // Current Center Icon + height = bigIconSize * cg.iconHUDPercent; + if (cgs.media.invenIcons[cg.itemSelect]) + { + int itemNdex; + trap_R_SetColor(NULL); + CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2))+10, bigIconSize, bigIconSize, cgs.media.invenIcons[cg.itemSelect] ); + addX = (float) bigIconSize * .75; + trap_R_SetColor(colorTable[CT_ICON_BLUE]); + /*CG_DrawNumField ((x-(bigIconSize/2)) + addX, y, 2, cg.snap->ps.inventory[cg.inventorySelect], 6, 12, + NUM_FONT_SMALL,qfalse);*/ + + itemNdex = BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE); + if (bg_itemlist[itemNdex].classname) + { + vec4_t textColor = { .312f, .75f, .621f, 1.0f }; + char text[1024]; + + if ( trap_SP_GetStringTextString( va("INGAME_%s",bg_itemlist[itemNdex].classname), text, sizeof( text ))) + { + UI_DrawProportionalString(320, y+45, text, UI_CENTER | UI_SMALLFONT, textColor); + } + else + { + UI_DrawProportionalString(320, y+45, bg_itemlist[itemNdex].classname, UI_CENTER | UI_SMALLFONT, textColor); + } + } + } + + i = cg.itemSelect + 1; + if (i> HI_NUM_HOLDABLE-1) + { + i = 0; + } + + // Right side ICONS + // Work forwards from current icon + holdX = x + (bigIconSize/2) + pad; + height = smallIconSize * cg.iconHUDPercent; + addX = (float) smallIconSize * .75; + for (iconCnt=0;iconCnt HI_NUM_HOLDABLE-1) + { + i = 0; + } + + if ( !(cg.snap->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << i)) || i == cg.itemSelect ) + { + continue; + } + + ++iconCnt; // Good icon + + if (cgs.media.invenIcons[i]) + { + trap_R_SetColor(NULL); + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.invenIcons[i] ); + + trap_R_SetColor(colorTable[CT_ICON_BLUE]); + /*CG_DrawNumField (holdX + addX, y + smallIconSize, 2, cg.snap->ps.inventory[i], 6, 12, + NUM_FONT_SMALL,qfalse);*/ + + holdX += (smallIconSize+pad); + } + } +} + +/* +================ +CG_DrawStats + +================ +*/ +static void CG_DrawStats( void ) +{ + centity_t *cent; +/* playerState_t *ps; + vec3_t angles; +// vec3_t origin; + + if ( cg_drawStatus.integer == 0 ) { + return; + } +*/ + cent = &cg_entities[cg.snap->ps.clientNum]; +/* ps = &cg.snap->ps; + + VectorClear( angles ); + + // Do start + if (!cg.interfaceStartupDone) + { + CG_InterfaceStartup(); + } + + cgi_UI_MenuPaintAll();*/ + + CG_DrawHUD(cent); + /*CG_DrawArmor(cent); + CG_DrawHealth(cent); + CG_DrawAmmo(cent); + + CG_DrawTalk(cent);*/ +} + + +/* +================ +CG_DrawTeamBackground + +================ +*/ +void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int team ) +{ + vec4_t hcolor; + + hcolor[3] = alpha; + if ( team == TEAM_RED ) { + hcolor[0] = 1; + hcolor[1] = .2f; + hcolor[2] = .2f; + } else if ( team == TEAM_BLUE ) { + hcolor[0] = .2f; + hcolor[1] = .2f; + hcolor[2] = 1; + } else { + return; + } +// trap_R_SetColor( hcolor ); + + CG_FillRect ( x, y, w, h, hcolor ); +// CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar ); + trap_R_SetColor( NULL ); +} + + +/* +=========================================================================================== + + UPPER RIGHT CORNER + +=========================================================================================== +*/ + +/* +================ +CG_DrawMiniScoreboard +================ +*/ +static float CG_DrawMiniScoreboard ( float y ) +{ + char temp[MAX_QPATH]; + + if ( !cg_drawScores.integer ) + { + return y; + } + + if ( cgs.gametype >= GT_TEAM ) + { + strcpy ( temp, "Red: " ); + Q_strcat ( temp, MAX_QPATH, cgs.scores1==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores1)) ); + Q_strcat ( temp, MAX_QPATH, " Blue: " ); + Q_strcat ( temp, MAX_QPATH, cgs.scores2==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores2)) ); + + CG_Text_Paint( 630 - CG_Text_Width ( temp, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, temp, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM ); + y += 15; + } + else + { + /* + strcpy ( temp, "1st: " ); + Q_strcat ( temp, MAX_QPATH, cgs.scores1==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores1)) ); + + Q_strcat ( temp, MAX_QPATH, " 2nd: " ); + Q_strcat ( temp, MAX_QPATH, cgs.scores2==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores2)) ); + + CG_Text_Paint( 630 - CG_Text_Width ( temp, 0.7f, FONT_SMALL ), y, 0.7f, colorWhite, temp, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM ); + y += 15; + */ + //rww - no longer doing this. Since the attacker now shows who is first, we print the score there. + } + + + return y; +} + +/* +================ +CG_DrawEnemyInfo +================ +*/ +static float CG_DrawEnemyInfo ( float y ) +{ + float size; + int clientNum; + const char *title; + clientInfo_t *ci; + + if ( !cg_drawEnemyInfo.integer ) + { + return y; + } + + if ( cg.predictedPlayerState.stats[STAT_HEALTH] <= 0 ) + { + return y; + } + + if ( cgs.gametype == GT_JEDIMASTER ) + { + //title = "Jedi Master"; + title = CG_GetStripEdString("INGAMETEXT", "MASTERY7"); + clientNum = cgs.jediMaster; + + if ( clientNum < 0 ) + { + //return y; +// title = "Get Saber!"; + title = CG_GetStripEdString("INGAMETEXT", "GET_SABER"); + + + size = ICON_SIZE * 1.25; + y += 5; + + CG_DrawPic( 640 - size - 12, y, size, size, cgs.media.weaponIcons[WP_SABER] ); + + y += size; + + /* + CG_Text_Paint( 630 - CG_Text_Width ( ci->name, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, ci->name, 0, 0, 0, FONT_MEDIUM ); + y += 15; + */ + + CG_Text_Paint( 630 - CG_Text_Width ( title, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, title, 0, 0, 0, FONT_MEDIUM ); + + return y + BIGCHAR_HEIGHT + 2; + } + } + else if ( cg.snap->ps.duelInProgress ) + { +// title = "Dueling"; + title = CG_GetStripEdString("INGAMETEXT", "DUELING"); + clientNum = cg.snap->ps.duelIndex; + } + else if ( cgs.gametype == GT_TOURNAMENT && cgs.clientinfo[cg.snap->ps.clientNum].team != TEAM_SPECTATOR) + { +// title = "Dueling"; + title = CG_GetStripEdString("INGAMETEXT", "DUELING"); + if (cg.snap->ps.clientNum == cgs.duelist1) + { + clientNum = cgs.duelist2; + } + else if (cg.snap->ps.clientNum == cgs.duelist2) + { + clientNum = cgs.duelist1; + } + else + { + return y; + } + } + else + { + /* + title = "Attacker"; + clientNum = cg.predictedPlayerState.persistant[PERS_ATTACKER]; + + if ( clientNum < 0 || clientNum >= MAX_CLIENTS || clientNum == cg.snap->ps.clientNum ) + { + return y; + } + + if ( cg.time - cg.attackerTime > ATTACKER_HEAD_TIME ) + { + cg.attackerTime = 0; + return y; + } + */ + //As of current, we don't want to draw the attacker. Instead, draw whoever is in first place. + if (cgs.duelWinner < 0 || cgs.duelWinner >= MAX_CLIENTS) + { + return y; + } + + + title = va("%s: %i",CG_GetStripEdString("INGAMETEXT", "LEADER"), cgs.scores1); + + /* + if (cgs.scores1 == 1) + { + title = va("%i kill", cgs.scores1); + } + else + { + title = va("%i kills", cgs.scores1); + } + */ + clientNum = cgs.duelWinner; + } + + ci = &cgs.clientinfo[ clientNum ]; + + if ( !ci ) + { + return y; + } + + size = ICON_SIZE * 1.25; + y += 5; + + if ( ci->modelIcon ) + { + CG_DrawPic( 640 - size - 5, y, size, size, ci->modelIcon ); + } + + y += size; + + CG_Text_Paint( 630 - CG_Text_Width ( ci->name, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, ci->name, 0, 0, 0, FONT_MEDIUM ); + + y += 15; + CG_Text_Paint( 630 - CG_Text_Width ( title, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, title, 0, 0, 0, FONT_MEDIUM ); + + if ( cgs.gametype == GT_TOURNAMENT && cgs.clientinfo[cg.snap->ps.clientNum].team != TEAM_SPECTATOR) + {//also print their score + char text[1024]; + y += 15; + Com_sprintf(text, sizeof(text), "%i/%i", cgs.clientinfo[clientNum].score, cgs.fraglimit ); + CG_Text_Paint( 630 - CG_Text_Width ( text, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, text, 0, 0, 0, FONT_MEDIUM ); + } + + return y + BIGCHAR_HEIGHT + 2; +} + +/* +================== +CG_DrawSnapshot +================== +*/ +static float CG_DrawSnapshot( float y ) { + char *s; + int w; + + s = va( "time:%i snap:%i cmd:%i", cg.snap->serverTime, + cg.latestSnapshotNum, cgs.serverCommandSequence ); + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + + CG_DrawBigString( 635 - w, y + 2, s, 1.0F); + + return y + BIGCHAR_HEIGHT + 4; +} + +/* +================== +CG_DrawFPS +================== +*/ +#define FPS_FRAMES 4 +static float CG_DrawFPS( float y ) { + char *s; + int w; + static int previousTimes[FPS_FRAMES]; + static int index; + int i, total; + int fps; + static int previous; + int t, frameTime; + + // don't use serverTime, because that will be drifting to + // correct for internet lag changes, timescales, timedemos, etc + t = trap_Milliseconds(); + frameTime = t - previous; + previous = t; + + previousTimes[index % FPS_FRAMES] = frameTime; + index++; + if ( index > FPS_FRAMES ) { + // average multiple frames together to smooth changes out a bit + total = 0; + for ( i = 0 ; i < FPS_FRAMES ; i++ ) { + total += previousTimes[i]; + } + if ( !total ) { + total = 1; + } + fps = 1000 * FPS_FRAMES / total; + + s = va( "%ifps", fps ); + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + + CG_DrawBigString( 635 - w, y + 2, s, 1.0F); + } + + return y + BIGCHAR_HEIGHT + 4; +} + +/* +================= +CG_DrawTimer +================= +*/ +static float CG_DrawTimer( float y ) { + char *s; + int w; + int mins, seconds, tens; + int msec; + + msec = cg.time - cgs.levelStartTime; + + seconds = msec / 1000; + mins = seconds / 60; + seconds -= mins * 60; + tens = seconds / 10; + seconds -= tens * 10; + + s = va( "%i:%i%i", mins, tens, seconds ); + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + + CG_DrawBigString( 635 - w, y + 2, s, 1.0F); + + return y + BIGCHAR_HEIGHT + 4; +} + + +/* +================= +CG_DrawTeamOverlay +================= +*/ + +static float CG_DrawTeamOverlay( float y, qboolean right, qboolean upper ) { + int x, w, h, xx; + int i, j, len; + const char *p; + vec4_t hcolor; + int pwidth, lwidth; + int plyrs; + char st[16]; + clientInfo_t *ci; + gitem_t *item; + int ret_y, count; + + if ( !cg_drawTeamOverlay.integer ) { + return y; + } + + if ( cg.snap->ps.persistant[PERS_TEAM] != TEAM_RED && cg.snap->ps.persistant[PERS_TEAM] != TEAM_BLUE ) { + return y; // Not on any team + } + + plyrs = 0; + + // max player name width + pwidth = 0; + count = (numSortedTeamPlayers > 8) ? 8 : numSortedTeamPlayers; + for (i = 0; i < count; i++) { + ci = cgs.clientinfo + sortedTeamPlayers[i]; + if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { + plyrs++; + len = CG_DrawStrlen(ci->name); + if (len > pwidth) + pwidth = len; + } + } + + if (!plyrs) + return y; + + if (pwidth > TEAM_OVERLAY_MAXNAME_WIDTH) + pwidth = TEAM_OVERLAY_MAXNAME_WIDTH; + + // max location name width + lwidth = 0; + for (i = 1; i < MAX_LOCATIONS; i++) { + p = CG_ConfigString(CS_LOCATIONS + i); + if (p && *p) { + len = CG_DrawStrlen(p); + if (len > lwidth) + lwidth = len; + } + } + + if (lwidth > TEAM_OVERLAY_MAXLOCATION_WIDTH) + lwidth = TEAM_OVERLAY_MAXLOCATION_WIDTH; + + w = (pwidth + lwidth + 4 + 7) * TINYCHAR_WIDTH; + + if ( right ) + x = 640 - w; + else + x = 0; + + h = plyrs * TINYCHAR_HEIGHT; + + if ( upper ) { + ret_y = y + h; + } else { + y -= h; + ret_y = y; + } + + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) { + hcolor[0] = 1.0f; + hcolor[1] = 0.0f; + hcolor[2] = 0.0f; + hcolor[3] = 0.33f; + } else { // if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) + hcolor[0] = 0.0f; + hcolor[1] = 0.0f; + hcolor[2] = 1.0f; + hcolor[3] = 0.33f; + } + trap_R_SetColor( hcolor ); + CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar ); + trap_R_SetColor( NULL ); + + for (i = 0; i < count; i++) { + ci = cgs.clientinfo + sortedTeamPlayers[i]; + if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { + + hcolor[0] = hcolor[1] = hcolor[2] = hcolor[3] = 1.0; + + xx = x + TINYCHAR_WIDTH; + + CG_DrawStringExt( xx, y, + ci->name, hcolor, qfalse, qfalse, + TINYCHAR_WIDTH, TINYCHAR_HEIGHT, TEAM_OVERLAY_MAXNAME_WIDTH); + + if (lwidth) { + p = CG_ConfigString(CS_LOCATIONS + ci->location); + if (!p || !*p) + p = "unknown"; + len = CG_DrawStrlen(p); + if (len > lwidth) + len = lwidth; + +// xx = x + TINYCHAR_WIDTH * 2 + TINYCHAR_WIDTH * pwidth + +// ((lwidth/2 - len/2) * TINYCHAR_WIDTH); + xx = x + TINYCHAR_WIDTH * 2 + TINYCHAR_WIDTH * pwidth; + CG_DrawStringExt( xx, y, + p, hcolor, qfalse, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, + TEAM_OVERLAY_MAXLOCATION_WIDTH); + } + + CG_GetColorForHealth( ci->health, ci->armor, hcolor ); + + Com_sprintf (st, sizeof(st), "%3i %3i", ci->health, ci->armor); + + xx = x + TINYCHAR_WIDTH * 3 + + TINYCHAR_WIDTH * pwidth + TINYCHAR_WIDTH * lwidth; + + CG_DrawStringExt( xx, y, + st, hcolor, qfalse, qfalse, + TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 0 ); + + // draw weapon icon + xx += TINYCHAR_WIDTH * 3; + + if ( cg_weapons[ci->curWeapon].weaponIcon ) { + CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, + cg_weapons[ci->curWeapon].weaponIcon ); + } else { + CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, + cgs.media.deferShader ); + } + + // Draw powerup icons + if (right) { + xx = x; + } else { + xx = x + w - TINYCHAR_WIDTH; + } + for (j = 0; j <= PW_NUM_POWERUPS; j++) { + if (ci->powerups & (1 << j)) { + + item = BG_FindItemForPowerup( j ); + + if (item) { + CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, + trap_R_RegisterShader( item->icon ) ); + if (right) { + xx -= TINYCHAR_WIDTH; + } else { + xx += TINYCHAR_WIDTH; + } + } + } + } + + y += TINYCHAR_HEIGHT; + } + } + + return ret_y; +//#endif +} + + +static void CG_DrawPowerupIcons(int y) +{ + int j; + int ico_size = 64; + //int y = ico_size/2; + gitem_t *item; + + if (!cg.snap) + { + return; + } + + y += 16; + + for (j = 0; j <= PW_NUM_POWERUPS; j++) + { + if (cg.snap->ps.powerups[j] > cg.time) + { + int secondsleft = (cg.snap->ps.powerups[j] - cg.time)/1000; + + item = BG_FindItemForPowerup( j ); + + if (item) + { + int icoShader = 0; + if (cgs.gametype == GT_CTY && (j == PW_REDFLAG || j == PW_BLUEFLAG)) + { + if (j == PW_REDFLAG) + { + icoShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_ys" ); + } + else + { + icoShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_ys" ); + } + } + else + { + icoShader = trap_R_RegisterShader( item->icon ); + } + + CG_DrawPic( (640-(ico_size*1.1)), y, ico_size, ico_size, icoShader ); + + y += ico_size; + + if (j != PW_REDFLAG && j != PW_BLUEFLAG && secondsleft < 999) + { + UI_DrawProportionalString((640-(ico_size*1.1))+(ico_size/2), y-8, va("%i", secondsleft), UI_CENTER | UI_BIGFONT | UI_DROPSHADOW, colorTable[CT_WHITE]); + } + + y += (ico_size/3); + } + } + } +} + + +/* +===================== +CG_DrawUpperRight + +===================== +*/ +static void CG_DrawUpperRight( void ) { + float y; + + y = 0; + + if ( cgs.gametype >= GT_TEAM && cg_drawTeamOverlay.integer == 1 ) { + y = CG_DrawTeamOverlay( y, qtrue, qtrue ); + } + if ( cg_drawSnapshot.integer ) { + y = CG_DrawSnapshot( y ); + } + if ( cg_drawFPS.integer ) { + y = CG_DrawFPS( y ); + } + if ( cg_drawTimer.integer ) { + y = CG_DrawTimer( y ); + } + + y = CG_DrawEnemyInfo ( y ); + + y = CG_DrawMiniScoreboard ( y ); + + CG_DrawPowerupIcons(y); +} + +/* +=================== +CG_DrawReward +=================== +*/ +#ifdef JK2AWARDS +static void CG_DrawReward( void ) { + float *color; + int i, count; + float x, y; + char buf[32]; + + if ( !cg_drawRewards.integer ) { + return; + } + + color = CG_FadeColor( cg.rewardTime, REWARD_TIME ); + if ( !color ) { + if (cg.rewardStack > 0) { + for(i = 0; i < cg.rewardStack; i++) { + cg.rewardSound[i] = cg.rewardSound[i+1]; + cg.rewardShader[i] = cg.rewardShader[i+1]; + cg.rewardCount[i] = cg.rewardCount[i+1]; + } + cg.rewardTime = cg.time; + cg.rewardStack--; + color = CG_FadeColor( cg.rewardTime, REWARD_TIME ); + trap_S_StartLocalSound(cg.rewardSound[0], CHAN_ANNOUNCER); + } else { + return; + } + } + + trap_R_SetColor( color ); + + /* + count = cg.rewardCount[0]/10; // number of big rewards to draw + + if (count) { + y = 4; + x = 320 - count * ICON_SIZE; + for ( i = 0 ; i < count ; i++ ) { + CG_DrawPic( x, y, (ICON_SIZE*2)-4, (ICON_SIZE*2)-4, cg.rewardShader[0] ); + x += (ICON_SIZE*2); + } + } + + count = cg.rewardCount[0] - count*10; // number of small rewards to draw + */ + + if ( cg.rewardCount[0] >= 10 ) { + y = 56; + x = 320 - ICON_SIZE/2; + CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] ); + Com_sprintf(buf, sizeof(buf), "%d", cg.rewardCount[0]); + x = ( SCREEN_WIDTH - SMALLCHAR_WIDTH * CG_DrawStrlen( buf ) ) / 2; + CG_DrawStringExt( x, y+ICON_SIZE, buf, color, qfalse, qtrue, + SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 ); + } + else { + + count = cg.rewardCount[0]; + + y = 56; + x = 320 - count * ICON_SIZE/2; + for ( i = 0 ; i < count ; i++ ) { + CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] ); + x += ICON_SIZE; + } + } + trap_R_SetColor( NULL ); +} +#endif + + +/* +=============================================================================== + +LAGOMETER + +=============================================================================== +*/ + +#define LAG_SAMPLES 128 + + +typedef struct { + int frameSamples[LAG_SAMPLES]; + int frameCount; + int snapshotFlags[LAG_SAMPLES]; + int snapshotSamples[LAG_SAMPLES]; + int snapshotCount; +} lagometer_t; + +lagometer_t lagometer; + +/* +============== +CG_AddLagometerFrameInfo + +Adds the current interpolate / extrapolate bar for this frame +============== +*/ +void CG_AddLagometerFrameInfo( void ) { + int offset; + + offset = cg.time - cg.latestSnapshotTime; + lagometer.frameSamples[ lagometer.frameCount & ( LAG_SAMPLES - 1) ] = offset; + lagometer.frameCount++; +} + +/* +============== +CG_AddLagometerSnapshotInfo + +Each time a snapshot is received, log its ping time and +the number of snapshots that were dropped before it. + +Pass NULL for a dropped packet. +============== +*/ +void CG_AddLagometerSnapshotInfo( snapshot_t *snap ) { + // dropped packet + if ( !snap ) { + lagometer.snapshotSamples[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = -1; + lagometer.snapshotCount++; + return; + } + + // add this snapshot's info + lagometer.snapshotSamples[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = snap->ping; + lagometer.snapshotFlags[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = snap->snapFlags; + lagometer.snapshotCount++; +} + +/* +============== +CG_DrawDisconnect + +Should we draw something differnet for long lag vs no packets? +============== +*/ +static void CG_DrawDisconnect( void ) { + float x, y; + int cmdNum; + usercmd_t cmd; + const char *s; + int w; // bk010215 - FIXME char message[1024]; + + if (cg.mMapChange) + { + s = CG_GetStripEdString("INGAMETEXT", "SERVER_CHANGING_MAPS"); // s = "Server Changing Maps"; + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + CG_DrawBigString( 320 - w/2, 100, s, 1.0F); + + s = CG_GetStripEdString("INGAMETEXT", "PLEASE_WAIT"); // s = "Please wait..."; + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + CG_DrawBigString( 320 - w/2, 200, s, 1.0F); + return; + } + + // draw the phone jack if we are completely past our buffers + cmdNum = trap_GetCurrentCmdNumber() - CMD_BACKUP + 1; + trap_GetUserCmd( cmdNum, &cmd ); + if ( cmd.serverTime <= cg.snap->ps.commandTime + || cmd.serverTime > cg.time ) { // special check for map_restart // bk 0102165 - FIXME + return; + } + + // also add text in center of screen + s = CG_GetStripEdString("INGAMETEXT", "CONNECTION_INTERRUPTED"); // s = "Connection Interrupted"; // bk 010215 - FIXME + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + CG_DrawBigString( 320 - w/2, 100, s, 1.0F); + + // blink the icon + if ( ( cg.time >> 9 ) & 1 ) { + return; + } + + x = 640 - 48; + y = 480 - 48; + + CG_DrawPic( x, y, 48, 48, trap_R_RegisterShader("gfx/2d/net.tga" ) ); +} + + +#define MAX_LAGOMETER_PING 900 +#define MAX_LAGOMETER_RANGE 300 + +/* +============== +CG_DrawLagometer +============== +*/ +static void CG_DrawLagometer( void ) { + int a, x, y, i; + float v; + float ax, ay, aw, ah, mid, range; + int color; + float vscale; + + if ( !cg_lagometer.integer || cgs.localServer ) { + CG_DrawDisconnect(); + return; + } + + // + // draw the graph + // + x = 640 - 48; + y = 480 - 144; + + trap_R_SetColor( NULL ); + CG_DrawPic( x, y, 48, 48, cgs.media.lagometerShader ); + + ax = x; + ay = y; + aw = 48; + ah = 48; + + color = -1; + range = ah / 3; + mid = ay + range; + + vscale = range / MAX_LAGOMETER_RANGE; + + // draw the frame interpoalte / extrapolate graph + for ( a = 0 ; a < aw ; a++ ) { + i = ( lagometer.frameCount - 1 - a ) & (LAG_SAMPLES - 1); + v = lagometer.frameSamples[i]; + v *= vscale; + if ( v > 0 ) { + if ( color != 1 ) { + color = 1; + trap_R_SetColor( g_color_table[ColorIndex(COLOR_YELLOW)] ); + } + if ( v > range ) { + v = range; + } + trap_R_DrawStretchPic ( ax + aw - a, mid - v, 1, v, 0, 0, 0, 0, cgs.media.whiteShader ); + } else if ( v < 0 ) { + if ( color != 2 ) { + color = 2; + trap_R_SetColor( g_color_table[ColorIndex(COLOR_BLUE)] ); + } + v = -v; + if ( v > range ) { + v = range; + } + trap_R_DrawStretchPic( ax + aw - a, mid, 1, v, 0, 0, 0, 0, cgs.media.whiteShader ); + } + } + + // draw the snapshot latency / drop graph + range = ah / 2; + vscale = range / MAX_LAGOMETER_PING; + + for ( a = 0 ; a < aw ; a++ ) { + i = ( lagometer.snapshotCount - 1 - a ) & (LAG_SAMPLES - 1); + v = lagometer.snapshotSamples[i]; + if ( v > 0 ) { + if ( lagometer.snapshotFlags[i] & SNAPFLAG_RATE_DELAYED ) { + if ( color != 5 ) { + color = 5; // YELLOW for rate delay + trap_R_SetColor( g_color_table[ColorIndex(COLOR_YELLOW)] ); + } + } else { + if ( color != 3 ) { + color = 3; + trap_R_SetColor( g_color_table[ColorIndex(COLOR_GREEN)] ); + } + } + v = v * vscale; + if ( v > range ) { + v = range; + } + trap_R_DrawStretchPic( ax + aw - a, ay + ah - v, 1, v, 0, 0, 0, 0, cgs.media.whiteShader ); + } else if ( v < 0 ) { + if ( color != 4 ) { + color = 4; // RED for dropped snapshots + trap_R_SetColor( g_color_table[ColorIndex(COLOR_RED)] ); + } + trap_R_DrawStretchPic( ax + aw - a, ay + ah - range, 1, range, 0, 0, 0, 0, cgs.media.whiteShader ); + } + } + + trap_R_SetColor( NULL ); + + if ( cg_nopredict.integer || cg_synchronousClients.integer ) { + CG_DrawBigString( ax, ay, "snc", 1.0 ); + } + + CG_DrawDisconnect(); +} + + + +/* +=============================================================================== + +CENTER PRINTING + +=============================================================================== +*/ + + +/* +============== +CG_CenterPrint + +Called for important messages that should stay in the center of the screen +for a few moments +============== +*/ +void CG_CenterPrint( const char *str, int y, int charWidth ) { + char *s; + + Q_strncpyz( cg.centerPrint, str, sizeof(cg.centerPrint) ); + + cg.centerPrintTime = cg.time; + cg.centerPrintY = y; + cg.centerPrintCharWidth = charWidth; + + // count the number of lines for centering + cg.centerPrintLines = 1; + s = cg.centerPrint; + while( *s ) { + if (*s == '\n') + cg.centerPrintLines++; + s++; + } +} + + +/* +=================== +CG_DrawCenterString +=================== +*/ +static void CG_DrawCenterString( void ) { + char *start; + int l; + int x, y, w; + int h; + float *color; + const float scale = 1.0; //0.5 + + if ( !cg.centerPrintTime ) { + return; + } + + color = CG_FadeColor( cg.centerPrintTime, 1000 * cg_centertime.value ); + if ( !color ) { + return; + } + + trap_R_SetColor( color ); + + start = cg.centerPrint; + + y = cg.centerPrintY - cg.centerPrintLines * BIGCHAR_HEIGHT / 2; + + while ( 1 ) { + char linebuffer[1024]; + + for ( l = 0; l < 50; l++ ) { + if ( !start[l] || start[l] == '\n' ) { + break; + } + linebuffer[l] = start[l]; + } + linebuffer[l] = 0; + + w = CG_Text_Width(linebuffer, scale, FONT_MEDIUM); + h = CG_Text_Height(linebuffer, scale, FONT_MEDIUM); + x = (SCREEN_WIDTH - w) / 2; + CG_Text_Paint(x, y + h, scale, color, linebuffer, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM); + y += h + 6; + + while ( *start && ( *start != '\n' ) ) { + start++; + } + if ( !*start ) { + break; + } + start++; + } + + trap_R_SetColor( NULL ); +} + + + +/* +================================================================================ + +CROSSHAIR + +================================================================================ +*/ + + +/* +================= +CG_DrawCrosshair +================= +*/ +static void CG_DrawCrosshair( vec3_t worldPoint, int chEntValid ) { + float w, h; + qhandle_t hShader; + float f; + float x, y; + + if ( !cg_drawCrosshair.integer ) + { + return; + } + + if (cg.snap->ps.fallingToDeath) + { + return; + } + + if ( cg.predictedPlayerState.zoomMode != 0 ) + {//not while scoped + return; + } + + if ( cg_crosshairHealth.integer ) + { + vec4_t hcolor; + + CG_ColorForHealth( hcolor ); + trap_R_SetColor( hcolor ); + } + else + { + //set color based on what kind of ent is under crosshair + if ( cg.crosshairClientNum >= ENTITYNUM_WORLD ) + { + trap_R_SetColor( NULL ); + } + else if (chEntValid && (cg_entities[cg.crosshairClientNum].currentState.number < MAX_CLIENTS || cg_entities[cg.crosshairClientNum].currentState.shouldtarget)) + { + vec4_t ecolor = {0,0,0,0}; + centity_t *crossEnt = &cg_entities[cg.crosshairClientNum]; + + if ( crossEnt->currentState.number < MAX_CLIENTS ) + { + if (cgs.gametype >= GT_TEAM && + cgs.clientinfo[crossEnt->currentState.number].team == cgs.clientinfo[cg.snap->ps.clientNum].team ) + { + //Allies are green + ecolor[0] = 0.0;//R + ecolor[1] = 1.0;//G + ecolor[2] = 0.0;//B + } + else + { + //Enemies are red + ecolor[0] = 1.0;//R + ecolor[1] = 0.0;//G + ecolor[2] = 0.0;//B + } + + if (cg.snap->ps.duelInProgress) + { + if (crossEnt->currentState.number != cg.snap->ps.duelIndex) + { //grey out crosshair for everyone but your foe if you're in a duel + ecolor[0] = 0.4; + ecolor[1] = 0.4; + ecolor[2] = 0.4; + } + } + else if (crossEnt->currentState.bolt1) + { //this fellow is in a duel. We just checked if we were in a duel above, so + //this means we aren't and he is. Which of course means our crosshair greys out over him. + ecolor[0] = 0.4; + ecolor[1] = 0.4; + ecolor[2] = 0.4; + } + } + else if (crossEnt->currentState.shouldtarget) + { + //VectorCopy( crossEnt->startRGBA, ecolor ); + if ( !ecolor[0] && !ecolor[1] && !ecolor[2] ) + { + // We really don't want black, so set it to yellow + ecolor[0] = 1.0F;//R + ecolor[1] = 0.8F;//G + ecolor[2] = 0.3F;//B + } + + if (crossEnt->currentState.owner == cg.snap->ps.clientNum || + (cgs.gametype >= GT_TEAM && crossEnt->currentState.teamowner == cgs.clientinfo[cg.snap->ps.clientNum].team)) + { + ecolor[0] = 0.0;//R + ecolor[1] = 1.0;//G + ecolor[2] = 0.0;//B + } + else if (crossEnt->currentState.teamowner == 16 || + (cgs.gametype >= GT_TEAM && crossEnt->currentState.teamowner && crossEnt->currentState.teamowner != cgs.clientinfo[cg.snap->ps.clientNum].team)) + { + ecolor[0] = 1.0;//R + ecolor[1] = 0.0;//G + ecolor[2] = 0.0;//B + } + else if (crossEnt->currentState.eType == ET_GRAPPLE) + { + ecolor[0] = 1.0;//R + ecolor[1] = 0.0;//G + ecolor[2] = 0.0;//B + } + } + + ecolor[3] = 1.0; + + trap_R_SetColor( ecolor ); + } + } + + w = h = cg_crosshairSize.value; + + // pulse the size of the crosshair when picking up items + f = cg.time - cg.itemPickupBlendTime; + if ( f > 0 && f < ITEM_BLOB_TIME ) { + f /= ITEM_BLOB_TIME; + w *= ( 1 + f ); + h *= ( 1 + f ); + } + + if ( worldPoint && VectorLength( worldPoint ) ) + { + if ( !CG_WorldCoordToScreenCoordFloat( worldPoint, &x, &y ) ) + {//off screen, don't draw it + return; + } + x -= 320; + y -= 240; + } + else + { + x = cg_crosshairX.integer; + y = cg_crosshairY.integer; + } + + hShader = cgs.media.crosshairShader[ cg_drawCrosshair.integer % NUM_CROSSHAIRS ]; + + trap_R_DrawStretchPic( x + cg.refdef.x + 0.5 * (640 - w), + y + cg.refdef.y + 0.5 * (480 - h), + w, h, 0, 0, 1, 1, hShader ); +} + +qboolean CG_WorldCoordToScreenCoordFloat(vec3_t worldCoord, float *x, float *y) +{ + int xcenter, ycenter; + vec3_t local, transformed; + vec3_t vfwd; + vec3_t vright; + vec3_t vup; + float xzi; + float yzi; + +// xcenter = cg.refdef.width / 2;//gives screen coords adjusted for resolution +// ycenter = cg.refdef.height / 2;//gives screen coords adjusted for resolution + + //NOTE: did it this way because most draw functions expect virtual 640x480 coords + // and adjust them for current resolution + xcenter = 640 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn + ycenter = 480 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn + + AngleVectors (cg.refdefViewAngles, vfwd, vright, vup); + + VectorSubtract (worldCoord, cg.refdef.vieworg, local); + + transformed[0] = DotProduct(local,vright); + transformed[1] = DotProduct(local,vup); + transformed[2] = DotProduct(local,vfwd); + + // Make sure Z is not negative. + if(transformed[2] < 0.01) + { + return qfalse; + } + + xzi = xcenter / transformed[2] * (90.0/cg.refdef.fov_x); + yzi = ycenter / transformed[2] * (90.0/cg.refdef.fov_y); + + *x = xcenter + xzi * transformed[0]; + *y = ycenter - yzi * transformed[1]; + + return qtrue; +} + +qboolean CG_WorldCoordToScreenCoord( vec3_t worldCoord, int *x, int *y ) +{ + float xF, yF; + qboolean retVal = CG_WorldCoordToScreenCoordFloat( worldCoord, &xF, &yF ); + *x = (int)xF; + *y = (int)yF; + return retVal; +} + +/* +==================== +CG_SaberClashFlare +==================== +*/ +int g_saberFlashTime = 0; +vec3_t g_saberFlashPos = {0, 0, 0}; +void CG_SaberClashFlare( void ) +{ + int t, maxTime = 150; + vec3_t dif; + vec3_t color; + int x,y; + float v, len; + trace_t tr; + + t = cg.time - g_saberFlashTime; + + if ( t <= 0 || t >= maxTime ) + { + return; + } + + // Don't do clashes for things that are behind us + VectorSubtract( g_saberFlashPos, cg.refdef.vieworg, dif ); + + if ( DotProduct( dif, cg.refdef.viewaxis[0] ) < 0.2 ) + { + return; + } + + CG_Trace( &tr, cg.refdef.vieworg, NULL, NULL, g_saberFlashPos, -1, CONTENTS_SOLID ); + + if ( tr.fraction < 1.0f ) + { + return; + } + + len = VectorNormalize( dif ); + + // clamp to a known range + if ( len > 800 ) + { + len = 800; + } + + v = ( 1.0f - ((float)t / maxTime )) * ((1.0f - ( len / 800.0f )) * 2.0f + 0.35f); + + CG_WorldCoordToScreenCoord( g_saberFlashPos, &x, &y ); + + VectorSet( color, 0.8f, 0.8f, 0.8f ); + trap_R_SetColor( color ); + + CG_DrawPic( x - ( v * 300 ), y - ( v * 300 ), + v * 600, v * 600, + trap_R_RegisterShader( "gfx/effects/saberFlare" )); +} + +//-------------------------------------------------------------- +static void CG_DrawHolocronIcons(void) +//-------------------------------------------------------------- +{ + int icon_size = 40; + int i = 0; + int startx = 10; + int starty = 10;//SCREEN_HEIGHT - icon_size*3; + + int endx = icon_size; + int endy = icon_size; + + if (cg.snap->ps.zoomMode) + { //don't display over zoom mask + return; + } + + if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) + { + return; + } + + while (i < NUM_FORCE_POWERS) + { + if (cg.snap->ps.holocronBits & (1 << forcePowerSorted[i])) + { + CG_DrawPic( startx, starty, endx, endy, cgs.media.forcePowerIcons[forcePowerSorted[i]]); + starty += (icon_size+2); //+2 for spacing + if ((starty+icon_size) >= SCREEN_HEIGHT-80) + { + starty = 10;//SCREEN_HEIGHT - icon_size*3; + startx += (icon_size+2); + } + } + + i++; + } +} + +static qboolean CG_IsDurationPower(int power) +{ + if (power == FP_HEAL || + power == FP_SPEED || + power == FP_TELEPATHY || + power == FP_RAGE || + power == FP_PROTECT || + power == FP_ABSORB || + power == FP_SEE) + { + return qtrue; + } + + return qfalse; +} + +//-------------------------------------------------------------- +static void CG_DrawActivePowers(void) +//-------------------------------------------------------------- +{ + int icon_size = 40; + int i = 0; + int startx = icon_size*2+16; + int starty = SCREEN_HEIGHT - icon_size*2; + + int endx = icon_size; + int endy = icon_size; + + if (cg.snap->ps.zoomMode) + { //don't display over zoom mask + return; + } + + if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) + { + return; + } + + while (i < NUM_FORCE_POWERS) + { + if ((cg.snap->ps.fd.forcePowersActive & (1 << forcePowerSorted[i])) && + CG_IsDurationPower(forcePowerSorted[i])) + { + CG_DrawPic( startx, starty, endx, endy, cgs.media.forcePowerIcons[forcePowerSorted[i]]); + startx += (icon_size+2); //+2 for spacing + if ((startx+icon_size) >= SCREEN_WIDTH-80) + { + startx = icon_size*2+16; + starty += (icon_size+2); + } + } + + i++; + } + + //additionally, draw an icon force force rage recovery + if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) + { + CG_DrawPic( startx, starty, endx, endy, cgs.media.rageRecShader); + } +} + +//-------------------------------------------------------------- +static void CG_DrawRocketLocking( int lockEntNum, int lockTime ) +//-------------------------------------------------------------- +{ + int cx, cy; + vec3_t org; + static int oldDif = 0; + centity_t *cent = &cg_entities[lockEntNum]; + vec4_t color={0.0f,0.0f,0.0f,0.0f}; + int dif = ( cg.time - cg.snap->ps.rocketLockTime ) / ( 1200.0f / /*8.0f*/16.0f ); + int i; + + if (!cg.snap->ps.rocketLockTime) + { + return; + } + + if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) + { + return; + } + + //We can't check to see in pmove if players are on the same team, so we resort + //to just not drawing the lock if a teammate is the locked on ent + if (cg.snap->ps.rocketLockIndex >= 0 && + cg.snap->ps.rocketLockIndex < MAX_CLIENTS) + { + if (cgs.clientinfo[cg.snap->ps.rocketLockIndex].team == cgs.clientinfo[cg.snap->ps.clientNum].team) + { + if (cgs.gametype >= GT_TEAM) + { + return; + } + } + } + + if (cg.snap->ps.rocketLockTime != -1) + { + lastvalidlockdif = dif; + } + else + { + dif = lastvalidlockdif; + } + + if ( !cent ) + { + return; + } + + VectorCopy( cent->lerpOrigin, org ); + + if ( CG_WorldCoordToScreenCoord( org, &cx, &cy )) + { + // we care about distance from enemy to eye, so this is good enough + float sz = Distance( cent->lerpOrigin, cg.refdef.vieworg ) / 1024.0f; + + if ( sz > 1.0f ) + { + sz = 1.0f; + } + else if ( sz < 0.0f ) + { + sz = 0.0f; + } + + sz = (1.0f - sz) * (1.0f - sz) * 32 + 6; + + cy += sz * 0.5f; + + if ( dif < 0 ) + { + oldDif = 0; + return; + } + else if ( dif > 8 ) + { + dif = 8; + } + + // do sounds + if ( oldDif != dif ) + { + if ( dif == 8 ) + { + trap_S_StartSound( org, 0, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/rocket/lock.wav" )); + } + else + { + trap_S_StartSound( org, 0, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/rocket/tick.wav" )); + } + } + + oldDif = dif; + + for ( i = 0; i < dif; i++ ) + { + color[0] = 1.0f; + color[1] = 0.0f; + color[2] = 0.0f; + color[3] = 0.1f * i + 0.2f; + + trap_R_SetColor( color ); + + // our slices are offset by about 45 degrees. + CG_DrawRotatePic( cx - sz, cy - sz, sz, sz, i * 45.0f, trap_R_RegisterShaderNoMip( "gfx/2d/wedge" )); + } + + // we are locked and loaded baby + if ( dif == 8 ) + { + color[0] = color[1] = color[2] = sin( cg.time * 0.05f ) * 0.5f + 0.5f; + color[3] = 1.0f; // this art is additive, so the alpha value does nothing + + trap_R_SetColor( color ); + + CG_DrawPic( cx - sz, cy - sz * 2, sz * 2, sz * 2, trap_R_RegisterShaderNoMip( "gfx/2d/lock" )); + } + } +} + +/* +================= +CG_ScanForCrosshairEntity +================= +*/ +static void CG_ScanForCrosshairEntity( void ) { + trace_t trace; + vec3_t start, end; + int content; + + if ( cg_dynamicCrosshair.integer ) + { + vec3_t d_f, d_rt, d_up; + /* + if ( cg.snap->ps.weapon == WP_NONE || + cg.snap->ps.weapon == WP_SABER || + cg.snap->ps.weapon == WP_STUN_BATON) + { + VectorCopy( cg.refdef.vieworg, start ); + AngleVectors( cg.refdefViewAngles, d_f, d_rt, d_up ); + } + else + */ + //For now we still want to draw the crosshair in relation to the player's world coordinates + //even if we have a melee weapon/no weapon. + { + if (cg.snap && cg.snap->ps.weapon == WP_EMPLACED_GUN && cg.snap->ps.emplacedIndex) + { + vec3_t pitchConstraint; + + VectorCopy(cg.refdefViewAngles, pitchConstraint); + + if (cg.renderingThirdPerson) + { + VectorCopy(cg.predictedPlayerState.viewangles, pitchConstraint); + } + else + { + VectorCopy(cg.refdefViewAngles, pitchConstraint); + } + + if (pitchConstraint[PITCH] > 40) + { + pitchConstraint[PITCH] = 40; + } + + AngleVectors( pitchConstraint, d_f, d_rt, d_up ); + } + else + { + vec3_t pitchConstraint; + + if (cg.renderingThirdPerson) + { + VectorCopy(cg.predictedPlayerState.viewangles, pitchConstraint); + } + else + { + VectorCopy(cg.refdefViewAngles, pitchConstraint); + } + + AngleVectors( pitchConstraint, d_f, d_rt, d_up ); + } + CG_CalcMuzzlePoint(cg.snap->ps.clientNum, start); + } + + //FIXME: increase this? Increase when zoom in? + VectorMA( start, 4096, d_f, end );//was 8192 + } + else + { + VectorCopy( cg.refdef.vieworg, start ); + VectorMA( start, 131072, cg.refdef.viewaxis[0], end ); + } + + CG_Trace( &trace, start, vec3_origin, vec3_origin, end, + cg.snap->ps.clientNum, CONTENTS_SOLID|CONTENTS_BODY ); + + if (trace.entityNum < MAX_CLIENTS) + { + if (CG_IsMindTricked(cg_entities[trace.entityNum].currentState.trickedentindex, + cg_entities[trace.entityNum].currentState.trickedentindex2, + cg_entities[trace.entityNum].currentState.trickedentindex3, + cg_entities[trace.entityNum].currentState.trickedentindex4, + cg.snap->ps.clientNum)) + { + if (cg.crosshairClientNum == trace.entityNum) + { + cg.crosshairClientNum = ENTITYNUM_NONE; + cg.crosshairClientTime = 0; + } + + CG_DrawCrosshair(trace.endpos, 0); + + return; //this entity is mind-tricking the current client, so don't render it + } + } + + if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR) + { + if (trace.entityNum < /*MAX_CLIENTS*/ENTITYNUM_WORLD) + { + CG_DrawCrosshair(trace.endpos, 1); + } + else + { + CG_DrawCrosshair(trace.endpos, 0); + } + } + +// if ( trace.entityNum >= MAX_CLIENTS ) { +// return; +// } + + // if the player is in fog, don't show it + content = trap_CM_PointContents( trace.endpos, 0 ); + if ( content & CONTENTS_FOG ) { + return; + } + + if ( trace.entityNum >= MAX_CLIENTS ) { + cg.crosshairClientNum = trace.entityNum; + cg.crosshairClientTime = cg.time; + return; + } + + // update the fade timer + cg.crosshairClientNum = trace.entityNum; + cg.crosshairClientTime = cg.time; +} + + +/* +===================== +CG_DrawCrosshairNames +===================== +*/ +static void CG_DrawCrosshairNames( void ) { + float *color; + vec4_t tcolor; + char *name; + int baseColor; + + if ( !cg_drawCrosshair.integer ) { + return; + } + + // scan the known entities to see if the crosshair is sighted on one + CG_ScanForCrosshairEntity(); + + if ( !cg_drawCrosshairNames.integer ) { + return; + } + //rww - still do the trace, our dynamic crosshair depends on it + + if (cg.crosshairClientNum >= MAX_CLIENTS) + { + return; + } + + // draw the name of the player being looked at + color = CG_FadeColor( cg.crosshairClientTime, 1000 ); + if ( !color ) { + trap_R_SetColor( NULL ); + return; + } + + name = cgs.clientinfo[ cg.crosshairClientNum ].name; + + if (cgs.gametype >= GT_TEAM) + { + if (cgs.clientinfo[cg.crosshairClientNum].team == TEAM_RED) + { + baseColor = CT_RED; + } + else + { + baseColor = CT_BLUE; + } + + /* + //For now instead of team-based we'll make it oriented based on which team we're on + if (cgs.clientinfo[cg.crosshairClientNum].team == cgs.clientinfo[cg.snap->ps.clientNum].team) + { + baseColor = CT_GREEN; + } + else + { + baseColor = CT_RED; + } + */ + } + else + { + //baseColor = CT_WHITE; + baseColor = CT_RED; //just make it red in nonteam modes since everyone is hostile and crosshair will be red on them too + } + + if (cg.snap->ps.duelInProgress) + { + if (cg.crosshairClientNum != cg.snap->ps.duelIndex) + { //grey out crosshair for everyone but your foe if you're in a duel + baseColor = CT_BLACK; + } + } + else if (cg_entities[cg.crosshairClientNum].currentState.bolt1) + { //this fellow is in a duel. We just checked if we were in a duel above, so + //this means we aren't and he is. Which of course means our crosshair greys out over him. + baseColor = CT_BLACK; + } + + tcolor[0] = colorTable[baseColor][0]; + tcolor[1] = colorTable[baseColor][1]; + tcolor[2] = colorTable[baseColor][2]; + tcolor[3] = color[3]*0.5f; + + UI_DrawProportionalString(320, 170, name, UI_CENTER, tcolor); + + trap_R_SetColor( NULL ); +} + + +//============================================================================== + +/* +================= +CG_DrawSpectator +================= +*/ +static void CG_DrawSpectator(void) +{ + const char* s; + s = CG_GetStripEdString("INGAMETEXT", "SPECTATOR"); + if (cgs.gametype == GT_TOURNAMENT && + cgs.duelist1 != -1 && + cgs.duelist2 != -1) + { + char text[1024]; + int size = 64; + + Com_sprintf(text, sizeof(text), "%s %s %s", cgs.clientinfo[cgs.duelist1].name, CG_GetStripEdString("INGAMETEXT", "SPECHUD_VERSUS"), cgs.clientinfo[cgs.duelist2].name); + CG_Text_Paint ( 320 - CG_Text_Width ( text, 1.0f, 3 ) / 2, 420, 1.0f, colorWhite, text, 0, 0, 0, 3 ); + + + trap_R_SetColor( colorTable[CT_WHITE] ); + if ( cgs.clientinfo[cgs.duelist1].modelIcon ) + { + CG_DrawPic( 10, SCREEN_HEIGHT-(size*1.5), size, size, cgs.clientinfo[cgs.duelist1].modelIcon ); + } + if ( cgs.clientinfo[cgs.duelist2].modelIcon ) + { + CG_DrawPic( SCREEN_WIDTH-size-10, SCREEN_HEIGHT-(size*1.5), size, size, cgs.clientinfo[cgs.duelist2].modelIcon ); + } + Com_sprintf(text, sizeof(text), "%i/%i", cgs.clientinfo[cgs.duelist1].score, cgs.fraglimit ); + CG_Text_Paint( 42 - CG_Text_Width( text, 1.0f, 2 ) / 2, SCREEN_HEIGHT-(size*1.5) + 64, 1.0f, colorWhite, text, 0, 0, 0, 2 ); + + Com_sprintf(text, sizeof(text), "%i/%i", cgs.clientinfo[cgs.duelist2].score, cgs.fraglimit ); + CG_Text_Paint( SCREEN_WIDTH-size+22 - CG_Text_Width( text, 1.0f, 2 ) / 2, SCREEN_HEIGHT-(size*1.5) + 64, 1.0f, colorWhite, text, 0, 0, 0, 2 ); + } + else + { + CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, 3 ) / 2, 420, 1.0f, colorWhite, s, 0, 0, 0, 3 ); + } + + if ( cgs.gametype == GT_TOURNAMENT ) + { + s = CG_GetStripEdString("INGAMETEXT", "WAITING_TO_PLAY"); // "waiting to play"; + CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, 3 ) / 2, 440, 1.0f, colorWhite, s, 0, 0, 0, 3 ); + } + else //if ( cgs.gametype >= GT_TEAM ) + { + //s = "press ESC and use the JOIN menu to play"; + s = CG_GetStripEdString("INGAMETEXT", "SPEC_CHOOSEJOIN"); + CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, 3 ) / 2, 440, 1.0f, colorWhite, s, 0, 0, 0, 3 ); + } +} + +/* +================= +CG_DrawVote +================= +*/ +static void CG_DrawVote(void) { + const char *s; + int sec; + char sYes[20]; + char sNo[20]; + + if ( !cgs.voteTime ) { + return; + } + + // play a talk beep whenever it is modified + if ( cgs.voteModified ) { + cgs.voteModified = qfalse; +// trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND ); + } + + sec = ( VOTE_TIME - ( cg.time - cgs.voteTime ) ) / 1000; + if ( sec < 0 ) { + sec = 0; + } + + trap_SP_GetStringTextString("MENUS0_YES", sYes, sizeof(sYes) ); + trap_SP_GetStringTextString("MENUS0_NO", sNo, sizeof(sNo) ); + + s = va("VOTE(%i):%s %s:%i %s:%i", sec, cgs.voteString, sYes, cgs.voteYes, sNo, cgs.voteNo); + CG_DrawSmallString( 4, 58, s, 1.0F ); + s = CG_GetStripEdString("INGAMETEXT", "OR_PRESS_ESC_THEN_CLICK_VOTE"); // s = "or press ESC then click Vote"; + CG_DrawSmallString( 4, 58 + SMALLCHAR_HEIGHT + 2, s, 1.0F ); +} + +/* +================= +CG_DrawTeamVote +================= +*/ +static void CG_DrawTeamVote(void) { + char *s; + int sec, cs_offset; + + if ( cgs.clientinfo->team == TEAM_RED ) + cs_offset = 0; + else if ( cgs.clientinfo->team == TEAM_BLUE ) + cs_offset = 1; + else + return; + + if ( !cgs.teamVoteTime[cs_offset] ) { + return; + } + + // play a talk beep whenever it is modified + if ( cgs.teamVoteModified[cs_offset] ) { + cgs.teamVoteModified[cs_offset] = qfalse; +// trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND ); + } + + sec = ( VOTE_TIME - ( cg.time - cgs.teamVoteTime[cs_offset] ) ) / 1000; + if ( sec < 0 ) { + sec = 0; + } + if (strstr(cgs.teamVoteString[cs_offset], "leader")) + { + int i = 0; + + while (cgs.teamVoteString[cs_offset][i] && cgs.teamVoteString[cs_offset][i] != ' ') + { + i++; + } + + if (cgs.teamVoteString[cs_offset][i] == ' ') + { + int voteIndex = 0; + char voteIndexStr[256]; + + i++; + + while (cgs.teamVoteString[cs_offset][i]) + { + voteIndexStr[voteIndex] = cgs.teamVoteString[cs_offset][i]; + voteIndex++; + i++; + } + voteIndexStr[voteIndex] = 0; + + voteIndex = atoi(voteIndexStr); + + s = va("TEAMVOTE(%i):(Make %s the new team leader) yes:%i no:%i", sec, cgs.clientinfo[voteIndex].name, + cgs.teamVoteYes[cs_offset], cgs.teamVoteNo[cs_offset] ); + } + else + { + s = va("TEAMVOTE(%i):%s yes:%i no:%i", sec, cgs.teamVoteString[cs_offset], + cgs.teamVoteYes[cs_offset], cgs.teamVoteNo[cs_offset] ); + } + } + else + { + s = va("TEAMVOTE(%i):%s yes:%i no:%i", sec, cgs.teamVoteString[cs_offset], + cgs.teamVoteYes[cs_offset], cgs.teamVoteNo[cs_offset] ); + } + CG_DrawSmallString( 4, 90, s, 1.0F ); +} + +static qboolean CG_DrawScoreboard() { + return CG_DrawOldScoreboard(); +#if 0 + static qboolean firstTime = qtrue; + float fade, *fadeColor; + + if (menuScoreboard) { + menuScoreboard->window.flags &= ~WINDOW_FORCED; + } + if (cg_paused.integer) { + cg.deferredPlayerLoading = 0; + firstTime = qtrue; + return qfalse; + } + + // should never happen in Team Arena + if (cgs.gametype == GT_SINGLE_PLAYER && cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { + cg.deferredPlayerLoading = 0; + firstTime = qtrue; + return qfalse; + } + + // don't draw scoreboard during death while warmup up + if ( cg.warmup && !cg.showScores ) { + return qfalse; + } + + if ( cg.showScores || cg.predictedPlayerState.pm_type == PM_DEAD || cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { + fade = 1.0; + fadeColor = colorWhite; + } else { + fadeColor = CG_FadeColor( cg.scoreFadeTime, FADE_TIME ); + if ( !fadeColor ) { + // next time scoreboard comes up, don't print killer + cg.deferredPlayerLoading = 0; + cg.killerName[0] = 0; + firstTime = qtrue; + return qfalse; + } + fade = *fadeColor; + } + + + if (menuScoreboard == NULL) { + if ( cgs.gametype >= GT_TEAM ) { + menuScoreboard = Menus_FindByName("teamscore_menu"); + } else { + menuScoreboard = Menus_FindByName("score_menu"); + } + } + + if (menuScoreboard) { + if (firstTime) { + CG_SetScoreSelection(menuScoreboard); + firstTime = qfalse; + } + Menu_Paint(menuScoreboard, qtrue); + } + + // load any models that have been deferred + if ( ++cg.deferredPlayerLoading > 10 ) { + CG_LoadDeferredPlayers(); + } + + return qtrue; +#endif +} + +/* +================= +CG_DrawIntermission +================= +*/ +static void CG_DrawIntermission( void ) { +// int key; + //if (cg_singlePlayer.integer) { + // CG_DrawCenterString(); + // return; + //} + cg.scoreFadeTime = cg.time; + cg.scoreBoardShowing = CG_DrawScoreboard(); +} + +/* +================= +CG_DrawFollow +================= +*/ +static qboolean CG_DrawFollow( void ) +{ + const char *s; + + if ( !(cg.snap->ps.pm_flags & PMF_FOLLOW) ) + { + return qfalse; + } + +// s = "following"; + s = CG_GetStripEdString("INGAMETEXT", "FOLLOWING"); + CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, 60, 1.0f, colorWhite, s, 0, 0, 0, FONT_MEDIUM ); + + s = cgs.clientinfo[ cg.snap->ps.clientNum ].name; + CG_Text_Paint ( 320 - CG_Text_Width ( s, 2.0f, FONT_MEDIUM ) / 2, 80, 2.0f, colorWhite, s, 0, 0, 0, FONT_MEDIUM ); + + return qtrue; +} + +#if 0 +static void CG_DrawTemporaryStats() +{ //placeholder for testing (draws ammo and force power) + char s[512]; + + if (!cg.snap) + { + return; + } + + sprintf(s, "Force: %i", cg.snap->ps.fd.forcePower); + + CG_DrawBigString(SCREEN_WIDTH-164, SCREEN_HEIGHT-128, s, 1.0f); + + sprintf(s, "Ammo: %i", cg.snap->ps.ammo[weaponData[cg.snap->ps.weapon].ammoIndex]); + + CG_DrawBigString(SCREEN_WIDTH-164, SCREEN_HEIGHT-112, s, 1.0f); + + sprintf(s, "Health: %i", cg.snap->ps.stats[STAT_HEALTH]); + + CG_DrawBigString(8, SCREEN_HEIGHT-128, s, 1.0f); + + sprintf(s, "Armor: %i", cg.snap->ps.stats[STAT_ARMOR]); + + CG_DrawBigString(8, SCREEN_HEIGHT-112, s, 1.0f); +} +#endif + +/* +================= +CG_DrawAmmoWarning +================= +*/ +static void CG_DrawAmmoWarning( void ) { +#if 0 + const char *s; + int w; + + if (!cg_drawStatus.integer) + { + return; + } + + if ( cg_drawAmmoWarning.integer == 0 ) { + return; + } + + if ( !cg.lowAmmoWarning ) { + return; + } + + if ( cg.lowAmmoWarning == 2 ) { + s = "OUT OF AMMO"; + } else { + s = "LOW AMMO WARNING"; + } + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + CG_DrawBigString(320 - w / 2, 64, s, 1.0F); +#endif +} + + + +/* +================= +CG_DrawWarmup +================= +*/ +static void CG_DrawWarmup( void ) { + int w; + int sec; + int i; + float scale; + clientInfo_t *ci1, *ci2; + int cw; + const char *s; + + sec = cg.warmup; + if ( !sec ) { + return; + } + + if ( sec < 0 ) { +// s = "Waiting for players"; + s = CG_GetStripEdString("INGAMETEXT", "WAITING_FOR_PLAYERS"); + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + CG_DrawBigString(320 - w / 2, 24, s, 1.0F); + cg.warmupCount = 0; + return; + } + + if (cgs.gametype == GT_TOURNAMENT) { + // find the two active players + ci1 = NULL; + ci2 = NULL; + for ( i = 0 ; i < cgs.maxclients ; i++ ) { + if ( cgs.clientinfo[i].infoValid && cgs.clientinfo[i].team == TEAM_FREE ) { + if ( !ci1 ) { + ci1 = &cgs.clientinfo[i]; + } else { + ci2 = &cgs.clientinfo[i]; + } + } + } + + if ( ci1 && ci2 ) { + s = va( "%s vs %s", ci1->name, ci2->name ); + w = CG_Text_Width(s, 0.6f, FONT_MEDIUM); + CG_Text_Paint(320 - w / 2, 60, 0.6f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE,FONT_MEDIUM); + } + } else { + if ( cgs.gametype == GT_FFA ) { + s = "Free For All"; + } else if ( cgs.gametype == GT_HOLOCRON ) { + s = "Holocron FFA"; + } else if ( cgs.gametype == GT_JEDIMASTER ) { + s = "Jedi Master"; + } else if ( cgs.gametype == GT_TEAM ) { + s = "Team FFA"; + } else if ( cgs.gametype == GT_SAGA ) { + s = "N/A"; + } else if ( cgs.gametype == GT_CTF ) { + s = "Capture the Flag"; + } else if ( cgs.gametype == GT_CTY ) { + s = "Capture the Ysalamiri"; + } else { + s = ""; + } + w = CG_Text_Width(s, 1.5f, FONT_MEDIUM); + CG_Text_Paint(320 - w / 2, 90, 1.5f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE,FONT_MEDIUM); + } + + sec = ( sec - cg.time ) / 1000; + if ( sec < 0 ) { + cg.warmup = 0; + sec = 0; + } +// s = va( "Starts in: %i", sec + 1 ); + s = va( "%s: %i",CG_GetStripEdString("INGAMETEXT", "STARTS_IN"), sec + 1 ); + if ( sec != cg.warmupCount ) { + cg.warmupCount = sec; + switch ( sec ) { + case 0: + trap_S_StartLocalSound( cgs.media.count1Sound, CHAN_ANNOUNCER ); + break; + case 1: + trap_S_StartLocalSound( cgs.media.count2Sound, CHAN_ANNOUNCER ); + break; + case 2: + trap_S_StartLocalSound( cgs.media.count3Sound, CHAN_ANNOUNCER ); + break; + default: + break; + } + } + scale = 0.45f; + switch ( cg.warmupCount ) { + case 0: + cw = 28; + scale = 1.25f; + break; + case 1: + cw = 24; + scale = 1.15f; + break; + case 2: + cw = 20; + scale = 1.05f; + break; + default: + cw = 16; + scale = 0.9f; + break; + } + + w = CG_Text_Width(s, scale, FONT_MEDIUM); + CG_Text_Paint(320 - w / 2, 125, scale, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM); +} + +//================================================================================== +/* +================= +CG_DrawTimedMenus +================= +*/ +void CG_DrawTimedMenus() { + if (cg.voiceTime) { + int t = cg.time - cg.voiceTime; + if ( t > 2500 ) { + Menus_CloseByName("voiceMenu"); + trap_Cvar_Set("cl_conXOffset", "0"); + cg.voiceTime = 0; + } + } +} + +void CG_DrawFlagStatus() +{ + int myFlagTakenShader = 0; + int theirFlagShader = 0; + int team = 0; + int startDrawPos = 2; + int ico_size = 32; + + if (!cg.snap) + { + return; + } + + if (cgs.gametype != GT_CTF && cgs.gametype != GT_CTY) + { + return; + } + + team = cg.snap->ps.persistant[PERS_TEAM]; + + if (cgs.gametype == GT_CTY) + { + if (team == TEAM_RED) + { + myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_x" ); + theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_ys" ); + } + else + { + myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_x" ); + theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_ys" ); + } + } + else + { + if (team == TEAM_RED) + { + myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_x" ); + theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag" ); + } + else + { + myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_x" ); + theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag" ); + } + } + + if (CG_YourTeamHasFlag()) + { + CG_DrawPic( startDrawPos, 365, ico_size, ico_size, theirFlagShader ); + startDrawPos += ico_size+2; + } + + if (CG_OtherTeamHasFlag()) + { + CG_DrawPic( startDrawPos, 365, ico_size, ico_size, myFlagTakenShader ); + } +} + +int cgRageTime = 0; +int cgRageFadeTime = 0; +float cgRageFadeVal = 0; + +int cgRageRecTime = 0; +int cgRageRecFadeTime = 0; +float cgRageRecFadeVal = 0; + +int cgAbsorbTime = 0; +int cgAbsorbFadeTime = 0; +float cgAbsorbFadeVal = 0; + +int cgProtectTime = 0; +int cgProtectFadeTime = 0; +float cgProtectFadeVal = 0; + +int cgYsalTime = 0; +int cgYsalFadeTime = 0; +float cgYsalFadeVal = 0; + +qboolean gCGHasFallVector = qfalse; +vec3_t gCGFallVector; + +/* +================= +CG_Draw2D +================= +*/ +static void CG_Draw2D( void ) { + float inTime = cg.invenSelectTime+WEAPON_SELECT_TIME; + float wpTime = cg.weaponSelectTime+WEAPON_SELECT_TIME; + float bestTime; + int drawSelect = 0; + float fallTime, rageTime, rageRecTime, absorbTime, protectTime, ysalTime; + vec4_t hcolor; + + if (cgs.orderPending && cg.time > cgs.orderTime) { + CG_CheckOrderPending(); + } + // if we are taking a levelshot for the menu, don't draw anything + if ( cg.levelShot ) { + return; + } + + if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) + { + cgRageTime = 0; + cgRageFadeTime = 0; + cgRageFadeVal = 0; + + cgRageRecTime = 0; + cgRageRecFadeTime = 0; + cgRageRecFadeVal = 0; + + cgAbsorbTime = 0; + cgAbsorbFadeTime = 0; + cgAbsorbFadeVal = 0; + + cgProtectTime = 0; + cgProtectFadeTime = 0; + cgProtectFadeVal = 0; + + cgYsalTime = 0; + cgYsalFadeTime = 0; + cgYsalFadeVal = 0; + } + + if ( cg_draw2D.integer == 0 ) { + return; + } + + if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { + CG_DrawIntermission(); + return; + } + + if (cgs.clientinfo[cg.snap->ps.clientNum].team != TEAM_SPECTATOR) + { + if (cg.snap->ps.fd.forcePowersActive & (1 << FP_RAGE)) + { + if (!cgRageTime) + { + cgRageTime = cg.time; + } + + rageTime = (float)(cg.time - cgRageTime); + + rageTime /= 9000; + + if (rageTime < 0) + { + rageTime = 0; + } + if (rageTime > 0.15) + { + rageTime = 0.15; + } + + hcolor[3] = rageTime; + hcolor[0] = 0.7; + hcolor[1] = 0; + hcolor[2] = 0; + + if (!cg.renderingThirdPerson) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + + cgRageFadeTime = 0; + cgRageFadeVal = 0; + } + else if (cgRageTime) + { + if (!cgRageFadeTime) + { + cgRageFadeTime = cg.time; + cgRageFadeVal = 0.15; + } + + rageTime = cgRageFadeVal; + + cgRageFadeVal -= (cg.time - cgRageFadeTime)*0.000005; + + if (rageTime < 0) + { + rageTime = 0; + } + if (rageTime > 0.15) + { + rageTime = 0.15; + } + + if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) + { + float checkRageRecTime = rageTime; + + if (checkRageRecTime < 0.15) + { + checkRageRecTime = 0.15; + } + + hcolor[3] = checkRageRecTime; + hcolor[0] = rageTime*4; + if (hcolor[0] < 0.2) + { + hcolor[0] = 0.2; + } + hcolor[1] = 0.2; + hcolor[2] = 0.2; + } + else + { + hcolor[3] = rageTime; + hcolor[0] = 0.7; + hcolor[1] = 0; + hcolor[2] = 0; + } + + if (!cg.renderingThirdPerson && rageTime) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + else + { + if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) + { + hcolor[3] = 0.15; + hcolor[0] = 0.2; + hcolor[1] = 0.2; + hcolor[2] = 0.2; + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + cgRageTime = 0; + } + } + else if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) + { + if (!cgRageRecTime) + { + cgRageRecTime = cg.time; + } + + rageRecTime = (float)(cg.time - cgRageRecTime); + + rageRecTime /= 9000; + + if (rageRecTime < 0.15)//0) + { + rageRecTime = 0.15;//0; + } + if (rageRecTime > 0.15) + { + rageRecTime = 0.15; + } + + hcolor[3] = rageRecTime; + hcolor[0] = 0.2; + hcolor[1] = 0.2; + hcolor[2] = 0.2; + + if (!cg.renderingThirdPerson) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + + cgRageRecFadeTime = 0; + cgRageRecFadeVal = 0; + } + else if (cgRageRecTime) + { + if (!cgRageRecFadeTime) + { + cgRageRecFadeTime = cg.time; + cgRageRecFadeVal = 0.15; + } + + rageRecTime = cgRageRecFadeVal; + + cgRageRecFadeVal -= (cg.time - cgRageRecFadeTime)*0.000005; + + if (rageRecTime < 0) + { + rageRecTime = 0; + } + if (rageRecTime > 0.15) + { + rageRecTime = 0.15; + } + + hcolor[3] = rageRecTime; + hcolor[0] = 0.2; + hcolor[1] = 0.2; + hcolor[2] = 0.2; + + if (!cg.renderingThirdPerson && rageRecTime) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + else + { + cgRageRecTime = 0; + } + } + + if (cg.snap->ps.fd.forcePowersActive & (1 << FP_ABSORB)) + { + if (!cgAbsorbTime) + { + cgAbsorbTime = cg.time; + } + + absorbTime = (float)(cg.time - cgAbsorbTime); + + absorbTime /= 9000; + + if (absorbTime < 0) + { + absorbTime = 0; + } + if (absorbTime > 0.15) + { + absorbTime = 0.15; + } + + hcolor[3] = absorbTime/2; + hcolor[0] = 0; + hcolor[1] = 0; + hcolor[2] = 0.7; + + if (!cg.renderingThirdPerson) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + + cgAbsorbFadeTime = 0; + cgAbsorbFadeVal = 0; + } + else if (cgAbsorbTime) + { + if (!cgAbsorbFadeTime) + { + cgAbsorbFadeTime = cg.time; + cgAbsorbFadeVal = 0.15; + } + + absorbTime = cgAbsorbFadeVal; + + cgAbsorbFadeVal -= (cg.time - cgAbsorbFadeTime)*0.000005; + + if (absorbTime < 0) + { + absorbTime = 0; + } + if (absorbTime > 0.15) + { + absorbTime = 0.15; + } + + hcolor[3] = absorbTime/2; + hcolor[0] = 0; + hcolor[1] = 0; + hcolor[2] = 0.7; + + if (!cg.renderingThirdPerson && absorbTime) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + else + { + cgAbsorbTime = 0; + } + } + + if (cg.snap->ps.fd.forcePowersActive & (1 << FP_PROTECT)) + { + if (!cgProtectTime) + { + cgProtectTime = cg.time; + } + + protectTime = (float)(cg.time - cgProtectTime); + + protectTime /= 9000; + + if (protectTime < 0) + { + protectTime = 0; + } + if (protectTime > 0.15) + { + protectTime = 0.15; + } + + hcolor[3] = protectTime/2; + hcolor[0] = 0; + hcolor[1] = 0.7; + hcolor[2] = 0; + + if (!cg.renderingThirdPerson) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + + cgProtectFadeTime = 0; + cgProtectFadeVal = 0; + } + else if (cgProtectTime) + { + if (!cgProtectFadeTime) + { + cgProtectFadeTime = cg.time; + cgProtectFadeVal = 0.15; + } + + protectTime = cgProtectFadeVal; + + cgProtectFadeVal -= (cg.time - cgProtectFadeTime)*0.000005; + + if (protectTime < 0) + { + protectTime = 0; + } + if (protectTime > 0.15) + { + protectTime = 0.15; + } + + hcolor[3] = protectTime/2; + hcolor[0] = 0; + hcolor[1] = 0.7; + hcolor[2] = 0; + + if (!cg.renderingThirdPerson && protectTime) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + else + { + cgProtectTime = 0; + } + } + + if (cg.snap->ps.rocketLockIndex != MAX_CLIENTS && (cg.time - cg.snap->ps.rocketLockTime) > 0) + { + CG_DrawRocketLocking( cg.snap->ps.rocketLockIndex, cg.snap->ps.rocketLockTime ); + } + + if (BG_HasYsalamiri(cgs.gametype, &cg.snap->ps)) + { + if (!cgYsalTime) + { + cgYsalTime = cg.time; + } + + ysalTime = (float)(cg.time - cgYsalTime); + + ysalTime /= 9000; + + if (ysalTime < 0) + { + ysalTime = 0; + } + if (ysalTime > 0.15) + { + ysalTime = 0.15; + } + + hcolor[3] = ysalTime/2; + hcolor[0] = 0.7; + hcolor[1] = 0.7; + hcolor[2] = 0; + + if (!cg.renderingThirdPerson) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + + cgYsalFadeTime = 0; + cgYsalFadeVal = 0; + } + else if (cgYsalTime) + { + if (!cgYsalFadeTime) + { + cgYsalFadeTime = cg.time; + cgYsalFadeVal = 0.15; + } + + ysalTime = cgYsalFadeVal; + + cgYsalFadeVal -= (cg.time - cgYsalFadeTime)*0.000005; + + if (ysalTime < 0) + { + ysalTime = 0; + } + if (ysalTime > 0.15) + { + ysalTime = 0.15; + } + + hcolor[3] = ysalTime/2; + hcolor[0] = 0.7; + hcolor[1] = 0.7; + hcolor[2] = 0; + + if (!cg.renderingThirdPerson && ysalTime) + { + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + } + else + { + cgYsalTime = 0; + } + } + } + + if (cg.snap->ps.rocketLockIndex != MAX_CLIENTS && (cg.time - cg.snap->ps.rocketLockTime) > 0) + { + CG_DrawRocketLocking( cg.snap->ps.rocketLockIndex, cg.snap->ps.rocketLockTime ); + } + + if (cg.snap->ps.holocronBits) + { + CG_DrawHolocronIcons(); + } + if (cg.snap->ps.fd.forcePowersActive || cg.snap->ps.fd.forceRageRecoveryTime > cg.time) + { + CG_DrawActivePowers(); + } + + // Draw this before the text so that any text won't get clipped off + CG_DrawZoomMask(); + +/* + if (cg.cameraMode) { + return; + } +*/ + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ) { + CG_DrawSpectator(); + CG_DrawCrosshair(NULL, 0); + CG_DrawCrosshairNames(); + CG_SaberClashFlare(); + } else { + // don't draw any status if dead or the scoreboard is being explicitly shown + if ( !cg.showScores && cg.snap->ps.stats[STAT_HEALTH] > 0 ) { + + if ( /*cg_drawStatus.integer*/0 ) { + //Reenable if stats are drawn with menu system again + Menu_PaintAll(); + CG_DrawTimedMenus(); + } + + //CG_DrawTemporaryStats(); + + CG_DrawAmmoWarning(); + + CG_DrawCrosshairNames(); + + if (cg_drawStatus.integer) + { + CG_DrawIconBackground(); + } + + if (inTime > wpTime) + { + drawSelect = 1; + bestTime = cg.invenSelectTime; + } + else //only draw the most recent since they're drawn in the same place + { + drawSelect = 2; + bestTime = cg.weaponSelectTime; + } + + if (cg.forceSelectTime > bestTime) + { + drawSelect = 3; + } + + switch(drawSelect) + { + case 1: + CG_DrawInvenSelect(); + break; + case 2: + CG_DrawWeaponSelect(); + break; + case 3: + CG_DrawForceSelect(); + break; + default: + break; + } + + if (cg_drawStatus.integer) + { + //Powerups now done with upperright stuff + //CG_DrawPowerupIcons(); + + CG_DrawFlagStatus(); + } + + CG_SaberClashFlare(); + + if (cg_drawStatus.integer) + { + CG_DrawStats(); + } + + //Do we want to use this system again at some point? + //CG_DrawReward(); + } + + } + + if (cg.snap->ps.fallingToDeath) + { + fallTime = (float)(cg.time - cg.snap->ps.fallingToDeath); + + fallTime /= (FALL_FADE_TIME/2); + + if (fallTime < 0) + { + fallTime = 0; + } + if (fallTime > 1) + { + fallTime = 1; + } + + hcolor[3] = fallTime; + hcolor[0] = 0; + hcolor[1] = 0; + hcolor[2] = 0; + + CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); + + if (!gCGHasFallVector) + { + VectorCopy(cg.snap->ps.origin, gCGFallVector); + gCGHasFallVector = qtrue; + } + } + else + { + if (gCGHasFallVector) + { + gCGHasFallVector = qfalse; + VectorClear(gCGFallVector); + } + } + + CG_DrawVote(); + CG_DrawTeamVote(); + + CG_DrawLagometer(); + + if (!cg_paused.integer) { + CG_DrawUpperRight(); + } + + if ( !CG_DrawFollow() ) { + CG_DrawWarmup(); + } + + // don't draw center string if scoreboard is up + cg.scoreBoardShowing = CG_DrawScoreboard(); + if ( !cg.scoreBoardShowing) { + CG_DrawCenterString(); + } +} + + +static void CG_DrawTourneyScoreboard() { +} + +/* +===================== +CG_DrawActive + +Perform all drawing needed to completely fill the screen +===================== +*/ +void CG_DrawActive( stereoFrame_t stereoView ) { + float separation; + vec3_t baseOrg; + + // optionally draw the info screen instead + if ( !cg.snap ) { + CG_DrawInformation(); + return; + } + + // optionally draw the tournement scoreboard instead + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR && + ( cg.snap->ps.pm_flags & PMF_SCOREBOARD ) ) { + CG_DrawTourneyScoreboard(); + return; + } + + switch ( stereoView ) { + case STEREO_CENTER: + separation = 0; + break; + case STEREO_LEFT: + separation = -cg_stereoSeparation.value / 2; + break; + case STEREO_RIGHT: + separation = cg_stereoSeparation.value / 2; + break; + default: + separation = 0; + CG_Error( "CG_DrawActive: Undefined stereoView" ); + } + + + // clear around the rendered view if sized down + CG_TileClear(); + + // offset vieworg appropriately if we're doing stereo separation + VectorCopy( cg.refdef.vieworg, baseOrg ); + if ( separation != 0 ) { + VectorMA( cg.refdef.vieworg, -separation, cg.refdef.viewaxis[1], cg.refdef.vieworg ); + } + + // draw 3D view + trap_R_RenderScene( &cg.refdef ); + + // restore original viewpoint if running stereo + if ( separation != 0 ) { + VectorCopy( baseOrg, cg.refdef.vieworg ); + } + + // draw status bar and other floating elements + CG_Draw2D(); +} + + + diff --git a/code/cgame/cg_drawtools (2).c b/code/cgame/cg_drawtools (2).c new file mode 100644 index 0000000..cafe5a4 --- /dev/null +++ b/code/cgame/cg_drawtools (2).c @@ -0,0 +1,690 @@ +/* +// this line must stay at top so the whole PCH thing works... +#include "cg_headers.h" + +//#include "cg_local.h" +#include "cg_media.h" +#include "cg_text.h" +*/ + +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_drawtools.c -- helper functions called by cg_draw, cg_scoreboard, cg_info, etc +#include "cg_local.h" +#include "../game/q_shared.h" + + +/* +================ +UI_DrawRect + +Coordinates are 640*480 virtual values +================= +*/ +void CG_DrawRect( float x, float y, float width, float height, float size, const float *color ) { + trap_R_SetColor( color ); + + CG_DrawTopBottom(x, y, width, height, size); + CG_DrawSides(x, y, width, height, size); + + trap_R_SetColor( NULL ); +} + + + +/* +================= +CG_GetColorForHealth +================= +*/ +void CG_GetColorForHealth( int health, int armor, vec4_t hcolor ) { + int count; + int max; + + // calculate the total points of damage that can + // be sustained at the current health / armor level + if ( health <= 0 ) { + VectorClear( hcolor ); // black + hcolor[3] = 1; + return; + } + count = armor; + max = health * ARMOR_PROTECTION / ( 1.0 - ARMOR_PROTECTION ); + if ( max < count ) { + count = max; + } + health += count; + + // set the color based on health + hcolor[0] = 1.0; + hcolor[3] = 1.0; + if ( health >= 100 ) { + hcolor[2] = 1.0; + } else if ( health < 66 ) { + hcolor[2] = 0; + } else { + hcolor[2] = ( health - 66 ) / 33.0; + } + + if ( health > 60 ) { + hcolor[1] = 1.0; + } else if ( health < 30 ) { + hcolor[1] = 0; + } else { + hcolor[1] = ( health - 30 ) / 30.0; + } +} + +/* +================ +CG_DrawSides + +Coords are virtual 640x480 +================ +*/ +void CG_DrawSides(float x, float y, float w, float h, float size) { + size *= cgs.screenXScale; + trap_R_DrawStretchPic( x, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader ); + trap_R_DrawStretchPic( x + w - size, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader ); +} + +void CG_DrawTopBottom(float x, float y, float w, float h, float size) { + size *= cgs.screenYScale; + trap_R_DrawStretchPic( x, y, w, size, 0, 0, 0, 0, cgs.media.whiteShader ); + trap_R_DrawStretchPic( x, y + h - size, w, size, 0, 0, 0, 0, cgs.media.whiteShader ); +} + +/* +------------------------- +CGC_FillRect2 +real coords +------------------------- +*/ +void CG_FillRect2( float x, float y, float width, float height, const float *color ) { + trap_R_SetColor( color ); + trap_R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, cgs.media.whiteShader); + trap_R_SetColor( NULL ); +} + +/* +================ +CG_FillRect + +Coordinates are 640*480 virtual values +================= +*/ +void CG_FillRect( float x, float y, float width, float height, const float *color ) { + trap_R_SetColor( color ); + + trap_R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, cgs.media.whiteShader); + + trap_R_SetColor( NULL ); +} + + +/* +================ +CG_DrawPic + +Coordinates are 640*480 virtual values +A width of 0 will draw with the original image width +================= +*/ +void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader ) { + trap_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader ); +} + +/* +================ +CG_DrawRotatePic + +Coordinates are 640*480 virtual values +A width of 0 will draw with the original image width +rotates around the upper right corner of the passed in point +================= +*/ +void CG_DrawRotatePic( float x, float y, float width, float height,float angle, qhandle_t hShader ) { + trap_R_DrawRotatePic( x, y, width, height, 0, 0, 1, 1, angle, hShader ); +} + +/* +================ +CG_DrawRotatePic2 + +Coordinates are 640*480 virtual values +A width of 0 will draw with the original image width +Actually rotates around the center point of the passed in coordinates +================= +*/ +void CG_DrawRotatePic2( float x, float y, float width, float height,float angle, qhandle_t hShader ) { + trap_R_DrawRotatePic2( x, y, width, height, 0, 0, 1, 1, angle, hShader ); +} + +/* +=============== +CG_DrawChar + +Coordinates and size in 640*480 virtual screen size +=============== +*/ +void CG_DrawChar( int x, int y, int width, int height, int ch ) { + int row, col; + float frow, fcol; + float size; + float ax, ay, aw, ah; + float size2; + + ch &= 255; + + if ( ch == ' ' ) { + return; + } + + ax = x; + ay = y; + aw = width; + ah = height; + + row = ch>>4; + col = ch&15; + + frow = row*0.0625; + fcol = col*0.0625; + size = 0.03125; + size2 = 0.0625; + + trap_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol + size, frow + size2, + cgs.media.charsetShader ); + +} + +/* +================== +CG_DrawStringExt + +Draws a multi-colored string with a drop shadow, optionally forcing +to a fixed color. + +Coordinates are at 640 by 480 virtual resolution +================== +*/ +#include "../../ui/menudef.h" // for "ITEM_TEXTSTYLE_SHADOWED" +void CG_DrawStringExt( int x, int y, const char *string, const float *setColor, + qboolean forceColor, qboolean shadow, int charWidth, int charHeight, int maxChars ) +{ + if (trap_Language_IsAsian()) + { + // hack-a-doodle-do (post-release quick fix code)... + // + vec4_t color; + memcpy(color,setColor, sizeof(color)); // de-const it + CG_Text_Paint(x, y, 1.0f, // float scale, + color, // vec4_t color, + string, // const char *text, + 0.0f, // float adjust, + 0, // int limit, + shadow ? ITEM_TEXTSTYLE_SHADOWED : 0, // int style, + FONT_MEDIUM // iMenuFont + ) ; + } + else + { + vec4_t color; + const char *s; + int xx; + + // draw the drop shadow + if (shadow) { + color[0] = color[1] = color[2] = 0; + color[3] = setColor[3]; + trap_R_SetColor( color ); + s = string; + xx = x; + while ( *s ) { + if ( Q_IsColorString( s ) ) { + s += 2; + continue; + } + CG_DrawChar( xx + 2, y + 2, charWidth, charHeight, *s ); + xx += charWidth; + s++; + } + } + + // draw the colored text + s = string; + xx = x; + trap_R_SetColor( setColor ); + while ( *s ) { + if ( Q_IsColorString( s ) ) { + if ( !forceColor ) { + memcpy( color, g_color_table[ColorIndex(*(s+1))], sizeof( color ) ); + color[3] = setColor[3]; + trap_R_SetColor( color ); + } + s += 2; + continue; + } + CG_DrawChar( xx, y, charWidth, charHeight, *s ); + xx += charWidth; + s++; + } + trap_R_SetColor( NULL ); + } +} + +void CG_DrawBigString( int x, int y, const char *s, float alpha ) { + float color[4]; + + color[0] = color[1] = color[2] = 1.0; + color[3] = alpha; + CG_DrawStringExt( x, y, s, color, qfalse, qtrue, BIGCHAR_WIDTH, BIGCHAR_HEIGHT, 0 ); +} + +void CG_DrawBigStringColor( int x, int y, const char *s, vec4_t color ) { + CG_DrawStringExt( x, y, s, color, qtrue, qtrue, BIGCHAR_WIDTH, BIGCHAR_HEIGHT, 0 ); +} + +void CG_DrawSmallString( int x, int y, const char *s, float alpha ) { + float color[4]; + + color[0] = color[1] = color[2] = 1.0; + color[3] = alpha; + CG_DrawStringExt( x, y, s, color, qfalse, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 ); +} + +void CG_DrawSmallStringColor( int x, int y, const char *s, vec4_t color ) { + CG_DrawStringExt( x, y, s, color, qtrue, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 ); +} + +/* +================= +CG_DrawStrlen + +Returns character count, skiping color escape codes +================= +*/ +int CG_DrawStrlen( const char *str ) { + const char *s = str; + int count = 0; + + while ( *s ) { + if ( Q_IsColorString( s ) ) { + s += 2; + } else { + count++; + s++; + } + } + + return count; +} + +/* +============= +CG_TileClearBox + +This repeats a 64*64 tile graphic to fill the screen around a sized down +refresh window. +============= +*/ +static void CG_TileClearBox( int x, int y, int w, int h, qhandle_t hShader ) { + float s1, t1, s2, t2; + + s1 = x/64.0; + t1 = y/64.0; + s2 = (x+w)/64.0; + t2 = (y+h)/64.0; + trap_R_DrawStretchPic( x, y, w, h, s1, t1, s2, t2, hShader ); +} + + + +/* +============== +CG_TileClear + +Clear around a sized down screen +============== +*/ +void CG_TileClear( void ) { + int top, bottom, left, right; + int w, h; + + w = cgs.glconfig.vidWidth; + h = cgs.glconfig.vidHeight; + + if ( cg.refdef.x == 0 && cg.refdef.y == 0 && + cg.refdef.width == w && cg.refdef.height == h ) { + return; // full screen rendering + } + + top = cg.refdef.y; + bottom = top + cg.refdef.height-1; + left = cg.refdef.x; + right = left + cg.refdef.width-1; + + // clear above view screen + CG_TileClearBox( 0, 0, w, top, cgs.media.backTileShader ); + + // clear below view screen + CG_TileClearBox( 0, bottom, w, h - bottom, cgs.media.backTileShader ); + + // clear left of view screen + CG_TileClearBox( 0, top, left, bottom - top + 1, cgs.media.backTileShader ); + + // clear right of view screen + CG_TileClearBox( right, top, w - right, bottom - top + 1, cgs.media.backTileShader ); +} + + + +/* +================ +CG_FadeColor +================ +*/ +float *CG_FadeColor( int startMsec, int totalMsec ) { + static vec4_t color; + int t; + + if ( startMsec == 0 ) { + return NULL; + } + + t = cg.time - startMsec; + + if ( t >= totalMsec ) { + return NULL; + } + + // fade out + if ( totalMsec - t < FADE_TIME ) { + color[3] = ( totalMsec - t ) * 1.0/FADE_TIME; + } else { + color[3] = 1.0; + } + color[0] = color[1] = color[2] = 1; + + return color; +} + + +/* +================= +CG_ColorForHealth +================= +*/ +void CG_ColorForGivenHealth( vec4_t hcolor, int health ) +{ + // set the color based on health + hcolor[0] = 1.0; + if ( health >= 100 ) + { + hcolor[2] = 1.0; + } + else if ( health < 66 ) + { + hcolor[2] = 0; + } + else + { + hcolor[2] = ( health - 66 ) / 33.0; + } + + if ( health > 60 ) + { + hcolor[1] = 1.0; + } + else if ( health < 30 ) + { + hcolor[1] = 0; + } + else + { + hcolor[1] = ( health - 30 ) / 30.0; + } +} + +/* +================= +CG_ColorForHealth +================= +*/ +void CG_ColorForHealth( vec4_t hcolor ) +{ + int health; + int count; + int max; + + // calculate the total points of damage that can + // be sustained at the current health / armor level + health = cg.snap->ps.stats[STAT_HEALTH]; + + if ( health <= 0 ) + { + VectorClear( hcolor ); // black + hcolor[3] = 1; + return; + } + + count = cg.snap->ps.stats[STAT_ARMOR]; + max = health * ARMOR_PROTECTION / ( 1.0 - ARMOR_PROTECTION ); + if ( max < count ) + { + count = max; + } + health += count; + + hcolor[3] = 1.0; + CG_ColorForGivenHealth( hcolor, health ); +} + +/* +============== +CG_DrawNumField + +Take x,y positions as if 640 x 480 and scales them to the proper resolution + +============== +*/ +void CG_DrawNumField (int x, int y, int width, int value,int charWidth,int charHeight,int style,qboolean zeroFill) +{ + char num[16], *ptr; + int l; + int frame; + int xWidth; + int i = 0; + + if (width < 1) { + return; + } + + // draw number string + if (width > 5) { + width = 5; + } + + switch ( width ) { + case 1: + value = value > 9 ? 9 : value; + value = value < 0 ? 0 : value; + break; + case 2: + value = value > 99 ? 99 : value; + value = value < -9 ? -9 : value; + break; + case 3: + value = value > 999 ? 999 : value; + value = value < -99 ? -99 : value; + break; + case 4: + value = value > 9999 ? 9999 : value; + value = value < -999 ? -999 : value; + break; + } + + Com_sprintf (num, sizeof(num), "%i", value); + l = strlen(num); + if (l > width) + l = width; + + // FIXME: Might need to do something different for the chunky font?? + switch(style) + { + case NUM_FONT_SMALL: + xWidth = charWidth; + break; + case NUM_FONT_CHUNKY: + xWidth = (charWidth/1.2f) + 2; + break; + default: + case NUM_FONT_BIG: + xWidth = (charWidth/2) + 7;//(charWidth/6); + break; + } + + if ( zeroFill ) + { + for (i = 0; i < (width - l); i++ ) + { + switch(style) + { + case NUM_FONT_SMALL: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.smallnumberShaders[0] ); + break; + case NUM_FONT_CHUNKY: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.chunkyNumberShaders[0] ); + break; + default: + case NUM_FONT_BIG: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.numberShaders[0] ); + break; + } + x += 2 + (xWidth); + } + } + else + { + x += 2 + (xWidth)*(width - l); + } + + ptr = num; + while (*ptr && l) + { + if (*ptr == '-') + frame = STAT_MINUS; + else + frame = *ptr -'0'; + + switch(style) + { + case NUM_FONT_SMALL: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.smallnumberShaders[frame] ); + x++; // For a one line gap + break; + case NUM_FONT_CHUNKY: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.chunkyNumberShaders[frame] ); + break; + default: + case NUM_FONT_BIG: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.numberShaders[frame] ); + break; + } + + x += (xWidth); + ptr++; + l--; + } + +} + +#include "../ui/ui_shared.h" // for some text style junk +void UI_DrawProportionalString( int x, int y, const char* str, int style, vec4_t color ) +{ + // having all these different style defines (1 for UI, one for CG, and now one for the re->font stuff) + // is dumb, but for now... + // + int iStyle = 0; + int iMenuFont = (style & UI_SMALLFONT) ? FONT_SMALL : FONT_MEDIUM; + + switch (style & (UI_LEFT|UI_CENTER|UI_RIGHT)) + { + default: + case UI_LEFT: + { + // nada... + } + break; + + case UI_CENTER: + { + x -= CG_Text_Width(str, 1.0, iMenuFont) / 2; + } + break; + + case UI_RIGHT: + { + x -= CG_Text_Width(str, 1.0, iMenuFont) / 2; + } + break; + } + + if (style & UI_DROPSHADOW) + { + iStyle = ITEM_TEXTSTYLE_SHADOWED; + } + else + if ( style & (UI_BLINK|UI_PULSE) ) + { + iStyle = ITEM_TEXTSTYLE_BLINK; + } + + CG_Text_Paint(x, y, 1.0, color, str, 0, 0, iStyle, iMenuFont); +} + +void UI_DrawScaledProportionalString( int x, int y, const char* str, int style, vec4_t color, float scale) +{ + // having all these different style defines (1 for UI, one for CG, and now one for the re->font stuff) + // is dumb, but for now... + // + int iStyle = 0; + + switch (style & (UI_LEFT|UI_CENTER|UI_RIGHT)) + { + default: + case UI_LEFT: + { + // nada... + } + break; + + case UI_CENTER: + { + x -= CG_Text_Width(str, scale, FONT_MEDIUM) / 2; + } + break; + + case UI_RIGHT: + { + x -= CG_Text_Width(str, scale, FONT_MEDIUM) / 2; + } + break; + } + + if (style & UI_DROPSHADOW) + { + iStyle = ITEM_TEXTSTYLE_SHADOWED; + } + else + if ( style & (UI_BLINK|UI_PULSE) ) + { + iStyle = ITEM_TEXTSTYLE_BLINK; + } + + CG_Text_Paint(x, y, scale, color, str, 0, 0, iStyle, FONT_MEDIUM); +} + + + + diff --git a/code/cgame/cg_drawtools.c b/code/cgame/cg_drawtools.c new file mode 100644 index 0000000..cafe5a4 --- /dev/null +++ b/code/cgame/cg_drawtools.c @@ -0,0 +1,690 @@ +/* +// this line must stay at top so the whole PCH thing works... +#include "cg_headers.h" + +//#include "cg_local.h" +#include "cg_media.h" +#include "cg_text.h" +*/ + +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_drawtools.c -- helper functions called by cg_draw, cg_scoreboard, cg_info, etc +#include "cg_local.h" +#include "../game/q_shared.h" + + +/* +================ +UI_DrawRect + +Coordinates are 640*480 virtual values +================= +*/ +void CG_DrawRect( float x, float y, float width, float height, float size, const float *color ) { + trap_R_SetColor( color ); + + CG_DrawTopBottom(x, y, width, height, size); + CG_DrawSides(x, y, width, height, size); + + trap_R_SetColor( NULL ); +} + + + +/* +================= +CG_GetColorForHealth +================= +*/ +void CG_GetColorForHealth( int health, int armor, vec4_t hcolor ) { + int count; + int max; + + // calculate the total points of damage that can + // be sustained at the current health / armor level + if ( health <= 0 ) { + VectorClear( hcolor ); // black + hcolor[3] = 1; + return; + } + count = armor; + max = health * ARMOR_PROTECTION / ( 1.0 - ARMOR_PROTECTION ); + if ( max < count ) { + count = max; + } + health += count; + + // set the color based on health + hcolor[0] = 1.0; + hcolor[3] = 1.0; + if ( health >= 100 ) { + hcolor[2] = 1.0; + } else if ( health < 66 ) { + hcolor[2] = 0; + } else { + hcolor[2] = ( health - 66 ) / 33.0; + } + + if ( health > 60 ) { + hcolor[1] = 1.0; + } else if ( health < 30 ) { + hcolor[1] = 0; + } else { + hcolor[1] = ( health - 30 ) / 30.0; + } +} + +/* +================ +CG_DrawSides + +Coords are virtual 640x480 +================ +*/ +void CG_DrawSides(float x, float y, float w, float h, float size) { + size *= cgs.screenXScale; + trap_R_DrawStretchPic( x, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader ); + trap_R_DrawStretchPic( x + w - size, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader ); +} + +void CG_DrawTopBottom(float x, float y, float w, float h, float size) { + size *= cgs.screenYScale; + trap_R_DrawStretchPic( x, y, w, size, 0, 0, 0, 0, cgs.media.whiteShader ); + trap_R_DrawStretchPic( x, y + h - size, w, size, 0, 0, 0, 0, cgs.media.whiteShader ); +} + +/* +------------------------- +CGC_FillRect2 +real coords +------------------------- +*/ +void CG_FillRect2( float x, float y, float width, float height, const float *color ) { + trap_R_SetColor( color ); + trap_R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, cgs.media.whiteShader); + trap_R_SetColor( NULL ); +} + +/* +================ +CG_FillRect + +Coordinates are 640*480 virtual values +================= +*/ +void CG_FillRect( float x, float y, float width, float height, const float *color ) { + trap_R_SetColor( color ); + + trap_R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, cgs.media.whiteShader); + + trap_R_SetColor( NULL ); +} + + +/* +================ +CG_DrawPic + +Coordinates are 640*480 virtual values +A width of 0 will draw with the original image width +================= +*/ +void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader ) { + trap_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader ); +} + +/* +================ +CG_DrawRotatePic + +Coordinates are 640*480 virtual values +A width of 0 will draw with the original image width +rotates around the upper right corner of the passed in point +================= +*/ +void CG_DrawRotatePic( float x, float y, float width, float height,float angle, qhandle_t hShader ) { + trap_R_DrawRotatePic( x, y, width, height, 0, 0, 1, 1, angle, hShader ); +} + +/* +================ +CG_DrawRotatePic2 + +Coordinates are 640*480 virtual values +A width of 0 will draw with the original image width +Actually rotates around the center point of the passed in coordinates +================= +*/ +void CG_DrawRotatePic2( float x, float y, float width, float height,float angle, qhandle_t hShader ) { + trap_R_DrawRotatePic2( x, y, width, height, 0, 0, 1, 1, angle, hShader ); +} + +/* +=============== +CG_DrawChar + +Coordinates and size in 640*480 virtual screen size +=============== +*/ +void CG_DrawChar( int x, int y, int width, int height, int ch ) { + int row, col; + float frow, fcol; + float size; + float ax, ay, aw, ah; + float size2; + + ch &= 255; + + if ( ch == ' ' ) { + return; + } + + ax = x; + ay = y; + aw = width; + ah = height; + + row = ch>>4; + col = ch&15; + + frow = row*0.0625; + fcol = col*0.0625; + size = 0.03125; + size2 = 0.0625; + + trap_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol + size, frow + size2, + cgs.media.charsetShader ); + +} + +/* +================== +CG_DrawStringExt + +Draws a multi-colored string with a drop shadow, optionally forcing +to a fixed color. + +Coordinates are at 640 by 480 virtual resolution +================== +*/ +#include "../../ui/menudef.h" // for "ITEM_TEXTSTYLE_SHADOWED" +void CG_DrawStringExt( int x, int y, const char *string, const float *setColor, + qboolean forceColor, qboolean shadow, int charWidth, int charHeight, int maxChars ) +{ + if (trap_Language_IsAsian()) + { + // hack-a-doodle-do (post-release quick fix code)... + // + vec4_t color; + memcpy(color,setColor, sizeof(color)); // de-const it + CG_Text_Paint(x, y, 1.0f, // float scale, + color, // vec4_t color, + string, // const char *text, + 0.0f, // float adjust, + 0, // int limit, + shadow ? ITEM_TEXTSTYLE_SHADOWED : 0, // int style, + FONT_MEDIUM // iMenuFont + ) ; + } + else + { + vec4_t color; + const char *s; + int xx; + + // draw the drop shadow + if (shadow) { + color[0] = color[1] = color[2] = 0; + color[3] = setColor[3]; + trap_R_SetColor( color ); + s = string; + xx = x; + while ( *s ) { + if ( Q_IsColorString( s ) ) { + s += 2; + continue; + } + CG_DrawChar( xx + 2, y + 2, charWidth, charHeight, *s ); + xx += charWidth; + s++; + } + } + + // draw the colored text + s = string; + xx = x; + trap_R_SetColor( setColor ); + while ( *s ) { + if ( Q_IsColorString( s ) ) { + if ( !forceColor ) { + memcpy( color, g_color_table[ColorIndex(*(s+1))], sizeof( color ) ); + color[3] = setColor[3]; + trap_R_SetColor( color ); + } + s += 2; + continue; + } + CG_DrawChar( xx, y, charWidth, charHeight, *s ); + xx += charWidth; + s++; + } + trap_R_SetColor( NULL ); + } +} + +void CG_DrawBigString( int x, int y, const char *s, float alpha ) { + float color[4]; + + color[0] = color[1] = color[2] = 1.0; + color[3] = alpha; + CG_DrawStringExt( x, y, s, color, qfalse, qtrue, BIGCHAR_WIDTH, BIGCHAR_HEIGHT, 0 ); +} + +void CG_DrawBigStringColor( int x, int y, const char *s, vec4_t color ) { + CG_DrawStringExt( x, y, s, color, qtrue, qtrue, BIGCHAR_WIDTH, BIGCHAR_HEIGHT, 0 ); +} + +void CG_DrawSmallString( int x, int y, const char *s, float alpha ) { + float color[4]; + + color[0] = color[1] = color[2] = 1.0; + color[3] = alpha; + CG_DrawStringExt( x, y, s, color, qfalse, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 ); +} + +void CG_DrawSmallStringColor( int x, int y, const char *s, vec4_t color ) { + CG_DrawStringExt( x, y, s, color, qtrue, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 ); +} + +/* +================= +CG_DrawStrlen + +Returns character count, skiping color escape codes +================= +*/ +int CG_DrawStrlen( const char *str ) { + const char *s = str; + int count = 0; + + while ( *s ) { + if ( Q_IsColorString( s ) ) { + s += 2; + } else { + count++; + s++; + } + } + + return count; +} + +/* +============= +CG_TileClearBox + +This repeats a 64*64 tile graphic to fill the screen around a sized down +refresh window. +============= +*/ +static void CG_TileClearBox( int x, int y, int w, int h, qhandle_t hShader ) { + float s1, t1, s2, t2; + + s1 = x/64.0; + t1 = y/64.0; + s2 = (x+w)/64.0; + t2 = (y+h)/64.0; + trap_R_DrawStretchPic( x, y, w, h, s1, t1, s2, t2, hShader ); +} + + + +/* +============== +CG_TileClear + +Clear around a sized down screen +============== +*/ +void CG_TileClear( void ) { + int top, bottom, left, right; + int w, h; + + w = cgs.glconfig.vidWidth; + h = cgs.glconfig.vidHeight; + + if ( cg.refdef.x == 0 && cg.refdef.y == 0 && + cg.refdef.width == w && cg.refdef.height == h ) { + return; // full screen rendering + } + + top = cg.refdef.y; + bottom = top + cg.refdef.height-1; + left = cg.refdef.x; + right = left + cg.refdef.width-1; + + // clear above view screen + CG_TileClearBox( 0, 0, w, top, cgs.media.backTileShader ); + + // clear below view screen + CG_TileClearBox( 0, bottom, w, h - bottom, cgs.media.backTileShader ); + + // clear left of view screen + CG_TileClearBox( 0, top, left, bottom - top + 1, cgs.media.backTileShader ); + + // clear right of view screen + CG_TileClearBox( right, top, w - right, bottom - top + 1, cgs.media.backTileShader ); +} + + + +/* +================ +CG_FadeColor +================ +*/ +float *CG_FadeColor( int startMsec, int totalMsec ) { + static vec4_t color; + int t; + + if ( startMsec == 0 ) { + return NULL; + } + + t = cg.time - startMsec; + + if ( t >= totalMsec ) { + return NULL; + } + + // fade out + if ( totalMsec - t < FADE_TIME ) { + color[3] = ( totalMsec - t ) * 1.0/FADE_TIME; + } else { + color[3] = 1.0; + } + color[0] = color[1] = color[2] = 1; + + return color; +} + + +/* +================= +CG_ColorForHealth +================= +*/ +void CG_ColorForGivenHealth( vec4_t hcolor, int health ) +{ + // set the color based on health + hcolor[0] = 1.0; + if ( health >= 100 ) + { + hcolor[2] = 1.0; + } + else if ( health < 66 ) + { + hcolor[2] = 0; + } + else + { + hcolor[2] = ( health - 66 ) / 33.0; + } + + if ( health > 60 ) + { + hcolor[1] = 1.0; + } + else if ( health < 30 ) + { + hcolor[1] = 0; + } + else + { + hcolor[1] = ( health - 30 ) / 30.0; + } +} + +/* +================= +CG_ColorForHealth +================= +*/ +void CG_ColorForHealth( vec4_t hcolor ) +{ + int health; + int count; + int max; + + // calculate the total points of damage that can + // be sustained at the current health / armor level + health = cg.snap->ps.stats[STAT_HEALTH]; + + if ( health <= 0 ) + { + VectorClear( hcolor ); // black + hcolor[3] = 1; + return; + } + + count = cg.snap->ps.stats[STAT_ARMOR]; + max = health * ARMOR_PROTECTION / ( 1.0 - ARMOR_PROTECTION ); + if ( max < count ) + { + count = max; + } + health += count; + + hcolor[3] = 1.0; + CG_ColorForGivenHealth( hcolor, health ); +} + +/* +============== +CG_DrawNumField + +Take x,y positions as if 640 x 480 and scales them to the proper resolution + +============== +*/ +void CG_DrawNumField (int x, int y, int width, int value,int charWidth,int charHeight,int style,qboolean zeroFill) +{ + char num[16], *ptr; + int l; + int frame; + int xWidth; + int i = 0; + + if (width < 1) { + return; + } + + // draw number string + if (width > 5) { + width = 5; + } + + switch ( width ) { + case 1: + value = value > 9 ? 9 : value; + value = value < 0 ? 0 : value; + break; + case 2: + value = value > 99 ? 99 : value; + value = value < -9 ? -9 : value; + break; + case 3: + value = value > 999 ? 999 : value; + value = value < -99 ? -99 : value; + break; + case 4: + value = value > 9999 ? 9999 : value; + value = value < -999 ? -999 : value; + break; + } + + Com_sprintf (num, sizeof(num), "%i", value); + l = strlen(num); + if (l > width) + l = width; + + // FIXME: Might need to do something different for the chunky font?? + switch(style) + { + case NUM_FONT_SMALL: + xWidth = charWidth; + break; + case NUM_FONT_CHUNKY: + xWidth = (charWidth/1.2f) + 2; + break; + default: + case NUM_FONT_BIG: + xWidth = (charWidth/2) + 7;//(charWidth/6); + break; + } + + if ( zeroFill ) + { + for (i = 0; i < (width - l); i++ ) + { + switch(style) + { + case NUM_FONT_SMALL: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.smallnumberShaders[0] ); + break; + case NUM_FONT_CHUNKY: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.chunkyNumberShaders[0] ); + break; + default: + case NUM_FONT_BIG: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.numberShaders[0] ); + break; + } + x += 2 + (xWidth); + } + } + else + { + x += 2 + (xWidth)*(width - l); + } + + ptr = num; + while (*ptr && l) + { + if (*ptr == '-') + frame = STAT_MINUS; + else + frame = *ptr -'0'; + + switch(style) + { + case NUM_FONT_SMALL: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.smallnumberShaders[frame] ); + x++; // For a one line gap + break; + case NUM_FONT_CHUNKY: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.chunkyNumberShaders[frame] ); + break; + default: + case NUM_FONT_BIG: + CG_DrawPic( x,y, charWidth, charHeight, cgs.media.numberShaders[frame] ); + break; + } + + x += (xWidth); + ptr++; + l--; + } + +} + +#include "../ui/ui_shared.h" // for some text style junk +void UI_DrawProportionalString( int x, int y, const char* str, int style, vec4_t color ) +{ + // having all these different style defines (1 for UI, one for CG, and now one for the re->font stuff) + // is dumb, but for now... + // + int iStyle = 0; + int iMenuFont = (style & UI_SMALLFONT) ? FONT_SMALL : FONT_MEDIUM; + + switch (style & (UI_LEFT|UI_CENTER|UI_RIGHT)) + { + default: + case UI_LEFT: + { + // nada... + } + break; + + case UI_CENTER: + { + x -= CG_Text_Width(str, 1.0, iMenuFont) / 2; + } + break; + + case UI_RIGHT: + { + x -= CG_Text_Width(str, 1.0, iMenuFont) / 2; + } + break; + } + + if (style & UI_DROPSHADOW) + { + iStyle = ITEM_TEXTSTYLE_SHADOWED; + } + else + if ( style & (UI_BLINK|UI_PULSE) ) + { + iStyle = ITEM_TEXTSTYLE_BLINK; + } + + CG_Text_Paint(x, y, 1.0, color, str, 0, 0, iStyle, iMenuFont); +} + +void UI_DrawScaledProportionalString( int x, int y, const char* str, int style, vec4_t color, float scale) +{ + // having all these different style defines (1 for UI, one for CG, and now one for the re->font stuff) + // is dumb, but for now... + // + int iStyle = 0; + + switch (style & (UI_LEFT|UI_CENTER|UI_RIGHT)) + { + default: + case UI_LEFT: + { + // nada... + } + break; + + case UI_CENTER: + { + x -= CG_Text_Width(str, scale, FONT_MEDIUM) / 2; + } + break; + + case UI_RIGHT: + { + x -= CG_Text_Width(str, scale, FONT_MEDIUM) / 2; + } + break; + } + + if (style & UI_DROPSHADOW) + { + iStyle = ITEM_TEXTSTYLE_SHADOWED; + } + else + if ( style & (UI_BLINK|UI_PULSE) ) + { + iStyle = ITEM_TEXTSTYLE_BLINK; + } + + CG_Text_Paint(x, y, scale, color, str, 0, 0, iStyle, FONT_MEDIUM); +} + + + + diff --git a/code/cgame/cg_effects (2).c b/code/cgame/cg_effects (2).c new file mode 100644 index 0000000..bf9935a --- /dev/null +++ b/code/cgame/cg_effects (2).c @@ -0,0 +1,1198 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_effects.c -- these functions generate localentities, usually as a result +// of event processing + +#include "cg_local.h" + +/* +================== +CG_BubbleTrail + +Bullets shot underwater +================== +*/ +void CG_BubbleTrail( vec3_t start, vec3_t end, float spacing ) { + vec3_t move; + vec3_t vec; + float len; + int i; + + if ( cg_noProjectileTrail.integer ) { + return; + } + + VectorCopy (start, move); + VectorSubtract (end, start, vec); + len = VectorNormalize (vec); + + // advance a random amount first + i = rand() % (int)spacing; + VectorMA( move, i, vec, move ); + + VectorScale (vec, spacing, vec); + + for ( ; i < len; i += spacing ) { + localEntity_t *le; + refEntity_t *re; + + le = CG_AllocLocalEntity(); + le->leFlags = LEF_PUFF_DONT_SCALE; + le->leType = LE_MOVE_SCALE_FADE; + le->startTime = cg.time; + le->endTime = cg.time + 1000 + random() * 250; + le->lifeRate = 1.0 / ( le->endTime - le->startTime ); + + re = &le->refEntity; + re->shaderTime = cg.time / 1000.0f; + + re->reType = RT_SPRITE; + re->rotation = 0; + re->radius = 3; + re->customShader = cgs.media.waterBubbleShader; + re->shaderRGBA[0] = 0xff; + re->shaderRGBA[1] = 0xff; + re->shaderRGBA[2] = 0xff; + re->shaderRGBA[3] = 0xff; + + le->color[3] = 1.0; + + le->pos.trType = TR_LINEAR; + le->pos.trTime = cg.time; + VectorCopy( move, le->pos.trBase ); + le->pos.trDelta[0] = crandom()*5; + le->pos.trDelta[1] = crandom()*5; + le->pos.trDelta[2] = crandom()*5 + 6; + + VectorAdd (move, vec, move); + } +} + +/* +===================== +CG_SmokePuff + +Adds a smoke puff or blood trail localEntity. +===================== +*/ +localEntity_t *CG_SmokePuff( const vec3_t p, const vec3_t vel, + float radius, + float r, float g, float b, float a, + float duration, + int startTime, + int fadeInTime, + int leFlags, + qhandle_t hShader ) { + static int seed = 0x92; + localEntity_t *le; + refEntity_t *re; +// int fadeInTime = startTime + duration / 2; + + le = CG_AllocLocalEntity(); + le->leFlags = leFlags; + le->radius = radius; + + re = &le->refEntity; + re->rotation = Q_random( &seed ) * 360; + re->radius = radius; + re->shaderTime = startTime / 1000.0f; + + le->leType = LE_MOVE_SCALE_FADE; + le->startTime = startTime; + le->fadeInTime = fadeInTime; + le->endTime = startTime + duration; + if ( fadeInTime > startTime ) { + le->lifeRate = 1.0 / ( le->endTime - le->fadeInTime ); + } + else { + le->lifeRate = 1.0 / ( le->endTime - le->startTime ); + } + le->color[0] = r; + le->color[1] = g; + le->color[2] = b; + le->color[3] = a; + + + le->pos.trType = TR_LINEAR; + le->pos.trTime = startTime; + VectorCopy( vel, le->pos.trDelta ); + VectorCopy( p, le->pos.trBase ); + + VectorCopy( p, re->origin ); + re->customShader = hShader; + + re->shaderRGBA[0] = le->color[0] * 0xff; + re->shaderRGBA[1] = le->color[1] * 0xff; + re->shaderRGBA[2] = le->color[2] * 0xff; + re->shaderRGBA[3] = 0xff; + + re->reType = RT_SPRITE; + re->radius = le->radius; + + return le; +} + +void CG_TestLine( vec3_t start, vec3_t end, int time, unsigned int color, int radius) { + localEntity_t *le; + refEntity_t *re; + + le = CG_AllocLocalEntity(); + le->leType = LE_LINE; + le->startTime = cg.time; + le->endTime = cg.time + time; + le->lifeRate = 1.0 / ( le->endTime - le->startTime ); + + re = &le->refEntity; + VectorCopy( start, re->origin ); + VectorCopy( end, re->oldorigin); + re->shaderTime = cg.time / 1000.0f; + + re->reType = RT_LINE; + re->radius = 0.5*radius; + re->customShader = cgs.media.whiteShader; //trap_R_RegisterShaderNoMip("textures/colombia/canvas_doublesided"); + + re->shaderTexCoord[0] = re->shaderTexCoord[1] = 1.0f; + + if (color==0) + { + re->shaderRGBA[0] = re->shaderRGBA[1] = re->shaderRGBA[2] = re->shaderRGBA[3] = 0xff; + } + else + { + re->shaderRGBA[0] = color & 0xff; + color >>= 8; + re->shaderRGBA[1] = color & 0xff; + color >>= 8; + re->shaderRGBA[2] = color & 0xff; +// color >>= 8; +// re->shaderRGBA[3] = color & 0xff; + re->shaderRGBA[3] = 0xff; + } + + le->color[3] = 1.0; +} + +/* +================== +CG_ThrowChunk +================== +*/ +void CG_ThrowChunk( vec3_t origin, vec3_t velocity, qhandle_t hModel, int optionalSound, int startalpha ) { + localEntity_t *le; + refEntity_t *re; + + le = CG_AllocLocalEntity(); + re = &le->refEntity; + + le->leType = LE_FRAGMENT; + le->startTime = cg.time; + le->endTime = le->startTime + 5000 + random() * 3000; + + VectorCopy( origin, re->origin ); + AxisCopy( axisDefault, re->axis ); + re->hModel = hModel; + + le->pos.trType = TR_GRAVITY; + le->angles.trType = TR_GRAVITY; + VectorCopy( origin, le->pos.trBase ); + VectorCopy( velocity, le->pos.trDelta ); + VectorSet(le->angles.trBase, 20, 20, 20); + VectorCopy( velocity, le->angles.trDelta ); + le->pos.trTime = cg.time; + le->angles.trTime = cg.time; + + le->leFlags = LEF_TUMBLE; + + le->angles.trBase[YAW] = 180; + + le->bounceFactor = 0.3f; + le->bounceSound = optionalSound; + + le->forceAlpha = startalpha; +} + +//---------------------------- +// +// Breaking Glass Technology +// +//---------------------------- + +// Since we have shared verts when we tesselate the glass sheet, it helps to have a +// random offset table set up up front. + +static float offX[20][20], + offZ[20][20]; + +#define FX_ALPHA_NONLINEAR 0x00000004 +#define FX_APPLY_PHYSICS 0x02000000 +#define FX_USE_ALPHA 0x08000000 + +static void CG_DoGlassQuad( vec3_t p[4], vec2_t uv[4], qboolean stick, int time, vec3_t dmgDir ) +{ + float bounce; + vec3_t rotDelta; + vec3_t vel, accel; + vec3_t rgb1; + addpolyArgStruct_t apArgs; + int i, i_2; + + VectorSet( vel, crandom() * 12, crandom() * 12, -1 ); + + if ( !stick ) + { + // We aren't a motion delayed chunk, so let us move quickly + VectorMA( vel, 0.3f, dmgDir, vel ); + } + + // Set up acceleration due to gravity, 800 is standard QuakeIII gravity, so let's use something close + VectorSet( accel, 0.0f, 0.0f, -(600.0f + random() * 100.0f ) ); + + // We are using an additive shader, so let's set the RGB low so we look more like transparent glass +// VectorSet( rgb1, 0.1f, 0.1f, 0.1f ); + VectorSet( rgb1, 1.0f, 1.0f, 1.0f ); + + // Being glass, we don't want to bounce much + bounce = random() * 0.2f + 0.15f; + + // Set up our random rotate, we only do PITCH and YAW, not ROLL. This is something like degrees per second + VectorSet( rotDelta, crandom() * 40.0f, crandom() * 40.0f, 0.0f ); + + //In an ideal world, this might actually work. + /* + CPoly *pol = FX_AddPoly(p, uv, 4, // verts, ST, vertCount + vel, accel, // motion + 0.15f, 0.0f, 85.0f, // alpha start, alpha end, alpha parm ( begin alpha fade when 85% of life is complete ) + rgb1, rgb1, 0.0f, // rgb start, rgb end, rgb parm ( not used ) + rotDelta, bounce, time, // rotation amount, bounce, and time to delay motion for ( zero if no delay ); + 6000, // life + cgi_R_RegisterShader( "gfx/misc/test_crackle" ), + FX_APPLY_PHYSICS | FX_ALPHA_NONLINEAR | FX_USE_ALPHA ); + + if ( random() > 0.95f && pol ) + { + pol->AddFlags( FX_IMPACT_RUNS_FX | FX_KILL_ON_IMPACT ); + pol->SetImpactFxID( theFxScheduler.RegisterEffect( "glass_impact" )); + } + */ + + //rww - this is dirty. + + i = 0; + i_2 = 0; + + while (i < 4) + { + while (i_2 < 3) + { + apArgs.p[i][i_2] = p[i][i_2]; + + i_2++; + } + + i_2 = 0; + i++; + } + + i = 0; + i_2 = 0; + + while (i < 4) + { + while (i_2 < 2) + { + apArgs.ev[i][i_2] = uv[i][i_2]; + + i_2++; + } + + i_2 = 0; + i++; + } + + apArgs.numVerts = 4; + VectorCopy(vel, apArgs.vel); + VectorCopy(accel, apArgs.accel); + + apArgs.alpha1 = 0.15f; + apArgs.alpha2 = 0.0f; + apArgs.alphaParm = 85.0f; + + VectorCopy(rgb1, apArgs.rgb1); + VectorCopy(rgb1, apArgs.rgb2); + + apArgs.rgbParm = 0.0f; + + VectorCopy(rotDelta, apArgs.rotationDelta); + + apArgs.bounce = bounce; + apArgs.motionDelay = time; + apArgs.killTime = 6000; + apArgs.shader = cgs.media.glassShardShader; + apArgs.flags = (FX_APPLY_PHYSICS | FX_ALPHA_NONLINEAR | FX_USE_ALPHA); + + trap_FX_AddPoly(&apArgs); +} + +static void CG_CalcBiLerp( vec3_t verts[4], vec3_t subVerts[4], vec2_t uv[4] ) +{ + vec3_t temp; + + // Nasty crap + VectorScale( verts[0], 1.0f - uv[0][0], subVerts[0] ); + VectorMA( subVerts[0], uv[0][0], verts[1], subVerts[0] ); + VectorScale( subVerts[0], 1.0f - uv[0][1], temp ); + VectorScale( verts[3], 1.0f - uv[0][0], subVerts[0] ); + VectorMA( subVerts[0], uv[0][0], verts[2], subVerts[0] ); + VectorMA( temp, uv[0][1], subVerts[0], subVerts[0] ); + + VectorScale( verts[0], 1.0f - uv[1][0], subVerts[1] ); + VectorMA( subVerts[1], uv[1][0], verts[1], subVerts[1] ); + VectorScale( subVerts[1], 1.0f - uv[1][1], temp ); + VectorScale( verts[3], 1.0f - uv[1][0], subVerts[1] ); + VectorMA( subVerts[1], uv[1][0], verts[2], subVerts[1] ); + VectorMA( temp, uv[1][1], subVerts[1], subVerts[1] ); + + VectorScale( verts[0], 1.0f - uv[2][0], subVerts[2] ); + VectorMA( subVerts[2], uv[2][0], verts[1], subVerts[2] ); + VectorScale( subVerts[2], 1.0f - uv[2][1], temp ); + VectorScale( verts[3], 1.0f - uv[2][0], subVerts[2] ); + VectorMA( subVerts[2], uv[2][0], verts[2], subVerts[2] ); + VectorMA( temp, uv[2][1], subVerts[2], subVerts[2] ); + + VectorScale( verts[0], 1.0f - uv[3][0], subVerts[3] ); + VectorMA( subVerts[3], uv[3][0], verts[1], subVerts[3] ); + VectorScale( subVerts[3], 1.0f - uv[3][1], temp ); + VectorScale( verts[3], 1.0f - uv[3][0], subVerts[3] ); + VectorMA( subVerts[3], uv[3][0], verts[2], subVerts[3] ); + VectorMA( temp, uv[3][1], subVerts[3], subVerts[3] ); +} +// bilinear +//f(p',q') = (1 - y) × {[(1 - x) × f(p,q)] + [x × f(p,q+1)]} + y × {[(1 - x) × f(p+1,q)] + [x × f(p+1,q+1)]}. + + +static void CG_CalcHeightWidth( vec3_t verts[4], float *height, float *width ) +{ + vec3_t dir1, dir2, cross; + + VectorSubtract( verts[3], verts[0], dir1 ); // v + VectorSubtract( verts[1], verts[0], dir2 ); // p-a + CrossProduct( dir1, dir2, cross ); + *width = VectorNormalize( cross ) / VectorNormalize( dir1 ); // v + VectorSubtract( verts[2], verts[0], dir2 ); // p-a + CrossProduct( dir1, dir2, cross ); + *width += VectorNormalize( cross ) / VectorNormalize( dir1 ); // v + *width *= 0.5f; + + VectorSubtract( verts[1], verts[0], dir1 ); // v + VectorSubtract( verts[2], verts[0], dir2 ); // p-a + CrossProduct( dir1, dir2, cross ); + *height = VectorNormalize( cross ) / VectorNormalize( dir1 ); // v + VectorSubtract( verts[3], verts[0], dir2 ); // p-a + CrossProduct( dir1, dir2, cross ); + *height += VectorNormalize( cross ) / VectorNormalize( dir1 ); // v + *height *= 0.5f; +} +//Consider a line in 3D with position vector "a" and direction vector "v" and +// let "p" be the position vector of an arbitrary point in 3D +//dist = len( crossprod(p-a,v) ) / len(v); + +void CG_InitGlass( void ) +{ + int i, t; + + // Build a table first, so that we can do a more unpredictable crack scheme + // do it once, up front to save a bit of time. + for ( i = 0; i < 20; i++ ) + { + for ( t = 0; t < 20; t++ ) + { + offX[t][i] = crandom() * 0.03f; + offZ[i][t] = crandom() * 0.03f; + } + } +} + +void Vector2Set(vec2_t a,float b,float c) +{ + a[0] = b; + a[1] = c; +} + +#define TIME_DECAY_SLOW 0.1f +#define TIME_DECAY_MED 0.04f +#define TIME_DECAY_FAST 0.009f + +void CG_DoGlass( vec3_t verts[4], vec3_t normal, vec3_t dmgPt, vec3_t dmgDir, float dmgRadius, int maxShards ) +{ + int i, t; + int mxHeight, mxWidth; + float height, width; + float stepWidth, stepHeight; + float timeDecay; + float x, z; + float xx, zz; + float dif; + int time = 0; + int glassShards = 0; + qboolean stick = qtrue; + vec3_t subVerts[4]; + vec2_t biPoints[4]; + + // To do a smarter tesselation, we should figure out the relative height and width of the brush face, + // then use this to pick a lod value from 1-3 in each axis. This will give us 1-9 lod levels, which will + // hopefully be sufficient. + CG_CalcHeightWidth( verts, &height, &width ); + + trap_S_StartSound( dmgPt, -1, CHAN_AUTO, trap_S_RegisterSound("sound/effects/glassbreak1.wav")); + + // Pick "LOD" for height + if ( height < 100 ) + { + stepHeight = 0.2f; + mxHeight = 5; + timeDecay = TIME_DECAY_SLOW; + } + else if ( height > 220 ) + { + stepHeight = 0.05f; + mxHeight = 20; + timeDecay = TIME_DECAY_FAST; + } + else + { + stepHeight = 0.1f; + mxHeight = 10; + timeDecay = TIME_DECAY_MED; + } + + // Pick "LOD" for width + /* + if ( width < 100 ) + { + stepWidth = 0.2f; + mxWidth = 5; + timeDecay = ( timeDecay + TIME_DECAY_SLOW ) * 0.5f; + } + else if ( width > 220 ) + { + stepWidth = 0.05f; + mxWidth = 20; + timeDecay = ( timeDecay + TIME_DECAY_FAST ) * 0.5f; + } + else + { + stepWidth = 0.1f; + mxWidth = 10; + timeDecay = ( timeDecay + TIME_DECAY_MED ) * 0.5f; + } + */ + + //Attempt to scale the glass directly to the size of the window + + stepWidth = (0.25f - (width*0.0002)); //(width*0.0005)); + mxWidth = width*0.2; + timeDecay = ( timeDecay + TIME_DECAY_FAST ) * 0.5f; + + if (stepWidth < 0.01f) + { + stepWidth = 0.01f; + } + if (mxWidth < 5) + { + mxWidth = 5; + } + + for ( z = 0.0f, i = 0; z < 1.0f; z += stepHeight, i++ ) + { + for ( x = 0.0f, t = 0; x < 1.0f; x += stepWidth, t++ ) + { + // This is nasty.. + if ( t > 0 && t < mxWidth ) + { + xx = x - offX[i][t]; + } + else + { + xx = x; + } + + if ( i > 0 && i < mxHeight ) + { + zz = z - offZ[t][i]; + } + else + { + zz = z; + } + + Vector2Set( biPoints[0], xx, zz ); + + if ( t + 1 > 0 && t + 1 < mxWidth ) + { + xx = x - offX[i][t + 1]; + } + else + { + xx = x; + } + + if ( i > 0 && i < mxHeight ) + { + zz = z - offZ[t + 1][i]; + } + else + { + zz = z; + } + + Vector2Set( biPoints[1], xx + stepWidth, zz ); + + if ( t + 1 > 0 && t + 1 < mxWidth ) + { + xx = x - offX[i + 1][t + 1]; + } + else + { + xx = x; + } + + if ( i + 1 > 0 && i + 1 < mxHeight ) + { + zz = z - offZ[t + 1][i + 1]; + } + else + { + zz = z; + } + + Vector2Set( biPoints[2], xx + stepWidth, zz + stepHeight); + + if ( t > 0 && t < mxWidth ) + { + xx = x - offX[i + 1][t]; + } + else + { + xx = x; + } + + if ( i + 1 > 0 && i + 1 < mxHeight ) + { + zz = z - offZ[t][i + 1]; + } + else + { + zz = z; + } + + Vector2Set( biPoints[3], xx, zz + stepHeight ); + + CG_CalcBiLerp( verts, subVerts, biPoints ); + + dif = DistanceSquared( subVerts[0], dmgPt ) * timeDecay - random() * 32; + + // If we decrease dif, we are increasing the impact area, making it more likely to blow out large holes + dif -= dmgRadius * dmgRadius; + + if ( dif > 1 ) + { + stick = qtrue; + time = dif + random() * 200; + } + else + { + stick = qfalse; + time = 0; + } + + CG_DoGlassQuad( subVerts, biPoints, stick, time, dmgDir ); + glassShards++; + + if (maxShards && glassShards >= maxShards) + { + return; + } + } + } +} + +/* +================== +CG_GlassShatter +Break glass with fancy method +================== +*/ +void CG_GlassShatter(int entnum, vec3_t dmgPt, vec3_t dmgDir, float dmgRadius, int maxShards) +{ + vec3_t verts[4], normal; + + if (cgs.inlineDrawModel[cg_entities[entnum].currentState.modelindex]) + { + trap_R_GetBModelVerts(cgs.inlineDrawModel[cg_entities[entnum].currentState.modelindex], verts, normal); + CG_DoGlass(verts, normal, dmgPt, dmgDir, dmgRadius, maxShards); + } + //otherwise something awful has happened. +} + +/* +================== +CG_GlassShatter_Old +Throws glass shards from within a given bounding box in the world +================== +*/ +void CG_GlassShatter_Old(int entnum, vec3_t org, vec3_t mins, vec3_t maxs) +{ + vec3_t velocity, a, shardorg, dif, difx; + float windowmass; + float shardsthrow = 0; + char chunkname[256]; + + trap_S_StartSound(org, entnum, CHAN_BODY, trap_S_RegisterSound("sound/effects/glassbreak1.wav")); + + VectorSubtract(maxs, mins, a); + + windowmass = VectorLength(a); //should give us some idea of how big the chunk of glass is + + while (shardsthrow < windowmass) + { + velocity[0] = crandom()*150; + velocity[1] = crandom()*150; + velocity[2] = 150 + crandom()*75; + + Com_sprintf(chunkname, sizeof(chunkname), "models/chunks/glass/glchunks_%i.md3", Q_irand(1, 6)); + VectorCopy(org, shardorg); + + dif[0] = (maxs[0]-mins[0])/2; + dif[1] = (maxs[1]-mins[1])/2; + dif[2] = (maxs[2]-mins[2])/2; + + if (dif[0] < 2) + { + dif[0] = 2; + } + if (dif[1] < 2) + { + dif[1] = 2; + } + if (dif[2] < 2) + { + dif[2] = 2; + } + + difx[0] = Q_irand(1, (dif[0]*0.9)*2); + difx[1] = Q_irand(1, (dif[1]*0.9)*2); + difx[2] = Q_irand(1, (dif[2]*0.9)*2); + + if (difx[0] > dif[0]) + { + shardorg[0] += difx[0]-(dif[0]); + } + else + { + shardorg[0] -= difx[0]; + } + if (difx[1] > dif[1]) + { + shardorg[1] += difx[1]-(dif[1]); + } + else + { + shardorg[1] -= difx[1]; + } + if (difx[2] > dif[2]) + { + shardorg[2] += difx[2]-(dif[2]); + } + else + { + shardorg[2] -= difx[2]; + } + + //CG_TestLine(org, shardorg, 5000, 0x0000ff, 3); + + CG_ThrowChunk( shardorg, velocity, trap_R_RegisterModel( chunkname ), 0, 254 ); + + shardsthrow += 10; + } +} + +/* +================== +CG_CreateDebris +Throws specified debris from within a given bounding box in the world +================== +*/ +#define DEBRIS_SPECIALCASE_ROCK -1 +#define DEBRIS_SPECIALCASE_CHUNKS -2 +#define DEBRIS_SPECIALCASE_WOOD -3 +#define DEBRIS_SPECIALCASE_GLASS -4 + +#define NUM_DEBRIS_MODELS_GLASS 8 +#define NUM_DEBRIS_MODELS_WOOD 8 +#define NUM_DEBRIS_MODELS_CHUNKS 3 +#define NUM_DEBRIS_MODELS_ROCKS 4 //12 + +int dbModels_Glass[NUM_DEBRIS_MODELS_GLASS]; +int dbModels_Wood[NUM_DEBRIS_MODELS_WOOD]; +int dbModels_Chunks[NUM_DEBRIS_MODELS_CHUNKS]; +int dbModels_Rocks[NUM_DEBRIS_MODELS_ROCKS]; + +void CG_CreateDebris(int entnum, vec3_t org, vec3_t mins, vec3_t maxs, int debrissound, int debrismodel) +{ + vec3_t velocity, a, shardorg, dif, difx; + float windowmass; + float shardsthrow = 0; + int omodel = debrismodel; + + if (omodel == DEBRIS_SPECIALCASE_GLASS && !dbModels_Glass[0]) + { //glass no longer exists, using it for metal. + dbModels_Glass[0] = trap_R_RegisterModel("models/chunks/metal/metal1_1.md3"); + dbModels_Glass[1] = trap_R_RegisterModel("models/chunks/metal/metal1_2.md3"); + dbModels_Glass[2] = trap_R_RegisterModel("models/chunks/metal/metal1_3.md3"); + dbModels_Glass[3] = trap_R_RegisterModel("models/chunks/metal/metal1_4.md3"); + dbModels_Glass[4] = trap_R_RegisterModel("models/chunks/metal/metal2_1.md3"); + dbModels_Glass[5] = trap_R_RegisterModel("models/chunks/metal/metal2_2.md3"); + dbModels_Glass[6] = trap_R_RegisterModel("models/chunks/metal/metal2_3.md3"); + dbModels_Glass[7] = trap_R_RegisterModel("models/chunks/metal/metal2_4.md3"); + } + if (omodel == DEBRIS_SPECIALCASE_WOOD && !dbModels_Wood[0]) + { + dbModels_Wood[0] = trap_R_RegisterModel("models/chunks/crate/crate1_1.md3"); + dbModels_Wood[1] = trap_R_RegisterModel("models/chunks/crate/crate1_2.md3"); + dbModels_Wood[2] = trap_R_RegisterModel("models/chunks/crate/crate1_3.md3"); + dbModels_Wood[3] = trap_R_RegisterModel("models/chunks/crate/crate1_4.md3"); + dbModels_Wood[4] = trap_R_RegisterModel("models/chunks/crate/crate2_1.md3"); + dbModels_Wood[5] = trap_R_RegisterModel("models/chunks/crate/crate2_2.md3"); + dbModels_Wood[6] = trap_R_RegisterModel("models/chunks/crate/crate2_3.md3"); + dbModels_Wood[7] = trap_R_RegisterModel("models/chunks/crate/crate2_4.md3"); + } + if (omodel == DEBRIS_SPECIALCASE_CHUNKS && !dbModels_Chunks[0]) + { + dbModels_Chunks[0] = trap_R_RegisterModel("models/chunks/generic/chunks_1.md3"); + dbModels_Chunks[1] = trap_R_RegisterModel("models/chunks/generic/chunks_2.md3"); + } + if (omodel == DEBRIS_SPECIALCASE_ROCK && !dbModels_Rocks[0]) + { + dbModels_Rocks[0] = trap_R_RegisterModel("models/chunks/rock/rock1_1.md3"); + dbModels_Rocks[1] = trap_R_RegisterModel("models/chunks/rock/rock1_2.md3"); + dbModels_Rocks[2] = trap_R_RegisterModel("models/chunks/rock/rock1_3.md3"); + dbModels_Rocks[3] = trap_R_RegisterModel("models/chunks/rock/rock1_4.md3"); + /* + dbModels_Rocks[4] = trap_R_RegisterModel("models/chunks/rock/rock2_1.md3"); + dbModels_Rocks[5] = trap_R_RegisterModel("models/chunks/rock/rock2_2.md3"); + dbModels_Rocks[6] = trap_R_RegisterModel("models/chunks/rock/rock2_3.md3"); + dbModels_Rocks[7] = trap_R_RegisterModel("models/chunks/rock/rock2_4.md3"); + dbModels_Rocks[8] = trap_R_RegisterModel("models/chunks/rock/rock3_1.md3"); + dbModels_Rocks[9] = trap_R_RegisterModel("models/chunks/rock/rock3_2.md3"); + dbModels_Rocks[10] = trap_R_RegisterModel("models/chunks/rock/rock3_3.md3"); + dbModels_Rocks[11] = trap_R_RegisterModel("models/chunks/rock/rock3_4.md3"); + */ + } + + VectorSubtract(maxs, mins, a); + + windowmass = VectorLength(a); //should give us some idea of how big the chunk of glass is + + while (shardsthrow < windowmass) + { + velocity[0] = crandom()*150; + velocity[1] = crandom()*150; + velocity[2] = 150 + crandom()*75; + + if (omodel == DEBRIS_SPECIALCASE_GLASS) + { + debrismodel = dbModels_Glass[Q_irand(0, NUM_DEBRIS_MODELS_GLASS-1)]; + } + else if (omodel == DEBRIS_SPECIALCASE_WOOD) + { + debrismodel = dbModels_Wood[Q_irand(0, NUM_DEBRIS_MODELS_WOOD-1)]; + } + else if (omodel == DEBRIS_SPECIALCASE_CHUNKS) + { + debrismodel = dbModels_Chunks[Q_irand(0, NUM_DEBRIS_MODELS_CHUNKS-1)]; + } + else if (omodel == DEBRIS_SPECIALCASE_ROCK) + { + debrismodel = dbModels_Rocks[Q_irand(0, NUM_DEBRIS_MODELS_ROCKS-1)]; + } + + VectorCopy(org, shardorg); + + dif[0] = (maxs[0]-mins[0])/2; + dif[1] = (maxs[1]-mins[1])/2; + dif[2] = (maxs[2]-mins[2])/2; + + if (dif[0] < 2) + { + dif[0] = 2; + } + if (dif[1] < 2) + { + dif[1] = 2; + } + if (dif[2] < 2) + { + dif[2] = 2; + } + + difx[0] = Q_irand(1, (dif[0]*0.9)*2); + difx[1] = Q_irand(1, (dif[1]*0.9)*2); + difx[2] = Q_irand(1, (dif[2]*0.9)*2); + + if (difx[0] > dif[0]) + { + shardorg[0] += difx[0]-(dif[0]); + } + else + { + shardorg[0] -= difx[0]; + } + if (difx[1] > dif[1]) + { + shardorg[1] += difx[1]-(dif[1]); + } + else + { + shardorg[1] -= difx[1]; + } + if (difx[2] > dif[2]) + { + shardorg[2] += difx[2]-(dif[2]); + } + else + { + shardorg[2] -= difx[2]; + } + + //CG_TestLine(org, shardorg, 5000, 0x0000ff, 3); + + CG_ThrowChunk( shardorg, velocity, debrismodel, debrissound, 0 ); + + shardsthrow += 10; + } +} + +/* +================== +CG_ScorePlum +================== +*/ +void CG_ScorePlum( int client, vec3_t org, int score ) { + localEntity_t *le; + refEntity_t *re; + vec3_t angles; + static vec3_t lastPos; + + // only visualize for the client that scored + if (client != cg.predictedPlayerState.clientNum || cg_scorePlum.integer == 0) { + return; + } + + le = CG_AllocLocalEntity(); + le->leFlags = 0; + le->leType = LE_SCOREPLUM; + le->startTime = cg.time; + le->endTime = cg.time + 4000; + le->lifeRate = 1.0 / ( le->endTime - le->startTime ); + + + le->color[0] = le->color[1] = le->color[2] = le->color[3] = 1.0; + le->radius = score; + + VectorCopy( org, le->pos.trBase ); + if (org[2] >= lastPos[2] - 20 && org[2] <= lastPos[2] + 20) { + le->pos.trBase[2] -= 20; + } + + //CG_Printf( "Plum origin %i %i %i -- %i\n", (int)org[0], (int)org[1], (int)org[2], (int)Distance(org, lastPos)); + VectorCopy(org, lastPos); + + + re = &le->refEntity; + + re->reType = RT_SPRITE; + re->radius = 16; + + VectorClear(angles); + AnglesToAxis( angles, re->axis ); +} + + +/* +------------------------- +CG_ExplosionEffects + +Used to find the player and shake the camera if close enough +intensity ranges from 1 (minor tremble) to 16 (major quake) +------------------------- +*/ + +void CG_ExplosionEffects( vec3_t origin, float intensity, int radius) +{ + //FIXME: When exactly is the vieworg calculated in relation to the rest of the frame?s + + vec3_t dir; + float dist, intensityScale; + float realIntensity; + + VectorSubtract( cg.refdef.vieworg, origin, dir ); + dist = VectorNormalize( dir ); + + //Use the dir to add kick to the explosion + + if ( dist > radius ) + return; + + intensityScale = 1 - ( dist / (float) radius ); + realIntensity = intensity * intensityScale; + +// CGCam_Shake( realIntensity, 750 ); // 500 seemed a bit too quick +} + + +/* +==================== +CG_MakeExplosion +==================== +*/ +localEntity_t *CG_MakeExplosion( vec3_t origin, vec3_t dir, + qhandle_t hModel, int numFrames, qhandle_t shader, + int msec, qboolean isSprite, float scale, int flags ) +{ + float ang = 0; + localEntity_t *ex; + int offset; + vec3_t tmpVec, newOrigin; + + if ( msec <= 0 ) { + CG_Error( "CG_MakeExplosion: msec = %i", msec ); + } + + // skew the time a bit so they aren't all in sync + offset = rand() & 63; + + ex = CG_AllocLocalEntity(); + if ( isSprite ) { + ex->leType = LE_SPRITE_EXPLOSION; + ex->refEntity.rotation = rand() % 360; + ex->radius = scale; + VectorScale( dir, 16, tmpVec ); + VectorAdd( tmpVec, origin, newOrigin ); + } else { + ex->leType = LE_EXPLOSION; + VectorCopy( origin, newOrigin ); + + // set axis with random rotate when necessary + if ( !dir ) + { + AxisClear( ex->refEntity.axis ); + } + else + { + if ( !(flags & LEF_NO_RANDOM_ROTATE) ) + ang = rand() % 360; + VectorCopy( dir, ex->refEntity.axis[0] ); + RotateAroundDirection( ex->refEntity.axis, ang ); + } + } + + ex->startTime = cg.time - offset; + ex->endTime = ex->startTime + msec; + + // bias the time so all shader effects start correctly + ex->refEntity.shaderTime = ex->startTime / 1000.0f; + + ex->refEntity.hModel = hModel; + ex->refEntity.customShader = shader; + ex->lifeRate = (float)numFrames / msec; + ex->leFlags = flags; + + //Scale the explosion + if (scale != 1) { + ex->refEntity.nonNormalizedAxes = qtrue; + + VectorScale( ex->refEntity.axis[0], scale, ex->refEntity.axis[0] ); + VectorScale( ex->refEntity.axis[1], scale, ex->refEntity.axis[1] ); + VectorScale( ex->refEntity.axis[2], scale, ex->refEntity.axis[2] ); + } + // set origin + VectorCopy ( newOrigin, ex->refEntity.origin); + VectorCopy ( newOrigin, ex->refEntity.oldorigin ); + + ex->color[0] = ex->color[1] = ex->color[2] = 1.0; + + return ex; +} + + +/* +------------------------- +CG_SurfaceExplosion + +Adds an explosion to a surface +------------------------- +*/ + +#define NUM_SPARKS 12 +#define NUM_PUFFS 1 +#define NUM_EXPLOSIONS 4 + +void CG_SurfaceExplosion( vec3_t origin, vec3_t normal, float radius, float shake_speed, qboolean smoke ) +{ + localEntity_t *le; + //FXTrail *particle; + vec3_t direction, new_org; + vec3_t velocity = { 0, 0, 0 }; + vec3_t temp_org, temp_vel; + float scale, dscale; + int i, numSparks; + + //Sparks + numSparks = 16 + (random() * 16.0f); + + for ( i = 0; i < numSparks; i++ ) + { + scale = 0.25f + (random() * 2.0f); + dscale = -scale*0.5; + +/* particle = FX_AddTrail( origin, + NULL, + NULL, + 32.0f, + -64.0f, + scale, + -scale, + 1.0f, + 0.0f, + 0.25f, + 4000.0f, + cgs.media.sparkShader, + rand() & FXF_BOUNCE); + if ( particle == NULL ) + return; + + FXE_Spray( normal, 500, 150, 1.0f, 768 + (rand() & 255), (FXPrimitive *) particle );*/ + } + + //Smoke + //Move this out a little from the impact surface + VectorMA( origin, 4, normal, new_org ); + VectorSet( velocity, 0.0f, 0.0f, 16.0f ); + + for ( i = 0; i < 4; i++ ) + { + VectorSet( temp_org, new_org[0] + (crandom() * 16.0f), new_org[1] + (crandom() * 16.0f), new_org[2] + (random() * 4.0f) ); + VectorSet( temp_vel, velocity[0] + (crandom() * 8.0f), velocity[1] + (crandom() * 8.0f), velocity[2] + (crandom() * 8.0f) ); + +/* FX_AddSprite( temp_org, + temp_vel, + NULL, + 64.0f + (random() * 32.0f), + 16.0f, + 1.0f, + 0.0f, + 20.0f + (crandom() * 90.0f), + 0.5f, + 1500.0f, + cgs.media.smokeShader, FXF_USE_ALPHA_CHAN );*/ + } + + //Core of the explosion + + //Orient the explosions to face the camera + VectorSubtract( cg.refdef.vieworg, origin, direction ); + VectorNormalize( direction ); + + //Tag the last one with a light + le = CG_MakeExplosion( origin, direction, cgs.media.explosionModel, 6, cgs.media.surfaceExplosionShader, 500, qfalse, radius * 0.02f + (random() * 0.3f), 0); + le->light = 150; + VectorSet( le->lightColor, 0.9f, 0.8f, 0.5f ); + + for ( i = 0; i < NUM_EXPLOSIONS-1; i ++) + { + VectorSet( new_org, (origin[0] + (16 + (crandom() * 8))*crandom()), (origin[1] + (16 + (crandom() * 8))*crandom()), (origin[2] + (16 + (crandom() * 8))*crandom()) ); + le = CG_MakeExplosion( new_org, direction, cgs.media.explosionModel, 6, cgs.media.surfaceExplosionShader, 300 + (rand() & 99), qfalse, radius * 0.05f + (crandom() *0.3f), 0); + } + + //Shake the camera + CG_ExplosionEffects( origin, shake_speed, 350 ); + + // The level designers wanted to be able to turn the smoke spawners off. The rationale is that they + // want to blow up catwalks and such that fall down...when that happens, it shouldn't really leave a mark + // and a smoke spewer at the explosion point... + if ( smoke ) + { + VectorMA( origin, -8, normal, temp_org ); +// FX_AddSpawner( temp_org, normal, NULL, NULL, 100, random()*25.0f, 5000.0f, (void *) CG_SmokeSpawn ); + + //Impact mark + //FIXME: Replace mark + //CG_ImpactMark( cgs.media.burnMarkShader, origin, normal, random()*360, 1,1,1,1, qfalse, 8, qfalse ); + } +} + +/* +================= +CG_Bleed + +This is the spurt of blood when a character gets hit +================= +*/ +void CG_Bleed( vec3_t origin, int entityNum ) { + localEntity_t *ex; + + if ( !cg_blood.integer ) { + return; + } + + ex = CG_AllocLocalEntity(); + ex->leType = LE_EXPLOSION; + + ex->startTime = cg.time; + ex->endTime = ex->startTime + 500; + + VectorCopy ( origin, ex->refEntity.origin); + ex->refEntity.reType = RT_SPRITE; + ex->refEntity.rotation = rand() % 360; + ex->refEntity.radius = 24; + + ex->refEntity.customShader = 0;//cgs.media.bloodExplosionShader; + + // don't show player's own blood in view + if ( entityNum == cg.snap->ps.clientNum ) { + ex->refEntity.renderfx |= RF_THIRD_PERSON; + } +} + + + +/* +================== +CG_LaunchGib +================== +*/ +void CG_LaunchGib( vec3_t origin, vec3_t velocity, qhandle_t hModel ) { + localEntity_t *le; + refEntity_t *re; + + le = CG_AllocLocalEntity(); + re = &le->refEntity; + + le->leType = LE_FRAGMENT; + le->startTime = cg.time; + le->endTime = le->startTime + 5000 + random() * 3000; + + VectorCopy( origin, re->origin ); + AxisCopy( axisDefault, re->axis ); + re->hModel = hModel; + + le->pos.trType = TR_GRAVITY; + VectorCopy( origin, le->pos.trBase ); + VectorCopy( velocity, le->pos.trDelta ); + le->pos.trTime = cg.time; + + le->bounceFactor = 0.6f; + + le->leBounceSoundType = LEBS_BLOOD; + le->leMarkType = LEMT_BLOOD; +} diff --git a/code/cgame/cg_effects.c b/code/cgame/cg_effects.c new file mode 100644 index 0000000..bf9935a --- /dev/null +++ b/code/cgame/cg_effects.c @@ -0,0 +1,1198 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_effects.c -- these functions generate localentities, usually as a result +// of event processing + +#include "cg_local.h" + +/* +================== +CG_BubbleTrail + +Bullets shot underwater +================== +*/ +void CG_BubbleTrail( vec3_t start, vec3_t end, float spacing ) { + vec3_t move; + vec3_t vec; + float len; + int i; + + if ( cg_noProjectileTrail.integer ) { + return; + } + + VectorCopy (start, move); + VectorSubtract (end, start, vec); + len = VectorNormalize (vec); + + // advance a random amount first + i = rand() % (int)spacing; + VectorMA( move, i, vec, move ); + + VectorScale (vec, spacing, vec); + + for ( ; i < len; i += spacing ) { + localEntity_t *le; + refEntity_t *re; + + le = CG_AllocLocalEntity(); + le->leFlags = LEF_PUFF_DONT_SCALE; + le->leType = LE_MOVE_SCALE_FADE; + le->startTime = cg.time; + le->endTime = cg.time + 1000 + random() * 250; + le->lifeRate = 1.0 / ( le->endTime - le->startTime ); + + re = &le->refEntity; + re->shaderTime = cg.time / 1000.0f; + + re->reType = RT_SPRITE; + re->rotation = 0; + re->radius = 3; + re->customShader = cgs.media.waterBubbleShader; + re->shaderRGBA[0] = 0xff; + re->shaderRGBA[1] = 0xff; + re->shaderRGBA[2] = 0xff; + re->shaderRGBA[3] = 0xff; + + le->color[3] = 1.0; + + le->pos.trType = TR_LINEAR; + le->pos.trTime = cg.time; + VectorCopy( move, le->pos.trBase ); + le->pos.trDelta[0] = crandom()*5; + le->pos.trDelta[1] = crandom()*5; + le->pos.trDelta[2] = crandom()*5 + 6; + + VectorAdd (move, vec, move); + } +} + +/* +===================== +CG_SmokePuff + +Adds a smoke puff or blood trail localEntity. +===================== +*/ +localEntity_t *CG_SmokePuff( const vec3_t p, const vec3_t vel, + float radius, + float r, float g, float b, float a, + float duration, + int startTime, + int fadeInTime, + int leFlags, + qhandle_t hShader ) { + static int seed = 0x92; + localEntity_t *le; + refEntity_t *re; +// int fadeInTime = startTime + duration / 2; + + le = CG_AllocLocalEntity(); + le->leFlags = leFlags; + le->radius = radius; + + re = &le->refEntity; + re->rotation = Q_random( &seed ) * 360; + re->radius = radius; + re->shaderTime = startTime / 1000.0f; + + le->leType = LE_MOVE_SCALE_FADE; + le->startTime = startTime; + le->fadeInTime = fadeInTime; + le->endTime = startTime + duration; + if ( fadeInTime > startTime ) { + le->lifeRate = 1.0 / ( le->endTime - le->fadeInTime ); + } + else { + le->lifeRate = 1.0 / ( le->endTime - le->startTime ); + } + le->color[0] = r; + le->color[1] = g; + le->color[2] = b; + le->color[3] = a; + + + le->pos.trType = TR_LINEAR; + le->pos.trTime = startTime; + VectorCopy( vel, le->pos.trDelta ); + VectorCopy( p, le->pos.trBase ); + + VectorCopy( p, re->origin ); + re->customShader = hShader; + + re->shaderRGBA[0] = le->color[0] * 0xff; + re->shaderRGBA[1] = le->color[1] * 0xff; + re->shaderRGBA[2] = le->color[2] * 0xff; + re->shaderRGBA[3] = 0xff; + + re->reType = RT_SPRITE; + re->radius = le->radius; + + return le; +} + +void CG_TestLine( vec3_t start, vec3_t end, int time, unsigned int color, int radius) { + localEntity_t *le; + refEntity_t *re; + + le = CG_AllocLocalEntity(); + le->leType = LE_LINE; + le->startTime = cg.time; + le->endTime = cg.time + time; + le->lifeRate = 1.0 / ( le->endTime - le->startTime ); + + re = &le->refEntity; + VectorCopy( start, re->origin ); + VectorCopy( end, re->oldorigin); + re->shaderTime = cg.time / 1000.0f; + + re->reType = RT_LINE; + re->radius = 0.5*radius; + re->customShader = cgs.media.whiteShader; //trap_R_RegisterShaderNoMip("textures/colombia/canvas_doublesided"); + + re->shaderTexCoord[0] = re->shaderTexCoord[1] = 1.0f; + + if (color==0) + { + re->shaderRGBA[0] = re->shaderRGBA[1] = re->shaderRGBA[2] = re->shaderRGBA[3] = 0xff; + } + else + { + re->shaderRGBA[0] = color & 0xff; + color >>= 8; + re->shaderRGBA[1] = color & 0xff; + color >>= 8; + re->shaderRGBA[2] = color & 0xff; +// color >>= 8; +// re->shaderRGBA[3] = color & 0xff; + re->shaderRGBA[3] = 0xff; + } + + le->color[3] = 1.0; +} + +/* +================== +CG_ThrowChunk +================== +*/ +void CG_ThrowChunk( vec3_t origin, vec3_t velocity, qhandle_t hModel, int optionalSound, int startalpha ) { + localEntity_t *le; + refEntity_t *re; + + le = CG_AllocLocalEntity(); + re = &le->refEntity; + + le->leType = LE_FRAGMENT; + le->startTime = cg.time; + le->endTime = le->startTime + 5000 + random() * 3000; + + VectorCopy( origin, re->origin ); + AxisCopy( axisDefault, re->axis ); + re->hModel = hModel; + + le->pos.trType = TR_GRAVITY; + le->angles.trType = TR_GRAVITY; + VectorCopy( origin, le->pos.trBase ); + VectorCopy( velocity, le->pos.trDelta ); + VectorSet(le->angles.trBase, 20, 20, 20); + VectorCopy( velocity, le->angles.trDelta ); + le->pos.trTime = cg.time; + le->angles.trTime = cg.time; + + le->leFlags = LEF_TUMBLE; + + le->angles.trBase[YAW] = 180; + + le->bounceFactor = 0.3f; + le->bounceSound = optionalSound; + + le->forceAlpha = startalpha; +} + +//---------------------------- +// +// Breaking Glass Technology +// +//---------------------------- + +// Since we have shared verts when we tesselate the glass sheet, it helps to have a +// random offset table set up up front. + +static float offX[20][20], + offZ[20][20]; + +#define FX_ALPHA_NONLINEAR 0x00000004 +#define FX_APPLY_PHYSICS 0x02000000 +#define FX_USE_ALPHA 0x08000000 + +static void CG_DoGlassQuad( vec3_t p[4], vec2_t uv[4], qboolean stick, int time, vec3_t dmgDir ) +{ + float bounce; + vec3_t rotDelta; + vec3_t vel, accel; + vec3_t rgb1; + addpolyArgStruct_t apArgs; + int i, i_2; + + VectorSet( vel, crandom() * 12, crandom() * 12, -1 ); + + if ( !stick ) + { + // We aren't a motion delayed chunk, so let us move quickly + VectorMA( vel, 0.3f, dmgDir, vel ); + } + + // Set up acceleration due to gravity, 800 is standard QuakeIII gravity, so let's use something close + VectorSet( accel, 0.0f, 0.0f, -(600.0f + random() * 100.0f ) ); + + // We are using an additive shader, so let's set the RGB low so we look more like transparent glass +// VectorSet( rgb1, 0.1f, 0.1f, 0.1f ); + VectorSet( rgb1, 1.0f, 1.0f, 1.0f ); + + // Being glass, we don't want to bounce much + bounce = random() * 0.2f + 0.15f; + + // Set up our random rotate, we only do PITCH and YAW, not ROLL. This is something like degrees per second + VectorSet( rotDelta, crandom() * 40.0f, crandom() * 40.0f, 0.0f ); + + //In an ideal world, this might actually work. + /* + CPoly *pol = FX_AddPoly(p, uv, 4, // verts, ST, vertCount + vel, accel, // motion + 0.15f, 0.0f, 85.0f, // alpha start, alpha end, alpha parm ( begin alpha fade when 85% of life is complete ) + rgb1, rgb1, 0.0f, // rgb start, rgb end, rgb parm ( not used ) + rotDelta, bounce, time, // rotation amount, bounce, and time to delay motion for ( zero if no delay ); + 6000, // life + cgi_R_RegisterShader( "gfx/misc/test_crackle" ), + FX_APPLY_PHYSICS | FX_ALPHA_NONLINEAR | FX_USE_ALPHA ); + + if ( random() > 0.95f && pol ) + { + pol->AddFlags( FX_IMPACT_RUNS_FX | FX_KILL_ON_IMPACT ); + pol->SetImpactFxID( theFxScheduler.RegisterEffect( "glass_impact" )); + } + */ + + //rww - this is dirty. + + i = 0; + i_2 = 0; + + while (i < 4) + { + while (i_2 < 3) + { + apArgs.p[i][i_2] = p[i][i_2]; + + i_2++; + } + + i_2 = 0; + i++; + } + + i = 0; + i_2 = 0; + + while (i < 4) + { + while (i_2 < 2) + { + apArgs.ev[i][i_2] = uv[i][i_2]; + + i_2++; + } + + i_2 = 0; + i++; + } + + apArgs.numVerts = 4; + VectorCopy(vel, apArgs.vel); + VectorCopy(accel, apArgs.accel); + + apArgs.alpha1 = 0.15f; + apArgs.alpha2 = 0.0f; + apArgs.alphaParm = 85.0f; + + VectorCopy(rgb1, apArgs.rgb1); + VectorCopy(rgb1, apArgs.rgb2); + + apArgs.rgbParm = 0.0f; + + VectorCopy(rotDelta, apArgs.rotationDelta); + + apArgs.bounce = bounce; + apArgs.motionDelay = time; + apArgs.killTime = 6000; + apArgs.shader = cgs.media.glassShardShader; + apArgs.flags = (FX_APPLY_PHYSICS | FX_ALPHA_NONLINEAR | FX_USE_ALPHA); + + trap_FX_AddPoly(&apArgs); +} + +static void CG_CalcBiLerp( vec3_t verts[4], vec3_t subVerts[4], vec2_t uv[4] ) +{ + vec3_t temp; + + // Nasty crap + VectorScale( verts[0], 1.0f - uv[0][0], subVerts[0] ); + VectorMA( subVerts[0], uv[0][0], verts[1], subVerts[0] ); + VectorScale( subVerts[0], 1.0f - uv[0][1], temp ); + VectorScale( verts[3], 1.0f - uv[0][0], subVerts[0] ); + VectorMA( subVerts[0], uv[0][0], verts[2], subVerts[0] ); + VectorMA( temp, uv[0][1], subVerts[0], subVerts[0] ); + + VectorScale( verts[0], 1.0f - uv[1][0], subVerts[1] ); + VectorMA( subVerts[1], uv[1][0], verts[1], subVerts[1] ); + VectorScale( subVerts[1], 1.0f - uv[1][1], temp ); + VectorScale( verts[3], 1.0f - uv[1][0], subVerts[1] ); + VectorMA( subVerts[1], uv[1][0], verts[2], subVerts[1] ); + VectorMA( temp, uv[1][1], subVerts[1], subVerts[1] ); + + VectorScale( verts[0], 1.0f - uv[2][0], subVerts[2] ); + VectorMA( subVerts[2], uv[2][0], verts[1], subVerts[2] ); + VectorScale( subVerts[2], 1.0f - uv[2][1], temp ); + VectorScale( verts[3], 1.0f - uv[2][0], subVerts[2] ); + VectorMA( subVerts[2], uv[2][0], verts[2], subVerts[2] ); + VectorMA( temp, uv[2][1], subVerts[2], subVerts[2] ); + + VectorScale( verts[0], 1.0f - uv[3][0], subVerts[3] ); + VectorMA( subVerts[3], uv[3][0], verts[1], subVerts[3] ); + VectorScale( subVerts[3], 1.0f - uv[3][1], temp ); + VectorScale( verts[3], 1.0f - uv[3][0], subVerts[3] ); + VectorMA( subVerts[3], uv[3][0], verts[2], subVerts[3] ); + VectorMA( temp, uv[3][1], subVerts[3], subVerts[3] ); +} +// bilinear +//f(p',q') = (1 - y) × {[(1 - x) × f(p,q)] + [x × f(p,q+1)]} + y × {[(1 - x) × f(p+1,q)] + [x × f(p+1,q+1)]}. + + +static void CG_CalcHeightWidth( vec3_t verts[4], float *height, float *width ) +{ + vec3_t dir1, dir2, cross; + + VectorSubtract( verts[3], verts[0], dir1 ); // v + VectorSubtract( verts[1], verts[0], dir2 ); // p-a + CrossProduct( dir1, dir2, cross ); + *width = VectorNormalize( cross ) / VectorNormalize( dir1 ); // v + VectorSubtract( verts[2], verts[0], dir2 ); // p-a + CrossProduct( dir1, dir2, cross ); + *width += VectorNormalize( cross ) / VectorNormalize( dir1 ); // v + *width *= 0.5f; + + VectorSubtract( verts[1], verts[0], dir1 ); // v + VectorSubtract( verts[2], verts[0], dir2 ); // p-a + CrossProduct( dir1, dir2, cross ); + *height = VectorNormalize( cross ) / VectorNormalize( dir1 ); // v + VectorSubtract( verts[3], verts[0], dir2 ); // p-a + CrossProduct( dir1, dir2, cross ); + *height += VectorNormalize( cross ) / VectorNormalize( dir1 ); // v + *height *= 0.5f; +} +//Consider a line in 3D with position vector "a" and direction vector "v" and +// let "p" be the position vector of an arbitrary point in 3D +//dist = len( crossprod(p-a,v) ) / len(v); + +void CG_InitGlass( void ) +{ + int i, t; + + // Build a table first, so that we can do a more unpredictable crack scheme + // do it once, up front to save a bit of time. + for ( i = 0; i < 20; i++ ) + { + for ( t = 0; t < 20; t++ ) + { + offX[t][i] = crandom() * 0.03f; + offZ[i][t] = crandom() * 0.03f; + } + } +} + +void Vector2Set(vec2_t a,float b,float c) +{ + a[0] = b; + a[1] = c; +} + +#define TIME_DECAY_SLOW 0.1f +#define TIME_DECAY_MED 0.04f +#define TIME_DECAY_FAST 0.009f + +void CG_DoGlass( vec3_t verts[4], vec3_t normal, vec3_t dmgPt, vec3_t dmgDir, float dmgRadius, int maxShards ) +{ + int i, t; + int mxHeight, mxWidth; + float height, width; + float stepWidth, stepHeight; + float timeDecay; + float x, z; + float xx, zz; + float dif; + int time = 0; + int glassShards = 0; + qboolean stick = qtrue; + vec3_t subVerts[4]; + vec2_t biPoints[4]; + + // To do a smarter tesselation, we should figure out the relative height and width of the brush face, + // then use this to pick a lod value from 1-3 in each axis. This will give us 1-9 lod levels, which will + // hopefully be sufficient. + CG_CalcHeightWidth( verts, &height, &width ); + + trap_S_StartSound( dmgPt, -1, CHAN_AUTO, trap_S_RegisterSound("sound/effects/glassbreak1.wav")); + + // Pick "LOD" for height + if ( height < 100 ) + { + stepHeight = 0.2f; + mxHeight = 5; + timeDecay = TIME_DECAY_SLOW; + } + else if ( height > 220 ) + { + stepHeight = 0.05f; + mxHeight = 20; + timeDecay = TIME_DECAY_FAST; + } + else + { + stepHeight = 0.1f; + mxHeight = 10; + timeDecay = TIME_DECAY_MED; + } + + // Pick "LOD" for width + /* + if ( width < 100 ) + { + stepWidth = 0.2f; + mxWidth = 5; + timeDecay = ( timeDecay + TIME_DECAY_SLOW ) * 0.5f; + } + else if ( width > 220 ) + { + stepWidth = 0.05f; + mxWidth = 20; + timeDecay = ( timeDecay + TIME_DECAY_FAST ) * 0.5f; + } + else + { + stepWidth = 0.1f; + mxWidth = 10; + timeDecay = ( timeDecay + TIME_DECAY_MED ) * 0.5f; + } + */ + + //Attempt to scale the glass directly to the size of the window + + stepWidth = (0.25f - (width*0.0002)); //(width*0.0005)); + mxWidth = width*0.2; + timeDecay = ( timeDecay + TIME_DECAY_FAST ) * 0.5f; + + if (stepWidth < 0.01f) + { + stepWidth = 0.01f; + } + if (mxWidth < 5) + { + mxWidth = 5; + } + + for ( z = 0.0f, i = 0; z < 1.0f; z += stepHeight, i++ ) + { + for ( x = 0.0f, t = 0; x < 1.0f; x += stepWidth, t++ ) + { + // This is nasty.. + if ( t > 0 && t < mxWidth ) + { + xx = x - offX[i][t]; + } + else + { + xx = x; + } + + if ( i > 0 && i < mxHeight ) + { + zz = z - offZ[t][i]; + } + else + { + zz = z; + } + + Vector2Set( biPoints[0], xx, zz ); + + if ( t + 1 > 0 && t + 1 < mxWidth ) + { + xx = x - offX[i][t + 1]; + } + else + { + xx = x; + } + + if ( i > 0 && i < mxHeight ) + { + zz = z - offZ[t + 1][i]; + } + else + { + zz = z; + } + + Vector2Set( biPoints[1], xx + stepWidth, zz ); + + if ( t + 1 > 0 && t + 1 < mxWidth ) + { + xx = x - offX[i + 1][t + 1]; + } + else + { + xx = x; + } + + if ( i + 1 > 0 && i + 1 < mxHeight ) + { + zz = z - offZ[t + 1][i + 1]; + } + else + { + zz = z; + } + + Vector2Set( biPoints[2], xx + stepWidth, zz + stepHeight); + + if ( t > 0 && t < mxWidth ) + { + xx = x - offX[i + 1][t]; + } + else + { + xx = x; + } + + if ( i + 1 > 0 && i + 1 < mxHeight ) + { + zz = z - offZ[t][i + 1]; + } + else + { + zz = z; + } + + Vector2Set( biPoints[3], xx, zz + stepHeight ); + + CG_CalcBiLerp( verts, subVerts, biPoints ); + + dif = DistanceSquared( subVerts[0], dmgPt ) * timeDecay - random() * 32; + + // If we decrease dif, we are increasing the impact area, making it more likely to blow out large holes + dif -= dmgRadius * dmgRadius; + + if ( dif > 1 ) + { + stick = qtrue; + time = dif + random() * 200; + } + else + { + stick = qfalse; + time = 0; + } + + CG_DoGlassQuad( subVerts, biPoints, stick, time, dmgDir ); + glassShards++; + + if (maxShards && glassShards >= maxShards) + { + return; + } + } + } +} + +/* +================== +CG_GlassShatter +Break glass with fancy method +================== +*/ +void CG_GlassShatter(int entnum, vec3_t dmgPt, vec3_t dmgDir, float dmgRadius, int maxShards) +{ + vec3_t verts[4], normal; + + if (cgs.inlineDrawModel[cg_entities[entnum].currentState.modelindex]) + { + trap_R_GetBModelVerts(cgs.inlineDrawModel[cg_entities[entnum].currentState.modelindex], verts, normal); + CG_DoGlass(verts, normal, dmgPt, dmgDir, dmgRadius, maxShards); + } + //otherwise something awful has happened. +} + +/* +================== +CG_GlassShatter_Old +Throws glass shards from within a given bounding box in the world +================== +*/ +void CG_GlassShatter_Old(int entnum, vec3_t org, vec3_t mins, vec3_t maxs) +{ + vec3_t velocity, a, shardorg, dif, difx; + float windowmass; + float shardsthrow = 0; + char chunkname[256]; + + trap_S_StartSound(org, entnum, CHAN_BODY, trap_S_RegisterSound("sound/effects/glassbreak1.wav")); + + VectorSubtract(maxs, mins, a); + + windowmass = VectorLength(a); //should give us some idea of how big the chunk of glass is + + while (shardsthrow < windowmass) + { + velocity[0] = crandom()*150; + velocity[1] = crandom()*150; + velocity[2] = 150 + crandom()*75; + + Com_sprintf(chunkname, sizeof(chunkname), "models/chunks/glass/glchunks_%i.md3", Q_irand(1, 6)); + VectorCopy(org, shardorg); + + dif[0] = (maxs[0]-mins[0])/2; + dif[1] = (maxs[1]-mins[1])/2; + dif[2] = (maxs[2]-mins[2])/2; + + if (dif[0] < 2) + { + dif[0] = 2; + } + if (dif[1] < 2) + { + dif[1] = 2; + } + if (dif[2] < 2) + { + dif[2] = 2; + } + + difx[0] = Q_irand(1, (dif[0]*0.9)*2); + difx[1] = Q_irand(1, (dif[1]*0.9)*2); + difx[2] = Q_irand(1, (dif[2]*0.9)*2); + + if (difx[0] > dif[0]) + { + shardorg[0] += difx[0]-(dif[0]); + } + else + { + shardorg[0] -= difx[0]; + } + if (difx[1] > dif[1]) + { + shardorg[1] += difx[1]-(dif[1]); + } + else + { + shardorg[1] -= difx[1]; + } + if (difx[2] > dif[2]) + { + shardorg[2] += difx[2]-(dif[2]); + } + else + { + shardorg[2] -= difx[2]; + } + + //CG_TestLine(org, shardorg, 5000, 0x0000ff, 3); + + CG_ThrowChunk( shardorg, velocity, trap_R_RegisterModel( chunkname ), 0, 254 ); + + shardsthrow += 10; + } +} + +/* +================== +CG_CreateDebris +Throws specified debris from within a given bounding box in the world +================== +*/ +#define DEBRIS_SPECIALCASE_ROCK -1 +#define DEBRIS_SPECIALCASE_CHUNKS -2 +#define DEBRIS_SPECIALCASE_WOOD -3 +#define DEBRIS_SPECIALCASE_GLASS -4 + +#define NUM_DEBRIS_MODELS_GLASS 8 +#define NUM_DEBRIS_MODELS_WOOD 8 +#define NUM_DEBRIS_MODELS_CHUNKS 3 +#define NUM_DEBRIS_MODELS_ROCKS 4 //12 + +int dbModels_Glass[NUM_DEBRIS_MODELS_GLASS]; +int dbModels_Wood[NUM_DEBRIS_MODELS_WOOD]; +int dbModels_Chunks[NUM_DEBRIS_MODELS_CHUNKS]; +int dbModels_Rocks[NUM_DEBRIS_MODELS_ROCKS]; + +void CG_CreateDebris(int entnum, vec3_t org, vec3_t mins, vec3_t maxs, int debrissound, int debrismodel) +{ + vec3_t velocity, a, shardorg, dif, difx; + float windowmass; + float shardsthrow = 0; + int omodel = debrismodel; + + if (omodel == DEBRIS_SPECIALCASE_GLASS && !dbModels_Glass[0]) + { //glass no longer exists, using it for metal. + dbModels_Glass[0] = trap_R_RegisterModel("models/chunks/metal/metal1_1.md3"); + dbModels_Glass[1] = trap_R_RegisterModel("models/chunks/metal/metal1_2.md3"); + dbModels_Glass[2] = trap_R_RegisterModel("models/chunks/metal/metal1_3.md3"); + dbModels_Glass[3] = trap_R_RegisterModel("models/chunks/metal/metal1_4.md3"); + dbModels_Glass[4] = trap_R_RegisterModel("models/chunks/metal/metal2_1.md3"); + dbModels_Glass[5] = trap_R_RegisterModel("models/chunks/metal/metal2_2.md3"); + dbModels_Glass[6] = trap_R_RegisterModel("models/chunks/metal/metal2_3.md3"); + dbModels_Glass[7] = trap_R_RegisterModel("models/chunks/metal/metal2_4.md3"); + } + if (omodel == DEBRIS_SPECIALCASE_WOOD && !dbModels_Wood[0]) + { + dbModels_Wood[0] = trap_R_RegisterModel("models/chunks/crate/crate1_1.md3"); + dbModels_Wood[1] = trap_R_RegisterModel("models/chunks/crate/crate1_2.md3"); + dbModels_Wood[2] = trap_R_RegisterModel("models/chunks/crate/crate1_3.md3"); + dbModels_Wood[3] = trap_R_RegisterModel("models/chunks/crate/crate1_4.md3"); + dbModels_Wood[4] = trap_R_RegisterModel("models/chunks/crate/crate2_1.md3"); + dbModels_Wood[5] = trap_R_RegisterModel("models/chunks/crate/crate2_2.md3"); + dbModels_Wood[6] = trap_R_RegisterModel("models/chunks/crate/crate2_3.md3"); + dbModels_Wood[7] = trap_R_RegisterModel("models/chunks/crate/crate2_4.md3"); + } + if (omodel == DEBRIS_SPECIALCASE_CHUNKS && !dbModels_Chunks[0]) + { + dbModels_Chunks[0] = trap_R_RegisterModel("models/chunks/generic/chunks_1.md3"); + dbModels_Chunks[1] = trap_R_RegisterModel("models/chunks/generic/chunks_2.md3"); + } + if (omodel == DEBRIS_SPECIALCASE_ROCK && !dbModels_Rocks[0]) + { + dbModels_Rocks[0] = trap_R_RegisterModel("models/chunks/rock/rock1_1.md3"); + dbModels_Rocks[1] = trap_R_RegisterModel("models/chunks/rock/rock1_2.md3"); + dbModels_Rocks[2] = trap_R_RegisterModel("models/chunks/rock/rock1_3.md3"); + dbModels_Rocks[3] = trap_R_RegisterModel("models/chunks/rock/rock1_4.md3"); + /* + dbModels_Rocks[4] = trap_R_RegisterModel("models/chunks/rock/rock2_1.md3"); + dbModels_Rocks[5] = trap_R_RegisterModel("models/chunks/rock/rock2_2.md3"); + dbModels_Rocks[6] = trap_R_RegisterModel("models/chunks/rock/rock2_3.md3"); + dbModels_Rocks[7] = trap_R_RegisterModel("models/chunks/rock/rock2_4.md3"); + dbModels_Rocks[8] = trap_R_RegisterModel("models/chunks/rock/rock3_1.md3"); + dbModels_Rocks[9] = trap_R_RegisterModel("models/chunks/rock/rock3_2.md3"); + dbModels_Rocks[10] = trap_R_RegisterModel("models/chunks/rock/rock3_3.md3"); + dbModels_Rocks[11] = trap_R_RegisterModel("models/chunks/rock/rock3_4.md3"); + */ + } + + VectorSubtract(maxs, mins, a); + + windowmass = VectorLength(a); //should give us some idea of how big the chunk of glass is + + while (shardsthrow < windowmass) + { + velocity[0] = crandom()*150; + velocity[1] = crandom()*150; + velocity[2] = 150 + crandom()*75; + + if (omodel == DEBRIS_SPECIALCASE_GLASS) + { + debrismodel = dbModels_Glass[Q_irand(0, NUM_DEBRIS_MODELS_GLASS-1)]; + } + else if (omodel == DEBRIS_SPECIALCASE_WOOD) + { + debrismodel = dbModels_Wood[Q_irand(0, NUM_DEBRIS_MODELS_WOOD-1)]; + } + else if (omodel == DEBRIS_SPECIALCASE_CHUNKS) + { + debrismodel = dbModels_Chunks[Q_irand(0, NUM_DEBRIS_MODELS_CHUNKS-1)]; + } + else if (omodel == DEBRIS_SPECIALCASE_ROCK) + { + debrismodel = dbModels_Rocks[Q_irand(0, NUM_DEBRIS_MODELS_ROCKS-1)]; + } + + VectorCopy(org, shardorg); + + dif[0] = (maxs[0]-mins[0])/2; + dif[1] = (maxs[1]-mins[1])/2; + dif[2] = (maxs[2]-mins[2])/2; + + if (dif[0] < 2) + { + dif[0] = 2; + } + if (dif[1] < 2) + { + dif[1] = 2; + } + if (dif[2] < 2) + { + dif[2] = 2; + } + + difx[0] = Q_irand(1, (dif[0]*0.9)*2); + difx[1] = Q_irand(1, (dif[1]*0.9)*2); + difx[2] = Q_irand(1, (dif[2]*0.9)*2); + + if (difx[0] > dif[0]) + { + shardorg[0] += difx[0]-(dif[0]); + } + else + { + shardorg[0] -= difx[0]; + } + if (difx[1] > dif[1]) + { + shardorg[1] += difx[1]-(dif[1]); + } + else + { + shardorg[1] -= difx[1]; + } + if (difx[2] > dif[2]) + { + shardorg[2] += difx[2]-(dif[2]); + } + else + { + shardorg[2] -= difx[2]; + } + + //CG_TestLine(org, shardorg, 5000, 0x0000ff, 3); + + CG_ThrowChunk( shardorg, velocity, debrismodel, debrissound, 0 ); + + shardsthrow += 10; + } +} + +/* +================== +CG_ScorePlum +================== +*/ +void CG_ScorePlum( int client, vec3_t org, int score ) { + localEntity_t *le; + refEntity_t *re; + vec3_t angles; + static vec3_t lastPos; + + // only visualize for the client that scored + if (client != cg.predictedPlayerState.clientNum || cg_scorePlum.integer == 0) { + return; + } + + le = CG_AllocLocalEntity(); + le->leFlags = 0; + le->leType = LE_SCOREPLUM; + le->startTime = cg.time; + le->endTime = cg.time + 4000; + le->lifeRate = 1.0 / ( le->endTime - le->startTime ); + + + le->color[0] = le->color[1] = le->color[2] = le->color[3] = 1.0; + le->radius = score; + + VectorCopy( org, le->pos.trBase ); + if (org[2] >= lastPos[2] - 20 && org[2] <= lastPos[2] + 20) { + le->pos.trBase[2] -= 20; + } + + //CG_Printf( "Plum origin %i %i %i -- %i\n", (int)org[0], (int)org[1], (int)org[2], (int)Distance(org, lastPos)); + VectorCopy(org, lastPos); + + + re = &le->refEntity; + + re->reType = RT_SPRITE; + re->radius = 16; + + VectorClear(angles); + AnglesToAxis( angles, re->axis ); +} + + +/* +------------------------- +CG_ExplosionEffects + +Used to find the player and shake the camera if close enough +intensity ranges from 1 (minor tremble) to 16 (major quake) +------------------------- +*/ + +void CG_ExplosionEffects( vec3_t origin, float intensity, int radius) +{ + //FIXME: When exactly is the vieworg calculated in relation to the rest of the frame?s + + vec3_t dir; + float dist, intensityScale; + float realIntensity; + + VectorSubtract( cg.refdef.vieworg, origin, dir ); + dist = VectorNormalize( dir ); + + //Use the dir to add kick to the explosion + + if ( dist > radius ) + return; + + intensityScale = 1 - ( dist / (float) radius ); + realIntensity = intensity * intensityScale; + +// CGCam_Shake( realIntensity, 750 ); // 500 seemed a bit too quick +} + + +/* +==================== +CG_MakeExplosion +==================== +*/ +localEntity_t *CG_MakeExplosion( vec3_t origin, vec3_t dir, + qhandle_t hModel, int numFrames, qhandle_t shader, + int msec, qboolean isSprite, float scale, int flags ) +{ + float ang = 0; + localEntity_t *ex; + int offset; + vec3_t tmpVec, newOrigin; + + if ( msec <= 0 ) { + CG_Error( "CG_MakeExplosion: msec = %i", msec ); + } + + // skew the time a bit so they aren't all in sync + offset = rand() & 63; + + ex = CG_AllocLocalEntity(); + if ( isSprite ) { + ex->leType = LE_SPRITE_EXPLOSION; + ex->refEntity.rotation = rand() % 360; + ex->radius = scale; + VectorScale( dir, 16, tmpVec ); + VectorAdd( tmpVec, origin, newOrigin ); + } else { + ex->leType = LE_EXPLOSION; + VectorCopy( origin, newOrigin ); + + // set axis with random rotate when necessary + if ( !dir ) + { + AxisClear( ex->refEntity.axis ); + } + else + { + if ( !(flags & LEF_NO_RANDOM_ROTATE) ) + ang = rand() % 360; + VectorCopy( dir, ex->refEntity.axis[0] ); + RotateAroundDirection( ex->refEntity.axis, ang ); + } + } + + ex->startTime = cg.time - offset; + ex->endTime = ex->startTime + msec; + + // bias the time so all shader effects start correctly + ex->refEntity.shaderTime = ex->startTime / 1000.0f; + + ex->refEntity.hModel = hModel; + ex->refEntity.customShader = shader; + ex->lifeRate = (float)numFrames / msec; + ex->leFlags = flags; + + //Scale the explosion + if (scale != 1) { + ex->refEntity.nonNormalizedAxes = qtrue; + + VectorScale( ex->refEntity.axis[0], scale, ex->refEntity.axis[0] ); + VectorScale( ex->refEntity.axis[1], scale, ex->refEntity.axis[1] ); + VectorScale( ex->refEntity.axis[2], scale, ex->refEntity.axis[2] ); + } + // set origin + VectorCopy ( newOrigin, ex->refEntity.origin); + VectorCopy ( newOrigin, ex->refEntity.oldorigin ); + + ex->color[0] = ex->color[1] = ex->color[2] = 1.0; + + return ex; +} + + +/* +------------------------- +CG_SurfaceExplosion + +Adds an explosion to a surface +------------------------- +*/ + +#define NUM_SPARKS 12 +#define NUM_PUFFS 1 +#define NUM_EXPLOSIONS 4 + +void CG_SurfaceExplosion( vec3_t origin, vec3_t normal, float radius, float shake_speed, qboolean smoke ) +{ + localEntity_t *le; + //FXTrail *particle; + vec3_t direction, new_org; + vec3_t velocity = { 0, 0, 0 }; + vec3_t temp_org, temp_vel; + float scale, dscale; + int i, numSparks; + + //Sparks + numSparks = 16 + (random() * 16.0f); + + for ( i = 0; i < numSparks; i++ ) + { + scale = 0.25f + (random() * 2.0f); + dscale = -scale*0.5; + +/* particle = FX_AddTrail( origin, + NULL, + NULL, + 32.0f, + -64.0f, + scale, + -scale, + 1.0f, + 0.0f, + 0.25f, + 4000.0f, + cgs.media.sparkShader, + rand() & FXF_BOUNCE); + if ( particle == NULL ) + return; + + FXE_Spray( normal, 500, 150, 1.0f, 768 + (rand() & 255), (FXPrimitive *) particle );*/ + } + + //Smoke + //Move this out a little from the impact surface + VectorMA( origin, 4, normal, new_org ); + VectorSet( velocity, 0.0f, 0.0f, 16.0f ); + + for ( i = 0; i < 4; i++ ) + { + VectorSet( temp_org, new_org[0] + (crandom() * 16.0f), new_org[1] + (crandom() * 16.0f), new_org[2] + (random() * 4.0f) ); + VectorSet( temp_vel, velocity[0] + (crandom() * 8.0f), velocity[1] + (crandom() * 8.0f), velocity[2] + (crandom() * 8.0f) ); + +/* FX_AddSprite( temp_org, + temp_vel, + NULL, + 64.0f + (random() * 32.0f), + 16.0f, + 1.0f, + 0.0f, + 20.0f + (crandom() * 90.0f), + 0.5f, + 1500.0f, + cgs.media.smokeShader, FXF_USE_ALPHA_CHAN );*/ + } + + //Core of the explosion + + //Orient the explosions to face the camera + VectorSubtract( cg.refdef.vieworg, origin, direction ); + VectorNormalize( direction ); + + //Tag the last one with a light + le = CG_MakeExplosion( origin, direction, cgs.media.explosionModel, 6, cgs.media.surfaceExplosionShader, 500, qfalse, radius * 0.02f + (random() * 0.3f), 0); + le->light = 150; + VectorSet( le->lightColor, 0.9f, 0.8f, 0.5f ); + + for ( i = 0; i < NUM_EXPLOSIONS-1; i ++) + { + VectorSet( new_org, (origin[0] + (16 + (crandom() * 8))*crandom()), (origin[1] + (16 + (crandom() * 8))*crandom()), (origin[2] + (16 + (crandom() * 8))*crandom()) ); + le = CG_MakeExplosion( new_org, direction, cgs.media.explosionModel, 6, cgs.media.surfaceExplosionShader, 300 + (rand() & 99), qfalse, radius * 0.05f + (crandom() *0.3f), 0); + } + + //Shake the camera + CG_ExplosionEffects( origin, shake_speed, 350 ); + + // The level designers wanted to be able to turn the smoke spawners off. The rationale is that they + // want to blow up catwalks and such that fall down...when that happens, it shouldn't really leave a mark + // and a smoke spewer at the explosion point... + if ( smoke ) + { + VectorMA( origin, -8, normal, temp_org ); +// FX_AddSpawner( temp_org, normal, NULL, NULL, 100, random()*25.0f, 5000.0f, (void *) CG_SmokeSpawn ); + + //Impact mark + //FIXME: Replace mark + //CG_ImpactMark( cgs.media.burnMarkShader, origin, normal, random()*360, 1,1,1,1, qfalse, 8, qfalse ); + } +} + +/* +================= +CG_Bleed + +This is the spurt of blood when a character gets hit +================= +*/ +void CG_Bleed( vec3_t origin, int entityNum ) { + localEntity_t *ex; + + if ( !cg_blood.integer ) { + return; + } + + ex = CG_AllocLocalEntity(); + ex->leType = LE_EXPLOSION; + + ex->startTime = cg.time; + ex->endTime = ex->startTime + 500; + + VectorCopy ( origin, ex->refEntity.origin); + ex->refEntity.reType = RT_SPRITE; + ex->refEntity.rotation = rand() % 360; + ex->refEntity.radius = 24; + + ex->refEntity.customShader = 0;//cgs.media.bloodExplosionShader; + + // don't show player's own blood in view + if ( entityNum == cg.snap->ps.clientNum ) { + ex->refEntity.renderfx |= RF_THIRD_PERSON; + } +} + + + +/* +================== +CG_LaunchGib +================== +*/ +void CG_LaunchGib( vec3_t origin, vec3_t velocity, qhandle_t hModel ) { + localEntity_t *le; + refEntity_t *re; + + le = CG_AllocLocalEntity(); + re = &le->refEntity; + + le->leType = LE_FRAGMENT; + le->startTime = cg.time; + le->endTime = le->startTime + 5000 + random() * 3000; + + VectorCopy( origin, re->origin ); + AxisCopy( axisDefault, re->axis ); + re->hModel = hModel; + + le->pos.trType = TR_GRAVITY; + VectorCopy( origin, le->pos.trBase ); + VectorCopy( velocity, le->pos.trDelta ); + le->pos.trTime = cg.time; + + le->bounceFactor = 0.6f; + + le->leBounceSoundType = LEBS_BLOOD; + le->leMarkType = LEMT_BLOOD; +} diff --git a/code/cgame/cg_ents (2).c b/code/cgame/cg_ents (2).c new file mode 100644 index 0000000..3bcb0ba --- /dev/null +++ b/code/cgame/cg_ents (2).c @@ -0,0 +1,2734 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_ents.c -- present snapshot entities, happens every single frame + +#include "cg_local.h" +/* +Ghoul2 Insert Start +*/ +#include "..\game\q_shared.h" +#include "..\ghoul2\g2.h" +/* +Ghoul2 Insert end +*/ + +static void CG_Missile( centity_t *cent ); + +/* +====================== +CG_PositionEntityOnTag + +Modifies the entities position and axis by the given +tag location +====================== +*/ +void CG_PositionEntityOnTag( refEntity_t *entity, const refEntity_t *parent, + qhandle_t parentModel, char *tagName ) { + int i; + orientation_t lerped; + + // lerp the tag + trap_R_LerpTag( &lerped, parentModel, parent->oldframe, parent->frame, + 1.0 - parent->backlerp, tagName ); + + // FIXME: allow origin offsets along tag? + VectorCopy( parent->origin, entity->origin ); + for ( i = 0 ; i < 3 ; i++ ) { + VectorMA( entity->origin, lerped.origin[i], parent->axis[i], entity->origin ); + } + + // had to cast away the const to avoid compiler problems... + MatrixMultiply( lerped.axis, ((refEntity_t *)parent)->axis, entity->axis ); + entity->backlerp = parent->backlerp; +} + + +/* +====================== +CG_PositionRotatedEntityOnTag + +Modifies the entities position and axis by the given +tag location +====================== +*/ +void CG_PositionRotatedEntityOnTag( refEntity_t *entity, const refEntity_t *parent, + qhandle_t parentModel, char *tagName ) { + int i; + orientation_t lerped; + vec3_t tempAxis[3]; + +//AxisClear( entity->axis ); + // lerp the tag + trap_R_LerpTag( &lerped, parentModel, parent->oldframe, parent->frame, + 1.0 - parent->backlerp, tagName ); + + // FIXME: allow origin offsets along tag? + VectorCopy( parent->origin, entity->origin ); + for ( i = 0 ; i < 3 ; i++ ) { + VectorMA( entity->origin, lerped.origin[i], parent->axis[i], entity->origin ); + } + + // had to cast away the const to avoid compiler problems... + MatrixMultiply( entity->axis, lerped.axis, tempAxis ); + MatrixMultiply( tempAxis, ((refEntity_t *)parent)->axis, entity->axis ); +} + + + +/* +========================================================================== + +FUNCTIONS CALLED EACH FRAME + +========================================================================== +*/ + +/* +====================== +CG_SetEntitySoundPosition + +Also called by event processing code +====================== +*/ +void CG_SetEntitySoundPosition( centity_t *cent ) { + if ( cent->currentState.solid == SOLID_BMODEL ) + { + vec3_t origin; + float *v; + + v = cgs.inlineModelMidpoints[ cent->currentState.modelindex ]; + VectorAdd( cent->lerpOrigin, v, origin ); + trap_S_UpdateEntityPosition( cent->currentState.number, origin ); + } + else + { + trap_S_UpdateEntityPosition( cent->currentState.number, cent->lerpOrigin ); + } +} + +/* +================== +CG_EntityEffects + +Add continuous entity effects, like local entity emission and lighting +================== +*/ +static void CG_EntityEffects( centity_t *cent ) { + + // update sound origins + CG_SetEntitySoundPosition( cent ); + + // add loop sound + if ( cent->currentState.loopSound ) { + //rww - doors and things with looping sounds have a crazy origin (being brush models and all) + if ( cent->currentState.solid == SOLID_BMODEL ) + { + vec3_t origin; + float *v; + + v = cgs.inlineModelMidpoints[ cent->currentState.modelindex ]; + VectorAdd( cent->lerpOrigin, v, origin ); + trap_S_AddLoopingSound( cent->currentState.number, origin, vec3_origin, + cgs.gameSounds[ cent->currentState.loopSound ] ); + } + else if (cent->currentState.eType != ET_SPEAKER) { + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, + cgs.gameSounds[ cent->currentState.loopSound ] ); + } else { + trap_S_AddRealLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, + cgs.gameSounds[ cent->currentState.loopSound ] ); + } + } + + + // constant light glow + if ( cent->currentState.constantLight ) { + int cl; + int i, r, g, b; + + cl = cent->currentState.constantLight; + r = cl & 255; + g = ( cl >> 8 ) & 255; + b = ( cl >> 16 ) & 255; + i = ( ( cl >> 24 ) & 255 ) * 4; + trap_R_AddLightToScene( cent->lerpOrigin, i, r, g, b ); + } + +} + +localEntity_t *FX_AddOrientedLine(vec3_t start, vec3_t end, vec3_t normal, float stScale, float scale, + float dscale, float startalpha, float endalpha, float killTime, qhandle_t shader) +{ + localEntity_t *le; + +#ifdef _DEBUG + if (!shader) + { + Com_Printf("FX_AddLine: NULL shader\n"); + } +#endif + + le = CG_AllocLocalEntity(); + le->leType = LE_OLINE; + + le->startTime = cg.time; + le->endTime = le->startTime + killTime; + le->data.line.width = scale; + le->data.line.dwidth = dscale; + + le->alpha = startalpha; + le->dalpha = endalpha - startalpha; + + le->refEntity.data.line.stscale = stScale; + le->refEntity.data.line.width = scale; + + le->refEntity.customShader = shader; + + // set origin + VectorCopy ( start, le->refEntity.origin); + VectorCopy ( end, le->refEntity.oldorigin ); + + AxisClear(le->refEntity.axis); + VectorCopy( normal, le->refEntity.axis[0] ); + RotateAroundDirection( le->refEntity.axis, 0); // le->refEntity.data.sprite.rotation ); This is roll in quad land + + le->refEntity.shaderRGBA[0] = 0xff; + le->refEntity.shaderRGBA[1] = 0xff; + le->refEntity.shaderRGBA[2] = 0xff; + le->refEntity.shaderRGBA[3] = 0xff; + + le->color[0] = 1.0; + le->color[1] = 1.0; + le->color[2] = 1.0; + le->color[3] = 1.0; + le->lifeRate = 1.0 / ( le->endTime - le->startTime ); + + return(le); +} + +void FX_DrawPortableShield(centity_t *cent) +{ + //rww - this code differs a bit from the draw code in EF, I don't know why I had to do + //it this way yet it worked in EF the other way. + + int xaxis, height, posWidth, negWidth, team; + vec3_t start, end, normal; + localEntity_t *le; + qhandle_t shader; + char buf[1024]; + + trap_Cvar_VariableStringBuffer("cl_paused", buf, sizeof(buf)); + + if (atoi(buf)) + { //rww - fix to keep from rendering repeatedly while HUD menu is up + return; + } + + if (cent->currentState.eFlags & EF_NODRAW) + { + return; + } + + // decode the data stored in time2 + xaxis = ((cent->currentState.time2 >> 24) & 1); + height = ((cent->currentState.time2 >> 16) & 255); + posWidth = ((cent->currentState.time2 >> 8) & 255); + negWidth = (cent->currentState.time2 & 255); + + team = (cent->currentState.otherEntityNum2); + + VectorClear(normal); + + VectorCopy(cent->lerpOrigin, start); + VectorCopy(cent->lerpOrigin, end); + + if (xaxis) // drawing along x-axis + { + start[0] -= negWidth; + end[0] += posWidth; + } + else + { + start[1] -= negWidth; + end[1] += posWidth; + } + + normal[0] = 1; + normal[1] = 1; + + start[2] += height/2; + end[2] += height/2; + + if (team == TEAM_RED) + { + if (cent->currentState.trickedentindex) + { + shader = trap_R_RegisterShader( "gfx/misc/red_dmgshield" ); + } + else + { + shader = trap_R_RegisterShader( "gfx/misc/red_portashield" ); + } + } + else + { + if (cent->currentState.trickedentindex) + { + shader = trap_R_RegisterShader( "gfx/misc/blue_dmgshield" ); + } + else + { + shader = trap_R_RegisterShader( "gfx/misc/blue_portashield" ); + } + } + + le = FX_AddOrientedLine(start, end, normal, 1.0f, height, 0.0f, 1.0f, 1.0f, 50.0, shader); +} + +/* +================== +CG_Special +================== +*/ +void CG_Special( centity_t *cent ) { + entityState_t *s1; + + s1 = ¢->currentState; + + if (!s1) + { + return; + } + + // if set to invisible, skip + if (!s1->modelindex) { + return; + } + + if (s1->modelindex == HI_SHIELD) + { // The portable shield should go through a different rendering function. + FX_DrawPortableShield(cent); + return; + } +} + +/* +Ghoul2 Insert Start +*/ + +// Copy the ghoul2 data into the ref ent correctly +void CG_SetGhoul2Info( refEntity_t *ent, centity_t *cent) +{ + + ent->ghoul2 = cent->ghoul2; + VectorCopy( cent->modelScale, ent->modelScale); + ent->radius = cent->radius; + VectorCopy (cent->lerpAngles, ent->angles); +} + + + +// create 8 new points on screen around a model so we can see it's bounding box +void CG_CreateBBRefEnts(entityState_t *s1, vec3_t origin ) +{ +/* +//g2r +#if _DEBUG + refEntity_t point[8]; + int i; + vec3_t angles = {0,0,0}; + + for (i=0; i<8; i++) + { + memset (&point[i], 0, sizeof(refEntity_t)); + point[i].reType = RT_SPRITE; + point[i].radius = 1; + point[i].customShader = trap_R_RegisterShader("textures/tests/circle"); + point[i].shaderRGBA[0] = 255; + point[i].shaderRGBA[1] = 255; + point[i].shaderRGBA[2] = 255; + point[i].shaderRGBA[3] = 255; + + AnglesToAxis( angles, point[i].axis ); + + // now, we need to put the correct origins into each origin from the mins and max's + switch(i) + { + case 0: + VectorCopy(s1->mins, point[i].origin); + break; + case 1: + VectorCopy(s1->mins, point[i].origin); + point[i].origin[0] = s1->maxs[0]; + break; + case 2: + VectorCopy(s1->mins, point[i].origin); + point[i].origin[1] = s1->maxs[1]; + break; + case 3: + VectorCopy(s1->mins, point[i].origin); + point[i].origin[0] = s1->maxs[0]; + point[i].origin[1] = s1->maxs[1]; + break; + case 4: + VectorCopy(s1->maxs, point[i].origin); + break; + case 5: + VectorCopy(s1->maxs, point[i].origin); + point[i].origin[0] = s1->mins[0]; + break; + case 6: + VectorCopy(s1->maxs, point[i].origin); + point[i].origin[1] = s1->mins[1]; + break; + case 7: + VectorCopy(s1->maxs, point[i].origin); + point[i].origin[0] = s1->mins[0]; + point[i].origin[1] = s1->mins[1]; + break; + } + + // add the original origin to each point and then stuff them out there + VectorAdd(point[i].origin, origin, point[i].origin); + + trap_R_AddRefEntityToScene (&point[i]); + } +#endif + */ +} + +// write in the axis and stuff +void G2_BoltToGhoul2Model(centity_t *cent, refEntity_t *ent) +{ + // extract the wraith ID from the bolt info + int modelNum = cent->boltInfo >> MODEL_SHIFT; + int boltNum = cent->boltInfo >> BOLT_SHIFT; + int entNum = cent->boltInfo >> ENTITY_SHIFT; + mdxaBone_t boltMatrix; + + modelNum &= MODEL_AND; + boltNum &= BOLT_AND; + entNum &= ENTITY_AND; + + + //NOTENOTE I put this here because the cgs.gamemodels array no longer gets initialized. + assert(0); + + + // go away and get me the bolt position for this frame please + trap_G2API_GetBoltMatrix(cent->ghoul2, modelNum, boltNum, &boltMatrix, cg_entities[entNum].currentState.angles, cg_entities[entNum].currentState.origin, cg.time, cgs.gameModels, cent->modelScale); + + // set up the axis and origin we need for the actual effect spawning + ent->origin[0] = boltMatrix.matrix[0][3]; + ent->origin[1] = boltMatrix.matrix[1][3]; + ent->origin[2] = boltMatrix.matrix[2][3]; + + ent->axis[0][0] = boltMatrix.matrix[0][0]; + ent->axis[0][1] = boltMatrix.matrix[1][0]; + ent->axis[0][2] = boltMatrix.matrix[2][0]; + + ent->axis[1][0] = boltMatrix.matrix[0][1]; + ent->axis[1][1] = boltMatrix.matrix[1][1]; + ent->axis[1][2] = boltMatrix.matrix[2][1]; + + ent->axis[2][0] = boltMatrix.matrix[0][2]; + ent->axis[2][1] = boltMatrix.matrix[1][2]; + ent->axis[2][2] = boltMatrix.matrix[2][2]; +} + +void ScaleModelAxis(refEntity_t *ent) + +{ // scale the model should we need to + if (ent->modelScale[0] && ent->modelScale[0] != 1.0f) + { + VectorScale( ent->axis[0], ent->modelScale[0] , ent->axis[0] ); + ent->nonNormalizedAxes = qtrue; + } + if (ent->modelScale[1] && ent->modelScale[1] != 1.0f) + { + VectorScale( ent->axis[1], ent->modelScale[1] , ent->axis[1] ); + ent->nonNormalizedAxes = qtrue; + } + if (ent->modelScale[2] && ent->modelScale[2] != 1.0f) + { + VectorScale( ent->axis[2], ent->modelScale[2] , ent->axis[2] ); + ent->nonNormalizedAxes = qtrue; + } +} +/* +Ghoul2 Insert End +*/ + +char *forceHolocronModels[] = { + "models/map_objects/mp/lt_heal.md3", //FP_HEAL, + "models/map_objects/mp/force_jump.md3", //FP_LEVITATION, + "models/map_objects/mp/force_speed.md3", //FP_SPEED, + "models/map_objects/mp/force_push.md3", //FP_PUSH, + "models/map_objects/mp/force_pull.md3", //FP_PULL, + "models/map_objects/mp/lt_telepathy.md3", //FP_TELEPATHY, + "models/map_objects/mp/dk_grip.md3", //FP_GRIP, + "models/map_objects/mp/dk_lightning.md3", //FP_LIGHTNING, + "models/map_objects/mp/dk_rage.md3", //FP_RAGE, + "models/map_objects/mp/lt_protect.md3", //FP_PROTECT, + "models/map_objects/mp/lt_absorb.md3", //FP_ABSORB, + "models/map_objects/mp/lt_healother.md3", //FP_TEAM_HEAL, + "models/map_objects/mp/dk_powerother.md3", //FP_TEAM_FORCE, + "models/map_objects/mp/dk_drain.md3", //FP_DRAIN, + "models/map_objects/mp/force_sight.md3", //FP_SEE, + "models/map_objects/mp/saber_attack.md3", //FP_SABERATTACK, + "models/map_objects/mp/saber_defend.md3", //FP_SABERDEFEND, + "models/map_objects/mp/saber_throw.md3" //FP_SABERTHROW +}; + +/* +================== +CG_General +================== +*/ +static void CG_General( centity_t *cent ) { + refEntity_t ent; + entityState_t *s1; + float val; + int beamID; + vec3_t beamOrg; + mdxaBone_t matrix; + qboolean doNotSetModel = qfalse; + + if (cent->currentState.modelGhoul2 == 127) + { //not ready to be drawn or initialized.. + return; + } + + if (cent->ghoul2 && !cent->currentState.modelGhoul2 && cent->currentState.eType != ET_BODY && + cent->currentState.number >= MAX_CLIENTS) + { //this is a bad thing + if (trap_G2_HaveWeGhoul2Models(cent->ghoul2)) + { + trap_G2API_CleanGhoul2Models(&(cent->ghoul2)); + } + } + + if (cent->currentState.modelGhoul2 >= G2_MODELPART_HEAD && + cent->currentState.modelGhoul2 <= G2_MODELPART_RLEG && + cent->currentState.modelindex < MAX_CLIENTS && + cent->currentState.weapon == G2_MODEL_PART) + { //special case for client limbs + centity_t *clEnt; + int dismember_settings = cg_dismember.integer; + + doNotSetModel = qtrue; + + if (cent->currentState.modelindex >= 0) + { + clEnt = &cg_entities[cent->currentState.modelindex]; + } + else + { + clEnt = &cg_entities[cent->currentState.otherEntityNum2]; + } + + if (!dismember_settings) + { //This client does not wish to see dismemberment. + return; + } + + if (dismember_settings < 2 && (cent->currentState.modelGhoul2 == G2_MODELPART_HEAD || cent->currentState.modelGhoul2 == G2_MODELPART_WAIST)) + { //dismember settings are not high enough to display decaps and torso slashes + return; + } + + if (!cent->ghoul2) + { + const char *limbBone; + const char *rotateBone; + char *limbName; + char *limbCapName; + char *stubCapName; + char *limbTagName; + char *stubTagName; + int limb_anim; + int newBolt; + + if (clEnt && clEnt->torsoBolt) + { //already have a limb missing! + return; + } + + + if (clEnt && !(clEnt->currentState.eFlags & EF_DEAD)) + { //death flag hasn't made it through yet for the limb owner, we cannot create the limb until he's flagged as dead + return; + } + + cent->bolt4 = -1; + cent->trailTime = 0; + + if (cent->currentState.modelGhoul2 == G2_MODELPART_HEAD) + { + limbBone = "cervical"; + rotateBone = "cranium"; + limbName = "head"; + limbCapName = "head_cap_torso_off"; + stubCapName = "torso_cap_head_off"; + limbTagName = "*head_cap_torso"; + stubTagName = "*torso_cap_head"; + limb_anim = BOTH_DISMEMBER_HEAD1; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_WAIST) + { + limbBone = "pelvis"; + rotateBone = "thoracic"; + limbName = "torso"; + limbCapName = "torso_cap_hips_off"; + stubCapName = "hips_cap_torso_off"; + limbTagName = "*torso_cap_hips"; + stubTagName = "*hips_cap_torso"; + limb_anim = BOTH_DISMEMBER_TORSO1; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_LARM) + { + limbBone = "lhumerus"; + rotateBone = "lradius"; + limbName = "l_arm"; + limbCapName = "l_arm_cap_torso_off"; + stubCapName = "torso_cap_l_arm_off"; + limbTagName = "*l_arm_cap_torso"; + stubTagName = "*torso_cap_l_arm"; + limb_anim = BOTH_DISMEMBER_LARM; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_RARM) + { + limbBone = "rhumerus"; + rotateBone = "rradius"; + limbName = "r_arm"; + limbCapName = "r_arm_cap_torso_off"; + stubCapName = "torso_cap_r_arm_off"; + limbTagName = "*r_arm_cap_torso"; + stubTagName = "*torso_cap_r_arm"; + limb_anim = BOTH_DISMEMBER_RARM; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_RHAND) + { + limbBone = "rradiusX"; + rotateBone = "rhand"; + limbName = "r_hand"; + limbCapName = "r_hand_cap_r_arm_off"; + stubCapName = "r_arm_cap_r_hand_off"; + limbTagName = "*r_hand_cap_r_arm"; + stubTagName = "*r_arm_cap_r_hand"; + limb_anim = BOTH_DISMEMBER_RARM; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_LLEG) + { + limbBone = "lfemurYZ"; + rotateBone = "ltibia"; + limbName = "l_leg"; + limbCapName = "l_leg_cap_hips_off"; + stubCapName = "hips_cap_l_leg_off"; + limbTagName = "*l_leg_cap_hips"; + stubTagName = "*hips_cap_l_leg"; + limb_anim = BOTH_DISMEMBER_LLEG; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_RLEG) + { + limbBone = "rfemurYZ"; + rotateBone = "rtibia"; + limbName = "r_leg"; + limbCapName = "r_leg_cap_hips_off"; + stubCapName = "hips_cap_r_leg_off"; + limbTagName = "*r_leg_cap_hips"; + stubTagName = "*hips_cap_r_leg"; + limb_anim = BOTH_DISMEMBER_RLEG; + } + else + { + limbBone = "rfemurYZ"; + rotateBone = "rtibia"; + limbName = "r_leg"; + limbCapName = "r_leg_cap_hips_off"; + stubCapName = "hips_cap_r_leg_off"; + limbTagName = "*r_leg_cap_hips"; + stubTagName = "*hips_cap_r_leg"; + limb_anim = BOTH_DISMEMBER_RLEG; + } + + if (clEnt && clEnt->ghoul2) + { + animation_t *anim = NULL; + float animSpeed; + int flags=BONE_ANIM_OVERRIDE_FREEZE; + clientInfo_t *ci; + + if (clEnt->currentState.number < MAX_CLIENTS) + { + ci = &cgs.clientinfo[ clEnt->currentState.number ]; + } + else + { + ci = NULL; + } + + if (ci) + { + //anim = &bgGlobalAnimations[ limb_anim ]; + //I guess it looks better to continue the body anim on the severed limb. If not a bit strange. It's what + //SP seems to do anyway. + anim = &bgGlobalAnimations[ (clEnt->currentState.torsoAnim&~ANIM_TOGGLEBIT) ]; + } + else + { //a g2anim ent, maybe? For those, we can settle for generic limb anims. + anim = &bgGlobalAnimations[ limb_anim ]; + } + + trap_G2API_DuplicateGhoul2Instance(clEnt->ghoul2, ¢->ghoul2); + + if (anim) + { + int aNum; + animSpeed = 50.0f / anim->frameLerp; + + /* + if (cent->currentState.modelGhoul2 == G2_MODELPART_WAIST) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", anim->firstFrame + anim->numFrames-1, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame + anim->numFrames-1, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); + } + */ + //I guess it looks better to continue the body anim on the severed limb. If not a bit strange. It's what + //SP seems to do anyway. + if (ci) + { + aNum = ci->frame+1; + + while (aNum >= anim->firstFrame+anim->numFrames) + { + aNum--; + } + + if (aNum < anim->firstFrame-1) + { //wrong animation...? + aNum = (anim->firstFrame+anim->numFrames)-1; + } + } + else + { + aNum = anim->firstFrame; + } + + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + } + } + + if (!cent->ghoul2) + { + return; + } + + newBolt = trap_G2API_AddBolt( cent->ghoul2, 0, limbTagName ); + if ( newBolt != -1 ) + { + vec3_t boltOrg, boltAng; + + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, newBolt, &matrix, cent->lerpAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + + trap_G2API_GiveMeVectorFromMatrix(&matrix, ORIGIN, boltOrg); + trap_G2API_GiveMeVectorFromMatrix(&matrix, NEGATIVE_Y, boltAng); + + trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/smoke_bolton"), boltOrg, boltAng); + } + + cent->bolt4 = newBolt; + + trap_G2API_SetRootSurface(cent->ghoul2, 0, limbName); + + trap_G2API_SetNewOrigin(cent->ghoul2, trap_G2API_AddBolt(cent->ghoul2, 0, rotateBone)); + + trap_G2API_SetSurfaceOnOff(cent->ghoul2, limbCapName, 0); + + trap_G2API_SetSurfaceOnOff(clEnt->ghoul2, limbName, 0x00000100); + trap_G2API_SetSurfaceOnOff(clEnt->ghoul2, stubCapName, 0); + + newBolt = trap_G2API_AddBolt( clEnt->ghoul2, 0, stubTagName ); + if ( newBolt != -1 ) + { + vec3_t boltOrg, boltAng; + + trap_G2API_GetBoltMatrix(clEnt->ghoul2, 0, newBolt, &matrix, clEnt->lerpAngles, clEnt->lerpOrigin, cg.time, cgs.gameModels, clEnt->modelScale); + + trap_G2API_GiveMeVectorFromMatrix(&matrix, ORIGIN, boltOrg); + trap_G2API_GiveMeVectorFromMatrix(&matrix, NEGATIVE_Y, boltAng); + + trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/smoke_bolton"), boltOrg, boltAng); + } + + if (cent->currentState.modelGhoul2 == G2_MODELPART_RARM || cent->currentState.modelGhoul2 == G2_MODELPART_RHAND || cent->currentState.modelGhoul2 == G2_MODELPART_WAIST) + { //Cut his weapon holding arm off, so remove the weapon + if (trap_G2API_HasGhoul2ModelOnIndex(&(clEnt->ghoul2), 1)) + { + trap_G2API_RemoveGhoul2Model(&(clEnt->ghoul2), 1); + } + } + + clEnt->torsoBolt = cent->currentState.modelGhoul2; //reinit model after copying limbless one to queue + + return; + } + + if (cent->ghoul2 && cent->bolt4 != -1 && cent->trailTime < cg.time) + { + if ( cent->bolt4 != -1 && + (cent->currentState.pos.trDelta[0] || cent->currentState.pos.trDelta[1] || cent->currentState.pos.trDelta[2]) ) + { + vec3_t boltOrg, boltAng; + + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cent->bolt4, &matrix, cent->lerpAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + + trap_G2API_GiveMeVectorFromMatrix(&matrix, ORIGIN, boltOrg); + trap_G2API_GiveMeVectorFromMatrix(&matrix, NEGATIVE_Y, boltAng); + + if (!boltAng[0] && !boltAng[1] && !boltAng[2]) + { + boltAng[1] = 1; + } + trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/smoke_bolton"), boltOrg, boltAng); + + cent->trailTime = cg.time + 400; + } + } + + ent.radius = cent->currentState.g2radius; + ent.hModel = 0; + } + + if (cent->currentState.number >= MAX_CLIENTS && + cent->currentState.activeForcePass == NUM_FORCE_POWERS+1) + { + centity_t *empOwn; + vec3_t empAngles, empOrg, anglesToOwner; + float angle_ideal, angle_current, angle_dif; + float degrees_positive, degrees_negative; + int overturn = 0; + + empOwn = &cg_entities[cent->currentState.emplacedOwner]; + + if (empOwn) + { + + if (cg.snap->ps.clientNum == empOwn->currentState.number && + !cg.renderingThirdPerson) + { + VectorCopy(cg.refdefViewAngles, empAngles); + VectorCopy(cg.refdef.vieworg, empOrg); + } + else + { + VectorCopy(empOwn->lerpAngles, empAngles); + VectorCopy(empOwn->lerpOrigin, empOrg); + } + + VectorSubtract(cent->lerpOrigin, empOrg, anglesToOwner); + + vectoangles(anglesToOwner, anglesToOwner); + + if (empAngles[PITCH] > 40) + { + empAngles[PITCH] = 40; + } + + angle_ideal = empAngles[YAW]; + angle_current = anglesToOwner[YAW]; + + if (angle_current < 0) + { + angle_current += 360; + } + if (angle_current > 360) + { + angle_current -= 360; + } + if (angle_ideal < 0) + { + angle_ideal += 360; + } + if (angle_ideal > 360) + { + angle_ideal -= 360; + } + + if (angle_ideal <= angle_current) + { + degrees_negative = (angle_current - angle_ideal); + + degrees_positive = (360 - angle_current) + angle_ideal; + } + else + { + degrees_negative = angle_current + (360 - angle_ideal); + + degrees_positive = (angle_ideal - angle_current); + } + + if (degrees_negative < degrees_positive) + { + angle_dif = degrees_negative; + } + else + { + angle_dif = degrees_positive; + } + + if (cg.snap->ps.clientNum == empOwn->currentState.number) + { + cg.constrictValue = anglesToOwner[YAW]; + + cg.doConstrict = cg.time + 50; + } + + if (angle_dif > 90) + { + overturn = 1; + + if (angle_dif == degrees_negative) + { + empAngles[YAW] += (angle_dif - 90); + } + else + { + empAngles[YAW] -= (angle_dif - 90); + } + } + else if (angle_dif > 80) + { + overturn = 2; + } + + if (!overturn && cg.snap->ps.clientNum == empOwn->currentState.number) + { + float plusExt = anglesToOwner[YAW]+70; + float minusExt = anglesToOwner[YAW]-70; + + if (plusExt > 360) + { + plusExt -= 360; + } + if (minusExt < 0) + { + minusExt += 360; + } + + trap_SetClientTurnExtent(minusExt, plusExt, cg.time+5000); + + VectorCopy(empAngles, cent->turAngles); + } + else if (cg.snap->ps.clientNum == empOwn->currentState.number) + { + trap_SetClientForceAngle(cg.time+5000, cent->turAngles); + } + + // empAngles[PITCH] -= 160; + + if (empAngles[PITCH] < 0) + { + empAngles[PITCH] += 360; + } + if (empAngles[YAW] < 0) + { + empAngles[YAW] += 360; + } + + empAngles[YAW] -= cent->currentState.angles[YAW]; //slight hack so that upper rotated half looks right on angled turrets + + //AngleVectors(empAngles, NULL, NULL, up); + + //empAngles[ROLL] = -empAngles[YAW]; + //empAngles[YAW] = 0; + + //trap_G2API_SetBoneAngles(cent->ghoul2, 0, "swivel_bone", empAngles, BONE_ANGLES_REPLACE, POSITIVE_Z, NEGATIVE_X, NEGATIVE_Y, NULL, 0, cg.time); + //trap_G2API_SetBoneAngles(cent->ghoul2, 0, "swivel_bone", empAngles, BONE_ANGLES_REPLACE, POSITIVE_Z, POSITIVE_X, POSITIVE_Y, NULL, 0, cg.time); + + //constrict the pitch angles of the turret but not the player view + /* + if (empAngles[PITCH] < 170) + { + empAngles[PITCH] = 170; + } + if (empAngles[PITCH] > 240) + { + empAngles[PITCH] = 240; + } + */ + + trap_G2API_SetBoneAngles( cent->ghoul2, 0, /*"swivel_bone"*/"Bone02", empAngles, BONE_ANGLES_REPLACE, NEGATIVE_Y, NEGATIVE_X, POSITIVE_Z, NULL, 0, cg.time); + //trap_G2API_SetBoneAngles( cent->ghoul2, 0, "swivel_bone", empAngles, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 0, cg.time); + } + } + + s1 = ¢->currentState; +/* +Ghoul2 Insert Start +*/ + // if set to invisible, skip + if ((!s1->modelindex) && !(trap_G2_HaveWeGhoul2Models(cent->ghoul2))) + { + return; + } +/* +Ghoul2 Insert End +*/ + + memset (&ent, 0, sizeof(ent)); + + // set frame + + ent.frame = s1->frame; + ent.oldframe = ent.frame; + ent.backlerp = 0; + +/* +Ghoul2 Insert Start +*/ + CG_SetGhoul2Info(&ent, cent); + +/* +Ghoul2 Insert End +*/ + VectorCopy( cent->lerpOrigin, ent.origin); + VectorCopy( cent->lerpOrigin, ent.oldorigin); + + if (cent->currentState.modelGhoul2) + { //If the game says this guy uses a ghoul2 model and the g2 instance handle is null, then initialize it + if (!cent->ghoul2 && !cent->currentState.bolt1) + { + trap_G2API_InitGhoul2Model(¢->ghoul2, CG_ConfigString( CS_MODELS+cent->currentState.modelindex ), 0, 0, 0, 0, 0); + } + else if (cent->currentState.bolt1) + { + TurretClientRun(cent); + } + + if (cent->ghoul2) + { //give us a proper radius + ent.radius = cent->currentState.g2radius; + } + } + + if (s1->eType == ET_BODY) + { //bodies should have a radius as well + ent.radius = cent->currentState.g2radius; + + if (cent->ghoul2) + { //all bodies should already have a ghoul2 instance. Use it to set the torso/head angles to 0. + if (cent->isATST) + { + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "pelvis", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 100, cg.time); + ent.radius = 250; + } + else + { + cent->lerpAngles[PITCH] = 0; + cent->lerpAngles[ROLL] = 0; + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "pelvis", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "thoracic", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 100, cg.time); + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 100, cg.time); + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "cranium", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, cgs.gameModels, 100, cg.time); + } + } + } + + if (s1->eType == ET_HOLOCRON && s1->modelindex < -100) + { //special render, it's a holocron + //Using actual models now: + ent.hModel = trap_R_RegisterModel(forceHolocronModels[s1->modelindex+128]); + + //Rotate them + VectorCopy( cg.autoAngles, cent->lerpAngles ); + AxisCopy( cg.autoAxis, ent.axis ); + } + else if (!doNotSetModel) + { + ent.hModel = cgs.gameModels[s1->modelindex]; + } + + // player model + if (s1->number == cg.snap->ps.clientNum) { + ent.renderfx |= RF_THIRD_PERSON; // only draw from mirrors + } +/* +Ghoul2 Insert Start +*/ + // are we bolted to a Ghoul2 model? +/* +//g2r if (s1->boltInfo) + { + G2_BoltToGhoul2Model(s1, &ent); + } + else */ + { + // convert angles to axis + AnglesToAxis( cent->lerpAngles, ent.axis ); + } + +/* +Ghoul2 Insert End +*/ + if ( cent->currentState.time > cg.time && cent->currentState.weapon == WP_EMPLACED_GUN ) + { + // make the gun pulse red to warn about it exploding + val = (1.0f - (float)(cent->currentState.time - cg.time) / 3200.0f ) * 0.3f; + + ent.customShader = trap_R_RegisterShader( "gfx/effects/turretflashdie" ); + ent.shaderRGBA[0] = (sin( cg.time * 0.04f ) * val * 0.4f + val) * 255; + ent.shaderRGBA[1] = ent.shaderRGBA[2] = 0; + + ent.shaderRGBA[3] = 100; + trap_R_AddRefEntityToScene( &ent ); + ent.customShader = 0; + } + else if ( cent->currentState.time == -1 && cent->currentState.weapon == WP_EMPLACED_GUN) + { + ent.customShader = trap_R_RegisterShader( "models/map_objects/imp_mine/turret_chair_dmg.tga" ); + //trap_R_AddRefEntityToScene( &ent ); + } + + if ((cent->currentState.eFlags & EF_DISINTEGRATION) && cent->currentState.eType == ET_BODY) + { + vec3_t tempAng, hitLoc; + float tempLength; + + if (!cent->dustTrailTime) + { + cent->dustTrailTime = cg.time; + } + + VectorCopy(cent->currentState.origin2, hitLoc); + + VectorSubtract( hitLoc, ent.origin, ent.oldorigin ); + + tempLength = VectorNormalize( ent.oldorigin ); + vectoangles( ent.oldorigin, tempAng ); + tempAng[YAW] -= cent->lerpAngles[YAW]; + AngleVectors( tempAng, ent.oldorigin, NULL, NULL ); + VectorScale( ent.oldorigin, tempLength, ent.oldorigin ); + + ent.endTime = cent->dustTrailTime; + + /* + ent.renderfx |= RF_DISINTEGRATE2; + + ent.customShader = cgs.media.disruptorShader; + trap_R_AddRefEntityToScene( &ent ); + */ + + ent.renderfx &= ~(RF_DISINTEGRATE2); + ent.renderfx |= (RF_DISINTEGRATE1); + ent.customShader = 0; + trap_R_AddRefEntityToScene( &ent ); + + return; + } + else if (cent->currentState.eType == ET_BODY) + { + cent->dustTrailTime = 0; + } + + if (cent->currentState.modelGhoul2 && + !ent.ghoul2 && + !ent.hModel) + { + return; + } + + // add to refresh list + trap_R_AddRefEntityToScene (&ent); + + if (cent->bolt3 == 999) + { //this is an in-flight saber being rendered manually + vec3_t org; + float wv; + int i; + addspriteArgStruct_t fxSArgs; + //refEntity_t sRef; + //memcpy( &sRef, &ent, sizeof( sRef ) ); + + ent.customShader = cgs.media.solidWhite; + ent.renderfx = RF_RGB_TINT; + wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; + ent.shaderRGBA[0] = wv * 255; + ent.shaderRGBA[1] = wv * 255; + ent.shaderRGBA[2] = wv * 0; + trap_R_AddRefEntityToScene (&ent); + + for ( i = -4; i < 10; i += 1 ) + { + VectorMA( ent.origin, -i, ent.axis[2], org ); + + VectorCopy(org, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = 5.5f; + fxSArgs.dscale = 5.5f; + fxSArgs.sAlpha = wv; + fxSArgs.eAlpha = wv; + fxSArgs.rotation = 0.0f; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + fxSArgs.shader = cgs.media.yellowDroppedSaberShader; + fxSArgs.flags = 0x08000000; + + //trap_FX_AddSprite( org, NULL, NULL, 5.5f, 5.5f, wv, wv, 0.0f, 0.0f, 1.0f, cgs.media.yellowSaberGlowShader, 0x08000000 ); + trap_FX_AddSprite(&fxSArgs); + } + } + else if (cent->currentState.trickedentindex3) + { //holocron special effects + vec3_t org; + float wv; + addspriteArgStruct_t fxSArgs; + //refEntity_t sRef; + //memcpy( &sRef, &ent, sizeof( sRef ) ); + + ent.customShader = cgs.media.solidWhite; + ent.renderfx = RF_RGB_TINT; + wv = sin( cg.time * 0.005f ) * 0.08f + 0.1f; //* 0.08f + 0.1f; + + if (cent->currentState.trickedentindex3 == 1) + { //dark + ent.shaderRGBA[0] = wv*255; + ent.shaderRGBA[1] = 0; + ent.shaderRGBA[2] = 0; + } + else if (cent->currentState.trickedentindex3 == 2) + { //light + ent.shaderRGBA[0] = wv*255; + ent.shaderRGBA[1] = wv*255; + ent.shaderRGBA[2] = wv*255; + } + else + { //neutral + if ((s1->modelindex+128) == FP_SABERATTACK || + (s1->modelindex+128) == FP_SABERDEFEND || + (s1->modelindex+128) == FP_SABERTHROW) + { //saber power + ent.shaderRGBA[0] = 0; + ent.shaderRGBA[1] = wv*255; + ent.shaderRGBA[2] = 0; + } + else + { + ent.shaderRGBA[0] = 0; + ent.shaderRGBA[1] = wv*255; + ent.shaderRGBA[2] = wv*255; + } + } + + ent.modelScale[0] = 1.1; + ent.modelScale[1] = 1.1; + ent.modelScale[2] = 1.1; + + ent.origin[2] -= 2; + ScaleModelAxis(&ent); + + trap_R_AddRefEntityToScene (&ent); + + VectorMA( ent.origin, 1, ent.axis[2], org ); + + org[2] += 18; + + wv = sin( cg.time * 0.002f ) * 0.08f + 0.1f; //* 0.08f + 0.1f; + + VectorCopy(org, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = wv*120;//16.0f; + fxSArgs.dscale = wv*120;//16.0f; + fxSArgs.sAlpha = wv*12; + fxSArgs.eAlpha = wv*12; + fxSArgs.rotation = 0.0f; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + + fxSArgs.flags = 0x08000000|0x00000001; + + if (cent->currentState.trickedentindex3 == 1) + { //dark + fxSArgs.sAlpha *= 3; + fxSArgs.eAlpha *= 3; + fxSArgs.shader = cgs.media.redSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else if (cent->currentState.trickedentindex3 == 2) + { //light + fxSArgs.sAlpha *= 1.5; + fxSArgs.eAlpha *= 1.5; + fxSArgs.shader = cgs.media.redSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.blueSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else + { //neutral + if ((s1->modelindex+128) == FP_SABERATTACK || + (s1->modelindex+128) == FP_SABERDEFEND || + (s1->modelindex+128) == FP_SABERTHROW) + { //saber power + fxSArgs.sAlpha *= 1.5; + fxSArgs.eAlpha *= 1.5; + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else + { + fxSArgs.sAlpha *= 0.5; + fxSArgs.eAlpha *= 0.5; + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.blueSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + } + } + + if ( cent->currentState.time == -1 && cent->currentState.weapon == WP_TRIP_MINE && (cent->currentState.eFlags & EF_FIRING) ) + { //if force sight is active, render the laser multiple times up to the force sight level to increase visibility + int i = 0; + + VectorMA( ent.origin, 6.6f, ent.axis[0], beamOrg );// forward + beamID = cgs.effects.tripmineLaserFX; + + if (cg.snap->ps.fd.forcePowersActive & (1 << FP_SEE)) + { + i = cg.snap->ps.fd.forcePowerLevel[FP_SEE]; + + while (i > 0) + { + trap_FX_PlayEffectID( beamID, beamOrg, cent->currentState.pos.trDelta ); + trap_FX_PlayEffectID( beamID, beamOrg, cent->currentState.pos.trDelta ); + i--; + } + } + + trap_FX_PlayEffectID( beamID, beamOrg, cent->currentState.pos.trDelta ); + } +/* +Ghoul2 Insert Start +*/ + + if (cg_debugBB.integer) + { + CG_CreateBBRefEnts(s1, cent->lerpOrigin); + } +/* +Ghoul2 Insert End +*/ +} + +/* +================== +CG_Speaker + +Speaker entities can automatically play sounds +================== +*/ +static void CG_Speaker( centity_t *cent ) { + if (cent->currentState.trickedentindex) + { + trap_S_StopLoopingSound(cent->currentState.number); + } + + if ( ! cent->currentState.clientNum ) { // FIXME: use something other than clientNum... + return; // not auto triggering + } + + if ( cg.time < cent->miscTime ) { + return; + } + + trap_S_StartSound (NULL, cent->currentState.number, CHAN_ITEM, cgs.gameSounds[cent->currentState.eventParm] ); + + // ent->s.frame = ent->wait * 10; + // ent->s.clientNum = ent->random * 10; + cent->miscTime = cg.time + cent->currentState.frame * 100 + cent->currentState.clientNum * 100 * crandom(); +} + +qboolean CG_GreyItem(int type, int tag, int plSide) +{ + if (type == IT_POWERUP && + (tag == PW_FORCE_ENLIGHTENED_LIGHT || tag == PW_FORCE_ENLIGHTENED_DARK)) + { + if (plSide == FORCE_LIGHTSIDE) + { + if (tag == PW_FORCE_ENLIGHTENED_DARK) + { + return qtrue; + } + } + else if (plSide == FORCE_DARKSIDE) + { + if (tag == PW_FORCE_ENLIGHTENED_LIGHT) + { + return qtrue; + } + } + } + + return qfalse; +} + +/* +================== +CG_Item +================== +*/ +static void CG_Item( centity_t *cent ) { + refEntity_t ent; + entityState_t *es; + gitem_t *item; + int msec; + float scale; + weaponInfo_t *wi; + + es = ¢->currentState; + if ( es->modelindex >= bg_numItems ) { + CG_Error( "Bad item index %i on entity", es->modelindex ); + } + +/* +Ghoul2 Insert Start +*/ + + if ((es->eFlags & EF_NODRAW) && (es->eFlags & EF_ITEMPLACEHOLDER)) + { + es->eFlags &= ~EF_NODRAW; + } + + if ( !es->modelindex ) + { + return; + } + + item = &bg_itemlist[ es->modelindex ]; + + if ((item->giType == IT_WEAPON || item->giType == IT_POWERUP) && + !(cent->currentState.eFlags & EF_DROPPEDWEAPON) && + !cg_simpleItems.integer) + { + vec3_t uNorm; + qboolean doGrey; + + VectorClear(uNorm); + + uNorm[2] = 1; + + memset( &ent, 0, sizeof( ent ) ); + + ent.customShader = 0; + VectorCopy(cent->lerpOrigin, ent.origin); + VectorCopy( cent->currentState.angles, cent->lerpAngles ); + AnglesToAxis(cent->lerpAngles, ent.axis); + ent.hModel = cgs.media.itemHoloModel; + + doGrey = CG_GreyItem(item->giType, item->giTag, cg.snap->ps.fd.forceSide); + + if (doGrey) + { + ent.renderfx |= RF_RGB_TINT; + + ent.shaderRGBA[0] = 150; + ent.shaderRGBA[1] = 150; + ent.shaderRGBA[2] = 150; + } + + trap_R_AddRefEntityToScene(&ent); + + if (!doGrey) + { + trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/itemcone.efx"), ent.origin, uNorm); + } + } + + // if set to invisible, skip + if ( ( es->eFlags & EF_NODRAW ) ) + { + return; + } +/* +Ghoul2 Insert End +*/ + + if ( cg_simpleItems.integer && item->giType != IT_TEAM ) { + memset( &ent, 0, sizeof( ent ) ); + ent.reType = RT_SPRITE; + VectorCopy( cent->lerpOrigin, ent.origin ); + ent.radius = 14; + ent.customShader = cg_items[es->modelindex].icon; + ent.shaderRGBA[0] = 255; + ent.shaderRGBA[1] = 255; + ent.shaderRGBA[2] = 255; + + ent.origin[2] += 16; + + if (item->giType != IT_POWERUP || item->giTag != PW_FORCE_BOON) + { + ent.renderfx |= RF_FORCE_ENT_ALPHA; + } + + if ( es->eFlags & EF_ITEMPLACEHOLDER ) + { + if (item->giType == IT_POWERUP && item->giTag == PW_FORCE_BOON) + { + return; + } + ent.shaderRGBA[0] = 200; + ent.shaderRGBA[1] = 200; + ent.shaderRGBA[2] = 200; + ent.shaderRGBA[3] = 150 + sin(cg.time*0.01)*30; + } + else + { + ent.shaderRGBA[3] = 255; + } + + if (CG_GreyItem(item->giType, item->giTag, cg.snap->ps.fd.forceSide)) + { + ent.shaderRGBA[0] = 100; + ent.shaderRGBA[1] = 100; + ent.shaderRGBA[2] = 100; + + ent.shaderRGBA[3] = 200; + + if (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT) + { + ent.customShader = trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable"); + } + else + { + ent.customShader = trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable"); + } + } + trap_R_AddRefEntityToScene(&ent); + return; + } + + if ((item->giType == IT_WEAPON || item->giType == IT_POWERUP) && + !(cent->currentState.eFlags & EF_DROPPEDWEAPON)) + { + cent->lerpOrigin[2] += 16; + } + + if ((!(cent->currentState.eFlags & EF_DROPPEDWEAPON) || item->giType == IT_POWERUP) && + (item->giType == IT_WEAPON || item->giType == IT_POWERUP)) + { + // items bob up and down continuously + scale = 0.005 + cent->currentState.number * 0.00001; + cent->lerpOrigin[2] += 4 + cos( ( cg.time + 1000 ) * scale ) * 4; + } + else + { + if (item->giType == IT_HOLDABLE) + { + if (item->giTag == HI_SEEKER) + { + cent->lerpOrigin[2] += 5; + } + if (item->giTag == HI_SHIELD) + { + cent->lerpOrigin[2] += 2; + } + if (item->giTag == HI_BINOCULARS) + { + cent->lerpOrigin[2] += 2; + } + } + if (item->giType == IT_HEALTH) + { + cent->lerpOrigin[2] += 2; + } + if (item->giType == IT_ARMOR) + { + if (item->quantity == 100) + { + cent->lerpOrigin[2] += 7; + } + } + } + + memset (&ent, 0, sizeof(ent)); + + if ( (!(cent->currentState.eFlags & EF_DROPPEDWEAPON) || item->giType == IT_POWERUP) && + (item->giType == IT_WEAPON || item->giType == IT_POWERUP) ) + { //only weapons and powerups rotate now + // autorotate at one of two speeds + VectorCopy( cg.autoAngles, cent->lerpAngles ); + AxisCopy( cg.autoAxis, ent.axis ); + } + else + { + VectorCopy( cent->currentState.angles, cent->lerpAngles ); + AnglesToAxis(cent->lerpAngles, ent.axis); + } + + wi = NULL; + // the weapons have their origin where they attatch to player + // models, so we need to offset them or they will rotate + // eccentricly + if (!(cent->currentState.eFlags & EF_DROPPEDWEAPON)) + { + if ( item->giType == IT_WEAPON ) { + wi = &cg_weapons[item->giTag]; + cent->lerpOrigin[0] -= + wi->weaponMidpoint[0] * ent.axis[0][0] + + wi->weaponMidpoint[1] * ent.axis[1][0] + + wi->weaponMidpoint[2] * ent.axis[2][0]; + cent->lerpOrigin[1] -= + wi->weaponMidpoint[0] * ent.axis[0][1] + + wi->weaponMidpoint[1] * ent.axis[1][1] + + wi->weaponMidpoint[2] * ent.axis[2][1]; + cent->lerpOrigin[2] -= + wi->weaponMidpoint[0] * ent.axis[0][2] + + wi->weaponMidpoint[1] * ent.axis[1][2] + + wi->weaponMidpoint[2] * ent.axis[2][2]; + + cent->lerpOrigin[2] += 8; // an extra height boost + } + } + else + { + wi = &cg_weapons[item->giTag]; + + switch(item->giTag) + { + case WP_BLASTER: + cent->lerpOrigin[2] -= 12; + break; + case WP_DISRUPTOR: + cent->lerpOrigin[2] -= 13; + break; + case WP_BOWCASTER: + cent->lerpOrigin[2] -= 16; + break; + case WP_REPEATER: + cent->lerpOrigin[2] -= 12; + break; + case WP_DEMP2: + cent->lerpOrigin[2] -= 10; + break; + case WP_FLECHETTE: + cent->lerpOrigin[2] -= 6; + break; + case WP_ROCKET_LAUNCHER: + cent->lerpOrigin[2] -= 11; + break; + case WP_THERMAL: + cent->lerpOrigin[2] -= 12; + break; + case WP_TRIP_MINE: + cent->lerpOrigin[2] -= 16; + break; + case WP_DET_PACK: + cent->lerpOrigin[2] -= 16; + break; + default: + cent->lerpOrigin[2] -= 8; + break; + } + } + + ent.hModel = cg_items[es->modelindex].models[0]; +/* +Ghoul2 Insert Start +*/ + ent.ghoul2 = cg_items[es->modelindex].g2Models[0]; + ent.radius = cg_items[es->modelindex].radius[0]; + VectorCopy (cent->lerpAngles, ent.angles); +/* +Ghoul2 Insert End +*/ + VectorCopy( cent->lerpOrigin, ent.origin); + VectorCopy( cent->lerpOrigin, ent.oldorigin); + + ent.nonNormalizedAxes = qfalse; + + // if just respawned, slowly scale up + + msec = cg.time - cent->miscTime; + + if (CG_GreyItem(item->giType, item->giTag, cg.snap->ps.fd.forceSide)) + { + ent.renderfx |= RF_RGB_TINT; + + ent.shaderRGBA[0] = 150; + ent.shaderRGBA[1] = 150; + ent.shaderRGBA[2] = 150; + + ent.renderfx |= RF_FORCE_ENT_ALPHA; + + ent.shaderRGBA[3] = 200; + + if (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT) + { + ent.customShader = trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable"); + } + else + { + ent.customShader = trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable"); + } + + trap_R_AddRefEntityToScene( &ent ); + return; + } + + if ( es->eFlags & EF_ITEMPLACEHOLDER ) // item has been picked up + { + if ( es->eFlags & EF_DEAD ) // if item had been droped, don't show at all + return; + + ent.renderfx |= RF_RGB_TINT; + ent.shaderRGBA[0] = 0; + ent.shaderRGBA[1] = 200; + ent.shaderRGBA[2] = 85; + ent.customShader = cgs.media.itemRespawningPlaceholder; + } + + // increase the size of the weapons when they are presented as items + if ( item->giType == IT_WEAPON ) { + VectorScale( ent.axis[0], 1.5, ent.axis[0] ); + VectorScale( ent.axis[1], 1.5, ent.axis[1] ); + VectorScale( ent.axis[2], 1.5, ent.axis[2] ); + ent.nonNormalizedAxes = qtrue; + //trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.weaponHoverSound ); + } + + if (!(cent->currentState.eFlags & EF_DROPPEDWEAPON) && + (item->giType == IT_WEAPON || item->giType == IT_POWERUP)) + { + ent.renderfx |= RF_MINLIGHT; + } + + if (item->giType != IT_TEAM && msec >= 0 && msec < ITEM_SCALEUP_TIME && !(es->eFlags & EF_ITEMPLACEHOLDER) && !(es->eFlags & EF_DROPPEDWEAPON)) + { // if just respawned, fade in, but don't do this for flags. + float alpha; + int a; + + alpha = (float)msec / ITEM_SCALEUP_TIME; + a = alpha * 255.0; + if (a <= 0) + a=1; + + ent.shaderRGBA[3] = a; + if (item->giType != IT_POWERUP || item->giTag != PW_FORCE_BOON) + { //boon model uses a different blending mode for the sprite inside and doesn't look proper with this method + ent.renderfx |= RF_FORCE_ENT_ALPHA; + } + trap_R_AddRefEntityToScene(&ent); + + ent.renderfx &= ~RF_FORCE_ENT_ALPHA; + + // Now draw the static shader over it. + // Alpha in over half the time, out over half. + + //alpha = sin(M_PI*alpha); + a = alpha * 255.0; + + a = 255 - a; + + if (a <= 0) + a=1; + if (a > 255) + a=255; + + ent.customShader = cgs.media.itemRespawningRezOut; + + /* + ent.shaderRGBA[0] = 0; + ent.shaderRGBA[1] = a; + ent.shaderRGBA[2] = a-100; + + if (ent.shaderRGBA[2] < 0) + { + ent.shaderRGBA[2] = 0; + } + */ + + /* + ent.shaderRGBA[0] = + ent.shaderRGBA[1] = + ent.shaderRGBA[2] = a; + */ + + ent.renderfx |= RF_RGB_TINT; + ent.shaderRGBA[0] = 0; + ent.shaderRGBA[1] = 200; + ent.shaderRGBA[2] = 85; + + trap_R_AddRefEntityToScene( &ent ); + } + else + { // add to refresh list -- normal item + if (item->giType == IT_TEAM && + (item->giTag == PW_REDFLAG || item->giTag == PW_BLUEFLAG)) + { + ent.modelScale[0] = 0.7; + ent.modelScale[1] = 0.7; + ent.modelScale[2] = 0.7; + ScaleModelAxis(&ent); + } + trap_R_AddRefEntityToScene(&ent); + } + + //rww - As far as I can see, this is useless. + /* + if ( item->giType == IT_WEAPON && wi->barrelModel ) { + refEntity_t barrel; + + memset( &barrel, 0, sizeof( barrel ) ); + + barrel.hModel = wi->barrelModel; + + VectorCopy( ent.lightingOrigin, barrel.lightingOrigin ); + barrel.shadowPlane = ent.shadowPlane; + barrel.renderfx = ent.renderfx; + + barrel.customShader = ent.customShader; + + CG_PositionRotatedEntityOnTag( &barrel, &ent, wi->weaponModel, "tag_barrel" ); + + AxisCopy( ent.axis, barrel.axis ); + barrel.nonNormalizedAxes = ent.nonNormalizedAxes; + + trap_R_AddRefEntityToScene( &barrel ); + } + */ + + // accompanying rings / spheres for powerups + if ( !cg_simpleItems.integer ) + { + vec3_t spinAngles; + + VectorClear( spinAngles ); + + if ( item->giType == IT_HEALTH || item->giType == IT_POWERUP ) + { + if ( ( ent.hModel = cg_items[es->modelindex].models[1] ) != 0 ) + { + if ( item->giType == IT_POWERUP ) + { + ent.origin[2] += 12; + spinAngles[1] = ( cg.time & 1023 ) * 360 / -1024.0f; + } + AnglesToAxis( spinAngles, ent.axis ); + + trap_R_AddRefEntityToScene( &ent ); + } + } + } +} + +//============================================================================ + +/* +=============== +CG_Missile +=============== +*/ +static void CG_Missile( centity_t *cent ) { + refEntity_t ent; + entityState_t *s1; + const weaponInfo_t *weapon; +// int col; + + s1 = ¢->currentState; + if ( s1->weapon > WP_NUM_WEAPONS && s1->weapon != G2_MODEL_PART ) { + s1->weapon = 0; + } + + if (cent->ghoul2 && s1->weapon == G2_MODEL_PART) + { + weapon = &cg_weapons[WP_SABER]; + } + else + { + weapon = &cg_weapons[s1->weapon]; + } + + if (s1->weapon == WP_SABER) + { + if (!cent->ghoul2 && !(s1->eFlags & EF_NODRAW)) + { + trap_G2API_InitGhoul2Model(¢->ghoul2, "models/weapons2/saber/saber_w.glm", 0, 0, 0, 0, 0); + return; + } + else if (s1->eFlags & EF_NODRAW) + { + return; + } + } + + if (cent->ghoul2) + { //give us a proper radius + ent.radius = cent->currentState.g2radius; + } + + // calculate the axis + VectorCopy( s1->angles, cent->lerpAngles); + + if ( cent->currentState.eFlags & EF_ALT_FIRING ) + { + // add trails + if ( weapon->altMissileTrailFunc ) + weapon->altMissileTrailFunc( cent, weapon ); + + // add dynamic light + if ( weapon->altMissileDlight ) + { + trap_R_AddLightToScene(cent->lerpOrigin, weapon->altMissileDlight, + weapon->altMissileDlightColor[0], weapon->altMissileDlightColor[1], weapon->altMissileDlightColor[2] ); + } + + // add missile sound + if ( weapon->altMissileSound ) { + vec3_t velocity; + + BG_EvaluateTrajectoryDelta( ¢->currentState.pos, cg.time, velocity ); + + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, velocity, weapon->altMissileSound ); + } + + //Don't draw something without a model + if ( weapon->altMissileModel == NULL_HANDLE ) + return; + } + else + { + // add trails + if ( weapon->missileTrailFunc ) + weapon->missileTrailFunc( cent, weapon ); + + // add dynamic light + if ( weapon->missileDlight ) + { + trap_R_AddLightToScene(cent->lerpOrigin, weapon->missileDlight, + weapon->missileDlightColor[0], weapon->missileDlightColor[1], weapon->missileDlightColor[2] ); + } + + // add missile sound + if ( weapon->missileSound ) + { + vec3_t velocity; + + BG_EvaluateTrajectoryDelta( ¢->currentState.pos, cg.time, velocity ); + + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, velocity, weapon->missileSound ); + } + + //Don't draw something without a model + if ( weapon->missileModel == NULL_HANDLE && s1->weapon != WP_SABER && s1->weapon != G2_MODEL_PART ) //saber uses ghoul2 model, doesn't matter + return; + } + + // create the render entity + memset (&ent, 0, sizeof(ent)); + VectorCopy( cent->lerpOrigin, ent.origin); + VectorCopy( cent->lerpOrigin, ent.oldorigin); +/* +Ghoul2 Insert Start +*/ + CG_SetGhoul2Info(&ent, cent); + +/* +Ghoul2 Insert End +*/ + + // flicker between two skins + ent.skinNum = cg.clientFrame & 1; + ent.renderfx = /*weapon->missileRenderfx | */RF_NOSHADOW; + + if (s1->weapon != WP_SABER && s1->weapon != G2_MODEL_PART) + { + //if ( cent->currentState.eFlags | EF_ALT_FIRING ) + //rww - why was this like this? + if ( cent->currentState.eFlags & EF_ALT_FIRING ) + { + ent.hModel = weapon->altMissileModel; + } + else + { + ent.hModel = weapon->missileModel; + } + } + + // spin as it moves + if ( s1->apos.trType != TR_INTERPOLATE ) + { + // convert direction of travel into axis + if ( VectorNormalize2( s1->pos.trDelta, ent.axis[0] ) == 0 ) { + ent.axis[0][2] = 1; + } + + // spin as it moves + if ( s1->pos.trType != TR_STATIONARY ) + { + if ( s1->eFlags & EF_MISSILE_STICK ) + { + RotateAroundDirection( ent.axis, cg.time * 0.5f );//Did this so regular missiles don't get broken + } + else + { + RotateAroundDirection( ent.axis, cg.time * 0.25f );//JFM:FLOAT FIX + } + } + else + { + if ( s1->eFlags & EF_MISSILE_STICK ) + { + RotateAroundDirection( ent.axis, (float)s1->pos.trTime * 0.5f ); + } + else + { + RotateAroundDirection( ent.axis, (float)s1->time ); + } + } + } + else + { + AnglesToAxis( cent->lerpAngles, ent.axis ); + } + + if (s1->weapon == WP_SABER) + { + ent.radius = s1->g2radius; + } + + // add to refresh list, possibly with quad glow + CG_AddRefEntityWithPowerups( &ent, s1, TEAM_FREE ); + + if (s1->weapon == WP_SABER && cgs.gametype == GT_JEDIMASTER) + { //in jedimaster always make the saber glow when on the ground + vec3_t org; + float wv; + int i; + addspriteArgStruct_t fxSArgs; + //refEntity_t sRef; + //memcpy( &sRef, &ent, sizeof( sRef ) ); + + ent.customShader = cgs.media.solidWhite; + ent.renderfx = RF_RGB_TINT; + wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; + ent.shaderRGBA[0] = wv * 255; + ent.shaderRGBA[1] = wv * 255; + ent.shaderRGBA[2] = wv * 0; + trap_R_AddRefEntityToScene (&ent); + + for ( i = -4; i < 10; i += 1 ) + { + VectorMA( ent.origin, -i, ent.axis[2], org ); + + VectorCopy(org, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = 5.5f; + fxSArgs.dscale = 5.5f; + fxSArgs.sAlpha = wv; + fxSArgs.eAlpha = wv; + fxSArgs.rotation = 0.0f; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + fxSArgs.shader = cgs.media.yellowDroppedSaberShader; + fxSArgs.flags = 0x08000000; + + //trap_FX_AddSprite( org, NULL, NULL, 5.5f, 5.5f, wv, wv, 0.0f, 0.0f, 1.0f, cgs.media.yellowSaberGlowShader, 0x08000000 ); + trap_FX_AddSprite(&fxSArgs); + } + + if (cgs.gametype == GT_JEDIMASTER) + { + ent.shaderRGBA[0] = 255; + ent.shaderRGBA[1] = 255; + ent.shaderRGBA[2] = 0; + + ent.renderfx |= RF_DEPTHHACK; + ent.customShader = cgs.media.forceSightBubble; + + trap_R_AddRefEntityToScene( &ent ); + } + } + + if ( s1->eFlags & EF_FIRING ) + {//special code for adding the beam to the attached tripwire mine + vec3_t beamOrg; + + VectorMA( ent.origin, 8, ent.axis[0], beamOrg );// forward + trap_FX_PlayEffect( "tripMine/laser.efx", beamOrg, ent.axis[0] ); + } +} + +/* +=============== +CG_Mover +=============== +*/ +static void CG_Mover( centity_t *cent ) { + refEntity_t ent; + entityState_t *s1; + + s1 = ¢->currentState; + + // create the render entity + memset (&ent, 0, sizeof(ent)); + VectorCopy( cent->lerpOrigin, ent.origin); + VectorCopy( cent->lerpOrigin, ent.oldorigin); + AnglesToAxis( cent->lerpAngles, ent.axis ); + + ent.renderfx = RF_NOSHADOW; +/* +Ghoul2 Insert Start +*/ + + CG_SetGhoul2Info(&ent, cent); +/* +Ghoul2 Insert End +*/ + // flicker between two skins (FIXME?) + ent.skinNum = ( cg.time >> 6 ) & 1; + + // get the model, either as a bmodel or a modelindex + if ( s1->solid == SOLID_BMODEL ) + { + ent.hModel = cgs.inlineDrawModel[s1->modelindex]; + } + else + { + ent.hModel = cgs.gameModels[s1->modelindex]; + } + + // add to refresh list + trap_R_AddRefEntityToScene(&ent); + + // add the secondary model + if ( s1->modelindex2 ) + { + ent.skinNum = 0; + ent.hModel = cgs.gameModels[s1->modelindex2]; + trap_R_AddRefEntityToScene(&ent); + } + +} + +/* +=============== +CG_Beam + +Also called as an event +=============== +*/ +void CG_Beam( centity_t *cent ) { + refEntity_t ent; + entityState_t *s1; + + s1 = ¢->currentState; + + // create the render entity + memset (&ent, 0, sizeof(ent)); + VectorCopy( s1->pos.trBase, ent.origin ); + VectorCopy( s1->origin2, ent.oldorigin ); + AxisClear( ent.axis ); + ent.reType = RT_BEAM; + + ent.renderfx = RF_NOSHADOW; +/* +Ghoul2 Insert Start +*/ + CG_SetGhoul2Info(&ent, cent); + +/* +Ghoul2 Insert End +*/ + // add to refresh list + trap_R_AddRefEntityToScene(&ent); +} + + +/* +=============== +CG_Portal +=============== +*/ +static void CG_Portal( centity_t *cent ) { + refEntity_t ent; + entityState_t *s1; + + s1 = ¢->currentState; + + // create the render entity + memset (&ent, 0, sizeof(ent)); + VectorCopy( cent->lerpOrigin, ent.origin ); + VectorCopy( s1->origin2, ent.oldorigin ); + ByteToDir( s1->eventParm, ent.axis[0] ); + PerpendicularVector( ent.axis[1], ent.axis[0] ); + + // negating this tends to get the directions like they want + // we really should have a camera roll value + VectorSubtract( vec3_origin, ent.axis[1], ent.axis[1] ); + + CrossProduct( ent.axis[0], ent.axis[1], ent.axis[2] ); + ent.reType = RT_PORTALSURFACE; + ent.oldframe = s1->powerups; + ent.frame = s1->frame; // rotation speed + ent.skinNum = s1->clientNum/256.0 * 360; // roll offset +/* +Ghoul2 Insert Start +*/ + CG_SetGhoul2Info(&ent, cent); +/* +Ghoul2 Insert End +*/ + // add to refresh list + trap_R_AddRefEntityToScene(&ent); +} + + +/* +========================= +CG_AdjustPositionForMover + +Also called by client movement prediction code +========================= +*/ +void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out ) { + centity_t *cent; + vec3_t oldOrigin, origin, deltaOrigin; + vec3_t oldAngles, angles, deltaAngles; + + if ( moverNum <= 0 || moverNum >= ENTITYNUM_MAX_NORMAL ) { + VectorCopy( in, out ); + return; + } + + cent = &cg_entities[ moverNum ]; + if ( cent->currentState.eType != ET_MOVER ) { + VectorCopy( in, out ); + return; + } + + BG_EvaluateTrajectory( ¢->currentState.pos, fromTime, oldOrigin ); + BG_EvaluateTrajectory( ¢->currentState.apos, fromTime, oldAngles ); + + BG_EvaluateTrajectory( ¢->currentState.pos, toTime, origin ); + BG_EvaluateTrajectory( ¢->currentState.apos, toTime, angles ); + + VectorSubtract( origin, oldOrigin, deltaOrigin ); + VectorSubtract( angles, oldAngles, deltaAngles ); + + VectorAdd( in, deltaOrigin, out ); + + // FIXME: origin change when on a rotating object +} + +/* +Ghoul2 Insert Start +*/ +static void LerpBoneAngleOverrides( centity_t *cent) +{ + +} +/* +Ghoul2 Insert End +*/ +/* +============================= +CG_InterpolateEntityPosition +============================= +*/ +static void CG_InterpolateEntityPosition( centity_t *cent ) { + vec3_t current, next; + float f; + + // it would be an internal error to find an entity that interpolates without + // a snapshot ahead of the current one + if ( cg.nextSnap == NULL ) { + CG_Error( "CG_InterpoateEntityPosition: cg.nextSnap == NULL" ); + } + + f = cg.frameInterpolation; + + // this will linearize a sine or parabolic curve, but it is important + // to not extrapolate player positions if more recent data is available + BG_EvaluateTrajectory( ¢->currentState.pos, cg.snap->serverTime, current ); + BG_EvaluateTrajectory( ¢->nextState.pos, cg.nextSnap->serverTime, next ); + + cent->lerpOrigin[0] = current[0] + f * ( next[0] - current[0] ); + cent->lerpOrigin[1] = current[1] + f * ( next[1] - current[1] ); + cent->lerpOrigin[2] = current[2] + f * ( next[2] - current[2] ); + + BG_EvaluateTrajectory( ¢->currentState.apos, cg.snap->serverTime, current ); + BG_EvaluateTrajectory( ¢->nextState.apos, cg.nextSnap->serverTime, next ); + + cent->lerpAngles[0] = LerpAngle( current[0], next[0], f ); + cent->lerpAngles[1] = LerpAngle( current[1], next[1], f ); + cent->lerpAngles[2] = LerpAngle( current[2], next[2], f ); +/* +Ghoul2 Insert Start +*/ + // now the nasty stuff - this will interpolate all ghoul2 models bone angle overrides per model attached to this cent +// if (cent->currentState.ghoul2.size()) + { + LerpBoneAngleOverrides(cent); + } +/* +Ghoul2 Insert End +*/ +} + +/* +=============== +CG_CalcEntityLerpPositions + +=============== +*/ +void CG_CalcEntityLerpPositions( centity_t *cent ) { + + // if this player does not want to see extrapolated players + if ( !cg_smoothClients.integer ) { + // make sure the clients use TR_INTERPOLATE + if ( cent->currentState.number < MAX_CLIENTS ) { + cent->currentState.pos.trType = TR_INTERPOLATE; + cent->nextState.pos.trType = TR_INTERPOLATE; + } + } + + if ( cent->interpolate && cent->currentState.pos.trType == TR_INTERPOLATE ) { + CG_InterpolateEntityPosition( cent ); + return; + } + + // first see if we can interpolate between two snaps for + // linear extrapolated clients + if ( cent->interpolate && cent->currentState.pos.trType == TR_LINEAR_STOP && + cent->currentState.number < MAX_CLIENTS) { + CG_InterpolateEntityPosition( cent ); + return; + } + + // just use the current frame and evaluate as best we can + BG_EvaluateTrajectory( ¢->currentState.pos, cg.time, cent->lerpOrigin ); + BG_EvaluateTrajectory( ¢->currentState.apos, cg.time, cent->lerpAngles ); + + // adjust for riding a mover if it wasn't rolled into the predicted + // player state + if ( cent != &cg.predictedPlayerEntity ) { + CG_AdjustPositionForMover( cent->lerpOrigin, cent->currentState.groundEntityNum, + cg.snap->serverTime, cg.time, cent->lerpOrigin ); + } +/* +Ghoul2 Insert Start +*/ + // now the nasty stuff - this will interpolate all ghoul2 models bone angle overrides per model attached to this cent +// if (cent->currentState.ghoul2.size()) + { + LerpBoneAngleOverrides(cent); + } +/* +Ghoul2 Insert End +*/ +} + +/* +=============== +CG_TeamBase +=============== +*/ +static void CG_TeamBase( centity_t *cent ) { + refEntity_t model; + if ( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { + // show the flag base + memset(&model, 0, sizeof(model)); + model.reType = RT_MODEL; + VectorCopy( cent->lerpOrigin, model.lightingOrigin ); + VectorCopy( cent->lerpOrigin, model.origin ); + AnglesToAxis( cent->currentState.angles, model.axis ); + if ( cent->currentState.modelindex == TEAM_RED ) { + model.hModel = cgs.media.redFlagBaseModel; + } + else if ( cent->currentState.modelindex == TEAM_BLUE ) { + model.hModel = cgs.media.blueFlagBaseModel; + } + else { + model.hModel = cgs.media.neutralFlagBaseModel; + } + + if (cent->currentState.eType != ET_GRAPPLE) + { //do not do this for g2animents + trap_R_AddRefEntityToScene( &model ); + } + } +} + +void CG_G2Animated( centity_t *cent ); + +/* +=============== +CG_AddCEntity + +=============== +*/ +static void CG_AddCEntity( centity_t *cent ) { + // event-only entities will have been dealt with already + if ( cent->currentState.eType >= ET_EVENTS ) { + return; + } + + // calculate the current origin + CG_CalcEntityLerpPositions( cent ); + + // add automatic effects + CG_EntityEffects( cent ); +/* +Ghoul2 Insert Start +*/ + + // do this before we copy the data to refEnts + if (trap_G2_HaveWeGhoul2Models(cent->ghoul2)) + { + trap_G2_SetGhoul2ModelIndexes(cent->ghoul2, cgs.gameModels, cgs.skins); + } + +/* +Ghoul2 Insert End +*/ + switch ( cent->currentState.eType ) { + default: + CG_Error( "Bad entity type: %i\n", cent->currentState.eType ); + break; + case ET_INVISIBLE: + case ET_PUSH_TRIGGER: + case ET_TELEPORT_TRIGGER: + break; + case ET_GENERAL: + CG_General( cent ); + break; + case ET_PLAYER: + CG_Player( cent ); + break; + case ET_ITEM: + CG_Item( cent ); + break; + case ET_MISSILE: + CG_Missile( cent ); + break; + case ET_SPECIAL: + CG_Special( cent ); + break; + case ET_HOLOCRON: + CG_General( cent ); + break; + case ET_MOVER: + CG_Mover( cent ); + break; + case ET_BEAM: + CG_Beam( cent ); + break; + case ET_PORTAL: + CG_Portal( cent ); + break; + case ET_SPEAKER: + CG_Speaker( cent ); + break; + case ET_GRAPPLE: //An entity that wants to be able to use ghoul2 humanoid anims. Like a player, but not. + CG_G2Animated( cent ); + case ET_TEAM: + CG_TeamBase( cent ); + break; + case ET_BODY: + CG_General( cent ); + break; + } +} + +void CG_ManualEntityRender(centity_t *cent) +{ + CG_AddCEntity(cent); +} + +/* +=============== +CG_AddPacketEntities + +=============== +*/ +void CG_AddPacketEntities( void ) { + int num; + centity_t *cent; + playerState_t *ps; + + // set cg.frameInterpolation + if ( cg.nextSnap ) { + int delta; + + delta = (cg.nextSnap->serverTime - cg.snap->serverTime); + if ( delta == 0 ) { + cg.frameInterpolation = 0; + } else { + cg.frameInterpolation = (float)( cg.time - cg.snap->serverTime ) / delta; + } + } else { + cg.frameInterpolation = 0; // actually, it should never be used, because + // no entities should be marked as interpolating + } + + // the auto-rotating items will all have the same axis + cg.autoAngles[0] = 0; + cg.autoAngles[1] = ( cg.time & 2047 ) * 360 / 2048.0; + cg.autoAngles[2] = 0; + + cg.autoAnglesFast[0] = 0; + cg.autoAnglesFast[1] = ( cg.time & 1023 ) * 360 / 1024.0f; + cg.autoAnglesFast[2] = 0; + + AnglesToAxis( cg.autoAngles, cg.autoAxis ); + AnglesToAxis( cg.autoAnglesFast, cg.autoAxisFast ); + + // generate and add the entity from the playerstate + ps = &cg.predictedPlayerState; + + //rww - update the g2 pointer BEFORE the weapons, otherwise bad things could happen + //FIXME: These two pointers seem to differ sometimes, they shouldn't, should they? + //the one on predictedPlayerEntity also seems to often be invalid, so it can't be + //reliably checked and cleared. + cg.predictedPlayerEntity.ghoul2 = cg_entities[ cg.snap->ps.clientNum].ghoul2; + CG_CheckPlayerG2Weapons(ps, &cg.predictedPlayerEntity); + BG_PlayerStateToEntityState( ps, &cg.predictedPlayerEntity.currentState, qfalse ); + + // add in the Ghoul2 stuff. + VectorCopy( cg_entities[ cg.snap->ps.clientNum].modelScale, cg.predictedPlayerEntity.modelScale); + cg.predictedPlayerEntity.radius = cg_entities[ cg.snap->ps.clientNum].radius; + + CG_AddCEntity( &cg.predictedPlayerEntity ); + + // lerp the non-predicted value for lightning gun origins + CG_CalcEntityLerpPositions( &cg_entities[ cg.snap->ps.clientNum ] ); + + // add each entity sent over by the server + for ( num = 0 ; num < cg.snap->numEntities ; num++ ) { + // Don't re-add ents that have been predicted. + if (cg.snap->entities[ num ].number != cg.snap->ps.clientNum) + { + cent = &cg_entities[ cg.snap->entities[ num ].number ]; + CG_AddCEntity( cent ); + } + } +} + +void CG_ROFF_NotetrackCallback( centity_t *cent, const char *notetrack) +{ + int i = 0, r = 0, objectID = 0, anglesGathered = 0, posoffsetGathered = 0; + char type[256]; + char argument[512]; + char addlArg[512]; + char errMsg[256]; + char t[64]; + int addlArgs = 0; + vec3_t parsedAngles, parsedOffset, useAngles, useOrigin, forward, right, up; + + if (!cent || !notetrack) + { + return; + } + + //notetrack = "effect effects/explosion1.efx 0+0+64 0-0-1"; + + while (notetrack[i] && notetrack[i] != ' ') + { + type[i] = notetrack[i]; + i++; + } + + type[i] = '\0'; + + if (notetrack[i] != ' ') + { //didn't pass in a valid notetrack type, or forgot the argument for it + return; + } + + i++; + + while (notetrack[i] && notetrack[i] != ' ') + { + argument[r] = notetrack[i]; + r++; + i++; + } + argument[r] = '\0'; + + if (!r) + { + return; + } + + if (notetrack[i] == ' ') + { //additional arguments... + addlArgs = 1; + + i++; + r = 0; + while (notetrack[i]) + { + addlArg[r] = notetrack[i]; + r++; + i++; + } + addlArg[r] = '\0'; + } + + if (strcmp(type, "effect") == 0) + { + if (!addlArgs) + { + //sprintf(errMsg, "Offset position argument for 'effect' type is invalid."); + //goto functionend; + VectorClear(parsedOffset); + goto defaultoffsetposition; + } + + i = 0; + + while (posoffsetGathered < 3) + { + r = 0; + while (addlArg[i] && addlArg[i] != '+' && addlArg[i] != ' ') + { + t[r] = addlArg[i]; + r++; + i++; + } + t[r] = '\0'; + i++; + if (!r) + { //failure.. + //sprintf(errMsg, "Offset position argument for 'effect' type is invalid."); + //goto functionend; + VectorClear(parsedOffset); + i = 0; + goto defaultoffsetposition; + } + parsedOffset[posoffsetGathered] = atof(t); + posoffsetGathered++; + } + + if (posoffsetGathered < 3) + { + Com_sprintf(errMsg, sizeof(errMsg), "Offset position argument for 'effect' type is invalid."); + goto functionend; + } + + i--; + + if (addlArg[i] != ' ') + { + addlArgs = 0; + } + +defaultoffsetposition: + + objectID = trap_FX_RegisterEffect(argument); + + if (objectID) + { + if (addlArgs) + { //if there is an additional argument for an effect it is expected to be XANGLE-YANGLE-ZANGLE + i++; + while (anglesGathered < 3) + { + r = 0; + while (addlArg[i] && addlArg[i] != '-') + { + t[r] = addlArg[i]; + r++; + i++; + } + t[r] = '\0'; + i++; + + if (!r) + { //failed to get a new part of the vector + anglesGathered = 0; + break; + } + + parsedAngles[anglesGathered] = atof(t); + anglesGathered++; + } + + if (anglesGathered) + { + VectorCopy(parsedAngles, useAngles); + } + else + { //failed to parse angles from the extra argument provided.. + VectorCopy(cent->lerpAngles, useAngles); + } + } + else + { //if no constant angles, play in direction entity is facing + VectorCopy(cent->lerpAngles, useAngles); + } + + AngleVectors(useAngles, forward, right, up); + + VectorCopy(cent->lerpOrigin, useOrigin); + + //forward + useOrigin[0] += forward[0]*parsedOffset[0]; + useOrigin[1] += forward[1]*parsedOffset[0]; + useOrigin[2] += forward[2]*parsedOffset[0]; + + //right + useOrigin[0] += right[0]*parsedOffset[1]; + useOrigin[1] += right[1]*parsedOffset[1]; + useOrigin[2] += right[2]*parsedOffset[1]; + + //up + useOrigin[0] += up[0]*parsedOffset[2]; + useOrigin[1] += up[1]*parsedOffset[2]; + useOrigin[2] += up[2]*parsedOffset[2]; + + trap_FX_PlayEffectID(objectID, useOrigin, useAngles); + } + } + else if (strcmp(type, "sound") == 0) + { + objectID = trap_S_RegisterSound(argument); + trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_BODY, objectID); + } + else if (strcmp(type, "loop") == 0) + { //handled server-side + return; + } + //else if ... + else + { + if (type[0]) + { + Com_Printf("^3Warning: \"%s\" is an invalid ROFF notetrack function\n", type); + } + else + { + Com_Printf("^3Warning: Notetrack is missing function and/or arguments\n"); + } + } + + return; + +functionend: + Com_Printf("^3Type-specific notetrack error: %s\n", errMsg); + return; +} + diff --git a/code/cgame/cg_ents.c b/code/cgame/cg_ents.c new file mode 100644 index 0000000..3bcb0ba --- /dev/null +++ b/code/cgame/cg_ents.c @@ -0,0 +1,2734 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_ents.c -- present snapshot entities, happens every single frame + +#include "cg_local.h" +/* +Ghoul2 Insert Start +*/ +#include "..\game\q_shared.h" +#include "..\ghoul2\g2.h" +/* +Ghoul2 Insert end +*/ + +static void CG_Missile( centity_t *cent ); + +/* +====================== +CG_PositionEntityOnTag + +Modifies the entities position and axis by the given +tag location +====================== +*/ +void CG_PositionEntityOnTag( refEntity_t *entity, const refEntity_t *parent, + qhandle_t parentModel, char *tagName ) { + int i; + orientation_t lerped; + + // lerp the tag + trap_R_LerpTag( &lerped, parentModel, parent->oldframe, parent->frame, + 1.0 - parent->backlerp, tagName ); + + // FIXME: allow origin offsets along tag? + VectorCopy( parent->origin, entity->origin ); + for ( i = 0 ; i < 3 ; i++ ) { + VectorMA( entity->origin, lerped.origin[i], parent->axis[i], entity->origin ); + } + + // had to cast away the const to avoid compiler problems... + MatrixMultiply( lerped.axis, ((refEntity_t *)parent)->axis, entity->axis ); + entity->backlerp = parent->backlerp; +} + + +/* +====================== +CG_PositionRotatedEntityOnTag + +Modifies the entities position and axis by the given +tag location +====================== +*/ +void CG_PositionRotatedEntityOnTag( refEntity_t *entity, const refEntity_t *parent, + qhandle_t parentModel, char *tagName ) { + int i; + orientation_t lerped; + vec3_t tempAxis[3]; + +//AxisClear( entity->axis ); + // lerp the tag + trap_R_LerpTag( &lerped, parentModel, parent->oldframe, parent->frame, + 1.0 - parent->backlerp, tagName ); + + // FIXME: allow origin offsets along tag? + VectorCopy( parent->origin, entity->origin ); + for ( i = 0 ; i < 3 ; i++ ) { + VectorMA( entity->origin, lerped.origin[i], parent->axis[i], entity->origin ); + } + + // had to cast away the const to avoid compiler problems... + MatrixMultiply( entity->axis, lerped.axis, tempAxis ); + MatrixMultiply( tempAxis, ((refEntity_t *)parent)->axis, entity->axis ); +} + + + +/* +========================================================================== + +FUNCTIONS CALLED EACH FRAME + +========================================================================== +*/ + +/* +====================== +CG_SetEntitySoundPosition + +Also called by event processing code +====================== +*/ +void CG_SetEntitySoundPosition( centity_t *cent ) { + if ( cent->currentState.solid == SOLID_BMODEL ) + { + vec3_t origin; + float *v; + + v = cgs.inlineModelMidpoints[ cent->currentState.modelindex ]; + VectorAdd( cent->lerpOrigin, v, origin ); + trap_S_UpdateEntityPosition( cent->currentState.number, origin ); + } + else + { + trap_S_UpdateEntityPosition( cent->currentState.number, cent->lerpOrigin ); + } +} + +/* +================== +CG_EntityEffects + +Add continuous entity effects, like local entity emission and lighting +================== +*/ +static void CG_EntityEffects( centity_t *cent ) { + + // update sound origins + CG_SetEntitySoundPosition( cent ); + + // add loop sound + if ( cent->currentState.loopSound ) { + //rww - doors and things with looping sounds have a crazy origin (being brush models and all) + if ( cent->currentState.solid == SOLID_BMODEL ) + { + vec3_t origin; + float *v; + + v = cgs.inlineModelMidpoints[ cent->currentState.modelindex ]; + VectorAdd( cent->lerpOrigin, v, origin ); + trap_S_AddLoopingSound( cent->currentState.number, origin, vec3_origin, + cgs.gameSounds[ cent->currentState.loopSound ] ); + } + else if (cent->currentState.eType != ET_SPEAKER) { + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, + cgs.gameSounds[ cent->currentState.loopSound ] ); + } else { + trap_S_AddRealLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, + cgs.gameSounds[ cent->currentState.loopSound ] ); + } + } + + + // constant light glow + if ( cent->currentState.constantLight ) { + int cl; + int i, r, g, b; + + cl = cent->currentState.constantLight; + r = cl & 255; + g = ( cl >> 8 ) & 255; + b = ( cl >> 16 ) & 255; + i = ( ( cl >> 24 ) & 255 ) * 4; + trap_R_AddLightToScene( cent->lerpOrigin, i, r, g, b ); + } + +} + +localEntity_t *FX_AddOrientedLine(vec3_t start, vec3_t end, vec3_t normal, float stScale, float scale, + float dscale, float startalpha, float endalpha, float killTime, qhandle_t shader) +{ + localEntity_t *le; + +#ifdef _DEBUG + if (!shader) + { + Com_Printf("FX_AddLine: NULL shader\n"); + } +#endif + + le = CG_AllocLocalEntity(); + le->leType = LE_OLINE; + + le->startTime = cg.time; + le->endTime = le->startTime + killTime; + le->data.line.width = scale; + le->data.line.dwidth = dscale; + + le->alpha = startalpha; + le->dalpha = endalpha - startalpha; + + le->refEntity.data.line.stscale = stScale; + le->refEntity.data.line.width = scale; + + le->refEntity.customShader = shader; + + // set origin + VectorCopy ( start, le->refEntity.origin); + VectorCopy ( end, le->refEntity.oldorigin ); + + AxisClear(le->refEntity.axis); + VectorCopy( normal, le->refEntity.axis[0] ); + RotateAroundDirection( le->refEntity.axis, 0); // le->refEntity.data.sprite.rotation ); This is roll in quad land + + le->refEntity.shaderRGBA[0] = 0xff; + le->refEntity.shaderRGBA[1] = 0xff; + le->refEntity.shaderRGBA[2] = 0xff; + le->refEntity.shaderRGBA[3] = 0xff; + + le->color[0] = 1.0; + le->color[1] = 1.0; + le->color[2] = 1.0; + le->color[3] = 1.0; + le->lifeRate = 1.0 / ( le->endTime - le->startTime ); + + return(le); +} + +void FX_DrawPortableShield(centity_t *cent) +{ + //rww - this code differs a bit from the draw code in EF, I don't know why I had to do + //it this way yet it worked in EF the other way. + + int xaxis, height, posWidth, negWidth, team; + vec3_t start, end, normal; + localEntity_t *le; + qhandle_t shader; + char buf[1024]; + + trap_Cvar_VariableStringBuffer("cl_paused", buf, sizeof(buf)); + + if (atoi(buf)) + { //rww - fix to keep from rendering repeatedly while HUD menu is up + return; + } + + if (cent->currentState.eFlags & EF_NODRAW) + { + return; + } + + // decode the data stored in time2 + xaxis = ((cent->currentState.time2 >> 24) & 1); + height = ((cent->currentState.time2 >> 16) & 255); + posWidth = ((cent->currentState.time2 >> 8) & 255); + negWidth = (cent->currentState.time2 & 255); + + team = (cent->currentState.otherEntityNum2); + + VectorClear(normal); + + VectorCopy(cent->lerpOrigin, start); + VectorCopy(cent->lerpOrigin, end); + + if (xaxis) // drawing along x-axis + { + start[0] -= negWidth; + end[0] += posWidth; + } + else + { + start[1] -= negWidth; + end[1] += posWidth; + } + + normal[0] = 1; + normal[1] = 1; + + start[2] += height/2; + end[2] += height/2; + + if (team == TEAM_RED) + { + if (cent->currentState.trickedentindex) + { + shader = trap_R_RegisterShader( "gfx/misc/red_dmgshield" ); + } + else + { + shader = trap_R_RegisterShader( "gfx/misc/red_portashield" ); + } + } + else + { + if (cent->currentState.trickedentindex) + { + shader = trap_R_RegisterShader( "gfx/misc/blue_dmgshield" ); + } + else + { + shader = trap_R_RegisterShader( "gfx/misc/blue_portashield" ); + } + } + + le = FX_AddOrientedLine(start, end, normal, 1.0f, height, 0.0f, 1.0f, 1.0f, 50.0, shader); +} + +/* +================== +CG_Special +================== +*/ +void CG_Special( centity_t *cent ) { + entityState_t *s1; + + s1 = ¢->currentState; + + if (!s1) + { + return; + } + + // if set to invisible, skip + if (!s1->modelindex) { + return; + } + + if (s1->modelindex == HI_SHIELD) + { // The portable shield should go through a different rendering function. + FX_DrawPortableShield(cent); + return; + } +} + +/* +Ghoul2 Insert Start +*/ + +// Copy the ghoul2 data into the ref ent correctly +void CG_SetGhoul2Info( refEntity_t *ent, centity_t *cent) +{ + + ent->ghoul2 = cent->ghoul2; + VectorCopy( cent->modelScale, ent->modelScale); + ent->radius = cent->radius; + VectorCopy (cent->lerpAngles, ent->angles); +} + + + +// create 8 new points on screen around a model so we can see it's bounding box +void CG_CreateBBRefEnts(entityState_t *s1, vec3_t origin ) +{ +/* +//g2r +#if _DEBUG + refEntity_t point[8]; + int i; + vec3_t angles = {0,0,0}; + + for (i=0; i<8; i++) + { + memset (&point[i], 0, sizeof(refEntity_t)); + point[i].reType = RT_SPRITE; + point[i].radius = 1; + point[i].customShader = trap_R_RegisterShader("textures/tests/circle"); + point[i].shaderRGBA[0] = 255; + point[i].shaderRGBA[1] = 255; + point[i].shaderRGBA[2] = 255; + point[i].shaderRGBA[3] = 255; + + AnglesToAxis( angles, point[i].axis ); + + // now, we need to put the correct origins into each origin from the mins and max's + switch(i) + { + case 0: + VectorCopy(s1->mins, point[i].origin); + break; + case 1: + VectorCopy(s1->mins, point[i].origin); + point[i].origin[0] = s1->maxs[0]; + break; + case 2: + VectorCopy(s1->mins, point[i].origin); + point[i].origin[1] = s1->maxs[1]; + break; + case 3: + VectorCopy(s1->mins, point[i].origin); + point[i].origin[0] = s1->maxs[0]; + point[i].origin[1] = s1->maxs[1]; + break; + case 4: + VectorCopy(s1->maxs, point[i].origin); + break; + case 5: + VectorCopy(s1->maxs, point[i].origin); + point[i].origin[0] = s1->mins[0]; + break; + case 6: + VectorCopy(s1->maxs, point[i].origin); + point[i].origin[1] = s1->mins[1]; + break; + case 7: + VectorCopy(s1->maxs, point[i].origin); + point[i].origin[0] = s1->mins[0]; + point[i].origin[1] = s1->mins[1]; + break; + } + + // add the original origin to each point and then stuff them out there + VectorAdd(point[i].origin, origin, point[i].origin); + + trap_R_AddRefEntityToScene (&point[i]); + } +#endif + */ +} + +// write in the axis and stuff +void G2_BoltToGhoul2Model(centity_t *cent, refEntity_t *ent) +{ + // extract the wraith ID from the bolt info + int modelNum = cent->boltInfo >> MODEL_SHIFT; + int boltNum = cent->boltInfo >> BOLT_SHIFT; + int entNum = cent->boltInfo >> ENTITY_SHIFT; + mdxaBone_t boltMatrix; + + modelNum &= MODEL_AND; + boltNum &= BOLT_AND; + entNum &= ENTITY_AND; + + + //NOTENOTE I put this here because the cgs.gamemodels array no longer gets initialized. + assert(0); + + + // go away and get me the bolt position for this frame please + trap_G2API_GetBoltMatrix(cent->ghoul2, modelNum, boltNum, &boltMatrix, cg_entities[entNum].currentState.angles, cg_entities[entNum].currentState.origin, cg.time, cgs.gameModels, cent->modelScale); + + // set up the axis and origin we need for the actual effect spawning + ent->origin[0] = boltMatrix.matrix[0][3]; + ent->origin[1] = boltMatrix.matrix[1][3]; + ent->origin[2] = boltMatrix.matrix[2][3]; + + ent->axis[0][0] = boltMatrix.matrix[0][0]; + ent->axis[0][1] = boltMatrix.matrix[1][0]; + ent->axis[0][2] = boltMatrix.matrix[2][0]; + + ent->axis[1][0] = boltMatrix.matrix[0][1]; + ent->axis[1][1] = boltMatrix.matrix[1][1]; + ent->axis[1][2] = boltMatrix.matrix[2][1]; + + ent->axis[2][0] = boltMatrix.matrix[0][2]; + ent->axis[2][1] = boltMatrix.matrix[1][2]; + ent->axis[2][2] = boltMatrix.matrix[2][2]; +} + +void ScaleModelAxis(refEntity_t *ent) + +{ // scale the model should we need to + if (ent->modelScale[0] && ent->modelScale[0] != 1.0f) + { + VectorScale( ent->axis[0], ent->modelScale[0] , ent->axis[0] ); + ent->nonNormalizedAxes = qtrue; + } + if (ent->modelScale[1] && ent->modelScale[1] != 1.0f) + { + VectorScale( ent->axis[1], ent->modelScale[1] , ent->axis[1] ); + ent->nonNormalizedAxes = qtrue; + } + if (ent->modelScale[2] && ent->modelScale[2] != 1.0f) + { + VectorScale( ent->axis[2], ent->modelScale[2] , ent->axis[2] ); + ent->nonNormalizedAxes = qtrue; + } +} +/* +Ghoul2 Insert End +*/ + +char *forceHolocronModels[] = { + "models/map_objects/mp/lt_heal.md3", //FP_HEAL, + "models/map_objects/mp/force_jump.md3", //FP_LEVITATION, + "models/map_objects/mp/force_speed.md3", //FP_SPEED, + "models/map_objects/mp/force_push.md3", //FP_PUSH, + "models/map_objects/mp/force_pull.md3", //FP_PULL, + "models/map_objects/mp/lt_telepathy.md3", //FP_TELEPATHY, + "models/map_objects/mp/dk_grip.md3", //FP_GRIP, + "models/map_objects/mp/dk_lightning.md3", //FP_LIGHTNING, + "models/map_objects/mp/dk_rage.md3", //FP_RAGE, + "models/map_objects/mp/lt_protect.md3", //FP_PROTECT, + "models/map_objects/mp/lt_absorb.md3", //FP_ABSORB, + "models/map_objects/mp/lt_healother.md3", //FP_TEAM_HEAL, + "models/map_objects/mp/dk_powerother.md3", //FP_TEAM_FORCE, + "models/map_objects/mp/dk_drain.md3", //FP_DRAIN, + "models/map_objects/mp/force_sight.md3", //FP_SEE, + "models/map_objects/mp/saber_attack.md3", //FP_SABERATTACK, + "models/map_objects/mp/saber_defend.md3", //FP_SABERDEFEND, + "models/map_objects/mp/saber_throw.md3" //FP_SABERTHROW +}; + +/* +================== +CG_General +================== +*/ +static void CG_General( centity_t *cent ) { + refEntity_t ent; + entityState_t *s1; + float val; + int beamID; + vec3_t beamOrg; + mdxaBone_t matrix; + qboolean doNotSetModel = qfalse; + + if (cent->currentState.modelGhoul2 == 127) + { //not ready to be drawn or initialized.. + return; + } + + if (cent->ghoul2 && !cent->currentState.modelGhoul2 && cent->currentState.eType != ET_BODY && + cent->currentState.number >= MAX_CLIENTS) + { //this is a bad thing + if (trap_G2_HaveWeGhoul2Models(cent->ghoul2)) + { + trap_G2API_CleanGhoul2Models(&(cent->ghoul2)); + } + } + + if (cent->currentState.modelGhoul2 >= G2_MODELPART_HEAD && + cent->currentState.modelGhoul2 <= G2_MODELPART_RLEG && + cent->currentState.modelindex < MAX_CLIENTS && + cent->currentState.weapon == G2_MODEL_PART) + { //special case for client limbs + centity_t *clEnt; + int dismember_settings = cg_dismember.integer; + + doNotSetModel = qtrue; + + if (cent->currentState.modelindex >= 0) + { + clEnt = &cg_entities[cent->currentState.modelindex]; + } + else + { + clEnt = &cg_entities[cent->currentState.otherEntityNum2]; + } + + if (!dismember_settings) + { //This client does not wish to see dismemberment. + return; + } + + if (dismember_settings < 2 && (cent->currentState.modelGhoul2 == G2_MODELPART_HEAD || cent->currentState.modelGhoul2 == G2_MODELPART_WAIST)) + { //dismember settings are not high enough to display decaps and torso slashes + return; + } + + if (!cent->ghoul2) + { + const char *limbBone; + const char *rotateBone; + char *limbName; + char *limbCapName; + char *stubCapName; + char *limbTagName; + char *stubTagName; + int limb_anim; + int newBolt; + + if (clEnt && clEnt->torsoBolt) + { //already have a limb missing! + return; + } + + + if (clEnt && !(clEnt->currentState.eFlags & EF_DEAD)) + { //death flag hasn't made it through yet for the limb owner, we cannot create the limb until he's flagged as dead + return; + } + + cent->bolt4 = -1; + cent->trailTime = 0; + + if (cent->currentState.modelGhoul2 == G2_MODELPART_HEAD) + { + limbBone = "cervical"; + rotateBone = "cranium"; + limbName = "head"; + limbCapName = "head_cap_torso_off"; + stubCapName = "torso_cap_head_off"; + limbTagName = "*head_cap_torso"; + stubTagName = "*torso_cap_head"; + limb_anim = BOTH_DISMEMBER_HEAD1; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_WAIST) + { + limbBone = "pelvis"; + rotateBone = "thoracic"; + limbName = "torso"; + limbCapName = "torso_cap_hips_off"; + stubCapName = "hips_cap_torso_off"; + limbTagName = "*torso_cap_hips"; + stubTagName = "*hips_cap_torso"; + limb_anim = BOTH_DISMEMBER_TORSO1; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_LARM) + { + limbBone = "lhumerus"; + rotateBone = "lradius"; + limbName = "l_arm"; + limbCapName = "l_arm_cap_torso_off"; + stubCapName = "torso_cap_l_arm_off"; + limbTagName = "*l_arm_cap_torso"; + stubTagName = "*torso_cap_l_arm"; + limb_anim = BOTH_DISMEMBER_LARM; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_RARM) + { + limbBone = "rhumerus"; + rotateBone = "rradius"; + limbName = "r_arm"; + limbCapName = "r_arm_cap_torso_off"; + stubCapName = "torso_cap_r_arm_off"; + limbTagName = "*r_arm_cap_torso"; + stubTagName = "*torso_cap_r_arm"; + limb_anim = BOTH_DISMEMBER_RARM; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_RHAND) + { + limbBone = "rradiusX"; + rotateBone = "rhand"; + limbName = "r_hand"; + limbCapName = "r_hand_cap_r_arm_off"; + stubCapName = "r_arm_cap_r_hand_off"; + limbTagName = "*r_hand_cap_r_arm"; + stubTagName = "*r_arm_cap_r_hand"; + limb_anim = BOTH_DISMEMBER_RARM; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_LLEG) + { + limbBone = "lfemurYZ"; + rotateBone = "ltibia"; + limbName = "l_leg"; + limbCapName = "l_leg_cap_hips_off"; + stubCapName = "hips_cap_l_leg_off"; + limbTagName = "*l_leg_cap_hips"; + stubTagName = "*hips_cap_l_leg"; + limb_anim = BOTH_DISMEMBER_LLEG; + } + else if (cent->currentState.modelGhoul2 == G2_MODELPART_RLEG) + { + limbBone = "rfemurYZ"; + rotateBone = "rtibia"; + limbName = "r_leg"; + limbCapName = "r_leg_cap_hips_off"; + stubCapName = "hips_cap_r_leg_off"; + limbTagName = "*r_leg_cap_hips"; + stubTagName = "*hips_cap_r_leg"; + limb_anim = BOTH_DISMEMBER_RLEG; + } + else + { + limbBone = "rfemurYZ"; + rotateBone = "rtibia"; + limbName = "r_leg"; + limbCapName = "r_leg_cap_hips_off"; + stubCapName = "hips_cap_r_leg_off"; + limbTagName = "*r_leg_cap_hips"; + stubTagName = "*hips_cap_r_leg"; + limb_anim = BOTH_DISMEMBER_RLEG; + } + + if (clEnt && clEnt->ghoul2) + { + animation_t *anim = NULL; + float animSpeed; + int flags=BONE_ANIM_OVERRIDE_FREEZE; + clientInfo_t *ci; + + if (clEnt->currentState.number < MAX_CLIENTS) + { + ci = &cgs.clientinfo[ clEnt->currentState.number ]; + } + else + { + ci = NULL; + } + + if (ci) + { + //anim = &bgGlobalAnimations[ limb_anim ]; + //I guess it looks better to continue the body anim on the severed limb. If not a bit strange. It's what + //SP seems to do anyway. + anim = &bgGlobalAnimations[ (clEnt->currentState.torsoAnim&~ANIM_TOGGLEBIT) ]; + } + else + { //a g2anim ent, maybe? For those, we can settle for generic limb anims. + anim = &bgGlobalAnimations[ limb_anim ]; + } + + trap_G2API_DuplicateGhoul2Instance(clEnt->ghoul2, ¢->ghoul2); + + if (anim) + { + int aNum; + animSpeed = 50.0f / anim->frameLerp; + + /* + if (cent->currentState.modelGhoul2 == G2_MODELPART_WAIST) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", anim->firstFrame + anim->numFrames-1, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame + anim->numFrames-1, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); + } + */ + //I guess it looks better to continue the body anim on the severed limb. If not a bit strange. It's what + //SP seems to do anyway. + if (ci) + { + aNum = ci->frame+1; + + while (aNum >= anim->firstFrame+anim->numFrames) + { + aNum--; + } + + if (aNum < anim->firstFrame-1) + { //wrong animation...? + aNum = (anim->firstFrame+anim->numFrames)-1; + } + } + else + { + aNum = anim->firstFrame; + } + + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + } + } + + if (!cent->ghoul2) + { + return; + } + + newBolt = trap_G2API_AddBolt( cent->ghoul2, 0, limbTagName ); + if ( newBolt != -1 ) + { + vec3_t boltOrg, boltAng; + + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, newBolt, &matrix, cent->lerpAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + + trap_G2API_GiveMeVectorFromMatrix(&matrix, ORIGIN, boltOrg); + trap_G2API_GiveMeVectorFromMatrix(&matrix, NEGATIVE_Y, boltAng); + + trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/smoke_bolton"), boltOrg, boltAng); + } + + cent->bolt4 = newBolt; + + trap_G2API_SetRootSurface(cent->ghoul2, 0, limbName); + + trap_G2API_SetNewOrigin(cent->ghoul2, trap_G2API_AddBolt(cent->ghoul2, 0, rotateBone)); + + trap_G2API_SetSurfaceOnOff(cent->ghoul2, limbCapName, 0); + + trap_G2API_SetSurfaceOnOff(clEnt->ghoul2, limbName, 0x00000100); + trap_G2API_SetSurfaceOnOff(clEnt->ghoul2, stubCapName, 0); + + newBolt = trap_G2API_AddBolt( clEnt->ghoul2, 0, stubTagName ); + if ( newBolt != -1 ) + { + vec3_t boltOrg, boltAng; + + trap_G2API_GetBoltMatrix(clEnt->ghoul2, 0, newBolt, &matrix, clEnt->lerpAngles, clEnt->lerpOrigin, cg.time, cgs.gameModels, clEnt->modelScale); + + trap_G2API_GiveMeVectorFromMatrix(&matrix, ORIGIN, boltOrg); + trap_G2API_GiveMeVectorFromMatrix(&matrix, NEGATIVE_Y, boltAng); + + trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/smoke_bolton"), boltOrg, boltAng); + } + + if (cent->currentState.modelGhoul2 == G2_MODELPART_RARM || cent->currentState.modelGhoul2 == G2_MODELPART_RHAND || cent->currentState.modelGhoul2 == G2_MODELPART_WAIST) + { //Cut his weapon holding arm off, so remove the weapon + if (trap_G2API_HasGhoul2ModelOnIndex(&(clEnt->ghoul2), 1)) + { + trap_G2API_RemoveGhoul2Model(&(clEnt->ghoul2), 1); + } + } + + clEnt->torsoBolt = cent->currentState.modelGhoul2; //reinit model after copying limbless one to queue + + return; + } + + if (cent->ghoul2 && cent->bolt4 != -1 && cent->trailTime < cg.time) + { + if ( cent->bolt4 != -1 && + (cent->currentState.pos.trDelta[0] || cent->currentState.pos.trDelta[1] || cent->currentState.pos.trDelta[2]) ) + { + vec3_t boltOrg, boltAng; + + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cent->bolt4, &matrix, cent->lerpAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + + trap_G2API_GiveMeVectorFromMatrix(&matrix, ORIGIN, boltOrg); + trap_G2API_GiveMeVectorFromMatrix(&matrix, NEGATIVE_Y, boltAng); + + if (!boltAng[0] && !boltAng[1] && !boltAng[2]) + { + boltAng[1] = 1; + } + trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/smoke_bolton"), boltOrg, boltAng); + + cent->trailTime = cg.time + 400; + } + } + + ent.radius = cent->currentState.g2radius; + ent.hModel = 0; + } + + if (cent->currentState.number >= MAX_CLIENTS && + cent->currentState.activeForcePass == NUM_FORCE_POWERS+1) + { + centity_t *empOwn; + vec3_t empAngles, empOrg, anglesToOwner; + float angle_ideal, angle_current, angle_dif; + float degrees_positive, degrees_negative; + int overturn = 0; + + empOwn = &cg_entities[cent->currentState.emplacedOwner]; + + if (empOwn) + { + + if (cg.snap->ps.clientNum == empOwn->currentState.number && + !cg.renderingThirdPerson) + { + VectorCopy(cg.refdefViewAngles, empAngles); + VectorCopy(cg.refdef.vieworg, empOrg); + } + else + { + VectorCopy(empOwn->lerpAngles, empAngles); + VectorCopy(empOwn->lerpOrigin, empOrg); + } + + VectorSubtract(cent->lerpOrigin, empOrg, anglesToOwner); + + vectoangles(anglesToOwner, anglesToOwner); + + if (empAngles[PITCH] > 40) + { + empAngles[PITCH] = 40; + } + + angle_ideal = empAngles[YAW]; + angle_current = anglesToOwner[YAW]; + + if (angle_current < 0) + { + angle_current += 360; + } + if (angle_current > 360) + { + angle_current -= 360; + } + if (angle_ideal < 0) + { + angle_ideal += 360; + } + if (angle_ideal > 360) + { + angle_ideal -= 360; + } + + if (angle_ideal <= angle_current) + { + degrees_negative = (angle_current - angle_ideal); + + degrees_positive = (360 - angle_current) + angle_ideal; + } + else + { + degrees_negative = angle_current + (360 - angle_ideal); + + degrees_positive = (angle_ideal - angle_current); + } + + if (degrees_negative < degrees_positive) + { + angle_dif = degrees_negative; + } + else + { + angle_dif = degrees_positive; + } + + if (cg.snap->ps.clientNum == empOwn->currentState.number) + { + cg.constrictValue = anglesToOwner[YAW]; + + cg.doConstrict = cg.time + 50; + } + + if (angle_dif > 90) + { + overturn = 1; + + if (angle_dif == degrees_negative) + { + empAngles[YAW] += (angle_dif - 90); + } + else + { + empAngles[YAW] -= (angle_dif - 90); + } + } + else if (angle_dif > 80) + { + overturn = 2; + } + + if (!overturn && cg.snap->ps.clientNum == empOwn->currentState.number) + { + float plusExt = anglesToOwner[YAW]+70; + float minusExt = anglesToOwner[YAW]-70; + + if (plusExt > 360) + { + plusExt -= 360; + } + if (minusExt < 0) + { + minusExt += 360; + } + + trap_SetClientTurnExtent(minusExt, plusExt, cg.time+5000); + + VectorCopy(empAngles, cent->turAngles); + } + else if (cg.snap->ps.clientNum == empOwn->currentState.number) + { + trap_SetClientForceAngle(cg.time+5000, cent->turAngles); + } + + // empAngles[PITCH] -= 160; + + if (empAngles[PITCH] < 0) + { + empAngles[PITCH] += 360; + } + if (empAngles[YAW] < 0) + { + empAngles[YAW] += 360; + } + + empAngles[YAW] -= cent->currentState.angles[YAW]; //slight hack so that upper rotated half looks right on angled turrets + + //AngleVectors(empAngles, NULL, NULL, up); + + //empAngles[ROLL] = -empAngles[YAW]; + //empAngles[YAW] = 0; + + //trap_G2API_SetBoneAngles(cent->ghoul2, 0, "swivel_bone", empAngles, BONE_ANGLES_REPLACE, POSITIVE_Z, NEGATIVE_X, NEGATIVE_Y, NULL, 0, cg.time); + //trap_G2API_SetBoneAngles(cent->ghoul2, 0, "swivel_bone", empAngles, BONE_ANGLES_REPLACE, POSITIVE_Z, POSITIVE_X, POSITIVE_Y, NULL, 0, cg.time); + + //constrict the pitch angles of the turret but not the player view + /* + if (empAngles[PITCH] < 170) + { + empAngles[PITCH] = 170; + } + if (empAngles[PITCH] > 240) + { + empAngles[PITCH] = 240; + } + */ + + trap_G2API_SetBoneAngles( cent->ghoul2, 0, /*"swivel_bone"*/"Bone02", empAngles, BONE_ANGLES_REPLACE, NEGATIVE_Y, NEGATIVE_X, POSITIVE_Z, NULL, 0, cg.time); + //trap_G2API_SetBoneAngles( cent->ghoul2, 0, "swivel_bone", empAngles, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 0, cg.time); + } + } + + s1 = ¢->currentState; +/* +Ghoul2 Insert Start +*/ + // if set to invisible, skip + if ((!s1->modelindex) && !(trap_G2_HaveWeGhoul2Models(cent->ghoul2))) + { + return; + } +/* +Ghoul2 Insert End +*/ + + memset (&ent, 0, sizeof(ent)); + + // set frame + + ent.frame = s1->frame; + ent.oldframe = ent.frame; + ent.backlerp = 0; + +/* +Ghoul2 Insert Start +*/ + CG_SetGhoul2Info(&ent, cent); + +/* +Ghoul2 Insert End +*/ + VectorCopy( cent->lerpOrigin, ent.origin); + VectorCopy( cent->lerpOrigin, ent.oldorigin); + + if (cent->currentState.modelGhoul2) + { //If the game says this guy uses a ghoul2 model and the g2 instance handle is null, then initialize it + if (!cent->ghoul2 && !cent->currentState.bolt1) + { + trap_G2API_InitGhoul2Model(¢->ghoul2, CG_ConfigString( CS_MODELS+cent->currentState.modelindex ), 0, 0, 0, 0, 0); + } + else if (cent->currentState.bolt1) + { + TurretClientRun(cent); + } + + if (cent->ghoul2) + { //give us a proper radius + ent.radius = cent->currentState.g2radius; + } + } + + if (s1->eType == ET_BODY) + { //bodies should have a radius as well + ent.radius = cent->currentState.g2radius; + + if (cent->ghoul2) + { //all bodies should already have a ghoul2 instance. Use it to set the torso/head angles to 0. + if (cent->isATST) + { + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "pelvis", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 100, cg.time); + ent.radius = 250; + } + else + { + cent->lerpAngles[PITCH] = 0; + cent->lerpAngles[ROLL] = 0; + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "pelvis", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "thoracic", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 100, cg.time); + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 100, cg.time); + trap_G2API_SetBoneAngles(cent->ghoul2, 0, "cranium", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, cgs.gameModels, 100, cg.time); + } + } + } + + if (s1->eType == ET_HOLOCRON && s1->modelindex < -100) + { //special render, it's a holocron + //Using actual models now: + ent.hModel = trap_R_RegisterModel(forceHolocronModels[s1->modelindex+128]); + + //Rotate them + VectorCopy( cg.autoAngles, cent->lerpAngles ); + AxisCopy( cg.autoAxis, ent.axis ); + } + else if (!doNotSetModel) + { + ent.hModel = cgs.gameModels[s1->modelindex]; + } + + // player model + if (s1->number == cg.snap->ps.clientNum) { + ent.renderfx |= RF_THIRD_PERSON; // only draw from mirrors + } +/* +Ghoul2 Insert Start +*/ + // are we bolted to a Ghoul2 model? +/* +//g2r if (s1->boltInfo) + { + G2_BoltToGhoul2Model(s1, &ent); + } + else */ + { + // convert angles to axis + AnglesToAxis( cent->lerpAngles, ent.axis ); + } + +/* +Ghoul2 Insert End +*/ + if ( cent->currentState.time > cg.time && cent->currentState.weapon == WP_EMPLACED_GUN ) + { + // make the gun pulse red to warn about it exploding + val = (1.0f - (float)(cent->currentState.time - cg.time) / 3200.0f ) * 0.3f; + + ent.customShader = trap_R_RegisterShader( "gfx/effects/turretflashdie" ); + ent.shaderRGBA[0] = (sin( cg.time * 0.04f ) * val * 0.4f + val) * 255; + ent.shaderRGBA[1] = ent.shaderRGBA[2] = 0; + + ent.shaderRGBA[3] = 100; + trap_R_AddRefEntityToScene( &ent ); + ent.customShader = 0; + } + else if ( cent->currentState.time == -1 && cent->currentState.weapon == WP_EMPLACED_GUN) + { + ent.customShader = trap_R_RegisterShader( "models/map_objects/imp_mine/turret_chair_dmg.tga" ); + //trap_R_AddRefEntityToScene( &ent ); + } + + if ((cent->currentState.eFlags & EF_DISINTEGRATION) && cent->currentState.eType == ET_BODY) + { + vec3_t tempAng, hitLoc; + float tempLength; + + if (!cent->dustTrailTime) + { + cent->dustTrailTime = cg.time; + } + + VectorCopy(cent->currentState.origin2, hitLoc); + + VectorSubtract( hitLoc, ent.origin, ent.oldorigin ); + + tempLength = VectorNormalize( ent.oldorigin ); + vectoangles( ent.oldorigin, tempAng ); + tempAng[YAW] -= cent->lerpAngles[YAW]; + AngleVectors( tempAng, ent.oldorigin, NULL, NULL ); + VectorScale( ent.oldorigin, tempLength, ent.oldorigin ); + + ent.endTime = cent->dustTrailTime; + + /* + ent.renderfx |= RF_DISINTEGRATE2; + + ent.customShader = cgs.media.disruptorShader; + trap_R_AddRefEntityToScene( &ent ); + */ + + ent.renderfx &= ~(RF_DISINTEGRATE2); + ent.renderfx |= (RF_DISINTEGRATE1); + ent.customShader = 0; + trap_R_AddRefEntityToScene( &ent ); + + return; + } + else if (cent->currentState.eType == ET_BODY) + { + cent->dustTrailTime = 0; + } + + if (cent->currentState.modelGhoul2 && + !ent.ghoul2 && + !ent.hModel) + { + return; + } + + // add to refresh list + trap_R_AddRefEntityToScene (&ent); + + if (cent->bolt3 == 999) + { //this is an in-flight saber being rendered manually + vec3_t org; + float wv; + int i; + addspriteArgStruct_t fxSArgs; + //refEntity_t sRef; + //memcpy( &sRef, &ent, sizeof( sRef ) ); + + ent.customShader = cgs.media.solidWhite; + ent.renderfx = RF_RGB_TINT; + wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; + ent.shaderRGBA[0] = wv * 255; + ent.shaderRGBA[1] = wv * 255; + ent.shaderRGBA[2] = wv * 0; + trap_R_AddRefEntityToScene (&ent); + + for ( i = -4; i < 10; i += 1 ) + { + VectorMA( ent.origin, -i, ent.axis[2], org ); + + VectorCopy(org, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = 5.5f; + fxSArgs.dscale = 5.5f; + fxSArgs.sAlpha = wv; + fxSArgs.eAlpha = wv; + fxSArgs.rotation = 0.0f; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + fxSArgs.shader = cgs.media.yellowDroppedSaberShader; + fxSArgs.flags = 0x08000000; + + //trap_FX_AddSprite( org, NULL, NULL, 5.5f, 5.5f, wv, wv, 0.0f, 0.0f, 1.0f, cgs.media.yellowSaberGlowShader, 0x08000000 ); + trap_FX_AddSprite(&fxSArgs); + } + } + else if (cent->currentState.trickedentindex3) + { //holocron special effects + vec3_t org; + float wv; + addspriteArgStruct_t fxSArgs; + //refEntity_t sRef; + //memcpy( &sRef, &ent, sizeof( sRef ) ); + + ent.customShader = cgs.media.solidWhite; + ent.renderfx = RF_RGB_TINT; + wv = sin( cg.time * 0.005f ) * 0.08f + 0.1f; //* 0.08f + 0.1f; + + if (cent->currentState.trickedentindex3 == 1) + { //dark + ent.shaderRGBA[0] = wv*255; + ent.shaderRGBA[1] = 0; + ent.shaderRGBA[2] = 0; + } + else if (cent->currentState.trickedentindex3 == 2) + { //light + ent.shaderRGBA[0] = wv*255; + ent.shaderRGBA[1] = wv*255; + ent.shaderRGBA[2] = wv*255; + } + else + { //neutral + if ((s1->modelindex+128) == FP_SABERATTACK || + (s1->modelindex+128) == FP_SABERDEFEND || + (s1->modelindex+128) == FP_SABERTHROW) + { //saber power + ent.shaderRGBA[0] = 0; + ent.shaderRGBA[1] = wv*255; + ent.shaderRGBA[2] = 0; + } + else + { + ent.shaderRGBA[0] = 0; + ent.shaderRGBA[1] = wv*255; + ent.shaderRGBA[2] = wv*255; + } + } + + ent.modelScale[0] = 1.1; + ent.modelScale[1] = 1.1; + ent.modelScale[2] = 1.1; + + ent.origin[2] -= 2; + ScaleModelAxis(&ent); + + trap_R_AddRefEntityToScene (&ent); + + VectorMA( ent.origin, 1, ent.axis[2], org ); + + org[2] += 18; + + wv = sin( cg.time * 0.002f ) * 0.08f + 0.1f; //* 0.08f + 0.1f; + + VectorCopy(org, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = wv*120;//16.0f; + fxSArgs.dscale = wv*120;//16.0f; + fxSArgs.sAlpha = wv*12; + fxSArgs.eAlpha = wv*12; + fxSArgs.rotation = 0.0f; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + + fxSArgs.flags = 0x08000000|0x00000001; + + if (cent->currentState.trickedentindex3 == 1) + { //dark + fxSArgs.sAlpha *= 3; + fxSArgs.eAlpha *= 3; + fxSArgs.shader = cgs.media.redSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else if (cent->currentState.trickedentindex3 == 2) + { //light + fxSArgs.sAlpha *= 1.5; + fxSArgs.eAlpha *= 1.5; + fxSArgs.shader = cgs.media.redSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.blueSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else + { //neutral + if ((s1->modelindex+128) == FP_SABERATTACK || + (s1->modelindex+128) == FP_SABERDEFEND || + (s1->modelindex+128) == FP_SABERTHROW) + { //saber power + fxSArgs.sAlpha *= 1.5; + fxSArgs.eAlpha *= 1.5; + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else + { + fxSArgs.sAlpha *= 0.5; + fxSArgs.eAlpha *= 0.5; + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.blueSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + } + } + + if ( cent->currentState.time == -1 && cent->currentState.weapon == WP_TRIP_MINE && (cent->currentState.eFlags & EF_FIRING) ) + { //if force sight is active, render the laser multiple times up to the force sight level to increase visibility + int i = 0; + + VectorMA( ent.origin, 6.6f, ent.axis[0], beamOrg );// forward + beamID = cgs.effects.tripmineLaserFX; + + if (cg.snap->ps.fd.forcePowersActive & (1 << FP_SEE)) + { + i = cg.snap->ps.fd.forcePowerLevel[FP_SEE]; + + while (i > 0) + { + trap_FX_PlayEffectID( beamID, beamOrg, cent->currentState.pos.trDelta ); + trap_FX_PlayEffectID( beamID, beamOrg, cent->currentState.pos.trDelta ); + i--; + } + } + + trap_FX_PlayEffectID( beamID, beamOrg, cent->currentState.pos.trDelta ); + } +/* +Ghoul2 Insert Start +*/ + + if (cg_debugBB.integer) + { + CG_CreateBBRefEnts(s1, cent->lerpOrigin); + } +/* +Ghoul2 Insert End +*/ +} + +/* +================== +CG_Speaker + +Speaker entities can automatically play sounds +================== +*/ +static void CG_Speaker( centity_t *cent ) { + if (cent->currentState.trickedentindex) + { + trap_S_StopLoopingSound(cent->currentState.number); + } + + if ( ! cent->currentState.clientNum ) { // FIXME: use something other than clientNum... + return; // not auto triggering + } + + if ( cg.time < cent->miscTime ) { + return; + } + + trap_S_StartSound (NULL, cent->currentState.number, CHAN_ITEM, cgs.gameSounds[cent->currentState.eventParm] ); + + // ent->s.frame = ent->wait * 10; + // ent->s.clientNum = ent->random * 10; + cent->miscTime = cg.time + cent->currentState.frame * 100 + cent->currentState.clientNum * 100 * crandom(); +} + +qboolean CG_GreyItem(int type, int tag, int plSide) +{ + if (type == IT_POWERUP && + (tag == PW_FORCE_ENLIGHTENED_LIGHT || tag == PW_FORCE_ENLIGHTENED_DARK)) + { + if (plSide == FORCE_LIGHTSIDE) + { + if (tag == PW_FORCE_ENLIGHTENED_DARK) + { + return qtrue; + } + } + else if (plSide == FORCE_DARKSIDE) + { + if (tag == PW_FORCE_ENLIGHTENED_LIGHT) + { + return qtrue; + } + } + } + + return qfalse; +} + +/* +================== +CG_Item +================== +*/ +static void CG_Item( centity_t *cent ) { + refEntity_t ent; + entityState_t *es; + gitem_t *item; + int msec; + float scale; + weaponInfo_t *wi; + + es = ¢->currentState; + if ( es->modelindex >= bg_numItems ) { + CG_Error( "Bad item index %i on entity", es->modelindex ); + } + +/* +Ghoul2 Insert Start +*/ + + if ((es->eFlags & EF_NODRAW) && (es->eFlags & EF_ITEMPLACEHOLDER)) + { + es->eFlags &= ~EF_NODRAW; + } + + if ( !es->modelindex ) + { + return; + } + + item = &bg_itemlist[ es->modelindex ]; + + if ((item->giType == IT_WEAPON || item->giType == IT_POWERUP) && + !(cent->currentState.eFlags & EF_DROPPEDWEAPON) && + !cg_simpleItems.integer) + { + vec3_t uNorm; + qboolean doGrey; + + VectorClear(uNorm); + + uNorm[2] = 1; + + memset( &ent, 0, sizeof( ent ) ); + + ent.customShader = 0; + VectorCopy(cent->lerpOrigin, ent.origin); + VectorCopy( cent->currentState.angles, cent->lerpAngles ); + AnglesToAxis(cent->lerpAngles, ent.axis); + ent.hModel = cgs.media.itemHoloModel; + + doGrey = CG_GreyItem(item->giType, item->giTag, cg.snap->ps.fd.forceSide); + + if (doGrey) + { + ent.renderfx |= RF_RGB_TINT; + + ent.shaderRGBA[0] = 150; + ent.shaderRGBA[1] = 150; + ent.shaderRGBA[2] = 150; + } + + trap_R_AddRefEntityToScene(&ent); + + if (!doGrey) + { + trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/itemcone.efx"), ent.origin, uNorm); + } + } + + // if set to invisible, skip + if ( ( es->eFlags & EF_NODRAW ) ) + { + return; + } +/* +Ghoul2 Insert End +*/ + + if ( cg_simpleItems.integer && item->giType != IT_TEAM ) { + memset( &ent, 0, sizeof( ent ) ); + ent.reType = RT_SPRITE; + VectorCopy( cent->lerpOrigin, ent.origin ); + ent.radius = 14; + ent.customShader = cg_items[es->modelindex].icon; + ent.shaderRGBA[0] = 255; + ent.shaderRGBA[1] = 255; + ent.shaderRGBA[2] = 255; + + ent.origin[2] += 16; + + if (item->giType != IT_POWERUP || item->giTag != PW_FORCE_BOON) + { + ent.renderfx |= RF_FORCE_ENT_ALPHA; + } + + if ( es->eFlags & EF_ITEMPLACEHOLDER ) + { + if (item->giType == IT_POWERUP && item->giTag == PW_FORCE_BOON) + { + return; + } + ent.shaderRGBA[0] = 200; + ent.shaderRGBA[1] = 200; + ent.shaderRGBA[2] = 200; + ent.shaderRGBA[3] = 150 + sin(cg.time*0.01)*30; + } + else + { + ent.shaderRGBA[3] = 255; + } + + if (CG_GreyItem(item->giType, item->giTag, cg.snap->ps.fd.forceSide)) + { + ent.shaderRGBA[0] = 100; + ent.shaderRGBA[1] = 100; + ent.shaderRGBA[2] = 100; + + ent.shaderRGBA[3] = 200; + + if (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT) + { + ent.customShader = trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable"); + } + else + { + ent.customShader = trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable"); + } + } + trap_R_AddRefEntityToScene(&ent); + return; + } + + if ((item->giType == IT_WEAPON || item->giType == IT_POWERUP) && + !(cent->currentState.eFlags & EF_DROPPEDWEAPON)) + { + cent->lerpOrigin[2] += 16; + } + + if ((!(cent->currentState.eFlags & EF_DROPPEDWEAPON) || item->giType == IT_POWERUP) && + (item->giType == IT_WEAPON || item->giType == IT_POWERUP)) + { + // items bob up and down continuously + scale = 0.005 + cent->currentState.number * 0.00001; + cent->lerpOrigin[2] += 4 + cos( ( cg.time + 1000 ) * scale ) * 4; + } + else + { + if (item->giType == IT_HOLDABLE) + { + if (item->giTag == HI_SEEKER) + { + cent->lerpOrigin[2] += 5; + } + if (item->giTag == HI_SHIELD) + { + cent->lerpOrigin[2] += 2; + } + if (item->giTag == HI_BINOCULARS) + { + cent->lerpOrigin[2] += 2; + } + } + if (item->giType == IT_HEALTH) + { + cent->lerpOrigin[2] += 2; + } + if (item->giType == IT_ARMOR) + { + if (item->quantity == 100) + { + cent->lerpOrigin[2] += 7; + } + } + } + + memset (&ent, 0, sizeof(ent)); + + if ( (!(cent->currentState.eFlags & EF_DROPPEDWEAPON) || item->giType == IT_POWERUP) && + (item->giType == IT_WEAPON || item->giType == IT_POWERUP) ) + { //only weapons and powerups rotate now + // autorotate at one of two speeds + VectorCopy( cg.autoAngles, cent->lerpAngles ); + AxisCopy( cg.autoAxis, ent.axis ); + } + else + { + VectorCopy( cent->currentState.angles, cent->lerpAngles ); + AnglesToAxis(cent->lerpAngles, ent.axis); + } + + wi = NULL; + // the weapons have their origin where they attatch to player + // models, so we need to offset them or they will rotate + // eccentricly + if (!(cent->currentState.eFlags & EF_DROPPEDWEAPON)) + { + if ( item->giType == IT_WEAPON ) { + wi = &cg_weapons[item->giTag]; + cent->lerpOrigin[0] -= + wi->weaponMidpoint[0] * ent.axis[0][0] + + wi->weaponMidpoint[1] * ent.axis[1][0] + + wi->weaponMidpoint[2] * ent.axis[2][0]; + cent->lerpOrigin[1] -= + wi->weaponMidpoint[0] * ent.axis[0][1] + + wi->weaponMidpoint[1] * ent.axis[1][1] + + wi->weaponMidpoint[2] * ent.axis[2][1]; + cent->lerpOrigin[2] -= + wi->weaponMidpoint[0] * ent.axis[0][2] + + wi->weaponMidpoint[1] * ent.axis[1][2] + + wi->weaponMidpoint[2] * ent.axis[2][2]; + + cent->lerpOrigin[2] += 8; // an extra height boost + } + } + else + { + wi = &cg_weapons[item->giTag]; + + switch(item->giTag) + { + case WP_BLASTER: + cent->lerpOrigin[2] -= 12; + break; + case WP_DISRUPTOR: + cent->lerpOrigin[2] -= 13; + break; + case WP_BOWCASTER: + cent->lerpOrigin[2] -= 16; + break; + case WP_REPEATER: + cent->lerpOrigin[2] -= 12; + break; + case WP_DEMP2: + cent->lerpOrigin[2] -= 10; + break; + case WP_FLECHETTE: + cent->lerpOrigin[2] -= 6; + break; + case WP_ROCKET_LAUNCHER: + cent->lerpOrigin[2] -= 11; + break; + case WP_THERMAL: + cent->lerpOrigin[2] -= 12; + break; + case WP_TRIP_MINE: + cent->lerpOrigin[2] -= 16; + break; + case WP_DET_PACK: + cent->lerpOrigin[2] -= 16; + break; + default: + cent->lerpOrigin[2] -= 8; + break; + } + } + + ent.hModel = cg_items[es->modelindex].models[0]; +/* +Ghoul2 Insert Start +*/ + ent.ghoul2 = cg_items[es->modelindex].g2Models[0]; + ent.radius = cg_items[es->modelindex].radius[0]; + VectorCopy (cent->lerpAngles, ent.angles); +/* +Ghoul2 Insert End +*/ + VectorCopy( cent->lerpOrigin, ent.origin); + VectorCopy( cent->lerpOrigin, ent.oldorigin); + + ent.nonNormalizedAxes = qfalse; + + // if just respawned, slowly scale up + + msec = cg.time - cent->miscTime; + + if (CG_GreyItem(item->giType, item->giTag, cg.snap->ps.fd.forceSide)) + { + ent.renderfx |= RF_RGB_TINT; + + ent.shaderRGBA[0] = 150; + ent.shaderRGBA[1] = 150; + ent.shaderRGBA[2] = 150; + + ent.renderfx |= RF_FORCE_ENT_ALPHA; + + ent.shaderRGBA[3] = 200; + + if (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT) + { + ent.customShader = trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable"); + } + else + { + ent.customShader = trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable"); + } + + trap_R_AddRefEntityToScene( &ent ); + return; + } + + if ( es->eFlags & EF_ITEMPLACEHOLDER ) // item has been picked up + { + if ( es->eFlags & EF_DEAD ) // if item had been droped, don't show at all + return; + + ent.renderfx |= RF_RGB_TINT; + ent.shaderRGBA[0] = 0; + ent.shaderRGBA[1] = 200; + ent.shaderRGBA[2] = 85; + ent.customShader = cgs.media.itemRespawningPlaceholder; + } + + // increase the size of the weapons when they are presented as items + if ( item->giType == IT_WEAPON ) { + VectorScale( ent.axis[0], 1.5, ent.axis[0] ); + VectorScale( ent.axis[1], 1.5, ent.axis[1] ); + VectorScale( ent.axis[2], 1.5, ent.axis[2] ); + ent.nonNormalizedAxes = qtrue; + //trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.weaponHoverSound ); + } + + if (!(cent->currentState.eFlags & EF_DROPPEDWEAPON) && + (item->giType == IT_WEAPON || item->giType == IT_POWERUP)) + { + ent.renderfx |= RF_MINLIGHT; + } + + if (item->giType != IT_TEAM && msec >= 0 && msec < ITEM_SCALEUP_TIME && !(es->eFlags & EF_ITEMPLACEHOLDER) && !(es->eFlags & EF_DROPPEDWEAPON)) + { // if just respawned, fade in, but don't do this for flags. + float alpha; + int a; + + alpha = (float)msec / ITEM_SCALEUP_TIME; + a = alpha * 255.0; + if (a <= 0) + a=1; + + ent.shaderRGBA[3] = a; + if (item->giType != IT_POWERUP || item->giTag != PW_FORCE_BOON) + { //boon model uses a different blending mode for the sprite inside and doesn't look proper with this method + ent.renderfx |= RF_FORCE_ENT_ALPHA; + } + trap_R_AddRefEntityToScene(&ent); + + ent.renderfx &= ~RF_FORCE_ENT_ALPHA; + + // Now draw the static shader over it. + // Alpha in over half the time, out over half. + + //alpha = sin(M_PI*alpha); + a = alpha * 255.0; + + a = 255 - a; + + if (a <= 0) + a=1; + if (a > 255) + a=255; + + ent.customShader = cgs.media.itemRespawningRezOut; + + /* + ent.shaderRGBA[0] = 0; + ent.shaderRGBA[1] = a; + ent.shaderRGBA[2] = a-100; + + if (ent.shaderRGBA[2] < 0) + { + ent.shaderRGBA[2] = 0; + } + */ + + /* + ent.shaderRGBA[0] = + ent.shaderRGBA[1] = + ent.shaderRGBA[2] = a; + */ + + ent.renderfx |= RF_RGB_TINT; + ent.shaderRGBA[0] = 0; + ent.shaderRGBA[1] = 200; + ent.shaderRGBA[2] = 85; + + trap_R_AddRefEntityToScene( &ent ); + } + else + { // add to refresh list -- normal item + if (item->giType == IT_TEAM && + (item->giTag == PW_REDFLAG || item->giTag == PW_BLUEFLAG)) + { + ent.modelScale[0] = 0.7; + ent.modelScale[1] = 0.7; + ent.modelScale[2] = 0.7; + ScaleModelAxis(&ent); + } + trap_R_AddRefEntityToScene(&ent); + } + + //rww - As far as I can see, this is useless. + /* + if ( item->giType == IT_WEAPON && wi->barrelModel ) { + refEntity_t barrel; + + memset( &barrel, 0, sizeof( barrel ) ); + + barrel.hModel = wi->barrelModel; + + VectorCopy( ent.lightingOrigin, barrel.lightingOrigin ); + barrel.shadowPlane = ent.shadowPlane; + barrel.renderfx = ent.renderfx; + + barrel.customShader = ent.customShader; + + CG_PositionRotatedEntityOnTag( &barrel, &ent, wi->weaponModel, "tag_barrel" ); + + AxisCopy( ent.axis, barrel.axis ); + barrel.nonNormalizedAxes = ent.nonNormalizedAxes; + + trap_R_AddRefEntityToScene( &barrel ); + } + */ + + // accompanying rings / spheres for powerups + if ( !cg_simpleItems.integer ) + { + vec3_t spinAngles; + + VectorClear( spinAngles ); + + if ( item->giType == IT_HEALTH || item->giType == IT_POWERUP ) + { + if ( ( ent.hModel = cg_items[es->modelindex].models[1] ) != 0 ) + { + if ( item->giType == IT_POWERUP ) + { + ent.origin[2] += 12; + spinAngles[1] = ( cg.time & 1023 ) * 360 / -1024.0f; + } + AnglesToAxis( spinAngles, ent.axis ); + + trap_R_AddRefEntityToScene( &ent ); + } + } + } +} + +//============================================================================ + +/* +=============== +CG_Missile +=============== +*/ +static void CG_Missile( centity_t *cent ) { + refEntity_t ent; + entityState_t *s1; + const weaponInfo_t *weapon; +// int col; + + s1 = ¢->currentState; + if ( s1->weapon > WP_NUM_WEAPONS && s1->weapon != G2_MODEL_PART ) { + s1->weapon = 0; + } + + if (cent->ghoul2 && s1->weapon == G2_MODEL_PART) + { + weapon = &cg_weapons[WP_SABER]; + } + else + { + weapon = &cg_weapons[s1->weapon]; + } + + if (s1->weapon == WP_SABER) + { + if (!cent->ghoul2 && !(s1->eFlags & EF_NODRAW)) + { + trap_G2API_InitGhoul2Model(¢->ghoul2, "models/weapons2/saber/saber_w.glm", 0, 0, 0, 0, 0); + return; + } + else if (s1->eFlags & EF_NODRAW) + { + return; + } + } + + if (cent->ghoul2) + { //give us a proper radius + ent.radius = cent->currentState.g2radius; + } + + // calculate the axis + VectorCopy( s1->angles, cent->lerpAngles); + + if ( cent->currentState.eFlags & EF_ALT_FIRING ) + { + // add trails + if ( weapon->altMissileTrailFunc ) + weapon->altMissileTrailFunc( cent, weapon ); + + // add dynamic light + if ( weapon->altMissileDlight ) + { + trap_R_AddLightToScene(cent->lerpOrigin, weapon->altMissileDlight, + weapon->altMissileDlightColor[0], weapon->altMissileDlightColor[1], weapon->altMissileDlightColor[2] ); + } + + // add missile sound + if ( weapon->altMissileSound ) { + vec3_t velocity; + + BG_EvaluateTrajectoryDelta( ¢->currentState.pos, cg.time, velocity ); + + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, velocity, weapon->altMissileSound ); + } + + //Don't draw something without a model + if ( weapon->altMissileModel == NULL_HANDLE ) + return; + } + else + { + // add trails + if ( weapon->missileTrailFunc ) + weapon->missileTrailFunc( cent, weapon ); + + // add dynamic light + if ( weapon->missileDlight ) + { + trap_R_AddLightToScene(cent->lerpOrigin, weapon->missileDlight, + weapon->missileDlightColor[0], weapon->missileDlightColor[1], weapon->missileDlightColor[2] ); + } + + // add missile sound + if ( weapon->missileSound ) + { + vec3_t velocity; + + BG_EvaluateTrajectoryDelta( ¢->currentState.pos, cg.time, velocity ); + + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, velocity, weapon->missileSound ); + } + + //Don't draw something without a model + if ( weapon->missileModel == NULL_HANDLE && s1->weapon != WP_SABER && s1->weapon != G2_MODEL_PART ) //saber uses ghoul2 model, doesn't matter + return; + } + + // create the render entity + memset (&ent, 0, sizeof(ent)); + VectorCopy( cent->lerpOrigin, ent.origin); + VectorCopy( cent->lerpOrigin, ent.oldorigin); +/* +Ghoul2 Insert Start +*/ + CG_SetGhoul2Info(&ent, cent); + +/* +Ghoul2 Insert End +*/ + + // flicker between two skins + ent.skinNum = cg.clientFrame & 1; + ent.renderfx = /*weapon->missileRenderfx | */RF_NOSHADOW; + + if (s1->weapon != WP_SABER && s1->weapon != G2_MODEL_PART) + { + //if ( cent->currentState.eFlags | EF_ALT_FIRING ) + //rww - why was this like this? + if ( cent->currentState.eFlags & EF_ALT_FIRING ) + { + ent.hModel = weapon->altMissileModel; + } + else + { + ent.hModel = weapon->missileModel; + } + } + + // spin as it moves + if ( s1->apos.trType != TR_INTERPOLATE ) + { + // convert direction of travel into axis + if ( VectorNormalize2( s1->pos.trDelta, ent.axis[0] ) == 0 ) { + ent.axis[0][2] = 1; + } + + // spin as it moves + if ( s1->pos.trType != TR_STATIONARY ) + { + if ( s1->eFlags & EF_MISSILE_STICK ) + { + RotateAroundDirection( ent.axis, cg.time * 0.5f );//Did this so regular missiles don't get broken + } + else + { + RotateAroundDirection( ent.axis, cg.time * 0.25f );//JFM:FLOAT FIX + } + } + else + { + if ( s1->eFlags & EF_MISSILE_STICK ) + { + RotateAroundDirection( ent.axis, (float)s1->pos.trTime * 0.5f ); + } + else + { + RotateAroundDirection( ent.axis, (float)s1->time ); + } + } + } + else + { + AnglesToAxis( cent->lerpAngles, ent.axis ); + } + + if (s1->weapon == WP_SABER) + { + ent.radius = s1->g2radius; + } + + // add to refresh list, possibly with quad glow + CG_AddRefEntityWithPowerups( &ent, s1, TEAM_FREE ); + + if (s1->weapon == WP_SABER && cgs.gametype == GT_JEDIMASTER) + { //in jedimaster always make the saber glow when on the ground + vec3_t org; + float wv; + int i; + addspriteArgStruct_t fxSArgs; + //refEntity_t sRef; + //memcpy( &sRef, &ent, sizeof( sRef ) ); + + ent.customShader = cgs.media.solidWhite; + ent.renderfx = RF_RGB_TINT; + wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; + ent.shaderRGBA[0] = wv * 255; + ent.shaderRGBA[1] = wv * 255; + ent.shaderRGBA[2] = wv * 0; + trap_R_AddRefEntityToScene (&ent); + + for ( i = -4; i < 10; i += 1 ) + { + VectorMA( ent.origin, -i, ent.axis[2], org ); + + VectorCopy(org, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = 5.5f; + fxSArgs.dscale = 5.5f; + fxSArgs.sAlpha = wv; + fxSArgs.eAlpha = wv; + fxSArgs.rotation = 0.0f; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + fxSArgs.shader = cgs.media.yellowDroppedSaberShader; + fxSArgs.flags = 0x08000000; + + //trap_FX_AddSprite( org, NULL, NULL, 5.5f, 5.5f, wv, wv, 0.0f, 0.0f, 1.0f, cgs.media.yellowSaberGlowShader, 0x08000000 ); + trap_FX_AddSprite(&fxSArgs); + } + + if (cgs.gametype == GT_JEDIMASTER) + { + ent.shaderRGBA[0] = 255; + ent.shaderRGBA[1] = 255; + ent.shaderRGBA[2] = 0; + + ent.renderfx |= RF_DEPTHHACK; + ent.customShader = cgs.media.forceSightBubble; + + trap_R_AddRefEntityToScene( &ent ); + } + } + + if ( s1->eFlags & EF_FIRING ) + {//special code for adding the beam to the attached tripwire mine + vec3_t beamOrg; + + VectorMA( ent.origin, 8, ent.axis[0], beamOrg );// forward + trap_FX_PlayEffect( "tripMine/laser.efx", beamOrg, ent.axis[0] ); + } +} + +/* +=============== +CG_Mover +=============== +*/ +static void CG_Mover( centity_t *cent ) { + refEntity_t ent; + entityState_t *s1; + + s1 = ¢->currentState; + + // create the render entity + memset (&ent, 0, sizeof(ent)); + VectorCopy( cent->lerpOrigin, ent.origin); + VectorCopy( cent->lerpOrigin, ent.oldorigin); + AnglesToAxis( cent->lerpAngles, ent.axis ); + + ent.renderfx = RF_NOSHADOW; +/* +Ghoul2 Insert Start +*/ + + CG_SetGhoul2Info(&ent, cent); +/* +Ghoul2 Insert End +*/ + // flicker between two skins (FIXME?) + ent.skinNum = ( cg.time >> 6 ) & 1; + + // get the model, either as a bmodel or a modelindex + if ( s1->solid == SOLID_BMODEL ) + { + ent.hModel = cgs.inlineDrawModel[s1->modelindex]; + } + else + { + ent.hModel = cgs.gameModels[s1->modelindex]; + } + + // add to refresh list + trap_R_AddRefEntityToScene(&ent); + + // add the secondary model + if ( s1->modelindex2 ) + { + ent.skinNum = 0; + ent.hModel = cgs.gameModels[s1->modelindex2]; + trap_R_AddRefEntityToScene(&ent); + } + +} + +/* +=============== +CG_Beam + +Also called as an event +=============== +*/ +void CG_Beam( centity_t *cent ) { + refEntity_t ent; + entityState_t *s1; + + s1 = ¢->currentState; + + // create the render entity + memset (&ent, 0, sizeof(ent)); + VectorCopy( s1->pos.trBase, ent.origin ); + VectorCopy( s1->origin2, ent.oldorigin ); + AxisClear( ent.axis ); + ent.reType = RT_BEAM; + + ent.renderfx = RF_NOSHADOW; +/* +Ghoul2 Insert Start +*/ + CG_SetGhoul2Info(&ent, cent); + +/* +Ghoul2 Insert End +*/ + // add to refresh list + trap_R_AddRefEntityToScene(&ent); +} + + +/* +=============== +CG_Portal +=============== +*/ +static void CG_Portal( centity_t *cent ) { + refEntity_t ent; + entityState_t *s1; + + s1 = ¢->currentState; + + // create the render entity + memset (&ent, 0, sizeof(ent)); + VectorCopy( cent->lerpOrigin, ent.origin ); + VectorCopy( s1->origin2, ent.oldorigin ); + ByteToDir( s1->eventParm, ent.axis[0] ); + PerpendicularVector( ent.axis[1], ent.axis[0] ); + + // negating this tends to get the directions like they want + // we really should have a camera roll value + VectorSubtract( vec3_origin, ent.axis[1], ent.axis[1] ); + + CrossProduct( ent.axis[0], ent.axis[1], ent.axis[2] ); + ent.reType = RT_PORTALSURFACE; + ent.oldframe = s1->powerups; + ent.frame = s1->frame; // rotation speed + ent.skinNum = s1->clientNum/256.0 * 360; // roll offset +/* +Ghoul2 Insert Start +*/ + CG_SetGhoul2Info(&ent, cent); +/* +Ghoul2 Insert End +*/ + // add to refresh list + trap_R_AddRefEntityToScene(&ent); +} + + +/* +========================= +CG_AdjustPositionForMover + +Also called by client movement prediction code +========================= +*/ +void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out ) { + centity_t *cent; + vec3_t oldOrigin, origin, deltaOrigin; + vec3_t oldAngles, angles, deltaAngles; + + if ( moverNum <= 0 || moverNum >= ENTITYNUM_MAX_NORMAL ) { + VectorCopy( in, out ); + return; + } + + cent = &cg_entities[ moverNum ]; + if ( cent->currentState.eType != ET_MOVER ) { + VectorCopy( in, out ); + return; + } + + BG_EvaluateTrajectory( ¢->currentState.pos, fromTime, oldOrigin ); + BG_EvaluateTrajectory( ¢->currentState.apos, fromTime, oldAngles ); + + BG_EvaluateTrajectory( ¢->currentState.pos, toTime, origin ); + BG_EvaluateTrajectory( ¢->currentState.apos, toTime, angles ); + + VectorSubtract( origin, oldOrigin, deltaOrigin ); + VectorSubtract( angles, oldAngles, deltaAngles ); + + VectorAdd( in, deltaOrigin, out ); + + // FIXME: origin change when on a rotating object +} + +/* +Ghoul2 Insert Start +*/ +static void LerpBoneAngleOverrides( centity_t *cent) +{ + +} +/* +Ghoul2 Insert End +*/ +/* +============================= +CG_InterpolateEntityPosition +============================= +*/ +static void CG_InterpolateEntityPosition( centity_t *cent ) { + vec3_t current, next; + float f; + + // it would be an internal error to find an entity that interpolates without + // a snapshot ahead of the current one + if ( cg.nextSnap == NULL ) { + CG_Error( "CG_InterpoateEntityPosition: cg.nextSnap == NULL" ); + } + + f = cg.frameInterpolation; + + // this will linearize a sine or parabolic curve, but it is important + // to not extrapolate player positions if more recent data is available + BG_EvaluateTrajectory( ¢->currentState.pos, cg.snap->serverTime, current ); + BG_EvaluateTrajectory( ¢->nextState.pos, cg.nextSnap->serverTime, next ); + + cent->lerpOrigin[0] = current[0] + f * ( next[0] - current[0] ); + cent->lerpOrigin[1] = current[1] + f * ( next[1] - current[1] ); + cent->lerpOrigin[2] = current[2] + f * ( next[2] - current[2] ); + + BG_EvaluateTrajectory( ¢->currentState.apos, cg.snap->serverTime, current ); + BG_EvaluateTrajectory( ¢->nextState.apos, cg.nextSnap->serverTime, next ); + + cent->lerpAngles[0] = LerpAngle( current[0], next[0], f ); + cent->lerpAngles[1] = LerpAngle( current[1], next[1], f ); + cent->lerpAngles[2] = LerpAngle( current[2], next[2], f ); +/* +Ghoul2 Insert Start +*/ + // now the nasty stuff - this will interpolate all ghoul2 models bone angle overrides per model attached to this cent +// if (cent->currentState.ghoul2.size()) + { + LerpBoneAngleOverrides(cent); + } +/* +Ghoul2 Insert End +*/ +} + +/* +=============== +CG_CalcEntityLerpPositions + +=============== +*/ +void CG_CalcEntityLerpPositions( centity_t *cent ) { + + // if this player does not want to see extrapolated players + if ( !cg_smoothClients.integer ) { + // make sure the clients use TR_INTERPOLATE + if ( cent->currentState.number < MAX_CLIENTS ) { + cent->currentState.pos.trType = TR_INTERPOLATE; + cent->nextState.pos.trType = TR_INTERPOLATE; + } + } + + if ( cent->interpolate && cent->currentState.pos.trType == TR_INTERPOLATE ) { + CG_InterpolateEntityPosition( cent ); + return; + } + + // first see if we can interpolate between two snaps for + // linear extrapolated clients + if ( cent->interpolate && cent->currentState.pos.trType == TR_LINEAR_STOP && + cent->currentState.number < MAX_CLIENTS) { + CG_InterpolateEntityPosition( cent ); + return; + } + + // just use the current frame and evaluate as best we can + BG_EvaluateTrajectory( ¢->currentState.pos, cg.time, cent->lerpOrigin ); + BG_EvaluateTrajectory( ¢->currentState.apos, cg.time, cent->lerpAngles ); + + // adjust for riding a mover if it wasn't rolled into the predicted + // player state + if ( cent != &cg.predictedPlayerEntity ) { + CG_AdjustPositionForMover( cent->lerpOrigin, cent->currentState.groundEntityNum, + cg.snap->serverTime, cg.time, cent->lerpOrigin ); + } +/* +Ghoul2 Insert Start +*/ + // now the nasty stuff - this will interpolate all ghoul2 models bone angle overrides per model attached to this cent +// if (cent->currentState.ghoul2.size()) + { + LerpBoneAngleOverrides(cent); + } +/* +Ghoul2 Insert End +*/ +} + +/* +=============== +CG_TeamBase +=============== +*/ +static void CG_TeamBase( centity_t *cent ) { + refEntity_t model; + if ( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { + // show the flag base + memset(&model, 0, sizeof(model)); + model.reType = RT_MODEL; + VectorCopy( cent->lerpOrigin, model.lightingOrigin ); + VectorCopy( cent->lerpOrigin, model.origin ); + AnglesToAxis( cent->currentState.angles, model.axis ); + if ( cent->currentState.modelindex == TEAM_RED ) { + model.hModel = cgs.media.redFlagBaseModel; + } + else if ( cent->currentState.modelindex == TEAM_BLUE ) { + model.hModel = cgs.media.blueFlagBaseModel; + } + else { + model.hModel = cgs.media.neutralFlagBaseModel; + } + + if (cent->currentState.eType != ET_GRAPPLE) + { //do not do this for g2animents + trap_R_AddRefEntityToScene( &model ); + } + } +} + +void CG_G2Animated( centity_t *cent ); + +/* +=============== +CG_AddCEntity + +=============== +*/ +static void CG_AddCEntity( centity_t *cent ) { + // event-only entities will have been dealt with already + if ( cent->currentState.eType >= ET_EVENTS ) { + return; + } + + // calculate the current origin + CG_CalcEntityLerpPositions( cent ); + + // add automatic effects + CG_EntityEffects( cent ); +/* +Ghoul2 Insert Start +*/ + + // do this before we copy the data to refEnts + if (trap_G2_HaveWeGhoul2Models(cent->ghoul2)) + { + trap_G2_SetGhoul2ModelIndexes(cent->ghoul2, cgs.gameModels, cgs.skins); + } + +/* +Ghoul2 Insert End +*/ + switch ( cent->currentState.eType ) { + default: + CG_Error( "Bad entity type: %i\n", cent->currentState.eType ); + break; + case ET_INVISIBLE: + case ET_PUSH_TRIGGER: + case ET_TELEPORT_TRIGGER: + break; + case ET_GENERAL: + CG_General( cent ); + break; + case ET_PLAYER: + CG_Player( cent ); + break; + case ET_ITEM: + CG_Item( cent ); + break; + case ET_MISSILE: + CG_Missile( cent ); + break; + case ET_SPECIAL: + CG_Special( cent ); + break; + case ET_HOLOCRON: + CG_General( cent ); + break; + case ET_MOVER: + CG_Mover( cent ); + break; + case ET_BEAM: + CG_Beam( cent ); + break; + case ET_PORTAL: + CG_Portal( cent ); + break; + case ET_SPEAKER: + CG_Speaker( cent ); + break; + case ET_GRAPPLE: //An entity that wants to be able to use ghoul2 humanoid anims. Like a player, but not. + CG_G2Animated( cent ); + case ET_TEAM: + CG_TeamBase( cent ); + break; + case ET_BODY: + CG_General( cent ); + break; + } +} + +void CG_ManualEntityRender(centity_t *cent) +{ + CG_AddCEntity(cent); +} + +/* +=============== +CG_AddPacketEntities + +=============== +*/ +void CG_AddPacketEntities( void ) { + int num; + centity_t *cent; + playerState_t *ps; + + // set cg.frameInterpolation + if ( cg.nextSnap ) { + int delta; + + delta = (cg.nextSnap->serverTime - cg.snap->serverTime); + if ( delta == 0 ) { + cg.frameInterpolation = 0; + } else { + cg.frameInterpolation = (float)( cg.time - cg.snap->serverTime ) / delta; + } + } else { + cg.frameInterpolation = 0; // actually, it should never be used, because + // no entities should be marked as interpolating + } + + // the auto-rotating items will all have the same axis + cg.autoAngles[0] = 0; + cg.autoAngles[1] = ( cg.time & 2047 ) * 360 / 2048.0; + cg.autoAngles[2] = 0; + + cg.autoAnglesFast[0] = 0; + cg.autoAnglesFast[1] = ( cg.time & 1023 ) * 360 / 1024.0f; + cg.autoAnglesFast[2] = 0; + + AnglesToAxis( cg.autoAngles, cg.autoAxis ); + AnglesToAxis( cg.autoAnglesFast, cg.autoAxisFast ); + + // generate and add the entity from the playerstate + ps = &cg.predictedPlayerState; + + //rww - update the g2 pointer BEFORE the weapons, otherwise bad things could happen + //FIXME: These two pointers seem to differ sometimes, they shouldn't, should they? + //the one on predictedPlayerEntity also seems to often be invalid, so it can't be + //reliably checked and cleared. + cg.predictedPlayerEntity.ghoul2 = cg_entities[ cg.snap->ps.clientNum].ghoul2; + CG_CheckPlayerG2Weapons(ps, &cg.predictedPlayerEntity); + BG_PlayerStateToEntityState( ps, &cg.predictedPlayerEntity.currentState, qfalse ); + + // add in the Ghoul2 stuff. + VectorCopy( cg_entities[ cg.snap->ps.clientNum].modelScale, cg.predictedPlayerEntity.modelScale); + cg.predictedPlayerEntity.radius = cg_entities[ cg.snap->ps.clientNum].radius; + + CG_AddCEntity( &cg.predictedPlayerEntity ); + + // lerp the non-predicted value for lightning gun origins + CG_CalcEntityLerpPositions( &cg_entities[ cg.snap->ps.clientNum ] ); + + // add each entity sent over by the server + for ( num = 0 ; num < cg.snap->numEntities ; num++ ) { + // Don't re-add ents that have been predicted. + if (cg.snap->entities[ num ].number != cg.snap->ps.clientNum) + { + cent = &cg_entities[ cg.snap->entities[ num ].number ]; + CG_AddCEntity( cent ); + } + } +} + +void CG_ROFF_NotetrackCallback( centity_t *cent, const char *notetrack) +{ + int i = 0, r = 0, objectID = 0, anglesGathered = 0, posoffsetGathered = 0; + char type[256]; + char argument[512]; + char addlArg[512]; + char errMsg[256]; + char t[64]; + int addlArgs = 0; + vec3_t parsedAngles, parsedOffset, useAngles, useOrigin, forward, right, up; + + if (!cent || !notetrack) + { + return; + } + + //notetrack = "effect effects/explosion1.efx 0+0+64 0-0-1"; + + while (notetrack[i] && notetrack[i] != ' ') + { + type[i] = notetrack[i]; + i++; + } + + type[i] = '\0'; + + if (notetrack[i] != ' ') + { //didn't pass in a valid notetrack type, or forgot the argument for it + return; + } + + i++; + + while (notetrack[i] && notetrack[i] != ' ') + { + argument[r] = notetrack[i]; + r++; + i++; + } + argument[r] = '\0'; + + if (!r) + { + return; + } + + if (notetrack[i] == ' ') + { //additional arguments... + addlArgs = 1; + + i++; + r = 0; + while (notetrack[i]) + { + addlArg[r] = notetrack[i]; + r++; + i++; + } + addlArg[r] = '\0'; + } + + if (strcmp(type, "effect") == 0) + { + if (!addlArgs) + { + //sprintf(errMsg, "Offset position argument for 'effect' type is invalid."); + //goto functionend; + VectorClear(parsedOffset); + goto defaultoffsetposition; + } + + i = 0; + + while (posoffsetGathered < 3) + { + r = 0; + while (addlArg[i] && addlArg[i] != '+' && addlArg[i] != ' ') + { + t[r] = addlArg[i]; + r++; + i++; + } + t[r] = '\0'; + i++; + if (!r) + { //failure.. + //sprintf(errMsg, "Offset position argument for 'effect' type is invalid."); + //goto functionend; + VectorClear(parsedOffset); + i = 0; + goto defaultoffsetposition; + } + parsedOffset[posoffsetGathered] = atof(t); + posoffsetGathered++; + } + + if (posoffsetGathered < 3) + { + Com_sprintf(errMsg, sizeof(errMsg), "Offset position argument for 'effect' type is invalid."); + goto functionend; + } + + i--; + + if (addlArg[i] != ' ') + { + addlArgs = 0; + } + +defaultoffsetposition: + + objectID = trap_FX_RegisterEffect(argument); + + if (objectID) + { + if (addlArgs) + { //if there is an additional argument for an effect it is expected to be XANGLE-YANGLE-ZANGLE + i++; + while (anglesGathered < 3) + { + r = 0; + while (addlArg[i] && addlArg[i] != '-') + { + t[r] = addlArg[i]; + r++; + i++; + } + t[r] = '\0'; + i++; + + if (!r) + { //failed to get a new part of the vector + anglesGathered = 0; + break; + } + + parsedAngles[anglesGathered] = atof(t); + anglesGathered++; + } + + if (anglesGathered) + { + VectorCopy(parsedAngles, useAngles); + } + else + { //failed to parse angles from the extra argument provided.. + VectorCopy(cent->lerpAngles, useAngles); + } + } + else + { //if no constant angles, play in direction entity is facing + VectorCopy(cent->lerpAngles, useAngles); + } + + AngleVectors(useAngles, forward, right, up); + + VectorCopy(cent->lerpOrigin, useOrigin); + + //forward + useOrigin[0] += forward[0]*parsedOffset[0]; + useOrigin[1] += forward[1]*parsedOffset[0]; + useOrigin[2] += forward[2]*parsedOffset[0]; + + //right + useOrigin[0] += right[0]*parsedOffset[1]; + useOrigin[1] += right[1]*parsedOffset[1]; + useOrigin[2] += right[2]*parsedOffset[1]; + + //up + useOrigin[0] += up[0]*parsedOffset[2]; + useOrigin[1] += up[1]*parsedOffset[2]; + useOrigin[2] += up[2]*parsedOffset[2]; + + trap_FX_PlayEffectID(objectID, useOrigin, useAngles); + } + } + else if (strcmp(type, "sound") == 0) + { + objectID = trap_S_RegisterSound(argument); + trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_BODY, objectID); + } + else if (strcmp(type, "loop") == 0) + { //handled server-side + return; + } + //else if ... + else + { + if (type[0]) + { + Com_Printf("^3Warning: \"%s\" is an invalid ROFF notetrack function\n", type); + } + else + { + Com_Printf("^3Warning: Notetrack is missing function and/or arguments\n"); + } + } + + return; + +functionend: + Com_Printf("^3Type-specific notetrack error: %s\n", errMsg); + return; +} + diff --git a/code/cgame/cg_event (2).c b/code/cgame/cg_event (2).c new file mode 100644 index 0000000..90e4228 --- /dev/null +++ b/code/cgame/cg_event (2).c @@ -0,0 +1,2407 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_event.c -- handle entity events at snapshot or playerstate transitions + +#include "cg_local.h" +#include "fx_local.h" +#include "..\ghoul2\g2.h" +#include "../ui/ui_shared.h" + +// for the voice chats +#include "../../ui/menudef.h" +//========================================================================== + +extern int g_saberFlashTime; +extern vec3_t g_saberFlashPos; +extern char *showPowersName[]; + +/* +=================== +CG_PlaceString + +Also called by scoreboard drawing +=================== +*/ +const char *CG_PlaceString( int rank ) { + static char str[64]; + char *s, *t; + // number extenstions, eg 1st, 2nd, 3rd, 4th etc. + // note that the rules are different for french, but by changing the required strip strings they seem to work + char sST[10]; + char sND[10]; + char sRD[10]; + char sTH[10]; + char sTiedFor[64]; // german is much longer, super safe... + + trap_SP_GetStringTextString("INGAMETEXT_NUMBER_ST",sST, sizeof(sST) ); + trap_SP_GetStringTextString("INGAMETEXT_NUMBER_ND",sND, sizeof(sND) ); + trap_SP_GetStringTextString("INGAMETEXT_NUMBER_RD",sRD, sizeof(sRD) ); + trap_SP_GetStringTextString("INGAMETEXT_NUMBER_TH",sTH, sizeof(sTH) ); + trap_SP_GetStringTextString("INGAMETEXT_TIED_FOR" ,sTiedFor,sizeof(sTiedFor) ); + strcat(sTiedFor," "); // save worrying about translators adding spaces or not + + if ( rank & RANK_TIED_FLAG ) { + rank &= ~RANK_TIED_FLAG; + t = sTiedFor;//"Tied for "; + } else { + t = ""; + } + + if ( rank == 1 ) { + s = va("1%s",sST);//S_COLOR_BLUE "1st" S_COLOR_WHITE; // draw in blue + } else if ( rank == 2 ) { + s = va("2%s",sND);//S_COLOR_RED "2nd" S_COLOR_WHITE; // draw in red + } else if ( rank == 3 ) { + s = va("3%s",sRD);//S_COLOR_YELLOW "3rd" S_COLOR_WHITE; // draw in yellow + } else if ( rank == 11 ) { + s = va("11%s",sTH); + } else if ( rank == 12 ) { + s = va("12%s",sTH); + } else if ( rank == 13 ) { + s = va("13%s",sTH); + } else if ( rank % 10 == 1 ) { + s = va("%i%s", rank,sST); + } else if ( rank % 10 == 2 ) { + s = va("%i%s", rank,sND); + } else if ( rank % 10 == 3 ) { + s = va("%i%s", rank,sRD); + } else { + s = va("%i%s", rank,sTH); + } + + Com_sprintf( str, sizeof( str ), "%s%s", t, s ); + return str; +} + +qboolean CG_ThereIsAMaster(void); + +/* +============= +CG_Obituary +============= +*/ +static void CG_Obituary( entityState_t *ent ) { + int mod; + int target, attacker; + char *message; + const char *targetInfo; + const char *attackerInfo; + char targetName[32]; + char attackerName[32]; + gender_t gender; + clientInfo_t *ci; + + target = ent->otherEntityNum; + attacker = ent->otherEntityNum2; + mod = ent->eventParm; + + if ( target < 0 || target >= MAX_CLIENTS ) { + CG_Error( "CG_Obituary: target out of range" ); + } + ci = &cgs.clientinfo[target]; + + if ( attacker < 0 || attacker >= MAX_CLIENTS ) { + attacker = ENTITYNUM_WORLD; + attackerInfo = NULL; + } else { + attackerInfo = CG_ConfigString( CS_PLAYERS + attacker ); + } + + targetInfo = CG_ConfigString( CS_PLAYERS + target ); + if ( !targetInfo ) { + return; + } + Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2); + strcat( targetName, S_COLOR_WHITE ); + + // check for single client messages + + switch( mod ) { + case MOD_SUICIDE: + case MOD_FALLING: + case MOD_CRUSH: + case MOD_WATER: + case MOD_SLIME: + case MOD_LAVA: + case MOD_TARGET_LASER: + case MOD_TRIGGER_HURT: + message = "DIED_GENERIC"; + break; + default: + message = NULL; + break; + } + + // Attacker killed themselves. Ridicule them for it. + if (attacker == target) { + gender = ci->gender; + switch (mod) { + case MOD_BRYAR_PISTOL: + case MOD_BRYAR_PISTOL_ALT: + case MOD_BLASTER: + case MOD_DISRUPTOR: + case MOD_DISRUPTOR_SPLASH: + case MOD_DISRUPTOR_SNIPER: + case MOD_BOWCASTER: + case MOD_REPEATER: + case MOD_REPEATER_ALT: + case MOD_FLECHETTE: + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_SHOT_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_SHOT_GENDERLESS"; + else + message = "SUICIDE_SHOT_MALE"; + break; + case MOD_REPEATER_ALT_SPLASH: + case MOD_FLECHETTE_ALT_SPLASH: + case MOD_ROCKET: + case MOD_ROCKET_SPLASH: + case MOD_ROCKET_HOMING: + case MOD_ROCKET_HOMING_SPLASH: + case MOD_THERMAL: + case MOD_THERMAL_SPLASH: + case MOD_TRIP_MINE_SPLASH: + case MOD_TIMED_MINE_SPLASH: + case MOD_DET_PACK_SPLASH: + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_EXPLOSIVES_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_EXPLOSIVES_GENDERLESS"; + else + message = "SUICIDE_EXPLOSIVES_MALE"; + break; + case MOD_DEMP2: + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_ELECTROCUTED_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_ELECTROCUTED_GENDERLESS"; + else + message = "SUICIDE_ELECTROCUTED_MALE"; + break; + case MOD_FALLING: + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_FALLDEATH_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_FALLDEATH_GENDERLESS"; + else + message = "SUICIDE_FALLDEATH_MALE"; + break; + default: + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_GENERICDEATH_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_GENERICDEATH_GENDERLESS"; + else + message = "SUICIDE_GENERICDEATH_MALE"; + break; + } + } + + if (target != attacker && target < MAX_CLIENTS && attacker < MAX_CLIENTS) + { + goto clientkilled; + } + + if (message) { + gender = ci->gender; + + if (!message[0]) + { + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_GENERICDEATH_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_GENERICDEATH_GENDERLESS"; + else + message = "SUICIDE_GENERICDEATH_MALE"; + } + message = (char *)CG_GetStripEdString("INGAMETEXT", message); + + CG_Printf( "%s %s\n", targetName, message); + return; + } + +clientkilled: + + // check for kill messages from the current clientNum + if ( attacker == cg.snap->ps.clientNum ) { + char *s; + + if ( cgs.gametype < GT_TEAM && cgs.gametype != GT_TOURNAMENT ) { + if (cgs.gametype == GT_JEDIMASTER && + attacker < MAX_CLIENTS && + !ent->isJediMaster && + !cg.snap->ps.isJediMaster && + CG_ThereIsAMaster()) + { + char part1[512]; + char part2[512]; + trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", part1, sizeof(part1)); + trap_SP_GetStringTextString("INGAMETEXT_JMKILLED_NOTJM", part2, sizeof(part2)); + s = va("%s %s\n%s\n", part1, targetName, part2); + } + else if (cgs.gametype == GT_JEDIMASTER && + attacker < MAX_CLIENTS && + !ent->isJediMaster && + !cg.snap->ps.isJediMaster) + { //no JM, saber must be out + char part1[512]; + trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", part1, sizeof(part1)); + /* + kmsg1 = "for 0 points.\nGo for the saber!"; + strcpy(part2, kmsg1); + + s = va("%s %s %s\n", part1, targetName, part2); + */ + s = va("%s %s\n", part1, targetName); + } + else + { + char sPlaceWith[256]; + char sKilledStr[256]; + trap_SP_GetStringTextString("INGAMETEXT_PLACE_WITH", sPlaceWith, sizeof(sPlaceWith)); + trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", sKilledStr, sizeof(sKilledStr)); + + s = va("%s %s.\n%s %s %i.", sKilledStr, targetName, + CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), + sPlaceWith, + cg.snap->ps.persistant[PERS_SCORE] ); + } + } else { + char sKilledStr[256]; + trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", sKilledStr, sizeof(sKilledStr)); + s = va("%s %s", sKilledStr, targetName ); + } + if (!(cg_singlePlayerActive.integer && cg_cameraOrbit.integer)) { + CG_CenterPrint( s, SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH ); + } + // print the text message as well + } + + // check for double client messages + if ( !attackerInfo ) { + attacker = ENTITYNUM_WORLD; + strcpy( attackerName, "noname" ); + } else { + Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof(attackerName) - 2); + strcat( attackerName, S_COLOR_WHITE ); + // check for kill messages about the current clientNum + if ( target == cg.snap->ps.clientNum ) { + Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) ); + } + } + + if ( attacker != ENTITYNUM_WORLD ) { + switch (mod) { + case MOD_STUN_BATON: + message = "KILLED_STUN"; + break; + case MOD_MELEE: + message = "KILLED_MELEE"; + break; + case MOD_SABER: + message = "KILLED_SABER"; + break; + case MOD_BRYAR_PISTOL: + case MOD_BRYAR_PISTOL_ALT: + message = "KILLED_BRYAR"; + break; + case MOD_BLASTER: + message = "KILLED_BLASTER"; + break; + case MOD_DISRUPTOR: + case MOD_DISRUPTOR_SPLASH: + message = "KILLED_DISRUPTOR"; + break; + case MOD_DISRUPTOR_SNIPER: + message = "KILLED_DISRUPTORSNIPE"; + break; + case MOD_BOWCASTER: + message = "KILLED_BOWCASTER"; + break; + case MOD_REPEATER: + message = "KILLED_REPEATER"; + break; + case MOD_REPEATER_ALT: + case MOD_REPEATER_ALT_SPLASH: + message = "KILLED_REPEATERALT"; + break; + case MOD_DEMP2: + case MOD_DEMP2_ALT: + message = "KILLED_DEMP2"; + break; + case MOD_FLECHETTE: + message = "KILLED_FLECHETTE"; + break; + case MOD_FLECHETTE_ALT_SPLASH: + message = "KILLED_FLECHETTE_MINE"; + break; + case MOD_ROCKET: + case MOD_ROCKET_SPLASH: + message = "KILLED_ROCKET"; + break; + case MOD_ROCKET_HOMING: + case MOD_ROCKET_HOMING_SPLASH: + message = "KILLED_ROCKET_HOMING"; + break; + case MOD_THERMAL: + case MOD_THERMAL_SPLASH: + message = "KILLED_THERMAL"; + break; + case MOD_TRIP_MINE_SPLASH: + message = "KILLED_TRIPMINE"; + break; + case MOD_TIMED_MINE_SPLASH: + message = "KILLED_TRIPMINE_TIMED"; + break; + case MOD_DET_PACK_SPLASH: + message = "KILLED_DETPACK"; + break; + case MOD_FORCE_DARK: + message = "KILLED_DARKFORCE"; + break; + case MOD_SENTRY: + message = "KILLED_SENTRY"; + break; + case MOD_TELEFRAG: + message = "KILLED_TELEFRAG"; + break; + case MOD_CRUSH: + message = "KILLED_GENERIC";//"KILLED_FORCETOSS"; + break; + case MOD_FALLING: + message = "KILLED_FORCETOSS"; + break; + case MOD_TRIGGER_HURT: + message = "KILLED_GENERIC";//"KILLED_FORCETOSS"; + break; + default: + message = "KILLED_GENERIC"; + break; + } + + if (message) { + message = (char *)CG_GetStripEdString("INGAMETEXT", message); + + CG_Printf( "%s %s %s\n", + targetName, message, attackerName); + return; + } + } + + // we don't know what it was + CG_Printf( "%s %s\n", targetName, (char *)CG_GetStripEdString("INGAMETEXT", "DIED_GENERIC") ); +} + +//========================================================================== + +void CG_ToggleBinoculars(centity_t *cent, int forceZoom) +{ + if (cent->currentState.number != cg.snap->ps.clientNum) + { + return; + } + + if (cg.snap->ps.weaponstate != WEAPON_READY) + { //So we can't fool it and reactivate while switching to the saber or something. + return; + } + + if (cg.snap->ps.weapon == WP_SABER) + { //No. + return; + } + + if (forceZoom) + { + if (forceZoom == 2) + { + cg.snap->ps.zoomMode = 0; + } + else if (forceZoom == 1) + { + cg.snap->ps.zoomMode = 2; + } + } + + if (cg.snap->ps.zoomMode == 0) + { + trap_S_StartSound( NULL, cg.snap->ps.clientNum, CHAN_AUTO, cgs.media.zoomStart ); + } + else if (cg.snap->ps.zoomMode == 2) + { + trap_S_StartSound( NULL, cg.snap->ps.clientNum, CHAN_AUTO, cgs.media.zoomEnd ); + } +} + +/* +=============== +CG_UseItem +=============== +*/ +static void CG_UseItem( centity_t *cent ) { + clientInfo_t *ci; + int itemNum, clientNum; + gitem_t *item; + entityState_t *es; + + es = ¢->currentState; + + itemNum = (es->event & ~EV_EVENT_BITS) - EV_USE_ITEM0; + if ( itemNum < 0 || itemNum > HI_NUM_HOLDABLE ) { + itemNum = 0; + } + + // print a message if the local player + if ( es->number == cg.snap->ps.clientNum ) { + if ( !itemNum ) { + //CG_CenterPrint( "No item to use", SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH ); + } else { + item = BG_FindItemForHoldable( itemNum ); + } + } + + switch ( itemNum ) { + default: + case HI_NONE: + //trap_S_StartSound (NULL, es->number, CHAN_BODY, cgs.media.useNothingSound ); + break; + + case HI_BINOCULARS: + CG_ToggleBinoculars(cent, es->eventParm); + break; + + case HI_SEEKER: + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.deploySeeker ); + break; + + case HI_SHIELD: + case HI_DATAPAD: + case HI_SENTRY_GUN: + break; + +// case HI_MEDKIT: + case HI_MEDPAC: + clientNum = cent->currentState.clientNum; + if ( clientNum >= 0 && clientNum < MAX_CLIENTS ) { + ci = &cgs.clientinfo[ clientNum ]; + ci->medkitUsageTime = cg.time; + } + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.medkitSound ); + break; + } + + if (cg.snap && cg.snap->ps.clientNum == cent->currentState.number && itemNum != HI_BINOCULARS) + { //if not using binoculars, we just used that item up, so switch + BG_CycleInven(&cg.snap->ps, 1); + cg.itemSelect = -1; //update the client-side selection display + } +} + + +/* +================ +CG_ItemPickup + +A new item was picked up this frame +================ +*/ +static void CG_ItemPickup( int itemNum ) { + cg.itemPickup = itemNum; + cg.itemPickupTime = cg.time; + cg.itemPickupBlendTime = cg.time; + // see if it should be the grabbed weapon + if ( cg.snap && bg_itemlist[itemNum].giType == IT_WEAPON ) { + + // 0 == no switching + // 1 == automatically switch to best SAFE weapon + // 2 == automatically switch to best weapon, safe or otherwise + // 3 == if not saber, automatically switch to best weapon, safe or otherwise + + if (0 == cg_autoswitch.integer) + { + // don't switch + } + else if ( cg_autoswitch.integer == 1) + { //only autoselect if not explosive ("safe") + if (bg_itemlist[itemNum].giTag != WP_TRIP_MINE && + bg_itemlist[itemNum].giTag != WP_DET_PACK && + bg_itemlist[itemNum].giTag != WP_THERMAL && + bg_itemlist[itemNum].giTag != WP_ROCKET_LAUNCHER && + bg_itemlist[itemNum].giTag > cg.snap->ps.weapon && + cg.snap->ps.weapon != WP_SABER) + { + if (!cg.snap->ps.emplacedIndex) + { + cg.weaponSelectTime = cg.time; + } + cg.weaponSelect = bg_itemlist[itemNum].giTag; + } + } + else if ( cg_autoswitch.integer == 2) + { //autoselect if better + if (bg_itemlist[itemNum].giTag > cg.snap->ps.weapon && + cg.snap->ps.weapon != WP_SABER) + { + if (!cg.snap->ps.emplacedIndex) + { + cg.weaponSelectTime = cg.time; + } + cg.weaponSelect = bg_itemlist[itemNum].giTag; + } + } + /* + else if ( cg_autoswitch.integer == 3) + { //autoselect if better and not using the saber as a weapon + if (bg_itemlist[itemNum].giTag > cg.snap->ps.weapon && + cg.snap->ps.weapon != WP_SABER) + { + if (!cg.snap->ps.emplacedIndex) + { + cg.weaponSelectTime = cg.time; + } + cg.weaponSelect = bg_itemlist[itemNum].giTag; + } + } + */ + //No longer required - just not switching ever if using saber + } + + //rww - print pickup messages + if (bg_itemlist[itemNum].classname && bg_itemlist[itemNum].classname[0] && + (bg_itemlist[itemNum].giType != IT_TEAM || (bg_itemlist[itemNum].giTag != PW_REDFLAG && bg_itemlist[itemNum].giTag != PW_BLUEFLAG)) ) + { //don't print messages for flags, they have their own pickup event broadcasts + char text[1024]; + + if ( trap_SP_GetStringTextString( va("INGAME_%s",bg_itemlist[itemNum].classname), text, sizeof( text ))) + { + Com_Printf("%s %s\n", CG_GetStripEdString("INGAMETEXT", "PICKUPLINE"), text); + } + else + { + Com_Printf("%s %s\n", CG_GetStripEdString("INGAMETEXT", "PICKUPLINE"), bg_itemlist[itemNum].classname); + } + } +} + + +/* +================ +CG_PainEvent + +Also called by playerstate transition +================ +*/ +void CG_PainEvent( centity_t *cent, int health ) { + char *snd; + + // don't do more than two pain sounds a second + if ( cg.time - cent->pe.painTime < 500 ) { + return; + } + + if ( health < 25 ) { + snd = "*pain25.wav"; + } else if ( health < 50 ) { + snd = "*pain50.wav"; + } else if ( health < 75 ) { + snd = "*pain75.wav"; + } else { + snd = "*pain100.wav"; + } + trap_S_StartSound( NULL, cent->currentState.number, CHAN_VOICE, + CG_CustomSound( cent->currentState.number, snd ) ); + + // save pain time for programitic twitch animation + cent->pe.painTime = cg.time; + cent->pe.painDirection ^= 1; +} + +void CG_ReattachLimb(centity_t *source) +{ + char *limbName; + char *stubCapName; + + switch (source->torsoBolt) + { + case G2_MODELPART_HEAD: + limbName = "head"; + stubCapName = "torso_cap_head_off"; + break; + case G2_MODELPART_WAIST: + limbName = "torso"; + stubCapName = "hips_cap_torso_off"; + break; + case G2_MODELPART_LARM: + limbName = "l_arm"; + stubCapName = "torso_cap_l_arm_off"; + break; + case G2_MODELPART_RARM: + limbName = "r_arm"; + stubCapName = "torso_cap_r_arm_off"; + break; + case G2_MODELPART_RHAND: + limbName = "r_hand"; + stubCapName = "r_arm_cap_r_hand_off"; + break; + case G2_MODELPART_LLEG: + limbName = "l_leg"; + stubCapName = "hips_cap_l_leg_off"; + break; + case G2_MODELPART_RLEG: + limbName = "r_leg"; + stubCapName = "hips_cap_r_leg_off"; + break; + default: + source->torsoBolt = 0; + source->ghoul2weapon = NULL; + return; + } + + trap_G2API_SetSurfaceOnOff(source->ghoul2, limbName, 0); + trap_G2API_SetSurfaceOnOff(source->ghoul2, stubCapName, 0x00000100); + + source->torsoBolt = 0; + + source->ghoul2weapon = NULL; +} + +static void CG_BodyQueueCopy(centity_t *cent, int clientNum, int knownWeapon) +{ + centity_t *source; + animation_t *anim; + float animSpeed; + int flags=BONE_ANIM_OVERRIDE_FREEZE; + clientInfo_t *ci; + + if (cent->ghoul2) + { + trap_G2API_CleanGhoul2Models(¢->ghoul2); + } + + if (clientNum < 0 || clientNum >= MAX_CLIENTS) + { + return; + } + + source = &cg_entities[ clientNum ]; + ci = &cgs.clientinfo[ clientNum ]; + + if (!source) + { + return; + } + + if (!source->ghoul2) + { + return; + } + + cent->isATST = source->isATST; + + cent->dustTrailTime = source->dustTrailTime; + + trap_G2API_DuplicateGhoul2Instance(source->ghoul2, ¢->ghoul2); + + //either force the weapon from when we died or remove it if it was a dropped weapon + if (knownWeapon > WP_BRYAR_PISTOL && trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { + trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); + } + else if (trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { + trap_G2API_CopySpecificGhoul2Model(g2WeaponInstances[knownWeapon], 0, cent->ghoul2, 1); + } + + anim = &bgGlobalAnimations[ cent->currentState.torsoAnim ]; + animSpeed = 50.0f / anim->frameLerp; + + //this will just set us to the last frame of the animation, in theory + if (source->isATST) + { + int aNum = cgs.clientinfo[source->currentState.number].frame+1; + anim = &bgGlobalAnimations[ BOTH_DEAD1 ]; + animSpeed = 1; + + flags &= ~BONE_ANIM_OVERRIDE_LOOP; + + while (aNum >= anim->firstFrame+anim->numFrames) + { + aNum--; + } + + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "pelvis", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + } + else + { + int aNum = cgs.clientinfo[source->currentState.number].frame+1; + + while (aNum >= anim->firstFrame+anim->numFrames) + { + aNum--; + } + + if (aNum < anim->firstFrame-1) + { //wrong animation...? + aNum = (anim->firstFrame+anim->numFrames)-1; + } + + //if (!cgs.clientinfo[source->currentState.number].frame || (cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) != (source->currentState.torsoAnim&~ANIM_TOGGLEBIT) ) + //{ + // aNum = (anim->firstFrame+anim->numFrames)-1; + //} + + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + } + + //After we create the bodyqueue, regenerate any limbs on the real instance + if (source->torsoBolt) + { + CG_ReattachLimb(source); + } +} + +const char *CG_TeamName(int team) +{ + if (team==TEAM_RED) + return "RED"; + else if (team==TEAM_BLUE) + return "BLUE"; + else if (team==TEAM_SPECTATOR) + return "SPECTATOR"; + return "FREE"; +} + +void CG_PrintCTFMessage(clientInfo_t *ci, const char *teamName, int ctfMessage) +{ + char printMsg[1024]; + char *refName = NULL; + const char *stripEdString = NULL; + + switch (ctfMessage) + { + case CTFMESSAGE_FRAGGED_FLAG_CARRIER: + refName = "FRAGGED_FLAG_CARRIER"; + break; + case CTFMESSAGE_FLAG_RETURNED: + refName = "FLAG_RETURNED"; + break; + case CTFMESSAGE_PLAYER_RETURNED_FLAG: + refName = "PLAYER_RETURNED_FLAG"; + break; + case CTFMESSAGE_PLAYER_CAPTURED_FLAG: + refName = "PLAYER_CAPTURED_FLAG"; + break; + case CTFMESSAGE_PLAYER_GOT_FLAG: + refName = "PLAYER_GOT_FLAG"; + break; + default: + return; + } + + stripEdString = CG_GetStripEdString("INGAMETEXT", refName); + + if (!stripEdString || !stripEdString[0]) + { + return; + } + + if (teamName && teamName[0]) + { + const char *f = strstr(stripEdString, "%s"); + + if (f) + { + int strLen = 0; + int i = 0; + + if (ci) + { + Com_sprintf(printMsg, sizeof(printMsg), "%s ", ci->name); + strLen = strlen(printMsg); + } + + while (stripEdString[i] && i < 512) + { + if (stripEdString[i] == '%' && + stripEdString[i+1] == 's') + { + printMsg[strLen] = '\0'; + Q_strcat(printMsg, sizeof(printMsg), teamName); + strLen = strlen(printMsg); + + i++; + } + else + { + printMsg[strLen] = stripEdString[i]; + strLen++; + } + + i++; + } + + printMsg[strLen] = '\0'; + + goto doPrint; + } + } + + if (ci) + { + Com_sprintf(printMsg, sizeof(printMsg), "%s %s", ci->name, stripEdString); + } + else + { + Com_sprintf(printMsg, sizeof(printMsg), "%s", stripEdString); + } + +doPrint: + Com_Printf("%s\n", printMsg); +} + +void CG_GetCTFMessageEvent(entityState_t *es) +{ + int clIndex = es->trickedentindex; + int teamIndex = es->trickedentindex2; + clientInfo_t *ci = NULL; + const char *teamName = NULL; + + if (clIndex < MAX_CLIENTS) + { + ci = &cgs.clientinfo[clIndex]; + } + + if (teamIndex < 50) + { + teamName = CG_TeamName(teamIndex); + } + + CG_PrintCTFMessage(ci, teamName, es->eventParm); +} + +void DoFall(centity_t *cent, entityState_t *es, int clientNum) +{ + int delta = es->eventParm; + + if (cent->currentState.eFlags & EF_DEAD) + { //corpses crack into the ground ^_^ + if (delta > 25) + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.fallSound ); + } + else + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( "sound/movers/objects/objectHit.wav" ) ); + } + } + else if (delta > 50) + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.fallSound ); + trap_S_StartSound( NULL, cent->currentState.number, CHAN_VOICE, + CG_CustomSound( cent->currentState.number, "*land1.wav" ) ); + cent->pe.painTime = cg.time; // don't play a pain sound right after this + } + else if (delta > 44) + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.fallSound ); + trap_S_StartSound( NULL, cent->currentState.number, CHAN_VOICE, + CG_CustomSound( cent->currentState.number, "*land1.wav" ) ); + cent->pe.painTime = cg.time; // don't play a pain sound right after this + } + else + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.landSound ); + } + + if ( clientNum == cg.predictedPlayerState.clientNum ) + { + // smooth landing z changes + cg.landChange = -delta; + if (cg.landChange > 32) + { + cg.landChange = 32; + } + if (cg.landChange < -32) + { + cg.landChange = -32; + } + cg.landTime = cg.time; + } +} + +int CG_InClientBitflags(entityState_t *ent, int client) +{ + int checkIn; + int sub = 0; + + if (client > 47) + { + checkIn = ent->trickedentindex4; + sub = 48; + } + else if (client > 31) + { + checkIn = ent->trickedentindex3; + sub = 32; + } + else if (client > 15) + { + checkIn = ent->trickedentindex2; + sub = 16; + } + else + { + checkIn = ent->trickedentindex; + } + + if (checkIn & (1 << (client-sub))) + { + return 1; + } + + return 0; +} + +/* +============== +CG_EntityEvent + +An entity has an event value +also called by CG_CheckPlayerstateEvents +============== +*/ +#define DEBUGNAME(x) if(cg_debugEvents.integer){CG_Printf(x"\n");} +void CG_EntityEvent( centity_t *cent, vec3_t position ) { + entityState_t *es; + int event; + vec3_t dir; + const char *s; + int clientNum; + clientInfo_t *ci; + int eID = 0; + int isnd = 0; + centity_t *cl_ent; + + es = ¢->currentState; + event = es->event & ~EV_EVENT_BITS; + + if ( cg_debugEvents.integer ) { + CG_Printf( "ent:%3i event:%3i ", es->number, event ); + } + + if ( !event ) { + DEBUGNAME("ZEROEVENT"); + return; + } + + clientNum = es->clientNum; + if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { + clientNum = 0; + } + ci = &cgs.clientinfo[ clientNum ]; + + switch ( event ) { + // + // movement generated events + // + case EV_CLIENTJOIN: + DEBUGNAME("EV_CLIENTJOIN"); + + //Slight hack to force a local reinit of client entity on join. + cl_ent = &cg_entities[es->eventParm]; + + if (cl_ent) + { + cl_ent->isATST = 0; + cl_ent->atstFootClang = 0; + cl_ent->atstSwinging = 0; +// cl_ent->torsoBolt = 0; + cl_ent->bolt1 = 0; + cl_ent->bolt2 = 0; + cl_ent->bolt3 = 0; + cl_ent->bolt4 = 0; + cl_ent->saberLength = SABER_LENGTH_MAX; + cl_ent->saberExtendTime = 0; + cl_ent->boltInfo = 0; + cl_ent->frame_minus1_refreshed = 0; + cl_ent->frame_minus2_refreshed = 0; + cl_ent->frame_hold_time = 0; + cl_ent->frame_hold_refreshed = 0; + cl_ent->trickAlpha = 0; + cl_ent->trickAlphaTime = 0; + cl_ent->ghoul2weapon = NULL; + cl_ent->weapon = WP_NONE; + cl_ent->teamPowerEffectTime = 0; + cl_ent->teamPowerType = 0; + } + break; + + case EV_FOOTSTEP: + DEBUGNAME("EV_FOOTSTEP"); + if (cg_footsteps.integer) { + trap_S_StartSound (NULL, es->number, CHAN_BODY, + cgs.media.footsteps[ ci->footsteps ][rand()&3] ); + } + break; + case EV_FOOTSTEP_METAL: + DEBUGNAME("EV_FOOTSTEP_METAL"); + if (cg_footsteps.integer) { + trap_S_StartSound (NULL, es->number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_METAL ][rand()&3] ); + } + break; + case EV_FOOTSPLASH: + DEBUGNAME("EV_FOOTSPLASH"); + if (cg_footsteps.integer) { + trap_S_StartSound (NULL, es->number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] ); + } + break; + case EV_FOOTWADE: + DEBUGNAME("EV_FOOTWADE"); + if (cg_footsteps.integer) { + trap_S_StartSound (NULL, es->number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] ); + } + break; + case EV_SWIM: + DEBUGNAME("EV_SWIM"); + if (cg_footsteps.integer) { + trap_S_StartSound (NULL, es->number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] ); + } + break; + + + case EV_FALL: + DEBUGNAME("EV_FALL"); + if (es->number == cg.snap->ps.clientNum && cg.snap->ps.fallingToDeath) + { + break; + } + DoFall(cent, es, clientNum); + break; + case EV_STEP_4: + case EV_STEP_8: + case EV_STEP_12: + case EV_STEP_16: // smooth out step up transitions + DEBUGNAME("EV_STEP"); + { + float oldStep; + int delta; + int step; + + if ( clientNum != cg.predictedPlayerState.clientNum ) { + break; + } + // if we are interpolating, we don't need to smooth steps + if ( cg.demoPlayback || (cg.snap->ps.pm_flags & PMF_FOLLOW) || + cg_nopredict.integer || cg_synchronousClients.integer ) { + break; + } + // check for stepping up before a previous step is completed + delta = cg.time - cg.stepTime; + if (delta < STEP_TIME) { + oldStep = cg.stepChange * (STEP_TIME - delta) / STEP_TIME; + } else { + oldStep = 0; + } + + // add this amount + step = 4 * (event - EV_STEP_4 + 1 ); + cg.stepChange = oldStep + step; + if ( cg.stepChange > MAX_STEP_CHANGE ) { + cg.stepChange = MAX_STEP_CHANGE; + } + cg.stepTime = cg.time; + break; + } + + case EV_JUMP_PAD: + DEBUGNAME("EV_JUMP_PAD"); + break; + + case EV_PRIVATE_DUEL: + DEBUGNAME("EV_PRIVATE_DUEL"); + + if (cg.snap->ps.clientNum != es->number) + { + break; + } + + if (es->eventParm) + { //starting the duel + if (es->eventParm == 2) + { + CG_CenterPrint( CG_GetStripEdString("SVINGAME", "BEGIN_DUEL"), 120, GIANTCHAR_WIDTH*2 ); + trap_S_StartLocalSound( cgs.media.countFightSound, CHAN_ANNOUNCER ); + } + else + { + trap_S_StartBackgroundTrack( "music/mp/duel.mp3", "music/mp/duel.mp3", qfalse ); + } + } + else + { //ending the duel + CG_StartMusic(qtrue); + } + break; + + case EV_JUMP: + DEBUGNAME("EV_JUMP"); + trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*jump1.wav" ) ); + break; + case EV_ROLL: + DEBUGNAME("EV_ROLL"); + if (es->number == cg.snap->ps.clientNum && cg.snap->ps.fallingToDeath) + { + break; + } + if (es->eventParm) + { //fall-roll-in-one event + DoFall(cent, es, clientNum); + } + + trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*jump1.wav" ) ); + trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.rollSound ); + + //FIXME: need some sort of body impact on ground sound and maybe kick up some dust? + break; + + case EV_TAUNT: + DEBUGNAME("EV_TAUNT"); + trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*taunt.wav" ) ); + break; + case EV_TAUNT_YES: + DEBUGNAME("EV_TAUNT_YES"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_YES); + break; + case EV_TAUNT_NO: + DEBUGNAME("EV_TAUNT_NO"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_NO); + break; + case EV_TAUNT_FOLLOWME: + DEBUGNAME("EV_TAUNT_FOLLOWME"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_FOLLOWME); + break; + case EV_TAUNT_GETFLAG: + DEBUGNAME("EV_TAUNT_GETFLAG"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONGETFLAG); + break; + case EV_TAUNT_GUARDBASE: + DEBUGNAME("EV_TAUNT_GUARDBASE"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONDEFENSE); + break; + case EV_TAUNT_PATROL: + DEBUGNAME("EV_TAUNT_PATROL"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONPATROL); + break; + case EV_WATER_TOUCH: + DEBUGNAME("EV_WATER_TOUCH"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrInSound ); + break; + case EV_WATER_LEAVE: + DEBUGNAME("EV_WATER_LEAVE"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrOutSound ); + break; + case EV_WATER_UNDER: + DEBUGNAME("EV_WATER_UNDER"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrUnSound ); + break; + case EV_WATER_CLEAR: + DEBUGNAME("EV_WATER_CLEAR"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, CG_CustomSound( es->number, "*gasp.wav" ) ); + break; + + case EV_ITEM_PICKUP: + DEBUGNAME("EV_ITEM_PICKUP"); + { + gitem_t *item; + int index; + qboolean newindex = qfalse; + + index = cg_entities[es->eventParm].currentState.modelindex; // player predicted + + if (index < 1 && cg_entities[es->eventParm].currentState.isJediMaster) + { //a holocron most likely + index = cg_entities[es->eventParm].currentState.trickedentindex4; + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.holocronPickup ); + + if (es->number == cg.snap->ps.clientNum && showPowersName[index]) + { + const char *strText = CG_GetStripEdString("INGAMETEXT", "PICKUPLINE"); + + //Com_Printf("%s %s\n", strText, showPowersName[index]); + CG_CenterPrint( va("%s %s\n", strText, CG_GetStripEdString("INGAME",showPowersName[index])), SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH ); + } + + //Show the player their force selection bar in case picking the holocron up changed the current selection + if (index != FP_SABERATTACK && index != FP_SABERDEFEND && index != FP_SABERTHROW && + index != FP_LEVITATION && + es->number == cg.snap->ps.clientNum && + (index == cg.snap->ps.fd.forcePowerSelected || !(cg.snap->ps.fd.forcePowersActive & (1 << cg.snap->ps.fd.forcePowerSelected)))) + { + if (cg.forceSelect != index) + { + cg.forceSelect = index; + newindex = qtrue; + } + } + + if (es->number == cg.snap->ps.clientNum && newindex) + { + if (cg.forceSelectTime < cg.time) + { + cg.forceSelectTime = cg.time; + } + } + + break; + } + + if (cg_entities[es->eventParm].weapon >= cg.time) + { //rww - an unfortunately necessary hack to prevent double item pickups + break; + } + + //Hopefully even if this entity is somehow removed and replaced with, say, another + //item, this time will have expired by the time that item needs to be picked up. + //Of course, it's quite possible this will fail miserably, so if you've got a better + //solution then please do use it. + cg_entities[es->eventParm].weapon = cg.time+500; + + if ( index < 1 || index >= bg_numItems ) { + break; + } + item = &bg_itemlist[ index ]; + + if ( /*item->giType != IT_POWERUP && */item->giType != IT_TEAM) { + if (item->pickup_sound && item->pickup_sound[0]) + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound ) ); + } + } + + // show icon and name on status bar + if ( es->number == cg.snap->ps.clientNum ) { + CG_ItemPickup( index ); + } + } + break; + + case EV_GLOBAL_ITEM_PICKUP: + DEBUGNAME("EV_GLOBAL_ITEM_PICKUP"); + { + gitem_t *item; + int index; + + index = es->eventParm; // player predicted + + if ( index < 1 || index >= bg_numItems ) { + break; + } + item = &bg_itemlist[ index ]; + // powerup pickups are global + if( item->pickup_sound && item->pickup_sound[0] ) { + trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound) ); + } + + // show icon and name on status bar + if ( es->number == cg.snap->ps.clientNum ) { + CG_ItemPickup( index ); + } + } + break; + + // + // weapon events + // + case EV_NOAMMO: + DEBUGNAME("EV_NOAMMO"); +// trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.noAmmoSound ); + if ( es->number == cg.snap->ps.clientNum ) + { + int weap = 0; + + if (es->eventParm && es->eventParm < WP_NUM_WEAPONS) + { + cg.snap->ps.stats[STAT_WEAPONS] &= ~(1 << es->eventParm); + weap = cg.snap->ps.weapon; + } + else if (es->eventParm) + { + weap = (es->eventParm-WP_NUM_WEAPONS); + } + CG_OutOfAmmoChange(weap); + } + break; + case EV_CHANGE_WEAPON: + DEBUGNAME("EV_CHANGE_WEAPON"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.selectSound ); + break; + case EV_FIRE_WEAPON: + DEBUGNAME("EV_FIRE_WEAPON"); + if (cent->currentState.number >= MAX_CLIENTS && cent->currentState.eType != ET_GRAPPLE) + { //special case for turret firing + vec3_t gunpoint, gunangle; + mdxaBone_t matrix; + + weaponInfo_t *weaponInfo = &cg_weapons[WP_TURRET]; + + if ( !weaponInfo->registered ) + { + memset( weaponInfo, 0, sizeof( *weaponInfo ) ); + + weaponInfo->flashSound[0] = NULL_SOUND; + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = NULL_HANDLE; + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_TurretProjectileThink; + + trap_FX_RegisterEffect("effects/blaster/wall_impact.efx"); + trap_FX_RegisterEffect("effects/blaster/flesh_impact.efx"); + + weaponInfo->registered = qtrue; + } + + if (cent->ghoul2) + { + if (!cent->bolt1) + { + cent->bolt1 = trap_G2API_AddBolt(cent->ghoul2, 0, "*flash01"); + } + if (!cent->bolt2) + { + cent->bolt2 = trap_G2API_AddBolt(cent->ghoul2, 0, "*flash02"); + } + } + else + { + break; + } + + if (cent->currentState.eventParm) + { + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cent->bolt2, &matrix, cent->currentState.angles, cent->currentState.origin, cg.time, cgs.gameModels, cent->modelScale); + } + else + { + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cent->bolt1, &matrix, cent->currentState.angles, cent->currentState.origin, cg.time, cgs.gameModels, cent->modelScale); + } + + gunpoint[0] = matrix.matrix[0][3]; + gunpoint[1] = matrix.matrix[1][3]; + gunpoint[2] = matrix.matrix[2][3]; + + gunangle[0] = -matrix.matrix[0][0]; + gunangle[1] = -matrix.matrix[1][0]; + gunangle[2] = -matrix.matrix[2][0]; + + trap_FX_PlayEffectID(trap_FX_RegisterEffect( "effects/turret/muzzle_flash.efx" ), gunpoint, gunangle); + } + else + { + CG_FireWeapon( cent, qfalse ); + } + break; + + case EV_ALT_FIRE: + DEBUGNAME("EV_ALT_FIRE"); + CG_FireWeapon( cent, qtrue ); + + //if you just exploded your detpacks and you have no ammo left for them, autoswitch + if ( cg.snap->ps.clientNum == cent->currentState.number && + cg.snap->ps.weapon == WP_DET_PACK ) + { + if (cg.snap->ps.ammo[weaponData[WP_DET_PACK].ammoIndex] == 0) + { + CG_OutOfAmmoChange(WP_DET_PACK); + } + } + + break; + + case EV_SABER_ATTACK: + DEBUGNAME("EV_SABER_ATTACK"); + trap_S_StartSound(es->pos.trBase, es->number, CHAN_WEAPON, trap_S_RegisterSound(va("sound/weapons/saber/saberhup%i.wav", Q_irand(1, 8)))); + break; + + case EV_SABER_HIT: + DEBUGNAME("EV_SABER_HIT"); + if (es->eventParm == 16) + { //Make lots of sparks, something special happened + vec3_t fxDir; + VectorCopy(es->angles, fxDir); + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/saber/saberhit.wav")); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + } + else if (es->eventParm) + { //hit a person + vec3_t fxDir; + VectorCopy(es->angles, fxDir); + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/saber/saberhit.wav")); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + } + else + { //hit something else + vec3_t fxDir; + VectorCopy(es->angles, fxDir); + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/saber/saberhit.wav")); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), es->origin, fxDir ); + } + break; + + case EV_SABER_BLOCK: + DEBUGNAME("EV_SABER_BLOCK"); + + if (es->eventParm) + { //saber block + vec3_t fxDir; + VectorCopy(es->angles, fxDir); + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound(va( "sound/weapons/saber/saberblock%d.wav", Q_irand(1, 9) ))); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/saber_block.efx"), es->origin, fxDir ); + + g_saberFlashTime = cg.time-50; + VectorCopy( es->origin, g_saberFlashPos ); + } + else + { //projectile block + vec3_t fxDir; + VectorCopy(es->angles, fxDir); + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/deflect.efx"), es->origin, fxDir); + } + break; + + case EV_SABER_UNHOLSTER: + DEBUGNAME("EV_SABER_UNHOLSTER"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" ) ); + break; + + case EV_BECOME_JEDIMASTER: + DEBUGNAME("EV_SABER_UNHOLSTER"); + { + trace_t tr; + vec3_t playerMins = {-15, -15, DEFAULT_MINS_2+8}; + vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; + vec3_t ang, pos, dpos; + + VectorClear(ang); + ang[ROLL] = 1; + + VectorCopy(position, dpos); + dpos[2] -= 4096; + + CG_Trace(&tr, position, playerMins, playerMaxs, dpos, es->number, MASK_SOLID); + VectorCopy(tr.endpos, pos); + + if (tr.fraction == 1) + { + break; + } + trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/jedispawn.efx"), pos, ang); + + trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" ) ); + + if (cg.snap->ps.clientNum == es->number) + { + trap_S_StartLocalSound(cgs.media.happyMusic, CHAN_LOCAL); + CGCam_SetMusicMult(0.3, 5000); + } + } + break; + + case EV_DISRUPTOR_MAIN_SHOT: + DEBUGNAME("EV_DISRUPTOR_MAIN_SHOT"); + if (cent->currentState.eventParm != cg.snap->ps.clientNum || + cg.renderingThirdPerson) + { //h4q3ry + CG_GetClientWeaponMuzzleBoltPoint(cent->currentState.eventParm, cent->currentState.origin2); + } + else + { + if (cg.lastFPFlashPoint[0] ||cg.lastFPFlashPoint[1] || cg.lastFPFlashPoint[2]) + { //get the position of the muzzle flash for the first person weapon model from the last frame + VectorCopy(cg.lastFPFlashPoint, cent->currentState.origin2); + } + } + FX_DisruptorMainShot( cent->currentState.origin2, cent->lerpOrigin ); + break; + + case EV_DISRUPTOR_SNIPER_SHOT: + DEBUGNAME("EV_DISRUPTOR_SNIPER_SHOT"); + if (cent->currentState.eventParm != cg.snap->ps.clientNum || + cg.renderingThirdPerson) + { //h4q3ry + CG_GetClientWeaponMuzzleBoltPoint(cent->currentState.eventParm, cent->currentState.origin2); + } + else + { + if (cg.lastFPFlashPoint[0] ||cg.lastFPFlashPoint[1] || cg.lastFPFlashPoint[2]) + { //get the position of the muzzle flash for the first person weapon model from the last frame + VectorCopy(cg.lastFPFlashPoint, cent->currentState.origin2); + } + } + FX_DisruptorAltShot( cent->currentState.origin2, cent->lerpOrigin, cent->currentState.shouldtarget ); + break; + + case EV_DISRUPTOR_SNIPER_MISS: + DEBUGNAME("EV_DISRUPTOR_SNIPER_MISS"); + ByteToDir( es->eventParm, dir ); + if (es->weapon) + { //primary + FX_DisruptorHitWall( cent->lerpOrigin, dir ); + } + else + { //secondary + FX_DisruptorAltMiss( cent->lerpOrigin, dir ); + } + break; + + case EV_DISRUPTOR_HIT: + DEBUGNAME("EV_DISRUPTOR_HIT"); + ByteToDir( es->eventParm, dir ); + if (es->weapon) + { //client + FX_DisruptorHitPlayer( cent->lerpOrigin, dir, qtrue ); + } + else + { //non-client + FX_DisruptorHitWall( cent->lerpOrigin, dir ); + } + break; + + case EV_DISRUPTOR_ZOOMSOUND: + DEBUGNAME("EV_DISRUPTOR_ZOOMSOUND"); + if (es->number == cg.snap->ps.clientNum) + { + if (cg.snap->ps.zoomMode) + { + trap_S_StartLocalSound(trap_S_RegisterSound("sound/weapons/disruptor/zoomstart.wav"), CHAN_AUTO); + } + else + { + trap_S_StartLocalSound(trap_S_RegisterSound("sound/weapons/disruptor/zoomend.wav"), CHAN_AUTO); + } + } + break; + case EV_PREDEFSOUND: + DEBUGNAME("EV_PREDEFSOUND"); + { + int sID = -1; + + switch (es->eventParm) + { + case PDSOUND_PROTECTHIT: + sID = trap_S_RegisterSound("sound/weapons/force/protecthit.mp3"); + break; + case PDSOUND_PROTECT: + sID = trap_S_RegisterSound("sound/weapons/force/protect.mp3"); + break; + case PDSOUND_ABSORBHIT: + sID = trap_S_RegisterSound("sound/weapons/force/absorbhit.mp3"); + if (es->trickedentindex >= 0 && es->trickedentindex < MAX_CLIENTS) + { + int clnum = es->trickedentindex; + + cg_entities[clnum].teamPowerEffectTime = cg.time + 1000; + cg_entities[clnum].teamPowerType = 3; + } + break; + case PDSOUND_ABSORB: + sID = trap_S_RegisterSound("sound/weapons/force/absorb.mp3"); + break; + case PDSOUND_FORCEJUMP: + sID = trap_S_RegisterSound("sound/weapons/force/jump.mp3"); + break; + case PDSOUND_FORCEGRIP: + sID = trap_S_RegisterSound("sound/weapons/force/grip.mp3"); + break; + default: + break; + } + + if (sID != 1) + { + trap_S_StartSound(es->origin, es->number, CHAN_AUTO, sID); + } + } + break; + + case EV_TEAM_POWER: + DEBUGNAME("EV_TEAM_POWER"); + { + int clnum = 0; + + while (clnum < MAX_CLIENTS) + { + if (CG_InClientBitflags(es, clnum)) + { + if (es->eventParm == 1) + { //eventParm 1 is heal + trap_S_StartSound (NULL, clnum, CHAN_AUTO, cgs.media.teamHealSound ); + cg_entities[clnum].teamPowerEffectTime = cg.time + 1000; + cg_entities[clnum].teamPowerType = 1; + } + else + { //eventParm 2 is force regen + trap_S_StartSound (NULL, clnum, CHAN_AUTO, cgs.media.teamRegenSound ); + cg_entities[clnum].teamPowerEffectTime = cg.time + 1000; + cg_entities[clnum].teamPowerType = 0; + } + } + clnum++; + } + } + break; + + case EV_SCREENSHAKE: + DEBUGNAME("EV_SCREENSHAKE"); + if (!es->modelindex || cg.predictedPlayerState.clientNum == es->modelindex-1) + { + CGCam_Shake(es->angles[0], es->time); + } + break; + case EV_USE_ITEM0: + DEBUGNAME("EV_USE_ITEM0"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM1: + DEBUGNAME("EV_USE_ITEM1"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM2: + DEBUGNAME("EV_USE_ITEM2"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM3: + DEBUGNAME("EV_USE_ITEM3"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM4: + DEBUGNAME("EV_USE_ITEM4"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM5: + DEBUGNAME("EV_USE_ITEM5"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM6: + DEBUGNAME("EV_USE_ITEM6"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM7: + DEBUGNAME("EV_USE_ITEM7"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM8: + DEBUGNAME("EV_USE_ITEM8"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM9: + DEBUGNAME("EV_USE_ITEM9"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM10: + DEBUGNAME("EV_USE_ITEM10"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM11: + DEBUGNAME("EV_USE_ITEM11"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM12: + DEBUGNAME("EV_USE_ITEM12"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM13: + DEBUGNAME("EV_USE_ITEM13"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM14: + DEBUGNAME("EV_USE_ITEM14"); + CG_UseItem( cent ); + break; + + case EV_ITEMUSEFAIL: + DEBUGNAME("EV_ITEMUSEFAIL"); + if (cg.snap->ps.clientNum == es->number) + { + char *stripedref = NULL; + + switch(es->eventParm) + { + case SENTRY_NOROOM: + stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SENTRY_NOROOM"); + break; + case SENTRY_ALREADYPLACED: + stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SENTRY_ALREADYPLACED"); + break; + case SHIELD_NOROOM: + stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SHIELD_NOROOM"); + break; + case SEEKER_ALREADYDEPLOYED: + stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SEEKER_ALREADYDEPLOYED"); + break; + default: + break; + } + + if (!stripedref) + { + break; + } + + Com_Printf("%s\n", stripedref); + } + break; + + //================================================================= + + // + // other events + // + case EV_PLAYER_TELEPORT_IN: + DEBUGNAME("EV_PLAYER_TELEPORT_IN"); + { + trace_t tr; + vec3_t playerMins = {-15, -15, DEFAULT_MINS_2+8}; + vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; + vec3_t ang, pos, dpos; + + VectorClear(ang); + ang[ROLL] = 1; + + VectorCopy(position, dpos); + dpos[2] -= 4096; + + CG_Trace(&tr, position, playerMins, playerMaxs, dpos, es->number, MASK_SOLID); + VectorCopy(tr.endpos, pos); + + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.teleInSound ); + + if (tr.fraction == 1) + { + break; + } + trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/spawn.efx"), pos, ang); + } + break; + + case EV_PLAYER_TELEPORT_OUT: + DEBUGNAME("EV_PLAYER_TELEPORT_OUT"); + { + trace_t tr; + vec3_t playerMins = {-15, -15, DEFAULT_MINS_2+8}; + vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; + vec3_t ang, pos, dpos; + + VectorClear(ang); + ang[ROLL] = 1; + + VectorCopy(position, dpos); + dpos[2] -= 4096; + + CG_Trace(&tr, position, playerMins, playerMaxs, dpos, es->number, MASK_SOLID); + VectorCopy(tr.endpos, pos); + + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.teleOutSound ); + + if (tr.fraction == 1) + { + break; + } + trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/spawn.efx"), pos, ang); + } + break; + + case EV_ITEM_POP: + DEBUGNAME("EV_ITEM_POP"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.respawnSound ); + break; + case EV_ITEM_RESPAWN: + DEBUGNAME("EV_ITEM_RESPAWN"); + cent->miscTime = cg.time; // scale up from this + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.respawnSound ); + break; + + case EV_GRENADE_BOUNCE: + DEBUGNAME("EV_GRENADE_BOUNCE"); + //Do something here? + break; + + case EV_SCOREPLUM: + DEBUGNAME("EV_SCOREPLUM"); + CG_ScorePlum( cent->currentState.otherEntityNum, cent->lerpOrigin, cent->currentState.time ); + break; + + case EV_CTFMESSAGE: + DEBUGNAME("EV_CTFMESSAGE"); + CG_GetCTFMessageEvent(es); + break; + + // + // saga gameplay events + // + case EV_SAGA_ROUNDOVER: + DEBUGNAME("EV_SAGA_ROUNDOVER"); + CG_SagaRoundOver(&cg_entities[cent->currentState.weapon], cent->currentState.eventParm); + break; + case EV_SAGA_OBJECTIVECOMPLETE: + DEBUGNAME("EV_SAGA_OBJECTIVECOMPLETE"); + CG_SagaObjectiveCompleted(&cg_entities[cent->currentState.weapon], cent->currentState.eventParm, cent->currentState.trickedentindex); + break; + + case EV_DESTROY_GHOUL2_INSTANCE: + DEBUGNAME("EV_DESTROY_GHOUL2_INSTANCE"); + if (cg_entities[es->eventParm].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[es->eventParm].ghoul2)) + { + if (es->eventParm < MAX_CLIENTS) + { //You try to do very bad thing! +#ifdef _DEBUG + Com_Printf("WARNING: Tried to kill a client ghoul2 instance with a server event!\n"); +#endif + break; + } + trap_G2API_CleanGhoul2Models(&(cg_entities[es->eventParm].ghoul2)); + } + break; + + case EV_DESTROY_WEAPON_MODEL: + DEBUGNAME("EV_DESTROY_WEAPON_MODEL"); + if (cg_entities[es->eventParm].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[es->eventParm].ghoul2) && + trap_G2API_HasGhoul2ModelOnIndex(&(cg_entities[es->eventParm].ghoul2), 1)) + { + trap_G2API_RemoveGhoul2Model(&(cg_entities[es->eventParm].ghoul2), 1); + } + break; + + case EV_GIVE_NEW_RANK: + DEBUGNAME("EV_GIVE_NEW_RANK"); + if (es->trickedentindex == cg.snap->ps.clientNum) + { + trap_Cvar_Set("ui_rankChange", va("%i", es->eventParm)); + + trap_Cvar_Set("ui_myteam", va("%i", es->bolt2)); + + if (!( trap_Key_GetCatcher() & KEYCATCH_UI ) && !es->bolt1) + { + trap_OpenUIMenu(3); + } + } + break; + + case EV_SET_FREE_SABER: + DEBUGNAME("EV_SET_FREE_SABER"); + + trap_Cvar_Set("ui_freeSaber", va("%i", es->eventParm)); + break; + + case EV_SET_FORCE_DISABLE: + DEBUGNAME("EV_SET_FORCE_DISABLE"); + + trap_Cvar_Set("ui_forcePowerDisable", va("%i", es->eventParm)); + break; + + // + // missile impacts + // + case EV_MISSILE_STICK: + DEBUGNAME("EV_MISSILE_STICK"); +// trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.missileStick ); + break; + + case EV_MISSILE_HIT: + DEBUGNAME("EV_MISSILE_HIT"); + ByteToDir( es->eventParm, dir ); + if (cent->currentState.eFlags & EF_ALT_FIRING) + { + CG_MissileHitPlayer( es->weapon, position, dir, es->otherEntityNum, qtrue); + } + else + { + CG_MissileHitPlayer( es->weapon, position, dir, es->otherEntityNum, qfalse); + } + break; + + case EV_MISSILE_MISS: + DEBUGNAME("EV_MISSILE_MISS"); + ByteToDir( es->eventParm, dir ); + if (cent->currentState.eFlags & EF_ALT_FIRING) + { + CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_DEFAULT, qtrue, es->generic1); + } + else + { + CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_DEFAULT, qfalse, 0); + } + break; + + case EV_MISSILE_MISS_METAL: + DEBUGNAME("EV_MISSILE_MISS_METAL"); + ByteToDir( es->eventParm, dir ); + if (cent->currentState.eFlags & EF_ALT_FIRING) + { + CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_METAL, qtrue, es->generic1); + } + else + { + CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_METAL, qfalse, 0); + } + break; + + case EV_PLAY_EFFECT: + DEBUGNAME("EV_PLAY_EFFECT"); + switch(es->eventParm) + { //it isn't a hack, it's ingenuity! + case EFFECT_SMOKE: + eID = trap_FX_RegisterEffect("emplaced/dead_smoke.efx"); + break; + case EFFECT_EXPLOSION: + eID = trap_FX_RegisterEffect("emplaced/explode.efx"); + break; + case EFFECT_EXPLOSION_PAS: + eID = trap_FX_RegisterEffect("turret/explode.efx"); + break; + case EFFECT_SPARK_EXPLOSION: + eID = trap_FX_RegisterEffect("spark_explosion.efx"); + break; + case EFFECT_EXPLOSION_TRIPMINE: + eID = trap_FX_RegisterEffect("tripMine/explosion.efx"); + break; + case EFFECT_EXPLOSION_DETPACK: + eID = trap_FX_RegisterEffect("detpack/explosion.efx"); + break; + case EFFECT_EXPLOSION_FLECHETTE: + eID = trap_FX_RegisterEffect("flechette/alt_blow.efx"); + break; + case EFFECT_STUNHIT: + eID = trap_FX_RegisterEffect("stunBaton/flesh_impact.efx"); + break; + case EFFECT_EXPLOSION_DEMP2ALT: + FX_DEMP2_AltDetonate( cent->lerpOrigin, es->weapon ); + eID = trap_FX_RegisterEffect("demp2/altDetonate.efx"); + break; + default: + eID = -1; + break; + } + + if (eID != -1) + { + vec3_t fxDir; + + VectorCopy(es->angles, fxDir); + + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + + trap_FX_PlayEffectID(eID, es->origin, fxDir); + } + break; + + case EV_PLAY_EFFECT_ID: + DEBUGNAME("EV_PLAY_EFFECT_ID"); + { + vec3_t fxDir; + + AngleVectors(es->angles, fxDir, 0, 0); + + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + + if ( cgs.gameEffects[ es->eventParm ] ) + { + trap_FX_PlayEffectID(cgs.gameEffects[es->eventParm], es->origin, fxDir ); + } + else + { + s = CG_ConfigString( CS_EFFECTS + es->eventParm ); + if (s && s[0]) + { + trap_FX_PlayEffectID(trap_FX_RegisterEffect(s), es->origin, fxDir ); + } + } + } + break; + + case EV_MUTE_SOUND: + DEBUGNAME("EV_MUTE_SOUND"); + if (cg_entities[es->trickedentindex2].currentState.eFlags & EF_SOUNDTRACKER) + { + cg_entities[es->trickedentindex2].currentState.eFlags -= EF_SOUNDTRACKER; + } + trap_S_MuteSound(es->trickedentindex2, es->trickedentindex); + trap_S_StopLoopingSound(es->trickedentindex2); + break; + + case EV_GENERAL_SOUND: + DEBUGNAME("EV_GENERAL_SOUND"); + if (es->saberEntityNum == TRACK_CHANNEL_2 || es->saberEntityNum == TRACK_CHANNEL_3 || + es->saberEntityNum == TRACK_CHANNEL_5) + { //channels 2 and 3 are for speed and rage, 5 for sight + if ( cgs.gameSounds[ es->eventParm ] ) + { + trap_S_AddRealLoopingSound(es->number, es->pos.trBase, vec3_origin, cgs.gameSounds[ es->eventParm ] ); + } + } + else + { + if ( cgs.gameSounds[ es->eventParm ] ) { + trap_S_StartSound (NULL, es->number, CHAN_VOICE, cgs.gameSounds[ es->eventParm ] ); + } else { + s = CG_ConfigString( CS_SOUNDS + es->eventParm ); + trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, s ) ); + } + } + break; + + case EV_GLOBAL_SOUND: // play from the player's head so it never diminishes + DEBUGNAME("EV_GLOBAL_SOUND"); + if ( cgs.gameSounds[ es->eventParm ] ) { + trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, cgs.gameSounds[ es->eventParm ] ); + } else { + s = CG_ConfigString( CS_SOUNDS + es->eventParm ); + trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, CG_CustomSound( es->number, s ) ); + } + break; + + case EV_GLOBAL_TEAM_SOUND: // play from the player's head so it never diminishes + { + DEBUGNAME("EV_GLOBAL_TEAM_SOUND"); + switch( es->eventParm ) { + case GTS_RED_CAPTURE: // CTF: red team captured the blue flag, 1FCTF: red team captured the neutral flag + //CG_AddBufferedSound( cgs.media.redScoredSound ); + break; + case GTS_BLUE_CAPTURE: // CTF: blue team captured the red flag, 1FCTF: blue team captured the neutral flag + //CG_AddBufferedSound( cgs.media.blueScoredSound ); + break; + case GTS_RED_RETURN: // CTF: blue flag returned, 1FCTF: never used + if (cgs.gametype == GT_CTY) + { + CG_AddBufferedSound( cgs.media.blueYsalReturnedSound ); + } + else + { + CG_AddBufferedSound( cgs.media.blueFlagReturnedSound ); + } + break; + case GTS_BLUE_RETURN: // CTF red flag returned, 1FCTF: neutral flag returned + if (cgs.gametype == GT_CTY) + { + CG_AddBufferedSound( cgs.media.redYsalReturnedSound ); + } + else + { + CG_AddBufferedSound( cgs.media.redFlagReturnedSound ); + } + break; + + case GTS_RED_TAKEN: // CTF: red team took blue flag, 1FCTF: blue team took the neutral flag + // if this player picked up the flag then a sound is played in CG_CheckLocalSounds + if (cgs.gametype == GT_CTY) + { + CG_AddBufferedSound( cgs.media.redTookYsalSound ); + } + else + { + CG_AddBufferedSound( cgs.media.redTookFlagSound ); + } + break; + case GTS_BLUE_TAKEN: // CTF: blue team took the red flag, 1FCTF red team took the neutral flag + // if this player picked up the flag then a sound is played in CG_CheckLocalSounds + if (cgs.gametype == GT_CTY) + { + CG_AddBufferedSound( cgs.media.blueTookYsalSound ); + } + else + { + CG_AddBufferedSound( cgs.media.blueTookFlagSound ); + } + break; + case GTS_REDTEAM_SCORED: + CG_AddBufferedSound(cgs.media.redScoredSound); + break; + case GTS_BLUETEAM_SCORED: + CG_AddBufferedSound(cgs.media.blueScoredSound); + break; + case GTS_REDTEAM_TOOK_LEAD: + CG_AddBufferedSound(cgs.media.redLeadsSound); + break; + case GTS_BLUETEAM_TOOK_LEAD: + CG_AddBufferedSound(cgs.media.blueLeadsSound); + break; + case GTS_TEAMS_ARE_TIED: + CG_AddBufferedSound( cgs.media.teamsTiedSound ); + break; + default: + break; + } + break; + } + + case EV_ENTITY_SOUND: + DEBUGNAME("EV_ENTITY_SOUND"); + //somewhat of a hack - weapon is the caller entity's index, trickedentindex is the proper sound channel + if ( cgs.gameSounds[ es->eventParm ] ) { + trap_S_StartSound (NULL, es->weapon, es->trickedentindex, cgs.gameSounds[ es->eventParm ] ); + } else { + s = CG_ConfigString( CS_SOUNDS + es->eventParm ); + trap_S_StartSound (NULL, es->weapon, es->trickedentindex, CG_CustomSound( es->weapon, s ) ); + } + break; + + case EV_PLAY_ROFF: + DEBUGNAME("EV_PLAY_ROFF"); + trap_ROFF_Play(es->weapon, es->eventParm, es->trickedentindex); + break; + + case EV_GLASS_SHATTER: + DEBUGNAME("EV_GLASS_SHATTER"); + CG_GlassShatter(es->genericenemyindex, es->origin, es->angles, es->trickedentindex, es->pos.trTime); + break; + + case EV_DEBRIS: + DEBUGNAME("EV_DEBRIS"); + if (es->weapon) + { + if (cgs.gameSounds[es->weapon]) + { + isnd = cgs.gameSounds[es->weapon]; + } + else + { + s = CG_ConfigString( CS_SOUNDS + es->eventParm ); + isnd = CG_CustomSound( es->number, s ); + } + } + else + { + isnd = 0; + } + + if (es->trickedentindex > 0) + { + if (cgs.gameModels[es->trickedentindex]) + { + CG_CreateDebris(es->number, es->pos.trBase, es->angles, es->origin, isnd, cgs.gameModels[es->trickedentindex]); + } + else + { //default to "rock" type + CG_CreateDebris(es->number, es->pos.trBase, es->angles, es->origin, isnd, -1); + } + } + else + { + CG_CreateDebris(es->number, es->pos.trBase, es->angles, es->origin, isnd, es->trickedentindex); + } + break; + + case EV_PAIN: + // local player sounds are triggered in CG_CheckLocalSounds, + // so ignore events on the player + DEBUGNAME("EV_PAIN"); + + if ( !cg_oldPainSounds.integer || (cent->currentState.number != cg.snap->ps.clientNum) ) + { + CG_PainEvent( cent, es->eventParm ); + } + break; + + case EV_DEATH1: + case EV_DEATH2: + case EV_DEATH3: + DEBUGNAME("EV_DEATHx"); + trap_S_StartSound( NULL, es->number, CHAN_VOICE, + CG_CustomSound( es->number, va("*death%i.wav", event - EV_DEATH1 + 1) ) ); + if (es->eventParm && es->number == cg.snap->ps.clientNum) + { + trap_S_StartLocalSound(cgs.media.dramaticFailure, CHAN_LOCAL); + CGCam_SetMusicMult(0.3, 5000); + } + break; + + + case EV_OBITUARY: + DEBUGNAME("EV_OBITUARY"); + CG_Obituary( es ); + break; + + // + // powerup events + // + case EV_POWERUP_QUAD: + DEBUGNAME("EV_POWERUP_QUAD"); + if ( es->number == cg.snap->ps.clientNum ) { + cg.powerupActive = PW_QUAD; + cg.powerupTime = cg.time; + } + //trap_S_StartSound (NULL, es->number, CHAN_ITEM, cgs.media.quadSound ); + break; + case EV_POWERUP_BATTLESUIT: + DEBUGNAME("EV_POWERUP_BATTLESUIT"); + if ( es->number == cg.snap->ps.clientNum ) { + cg.powerupActive = PW_BATTLESUIT; + cg.powerupTime = cg.time; + } + //trap_S_StartSound (NULL, es->number, CHAN_ITEM, cgs.media.protectSound ); + break; + + case EV_FORCE_DRAINED: + DEBUGNAME("EV_FORCE_DRAINED"); + ByteToDir( es->eventParm, dir ); + //FX_ForceDrained(position, dir); + trap_S_StartSound (NULL, es->owner, CHAN_AUTO, cgs.media.drainSound ); + cg_entities[es->owner].teamPowerEffectTime = cg.time + 1000; + cg_entities[es->owner].teamPowerType = 2; + break; + + case EV_GIB_PLAYER: + DEBUGNAME("EV_GIB_PLAYER"); + //trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.gibSound ); + //CG_GibPlayer( cent->lerpOrigin ); + break; + + case EV_STARTLOOPINGSOUND: + DEBUGNAME("EV_STARTLOOPINGSOUND"); + if ( cgs.gameSounds[ es->eventParm ] ) + { + isnd = cgs.gameSounds[es->eventParm]; + } + else + { + s = CG_ConfigString( CS_SOUNDS + es->eventParm ); + isnd = CG_CustomSound(es->number, s); + } + + trap_S_AddRealLoopingSound( es->number, es->pos.trBase, vec3_origin, isnd ); + es->loopSound = isnd; + break; + + case EV_STOPLOOPINGSOUND: + DEBUGNAME("EV_STOPLOOPINGSOUND"); + trap_S_StopLoopingSound( es->number ); + es->loopSound = 0; + break; + + case EV_WEAPON_CHARGE: + DEBUGNAME("EV_WEAPON_CHARGE"); + assert(es->eventParm > WP_NONE && es->eventParm < WP_NUM_WEAPONS); + if (cg_weapons[es->eventParm].chargeSound) + { + trap_S_StartSound(NULL, es->number, CHAN_WEAPON, cg_weapons[es->eventParm].chargeSound); + } + break; + + case EV_WEAPON_CHARGE_ALT: + DEBUGNAME("EV_WEAPON_CHARGE_ALT"); + assert(es->eventParm > WP_NONE && es->eventParm < WP_NUM_WEAPONS); + if (cg_weapons[es->eventParm].altChargeSound) + { + trap_S_StartSound(NULL, es->number, CHAN_WEAPON, cg_weapons[es->eventParm].altChargeSound); + } + break; + + case EV_SHIELD_HIT: + DEBUGNAME("EV_SHIELD_HIT"); + ByteToDir(es->eventParm, dir); + CG_PlayerShieldHit(es->otherEntityNum, dir, es->time2); + break; + + case EV_DEBUG_LINE: + DEBUGNAME("EV_DEBUG_LINE"); + CG_Beam( cent ); + break; + + case EV_TESTLINE: + DEBUGNAME("EV_TESTLINE"); + CG_TestLine(es->origin, es->origin2, es->time2, es->weapon, 1); + break; + + case EV_BODY_QUEUE_COPY: + DEBUGNAME("EV_BODY_QUEUE_COPY"); + CG_BodyQueueCopy(cent, es->eventParm, es->weapon); + break; + + default: + DEBUGNAME("UNKNOWN"); + CG_Error( "Unknown event: %i", event ); + break; + } + +} + + +/* +============== +CG_CheckEvents + +============== +*/ +void CG_CheckEvents( centity_t *cent ) { + // check for event-only entities + if ( cent->currentState.eType > ET_EVENTS ) { + if ( cent->previousEvent ) { + return; // already fired + } + // if this is a player event set the entity number of the client entity number + if ( cent->currentState.eFlags & EF_PLAYER_EVENT ) { + cent->currentState.number = cent->currentState.otherEntityNum; + } + + cent->previousEvent = 1; + + cent->currentState.event = cent->currentState.eType - ET_EVENTS; + } else { + // check for events riding with another entity + if ( cent->currentState.event == cent->previousEvent ) { + return; + } + cent->previousEvent = cent->currentState.event; + if ( ( cent->currentState.event & ~EV_EVENT_BITS ) == 0 ) { + return; + } + } + + // calculate the position at exactly the frame time + BG_EvaluateTrajectory( ¢->currentState.pos, cg.snap->serverTime, cent->lerpOrigin ); + CG_SetEntitySoundPosition( cent ); + + CG_EntityEvent( cent, cent->lerpOrigin ); +} + diff --git a/code/cgame/cg_event.c b/code/cgame/cg_event.c new file mode 100644 index 0000000..90e4228 --- /dev/null +++ b/code/cgame/cg_event.c @@ -0,0 +1,2407 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_event.c -- handle entity events at snapshot or playerstate transitions + +#include "cg_local.h" +#include "fx_local.h" +#include "..\ghoul2\g2.h" +#include "../ui/ui_shared.h" + +// for the voice chats +#include "../../ui/menudef.h" +//========================================================================== + +extern int g_saberFlashTime; +extern vec3_t g_saberFlashPos; +extern char *showPowersName[]; + +/* +=================== +CG_PlaceString + +Also called by scoreboard drawing +=================== +*/ +const char *CG_PlaceString( int rank ) { + static char str[64]; + char *s, *t; + // number extenstions, eg 1st, 2nd, 3rd, 4th etc. + // note that the rules are different for french, but by changing the required strip strings they seem to work + char sST[10]; + char sND[10]; + char sRD[10]; + char sTH[10]; + char sTiedFor[64]; // german is much longer, super safe... + + trap_SP_GetStringTextString("INGAMETEXT_NUMBER_ST",sST, sizeof(sST) ); + trap_SP_GetStringTextString("INGAMETEXT_NUMBER_ND",sND, sizeof(sND) ); + trap_SP_GetStringTextString("INGAMETEXT_NUMBER_RD",sRD, sizeof(sRD) ); + trap_SP_GetStringTextString("INGAMETEXT_NUMBER_TH",sTH, sizeof(sTH) ); + trap_SP_GetStringTextString("INGAMETEXT_TIED_FOR" ,sTiedFor,sizeof(sTiedFor) ); + strcat(sTiedFor," "); // save worrying about translators adding spaces or not + + if ( rank & RANK_TIED_FLAG ) { + rank &= ~RANK_TIED_FLAG; + t = sTiedFor;//"Tied for "; + } else { + t = ""; + } + + if ( rank == 1 ) { + s = va("1%s",sST);//S_COLOR_BLUE "1st" S_COLOR_WHITE; // draw in blue + } else if ( rank == 2 ) { + s = va("2%s",sND);//S_COLOR_RED "2nd" S_COLOR_WHITE; // draw in red + } else if ( rank == 3 ) { + s = va("3%s",sRD);//S_COLOR_YELLOW "3rd" S_COLOR_WHITE; // draw in yellow + } else if ( rank == 11 ) { + s = va("11%s",sTH); + } else if ( rank == 12 ) { + s = va("12%s",sTH); + } else if ( rank == 13 ) { + s = va("13%s",sTH); + } else if ( rank % 10 == 1 ) { + s = va("%i%s", rank,sST); + } else if ( rank % 10 == 2 ) { + s = va("%i%s", rank,sND); + } else if ( rank % 10 == 3 ) { + s = va("%i%s", rank,sRD); + } else { + s = va("%i%s", rank,sTH); + } + + Com_sprintf( str, sizeof( str ), "%s%s", t, s ); + return str; +} + +qboolean CG_ThereIsAMaster(void); + +/* +============= +CG_Obituary +============= +*/ +static void CG_Obituary( entityState_t *ent ) { + int mod; + int target, attacker; + char *message; + const char *targetInfo; + const char *attackerInfo; + char targetName[32]; + char attackerName[32]; + gender_t gender; + clientInfo_t *ci; + + target = ent->otherEntityNum; + attacker = ent->otherEntityNum2; + mod = ent->eventParm; + + if ( target < 0 || target >= MAX_CLIENTS ) { + CG_Error( "CG_Obituary: target out of range" ); + } + ci = &cgs.clientinfo[target]; + + if ( attacker < 0 || attacker >= MAX_CLIENTS ) { + attacker = ENTITYNUM_WORLD; + attackerInfo = NULL; + } else { + attackerInfo = CG_ConfigString( CS_PLAYERS + attacker ); + } + + targetInfo = CG_ConfigString( CS_PLAYERS + target ); + if ( !targetInfo ) { + return; + } + Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2); + strcat( targetName, S_COLOR_WHITE ); + + // check for single client messages + + switch( mod ) { + case MOD_SUICIDE: + case MOD_FALLING: + case MOD_CRUSH: + case MOD_WATER: + case MOD_SLIME: + case MOD_LAVA: + case MOD_TARGET_LASER: + case MOD_TRIGGER_HURT: + message = "DIED_GENERIC"; + break; + default: + message = NULL; + break; + } + + // Attacker killed themselves. Ridicule them for it. + if (attacker == target) { + gender = ci->gender; + switch (mod) { + case MOD_BRYAR_PISTOL: + case MOD_BRYAR_PISTOL_ALT: + case MOD_BLASTER: + case MOD_DISRUPTOR: + case MOD_DISRUPTOR_SPLASH: + case MOD_DISRUPTOR_SNIPER: + case MOD_BOWCASTER: + case MOD_REPEATER: + case MOD_REPEATER_ALT: + case MOD_FLECHETTE: + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_SHOT_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_SHOT_GENDERLESS"; + else + message = "SUICIDE_SHOT_MALE"; + break; + case MOD_REPEATER_ALT_SPLASH: + case MOD_FLECHETTE_ALT_SPLASH: + case MOD_ROCKET: + case MOD_ROCKET_SPLASH: + case MOD_ROCKET_HOMING: + case MOD_ROCKET_HOMING_SPLASH: + case MOD_THERMAL: + case MOD_THERMAL_SPLASH: + case MOD_TRIP_MINE_SPLASH: + case MOD_TIMED_MINE_SPLASH: + case MOD_DET_PACK_SPLASH: + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_EXPLOSIVES_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_EXPLOSIVES_GENDERLESS"; + else + message = "SUICIDE_EXPLOSIVES_MALE"; + break; + case MOD_DEMP2: + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_ELECTROCUTED_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_ELECTROCUTED_GENDERLESS"; + else + message = "SUICIDE_ELECTROCUTED_MALE"; + break; + case MOD_FALLING: + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_FALLDEATH_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_FALLDEATH_GENDERLESS"; + else + message = "SUICIDE_FALLDEATH_MALE"; + break; + default: + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_GENERICDEATH_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_GENERICDEATH_GENDERLESS"; + else + message = "SUICIDE_GENERICDEATH_MALE"; + break; + } + } + + if (target != attacker && target < MAX_CLIENTS && attacker < MAX_CLIENTS) + { + goto clientkilled; + } + + if (message) { + gender = ci->gender; + + if (!message[0]) + { + if ( gender == GENDER_FEMALE ) + message = "SUICIDE_GENERICDEATH_FEMALE"; + else if ( gender == GENDER_NEUTER ) + message = "SUICIDE_GENERICDEATH_GENDERLESS"; + else + message = "SUICIDE_GENERICDEATH_MALE"; + } + message = (char *)CG_GetStripEdString("INGAMETEXT", message); + + CG_Printf( "%s %s\n", targetName, message); + return; + } + +clientkilled: + + // check for kill messages from the current clientNum + if ( attacker == cg.snap->ps.clientNum ) { + char *s; + + if ( cgs.gametype < GT_TEAM && cgs.gametype != GT_TOURNAMENT ) { + if (cgs.gametype == GT_JEDIMASTER && + attacker < MAX_CLIENTS && + !ent->isJediMaster && + !cg.snap->ps.isJediMaster && + CG_ThereIsAMaster()) + { + char part1[512]; + char part2[512]; + trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", part1, sizeof(part1)); + trap_SP_GetStringTextString("INGAMETEXT_JMKILLED_NOTJM", part2, sizeof(part2)); + s = va("%s %s\n%s\n", part1, targetName, part2); + } + else if (cgs.gametype == GT_JEDIMASTER && + attacker < MAX_CLIENTS && + !ent->isJediMaster && + !cg.snap->ps.isJediMaster) + { //no JM, saber must be out + char part1[512]; + trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", part1, sizeof(part1)); + /* + kmsg1 = "for 0 points.\nGo for the saber!"; + strcpy(part2, kmsg1); + + s = va("%s %s %s\n", part1, targetName, part2); + */ + s = va("%s %s\n", part1, targetName); + } + else + { + char sPlaceWith[256]; + char sKilledStr[256]; + trap_SP_GetStringTextString("INGAMETEXT_PLACE_WITH", sPlaceWith, sizeof(sPlaceWith)); + trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", sKilledStr, sizeof(sKilledStr)); + + s = va("%s %s.\n%s %s %i.", sKilledStr, targetName, + CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), + sPlaceWith, + cg.snap->ps.persistant[PERS_SCORE] ); + } + } else { + char sKilledStr[256]; + trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", sKilledStr, sizeof(sKilledStr)); + s = va("%s %s", sKilledStr, targetName ); + } + if (!(cg_singlePlayerActive.integer && cg_cameraOrbit.integer)) { + CG_CenterPrint( s, SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH ); + } + // print the text message as well + } + + // check for double client messages + if ( !attackerInfo ) { + attacker = ENTITYNUM_WORLD; + strcpy( attackerName, "noname" ); + } else { + Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof(attackerName) - 2); + strcat( attackerName, S_COLOR_WHITE ); + // check for kill messages about the current clientNum + if ( target == cg.snap->ps.clientNum ) { + Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) ); + } + } + + if ( attacker != ENTITYNUM_WORLD ) { + switch (mod) { + case MOD_STUN_BATON: + message = "KILLED_STUN"; + break; + case MOD_MELEE: + message = "KILLED_MELEE"; + break; + case MOD_SABER: + message = "KILLED_SABER"; + break; + case MOD_BRYAR_PISTOL: + case MOD_BRYAR_PISTOL_ALT: + message = "KILLED_BRYAR"; + break; + case MOD_BLASTER: + message = "KILLED_BLASTER"; + break; + case MOD_DISRUPTOR: + case MOD_DISRUPTOR_SPLASH: + message = "KILLED_DISRUPTOR"; + break; + case MOD_DISRUPTOR_SNIPER: + message = "KILLED_DISRUPTORSNIPE"; + break; + case MOD_BOWCASTER: + message = "KILLED_BOWCASTER"; + break; + case MOD_REPEATER: + message = "KILLED_REPEATER"; + break; + case MOD_REPEATER_ALT: + case MOD_REPEATER_ALT_SPLASH: + message = "KILLED_REPEATERALT"; + break; + case MOD_DEMP2: + case MOD_DEMP2_ALT: + message = "KILLED_DEMP2"; + break; + case MOD_FLECHETTE: + message = "KILLED_FLECHETTE"; + break; + case MOD_FLECHETTE_ALT_SPLASH: + message = "KILLED_FLECHETTE_MINE"; + break; + case MOD_ROCKET: + case MOD_ROCKET_SPLASH: + message = "KILLED_ROCKET"; + break; + case MOD_ROCKET_HOMING: + case MOD_ROCKET_HOMING_SPLASH: + message = "KILLED_ROCKET_HOMING"; + break; + case MOD_THERMAL: + case MOD_THERMAL_SPLASH: + message = "KILLED_THERMAL"; + break; + case MOD_TRIP_MINE_SPLASH: + message = "KILLED_TRIPMINE"; + break; + case MOD_TIMED_MINE_SPLASH: + message = "KILLED_TRIPMINE_TIMED"; + break; + case MOD_DET_PACK_SPLASH: + message = "KILLED_DETPACK"; + break; + case MOD_FORCE_DARK: + message = "KILLED_DARKFORCE"; + break; + case MOD_SENTRY: + message = "KILLED_SENTRY"; + break; + case MOD_TELEFRAG: + message = "KILLED_TELEFRAG"; + break; + case MOD_CRUSH: + message = "KILLED_GENERIC";//"KILLED_FORCETOSS"; + break; + case MOD_FALLING: + message = "KILLED_FORCETOSS"; + break; + case MOD_TRIGGER_HURT: + message = "KILLED_GENERIC";//"KILLED_FORCETOSS"; + break; + default: + message = "KILLED_GENERIC"; + break; + } + + if (message) { + message = (char *)CG_GetStripEdString("INGAMETEXT", message); + + CG_Printf( "%s %s %s\n", + targetName, message, attackerName); + return; + } + } + + // we don't know what it was + CG_Printf( "%s %s\n", targetName, (char *)CG_GetStripEdString("INGAMETEXT", "DIED_GENERIC") ); +} + +//========================================================================== + +void CG_ToggleBinoculars(centity_t *cent, int forceZoom) +{ + if (cent->currentState.number != cg.snap->ps.clientNum) + { + return; + } + + if (cg.snap->ps.weaponstate != WEAPON_READY) + { //So we can't fool it and reactivate while switching to the saber or something. + return; + } + + if (cg.snap->ps.weapon == WP_SABER) + { //No. + return; + } + + if (forceZoom) + { + if (forceZoom == 2) + { + cg.snap->ps.zoomMode = 0; + } + else if (forceZoom == 1) + { + cg.snap->ps.zoomMode = 2; + } + } + + if (cg.snap->ps.zoomMode == 0) + { + trap_S_StartSound( NULL, cg.snap->ps.clientNum, CHAN_AUTO, cgs.media.zoomStart ); + } + else if (cg.snap->ps.zoomMode == 2) + { + trap_S_StartSound( NULL, cg.snap->ps.clientNum, CHAN_AUTO, cgs.media.zoomEnd ); + } +} + +/* +=============== +CG_UseItem +=============== +*/ +static void CG_UseItem( centity_t *cent ) { + clientInfo_t *ci; + int itemNum, clientNum; + gitem_t *item; + entityState_t *es; + + es = ¢->currentState; + + itemNum = (es->event & ~EV_EVENT_BITS) - EV_USE_ITEM0; + if ( itemNum < 0 || itemNum > HI_NUM_HOLDABLE ) { + itemNum = 0; + } + + // print a message if the local player + if ( es->number == cg.snap->ps.clientNum ) { + if ( !itemNum ) { + //CG_CenterPrint( "No item to use", SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH ); + } else { + item = BG_FindItemForHoldable( itemNum ); + } + } + + switch ( itemNum ) { + default: + case HI_NONE: + //trap_S_StartSound (NULL, es->number, CHAN_BODY, cgs.media.useNothingSound ); + break; + + case HI_BINOCULARS: + CG_ToggleBinoculars(cent, es->eventParm); + break; + + case HI_SEEKER: + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.deploySeeker ); + break; + + case HI_SHIELD: + case HI_DATAPAD: + case HI_SENTRY_GUN: + break; + +// case HI_MEDKIT: + case HI_MEDPAC: + clientNum = cent->currentState.clientNum; + if ( clientNum >= 0 && clientNum < MAX_CLIENTS ) { + ci = &cgs.clientinfo[ clientNum ]; + ci->medkitUsageTime = cg.time; + } + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.medkitSound ); + break; + } + + if (cg.snap && cg.snap->ps.clientNum == cent->currentState.number && itemNum != HI_BINOCULARS) + { //if not using binoculars, we just used that item up, so switch + BG_CycleInven(&cg.snap->ps, 1); + cg.itemSelect = -1; //update the client-side selection display + } +} + + +/* +================ +CG_ItemPickup + +A new item was picked up this frame +================ +*/ +static void CG_ItemPickup( int itemNum ) { + cg.itemPickup = itemNum; + cg.itemPickupTime = cg.time; + cg.itemPickupBlendTime = cg.time; + // see if it should be the grabbed weapon + if ( cg.snap && bg_itemlist[itemNum].giType == IT_WEAPON ) { + + // 0 == no switching + // 1 == automatically switch to best SAFE weapon + // 2 == automatically switch to best weapon, safe or otherwise + // 3 == if not saber, automatically switch to best weapon, safe or otherwise + + if (0 == cg_autoswitch.integer) + { + // don't switch + } + else if ( cg_autoswitch.integer == 1) + { //only autoselect if not explosive ("safe") + if (bg_itemlist[itemNum].giTag != WP_TRIP_MINE && + bg_itemlist[itemNum].giTag != WP_DET_PACK && + bg_itemlist[itemNum].giTag != WP_THERMAL && + bg_itemlist[itemNum].giTag != WP_ROCKET_LAUNCHER && + bg_itemlist[itemNum].giTag > cg.snap->ps.weapon && + cg.snap->ps.weapon != WP_SABER) + { + if (!cg.snap->ps.emplacedIndex) + { + cg.weaponSelectTime = cg.time; + } + cg.weaponSelect = bg_itemlist[itemNum].giTag; + } + } + else if ( cg_autoswitch.integer == 2) + { //autoselect if better + if (bg_itemlist[itemNum].giTag > cg.snap->ps.weapon && + cg.snap->ps.weapon != WP_SABER) + { + if (!cg.snap->ps.emplacedIndex) + { + cg.weaponSelectTime = cg.time; + } + cg.weaponSelect = bg_itemlist[itemNum].giTag; + } + } + /* + else if ( cg_autoswitch.integer == 3) + { //autoselect if better and not using the saber as a weapon + if (bg_itemlist[itemNum].giTag > cg.snap->ps.weapon && + cg.snap->ps.weapon != WP_SABER) + { + if (!cg.snap->ps.emplacedIndex) + { + cg.weaponSelectTime = cg.time; + } + cg.weaponSelect = bg_itemlist[itemNum].giTag; + } + } + */ + //No longer required - just not switching ever if using saber + } + + //rww - print pickup messages + if (bg_itemlist[itemNum].classname && bg_itemlist[itemNum].classname[0] && + (bg_itemlist[itemNum].giType != IT_TEAM || (bg_itemlist[itemNum].giTag != PW_REDFLAG && bg_itemlist[itemNum].giTag != PW_BLUEFLAG)) ) + { //don't print messages for flags, they have their own pickup event broadcasts + char text[1024]; + + if ( trap_SP_GetStringTextString( va("INGAME_%s",bg_itemlist[itemNum].classname), text, sizeof( text ))) + { + Com_Printf("%s %s\n", CG_GetStripEdString("INGAMETEXT", "PICKUPLINE"), text); + } + else + { + Com_Printf("%s %s\n", CG_GetStripEdString("INGAMETEXT", "PICKUPLINE"), bg_itemlist[itemNum].classname); + } + } +} + + +/* +================ +CG_PainEvent + +Also called by playerstate transition +================ +*/ +void CG_PainEvent( centity_t *cent, int health ) { + char *snd; + + // don't do more than two pain sounds a second + if ( cg.time - cent->pe.painTime < 500 ) { + return; + } + + if ( health < 25 ) { + snd = "*pain25.wav"; + } else if ( health < 50 ) { + snd = "*pain50.wav"; + } else if ( health < 75 ) { + snd = "*pain75.wav"; + } else { + snd = "*pain100.wav"; + } + trap_S_StartSound( NULL, cent->currentState.number, CHAN_VOICE, + CG_CustomSound( cent->currentState.number, snd ) ); + + // save pain time for programitic twitch animation + cent->pe.painTime = cg.time; + cent->pe.painDirection ^= 1; +} + +void CG_ReattachLimb(centity_t *source) +{ + char *limbName; + char *stubCapName; + + switch (source->torsoBolt) + { + case G2_MODELPART_HEAD: + limbName = "head"; + stubCapName = "torso_cap_head_off"; + break; + case G2_MODELPART_WAIST: + limbName = "torso"; + stubCapName = "hips_cap_torso_off"; + break; + case G2_MODELPART_LARM: + limbName = "l_arm"; + stubCapName = "torso_cap_l_arm_off"; + break; + case G2_MODELPART_RARM: + limbName = "r_arm"; + stubCapName = "torso_cap_r_arm_off"; + break; + case G2_MODELPART_RHAND: + limbName = "r_hand"; + stubCapName = "r_arm_cap_r_hand_off"; + break; + case G2_MODELPART_LLEG: + limbName = "l_leg"; + stubCapName = "hips_cap_l_leg_off"; + break; + case G2_MODELPART_RLEG: + limbName = "r_leg"; + stubCapName = "hips_cap_r_leg_off"; + break; + default: + source->torsoBolt = 0; + source->ghoul2weapon = NULL; + return; + } + + trap_G2API_SetSurfaceOnOff(source->ghoul2, limbName, 0); + trap_G2API_SetSurfaceOnOff(source->ghoul2, stubCapName, 0x00000100); + + source->torsoBolt = 0; + + source->ghoul2weapon = NULL; +} + +static void CG_BodyQueueCopy(centity_t *cent, int clientNum, int knownWeapon) +{ + centity_t *source; + animation_t *anim; + float animSpeed; + int flags=BONE_ANIM_OVERRIDE_FREEZE; + clientInfo_t *ci; + + if (cent->ghoul2) + { + trap_G2API_CleanGhoul2Models(¢->ghoul2); + } + + if (clientNum < 0 || clientNum >= MAX_CLIENTS) + { + return; + } + + source = &cg_entities[ clientNum ]; + ci = &cgs.clientinfo[ clientNum ]; + + if (!source) + { + return; + } + + if (!source->ghoul2) + { + return; + } + + cent->isATST = source->isATST; + + cent->dustTrailTime = source->dustTrailTime; + + trap_G2API_DuplicateGhoul2Instance(source->ghoul2, ¢->ghoul2); + + //either force the weapon from when we died or remove it if it was a dropped weapon + if (knownWeapon > WP_BRYAR_PISTOL && trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { + trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); + } + else if (trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { + trap_G2API_CopySpecificGhoul2Model(g2WeaponInstances[knownWeapon], 0, cent->ghoul2, 1); + } + + anim = &bgGlobalAnimations[ cent->currentState.torsoAnim ]; + animSpeed = 50.0f / anim->frameLerp; + + //this will just set us to the last frame of the animation, in theory + if (source->isATST) + { + int aNum = cgs.clientinfo[source->currentState.number].frame+1; + anim = &bgGlobalAnimations[ BOTH_DEAD1 ]; + animSpeed = 1; + + flags &= ~BONE_ANIM_OVERRIDE_LOOP; + + while (aNum >= anim->firstFrame+anim->numFrames) + { + aNum--; + } + + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "pelvis", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + } + else + { + int aNum = cgs.clientinfo[source->currentState.number].frame+1; + + while (aNum >= anim->firstFrame+anim->numFrames) + { + aNum--; + } + + if (aNum < anim->firstFrame-1) + { //wrong animation...? + aNum = (anim->firstFrame+anim->numFrames)-1; + } + + //if (!cgs.clientinfo[source->currentState.number].frame || (cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) != (source->currentState.torsoAnim&~ANIM_TOGGLEBIT) ) + //{ + // aNum = (anim->firstFrame+anim->numFrames)-1; + //} + + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); + } + + //After we create the bodyqueue, regenerate any limbs on the real instance + if (source->torsoBolt) + { + CG_ReattachLimb(source); + } +} + +const char *CG_TeamName(int team) +{ + if (team==TEAM_RED) + return "RED"; + else if (team==TEAM_BLUE) + return "BLUE"; + else if (team==TEAM_SPECTATOR) + return "SPECTATOR"; + return "FREE"; +} + +void CG_PrintCTFMessage(clientInfo_t *ci, const char *teamName, int ctfMessage) +{ + char printMsg[1024]; + char *refName = NULL; + const char *stripEdString = NULL; + + switch (ctfMessage) + { + case CTFMESSAGE_FRAGGED_FLAG_CARRIER: + refName = "FRAGGED_FLAG_CARRIER"; + break; + case CTFMESSAGE_FLAG_RETURNED: + refName = "FLAG_RETURNED"; + break; + case CTFMESSAGE_PLAYER_RETURNED_FLAG: + refName = "PLAYER_RETURNED_FLAG"; + break; + case CTFMESSAGE_PLAYER_CAPTURED_FLAG: + refName = "PLAYER_CAPTURED_FLAG"; + break; + case CTFMESSAGE_PLAYER_GOT_FLAG: + refName = "PLAYER_GOT_FLAG"; + break; + default: + return; + } + + stripEdString = CG_GetStripEdString("INGAMETEXT", refName); + + if (!stripEdString || !stripEdString[0]) + { + return; + } + + if (teamName && teamName[0]) + { + const char *f = strstr(stripEdString, "%s"); + + if (f) + { + int strLen = 0; + int i = 0; + + if (ci) + { + Com_sprintf(printMsg, sizeof(printMsg), "%s ", ci->name); + strLen = strlen(printMsg); + } + + while (stripEdString[i] && i < 512) + { + if (stripEdString[i] == '%' && + stripEdString[i+1] == 's') + { + printMsg[strLen] = '\0'; + Q_strcat(printMsg, sizeof(printMsg), teamName); + strLen = strlen(printMsg); + + i++; + } + else + { + printMsg[strLen] = stripEdString[i]; + strLen++; + } + + i++; + } + + printMsg[strLen] = '\0'; + + goto doPrint; + } + } + + if (ci) + { + Com_sprintf(printMsg, sizeof(printMsg), "%s %s", ci->name, stripEdString); + } + else + { + Com_sprintf(printMsg, sizeof(printMsg), "%s", stripEdString); + } + +doPrint: + Com_Printf("%s\n", printMsg); +} + +void CG_GetCTFMessageEvent(entityState_t *es) +{ + int clIndex = es->trickedentindex; + int teamIndex = es->trickedentindex2; + clientInfo_t *ci = NULL; + const char *teamName = NULL; + + if (clIndex < MAX_CLIENTS) + { + ci = &cgs.clientinfo[clIndex]; + } + + if (teamIndex < 50) + { + teamName = CG_TeamName(teamIndex); + } + + CG_PrintCTFMessage(ci, teamName, es->eventParm); +} + +void DoFall(centity_t *cent, entityState_t *es, int clientNum) +{ + int delta = es->eventParm; + + if (cent->currentState.eFlags & EF_DEAD) + { //corpses crack into the ground ^_^ + if (delta > 25) + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.fallSound ); + } + else + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( "sound/movers/objects/objectHit.wav" ) ); + } + } + else if (delta > 50) + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.fallSound ); + trap_S_StartSound( NULL, cent->currentState.number, CHAN_VOICE, + CG_CustomSound( cent->currentState.number, "*land1.wav" ) ); + cent->pe.painTime = cg.time; // don't play a pain sound right after this + } + else if (delta > 44) + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.fallSound ); + trap_S_StartSound( NULL, cent->currentState.number, CHAN_VOICE, + CG_CustomSound( cent->currentState.number, "*land1.wav" ) ); + cent->pe.painTime = cg.time; // don't play a pain sound right after this + } + else + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.landSound ); + } + + if ( clientNum == cg.predictedPlayerState.clientNum ) + { + // smooth landing z changes + cg.landChange = -delta; + if (cg.landChange > 32) + { + cg.landChange = 32; + } + if (cg.landChange < -32) + { + cg.landChange = -32; + } + cg.landTime = cg.time; + } +} + +int CG_InClientBitflags(entityState_t *ent, int client) +{ + int checkIn; + int sub = 0; + + if (client > 47) + { + checkIn = ent->trickedentindex4; + sub = 48; + } + else if (client > 31) + { + checkIn = ent->trickedentindex3; + sub = 32; + } + else if (client > 15) + { + checkIn = ent->trickedentindex2; + sub = 16; + } + else + { + checkIn = ent->trickedentindex; + } + + if (checkIn & (1 << (client-sub))) + { + return 1; + } + + return 0; +} + +/* +============== +CG_EntityEvent + +An entity has an event value +also called by CG_CheckPlayerstateEvents +============== +*/ +#define DEBUGNAME(x) if(cg_debugEvents.integer){CG_Printf(x"\n");} +void CG_EntityEvent( centity_t *cent, vec3_t position ) { + entityState_t *es; + int event; + vec3_t dir; + const char *s; + int clientNum; + clientInfo_t *ci; + int eID = 0; + int isnd = 0; + centity_t *cl_ent; + + es = ¢->currentState; + event = es->event & ~EV_EVENT_BITS; + + if ( cg_debugEvents.integer ) { + CG_Printf( "ent:%3i event:%3i ", es->number, event ); + } + + if ( !event ) { + DEBUGNAME("ZEROEVENT"); + return; + } + + clientNum = es->clientNum; + if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { + clientNum = 0; + } + ci = &cgs.clientinfo[ clientNum ]; + + switch ( event ) { + // + // movement generated events + // + case EV_CLIENTJOIN: + DEBUGNAME("EV_CLIENTJOIN"); + + //Slight hack to force a local reinit of client entity on join. + cl_ent = &cg_entities[es->eventParm]; + + if (cl_ent) + { + cl_ent->isATST = 0; + cl_ent->atstFootClang = 0; + cl_ent->atstSwinging = 0; +// cl_ent->torsoBolt = 0; + cl_ent->bolt1 = 0; + cl_ent->bolt2 = 0; + cl_ent->bolt3 = 0; + cl_ent->bolt4 = 0; + cl_ent->saberLength = SABER_LENGTH_MAX; + cl_ent->saberExtendTime = 0; + cl_ent->boltInfo = 0; + cl_ent->frame_minus1_refreshed = 0; + cl_ent->frame_minus2_refreshed = 0; + cl_ent->frame_hold_time = 0; + cl_ent->frame_hold_refreshed = 0; + cl_ent->trickAlpha = 0; + cl_ent->trickAlphaTime = 0; + cl_ent->ghoul2weapon = NULL; + cl_ent->weapon = WP_NONE; + cl_ent->teamPowerEffectTime = 0; + cl_ent->teamPowerType = 0; + } + break; + + case EV_FOOTSTEP: + DEBUGNAME("EV_FOOTSTEP"); + if (cg_footsteps.integer) { + trap_S_StartSound (NULL, es->number, CHAN_BODY, + cgs.media.footsteps[ ci->footsteps ][rand()&3] ); + } + break; + case EV_FOOTSTEP_METAL: + DEBUGNAME("EV_FOOTSTEP_METAL"); + if (cg_footsteps.integer) { + trap_S_StartSound (NULL, es->number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_METAL ][rand()&3] ); + } + break; + case EV_FOOTSPLASH: + DEBUGNAME("EV_FOOTSPLASH"); + if (cg_footsteps.integer) { + trap_S_StartSound (NULL, es->number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] ); + } + break; + case EV_FOOTWADE: + DEBUGNAME("EV_FOOTWADE"); + if (cg_footsteps.integer) { + trap_S_StartSound (NULL, es->number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] ); + } + break; + case EV_SWIM: + DEBUGNAME("EV_SWIM"); + if (cg_footsteps.integer) { + trap_S_StartSound (NULL, es->number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] ); + } + break; + + + case EV_FALL: + DEBUGNAME("EV_FALL"); + if (es->number == cg.snap->ps.clientNum && cg.snap->ps.fallingToDeath) + { + break; + } + DoFall(cent, es, clientNum); + break; + case EV_STEP_4: + case EV_STEP_8: + case EV_STEP_12: + case EV_STEP_16: // smooth out step up transitions + DEBUGNAME("EV_STEP"); + { + float oldStep; + int delta; + int step; + + if ( clientNum != cg.predictedPlayerState.clientNum ) { + break; + } + // if we are interpolating, we don't need to smooth steps + if ( cg.demoPlayback || (cg.snap->ps.pm_flags & PMF_FOLLOW) || + cg_nopredict.integer || cg_synchronousClients.integer ) { + break; + } + // check for stepping up before a previous step is completed + delta = cg.time - cg.stepTime; + if (delta < STEP_TIME) { + oldStep = cg.stepChange * (STEP_TIME - delta) / STEP_TIME; + } else { + oldStep = 0; + } + + // add this amount + step = 4 * (event - EV_STEP_4 + 1 ); + cg.stepChange = oldStep + step; + if ( cg.stepChange > MAX_STEP_CHANGE ) { + cg.stepChange = MAX_STEP_CHANGE; + } + cg.stepTime = cg.time; + break; + } + + case EV_JUMP_PAD: + DEBUGNAME("EV_JUMP_PAD"); + break; + + case EV_PRIVATE_DUEL: + DEBUGNAME("EV_PRIVATE_DUEL"); + + if (cg.snap->ps.clientNum != es->number) + { + break; + } + + if (es->eventParm) + { //starting the duel + if (es->eventParm == 2) + { + CG_CenterPrint( CG_GetStripEdString("SVINGAME", "BEGIN_DUEL"), 120, GIANTCHAR_WIDTH*2 ); + trap_S_StartLocalSound( cgs.media.countFightSound, CHAN_ANNOUNCER ); + } + else + { + trap_S_StartBackgroundTrack( "music/mp/duel.mp3", "music/mp/duel.mp3", qfalse ); + } + } + else + { //ending the duel + CG_StartMusic(qtrue); + } + break; + + case EV_JUMP: + DEBUGNAME("EV_JUMP"); + trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*jump1.wav" ) ); + break; + case EV_ROLL: + DEBUGNAME("EV_ROLL"); + if (es->number == cg.snap->ps.clientNum && cg.snap->ps.fallingToDeath) + { + break; + } + if (es->eventParm) + { //fall-roll-in-one event + DoFall(cent, es, clientNum); + } + + trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*jump1.wav" ) ); + trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.rollSound ); + + //FIXME: need some sort of body impact on ground sound and maybe kick up some dust? + break; + + case EV_TAUNT: + DEBUGNAME("EV_TAUNT"); + trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*taunt.wav" ) ); + break; + case EV_TAUNT_YES: + DEBUGNAME("EV_TAUNT_YES"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_YES); + break; + case EV_TAUNT_NO: + DEBUGNAME("EV_TAUNT_NO"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_NO); + break; + case EV_TAUNT_FOLLOWME: + DEBUGNAME("EV_TAUNT_FOLLOWME"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_FOLLOWME); + break; + case EV_TAUNT_GETFLAG: + DEBUGNAME("EV_TAUNT_GETFLAG"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONGETFLAG); + break; + case EV_TAUNT_GUARDBASE: + DEBUGNAME("EV_TAUNT_GUARDBASE"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONDEFENSE); + break; + case EV_TAUNT_PATROL: + DEBUGNAME("EV_TAUNT_PATROL"); + CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONPATROL); + break; + case EV_WATER_TOUCH: + DEBUGNAME("EV_WATER_TOUCH"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrInSound ); + break; + case EV_WATER_LEAVE: + DEBUGNAME("EV_WATER_LEAVE"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrOutSound ); + break; + case EV_WATER_UNDER: + DEBUGNAME("EV_WATER_UNDER"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrUnSound ); + break; + case EV_WATER_CLEAR: + DEBUGNAME("EV_WATER_CLEAR"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, CG_CustomSound( es->number, "*gasp.wav" ) ); + break; + + case EV_ITEM_PICKUP: + DEBUGNAME("EV_ITEM_PICKUP"); + { + gitem_t *item; + int index; + qboolean newindex = qfalse; + + index = cg_entities[es->eventParm].currentState.modelindex; // player predicted + + if (index < 1 && cg_entities[es->eventParm].currentState.isJediMaster) + { //a holocron most likely + index = cg_entities[es->eventParm].currentState.trickedentindex4; + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.holocronPickup ); + + if (es->number == cg.snap->ps.clientNum && showPowersName[index]) + { + const char *strText = CG_GetStripEdString("INGAMETEXT", "PICKUPLINE"); + + //Com_Printf("%s %s\n", strText, showPowersName[index]); + CG_CenterPrint( va("%s %s\n", strText, CG_GetStripEdString("INGAME",showPowersName[index])), SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH ); + } + + //Show the player their force selection bar in case picking the holocron up changed the current selection + if (index != FP_SABERATTACK && index != FP_SABERDEFEND && index != FP_SABERTHROW && + index != FP_LEVITATION && + es->number == cg.snap->ps.clientNum && + (index == cg.snap->ps.fd.forcePowerSelected || !(cg.snap->ps.fd.forcePowersActive & (1 << cg.snap->ps.fd.forcePowerSelected)))) + { + if (cg.forceSelect != index) + { + cg.forceSelect = index; + newindex = qtrue; + } + } + + if (es->number == cg.snap->ps.clientNum && newindex) + { + if (cg.forceSelectTime < cg.time) + { + cg.forceSelectTime = cg.time; + } + } + + break; + } + + if (cg_entities[es->eventParm].weapon >= cg.time) + { //rww - an unfortunately necessary hack to prevent double item pickups + break; + } + + //Hopefully even if this entity is somehow removed and replaced with, say, another + //item, this time will have expired by the time that item needs to be picked up. + //Of course, it's quite possible this will fail miserably, so if you've got a better + //solution then please do use it. + cg_entities[es->eventParm].weapon = cg.time+500; + + if ( index < 1 || index >= bg_numItems ) { + break; + } + item = &bg_itemlist[ index ]; + + if ( /*item->giType != IT_POWERUP && */item->giType != IT_TEAM) { + if (item->pickup_sound && item->pickup_sound[0]) + { + trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound ) ); + } + } + + // show icon and name on status bar + if ( es->number == cg.snap->ps.clientNum ) { + CG_ItemPickup( index ); + } + } + break; + + case EV_GLOBAL_ITEM_PICKUP: + DEBUGNAME("EV_GLOBAL_ITEM_PICKUP"); + { + gitem_t *item; + int index; + + index = es->eventParm; // player predicted + + if ( index < 1 || index >= bg_numItems ) { + break; + } + item = &bg_itemlist[ index ]; + // powerup pickups are global + if( item->pickup_sound && item->pickup_sound[0] ) { + trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound) ); + } + + // show icon and name on status bar + if ( es->number == cg.snap->ps.clientNum ) { + CG_ItemPickup( index ); + } + } + break; + + // + // weapon events + // + case EV_NOAMMO: + DEBUGNAME("EV_NOAMMO"); +// trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.noAmmoSound ); + if ( es->number == cg.snap->ps.clientNum ) + { + int weap = 0; + + if (es->eventParm && es->eventParm < WP_NUM_WEAPONS) + { + cg.snap->ps.stats[STAT_WEAPONS] &= ~(1 << es->eventParm); + weap = cg.snap->ps.weapon; + } + else if (es->eventParm) + { + weap = (es->eventParm-WP_NUM_WEAPONS); + } + CG_OutOfAmmoChange(weap); + } + break; + case EV_CHANGE_WEAPON: + DEBUGNAME("EV_CHANGE_WEAPON"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.selectSound ); + break; + case EV_FIRE_WEAPON: + DEBUGNAME("EV_FIRE_WEAPON"); + if (cent->currentState.number >= MAX_CLIENTS && cent->currentState.eType != ET_GRAPPLE) + { //special case for turret firing + vec3_t gunpoint, gunangle; + mdxaBone_t matrix; + + weaponInfo_t *weaponInfo = &cg_weapons[WP_TURRET]; + + if ( !weaponInfo->registered ) + { + memset( weaponInfo, 0, sizeof( *weaponInfo ) ); + + weaponInfo->flashSound[0] = NULL_SOUND; + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = NULL_HANDLE; + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_TurretProjectileThink; + + trap_FX_RegisterEffect("effects/blaster/wall_impact.efx"); + trap_FX_RegisterEffect("effects/blaster/flesh_impact.efx"); + + weaponInfo->registered = qtrue; + } + + if (cent->ghoul2) + { + if (!cent->bolt1) + { + cent->bolt1 = trap_G2API_AddBolt(cent->ghoul2, 0, "*flash01"); + } + if (!cent->bolt2) + { + cent->bolt2 = trap_G2API_AddBolt(cent->ghoul2, 0, "*flash02"); + } + } + else + { + break; + } + + if (cent->currentState.eventParm) + { + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cent->bolt2, &matrix, cent->currentState.angles, cent->currentState.origin, cg.time, cgs.gameModels, cent->modelScale); + } + else + { + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cent->bolt1, &matrix, cent->currentState.angles, cent->currentState.origin, cg.time, cgs.gameModels, cent->modelScale); + } + + gunpoint[0] = matrix.matrix[0][3]; + gunpoint[1] = matrix.matrix[1][3]; + gunpoint[2] = matrix.matrix[2][3]; + + gunangle[0] = -matrix.matrix[0][0]; + gunangle[1] = -matrix.matrix[1][0]; + gunangle[2] = -matrix.matrix[2][0]; + + trap_FX_PlayEffectID(trap_FX_RegisterEffect( "effects/turret/muzzle_flash.efx" ), gunpoint, gunangle); + } + else + { + CG_FireWeapon( cent, qfalse ); + } + break; + + case EV_ALT_FIRE: + DEBUGNAME("EV_ALT_FIRE"); + CG_FireWeapon( cent, qtrue ); + + //if you just exploded your detpacks and you have no ammo left for them, autoswitch + if ( cg.snap->ps.clientNum == cent->currentState.number && + cg.snap->ps.weapon == WP_DET_PACK ) + { + if (cg.snap->ps.ammo[weaponData[WP_DET_PACK].ammoIndex] == 0) + { + CG_OutOfAmmoChange(WP_DET_PACK); + } + } + + break; + + case EV_SABER_ATTACK: + DEBUGNAME("EV_SABER_ATTACK"); + trap_S_StartSound(es->pos.trBase, es->number, CHAN_WEAPON, trap_S_RegisterSound(va("sound/weapons/saber/saberhup%i.wav", Q_irand(1, 8)))); + break; + + case EV_SABER_HIT: + DEBUGNAME("EV_SABER_HIT"); + if (es->eventParm == 16) + { //Make lots of sparks, something special happened + vec3_t fxDir; + VectorCopy(es->angles, fxDir); + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/saber/saberhit.wav")); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + } + else if (es->eventParm) + { //hit a person + vec3_t fxDir; + VectorCopy(es->angles, fxDir); + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/saber/saberhit.wav")); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); + } + else + { //hit something else + vec3_t fxDir; + VectorCopy(es->angles, fxDir); + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/saber/saberhit.wav")); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), es->origin, fxDir ); + } + break; + + case EV_SABER_BLOCK: + DEBUGNAME("EV_SABER_BLOCK"); + + if (es->eventParm) + { //saber block + vec3_t fxDir; + VectorCopy(es->angles, fxDir); + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound(va( "sound/weapons/saber/saberblock%d.wav", Q_irand(1, 9) ))); + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/saber_block.efx"), es->origin, fxDir ); + + g_saberFlashTime = cg.time-50; + VectorCopy( es->origin, g_saberFlashPos ); + } + else + { //projectile block + vec3_t fxDir; + VectorCopy(es->angles, fxDir); + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/deflect.efx"), es->origin, fxDir); + } + break; + + case EV_SABER_UNHOLSTER: + DEBUGNAME("EV_SABER_UNHOLSTER"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" ) ); + break; + + case EV_BECOME_JEDIMASTER: + DEBUGNAME("EV_SABER_UNHOLSTER"); + { + trace_t tr; + vec3_t playerMins = {-15, -15, DEFAULT_MINS_2+8}; + vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; + vec3_t ang, pos, dpos; + + VectorClear(ang); + ang[ROLL] = 1; + + VectorCopy(position, dpos); + dpos[2] -= 4096; + + CG_Trace(&tr, position, playerMins, playerMaxs, dpos, es->number, MASK_SOLID); + VectorCopy(tr.endpos, pos); + + if (tr.fraction == 1) + { + break; + } + trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/jedispawn.efx"), pos, ang); + + trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" ) ); + + if (cg.snap->ps.clientNum == es->number) + { + trap_S_StartLocalSound(cgs.media.happyMusic, CHAN_LOCAL); + CGCam_SetMusicMult(0.3, 5000); + } + } + break; + + case EV_DISRUPTOR_MAIN_SHOT: + DEBUGNAME("EV_DISRUPTOR_MAIN_SHOT"); + if (cent->currentState.eventParm != cg.snap->ps.clientNum || + cg.renderingThirdPerson) + { //h4q3ry + CG_GetClientWeaponMuzzleBoltPoint(cent->currentState.eventParm, cent->currentState.origin2); + } + else + { + if (cg.lastFPFlashPoint[0] ||cg.lastFPFlashPoint[1] || cg.lastFPFlashPoint[2]) + { //get the position of the muzzle flash for the first person weapon model from the last frame + VectorCopy(cg.lastFPFlashPoint, cent->currentState.origin2); + } + } + FX_DisruptorMainShot( cent->currentState.origin2, cent->lerpOrigin ); + break; + + case EV_DISRUPTOR_SNIPER_SHOT: + DEBUGNAME("EV_DISRUPTOR_SNIPER_SHOT"); + if (cent->currentState.eventParm != cg.snap->ps.clientNum || + cg.renderingThirdPerson) + { //h4q3ry + CG_GetClientWeaponMuzzleBoltPoint(cent->currentState.eventParm, cent->currentState.origin2); + } + else + { + if (cg.lastFPFlashPoint[0] ||cg.lastFPFlashPoint[1] || cg.lastFPFlashPoint[2]) + { //get the position of the muzzle flash for the first person weapon model from the last frame + VectorCopy(cg.lastFPFlashPoint, cent->currentState.origin2); + } + } + FX_DisruptorAltShot( cent->currentState.origin2, cent->lerpOrigin, cent->currentState.shouldtarget ); + break; + + case EV_DISRUPTOR_SNIPER_MISS: + DEBUGNAME("EV_DISRUPTOR_SNIPER_MISS"); + ByteToDir( es->eventParm, dir ); + if (es->weapon) + { //primary + FX_DisruptorHitWall( cent->lerpOrigin, dir ); + } + else + { //secondary + FX_DisruptorAltMiss( cent->lerpOrigin, dir ); + } + break; + + case EV_DISRUPTOR_HIT: + DEBUGNAME("EV_DISRUPTOR_HIT"); + ByteToDir( es->eventParm, dir ); + if (es->weapon) + { //client + FX_DisruptorHitPlayer( cent->lerpOrigin, dir, qtrue ); + } + else + { //non-client + FX_DisruptorHitWall( cent->lerpOrigin, dir ); + } + break; + + case EV_DISRUPTOR_ZOOMSOUND: + DEBUGNAME("EV_DISRUPTOR_ZOOMSOUND"); + if (es->number == cg.snap->ps.clientNum) + { + if (cg.snap->ps.zoomMode) + { + trap_S_StartLocalSound(trap_S_RegisterSound("sound/weapons/disruptor/zoomstart.wav"), CHAN_AUTO); + } + else + { + trap_S_StartLocalSound(trap_S_RegisterSound("sound/weapons/disruptor/zoomend.wav"), CHAN_AUTO); + } + } + break; + case EV_PREDEFSOUND: + DEBUGNAME("EV_PREDEFSOUND"); + { + int sID = -1; + + switch (es->eventParm) + { + case PDSOUND_PROTECTHIT: + sID = trap_S_RegisterSound("sound/weapons/force/protecthit.mp3"); + break; + case PDSOUND_PROTECT: + sID = trap_S_RegisterSound("sound/weapons/force/protect.mp3"); + break; + case PDSOUND_ABSORBHIT: + sID = trap_S_RegisterSound("sound/weapons/force/absorbhit.mp3"); + if (es->trickedentindex >= 0 && es->trickedentindex < MAX_CLIENTS) + { + int clnum = es->trickedentindex; + + cg_entities[clnum].teamPowerEffectTime = cg.time + 1000; + cg_entities[clnum].teamPowerType = 3; + } + break; + case PDSOUND_ABSORB: + sID = trap_S_RegisterSound("sound/weapons/force/absorb.mp3"); + break; + case PDSOUND_FORCEJUMP: + sID = trap_S_RegisterSound("sound/weapons/force/jump.mp3"); + break; + case PDSOUND_FORCEGRIP: + sID = trap_S_RegisterSound("sound/weapons/force/grip.mp3"); + break; + default: + break; + } + + if (sID != 1) + { + trap_S_StartSound(es->origin, es->number, CHAN_AUTO, sID); + } + } + break; + + case EV_TEAM_POWER: + DEBUGNAME("EV_TEAM_POWER"); + { + int clnum = 0; + + while (clnum < MAX_CLIENTS) + { + if (CG_InClientBitflags(es, clnum)) + { + if (es->eventParm == 1) + { //eventParm 1 is heal + trap_S_StartSound (NULL, clnum, CHAN_AUTO, cgs.media.teamHealSound ); + cg_entities[clnum].teamPowerEffectTime = cg.time + 1000; + cg_entities[clnum].teamPowerType = 1; + } + else + { //eventParm 2 is force regen + trap_S_StartSound (NULL, clnum, CHAN_AUTO, cgs.media.teamRegenSound ); + cg_entities[clnum].teamPowerEffectTime = cg.time + 1000; + cg_entities[clnum].teamPowerType = 0; + } + } + clnum++; + } + } + break; + + case EV_SCREENSHAKE: + DEBUGNAME("EV_SCREENSHAKE"); + if (!es->modelindex || cg.predictedPlayerState.clientNum == es->modelindex-1) + { + CGCam_Shake(es->angles[0], es->time); + } + break; + case EV_USE_ITEM0: + DEBUGNAME("EV_USE_ITEM0"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM1: + DEBUGNAME("EV_USE_ITEM1"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM2: + DEBUGNAME("EV_USE_ITEM2"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM3: + DEBUGNAME("EV_USE_ITEM3"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM4: + DEBUGNAME("EV_USE_ITEM4"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM5: + DEBUGNAME("EV_USE_ITEM5"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM6: + DEBUGNAME("EV_USE_ITEM6"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM7: + DEBUGNAME("EV_USE_ITEM7"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM8: + DEBUGNAME("EV_USE_ITEM8"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM9: + DEBUGNAME("EV_USE_ITEM9"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM10: + DEBUGNAME("EV_USE_ITEM10"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM11: + DEBUGNAME("EV_USE_ITEM11"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM12: + DEBUGNAME("EV_USE_ITEM12"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM13: + DEBUGNAME("EV_USE_ITEM13"); + CG_UseItem( cent ); + break; + case EV_USE_ITEM14: + DEBUGNAME("EV_USE_ITEM14"); + CG_UseItem( cent ); + break; + + case EV_ITEMUSEFAIL: + DEBUGNAME("EV_ITEMUSEFAIL"); + if (cg.snap->ps.clientNum == es->number) + { + char *stripedref = NULL; + + switch(es->eventParm) + { + case SENTRY_NOROOM: + stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SENTRY_NOROOM"); + break; + case SENTRY_ALREADYPLACED: + stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SENTRY_ALREADYPLACED"); + break; + case SHIELD_NOROOM: + stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SHIELD_NOROOM"); + break; + case SEEKER_ALREADYDEPLOYED: + stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SEEKER_ALREADYDEPLOYED"); + break; + default: + break; + } + + if (!stripedref) + { + break; + } + + Com_Printf("%s\n", stripedref); + } + break; + + //================================================================= + + // + // other events + // + case EV_PLAYER_TELEPORT_IN: + DEBUGNAME("EV_PLAYER_TELEPORT_IN"); + { + trace_t tr; + vec3_t playerMins = {-15, -15, DEFAULT_MINS_2+8}; + vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; + vec3_t ang, pos, dpos; + + VectorClear(ang); + ang[ROLL] = 1; + + VectorCopy(position, dpos); + dpos[2] -= 4096; + + CG_Trace(&tr, position, playerMins, playerMaxs, dpos, es->number, MASK_SOLID); + VectorCopy(tr.endpos, pos); + + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.teleInSound ); + + if (tr.fraction == 1) + { + break; + } + trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/spawn.efx"), pos, ang); + } + break; + + case EV_PLAYER_TELEPORT_OUT: + DEBUGNAME("EV_PLAYER_TELEPORT_OUT"); + { + trace_t tr; + vec3_t playerMins = {-15, -15, DEFAULT_MINS_2+8}; + vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; + vec3_t ang, pos, dpos; + + VectorClear(ang); + ang[ROLL] = 1; + + VectorCopy(position, dpos); + dpos[2] -= 4096; + + CG_Trace(&tr, position, playerMins, playerMaxs, dpos, es->number, MASK_SOLID); + VectorCopy(tr.endpos, pos); + + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.teleOutSound ); + + if (tr.fraction == 1) + { + break; + } + trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/spawn.efx"), pos, ang); + } + break; + + case EV_ITEM_POP: + DEBUGNAME("EV_ITEM_POP"); + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.respawnSound ); + break; + case EV_ITEM_RESPAWN: + DEBUGNAME("EV_ITEM_RESPAWN"); + cent->miscTime = cg.time; // scale up from this + trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.respawnSound ); + break; + + case EV_GRENADE_BOUNCE: + DEBUGNAME("EV_GRENADE_BOUNCE"); + //Do something here? + break; + + case EV_SCOREPLUM: + DEBUGNAME("EV_SCOREPLUM"); + CG_ScorePlum( cent->currentState.otherEntityNum, cent->lerpOrigin, cent->currentState.time ); + break; + + case EV_CTFMESSAGE: + DEBUGNAME("EV_CTFMESSAGE"); + CG_GetCTFMessageEvent(es); + break; + + // + // saga gameplay events + // + case EV_SAGA_ROUNDOVER: + DEBUGNAME("EV_SAGA_ROUNDOVER"); + CG_SagaRoundOver(&cg_entities[cent->currentState.weapon], cent->currentState.eventParm); + break; + case EV_SAGA_OBJECTIVECOMPLETE: + DEBUGNAME("EV_SAGA_OBJECTIVECOMPLETE"); + CG_SagaObjectiveCompleted(&cg_entities[cent->currentState.weapon], cent->currentState.eventParm, cent->currentState.trickedentindex); + break; + + case EV_DESTROY_GHOUL2_INSTANCE: + DEBUGNAME("EV_DESTROY_GHOUL2_INSTANCE"); + if (cg_entities[es->eventParm].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[es->eventParm].ghoul2)) + { + if (es->eventParm < MAX_CLIENTS) + { //You try to do very bad thing! +#ifdef _DEBUG + Com_Printf("WARNING: Tried to kill a client ghoul2 instance with a server event!\n"); +#endif + break; + } + trap_G2API_CleanGhoul2Models(&(cg_entities[es->eventParm].ghoul2)); + } + break; + + case EV_DESTROY_WEAPON_MODEL: + DEBUGNAME("EV_DESTROY_WEAPON_MODEL"); + if (cg_entities[es->eventParm].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[es->eventParm].ghoul2) && + trap_G2API_HasGhoul2ModelOnIndex(&(cg_entities[es->eventParm].ghoul2), 1)) + { + trap_G2API_RemoveGhoul2Model(&(cg_entities[es->eventParm].ghoul2), 1); + } + break; + + case EV_GIVE_NEW_RANK: + DEBUGNAME("EV_GIVE_NEW_RANK"); + if (es->trickedentindex == cg.snap->ps.clientNum) + { + trap_Cvar_Set("ui_rankChange", va("%i", es->eventParm)); + + trap_Cvar_Set("ui_myteam", va("%i", es->bolt2)); + + if (!( trap_Key_GetCatcher() & KEYCATCH_UI ) && !es->bolt1) + { + trap_OpenUIMenu(3); + } + } + break; + + case EV_SET_FREE_SABER: + DEBUGNAME("EV_SET_FREE_SABER"); + + trap_Cvar_Set("ui_freeSaber", va("%i", es->eventParm)); + break; + + case EV_SET_FORCE_DISABLE: + DEBUGNAME("EV_SET_FORCE_DISABLE"); + + trap_Cvar_Set("ui_forcePowerDisable", va("%i", es->eventParm)); + break; + + // + // missile impacts + // + case EV_MISSILE_STICK: + DEBUGNAME("EV_MISSILE_STICK"); +// trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.missileStick ); + break; + + case EV_MISSILE_HIT: + DEBUGNAME("EV_MISSILE_HIT"); + ByteToDir( es->eventParm, dir ); + if (cent->currentState.eFlags & EF_ALT_FIRING) + { + CG_MissileHitPlayer( es->weapon, position, dir, es->otherEntityNum, qtrue); + } + else + { + CG_MissileHitPlayer( es->weapon, position, dir, es->otherEntityNum, qfalse); + } + break; + + case EV_MISSILE_MISS: + DEBUGNAME("EV_MISSILE_MISS"); + ByteToDir( es->eventParm, dir ); + if (cent->currentState.eFlags & EF_ALT_FIRING) + { + CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_DEFAULT, qtrue, es->generic1); + } + else + { + CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_DEFAULT, qfalse, 0); + } + break; + + case EV_MISSILE_MISS_METAL: + DEBUGNAME("EV_MISSILE_MISS_METAL"); + ByteToDir( es->eventParm, dir ); + if (cent->currentState.eFlags & EF_ALT_FIRING) + { + CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_METAL, qtrue, es->generic1); + } + else + { + CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_METAL, qfalse, 0); + } + break; + + case EV_PLAY_EFFECT: + DEBUGNAME("EV_PLAY_EFFECT"); + switch(es->eventParm) + { //it isn't a hack, it's ingenuity! + case EFFECT_SMOKE: + eID = trap_FX_RegisterEffect("emplaced/dead_smoke.efx"); + break; + case EFFECT_EXPLOSION: + eID = trap_FX_RegisterEffect("emplaced/explode.efx"); + break; + case EFFECT_EXPLOSION_PAS: + eID = trap_FX_RegisterEffect("turret/explode.efx"); + break; + case EFFECT_SPARK_EXPLOSION: + eID = trap_FX_RegisterEffect("spark_explosion.efx"); + break; + case EFFECT_EXPLOSION_TRIPMINE: + eID = trap_FX_RegisterEffect("tripMine/explosion.efx"); + break; + case EFFECT_EXPLOSION_DETPACK: + eID = trap_FX_RegisterEffect("detpack/explosion.efx"); + break; + case EFFECT_EXPLOSION_FLECHETTE: + eID = trap_FX_RegisterEffect("flechette/alt_blow.efx"); + break; + case EFFECT_STUNHIT: + eID = trap_FX_RegisterEffect("stunBaton/flesh_impact.efx"); + break; + case EFFECT_EXPLOSION_DEMP2ALT: + FX_DEMP2_AltDetonate( cent->lerpOrigin, es->weapon ); + eID = trap_FX_RegisterEffect("demp2/altDetonate.efx"); + break; + default: + eID = -1; + break; + } + + if (eID != -1) + { + vec3_t fxDir; + + VectorCopy(es->angles, fxDir); + + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + + trap_FX_PlayEffectID(eID, es->origin, fxDir); + } + break; + + case EV_PLAY_EFFECT_ID: + DEBUGNAME("EV_PLAY_EFFECT_ID"); + { + vec3_t fxDir; + + AngleVectors(es->angles, fxDir, 0, 0); + + if (!fxDir[0] && !fxDir[1] && !fxDir[2]) + { + fxDir[1] = 1; + } + + if ( cgs.gameEffects[ es->eventParm ] ) + { + trap_FX_PlayEffectID(cgs.gameEffects[es->eventParm], es->origin, fxDir ); + } + else + { + s = CG_ConfigString( CS_EFFECTS + es->eventParm ); + if (s && s[0]) + { + trap_FX_PlayEffectID(trap_FX_RegisterEffect(s), es->origin, fxDir ); + } + } + } + break; + + case EV_MUTE_SOUND: + DEBUGNAME("EV_MUTE_SOUND"); + if (cg_entities[es->trickedentindex2].currentState.eFlags & EF_SOUNDTRACKER) + { + cg_entities[es->trickedentindex2].currentState.eFlags -= EF_SOUNDTRACKER; + } + trap_S_MuteSound(es->trickedentindex2, es->trickedentindex); + trap_S_StopLoopingSound(es->trickedentindex2); + break; + + case EV_GENERAL_SOUND: + DEBUGNAME("EV_GENERAL_SOUND"); + if (es->saberEntityNum == TRACK_CHANNEL_2 || es->saberEntityNum == TRACK_CHANNEL_3 || + es->saberEntityNum == TRACK_CHANNEL_5) + { //channels 2 and 3 are for speed and rage, 5 for sight + if ( cgs.gameSounds[ es->eventParm ] ) + { + trap_S_AddRealLoopingSound(es->number, es->pos.trBase, vec3_origin, cgs.gameSounds[ es->eventParm ] ); + } + } + else + { + if ( cgs.gameSounds[ es->eventParm ] ) { + trap_S_StartSound (NULL, es->number, CHAN_VOICE, cgs.gameSounds[ es->eventParm ] ); + } else { + s = CG_ConfigString( CS_SOUNDS + es->eventParm ); + trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, s ) ); + } + } + break; + + case EV_GLOBAL_SOUND: // play from the player's head so it never diminishes + DEBUGNAME("EV_GLOBAL_SOUND"); + if ( cgs.gameSounds[ es->eventParm ] ) { + trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, cgs.gameSounds[ es->eventParm ] ); + } else { + s = CG_ConfigString( CS_SOUNDS + es->eventParm ); + trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, CG_CustomSound( es->number, s ) ); + } + break; + + case EV_GLOBAL_TEAM_SOUND: // play from the player's head so it never diminishes + { + DEBUGNAME("EV_GLOBAL_TEAM_SOUND"); + switch( es->eventParm ) { + case GTS_RED_CAPTURE: // CTF: red team captured the blue flag, 1FCTF: red team captured the neutral flag + //CG_AddBufferedSound( cgs.media.redScoredSound ); + break; + case GTS_BLUE_CAPTURE: // CTF: blue team captured the red flag, 1FCTF: blue team captured the neutral flag + //CG_AddBufferedSound( cgs.media.blueScoredSound ); + break; + case GTS_RED_RETURN: // CTF: blue flag returned, 1FCTF: never used + if (cgs.gametype == GT_CTY) + { + CG_AddBufferedSound( cgs.media.blueYsalReturnedSound ); + } + else + { + CG_AddBufferedSound( cgs.media.blueFlagReturnedSound ); + } + break; + case GTS_BLUE_RETURN: // CTF red flag returned, 1FCTF: neutral flag returned + if (cgs.gametype == GT_CTY) + { + CG_AddBufferedSound( cgs.media.redYsalReturnedSound ); + } + else + { + CG_AddBufferedSound( cgs.media.redFlagReturnedSound ); + } + break; + + case GTS_RED_TAKEN: // CTF: red team took blue flag, 1FCTF: blue team took the neutral flag + // if this player picked up the flag then a sound is played in CG_CheckLocalSounds + if (cgs.gametype == GT_CTY) + { + CG_AddBufferedSound( cgs.media.redTookYsalSound ); + } + else + { + CG_AddBufferedSound( cgs.media.redTookFlagSound ); + } + break; + case GTS_BLUE_TAKEN: // CTF: blue team took the red flag, 1FCTF red team took the neutral flag + // if this player picked up the flag then a sound is played in CG_CheckLocalSounds + if (cgs.gametype == GT_CTY) + { + CG_AddBufferedSound( cgs.media.blueTookYsalSound ); + } + else + { + CG_AddBufferedSound( cgs.media.blueTookFlagSound ); + } + break; + case GTS_REDTEAM_SCORED: + CG_AddBufferedSound(cgs.media.redScoredSound); + break; + case GTS_BLUETEAM_SCORED: + CG_AddBufferedSound(cgs.media.blueScoredSound); + break; + case GTS_REDTEAM_TOOK_LEAD: + CG_AddBufferedSound(cgs.media.redLeadsSound); + break; + case GTS_BLUETEAM_TOOK_LEAD: + CG_AddBufferedSound(cgs.media.blueLeadsSound); + break; + case GTS_TEAMS_ARE_TIED: + CG_AddBufferedSound( cgs.media.teamsTiedSound ); + break; + default: + break; + } + break; + } + + case EV_ENTITY_SOUND: + DEBUGNAME("EV_ENTITY_SOUND"); + //somewhat of a hack - weapon is the caller entity's index, trickedentindex is the proper sound channel + if ( cgs.gameSounds[ es->eventParm ] ) { + trap_S_StartSound (NULL, es->weapon, es->trickedentindex, cgs.gameSounds[ es->eventParm ] ); + } else { + s = CG_ConfigString( CS_SOUNDS + es->eventParm ); + trap_S_StartSound (NULL, es->weapon, es->trickedentindex, CG_CustomSound( es->weapon, s ) ); + } + break; + + case EV_PLAY_ROFF: + DEBUGNAME("EV_PLAY_ROFF"); + trap_ROFF_Play(es->weapon, es->eventParm, es->trickedentindex); + break; + + case EV_GLASS_SHATTER: + DEBUGNAME("EV_GLASS_SHATTER"); + CG_GlassShatter(es->genericenemyindex, es->origin, es->angles, es->trickedentindex, es->pos.trTime); + break; + + case EV_DEBRIS: + DEBUGNAME("EV_DEBRIS"); + if (es->weapon) + { + if (cgs.gameSounds[es->weapon]) + { + isnd = cgs.gameSounds[es->weapon]; + } + else + { + s = CG_ConfigString( CS_SOUNDS + es->eventParm ); + isnd = CG_CustomSound( es->number, s ); + } + } + else + { + isnd = 0; + } + + if (es->trickedentindex > 0) + { + if (cgs.gameModels[es->trickedentindex]) + { + CG_CreateDebris(es->number, es->pos.trBase, es->angles, es->origin, isnd, cgs.gameModels[es->trickedentindex]); + } + else + { //default to "rock" type + CG_CreateDebris(es->number, es->pos.trBase, es->angles, es->origin, isnd, -1); + } + } + else + { + CG_CreateDebris(es->number, es->pos.trBase, es->angles, es->origin, isnd, es->trickedentindex); + } + break; + + case EV_PAIN: + // local player sounds are triggered in CG_CheckLocalSounds, + // so ignore events on the player + DEBUGNAME("EV_PAIN"); + + if ( !cg_oldPainSounds.integer || (cent->currentState.number != cg.snap->ps.clientNum) ) + { + CG_PainEvent( cent, es->eventParm ); + } + break; + + case EV_DEATH1: + case EV_DEATH2: + case EV_DEATH3: + DEBUGNAME("EV_DEATHx"); + trap_S_StartSound( NULL, es->number, CHAN_VOICE, + CG_CustomSound( es->number, va("*death%i.wav", event - EV_DEATH1 + 1) ) ); + if (es->eventParm && es->number == cg.snap->ps.clientNum) + { + trap_S_StartLocalSound(cgs.media.dramaticFailure, CHAN_LOCAL); + CGCam_SetMusicMult(0.3, 5000); + } + break; + + + case EV_OBITUARY: + DEBUGNAME("EV_OBITUARY"); + CG_Obituary( es ); + break; + + // + // powerup events + // + case EV_POWERUP_QUAD: + DEBUGNAME("EV_POWERUP_QUAD"); + if ( es->number == cg.snap->ps.clientNum ) { + cg.powerupActive = PW_QUAD; + cg.powerupTime = cg.time; + } + //trap_S_StartSound (NULL, es->number, CHAN_ITEM, cgs.media.quadSound ); + break; + case EV_POWERUP_BATTLESUIT: + DEBUGNAME("EV_POWERUP_BATTLESUIT"); + if ( es->number == cg.snap->ps.clientNum ) { + cg.powerupActive = PW_BATTLESUIT; + cg.powerupTime = cg.time; + } + //trap_S_StartSound (NULL, es->number, CHAN_ITEM, cgs.media.protectSound ); + break; + + case EV_FORCE_DRAINED: + DEBUGNAME("EV_FORCE_DRAINED"); + ByteToDir( es->eventParm, dir ); + //FX_ForceDrained(position, dir); + trap_S_StartSound (NULL, es->owner, CHAN_AUTO, cgs.media.drainSound ); + cg_entities[es->owner].teamPowerEffectTime = cg.time + 1000; + cg_entities[es->owner].teamPowerType = 2; + break; + + case EV_GIB_PLAYER: + DEBUGNAME("EV_GIB_PLAYER"); + //trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.gibSound ); + //CG_GibPlayer( cent->lerpOrigin ); + break; + + case EV_STARTLOOPINGSOUND: + DEBUGNAME("EV_STARTLOOPINGSOUND"); + if ( cgs.gameSounds[ es->eventParm ] ) + { + isnd = cgs.gameSounds[es->eventParm]; + } + else + { + s = CG_ConfigString( CS_SOUNDS + es->eventParm ); + isnd = CG_CustomSound(es->number, s); + } + + trap_S_AddRealLoopingSound( es->number, es->pos.trBase, vec3_origin, isnd ); + es->loopSound = isnd; + break; + + case EV_STOPLOOPINGSOUND: + DEBUGNAME("EV_STOPLOOPINGSOUND"); + trap_S_StopLoopingSound( es->number ); + es->loopSound = 0; + break; + + case EV_WEAPON_CHARGE: + DEBUGNAME("EV_WEAPON_CHARGE"); + assert(es->eventParm > WP_NONE && es->eventParm < WP_NUM_WEAPONS); + if (cg_weapons[es->eventParm].chargeSound) + { + trap_S_StartSound(NULL, es->number, CHAN_WEAPON, cg_weapons[es->eventParm].chargeSound); + } + break; + + case EV_WEAPON_CHARGE_ALT: + DEBUGNAME("EV_WEAPON_CHARGE_ALT"); + assert(es->eventParm > WP_NONE && es->eventParm < WP_NUM_WEAPONS); + if (cg_weapons[es->eventParm].altChargeSound) + { + trap_S_StartSound(NULL, es->number, CHAN_WEAPON, cg_weapons[es->eventParm].altChargeSound); + } + break; + + case EV_SHIELD_HIT: + DEBUGNAME("EV_SHIELD_HIT"); + ByteToDir(es->eventParm, dir); + CG_PlayerShieldHit(es->otherEntityNum, dir, es->time2); + break; + + case EV_DEBUG_LINE: + DEBUGNAME("EV_DEBUG_LINE"); + CG_Beam( cent ); + break; + + case EV_TESTLINE: + DEBUGNAME("EV_TESTLINE"); + CG_TestLine(es->origin, es->origin2, es->time2, es->weapon, 1); + break; + + case EV_BODY_QUEUE_COPY: + DEBUGNAME("EV_BODY_QUEUE_COPY"); + CG_BodyQueueCopy(cent, es->eventParm, es->weapon); + break; + + default: + DEBUGNAME("UNKNOWN"); + CG_Error( "Unknown event: %i", event ); + break; + } + +} + + +/* +============== +CG_CheckEvents + +============== +*/ +void CG_CheckEvents( centity_t *cent ) { + // check for event-only entities + if ( cent->currentState.eType > ET_EVENTS ) { + if ( cent->previousEvent ) { + return; // already fired + } + // if this is a player event set the entity number of the client entity number + if ( cent->currentState.eFlags & EF_PLAYER_EVENT ) { + cent->currentState.number = cent->currentState.otherEntityNum; + } + + cent->previousEvent = 1; + + cent->currentState.event = cent->currentState.eType - ET_EVENTS; + } else { + // check for events riding with another entity + if ( cent->currentState.event == cent->previousEvent ) { + return; + } + cent->previousEvent = cent->currentState.event; + if ( ( cent->currentState.event & ~EV_EVENT_BITS ) == 0 ) { + return; + } + } + + // calculate the position at exactly the frame time + BG_EvaluateTrajectory( ¢->currentState.pos, cg.snap->serverTime, cent->lerpOrigin ); + CG_SetEntitySoundPosition( cent ); + + CG_EntityEvent( cent, cent->lerpOrigin ); +} + diff --git a/code/cgame/cg_info (2).c b/code/cgame/cg_info (2).c new file mode 100644 index 0000000..979ba87 --- /dev/null +++ b/code/cgame/cg_info (2).c @@ -0,0 +1,418 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_info.c -- display information while data is being loading + +#include "cg_local.h" + +#define MAX_LOADING_PLAYER_ICONS 16 +#define MAX_LOADING_ITEM_ICONS 26 + +//static int loadingPlayerIconCount; +//static qhandle_t loadingPlayerIcons[MAX_LOADING_PLAYER_ICONS]; + +void CG_LoadBar(void); + +/* +====================== +CG_LoadingString + +====================== +*/ +void CG_LoadingString( const char *s ) { + Q_strncpyz( cg.infoScreenText, s, sizeof( cg.infoScreenText ) ); + + trap_UpdateScreen(); +} + +/* +=================== +CG_LoadingItem +=================== +*/ +void CG_LoadingItem( int itemNum ) { + gitem_t *item; + + item = &bg_itemlist[itemNum]; + + CG_LoadingString( CG_GetStripEdString("INGAME",item->classname) ); +} + +/* +=================== +CG_LoadingClient +=================== +*/ +void CG_LoadingClient( int clientNum ) { + const char *info; + char personality[MAX_QPATH]; + + info = CG_ConfigString( CS_PLAYERS + clientNum ); + +/* + char model[MAX_QPATH]; + char iconName[MAX_QPATH]; + char *skin; + if ( loadingPlayerIconCount < MAX_LOADING_PLAYER_ICONS ) { + Q_strncpyz( model, Info_ValueForKey( info, "model" ), sizeof( model ) ); + skin = Q_strrchr( model, '/' ); + if ( skin ) { + *skin++ = '\0'; + } else { + skin = "default"; + } + + Com_sprintf( iconName, MAX_QPATH, "models/players/%s/icon_%s.tga", model, skin ); + + loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName ); + if ( !loadingPlayerIcons[loadingPlayerIconCount] ) { + Com_sprintf( iconName, MAX_QPATH, "models/players/characters/%s/icon_%s.tga", model, skin ); + loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName ); + } + if ( !loadingPlayerIcons[loadingPlayerIconCount] ) { + Com_sprintf( iconName, MAX_QPATH, "models/players/%s/icon_%s.tga", DEFAULT_MODEL, "default" ); + loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName ); + } + if ( loadingPlayerIcons[loadingPlayerIconCount] ) { + loadingPlayerIconCount++; + } + } +*/ + Q_strncpyz( personality, Info_ValueForKey( info, "n" ), sizeof(personality) ); + Q_CleanStr( personality ); + + /* + if( cgs.gametype == GT_SINGLE_PLAYER ) { + trap_S_RegisterSound( va( "sound/player/announce/%s.wav", personality )); + } + */ + + CG_LoadingString( personality ); +} + + +/* +==================== +CG_DrawInformation + +Draw all the status / pacifier stuff during level loading +==================== +*/ +#define UI_INFOFONT (UI_BIGFONT) +void CG_DrawInformation( void ) { + const char *s; + const char *info; + const char *sysInfo; + int y; + int value, valueNOFP; + qhandle_t levelshot; + char buf[1024]; + int iPropHeight = 18; // I know, this is total crap, but as a post release asian-hack.... -Ste + + info = CG_ConfigString( CS_SERVERINFO ); + sysInfo = CG_ConfigString( CS_SYSTEMINFO ); + + s = Info_ValueForKey( info, "mapname" ); + levelshot = trap_R_RegisterShaderNoMip( va( "levelshots/%s", s ) ); + if ( !levelshot ) { + levelshot = trap_R_RegisterShaderNoMip( "menu/art/unknownmap" ); + } + trap_R_SetColor( NULL ); + CG_DrawPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, levelshot ); + + CG_LoadBar(); + + // draw the icons of things as they are loaded +// CG_DrawLoadingIcons(); + + // the first 150 rows are reserved for the client connection + // screen to write into + if ( cg.infoScreenText[0] ) { + const char *psLoading = CG_GetStripEdString("MENUS3", "LOADING_MAPNAME"); + UI_DrawProportionalString( 320, 128-32, va(/*"Loading... %s"*/ psLoading, cg.infoScreenText), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + } else { + const char *psAwaitingSnapshot = CG_GetStripEdString("MENUS3", "AWAITING_SNAPSHOT"); + UI_DrawProportionalString( 320, 128-32, /*"Awaiting snapshot..."*/psAwaitingSnapshot, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + } + + // draw info string information + + y = 180-32; + + // don't print server lines if playing a local game + trap_Cvar_VariableStringBuffer( "sv_running", buf, sizeof( buf ) ); + if ( !atoi( buf ) ) { + // server hostname + Q_strncpyz(buf, Info_ValueForKey( info, "sv_hostname" ), 1024); + Q_CleanStr(buf); + UI_DrawProportionalString( 320, y, buf, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + + // pure server + s = Info_ValueForKey( sysInfo, "sv_pure" ); + if ( s[0] == '1' ) { + const char *psPure = CG_GetStripEdString("INGAMETEXT", "PURE_SERVER"); + UI_DrawProportionalString( 320, y, psPure, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + // server-specific message of the day + s = CG_ConfigString( CS_MOTD ); + if ( s[0] ) { + UI_DrawProportionalString( 320, y, s, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + { // display global MOTD at bottom (mirrors ui_main UI_DrawConnectScreen + char motdString[1024]; + trap_Cvar_VariableStringBuffer( "cl_motdString", motdString, sizeof( motdString ) ); + + if (motdString[0]) + { + UI_DrawProportionalString( 320, 425, motdString, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + } + } + + // some extra space after hostname and motd + y += 10; + } + + // map-specific message (long map name) + s = CG_ConfigString( CS_MESSAGE ); + if ( s[0] ) { + UI_DrawProportionalString( 320, y, s, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + // cheats warning + s = Info_ValueForKey( sysInfo, "sv_cheats" ); + if ( s[0] == '1' ) { + UI_DrawProportionalString( 320, y, CG_GetStripEdString("INGAMETEXT", "CHEATSAREENABLED"), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + // game type + switch ( cgs.gametype ) { + case GT_FFA: + s = "Free For All"; + break; + case GT_HOLOCRON: + s = "Holocron FFA"; + break; + case GT_JEDIMASTER: + s = "Jedi Master"; + break; + case GT_SINGLE_PLAYER: + s = "Single Player"; + break; + case GT_TOURNAMENT: + s = "Duel"; + break; + case GT_TEAM: + s = "Team FFA"; + break; + case GT_SAGA: + s = "N/A"; + break; + case GT_CTF: + s = "Capture The Flag"; + break; + case GT_CTY: + s = "Capture The Ysalamiri"; + break; + default: + s = "Unknown Gametype"; + break; + } + UI_DrawProportionalString( 320, y, s, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + + value = atoi( Info_ValueForKey( info, "timelimit" ) ); + if ( value ) { + UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "TIMELIMIT"), value ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + if (cgs.gametype < GT_CTF ) { + value = atoi( Info_ValueForKey( info, "fraglimit" ) ); + if ( value ) { + UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "FRAGLIMIT"), value ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + if (cgs.gametype == GT_TOURNAMENT) + { + value = atoi( Info_ValueForKey( info, "duel_fraglimit" ) ); + if ( value ) { + UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "WINLIMIT"), value ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + } + } + + if (cgs.gametype >= GT_CTF) { + value = atoi( Info_ValueForKey( info, "capturelimit" ) ); + if ( value ) { + UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "CAPTURELIMIT"), value ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + } + + if (cgs.gametype >= GT_TEAM) + { + value = atoi( Info_ValueForKey( info, "g_forceBasedTeams" ) ); + if ( value ) { + UI_DrawProportionalString( 320, y, CG_GetStripEdString("INGAMETEXT", "FORCEBASEDTEAMS"), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + } + + valueNOFP = atoi( Info_ValueForKey( info, "g_forcePowerDisable" ) ); + + value = atoi( Info_ValueForKey( info, "g_maxForceRank" ) ); + if ( value && !valueNOFP ) { + char fmStr[1024]; + + trap_SP_GetStringTextString("INGAMETEXT_MAXFORCERANK",fmStr, sizeof(fmStr)); + + UI_DrawProportionalString( 320, y, va( "%s %s", fmStr, CG_GetStripEdString("INGAMETEXT", forceMasteryLevels[value]) ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + else if (!valueNOFP) + { + char fmStr[1024]; + trap_SP_GetStringTextString("INGAMETEXT_MAXFORCERANK",fmStr, sizeof(fmStr)); + + UI_DrawProportionalString( 320, y, va( "%s %s", fmStr, (char *)CG_GetStripEdString("INGAMETEXT", forceMasteryLevels[7]) ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + if (cgs.gametype == GT_TOURNAMENT) + { + value = atoi( Info_ValueForKey( info, "g_duelWeaponDisable" ) ); + } + else + { + value = atoi( Info_ValueForKey( info, "g_weaponDisable" ) ); + } + if ( cgs.gametype != GT_JEDIMASTER && value ) { + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "SABERONLYSET") ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + if ( valueNOFP ) { + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "NOFPSET") ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + + // Display the rules based on type + y += iPropHeight; + switch ( cgs.gametype ) { + case GT_FFA: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_FFA_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_HOLOCRON: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_HOLO_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_HOLO_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_JEDIMASTER: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_JEDI_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_JEDI_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_SINGLE_PLAYER: + break; + case GT_TOURNAMENT: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_DUEL_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_DUEL_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_TEAM: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_TEAM_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_TEAM_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_SAGA: + break; + case GT_CTF: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTF_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTF_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_CTY: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTY_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTY_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + default: + break; + } +} + +/* +=================== +CG_LoadBar +=================== +*/ +void CG_LoadBar(void) +{ + const int numticks = 9, tickwidth = 40, tickheight = 8; + const int tickpadx = 20, tickpady = 12; + const int capwidth = 8; + const int barwidth = numticks*tickwidth+tickpadx*2+capwidth*2, barleft = ((640-barwidth)/2); + const int barheight = tickheight + tickpady*2, bartop = 480-barheight; + const int capleft = barleft+tickpadx, tickleft = capleft+capwidth, ticktop = bartop+tickpady; + + trap_R_SetColor( colorWhite ); + // Draw background + CG_DrawPic(barleft, bartop, barwidth, barheight, cgs.media.loadBarLEDSurround); + + // Draw left cap (backwards) + CG_DrawPic(tickleft, ticktop, -capwidth, tickheight, cgs.media.loadBarLEDCap); + + // Draw bar + CG_DrawPic(tickleft, ticktop, tickwidth*cg.loadLCARSStage, tickheight, cgs.media.loadBarLED); + + // Draw right cap + CG_DrawPic(tickleft+tickwidth*cg.loadLCARSStage, ticktop, capwidth, tickheight, cgs.media.loadBarLEDCap); +} + diff --git a/code/cgame/cg_info.c b/code/cgame/cg_info.c new file mode 100644 index 0000000..979ba87 --- /dev/null +++ b/code/cgame/cg_info.c @@ -0,0 +1,418 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_info.c -- display information while data is being loading + +#include "cg_local.h" + +#define MAX_LOADING_PLAYER_ICONS 16 +#define MAX_LOADING_ITEM_ICONS 26 + +//static int loadingPlayerIconCount; +//static qhandle_t loadingPlayerIcons[MAX_LOADING_PLAYER_ICONS]; + +void CG_LoadBar(void); + +/* +====================== +CG_LoadingString + +====================== +*/ +void CG_LoadingString( const char *s ) { + Q_strncpyz( cg.infoScreenText, s, sizeof( cg.infoScreenText ) ); + + trap_UpdateScreen(); +} + +/* +=================== +CG_LoadingItem +=================== +*/ +void CG_LoadingItem( int itemNum ) { + gitem_t *item; + + item = &bg_itemlist[itemNum]; + + CG_LoadingString( CG_GetStripEdString("INGAME",item->classname) ); +} + +/* +=================== +CG_LoadingClient +=================== +*/ +void CG_LoadingClient( int clientNum ) { + const char *info; + char personality[MAX_QPATH]; + + info = CG_ConfigString( CS_PLAYERS + clientNum ); + +/* + char model[MAX_QPATH]; + char iconName[MAX_QPATH]; + char *skin; + if ( loadingPlayerIconCount < MAX_LOADING_PLAYER_ICONS ) { + Q_strncpyz( model, Info_ValueForKey( info, "model" ), sizeof( model ) ); + skin = Q_strrchr( model, '/' ); + if ( skin ) { + *skin++ = '\0'; + } else { + skin = "default"; + } + + Com_sprintf( iconName, MAX_QPATH, "models/players/%s/icon_%s.tga", model, skin ); + + loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName ); + if ( !loadingPlayerIcons[loadingPlayerIconCount] ) { + Com_sprintf( iconName, MAX_QPATH, "models/players/characters/%s/icon_%s.tga", model, skin ); + loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName ); + } + if ( !loadingPlayerIcons[loadingPlayerIconCount] ) { + Com_sprintf( iconName, MAX_QPATH, "models/players/%s/icon_%s.tga", DEFAULT_MODEL, "default" ); + loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName ); + } + if ( loadingPlayerIcons[loadingPlayerIconCount] ) { + loadingPlayerIconCount++; + } + } +*/ + Q_strncpyz( personality, Info_ValueForKey( info, "n" ), sizeof(personality) ); + Q_CleanStr( personality ); + + /* + if( cgs.gametype == GT_SINGLE_PLAYER ) { + trap_S_RegisterSound( va( "sound/player/announce/%s.wav", personality )); + } + */ + + CG_LoadingString( personality ); +} + + +/* +==================== +CG_DrawInformation + +Draw all the status / pacifier stuff during level loading +==================== +*/ +#define UI_INFOFONT (UI_BIGFONT) +void CG_DrawInformation( void ) { + const char *s; + const char *info; + const char *sysInfo; + int y; + int value, valueNOFP; + qhandle_t levelshot; + char buf[1024]; + int iPropHeight = 18; // I know, this is total crap, but as a post release asian-hack.... -Ste + + info = CG_ConfigString( CS_SERVERINFO ); + sysInfo = CG_ConfigString( CS_SYSTEMINFO ); + + s = Info_ValueForKey( info, "mapname" ); + levelshot = trap_R_RegisterShaderNoMip( va( "levelshots/%s", s ) ); + if ( !levelshot ) { + levelshot = trap_R_RegisterShaderNoMip( "menu/art/unknownmap" ); + } + trap_R_SetColor( NULL ); + CG_DrawPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, levelshot ); + + CG_LoadBar(); + + // draw the icons of things as they are loaded +// CG_DrawLoadingIcons(); + + // the first 150 rows are reserved for the client connection + // screen to write into + if ( cg.infoScreenText[0] ) { + const char *psLoading = CG_GetStripEdString("MENUS3", "LOADING_MAPNAME"); + UI_DrawProportionalString( 320, 128-32, va(/*"Loading... %s"*/ psLoading, cg.infoScreenText), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + } else { + const char *psAwaitingSnapshot = CG_GetStripEdString("MENUS3", "AWAITING_SNAPSHOT"); + UI_DrawProportionalString( 320, 128-32, /*"Awaiting snapshot..."*/psAwaitingSnapshot, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + } + + // draw info string information + + y = 180-32; + + // don't print server lines if playing a local game + trap_Cvar_VariableStringBuffer( "sv_running", buf, sizeof( buf ) ); + if ( !atoi( buf ) ) { + // server hostname + Q_strncpyz(buf, Info_ValueForKey( info, "sv_hostname" ), 1024); + Q_CleanStr(buf); + UI_DrawProportionalString( 320, y, buf, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + + // pure server + s = Info_ValueForKey( sysInfo, "sv_pure" ); + if ( s[0] == '1' ) { + const char *psPure = CG_GetStripEdString("INGAMETEXT", "PURE_SERVER"); + UI_DrawProportionalString( 320, y, psPure, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + // server-specific message of the day + s = CG_ConfigString( CS_MOTD ); + if ( s[0] ) { + UI_DrawProportionalString( 320, y, s, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + { // display global MOTD at bottom (mirrors ui_main UI_DrawConnectScreen + char motdString[1024]; + trap_Cvar_VariableStringBuffer( "cl_motdString", motdString, sizeof( motdString ) ); + + if (motdString[0]) + { + UI_DrawProportionalString( 320, 425, motdString, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + } + } + + // some extra space after hostname and motd + y += 10; + } + + // map-specific message (long map name) + s = CG_ConfigString( CS_MESSAGE ); + if ( s[0] ) { + UI_DrawProportionalString( 320, y, s, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + // cheats warning + s = Info_ValueForKey( sysInfo, "sv_cheats" ); + if ( s[0] == '1' ) { + UI_DrawProportionalString( 320, y, CG_GetStripEdString("INGAMETEXT", "CHEATSAREENABLED"), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + // game type + switch ( cgs.gametype ) { + case GT_FFA: + s = "Free For All"; + break; + case GT_HOLOCRON: + s = "Holocron FFA"; + break; + case GT_JEDIMASTER: + s = "Jedi Master"; + break; + case GT_SINGLE_PLAYER: + s = "Single Player"; + break; + case GT_TOURNAMENT: + s = "Duel"; + break; + case GT_TEAM: + s = "Team FFA"; + break; + case GT_SAGA: + s = "N/A"; + break; + case GT_CTF: + s = "Capture The Flag"; + break; + case GT_CTY: + s = "Capture The Ysalamiri"; + break; + default: + s = "Unknown Gametype"; + break; + } + UI_DrawProportionalString( 320, y, s, + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + + value = atoi( Info_ValueForKey( info, "timelimit" ) ); + if ( value ) { + UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "TIMELIMIT"), value ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + if (cgs.gametype < GT_CTF ) { + value = atoi( Info_ValueForKey( info, "fraglimit" ) ); + if ( value ) { + UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "FRAGLIMIT"), value ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + if (cgs.gametype == GT_TOURNAMENT) + { + value = atoi( Info_ValueForKey( info, "duel_fraglimit" ) ); + if ( value ) { + UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "WINLIMIT"), value ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + } + } + + if (cgs.gametype >= GT_CTF) { + value = atoi( Info_ValueForKey( info, "capturelimit" ) ); + if ( value ) { + UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "CAPTURELIMIT"), value ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + } + + if (cgs.gametype >= GT_TEAM) + { + value = atoi( Info_ValueForKey( info, "g_forceBasedTeams" ) ); + if ( value ) { + UI_DrawProportionalString( 320, y, CG_GetStripEdString("INGAMETEXT", "FORCEBASEDTEAMS"), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + } + + valueNOFP = atoi( Info_ValueForKey( info, "g_forcePowerDisable" ) ); + + value = atoi( Info_ValueForKey( info, "g_maxForceRank" ) ); + if ( value && !valueNOFP ) { + char fmStr[1024]; + + trap_SP_GetStringTextString("INGAMETEXT_MAXFORCERANK",fmStr, sizeof(fmStr)); + + UI_DrawProportionalString( 320, y, va( "%s %s", fmStr, CG_GetStripEdString("INGAMETEXT", forceMasteryLevels[value]) ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + else if (!valueNOFP) + { + char fmStr[1024]; + trap_SP_GetStringTextString("INGAMETEXT_MAXFORCERANK",fmStr, sizeof(fmStr)); + + UI_DrawProportionalString( 320, y, va( "%s %s", fmStr, (char *)CG_GetStripEdString("INGAMETEXT", forceMasteryLevels[7]) ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + if (cgs.gametype == GT_TOURNAMENT) + { + value = atoi( Info_ValueForKey( info, "g_duelWeaponDisable" ) ); + } + else + { + value = atoi( Info_ValueForKey( info, "g_weaponDisable" ) ); + } + if ( cgs.gametype != GT_JEDIMASTER && value ) { + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "SABERONLYSET") ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + if ( valueNOFP ) { + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "NOFPSET") ), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + } + + + // Display the rules based on type + y += iPropHeight; + switch ( cgs.gametype ) { + case GT_FFA: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_FFA_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_HOLOCRON: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_HOLO_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_HOLO_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_JEDIMASTER: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_JEDI_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_JEDI_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_SINGLE_PLAYER: + break; + case GT_TOURNAMENT: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_DUEL_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_DUEL_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_TEAM: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_TEAM_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_TEAM_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_SAGA: + break; + case GT_CTF: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTF_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTF_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + case GT_CTY: + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTY_1")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTY_2")), + UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); + y += iPropHeight; + break; + default: + break; + } +} + +/* +=================== +CG_LoadBar +=================== +*/ +void CG_LoadBar(void) +{ + const int numticks = 9, tickwidth = 40, tickheight = 8; + const int tickpadx = 20, tickpady = 12; + const int capwidth = 8; + const int barwidth = numticks*tickwidth+tickpadx*2+capwidth*2, barleft = ((640-barwidth)/2); + const int barheight = tickheight + tickpady*2, bartop = 480-barheight; + const int capleft = barleft+tickpadx, tickleft = capleft+capwidth, ticktop = bartop+tickpady; + + trap_R_SetColor( colorWhite ); + // Draw background + CG_DrawPic(barleft, bartop, barwidth, barheight, cgs.media.loadBarLEDSurround); + + // Draw left cap (backwards) + CG_DrawPic(tickleft, ticktop, -capwidth, tickheight, cgs.media.loadBarLEDCap); + + // Draw bar + CG_DrawPic(tickleft, ticktop, tickwidth*cg.loadLCARSStage, tickheight, cgs.media.loadBarLED); + + // Draw right cap + CG_DrawPic(tickleft+tickwidth*cg.loadLCARSStage, ticktop, capwidth, tickheight, cgs.media.loadBarLEDCap); +} + diff --git a/code/cgame/cg_light (2).c b/code/cgame/cg_light (2).c new file mode 100644 index 0000000..05e2224 --- /dev/null +++ b/code/cgame/cg_light (2).c @@ -0,0 +1,85 @@ +#include "cg_local.h" + +#if !defined(CG_LIGHTS_H_INC) + #include "cg_lights.h" +#endif + +static clightstyle_t cl_lightstyle[MAX_LIGHT_STYLES]; +static int lastofs; + +/* +================ +FX_ClearLightStyles +================ +*/ +void CG_ClearLightStyles (void) +{ + int i; + + memset (cl_lightstyle, 0, sizeof(cl_lightstyle)); + lastofs = -1; + + for(i=0;ilength) + { + ls->value[0] = ls->value[1] = ls->value[2] = ls->value[3] = 255; + } + else if (ls->length == 1) + { + ls->value[0] = ls->map[0][0]; + ls->value[1] = ls->map[0][1]; + ls->value[2] = ls->map[0][2]; + ls->value[3] = 255; //ls->map[0][3]; + } + else + { + ls->value[0] = ls->map[ofs%ls->length][0]; + ls->value[1] = ls->map[ofs%ls->length][1]; + ls->value[2] = ls->map[ofs%ls->length][2]; + ls->value[3] = 255; //ls->map[ofs%ls->length][3]; + } + trap_R_SetLightStyle(i, *(int*)ls->value); + } +} + +void CG_SetLightstyle (int i) +{ + const char *s; + int j, k; + + s = CG_ConfigString( i+CS_LIGHT_STYLES ); + j = strlen (s); + if (j >= MAX_QPATH) + { + Com_Error (ERR_DROP, "svc_lightstyle length=%i", j); + } + + cl_lightstyle[(i/3)].length = j; + for (k=0 ; klength) + { + ls->value[0] = ls->value[1] = ls->value[2] = ls->value[3] = 255; + } + else if (ls->length == 1) + { + ls->value[0] = ls->map[0][0]; + ls->value[1] = ls->map[0][1]; + ls->value[2] = ls->map[0][2]; + ls->value[3] = 255; //ls->map[0][3]; + } + else + { + ls->value[0] = ls->map[ofs%ls->length][0]; + ls->value[1] = ls->map[ofs%ls->length][1]; + ls->value[2] = ls->map[ofs%ls->length][2]; + ls->value[3] = 255; //ls->map[ofs%ls->length][3]; + } + trap_R_SetLightStyle(i, *(int*)ls->value); + } +} + +void CG_SetLightstyle (int i) +{ + const char *s; + int j, k; + + s = CG_ConfigString( i+CS_LIGHT_STYLES ); + j = strlen (s); + if (j >= MAX_QPATH) + { + Com_Error (ERR_DROP, "svc_lightstyle length=%i", j); + } + + cl_lightstyle[(i/3)].length = j; + for (k=0 ; koldFrame was exactly on + + int frame; + int frameTime; // time when ->frame will be exactly on + + float backlerp; + + float yawAngle; + qboolean yawing; + float pitchAngle; + qboolean pitching; + + float yawSwingDif; + + int animationNumber; // may include ANIM_TOGGLEBIT + animation_t *animation; + int animationTime; // time when the first frame of the animation will be exact + + float animationSpeed; // scale the animation speed + float animationTorsoSpeed; + + qboolean torsoYawing; +} lerpFrame_t; + + +typedef struct { + lerpFrame_t legs, torso, flag; + int painTime; + int painDirection; // flip from 0 to 1 + int lightningFiring; + + // machinegun spinning + float barrelAngle; + int barrelTime; + qboolean barrelSpinning; +} playerEntity_t; + +//================================================= + + + +// centity_t have a direct corespondence with gentity_t in the game, but +// only the entityState_t is directly communicated to the cgame +typedef struct centity_s { + entityState_t currentState; // from cg.frame + entityState_t nextState; // from cg.nextFrame, if available + qboolean interpolate; // true if next is valid to interpolate to + qboolean currentValid; // true if cg.frame holds this entity + + int muzzleFlashTime; // move to playerEntity? + int previousEvent; + int teleportFlag; + + int trailTime; // so missile trails can handle dropped initial packets + int dustTrailTime; + int miscTime; + + vec3_t damageAngles; + int damageTime; + + int snapShotTime; // last time this entity was found in a snapshot + + playerEntity_t pe; + + int errorTime; // decay the error from this time + vec3_t errorOrigin; + vec3_t errorAngles; + + qboolean extrapolated; // false if origin / angles is an interpolation + vec3_t rawOrigin; + vec3_t rawAngles; + + vec3_t beamEnd; + + // exact interpolated position of entity on this frame + vec3_t lerpOrigin; + vec3_t lerpAngles; + + void *ghoul2; + int weapon; + + void *ghoul2weapon; //rww - pointer to ghoul2 instance of the current 3rd person weapon + + vec3_t modelScale; + float radius; + int boltInfo; + + //sometimes used as a bolt index, but these values are also used as generic values for clientside entities + //at times + int bolt1; + int bolt2; + int bolt3; + int bolt4; + + float saberLength; + int saberExtendTime; + + int rootBone; + int torsoBolt; + + vec3_t turAngles; + + int isATST; + int atstFootClang; + int atstSwinging; + + refEntity_t frame_minus1; + refEntity_t frame_minus2; + + int frame_minus1_refreshed; + int frame_minus2_refreshed; + + refEntity_t frame_hold; + int frame_hold_time; + int frame_hold_refreshed; + + refEntity_t grip_arm; + + int trickAlpha; + int trickAlphaTime; + + int teamPowerEffectTime; + qboolean teamPowerType; //0 regen, 1 heal, 2 drain, 3 absorb +} centity_t; + + +//====================================================================== + +// local entities are created as a result of events or predicted actions, +// and live independantly from all server transmitted entities + +typedef struct markPoly_s { + struct markPoly_s *prevMark, *nextMark; + int time; + qhandle_t markShader; + qboolean alphaFade; // fade alpha instead of rgb + float color[4]; + poly_t poly; + polyVert_t verts[MAX_VERTS_ON_POLY]; +} markPoly_t; + + +typedef enum { + LE_MARK, + LE_EXPLOSION, + LE_SPRITE_EXPLOSION, + LE_FADE_SCALE_MODEL, // currently only for Demp2 shock sphere + LE_FRAGMENT, + LE_PUFF, + LE_MOVE_SCALE_FADE, + LE_FALL_SCALE_FADE, + LE_FADE_RGB, + LE_SCALE_FADE, + LE_SCOREPLUM, + LE_OLINE, + LE_SHOWREFENTITY, + LE_LINE +} leType_t; + +typedef enum { + LEF_PUFF_DONT_SCALE = 0x0001, // do not scale size over time + LEF_TUMBLE = 0x0002, // tumble over time, used for ejecting shells + LEF_FADE_RGB = 0x0004, // explicitly fade + LEF_NO_RANDOM_ROTATE= 0x0008 // MakeExplosion adds random rotate which could be bad in some cases +} leFlag_t; + +typedef enum { + LEMT_NONE, + LEMT_BURN, + LEMT_BLOOD +} leMarkType_t; // fragment local entities can leave marks on walls + +typedef enum { + LEBS_NONE, + LEBS_BLOOD, + LEBS_BRASS +} leBounceSoundType_t; // fragment local entities can make sounds on impacts + +typedef struct localEntity_s { + struct localEntity_s *prev, *next; + leType_t leType; + int leFlags; + + int startTime; + int endTime; + int fadeInTime; + + float lifeRate; // 1.0 / (endTime - startTime) + + trajectory_t pos; + trajectory_t angles; + + float bounceFactor; // 0.0 = no bounce, 1.0 = perfect + int bounceSound; // optional sound index to play upon bounce + + float alpha; + float dalpha; + + int forceAlpha; + + float color[4]; + + float radius; + + float light; + vec3_t lightColor; + + leMarkType_t leMarkType; // mark to leave on fragment impact + leBounceSoundType_t leBounceSoundType; + + union { + struct { + float radius; + float dradius; + vec3_t startRGB; + vec3_t dRGB; + } sprite; + struct { + float width; + float dwidth; + float length; + float dlength; + vec3_t startRGB; + vec3_t dRGB; + } trail; + struct { + float width; + float dwidth; + // Below are bezier specific. + vec3_t control1; // initial position of control points + vec3_t control2; + vec3_t control1_velocity; // initial velocity of control points + vec3_t control2_velocity; + vec3_t control1_acceleration; // constant acceleration of control points + vec3_t control2_acceleration; + } line; + struct { + float width; + float dwidth; + float width2; + float dwidth2; + vec3_t startRGB; + vec3_t dRGB; + } line2; + struct { + float width; + float dwidth; + float width2; + float dwidth2; + float height; + float dheight; + } cylinder; + struct { + float width; + float dwidth; + } electricity; + struct + { + // fight the power! open and close brackets in the same column! + float radius; + float dradius; + qboolean (*thinkFn)(struct localEntity_s *le); + vec3_t dir; // magnitude is 1, but this is oldpos - newpos right before the + //particle is sent to the renderer + // may want to add something like particle::localEntity_s *le (for the particle's think fn) + } particle; + struct + { + qboolean dontDie; + vec3_t dir; + float variance; + int delay; + int nextthink; + qboolean (*thinkFn)(struct localEntity_s *le); + int data1; + int data2; + } spawner; + struct + { + float radius; + } fragment; + } data; + + refEntity_t refEntity; +} localEntity_t; + +//====================================================================== + + +typedef struct { + int client; + int score; + int ping; + int time; + int scoreFlags; + int powerUps; + int accuracy; + int impressiveCount; + int excellentCount; + int guantletCount; + int defendCount; + int assistCount; + int captures; + qboolean perfect; + int team; +} score_t; + +// each client has an associated clientInfo_t +// that contains media references necessary to present the +// client model and other color coded effects +// this is regenerated each time a client's configstring changes, +// usually as a result of a userinfo (name, model, etc) change +#define MAX_CUSTOM_SOUNDS 32 + +typedef struct +{ + // Actual trail stuff + int inAction; // controls whether should we even consider starting one + int duration; // how long each trail seg stays in existence + int lastTime; // time a saber segement was last stored + vec3_t base; + vec3_t tip; + + vec3_t dualbase; + vec3_t dualtip; + + // Marks stuff + qboolean haveOldPos[2]; + vec3_t oldPos[2]; + vec3_t oldNormal[2]; // store this in case we don't have a connect-the-dots situation + // ..then we'll need the normal to project a mark blob onto the impact point +} saberTrail_t; + +typedef struct { + qboolean infoValid; + + char name[MAX_QPATH]; + team_t team; + + int botSkill; // 0 = not bot, 1-5 = bot + + int frame; + + vec3_t color1; + vec3_t color2; + + int icolor1; + + int score; // updated by score servercmds + int location; // location index for team mode + int health; // you only get this info about your teammates + int armor; + int curWeapon; + + int handicap; + int wins, losses; // in tourney mode + + int teamTask; // task in teamplay (offence/defence) + qboolean teamLeader; // true when this is a team leader + + int powerups; // so can display quad/flag status + + int medkitUsageTime; + + int breathPuffTime; + + // when clientinfo is changed, the loading of models/skins/sounds + // can be deferred until you are dead, to prevent hitches in + // gameplay + char modelName[MAX_QPATH]; + char skinName[MAX_QPATH]; +// char headModelName[MAX_QPATH]; +// char headSkinName[MAX_QPATH]; + char forcePowers[MAX_QPATH]; + char redTeam[MAX_TEAMNAME]; + char blueTeam[MAX_TEAMNAME]; + + char teamName[MAX_TEAMNAME]; + + qboolean deferred; + + qboolean newAnims; // true if using the new mission pack animations + qboolean fixedlegs; // true if legs yaw is always the same as torso yaw + qboolean fixedtorso; // true if torso never changes yaw + + vec3_t headOffset; // move head in icon views + footstep_t footsteps; + gender_t gender; // from model + + qhandle_t legsModel; + qhandle_t legsSkin; + + qhandle_t torsoModel; + qhandle_t torsoSkin; + + //qhandle_t headModel; + //qhandle_t headSkin; + + qboolean ATST; + + void *ghoul2Model; + + qhandle_t modelIcon; + + qhandle_t bolt_rhand; + qhandle_t bolt_lhand; + + qhandle_t bolt_head; + + qhandle_t bolt_motion; + + qhandle_t bolt_llumbar; + + saberTrail_t saberTrail; + int saberHitWallSoundDebounceTime; + + sfxHandle_t sounds[MAX_CUSTOM_SOUNDS]; + + int legsAnim; + int torsoAnim; +} clientInfo_t; + + +// each WP_* weapon enum has an associated weaponInfo_t +// that contains media references necessary to present the +// weapon and its effects +typedef struct weaponInfo_s { + qboolean registered; + gitem_t *item; + + qhandle_t handsModel; // the hands don't actually draw, they just position the weapon + qhandle_t weaponModel; // this is the pickup model + qhandle_t viewModel; // this is the in-view model used by the player + qhandle_t barrelModel; + qhandle_t flashModel; + + vec3_t weaponMidpoint; // so it will rotate centered instead of by tag + + float flashDlight; + vec3_t flashDlightColor; + + qhandle_t weaponIcon; + qhandle_t ammoIcon; + + qhandle_t ammoModel; + + sfxHandle_t flashSound[4]; // fast firing weapons randomly choose + sfxHandle_t firingSound; + sfxHandle_t chargeSound; + fxHandle_t muzzleEffect; + qhandle_t missileModel; + sfxHandle_t missileSound; + void (*missileTrailFunc)( centity_t *, const struct weaponInfo_s *wi ); + float missileDlight; + vec3_t missileDlightColor; + int missileRenderfx; + sfxHandle_t missileHitSound; + + sfxHandle_t altFlashSound[4]; + sfxHandle_t altFiringSound; + sfxHandle_t altChargeSound; + fxHandle_t altMuzzleEffect; + qhandle_t altMissileModel; + sfxHandle_t altMissileSound; + void (*altMissileTrailFunc)( centity_t *, const struct weaponInfo_s *wi ); + float altMissileDlight; + vec3_t altMissileDlightColor; + int altMissileRenderfx; + sfxHandle_t altMissileHitSound; + + sfxHandle_t readySound; + float trailRadius; + float wiTrailTime; + +} weaponInfo_t; + + +// each IT_* item has an associated itemInfo_t +// that constains media references necessary to present the +// item and its effects +typedef struct { + qboolean registered; + qhandle_t models[MAX_ITEM_MODELS]; + qhandle_t icon; +/* +Ghoul2 Insert Start +*/ + void *g2Models[MAX_ITEM_MODELS]; + float radius[MAX_ITEM_MODELS]; +/* +Ghoul2 Insert End +*/ +} itemInfo_t; + + +typedef struct { + int itemNum; +} powerupInfo_t; + + +#define MAX_SKULLTRAIL 10 + +typedef struct { + vec3_t positions[MAX_SKULLTRAIL]; + int numpositions; +} skulltrail_t; + + +#define MAX_REWARDSTACK 10 +#define MAX_SOUNDBUFFER 20 + +//====================================================================== + +// all cg.stepTime, cg.duckTime, cg.landTime, etc are set to cg.time when the action +// occurs, and they will have visible effects for #define STEP_TIME or whatever msec after + +#define MAX_PREDICTED_EVENTS 16 + +typedef struct { + int clientFrame; // incremented each frame + + int clientNum; + + qboolean demoPlayback; + qboolean levelShot; // taking a level menu screenshot + int deferredPlayerLoading; + qboolean loading; // don't defer players at initial startup + qboolean intermissionStarted; // don't play voice rewards, because game will end shortly + + // there are only one or two snapshot_t that are relevent at a time + int latestSnapshotNum; // the number of snapshots the client system has received + int latestSnapshotTime; // the time from latestSnapshotNum, so we don't need to read the snapshot yet + + snapshot_t *snap; // cg.snap->serverTime <= cg.time + snapshot_t *nextSnap; // cg.nextSnap->serverTime > cg.time, or NULL +// snapshot_t activeSnapshots[2]; + + float frameInterpolation; // (float)( cg.time - cg.frame->serverTime ) / (cg.nextFrame->serverTime - cg.frame->serverTime) + + qboolean mMapChange; + + qboolean thisFrameTeleport; + qboolean nextFrameTeleport; + + int frametime; // cg.time - cg.oldTime + + int time; // this is the time value that the client + // is rendering at. + int oldTime; // time at last frame, used for missile trails and prediction checking + + int physicsTime; // either cg.snap->time or cg.nextSnap->time + + int timelimitWarnings; // 5 min, 1 min, overtime + int fraglimitWarnings; + + qboolean mapRestart; // set on a map restart to set back the weapon + + qboolean renderingThirdPerson; // during deaths, chasecams, etc + + // prediction state + qboolean hyperspace; // true if prediction has hit a trigger_teleport + playerState_t predictedPlayerState; + centity_t predictedPlayerEntity; + qboolean validPPS; // clear until the first call to CG_PredictPlayerState + int predictedErrorTime; + vec3_t predictedError; + + int eventSequence; + int predictableEvents[MAX_PREDICTED_EVENTS]; + + float stepChange; // for stair up smoothing + int stepTime; + + float duckChange; // for duck viewheight smoothing + int duckTime; + + float landChange; // for landing hard + int landTime; + + // input state sent to server + int weaponSelect; + + int forceSelect; + int itemSelect; + + // auto rotating items + vec3_t autoAngles; + vec3_t autoAxis[3]; + vec3_t autoAnglesFast; + vec3_t autoAxisFast[3]; + + // view rendering + refdef_t refdef; + vec3_t refdefViewAngles; // will be converted to refdef.viewaxis + + float constrictValue; + float constrict; + int doConstrict; + + // zoom key + qboolean zoomed; + int zoomTime; + float zoomSensitivity; + + // information screen text during loading + char infoScreenText[MAX_STRING_CHARS]; + + // scoreboard + int scoresRequestTime; + int numScores; + int selectedScore; + int teamScores[2]; + score_t scores[MAX_CLIENTS]; + qboolean showScores; + qboolean scoreBoardShowing; + int scoreFadeTime; + char killerName[MAX_NAME_LENGTH]; + char spectatorList[MAX_STRING_CHARS]; // list of names + int spectatorLen; // length of list + float spectatorWidth; // width in device units + int spectatorTime; // next time to offset + int spectatorPaintX; // current paint x + int spectatorPaintX2; // current paint x + int spectatorOffset; // current offset from start + int spectatorPaintLen; // current offset from start + + // skull trails + skulltrail_t skulltrails[MAX_CLIENTS]; + + // centerprinting + int centerPrintTime; + int centerPrintCharWidth; + int centerPrintY; + char centerPrint[1024]; + int centerPrintLines; + + // low ammo warning state + int lowAmmoWarning; // 1 = low, 2 = empty + + // kill timers for carnage reward + int lastKillTime; + + // crosshair client ID + int crosshairClientNum; + int crosshairClientTime; + + // powerup active flashing + int powerupActive; + int powerupTime; + + // attacking player + int attackerTime; + int voiceTime; + + // reward medals + int rewardStack; + int rewardTime; + int rewardCount[MAX_REWARDSTACK]; + qhandle_t rewardShader[MAX_REWARDSTACK]; + qhandle_t rewardSound[MAX_REWARDSTACK]; + + // sound buffer mainly for announcer sounds + int soundBufferIn; + int soundBufferOut; + int soundTime; + qhandle_t soundBuffer[MAX_SOUNDBUFFER]; + + // for voice chat buffer + int voiceChatTime; + int voiceChatBufferIn; + int voiceChatBufferOut; + + // warmup countdown + int warmup; + int warmupCount; + + //========================== + + int itemPickup; + int itemPickupTime; + int itemPickupBlendTime; // the pulse around the crosshair is timed seperately + + int weaponSelectTime; + int weaponAnimation; + int weaponAnimationTime; + + // blend blobs + float damageTime; + float damageX, damageY, damageValue; + + // status bar head + float headYaw; + float headEndPitch; + float headEndYaw; + int headEndTime; + float headStartPitch; + float headStartYaw; + int headStartTime; + + // view movement + float v_dmg_time; + float v_dmg_pitch; + float v_dmg_roll; + + vec3_t kick_angles; // weapon kicks + vec3_t kick_origin; + + // temp working variables for player view + float bobfracsin; + int bobcycle; + float xyspeed; + int nextOrbitTime; + + //qboolean cameraMode; // if rendering from a loaded camera + int loadLCARSStage; + + + // development tool + refEntity_t testModelEntity; + char testModelName[MAX_QPATH]; + qboolean testGun; + + // HUD stuff + float HUDTickFlashTime; + qboolean HUDArmorFlag; + qboolean HUDHealthFlag; + qboolean iconHUDActive; + float iconHUDPercent; + float iconSelectTime; + float invenSelectTime; + float forceSelectTime; + + vec3_t lastFPFlashPoint; + +/* +Ghoul2 Insert Start +*/ + int testModel; + // had to be moved so we wouldn't wipe these out with the memset - these have STL in them and shouldn't be cleared that way + snapshot_t activeSnapshots[2]; +/* +Ghoul2 Insert End +*/ + + char sharedBuffer[MAX_CG_SHARED_BUFFER_SIZE]; +} cg_t; + +#define MAX_TICS 14 + +typedef struct forceTicPos_s +{ + int x; + int y; + int width; + int height; + char *file; + qhandle_t tic; +} forceTicPos_t; +extern forceTicPos_t forceTicPos[]; +extern forceTicPos_t ammoTicPos[]; + +typedef struct cgscreffects_s +{ + float FOV; + float FOV2; + + float shake_intensity; + int shake_duration; + int shake_start; + + float music_volume_multiplier; + int music_volume_time; + qboolean music_volume_set; +} cgscreffects_t; + +extern cgscreffects_t cgScreenEffects; + +void CGCam_Shake( float intensity, int duration ); +void CGCam_SetMusicMult( float multiplier, int duration ); + +// all of the model, shader, and sound references that are +// loaded at gamestate time are stored in cgMedia_t +// Other media that can be tied to clients, weapons, or items are +// stored in the clientInfo_t, itemInfo_t, weaponInfo_t, and powerupInfo_t +typedef struct { + qhandle_t charsetShader; + qhandle_t whiteShader; + + qhandle_t loadBarLED; + qhandle_t loadBarLEDCap; + qhandle_t loadBarLEDSurround; + + qhandle_t bryarFrontFlash; + qhandle_t greenFrontFlash; + qhandle_t lightningFlash; + + qhandle_t itemHoloModel; + qhandle_t redFlagModel; + qhandle_t blueFlagModel; + qhandle_t neutralFlagModel; + qhandle_t flagShader[4]; + + qhandle_t flagPoleModel; + qhandle_t flagFlapModel; + + qhandle_t redFlagFlapSkin; + qhandle_t blueFlagFlapSkin; + qhandle_t neutralFlagFlapSkin; + + qhandle_t redFlagBaseModel; + qhandle_t blueFlagBaseModel; + qhandle_t neutralFlagBaseModel; + + qhandle_t armorModel; + qhandle_t armorIcon; + + qhandle_t teamStatusBar; + + qhandle_t deferShader; + + qhandle_t lightningShader; + + qhandle_t redSaberGlowShader; + qhandle_t redSaberCoreShader; + qhandle_t orangeSaberGlowShader; + qhandle_t orangeSaberCoreShader; + qhandle_t yellowSaberGlowShader; + qhandle_t yellowSaberCoreShader; + qhandle_t greenSaberGlowShader; + qhandle_t greenSaberCoreShader; + qhandle_t blueSaberGlowShader; + qhandle_t blueSaberCoreShader; + qhandle_t purpleSaberGlowShader; + qhandle_t purpleSaberCoreShader; + qhandle_t saberBlurShader; + + qhandle_t yellowDroppedSaberShader; + + qhandle_t rivetMarkShader; + + qhandle_t teamRedShader; + qhandle_t teamBlueShader; + + qhandle_t balloonShader; + qhandle_t connectionShader; + + qhandle_t viewBloodShader; + qhandle_t tracerShader; + qhandle_t crosshairShader[NUM_CROSSHAIRS]; + qhandle_t lagometerShader; + qhandle_t backTileShader; + qhandle_t noammoShader; + + qhandle_t smokePuffShader; + qhandle_t waterBubbleShader; + qhandle_t bloodTrailShader; + + qhandle_t numberShaders[11]; + qhandle_t smallnumberShaders[11]; + qhandle_t chunkyNumberShaders[11]; + + qhandle_t electricBodyShader; + qhandle_t electricBody2Shader; + + qhandle_t shadowMarkShader; + + //glass shard shader + qhandle_t glassShardShader; + + // wall mark shaders + qhandle_t wakeMarkShader; + qhandle_t bloodMarkShader; + qhandle_t bulletMarkShader; + qhandle_t burnMarkShader; + qhandle_t holeMarkShader; + qhandle_t energyMarkShader; + + // Pain view shader + qhandle_t viewPainShader; + qhandle_t viewPainShader_Shields; + qhandle_t viewPainShader_ShieldsAndHealth; + + // powerup shaders + qhandle_t quadShader; + qhandle_t redQuadShader; + qhandle_t quadWeaponShader; + qhandle_t invisShader; + qhandle_t regenShader; + qhandle_t battleSuitShader; + qhandle_t battleWeaponShader; + qhandle_t hastePuffShader; + + qhandle_t itemRespawningPlaceholder; + qhandle_t itemRespawningRezOut; + + qhandle_t playerShieldDamage; + qhandle_t forceSightBubble; + qhandle_t forceShell; + qhandle_t sightShell; + + // Disruptor zoom graphics + qhandle_t disruptorMask; + qhandle_t disruptorInsert; + qhandle_t disruptorLight; + qhandle_t disruptorInsertTick; + qhandle_t disruptorChargeShader; + + // Binocular graphics + qhandle_t binocularCircle; + qhandle_t binocularMask; + qhandle_t binocularArrow; + qhandle_t binocularTri; + qhandle_t binocularStatic; + qhandle_t binocularOverlay; + + // weapon effect models + qhandle_t lightningExplosionModel; + + // explosion assets + qhandle_t explosionModel; + qhandle_t surfaceExplosionShader; + + qhandle_t disruptorShader; + + qhandle_t solidWhite; + + qhandle_t heartShader; + + // All the player shells + qhandle_t ysaliredShader; + qhandle_t ysaliblueShader; + qhandle_t ysalimariShader; + qhandle_t boonShader; + qhandle_t endarkenmentShader; + qhandle_t enlightenmentShader; + qhandle_t invulnerabilityShader; + +#ifdef JK2AWARDS + // medals shown during gameplay + qhandle_t medalImpressive; + qhandle_t medalExcellent; + qhandle_t medalGauntlet; + qhandle_t medalDefend; + qhandle_t medalAssist; + qhandle_t medalCapture; +#endif + + // sounds + sfxHandle_t selectSound; + sfxHandle_t footsteps[FOOTSTEP_TOTAL][4]; + + sfxHandle_t winnerSound; + sfxHandle_t loserSound; + + sfxHandle_t crackleSound; + + sfxHandle_t grenadeBounce1; + sfxHandle_t grenadeBounce2; + + sfxHandle_t teamHealSound; + sfxHandle_t teamRegenSound; + + sfxHandle_t teleInSound; + sfxHandle_t teleOutSound; + sfxHandle_t respawnSound; + sfxHandle_t talkSound; + sfxHandle_t landSound; + sfxHandle_t fallSound; + + sfxHandle_t oneMinuteSound; + sfxHandle_t fiveMinuteSound; + + sfxHandle_t threeFragSound; + sfxHandle_t twoFragSound; + sfxHandle_t oneFragSound; + +#ifdef JK2AWARDS + sfxHandle_t impressiveSound; + sfxHandle_t excellentSound; + sfxHandle_t deniedSound; + sfxHandle_t humiliationSound; + sfxHandle_t defendSound; +#endif + + sfxHandle_t takenLeadSound; + sfxHandle_t tiedLeadSound; + sfxHandle_t lostLeadSound; + + sfxHandle_t rollSound; + + sfxHandle_t watrInSound; + sfxHandle_t watrOutSound; + sfxHandle_t watrUnSound; + + sfxHandle_t deploySeeker; + sfxHandle_t medkitSound; + + // teamplay sounds +#ifdef JK2AWARDS + sfxHandle_t captureAwardSound; +#endif + sfxHandle_t redScoredSound; + sfxHandle_t blueScoredSound; + sfxHandle_t redLeadsSound; + sfxHandle_t blueLeadsSound; + sfxHandle_t teamsTiedSound; + + sfxHandle_t redFlagReturnedSound; + sfxHandle_t blueFlagReturnedSound; + sfxHandle_t redTookFlagSound; + sfxHandle_t blueTookFlagSound; + + sfxHandle_t redYsalReturnedSound; + sfxHandle_t blueYsalReturnedSound; + sfxHandle_t redTookYsalSound; + sfxHandle_t blueTookYsalSound; + + sfxHandle_t drainSound; + + //music blips + sfxHandle_t happyMusic; + sfxHandle_t dramaticFailure; + + // tournament sounds + sfxHandle_t count3Sound; + sfxHandle_t count2Sound; + sfxHandle_t count1Sound; + sfxHandle_t countFightSound; + + // new stuff + qhandle_t patrolShader; + qhandle_t assaultShader; + qhandle_t campShader; + qhandle_t followShader; + qhandle_t defendShader; + qhandle_t teamLeaderShader; + qhandle_t retrieveShader; + qhandle_t escortShader; + qhandle_t flagShaders[3]; + + qhandle_t halfShieldModel; + qhandle_t halfShieldShader; + + qhandle_t demp2Shell; + qhandle_t demp2ShellShader; + + qhandle_t cursor; + qhandle_t selectCursor; + qhandle_t sizeCursor; + + //weapon icons + qhandle_t weaponIcons[WP_NUM_WEAPONS]; + qhandle_t weaponIcons_NA[WP_NUM_WEAPONS]; + + //holdable inventory item icons + qhandle_t invenIcons[HI_NUM_HOLDABLE]; + + //force power icons + qhandle_t forcePowerIcons[NUM_FORCE_POWERS]; + + qhandle_t rageRecShader; + + //other HUD parts + qhandle_t HUDLeftFrame; + qhandle_t HUDArmor1; + qhandle_t HUDArmor2; + qhandle_t HUDHealth; + qhandle_t HUDHealthTic; + qhandle_t HUDArmorTic; + qhandle_t HUDLeftStatic; + qhandle_t HUDLeft; + + qhandle_t HUDSaberStyle1; + qhandle_t HUDSaberStyle2; + qhandle_t HUDSaberStyle3; + + qhandle_t HUDRightFrame; + qhandle_t HUDInnerRight; + + int currentBackground; + qhandle_t weaponIconBackground; + qhandle_t weaponProngsOff; + qhandle_t weaponProngsOn; + qhandle_t forceIconBackground; + qhandle_t forceProngsOn; + qhandle_t inventoryIconBackground; + qhandle_t inventoryProngsOn; + + qhandle_t HUDInnerLeft; + + sfxHandle_t holocronPickup; + + // Zoom + sfxHandle_t zoomStart; + sfxHandle_t zoomLoop; + sfxHandle_t zoomEnd; + sfxHandle_t disruptorZoomLoop; + +} cgMedia_t; + + +// Stored FX handles +//-------------------- +typedef struct +{ + // BRYAR PISTOL + fxHandle_t bryarShotEffect; + fxHandle_t bryarPowerupShotEffect; + fxHandle_t bryarWallImpactEffect; + fxHandle_t bryarWallImpactEffect2; + fxHandle_t bryarWallImpactEffect3; + fxHandle_t bryarFleshImpactEffect; + fxHandle_t bryarDroidImpactEffect; + + // BLASTER + fxHandle_t blasterShotEffect; + fxHandle_t blasterWallImpactEffect; + fxHandle_t blasterFleshImpactEffect; + fxHandle_t blasterDroidImpactEffect; + + // DISRUPTOR + fxHandle_t disruptorRingsEffect; + fxHandle_t disruptorProjectileEffect; + fxHandle_t disruptorWallImpactEffect; + fxHandle_t disruptorFleshImpactEffect; + fxHandle_t disruptorAltMissEffect; + fxHandle_t disruptorAltHitEffect; + + // BOWCASTER + fxHandle_t bowcasterShotEffect; + fxHandle_t bowcasterImpactEffect; + + // REPEATER + fxHandle_t repeaterProjectileEffect; + fxHandle_t repeaterAltProjectileEffect; + fxHandle_t repeaterWallImpactEffect; + fxHandle_t repeaterFleshImpactEffect; + fxHandle_t repeaterAltWallImpactEffect; + + // DEMP2 + fxHandle_t demp2ProjectileEffect; + fxHandle_t demp2WallImpactEffect; + fxHandle_t demp2FleshImpactEffect; + + // FLECHETTE + fxHandle_t flechetteShotEffect; + fxHandle_t flechetteAltShotEffect; + fxHandle_t flechetteWallImpactEffect; + fxHandle_t flechetteFleshImpactEffect; + + // ROCKET + fxHandle_t rocketShotEffect; + fxHandle_t rocketExplosionEffect; + + // THERMAL + fxHandle_t thermalExplosionEffect; + fxHandle_t thermalShockwaveEffect; + + // TRIPMINE + fxHandle_t tripmineLaserFX; + + //FORCE + fxHandle_t forceLightning; + fxHandle_t forceLightningWide; + + fxHandle_t forceDrain; + fxHandle_t forceDrainWide; + fxHandle_t forceDrained; + + //TURRET + fxHandle_t turretShotEffect; + +} cgEffects_t; + + +// The client game static (cgs) structure hold everything +// loaded or calculated from the gamestate. It will NOT +// be cleared when a tournement restart is done, allowing +// all clients to begin playing instantly +typedef struct { + gameState_t gameState; // gamestate from server + glconfig_t glconfig; // rendering configuration + float screenXScale; // derived from glconfig + float screenYScale; + float screenXBias; + + int serverCommandSequence; // reliable command stream counter + int processedSnapshotNum;// the number of snapshots cgame has requested + + qboolean localServer; // detected on startup by checking sv_running + + // parsed from serverinfo + gametype_t gametype; + int dmflags; + int teamflags; + int fraglimit; + int duel_fraglimit; + int capturelimit; + int timelimit; + int maxclients; + qboolean needpass; + qboolean jediVmerc; + int wDisable; + int fDisable; + + char mapname[MAX_QPATH]; + char redTeam[MAX_QPATH]; + char blueTeam[MAX_QPATH]; + + int voteTime; + int voteYes; + int voteNo; + qboolean voteModified; // beep whenever changed + char voteString[MAX_STRING_TOKENS]; + + int teamVoteTime[2]; + int teamVoteYes[2]; + int teamVoteNo[2]; + qboolean teamVoteModified[2]; // beep whenever changed + char teamVoteString[2][MAX_STRING_TOKENS]; + + int levelStartTime; + + int scores1, scores2; // from configstrings + int jediMaster; + int duelWinner; + int duelist1; + int duelist2; + int redflag, blueflag; // flag status from configstrings + int flagStatus; + + qboolean newHud; + + // + // locally derived information from gamestate + // + qhandle_t gameModels[MAX_MODELS]; + sfxHandle_t gameSounds[MAX_SOUNDS]; + fxHandle_t gameEffects[MAX_FX]; +/* +Ghoul2 Insert Start +*/ + qhandle_t skins[MAX_CHARSKINS]; + +/* +Ghoul2 Insert End +*/ + int numInlineModels; + qhandle_t inlineDrawModel[MAX_MODELS]; + vec3_t inlineModelMidpoints[MAX_MODELS]; + + clientInfo_t clientinfo[MAX_CLIENTS]; + + // teamchat width is *3 because of embedded color codes + char teamChatMsgs[TEAMCHAT_HEIGHT][TEAMCHAT_WIDTH*3+1]; + int teamChatMsgTimes[TEAMCHAT_HEIGHT]; + int teamChatPos; + int teamLastChatPos; + + int cursorX; + int cursorY; + qboolean eventHandling; + qboolean mouseCaptured; + qboolean sizingHud; + void *capturedItem; + qhandle_t activeCursor; + + // orders + int currentOrder; + qboolean orderPending; + int orderTime; + int currentVoiceClient; + int acceptOrderTime; + int acceptTask; + int acceptLeader; + char acceptVoice[MAX_NAME_LENGTH]; + + // media + cgMedia_t media; + + // effects + cgEffects_t effects; + +} cgs_t; + +//============================================================================== + +extern cgs_t cgs; +extern cg_t cg; +extern centity_t cg_entities[MAX_GENTITIES]; +extern weaponInfo_t cg_weapons[MAX_WEAPONS]; +extern itemInfo_t cg_items[MAX_ITEMS]; +extern markPoly_t cg_markPolys[MAX_MARK_POLYS]; + +extern vmCvar_t cg_centertime; +extern vmCvar_t cg_runpitch; +extern vmCvar_t cg_runroll; +extern vmCvar_t cg_bobup; +extern vmCvar_t cg_bobpitch; +extern vmCvar_t cg_bobroll; +//extern vmCvar_t cg_swingSpeed; +extern vmCvar_t cg_shadows; +extern vmCvar_t cg_drawTimer; +extern vmCvar_t cg_drawFPS; +extern vmCvar_t cg_drawSnapshot; +extern vmCvar_t cg_draw3dIcons; +extern vmCvar_t cg_drawIcons; +extern vmCvar_t cg_drawAmmoWarning; +extern vmCvar_t cg_drawCrosshair; +extern vmCvar_t cg_drawCrosshairNames; +extern vmCvar_t cg_drawScores; +extern vmCvar_t cg_dynamicCrosshair; +extern vmCvar_t cg_drawRewards; +extern vmCvar_t cg_drawTeamOverlay; +extern vmCvar_t cg_teamOverlayUserinfo; +extern vmCvar_t cg_crosshairX; +extern vmCvar_t cg_crosshairY; +extern vmCvar_t cg_crosshairSize; +extern vmCvar_t cg_crosshairHealth; +extern vmCvar_t cg_drawStatus; +extern vmCvar_t cg_draw2D; +extern vmCvar_t cg_animSpeed; +extern vmCvar_t cg_debugAnim; +extern vmCvar_t cg_debugPosition; +extern vmCvar_t cg_debugEvents; +extern vmCvar_t cg_errorDecay; +extern vmCvar_t cg_nopredict; +extern vmCvar_t cg_noPlayerAnims; +extern vmCvar_t cg_showmiss; +extern vmCvar_t cg_footsteps; +extern vmCvar_t cg_addMarks; +extern vmCvar_t cg_gun_frame; +extern vmCvar_t cg_gun_x; +extern vmCvar_t cg_gun_y; +extern vmCvar_t cg_gun_z; +extern vmCvar_t cg_drawGun; +extern vmCvar_t cg_viewsize; +extern vmCvar_t cg_tracerChance; +extern vmCvar_t cg_tracerWidth; +extern vmCvar_t cg_tracerLength; +extern vmCvar_t cg_autoswitch; +extern vmCvar_t cg_ignore; +extern vmCvar_t cg_simpleItems; +extern vmCvar_t cg_fov; +extern vmCvar_t cg_zoomFov; + +extern vmCvar_t cg_swingAngles; + +extern vmCvar_t cg_oldPainSounds; + +#ifdef G2_COLLISION_ENABLED +extern vmCvar_t cg_saberModelTraceEffect; +#endif + +extern vmCvar_t cg_fpls; + +extern vmCvar_t cg_saberDynamicMarks; +extern vmCvar_t cg_saberDynamicMarkTime; + +extern vmCvar_t cg_saberContact; +extern vmCvar_t cg_saberTrail; + +extern vmCvar_t cg_duelHeadAngles; + +extern vmCvar_t cg_speedTrail; +extern vmCvar_t cg_auraShell; + +extern vmCvar_t cg_animBlend; + +extern vmCvar_t cg_dismember; + +extern vmCvar_t cg_thirdPerson; +extern vmCvar_t cg_thirdPersonRange; +extern vmCvar_t cg_thirdPersonAngle; +extern vmCvar_t cg_thirdPersonPitchOffset; +extern vmCvar_t cg_thirdPersonVertOffset; +extern vmCvar_t cg_thirdPersonCameraDamp; +extern vmCvar_t cg_thirdPersonTargetDamp; + +extern vmCvar_t cg_thirdPersonAlpha; +extern vmCvar_t cg_thirdPersonHorzOffset; + +extern vmCvar_t cg_stereoSeparation; +extern vmCvar_t cg_lagometer; +extern vmCvar_t cg_drawEnemyInfo; +extern vmCvar_t cg_synchronousClients; +extern vmCvar_t cg_teamChatTime; +extern vmCvar_t cg_teamChatHeight; +extern vmCvar_t cg_stats; +extern vmCvar_t cg_forceModel; +extern vmCvar_t cg_buildScript; +extern vmCvar_t cg_paused; +extern vmCvar_t cg_blood; +extern vmCvar_t cg_predictItems; +extern vmCvar_t cg_deferPlayers; +extern vmCvar_t cg_drawFriend; +extern vmCvar_t cg_teamChatsOnly; +extern vmCvar_t cg_noVoiceChats; +extern vmCvar_t cg_noVoiceText; +extern vmCvar_t cg_scorePlum; +extern vmCvar_t cg_hudFiles; +extern vmCvar_t cg_smoothClients; +extern vmCvar_t pmove_fixed; +extern vmCvar_t pmove_msec; +//extern vmCvar_t cg_pmove_fixed; +extern vmCvar_t cg_cameraOrbit; +extern vmCvar_t cg_cameraOrbitDelay; +extern vmCvar_t cg_timescaleFadeEnd; +extern vmCvar_t cg_timescaleFadeSpeed; +extern vmCvar_t cg_timescale; +extern vmCvar_t cg_cameraMode; +extern vmCvar_t cg_smallFont; +extern vmCvar_t cg_bigFont; +extern vmCvar_t cg_noTaunt; +extern vmCvar_t cg_noProjectileTrail; +extern vmCvar_t cg_trueLightning; + +extern vmCvar_t cg_redTeamName; +extern vmCvar_t cg_blueTeamName; +extern vmCvar_t cg_currentSelectedPlayer; +extern vmCvar_t cg_currentSelectedPlayerName; +extern vmCvar_t cg_singlePlayer; +extern vmCvar_t cg_enableDust; +extern vmCvar_t cg_enableBreath; +extern vmCvar_t cg_singlePlayerActive; +extern vmCvar_t cg_recordSPDemo; +extern vmCvar_t cg_recordSPDemoName; + +extern vmCvar_t ui_myteam; +/* +Ghoul2 Insert Start +*/ + +extern vmCvar_t cg_debugBB; + +/* +Ghoul2 Insert End +*/ + +// +// cg_main.c +// +const char *CG_ConfigString( int index ); +const char *CG_Argv( int arg ); + +void QDECL CG_Printf( const char *msg, ... ); +void QDECL CG_Error( const char *msg, ... ); + +void CG_StartMusic( qboolean bForceStart ); + +void CG_UpdateCvars( void ); + +int CG_CrosshairPlayer( void ); +int CG_LastAttacker( void ); +void CG_LoadMenus(const char *menuFile); +void CG_KeyEvent(int key, qboolean down); +void CG_MouseEvent(int x, int y); +void CG_EventHandling(int type); +void CG_RankRunFrame( void ); +void CG_SetScoreSelection(void *menu); +void CG_BuildSpectatorString(void); +void CG_NextInventory_f(void); +void CG_PrevInventory_f(void); +void CG_NextForcePower_f(void); +void CG_PrevForcePower_f(void); + +// +// cg_view.c +// +void CG_TestModel_f (void); +void CG_TestGun_f (void); +void CG_TestModelNextFrame_f (void); +void CG_TestModelPrevFrame_f (void); +void CG_TestModelNextSkin_f (void); +void CG_TestModelPrevSkin_f (void); +void CG_ZoomDown_f( void ); +void CG_ZoomUp_f( void ); +void CG_AddBufferedSound( sfxHandle_t sfx); + +void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ); +/* +Ghoul2 Insert Start +*/ + +void CG_TestG2Model_f (void); +void CG_TestModelSurfaceOnOff_f(void); +void CG_ListModelSurfaces_f (void); +void CG_ListModelBones_f (void); +void CG_TestModelSetAnglespre_f(void); +void CG_TestModelSetAnglespost_f(void); +void CG_TestModelAnimate_f(void); +/* +Ghoul2 Insert End +*/ + +// +// cg_drawtools.c +// +void CG_FillRect( float x, float y, float width, float height, const float *color ); +void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader ); +void CG_DrawRotatePic( float x, float y, float width, float height,float angle, qhandle_t hShader ); +void CG_DrawRotatePic2( float x, float y, float width, float height,float angle, qhandle_t hShader ); +void CG_DrawString( float x, float y, const char *string, + float charWidth, float charHeight, const float *modulate ); + +void CG_DrawNumField (int x, int y, int width, int value,int charWidth,int charHeight,int style,qboolean zeroFill); + +void CG_DrawStringExt( int x, int y, const char *string, const float *setColor, + qboolean forceColor, qboolean shadow, int charWidth, int charHeight, int maxChars ); +void CG_DrawBigString( int x, int y, const char *s, float alpha ); +void CG_DrawBigStringColor( int x, int y, const char *s, vec4_t color ); +void CG_DrawSmallString( int x, int y, const char *s, float alpha ); +void CG_DrawSmallStringColor( int x, int y, const char *s, vec4_t color ); + +int CG_DrawStrlen( const char *str ); + +float *CG_FadeColor( int startMsec, int totalMsec ); +float *CG_TeamColor( int team ); +void CG_TileClear( void ); +void CG_ColorForHealth( vec4_t hcolor ); +void CG_GetColorForHealth( int health, int armor, vec4_t hcolor ); + +void UI_DrawProportionalString( int x, int y, const char* str, int style, vec4_t color ); +void UI_DrawScaledProportionalString( int x, int y, const char* str, int style, vec4_t color, float scale); +void CG_DrawRect( float x, float y, float width, float height, float size, const float *color ); +void CG_DrawSides(float x, float y, float w, float h, float size); +void CG_DrawTopBottom(float x, float y, float w, float h, float size); + +// +// cg_draw.c, cg_newDraw.c +// +extern int sortedTeamPlayers[TEAM_MAXOVERLAY]; +extern int numSortedTeamPlayers; +extern int drawTeamOverlayModificationCount; +extern char systemChat[256]; +extern char teamChat1[256]; +extern char teamChat2[256]; + +void CG_AddLagometerFrameInfo( void ); +void CG_AddLagometerSnapshotInfo( snapshot_t *snap ); +void CG_CenterPrint( const char *str, int y, int charWidth ); +void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec3_t headAngles ); +void CG_DrawActive( stereoFrame_t stereoView ); +void CG_DrawFlagModel( float x, float y, float w, float h, int team, qboolean force2D ); +void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int team ); +void CG_OwnerDraw(float x, float y, float w, float h, float text_x, float text_y, int ownerDraw, int ownerDrawFlags, int align, float special, float scale, vec4_t color, qhandle_t shader, int textStyle,int font); +void CG_Text_Paint(float x, float y, float scale, vec4_t color, const char *text, float adjust, int limit, int style, int iMenuFont); +int CG_Text_Width(const char *text, float scale, int iMenuFont); +int CG_Text_Height(const char *text, float scale, int iMenuFont); +void CG_SelectPrevPlayer(void); +void CG_SelectNextPlayer(void); +float CG_GetValue(int ownerDraw); +qboolean CG_OwnerDrawVisible(int flags); +void CG_RunMenuScript(char **args); +qboolean CG_DeferMenuScript(char **args); +void CG_ShowResponseHead(void); +void CG_SetPrintString(int type, const char *p); +void CG_InitTeamChat(void); +void CG_GetTeamColor(vec4_t *color); +const char *CG_GetGameStatusText(void); +const char *CG_GetKillerText(void); +void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles ); +void CG_Text_PaintChar(float x, float y, float width, float height, float scale, float s, float t, float s2, float t2, qhandle_t hShader); +void CG_CheckOrderPending(void); +const char *CG_GameTypeString(void); +qboolean CG_YourTeamHasFlag(void); +qboolean CG_OtherTeamHasFlag(void); +qhandle_t CG_StatusHandle(int task); + + + +// +// cg_player.c +// +void CG_Player( centity_t *cent ); +void CG_ResetPlayerEntity( centity_t *cent ); +void CG_AddRefEntityWithPowerups( refEntity_t *ent, entityState_t *state, int team ); +void CG_NewClientInfo( int clientNum, qboolean entitiesInitialized ); +sfxHandle_t CG_CustomSound( int clientNum, const char *soundName ); +void CG_PlayerShieldHit(int entitynum, vec3_t angles, int amount); + + +// +// cg_predict.c +// +void CG_BuildSolidList( void ); +int CG_PointContents( const vec3_t point, int passEntityNum ); +void CG_Trace( trace_t *result, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, + int skipNumber, int mask ); +void CG_PredictPlayerState( void ); +void CG_LoadDeferredPlayers( void ); + + +// +// cg_events.c +// +void CG_CheckEvents( centity_t *cent ); +const char *CG_PlaceString( int rank ); +void CG_EntityEvent( centity_t *cent, vec3_t position ); +void CG_PainEvent( centity_t *cent, int health ); +void CG_ReattachLimb(centity_t *source); + + +// +// cg_ents.c +// +void CG_SetEntitySoundPosition( centity_t *cent ); +void CG_AddPacketEntities( void ); +void CG_ManualEntityRender(centity_t *cent); +void CG_Beam( centity_t *cent ); +void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out ); + +void CG_PositionEntityOnTag( refEntity_t *entity, const refEntity_t *parent, + qhandle_t parentModel, char *tagName ); +void CG_PositionRotatedEntityOnTag( refEntity_t *entity, const refEntity_t *parent, + qhandle_t parentModel, char *tagName ); + +/* +Ghoul2 Insert Start +*/ +void ScaleModelAxis(refEntity_t *ent); +/* +Ghoul2 Insert End +*/ + +// +// cg_turret.c +// +void TurretClientRun(centity_t *ent); + +// +// cg_weapons.c +// +void CG_GetClientWeaponMuzzleBoltPoint(int clIndex, vec3_t to); + +void CG_NextWeapon_f( void ); +void CG_PrevWeapon_f( void ); +void CG_Weapon_f( void ); + +void CG_RegisterWeapon( int weaponNum); +void CG_RegisterItemVisuals( int itemNum ); + +void CG_FireWeapon( centity_t *cent, qboolean alt_fire ); +void CG_MissileHitWall(int weapon, int clientNum, vec3_t origin, vec3_t dir, impactSound_t soundType, qboolean alt_fire, int charge); +void CG_MissileHitPlayer( int weapon, vec3_t origin, vec3_t dir, int entityNum, qboolean alt_fire); + +void CG_AddViewWeapon (playerState_t *ps); +void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent, int team, vec3_t newAngles, qboolean thirdPerson ); +void CG_DrawWeaponSelect( void ); +void CG_DrawIconBackground(void); + +void CG_OutOfAmmoChange( int oldWeapon ); // should this be in pmove? + +// +// cg_marks.c +// +void CG_InitMarkPolys( void ); +void CG_AddMarks( void ); +void CG_ImpactMark( qhandle_t markShader, + const vec3_t origin, const vec3_t dir, + float orientation, + float r, float g, float b, float a, + qboolean alphaFade, + float radius, qboolean temporary ); + +// +// cg_localents.c +// +void CG_InitLocalEntities( void ); +localEntity_t *CG_AllocLocalEntity( void ); +void CG_AddLocalEntities( void ); + +// +// cg_effects.c +// +localEntity_t *CG_SmokePuff( const vec3_t p, + const vec3_t vel, + float radius, + float r, float g, float b, float a, + float duration, + int startTime, + int fadeInTime, + int leFlags, + qhandle_t hShader ); +void CG_BubbleTrail( vec3_t start, vec3_t end, float spacing ); +void CG_GlassShatter(int entnum, vec3_t dmgPt, vec3_t dmgDir, float dmgRadius, int maxShards); +void CG_CreateDebris(int entnum, vec3_t org, vec3_t mins, vec3_t maxs, int debrissound, int debrismodel); +void CG_ScorePlum( int client, vec3_t org, int score ); + +void CG_Bleed( vec3_t origin, int entityNum ); + +localEntity_t *CG_MakeExplosion( vec3_t origin, vec3_t dir, + qhandle_t hModel, int numframes, qhandle_t shader, int msec, + qboolean isSprite, float scale, int flags );// Overloaded in single player + +void CG_SurfaceExplosion( vec3_t origin, vec3_t normal, float radius, float shake_speed, qboolean smoke ); + +void CG_TestLine( vec3_t start, vec3_t end, int time, unsigned int color, int radius); + +void CG_InitGlass( void ); + +// +// cg_snapshot.c +// +void CG_ProcessSnapshots( void ); + +// +// cg_info.c +// +void CG_LoadingString( const char *s ); +void CG_LoadingItem( int itemNum ); +void CG_LoadingClient( int clientNum ); +void CG_DrawInformation( void ); + +// +// cg_scoreboard.c +// +qboolean CG_DrawOldScoreboard( void ); +void CG_DrawOldTourneyScoreboard( void ); + +// +// cg_consolecmds.c +// +qboolean CG_ConsoleCommand( void ); +void CG_InitConsoleCommands( void ); + +// +// cg_servercmds.c +// +void CG_ExecuteNewServerCommands( int latestSequence ); +void CG_ParseServerinfo( void ); +void CG_SetConfigValues( void ); +void CG_LoadVoiceChats( void ); +void CG_ShaderStateChanged(void); +void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color, const char *cmd ); +void CG_PlayBufferedVoiceChats( void ); + +// +// cg_playerstate.c +// +int CG_IsMindTricked(int trickIndex1, int trickIndex2, int trickIndex3, int trickIndex4, int client); +void CG_Respawn( void ); +void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops ); +void CG_CheckChangedPredictableEvents( playerState_t *ps ); + + +// +// cg_saga.c +// +void CG_InitSagaMode(void); +void CG_SagaRoundOver(centity_t *ent, int won); +void CG_SagaObjectiveCompleted(centity_t *ent, int won, int objectivenum); + + + +//=============================================== + +// +// system traps +// These functions are how the cgame communicates with the main game system +// + +// print message on the local console +void trap_Print( const char *fmt ); + +// abort the game +void trap_Error( const char *fmt ); + +// milliseconds should only be used for performance tuning, never +// for anything game related. Get time from the CG_DrawActiveFrame parameter +int trap_Milliseconds( void ); + +// console variable interaction +void trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int flags ); +void trap_Cvar_Update( vmCvar_t *vmCvar ); +void trap_Cvar_Set( const char *var_name, const char *value ); +void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int bufsize ); + +// ServerCommand and ConsoleCommand parameter access +int trap_Argc( void ); +void trap_Argv( int n, char *buffer, int bufferLength ); +void trap_Args( char *buffer, int bufferLength ); + +// filesystem access +// returns length of file +int trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode ); +void trap_FS_Read( void *buffer, int len, fileHandle_t f ); +void trap_FS_Write( const void *buffer, int len, fileHandle_t f ); +void trap_FS_FCloseFile( fileHandle_t f ); + +// add commands to the local console as if they were typed in +// for map changing, etc. The command is not executed immediately, +// but will be executed in order the next time console commands +// are processed +void trap_SendConsoleCommand( const char *text ); + +// register a command name so the console can perform command completion. +// FIXME: replace this with a normal console command "defineCommand"? +void trap_AddCommand( const char *cmdName ); + +// send a string to the server over the network +void trap_SendClientCommand( const char *s ); + +// force a screen update, only used during gamestate load +void trap_UpdateScreen( void ); + +// model collision +void trap_CM_LoadMap( const char *mapname ); +int trap_CM_NumInlineModels( void ); +clipHandle_t trap_CM_InlineModel( int index ); // 0 = world, 1+ = bmodels +clipHandle_t trap_CM_TempBoxModel( const vec3_t mins, const vec3_t maxs ); +int trap_CM_PointContents( const vec3_t p, clipHandle_t model ); +int trap_CM_TransformedPointContents( const vec3_t p, clipHandle_t model, const vec3_t origin, const vec3_t angles ); +void trap_CM_BoxTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask ); +void trap_CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask, + const vec3_t origin, const vec3_t angles ); + +// Returns the projection of a polygon onto the solid brushes in the world +int trap_CM_MarkFragments( int numPoints, const vec3_t *points, + const vec3_t projection, + int maxPoints, vec3_t pointBuffer, + int maxFragments, markFragment_t *fragmentBuffer ); + +// normal sounds will have their volume dynamically changed as their entity +// moves and the listener moves +void trap_S_MuteSound( int entityNum, int entchannel ); +void trap_S_StartSound( vec3_t origin, int entityNum, int entchannel, sfxHandle_t sfx ); +void trap_S_StopLoopingSound(int entnum); + +// a local sound is always played full volume +void trap_S_StartLocalSound( sfxHandle_t sfx, int channelNum ); +void trap_S_ClearLoopingSounds( qboolean killall ); +void trap_S_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx ); +void trap_S_AddRealLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx ); +void trap_S_UpdateEntityPosition( int entityNum, const vec3_t origin ); + +// repatialize recalculates the volumes of sound as they should be heard by the +// given entityNum and position +void trap_S_Respatialize( int entityNum, const vec3_t origin, vec3_t axis[3], int inwater ); +sfxHandle_t trap_S_RegisterSound( const char *sample); // returns buzz if not found +void trap_S_StartBackgroundTrack( const char *intro, const char *loop, qboolean bReturnWithoutStarting); // empty name stops music +void trap_S_StopBackgroundTrack( void ); + + +void trap_R_LoadWorldMap( const char *mapname ); + +// all media should be registered during level startup to prevent +// hitches during gameplay +qhandle_t trap_R_RegisterModel( const char *name ); // returns rgb axis if not found +qhandle_t trap_R_RegisterSkin( const char *name ); // returns all white if not found +qhandle_t trap_R_RegisterShader( const char *name ); // returns all white if not found +qhandle_t trap_R_RegisterShaderNoMip( const char *name ); // returns all white if not found +qhandle_t trap_R_RegisterFont( const char *name ); +int trap_R_Font_StrLenPixels(const char *text, const int iFontIndex, const float scale); +int trap_R_Font_StrLenChars(const char *text); +int trap_R_Font_HeightPixels(const int iFontIndex, const float scale); +void trap_R_Font_DrawString(int ox, int oy, const char *text, const float *rgba, const int setIndex, int iCharLimit, const float scale); +qboolean trap_Language_IsAsian(void); +qboolean trap_Language_UsesSpaces(void); +unsigned trap_AnyLanguage_ReadCharFromString( const char *psText, int *piAdvanceCount, qboolean *pbIsTrailingPunctuation/* = NULL*/ ); + + +// a scene is built up by calls to R_ClearScene and the various R_Add functions. +// Nothing is drawn until R_RenderScene is called. +void trap_R_ClearScene( void ); +void trap_R_AddRefEntityToScene( const refEntity_t *re ); + +// polys are intended for simple wall marks, not really for doing +// significant construction +void trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts ); +void trap_R_AddPolysToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts, int numPolys ); +void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ); +int trap_R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t directedLight, vec3_t lightDir ); +void trap_R_RenderScene( const refdef_t *fd ); +void trap_R_SetColor( const float *rgba ); // NULL = 1,1,1,1 +void trap_R_DrawStretchPic( float x, float y, float w, float h, + float s1, float t1, float s2, float t2, qhandle_t hShader ); +void trap_R_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs ); +int trap_R_LerpTag( orientation_t *tag, clipHandle_t mod, int startFrame, int endFrame, + float frac, const char *tagName ); +// Does weird, barely controllable rotation behaviour +void trap_R_DrawRotatePic( float x, float y, float w, float h, + float s1, float t1, float s2, float t2,float a, qhandle_t hShader ); +// rotates image around exact center point of passed in coords +void trap_R_DrawRotatePic2( float x, float y, float w, float h, + float s1, float t1, float s2, float t2,float a, qhandle_t hShader ); +void trap_R_RemapShader( const char *oldShader, const char *newShader, const char *timeOffset ); + +void trap_R_GetLightStyle(int style, color4ub_t color); +void trap_R_SetLightStyle(int style, int color); + +void trap_R_GetBModelVerts(int bmodelIndex, vec3_t *verts, vec3_t normal ); + +void trap_FX_AddLine( const vec3_t start, const vec3_t end, float size1, float size2, float sizeParm, + float alpha1, float alpha2, float alphaParm, + const vec3_t sRGB, const vec3_t eRGB, float rgbParm, + int killTime, qhandle_t shader, int flags); + +// The glconfig_t will not change during the life of a cgame. +// If it needs to change, the entire cgame will be restarted, because +// all the qhandle_t are then invalid. +void trap_GetGlconfig( glconfig_t *glconfig ); + +// the gamestate should be grabbed at startup, and whenever a +// configstring changes +void trap_GetGameState( gameState_t *gamestate ); + +// cgame will poll each frame to see if a newer snapshot has arrived +// that it is interested in. The time is returned seperately so that +// snapshot latency can be calculated. +void trap_GetCurrentSnapshotNumber( int *snapshotNumber, int *serverTime ); + +// a snapshot get can fail if the snapshot (or the entties it holds) is so +// old that it has fallen out of the client system queue +qboolean trap_GetSnapshot( int snapshotNumber, snapshot_t *snapshot ); + +// retrieve a text command from the server stream +// the current snapshot will hold the number of the most recent command +// qfalse can be returned if the client system handled the command +// argc() / argv() can be used to examine the parameters of the command +qboolean trap_GetServerCommand( int serverCommandNumber ); + +// returns the most recent command number that can be passed to GetUserCmd +// this will always be at least one higher than the number in the current +// snapshot, and it may be quite a few higher if it is a fast computer on +// a lagged connection +int trap_GetCurrentCmdNumber( void ); + +qboolean trap_GetUserCmd( int cmdNumber, usercmd_t *ucmd ); + +// used for the weapon select and zoom +void trap_SetUserCmdValue( int stateValue, float sensitivityScale, int fpSel, int invenSel ); + +void trap_SetClientForceAngle(int time, vec3_t angle); +void trap_SetClientTurnExtent(float turnAdd, float turnSub, int turnTime); + +void trap_OpenUIMenu(int menuID); + +// aids for VM testing +void testPrintInt( char *string, int i ); +void testPrintFloat( char *string, float f ); + +int trap_MemoryRemaining( void ); +qboolean trap_Key_IsDown( int keynum ); +int trap_Key_GetCatcher( void ); +void trap_Key_SetCatcher( int catcher ); +int trap_Key_GetKey( const char *binding ); + +void BG_CycleInven(playerState_t *ps, int direction); +int BG_ProperForceIndex(int power); +void BG_CycleForce(playerState_t *ps, int direction); + + +typedef enum { + SYSTEM_PRINT, + CHAT_PRINT, + TEAMCHAT_PRINT +} q3print_t; // bk001201 - warning: useless keyword or type name in empty declaration + + +int trap_CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits); +e_status trap_CIN_StopCinematic(int handle); +e_status trap_CIN_RunCinematic (int handle); +void trap_CIN_DrawCinematic (int handle); +void trap_CIN_SetExtents (int handle, int x, int y, int w, int h); + +void trap_SnapVector( float *v ); + +qboolean trap_loadCamera(const char *name); +void trap_startCamera(int time); +qboolean trap_getCameraInfo(int time, vec3_t *origin, vec3_t *angles); + +qboolean trap_GetEntityToken( char *buffer, int bufferSize ); +qboolean trap_R_inPVS( const vec3_t p1, const vec3_t p2 ); + +int trap_FX_RegisterEffect(const char *file); +void trap_FX_PlaySimpleEffect( const char *file, vec3_t org ); // uses a default up axis +void trap_FX_PlayEffect( const char *file, vec3_t org, vec3_t fwd ); // builds arbitrary perp. right vector, does a cross product to define up +void trap_FX_PlayEntityEffect( const char *file, vec3_t org, + vec3_t axis[3], const int boltInfo, const int entNum ); +void trap_FX_PlaySimpleEffectID( int id, vec3_t org ); // uses a default up axis +void trap_FX_PlayEffectID( int id, vec3_t org, vec3_t fwd ); // builds arbitrary perp. right vector, does a cross product to define up +void trap_FX_PlayEntityEffectID( int id, vec3_t org, + vec3_t axis[3], const int boltInfo, const int entNum ); +void trap_FX_PlayBoltedEffectID( int id, sharedBoltInterface_t *fxObj ); +void trap_FX_AddScheduledEffects( void ); +int trap_FX_InitSystem( void ); // called in CG_Init to purge the fx system. +qboolean trap_FX_FreeSystem( void ); // ditches all active effects; +void trap_FX_AdjustTime( int time, vec3_t vieworg, vec3_t viewaxis[3] ); + +void trap_FX_AddPoly( addpolyArgStruct_t *p ); +void trap_FX_AddBezier( addbezierArgStruct_t *p ); +void trap_FX_AddPrimitive( effectTrailArgStruct_t *p ); +void trap_FX_AddSprite( addspriteArgStruct_t *p ); + +void trap_SP_Print(const unsigned ID, byte *Data); +int trap_SP_GetStringTextString(const char *text, char *buffer, int bufferLength); + +void trap_CG_RegisterSharedMemory(char *memory); + +qboolean trap_ROFF_Clean( void ); +void trap_ROFF_UpdateEntities( void ); + int trap_ROFF_Cache( char *file ); +qboolean trap_ROFF_Play( int entID, int roffID, qboolean doTranslation ); +qboolean trap_ROFF_Purge_Ent( int entID ); + +void CG_ClearParticles (void); +void CG_AddParticles (void); +void CG_ParticleSnow (qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb, float range, int snum); +void CG_ParticleSmoke (qhandle_t pshader, centity_t *cent); +void CG_AddParticleShrapnel (localEntity_t *le); +void CG_ParticleSnowFlurry (qhandle_t pshader, centity_t *cent); +void CG_ParticleBulletDebris (vec3_t org, vec3_t vel, int duration); +void CG_ParticleSparks (vec3_t org, vec3_t vel, int duration, float x, float y, float speed); +void CG_ParticleDust (centity_t *cent, vec3_t origin, vec3_t dir); +void CG_ParticleMisc (qhandle_t pshader, vec3_t origin, int size, int duration, float alpha); +void CG_ParticleExplosion (char *animStr, vec3_t origin, vec3_t vel, int duration, int sizeStart, int sizeEnd); +const char *CG_GetStripEdString(char *refSection, char *refName); +extern qboolean initparticles; +int CG_NewParticleArea ( int num ); + +void FX_TurretProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_TurretHitWall( vec3_t origin, vec3_t normal ); +void FX_TurretHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +//----------------------------- +// Effects related prototypes +//----------------------------- + +// Environmental effects +void CG_Spark( vec3_t origin, vec3_t dir ); + +// Weapon prototypes +void FX_BryarHitWall( vec3_t origin, vec3_t normal ); +void FX_BryarAltHitWall( vec3_t origin, vec3_t normal, int power ); +void FX_BryarHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_BryarAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +void FX_BlasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterAltFireThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterWeaponHitWall( vec3_t origin, vec3_t normal ); +void FX_BlasterWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + + +void FX_ForceDrained(vec3_t origin, vec3_t dir); + + +//----------------------------- +// Effects related prototypes +//----------------------------- + +// Environmental effects +void CG_Spark( vec3_t origin, vec3_t dir ); + +// Weapon prototypes +void FX_BryarHitWall( vec3_t origin, vec3_t normal ); +void FX_BryarAltHitWall( vec3_t origin, vec3_t normal, int power ); +void FX_BryarHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_BryarAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +void FX_BlasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterAltFireThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterWeaponHitWall( vec3_t origin, vec3_t normal ); +void FX_BlasterWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + + +void trap_G2API_CollisionDetect ( CollisionRecord_t *collRecMap, void* ghoul2, const vec3_t angles, const vec3_t position,int frameNumber, int entNum, const vec3_t rayStart, const vec3_t rayEnd, const vec3_t scale, int traceFlags, int useLod, float fRadius ); + + +/* +Ghoul2 Insert Start +*/ +// CG specific API access +void trap_G2_ListModelSurfaces(void *ghlInfo); +void trap_G2_ListModelBones(void *ghlInfo, int frame); +void trap_G2_SetGhoul2ModelIndexes(void *ghoul2, qhandle_t *modelList, qhandle_t *skinList); +qboolean trap_G2_HaveWeGhoul2Models(void *ghoul2); +qboolean trap_G2API_GetBoltMatrix(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale); +qboolean trap_G2API_GetBoltMatrix_NoReconstruct(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale); +qboolean trap_G2API_GetBoltMatrix_NoRecNoRot(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale); +int trap_G2API_InitGhoul2Model(void **ghoul2Ptr, const char *fileName, int modelIndex, qhandle_t customSkin, + qhandle_t customShader, int modelFlags, int lodBias); + +void trap_G2API_GiveMeVectorFromMatrix(mdxaBone_t *boltMatrix, int flags, vec3_t vec); +int trap_G2API_CopyGhoul2Instance(void *g2From, void *g2To, int modelIndex); +void trap_G2API_CopySpecificGhoul2Model(void *g2From, int modelFrom, void *g2To, int modelTo); +void trap_G2API_DuplicateGhoul2Instance(void *g2From, void **g2To); +qboolean trap_G2API_HasGhoul2ModelOnIndex(void *ghlInfo, int modelIndex); +qboolean trap_G2API_RemoveGhoul2Model(void *ghlInfo, int modelIndex); + +int trap_G2API_AddBolt(void *ghoul2, int modelIndex, const char *boneName); +//qboolean trap_G2API_RemoveBolt(void *ghoul2, int index); +void trap_G2API_SetBoltInfo(void *ghoul2, int modelIndex, int boltInfo); +void trap_G2API_CleanGhoul2Models(void **ghoul2Ptr); +qboolean trap_G2API_SetBoneAngles(void *ghoul2, int modelIndex, const char *boneName, const vec3_t angles, const int flags, + const int up, const int right, const int forward, qhandle_t *modelList, + int blendTime , int currentTime ); +void trap_G2API_GetGLAName(void *ghoul2, int modelIndex, char *fillBuf); +qboolean trap_G2API_SetBoneAnim(void *ghoul2, const int modelIndex, const char *boneName, const int startFrame, const int endFrame, + const int flags, const float animSpeed, const int currentTime, const float setFrame , const int blendTime ); + +qboolean trap_G2API_SetRootSurface(void *ghoul2, const int modelIndex, const char *surfaceName); +qboolean trap_G2API_SetSurfaceOnOff(void *ghoul2, const char *surfaceName, const int flags); +qboolean trap_G2API_SetNewOrigin(void *ghoul2, const int boltIndex); + +void CG_Init_CG(void); +void CG_Init_CGents(void); + + +void CG_SetGhoul2Info( refEntity_t *ent, centity_t *cent); +void CG_CreateBBRefEnts(entityState_t *s1, vec3_t origin ); + +void CG_InitG2Weapons(void); +void CG_ShutDownG2Weapons(void); +void CG_CopyG2WeaponInstance(int weaponNum, void *toGhoul2); +void CG_CheckPlayerG2Weapons(playerState_t *ps, centity_t *cent); + +extern void *g2WeaponInstances[MAX_WEAPONS]; +/* +Ghoul2 Insert End +*/ diff --git a/code/cgame/cg_local.h b/code/cgame/cg_local.h new file mode 100644 index 0000000..aaee4ab --- /dev/null +++ b/code/cgame/cg_local.h @@ -0,0 +1,2243 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +#include "../game/q_shared.h" +#include "tr_types.h" +#include "../game/bg_public.h" +#include "cg_public.h" + + +// The entire cgame module is unloaded and reloaded on each level change, +// so there is NO persistant data between levels on the client side. +// If you absolutely need something stored, it can either be kept +// by the server in the server stored userinfos, or stashed in a cvar. + +#define NULL_HANDLE ((qhandle_t) 0) +#define NULL_SOUND ((sfxHandle_t) 0) +#define NULL_FX ((fxHandle_t) 0) + +#define POWERUP_BLINKS 5 + +#define POWERUP_BLINK_TIME 1000 +#define FADE_TIME 200 +#define PULSE_TIME 200 +#define DAMAGE_DEFLECT_TIME 100 +#define DAMAGE_RETURN_TIME 400 +#define DAMAGE_TIME 500 +#define LAND_DEFLECT_TIME 150 +#define LAND_RETURN_TIME 300 +#define STEP_TIME 200 +#define DUCK_TIME 100 +#define PAIN_TWITCH_TIME 200 +#define WEAPON_SELECT_TIME 1400 +#define ITEM_SCALEUP_TIME 1000 + +#define SABER_LENGTH_MAX 40 + +// Zoom vars +#define ZOOM_TIME 150 // not currently used? +#define MAX_ZOOM_FOV 3.0f +#define ZOOM_IN_TIME 1500.0f +#define ZOOM_OUT_TIME 100.0f +#define ZOOM_START_PERCENT 0.3f + +#define ITEM_BLOB_TIME 200 +#define MUZZLE_FLASH_TIME 20 +#define SINK_TIME 1000 // time for fragments to sink into ground before going away +#define ATTACKER_HEAD_TIME 10000 +#define REWARD_TIME 3000 + +#define PULSE_SCALE 1.5 // amount to scale up the icons when activating + +#define MAX_STEP_CHANGE 32 + +#define MAX_VERTS_ON_POLY 10 +#define MAX_MARK_POLYS 256 + +#define STAT_MINUS 10 // num frame for '-' stats digit + +#define ICON_SIZE 48 +#define CHAR_WIDTH 32 +#define CHAR_HEIGHT 48 +#define TEXT_ICON_SPACE 4 + +#define TEAMCHAT_WIDTH 80 +#define TEAMCHAT_HEIGHT 8 + +// very large characters +#define GIANT_WIDTH 32 +#define GIANT_HEIGHT 48 + +#define NUM_FONT_BIG 1 +#define NUM_FONT_SMALL 2 +#define NUM_FONT_CHUNKY 3 + +#define NUM_CROSSHAIRS 10 + +#define TEAM_OVERLAY_MAXNAME_WIDTH 12 +#define TEAM_OVERLAY_MAXLOCATION_WIDTH 16 + +#define DEFAULT_MODEL "kyle" +#define DEFAULT_TEAM_MODEL "kyle" + +#define DEFAULT_FORCEPOWERS "5-1-000000000000000000" +//"rank-side-heal.lev.speed.push.pull.tele.grip.lightning.rage.protect.absorb.teamheal.teamforce.drain.see" + +#define DEFAULT_REDTEAM_NAME "Empire" +#define DEFAULT_BLUETEAM_NAME "Rebellion" + +typedef enum { + FOOTSTEP_NORMAL, + FOOTSTEP_METAL, + FOOTSTEP_SPLASH, + FOOTSTEP_BORG, + + FOOTSTEP_TOTAL +} footstep_t; + +typedef enum { + IMPACTSOUND_DEFAULT, + IMPACTSOUND_METAL, + IMPACTSOUND_FLESH +} impactSound_t; + +//================================================= + +// player entities need to track more information +// than any other type of entity. + +// note that not every player entity is a client entity, +// because corpses after respawn are outside the normal +// client numbering range + +// when changing animation, set animationTime to frameTime + lerping time +// The current lerp will finish out, then it will lerp to the new animation +typedef struct { + int oldFrame; + int oldFrameTime; // time when ->oldFrame was exactly on + + int frame; + int frameTime; // time when ->frame will be exactly on + + float backlerp; + + float yawAngle; + qboolean yawing; + float pitchAngle; + qboolean pitching; + + float yawSwingDif; + + int animationNumber; // may include ANIM_TOGGLEBIT + animation_t *animation; + int animationTime; // time when the first frame of the animation will be exact + + float animationSpeed; // scale the animation speed + float animationTorsoSpeed; + + qboolean torsoYawing; +} lerpFrame_t; + + +typedef struct { + lerpFrame_t legs, torso, flag; + int painTime; + int painDirection; // flip from 0 to 1 + int lightningFiring; + + // machinegun spinning + float barrelAngle; + int barrelTime; + qboolean barrelSpinning; +} playerEntity_t; + +//================================================= + + + +// centity_t have a direct corespondence with gentity_t in the game, but +// only the entityState_t is directly communicated to the cgame +typedef struct centity_s { + entityState_t currentState; // from cg.frame + entityState_t nextState; // from cg.nextFrame, if available + qboolean interpolate; // true if next is valid to interpolate to + qboolean currentValid; // true if cg.frame holds this entity + + int muzzleFlashTime; // move to playerEntity? + int previousEvent; + int teleportFlag; + + int trailTime; // so missile trails can handle dropped initial packets + int dustTrailTime; + int miscTime; + + vec3_t damageAngles; + int damageTime; + + int snapShotTime; // last time this entity was found in a snapshot + + playerEntity_t pe; + + int errorTime; // decay the error from this time + vec3_t errorOrigin; + vec3_t errorAngles; + + qboolean extrapolated; // false if origin / angles is an interpolation + vec3_t rawOrigin; + vec3_t rawAngles; + + vec3_t beamEnd; + + // exact interpolated position of entity on this frame + vec3_t lerpOrigin; + vec3_t lerpAngles; + + void *ghoul2; + int weapon; + + void *ghoul2weapon; //rww - pointer to ghoul2 instance of the current 3rd person weapon + + vec3_t modelScale; + float radius; + int boltInfo; + + //sometimes used as a bolt index, but these values are also used as generic values for clientside entities + //at times + int bolt1; + int bolt2; + int bolt3; + int bolt4; + + float saberLength; + int saberExtendTime; + + int rootBone; + int torsoBolt; + + vec3_t turAngles; + + int isATST; + int atstFootClang; + int atstSwinging; + + refEntity_t frame_minus1; + refEntity_t frame_minus2; + + int frame_minus1_refreshed; + int frame_minus2_refreshed; + + refEntity_t frame_hold; + int frame_hold_time; + int frame_hold_refreshed; + + refEntity_t grip_arm; + + int trickAlpha; + int trickAlphaTime; + + int teamPowerEffectTime; + qboolean teamPowerType; //0 regen, 1 heal, 2 drain, 3 absorb +} centity_t; + + +//====================================================================== + +// local entities are created as a result of events or predicted actions, +// and live independantly from all server transmitted entities + +typedef struct markPoly_s { + struct markPoly_s *prevMark, *nextMark; + int time; + qhandle_t markShader; + qboolean alphaFade; // fade alpha instead of rgb + float color[4]; + poly_t poly; + polyVert_t verts[MAX_VERTS_ON_POLY]; +} markPoly_t; + + +typedef enum { + LE_MARK, + LE_EXPLOSION, + LE_SPRITE_EXPLOSION, + LE_FADE_SCALE_MODEL, // currently only for Demp2 shock sphere + LE_FRAGMENT, + LE_PUFF, + LE_MOVE_SCALE_FADE, + LE_FALL_SCALE_FADE, + LE_FADE_RGB, + LE_SCALE_FADE, + LE_SCOREPLUM, + LE_OLINE, + LE_SHOWREFENTITY, + LE_LINE +} leType_t; + +typedef enum { + LEF_PUFF_DONT_SCALE = 0x0001, // do not scale size over time + LEF_TUMBLE = 0x0002, // tumble over time, used for ejecting shells + LEF_FADE_RGB = 0x0004, // explicitly fade + LEF_NO_RANDOM_ROTATE= 0x0008 // MakeExplosion adds random rotate which could be bad in some cases +} leFlag_t; + +typedef enum { + LEMT_NONE, + LEMT_BURN, + LEMT_BLOOD +} leMarkType_t; // fragment local entities can leave marks on walls + +typedef enum { + LEBS_NONE, + LEBS_BLOOD, + LEBS_BRASS +} leBounceSoundType_t; // fragment local entities can make sounds on impacts + +typedef struct localEntity_s { + struct localEntity_s *prev, *next; + leType_t leType; + int leFlags; + + int startTime; + int endTime; + int fadeInTime; + + float lifeRate; // 1.0 / (endTime - startTime) + + trajectory_t pos; + trajectory_t angles; + + float bounceFactor; // 0.0 = no bounce, 1.0 = perfect + int bounceSound; // optional sound index to play upon bounce + + float alpha; + float dalpha; + + int forceAlpha; + + float color[4]; + + float radius; + + float light; + vec3_t lightColor; + + leMarkType_t leMarkType; // mark to leave on fragment impact + leBounceSoundType_t leBounceSoundType; + + union { + struct { + float radius; + float dradius; + vec3_t startRGB; + vec3_t dRGB; + } sprite; + struct { + float width; + float dwidth; + float length; + float dlength; + vec3_t startRGB; + vec3_t dRGB; + } trail; + struct { + float width; + float dwidth; + // Below are bezier specific. + vec3_t control1; // initial position of control points + vec3_t control2; + vec3_t control1_velocity; // initial velocity of control points + vec3_t control2_velocity; + vec3_t control1_acceleration; // constant acceleration of control points + vec3_t control2_acceleration; + } line; + struct { + float width; + float dwidth; + float width2; + float dwidth2; + vec3_t startRGB; + vec3_t dRGB; + } line2; + struct { + float width; + float dwidth; + float width2; + float dwidth2; + float height; + float dheight; + } cylinder; + struct { + float width; + float dwidth; + } electricity; + struct + { + // fight the power! open and close brackets in the same column! + float radius; + float dradius; + qboolean (*thinkFn)(struct localEntity_s *le); + vec3_t dir; // magnitude is 1, but this is oldpos - newpos right before the + //particle is sent to the renderer + // may want to add something like particle::localEntity_s *le (for the particle's think fn) + } particle; + struct + { + qboolean dontDie; + vec3_t dir; + float variance; + int delay; + int nextthink; + qboolean (*thinkFn)(struct localEntity_s *le); + int data1; + int data2; + } spawner; + struct + { + float radius; + } fragment; + } data; + + refEntity_t refEntity; +} localEntity_t; + +//====================================================================== + + +typedef struct { + int client; + int score; + int ping; + int time; + int scoreFlags; + int powerUps; + int accuracy; + int impressiveCount; + int excellentCount; + int guantletCount; + int defendCount; + int assistCount; + int captures; + qboolean perfect; + int team; +} score_t; + +// each client has an associated clientInfo_t +// that contains media references necessary to present the +// client model and other color coded effects +// this is regenerated each time a client's configstring changes, +// usually as a result of a userinfo (name, model, etc) change +#define MAX_CUSTOM_SOUNDS 32 + +typedef struct +{ + // Actual trail stuff + int inAction; // controls whether should we even consider starting one + int duration; // how long each trail seg stays in existence + int lastTime; // time a saber segement was last stored + vec3_t base; + vec3_t tip; + + vec3_t dualbase; + vec3_t dualtip; + + // Marks stuff + qboolean haveOldPos[2]; + vec3_t oldPos[2]; + vec3_t oldNormal[2]; // store this in case we don't have a connect-the-dots situation + // ..then we'll need the normal to project a mark blob onto the impact point +} saberTrail_t; + +typedef struct { + qboolean infoValid; + + char name[MAX_QPATH]; + team_t team; + + int botSkill; // 0 = not bot, 1-5 = bot + + int frame; + + vec3_t color1; + vec3_t color2; + + int icolor1; + + int score; // updated by score servercmds + int location; // location index for team mode + int health; // you only get this info about your teammates + int armor; + int curWeapon; + + int handicap; + int wins, losses; // in tourney mode + + int teamTask; // task in teamplay (offence/defence) + qboolean teamLeader; // true when this is a team leader + + int powerups; // so can display quad/flag status + + int medkitUsageTime; + + int breathPuffTime; + + // when clientinfo is changed, the loading of models/skins/sounds + // can be deferred until you are dead, to prevent hitches in + // gameplay + char modelName[MAX_QPATH]; + char skinName[MAX_QPATH]; +// char headModelName[MAX_QPATH]; +// char headSkinName[MAX_QPATH]; + char forcePowers[MAX_QPATH]; + char redTeam[MAX_TEAMNAME]; + char blueTeam[MAX_TEAMNAME]; + + char teamName[MAX_TEAMNAME]; + + qboolean deferred; + + qboolean newAnims; // true if using the new mission pack animations + qboolean fixedlegs; // true if legs yaw is always the same as torso yaw + qboolean fixedtorso; // true if torso never changes yaw + + vec3_t headOffset; // move head in icon views + footstep_t footsteps; + gender_t gender; // from model + + qhandle_t legsModel; + qhandle_t legsSkin; + + qhandle_t torsoModel; + qhandle_t torsoSkin; + + //qhandle_t headModel; + //qhandle_t headSkin; + + qboolean ATST; + + void *ghoul2Model; + + qhandle_t modelIcon; + + qhandle_t bolt_rhand; + qhandle_t bolt_lhand; + + qhandle_t bolt_head; + + qhandle_t bolt_motion; + + qhandle_t bolt_llumbar; + + saberTrail_t saberTrail; + int saberHitWallSoundDebounceTime; + + sfxHandle_t sounds[MAX_CUSTOM_SOUNDS]; + + int legsAnim; + int torsoAnim; +} clientInfo_t; + + +// each WP_* weapon enum has an associated weaponInfo_t +// that contains media references necessary to present the +// weapon and its effects +typedef struct weaponInfo_s { + qboolean registered; + gitem_t *item; + + qhandle_t handsModel; // the hands don't actually draw, they just position the weapon + qhandle_t weaponModel; // this is the pickup model + qhandle_t viewModel; // this is the in-view model used by the player + qhandle_t barrelModel; + qhandle_t flashModel; + + vec3_t weaponMidpoint; // so it will rotate centered instead of by tag + + float flashDlight; + vec3_t flashDlightColor; + + qhandle_t weaponIcon; + qhandle_t ammoIcon; + + qhandle_t ammoModel; + + sfxHandle_t flashSound[4]; // fast firing weapons randomly choose + sfxHandle_t firingSound; + sfxHandle_t chargeSound; + fxHandle_t muzzleEffect; + qhandle_t missileModel; + sfxHandle_t missileSound; + void (*missileTrailFunc)( centity_t *, const struct weaponInfo_s *wi ); + float missileDlight; + vec3_t missileDlightColor; + int missileRenderfx; + sfxHandle_t missileHitSound; + + sfxHandle_t altFlashSound[4]; + sfxHandle_t altFiringSound; + sfxHandle_t altChargeSound; + fxHandle_t altMuzzleEffect; + qhandle_t altMissileModel; + sfxHandle_t altMissileSound; + void (*altMissileTrailFunc)( centity_t *, const struct weaponInfo_s *wi ); + float altMissileDlight; + vec3_t altMissileDlightColor; + int altMissileRenderfx; + sfxHandle_t altMissileHitSound; + + sfxHandle_t readySound; + float trailRadius; + float wiTrailTime; + +} weaponInfo_t; + + +// each IT_* item has an associated itemInfo_t +// that constains media references necessary to present the +// item and its effects +typedef struct { + qboolean registered; + qhandle_t models[MAX_ITEM_MODELS]; + qhandle_t icon; +/* +Ghoul2 Insert Start +*/ + void *g2Models[MAX_ITEM_MODELS]; + float radius[MAX_ITEM_MODELS]; +/* +Ghoul2 Insert End +*/ +} itemInfo_t; + + +typedef struct { + int itemNum; +} powerupInfo_t; + + +#define MAX_SKULLTRAIL 10 + +typedef struct { + vec3_t positions[MAX_SKULLTRAIL]; + int numpositions; +} skulltrail_t; + + +#define MAX_REWARDSTACK 10 +#define MAX_SOUNDBUFFER 20 + +//====================================================================== + +// all cg.stepTime, cg.duckTime, cg.landTime, etc are set to cg.time when the action +// occurs, and they will have visible effects for #define STEP_TIME or whatever msec after + +#define MAX_PREDICTED_EVENTS 16 + +typedef struct { + int clientFrame; // incremented each frame + + int clientNum; + + qboolean demoPlayback; + qboolean levelShot; // taking a level menu screenshot + int deferredPlayerLoading; + qboolean loading; // don't defer players at initial startup + qboolean intermissionStarted; // don't play voice rewards, because game will end shortly + + // there are only one or two snapshot_t that are relevent at a time + int latestSnapshotNum; // the number of snapshots the client system has received + int latestSnapshotTime; // the time from latestSnapshotNum, so we don't need to read the snapshot yet + + snapshot_t *snap; // cg.snap->serverTime <= cg.time + snapshot_t *nextSnap; // cg.nextSnap->serverTime > cg.time, or NULL +// snapshot_t activeSnapshots[2]; + + float frameInterpolation; // (float)( cg.time - cg.frame->serverTime ) / (cg.nextFrame->serverTime - cg.frame->serverTime) + + qboolean mMapChange; + + qboolean thisFrameTeleport; + qboolean nextFrameTeleport; + + int frametime; // cg.time - cg.oldTime + + int time; // this is the time value that the client + // is rendering at. + int oldTime; // time at last frame, used for missile trails and prediction checking + + int physicsTime; // either cg.snap->time or cg.nextSnap->time + + int timelimitWarnings; // 5 min, 1 min, overtime + int fraglimitWarnings; + + qboolean mapRestart; // set on a map restart to set back the weapon + + qboolean renderingThirdPerson; // during deaths, chasecams, etc + + // prediction state + qboolean hyperspace; // true if prediction has hit a trigger_teleport + playerState_t predictedPlayerState; + centity_t predictedPlayerEntity; + qboolean validPPS; // clear until the first call to CG_PredictPlayerState + int predictedErrorTime; + vec3_t predictedError; + + int eventSequence; + int predictableEvents[MAX_PREDICTED_EVENTS]; + + float stepChange; // for stair up smoothing + int stepTime; + + float duckChange; // for duck viewheight smoothing + int duckTime; + + float landChange; // for landing hard + int landTime; + + // input state sent to server + int weaponSelect; + + int forceSelect; + int itemSelect; + + // auto rotating items + vec3_t autoAngles; + vec3_t autoAxis[3]; + vec3_t autoAnglesFast; + vec3_t autoAxisFast[3]; + + // view rendering + refdef_t refdef; + vec3_t refdefViewAngles; // will be converted to refdef.viewaxis + + float constrictValue; + float constrict; + int doConstrict; + + // zoom key + qboolean zoomed; + int zoomTime; + float zoomSensitivity; + + // information screen text during loading + char infoScreenText[MAX_STRING_CHARS]; + + // scoreboard + int scoresRequestTime; + int numScores; + int selectedScore; + int teamScores[2]; + score_t scores[MAX_CLIENTS]; + qboolean showScores; + qboolean scoreBoardShowing; + int scoreFadeTime; + char killerName[MAX_NAME_LENGTH]; + char spectatorList[MAX_STRING_CHARS]; // list of names + int spectatorLen; // length of list + float spectatorWidth; // width in device units + int spectatorTime; // next time to offset + int spectatorPaintX; // current paint x + int spectatorPaintX2; // current paint x + int spectatorOffset; // current offset from start + int spectatorPaintLen; // current offset from start + + // skull trails + skulltrail_t skulltrails[MAX_CLIENTS]; + + // centerprinting + int centerPrintTime; + int centerPrintCharWidth; + int centerPrintY; + char centerPrint[1024]; + int centerPrintLines; + + // low ammo warning state + int lowAmmoWarning; // 1 = low, 2 = empty + + // kill timers for carnage reward + int lastKillTime; + + // crosshair client ID + int crosshairClientNum; + int crosshairClientTime; + + // powerup active flashing + int powerupActive; + int powerupTime; + + // attacking player + int attackerTime; + int voiceTime; + + // reward medals + int rewardStack; + int rewardTime; + int rewardCount[MAX_REWARDSTACK]; + qhandle_t rewardShader[MAX_REWARDSTACK]; + qhandle_t rewardSound[MAX_REWARDSTACK]; + + // sound buffer mainly for announcer sounds + int soundBufferIn; + int soundBufferOut; + int soundTime; + qhandle_t soundBuffer[MAX_SOUNDBUFFER]; + + // for voice chat buffer + int voiceChatTime; + int voiceChatBufferIn; + int voiceChatBufferOut; + + // warmup countdown + int warmup; + int warmupCount; + + //========================== + + int itemPickup; + int itemPickupTime; + int itemPickupBlendTime; // the pulse around the crosshair is timed seperately + + int weaponSelectTime; + int weaponAnimation; + int weaponAnimationTime; + + // blend blobs + float damageTime; + float damageX, damageY, damageValue; + + // status bar head + float headYaw; + float headEndPitch; + float headEndYaw; + int headEndTime; + float headStartPitch; + float headStartYaw; + int headStartTime; + + // view movement + float v_dmg_time; + float v_dmg_pitch; + float v_dmg_roll; + + vec3_t kick_angles; // weapon kicks + vec3_t kick_origin; + + // temp working variables for player view + float bobfracsin; + int bobcycle; + float xyspeed; + int nextOrbitTime; + + //qboolean cameraMode; // if rendering from a loaded camera + int loadLCARSStage; + + + // development tool + refEntity_t testModelEntity; + char testModelName[MAX_QPATH]; + qboolean testGun; + + // HUD stuff + float HUDTickFlashTime; + qboolean HUDArmorFlag; + qboolean HUDHealthFlag; + qboolean iconHUDActive; + float iconHUDPercent; + float iconSelectTime; + float invenSelectTime; + float forceSelectTime; + + vec3_t lastFPFlashPoint; + +/* +Ghoul2 Insert Start +*/ + int testModel; + // had to be moved so we wouldn't wipe these out with the memset - these have STL in them and shouldn't be cleared that way + snapshot_t activeSnapshots[2]; +/* +Ghoul2 Insert End +*/ + + char sharedBuffer[MAX_CG_SHARED_BUFFER_SIZE]; +} cg_t; + +#define MAX_TICS 14 + +typedef struct forceTicPos_s +{ + int x; + int y; + int width; + int height; + char *file; + qhandle_t tic; +} forceTicPos_t; +extern forceTicPos_t forceTicPos[]; +extern forceTicPos_t ammoTicPos[]; + +typedef struct cgscreffects_s +{ + float FOV; + float FOV2; + + float shake_intensity; + int shake_duration; + int shake_start; + + float music_volume_multiplier; + int music_volume_time; + qboolean music_volume_set; +} cgscreffects_t; + +extern cgscreffects_t cgScreenEffects; + +void CGCam_Shake( float intensity, int duration ); +void CGCam_SetMusicMult( float multiplier, int duration ); + +// all of the model, shader, and sound references that are +// loaded at gamestate time are stored in cgMedia_t +// Other media that can be tied to clients, weapons, or items are +// stored in the clientInfo_t, itemInfo_t, weaponInfo_t, and powerupInfo_t +typedef struct { + qhandle_t charsetShader; + qhandle_t whiteShader; + + qhandle_t loadBarLED; + qhandle_t loadBarLEDCap; + qhandle_t loadBarLEDSurround; + + qhandle_t bryarFrontFlash; + qhandle_t greenFrontFlash; + qhandle_t lightningFlash; + + qhandle_t itemHoloModel; + qhandle_t redFlagModel; + qhandle_t blueFlagModel; + qhandle_t neutralFlagModel; + qhandle_t flagShader[4]; + + qhandle_t flagPoleModel; + qhandle_t flagFlapModel; + + qhandle_t redFlagFlapSkin; + qhandle_t blueFlagFlapSkin; + qhandle_t neutralFlagFlapSkin; + + qhandle_t redFlagBaseModel; + qhandle_t blueFlagBaseModel; + qhandle_t neutralFlagBaseModel; + + qhandle_t armorModel; + qhandle_t armorIcon; + + qhandle_t teamStatusBar; + + qhandle_t deferShader; + + qhandle_t lightningShader; + + qhandle_t redSaberGlowShader; + qhandle_t redSaberCoreShader; + qhandle_t orangeSaberGlowShader; + qhandle_t orangeSaberCoreShader; + qhandle_t yellowSaberGlowShader; + qhandle_t yellowSaberCoreShader; + qhandle_t greenSaberGlowShader; + qhandle_t greenSaberCoreShader; + qhandle_t blueSaberGlowShader; + qhandle_t blueSaberCoreShader; + qhandle_t purpleSaberGlowShader; + qhandle_t purpleSaberCoreShader; + qhandle_t saberBlurShader; + + qhandle_t yellowDroppedSaberShader; + + qhandle_t rivetMarkShader; + + qhandle_t teamRedShader; + qhandle_t teamBlueShader; + + qhandle_t balloonShader; + qhandle_t connectionShader; + + qhandle_t viewBloodShader; + qhandle_t tracerShader; + qhandle_t crosshairShader[NUM_CROSSHAIRS]; + qhandle_t lagometerShader; + qhandle_t backTileShader; + qhandle_t noammoShader; + + qhandle_t smokePuffShader; + qhandle_t waterBubbleShader; + qhandle_t bloodTrailShader; + + qhandle_t numberShaders[11]; + qhandle_t smallnumberShaders[11]; + qhandle_t chunkyNumberShaders[11]; + + qhandle_t electricBodyShader; + qhandle_t electricBody2Shader; + + qhandle_t shadowMarkShader; + + //glass shard shader + qhandle_t glassShardShader; + + // wall mark shaders + qhandle_t wakeMarkShader; + qhandle_t bloodMarkShader; + qhandle_t bulletMarkShader; + qhandle_t burnMarkShader; + qhandle_t holeMarkShader; + qhandle_t energyMarkShader; + + // Pain view shader + qhandle_t viewPainShader; + qhandle_t viewPainShader_Shields; + qhandle_t viewPainShader_ShieldsAndHealth; + + // powerup shaders + qhandle_t quadShader; + qhandle_t redQuadShader; + qhandle_t quadWeaponShader; + qhandle_t invisShader; + qhandle_t regenShader; + qhandle_t battleSuitShader; + qhandle_t battleWeaponShader; + qhandle_t hastePuffShader; + + qhandle_t itemRespawningPlaceholder; + qhandle_t itemRespawningRezOut; + + qhandle_t playerShieldDamage; + qhandle_t forceSightBubble; + qhandle_t forceShell; + qhandle_t sightShell; + + // Disruptor zoom graphics + qhandle_t disruptorMask; + qhandle_t disruptorInsert; + qhandle_t disruptorLight; + qhandle_t disruptorInsertTick; + qhandle_t disruptorChargeShader; + + // Binocular graphics + qhandle_t binocularCircle; + qhandle_t binocularMask; + qhandle_t binocularArrow; + qhandle_t binocularTri; + qhandle_t binocularStatic; + qhandle_t binocularOverlay; + + // weapon effect models + qhandle_t lightningExplosionModel; + + // explosion assets + qhandle_t explosionModel; + qhandle_t surfaceExplosionShader; + + qhandle_t disruptorShader; + + qhandle_t solidWhite; + + qhandle_t heartShader; + + // All the player shells + qhandle_t ysaliredShader; + qhandle_t ysaliblueShader; + qhandle_t ysalimariShader; + qhandle_t boonShader; + qhandle_t endarkenmentShader; + qhandle_t enlightenmentShader; + qhandle_t invulnerabilityShader; + +#ifdef JK2AWARDS + // medals shown during gameplay + qhandle_t medalImpressive; + qhandle_t medalExcellent; + qhandle_t medalGauntlet; + qhandle_t medalDefend; + qhandle_t medalAssist; + qhandle_t medalCapture; +#endif + + // sounds + sfxHandle_t selectSound; + sfxHandle_t footsteps[FOOTSTEP_TOTAL][4]; + + sfxHandle_t winnerSound; + sfxHandle_t loserSound; + + sfxHandle_t crackleSound; + + sfxHandle_t grenadeBounce1; + sfxHandle_t grenadeBounce2; + + sfxHandle_t teamHealSound; + sfxHandle_t teamRegenSound; + + sfxHandle_t teleInSound; + sfxHandle_t teleOutSound; + sfxHandle_t respawnSound; + sfxHandle_t talkSound; + sfxHandle_t landSound; + sfxHandle_t fallSound; + + sfxHandle_t oneMinuteSound; + sfxHandle_t fiveMinuteSound; + + sfxHandle_t threeFragSound; + sfxHandle_t twoFragSound; + sfxHandle_t oneFragSound; + +#ifdef JK2AWARDS + sfxHandle_t impressiveSound; + sfxHandle_t excellentSound; + sfxHandle_t deniedSound; + sfxHandle_t humiliationSound; + sfxHandle_t defendSound; +#endif + + sfxHandle_t takenLeadSound; + sfxHandle_t tiedLeadSound; + sfxHandle_t lostLeadSound; + + sfxHandle_t rollSound; + + sfxHandle_t watrInSound; + sfxHandle_t watrOutSound; + sfxHandle_t watrUnSound; + + sfxHandle_t deploySeeker; + sfxHandle_t medkitSound; + + // teamplay sounds +#ifdef JK2AWARDS + sfxHandle_t captureAwardSound; +#endif + sfxHandle_t redScoredSound; + sfxHandle_t blueScoredSound; + sfxHandle_t redLeadsSound; + sfxHandle_t blueLeadsSound; + sfxHandle_t teamsTiedSound; + + sfxHandle_t redFlagReturnedSound; + sfxHandle_t blueFlagReturnedSound; + sfxHandle_t redTookFlagSound; + sfxHandle_t blueTookFlagSound; + + sfxHandle_t redYsalReturnedSound; + sfxHandle_t blueYsalReturnedSound; + sfxHandle_t redTookYsalSound; + sfxHandle_t blueTookYsalSound; + + sfxHandle_t drainSound; + + //music blips + sfxHandle_t happyMusic; + sfxHandle_t dramaticFailure; + + // tournament sounds + sfxHandle_t count3Sound; + sfxHandle_t count2Sound; + sfxHandle_t count1Sound; + sfxHandle_t countFightSound; + + // new stuff + qhandle_t patrolShader; + qhandle_t assaultShader; + qhandle_t campShader; + qhandle_t followShader; + qhandle_t defendShader; + qhandle_t teamLeaderShader; + qhandle_t retrieveShader; + qhandle_t escortShader; + qhandle_t flagShaders[3]; + + qhandle_t halfShieldModel; + qhandle_t halfShieldShader; + + qhandle_t demp2Shell; + qhandle_t demp2ShellShader; + + qhandle_t cursor; + qhandle_t selectCursor; + qhandle_t sizeCursor; + + //weapon icons + qhandle_t weaponIcons[WP_NUM_WEAPONS]; + qhandle_t weaponIcons_NA[WP_NUM_WEAPONS]; + + //holdable inventory item icons + qhandle_t invenIcons[HI_NUM_HOLDABLE]; + + //force power icons + qhandle_t forcePowerIcons[NUM_FORCE_POWERS]; + + qhandle_t rageRecShader; + + //other HUD parts + qhandle_t HUDLeftFrame; + qhandle_t HUDArmor1; + qhandle_t HUDArmor2; + qhandle_t HUDHealth; + qhandle_t HUDHealthTic; + qhandle_t HUDArmorTic; + qhandle_t HUDLeftStatic; + qhandle_t HUDLeft; + + qhandle_t HUDSaberStyle1; + qhandle_t HUDSaberStyle2; + qhandle_t HUDSaberStyle3; + + qhandle_t HUDRightFrame; + qhandle_t HUDInnerRight; + + int currentBackground; + qhandle_t weaponIconBackground; + qhandle_t weaponProngsOff; + qhandle_t weaponProngsOn; + qhandle_t forceIconBackground; + qhandle_t forceProngsOn; + qhandle_t inventoryIconBackground; + qhandle_t inventoryProngsOn; + + qhandle_t HUDInnerLeft; + + sfxHandle_t holocronPickup; + + // Zoom + sfxHandle_t zoomStart; + sfxHandle_t zoomLoop; + sfxHandle_t zoomEnd; + sfxHandle_t disruptorZoomLoop; + +} cgMedia_t; + + +// Stored FX handles +//-------------------- +typedef struct +{ + // BRYAR PISTOL + fxHandle_t bryarShotEffect; + fxHandle_t bryarPowerupShotEffect; + fxHandle_t bryarWallImpactEffect; + fxHandle_t bryarWallImpactEffect2; + fxHandle_t bryarWallImpactEffect3; + fxHandle_t bryarFleshImpactEffect; + fxHandle_t bryarDroidImpactEffect; + + // BLASTER + fxHandle_t blasterShotEffect; + fxHandle_t blasterWallImpactEffect; + fxHandle_t blasterFleshImpactEffect; + fxHandle_t blasterDroidImpactEffect; + + // DISRUPTOR + fxHandle_t disruptorRingsEffect; + fxHandle_t disruptorProjectileEffect; + fxHandle_t disruptorWallImpactEffect; + fxHandle_t disruptorFleshImpactEffect; + fxHandle_t disruptorAltMissEffect; + fxHandle_t disruptorAltHitEffect; + + // BOWCASTER + fxHandle_t bowcasterShotEffect; + fxHandle_t bowcasterImpactEffect; + + // REPEATER + fxHandle_t repeaterProjectileEffect; + fxHandle_t repeaterAltProjectileEffect; + fxHandle_t repeaterWallImpactEffect; + fxHandle_t repeaterFleshImpactEffect; + fxHandle_t repeaterAltWallImpactEffect; + + // DEMP2 + fxHandle_t demp2ProjectileEffect; + fxHandle_t demp2WallImpactEffect; + fxHandle_t demp2FleshImpactEffect; + + // FLECHETTE + fxHandle_t flechetteShotEffect; + fxHandle_t flechetteAltShotEffect; + fxHandle_t flechetteWallImpactEffect; + fxHandle_t flechetteFleshImpactEffect; + + // ROCKET + fxHandle_t rocketShotEffect; + fxHandle_t rocketExplosionEffect; + + // THERMAL + fxHandle_t thermalExplosionEffect; + fxHandle_t thermalShockwaveEffect; + + // TRIPMINE + fxHandle_t tripmineLaserFX; + + //FORCE + fxHandle_t forceLightning; + fxHandle_t forceLightningWide; + + fxHandle_t forceDrain; + fxHandle_t forceDrainWide; + fxHandle_t forceDrained; + + //TURRET + fxHandle_t turretShotEffect; + +} cgEffects_t; + + +// The client game static (cgs) structure hold everything +// loaded or calculated from the gamestate. It will NOT +// be cleared when a tournement restart is done, allowing +// all clients to begin playing instantly +typedef struct { + gameState_t gameState; // gamestate from server + glconfig_t glconfig; // rendering configuration + float screenXScale; // derived from glconfig + float screenYScale; + float screenXBias; + + int serverCommandSequence; // reliable command stream counter + int processedSnapshotNum;// the number of snapshots cgame has requested + + qboolean localServer; // detected on startup by checking sv_running + + // parsed from serverinfo + gametype_t gametype; + int dmflags; + int teamflags; + int fraglimit; + int duel_fraglimit; + int capturelimit; + int timelimit; + int maxclients; + qboolean needpass; + qboolean jediVmerc; + int wDisable; + int fDisable; + + char mapname[MAX_QPATH]; + char redTeam[MAX_QPATH]; + char blueTeam[MAX_QPATH]; + + int voteTime; + int voteYes; + int voteNo; + qboolean voteModified; // beep whenever changed + char voteString[MAX_STRING_TOKENS]; + + int teamVoteTime[2]; + int teamVoteYes[2]; + int teamVoteNo[2]; + qboolean teamVoteModified[2]; // beep whenever changed + char teamVoteString[2][MAX_STRING_TOKENS]; + + int levelStartTime; + + int scores1, scores2; // from configstrings + int jediMaster; + int duelWinner; + int duelist1; + int duelist2; + int redflag, blueflag; // flag status from configstrings + int flagStatus; + + qboolean newHud; + + // + // locally derived information from gamestate + // + qhandle_t gameModels[MAX_MODELS]; + sfxHandle_t gameSounds[MAX_SOUNDS]; + fxHandle_t gameEffects[MAX_FX]; +/* +Ghoul2 Insert Start +*/ + qhandle_t skins[MAX_CHARSKINS]; + +/* +Ghoul2 Insert End +*/ + int numInlineModels; + qhandle_t inlineDrawModel[MAX_MODELS]; + vec3_t inlineModelMidpoints[MAX_MODELS]; + + clientInfo_t clientinfo[MAX_CLIENTS]; + + // teamchat width is *3 because of embedded color codes + char teamChatMsgs[TEAMCHAT_HEIGHT][TEAMCHAT_WIDTH*3+1]; + int teamChatMsgTimes[TEAMCHAT_HEIGHT]; + int teamChatPos; + int teamLastChatPos; + + int cursorX; + int cursorY; + qboolean eventHandling; + qboolean mouseCaptured; + qboolean sizingHud; + void *capturedItem; + qhandle_t activeCursor; + + // orders + int currentOrder; + qboolean orderPending; + int orderTime; + int currentVoiceClient; + int acceptOrderTime; + int acceptTask; + int acceptLeader; + char acceptVoice[MAX_NAME_LENGTH]; + + // media + cgMedia_t media; + + // effects + cgEffects_t effects; + +} cgs_t; + +//============================================================================== + +extern cgs_t cgs; +extern cg_t cg; +extern centity_t cg_entities[MAX_GENTITIES]; +extern weaponInfo_t cg_weapons[MAX_WEAPONS]; +extern itemInfo_t cg_items[MAX_ITEMS]; +extern markPoly_t cg_markPolys[MAX_MARK_POLYS]; + +extern vmCvar_t cg_centertime; +extern vmCvar_t cg_runpitch; +extern vmCvar_t cg_runroll; +extern vmCvar_t cg_bobup; +extern vmCvar_t cg_bobpitch; +extern vmCvar_t cg_bobroll; +//extern vmCvar_t cg_swingSpeed; +extern vmCvar_t cg_shadows; +extern vmCvar_t cg_drawTimer; +extern vmCvar_t cg_drawFPS; +extern vmCvar_t cg_drawSnapshot; +extern vmCvar_t cg_draw3dIcons; +extern vmCvar_t cg_drawIcons; +extern vmCvar_t cg_drawAmmoWarning; +extern vmCvar_t cg_drawCrosshair; +extern vmCvar_t cg_drawCrosshairNames; +extern vmCvar_t cg_drawScores; +extern vmCvar_t cg_dynamicCrosshair; +extern vmCvar_t cg_drawRewards; +extern vmCvar_t cg_drawTeamOverlay; +extern vmCvar_t cg_teamOverlayUserinfo; +extern vmCvar_t cg_crosshairX; +extern vmCvar_t cg_crosshairY; +extern vmCvar_t cg_crosshairSize; +extern vmCvar_t cg_crosshairHealth; +extern vmCvar_t cg_drawStatus; +extern vmCvar_t cg_draw2D; +extern vmCvar_t cg_animSpeed; +extern vmCvar_t cg_debugAnim; +extern vmCvar_t cg_debugPosition; +extern vmCvar_t cg_debugEvents; +extern vmCvar_t cg_errorDecay; +extern vmCvar_t cg_nopredict; +extern vmCvar_t cg_noPlayerAnims; +extern vmCvar_t cg_showmiss; +extern vmCvar_t cg_footsteps; +extern vmCvar_t cg_addMarks; +extern vmCvar_t cg_gun_frame; +extern vmCvar_t cg_gun_x; +extern vmCvar_t cg_gun_y; +extern vmCvar_t cg_gun_z; +extern vmCvar_t cg_drawGun; +extern vmCvar_t cg_viewsize; +extern vmCvar_t cg_tracerChance; +extern vmCvar_t cg_tracerWidth; +extern vmCvar_t cg_tracerLength; +extern vmCvar_t cg_autoswitch; +extern vmCvar_t cg_ignore; +extern vmCvar_t cg_simpleItems; +extern vmCvar_t cg_fov; +extern vmCvar_t cg_zoomFov; + +extern vmCvar_t cg_swingAngles; + +extern vmCvar_t cg_oldPainSounds; + +#ifdef G2_COLLISION_ENABLED +extern vmCvar_t cg_saberModelTraceEffect; +#endif + +extern vmCvar_t cg_fpls; + +extern vmCvar_t cg_saberDynamicMarks; +extern vmCvar_t cg_saberDynamicMarkTime; + +extern vmCvar_t cg_saberContact; +extern vmCvar_t cg_saberTrail; + +extern vmCvar_t cg_duelHeadAngles; + +extern vmCvar_t cg_speedTrail; +extern vmCvar_t cg_auraShell; + +extern vmCvar_t cg_animBlend; + +extern vmCvar_t cg_dismember; + +extern vmCvar_t cg_thirdPerson; +extern vmCvar_t cg_thirdPersonRange; +extern vmCvar_t cg_thirdPersonAngle; +extern vmCvar_t cg_thirdPersonPitchOffset; +extern vmCvar_t cg_thirdPersonVertOffset; +extern vmCvar_t cg_thirdPersonCameraDamp; +extern vmCvar_t cg_thirdPersonTargetDamp; + +extern vmCvar_t cg_thirdPersonAlpha; +extern vmCvar_t cg_thirdPersonHorzOffset; + +extern vmCvar_t cg_stereoSeparation; +extern vmCvar_t cg_lagometer; +extern vmCvar_t cg_drawEnemyInfo; +extern vmCvar_t cg_synchronousClients; +extern vmCvar_t cg_teamChatTime; +extern vmCvar_t cg_teamChatHeight; +extern vmCvar_t cg_stats; +extern vmCvar_t cg_forceModel; +extern vmCvar_t cg_buildScript; +extern vmCvar_t cg_paused; +extern vmCvar_t cg_blood; +extern vmCvar_t cg_predictItems; +extern vmCvar_t cg_deferPlayers; +extern vmCvar_t cg_drawFriend; +extern vmCvar_t cg_teamChatsOnly; +extern vmCvar_t cg_noVoiceChats; +extern vmCvar_t cg_noVoiceText; +extern vmCvar_t cg_scorePlum; +extern vmCvar_t cg_hudFiles; +extern vmCvar_t cg_smoothClients; +extern vmCvar_t pmove_fixed; +extern vmCvar_t pmove_msec; +//extern vmCvar_t cg_pmove_fixed; +extern vmCvar_t cg_cameraOrbit; +extern vmCvar_t cg_cameraOrbitDelay; +extern vmCvar_t cg_timescaleFadeEnd; +extern vmCvar_t cg_timescaleFadeSpeed; +extern vmCvar_t cg_timescale; +extern vmCvar_t cg_cameraMode; +extern vmCvar_t cg_smallFont; +extern vmCvar_t cg_bigFont; +extern vmCvar_t cg_noTaunt; +extern vmCvar_t cg_noProjectileTrail; +extern vmCvar_t cg_trueLightning; + +extern vmCvar_t cg_redTeamName; +extern vmCvar_t cg_blueTeamName; +extern vmCvar_t cg_currentSelectedPlayer; +extern vmCvar_t cg_currentSelectedPlayerName; +extern vmCvar_t cg_singlePlayer; +extern vmCvar_t cg_enableDust; +extern vmCvar_t cg_enableBreath; +extern vmCvar_t cg_singlePlayerActive; +extern vmCvar_t cg_recordSPDemo; +extern vmCvar_t cg_recordSPDemoName; + +extern vmCvar_t ui_myteam; +/* +Ghoul2 Insert Start +*/ + +extern vmCvar_t cg_debugBB; + +/* +Ghoul2 Insert End +*/ + +// +// cg_main.c +// +const char *CG_ConfigString( int index ); +const char *CG_Argv( int arg ); + +void QDECL CG_Printf( const char *msg, ... ); +void QDECL CG_Error( const char *msg, ... ); + +void CG_StartMusic( qboolean bForceStart ); + +void CG_UpdateCvars( void ); + +int CG_CrosshairPlayer( void ); +int CG_LastAttacker( void ); +void CG_LoadMenus(const char *menuFile); +void CG_KeyEvent(int key, qboolean down); +void CG_MouseEvent(int x, int y); +void CG_EventHandling(int type); +void CG_RankRunFrame( void ); +void CG_SetScoreSelection(void *menu); +void CG_BuildSpectatorString(void); +void CG_NextInventory_f(void); +void CG_PrevInventory_f(void); +void CG_NextForcePower_f(void); +void CG_PrevForcePower_f(void); + +// +// cg_view.c +// +void CG_TestModel_f (void); +void CG_TestGun_f (void); +void CG_TestModelNextFrame_f (void); +void CG_TestModelPrevFrame_f (void); +void CG_TestModelNextSkin_f (void); +void CG_TestModelPrevSkin_f (void); +void CG_ZoomDown_f( void ); +void CG_ZoomUp_f( void ); +void CG_AddBufferedSound( sfxHandle_t sfx); + +void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ); +/* +Ghoul2 Insert Start +*/ + +void CG_TestG2Model_f (void); +void CG_TestModelSurfaceOnOff_f(void); +void CG_ListModelSurfaces_f (void); +void CG_ListModelBones_f (void); +void CG_TestModelSetAnglespre_f(void); +void CG_TestModelSetAnglespost_f(void); +void CG_TestModelAnimate_f(void); +/* +Ghoul2 Insert End +*/ + +// +// cg_drawtools.c +// +void CG_FillRect( float x, float y, float width, float height, const float *color ); +void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader ); +void CG_DrawRotatePic( float x, float y, float width, float height,float angle, qhandle_t hShader ); +void CG_DrawRotatePic2( float x, float y, float width, float height,float angle, qhandle_t hShader ); +void CG_DrawString( float x, float y, const char *string, + float charWidth, float charHeight, const float *modulate ); + +void CG_DrawNumField (int x, int y, int width, int value,int charWidth,int charHeight,int style,qboolean zeroFill); + +void CG_DrawStringExt( int x, int y, const char *string, const float *setColor, + qboolean forceColor, qboolean shadow, int charWidth, int charHeight, int maxChars ); +void CG_DrawBigString( int x, int y, const char *s, float alpha ); +void CG_DrawBigStringColor( int x, int y, const char *s, vec4_t color ); +void CG_DrawSmallString( int x, int y, const char *s, float alpha ); +void CG_DrawSmallStringColor( int x, int y, const char *s, vec4_t color ); + +int CG_DrawStrlen( const char *str ); + +float *CG_FadeColor( int startMsec, int totalMsec ); +float *CG_TeamColor( int team ); +void CG_TileClear( void ); +void CG_ColorForHealth( vec4_t hcolor ); +void CG_GetColorForHealth( int health, int armor, vec4_t hcolor ); + +void UI_DrawProportionalString( int x, int y, const char* str, int style, vec4_t color ); +void UI_DrawScaledProportionalString( int x, int y, const char* str, int style, vec4_t color, float scale); +void CG_DrawRect( float x, float y, float width, float height, float size, const float *color ); +void CG_DrawSides(float x, float y, float w, float h, float size); +void CG_DrawTopBottom(float x, float y, float w, float h, float size); + +// +// cg_draw.c, cg_newDraw.c +// +extern int sortedTeamPlayers[TEAM_MAXOVERLAY]; +extern int numSortedTeamPlayers; +extern int drawTeamOverlayModificationCount; +extern char systemChat[256]; +extern char teamChat1[256]; +extern char teamChat2[256]; + +void CG_AddLagometerFrameInfo( void ); +void CG_AddLagometerSnapshotInfo( snapshot_t *snap ); +void CG_CenterPrint( const char *str, int y, int charWidth ); +void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec3_t headAngles ); +void CG_DrawActive( stereoFrame_t stereoView ); +void CG_DrawFlagModel( float x, float y, float w, float h, int team, qboolean force2D ); +void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int team ); +void CG_OwnerDraw(float x, float y, float w, float h, float text_x, float text_y, int ownerDraw, int ownerDrawFlags, int align, float special, float scale, vec4_t color, qhandle_t shader, int textStyle,int font); +void CG_Text_Paint(float x, float y, float scale, vec4_t color, const char *text, float adjust, int limit, int style, int iMenuFont); +int CG_Text_Width(const char *text, float scale, int iMenuFont); +int CG_Text_Height(const char *text, float scale, int iMenuFont); +void CG_SelectPrevPlayer(void); +void CG_SelectNextPlayer(void); +float CG_GetValue(int ownerDraw); +qboolean CG_OwnerDrawVisible(int flags); +void CG_RunMenuScript(char **args); +qboolean CG_DeferMenuScript(char **args); +void CG_ShowResponseHead(void); +void CG_SetPrintString(int type, const char *p); +void CG_InitTeamChat(void); +void CG_GetTeamColor(vec4_t *color); +const char *CG_GetGameStatusText(void); +const char *CG_GetKillerText(void); +void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles ); +void CG_Text_PaintChar(float x, float y, float width, float height, float scale, float s, float t, float s2, float t2, qhandle_t hShader); +void CG_CheckOrderPending(void); +const char *CG_GameTypeString(void); +qboolean CG_YourTeamHasFlag(void); +qboolean CG_OtherTeamHasFlag(void); +qhandle_t CG_StatusHandle(int task); + + + +// +// cg_player.c +// +void CG_Player( centity_t *cent ); +void CG_ResetPlayerEntity( centity_t *cent ); +void CG_AddRefEntityWithPowerups( refEntity_t *ent, entityState_t *state, int team ); +void CG_NewClientInfo( int clientNum, qboolean entitiesInitialized ); +sfxHandle_t CG_CustomSound( int clientNum, const char *soundName ); +void CG_PlayerShieldHit(int entitynum, vec3_t angles, int amount); + + +// +// cg_predict.c +// +void CG_BuildSolidList( void ); +int CG_PointContents( const vec3_t point, int passEntityNum ); +void CG_Trace( trace_t *result, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, + int skipNumber, int mask ); +void CG_PredictPlayerState( void ); +void CG_LoadDeferredPlayers( void ); + + +// +// cg_events.c +// +void CG_CheckEvents( centity_t *cent ); +const char *CG_PlaceString( int rank ); +void CG_EntityEvent( centity_t *cent, vec3_t position ); +void CG_PainEvent( centity_t *cent, int health ); +void CG_ReattachLimb(centity_t *source); + + +// +// cg_ents.c +// +void CG_SetEntitySoundPosition( centity_t *cent ); +void CG_AddPacketEntities( void ); +void CG_ManualEntityRender(centity_t *cent); +void CG_Beam( centity_t *cent ); +void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out ); + +void CG_PositionEntityOnTag( refEntity_t *entity, const refEntity_t *parent, + qhandle_t parentModel, char *tagName ); +void CG_PositionRotatedEntityOnTag( refEntity_t *entity, const refEntity_t *parent, + qhandle_t parentModel, char *tagName ); + +/* +Ghoul2 Insert Start +*/ +void ScaleModelAxis(refEntity_t *ent); +/* +Ghoul2 Insert End +*/ + +// +// cg_turret.c +// +void TurretClientRun(centity_t *ent); + +// +// cg_weapons.c +// +void CG_GetClientWeaponMuzzleBoltPoint(int clIndex, vec3_t to); + +void CG_NextWeapon_f( void ); +void CG_PrevWeapon_f( void ); +void CG_Weapon_f( void ); + +void CG_RegisterWeapon( int weaponNum); +void CG_RegisterItemVisuals( int itemNum ); + +void CG_FireWeapon( centity_t *cent, qboolean alt_fire ); +void CG_MissileHitWall(int weapon, int clientNum, vec3_t origin, vec3_t dir, impactSound_t soundType, qboolean alt_fire, int charge); +void CG_MissileHitPlayer( int weapon, vec3_t origin, vec3_t dir, int entityNum, qboolean alt_fire); + +void CG_AddViewWeapon (playerState_t *ps); +void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent, int team, vec3_t newAngles, qboolean thirdPerson ); +void CG_DrawWeaponSelect( void ); +void CG_DrawIconBackground(void); + +void CG_OutOfAmmoChange( int oldWeapon ); // should this be in pmove? + +// +// cg_marks.c +// +void CG_InitMarkPolys( void ); +void CG_AddMarks( void ); +void CG_ImpactMark( qhandle_t markShader, + const vec3_t origin, const vec3_t dir, + float orientation, + float r, float g, float b, float a, + qboolean alphaFade, + float radius, qboolean temporary ); + +// +// cg_localents.c +// +void CG_InitLocalEntities( void ); +localEntity_t *CG_AllocLocalEntity( void ); +void CG_AddLocalEntities( void ); + +// +// cg_effects.c +// +localEntity_t *CG_SmokePuff( const vec3_t p, + const vec3_t vel, + float radius, + float r, float g, float b, float a, + float duration, + int startTime, + int fadeInTime, + int leFlags, + qhandle_t hShader ); +void CG_BubbleTrail( vec3_t start, vec3_t end, float spacing ); +void CG_GlassShatter(int entnum, vec3_t dmgPt, vec3_t dmgDir, float dmgRadius, int maxShards); +void CG_CreateDebris(int entnum, vec3_t org, vec3_t mins, vec3_t maxs, int debrissound, int debrismodel); +void CG_ScorePlum( int client, vec3_t org, int score ); + +void CG_Bleed( vec3_t origin, int entityNum ); + +localEntity_t *CG_MakeExplosion( vec3_t origin, vec3_t dir, + qhandle_t hModel, int numframes, qhandle_t shader, int msec, + qboolean isSprite, float scale, int flags );// Overloaded in single player + +void CG_SurfaceExplosion( vec3_t origin, vec3_t normal, float radius, float shake_speed, qboolean smoke ); + +void CG_TestLine( vec3_t start, vec3_t end, int time, unsigned int color, int radius); + +void CG_InitGlass( void ); + +// +// cg_snapshot.c +// +void CG_ProcessSnapshots( void ); + +// +// cg_info.c +// +void CG_LoadingString( const char *s ); +void CG_LoadingItem( int itemNum ); +void CG_LoadingClient( int clientNum ); +void CG_DrawInformation( void ); + +// +// cg_scoreboard.c +// +qboolean CG_DrawOldScoreboard( void ); +void CG_DrawOldTourneyScoreboard( void ); + +// +// cg_consolecmds.c +// +qboolean CG_ConsoleCommand( void ); +void CG_InitConsoleCommands( void ); + +// +// cg_servercmds.c +// +void CG_ExecuteNewServerCommands( int latestSequence ); +void CG_ParseServerinfo( void ); +void CG_SetConfigValues( void ); +void CG_LoadVoiceChats( void ); +void CG_ShaderStateChanged(void); +void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color, const char *cmd ); +void CG_PlayBufferedVoiceChats( void ); + +// +// cg_playerstate.c +// +int CG_IsMindTricked(int trickIndex1, int trickIndex2, int trickIndex3, int trickIndex4, int client); +void CG_Respawn( void ); +void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops ); +void CG_CheckChangedPredictableEvents( playerState_t *ps ); + + +// +// cg_saga.c +// +void CG_InitSagaMode(void); +void CG_SagaRoundOver(centity_t *ent, int won); +void CG_SagaObjectiveCompleted(centity_t *ent, int won, int objectivenum); + + + +//=============================================== + +// +// system traps +// These functions are how the cgame communicates with the main game system +// + +// print message on the local console +void trap_Print( const char *fmt ); + +// abort the game +void trap_Error( const char *fmt ); + +// milliseconds should only be used for performance tuning, never +// for anything game related. Get time from the CG_DrawActiveFrame parameter +int trap_Milliseconds( void ); + +// console variable interaction +void trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int flags ); +void trap_Cvar_Update( vmCvar_t *vmCvar ); +void trap_Cvar_Set( const char *var_name, const char *value ); +void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int bufsize ); + +// ServerCommand and ConsoleCommand parameter access +int trap_Argc( void ); +void trap_Argv( int n, char *buffer, int bufferLength ); +void trap_Args( char *buffer, int bufferLength ); + +// filesystem access +// returns length of file +int trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode ); +void trap_FS_Read( void *buffer, int len, fileHandle_t f ); +void trap_FS_Write( const void *buffer, int len, fileHandle_t f ); +void trap_FS_FCloseFile( fileHandle_t f ); + +// add commands to the local console as if they were typed in +// for map changing, etc. The command is not executed immediately, +// but will be executed in order the next time console commands +// are processed +void trap_SendConsoleCommand( const char *text ); + +// register a command name so the console can perform command completion. +// FIXME: replace this with a normal console command "defineCommand"? +void trap_AddCommand( const char *cmdName ); + +// send a string to the server over the network +void trap_SendClientCommand( const char *s ); + +// force a screen update, only used during gamestate load +void trap_UpdateScreen( void ); + +// model collision +void trap_CM_LoadMap( const char *mapname ); +int trap_CM_NumInlineModels( void ); +clipHandle_t trap_CM_InlineModel( int index ); // 0 = world, 1+ = bmodels +clipHandle_t trap_CM_TempBoxModel( const vec3_t mins, const vec3_t maxs ); +int trap_CM_PointContents( const vec3_t p, clipHandle_t model ); +int trap_CM_TransformedPointContents( const vec3_t p, clipHandle_t model, const vec3_t origin, const vec3_t angles ); +void trap_CM_BoxTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask ); +void trap_CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask, + const vec3_t origin, const vec3_t angles ); + +// Returns the projection of a polygon onto the solid brushes in the world +int trap_CM_MarkFragments( int numPoints, const vec3_t *points, + const vec3_t projection, + int maxPoints, vec3_t pointBuffer, + int maxFragments, markFragment_t *fragmentBuffer ); + +// normal sounds will have their volume dynamically changed as their entity +// moves and the listener moves +void trap_S_MuteSound( int entityNum, int entchannel ); +void trap_S_StartSound( vec3_t origin, int entityNum, int entchannel, sfxHandle_t sfx ); +void trap_S_StopLoopingSound(int entnum); + +// a local sound is always played full volume +void trap_S_StartLocalSound( sfxHandle_t sfx, int channelNum ); +void trap_S_ClearLoopingSounds( qboolean killall ); +void trap_S_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx ); +void trap_S_AddRealLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx ); +void trap_S_UpdateEntityPosition( int entityNum, const vec3_t origin ); + +// repatialize recalculates the volumes of sound as they should be heard by the +// given entityNum and position +void trap_S_Respatialize( int entityNum, const vec3_t origin, vec3_t axis[3], int inwater ); +sfxHandle_t trap_S_RegisterSound( const char *sample); // returns buzz if not found +void trap_S_StartBackgroundTrack( const char *intro, const char *loop, qboolean bReturnWithoutStarting); // empty name stops music +void trap_S_StopBackgroundTrack( void ); + + +void trap_R_LoadWorldMap( const char *mapname ); + +// all media should be registered during level startup to prevent +// hitches during gameplay +qhandle_t trap_R_RegisterModel( const char *name ); // returns rgb axis if not found +qhandle_t trap_R_RegisterSkin( const char *name ); // returns all white if not found +qhandle_t trap_R_RegisterShader( const char *name ); // returns all white if not found +qhandle_t trap_R_RegisterShaderNoMip( const char *name ); // returns all white if not found +qhandle_t trap_R_RegisterFont( const char *name ); +int trap_R_Font_StrLenPixels(const char *text, const int iFontIndex, const float scale); +int trap_R_Font_StrLenChars(const char *text); +int trap_R_Font_HeightPixels(const int iFontIndex, const float scale); +void trap_R_Font_DrawString(int ox, int oy, const char *text, const float *rgba, const int setIndex, int iCharLimit, const float scale); +qboolean trap_Language_IsAsian(void); +qboolean trap_Language_UsesSpaces(void); +unsigned trap_AnyLanguage_ReadCharFromString( const char *psText, int *piAdvanceCount, qboolean *pbIsTrailingPunctuation/* = NULL*/ ); + + +// a scene is built up by calls to R_ClearScene and the various R_Add functions. +// Nothing is drawn until R_RenderScene is called. +void trap_R_ClearScene( void ); +void trap_R_AddRefEntityToScene( const refEntity_t *re ); + +// polys are intended for simple wall marks, not really for doing +// significant construction +void trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts ); +void trap_R_AddPolysToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts, int numPolys ); +void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ); +int trap_R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t directedLight, vec3_t lightDir ); +void trap_R_RenderScene( const refdef_t *fd ); +void trap_R_SetColor( const float *rgba ); // NULL = 1,1,1,1 +void trap_R_DrawStretchPic( float x, float y, float w, float h, + float s1, float t1, float s2, float t2, qhandle_t hShader ); +void trap_R_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs ); +int trap_R_LerpTag( orientation_t *tag, clipHandle_t mod, int startFrame, int endFrame, + float frac, const char *tagName ); +// Does weird, barely controllable rotation behaviour +void trap_R_DrawRotatePic( float x, float y, float w, float h, + float s1, float t1, float s2, float t2,float a, qhandle_t hShader ); +// rotates image around exact center point of passed in coords +void trap_R_DrawRotatePic2( float x, float y, float w, float h, + float s1, float t1, float s2, float t2,float a, qhandle_t hShader ); +void trap_R_RemapShader( const char *oldShader, const char *newShader, const char *timeOffset ); + +void trap_R_GetLightStyle(int style, color4ub_t color); +void trap_R_SetLightStyle(int style, int color); + +void trap_R_GetBModelVerts(int bmodelIndex, vec3_t *verts, vec3_t normal ); + +void trap_FX_AddLine( const vec3_t start, const vec3_t end, float size1, float size2, float sizeParm, + float alpha1, float alpha2, float alphaParm, + const vec3_t sRGB, const vec3_t eRGB, float rgbParm, + int killTime, qhandle_t shader, int flags); + +// The glconfig_t will not change during the life of a cgame. +// If it needs to change, the entire cgame will be restarted, because +// all the qhandle_t are then invalid. +void trap_GetGlconfig( glconfig_t *glconfig ); + +// the gamestate should be grabbed at startup, and whenever a +// configstring changes +void trap_GetGameState( gameState_t *gamestate ); + +// cgame will poll each frame to see if a newer snapshot has arrived +// that it is interested in. The time is returned seperately so that +// snapshot latency can be calculated. +void trap_GetCurrentSnapshotNumber( int *snapshotNumber, int *serverTime ); + +// a snapshot get can fail if the snapshot (or the entties it holds) is so +// old that it has fallen out of the client system queue +qboolean trap_GetSnapshot( int snapshotNumber, snapshot_t *snapshot ); + +// retrieve a text command from the server stream +// the current snapshot will hold the number of the most recent command +// qfalse can be returned if the client system handled the command +// argc() / argv() can be used to examine the parameters of the command +qboolean trap_GetServerCommand( int serverCommandNumber ); + +// returns the most recent command number that can be passed to GetUserCmd +// this will always be at least one higher than the number in the current +// snapshot, and it may be quite a few higher if it is a fast computer on +// a lagged connection +int trap_GetCurrentCmdNumber( void ); + +qboolean trap_GetUserCmd( int cmdNumber, usercmd_t *ucmd ); + +// used for the weapon select and zoom +void trap_SetUserCmdValue( int stateValue, float sensitivityScale, int fpSel, int invenSel ); + +void trap_SetClientForceAngle(int time, vec3_t angle); +void trap_SetClientTurnExtent(float turnAdd, float turnSub, int turnTime); + +void trap_OpenUIMenu(int menuID); + +// aids for VM testing +void testPrintInt( char *string, int i ); +void testPrintFloat( char *string, float f ); + +int trap_MemoryRemaining( void ); +qboolean trap_Key_IsDown( int keynum ); +int trap_Key_GetCatcher( void ); +void trap_Key_SetCatcher( int catcher ); +int trap_Key_GetKey( const char *binding ); + +void BG_CycleInven(playerState_t *ps, int direction); +int BG_ProperForceIndex(int power); +void BG_CycleForce(playerState_t *ps, int direction); + + +typedef enum { + SYSTEM_PRINT, + CHAT_PRINT, + TEAMCHAT_PRINT +} q3print_t; // bk001201 - warning: useless keyword or type name in empty declaration + + +int trap_CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits); +e_status trap_CIN_StopCinematic(int handle); +e_status trap_CIN_RunCinematic (int handle); +void trap_CIN_DrawCinematic (int handle); +void trap_CIN_SetExtents (int handle, int x, int y, int w, int h); + +void trap_SnapVector( float *v ); + +qboolean trap_loadCamera(const char *name); +void trap_startCamera(int time); +qboolean trap_getCameraInfo(int time, vec3_t *origin, vec3_t *angles); + +qboolean trap_GetEntityToken( char *buffer, int bufferSize ); +qboolean trap_R_inPVS( const vec3_t p1, const vec3_t p2 ); + +int trap_FX_RegisterEffect(const char *file); +void trap_FX_PlaySimpleEffect( const char *file, vec3_t org ); // uses a default up axis +void trap_FX_PlayEffect( const char *file, vec3_t org, vec3_t fwd ); // builds arbitrary perp. right vector, does a cross product to define up +void trap_FX_PlayEntityEffect( const char *file, vec3_t org, + vec3_t axis[3], const int boltInfo, const int entNum ); +void trap_FX_PlaySimpleEffectID( int id, vec3_t org ); // uses a default up axis +void trap_FX_PlayEffectID( int id, vec3_t org, vec3_t fwd ); // builds arbitrary perp. right vector, does a cross product to define up +void trap_FX_PlayEntityEffectID( int id, vec3_t org, + vec3_t axis[3], const int boltInfo, const int entNum ); +void trap_FX_PlayBoltedEffectID( int id, sharedBoltInterface_t *fxObj ); +void trap_FX_AddScheduledEffects( void ); +int trap_FX_InitSystem( void ); // called in CG_Init to purge the fx system. +qboolean trap_FX_FreeSystem( void ); // ditches all active effects; +void trap_FX_AdjustTime( int time, vec3_t vieworg, vec3_t viewaxis[3] ); + +void trap_FX_AddPoly( addpolyArgStruct_t *p ); +void trap_FX_AddBezier( addbezierArgStruct_t *p ); +void trap_FX_AddPrimitive( effectTrailArgStruct_t *p ); +void trap_FX_AddSprite( addspriteArgStruct_t *p ); + +void trap_SP_Print(const unsigned ID, byte *Data); +int trap_SP_GetStringTextString(const char *text, char *buffer, int bufferLength); + +void trap_CG_RegisterSharedMemory(char *memory); + +qboolean trap_ROFF_Clean( void ); +void trap_ROFF_UpdateEntities( void ); + int trap_ROFF_Cache( char *file ); +qboolean trap_ROFF_Play( int entID, int roffID, qboolean doTranslation ); +qboolean trap_ROFF_Purge_Ent( int entID ); + +void CG_ClearParticles (void); +void CG_AddParticles (void); +void CG_ParticleSnow (qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb, float range, int snum); +void CG_ParticleSmoke (qhandle_t pshader, centity_t *cent); +void CG_AddParticleShrapnel (localEntity_t *le); +void CG_ParticleSnowFlurry (qhandle_t pshader, centity_t *cent); +void CG_ParticleBulletDebris (vec3_t org, vec3_t vel, int duration); +void CG_ParticleSparks (vec3_t org, vec3_t vel, int duration, float x, float y, float speed); +void CG_ParticleDust (centity_t *cent, vec3_t origin, vec3_t dir); +void CG_ParticleMisc (qhandle_t pshader, vec3_t origin, int size, int duration, float alpha); +void CG_ParticleExplosion (char *animStr, vec3_t origin, vec3_t vel, int duration, int sizeStart, int sizeEnd); +const char *CG_GetStripEdString(char *refSection, char *refName); +extern qboolean initparticles; +int CG_NewParticleArea ( int num ); + +void FX_TurretProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_TurretHitWall( vec3_t origin, vec3_t normal ); +void FX_TurretHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +//----------------------------- +// Effects related prototypes +//----------------------------- + +// Environmental effects +void CG_Spark( vec3_t origin, vec3_t dir ); + +// Weapon prototypes +void FX_BryarHitWall( vec3_t origin, vec3_t normal ); +void FX_BryarAltHitWall( vec3_t origin, vec3_t normal, int power ); +void FX_BryarHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_BryarAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +void FX_BlasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterAltFireThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterWeaponHitWall( vec3_t origin, vec3_t normal ); +void FX_BlasterWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + + +void FX_ForceDrained(vec3_t origin, vec3_t dir); + + +//----------------------------- +// Effects related prototypes +//----------------------------- + +// Environmental effects +void CG_Spark( vec3_t origin, vec3_t dir ); + +// Weapon prototypes +void FX_BryarHitWall( vec3_t origin, vec3_t normal ); +void FX_BryarAltHitWall( vec3_t origin, vec3_t normal, int power ); +void FX_BryarHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_BryarAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +void FX_BlasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterAltFireThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterWeaponHitWall( vec3_t origin, vec3_t normal ); +void FX_BlasterWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + + +void trap_G2API_CollisionDetect ( CollisionRecord_t *collRecMap, void* ghoul2, const vec3_t angles, const vec3_t position,int frameNumber, int entNum, const vec3_t rayStart, const vec3_t rayEnd, const vec3_t scale, int traceFlags, int useLod, float fRadius ); + + +/* +Ghoul2 Insert Start +*/ +// CG specific API access +void trap_G2_ListModelSurfaces(void *ghlInfo); +void trap_G2_ListModelBones(void *ghlInfo, int frame); +void trap_G2_SetGhoul2ModelIndexes(void *ghoul2, qhandle_t *modelList, qhandle_t *skinList); +qboolean trap_G2_HaveWeGhoul2Models(void *ghoul2); +qboolean trap_G2API_GetBoltMatrix(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale); +qboolean trap_G2API_GetBoltMatrix_NoReconstruct(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale); +qboolean trap_G2API_GetBoltMatrix_NoRecNoRot(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale); +int trap_G2API_InitGhoul2Model(void **ghoul2Ptr, const char *fileName, int modelIndex, qhandle_t customSkin, + qhandle_t customShader, int modelFlags, int lodBias); + +void trap_G2API_GiveMeVectorFromMatrix(mdxaBone_t *boltMatrix, int flags, vec3_t vec); +int trap_G2API_CopyGhoul2Instance(void *g2From, void *g2To, int modelIndex); +void trap_G2API_CopySpecificGhoul2Model(void *g2From, int modelFrom, void *g2To, int modelTo); +void trap_G2API_DuplicateGhoul2Instance(void *g2From, void **g2To); +qboolean trap_G2API_HasGhoul2ModelOnIndex(void *ghlInfo, int modelIndex); +qboolean trap_G2API_RemoveGhoul2Model(void *ghlInfo, int modelIndex); + +int trap_G2API_AddBolt(void *ghoul2, int modelIndex, const char *boneName); +//qboolean trap_G2API_RemoveBolt(void *ghoul2, int index); +void trap_G2API_SetBoltInfo(void *ghoul2, int modelIndex, int boltInfo); +void trap_G2API_CleanGhoul2Models(void **ghoul2Ptr); +qboolean trap_G2API_SetBoneAngles(void *ghoul2, int modelIndex, const char *boneName, const vec3_t angles, const int flags, + const int up, const int right, const int forward, qhandle_t *modelList, + int blendTime , int currentTime ); +void trap_G2API_GetGLAName(void *ghoul2, int modelIndex, char *fillBuf); +qboolean trap_G2API_SetBoneAnim(void *ghoul2, const int modelIndex, const char *boneName, const int startFrame, const int endFrame, + const int flags, const float animSpeed, const int currentTime, const float setFrame , const int blendTime ); + +qboolean trap_G2API_SetRootSurface(void *ghoul2, const int modelIndex, const char *surfaceName); +qboolean trap_G2API_SetSurfaceOnOff(void *ghoul2, const char *surfaceName, const int flags); +qboolean trap_G2API_SetNewOrigin(void *ghoul2, const int boltIndex); + +void CG_Init_CG(void); +void CG_Init_CGents(void); + + +void CG_SetGhoul2Info( refEntity_t *ent, centity_t *cent); +void CG_CreateBBRefEnts(entityState_t *s1, vec3_t origin ); + +void CG_InitG2Weapons(void); +void CG_ShutDownG2Weapons(void); +void CG_CopyG2WeaponInstance(int weaponNum, void *toGhoul2); +void CG_CheckPlayerG2Weapons(playerState_t *ps, centity_t *cent); + +extern void *g2WeaponInstances[MAX_WEAPONS]; +/* +Ghoul2 Insert End +*/ diff --git a/code/cgame/cg_localents (2).c b/code/cgame/cg_localents (2).c new file mode 100644 index 0000000..982e536 --- /dev/null +++ b/code/cgame/cg_localents (2).c @@ -0,0 +1,861 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + +// cg_localents.c -- every frame, generate renderer commands for locally +// processed entities, like smoke puffs, gibs, shells, etc. + +#include "cg_local.h" + +#define MAX_LOCAL_ENTITIES 512 +localEntity_t cg_localEntities[MAX_LOCAL_ENTITIES]; +localEntity_t cg_activeLocalEntities; // double linked list +localEntity_t *cg_freeLocalEntities; // single linked list + +/* +=================== +CG_InitLocalEntities + +This is called at startup and for tournement restarts +=================== +*/ +void CG_InitLocalEntities( void ) { + int i; + + memset( cg_localEntities, 0, sizeof( cg_localEntities ) ); + cg_activeLocalEntities.next = &cg_activeLocalEntities; + cg_activeLocalEntities.prev = &cg_activeLocalEntities; + cg_freeLocalEntities = cg_localEntities; + for ( i = 0 ; i < MAX_LOCAL_ENTITIES - 1 ; i++ ) { + cg_localEntities[i].next = &cg_localEntities[i+1]; + } +} + + +/* +================== +CG_FreeLocalEntity +================== +*/ +void CG_FreeLocalEntity( localEntity_t *le ) { + if ( !le->prev ) { + CG_Error( "CG_FreeLocalEntity: not active" ); + } + + // remove from the doubly linked active list + le->prev->next = le->next; + le->next->prev = le->prev; + + // the free list is only singly linked + le->next = cg_freeLocalEntities; + cg_freeLocalEntities = le; +} + +/* +=================== +CG_AllocLocalEntity + +Will allways succeed, even if it requires freeing an old active entity +=================== +*/ +localEntity_t *CG_AllocLocalEntity( void ) { + localEntity_t *le; + + if ( !cg_freeLocalEntities ) { + // no free entities, so free the one at the end of the chain + // remove the oldest active entity + CG_FreeLocalEntity( cg_activeLocalEntities.prev ); + } + + le = cg_freeLocalEntities; + cg_freeLocalEntities = cg_freeLocalEntities->next; + + memset( le, 0, sizeof( *le ) ); + + // link into the active list + le->next = cg_activeLocalEntities.next; + le->prev = &cg_activeLocalEntities; + cg_activeLocalEntities.next->prev = le; + cg_activeLocalEntities.next = le; + return le; +} + + +/* +==================================================================================== + +FRAGMENT PROCESSING + +A fragment localentity interacts with the environment in some way (hitting walls), +or generates more localentities along a trail. + +==================================================================================== +*/ + +/* +================ +CG_BloodTrail + +Leave expanding blood puffs behind gibs +================ +*/ +void CG_BloodTrail( localEntity_t *le ) { + int t; + int t2; + int step; + vec3_t newOrigin; + localEntity_t *blood; + + step = 150; + t = step * ( (cg.time - cg.frametime + step ) / step ); + t2 = step * ( cg.time / step ); + + for ( ; t <= t2; t += step ) { + BG_EvaluateTrajectory( &le->pos, t, newOrigin ); + + blood = CG_SmokePuff( newOrigin, vec3_origin, + 20, // radius + 1, 1, 1, 1, // color + 2000, // trailTime + t, // startTime + 0, // fadeInTime + 0, // flags + cgs.media.bloodTrailShader ); + // use the optimized version + blood->leType = LE_FALL_SCALE_FADE; + // drop a total of 40 units over its lifetime + blood->pos.trDelta[2] = 40; + } +} + + +/* +================ +CG_FragmentBounceMark +================ +*/ +void CG_FragmentBounceMark( localEntity_t *le, trace_t *trace ) { + int radius; + + if ( le->leMarkType == LEMT_BLOOD ) { + + radius = 16 + (rand()&31); + CG_ImpactMark( cgs.media.bloodMarkShader, trace->endpos, trace->plane.normal, random()*360, + 1,1,1,1, qtrue, radius, qfalse ); + } else if ( le->leMarkType == LEMT_BURN ) { + + radius = 8 + (rand()&15); + CG_ImpactMark( cgs.media.burnMarkShader, trace->endpos, trace->plane.normal, random()*360, + 1,1,1,1, qtrue, radius, qfalse ); + } + + + // don't allow a fragment to make multiple marks, or they + // pile up while settling + le->leMarkType = LEMT_NONE; +} + +/* +================ +CG_FragmentBounceSound +================ +*/ +void CG_FragmentBounceSound( localEntity_t *le, trace_t *trace ) { + if ( le->leBounceSoundType == LEBS_BLOOD ) { + // half the gibs will make splat sounds + /* + if ( rand() & 1 ) { + int r = rand()&3; + sfxHandle_t s; + + if ( r == 0 ) { + s = cgs.media.gibBounce1Sound; + } else if ( r == 1 ) { + s = cgs.media.gibBounce2Sound; + } else { + s = cgs.media.gibBounce3Sound; + } + trap_S_StartSound( trace->endpos, ENTITYNUM_WORLD, CHAN_AUTO, s ); + + } + */ + } else if ( le->leBounceSoundType == LEBS_BRASS ) { + + } + + // don't allow a fragment to make multiple bounce sounds, + // or it gets too noisy as they settle + le->leBounceSoundType = LEBS_NONE; +} + + +/* +================ +CG_ReflectVelocity +================ +*/ +void CG_ReflectVelocity( localEntity_t *le, trace_t *trace ) { + vec3_t velocity; + float dot; + int hitTime; + + // reflect the velocity on the trace plane + hitTime = cg.time - cg.frametime + cg.frametime * trace->fraction; + BG_EvaluateTrajectoryDelta( &le->pos, hitTime, velocity ); + dot = DotProduct( velocity, trace->plane.normal ); + VectorMA( velocity, -2*dot, trace->plane.normal, le->pos.trDelta ); + + VectorScale( le->pos.trDelta, le->bounceFactor, le->pos.trDelta ); + + VectorCopy( trace->endpos, le->pos.trBase ); + le->pos.trTime = cg.time; + + // check for stop, making sure that even on low FPS systems it doesn't bobble + if ( trace->allsolid || + ( trace->plane.normal[2] > 0 && + ( le->pos.trDelta[2] < 40 || le->pos.trDelta[2] < -cg.frametime * le->pos.trDelta[2] ) ) ) { + le->pos.trType = TR_STATIONARY; + } else { + + } +} + +/* +================ +CG_AddFragment +================ +*/ +void CG_AddFragment( localEntity_t *le ) { + vec3_t newOrigin; + trace_t trace; + + if (le->forceAlpha) + { + le->refEntity.renderfx |= RF_FORCE_ENT_ALPHA; + le->refEntity.shaderRGBA[3] = le->forceAlpha; + } + + if ( le->pos.trType == TR_STATIONARY ) { + // sink into the ground if near the removal time + int t; + float t_e; + + t = le->endTime - cg.time; + if ( t < (SINK_TIME*2) ) { + le->refEntity.renderfx |= RF_FORCE_ENT_ALPHA; + t_e = (float)((float)(le->endTime - cg.time)/(SINK_TIME*2)); + t_e = (int)((t_e)*255); + + if (t_e > 255) + { + t_e = 255; + } + if (t_e < 1) + { + t_e = 1; + } + + if (le->refEntity.shaderRGBA[3] && t_e > le->refEntity.shaderRGBA[3]) + { + t_e = le->refEntity.shaderRGBA[3]; + } + + le->refEntity.shaderRGBA[3] = t_e; + + trap_R_AddRefEntityToScene( &le->refEntity ); + } else { + trap_R_AddRefEntityToScene( &le->refEntity ); + } + + return; + } + + // calculate new position + BG_EvaluateTrajectory( &le->pos, cg.time, newOrigin ); + + // trace a line from previous position to new position + CG_Trace( &trace, le->refEntity.origin, NULL, NULL, newOrigin, -1, CONTENTS_SOLID ); + if ( trace.fraction == 1.0 ) { + // still in free fall + VectorCopy( newOrigin, le->refEntity.origin ); + + if ( le->leFlags & LEF_TUMBLE ) { + vec3_t angles; + + BG_EvaluateTrajectory( &le->angles, cg.time, angles ); + AnglesToAxis( angles, le->refEntity.axis ); + } + + trap_R_AddRefEntityToScene( &le->refEntity ); + + // add a blood trail + if ( le->leBounceSoundType == LEBS_BLOOD ) { + CG_BloodTrail( le ); + } + + return; + } + + // if it is in a nodrop zone, remove it + // this keeps gibs from waiting at the bottom of pits of death + // and floating levels + if ( trap_CM_PointContents( trace.endpos, 0 ) & CONTENTS_NODROP ) { + CG_FreeLocalEntity( le ); + return; + } + + if (!trace.startsolid) + { + // leave a mark + CG_FragmentBounceMark( le, &trace ); + + // do a bouncy sound + CG_FragmentBounceSound( le, &trace ); + + if (le->bounceSound) + { //specified bounce sound (debris) + trap_S_StartSound(le->pos.trBase, ENTITYNUM_WORLD, CHAN_AUTO, le->bounceSound); + } + + // reflect the velocity on the trace plane + CG_ReflectVelocity( le, &trace ); + + trap_R_AddRefEntityToScene( &le->refEntity ); + } +} + +/* +===================================================================== + +TRIVIAL LOCAL ENTITIES + +These only do simple scaling or modulation before passing to the renderer +===================================================================== +*/ + +/* +==================== +CG_AddFadeRGB +==================== +*/ +void CG_AddFadeRGB( localEntity_t *le ) { + refEntity_t *re; + float c; + + re = &le->refEntity; + + c = ( le->endTime - cg.time ) * le->lifeRate; + c *= 0xff; + + re->shaderRGBA[0] = le->color[0] * c; + re->shaderRGBA[1] = le->color[1] * c; + re->shaderRGBA[2] = le->color[2] * c; + re->shaderRGBA[3] = le->color[3] * c; + + trap_R_AddRefEntityToScene( re ); +} + +static void CG_AddFadeScaleModel( localEntity_t *le ) +{ + refEntity_t *ent = &le->refEntity; + + float frac = ( cg.time - le->startTime )/((float)( le->endTime - le->startTime )); + + frac *= frac * frac; // yes, this is completely ridiculous...but it causes the shell to grow slowly then "explode" at the end + + ent->nonNormalizedAxes = qtrue; + + AxisCopy( axisDefault, ent->axis ); + + VectorScale( ent->axis[0], le->radius * frac, ent->axis[0] ); + VectorScale( ent->axis[1], le->radius * frac, ent->axis[1] ); + VectorScale( ent->axis[2], le->radius * 0.5f * frac, ent->axis[2] ); + + frac = 1.0f - frac; + + ent->shaderRGBA[0] = le->color[0] * frac; + ent->shaderRGBA[1] = le->color[1] * frac; + ent->shaderRGBA[2] = le->color[2] * frac; + ent->shaderRGBA[3] = le->color[3] * frac; + + // add the entity + trap_R_AddRefEntityToScene( ent ); +} + +/* +================== +CG_AddMoveScaleFade +================== +*/ +static void CG_AddMoveScaleFade( localEntity_t *le ) { + refEntity_t *re; + float c; + vec3_t delta; + float len; + + re = &le->refEntity; + + if ( le->fadeInTime > le->startTime && cg.time < le->fadeInTime ) { + // fade / grow time + c = 1.0 - (float) ( le->fadeInTime - cg.time ) / ( le->fadeInTime - le->startTime ); + } + else { + // fade / grow time + c = ( le->endTime - cg.time ) * le->lifeRate; + } + + re->shaderRGBA[3] = 0xff * c * le->color[3]; + + if ( !( le->leFlags & LEF_PUFF_DONT_SCALE ) ) { + re->radius = le->radius * ( 1.0 - c ) + 8; + } + + BG_EvaluateTrajectory( &le->pos, cg.time, re->origin ); + + // if the view would be "inside" the sprite, kill the sprite + // so it doesn't add too much overdraw + VectorSubtract( re->origin, cg.refdef.vieworg, delta ); + len = VectorLength( delta ); + if ( len < le->radius ) { + CG_FreeLocalEntity( le ); + return; + } + + trap_R_AddRefEntityToScene( re ); +} + +/* +================== +CG_AddPuff +================== +*/ +static void CG_AddPuff( localEntity_t *le ) { + refEntity_t *re; + float c; + vec3_t delta; + float len; + + re = &le->refEntity; + + // fade / grow time + c = ( le->endTime - cg.time ) / (float)( le->endTime - le->startTime ); + + re->shaderRGBA[0] = le->color[0] * c; + re->shaderRGBA[1] = le->color[1] * c; + re->shaderRGBA[2] = le->color[2] * c; + + if ( !( le->leFlags & LEF_PUFF_DONT_SCALE ) ) { + re->radius = le->radius * ( 1.0 - c ) + 8; + } + + BG_EvaluateTrajectory( &le->pos, cg.time, re->origin ); + + // if the view would be "inside" the sprite, kill the sprite + // so it doesn't add too much overdraw + VectorSubtract( re->origin, cg.refdef.vieworg, delta ); + len = VectorLength( delta ); + if ( len < le->radius ) { + CG_FreeLocalEntity( le ); + return; + } + + trap_R_AddRefEntityToScene( re ); +} + +/* +=================== +CG_AddScaleFade + +For rocket smokes that hang in place, fade out, and are +removed if the view passes through them. +There are often many of these, so it needs to be simple. +=================== +*/ +static void CG_AddScaleFade( localEntity_t *le ) { + refEntity_t *re; + float c; + vec3_t delta; + float len; + + re = &le->refEntity; + + // fade / grow time + c = ( le->endTime - cg.time ) * le->lifeRate; + + re->shaderRGBA[3] = 0xff * c * le->color[3]; + re->radius = le->radius * ( 1.0 - c ) + 8; + + // if the view would be "inside" the sprite, kill the sprite + // so it doesn't add too much overdraw + VectorSubtract( re->origin, cg.refdef.vieworg, delta ); + len = VectorLength( delta ); + if ( len < le->radius ) { + CG_FreeLocalEntity( le ); + return; + } + + trap_R_AddRefEntityToScene( re ); +} + + +/* +================= +CG_AddFallScaleFade + +This is just an optimized CG_AddMoveScaleFade +For blood mists that drift down, fade out, and are +removed if the view passes through them. +There are often 100+ of these, so it needs to be simple. +================= +*/ +static void CG_AddFallScaleFade( localEntity_t *le ) { + refEntity_t *re; + float c; + vec3_t delta; + float len; + + re = &le->refEntity; + + // fade time + c = ( le->endTime - cg.time ) * le->lifeRate; + + re->shaderRGBA[3] = 0xff * c * le->color[3]; + + re->origin[2] = le->pos.trBase[2] - ( 1.0 - c ) * le->pos.trDelta[2]; + + re->radius = le->radius * ( 1.0 - c ) + 16; + + // if the view would be "inside" the sprite, kill the sprite + // so it doesn't add too much overdraw + VectorSubtract( re->origin, cg.refdef.vieworg, delta ); + len = VectorLength( delta ); + if ( len < le->radius ) { + CG_FreeLocalEntity( le ); + return; + } + + trap_R_AddRefEntityToScene( re ); +} + + + +/* +================ +CG_AddExplosion +================ +*/ +static void CG_AddExplosion( localEntity_t *ex ) { + refEntity_t *ent; + + ent = &ex->refEntity; + + // add the entity + trap_R_AddRefEntityToScene(ent); + + // add the dlight + if ( ex->light ) { + float light; + + light = (float)( cg.time - ex->startTime ) / ( ex->endTime - ex->startTime ); + if ( light < 0.5 ) { + light = 1.0; + } else { + light = 1.0 - ( light - 0.5 ) * 2; + } + light = ex->light * light; + trap_R_AddLightToScene(ent->origin, light, ex->lightColor[0], ex->lightColor[1], ex->lightColor[2] ); + } +} + +/* +================ +CG_AddSpriteExplosion +================ +*/ +static void CG_AddSpriteExplosion( localEntity_t *le ) { + refEntity_t re; + float c; + + re = le->refEntity; + + c = ( le->endTime - cg.time ) / ( float ) ( le->endTime - le->startTime ); + if ( c > 1 ) { + c = 1.0; // can happen during connection problems + } + + re.shaderRGBA[0] = 0xff; + re.shaderRGBA[1] = 0xff; + re.shaderRGBA[2] = 0xff; + re.shaderRGBA[3] = 0xff * c * 0.33; + + re.reType = RT_SPRITE; + re.radius = 42 * ( 1.0 - c ) + 30; + + trap_R_AddRefEntityToScene( &re ); + + // add the dlight + if ( le->light ) { + float light; + + light = (float)( cg.time - le->startTime ) / ( le->endTime - le->startTime ); + if ( light < 0.5 ) { + light = 1.0; + } else { + light = 1.0 - ( light - 0.5 ) * 2; + } + light = le->light * light; + trap_R_AddLightToScene(re.origin, light, le->lightColor[0], le->lightColor[1], le->lightColor[2] ); + } +} + + +/* +=================== +CG_AddRefEntity +=================== +*/ +void CG_AddRefEntity( localEntity_t *le ) { + if (le->endTime < cg.time) { + CG_FreeLocalEntity( le ); + return; + } + trap_R_AddRefEntityToScene( &le->refEntity ); +} + +/* +=================== +CG_AddScorePlum +=================== +*/ +#define NUMBER_SIZE 8 + +void CG_AddScorePlum( localEntity_t *le ) { + refEntity_t *re; + vec3_t origin, delta, dir, vec, up = {0, 0, 1}; + float c, len; + int i, score, digits[10], numdigits, negative; + + re = &le->refEntity; + + c = ( le->endTime - cg.time ) * le->lifeRate; + + score = le->radius; + if (score < 0) { + re->shaderRGBA[0] = 0xff; + re->shaderRGBA[1] = 0x11; + re->shaderRGBA[2] = 0x11; + } + else { + re->shaderRGBA[0] = 0xff; + re->shaderRGBA[1] = 0xff; + re->shaderRGBA[2] = 0xff; + if (score >= 50) { + re->shaderRGBA[1] = 0; + } else if (score >= 20) { + re->shaderRGBA[0] = re->shaderRGBA[1] = 0; + } else if (score >= 10) { + re->shaderRGBA[2] = 0; + } else if (score >= 2) { + re->shaderRGBA[0] = re->shaderRGBA[2] = 0; + } + + } + if (c < 0.25) + re->shaderRGBA[3] = 0xff * 4 * c; + else + re->shaderRGBA[3] = 0xff; + + re->radius = NUMBER_SIZE / 2; + + VectorCopy(le->pos.trBase, origin); + origin[2] += 110 - c * 100; + + VectorSubtract(cg.refdef.vieworg, origin, dir); + CrossProduct(dir, up, vec); + VectorNormalize(vec); + + VectorMA(origin, -10 + 20 * sin(c * 2 * M_PI), vec, origin); + + // if the view would be "inside" the sprite, kill the sprite + // so it doesn't add too much overdraw + VectorSubtract( origin, cg.refdef.vieworg, delta ); + len = VectorLength( delta ); + if ( len < 20 ) { + CG_FreeLocalEntity( le ); + return; + } + + negative = qfalse; + if (score < 0) { + negative = qtrue; + score = -score; + } + + for (numdigits = 0; !(numdigits && !score); numdigits++) { + digits[numdigits] = score % 10; + score = score / 10; + } + + if (negative) { + digits[numdigits] = 10; + numdigits++; + } + + for (i = 0; i < numdigits; i++) { + VectorMA(origin, (float) (((float) numdigits / 2) - i) * NUMBER_SIZE, vec, re->origin); + re->customShader = cgs.media.numberShaders[digits[numdigits-1-i]]; + trap_R_AddRefEntityToScene( re ); + } +} + +/* +=================== +CG_AddOLine + +For forcefields/other rectangular things +=================== +*/ +void CG_AddOLine( localEntity_t *le ) +{ + refEntity_t *re; + float frac, alpha; + + re = &le->refEntity; + + frac = (cg.time - le->startTime) / ( float ) ( le->endTime - le->startTime ); + if ( frac > 1 ) + frac = 1.0; // can happen during connection problems + else if (frac < 0) + frac = 0.0; + + // Use the liferate to set the scale over time. + re->data.line.width = le->data.line.width + (le->data.line.dwidth * frac); + if (re->data.line.width <= 0) + { + CG_FreeLocalEntity( le ); + return; + } + + // We will assume here that we want additive transparency effects. + alpha = le->alpha + (le->dalpha * frac); + re->shaderRGBA[0] = 0xff * alpha; + re->shaderRGBA[1] = 0xff * alpha; + re->shaderRGBA[2] = 0xff * alpha; + re->shaderRGBA[3] = 0xff * alpha; // Yes, we could apply c to this too, but fading the color is better for lines. + + re->shaderTexCoord[0] = 1; + re->shaderTexCoord[1] = 1; + + re->rotation = 90; + + re->reType = RT_ORIENTEDLINE; + + trap_R_AddRefEntityToScene( re ); +} + +/* +=================== +CG_AddLine + +for beams and the like. +=================== +*/ +void CG_AddLine( localEntity_t *le ) +{ + refEntity_t *re; + + re = &le->refEntity; + + re->reType = RT_LINE; + + trap_R_AddRefEntityToScene( re ); +} + +//============================================================================== + +/* +=================== +CG_AddLocalEntities + +=================== +*/ +void CG_AddLocalEntities( void ) { + localEntity_t *le, *next; + + // walk the list backwards, so any new local entities generated + // (trails, marks, etc) will be present this frame + le = cg_activeLocalEntities.prev; + for ( ; le != &cg_activeLocalEntities ; le = next ) { + // grab next now, so if the local entity is freed we + // still have it + next = le->prev; + + if ( cg.time >= le->endTime ) { + CG_FreeLocalEntity( le ); + continue; + } + switch ( le->leType ) { + default: + CG_Error( "Bad leType: %i", le->leType ); + break; + + case LE_MARK: + break; + + case LE_SPRITE_EXPLOSION: + CG_AddSpriteExplosion( le ); + break; + + case LE_EXPLOSION: + CG_AddExplosion( le ); + break; + + case LE_FADE_SCALE_MODEL: + CG_AddFadeScaleModel( le ); + break; + + case LE_FRAGMENT: // gibs and brass + CG_AddFragment( le ); + break; + + case LE_PUFF: + CG_AddPuff( le ); + break; + + case LE_MOVE_SCALE_FADE: // water bubbles + CG_AddMoveScaleFade( le ); + break; + + case LE_FADE_RGB: // teleporters, railtrails + CG_AddFadeRGB( le ); + break; + + case LE_FALL_SCALE_FADE: // gib blood trails + CG_AddFallScaleFade( le ); + break; + + case LE_SCALE_FADE: // rocket trails + CG_AddScaleFade( le ); + break; + + case LE_SCOREPLUM: + CG_AddScorePlum( le ); + break; + + case LE_OLINE: + CG_AddOLine( le ); + break; + + case LE_SHOWREFENTITY: + CG_AddRefEntity( le ); + break; + + case LE_LINE: // oriented lines for FX + CG_AddLine( le ); + break; + } + } +} + + + + diff --git a/code/cgame/cg_localents.c b/code/cgame/cg_localents.c new file mode 100644 index 0000000..982e536 --- /dev/null +++ b/code/cgame/cg_localents.c @@ -0,0 +1,861 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + +// cg_localents.c -- every frame, generate renderer commands for locally +// processed entities, like smoke puffs, gibs, shells, etc. + +#include "cg_local.h" + +#define MAX_LOCAL_ENTITIES 512 +localEntity_t cg_localEntities[MAX_LOCAL_ENTITIES]; +localEntity_t cg_activeLocalEntities; // double linked list +localEntity_t *cg_freeLocalEntities; // single linked list + +/* +=================== +CG_InitLocalEntities + +This is called at startup and for tournement restarts +=================== +*/ +void CG_InitLocalEntities( void ) { + int i; + + memset( cg_localEntities, 0, sizeof( cg_localEntities ) ); + cg_activeLocalEntities.next = &cg_activeLocalEntities; + cg_activeLocalEntities.prev = &cg_activeLocalEntities; + cg_freeLocalEntities = cg_localEntities; + for ( i = 0 ; i < MAX_LOCAL_ENTITIES - 1 ; i++ ) { + cg_localEntities[i].next = &cg_localEntities[i+1]; + } +} + + +/* +================== +CG_FreeLocalEntity +================== +*/ +void CG_FreeLocalEntity( localEntity_t *le ) { + if ( !le->prev ) { + CG_Error( "CG_FreeLocalEntity: not active" ); + } + + // remove from the doubly linked active list + le->prev->next = le->next; + le->next->prev = le->prev; + + // the free list is only singly linked + le->next = cg_freeLocalEntities; + cg_freeLocalEntities = le; +} + +/* +=================== +CG_AllocLocalEntity + +Will allways succeed, even if it requires freeing an old active entity +=================== +*/ +localEntity_t *CG_AllocLocalEntity( void ) { + localEntity_t *le; + + if ( !cg_freeLocalEntities ) { + // no free entities, so free the one at the end of the chain + // remove the oldest active entity + CG_FreeLocalEntity( cg_activeLocalEntities.prev ); + } + + le = cg_freeLocalEntities; + cg_freeLocalEntities = cg_freeLocalEntities->next; + + memset( le, 0, sizeof( *le ) ); + + // link into the active list + le->next = cg_activeLocalEntities.next; + le->prev = &cg_activeLocalEntities; + cg_activeLocalEntities.next->prev = le; + cg_activeLocalEntities.next = le; + return le; +} + + +/* +==================================================================================== + +FRAGMENT PROCESSING + +A fragment localentity interacts with the environment in some way (hitting walls), +or generates more localentities along a trail. + +==================================================================================== +*/ + +/* +================ +CG_BloodTrail + +Leave expanding blood puffs behind gibs +================ +*/ +void CG_BloodTrail( localEntity_t *le ) { + int t; + int t2; + int step; + vec3_t newOrigin; + localEntity_t *blood; + + step = 150; + t = step * ( (cg.time - cg.frametime + step ) / step ); + t2 = step * ( cg.time / step ); + + for ( ; t <= t2; t += step ) { + BG_EvaluateTrajectory( &le->pos, t, newOrigin ); + + blood = CG_SmokePuff( newOrigin, vec3_origin, + 20, // radius + 1, 1, 1, 1, // color + 2000, // trailTime + t, // startTime + 0, // fadeInTime + 0, // flags + cgs.media.bloodTrailShader ); + // use the optimized version + blood->leType = LE_FALL_SCALE_FADE; + // drop a total of 40 units over its lifetime + blood->pos.trDelta[2] = 40; + } +} + + +/* +================ +CG_FragmentBounceMark +================ +*/ +void CG_FragmentBounceMark( localEntity_t *le, trace_t *trace ) { + int radius; + + if ( le->leMarkType == LEMT_BLOOD ) { + + radius = 16 + (rand()&31); + CG_ImpactMark( cgs.media.bloodMarkShader, trace->endpos, trace->plane.normal, random()*360, + 1,1,1,1, qtrue, radius, qfalse ); + } else if ( le->leMarkType == LEMT_BURN ) { + + radius = 8 + (rand()&15); + CG_ImpactMark( cgs.media.burnMarkShader, trace->endpos, trace->plane.normal, random()*360, + 1,1,1,1, qtrue, radius, qfalse ); + } + + + // don't allow a fragment to make multiple marks, or they + // pile up while settling + le->leMarkType = LEMT_NONE; +} + +/* +================ +CG_FragmentBounceSound +================ +*/ +void CG_FragmentBounceSound( localEntity_t *le, trace_t *trace ) { + if ( le->leBounceSoundType == LEBS_BLOOD ) { + // half the gibs will make splat sounds + /* + if ( rand() & 1 ) { + int r = rand()&3; + sfxHandle_t s; + + if ( r == 0 ) { + s = cgs.media.gibBounce1Sound; + } else if ( r == 1 ) { + s = cgs.media.gibBounce2Sound; + } else { + s = cgs.media.gibBounce3Sound; + } + trap_S_StartSound( trace->endpos, ENTITYNUM_WORLD, CHAN_AUTO, s ); + + } + */ + } else if ( le->leBounceSoundType == LEBS_BRASS ) { + + } + + // don't allow a fragment to make multiple bounce sounds, + // or it gets too noisy as they settle + le->leBounceSoundType = LEBS_NONE; +} + + +/* +================ +CG_ReflectVelocity +================ +*/ +void CG_ReflectVelocity( localEntity_t *le, trace_t *trace ) { + vec3_t velocity; + float dot; + int hitTime; + + // reflect the velocity on the trace plane + hitTime = cg.time - cg.frametime + cg.frametime * trace->fraction; + BG_EvaluateTrajectoryDelta( &le->pos, hitTime, velocity ); + dot = DotProduct( velocity, trace->plane.normal ); + VectorMA( velocity, -2*dot, trace->plane.normal, le->pos.trDelta ); + + VectorScale( le->pos.trDelta, le->bounceFactor, le->pos.trDelta ); + + VectorCopy( trace->endpos, le->pos.trBase ); + le->pos.trTime = cg.time; + + // check for stop, making sure that even on low FPS systems it doesn't bobble + if ( trace->allsolid || + ( trace->plane.normal[2] > 0 && + ( le->pos.trDelta[2] < 40 || le->pos.trDelta[2] < -cg.frametime * le->pos.trDelta[2] ) ) ) { + le->pos.trType = TR_STATIONARY; + } else { + + } +} + +/* +================ +CG_AddFragment +================ +*/ +void CG_AddFragment( localEntity_t *le ) { + vec3_t newOrigin; + trace_t trace; + + if (le->forceAlpha) + { + le->refEntity.renderfx |= RF_FORCE_ENT_ALPHA; + le->refEntity.shaderRGBA[3] = le->forceAlpha; + } + + if ( le->pos.trType == TR_STATIONARY ) { + // sink into the ground if near the removal time + int t; + float t_e; + + t = le->endTime - cg.time; + if ( t < (SINK_TIME*2) ) { + le->refEntity.renderfx |= RF_FORCE_ENT_ALPHA; + t_e = (float)((float)(le->endTime - cg.time)/(SINK_TIME*2)); + t_e = (int)((t_e)*255); + + if (t_e > 255) + { + t_e = 255; + } + if (t_e < 1) + { + t_e = 1; + } + + if (le->refEntity.shaderRGBA[3] && t_e > le->refEntity.shaderRGBA[3]) + { + t_e = le->refEntity.shaderRGBA[3]; + } + + le->refEntity.shaderRGBA[3] = t_e; + + trap_R_AddRefEntityToScene( &le->refEntity ); + } else { + trap_R_AddRefEntityToScene( &le->refEntity ); + } + + return; + } + + // calculate new position + BG_EvaluateTrajectory( &le->pos, cg.time, newOrigin ); + + // trace a line from previous position to new position + CG_Trace( &trace, le->refEntity.origin, NULL, NULL, newOrigin, -1, CONTENTS_SOLID ); + if ( trace.fraction == 1.0 ) { + // still in free fall + VectorCopy( newOrigin, le->refEntity.origin ); + + if ( le->leFlags & LEF_TUMBLE ) { + vec3_t angles; + + BG_EvaluateTrajectory( &le->angles, cg.time, angles ); + AnglesToAxis( angles, le->refEntity.axis ); + } + + trap_R_AddRefEntityToScene( &le->refEntity ); + + // add a blood trail + if ( le->leBounceSoundType == LEBS_BLOOD ) { + CG_BloodTrail( le ); + } + + return; + } + + // if it is in a nodrop zone, remove it + // this keeps gibs from waiting at the bottom of pits of death + // and floating levels + if ( trap_CM_PointContents( trace.endpos, 0 ) & CONTENTS_NODROP ) { + CG_FreeLocalEntity( le ); + return; + } + + if (!trace.startsolid) + { + // leave a mark + CG_FragmentBounceMark( le, &trace ); + + // do a bouncy sound + CG_FragmentBounceSound( le, &trace ); + + if (le->bounceSound) + { //specified bounce sound (debris) + trap_S_StartSound(le->pos.trBase, ENTITYNUM_WORLD, CHAN_AUTO, le->bounceSound); + } + + // reflect the velocity on the trace plane + CG_ReflectVelocity( le, &trace ); + + trap_R_AddRefEntityToScene( &le->refEntity ); + } +} + +/* +===================================================================== + +TRIVIAL LOCAL ENTITIES + +These only do simple scaling or modulation before passing to the renderer +===================================================================== +*/ + +/* +==================== +CG_AddFadeRGB +==================== +*/ +void CG_AddFadeRGB( localEntity_t *le ) { + refEntity_t *re; + float c; + + re = &le->refEntity; + + c = ( le->endTime - cg.time ) * le->lifeRate; + c *= 0xff; + + re->shaderRGBA[0] = le->color[0] * c; + re->shaderRGBA[1] = le->color[1] * c; + re->shaderRGBA[2] = le->color[2] * c; + re->shaderRGBA[3] = le->color[3] * c; + + trap_R_AddRefEntityToScene( re ); +} + +static void CG_AddFadeScaleModel( localEntity_t *le ) +{ + refEntity_t *ent = &le->refEntity; + + float frac = ( cg.time - le->startTime )/((float)( le->endTime - le->startTime )); + + frac *= frac * frac; // yes, this is completely ridiculous...but it causes the shell to grow slowly then "explode" at the end + + ent->nonNormalizedAxes = qtrue; + + AxisCopy( axisDefault, ent->axis ); + + VectorScale( ent->axis[0], le->radius * frac, ent->axis[0] ); + VectorScale( ent->axis[1], le->radius * frac, ent->axis[1] ); + VectorScale( ent->axis[2], le->radius * 0.5f * frac, ent->axis[2] ); + + frac = 1.0f - frac; + + ent->shaderRGBA[0] = le->color[0] * frac; + ent->shaderRGBA[1] = le->color[1] * frac; + ent->shaderRGBA[2] = le->color[2] * frac; + ent->shaderRGBA[3] = le->color[3] * frac; + + // add the entity + trap_R_AddRefEntityToScene( ent ); +} + +/* +================== +CG_AddMoveScaleFade +================== +*/ +static void CG_AddMoveScaleFade( localEntity_t *le ) { + refEntity_t *re; + float c; + vec3_t delta; + float len; + + re = &le->refEntity; + + if ( le->fadeInTime > le->startTime && cg.time < le->fadeInTime ) { + // fade / grow time + c = 1.0 - (float) ( le->fadeInTime - cg.time ) / ( le->fadeInTime - le->startTime ); + } + else { + // fade / grow time + c = ( le->endTime - cg.time ) * le->lifeRate; + } + + re->shaderRGBA[3] = 0xff * c * le->color[3]; + + if ( !( le->leFlags & LEF_PUFF_DONT_SCALE ) ) { + re->radius = le->radius * ( 1.0 - c ) + 8; + } + + BG_EvaluateTrajectory( &le->pos, cg.time, re->origin ); + + // if the view would be "inside" the sprite, kill the sprite + // so it doesn't add too much overdraw + VectorSubtract( re->origin, cg.refdef.vieworg, delta ); + len = VectorLength( delta ); + if ( len < le->radius ) { + CG_FreeLocalEntity( le ); + return; + } + + trap_R_AddRefEntityToScene( re ); +} + +/* +================== +CG_AddPuff +================== +*/ +static void CG_AddPuff( localEntity_t *le ) { + refEntity_t *re; + float c; + vec3_t delta; + float len; + + re = &le->refEntity; + + // fade / grow time + c = ( le->endTime - cg.time ) / (float)( le->endTime - le->startTime ); + + re->shaderRGBA[0] = le->color[0] * c; + re->shaderRGBA[1] = le->color[1] * c; + re->shaderRGBA[2] = le->color[2] * c; + + if ( !( le->leFlags & LEF_PUFF_DONT_SCALE ) ) { + re->radius = le->radius * ( 1.0 - c ) + 8; + } + + BG_EvaluateTrajectory( &le->pos, cg.time, re->origin ); + + // if the view would be "inside" the sprite, kill the sprite + // so it doesn't add too much overdraw + VectorSubtract( re->origin, cg.refdef.vieworg, delta ); + len = VectorLength( delta ); + if ( len < le->radius ) { + CG_FreeLocalEntity( le ); + return; + } + + trap_R_AddRefEntityToScene( re ); +} + +/* +=================== +CG_AddScaleFade + +For rocket smokes that hang in place, fade out, and are +removed if the view passes through them. +There are often many of these, so it needs to be simple. +=================== +*/ +static void CG_AddScaleFade( localEntity_t *le ) { + refEntity_t *re; + float c; + vec3_t delta; + float len; + + re = &le->refEntity; + + // fade / grow time + c = ( le->endTime - cg.time ) * le->lifeRate; + + re->shaderRGBA[3] = 0xff * c * le->color[3]; + re->radius = le->radius * ( 1.0 - c ) + 8; + + // if the view would be "inside" the sprite, kill the sprite + // so it doesn't add too much overdraw + VectorSubtract( re->origin, cg.refdef.vieworg, delta ); + len = VectorLength( delta ); + if ( len < le->radius ) { + CG_FreeLocalEntity( le ); + return; + } + + trap_R_AddRefEntityToScene( re ); +} + + +/* +================= +CG_AddFallScaleFade + +This is just an optimized CG_AddMoveScaleFade +For blood mists that drift down, fade out, and are +removed if the view passes through them. +There are often 100+ of these, so it needs to be simple. +================= +*/ +static void CG_AddFallScaleFade( localEntity_t *le ) { + refEntity_t *re; + float c; + vec3_t delta; + float len; + + re = &le->refEntity; + + // fade time + c = ( le->endTime - cg.time ) * le->lifeRate; + + re->shaderRGBA[3] = 0xff * c * le->color[3]; + + re->origin[2] = le->pos.trBase[2] - ( 1.0 - c ) * le->pos.trDelta[2]; + + re->radius = le->radius * ( 1.0 - c ) + 16; + + // if the view would be "inside" the sprite, kill the sprite + // so it doesn't add too much overdraw + VectorSubtract( re->origin, cg.refdef.vieworg, delta ); + len = VectorLength( delta ); + if ( len < le->radius ) { + CG_FreeLocalEntity( le ); + return; + } + + trap_R_AddRefEntityToScene( re ); +} + + + +/* +================ +CG_AddExplosion +================ +*/ +static void CG_AddExplosion( localEntity_t *ex ) { + refEntity_t *ent; + + ent = &ex->refEntity; + + // add the entity + trap_R_AddRefEntityToScene(ent); + + // add the dlight + if ( ex->light ) { + float light; + + light = (float)( cg.time - ex->startTime ) / ( ex->endTime - ex->startTime ); + if ( light < 0.5 ) { + light = 1.0; + } else { + light = 1.0 - ( light - 0.5 ) * 2; + } + light = ex->light * light; + trap_R_AddLightToScene(ent->origin, light, ex->lightColor[0], ex->lightColor[1], ex->lightColor[2] ); + } +} + +/* +================ +CG_AddSpriteExplosion +================ +*/ +static void CG_AddSpriteExplosion( localEntity_t *le ) { + refEntity_t re; + float c; + + re = le->refEntity; + + c = ( le->endTime - cg.time ) / ( float ) ( le->endTime - le->startTime ); + if ( c > 1 ) { + c = 1.0; // can happen during connection problems + } + + re.shaderRGBA[0] = 0xff; + re.shaderRGBA[1] = 0xff; + re.shaderRGBA[2] = 0xff; + re.shaderRGBA[3] = 0xff * c * 0.33; + + re.reType = RT_SPRITE; + re.radius = 42 * ( 1.0 - c ) + 30; + + trap_R_AddRefEntityToScene( &re ); + + // add the dlight + if ( le->light ) { + float light; + + light = (float)( cg.time - le->startTime ) / ( le->endTime - le->startTime ); + if ( light < 0.5 ) { + light = 1.0; + } else { + light = 1.0 - ( light - 0.5 ) * 2; + } + light = le->light * light; + trap_R_AddLightToScene(re.origin, light, le->lightColor[0], le->lightColor[1], le->lightColor[2] ); + } +} + + +/* +=================== +CG_AddRefEntity +=================== +*/ +void CG_AddRefEntity( localEntity_t *le ) { + if (le->endTime < cg.time) { + CG_FreeLocalEntity( le ); + return; + } + trap_R_AddRefEntityToScene( &le->refEntity ); +} + +/* +=================== +CG_AddScorePlum +=================== +*/ +#define NUMBER_SIZE 8 + +void CG_AddScorePlum( localEntity_t *le ) { + refEntity_t *re; + vec3_t origin, delta, dir, vec, up = {0, 0, 1}; + float c, len; + int i, score, digits[10], numdigits, negative; + + re = &le->refEntity; + + c = ( le->endTime - cg.time ) * le->lifeRate; + + score = le->radius; + if (score < 0) { + re->shaderRGBA[0] = 0xff; + re->shaderRGBA[1] = 0x11; + re->shaderRGBA[2] = 0x11; + } + else { + re->shaderRGBA[0] = 0xff; + re->shaderRGBA[1] = 0xff; + re->shaderRGBA[2] = 0xff; + if (score >= 50) { + re->shaderRGBA[1] = 0; + } else if (score >= 20) { + re->shaderRGBA[0] = re->shaderRGBA[1] = 0; + } else if (score >= 10) { + re->shaderRGBA[2] = 0; + } else if (score >= 2) { + re->shaderRGBA[0] = re->shaderRGBA[2] = 0; + } + + } + if (c < 0.25) + re->shaderRGBA[3] = 0xff * 4 * c; + else + re->shaderRGBA[3] = 0xff; + + re->radius = NUMBER_SIZE / 2; + + VectorCopy(le->pos.trBase, origin); + origin[2] += 110 - c * 100; + + VectorSubtract(cg.refdef.vieworg, origin, dir); + CrossProduct(dir, up, vec); + VectorNormalize(vec); + + VectorMA(origin, -10 + 20 * sin(c * 2 * M_PI), vec, origin); + + // if the view would be "inside" the sprite, kill the sprite + // so it doesn't add too much overdraw + VectorSubtract( origin, cg.refdef.vieworg, delta ); + len = VectorLength( delta ); + if ( len < 20 ) { + CG_FreeLocalEntity( le ); + return; + } + + negative = qfalse; + if (score < 0) { + negative = qtrue; + score = -score; + } + + for (numdigits = 0; !(numdigits && !score); numdigits++) { + digits[numdigits] = score % 10; + score = score / 10; + } + + if (negative) { + digits[numdigits] = 10; + numdigits++; + } + + for (i = 0; i < numdigits; i++) { + VectorMA(origin, (float) (((float) numdigits / 2) - i) * NUMBER_SIZE, vec, re->origin); + re->customShader = cgs.media.numberShaders[digits[numdigits-1-i]]; + trap_R_AddRefEntityToScene( re ); + } +} + +/* +=================== +CG_AddOLine + +For forcefields/other rectangular things +=================== +*/ +void CG_AddOLine( localEntity_t *le ) +{ + refEntity_t *re; + float frac, alpha; + + re = &le->refEntity; + + frac = (cg.time - le->startTime) / ( float ) ( le->endTime - le->startTime ); + if ( frac > 1 ) + frac = 1.0; // can happen during connection problems + else if (frac < 0) + frac = 0.0; + + // Use the liferate to set the scale over time. + re->data.line.width = le->data.line.width + (le->data.line.dwidth * frac); + if (re->data.line.width <= 0) + { + CG_FreeLocalEntity( le ); + return; + } + + // We will assume here that we want additive transparency effects. + alpha = le->alpha + (le->dalpha * frac); + re->shaderRGBA[0] = 0xff * alpha; + re->shaderRGBA[1] = 0xff * alpha; + re->shaderRGBA[2] = 0xff * alpha; + re->shaderRGBA[3] = 0xff * alpha; // Yes, we could apply c to this too, but fading the color is better for lines. + + re->shaderTexCoord[0] = 1; + re->shaderTexCoord[1] = 1; + + re->rotation = 90; + + re->reType = RT_ORIENTEDLINE; + + trap_R_AddRefEntityToScene( re ); +} + +/* +=================== +CG_AddLine + +for beams and the like. +=================== +*/ +void CG_AddLine( localEntity_t *le ) +{ + refEntity_t *re; + + re = &le->refEntity; + + re->reType = RT_LINE; + + trap_R_AddRefEntityToScene( re ); +} + +//============================================================================== + +/* +=================== +CG_AddLocalEntities + +=================== +*/ +void CG_AddLocalEntities( void ) { + localEntity_t *le, *next; + + // walk the list backwards, so any new local entities generated + // (trails, marks, etc) will be present this frame + le = cg_activeLocalEntities.prev; + for ( ; le != &cg_activeLocalEntities ; le = next ) { + // grab next now, so if the local entity is freed we + // still have it + next = le->prev; + + if ( cg.time >= le->endTime ) { + CG_FreeLocalEntity( le ); + continue; + } + switch ( le->leType ) { + default: + CG_Error( "Bad leType: %i", le->leType ); + break; + + case LE_MARK: + break; + + case LE_SPRITE_EXPLOSION: + CG_AddSpriteExplosion( le ); + break; + + case LE_EXPLOSION: + CG_AddExplosion( le ); + break; + + case LE_FADE_SCALE_MODEL: + CG_AddFadeScaleModel( le ); + break; + + case LE_FRAGMENT: // gibs and brass + CG_AddFragment( le ); + break; + + case LE_PUFF: + CG_AddPuff( le ); + break; + + case LE_MOVE_SCALE_FADE: // water bubbles + CG_AddMoveScaleFade( le ); + break; + + case LE_FADE_RGB: // teleporters, railtrails + CG_AddFadeRGB( le ); + break; + + case LE_FALL_SCALE_FADE: // gib blood trails + CG_AddFallScaleFade( le ); + break; + + case LE_SCALE_FADE: // rocket trails + CG_AddScaleFade( le ); + break; + + case LE_SCOREPLUM: + CG_AddScorePlum( le ); + break; + + case LE_OLINE: + CG_AddOLine( le ); + break; + + case LE_SHOWREFENTITY: + CG_AddRefEntity( le ); + break; + + case LE_LINE: // oriented lines for FX + CG_AddLine( le ); + break; + } + } +} + + + + diff --git a/code/cgame/cg_main (2).c b/code/cgame/cg_main (2).c new file mode 100644 index 0000000..4443092 --- /dev/null +++ b/code/cgame/cg_main (2).c @@ -0,0 +1,2735 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_main.c -- initialization and primary entry point for cgame +#include "cg_local.h" + +#include "../ui/ui_shared.h" +// display context for new ui stuff +displayContextDef_t cgDC; + +#if !defined(CL_LIGHT_H_INC) + #include "cg_lights.h" +#endif + +/* +Ghoul2 Insert Start +*/ +void CG_InitItems(void); +/* +Ghoul2 Insert End +*/ + +vec4_t colorTable[CT_MAX] = +{ +{0, 0, 0, 0}, // CT_NONE +{0, 0, 0, 1}, // CT_BLACK +{1, 0, 0, 1}, // CT_RED +{0, 1, 0, 1}, // CT_GREEN +{0, 0, 1, 1}, // CT_BLUE +{1, 1, 0, 1}, // CT_YELLOW +{1, 0, 1, 1}, // CT_MAGENTA +{0, 1, 1, 1}, // CT_CYAN +{1, 1, 1, 1}, // CT_WHITE +{0.75f, 0.75f, 0.75f, 1}, // CT_LTGREY +{0.50f, 0.50f, 0.50f, 1}, // CT_MDGREY +{0.25f, 0.25f, 0.25f, 1}, // CT_DKGREY +{0.15f, 0.15f, 0.15f, 1}, // CT_DKGREY2 + +{0.810f, 0.530f, 0.0f, 1}, // CT_VLTORANGE -- needs values +{0.810f, 0.530f, 0.0f, 1}, // CT_LTORANGE +{0.610f, 0.330f, 0.0f, 1}, // CT_DKORANGE +{0.402f, 0.265f, 0.0f, 1}, // CT_VDKORANGE + +{0.503f, 0.375f, 0.996f, 1}, // CT_VLTBLUE1 +{0.367f, 0.261f, 0.722f, 1}, // CT_LTBLUE1 +{0.199f, 0.0f, 0.398f, 1}, // CT_DKBLUE1 +{0.160f, 0.117f, 0.324f, 1}, // CT_VDKBLUE1 + +{0.300f, 0.628f, 0.816f, 1}, // CT_VLTBLUE2 -- needs values +{0.300f, 0.628f, 0.816f, 1}, // CT_LTBLUE2 +{0.191f, 0.289f, 0.457f, 1}, // CT_DKBLUE2 +{0.125f, 0.250f, 0.324f, 1}, // CT_VDKBLUE2 + +{0.796f, 0.398f, 0.199f, 1}, // CT_VLTBROWN1 -- needs values +{0.796f, 0.398f, 0.199f, 1}, // CT_LTBROWN1 +{0.558f, 0.207f, 0.027f, 1}, // CT_DKBROWN1 +{0.328f, 0.125f, 0.035f, 1}, // CT_VDKBROWN1 + +{0.996f, 0.796f, 0.398f, 1}, // CT_VLTGOLD1 -- needs values +{0.996f, 0.796f, 0.398f, 1}, // CT_LTGOLD1 +{0.605f, 0.441f, 0.113f, 1}, // CT_DKGOLD1 +{0.386f, 0.308f, 0.148f, 1}, // CT_VDKGOLD1 + +{0.648f, 0.562f, 0.784f, 1}, // CT_VLTPURPLE1 -- needs values +{0.648f, 0.562f, 0.784f, 1}, // CT_LTPURPLE1 +{0.437f, 0.335f, 0.597f, 1}, // CT_DKPURPLE1 +{0.308f, 0.269f, 0.375f, 1}, // CT_VDKPURPLE1 + +{0.816f, 0.531f, 0.710f, 1}, // CT_VLTPURPLE2 -- needs values +{0.816f, 0.531f, 0.710f, 1}, // CT_LTPURPLE2 +{0.566f, 0.269f, 0.457f, 1}, // CT_DKPURPLE2 +{0.343f, 0.226f, 0.316f, 1}, // CT_VDKPURPLE2 + +{0.929f, 0.597f, 0.929f, 1}, // CT_VLTPURPLE3 +{0.570f, 0.371f, 0.570f, 1}, // CT_LTPURPLE3 +{0.355f, 0.199f, 0.355f, 1}, // CT_DKPURPLE3 +{0.285f, 0.136f, 0.230f, 1}, // CT_VDKPURPLE3 + +{0.953f, 0.378f, 0.250f, 1}, // CT_VLTRED1 +{0.953f, 0.378f, 0.250f, 1}, // CT_LTRED1 +{0.593f, 0.121f, 0.109f, 1}, // CT_DKRED1 +{0.429f, 0.171f, 0.113f, 1}, // CT_VDKRED1 +{.25f, 0, 0, 1}, // CT_VDKRED +{.70f, 0, 0, 1}, // CT_DKRED + +{0.717f, 0.902f, 1.0f, 1}, // CT_VLTAQUA +{0.574f, 0.722f, 0.804f, 1}, // CT_LTAQUA +{0.287f, 0.361f, 0.402f, 1}, // CT_DKAQUA +{0.143f, 0.180f, 0.201f, 1}, // CT_VDKAQUA + +{0.871f, 0.386f, 0.375f, 1}, // CT_LTPINK +{0.435f, 0.193f, 0.187f, 1}, // CT_DKPINK +{ 0, .5f, .5f, 1}, // CT_LTCYAN +{ 0, .25f, .25f, 1}, // CT_DKCYAN +{ .179f, .51f, .92f, 1}, // CT_LTBLUE3 +{ .199f, .71f, .92f, 1}, // CT_LTBLUE3 +{ .5f, .05f, .4f, 1}, // CT_DKBLUE3 + +{ 0.0f, .613f, .097f, 1}, // CT_HUD_GREEN +{ 0.835f, .015f, .015f, 1}, // CT_HUD_RED +{ .567f, .685f, 1.0f, .75f}, // CT_ICON_BLUE +{ .515f, .406f, .507f, 1}, // CT_NO_AMMO_RED +{ 1.0f, .658f, .062f, 1}, // CT_HUD_ORANGE + +}; + +char *HolocronIcons[] = { + "gfx/mp/f_icon_lt_heal", //FP_HEAL, + "gfx/mp/f_icon_levitation", //FP_LEVITATION, + "gfx/mp/f_icon_speed", //FP_SPEED, + "gfx/mp/f_icon_push", //FP_PUSH, + "gfx/mp/f_icon_pull", //FP_PULL, + "gfx/mp/f_icon_lt_telepathy", //FP_TELEPATHY, + "gfx/mp/f_icon_dk_grip", //FP_GRIP, + "gfx/mp/f_icon_dk_l1", //FP_LIGHTNING, + "gfx/mp/f_icon_dk_rage", //FP_RAGE, + "gfx/mp/f_icon_lt_protect", //FP_PROTECT, + "gfx/mp/f_icon_lt_absorb", //FP_ABSORB, + "gfx/mp/f_icon_lt_healother", //FP_TEAM_HEAL, + "gfx/mp/f_icon_dk_forceother", //FP_TEAM_FORCE, + "gfx/mp/f_icon_dk_drain", //FP_DRAIN, + "gfx/mp/f_icon_sight", //FP_SEE, + "gfx/mp/f_icon_saber_attack", //FP_SABERATTACK, + "gfx/mp/f_icon_saber_defend", //FP_SABERDEFEND, + "gfx/mp/f_icon_saber_throw" //FP_SABERTHROW +}; + +int forceModelModificationCount = -1; + +void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ); +void CG_Shutdown( void ); + +void CG_CalcEntityLerpPositions( centity_t *cent ); +void CG_ROFF_NotetrackCallback( centity_t *cent, const char *notetrack); + +static int C_PointContents(void); +static void C_GetLerpOrigin(void); +static void C_GetLerpAngles(void); +static void C_GetModelScale(void); +static void C_Trace(void); +static void C_GetBoltPos(void); +static void C_ImpactMark(void); + +/* +================ +vmMain + +This is the only way control passes into the module. +This must be the very first function compiled into the .q3vm file +================ +*/ +int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11 ) { + + switch ( command ) { + case CG_INIT: + CG_Init( arg0, arg1, arg2 ); + return 0; + case CG_SHUTDOWN: + CG_Shutdown(); + return 0; + case CG_CONSOLE_COMMAND: + return CG_ConsoleCommand(); + case CG_DRAW_ACTIVE_FRAME: + CG_DrawActiveFrame( arg0, arg1, arg2 ); + return 0; + case CG_CROSSHAIR_PLAYER: + return CG_CrosshairPlayer(); + case CG_LAST_ATTACKER: + return CG_LastAttacker(); + case CG_KEY_EVENT: + CG_KeyEvent(arg0, arg1); + return 0; + case CG_MOUSE_EVENT: + cgDC.cursorx = cgs.cursorX; + cgDC.cursory = cgs.cursorY; + CG_MouseEvent(arg0, arg1); + return 0; + case CG_EVENT_HANDLING: + CG_EventHandling(arg0); + return 0; + + case CG_POINT_CONTENTS: + return C_PointContents(); + + case CG_GET_LERP_ORIGIN: + C_GetLerpOrigin(); + return 0; + + case CG_GET_LERP_ANGLES: + C_GetLerpAngles(); + return 0; + + case CG_GET_MODEL_SCALE: + C_GetModelScale(); + return 0; + + case CG_GET_GHOUL2: + return (int)cg_entities[arg0].ghoul2; //NOTE: This is used by the effect bolting which is actually not used at all. + //I'm fairly sure if you try to use it with vm's it will just give you total + //garbage. In other words, use at your own risk. + + case CG_GET_MODEL_LIST: + return (int)cgs.gameModels; + + case CG_CALC_LERP_POSITIONS: + CG_CalcEntityLerpPositions( &cg_entities[arg0] ); + return 0; + + case CG_TRACE: + C_Trace(); + return 0; + + case CG_GET_ORIGIN: + VectorCopy(cg_entities[arg0].currentState.pos.trBase, (float *)arg1); + return 0; + + case CG_GET_ANGLES: + VectorCopy(cg_entities[arg0].currentState.apos.trBase, (float *)arg1); + return 0; + + case CG_GET_BOLT_POS: + C_GetBoltPos(); + return 0; + + case CG_GET_ORIGIN_TRAJECTORY: + return (int)&cg_entities[arg0].nextState.pos; + + case CG_GET_ANGLE_TRAJECTORY: + return (int)&cg_entities[arg0].nextState.apos; + + case CG_ROFF_NOTETRACK_CALLBACK: + CG_ROFF_NotetrackCallback( &cg_entities[arg0], (const char *)arg1 ); + return 0; + + case CG_IMPACT_MARK: + C_ImpactMark(); + return 0; + + case CG_MAP_CHANGE: + // this trap map be called more than once for a given map change, as the + // server is going to attempt to send out multiple broadcasts in hopes that + // the client will receive one of them + cg.mMapChange = qtrue; + return 0; + + default: + CG_Error( "vmMain: unknown command %i", command ); + break; + } + return -1; +} + +static int C_PointContents(void) +{ + TCGPointContents *data = (TCGPointContents *)cg.sharedBuffer; + + return CG_PointContents( data->mPoint, data->mPassEntityNum ); +} + +static void C_GetLerpOrigin(void) +{ + TCGVectorData *data = (TCGVectorData *)cg.sharedBuffer; + + VectorCopy(cg_entities[data->mEntityNum].lerpOrigin, data->mPoint); +} + +static void C_GetLerpAngles(void) +{ + TCGVectorData *data = (TCGVectorData *)cg.sharedBuffer; + + VectorCopy(cg_entities[data->mEntityNum].lerpAngles, data->mPoint); +} + +static void C_GetModelScale(void) +{ + TCGVectorData *data = (TCGVectorData *)cg.sharedBuffer; + + VectorCopy(cg_entities[data->mEntityNum].modelScale, data->mPoint); +} + +static void C_Trace(void) +{ + TCGTrace *td = (TCGTrace *)cg.sharedBuffer; + + CG_Trace(&td->mResult, td->mStart, td->mMins, td->mMaxs, td->mEnd, td->mSkipNumber, td->mMask); +} + +static void C_GetBoltPos(void) +{ + TCGBoltPos *data = (TCGBoltPos *)cg.sharedBuffer; + + if (!cg_entities[data->mEntityNum].ghoul2) + { + VectorClear(data->mPoint); + VectorClear(data->mAngle); + return; + } + + VectorCopy(cg_entities[data->mEntityNum].lerpOrigin, data->mPoint); + if (data->mEntityNum < MAX_CLIENTS) + { + VectorCopy(cg_entities[data->mEntityNum].turAngles, data->mAngle); + } + else + { + VectorCopy(cg_entities[data->mEntityNum].lerpAngles, data->mAngle); + } +} + +static void C_ImpactMark(void) +{ + TCGImpactMark *data = (TCGImpactMark *)cg.sharedBuffer; + + /* + CG_ImpactMark((int)arg0, (const float *)arg1, (const float *)arg2, (float)arg3, + (float)arg4, (float)arg5, (float)arg6, (float)arg7, qtrue, (float)arg8, qfalse); + */ + CG_ImpactMark(data->mHandle, data->mPoint, data->mAngle, data->mRotation, + data->mRed, data->mGreen, data->mBlue, data->mAlphaStart, qtrue, data->mSizeStart, qfalse); +} + +/* +Ghoul2 Insert Start +*/ +/* +void CG_ResizeG2Bolt(boltInfo_v *bolt, int newCount) +{ + bolt->resize(newCount); +} + +void CG_ResizeG2Surface(surfaceInfo_v *surface, int newCount) +{ + surface->resize(newCount); +} + +void CG_ResizeG2Bone(boneInfo_v *bone, int newCount) +{ + bone->resize(newCount); +} + +void CG_ResizeG2(CGhoul2Info_v *ghoul2, int newCount) +{ + ghoul2->resize(newCount); +} + +void CG_ResizeG2TempBone(mdxaBone_v *tempBone, int newCount) +{ + tempBone->resize(newCount); +} +*/ +/* +Ghoul2 Insert End +*/ +cg_t cg; +cgs_t cgs; +centity_t cg_entities[MAX_GENTITIES]; +weaponInfo_t cg_weapons[MAX_WEAPONS]; +itemInfo_t cg_items[MAX_ITEMS]; + + +vmCvar_t cg_centertime; +vmCvar_t cg_runpitch; +vmCvar_t cg_runroll; +vmCvar_t cg_bobup; +vmCvar_t cg_bobpitch; +vmCvar_t cg_bobroll; +//vmCvar_t cg_swingSpeed; +vmCvar_t cg_shadows; +vmCvar_t cg_drawTimer; +vmCvar_t cg_drawFPS; +vmCvar_t cg_drawSnapshot; +vmCvar_t cg_draw3dIcons; +vmCvar_t cg_drawIcons; +vmCvar_t cg_drawAmmoWarning; +vmCvar_t cg_drawCrosshair; +vmCvar_t cg_drawCrosshairNames; +vmCvar_t cg_dynamicCrosshair; +vmCvar_t cg_drawRewards; +vmCvar_t cg_drawScores; +vmCvar_t cg_crosshairSize; +vmCvar_t cg_crosshairX; +vmCvar_t cg_crosshairY; +vmCvar_t cg_crosshairHealth; +vmCvar_t cg_draw2D; +vmCvar_t cg_drawStatus; +vmCvar_t cg_animSpeed; +vmCvar_t cg_debugAnim; +vmCvar_t cg_debugSaber; +vmCvar_t cg_debugPosition; +vmCvar_t cg_debugEvents; +vmCvar_t cg_errorDecay; +vmCvar_t cg_nopredict; +vmCvar_t cg_noPlayerAnims; +vmCvar_t cg_showmiss; +vmCvar_t cg_footsteps; +vmCvar_t cg_addMarks; +vmCvar_t cg_viewsize; +vmCvar_t cg_drawGun; +vmCvar_t cg_gun_frame; +vmCvar_t cg_gun_x; +vmCvar_t cg_gun_y; +vmCvar_t cg_gun_z; +vmCvar_t cg_tracerChance; +vmCvar_t cg_tracerWidth; +vmCvar_t cg_tracerLength; +vmCvar_t cg_autoswitch; +vmCvar_t cg_ignore; +vmCvar_t cg_simpleItems; +vmCvar_t cg_fov; +vmCvar_t cg_zoomFov; + +vmCvar_t cg_swingAngles; + +vmCvar_t cg_oldPainSounds; + +#ifdef G2_COLLISION_ENABLED +vmCvar_t cg_saberModelTraceEffect; +#endif + +vmCvar_t cg_fpls; + +vmCvar_t cg_saberDynamicMarks; +vmCvar_t cg_saberDynamicMarkTime; + +vmCvar_t cg_saberContact; +vmCvar_t cg_saberTrail; + +vmCvar_t cg_duelHeadAngles; + +vmCvar_t cg_speedTrail; +vmCvar_t cg_auraShell; + +vmCvar_t cg_animBlend; + +vmCvar_t cg_dismember; + +vmCvar_t cg_thirdPerson; +vmCvar_t cg_thirdPersonRange; +vmCvar_t cg_thirdPersonAngle; +vmCvar_t cg_thirdPersonPitchOffset; +vmCvar_t cg_thirdPersonVertOffset; +vmCvar_t cg_thirdPersonCameraDamp; +vmCvar_t cg_thirdPersonTargetDamp; + +vmCvar_t cg_thirdPersonAlpha; +vmCvar_t cg_thirdPersonHorzOffset; + +vmCvar_t cg_stereoSeparation; +vmCvar_t cg_lagometer; +vmCvar_t cg_drawEnemyInfo; +vmCvar_t cg_synchronousClients; +vmCvar_t cg_teamChatTime; +vmCvar_t cg_teamChatHeight; +vmCvar_t cg_stats; +vmCvar_t cg_buildScript; +vmCvar_t cg_forceModel; +vmCvar_t cg_paused; +vmCvar_t cg_blood; +vmCvar_t cg_predictItems; +vmCvar_t cg_deferPlayers; +vmCvar_t cg_drawTeamOverlay; +vmCvar_t cg_teamOverlayUserinfo; +vmCvar_t cg_drawFriend; +vmCvar_t cg_teamChatsOnly; +vmCvar_t cg_noVoiceChats; +vmCvar_t cg_noVoiceText; +vmCvar_t cg_hudFiles; +vmCvar_t cg_scorePlum; +vmCvar_t cg_smoothClients; +vmCvar_t pmove_fixed; +//vmCvar_t cg_pmove_fixed; +vmCvar_t pmove_msec; +vmCvar_t cg_pmove_msec; +vmCvar_t cg_cameraMode; +vmCvar_t cg_cameraOrbit; +vmCvar_t cg_cameraOrbitDelay; +vmCvar_t cg_timescaleFadeEnd; +vmCvar_t cg_timescaleFadeSpeed; +vmCvar_t cg_timescale; +vmCvar_t cg_smallFont; +vmCvar_t cg_bigFont; +vmCvar_t cg_noTaunt; +vmCvar_t cg_noProjectileTrail; +vmCvar_t cg_trueLightning; +/* +Ghoul2 Insert Start +*/ +vmCvar_t cg_debugBB; +/* +Ghoul2 Insert End +*/ +vmCvar_t cg_redTeamName; +vmCvar_t cg_blueTeamName; +vmCvar_t cg_currentSelectedPlayer; +vmCvar_t cg_currentSelectedPlayerName; +vmCvar_t cg_singlePlayer; +vmCvar_t cg_enableDust; +vmCvar_t cg_enableBreath; +vmCvar_t cg_singlePlayerActive; +vmCvar_t cg_recordSPDemo; +vmCvar_t cg_recordSPDemoName; + +vmCvar_t ui_myteam; + +typedef struct { + vmCvar_t *vmCvar; + char *cvarName; + char *defaultString; + int cvarFlags; +} cvarTable_t; + +static cvarTable_t cvarTable[] = { // bk001129 + { &cg_ignore, "cg_ignore", "0", 0 }, // used for debugging + { &cg_autoswitch, "cg_autoswitch", "1", CVAR_ARCHIVE }, + { &cg_drawGun, "cg_drawGun", "1", CVAR_ARCHIVE }, + { &cg_zoomFov, "cg_zoomfov", "40.0", CVAR_ARCHIVE }, + { &cg_fov, "cg_fov", "80", CVAR_ARCHIVE }, + { &cg_viewsize, "cg_viewsize", "100", CVAR_ARCHIVE }, + { &cg_stereoSeparation, "cg_stereoSeparation", "0.4", CVAR_ARCHIVE }, + { &cg_shadows, "cg_shadows", "1", CVAR_ARCHIVE }, + { &cg_draw2D, "cg_draw2D", "1", CVAR_ARCHIVE }, + { &cg_drawStatus, "cg_drawStatus", "1", CVAR_ARCHIVE }, + { &cg_drawTimer, "cg_drawTimer", "0", CVAR_ARCHIVE }, + { &cg_drawFPS, "cg_drawFPS", "0", CVAR_ARCHIVE }, + { &cg_drawSnapshot, "cg_drawSnapshot", "0", CVAR_ARCHIVE }, + { &cg_draw3dIcons, "cg_draw3dIcons", "1", CVAR_ARCHIVE }, + { &cg_drawIcons, "cg_drawIcons", "1", CVAR_ARCHIVE }, + { &cg_drawAmmoWarning, "cg_drawAmmoWarning", "0", CVAR_ARCHIVE }, + { &cg_drawEnemyInfo, "cg_drawEnemyInfo", "1", CVAR_ARCHIVE }, + { &cg_drawCrosshair, "cg_drawCrosshair", "1", CVAR_ARCHIVE }, + { &cg_drawCrosshairNames, "cg_drawCrosshairNames", "1", CVAR_ARCHIVE }, + { &cg_drawScores, "cg_drawScores", "1", CVAR_ARCHIVE }, + { &cg_dynamicCrosshair, "cg_dynamicCrosshair", "1", CVAR_ARCHIVE }, + { &cg_drawRewards, "cg_drawRewards", "1", CVAR_ARCHIVE }, + { &cg_crosshairSize, "cg_crosshairSize", "24", CVAR_ARCHIVE }, + { &cg_crosshairHealth, "cg_crosshairHealth", "0", CVAR_ARCHIVE }, + { &cg_crosshairX, "cg_crosshairX", "0", CVAR_ARCHIVE }, + { &cg_crosshairY, "cg_crosshairY", "0", CVAR_ARCHIVE }, + { &cg_simpleItems, "cg_simpleItems", "0", CVAR_ARCHIVE }, + { &cg_addMarks, "cg_marks", "1", CVAR_ARCHIVE }, + { &cg_lagometer, "cg_lagometer", "0", CVAR_ARCHIVE }, + { &cg_gun_x, "cg_gunX", "0", CVAR_CHEAT }, + { &cg_gun_y, "cg_gunY", "0", CVAR_CHEAT }, + { &cg_gun_z, "cg_gunZ", "0", CVAR_CHEAT }, + { &cg_centertime, "cg_centertime", "3", CVAR_CHEAT }, + { &cg_runpitch, "cg_runpitch", "0.002", CVAR_ARCHIVE}, + { &cg_runroll, "cg_runroll", "0.005", CVAR_ARCHIVE }, + { &cg_bobup , "cg_bobup", "0.005", CVAR_ARCHIVE }, + { &cg_bobpitch, "cg_bobpitch", "0.002", CVAR_ARCHIVE }, + { &cg_bobroll, "cg_bobroll", "0.002", CVAR_ARCHIVE }, + //{ &cg_swingSpeed, "cg_swingSpeed", "0.3", CVAR_CHEAT }, + { &cg_animSpeed, "cg_animspeed", "1", CVAR_CHEAT }, + { &cg_debugAnim, "cg_debuganim", "0", CVAR_CHEAT }, + { &cg_debugSaber, "cg_debugsaber", "0", CVAR_CHEAT }, + { &cg_debugPosition, "cg_debugposition", "0", CVAR_CHEAT }, + { &cg_debugEvents, "cg_debugevents", "0", CVAR_CHEAT }, + { &cg_errorDecay, "cg_errordecay", "100", 0 }, + { &cg_nopredict, "cg_nopredict", "0", 0 }, + { &cg_noPlayerAnims, "cg_noplayeranims", "0", CVAR_CHEAT }, + { &cg_showmiss, "cg_showmiss", "0", 0 }, + { &cg_footsteps, "cg_footsteps", "1", CVAR_CHEAT }, + { &cg_tracerChance, "cg_tracerchance", "0.4", CVAR_CHEAT }, + { &cg_tracerWidth, "cg_tracerwidth", "1", CVAR_CHEAT }, + { &cg_tracerLength, "cg_tracerlength", "100", CVAR_CHEAT }, + + { &cg_swingAngles, "cg_swingAngles", "1", 0 }, + + { &cg_oldPainSounds, "cg_oldPainSounds", "0", 0 }, + +#ifdef G2_COLLISION_ENABLED + { &cg_saberModelTraceEffect, "cg_saberModelTraceEffect", "0", 0 }, +#endif + + { &cg_fpls, "cg_fpls", "0", 0 }, + + { &cg_saberDynamicMarks, "cg_saberDynamicMarks", "0", 0 }, + { &cg_saberDynamicMarkTime, "cg_saberDynamicMarkTime", "60000", 0 }, + + { &cg_saberContact, "cg_saberContact", "1", 0 }, + { &cg_saberTrail, "cg_saberTrail", "1", 0 }, + + { &cg_duelHeadAngles, "cg_duelHeadAngles", "0", 0 }, + + { &cg_speedTrail, "cg_speedTrail", "1", 0 }, + { &cg_auraShell, "cg_auraShell", "1", 0 }, + + { &cg_animBlend, "cg_animBlend", "1", 0 }, + + { &cg_dismember, "cg_dismember", "0", CVAR_ARCHIVE }, + + { &cg_thirdPerson, "cg_thirdPerson", "0", 0 }, + { &cg_thirdPersonRange, "cg_thirdPersonRange", "80", CVAR_CHEAT }, + { &cg_thirdPersonAngle, "cg_thirdPersonAngle", "0", CVAR_CHEAT }, + { &cg_thirdPersonPitchOffset, "cg_thirdPersonPitchOffset", "0", CVAR_CHEAT }, + { &cg_thirdPersonVertOffset, "cg_thirdPersonVertOffset", "16", CVAR_CHEAT }, + { &cg_thirdPersonCameraDamp, "cg_thirdPersonCameraDamp", "0.3", 0 }, + { &cg_thirdPersonTargetDamp, "cg_thirdPersonTargetDamp", "0.5", CVAR_CHEAT }, + + { &cg_thirdPersonHorzOffset, "cg_thirdPersonHorzOffset", "0", CVAR_CHEAT }, + { &cg_thirdPersonAlpha, "cg_thirdPersonAlpha", "1.0", CVAR_CHEAT }, + + { &cg_teamChatTime, "cg_teamChatTime", "3000", CVAR_ARCHIVE }, + { &cg_teamChatHeight, "cg_teamChatHeight", "0", CVAR_ARCHIVE }, + { &cg_forceModel, "cg_forceModel", "0", CVAR_ARCHIVE }, + { &cg_predictItems, "cg_predictItems", "1", CVAR_ARCHIVE }, + { &cg_deferPlayers, "cg_deferPlayers", "1", CVAR_ARCHIVE }, + { &cg_drawTeamOverlay, "cg_drawTeamOverlay", "0", CVAR_ARCHIVE }, + { &cg_teamOverlayUserinfo, "teamoverlay", "0", CVAR_ROM | CVAR_USERINFO }, + { &cg_stats, "cg_stats", "0", 0 }, + { &cg_drawFriend, "cg_drawFriend", "1", CVAR_ARCHIVE }, + { &cg_teamChatsOnly, "cg_teamChatsOnly", "0", CVAR_ARCHIVE }, + { &cg_noVoiceChats, "cg_noVoiceChats", "0", CVAR_ARCHIVE }, + { &cg_noVoiceText, "cg_noVoiceText", "0", CVAR_ARCHIVE }, + // the following variables are created in other parts of the system, + // but we also reference them here + { &cg_buildScript, "com_buildScript", "0", 0 }, // force loading of all possible data amd error on failures + { &cg_paused, "cl_paused", "0", CVAR_ROM }, + { &cg_blood, "com_blood", "1", CVAR_ARCHIVE }, + { &cg_synchronousClients, "g_synchronousClients", "0", 0 }, // communicated by systeminfo + + { &cg_redTeamName, "g_redteam", DEFAULT_REDTEAM_NAME, CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO }, + { &cg_blueTeamName, "g_blueteam", DEFAULT_BLUETEAM_NAME, CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO }, + { &cg_currentSelectedPlayer, "cg_currentSelectedPlayer", "0", CVAR_ARCHIVE}, + { &cg_currentSelectedPlayerName, "cg_currentSelectedPlayerName", "", CVAR_ARCHIVE}, + { &cg_singlePlayer, "ui_singlePlayerActive", "0", CVAR_USERINFO}, + { &cg_enableDust, "g_enableDust", "0", 0}, + { &cg_enableBreath, "g_enableBreath", "0", 0}, + { &cg_singlePlayerActive, "ui_singlePlayerActive", "0", CVAR_USERINFO}, + { &cg_recordSPDemo, "ui_recordSPDemo", "0", CVAR_ARCHIVE}, + { &cg_recordSPDemoName, "ui_recordSPDemoName", "", CVAR_ARCHIVE}, + + { &cg_cameraOrbit, "cg_cameraOrbit", "0", CVAR_CHEAT}, + { &cg_cameraOrbitDelay, "cg_cameraOrbitDelay", "50", CVAR_ARCHIVE}, + { &cg_timescaleFadeEnd, "cg_timescaleFadeEnd", "1", 0}, + { &cg_timescaleFadeSpeed, "cg_timescaleFadeSpeed", "0", 0}, + { &cg_timescale, "timescale", "1", 0}, + { &cg_scorePlum, "cg_scorePlums", "1", CVAR_USERINFO | CVAR_ARCHIVE}, + { &cg_hudFiles, "cg_hudFiles", "0", CVAR_USERINFO | CVAR_ARCHIVE}, + { &cg_smoothClients, "cg_smoothClients", "0", CVAR_USERINFO | CVAR_ARCHIVE}, + { &cg_cameraMode, "com_cameraMode", "0", CVAR_CHEAT}, + + { &pmove_fixed, "pmove_fixed", "0", 0}, + { &pmove_msec, "pmove_msec", "8", 0}, + { &cg_noTaunt, "cg_noTaunt", "0", CVAR_ARCHIVE}, + { &cg_noProjectileTrail, "cg_noProjectileTrail", "0", CVAR_ARCHIVE}, + { &cg_smallFont, "ui_smallFont", "0.25", CVAR_ARCHIVE}, + { &cg_bigFont, "ui_bigFont", "0.4", CVAR_ARCHIVE}, + { &cg_trueLightning, "cg_trueLightning", "0.0", CVAR_ARCHIVE}, + + { &ui_myteam, "ui_myteam", "0", CVAR_ROM|CVAR_INTERNAL}, + +// { &cg_pmove_fixed, "cg_pmove_fixed", "0", CVAR_USERINFO | CVAR_ARCHIVE } +/* +Ghoul2 Insert Start +*/ + { &cg_debugBB, "debugBB", "0", 0}, +/* +Ghoul2 Insert End +*/ +}; + +static int cvarTableSize = sizeof( cvarTable ) / sizeof( cvarTable[0] ); + +/* +================= +CG_RegisterCvars +================= +*/ +void CG_RegisterCvars( void ) { + int i; + cvarTable_t *cv; + char var[MAX_TOKEN_CHARS]; + + for ( i = 0, cv = cvarTable ; i < cvarTableSize ; i++, cv++ ) { + trap_Cvar_Register( cv->vmCvar, cv->cvarName, + cv->defaultString, cv->cvarFlags ); + } + + // see if we are also running the server on this machine + trap_Cvar_VariableStringBuffer( "sv_running", var, sizeof( var ) ); + cgs.localServer = atoi( var ); + + forceModelModificationCount = cg_forceModel.modificationCount; + + trap_Cvar_Register(NULL, "model", DEFAULT_MODEL, CVAR_USERINFO | CVAR_ARCHIVE ); + //trap_Cvar_Register(NULL, "headmodel", DEFAULT_MODEL, CVAR_USERINFO | CVAR_ARCHIVE ); + trap_Cvar_Register(NULL, "team_model", DEFAULT_TEAM_MODEL, CVAR_USERINFO | CVAR_ARCHIVE ); + //trap_Cvar_Register(NULL, "team_headmodel", DEFAULT_TEAM_HEAD, CVAR_USERINFO | CVAR_ARCHIVE ); + trap_Cvar_Register(NULL, "forcepowers", DEFAULT_FORCEPOWERS, CVAR_USERINFO | CVAR_ARCHIVE ); + + // Cvars uses for transferring data between client and server + trap_Cvar_Register(NULL, "ui_about_gametype", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_fraglimit", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_capturelimit", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_duellimit", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_timelimit", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_maxclients", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_dmflags", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_mapname", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_hostname", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_needpass", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_botminplayers", "0", CVAR_ROM|CVAR_INTERNAL ); +} + +/* +=================== +CG_ForceModelChange +=================== +*/ +static void CG_ForceModelChange( void ) { + int i; + + for (i=0 ; ivmCvar ); + } + + // check for modications here + + // If team overlay is on, ask for updates from the server. If its off, + // let the server know so we don't receive it + if ( drawTeamOverlayModificationCount != cg_drawTeamOverlay.modificationCount ) { + drawTeamOverlayModificationCount = cg_drawTeamOverlay.modificationCount; + + if ( cg_drawTeamOverlay.integer > 0 ) { + trap_Cvar_Set( "teamoverlay", "1" ); + } else { + trap_Cvar_Set( "teamoverlay", "0" ); + } + // FIXME E3 HACK + trap_Cvar_Set( "teamoverlay", "1" ); + } + + // if force model changed + if ( forceModelModificationCount != cg_forceModel.modificationCount ) { + forceModelModificationCount = cg_forceModel.modificationCount; + CG_ForceModelChange(); + } +} + +int CG_CrosshairPlayer( void ) { + if ( cg.time > ( cg.crosshairClientTime + 1000 ) ) { + return -1; + } + + if (cg.crosshairClientNum >= MAX_CLIENTS) + { + return -1; + } + + return cg.crosshairClientNum; +} + +int CG_LastAttacker( void ) { + if ( !cg.attackerTime ) { + return -1; + } + return cg.snap->ps.persistant[PERS_ATTACKER]; +} + +void QDECL CG_Printf( const char *msg, ... ) { + va_list argptr; + char text[1024]; + + va_start (argptr, msg); + vsprintf (text, msg, argptr); + va_end (argptr); + + trap_Print( text ); +} + +void QDECL CG_Error( const char *msg, ... ) { + va_list argptr; + char text[1024]; + + va_start (argptr, msg); + vsprintf (text, msg, argptr); + va_end (argptr); + + trap_Error( text ); +} + +#ifndef CGAME_HARD_LINKED +// this is only here so the functions in q_shared.c and bg_*.c can link (FIXME) + +void QDECL Com_Error( int level, const char *error, ... ) { + va_list argptr; + char text[1024]; + + va_start (argptr, error); + vsprintf (text, error, argptr); + va_end (argptr); + + CG_Error( "%s", text); +} + +void QDECL Com_Printf( const char *msg, ... ) { + va_list argptr; + char text[1024]; + + va_start (argptr, msg); + vsprintf (text, msg, argptr); + va_end (argptr); + + CG_Printf ("%s", text); +} + +#endif + +/* +================ +CG_Argv +================ +*/ +const char *CG_Argv( int arg ) { + static char buffer[MAX_STRING_CHARS]; + + trap_Argv( arg, buffer, sizeof( buffer ) ); + + return buffer; +} + + +//======================================================================== + +/* +================= +CG_RegisterItemSounds + +The server says this item is used on this level +================= +*/ +static void CG_RegisterItemSounds( int itemNum ) { + gitem_t *item; + char data[MAX_QPATH]; + char *s, *start; + int len; + + item = &bg_itemlist[ itemNum ]; + + if( item->pickup_sound ) { + trap_S_RegisterSound( item->pickup_sound ); + } + + // parse the space seperated precache string for other media + s = item->sounds; + if (!s || !s[0]) + return; + + while (*s) { + start = s; + while (*s && *s != ' ') { + s++; + } + + len = s-start; + if (len >= MAX_QPATH || len < 5) { + CG_Error( "PrecacheItem: %s has bad precache string", + item->classname); + return; + } + memcpy (data, start, len); + data[len] = 0; + if ( *s ) { + s++; + } + + if ( !strcmp(data+len-3, "wav" )) { + trap_S_RegisterSound( data ); + } + } +} + + +/* +================= +CG_RegisterSounds + +called during a precache command +================= +*/ +static void CG_RegisterSounds( void ) { + int i; + char items[MAX_ITEMS+1]; + char name[MAX_QPATH]; + const char *soundName; + + // voice commands + // rww - no "voice commands" I guess. + //CG_LoadVoiceChats(); + + cgs.media.oneMinuteSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM004" ); + cgs.media.fiveMinuteSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM005" ); + cgs.media.oneFragSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM001" ); + cgs.media.twoFragSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM002" ); + cgs.media.threeFragSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM003"); + cgs.media.count3Sound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM035" ); + cgs.media.count2Sound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM036" ); + cgs.media.count1Sound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM037" ); + cgs.media.countFightSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM038" ); + + cgs.media.redSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/red_glow" ); + cgs.media.redSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/red_line" ); + cgs.media.orangeSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/orange_glow" ); + cgs.media.orangeSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/orange_line" ); + cgs.media.yellowSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/yellow_glow" ); + cgs.media.yellowSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/yellow_line" ); + cgs.media.greenSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/green_glow" ); + cgs.media.greenSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/green_line" ); + cgs.media.blueSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/blue_glow" ); + cgs.media.blueSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/blue_line" ); + cgs.media.purpleSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/purple_glow" ); + cgs.media.purpleSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/purple_line" ); + cgs.media.saberBlurShader = trap_R_RegisterShader( "gfx/effects/sabers/saberBlur" ); + + cgs.media.yellowDroppedSaberShader = trap_R_RegisterShader("gfx/effects/yellow_glow"); + + cgs.media.rivetMarkShader = trap_R_RegisterShader( "gfx/damage/rivetmark" ); + + trap_R_RegisterShader( "gfx/effects/saberFlare" ); + + trap_R_RegisterShader( "powerups/ysalimarishell" ); + trap_R_RegisterShader("gfx/effects/saberDamageGlow" ); + + trap_R_RegisterShader( "gfx/effects/forcePush" ); + + trap_R_RegisterShader( "gfx/misc/red_dmgshield" ); + trap_R_RegisterShader( "gfx/misc/red_portashield" ); + trap_R_RegisterShader( "gfx/misc/blue_dmgshield" ); + trap_R_RegisterShader( "gfx/misc/blue_portashield" ); + + trap_R_RegisterShader( "models/map_objects/imp_mine/turret_chair_dmg.tga" ); + + for (i=1 ; i<9 ; i++) + { + trap_S_RegisterSound(va("sound/weapons/saber/saberhup%i.wav", i)); + } + + for (i=1 ; i<10 ; i++) + { + trap_S_RegisterSound(va("sound/weapons/saber/saberblock%i.wav", i)); + } + + for (i=1 ; i<4 ; i++) + { + trap_S_RegisterSound(va("sound/weapons/saber/bounce%i.wav", i)); + } + + trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ); + trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" ); + trap_S_RegisterSound( "sound/weapons/saber/saberoffquick.wav" ); + trap_S_RegisterSound( "sound/weapons/saber/saberhitwall1" ); + trap_S_RegisterSound( "sound/weapons/saber/saberhitwall2" ); + trap_S_RegisterSound( "sound/weapons/saber/saberhitwall3" ); + trap_S_RegisterSound("sound/weapons/saber/saberhit.wav"); + + cgs.media.teamHealSound = trap_S_RegisterSound("sound/weapons/force/teamheal.wav"); + cgs.media.teamRegenSound = trap_S_RegisterSound("sound/weapons/force/teamforce.wav"); + + trap_S_RegisterSound("sound/weapons/force/heal.wav"); + trap_S_RegisterSound("sound/weapons/force/speed.wav"); + trap_S_RegisterSound("sound/weapons/force/see.wav"); + trap_S_RegisterSound("sound/weapons/force/rage.wav"); + trap_S_RegisterSound("sound/weapons/force/lightning.wav"); + trap_S_RegisterSound("sound/weapons/force/lightninghit.wav"); + trap_S_RegisterSound("sound/weapons/force/drain.wav"); + trap_S_RegisterSound("sound/weapons/force/jumpbuild.wav"); + trap_S_RegisterSound("sound/weapons/force/distract.wav"); + trap_S_RegisterSound("sound/weapons/force/distractstop.wav"); + trap_S_RegisterSound("sound/weapons/force/pull.wav"); + trap_S_RegisterSound("sound/weapons/force/push.wav"); + + if (cg_buildScript.integer) + { + trap_S_RegisterSound("sound/chars/atst/ATSTcrash.wav"); + trap_S_RegisterSound("sound/chars/atst/ATSTstart.wav"); + trap_S_RegisterSound("sound/chars/atst/ATSTstep1.wav"); + trap_S_RegisterSound("sound/chars/atst/ATSTstep2.wav"); + + trap_S_RegisterSound("sound/weapons/atst/ATSTfire1.wav"); + trap_S_RegisterSound("sound/weapons/atst/ATSTfire2.wav"); + trap_S_RegisterSound("sound/weapons/atst/ATSTfire3.wav"); + trap_S_RegisterSound("sound/weapons/atst/ATSTfire4.wav"); + } + + for (i=1 ; i<3 ; i++) + { + trap_S_RegisterSound(va("sound/weapons/thermal/bounce%i.wav", i)); + } + + trap_S_RegisterSound("sound/movers/switches/switch2.wav"); + trap_S_RegisterSound("sound/movers/switches/switch3.wav"); + trap_S_RegisterSound("sound/ambience/spark5.wav"); + trap_S_RegisterSound("sound/chars/turret/ping.wav"); + trap_S_RegisterSound("sound/chars/turret/startup.wav"); + trap_S_RegisterSound("sound/chars/turret/shutdown.wav"); + trap_S_RegisterSound("sound/chars/turret/move.wav"); + trap_S_RegisterSound("sound/player/pickuphealth.wav"); + trap_S_RegisterSound("sound/player/pickupshield.wav"); + + trap_S_RegisterSound("sound/effects/glassbreak1.wav"); + + trap_S_RegisterSound( "sound/weapons/rocket/tick.wav" ); + trap_S_RegisterSound( "sound/weapons/rocket/lock.wav" ); + + trap_S_RegisterSound("sound/weapons/force/speedloop.wav"); + + trap_S_RegisterSound("sound/weapons/force/protecthit.mp3"); //PDSOUND_PROTECTHIT + trap_S_RegisterSound("sound/weapons/force/protect.mp3"); //PDSOUND_PROTECT + trap_S_RegisterSound("sound/weapons/force/absorbhit.mp3"); //PDSOUND_ABSORBHIT + trap_S_RegisterSound("sound/weapons/force/absorb.mp3"); //PDSOUND_ABSORB + trap_S_RegisterSound("sound/weapons/force/jump.mp3"); //PDSOUND_FORCEJUMP + trap_S_RegisterSound("sound/weapons/force/grip.mp3"); //PDSOUND_FORCEGRIP + + if ( cgs.gametype >= GT_TEAM || cg_buildScript.integer ) { + +#ifdef JK2AWARDS + cgs.media.captureAwardSound = trap_S_RegisterSound( "sound/teamplay/flagcapture_yourteam.wav" ); +#endif + cgs.media.redLeadsSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM046"); + cgs.media.blueLeadsSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM045"); + cgs.media.teamsTiedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM032" ); + + cgs.media.redScoredSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM044"); + cgs.media.blueScoredSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM043" ); + + if ( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY || cg_buildScript.integer ) { + cgs.media.redFlagReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM042" ); + cgs.media.blueFlagReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM041" ); + cgs.media.redTookFlagSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM040" ); + cgs.media.blueTookFlagSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM039" ); + + cgs.media.redYsalReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM050" ); + cgs.media.blueYsalReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM049" ); + cgs.media.redTookYsalSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM048" ); + cgs.media.blueTookYsalSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM047" ); + } + } + + cgs.media.drainSound = trap_S_RegisterSound("sound/weapons/force/drained.mp3"); + + cgs.media.happyMusic = trap_S_RegisterSound("music/goodsmall.mp3"); + cgs.media.dramaticFailure = trap_S_RegisterSound("music/badsmall.mp3"); + + //PRECACHE ALL MUSIC HERE (don't need to precache normally because it's streamed off the disk) + if (cg_buildScript.integer) + { + trap_S_StartBackgroundTrack( "music/mp/duel.mp3", "music/mp/duel.mp3", qfalse ); + } + + cg.loadLCARSStage = 1; + + cgs.media.selectSound = trap_S_RegisterSound( "sound/weapons/change.wav" ); + + cgs.media.teleInSound = trap_S_RegisterSound( "sound/player/telein.wav" ); + cgs.media.teleOutSound = trap_S_RegisterSound( "sound/player/teleout.wav" ); + cgs.media.respawnSound = trap_S_RegisterSound( "sound/items/respawn1.wav" ); + + trap_S_RegisterSound( "sound/movers/objects/objectHit.wav" ); + + cgs.media.talkSound = trap_S_RegisterSound( "sound/player/talk.wav" ); + cgs.media.landSound = trap_S_RegisterSound( "sound/player/land1.wav"); + cgs.media.fallSound = trap_S_RegisterSound( "sound/player/fallsplat.wav"); + + cgs.media.crackleSound = trap_S_RegisterSound( "sound/effects/energy_crackle.wav" ); +#ifdef JK2AWARDS + cgs.media.impressiveSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM025" ); + cgs.media.excellentSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM053" ); + cgs.media.deniedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM017" ); + cgs.media.humiliationSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM019" ); + cgs.media.defendSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM024" ); +#endif + + cgs.media.takenLeadSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM051"); + cgs.media.tiedLeadSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM032"); + cgs.media.lostLeadSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM052"); + + cgs.media.rollSound = trap_S_RegisterSound( "sound/player/roll1.wav"); + + cgs.media.watrInSound = trap_S_RegisterSound( "sound/player/watr_in.wav"); + cgs.media.watrOutSound = trap_S_RegisterSound( "sound/player/watr_out.wav"); + cgs.media.watrUnSound = trap_S_RegisterSound( "sound/player/watr_un.wav"); + + cgs.media.explosionModel = trap_R_RegisterModel ( "models/map_objects/mp/sphere.md3" ); + cgs.media.surfaceExplosionShader = trap_R_RegisterShader( "surfaceExplosion" ); + + cgs.media.disruptorShader = trap_R_RegisterShader( "gfx/effects/burn"); + + if (cg_buildScript.integer) + { + trap_R_RegisterShader( "gfx/effects/turretflashdie" ); + } + + cgs.media.solidWhite = trap_R_RegisterShader( "gfx/effects/solidWhite_cull" ); + + trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable"); + trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable"); + + trap_R_RegisterModel ( "models/map_objects/mp/sphere.md3" ); + trap_R_RegisterModel("models/items/remote.md3"); + + cgs.media.holocronPickup = trap_S_RegisterSound( "sound/player/holocron.wav" ); + + // Zoom + cgs.media.zoomStart = trap_S_RegisterSound( "sound/interface/zoomstart.wav" ); + cgs.media.zoomLoop = trap_S_RegisterSound( "sound/interface/zoomloop.wav" ); + cgs.media.zoomEnd = trap_S_RegisterSound( "sound/interface/zoomend.wav" ); + + for (i=0 ; i<4 ; i++) { + Com_sprintf (name, sizeof(name), "sound/player/footsteps/boot%i.wav", i+1); + cgs.media.footsteps[FOOTSTEP_NORMAL][i] = trap_S_RegisterSound (name); + + Com_sprintf (name, sizeof(name), "sound/player/footsteps/splash%i.wav", i+1); + cgs.media.footsteps[FOOTSTEP_SPLASH][i] = trap_S_RegisterSound (name); + + Com_sprintf (name, sizeof(name), "sound/player/footsteps/clank%i.wav", i+1); + cgs.media.footsteps[FOOTSTEP_METAL][i] = trap_S_RegisterSound (name); + + // should these always be registered?? + Com_sprintf (name, sizeof(name), "sound/player/footsteps/step%i.wav", i+1); + trap_S_RegisterSound (name); + } + + // only register the items that the server says we need + strcpy( items, CG_ConfigString( CS_ITEMS ) ); + + for ( i = 1 ; i < bg_numItems ; i++ ) { +// if ( items[ i ] == '1' || cg_buildScript.integer ) { + CG_RegisterItemSounds( i ); +// } + } + + for ( i = 1 ; i < MAX_SOUNDS ; i++ ) { + soundName = CG_ConfigString( CS_SOUNDS+i ); + if ( !soundName[0] ) { + break; + } + if ( soundName[0] == '*' ) { + continue; // custom sound + } + cgs.gameSounds[i] = trap_S_RegisterSound( soundName ); + } + + for ( i = 1 ; i < MAX_FX ; i++ ) { + soundName = CG_ConfigString( CS_EFFECTS+i ); + if ( !soundName[0] ) { + break; + } + if ( soundName[0] == '*' ) { + continue; // custom sound + } + cgs.gameEffects[i] = trap_FX_RegisterEffect( soundName ); + } + + cg.loadLCARSStage = 2; + + // FIXME: only needed with item + cgs.media.deploySeeker = trap_S_RegisterSound ("sound/chars/seeker/misc/hiss"); + cgs.media.medkitSound = trap_S_RegisterSound ("sound/items/use_bacta.wav"); + + cgs.media.winnerSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM006" ); + cgs.media.loserSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM010" ); +} + + +//------------------------------------- +// CG_RegisterEffects +// +// Handles precaching all effect files +// and any shader, model, or sound +// files an effect may use. +//------------------------------------- +static void CG_RegisterEffects( void ) +{ + const char *effectName; + int i; + + for ( i = 1 ; i < MAX_FX ; i++ ) + { + effectName = CG_ConfigString( CS_EFFECTS + i ); + + if ( !effectName[0] ) + { + break; + } + + trap_FX_RegisterEffect( effectName ); + } + + // Set up the glass effects mini-system. + CG_InitGlass(); +} + +//=================================================================================== + +extern char *forceHolocronModels[]; +/* +================= +CG_RegisterGraphics + +This function may execute for a couple of minutes with a slow disk. +================= +*/ +static void CG_RegisterGraphics( void ) { + int i; + char items[MAX_ITEMS+1]; + static char *sb_nums[11] = { + "gfx/2d/numbers/zero", + "gfx/2d/numbers/one", + "gfx/2d/numbers/two", + "gfx/2d/numbers/three", + "gfx/2d/numbers/four", + "gfx/2d/numbers/five", + "gfx/2d/numbers/six", + "gfx/2d/numbers/seven", + "gfx/2d/numbers/eight", + "gfx/2d/numbers/nine", + "gfx/2d/numbers/minus", + }; + + static char *sb_t_nums[11] = { + "gfx/2d/numbers/t_zero", + "gfx/2d/numbers/t_one", + "gfx/2d/numbers/t_two", + "gfx/2d/numbers/t_three", + "gfx/2d/numbers/t_four", + "gfx/2d/numbers/t_five", + "gfx/2d/numbers/t_six", + "gfx/2d/numbers/t_seven", + "gfx/2d/numbers/t_eight", + "gfx/2d/numbers/t_nine", + "gfx/2d/numbers/t_minus", + }; + + static char *sb_c_nums[11] = { + "gfx/2d/numbers/c_zero", + "gfx/2d/numbers/c_one", + "gfx/2d/numbers/c_two", + "gfx/2d/numbers/c_three", + "gfx/2d/numbers/c_four", + "gfx/2d/numbers/c_five", + "gfx/2d/numbers/c_six", + "gfx/2d/numbers/c_seven", + "gfx/2d/numbers/c_eight", + "gfx/2d/numbers/c_nine", + "gfx/2d/numbers/t_minus", //????? + }; + + // clear any references to old media + memset( &cg.refdef, 0, sizeof( cg.refdef ) ); + trap_R_ClearScene(); + + CG_LoadingString( cgs.mapname ); + + trap_R_LoadWorldMap( cgs.mapname ); + + // precache status bar pics + CG_LoadingString( "game media" ); + + for ( i=0 ; i<11 ; i++) { + cgs.media.numberShaders[i] = trap_R_RegisterShader( sb_nums[i] ); + } + + cg.loadLCARSStage = 3; + + for ( i=0; i < 11; i++ ) + { + cgs.media.numberShaders[i] = trap_R_RegisterShaderNoMip( sb_nums[i] ); + cgs.media.smallnumberShaders[i] = trap_R_RegisterShaderNoMip( sb_t_nums[i] ); + cgs.media.chunkyNumberShaders[i] = trap_R_RegisterShaderNoMip( sb_c_nums[i] ); + } + + cgs.media.balloonShader = trap_R_RegisterShader( "gfx/mp/chat_icon" ); + + cgs.media.viewBloodShader = trap_R_RegisterShader( "viewBloodBlend" ); + + cgs.media.deferShader = trap_R_RegisterShaderNoMip( "gfx/2d/defer.tga" ); + + cgs.media.smokePuffShader = trap_R_RegisterShader( "smokePuff" ); + cgs.media.bloodTrailShader = trap_R_RegisterShader( "bloodTrail" ); + cgs.media.lagometerShader = trap_R_RegisterShaderNoMip("gfx/2d/lag" ); + cgs.media.connectionShader = trap_R_RegisterShaderNoMip( "gfx/2d/net" ); + + cgs.media.waterBubbleShader = trap_R_RegisterShader( "waterBubble" ); + + cgs.media.tracerShader = trap_R_RegisterShader( "gfx/misc/tracer" ); + + Com_Printf( S_COLOR_CYAN "---------- Fx System Initialization ---------\n" ); + trap_FX_InitSystem(); + Com_Printf( S_COLOR_CYAN "----- Fx System Initialization Complete -----\n" ); + CG_RegisterEffects(); + + + cgs.effects.turretShotEffect = trap_FX_RegisterEffect( "turret/shot" ); + + trap_FX_RegisterEffect("effects/blaster/deflect.efx"); + + trap_FX_RegisterEffect("emplaced/dead_smoke.efx"); + trap_FX_RegisterEffect("emplaced/explode.efx"); + + trap_FX_RegisterEffect("turret/explode.efx"); + + trap_FX_RegisterEffect("spark_explosion.efx"); + + trap_FX_RegisterEffect("effects/turret/muzzle_flash.efx"); + trap_FX_RegisterEffect("saber/spark.efx"); + trap_FX_RegisterEffect("mp/spawn.efx"); + trap_FX_RegisterEffect("mp/jedispawn.efx"); + trap_FX_RegisterEffect("mp/itemcone.efx"); + trap_FX_RegisterEffect("blaster/deflect.efx"); + trap_FX_RegisterEffect("saber/saber_block.efx"); + trap_FX_RegisterEffect("saber/spark.efx"); + trap_FX_RegisterEffect("saber/blood_sparks.efx"); + trap_FX_RegisterEffect("blaster/smoke_bolton"); + trap_FX_RegisterEffect("force/confusion.efx"); + + trap_FX_RegisterEffect("effects/force/lightning.efx"); + + + for ( i = 0 ; i < NUM_CROSSHAIRS ; i++ ) { + cgs.media.crosshairShader[i] = trap_R_RegisterShader( va("gfx/2d/crosshair%c", 'a'+i) ); + } + + cg.loadLCARSStage = 4; + + cgs.media.backTileShader = trap_R_RegisterShader( "gfx/2d/backtile" ); + cgs.media.noammoShader = trap_R_RegisterShader( "icons/noammo" ); + + // powerup shaders + cgs.media.quadShader = trap_R_RegisterShader("powerups/quad" ); + cgs.media.quadWeaponShader = trap_R_RegisterShader("powerups/quadWeapon" ); + cgs.media.battleSuitShader = trap_R_RegisterShader("powerups/battleSuit" ); + cgs.media.battleWeaponShader = trap_R_RegisterShader("powerups/battleWeapon" ); + cgs.media.invisShader = trap_R_RegisterShader("powerups/invisibility" ); + cgs.media.regenShader = trap_R_RegisterShader("powerups/regen" ); + cgs.media.hastePuffShader = trap_R_RegisterShader("hasteSmokePuff" ); + + cgs.media.itemRespawningPlaceholder = trap_R_RegisterShader("powerups/placeholder"); + cgs.media.itemRespawningRezOut = trap_R_RegisterShader("powerups/rezout"); + + cgs.media.playerShieldDamage = trap_R_RegisterShader("gfx/misc/personalshield"); + cgs.media.forceSightBubble = trap_R_RegisterShader("gfx/misc/sightbubble"); + cgs.media.forceShell = trap_R_RegisterShader("powerups/forceshell"); + cgs.media.sightShell = trap_R_RegisterShader("powerups/sightshell"); + + cgs.media.itemHoloModel = trap_R_RegisterModel("models/map_objects/mp/holo.md3"); + + if (cgs.gametype == GT_HOLOCRON || cg_buildScript.integer) + { + for ( i=0; i < NUM_FORCE_POWERS; i++ ) + { + if (forceHolocronModels[i] && + forceHolocronModels[i][0]) + { + trap_R_RegisterModel(forceHolocronModels[i]); + } + } + } + + if ( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY || cg_buildScript.integer ) { + if (cg_buildScript.integer) + { + trap_R_RegisterModel( "models/flags/r_flag.md3" ); + trap_R_RegisterModel( "models/flags/b_flag.md3" ); + trap_R_RegisterModel( "models/flags/r_flag_ysal.md3" ); + trap_R_RegisterModel( "models/flags/b_flag_ysal.md3" ); + } + + if (cgs.gametype == GT_CTF) + { + cgs.media.redFlagModel = trap_R_RegisterModel( "models/flags/r_flag.md3" ); + cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/b_flag.md3" ); + } + else + { + cgs.media.redFlagModel = trap_R_RegisterModel( "models/flags/r_flag_ysal.md3" ); + cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/b_flag_ysal.md3" ); + } + + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_x" ); + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_x" ); + + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_ys" ); + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_ys" ); + + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag" ); + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag" ); + + trap_R_RegisterShaderNoMip("gfx/2d/net.tga"); + + cgs.media.flagPoleModel = trap_R_RegisterModel( "models/flag2/flagpole.md3" ); + cgs.media.flagFlapModel = trap_R_RegisterModel( "models/flag2/flagflap3.md3" ); + + cgs.media.redFlagFlapSkin = trap_R_RegisterSkin( "models/flag2/red.skin" ); + cgs.media.blueFlagFlapSkin = trap_R_RegisterSkin( "models/flag2/blue.skin" ); + cgs.media.neutralFlagFlapSkin = trap_R_RegisterSkin( "models/flag2/white.skin" ); + + cgs.media.redFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/red_base.md3" ); + cgs.media.blueFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/blue_base.md3" ); + cgs.media.neutralFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/ntrl_base.md3" ); + } + + if ( cg_buildScript.integer ) { + cgs.media.neutralFlagModel = 0;//trap_R_RegisterModel( "models/flags/n_flag.md3" ); + cgs.media.flagShader[0] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_neutral1" ); + cgs.media.flagShader[1] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_red2" ); + cgs.media.flagShader[2] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_blu2" ); + cgs.media.flagShader[3] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_neutral3" ); + } + + + if ( cgs.gametype >= GT_TEAM || cg_buildScript.integer ) { + cgs.media.teamRedShader = trap_R_RegisterShader( "sprites/team_red" ); + cgs.media.teamBlueShader = trap_R_RegisterShader( "sprites/team_blue" ); + cgs.media.redQuadShader = trap_R_RegisterShader("powerups/blueflag" ); + cgs.media.teamStatusBar = trap_R_RegisterShader( "gfx/2d/colorbar.tga" ); + } + else if ( cgs.gametype == GT_JEDIMASTER ) + { + cgs.media.teamRedShader = trap_R_RegisterShader( "sprites/team_red" ); + } + + cgs.media.armorModel = 0;//trap_R_RegisterModel( "models/powerups/armor/armor_yel.md3" ); + cgs.media.armorIcon = 0;//trap_R_RegisterShaderNoMip( "icons/iconr_yellow" ); + + cgs.media.heartShader = trap_R_RegisterShaderNoMip( "ui/assets/statusbar/selectedhealth.tga" ); + + cgs.media.ysaliredShader = trap_R_RegisterShader( "powerups/ysaliredshell"); + cgs.media.ysaliblueShader = trap_R_RegisterShader( "powerups/ysaliblueshell"); + cgs.media.ysalimariShader = trap_R_RegisterShader( "powerups/ysalimarishell"); + cgs.media.boonShader = trap_R_RegisterShader( "powerups/boonshell"); + cgs.media.endarkenmentShader = trap_R_RegisterShader( "powerups/endarkenmentshell"); + cgs.media.enlightenmentShader = trap_R_RegisterShader( "powerups/enlightenmentshell"); + cgs.media.invulnerabilityShader = trap_R_RegisterShader( "powerups/invulnerabilityshell"); + +#ifdef JK2AWARDS + cgs.media.medalImpressive = trap_R_RegisterShaderNoMip( "medal_impressive" ); + cgs.media.medalExcellent = trap_R_RegisterShaderNoMip( "medal_excellent" ); + cgs.media.medalGauntlet = trap_R_RegisterShaderNoMip( "medal_gauntlet" ); + cgs.media.medalDefend = trap_R_RegisterShaderNoMip( "medal_defend" ); + cgs.media.medalAssist = trap_R_RegisterShaderNoMip( "medal_assist" ); + cgs.media.medalCapture = trap_R_RegisterShaderNoMip( "medal_capture" ); +#endif + + // Binocular interface + cgs.media.binocularCircle = trap_R_RegisterShader( "gfx/2d/binCircle" ); + cgs.media.binocularMask = trap_R_RegisterShader( "gfx/2d/binMask" ); + cgs.media.binocularArrow = trap_R_RegisterShader( "gfx/2d/binSideArrow" ); + cgs.media.binocularTri = trap_R_RegisterShader( "gfx/2d/binTopTri" ); + cgs.media.binocularStatic = trap_R_RegisterShader( "gfx/2d/binocularWindow" ); + cgs.media.binocularOverlay = trap_R_RegisterShader( "gfx/2d/binocularNumOverlay" ); + + cg.loadLCARSStage = 5; + +/* +Ghoul2 Insert Start +*/ + CG_InitItems(); +/* +Ghoul2 Insert End +*/ + memset( cg_weapons, 0, sizeof( cg_weapons ) ); + + // only register the items that the server says we need + strcpy( items, CG_ConfigString( CS_ITEMS) ); + + for ( i = 1 ; i < bg_numItems ; i++ ) { + if ( items[ i ] == '1' || cg_buildScript.integer ) { + CG_LoadingItem( i ); + CG_RegisterItemVisuals( i ); + } + } + + cg.loadLCARSStage = 6; + + cgs.media.glassShardShader = trap_R_RegisterShader( "gfx/misc/test_crackle" ); + + // doing one shader just makes it look like a shell. By using two shaders with different bulge offsets and different texture scales, it has a much more chaotic look + cgs.media.electricBodyShader = trap_R_RegisterShader( "gfx/misc/electric" ); + cgs.media.electricBody2Shader = trap_R_RegisterShader( "gfx/misc/fullbodyelectric2" ); + + // wall marks + cgs.media.bulletMarkShader = trap_R_RegisterShader( "gfx/damage/bullet_mrk" ); + cgs.media.burnMarkShader = trap_R_RegisterShader( "gfx/damage/burn_med_mrk" ); + cgs.media.holeMarkShader = trap_R_RegisterShader( "gfx/damage/hole_lg_mrk" ); + cgs.media.energyMarkShader = trap_R_RegisterShader( "gfx/damage/plasma_mrk" ); + cgs.media.shadowMarkShader = trap_R_RegisterShader( "markShadow" ); + cgs.media.wakeMarkShader = trap_R_RegisterShader( "wake" ); + cgs.media.bloodMarkShader = trap_R_RegisterShader( "bloodMark" ); + + cgs.media.viewPainShader = trap_R_RegisterShader( "gfx/misc/borgeyeflare" ); + cgs.media.viewPainShader_Shields = trap_R_RegisterShader( "gfx/mp/dmgshader_shields" ); + cgs.media.viewPainShader_ShieldsAndHealth = trap_R_RegisterShader( "gfx/mp/dmgshader_shieldsandhealth" ); + + // register the inline models + cgs.numInlineModels = trap_CM_NumInlineModels(); + for ( i = 1 ; i < cgs.numInlineModels ; i++ ) { + char name[10]; + vec3_t mins, maxs; + int j; + + Com_sprintf( name, sizeof(name), "*%i", i ); + cgs.inlineDrawModel[i] = trap_R_RegisterModel( name ); + trap_R_ModelBounds( cgs.inlineDrawModel[i], mins, maxs ); + for ( j = 0 ; j < 3 ; j++ ) { + cgs.inlineModelMidpoints[i][j] = mins[j] + 0.5 * ( maxs[j] - mins[j] ); + } + } + + cg.loadLCARSStage = 7; + + // register all the server specified models + for (i=1 ; i= MAX_CONFIGSTRINGS ) { + CG_Error( "CG_ConfigString: bad index: %i", index ); + } + return cgs.gameState.stringData + cgs.gameState.stringOffsets[ index ]; +} + +//================================================================== + +/* +====================== +CG_StartMusic + +====================== +*/ +void CG_StartMusic( qboolean bForceStart ) { + char *s; + char parm1[MAX_QPATH], parm2[MAX_QPATH]; + + // start the background music + s = (char *)CG_ConfigString( CS_MUSIC ); + Q_strncpyz( parm1, COM_Parse( (const char **)&s ), sizeof( parm1 ) ); + Q_strncpyz( parm2, COM_Parse( (const char **)&s ), sizeof( parm2 ) ); + + trap_S_StartBackgroundTrack( parm1, parm2, !bForceStart ); +} + +char *CG_GetMenuBuffer(const char *filename) { + int len; + fileHandle_t f; + static char buf[MAX_MENUFILE]; + + len = trap_FS_FOpenFile( filename, &f, FS_READ ); + if ( !f ) { + trap_Print( va( S_COLOR_RED "menu file not found: %s, using default\n", filename ) ); + return NULL; + } + if ( len >= MAX_MENUFILE ) { + trap_Print( va( S_COLOR_RED "menu file too large: %s is %i, max allowed is %i", filename, len, MAX_MENUFILE ) ); + trap_FS_FCloseFile( f ); + return NULL; + } + + trap_FS_Read( buf, len, f ); + buf[len] = 0; + trap_FS_FCloseFile( f ); + + return buf; +} + +// +// ============================== +// new hud stuff ( mission pack ) +// ============================== +// +qboolean CG_Asset_Parse(int handle) { + pc_token_t token; + const char *tempStr; + + if (!trap_PC_ReadToken(handle, &token)) + return qfalse; + if (Q_stricmp(token.string, "{") != 0) { + return qfalse; + } + + while ( 1 ) { + if (!trap_PC_ReadToken(handle, &token)) + return qfalse; + + if (Q_stricmp(token.string, "}") == 0) { + return qtrue; + } + + // font + if (Q_stricmp(token.string, "font") == 0) { + int pointSize; + if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) { + return qfalse; + } + +// cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.textFont); + cgDC.Assets.qhMediumFont = cgDC.RegisterFont(tempStr); + continue; + } + + // smallFont + if (Q_stricmp(token.string, "smallFont") == 0) { + int pointSize; + if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) { + return qfalse; + } +// cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.smallFont); + cgDC.Assets.qhSmallFont = cgDC.RegisterFont(tempStr); + continue; + } + + // font + if (Q_stricmp(token.string, "bigfont") == 0) { + int pointSize; + if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) { + return qfalse; + } +// cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.bigFont); + cgDC.Assets.qhBigFont = cgDC.RegisterFont(tempStr); + continue; + } + + // gradientbar + if (Q_stricmp(token.string, "gradientbar") == 0) { + if (!PC_String_Parse(handle, &tempStr)) { + return qfalse; + } + cgDC.Assets.gradientBar = trap_R_RegisterShaderNoMip(tempStr); + continue; + } + + // enterMenuSound + if (Q_stricmp(token.string, "menuEnterSound") == 0) { + if (!PC_String_Parse(handle, &tempStr)) { + return qfalse; + } + cgDC.Assets.menuEnterSound = trap_S_RegisterSound( tempStr ); + continue; + } + + // exitMenuSound + if (Q_stricmp(token.string, "menuExitSound") == 0) { + if (!PC_String_Parse(handle, &tempStr)) { + return qfalse; + } + cgDC.Assets.menuExitSound = trap_S_RegisterSound( tempStr ); + continue; + } + + // itemFocusSound + if (Q_stricmp(token.string, "itemFocusSound") == 0) { + if (!PC_String_Parse(handle, &tempStr)) { + return qfalse; + } + cgDC.Assets.itemFocusSound = trap_S_RegisterSound( tempStr ); + continue; + } + + // menuBuzzSound + if (Q_stricmp(token.string, "menuBuzzSound") == 0) { + if (!PC_String_Parse(handle, &tempStr)) { + return qfalse; + } + cgDC.Assets.menuBuzzSound = trap_S_RegisterSound( tempStr ); + continue; + } + + if (Q_stricmp(token.string, "cursor") == 0) { + if (!PC_String_Parse(handle, &cgDC.Assets.cursorStr)) { + return qfalse; + } + cgDC.Assets.cursor = trap_R_RegisterShaderNoMip( cgDC.Assets.cursorStr); + continue; + } + + if (Q_stricmp(token.string, "fadeClamp") == 0) { + if (!PC_Float_Parse(handle, &cgDC.Assets.fadeClamp)) { + return qfalse; + } + continue; + } + + if (Q_stricmp(token.string, "fadeCycle") == 0) { + if (!PC_Int_Parse(handle, &cgDC.Assets.fadeCycle)) { + return qfalse; + } + continue; + } + + if (Q_stricmp(token.string, "fadeAmount") == 0) { + if (!PC_Float_Parse(handle, &cgDC.Assets.fadeAmount)) { + return qfalse; + } + continue; + } + + if (Q_stricmp(token.string, "shadowX") == 0) { + if (!PC_Float_Parse(handle, &cgDC.Assets.shadowX)) { + return qfalse; + } + continue; + } + + if (Q_stricmp(token.string, "shadowY") == 0) { + if (!PC_Float_Parse(handle, &cgDC.Assets.shadowY)) { + return qfalse; + } + continue; + } + + if (Q_stricmp(token.string, "shadowColor") == 0) { + if (!PC_Color_Parse(handle, &cgDC.Assets.shadowColor)) { + return qfalse; + } + cgDC.Assets.shadowFadeClamp = cgDC.Assets.shadowColor[3]; + continue; + } + } + return qfalse; // bk001204 - why not? +} + +void CG_ParseMenu(const char *menuFile) { + pc_token_t token; + int handle; + + handle = trap_PC_LoadSource(menuFile); + if (!handle) + handle = trap_PC_LoadSource("ui/testhud.menu"); + if (!handle) + return; + + while ( 1 ) { + if (!trap_PC_ReadToken( handle, &token )) { + break; + } + + //if ( Q_stricmp( token, "{" ) ) { + // Com_Printf( "Missing { in menu file\n" ); + // break; + //} + + //if ( menuCount == MAX_MENUS ) { + // Com_Printf( "Too many menus!\n" ); + // break; + //} + + if ( token.string[0] == '}' ) { + break; + } + + if (Q_stricmp(token.string, "assetGlobalDef") == 0) { + if (CG_Asset_Parse(handle)) { + continue; + } else { + break; + } + } + + + if (Q_stricmp(token.string, "menudef") == 0) { + // start a new menu + Menu_New(handle); + } + } + trap_PC_FreeSource(handle); +} + +qboolean CG_Load_Menu(char **p) { + char *token; + + token = COM_ParseExt((const char **)p, qtrue); + + if (token[0] != '{') { + return qfalse; + } + + while ( 1 ) { + + token = COM_ParseExt((const char **)p, qtrue); + + if (Q_stricmp(token, "}") == 0) { + return qtrue; + } + + if ( !token || token[0] == 0 ) { + return qfalse; + } + + CG_ParseMenu(token); + } + return qfalse; +} + + +static qboolean CG_OwnerDrawHandleKey(int ownerDraw, int flags, float *special, int key) { + return qfalse; +} + + +static int CG_FeederCount(float feederID) { + int i, count; + count = 0; + if (feederID == FEEDER_REDTEAM_LIST) { + for (i = 0; i < cg.numScores; i++) { + if (cg.scores[i].team == TEAM_RED) { + count++; + } + } + } else if (feederID == FEEDER_BLUETEAM_LIST) { + for (i = 0; i < cg.numScores; i++) { + if (cg.scores[i].team == TEAM_BLUE) { + count++; + } + } + } else if (feederID == FEEDER_SCOREBOARD) { + return cg.numScores; + } + return count; +} + + +void CG_SetScoreSelection(void *p) { + menuDef_t *menu = (menuDef_t*)p; + playerState_t *ps = &cg.snap->ps; + int i, red, blue; + red = blue = 0; + for (i = 0; i < cg.numScores; i++) { + if (cg.scores[i].team == TEAM_RED) { + red++; + } else if (cg.scores[i].team == TEAM_BLUE) { + blue++; + } + if (ps->clientNum == cg.scores[i].client) { + cg.selectedScore = i; + } + } + + if (menu == NULL) { + // just interested in setting the selected score + return; + } + + if ( cgs.gametype >= GT_TEAM ) { + int feeder = FEEDER_REDTEAM_LIST; + i = red; + if (cg.scores[cg.selectedScore].team == TEAM_BLUE) { + feeder = FEEDER_BLUETEAM_LIST; + i = blue; + } + Menu_SetFeederSelection(menu, feeder, i, NULL); + } else { + Menu_SetFeederSelection(menu, FEEDER_SCOREBOARD, cg.selectedScore, NULL); + } +} + +// FIXME: might need to cache this info +static clientInfo_t * CG_InfoFromScoreIndex(int index, int team, int *scoreIndex) { + int i, count; + if ( cgs.gametype >= GT_TEAM ) { + count = 0; + for (i = 0; i < cg.numScores; i++) { + if (cg.scores[i].team == team) { + if (count == index) { + *scoreIndex = i; + return &cgs.clientinfo[cg.scores[i].client]; + } + count++; + } + } + } + *scoreIndex = index; + return &cgs.clientinfo[ cg.scores[index].client ]; +} + +static const char *CG_FeederItemText(float feederID, int index, int column, + qhandle_t *handle1, qhandle_t *handle2, qhandle_t *handle3) { + gitem_t *item; + int scoreIndex = 0; + clientInfo_t *info = NULL; + int team = -1; + score_t *sp = NULL; + + *handle1 = *handle2 = *handle3 = -1; + + if (feederID == FEEDER_REDTEAM_LIST) { + team = TEAM_RED; + } else if (feederID == FEEDER_BLUETEAM_LIST) { + team = TEAM_BLUE; + } + + info = CG_InfoFromScoreIndex(index, team, &scoreIndex); + sp = &cg.scores[scoreIndex]; + + if (info && info->infoValid) { + switch (column) { + case 0: + if ( info->powerups & ( 1 << PW_NEUTRALFLAG ) ) { + item = BG_FindItemForPowerup( PW_NEUTRALFLAG ); + *handle1 = cg_items[ ITEM_INDEX(item) ].icon; + } else if ( info->powerups & ( 1 << PW_REDFLAG ) ) { + item = BG_FindItemForPowerup( PW_REDFLAG ); + *handle1 = cg_items[ ITEM_INDEX(item) ].icon; + } else if ( info->powerups & ( 1 << PW_BLUEFLAG ) ) { + item = BG_FindItemForPowerup( PW_BLUEFLAG ); + *handle1 = cg_items[ ITEM_INDEX(item) ].icon; + } else { + /* + if ( info->botSkill > 0 && info->botSkill <= 5 ) { + *handle1 = cgs.media.botSkillShaders[ info->botSkill - 1 ]; + } else if ( info->handicap < 100 ) { + return va("%i", info->handicap ); + } + */ + } + break; + case 1: + if (team == -1) { + return ""; + } else { + *handle1 = CG_StatusHandle(info->teamTask); + } + break; + case 2: + if ( cg.snap->ps.stats[ STAT_CLIENTS_READY ] & ( 1 << sp->client ) ) { + return "Ready"; + } + if (team == -1) { + if (cgs.gametype == GT_TOURNAMENT) { + return va("%i/%i", info->wins, info->losses); + } else if (info->infoValid && info->team == TEAM_SPECTATOR ) { + return "Spectator"; + } else { + return ""; + } + } else { + if (info->teamLeader) { + return "Leader"; + } + } + break; + case 3: + return info->name; + break; + case 4: + return va("%i", info->score); + break; + case 5: + return va("%4i", sp->time); + break; + case 6: + if ( sp->ping == -1 ) { + return "connecting"; + } + return va("%4i", sp->ping); + break; + } + } + + return ""; +} + +static qhandle_t CG_FeederItemImage(float feederID, int index) { + return 0; +} + +static qboolean CG_FeederSelection(float feederID, int index) { + if ( cgs.gametype >= GT_TEAM ) { + int i, count; + int team = (feederID == FEEDER_REDTEAM_LIST) ? TEAM_RED : TEAM_BLUE; + count = 0; + for (i = 0; i < cg.numScores; i++) { + if (cg.scores[i].team == team) { + if (index == count) { + cg.selectedScore = i; + } + count++; + } + } + } else { + cg.selectedScore = index; + } + + return qtrue; +} + +static float CG_Cvar_Get(const char *cvar) { + char buff[128]; + memset(buff, 0, sizeof(buff)); + trap_Cvar_VariableStringBuffer(cvar, buff, sizeof(buff)); + return atof(buff); +} + +void CG_Text_PaintWithCursor(float x, float y, float scale, vec4_t color, const char *text, int cursorPos, char cursor, int limit, int style, int iMenuFont) { + CG_Text_Paint(x, y, scale, color, text, 0, limit, style, iMenuFont); +} + +static int CG_OwnerDrawWidth(int ownerDraw, float scale) { + switch (ownerDraw) { + case CG_GAME_TYPE: + return CG_Text_Width(CG_GameTypeString(), scale, FONT_MEDIUM); + case CG_GAME_STATUS: + return CG_Text_Width(CG_GetGameStatusText(), scale, FONT_MEDIUM); + break; + case CG_KILLER: + return CG_Text_Width(CG_GetKillerText(), scale, FONT_MEDIUM); + break; + case CG_RED_NAME: + return CG_Text_Width(cg_redTeamName.string, scale, FONT_MEDIUM); + break; + case CG_BLUE_NAME: + return CG_Text_Width(cg_blueTeamName.string, scale, FONT_MEDIUM); + break; + + + } + return 0; +} + +static int CG_PlayCinematic(const char *name, float x, float y, float w, float h) { + return trap_CIN_PlayCinematic(name, x, y, w, h, CIN_loop); +} + +static void CG_StopCinematic(int handle) { + trap_CIN_StopCinematic(handle); +} + +static void CG_DrawCinematic(int handle, float x, float y, float w, float h) { + trap_CIN_SetExtents(handle, x, y, w, h); + trap_CIN_DrawCinematic(handle); +} + +static void CG_RunCinematicFrame(int handle) { + trap_CIN_RunCinematic(handle); +} + +/* +================= +CG_LoadHudMenu(); + +================= +*/ +void CG_LoadHudMenu() +{ + cgDC.registerShaderNoMip = &trap_R_RegisterShaderNoMip; + cgDC.setColor = &trap_R_SetColor; + cgDC.drawHandlePic = &CG_DrawPic; + cgDC.drawStretchPic = &trap_R_DrawStretchPic; + cgDC.drawText = &CG_Text_Paint; + cgDC.textWidth = &CG_Text_Width; + cgDC.textHeight = &CG_Text_Height; + cgDC.registerModel = &trap_R_RegisterModel; + cgDC.modelBounds = &trap_R_ModelBounds; + cgDC.fillRect = &CG_FillRect; + cgDC.drawRect = &CG_DrawRect; + cgDC.drawSides = &CG_DrawSides; + cgDC.drawTopBottom = &CG_DrawTopBottom; + cgDC.clearScene = &trap_R_ClearScene; + cgDC.addRefEntityToScene = &trap_R_AddRefEntityToScene; + cgDC.renderScene = &trap_R_RenderScene; + cgDC.RegisterFont = &trap_R_RegisterFont; + cgDC.Font_StrLenPixels = &trap_R_Font_StrLenPixels; + cgDC.Font_StrLenChars = &trap_R_Font_StrLenChars; + cgDC.Font_HeightPixels = &trap_R_Font_HeightPixels; + cgDC.Font_DrawString = &trap_R_Font_DrawString; + cgDC.Language_IsAsian = &trap_Language_IsAsian; + cgDC.Language_UsesSpaces = &trap_Language_UsesSpaces; + cgDC.AnyLanguage_ReadCharFromString = &trap_AnyLanguage_ReadCharFromString; + cgDC.ownerDrawItem = &CG_OwnerDraw; + cgDC.getValue = &CG_GetValue; + cgDC.ownerDrawVisible = &CG_OwnerDrawVisible; + cgDC.runScript = &CG_RunMenuScript; + cgDC.deferScript = &CG_DeferMenuScript; + cgDC.getTeamColor = &CG_GetTeamColor; + cgDC.setCVar = trap_Cvar_Set; + cgDC.getCVarString = trap_Cvar_VariableStringBuffer; + cgDC.getCVarValue = CG_Cvar_Get; + cgDC.drawTextWithCursor = &CG_Text_PaintWithCursor; + //cgDC.setOverstrikeMode = &trap_Key_SetOverstrikeMode; + //cgDC.getOverstrikeMode = &trap_Key_GetOverstrikeMode; + cgDC.startLocalSound = &trap_S_StartLocalSound; + cgDC.ownerDrawHandleKey = &CG_OwnerDrawHandleKey; + cgDC.feederCount = &CG_FeederCount; + cgDC.feederItemImage = &CG_FeederItemImage; + cgDC.feederItemText = &CG_FeederItemText; + cgDC.feederSelection = &CG_FeederSelection; + //cgDC.setBinding = &trap_Key_SetBinding; + //cgDC.getBindingBuf = &trap_Key_GetBindingBuf; + //cgDC.keynumToStringBuf = &trap_Key_KeynumToStringBuf; + //cgDC.executeText = &trap_Cmd_ExecuteText; + cgDC.Error = &Com_Error; + cgDC.Print = &Com_Printf; + cgDC.ownerDrawWidth = &CG_OwnerDrawWidth; + //cgDC.Pause = &CG_Pause; + cgDC.registerSound = &trap_S_RegisterSound; + cgDC.startBackgroundTrack = &trap_S_StartBackgroundTrack; + cgDC.stopBackgroundTrack = &trap_S_StopBackgroundTrack; + cgDC.playCinematic = &CG_PlayCinematic; + cgDC.stopCinematic = &CG_StopCinematic; + cgDC.drawCinematic = &CG_DrawCinematic; + cgDC.runCinematicFrame = &CG_RunCinematicFrame; + + Init_Display(&cgDC); + + Menu_Reset(); +} + +void CG_AssetCache() { + //if (Assets.textFont == NULL) { + // trap_R_RegisterFont("fonts/arial.ttf", 72, &Assets.textFont); + //} + //Assets.background = trap_R_RegisterShaderNoMip( ASSET_BACKGROUND ); + //Com_Printf("Menu Size: %i bytes\n", sizeof(Menus)); + cgDC.Assets.gradientBar = trap_R_RegisterShaderNoMip( ASSET_GRADIENTBAR ); + cgDC.Assets.fxBasePic = trap_R_RegisterShaderNoMip( ART_FX_BASE ); + cgDC.Assets.fxPic[0] = trap_R_RegisterShaderNoMip( ART_FX_RED ); + cgDC.Assets.fxPic[1] = trap_R_RegisterShaderNoMip( ART_FX_YELLOW ); + cgDC.Assets.fxPic[2] = trap_R_RegisterShaderNoMip( ART_FX_GREEN ); + cgDC.Assets.fxPic[3] = trap_R_RegisterShaderNoMip( ART_FX_TEAL ); + cgDC.Assets.fxPic[4] = trap_R_RegisterShaderNoMip( ART_FX_BLUE ); + cgDC.Assets.fxPic[5] = trap_R_RegisterShaderNoMip( ART_FX_CYAN ); + cgDC.Assets.fxPic[6] = trap_R_RegisterShaderNoMip( ART_FX_WHITE ); + cgDC.Assets.scrollBar = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR ); + cgDC.Assets.scrollBarArrowDown = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWDOWN ); + cgDC.Assets.scrollBarArrowUp = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWUP ); + cgDC.Assets.scrollBarArrowLeft = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWLEFT ); + cgDC.Assets.scrollBarArrowRight = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWRIGHT ); + cgDC.Assets.scrollBarThumb = trap_R_RegisterShaderNoMip( ASSET_SCROLL_THUMB ); + cgDC.Assets.sliderBar = trap_R_RegisterShaderNoMip( ASSET_SLIDER_BAR ); + cgDC.Assets.sliderThumb = trap_R_RegisterShaderNoMip( ASSET_SLIDER_THUMB ); +} + +/* + + +/* +Ghoul2 Insert Start +*/ + +// initialise the cg_entities structure - take into account the ghoul2 stl stuff in the active snap shots +void CG_Init_CG(void) +{ + memset( &cg, 0, sizeof(cg)); +} + +// initialise the cg_entities structure - take into account the ghoul2 stl stuff +void CG_Init_CGents(void) +{ + + memset(&cg_entities, 0, sizeof(cg_entities)); +} + + +void CG_InitItems(void) +{ + memset( cg_items, 0, sizeof( cg_items ) ); +} + +/* +Ghoul2 Insert End +*/ + +forceTicPos_t forceTicPos[] = +{ + + 11, 41, 20, 10, "gfx/hud/force_tick1", 0, // Left Top + 12, 45, 20, 10, "gfx/hud/force_tick2", 0, + 14, 49, 20, 10, "gfx/hud/force_tick3", 0, + 17, 52, 20, 10, "gfx/hud/force_tick4", 0, + 22, 55, 10, 10, "gfx/hud/force_tick5", 0, + 28, 57, 10, 20, "gfx/hud/force_tick6", 0, + 34, 59, 10, 10, "gfx/hud/force_tick7", 0, // Left bottom + + 46, 59, -10, 10, "gfx/hud/force_tick7", 0, // Right bottom + 52, 57, -10, 20, "gfx/hud/force_tick6", 0, + 58, 55, -10, 10, "gfx/hud/force_tick5", 0, + 63, 52, -20, 10, "gfx/hud/force_tick4", 0, + 66, 49, -20, 10, "gfx/hud/force_tick3", 0, + 68, 45, -20, 10, "gfx/hud/force_tick2", 0, + 69, 41, -20, 10, "gfx/hud/force_tick1", 0, // Right top +}; + +forceTicPos_t ammoTicPos[] = +{ + 12, 34, 10, 10, "gfx/hud/ammo_tick7", 0, // Bottom + 13, 28, 10, 10, "gfx/hud/ammo_tick6", 0, + 15, 23, 10, 10, "gfx/hud/ammo_tick5", 0, + 19, 19, 10, 10, "gfx/hud/ammo_tick4", 0, + 23, 15, 10, 10, "gfx/hud/ammo_tick3", 0, + 29, 12, 10, 10, "gfx/hud/ammo_tick2", 0, + 34, 11, 10, 10, "gfx/hud/ammo_tick1", 0, + + 47, 11, -10, 10, "gfx/hud/ammo_tick1", 0, + 52, 12, -10, 10, "gfx/hud/ammo_tick2", 0, + 58, 15, -10, 10, "gfx/hud/ammo_tick3", 0, + 62, 19, -10, 10, "gfx/hud/ammo_tick4", 0, + 66, 23, -10, 10, "gfx/hud/ammo_tick5", 0, + 68, 28, -10, 10, "gfx/hud/ammo_tick6", 0, + 69, 34, -10, 10, "gfx/hud/ammo_tick7", 0, +}; + + +/* +================= +CG_Init + +Called after every level change or subsystem restart +Will perform callbacks to make the loading info screen update. +================= +*/ +void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) { + const char *s; + int i = 0; + + trap_CG_RegisterSharedMemory(cg.sharedBuffer); + + // clear everything +/* +Ghoul2 Insert Start +*/ + +// memset( cg_entities, 0, sizeof( cg_entities ) ); + CG_Init_CGents(); +// this is a No-No now we have stl vector classes in here. +// memset( &cg, 0, sizeof( cg ) ); + CG_Init_CG(); + CG_InitItems(); +/* +Ghoul2 Insert End +*/ + + // this is kinda dumb as well, but I need to pre-load some fonts in order to have the text available + // to say I'm loading the assets.... which includes loading the fonts. So I'll set these up as reasonable + // defaults, then let the menu asset parser (which actually specifies the ingame fonts) load over them + // if desired during parse. Dunno how legal it is to store in these cgDC things, but it causes no harm + // and even if/when they get overwritten they'll be legalised by the menu asset parser :-) +// CG_LoadFonts(); + cgDC.Assets.qhSmallFont = trap_R_RegisterFont("ocr_a"); + cgDC.Assets.qhMediumFont = trap_R_RegisterFont("ergoec"); + cgDC.Assets.qhBigFont = cgDC.Assets.qhMediumFont; + + memset( &cgs, 0, sizeof( cgs ) ); + memset( cg_weapons, 0, sizeof(cg_weapons) ); + + cg.clientNum = clientNum; + + cgs.processedSnapshotNum = serverMessageNum; + cgs.serverCommandSequence = serverCommandSequence; + + cg.loadLCARSStage = 0; + + cg.itemSelect = -1; + cg.forceSelect = -1; + + // load a few needed things before we do any screen updates + cgs.media.charsetShader = trap_R_RegisterShaderNoMip( "gfx/2d/charsgrid_med" ); + cgs.media.whiteShader = trap_R_RegisterShader( "white" ); + + cgs.media.loadBarLED = trap_R_RegisterShaderNoMip( "gfx/hud/load_tick" ); + cgs.media.loadBarLEDCap = trap_R_RegisterShaderNoMip( "gfx/hud/load_tick_cap" ); + cgs.media.loadBarLEDSurround= trap_R_RegisterShaderNoMip( "gfx/hud/mp_levelload" ); + + //rww - precache HUD weapon icons here + //actually, these should be stored in the icon field of each item def + cgs.media.weaponIcons[WP_STUN_BATON] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_stunbaton"); + cgs.media.weaponIcons_NA[WP_STUN_BATON] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_stunbaton_na"); + + cgs.media.weaponIcons[WP_SABER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_lightsaber"); + cgs.media.weaponIcons_NA[WP_SABER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_lightsaber_na"); + + cgs.media.weaponIcons[WP_BRYAR_PISTOL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_briar"); + cgs.media.weaponIcons_NA[WP_BRYAR_PISTOL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_briar_na"); + + cgs.media.weaponIcons[WP_BLASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_blaster"); + cgs.media.weaponIcons_NA[WP_BLASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_blaster_na"); + + cgs.media.weaponIcons[WP_DISRUPTOR] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_disruptor"); + cgs.media.weaponIcons_NA[WP_DISRUPTOR] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_disruptor_na"); + + cgs.media.weaponIcons[WP_BOWCASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_bowcaster"); + cgs.media.weaponIcons_NA[WP_BOWCASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_bowcaster_na"); + + cgs.media.weaponIcons[WP_REPEATER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_repeater"); + cgs.media.weaponIcons_NA[WP_REPEATER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_repeater_na"); + + cgs.media.weaponIcons[WP_DEMP2] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_demp2"); + cgs.media.weaponIcons_NA[WP_DEMP2] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_demp2_na"); + + cgs.media.weaponIcons[WP_FLECHETTE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_flechette"); + cgs.media.weaponIcons_NA[WP_FLECHETTE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_flechette_na"); + + cgs.media.weaponIcons[WP_ROCKET_LAUNCHER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_merrsonn"); + cgs.media.weaponIcons_NA[WP_ROCKET_LAUNCHER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_merrsonn_na"); + + cgs.media.weaponIcons[WP_THERMAL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_thermal"); + cgs.media.weaponIcons_NA[WP_THERMAL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_thermal_na"); + + cgs.media.weaponIcons[WP_TRIP_MINE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_tripmine"); + cgs.media.weaponIcons_NA[WP_TRIP_MINE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_tripmine_na"); + + cgs.media.weaponIcons[WP_DET_PACK] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_detpack"); + cgs.media.weaponIcons_NA[WP_DET_PACK] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_detpack_na"); + + // HUD artwork for cycling inventory,weapons and force powers + cgs.media.weaponIconBackground = trap_R_RegisterShaderNoMip( "gfx/hud/background"); + cgs.media.weaponProngsOn = trap_R_RegisterShaderNoMip( "gfx/hud/prong_on_w"); + cgs.media.weaponProngsOff = trap_R_RegisterShaderNoMip( "gfx/hud/prong_off"); + cgs.media.forceProngsOn = trap_R_RegisterShaderNoMip( "gfx/hud/prong_on_f"); + cgs.media.forceIconBackground = trap_R_RegisterShaderNoMip( "gfx/hud/background_f"); + cgs.media.inventoryIconBackground = trap_R_RegisterShaderNoMip( "gfx/hud/background_i"); + cgs.media.inventoryProngsOn = trap_R_RegisterShaderNoMip( "gfx/hud/prong_on_i"); + + //rww - precache holdable item icons here + while (i < bg_numItems) + { + if (bg_itemlist[i].giType == IT_HOLDABLE) + { + if (bg_itemlist[i].icon) + { + cgs.media.invenIcons[bg_itemlist[i].giTag] = trap_R_RegisterShaderNoMip(bg_itemlist[i].icon); + } + else + { + cgs.media.invenIcons[bg_itemlist[i].giTag] = 0; + } + } + + i++; + } + + //rww - precache force power icons here + i = 0; + + while (i < NUM_FORCE_POWERS) + { + cgs.media.forcePowerIcons[i] = trap_R_RegisterShaderNoMip(HolocronIcons[i]); + + i++; + } + cgs.media.rageRecShader = trap_R_RegisterShaderNoMip("gfx/mp/f_icon_ragerec"); + + //rww - precache other HUD graphics + cgs.media.HUDLeftFrame = trap_R_RegisterShaderNoMip( "gfx/hud/static_test" ); + cgs.media.HUDInnerLeft = trap_R_RegisterShaderNoMip( "gfx/hud/hudleft_innerframe" ); + cgs.media.HUDArmor1 = trap_R_RegisterShaderNoMip( "gfx/hud/armor1" ); + cgs.media.HUDArmor2 = trap_R_RegisterShaderNoMip( "gfx/hud/armor2" ); + cgs.media.HUDHealth = trap_R_RegisterShaderNoMip( "gfx/hud/health" ); + cgs.media.HUDHealthTic = trap_R_RegisterShaderNoMip( "gfx/hud/health_tic" ); + cgs.media.HUDArmorTic = trap_R_RegisterShaderNoMip( "gfx/hud/armor_tic" ); + + cgs.media.HUDLeftStatic = cgs.media.HUDLeftFrame;//trap_R_RegisterShaderNoMip( "gfx/hud/static_test" ); + cgs.media.HUDLeft = cgs.media.HUDInnerLeft;//trap_R_RegisterShaderNoMip( "gfx/hud/hudleft" ); + + cgs.media.HUDSaberStyle1 = trap_R_RegisterShader( "gfx/hud/saber_stylesFast" ); + cgs.media.HUDSaberStyle2 = trap_R_RegisterShader( "gfx/hud/saber_stylesMed" ); + cgs.media.HUDSaberStyle3 = trap_R_RegisterShader( "gfx/hud/saber_stylesStrong" ); + + cgs.media.HUDRightFrame = trap_R_RegisterShaderNoMip("gfx/hud/hudrightframe"); + cgs.media.HUDInnerRight = trap_R_RegisterShaderNoMip( "gfx/hud/hudright_innerframe" ); + + // Load tics + for (i=0;ips.pm_flags & PMF_FOLLOW) + { + return; + } + +// BG_CycleForce(&cg.snap->ps, 1); + if (cg.forceSelect != -1) + { + cg.snap->ps.fd.forcePowerSelected = cg.forceSelect; + } + + BG_CycleForce(&cg.snap->ps, 1); + + if (cg.snap->ps.fd.forcePowersKnown & (1 << cg.snap->ps.fd.forcePowerSelected)) + { + cg.forceSelect = cg.snap->ps.fd.forcePowerSelected; + cg.forceSelectTime = cg.time; + } +} + +/* +=============== +CG_PrevForcePower_f +=============== +*/ +void CG_PrevForcePower_f( void ) +{ + if ( !cg.snap ) + { + return; + } + + if (cg.snap->ps.pm_flags & PMF_FOLLOW) + { + return; + } + +// BG_CycleForce(&cg.snap->ps, -1); + if (cg.forceSelect != -1) + { + cg.snap->ps.fd.forcePowerSelected = cg.forceSelect; + } + + BG_CycleForce(&cg.snap->ps, -1); + + if (cg.snap->ps.fd.forcePowersKnown & (1 << cg.snap->ps.fd.forcePowerSelected)) + { + cg.forceSelect = cg.snap->ps.fd.forcePowerSelected; + cg.forceSelectTime = cg.time; + } +} + +void CG_NextInventory_f(void) +{ + if ( !cg.snap ) + { + return; + } + + if (cg.snap->ps.pm_flags & PMF_FOLLOW) + { + return; + } + + if (cg.itemSelect != -1) + { + cg.snap->ps.stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE); + } + BG_CycleInven(&cg.snap->ps, 1); + + if (cg.snap->ps.stats[STAT_HOLDABLE_ITEM]) + { + cg.itemSelect = bg_itemlist[cg.snap->ps.stats[STAT_HOLDABLE_ITEM]].giTag; + cg.invenSelectTime = cg.time; + } +} + +void CG_PrevInventory_f(void) +{ + if ( !cg.snap ) + { + return; + } + + if (cg.snap->ps.pm_flags & PMF_FOLLOW) + { + return; + } + + if (cg.itemSelect != -1) + { + cg.snap->ps.stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE); + } + BG_CycleInven(&cg.snap->ps, -1); + + if (cg.snap->ps.stats[STAT_HOLDABLE_ITEM]) + { + cg.itemSelect = bg_itemlist[cg.snap->ps.stats[STAT_HOLDABLE_ITEM]].giTag; + cg.invenSelectTime = cg.time; + } +} diff --git a/code/cgame/cg_main.c b/code/cgame/cg_main.c new file mode 100644 index 0000000..4443092 --- /dev/null +++ b/code/cgame/cg_main.c @@ -0,0 +1,2735 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_main.c -- initialization and primary entry point for cgame +#include "cg_local.h" + +#include "../ui/ui_shared.h" +// display context for new ui stuff +displayContextDef_t cgDC; + +#if !defined(CL_LIGHT_H_INC) + #include "cg_lights.h" +#endif + +/* +Ghoul2 Insert Start +*/ +void CG_InitItems(void); +/* +Ghoul2 Insert End +*/ + +vec4_t colorTable[CT_MAX] = +{ +{0, 0, 0, 0}, // CT_NONE +{0, 0, 0, 1}, // CT_BLACK +{1, 0, 0, 1}, // CT_RED +{0, 1, 0, 1}, // CT_GREEN +{0, 0, 1, 1}, // CT_BLUE +{1, 1, 0, 1}, // CT_YELLOW +{1, 0, 1, 1}, // CT_MAGENTA +{0, 1, 1, 1}, // CT_CYAN +{1, 1, 1, 1}, // CT_WHITE +{0.75f, 0.75f, 0.75f, 1}, // CT_LTGREY +{0.50f, 0.50f, 0.50f, 1}, // CT_MDGREY +{0.25f, 0.25f, 0.25f, 1}, // CT_DKGREY +{0.15f, 0.15f, 0.15f, 1}, // CT_DKGREY2 + +{0.810f, 0.530f, 0.0f, 1}, // CT_VLTORANGE -- needs values +{0.810f, 0.530f, 0.0f, 1}, // CT_LTORANGE +{0.610f, 0.330f, 0.0f, 1}, // CT_DKORANGE +{0.402f, 0.265f, 0.0f, 1}, // CT_VDKORANGE + +{0.503f, 0.375f, 0.996f, 1}, // CT_VLTBLUE1 +{0.367f, 0.261f, 0.722f, 1}, // CT_LTBLUE1 +{0.199f, 0.0f, 0.398f, 1}, // CT_DKBLUE1 +{0.160f, 0.117f, 0.324f, 1}, // CT_VDKBLUE1 + +{0.300f, 0.628f, 0.816f, 1}, // CT_VLTBLUE2 -- needs values +{0.300f, 0.628f, 0.816f, 1}, // CT_LTBLUE2 +{0.191f, 0.289f, 0.457f, 1}, // CT_DKBLUE2 +{0.125f, 0.250f, 0.324f, 1}, // CT_VDKBLUE2 + +{0.796f, 0.398f, 0.199f, 1}, // CT_VLTBROWN1 -- needs values +{0.796f, 0.398f, 0.199f, 1}, // CT_LTBROWN1 +{0.558f, 0.207f, 0.027f, 1}, // CT_DKBROWN1 +{0.328f, 0.125f, 0.035f, 1}, // CT_VDKBROWN1 + +{0.996f, 0.796f, 0.398f, 1}, // CT_VLTGOLD1 -- needs values +{0.996f, 0.796f, 0.398f, 1}, // CT_LTGOLD1 +{0.605f, 0.441f, 0.113f, 1}, // CT_DKGOLD1 +{0.386f, 0.308f, 0.148f, 1}, // CT_VDKGOLD1 + +{0.648f, 0.562f, 0.784f, 1}, // CT_VLTPURPLE1 -- needs values +{0.648f, 0.562f, 0.784f, 1}, // CT_LTPURPLE1 +{0.437f, 0.335f, 0.597f, 1}, // CT_DKPURPLE1 +{0.308f, 0.269f, 0.375f, 1}, // CT_VDKPURPLE1 + +{0.816f, 0.531f, 0.710f, 1}, // CT_VLTPURPLE2 -- needs values +{0.816f, 0.531f, 0.710f, 1}, // CT_LTPURPLE2 +{0.566f, 0.269f, 0.457f, 1}, // CT_DKPURPLE2 +{0.343f, 0.226f, 0.316f, 1}, // CT_VDKPURPLE2 + +{0.929f, 0.597f, 0.929f, 1}, // CT_VLTPURPLE3 +{0.570f, 0.371f, 0.570f, 1}, // CT_LTPURPLE3 +{0.355f, 0.199f, 0.355f, 1}, // CT_DKPURPLE3 +{0.285f, 0.136f, 0.230f, 1}, // CT_VDKPURPLE3 + +{0.953f, 0.378f, 0.250f, 1}, // CT_VLTRED1 +{0.953f, 0.378f, 0.250f, 1}, // CT_LTRED1 +{0.593f, 0.121f, 0.109f, 1}, // CT_DKRED1 +{0.429f, 0.171f, 0.113f, 1}, // CT_VDKRED1 +{.25f, 0, 0, 1}, // CT_VDKRED +{.70f, 0, 0, 1}, // CT_DKRED + +{0.717f, 0.902f, 1.0f, 1}, // CT_VLTAQUA +{0.574f, 0.722f, 0.804f, 1}, // CT_LTAQUA +{0.287f, 0.361f, 0.402f, 1}, // CT_DKAQUA +{0.143f, 0.180f, 0.201f, 1}, // CT_VDKAQUA + +{0.871f, 0.386f, 0.375f, 1}, // CT_LTPINK +{0.435f, 0.193f, 0.187f, 1}, // CT_DKPINK +{ 0, .5f, .5f, 1}, // CT_LTCYAN +{ 0, .25f, .25f, 1}, // CT_DKCYAN +{ .179f, .51f, .92f, 1}, // CT_LTBLUE3 +{ .199f, .71f, .92f, 1}, // CT_LTBLUE3 +{ .5f, .05f, .4f, 1}, // CT_DKBLUE3 + +{ 0.0f, .613f, .097f, 1}, // CT_HUD_GREEN +{ 0.835f, .015f, .015f, 1}, // CT_HUD_RED +{ .567f, .685f, 1.0f, .75f}, // CT_ICON_BLUE +{ .515f, .406f, .507f, 1}, // CT_NO_AMMO_RED +{ 1.0f, .658f, .062f, 1}, // CT_HUD_ORANGE + +}; + +char *HolocronIcons[] = { + "gfx/mp/f_icon_lt_heal", //FP_HEAL, + "gfx/mp/f_icon_levitation", //FP_LEVITATION, + "gfx/mp/f_icon_speed", //FP_SPEED, + "gfx/mp/f_icon_push", //FP_PUSH, + "gfx/mp/f_icon_pull", //FP_PULL, + "gfx/mp/f_icon_lt_telepathy", //FP_TELEPATHY, + "gfx/mp/f_icon_dk_grip", //FP_GRIP, + "gfx/mp/f_icon_dk_l1", //FP_LIGHTNING, + "gfx/mp/f_icon_dk_rage", //FP_RAGE, + "gfx/mp/f_icon_lt_protect", //FP_PROTECT, + "gfx/mp/f_icon_lt_absorb", //FP_ABSORB, + "gfx/mp/f_icon_lt_healother", //FP_TEAM_HEAL, + "gfx/mp/f_icon_dk_forceother", //FP_TEAM_FORCE, + "gfx/mp/f_icon_dk_drain", //FP_DRAIN, + "gfx/mp/f_icon_sight", //FP_SEE, + "gfx/mp/f_icon_saber_attack", //FP_SABERATTACK, + "gfx/mp/f_icon_saber_defend", //FP_SABERDEFEND, + "gfx/mp/f_icon_saber_throw" //FP_SABERTHROW +}; + +int forceModelModificationCount = -1; + +void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ); +void CG_Shutdown( void ); + +void CG_CalcEntityLerpPositions( centity_t *cent ); +void CG_ROFF_NotetrackCallback( centity_t *cent, const char *notetrack); + +static int C_PointContents(void); +static void C_GetLerpOrigin(void); +static void C_GetLerpAngles(void); +static void C_GetModelScale(void); +static void C_Trace(void); +static void C_GetBoltPos(void); +static void C_ImpactMark(void); + +/* +================ +vmMain + +This is the only way control passes into the module. +This must be the very first function compiled into the .q3vm file +================ +*/ +int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11 ) { + + switch ( command ) { + case CG_INIT: + CG_Init( arg0, arg1, arg2 ); + return 0; + case CG_SHUTDOWN: + CG_Shutdown(); + return 0; + case CG_CONSOLE_COMMAND: + return CG_ConsoleCommand(); + case CG_DRAW_ACTIVE_FRAME: + CG_DrawActiveFrame( arg0, arg1, arg2 ); + return 0; + case CG_CROSSHAIR_PLAYER: + return CG_CrosshairPlayer(); + case CG_LAST_ATTACKER: + return CG_LastAttacker(); + case CG_KEY_EVENT: + CG_KeyEvent(arg0, arg1); + return 0; + case CG_MOUSE_EVENT: + cgDC.cursorx = cgs.cursorX; + cgDC.cursory = cgs.cursorY; + CG_MouseEvent(arg0, arg1); + return 0; + case CG_EVENT_HANDLING: + CG_EventHandling(arg0); + return 0; + + case CG_POINT_CONTENTS: + return C_PointContents(); + + case CG_GET_LERP_ORIGIN: + C_GetLerpOrigin(); + return 0; + + case CG_GET_LERP_ANGLES: + C_GetLerpAngles(); + return 0; + + case CG_GET_MODEL_SCALE: + C_GetModelScale(); + return 0; + + case CG_GET_GHOUL2: + return (int)cg_entities[arg0].ghoul2; //NOTE: This is used by the effect bolting which is actually not used at all. + //I'm fairly sure if you try to use it with vm's it will just give you total + //garbage. In other words, use at your own risk. + + case CG_GET_MODEL_LIST: + return (int)cgs.gameModels; + + case CG_CALC_LERP_POSITIONS: + CG_CalcEntityLerpPositions( &cg_entities[arg0] ); + return 0; + + case CG_TRACE: + C_Trace(); + return 0; + + case CG_GET_ORIGIN: + VectorCopy(cg_entities[arg0].currentState.pos.trBase, (float *)arg1); + return 0; + + case CG_GET_ANGLES: + VectorCopy(cg_entities[arg0].currentState.apos.trBase, (float *)arg1); + return 0; + + case CG_GET_BOLT_POS: + C_GetBoltPos(); + return 0; + + case CG_GET_ORIGIN_TRAJECTORY: + return (int)&cg_entities[arg0].nextState.pos; + + case CG_GET_ANGLE_TRAJECTORY: + return (int)&cg_entities[arg0].nextState.apos; + + case CG_ROFF_NOTETRACK_CALLBACK: + CG_ROFF_NotetrackCallback( &cg_entities[arg0], (const char *)arg1 ); + return 0; + + case CG_IMPACT_MARK: + C_ImpactMark(); + return 0; + + case CG_MAP_CHANGE: + // this trap map be called more than once for a given map change, as the + // server is going to attempt to send out multiple broadcasts in hopes that + // the client will receive one of them + cg.mMapChange = qtrue; + return 0; + + default: + CG_Error( "vmMain: unknown command %i", command ); + break; + } + return -1; +} + +static int C_PointContents(void) +{ + TCGPointContents *data = (TCGPointContents *)cg.sharedBuffer; + + return CG_PointContents( data->mPoint, data->mPassEntityNum ); +} + +static void C_GetLerpOrigin(void) +{ + TCGVectorData *data = (TCGVectorData *)cg.sharedBuffer; + + VectorCopy(cg_entities[data->mEntityNum].lerpOrigin, data->mPoint); +} + +static void C_GetLerpAngles(void) +{ + TCGVectorData *data = (TCGVectorData *)cg.sharedBuffer; + + VectorCopy(cg_entities[data->mEntityNum].lerpAngles, data->mPoint); +} + +static void C_GetModelScale(void) +{ + TCGVectorData *data = (TCGVectorData *)cg.sharedBuffer; + + VectorCopy(cg_entities[data->mEntityNum].modelScale, data->mPoint); +} + +static void C_Trace(void) +{ + TCGTrace *td = (TCGTrace *)cg.sharedBuffer; + + CG_Trace(&td->mResult, td->mStart, td->mMins, td->mMaxs, td->mEnd, td->mSkipNumber, td->mMask); +} + +static void C_GetBoltPos(void) +{ + TCGBoltPos *data = (TCGBoltPos *)cg.sharedBuffer; + + if (!cg_entities[data->mEntityNum].ghoul2) + { + VectorClear(data->mPoint); + VectorClear(data->mAngle); + return; + } + + VectorCopy(cg_entities[data->mEntityNum].lerpOrigin, data->mPoint); + if (data->mEntityNum < MAX_CLIENTS) + { + VectorCopy(cg_entities[data->mEntityNum].turAngles, data->mAngle); + } + else + { + VectorCopy(cg_entities[data->mEntityNum].lerpAngles, data->mAngle); + } +} + +static void C_ImpactMark(void) +{ + TCGImpactMark *data = (TCGImpactMark *)cg.sharedBuffer; + + /* + CG_ImpactMark((int)arg0, (const float *)arg1, (const float *)arg2, (float)arg3, + (float)arg4, (float)arg5, (float)arg6, (float)arg7, qtrue, (float)arg8, qfalse); + */ + CG_ImpactMark(data->mHandle, data->mPoint, data->mAngle, data->mRotation, + data->mRed, data->mGreen, data->mBlue, data->mAlphaStart, qtrue, data->mSizeStart, qfalse); +} + +/* +Ghoul2 Insert Start +*/ +/* +void CG_ResizeG2Bolt(boltInfo_v *bolt, int newCount) +{ + bolt->resize(newCount); +} + +void CG_ResizeG2Surface(surfaceInfo_v *surface, int newCount) +{ + surface->resize(newCount); +} + +void CG_ResizeG2Bone(boneInfo_v *bone, int newCount) +{ + bone->resize(newCount); +} + +void CG_ResizeG2(CGhoul2Info_v *ghoul2, int newCount) +{ + ghoul2->resize(newCount); +} + +void CG_ResizeG2TempBone(mdxaBone_v *tempBone, int newCount) +{ + tempBone->resize(newCount); +} +*/ +/* +Ghoul2 Insert End +*/ +cg_t cg; +cgs_t cgs; +centity_t cg_entities[MAX_GENTITIES]; +weaponInfo_t cg_weapons[MAX_WEAPONS]; +itemInfo_t cg_items[MAX_ITEMS]; + + +vmCvar_t cg_centertime; +vmCvar_t cg_runpitch; +vmCvar_t cg_runroll; +vmCvar_t cg_bobup; +vmCvar_t cg_bobpitch; +vmCvar_t cg_bobroll; +//vmCvar_t cg_swingSpeed; +vmCvar_t cg_shadows; +vmCvar_t cg_drawTimer; +vmCvar_t cg_drawFPS; +vmCvar_t cg_drawSnapshot; +vmCvar_t cg_draw3dIcons; +vmCvar_t cg_drawIcons; +vmCvar_t cg_drawAmmoWarning; +vmCvar_t cg_drawCrosshair; +vmCvar_t cg_drawCrosshairNames; +vmCvar_t cg_dynamicCrosshair; +vmCvar_t cg_drawRewards; +vmCvar_t cg_drawScores; +vmCvar_t cg_crosshairSize; +vmCvar_t cg_crosshairX; +vmCvar_t cg_crosshairY; +vmCvar_t cg_crosshairHealth; +vmCvar_t cg_draw2D; +vmCvar_t cg_drawStatus; +vmCvar_t cg_animSpeed; +vmCvar_t cg_debugAnim; +vmCvar_t cg_debugSaber; +vmCvar_t cg_debugPosition; +vmCvar_t cg_debugEvents; +vmCvar_t cg_errorDecay; +vmCvar_t cg_nopredict; +vmCvar_t cg_noPlayerAnims; +vmCvar_t cg_showmiss; +vmCvar_t cg_footsteps; +vmCvar_t cg_addMarks; +vmCvar_t cg_viewsize; +vmCvar_t cg_drawGun; +vmCvar_t cg_gun_frame; +vmCvar_t cg_gun_x; +vmCvar_t cg_gun_y; +vmCvar_t cg_gun_z; +vmCvar_t cg_tracerChance; +vmCvar_t cg_tracerWidth; +vmCvar_t cg_tracerLength; +vmCvar_t cg_autoswitch; +vmCvar_t cg_ignore; +vmCvar_t cg_simpleItems; +vmCvar_t cg_fov; +vmCvar_t cg_zoomFov; + +vmCvar_t cg_swingAngles; + +vmCvar_t cg_oldPainSounds; + +#ifdef G2_COLLISION_ENABLED +vmCvar_t cg_saberModelTraceEffect; +#endif + +vmCvar_t cg_fpls; + +vmCvar_t cg_saberDynamicMarks; +vmCvar_t cg_saberDynamicMarkTime; + +vmCvar_t cg_saberContact; +vmCvar_t cg_saberTrail; + +vmCvar_t cg_duelHeadAngles; + +vmCvar_t cg_speedTrail; +vmCvar_t cg_auraShell; + +vmCvar_t cg_animBlend; + +vmCvar_t cg_dismember; + +vmCvar_t cg_thirdPerson; +vmCvar_t cg_thirdPersonRange; +vmCvar_t cg_thirdPersonAngle; +vmCvar_t cg_thirdPersonPitchOffset; +vmCvar_t cg_thirdPersonVertOffset; +vmCvar_t cg_thirdPersonCameraDamp; +vmCvar_t cg_thirdPersonTargetDamp; + +vmCvar_t cg_thirdPersonAlpha; +vmCvar_t cg_thirdPersonHorzOffset; + +vmCvar_t cg_stereoSeparation; +vmCvar_t cg_lagometer; +vmCvar_t cg_drawEnemyInfo; +vmCvar_t cg_synchronousClients; +vmCvar_t cg_teamChatTime; +vmCvar_t cg_teamChatHeight; +vmCvar_t cg_stats; +vmCvar_t cg_buildScript; +vmCvar_t cg_forceModel; +vmCvar_t cg_paused; +vmCvar_t cg_blood; +vmCvar_t cg_predictItems; +vmCvar_t cg_deferPlayers; +vmCvar_t cg_drawTeamOverlay; +vmCvar_t cg_teamOverlayUserinfo; +vmCvar_t cg_drawFriend; +vmCvar_t cg_teamChatsOnly; +vmCvar_t cg_noVoiceChats; +vmCvar_t cg_noVoiceText; +vmCvar_t cg_hudFiles; +vmCvar_t cg_scorePlum; +vmCvar_t cg_smoothClients; +vmCvar_t pmove_fixed; +//vmCvar_t cg_pmove_fixed; +vmCvar_t pmove_msec; +vmCvar_t cg_pmove_msec; +vmCvar_t cg_cameraMode; +vmCvar_t cg_cameraOrbit; +vmCvar_t cg_cameraOrbitDelay; +vmCvar_t cg_timescaleFadeEnd; +vmCvar_t cg_timescaleFadeSpeed; +vmCvar_t cg_timescale; +vmCvar_t cg_smallFont; +vmCvar_t cg_bigFont; +vmCvar_t cg_noTaunt; +vmCvar_t cg_noProjectileTrail; +vmCvar_t cg_trueLightning; +/* +Ghoul2 Insert Start +*/ +vmCvar_t cg_debugBB; +/* +Ghoul2 Insert End +*/ +vmCvar_t cg_redTeamName; +vmCvar_t cg_blueTeamName; +vmCvar_t cg_currentSelectedPlayer; +vmCvar_t cg_currentSelectedPlayerName; +vmCvar_t cg_singlePlayer; +vmCvar_t cg_enableDust; +vmCvar_t cg_enableBreath; +vmCvar_t cg_singlePlayerActive; +vmCvar_t cg_recordSPDemo; +vmCvar_t cg_recordSPDemoName; + +vmCvar_t ui_myteam; + +typedef struct { + vmCvar_t *vmCvar; + char *cvarName; + char *defaultString; + int cvarFlags; +} cvarTable_t; + +static cvarTable_t cvarTable[] = { // bk001129 + { &cg_ignore, "cg_ignore", "0", 0 }, // used for debugging + { &cg_autoswitch, "cg_autoswitch", "1", CVAR_ARCHIVE }, + { &cg_drawGun, "cg_drawGun", "1", CVAR_ARCHIVE }, + { &cg_zoomFov, "cg_zoomfov", "40.0", CVAR_ARCHIVE }, + { &cg_fov, "cg_fov", "80", CVAR_ARCHIVE }, + { &cg_viewsize, "cg_viewsize", "100", CVAR_ARCHIVE }, + { &cg_stereoSeparation, "cg_stereoSeparation", "0.4", CVAR_ARCHIVE }, + { &cg_shadows, "cg_shadows", "1", CVAR_ARCHIVE }, + { &cg_draw2D, "cg_draw2D", "1", CVAR_ARCHIVE }, + { &cg_drawStatus, "cg_drawStatus", "1", CVAR_ARCHIVE }, + { &cg_drawTimer, "cg_drawTimer", "0", CVAR_ARCHIVE }, + { &cg_drawFPS, "cg_drawFPS", "0", CVAR_ARCHIVE }, + { &cg_drawSnapshot, "cg_drawSnapshot", "0", CVAR_ARCHIVE }, + { &cg_draw3dIcons, "cg_draw3dIcons", "1", CVAR_ARCHIVE }, + { &cg_drawIcons, "cg_drawIcons", "1", CVAR_ARCHIVE }, + { &cg_drawAmmoWarning, "cg_drawAmmoWarning", "0", CVAR_ARCHIVE }, + { &cg_drawEnemyInfo, "cg_drawEnemyInfo", "1", CVAR_ARCHIVE }, + { &cg_drawCrosshair, "cg_drawCrosshair", "1", CVAR_ARCHIVE }, + { &cg_drawCrosshairNames, "cg_drawCrosshairNames", "1", CVAR_ARCHIVE }, + { &cg_drawScores, "cg_drawScores", "1", CVAR_ARCHIVE }, + { &cg_dynamicCrosshair, "cg_dynamicCrosshair", "1", CVAR_ARCHIVE }, + { &cg_drawRewards, "cg_drawRewards", "1", CVAR_ARCHIVE }, + { &cg_crosshairSize, "cg_crosshairSize", "24", CVAR_ARCHIVE }, + { &cg_crosshairHealth, "cg_crosshairHealth", "0", CVAR_ARCHIVE }, + { &cg_crosshairX, "cg_crosshairX", "0", CVAR_ARCHIVE }, + { &cg_crosshairY, "cg_crosshairY", "0", CVAR_ARCHIVE }, + { &cg_simpleItems, "cg_simpleItems", "0", CVAR_ARCHIVE }, + { &cg_addMarks, "cg_marks", "1", CVAR_ARCHIVE }, + { &cg_lagometer, "cg_lagometer", "0", CVAR_ARCHIVE }, + { &cg_gun_x, "cg_gunX", "0", CVAR_CHEAT }, + { &cg_gun_y, "cg_gunY", "0", CVAR_CHEAT }, + { &cg_gun_z, "cg_gunZ", "0", CVAR_CHEAT }, + { &cg_centertime, "cg_centertime", "3", CVAR_CHEAT }, + { &cg_runpitch, "cg_runpitch", "0.002", CVAR_ARCHIVE}, + { &cg_runroll, "cg_runroll", "0.005", CVAR_ARCHIVE }, + { &cg_bobup , "cg_bobup", "0.005", CVAR_ARCHIVE }, + { &cg_bobpitch, "cg_bobpitch", "0.002", CVAR_ARCHIVE }, + { &cg_bobroll, "cg_bobroll", "0.002", CVAR_ARCHIVE }, + //{ &cg_swingSpeed, "cg_swingSpeed", "0.3", CVAR_CHEAT }, + { &cg_animSpeed, "cg_animspeed", "1", CVAR_CHEAT }, + { &cg_debugAnim, "cg_debuganim", "0", CVAR_CHEAT }, + { &cg_debugSaber, "cg_debugsaber", "0", CVAR_CHEAT }, + { &cg_debugPosition, "cg_debugposition", "0", CVAR_CHEAT }, + { &cg_debugEvents, "cg_debugevents", "0", CVAR_CHEAT }, + { &cg_errorDecay, "cg_errordecay", "100", 0 }, + { &cg_nopredict, "cg_nopredict", "0", 0 }, + { &cg_noPlayerAnims, "cg_noplayeranims", "0", CVAR_CHEAT }, + { &cg_showmiss, "cg_showmiss", "0", 0 }, + { &cg_footsteps, "cg_footsteps", "1", CVAR_CHEAT }, + { &cg_tracerChance, "cg_tracerchance", "0.4", CVAR_CHEAT }, + { &cg_tracerWidth, "cg_tracerwidth", "1", CVAR_CHEAT }, + { &cg_tracerLength, "cg_tracerlength", "100", CVAR_CHEAT }, + + { &cg_swingAngles, "cg_swingAngles", "1", 0 }, + + { &cg_oldPainSounds, "cg_oldPainSounds", "0", 0 }, + +#ifdef G2_COLLISION_ENABLED + { &cg_saberModelTraceEffect, "cg_saberModelTraceEffect", "0", 0 }, +#endif + + { &cg_fpls, "cg_fpls", "0", 0 }, + + { &cg_saberDynamicMarks, "cg_saberDynamicMarks", "0", 0 }, + { &cg_saberDynamicMarkTime, "cg_saberDynamicMarkTime", "60000", 0 }, + + { &cg_saberContact, "cg_saberContact", "1", 0 }, + { &cg_saberTrail, "cg_saberTrail", "1", 0 }, + + { &cg_duelHeadAngles, "cg_duelHeadAngles", "0", 0 }, + + { &cg_speedTrail, "cg_speedTrail", "1", 0 }, + { &cg_auraShell, "cg_auraShell", "1", 0 }, + + { &cg_animBlend, "cg_animBlend", "1", 0 }, + + { &cg_dismember, "cg_dismember", "0", CVAR_ARCHIVE }, + + { &cg_thirdPerson, "cg_thirdPerson", "0", 0 }, + { &cg_thirdPersonRange, "cg_thirdPersonRange", "80", CVAR_CHEAT }, + { &cg_thirdPersonAngle, "cg_thirdPersonAngle", "0", CVAR_CHEAT }, + { &cg_thirdPersonPitchOffset, "cg_thirdPersonPitchOffset", "0", CVAR_CHEAT }, + { &cg_thirdPersonVertOffset, "cg_thirdPersonVertOffset", "16", CVAR_CHEAT }, + { &cg_thirdPersonCameraDamp, "cg_thirdPersonCameraDamp", "0.3", 0 }, + { &cg_thirdPersonTargetDamp, "cg_thirdPersonTargetDamp", "0.5", CVAR_CHEAT }, + + { &cg_thirdPersonHorzOffset, "cg_thirdPersonHorzOffset", "0", CVAR_CHEAT }, + { &cg_thirdPersonAlpha, "cg_thirdPersonAlpha", "1.0", CVAR_CHEAT }, + + { &cg_teamChatTime, "cg_teamChatTime", "3000", CVAR_ARCHIVE }, + { &cg_teamChatHeight, "cg_teamChatHeight", "0", CVAR_ARCHIVE }, + { &cg_forceModel, "cg_forceModel", "0", CVAR_ARCHIVE }, + { &cg_predictItems, "cg_predictItems", "1", CVAR_ARCHIVE }, + { &cg_deferPlayers, "cg_deferPlayers", "1", CVAR_ARCHIVE }, + { &cg_drawTeamOverlay, "cg_drawTeamOverlay", "0", CVAR_ARCHIVE }, + { &cg_teamOverlayUserinfo, "teamoverlay", "0", CVAR_ROM | CVAR_USERINFO }, + { &cg_stats, "cg_stats", "0", 0 }, + { &cg_drawFriend, "cg_drawFriend", "1", CVAR_ARCHIVE }, + { &cg_teamChatsOnly, "cg_teamChatsOnly", "0", CVAR_ARCHIVE }, + { &cg_noVoiceChats, "cg_noVoiceChats", "0", CVAR_ARCHIVE }, + { &cg_noVoiceText, "cg_noVoiceText", "0", CVAR_ARCHIVE }, + // the following variables are created in other parts of the system, + // but we also reference them here + { &cg_buildScript, "com_buildScript", "0", 0 }, // force loading of all possible data amd error on failures + { &cg_paused, "cl_paused", "0", CVAR_ROM }, + { &cg_blood, "com_blood", "1", CVAR_ARCHIVE }, + { &cg_synchronousClients, "g_synchronousClients", "0", 0 }, // communicated by systeminfo + + { &cg_redTeamName, "g_redteam", DEFAULT_REDTEAM_NAME, CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO }, + { &cg_blueTeamName, "g_blueteam", DEFAULT_BLUETEAM_NAME, CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO }, + { &cg_currentSelectedPlayer, "cg_currentSelectedPlayer", "0", CVAR_ARCHIVE}, + { &cg_currentSelectedPlayerName, "cg_currentSelectedPlayerName", "", CVAR_ARCHIVE}, + { &cg_singlePlayer, "ui_singlePlayerActive", "0", CVAR_USERINFO}, + { &cg_enableDust, "g_enableDust", "0", 0}, + { &cg_enableBreath, "g_enableBreath", "0", 0}, + { &cg_singlePlayerActive, "ui_singlePlayerActive", "0", CVAR_USERINFO}, + { &cg_recordSPDemo, "ui_recordSPDemo", "0", CVAR_ARCHIVE}, + { &cg_recordSPDemoName, "ui_recordSPDemoName", "", CVAR_ARCHIVE}, + + { &cg_cameraOrbit, "cg_cameraOrbit", "0", CVAR_CHEAT}, + { &cg_cameraOrbitDelay, "cg_cameraOrbitDelay", "50", CVAR_ARCHIVE}, + { &cg_timescaleFadeEnd, "cg_timescaleFadeEnd", "1", 0}, + { &cg_timescaleFadeSpeed, "cg_timescaleFadeSpeed", "0", 0}, + { &cg_timescale, "timescale", "1", 0}, + { &cg_scorePlum, "cg_scorePlums", "1", CVAR_USERINFO | CVAR_ARCHIVE}, + { &cg_hudFiles, "cg_hudFiles", "0", CVAR_USERINFO | CVAR_ARCHIVE}, + { &cg_smoothClients, "cg_smoothClients", "0", CVAR_USERINFO | CVAR_ARCHIVE}, + { &cg_cameraMode, "com_cameraMode", "0", CVAR_CHEAT}, + + { &pmove_fixed, "pmove_fixed", "0", 0}, + { &pmove_msec, "pmove_msec", "8", 0}, + { &cg_noTaunt, "cg_noTaunt", "0", CVAR_ARCHIVE}, + { &cg_noProjectileTrail, "cg_noProjectileTrail", "0", CVAR_ARCHIVE}, + { &cg_smallFont, "ui_smallFont", "0.25", CVAR_ARCHIVE}, + { &cg_bigFont, "ui_bigFont", "0.4", CVAR_ARCHIVE}, + { &cg_trueLightning, "cg_trueLightning", "0.0", CVAR_ARCHIVE}, + + { &ui_myteam, "ui_myteam", "0", CVAR_ROM|CVAR_INTERNAL}, + +// { &cg_pmove_fixed, "cg_pmove_fixed", "0", CVAR_USERINFO | CVAR_ARCHIVE } +/* +Ghoul2 Insert Start +*/ + { &cg_debugBB, "debugBB", "0", 0}, +/* +Ghoul2 Insert End +*/ +}; + +static int cvarTableSize = sizeof( cvarTable ) / sizeof( cvarTable[0] ); + +/* +================= +CG_RegisterCvars +================= +*/ +void CG_RegisterCvars( void ) { + int i; + cvarTable_t *cv; + char var[MAX_TOKEN_CHARS]; + + for ( i = 0, cv = cvarTable ; i < cvarTableSize ; i++, cv++ ) { + trap_Cvar_Register( cv->vmCvar, cv->cvarName, + cv->defaultString, cv->cvarFlags ); + } + + // see if we are also running the server on this machine + trap_Cvar_VariableStringBuffer( "sv_running", var, sizeof( var ) ); + cgs.localServer = atoi( var ); + + forceModelModificationCount = cg_forceModel.modificationCount; + + trap_Cvar_Register(NULL, "model", DEFAULT_MODEL, CVAR_USERINFO | CVAR_ARCHIVE ); + //trap_Cvar_Register(NULL, "headmodel", DEFAULT_MODEL, CVAR_USERINFO | CVAR_ARCHIVE ); + trap_Cvar_Register(NULL, "team_model", DEFAULT_TEAM_MODEL, CVAR_USERINFO | CVAR_ARCHIVE ); + //trap_Cvar_Register(NULL, "team_headmodel", DEFAULT_TEAM_HEAD, CVAR_USERINFO | CVAR_ARCHIVE ); + trap_Cvar_Register(NULL, "forcepowers", DEFAULT_FORCEPOWERS, CVAR_USERINFO | CVAR_ARCHIVE ); + + // Cvars uses for transferring data between client and server + trap_Cvar_Register(NULL, "ui_about_gametype", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_fraglimit", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_capturelimit", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_duellimit", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_timelimit", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_maxclients", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_dmflags", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_mapname", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_hostname", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_needpass", "0", CVAR_ROM|CVAR_INTERNAL ); + trap_Cvar_Register(NULL, "ui_about_botminplayers", "0", CVAR_ROM|CVAR_INTERNAL ); +} + +/* +=================== +CG_ForceModelChange +=================== +*/ +static void CG_ForceModelChange( void ) { + int i; + + for (i=0 ; ivmCvar ); + } + + // check for modications here + + // If team overlay is on, ask for updates from the server. If its off, + // let the server know so we don't receive it + if ( drawTeamOverlayModificationCount != cg_drawTeamOverlay.modificationCount ) { + drawTeamOverlayModificationCount = cg_drawTeamOverlay.modificationCount; + + if ( cg_drawTeamOverlay.integer > 0 ) { + trap_Cvar_Set( "teamoverlay", "1" ); + } else { + trap_Cvar_Set( "teamoverlay", "0" ); + } + // FIXME E3 HACK + trap_Cvar_Set( "teamoverlay", "1" ); + } + + // if force model changed + if ( forceModelModificationCount != cg_forceModel.modificationCount ) { + forceModelModificationCount = cg_forceModel.modificationCount; + CG_ForceModelChange(); + } +} + +int CG_CrosshairPlayer( void ) { + if ( cg.time > ( cg.crosshairClientTime + 1000 ) ) { + return -1; + } + + if (cg.crosshairClientNum >= MAX_CLIENTS) + { + return -1; + } + + return cg.crosshairClientNum; +} + +int CG_LastAttacker( void ) { + if ( !cg.attackerTime ) { + return -1; + } + return cg.snap->ps.persistant[PERS_ATTACKER]; +} + +void QDECL CG_Printf( const char *msg, ... ) { + va_list argptr; + char text[1024]; + + va_start (argptr, msg); + vsprintf (text, msg, argptr); + va_end (argptr); + + trap_Print( text ); +} + +void QDECL CG_Error( const char *msg, ... ) { + va_list argptr; + char text[1024]; + + va_start (argptr, msg); + vsprintf (text, msg, argptr); + va_end (argptr); + + trap_Error( text ); +} + +#ifndef CGAME_HARD_LINKED +// this is only here so the functions in q_shared.c and bg_*.c can link (FIXME) + +void QDECL Com_Error( int level, const char *error, ... ) { + va_list argptr; + char text[1024]; + + va_start (argptr, error); + vsprintf (text, error, argptr); + va_end (argptr); + + CG_Error( "%s", text); +} + +void QDECL Com_Printf( const char *msg, ... ) { + va_list argptr; + char text[1024]; + + va_start (argptr, msg); + vsprintf (text, msg, argptr); + va_end (argptr); + + CG_Printf ("%s", text); +} + +#endif + +/* +================ +CG_Argv +================ +*/ +const char *CG_Argv( int arg ) { + static char buffer[MAX_STRING_CHARS]; + + trap_Argv( arg, buffer, sizeof( buffer ) ); + + return buffer; +} + + +//======================================================================== + +/* +================= +CG_RegisterItemSounds + +The server says this item is used on this level +================= +*/ +static void CG_RegisterItemSounds( int itemNum ) { + gitem_t *item; + char data[MAX_QPATH]; + char *s, *start; + int len; + + item = &bg_itemlist[ itemNum ]; + + if( item->pickup_sound ) { + trap_S_RegisterSound( item->pickup_sound ); + } + + // parse the space seperated precache string for other media + s = item->sounds; + if (!s || !s[0]) + return; + + while (*s) { + start = s; + while (*s && *s != ' ') { + s++; + } + + len = s-start; + if (len >= MAX_QPATH || len < 5) { + CG_Error( "PrecacheItem: %s has bad precache string", + item->classname); + return; + } + memcpy (data, start, len); + data[len] = 0; + if ( *s ) { + s++; + } + + if ( !strcmp(data+len-3, "wav" )) { + trap_S_RegisterSound( data ); + } + } +} + + +/* +================= +CG_RegisterSounds + +called during a precache command +================= +*/ +static void CG_RegisterSounds( void ) { + int i; + char items[MAX_ITEMS+1]; + char name[MAX_QPATH]; + const char *soundName; + + // voice commands + // rww - no "voice commands" I guess. + //CG_LoadVoiceChats(); + + cgs.media.oneMinuteSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM004" ); + cgs.media.fiveMinuteSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM005" ); + cgs.media.oneFragSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM001" ); + cgs.media.twoFragSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM002" ); + cgs.media.threeFragSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM003"); + cgs.media.count3Sound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM035" ); + cgs.media.count2Sound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM036" ); + cgs.media.count1Sound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM037" ); + cgs.media.countFightSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM038" ); + + cgs.media.redSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/red_glow" ); + cgs.media.redSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/red_line" ); + cgs.media.orangeSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/orange_glow" ); + cgs.media.orangeSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/orange_line" ); + cgs.media.yellowSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/yellow_glow" ); + cgs.media.yellowSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/yellow_line" ); + cgs.media.greenSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/green_glow" ); + cgs.media.greenSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/green_line" ); + cgs.media.blueSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/blue_glow" ); + cgs.media.blueSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/blue_line" ); + cgs.media.purpleSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/purple_glow" ); + cgs.media.purpleSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/purple_line" ); + cgs.media.saberBlurShader = trap_R_RegisterShader( "gfx/effects/sabers/saberBlur" ); + + cgs.media.yellowDroppedSaberShader = trap_R_RegisterShader("gfx/effects/yellow_glow"); + + cgs.media.rivetMarkShader = trap_R_RegisterShader( "gfx/damage/rivetmark" ); + + trap_R_RegisterShader( "gfx/effects/saberFlare" ); + + trap_R_RegisterShader( "powerups/ysalimarishell" ); + trap_R_RegisterShader("gfx/effects/saberDamageGlow" ); + + trap_R_RegisterShader( "gfx/effects/forcePush" ); + + trap_R_RegisterShader( "gfx/misc/red_dmgshield" ); + trap_R_RegisterShader( "gfx/misc/red_portashield" ); + trap_R_RegisterShader( "gfx/misc/blue_dmgshield" ); + trap_R_RegisterShader( "gfx/misc/blue_portashield" ); + + trap_R_RegisterShader( "models/map_objects/imp_mine/turret_chair_dmg.tga" ); + + for (i=1 ; i<9 ; i++) + { + trap_S_RegisterSound(va("sound/weapons/saber/saberhup%i.wav", i)); + } + + for (i=1 ; i<10 ; i++) + { + trap_S_RegisterSound(va("sound/weapons/saber/saberblock%i.wav", i)); + } + + for (i=1 ; i<4 ; i++) + { + trap_S_RegisterSound(va("sound/weapons/saber/bounce%i.wav", i)); + } + + trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ); + trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" ); + trap_S_RegisterSound( "sound/weapons/saber/saberoffquick.wav" ); + trap_S_RegisterSound( "sound/weapons/saber/saberhitwall1" ); + trap_S_RegisterSound( "sound/weapons/saber/saberhitwall2" ); + trap_S_RegisterSound( "sound/weapons/saber/saberhitwall3" ); + trap_S_RegisterSound("sound/weapons/saber/saberhit.wav"); + + cgs.media.teamHealSound = trap_S_RegisterSound("sound/weapons/force/teamheal.wav"); + cgs.media.teamRegenSound = trap_S_RegisterSound("sound/weapons/force/teamforce.wav"); + + trap_S_RegisterSound("sound/weapons/force/heal.wav"); + trap_S_RegisterSound("sound/weapons/force/speed.wav"); + trap_S_RegisterSound("sound/weapons/force/see.wav"); + trap_S_RegisterSound("sound/weapons/force/rage.wav"); + trap_S_RegisterSound("sound/weapons/force/lightning.wav"); + trap_S_RegisterSound("sound/weapons/force/lightninghit.wav"); + trap_S_RegisterSound("sound/weapons/force/drain.wav"); + trap_S_RegisterSound("sound/weapons/force/jumpbuild.wav"); + trap_S_RegisterSound("sound/weapons/force/distract.wav"); + trap_S_RegisterSound("sound/weapons/force/distractstop.wav"); + trap_S_RegisterSound("sound/weapons/force/pull.wav"); + trap_S_RegisterSound("sound/weapons/force/push.wav"); + + if (cg_buildScript.integer) + { + trap_S_RegisterSound("sound/chars/atst/ATSTcrash.wav"); + trap_S_RegisterSound("sound/chars/atst/ATSTstart.wav"); + trap_S_RegisterSound("sound/chars/atst/ATSTstep1.wav"); + trap_S_RegisterSound("sound/chars/atst/ATSTstep2.wav"); + + trap_S_RegisterSound("sound/weapons/atst/ATSTfire1.wav"); + trap_S_RegisterSound("sound/weapons/atst/ATSTfire2.wav"); + trap_S_RegisterSound("sound/weapons/atst/ATSTfire3.wav"); + trap_S_RegisterSound("sound/weapons/atst/ATSTfire4.wav"); + } + + for (i=1 ; i<3 ; i++) + { + trap_S_RegisterSound(va("sound/weapons/thermal/bounce%i.wav", i)); + } + + trap_S_RegisterSound("sound/movers/switches/switch2.wav"); + trap_S_RegisterSound("sound/movers/switches/switch3.wav"); + trap_S_RegisterSound("sound/ambience/spark5.wav"); + trap_S_RegisterSound("sound/chars/turret/ping.wav"); + trap_S_RegisterSound("sound/chars/turret/startup.wav"); + trap_S_RegisterSound("sound/chars/turret/shutdown.wav"); + trap_S_RegisterSound("sound/chars/turret/move.wav"); + trap_S_RegisterSound("sound/player/pickuphealth.wav"); + trap_S_RegisterSound("sound/player/pickupshield.wav"); + + trap_S_RegisterSound("sound/effects/glassbreak1.wav"); + + trap_S_RegisterSound( "sound/weapons/rocket/tick.wav" ); + trap_S_RegisterSound( "sound/weapons/rocket/lock.wav" ); + + trap_S_RegisterSound("sound/weapons/force/speedloop.wav"); + + trap_S_RegisterSound("sound/weapons/force/protecthit.mp3"); //PDSOUND_PROTECTHIT + trap_S_RegisterSound("sound/weapons/force/protect.mp3"); //PDSOUND_PROTECT + trap_S_RegisterSound("sound/weapons/force/absorbhit.mp3"); //PDSOUND_ABSORBHIT + trap_S_RegisterSound("sound/weapons/force/absorb.mp3"); //PDSOUND_ABSORB + trap_S_RegisterSound("sound/weapons/force/jump.mp3"); //PDSOUND_FORCEJUMP + trap_S_RegisterSound("sound/weapons/force/grip.mp3"); //PDSOUND_FORCEGRIP + + if ( cgs.gametype >= GT_TEAM || cg_buildScript.integer ) { + +#ifdef JK2AWARDS + cgs.media.captureAwardSound = trap_S_RegisterSound( "sound/teamplay/flagcapture_yourteam.wav" ); +#endif + cgs.media.redLeadsSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM046"); + cgs.media.blueLeadsSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM045"); + cgs.media.teamsTiedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM032" ); + + cgs.media.redScoredSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM044"); + cgs.media.blueScoredSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM043" ); + + if ( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY || cg_buildScript.integer ) { + cgs.media.redFlagReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM042" ); + cgs.media.blueFlagReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM041" ); + cgs.media.redTookFlagSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM040" ); + cgs.media.blueTookFlagSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM039" ); + + cgs.media.redYsalReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM050" ); + cgs.media.blueYsalReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM049" ); + cgs.media.redTookYsalSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM048" ); + cgs.media.blueTookYsalSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM047" ); + } + } + + cgs.media.drainSound = trap_S_RegisterSound("sound/weapons/force/drained.mp3"); + + cgs.media.happyMusic = trap_S_RegisterSound("music/goodsmall.mp3"); + cgs.media.dramaticFailure = trap_S_RegisterSound("music/badsmall.mp3"); + + //PRECACHE ALL MUSIC HERE (don't need to precache normally because it's streamed off the disk) + if (cg_buildScript.integer) + { + trap_S_StartBackgroundTrack( "music/mp/duel.mp3", "music/mp/duel.mp3", qfalse ); + } + + cg.loadLCARSStage = 1; + + cgs.media.selectSound = trap_S_RegisterSound( "sound/weapons/change.wav" ); + + cgs.media.teleInSound = trap_S_RegisterSound( "sound/player/telein.wav" ); + cgs.media.teleOutSound = trap_S_RegisterSound( "sound/player/teleout.wav" ); + cgs.media.respawnSound = trap_S_RegisterSound( "sound/items/respawn1.wav" ); + + trap_S_RegisterSound( "sound/movers/objects/objectHit.wav" ); + + cgs.media.talkSound = trap_S_RegisterSound( "sound/player/talk.wav" ); + cgs.media.landSound = trap_S_RegisterSound( "sound/player/land1.wav"); + cgs.media.fallSound = trap_S_RegisterSound( "sound/player/fallsplat.wav"); + + cgs.media.crackleSound = trap_S_RegisterSound( "sound/effects/energy_crackle.wav" ); +#ifdef JK2AWARDS + cgs.media.impressiveSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM025" ); + cgs.media.excellentSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM053" ); + cgs.media.deniedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM017" ); + cgs.media.humiliationSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM019" ); + cgs.media.defendSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM024" ); +#endif + + cgs.media.takenLeadSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM051"); + cgs.media.tiedLeadSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM032"); + cgs.media.lostLeadSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM052"); + + cgs.media.rollSound = trap_S_RegisterSound( "sound/player/roll1.wav"); + + cgs.media.watrInSound = trap_S_RegisterSound( "sound/player/watr_in.wav"); + cgs.media.watrOutSound = trap_S_RegisterSound( "sound/player/watr_out.wav"); + cgs.media.watrUnSound = trap_S_RegisterSound( "sound/player/watr_un.wav"); + + cgs.media.explosionModel = trap_R_RegisterModel ( "models/map_objects/mp/sphere.md3" ); + cgs.media.surfaceExplosionShader = trap_R_RegisterShader( "surfaceExplosion" ); + + cgs.media.disruptorShader = trap_R_RegisterShader( "gfx/effects/burn"); + + if (cg_buildScript.integer) + { + trap_R_RegisterShader( "gfx/effects/turretflashdie" ); + } + + cgs.media.solidWhite = trap_R_RegisterShader( "gfx/effects/solidWhite_cull" ); + + trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable"); + trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable"); + + trap_R_RegisterModel ( "models/map_objects/mp/sphere.md3" ); + trap_R_RegisterModel("models/items/remote.md3"); + + cgs.media.holocronPickup = trap_S_RegisterSound( "sound/player/holocron.wav" ); + + // Zoom + cgs.media.zoomStart = trap_S_RegisterSound( "sound/interface/zoomstart.wav" ); + cgs.media.zoomLoop = trap_S_RegisterSound( "sound/interface/zoomloop.wav" ); + cgs.media.zoomEnd = trap_S_RegisterSound( "sound/interface/zoomend.wav" ); + + for (i=0 ; i<4 ; i++) { + Com_sprintf (name, sizeof(name), "sound/player/footsteps/boot%i.wav", i+1); + cgs.media.footsteps[FOOTSTEP_NORMAL][i] = trap_S_RegisterSound (name); + + Com_sprintf (name, sizeof(name), "sound/player/footsteps/splash%i.wav", i+1); + cgs.media.footsteps[FOOTSTEP_SPLASH][i] = trap_S_RegisterSound (name); + + Com_sprintf (name, sizeof(name), "sound/player/footsteps/clank%i.wav", i+1); + cgs.media.footsteps[FOOTSTEP_METAL][i] = trap_S_RegisterSound (name); + + // should these always be registered?? + Com_sprintf (name, sizeof(name), "sound/player/footsteps/step%i.wav", i+1); + trap_S_RegisterSound (name); + } + + // only register the items that the server says we need + strcpy( items, CG_ConfigString( CS_ITEMS ) ); + + for ( i = 1 ; i < bg_numItems ; i++ ) { +// if ( items[ i ] == '1' || cg_buildScript.integer ) { + CG_RegisterItemSounds( i ); +// } + } + + for ( i = 1 ; i < MAX_SOUNDS ; i++ ) { + soundName = CG_ConfigString( CS_SOUNDS+i ); + if ( !soundName[0] ) { + break; + } + if ( soundName[0] == '*' ) { + continue; // custom sound + } + cgs.gameSounds[i] = trap_S_RegisterSound( soundName ); + } + + for ( i = 1 ; i < MAX_FX ; i++ ) { + soundName = CG_ConfigString( CS_EFFECTS+i ); + if ( !soundName[0] ) { + break; + } + if ( soundName[0] == '*' ) { + continue; // custom sound + } + cgs.gameEffects[i] = trap_FX_RegisterEffect( soundName ); + } + + cg.loadLCARSStage = 2; + + // FIXME: only needed with item + cgs.media.deploySeeker = trap_S_RegisterSound ("sound/chars/seeker/misc/hiss"); + cgs.media.medkitSound = trap_S_RegisterSound ("sound/items/use_bacta.wav"); + + cgs.media.winnerSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM006" ); + cgs.media.loserSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM010" ); +} + + +//------------------------------------- +// CG_RegisterEffects +// +// Handles precaching all effect files +// and any shader, model, or sound +// files an effect may use. +//------------------------------------- +static void CG_RegisterEffects( void ) +{ + const char *effectName; + int i; + + for ( i = 1 ; i < MAX_FX ; i++ ) + { + effectName = CG_ConfigString( CS_EFFECTS + i ); + + if ( !effectName[0] ) + { + break; + } + + trap_FX_RegisterEffect( effectName ); + } + + // Set up the glass effects mini-system. + CG_InitGlass(); +} + +//=================================================================================== + +extern char *forceHolocronModels[]; +/* +================= +CG_RegisterGraphics + +This function may execute for a couple of minutes with a slow disk. +================= +*/ +static void CG_RegisterGraphics( void ) { + int i; + char items[MAX_ITEMS+1]; + static char *sb_nums[11] = { + "gfx/2d/numbers/zero", + "gfx/2d/numbers/one", + "gfx/2d/numbers/two", + "gfx/2d/numbers/three", + "gfx/2d/numbers/four", + "gfx/2d/numbers/five", + "gfx/2d/numbers/six", + "gfx/2d/numbers/seven", + "gfx/2d/numbers/eight", + "gfx/2d/numbers/nine", + "gfx/2d/numbers/minus", + }; + + static char *sb_t_nums[11] = { + "gfx/2d/numbers/t_zero", + "gfx/2d/numbers/t_one", + "gfx/2d/numbers/t_two", + "gfx/2d/numbers/t_three", + "gfx/2d/numbers/t_four", + "gfx/2d/numbers/t_five", + "gfx/2d/numbers/t_six", + "gfx/2d/numbers/t_seven", + "gfx/2d/numbers/t_eight", + "gfx/2d/numbers/t_nine", + "gfx/2d/numbers/t_minus", + }; + + static char *sb_c_nums[11] = { + "gfx/2d/numbers/c_zero", + "gfx/2d/numbers/c_one", + "gfx/2d/numbers/c_two", + "gfx/2d/numbers/c_three", + "gfx/2d/numbers/c_four", + "gfx/2d/numbers/c_five", + "gfx/2d/numbers/c_six", + "gfx/2d/numbers/c_seven", + "gfx/2d/numbers/c_eight", + "gfx/2d/numbers/c_nine", + "gfx/2d/numbers/t_minus", //????? + }; + + // clear any references to old media + memset( &cg.refdef, 0, sizeof( cg.refdef ) ); + trap_R_ClearScene(); + + CG_LoadingString( cgs.mapname ); + + trap_R_LoadWorldMap( cgs.mapname ); + + // precache status bar pics + CG_LoadingString( "game media" ); + + for ( i=0 ; i<11 ; i++) { + cgs.media.numberShaders[i] = trap_R_RegisterShader( sb_nums[i] ); + } + + cg.loadLCARSStage = 3; + + for ( i=0; i < 11; i++ ) + { + cgs.media.numberShaders[i] = trap_R_RegisterShaderNoMip( sb_nums[i] ); + cgs.media.smallnumberShaders[i] = trap_R_RegisterShaderNoMip( sb_t_nums[i] ); + cgs.media.chunkyNumberShaders[i] = trap_R_RegisterShaderNoMip( sb_c_nums[i] ); + } + + cgs.media.balloonShader = trap_R_RegisterShader( "gfx/mp/chat_icon" ); + + cgs.media.viewBloodShader = trap_R_RegisterShader( "viewBloodBlend" ); + + cgs.media.deferShader = trap_R_RegisterShaderNoMip( "gfx/2d/defer.tga" ); + + cgs.media.smokePuffShader = trap_R_RegisterShader( "smokePuff" ); + cgs.media.bloodTrailShader = trap_R_RegisterShader( "bloodTrail" ); + cgs.media.lagometerShader = trap_R_RegisterShaderNoMip("gfx/2d/lag" ); + cgs.media.connectionShader = trap_R_RegisterShaderNoMip( "gfx/2d/net" ); + + cgs.media.waterBubbleShader = trap_R_RegisterShader( "waterBubble" ); + + cgs.media.tracerShader = trap_R_RegisterShader( "gfx/misc/tracer" ); + + Com_Printf( S_COLOR_CYAN "---------- Fx System Initialization ---------\n" ); + trap_FX_InitSystem(); + Com_Printf( S_COLOR_CYAN "----- Fx System Initialization Complete -----\n" ); + CG_RegisterEffects(); + + + cgs.effects.turretShotEffect = trap_FX_RegisterEffect( "turret/shot" ); + + trap_FX_RegisterEffect("effects/blaster/deflect.efx"); + + trap_FX_RegisterEffect("emplaced/dead_smoke.efx"); + trap_FX_RegisterEffect("emplaced/explode.efx"); + + trap_FX_RegisterEffect("turret/explode.efx"); + + trap_FX_RegisterEffect("spark_explosion.efx"); + + trap_FX_RegisterEffect("effects/turret/muzzle_flash.efx"); + trap_FX_RegisterEffect("saber/spark.efx"); + trap_FX_RegisterEffect("mp/spawn.efx"); + trap_FX_RegisterEffect("mp/jedispawn.efx"); + trap_FX_RegisterEffect("mp/itemcone.efx"); + trap_FX_RegisterEffect("blaster/deflect.efx"); + trap_FX_RegisterEffect("saber/saber_block.efx"); + trap_FX_RegisterEffect("saber/spark.efx"); + trap_FX_RegisterEffect("saber/blood_sparks.efx"); + trap_FX_RegisterEffect("blaster/smoke_bolton"); + trap_FX_RegisterEffect("force/confusion.efx"); + + trap_FX_RegisterEffect("effects/force/lightning.efx"); + + + for ( i = 0 ; i < NUM_CROSSHAIRS ; i++ ) { + cgs.media.crosshairShader[i] = trap_R_RegisterShader( va("gfx/2d/crosshair%c", 'a'+i) ); + } + + cg.loadLCARSStage = 4; + + cgs.media.backTileShader = trap_R_RegisterShader( "gfx/2d/backtile" ); + cgs.media.noammoShader = trap_R_RegisterShader( "icons/noammo" ); + + // powerup shaders + cgs.media.quadShader = trap_R_RegisterShader("powerups/quad" ); + cgs.media.quadWeaponShader = trap_R_RegisterShader("powerups/quadWeapon" ); + cgs.media.battleSuitShader = trap_R_RegisterShader("powerups/battleSuit" ); + cgs.media.battleWeaponShader = trap_R_RegisterShader("powerups/battleWeapon" ); + cgs.media.invisShader = trap_R_RegisterShader("powerups/invisibility" ); + cgs.media.regenShader = trap_R_RegisterShader("powerups/regen" ); + cgs.media.hastePuffShader = trap_R_RegisterShader("hasteSmokePuff" ); + + cgs.media.itemRespawningPlaceholder = trap_R_RegisterShader("powerups/placeholder"); + cgs.media.itemRespawningRezOut = trap_R_RegisterShader("powerups/rezout"); + + cgs.media.playerShieldDamage = trap_R_RegisterShader("gfx/misc/personalshield"); + cgs.media.forceSightBubble = trap_R_RegisterShader("gfx/misc/sightbubble"); + cgs.media.forceShell = trap_R_RegisterShader("powerups/forceshell"); + cgs.media.sightShell = trap_R_RegisterShader("powerups/sightshell"); + + cgs.media.itemHoloModel = trap_R_RegisterModel("models/map_objects/mp/holo.md3"); + + if (cgs.gametype == GT_HOLOCRON || cg_buildScript.integer) + { + for ( i=0; i < NUM_FORCE_POWERS; i++ ) + { + if (forceHolocronModels[i] && + forceHolocronModels[i][0]) + { + trap_R_RegisterModel(forceHolocronModels[i]); + } + } + } + + if ( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY || cg_buildScript.integer ) { + if (cg_buildScript.integer) + { + trap_R_RegisterModel( "models/flags/r_flag.md3" ); + trap_R_RegisterModel( "models/flags/b_flag.md3" ); + trap_R_RegisterModel( "models/flags/r_flag_ysal.md3" ); + trap_R_RegisterModel( "models/flags/b_flag_ysal.md3" ); + } + + if (cgs.gametype == GT_CTF) + { + cgs.media.redFlagModel = trap_R_RegisterModel( "models/flags/r_flag.md3" ); + cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/b_flag.md3" ); + } + else + { + cgs.media.redFlagModel = trap_R_RegisterModel( "models/flags/r_flag_ysal.md3" ); + cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/b_flag_ysal.md3" ); + } + + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_x" ); + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_x" ); + + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_ys" ); + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_ys" ); + + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag" ); + trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag" ); + + trap_R_RegisterShaderNoMip("gfx/2d/net.tga"); + + cgs.media.flagPoleModel = trap_R_RegisterModel( "models/flag2/flagpole.md3" ); + cgs.media.flagFlapModel = trap_R_RegisterModel( "models/flag2/flagflap3.md3" ); + + cgs.media.redFlagFlapSkin = trap_R_RegisterSkin( "models/flag2/red.skin" ); + cgs.media.blueFlagFlapSkin = trap_R_RegisterSkin( "models/flag2/blue.skin" ); + cgs.media.neutralFlagFlapSkin = trap_R_RegisterSkin( "models/flag2/white.skin" ); + + cgs.media.redFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/red_base.md3" ); + cgs.media.blueFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/blue_base.md3" ); + cgs.media.neutralFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/ntrl_base.md3" ); + } + + if ( cg_buildScript.integer ) { + cgs.media.neutralFlagModel = 0;//trap_R_RegisterModel( "models/flags/n_flag.md3" ); + cgs.media.flagShader[0] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_neutral1" ); + cgs.media.flagShader[1] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_red2" ); + cgs.media.flagShader[2] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_blu2" ); + cgs.media.flagShader[3] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_neutral3" ); + } + + + if ( cgs.gametype >= GT_TEAM || cg_buildScript.integer ) { + cgs.media.teamRedShader = trap_R_RegisterShader( "sprites/team_red" ); + cgs.media.teamBlueShader = trap_R_RegisterShader( "sprites/team_blue" ); + cgs.media.redQuadShader = trap_R_RegisterShader("powerups/blueflag" ); + cgs.media.teamStatusBar = trap_R_RegisterShader( "gfx/2d/colorbar.tga" ); + } + else if ( cgs.gametype == GT_JEDIMASTER ) + { + cgs.media.teamRedShader = trap_R_RegisterShader( "sprites/team_red" ); + } + + cgs.media.armorModel = 0;//trap_R_RegisterModel( "models/powerups/armor/armor_yel.md3" ); + cgs.media.armorIcon = 0;//trap_R_RegisterShaderNoMip( "icons/iconr_yellow" ); + + cgs.media.heartShader = trap_R_RegisterShaderNoMip( "ui/assets/statusbar/selectedhealth.tga" ); + + cgs.media.ysaliredShader = trap_R_RegisterShader( "powerups/ysaliredshell"); + cgs.media.ysaliblueShader = trap_R_RegisterShader( "powerups/ysaliblueshell"); + cgs.media.ysalimariShader = trap_R_RegisterShader( "powerups/ysalimarishell"); + cgs.media.boonShader = trap_R_RegisterShader( "powerups/boonshell"); + cgs.media.endarkenmentShader = trap_R_RegisterShader( "powerups/endarkenmentshell"); + cgs.media.enlightenmentShader = trap_R_RegisterShader( "powerups/enlightenmentshell"); + cgs.media.invulnerabilityShader = trap_R_RegisterShader( "powerups/invulnerabilityshell"); + +#ifdef JK2AWARDS + cgs.media.medalImpressive = trap_R_RegisterShaderNoMip( "medal_impressive" ); + cgs.media.medalExcellent = trap_R_RegisterShaderNoMip( "medal_excellent" ); + cgs.media.medalGauntlet = trap_R_RegisterShaderNoMip( "medal_gauntlet" ); + cgs.media.medalDefend = trap_R_RegisterShaderNoMip( "medal_defend" ); + cgs.media.medalAssist = trap_R_RegisterShaderNoMip( "medal_assist" ); + cgs.media.medalCapture = trap_R_RegisterShaderNoMip( "medal_capture" ); +#endif + + // Binocular interface + cgs.media.binocularCircle = trap_R_RegisterShader( "gfx/2d/binCircle" ); + cgs.media.binocularMask = trap_R_RegisterShader( "gfx/2d/binMask" ); + cgs.media.binocularArrow = trap_R_RegisterShader( "gfx/2d/binSideArrow" ); + cgs.media.binocularTri = trap_R_RegisterShader( "gfx/2d/binTopTri" ); + cgs.media.binocularStatic = trap_R_RegisterShader( "gfx/2d/binocularWindow" ); + cgs.media.binocularOverlay = trap_R_RegisterShader( "gfx/2d/binocularNumOverlay" ); + + cg.loadLCARSStage = 5; + +/* +Ghoul2 Insert Start +*/ + CG_InitItems(); +/* +Ghoul2 Insert End +*/ + memset( cg_weapons, 0, sizeof( cg_weapons ) ); + + // only register the items that the server says we need + strcpy( items, CG_ConfigString( CS_ITEMS) ); + + for ( i = 1 ; i < bg_numItems ; i++ ) { + if ( items[ i ] == '1' || cg_buildScript.integer ) { + CG_LoadingItem( i ); + CG_RegisterItemVisuals( i ); + } + } + + cg.loadLCARSStage = 6; + + cgs.media.glassShardShader = trap_R_RegisterShader( "gfx/misc/test_crackle" ); + + // doing one shader just makes it look like a shell. By using two shaders with different bulge offsets and different texture scales, it has a much more chaotic look + cgs.media.electricBodyShader = trap_R_RegisterShader( "gfx/misc/electric" ); + cgs.media.electricBody2Shader = trap_R_RegisterShader( "gfx/misc/fullbodyelectric2" ); + + // wall marks + cgs.media.bulletMarkShader = trap_R_RegisterShader( "gfx/damage/bullet_mrk" ); + cgs.media.burnMarkShader = trap_R_RegisterShader( "gfx/damage/burn_med_mrk" ); + cgs.media.holeMarkShader = trap_R_RegisterShader( "gfx/damage/hole_lg_mrk" ); + cgs.media.energyMarkShader = trap_R_RegisterShader( "gfx/damage/plasma_mrk" ); + cgs.media.shadowMarkShader = trap_R_RegisterShader( "markShadow" ); + cgs.media.wakeMarkShader = trap_R_RegisterShader( "wake" ); + cgs.media.bloodMarkShader = trap_R_RegisterShader( "bloodMark" ); + + cgs.media.viewPainShader = trap_R_RegisterShader( "gfx/misc/borgeyeflare" ); + cgs.media.viewPainShader_Shields = trap_R_RegisterShader( "gfx/mp/dmgshader_shields" ); + cgs.media.viewPainShader_ShieldsAndHealth = trap_R_RegisterShader( "gfx/mp/dmgshader_shieldsandhealth" ); + + // register the inline models + cgs.numInlineModels = trap_CM_NumInlineModels(); + for ( i = 1 ; i < cgs.numInlineModels ; i++ ) { + char name[10]; + vec3_t mins, maxs; + int j; + + Com_sprintf( name, sizeof(name), "*%i", i ); + cgs.inlineDrawModel[i] = trap_R_RegisterModel( name ); + trap_R_ModelBounds( cgs.inlineDrawModel[i], mins, maxs ); + for ( j = 0 ; j < 3 ; j++ ) { + cgs.inlineModelMidpoints[i][j] = mins[j] + 0.5 * ( maxs[j] - mins[j] ); + } + } + + cg.loadLCARSStage = 7; + + // register all the server specified models + for (i=1 ; i= MAX_CONFIGSTRINGS ) { + CG_Error( "CG_ConfigString: bad index: %i", index ); + } + return cgs.gameState.stringData + cgs.gameState.stringOffsets[ index ]; +} + +//================================================================== + +/* +====================== +CG_StartMusic + +====================== +*/ +void CG_StartMusic( qboolean bForceStart ) { + char *s; + char parm1[MAX_QPATH], parm2[MAX_QPATH]; + + // start the background music + s = (char *)CG_ConfigString( CS_MUSIC ); + Q_strncpyz( parm1, COM_Parse( (const char **)&s ), sizeof( parm1 ) ); + Q_strncpyz( parm2, COM_Parse( (const char **)&s ), sizeof( parm2 ) ); + + trap_S_StartBackgroundTrack( parm1, parm2, !bForceStart ); +} + +char *CG_GetMenuBuffer(const char *filename) { + int len; + fileHandle_t f; + static char buf[MAX_MENUFILE]; + + len = trap_FS_FOpenFile( filename, &f, FS_READ ); + if ( !f ) { + trap_Print( va( S_COLOR_RED "menu file not found: %s, using default\n", filename ) ); + return NULL; + } + if ( len >= MAX_MENUFILE ) { + trap_Print( va( S_COLOR_RED "menu file too large: %s is %i, max allowed is %i", filename, len, MAX_MENUFILE ) ); + trap_FS_FCloseFile( f ); + return NULL; + } + + trap_FS_Read( buf, len, f ); + buf[len] = 0; + trap_FS_FCloseFile( f ); + + return buf; +} + +// +// ============================== +// new hud stuff ( mission pack ) +// ============================== +// +qboolean CG_Asset_Parse(int handle) { + pc_token_t token; + const char *tempStr; + + if (!trap_PC_ReadToken(handle, &token)) + return qfalse; + if (Q_stricmp(token.string, "{") != 0) { + return qfalse; + } + + while ( 1 ) { + if (!trap_PC_ReadToken(handle, &token)) + return qfalse; + + if (Q_stricmp(token.string, "}") == 0) { + return qtrue; + } + + // font + if (Q_stricmp(token.string, "font") == 0) { + int pointSize; + if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) { + return qfalse; + } + +// cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.textFont); + cgDC.Assets.qhMediumFont = cgDC.RegisterFont(tempStr); + continue; + } + + // smallFont + if (Q_stricmp(token.string, "smallFont") == 0) { + int pointSize; + if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) { + return qfalse; + } +// cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.smallFont); + cgDC.Assets.qhSmallFont = cgDC.RegisterFont(tempStr); + continue; + } + + // font + if (Q_stricmp(token.string, "bigfont") == 0) { + int pointSize; + if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) { + return qfalse; + } +// cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.bigFont); + cgDC.Assets.qhBigFont = cgDC.RegisterFont(tempStr); + continue; + } + + // gradientbar + if (Q_stricmp(token.string, "gradientbar") == 0) { + if (!PC_String_Parse(handle, &tempStr)) { + return qfalse; + } + cgDC.Assets.gradientBar = trap_R_RegisterShaderNoMip(tempStr); + continue; + } + + // enterMenuSound + if (Q_stricmp(token.string, "menuEnterSound") == 0) { + if (!PC_String_Parse(handle, &tempStr)) { + return qfalse; + } + cgDC.Assets.menuEnterSound = trap_S_RegisterSound( tempStr ); + continue; + } + + // exitMenuSound + if (Q_stricmp(token.string, "menuExitSound") == 0) { + if (!PC_String_Parse(handle, &tempStr)) { + return qfalse; + } + cgDC.Assets.menuExitSound = trap_S_RegisterSound( tempStr ); + continue; + } + + // itemFocusSound + if (Q_stricmp(token.string, "itemFocusSound") == 0) { + if (!PC_String_Parse(handle, &tempStr)) { + return qfalse; + } + cgDC.Assets.itemFocusSound = trap_S_RegisterSound( tempStr ); + continue; + } + + // menuBuzzSound + if (Q_stricmp(token.string, "menuBuzzSound") == 0) { + if (!PC_String_Parse(handle, &tempStr)) { + return qfalse; + } + cgDC.Assets.menuBuzzSound = trap_S_RegisterSound( tempStr ); + continue; + } + + if (Q_stricmp(token.string, "cursor") == 0) { + if (!PC_String_Parse(handle, &cgDC.Assets.cursorStr)) { + return qfalse; + } + cgDC.Assets.cursor = trap_R_RegisterShaderNoMip( cgDC.Assets.cursorStr); + continue; + } + + if (Q_stricmp(token.string, "fadeClamp") == 0) { + if (!PC_Float_Parse(handle, &cgDC.Assets.fadeClamp)) { + return qfalse; + } + continue; + } + + if (Q_stricmp(token.string, "fadeCycle") == 0) { + if (!PC_Int_Parse(handle, &cgDC.Assets.fadeCycle)) { + return qfalse; + } + continue; + } + + if (Q_stricmp(token.string, "fadeAmount") == 0) { + if (!PC_Float_Parse(handle, &cgDC.Assets.fadeAmount)) { + return qfalse; + } + continue; + } + + if (Q_stricmp(token.string, "shadowX") == 0) { + if (!PC_Float_Parse(handle, &cgDC.Assets.shadowX)) { + return qfalse; + } + continue; + } + + if (Q_stricmp(token.string, "shadowY") == 0) { + if (!PC_Float_Parse(handle, &cgDC.Assets.shadowY)) { + return qfalse; + } + continue; + } + + if (Q_stricmp(token.string, "shadowColor") == 0) { + if (!PC_Color_Parse(handle, &cgDC.Assets.shadowColor)) { + return qfalse; + } + cgDC.Assets.shadowFadeClamp = cgDC.Assets.shadowColor[3]; + continue; + } + } + return qfalse; // bk001204 - why not? +} + +void CG_ParseMenu(const char *menuFile) { + pc_token_t token; + int handle; + + handle = trap_PC_LoadSource(menuFile); + if (!handle) + handle = trap_PC_LoadSource("ui/testhud.menu"); + if (!handle) + return; + + while ( 1 ) { + if (!trap_PC_ReadToken( handle, &token )) { + break; + } + + //if ( Q_stricmp( token, "{" ) ) { + // Com_Printf( "Missing { in menu file\n" ); + // break; + //} + + //if ( menuCount == MAX_MENUS ) { + // Com_Printf( "Too many menus!\n" ); + // break; + //} + + if ( token.string[0] == '}' ) { + break; + } + + if (Q_stricmp(token.string, "assetGlobalDef") == 0) { + if (CG_Asset_Parse(handle)) { + continue; + } else { + break; + } + } + + + if (Q_stricmp(token.string, "menudef") == 0) { + // start a new menu + Menu_New(handle); + } + } + trap_PC_FreeSource(handle); +} + +qboolean CG_Load_Menu(char **p) { + char *token; + + token = COM_ParseExt((const char **)p, qtrue); + + if (token[0] != '{') { + return qfalse; + } + + while ( 1 ) { + + token = COM_ParseExt((const char **)p, qtrue); + + if (Q_stricmp(token, "}") == 0) { + return qtrue; + } + + if ( !token || token[0] == 0 ) { + return qfalse; + } + + CG_ParseMenu(token); + } + return qfalse; +} + + +static qboolean CG_OwnerDrawHandleKey(int ownerDraw, int flags, float *special, int key) { + return qfalse; +} + + +static int CG_FeederCount(float feederID) { + int i, count; + count = 0; + if (feederID == FEEDER_REDTEAM_LIST) { + for (i = 0; i < cg.numScores; i++) { + if (cg.scores[i].team == TEAM_RED) { + count++; + } + } + } else if (feederID == FEEDER_BLUETEAM_LIST) { + for (i = 0; i < cg.numScores; i++) { + if (cg.scores[i].team == TEAM_BLUE) { + count++; + } + } + } else if (feederID == FEEDER_SCOREBOARD) { + return cg.numScores; + } + return count; +} + + +void CG_SetScoreSelection(void *p) { + menuDef_t *menu = (menuDef_t*)p; + playerState_t *ps = &cg.snap->ps; + int i, red, blue; + red = blue = 0; + for (i = 0; i < cg.numScores; i++) { + if (cg.scores[i].team == TEAM_RED) { + red++; + } else if (cg.scores[i].team == TEAM_BLUE) { + blue++; + } + if (ps->clientNum == cg.scores[i].client) { + cg.selectedScore = i; + } + } + + if (menu == NULL) { + // just interested in setting the selected score + return; + } + + if ( cgs.gametype >= GT_TEAM ) { + int feeder = FEEDER_REDTEAM_LIST; + i = red; + if (cg.scores[cg.selectedScore].team == TEAM_BLUE) { + feeder = FEEDER_BLUETEAM_LIST; + i = blue; + } + Menu_SetFeederSelection(menu, feeder, i, NULL); + } else { + Menu_SetFeederSelection(menu, FEEDER_SCOREBOARD, cg.selectedScore, NULL); + } +} + +// FIXME: might need to cache this info +static clientInfo_t * CG_InfoFromScoreIndex(int index, int team, int *scoreIndex) { + int i, count; + if ( cgs.gametype >= GT_TEAM ) { + count = 0; + for (i = 0; i < cg.numScores; i++) { + if (cg.scores[i].team == team) { + if (count == index) { + *scoreIndex = i; + return &cgs.clientinfo[cg.scores[i].client]; + } + count++; + } + } + } + *scoreIndex = index; + return &cgs.clientinfo[ cg.scores[index].client ]; +} + +static const char *CG_FeederItemText(float feederID, int index, int column, + qhandle_t *handle1, qhandle_t *handle2, qhandle_t *handle3) { + gitem_t *item; + int scoreIndex = 0; + clientInfo_t *info = NULL; + int team = -1; + score_t *sp = NULL; + + *handle1 = *handle2 = *handle3 = -1; + + if (feederID == FEEDER_REDTEAM_LIST) { + team = TEAM_RED; + } else if (feederID == FEEDER_BLUETEAM_LIST) { + team = TEAM_BLUE; + } + + info = CG_InfoFromScoreIndex(index, team, &scoreIndex); + sp = &cg.scores[scoreIndex]; + + if (info && info->infoValid) { + switch (column) { + case 0: + if ( info->powerups & ( 1 << PW_NEUTRALFLAG ) ) { + item = BG_FindItemForPowerup( PW_NEUTRALFLAG ); + *handle1 = cg_items[ ITEM_INDEX(item) ].icon; + } else if ( info->powerups & ( 1 << PW_REDFLAG ) ) { + item = BG_FindItemForPowerup( PW_REDFLAG ); + *handle1 = cg_items[ ITEM_INDEX(item) ].icon; + } else if ( info->powerups & ( 1 << PW_BLUEFLAG ) ) { + item = BG_FindItemForPowerup( PW_BLUEFLAG ); + *handle1 = cg_items[ ITEM_INDEX(item) ].icon; + } else { + /* + if ( info->botSkill > 0 && info->botSkill <= 5 ) { + *handle1 = cgs.media.botSkillShaders[ info->botSkill - 1 ]; + } else if ( info->handicap < 100 ) { + return va("%i", info->handicap ); + } + */ + } + break; + case 1: + if (team == -1) { + return ""; + } else { + *handle1 = CG_StatusHandle(info->teamTask); + } + break; + case 2: + if ( cg.snap->ps.stats[ STAT_CLIENTS_READY ] & ( 1 << sp->client ) ) { + return "Ready"; + } + if (team == -1) { + if (cgs.gametype == GT_TOURNAMENT) { + return va("%i/%i", info->wins, info->losses); + } else if (info->infoValid && info->team == TEAM_SPECTATOR ) { + return "Spectator"; + } else { + return ""; + } + } else { + if (info->teamLeader) { + return "Leader"; + } + } + break; + case 3: + return info->name; + break; + case 4: + return va("%i", info->score); + break; + case 5: + return va("%4i", sp->time); + break; + case 6: + if ( sp->ping == -1 ) { + return "connecting"; + } + return va("%4i", sp->ping); + break; + } + } + + return ""; +} + +static qhandle_t CG_FeederItemImage(float feederID, int index) { + return 0; +} + +static qboolean CG_FeederSelection(float feederID, int index) { + if ( cgs.gametype >= GT_TEAM ) { + int i, count; + int team = (feederID == FEEDER_REDTEAM_LIST) ? TEAM_RED : TEAM_BLUE; + count = 0; + for (i = 0; i < cg.numScores; i++) { + if (cg.scores[i].team == team) { + if (index == count) { + cg.selectedScore = i; + } + count++; + } + } + } else { + cg.selectedScore = index; + } + + return qtrue; +} + +static float CG_Cvar_Get(const char *cvar) { + char buff[128]; + memset(buff, 0, sizeof(buff)); + trap_Cvar_VariableStringBuffer(cvar, buff, sizeof(buff)); + return atof(buff); +} + +void CG_Text_PaintWithCursor(float x, float y, float scale, vec4_t color, const char *text, int cursorPos, char cursor, int limit, int style, int iMenuFont) { + CG_Text_Paint(x, y, scale, color, text, 0, limit, style, iMenuFont); +} + +static int CG_OwnerDrawWidth(int ownerDraw, float scale) { + switch (ownerDraw) { + case CG_GAME_TYPE: + return CG_Text_Width(CG_GameTypeString(), scale, FONT_MEDIUM); + case CG_GAME_STATUS: + return CG_Text_Width(CG_GetGameStatusText(), scale, FONT_MEDIUM); + break; + case CG_KILLER: + return CG_Text_Width(CG_GetKillerText(), scale, FONT_MEDIUM); + break; + case CG_RED_NAME: + return CG_Text_Width(cg_redTeamName.string, scale, FONT_MEDIUM); + break; + case CG_BLUE_NAME: + return CG_Text_Width(cg_blueTeamName.string, scale, FONT_MEDIUM); + break; + + + } + return 0; +} + +static int CG_PlayCinematic(const char *name, float x, float y, float w, float h) { + return trap_CIN_PlayCinematic(name, x, y, w, h, CIN_loop); +} + +static void CG_StopCinematic(int handle) { + trap_CIN_StopCinematic(handle); +} + +static void CG_DrawCinematic(int handle, float x, float y, float w, float h) { + trap_CIN_SetExtents(handle, x, y, w, h); + trap_CIN_DrawCinematic(handle); +} + +static void CG_RunCinematicFrame(int handle) { + trap_CIN_RunCinematic(handle); +} + +/* +================= +CG_LoadHudMenu(); + +================= +*/ +void CG_LoadHudMenu() +{ + cgDC.registerShaderNoMip = &trap_R_RegisterShaderNoMip; + cgDC.setColor = &trap_R_SetColor; + cgDC.drawHandlePic = &CG_DrawPic; + cgDC.drawStretchPic = &trap_R_DrawStretchPic; + cgDC.drawText = &CG_Text_Paint; + cgDC.textWidth = &CG_Text_Width; + cgDC.textHeight = &CG_Text_Height; + cgDC.registerModel = &trap_R_RegisterModel; + cgDC.modelBounds = &trap_R_ModelBounds; + cgDC.fillRect = &CG_FillRect; + cgDC.drawRect = &CG_DrawRect; + cgDC.drawSides = &CG_DrawSides; + cgDC.drawTopBottom = &CG_DrawTopBottom; + cgDC.clearScene = &trap_R_ClearScene; + cgDC.addRefEntityToScene = &trap_R_AddRefEntityToScene; + cgDC.renderScene = &trap_R_RenderScene; + cgDC.RegisterFont = &trap_R_RegisterFont; + cgDC.Font_StrLenPixels = &trap_R_Font_StrLenPixels; + cgDC.Font_StrLenChars = &trap_R_Font_StrLenChars; + cgDC.Font_HeightPixels = &trap_R_Font_HeightPixels; + cgDC.Font_DrawString = &trap_R_Font_DrawString; + cgDC.Language_IsAsian = &trap_Language_IsAsian; + cgDC.Language_UsesSpaces = &trap_Language_UsesSpaces; + cgDC.AnyLanguage_ReadCharFromString = &trap_AnyLanguage_ReadCharFromString; + cgDC.ownerDrawItem = &CG_OwnerDraw; + cgDC.getValue = &CG_GetValue; + cgDC.ownerDrawVisible = &CG_OwnerDrawVisible; + cgDC.runScript = &CG_RunMenuScript; + cgDC.deferScript = &CG_DeferMenuScript; + cgDC.getTeamColor = &CG_GetTeamColor; + cgDC.setCVar = trap_Cvar_Set; + cgDC.getCVarString = trap_Cvar_VariableStringBuffer; + cgDC.getCVarValue = CG_Cvar_Get; + cgDC.drawTextWithCursor = &CG_Text_PaintWithCursor; + //cgDC.setOverstrikeMode = &trap_Key_SetOverstrikeMode; + //cgDC.getOverstrikeMode = &trap_Key_GetOverstrikeMode; + cgDC.startLocalSound = &trap_S_StartLocalSound; + cgDC.ownerDrawHandleKey = &CG_OwnerDrawHandleKey; + cgDC.feederCount = &CG_FeederCount; + cgDC.feederItemImage = &CG_FeederItemImage; + cgDC.feederItemText = &CG_FeederItemText; + cgDC.feederSelection = &CG_FeederSelection; + //cgDC.setBinding = &trap_Key_SetBinding; + //cgDC.getBindingBuf = &trap_Key_GetBindingBuf; + //cgDC.keynumToStringBuf = &trap_Key_KeynumToStringBuf; + //cgDC.executeText = &trap_Cmd_ExecuteText; + cgDC.Error = &Com_Error; + cgDC.Print = &Com_Printf; + cgDC.ownerDrawWidth = &CG_OwnerDrawWidth; + //cgDC.Pause = &CG_Pause; + cgDC.registerSound = &trap_S_RegisterSound; + cgDC.startBackgroundTrack = &trap_S_StartBackgroundTrack; + cgDC.stopBackgroundTrack = &trap_S_StopBackgroundTrack; + cgDC.playCinematic = &CG_PlayCinematic; + cgDC.stopCinematic = &CG_StopCinematic; + cgDC.drawCinematic = &CG_DrawCinematic; + cgDC.runCinematicFrame = &CG_RunCinematicFrame; + + Init_Display(&cgDC); + + Menu_Reset(); +} + +void CG_AssetCache() { + //if (Assets.textFont == NULL) { + // trap_R_RegisterFont("fonts/arial.ttf", 72, &Assets.textFont); + //} + //Assets.background = trap_R_RegisterShaderNoMip( ASSET_BACKGROUND ); + //Com_Printf("Menu Size: %i bytes\n", sizeof(Menus)); + cgDC.Assets.gradientBar = trap_R_RegisterShaderNoMip( ASSET_GRADIENTBAR ); + cgDC.Assets.fxBasePic = trap_R_RegisterShaderNoMip( ART_FX_BASE ); + cgDC.Assets.fxPic[0] = trap_R_RegisterShaderNoMip( ART_FX_RED ); + cgDC.Assets.fxPic[1] = trap_R_RegisterShaderNoMip( ART_FX_YELLOW ); + cgDC.Assets.fxPic[2] = trap_R_RegisterShaderNoMip( ART_FX_GREEN ); + cgDC.Assets.fxPic[3] = trap_R_RegisterShaderNoMip( ART_FX_TEAL ); + cgDC.Assets.fxPic[4] = trap_R_RegisterShaderNoMip( ART_FX_BLUE ); + cgDC.Assets.fxPic[5] = trap_R_RegisterShaderNoMip( ART_FX_CYAN ); + cgDC.Assets.fxPic[6] = trap_R_RegisterShaderNoMip( ART_FX_WHITE ); + cgDC.Assets.scrollBar = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR ); + cgDC.Assets.scrollBarArrowDown = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWDOWN ); + cgDC.Assets.scrollBarArrowUp = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWUP ); + cgDC.Assets.scrollBarArrowLeft = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWLEFT ); + cgDC.Assets.scrollBarArrowRight = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWRIGHT ); + cgDC.Assets.scrollBarThumb = trap_R_RegisterShaderNoMip( ASSET_SCROLL_THUMB ); + cgDC.Assets.sliderBar = trap_R_RegisterShaderNoMip( ASSET_SLIDER_BAR ); + cgDC.Assets.sliderThumb = trap_R_RegisterShaderNoMip( ASSET_SLIDER_THUMB ); +} + +/* + + +/* +Ghoul2 Insert Start +*/ + +// initialise the cg_entities structure - take into account the ghoul2 stl stuff in the active snap shots +void CG_Init_CG(void) +{ + memset( &cg, 0, sizeof(cg)); +} + +// initialise the cg_entities structure - take into account the ghoul2 stl stuff +void CG_Init_CGents(void) +{ + + memset(&cg_entities, 0, sizeof(cg_entities)); +} + + +void CG_InitItems(void) +{ + memset( cg_items, 0, sizeof( cg_items ) ); +} + +/* +Ghoul2 Insert End +*/ + +forceTicPos_t forceTicPos[] = +{ + + 11, 41, 20, 10, "gfx/hud/force_tick1", 0, // Left Top + 12, 45, 20, 10, "gfx/hud/force_tick2", 0, + 14, 49, 20, 10, "gfx/hud/force_tick3", 0, + 17, 52, 20, 10, "gfx/hud/force_tick4", 0, + 22, 55, 10, 10, "gfx/hud/force_tick5", 0, + 28, 57, 10, 20, "gfx/hud/force_tick6", 0, + 34, 59, 10, 10, "gfx/hud/force_tick7", 0, // Left bottom + + 46, 59, -10, 10, "gfx/hud/force_tick7", 0, // Right bottom + 52, 57, -10, 20, "gfx/hud/force_tick6", 0, + 58, 55, -10, 10, "gfx/hud/force_tick5", 0, + 63, 52, -20, 10, "gfx/hud/force_tick4", 0, + 66, 49, -20, 10, "gfx/hud/force_tick3", 0, + 68, 45, -20, 10, "gfx/hud/force_tick2", 0, + 69, 41, -20, 10, "gfx/hud/force_tick1", 0, // Right top +}; + +forceTicPos_t ammoTicPos[] = +{ + 12, 34, 10, 10, "gfx/hud/ammo_tick7", 0, // Bottom + 13, 28, 10, 10, "gfx/hud/ammo_tick6", 0, + 15, 23, 10, 10, "gfx/hud/ammo_tick5", 0, + 19, 19, 10, 10, "gfx/hud/ammo_tick4", 0, + 23, 15, 10, 10, "gfx/hud/ammo_tick3", 0, + 29, 12, 10, 10, "gfx/hud/ammo_tick2", 0, + 34, 11, 10, 10, "gfx/hud/ammo_tick1", 0, + + 47, 11, -10, 10, "gfx/hud/ammo_tick1", 0, + 52, 12, -10, 10, "gfx/hud/ammo_tick2", 0, + 58, 15, -10, 10, "gfx/hud/ammo_tick3", 0, + 62, 19, -10, 10, "gfx/hud/ammo_tick4", 0, + 66, 23, -10, 10, "gfx/hud/ammo_tick5", 0, + 68, 28, -10, 10, "gfx/hud/ammo_tick6", 0, + 69, 34, -10, 10, "gfx/hud/ammo_tick7", 0, +}; + + +/* +================= +CG_Init + +Called after every level change or subsystem restart +Will perform callbacks to make the loading info screen update. +================= +*/ +void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) { + const char *s; + int i = 0; + + trap_CG_RegisterSharedMemory(cg.sharedBuffer); + + // clear everything +/* +Ghoul2 Insert Start +*/ + +// memset( cg_entities, 0, sizeof( cg_entities ) ); + CG_Init_CGents(); +// this is a No-No now we have stl vector classes in here. +// memset( &cg, 0, sizeof( cg ) ); + CG_Init_CG(); + CG_InitItems(); +/* +Ghoul2 Insert End +*/ + + // this is kinda dumb as well, but I need to pre-load some fonts in order to have the text available + // to say I'm loading the assets.... which includes loading the fonts. So I'll set these up as reasonable + // defaults, then let the menu asset parser (which actually specifies the ingame fonts) load over them + // if desired during parse. Dunno how legal it is to store in these cgDC things, but it causes no harm + // and even if/when they get overwritten they'll be legalised by the menu asset parser :-) +// CG_LoadFonts(); + cgDC.Assets.qhSmallFont = trap_R_RegisterFont("ocr_a"); + cgDC.Assets.qhMediumFont = trap_R_RegisterFont("ergoec"); + cgDC.Assets.qhBigFont = cgDC.Assets.qhMediumFont; + + memset( &cgs, 0, sizeof( cgs ) ); + memset( cg_weapons, 0, sizeof(cg_weapons) ); + + cg.clientNum = clientNum; + + cgs.processedSnapshotNum = serverMessageNum; + cgs.serverCommandSequence = serverCommandSequence; + + cg.loadLCARSStage = 0; + + cg.itemSelect = -1; + cg.forceSelect = -1; + + // load a few needed things before we do any screen updates + cgs.media.charsetShader = trap_R_RegisterShaderNoMip( "gfx/2d/charsgrid_med" ); + cgs.media.whiteShader = trap_R_RegisterShader( "white" ); + + cgs.media.loadBarLED = trap_R_RegisterShaderNoMip( "gfx/hud/load_tick" ); + cgs.media.loadBarLEDCap = trap_R_RegisterShaderNoMip( "gfx/hud/load_tick_cap" ); + cgs.media.loadBarLEDSurround= trap_R_RegisterShaderNoMip( "gfx/hud/mp_levelload" ); + + //rww - precache HUD weapon icons here + //actually, these should be stored in the icon field of each item def + cgs.media.weaponIcons[WP_STUN_BATON] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_stunbaton"); + cgs.media.weaponIcons_NA[WP_STUN_BATON] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_stunbaton_na"); + + cgs.media.weaponIcons[WP_SABER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_lightsaber"); + cgs.media.weaponIcons_NA[WP_SABER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_lightsaber_na"); + + cgs.media.weaponIcons[WP_BRYAR_PISTOL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_briar"); + cgs.media.weaponIcons_NA[WP_BRYAR_PISTOL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_briar_na"); + + cgs.media.weaponIcons[WP_BLASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_blaster"); + cgs.media.weaponIcons_NA[WP_BLASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_blaster_na"); + + cgs.media.weaponIcons[WP_DISRUPTOR] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_disruptor"); + cgs.media.weaponIcons_NA[WP_DISRUPTOR] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_disruptor_na"); + + cgs.media.weaponIcons[WP_BOWCASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_bowcaster"); + cgs.media.weaponIcons_NA[WP_BOWCASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_bowcaster_na"); + + cgs.media.weaponIcons[WP_REPEATER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_repeater"); + cgs.media.weaponIcons_NA[WP_REPEATER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_repeater_na"); + + cgs.media.weaponIcons[WP_DEMP2] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_demp2"); + cgs.media.weaponIcons_NA[WP_DEMP2] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_demp2_na"); + + cgs.media.weaponIcons[WP_FLECHETTE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_flechette"); + cgs.media.weaponIcons_NA[WP_FLECHETTE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_flechette_na"); + + cgs.media.weaponIcons[WP_ROCKET_LAUNCHER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_merrsonn"); + cgs.media.weaponIcons_NA[WP_ROCKET_LAUNCHER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_merrsonn_na"); + + cgs.media.weaponIcons[WP_THERMAL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_thermal"); + cgs.media.weaponIcons_NA[WP_THERMAL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_thermal_na"); + + cgs.media.weaponIcons[WP_TRIP_MINE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_tripmine"); + cgs.media.weaponIcons_NA[WP_TRIP_MINE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_tripmine_na"); + + cgs.media.weaponIcons[WP_DET_PACK] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_detpack"); + cgs.media.weaponIcons_NA[WP_DET_PACK] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_detpack_na"); + + // HUD artwork for cycling inventory,weapons and force powers + cgs.media.weaponIconBackground = trap_R_RegisterShaderNoMip( "gfx/hud/background"); + cgs.media.weaponProngsOn = trap_R_RegisterShaderNoMip( "gfx/hud/prong_on_w"); + cgs.media.weaponProngsOff = trap_R_RegisterShaderNoMip( "gfx/hud/prong_off"); + cgs.media.forceProngsOn = trap_R_RegisterShaderNoMip( "gfx/hud/prong_on_f"); + cgs.media.forceIconBackground = trap_R_RegisterShaderNoMip( "gfx/hud/background_f"); + cgs.media.inventoryIconBackground = trap_R_RegisterShaderNoMip( "gfx/hud/background_i"); + cgs.media.inventoryProngsOn = trap_R_RegisterShaderNoMip( "gfx/hud/prong_on_i"); + + //rww - precache holdable item icons here + while (i < bg_numItems) + { + if (bg_itemlist[i].giType == IT_HOLDABLE) + { + if (bg_itemlist[i].icon) + { + cgs.media.invenIcons[bg_itemlist[i].giTag] = trap_R_RegisterShaderNoMip(bg_itemlist[i].icon); + } + else + { + cgs.media.invenIcons[bg_itemlist[i].giTag] = 0; + } + } + + i++; + } + + //rww - precache force power icons here + i = 0; + + while (i < NUM_FORCE_POWERS) + { + cgs.media.forcePowerIcons[i] = trap_R_RegisterShaderNoMip(HolocronIcons[i]); + + i++; + } + cgs.media.rageRecShader = trap_R_RegisterShaderNoMip("gfx/mp/f_icon_ragerec"); + + //rww - precache other HUD graphics + cgs.media.HUDLeftFrame = trap_R_RegisterShaderNoMip( "gfx/hud/static_test" ); + cgs.media.HUDInnerLeft = trap_R_RegisterShaderNoMip( "gfx/hud/hudleft_innerframe" ); + cgs.media.HUDArmor1 = trap_R_RegisterShaderNoMip( "gfx/hud/armor1" ); + cgs.media.HUDArmor2 = trap_R_RegisterShaderNoMip( "gfx/hud/armor2" ); + cgs.media.HUDHealth = trap_R_RegisterShaderNoMip( "gfx/hud/health" ); + cgs.media.HUDHealthTic = trap_R_RegisterShaderNoMip( "gfx/hud/health_tic" ); + cgs.media.HUDArmorTic = trap_R_RegisterShaderNoMip( "gfx/hud/armor_tic" ); + + cgs.media.HUDLeftStatic = cgs.media.HUDLeftFrame;//trap_R_RegisterShaderNoMip( "gfx/hud/static_test" ); + cgs.media.HUDLeft = cgs.media.HUDInnerLeft;//trap_R_RegisterShaderNoMip( "gfx/hud/hudleft" ); + + cgs.media.HUDSaberStyle1 = trap_R_RegisterShader( "gfx/hud/saber_stylesFast" ); + cgs.media.HUDSaberStyle2 = trap_R_RegisterShader( "gfx/hud/saber_stylesMed" ); + cgs.media.HUDSaberStyle3 = trap_R_RegisterShader( "gfx/hud/saber_stylesStrong" ); + + cgs.media.HUDRightFrame = trap_R_RegisterShaderNoMip("gfx/hud/hudrightframe"); + cgs.media.HUDInnerRight = trap_R_RegisterShaderNoMip( "gfx/hud/hudright_innerframe" ); + + // Load tics + for (i=0;ips.pm_flags & PMF_FOLLOW) + { + return; + } + +// BG_CycleForce(&cg.snap->ps, 1); + if (cg.forceSelect != -1) + { + cg.snap->ps.fd.forcePowerSelected = cg.forceSelect; + } + + BG_CycleForce(&cg.snap->ps, 1); + + if (cg.snap->ps.fd.forcePowersKnown & (1 << cg.snap->ps.fd.forcePowerSelected)) + { + cg.forceSelect = cg.snap->ps.fd.forcePowerSelected; + cg.forceSelectTime = cg.time; + } +} + +/* +=============== +CG_PrevForcePower_f +=============== +*/ +void CG_PrevForcePower_f( void ) +{ + if ( !cg.snap ) + { + return; + } + + if (cg.snap->ps.pm_flags & PMF_FOLLOW) + { + return; + } + +// BG_CycleForce(&cg.snap->ps, -1); + if (cg.forceSelect != -1) + { + cg.snap->ps.fd.forcePowerSelected = cg.forceSelect; + } + + BG_CycleForce(&cg.snap->ps, -1); + + if (cg.snap->ps.fd.forcePowersKnown & (1 << cg.snap->ps.fd.forcePowerSelected)) + { + cg.forceSelect = cg.snap->ps.fd.forcePowerSelected; + cg.forceSelectTime = cg.time; + } +} + +void CG_NextInventory_f(void) +{ + if ( !cg.snap ) + { + return; + } + + if (cg.snap->ps.pm_flags & PMF_FOLLOW) + { + return; + } + + if (cg.itemSelect != -1) + { + cg.snap->ps.stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE); + } + BG_CycleInven(&cg.snap->ps, 1); + + if (cg.snap->ps.stats[STAT_HOLDABLE_ITEM]) + { + cg.itemSelect = bg_itemlist[cg.snap->ps.stats[STAT_HOLDABLE_ITEM]].giTag; + cg.invenSelectTime = cg.time; + } +} + +void CG_PrevInventory_f(void) +{ + if ( !cg.snap ) + { + return; + } + + if (cg.snap->ps.pm_flags & PMF_FOLLOW) + { + return; + } + + if (cg.itemSelect != -1) + { + cg.snap->ps.stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE); + } + BG_CycleInven(&cg.snap->ps, -1); + + if (cg.snap->ps.stats[STAT_HOLDABLE_ITEM]) + { + cg.itemSelect = bg_itemlist[cg.snap->ps.stats[STAT_HOLDABLE_ITEM]].giTag; + cg.invenSelectTime = cg.time; + } +} diff --git a/code/cgame/cg_marks (2).c b/code/cgame/cg_marks (2).c new file mode 100644 index 0000000..ce56b84 --- /dev/null +++ b/code/cgame/cg_marks (2).c @@ -0,0 +1,2258 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_marks.c -- wall marks + +#include "cg_local.h" + +/* +=================================================================== + +MARK POLYS + +=================================================================== +*/ + + +markPoly_t cg_activeMarkPolys; // double linked list +markPoly_t *cg_freeMarkPolys; // single linked list +markPoly_t cg_markPolys[MAX_MARK_POLYS]; +static int markTotal; + +/* +=================== +CG_InitMarkPolys + +This is called at startup and for tournement restarts +=================== +*/ +void CG_InitMarkPolys( void ) { + int i; + + memset( cg_markPolys, 0, sizeof(cg_markPolys) ); + + cg_activeMarkPolys.nextMark = &cg_activeMarkPolys; + cg_activeMarkPolys.prevMark = &cg_activeMarkPolys; + cg_freeMarkPolys = cg_markPolys; + for ( i = 0 ; i < MAX_MARK_POLYS - 1 ; i++ ) { + cg_markPolys[i].nextMark = &cg_markPolys[i+1]; + } +} + + +/* +================== +CG_FreeMarkPoly +================== +*/ +void CG_FreeMarkPoly( markPoly_t *le ) { + if ( !le->prevMark ) { + CG_Error( "CG_FreeLocalEntity: not active" ); + } + + // remove from the doubly linked active list + le->prevMark->nextMark = le->nextMark; + le->nextMark->prevMark = le->prevMark; + + // the free list is only singly linked + le->nextMark = cg_freeMarkPolys; + cg_freeMarkPolys = le; +} + +/* +=================== +CG_AllocMark + +Will allways succeed, even if it requires freeing an old active mark +=================== +*/ +markPoly_t *CG_AllocMark( void ) { + markPoly_t *le; + int time; + + if ( !cg_freeMarkPolys ) { + // no free entities, so free the one at the end of the chain + // remove the oldest active entity + time = cg_activeMarkPolys.prevMark->time; + while (cg_activeMarkPolys.prevMark && time == cg_activeMarkPolys.prevMark->time) { + CG_FreeMarkPoly( cg_activeMarkPolys.prevMark ); + } + } + + le = cg_freeMarkPolys; + cg_freeMarkPolys = cg_freeMarkPolys->nextMark; + + memset( le, 0, sizeof( *le ) ); + + // link into the active list + le->nextMark = cg_activeMarkPolys.nextMark; + le->prevMark = &cg_activeMarkPolys; + cg_activeMarkPolys.nextMark->prevMark = le; + cg_activeMarkPolys.nextMark = le; + return le; +} + + + +/* +================= +CG_ImpactMark + +origin should be a point within a unit of the plane +dir should be the plane normal + +temporary marks will not be stored or randomly oriented, but immediately +passed to the renderer. +================= +*/ +#define MAX_MARK_FRAGMENTS 128 +#define MAX_MARK_POINTS 384 + +void CG_ImpactMark( qhandle_t markShader, const vec3_t origin, const vec3_t dir, + float orientation, float red, float green, float blue, float alpha, + qboolean alphaFade, float radius, qboolean temporary ) { + vec3_t axis[3]; + float texCoordScale; + vec3_t originalPoints[4]; + byte colors[4]; + int i, j; + int numFragments; + markFragment_t markFragments[MAX_MARK_FRAGMENTS], *mf; + vec3_t markPoints[MAX_MARK_POINTS]; + vec3_t projection; + + if ( !cg_addMarks.integer ) { + return; + } + + if ( radius <= 0 ) { + CG_Error( "CG_ImpactMark called with <= 0 radius" ); + } + + //if ( markTotal >= MAX_MARK_POLYS ) { + // return; + //} + + // create the texture axis + VectorNormalize2( dir, axis[0] ); + PerpendicularVector( axis[1], axis[0] ); + RotatePointAroundVector( axis[2], axis[0], axis[1], orientation ); + CrossProduct( axis[0], axis[2], axis[1] ); + + texCoordScale = 0.5 * 1.0 / radius; + + // create the full polygon + for ( i = 0 ; i < 3 ; i++ ) { + originalPoints[0][i] = origin[i] - radius * axis[1][i] - radius * axis[2][i]; + originalPoints[1][i] = origin[i] + radius * axis[1][i] - radius * axis[2][i]; + originalPoints[2][i] = origin[i] + radius * axis[1][i] + radius * axis[2][i]; + originalPoints[3][i] = origin[i] - radius * axis[1][i] + radius * axis[2][i]; + } + + // get the fragments + VectorScale( dir, -20, projection ); + numFragments = trap_CM_MarkFragments( 4, (void *)originalPoints, + projection, MAX_MARK_POINTS, markPoints[0], + MAX_MARK_FRAGMENTS, markFragments ); + + colors[0] = red * 255; + colors[1] = green * 255; + colors[2] = blue * 255; + colors[3] = alpha * 255; + + for ( i = 0, mf = markFragments ; i < numFragments ; i++, mf++ ) { + polyVert_t *v; + polyVert_t verts[MAX_VERTS_ON_POLY]; + markPoly_t *mark; + + // we have an upper limit on the complexity of polygons + // that we store persistantly + if ( mf->numPoints > MAX_VERTS_ON_POLY ) { + mf->numPoints = MAX_VERTS_ON_POLY; + } + for ( j = 0, v = verts ; j < mf->numPoints ; j++, v++ ) { + vec3_t delta; + + VectorCopy( markPoints[mf->firstPoint + j], v->xyz ); + + VectorSubtract( v->xyz, origin, delta ); + v->st[0] = 0.5 + DotProduct( delta, axis[1] ) * texCoordScale; + v->st[1] = 0.5 + DotProduct( delta, axis[2] ) * texCoordScale; + *(int *)v->modulate = *(int *)colors; + } + + // if it is a temporary (shadow) mark, add it immediately and forget about it + if ( temporary ) { + trap_R_AddPolyToScene( markShader, mf->numPoints, verts ); + continue; + } + + // otherwise save it persistantly + mark = CG_AllocMark(); + mark->time = cg.time; + mark->alphaFade = alphaFade; + mark->markShader = markShader; + mark->poly.numVerts = mf->numPoints; + mark->color[0] = red; + mark->color[1] = green; + mark->color[2] = blue; + mark->color[3] = alpha; + memcpy( mark->verts, verts, mf->numPoints * sizeof( verts[0] ) ); + markTotal++; + } +} + + +/* +=============== +CG_AddMarks +=============== +*/ +#define MARK_TOTAL_TIME 10000 +#define MARK_FADE_TIME 1000 + +void CG_AddMarks( void ) { + int j; + markPoly_t *mp, *next; + int t; + int fade; + + if ( !cg_addMarks.integer ) { + return; + } + + mp = cg_activeMarkPolys.nextMark; + for ( ; mp != &cg_activeMarkPolys ; mp = next ) { + // grab next now, so if the local entity is freed we + // still have it + next = mp->nextMark; + + // see if it is time to completely remove it + if ( cg.time > mp->time + MARK_TOTAL_TIME ) { + CG_FreeMarkPoly( mp ); + continue; + } + + // fade out the energy bursts + if ( mp->markShader == cgs.media.energyMarkShader ) { + + fade = 450 - 450 * ( (cg.time - mp->time ) / 3000.0 ); + if ( fade < 255 ) { + if ( fade < 0 ) { + fade = 0; + } + if ( mp->verts[0].modulate[0] != 0 ) { + for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { + mp->verts[j].modulate[0] = mp->color[0] * fade; + mp->verts[j].modulate[1] = mp->color[1] * fade; + mp->verts[j].modulate[2] = mp->color[2] * fade; + } + } + } + } + + // fade all marks out with time + t = mp->time + MARK_TOTAL_TIME - cg.time; + if ( t < MARK_FADE_TIME ) { + fade = 255 * t / MARK_FADE_TIME; + if ( mp->alphaFade ) { + for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { + mp->verts[j].modulate[3] = fade; + } + } + else + { + float f = (float)t / MARK_FADE_TIME; + for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { + mp->verts[j].modulate[0] = mp->color[0] * f; + mp->verts[j].modulate[1] = mp->color[1] * f; + mp->verts[j].modulate[2] = mp->color[2] * f; + } + } + } + else + { + for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { + mp->verts[j].modulate[0] = mp->color[0]; + mp->verts[j].modulate[1] = mp->color[1]; + mp->verts[j].modulate[2] = mp->color[2]; + } + } + + trap_R_AddPolyToScene( mp->markShader, mp->poly.numVerts, mp->verts ); + } +} + +// cg_particles.c + +#define BLOODRED 2 +#define EMISIVEFADE 3 +#define GREY75 4 + +typedef struct particle_s +{ + struct particle_s *next; + + float time; + float endtime; + + vec3_t org; + vec3_t vel; + vec3_t accel; + int color; + float colorvel; + float alpha; + float alphavel; + int type; + qhandle_t pshader; + + float height; + float width; + + float endheight; + float endwidth; + + float start; + float end; + + float startfade; + qboolean rotate; + int snum; + + qboolean link; + + // Ridah + int shaderAnim; + int roll; + + int accumroll; + +} cparticle_t; + +typedef enum +{ + P_NONE, + P_WEATHER, + P_FLAT, + P_SMOKE, + P_ROTATE, + P_WEATHER_TURBULENT, + P_ANIM, // Ridah + P_BAT, + P_BLEED, + P_FLAT_SCALEUP, + P_FLAT_SCALEUP_FADE, + P_WEATHER_FLURRY, + P_SMOKE_IMPACT, + P_BUBBLE, + P_BUBBLE_TURBULENT, + P_SPRITE +} particle_type_t; + +#define MAX_SHADER_ANIMS 32 +#define MAX_SHADER_ANIM_FRAMES 64 + +static char *shaderAnimNames[MAX_SHADER_ANIMS] = { + "explode1", + NULL +}; +static qhandle_t shaderAnims[MAX_SHADER_ANIMS][MAX_SHADER_ANIM_FRAMES]; +static int shaderAnimCounts[MAX_SHADER_ANIMS] = { + 23 +}; +static float shaderAnimSTRatio[MAX_SHADER_ANIMS] = { + 1.0f +}; +static int numShaderAnims; +// done. + +#define PARTICLE_GRAVITY 40 +#define MAX_PARTICLES 1024 + +cparticle_t *active_particles, *free_particles; +cparticle_t particles[MAX_PARTICLES]; +int cl_numparticles = MAX_PARTICLES; + +qboolean initparticles = qfalse; +vec3_t pvforward, pvright, pvup; +vec3_t rforward, rright, rup; + +float oldtime; + +/* +=============== +CL_ClearParticles +=============== +*/ +void CG_ClearParticles (void) +{ + int i; + + memset( particles, 0, sizeof(particles) ); + + free_particles = &particles[0]; + active_particles = NULL; + + for (i=0 ;itype == P_WEATHER || p->type == P_WEATHER_TURBULENT || p->type == P_WEATHER_FLURRY + || p->type == P_BUBBLE || p->type == P_BUBBLE_TURBULENT) + {// create a front facing polygon + + if (p->type != P_WEATHER_FLURRY) + { + if (p->type == P_BUBBLE || p->type == P_BUBBLE_TURBULENT) + { + if (org[2] > p->end) + { + p->time = cg.time; + VectorCopy (org, p->org); // Ridah, fixes rare snow flakes that flicker on the ground + + p->org[2] = ( p->start + crandom () * 4 ); + + + if (p->type == P_BUBBLE_TURBULENT) + { + p->vel[0] = crandom() * 4; + p->vel[1] = crandom() * 4; + } + + } + } + else + { + if (org[2] < p->end) + { + p->time = cg.time; + VectorCopy (org, p->org); // Ridah, fixes rare snow flakes that flicker on the ground + + while (p->org[2] < p->end) + { + p->org[2] += (p->start - p->end); + } + + + if (p->type == P_WEATHER_TURBULENT) + { + p->vel[0] = crandom() * 16; + p->vel[1] = crandom() * 16; + } + + } + } + + + // Rafael snow pvs check + if (!p->link) + return; + + p->alpha = 1; + } + + // Ridah, had to do this or MAX_POLYS is being exceeded in village1.bsp + if (Distance( cg.snap->ps.origin, org ) > 1024) { + return; + } + // done. + + if (p->type == P_BUBBLE || p->type == P_BUBBLE_TURBULENT) + { + VectorMA (org, -p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + VectorCopy (point, verts[0].xyz); + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255 * p->alpha; + + VectorMA (org, -p->height, pvup, point); + VectorMA (point, p->width, pvright, point); + VectorCopy (point, verts[1].xyz); + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255 * p->alpha; + + VectorMA (org, p->height, pvup, point); + VectorMA (point, p->width, pvright, point); + VectorCopy (point, verts[2].xyz); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255 * p->alpha; + + VectorMA (org, p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + VectorCopy (point, verts[3].xyz); + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255 * p->alpha; + } + else + { + VectorMA (org, -p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + VectorCopy( point, TRIverts[0].xyz ); + TRIverts[0].st[0] = 1; + TRIverts[0].st[1] = 0; + TRIverts[0].modulate[0] = 255; + TRIverts[0].modulate[1] = 255; + TRIverts[0].modulate[2] = 255; + TRIverts[0].modulate[3] = 255 * p->alpha; + + VectorMA (org, p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + VectorCopy (point, TRIverts[1].xyz); + TRIverts[1].st[0] = 0; + TRIverts[1].st[1] = 0; + TRIverts[1].modulate[0] = 255; + TRIverts[1].modulate[1] = 255; + TRIverts[1].modulate[2] = 255; + TRIverts[1].modulate[3] = 255 * p->alpha; + + VectorMA (org, p->height, pvup, point); + VectorMA (point, p->width, pvright, point); + VectorCopy (point, TRIverts[2].xyz); + TRIverts[2].st[0] = 0; + TRIverts[2].st[1] = 1; + TRIverts[2].modulate[0] = 255; + TRIverts[2].modulate[1] = 255; + TRIverts[2].modulate[2] = 255; + TRIverts[2].modulate[3] = 255 * p->alpha; + } + + } + else if (p->type == P_SPRITE) + { + vec3_t rr, ru; + vec3_t rotate_ang; + + VectorSet (color, 1.0, 1.0, 0.5); + time = cg.time - p->time; + time2 = p->endtime - p->time; + ratio = time / time2; + + width = p->width + ( ratio * ( p->endwidth - p->width) ); + height = p->height + ( ratio * ( p->endheight - p->height) ); + + if (p->roll) { + vectoangles( cg.refdef.viewaxis[0], rotate_ang ); + rotate_ang[ROLL] += p->roll; + AngleVectors ( rotate_ang, NULL, rr, ru); + } + + if (p->roll) { + VectorMA (org, -height, ru, point); + VectorMA (point, -width, rr, point); + } else { + VectorMA (org, -height, pvup, point); + VectorMA (point, -width, pvright, point); + } + VectorCopy (point, verts[0].xyz); + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, 2*height, ru, point); + } else { + VectorMA (point, 2*height, pvup, point); + } + VectorCopy (point, verts[1].xyz); + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, 2*width, rr, point); + } else { + VectorMA (point, 2*width, pvright, point); + } + VectorCopy (point, verts[2].xyz); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, -2*height, ru, point); + } else { + VectorMA (point, -2*height, pvup, point); + } + VectorCopy (point, verts[3].xyz); + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255; + } + else if (p->type == P_SMOKE || p->type == P_SMOKE_IMPACT) + {// create a front rotating facing polygon + + if ( p->type == P_SMOKE_IMPACT && Distance( cg.snap->ps.origin, org ) > 1024) { + return; + } + + if (p->color == BLOODRED) + VectorSet (color, 0.22f, 0.0f, 0.0f); + else if (p->color == GREY75) + { + float len; + float greyit; + float val; + len = Distance (cg.snap->ps.origin, org); + if (!len) + len = 1; + + val = 4096/len; + greyit = 0.25 * val; + if (greyit > 0.5) + greyit = 0.5; + + VectorSet (color, greyit, greyit, greyit); + } + else + VectorSet (color, 1.0, 1.0, 1.0); + + time = cg.time - p->time; + time2 = p->endtime - p->time; + ratio = time / time2; + + if (cg.time > p->startfade) + { + invratio = 1 - ( (cg.time - p->startfade) / (p->endtime - p->startfade) ); + + if (p->color == EMISIVEFADE) + { + float fval; + fval = (invratio * invratio); + if (fval < 0) + fval = 0; + VectorSet (color, fval , fval , fval ); + } + invratio *= p->alpha; + } + else + invratio = 1 * p->alpha; + + if (invratio > 1) + invratio = 1; + + width = p->width + ( ratio * ( p->endwidth - p->width) ); + height = p->height + ( ratio * ( p->endheight - p->height) ); + + if (p->type != P_SMOKE_IMPACT) + { + vec3_t temp; + + vectoangles (rforward, temp); + p->accumroll += p->roll; + temp[ROLL] += p->accumroll * 0.1; + AngleVectors ( temp, NULL, rright2, rup2); + } + else + { + VectorCopy (rright, rright2); + VectorCopy (rup, rup2); + } + + if (p->rotate) + { + VectorMA (org, -height, rup2, point); + VectorMA (point, -width, rright2, point); + } + else + { + VectorMA (org, -p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + } + VectorCopy (point, verts[0].xyz); + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255 * color[0]; + verts[0].modulate[1] = 255 * color[1]; + verts[0].modulate[2] = 255 * color[2]; + verts[0].modulate[3] = 255 * invratio; + + if (p->rotate) + { + VectorMA (org, -height, rup2, point); + VectorMA (point, width, rright2, point); + } + else + { + VectorMA (org, -p->height, pvup, point); + VectorMA (point, p->width, pvright, point); + } + VectorCopy (point, verts[1].xyz); + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255 * color[0]; + verts[1].modulate[1] = 255 * color[1]; + verts[1].modulate[2] = 255 * color[2]; + verts[1].modulate[3] = 255 * invratio; + + if (p->rotate) + { + VectorMA (org, height, rup2, point); + VectorMA (point, width, rright2, point); + } + else + { + VectorMA (org, p->height, pvup, point); + VectorMA (point, p->width, pvright, point); + } + VectorCopy (point, verts[2].xyz); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255 * color[0]; + verts[2].modulate[1] = 255 * color[1]; + verts[2].modulate[2] = 255 * color[2]; + verts[2].modulate[3] = 255 * invratio; + + if (p->rotate) + { + VectorMA (org, height, rup2, point); + VectorMA (point, -width, rright2, point); + } + else + { + VectorMA (org, p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + } + VectorCopy (point, verts[3].xyz); + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255 * color[0]; + verts[3].modulate[1] = 255 * color[1]; + verts[3].modulate[2] = 255 * color[2]; + verts[3].modulate[3] = 255 * invratio; + + } + else if (p->type == P_BLEED) + { + vec3_t rr, ru; + vec3_t rotate_ang; + float alpha; + + alpha = p->alpha; + + if (p->roll) + { + vectoangles( cg.refdef.viewaxis[0], rotate_ang ); + rotate_ang[ROLL] += p->roll; + AngleVectors ( rotate_ang, NULL, rr, ru); + } + else + { + VectorCopy (pvup, ru); + VectorCopy (pvright, rr); + } + + VectorMA (org, -p->height, ru, point); + VectorMA (point, -p->width, rr, point); + VectorCopy (point, verts[0].xyz); + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 111; + verts[0].modulate[1] = 19; + verts[0].modulate[2] = 9; + verts[0].modulate[3] = 255 * alpha; + + VectorMA (org, -p->height, ru, point); + VectorMA (point, p->width, rr, point); + VectorCopy (point, verts[1].xyz); + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 111; + verts[1].modulate[1] = 19; + verts[1].modulate[2] = 9; + verts[1].modulate[3] = 255 * alpha; + + VectorMA (org, p->height, ru, point); + VectorMA (point, p->width, rr, point); + VectorCopy (point, verts[2].xyz); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 111; + verts[2].modulate[1] = 19; + verts[2].modulate[2] = 9; + verts[2].modulate[3] = 255 * alpha; + + VectorMA (org, p->height, ru, point); + VectorMA (point, -p->width, rr, point); + VectorCopy (point, verts[3].xyz); + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 111; + verts[3].modulate[1] = 19; + verts[3].modulate[2] = 9; + verts[3].modulate[3] = 255 * alpha; + + } + else if (p->type == P_FLAT_SCALEUP) + { + float width, height; + float sinR, cosR; + + if (p->color == BLOODRED) + VectorSet (color, 1, 1, 1); + else + VectorSet (color, 0.5, 0.5, 0.5); + + time = cg.time - p->time; + time2 = p->endtime - p->time; + ratio = time / time2; + + width = p->width + ( ratio * ( p->endwidth - p->width) ); + height = p->height + ( ratio * ( p->endheight - p->height) ); + + if (width > p->endwidth) + width = p->endwidth; + + if (height > p->endheight) + height = p->endheight; + + sinR = height * sin(DEG2RAD(p->roll)) * sqrt(2); + cosR = width * cos(DEG2RAD(p->roll)) * sqrt(2); + + VectorCopy (org, verts[0].xyz); + verts[0].xyz[0] -= sinR; + verts[0].xyz[1] -= cosR; + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255 * color[0]; + verts[0].modulate[1] = 255 * color[1]; + verts[0].modulate[2] = 255 * color[2]; + verts[0].modulate[3] = 255; + + VectorCopy (org, verts[1].xyz); + verts[1].xyz[0] -= cosR; + verts[1].xyz[1] += sinR; + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255 * color[0]; + verts[1].modulate[1] = 255 * color[1]; + verts[1].modulate[2] = 255 * color[2]; + verts[1].modulate[3] = 255; + + VectorCopy (org, verts[2].xyz); + verts[2].xyz[0] += sinR; + verts[2].xyz[1] += cosR; + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255 * color[0]; + verts[2].modulate[1] = 255 * color[1]; + verts[2].modulate[2] = 255 * color[2]; + verts[2].modulate[3] = 255; + + VectorCopy (org, verts[3].xyz); + verts[3].xyz[0] += cosR; + verts[3].xyz[1] -= sinR; + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255 * color[0]; + verts[3].modulate[1] = 255 * color[1]; + verts[3].modulate[2] = 255 * color[2]; + verts[3].modulate[3] = 255; + } + else if (p->type == P_FLAT) + { + + VectorCopy (org, verts[0].xyz); + verts[0].xyz[0] -= p->height; + verts[0].xyz[1] -= p->width; + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255; + + VectorCopy (org, verts[1].xyz); + verts[1].xyz[0] -= p->height; + verts[1].xyz[1] += p->width; + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255; + + VectorCopy (org, verts[2].xyz); + verts[2].xyz[0] += p->height; + verts[2].xyz[1] += p->width; + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255; + + VectorCopy (org, verts[3].xyz); + verts[3].xyz[0] += p->height; + verts[3].xyz[1] -= p->width; + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255; + + } + // Ridah + else if (p->type == P_ANIM) { + vec3_t rr, ru; + vec3_t rotate_ang; + int i, j; + + time = cg.time - p->time; + time2 = p->endtime - p->time; + ratio = time / time2; + if (ratio >= 1.0f) { + ratio = 0.9999f; + } + + width = p->width + ( ratio * ( p->endwidth - p->width) ); + height = p->height + ( ratio * ( p->endheight - p->height) ); + + // if we are "inside" this sprite, don't draw + if (Distance( cg.snap->ps.origin, org ) < width/1.5) { + return; + } + + i = p->shaderAnim; + j = (int)floor(ratio * shaderAnimCounts[p->shaderAnim]); + p->pshader = shaderAnims[i][j]; + + if (p->roll) { + vectoangles( cg.refdef.viewaxis[0], rotate_ang ); + rotate_ang[ROLL] += p->roll; + AngleVectors ( rotate_ang, NULL, rr, ru); + } + + if (p->roll) { + VectorMA (org, -height, ru, point); + VectorMA (point, -width, rr, point); + } else { + VectorMA (org, -height, pvup, point); + VectorMA (point, -width, pvright, point); + } + VectorCopy (point, verts[0].xyz); + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, 2*height, ru, point); + } else { + VectorMA (point, 2*height, pvup, point); + } + VectorCopy (point, verts[1].xyz); + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, 2*width, rr, point); + } else { + VectorMA (point, 2*width, pvright, point); + } + VectorCopy (point, verts[2].xyz); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, -2*height, ru, point); + } else { + VectorMA (point, -2*height, pvup, point); + } + VectorCopy (point, verts[3].xyz); + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255; + } + // done. + + if (!p->pshader) { +// (SA) temp commented out for DM +// CG_Printf ("CG_AddParticleToScene type %d p->pshader == ZERO\n", p->type); + return; + } + + if (p->type == P_WEATHER || p->type == P_WEATHER_TURBULENT || p->type == P_WEATHER_FLURRY) + trap_R_AddPolyToScene( p->pshader, 3, TRIverts ); + else + trap_R_AddPolyToScene( p->pshader, 4, verts ); + +} + +// Ridah, made this static so it doesn't interfere with other files +static float roll = 0.0; + +/* +=============== +CG_AddParticles +=============== +*/ +void CG_AddParticles (void) +{ + cparticle_t *p, *next; + float alpha; + float time, time2; + vec3_t org; + int color; + cparticle_t *active, *tail; + int type; + vec3_t rotate_ang; + + if (!initparticles) + CG_ClearParticles (); + + VectorCopy( cg.refdef.viewaxis[0], pvforward ); + VectorCopy( cg.refdef.viewaxis[1], pvright ); + VectorCopy( cg.refdef.viewaxis[2], pvup ); + + vectoangles( cg.refdef.viewaxis[0], rotate_ang ); + roll += ((cg.time - oldtime) * 0.1) ; + rotate_ang[ROLL] += (roll*0.9); + AngleVectors ( rotate_ang, rforward, rright, rup); + + oldtime = cg.time; + + active = NULL; + tail = NULL; + + for (p=active_particles ; p ; p=next) + { + + next = p->next; + + time = (cg.time - p->time)*0.001; + + alpha = p->alpha + time*p->alphavel; + if (alpha <= 0) + { // faded out + p->next = free_particles; + free_particles = p; + p->type = 0; + p->color = 0; + p->alpha = 0; + continue; + } + + if (p->type == P_SMOKE || p->type == P_ANIM || p->type == P_BLEED || p->type == P_SMOKE_IMPACT) + { + if (cg.time > p->endtime) + { + p->next = free_particles; + free_particles = p; + p->type = 0; + p->color = 0; + p->alpha = 0; + + continue; + } + + } + + if (p->type == P_WEATHER_FLURRY) + { + if (cg.time > p->endtime) + { + p->next = free_particles; + free_particles = p; + p->type = 0; + p->color = 0; + p->alpha = 0; + + continue; + } + } + + + if (p->type == P_FLAT_SCALEUP_FADE) + { + if (cg.time > p->endtime) + { + p->next = free_particles; + free_particles = p; + p->type = 0; + p->color = 0; + p->alpha = 0; + continue; + } + + } + + if ((p->type == P_BAT || p->type == P_SPRITE) && p->endtime < 0) { + // temporary sprite + CG_AddParticleToScene (p, p->org, alpha); + p->next = free_particles; + free_particles = p; + p->type = 0; + p->color = 0; + p->alpha = 0; + continue; + } + + p->next = NULL; + if (!tail) + active = tail = p; + else + { + tail->next = p; + tail = p; + } + + if (alpha > 1.0) + alpha = 1; + + color = p->color; + + time2 = time*time; + + org[0] = p->org[0] + p->vel[0]*time + p->accel[0]*time2; + org[1] = p->org[1] + p->vel[1]*time + p->accel[1]*time2; + org[2] = p->org[2] + p->vel[2]*time + p->accel[2]*time2; + + type = p->type; + + CG_AddParticleToScene (p, org, alpha); + } + + active_particles = active; +} + +/* +====================== +CG_AddParticles +====================== +*/ +void CG_ParticleSnowFlurry (qhandle_t pshader, centity_t *cent) +{ + cparticle_t *p; + qboolean turb = qtrue; + + if (!pshader) + CG_Printf ("CG_ParticleSnowFlurry pshader == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->color = 0; + p->alpha = 0.90f; + p->alphavel = 0; + + p->start = cent->currentState.origin2[0]; + p->end = cent->currentState.origin2[1]; + + p->endtime = cg.time + cent->currentState.time; + p->startfade = cg.time + cent->currentState.time2; + + p->pshader = pshader; + + if (rand()%100 > 90) + { + p->height = 32; + p->width = 32; + p->alpha = 0.10f; + } + else + { + p->height = 1; + p->width = 1; + } + + p->vel[2] = -20; + + p->type = P_WEATHER_FLURRY; + + if (turb) + p->vel[2] = -10; + + VectorCopy(cent->currentState.origin, p->org); + + p->org[0] = p->org[0]; + p->org[1] = p->org[1]; + p->org[2] = p->org[2]; + + p->vel[0] = p->vel[1] = 0; + + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + p->vel[0] += cent->currentState.angles[0] * 32 + (crandom() * 16); + p->vel[1] += cent->currentState.angles[1] * 32 + (crandom() * 16); + p->vel[2] += cent->currentState.angles[2]; + + if (turb) + { + p->accel[0] = crandom () * 16; + p->accel[1] = crandom () * 16; + } + +} + +void CG_ParticleSnow (qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb, float range, int snum) +{ + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_ParticleSnow pshader == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->color = 0; + p->alpha = 0.40f; + p->alphavel = 0; + p->start = origin[2]; + p->end = origin2[2]; + p->pshader = pshader; + p->height = 1; + p->width = 1; + + p->vel[2] = -50; + + if (turb) + { + p->type = P_WEATHER_TURBULENT; + p->vel[2] = -50 * 1.3; + } + else + { + p->type = P_WEATHER; + } + + VectorCopy(origin, p->org); + + p->org[0] = p->org[0] + ( crandom() * range); + p->org[1] = p->org[1] + ( crandom() * range); + p->org[2] = p->org[2] + ( crandom() * (p->start - p->end)); + + p->vel[0] = p->vel[1] = 0; + + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + if (turb) + { + p->vel[0] = crandom() * 16; + p->vel[1] = crandom() * 16; + } + + // Rafael snow pvs check + p->snum = snum; + p->link = qtrue; + +} + +void CG_ParticleBubble (qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb, float range, int snum) +{ + cparticle_t *p; + float randsize; + + if (!pshader) + CG_Printf ("CG_ParticleSnow pshader == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->color = 0; + p->alpha = 0.40f; + p->alphavel = 0; + p->start = origin[2]; + p->end = origin2[2]; + p->pshader = pshader; + + randsize = 1 + (crandom() * 0.5); + + p->height = randsize; + p->width = randsize; + + p->vel[2] = 50 + ( crandom() * 10 ); + + if (turb) + { + p->type = P_BUBBLE_TURBULENT; + p->vel[2] = 50 * 1.3; + } + else + { + p->type = P_BUBBLE; + } + + VectorCopy(origin, p->org); + + p->org[0] = p->org[0] + ( crandom() * range); + p->org[1] = p->org[1] + ( crandom() * range); + p->org[2] = p->org[2] + ( crandom() * (p->start - p->end)); + + p->vel[0] = p->vel[1] = 0; + + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + if (turb) + { + p->vel[0] = crandom() * 4; + p->vel[1] = crandom() * 4; + } + + // Rafael snow pvs check + p->snum = snum; + p->link = qtrue; + +} + +void CG_ParticleSmoke (qhandle_t pshader, centity_t *cent) +{ + + // using cent->density = enttime + // cent->frame = startfade + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_ParticleSmoke == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + + p->endtime = cg.time + cent->currentState.time; + p->startfade = cg.time + cent->currentState.time2; + + p->color = 0; + p->alpha = 1.0; + p->alphavel = 0; + p->start = cent->currentState.origin[2]; + p->end = cent->currentState.origin2[2]; + p->pshader = pshader; + p->rotate = qfalse; + p->height = 8; + p->width = 8; + p->endheight = 32; + p->endwidth = 32; + p->type = P_SMOKE; + + VectorCopy(cent->currentState.origin, p->org); + + p->vel[0] = p->vel[1] = 0; + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + p->vel[2] = 5; + + if (cent->currentState.frame == 1)// reverse gravity + p->vel[2] *= -1; + + p->roll = 8 + (crandom() * 4); +} + + +void CG_ParticleBulletDebris (vec3_t org, vec3_t vel, int duration) +{ + + cparticle_t *p; + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + + p->endtime = cg.time + duration; + p->startfade = cg.time + duration/2; + + p->color = EMISIVEFADE; + p->alpha = 1.0; + p->alphavel = 0; + + p->height = 0.5; + p->width = 0.5; + p->endheight = 0.5; + p->endwidth = 0.5; + + p->pshader = cgs.media.tracerShader; + + p->type = P_SMOKE; + + VectorCopy(org, p->org); + + p->vel[0] = vel[0]; + p->vel[1] = vel[1]; + p->vel[2] = vel[2]; + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + p->accel[2] = -60; + p->vel[2] += -20; + +} + +/* +====================== +CG_ParticleExplosion +====================== +*/ + +void CG_ParticleExplosion (char *animStr, vec3_t origin, vec3_t vel, int duration, int sizeStart, int sizeEnd) +{ + cparticle_t *p; + int anim; + + if (animStr < (char *)10) + CG_Error( "CG_ParticleExplosion: animStr is probably an index rather than a string" ); + + // find the animation string + for (anim=0; shaderAnimNames[anim]; anim++) { + if (!Q_stricmp( animStr, shaderAnimNames[anim] )) + break; + } + if (!shaderAnimNames[anim]) { + CG_Error("CG_ParticleExplosion: unknown animation string: %s\n", animStr); + return; + } + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->alpha = 0.5; + p->alphavel = 0; + + if (duration < 0) { + duration *= -1; + p->roll = 0; + } else { + p->roll = crandom()*179; + } + + p->shaderAnim = anim; + + p->width = sizeStart; + p->height = sizeStart*shaderAnimSTRatio[anim]; // for sprites that are stretch in either direction + + p->endheight = sizeEnd; + p->endwidth = sizeEnd*shaderAnimSTRatio[anim]; + + p->endtime = cg.time + duration; + + p->type = P_ANIM; + + VectorCopy( origin, p->org ); + VectorCopy( vel, p->vel ); + VectorClear( p->accel ); + +} + +// Rafael Shrapnel +void CG_AddParticleShrapnel (localEntity_t *le) +{ + return; +} +// done. + +int CG_NewParticleArea (int num) +{ + // const char *str; + char *str; + char *token; + int type; + vec3_t origin, origin2; + int i; + float range = 0; + int turb; + int numparticles; + int snum; + + str = (char *) CG_ConfigString (num); + if (!str[0]) + return (0); + + // returns type 128 64 or 32 + token = COM_Parse ((const char **)&str); + type = atoi (token); + + if (type == 1) + range = 128; + else if (type == 2) + range = 64; + else if (type == 3) + range = 32; + else if (type == 0) + range = 256; + else if (type == 4) + range = 8; + else if (type == 5) + range = 16; + else if (type == 6) + range = 32; + else if (type == 7) + range = 64; + + + for (i=0; i<3; i++) + { + token = COM_Parse ((const char **)&str); + origin[i] = atof (token); + } + + for (i=0; i<3; i++) + { + token = COM_Parse ((const char **)&str); + origin2[i] = atof (token); + } + + token = COM_Parse ((const char **)&str); + numparticles = atoi (token); + + token = COM_Parse ((const char **)&str); + turb = atoi (token); + + token = COM_Parse ((const char **)&str); + snum = atoi (token); + + for (i=0; i= 4) + CG_ParticleBubble (cgs.media.waterBubbleShader, origin, origin2, turb, range, snum); + else + CG_ParticleSnow (cgs.media.waterBubbleShader, origin, origin2, turb, range, snum); + } + + return (1); +} + +void CG_SnowLink (centity_t *cent, qboolean particleOn) +{ + cparticle_t *p, *next; + int id; + + id = cent->currentState.frame; + + for (p=active_particles ; p ; p=next) + { + next = p->next; + + if (p->type == P_WEATHER || p->type == P_WEATHER_TURBULENT) + { + if (p->snum == id) + { + if (particleOn) + p->link = qtrue; + else + p->link = qfalse; + } + } + + } +} + +void CG_ParticleImpactSmokePuff (qhandle_t pshader, vec3_t origin) +{ + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_ParticleImpactSmokePuff pshader == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->alpha = 0.25; + p->alphavel = 0; + p->roll = crandom()*179; + + p->pshader = pshader; + + p->endtime = cg.time + 1000; + p->startfade = cg.time + 100; + + p->width = rand()%4 + 8; + p->height = rand()%4 + 8; + + p->endheight = p->height *2; + p->endwidth = p->width * 2; + + p->endtime = cg.time + 500; + + p->type = P_SMOKE_IMPACT; + + VectorCopy( origin, p->org ); + VectorSet(p->vel, 0, 0, 20); + VectorSet(p->accel, 0, 0, 20); + + p->rotate = qtrue; +} + +void CG_Particle_Bleed (qhandle_t pshader, vec3_t start, vec3_t dir, int fleshEntityNum, int duration) +{ + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_Particle_Bleed pshader == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->alpha = 1.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = pshader; + + p->endtime = cg.time + duration; + + if (fleshEntityNum) + p->startfade = cg.time; + else + p->startfade = cg.time + 100; + + p->width = 4; + p->height = 4; + + p->endheight = 4+rand()%3; + p->endwidth = p->endheight; + + p->type = P_SMOKE; + + VectorCopy( start, p->org ); + p->vel[0] = 0; + p->vel[1] = 0; + p->vel[2] = -20; + VectorClear( p->accel ); + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->color = BLOODRED; + p->alpha = 0.75; + +} + +void CG_Particle_OilParticle (qhandle_t pshader, centity_t *cent) +{ + cparticle_t *p; + + int time; + int time2; + float ratio; + + float duration = 1500; + + time = cg.time; + time2 = cg.time + cent->currentState.time; + + ratio =(float)1 - ((float)time / (float)time2); + + if (!pshader) + CG_Printf ("CG_Particle_OilParticle == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->alpha = 1.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = pshader; + + p->endtime = cg.time + duration; + + p->startfade = p->endtime; + + p->width = 1; + p->height = 3; + + p->endheight = 3; + p->endwidth = 1; + + p->type = P_SMOKE; + + VectorCopy(cent->currentState.origin, p->org ); + + p->vel[0] = (cent->currentState.origin2[0] * (16 * ratio)); + p->vel[1] = (cent->currentState.origin2[1] * (16 * ratio)); + p->vel[2] = (cent->currentState.origin2[2]); + + p->snum = 1.0f; + + VectorClear( p->accel ); + + p->accel[2] = -20; + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->alpha = 0.75; + +} + + +void CG_Particle_OilSlick (qhandle_t pshader, centity_t *cent) +{ + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_Particle_OilSlick == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + + if (cent->currentState.angles2[2]) + p->endtime = cg.time + cent->currentState.angles2[2]; + else + p->endtime = cg.time + 60000; + + p->startfade = p->endtime; + + p->alpha = 1.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = pshader; + + if (cent->currentState.angles2[0] || cent->currentState.angles2[1]) + { + p->width = cent->currentState.angles2[0]; + p->height = cent->currentState.angles2[0]; + + p->endheight = cent->currentState.angles2[1]; + p->endwidth = cent->currentState.angles2[1]; + } + else + { + p->width = 8; + p->height = 8; + + p->endheight = 16; + p->endwidth = 16; + } + + p->type = P_FLAT_SCALEUP; + + p->snum = 1.0; + + VectorCopy(cent->currentState.origin, p->org ); + + p->org[2]+= 0.55 + (crandom() * 0.5); + + p->vel[0] = 0; + p->vel[1] = 0; + p->vel[2] = 0; + VectorClear( p->accel ); + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->alpha = 0.75; + +} + +void CG_OilSlickRemove (centity_t *cent) +{ + cparticle_t *p, *next; + int id; + + id = 1.0f; + + if (!id) + CG_Printf ("CG_OilSlickRevove NULL id\n"); + + for (p=active_particles ; p ; p=next) + { + next = p->next; + + if (p->type == P_FLAT_SCALEUP) + { + if (p->snum == id) + { + p->endtime = cg.time + 100; + p->startfade = p->endtime; + p->type = P_FLAT_SCALEUP_FADE; + + } + } + + } +} + +qboolean ValidBloodPool (vec3_t start) +{ +#define EXTRUDE_DIST 0.5 + + vec3_t angles; + vec3_t right, up; + vec3_t this_pos, x_pos, center_pos, end_pos; + float x, y; + float fwidth, fheight; + trace_t trace; + vec3_t normal; + + fwidth = 16; + fheight = 16; + + VectorSet (normal, 0, 0, 1); + + vectoangles (normal, angles); + AngleVectors (angles, NULL, right, up); + + VectorMA (start, EXTRUDE_DIST, normal, center_pos); + + for (x= -fwidth/2; xendpos, start); + legit = ValidBloodPool (start); + + if (!legit) + return; + + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + + p->endtime = cg.time + 3000; + p->startfade = p->endtime; + + p->alpha = 1.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = pshader; + + rndSize = 0.4 + random()*0.6; + + p->width = 8*rndSize; + p->height = 8*rndSize; + + p->endheight = 16*rndSize; + p->endwidth = 16*rndSize; + + p->type = P_FLAT_SCALEUP; + + VectorCopy(start, p->org ); + + p->vel[0] = 0; + p->vel[1] = 0; + p->vel[2] = 0; + VectorClear( p->accel ); + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->alpha = 0.75; + + p->color = BLOODRED; +} + +#define NORMALSIZE 16 +#define LARGESIZE 32 + +void CG_ParticleBloodCloud (centity_t *cent, vec3_t origin, vec3_t dir) +{ + float length; + float dist; + float crittersize; + vec3_t angles, forward; + vec3_t point; + cparticle_t *p; + int i; + + dist = 0; + + length = VectorLength (dir); + vectoangles (dir, angles); + AngleVectors (angles, forward, NULL, NULL); + + crittersize = LARGESIZE; + + if (length) + dist = length / crittersize; + + if (dist < 1) + dist = 1; + + VectorCopy (origin, point); + + for (i=0; inext; + p->next = active_particles; + active_particles = p; + + p->time = cg.time; + p->alpha = 1.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = cgs.media.smokePuffShader; + + p->endtime = cg.time + 350 + (crandom() * 100); + + p->startfade = cg.time; + + p->width = LARGESIZE; + p->height = LARGESIZE; + p->endheight = LARGESIZE; + p->endwidth = LARGESIZE; + + p->type = P_SMOKE; + + VectorCopy( origin, p->org ); + + p->vel[0] = 0; + p->vel[1] = 0; + p->vel[2] = -1; + + VectorClear( p->accel ); + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->color = BLOODRED; + + p->alpha = 0.75; + + } + + +} + +void CG_ParticleSparks (vec3_t org, vec3_t vel, int duration, float x, float y, float speed) +{ + cparticle_t *p; + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + + p->endtime = cg.time + duration; + p->startfade = cg.time + duration/2; + + p->color = EMISIVEFADE; + p->alpha = 0.4f; + p->alphavel = 0; + + p->height = 0.5; + p->width = 0.5; + p->endheight = 0.5; + p->endwidth = 0.5; + + p->pshader = cgs.media.tracerShader; + + p->type = P_SMOKE; + + VectorCopy(org, p->org); + + p->org[0] += (crandom() * x); + p->org[1] += (crandom() * y); + + p->vel[0] = vel[0]; + p->vel[1] = vel[1]; + p->vel[2] = vel[2]; + + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + p->vel[0] += (crandom() * 4); + p->vel[1] += (crandom() * 4); + p->vel[2] += (20 + (crandom() * 10)) * speed; + + p->accel[0] = crandom () * 4; + p->accel[1] = crandom () * 4; + +} + +void CG_ParticleDust (centity_t *cent, vec3_t origin, vec3_t dir) +{ + float length; + float dist; + float crittersize; + vec3_t angles, forward; + vec3_t point; + cparticle_t *p; + int i; + + dist = 0; + + VectorNegate (dir, dir); + length = VectorLength (dir); + vectoangles (dir, angles); + AngleVectors (angles, forward, NULL, NULL); + + crittersize = LARGESIZE; + + if (length) + dist = length / crittersize; + + if (dist < 1) + dist = 1; + + VectorCopy (origin, point); + + for (i=0; inext; + p->next = active_particles; + active_particles = p; + + p->time = cg.time; + p->alpha = 5.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = cgs.media.smokePuffShader; + + // RF, stay around for long enough to expand and dissipate naturally + if (length) + p->endtime = cg.time + 4500 + (crandom() * 3500); + else + p->endtime = cg.time + 750 + (crandom() * 500); + + p->startfade = cg.time; + + p->width = LARGESIZE; + p->height = LARGESIZE; + + // RF, expand while falling + p->endheight = LARGESIZE*3.0; + p->endwidth = LARGESIZE*3.0; + + if (!length) + { + p->width *= 0.2f; + p->height *= 0.2f; + + p->endheight = NORMALSIZE; + p->endwidth = NORMALSIZE; + } + + p->type = P_SMOKE; + + VectorCopy( point, p->org ); + + p->vel[0] = crandom()*6; + p->vel[1] = crandom()*6; + p->vel[2] = random()*20; + + // RF, add some gravity/randomness + p->accel[0] = crandom()*3; + p->accel[1] = crandom()*3; + p->accel[2] = -PARTICLE_GRAVITY*0.4; + + VectorClear( p->accel ); + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->alpha = 0.75; + + } + + +} + +void CG_ParticleMisc (qhandle_t pshader, vec3_t origin, int size, int duration, float alpha) +{ + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_ParticleImpactSmokePuff pshader == ZERO!\n"); + + if (!free_particles) + return; + + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->alpha = 1.0; + p->alphavel = 0; + p->roll = rand()%179; + + p->pshader = pshader; + + if (duration > 0) + p->endtime = cg.time + duration; + else + p->endtime = duration; + + p->startfade = cg.time; + + p->width = size; + p->height = size; + + p->endheight = size; + p->endwidth = size; + + p->type = P_SPRITE; + + VectorCopy( origin, p->org ); + + p->rotate = qfalse; +} + diff --git a/code/cgame/cg_marks.c b/code/cgame/cg_marks.c new file mode 100644 index 0000000..ce56b84 --- /dev/null +++ b/code/cgame/cg_marks.c @@ -0,0 +1,2258 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_marks.c -- wall marks + +#include "cg_local.h" + +/* +=================================================================== + +MARK POLYS + +=================================================================== +*/ + + +markPoly_t cg_activeMarkPolys; // double linked list +markPoly_t *cg_freeMarkPolys; // single linked list +markPoly_t cg_markPolys[MAX_MARK_POLYS]; +static int markTotal; + +/* +=================== +CG_InitMarkPolys + +This is called at startup and for tournement restarts +=================== +*/ +void CG_InitMarkPolys( void ) { + int i; + + memset( cg_markPolys, 0, sizeof(cg_markPolys) ); + + cg_activeMarkPolys.nextMark = &cg_activeMarkPolys; + cg_activeMarkPolys.prevMark = &cg_activeMarkPolys; + cg_freeMarkPolys = cg_markPolys; + for ( i = 0 ; i < MAX_MARK_POLYS - 1 ; i++ ) { + cg_markPolys[i].nextMark = &cg_markPolys[i+1]; + } +} + + +/* +================== +CG_FreeMarkPoly +================== +*/ +void CG_FreeMarkPoly( markPoly_t *le ) { + if ( !le->prevMark ) { + CG_Error( "CG_FreeLocalEntity: not active" ); + } + + // remove from the doubly linked active list + le->prevMark->nextMark = le->nextMark; + le->nextMark->prevMark = le->prevMark; + + // the free list is only singly linked + le->nextMark = cg_freeMarkPolys; + cg_freeMarkPolys = le; +} + +/* +=================== +CG_AllocMark + +Will allways succeed, even if it requires freeing an old active mark +=================== +*/ +markPoly_t *CG_AllocMark( void ) { + markPoly_t *le; + int time; + + if ( !cg_freeMarkPolys ) { + // no free entities, so free the one at the end of the chain + // remove the oldest active entity + time = cg_activeMarkPolys.prevMark->time; + while (cg_activeMarkPolys.prevMark && time == cg_activeMarkPolys.prevMark->time) { + CG_FreeMarkPoly( cg_activeMarkPolys.prevMark ); + } + } + + le = cg_freeMarkPolys; + cg_freeMarkPolys = cg_freeMarkPolys->nextMark; + + memset( le, 0, sizeof( *le ) ); + + // link into the active list + le->nextMark = cg_activeMarkPolys.nextMark; + le->prevMark = &cg_activeMarkPolys; + cg_activeMarkPolys.nextMark->prevMark = le; + cg_activeMarkPolys.nextMark = le; + return le; +} + + + +/* +================= +CG_ImpactMark + +origin should be a point within a unit of the plane +dir should be the plane normal + +temporary marks will not be stored or randomly oriented, but immediately +passed to the renderer. +================= +*/ +#define MAX_MARK_FRAGMENTS 128 +#define MAX_MARK_POINTS 384 + +void CG_ImpactMark( qhandle_t markShader, const vec3_t origin, const vec3_t dir, + float orientation, float red, float green, float blue, float alpha, + qboolean alphaFade, float radius, qboolean temporary ) { + vec3_t axis[3]; + float texCoordScale; + vec3_t originalPoints[4]; + byte colors[4]; + int i, j; + int numFragments; + markFragment_t markFragments[MAX_MARK_FRAGMENTS], *mf; + vec3_t markPoints[MAX_MARK_POINTS]; + vec3_t projection; + + if ( !cg_addMarks.integer ) { + return; + } + + if ( radius <= 0 ) { + CG_Error( "CG_ImpactMark called with <= 0 radius" ); + } + + //if ( markTotal >= MAX_MARK_POLYS ) { + // return; + //} + + // create the texture axis + VectorNormalize2( dir, axis[0] ); + PerpendicularVector( axis[1], axis[0] ); + RotatePointAroundVector( axis[2], axis[0], axis[1], orientation ); + CrossProduct( axis[0], axis[2], axis[1] ); + + texCoordScale = 0.5 * 1.0 / radius; + + // create the full polygon + for ( i = 0 ; i < 3 ; i++ ) { + originalPoints[0][i] = origin[i] - radius * axis[1][i] - radius * axis[2][i]; + originalPoints[1][i] = origin[i] + radius * axis[1][i] - radius * axis[2][i]; + originalPoints[2][i] = origin[i] + radius * axis[1][i] + radius * axis[2][i]; + originalPoints[3][i] = origin[i] - radius * axis[1][i] + radius * axis[2][i]; + } + + // get the fragments + VectorScale( dir, -20, projection ); + numFragments = trap_CM_MarkFragments( 4, (void *)originalPoints, + projection, MAX_MARK_POINTS, markPoints[0], + MAX_MARK_FRAGMENTS, markFragments ); + + colors[0] = red * 255; + colors[1] = green * 255; + colors[2] = blue * 255; + colors[3] = alpha * 255; + + for ( i = 0, mf = markFragments ; i < numFragments ; i++, mf++ ) { + polyVert_t *v; + polyVert_t verts[MAX_VERTS_ON_POLY]; + markPoly_t *mark; + + // we have an upper limit on the complexity of polygons + // that we store persistantly + if ( mf->numPoints > MAX_VERTS_ON_POLY ) { + mf->numPoints = MAX_VERTS_ON_POLY; + } + for ( j = 0, v = verts ; j < mf->numPoints ; j++, v++ ) { + vec3_t delta; + + VectorCopy( markPoints[mf->firstPoint + j], v->xyz ); + + VectorSubtract( v->xyz, origin, delta ); + v->st[0] = 0.5 + DotProduct( delta, axis[1] ) * texCoordScale; + v->st[1] = 0.5 + DotProduct( delta, axis[2] ) * texCoordScale; + *(int *)v->modulate = *(int *)colors; + } + + // if it is a temporary (shadow) mark, add it immediately and forget about it + if ( temporary ) { + trap_R_AddPolyToScene( markShader, mf->numPoints, verts ); + continue; + } + + // otherwise save it persistantly + mark = CG_AllocMark(); + mark->time = cg.time; + mark->alphaFade = alphaFade; + mark->markShader = markShader; + mark->poly.numVerts = mf->numPoints; + mark->color[0] = red; + mark->color[1] = green; + mark->color[2] = blue; + mark->color[3] = alpha; + memcpy( mark->verts, verts, mf->numPoints * sizeof( verts[0] ) ); + markTotal++; + } +} + + +/* +=============== +CG_AddMarks +=============== +*/ +#define MARK_TOTAL_TIME 10000 +#define MARK_FADE_TIME 1000 + +void CG_AddMarks( void ) { + int j; + markPoly_t *mp, *next; + int t; + int fade; + + if ( !cg_addMarks.integer ) { + return; + } + + mp = cg_activeMarkPolys.nextMark; + for ( ; mp != &cg_activeMarkPolys ; mp = next ) { + // grab next now, so if the local entity is freed we + // still have it + next = mp->nextMark; + + // see if it is time to completely remove it + if ( cg.time > mp->time + MARK_TOTAL_TIME ) { + CG_FreeMarkPoly( mp ); + continue; + } + + // fade out the energy bursts + if ( mp->markShader == cgs.media.energyMarkShader ) { + + fade = 450 - 450 * ( (cg.time - mp->time ) / 3000.0 ); + if ( fade < 255 ) { + if ( fade < 0 ) { + fade = 0; + } + if ( mp->verts[0].modulate[0] != 0 ) { + for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { + mp->verts[j].modulate[0] = mp->color[0] * fade; + mp->verts[j].modulate[1] = mp->color[1] * fade; + mp->verts[j].modulate[2] = mp->color[2] * fade; + } + } + } + } + + // fade all marks out with time + t = mp->time + MARK_TOTAL_TIME - cg.time; + if ( t < MARK_FADE_TIME ) { + fade = 255 * t / MARK_FADE_TIME; + if ( mp->alphaFade ) { + for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { + mp->verts[j].modulate[3] = fade; + } + } + else + { + float f = (float)t / MARK_FADE_TIME; + for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { + mp->verts[j].modulate[0] = mp->color[0] * f; + mp->verts[j].modulate[1] = mp->color[1] * f; + mp->verts[j].modulate[2] = mp->color[2] * f; + } + } + } + else + { + for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { + mp->verts[j].modulate[0] = mp->color[0]; + mp->verts[j].modulate[1] = mp->color[1]; + mp->verts[j].modulate[2] = mp->color[2]; + } + } + + trap_R_AddPolyToScene( mp->markShader, mp->poly.numVerts, mp->verts ); + } +} + +// cg_particles.c + +#define BLOODRED 2 +#define EMISIVEFADE 3 +#define GREY75 4 + +typedef struct particle_s +{ + struct particle_s *next; + + float time; + float endtime; + + vec3_t org; + vec3_t vel; + vec3_t accel; + int color; + float colorvel; + float alpha; + float alphavel; + int type; + qhandle_t pshader; + + float height; + float width; + + float endheight; + float endwidth; + + float start; + float end; + + float startfade; + qboolean rotate; + int snum; + + qboolean link; + + // Ridah + int shaderAnim; + int roll; + + int accumroll; + +} cparticle_t; + +typedef enum +{ + P_NONE, + P_WEATHER, + P_FLAT, + P_SMOKE, + P_ROTATE, + P_WEATHER_TURBULENT, + P_ANIM, // Ridah + P_BAT, + P_BLEED, + P_FLAT_SCALEUP, + P_FLAT_SCALEUP_FADE, + P_WEATHER_FLURRY, + P_SMOKE_IMPACT, + P_BUBBLE, + P_BUBBLE_TURBULENT, + P_SPRITE +} particle_type_t; + +#define MAX_SHADER_ANIMS 32 +#define MAX_SHADER_ANIM_FRAMES 64 + +static char *shaderAnimNames[MAX_SHADER_ANIMS] = { + "explode1", + NULL +}; +static qhandle_t shaderAnims[MAX_SHADER_ANIMS][MAX_SHADER_ANIM_FRAMES]; +static int shaderAnimCounts[MAX_SHADER_ANIMS] = { + 23 +}; +static float shaderAnimSTRatio[MAX_SHADER_ANIMS] = { + 1.0f +}; +static int numShaderAnims; +// done. + +#define PARTICLE_GRAVITY 40 +#define MAX_PARTICLES 1024 + +cparticle_t *active_particles, *free_particles; +cparticle_t particles[MAX_PARTICLES]; +int cl_numparticles = MAX_PARTICLES; + +qboolean initparticles = qfalse; +vec3_t pvforward, pvright, pvup; +vec3_t rforward, rright, rup; + +float oldtime; + +/* +=============== +CL_ClearParticles +=============== +*/ +void CG_ClearParticles (void) +{ + int i; + + memset( particles, 0, sizeof(particles) ); + + free_particles = &particles[0]; + active_particles = NULL; + + for (i=0 ;itype == P_WEATHER || p->type == P_WEATHER_TURBULENT || p->type == P_WEATHER_FLURRY + || p->type == P_BUBBLE || p->type == P_BUBBLE_TURBULENT) + {// create a front facing polygon + + if (p->type != P_WEATHER_FLURRY) + { + if (p->type == P_BUBBLE || p->type == P_BUBBLE_TURBULENT) + { + if (org[2] > p->end) + { + p->time = cg.time; + VectorCopy (org, p->org); // Ridah, fixes rare snow flakes that flicker on the ground + + p->org[2] = ( p->start + crandom () * 4 ); + + + if (p->type == P_BUBBLE_TURBULENT) + { + p->vel[0] = crandom() * 4; + p->vel[1] = crandom() * 4; + } + + } + } + else + { + if (org[2] < p->end) + { + p->time = cg.time; + VectorCopy (org, p->org); // Ridah, fixes rare snow flakes that flicker on the ground + + while (p->org[2] < p->end) + { + p->org[2] += (p->start - p->end); + } + + + if (p->type == P_WEATHER_TURBULENT) + { + p->vel[0] = crandom() * 16; + p->vel[1] = crandom() * 16; + } + + } + } + + + // Rafael snow pvs check + if (!p->link) + return; + + p->alpha = 1; + } + + // Ridah, had to do this or MAX_POLYS is being exceeded in village1.bsp + if (Distance( cg.snap->ps.origin, org ) > 1024) { + return; + } + // done. + + if (p->type == P_BUBBLE || p->type == P_BUBBLE_TURBULENT) + { + VectorMA (org, -p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + VectorCopy (point, verts[0].xyz); + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255 * p->alpha; + + VectorMA (org, -p->height, pvup, point); + VectorMA (point, p->width, pvright, point); + VectorCopy (point, verts[1].xyz); + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255 * p->alpha; + + VectorMA (org, p->height, pvup, point); + VectorMA (point, p->width, pvright, point); + VectorCopy (point, verts[2].xyz); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255 * p->alpha; + + VectorMA (org, p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + VectorCopy (point, verts[3].xyz); + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255 * p->alpha; + } + else + { + VectorMA (org, -p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + VectorCopy( point, TRIverts[0].xyz ); + TRIverts[0].st[0] = 1; + TRIverts[0].st[1] = 0; + TRIverts[0].modulate[0] = 255; + TRIverts[0].modulate[1] = 255; + TRIverts[0].modulate[2] = 255; + TRIverts[0].modulate[3] = 255 * p->alpha; + + VectorMA (org, p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + VectorCopy (point, TRIverts[1].xyz); + TRIverts[1].st[0] = 0; + TRIverts[1].st[1] = 0; + TRIverts[1].modulate[0] = 255; + TRIverts[1].modulate[1] = 255; + TRIverts[1].modulate[2] = 255; + TRIverts[1].modulate[3] = 255 * p->alpha; + + VectorMA (org, p->height, pvup, point); + VectorMA (point, p->width, pvright, point); + VectorCopy (point, TRIverts[2].xyz); + TRIverts[2].st[0] = 0; + TRIverts[2].st[1] = 1; + TRIverts[2].modulate[0] = 255; + TRIverts[2].modulate[1] = 255; + TRIverts[2].modulate[2] = 255; + TRIverts[2].modulate[3] = 255 * p->alpha; + } + + } + else if (p->type == P_SPRITE) + { + vec3_t rr, ru; + vec3_t rotate_ang; + + VectorSet (color, 1.0, 1.0, 0.5); + time = cg.time - p->time; + time2 = p->endtime - p->time; + ratio = time / time2; + + width = p->width + ( ratio * ( p->endwidth - p->width) ); + height = p->height + ( ratio * ( p->endheight - p->height) ); + + if (p->roll) { + vectoangles( cg.refdef.viewaxis[0], rotate_ang ); + rotate_ang[ROLL] += p->roll; + AngleVectors ( rotate_ang, NULL, rr, ru); + } + + if (p->roll) { + VectorMA (org, -height, ru, point); + VectorMA (point, -width, rr, point); + } else { + VectorMA (org, -height, pvup, point); + VectorMA (point, -width, pvright, point); + } + VectorCopy (point, verts[0].xyz); + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, 2*height, ru, point); + } else { + VectorMA (point, 2*height, pvup, point); + } + VectorCopy (point, verts[1].xyz); + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, 2*width, rr, point); + } else { + VectorMA (point, 2*width, pvright, point); + } + VectorCopy (point, verts[2].xyz); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, -2*height, ru, point); + } else { + VectorMA (point, -2*height, pvup, point); + } + VectorCopy (point, verts[3].xyz); + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255; + } + else if (p->type == P_SMOKE || p->type == P_SMOKE_IMPACT) + {// create a front rotating facing polygon + + if ( p->type == P_SMOKE_IMPACT && Distance( cg.snap->ps.origin, org ) > 1024) { + return; + } + + if (p->color == BLOODRED) + VectorSet (color, 0.22f, 0.0f, 0.0f); + else if (p->color == GREY75) + { + float len; + float greyit; + float val; + len = Distance (cg.snap->ps.origin, org); + if (!len) + len = 1; + + val = 4096/len; + greyit = 0.25 * val; + if (greyit > 0.5) + greyit = 0.5; + + VectorSet (color, greyit, greyit, greyit); + } + else + VectorSet (color, 1.0, 1.0, 1.0); + + time = cg.time - p->time; + time2 = p->endtime - p->time; + ratio = time / time2; + + if (cg.time > p->startfade) + { + invratio = 1 - ( (cg.time - p->startfade) / (p->endtime - p->startfade) ); + + if (p->color == EMISIVEFADE) + { + float fval; + fval = (invratio * invratio); + if (fval < 0) + fval = 0; + VectorSet (color, fval , fval , fval ); + } + invratio *= p->alpha; + } + else + invratio = 1 * p->alpha; + + if (invratio > 1) + invratio = 1; + + width = p->width + ( ratio * ( p->endwidth - p->width) ); + height = p->height + ( ratio * ( p->endheight - p->height) ); + + if (p->type != P_SMOKE_IMPACT) + { + vec3_t temp; + + vectoangles (rforward, temp); + p->accumroll += p->roll; + temp[ROLL] += p->accumroll * 0.1; + AngleVectors ( temp, NULL, rright2, rup2); + } + else + { + VectorCopy (rright, rright2); + VectorCopy (rup, rup2); + } + + if (p->rotate) + { + VectorMA (org, -height, rup2, point); + VectorMA (point, -width, rright2, point); + } + else + { + VectorMA (org, -p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + } + VectorCopy (point, verts[0].xyz); + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255 * color[0]; + verts[0].modulate[1] = 255 * color[1]; + verts[0].modulate[2] = 255 * color[2]; + verts[0].modulate[3] = 255 * invratio; + + if (p->rotate) + { + VectorMA (org, -height, rup2, point); + VectorMA (point, width, rright2, point); + } + else + { + VectorMA (org, -p->height, pvup, point); + VectorMA (point, p->width, pvright, point); + } + VectorCopy (point, verts[1].xyz); + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255 * color[0]; + verts[1].modulate[1] = 255 * color[1]; + verts[1].modulate[2] = 255 * color[2]; + verts[1].modulate[3] = 255 * invratio; + + if (p->rotate) + { + VectorMA (org, height, rup2, point); + VectorMA (point, width, rright2, point); + } + else + { + VectorMA (org, p->height, pvup, point); + VectorMA (point, p->width, pvright, point); + } + VectorCopy (point, verts[2].xyz); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255 * color[0]; + verts[2].modulate[1] = 255 * color[1]; + verts[2].modulate[2] = 255 * color[2]; + verts[2].modulate[3] = 255 * invratio; + + if (p->rotate) + { + VectorMA (org, height, rup2, point); + VectorMA (point, -width, rright2, point); + } + else + { + VectorMA (org, p->height, pvup, point); + VectorMA (point, -p->width, pvright, point); + } + VectorCopy (point, verts[3].xyz); + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255 * color[0]; + verts[3].modulate[1] = 255 * color[1]; + verts[3].modulate[2] = 255 * color[2]; + verts[3].modulate[3] = 255 * invratio; + + } + else if (p->type == P_BLEED) + { + vec3_t rr, ru; + vec3_t rotate_ang; + float alpha; + + alpha = p->alpha; + + if (p->roll) + { + vectoangles( cg.refdef.viewaxis[0], rotate_ang ); + rotate_ang[ROLL] += p->roll; + AngleVectors ( rotate_ang, NULL, rr, ru); + } + else + { + VectorCopy (pvup, ru); + VectorCopy (pvright, rr); + } + + VectorMA (org, -p->height, ru, point); + VectorMA (point, -p->width, rr, point); + VectorCopy (point, verts[0].xyz); + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 111; + verts[0].modulate[1] = 19; + verts[0].modulate[2] = 9; + verts[0].modulate[3] = 255 * alpha; + + VectorMA (org, -p->height, ru, point); + VectorMA (point, p->width, rr, point); + VectorCopy (point, verts[1].xyz); + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 111; + verts[1].modulate[1] = 19; + verts[1].modulate[2] = 9; + verts[1].modulate[3] = 255 * alpha; + + VectorMA (org, p->height, ru, point); + VectorMA (point, p->width, rr, point); + VectorCopy (point, verts[2].xyz); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 111; + verts[2].modulate[1] = 19; + verts[2].modulate[2] = 9; + verts[2].modulate[3] = 255 * alpha; + + VectorMA (org, p->height, ru, point); + VectorMA (point, -p->width, rr, point); + VectorCopy (point, verts[3].xyz); + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 111; + verts[3].modulate[1] = 19; + verts[3].modulate[2] = 9; + verts[3].modulate[3] = 255 * alpha; + + } + else if (p->type == P_FLAT_SCALEUP) + { + float width, height; + float sinR, cosR; + + if (p->color == BLOODRED) + VectorSet (color, 1, 1, 1); + else + VectorSet (color, 0.5, 0.5, 0.5); + + time = cg.time - p->time; + time2 = p->endtime - p->time; + ratio = time / time2; + + width = p->width + ( ratio * ( p->endwidth - p->width) ); + height = p->height + ( ratio * ( p->endheight - p->height) ); + + if (width > p->endwidth) + width = p->endwidth; + + if (height > p->endheight) + height = p->endheight; + + sinR = height * sin(DEG2RAD(p->roll)) * sqrt(2); + cosR = width * cos(DEG2RAD(p->roll)) * sqrt(2); + + VectorCopy (org, verts[0].xyz); + verts[0].xyz[0] -= sinR; + verts[0].xyz[1] -= cosR; + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255 * color[0]; + verts[0].modulate[1] = 255 * color[1]; + verts[0].modulate[2] = 255 * color[2]; + verts[0].modulate[3] = 255; + + VectorCopy (org, verts[1].xyz); + verts[1].xyz[0] -= cosR; + verts[1].xyz[1] += sinR; + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255 * color[0]; + verts[1].modulate[1] = 255 * color[1]; + verts[1].modulate[2] = 255 * color[2]; + verts[1].modulate[3] = 255; + + VectorCopy (org, verts[2].xyz); + verts[2].xyz[0] += sinR; + verts[2].xyz[1] += cosR; + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255 * color[0]; + verts[2].modulate[1] = 255 * color[1]; + verts[2].modulate[2] = 255 * color[2]; + verts[2].modulate[3] = 255; + + VectorCopy (org, verts[3].xyz); + verts[3].xyz[0] += cosR; + verts[3].xyz[1] -= sinR; + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255 * color[0]; + verts[3].modulate[1] = 255 * color[1]; + verts[3].modulate[2] = 255 * color[2]; + verts[3].modulate[3] = 255; + } + else if (p->type == P_FLAT) + { + + VectorCopy (org, verts[0].xyz); + verts[0].xyz[0] -= p->height; + verts[0].xyz[1] -= p->width; + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255; + + VectorCopy (org, verts[1].xyz); + verts[1].xyz[0] -= p->height; + verts[1].xyz[1] += p->width; + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255; + + VectorCopy (org, verts[2].xyz); + verts[2].xyz[0] += p->height; + verts[2].xyz[1] += p->width; + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255; + + VectorCopy (org, verts[3].xyz); + verts[3].xyz[0] += p->height; + verts[3].xyz[1] -= p->width; + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255; + + } + // Ridah + else if (p->type == P_ANIM) { + vec3_t rr, ru; + vec3_t rotate_ang; + int i, j; + + time = cg.time - p->time; + time2 = p->endtime - p->time; + ratio = time / time2; + if (ratio >= 1.0f) { + ratio = 0.9999f; + } + + width = p->width + ( ratio * ( p->endwidth - p->width) ); + height = p->height + ( ratio * ( p->endheight - p->height) ); + + // if we are "inside" this sprite, don't draw + if (Distance( cg.snap->ps.origin, org ) < width/1.5) { + return; + } + + i = p->shaderAnim; + j = (int)floor(ratio * shaderAnimCounts[p->shaderAnim]); + p->pshader = shaderAnims[i][j]; + + if (p->roll) { + vectoangles( cg.refdef.viewaxis[0], rotate_ang ); + rotate_ang[ROLL] += p->roll; + AngleVectors ( rotate_ang, NULL, rr, ru); + } + + if (p->roll) { + VectorMA (org, -height, ru, point); + VectorMA (point, -width, rr, point); + } else { + VectorMA (org, -height, pvup, point); + VectorMA (point, -width, pvright, point); + } + VectorCopy (point, verts[0].xyz); + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, 2*height, ru, point); + } else { + VectorMA (point, 2*height, pvup, point); + } + VectorCopy (point, verts[1].xyz); + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, 2*width, rr, point); + } else { + VectorMA (point, 2*width, pvright, point); + } + VectorCopy (point, verts[2].xyz); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255; + + if (p->roll) { + VectorMA (point, -2*height, ru, point); + } else { + VectorMA (point, -2*height, pvup, point); + } + VectorCopy (point, verts[3].xyz); + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255; + } + // done. + + if (!p->pshader) { +// (SA) temp commented out for DM +// CG_Printf ("CG_AddParticleToScene type %d p->pshader == ZERO\n", p->type); + return; + } + + if (p->type == P_WEATHER || p->type == P_WEATHER_TURBULENT || p->type == P_WEATHER_FLURRY) + trap_R_AddPolyToScene( p->pshader, 3, TRIverts ); + else + trap_R_AddPolyToScene( p->pshader, 4, verts ); + +} + +// Ridah, made this static so it doesn't interfere with other files +static float roll = 0.0; + +/* +=============== +CG_AddParticles +=============== +*/ +void CG_AddParticles (void) +{ + cparticle_t *p, *next; + float alpha; + float time, time2; + vec3_t org; + int color; + cparticle_t *active, *tail; + int type; + vec3_t rotate_ang; + + if (!initparticles) + CG_ClearParticles (); + + VectorCopy( cg.refdef.viewaxis[0], pvforward ); + VectorCopy( cg.refdef.viewaxis[1], pvright ); + VectorCopy( cg.refdef.viewaxis[2], pvup ); + + vectoangles( cg.refdef.viewaxis[0], rotate_ang ); + roll += ((cg.time - oldtime) * 0.1) ; + rotate_ang[ROLL] += (roll*0.9); + AngleVectors ( rotate_ang, rforward, rright, rup); + + oldtime = cg.time; + + active = NULL; + tail = NULL; + + for (p=active_particles ; p ; p=next) + { + + next = p->next; + + time = (cg.time - p->time)*0.001; + + alpha = p->alpha + time*p->alphavel; + if (alpha <= 0) + { // faded out + p->next = free_particles; + free_particles = p; + p->type = 0; + p->color = 0; + p->alpha = 0; + continue; + } + + if (p->type == P_SMOKE || p->type == P_ANIM || p->type == P_BLEED || p->type == P_SMOKE_IMPACT) + { + if (cg.time > p->endtime) + { + p->next = free_particles; + free_particles = p; + p->type = 0; + p->color = 0; + p->alpha = 0; + + continue; + } + + } + + if (p->type == P_WEATHER_FLURRY) + { + if (cg.time > p->endtime) + { + p->next = free_particles; + free_particles = p; + p->type = 0; + p->color = 0; + p->alpha = 0; + + continue; + } + } + + + if (p->type == P_FLAT_SCALEUP_FADE) + { + if (cg.time > p->endtime) + { + p->next = free_particles; + free_particles = p; + p->type = 0; + p->color = 0; + p->alpha = 0; + continue; + } + + } + + if ((p->type == P_BAT || p->type == P_SPRITE) && p->endtime < 0) { + // temporary sprite + CG_AddParticleToScene (p, p->org, alpha); + p->next = free_particles; + free_particles = p; + p->type = 0; + p->color = 0; + p->alpha = 0; + continue; + } + + p->next = NULL; + if (!tail) + active = tail = p; + else + { + tail->next = p; + tail = p; + } + + if (alpha > 1.0) + alpha = 1; + + color = p->color; + + time2 = time*time; + + org[0] = p->org[0] + p->vel[0]*time + p->accel[0]*time2; + org[1] = p->org[1] + p->vel[1]*time + p->accel[1]*time2; + org[2] = p->org[2] + p->vel[2]*time + p->accel[2]*time2; + + type = p->type; + + CG_AddParticleToScene (p, org, alpha); + } + + active_particles = active; +} + +/* +====================== +CG_AddParticles +====================== +*/ +void CG_ParticleSnowFlurry (qhandle_t pshader, centity_t *cent) +{ + cparticle_t *p; + qboolean turb = qtrue; + + if (!pshader) + CG_Printf ("CG_ParticleSnowFlurry pshader == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->color = 0; + p->alpha = 0.90f; + p->alphavel = 0; + + p->start = cent->currentState.origin2[0]; + p->end = cent->currentState.origin2[1]; + + p->endtime = cg.time + cent->currentState.time; + p->startfade = cg.time + cent->currentState.time2; + + p->pshader = pshader; + + if (rand()%100 > 90) + { + p->height = 32; + p->width = 32; + p->alpha = 0.10f; + } + else + { + p->height = 1; + p->width = 1; + } + + p->vel[2] = -20; + + p->type = P_WEATHER_FLURRY; + + if (turb) + p->vel[2] = -10; + + VectorCopy(cent->currentState.origin, p->org); + + p->org[0] = p->org[0]; + p->org[1] = p->org[1]; + p->org[2] = p->org[2]; + + p->vel[0] = p->vel[1] = 0; + + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + p->vel[0] += cent->currentState.angles[0] * 32 + (crandom() * 16); + p->vel[1] += cent->currentState.angles[1] * 32 + (crandom() * 16); + p->vel[2] += cent->currentState.angles[2]; + + if (turb) + { + p->accel[0] = crandom () * 16; + p->accel[1] = crandom () * 16; + } + +} + +void CG_ParticleSnow (qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb, float range, int snum) +{ + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_ParticleSnow pshader == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->color = 0; + p->alpha = 0.40f; + p->alphavel = 0; + p->start = origin[2]; + p->end = origin2[2]; + p->pshader = pshader; + p->height = 1; + p->width = 1; + + p->vel[2] = -50; + + if (turb) + { + p->type = P_WEATHER_TURBULENT; + p->vel[2] = -50 * 1.3; + } + else + { + p->type = P_WEATHER; + } + + VectorCopy(origin, p->org); + + p->org[0] = p->org[0] + ( crandom() * range); + p->org[1] = p->org[1] + ( crandom() * range); + p->org[2] = p->org[2] + ( crandom() * (p->start - p->end)); + + p->vel[0] = p->vel[1] = 0; + + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + if (turb) + { + p->vel[0] = crandom() * 16; + p->vel[1] = crandom() * 16; + } + + // Rafael snow pvs check + p->snum = snum; + p->link = qtrue; + +} + +void CG_ParticleBubble (qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb, float range, int snum) +{ + cparticle_t *p; + float randsize; + + if (!pshader) + CG_Printf ("CG_ParticleSnow pshader == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->color = 0; + p->alpha = 0.40f; + p->alphavel = 0; + p->start = origin[2]; + p->end = origin2[2]; + p->pshader = pshader; + + randsize = 1 + (crandom() * 0.5); + + p->height = randsize; + p->width = randsize; + + p->vel[2] = 50 + ( crandom() * 10 ); + + if (turb) + { + p->type = P_BUBBLE_TURBULENT; + p->vel[2] = 50 * 1.3; + } + else + { + p->type = P_BUBBLE; + } + + VectorCopy(origin, p->org); + + p->org[0] = p->org[0] + ( crandom() * range); + p->org[1] = p->org[1] + ( crandom() * range); + p->org[2] = p->org[2] + ( crandom() * (p->start - p->end)); + + p->vel[0] = p->vel[1] = 0; + + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + if (turb) + { + p->vel[0] = crandom() * 4; + p->vel[1] = crandom() * 4; + } + + // Rafael snow pvs check + p->snum = snum; + p->link = qtrue; + +} + +void CG_ParticleSmoke (qhandle_t pshader, centity_t *cent) +{ + + // using cent->density = enttime + // cent->frame = startfade + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_ParticleSmoke == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + + p->endtime = cg.time + cent->currentState.time; + p->startfade = cg.time + cent->currentState.time2; + + p->color = 0; + p->alpha = 1.0; + p->alphavel = 0; + p->start = cent->currentState.origin[2]; + p->end = cent->currentState.origin2[2]; + p->pshader = pshader; + p->rotate = qfalse; + p->height = 8; + p->width = 8; + p->endheight = 32; + p->endwidth = 32; + p->type = P_SMOKE; + + VectorCopy(cent->currentState.origin, p->org); + + p->vel[0] = p->vel[1] = 0; + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + p->vel[2] = 5; + + if (cent->currentState.frame == 1)// reverse gravity + p->vel[2] *= -1; + + p->roll = 8 + (crandom() * 4); +} + + +void CG_ParticleBulletDebris (vec3_t org, vec3_t vel, int duration) +{ + + cparticle_t *p; + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + + p->endtime = cg.time + duration; + p->startfade = cg.time + duration/2; + + p->color = EMISIVEFADE; + p->alpha = 1.0; + p->alphavel = 0; + + p->height = 0.5; + p->width = 0.5; + p->endheight = 0.5; + p->endwidth = 0.5; + + p->pshader = cgs.media.tracerShader; + + p->type = P_SMOKE; + + VectorCopy(org, p->org); + + p->vel[0] = vel[0]; + p->vel[1] = vel[1]; + p->vel[2] = vel[2]; + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + p->accel[2] = -60; + p->vel[2] += -20; + +} + +/* +====================== +CG_ParticleExplosion +====================== +*/ + +void CG_ParticleExplosion (char *animStr, vec3_t origin, vec3_t vel, int duration, int sizeStart, int sizeEnd) +{ + cparticle_t *p; + int anim; + + if (animStr < (char *)10) + CG_Error( "CG_ParticleExplosion: animStr is probably an index rather than a string" ); + + // find the animation string + for (anim=0; shaderAnimNames[anim]; anim++) { + if (!Q_stricmp( animStr, shaderAnimNames[anim] )) + break; + } + if (!shaderAnimNames[anim]) { + CG_Error("CG_ParticleExplosion: unknown animation string: %s\n", animStr); + return; + } + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->alpha = 0.5; + p->alphavel = 0; + + if (duration < 0) { + duration *= -1; + p->roll = 0; + } else { + p->roll = crandom()*179; + } + + p->shaderAnim = anim; + + p->width = sizeStart; + p->height = sizeStart*shaderAnimSTRatio[anim]; // for sprites that are stretch in either direction + + p->endheight = sizeEnd; + p->endwidth = sizeEnd*shaderAnimSTRatio[anim]; + + p->endtime = cg.time + duration; + + p->type = P_ANIM; + + VectorCopy( origin, p->org ); + VectorCopy( vel, p->vel ); + VectorClear( p->accel ); + +} + +// Rafael Shrapnel +void CG_AddParticleShrapnel (localEntity_t *le) +{ + return; +} +// done. + +int CG_NewParticleArea (int num) +{ + // const char *str; + char *str; + char *token; + int type; + vec3_t origin, origin2; + int i; + float range = 0; + int turb; + int numparticles; + int snum; + + str = (char *) CG_ConfigString (num); + if (!str[0]) + return (0); + + // returns type 128 64 or 32 + token = COM_Parse ((const char **)&str); + type = atoi (token); + + if (type == 1) + range = 128; + else if (type == 2) + range = 64; + else if (type == 3) + range = 32; + else if (type == 0) + range = 256; + else if (type == 4) + range = 8; + else if (type == 5) + range = 16; + else if (type == 6) + range = 32; + else if (type == 7) + range = 64; + + + for (i=0; i<3; i++) + { + token = COM_Parse ((const char **)&str); + origin[i] = atof (token); + } + + for (i=0; i<3; i++) + { + token = COM_Parse ((const char **)&str); + origin2[i] = atof (token); + } + + token = COM_Parse ((const char **)&str); + numparticles = atoi (token); + + token = COM_Parse ((const char **)&str); + turb = atoi (token); + + token = COM_Parse ((const char **)&str); + snum = atoi (token); + + for (i=0; i= 4) + CG_ParticleBubble (cgs.media.waterBubbleShader, origin, origin2, turb, range, snum); + else + CG_ParticleSnow (cgs.media.waterBubbleShader, origin, origin2, turb, range, snum); + } + + return (1); +} + +void CG_SnowLink (centity_t *cent, qboolean particleOn) +{ + cparticle_t *p, *next; + int id; + + id = cent->currentState.frame; + + for (p=active_particles ; p ; p=next) + { + next = p->next; + + if (p->type == P_WEATHER || p->type == P_WEATHER_TURBULENT) + { + if (p->snum == id) + { + if (particleOn) + p->link = qtrue; + else + p->link = qfalse; + } + } + + } +} + +void CG_ParticleImpactSmokePuff (qhandle_t pshader, vec3_t origin) +{ + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_ParticleImpactSmokePuff pshader == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->alpha = 0.25; + p->alphavel = 0; + p->roll = crandom()*179; + + p->pshader = pshader; + + p->endtime = cg.time + 1000; + p->startfade = cg.time + 100; + + p->width = rand()%4 + 8; + p->height = rand()%4 + 8; + + p->endheight = p->height *2; + p->endwidth = p->width * 2; + + p->endtime = cg.time + 500; + + p->type = P_SMOKE_IMPACT; + + VectorCopy( origin, p->org ); + VectorSet(p->vel, 0, 0, 20); + VectorSet(p->accel, 0, 0, 20); + + p->rotate = qtrue; +} + +void CG_Particle_Bleed (qhandle_t pshader, vec3_t start, vec3_t dir, int fleshEntityNum, int duration) +{ + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_Particle_Bleed pshader == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->alpha = 1.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = pshader; + + p->endtime = cg.time + duration; + + if (fleshEntityNum) + p->startfade = cg.time; + else + p->startfade = cg.time + 100; + + p->width = 4; + p->height = 4; + + p->endheight = 4+rand()%3; + p->endwidth = p->endheight; + + p->type = P_SMOKE; + + VectorCopy( start, p->org ); + p->vel[0] = 0; + p->vel[1] = 0; + p->vel[2] = -20; + VectorClear( p->accel ); + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->color = BLOODRED; + p->alpha = 0.75; + +} + +void CG_Particle_OilParticle (qhandle_t pshader, centity_t *cent) +{ + cparticle_t *p; + + int time; + int time2; + float ratio; + + float duration = 1500; + + time = cg.time; + time2 = cg.time + cent->currentState.time; + + ratio =(float)1 - ((float)time / (float)time2); + + if (!pshader) + CG_Printf ("CG_Particle_OilParticle == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->alpha = 1.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = pshader; + + p->endtime = cg.time + duration; + + p->startfade = p->endtime; + + p->width = 1; + p->height = 3; + + p->endheight = 3; + p->endwidth = 1; + + p->type = P_SMOKE; + + VectorCopy(cent->currentState.origin, p->org ); + + p->vel[0] = (cent->currentState.origin2[0] * (16 * ratio)); + p->vel[1] = (cent->currentState.origin2[1] * (16 * ratio)); + p->vel[2] = (cent->currentState.origin2[2]); + + p->snum = 1.0f; + + VectorClear( p->accel ); + + p->accel[2] = -20; + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->alpha = 0.75; + +} + + +void CG_Particle_OilSlick (qhandle_t pshader, centity_t *cent) +{ + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_Particle_OilSlick == ZERO!\n"); + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + + if (cent->currentState.angles2[2]) + p->endtime = cg.time + cent->currentState.angles2[2]; + else + p->endtime = cg.time + 60000; + + p->startfade = p->endtime; + + p->alpha = 1.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = pshader; + + if (cent->currentState.angles2[0] || cent->currentState.angles2[1]) + { + p->width = cent->currentState.angles2[0]; + p->height = cent->currentState.angles2[0]; + + p->endheight = cent->currentState.angles2[1]; + p->endwidth = cent->currentState.angles2[1]; + } + else + { + p->width = 8; + p->height = 8; + + p->endheight = 16; + p->endwidth = 16; + } + + p->type = P_FLAT_SCALEUP; + + p->snum = 1.0; + + VectorCopy(cent->currentState.origin, p->org ); + + p->org[2]+= 0.55 + (crandom() * 0.5); + + p->vel[0] = 0; + p->vel[1] = 0; + p->vel[2] = 0; + VectorClear( p->accel ); + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->alpha = 0.75; + +} + +void CG_OilSlickRemove (centity_t *cent) +{ + cparticle_t *p, *next; + int id; + + id = 1.0f; + + if (!id) + CG_Printf ("CG_OilSlickRevove NULL id\n"); + + for (p=active_particles ; p ; p=next) + { + next = p->next; + + if (p->type == P_FLAT_SCALEUP) + { + if (p->snum == id) + { + p->endtime = cg.time + 100; + p->startfade = p->endtime; + p->type = P_FLAT_SCALEUP_FADE; + + } + } + + } +} + +qboolean ValidBloodPool (vec3_t start) +{ +#define EXTRUDE_DIST 0.5 + + vec3_t angles; + vec3_t right, up; + vec3_t this_pos, x_pos, center_pos, end_pos; + float x, y; + float fwidth, fheight; + trace_t trace; + vec3_t normal; + + fwidth = 16; + fheight = 16; + + VectorSet (normal, 0, 0, 1); + + vectoangles (normal, angles); + AngleVectors (angles, NULL, right, up); + + VectorMA (start, EXTRUDE_DIST, normal, center_pos); + + for (x= -fwidth/2; xendpos, start); + legit = ValidBloodPool (start); + + if (!legit) + return; + + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + + p->endtime = cg.time + 3000; + p->startfade = p->endtime; + + p->alpha = 1.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = pshader; + + rndSize = 0.4 + random()*0.6; + + p->width = 8*rndSize; + p->height = 8*rndSize; + + p->endheight = 16*rndSize; + p->endwidth = 16*rndSize; + + p->type = P_FLAT_SCALEUP; + + VectorCopy(start, p->org ); + + p->vel[0] = 0; + p->vel[1] = 0; + p->vel[2] = 0; + VectorClear( p->accel ); + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->alpha = 0.75; + + p->color = BLOODRED; +} + +#define NORMALSIZE 16 +#define LARGESIZE 32 + +void CG_ParticleBloodCloud (centity_t *cent, vec3_t origin, vec3_t dir) +{ + float length; + float dist; + float crittersize; + vec3_t angles, forward; + vec3_t point; + cparticle_t *p; + int i; + + dist = 0; + + length = VectorLength (dir); + vectoangles (dir, angles); + AngleVectors (angles, forward, NULL, NULL); + + crittersize = LARGESIZE; + + if (length) + dist = length / crittersize; + + if (dist < 1) + dist = 1; + + VectorCopy (origin, point); + + for (i=0; inext; + p->next = active_particles; + active_particles = p; + + p->time = cg.time; + p->alpha = 1.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = cgs.media.smokePuffShader; + + p->endtime = cg.time + 350 + (crandom() * 100); + + p->startfade = cg.time; + + p->width = LARGESIZE; + p->height = LARGESIZE; + p->endheight = LARGESIZE; + p->endwidth = LARGESIZE; + + p->type = P_SMOKE; + + VectorCopy( origin, p->org ); + + p->vel[0] = 0; + p->vel[1] = 0; + p->vel[2] = -1; + + VectorClear( p->accel ); + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->color = BLOODRED; + + p->alpha = 0.75; + + } + + +} + +void CG_ParticleSparks (vec3_t org, vec3_t vel, int duration, float x, float y, float speed) +{ + cparticle_t *p; + + if (!free_particles) + return; + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + + p->endtime = cg.time + duration; + p->startfade = cg.time + duration/2; + + p->color = EMISIVEFADE; + p->alpha = 0.4f; + p->alphavel = 0; + + p->height = 0.5; + p->width = 0.5; + p->endheight = 0.5; + p->endwidth = 0.5; + + p->pshader = cgs.media.tracerShader; + + p->type = P_SMOKE; + + VectorCopy(org, p->org); + + p->org[0] += (crandom() * x); + p->org[1] += (crandom() * y); + + p->vel[0] = vel[0]; + p->vel[1] = vel[1]; + p->vel[2] = vel[2]; + + p->accel[0] = p->accel[1] = p->accel[2] = 0; + + p->vel[0] += (crandom() * 4); + p->vel[1] += (crandom() * 4); + p->vel[2] += (20 + (crandom() * 10)) * speed; + + p->accel[0] = crandom () * 4; + p->accel[1] = crandom () * 4; + +} + +void CG_ParticleDust (centity_t *cent, vec3_t origin, vec3_t dir) +{ + float length; + float dist; + float crittersize; + vec3_t angles, forward; + vec3_t point; + cparticle_t *p; + int i; + + dist = 0; + + VectorNegate (dir, dir); + length = VectorLength (dir); + vectoangles (dir, angles); + AngleVectors (angles, forward, NULL, NULL); + + crittersize = LARGESIZE; + + if (length) + dist = length / crittersize; + + if (dist < 1) + dist = 1; + + VectorCopy (origin, point); + + for (i=0; inext; + p->next = active_particles; + active_particles = p; + + p->time = cg.time; + p->alpha = 5.0; + p->alphavel = 0; + p->roll = 0; + + p->pshader = cgs.media.smokePuffShader; + + // RF, stay around for long enough to expand and dissipate naturally + if (length) + p->endtime = cg.time + 4500 + (crandom() * 3500); + else + p->endtime = cg.time + 750 + (crandom() * 500); + + p->startfade = cg.time; + + p->width = LARGESIZE; + p->height = LARGESIZE; + + // RF, expand while falling + p->endheight = LARGESIZE*3.0; + p->endwidth = LARGESIZE*3.0; + + if (!length) + { + p->width *= 0.2f; + p->height *= 0.2f; + + p->endheight = NORMALSIZE; + p->endwidth = NORMALSIZE; + } + + p->type = P_SMOKE; + + VectorCopy( point, p->org ); + + p->vel[0] = crandom()*6; + p->vel[1] = crandom()*6; + p->vel[2] = random()*20; + + // RF, add some gravity/randomness + p->accel[0] = crandom()*3; + p->accel[1] = crandom()*3; + p->accel[2] = -PARTICLE_GRAVITY*0.4; + + VectorClear( p->accel ); + + p->rotate = qfalse; + + p->roll = rand()%179; + + p->alpha = 0.75; + + } + + +} + +void CG_ParticleMisc (qhandle_t pshader, vec3_t origin, int size, int duration, float alpha) +{ + cparticle_t *p; + + if (!pshader) + CG_Printf ("CG_ParticleImpactSmokePuff pshader == ZERO!\n"); + + if (!free_particles) + return; + + p = free_particles; + free_particles = p->next; + p->next = active_particles; + active_particles = p; + p->time = cg.time; + p->alpha = 1.0; + p->alphavel = 0; + p->roll = rand()%179; + + p->pshader = pshader; + + if (duration > 0) + p->endtime = cg.time + duration; + else + p->endtime = duration; + + p->startfade = cg.time; + + p->width = size; + p->height = size; + + p->endheight = size; + p->endwidth = size; + + p->type = P_SPRITE; + + VectorCopy( origin, p->org ); + + p->rotate = qfalse; +} + diff --git a/code/cgame/cg_media (2).h b/code/cgame/cg_media (2).h new file mode 100644 index 0000000..e69de29 diff --git a/code/cgame/cg_media.h b/code/cgame/cg_media.h new file mode 100644 index 0000000..e69de29 diff --git a/code/cgame/cg_newDraw (2).c b/code/cgame/cg_newDraw (2).c new file mode 100644 index 0000000..3984999 --- /dev/null +++ b/code/cgame/cg_newDraw (2).c @@ -0,0 +1,1020 @@ +#include "cg_local.h" +#include "../ui/ui_shared.h" + +extern displayContextDef_t cgDC; + + +// set in CG_ParseTeamInfo + +//static int sortedTeamPlayers[TEAM_MAXOVERLAY]; +//static int numSortedTeamPlayers; +int drawTeamOverlayModificationCount = -1; + +//static char systemChat[256]; +//static char teamChat1[256]; +//static char teamChat2[256]; + +void CG_InitTeamChat(void) { + memset(teamChat1, 0, sizeof(teamChat1)); + memset(teamChat2, 0, sizeof(teamChat2)); + memset(systemChat, 0, sizeof(systemChat)); +} + +void CG_SetPrintString(int type, const char *p) { + if (type == SYSTEM_PRINT) { + strcpy(systemChat, p); + } else { + strcpy(teamChat2, teamChat1); + strcpy(teamChat1, p); + } +} + +void CG_CheckOrderPending(void) { + if (cgs.gametype < GT_CTF) { + return; + } + if (cgs.orderPending) { + //clientInfo_t *ci = cgs.clientinfo + sortedTeamPlayers[cg_currentSelectedPlayer.integer]; + const char *p1, *p2, *b; + p1 = p2 = b = NULL; + switch (cgs.currentOrder) { + case TEAMTASK_OFFENSE: + p1 = VOICECHAT_ONOFFENSE; + p2 = VOICECHAT_OFFENSE; + b = "+button7; wait; -button7"; + break; + case TEAMTASK_DEFENSE: + p1 = VOICECHAT_ONDEFENSE; + p2 = VOICECHAT_DEFEND; + b = "+button8; wait; -button8"; + break; + case TEAMTASK_PATROL: + p1 = VOICECHAT_ONPATROL; + p2 = VOICECHAT_PATROL; + b = "+button9; wait; -button9"; + break; + case TEAMTASK_FOLLOW: + p1 = VOICECHAT_ONFOLLOW; + p2 = VOICECHAT_FOLLOWME; + b = "+button10; wait; -button10"; + break; + case TEAMTASK_CAMP: + p1 = VOICECHAT_ONCAMPING; + p2 = VOICECHAT_CAMP; + break; + case TEAMTASK_RETRIEVE: + p1 = VOICECHAT_ONGETFLAG; + p2 = VOICECHAT_RETURNFLAG; + break; + case TEAMTASK_ESCORT: + p1 = VOICECHAT_ONFOLLOWCARRIER; + p2 = VOICECHAT_FOLLOWFLAGCARRIER; + break; + } + + if (cg_currentSelectedPlayer.integer == numSortedTeamPlayers) { + // to everyone + trap_SendConsoleCommand(va("cmd vsay_team %s\n", p2)); + } else { + // for the player self + if (sortedTeamPlayers[cg_currentSelectedPlayer.integer] == cg.snap->ps.clientNum && p1) { + trap_SendConsoleCommand(va("teamtask %i\n", cgs.currentOrder)); + //trap_SendConsoleCommand(va("cmd say_team %s\n", p2)); + trap_SendConsoleCommand(va("cmd vsay_team %s\n", p1)); + } else if (p2) { + //trap_SendConsoleCommand(va("cmd say_team %s, %s\n", ci->name,p)); + trap_SendConsoleCommand(va("cmd vtell %d %s\n", sortedTeamPlayers[cg_currentSelectedPlayer.integer], p2)); + } + } + if (b) { + trap_SendConsoleCommand(b); + } + cgs.orderPending = qfalse; + } +} + +static void CG_SetSelectedPlayerName() { + if (cg_currentSelectedPlayer.integer >= 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { + clientInfo_t *ci = cgs.clientinfo + sortedTeamPlayers[cg_currentSelectedPlayer.integer]; + if (ci) { + trap_Cvar_Set("cg_selectedPlayerName", ci->name); + trap_Cvar_Set("cg_selectedPlayer", va("%d", sortedTeamPlayers[cg_currentSelectedPlayer.integer])); + cgs.currentOrder = ci->teamTask; + } + } else { + trap_Cvar_Set("cg_selectedPlayerName", "Everyone"); + } +} +int CG_GetSelectedPlayer() { + if (cg_currentSelectedPlayer.integer < 0 || cg_currentSelectedPlayer.integer >= numSortedTeamPlayers) { + cg_currentSelectedPlayer.integer = 0; + } + return cg_currentSelectedPlayer.integer; +} + +void CG_SelectNextPlayer(void) { + CG_CheckOrderPending(); + if (cg_currentSelectedPlayer.integer >= 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { + cg_currentSelectedPlayer.integer++; + } else { + cg_currentSelectedPlayer.integer = 0; + } + CG_SetSelectedPlayerName(); +} + +void CG_SelectPrevPlayer(void) { + CG_CheckOrderPending(); + if (cg_currentSelectedPlayer.integer > 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { + cg_currentSelectedPlayer.integer--; + } else { + cg_currentSelectedPlayer.integer = numSortedTeamPlayers; + } + CG_SetSelectedPlayerName(); +} + + +qhandle_t CG_StatusHandle(int task) { + qhandle_t h = cgs.media.assaultShader; + switch (task) { + case TEAMTASK_OFFENSE : + h = cgs.media.assaultShader; + break; + case TEAMTASK_DEFENSE : + h = cgs.media.defendShader; + break; + case TEAMTASK_PATROL : + h = cgs.media.patrolShader; + break; + case TEAMTASK_FOLLOW : + h = cgs.media.followShader; + break; + case TEAMTASK_CAMP : + h = cgs.media.campShader; + break; + case TEAMTASK_RETRIEVE : + h = cgs.media.retrieveShader; + break; + case TEAMTASK_ESCORT : + h = cgs.media.escortShader; + break; + default : + h = cgs.media.assaultShader; + break; + } + return h; +} + + +float CG_GetValue(int ownerDraw) { + centity_t *cent; + clientInfo_t *ci; + playerState_t *ps; + + cent = &cg_entities[cg.snap->ps.clientNum]; + ps = &cg.snap->ps; + + switch (ownerDraw) { + case CG_SELECTEDPLAYER_ARMOR: + ci = cgs.clientinfo + sortedTeamPlayers[CG_GetSelectedPlayer()]; + return ci->armor; + break; + case CG_SELECTEDPLAYER_HEALTH: + ci = cgs.clientinfo + sortedTeamPlayers[CG_GetSelectedPlayer()]; + return ci->health; + break; + case CG_PLAYER_ARMOR_VALUE: + return ps->stats[STAT_ARMOR]; + break; + case CG_PLAYER_AMMO_VALUE: + if ( cent->currentState.weapon ) + { + return ps->ammo[weaponData[cent->currentState.weapon].ammoIndex]; + } + break; + case CG_PLAYER_SCORE: + return cg.snap->ps.persistant[PERS_SCORE]; + break; + case CG_PLAYER_HEALTH: + return ps->stats[STAT_HEALTH]; + break; + case CG_RED_SCORE: + return cgs.scores1; + break; + case CG_BLUE_SCORE: + return cgs.scores2; + break; + case CG_PLAYER_FORCE_VALUE: + return ps->fd.forcePower; + break; + default: + break; + } + return -1; +} + +qboolean CG_OtherTeamHasFlag(void) { + if (cgs.gametype == GT_CTF || cgs.gametype == GT_CTY) { + int team = cg.snap->ps.persistant[PERS_TEAM]; + if (team == TEAM_RED && cgs.redflag == FLAG_TAKEN) { + return qtrue; + } else if (team == TEAM_BLUE && cgs.blueflag == FLAG_TAKEN) { + return qtrue; + } else { + return qfalse; + } + } + return qfalse; +} + +qboolean CG_YourTeamHasFlag(void) { + if (cgs.gametype == GT_CTF || cgs.gametype == GT_CTY) { + int team = cg.snap->ps.persistant[PERS_TEAM]; + if (team == TEAM_RED && cgs.blueflag == FLAG_TAKEN) { + return qtrue; + } else if (team == TEAM_BLUE && cgs.redflag == FLAG_TAKEN) { + return qtrue; + } else { + return qfalse; + } + } + return qfalse; +} + +// THINKABOUTME: should these be exclusive or inclusive.. +// +qboolean CG_OwnerDrawVisible(int flags) { + + if (flags & CG_SHOW_TEAMINFO) { + return (cg_currentSelectedPlayer.integer == numSortedTeamPlayers); + } + + if (flags & CG_SHOW_NOTEAMINFO) { + return !(cg_currentSelectedPlayer.integer == numSortedTeamPlayers); + } + + if (flags & CG_SHOW_OTHERTEAMHASFLAG) { + return CG_OtherTeamHasFlag(); + } + + if (flags & CG_SHOW_YOURTEAMHASENEMYFLAG) { + return CG_YourTeamHasFlag(); + } + + if (flags & (CG_SHOW_BLUE_TEAM_HAS_REDFLAG | CG_SHOW_RED_TEAM_HAS_BLUEFLAG)) { + if (flags & CG_SHOW_BLUE_TEAM_HAS_REDFLAG && (cgs.redflag == FLAG_TAKEN || cgs.flagStatus == FLAG_TAKEN_RED)) { + return qtrue; + } else if (flags & CG_SHOW_RED_TEAM_HAS_BLUEFLAG && (cgs.blueflag == FLAG_TAKEN || cgs.flagStatus == FLAG_TAKEN_BLUE)) { + return qtrue; + } + return qfalse; + } + + if (flags & CG_SHOW_ANYTEAMGAME) { + if( cgs.gametype >= GT_TEAM) { + return qtrue; + } + } + + if (flags & CG_SHOW_ANYNONTEAMGAME) { + if( cgs.gametype < GT_TEAM) { + return qtrue; + } + } + + if (flags & CG_SHOW_CTF) { + if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { + return qtrue; + } + } + + if (flags & CG_SHOW_HEALTHCRITICAL) { + if (cg.snap->ps.stats[STAT_HEALTH] < 25) { + return qtrue; + } + } + + if (flags & CG_SHOW_HEALTHOK) { + if (cg.snap->ps.stats[STAT_HEALTH] >= 25) { + return qtrue; + } + } + + if (flags & CG_SHOW_SINGLEPLAYER) { + if( cgs.gametype == GT_SINGLE_PLAYER ) { + return qtrue; + } + } + + if (flags & CG_SHOW_TOURNAMENT) { + if( cgs.gametype == GT_TOURNAMENT ) { + return qtrue; + } + } + + if (flags & CG_SHOW_DURINGINCOMINGVOICE) { + } + + if (flags & CG_SHOW_IF_PLAYER_HAS_FLAG) { + if (cg.snap->ps.powerups[PW_REDFLAG] || cg.snap->ps.powerups[PW_BLUEFLAG] || cg.snap->ps.powerups[PW_NEUTRALFLAG]) { + return qtrue; + } + } + return qfalse; +} + + +const char *CG_GetKillerText(void) { + static const char *s = ""; + if ( cg.killerName[0] ) { + s = va("%s %s", CG_GetStripEdString("INGAMETEXT", "KILLEDBY"), cg.killerName ); + } + return s; +} + + +const char *CG_GetGameStatusText(void) { + static const char *s = ""; + if ( cgs.gametype < GT_TEAM) { + if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR ) + { + char sPlaceWith[256]; + trap_SP_GetStringTextString("INGAMETEXT_PLACE_WITH", sPlaceWith, sizeof(sPlaceWith)); + + s = va("%s %s %i",CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), sPlaceWith, cg.snap->ps.persistant[PERS_SCORE] ); + } + } else { + if ( cg.teamScores[0] == cg.teamScores[1] ) { + s = va("Teams are tied at %i", cg.teamScores[0] ); + } else if ( cg.teamScores[0] >= cg.teamScores[1] ) { + s = va("Red leads Blue, %i to %i", cg.teamScores[0], cg.teamScores[1] ); + } else { + s = va("Blue leads Red, %i to %i", cg.teamScores[1], cg.teamScores[0] ); + } + } + return s; +} + +const char *CG_GameTypeString(void) { + if ( cgs.gametype == GT_FFA ) { + return "Free For All"; + } else if ( cgs.gametype == GT_HOLOCRON ) { + return "Holocron FFA"; + } else if ( cgs.gametype == GT_JEDIMASTER ) { + return "Jedi Master"; + } else if ( cgs.gametype == GT_TEAM ) { + return "Team FFA"; + } else if ( cgs.gametype == GT_SAGA ) { + return "N/A"; + } else if ( cgs.gametype == GT_CTF ) { + return "Capture the Flag"; + } else if ( cgs.gametype == GT_CTY ) { + return "Capture the Ysalamiri"; + } + return ""; +} + +extern int MenuFontToHandle(int iMenuFont); + +// maxX param is initially an X limit, but is also used as feedback. 0 = text was clipped to fit within, else maxX = next pos +// +static void CG_Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4_t color, const char* text, float adjust, int limit, int iMenuFont) +{ + qboolean bIsTrailingPunctuation; + + // this is kinda dirty, but... + // + int iFontIndex = MenuFontToHandle(iMenuFont); + + //float fMax = *maxX; + int iPixelLen = trap_R_Font_StrLenPixels(text, iFontIndex, scale); + if (x + iPixelLen > *maxX) + { + // whole text won't fit, so we need to print just the amount that does... + // Ok, this is slow and tacky, but only called occasionally, and it works... + // + char sTemp[4096]={0}; // lazy assumption + const char *psText = text; + char *psOut = &sTemp[0]; + char *psOutLastGood = psOut; + unsigned int uiLetter; + + while (*psText && (x + trap_R_Font_StrLenPixels(sTemp, iFontIndex, scale)<=*maxX) + && psOut < &sTemp[sizeof(sTemp)-1] // sanity + ) + { + int iAdvanceCount; + psOutLastGood = psOut; + + uiLetter = trap_AnyLanguage_ReadCharFromString(psText, &iAdvanceCount, &bIsTrailingPunctuation); + psText += iAdvanceCount; + + if (uiLetter > 255) + { + *psOut++ = uiLetter>>8; + *psOut++ = uiLetter&0xFF; + } + else + { + *psOut++ = uiLetter&0xFF; + } + } + *psOutLastGood = '\0'; + + *maxX = 0; // feedback + CG_Text_Paint(x, y, scale, color, sTemp, adjust, limit, ITEM_TEXTSTYLE_NORMAL, iMenuFont); + } + else + { + // whole text fits fine, so print it all... + // + *maxX = x + iPixelLen; // feedback the next position, as the caller expects + CG_Text_Paint(x, y, scale, color, text, adjust, limit, ITEM_TEXTSTYLE_NORMAL, iMenuFont); + } +} + + + +#define PIC_WIDTH 12 + +void CG_DrawNewTeamInfo(rectDef_t *rect, float text_x, float text_y, float scale, vec4_t color, qhandle_t shader) { + int xx; + float y; + int i, j, len, count; + const char *p; + vec4_t hcolor; + float pwidth, lwidth, maxx, leftOver; + clientInfo_t *ci; + gitem_t *item; + qhandle_t h; + + // max player name width + pwidth = 0; + count = (numSortedTeamPlayers > 8) ? 8 : numSortedTeamPlayers; + for (i = 0; i < count; i++) { + ci = cgs.clientinfo + sortedTeamPlayers[i]; + if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { + len = CG_Text_Width( ci->name, scale, 0); + if (len > pwidth) + pwidth = len; + } + } + + // max location name width + lwidth = 0; + for (i = 1; i < MAX_LOCATIONS; i++) { + p = CG_ConfigString(CS_LOCATIONS + i); + if (p && *p) { + len = CG_Text_Width(p, scale, 0); + if (len > lwidth) + lwidth = len; + } + } + + y = rect->y; + + for (i = 0; i < count; i++) { + ci = cgs.clientinfo + sortedTeamPlayers[i]; + if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { + + xx = rect->x + 1; + for (j = 0; j <= PW_NUM_POWERUPS; j++) { + if (ci->powerups & (1 << j)) { + + item = BG_FindItemForPowerup( j ); + + if (item) { + CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, trap_R_RegisterShader( item->icon ) ); + xx += PIC_WIDTH; + } + } + } + + // FIXME: max of 3 powerups shown properly + xx = rect->x + (PIC_WIDTH * 3) + 2; + + CG_GetColorForHealth( ci->health, ci->armor, hcolor ); + trap_R_SetColor(hcolor); + CG_DrawPic( xx, y + 1, PIC_WIDTH - 2, PIC_WIDTH - 2, cgs.media.heartShader ); + + //Com_sprintf (st, sizeof(st), "%3i %3i", ci->health, ci->armor); + //CG_Text_Paint(xx, y + text_y, scale, hcolor, st, 0, 0); + + // draw weapon icon + xx += PIC_WIDTH + 1; + +// weapon used is not that useful, use the space for task +#if 0 + if ( cg_weapons[ci->curWeapon].weaponIcon ) { + CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, cg_weapons[ci->curWeapon].weaponIcon ); + } else { + CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, cgs.media.deferShader ); + } +#endif + + trap_R_SetColor(NULL); + if (cgs.orderPending) { + // blink the icon + if ( cg.time > cgs.orderTime - 2500 && (cg.time >> 9 ) & 1 ) { + h = 0; + } else { + h = CG_StatusHandle(cgs.currentOrder); + } + } else { + h = CG_StatusHandle(ci->teamTask); + } + + if (h) { + CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, h); + } + + xx += PIC_WIDTH + 1; + + leftOver = rect->w - xx; + maxx = xx + leftOver / 3; + + + + CG_Text_Paint_Limit(&maxx, xx, y + text_y, scale, color, ci->name, 0, 0, FONT_MEDIUM); + + p = CG_ConfigString(CS_LOCATIONS + ci->location); + if (!p || !*p) { + p = "unknown"; + } + + xx += leftOver / 3 + 2; + maxx = rect->w - 4; + + CG_Text_Paint_Limit(&maxx, xx, y + text_y, scale, color, p, 0, 0, FONT_MEDIUM); + y += text_y + 2; + if ( y + text_y + 2 > rect->y + rect->h ) { + break; + } + + } + } +} + + +void CG_DrawTeamSpectators(rectDef_t *rect, float scale, vec4_t color, qhandle_t shader) { + if (cg.spectatorLen) { + float maxX; + + if (cg.spectatorWidth == -1) { + cg.spectatorWidth = 0; + cg.spectatorPaintX = rect->x + 1; + cg.spectatorPaintX2 = -1; + } + + if (cg.spectatorOffset > cg.spectatorLen) { + cg.spectatorOffset = 0; + cg.spectatorPaintX = rect->x + 1; + cg.spectatorPaintX2 = -1; + } + + if (cg.time > cg.spectatorTime) { + cg.spectatorTime = cg.time + 10; + if (cg.spectatorPaintX <= rect->x + 2) { + if (cg.spectatorOffset < cg.spectatorLen) { + cg.spectatorPaintX += CG_Text_Width(&cg.spectatorList[cg.spectatorOffset], scale, 1) - 1; + cg.spectatorOffset++; + } else { + cg.spectatorOffset = 0; + if (cg.spectatorPaintX2 >= 0) { + cg.spectatorPaintX = cg.spectatorPaintX2; + } else { + cg.spectatorPaintX = rect->x + rect->w - 2; + } + cg.spectatorPaintX2 = -1; + } + } else { + cg.spectatorPaintX--; + if (cg.spectatorPaintX2 >= 0) { + cg.spectatorPaintX2--; + } + } + } + + maxX = rect->x + rect->w - 2; + CG_Text_Paint_Limit(&maxX, cg.spectatorPaintX, rect->y + rect->h - 3, scale, color, &cg.spectatorList[cg.spectatorOffset], 0, 0, FONT_MEDIUM); + if (cg.spectatorPaintX2 >= 0) { + float maxX2 = rect->x + rect->w - 2; + CG_Text_Paint_Limit(&maxX2, cg.spectatorPaintX2, rect->y + rect->h - 3, scale, color, cg.spectatorList, 0, cg.spectatorOffset, FONT_MEDIUM); + } + if (cg.spectatorOffset && maxX > 0) { + // if we have an offset ( we are skipping the first part of the string ) and we fit the string + if (cg.spectatorPaintX2 == -1) { + cg.spectatorPaintX2 = rect->x + rect->w - 2; + } + } else { + cg.spectatorPaintX2 = -1; + } + + } +} + + + +void CG_DrawMedal(int ownerDraw, rectDef_t *rect, float scale, vec4_t color, qhandle_t shader) { + score_t *score = &cg.scores[cg.selectedScore]; + float value = 0; + char *text = NULL; + color[3] = 0.25; + + switch (ownerDraw) { + case CG_ACCURACY: + value = score->accuracy; + break; + case CG_ASSISTS: + value = score->assistCount; + break; + case CG_DEFEND: + value = score->defendCount; + break; + case CG_EXCELLENT: + value = score->excellentCount; + break; + case CG_IMPRESSIVE: + value = score->impressiveCount; + break; + case CG_PERFECT: + value = score->perfect; + break; + case CG_GAUNTLET: + value = score->guantletCount; + break; + case CG_CAPTURES: + value = score->captures; + break; + } + + if (value > 0) { + if (ownerDraw != CG_PERFECT) { + if (ownerDraw == CG_ACCURACY) { + text = va("%i%%", (int)value); + if (value > 50) { + color[3] = 1.0; + } + } else { + text = va("%i", (int)value); + color[3] = 1.0; + } + } else { + if (value) { + color[3] = 1.0; + } + text = "Wow"; + } + } + + trap_R_SetColor(color); + CG_DrawPic( rect->x, rect->y, rect->w, rect->h, shader ); + + if (text) { + color[3] = 1.0; + value = CG_Text_Width(text, scale, 0); + CG_Text_Paint(rect->x + (rect->w - value) / 2, rect->y + rect->h + 10 , scale, color, text, 0, 0, 0, FONT_MEDIUM); + } + trap_R_SetColor(NULL); + +} + + +// +void CG_OwnerDraw(float x, float y, float w, float h, float text_x, float text_y, int ownerDraw, int ownerDrawFlags, int align, float special, float scale, vec4_t color, qhandle_t shader, int textStyle,int font) { + +//Ignore all this, at least for now. May put some stat stuff back in menu files later. +#if 0 + rectDef_t rect; + + if ( cg_drawStatus.integer == 0 ) { + return; + } + + //if (ownerDrawFlags != 0 && !CG_OwnerDrawVisible(ownerDrawFlags)) { + // return; + //} + + rect.x = x; + rect.y = y; + rect.w = w; + rect.h = h; + + switch (ownerDraw) { + case CG_PLAYER_ARMOR_ICON: + CG_DrawPlayerArmorIcon(&rect, ownerDrawFlags & CG_SHOW_2DONLY); + break; + case CG_PLAYER_ARMOR_ICON2D: + CG_DrawPlayerArmorIcon(&rect, qtrue); + break; + case CG_PLAYER_ARMOR_VALUE: + CG_DrawPlayerArmorValue(&rect, scale, color, shader, textStyle); + break; + case CG_PLAYER_FORCE_VALUE: + CG_DrawPlayerForceValue(&rect, scale, color, shader, textStyle); + return ; + case CG_PLAYER_AMMO_ICON: + CG_DrawPlayerAmmoIcon(&rect, ownerDrawFlags & CG_SHOW_2DONLY); + break; + case CG_PLAYER_AMMO_ICON2D: + CG_DrawPlayerAmmoIcon(&rect, qtrue); + break; + case CG_PLAYER_AMMO_VALUE: + CG_DrawPlayerAmmoValue(&rect, scale, color, shader, textStyle); + break; + case CG_SELECTEDPLAYER_HEAD: + CG_DrawSelectedPlayerHead(&rect, ownerDrawFlags & CG_SHOW_2DONLY, qfalse); + break; + case CG_VOICE_HEAD: + CG_DrawSelectedPlayerHead(&rect, ownerDrawFlags & CG_SHOW_2DONLY, qtrue); + break; + case CG_VOICE_NAME: + CG_DrawSelectedPlayerName(&rect, scale, color, qtrue, textStyle); + break; + case CG_SELECTEDPLAYER_STATUS: + CG_DrawSelectedPlayerStatus(&rect); + break; + case CG_SELECTEDPLAYER_ARMOR: + CG_DrawSelectedPlayerArmor(&rect, scale, color, shader, textStyle); + break; + case CG_SELECTEDPLAYER_HEALTH: + CG_DrawSelectedPlayerHealth(&rect, scale, color, shader, textStyle); + break; + case CG_SELECTEDPLAYER_NAME: + CG_DrawSelectedPlayerName(&rect, scale, color, qfalse, textStyle); + break; + case CG_SELECTEDPLAYER_LOCATION: + CG_DrawSelectedPlayerLocation(&rect, scale, color, textStyle); + break; + case CG_SELECTEDPLAYER_WEAPON: + CG_DrawSelectedPlayerWeapon(&rect); + break; + case CG_SELECTEDPLAYER_POWERUP: + CG_DrawSelectedPlayerPowerup(&rect, ownerDrawFlags & CG_SHOW_2DONLY); + break; + case CG_PLAYER_HEAD: + CG_DrawPlayerHead(&rect, ownerDrawFlags & CG_SHOW_2DONLY); + break; + case CG_PLAYER_ITEM: + CG_DrawPlayerItem(&rect, scale, ownerDrawFlags & CG_SHOW_2DONLY); + break; + case CG_PLAYER_SCORE: + CG_DrawPlayerScore(&rect, scale, color, shader, textStyle); + break; + case CG_PLAYER_HEALTH: + CG_DrawPlayerHealth(&rect, scale, color, shader, textStyle); + break; + case CG_RED_SCORE: + CG_DrawRedScore(&rect, scale, color, shader, textStyle); + break; + case CG_BLUE_SCORE: + CG_DrawBlueScore(&rect, scale, color, shader, textStyle); + break; + case CG_RED_NAME: + CG_DrawRedName(&rect, scale, color, textStyle); + break; + case CG_BLUE_NAME: + CG_DrawBlueName(&rect, scale, color, textStyle); + break; + case CG_BLUE_FLAGHEAD: + CG_DrawBlueFlagHead(&rect); + break; + case CG_BLUE_FLAGSTATUS: + CG_DrawBlueFlagStatus(&rect, shader); + break; + case CG_BLUE_FLAGNAME: + CG_DrawBlueFlagName(&rect, scale, color, textStyle); + break; + case CG_RED_FLAGHEAD: + CG_DrawRedFlagHead(&rect); + break; + case CG_RED_FLAGSTATUS: + CG_DrawRedFlagStatus(&rect, shader); + break; + case CG_RED_FLAGNAME: + CG_DrawRedFlagName(&rect, scale, color, textStyle); + break; + case CG_PLAYER_LOCATION: + CG_DrawPlayerLocation(&rect, scale, color, textStyle); + break; + case CG_TEAM_COLOR: + CG_DrawTeamColor(&rect, color); + break; + case CG_CTF_POWERUP: + CG_DrawCTFPowerUp(&rect); + break; + case CG_AREA_POWERUP: + CG_DrawAreaPowerUp(&rect, align, special, scale, color); + break; + case CG_PLAYER_STATUS: + CG_DrawPlayerStatus(&rect); + break; + case CG_PLAYER_HASFLAG: + CG_DrawPlayerHasFlag(&rect, qfalse); + break; + case CG_PLAYER_HASFLAG2D: + CG_DrawPlayerHasFlag(&rect, qtrue); + break; + case CG_AREA_SYSTEMCHAT: + CG_DrawAreaSystemChat(&rect, scale, color, shader); + break; + case CG_AREA_TEAMCHAT: + CG_DrawAreaTeamChat(&rect, scale, color, shader); + break; + case CG_AREA_CHAT: + CG_DrawAreaChat(&rect, scale, color, shader); + break; + case CG_GAME_TYPE: + CG_DrawGameType(&rect, scale, color, shader, textStyle); + break; + case CG_GAME_STATUS: + CG_DrawGameStatus(&rect, scale, color, shader, textStyle); + break; + case CG_KILLER: + CG_DrawKiller(&rect, scale, color, shader, textStyle); + break; + case CG_ACCURACY: + case CG_ASSISTS: + case CG_DEFEND: + case CG_EXCELLENT: + case CG_IMPRESSIVE: + case CG_PERFECT: + case CG_GAUNTLET: + case CG_CAPTURES: + CG_DrawMedal(ownerDraw, &rect, scale, color, shader); + break; + case CG_SPECTATORS: + CG_DrawTeamSpectators(&rect, scale, color, shader); + break; + case CG_TEAMINFO: + if (cg_currentSelectedPlayer.integer == numSortedTeamPlayers) { + CG_DrawNewTeamInfo(&rect, text_x, text_y, scale, color, shader); + } + break; + case CG_CAPFRAGLIMIT: + CG_DrawCapFragLimit(&rect, scale, color, shader, textStyle); + break; + case CG_1STPLACE: + CG_Draw1stPlace(&rect, scale, color, shader, textStyle); + break; + case CG_2NDPLACE: + CG_Draw2ndPlace(&rect, scale, color, shader, textStyle); + break; + default: + break; + } +#endif +} + +void CG_MouseEvent(int x, int y) { + int n; + + if ( (cg.predictedPlayerState.pm_type == PM_NORMAL || cg.predictedPlayerState.pm_type == PM_FLOAT || cg.predictedPlayerState.pm_type == PM_SPECTATOR) && cg.showScores == qfalse) { + trap_Key_SetCatcher(0); + return; + } + + cgs.cursorX+= x; + if (cgs.cursorX < 0) + cgs.cursorX = 0; + else if (cgs.cursorX > 640) + cgs.cursorX = 640; + + cgs.cursorY += y; + if (cgs.cursorY < 0) + cgs.cursorY = 0; + else if (cgs.cursorY > 480) + cgs.cursorY = 480; + + n = Display_CursorType(cgs.cursorX, cgs.cursorY); + cgs.activeCursor = 0; + if (n == CURSOR_ARROW) { + cgs.activeCursor = cgs.media.selectCursor; + } else if (n == CURSOR_SIZER) { + cgs.activeCursor = cgs.media.sizeCursor; + } + + if (cgs.capturedItem) { + Display_MouseMove(cgs.capturedItem, x, y); + } else { + Display_MouseMove(NULL, cgs.cursorX, cgs.cursorY); + } + +} + +/* +================== +CG_HideTeamMenus +================== + +*/ +void CG_HideTeamMenu() { + Menus_CloseByName("teamMenu"); + Menus_CloseByName("getMenu"); +} + +/* +================== +CG_ShowTeamMenus +================== + +*/ +void CG_ShowTeamMenu() { + Menus_OpenByName("teamMenu"); +} + + + + +/* +================== +CG_EventHandling +================== + type 0 - no event handling + 1 - team menu + 2 - hud editor + +*/ +void CG_EventHandling(int type) { + cgs.eventHandling = type; + if (type == CGAME_EVENT_NONE) { + CG_HideTeamMenu(); + } else if (type == CGAME_EVENT_TEAMMENU) { + //CG_ShowTeamMenu(); + } else if (type == CGAME_EVENT_SCOREBOARD) { + } + +} + + + +void CG_KeyEvent(int key, qboolean down) { + + if (!down) { + return; + } + + if ( cg.predictedPlayerState.pm_type == PM_NORMAL || cg.predictedPlayerState.pm_type == PM_NORMAL || (cg.predictedPlayerState.pm_type == PM_SPECTATOR && cg.showScores == qfalse)) { + CG_EventHandling(CGAME_EVENT_NONE); + trap_Key_SetCatcher(0); + return; + } + + //if (key == trap_Key_GetKey("teamMenu") || !Display_CaptureItem(cgs.cursorX, cgs.cursorY)) { + // if we see this then we should always be visible + // CG_EventHandling(CGAME_EVENT_NONE); + // trap_Key_SetCatcher(0); + //} + + + + Display_HandleKey(key, down, cgs.cursorX, cgs.cursorY); + + if (cgs.capturedItem) { + cgs.capturedItem = NULL; + } else { + if (key == A_MOUSE2 && down) { + cgs.capturedItem = Display_CaptureItem(cgs.cursorX, cgs.cursorY); + } + } +} + +int CG_ClientNumFromName(const char *p) { + int i; + for (i = 0; i < cgs.maxclients; i++) { + if (cgs.clientinfo[i].infoValid && Q_stricmp(cgs.clientinfo[i].name, p) == 0) { + return i; + } + } + return -1; +} + +void CG_ShowResponseHead(void) { + Menus_OpenByName("voiceMenu"); + trap_Cvar_Set("cl_conXOffset", "72"); + cg.voiceTime = cg.time; +} + +void CG_RunMenuScript(char **args) { +} + +qboolean CG_DeferMenuScript (char **args) +{ + return qfalse; +} + +void CG_GetTeamColor(vec4_t *color) { + if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) { + (*color)[0] = 1.0f; + (*color)[3] = 0.25f; + (*color)[1] = (*color)[2] = 0.0f; + } else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) { + (*color)[0] = (*color)[1] = 0.0f; + (*color)[2] = 1.0f; + (*color)[3] = 0.25f; + } else { + (*color)[0] = (*color)[2] = 0.0f; + (*color)[1] = 0.17f; + (*color)[3] = 0.25f; + } +} + diff --git a/code/cgame/cg_newDraw.c b/code/cgame/cg_newDraw.c new file mode 100644 index 0000000..3984999 --- /dev/null +++ b/code/cgame/cg_newDraw.c @@ -0,0 +1,1020 @@ +#include "cg_local.h" +#include "../ui/ui_shared.h" + +extern displayContextDef_t cgDC; + + +// set in CG_ParseTeamInfo + +//static int sortedTeamPlayers[TEAM_MAXOVERLAY]; +//static int numSortedTeamPlayers; +int drawTeamOverlayModificationCount = -1; + +//static char systemChat[256]; +//static char teamChat1[256]; +//static char teamChat2[256]; + +void CG_InitTeamChat(void) { + memset(teamChat1, 0, sizeof(teamChat1)); + memset(teamChat2, 0, sizeof(teamChat2)); + memset(systemChat, 0, sizeof(systemChat)); +} + +void CG_SetPrintString(int type, const char *p) { + if (type == SYSTEM_PRINT) { + strcpy(systemChat, p); + } else { + strcpy(teamChat2, teamChat1); + strcpy(teamChat1, p); + } +} + +void CG_CheckOrderPending(void) { + if (cgs.gametype < GT_CTF) { + return; + } + if (cgs.orderPending) { + //clientInfo_t *ci = cgs.clientinfo + sortedTeamPlayers[cg_currentSelectedPlayer.integer]; + const char *p1, *p2, *b; + p1 = p2 = b = NULL; + switch (cgs.currentOrder) { + case TEAMTASK_OFFENSE: + p1 = VOICECHAT_ONOFFENSE; + p2 = VOICECHAT_OFFENSE; + b = "+button7; wait; -button7"; + break; + case TEAMTASK_DEFENSE: + p1 = VOICECHAT_ONDEFENSE; + p2 = VOICECHAT_DEFEND; + b = "+button8; wait; -button8"; + break; + case TEAMTASK_PATROL: + p1 = VOICECHAT_ONPATROL; + p2 = VOICECHAT_PATROL; + b = "+button9; wait; -button9"; + break; + case TEAMTASK_FOLLOW: + p1 = VOICECHAT_ONFOLLOW; + p2 = VOICECHAT_FOLLOWME; + b = "+button10; wait; -button10"; + break; + case TEAMTASK_CAMP: + p1 = VOICECHAT_ONCAMPING; + p2 = VOICECHAT_CAMP; + break; + case TEAMTASK_RETRIEVE: + p1 = VOICECHAT_ONGETFLAG; + p2 = VOICECHAT_RETURNFLAG; + break; + case TEAMTASK_ESCORT: + p1 = VOICECHAT_ONFOLLOWCARRIER; + p2 = VOICECHAT_FOLLOWFLAGCARRIER; + break; + } + + if (cg_currentSelectedPlayer.integer == numSortedTeamPlayers) { + // to everyone + trap_SendConsoleCommand(va("cmd vsay_team %s\n", p2)); + } else { + // for the player self + if (sortedTeamPlayers[cg_currentSelectedPlayer.integer] == cg.snap->ps.clientNum && p1) { + trap_SendConsoleCommand(va("teamtask %i\n", cgs.currentOrder)); + //trap_SendConsoleCommand(va("cmd say_team %s\n", p2)); + trap_SendConsoleCommand(va("cmd vsay_team %s\n", p1)); + } else if (p2) { + //trap_SendConsoleCommand(va("cmd say_team %s, %s\n", ci->name,p)); + trap_SendConsoleCommand(va("cmd vtell %d %s\n", sortedTeamPlayers[cg_currentSelectedPlayer.integer], p2)); + } + } + if (b) { + trap_SendConsoleCommand(b); + } + cgs.orderPending = qfalse; + } +} + +static void CG_SetSelectedPlayerName() { + if (cg_currentSelectedPlayer.integer >= 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { + clientInfo_t *ci = cgs.clientinfo + sortedTeamPlayers[cg_currentSelectedPlayer.integer]; + if (ci) { + trap_Cvar_Set("cg_selectedPlayerName", ci->name); + trap_Cvar_Set("cg_selectedPlayer", va("%d", sortedTeamPlayers[cg_currentSelectedPlayer.integer])); + cgs.currentOrder = ci->teamTask; + } + } else { + trap_Cvar_Set("cg_selectedPlayerName", "Everyone"); + } +} +int CG_GetSelectedPlayer() { + if (cg_currentSelectedPlayer.integer < 0 || cg_currentSelectedPlayer.integer >= numSortedTeamPlayers) { + cg_currentSelectedPlayer.integer = 0; + } + return cg_currentSelectedPlayer.integer; +} + +void CG_SelectNextPlayer(void) { + CG_CheckOrderPending(); + if (cg_currentSelectedPlayer.integer >= 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { + cg_currentSelectedPlayer.integer++; + } else { + cg_currentSelectedPlayer.integer = 0; + } + CG_SetSelectedPlayerName(); +} + +void CG_SelectPrevPlayer(void) { + CG_CheckOrderPending(); + if (cg_currentSelectedPlayer.integer > 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { + cg_currentSelectedPlayer.integer--; + } else { + cg_currentSelectedPlayer.integer = numSortedTeamPlayers; + } + CG_SetSelectedPlayerName(); +} + + +qhandle_t CG_StatusHandle(int task) { + qhandle_t h = cgs.media.assaultShader; + switch (task) { + case TEAMTASK_OFFENSE : + h = cgs.media.assaultShader; + break; + case TEAMTASK_DEFENSE : + h = cgs.media.defendShader; + break; + case TEAMTASK_PATROL : + h = cgs.media.patrolShader; + break; + case TEAMTASK_FOLLOW : + h = cgs.media.followShader; + break; + case TEAMTASK_CAMP : + h = cgs.media.campShader; + break; + case TEAMTASK_RETRIEVE : + h = cgs.media.retrieveShader; + break; + case TEAMTASK_ESCORT : + h = cgs.media.escortShader; + break; + default : + h = cgs.media.assaultShader; + break; + } + return h; +} + + +float CG_GetValue(int ownerDraw) { + centity_t *cent; + clientInfo_t *ci; + playerState_t *ps; + + cent = &cg_entities[cg.snap->ps.clientNum]; + ps = &cg.snap->ps; + + switch (ownerDraw) { + case CG_SELECTEDPLAYER_ARMOR: + ci = cgs.clientinfo + sortedTeamPlayers[CG_GetSelectedPlayer()]; + return ci->armor; + break; + case CG_SELECTEDPLAYER_HEALTH: + ci = cgs.clientinfo + sortedTeamPlayers[CG_GetSelectedPlayer()]; + return ci->health; + break; + case CG_PLAYER_ARMOR_VALUE: + return ps->stats[STAT_ARMOR]; + break; + case CG_PLAYER_AMMO_VALUE: + if ( cent->currentState.weapon ) + { + return ps->ammo[weaponData[cent->currentState.weapon].ammoIndex]; + } + break; + case CG_PLAYER_SCORE: + return cg.snap->ps.persistant[PERS_SCORE]; + break; + case CG_PLAYER_HEALTH: + return ps->stats[STAT_HEALTH]; + break; + case CG_RED_SCORE: + return cgs.scores1; + break; + case CG_BLUE_SCORE: + return cgs.scores2; + break; + case CG_PLAYER_FORCE_VALUE: + return ps->fd.forcePower; + break; + default: + break; + } + return -1; +} + +qboolean CG_OtherTeamHasFlag(void) { + if (cgs.gametype == GT_CTF || cgs.gametype == GT_CTY) { + int team = cg.snap->ps.persistant[PERS_TEAM]; + if (team == TEAM_RED && cgs.redflag == FLAG_TAKEN) { + return qtrue; + } else if (team == TEAM_BLUE && cgs.blueflag == FLAG_TAKEN) { + return qtrue; + } else { + return qfalse; + } + } + return qfalse; +} + +qboolean CG_YourTeamHasFlag(void) { + if (cgs.gametype == GT_CTF || cgs.gametype == GT_CTY) { + int team = cg.snap->ps.persistant[PERS_TEAM]; + if (team == TEAM_RED && cgs.blueflag == FLAG_TAKEN) { + return qtrue; + } else if (team == TEAM_BLUE && cgs.redflag == FLAG_TAKEN) { + return qtrue; + } else { + return qfalse; + } + } + return qfalse; +} + +// THINKABOUTME: should these be exclusive or inclusive.. +// +qboolean CG_OwnerDrawVisible(int flags) { + + if (flags & CG_SHOW_TEAMINFO) { + return (cg_currentSelectedPlayer.integer == numSortedTeamPlayers); + } + + if (flags & CG_SHOW_NOTEAMINFO) { + return !(cg_currentSelectedPlayer.integer == numSortedTeamPlayers); + } + + if (flags & CG_SHOW_OTHERTEAMHASFLAG) { + return CG_OtherTeamHasFlag(); + } + + if (flags & CG_SHOW_YOURTEAMHASENEMYFLAG) { + return CG_YourTeamHasFlag(); + } + + if (flags & (CG_SHOW_BLUE_TEAM_HAS_REDFLAG | CG_SHOW_RED_TEAM_HAS_BLUEFLAG)) { + if (flags & CG_SHOW_BLUE_TEAM_HAS_REDFLAG && (cgs.redflag == FLAG_TAKEN || cgs.flagStatus == FLAG_TAKEN_RED)) { + return qtrue; + } else if (flags & CG_SHOW_RED_TEAM_HAS_BLUEFLAG && (cgs.blueflag == FLAG_TAKEN || cgs.flagStatus == FLAG_TAKEN_BLUE)) { + return qtrue; + } + return qfalse; + } + + if (flags & CG_SHOW_ANYTEAMGAME) { + if( cgs.gametype >= GT_TEAM) { + return qtrue; + } + } + + if (flags & CG_SHOW_ANYNONTEAMGAME) { + if( cgs.gametype < GT_TEAM) { + return qtrue; + } + } + + if (flags & CG_SHOW_CTF) { + if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { + return qtrue; + } + } + + if (flags & CG_SHOW_HEALTHCRITICAL) { + if (cg.snap->ps.stats[STAT_HEALTH] < 25) { + return qtrue; + } + } + + if (flags & CG_SHOW_HEALTHOK) { + if (cg.snap->ps.stats[STAT_HEALTH] >= 25) { + return qtrue; + } + } + + if (flags & CG_SHOW_SINGLEPLAYER) { + if( cgs.gametype == GT_SINGLE_PLAYER ) { + return qtrue; + } + } + + if (flags & CG_SHOW_TOURNAMENT) { + if( cgs.gametype == GT_TOURNAMENT ) { + return qtrue; + } + } + + if (flags & CG_SHOW_DURINGINCOMINGVOICE) { + } + + if (flags & CG_SHOW_IF_PLAYER_HAS_FLAG) { + if (cg.snap->ps.powerups[PW_REDFLAG] || cg.snap->ps.powerups[PW_BLUEFLAG] || cg.snap->ps.powerups[PW_NEUTRALFLAG]) { + return qtrue; + } + } + return qfalse; +} + + +const char *CG_GetKillerText(void) { + static const char *s = ""; + if ( cg.killerName[0] ) { + s = va("%s %s", CG_GetStripEdString("INGAMETEXT", "KILLEDBY"), cg.killerName ); + } + return s; +} + + +const char *CG_GetGameStatusText(void) { + static const char *s = ""; + if ( cgs.gametype < GT_TEAM) { + if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR ) + { + char sPlaceWith[256]; + trap_SP_GetStringTextString("INGAMETEXT_PLACE_WITH", sPlaceWith, sizeof(sPlaceWith)); + + s = va("%s %s %i",CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), sPlaceWith, cg.snap->ps.persistant[PERS_SCORE] ); + } + } else { + if ( cg.teamScores[0] == cg.teamScores[1] ) { + s = va("Teams are tied at %i", cg.teamScores[0] ); + } else if ( cg.teamScores[0] >= cg.teamScores[1] ) { + s = va("Red leads Blue, %i to %i", cg.teamScores[0], cg.teamScores[1] ); + } else { + s = va("Blue leads Red, %i to %i", cg.teamScores[1], cg.teamScores[0] ); + } + } + return s; +} + +const char *CG_GameTypeString(void) { + if ( cgs.gametype == GT_FFA ) { + return "Free For All"; + } else if ( cgs.gametype == GT_HOLOCRON ) { + return "Holocron FFA"; + } else if ( cgs.gametype == GT_JEDIMASTER ) { + return "Jedi Master"; + } else if ( cgs.gametype == GT_TEAM ) { + return "Team FFA"; + } else if ( cgs.gametype == GT_SAGA ) { + return "N/A"; + } else if ( cgs.gametype == GT_CTF ) { + return "Capture the Flag"; + } else if ( cgs.gametype == GT_CTY ) { + return "Capture the Ysalamiri"; + } + return ""; +} + +extern int MenuFontToHandle(int iMenuFont); + +// maxX param is initially an X limit, but is also used as feedback. 0 = text was clipped to fit within, else maxX = next pos +// +static void CG_Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4_t color, const char* text, float adjust, int limit, int iMenuFont) +{ + qboolean bIsTrailingPunctuation; + + // this is kinda dirty, but... + // + int iFontIndex = MenuFontToHandle(iMenuFont); + + //float fMax = *maxX; + int iPixelLen = trap_R_Font_StrLenPixels(text, iFontIndex, scale); + if (x + iPixelLen > *maxX) + { + // whole text won't fit, so we need to print just the amount that does... + // Ok, this is slow and tacky, but only called occasionally, and it works... + // + char sTemp[4096]={0}; // lazy assumption + const char *psText = text; + char *psOut = &sTemp[0]; + char *psOutLastGood = psOut; + unsigned int uiLetter; + + while (*psText && (x + trap_R_Font_StrLenPixels(sTemp, iFontIndex, scale)<=*maxX) + && psOut < &sTemp[sizeof(sTemp)-1] // sanity + ) + { + int iAdvanceCount; + psOutLastGood = psOut; + + uiLetter = trap_AnyLanguage_ReadCharFromString(psText, &iAdvanceCount, &bIsTrailingPunctuation); + psText += iAdvanceCount; + + if (uiLetter > 255) + { + *psOut++ = uiLetter>>8; + *psOut++ = uiLetter&0xFF; + } + else + { + *psOut++ = uiLetter&0xFF; + } + } + *psOutLastGood = '\0'; + + *maxX = 0; // feedback + CG_Text_Paint(x, y, scale, color, sTemp, adjust, limit, ITEM_TEXTSTYLE_NORMAL, iMenuFont); + } + else + { + // whole text fits fine, so print it all... + // + *maxX = x + iPixelLen; // feedback the next position, as the caller expects + CG_Text_Paint(x, y, scale, color, text, adjust, limit, ITEM_TEXTSTYLE_NORMAL, iMenuFont); + } +} + + + +#define PIC_WIDTH 12 + +void CG_DrawNewTeamInfo(rectDef_t *rect, float text_x, float text_y, float scale, vec4_t color, qhandle_t shader) { + int xx; + float y; + int i, j, len, count; + const char *p; + vec4_t hcolor; + float pwidth, lwidth, maxx, leftOver; + clientInfo_t *ci; + gitem_t *item; + qhandle_t h; + + // max player name width + pwidth = 0; + count = (numSortedTeamPlayers > 8) ? 8 : numSortedTeamPlayers; + for (i = 0; i < count; i++) { + ci = cgs.clientinfo + sortedTeamPlayers[i]; + if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { + len = CG_Text_Width( ci->name, scale, 0); + if (len > pwidth) + pwidth = len; + } + } + + // max location name width + lwidth = 0; + for (i = 1; i < MAX_LOCATIONS; i++) { + p = CG_ConfigString(CS_LOCATIONS + i); + if (p && *p) { + len = CG_Text_Width(p, scale, 0); + if (len > lwidth) + lwidth = len; + } + } + + y = rect->y; + + for (i = 0; i < count; i++) { + ci = cgs.clientinfo + sortedTeamPlayers[i]; + if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { + + xx = rect->x + 1; + for (j = 0; j <= PW_NUM_POWERUPS; j++) { + if (ci->powerups & (1 << j)) { + + item = BG_FindItemForPowerup( j ); + + if (item) { + CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, trap_R_RegisterShader( item->icon ) ); + xx += PIC_WIDTH; + } + } + } + + // FIXME: max of 3 powerups shown properly + xx = rect->x + (PIC_WIDTH * 3) + 2; + + CG_GetColorForHealth( ci->health, ci->armor, hcolor ); + trap_R_SetColor(hcolor); + CG_DrawPic( xx, y + 1, PIC_WIDTH - 2, PIC_WIDTH - 2, cgs.media.heartShader ); + + //Com_sprintf (st, sizeof(st), "%3i %3i", ci->health, ci->armor); + //CG_Text_Paint(xx, y + text_y, scale, hcolor, st, 0, 0); + + // draw weapon icon + xx += PIC_WIDTH + 1; + +// weapon used is not that useful, use the space for task +#if 0 + if ( cg_weapons[ci->curWeapon].weaponIcon ) { + CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, cg_weapons[ci->curWeapon].weaponIcon ); + } else { + CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, cgs.media.deferShader ); + } +#endif + + trap_R_SetColor(NULL); + if (cgs.orderPending) { + // blink the icon + if ( cg.time > cgs.orderTime - 2500 && (cg.time >> 9 ) & 1 ) { + h = 0; + } else { + h = CG_StatusHandle(cgs.currentOrder); + } + } else { + h = CG_StatusHandle(ci->teamTask); + } + + if (h) { + CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, h); + } + + xx += PIC_WIDTH + 1; + + leftOver = rect->w - xx; + maxx = xx + leftOver / 3; + + + + CG_Text_Paint_Limit(&maxx, xx, y + text_y, scale, color, ci->name, 0, 0, FONT_MEDIUM); + + p = CG_ConfigString(CS_LOCATIONS + ci->location); + if (!p || !*p) { + p = "unknown"; + } + + xx += leftOver / 3 + 2; + maxx = rect->w - 4; + + CG_Text_Paint_Limit(&maxx, xx, y + text_y, scale, color, p, 0, 0, FONT_MEDIUM); + y += text_y + 2; + if ( y + text_y + 2 > rect->y + rect->h ) { + break; + } + + } + } +} + + +void CG_DrawTeamSpectators(rectDef_t *rect, float scale, vec4_t color, qhandle_t shader) { + if (cg.spectatorLen) { + float maxX; + + if (cg.spectatorWidth == -1) { + cg.spectatorWidth = 0; + cg.spectatorPaintX = rect->x + 1; + cg.spectatorPaintX2 = -1; + } + + if (cg.spectatorOffset > cg.spectatorLen) { + cg.spectatorOffset = 0; + cg.spectatorPaintX = rect->x + 1; + cg.spectatorPaintX2 = -1; + } + + if (cg.time > cg.spectatorTime) { + cg.spectatorTime = cg.time + 10; + if (cg.spectatorPaintX <= rect->x + 2) { + if (cg.spectatorOffset < cg.spectatorLen) { + cg.spectatorPaintX += CG_Text_Width(&cg.spectatorList[cg.spectatorOffset], scale, 1) - 1; + cg.spectatorOffset++; + } else { + cg.spectatorOffset = 0; + if (cg.spectatorPaintX2 >= 0) { + cg.spectatorPaintX = cg.spectatorPaintX2; + } else { + cg.spectatorPaintX = rect->x + rect->w - 2; + } + cg.spectatorPaintX2 = -1; + } + } else { + cg.spectatorPaintX--; + if (cg.spectatorPaintX2 >= 0) { + cg.spectatorPaintX2--; + } + } + } + + maxX = rect->x + rect->w - 2; + CG_Text_Paint_Limit(&maxX, cg.spectatorPaintX, rect->y + rect->h - 3, scale, color, &cg.spectatorList[cg.spectatorOffset], 0, 0, FONT_MEDIUM); + if (cg.spectatorPaintX2 >= 0) { + float maxX2 = rect->x + rect->w - 2; + CG_Text_Paint_Limit(&maxX2, cg.spectatorPaintX2, rect->y + rect->h - 3, scale, color, cg.spectatorList, 0, cg.spectatorOffset, FONT_MEDIUM); + } + if (cg.spectatorOffset && maxX > 0) { + // if we have an offset ( we are skipping the first part of the string ) and we fit the string + if (cg.spectatorPaintX2 == -1) { + cg.spectatorPaintX2 = rect->x + rect->w - 2; + } + } else { + cg.spectatorPaintX2 = -1; + } + + } +} + + + +void CG_DrawMedal(int ownerDraw, rectDef_t *rect, float scale, vec4_t color, qhandle_t shader) { + score_t *score = &cg.scores[cg.selectedScore]; + float value = 0; + char *text = NULL; + color[3] = 0.25; + + switch (ownerDraw) { + case CG_ACCURACY: + value = score->accuracy; + break; + case CG_ASSISTS: + value = score->assistCount; + break; + case CG_DEFEND: + value = score->defendCount; + break; + case CG_EXCELLENT: + value = score->excellentCount; + break; + case CG_IMPRESSIVE: + value = score->impressiveCount; + break; + case CG_PERFECT: + value = score->perfect; + break; + case CG_GAUNTLET: + value = score->guantletCount; + break; + case CG_CAPTURES: + value = score->captures; + break; + } + + if (value > 0) { + if (ownerDraw != CG_PERFECT) { + if (ownerDraw == CG_ACCURACY) { + text = va("%i%%", (int)value); + if (value > 50) { + color[3] = 1.0; + } + } else { + text = va("%i", (int)value); + color[3] = 1.0; + } + } else { + if (value) { + color[3] = 1.0; + } + text = "Wow"; + } + } + + trap_R_SetColor(color); + CG_DrawPic( rect->x, rect->y, rect->w, rect->h, shader ); + + if (text) { + color[3] = 1.0; + value = CG_Text_Width(text, scale, 0); + CG_Text_Paint(rect->x + (rect->w - value) / 2, rect->y + rect->h + 10 , scale, color, text, 0, 0, 0, FONT_MEDIUM); + } + trap_R_SetColor(NULL); + +} + + +// +void CG_OwnerDraw(float x, float y, float w, float h, float text_x, float text_y, int ownerDraw, int ownerDrawFlags, int align, float special, float scale, vec4_t color, qhandle_t shader, int textStyle,int font) { + +//Ignore all this, at least for now. May put some stat stuff back in menu files later. +#if 0 + rectDef_t rect; + + if ( cg_drawStatus.integer == 0 ) { + return; + } + + //if (ownerDrawFlags != 0 && !CG_OwnerDrawVisible(ownerDrawFlags)) { + // return; + //} + + rect.x = x; + rect.y = y; + rect.w = w; + rect.h = h; + + switch (ownerDraw) { + case CG_PLAYER_ARMOR_ICON: + CG_DrawPlayerArmorIcon(&rect, ownerDrawFlags & CG_SHOW_2DONLY); + break; + case CG_PLAYER_ARMOR_ICON2D: + CG_DrawPlayerArmorIcon(&rect, qtrue); + break; + case CG_PLAYER_ARMOR_VALUE: + CG_DrawPlayerArmorValue(&rect, scale, color, shader, textStyle); + break; + case CG_PLAYER_FORCE_VALUE: + CG_DrawPlayerForceValue(&rect, scale, color, shader, textStyle); + return ; + case CG_PLAYER_AMMO_ICON: + CG_DrawPlayerAmmoIcon(&rect, ownerDrawFlags & CG_SHOW_2DONLY); + break; + case CG_PLAYER_AMMO_ICON2D: + CG_DrawPlayerAmmoIcon(&rect, qtrue); + break; + case CG_PLAYER_AMMO_VALUE: + CG_DrawPlayerAmmoValue(&rect, scale, color, shader, textStyle); + break; + case CG_SELECTEDPLAYER_HEAD: + CG_DrawSelectedPlayerHead(&rect, ownerDrawFlags & CG_SHOW_2DONLY, qfalse); + break; + case CG_VOICE_HEAD: + CG_DrawSelectedPlayerHead(&rect, ownerDrawFlags & CG_SHOW_2DONLY, qtrue); + break; + case CG_VOICE_NAME: + CG_DrawSelectedPlayerName(&rect, scale, color, qtrue, textStyle); + break; + case CG_SELECTEDPLAYER_STATUS: + CG_DrawSelectedPlayerStatus(&rect); + break; + case CG_SELECTEDPLAYER_ARMOR: + CG_DrawSelectedPlayerArmor(&rect, scale, color, shader, textStyle); + break; + case CG_SELECTEDPLAYER_HEALTH: + CG_DrawSelectedPlayerHealth(&rect, scale, color, shader, textStyle); + break; + case CG_SELECTEDPLAYER_NAME: + CG_DrawSelectedPlayerName(&rect, scale, color, qfalse, textStyle); + break; + case CG_SELECTEDPLAYER_LOCATION: + CG_DrawSelectedPlayerLocation(&rect, scale, color, textStyle); + break; + case CG_SELECTEDPLAYER_WEAPON: + CG_DrawSelectedPlayerWeapon(&rect); + break; + case CG_SELECTEDPLAYER_POWERUP: + CG_DrawSelectedPlayerPowerup(&rect, ownerDrawFlags & CG_SHOW_2DONLY); + break; + case CG_PLAYER_HEAD: + CG_DrawPlayerHead(&rect, ownerDrawFlags & CG_SHOW_2DONLY); + break; + case CG_PLAYER_ITEM: + CG_DrawPlayerItem(&rect, scale, ownerDrawFlags & CG_SHOW_2DONLY); + break; + case CG_PLAYER_SCORE: + CG_DrawPlayerScore(&rect, scale, color, shader, textStyle); + break; + case CG_PLAYER_HEALTH: + CG_DrawPlayerHealth(&rect, scale, color, shader, textStyle); + break; + case CG_RED_SCORE: + CG_DrawRedScore(&rect, scale, color, shader, textStyle); + break; + case CG_BLUE_SCORE: + CG_DrawBlueScore(&rect, scale, color, shader, textStyle); + break; + case CG_RED_NAME: + CG_DrawRedName(&rect, scale, color, textStyle); + break; + case CG_BLUE_NAME: + CG_DrawBlueName(&rect, scale, color, textStyle); + break; + case CG_BLUE_FLAGHEAD: + CG_DrawBlueFlagHead(&rect); + break; + case CG_BLUE_FLAGSTATUS: + CG_DrawBlueFlagStatus(&rect, shader); + break; + case CG_BLUE_FLAGNAME: + CG_DrawBlueFlagName(&rect, scale, color, textStyle); + break; + case CG_RED_FLAGHEAD: + CG_DrawRedFlagHead(&rect); + break; + case CG_RED_FLAGSTATUS: + CG_DrawRedFlagStatus(&rect, shader); + break; + case CG_RED_FLAGNAME: + CG_DrawRedFlagName(&rect, scale, color, textStyle); + break; + case CG_PLAYER_LOCATION: + CG_DrawPlayerLocation(&rect, scale, color, textStyle); + break; + case CG_TEAM_COLOR: + CG_DrawTeamColor(&rect, color); + break; + case CG_CTF_POWERUP: + CG_DrawCTFPowerUp(&rect); + break; + case CG_AREA_POWERUP: + CG_DrawAreaPowerUp(&rect, align, special, scale, color); + break; + case CG_PLAYER_STATUS: + CG_DrawPlayerStatus(&rect); + break; + case CG_PLAYER_HASFLAG: + CG_DrawPlayerHasFlag(&rect, qfalse); + break; + case CG_PLAYER_HASFLAG2D: + CG_DrawPlayerHasFlag(&rect, qtrue); + break; + case CG_AREA_SYSTEMCHAT: + CG_DrawAreaSystemChat(&rect, scale, color, shader); + break; + case CG_AREA_TEAMCHAT: + CG_DrawAreaTeamChat(&rect, scale, color, shader); + break; + case CG_AREA_CHAT: + CG_DrawAreaChat(&rect, scale, color, shader); + break; + case CG_GAME_TYPE: + CG_DrawGameType(&rect, scale, color, shader, textStyle); + break; + case CG_GAME_STATUS: + CG_DrawGameStatus(&rect, scale, color, shader, textStyle); + break; + case CG_KILLER: + CG_DrawKiller(&rect, scale, color, shader, textStyle); + break; + case CG_ACCURACY: + case CG_ASSISTS: + case CG_DEFEND: + case CG_EXCELLENT: + case CG_IMPRESSIVE: + case CG_PERFECT: + case CG_GAUNTLET: + case CG_CAPTURES: + CG_DrawMedal(ownerDraw, &rect, scale, color, shader); + break; + case CG_SPECTATORS: + CG_DrawTeamSpectators(&rect, scale, color, shader); + break; + case CG_TEAMINFO: + if (cg_currentSelectedPlayer.integer == numSortedTeamPlayers) { + CG_DrawNewTeamInfo(&rect, text_x, text_y, scale, color, shader); + } + break; + case CG_CAPFRAGLIMIT: + CG_DrawCapFragLimit(&rect, scale, color, shader, textStyle); + break; + case CG_1STPLACE: + CG_Draw1stPlace(&rect, scale, color, shader, textStyle); + break; + case CG_2NDPLACE: + CG_Draw2ndPlace(&rect, scale, color, shader, textStyle); + break; + default: + break; + } +#endif +} + +void CG_MouseEvent(int x, int y) { + int n; + + if ( (cg.predictedPlayerState.pm_type == PM_NORMAL || cg.predictedPlayerState.pm_type == PM_FLOAT || cg.predictedPlayerState.pm_type == PM_SPECTATOR) && cg.showScores == qfalse) { + trap_Key_SetCatcher(0); + return; + } + + cgs.cursorX+= x; + if (cgs.cursorX < 0) + cgs.cursorX = 0; + else if (cgs.cursorX > 640) + cgs.cursorX = 640; + + cgs.cursorY += y; + if (cgs.cursorY < 0) + cgs.cursorY = 0; + else if (cgs.cursorY > 480) + cgs.cursorY = 480; + + n = Display_CursorType(cgs.cursorX, cgs.cursorY); + cgs.activeCursor = 0; + if (n == CURSOR_ARROW) { + cgs.activeCursor = cgs.media.selectCursor; + } else if (n == CURSOR_SIZER) { + cgs.activeCursor = cgs.media.sizeCursor; + } + + if (cgs.capturedItem) { + Display_MouseMove(cgs.capturedItem, x, y); + } else { + Display_MouseMove(NULL, cgs.cursorX, cgs.cursorY); + } + +} + +/* +================== +CG_HideTeamMenus +================== + +*/ +void CG_HideTeamMenu() { + Menus_CloseByName("teamMenu"); + Menus_CloseByName("getMenu"); +} + +/* +================== +CG_ShowTeamMenus +================== + +*/ +void CG_ShowTeamMenu() { + Menus_OpenByName("teamMenu"); +} + + + + +/* +================== +CG_EventHandling +================== + type 0 - no event handling + 1 - team menu + 2 - hud editor + +*/ +void CG_EventHandling(int type) { + cgs.eventHandling = type; + if (type == CGAME_EVENT_NONE) { + CG_HideTeamMenu(); + } else if (type == CGAME_EVENT_TEAMMENU) { + //CG_ShowTeamMenu(); + } else if (type == CGAME_EVENT_SCOREBOARD) { + } + +} + + + +void CG_KeyEvent(int key, qboolean down) { + + if (!down) { + return; + } + + if ( cg.predictedPlayerState.pm_type == PM_NORMAL || cg.predictedPlayerState.pm_type == PM_NORMAL || (cg.predictedPlayerState.pm_type == PM_SPECTATOR && cg.showScores == qfalse)) { + CG_EventHandling(CGAME_EVENT_NONE); + trap_Key_SetCatcher(0); + return; + } + + //if (key == trap_Key_GetKey("teamMenu") || !Display_CaptureItem(cgs.cursorX, cgs.cursorY)) { + // if we see this then we should always be visible + // CG_EventHandling(CGAME_EVENT_NONE); + // trap_Key_SetCatcher(0); + //} + + + + Display_HandleKey(key, down, cgs.cursorX, cgs.cursorY); + + if (cgs.capturedItem) { + cgs.capturedItem = NULL; + } else { + if (key == A_MOUSE2 && down) { + cgs.capturedItem = Display_CaptureItem(cgs.cursorX, cgs.cursorY); + } + } +} + +int CG_ClientNumFromName(const char *p) { + int i; + for (i = 0; i < cgs.maxclients; i++) { + if (cgs.clientinfo[i].infoValid && Q_stricmp(cgs.clientinfo[i].name, p) == 0) { + return i; + } + } + return -1; +} + +void CG_ShowResponseHead(void) { + Menus_OpenByName("voiceMenu"); + trap_Cvar_Set("cl_conXOffset", "72"); + cg.voiceTime = cg.time; +} + +void CG_RunMenuScript(char **args) { +} + +qboolean CG_DeferMenuScript (char **args) +{ + return qfalse; +} + +void CG_GetTeamColor(vec4_t *color) { + if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) { + (*color)[0] = 1.0f; + (*color)[3] = 0.25f; + (*color)[1] = (*color)[2] = 0.0f; + } else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) { + (*color)[0] = (*color)[1] = 0.0f; + (*color)[2] = 1.0f; + (*color)[3] = 0.25f; + } else { + (*color)[0] = (*color)[2] = 0.0f; + (*color)[1] = 0.17f; + (*color)[3] = 0.25f; + } +} + diff --git a/code/cgame/cg_playeranimate (2).c b/code/cgame/cg_playeranimate (2).c new file mode 100644 index 0000000..e69de29 diff --git a/code/cgame/cg_playeranimate.c b/code/cgame/cg_playeranimate.c new file mode 100644 index 0000000..e69de29 diff --git a/code/cgame/cg_players (2).c b/code/cgame/cg_players (2).c new file mode 100644 index 0000000..effc380 --- /dev/null +++ b/code/cgame/cg_players (2).c @@ -0,0 +1,7529 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_players.c -- handle the media and animation for player entities +#include "cg_local.h" +#include "..\ghoul2\g2.h" + +extern stringID_table_t animTable [MAX_ANIMATIONS+1]; + +char *cg_customSoundNames[MAX_CUSTOM_SOUNDS] = { + "*death1.wav", + "*death2.wav", + "*death3.wav", + "*jump1.wav", + "*pain25.wav", + "*pain50.wav", + "*pain75.wav", + "*pain100.wav", + "*falling1.wav", + "*choke1.wav", + "*choke2.wav", + "*choke3.wav", + "*gasp.wav", + "*land1.wav", + "*falling1.wav", + "*taunt.wav" +}; + + +/* +================ +CG_CustomSound + +================ +*/ +sfxHandle_t CG_CustomSound( int clientNum, const char *soundName ) { + clientInfo_t *ci; + int i; + + if ( soundName[0] != '*' ) { + return trap_S_RegisterSound( soundName ); + } + + if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { + clientNum = 0; + } + ci = &cgs.clientinfo[ clientNum ]; + + for ( i = 0 ; i < MAX_CUSTOM_SOUNDS && cg_customSoundNames[i] ; i++ ) { + if ( !strcmp( soundName, cg_customSoundNames[i] ) ) { + return ci->sounds[i]; + } + } + + CG_Error( "Unknown custom sound: %s", soundName ); + return 0; +} + + + +/* +============================================================================= + +CLIENT INFO + +============================================================================= +*/ + +/* +========================== +CG_NeedAnimSequence + +Called to check if models are missing required animation sequences +We do not list all used animations here but this check should eliminate +a broad range of unsupported models. At least the ones that are included, +which is all we really care about. +========================== +*/ +qboolean CG_NeedAnimSequence(int anim) +{ + if (anim >= BOTH_DEATH1 && + anim <= BOTH_DEATH19) + { + return qtrue; + } + + if (anim >= BOTH_DISMEMBER_HEAD1 && + anim <= BOTH_DISMEMBER_LARM) + { + return qtrue; + } + + if (anim >= BOTH_A1_T__B_ && + anim <= BOTH_H1_S1_BR) + { + return qtrue; + } + + return qfalse; +} + +//To see if the client is trying to use one of the included skins not meant for MP. +//I don't much care for hardcoded strings, but this seems the best way to go. +static qboolean CG_IsValidCharacterModel(const char *modelName, const char *skinName) +{ + if (!Q_stricmp(modelName, "kyle")) + { + if (!Q_stricmp(skinName, "fpls")) + { + return qfalse; + } + else if (!Q_stricmp(skinName, "fpls2")) + { + return qfalse; + } + else if (!Q_stricmp(skinName, "fpls3")) + { + return qfalse; + } + } + else if (!Q_stricmp(modelName, "morgan")) + { + //For morgan, we want to deny if the skin is anything but one of the valid ones + //Since his default skin is actually the bad one, you could just type + //"model morgan/blah" and get it. This rules out custom morgan skins without + //programming assistance unfortunately. + if (Q_stricmp(skinName, "default_mp") && + Q_stricmp(skinName, "red") && + Q_stricmp(skinName, "blue")) + { + return qfalse; + } + } + + return qtrue; +} + +#define MAX_SURF_LIST_SIZE 1024 +qboolean CG_ParseSurfsFile( const char *modelName, const char *skinName, char *surfOff, char *surfOn ) +{ + const char *text_p; + int len; + const char *token; + const char *value; + char text[20000]; + char sfilename[MAX_QPATH]; + fileHandle_t f; + + // Load and parse .surf file + Com_sprintf( sfilename, sizeof( sfilename ), "models/players/%s/model_%s.surf", modelName, skinName ); + + // load the file + len = trap_FS_FOpenFile( sfilename, &f, FS_READ ); + if ( len <= 0 ) + {//no file + return qfalse; + } + if ( len >= sizeof( text ) - 1 ) + { + Com_Printf( "File %s too long\n", sfilename ); + return qfalse; + } + + trap_FS_Read( text, len, f ); + text[len] = 0; + trap_FS_FCloseFile( f ); + + // parse the text + text_p = text; + + memset( (char *)surfOff, 0, sizeof(surfOff) ); + memset( (char *)surfOn, 0, sizeof(surfOn) ); + + // read information for surfOff and surfOn + while ( 1 ) + { + token = COM_ParseExt( &text_p, qtrue ); + if ( !token || !token[0] ) + { + break; + } + + // surfOff + if ( !Q_stricmp( token, "surfOff" ) ) + { + if ( COM_ParseString( &text_p, &value ) ) + { + continue; + } + if ( surfOff && surfOff[0] ) + { + Q_strcat( surfOff, MAX_SURF_LIST_SIZE, "," ); + Q_strcat( surfOff, MAX_SURF_LIST_SIZE, value ); + } + else + { + Q_strncpyz( surfOff, value, MAX_SURF_LIST_SIZE ); + } + continue; + } + + // surfOn + if ( !Q_stricmp( token, "surfOn" ) ) + { + if ( COM_ParseString( &text_p, &value ) ) + { + continue; + } + if ( surfOn && surfOn[0] ) + { + Q_strcat( surfOn, MAX_SURF_LIST_SIZE, ","); + Q_strcat( surfOn, MAX_SURF_LIST_SIZE, value ); + } + else + { + Q_strncpyz( surfOn, value, MAX_SURF_LIST_SIZE ); + } + continue; + } + } + return qtrue; +} + +/* +========================== +CG_RegisterClientModelname +========================== +*/ +static qboolean CG_RegisterClientModelname( clientInfo_t *ci, const char *modelName, const char *skinName, const char *teamName, int clientNum ) { + int handle; + char afilename[MAX_QPATH]; + char /**GLAName,*/ *slash; + char GLAName[MAX_QPATH]; + vec3_t tempVec = {0,0,0}; + qboolean badModel = qfalse; + qboolean retriedAlready = qfalse; + char surfOff[MAX_SURF_LIST_SIZE]; + char surfOn[MAX_SURF_LIST_SIZE]; + +retryModel: + if (ci->ATST && clientNum == -1) + { + Com_sprintf(ci->teamName, sizeof(ci->teamName), teamName); + return qtrue; + } + + if (badModel) + { + modelName = "kyle"; + skinName = "default"; + Com_Printf("WARNING: Attempted to load an unsupported multiplayer model! (bad or missing bone, or missing animation sequence)\n"); + + badModel = qfalse; + retriedAlready = qtrue; + } + + if (!CG_IsValidCharacterModel(modelName, skinName)) + { + modelName = "kyle"; + skinName = "default"; + } + + // First things first. If this is a ghoul2 model, then let's make sure we demolish this first. + if (ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) + { + trap_G2API_CleanGhoul2Models(&(ci->ghoul2Model)); + } + + if ( cgs.gametype >= GT_TEAM && !cgs.jediVmerc ) + { + if (ci->team == TEAM_RED) + { + Q_strncpyz(ci->skinName, "red", sizeof(ci->skinName)); + skinName = "red"; + } + else if (ci->team == TEAM_BLUE) + { + Q_strncpyz(ci->skinName, "blue", sizeof(ci->skinName)); + skinName = "blue"; + } + } + + if (clientNum != -1 && cg_entities[clientNum].currentState.teamowner && !cg_entities[clientNum].isATST) + { + ci->torsoSkin = 0; + ci->ATST = qtrue; + handle = trap_G2API_InitGhoul2Model(&ci->ghoul2Model, "models/players/atst/model.glm", 0, 0, 0, 0, 0); + } + else + { + ci->torsoSkin = trap_R_RegisterSkin(va("models/players/%s/model_%s.skin", modelName, skinName)); + ci->ATST = qfalse; + Com_sprintf( afilename, sizeof( afilename ), "models/players/%s/model.glm", modelName ); + handle = trap_G2API_InitGhoul2Model(&ci->ghoul2Model, afilename, 0, ci->torsoSkin, 0, 0, 0); + } + if (handle<0) + { + return qfalse; + } + + // The model is now loaded. + + GLAName[0] = 0; + + trap_G2API_GetGLAName( ci->ghoul2Model, 0, GLAName); + if (GLAName[0] != 0) + { + if (!strstr(GLAName, "players/_humanoid/")) + { //Bad! + badModel = qtrue; + goto retryModel; + } + } + + if (!BGPAFtextLoaded) + { + if (GLAName[0] == 0/*GLAName == NULL*/) + { + if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg")) + { + Com_Printf( "Failed to load animation file %s\n", afilename ); + return qfalse; + } + return qtrue; + } + Q_strncpyz( afilename, GLAName, sizeof( afilename )); + slash = Q_strrchr( afilename, '/' ); + if ( slash ) + { + strcpy(slash, "/animation.cfg"); + } // Now afilename holds just the path to the animation.cfg + else + { // Didn't find any slashes, this is a raw filename right in base (whish isn't a good thing) + return qfalse; + } + + /* + // Try to load the animation.cfg for this model then. + if ( !BG_ParseAnimationFile( afilename, ci->animations ) ) + { // The GLA's animations failed + if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg", ci->animations)) + { + Com_Printf( "Failed to load animation file %s\n", afilename ); + return qfalse; + } + } + */ + //rww - For now, we'll just ignore what animation file it wants. In theory all multiplayer-supported models + //should want _humanoid/animation.cfg, so if it doesn't want that then throw it away + if (Q_stricmp(afilename, "models/players/_humanoid/animation.cfg")) + { + Com_Printf( "Model does not use supported animation config.\n"); + return qfalse; + } + else if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg")) + { + Com_Printf( "Failed to load animation file models/players/_humanoid/animation.cfg\n" ); + return qfalse; + } + else if (!retriedAlready) + { + int i; + + for(i = 0; i < MAX_ANIMATIONS; i++) + { + if (!bgGlobalAnimations[i].firstFrame && !bgGlobalAnimations[i].numFrames && CG_NeedAnimSequence(i)) + { //using default for this animation so it obviously never got filled in. + //if it's a sequence that we need, this model must be an unsupported one. + badModel = qtrue; + goto retryModel; + } + } + } + } + + if ( CG_ParseSurfsFile( modelName, skinName, surfOff, surfOn ) ) + {//turn on/off any surfs + const char *token; + const char *p; + + //Now turn on/off any surfaces + if ( surfOff && surfOff[0] ) + { + p = surfOff; + while ( 1 ) + { + token = COM_ParseExt( &p, qtrue ); + if ( !token[0] ) + {//reached end of list + break; + } + //turn off this surf + trap_G2API_SetSurfaceOnOff( ci->ghoul2Model, token, 0x00000002/*G2SURFACEFLAG_OFF*/ ); + } + } + if ( surfOn && surfOn[0] ) + { + p = surfOn; + while ( 1 ) + { + token = COM_ParseExt( &p, qtrue ); + if ( !token[0] ) + {//reached end of list + break; + } + //turn on this surf + trap_G2API_SetSurfaceOnOff( ci->ghoul2Model, token, 0 ); + } + } + } + + if (clientNum != -1 && cg_entities[clientNum].currentState.teamowner && !cg_entities[clientNum].isATST) + { + ci->torsoSkin = 0; + ci->bolt_rhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*flash1"); + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "Model_root", 0, 12, BONE_ANIM_OVERRIDE_LOOP, 1.0f, cg.time, -1, -1); + trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "l_clavical", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, cg.time); + trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "r_clavical", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, NULL, 0, cg.time); + + ci->bolt_lhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*flash2"); + ci->bolt_head = trap_G2API_AddBolt(ci->ghoul2Model, 0, "pelvis"); + } + else + { + ci->bolt_rhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*r_hand"); + + if (!trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", 0, 12, BONE_ANIM_OVERRIDE_LOOP, 1.0f, cg.time, -1, -1)) + { + badModel = qtrue; + } + + if (!trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "upper_lumbar", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, cg.time)) + { + badModel = qtrue; + } + + if (!trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "cranium", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, NULL, 0, cg.time)) + { + badModel = qtrue; + } + + ci->bolt_lhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*l_hand"); + ci->bolt_head = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*head_top"); + + ci->bolt_motion = trap_G2API_AddBolt(ci->ghoul2Model, 0, "Motion"); + + //We need a lower lumbar bolt for footsteps + ci->bolt_llumbar = trap_G2API_AddBolt(ci->ghoul2Model, 0, "lower_lumbar"); + + if (ci->bolt_rhand == -1 || ci->bolt_lhand == -1 || ci->bolt_head == -1 || ci->bolt_motion == -1 || ci->bolt_llumbar == -1) + { + badModel = qtrue; + } + + if (badModel) + { + goto retryModel; + } + } + +// ent->s.radius = 90; + + if (clientNum != -1) + { + if (cg_entities[clientNum].isATST) + { + animation_t *anim; + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.legsAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame + anim->numFrames-1; + + if (anim->loopFrames != -1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + firstFrame = anim->firstFrame; + } + + //rww - Set the animation again because it just got reset due to the model change + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", firstFrame, anim->firstFrame + anim->numFrames, flags, 1.0f, cg.time, -1, 150); + + cg_entities[clientNum].currentState.legsAnim = 0; + } + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.torsoAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame + anim->numFrames-1; + + if (anim->loopFrames != -1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + firstFrame = anim->firstFrame; + } + + //rww - Set the animation again because it just got reset due to the model change + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "lower_lumbar", anim->firstFrame + anim->numFrames-1, anim->firstFrame + anim->numFrames, flags, 1.0f, cg.time, -1, 150); + + cg_entities[clientNum].currentState.torsoAnim = 0; + } + } + + /* + if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2)) + { + trap_G2API_CleanGhoul2Models(&(cg_entities[clientNum].ghoul2)); + } + trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2); + */ + + cg_entities[clientNum].ghoul2weapon = NULL; + } + + Q_strncpyz (ci->teamName, teamName, sizeof(ci->teamName)); + + // Model icon for drawing the portrait on screen + ci->modelIcon = trap_R_RegisterShaderNoMip ( va ( "models/players/%s/icon_%s", modelName, skinName ) ); + + return qtrue; +} + +/* +==================== +CG_ColorFromString +==================== +*/ +static void CG_ColorFromString( const char *v, vec3_t color ) { + int val; + + VectorClear( color ); + + val = atoi( v ); + + if ( val < 1 || val > 7 ) { + VectorSet( color, 1, 1, 1 ); + return; + } + + if ( val & 1 ) { + color[2] = 1.0f; + } + if ( val & 2 ) { + color[1] = 1.0f; + } + if ( val & 4 ) { + color[0] = 1.0f; + } +} + +#define DEFAULT_FEMALE_SOUNDPATH "chars/mp_generic_female/misc"//"chars/tavion/misc" +#define DEFAULT_MALE_SOUNDPATH "chars/mp_generic_male/misc"//"chars/kyle/misc" +/* +=================== +CG_LoadClientInfo + +Load it now, taking the disk hits. +This will usually be deferred to a safe time +=================== +*/ +void CG_LoadClientInfo( clientInfo_t *ci ) { + const char *dir, *fallback; + int i, modelloaded; + const char *s; + int clientNum; + char teamname[MAX_QPATH]; + int fLen = 0; + char soundpath[MAX_QPATH]; + char soundName[1024]; + qboolean isFemale = qfalse; + fileHandle_t f; + + clientNum = ci - cgs.clientinfo; + + if (clientNum < 0 || clientNum >= MAX_CLIENTS) + { + clientNum = -1; + } + + ci->deferred = qfalse; + + /* + if (ci->team == TEAM_SPECTATOR) + { + // reset any existing players and bodies, because they might be in bad + // frames for this new model + clientNum = ci - cgs.clientinfo; + for ( i = 0 ; i < MAX_GENTITIES ; i++ ) { + if ( cg_entities[i].currentState.clientNum == clientNum + && cg_entities[i].currentState.eType == ET_PLAYER ) { + CG_ResetPlayerEntity( &cg_entities[i] ); + } + } + + if (ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) + { + trap_G2API_CleanGhoul2Models(&ci->ghoul2Model); + } + + return; + } + */ + + teamname[0] = 0; + if( cgs.gametype >= GT_TEAM) { + if( ci->team == TEAM_BLUE ) { + Q_strncpyz(teamname, cg_blueTeamName.string, sizeof(teamname) ); + } else { + Q_strncpyz(teamname, cg_redTeamName.string, sizeof(teamname) ); + } + } + if( teamname[0] ) { + strcat( teamname, "/" ); + } + modelloaded = qtrue; + if ( !CG_RegisterClientModelname( ci, ci->modelName, ci->skinName, teamname, clientNum ) ) { + //CG_Error( "CG_RegisterClientModelname( %s, %s, %s, %s %s ) failed", ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname ); + //rww - DO NOT error out here! Someone could just type in a nonsense model name and crash everyone's client. + //Give it a chance to load default model for this client instead. + + // fall back to default team name + if( cgs.gametype >= GT_TEAM) { + // keep skin name + if( ci->team == TEAM_BLUE ) { + Q_strncpyz(teamname, DEFAULT_BLUETEAM_NAME, sizeof(teamname) ); + } else { + Q_strncpyz(teamname, DEFAULT_REDTEAM_NAME, sizeof(teamname) ); + } + if ( !CG_RegisterClientModelname( ci, DEFAULT_TEAM_MODEL, ci->skinName, teamname, -1 ) ) { + CG_Error( "DEFAULT_TEAM_MODEL / skin (%s/%s) failed to register", DEFAULT_TEAM_MODEL, ci->skinName ); + } + } else { + if ( !CG_RegisterClientModelname( ci, DEFAULT_MODEL, "default", teamname, -1 ) ) { + CG_Error( "DEFAULT_MODEL (%s) failed to register", DEFAULT_MODEL ); + } + } + modelloaded = qfalse; + } + + if (clientNum != -1 && ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) + { + if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2)) + { + trap_G2API_CleanGhoul2Models(&cg_entities[clientNum].ghoul2); + } + trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2); + } + + ci->newAnims = qfalse; + if ( ci->torsoModel ) { + orientation_t tag; + // if the torso model has the "tag_flag" + if ( trap_R_LerpTag( &tag, ci->torsoModel, 0, 0, 1, "tag_flag" ) ) { + ci->newAnims = qtrue; + } + } + + // sounds + dir = ci->modelName; + fallback = DEFAULT_MALE_SOUNDPATH; //(cgs.gametype >= GT_TEAM) ? DEFAULT_TEAM_MODEL : DEFAULT_MODEL; + + if ( !ci->skinName || !Q_stricmp( "default", ci->skinName ) ) + {//try default sounds.cfg first + fLen = trap_FS_FOpenFile(va("models/players/%s/sounds.cfg", dir), &f, FS_READ); + if ( !f ) + {//no? Look for _default sounds.cfg + fLen = trap_FS_FOpenFile(va("models/players/%s/sounds_default.cfg", dir), &f, FS_READ); + } + } + else + {//use the .skin associated with this skin + fLen = trap_FS_FOpenFile(va("models/players/%s/sounds_%s.cfg", dir, ci->skinName), &f, FS_READ); + if ( !f ) + {//fall back to default sounds + fLen = trap_FS_FOpenFile(va("models/players/%s/sounds.cfg", dir), &f, FS_READ); + } + } + + soundpath[0] = 0; + + if (f) + { + i = 0; + + trap_FS_Read(soundpath, fLen, f); + + i = fLen; + + while (i >= 0 && soundpath[i] != '\n') + { + if (soundpath[i] == 'f') + { + isFemale = qtrue; + } + + i--; + } + + soundpath[i-1] = '\0'; + + trap_FS_FCloseFile(f); + } + + if (isFemale) + { + ci->gender = GENDER_FEMALE; + } + else + { + ci->gender = GENDER_MALE; + } + + for ( i = 0 ; i < MAX_CUSTOM_SOUNDS ; i++ ) { + s = cg_customSoundNames[i]; + if ( !s ) { + break; + } + + Com_sprintf(soundName, sizeof(soundName), "%s", s+1); + COM_StripExtension(soundName, soundName); + //strip the extension because we might want .mp3's + + //ci->sounds[i] = 0; + // if the model didn't load use the sounds of the default model + if (soundpath[0]) + { + ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", soundpath, soundName) ); + + if (!ci->sounds[i]) + { + if (isFemale) + { + ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", DEFAULT_FEMALE_SOUNDPATH, soundName) ); + } + else + { + ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", DEFAULT_MALE_SOUNDPATH, soundName) ); + } + } + } + else + { + if (modelloaded) + { + ci->sounds[i] = trap_S_RegisterSound( va("sound/chars/%s/misc/%s", dir, soundName) ); + } + + if ( !ci->sounds[i] ) + { + ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", fallback, soundName) ); + } + } + } + + ci->deferred = qfalse; + + // reset any existing players and bodies, because they might be in bad + // frames for this new model + clientNum = ci - cgs.clientinfo; + for ( i = 0 ; i < MAX_GENTITIES ; i++ ) { + if ( cg_entities[i].currentState.clientNum == clientNum + && cg_entities[i].currentState.eType == ET_PLAYER ) { + CG_ResetPlayerEntity( &cg_entities[i] ); + } + } +} + + + + +/* +====================== +CG_CopyClientInfoModel +====================== +*/ +static void CG_CopyClientInfoModel( clientInfo_t *from, clientInfo_t *to ) { + VectorCopy( from->headOffset, to->headOffset ); + to->footsteps = from->footsteps; + to->gender = from->gender; + + to->legsModel = from->legsModel; + to->legsSkin = from->legsSkin; + to->torsoModel = from->torsoModel; + to->torsoSkin = from->torsoSkin; + //to->headModel = from->headModel; + //to->headSkin = from->headSkin; + to->modelIcon = from->modelIcon; + + to->newAnims = from->newAnims; + + //to->ghoul2Model = from->ghoul2Model; + //rww - Trying to use the same ghoul2 pointer for two seperate clients == DISASTER + if (to->ghoul2Model && trap_G2_HaveWeGhoul2Models(to->ghoul2Model)) + { + trap_G2API_CleanGhoul2Models(&to->ghoul2Model); + } + if (from->ghoul2Model && trap_G2_HaveWeGhoul2Models(from->ghoul2Model)) + { + trap_G2API_DuplicateGhoul2Instance(from->ghoul2Model, &to->ghoul2Model); + } + + to->bolt_head = from->bolt_head; + to->bolt_lhand = from->bolt_lhand; + to->bolt_rhand = from->bolt_rhand; + to->bolt_motion = from->bolt_motion; + to->bolt_llumbar = from->bolt_llumbar; + +// to->ATST = from->ATST; + + memcpy( to->sounds, from->sounds, sizeof( to->sounds ) ); +} + +/* +====================== +CG_ScanForExistingClientInfo +====================== +*/ +static qboolean CG_ScanForExistingClientInfo( clientInfo_t *ci, int clientNum ) { + int i; + clientInfo_t *match; + + for ( i = 0 ; i < cgs.maxclients ; i++ ) { + match = &cgs.clientinfo[ i ]; + if ( !match->infoValid ) { + continue; + } + if ( match->deferred ) { + continue; + } + if ( !Q_stricmp( ci->modelName, match->modelName ) + && !Q_stricmp( ci->skinName, match->skinName ) +// && !Q_stricmp( ci->headModelName, match->headModelName ) +// && !Q_stricmp( ci->headSkinName, match->headSkinName ) + && !Q_stricmp( ci->blueTeam, match->blueTeam ) + && !Q_stricmp( ci->redTeam, match->redTeam ) + && (cgs.gametype < GT_TEAM || ci->team == match->team) + && match->ghoul2Model + && match->bolt_head) //if the bolts haven't been initialized, this "match" is useless to us + { + // this clientinfo is identical, so use it's handles + + ci->deferred = qfalse; + + //rww - Filthy hack. If this is actually the info already belonging to us, just reassign the pointer. + //Switching instances when not necessary produces small animation glitches. + //Actually, before, were we even freeing the instance attached to the old clientinfo before copying + //this new clientinfo over it? Could be a nasty leak possibility. (though this should remedy it in theory) + if (clientNum == i) + { + if (match->ghoul2Model && trap_G2_HaveWeGhoul2Models(match->ghoul2Model)) + { //The match has a valid instance (if it didn't, we'd probably already be fudged (^_^) at this state) + if (ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) + { //First kill the copy we have if we have one. (but it should be null) + trap_G2API_CleanGhoul2Models(&ci->ghoul2Model); + } + + VectorCopy( match->headOffset, ci->headOffset ); + ci->footsteps = match->footsteps; + ci->gender = match->gender; + + ci->legsModel = match->legsModel; + ci->legsSkin = match->legsSkin; + ci->torsoModel = match->torsoModel; + ci->torsoSkin = match->torsoSkin; + ci->modelIcon = match->modelIcon; + + ci->newAnims = match->newAnims; + + ci->bolt_head = match->bolt_head; + ci->bolt_lhand = match->bolt_lhand; + ci->bolt_rhand = match->bolt_rhand; + ci->bolt_motion = match->bolt_motion; + ci->bolt_llumbar = match->bolt_llumbar; + + memcpy( ci->sounds, match->sounds, sizeof( ci->sounds ) ); + + //We can share this pointer, because it already belongs to this client. + //The pointer itself and the ghoul2 instance is never actually changed, just passed between + //clientinfo structures. + ci->ghoul2Model = match->ghoul2Model; + } + } + else + { + CG_CopyClientInfoModel( match, ci ); + } + + return qtrue; + } + } + + // nothing matches, so defer the load + return qfalse; +} + +/* +====================== +CG_SetDeferredClientInfo + +We aren't going to load it now, so grab some other +client's info to use until we have some spare time. +====================== +*/ +static void CG_SetDeferredClientInfo( clientInfo_t *ci ) { + int i; + clientInfo_t *match; + + // if someone else is already the same models and skins we + // can just load the client info + for ( i = 0 ; i < cgs.maxclients ; i++ ) { + match = &cgs.clientinfo[ i ]; + if ( !match->infoValid || match->deferred ) { + continue; + } + if ( Q_stricmp( ci->skinName, match->skinName ) || + Q_stricmp( ci->modelName, match->modelName ) || +// Q_stricmp( ci->headModelName, match->headModelName ) || +// Q_stricmp( ci->headSkinName, match->headSkinName ) || + (cgs.gametype >= GT_TEAM && ci->team != match->team) ) { + continue; + } + // just load the real info cause it uses the same models and skins + CG_LoadClientInfo( ci ); + return; + } + + // if we are in teamplay, only grab a model if the skin is correct + if ( cgs.gametype >= GT_TEAM ) { + for ( i = 0 ; i < cgs.maxclients ; i++ ) { + match = &cgs.clientinfo[ i ]; + if ( !match->infoValid || match->deferred ) { + continue; + } + if ( Q_stricmp( ci->skinName, match->skinName ) || + (cgs.gametype >= GT_TEAM && ci->team != match->team) ) { + continue; + } + ci->deferred = qtrue; + CG_CopyClientInfoModel( match, ci ); + return; + } + // load the full model, because we don't ever want to show + // an improper team skin. This will cause a hitch for the first + // player, when the second enters. Combat shouldn't be going on + // yet, so it shouldn't matter + CG_LoadClientInfo( ci ); + return; + } + + // find the first valid clientinfo and grab its stuff + for ( i = 0 ; i < cgs.maxclients ; i++ ) { + match = &cgs.clientinfo[ i ]; + if ( !match->infoValid ) { + continue; + } + + ci->deferred = qtrue; + CG_CopyClientInfoModel( match, ci ); + return; + } + + // we should never get here... + CG_Printf( "CG_SetDeferredClientInfo: no valid clients!\n" ); + + CG_LoadClientInfo( ci ); +} + +/* +====================== +CG_NewClientInfo +====================== +*/ +void CG_NewClientInfo( int clientNum, qboolean entitiesInitialized ) { + clientInfo_t *ci; + clientInfo_t newInfo; + const char *configstring; + const char *v; + char *slash; + void *oldGhoul2; + int i = 0; + qboolean wasATST = qfalse; + + ci = &cgs.clientinfo[clientNum]; + + oldGhoul2 = ci->ghoul2Model; + + configstring = CG_ConfigString( clientNum + CS_PLAYERS ); + if ( !configstring[0] ) { + memset( ci, 0, sizeof( *ci ) ); + return; // player just left + } + + if (ci) + { + wasATST = ci->ATST; + } + + // build into a temp buffer so the defer checks can use + // the old value + memset( &newInfo, 0, sizeof( newInfo ) ); + + // isolate the player's name + v = Info_ValueForKey(configstring, "n"); + Q_strncpyz( newInfo.name, v, sizeof( newInfo.name ) ); + + // colors + v = Info_ValueForKey( configstring, "c1" ); + CG_ColorFromString( v, newInfo.color1 ); + + newInfo.icolor1 = atoi(v); + + v = Info_ValueForKey( configstring, "c2" ); + CG_ColorFromString( v, newInfo.color2 ); + + // bot skill + v = Info_ValueForKey( configstring, "skill" ); + newInfo.botSkill = atoi( v ); + + // handicap + v = Info_ValueForKey( configstring, "hc" ); + newInfo.handicap = atoi( v ); + + // wins + v = Info_ValueForKey( configstring, "w" ); + newInfo.wins = atoi( v ); + + // losses + v = Info_ValueForKey( configstring, "l" ); + newInfo.losses = atoi( v ); + + // team + v = Info_ValueForKey( configstring, "t" ); + newInfo.team = atoi( v ); + + // team task + v = Info_ValueForKey( configstring, "tt" ); + newInfo.teamTask = atoi(v); + + // team leader + v = Info_ValueForKey( configstring, "tl" ); + newInfo.teamLeader = atoi(v); + + v = Info_ValueForKey( configstring, "g_redteam" ); + Q_strncpyz(newInfo.redTeam, v, MAX_TEAMNAME); + + v = Info_ValueForKey( configstring, "g_blueteam" ); + Q_strncpyz(newInfo.blueTeam, v, MAX_TEAMNAME); + + // model + v = Info_ValueForKey( configstring, "model" ); + if ( cg_forceModel.integer ) { + // forcemodel makes everyone use a single model + // to prevent load hitches + char modelStr[MAX_QPATH]; + char *skin; + + if( cgs.gametype >= GT_TEAM ) { + Q_strncpyz( newInfo.modelName, DEFAULT_TEAM_MODEL, sizeof( newInfo.modelName ) ); + Q_strncpyz( newInfo.skinName, "default", sizeof( newInfo.skinName ) ); + } else { + trap_Cvar_VariableStringBuffer( "model", modelStr, sizeof( modelStr ) ); + if ( ( skin = strchr( modelStr, '/' ) ) == NULL) { + skin = "default"; + } else { + *skin++ = 0; + } + + Q_strncpyz( newInfo.skinName, skin, sizeof( newInfo.skinName ) ); + Q_strncpyz( newInfo.modelName, modelStr, sizeof( newInfo.modelName ) ); + } + + if ( cgs.gametype >= GT_TEAM ) { + // keep skin name + slash = strchr( v, '/' ); + if ( slash ) { + Q_strncpyz( newInfo.skinName, slash + 1, sizeof( newInfo.skinName ) ); + } + } + } else { + Q_strncpyz( newInfo.modelName, v, sizeof( newInfo.modelName ) ); + + slash = strchr( newInfo.modelName, '/' ); + if ( !slash ) { + // modelName didn not include a skin name + Q_strncpyz( newInfo.skinName, "default", sizeof( newInfo.skinName ) ); + } else { + Q_strncpyz( newInfo.skinName, slash + 1, sizeof( newInfo.skinName ) ); + // truncate modelName + *slash = 0; + } + } + + // head model +/* + v = Info_ValueForKey( configstring, "hmodel" ); + if ( cg_forceModel.integer ) { + // forcemodel makes everyone use a single model + // to prevent load hitches + char modelStr[MAX_QPATH]; + char *skin; + + if( cgs.gametype >= GT_TEAM ) { + Q_strncpyz( newInfo.headModelName, DEFAULT_TEAM_MODEL, sizeof( newInfo.headModelName ) ); + Q_strncpyz( newInfo.headSkinName, "default", sizeof( newInfo.headSkinName ) ); + } else { + trap_Cvar_VariableStringBuffer( "headmodel", modelStr, sizeof( modelStr ) ); + if ( ( skin = strchr( modelStr, '/' ) ) == NULL) { + skin = "default"; + } else { + *skin++ = 0; + } + + Q_strncpyz( newInfo.headSkinName, skin, sizeof( newInfo.headSkinName ) ); + Q_strncpyz( newInfo.headModelName, modelStr, sizeof( newInfo.headModelName ) ); + } + + if ( cgs.gametype >= GT_TEAM ) { + // keep skin name + slash = strchr( v, '/' ); + if ( slash ) { + Q_strncpyz( newInfo.headSkinName, slash + 1, sizeof( newInfo.headSkinName ) ); + } + } + } else { + Q_strncpyz( newInfo.headModelName, v, sizeof( newInfo.headModelName ) ); + + slash = strchr( newInfo.headModelName, '/' ); + if ( !slash ) { + // modelName didn not include a skin name + Q_strncpyz( newInfo.headSkinName, "default", sizeof( newInfo.headSkinName ) ); + } else { + Q_strncpyz( newInfo.headSkinName, slash + 1, sizeof( newInfo.headSkinName ) ); + // truncate modelName + *slash = 0; + } + } +*/ + // force powers + v = Info_ValueForKey( configstring, "forcepowers" ); + Q_strncpyz( newInfo.forcePowers, v, sizeof( newInfo.forcePowers ) ); + + newInfo.ATST = wasATST; + + if (cgs.gametype >= GT_TEAM && !cgs.jediVmerc ) + { + if (newInfo.team == TEAM_RED) + { + strcpy(newInfo.skinName, "red"); +// strcpy(newInfo.headSkinName, "red"); + } + if (newInfo.team == TEAM_BLUE) + { + strcpy(newInfo.skinName, "blue"); +// strcpy(newInfo.headSkinName, "blue"); + } + } + + // scan for an existing clientinfo that matches this modelname + // so we can avoid loading checks if possible + if ( !CG_ScanForExistingClientInfo( &newInfo, clientNum ) ) { + qboolean forceDefer; + + forceDefer = trap_MemoryRemaining() < 4000000; + + // if we are defering loads, just have it pick the first valid + if (cg.snap && cg.snap->ps.clientNum == clientNum && !forceDefer) + { //rww - don't defer your own client info ever, unless really low on memory + CG_LoadClientInfo( &newInfo ); + } + else if ( forceDefer || ( cg_deferPlayers.integer && !cg_buildScript.integer && !cg.loading ) ) { + // keep whatever they had if it won't violate team skins + CG_SetDeferredClientInfo( &newInfo ); + // if we are low on memory, leave them with this model + if ( forceDefer ) { + CG_Printf( "Memory is low. Using deferred model.\n" ); + newInfo.deferred = qfalse; + } + } else { + CG_LoadClientInfo( &newInfo ); + } + } + + // replace whatever was there with the new one + newInfo.infoValid = qtrue; + if (ci->ghoul2Model && + ci->ghoul2Model != newInfo.ghoul2Model && + trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) + { //We must kill this instance before we remove our only pointer to it from the cgame. + //Otherwise we will end up with extra instances all over the place, I think. + trap_G2API_CleanGhoul2Models(&ci->ghoul2Model); + } + *ci = newInfo; + + //force a weapon change anyway, for all clients being rendered to the current client + while (i < MAX_CLIENTS) + { + cg_entities[i].ghoul2weapon = NULL; + i++; + } + + // Check if the ghoul2 model changed in any way. This is safer than assuming we have a legal cent shile loading info. + if (entitiesInitialized && ci->ghoul2Model && (oldGhoul2 != ci->ghoul2Model)) + { // Copy the new ghoul2 model to the centity. + animation_t *anim; + centity_t *cent = &cg_entities[clientNum]; + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.legsAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame; + int setFrame = -1; + float animSpeed = 50.0f / anim->frameLerp; + + if (anim->loopFrames != -1) + { + flags |= BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->pe.legs.frame >= anim->firstFrame && cent->pe.legs.frame <= (anim->firstFrame + anim->numFrames)) + { + setFrame = cent->pe.legs.frame; + } + + //rww - Set the animation again because it just got reset due to the model change + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); + + cg_entities[clientNum].currentState.legsAnim = 0; + } + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.torsoAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame; + int setFrame = -1; + float animSpeed = 50.0f / anim->frameLerp; + + if (anim->loopFrames != -1) + { + flags |= BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->pe.torso.frame >= anim->firstFrame && cent->pe.torso.frame <= (anim->firstFrame + anim->numFrames)) + { + setFrame = cent->pe.torso.frame; + } + + //rww - Set the animation again because it just got reset due to the model change + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "lower_lumbar", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); + + cg_entities[clientNum].currentState.torsoAnim = 0; + } + + if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2)) + { + trap_G2API_CleanGhoul2Models(&cg_entities[clientNum].ghoul2); + } + trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2); + } +} + + +qboolean cgQueueLoad = qfalse; +/* +====================== +CG_ActualLoadDeferredPlayers + +Called at the beginning of CG_Player if cgQueueLoad is set. +====================== +*/ +void CG_ActualLoadDeferredPlayers( void ) +{ + int i; + clientInfo_t *ci; + + // scan for a deferred player to load + for ( i = 0, ci = cgs.clientinfo ; i < cgs.maxclients ; i++, ci++ ) { + if ( ci->infoValid && ci->deferred ) { + // if we are low on memory, leave it deferred + if ( trap_MemoryRemaining() < 4000000 ) { + CG_Printf( "Memory is low. Using deferred model.\n" ); + ci->deferred = qfalse; + continue; + } + CG_LoadClientInfo( ci ); +// break; + } + } +} + +/* +====================== +CG_LoadDeferredPlayers + +Called each frame when a player is dead +and the scoreboard is up +so deferred players can be loaded +====================== +*/ +void CG_LoadDeferredPlayers( void ) { + cgQueueLoad = qtrue; +} + +/* +============================================================================= + +PLAYER ANIMATION + +============================================================================= +*/ + +static qboolean CG_FirstAnimFrame(lerpFrame_t *lf, qboolean torsoOnly, float speedScale); + +qboolean CG_InRoll( centity_t *cent ) +{ + switch ( (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) ) + { + case BOTH_ROLL_F: + case BOTH_ROLL_B: + case BOTH_ROLL_R: + case BOTH_ROLL_L: + if ( cent->pe.legs.animationTime > cg.time ) + { + return qtrue; + } + break; + } + return qfalse; +} + +qboolean CG_InRollAnim( centity_t *cent ) +{ + switch ( (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) ) + { + case BOTH_ROLL_F: + case BOTH_ROLL_B: + case BOTH_ROLL_R: + case BOTH_ROLL_L: + return qtrue; + } + return qfalse; +} + +/* +=============== +CG_SetLerpFrameAnimation + +may include ANIM_TOGGLEBIT +=============== +*/ +static void CG_SetLerpFrameAnimation( centity_t *cent, clientInfo_t *ci, lerpFrame_t *lf, int newAnimation, float animSpeedMult, qboolean torsoOnly) { + animation_t *anim; + float animSpeed; + int flags=BONE_ANIM_OVERRIDE_FREEZE; + int oldAnim = -1; + int blendTime = 150; + + if (cent->currentState.number < MAX_CLIENTS && + cent->currentState.teamowner && + !cent->isATST) + { + return; + } + + if (cent->isATST) + { + vec3_t testVel; + float fVel; + + if (lf->animationNumber == BOTH_RUN1 || + lf->animationNumber == BOTH_WALK1 || + lf->animationNumber == BOTH_WALKBACK1 || + lf->animationNumber == BOTH_TURN_LEFT1 || + lf->animationNumber == BOTH_TURN_RIGHT1) + { + if (cent->atstFootClang < cg.time) + { + if (rand() & 1) + { + trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/chars/atst/ATSTstep1.wav")); + } + else + { + trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/chars/atst/ATSTstep2.wav")); + } + + cent->atstFootClang = cg.time + 1300; + } + } + + VectorCopy(cent->currentState.pos.trDelta, testVel); + + fVel = VectorNormalize(testVel); + + if (cent->currentState.eFlags & EF_DEAD) + { + if (lf->animationNumber != BOTH_DEATH1 && + lf->animationNumber != BOTH_DEAD1) + { + trap_S_StartSound(NULL, cent->currentState.number, CHAN_BODY, trap_S_RegisterSound("sound/chars/atst/ATSTcrash.wav")); + } + newAnimation = BOTH_DEATH1; + } + else if (fVel > 0) + { + qboolean doNotSet = qfalse; + + if (fVel > 250) + { + animSpeedMult = 1.2; + } + else if (fVel > 200) + { + animSpeedMult = 1; + } + else if (fVel > 100) + { + animSpeedMult = 0.9; + } + else if (fVel > 0) + { + animSpeedMult = 0.8; + } + else + { + doNotSet = qtrue; + } + + if (!doNotSet) + { + if ((cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN1 || + (cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_WALKBACK1 || + (cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_WALK1) + { + newAnimation = (cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT); + } + else + { + newAnimation = BOTH_RUN1; + } + } + } + else if ((cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN1START) + { + if (lf->animationNumber != BOTH_RUN1START) + { + trap_S_StartSound(NULL, cent->currentState.number, CHAN_BODY, trap_S_RegisterSound("sound/chars/atst/ATSTstart.wav")); + cent->atstFootClang = cg.time + 650; + } + newAnimation = BOTH_RUN1START; + } + else if (cent->pe.legs.yawing && + (cent->pe.legs.yawSwingDif < -20 || cent->pe.legs.yawSwingDif > 20)) + { + if (cent->pe.legs.yawSwingDif > 0) + { + newAnimation = BOTH_TURN_LEFT1;//BOTH_RUN1; + if (lf->animationNumber != BOTH_TURN_LEFT1) + { + cent->atstFootClang = cg.time + 500; + } + } + else + { + newAnimation = BOTH_TURN_RIGHT1;//BOTH_RUN1; + if (lf->animationNumber != BOTH_TURN_RIGHT1) + { + cent->atstFootClang = cg.time + 500; + } + } + animSpeedMult = 0.7; + } + else + { + newAnimation = BOTH_STAND1; + } + + if (newAnimation != BOTH_STAND1 && newAnimation != BOTH_RUN1 && + newAnimation != BOTH_RUN1START && newAnimation != BOTH_WALK1 && + newAnimation != BOTH_WALKBACK1 && newAnimation != BOTH_DEATH1 && + newAnimation != BOTH_DEAD1 && newAnimation != BOTH_TURN_RIGHT1 && + newAnimation != BOTH_TURN_LEFT1 && newAnimation != BOTH_PAIN1 && + newAnimation != BOTH_PAIN2) + { //not a valid anim for the ATST.. + newAnimation = BOTH_RUN1; + } + + if (lf->animationNumber == newAnimation) + { + return; + } + } + + oldAnim = lf->animationNumber; + + lf->animationNumber = newAnimation; + newAnimation &= ~ANIM_TOGGLEBIT; + + if ( newAnimation < 0 || newAnimation >= MAX_TOTALANIMATIONS ) { + CG_Error( "Bad animation number: %i", newAnimation ); + } + + anim = &bgGlobalAnimations[ newAnimation ]; + + lf->animation = anim; + lf->animationTime = lf->frameTime + anim->initialLerp; + + if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { + CG_Printf( "%d: %d Anim: %i, '%s'\n", cg.time, cent->currentState.clientNum, newAnimation, GetStringForID(animTable, newAnimation)); + } + + if (cent->ghoul2) + { + animSpeed = 50.0f / anim->frameLerp; + if (lf->animation->loopFrames != -1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->isATST) + { + if (animSpeed < 0.3) + { + animSpeed = 0.3; + } + + if (newAnimation == BOTH_WALKBACK1) + { + animSpeed = 0.8; + } + + if (newAnimation != BOTH_DEATH1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + } + } + + if (cg_animBlend.integer) + { + flags |= BONE_ANIM_BLEND; + } + + if (!cent->isATST) + { + if (/*BG_FlippingAnim(newAnimation) ||*/ BG_InDeathAnim(newAnimation)) + { + flags &= ~BONE_ANIM_BLEND; + } + else if ( oldAnim != -1 && + (/*BG_FlippingAnim(oldAnim) ||*/ BG_InDeathAnim(oldAnim)) ) + { + flags &= ~BONE_ANIM_BLEND; + } + + if (flags & BONE_ANIM_BLEND) + { + if (BG_FlippingAnim(newAnimation)) + { + blendTime = 200; + } + else if ( oldAnim != -1 && + (BG_FlippingAnim(oldAnim)) ) + { + blendTime = 200; + } + } + } + + animSpeed *= animSpeedMult; + + BG_SaberStartTransAnim(cent->currentState.fireflag, newAnimation, &animSpeed); + + if (torsoOnly) + { + lf->animationTorsoSpeed = animSpeedMult; + } + else + { + lf->animationSpeed = animSpeedMult; + } + + if (cent->isATST) + { + int atstBlend = 400; + + if (torsoOnly) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "pelvis", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); + } + } + else + { + int beginFrame = anim->firstFrame; + + if (torsoOnly) + { + if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && cent->pe.legs.frame >= anim->firstFrame && cent->pe.legs.frame <= (anim->firstFrame + anim->numFrames)) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "lower_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed,cg.time, cent->pe.legs.frame, blendTime); + beginFrame = cent->pe.legs.frame; + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "lower_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed,cg.time, -1, blendTime); + } + cgs.clientinfo[cent->currentState.number].torsoAnim = newAnimation; + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); + //cgs.clientinfo[cent->currentState.number].torsoAnim = newAnimation; + cgs.clientinfo[cent->currentState.number].legsAnim = newAnimation; + } + + if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation) + { + if (beginFrame != anim->firstFrame) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, beginFrame, blendTime); + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); + } + } + } + } +} + + +/* +=============== +CG_FirstAnimFrame + +Returns true if the lerpframe is on its first frame of animation. +Otherwise false. + +This is used to scale an animation into higher-speed without restarting +the animation before it completes at normal speed, in the case of a looping +animation (such as the leg running anim). +=============== +*/ +static qboolean CG_FirstAnimFrame(lerpFrame_t *lf, qboolean torsoOnly, float speedScale) +{ + if (torsoOnly) + { + if (lf->animationTorsoSpeed == speedScale) + { + return qfalse; + } + } + else + { + if (lf->animationSpeed == speedScale) + { + return qfalse; + } + } + + if (lf->animation->numFrames < 2) + { + return qtrue; + } + + if (lf->animation->firstFrame == lf->frame) + { + return qtrue; + } + + return qfalse; +} + +/* +=============== +CG_InWalkingAnim + +Returns last frame to step on if the animation on the frame is desired for playing footstep sounds, +otherwise 0 +=============== +*/ +int CG_InWalkingAnim(int animNum) +{ + int anim = animNum; + + anim &= ~ANIM_TOGGLEBIT; + + if (anim == BOTH_WALL_RUN_RIGHT || + anim == BOTH_WALL_RUN_LEFT) + { + return 8; + } + + if (anim >= BOTH_WALK1 && + anim <= BOTH_RUNAWAY1) + { + if (anim == BOTH_RUN1) + { + return 18;//12; + } + else + { + //return 9; + return 18; + } + } + + if (anim >= BOTH_WALKBACK1 && + anim <= BOTH_RUNBACK2) + { + if (anim == BOTH_WALKBACK1) + { + return 18; + } + else + { + return 9; + } + } + + if (anim >= LEGS_WALKBACK1 && + anim <= LEGS_RUNBACK2) + { + if (anim == LEGS_WALKBACK1) + { + return 18; + } + else + { + return 9; + } + } + + return qfalse; +} + +#define FOOTSTEP_GENERIC 1 +#define FOOTSTEP_METAL 2 + +static int CG_FootstepForSurface( centity_t *cent, int skip ) +{ + trace_t tr; + vec3_t org, dOrg, legDir, bAngles; + vec3_t playerMins = {-15, -15, DEFAULT_MINS_2}; + vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; + mdxaBone_t boltMatrix; + +// VectorCopy(ent->lerpOrigin, org); +// VectorCopy(org, dOrg); +// dOrg[2] -= 64; //should never have to go further than this because we're already onground + + //We are now tracing off of a bolt point for footsteps, so that if we happen to be walking sideways on a wall we will + //still play step sounds properly. + + VectorCopy(cent->lerpAngles, bAngles); + bAngles[PITCH] = 0; + + trap_G2API_GetBoltMatrix_NoReconstruct( cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_llumbar, &boltMatrix, bAngles, cent->lerpOrigin, cg.time, /*cgs.gameModels*/0, cent->modelScale); + trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, ORIGIN, org ); + trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, legDir ); + + dOrg[0] = org[0] + legDir[0]*64; + dOrg[1] = org[1] + legDir[1]*64; + dOrg[2] = org[2] + legDir[2]*64; + + //CG_TestLine(org, dOrg, 100, 0x0000ff, 3); + + CG_Trace(&tr, org, playerMins, playerMaxs, dOrg, skip, MASK_PLAYERSOLID); + + if (tr.fraction == 1) + { + return 0; + } + + if ( tr.surfaceFlags & SURF_NOSTEPS ) + { + return 0; + } + + if ( tr.surfaceFlags & SURF_METALSTEPS ) + { + return FOOTSTEP_METAL; + } + + return FOOTSTEP_GENERIC; +} + +void CG_FootStep(centity_t *cent, clientInfo_t *ci, int anim) +{ + int groundType; + + if ((anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || + (anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) + { + groundType = FOOTSTEP_GENERIC; + goto skipCheck; + } + + if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) + { + return; + } + +skipCheck: + groundType = CG_FootstepForSurface(cent, cent->currentState.number); + +//skipCheck: + + if (!groundType) + { + return; + } + + switch (groundType) + { + case FOOTSTEP_GENERIC: + trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, + cgs.media.footsteps[ ci->footsteps ][rand()&3] ); + break; + case FOOTSTEP_METAL: + trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_METAL ][rand()&3] ); + break; + default: + break; + } +} +/* +=============== +CG_RunLerpFrame + +Sets cg.snap, cg.oldFrame, and cg.backlerp +cg.time should be between oldFrameTime and frameTime after exit +=============== +*/ +static void CG_RunLerpFrame( centity_t *cent, clientInfo_t *ci, lerpFrame_t *lf, int newAnimation, float speedScale, qboolean torsoOnly) +{ + int f, numFrames; + animation_t *anim; + + // debugging tool to get no animations + if ( cg_animSpeed.integer == 0 ) { + lf->oldFrame = lf->frame = lf->backlerp = 0; + return; + } + + // see if the animation sequence is switching + if (cent->currentState.forceFrame) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; //|BONE_ANIM_BLEND; + float animSpeed = 1.0f; + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "lower_lumbar", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + + lf->animationNumber = 0; + } + else if ( (newAnimation != lf->animationNumber || !lf->animation) || (CG_FirstAnimFrame(lf, torsoOnly, speedScale)) ) + { + CG_SetLerpFrameAnimation( cent, ci, lf, newAnimation, speedScale, torsoOnly); + } + else if (cent->isATST) + { + if (cent->pe.legs.yawing != !lf->torsoYawing) + { + CG_SetLerpFrameAnimation( cent, ci, lf, newAnimation, speedScale, torsoOnly); + lf->torsoYawing = cent->pe.legs.yawing; + } + } + + // if we have passed the current frame, move it to + // oldFrame and calculate a new frame + if ( cg.time >= lf->frameTime ) { + if (lf->oldFrame != lf->frame && + lf == &(cent->pe.legs)) + { + int addFinalFrame = CG_InWalkingAnim(lf->animationNumber); //9; + + if (!cent->isATST && + ((lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || (lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) && + addFinalFrame) + { + if ( lf->frame >= (lf->animation->firstFrame+2) && + lf->oldFrame < (lf->animation->firstFrame+2)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && + lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+12) && + lf->oldFrame < (lf->animation->firstFrame+12)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+16) && + lf->oldFrame < (lf->animation->firstFrame+16)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) + { //missed one + CG_FootStep(cent, ci, lf->animationNumber); + } + } + else if (addFinalFrame && !cent->isATST) + { + if ( lf->frame >= (lf->animation->firstFrame+3) && + lf->oldFrame < (lf->animation->firstFrame+3)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && + lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) + { //missed one + CG_FootStep(cent, ci, lf->animationNumber); + } + } + } + + lf->oldFrame = lf->frame; + lf->oldFrameTime = lf->frameTime; + + // get the next frame based on the animation + anim = lf->animation; + if ( !anim->frameLerp ) { + return; // shouldn't happen + } + + if ( cg.time < lf->animationTime ) { + lf->frameTime = lf->animationTime; // initial lerp + } else { + lf->frameTime = lf->oldFrameTime + anim->frameLerp; + } + f = ( lf->frameTime - lf->animationTime ) / anim->frameLerp; + f *= speedScale; // adjust for haste, etc + + numFrames = anim->numFrames; + if (anim->flipflop) { + numFrames *= 2; + } + if ( f >= numFrames ) { + f -= numFrames; + if ( anim->loopFrames != -1 ) //Before 0 meant no loop + { + if(anim->numFrames - anim->loopFrames == 0) + { + f %= anim->numFrames; + } + else + { + f %= (anim->numFrames - anim->loopFrames); + } + f += anim->loopFrames; + } + else + { + f = numFrames - 1; + // the animation is stuck at the end, so it + // can immediately transition to another sequence + lf->frameTime = cg.time; + } + } + if ( anim->reversed ) { + lf->frame = anim->firstFrame + anim->numFrames - 1 - f; + } + else if (anim->flipflop && f>=anim->numFrames) { + lf->frame = anim->firstFrame + anim->numFrames - 1 - (f%anim->numFrames); + } + else { + lf->frame = anim->firstFrame + f; + } + if ( cg.time > lf->frameTime ) { + lf->frameTime = cg.time; + if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { + CG_Printf( "Clamp lf->frameTime\n"); + } + } + } + + if ( lf->frameTime > cg.time + 200 ) { + lf->frameTime = cg.time; + } + + if ( lf->oldFrameTime > cg.time ) { + lf->oldFrameTime = cg.time; + } + // calculate current lerp value + if ( lf->frameTime == lf->oldFrameTime ) { + lf->backlerp = 0; + } else { + lf->backlerp = 1.0 - (float)( cg.time - lf->oldFrameTime ) / ( lf->frameTime - lf->oldFrameTime ); + } +} + + +/* +=============== +CG_ClearLerpFrame +=============== +*/ +static void CG_ClearLerpFrame( centity_t *cent, clientInfo_t *ci, lerpFrame_t *lf, int animationNumber, qboolean torsoOnly) { + lf->frameTime = lf->oldFrameTime = cg.time; + CG_SetLerpFrameAnimation( cent, ci, lf, animationNumber, 1, torsoOnly ); + lf->oldFrame = lf->frame = lf->animation->firstFrame; +} + + +/* +=============== +CG_PlayerAnimation +=============== +*/ +static void CG_PlayerAnimation( centity_t *cent, int *legsOld, int *legs, float *legsBackLerp, + int *torsoOld, int *torso, float *torsoBackLerp ) { + clientInfo_t *ci; + int clientNum; + float speedScale; + + clientNum = cent->currentState.clientNum; + + if ( cg_noPlayerAnims.integer ) { + *legsOld = *legs = *torsoOld = *torso = 0; + return; + } + + if (cent->currentState.forcePowersActive & (1 << FP_RAGE)) + { + speedScale = 1.3; + } + else if (cent->currentState.forcePowersActive & (1 << FP_SPEED)) + { + speedScale = 1.7; + } + else + { + speedScale = 1; + } + + ci = &cgs.clientinfo[ clientNum ]; + + // do the shuffle turn frames locally + if(0){// if ( cent->pe.legs.yawing && ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == TORSO_WEAPONREADY3) { + CG_RunLerpFrame( cent, ci, ¢->pe.legs, LEGS_TURN1, speedScale, qfalse); + } else { + CG_RunLerpFrame( cent, ci, ¢->pe.legs, cent->currentState.legsAnim, speedScale, qfalse); + } + + if (!(cent->currentState.forcePowersActive & (1 << FP_RAGE))) + { //don't affect torso anim speed unless raged + speedScale = 1; + } + else + { + speedScale = 1.7; + } + + *legsOld = cent->pe.legs.oldFrame; + *legs = cent->pe.legs.frame; + *legsBackLerp = cent->pe.legs.backlerp; + + CG_RunLerpFrame( cent, ci, ¢->pe.torso, cent->currentState.torsoAnim, speedScale, qtrue ); + + *torsoOld = cent->pe.torso.oldFrame; + *torso = cent->pe.torso.frame; + *torsoBackLerp = cent->pe.torso.backlerp; +} + + + + +/* +============================================================================= + +PLAYER ANGLES + +============================================================================= +*/ + +/* +================== +CG_SwingAngles +================== +*/ +static float CG_SwingAngles( float destination, float swingTolerance, float clampTolerance, + float speed, float *angle, qboolean *swinging ) { + float swing; + float move; + float scale; + + if ( !*swinging ) { + // see if a swing should be started + swing = AngleSubtract( *angle, destination ); + if ( swing > swingTolerance || swing < -swingTolerance ) { + *swinging = qtrue; + } + } + + if ( !*swinging ) { + return 0; + } + + // modify the speed depending on the delta + // so it doesn't seem so linear + swing = AngleSubtract( destination, *angle ); + scale = fabs( swing ); + if ( scale < swingTolerance * 0.5 ) { + scale = 0.5; + } else if ( scale < swingTolerance ) { + scale = 1.0; + } else { + scale = 2.0; + } + + // swing towards the destination angle + if ( swing >= 0 ) { + move = cg.frametime * scale * speed; + if ( move >= swing ) { + move = swing; + *swinging = qfalse; + } + *angle = AngleMod( *angle + move ); + } else if ( swing < 0 ) { + move = cg.frametime * scale * -speed; + if ( move <= swing ) { + move = swing; + *swinging = qfalse; + } + *angle = AngleMod( *angle + move ); + } + + // clamp to no more than tolerance + swing = AngleSubtract( destination, *angle ); + if ( swing > clampTolerance ) { + *angle = AngleMod( destination - (clampTolerance - 1) ); + } else if ( swing < -clampTolerance ) { + *angle = AngleMod( destination + (clampTolerance - 1) ); + } + + return swing; +} + +/* +================== +CG_SwingAngles +================== +*/ +static float CG_SwingAnglesATST( centity_t *cent, float destination, float swingTolerance, float clampTolerance, + float speed, float *angle, qboolean *swinging ) { + float swing; + float move; + float scale; + + if ( !*swinging ) { + // see if a swing should be started + swing = AngleSubtract( *angle, destination ); + if ( swing > swingTolerance || swing < -swingTolerance ) { + *swinging = qtrue; + } + } + + if ( !*swinging ) { + return 0; + } + + // modify the speed depending on the delta + // so it doesn't seem so linear + swing = AngleSubtract( destination, *angle ); + scale = fabs( swing ); + if ( scale < swingTolerance * 0.5 ) { + scale = 0.5; + } else if ( scale < swingTolerance ) { + scale = 1.0; + } else { + scale = 2.0; + } + + if (swing < 10 && swing > -10) + { + cent->atstSwinging = 0; + } + if (swing < 60 && swing > -60 && !cent->atstSwinging) + { + return 0; + } + + cent->atstSwinging = 1; + + // swing towards the destination angle + if ( swing >= 0 ) { + move = cg.frametime * scale * speed; + if ( move >= swing ) { + move = swing; + *swinging = qfalse; + } + *angle = AngleMod( *angle + move ); + } else if ( swing < 0 ) { + move = cg.frametime * scale * -speed; + if ( move <= swing ) { + move = swing; + *swinging = qfalse; + } + *angle = AngleMod( *angle + move ); + } + + // clamp to no more than tolerance + swing = AngleSubtract( destination, *angle ); + if ( swing > clampTolerance ) { + *angle = AngleMod( destination - (clampTolerance - 1) ); + } else if ( swing < -clampTolerance ) { + *angle = AngleMod( destination + (clampTolerance - 1) ); + } + + return swing; +} + +/* +================= +CG_AddPainTwitch +================= +*/ +static void CG_AddPainTwitch( centity_t *cent, vec3_t torsoAngles ) { + int t; + float f; + + t = cg.time - cent->pe.painTime; + if ( t >= PAIN_TWITCH_TIME ) { + return; + } + + f = 1.0 - (float)t / PAIN_TWITCH_TIME; + + if ( cent->pe.painDirection ) { + torsoAngles[ROLL] += 20 * f; + } else { + torsoAngles[ROLL] -= 20 * f; + } +} + + +typedef struct boneAngleParms_s { + void *ghoul2; + int modelIndex; + char *boneName; + vec3_t angles; + int flags; + int up; + int right; + int forward; + qhandle_t *modelList; + int blendTime; + int currentTime; + + qboolean refreshSet; +} boneAngleParms_t; + +boneAngleParms_t cgBoneAnglePostSet; + +void CG_G2SetBoneAngles(void *ghoul2, int modelIndex, const char *boneName, const vec3_t angles, const int flags, + const int up, const int right, const int forward, qhandle_t *modelList, + int blendTime , int currentTime ) +{ //we want to hold off on setting the bone angles until the end of the frame, because every time we set + //them the entire skeleton has to be reconstructed. +#if 0 + //This function should ONLY be called from CG_Player() or a function that is called only within CG_Player(). + //At the end of the frame we will check to use this information to call SetBoneAngles + memset(&cgBoneAnglePostSet, 0, sizeof(cgBoneAnglePostSet)); + cgBoneAnglePostSet.ghoul2 = ghoul2; + cgBoneAnglePostSet.modelIndex = modelIndex; + cgBoneAnglePostSet.boneName = (char *)boneName; + + cgBoneAnglePostSet.angles[0] = angles[0]; + cgBoneAnglePostSet.angles[1] = angles[1]; + cgBoneAnglePostSet.angles[2] = angles[2]; + + cgBoneAnglePostSet.flags = flags; + cgBoneAnglePostSet.up = up; + cgBoneAnglePostSet.right = right; + cgBoneAnglePostSet.forward = forward; + cgBoneAnglePostSet.modelList = modelList; + cgBoneAnglePostSet.blendTime = blendTime; + cgBoneAnglePostSet.currentTime = currentTime; + + cgBoneAnglePostSet.refreshSet = qtrue; +#endif + //Unfortunately the above doesn't really work. + trap_G2API_SetBoneAngles(ghoul2, modelIndex, boneName, angles, flags, up, right, forward, modelList, + blendTime, currentTime); +} + +qboolean CG_InKnockDown( int anim ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_KNOCKDOWN1: + case BOTH_KNOCKDOWN2: + case BOTH_KNOCKDOWN3: + case BOTH_KNOCKDOWN4: + case BOTH_KNOCKDOWN5: + return qtrue; + break; + case BOTH_GETUP1: + case BOTH_GETUP2: + case BOTH_GETUP3: + case BOTH_GETUP4: + case BOTH_GETUP5: + case BOTH_FORCE_GETUP_F1: + case BOTH_FORCE_GETUP_F2: + case BOTH_FORCE_GETUP_B1: + case BOTH_FORCE_GETUP_B2: + case BOTH_FORCE_GETUP_B3: + case BOTH_FORCE_GETUP_B4: + case BOTH_FORCE_GETUP_B5: + return qtrue; + break; + } + return qfalse; +} + +void CG_G2ClientSpineAngles( centity_t *cent, vec3_t viewAngles, const vec3_t angles, vec3_t thoracicAngles, vec3_t ulAngles, vec3_t llAngles ) +{ + float legDif = 0; +// cent->pe.torso.pitchAngle = viewAngles[PITCH]; + viewAngles[YAW] = AngleDelta( cent->lerpAngles[YAW], angles[YAW] ); + legDif = viewAngles[YAW]; +// cent->pe.torso.yawAngle = viewAngles[YAW]; + + /* + if ( !BG_FlippingAnim( cent->currentState.legsAnim ) + && !BG_SpinningSaberAnim( cent->currentState.legsAnim ) + && !BG_SpinningSaberAnim( cent->currentState.torsoAnim ) + && !BG_SaberInSpecial(cent->currentState.saberMove) + && cent->currentState.legsAnim != cent->currentState.torsoAnim )//NOTE: presumes your legs & torso are on the same frame, though they *should* be because PM_SetAnimFinal tries to keep them in synch + */ + if ( !BG_FlippingAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InDeathAnim(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && + !BG_InDeathAnim(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && + !CG_InRoll(cent) && + !CG_InRollAnim(cent) && + !BG_SaberInSpecial(cent->currentState.saberMove) && + !BG_SaberInSpecialAttack(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && + + !CG_InKnockDown(cent->currentState.torsoAnim) && + !CG_InKnockDown(cent->currentState.legsAnim) && + !CG_InKnockDown(cgs.clientinfo[cent->currentState.number].torsoAnim) && + !CG_InKnockDown(cgs.clientinfo[cent->currentState.number].legsAnim) && + + !BG_FlippingAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) && + !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) && + + !(cent->currentState.eFlags & EF_DEAD) && + (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) != (cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && + (cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) != (cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT)) + {//FIXME: no need to do this if legs and torso on are same frame + //adjust for motion offset + mdxaBone_t boltMatrix; + vec3_t motionFwd, motionAngles; + vec3_t motionRt, tempAng; + int ang; + + trap_G2API_GetBoltMatrix_NoRecNoRot( cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_motion, &boltMatrix, vec3_origin, cent->lerpOrigin, cg.time, /*cgs.gameModels*/0, cent->modelScale); + trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, motionFwd ); + + vectoangles( motionFwd, motionAngles ); + + trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_X, motionRt ); + vectoangles( motionRt, tempAng ); + motionAngles[ROLL] = -tempAng[PITCH]; + + for ( ang = 0; ang < 3; ang++ ) + { + viewAngles[ang] = AngleNormalize180( viewAngles[ang] - AngleNormalize180( motionAngles[ang] ) ); + } + } + + //Keep it within 80 degrees of the leg angles, on either side. Will hopefully prevent spine twisting. + /* + if (legDif > 0) + { + legDif += 80; + } + else + { + legDif -= 80; + } + + if (legDif < 0 && viewAngles[YAW] < legDif) + { + viewAngles[YAW] = legDif; + } + if (legDif > 0 && viewAngles[YAW] > legDif) + { + viewAngles[YAW] = legDif; + } + */ + + //distribute the angles differently up the spine + //NOTE: each of these distributions must add up to 1.0f + thoracicAngles[PITCH] = viewAngles[PITCH]*0.20f; + llAngles[PITCH] = viewAngles[PITCH]*0.40f; + ulAngles[PITCH] = viewAngles[PITCH]*0.40f; + + thoracicAngles[YAW] = viewAngles[YAW]*0.20f; + ulAngles[YAW] = viewAngles[YAW]*0.35f; + llAngles[YAW] = viewAngles[YAW]*0.45f; + + thoracicAngles[ROLL] = viewAngles[ROLL]*0.20f; + ulAngles[ROLL] = viewAngles[ROLL]*0.35f; + llAngles[ROLL] = viewAngles[ROLL]*0.45f; +} + +static void CG_G2PlayerAngles( centity_t *cent, vec3_t legs[3], vec3_t legsAngles){ + vec3_t torsoAngles, headAngles; + float dest; + static int movementOffsets[8] = { 0, 22, 45, -22, 0, 22, -45, -22 }; + vec3_t velocity; + float speed; //, speed_dif, speed_desired; + int dir; + vec3_t velPos, velAng; + int adddir = 0; + float dif; + float degrees_negative = 0; + float degrees_positive = 0; + vec3_t ulAngles, llAngles, viewAngles, angles, thoracicAngles = {0,0,0}; + + VectorCopy( cent->lerpAngles, headAngles ); + headAngles[YAW] = AngleMod( headAngles[YAW] ); + VectorClear( legsAngles ); + VectorClear( torsoAngles ); + + // --------- yaw ------------- + + // allow yaw to drift a bit + if ((( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) != BOTH_STAND1) || + ( cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ) != WeaponReadyAnim[cent->currentState.weapon] ) + { + // if not standing still, always point all in the same direction + cent->pe.torso.yawing = qtrue; // always center + cent->pe.torso.pitching = qtrue; // always center + cent->pe.legs.yawing = qtrue; // always center + } + + // adjust legs for movement dir + if ( cent->currentState.eFlags & EF_DEAD ) { + // don't let dead bodies twitch + dir = 0; + } else { + dir = cent->currentState.angles2[YAW]; + if ( dir < 0 || dir > 7 ) { + CG_Error( "Bad player movement angle" ); + } + } + if (!cent->isATST) + { + torsoAngles[YAW] = headAngles[YAW] + 0.25 * movementOffsets[ dir ]; + } + else + { + torsoAngles[YAW] = headAngles[YAW]; + } + + // torso +// CG_SwingAngles( torsoAngles[YAW], 25, 90, /*cg_swingSpeed.value*/ 0.3, ¢->pe.torso.yawAngle, ¢->pe.torso.yawing ); +// torsoAngles[YAW] = cent->pe.torso.yawAngle; + + //for now, turn torso instantly and let the legs swing to follow + cent->pe.torso.yawAngle = torsoAngles[YAW]; + + // --------- pitch ------------- + + VectorCopy( cent->currentState.pos.trDelta, velocity ); + speed = VectorNormalize( velocity ); + + if (!speed) + { + torsoAngles[YAW] = headAngles[YAW]; + } + + // only show a fraction of the pitch angle in the torso + if ( headAngles[PITCH] > 180 ) { + dest = (-360 + headAngles[PITCH]) * 0.75; + } else { + dest = headAngles[PITCH] * 0.75; + } + CG_SwingAngles( dest, 15, 30, 0.1, ¢->pe.torso.pitchAngle, ¢->pe.torso.pitching ); + torsoAngles[PITCH] = cent->pe.torso.pitchAngle; + + // --------- roll ------------- + + + // lean towards the direction of travel + + /* + speed_desired = cent->currentState.speed/4; + + if (!speed) + { + speed_dif = 0; + } + else + { + speed_dif = (speed/speed_desired); + } + + if (speed_dif > 1) + { + speed_dif = 1; + } + else if (speed_dif < 0) + { + speed_dif = 0; + } + */ + if ( speed ) { + vec3_t axis[3]; + float side; + + speed *= 0.05; + + AnglesToAxis( legsAngles, axis ); + side = speed * DotProduct( velocity, axis[1] ); + legsAngles[ROLL] -= side; + + side = speed * DotProduct( velocity, axis[0] ); + legsAngles[PITCH] += side; + } + + //legsAngles[YAW] = headAngles[YAW] + (movementOffsets[ dir ]*speed_dif); + + //rww - crazy velocity-based leg angle calculation + legsAngles[YAW] = headAngles[YAW]; + velPos[0] = cent->lerpOrigin[0] + velocity[0]; + velPos[1] = cent->lerpOrigin[1] + velocity[1]; + velPos[2] = cent->lerpOrigin[2];// + velocity[2]; + + if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) + { //off the ground, no direction-based leg angles + VectorCopy(cent->lerpOrigin, velPos); + } + + VectorSubtract(cent->lerpOrigin, velPos, velAng); + + if (!VectorCompare(velAng, vec3_origin)) + { + vectoangles(velAng, velAng); + + if (velAng[YAW] <= legsAngles[YAW]) + { + degrees_negative = (legsAngles[YAW] - velAng[YAW]); + degrees_positive = (360 - legsAngles[YAW]) + velAng[YAW]; + } + else + { + degrees_negative = legsAngles[YAW] + (360 - velAng[YAW]); + degrees_positive = (velAng[YAW] - legsAngles[YAW]); + } + + if (degrees_negative < degrees_positive) + { + dif = degrees_negative; + adddir = 0; + } + else + { + dif = degrees_positive; + adddir = 1; + } + + if (dif > 90) + { + dif = (180 - dif); + } + + if (cent->isATST) + { + if (dif > 360) + { + dif = 360; + } + } + else + { + if (dif > 60) + { + dif = 60; + } + } + + //Slight hack for when playing is running backward + if (dir == 3 || dir == 5) + { + dif = -dif; + } + + if (adddir) + { + legsAngles[YAW] -= dif; + } + else + { + legsAngles[YAW] += dif; + } + } + + if (cent->isATST) + { + cent->pe.legs.yawSwingDif = CG_SwingAnglesATST( cent, legsAngles[YAW], 40, 360, /*cg_swingSpeed.value*/ 0.05, ¢->pe.legs.yawAngle, ¢->pe.legs.yawing ); + } + else + { + if (!cg_swingAngles.integer) + { + cent->pe.legs.yawAngle = legsAngles[YAW]; + } + else + { + CG_SwingAngles( legsAngles[YAW], 40, 90, /*cg_swingSpeed.value*/ 0.3, ¢->pe.legs.yawAngle, ¢->pe.legs.yawing ); + } + } + legsAngles[YAW] = cent->pe.legs.yawAngle; + + // pain twitch + CG_AddPainTwitch( cent, torsoAngles ); + + legsAngles[ROLL] = 0; + torsoAngles[ROLL] = 0; + + VectorCopy(legsAngles, cent->turAngles); + + if (cent->isATST) + { + legsAngles[ROLL] = 0; + legsAngles[PITCH] = 0; + } + + // pull the angles back out of the hierarchial chain + AnglesSubtract( headAngles, torsoAngles, headAngles ); + AnglesSubtract( torsoAngles, legsAngles, torsoAngles ); + + legsAngles[PITCH] = 0; + + AnglesToAxis( legsAngles, legs ); + // we assume that model 0 is the player model. + + if (cent->isATST) + { + vec3_t flatYaw; + + flatYaw[YAW] = 0;//cent->lerpAngles[YAW]; + flatYaw[ROLL] = 0; + flatYaw[PITCH] = 0; + CG_G2SetBoneAngles(cent->ghoul2, 0, "pelvis", flatYaw, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", torsoAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + return; + } + +// trap_G2API_SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", torsoAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + VectorCopy( cent->lerpAngles, viewAngles ); + viewAngles[YAW] = viewAngles[ROLL] = 0; + viewAngles[PITCH] *= 0.5; + + VectorSet( angles, 0, legsAngles[1], 0 ); + + angles[0] = legsAngles[0]; + if ( angles[0] > 30 ) + { + angles[0] = 30; + } + else if ( angles[0] < -30 ) + { + angles[0] = -30; + } + +// VectorCopy(legsAngles, angles); + + CG_G2ClientSpineAngles(cent, viewAngles, angles, thoracicAngles, ulAngles, llAngles); + + if ( cent->currentState.otherEntityNum2 && !(cent->currentState.eFlags & EF_DEAD) ) + { //using an emplaced gun + centity_t *empEnt = &cg_entities[cent->currentState.otherEntityNum2]; + vec3_t headAng; + + VectorClear(headAng); + + if (empEnt) + { + vec3_t dif, empOrg, originalAngle; + + VectorCopy(cent->lerpAngles, originalAngle); + + VectorCopy(empEnt->lerpOrigin, empOrg); + + empOrg[2] += 32; + + VectorSubtract(empOrg, cent->lerpOrigin, dif); + VectorNormalize(dif); + vectoangles(dif, dif); + + VectorCopy(dif, cent->lerpAngles); + + VectorCopy(cent->lerpAngles, legsAngles); + + VectorSubtract(originalAngle, cent->lerpAngles, headAng); + + headAng[PITCH] /= 3; //scale it down so that you can't bend your neck all the way back + } + else + { + VectorClear(cent->lerpAngles); + VectorClear(legsAngles); + } + + AnglesToAxis( legsAngles, legs ); + + CG_G2SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", headAng, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + } + else + { + CG_G2SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", ulAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", llAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", thoracicAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + if (cg_duelHeadAngles.integer && !(cent->currentState.eFlags & EF_DEAD)) + { + if ( !BG_FlippingAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InDeathAnim(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && + !BG_InDeathAnim(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && + !CG_InRoll(cent) && + !CG_InRollAnim(cent) && + !BG_SaberInSpecial(cent->currentState.saberMove) && + !BG_SaberInSpecialAttack(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && + + !BG_FlippingAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) && + !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) ) + { //use similar check to spine correction, these are the "safe" anims to be in for twisting around + vec3_t headAngles; + int duelClient = -1; + + if (cgs.gametype == GT_TOURNAMENT && (cent->currentState.number == cgs.duelist1 || cent->currentState.number == cgs.duelist2)) + { + if (cgs.duelist1 >= 0 && cgs.duelist1 < MAX_CLIENTS && + cgs.duelist2 >= 0 && cgs.duelist2 < MAX_CLIENTS) + { + if (cent->currentState.number == cgs.duelist1) + { + duelClient = cgs.duelist2; + } + else + { + duelClient = cgs.duelist1; + } + } + } + else if (cg.snap && cg.snap->ps.duelInProgress) + { + if (cent->currentState.number == cg.snap->ps.duelIndex) + { + duelClient = cg.snap->ps.clientNum; + } + else if (cent->currentState.number == cg.snap->ps.clientNum) + { + duelClient = cg.snap->ps.duelIndex; + } + } + + if (duelClient != -1) + { + trace_t tr; + + CG_Trace( &tr, cent->lerpOrigin, NULL, NULL, cg_entities[duelClient].lerpOrigin, cent->currentState.number, MASK_PLAYERSOLID ); + + if (tr.fraction == 1.0 || + tr.entityNum == duelClient) + { + centity_t *duelCEnt = &cg_entities[duelClient]; + vec3_t headSub; + + VectorSubtract(duelCEnt->lerpOrigin, cent->lerpOrigin, headSub); + vectoangles(headSub, headSub); + + headAngles[ROLL] = AngleSubtract(headSub[ROLL], cent->lerpAngles[ROLL]); + headAngles[YAW] = AngleSubtract(headSub[YAW], cent->lerpAngles[YAW]); + + if (headAngles[YAW] > 55) + { + headAngles[YAW] = 55; + } + if (headAngles[YAW] < -55) + { + headAngles[YAW] = -55; + } + + VectorCopy( cent->lerpAngles, viewAngles ); + viewAngles[YAW] = viewAngles[ROLL] = 0; + viewAngles[PITCH] *= 0.5; + + headAngles[PITCH] = AngleSubtract(headSub[PITCH], viewAngles[PITCH]); + if (headAngles[PITCH] > 16) + { + headAngles[PITCH] = 16; + } + if (headAngles[PITCH] < -16) + { + headAngles[PITCH] = -16; + } + headAngles[PITCH] += 6; + } + else + { + VectorClear(headAngles); + } + } + else + { + VectorClear(headAngles); + } + + CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", headAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + } + else + { + VectorClear(headAngles); + CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", headAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + } + } + else + { + CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + } + } + + //trap_G2API_SetBoneAngles(cent->ghoul2, 0, "cranium", headAngles, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, cgs.gameModels, 0, cg.time); +} +//========================================================================== + +/* +=============== +CG_HasteTrail +=============== +*/ +static void CG_HasteTrail( centity_t *cent ) { + localEntity_t *smoke; + vec3_t origin; + int anim; + + if ( cent->trailTime > cg.time ) { + return; + } + anim = cent->pe.legs.animationNumber & ~ANIM_TOGGLEBIT; + if ( anim != BOTH_RUN1 && anim != BOTH_RUNBACK1 ) { + return; + } + + cent->trailTime += 100; + if ( cent->trailTime < cg.time ) { + cent->trailTime = cg.time; + } + + VectorCopy( cent->lerpOrigin, origin ); + origin[2] -= 16; + + smoke = CG_SmokePuff( origin, vec3_origin, + 8, + 1, 1, 1, 1, + 500, + cg.time, + 0, + 0, + cgs.media.hastePuffShader ); + + // use the optimized local entity add + smoke->leType = LE_SCALE_FADE; +} + +/* +=============== +CG_DustTrail +=============== +*/ +/* +static void CG_DustTrail( centity_t *cent ) { + int anim; + localEntity_t *dust; + vec3_t end, vel; + trace_t tr; + + if (!cg_enableDust.integer) + return; + + if ( cent->dustTrailTime > cg.time ) { + return; + } + + anim = cent->pe.legs.animationNumber & ~ANIM_TOGGLEBIT; + if ( anim != LEGS_LANDB && anim != LEGS_LAND ) { + return; + } + + cent->dustTrailTime += 40; + if ( cent->dustTrailTime < cg.time ) { + cent->dustTrailTime = cg.time; + } + + VectorCopy(cent->currentState.pos.trBase, end); + end[2] -= 64; + CG_Trace( &tr, cent->currentState.pos.trBase, NULL, NULL, end, cent->currentState.number, MASK_PLAYERSOLID ); + + if ( !(tr.surfaceFlags & SURF_DUST) ) + return; + + VectorCopy( cent->currentState.pos.trBase, end ); + end[2] -= 16; + + VectorSet(vel, 0, 0, -30); + dust = CG_SmokePuff( end, vel, + 24, + .8f, .8f, 0.7f, 0.33f, + 500, + cg.time, + 0, + 0, + cgs.media.dustPuffShader ); +} +*/ + +/* +=============== +CG_TrailItem +=============== +*/ +#if 0 +static void CG_TrailItem( centity_t *cent, qhandle_t hModel ) { + refEntity_t ent; + vec3_t angles; + vec3_t axis[3]; + + VectorCopy( cent->lerpAngles, angles ); + angles[PITCH] = 0; + angles[ROLL] = 0; + AnglesToAxis( angles, axis ); + + memset( &ent, 0, sizeof( ent ) ); + VectorMA( cent->lerpOrigin, -16, axis[0], ent.origin ); + ent.origin[2] += 16; + angles[YAW] += 90; + AnglesToAxis( angles, ent.axis ); + + ent.hModel = hModel; + trap_R_AddRefEntityToScene( &ent ); +} +#endif + + +/* +=============== +CG_PlayerFlag +=============== +*/ +static void CG_PlayerFlag( centity_t *cent, qhandle_t hModel ) { + refEntity_t ent; + vec3_t angles; + vec3_t axis[3]; + vec3_t boltOrg, tAng, getAng, right; + mdxaBone_t boltMatrix; + + if (cent->currentState.number == cg.snap->ps.clientNum && + !cg.renderingThirdPerson) + { + return; + } + + if (!cent->ghoul2) + { + return; + } + + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_llumbar, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, boltOrg); + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, tAng); + vectoangles(tAng, tAng); + + VectorCopy(cent->lerpAngles, angles); + + boltOrg[2] -= 12; + VectorSet(getAng, 0, cent->lerpAngles[1], 0); + AngleVectors(getAng, 0, right, 0); + boltOrg[0] += right[0]*8; + boltOrg[1] += right[1]*8; + boltOrg[2] += right[2]*8; + + angles[PITCH] = -cent->lerpAngles[PITCH]/2-30; + angles[YAW] = tAng[YAW]+270; + + AnglesToAxis(angles, axis); + + memset( &ent, 0, sizeof( ent ) ); + VectorMA( boltOrg, 24, axis[0], ent.origin ); + + angles[ROLL] += 20; + AnglesToAxis( angles, ent.axis ); + + ent.hModel = hModel; + + ent.modelScale[0] = 0.5; + ent.modelScale[1] = 0.5; + ent.modelScale[2] = 0.5; + ScaleModelAxis(&ent); + + /* + if (cent->currentState.number == cg.snap->ps.clientNum) + { //If we're the current client (in third person), render the flag on our back transparently + ent.renderfx |= RF_FORCE_ENT_ALPHA; + ent.shaderRGBA[3] = 100; + } + */ + //FIXME: Not doing this at the moment because sorting totally messes up + + trap_R_AddRefEntityToScene( &ent ); +} + + +/* +=============== +CG_PlayerPowerups +=============== +*/ +static void CG_PlayerPowerups( centity_t *cent, refEntity_t *torso ) { + int powerups; + clientInfo_t *ci; + + powerups = cent->currentState.powerups; + if ( !powerups ) { + return; + } + + // quad gives a dlight + if ( powerups & ( 1 << PW_QUAD ) ) { + trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 0.2f, 0.2f, 1 ); + } + + ci = &cgs.clientinfo[ cent->currentState.clientNum ]; + // redflag + if ( powerups & ( 1 << PW_REDFLAG ) ) { + CG_PlayerFlag( cent, cgs.media.redFlagModel ); + trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 1.0, 0.2f, 0.2f ); + } + + // blueflag + if ( powerups & ( 1 << PW_BLUEFLAG ) ) { + CG_PlayerFlag( cent, cgs.media.blueFlagModel ); + trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 0.2f, 0.2f, 1.0 ); + } + + // neutralflag + if ( powerups & ( 1 << PW_NEUTRALFLAG ) ) { + trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 1.0, 1.0, 1.0 ); + } + + // haste leaves smoke trails + if ( powerups & ( 1 << PW_HASTE ) ) { + CG_HasteTrail( cent ); + } +} + + +/* +=============== +CG_PlayerFloatSprite + +Float a sprite over the player's head +=============== +*/ +static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader ) { + int rf; + refEntity_t ent; + + if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson ) { + rf = RF_THIRD_PERSON; // only show in mirrors + } else { + rf = 0; + } + + memset( &ent, 0, sizeof( ent ) ); + VectorCopy( cent->lerpOrigin, ent.origin ); + ent.origin[2] += 48; + ent.reType = RT_SPRITE; + ent.customShader = shader; + ent.radius = 10; + ent.renderfx = rf; + ent.shaderRGBA[0] = 255; + ent.shaderRGBA[1] = 255; + ent.shaderRGBA[2] = 255; + ent.shaderRGBA[3] = 255; + trap_R_AddRefEntityToScene( &ent ); +} + + + +/* +=============== +CG_PlayerFloatSprite + +Same as above but allows custom RGBA values +=============== +*/ +#if 0 +static void CG_PlayerFloatSpriteRGBA( centity_t *cent, qhandle_t shader, vec4_t rgba ) { + int rf; + refEntity_t ent; + + if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson ) { + rf = RF_THIRD_PERSON; // only show in mirrors + } else { + rf = 0; + } + + memset( &ent, 0, sizeof( ent ) ); + VectorCopy( cent->lerpOrigin, ent.origin ); + ent.origin[2] += 48; + ent.reType = RT_SPRITE; + ent.customShader = shader; + ent.radius = 10; + ent.renderfx = rf; + ent.shaderRGBA[0] = rgba[0]; + ent.shaderRGBA[1] = rgba[1]; + ent.shaderRGBA[2] = rgba[2]; + ent.shaderRGBA[3] = rgba[3]; + trap_R_AddRefEntityToScene( &ent ); +} +#endif + + +/* +=============== +CG_PlayerSprites + +Float sprites over the player's head +=============== +*/ +static void CG_PlayerSprites( centity_t *cent ) { +// int team; + + if (cg.snap && + CG_IsMindTricked(cent->currentState.trickedentindex, + cent->currentState.trickedentindex2, + cent->currentState.trickedentindex3, + cent->currentState.trickedentindex4, + cg.snap->ps.clientNum)) + { + return; //this entity is mind-tricking the current client, so don't render it + } + + if ( cent->currentState.eFlags & EF_CONNECTION ) { + CG_PlayerFloatSprite( cent, cgs.media.connectionShader ); + return; + } + + if ( cent->currentState.eFlags & EF_TALK ) { + CG_PlayerFloatSprite( cent, cgs.media.balloonShader ); + return; + } +/* + if ( cent->currentState.eFlags & EF_AWARD_IMPRESSIVE ) { + CG_PlayerFloatSprite( cent, cgs.media.medalImpressive ); + return; + } + + if ( cent->currentState.eFlags & EF_AWARD_EXCELLENT ) { + CG_PlayerFloatSprite( cent, cgs.media.medalExcellent ); + return; + } + + if ( cent->currentState.eFlags & EF_AWARD_GAUNTLET ) { + CG_PlayerFloatSprite( cent, cgs.media.medalGauntlet ); + return; + } + + if ( cent->currentState.eFlags & EF_AWARD_DEFEND ) { + CG_PlayerFloatSprite( cent, cgs.media.medalDefend ); + return; + } + + if ( cent->currentState.eFlags & EF_AWARD_ASSIST ) { + CG_PlayerFloatSprite( cent, cgs.media.medalAssist ); + return; + } + + if ( cent->currentState.eFlags & EF_AWARD_CAP ) { + CG_PlayerFloatSprite( cent, cgs.media.medalCapture ); + return; + } + + team = cgs.clientinfo[ cent->currentState.clientNum ].team; + if ( !(cent->currentState.eFlags & EF_DEAD) && + cg.snap->ps.persistant[PERS_TEAM] == team && + cgs.gametype >= GT_TEAM) { + if (cg_drawFriend.integer) { + CG_PlayerFloatSprite( cent, cgs.media.friendShader ); + } + return; + } +*/ +} + +/* +=============== +CG_PlayerShadow + +Returns the Z component of the surface being shadowed + + should it return a full plane instead of a Z? +=============== +*/ +#define SHADOW_DISTANCE 128 +static qboolean CG_PlayerShadow( centity_t *cent, float *shadowPlane ) { + vec3_t end, mins = {-15, -15, 0}, maxs = {15, 15, 2}; + trace_t trace; + float alpha; + + *shadowPlane = 0; + + if ( cg_shadows.integer == 0 ) { + return qfalse; + } + + if (cent->currentState.eFlags & EF_DEAD) + { + return qfalse; + } + + if (CG_IsMindTricked(cent->currentState.trickedentindex, + cent->currentState.trickedentindex2, + cent->currentState.trickedentindex3, + cent->currentState.trickedentindex4, + cg.snap->ps.clientNum)) + { + return qfalse; //this entity is mind-tricking the current client, so don't render it + } + + // send a trace down from the player to the ground + VectorCopy( cent->lerpOrigin, end ); + end[2] -= SHADOW_DISTANCE; + + trap_CM_BoxTrace( &trace, cent->lerpOrigin, end, mins, maxs, 0, MASK_PLAYERSOLID ); + + // no shadow if too high + if ( trace.fraction == 1.0 || trace.startsolid || trace.allsolid ) { + return qfalse; + } + + *shadowPlane = trace.endpos[2] + 1; + + if ( cg_shadows.integer != 1 ) { // no mark for stencil or projection shadows + return qtrue; + } + + // fade the shadow out with height + alpha = 1.0 - trace.fraction; + + // bk0101022 - hack / FPE - bogus planes? + //assert( DotProduct( trace.plane.normal, trace.plane.normal ) != 0.0f ) + + // add the mark as a temporary, so it goes directly to the renderer + // without taking a spot in the cg_marks array + CG_ImpactMark( cgs.media.shadowMarkShader, trace.endpos, trace.plane.normal, + cent->pe.legs.yawAngle, alpha,alpha,alpha,1, qfalse, 24, qtrue ); + + return qtrue; +} + + +/* +=============== +CG_PlayerSplash + +Draw a mark at the water surface +=============== +*/ +static void CG_PlayerSplash( centity_t *cent ) { + vec3_t start, end; + trace_t trace; + int contents; + polyVert_t verts[4]; + + if ( !cg_shadows.integer ) { + return; + } + + VectorCopy( cent->lerpOrigin, end ); + end[2] -= 24; + + // if the feet aren't in liquid, don't make a mark + // this won't handle moving water brushes, but they wouldn't draw right anyway... + contents = trap_CM_PointContents( end, 0 ); + if ( !( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) ) { + return; + } + + VectorCopy( cent->lerpOrigin, start ); + start[2] += 32; + + // if the head isn't out of liquid, don't make a mark + contents = trap_CM_PointContents( start, 0 ); + if ( contents & ( CONTENTS_SOLID | CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) { + return; + } + + // trace down to find the surface + trap_CM_BoxTrace( &trace, start, end, NULL, NULL, 0, ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ); + + if ( trace.fraction == 1.0 ) { + return; + } + + // create a mark polygon + VectorCopy( trace.endpos, verts[0].xyz ); + verts[0].xyz[0] -= 32; + verts[0].xyz[1] -= 32; + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255; + + VectorCopy( trace.endpos, verts[1].xyz ); + verts[1].xyz[0] -= 32; + verts[1].xyz[1] += 32; + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255; + + VectorCopy( trace.endpos, verts[2].xyz ); + verts[2].xyz[0] += 32; + verts[2].xyz[1] += 32; + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255; + + VectorCopy( trace.endpos, verts[3].xyz ); + verts[3].xyz[0] += 32; + verts[3].xyz[1] -= 32; + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255; + + trap_R_AddPolyToScene( cgs.media.wakeMarkShader, 4, verts ); +} + +void CG_ForcePushBlur( vec3_t org ) +{ + localEntity_t *ex; + + ex = CG_AllocLocalEntity(); + ex->leType = LE_PUFF; + ex->refEntity.reType = RT_SPRITE; + ex->radius = 2.0f; + ex->startTime = cg.time; + ex->endTime = ex->startTime + 120; + VectorCopy( org, ex->pos.trBase ); + ex->pos.trTime = cg.time; + ex->pos.trType = TR_LINEAR; + VectorScale( cg.refdef.viewaxis[1], 55, ex->pos.trDelta ); + + ex->color[0] = 24; + ex->color[1] = 32; + ex->color[2] = 40; + ex->refEntity.customShader = trap_R_RegisterShader( "gfx/effects/forcePush" ); + + ex = CG_AllocLocalEntity(); + ex->leType = LE_PUFF; + ex->refEntity.reType = RT_SPRITE; + ex->refEntity.rotation = 180.0f; + ex->radius = 2.0f; + ex->startTime = cg.time; + ex->endTime = ex->startTime + 120; + VectorCopy( org, ex->pos.trBase ); + ex->pos.trTime = cg.time; + ex->pos.trType = TR_LINEAR; + VectorScale( cg.refdef.viewaxis[1], -55, ex->pos.trDelta ); + + ex->color[0] = 24; + ex->color[1] = 32; + ex->color[2] = 40; + ex->refEntity.customShader = trap_R_RegisterShader( "gfx/effects/forcePush" ); +} + +void CG_ForceGripEffect( vec3_t org ) +{ + localEntity_t *ex; + float wv = sin( cg.time * 0.004f ) * 0.08f + 0.1f; + + ex = CG_AllocLocalEntity(); + ex->leType = LE_PUFF; + ex->refEntity.reType = RT_SPRITE; + ex->radius = 2.0f; + ex->startTime = cg.time; + ex->endTime = ex->startTime + 120; + VectorCopy( org, ex->pos.trBase ); + ex->pos.trTime = cg.time; + ex->pos.trType = TR_LINEAR; + VectorScale( cg.refdef.viewaxis[1], 55, ex->pos.trDelta ); + + ex->color[0] = 200+((wv*255)); + if (ex->color[0] > 255) + { + ex->color[0] = 255; + } + ex->color[1] = 0; + ex->color[2] = 0; + ex->refEntity.customShader = trap_R_RegisterShader( "gfx/effects/forcePush" ); + + ex = CG_AllocLocalEntity(); + ex->leType = LE_PUFF; + ex->refEntity.reType = RT_SPRITE; + ex->refEntity.rotation = 180.0f; + ex->radius = 2.0f; + ex->startTime = cg.time; + ex->endTime = ex->startTime + 120; + VectorCopy( org, ex->pos.trBase ); + ex->pos.trTime = cg.time; + ex->pos.trType = TR_LINEAR; + VectorScale( cg.refdef.viewaxis[1], -55, ex->pos.trDelta ); + + /* + ex->color[0] = 200+((wv*255)); + if (ex->color[0] > 255) + { + ex->color[0] = 255; + } + */ + ex->color[0] = 255; + ex->color[1] = 255; + ex->color[2] = 255; + ex->refEntity.customShader = cgs.media.redSaberGlowShader;//trap_R_RegisterShader( "gfx/effects/forcePush" ); +} + + +/* +=============== +CG_AddRefEntityWithPowerups + +Adds a piece with modifications or duplications for powerups +Also called by CG_Missile for quad rockets, but nobody can tell... +=============== +*/ +void CG_AddRefEntityWithPowerups( refEntity_t *ent, entityState_t *state, int team ) { + + if (CG_IsMindTricked(state->trickedentindex, + state->trickedentindex2, + state->trickedentindex3, + state->trickedentindex4, + cg.snap->ps.clientNum)) + { + return; //this entity is mind-tricking the current client, so don't render it + } + + trap_R_AddRefEntityToScene( ent ); + + if ( state->powerups & ( 1 << PW_QUAD ) ) + { + if (team == TEAM_RED) + ent->customShader = cgs.media.redQuadShader; + else + ent->customShader = cgs.media.quadShader; + trap_R_AddRefEntityToScene( ent ); + } + if ( state->powerups & ( 1 << PW_BATTLESUIT ) ) { + ent->customShader = cgs.media.battleSuitShader; + trap_R_AddRefEntityToScene( ent ); + } +} + +#define MAX_SHIELD_TIME 2000.0 +#define MIN_SHIELD_TIME 2000.0 + + +void CG_PlayerShieldHit(int entitynum, vec3_t dir, int amount) +{ + centity_t *cent; + int time; + + if (entitynum<0 || entitynum >= MAX_CLIENTS) + { + return; + } + + cent = &cg_entities[entitynum]; + + if (amount > 100) + { + time = cg.time + MAX_SHIELD_TIME; // 2 sec. + } + else + { + time = cg.time + 500 + amount*15; + } + + if (time > cent->damageTime) + { + cent->damageTime = time; + VectorScale(dir, -1, dir); + vectoangles(dir, cent->damageAngles); + } +} + + +void CG_DrawPlayerShield(centity_t *cent, vec3_t origin) +{ + refEntity_t ent; + int alpha; + float scale; + + // Don't draw the shield when the player is dead. + if (cent->currentState.eFlags & EF_DEAD) + { + return; + } + + memset( &ent, 0, sizeof( ent ) ); + + VectorCopy( origin, ent.origin ); + ent.origin[2] += 10.0; + AnglesToAxis( cent->damageAngles, ent.axis ); + + alpha = 255.0 * ((cent->damageTime - cg.time) / MIN_SHIELD_TIME) + random()*16; + if (alpha>255) + alpha=255; + + // Make it bigger, but tighter if more solid + scale = 1.4 - ((float)alpha*(0.4/255.0)); // Range from 1.0 to 1.4 + VectorScale( ent.axis[0], scale, ent.axis[0] ); + VectorScale( ent.axis[1], scale, ent.axis[1] ); + VectorScale( ent.axis[2], scale, ent.axis[2] ); + + ent.hModel = cgs.media.halfShieldModel; + ent.customShader = cgs.media.halfShieldShader; + ent.shaderRGBA[0] = alpha; + ent.shaderRGBA[1] = alpha; + ent.shaderRGBA[2] = alpha; + ent.shaderRGBA[3] = 255; + trap_R_AddRefEntityToScene( &ent ); +} + + +void CG_PlayerHitFX(centity_t *cent) +{ + centity_t *curent; + + // only do the below fx if the cent in question is...uh...me, and it's first person. + if (cent->currentState.clientNum != cg.predictedPlayerState.clientNum || cg.renderingThirdPerson) + { + // Get the NON-PREDICTED player entity, because the predicted one doesn't have the damage info on it. + curent = &cg_entities[cent->currentState.number]; + + if (curent->damageTime > cg.time) + { + CG_DrawPlayerShield(curent, cent->lerpOrigin); + } + + return; + } +} + + + +/* +================= +CG_LightVerts +================= +*/ +int CG_LightVerts( vec3_t normal, int numVerts, polyVert_t *verts ) +{ + int i, j; + float incoming; + vec3_t ambientLight; + vec3_t lightDir; + vec3_t directedLight; + + trap_R_LightForPoint( verts[0].xyz, ambientLight, directedLight, lightDir ); + + for (i = 0; i < numVerts; i++) { + incoming = DotProduct (normal, lightDir); + if ( incoming <= 0 ) { + verts[i].modulate[0] = ambientLight[0]; + verts[i].modulate[1] = ambientLight[1]; + verts[i].modulate[2] = ambientLight[2]; + verts[i].modulate[3] = 255; + continue; + } + j = ( ambientLight[0] + incoming * directedLight[0] ); + if ( j > 255 ) { + j = 255; + } + verts[i].modulate[0] = j; + + j = ( ambientLight[1] + incoming * directedLight[1] ); + if ( j > 255 ) { + j = 255; + } + verts[i].modulate[1] = j; + + j = ( ambientLight[2] + incoming * directedLight[2] ); + if ( j > 255 ) { + j = 255; + } + verts[i].modulate[2] = j; + + verts[i].modulate[3] = 255; + } + return qtrue; +} + +void CG_DoSaber( vec3_t origin, vec3_t dir, float length, saber_colors_t color, int rfx ) +{ + vec3_t mid, rgb={1,1,1}; + qhandle_t blade = 0, glow = 0; + refEntity_t saber; + float radiusmult; + + if ( length < 0.5f ) + { + // if the thing is so short, just forget even adding me. + return; + } + + // Find the midpoint of the saber for lighting purposes + VectorMA( origin, length * 0.5f, dir, mid ); + + switch( color ) + { + case SABER_RED: + glow = cgs.media.redSaberGlowShader; + blade = cgs.media.redSaberCoreShader; + VectorSet( rgb, 1.0f, 0.2f, 0.2f ); + break; + case SABER_ORANGE: + glow = cgs.media.orangeSaberGlowShader; + blade = cgs.media.orangeSaberCoreShader; + VectorSet( rgb, 1.0f, 0.5f, 0.1f ); + break; + case SABER_YELLOW: + glow = cgs.media.yellowSaberGlowShader; + blade = cgs.media.yellowSaberCoreShader; + VectorSet( rgb, 1.0f, 1.0f, 0.2f ); + break; + case SABER_GREEN: + glow = cgs.media.greenSaberGlowShader; + blade = cgs.media.greenSaberCoreShader; + VectorSet( rgb, 0.2f, 1.0f, 0.2f ); + break; + case SABER_BLUE: + glow = cgs.media.blueSaberGlowShader; + blade = cgs.media.blueSaberCoreShader; + VectorSet( rgb, 0.2f, 0.4f, 1.0f ); + break; + case SABER_PURPLE: + glow = cgs.media.purpleSaberGlowShader; + blade = cgs.media.purpleSaberCoreShader; + VectorSet( rgb, 0.9f, 0.2f, 1.0f ); + break; + default: + glow = cgs.media.blueSaberGlowShader; + blade = cgs.media.blueSaberCoreShader; + VectorSet( rgb, 0.2f, 0.4f, 1.0f ); + break; + } + + // always add a light because sabers cast a nice glow before they slice you in half!! or something... + trap_R_AddLightToScene( mid, (length*2.0f) + (random()*8.0f), rgb[0], rgb[1], rgb[2] ); + + memset( &saber, 0, sizeof( refEntity_t )); + + // Saber glow is it's own ref type because it uses a ton of sprites, otherwise it would eat up too many + // refEnts to do each glow blob individually + saber.saberLength = length; + + // Jeff, I did this because I foolishly wished to have a bright halo as the saber is unleashed. + // It's not quite what I'd hoped tho. If you have any ideas, go for it! --Pat + if (length < SABER_LENGTH_MAX) + { + radiusmult = 1.0 + (2.0 / length); // Note this creates a curve, and length cannot be < 0.5. + } + else + { + radiusmult = 1.0; + } + + + saber.radius = (2.8 + crandom() * 0.2f)*radiusmult; + + + VectorCopy( origin, saber.origin ); + VectorCopy( dir, saber.axis[0] ); + saber.reType = RT_SABER_GLOW; + saber.customShader = glow; + saber.shaderRGBA[0] = saber.shaderRGBA[1] = saber.shaderRGBA[2] = saber.shaderRGBA[3] = 0xff; + saber.renderfx = rfx; + + trap_R_AddRefEntityToScene( &saber ); + + // Do the hot core + VectorMA( origin, length, dir, saber.origin ); + VectorMA( origin, -1, dir, saber.oldorigin ); + + +// CG_TestLine(saber.origin, saber.oldorigin, 50, 0x000000ff, 3); + saber.customShader = blade; + saber.reType = RT_LINE; + saber.radius = (1.0 + crandom() * 0.2f)*radiusmult; + + saber.shaderTexCoord[0] = saber.shaderTexCoord[1] = 1.0f; + saber.shaderRGBA[0] = saber.shaderRGBA[1] = saber.shaderRGBA[2] = saber.shaderRGBA[3] = 0xff; + + trap_R_AddRefEntityToScene( &saber ); +} + +//-------------------------------------------------------------- +// CG_GetTagWorldPosition +// +// Can pass in NULL for the axis +//-------------------------------------------------------------- +void CG_GetTagWorldPosition( refEntity_t *model, char *tag, vec3_t pos, vec3_t axis[3] ) +{ + orientation_t orientation; + int i = 0; + + // Get the requested tag + trap_R_LerpTag( &orientation, model->hModel, model->oldframe, model->frame, + 1.0f - model->backlerp, tag ); + + VectorCopy( model->origin, pos ); + for ( i = 0 ; i < 3 ; i++ ) + { + VectorMA( pos, orientation.origin[i], model->axis[i], pos ); + } + + if ( axis ) + { + MatrixMultiply( orientation.axis, model->axis, axis ); + } +} + +#define MAX_MARK_FRAGMENTS 128 +#define MAX_MARK_POINTS 384 +extern markPoly_t *CG_AllocMark(); + +void CG_CreateSaberMarks( vec3_t start, vec3_t end, vec3_t normal ) +{ +// byte colors[4]; + int i, j; + int numFragments; + vec3_t axis[3], originalPoints[4], mid; + vec3_t markPoints[MAX_MARK_POINTS], projection; + polyVert_t *v, verts[MAX_VERTS_ON_POLY]; + markPoly_t *mark; + markFragment_t markFragments[MAX_MARK_FRAGMENTS], *mf; + + float radius = 0.65f; + + if ( !cg_addMarks.integer ) + { + return; + } + + VectorSubtract( end, start, axis[1] ); + VectorNormalize( axis[1] ); + + // create the texture axis + VectorCopy( normal, axis[0] ); + CrossProduct( axis[1], axis[0], axis[2] ); + + // create the full polygon that we'll project + for ( i = 0 ; i < 3 ; i++ ) + { // stretch a bit more in the direction that we are traveling in... debateable as to whether this makes things better or worse + originalPoints[0][i] = start[i] - radius * axis[1][i] - radius * axis[2][i]; + originalPoints[1][i] = end[i] + radius * axis[1][i] - radius * axis[2][i]; + originalPoints[2][i] = end[i] + radius * axis[1][i] + radius * axis[2][i]; + originalPoints[3][i] = start[i] - radius * axis[1][i] + radius * axis[2][i]; + } + + VectorScale( normal, -1, projection ); + + // get the fragments + numFragments = trap_CM_MarkFragments( 4, (const float (*)[3])originalPoints, + projection, MAX_MARK_POINTS, markPoints[0], MAX_MARK_FRAGMENTS, markFragments ); + + for ( i = 0, mf = markFragments ; i < numFragments ; i++, mf++ ) + { + // we have an upper limit on the complexity of polygons that we store persistantly + if ( mf->numPoints > MAX_VERTS_ON_POLY ) + { + mf->numPoints = MAX_VERTS_ON_POLY; + } + + for ( j = 0, v = verts ; j < mf->numPoints ; j++, v++ ) + { + vec3_t delta; + + // Set up our texture coords, this may need some work + VectorCopy( markPoints[mf->firstPoint + j], v->xyz ); + VectorAdd( end, start, mid ); + VectorScale( mid, 0.5f, mid ); + VectorSubtract( v->xyz, mid, delta ); + + v->st[0] = 0.5 + DotProduct( delta, axis[1] ) * (0.05f + random() * 0.03f); + v->st[1] = 0.5 + DotProduct( delta, axis[2] ) * (0.15f + random() * 0.05f); + } + + if (cg_saberDynamicMarks.integer) + { + int i = 0; + int i_2 = 0; + addpolyArgStruct_t apArgs; + vec3_t x; + + memset (&apArgs, 0, sizeof(apArgs)); + + while (i < 4) + { + while (i_2 < 3) + { + apArgs.p[i][i_2] = verts[i].xyz[i_2]; + + i_2++; + } + + i_2 = 0; + i++; + } + + i = 0; + i_2 = 0; + + while (i < 4) + { + while (i_2 < 2) + { + apArgs.ev[i][i_2] = verts[i].st[i_2]; + + i_2++; + } + + i_2 = 0; + i++; + } + + //When using addpoly, having a situation like this tends to cause bad results. + //(I assume it doesn't like trying to draw a polygon over two planes and extends + //the vertex out to some odd value) + VectorSubtract(apArgs.p[0], apArgs.p[3], x); + if (VectorLength(x) > 3.0f) + { + return; + } + + apArgs.numVerts = mf->numPoints; + VectorCopy(vec3_origin, apArgs.vel); + VectorCopy(vec3_origin, apArgs.accel); + + apArgs.alpha1 = 1.0f; + apArgs.alpha2 = 0.0f; + apArgs.alphaParm = 255.0f; + + VectorSet(apArgs.rgb1, 0.0f, 0.0f, 0.0f); + VectorSet(apArgs.rgb2, 0.0f, 0.0f, 0.0f); + + apArgs.rgbParm = 0.0f; + + apArgs.bounce = 0; + apArgs.motionDelay = 0; + apArgs.killTime = cg_saberDynamicMarkTime.integer; + apArgs.shader = cgs.media.rivetMarkShader; + apArgs.flags = 0x08000000|0x00000004; + + trap_FX_AddPoly(&apArgs); + + apArgs.shader = trap_R_RegisterShader("gfx/effects/saberDamageGlow"); + apArgs.rgb1[0] = 215 + random() * 40.0f; + apArgs.rgb1[1] = 96 + random() * 32.0f; + apArgs.rgb1[2] = apArgs.alphaParm = random()*15.0f; + + apArgs.rgb1[0] /= 255; + apArgs.rgb1[1] /= 255; + apArgs.rgb1[2] /= 255; + VectorCopy(apArgs.rgb1, apArgs.rgb2); + + apArgs.killTime = 100; + + trap_FX_AddPoly(&apArgs); + } + else + { + // save it persistantly, do burn first + mark = CG_AllocMark(); + mark->time = cg.time; + mark->alphaFade = qtrue; + mark->markShader = cgs.media.rivetMarkShader; + mark->poly.numVerts = mf->numPoints; + mark->color[0] = mark->color[1] = mark->color[2] = mark->color[3] = 255; + memcpy( mark->verts, verts, mf->numPoints * sizeof( verts[0] ) ); + + // And now do a glow pass + // by moving the start time back, we can hack it to fade out way before the burn does + mark = CG_AllocMark(); + mark->time = cg.time - 8500; + mark->alphaFade = qfalse; + mark->markShader = trap_R_RegisterShader("gfx/effects/saberDamageGlow"); + mark->poly.numVerts = mf->numPoints; + mark->color[0] = 215 + random() * 40.0f; + mark->color[1] = 96 + random() * 32.0f; + mark->color[2] = mark->color[3] = random()*15.0f; + memcpy( mark->verts, verts, mf->numPoints * sizeof( verts[0] ) ); + } + } +} + +#ifdef G2_COLLISION_ENABLED +qboolean CG_G2TraceCollide(trace_t *tr, vec3_t lastValidStart, vec3_t lastValidEnd) +{ + if (tr->entityNum < MAX_CLIENTS) + { //Hit a client with the normal trace, try the collision trace. + G2Trace_t G2Trace; + centity_t *g2Hit; + vec3_t vIdentity = {1.0f, 1.0f, 1.0f}; + vec3_t angles; + int tN = 0; + float fRadius = 0; + + memset (&G2Trace, 0, sizeof(G2Trace)); + + while (tN < MAX_G2_COLLISIONS) + { + G2Trace[tN].mEntityNum = -1; + tN++; + } + g2Hit = &cg_entities[tr->entityNum]; + + if (g2Hit && g2Hit->ghoul2) + { + angles[ROLL] = angles[PITCH] = 0; + angles[YAW] = g2Hit->lerpAngles[YAW]; + + trap_G2API_CollisionDetect ( G2Trace, g2Hit->ghoul2, angles, g2Hit->lerpOrigin, cg.time, g2Hit->currentState.number, lastValidStart, lastValidEnd, vIdentity, 0, 2, fRadius ); + + if (G2Trace[0].mEntityNum != g2Hit->currentState.number) + { + tr->fraction = 1.0f; + tr->entityNum = ENTITYNUM_NONE; + tr->startsolid = 0; + tr->allsolid = 0; + return qfalse; + } + else + { //Yay! + VectorCopy(G2Trace[0].mCollisionPosition, tr->endpos); + VectorCopy(G2Trace[0].mCollisionNormal, tr->plane.normal); + return qtrue; + } + } + } + + return qfalse; +} + +void CG_G2SaberEffects(vec3_t start, vec3_t end, centity_t *owner) +{ + trace_t trace; + vec3_t startTr; + vec3_t endTr; + qboolean backWards = qfalse; + qboolean doneWithTraces = qfalse; + + while (!doneWithTraces) + { + if (!backWards) + { + VectorCopy(start, startTr); + VectorCopy(end, endTr); + } + else + { + VectorCopy(end, startTr); + VectorCopy(start, endTr); + } + + CG_Trace( &trace, startTr, NULL, NULL, endTr, owner->currentState.number, MASK_PLAYERSOLID ); + + if (trace.entityNum < MAX_CLIENTS) + { //hit a client.. + CG_G2TraceCollide(&trace, startTr, endTr); + + if (trace.entityNum != ENTITYNUM_NONE) + { //it succeeded with the ghoul2 trace + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), trace.endpos, trace.plane.normal ); + } + } + + if (!backWards) + { + backWards = qtrue; + } + else + { + doneWithTraces = qtrue; + } + } +} +#endif + +#define SABER_TRAIL_TIME 40.0f +#define FX_USE_ALPHA 0x08000000 + +void CG_AddSaberBlade( centity_t *cent, centity_t *scent, refEntity_t *saber, int renderfx, int modelIndex, vec3_t origin, vec3_t angles, qboolean fromSaber) +{ + vec3_t org_, end, v, + axis_[3] = {0,0,0, 0,0,0, 0,0,0}; // shut the compiler up + trace_t trace; + int i = 0; + float saberLen, dualSaberLen; + float diff; + clientInfo_t *client; + centity_t *saberEnt; + saberTrail_t *saberTrail; + mdxaBone_t boltMatrix; + vec3_t futureAngles; + effectTrailArgStruct_t fx; + int scolor = 0; + vec3_t otherPos, otherDir, otherEnd; + float dualLen = 0.7; + + saberEnt = &cg_entities[cent->currentState.saberEntityNum]; + + if (/*cg.snap->ps.clientNum == cent->currentState.number && */ + cgs.clientinfo[ cent->currentState.clientNum ].team != TEAM_SPECTATOR && + !(cg.snap->ps.pm_flags & PMF_FOLLOW)) + { + if (cent->saberLength < 1) + { + cent->saberLength = 1; + cent->saberExtendTime = cg.time; + } + + if (cent->saberLength < SABER_LENGTH_MAX) + { + cent->saberLength += (cg.time - cent->saberExtendTime)*0.05; + } + + if (cent->saberLength > SABER_LENGTH_MAX) + { + cent->saberLength = SABER_LENGTH_MAX; + } + + cent->saberExtendTime = cg.time; + saberLen = cent->saberLength; + } + else + { + saberLen = SABER_LENGTH_MAX; + } + +/* +Ghoul2 Insert Start +*/ + + dualSaberLen = saberLen; + + if ((cent->currentState.eFlags & EF_DEAD) && !fromSaber) + { //trying to draw a saber on a corpse? That's bad. + return; + } + + futureAngles[YAW] = angles[YAW]; + futureAngles[PITCH] = angles[PITCH]; + futureAngles[ROLL] = angles[ROLL]; + + // figure out where the actual model muzzle is + if (fromSaber) + { + trap_G2API_GetBoltMatrix(scent->ghoul2, 0, 0, &boltMatrix, futureAngles, origin, cg.time, cgs.gameModels, scent->modelScale); + } + else + { + trap_G2API_GetBoltMatrix(scent->ghoul2, 1, 0, &boltMatrix, futureAngles, origin, cg.time, cgs.gameModels, scent->modelScale); + } + // work the matrix axis stuff into the original axis and origins used. + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, org_); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_Y, axis_[0]); + + if (!fromSaber && saberEnt) + { + VectorCopy(org_, saberEnt->currentState.pos.trBase); + + VectorCopy(axis_[0], saberEnt->currentState.apos.trBase); + } + + client = &cgs.clientinfo[cent->currentState.number]; + + if (!client) + { //something horrible has apparently happened + return; + } + + if (cent->currentState.bolt2) + { + VectorMA( org_, saberLen*dualLen, axis_[0], end ); + } + else + { + VectorMA( org_, saberLen, axis_[0], end ); + } + + VectorAdd( end, axis_[0], end ); + + if (cent->currentState.bolt2) + { + otherPos[0] = org_[0] - axis_[0][0]*12; + otherPos[1] = org_[1] - axis_[0][1]*12; + otherPos[2] = org_[2] - axis_[0][2]*12; + + otherDir[0] = -axis_[0][0]; + otherDir[1] = -axis_[0][1]; + otherDir[2] = -axis_[0][2]; + + VectorMA( otherPos, dualSaberLen*dualLen, otherDir, otherEnd ); + VectorAdd( otherEnd, otherDir, otherEnd ); + } + + scolor = cgs.clientinfo[cent->currentState.number].icolor1; + + if (cgs.gametype >= GT_TEAM && !cgs.jediVmerc ) + { + if (cgs.clientinfo[cent->currentState.number].team == TEAM_RED) + { + scolor = SABER_RED; + } + else if (cgs.clientinfo[cent->currentState.number].team == TEAM_BLUE) + { + scolor = SABER_BLUE; + } + } + + if (!cg_saberContact.integer) + { //if we don't have saber contact enabled, just add the blade and don't care what it's touching + goto CheckTrail; + } + +#ifdef G2_COLLISION_ENABLED + if (cg_saberModelTraceEffect.integer) + { + CG_G2SaberEffects(org_, end, cent); + } +#endif + + for ( i = 0; i < 1; i++ )//was 2 because it would go through architecture and leave saber trails on either side of the brush - but still looks bad if we hit a corner, blade is still 8 longer than hit + { + if ( i ) + {//tracing from end to base + CG_Trace( &trace, end, NULL, NULL, org_, ENTITYNUM_NONE, MASK_SOLID ); + } + else + {//tracing from base to end + CG_Trace( &trace, org_, NULL, NULL, end, ENTITYNUM_NONE, MASK_SOLID ); + } + + if ( trace.fraction < 1.0f ) + { + vec3_t trDir; + VectorCopy(trace.plane.normal, trDir); + if (!trDir[0] && !trDir[1] && !trDir[2]) + { + trDir[1] = 1; + } + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), trace.endpos, trDir ); + + //Stop saber? (it wouldn't look right if it was stuck through a thin wall and unable to hurt players on the other side) + VectorSubtract(org_, trace.endpos, v); + saberLen = VectorLength(v); + + VectorCopy(trace.endpos, end); + + if (cent->currentState.bolt2) + { + break; + } + // All I need is a bool to mark whether I have a previous point to work with. + //....come up with something better.. + if ( client->saberTrail.haveOldPos[i] ) + { + if ( trace.entityNum == ENTITYNUM_WORLD ) + {//only put marks on architecture + // Let's do some cool burn/glowing mark bits!!! + CG_CreateSaberMarks( client->saberTrail.oldPos[i], trace.endpos, trace.plane.normal ); + + //make a sound + if ( cg.time - client->saberHitWallSoundDebounceTime >= 100 ) + {//ugh, need to have a real sound debouncer... or do this game-side + client->saberHitWallSoundDebounceTime = cg.time; + trap_S_StartSound ( trace.endpos, -1, CHAN_WEAPON, trap_S_RegisterSound( va("sound/weapons/saber/saberhitwall%i", Q_irand(1, 3)) ) ); + } + } + } + else + { + // if we impact next frame, we'll mark a slash mark + client->saberTrail.haveOldPos[i] = qtrue; +// CG_ImpactMark( cgs.media.rivetMarkShader, client->saberTrail.oldPos[i], client->saberTrail.oldNormal[i], +// 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, qfalse, 1.1f, qfalse ); + } + + // stash point so we can connect-the-dots later + VectorCopy( trace.endpos, client->saberTrail.oldPos[i] ); + VectorCopy( trace.plane.normal, client->saberTrail.oldNormal[i] ); + } + else + { + if (cent->currentState.bolt2) + { + break; + } + + if ( client->saberTrail.haveOldPos[i] ) + { + // Hmmm, no impact this frame, but we have an old point + // Let's put the mark there, we should use an endcap mark to close the line, but we + // can probably just get away with a round mark +// CG_ImpactMark( cgs.media.rivetMarkShader, client->saberTrail.oldPos[i], client->saberTrail.oldNormal[i], +// 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, qfalse, 1.1f, qfalse ); + } + + // we aren't impacting, so turn off our mark tracking mechanism + client->saberTrail.haveOldPos[i] = qfalse; + } + } + + if (cent->currentState.bolt2) + { + for ( i = 0; i < 1; i++ )//was 2 because it would go through architecture and leave saber trails on either side of the brush - but still looks bad if we hit a corner, blade is still 8 longer than hit + { + CG_Trace( &trace, otherPos, NULL, NULL, otherEnd, ENTITYNUM_NONE, MASK_SOLID ); + + if ( trace.fraction < 1.0f ) + { + vec3_t trDir; + VectorCopy(trace.plane.normal, trDir); + if (!trDir[0] && !trDir[1] && !trDir[2]) + { + trDir[1] = 1; + } + + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), trace.endpos, trDir ); + + //Stop saber? (it wouldn't look right if it was stuck through a thin wall and unable to hurt players on the other side) + VectorSubtract(otherPos, trace.endpos, v); + dualSaberLen = VectorLength(v); + + VectorCopy(trace.endpos, end); + } + } + } +CheckTrail: + + if (!cg_saberTrail.integer) + { //don't do the trail in this case + goto JustDoIt; + } + + saberTrail = &client->saberTrail; + + // if we happen to be timescaled or running in a high framerate situation, we don't want to flood + // the system with very small trail slices...but perhaps doing it by distance would yield better results? + if ( cg.time > saberTrail->lastTime + 2 ) // 2ms + { + if ( (saberMoveData[cent->currentState.saberMove].trailLength > 0 || ((cent->currentState.powerups & (1 << PW_SPEED) && cg_speedTrail.integer)) || cent->currentState.saberInFlight) && cg.time < saberTrail->lastTime + 2000 ) // if we have a stale segment, don't draw until we have a fresh one + { + vec3_t rgb1={255.0f,255.0f,255.0f}; + + switch( scolor ) + { + case SABER_RED: + VectorSet( rgb1, 255.0f, 0.0f, 0.0f ); + break; + case SABER_ORANGE: + VectorSet( rgb1, 255.0f, 64.0f, 0.0f ); + break; + case SABER_YELLOW: + VectorSet( rgb1, 255.0f, 255.0f, 0.0f ); + break; + case SABER_GREEN: + VectorSet( rgb1, 0.0f, 255.0f, 0.0f ); + break; + case SABER_BLUE: + VectorSet( rgb1, 0.0f, 64.0f, 255.0f ); + break; + case SABER_PURPLE: + VectorSet( rgb1, 220.0f, 0.0f, 255.0f ); + break; + default: + VectorSet( rgb1, 0.0f, 64.0f, 255.0f ); + break; + } + + //Here we will use the happy process of filling a struct in with arguments and passing it to a trap function + //so that we can take the struct and fill in an actual CTrail type using the data within it once we get it + //into the effects area + + // Go from new muzzle to new end...then to old end...back down to old muzzle...finally + // connect back to the new muzzle...this is our trail quad + VectorCopy( org_, fx.mVerts[0].origin ); + VectorMA( end, 3.0f, axis_[0], fx.mVerts[1].origin ); + + VectorCopy( saberTrail->tip, fx.mVerts[2].origin ); + VectorCopy( saberTrail->base, fx.mVerts[3].origin ); + + diff = cg.time - saberTrail->lastTime; + + // I'm not sure that clipping this is really the best idea + //This prevents the trail from showing at all in low framerate situations. + //if ( diff <= SABER_TRAIL_TIME * 2 ) + { + float oldAlpha = 1.0f - ( diff / SABER_TRAIL_TIME ); + + // New muzzle + VectorCopy( rgb1, fx.mVerts[0].rgb ); + fx.mVerts[0].alpha = 255.0f; + + fx.mVerts[0].ST[0] = 0.0f; + fx.mVerts[0].ST[1] = 1.0f; + fx.mVerts[0].destST[0] = 1.0f; + fx.mVerts[0].destST[1] = 1.0f; + + // new tip + VectorCopy( rgb1, fx.mVerts[1].rgb ); + fx.mVerts[1].alpha = 255.0f; + + fx.mVerts[1].ST[0] = 0.0f; + fx.mVerts[1].ST[1] = 0.0f; + fx.mVerts[1].destST[0] = 1.0f; + fx.mVerts[1].destST[1] = 0.0f; + + // old tip + VectorCopy( rgb1, fx.mVerts[2].rgb ); + fx.mVerts[2].alpha = 255.0f; + + fx.mVerts[2].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want + fx.mVerts[2].ST[1] = 0.0f; + fx.mVerts[2].destST[0] = 1.0f + fx.mVerts[2].ST[0]; + fx.mVerts[2].destST[1] = 0.0f; + + // old muzzle + VectorCopy( rgb1, fx.mVerts[3].rgb ); + fx.mVerts[3].alpha = 255.0f; + + fx.mVerts[3].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want + fx.mVerts[3].ST[1] = 1.0f; + fx.mVerts[3].destST[0] = 1.0f + fx.mVerts[2].ST[0]; + fx.mVerts[3].destST[1] = 1.0f; + + fx.mShader = cgs.media.saberBlurShader; + fx.mSetFlags = FX_USE_ALPHA; + fx.mKillTime = SABER_TRAIL_TIME; + + trap_FX_AddPrimitive(&fx); + } + + if (cent->currentState.bolt2) + { + float oldAlpha = 1.0f - ( diff / SABER_TRAIL_TIME ); + + VectorCopy( otherPos, fx.mVerts[0].origin ); + VectorMA( otherEnd, 3.0f, otherDir, fx.mVerts[1].origin ); + + VectorCopy( saberTrail->dualtip, fx.mVerts[2].origin ); + VectorCopy( saberTrail->dualbase, fx.mVerts[3].origin ); + + // New muzzle + VectorCopy( rgb1, fx.mVerts[0].rgb ); + fx.mVerts[0].alpha = 255.0f; + + fx.mVerts[0].ST[0] = 0.0f; + fx.mVerts[0].ST[1] = 1.0f; + fx.mVerts[0].destST[0] = 1.0f; + fx.mVerts[0].destST[1] = 1.0f; + + // new tip + VectorCopy( rgb1, fx.mVerts[1].rgb ); + fx.mVerts[1].alpha = 255.0f; + + fx.mVerts[1].ST[0] = 0.0f; + fx.mVerts[1].ST[1] = 0.0f; + fx.mVerts[1].destST[0] = 1.0f; + fx.mVerts[1].destST[1] = 0.0f; + + // old tip + VectorCopy( rgb1, fx.mVerts[2].rgb ); + fx.mVerts[2].alpha = 255.0f; + + fx.mVerts[2].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want + fx.mVerts[2].ST[1] = 0.0f; + fx.mVerts[2].destST[0] = 1.0f + fx.mVerts[2].ST[0]; + fx.mVerts[2].destST[1] = 0.0f; + + // old muzzle + VectorCopy( rgb1, fx.mVerts[3].rgb ); + fx.mVerts[3].alpha = 255.0f; + + fx.mVerts[3].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want + fx.mVerts[3].ST[1] = 1.0f; + fx.mVerts[3].destST[0] = 1.0f + fx.mVerts[2].ST[0]; + fx.mVerts[3].destST[1] = 1.0f; + + fx.mShader = cgs.media.saberBlurShader; + fx.mSetFlags = FX_USE_ALPHA; + fx.mKillTime = SABER_TRAIL_TIME; + + trap_FX_AddPrimitive(&fx); + } + } + + // we must always do this, even if we aren't active..otherwise we won't know where to pick up from + VectorCopy( org_, saberTrail->base ); + VectorMA( end, 3.0f, axis_[0], saberTrail->tip ); + saberTrail->lastTime = cg.time; + + if (cent->currentState.bolt2) + { + VectorCopy( otherPos, saberTrail->dualbase ); + VectorMA( otherEnd, 3.0f, otherDir, saberTrail->dualtip ); + } + } + +JustDoIt: + + if (client && cent->currentState.bolt2) + { + float sideOneLen = saberLen*dualLen; + float sideTwoLen = dualSaberLen*dualLen; + + if (sideOneLen < 1) + { + sideOneLen = 1; + } + + CG_DoSaber( org_, axis_[0], sideOneLen, scolor, renderfx ); + + CG_DoSaber( otherPos, otherDir, sideTwoLen, scolor, renderfx ); + } + else + { + // Pass in the renderfx flags attached to the saber weapon model...this is done so that saber glows + // will get rendered properly in a mirror...not sure if this is necessary?? + CG_DoSaber( org_, axis_[0], saberLen, scolor, renderfx ); + } +} + +int CG_IsMindTricked(int trickIndex1, int trickIndex2, int trickIndex3, int trickIndex4, int client) +{ + int checkIn; + int sub = 0; + + if (cg_entities[client].currentState.forcePowersActive & (1 << FP_SEE)) + { + return 0; + } + + if (client > 47) + { + checkIn = trickIndex4; + sub = 48; + } + else if (client > 31) + { + checkIn = trickIndex3; + sub = 32; + } + else if (client > 15) + { + checkIn = trickIndex2; + sub = 16; + } + else + { + checkIn = trickIndex1; + } + + if (checkIn & (1 << (client-sub))) + { + return 1; + } + + return 0; +} + +#define SPEED_TRAIL_DISTANCE 6 + +void CG_DrawPlayerSphere(centity_t *cent, vec3_t origin, float scale, int shader) +{ + refEntity_t ent; + + // Don't draw the shield when the player is dead. + if (cent->currentState.eFlags & EF_DEAD) + { + return; + } + + memset( &ent, 0, sizeof( ent ) ); + + VectorCopy( origin, ent.origin ); + ent.origin[2] += 9.0; + + VectorSubtract(cg.refdef.vieworg, ent.origin, ent.axis[0]); + if (VectorNormalize(ent.axis[0]) <= 0.1f) + { // Entity is right on vieworg. quit. + return; + } + + VectorCopy(cg.refdef.viewaxis[2], ent.axis[2]); + CrossProduct(ent.axis[0], ent.axis[2], ent.axis[1]); + + VectorScale(ent.axis[0], scale, ent.axis[0]); + VectorScale(ent.axis[1], scale, ent.axis[1]); + VectorScale(ent.axis[2], -scale, ent.axis[2]); + + ent.hModel = cgs.media.halfShieldModel; + ent.customShader = shader; + + trap_R_AddRefEntityToScene( &ent ); +} + +void CG_AddLightningBeam(vec3_t start, vec3_t end) +{ + vec3_t dir, chaos, + c1, c2, + v1, v2; + float len, + s1, s2, s3; + + addbezierArgStruct_t b; + + VectorCopy(start, b.start); + VectorCopy(end, b.end); + + VectorSubtract( b.end, b.start, dir ); + len = VectorNormalize( dir ); + + // Get the base control points, we'll work from there + VectorMA( b.start, 0.3333f * len, dir, c1 ); + VectorMA( b.start, 0.6666f * len, dir, c2 ); + + // get some chaos values that really aren't very chaotic :) + s1 = sin( cg.time * 0.005f ) * 2 + crandom() * 0.2f; + s2 = sin( cg.time * 0.001f ); + s3 = sin( cg.time * 0.011f ); + + VectorSet( chaos, len * 0.01f * s1, + len * 0.02f * s2, + len * 0.04f * (s1 + s2 + s3)); + + VectorAdd( c1, chaos, c1 ); + VectorScale( chaos, 4.0f, v1 ); + + VectorSet( chaos, -len * 0.02f * s3, + len * 0.01f * (s1 * s2), + -len * 0.02f * (s1 + s2 * s3)); + + VectorAdd( c2, chaos, c2 ); + VectorScale( chaos, 2.0f, v2 ); + + VectorSet( chaos, 1.0f, 1.0f, 1.0f ); + + VectorCopy(c1, b.control1); + VectorCopy(vec3_origin, b.control1Vel); + VectorCopy(c2, b.control2); + VectorCopy(vec3_origin, b.control2Vel); + + b.size1 = 6.0f; + b.size2 = 6.0f; + b.sizeParm = 0.0f; + b.alpha1 = 0.0f; + b.alpha2 = 0.2f; + b.alphaParm = 0.5f; + + /* + VectorCopy(WHITE, b.sRGB); + VectorCopy(WHITE, b.eRGB); + */ + + b.sRGB[0] = 255; + b.sRGB[1] = 255; + b.sRGB[2] = 255; + VectorCopy(b.sRGB, b.eRGB); + + b.rgbParm = 0.0f; + b.killTime = 50; + b.shader = trap_R_RegisterShader( "gfx/misc/electric2" ); + b.flags = 0x00000001; //FX_ALPHA_LINEAR + + trap_FX_AddBezier(&b); +} + +void CG_AddRandomLightning(vec3_t start, vec3_t end) +{ + vec3_t inOrg, outOrg; + + VectorCopy(start, inOrg); + VectorCopy(end, outOrg); + + if ( rand() & 1 ) + { + outOrg[0] += Q_irand(0, 24); + inOrg[0] += Q_irand(0, 8); + } + else + { + outOrg[0] -= Q_irand(0, 24); + inOrg[0] -= Q_irand(0, 8); + } + + if ( rand() & 1 ) + { + outOrg[1] += Q_irand(0, 24); + inOrg[1] += Q_irand(0, 8); + } + else + { + outOrg[1] -= Q_irand(0, 24); + inOrg[1] -= Q_irand(0, 8); + } + + if ( rand() & 1 ) + { + outOrg[2] += Q_irand(0, 50); + inOrg[2] += Q_irand(0, 40); + } + else + { + outOrg[2] -= Q_irand(0, 64); + inOrg[2] -= Q_irand(0, 40); + } + + CG_AddLightningBeam(inOrg, outOrg); +} + +extern char *forceHolocronModels[]; + +qboolean CG_ThereIsAMaster(void) +{ + int i = 0; + centity_t *cent; + + while (i < MAX_CLIENTS) + { + cent = &cg_entities[i]; + + if (cent && cent->currentState.isJediMaster) + { + return qtrue; + } + + i++; + } + + return qfalse; +} + +//rww - here begins the majority of my g2animent stuff. +void CG_FootStepGeneric(centity_t *cent, int anim) +{ + int groundType; + + if ((anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || + (anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) + { + groundType = FOOTSTEP_GENERIC; + goto skipCheck; + } + + if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) + { + return; + } + +skipCheck: + groundType = FOOTSTEP_GENERIC;//CG_FootstepForSurface(cent, cent->currentState.number); + +//skipCheck: + + if (!groundType) + { + return; + } + + switch (groundType) + { + case FOOTSTEP_GENERIC: + trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_NORMAL ][rand()&3] ); + break; + case FOOTSTEP_METAL: + trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_METAL ][rand()&3] ); + break; + default: + break; + } +} + +static void CG_G2EntSetLerpFrameAnimation( centity_t *cent, lerpFrame_t *lf, int newAnimation, float animSpeedMult, qboolean torsoOnly) { + animation_t *anim; + float animSpeed; + int flags=BONE_ANIM_OVERRIDE_FREEZE; + int oldAnim = -1; + int blendTime = 150; + + if (cent->currentState.number < MAX_CLIENTS && + cent->currentState.teamowner && + !cent->isATST) + { + return; + } + + oldAnim = lf->animationNumber; + + lf->animationNumber = newAnimation; + newAnimation &= ~ANIM_TOGGLEBIT; + + if ( newAnimation < 0 || newAnimation >= MAX_TOTALANIMATIONS ) { +// CG_Error( "Bad animation number: %i", newAnimation ); + return; + } + + anim = &bgGlobalAnimations[ newAnimation ]; + + lf->animation = anim; + lf->animationTime = lf->frameTime + anim->initialLerp; + + if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { + CG_Printf( "%d: %d Anim: %i, '%s'\n", cg.time, cent->currentState.clientNum, newAnimation, GetStringForID(animTable, newAnimation)); + } + + if (cent->ghoul2) + { + animSpeed = 50.0f / anim->frameLerp; + if (lf->animation->loopFrames != -1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->isATST) + { + if (animSpeed < 0.3) + { + animSpeed = 0.3; + } + + if (newAnimation == BOTH_WALKBACK1) + { + animSpeed = 0.8; + } + + if (newAnimation != BOTH_DEATH1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + } + } + + if (cg_animBlend.integer) + { + flags |= BONE_ANIM_BLEND; + } + + if (!cent->isATST) + { + if (/*BG_FlippingAnim(newAnimation) ||*/ BG_InDeathAnim(newAnimation)) + { + flags &= ~BONE_ANIM_BLEND; + } + else if ( oldAnim != -1 && + (/*BG_FlippingAnim(oldAnim) ||*/ BG_InDeathAnim(oldAnim)) ) + { + flags &= ~BONE_ANIM_BLEND; + } + + if (flags & BONE_ANIM_BLEND) + { + if (BG_FlippingAnim(newAnimation)) + { + blendTime = 200; + } + else if ( oldAnim != -1 && + (BG_FlippingAnim(oldAnim)) ) + { + blendTime = 200; + } + } + } + + animSpeed *= animSpeedMult; + + if (torsoOnly) + { + lf->animationTorsoSpeed = animSpeedMult; + } + else + { + lf->animationSpeed = animSpeedMult; + } + + if (cent->isATST) + { + int atstBlend = 400; + + if (torsoOnly) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "pelvis", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); + } + } + else + { + if (torsoOnly) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed,cg.time, -1, blendTime); + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); + } + + /* + if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation && + !BG_FlippingAnim( cent->currentState.legsAnim ) && + !BG_SpinningSaberAnim( cent->currentState.legsAnim ) && + !BG_SpinningSaberAnim( cent->currentState.torsoAnim ) && + !BG_InSpecialJump( cent->currentState.legsAnim ) && + !BG_InSpecialJump( cent->currentState.torsoAnim ) && + !BG_InDeathAnim(cent->currentState.legsAnim) && + !BG_InDeathAnim(cent->currentState.torsoAnim) && + !CG_InRoll(cent) && + !BG_SaberInSpecial(cent->currentState.saberMove) && + !BG_SaberInSpecialAttack(cent->currentState.torsoAnim) && + !BG_SaberInSpecialAttack(cent->currentState.legsAnim) ) + */ + if (cg.snap && cg.snap->ps.clientNum == cent->currentState.number) + { //go ahead and use the predicted state if you can. + if ((cg.predictedPlayerState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); + } + } + else + { + if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); + } + } + } + } +} + +static void CG_G2EntRunLerpFrame( centity_t *cent, lerpFrame_t *lf, int newAnimation, float speedScale, qboolean torsoOnly) +{ + int f, numFrames; + animation_t *anim; + + // debugging tool to get no animations + if ( cg_animSpeed.integer == 0 ) { + lf->oldFrame = lf->frame = lf->backlerp = 0; + return; + } + + // see if the animation sequence is switching + if (cent->currentState.forceFrame) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; //|BONE_ANIM_BLEND; + float animSpeed = 1.0f; + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + + lf->animationNumber = 0; + } + else if ( (newAnimation != lf->animationNumber || !lf->animation) || (CG_FirstAnimFrame(lf, torsoOnly, speedScale)) ) + { + CG_G2EntSetLerpFrameAnimation( cent, lf, newAnimation, speedScale, torsoOnly); + } + else if (cent->isATST) + { + if (cent->pe.legs.yawing != !lf->torsoYawing) + { + CG_G2EntSetLerpFrameAnimation( cent, lf, newAnimation, speedScale, torsoOnly); + lf->torsoYawing = cent->pe.legs.yawing; + } + } + + // if we have passed the current frame, move it to + // oldFrame and calculate a new frame + if ( cg.time >= lf->frameTime ) { + if (lf->oldFrame != lf->frame && + lf == &(cent->pe.legs)) + { + int addFinalFrame = CG_InWalkingAnim(lf->animationNumber); //9; + + if (!cent->isATST && + ((lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || (lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) && + addFinalFrame) + { + if ( lf->frame >= (lf->animation->firstFrame+2) && + lf->oldFrame < (lf->animation->firstFrame+2)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && + lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+12) && + lf->oldFrame < (lf->animation->firstFrame+12)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+16) && + lf->oldFrame < (lf->animation->firstFrame+16)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) + { //missed one + CG_FootStepGeneric(cent, lf->animationNumber); + } + } + else if (addFinalFrame && !cent->isATST) + { + if ( lf->frame >= (lf->animation->firstFrame+3) && + lf->oldFrame < (lf->animation->firstFrame+3)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && + lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) + { //missed one + CG_FootStepGeneric(cent, lf->animationNumber); + } + } + } + + lf->oldFrame = lf->frame; + lf->oldFrameTime = lf->frameTime; + + // get the next frame based on the animation + anim = lf->animation; + if ( !anim->frameLerp ) { + return; // shouldn't happen + } + + if ( cg.time < lf->animationTime ) { + lf->frameTime = lf->animationTime; // initial lerp + } else { + lf->frameTime = lf->oldFrameTime + anim->frameLerp; + } + f = ( lf->frameTime - lf->animationTime ) / anim->frameLerp; + f *= speedScale; // adjust for haste, etc + + numFrames = anim->numFrames; + if (anim->flipflop) { + numFrames *= 2; + } + if ( f >= numFrames ) { + f -= numFrames; + if ( anim->loopFrames != -1 ) //Before 0 meant no loop + { + if(anim->numFrames - anim->loopFrames == 0) + { + f %= anim->numFrames; + } + else + { + f %= (anim->numFrames - anim->loopFrames); + } + f += anim->loopFrames; + } + else + { + f = numFrames - 1; + // the animation is stuck at the end, so it + // can immediately transition to another sequence + lf->frameTime = cg.time; + } + } + if ( anim->reversed ) { + lf->frame = anim->firstFrame + anim->numFrames - 1 - f; + } + else if (anim->flipflop && f>=anim->numFrames) { + lf->frame = anim->firstFrame + anim->numFrames - 1 - (f%anim->numFrames); + } + else { + lf->frame = anim->firstFrame + f; + } + if ( cg.time > lf->frameTime ) { + lf->frameTime = cg.time; + if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { + CG_Printf( "Clamp lf->frameTime\n"); + } + } + } + + if ( lf->frameTime > cg.time + 200 ) { + lf->frameTime = cg.time; + } + + if ( lf->oldFrameTime > cg.time ) { + lf->oldFrameTime = cg.time; + } + // calculate current lerp value + if ( lf->frameTime == lf->oldFrameTime ) { + lf->backlerp = 0; + } else { + lf->backlerp = 1.0 - (float)( cg.time - lf->oldFrameTime ) / ( lf->frameTime - lf->oldFrameTime ); + } +} + +static void CG_G2EntAnimation( centity_t *cent, int *legsOld, int *legs, float *legsBackLerp, + int *torsoOld, int *torso, float *torsoBackLerp ) { + float speedScale; + + if ( cg_noPlayerAnims.integer ) { + *legsOld = *legs = *torsoOld = *torso = 0; + return; + } + + if (cent->currentState.forcePowersActive & (1 << FP_RAGE)) + { + speedScale = 1.3; + } + else if (cent->currentState.forcePowersActive & (1 << FP_SPEED)) + { + speedScale = 1.7; + } + else + { + speedScale = 1; + } + + CG_G2EntRunLerpFrame( cent, ¢->pe.legs, cent->currentState.legsAnim, speedScale, qfalse); + + if (!(cent->currentState.forcePowersActive & (1 << FP_RAGE))) + { //don't affect torso anim speed unless raged + speedScale = 1; + } + else + { + speedScale = 1.7; + } + + *legsOld = cent->pe.legs.oldFrame; + *legs = cent->pe.legs.frame; + *legsBackLerp = cent->pe.legs.backlerp; + + CG_G2EntRunLerpFrame( cent, ¢->pe.torso, cent->currentState.torsoAnim, speedScale, qtrue ); + + *torsoOld = cent->pe.torso.oldFrame; + *torso = cent->pe.torso.frame; + *torsoBackLerp = cent->pe.torso.backlerp; +} + +void CG_G2AnimEntSpineAngles( centity_t *cent, vec3_t viewAngles, const vec3_t angles, vec3_t thoracicAngles, vec3_t ulAngles, vec3_t llAngles ) +{ + int ang = 0; + + if (cent->isATST || cent->currentState.teamowner) + { + return; + } + + VectorClear(ulAngles); + VectorClear(llAngles); + + //cent->pe.torso.pitchAngle = viewAngles[PITCH]; + viewAngles[YAW] = AngleDelta( cent->lerpAngles[YAW], angles[YAW] ); + //cent->pe.torso.yawAngle = viewAngles[YAW]; + + //distribute the angles differently up the spine + //NOTE: each of these distributions must add up to 1.0f + thoracicAngles[PITCH] = 0;//viewAngles[PITCH]*0.20f; + llAngles[PITCH] = 0;//viewAngles[PITCH]*0.40f; + ulAngles[PITCH] = 0;//viewAngles[PITCH]*0.40f; + + thoracicAngles[YAW] = viewAngles[YAW]*0.20f - (viewAngles[PITCH]*(viewAngles[YAW]*.020f)); + ulAngles[YAW] = viewAngles[YAW]*0.25f - (viewAngles[PITCH]*(viewAngles[YAW]*.0005f)); + llAngles[YAW] = viewAngles[YAW]*0.25f - (viewAngles[PITCH]*(viewAngles[YAW]*.0005f)); + + if (thoracicAngles[YAW] > 20) + { + thoracicAngles[YAW] = 20; + } + if (ulAngles[YAW] > 20) + { + ulAngles[YAW] = 20; + } + if (llAngles[YAW] > 20) + { + llAngles[YAW] = 20; + } + + thoracicAngles[ROLL] = viewAngles[ROLL]*0.20f; + ulAngles[ROLL] = viewAngles[ROLL]*0.35f; + llAngles[ROLL] = viewAngles[ROLL]*0.45f; + + for ( ang = 0; ang < 3; ang++ ) + { + if (ulAngles[ang] < 0) + { + ulAngles[ang] += 360; + } + } +} + +static void CG_G2AnimEntAngles( centity_t *cent, vec3_t legs[3], vec3_t legsAngles) +{ + vec3_t torsoAngles, headAngles; + float dest; + static int movementOffsets[8] = { 0, 22, 45, -22, 0, 22, -45, -22 }; + vec3_t velocity; + float speed; //, speed_dif, speed_desired; + int dir; + vec3_t velPos, velAng; + int adddir = 0; + float dif; + float degrees_negative = 0; + float degrees_positive = 0; + vec3_t ulAngles, llAngles, viewAngles, angles, thoracicAngles = {0,0,0}; + + VectorCopy( cent->lerpAngles, headAngles ); + headAngles[YAW] = AngleMod( headAngles[YAW] ); + VectorClear( legsAngles ); + VectorClear( torsoAngles ); + + // --------- yaw ------------- + + // allow yaw to drift a bit + if ((( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) != BOTH_STAND1) || + ( cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ) != WeaponReadyAnim[cent->currentState.weapon] ) + { + // if not standing still, always point all in the same direction + cent->pe.torso.yawing = qtrue; // always center + cent->pe.torso.pitching = qtrue; // always center + cent->pe.legs.yawing = qtrue; // always center + } + + dir = 0; + if (!cent->isATST) + { + torsoAngles[YAW] = headAngles[YAW] + 0.25 * movementOffsets[ dir ]; + } + else + { + torsoAngles[YAW] = headAngles[YAW]; + } + + //for now, turn torso instantly and let the legs swing to follow + cent->pe.torso.yawAngle = torsoAngles[YAW]; + + // --------- pitch ------------- + + VectorCopy( cent->currentState.pos.trDelta, velocity ); + speed = VectorNormalize( velocity ); + + if (!speed) + { + torsoAngles[YAW] = headAngles[YAW]; + } + + // only show a fraction of the pitch angle in the torso + if ( headAngles[PITCH] > 180 ) { + dest = (-360 + headAngles[PITCH]) * 0.75; + } else { + dest = headAngles[PITCH] * 0.75; + } + CG_SwingAngles( dest, 15, 30, 0.1, ¢->pe.torso.pitchAngle, ¢->pe.torso.pitching ); + torsoAngles[PITCH] = cent->pe.torso.pitchAngle; + + if ( speed ) { + vec3_t axis[3]; + float side; + + speed *= 0.05; + + AnglesToAxis( legsAngles, axis ); + side = speed * DotProduct( velocity, axis[1] ); + legsAngles[ROLL] -= side; + + side = speed * DotProduct( velocity, axis[0] ); + legsAngles[PITCH] += side; + } + + //rww - crazy velocity-based leg angle calculation + legsAngles[YAW] = headAngles[YAW]; + velPos[0] = cent->lerpOrigin[0] + velocity[0]; + velPos[1] = cent->lerpOrigin[1] + velocity[1]; + velPos[2] = cent->lerpOrigin[2];// + velocity[2]; + + if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) + { //off the ground, no direction-based leg angles + VectorCopy(cent->lerpOrigin, velPos); + } + + VectorSubtract(cent->lerpOrigin, velPos, velAng); + + if (!VectorCompare(velAng, vec3_origin)) + { + vectoangles(velAng, velAng); + + if (velAng[YAW] <= legsAngles[YAW]) + { + degrees_negative = (legsAngles[YAW] - velAng[YAW]); + degrees_positive = (360 - legsAngles[YAW]) + velAng[YAW]; + } + else + { + degrees_negative = legsAngles[YAW] + (360 - velAng[YAW]); + degrees_positive = (velAng[YAW] - legsAngles[YAW]); + } + + if (degrees_negative < degrees_positive) + { + dif = degrees_negative; + adddir = 0; + } + else + { + dif = degrees_positive; + adddir = 1; + } + + if (dif > 90) + { + dif = (180 - dif); + } + + if (cent->isATST) + { + if (dif > 360) + { + dif = 360; + } + } + else + { + if (dif > 60) + { + dif = 60; + } + } + + //Slight hack for when playing is running backward + if (dir == 3 || dir == 5) + { + dif = -dif; + } + + if (adddir) + { + legsAngles[YAW] -= dif; + } + else + { + legsAngles[YAW] += dif; + } + } + + cent->pe.legs.yawAngle = legsAngles[YAW]; + legsAngles[YAW] = cent->pe.legs.yawAngle; + + // pain twitch + CG_AddPainTwitch( cent, torsoAngles ); + + legsAngles[ROLL] = 0; + torsoAngles[ROLL] = 0; + + //VectorCopy(legsAngles, cent->turAngles); + //turAngles is used as a smoothing storage vector for g2animents. + + if (cent->isATST) + { + legsAngles[ROLL] = 0; + legsAngles[PITCH] = 0; + } + + // pull the angles back out of the hierarchial chain + AnglesSubtract( headAngles, torsoAngles, headAngles ); + AnglesSubtract( torsoAngles, legsAngles, torsoAngles ); + AnglesToAxis( legsAngles, legs ); + // we assume that model 0 is the player model. + + if (cent->isATST) + { + vec3_t flatYaw; + + flatYaw[YAW] = 0;//cent->lerpAngles[YAW]; + flatYaw[ROLL] = 0; + flatYaw[PITCH] = 0; + CG_G2SetBoneAngles(cent->ghoul2, 0, "pelvis", flatYaw, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", torsoAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + return; + } + + VectorCopy( cent->lerpAngles, viewAngles ); + viewAngles[YAW] = viewAngles[ROLL] = 0; + viewAngles[PITCH] *= 0.5; + + VectorCopy( cent->lerpAngles, angles ); + angles[PITCH] = 0; + + CG_G2AnimEntSpineAngles(cent, viewAngles, angles, thoracicAngles, ulAngles, llAngles); + + ulAngles[YAW] += torsoAngles[YAW]*0.3; + llAngles[YAW] += torsoAngles[YAW]*0.3; + thoracicAngles[YAW] += torsoAngles[YAW]*0.4; + + ulAngles[PITCH] = torsoAngles[PITCH]*0.3; + llAngles[PITCH] = torsoAngles[PITCH]*0.3; + thoracicAngles[PITCH] = torsoAngles[PITCH]*0.4; + + ulAngles[ROLL] += torsoAngles[ROLL]*0.3; + llAngles[ROLL] += torsoAngles[ROLL]*0.3; + thoracicAngles[ROLL] += torsoAngles[ROLL]*0.4; + + CG_G2SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", ulAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", llAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", thoracicAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +} + +#define SMOOTH_G2ANIM_LERPORIGIN + +void CG_DrawNoForceSphere(centity_t *cent, vec3_t origin, float scale, int shader) +{ + refEntity_t ent; + + // Don't draw the shield when the player is dead. + if (cent->currentState.eFlags & EF_DEAD) + { + return; + } + + memset( &ent, 0, sizeof( ent ) ); + + VectorCopy( origin, ent.origin ); + ent.origin[2] += 9.0; + + VectorSubtract(cg.refdef.vieworg, ent.origin, ent.axis[0]); + if (VectorNormalize(ent.axis[0]) <= 0.1f) + { // Entity is right on vieworg. quit. + return; + } + + VectorCopy(cg.refdef.viewaxis[2], ent.axis[2]); + CrossProduct(ent.axis[0], ent.axis[2], ent.axis[1]); + + VectorScale(ent.axis[0], scale, ent.axis[0]); + VectorScale(ent.axis[1], scale, ent.axis[1]); + VectorScale(ent.axis[2], -scale, ent.axis[2]); + + ent.shaderRGBA[3] = (cent->currentState.genericenemyindex - cg.time)/8; + ent.renderfx |= RF_RGB_TINT; + if (ent.shaderRGBA[3] > 200) + { + ent.shaderRGBA[3] = 200; + } + if (ent.shaderRGBA[3] < 1) + { + ent.shaderRGBA[3] = 1; + } + + ent.shaderRGBA[2] = 0; + ent.shaderRGBA[0] = ent.shaderRGBA[1] = ent.shaderRGBA[3]; + + ent.hModel = cgs.media.halfShieldModel; + ent.customShader = shader; + + trap_R_AddRefEntityToScene( &ent ); +} + +void CG_G2Animated( centity_t *cent ) +{ + refEntity_t legs; + refEntity_t torso; + int renderfx = 0; + qboolean shadow = qfalse; + float shadowPlane = 0; + qboolean dead = qfalse; + vec3_t rootAngles; +#ifdef SMOOTH_G2ANIM_LERPORIGIN + vec3_t posDif; + float smoothFactor = 0.4f; + int k = 0; +#endif + + cent->ghoul2 = cg_entities[cent->currentState.number].ghoul2; + + if (!cent->ghoul2) + { //Initialize this g2 anim ent, then return (will start rendering next frame) + const char *modelName = CG_ConfigString( CS_MODELS+cent->currentState.modelindex ); + + if (modelName && modelName[0]) + { + trap_G2API_InitGhoul2Model(¢->ghoul2, modelName, 0, 0, 0, 0, 0); + if (cent->ghoul2) + { + trap_G2API_AddBolt(cent->ghoul2, 0, "*r_hand"); + trap_G2API_AddBolt(cent->ghoul2, 0, "*l_hand"); + trap_G2API_AddBolt(cent->ghoul2, 0, "*head_top"); + trap_G2API_AddBolt(cent->ghoul2, 0, "Motion"); + } + } + return; + } + + if (cent->currentState.weapon && + !trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1) && + !(cent->currentState.eFlags & EF_DEAD)) + { //if the server says we have a weapon and we haven't copied one onto ourselves yet, then do so. + trap_G2API_CopySpecificGhoul2Model(g2WeaponInstances[cent->currentState.weapon], 0, cent->ghoul2, 1); + } + + if (cent->torsoBolt && !(cent->currentState.eFlags & EF_DEAD)) + { //he's alive and has a limb missing still, reattach it and reset the weapon + CG_ReattachLimb(cent); + } + +#ifdef SMOOTH_G2ANIM_LERPORIGIN + if (DistanceSquared(cent->turAngles,cent->lerpOrigin)>12000.0f) + { + VectorCopy(cent->lerpOrigin, cent->turAngles); + } + + VectorSubtract(cent->lerpOrigin, cent->turAngles, posDif); + + for (k=0;k<3;k++) + { + cent->turAngles[k]=(cent->turAngles[k]+posDif[k]*smoothFactor); + cent->lerpOrigin[k]=cent->turAngles[k]; + } +#endif + + if (cent->currentState.weapon) + { + weaponInfo_t *weapon = NULL; + + CG_RegisterWeapon(cent->currentState.weapon); + + weapon = &cg_weapons[cent->currentState.weapon]; + if (weapon) + { + if ( cg.time - cent->muzzleFlashTime <= MUZZLE_FLASH_TIME + 10 ) + { // Handle muzzle flashes + vec3_t flashorigin, flashdir; + mdxaBone_t boltMatrix; + + if (trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { + vec3_t boltAngle; + VectorClear(boltAngle); + boltAngle[YAW] = cent->lerpAngles[YAW]; + trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, boltAngle, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); + + if ( cent->currentState.eFlags & EF_ALT_FIRING ) + { // Check the alt firing first. + if (weapon->altMuzzleEffect) + { + trap_FX_PlayEffectID(weapon->altMuzzleEffect, flashorigin, flashdir); + } + } + else + { // Regular firing + if (weapon->muzzleEffect) + { + trap_FX_PlayEffectID(weapon->muzzleEffect, flashorigin, flashdir); + } + } + } + } + } + } + + memset (&legs, 0, sizeof(legs)); + + CG_SetGhoul2Info(&legs, cent); + + VectorSet(legs.modelScale, 1,1,1); + legs.radius = cent->currentState.g2radius; + VectorClear(legs.angles); + + // add the shadow + shadow = CG_PlayerShadow( cent, &shadowPlane ); + + if ( cg_shadows.integer == 3 && shadow ) { + renderfx |= RF_SHADOW_PLANE; + } + renderfx |= RF_LIGHTING_ORIGIN; // use the same origin for all + + VectorCopy( cent->lerpOrigin, legs.origin ); + VectorCopy( cent->lerpOrigin, legs.lightingOrigin ); + legs.shadowPlane = shadowPlane; + legs.renderfx = renderfx; + VectorCopy (legs.origin, legs.oldorigin); // don't positionally lerp at all + + CG_G2AnimEntAngles( cent, legs.axis, rootAngles ); + + if (cent->currentState.eFlags & EF_DEAD) + { + dead = qtrue; + //rww - since our angles are fixed when we're dead this shouldn't be an issue anyway + //we need to render the dying/dead player because we are now spawning the body on respawn instead of death + //return; + } + + ScaleModelAxis(&legs); + + memset( &torso, 0, sizeof(torso) ); + + VectorCopy(cent->turAngles, cg_entities[cent->currentState.number].turAngles); + VectorCopy(legs.origin, cg_entities[cent->currentState.number].lerpOrigin); + + // get the animation state (after rotation, to allow feet shuffle) + CG_G2EntAnimation( cent, &legs.oldframe, &legs.frame, &legs.backlerp, + &torso.oldframe, &torso.frame, &torso.backlerp ); + + trap_R_AddRefEntityToScene(&legs); + + + // Electricity + //------------------------------------------------ + if ( cent->currentState.emplacedOwner > cg.time ) + { + int dif = cent->currentState.emplacedOwner - cg.time; + + if ( dif > 0 && random() > 0.4f ) + { + // fade out over the last 500 ms + int brightness = 255; + + if ( dif < 500 ) + { + brightness = floor((dif - 500.0f) / 500.0f * 255.0f ); + } + + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.renderfx &= ~RF_MINLIGHT; + + legs.renderfx |= RF_RGB_TINT; + legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = brightness; + legs.shaderRGBA[3] = 255; + + if ( rand() & 1 ) + { + legs.customShader = cgs.media.electricBodyShader; + } + else + { + legs.customShader = cgs.media.electricBody2Shader; + } + + trap_R_AddRefEntityToScene( &legs ); + + if ( random() > 0.9f ) + trap_S_StartSound ( NULL, cent->currentState.number, CHAN_AUTO, cgs.media.crackleSound ); + } + } + + if (cent->currentState.genericenemyindex > cg.time) + { + CG_DrawNoForceSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysalimariShader ); + } +} +//rww - here ends the majority of my g2animent stuff. + +int cgFPLSState = 0; + +void CG_ForceFPLSPlayerModel(centity_t *cent, clientInfo_t *ci) +{ + int clientNum = cent->currentState.number; + animation_t *anim; + + if (cg_fpls.integer && !cg.renderingThirdPerson) + { + int skinHandle; + + skinHandle = trap_R_RegisterSkin("models/players/kyle/model_fpls2.skin"); + + trap_G2API_CleanGhoul2Models(&(ci->ghoul2Model)); + + ci->torsoSkin = skinHandle; + trap_G2API_InitGhoul2Model(&ci->ghoul2Model, "models/players/kyle/model.glm", 0, ci->torsoSkin, 0, 0, 0); + + ci->bolt_rhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*r_hand"); + + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", 0, 12, BONE_ANIM_OVERRIDE_LOOP, 1.0f, cg.time, -1, -1); + trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "upper_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, cg.time); + trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "cranium", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, NULL, 0, cg.time); + + ci->bolt_lhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*l_hand"); + ci->bolt_head = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*head_top"); + + ci->bolt_motion = trap_G2API_AddBolt(ci->ghoul2Model, 0, "Motion"); + + //We need a lower lumbar bolt for footsteps + ci->bolt_llumbar = trap_G2API_AddBolt(ci->ghoul2Model, 0, "lower_lumbar"); + } + else + { + CG_RegisterClientModelname(ci, ci->modelName, ci->skinName, ci->teamName, cent->currentState.number); + } + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.legsAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame; + int setFrame = -1; + float animSpeed = 50.0f / anim->frameLerp; + + if (anim->loopFrames != -1) + { + flags |= BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->pe.legs.frame >= anim->firstFrame && cent->pe.legs.frame <= (anim->firstFrame + anim->numFrames)) + { + setFrame = cent->pe.legs.frame; + } + + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); + + cg_entities[clientNum].currentState.legsAnim = 0; + } + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.torsoAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame; + int setFrame = -1; + float animSpeed = 50.0f / anim->frameLerp; + + if (anim->loopFrames != -1) + { + flags |= BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->pe.torso.frame >= anim->firstFrame && cent->pe.torso.frame <= (anim->firstFrame + anim->numFrames)) + { + setFrame = cent->pe.torso.frame; + } + + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "lower_lumbar", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); + + cg_entities[clientNum].currentState.torsoAnim = 0; + } + + trap_G2API_CleanGhoul2Models(&(cent->ghoul2)); + trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, ¢->ghoul2); + cg_entities[clientNum].ghoul2 = cent->ghoul2; +} + +/* +=============== +CG_Player +=============== +*/ +void CG_Player( centity_t *cent ) { + clientInfo_t *ci; + refEntity_t legs; + refEntity_t torso; + int clientNum; + int renderfx; + qboolean shadow = qfalse; + float shadowPlane = 0; + qboolean dead = qfalse; + vec3_t rootAngles; + refEntity_t seeker; + float angle; + vec3_t angles, dir, elevated, enang, seekorg; + int iwantout = 0, successchange = 0; + int team; + float prefig = 0; + centity_t *enent; + mdxaBone_t boltMatrix, lHandMatrix; + vec3_t efOrg; + vec3_t tDir; + int distVelBase; + int doAlpha = 0; + int effectTimeLayer = 0; + qboolean gotLHandMatrix = qfalse; + qboolean g2HasWeapon = qfalse; + + if (cgQueueLoad) + { + CG_ActualLoadDeferredPlayers(); + cgQueueLoad = qfalse; + } + + // the client number is stored in clientNum. It can't be derived + // from the entity number, because a single client may have + // multiple corpses on the level using the same clientinfo + clientNum = cent->currentState.clientNum; + if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { + CG_Error( "Bad clientNum on player entity"); + } + ci = &cgs.clientinfo[ clientNum ]; + + // it is possible to see corpses from disconnected players that may + // not have valid clientinfo + if ( !ci->infoValid ) { + return; + } + + cent->ghoul2 = cg_entities[cent->currentState.number].ghoul2; + + if (!cent->ghoul2) + { //not ready yet? +#ifdef _DEBUG + Com_Printf("WARNING: Client %i has a null ghoul2 instance\n", cent->currentState.number); +#endif + if (cgs.clientinfo[cent->currentState.number].ghoul2Model && + trap_G2_HaveWeGhoul2Models(cgs.clientinfo[cent->currentState.number].ghoul2Model)) + { +#ifdef _DEBUG + Com_Printf("Clientinfo instance was valid, duplicating for cent\n"); +#endif + trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[cent->currentState.number].ghoul2Model, ¢->ghoul2); + cg_entities[cent->currentState.number].ghoul2 = cent->ghoul2; + } + return; + } + + g2HasWeapon = trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1); + + if (!g2HasWeapon) + { //force a redup of the weapon instance onto the client instance + cent->ghoul2weapon = NULL; + } + + if (cent->torsoBolt && !(cent->currentState.eFlags & EF_DEAD)) + { //he's alive and has a limb missing still, reattach it and reset the weapon + CG_ReattachLimb(cent); + } + else if (cg_entities[cent->currentState.number].torsoBolt && !(cent->currentState.eFlags & EF_DEAD)) + { //It happens. (usually between odd level change events) + cent->torsoBolt = cg_entities[cent->currentState.number].torsoBolt; + cg_entities[cent->currentState.number].torsoBolt = 0; + CG_ReattachLimb(cent); + } + + if (cent->ghoul2 && cent->torsoBolt && (cent->torsoBolt == G2_MODELPART_RARM || cent->torsoBolt == G2_MODELPART_RHAND || cent->torsoBolt == G2_MODELPART_WAIST) && g2HasWeapon) + { //kill the weapon if the limb holding it is no longer on the model + trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); + g2HasWeapon = qfalse; + } + + if (cent->currentState.teamowner && !cent->isATST) + { + cg_entities[cent->currentState.number].currentState.teamowner = cent->currentState.teamowner; + cg_entities[cent->currentState.number].isATST = cent->isATST; + + if (CG_RegisterClientModelname(&cgs.clientinfo[cent->currentState.number], cgs.clientinfo[cent->currentState.number].modelName, cgs.clientinfo[cent->currentState.number].skinName, + cgs.clientinfo[cent->currentState.number].teamName, cent->currentState.number)) + { + cent->isATST = 1; + cg_entities[cent->currentState.number].isATST = cent->isATST; + return; + } + } + else if (!cent->currentState.teamowner && cent->isATST) + { + cg_entities[cent->currentState.number].currentState.teamowner = cent->currentState.teamowner; + cg_entities[cent->currentState.number].isATST = cent->isATST; + + if (CG_RegisterClientModelname(&cgs.clientinfo[cent->currentState.number], cgs.clientinfo[cent->currentState.number].modelName, cgs.clientinfo[cent->currentState.number].skinName, + cgs.clientinfo[cent->currentState.number].teamName, cent->currentState.number)) + { + cent->isATST = 0; + cg_entities[cent->currentState.number].isATST = cent->isATST; + return; + } + } + + if (cent->currentState.number < MAX_CLIENTS && + cent->currentState.teamowner && + !cent->isATST) + { + return; + } + + if (!cent->trickAlphaTime || (cg.time - cent->trickAlphaTime) > 1000) + { //things got out of sync, perhaps a new client is trying to fill in this slot + cent->trickAlpha = 255; + cent->trickAlphaTime = cg.time; + } + + //If this client has tricked you. + if (CG_IsMindTricked(cent->currentState.trickedentindex, + cent->currentState.trickedentindex2, + cent->currentState.trickedentindex3, + cent->currentState.trickedentindex4, + cg.snap->ps.clientNum)) + { + if (cent->trickAlpha > 1) + { + cent->trickAlpha -= (cg.time - cent->trickAlphaTime)*0.5; + cent->trickAlphaTime = cg.time; + + if (cent->trickAlpha < 0) + { + cent->trickAlpha = 0; + } + + doAlpha = 1; + } + else + { + doAlpha = 1; + cent->trickAlpha = 1; + cent->trickAlphaTime = cg.time; + iwantout = 1; + } + } + else + { + if (cent->trickAlpha < 255) + { + cent->trickAlpha += (cg.time - cent->trickAlphaTime); + cent->trickAlphaTime = cg.time; + + if (cent->trickAlpha > 255) + { + cent->trickAlpha = 255; + } + + doAlpha = 1; + } + else + { + cent->trickAlpha = 255; + cent->trickAlphaTime = cg.time; + } + } + + // get the player model information + renderfx = 0; + if ( cent->currentState.number == cg.snap->ps.clientNum) { + if (!cg.renderingThirdPerson) { + if (!cg_fpls.integer || cent->currentState.weapon != WP_SABER) + { + renderfx = RF_THIRD_PERSON; // only draw in mirrors + } + } else { + if (cg_cameraMode.integer) { + iwantout = 1; + + + // goto minimal_add; + + // NOTENOTE Temporary + return; + } + } + } + + // Update the player's client entity information regarding weapons. + // Explanation: The entitystate has a weapond defined on it. The cliententity does as well. + // The cliententity's weapon tells us what the ghoul2 instance on the cliententity has bolted to it. + // If the entitystate and cliententity weapons differ, then the state's needs to be copied to the client. + // Save the old weapon, to verify that it is or is not the same as the new weapon. + // rww - Make sure weapons don't get set BEFORE cent->ghoul2 is initialized or else we'll have no + // weapon bolted on + if (cent->currentState.saberInFlight) + { + cent->ghoul2weapon = g2WeaponInstances[WP_SABER]; + } + + if (cent->ghoul2 && + cent->ghoul2weapon != g2WeaponInstances[cent->currentState.weapon] && + !(cent->currentState.eFlags & EF_DEAD) && !cent->torsoBolt && !cent->isATST) + { + CG_CopyG2WeaponInstance(cent->currentState.weapon, cent->ghoul2); + + if (!(cg.snap->ps.pm_flags & PMF_FOLLOW)) + { + if (cent->weapon == WP_SABER && cent->weapon != cent->currentState.weapon && !cent->currentState.shouldtarget) + { //switching away from the saber + trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberoffquick.wav" )); + } + else if (cent->currentState.weapon == WP_SABER && cent->weapon != cent->currentState.weapon) + { //switching to the saber + trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" )); + } + } + + cent->weapon = cent->currentState.weapon; + cent->ghoul2weapon = g2WeaponInstances[cent->currentState.weapon]; + } + else if ((cent->currentState.eFlags & EF_DEAD) || cent->torsoBolt) + { + cent->ghoul2weapon = NULL; //be sure to update after respawning/getting limb regrown + } + + + memset (&legs, 0, sizeof(legs)); + + CG_SetGhoul2Info(&legs, cent); + + VectorSet(legs.modelScale, 1,1,1); + legs.radius = 64; + VectorClear(legs.angles); + + if (cent->isATST) + { + legs.radius = 400; + } + +// minimal_add: + + team = cgs.clientinfo[ cent->currentState.clientNum ].team; + + if (cgs.gametype >= GT_TEAM && cg_drawFriend.integer && + cent->currentState.number != cg.snap->ps.clientNum) // Don't show a sprite above a player's own head in 3rd person. + { // If the view is either a spectator or on the same team as this character, show a symbol above their head. + if ((cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || cg.snap->ps.persistant[PERS_TEAM] == team) && + !(cent->currentState.eFlags & EF_DEAD)) + { + if (team == TEAM_RED) + { + CG_PlayerFloatSprite( cent, cgs.media.teamRedShader); + } + else // if (team == TEAM_BLUE) + { + CG_PlayerFloatSprite( cent, cgs.media.teamBlueShader); + } + } + } + + if (cgs.gametype == GT_JEDIMASTER && cg_drawFriend.integer && + cent->currentState.number != cg.snap->ps.clientNum) // Don't show a sprite above a player's own head in 3rd person. + { // If the view is either a spectator or on the same team as this character, show a symbol above their head. + if ((cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || cg.snap->ps.persistant[PERS_TEAM] == team) && + !(cent->currentState.eFlags & EF_DEAD)) + { + if (CG_ThereIsAMaster()) + { + if (!cg.snap->ps.isJediMaster) + { + if (!cent->currentState.isJediMaster) + { + CG_PlayerFloatSprite( cent, cgs.media.teamRedShader); + } + } + } + } + } + + if (cent->isATST) + { + goto doEssentialOne; + } + + // add the shadow + shadow = CG_PlayerShadow( cent, &shadowPlane ); + + if ( (cent->currentState.eFlags & EF_SEEKERDRONE) || cent->currentState.genericenemyindex != -1 ) + { + memset( &seeker, 0, sizeof(seeker) ); + + VectorCopy(cent->lerpOrigin, elevated); + elevated[2] += 40; + + VectorCopy( elevated, seeker.lightingOrigin ); + seeker.shadowPlane = shadowPlane; + seeker.renderfx = 0; //renderfx; + //don't show in first person? + + angle = ((cg.time / 12) & 255) * (M_PI * 2) / 255; + dir[0] = cos(angle) * 20; + dir[1] = sin(angle) * 20; + dir[2] = cos(angle) * 5; + VectorAdd(elevated, dir, seeker.origin); + + VectorCopy(seeker.origin, seekorg); + + if (cent->currentState.genericenemyindex > 1024) + { + prefig = (cent->currentState.genericenemyindex-cg.time)/80; + + if (prefig > 55) + { + prefig = 55; + } + else if (prefig < 1) + { + prefig = 1; + } + + elevated[2] -= 55-prefig; + + angle = ((cg.time / 12) & 255) * (M_PI * 2) / 255; + dir[0] = cos(angle) * 20; + dir[1] = sin(angle) * 20; + dir[2] = cos(angle) * 5; + VectorAdd(elevated, dir, seeker.origin); + } + else if (cent->currentState.genericenemyindex != ENTITYNUM_NONE && cent->currentState.genericenemyindex != -1) + { + enent = &cg_entities[cent->currentState.genericenemyindex]; + + if (enent) + { + VectorSubtract(enent->lerpOrigin, seekorg, enang); + VectorNormalize(enang); + vectoangles(enang, angles); + successchange = 1; + } + } + + if (!successchange) + { + angles[0] = sin(angle) * 30; + angles[1] = (angle * 180 / M_PI) + 90; + if (angles[1] > 360) + angles[1] -= 360; + angles[2] = 0; + } + + AnglesToAxis( angles, seeker.axis ); + + seeker.hModel = trap_R_RegisterModel("models/items/remote.md3"); + trap_R_AddRefEntityToScene( &seeker ); + } + +doEssentialOne: + // add a water splash if partially in and out of water + CG_PlayerSplash( cent ); + + if ( cg_shadows.integer == 3 && shadow ) { + renderfx |= RF_SHADOW_PLANE; + } + renderfx |= RF_LIGHTING_ORIGIN; // use the same origin for all + + // if we've been hit, display proper fullscreen fx + CG_PlayerHitFX(cent); + + VectorCopy( cent->lerpOrigin, legs.origin ); + + VectorCopy( cent->lerpOrigin, legs.lightingOrigin ); + legs.shadowPlane = shadowPlane; + legs.renderfx = renderfx; + VectorCopy (legs.origin, legs.oldorigin); // don't positionally lerp at all + + CG_G2PlayerAngles( cent, legs.axis, rootAngles ); + + //This call is mainly just to reconstruct the skeleton. But we'll get the left hand matrix while we're at it. + //If we don't reconstruct the skeleton after setting the bone angles, we will get bad bolt points on the model + //(e.g. the weapon model bolt will look "lagged") if there's no other GetBoltMatrix call for the rest of the + //frame. Yes, this is stupid and needs to be fixed properly. + //The current solution is to force it not to reconstruct the skeleton for the first GBM call in G2PlayerAngles. + //It works and we end up only reconstructing it once, but it doesn't seem like the best solution. + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + gotLHandMatrix = qtrue; + + if (cg.renderingThirdPerson) + { + if (cgFPLSState != 0) + { + CG_ForceFPLSPlayerModel(cent, ci); + cgFPLSState = 0; + return; + } + } + else if (ci->team == TEAM_SPECTATOR || (cg.snap && (cg.snap->ps.pm_flags & PMF_FOLLOW))) + { //don't allow this when spectating + if (cgFPLSState != 0) + { + trap_Cvar_Set("cg_fpls", "0"); + cg_fpls.integer = 0; + + CG_ForceFPLSPlayerModel(cent, ci); + cgFPLSState = 0; + return; + } + + if (cg_fpls.integer) + { + trap_Cvar_Set("cg_fpls", "0"); + } + } + else + { + if (cg_fpls.integer && cent->currentState.weapon == WP_SABER && cg.snap && cent->currentState.number == cg.snap->ps.clientNum) + { + + if (cgFPLSState != cg_fpls.integer) + { + CG_ForceFPLSPlayerModel(cent, ci); + cgFPLSState = cg_fpls.integer; + return; + } + + /* + mdxaBone_t headMatrix; + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_head, &headMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + trap_G2API_GiveMeVectorFromMatrix(&headMatrix, ORIGIN, cg.refdef.vieworg); + */ + } + else if (!cg_fpls.integer && cgFPLSState) + { + if (cgFPLSState != cg_fpls.integer) + { + CG_ForceFPLSPlayerModel(cent, ci); + cgFPLSState = cg_fpls.integer; + return; + } + } + } + + if (cent->currentState.eFlags & EF_DEAD) + { + dead = qtrue; + //rww - since our angles are fixed when we're dead this shouldn't be an issue anyway + //we need to render the dying/dead player because we are now spawning the body on respawn instead of death + //return; + } + + ScaleModelAxis(&legs); + + memset( &torso, 0, sizeof(torso) ); + + if (cent->isATST) + { + goto doEssentialTwo; + } + + //rww - force speed "trail" effect + if (!(cent->currentState.powerups & (1 << PW_SPEED)) || doAlpha || !cg_speedTrail.integer) + { + cent->frame_minus1_refreshed = 0; + cent->frame_minus2_refreshed = 0; + } + + if (cent->frame_minus1.ghoul2 != cent->ghoul2) + { + cent->frame_minus1_refreshed = 0; + } + if (cent->frame_minus2.ghoul2 != cent->ghoul2) + { + cent->frame_minus2_refreshed = 0; + } + + VectorCopy(cent->currentState.pos.trDelta, tDir); + + distVelBase = SPEED_TRAIL_DISTANCE*(VectorNormalize(tDir)*0.004); + + if (cent->frame_minus1.ghoul2 && cent->frame_minus1_refreshed) + { + cent->frame_minus1.renderfx |= RF_FORCE_ENT_ALPHA; + cent->frame_minus1.shaderRGBA[3] = 100; + + //rww - if the client gets a bad framerate we will only receive frame positions + //once per frame anyway, so we might end up with speed trails very spread out. + //in order to avoid that, we'll get the direction of the last trail from the player + //and place the trail refent a set distance from the player location this frame + VectorSubtract(cent->frame_minus1.origin, legs.origin, tDir); + VectorNormalize(tDir); + + cent->frame_minus1.origin[0] = legs.origin[0]+tDir[0]*distVelBase; + cent->frame_minus1.origin[1] = legs.origin[1]+tDir[1]*distVelBase; + cent->frame_minus1.origin[2] = legs.origin[2]+tDir[2]*distVelBase; + + trap_R_AddRefEntityToScene(¢->frame_minus1); + } + + if (cent->frame_minus2.ghoul2 && cent->frame_minus2_refreshed) + { + cent->frame_minus2.renderfx |= RF_FORCE_ENT_ALPHA; + cent->frame_minus2.shaderRGBA[3] = 50; + + //Same as above but do it between trail points instead of the player and first trail entry + VectorSubtract(cent->frame_minus2.origin, cent->frame_minus1.origin, tDir); + VectorNormalize(tDir); + + cent->frame_minus2.origin[0] = cent->frame_minus1.origin[0]+tDir[0]*distVelBase; + cent->frame_minus2.origin[1] = cent->frame_minus1.origin[1]+tDir[1]*distVelBase; + cent->frame_minus2.origin[2] = cent->frame_minus1.origin[2]+tDir[2]*distVelBase; + + trap_R_AddRefEntityToScene(¢->frame_minus2); + } + +doEssentialTwo: + VectorCopy(cent->turAngles, cg_entities[cent->currentState.number].turAngles); + VectorCopy(legs.origin, cg_entities[cent->currentState.number].lerpOrigin); + + // get the animation state (after rotation, to allow feet shuffle) + CG_PlayerAnimation( cent, &legs.oldframe, &legs.frame, &legs.backlerp, + &torso.oldframe, &torso.frame, &torso.backlerp ); + + //Need these set because we use them in other functions (cent pointer differs from cg_entities values) + cg_entities[cent->currentState.number].pe.torso.frame = cent->pe.torso.frame; + cg_entities[cent->currentState.number].pe.legs.frame = cent->pe.legs.frame; + + // add the talk baloon or disconnect icon + CG_PlayerSprites( cent ); + + if (cent->currentState.eFlags & EF_DEAD) + { //keep track of death anim frame for when we copy off the bodyqueue + cgs.clientinfo[cent->currentState.number].frame = cent->pe.torso.frame; + } + + if (cent->isATST) + { + goto doEssentialThree; + } + + //rww - render effects multiple times to compensate for low framerate? This won't do much because + //the effect still gets rendered in this frame and expires, possibly before the next frame. So + //it is disabled for now (setting effectTimeLayer to 0 after one play) + if (cent->trailTime < cg.time) + { + cent->trailTime = cg.time; + } + + //compensate for up to 300ms + effectTimeLayer = (300 - (cent->trailTime - cg.time)); + + if (effectTimeLayer < 50) + { //play at least once + effectTimeLayer = 50; + } + + cent->trailTime = cg.time + 300; + + if (cent->currentState.activeForcePass > FORCE_LEVEL_3) + { + int effectTimeLayerL = effectTimeLayer; + + vec3_t axis[3]; + vec3_t tAng, fAng, fxDir; + int realForceLev = (cent->currentState.activeForcePass - FORCE_LEVEL_3); + + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + VectorSet( fAng, cent->pe.torso.pitchAngle, cent->pe.torso.yawAngle, 0 ); + + AngleVectors( fAng, fxDir, NULL, NULL ); + + //trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + if (!gotLHandMatrix) + { + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + gotLHandMatrix = qtrue; + } + + efOrg[0] = lHandMatrix.matrix[0][3]; + efOrg[1] = lHandMatrix.matrix[1][3]; + efOrg[2] = lHandMatrix.matrix[2][3]; + + AnglesToAxis( fAng, axis ); + + while (effectTimeLayerL > 0) + { + if ( realForceLev > FORCE_LEVEL_2 ) + {//arc + //trap_FX_PlayEffectID( cgs.effects.forceLightningWide, efOrg, fxDir ); + trap_FX_PlayEntityEffectID(cgs.effects.forceDrainWide, efOrg, axis, cent->boltInfo, cent->currentState.number); + } + else + {//line + //trap_FX_PlayEffectID( cgs.effects.forceLightning, efOrg, fxDir ); + trap_FX_PlayEntityEffectID(cgs.effects.forceDrain, efOrg, axis, cent->boltInfo, cent->currentState.number); + } + + effectTimeLayerL = 0;//-= 50; + } + + /* + if (cent->bolt4 < cg.time) + { + cent->bolt4 = cg.time + 100; + trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/force/drain.wav") ); + } + */ + } + else if ( cent->currentState.activeForcePass ) + {//doing the electrocuting + int effectTimeLayerL = effectTimeLayer; + + vec3_t axis[3]; + vec3_t tAng, fAng, fxDir; + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + VectorSet( fAng, cent->pe.torso.pitchAngle, cent->pe.torso.yawAngle, 0 ); + + AngleVectors( fAng, fxDir, NULL, NULL ); + + //trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + if (!gotLHandMatrix) + { + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + gotLHandMatrix = qtrue; + } + + efOrg[0] = lHandMatrix.matrix[0][3]; + efOrg[1] = lHandMatrix.matrix[1][3]; + efOrg[2] = lHandMatrix.matrix[2][3]; + + AnglesToAxis( fAng, axis ); + + while (effectTimeLayerL > 0) + { + if ( cent->currentState.activeForcePass > FORCE_LEVEL_2 ) + {//arc + //trap_FX_PlayEffectID( cgs.effects.forceLightningWide, efOrg, fxDir ); + trap_FX_PlayEntityEffectID(cgs.effects.forceLightningWide, efOrg, axis, cent->boltInfo, cent->currentState.number); + } + else + {//line + //trap_FX_PlayEffectID( cgs.effects.forceLightning, efOrg, fxDir ); + trap_FX_PlayEntityEffectID(cgs.effects.forceLightning, efOrg, axis, cent->boltInfo, cent->currentState.number); + } + + effectTimeLayerL = 0;//-= 50; + } + + /* + if (cent->bolt4 < cg.time) + { + cent->bolt4 = cg.time + 100; + trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/force/lightning.wav") ); + } + */ + } + + if ( cent->currentState.powerups & (1 << PW_DISINT_4) ) + { + vec3_t tAng; + //VectorSet( tAng, 0, cent->pe.torso.yawAngle, 0 ); + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + //trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + if (!gotLHandMatrix) + { + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + gotLHandMatrix = qtrue; + } + + efOrg[0] = lHandMatrix.matrix[0][3]; + efOrg[1] = lHandMatrix.matrix[1][3]; + efOrg[2] = lHandMatrix.matrix[2][3]; + + if ( (cent->currentState.forcePowersActive & (1 << FP_GRIP)) && + (cg.renderingThirdPerson || cent->currentState.number != cg.snap->ps.clientNum) ) + { + vec3_t boltDir; + vec3_t origBolt; + VectorCopy(efOrg, origBolt); + trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_Y, boltDir ); + + CG_ForceGripEffect( efOrg ); + CG_ForceGripEffect( efOrg ); + + //Render a scaled version of the model's hand with a n337 looking shader + { + const char *rotateBone; + char *limbName; + char *limbCapName; + vec3_t armAng; + float wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; + + rotateBone = "lradius"; + limbName = "l_arm"; + limbCapName = "l_arm_cap_torso_off"; + + if (cent->grip_arm.ghoul2 && trap_G2_HaveWeGhoul2Models(cent->grip_arm.ghoul2)) + { + trap_G2API_CleanGhoul2Models(&(cent->grip_arm.ghoul2)); + } + + memset( ¢->grip_arm, 0, sizeof(cent->grip_arm) ); + + VectorCopy(origBolt, efOrg); + trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_Y, boltDir ); + efOrg[0] += boltDir[0]*8; + efOrg[1] += boltDir[1]*8; + efOrg[2] += boltDir[2]*8; + trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_X, boltDir ); + efOrg[0] -= boltDir[0]*4; + efOrg[1] -= boltDir[1]*4; + efOrg[2] -= boltDir[2]*4; + + //efOrg[2] += 8; + efOrg[2] -= 4; + + VectorCopy(efOrg, cent->grip_arm.origin); + VectorCopy(cent->grip_arm.origin, cent->grip_arm.lightingOrigin); + + //VectorCopy(cent->lerpAngles, armAng); + VectorAdd(vec3_origin, rootAngles, armAng); + //armAng[ROLL] = -90; + armAng[ROLL] = 0; + armAng[PITCH] = 0; + AnglesToAxis(armAng, cent->grip_arm.axis); + + trap_G2API_DuplicateGhoul2Instance(cent->ghoul2, ¢->grip_arm.ghoul2); + + trap_G2API_SetRootSurface(cent->grip_arm.ghoul2, 0, limbName); + trap_G2API_SetNewOrigin(cent->grip_arm.ghoul2, trap_G2API_AddBolt(cent->grip_arm.ghoul2, 0, rotateBone)); + trap_G2API_SetSurfaceOnOff(cent->grip_arm.ghoul2, limbCapName, 0); + + cent->grip_arm.modelScale[0] = 1;//+(wv*6); + cent->grip_arm.modelScale[1] = 1;//+(wv*6); + cent->grip_arm.modelScale[2] = 1;//+(wv*6); + ScaleModelAxis(¢->grip_arm); + + cent->grip_arm.radius = 64; + + cent->grip_arm.customShader = trap_R_RegisterShader( "gfx/misc/red_portashield" ); + + cent->grip_arm.renderfx |= RF_RGB_TINT; + cent->grip_arm.shaderRGBA[0] = 255 - (wv*900); + if (cent->grip_arm.shaderRGBA[0] < 30) + { + cent->grip_arm.shaderRGBA[0] = 30; + } + if (cent->grip_arm.shaderRGBA[0] > 255) + { + cent->grip_arm.shaderRGBA[0] = 255; + } + cent->grip_arm.shaderRGBA[1] = cent->grip_arm.shaderRGBA[2] = cent->grip_arm.shaderRGBA[0]; + + trap_R_AddRefEntityToScene( ¢->grip_arm ); + } + } + else if (!(cent->currentState.forcePowersActive & (1 << FP_GRIP))) + { + CG_ForcePushBlur( efOrg ); + } + } + + if (cent->currentState.weapon == WP_STUN_BATON && cent->currentState.number == cg.snap->ps.clientNum) + { + trap_S_AddLoopingSound( cent->currentState.number, cg.refdef.vieworg, vec3_origin, + trap_S_RegisterSound( "sound/weapons/baton/idle.wav" ) ); + } + + //NOTE: All effects that should be visible during mindtrick should go above here + + if (iwantout) + { + goto stillDoSaber; + //return; + } + else if (doAlpha) + { + legs.renderfx |= RF_FORCE_ENT_ALPHA; + legs.shaderRGBA[3] = cent->trickAlpha; + + if (legs.shaderRGBA[3] < 1) + { //don't cancel it out even if it's < 1 + legs.shaderRGBA[3] = 1; + } + } + + if (cg_entities[cent->currentState.number].teamPowerEffectTime > cg.time) + { + if (cg_entities[cent->currentState.number].teamPowerType == 3) + { //absorb is a somewhat different effect entirely + //Guess I'll take care of it where it's always been, just checking these values instead. + } + else + { + vec4_t preCol; + int preRFX; + + preRFX = legs.renderfx; + + legs.renderfx |= RF_RGB_TINT; + legs.renderfx |= RF_FORCE_ENT_ALPHA; + + preCol[0] = legs.shaderRGBA[0]; + preCol[1] = legs.shaderRGBA[1]; + preCol[2] = legs.shaderRGBA[2]; + preCol[3] = legs.shaderRGBA[3]; + + if (cg_entities[cent->currentState.number].teamPowerType == 1) + { //heal + legs.shaderRGBA[0] = 0; + legs.shaderRGBA[1] = 255; + legs.shaderRGBA[2] = 0; + } + else if (cg_entities[cent->currentState.number].teamPowerType == 0) + { //regen + legs.shaderRGBA[0] = 0; + legs.shaderRGBA[1] = 0; + legs.shaderRGBA[2] = 255; + } + else + { //drain + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = 0; + legs.shaderRGBA[2] = 0; + } + + legs.shaderRGBA[3] = ((cg_entities[cent->currentState.number].teamPowerEffectTime - cg.time)/8); + + legs.customShader = trap_R_RegisterShader( "powerups/ysalimarishell" ); + trap_R_AddRefEntityToScene(&legs); + + legs.customShader = 0; + legs.renderfx = preRFX; + legs.shaderRGBA[0] = preCol[0]; + legs.shaderRGBA[1] = preCol[1]; + legs.shaderRGBA[2] = preCol[2]; + legs.shaderRGBA[3] = preCol[3]; + } + } + + //If you've tricked this client. + if (CG_IsMindTricked(cg.snap->ps.fd.forceMindtrickTargetIndex, + cg.snap->ps.fd.forceMindtrickTargetIndex2, + cg.snap->ps.fd.forceMindtrickTargetIndex3, + cg.snap->ps.fd.forceMindtrickTargetIndex4, + cent->currentState.number)) + { + if (cent->ghoul2) + { + vec3_t efOrg; + vec3_t tAng, fxAng; + vec3_t axis[3]; + int effectTimeLayerC = effectTimeLayer; + sharedBoltInterface_t fxObj; + + //VectorSet( tAng, 0, cent->pe.torso.yawAngle, 0 ); + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_head, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, efOrg); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_Y, fxAng); + + axis[0][0] = boltMatrix.matrix[0][0]; + axis[0][1] = boltMatrix.matrix[1][0]; + axis[0][2] = boltMatrix.matrix[2][0]; + + axis[1][0] = boltMatrix.matrix[0][1]; + axis[1][1] = boltMatrix.matrix[1][1]; + axis[1][2] = boltMatrix.matrix[2][1]; + + axis[2][0] = boltMatrix.matrix[0][2]; + axis[2][1] = boltMatrix.matrix[1][2]; + axis[2][2] = boltMatrix.matrix[2][2]; + + VectorCopy(/*efOrg*/cent->lerpOrigin, fxObj.origin); + VectorCopy(/*fxAng*/tAng, fxObj.angles); + VectorCopy(cent->modelScale, fxObj.scale); + fxObj.ghoul2 = cent->ghoul2; + fxObj.isValid = 1; + fxObj.modelNum = 0; + fxObj.boltNum = cgs.clientinfo[cent->currentState.number].bolt_head; + fxObj.entNum = cent->currentState.number; + + while (effectTimeLayerC > 0) + { + trap_FX_PlayEntityEffectID(trap_FX_RegisterEffect("force/confusion.efx"), efOrg, axis, cent->boltInfo, cent->currentState.number); + + //FIXME: Due to the horrible inefficiency involved in the current effect bolt process an effect with as many particles as this won't + //work too happily. It also doesn't look a lot better due to the lag between origin updates with the effect bolt. If those issues + //are ever resolved it should be switched over to BoltedEffect. + //trap_FX_PlayBoltedEffectID(trap_FX_RegisterEffect("force/confusion.efx"), &fxObj); + effectTimeLayerC = 0;//-= 50; + } + } + } + + if (cgs.gametype == GT_HOLOCRON && cent->currentState.time2 && (cg.renderingThirdPerson || cg.snap->ps.clientNum != cent->currentState.number)) + { + int i = 0; + int renderedHolos = 0; + refEntity_t holoRef; + + while (i < NUM_FORCE_POWERS && renderedHolos < 3) + { + if (cent->currentState.time2 & (1 << i)) + { + memset( &holoRef, 0, sizeof(holoRef) ); + + VectorCopy(cent->lerpOrigin, elevated); + elevated[2] += 8; + + VectorCopy( elevated, holoRef.lightingOrigin ); + holoRef.shadowPlane = shadowPlane; + holoRef.renderfx = 0;//RF_THIRD_PERSON; + + if (renderedHolos == 0) + { + angle = ((cg.time / 8) & 255) * (M_PI * 2) / 255; + dir[0] = cos(angle) * 20; + dir[1] = sin(angle) * 20; + dir[2] = cos(angle) * 20; + VectorAdd(elevated, dir, holoRef.origin); + + angles[0] = sin(angle) * 30; + angles[1] = (angle * 180 / M_PI) + 90; + if (angles[1] > 360) + angles[1] -= 360; + angles[2] = 0; + AnglesToAxis( angles, holoRef.axis ); + } + else if (renderedHolos == 1) + { + angle = ((cg.time / 8) & 255) * (M_PI * 2) / 255 + M_PI; + if (angle > M_PI * 2) + angle -= (float)M_PI * 2; + dir[0] = sin(angle) * 20; + dir[1] = cos(angle) * 20; + dir[2] = cos(angle) * 20; + VectorAdd(elevated, dir, holoRef.origin); + + angles[0] = cos(angle - 0.5 * M_PI) * 30; + angles[1] = 360 - (angle * 180 / M_PI); + if (angles[1] > 360) + angles[1] -= 360; + angles[2] = 0; + AnglesToAxis( angles, holoRef.axis ); + } + else + { + angle = ((cg.time / 6) & 255) * (M_PI * 2) / 255 + 0.5 * M_PI; + if (angle > M_PI * 2) + angle -= (float)M_PI * 2; + dir[0] = sin(angle) * 20; + dir[1] = cos(angle) * 20; + dir[2] = 0; + VectorAdd(elevated, dir, holoRef.origin); + + VectorCopy(dir, holoRef.axis[1]); + VectorNormalize(holoRef.axis[1]); + VectorSet(holoRef.axis[2], 0, 0, 1); + CrossProduct(holoRef.axis[1], holoRef.axis[2], holoRef.axis[0]); + } + + holoRef.modelScale[0] = 0.5; + holoRef.modelScale[1] = 0.5; + holoRef.modelScale[2] = 0.5; + ScaleModelAxis(&holoRef); + + { + float wv; + addspriteArgStruct_t fxSArgs; + vec3_t holoCenter; + + holoCenter[0] = holoRef.origin[0] + holoRef.axis[2][0]*18; + holoCenter[1] = holoRef.origin[1] + holoRef.axis[2][1]*18; + holoCenter[2] = holoRef.origin[2] + holoRef.axis[2][2]*18; + + wv = sin( cg.time * 0.004f ) * 0.08f + 0.1f; + + VectorCopy(holoCenter, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = wv*60; + fxSArgs.dscale = wv*60; + fxSArgs.sAlpha = wv*12; + fxSArgs.eAlpha = wv*12; + fxSArgs.rotation = 0.0f; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + + fxSArgs.flags = 0x08000000|0x00000001; + + if (forcePowerDarkLight[i] == FORCE_DARKSIDE) + { //dark + fxSArgs.sAlpha *= 3; + fxSArgs.eAlpha *= 3; + fxSArgs.shader = cgs.media.redSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else if (forcePowerDarkLight[i] == FORCE_LIGHTSIDE) + { //light + fxSArgs.sAlpha *= 1.5; + fxSArgs.eAlpha *= 1.5; + fxSArgs.shader = cgs.media.redSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.blueSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else + { //neutral + if (i == FP_SABERATTACK || + i == FP_SABERDEFEND || + i == FP_SABERTHROW) + { //saber power + fxSArgs.sAlpha *= 1.5; + fxSArgs.eAlpha *= 1.5; + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else + { + fxSArgs.sAlpha *= 0.5; + fxSArgs.eAlpha *= 0.5; + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.blueSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + } + } + + holoRef.hModel = trap_R_RegisterModel(forceHolocronModels[i]); + trap_R_AddRefEntityToScene( &holoRef ); + + renderedHolos++; + } + i++; + } + } + + if ((cent->currentState.powerups & (1 << PW_YSALAMIRI)) || + (cgs.gametype == GT_CTY && ((cent->currentState.powerups & (1 << PW_REDFLAG)) || (cent->currentState.powerups & (1 << PW_BLUEFLAG)))) ) + { + if (cgs.gametype == GT_CTY && (cent->currentState.powerups & (1 << PW_REDFLAG))) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysaliredShader ); + } + else if (cgs.gametype == GT_CTY && (cent->currentState.powerups & (1 << PW_BLUEFLAG))) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysaliblueShader ); + } + else + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysalimariShader ); + } + } + + if (cent->currentState.powerups & (1 << PW_FORCE_BOON)) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 2.0, cgs.media.boonShader ); + } + + if (cent->currentState.powerups & (1 << PW_FORCE_ENLIGHTENED_DARK)) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 2.0, cgs.media.endarkenmentShader ); + } + else if (cent->currentState.powerups & (1 << PW_FORCE_ENLIGHTENED_LIGHT)) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 2.0, cgs.media.enlightenmentShader ); + } + + if (cent->currentState.eFlags & EF_INVULNERABLE) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.invulnerabilityShader ); + } +stillDoSaber: + if (cent->currentState.weapon == WP_SABER && !cent->currentState.shouldtarget) + { + if (!cent->currentState.saberInFlight && !(cent->currentState.eFlags & EF_DEAD)) + { + if (cg.snap->ps.clientNum == cent->currentState.number) + { + trap_S_AddLoopingSound( cent->currentState.number, cg.refdef.vieworg, vec3_origin, + trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ) ); + } + else + { + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, + trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ) ); + } + } + + if (iwantout && !cent->currentState.saberInFlight) + { + if (cent->currentState.eFlags & EF_DEAD) + { + if (cent->ghoul2 && cent->currentState.saberInFlight && g2HasWeapon) + { //special case, kill the saber on a freshly dead player if another source says to. + trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); + g2HasWeapon = qfalse; + } + } + //return; + goto endOfCall; + } + + if (cent->currentState.saberInFlight && cent->currentState.saberEntityNum) + { + centity_t *saberEnt; + + saberEnt = &cg_entities[cent->currentState.saberEntityNum]; + + if (/*!cent->bolt4 &&*/ g2HasWeapon) + { //saber is in flight, do not have it as a standard weapon model + trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); + g2HasWeapon = qfalse; + + //cent->bolt4 = 1; + + saberEnt->currentState.pos.trTime = cg.time; + saberEnt->currentState.apos.trTime = cg.time; + + VectorCopy(saberEnt->currentState.pos.trBase, saberEnt->lerpOrigin); + VectorCopy(saberEnt->currentState.apos.trBase, saberEnt->lerpAngles); + + cent->bolt3 = saberEnt->currentState.apos.trBase[0]; + cent->bolt2 = 0; + + saberEnt->currentState.bolt2 = 123; + + if (saberEnt->ghoul2) + { + // now set up the gun bolt on it + trap_G2API_AddBolt(saberEnt->ghoul2, 0, "*flash"); + } + else + { + trap_G2API_InitGhoul2Model(&saberEnt->ghoul2, "models/weapons2/saber/saber_w.glm", 0, 0, 0, 0, 0); + + if (saberEnt->ghoul2) + { + trap_G2API_AddBolt(saberEnt->ghoul2, 0, "*flash"); + //cent->bolt4 = 2; + + VectorCopy(saberEnt->currentState.pos.trBase, saberEnt->lerpOrigin); + VectorCopy(saberEnt->currentState.apos.trBase, saberEnt->lerpAngles); + saberEnt->currentState.pos.trTime = cg.time; + saberEnt->currentState.apos.trTime = cg.time; + } + } + } + /*else if (cent->bolt4 != 2) + { + if (saberEnt->ghoul2) + { + trap_G2API_AddBolt(saberEnt->ghoul2, 0, "*flash"); + cent->bolt4 = 2; + } + }*/ + + if (saberEnt && saberEnt->ghoul2 /*&& cent->bolt4 == 2*/) + { + vec3_t bladeAngles; + + if (!cent->bolt2) + { + cent->bolt2 = cg.time; + } + + if (cent->bolt3 != 90) + { + if (cent->bolt3 < 90) + { + cent->bolt3 += (cg.time - cent->bolt2)*0.5; + + if (cent->bolt3 > 90) + { + cent->bolt3 = 90; + } + } + else if (cent->bolt3 > 90) + { + cent->bolt3 -= (cg.time - cent->bolt2)*0.5; + + if (cent->bolt3 < 90) + { + cent->bolt3 = 90; + } + } + } + + cent->bolt2 = cg.time; + + saberEnt->currentState.apos.trBase[0] = cent->bolt3; + saberEnt->lerpAngles[0] = cent->bolt3; + + if (!saberEnt->currentState.saberInFlight && saberEnt->currentState.bolt2 != 123) + { //owner is pulling is back + vec3_t owndir; + + VectorSubtract(saberEnt->lerpOrigin, cent->lerpOrigin, owndir); + VectorNormalize(owndir); + + vectoangles(owndir, owndir); + + owndir[0] += 90; + + VectorCopy(owndir, saberEnt->currentState.apos.trBase); + VectorCopy(owndir, saberEnt->lerpAngles); + VectorClear(saberEnt->currentState.apos.trDelta); + } + + //We don't actually want to rely entirely on server updates to render the position of the saber, because we actually know generally where + //it's going to be before the first position update even gets here, and it needs to start getting rendered the instant the saber model is + //removed from the player hand. So we'll just render it manually and let normal rendering for the entity be ignored. + if (!saberEnt->currentState.saberInFlight && saberEnt->currentState.bolt2 != 123) + { //tell it that we're a saber and to render the glow around our handle because we're being pulled back + saberEnt->bolt3 = 999; + } + + saberEnt->currentState.modelGhoul2 = 1; + CG_ManualEntityRender(saberEnt); + saberEnt->bolt3 = 0; + saberEnt->currentState.modelGhoul2 = 127; + + VectorCopy(saberEnt->lerpAngles, bladeAngles); + bladeAngles[ROLL] = 0; + CG_AddSaberBlade(cent, saberEnt, NULL, 0, 0, saberEnt->lerpOrigin, bladeAngles, qtrue); + + //Make the player's hand glow while guiding the saber + { + vec3_t tAng; + float wv; + addspriteArgStruct_t fxSArgs; + + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_rhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + + efOrg[0] = boltMatrix.matrix[0][3]; + efOrg[1] = boltMatrix.matrix[1][3]; + efOrg[2] = boltMatrix.matrix[2][3]; + + wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; + + //trap_FX_AddSprite( NULL, efOrg, NULL, NULL, 8.0f, 8.0f, wv, wv, 0.0f, 0.0f, 1.0f, cgs.media.yellowSaberGlowShader, 0x08000000 ); + VectorCopy(efOrg, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = 8.0f; + fxSArgs.dscale = 8.0f; + fxSArgs.sAlpha = wv; + fxSArgs.eAlpha = wv; + fxSArgs.rotation = 0.0f; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + fxSArgs.shader = cgs.media.yellowDroppedSaberShader; + fxSArgs.flags = 0x08000000; + trap_FX_AddSprite(&fxSArgs); + } + } + } + else + { + centity_t *saberEnt; + + saberEnt = &cg_entities[cent->currentState.saberEntityNum]; + + if (/*cent->bolt4 && */!g2HasWeapon) + { + trap_G2API_CopySpecificGhoul2Model(g2WeaponInstances[WP_SABER], 0, cent->ghoul2, 1); + + if (saberEnt && saberEnt->ghoul2) + { + trap_G2API_CleanGhoul2Models(&(saberEnt->ghoul2)); + } + + saberEnt->currentState.modelindex = 0; + saberEnt->ghoul2 = NULL; + VectorClear(saberEnt->currentState.pos.trBase); + } + CG_AddSaberBlade( cent, cent, NULL, 0, 0, legs.origin, rootAngles, qfalse); + cent->bolt3 = 0; + cent->bolt2 = 0; + + //cent->bolt4 = 0; + } + } + else + { + cent->saberLength = 0; + } + + if (cent->currentState.eFlags & EF_DEAD) + { + if (cent->ghoul2 && cent->currentState.saberInFlight && g2HasWeapon) + { //special case, kill the saber on a freshly dead player if another source says to. + trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); + g2HasWeapon = qfalse; + } + } + + if (iwantout) + { + //return; + goto endOfCall; + } + + if ((cg.snap->ps.fd.forcePowersActive & (1 << FP_SEE)) && cg.snap->ps.clientNum != cent->currentState.number) + { + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = 255; + legs.shaderRGBA[2] = 0; + legs.renderfx |= RF_MINLIGHT; + } + + if (cg.snap->ps.duelInProgress /*&& cent->currentState.number != cg.snap->ps.clientNum*/) + { //I guess go ahead and glow your own client too in a duel + if (cent->currentState.number != cg.snap->ps.duelIndex && + cent->currentState.number != cg.snap->ps.clientNum) + { //everyone not involved in the duel is drawn very dark + legs.shaderRGBA[0] = 50; + legs.shaderRGBA[1] = 50; + legs.shaderRGBA[2] = 50; + legs.renderfx |= RF_RGB_TINT; + } + else + { //adjust the glow by how far away you are from your dueling partner + centity_t *duelEnt; + + duelEnt = &cg_entities[cg.snap->ps.duelIndex]; + + if (duelEnt) + { + vec3_t vecSub; + float subLen = 0; + + VectorSubtract(duelEnt->lerpOrigin, cg.snap->ps.origin, vecSub); + subLen = VectorLength(vecSub); + + if (subLen < 1) + { + subLen = 1; + } + + if (subLen > 1020) + { + subLen = 1020; + } + + legs.shaderRGBA[0] = 255 - subLen/4; + legs.shaderRGBA[1] = 255 - subLen/4; + legs.shaderRGBA[2] = 255 - subLen/4; + + if (legs.shaderRGBA[2] < 1) legs.shaderRGBA[2] = 1; + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.customShader = cgs.media.forceShell; + + trap_R_AddRefEntityToScene( &legs ); + + legs.customShader = 0; + + legs.shaderRGBA[0] = 255 - subLen/8; + legs.shaderRGBA[1] = 255 - subLen/8; + legs.shaderRGBA[2] = 255 - subLen/8; + + if (legs.shaderRGBA[2] < 1) + { + legs.shaderRGBA[2] = 1; + } + if (legs.shaderRGBA[2] > 255) + { + legs.shaderRGBA[2] = 255; + } + + if (subLen <= 1024) + { + legs.renderfx |= RF_RGB_TINT; + } + } + } + } + else + { + if (cent->currentState.bolt1 && !(cent->currentState.eFlags & EF_DEAD) && cent->currentState.number != cg.snap->ps.clientNum && (!cg.snap->ps.duelInProgress || cg.snap->ps.duelIndex != cent->currentState.number)) + { + legs.shaderRGBA[0] = 50; + legs.shaderRGBA[1] = 50; + legs.shaderRGBA[2] = 50; + legs.renderfx |= RF_RGB_TINT; + } + } +doEssentialThree: + if (cent->currentState.eFlags & EF_DISINTEGRATION) + { + vec3_t tempAng, hitLoc; + float tempLength; + + if (!cent->dustTrailTime) + { + cent->dustTrailTime = cg.time; + cent->miscTime = legs.frame; + } + + if ((cg.time - cent->dustTrailTime) > 1500) + { //avoid rendering the entity after disintegration has finished anyway + goto endOfCall; + } + + trap_G2API_SetBoneAnim(legs.ghoul2, 0, "model_root", cent->miscTime, cent->miscTime, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->miscTime, -1); + trap_G2API_SetBoneAnim(legs.ghoul2, 0, "lower_lumbar", cent->miscTime, cent->miscTime, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->miscTime, -1); + trap_G2API_SetBoneAnim(legs.ghoul2, 0, "Motion", cent->miscTime, cent->miscTime, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->miscTime, -1); + + VectorCopy(cent->currentState.origin2, hitLoc); + + VectorSubtract( hitLoc, legs.origin, legs.oldorigin ); + + tempLength = VectorNormalize( legs.oldorigin ); + vectoangles( legs.oldorigin, tempAng ); + tempAng[YAW] -= cent->lerpAngles[YAW]; + AngleVectors( tempAng, legs.oldorigin, NULL, NULL ); + VectorScale( legs.oldorigin, tempLength, legs.oldorigin ); + legs.endTime = cent->dustTrailTime; + + //FIXME: Sorting is all wrong here, it can't decide if it should render this part or the outer body first + /* + legs.renderfx |= RF_DISINTEGRATE2; + legs.customShader = cgs.media.disruptorShader; + trap_R_AddRefEntityToScene( &legs ); + */ + + legs.renderfx &= ~(RF_DISINTEGRATE2); + legs.renderfx |= (RF_DISINTEGRATE1); + + legs.customShader = 0; + trap_R_AddRefEntityToScene( &legs ); + + goto endOfCall; + } + else + { + cent->dustTrailTime = 0; + cent->miscTime = 0; + } + + trap_R_AddRefEntityToScene(&legs); + + if (cent->isATST) + { + //return; + goto endOfCall; + } + + cent->frame_minus2 = cent->frame_minus1; + if (cent->frame_minus1_refreshed) + { + cent->frame_minus2_refreshed = 1; + } + cent->frame_minus1 = legs; + cent->frame_minus1_refreshed = 1; + + if (!cent->frame_hold_refreshed && (cent->currentState.powerups & (1 << PW_SPEEDBURST))) + { + cent->frame_hold_time = cg.time + 254; + } + + if (cent->frame_hold_time >= cg.time) + { + if (!cent->frame_hold_refreshed) + { //We're taking the ghoul2 instance from the original refent and duplicating it onto our refent alias so that we can then freeze the frame and fade it for the effect + if (cent->frame_hold.ghoul2 && trap_G2_HaveWeGhoul2Models(cent->frame_hold.ghoul2) && + cent->frame_hold.ghoul2 != cent->ghoul2) + { + trap_G2API_CleanGhoul2Models(&(cent->frame_hold.ghoul2)); + } + cent->frame_hold = legs; + cent->frame_hold_refreshed = 1; + cent->frame_hold.ghoul2 = NULL; + + trap_G2API_DuplicateGhoul2Instance(cent->ghoul2, ¢->frame_hold.ghoul2); + + //Set the animation to the current frame and freeze on end + //trap_G2API_SetBoneAnim(cent->frame_hold.ghoul2, 0, "model_root", cent->frame_hold.frame, cent->frame_hold.frame, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->frame_hold.frame, -1); + trap_G2API_SetBoneAnim(cent->frame_hold.ghoul2, 0, "model_root", cent->frame_hold.frame, cent->frame_hold.frame, 0, 1.0f, cg.time, cent->frame_hold.frame, -1); + } + + cent->frame_hold.renderfx |= RF_FORCE_ENT_ALPHA; + cent->frame_hold.shaderRGBA[3] = (cent->frame_hold_time - cg.time); + if (cent->frame_hold.shaderRGBA[3] > 254) + { + cent->frame_hold.shaderRGBA[3] = 254; + } + if (cent->frame_hold.shaderRGBA[3] < 1) + { + cent->frame_hold.shaderRGBA[3] = 1; + } + + trap_R_AddRefEntityToScene(¢->frame_hold); + } + else + { + cent->frame_hold_refreshed = 0; + } + + // + // add the gun / barrel / flash + // + if (cent->currentState.weapon != WP_EMPLACED_GUN) + { + CG_AddPlayerWeapon( &legs, NULL, cent, ci->team, rootAngles, qtrue ); + } + // add powerups floating behind the player + CG_PlayerPowerups( cent, &legs ); + + if ((cent->currentState.forcePowersActive & (1 << FP_RAGE)) && + (cg.renderingThirdPerson || cent->currentState.number != cg.snap->ps.clientNum)) + { + //legs.customShader = cgs.media.rageShader; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.renderfx &= ~RF_MINLIGHT; + + legs.renderfx |= RF_RGB_TINT; + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = legs.shaderRGBA[2] = 0; + legs.shaderRGBA[3] = 255; + + if ( rand() & 1 ) + { + legs.customShader = cgs.media.electricBodyShader; + } + else + { + legs.customShader = cgs.media.electricBody2Shader; + } + + trap_R_AddRefEntityToScene(&legs); + } + + if (!cg.snap->ps.duelInProgress && cent->currentState.bolt1 && !(cent->currentState.eFlags & EF_DEAD) && cent->currentState.number != cg.snap->ps.clientNum && (!cg.snap->ps.duelInProgress || cg.snap->ps.duelIndex != cent->currentState.number)) + { + legs.shaderRGBA[0] = 50; + legs.shaderRGBA[1] = 50; + legs.shaderRGBA[2] = 255; + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.customShader = cgs.media.forceSightBubble; + + trap_R_AddRefEntityToScene( &legs ); + } + + //For now, these two are using the old shield shader. This is just so that you + //can tell it apart from the JM/duel shaders, but it's still very obvious. + if (cent->currentState.forcePowersActive & (1 << FP_PROTECT)) + { //aborb is represented by green.. + legs.shaderRGBA[0] = 0; + legs.shaderRGBA[1] = 255; + legs.shaderRGBA[2] = 0; + legs.shaderRGBA[3] = 254; + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.customShader = cgs.media.playerShieldDamage; + + trap_R_AddRefEntityToScene( &legs ); + } + //if (cent->currentState.forcePowersActive & (1 << FP_ABSORB)) + //Showing only when the power has been active (absorbed something) recently now, instead of always. + if (cg_entities[cent->currentState.number].teamPowerEffectTime > cg.time && cg_entities[cent->currentState.number].teamPowerType == 3) + { //aborb is represented by blue.. + legs.shaderRGBA[0] = 0; + legs.shaderRGBA[1] = 0; + legs.shaderRGBA[2] = 255; + legs.shaderRGBA[3] = 254; + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.customShader = cgs.media.playerShieldDamage; + + trap_R_AddRefEntityToScene( &legs ); + } + + if (cent->currentState.isJediMaster && cg.snap->ps.clientNum != cent->currentState.number) + { + legs.shaderRGBA[0] = 100; + legs.shaderRGBA[1] = 100; + legs.shaderRGBA[2] = 255; + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.renderfx |= RF_NODEPTH; + legs.customShader = cgs.media.forceShell; + + trap_R_AddRefEntityToScene( &legs ); + + legs.renderfx &= ~RF_NODEPTH; + } + + if ((cg.snap->ps.fd.forcePowersActive & (1 << FP_SEE)) && cg.snap->ps.clientNum != cent->currentState.number && cg_auraShell.integer) + { + if (cgs.gametype >= GT_TEAM) + { // A team game + switch(cgs.clientinfo[ cent->currentState.clientNum ].team) + { + case TEAM_RED: + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = 50; + legs.shaderRGBA[2] = 50; + break; + case TEAM_BLUE: + legs.shaderRGBA[0] = 75; + legs.shaderRGBA[1] = 75; + legs.shaderRGBA[2] = 255; + break; + + default: + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = 255; + legs.shaderRGBA[2] = 0; + break; + } + } + else + { // Not a team game + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = 255; + legs.shaderRGBA[2] = 0; + } + +/* if (cg.snap->ps.fd.forcePowerLevel[FP_SEE] <= FORCE_LEVEL_1) + { + legs.renderfx |= RF_MINLIGHT; + } + else +*/ { // See through walls. + legs.renderfx |= RF_MINLIGHT | RF_NODEPTH; + + if (cg.snap->ps.fd.forcePowerLevel[FP_SEE] < FORCE_LEVEL_2) + { //only level 2+ can see players through walls + legs.renderfx &= ~RF_NODEPTH; + } + } + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.customShader = cgs.media.sightShell; + + trap_R_AddRefEntityToScene( &legs ); + } + + // Electricity + //------------------------------------------------ + if ( cent->currentState.emplacedOwner > cg.time ) + { + int dif = cent->currentState.emplacedOwner - cg.time; + + if ( dif > 0 && random() > 0.4f ) + { + // fade out over the last 500 ms + int brightness = 255; + + if ( dif < 500 ) + { + brightness = floor((dif - 500.0f) / 500.0f * 255.0f ); + } + + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.renderfx &= ~RF_MINLIGHT; + + legs.renderfx |= RF_RGB_TINT; + legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = brightness; + legs.shaderRGBA[3] = 255; + + if ( rand() & 1 ) + { + legs.customShader = cgs.media.electricBodyShader; + } + else + { + legs.customShader = cgs.media.electricBody2Shader; + } + + trap_R_AddRefEntityToScene( &legs ); + + if ( random() > 0.9f ) + trap_S_StartSound ( NULL, cent->currentState.number, CHAN_AUTO, cgs.media.crackleSound ); + } + } + + if (cent->currentState.powerups & (1 << PW_SHIELDHIT)) + { + /* + legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = 255.0f * 0.5f;//t; + legs.shaderRGBA[3] = 255; + legs.renderfx &= ~RF_ALPHA_FADE; + legs.renderfx |= RF_RGB_TINT; + */ + + legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = Q_irand(1, 255); + + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.renderfx &= ~RF_MINLIGHT; + legs.renderfx &= ~RF_RGB_TINT; + legs.customShader = cgs.media.playerShieldDamage; + + trap_R_AddRefEntityToScene( &legs ); + } +endOfCall: + + if (cgBoneAnglePostSet.refreshSet) + { + trap_G2API_SetBoneAngles(cgBoneAnglePostSet.ghoul2, cgBoneAnglePostSet.modelIndex, cgBoneAnglePostSet.boneName, + cgBoneAnglePostSet.angles, cgBoneAnglePostSet.flags, cgBoneAnglePostSet.up, cgBoneAnglePostSet.right, + cgBoneAnglePostSet.forward, cgBoneAnglePostSet.modelList, cgBoneAnglePostSet.blendTime, cgBoneAnglePostSet.currentTime); + + cgBoneAnglePostSet.refreshSet = qfalse; + } +} + + +//===================================================================== + +/* +=============== +CG_ResetPlayerEntity + +A player just came into view or teleported, so reset all animation info +=============== +*/ +void CG_ResetPlayerEntity( centity_t *cent ) +{ + cent->errorTime = -99999; // guarantee no error decay added + cent->extrapolated = qfalse; + + CG_ClearLerpFrame( cent, &cgs.clientinfo[ cent->currentState.clientNum ], ¢->pe.legs, cent->currentState.legsAnim, qfalse); + CG_ClearLerpFrame( cent, &cgs.clientinfo[ cent->currentState.clientNum ], ¢->pe.torso, cent->currentState.torsoAnim, qtrue); + + BG_EvaluateTrajectory( ¢->currentState.pos, cg.time, cent->lerpOrigin ); + BG_EvaluateTrajectory( ¢->currentState.apos, cg.time, cent->lerpAngles ); + + VectorCopy( cent->lerpOrigin, cent->rawOrigin ); + VectorCopy( cent->lerpAngles, cent->rawAngles ); + + memset( ¢->pe.legs, 0, sizeof( cent->pe.legs ) ); + cent->pe.legs.yawAngle = cent->rawAngles[YAW]; + cent->pe.legs.yawing = qfalse; + cent->pe.legs.pitchAngle = 0; + cent->pe.legs.pitching = qfalse; + + memset( ¢->pe.torso, 0, sizeof( cent->pe.legs ) ); + cent->pe.torso.yawAngle = cent->rawAngles[YAW]; + cent->pe.torso.yawing = qfalse; + cent->pe.torso.pitchAngle = cent->rawAngles[PITCH]; + cent->pe.torso.pitching = qfalse; + + if ((cent->ghoul2 == NULL) && trap_G2_HaveWeGhoul2Models(cgs.clientinfo[cent->currentState.clientNum].ghoul2Model)) + { + trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[cent->currentState.clientNum].ghoul2Model, ¢->ghoul2); + CG_CopyG2WeaponInstance(cent->currentState.weapon, cgs.clientinfo[cent->currentState.clientNum].ghoul2Model); + cent->weapon = cent->currentState.weapon; + } + + if ( cg_debugPosition.integer ) { + CG_Printf("%i ResetPlayerEntity yaw=%i\n", cent->currentState.number, cent->pe.torso.yawAngle ); + } +} + diff --git a/code/cgame/cg_players.c b/code/cgame/cg_players.c new file mode 100644 index 0000000..effc380 --- /dev/null +++ b/code/cgame/cg_players.c @@ -0,0 +1,7529 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_players.c -- handle the media and animation for player entities +#include "cg_local.h" +#include "..\ghoul2\g2.h" + +extern stringID_table_t animTable [MAX_ANIMATIONS+1]; + +char *cg_customSoundNames[MAX_CUSTOM_SOUNDS] = { + "*death1.wav", + "*death2.wav", + "*death3.wav", + "*jump1.wav", + "*pain25.wav", + "*pain50.wav", + "*pain75.wav", + "*pain100.wav", + "*falling1.wav", + "*choke1.wav", + "*choke2.wav", + "*choke3.wav", + "*gasp.wav", + "*land1.wav", + "*falling1.wav", + "*taunt.wav" +}; + + +/* +================ +CG_CustomSound + +================ +*/ +sfxHandle_t CG_CustomSound( int clientNum, const char *soundName ) { + clientInfo_t *ci; + int i; + + if ( soundName[0] != '*' ) { + return trap_S_RegisterSound( soundName ); + } + + if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { + clientNum = 0; + } + ci = &cgs.clientinfo[ clientNum ]; + + for ( i = 0 ; i < MAX_CUSTOM_SOUNDS && cg_customSoundNames[i] ; i++ ) { + if ( !strcmp( soundName, cg_customSoundNames[i] ) ) { + return ci->sounds[i]; + } + } + + CG_Error( "Unknown custom sound: %s", soundName ); + return 0; +} + + + +/* +============================================================================= + +CLIENT INFO + +============================================================================= +*/ + +/* +========================== +CG_NeedAnimSequence + +Called to check if models are missing required animation sequences +We do not list all used animations here but this check should eliminate +a broad range of unsupported models. At least the ones that are included, +which is all we really care about. +========================== +*/ +qboolean CG_NeedAnimSequence(int anim) +{ + if (anim >= BOTH_DEATH1 && + anim <= BOTH_DEATH19) + { + return qtrue; + } + + if (anim >= BOTH_DISMEMBER_HEAD1 && + anim <= BOTH_DISMEMBER_LARM) + { + return qtrue; + } + + if (anim >= BOTH_A1_T__B_ && + anim <= BOTH_H1_S1_BR) + { + return qtrue; + } + + return qfalse; +} + +//To see if the client is trying to use one of the included skins not meant for MP. +//I don't much care for hardcoded strings, but this seems the best way to go. +static qboolean CG_IsValidCharacterModel(const char *modelName, const char *skinName) +{ + if (!Q_stricmp(modelName, "kyle")) + { + if (!Q_stricmp(skinName, "fpls")) + { + return qfalse; + } + else if (!Q_stricmp(skinName, "fpls2")) + { + return qfalse; + } + else if (!Q_stricmp(skinName, "fpls3")) + { + return qfalse; + } + } + else if (!Q_stricmp(modelName, "morgan")) + { + //For morgan, we want to deny if the skin is anything but one of the valid ones + //Since his default skin is actually the bad one, you could just type + //"model morgan/blah" and get it. This rules out custom morgan skins without + //programming assistance unfortunately. + if (Q_stricmp(skinName, "default_mp") && + Q_stricmp(skinName, "red") && + Q_stricmp(skinName, "blue")) + { + return qfalse; + } + } + + return qtrue; +} + +#define MAX_SURF_LIST_SIZE 1024 +qboolean CG_ParseSurfsFile( const char *modelName, const char *skinName, char *surfOff, char *surfOn ) +{ + const char *text_p; + int len; + const char *token; + const char *value; + char text[20000]; + char sfilename[MAX_QPATH]; + fileHandle_t f; + + // Load and parse .surf file + Com_sprintf( sfilename, sizeof( sfilename ), "models/players/%s/model_%s.surf", modelName, skinName ); + + // load the file + len = trap_FS_FOpenFile( sfilename, &f, FS_READ ); + if ( len <= 0 ) + {//no file + return qfalse; + } + if ( len >= sizeof( text ) - 1 ) + { + Com_Printf( "File %s too long\n", sfilename ); + return qfalse; + } + + trap_FS_Read( text, len, f ); + text[len] = 0; + trap_FS_FCloseFile( f ); + + // parse the text + text_p = text; + + memset( (char *)surfOff, 0, sizeof(surfOff) ); + memset( (char *)surfOn, 0, sizeof(surfOn) ); + + // read information for surfOff and surfOn + while ( 1 ) + { + token = COM_ParseExt( &text_p, qtrue ); + if ( !token || !token[0] ) + { + break; + } + + // surfOff + if ( !Q_stricmp( token, "surfOff" ) ) + { + if ( COM_ParseString( &text_p, &value ) ) + { + continue; + } + if ( surfOff && surfOff[0] ) + { + Q_strcat( surfOff, MAX_SURF_LIST_SIZE, "," ); + Q_strcat( surfOff, MAX_SURF_LIST_SIZE, value ); + } + else + { + Q_strncpyz( surfOff, value, MAX_SURF_LIST_SIZE ); + } + continue; + } + + // surfOn + if ( !Q_stricmp( token, "surfOn" ) ) + { + if ( COM_ParseString( &text_p, &value ) ) + { + continue; + } + if ( surfOn && surfOn[0] ) + { + Q_strcat( surfOn, MAX_SURF_LIST_SIZE, ","); + Q_strcat( surfOn, MAX_SURF_LIST_SIZE, value ); + } + else + { + Q_strncpyz( surfOn, value, MAX_SURF_LIST_SIZE ); + } + continue; + } + } + return qtrue; +} + +/* +========================== +CG_RegisterClientModelname +========================== +*/ +static qboolean CG_RegisterClientModelname( clientInfo_t *ci, const char *modelName, const char *skinName, const char *teamName, int clientNum ) { + int handle; + char afilename[MAX_QPATH]; + char /**GLAName,*/ *slash; + char GLAName[MAX_QPATH]; + vec3_t tempVec = {0,0,0}; + qboolean badModel = qfalse; + qboolean retriedAlready = qfalse; + char surfOff[MAX_SURF_LIST_SIZE]; + char surfOn[MAX_SURF_LIST_SIZE]; + +retryModel: + if (ci->ATST && clientNum == -1) + { + Com_sprintf(ci->teamName, sizeof(ci->teamName), teamName); + return qtrue; + } + + if (badModel) + { + modelName = "kyle"; + skinName = "default"; + Com_Printf("WARNING: Attempted to load an unsupported multiplayer model! (bad or missing bone, or missing animation sequence)\n"); + + badModel = qfalse; + retriedAlready = qtrue; + } + + if (!CG_IsValidCharacterModel(modelName, skinName)) + { + modelName = "kyle"; + skinName = "default"; + } + + // First things first. If this is a ghoul2 model, then let's make sure we demolish this first. + if (ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) + { + trap_G2API_CleanGhoul2Models(&(ci->ghoul2Model)); + } + + if ( cgs.gametype >= GT_TEAM && !cgs.jediVmerc ) + { + if (ci->team == TEAM_RED) + { + Q_strncpyz(ci->skinName, "red", sizeof(ci->skinName)); + skinName = "red"; + } + else if (ci->team == TEAM_BLUE) + { + Q_strncpyz(ci->skinName, "blue", sizeof(ci->skinName)); + skinName = "blue"; + } + } + + if (clientNum != -1 && cg_entities[clientNum].currentState.teamowner && !cg_entities[clientNum].isATST) + { + ci->torsoSkin = 0; + ci->ATST = qtrue; + handle = trap_G2API_InitGhoul2Model(&ci->ghoul2Model, "models/players/atst/model.glm", 0, 0, 0, 0, 0); + } + else + { + ci->torsoSkin = trap_R_RegisterSkin(va("models/players/%s/model_%s.skin", modelName, skinName)); + ci->ATST = qfalse; + Com_sprintf( afilename, sizeof( afilename ), "models/players/%s/model.glm", modelName ); + handle = trap_G2API_InitGhoul2Model(&ci->ghoul2Model, afilename, 0, ci->torsoSkin, 0, 0, 0); + } + if (handle<0) + { + return qfalse; + } + + // The model is now loaded. + + GLAName[0] = 0; + + trap_G2API_GetGLAName( ci->ghoul2Model, 0, GLAName); + if (GLAName[0] != 0) + { + if (!strstr(GLAName, "players/_humanoid/")) + { //Bad! + badModel = qtrue; + goto retryModel; + } + } + + if (!BGPAFtextLoaded) + { + if (GLAName[0] == 0/*GLAName == NULL*/) + { + if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg")) + { + Com_Printf( "Failed to load animation file %s\n", afilename ); + return qfalse; + } + return qtrue; + } + Q_strncpyz( afilename, GLAName, sizeof( afilename )); + slash = Q_strrchr( afilename, '/' ); + if ( slash ) + { + strcpy(slash, "/animation.cfg"); + } // Now afilename holds just the path to the animation.cfg + else + { // Didn't find any slashes, this is a raw filename right in base (whish isn't a good thing) + return qfalse; + } + + /* + // Try to load the animation.cfg for this model then. + if ( !BG_ParseAnimationFile( afilename, ci->animations ) ) + { // The GLA's animations failed + if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg", ci->animations)) + { + Com_Printf( "Failed to load animation file %s\n", afilename ); + return qfalse; + } + } + */ + //rww - For now, we'll just ignore what animation file it wants. In theory all multiplayer-supported models + //should want _humanoid/animation.cfg, so if it doesn't want that then throw it away + if (Q_stricmp(afilename, "models/players/_humanoid/animation.cfg")) + { + Com_Printf( "Model does not use supported animation config.\n"); + return qfalse; + } + else if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg")) + { + Com_Printf( "Failed to load animation file models/players/_humanoid/animation.cfg\n" ); + return qfalse; + } + else if (!retriedAlready) + { + int i; + + for(i = 0; i < MAX_ANIMATIONS; i++) + { + if (!bgGlobalAnimations[i].firstFrame && !bgGlobalAnimations[i].numFrames && CG_NeedAnimSequence(i)) + { //using default for this animation so it obviously never got filled in. + //if it's a sequence that we need, this model must be an unsupported one. + badModel = qtrue; + goto retryModel; + } + } + } + } + + if ( CG_ParseSurfsFile( modelName, skinName, surfOff, surfOn ) ) + {//turn on/off any surfs + const char *token; + const char *p; + + //Now turn on/off any surfaces + if ( surfOff && surfOff[0] ) + { + p = surfOff; + while ( 1 ) + { + token = COM_ParseExt( &p, qtrue ); + if ( !token[0] ) + {//reached end of list + break; + } + //turn off this surf + trap_G2API_SetSurfaceOnOff( ci->ghoul2Model, token, 0x00000002/*G2SURFACEFLAG_OFF*/ ); + } + } + if ( surfOn && surfOn[0] ) + { + p = surfOn; + while ( 1 ) + { + token = COM_ParseExt( &p, qtrue ); + if ( !token[0] ) + {//reached end of list + break; + } + //turn on this surf + trap_G2API_SetSurfaceOnOff( ci->ghoul2Model, token, 0 ); + } + } + } + + if (clientNum != -1 && cg_entities[clientNum].currentState.teamowner && !cg_entities[clientNum].isATST) + { + ci->torsoSkin = 0; + ci->bolt_rhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*flash1"); + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "Model_root", 0, 12, BONE_ANIM_OVERRIDE_LOOP, 1.0f, cg.time, -1, -1); + trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "l_clavical", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, cg.time); + trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "r_clavical", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, NULL, 0, cg.time); + + ci->bolt_lhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*flash2"); + ci->bolt_head = trap_G2API_AddBolt(ci->ghoul2Model, 0, "pelvis"); + } + else + { + ci->bolt_rhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*r_hand"); + + if (!trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", 0, 12, BONE_ANIM_OVERRIDE_LOOP, 1.0f, cg.time, -1, -1)) + { + badModel = qtrue; + } + + if (!trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "upper_lumbar", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, cg.time)) + { + badModel = qtrue; + } + + if (!trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "cranium", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, NULL, 0, cg.time)) + { + badModel = qtrue; + } + + ci->bolt_lhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*l_hand"); + ci->bolt_head = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*head_top"); + + ci->bolt_motion = trap_G2API_AddBolt(ci->ghoul2Model, 0, "Motion"); + + //We need a lower lumbar bolt for footsteps + ci->bolt_llumbar = trap_G2API_AddBolt(ci->ghoul2Model, 0, "lower_lumbar"); + + if (ci->bolt_rhand == -1 || ci->bolt_lhand == -1 || ci->bolt_head == -1 || ci->bolt_motion == -1 || ci->bolt_llumbar == -1) + { + badModel = qtrue; + } + + if (badModel) + { + goto retryModel; + } + } + +// ent->s.radius = 90; + + if (clientNum != -1) + { + if (cg_entities[clientNum].isATST) + { + animation_t *anim; + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.legsAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame + anim->numFrames-1; + + if (anim->loopFrames != -1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + firstFrame = anim->firstFrame; + } + + //rww - Set the animation again because it just got reset due to the model change + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", firstFrame, anim->firstFrame + anim->numFrames, flags, 1.0f, cg.time, -1, 150); + + cg_entities[clientNum].currentState.legsAnim = 0; + } + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.torsoAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame + anim->numFrames-1; + + if (anim->loopFrames != -1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + firstFrame = anim->firstFrame; + } + + //rww - Set the animation again because it just got reset due to the model change + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "lower_lumbar", anim->firstFrame + anim->numFrames-1, anim->firstFrame + anim->numFrames, flags, 1.0f, cg.time, -1, 150); + + cg_entities[clientNum].currentState.torsoAnim = 0; + } + } + + /* + if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2)) + { + trap_G2API_CleanGhoul2Models(&(cg_entities[clientNum].ghoul2)); + } + trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2); + */ + + cg_entities[clientNum].ghoul2weapon = NULL; + } + + Q_strncpyz (ci->teamName, teamName, sizeof(ci->teamName)); + + // Model icon for drawing the portrait on screen + ci->modelIcon = trap_R_RegisterShaderNoMip ( va ( "models/players/%s/icon_%s", modelName, skinName ) ); + + return qtrue; +} + +/* +==================== +CG_ColorFromString +==================== +*/ +static void CG_ColorFromString( const char *v, vec3_t color ) { + int val; + + VectorClear( color ); + + val = atoi( v ); + + if ( val < 1 || val > 7 ) { + VectorSet( color, 1, 1, 1 ); + return; + } + + if ( val & 1 ) { + color[2] = 1.0f; + } + if ( val & 2 ) { + color[1] = 1.0f; + } + if ( val & 4 ) { + color[0] = 1.0f; + } +} + +#define DEFAULT_FEMALE_SOUNDPATH "chars/mp_generic_female/misc"//"chars/tavion/misc" +#define DEFAULT_MALE_SOUNDPATH "chars/mp_generic_male/misc"//"chars/kyle/misc" +/* +=================== +CG_LoadClientInfo + +Load it now, taking the disk hits. +This will usually be deferred to a safe time +=================== +*/ +void CG_LoadClientInfo( clientInfo_t *ci ) { + const char *dir, *fallback; + int i, modelloaded; + const char *s; + int clientNum; + char teamname[MAX_QPATH]; + int fLen = 0; + char soundpath[MAX_QPATH]; + char soundName[1024]; + qboolean isFemale = qfalse; + fileHandle_t f; + + clientNum = ci - cgs.clientinfo; + + if (clientNum < 0 || clientNum >= MAX_CLIENTS) + { + clientNum = -1; + } + + ci->deferred = qfalse; + + /* + if (ci->team == TEAM_SPECTATOR) + { + // reset any existing players and bodies, because they might be in bad + // frames for this new model + clientNum = ci - cgs.clientinfo; + for ( i = 0 ; i < MAX_GENTITIES ; i++ ) { + if ( cg_entities[i].currentState.clientNum == clientNum + && cg_entities[i].currentState.eType == ET_PLAYER ) { + CG_ResetPlayerEntity( &cg_entities[i] ); + } + } + + if (ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) + { + trap_G2API_CleanGhoul2Models(&ci->ghoul2Model); + } + + return; + } + */ + + teamname[0] = 0; + if( cgs.gametype >= GT_TEAM) { + if( ci->team == TEAM_BLUE ) { + Q_strncpyz(teamname, cg_blueTeamName.string, sizeof(teamname) ); + } else { + Q_strncpyz(teamname, cg_redTeamName.string, sizeof(teamname) ); + } + } + if( teamname[0] ) { + strcat( teamname, "/" ); + } + modelloaded = qtrue; + if ( !CG_RegisterClientModelname( ci, ci->modelName, ci->skinName, teamname, clientNum ) ) { + //CG_Error( "CG_RegisterClientModelname( %s, %s, %s, %s %s ) failed", ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname ); + //rww - DO NOT error out here! Someone could just type in a nonsense model name and crash everyone's client. + //Give it a chance to load default model for this client instead. + + // fall back to default team name + if( cgs.gametype >= GT_TEAM) { + // keep skin name + if( ci->team == TEAM_BLUE ) { + Q_strncpyz(teamname, DEFAULT_BLUETEAM_NAME, sizeof(teamname) ); + } else { + Q_strncpyz(teamname, DEFAULT_REDTEAM_NAME, sizeof(teamname) ); + } + if ( !CG_RegisterClientModelname( ci, DEFAULT_TEAM_MODEL, ci->skinName, teamname, -1 ) ) { + CG_Error( "DEFAULT_TEAM_MODEL / skin (%s/%s) failed to register", DEFAULT_TEAM_MODEL, ci->skinName ); + } + } else { + if ( !CG_RegisterClientModelname( ci, DEFAULT_MODEL, "default", teamname, -1 ) ) { + CG_Error( "DEFAULT_MODEL (%s) failed to register", DEFAULT_MODEL ); + } + } + modelloaded = qfalse; + } + + if (clientNum != -1 && ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) + { + if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2)) + { + trap_G2API_CleanGhoul2Models(&cg_entities[clientNum].ghoul2); + } + trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2); + } + + ci->newAnims = qfalse; + if ( ci->torsoModel ) { + orientation_t tag; + // if the torso model has the "tag_flag" + if ( trap_R_LerpTag( &tag, ci->torsoModel, 0, 0, 1, "tag_flag" ) ) { + ci->newAnims = qtrue; + } + } + + // sounds + dir = ci->modelName; + fallback = DEFAULT_MALE_SOUNDPATH; //(cgs.gametype >= GT_TEAM) ? DEFAULT_TEAM_MODEL : DEFAULT_MODEL; + + if ( !ci->skinName || !Q_stricmp( "default", ci->skinName ) ) + {//try default sounds.cfg first + fLen = trap_FS_FOpenFile(va("models/players/%s/sounds.cfg", dir), &f, FS_READ); + if ( !f ) + {//no? Look for _default sounds.cfg + fLen = trap_FS_FOpenFile(va("models/players/%s/sounds_default.cfg", dir), &f, FS_READ); + } + } + else + {//use the .skin associated with this skin + fLen = trap_FS_FOpenFile(va("models/players/%s/sounds_%s.cfg", dir, ci->skinName), &f, FS_READ); + if ( !f ) + {//fall back to default sounds + fLen = trap_FS_FOpenFile(va("models/players/%s/sounds.cfg", dir), &f, FS_READ); + } + } + + soundpath[0] = 0; + + if (f) + { + i = 0; + + trap_FS_Read(soundpath, fLen, f); + + i = fLen; + + while (i >= 0 && soundpath[i] != '\n') + { + if (soundpath[i] == 'f') + { + isFemale = qtrue; + } + + i--; + } + + soundpath[i-1] = '\0'; + + trap_FS_FCloseFile(f); + } + + if (isFemale) + { + ci->gender = GENDER_FEMALE; + } + else + { + ci->gender = GENDER_MALE; + } + + for ( i = 0 ; i < MAX_CUSTOM_SOUNDS ; i++ ) { + s = cg_customSoundNames[i]; + if ( !s ) { + break; + } + + Com_sprintf(soundName, sizeof(soundName), "%s", s+1); + COM_StripExtension(soundName, soundName); + //strip the extension because we might want .mp3's + + //ci->sounds[i] = 0; + // if the model didn't load use the sounds of the default model + if (soundpath[0]) + { + ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", soundpath, soundName) ); + + if (!ci->sounds[i]) + { + if (isFemale) + { + ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", DEFAULT_FEMALE_SOUNDPATH, soundName) ); + } + else + { + ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", DEFAULT_MALE_SOUNDPATH, soundName) ); + } + } + } + else + { + if (modelloaded) + { + ci->sounds[i] = trap_S_RegisterSound( va("sound/chars/%s/misc/%s", dir, soundName) ); + } + + if ( !ci->sounds[i] ) + { + ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", fallback, soundName) ); + } + } + } + + ci->deferred = qfalse; + + // reset any existing players and bodies, because they might be in bad + // frames for this new model + clientNum = ci - cgs.clientinfo; + for ( i = 0 ; i < MAX_GENTITIES ; i++ ) { + if ( cg_entities[i].currentState.clientNum == clientNum + && cg_entities[i].currentState.eType == ET_PLAYER ) { + CG_ResetPlayerEntity( &cg_entities[i] ); + } + } +} + + + + +/* +====================== +CG_CopyClientInfoModel +====================== +*/ +static void CG_CopyClientInfoModel( clientInfo_t *from, clientInfo_t *to ) { + VectorCopy( from->headOffset, to->headOffset ); + to->footsteps = from->footsteps; + to->gender = from->gender; + + to->legsModel = from->legsModel; + to->legsSkin = from->legsSkin; + to->torsoModel = from->torsoModel; + to->torsoSkin = from->torsoSkin; + //to->headModel = from->headModel; + //to->headSkin = from->headSkin; + to->modelIcon = from->modelIcon; + + to->newAnims = from->newAnims; + + //to->ghoul2Model = from->ghoul2Model; + //rww - Trying to use the same ghoul2 pointer for two seperate clients == DISASTER + if (to->ghoul2Model && trap_G2_HaveWeGhoul2Models(to->ghoul2Model)) + { + trap_G2API_CleanGhoul2Models(&to->ghoul2Model); + } + if (from->ghoul2Model && trap_G2_HaveWeGhoul2Models(from->ghoul2Model)) + { + trap_G2API_DuplicateGhoul2Instance(from->ghoul2Model, &to->ghoul2Model); + } + + to->bolt_head = from->bolt_head; + to->bolt_lhand = from->bolt_lhand; + to->bolt_rhand = from->bolt_rhand; + to->bolt_motion = from->bolt_motion; + to->bolt_llumbar = from->bolt_llumbar; + +// to->ATST = from->ATST; + + memcpy( to->sounds, from->sounds, sizeof( to->sounds ) ); +} + +/* +====================== +CG_ScanForExistingClientInfo +====================== +*/ +static qboolean CG_ScanForExistingClientInfo( clientInfo_t *ci, int clientNum ) { + int i; + clientInfo_t *match; + + for ( i = 0 ; i < cgs.maxclients ; i++ ) { + match = &cgs.clientinfo[ i ]; + if ( !match->infoValid ) { + continue; + } + if ( match->deferred ) { + continue; + } + if ( !Q_stricmp( ci->modelName, match->modelName ) + && !Q_stricmp( ci->skinName, match->skinName ) +// && !Q_stricmp( ci->headModelName, match->headModelName ) +// && !Q_stricmp( ci->headSkinName, match->headSkinName ) + && !Q_stricmp( ci->blueTeam, match->blueTeam ) + && !Q_stricmp( ci->redTeam, match->redTeam ) + && (cgs.gametype < GT_TEAM || ci->team == match->team) + && match->ghoul2Model + && match->bolt_head) //if the bolts haven't been initialized, this "match" is useless to us + { + // this clientinfo is identical, so use it's handles + + ci->deferred = qfalse; + + //rww - Filthy hack. If this is actually the info already belonging to us, just reassign the pointer. + //Switching instances when not necessary produces small animation glitches. + //Actually, before, were we even freeing the instance attached to the old clientinfo before copying + //this new clientinfo over it? Could be a nasty leak possibility. (though this should remedy it in theory) + if (clientNum == i) + { + if (match->ghoul2Model && trap_G2_HaveWeGhoul2Models(match->ghoul2Model)) + { //The match has a valid instance (if it didn't, we'd probably already be fudged (^_^) at this state) + if (ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) + { //First kill the copy we have if we have one. (but it should be null) + trap_G2API_CleanGhoul2Models(&ci->ghoul2Model); + } + + VectorCopy( match->headOffset, ci->headOffset ); + ci->footsteps = match->footsteps; + ci->gender = match->gender; + + ci->legsModel = match->legsModel; + ci->legsSkin = match->legsSkin; + ci->torsoModel = match->torsoModel; + ci->torsoSkin = match->torsoSkin; + ci->modelIcon = match->modelIcon; + + ci->newAnims = match->newAnims; + + ci->bolt_head = match->bolt_head; + ci->bolt_lhand = match->bolt_lhand; + ci->bolt_rhand = match->bolt_rhand; + ci->bolt_motion = match->bolt_motion; + ci->bolt_llumbar = match->bolt_llumbar; + + memcpy( ci->sounds, match->sounds, sizeof( ci->sounds ) ); + + //We can share this pointer, because it already belongs to this client. + //The pointer itself and the ghoul2 instance is never actually changed, just passed between + //clientinfo structures. + ci->ghoul2Model = match->ghoul2Model; + } + } + else + { + CG_CopyClientInfoModel( match, ci ); + } + + return qtrue; + } + } + + // nothing matches, so defer the load + return qfalse; +} + +/* +====================== +CG_SetDeferredClientInfo + +We aren't going to load it now, so grab some other +client's info to use until we have some spare time. +====================== +*/ +static void CG_SetDeferredClientInfo( clientInfo_t *ci ) { + int i; + clientInfo_t *match; + + // if someone else is already the same models and skins we + // can just load the client info + for ( i = 0 ; i < cgs.maxclients ; i++ ) { + match = &cgs.clientinfo[ i ]; + if ( !match->infoValid || match->deferred ) { + continue; + } + if ( Q_stricmp( ci->skinName, match->skinName ) || + Q_stricmp( ci->modelName, match->modelName ) || +// Q_stricmp( ci->headModelName, match->headModelName ) || +// Q_stricmp( ci->headSkinName, match->headSkinName ) || + (cgs.gametype >= GT_TEAM && ci->team != match->team) ) { + continue; + } + // just load the real info cause it uses the same models and skins + CG_LoadClientInfo( ci ); + return; + } + + // if we are in teamplay, only grab a model if the skin is correct + if ( cgs.gametype >= GT_TEAM ) { + for ( i = 0 ; i < cgs.maxclients ; i++ ) { + match = &cgs.clientinfo[ i ]; + if ( !match->infoValid || match->deferred ) { + continue; + } + if ( Q_stricmp( ci->skinName, match->skinName ) || + (cgs.gametype >= GT_TEAM && ci->team != match->team) ) { + continue; + } + ci->deferred = qtrue; + CG_CopyClientInfoModel( match, ci ); + return; + } + // load the full model, because we don't ever want to show + // an improper team skin. This will cause a hitch for the first + // player, when the second enters. Combat shouldn't be going on + // yet, so it shouldn't matter + CG_LoadClientInfo( ci ); + return; + } + + // find the first valid clientinfo and grab its stuff + for ( i = 0 ; i < cgs.maxclients ; i++ ) { + match = &cgs.clientinfo[ i ]; + if ( !match->infoValid ) { + continue; + } + + ci->deferred = qtrue; + CG_CopyClientInfoModel( match, ci ); + return; + } + + // we should never get here... + CG_Printf( "CG_SetDeferredClientInfo: no valid clients!\n" ); + + CG_LoadClientInfo( ci ); +} + +/* +====================== +CG_NewClientInfo +====================== +*/ +void CG_NewClientInfo( int clientNum, qboolean entitiesInitialized ) { + clientInfo_t *ci; + clientInfo_t newInfo; + const char *configstring; + const char *v; + char *slash; + void *oldGhoul2; + int i = 0; + qboolean wasATST = qfalse; + + ci = &cgs.clientinfo[clientNum]; + + oldGhoul2 = ci->ghoul2Model; + + configstring = CG_ConfigString( clientNum + CS_PLAYERS ); + if ( !configstring[0] ) { + memset( ci, 0, sizeof( *ci ) ); + return; // player just left + } + + if (ci) + { + wasATST = ci->ATST; + } + + // build into a temp buffer so the defer checks can use + // the old value + memset( &newInfo, 0, sizeof( newInfo ) ); + + // isolate the player's name + v = Info_ValueForKey(configstring, "n"); + Q_strncpyz( newInfo.name, v, sizeof( newInfo.name ) ); + + // colors + v = Info_ValueForKey( configstring, "c1" ); + CG_ColorFromString( v, newInfo.color1 ); + + newInfo.icolor1 = atoi(v); + + v = Info_ValueForKey( configstring, "c2" ); + CG_ColorFromString( v, newInfo.color2 ); + + // bot skill + v = Info_ValueForKey( configstring, "skill" ); + newInfo.botSkill = atoi( v ); + + // handicap + v = Info_ValueForKey( configstring, "hc" ); + newInfo.handicap = atoi( v ); + + // wins + v = Info_ValueForKey( configstring, "w" ); + newInfo.wins = atoi( v ); + + // losses + v = Info_ValueForKey( configstring, "l" ); + newInfo.losses = atoi( v ); + + // team + v = Info_ValueForKey( configstring, "t" ); + newInfo.team = atoi( v ); + + // team task + v = Info_ValueForKey( configstring, "tt" ); + newInfo.teamTask = atoi(v); + + // team leader + v = Info_ValueForKey( configstring, "tl" ); + newInfo.teamLeader = atoi(v); + + v = Info_ValueForKey( configstring, "g_redteam" ); + Q_strncpyz(newInfo.redTeam, v, MAX_TEAMNAME); + + v = Info_ValueForKey( configstring, "g_blueteam" ); + Q_strncpyz(newInfo.blueTeam, v, MAX_TEAMNAME); + + // model + v = Info_ValueForKey( configstring, "model" ); + if ( cg_forceModel.integer ) { + // forcemodel makes everyone use a single model + // to prevent load hitches + char modelStr[MAX_QPATH]; + char *skin; + + if( cgs.gametype >= GT_TEAM ) { + Q_strncpyz( newInfo.modelName, DEFAULT_TEAM_MODEL, sizeof( newInfo.modelName ) ); + Q_strncpyz( newInfo.skinName, "default", sizeof( newInfo.skinName ) ); + } else { + trap_Cvar_VariableStringBuffer( "model", modelStr, sizeof( modelStr ) ); + if ( ( skin = strchr( modelStr, '/' ) ) == NULL) { + skin = "default"; + } else { + *skin++ = 0; + } + + Q_strncpyz( newInfo.skinName, skin, sizeof( newInfo.skinName ) ); + Q_strncpyz( newInfo.modelName, modelStr, sizeof( newInfo.modelName ) ); + } + + if ( cgs.gametype >= GT_TEAM ) { + // keep skin name + slash = strchr( v, '/' ); + if ( slash ) { + Q_strncpyz( newInfo.skinName, slash + 1, sizeof( newInfo.skinName ) ); + } + } + } else { + Q_strncpyz( newInfo.modelName, v, sizeof( newInfo.modelName ) ); + + slash = strchr( newInfo.modelName, '/' ); + if ( !slash ) { + // modelName didn not include a skin name + Q_strncpyz( newInfo.skinName, "default", sizeof( newInfo.skinName ) ); + } else { + Q_strncpyz( newInfo.skinName, slash + 1, sizeof( newInfo.skinName ) ); + // truncate modelName + *slash = 0; + } + } + + // head model +/* + v = Info_ValueForKey( configstring, "hmodel" ); + if ( cg_forceModel.integer ) { + // forcemodel makes everyone use a single model + // to prevent load hitches + char modelStr[MAX_QPATH]; + char *skin; + + if( cgs.gametype >= GT_TEAM ) { + Q_strncpyz( newInfo.headModelName, DEFAULT_TEAM_MODEL, sizeof( newInfo.headModelName ) ); + Q_strncpyz( newInfo.headSkinName, "default", sizeof( newInfo.headSkinName ) ); + } else { + trap_Cvar_VariableStringBuffer( "headmodel", modelStr, sizeof( modelStr ) ); + if ( ( skin = strchr( modelStr, '/' ) ) == NULL) { + skin = "default"; + } else { + *skin++ = 0; + } + + Q_strncpyz( newInfo.headSkinName, skin, sizeof( newInfo.headSkinName ) ); + Q_strncpyz( newInfo.headModelName, modelStr, sizeof( newInfo.headModelName ) ); + } + + if ( cgs.gametype >= GT_TEAM ) { + // keep skin name + slash = strchr( v, '/' ); + if ( slash ) { + Q_strncpyz( newInfo.headSkinName, slash + 1, sizeof( newInfo.headSkinName ) ); + } + } + } else { + Q_strncpyz( newInfo.headModelName, v, sizeof( newInfo.headModelName ) ); + + slash = strchr( newInfo.headModelName, '/' ); + if ( !slash ) { + // modelName didn not include a skin name + Q_strncpyz( newInfo.headSkinName, "default", sizeof( newInfo.headSkinName ) ); + } else { + Q_strncpyz( newInfo.headSkinName, slash + 1, sizeof( newInfo.headSkinName ) ); + // truncate modelName + *slash = 0; + } + } +*/ + // force powers + v = Info_ValueForKey( configstring, "forcepowers" ); + Q_strncpyz( newInfo.forcePowers, v, sizeof( newInfo.forcePowers ) ); + + newInfo.ATST = wasATST; + + if (cgs.gametype >= GT_TEAM && !cgs.jediVmerc ) + { + if (newInfo.team == TEAM_RED) + { + strcpy(newInfo.skinName, "red"); +// strcpy(newInfo.headSkinName, "red"); + } + if (newInfo.team == TEAM_BLUE) + { + strcpy(newInfo.skinName, "blue"); +// strcpy(newInfo.headSkinName, "blue"); + } + } + + // scan for an existing clientinfo that matches this modelname + // so we can avoid loading checks if possible + if ( !CG_ScanForExistingClientInfo( &newInfo, clientNum ) ) { + qboolean forceDefer; + + forceDefer = trap_MemoryRemaining() < 4000000; + + // if we are defering loads, just have it pick the first valid + if (cg.snap && cg.snap->ps.clientNum == clientNum && !forceDefer) + { //rww - don't defer your own client info ever, unless really low on memory + CG_LoadClientInfo( &newInfo ); + } + else if ( forceDefer || ( cg_deferPlayers.integer && !cg_buildScript.integer && !cg.loading ) ) { + // keep whatever they had if it won't violate team skins + CG_SetDeferredClientInfo( &newInfo ); + // if we are low on memory, leave them with this model + if ( forceDefer ) { + CG_Printf( "Memory is low. Using deferred model.\n" ); + newInfo.deferred = qfalse; + } + } else { + CG_LoadClientInfo( &newInfo ); + } + } + + // replace whatever was there with the new one + newInfo.infoValid = qtrue; + if (ci->ghoul2Model && + ci->ghoul2Model != newInfo.ghoul2Model && + trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) + { //We must kill this instance before we remove our only pointer to it from the cgame. + //Otherwise we will end up with extra instances all over the place, I think. + trap_G2API_CleanGhoul2Models(&ci->ghoul2Model); + } + *ci = newInfo; + + //force a weapon change anyway, for all clients being rendered to the current client + while (i < MAX_CLIENTS) + { + cg_entities[i].ghoul2weapon = NULL; + i++; + } + + // Check if the ghoul2 model changed in any way. This is safer than assuming we have a legal cent shile loading info. + if (entitiesInitialized && ci->ghoul2Model && (oldGhoul2 != ci->ghoul2Model)) + { // Copy the new ghoul2 model to the centity. + animation_t *anim; + centity_t *cent = &cg_entities[clientNum]; + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.legsAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame; + int setFrame = -1; + float animSpeed = 50.0f / anim->frameLerp; + + if (anim->loopFrames != -1) + { + flags |= BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->pe.legs.frame >= anim->firstFrame && cent->pe.legs.frame <= (anim->firstFrame + anim->numFrames)) + { + setFrame = cent->pe.legs.frame; + } + + //rww - Set the animation again because it just got reset due to the model change + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); + + cg_entities[clientNum].currentState.legsAnim = 0; + } + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.torsoAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame; + int setFrame = -1; + float animSpeed = 50.0f / anim->frameLerp; + + if (anim->loopFrames != -1) + { + flags |= BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->pe.torso.frame >= anim->firstFrame && cent->pe.torso.frame <= (anim->firstFrame + anim->numFrames)) + { + setFrame = cent->pe.torso.frame; + } + + //rww - Set the animation again because it just got reset due to the model change + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "lower_lumbar", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); + + cg_entities[clientNum].currentState.torsoAnim = 0; + } + + if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2)) + { + trap_G2API_CleanGhoul2Models(&cg_entities[clientNum].ghoul2); + } + trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2); + } +} + + +qboolean cgQueueLoad = qfalse; +/* +====================== +CG_ActualLoadDeferredPlayers + +Called at the beginning of CG_Player if cgQueueLoad is set. +====================== +*/ +void CG_ActualLoadDeferredPlayers( void ) +{ + int i; + clientInfo_t *ci; + + // scan for a deferred player to load + for ( i = 0, ci = cgs.clientinfo ; i < cgs.maxclients ; i++, ci++ ) { + if ( ci->infoValid && ci->deferred ) { + // if we are low on memory, leave it deferred + if ( trap_MemoryRemaining() < 4000000 ) { + CG_Printf( "Memory is low. Using deferred model.\n" ); + ci->deferred = qfalse; + continue; + } + CG_LoadClientInfo( ci ); +// break; + } + } +} + +/* +====================== +CG_LoadDeferredPlayers + +Called each frame when a player is dead +and the scoreboard is up +so deferred players can be loaded +====================== +*/ +void CG_LoadDeferredPlayers( void ) { + cgQueueLoad = qtrue; +} + +/* +============================================================================= + +PLAYER ANIMATION + +============================================================================= +*/ + +static qboolean CG_FirstAnimFrame(lerpFrame_t *lf, qboolean torsoOnly, float speedScale); + +qboolean CG_InRoll( centity_t *cent ) +{ + switch ( (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) ) + { + case BOTH_ROLL_F: + case BOTH_ROLL_B: + case BOTH_ROLL_R: + case BOTH_ROLL_L: + if ( cent->pe.legs.animationTime > cg.time ) + { + return qtrue; + } + break; + } + return qfalse; +} + +qboolean CG_InRollAnim( centity_t *cent ) +{ + switch ( (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) ) + { + case BOTH_ROLL_F: + case BOTH_ROLL_B: + case BOTH_ROLL_R: + case BOTH_ROLL_L: + return qtrue; + } + return qfalse; +} + +/* +=============== +CG_SetLerpFrameAnimation + +may include ANIM_TOGGLEBIT +=============== +*/ +static void CG_SetLerpFrameAnimation( centity_t *cent, clientInfo_t *ci, lerpFrame_t *lf, int newAnimation, float animSpeedMult, qboolean torsoOnly) { + animation_t *anim; + float animSpeed; + int flags=BONE_ANIM_OVERRIDE_FREEZE; + int oldAnim = -1; + int blendTime = 150; + + if (cent->currentState.number < MAX_CLIENTS && + cent->currentState.teamowner && + !cent->isATST) + { + return; + } + + if (cent->isATST) + { + vec3_t testVel; + float fVel; + + if (lf->animationNumber == BOTH_RUN1 || + lf->animationNumber == BOTH_WALK1 || + lf->animationNumber == BOTH_WALKBACK1 || + lf->animationNumber == BOTH_TURN_LEFT1 || + lf->animationNumber == BOTH_TURN_RIGHT1) + { + if (cent->atstFootClang < cg.time) + { + if (rand() & 1) + { + trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/chars/atst/ATSTstep1.wav")); + } + else + { + trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/chars/atst/ATSTstep2.wav")); + } + + cent->atstFootClang = cg.time + 1300; + } + } + + VectorCopy(cent->currentState.pos.trDelta, testVel); + + fVel = VectorNormalize(testVel); + + if (cent->currentState.eFlags & EF_DEAD) + { + if (lf->animationNumber != BOTH_DEATH1 && + lf->animationNumber != BOTH_DEAD1) + { + trap_S_StartSound(NULL, cent->currentState.number, CHAN_BODY, trap_S_RegisterSound("sound/chars/atst/ATSTcrash.wav")); + } + newAnimation = BOTH_DEATH1; + } + else if (fVel > 0) + { + qboolean doNotSet = qfalse; + + if (fVel > 250) + { + animSpeedMult = 1.2; + } + else if (fVel > 200) + { + animSpeedMult = 1; + } + else if (fVel > 100) + { + animSpeedMult = 0.9; + } + else if (fVel > 0) + { + animSpeedMult = 0.8; + } + else + { + doNotSet = qtrue; + } + + if (!doNotSet) + { + if ((cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN1 || + (cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_WALKBACK1 || + (cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_WALK1) + { + newAnimation = (cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT); + } + else + { + newAnimation = BOTH_RUN1; + } + } + } + else if ((cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN1START) + { + if (lf->animationNumber != BOTH_RUN1START) + { + trap_S_StartSound(NULL, cent->currentState.number, CHAN_BODY, trap_S_RegisterSound("sound/chars/atst/ATSTstart.wav")); + cent->atstFootClang = cg.time + 650; + } + newAnimation = BOTH_RUN1START; + } + else if (cent->pe.legs.yawing && + (cent->pe.legs.yawSwingDif < -20 || cent->pe.legs.yawSwingDif > 20)) + { + if (cent->pe.legs.yawSwingDif > 0) + { + newAnimation = BOTH_TURN_LEFT1;//BOTH_RUN1; + if (lf->animationNumber != BOTH_TURN_LEFT1) + { + cent->atstFootClang = cg.time + 500; + } + } + else + { + newAnimation = BOTH_TURN_RIGHT1;//BOTH_RUN1; + if (lf->animationNumber != BOTH_TURN_RIGHT1) + { + cent->atstFootClang = cg.time + 500; + } + } + animSpeedMult = 0.7; + } + else + { + newAnimation = BOTH_STAND1; + } + + if (newAnimation != BOTH_STAND1 && newAnimation != BOTH_RUN1 && + newAnimation != BOTH_RUN1START && newAnimation != BOTH_WALK1 && + newAnimation != BOTH_WALKBACK1 && newAnimation != BOTH_DEATH1 && + newAnimation != BOTH_DEAD1 && newAnimation != BOTH_TURN_RIGHT1 && + newAnimation != BOTH_TURN_LEFT1 && newAnimation != BOTH_PAIN1 && + newAnimation != BOTH_PAIN2) + { //not a valid anim for the ATST.. + newAnimation = BOTH_RUN1; + } + + if (lf->animationNumber == newAnimation) + { + return; + } + } + + oldAnim = lf->animationNumber; + + lf->animationNumber = newAnimation; + newAnimation &= ~ANIM_TOGGLEBIT; + + if ( newAnimation < 0 || newAnimation >= MAX_TOTALANIMATIONS ) { + CG_Error( "Bad animation number: %i", newAnimation ); + } + + anim = &bgGlobalAnimations[ newAnimation ]; + + lf->animation = anim; + lf->animationTime = lf->frameTime + anim->initialLerp; + + if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { + CG_Printf( "%d: %d Anim: %i, '%s'\n", cg.time, cent->currentState.clientNum, newAnimation, GetStringForID(animTable, newAnimation)); + } + + if (cent->ghoul2) + { + animSpeed = 50.0f / anim->frameLerp; + if (lf->animation->loopFrames != -1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->isATST) + { + if (animSpeed < 0.3) + { + animSpeed = 0.3; + } + + if (newAnimation == BOTH_WALKBACK1) + { + animSpeed = 0.8; + } + + if (newAnimation != BOTH_DEATH1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + } + } + + if (cg_animBlend.integer) + { + flags |= BONE_ANIM_BLEND; + } + + if (!cent->isATST) + { + if (/*BG_FlippingAnim(newAnimation) ||*/ BG_InDeathAnim(newAnimation)) + { + flags &= ~BONE_ANIM_BLEND; + } + else if ( oldAnim != -1 && + (/*BG_FlippingAnim(oldAnim) ||*/ BG_InDeathAnim(oldAnim)) ) + { + flags &= ~BONE_ANIM_BLEND; + } + + if (flags & BONE_ANIM_BLEND) + { + if (BG_FlippingAnim(newAnimation)) + { + blendTime = 200; + } + else if ( oldAnim != -1 && + (BG_FlippingAnim(oldAnim)) ) + { + blendTime = 200; + } + } + } + + animSpeed *= animSpeedMult; + + BG_SaberStartTransAnim(cent->currentState.fireflag, newAnimation, &animSpeed); + + if (torsoOnly) + { + lf->animationTorsoSpeed = animSpeedMult; + } + else + { + lf->animationSpeed = animSpeedMult; + } + + if (cent->isATST) + { + int atstBlend = 400; + + if (torsoOnly) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "pelvis", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); + } + } + else + { + int beginFrame = anim->firstFrame; + + if (torsoOnly) + { + if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && cent->pe.legs.frame >= anim->firstFrame && cent->pe.legs.frame <= (anim->firstFrame + anim->numFrames)) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "lower_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed,cg.time, cent->pe.legs.frame, blendTime); + beginFrame = cent->pe.legs.frame; + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "lower_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed,cg.time, -1, blendTime); + } + cgs.clientinfo[cent->currentState.number].torsoAnim = newAnimation; + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); + //cgs.clientinfo[cent->currentState.number].torsoAnim = newAnimation; + cgs.clientinfo[cent->currentState.number].legsAnim = newAnimation; + } + + if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation) + { + if (beginFrame != anim->firstFrame) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, beginFrame, blendTime); + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); + } + } + } + } +} + + +/* +=============== +CG_FirstAnimFrame + +Returns true if the lerpframe is on its first frame of animation. +Otherwise false. + +This is used to scale an animation into higher-speed without restarting +the animation before it completes at normal speed, in the case of a looping +animation (such as the leg running anim). +=============== +*/ +static qboolean CG_FirstAnimFrame(lerpFrame_t *lf, qboolean torsoOnly, float speedScale) +{ + if (torsoOnly) + { + if (lf->animationTorsoSpeed == speedScale) + { + return qfalse; + } + } + else + { + if (lf->animationSpeed == speedScale) + { + return qfalse; + } + } + + if (lf->animation->numFrames < 2) + { + return qtrue; + } + + if (lf->animation->firstFrame == lf->frame) + { + return qtrue; + } + + return qfalse; +} + +/* +=============== +CG_InWalkingAnim + +Returns last frame to step on if the animation on the frame is desired for playing footstep sounds, +otherwise 0 +=============== +*/ +int CG_InWalkingAnim(int animNum) +{ + int anim = animNum; + + anim &= ~ANIM_TOGGLEBIT; + + if (anim == BOTH_WALL_RUN_RIGHT || + anim == BOTH_WALL_RUN_LEFT) + { + return 8; + } + + if (anim >= BOTH_WALK1 && + anim <= BOTH_RUNAWAY1) + { + if (anim == BOTH_RUN1) + { + return 18;//12; + } + else + { + //return 9; + return 18; + } + } + + if (anim >= BOTH_WALKBACK1 && + anim <= BOTH_RUNBACK2) + { + if (anim == BOTH_WALKBACK1) + { + return 18; + } + else + { + return 9; + } + } + + if (anim >= LEGS_WALKBACK1 && + anim <= LEGS_RUNBACK2) + { + if (anim == LEGS_WALKBACK1) + { + return 18; + } + else + { + return 9; + } + } + + return qfalse; +} + +#define FOOTSTEP_GENERIC 1 +#define FOOTSTEP_METAL 2 + +static int CG_FootstepForSurface( centity_t *cent, int skip ) +{ + trace_t tr; + vec3_t org, dOrg, legDir, bAngles; + vec3_t playerMins = {-15, -15, DEFAULT_MINS_2}; + vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; + mdxaBone_t boltMatrix; + +// VectorCopy(ent->lerpOrigin, org); +// VectorCopy(org, dOrg); +// dOrg[2] -= 64; //should never have to go further than this because we're already onground + + //We are now tracing off of a bolt point for footsteps, so that if we happen to be walking sideways on a wall we will + //still play step sounds properly. + + VectorCopy(cent->lerpAngles, bAngles); + bAngles[PITCH] = 0; + + trap_G2API_GetBoltMatrix_NoReconstruct( cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_llumbar, &boltMatrix, bAngles, cent->lerpOrigin, cg.time, /*cgs.gameModels*/0, cent->modelScale); + trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, ORIGIN, org ); + trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, legDir ); + + dOrg[0] = org[0] + legDir[0]*64; + dOrg[1] = org[1] + legDir[1]*64; + dOrg[2] = org[2] + legDir[2]*64; + + //CG_TestLine(org, dOrg, 100, 0x0000ff, 3); + + CG_Trace(&tr, org, playerMins, playerMaxs, dOrg, skip, MASK_PLAYERSOLID); + + if (tr.fraction == 1) + { + return 0; + } + + if ( tr.surfaceFlags & SURF_NOSTEPS ) + { + return 0; + } + + if ( tr.surfaceFlags & SURF_METALSTEPS ) + { + return FOOTSTEP_METAL; + } + + return FOOTSTEP_GENERIC; +} + +void CG_FootStep(centity_t *cent, clientInfo_t *ci, int anim) +{ + int groundType; + + if ((anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || + (anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) + { + groundType = FOOTSTEP_GENERIC; + goto skipCheck; + } + + if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) + { + return; + } + +skipCheck: + groundType = CG_FootstepForSurface(cent, cent->currentState.number); + +//skipCheck: + + if (!groundType) + { + return; + } + + switch (groundType) + { + case FOOTSTEP_GENERIC: + trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, + cgs.media.footsteps[ ci->footsteps ][rand()&3] ); + break; + case FOOTSTEP_METAL: + trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_METAL ][rand()&3] ); + break; + default: + break; + } +} +/* +=============== +CG_RunLerpFrame + +Sets cg.snap, cg.oldFrame, and cg.backlerp +cg.time should be between oldFrameTime and frameTime after exit +=============== +*/ +static void CG_RunLerpFrame( centity_t *cent, clientInfo_t *ci, lerpFrame_t *lf, int newAnimation, float speedScale, qboolean torsoOnly) +{ + int f, numFrames; + animation_t *anim; + + // debugging tool to get no animations + if ( cg_animSpeed.integer == 0 ) { + lf->oldFrame = lf->frame = lf->backlerp = 0; + return; + } + + // see if the animation sequence is switching + if (cent->currentState.forceFrame) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; //|BONE_ANIM_BLEND; + float animSpeed = 1.0f; + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "lower_lumbar", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + + lf->animationNumber = 0; + } + else if ( (newAnimation != lf->animationNumber || !lf->animation) || (CG_FirstAnimFrame(lf, torsoOnly, speedScale)) ) + { + CG_SetLerpFrameAnimation( cent, ci, lf, newAnimation, speedScale, torsoOnly); + } + else if (cent->isATST) + { + if (cent->pe.legs.yawing != !lf->torsoYawing) + { + CG_SetLerpFrameAnimation( cent, ci, lf, newAnimation, speedScale, torsoOnly); + lf->torsoYawing = cent->pe.legs.yawing; + } + } + + // if we have passed the current frame, move it to + // oldFrame and calculate a new frame + if ( cg.time >= lf->frameTime ) { + if (lf->oldFrame != lf->frame && + lf == &(cent->pe.legs)) + { + int addFinalFrame = CG_InWalkingAnim(lf->animationNumber); //9; + + if (!cent->isATST && + ((lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || (lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) && + addFinalFrame) + { + if ( lf->frame >= (lf->animation->firstFrame+2) && + lf->oldFrame < (lf->animation->firstFrame+2)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && + lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+12) && + lf->oldFrame < (lf->animation->firstFrame+12)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+16) && + lf->oldFrame < (lf->animation->firstFrame+16)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) + { //missed one + CG_FootStep(cent, ci, lf->animationNumber); + } + } + else if (addFinalFrame && !cent->isATST) + { + if ( lf->frame >= (lf->animation->firstFrame+3) && + lf->oldFrame < (lf->animation->firstFrame+3)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && + lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) + { + CG_FootStep(cent, ci, lf->animationNumber); + } + else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) + { //missed one + CG_FootStep(cent, ci, lf->animationNumber); + } + } + } + + lf->oldFrame = lf->frame; + lf->oldFrameTime = lf->frameTime; + + // get the next frame based on the animation + anim = lf->animation; + if ( !anim->frameLerp ) { + return; // shouldn't happen + } + + if ( cg.time < lf->animationTime ) { + lf->frameTime = lf->animationTime; // initial lerp + } else { + lf->frameTime = lf->oldFrameTime + anim->frameLerp; + } + f = ( lf->frameTime - lf->animationTime ) / anim->frameLerp; + f *= speedScale; // adjust for haste, etc + + numFrames = anim->numFrames; + if (anim->flipflop) { + numFrames *= 2; + } + if ( f >= numFrames ) { + f -= numFrames; + if ( anim->loopFrames != -1 ) //Before 0 meant no loop + { + if(anim->numFrames - anim->loopFrames == 0) + { + f %= anim->numFrames; + } + else + { + f %= (anim->numFrames - anim->loopFrames); + } + f += anim->loopFrames; + } + else + { + f = numFrames - 1; + // the animation is stuck at the end, so it + // can immediately transition to another sequence + lf->frameTime = cg.time; + } + } + if ( anim->reversed ) { + lf->frame = anim->firstFrame + anim->numFrames - 1 - f; + } + else if (anim->flipflop && f>=anim->numFrames) { + lf->frame = anim->firstFrame + anim->numFrames - 1 - (f%anim->numFrames); + } + else { + lf->frame = anim->firstFrame + f; + } + if ( cg.time > lf->frameTime ) { + lf->frameTime = cg.time; + if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { + CG_Printf( "Clamp lf->frameTime\n"); + } + } + } + + if ( lf->frameTime > cg.time + 200 ) { + lf->frameTime = cg.time; + } + + if ( lf->oldFrameTime > cg.time ) { + lf->oldFrameTime = cg.time; + } + // calculate current lerp value + if ( lf->frameTime == lf->oldFrameTime ) { + lf->backlerp = 0; + } else { + lf->backlerp = 1.0 - (float)( cg.time - lf->oldFrameTime ) / ( lf->frameTime - lf->oldFrameTime ); + } +} + + +/* +=============== +CG_ClearLerpFrame +=============== +*/ +static void CG_ClearLerpFrame( centity_t *cent, clientInfo_t *ci, lerpFrame_t *lf, int animationNumber, qboolean torsoOnly) { + lf->frameTime = lf->oldFrameTime = cg.time; + CG_SetLerpFrameAnimation( cent, ci, lf, animationNumber, 1, torsoOnly ); + lf->oldFrame = lf->frame = lf->animation->firstFrame; +} + + +/* +=============== +CG_PlayerAnimation +=============== +*/ +static void CG_PlayerAnimation( centity_t *cent, int *legsOld, int *legs, float *legsBackLerp, + int *torsoOld, int *torso, float *torsoBackLerp ) { + clientInfo_t *ci; + int clientNum; + float speedScale; + + clientNum = cent->currentState.clientNum; + + if ( cg_noPlayerAnims.integer ) { + *legsOld = *legs = *torsoOld = *torso = 0; + return; + } + + if (cent->currentState.forcePowersActive & (1 << FP_RAGE)) + { + speedScale = 1.3; + } + else if (cent->currentState.forcePowersActive & (1 << FP_SPEED)) + { + speedScale = 1.7; + } + else + { + speedScale = 1; + } + + ci = &cgs.clientinfo[ clientNum ]; + + // do the shuffle turn frames locally + if(0){// if ( cent->pe.legs.yawing && ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == TORSO_WEAPONREADY3) { + CG_RunLerpFrame( cent, ci, ¢->pe.legs, LEGS_TURN1, speedScale, qfalse); + } else { + CG_RunLerpFrame( cent, ci, ¢->pe.legs, cent->currentState.legsAnim, speedScale, qfalse); + } + + if (!(cent->currentState.forcePowersActive & (1 << FP_RAGE))) + { //don't affect torso anim speed unless raged + speedScale = 1; + } + else + { + speedScale = 1.7; + } + + *legsOld = cent->pe.legs.oldFrame; + *legs = cent->pe.legs.frame; + *legsBackLerp = cent->pe.legs.backlerp; + + CG_RunLerpFrame( cent, ci, ¢->pe.torso, cent->currentState.torsoAnim, speedScale, qtrue ); + + *torsoOld = cent->pe.torso.oldFrame; + *torso = cent->pe.torso.frame; + *torsoBackLerp = cent->pe.torso.backlerp; +} + + + + +/* +============================================================================= + +PLAYER ANGLES + +============================================================================= +*/ + +/* +================== +CG_SwingAngles +================== +*/ +static float CG_SwingAngles( float destination, float swingTolerance, float clampTolerance, + float speed, float *angle, qboolean *swinging ) { + float swing; + float move; + float scale; + + if ( !*swinging ) { + // see if a swing should be started + swing = AngleSubtract( *angle, destination ); + if ( swing > swingTolerance || swing < -swingTolerance ) { + *swinging = qtrue; + } + } + + if ( !*swinging ) { + return 0; + } + + // modify the speed depending on the delta + // so it doesn't seem so linear + swing = AngleSubtract( destination, *angle ); + scale = fabs( swing ); + if ( scale < swingTolerance * 0.5 ) { + scale = 0.5; + } else if ( scale < swingTolerance ) { + scale = 1.0; + } else { + scale = 2.0; + } + + // swing towards the destination angle + if ( swing >= 0 ) { + move = cg.frametime * scale * speed; + if ( move >= swing ) { + move = swing; + *swinging = qfalse; + } + *angle = AngleMod( *angle + move ); + } else if ( swing < 0 ) { + move = cg.frametime * scale * -speed; + if ( move <= swing ) { + move = swing; + *swinging = qfalse; + } + *angle = AngleMod( *angle + move ); + } + + // clamp to no more than tolerance + swing = AngleSubtract( destination, *angle ); + if ( swing > clampTolerance ) { + *angle = AngleMod( destination - (clampTolerance - 1) ); + } else if ( swing < -clampTolerance ) { + *angle = AngleMod( destination + (clampTolerance - 1) ); + } + + return swing; +} + +/* +================== +CG_SwingAngles +================== +*/ +static float CG_SwingAnglesATST( centity_t *cent, float destination, float swingTolerance, float clampTolerance, + float speed, float *angle, qboolean *swinging ) { + float swing; + float move; + float scale; + + if ( !*swinging ) { + // see if a swing should be started + swing = AngleSubtract( *angle, destination ); + if ( swing > swingTolerance || swing < -swingTolerance ) { + *swinging = qtrue; + } + } + + if ( !*swinging ) { + return 0; + } + + // modify the speed depending on the delta + // so it doesn't seem so linear + swing = AngleSubtract( destination, *angle ); + scale = fabs( swing ); + if ( scale < swingTolerance * 0.5 ) { + scale = 0.5; + } else if ( scale < swingTolerance ) { + scale = 1.0; + } else { + scale = 2.0; + } + + if (swing < 10 && swing > -10) + { + cent->atstSwinging = 0; + } + if (swing < 60 && swing > -60 && !cent->atstSwinging) + { + return 0; + } + + cent->atstSwinging = 1; + + // swing towards the destination angle + if ( swing >= 0 ) { + move = cg.frametime * scale * speed; + if ( move >= swing ) { + move = swing; + *swinging = qfalse; + } + *angle = AngleMod( *angle + move ); + } else if ( swing < 0 ) { + move = cg.frametime * scale * -speed; + if ( move <= swing ) { + move = swing; + *swinging = qfalse; + } + *angle = AngleMod( *angle + move ); + } + + // clamp to no more than tolerance + swing = AngleSubtract( destination, *angle ); + if ( swing > clampTolerance ) { + *angle = AngleMod( destination - (clampTolerance - 1) ); + } else if ( swing < -clampTolerance ) { + *angle = AngleMod( destination + (clampTolerance - 1) ); + } + + return swing; +} + +/* +================= +CG_AddPainTwitch +================= +*/ +static void CG_AddPainTwitch( centity_t *cent, vec3_t torsoAngles ) { + int t; + float f; + + t = cg.time - cent->pe.painTime; + if ( t >= PAIN_TWITCH_TIME ) { + return; + } + + f = 1.0 - (float)t / PAIN_TWITCH_TIME; + + if ( cent->pe.painDirection ) { + torsoAngles[ROLL] += 20 * f; + } else { + torsoAngles[ROLL] -= 20 * f; + } +} + + +typedef struct boneAngleParms_s { + void *ghoul2; + int modelIndex; + char *boneName; + vec3_t angles; + int flags; + int up; + int right; + int forward; + qhandle_t *modelList; + int blendTime; + int currentTime; + + qboolean refreshSet; +} boneAngleParms_t; + +boneAngleParms_t cgBoneAnglePostSet; + +void CG_G2SetBoneAngles(void *ghoul2, int modelIndex, const char *boneName, const vec3_t angles, const int flags, + const int up, const int right, const int forward, qhandle_t *modelList, + int blendTime , int currentTime ) +{ //we want to hold off on setting the bone angles until the end of the frame, because every time we set + //them the entire skeleton has to be reconstructed. +#if 0 + //This function should ONLY be called from CG_Player() or a function that is called only within CG_Player(). + //At the end of the frame we will check to use this information to call SetBoneAngles + memset(&cgBoneAnglePostSet, 0, sizeof(cgBoneAnglePostSet)); + cgBoneAnglePostSet.ghoul2 = ghoul2; + cgBoneAnglePostSet.modelIndex = modelIndex; + cgBoneAnglePostSet.boneName = (char *)boneName; + + cgBoneAnglePostSet.angles[0] = angles[0]; + cgBoneAnglePostSet.angles[1] = angles[1]; + cgBoneAnglePostSet.angles[2] = angles[2]; + + cgBoneAnglePostSet.flags = flags; + cgBoneAnglePostSet.up = up; + cgBoneAnglePostSet.right = right; + cgBoneAnglePostSet.forward = forward; + cgBoneAnglePostSet.modelList = modelList; + cgBoneAnglePostSet.blendTime = blendTime; + cgBoneAnglePostSet.currentTime = currentTime; + + cgBoneAnglePostSet.refreshSet = qtrue; +#endif + //Unfortunately the above doesn't really work. + trap_G2API_SetBoneAngles(ghoul2, modelIndex, boneName, angles, flags, up, right, forward, modelList, + blendTime, currentTime); +} + +qboolean CG_InKnockDown( int anim ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_KNOCKDOWN1: + case BOTH_KNOCKDOWN2: + case BOTH_KNOCKDOWN3: + case BOTH_KNOCKDOWN4: + case BOTH_KNOCKDOWN5: + return qtrue; + break; + case BOTH_GETUP1: + case BOTH_GETUP2: + case BOTH_GETUP3: + case BOTH_GETUP4: + case BOTH_GETUP5: + case BOTH_FORCE_GETUP_F1: + case BOTH_FORCE_GETUP_F2: + case BOTH_FORCE_GETUP_B1: + case BOTH_FORCE_GETUP_B2: + case BOTH_FORCE_GETUP_B3: + case BOTH_FORCE_GETUP_B4: + case BOTH_FORCE_GETUP_B5: + return qtrue; + break; + } + return qfalse; +} + +void CG_G2ClientSpineAngles( centity_t *cent, vec3_t viewAngles, const vec3_t angles, vec3_t thoracicAngles, vec3_t ulAngles, vec3_t llAngles ) +{ + float legDif = 0; +// cent->pe.torso.pitchAngle = viewAngles[PITCH]; + viewAngles[YAW] = AngleDelta( cent->lerpAngles[YAW], angles[YAW] ); + legDif = viewAngles[YAW]; +// cent->pe.torso.yawAngle = viewAngles[YAW]; + + /* + if ( !BG_FlippingAnim( cent->currentState.legsAnim ) + && !BG_SpinningSaberAnim( cent->currentState.legsAnim ) + && !BG_SpinningSaberAnim( cent->currentState.torsoAnim ) + && !BG_SaberInSpecial(cent->currentState.saberMove) + && cent->currentState.legsAnim != cent->currentState.torsoAnim )//NOTE: presumes your legs & torso are on the same frame, though they *should* be because PM_SetAnimFinal tries to keep them in synch + */ + if ( !BG_FlippingAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InDeathAnim(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && + !BG_InDeathAnim(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && + !CG_InRoll(cent) && + !CG_InRollAnim(cent) && + !BG_SaberInSpecial(cent->currentState.saberMove) && + !BG_SaberInSpecialAttack(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && + + !CG_InKnockDown(cent->currentState.torsoAnim) && + !CG_InKnockDown(cent->currentState.legsAnim) && + !CG_InKnockDown(cgs.clientinfo[cent->currentState.number].torsoAnim) && + !CG_InKnockDown(cgs.clientinfo[cent->currentState.number].legsAnim) && + + !BG_FlippingAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) && + !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) && + + !(cent->currentState.eFlags & EF_DEAD) && + (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) != (cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && + (cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) != (cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT)) + {//FIXME: no need to do this if legs and torso on are same frame + //adjust for motion offset + mdxaBone_t boltMatrix; + vec3_t motionFwd, motionAngles; + vec3_t motionRt, tempAng; + int ang; + + trap_G2API_GetBoltMatrix_NoRecNoRot( cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_motion, &boltMatrix, vec3_origin, cent->lerpOrigin, cg.time, /*cgs.gameModels*/0, cent->modelScale); + trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, motionFwd ); + + vectoangles( motionFwd, motionAngles ); + + trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_X, motionRt ); + vectoangles( motionRt, tempAng ); + motionAngles[ROLL] = -tempAng[PITCH]; + + for ( ang = 0; ang < 3; ang++ ) + { + viewAngles[ang] = AngleNormalize180( viewAngles[ang] - AngleNormalize180( motionAngles[ang] ) ); + } + } + + //Keep it within 80 degrees of the leg angles, on either side. Will hopefully prevent spine twisting. + /* + if (legDif > 0) + { + legDif += 80; + } + else + { + legDif -= 80; + } + + if (legDif < 0 && viewAngles[YAW] < legDif) + { + viewAngles[YAW] = legDif; + } + if (legDif > 0 && viewAngles[YAW] > legDif) + { + viewAngles[YAW] = legDif; + } + */ + + //distribute the angles differently up the spine + //NOTE: each of these distributions must add up to 1.0f + thoracicAngles[PITCH] = viewAngles[PITCH]*0.20f; + llAngles[PITCH] = viewAngles[PITCH]*0.40f; + ulAngles[PITCH] = viewAngles[PITCH]*0.40f; + + thoracicAngles[YAW] = viewAngles[YAW]*0.20f; + ulAngles[YAW] = viewAngles[YAW]*0.35f; + llAngles[YAW] = viewAngles[YAW]*0.45f; + + thoracicAngles[ROLL] = viewAngles[ROLL]*0.20f; + ulAngles[ROLL] = viewAngles[ROLL]*0.35f; + llAngles[ROLL] = viewAngles[ROLL]*0.45f; +} + +static void CG_G2PlayerAngles( centity_t *cent, vec3_t legs[3], vec3_t legsAngles){ + vec3_t torsoAngles, headAngles; + float dest; + static int movementOffsets[8] = { 0, 22, 45, -22, 0, 22, -45, -22 }; + vec3_t velocity; + float speed; //, speed_dif, speed_desired; + int dir; + vec3_t velPos, velAng; + int adddir = 0; + float dif; + float degrees_negative = 0; + float degrees_positive = 0; + vec3_t ulAngles, llAngles, viewAngles, angles, thoracicAngles = {0,0,0}; + + VectorCopy( cent->lerpAngles, headAngles ); + headAngles[YAW] = AngleMod( headAngles[YAW] ); + VectorClear( legsAngles ); + VectorClear( torsoAngles ); + + // --------- yaw ------------- + + // allow yaw to drift a bit + if ((( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) != BOTH_STAND1) || + ( cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ) != WeaponReadyAnim[cent->currentState.weapon] ) + { + // if not standing still, always point all in the same direction + cent->pe.torso.yawing = qtrue; // always center + cent->pe.torso.pitching = qtrue; // always center + cent->pe.legs.yawing = qtrue; // always center + } + + // adjust legs for movement dir + if ( cent->currentState.eFlags & EF_DEAD ) { + // don't let dead bodies twitch + dir = 0; + } else { + dir = cent->currentState.angles2[YAW]; + if ( dir < 0 || dir > 7 ) { + CG_Error( "Bad player movement angle" ); + } + } + if (!cent->isATST) + { + torsoAngles[YAW] = headAngles[YAW] + 0.25 * movementOffsets[ dir ]; + } + else + { + torsoAngles[YAW] = headAngles[YAW]; + } + + // torso +// CG_SwingAngles( torsoAngles[YAW], 25, 90, /*cg_swingSpeed.value*/ 0.3, ¢->pe.torso.yawAngle, ¢->pe.torso.yawing ); +// torsoAngles[YAW] = cent->pe.torso.yawAngle; + + //for now, turn torso instantly and let the legs swing to follow + cent->pe.torso.yawAngle = torsoAngles[YAW]; + + // --------- pitch ------------- + + VectorCopy( cent->currentState.pos.trDelta, velocity ); + speed = VectorNormalize( velocity ); + + if (!speed) + { + torsoAngles[YAW] = headAngles[YAW]; + } + + // only show a fraction of the pitch angle in the torso + if ( headAngles[PITCH] > 180 ) { + dest = (-360 + headAngles[PITCH]) * 0.75; + } else { + dest = headAngles[PITCH] * 0.75; + } + CG_SwingAngles( dest, 15, 30, 0.1, ¢->pe.torso.pitchAngle, ¢->pe.torso.pitching ); + torsoAngles[PITCH] = cent->pe.torso.pitchAngle; + + // --------- roll ------------- + + + // lean towards the direction of travel + + /* + speed_desired = cent->currentState.speed/4; + + if (!speed) + { + speed_dif = 0; + } + else + { + speed_dif = (speed/speed_desired); + } + + if (speed_dif > 1) + { + speed_dif = 1; + } + else if (speed_dif < 0) + { + speed_dif = 0; + } + */ + if ( speed ) { + vec3_t axis[3]; + float side; + + speed *= 0.05; + + AnglesToAxis( legsAngles, axis ); + side = speed * DotProduct( velocity, axis[1] ); + legsAngles[ROLL] -= side; + + side = speed * DotProduct( velocity, axis[0] ); + legsAngles[PITCH] += side; + } + + //legsAngles[YAW] = headAngles[YAW] + (movementOffsets[ dir ]*speed_dif); + + //rww - crazy velocity-based leg angle calculation + legsAngles[YAW] = headAngles[YAW]; + velPos[0] = cent->lerpOrigin[0] + velocity[0]; + velPos[1] = cent->lerpOrigin[1] + velocity[1]; + velPos[2] = cent->lerpOrigin[2];// + velocity[2]; + + if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) + { //off the ground, no direction-based leg angles + VectorCopy(cent->lerpOrigin, velPos); + } + + VectorSubtract(cent->lerpOrigin, velPos, velAng); + + if (!VectorCompare(velAng, vec3_origin)) + { + vectoangles(velAng, velAng); + + if (velAng[YAW] <= legsAngles[YAW]) + { + degrees_negative = (legsAngles[YAW] - velAng[YAW]); + degrees_positive = (360 - legsAngles[YAW]) + velAng[YAW]; + } + else + { + degrees_negative = legsAngles[YAW] + (360 - velAng[YAW]); + degrees_positive = (velAng[YAW] - legsAngles[YAW]); + } + + if (degrees_negative < degrees_positive) + { + dif = degrees_negative; + adddir = 0; + } + else + { + dif = degrees_positive; + adddir = 1; + } + + if (dif > 90) + { + dif = (180 - dif); + } + + if (cent->isATST) + { + if (dif > 360) + { + dif = 360; + } + } + else + { + if (dif > 60) + { + dif = 60; + } + } + + //Slight hack for when playing is running backward + if (dir == 3 || dir == 5) + { + dif = -dif; + } + + if (adddir) + { + legsAngles[YAW] -= dif; + } + else + { + legsAngles[YAW] += dif; + } + } + + if (cent->isATST) + { + cent->pe.legs.yawSwingDif = CG_SwingAnglesATST( cent, legsAngles[YAW], 40, 360, /*cg_swingSpeed.value*/ 0.05, ¢->pe.legs.yawAngle, ¢->pe.legs.yawing ); + } + else + { + if (!cg_swingAngles.integer) + { + cent->pe.legs.yawAngle = legsAngles[YAW]; + } + else + { + CG_SwingAngles( legsAngles[YAW], 40, 90, /*cg_swingSpeed.value*/ 0.3, ¢->pe.legs.yawAngle, ¢->pe.legs.yawing ); + } + } + legsAngles[YAW] = cent->pe.legs.yawAngle; + + // pain twitch + CG_AddPainTwitch( cent, torsoAngles ); + + legsAngles[ROLL] = 0; + torsoAngles[ROLL] = 0; + + VectorCopy(legsAngles, cent->turAngles); + + if (cent->isATST) + { + legsAngles[ROLL] = 0; + legsAngles[PITCH] = 0; + } + + // pull the angles back out of the hierarchial chain + AnglesSubtract( headAngles, torsoAngles, headAngles ); + AnglesSubtract( torsoAngles, legsAngles, torsoAngles ); + + legsAngles[PITCH] = 0; + + AnglesToAxis( legsAngles, legs ); + // we assume that model 0 is the player model. + + if (cent->isATST) + { + vec3_t flatYaw; + + flatYaw[YAW] = 0;//cent->lerpAngles[YAW]; + flatYaw[ROLL] = 0; + flatYaw[PITCH] = 0; + CG_G2SetBoneAngles(cent->ghoul2, 0, "pelvis", flatYaw, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", torsoAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + return; + } + +// trap_G2API_SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", torsoAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + VectorCopy( cent->lerpAngles, viewAngles ); + viewAngles[YAW] = viewAngles[ROLL] = 0; + viewAngles[PITCH] *= 0.5; + + VectorSet( angles, 0, legsAngles[1], 0 ); + + angles[0] = legsAngles[0]; + if ( angles[0] > 30 ) + { + angles[0] = 30; + } + else if ( angles[0] < -30 ) + { + angles[0] = -30; + } + +// VectorCopy(legsAngles, angles); + + CG_G2ClientSpineAngles(cent, viewAngles, angles, thoracicAngles, ulAngles, llAngles); + + if ( cent->currentState.otherEntityNum2 && !(cent->currentState.eFlags & EF_DEAD) ) + { //using an emplaced gun + centity_t *empEnt = &cg_entities[cent->currentState.otherEntityNum2]; + vec3_t headAng; + + VectorClear(headAng); + + if (empEnt) + { + vec3_t dif, empOrg, originalAngle; + + VectorCopy(cent->lerpAngles, originalAngle); + + VectorCopy(empEnt->lerpOrigin, empOrg); + + empOrg[2] += 32; + + VectorSubtract(empOrg, cent->lerpOrigin, dif); + VectorNormalize(dif); + vectoangles(dif, dif); + + VectorCopy(dif, cent->lerpAngles); + + VectorCopy(cent->lerpAngles, legsAngles); + + VectorSubtract(originalAngle, cent->lerpAngles, headAng); + + headAng[PITCH] /= 3; //scale it down so that you can't bend your neck all the way back + } + else + { + VectorClear(cent->lerpAngles); + VectorClear(legsAngles); + } + + AnglesToAxis( legsAngles, legs ); + + CG_G2SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", headAng, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + } + else + { + CG_G2SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", ulAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", llAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", thoracicAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + if (cg_duelHeadAngles.integer && !(cent->currentState.eFlags & EF_DEAD)) + { + if ( !BG_FlippingAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InDeathAnim(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && + !BG_InDeathAnim(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && + !CG_InRoll(cent) && + !CG_InRollAnim(cent) && + !BG_SaberInSpecial(cent->currentState.saberMove) && + !BG_SaberInSpecialAttack(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && + + !BG_FlippingAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && + !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && + !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) && + !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && + !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) ) + { //use similar check to spine correction, these are the "safe" anims to be in for twisting around + vec3_t headAngles; + int duelClient = -1; + + if (cgs.gametype == GT_TOURNAMENT && (cent->currentState.number == cgs.duelist1 || cent->currentState.number == cgs.duelist2)) + { + if (cgs.duelist1 >= 0 && cgs.duelist1 < MAX_CLIENTS && + cgs.duelist2 >= 0 && cgs.duelist2 < MAX_CLIENTS) + { + if (cent->currentState.number == cgs.duelist1) + { + duelClient = cgs.duelist2; + } + else + { + duelClient = cgs.duelist1; + } + } + } + else if (cg.snap && cg.snap->ps.duelInProgress) + { + if (cent->currentState.number == cg.snap->ps.duelIndex) + { + duelClient = cg.snap->ps.clientNum; + } + else if (cent->currentState.number == cg.snap->ps.clientNum) + { + duelClient = cg.snap->ps.duelIndex; + } + } + + if (duelClient != -1) + { + trace_t tr; + + CG_Trace( &tr, cent->lerpOrigin, NULL, NULL, cg_entities[duelClient].lerpOrigin, cent->currentState.number, MASK_PLAYERSOLID ); + + if (tr.fraction == 1.0 || + tr.entityNum == duelClient) + { + centity_t *duelCEnt = &cg_entities[duelClient]; + vec3_t headSub; + + VectorSubtract(duelCEnt->lerpOrigin, cent->lerpOrigin, headSub); + vectoangles(headSub, headSub); + + headAngles[ROLL] = AngleSubtract(headSub[ROLL], cent->lerpAngles[ROLL]); + headAngles[YAW] = AngleSubtract(headSub[YAW], cent->lerpAngles[YAW]); + + if (headAngles[YAW] > 55) + { + headAngles[YAW] = 55; + } + if (headAngles[YAW] < -55) + { + headAngles[YAW] = -55; + } + + VectorCopy( cent->lerpAngles, viewAngles ); + viewAngles[YAW] = viewAngles[ROLL] = 0; + viewAngles[PITCH] *= 0.5; + + headAngles[PITCH] = AngleSubtract(headSub[PITCH], viewAngles[PITCH]); + if (headAngles[PITCH] > 16) + { + headAngles[PITCH] = 16; + } + if (headAngles[PITCH] < -16) + { + headAngles[PITCH] = -16; + } + headAngles[PITCH] += 6; + } + else + { + VectorClear(headAngles); + } + } + else + { + VectorClear(headAngles); + } + + CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", headAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + } + else + { + VectorClear(headAngles); + CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", headAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + } + } + else + { + CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + } + } + + //trap_G2API_SetBoneAngles(cent->ghoul2, 0, "cranium", headAngles, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, cgs.gameModels, 0, cg.time); +} +//========================================================================== + +/* +=============== +CG_HasteTrail +=============== +*/ +static void CG_HasteTrail( centity_t *cent ) { + localEntity_t *smoke; + vec3_t origin; + int anim; + + if ( cent->trailTime > cg.time ) { + return; + } + anim = cent->pe.legs.animationNumber & ~ANIM_TOGGLEBIT; + if ( anim != BOTH_RUN1 && anim != BOTH_RUNBACK1 ) { + return; + } + + cent->trailTime += 100; + if ( cent->trailTime < cg.time ) { + cent->trailTime = cg.time; + } + + VectorCopy( cent->lerpOrigin, origin ); + origin[2] -= 16; + + smoke = CG_SmokePuff( origin, vec3_origin, + 8, + 1, 1, 1, 1, + 500, + cg.time, + 0, + 0, + cgs.media.hastePuffShader ); + + // use the optimized local entity add + smoke->leType = LE_SCALE_FADE; +} + +/* +=============== +CG_DustTrail +=============== +*/ +/* +static void CG_DustTrail( centity_t *cent ) { + int anim; + localEntity_t *dust; + vec3_t end, vel; + trace_t tr; + + if (!cg_enableDust.integer) + return; + + if ( cent->dustTrailTime > cg.time ) { + return; + } + + anim = cent->pe.legs.animationNumber & ~ANIM_TOGGLEBIT; + if ( anim != LEGS_LANDB && anim != LEGS_LAND ) { + return; + } + + cent->dustTrailTime += 40; + if ( cent->dustTrailTime < cg.time ) { + cent->dustTrailTime = cg.time; + } + + VectorCopy(cent->currentState.pos.trBase, end); + end[2] -= 64; + CG_Trace( &tr, cent->currentState.pos.trBase, NULL, NULL, end, cent->currentState.number, MASK_PLAYERSOLID ); + + if ( !(tr.surfaceFlags & SURF_DUST) ) + return; + + VectorCopy( cent->currentState.pos.trBase, end ); + end[2] -= 16; + + VectorSet(vel, 0, 0, -30); + dust = CG_SmokePuff( end, vel, + 24, + .8f, .8f, 0.7f, 0.33f, + 500, + cg.time, + 0, + 0, + cgs.media.dustPuffShader ); +} +*/ + +/* +=============== +CG_TrailItem +=============== +*/ +#if 0 +static void CG_TrailItem( centity_t *cent, qhandle_t hModel ) { + refEntity_t ent; + vec3_t angles; + vec3_t axis[3]; + + VectorCopy( cent->lerpAngles, angles ); + angles[PITCH] = 0; + angles[ROLL] = 0; + AnglesToAxis( angles, axis ); + + memset( &ent, 0, sizeof( ent ) ); + VectorMA( cent->lerpOrigin, -16, axis[0], ent.origin ); + ent.origin[2] += 16; + angles[YAW] += 90; + AnglesToAxis( angles, ent.axis ); + + ent.hModel = hModel; + trap_R_AddRefEntityToScene( &ent ); +} +#endif + + +/* +=============== +CG_PlayerFlag +=============== +*/ +static void CG_PlayerFlag( centity_t *cent, qhandle_t hModel ) { + refEntity_t ent; + vec3_t angles; + vec3_t axis[3]; + vec3_t boltOrg, tAng, getAng, right; + mdxaBone_t boltMatrix; + + if (cent->currentState.number == cg.snap->ps.clientNum && + !cg.renderingThirdPerson) + { + return; + } + + if (!cent->ghoul2) + { + return; + } + + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_llumbar, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, boltOrg); + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, tAng); + vectoangles(tAng, tAng); + + VectorCopy(cent->lerpAngles, angles); + + boltOrg[2] -= 12; + VectorSet(getAng, 0, cent->lerpAngles[1], 0); + AngleVectors(getAng, 0, right, 0); + boltOrg[0] += right[0]*8; + boltOrg[1] += right[1]*8; + boltOrg[2] += right[2]*8; + + angles[PITCH] = -cent->lerpAngles[PITCH]/2-30; + angles[YAW] = tAng[YAW]+270; + + AnglesToAxis(angles, axis); + + memset( &ent, 0, sizeof( ent ) ); + VectorMA( boltOrg, 24, axis[0], ent.origin ); + + angles[ROLL] += 20; + AnglesToAxis( angles, ent.axis ); + + ent.hModel = hModel; + + ent.modelScale[0] = 0.5; + ent.modelScale[1] = 0.5; + ent.modelScale[2] = 0.5; + ScaleModelAxis(&ent); + + /* + if (cent->currentState.number == cg.snap->ps.clientNum) + { //If we're the current client (in third person), render the flag on our back transparently + ent.renderfx |= RF_FORCE_ENT_ALPHA; + ent.shaderRGBA[3] = 100; + } + */ + //FIXME: Not doing this at the moment because sorting totally messes up + + trap_R_AddRefEntityToScene( &ent ); +} + + +/* +=============== +CG_PlayerPowerups +=============== +*/ +static void CG_PlayerPowerups( centity_t *cent, refEntity_t *torso ) { + int powerups; + clientInfo_t *ci; + + powerups = cent->currentState.powerups; + if ( !powerups ) { + return; + } + + // quad gives a dlight + if ( powerups & ( 1 << PW_QUAD ) ) { + trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 0.2f, 0.2f, 1 ); + } + + ci = &cgs.clientinfo[ cent->currentState.clientNum ]; + // redflag + if ( powerups & ( 1 << PW_REDFLAG ) ) { + CG_PlayerFlag( cent, cgs.media.redFlagModel ); + trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 1.0, 0.2f, 0.2f ); + } + + // blueflag + if ( powerups & ( 1 << PW_BLUEFLAG ) ) { + CG_PlayerFlag( cent, cgs.media.blueFlagModel ); + trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 0.2f, 0.2f, 1.0 ); + } + + // neutralflag + if ( powerups & ( 1 << PW_NEUTRALFLAG ) ) { + trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 1.0, 1.0, 1.0 ); + } + + // haste leaves smoke trails + if ( powerups & ( 1 << PW_HASTE ) ) { + CG_HasteTrail( cent ); + } +} + + +/* +=============== +CG_PlayerFloatSprite + +Float a sprite over the player's head +=============== +*/ +static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader ) { + int rf; + refEntity_t ent; + + if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson ) { + rf = RF_THIRD_PERSON; // only show in mirrors + } else { + rf = 0; + } + + memset( &ent, 0, sizeof( ent ) ); + VectorCopy( cent->lerpOrigin, ent.origin ); + ent.origin[2] += 48; + ent.reType = RT_SPRITE; + ent.customShader = shader; + ent.radius = 10; + ent.renderfx = rf; + ent.shaderRGBA[0] = 255; + ent.shaderRGBA[1] = 255; + ent.shaderRGBA[2] = 255; + ent.shaderRGBA[3] = 255; + trap_R_AddRefEntityToScene( &ent ); +} + + + +/* +=============== +CG_PlayerFloatSprite + +Same as above but allows custom RGBA values +=============== +*/ +#if 0 +static void CG_PlayerFloatSpriteRGBA( centity_t *cent, qhandle_t shader, vec4_t rgba ) { + int rf; + refEntity_t ent; + + if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson ) { + rf = RF_THIRD_PERSON; // only show in mirrors + } else { + rf = 0; + } + + memset( &ent, 0, sizeof( ent ) ); + VectorCopy( cent->lerpOrigin, ent.origin ); + ent.origin[2] += 48; + ent.reType = RT_SPRITE; + ent.customShader = shader; + ent.radius = 10; + ent.renderfx = rf; + ent.shaderRGBA[0] = rgba[0]; + ent.shaderRGBA[1] = rgba[1]; + ent.shaderRGBA[2] = rgba[2]; + ent.shaderRGBA[3] = rgba[3]; + trap_R_AddRefEntityToScene( &ent ); +} +#endif + + +/* +=============== +CG_PlayerSprites + +Float sprites over the player's head +=============== +*/ +static void CG_PlayerSprites( centity_t *cent ) { +// int team; + + if (cg.snap && + CG_IsMindTricked(cent->currentState.trickedentindex, + cent->currentState.trickedentindex2, + cent->currentState.trickedentindex3, + cent->currentState.trickedentindex4, + cg.snap->ps.clientNum)) + { + return; //this entity is mind-tricking the current client, so don't render it + } + + if ( cent->currentState.eFlags & EF_CONNECTION ) { + CG_PlayerFloatSprite( cent, cgs.media.connectionShader ); + return; + } + + if ( cent->currentState.eFlags & EF_TALK ) { + CG_PlayerFloatSprite( cent, cgs.media.balloonShader ); + return; + } +/* + if ( cent->currentState.eFlags & EF_AWARD_IMPRESSIVE ) { + CG_PlayerFloatSprite( cent, cgs.media.medalImpressive ); + return; + } + + if ( cent->currentState.eFlags & EF_AWARD_EXCELLENT ) { + CG_PlayerFloatSprite( cent, cgs.media.medalExcellent ); + return; + } + + if ( cent->currentState.eFlags & EF_AWARD_GAUNTLET ) { + CG_PlayerFloatSprite( cent, cgs.media.medalGauntlet ); + return; + } + + if ( cent->currentState.eFlags & EF_AWARD_DEFEND ) { + CG_PlayerFloatSprite( cent, cgs.media.medalDefend ); + return; + } + + if ( cent->currentState.eFlags & EF_AWARD_ASSIST ) { + CG_PlayerFloatSprite( cent, cgs.media.medalAssist ); + return; + } + + if ( cent->currentState.eFlags & EF_AWARD_CAP ) { + CG_PlayerFloatSprite( cent, cgs.media.medalCapture ); + return; + } + + team = cgs.clientinfo[ cent->currentState.clientNum ].team; + if ( !(cent->currentState.eFlags & EF_DEAD) && + cg.snap->ps.persistant[PERS_TEAM] == team && + cgs.gametype >= GT_TEAM) { + if (cg_drawFriend.integer) { + CG_PlayerFloatSprite( cent, cgs.media.friendShader ); + } + return; + } +*/ +} + +/* +=============== +CG_PlayerShadow + +Returns the Z component of the surface being shadowed + + should it return a full plane instead of a Z? +=============== +*/ +#define SHADOW_DISTANCE 128 +static qboolean CG_PlayerShadow( centity_t *cent, float *shadowPlane ) { + vec3_t end, mins = {-15, -15, 0}, maxs = {15, 15, 2}; + trace_t trace; + float alpha; + + *shadowPlane = 0; + + if ( cg_shadows.integer == 0 ) { + return qfalse; + } + + if (cent->currentState.eFlags & EF_DEAD) + { + return qfalse; + } + + if (CG_IsMindTricked(cent->currentState.trickedentindex, + cent->currentState.trickedentindex2, + cent->currentState.trickedentindex3, + cent->currentState.trickedentindex4, + cg.snap->ps.clientNum)) + { + return qfalse; //this entity is mind-tricking the current client, so don't render it + } + + // send a trace down from the player to the ground + VectorCopy( cent->lerpOrigin, end ); + end[2] -= SHADOW_DISTANCE; + + trap_CM_BoxTrace( &trace, cent->lerpOrigin, end, mins, maxs, 0, MASK_PLAYERSOLID ); + + // no shadow if too high + if ( trace.fraction == 1.0 || trace.startsolid || trace.allsolid ) { + return qfalse; + } + + *shadowPlane = trace.endpos[2] + 1; + + if ( cg_shadows.integer != 1 ) { // no mark for stencil or projection shadows + return qtrue; + } + + // fade the shadow out with height + alpha = 1.0 - trace.fraction; + + // bk0101022 - hack / FPE - bogus planes? + //assert( DotProduct( trace.plane.normal, trace.plane.normal ) != 0.0f ) + + // add the mark as a temporary, so it goes directly to the renderer + // without taking a spot in the cg_marks array + CG_ImpactMark( cgs.media.shadowMarkShader, trace.endpos, trace.plane.normal, + cent->pe.legs.yawAngle, alpha,alpha,alpha,1, qfalse, 24, qtrue ); + + return qtrue; +} + + +/* +=============== +CG_PlayerSplash + +Draw a mark at the water surface +=============== +*/ +static void CG_PlayerSplash( centity_t *cent ) { + vec3_t start, end; + trace_t trace; + int contents; + polyVert_t verts[4]; + + if ( !cg_shadows.integer ) { + return; + } + + VectorCopy( cent->lerpOrigin, end ); + end[2] -= 24; + + // if the feet aren't in liquid, don't make a mark + // this won't handle moving water brushes, but they wouldn't draw right anyway... + contents = trap_CM_PointContents( end, 0 ); + if ( !( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) ) { + return; + } + + VectorCopy( cent->lerpOrigin, start ); + start[2] += 32; + + // if the head isn't out of liquid, don't make a mark + contents = trap_CM_PointContents( start, 0 ); + if ( contents & ( CONTENTS_SOLID | CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) { + return; + } + + // trace down to find the surface + trap_CM_BoxTrace( &trace, start, end, NULL, NULL, 0, ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ); + + if ( trace.fraction == 1.0 ) { + return; + } + + // create a mark polygon + VectorCopy( trace.endpos, verts[0].xyz ); + verts[0].xyz[0] -= 32; + verts[0].xyz[1] -= 32; + verts[0].st[0] = 0; + verts[0].st[1] = 0; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255; + + VectorCopy( trace.endpos, verts[1].xyz ); + verts[1].xyz[0] -= 32; + verts[1].xyz[1] += 32; + verts[1].st[0] = 0; + verts[1].st[1] = 1; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255; + + VectorCopy( trace.endpos, verts[2].xyz ); + verts[2].xyz[0] += 32; + verts[2].xyz[1] += 32; + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255; + + VectorCopy( trace.endpos, verts[3].xyz ); + verts[3].xyz[0] += 32; + verts[3].xyz[1] -= 32; + verts[3].st[0] = 1; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255; + + trap_R_AddPolyToScene( cgs.media.wakeMarkShader, 4, verts ); +} + +void CG_ForcePushBlur( vec3_t org ) +{ + localEntity_t *ex; + + ex = CG_AllocLocalEntity(); + ex->leType = LE_PUFF; + ex->refEntity.reType = RT_SPRITE; + ex->radius = 2.0f; + ex->startTime = cg.time; + ex->endTime = ex->startTime + 120; + VectorCopy( org, ex->pos.trBase ); + ex->pos.trTime = cg.time; + ex->pos.trType = TR_LINEAR; + VectorScale( cg.refdef.viewaxis[1], 55, ex->pos.trDelta ); + + ex->color[0] = 24; + ex->color[1] = 32; + ex->color[2] = 40; + ex->refEntity.customShader = trap_R_RegisterShader( "gfx/effects/forcePush" ); + + ex = CG_AllocLocalEntity(); + ex->leType = LE_PUFF; + ex->refEntity.reType = RT_SPRITE; + ex->refEntity.rotation = 180.0f; + ex->radius = 2.0f; + ex->startTime = cg.time; + ex->endTime = ex->startTime + 120; + VectorCopy( org, ex->pos.trBase ); + ex->pos.trTime = cg.time; + ex->pos.trType = TR_LINEAR; + VectorScale( cg.refdef.viewaxis[1], -55, ex->pos.trDelta ); + + ex->color[0] = 24; + ex->color[1] = 32; + ex->color[2] = 40; + ex->refEntity.customShader = trap_R_RegisterShader( "gfx/effects/forcePush" ); +} + +void CG_ForceGripEffect( vec3_t org ) +{ + localEntity_t *ex; + float wv = sin( cg.time * 0.004f ) * 0.08f + 0.1f; + + ex = CG_AllocLocalEntity(); + ex->leType = LE_PUFF; + ex->refEntity.reType = RT_SPRITE; + ex->radius = 2.0f; + ex->startTime = cg.time; + ex->endTime = ex->startTime + 120; + VectorCopy( org, ex->pos.trBase ); + ex->pos.trTime = cg.time; + ex->pos.trType = TR_LINEAR; + VectorScale( cg.refdef.viewaxis[1], 55, ex->pos.trDelta ); + + ex->color[0] = 200+((wv*255)); + if (ex->color[0] > 255) + { + ex->color[0] = 255; + } + ex->color[1] = 0; + ex->color[2] = 0; + ex->refEntity.customShader = trap_R_RegisterShader( "gfx/effects/forcePush" ); + + ex = CG_AllocLocalEntity(); + ex->leType = LE_PUFF; + ex->refEntity.reType = RT_SPRITE; + ex->refEntity.rotation = 180.0f; + ex->radius = 2.0f; + ex->startTime = cg.time; + ex->endTime = ex->startTime + 120; + VectorCopy( org, ex->pos.trBase ); + ex->pos.trTime = cg.time; + ex->pos.trType = TR_LINEAR; + VectorScale( cg.refdef.viewaxis[1], -55, ex->pos.trDelta ); + + /* + ex->color[0] = 200+((wv*255)); + if (ex->color[0] > 255) + { + ex->color[0] = 255; + } + */ + ex->color[0] = 255; + ex->color[1] = 255; + ex->color[2] = 255; + ex->refEntity.customShader = cgs.media.redSaberGlowShader;//trap_R_RegisterShader( "gfx/effects/forcePush" ); +} + + +/* +=============== +CG_AddRefEntityWithPowerups + +Adds a piece with modifications or duplications for powerups +Also called by CG_Missile for quad rockets, but nobody can tell... +=============== +*/ +void CG_AddRefEntityWithPowerups( refEntity_t *ent, entityState_t *state, int team ) { + + if (CG_IsMindTricked(state->trickedentindex, + state->trickedentindex2, + state->trickedentindex3, + state->trickedentindex4, + cg.snap->ps.clientNum)) + { + return; //this entity is mind-tricking the current client, so don't render it + } + + trap_R_AddRefEntityToScene( ent ); + + if ( state->powerups & ( 1 << PW_QUAD ) ) + { + if (team == TEAM_RED) + ent->customShader = cgs.media.redQuadShader; + else + ent->customShader = cgs.media.quadShader; + trap_R_AddRefEntityToScene( ent ); + } + if ( state->powerups & ( 1 << PW_BATTLESUIT ) ) { + ent->customShader = cgs.media.battleSuitShader; + trap_R_AddRefEntityToScene( ent ); + } +} + +#define MAX_SHIELD_TIME 2000.0 +#define MIN_SHIELD_TIME 2000.0 + + +void CG_PlayerShieldHit(int entitynum, vec3_t dir, int amount) +{ + centity_t *cent; + int time; + + if (entitynum<0 || entitynum >= MAX_CLIENTS) + { + return; + } + + cent = &cg_entities[entitynum]; + + if (amount > 100) + { + time = cg.time + MAX_SHIELD_TIME; // 2 sec. + } + else + { + time = cg.time + 500 + amount*15; + } + + if (time > cent->damageTime) + { + cent->damageTime = time; + VectorScale(dir, -1, dir); + vectoangles(dir, cent->damageAngles); + } +} + + +void CG_DrawPlayerShield(centity_t *cent, vec3_t origin) +{ + refEntity_t ent; + int alpha; + float scale; + + // Don't draw the shield when the player is dead. + if (cent->currentState.eFlags & EF_DEAD) + { + return; + } + + memset( &ent, 0, sizeof( ent ) ); + + VectorCopy( origin, ent.origin ); + ent.origin[2] += 10.0; + AnglesToAxis( cent->damageAngles, ent.axis ); + + alpha = 255.0 * ((cent->damageTime - cg.time) / MIN_SHIELD_TIME) + random()*16; + if (alpha>255) + alpha=255; + + // Make it bigger, but tighter if more solid + scale = 1.4 - ((float)alpha*(0.4/255.0)); // Range from 1.0 to 1.4 + VectorScale( ent.axis[0], scale, ent.axis[0] ); + VectorScale( ent.axis[1], scale, ent.axis[1] ); + VectorScale( ent.axis[2], scale, ent.axis[2] ); + + ent.hModel = cgs.media.halfShieldModel; + ent.customShader = cgs.media.halfShieldShader; + ent.shaderRGBA[0] = alpha; + ent.shaderRGBA[1] = alpha; + ent.shaderRGBA[2] = alpha; + ent.shaderRGBA[3] = 255; + trap_R_AddRefEntityToScene( &ent ); +} + + +void CG_PlayerHitFX(centity_t *cent) +{ + centity_t *curent; + + // only do the below fx if the cent in question is...uh...me, and it's first person. + if (cent->currentState.clientNum != cg.predictedPlayerState.clientNum || cg.renderingThirdPerson) + { + // Get the NON-PREDICTED player entity, because the predicted one doesn't have the damage info on it. + curent = &cg_entities[cent->currentState.number]; + + if (curent->damageTime > cg.time) + { + CG_DrawPlayerShield(curent, cent->lerpOrigin); + } + + return; + } +} + + + +/* +================= +CG_LightVerts +================= +*/ +int CG_LightVerts( vec3_t normal, int numVerts, polyVert_t *verts ) +{ + int i, j; + float incoming; + vec3_t ambientLight; + vec3_t lightDir; + vec3_t directedLight; + + trap_R_LightForPoint( verts[0].xyz, ambientLight, directedLight, lightDir ); + + for (i = 0; i < numVerts; i++) { + incoming = DotProduct (normal, lightDir); + if ( incoming <= 0 ) { + verts[i].modulate[0] = ambientLight[0]; + verts[i].modulate[1] = ambientLight[1]; + verts[i].modulate[2] = ambientLight[2]; + verts[i].modulate[3] = 255; + continue; + } + j = ( ambientLight[0] + incoming * directedLight[0] ); + if ( j > 255 ) { + j = 255; + } + verts[i].modulate[0] = j; + + j = ( ambientLight[1] + incoming * directedLight[1] ); + if ( j > 255 ) { + j = 255; + } + verts[i].modulate[1] = j; + + j = ( ambientLight[2] + incoming * directedLight[2] ); + if ( j > 255 ) { + j = 255; + } + verts[i].modulate[2] = j; + + verts[i].modulate[3] = 255; + } + return qtrue; +} + +void CG_DoSaber( vec3_t origin, vec3_t dir, float length, saber_colors_t color, int rfx ) +{ + vec3_t mid, rgb={1,1,1}; + qhandle_t blade = 0, glow = 0; + refEntity_t saber; + float radiusmult; + + if ( length < 0.5f ) + { + // if the thing is so short, just forget even adding me. + return; + } + + // Find the midpoint of the saber for lighting purposes + VectorMA( origin, length * 0.5f, dir, mid ); + + switch( color ) + { + case SABER_RED: + glow = cgs.media.redSaberGlowShader; + blade = cgs.media.redSaberCoreShader; + VectorSet( rgb, 1.0f, 0.2f, 0.2f ); + break; + case SABER_ORANGE: + glow = cgs.media.orangeSaberGlowShader; + blade = cgs.media.orangeSaberCoreShader; + VectorSet( rgb, 1.0f, 0.5f, 0.1f ); + break; + case SABER_YELLOW: + glow = cgs.media.yellowSaberGlowShader; + blade = cgs.media.yellowSaberCoreShader; + VectorSet( rgb, 1.0f, 1.0f, 0.2f ); + break; + case SABER_GREEN: + glow = cgs.media.greenSaberGlowShader; + blade = cgs.media.greenSaberCoreShader; + VectorSet( rgb, 0.2f, 1.0f, 0.2f ); + break; + case SABER_BLUE: + glow = cgs.media.blueSaberGlowShader; + blade = cgs.media.blueSaberCoreShader; + VectorSet( rgb, 0.2f, 0.4f, 1.0f ); + break; + case SABER_PURPLE: + glow = cgs.media.purpleSaberGlowShader; + blade = cgs.media.purpleSaberCoreShader; + VectorSet( rgb, 0.9f, 0.2f, 1.0f ); + break; + default: + glow = cgs.media.blueSaberGlowShader; + blade = cgs.media.blueSaberCoreShader; + VectorSet( rgb, 0.2f, 0.4f, 1.0f ); + break; + } + + // always add a light because sabers cast a nice glow before they slice you in half!! or something... + trap_R_AddLightToScene( mid, (length*2.0f) + (random()*8.0f), rgb[0], rgb[1], rgb[2] ); + + memset( &saber, 0, sizeof( refEntity_t )); + + // Saber glow is it's own ref type because it uses a ton of sprites, otherwise it would eat up too many + // refEnts to do each glow blob individually + saber.saberLength = length; + + // Jeff, I did this because I foolishly wished to have a bright halo as the saber is unleashed. + // It's not quite what I'd hoped tho. If you have any ideas, go for it! --Pat + if (length < SABER_LENGTH_MAX) + { + radiusmult = 1.0 + (2.0 / length); // Note this creates a curve, and length cannot be < 0.5. + } + else + { + radiusmult = 1.0; + } + + + saber.radius = (2.8 + crandom() * 0.2f)*radiusmult; + + + VectorCopy( origin, saber.origin ); + VectorCopy( dir, saber.axis[0] ); + saber.reType = RT_SABER_GLOW; + saber.customShader = glow; + saber.shaderRGBA[0] = saber.shaderRGBA[1] = saber.shaderRGBA[2] = saber.shaderRGBA[3] = 0xff; + saber.renderfx = rfx; + + trap_R_AddRefEntityToScene( &saber ); + + // Do the hot core + VectorMA( origin, length, dir, saber.origin ); + VectorMA( origin, -1, dir, saber.oldorigin ); + + +// CG_TestLine(saber.origin, saber.oldorigin, 50, 0x000000ff, 3); + saber.customShader = blade; + saber.reType = RT_LINE; + saber.radius = (1.0 + crandom() * 0.2f)*radiusmult; + + saber.shaderTexCoord[0] = saber.shaderTexCoord[1] = 1.0f; + saber.shaderRGBA[0] = saber.shaderRGBA[1] = saber.shaderRGBA[2] = saber.shaderRGBA[3] = 0xff; + + trap_R_AddRefEntityToScene( &saber ); +} + +//-------------------------------------------------------------- +// CG_GetTagWorldPosition +// +// Can pass in NULL for the axis +//-------------------------------------------------------------- +void CG_GetTagWorldPosition( refEntity_t *model, char *tag, vec3_t pos, vec3_t axis[3] ) +{ + orientation_t orientation; + int i = 0; + + // Get the requested tag + trap_R_LerpTag( &orientation, model->hModel, model->oldframe, model->frame, + 1.0f - model->backlerp, tag ); + + VectorCopy( model->origin, pos ); + for ( i = 0 ; i < 3 ; i++ ) + { + VectorMA( pos, orientation.origin[i], model->axis[i], pos ); + } + + if ( axis ) + { + MatrixMultiply( orientation.axis, model->axis, axis ); + } +} + +#define MAX_MARK_FRAGMENTS 128 +#define MAX_MARK_POINTS 384 +extern markPoly_t *CG_AllocMark(); + +void CG_CreateSaberMarks( vec3_t start, vec3_t end, vec3_t normal ) +{ +// byte colors[4]; + int i, j; + int numFragments; + vec3_t axis[3], originalPoints[4], mid; + vec3_t markPoints[MAX_MARK_POINTS], projection; + polyVert_t *v, verts[MAX_VERTS_ON_POLY]; + markPoly_t *mark; + markFragment_t markFragments[MAX_MARK_FRAGMENTS], *mf; + + float radius = 0.65f; + + if ( !cg_addMarks.integer ) + { + return; + } + + VectorSubtract( end, start, axis[1] ); + VectorNormalize( axis[1] ); + + // create the texture axis + VectorCopy( normal, axis[0] ); + CrossProduct( axis[1], axis[0], axis[2] ); + + // create the full polygon that we'll project + for ( i = 0 ; i < 3 ; i++ ) + { // stretch a bit more in the direction that we are traveling in... debateable as to whether this makes things better or worse + originalPoints[0][i] = start[i] - radius * axis[1][i] - radius * axis[2][i]; + originalPoints[1][i] = end[i] + radius * axis[1][i] - radius * axis[2][i]; + originalPoints[2][i] = end[i] + radius * axis[1][i] + radius * axis[2][i]; + originalPoints[3][i] = start[i] - radius * axis[1][i] + radius * axis[2][i]; + } + + VectorScale( normal, -1, projection ); + + // get the fragments + numFragments = trap_CM_MarkFragments( 4, (const float (*)[3])originalPoints, + projection, MAX_MARK_POINTS, markPoints[0], MAX_MARK_FRAGMENTS, markFragments ); + + for ( i = 0, mf = markFragments ; i < numFragments ; i++, mf++ ) + { + // we have an upper limit on the complexity of polygons that we store persistantly + if ( mf->numPoints > MAX_VERTS_ON_POLY ) + { + mf->numPoints = MAX_VERTS_ON_POLY; + } + + for ( j = 0, v = verts ; j < mf->numPoints ; j++, v++ ) + { + vec3_t delta; + + // Set up our texture coords, this may need some work + VectorCopy( markPoints[mf->firstPoint + j], v->xyz ); + VectorAdd( end, start, mid ); + VectorScale( mid, 0.5f, mid ); + VectorSubtract( v->xyz, mid, delta ); + + v->st[0] = 0.5 + DotProduct( delta, axis[1] ) * (0.05f + random() * 0.03f); + v->st[1] = 0.5 + DotProduct( delta, axis[2] ) * (0.15f + random() * 0.05f); + } + + if (cg_saberDynamicMarks.integer) + { + int i = 0; + int i_2 = 0; + addpolyArgStruct_t apArgs; + vec3_t x; + + memset (&apArgs, 0, sizeof(apArgs)); + + while (i < 4) + { + while (i_2 < 3) + { + apArgs.p[i][i_2] = verts[i].xyz[i_2]; + + i_2++; + } + + i_2 = 0; + i++; + } + + i = 0; + i_2 = 0; + + while (i < 4) + { + while (i_2 < 2) + { + apArgs.ev[i][i_2] = verts[i].st[i_2]; + + i_2++; + } + + i_2 = 0; + i++; + } + + //When using addpoly, having a situation like this tends to cause bad results. + //(I assume it doesn't like trying to draw a polygon over two planes and extends + //the vertex out to some odd value) + VectorSubtract(apArgs.p[0], apArgs.p[3], x); + if (VectorLength(x) > 3.0f) + { + return; + } + + apArgs.numVerts = mf->numPoints; + VectorCopy(vec3_origin, apArgs.vel); + VectorCopy(vec3_origin, apArgs.accel); + + apArgs.alpha1 = 1.0f; + apArgs.alpha2 = 0.0f; + apArgs.alphaParm = 255.0f; + + VectorSet(apArgs.rgb1, 0.0f, 0.0f, 0.0f); + VectorSet(apArgs.rgb2, 0.0f, 0.0f, 0.0f); + + apArgs.rgbParm = 0.0f; + + apArgs.bounce = 0; + apArgs.motionDelay = 0; + apArgs.killTime = cg_saberDynamicMarkTime.integer; + apArgs.shader = cgs.media.rivetMarkShader; + apArgs.flags = 0x08000000|0x00000004; + + trap_FX_AddPoly(&apArgs); + + apArgs.shader = trap_R_RegisterShader("gfx/effects/saberDamageGlow"); + apArgs.rgb1[0] = 215 + random() * 40.0f; + apArgs.rgb1[1] = 96 + random() * 32.0f; + apArgs.rgb1[2] = apArgs.alphaParm = random()*15.0f; + + apArgs.rgb1[0] /= 255; + apArgs.rgb1[1] /= 255; + apArgs.rgb1[2] /= 255; + VectorCopy(apArgs.rgb1, apArgs.rgb2); + + apArgs.killTime = 100; + + trap_FX_AddPoly(&apArgs); + } + else + { + // save it persistantly, do burn first + mark = CG_AllocMark(); + mark->time = cg.time; + mark->alphaFade = qtrue; + mark->markShader = cgs.media.rivetMarkShader; + mark->poly.numVerts = mf->numPoints; + mark->color[0] = mark->color[1] = mark->color[2] = mark->color[3] = 255; + memcpy( mark->verts, verts, mf->numPoints * sizeof( verts[0] ) ); + + // And now do a glow pass + // by moving the start time back, we can hack it to fade out way before the burn does + mark = CG_AllocMark(); + mark->time = cg.time - 8500; + mark->alphaFade = qfalse; + mark->markShader = trap_R_RegisterShader("gfx/effects/saberDamageGlow"); + mark->poly.numVerts = mf->numPoints; + mark->color[0] = 215 + random() * 40.0f; + mark->color[1] = 96 + random() * 32.0f; + mark->color[2] = mark->color[3] = random()*15.0f; + memcpy( mark->verts, verts, mf->numPoints * sizeof( verts[0] ) ); + } + } +} + +#ifdef G2_COLLISION_ENABLED +qboolean CG_G2TraceCollide(trace_t *tr, vec3_t lastValidStart, vec3_t lastValidEnd) +{ + if (tr->entityNum < MAX_CLIENTS) + { //Hit a client with the normal trace, try the collision trace. + G2Trace_t G2Trace; + centity_t *g2Hit; + vec3_t vIdentity = {1.0f, 1.0f, 1.0f}; + vec3_t angles; + int tN = 0; + float fRadius = 0; + + memset (&G2Trace, 0, sizeof(G2Trace)); + + while (tN < MAX_G2_COLLISIONS) + { + G2Trace[tN].mEntityNum = -1; + tN++; + } + g2Hit = &cg_entities[tr->entityNum]; + + if (g2Hit && g2Hit->ghoul2) + { + angles[ROLL] = angles[PITCH] = 0; + angles[YAW] = g2Hit->lerpAngles[YAW]; + + trap_G2API_CollisionDetect ( G2Trace, g2Hit->ghoul2, angles, g2Hit->lerpOrigin, cg.time, g2Hit->currentState.number, lastValidStart, lastValidEnd, vIdentity, 0, 2, fRadius ); + + if (G2Trace[0].mEntityNum != g2Hit->currentState.number) + { + tr->fraction = 1.0f; + tr->entityNum = ENTITYNUM_NONE; + tr->startsolid = 0; + tr->allsolid = 0; + return qfalse; + } + else + { //Yay! + VectorCopy(G2Trace[0].mCollisionPosition, tr->endpos); + VectorCopy(G2Trace[0].mCollisionNormal, tr->plane.normal); + return qtrue; + } + } + } + + return qfalse; +} + +void CG_G2SaberEffects(vec3_t start, vec3_t end, centity_t *owner) +{ + trace_t trace; + vec3_t startTr; + vec3_t endTr; + qboolean backWards = qfalse; + qboolean doneWithTraces = qfalse; + + while (!doneWithTraces) + { + if (!backWards) + { + VectorCopy(start, startTr); + VectorCopy(end, endTr); + } + else + { + VectorCopy(end, startTr); + VectorCopy(start, endTr); + } + + CG_Trace( &trace, startTr, NULL, NULL, endTr, owner->currentState.number, MASK_PLAYERSOLID ); + + if (trace.entityNum < MAX_CLIENTS) + { //hit a client.. + CG_G2TraceCollide(&trace, startTr, endTr); + + if (trace.entityNum != ENTITYNUM_NONE) + { //it succeeded with the ghoul2 trace + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), trace.endpos, trace.plane.normal ); + } + } + + if (!backWards) + { + backWards = qtrue; + } + else + { + doneWithTraces = qtrue; + } + } +} +#endif + +#define SABER_TRAIL_TIME 40.0f +#define FX_USE_ALPHA 0x08000000 + +void CG_AddSaberBlade( centity_t *cent, centity_t *scent, refEntity_t *saber, int renderfx, int modelIndex, vec3_t origin, vec3_t angles, qboolean fromSaber) +{ + vec3_t org_, end, v, + axis_[3] = {0,0,0, 0,0,0, 0,0,0}; // shut the compiler up + trace_t trace; + int i = 0; + float saberLen, dualSaberLen; + float diff; + clientInfo_t *client; + centity_t *saberEnt; + saberTrail_t *saberTrail; + mdxaBone_t boltMatrix; + vec3_t futureAngles; + effectTrailArgStruct_t fx; + int scolor = 0; + vec3_t otherPos, otherDir, otherEnd; + float dualLen = 0.7; + + saberEnt = &cg_entities[cent->currentState.saberEntityNum]; + + if (/*cg.snap->ps.clientNum == cent->currentState.number && */ + cgs.clientinfo[ cent->currentState.clientNum ].team != TEAM_SPECTATOR && + !(cg.snap->ps.pm_flags & PMF_FOLLOW)) + { + if (cent->saberLength < 1) + { + cent->saberLength = 1; + cent->saberExtendTime = cg.time; + } + + if (cent->saberLength < SABER_LENGTH_MAX) + { + cent->saberLength += (cg.time - cent->saberExtendTime)*0.05; + } + + if (cent->saberLength > SABER_LENGTH_MAX) + { + cent->saberLength = SABER_LENGTH_MAX; + } + + cent->saberExtendTime = cg.time; + saberLen = cent->saberLength; + } + else + { + saberLen = SABER_LENGTH_MAX; + } + +/* +Ghoul2 Insert Start +*/ + + dualSaberLen = saberLen; + + if ((cent->currentState.eFlags & EF_DEAD) && !fromSaber) + { //trying to draw a saber on a corpse? That's bad. + return; + } + + futureAngles[YAW] = angles[YAW]; + futureAngles[PITCH] = angles[PITCH]; + futureAngles[ROLL] = angles[ROLL]; + + // figure out where the actual model muzzle is + if (fromSaber) + { + trap_G2API_GetBoltMatrix(scent->ghoul2, 0, 0, &boltMatrix, futureAngles, origin, cg.time, cgs.gameModels, scent->modelScale); + } + else + { + trap_G2API_GetBoltMatrix(scent->ghoul2, 1, 0, &boltMatrix, futureAngles, origin, cg.time, cgs.gameModels, scent->modelScale); + } + // work the matrix axis stuff into the original axis and origins used. + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, org_); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_Y, axis_[0]); + + if (!fromSaber && saberEnt) + { + VectorCopy(org_, saberEnt->currentState.pos.trBase); + + VectorCopy(axis_[0], saberEnt->currentState.apos.trBase); + } + + client = &cgs.clientinfo[cent->currentState.number]; + + if (!client) + { //something horrible has apparently happened + return; + } + + if (cent->currentState.bolt2) + { + VectorMA( org_, saberLen*dualLen, axis_[0], end ); + } + else + { + VectorMA( org_, saberLen, axis_[0], end ); + } + + VectorAdd( end, axis_[0], end ); + + if (cent->currentState.bolt2) + { + otherPos[0] = org_[0] - axis_[0][0]*12; + otherPos[1] = org_[1] - axis_[0][1]*12; + otherPos[2] = org_[2] - axis_[0][2]*12; + + otherDir[0] = -axis_[0][0]; + otherDir[1] = -axis_[0][1]; + otherDir[2] = -axis_[0][2]; + + VectorMA( otherPos, dualSaberLen*dualLen, otherDir, otherEnd ); + VectorAdd( otherEnd, otherDir, otherEnd ); + } + + scolor = cgs.clientinfo[cent->currentState.number].icolor1; + + if (cgs.gametype >= GT_TEAM && !cgs.jediVmerc ) + { + if (cgs.clientinfo[cent->currentState.number].team == TEAM_RED) + { + scolor = SABER_RED; + } + else if (cgs.clientinfo[cent->currentState.number].team == TEAM_BLUE) + { + scolor = SABER_BLUE; + } + } + + if (!cg_saberContact.integer) + { //if we don't have saber contact enabled, just add the blade and don't care what it's touching + goto CheckTrail; + } + +#ifdef G2_COLLISION_ENABLED + if (cg_saberModelTraceEffect.integer) + { + CG_G2SaberEffects(org_, end, cent); + } +#endif + + for ( i = 0; i < 1; i++ )//was 2 because it would go through architecture and leave saber trails on either side of the brush - but still looks bad if we hit a corner, blade is still 8 longer than hit + { + if ( i ) + {//tracing from end to base + CG_Trace( &trace, end, NULL, NULL, org_, ENTITYNUM_NONE, MASK_SOLID ); + } + else + {//tracing from base to end + CG_Trace( &trace, org_, NULL, NULL, end, ENTITYNUM_NONE, MASK_SOLID ); + } + + if ( trace.fraction < 1.0f ) + { + vec3_t trDir; + VectorCopy(trace.plane.normal, trDir); + if (!trDir[0] && !trDir[1] && !trDir[2]) + { + trDir[1] = 1; + } + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), trace.endpos, trDir ); + + //Stop saber? (it wouldn't look right if it was stuck through a thin wall and unable to hurt players on the other side) + VectorSubtract(org_, trace.endpos, v); + saberLen = VectorLength(v); + + VectorCopy(trace.endpos, end); + + if (cent->currentState.bolt2) + { + break; + } + // All I need is a bool to mark whether I have a previous point to work with. + //....come up with something better.. + if ( client->saberTrail.haveOldPos[i] ) + { + if ( trace.entityNum == ENTITYNUM_WORLD ) + {//only put marks on architecture + // Let's do some cool burn/glowing mark bits!!! + CG_CreateSaberMarks( client->saberTrail.oldPos[i], trace.endpos, trace.plane.normal ); + + //make a sound + if ( cg.time - client->saberHitWallSoundDebounceTime >= 100 ) + {//ugh, need to have a real sound debouncer... or do this game-side + client->saberHitWallSoundDebounceTime = cg.time; + trap_S_StartSound ( trace.endpos, -1, CHAN_WEAPON, trap_S_RegisterSound( va("sound/weapons/saber/saberhitwall%i", Q_irand(1, 3)) ) ); + } + } + } + else + { + // if we impact next frame, we'll mark a slash mark + client->saberTrail.haveOldPos[i] = qtrue; +// CG_ImpactMark( cgs.media.rivetMarkShader, client->saberTrail.oldPos[i], client->saberTrail.oldNormal[i], +// 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, qfalse, 1.1f, qfalse ); + } + + // stash point so we can connect-the-dots later + VectorCopy( trace.endpos, client->saberTrail.oldPos[i] ); + VectorCopy( trace.plane.normal, client->saberTrail.oldNormal[i] ); + } + else + { + if (cent->currentState.bolt2) + { + break; + } + + if ( client->saberTrail.haveOldPos[i] ) + { + // Hmmm, no impact this frame, but we have an old point + // Let's put the mark there, we should use an endcap mark to close the line, but we + // can probably just get away with a round mark +// CG_ImpactMark( cgs.media.rivetMarkShader, client->saberTrail.oldPos[i], client->saberTrail.oldNormal[i], +// 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, qfalse, 1.1f, qfalse ); + } + + // we aren't impacting, so turn off our mark tracking mechanism + client->saberTrail.haveOldPos[i] = qfalse; + } + } + + if (cent->currentState.bolt2) + { + for ( i = 0; i < 1; i++ )//was 2 because it would go through architecture and leave saber trails on either side of the brush - but still looks bad if we hit a corner, blade is still 8 longer than hit + { + CG_Trace( &trace, otherPos, NULL, NULL, otherEnd, ENTITYNUM_NONE, MASK_SOLID ); + + if ( trace.fraction < 1.0f ) + { + vec3_t trDir; + VectorCopy(trace.plane.normal, trDir); + if (!trDir[0] && !trDir[1] && !trDir[2]) + { + trDir[1] = 1; + } + + trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), trace.endpos, trDir ); + + //Stop saber? (it wouldn't look right if it was stuck through a thin wall and unable to hurt players on the other side) + VectorSubtract(otherPos, trace.endpos, v); + dualSaberLen = VectorLength(v); + + VectorCopy(trace.endpos, end); + } + } + } +CheckTrail: + + if (!cg_saberTrail.integer) + { //don't do the trail in this case + goto JustDoIt; + } + + saberTrail = &client->saberTrail; + + // if we happen to be timescaled or running in a high framerate situation, we don't want to flood + // the system with very small trail slices...but perhaps doing it by distance would yield better results? + if ( cg.time > saberTrail->lastTime + 2 ) // 2ms + { + if ( (saberMoveData[cent->currentState.saberMove].trailLength > 0 || ((cent->currentState.powerups & (1 << PW_SPEED) && cg_speedTrail.integer)) || cent->currentState.saberInFlight) && cg.time < saberTrail->lastTime + 2000 ) // if we have a stale segment, don't draw until we have a fresh one + { + vec3_t rgb1={255.0f,255.0f,255.0f}; + + switch( scolor ) + { + case SABER_RED: + VectorSet( rgb1, 255.0f, 0.0f, 0.0f ); + break; + case SABER_ORANGE: + VectorSet( rgb1, 255.0f, 64.0f, 0.0f ); + break; + case SABER_YELLOW: + VectorSet( rgb1, 255.0f, 255.0f, 0.0f ); + break; + case SABER_GREEN: + VectorSet( rgb1, 0.0f, 255.0f, 0.0f ); + break; + case SABER_BLUE: + VectorSet( rgb1, 0.0f, 64.0f, 255.0f ); + break; + case SABER_PURPLE: + VectorSet( rgb1, 220.0f, 0.0f, 255.0f ); + break; + default: + VectorSet( rgb1, 0.0f, 64.0f, 255.0f ); + break; + } + + //Here we will use the happy process of filling a struct in with arguments and passing it to a trap function + //so that we can take the struct and fill in an actual CTrail type using the data within it once we get it + //into the effects area + + // Go from new muzzle to new end...then to old end...back down to old muzzle...finally + // connect back to the new muzzle...this is our trail quad + VectorCopy( org_, fx.mVerts[0].origin ); + VectorMA( end, 3.0f, axis_[0], fx.mVerts[1].origin ); + + VectorCopy( saberTrail->tip, fx.mVerts[2].origin ); + VectorCopy( saberTrail->base, fx.mVerts[3].origin ); + + diff = cg.time - saberTrail->lastTime; + + // I'm not sure that clipping this is really the best idea + //This prevents the trail from showing at all in low framerate situations. + //if ( diff <= SABER_TRAIL_TIME * 2 ) + { + float oldAlpha = 1.0f - ( diff / SABER_TRAIL_TIME ); + + // New muzzle + VectorCopy( rgb1, fx.mVerts[0].rgb ); + fx.mVerts[0].alpha = 255.0f; + + fx.mVerts[0].ST[0] = 0.0f; + fx.mVerts[0].ST[1] = 1.0f; + fx.mVerts[0].destST[0] = 1.0f; + fx.mVerts[0].destST[1] = 1.0f; + + // new tip + VectorCopy( rgb1, fx.mVerts[1].rgb ); + fx.mVerts[1].alpha = 255.0f; + + fx.mVerts[1].ST[0] = 0.0f; + fx.mVerts[1].ST[1] = 0.0f; + fx.mVerts[1].destST[0] = 1.0f; + fx.mVerts[1].destST[1] = 0.0f; + + // old tip + VectorCopy( rgb1, fx.mVerts[2].rgb ); + fx.mVerts[2].alpha = 255.0f; + + fx.mVerts[2].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want + fx.mVerts[2].ST[1] = 0.0f; + fx.mVerts[2].destST[0] = 1.0f + fx.mVerts[2].ST[0]; + fx.mVerts[2].destST[1] = 0.0f; + + // old muzzle + VectorCopy( rgb1, fx.mVerts[3].rgb ); + fx.mVerts[3].alpha = 255.0f; + + fx.mVerts[3].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want + fx.mVerts[3].ST[1] = 1.0f; + fx.mVerts[3].destST[0] = 1.0f + fx.mVerts[2].ST[0]; + fx.mVerts[3].destST[1] = 1.0f; + + fx.mShader = cgs.media.saberBlurShader; + fx.mSetFlags = FX_USE_ALPHA; + fx.mKillTime = SABER_TRAIL_TIME; + + trap_FX_AddPrimitive(&fx); + } + + if (cent->currentState.bolt2) + { + float oldAlpha = 1.0f - ( diff / SABER_TRAIL_TIME ); + + VectorCopy( otherPos, fx.mVerts[0].origin ); + VectorMA( otherEnd, 3.0f, otherDir, fx.mVerts[1].origin ); + + VectorCopy( saberTrail->dualtip, fx.mVerts[2].origin ); + VectorCopy( saberTrail->dualbase, fx.mVerts[3].origin ); + + // New muzzle + VectorCopy( rgb1, fx.mVerts[0].rgb ); + fx.mVerts[0].alpha = 255.0f; + + fx.mVerts[0].ST[0] = 0.0f; + fx.mVerts[0].ST[1] = 1.0f; + fx.mVerts[0].destST[0] = 1.0f; + fx.mVerts[0].destST[1] = 1.0f; + + // new tip + VectorCopy( rgb1, fx.mVerts[1].rgb ); + fx.mVerts[1].alpha = 255.0f; + + fx.mVerts[1].ST[0] = 0.0f; + fx.mVerts[1].ST[1] = 0.0f; + fx.mVerts[1].destST[0] = 1.0f; + fx.mVerts[1].destST[1] = 0.0f; + + // old tip + VectorCopy( rgb1, fx.mVerts[2].rgb ); + fx.mVerts[2].alpha = 255.0f; + + fx.mVerts[2].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want + fx.mVerts[2].ST[1] = 0.0f; + fx.mVerts[2].destST[0] = 1.0f + fx.mVerts[2].ST[0]; + fx.mVerts[2].destST[1] = 0.0f; + + // old muzzle + VectorCopy( rgb1, fx.mVerts[3].rgb ); + fx.mVerts[3].alpha = 255.0f; + + fx.mVerts[3].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want + fx.mVerts[3].ST[1] = 1.0f; + fx.mVerts[3].destST[0] = 1.0f + fx.mVerts[2].ST[0]; + fx.mVerts[3].destST[1] = 1.0f; + + fx.mShader = cgs.media.saberBlurShader; + fx.mSetFlags = FX_USE_ALPHA; + fx.mKillTime = SABER_TRAIL_TIME; + + trap_FX_AddPrimitive(&fx); + } + } + + // we must always do this, even if we aren't active..otherwise we won't know where to pick up from + VectorCopy( org_, saberTrail->base ); + VectorMA( end, 3.0f, axis_[0], saberTrail->tip ); + saberTrail->lastTime = cg.time; + + if (cent->currentState.bolt2) + { + VectorCopy( otherPos, saberTrail->dualbase ); + VectorMA( otherEnd, 3.0f, otherDir, saberTrail->dualtip ); + } + } + +JustDoIt: + + if (client && cent->currentState.bolt2) + { + float sideOneLen = saberLen*dualLen; + float sideTwoLen = dualSaberLen*dualLen; + + if (sideOneLen < 1) + { + sideOneLen = 1; + } + + CG_DoSaber( org_, axis_[0], sideOneLen, scolor, renderfx ); + + CG_DoSaber( otherPos, otherDir, sideTwoLen, scolor, renderfx ); + } + else + { + // Pass in the renderfx flags attached to the saber weapon model...this is done so that saber glows + // will get rendered properly in a mirror...not sure if this is necessary?? + CG_DoSaber( org_, axis_[0], saberLen, scolor, renderfx ); + } +} + +int CG_IsMindTricked(int trickIndex1, int trickIndex2, int trickIndex3, int trickIndex4, int client) +{ + int checkIn; + int sub = 0; + + if (cg_entities[client].currentState.forcePowersActive & (1 << FP_SEE)) + { + return 0; + } + + if (client > 47) + { + checkIn = trickIndex4; + sub = 48; + } + else if (client > 31) + { + checkIn = trickIndex3; + sub = 32; + } + else if (client > 15) + { + checkIn = trickIndex2; + sub = 16; + } + else + { + checkIn = trickIndex1; + } + + if (checkIn & (1 << (client-sub))) + { + return 1; + } + + return 0; +} + +#define SPEED_TRAIL_DISTANCE 6 + +void CG_DrawPlayerSphere(centity_t *cent, vec3_t origin, float scale, int shader) +{ + refEntity_t ent; + + // Don't draw the shield when the player is dead. + if (cent->currentState.eFlags & EF_DEAD) + { + return; + } + + memset( &ent, 0, sizeof( ent ) ); + + VectorCopy( origin, ent.origin ); + ent.origin[2] += 9.0; + + VectorSubtract(cg.refdef.vieworg, ent.origin, ent.axis[0]); + if (VectorNormalize(ent.axis[0]) <= 0.1f) + { // Entity is right on vieworg. quit. + return; + } + + VectorCopy(cg.refdef.viewaxis[2], ent.axis[2]); + CrossProduct(ent.axis[0], ent.axis[2], ent.axis[1]); + + VectorScale(ent.axis[0], scale, ent.axis[0]); + VectorScale(ent.axis[1], scale, ent.axis[1]); + VectorScale(ent.axis[2], -scale, ent.axis[2]); + + ent.hModel = cgs.media.halfShieldModel; + ent.customShader = shader; + + trap_R_AddRefEntityToScene( &ent ); +} + +void CG_AddLightningBeam(vec3_t start, vec3_t end) +{ + vec3_t dir, chaos, + c1, c2, + v1, v2; + float len, + s1, s2, s3; + + addbezierArgStruct_t b; + + VectorCopy(start, b.start); + VectorCopy(end, b.end); + + VectorSubtract( b.end, b.start, dir ); + len = VectorNormalize( dir ); + + // Get the base control points, we'll work from there + VectorMA( b.start, 0.3333f * len, dir, c1 ); + VectorMA( b.start, 0.6666f * len, dir, c2 ); + + // get some chaos values that really aren't very chaotic :) + s1 = sin( cg.time * 0.005f ) * 2 + crandom() * 0.2f; + s2 = sin( cg.time * 0.001f ); + s3 = sin( cg.time * 0.011f ); + + VectorSet( chaos, len * 0.01f * s1, + len * 0.02f * s2, + len * 0.04f * (s1 + s2 + s3)); + + VectorAdd( c1, chaos, c1 ); + VectorScale( chaos, 4.0f, v1 ); + + VectorSet( chaos, -len * 0.02f * s3, + len * 0.01f * (s1 * s2), + -len * 0.02f * (s1 + s2 * s3)); + + VectorAdd( c2, chaos, c2 ); + VectorScale( chaos, 2.0f, v2 ); + + VectorSet( chaos, 1.0f, 1.0f, 1.0f ); + + VectorCopy(c1, b.control1); + VectorCopy(vec3_origin, b.control1Vel); + VectorCopy(c2, b.control2); + VectorCopy(vec3_origin, b.control2Vel); + + b.size1 = 6.0f; + b.size2 = 6.0f; + b.sizeParm = 0.0f; + b.alpha1 = 0.0f; + b.alpha2 = 0.2f; + b.alphaParm = 0.5f; + + /* + VectorCopy(WHITE, b.sRGB); + VectorCopy(WHITE, b.eRGB); + */ + + b.sRGB[0] = 255; + b.sRGB[1] = 255; + b.sRGB[2] = 255; + VectorCopy(b.sRGB, b.eRGB); + + b.rgbParm = 0.0f; + b.killTime = 50; + b.shader = trap_R_RegisterShader( "gfx/misc/electric2" ); + b.flags = 0x00000001; //FX_ALPHA_LINEAR + + trap_FX_AddBezier(&b); +} + +void CG_AddRandomLightning(vec3_t start, vec3_t end) +{ + vec3_t inOrg, outOrg; + + VectorCopy(start, inOrg); + VectorCopy(end, outOrg); + + if ( rand() & 1 ) + { + outOrg[0] += Q_irand(0, 24); + inOrg[0] += Q_irand(0, 8); + } + else + { + outOrg[0] -= Q_irand(0, 24); + inOrg[0] -= Q_irand(0, 8); + } + + if ( rand() & 1 ) + { + outOrg[1] += Q_irand(0, 24); + inOrg[1] += Q_irand(0, 8); + } + else + { + outOrg[1] -= Q_irand(0, 24); + inOrg[1] -= Q_irand(0, 8); + } + + if ( rand() & 1 ) + { + outOrg[2] += Q_irand(0, 50); + inOrg[2] += Q_irand(0, 40); + } + else + { + outOrg[2] -= Q_irand(0, 64); + inOrg[2] -= Q_irand(0, 40); + } + + CG_AddLightningBeam(inOrg, outOrg); +} + +extern char *forceHolocronModels[]; + +qboolean CG_ThereIsAMaster(void) +{ + int i = 0; + centity_t *cent; + + while (i < MAX_CLIENTS) + { + cent = &cg_entities[i]; + + if (cent && cent->currentState.isJediMaster) + { + return qtrue; + } + + i++; + } + + return qfalse; +} + +//rww - here begins the majority of my g2animent stuff. +void CG_FootStepGeneric(centity_t *cent, int anim) +{ + int groundType; + + if ((anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || + (anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) + { + groundType = FOOTSTEP_GENERIC; + goto skipCheck; + } + + if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) + { + return; + } + +skipCheck: + groundType = FOOTSTEP_GENERIC;//CG_FootstepForSurface(cent, cent->currentState.number); + +//skipCheck: + + if (!groundType) + { + return; + } + + switch (groundType) + { + case FOOTSTEP_GENERIC: + trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_NORMAL ][rand()&3] ); + break; + case FOOTSTEP_METAL: + trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, + cgs.media.footsteps[ FOOTSTEP_METAL ][rand()&3] ); + break; + default: + break; + } +} + +static void CG_G2EntSetLerpFrameAnimation( centity_t *cent, lerpFrame_t *lf, int newAnimation, float animSpeedMult, qboolean torsoOnly) { + animation_t *anim; + float animSpeed; + int flags=BONE_ANIM_OVERRIDE_FREEZE; + int oldAnim = -1; + int blendTime = 150; + + if (cent->currentState.number < MAX_CLIENTS && + cent->currentState.teamowner && + !cent->isATST) + { + return; + } + + oldAnim = lf->animationNumber; + + lf->animationNumber = newAnimation; + newAnimation &= ~ANIM_TOGGLEBIT; + + if ( newAnimation < 0 || newAnimation >= MAX_TOTALANIMATIONS ) { +// CG_Error( "Bad animation number: %i", newAnimation ); + return; + } + + anim = &bgGlobalAnimations[ newAnimation ]; + + lf->animation = anim; + lf->animationTime = lf->frameTime + anim->initialLerp; + + if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { + CG_Printf( "%d: %d Anim: %i, '%s'\n", cg.time, cent->currentState.clientNum, newAnimation, GetStringForID(animTable, newAnimation)); + } + + if (cent->ghoul2) + { + animSpeed = 50.0f / anim->frameLerp; + if (lf->animation->loopFrames != -1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->isATST) + { + if (animSpeed < 0.3) + { + animSpeed = 0.3; + } + + if (newAnimation == BOTH_WALKBACK1) + { + animSpeed = 0.8; + } + + if (newAnimation != BOTH_DEATH1) + { + flags = BONE_ANIM_OVERRIDE_LOOP; + } + } + + if (cg_animBlend.integer) + { + flags |= BONE_ANIM_BLEND; + } + + if (!cent->isATST) + { + if (/*BG_FlippingAnim(newAnimation) ||*/ BG_InDeathAnim(newAnimation)) + { + flags &= ~BONE_ANIM_BLEND; + } + else if ( oldAnim != -1 && + (/*BG_FlippingAnim(oldAnim) ||*/ BG_InDeathAnim(oldAnim)) ) + { + flags &= ~BONE_ANIM_BLEND; + } + + if (flags & BONE_ANIM_BLEND) + { + if (BG_FlippingAnim(newAnimation)) + { + blendTime = 200; + } + else if ( oldAnim != -1 && + (BG_FlippingAnim(oldAnim)) ) + { + blendTime = 200; + } + } + } + + animSpeed *= animSpeedMult; + + if (torsoOnly) + { + lf->animationTorsoSpeed = animSpeedMult; + } + else + { + lf->animationSpeed = animSpeedMult; + } + + if (cent->isATST) + { + int atstBlend = 400; + + if (torsoOnly) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "pelvis", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); + } + } + else + { + if (torsoOnly) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed,cg.time, -1, blendTime); + } + else + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); + } + + /* + if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation && + !BG_FlippingAnim( cent->currentState.legsAnim ) && + !BG_SpinningSaberAnim( cent->currentState.legsAnim ) && + !BG_SpinningSaberAnim( cent->currentState.torsoAnim ) && + !BG_InSpecialJump( cent->currentState.legsAnim ) && + !BG_InSpecialJump( cent->currentState.torsoAnim ) && + !BG_InDeathAnim(cent->currentState.legsAnim) && + !BG_InDeathAnim(cent->currentState.torsoAnim) && + !CG_InRoll(cent) && + !BG_SaberInSpecial(cent->currentState.saberMove) && + !BG_SaberInSpecialAttack(cent->currentState.torsoAnim) && + !BG_SaberInSpecialAttack(cent->currentState.legsAnim) ) + */ + if (cg.snap && cg.snap->ps.clientNum == cent->currentState.number) + { //go ahead and use the predicted state if you can. + if ((cg.predictedPlayerState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); + } + } + else + { + if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation) + { + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); + } + } + } + } +} + +static void CG_G2EntRunLerpFrame( centity_t *cent, lerpFrame_t *lf, int newAnimation, float speedScale, qboolean torsoOnly) +{ + int f, numFrames; + animation_t *anim; + + // debugging tool to get no animations + if ( cg_animSpeed.integer == 0 ) { + lf->oldFrame = lf->frame = lf->backlerp = 0; + return; + } + + // see if the animation sequence is switching + if (cent->currentState.forceFrame) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; //|BONE_ANIM_BLEND; + float animSpeed = 1.0f; + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); + + lf->animationNumber = 0; + } + else if ( (newAnimation != lf->animationNumber || !lf->animation) || (CG_FirstAnimFrame(lf, torsoOnly, speedScale)) ) + { + CG_G2EntSetLerpFrameAnimation( cent, lf, newAnimation, speedScale, torsoOnly); + } + else if (cent->isATST) + { + if (cent->pe.legs.yawing != !lf->torsoYawing) + { + CG_G2EntSetLerpFrameAnimation( cent, lf, newAnimation, speedScale, torsoOnly); + lf->torsoYawing = cent->pe.legs.yawing; + } + } + + // if we have passed the current frame, move it to + // oldFrame and calculate a new frame + if ( cg.time >= lf->frameTime ) { + if (lf->oldFrame != lf->frame && + lf == &(cent->pe.legs)) + { + int addFinalFrame = CG_InWalkingAnim(lf->animationNumber); //9; + + if (!cent->isATST && + ((lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || (lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) && + addFinalFrame) + { + if ( lf->frame >= (lf->animation->firstFrame+2) && + lf->oldFrame < (lf->animation->firstFrame+2)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && + lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+12) && + lf->oldFrame < (lf->animation->firstFrame+12)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+16) && + lf->oldFrame < (lf->animation->firstFrame+16)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) + { //missed one + CG_FootStepGeneric(cent, lf->animationNumber); + } + } + else if (addFinalFrame && !cent->isATST) + { + if ( lf->frame >= (lf->animation->firstFrame+3) && + lf->oldFrame < (lf->animation->firstFrame+3)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && + lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) + { + CG_FootStepGeneric(cent, lf->animationNumber); + } + else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) + { //missed one + CG_FootStepGeneric(cent, lf->animationNumber); + } + } + } + + lf->oldFrame = lf->frame; + lf->oldFrameTime = lf->frameTime; + + // get the next frame based on the animation + anim = lf->animation; + if ( !anim->frameLerp ) { + return; // shouldn't happen + } + + if ( cg.time < lf->animationTime ) { + lf->frameTime = lf->animationTime; // initial lerp + } else { + lf->frameTime = lf->oldFrameTime + anim->frameLerp; + } + f = ( lf->frameTime - lf->animationTime ) / anim->frameLerp; + f *= speedScale; // adjust for haste, etc + + numFrames = anim->numFrames; + if (anim->flipflop) { + numFrames *= 2; + } + if ( f >= numFrames ) { + f -= numFrames; + if ( anim->loopFrames != -1 ) //Before 0 meant no loop + { + if(anim->numFrames - anim->loopFrames == 0) + { + f %= anim->numFrames; + } + else + { + f %= (anim->numFrames - anim->loopFrames); + } + f += anim->loopFrames; + } + else + { + f = numFrames - 1; + // the animation is stuck at the end, so it + // can immediately transition to another sequence + lf->frameTime = cg.time; + } + } + if ( anim->reversed ) { + lf->frame = anim->firstFrame + anim->numFrames - 1 - f; + } + else if (anim->flipflop && f>=anim->numFrames) { + lf->frame = anim->firstFrame + anim->numFrames - 1 - (f%anim->numFrames); + } + else { + lf->frame = anim->firstFrame + f; + } + if ( cg.time > lf->frameTime ) { + lf->frameTime = cg.time; + if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { + CG_Printf( "Clamp lf->frameTime\n"); + } + } + } + + if ( lf->frameTime > cg.time + 200 ) { + lf->frameTime = cg.time; + } + + if ( lf->oldFrameTime > cg.time ) { + lf->oldFrameTime = cg.time; + } + // calculate current lerp value + if ( lf->frameTime == lf->oldFrameTime ) { + lf->backlerp = 0; + } else { + lf->backlerp = 1.0 - (float)( cg.time - lf->oldFrameTime ) / ( lf->frameTime - lf->oldFrameTime ); + } +} + +static void CG_G2EntAnimation( centity_t *cent, int *legsOld, int *legs, float *legsBackLerp, + int *torsoOld, int *torso, float *torsoBackLerp ) { + float speedScale; + + if ( cg_noPlayerAnims.integer ) { + *legsOld = *legs = *torsoOld = *torso = 0; + return; + } + + if (cent->currentState.forcePowersActive & (1 << FP_RAGE)) + { + speedScale = 1.3; + } + else if (cent->currentState.forcePowersActive & (1 << FP_SPEED)) + { + speedScale = 1.7; + } + else + { + speedScale = 1; + } + + CG_G2EntRunLerpFrame( cent, ¢->pe.legs, cent->currentState.legsAnim, speedScale, qfalse); + + if (!(cent->currentState.forcePowersActive & (1 << FP_RAGE))) + { //don't affect torso anim speed unless raged + speedScale = 1; + } + else + { + speedScale = 1.7; + } + + *legsOld = cent->pe.legs.oldFrame; + *legs = cent->pe.legs.frame; + *legsBackLerp = cent->pe.legs.backlerp; + + CG_G2EntRunLerpFrame( cent, ¢->pe.torso, cent->currentState.torsoAnim, speedScale, qtrue ); + + *torsoOld = cent->pe.torso.oldFrame; + *torso = cent->pe.torso.frame; + *torsoBackLerp = cent->pe.torso.backlerp; +} + +void CG_G2AnimEntSpineAngles( centity_t *cent, vec3_t viewAngles, const vec3_t angles, vec3_t thoracicAngles, vec3_t ulAngles, vec3_t llAngles ) +{ + int ang = 0; + + if (cent->isATST || cent->currentState.teamowner) + { + return; + } + + VectorClear(ulAngles); + VectorClear(llAngles); + + //cent->pe.torso.pitchAngle = viewAngles[PITCH]; + viewAngles[YAW] = AngleDelta( cent->lerpAngles[YAW], angles[YAW] ); + //cent->pe.torso.yawAngle = viewAngles[YAW]; + + //distribute the angles differently up the spine + //NOTE: each of these distributions must add up to 1.0f + thoracicAngles[PITCH] = 0;//viewAngles[PITCH]*0.20f; + llAngles[PITCH] = 0;//viewAngles[PITCH]*0.40f; + ulAngles[PITCH] = 0;//viewAngles[PITCH]*0.40f; + + thoracicAngles[YAW] = viewAngles[YAW]*0.20f - (viewAngles[PITCH]*(viewAngles[YAW]*.020f)); + ulAngles[YAW] = viewAngles[YAW]*0.25f - (viewAngles[PITCH]*(viewAngles[YAW]*.0005f)); + llAngles[YAW] = viewAngles[YAW]*0.25f - (viewAngles[PITCH]*(viewAngles[YAW]*.0005f)); + + if (thoracicAngles[YAW] > 20) + { + thoracicAngles[YAW] = 20; + } + if (ulAngles[YAW] > 20) + { + ulAngles[YAW] = 20; + } + if (llAngles[YAW] > 20) + { + llAngles[YAW] = 20; + } + + thoracicAngles[ROLL] = viewAngles[ROLL]*0.20f; + ulAngles[ROLL] = viewAngles[ROLL]*0.35f; + llAngles[ROLL] = viewAngles[ROLL]*0.45f; + + for ( ang = 0; ang < 3; ang++ ) + { + if (ulAngles[ang] < 0) + { + ulAngles[ang] += 360; + } + } +} + +static void CG_G2AnimEntAngles( centity_t *cent, vec3_t legs[3], vec3_t legsAngles) +{ + vec3_t torsoAngles, headAngles; + float dest; + static int movementOffsets[8] = { 0, 22, 45, -22, 0, 22, -45, -22 }; + vec3_t velocity; + float speed; //, speed_dif, speed_desired; + int dir; + vec3_t velPos, velAng; + int adddir = 0; + float dif; + float degrees_negative = 0; + float degrees_positive = 0; + vec3_t ulAngles, llAngles, viewAngles, angles, thoracicAngles = {0,0,0}; + + VectorCopy( cent->lerpAngles, headAngles ); + headAngles[YAW] = AngleMod( headAngles[YAW] ); + VectorClear( legsAngles ); + VectorClear( torsoAngles ); + + // --------- yaw ------------- + + // allow yaw to drift a bit + if ((( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) != BOTH_STAND1) || + ( cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ) != WeaponReadyAnim[cent->currentState.weapon] ) + { + // if not standing still, always point all in the same direction + cent->pe.torso.yawing = qtrue; // always center + cent->pe.torso.pitching = qtrue; // always center + cent->pe.legs.yawing = qtrue; // always center + } + + dir = 0; + if (!cent->isATST) + { + torsoAngles[YAW] = headAngles[YAW] + 0.25 * movementOffsets[ dir ]; + } + else + { + torsoAngles[YAW] = headAngles[YAW]; + } + + //for now, turn torso instantly and let the legs swing to follow + cent->pe.torso.yawAngle = torsoAngles[YAW]; + + // --------- pitch ------------- + + VectorCopy( cent->currentState.pos.trDelta, velocity ); + speed = VectorNormalize( velocity ); + + if (!speed) + { + torsoAngles[YAW] = headAngles[YAW]; + } + + // only show a fraction of the pitch angle in the torso + if ( headAngles[PITCH] > 180 ) { + dest = (-360 + headAngles[PITCH]) * 0.75; + } else { + dest = headAngles[PITCH] * 0.75; + } + CG_SwingAngles( dest, 15, 30, 0.1, ¢->pe.torso.pitchAngle, ¢->pe.torso.pitching ); + torsoAngles[PITCH] = cent->pe.torso.pitchAngle; + + if ( speed ) { + vec3_t axis[3]; + float side; + + speed *= 0.05; + + AnglesToAxis( legsAngles, axis ); + side = speed * DotProduct( velocity, axis[1] ); + legsAngles[ROLL] -= side; + + side = speed * DotProduct( velocity, axis[0] ); + legsAngles[PITCH] += side; + } + + //rww - crazy velocity-based leg angle calculation + legsAngles[YAW] = headAngles[YAW]; + velPos[0] = cent->lerpOrigin[0] + velocity[0]; + velPos[1] = cent->lerpOrigin[1] + velocity[1]; + velPos[2] = cent->lerpOrigin[2];// + velocity[2]; + + if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) + { //off the ground, no direction-based leg angles + VectorCopy(cent->lerpOrigin, velPos); + } + + VectorSubtract(cent->lerpOrigin, velPos, velAng); + + if (!VectorCompare(velAng, vec3_origin)) + { + vectoangles(velAng, velAng); + + if (velAng[YAW] <= legsAngles[YAW]) + { + degrees_negative = (legsAngles[YAW] - velAng[YAW]); + degrees_positive = (360 - legsAngles[YAW]) + velAng[YAW]; + } + else + { + degrees_negative = legsAngles[YAW] + (360 - velAng[YAW]); + degrees_positive = (velAng[YAW] - legsAngles[YAW]); + } + + if (degrees_negative < degrees_positive) + { + dif = degrees_negative; + adddir = 0; + } + else + { + dif = degrees_positive; + adddir = 1; + } + + if (dif > 90) + { + dif = (180 - dif); + } + + if (cent->isATST) + { + if (dif > 360) + { + dif = 360; + } + } + else + { + if (dif > 60) + { + dif = 60; + } + } + + //Slight hack for when playing is running backward + if (dir == 3 || dir == 5) + { + dif = -dif; + } + + if (adddir) + { + legsAngles[YAW] -= dif; + } + else + { + legsAngles[YAW] += dif; + } + } + + cent->pe.legs.yawAngle = legsAngles[YAW]; + legsAngles[YAW] = cent->pe.legs.yawAngle; + + // pain twitch + CG_AddPainTwitch( cent, torsoAngles ); + + legsAngles[ROLL] = 0; + torsoAngles[ROLL] = 0; + + //VectorCopy(legsAngles, cent->turAngles); + //turAngles is used as a smoothing storage vector for g2animents. + + if (cent->isATST) + { + legsAngles[ROLL] = 0; + legsAngles[PITCH] = 0; + } + + // pull the angles back out of the hierarchial chain + AnglesSubtract( headAngles, torsoAngles, headAngles ); + AnglesSubtract( torsoAngles, legsAngles, torsoAngles ); + AnglesToAxis( legsAngles, legs ); + // we assume that model 0 is the player model. + + if (cent->isATST) + { + vec3_t flatYaw; + + flatYaw[YAW] = 0;//cent->lerpAngles[YAW]; + flatYaw[ROLL] = 0; + flatYaw[PITCH] = 0; + CG_G2SetBoneAngles(cent->ghoul2, 0, "pelvis", flatYaw, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", torsoAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + + return; + } + + VectorCopy( cent->lerpAngles, viewAngles ); + viewAngles[YAW] = viewAngles[ROLL] = 0; + viewAngles[PITCH] *= 0.5; + + VectorCopy( cent->lerpAngles, angles ); + angles[PITCH] = 0; + + CG_G2AnimEntSpineAngles(cent, viewAngles, angles, thoracicAngles, ulAngles, llAngles); + + ulAngles[YAW] += torsoAngles[YAW]*0.3; + llAngles[YAW] += torsoAngles[YAW]*0.3; + thoracicAngles[YAW] += torsoAngles[YAW]*0.4; + + ulAngles[PITCH] = torsoAngles[PITCH]*0.3; + llAngles[PITCH] = torsoAngles[PITCH]*0.3; + thoracicAngles[PITCH] = torsoAngles[PITCH]*0.4; + + ulAngles[ROLL] += torsoAngles[ROLL]*0.3; + llAngles[ROLL] += torsoAngles[ROLL]*0.3; + thoracicAngles[ROLL] += torsoAngles[ROLL]*0.4; + + CG_G2SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", ulAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", llAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", thoracicAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); + CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +} + +#define SMOOTH_G2ANIM_LERPORIGIN + +void CG_DrawNoForceSphere(centity_t *cent, vec3_t origin, float scale, int shader) +{ + refEntity_t ent; + + // Don't draw the shield when the player is dead. + if (cent->currentState.eFlags & EF_DEAD) + { + return; + } + + memset( &ent, 0, sizeof( ent ) ); + + VectorCopy( origin, ent.origin ); + ent.origin[2] += 9.0; + + VectorSubtract(cg.refdef.vieworg, ent.origin, ent.axis[0]); + if (VectorNormalize(ent.axis[0]) <= 0.1f) + { // Entity is right on vieworg. quit. + return; + } + + VectorCopy(cg.refdef.viewaxis[2], ent.axis[2]); + CrossProduct(ent.axis[0], ent.axis[2], ent.axis[1]); + + VectorScale(ent.axis[0], scale, ent.axis[0]); + VectorScale(ent.axis[1], scale, ent.axis[1]); + VectorScale(ent.axis[2], -scale, ent.axis[2]); + + ent.shaderRGBA[3] = (cent->currentState.genericenemyindex - cg.time)/8; + ent.renderfx |= RF_RGB_TINT; + if (ent.shaderRGBA[3] > 200) + { + ent.shaderRGBA[3] = 200; + } + if (ent.shaderRGBA[3] < 1) + { + ent.shaderRGBA[3] = 1; + } + + ent.shaderRGBA[2] = 0; + ent.shaderRGBA[0] = ent.shaderRGBA[1] = ent.shaderRGBA[3]; + + ent.hModel = cgs.media.halfShieldModel; + ent.customShader = shader; + + trap_R_AddRefEntityToScene( &ent ); +} + +void CG_G2Animated( centity_t *cent ) +{ + refEntity_t legs; + refEntity_t torso; + int renderfx = 0; + qboolean shadow = qfalse; + float shadowPlane = 0; + qboolean dead = qfalse; + vec3_t rootAngles; +#ifdef SMOOTH_G2ANIM_LERPORIGIN + vec3_t posDif; + float smoothFactor = 0.4f; + int k = 0; +#endif + + cent->ghoul2 = cg_entities[cent->currentState.number].ghoul2; + + if (!cent->ghoul2) + { //Initialize this g2 anim ent, then return (will start rendering next frame) + const char *modelName = CG_ConfigString( CS_MODELS+cent->currentState.modelindex ); + + if (modelName && modelName[0]) + { + trap_G2API_InitGhoul2Model(¢->ghoul2, modelName, 0, 0, 0, 0, 0); + if (cent->ghoul2) + { + trap_G2API_AddBolt(cent->ghoul2, 0, "*r_hand"); + trap_G2API_AddBolt(cent->ghoul2, 0, "*l_hand"); + trap_G2API_AddBolt(cent->ghoul2, 0, "*head_top"); + trap_G2API_AddBolt(cent->ghoul2, 0, "Motion"); + } + } + return; + } + + if (cent->currentState.weapon && + !trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1) && + !(cent->currentState.eFlags & EF_DEAD)) + { //if the server says we have a weapon and we haven't copied one onto ourselves yet, then do so. + trap_G2API_CopySpecificGhoul2Model(g2WeaponInstances[cent->currentState.weapon], 0, cent->ghoul2, 1); + } + + if (cent->torsoBolt && !(cent->currentState.eFlags & EF_DEAD)) + { //he's alive and has a limb missing still, reattach it and reset the weapon + CG_ReattachLimb(cent); + } + +#ifdef SMOOTH_G2ANIM_LERPORIGIN + if (DistanceSquared(cent->turAngles,cent->lerpOrigin)>12000.0f) + { + VectorCopy(cent->lerpOrigin, cent->turAngles); + } + + VectorSubtract(cent->lerpOrigin, cent->turAngles, posDif); + + for (k=0;k<3;k++) + { + cent->turAngles[k]=(cent->turAngles[k]+posDif[k]*smoothFactor); + cent->lerpOrigin[k]=cent->turAngles[k]; + } +#endif + + if (cent->currentState.weapon) + { + weaponInfo_t *weapon = NULL; + + CG_RegisterWeapon(cent->currentState.weapon); + + weapon = &cg_weapons[cent->currentState.weapon]; + if (weapon) + { + if ( cg.time - cent->muzzleFlashTime <= MUZZLE_FLASH_TIME + 10 ) + { // Handle muzzle flashes + vec3_t flashorigin, flashdir; + mdxaBone_t boltMatrix; + + if (trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { + vec3_t boltAngle; + VectorClear(boltAngle); + boltAngle[YAW] = cent->lerpAngles[YAW]; + trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, boltAngle, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); + + if ( cent->currentState.eFlags & EF_ALT_FIRING ) + { // Check the alt firing first. + if (weapon->altMuzzleEffect) + { + trap_FX_PlayEffectID(weapon->altMuzzleEffect, flashorigin, flashdir); + } + } + else + { // Regular firing + if (weapon->muzzleEffect) + { + trap_FX_PlayEffectID(weapon->muzzleEffect, flashorigin, flashdir); + } + } + } + } + } + } + + memset (&legs, 0, sizeof(legs)); + + CG_SetGhoul2Info(&legs, cent); + + VectorSet(legs.modelScale, 1,1,1); + legs.radius = cent->currentState.g2radius; + VectorClear(legs.angles); + + // add the shadow + shadow = CG_PlayerShadow( cent, &shadowPlane ); + + if ( cg_shadows.integer == 3 && shadow ) { + renderfx |= RF_SHADOW_PLANE; + } + renderfx |= RF_LIGHTING_ORIGIN; // use the same origin for all + + VectorCopy( cent->lerpOrigin, legs.origin ); + VectorCopy( cent->lerpOrigin, legs.lightingOrigin ); + legs.shadowPlane = shadowPlane; + legs.renderfx = renderfx; + VectorCopy (legs.origin, legs.oldorigin); // don't positionally lerp at all + + CG_G2AnimEntAngles( cent, legs.axis, rootAngles ); + + if (cent->currentState.eFlags & EF_DEAD) + { + dead = qtrue; + //rww - since our angles are fixed when we're dead this shouldn't be an issue anyway + //we need to render the dying/dead player because we are now spawning the body on respawn instead of death + //return; + } + + ScaleModelAxis(&legs); + + memset( &torso, 0, sizeof(torso) ); + + VectorCopy(cent->turAngles, cg_entities[cent->currentState.number].turAngles); + VectorCopy(legs.origin, cg_entities[cent->currentState.number].lerpOrigin); + + // get the animation state (after rotation, to allow feet shuffle) + CG_G2EntAnimation( cent, &legs.oldframe, &legs.frame, &legs.backlerp, + &torso.oldframe, &torso.frame, &torso.backlerp ); + + trap_R_AddRefEntityToScene(&legs); + + + // Electricity + //------------------------------------------------ + if ( cent->currentState.emplacedOwner > cg.time ) + { + int dif = cent->currentState.emplacedOwner - cg.time; + + if ( dif > 0 && random() > 0.4f ) + { + // fade out over the last 500 ms + int brightness = 255; + + if ( dif < 500 ) + { + brightness = floor((dif - 500.0f) / 500.0f * 255.0f ); + } + + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.renderfx &= ~RF_MINLIGHT; + + legs.renderfx |= RF_RGB_TINT; + legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = brightness; + legs.shaderRGBA[3] = 255; + + if ( rand() & 1 ) + { + legs.customShader = cgs.media.electricBodyShader; + } + else + { + legs.customShader = cgs.media.electricBody2Shader; + } + + trap_R_AddRefEntityToScene( &legs ); + + if ( random() > 0.9f ) + trap_S_StartSound ( NULL, cent->currentState.number, CHAN_AUTO, cgs.media.crackleSound ); + } + } + + if (cent->currentState.genericenemyindex > cg.time) + { + CG_DrawNoForceSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysalimariShader ); + } +} +//rww - here ends the majority of my g2animent stuff. + +int cgFPLSState = 0; + +void CG_ForceFPLSPlayerModel(centity_t *cent, clientInfo_t *ci) +{ + int clientNum = cent->currentState.number; + animation_t *anim; + + if (cg_fpls.integer && !cg.renderingThirdPerson) + { + int skinHandle; + + skinHandle = trap_R_RegisterSkin("models/players/kyle/model_fpls2.skin"); + + trap_G2API_CleanGhoul2Models(&(ci->ghoul2Model)); + + ci->torsoSkin = skinHandle; + trap_G2API_InitGhoul2Model(&ci->ghoul2Model, "models/players/kyle/model.glm", 0, ci->torsoSkin, 0, 0, 0); + + ci->bolt_rhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*r_hand"); + + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", 0, 12, BONE_ANIM_OVERRIDE_LOOP, 1.0f, cg.time, -1, -1); + trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "upper_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, cg.time); + trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "cranium", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, NULL, 0, cg.time); + + ci->bolt_lhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*l_hand"); + ci->bolt_head = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*head_top"); + + ci->bolt_motion = trap_G2API_AddBolt(ci->ghoul2Model, 0, "Motion"); + + //We need a lower lumbar bolt for footsteps + ci->bolt_llumbar = trap_G2API_AddBolt(ci->ghoul2Model, 0, "lower_lumbar"); + } + else + { + CG_RegisterClientModelname(ci, ci->modelName, ci->skinName, ci->teamName, cent->currentState.number); + } + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.legsAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame; + int setFrame = -1; + float animSpeed = 50.0f / anim->frameLerp; + + if (anim->loopFrames != -1) + { + flags |= BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->pe.legs.frame >= anim->firstFrame && cent->pe.legs.frame <= (anim->firstFrame + anim->numFrames)) + { + setFrame = cent->pe.legs.frame; + } + + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); + + cg_entities[clientNum].currentState.legsAnim = 0; + } + + anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.torsoAnim & ~ANIM_TOGGLEBIT) ]; + + if (anim) + { + int flags = BONE_ANIM_OVERRIDE_FREEZE; + int firstFrame = anim->firstFrame; + int setFrame = -1; + float animSpeed = 50.0f / anim->frameLerp; + + if (anim->loopFrames != -1) + { + flags |= BONE_ANIM_OVERRIDE_LOOP; + } + + if (cent->pe.torso.frame >= anim->firstFrame && cent->pe.torso.frame <= (anim->firstFrame + anim->numFrames)) + { + setFrame = cent->pe.torso.frame; + } + + trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "lower_lumbar", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); + + cg_entities[clientNum].currentState.torsoAnim = 0; + } + + trap_G2API_CleanGhoul2Models(&(cent->ghoul2)); + trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, ¢->ghoul2); + cg_entities[clientNum].ghoul2 = cent->ghoul2; +} + +/* +=============== +CG_Player +=============== +*/ +void CG_Player( centity_t *cent ) { + clientInfo_t *ci; + refEntity_t legs; + refEntity_t torso; + int clientNum; + int renderfx; + qboolean shadow = qfalse; + float shadowPlane = 0; + qboolean dead = qfalse; + vec3_t rootAngles; + refEntity_t seeker; + float angle; + vec3_t angles, dir, elevated, enang, seekorg; + int iwantout = 0, successchange = 0; + int team; + float prefig = 0; + centity_t *enent; + mdxaBone_t boltMatrix, lHandMatrix; + vec3_t efOrg; + vec3_t tDir; + int distVelBase; + int doAlpha = 0; + int effectTimeLayer = 0; + qboolean gotLHandMatrix = qfalse; + qboolean g2HasWeapon = qfalse; + + if (cgQueueLoad) + { + CG_ActualLoadDeferredPlayers(); + cgQueueLoad = qfalse; + } + + // the client number is stored in clientNum. It can't be derived + // from the entity number, because a single client may have + // multiple corpses on the level using the same clientinfo + clientNum = cent->currentState.clientNum; + if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { + CG_Error( "Bad clientNum on player entity"); + } + ci = &cgs.clientinfo[ clientNum ]; + + // it is possible to see corpses from disconnected players that may + // not have valid clientinfo + if ( !ci->infoValid ) { + return; + } + + cent->ghoul2 = cg_entities[cent->currentState.number].ghoul2; + + if (!cent->ghoul2) + { //not ready yet? +#ifdef _DEBUG + Com_Printf("WARNING: Client %i has a null ghoul2 instance\n", cent->currentState.number); +#endif + if (cgs.clientinfo[cent->currentState.number].ghoul2Model && + trap_G2_HaveWeGhoul2Models(cgs.clientinfo[cent->currentState.number].ghoul2Model)) + { +#ifdef _DEBUG + Com_Printf("Clientinfo instance was valid, duplicating for cent\n"); +#endif + trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[cent->currentState.number].ghoul2Model, ¢->ghoul2); + cg_entities[cent->currentState.number].ghoul2 = cent->ghoul2; + } + return; + } + + g2HasWeapon = trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1); + + if (!g2HasWeapon) + { //force a redup of the weapon instance onto the client instance + cent->ghoul2weapon = NULL; + } + + if (cent->torsoBolt && !(cent->currentState.eFlags & EF_DEAD)) + { //he's alive and has a limb missing still, reattach it and reset the weapon + CG_ReattachLimb(cent); + } + else if (cg_entities[cent->currentState.number].torsoBolt && !(cent->currentState.eFlags & EF_DEAD)) + { //It happens. (usually between odd level change events) + cent->torsoBolt = cg_entities[cent->currentState.number].torsoBolt; + cg_entities[cent->currentState.number].torsoBolt = 0; + CG_ReattachLimb(cent); + } + + if (cent->ghoul2 && cent->torsoBolt && (cent->torsoBolt == G2_MODELPART_RARM || cent->torsoBolt == G2_MODELPART_RHAND || cent->torsoBolt == G2_MODELPART_WAIST) && g2HasWeapon) + { //kill the weapon if the limb holding it is no longer on the model + trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); + g2HasWeapon = qfalse; + } + + if (cent->currentState.teamowner && !cent->isATST) + { + cg_entities[cent->currentState.number].currentState.teamowner = cent->currentState.teamowner; + cg_entities[cent->currentState.number].isATST = cent->isATST; + + if (CG_RegisterClientModelname(&cgs.clientinfo[cent->currentState.number], cgs.clientinfo[cent->currentState.number].modelName, cgs.clientinfo[cent->currentState.number].skinName, + cgs.clientinfo[cent->currentState.number].teamName, cent->currentState.number)) + { + cent->isATST = 1; + cg_entities[cent->currentState.number].isATST = cent->isATST; + return; + } + } + else if (!cent->currentState.teamowner && cent->isATST) + { + cg_entities[cent->currentState.number].currentState.teamowner = cent->currentState.teamowner; + cg_entities[cent->currentState.number].isATST = cent->isATST; + + if (CG_RegisterClientModelname(&cgs.clientinfo[cent->currentState.number], cgs.clientinfo[cent->currentState.number].modelName, cgs.clientinfo[cent->currentState.number].skinName, + cgs.clientinfo[cent->currentState.number].teamName, cent->currentState.number)) + { + cent->isATST = 0; + cg_entities[cent->currentState.number].isATST = cent->isATST; + return; + } + } + + if (cent->currentState.number < MAX_CLIENTS && + cent->currentState.teamowner && + !cent->isATST) + { + return; + } + + if (!cent->trickAlphaTime || (cg.time - cent->trickAlphaTime) > 1000) + { //things got out of sync, perhaps a new client is trying to fill in this slot + cent->trickAlpha = 255; + cent->trickAlphaTime = cg.time; + } + + //If this client has tricked you. + if (CG_IsMindTricked(cent->currentState.trickedentindex, + cent->currentState.trickedentindex2, + cent->currentState.trickedentindex3, + cent->currentState.trickedentindex4, + cg.snap->ps.clientNum)) + { + if (cent->trickAlpha > 1) + { + cent->trickAlpha -= (cg.time - cent->trickAlphaTime)*0.5; + cent->trickAlphaTime = cg.time; + + if (cent->trickAlpha < 0) + { + cent->trickAlpha = 0; + } + + doAlpha = 1; + } + else + { + doAlpha = 1; + cent->trickAlpha = 1; + cent->trickAlphaTime = cg.time; + iwantout = 1; + } + } + else + { + if (cent->trickAlpha < 255) + { + cent->trickAlpha += (cg.time - cent->trickAlphaTime); + cent->trickAlphaTime = cg.time; + + if (cent->trickAlpha > 255) + { + cent->trickAlpha = 255; + } + + doAlpha = 1; + } + else + { + cent->trickAlpha = 255; + cent->trickAlphaTime = cg.time; + } + } + + // get the player model information + renderfx = 0; + if ( cent->currentState.number == cg.snap->ps.clientNum) { + if (!cg.renderingThirdPerson) { + if (!cg_fpls.integer || cent->currentState.weapon != WP_SABER) + { + renderfx = RF_THIRD_PERSON; // only draw in mirrors + } + } else { + if (cg_cameraMode.integer) { + iwantout = 1; + + + // goto minimal_add; + + // NOTENOTE Temporary + return; + } + } + } + + // Update the player's client entity information regarding weapons. + // Explanation: The entitystate has a weapond defined on it. The cliententity does as well. + // The cliententity's weapon tells us what the ghoul2 instance on the cliententity has bolted to it. + // If the entitystate and cliententity weapons differ, then the state's needs to be copied to the client. + // Save the old weapon, to verify that it is or is not the same as the new weapon. + // rww - Make sure weapons don't get set BEFORE cent->ghoul2 is initialized or else we'll have no + // weapon bolted on + if (cent->currentState.saberInFlight) + { + cent->ghoul2weapon = g2WeaponInstances[WP_SABER]; + } + + if (cent->ghoul2 && + cent->ghoul2weapon != g2WeaponInstances[cent->currentState.weapon] && + !(cent->currentState.eFlags & EF_DEAD) && !cent->torsoBolt && !cent->isATST) + { + CG_CopyG2WeaponInstance(cent->currentState.weapon, cent->ghoul2); + + if (!(cg.snap->ps.pm_flags & PMF_FOLLOW)) + { + if (cent->weapon == WP_SABER && cent->weapon != cent->currentState.weapon && !cent->currentState.shouldtarget) + { //switching away from the saber + trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberoffquick.wav" )); + } + else if (cent->currentState.weapon == WP_SABER && cent->weapon != cent->currentState.weapon) + { //switching to the saber + trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" )); + } + } + + cent->weapon = cent->currentState.weapon; + cent->ghoul2weapon = g2WeaponInstances[cent->currentState.weapon]; + } + else if ((cent->currentState.eFlags & EF_DEAD) || cent->torsoBolt) + { + cent->ghoul2weapon = NULL; //be sure to update after respawning/getting limb regrown + } + + + memset (&legs, 0, sizeof(legs)); + + CG_SetGhoul2Info(&legs, cent); + + VectorSet(legs.modelScale, 1,1,1); + legs.radius = 64; + VectorClear(legs.angles); + + if (cent->isATST) + { + legs.radius = 400; + } + +// minimal_add: + + team = cgs.clientinfo[ cent->currentState.clientNum ].team; + + if (cgs.gametype >= GT_TEAM && cg_drawFriend.integer && + cent->currentState.number != cg.snap->ps.clientNum) // Don't show a sprite above a player's own head in 3rd person. + { // If the view is either a spectator or on the same team as this character, show a symbol above their head. + if ((cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || cg.snap->ps.persistant[PERS_TEAM] == team) && + !(cent->currentState.eFlags & EF_DEAD)) + { + if (team == TEAM_RED) + { + CG_PlayerFloatSprite( cent, cgs.media.teamRedShader); + } + else // if (team == TEAM_BLUE) + { + CG_PlayerFloatSprite( cent, cgs.media.teamBlueShader); + } + } + } + + if (cgs.gametype == GT_JEDIMASTER && cg_drawFriend.integer && + cent->currentState.number != cg.snap->ps.clientNum) // Don't show a sprite above a player's own head in 3rd person. + { // If the view is either a spectator or on the same team as this character, show a symbol above their head. + if ((cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || cg.snap->ps.persistant[PERS_TEAM] == team) && + !(cent->currentState.eFlags & EF_DEAD)) + { + if (CG_ThereIsAMaster()) + { + if (!cg.snap->ps.isJediMaster) + { + if (!cent->currentState.isJediMaster) + { + CG_PlayerFloatSprite( cent, cgs.media.teamRedShader); + } + } + } + } + } + + if (cent->isATST) + { + goto doEssentialOne; + } + + // add the shadow + shadow = CG_PlayerShadow( cent, &shadowPlane ); + + if ( (cent->currentState.eFlags & EF_SEEKERDRONE) || cent->currentState.genericenemyindex != -1 ) + { + memset( &seeker, 0, sizeof(seeker) ); + + VectorCopy(cent->lerpOrigin, elevated); + elevated[2] += 40; + + VectorCopy( elevated, seeker.lightingOrigin ); + seeker.shadowPlane = shadowPlane; + seeker.renderfx = 0; //renderfx; + //don't show in first person? + + angle = ((cg.time / 12) & 255) * (M_PI * 2) / 255; + dir[0] = cos(angle) * 20; + dir[1] = sin(angle) * 20; + dir[2] = cos(angle) * 5; + VectorAdd(elevated, dir, seeker.origin); + + VectorCopy(seeker.origin, seekorg); + + if (cent->currentState.genericenemyindex > 1024) + { + prefig = (cent->currentState.genericenemyindex-cg.time)/80; + + if (prefig > 55) + { + prefig = 55; + } + else if (prefig < 1) + { + prefig = 1; + } + + elevated[2] -= 55-prefig; + + angle = ((cg.time / 12) & 255) * (M_PI * 2) / 255; + dir[0] = cos(angle) * 20; + dir[1] = sin(angle) * 20; + dir[2] = cos(angle) * 5; + VectorAdd(elevated, dir, seeker.origin); + } + else if (cent->currentState.genericenemyindex != ENTITYNUM_NONE && cent->currentState.genericenemyindex != -1) + { + enent = &cg_entities[cent->currentState.genericenemyindex]; + + if (enent) + { + VectorSubtract(enent->lerpOrigin, seekorg, enang); + VectorNormalize(enang); + vectoangles(enang, angles); + successchange = 1; + } + } + + if (!successchange) + { + angles[0] = sin(angle) * 30; + angles[1] = (angle * 180 / M_PI) + 90; + if (angles[1] > 360) + angles[1] -= 360; + angles[2] = 0; + } + + AnglesToAxis( angles, seeker.axis ); + + seeker.hModel = trap_R_RegisterModel("models/items/remote.md3"); + trap_R_AddRefEntityToScene( &seeker ); + } + +doEssentialOne: + // add a water splash if partially in and out of water + CG_PlayerSplash( cent ); + + if ( cg_shadows.integer == 3 && shadow ) { + renderfx |= RF_SHADOW_PLANE; + } + renderfx |= RF_LIGHTING_ORIGIN; // use the same origin for all + + // if we've been hit, display proper fullscreen fx + CG_PlayerHitFX(cent); + + VectorCopy( cent->lerpOrigin, legs.origin ); + + VectorCopy( cent->lerpOrigin, legs.lightingOrigin ); + legs.shadowPlane = shadowPlane; + legs.renderfx = renderfx; + VectorCopy (legs.origin, legs.oldorigin); // don't positionally lerp at all + + CG_G2PlayerAngles( cent, legs.axis, rootAngles ); + + //This call is mainly just to reconstruct the skeleton. But we'll get the left hand matrix while we're at it. + //If we don't reconstruct the skeleton after setting the bone angles, we will get bad bolt points on the model + //(e.g. the weapon model bolt will look "lagged") if there's no other GetBoltMatrix call for the rest of the + //frame. Yes, this is stupid and needs to be fixed properly. + //The current solution is to force it not to reconstruct the skeleton for the first GBM call in G2PlayerAngles. + //It works and we end up only reconstructing it once, but it doesn't seem like the best solution. + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + gotLHandMatrix = qtrue; + + if (cg.renderingThirdPerson) + { + if (cgFPLSState != 0) + { + CG_ForceFPLSPlayerModel(cent, ci); + cgFPLSState = 0; + return; + } + } + else if (ci->team == TEAM_SPECTATOR || (cg.snap && (cg.snap->ps.pm_flags & PMF_FOLLOW))) + { //don't allow this when spectating + if (cgFPLSState != 0) + { + trap_Cvar_Set("cg_fpls", "0"); + cg_fpls.integer = 0; + + CG_ForceFPLSPlayerModel(cent, ci); + cgFPLSState = 0; + return; + } + + if (cg_fpls.integer) + { + trap_Cvar_Set("cg_fpls", "0"); + } + } + else + { + if (cg_fpls.integer && cent->currentState.weapon == WP_SABER && cg.snap && cent->currentState.number == cg.snap->ps.clientNum) + { + + if (cgFPLSState != cg_fpls.integer) + { + CG_ForceFPLSPlayerModel(cent, ci); + cgFPLSState = cg_fpls.integer; + return; + } + + /* + mdxaBone_t headMatrix; + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_head, &headMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + trap_G2API_GiveMeVectorFromMatrix(&headMatrix, ORIGIN, cg.refdef.vieworg); + */ + } + else if (!cg_fpls.integer && cgFPLSState) + { + if (cgFPLSState != cg_fpls.integer) + { + CG_ForceFPLSPlayerModel(cent, ci); + cgFPLSState = cg_fpls.integer; + return; + } + } + } + + if (cent->currentState.eFlags & EF_DEAD) + { + dead = qtrue; + //rww - since our angles are fixed when we're dead this shouldn't be an issue anyway + //we need to render the dying/dead player because we are now spawning the body on respawn instead of death + //return; + } + + ScaleModelAxis(&legs); + + memset( &torso, 0, sizeof(torso) ); + + if (cent->isATST) + { + goto doEssentialTwo; + } + + //rww - force speed "trail" effect + if (!(cent->currentState.powerups & (1 << PW_SPEED)) || doAlpha || !cg_speedTrail.integer) + { + cent->frame_minus1_refreshed = 0; + cent->frame_minus2_refreshed = 0; + } + + if (cent->frame_minus1.ghoul2 != cent->ghoul2) + { + cent->frame_minus1_refreshed = 0; + } + if (cent->frame_minus2.ghoul2 != cent->ghoul2) + { + cent->frame_minus2_refreshed = 0; + } + + VectorCopy(cent->currentState.pos.trDelta, tDir); + + distVelBase = SPEED_TRAIL_DISTANCE*(VectorNormalize(tDir)*0.004); + + if (cent->frame_minus1.ghoul2 && cent->frame_minus1_refreshed) + { + cent->frame_minus1.renderfx |= RF_FORCE_ENT_ALPHA; + cent->frame_minus1.shaderRGBA[3] = 100; + + //rww - if the client gets a bad framerate we will only receive frame positions + //once per frame anyway, so we might end up with speed trails very spread out. + //in order to avoid that, we'll get the direction of the last trail from the player + //and place the trail refent a set distance from the player location this frame + VectorSubtract(cent->frame_minus1.origin, legs.origin, tDir); + VectorNormalize(tDir); + + cent->frame_minus1.origin[0] = legs.origin[0]+tDir[0]*distVelBase; + cent->frame_minus1.origin[1] = legs.origin[1]+tDir[1]*distVelBase; + cent->frame_minus1.origin[2] = legs.origin[2]+tDir[2]*distVelBase; + + trap_R_AddRefEntityToScene(¢->frame_minus1); + } + + if (cent->frame_minus2.ghoul2 && cent->frame_minus2_refreshed) + { + cent->frame_minus2.renderfx |= RF_FORCE_ENT_ALPHA; + cent->frame_minus2.shaderRGBA[3] = 50; + + //Same as above but do it between trail points instead of the player and first trail entry + VectorSubtract(cent->frame_minus2.origin, cent->frame_minus1.origin, tDir); + VectorNormalize(tDir); + + cent->frame_minus2.origin[0] = cent->frame_minus1.origin[0]+tDir[0]*distVelBase; + cent->frame_minus2.origin[1] = cent->frame_minus1.origin[1]+tDir[1]*distVelBase; + cent->frame_minus2.origin[2] = cent->frame_minus1.origin[2]+tDir[2]*distVelBase; + + trap_R_AddRefEntityToScene(¢->frame_minus2); + } + +doEssentialTwo: + VectorCopy(cent->turAngles, cg_entities[cent->currentState.number].turAngles); + VectorCopy(legs.origin, cg_entities[cent->currentState.number].lerpOrigin); + + // get the animation state (after rotation, to allow feet shuffle) + CG_PlayerAnimation( cent, &legs.oldframe, &legs.frame, &legs.backlerp, + &torso.oldframe, &torso.frame, &torso.backlerp ); + + //Need these set because we use them in other functions (cent pointer differs from cg_entities values) + cg_entities[cent->currentState.number].pe.torso.frame = cent->pe.torso.frame; + cg_entities[cent->currentState.number].pe.legs.frame = cent->pe.legs.frame; + + // add the talk baloon or disconnect icon + CG_PlayerSprites( cent ); + + if (cent->currentState.eFlags & EF_DEAD) + { //keep track of death anim frame for when we copy off the bodyqueue + cgs.clientinfo[cent->currentState.number].frame = cent->pe.torso.frame; + } + + if (cent->isATST) + { + goto doEssentialThree; + } + + //rww - render effects multiple times to compensate for low framerate? This won't do much because + //the effect still gets rendered in this frame and expires, possibly before the next frame. So + //it is disabled for now (setting effectTimeLayer to 0 after one play) + if (cent->trailTime < cg.time) + { + cent->trailTime = cg.time; + } + + //compensate for up to 300ms + effectTimeLayer = (300 - (cent->trailTime - cg.time)); + + if (effectTimeLayer < 50) + { //play at least once + effectTimeLayer = 50; + } + + cent->trailTime = cg.time + 300; + + if (cent->currentState.activeForcePass > FORCE_LEVEL_3) + { + int effectTimeLayerL = effectTimeLayer; + + vec3_t axis[3]; + vec3_t tAng, fAng, fxDir; + int realForceLev = (cent->currentState.activeForcePass - FORCE_LEVEL_3); + + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + VectorSet( fAng, cent->pe.torso.pitchAngle, cent->pe.torso.yawAngle, 0 ); + + AngleVectors( fAng, fxDir, NULL, NULL ); + + //trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + if (!gotLHandMatrix) + { + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + gotLHandMatrix = qtrue; + } + + efOrg[0] = lHandMatrix.matrix[0][3]; + efOrg[1] = lHandMatrix.matrix[1][3]; + efOrg[2] = lHandMatrix.matrix[2][3]; + + AnglesToAxis( fAng, axis ); + + while (effectTimeLayerL > 0) + { + if ( realForceLev > FORCE_LEVEL_2 ) + {//arc + //trap_FX_PlayEffectID( cgs.effects.forceLightningWide, efOrg, fxDir ); + trap_FX_PlayEntityEffectID(cgs.effects.forceDrainWide, efOrg, axis, cent->boltInfo, cent->currentState.number); + } + else + {//line + //trap_FX_PlayEffectID( cgs.effects.forceLightning, efOrg, fxDir ); + trap_FX_PlayEntityEffectID(cgs.effects.forceDrain, efOrg, axis, cent->boltInfo, cent->currentState.number); + } + + effectTimeLayerL = 0;//-= 50; + } + + /* + if (cent->bolt4 < cg.time) + { + cent->bolt4 = cg.time + 100; + trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/force/drain.wav") ); + } + */ + } + else if ( cent->currentState.activeForcePass ) + {//doing the electrocuting + int effectTimeLayerL = effectTimeLayer; + + vec3_t axis[3]; + vec3_t tAng, fAng, fxDir; + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + VectorSet( fAng, cent->pe.torso.pitchAngle, cent->pe.torso.yawAngle, 0 ); + + AngleVectors( fAng, fxDir, NULL, NULL ); + + //trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + if (!gotLHandMatrix) + { + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + gotLHandMatrix = qtrue; + } + + efOrg[0] = lHandMatrix.matrix[0][3]; + efOrg[1] = lHandMatrix.matrix[1][3]; + efOrg[2] = lHandMatrix.matrix[2][3]; + + AnglesToAxis( fAng, axis ); + + while (effectTimeLayerL > 0) + { + if ( cent->currentState.activeForcePass > FORCE_LEVEL_2 ) + {//arc + //trap_FX_PlayEffectID( cgs.effects.forceLightningWide, efOrg, fxDir ); + trap_FX_PlayEntityEffectID(cgs.effects.forceLightningWide, efOrg, axis, cent->boltInfo, cent->currentState.number); + } + else + {//line + //trap_FX_PlayEffectID( cgs.effects.forceLightning, efOrg, fxDir ); + trap_FX_PlayEntityEffectID(cgs.effects.forceLightning, efOrg, axis, cent->boltInfo, cent->currentState.number); + } + + effectTimeLayerL = 0;//-= 50; + } + + /* + if (cent->bolt4 < cg.time) + { + cent->bolt4 = cg.time + 100; + trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/force/lightning.wav") ); + } + */ + } + + if ( cent->currentState.powerups & (1 << PW_DISINT_4) ) + { + vec3_t tAng; + //VectorSet( tAng, 0, cent->pe.torso.yawAngle, 0 ); + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + //trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + if (!gotLHandMatrix) + { + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + gotLHandMatrix = qtrue; + } + + efOrg[0] = lHandMatrix.matrix[0][3]; + efOrg[1] = lHandMatrix.matrix[1][3]; + efOrg[2] = lHandMatrix.matrix[2][3]; + + if ( (cent->currentState.forcePowersActive & (1 << FP_GRIP)) && + (cg.renderingThirdPerson || cent->currentState.number != cg.snap->ps.clientNum) ) + { + vec3_t boltDir; + vec3_t origBolt; + VectorCopy(efOrg, origBolt); + trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_Y, boltDir ); + + CG_ForceGripEffect( efOrg ); + CG_ForceGripEffect( efOrg ); + + //Render a scaled version of the model's hand with a n337 looking shader + { + const char *rotateBone; + char *limbName; + char *limbCapName; + vec3_t armAng; + float wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; + + rotateBone = "lradius"; + limbName = "l_arm"; + limbCapName = "l_arm_cap_torso_off"; + + if (cent->grip_arm.ghoul2 && trap_G2_HaveWeGhoul2Models(cent->grip_arm.ghoul2)) + { + trap_G2API_CleanGhoul2Models(&(cent->grip_arm.ghoul2)); + } + + memset( ¢->grip_arm, 0, sizeof(cent->grip_arm) ); + + VectorCopy(origBolt, efOrg); + trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_Y, boltDir ); + efOrg[0] += boltDir[0]*8; + efOrg[1] += boltDir[1]*8; + efOrg[2] += boltDir[2]*8; + trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_X, boltDir ); + efOrg[0] -= boltDir[0]*4; + efOrg[1] -= boltDir[1]*4; + efOrg[2] -= boltDir[2]*4; + + //efOrg[2] += 8; + efOrg[2] -= 4; + + VectorCopy(efOrg, cent->grip_arm.origin); + VectorCopy(cent->grip_arm.origin, cent->grip_arm.lightingOrigin); + + //VectorCopy(cent->lerpAngles, armAng); + VectorAdd(vec3_origin, rootAngles, armAng); + //armAng[ROLL] = -90; + armAng[ROLL] = 0; + armAng[PITCH] = 0; + AnglesToAxis(armAng, cent->grip_arm.axis); + + trap_G2API_DuplicateGhoul2Instance(cent->ghoul2, ¢->grip_arm.ghoul2); + + trap_G2API_SetRootSurface(cent->grip_arm.ghoul2, 0, limbName); + trap_G2API_SetNewOrigin(cent->grip_arm.ghoul2, trap_G2API_AddBolt(cent->grip_arm.ghoul2, 0, rotateBone)); + trap_G2API_SetSurfaceOnOff(cent->grip_arm.ghoul2, limbCapName, 0); + + cent->grip_arm.modelScale[0] = 1;//+(wv*6); + cent->grip_arm.modelScale[1] = 1;//+(wv*6); + cent->grip_arm.modelScale[2] = 1;//+(wv*6); + ScaleModelAxis(¢->grip_arm); + + cent->grip_arm.radius = 64; + + cent->grip_arm.customShader = trap_R_RegisterShader( "gfx/misc/red_portashield" ); + + cent->grip_arm.renderfx |= RF_RGB_TINT; + cent->grip_arm.shaderRGBA[0] = 255 - (wv*900); + if (cent->grip_arm.shaderRGBA[0] < 30) + { + cent->grip_arm.shaderRGBA[0] = 30; + } + if (cent->grip_arm.shaderRGBA[0] > 255) + { + cent->grip_arm.shaderRGBA[0] = 255; + } + cent->grip_arm.shaderRGBA[1] = cent->grip_arm.shaderRGBA[2] = cent->grip_arm.shaderRGBA[0]; + + trap_R_AddRefEntityToScene( ¢->grip_arm ); + } + } + else if (!(cent->currentState.forcePowersActive & (1 << FP_GRIP))) + { + CG_ForcePushBlur( efOrg ); + } + } + + if (cent->currentState.weapon == WP_STUN_BATON && cent->currentState.number == cg.snap->ps.clientNum) + { + trap_S_AddLoopingSound( cent->currentState.number, cg.refdef.vieworg, vec3_origin, + trap_S_RegisterSound( "sound/weapons/baton/idle.wav" ) ); + } + + //NOTE: All effects that should be visible during mindtrick should go above here + + if (iwantout) + { + goto stillDoSaber; + //return; + } + else if (doAlpha) + { + legs.renderfx |= RF_FORCE_ENT_ALPHA; + legs.shaderRGBA[3] = cent->trickAlpha; + + if (legs.shaderRGBA[3] < 1) + { //don't cancel it out even if it's < 1 + legs.shaderRGBA[3] = 1; + } + } + + if (cg_entities[cent->currentState.number].teamPowerEffectTime > cg.time) + { + if (cg_entities[cent->currentState.number].teamPowerType == 3) + { //absorb is a somewhat different effect entirely + //Guess I'll take care of it where it's always been, just checking these values instead. + } + else + { + vec4_t preCol; + int preRFX; + + preRFX = legs.renderfx; + + legs.renderfx |= RF_RGB_TINT; + legs.renderfx |= RF_FORCE_ENT_ALPHA; + + preCol[0] = legs.shaderRGBA[0]; + preCol[1] = legs.shaderRGBA[1]; + preCol[2] = legs.shaderRGBA[2]; + preCol[3] = legs.shaderRGBA[3]; + + if (cg_entities[cent->currentState.number].teamPowerType == 1) + { //heal + legs.shaderRGBA[0] = 0; + legs.shaderRGBA[1] = 255; + legs.shaderRGBA[2] = 0; + } + else if (cg_entities[cent->currentState.number].teamPowerType == 0) + { //regen + legs.shaderRGBA[0] = 0; + legs.shaderRGBA[1] = 0; + legs.shaderRGBA[2] = 255; + } + else + { //drain + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = 0; + legs.shaderRGBA[2] = 0; + } + + legs.shaderRGBA[3] = ((cg_entities[cent->currentState.number].teamPowerEffectTime - cg.time)/8); + + legs.customShader = trap_R_RegisterShader( "powerups/ysalimarishell" ); + trap_R_AddRefEntityToScene(&legs); + + legs.customShader = 0; + legs.renderfx = preRFX; + legs.shaderRGBA[0] = preCol[0]; + legs.shaderRGBA[1] = preCol[1]; + legs.shaderRGBA[2] = preCol[2]; + legs.shaderRGBA[3] = preCol[3]; + } + } + + //If you've tricked this client. + if (CG_IsMindTricked(cg.snap->ps.fd.forceMindtrickTargetIndex, + cg.snap->ps.fd.forceMindtrickTargetIndex2, + cg.snap->ps.fd.forceMindtrickTargetIndex3, + cg.snap->ps.fd.forceMindtrickTargetIndex4, + cent->currentState.number)) + { + if (cent->ghoul2) + { + vec3_t efOrg; + vec3_t tAng, fxAng; + vec3_t axis[3]; + int effectTimeLayerC = effectTimeLayer; + sharedBoltInterface_t fxObj; + + //VectorSet( tAng, 0, cent->pe.torso.yawAngle, 0 ); + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_head, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, efOrg); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_Y, fxAng); + + axis[0][0] = boltMatrix.matrix[0][0]; + axis[0][1] = boltMatrix.matrix[1][0]; + axis[0][2] = boltMatrix.matrix[2][0]; + + axis[1][0] = boltMatrix.matrix[0][1]; + axis[1][1] = boltMatrix.matrix[1][1]; + axis[1][2] = boltMatrix.matrix[2][1]; + + axis[2][0] = boltMatrix.matrix[0][2]; + axis[2][1] = boltMatrix.matrix[1][2]; + axis[2][2] = boltMatrix.matrix[2][2]; + + VectorCopy(/*efOrg*/cent->lerpOrigin, fxObj.origin); + VectorCopy(/*fxAng*/tAng, fxObj.angles); + VectorCopy(cent->modelScale, fxObj.scale); + fxObj.ghoul2 = cent->ghoul2; + fxObj.isValid = 1; + fxObj.modelNum = 0; + fxObj.boltNum = cgs.clientinfo[cent->currentState.number].bolt_head; + fxObj.entNum = cent->currentState.number; + + while (effectTimeLayerC > 0) + { + trap_FX_PlayEntityEffectID(trap_FX_RegisterEffect("force/confusion.efx"), efOrg, axis, cent->boltInfo, cent->currentState.number); + + //FIXME: Due to the horrible inefficiency involved in the current effect bolt process an effect with as many particles as this won't + //work too happily. It also doesn't look a lot better due to the lag between origin updates with the effect bolt. If those issues + //are ever resolved it should be switched over to BoltedEffect. + //trap_FX_PlayBoltedEffectID(trap_FX_RegisterEffect("force/confusion.efx"), &fxObj); + effectTimeLayerC = 0;//-= 50; + } + } + } + + if (cgs.gametype == GT_HOLOCRON && cent->currentState.time2 && (cg.renderingThirdPerson || cg.snap->ps.clientNum != cent->currentState.number)) + { + int i = 0; + int renderedHolos = 0; + refEntity_t holoRef; + + while (i < NUM_FORCE_POWERS && renderedHolos < 3) + { + if (cent->currentState.time2 & (1 << i)) + { + memset( &holoRef, 0, sizeof(holoRef) ); + + VectorCopy(cent->lerpOrigin, elevated); + elevated[2] += 8; + + VectorCopy( elevated, holoRef.lightingOrigin ); + holoRef.shadowPlane = shadowPlane; + holoRef.renderfx = 0;//RF_THIRD_PERSON; + + if (renderedHolos == 0) + { + angle = ((cg.time / 8) & 255) * (M_PI * 2) / 255; + dir[0] = cos(angle) * 20; + dir[1] = sin(angle) * 20; + dir[2] = cos(angle) * 20; + VectorAdd(elevated, dir, holoRef.origin); + + angles[0] = sin(angle) * 30; + angles[1] = (angle * 180 / M_PI) + 90; + if (angles[1] > 360) + angles[1] -= 360; + angles[2] = 0; + AnglesToAxis( angles, holoRef.axis ); + } + else if (renderedHolos == 1) + { + angle = ((cg.time / 8) & 255) * (M_PI * 2) / 255 + M_PI; + if (angle > M_PI * 2) + angle -= (float)M_PI * 2; + dir[0] = sin(angle) * 20; + dir[1] = cos(angle) * 20; + dir[2] = cos(angle) * 20; + VectorAdd(elevated, dir, holoRef.origin); + + angles[0] = cos(angle - 0.5 * M_PI) * 30; + angles[1] = 360 - (angle * 180 / M_PI); + if (angles[1] > 360) + angles[1] -= 360; + angles[2] = 0; + AnglesToAxis( angles, holoRef.axis ); + } + else + { + angle = ((cg.time / 6) & 255) * (M_PI * 2) / 255 + 0.5 * M_PI; + if (angle > M_PI * 2) + angle -= (float)M_PI * 2; + dir[0] = sin(angle) * 20; + dir[1] = cos(angle) * 20; + dir[2] = 0; + VectorAdd(elevated, dir, holoRef.origin); + + VectorCopy(dir, holoRef.axis[1]); + VectorNormalize(holoRef.axis[1]); + VectorSet(holoRef.axis[2], 0, 0, 1); + CrossProduct(holoRef.axis[1], holoRef.axis[2], holoRef.axis[0]); + } + + holoRef.modelScale[0] = 0.5; + holoRef.modelScale[1] = 0.5; + holoRef.modelScale[2] = 0.5; + ScaleModelAxis(&holoRef); + + { + float wv; + addspriteArgStruct_t fxSArgs; + vec3_t holoCenter; + + holoCenter[0] = holoRef.origin[0] + holoRef.axis[2][0]*18; + holoCenter[1] = holoRef.origin[1] + holoRef.axis[2][1]*18; + holoCenter[2] = holoRef.origin[2] + holoRef.axis[2][2]*18; + + wv = sin( cg.time * 0.004f ) * 0.08f + 0.1f; + + VectorCopy(holoCenter, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = wv*60; + fxSArgs.dscale = wv*60; + fxSArgs.sAlpha = wv*12; + fxSArgs.eAlpha = wv*12; + fxSArgs.rotation = 0.0f; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + + fxSArgs.flags = 0x08000000|0x00000001; + + if (forcePowerDarkLight[i] == FORCE_DARKSIDE) + { //dark + fxSArgs.sAlpha *= 3; + fxSArgs.eAlpha *= 3; + fxSArgs.shader = cgs.media.redSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else if (forcePowerDarkLight[i] == FORCE_LIGHTSIDE) + { //light + fxSArgs.sAlpha *= 1.5; + fxSArgs.eAlpha *= 1.5; + fxSArgs.shader = cgs.media.redSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.blueSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else + { //neutral + if (i == FP_SABERATTACK || + i == FP_SABERDEFEND || + i == FP_SABERTHROW) + { //saber power + fxSArgs.sAlpha *= 1.5; + fxSArgs.eAlpha *= 1.5; + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + else + { + fxSArgs.sAlpha *= 0.5; + fxSArgs.eAlpha *= 0.5; + fxSArgs.shader = cgs.media.greenSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + fxSArgs.shader = cgs.media.blueSaberGlowShader; + trap_FX_AddSprite(&fxSArgs); + } + } + } + + holoRef.hModel = trap_R_RegisterModel(forceHolocronModels[i]); + trap_R_AddRefEntityToScene( &holoRef ); + + renderedHolos++; + } + i++; + } + } + + if ((cent->currentState.powerups & (1 << PW_YSALAMIRI)) || + (cgs.gametype == GT_CTY && ((cent->currentState.powerups & (1 << PW_REDFLAG)) || (cent->currentState.powerups & (1 << PW_BLUEFLAG)))) ) + { + if (cgs.gametype == GT_CTY && (cent->currentState.powerups & (1 << PW_REDFLAG))) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysaliredShader ); + } + else if (cgs.gametype == GT_CTY && (cent->currentState.powerups & (1 << PW_BLUEFLAG))) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysaliblueShader ); + } + else + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysalimariShader ); + } + } + + if (cent->currentState.powerups & (1 << PW_FORCE_BOON)) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 2.0, cgs.media.boonShader ); + } + + if (cent->currentState.powerups & (1 << PW_FORCE_ENLIGHTENED_DARK)) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 2.0, cgs.media.endarkenmentShader ); + } + else if (cent->currentState.powerups & (1 << PW_FORCE_ENLIGHTENED_LIGHT)) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 2.0, cgs.media.enlightenmentShader ); + } + + if (cent->currentState.eFlags & EF_INVULNERABLE) + { + CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.invulnerabilityShader ); + } +stillDoSaber: + if (cent->currentState.weapon == WP_SABER && !cent->currentState.shouldtarget) + { + if (!cent->currentState.saberInFlight && !(cent->currentState.eFlags & EF_DEAD)) + { + if (cg.snap->ps.clientNum == cent->currentState.number) + { + trap_S_AddLoopingSound( cent->currentState.number, cg.refdef.vieworg, vec3_origin, + trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ) ); + } + else + { + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, + trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ) ); + } + } + + if (iwantout && !cent->currentState.saberInFlight) + { + if (cent->currentState.eFlags & EF_DEAD) + { + if (cent->ghoul2 && cent->currentState.saberInFlight && g2HasWeapon) + { //special case, kill the saber on a freshly dead player if another source says to. + trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); + g2HasWeapon = qfalse; + } + } + //return; + goto endOfCall; + } + + if (cent->currentState.saberInFlight && cent->currentState.saberEntityNum) + { + centity_t *saberEnt; + + saberEnt = &cg_entities[cent->currentState.saberEntityNum]; + + if (/*!cent->bolt4 &&*/ g2HasWeapon) + { //saber is in flight, do not have it as a standard weapon model + trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); + g2HasWeapon = qfalse; + + //cent->bolt4 = 1; + + saberEnt->currentState.pos.trTime = cg.time; + saberEnt->currentState.apos.trTime = cg.time; + + VectorCopy(saberEnt->currentState.pos.trBase, saberEnt->lerpOrigin); + VectorCopy(saberEnt->currentState.apos.trBase, saberEnt->lerpAngles); + + cent->bolt3 = saberEnt->currentState.apos.trBase[0]; + cent->bolt2 = 0; + + saberEnt->currentState.bolt2 = 123; + + if (saberEnt->ghoul2) + { + // now set up the gun bolt on it + trap_G2API_AddBolt(saberEnt->ghoul2, 0, "*flash"); + } + else + { + trap_G2API_InitGhoul2Model(&saberEnt->ghoul2, "models/weapons2/saber/saber_w.glm", 0, 0, 0, 0, 0); + + if (saberEnt->ghoul2) + { + trap_G2API_AddBolt(saberEnt->ghoul2, 0, "*flash"); + //cent->bolt4 = 2; + + VectorCopy(saberEnt->currentState.pos.trBase, saberEnt->lerpOrigin); + VectorCopy(saberEnt->currentState.apos.trBase, saberEnt->lerpAngles); + saberEnt->currentState.pos.trTime = cg.time; + saberEnt->currentState.apos.trTime = cg.time; + } + } + } + /*else if (cent->bolt4 != 2) + { + if (saberEnt->ghoul2) + { + trap_G2API_AddBolt(saberEnt->ghoul2, 0, "*flash"); + cent->bolt4 = 2; + } + }*/ + + if (saberEnt && saberEnt->ghoul2 /*&& cent->bolt4 == 2*/) + { + vec3_t bladeAngles; + + if (!cent->bolt2) + { + cent->bolt2 = cg.time; + } + + if (cent->bolt3 != 90) + { + if (cent->bolt3 < 90) + { + cent->bolt3 += (cg.time - cent->bolt2)*0.5; + + if (cent->bolt3 > 90) + { + cent->bolt3 = 90; + } + } + else if (cent->bolt3 > 90) + { + cent->bolt3 -= (cg.time - cent->bolt2)*0.5; + + if (cent->bolt3 < 90) + { + cent->bolt3 = 90; + } + } + } + + cent->bolt2 = cg.time; + + saberEnt->currentState.apos.trBase[0] = cent->bolt3; + saberEnt->lerpAngles[0] = cent->bolt3; + + if (!saberEnt->currentState.saberInFlight && saberEnt->currentState.bolt2 != 123) + { //owner is pulling is back + vec3_t owndir; + + VectorSubtract(saberEnt->lerpOrigin, cent->lerpOrigin, owndir); + VectorNormalize(owndir); + + vectoangles(owndir, owndir); + + owndir[0] += 90; + + VectorCopy(owndir, saberEnt->currentState.apos.trBase); + VectorCopy(owndir, saberEnt->lerpAngles); + VectorClear(saberEnt->currentState.apos.trDelta); + } + + //We don't actually want to rely entirely on server updates to render the position of the saber, because we actually know generally where + //it's going to be before the first position update even gets here, and it needs to start getting rendered the instant the saber model is + //removed from the player hand. So we'll just render it manually and let normal rendering for the entity be ignored. + if (!saberEnt->currentState.saberInFlight && saberEnt->currentState.bolt2 != 123) + { //tell it that we're a saber and to render the glow around our handle because we're being pulled back + saberEnt->bolt3 = 999; + } + + saberEnt->currentState.modelGhoul2 = 1; + CG_ManualEntityRender(saberEnt); + saberEnt->bolt3 = 0; + saberEnt->currentState.modelGhoul2 = 127; + + VectorCopy(saberEnt->lerpAngles, bladeAngles); + bladeAngles[ROLL] = 0; + CG_AddSaberBlade(cent, saberEnt, NULL, 0, 0, saberEnt->lerpOrigin, bladeAngles, qtrue); + + //Make the player's hand glow while guiding the saber + { + vec3_t tAng; + float wv; + addspriteArgStruct_t fxSArgs; + + VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); + + trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_rhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + + efOrg[0] = boltMatrix.matrix[0][3]; + efOrg[1] = boltMatrix.matrix[1][3]; + efOrg[2] = boltMatrix.matrix[2][3]; + + wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; + + //trap_FX_AddSprite( NULL, efOrg, NULL, NULL, 8.0f, 8.0f, wv, wv, 0.0f, 0.0f, 1.0f, cgs.media.yellowSaberGlowShader, 0x08000000 ); + VectorCopy(efOrg, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = 8.0f; + fxSArgs.dscale = 8.0f; + fxSArgs.sAlpha = wv; + fxSArgs.eAlpha = wv; + fxSArgs.rotation = 0.0f; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + fxSArgs.shader = cgs.media.yellowDroppedSaberShader; + fxSArgs.flags = 0x08000000; + trap_FX_AddSprite(&fxSArgs); + } + } + } + else + { + centity_t *saberEnt; + + saberEnt = &cg_entities[cent->currentState.saberEntityNum]; + + if (/*cent->bolt4 && */!g2HasWeapon) + { + trap_G2API_CopySpecificGhoul2Model(g2WeaponInstances[WP_SABER], 0, cent->ghoul2, 1); + + if (saberEnt && saberEnt->ghoul2) + { + trap_G2API_CleanGhoul2Models(&(saberEnt->ghoul2)); + } + + saberEnt->currentState.modelindex = 0; + saberEnt->ghoul2 = NULL; + VectorClear(saberEnt->currentState.pos.trBase); + } + CG_AddSaberBlade( cent, cent, NULL, 0, 0, legs.origin, rootAngles, qfalse); + cent->bolt3 = 0; + cent->bolt2 = 0; + + //cent->bolt4 = 0; + } + } + else + { + cent->saberLength = 0; + } + + if (cent->currentState.eFlags & EF_DEAD) + { + if (cent->ghoul2 && cent->currentState.saberInFlight && g2HasWeapon) + { //special case, kill the saber on a freshly dead player if another source says to. + trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); + g2HasWeapon = qfalse; + } + } + + if (iwantout) + { + //return; + goto endOfCall; + } + + if ((cg.snap->ps.fd.forcePowersActive & (1 << FP_SEE)) && cg.snap->ps.clientNum != cent->currentState.number) + { + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = 255; + legs.shaderRGBA[2] = 0; + legs.renderfx |= RF_MINLIGHT; + } + + if (cg.snap->ps.duelInProgress /*&& cent->currentState.number != cg.snap->ps.clientNum*/) + { //I guess go ahead and glow your own client too in a duel + if (cent->currentState.number != cg.snap->ps.duelIndex && + cent->currentState.number != cg.snap->ps.clientNum) + { //everyone not involved in the duel is drawn very dark + legs.shaderRGBA[0] = 50; + legs.shaderRGBA[1] = 50; + legs.shaderRGBA[2] = 50; + legs.renderfx |= RF_RGB_TINT; + } + else + { //adjust the glow by how far away you are from your dueling partner + centity_t *duelEnt; + + duelEnt = &cg_entities[cg.snap->ps.duelIndex]; + + if (duelEnt) + { + vec3_t vecSub; + float subLen = 0; + + VectorSubtract(duelEnt->lerpOrigin, cg.snap->ps.origin, vecSub); + subLen = VectorLength(vecSub); + + if (subLen < 1) + { + subLen = 1; + } + + if (subLen > 1020) + { + subLen = 1020; + } + + legs.shaderRGBA[0] = 255 - subLen/4; + legs.shaderRGBA[1] = 255 - subLen/4; + legs.shaderRGBA[2] = 255 - subLen/4; + + if (legs.shaderRGBA[2] < 1) legs.shaderRGBA[2] = 1; + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.customShader = cgs.media.forceShell; + + trap_R_AddRefEntityToScene( &legs ); + + legs.customShader = 0; + + legs.shaderRGBA[0] = 255 - subLen/8; + legs.shaderRGBA[1] = 255 - subLen/8; + legs.shaderRGBA[2] = 255 - subLen/8; + + if (legs.shaderRGBA[2] < 1) + { + legs.shaderRGBA[2] = 1; + } + if (legs.shaderRGBA[2] > 255) + { + legs.shaderRGBA[2] = 255; + } + + if (subLen <= 1024) + { + legs.renderfx |= RF_RGB_TINT; + } + } + } + } + else + { + if (cent->currentState.bolt1 && !(cent->currentState.eFlags & EF_DEAD) && cent->currentState.number != cg.snap->ps.clientNum && (!cg.snap->ps.duelInProgress || cg.snap->ps.duelIndex != cent->currentState.number)) + { + legs.shaderRGBA[0] = 50; + legs.shaderRGBA[1] = 50; + legs.shaderRGBA[2] = 50; + legs.renderfx |= RF_RGB_TINT; + } + } +doEssentialThree: + if (cent->currentState.eFlags & EF_DISINTEGRATION) + { + vec3_t tempAng, hitLoc; + float tempLength; + + if (!cent->dustTrailTime) + { + cent->dustTrailTime = cg.time; + cent->miscTime = legs.frame; + } + + if ((cg.time - cent->dustTrailTime) > 1500) + { //avoid rendering the entity after disintegration has finished anyway + goto endOfCall; + } + + trap_G2API_SetBoneAnim(legs.ghoul2, 0, "model_root", cent->miscTime, cent->miscTime, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->miscTime, -1); + trap_G2API_SetBoneAnim(legs.ghoul2, 0, "lower_lumbar", cent->miscTime, cent->miscTime, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->miscTime, -1); + trap_G2API_SetBoneAnim(legs.ghoul2, 0, "Motion", cent->miscTime, cent->miscTime, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->miscTime, -1); + + VectorCopy(cent->currentState.origin2, hitLoc); + + VectorSubtract( hitLoc, legs.origin, legs.oldorigin ); + + tempLength = VectorNormalize( legs.oldorigin ); + vectoangles( legs.oldorigin, tempAng ); + tempAng[YAW] -= cent->lerpAngles[YAW]; + AngleVectors( tempAng, legs.oldorigin, NULL, NULL ); + VectorScale( legs.oldorigin, tempLength, legs.oldorigin ); + legs.endTime = cent->dustTrailTime; + + //FIXME: Sorting is all wrong here, it can't decide if it should render this part or the outer body first + /* + legs.renderfx |= RF_DISINTEGRATE2; + legs.customShader = cgs.media.disruptorShader; + trap_R_AddRefEntityToScene( &legs ); + */ + + legs.renderfx &= ~(RF_DISINTEGRATE2); + legs.renderfx |= (RF_DISINTEGRATE1); + + legs.customShader = 0; + trap_R_AddRefEntityToScene( &legs ); + + goto endOfCall; + } + else + { + cent->dustTrailTime = 0; + cent->miscTime = 0; + } + + trap_R_AddRefEntityToScene(&legs); + + if (cent->isATST) + { + //return; + goto endOfCall; + } + + cent->frame_minus2 = cent->frame_minus1; + if (cent->frame_minus1_refreshed) + { + cent->frame_minus2_refreshed = 1; + } + cent->frame_minus1 = legs; + cent->frame_minus1_refreshed = 1; + + if (!cent->frame_hold_refreshed && (cent->currentState.powerups & (1 << PW_SPEEDBURST))) + { + cent->frame_hold_time = cg.time + 254; + } + + if (cent->frame_hold_time >= cg.time) + { + if (!cent->frame_hold_refreshed) + { //We're taking the ghoul2 instance from the original refent and duplicating it onto our refent alias so that we can then freeze the frame and fade it for the effect + if (cent->frame_hold.ghoul2 && trap_G2_HaveWeGhoul2Models(cent->frame_hold.ghoul2) && + cent->frame_hold.ghoul2 != cent->ghoul2) + { + trap_G2API_CleanGhoul2Models(&(cent->frame_hold.ghoul2)); + } + cent->frame_hold = legs; + cent->frame_hold_refreshed = 1; + cent->frame_hold.ghoul2 = NULL; + + trap_G2API_DuplicateGhoul2Instance(cent->ghoul2, ¢->frame_hold.ghoul2); + + //Set the animation to the current frame and freeze on end + //trap_G2API_SetBoneAnim(cent->frame_hold.ghoul2, 0, "model_root", cent->frame_hold.frame, cent->frame_hold.frame, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->frame_hold.frame, -1); + trap_G2API_SetBoneAnim(cent->frame_hold.ghoul2, 0, "model_root", cent->frame_hold.frame, cent->frame_hold.frame, 0, 1.0f, cg.time, cent->frame_hold.frame, -1); + } + + cent->frame_hold.renderfx |= RF_FORCE_ENT_ALPHA; + cent->frame_hold.shaderRGBA[3] = (cent->frame_hold_time - cg.time); + if (cent->frame_hold.shaderRGBA[3] > 254) + { + cent->frame_hold.shaderRGBA[3] = 254; + } + if (cent->frame_hold.shaderRGBA[3] < 1) + { + cent->frame_hold.shaderRGBA[3] = 1; + } + + trap_R_AddRefEntityToScene(¢->frame_hold); + } + else + { + cent->frame_hold_refreshed = 0; + } + + // + // add the gun / barrel / flash + // + if (cent->currentState.weapon != WP_EMPLACED_GUN) + { + CG_AddPlayerWeapon( &legs, NULL, cent, ci->team, rootAngles, qtrue ); + } + // add powerups floating behind the player + CG_PlayerPowerups( cent, &legs ); + + if ((cent->currentState.forcePowersActive & (1 << FP_RAGE)) && + (cg.renderingThirdPerson || cent->currentState.number != cg.snap->ps.clientNum)) + { + //legs.customShader = cgs.media.rageShader; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.renderfx &= ~RF_MINLIGHT; + + legs.renderfx |= RF_RGB_TINT; + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = legs.shaderRGBA[2] = 0; + legs.shaderRGBA[3] = 255; + + if ( rand() & 1 ) + { + legs.customShader = cgs.media.electricBodyShader; + } + else + { + legs.customShader = cgs.media.electricBody2Shader; + } + + trap_R_AddRefEntityToScene(&legs); + } + + if (!cg.snap->ps.duelInProgress && cent->currentState.bolt1 && !(cent->currentState.eFlags & EF_DEAD) && cent->currentState.number != cg.snap->ps.clientNum && (!cg.snap->ps.duelInProgress || cg.snap->ps.duelIndex != cent->currentState.number)) + { + legs.shaderRGBA[0] = 50; + legs.shaderRGBA[1] = 50; + legs.shaderRGBA[2] = 255; + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.customShader = cgs.media.forceSightBubble; + + trap_R_AddRefEntityToScene( &legs ); + } + + //For now, these two are using the old shield shader. This is just so that you + //can tell it apart from the JM/duel shaders, but it's still very obvious. + if (cent->currentState.forcePowersActive & (1 << FP_PROTECT)) + { //aborb is represented by green.. + legs.shaderRGBA[0] = 0; + legs.shaderRGBA[1] = 255; + legs.shaderRGBA[2] = 0; + legs.shaderRGBA[3] = 254; + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.customShader = cgs.media.playerShieldDamage; + + trap_R_AddRefEntityToScene( &legs ); + } + //if (cent->currentState.forcePowersActive & (1 << FP_ABSORB)) + //Showing only when the power has been active (absorbed something) recently now, instead of always. + if (cg_entities[cent->currentState.number].teamPowerEffectTime > cg.time && cg_entities[cent->currentState.number].teamPowerType == 3) + { //aborb is represented by blue.. + legs.shaderRGBA[0] = 0; + legs.shaderRGBA[1] = 0; + legs.shaderRGBA[2] = 255; + legs.shaderRGBA[3] = 254; + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.customShader = cgs.media.playerShieldDamage; + + trap_R_AddRefEntityToScene( &legs ); + } + + if (cent->currentState.isJediMaster && cg.snap->ps.clientNum != cent->currentState.number) + { + legs.shaderRGBA[0] = 100; + legs.shaderRGBA[1] = 100; + legs.shaderRGBA[2] = 255; + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.renderfx |= RF_NODEPTH; + legs.customShader = cgs.media.forceShell; + + trap_R_AddRefEntityToScene( &legs ); + + legs.renderfx &= ~RF_NODEPTH; + } + + if ((cg.snap->ps.fd.forcePowersActive & (1 << FP_SEE)) && cg.snap->ps.clientNum != cent->currentState.number && cg_auraShell.integer) + { + if (cgs.gametype >= GT_TEAM) + { // A team game + switch(cgs.clientinfo[ cent->currentState.clientNum ].team) + { + case TEAM_RED: + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = 50; + legs.shaderRGBA[2] = 50; + break; + case TEAM_BLUE: + legs.shaderRGBA[0] = 75; + legs.shaderRGBA[1] = 75; + legs.shaderRGBA[2] = 255; + break; + + default: + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = 255; + legs.shaderRGBA[2] = 0; + break; + } + } + else + { // Not a team game + legs.shaderRGBA[0] = 255; + legs.shaderRGBA[1] = 255; + legs.shaderRGBA[2] = 0; + } + +/* if (cg.snap->ps.fd.forcePowerLevel[FP_SEE] <= FORCE_LEVEL_1) + { + legs.renderfx |= RF_MINLIGHT; + } + else +*/ { // See through walls. + legs.renderfx |= RF_MINLIGHT | RF_NODEPTH; + + if (cg.snap->ps.fd.forcePowerLevel[FP_SEE] < FORCE_LEVEL_2) + { //only level 2+ can see players through walls + legs.renderfx &= ~RF_NODEPTH; + } + } + + legs.renderfx &= ~RF_RGB_TINT; + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.customShader = cgs.media.sightShell; + + trap_R_AddRefEntityToScene( &legs ); + } + + // Electricity + //------------------------------------------------ + if ( cent->currentState.emplacedOwner > cg.time ) + { + int dif = cent->currentState.emplacedOwner - cg.time; + + if ( dif > 0 && random() > 0.4f ) + { + // fade out over the last 500 ms + int brightness = 255; + + if ( dif < 500 ) + { + brightness = floor((dif - 500.0f) / 500.0f * 255.0f ); + } + + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.renderfx &= ~RF_MINLIGHT; + + legs.renderfx |= RF_RGB_TINT; + legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = brightness; + legs.shaderRGBA[3] = 255; + + if ( rand() & 1 ) + { + legs.customShader = cgs.media.electricBodyShader; + } + else + { + legs.customShader = cgs.media.electricBody2Shader; + } + + trap_R_AddRefEntityToScene( &legs ); + + if ( random() > 0.9f ) + trap_S_StartSound ( NULL, cent->currentState.number, CHAN_AUTO, cgs.media.crackleSound ); + } + } + + if (cent->currentState.powerups & (1 << PW_SHIELDHIT)) + { + /* + legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = 255.0f * 0.5f;//t; + legs.shaderRGBA[3] = 255; + legs.renderfx &= ~RF_ALPHA_FADE; + legs.renderfx |= RF_RGB_TINT; + */ + + legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = Q_irand(1, 255); + + legs.renderfx &= ~RF_FORCE_ENT_ALPHA; + legs.renderfx &= ~RF_MINLIGHT; + legs.renderfx &= ~RF_RGB_TINT; + legs.customShader = cgs.media.playerShieldDamage; + + trap_R_AddRefEntityToScene( &legs ); + } +endOfCall: + + if (cgBoneAnglePostSet.refreshSet) + { + trap_G2API_SetBoneAngles(cgBoneAnglePostSet.ghoul2, cgBoneAnglePostSet.modelIndex, cgBoneAnglePostSet.boneName, + cgBoneAnglePostSet.angles, cgBoneAnglePostSet.flags, cgBoneAnglePostSet.up, cgBoneAnglePostSet.right, + cgBoneAnglePostSet.forward, cgBoneAnglePostSet.modelList, cgBoneAnglePostSet.blendTime, cgBoneAnglePostSet.currentTime); + + cgBoneAnglePostSet.refreshSet = qfalse; + } +} + + +//===================================================================== + +/* +=============== +CG_ResetPlayerEntity + +A player just came into view or teleported, so reset all animation info +=============== +*/ +void CG_ResetPlayerEntity( centity_t *cent ) +{ + cent->errorTime = -99999; // guarantee no error decay added + cent->extrapolated = qfalse; + + CG_ClearLerpFrame( cent, &cgs.clientinfo[ cent->currentState.clientNum ], ¢->pe.legs, cent->currentState.legsAnim, qfalse); + CG_ClearLerpFrame( cent, &cgs.clientinfo[ cent->currentState.clientNum ], ¢->pe.torso, cent->currentState.torsoAnim, qtrue); + + BG_EvaluateTrajectory( ¢->currentState.pos, cg.time, cent->lerpOrigin ); + BG_EvaluateTrajectory( ¢->currentState.apos, cg.time, cent->lerpAngles ); + + VectorCopy( cent->lerpOrigin, cent->rawOrigin ); + VectorCopy( cent->lerpAngles, cent->rawAngles ); + + memset( ¢->pe.legs, 0, sizeof( cent->pe.legs ) ); + cent->pe.legs.yawAngle = cent->rawAngles[YAW]; + cent->pe.legs.yawing = qfalse; + cent->pe.legs.pitchAngle = 0; + cent->pe.legs.pitching = qfalse; + + memset( ¢->pe.torso, 0, sizeof( cent->pe.legs ) ); + cent->pe.torso.yawAngle = cent->rawAngles[YAW]; + cent->pe.torso.yawing = qfalse; + cent->pe.torso.pitchAngle = cent->rawAngles[PITCH]; + cent->pe.torso.pitching = qfalse; + + if ((cent->ghoul2 == NULL) && trap_G2_HaveWeGhoul2Models(cgs.clientinfo[cent->currentState.clientNum].ghoul2Model)) + { + trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[cent->currentState.clientNum].ghoul2Model, ¢->ghoul2); + CG_CopyG2WeaponInstance(cent->currentState.weapon, cgs.clientinfo[cent->currentState.clientNum].ghoul2Model); + cent->weapon = cent->currentState.weapon; + } + + if ( cg_debugPosition.integer ) { + CG_Printf("%i ResetPlayerEntity yaw=%i\n", cent->currentState.number, cent->pe.torso.yawAngle ); + } +} + diff --git a/code/cgame/cg_playerstate (2).c b/code/cgame/cg_playerstate (2).c new file mode 100644 index 0000000..b26d38e --- /dev/null +++ b/code/cgame/cg_playerstate (2).c @@ -0,0 +1,517 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_playerstate.c -- this file acts on changes in a new playerState_t +// With normal play, this will be done after local prediction, but when +// following another player or playing back a demo, it will be checked +// when the snapshot transitions like all the other entities + +#include "cg_local.h" + +/* +============== +CG_CheckAmmo + +If the ammo has gone low enough to generate the warning, play a sound +============== +*/ +void CG_CheckAmmo( void ) { +#if 0 + int i; + int total; + int previous; + int weapons; + + // see about how many seconds of ammo we have remaining + weapons = cg.snap->ps.stats[ STAT_WEAPONS ]; + total = 0; + for ( i = WP_BRYAR_PISTOL; i < WP_NUM_WEAPONS ; i++ ) { + if ( ! ( weapons & ( 1 << i ) ) ) { + continue; + } + switch ( i ) + { + case WP_BRYAR_PISTOL: + case WP_BLASTER: + case WP_DISRUPTOR: + case WP_BOWCASTER: + case WP_REPEATER: + case WP_DEMP2: + case WP_FLECHETTE: + case WP_ROCKET_LAUNCHER: + case WP_THERMAL: + case WP_TRIP_MINE: + case WP_DET_PACK: + case WP_EMPLACED_GUN: + total += cg.snap->ps.ammo[weaponData[i].ammoIndex] * 1000; + break; + default: + total += cg.snap->ps.ammo[weaponData[i].ammoIndex] * 200; + break; + } + if ( total >= 5000 ) { + cg.lowAmmoWarning = 0; + return; + } + } + + previous = cg.lowAmmoWarning; + + if ( total == 0 ) { + cg.lowAmmoWarning = 2; + } else { + cg.lowAmmoWarning = 1; + } + + if (cg.snap->ps.weapon == WP_SABER) + { + cg.lowAmmoWarning = 0; + } + + // play a sound on transitions + if ( cg.lowAmmoWarning != previous ) { + trap_S_StartLocalSound( cgs.media.noAmmoSound, CHAN_LOCAL_SOUND ); + } +#endif + //disabled silly ammo warning stuff for now +} + +/* +============== +CG_DamageFeedback +============== +*/ +void CG_DamageFeedback( int yawByte, int pitchByte, int damage ) { + float left, front, up; + float kick; + int health; + float scale; + vec3_t dir; + vec3_t angles; + float dist; + float yaw, pitch; + + // show the attacking player's head and name in corner + cg.attackerTime = cg.time; + + // the lower on health you are, the greater the view kick will be + health = cg.snap->ps.stats[STAT_HEALTH]; + if ( health < 40 ) { + scale = 1; + } else { + scale = 40.0 / health; + } + kick = damage * scale; + + if (kick < 5) + kick = 5; + if (kick > 10) + kick = 10; + + // if yaw and pitch are both 255, make the damage always centered (falling, etc) + if ( yawByte == 255 && pitchByte == 255 ) { + cg.damageX = 0; + cg.damageY = 0; + cg.v_dmg_roll = 0; + cg.v_dmg_pitch = -kick; + } else { + // positional + pitch = pitchByte / 255.0 * 360; + yaw = yawByte / 255.0 * 360; + + angles[PITCH] = pitch; + angles[YAW] = yaw; + angles[ROLL] = 0; + + AngleVectors( angles, dir, NULL, NULL ); + VectorSubtract( vec3_origin, dir, dir ); + + front = DotProduct (dir, cg.refdef.viewaxis[0] ); + left = DotProduct (dir, cg.refdef.viewaxis[1] ); + up = DotProduct (dir, cg.refdef.viewaxis[2] ); + + dir[0] = front; + dir[1] = left; + dir[2] = 0; + dist = VectorLength( dir ); + if ( dist < 0.1 ) { + dist = 0.1f; + } + + cg.v_dmg_roll = kick * left; + + cg.v_dmg_pitch = -kick * front; + + if ( front <= 0.1 ) { + front = 0.1f; + } + cg.damageX = -left / front; + cg.damageY = up / dist; + } + + // clamp the position + if ( cg.damageX > 1.0 ) { + cg.damageX = 1.0; + } + if ( cg.damageX < - 1.0 ) { + cg.damageX = -1.0; + } + + if ( cg.damageY > 1.0 ) { + cg.damageY = 1.0; + } + if ( cg.damageY < - 1.0 ) { + cg.damageY = -1.0; + } + + // don't let the screen flashes vary as much + if ( kick > 10 ) { + kick = 10; + } + cg.damageValue = kick; + cg.v_dmg_time = cg.time + DAMAGE_TIME; + cg.damageTime = cg.snap->serverTime; +} + + + + +/* +================ +CG_Respawn + +A respawn happened this snapshot +================ +*/ +void CG_Respawn( void ) { + // no error decay on player movement + cg.thisFrameTeleport = qtrue; + + // display weapons available + cg.weaponSelectTime = cg.time; + + // select the weapon the server says we are using + cg.weaponSelect = cg.snap->ps.weapon; +} + +extern char *eventnames[]; + +/* +============== +CG_CheckPlayerstateEvents +============== +*/ +void CG_CheckPlayerstateEvents( playerState_t *ps, playerState_t *ops ) { + int i; + int event; + centity_t *cent; + + if ( ps->externalEvent && ps->externalEvent != ops->externalEvent ) { + cent = &cg_entities[ ps->clientNum ]; + cent->currentState.event = ps->externalEvent; + cent->currentState.eventParm = ps->externalEventParm; + CG_EntityEvent( cent, cent->lerpOrigin ); + } + + cent = &cg.predictedPlayerEntity; // cg_entities[ ps->clientNum ]; + // go through the predictable events buffer + for ( i = ps->eventSequence - MAX_PS_EVENTS ; i < ps->eventSequence ; i++ ) { + // if we have a new predictable event + if ( i >= ops->eventSequence + // or the server told us to play another event instead of a predicted event we already issued + // or something the server told us changed our prediction causing a different event + || (i > ops->eventSequence - MAX_PS_EVENTS && ps->events[i & (MAX_PS_EVENTS-1)] != ops->events[i & (MAX_PS_EVENTS-1)]) ) { + + event = ps->events[ i & (MAX_PS_EVENTS-1) ]; + cent->currentState.event = event; + cent->currentState.eventParm = ps->eventParms[ i & (MAX_PS_EVENTS-1) ]; + CG_EntityEvent( cent, cent->lerpOrigin ); + + cg.predictableEvents[ i & (MAX_PREDICTED_EVENTS-1) ] = event; + + cg.eventSequence++; + } + } +} + +/* +================== +CG_CheckChangedPredictableEvents +================== +*/ +void CG_CheckChangedPredictableEvents( playerState_t *ps ) { + int i; + int event; + centity_t *cent; + + cent = &cg.predictedPlayerEntity; + for ( i = ps->eventSequence - MAX_PS_EVENTS ; i < ps->eventSequence ; i++ ) { + // + if (i >= cg.eventSequence) { + continue; + } + // if this event is not further back in than the maximum predictable events we remember + if (i > cg.eventSequence - MAX_PREDICTED_EVENTS) { + // if the new playerstate event is different from a previously predicted one + if ( ps->events[i & (MAX_PS_EVENTS-1)] != cg.predictableEvents[i & (MAX_PREDICTED_EVENTS-1) ] ) { + + event = ps->events[ i & (MAX_PS_EVENTS-1) ]; + cent->currentState.event = event; + cent->currentState.eventParm = ps->eventParms[ i & (MAX_PS_EVENTS-1) ]; + CG_EntityEvent( cent, cent->lerpOrigin ); + + cg.predictableEvents[ i & (MAX_PREDICTED_EVENTS-1) ] = event; + + if ( cg_showmiss.integer ) { + CG_Printf("WARNING: changed predicted event\n"); + } + } + } + } +} + +/* +================== +pushReward +================== +*/ +#ifdef JK2AWARDS +static void pushReward(sfxHandle_t sfx, qhandle_t shader, int rewardCount) { + if (cg.rewardStack < (MAX_REWARDSTACK-1)) { + cg.rewardStack++; + cg.rewardSound[cg.rewardStack] = sfx; + cg.rewardShader[cg.rewardStack] = shader; + cg.rewardCount[cg.rewardStack] = rewardCount; + } +} +#endif + +int cgAnnouncerTime = 0; //to prevent announce sounds from playing on top of each other + +/* +================== +CG_CheckLocalSounds +================== +*/ +void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) { + int highScore, health, armor, reward; +#ifdef JK2AWARDS + sfxHandle_t sfx; +#endif + + // don't play the sounds if the player just changed teams + if ( ps->persistant[PERS_TEAM] != ops->persistant[PERS_TEAM] ) { + return; + } + + // hit changes + if ( ps->persistant[PERS_HITS] > ops->persistant[PERS_HITS] ) { + armor = ps->persistant[PERS_ATTACKEE_ARMOR] & 0xff; + health = ps->persistant[PERS_ATTACKEE_ARMOR] >> 8; + + if (armor > health/2) + { // We also hit shields along the way, so consider them "pierced". +// trap_S_StartLocalSound( cgs.media.shieldPierceSound, CHAN_LOCAL_SOUND ); + } + else + { // Shields didn't really stand in our way. +// trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND ); + } + + //FIXME: Hit sounds? + /* + if (armor > 50 ) { + trap_S_StartLocalSound( cgs.media.hitSoundHighArmor, CHAN_LOCAL_SOUND ); + } else if (armor || health > 100) { + trap_S_StartLocalSound( cgs.media.hitSoundLowArmor, CHAN_LOCAL_SOUND ); + } else { + trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND ); + } + */ + } else if ( ps->persistant[PERS_HITS] < ops->persistant[PERS_HITS] ) { + //trap_S_StartLocalSound( cgs.media.hitTeamSound, CHAN_LOCAL_SOUND ); + } + + // health changes of more than -3 should make pain sounds + if (cg_oldPainSounds.integer) + { + if ( ps->stats[STAT_HEALTH] < (ops->stats[STAT_HEALTH] - 3)) + { + if ( ps->stats[STAT_HEALTH] > 0 ) + { + CG_PainEvent( &cg.predictedPlayerEntity, ps->stats[STAT_HEALTH] ); + } + } + } + + // if we are going into the intermission, don't start any voices + if ( cg.intermissionStarted ) { + return; + } + +#ifdef JK2AWARDS + // reward sounds + reward = qfalse; + if (ps->persistant[PERS_CAPTURES] != ops->persistant[PERS_CAPTURES]) { + pushReward(cgs.media.captureAwardSound, cgs.media.medalCapture, ps->persistant[PERS_CAPTURES]); + reward = qtrue; + //Com_Printf("capture\n"); + } + if (ps->persistant[PERS_IMPRESSIVE_COUNT] != ops->persistant[PERS_IMPRESSIVE_COUNT]) { + sfx = cgs.media.impressiveSound; + + pushReward(sfx, cgs.media.medalImpressive, ps->persistant[PERS_IMPRESSIVE_COUNT]); + reward = qtrue; + //Com_Printf("impressive\n"); + } + if (ps->persistant[PERS_EXCELLENT_COUNT] != ops->persistant[PERS_EXCELLENT_COUNT]) { + sfx = cgs.media.excellentSound; + pushReward(sfx, cgs.media.medalExcellent, ps->persistant[PERS_EXCELLENT_COUNT]); + reward = qtrue; + //Com_Printf("excellent\n"); + } + if (ps->persistant[PERS_GAUNTLET_FRAG_COUNT] != ops->persistant[PERS_GAUNTLET_FRAG_COUNT]) { + sfx = cgs.media.humiliationSound; + pushReward(sfx, cgs.media.medalGauntlet, ps->persistant[PERS_GAUNTLET_FRAG_COUNT]); + reward = qtrue; + //Com_Printf("guantlet frag\n"); + } + if (ps->persistant[PERS_DEFEND_COUNT] != ops->persistant[PERS_DEFEND_COUNT]) { + pushReward(cgs.media.defendSound, cgs.media.medalDefend, ps->persistant[PERS_DEFEND_COUNT]); + reward = qtrue; + //Com_Printf("defend\n"); + } + if (ps->persistant[PERS_ASSIST_COUNT] != ops->persistant[PERS_ASSIST_COUNT]) { + //pushReward(cgs.media.assistSound, cgs.media.medalAssist, ps->persistant[PERS_ASSIST_COUNT]); + //reward = qtrue; + //Com_Printf("assist\n"); + } + // if any of the player event bits changed + if (ps->persistant[PERS_PLAYEREVENTS] != ops->persistant[PERS_PLAYEREVENTS]) { + if ((ps->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_DENIEDREWARD) != + (ops->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_DENIEDREWARD)) { + trap_S_StartLocalSound( cgs.media.deniedSound, CHAN_ANNOUNCER ); + } + else if ((ps->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_GAUNTLETREWARD) != + (ops->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_GAUNTLETREWARD)) { + trap_S_StartLocalSound( cgs.media.humiliationSound, CHAN_ANNOUNCER ); + } + reward = qtrue; + } +#else + reward = qfalse; +#endif + // lead changes + if (!reward && cgAnnouncerTime < cg.time) { + // + if ( !cg.warmup ) { + // never play lead changes during warmup + if ( ps->persistant[PERS_RANK] != ops->persistant[PERS_RANK] ) { + if ( cgs.gametype < GT_TEAM) { + if ( ps->persistant[PERS_RANK] == 0 ) { + CG_AddBufferedSound(cgs.media.takenLeadSound); + cgAnnouncerTime = cg.time + 3000; + } else if ( ps->persistant[PERS_RANK] == RANK_TIED_FLAG ) { + //CG_AddBufferedSound(cgs.media.tiedLeadSound); + } else if ( ( ops->persistant[PERS_RANK] & ~RANK_TIED_FLAG ) == 0 ) { + //rww - only bother saying this if you have more than 1 kill already. + //joining the server and hearing "the force is not with you" is silly. + if (ps->persistant[PERS_SCORE] > 0) + { + CG_AddBufferedSound(cgs.media.lostLeadSound); + cgAnnouncerTime = cg.time + 3000; + } + } + } + } + } + } + + // timelimit warnings + if ( cgs.timelimit > 0 && cgAnnouncerTime < cg.time ) { + int msec; + + msec = cg.time - cgs.levelStartTime; + if ( !( cg.timelimitWarnings & 4 ) && msec > ( cgs.timelimit * 60 + 2 ) * 1000 ) { + cg.timelimitWarnings |= 1 | 2 | 4; + //trap_S_StartLocalSound( cgs.media.suddenDeathSound, CHAN_ANNOUNCER ); + } + else if ( !( cg.timelimitWarnings & 2 ) && msec > (cgs.timelimit - 1) * 60 * 1000 ) { + cg.timelimitWarnings |= 1 | 2; + trap_S_StartLocalSound( cgs.media.oneMinuteSound, CHAN_ANNOUNCER ); + cgAnnouncerTime = cg.time + 3000; + } + else if ( cgs.timelimit > 5 && !( cg.timelimitWarnings & 1 ) && msec > (cgs.timelimit - 5) * 60 * 1000 ) { + cg.timelimitWarnings |= 1; + trap_S_StartLocalSound( cgs.media.fiveMinuteSound, CHAN_ANNOUNCER ); + cgAnnouncerTime = cg.time + 3000; + } + } + + // fraglimit warnings + if ( cgs.fraglimit > 0 && cgs.gametype < GT_CTF && cgs.gametype != GT_TOURNAMENT && cgAnnouncerTime < cg.time) { + highScore = cgs.scores1; + if ( !( cg.fraglimitWarnings & 4 ) && highScore == (cgs.fraglimit - 1) ) { + cg.fraglimitWarnings |= 1 | 2 | 4; + CG_AddBufferedSound(cgs.media.oneFragSound); + cgAnnouncerTime = cg.time + 3000; + } + else if ( cgs.fraglimit > 2 && !( cg.fraglimitWarnings & 2 ) && highScore == (cgs.fraglimit - 2) ) { + cg.fraglimitWarnings |= 1 | 2; + CG_AddBufferedSound(cgs.media.twoFragSound); + cgAnnouncerTime = cg.time + 3000; + } + else if ( cgs.fraglimit > 3 && !( cg.fraglimitWarnings & 1 ) && highScore == (cgs.fraglimit - 3) ) { + cg.fraglimitWarnings |= 1; + CG_AddBufferedSound(cgs.media.threeFragSound); + cgAnnouncerTime = cg.time + 3000; + } + } +} + +/* +=============== +CG_TransitionPlayerState + +=============== +*/ +void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops ) { + // check for changing follow mode + if ( ps->clientNum != ops->clientNum ) { + cg.thisFrameTeleport = qtrue; + // make sure we don't get any unwanted transition effects + *ops = *ps; + } + + // damage events (player is getting wounded) + if ( ps->damageEvent != ops->damageEvent && ps->damageCount ) { + CG_DamageFeedback( ps->damageYaw, ps->damagePitch, ps->damageCount ); + } + + // respawning + if ( ps->persistant[PERS_SPAWN_COUNT] != ops->persistant[PERS_SPAWN_COUNT] ) { + CG_Respawn(); + } + + if ( cg.mapRestart ) { + CG_Respawn(); + cg.mapRestart = qfalse; + } + + if ( cg.snap->ps.pm_type != PM_INTERMISSION + && ps->persistant[PERS_TEAM] != TEAM_SPECTATOR ) { + CG_CheckLocalSounds( ps, ops ); + } + + // check for going low on ammo + CG_CheckAmmo(); + + // run events + CG_CheckPlayerstateEvents( ps, ops ); + + // smooth the ducking viewheight change + if ( ps->viewheight != ops->viewheight ) { + cg.duckChange = ps->viewheight - ops->viewheight; + cg.duckTime = cg.time; + } +} + diff --git a/code/cgame/cg_playerstate.c b/code/cgame/cg_playerstate.c new file mode 100644 index 0000000..b26d38e --- /dev/null +++ b/code/cgame/cg_playerstate.c @@ -0,0 +1,517 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_playerstate.c -- this file acts on changes in a new playerState_t +// With normal play, this will be done after local prediction, but when +// following another player or playing back a demo, it will be checked +// when the snapshot transitions like all the other entities + +#include "cg_local.h" + +/* +============== +CG_CheckAmmo + +If the ammo has gone low enough to generate the warning, play a sound +============== +*/ +void CG_CheckAmmo( void ) { +#if 0 + int i; + int total; + int previous; + int weapons; + + // see about how many seconds of ammo we have remaining + weapons = cg.snap->ps.stats[ STAT_WEAPONS ]; + total = 0; + for ( i = WP_BRYAR_PISTOL; i < WP_NUM_WEAPONS ; i++ ) { + if ( ! ( weapons & ( 1 << i ) ) ) { + continue; + } + switch ( i ) + { + case WP_BRYAR_PISTOL: + case WP_BLASTER: + case WP_DISRUPTOR: + case WP_BOWCASTER: + case WP_REPEATER: + case WP_DEMP2: + case WP_FLECHETTE: + case WP_ROCKET_LAUNCHER: + case WP_THERMAL: + case WP_TRIP_MINE: + case WP_DET_PACK: + case WP_EMPLACED_GUN: + total += cg.snap->ps.ammo[weaponData[i].ammoIndex] * 1000; + break; + default: + total += cg.snap->ps.ammo[weaponData[i].ammoIndex] * 200; + break; + } + if ( total >= 5000 ) { + cg.lowAmmoWarning = 0; + return; + } + } + + previous = cg.lowAmmoWarning; + + if ( total == 0 ) { + cg.lowAmmoWarning = 2; + } else { + cg.lowAmmoWarning = 1; + } + + if (cg.snap->ps.weapon == WP_SABER) + { + cg.lowAmmoWarning = 0; + } + + // play a sound on transitions + if ( cg.lowAmmoWarning != previous ) { + trap_S_StartLocalSound( cgs.media.noAmmoSound, CHAN_LOCAL_SOUND ); + } +#endif + //disabled silly ammo warning stuff for now +} + +/* +============== +CG_DamageFeedback +============== +*/ +void CG_DamageFeedback( int yawByte, int pitchByte, int damage ) { + float left, front, up; + float kick; + int health; + float scale; + vec3_t dir; + vec3_t angles; + float dist; + float yaw, pitch; + + // show the attacking player's head and name in corner + cg.attackerTime = cg.time; + + // the lower on health you are, the greater the view kick will be + health = cg.snap->ps.stats[STAT_HEALTH]; + if ( health < 40 ) { + scale = 1; + } else { + scale = 40.0 / health; + } + kick = damage * scale; + + if (kick < 5) + kick = 5; + if (kick > 10) + kick = 10; + + // if yaw and pitch are both 255, make the damage always centered (falling, etc) + if ( yawByte == 255 && pitchByte == 255 ) { + cg.damageX = 0; + cg.damageY = 0; + cg.v_dmg_roll = 0; + cg.v_dmg_pitch = -kick; + } else { + // positional + pitch = pitchByte / 255.0 * 360; + yaw = yawByte / 255.0 * 360; + + angles[PITCH] = pitch; + angles[YAW] = yaw; + angles[ROLL] = 0; + + AngleVectors( angles, dir, NULL, NULL ); + VectorSubtract( vec3_origin, dir, dir ); + + front = DotProduct (dir, cg.refdef.viewaxis[0] ); + left = DotProduct (dir, cg.refdef.viewaxis[1] ); + up = DotProduct (dir, cg.refdef.viewaxis[2] ); + + dir[0] = front; + dir[1] = left; + dir[2] = 0; + dist = VectorLength( dir ); + if ( dist < 0.1 ) { + dist = 0.1f; + } + + cg.v_dmg_roll = kick * left; + + cg.v_dmg_pitch = -kick * front; + + if ( front <= 0.1 ) { + front = 0.1f; + } + cg.damageX = -left / front; + cg.damageY = up / dist; + } + + // clamp the position + if ( cg.damageX > 1.0 ) { + cg.damageX = 1.0; + } + if ( cg.damageX < - 1.0 ) { + cg.damageX = -1.0; + } + + if ( cg.damageY > 1.0 ) { + cg.damageY = 1.0; + } + if ( cg.damageY < - 1.0 ) { + cg.damageY = -1.0; + } + + // don't let the screen flashes vary as much + if ( kick > 10 ) { + kick = 10; + } + cg.damageValue = kick; + cg.v_dmg_time = cg.time + DAMAGE_TIME; + cg.damageTime = cg.snap->serverTime; +} + + + + +/* +================ +CG_Respawn + +A respawn happened this snapshot +================ +*/ +void CG_Respawn( void ) { + // no error decay on player movement + cg.thisFrameTeleport = qtrue; + + // display weapons available + cg.weaponSelectTime = cg.time; + + // select the weapon the server says we are using + cg.weaponSelect = cg.snap->ps.weapon; +} + +extern char *eventnames[]; + +/* +============== +CG_CheckPlayerstateEvents +============== +*/ +void CG_CheckPlayerstateEvents( playerState_t *ps, playerState_t *ops ) { + int i; + int event; + centity_t *cent; + + if ( ps->externalEvent && ps->externalEvent != ops->externalEvent ) { + cent = &cg_entities[ ps->clientNum ]; + cent->currentState.event = ps->externalEvent; + cent->currentState.eventParm = ps->externalEventParm; + CG_EntityEvent( cent, cent->lerpOrigin ); + } + + cent = &cg.predictedPlayerEntity; // cg_entities[ ps->clientNum ]; + // go through the predictable events buffer + for ( i = ps->eventSequence - MAX_PS_EVENTS ; i < ps->eventSequence ; i++ ) { + // if we have a new predictable event + if ( i >= ops->eventSequence + // or the server told us to play another event instead of a predicted event we already issued + // or something the server told us changed our prediction causing a different event + || (i > ops->eventSequence - MAX_PS_EVENTS && ps->events[i & (MAX_PS_EVENTS-1)] != ops->events[i & (MAX_PS_EVENTS-1)]) ) { + + event = ps->events[ i & (MAX_PS_EVENTS-1) ]; + cent->currentState.event = event; + cent->currentState.eventParm = ps->eventParms[ i & (MAX_PS_EVENTS-1) ]; + CG_EntityEvent( cent, cent->lerpOrigin ); + + cg.predictableEvents[ i & (MAX_PREDICTED_EVENTS-1) ] = event; + + cg.eventSequence++; + } + } +} + +/* +================== +CG_CheckChangedPredictableEvents +================== +*/ +void CG_CheckChangedPredictableEvents( playerState_t *ps ) { + int i; + int event; + centity_t *cent; + + cent = &cg.predictedPlayerEntity; + for ( i = ps->eventSequence - MAX_PS_EVENTS ; i < ps->eventSequence ; i++ ) { + // + if (i >= cg.eventSequence) { + continue; + } + // if this event is not further back in than the maximum predictable events we remember + if (i > cg.eventSequence - MAX_PREDICTED_EVENTS) { + // if the new playerstate event is different from a previously predicted one + if ( ps->events[i & (MAX_PS_EVENTS-1)] != cg.predictableEvents[i & (MAX_PREDICTED_EVENTS-1) ] ) { + + event = ps->events[ i & (MAX_PS_EVENTS-1) ]; + cent->currentState.event = event; + cent->currentState.eventParm = ps->eventParms[ i & (MAX_PS_EVENTS-1) ]; + CG_EntityEvent( cent, cent->lerpOrigin ); + + cg.predictableEvents[ i & (MAX_PREDICTED_EVENTS-1) ] = event; + + if ( cg_showmiss.integer ) { + CG_Printf("WARNING: changed predicted event\n"); + } + } + } + } +} + +/* +================== +pushReward +================== +*/ +#ifdef JK2AWARDS +static void pushReward(sfxHandle_t sfx, qhandle_t shader, int rewardCount) { + if (cg.rewardStack < (MAX_REWARDSTACK-1)) { + cg.rewardStack++; + cg.rewardSound[cg.rewardStack] = sfx; + cg.rewardShader[cg.rewardStack] = shader; + cg.rewardCount[cg.rewardStack] = rewardCount; + } +} +#endif + +int cgAnnouncerTime = 0; //to prevent announce sounds from playing on top of each other + +/* +================== +CG_CheckLocalSounds +================== +*/ +void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) { + int highScore, health, armor, reward; +#ifdef JK2AWARDS + sfxHandle_t sfx; +#endif + + // don't play the sounds if the player just changed teams + if ( ps->persistant[PERS_TEAM] != ops->persistant[PERS_TEAM] ) { + return; + } + + // hit changes + if ( ps->persistant[PERS_HITS] > ops->persistant[PERS_HITS] ) { + armor = ps->persistant[PERS_ATTACKEE_ARMOR] & 0xff; + health = ps->persistant[PERS_ATTACKEE_ARMOR] >> 8; + + if (armor > health/2) + { // We also hit shields along the way, so consider them "pierced". +// trap_S_StartLocalSound( cgs.media.shieldPierceSound, CHAN_LOCAL_SOUND ); + } + else + { // Shields didn't really stand in our way. +// trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND ); + } + + //FIXME: Hit sounds? + /* + if (armor > 50 ) { + trap_S_StartLocalSound( cgs.media.hitSoundHighArmor, CHAN_LOCAL_SOUND ); + } else if (armor || health > 100) { + trap_S_StartLocalSound( cgs.media.hitSoundLowArmor, CHAN_LOCAL_SOUND ); + } else { + trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND ); + } + */ + } else if ( ps->persistant[PERS_HITS] < ops->persistant[PERS_HITS] ) { + //trap_S_StartLocalSound( cgs.media.hitTeamSound, CHAN_LOCAL_SOUND ); + } + + // health changes of more than -3 should make pain sounds + if (cg_oldPainSounds.integer) + { + if ( ps->stats[STAT_HEALTH] < (ops->stats[STAT_HEALTH] - 3)) + { + if ( ps->stats[STAT_HEALTH] > 0 ) + { + CG_PainEvent( &cg.predictedPlayerEntity, ps->stats[STAT_HEALTH] ); + } + } + } + + // if we are going into the intermission, don't start any voices + if ( cg.intermissionStarted ) { + return; + } + +#ifdef JK2AWARDS + // reward sounds + reward = qfalse; + if (ps->persistant[PERS_CAPTURES] != ops->persistant[PERS_CAPTURES]) { + pushReward(cgs.media.captureAwardSound, cgs.media.medalCapture, ps->persistant[PERS_CAPTURES]); + reward = qtrue; + //Com_Printf("capture\n"); + } + if (ps->persistant[PERS_IMPRESSIVE_COUNT] != ops->persistant[PERS_IMPRESSIVE_COUNT]) { + sfx = cgs.media.impressiveSound; + + pushReward(sfx, cgs.media.medalImpressive, ps->persistant[PERS_IMPRESSIVE_COUNT]); + reward = qtrue; + //Com_Printf("impressive\n"); + } + if (ps->persistant[PERS_EXCELLENT_COUNT] != ops->persistant[PERS_EXCELLENT_COUNT]) { + sfx = cgs.media.excellentSound; + pushReward(sfx, cgs.media.medalExcellent, ps->persistant[PERS_EXCELLENT_COUNT]); + reward = qtrue; + //Com_Printf("excellent\n"); + } + if (ps->persistant[PERS_GAUNTLET_FRAG_COUNT] != ops->persistant[PERS_GAUNTLET_FRAG_COUNT]) { + sfx = cgs.media.humiliationSound; + pushReward(sfx, cgs.media.medalGauntlet, ps->persistant[PERS_GAUNTLET_FRAG_COUNT]); + reward = qtrue; + //Com_Printf("guantlet frag\n"); + } + if (ps->persistant[PERS_DEFEND_COUNT] != ops->persistant[PERS_DEFEND_COUNT]) { + pushReward(cgs.media.defendSound, cgs.media.medalDefend, ps->persistant[PERS_DEFEND_COUNT]); + reward = qtrue; + //Com_Printf("defend\n"); + } + if (ps->persistant[PERS_ASSIST_COUNT] != ops->persistant[PERS_ASSIST_COUNT]) { + //pushReward(cgs.media.assistSound, cgs.media.medalAssist, ps->persistant[PERS_ASSIST_COUNT]); + //reward = qtrue; + //Com_Printf("assist\n"); + } + // if any of the player event bits changed + if (ps->persistant[PERS_PLAYEREVENTS] != ops->persistant[PERS_PLAYEREVENTS]) { + if ((ps->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_DENIEDREWARD) != + (ops->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_DENIEDREWARD)) { + trap_S_StartLocalSound( cgs.media.deniedSound, CHAN_ANNOUNCER ); + } + else if ((ps->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_GAUNTLETREWARD) != + (ops->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_GAUNTLETREWARD)) { + trap_S_StartLocalSound( cgs.media.humiliationSound, CHAN_ANNOUNCER ); + } + reward = qtrue; + } +#else + reward = qfalse; +#endif + // lead changes + if (!reward && cgAnnouncerTime < cg.time) { + // + if ( !cg.warmup ) { + // never play lead changes during warmup + if ( ps->persistant[PERS_RANK] != ops->persistant[PERS_RANK] ) { + if ( cgs.gametype < GT_TEAM) { + if ( ps->persistant[PERS_RANK] == 0 ) { + CG_AddBufferedSound(cgs.media.takenLeadSound); + cgAnnouncerTime = cg.time + 3000; + } else if ( ps->persistant[PERS_RANK] == RANK_TIED_FLAG ) { + //CG_AddBufferedSound(cgs.media.tiedLeadSound); + } else if ( ( ops->persistant[PERS_RANK] & ~RANK_TIED_FLAG ) == 0 ) { + //rww - only bother saying this if you have more than 1 kill already. + //joining the server and hearing "the force is not with you" is silly. + if (ps->persistant[PERS_SCORE] > 0) + { + CG_AddBufferedSound(cgs.media.lostLeadSound); + cgAnnouncerTime = cg.time + 3000; + } + } + } + } + } + } + + // timelimit warnings + if ( cgs.timelimit > 0 && cgAnnouncerTime < cg.time ) { + int msec; + + msec = cg.time - cgs.levelStartTime; + if ( !( cg.timelimitWarnings & 4 ) && msec > ( cgs.timelimit * 60 + 2 ) * 1000 ) { + cg.timelimitWarnings |= 1 | 2 | 4; + //trap_S_StartLocalSound( cgs.media.suddenDeathSound, CHAN_ANNOUNCER ); + } + else if ( !( cg.timelimitWarnings & 2 ) && msec > (cgs.timelimit - 1) * 60 * 1000 ) { + cg.timelimitWarnings |= 1 | 2; + trap_S_StartLocalSound( cgs.media.oneMinuteSound, CHAN_ANNOUNCER ); + cgAnnouncerTime = cg.time + 3000; + } + else if ( cgs.timelimit > 5 && !( cg.timelimitWarnings & 1 ) && msec > (cgs.timelimit - 5) * 60 * 1000 ) { + cg.timelimitWarnings |= 1; + trap_S_StartLocalSound( cgs.media.fiveMinuteSound, CHAN_ANNOUNCER ); + cgAnnouncerTime = cg.time + 3000; + } + } + + // fraglimit warnings + if ( cgs.fraglimit > 0 && cgs.gametype < GT_CTF && cgs.gametype != GT_TOURNAMENT && cgAnnouncerTime < cg.time) { + highScore = cgs.scores1; + if ( !( cg.fraglimitWarnings & 4 ) && highScore == (cgs.fraglimit - 1) ) { + cg.fraglimitWarnings |= 1 | 2 | 4; + CG_AddBufferedSound(cgs.media.oneFragSound); + cgAnnouncerTime = cg.time + 3000; + } + else if ( cgs.fraglimit > 2 && !( cg.fraglimitWarnings & 2 ) && highScore == (cgs.fraglimit - 2) ) { + cg.fraglimitWarnings |= 1 | 2; + CG_AddBufferedSound(cgs.media.twoFragSound); + cgAnnouncerTime = cg.time + 3000; + } + else if ( cgs.fraglimit > 3 && !( cg.fraglimitWarnings & 1 ) && highScore == (cgs.fraglimit - 3) ) { + cg.fraglimitWarnings |= 1; + CG_AddBufferedSound(cgs.media.threeFragSound); + cgAnnouncerTime = cg.time + 3000; + } + } +} + +/* +=============== +CG_TransitionPlayerState + +=============== +*/ +void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops ) { + // check for changing follow mode + if ( ps->clientNum != ops->clientNum ) { + cg.thisFrameTeleport = qtrue; + // make sure we don't get any unwanted transition effects + *ops = *ps; + } + + // damage events (player is getting wounded) + if ( ps->damageEvent != ops->damageEvent && ps->damageCount ) { + CG_DamageFeedback( ps->damageYaw, ps->damagePitch, ps->damageCount ); + } + + // respawning + if ( ps->persistant[PERS_SPAWN_COUNT] != ops->persistant[PERS_SPAWN_COUNT] ) { + CG_Respawn(); + } + + if ( cg.mapRestart ) { + CG_Respawn(); + cg.mapRestart = qfalse; + } + + if ( cg.snap->ps.pm_type != PM_INTERMISSION + && ps->persistant[PERS_TEAM] != TEAM_SPECTATOR ) { + CG_CheckLocalSounds( ps, ops ); + } + + // check for going low on ammo + CG_CheckAmmo(); + + // run events + CG_CheckPlayerstateEvents( ps, ops ); + + // smooth the ducking viewheight change + if ( ps->viewheight != ops->viewheight ) { + cg.duckChange = ps->viewheight - ops->viewheight; + cg.duckTime = cg.time; + } +} + diff --git a/code/cgame/cg_predict (2).c b/code/cgame/cg_predict (2).c new file mode 100644 index 0000000..4bd8683 --- /dev/null +++ b/code/cgame/cg_predict (2).c @@ -0,0 +1,812 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_predict.c -- this file generates cg.predictedPlayerState by either +// interpolating between snapshots from the server or locally predicting +// ahead the client's movement. +// It also handles local physics interaction, like fragments bouncing off walls + +#include "cg_local.h" + +static pmove_t cg_pmove; + +static int cg_numSolidEntities; +static centity_t *cg_solidEntities[MAX_ENTITIES_IN_SNAPSHOT]; +static int cg_numTriggerEntities; +static centity_t *cg_triggerEntities[MAX_ENTITIES_IN_SNAPSHOT]; + +/* +==================== +CG_BuildSolidList + +When a new cg.snap has been set, this function builds a sublist +of the entities that are actually solid, to make for more +efficient collision detection +==================== +*/ +void CG_BuildSolidList( void ) { + int i; + centity_t *cent; + snapshot_t *snap; + entityState_t *ent; + + cg_numSolidEntities = 0; + cg_numTriggerEntities = 0; + + if ( cg.nextSnap && !cg.nextFrameTeleport && !cg.thisFrameTeleport ) { + snap = cg.nextSnap; + } else { + snap = cg.snap; + } + + for ( i = 0 ; i < snap->numEntities ; i++ ) { + cent = &cg_entities[ snap->entities[ i ].number ]; + ent = ¢->currentState; + + if ( ent->eType == ET_ITEM || ent->eType == ET_PUSH_TRIGGER || ent->eType == ET_TELEPORT_TRIGGER ) { + cg_triggerEntities[cg_numTriggerEntities] = cent; + cg_numTriggerEntities++; + continue; + } + + if ( cent->nextState.solid ) { + cg_solidEntities[cg_numSolidEntities] = cent; + cg_numSolidEntities++; + continue; + } + } +} + +/* +==================== +CG_ClipMoveToEntities + +==================== +*/ +static void CG_ClipMoveToEntities ( const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, + int skipNumber, int mask, trace_t *tr ) { + int i, x, zd, zu; + trace_t trace; + entityState_t *ent; + clipHandle_t cmodel; + vec3_t bmins, bmaxs; + vec3_t origin, angles; + centity_t *cent; + + for ( i = 0 ; i < cg_numSolidEntities ; i++ ) { + cent = cg_solidEntities[ i ]; + ent = ¢->currentState; + + if ( ent->number == skipNumber ) { + continue; + } + + if (ent->number > MAX_CLIENTS && cg.snap && ent->genericenemyindex && (ent->genericenemyindex-1024) == cg.snap->ps.clientNum) + { //rww - method of keeping objects from colliding in client-prediction (in case of ownership) + continue; + } + + if ( ent->solid == SOLID_BMODEL ) { + // special value for bmodel + cmodel = trap_CM_InlineModel( ent->modelindex ); + VectorCopy( cent->lerpAngles, angles ); + BG_EvaluateTrajectory( ¢->currentState.pos, cg.physicsTime, origin ); + } else { + // encoded bbox + x = (ent->solid & 255); + zd = ((ent->solid>>8) & 255); + zu = ((ent->solid>>16) & 255) - 32; + + bmins[0] = bmins[1] = -x; + bmaxs[0] = bmaxs[1] = x; + bmins[2] = -zd; + bmaxs[2] = zu; + + cmodel = trap_CM_TempBoxModel( bmins, bmaxs ); + VectorCopy( vec3_origin, angles ); + VectorCopy( cent->lerpOrigin, origin ); + } + + + trap_CM_TransformedBoxTrace ( &trace, start, end, + mins, maxs, cmodel, mask, origin, angles); + + if (trace.allsolid || trace.fraction < tr->fraction) { + trace.entityNum = ent->number; + *tr = trace; + } else if (trace.startsolid) { + tr->startsolid = qtrue; + } + if ( tr->allsolid ) { + return; + } + } +} + +/* +================ +CG_Trace +================ +*/ +void CG_Trace( trace_t *result, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, + int skipNumber, int mask ) { + trace_t t; + + trap_CM_BoxTrace ( &t, start, end, mins, maxs, 0, mask); + t.entityNum = t.fraction != 1.0 ? ENTITYNUM_WORLD : ENTITYNUM_NONE; + // check all other solid models + CG_ClipMoveToEntities (start, mins, maxs, end, skipNumber, mask, &t); + + *result = t; +} + +/* +================ +CG_PointContents +================ +*/ +int CG_PointContents( const vec3_t point, int passEntityNum ) { + int i; + entityState_t *ent; + centity_t *cent; + clipHandle_t cmodel; + int contents; + + contents = trap_CM_PointContents (point, 0); + + for ( i = 0 ; i < cg_numSolidEntities ; i++ ) { + cent = cg_solidEntities[ i ]; + + ent = ¢->currentState; + + if ( ent->number == passEntityNum ) { + continue; + } + + if (ent->solid != SOLID_BMODEL) { // special value for bmodel + continue; + } + + cmodel = trap_CM_InlineModel( ent->modelindex ); + if ( !cmodel ) { + continue; + } + + contents |= trap_CM_TransformedPointContents( point, cmodel, ent->origin, ent->angles ); + } + + return contents; +} + + +/* +======================== +CG_InterpolatePlayerState + +Generates cg.predictedPlayerState by interpolating between +cg.snap->player_state and cg.nextFrame->player_state +======================== +*/ +static void CG_InterpolatePlayerState( qboolean grabAngles ) { + float f; + int i; + playerState_t *out; + snapshot_t *prev, *next; + + out = &cg.predictedPlayerState; + prev = cg.snap; + next = cg.nextSnap; + + *out = cg.snap->ps; + + // if we are still allowing local input, short circuit the view angles + if ( grabAngles ) { + usercmd_t cmd; + int cmdNum; + + cmdNum = trap_GetCurrentCmdNumber(); + trap_GetUserCmd( cmdNum, &cmd ); + + PM_UpdateViewAngles( out, &cmd ); + } + + // if the next frame is a teleport, we can't lerp to it + if ( cg.nextFrameTeleport ) { + return; + } + + if ( !next || next->serverTime <= prev->serverTime ) { + return; + } + + f = (float)( cg.time - prev->serverTime ) / ( next->serverTime - prev->serverTime ); + + i = next->ps.bobCycle; + if ( i < prev->ps.bobCycle ) { + i += 256; // handle wraparound + } + out->bobCycle = prev->ps.bobCycle + f * ( i - prev->ps.bobCycle ); + + for ( i = 0 ; i < 3 ; i++ ) { + out->origin[i] = prev->ps.origin[i] + f * (next->ps.origin[i] - prev->ps.origin[i] ); + if ( !grabAngles ) { + out->viewangles[i] = LerpAngle( + prev->ps.viewangles[i], next->ps.viewangles[i], f ); + } + out->velocity[i] = prev->ps.velocity[i] + + f * (next->ps.velocity[i] - prev->ps.velocity[i] ); + } + +} + +/* +=================== +CG_TouchItem +=================== +*/ +static void CG_TouchItem( centity_t *cent ) { + gitem_t *item; + + if ( !cg_predictItems.integer ) { + return; + } + if ( !BG_PlayerTouchesItem( &cg.predictedPlayerState, ¢->currentState, cg.time ) ) { + return; + } + + if (cent->currentState.eFlags & EF_ITEMPLACEHOLDER) + { + return; + } + + if (cent->currentState.eFlags & EF_NODRAW) + { + return; + } + + // never pick an item up twice in a prediction + if ( cent->miscTime == cg.time ) { + return; + } + + if ( !BG_CanItemBeGrabbed( cgs.gametype, ¢->currentState, &cg.predictedPlayerState ) ) { + return; // can't hold it + } + + item = &bg_itemlist[ cent->currentState.modelindex ]; + + //Currently there is no reliable way of knowing if the client has touched a certain item before another if they are next to each other, or rather + //if the server has touched them in the same order. This results often in grabbing an item in the prediction and the server giving you the other + //item. So for now prediction of armor, health, and ammo is disabled. +/* + if (item->giType == IT_ARMOR) + { //rww - this will be stomped next update, but it's set so that we don't try to pick up two shields in one prediction and have the server cancel one + // cg.predictedPlayerState.stats[STAT_ARMOR] += item->quantity; + + //FIXME: This can't be predicted properly at the moment + return; + } + + if (item->giType == IT_HEALTH) + { //same as above, for health + // cg.predictedPlayerState.stats[STAT_HEALTH] += item->quantity; + + //FIXME: This can't be predicted properly at the moment + return; + } + + if (item->giType == IT_AMMO) + { //same as above, for ammo + // cg.predictedPlayerState.ammo[item->giTag] += item->quantity; + + //FIXME: This can't be predicted properly at the moment + return; + } + + if (item->giType == IT_HOLDABLE) + { //same as above, for holdables + // cg.predictedPlayerState.stats[STAT_HOLDABLE_ITEMS] |= (1 << item->giTag); + } +*/ + // Special case for flags. + // We don't predict touching our own flag + if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { + if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_RED && + item->giTag == PW_REDFLAG) + return; + if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_BLUE && + item->giTag == PW_BLUEFLAG) + return; + } + + if (item->giType == IT_POWERUP && + (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT || item->giTag == PW_FORCE_ENLIGHTENED_DARK)) + { + if (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT) + { + if (cg.predictedPlayerState.fd.forceSide != FORCE_LIGHTSIDE) + { + return; + } + } + else + { + if (cg.predictedPlayerState.fd.forceSide != FORCE_DARKSIDE) + { + return; + } + } + } + + + // grab it + BG_AddPredictableEventToPlayerstate( EV_ITEM_PICKUP, cent->currentState.number , &cg.predictedPlayerState); + + // remove it from the frame so it won't be drawn + cent->currentState.eFlags |= EF_NODRAW; + + // don't touch it again this prediction + cent->miscTime = cg.time; + + // if its a weapon, give them some predicted ammo so the autoswitch will work + if ( item->giType == IT_WEAPON ) { + cg.predictedPlayerState.stats[ STAT_WEAPONS ] |= 1 << item->giTag; + if ( !cg.predictedPlayerState.ammo[ item->giTag ] ) { + cg.predictedPlayerState.ammo[ item->giTag ] = 1; + } + } +} + + +/* +========================= +CG_TouchTriggerPrediction + +Predict push triggers and items +========================= +*/ +static void CG_TouchTriggerPrediction( void ) { + int i; + trace_t trace; + entityState_t *ent; + clipHandle_t cmodel; + centity_t *cent; + qboolean spectator; + + // dead clients don't activate triggers + if ( cg.predictedPlayerState.stats[STAT_HEALTH] <= 0 ) { + return; + } + + spectator = ( cg.predictedPlayerState.pm_type == PM_SPECTATOR ); + + if ( cg.predictedPlayerState.pm_type != PM_NORMAL && cg.predictedPlayerState.pm_type != PM_FLOAT && !spectator ) { + return; + } + + for ( i = 0 ; i < cg_numTriggerEntities ; i++ ) { + cent = cg_triggerEntities[ i ]; + ent = ¢->currentState; + + if ( ent->eType == ET_ITEM && !spectator ) { + CG_TouchItem( cent ); + continue; + } + + if ( ent->solid != SOLID_BMODEL ) { + continue; + } + + cmodel = trap_CM_InlineModel( ent->modelindex ); + if ( !cmodel ) { + continue; + } + + trap_CM_BoxTrace( &trace, cg.predictedPlayerState.origin, cg.predictedPlayerState.origin, + cg_pmove.mins, cg_pmove.maxs, cmodel, -1 ); + + if ( !trace.startsolid ) { + continue; + } + + if ( ent->eType == ET_TELEPORT_TRIGGER ) { + cg.hyperspace = qtrue; + } else if ( ent->eType == ET_PUSH_TRIGGER ) { + BG_TouchJumpPad( &cg.predictedPlayerState, ent ); + } + } + + // if we didn't touch a jump pad this pmove frame + if ( cg.predictedPlayerState.jumppad_frame != cg.predictedPlayerState.pmove_framecount ) { + cg.predictedPlayerState.jumppad_frame = 0; + cg.predictedPlayerState.jumppad_ent = 0; + } +} + +void CG_EntityStateToPlayerState( entityState_t *s, playerState_t *ps ) { + int i; + + ps->clientNum = s->number; + + VectorCopy( s->pos.trBase, ps->origin ); + + VectorCopy( s->pos.trDelta, ps->velocity ); + + VectorCopy( s->apos.trBase, ps->viewangles ); + + ps->fd.forceMindtrickTargetIndex = s->trickedentindex; + ps->fd.forceMindtrickTargetIndex2 = s->trickedentindex2; + ps->fd.forceMindtrickTargetIndex3 = s->trickedentindex3; + ps->fd.forceMindtrickTargetIndex4 = s->trickedentindex4; + + ps->saberLockFrame = s->forceFrame; + + ps->electrifyTime = s->emplacedOwner; + + ps->speed = s->speed; + + ps->genericEnemyIndex = s->genericenemyindex; + + ps->activeForcePass = s->activeForcePass; + + ps->movementDir = s->angles2[YAW]; + ps->legsAnim = s->legsAnim; + ps->torsoAnim = s->torsoAnim; + ps->clientNum = s->clientNum; + + ps->eFlags = s->eFlags; + + ps->saberInFlight = s->saberInFlight; + ps->saberEntityNum = s->saberEntityNum; + ps->saberMove = s->saberMove; + ps->fd.forcePowersActive = s->forcePowersActive; + + if (s->bolt1) + { + ps->duelInProgress = qtrue; + } + else + { + ps->duelInProgress = qfalse; + } + + if (s->bolt2) + { + ps->dualBlade = qtrue; + } + else + { + ps->dualBlade = qfalse; + } + + ps->emplacedIndex = s->otherEntityNum2; + + ps->saberHolstered = s->shouldtarget; //reuse bool in entitystate for players differently + ps->usingATST = s->teamowner; + + /* + if (ps->genericEnemyIndex != -1) + { + s->eFlags |= EF_SEEKERDRONE; + } + */ + ps->genericEnemyIndex = -1; //no real option for this + + //The client has no knowledge of health levels (except for the client entity) + if (s->eFlags & EF_DEAD) + { + ps->stats[STAT_HEALTH] = 0; + } + else + { + ps->stats[STAT_HEALTH] = 100; + } + + /* + if ( ps->externalEvent ) { + s->event = ps->externalEvent; + s->eventParm = ps->externalEventParm; + } else if ( ps->entityEventSequence < ps->eventSequence ) { + int seq; + + if ( ps->entityEventSequence < ps->eventSequence - MAX_PS_EVENTS) { + ps->entityEventSequence = ps->eventSequence - MAX_PS_EVENTS; + } + seq = ps->entityEventSequence & (MAX_PS_EVENTS-1); + s->event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 ); + s->eventParm = ps->eventParms[ seq ]; + ps->entityEventSequence++; + } + */ + //Eh. + + ps->weapon = s->weapon; + ps->groundEntityNum = s->groundEntityNum; + + for ( i = 0 ; i < MAX_POWERUPS ; i++ ) { + if (s->powerups & (1 << i)) + { + ps->powerups[i] = 30; + } + else + { + ps->powerups[i] = 0; + } + } + + ps->loopSound = s->loopSound; + ps->generic1 = s->generic1; +} + +playerState_t cgSendPS[MAX_CLIENTS]; + +/* +================= +CG_PredictPlayerState + +Generates cg.predictedPlayerState for the current cg.time +cg.predictedPlayerState is guaranteed to be valid after exiting. + +For demo playback, this will be an interpolation between two valid +playerState_t. + +For normal gameplay, it will be the result of predicted usercmd_t on +top of the most recent playerState_t received from the server. + +Each new snapshot will usually have one or more new usercmd over the last, +but we simulate all unacknowledged commands each time, not just the new ones. +This means that on an internet connection, quite a few pmoves may be issued +each frame. + +OPTIMIZE: don't re-simulate unless the newly arrived snapshot playerState_t +differs from the predicted one. Would require saving all intermediate +playerState_t during prediction. + +We detect prediction errors and allow them to be decayed off over several frames +to ease the jerk. +================= +*/ +void CG_PredictPlayerState( void ) { + int cmdNum, current, i; + playerState_t oldPlayerState; + qboolean moved; + usercmd_t oldestCmd; + usercmd_t latestCmd; + + cg.hyperspace = qfalse; // will be set if touching a trigger_teleport + + // if this is the first frame we must guarantee + // predictedPlayerState is valid even if there is some + // other error condition + if ( !cg.validPPS ) { + cg.validPPS = qtrue; + cg.predictedPlayerState = cg.snap->ps; + } + + // demo playback just copies the moves + if ( cg.demoPlayback || (cg.snap->ps.pm_flags & PMF_FOLLOW) ) { + CG_InterpolatePlayerState( qfalse ); + return; + } + + // non-predicting local movement will grab the latest angles + if ( cg_nopredict.integer || cg_synchronousClients.integer ) { + CG_InterpolatePlayerState( qtrue ); + return; + } + + // prepare for pmove + cg_pmove.ps = &cg.predictedPlayerState; + cg_pmove.trace = CG_Trace; + cg_pmove.pointcontents = CG_PointContents; + if ( cg_pmove.ps->pm_type == PM_DEAD ) { + cg_pmove.tracemask = MASK_PLAYERSOLID & ~CONTENTS_BODY; + } + else { + cg_pmove.tracemask = MASK_PLAYERSOLID; + } + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ) { + cg_pmove.tracemask &= ~CONTENTS_BODY; // spectators can fly through bodies + } + cg_pmove.noFootsteps = ( cgs.dmflags & DF_NO_FOOTSTEPS ) > 0; + + // save the state before the pmove so we can detect transitions + oldPlayerState = cg.predictedPlayerState; + + current = trap_GetCurrentCmdNumber(); + + // if we don't have the commands right after the snapshot, we + // can't accurately predict a current position, so just freeze at + // the last good position we had + cmdNum = current - CMD_BACKUP + 1; + trap_GetUserCmd( cmdNum, &oldestCmd ); + if ( oldestCmd.serverTime > cg.snap->ps.commandTime + && oldestCmd.serverTime < cg.time ) { // special check for map_restart + if ( cg_showmiss.integer ) { + CG_Printf ("exceeded PACKET_BACKUP on commands\n"); + } + return; + } + + // get the latest command so we can know which commands are from previous map_restarts + trap_GetUserCmd( current, &latestCmd ); + + // get the most recent information we have, even if + // the server time is beyond our current cg.time, + // because predicted player positions are going to + // be ahead of everything else anyway + if ( cg.nextSnap && !cg.nextFrameTeleport && !cg.thisFrameTeleport ) { + cg.predictedPlayerState = cg.nextSnap->ps; + cg.physicsTime = cg.nextSnap->serverTime; + } else { + cg.predictedPlayerState = cg.snap->ps; + cg.physicsTime = cg.snap->serverTime; + } + + if ( pmove_msec.integer < 8 ) { + trap_Cvar_Set("pmove_msec", "8"); + } + else if (pmove_msec.integer > 33) { + trap_Cvar_Set("pmove_msec", "33"); + } + + cg_pmove.pmove_fixed = pmove_fixed.integer;// | cg_pmove_fixed.integer; + cg_pmove.pmove_msec = pmove_msec.integer; + + // run cmds + moved = qfalse; + for ( cmdNum = current - CMD_BACKUP + 1 ; cmdNum <= current ; cmdNum++ ) { + // get the command + trap_GetUserCmd( cmdNum, &cg_pmove.cmd ); + + if ( cg_pmove.pmove_fixed ) { + PM_UpdateViewAngles( cg_pmove.ps, &cg_pmove.cmd ); + } + + // don't do anything if the time is before the snapshot player time + if ( cg_pmove.cmd.serverTime <= cg.predictedPlayerState.commandTime ) { + continue; + } + + // don't do anything if the command was from a previous map_restart + if ( cg_pmove.cmd.serverTime > latestCmd.serverTime ) { + continue; + } + + // check for a prediction error from last frame + // on a lan, this will often be the exact value + // from the snapshot, but on a wan we will have + // to predict several commands to get to the point + // we want to compare + if ( cg.predictedPlayerState.commandTime == oldPlayerState.commandTime ) { + vec3_t delta; + float len; + + if ( cg.thisFrameTeleport ) { + // a teleport will not cause an error decay + VectorClear( cg.predictedError ); + if ( cg_showmiss.integer ) { + CG_Printf( "PredictionTeleport\n" ); + } + cg.thisFrameTeleport = qfalse; + } else { + vec3_t adjusted; + CG_AdjustPositionForMover( cg.predictedPlayerState.origin, + cg.predictedPlayerState.groundEntityNum, cg.physicsTime, cg.oldTime, adjusted ); + + if ( cg_showmiss.integer ) { + if (!VectorCompare( oldPlayerState.origin, adjusted )) { + CG_Printf("prediction error\n"); + } + } + VectorSubtract( oldPlayerState.origin, adjusted, delta ); + len = VectorLength( delta ); + if ( len > 0.1 ) { + if ( cg_showmiss.integer ) { + CG_Printf("Prediction miss: %f\n", len); + } + if ( cg_errorDecay.integer ) { + int t; + float f; + + t = cg.time - cg.predictedErrorTime; + f = ( cg_errorDecay.value - t ) / cg_errorDecay.value; + if ( f < 0 ) { + f = 0; + } + if ( f > 0 && cg_showmiss.integer ) { + CG_Printf("Double prediction decay: %f\n", f); + } + VectorScale( cg.predictedError, f, cg.predictedError ); + } else { + VectorClear( cg.predictedError ); + } + VectorAdd( delta, cg.predictedError, cg.predictedError ); + cg.predictedErrorTime = cg.oldTime; + } + } + } + + if ( cg_pmove.pmove_fixed ) { + cg_pmove.cmd.serverTime = ((cg_pmove.cmd.serverTime + pmove_msec.integer-1) / pmove_msec.integer) * pmove_msec.integer; + } + + cg_pmove.animations = bgGlobalAnimations; + + cg_pmove.gametype = cgs.gametype; + + for ( i = 0 ; i < MAX_CLIENTS ; i++ ) + { + memset(&cgSendPS[i], 0, sizeof(cgSendPS[i])); + CG_EntityStateToPlayerState(&cg_entities[i].currentState, &cgSendPS[i]); + cg_pmove.bgClients[i] = &cgSendPS[i]; + } + + if (cg.snap && cg.snap->ps.saberLockTime > cg.time) + { + centity_t *blockOpp = &cg_entities[cg.snap->ps.saberLockEnemy]; + + if (blockOpp) + { + vec3_t lockDir, lockAng; + + VectorSubtract( blockOpp->lerpOrigin, cg.snap->ps.origin, lockDir ); + //lockAng[YAW] = vectoyaw( defDir ); + vectoangles(lockDir, lockAng); + + VectorCopy(lockAng, cg_pmove.ps->viewangles); + } + } + + Pmove (&cg_pmove); + + for ( i = 0 ; i < MAX_CLIENTS ; i++ ) + { + cg_entities[i].currentState.torsoAnim = cgSendPS[i].torsoAnim; + cg_entities[i].currentState.legsAnim = cgSendPS[i].legsAnim; + cg_entities[i].currentState.forceFrame = cgSendPS[i].saberLockFrame; + cg_entities[i].currentState.saberMove = cgSendPS[i].saberMove; + } + + moved = qtrue; + + // add push trigger movement effects + CG_TouchTriggerPrediction(); + + // check for predictable events that changed from previous predictions + //CG_CheckChangedPredictableEvents(&cg.predictedPlayerState); + } + + if ( cg_showmiss.integer > 1 ) { + CG_Printf( "[%i : %i] ", cg_pmove.cmd.serverTime, cg.time ); + } + + if ( !moved ) { + if ( cg_showmiss.integer ) { + CG_Printf( "not moved\n" ); + } + return; + } + + // adjust for the movement of the groundentity + CG_AdjustPositionForMover( cg.predictedPlayerState.origin, + cg.predictedPlayerState.groundEntityNum, + cg.physicsTime, cg.time, cg.predictedPlayerState.origin ); + + if ( cg_showmiss.integer ) { + if (cg.predictedPlayerState.eventSequence > oldPlayerState.eventSequence + MAX_PS_EVENTS) { + CG_Printf("WARNING: dropped event\n"); + } + } + + // fire events and other transition triggered things + CG_TransitionPlayerState( &cg.predictedPlayerState, &oldPlayerState ); + + if ( cg_showmiss.integer ) { + if (cg.eventSequence > cg.predictedPlayerState.eventSequence) { + CG_Printf("WARNING: double event\n"); + cg.eventSequence = cg.predictedPlayerState.eventSequence; + } + } +} + + diff --git a/code/cgame/cg_predict.c b/code/cgame/cg_predict.c new file mode 100644 index 0000000..4bd8683 --- /dev/null +++ b/code/cgame/cg_predict.c @@ -0,0 +1,812 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_predict.c -- this file generates cg.predictedPlayerState by either +// interpolating between snapshots from the server or locally predicting +// ahead the client's movement. +// It also handles local physics interaction, like fragments bouncing off walls + +#include "cg_local.h" + +static pmove_t cg_pmove; + +static int cg_numSolidEntities; +static centity_t *cg_solidEntities[MAX_ENTITIES_IN_SNAPSHOT]; +static int cg_numTriggerEntities; +static centity_t *cg_triggerEntities[MAX_ENTITIES_IN_SNAPSHOT]; + +/* +==================== +CG_BuildSolidList + +When a new cg.snap has been set, this function builds a sublist +of the entities that are actually solid, to make for more +efficient collision detection +==================== +*/ +void CG_BuildSolidList( void ) { + int i; + centity_t *cent; + snapshot_t *snap; + entityState_t *ent; + + cg_numSolidEntities = 0; + cg_numTriggerEntities = 0; + + if ( cg.nextSnap && !cg.nextFrameTeleport && !cg.thisFrameTeleport ) { + snap = cg.nextSnap; + } else { + snap = cg.snap; + } + + for ( i = 0 ; i < snap->numEntities ; i++ ) { + cent = &cg_entities[ snap->entities[ i ].number ]; + ent = ¢->currentState; + + if ( ent->eType == ET_ITEM || ent->eType == ET_PUSH_TRIGGER || ent->eType == ET_TELEPORT_TRIGGER ) { + cg_triggerEntities[cg_numTriggerEntities] = cent; + cg_numTriggerEntities++; + continue; + } + + if ( cent->nextState.solid ) { + cg_solidEntities[cg_numSolidEntities] = cent; + cg_numSolidEntities++; + continue; + } + } +} + +/* +==================== +CG_ClipMoveToEntities + +==================== +*/ +static void CG_ClipMoveToEntities ( const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, + int skipNumber, int mask, trace_t *tr ) { + int i, x, zd, zu; + trace_t trace; + entityState_t *ent; + clipHandle_t cmodel; + vec3_t bmins, bmaxs; + vec3_t origin, angles; + centity_t *cent; + + for ( i = 0 ; i < cg_numSolidEntities ; i++ ) { + cent = cg_solidEntities[ i ]; + ent = ¢->currentState; + + if ( ent->number == skipNumber ) { + continue; + } + + if (ent->number > MAX_CLIENTS && cg.snap && ent->genericenemyindex && (ent->genericenemyindex-1024) == cg.snap->ps.clientNum) + { //rww - method of keeping objects from colliding in client-prediction (in case of ownership) + continue; + } + + if ( ent->solid == SOLID_BMODEL ) { + // special value for bmodel + cmodel = trap_CM_InlineModel( ent->modelindex ); + VectorCopy( cent->lerpAngles, angles ); + BG_EvaluateTrajectory( ¢->currentState.pos, cg.physicsTime, origin ); + } else { + // encoded bbox + x = (ent->solid & 255); + zd = ((ent->solid>>8) & 255); + zu = ((ent->solid>>16) & 255) - 32; + + bmins[0] = bmins[1] = -x; + bmaxs[0] = bmaxs[1] = x; + bmins[2] = -zd; + bmaxs[2] = zu; + + cmodel = trap_CM_TempBoxModel( bmins, bmaxs ); + VectorCopy( vec3_origin, angles ); + VectorCopy( cent->lerpOrigin, origin ); + } + + + trap_CM_TransformedBoxTrace ( &trace, start, end, + mins, maxs, cmodel, mask, origin, angles); + + if (trace.allsolid || trace.fraction < tr->fraction) { + trace.entityNum = ent->number; + *tr = trace; + } else if (trace.startsolid) { + tr->startsolid = qtrue; + } + if ( tr->allsolid ) { + return; + } + } +} + +/* +================ +CG_Trace +================ +*/ +void CG_Trace( trace_t *result, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, + int skipNumber, int mask ) { + trace_t t; + + trap_CM_BoxTrace ( &t, start, end, mins, maxs, 0, mask); + t.entityNum = t.fraction != 1.0 ? ENTITYNUM_WORLD : ENTITYNUM_NONE; + // check all other solid models + CG_ClipMoveToEntities (start, mins, maxs, end, skipNumber, mask, &t); + + *result = t; +} + +/* +================ +CG_PointContents +================ +*/ +int CG_PointContents( const vec3_t point, int passEntityNum ) { + int i; + entityState_t *ent; + centity_t *cent; + clipHandle_t cmodel; + int contents; + + contents = trap_CM_PointContents (point, 0); + + for ( i = 0 ; i < cg_numSolidEntities ; i++ ) { + cent = cg_solidEntities[ i ]; + + ent = ¢->currentState; + + if ( ent->number == passEntityNum ) { + continue; + } + + if (ent->solid != SOLID_BMODEL) { // special value for bmodel + continue; + } + + cmodel = trap_CM_InlineModel( ent->modelindex ); + if ( !cmodel ) { + continue; + } + + contents |= trap_CM_TransformedPointContents( point, cmodel, ent->origin, ent->angles ); + } + + return contents; +} + + +/* +======================== +CG_InterpolatePlayerState + +Generates cg.predictedPlayerState by interpolating between +cg.snap->player_state and cg.nextFrame->player_state +======================== +*/ +static void CG_InterpolatePlayerState( qboolean grabAngles ) { + float f; + int i; + playerState_t *out; + snapshot_t *prev, *next; + + out = &cg.predictedPlayerState; + prev = cg.snap; + next = cg.nextSnap; + + *out = cg.snap->ps; + + // if we are still allowing local input, short circuit the view angles + if ( grabAngles ) { + usercmd_t cmd; + int cmdNum; + + cmdNum = trap_GetCurrentCmdNumber(); + trap_GetUserCmd( cmdNum, &cmd ); + + PM_UpdateViewAngles( out, &cmd ); + } + + // if the next frame is a teleport, we can't lerp to it + if ( cg.nextFrameTeleport ) { + return; + } + + if ( !next || next->serverTime <= prev->serverTime ) { + return; + } + + f = (float)( cg.time - prev->serverTime ) / ( next->serverTime - prev->serverTime ); + + i = next->ps.bobCycle; + if ( i < prev->ps.bobCycle ) { + i += 256; // handle wraparound + } + out->bobCycle = prev->ps.bobCycle + f * ( i - prev->ps.bobCycle ); + + for ( i = 0 ; i < 3 ; i++ ) { + out->origin[i] = prev->ps.origin[i] + f * (next->ps.origin[i] - prev->ps.origin[i] ); + if ( !grabAngles ) { + out->viewangles[i] = LerpAngle( + prev->ps.viewangles[i], next->ps.viewangles[i], f ); + } + out->velocity[i] = prev->ps.velocity[i] + + f * (next->ps.velocity[i] - prev->ps.velocity[i] ); + } + +} + +/* +=================== +CG_TouchItem +=================== +*/ +static void CG_TouchItem( centity_t *cent ) { + gitem_t *item; + + if ( !cg_predictItems.integer ) { + return; + } + if ( !BG_PlayerTouchesItem( &cg.predictedPlayerState, ¢->currentState, cg.time ) ) { + return; + } + + if (cent->currentState.eFlags & EF_ITEMPLACEHOLDER) + { + return; + } + + if (cent->currentState.eFlags & EF_NODRAW) + { + return; + } + + // never pick an item up twice in a prediction + if ( cent->miscTime == cg.time ) { + return; + } + + if ( !BG_CanItemBeGrabbed( cgs.gametype, ¢->currentState, &cg.predictedPlayerState ) ) { + return; // can't hold it + } + + item = &bg_itemlist[ cent->currentState.modelindex ]; + + //Currently there is no reliable way of knowing if the client has touched a certain item before another if they are next to each other, or rather + //if the server has touched them in the same order. This results often in grabbing an item in the prediction and the server giving you the other + //item. So for now prediction of armor, health, and ammo is disabled. +/* + if (item->giType == IT_ARMOR) + { //rww - this will be stomped next update, but it's set so that we don't try to pick up two shields in one prediction and have the server cancel one + // cg.predictedPlayerState.stats[STAT_ARMOR] += item->quantity; + + //FIXME: This can't be predicted properly at the moment + return; + } + + if (item->giType == IT_HEALTH) + { //same as above, for health + // cg.predictedPlayerState.stats[STAT_HEALTH] += item->quantity; + + //FIXME: This can't be predicted properly at the moment + return; + } + + if (item->giType == IT_AMMO) + { //same as above, for ammo + // cg.predictedPlayerState.ammo[item->giTag] += item->quantity; + + //FIXME: This can't be predicted properly at the moment + return; + } + + if (item->giType == IT_HOLDABLE) + { //same as above, for holdables + // cg.predictedPlayerState.stats[STAT_HOLDABLE_ITEMS] |= (1 << item->giTag); + } +*/ + // Special case for flags. + // We don't predict touching our own flag + if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { + if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_RED && + item->giTag == PW_REDFLAG) + return; + if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_BLUE && + item->giTag == PW_BLUEFLAG) + return; + } + + if (item->giType == IT_POWERUP && + (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT || item->giTag == PW_FORCE_ENLIGHTENED_DARK)) + { + if (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT) + { + if (cg.predictedPlayerState.fd.forceSide != FORCE_LIGHTSIDE) + { + return; + } + } + else + { + if (cg.predictedPlayerState.fd.forceSide != FORCE_DARKSIDE) + { + return; + } + } + } + + + // grab it + BG_AddPredictableEventToPlayerstate( EV_ITEM_PICKUP, cent->currentState.number , &cg.predictedPlayerState); + + // remove it from the frame so it won't be drawn + cent->currentState.eFlags |= EF_NODRAW; + + // don't touch it again this prediction + cent->miscTime = cg.time; + + // if its a weapon, give them some predicted ammo so the autoswitch will work + if ( item->giType == IT_WEAPON ) { + cg.predictedPlayerState.stats[ STAT_WEAPONS ] |= 1 << item->giTag; + if ( !cg.predictedPlayerState.ammo[ item->giTag ] ) { + cg.predictedPlayerState.ammo[ item->giTag ] = 1; + } + } +} + + +/* +========================= +CG_TouchTriggerPrediction + +Predict push triggers and items +========================= +*/ +static void CG_TouchTriggerPrediction( void ) { + int i; + trace_t trace; + entityState_t *ent; + clipHandle_t cmodel; + centity_t *cent; + qboolean spectator; + + // dead clients don't activate triggers + if ( cg.predictedPlayerState.stats[STAT_HEALTH] <= 0 ) { + return; + } + + spectator = ( cg.predictedPlayerState.pm_type == PM_SPECTATOR ); + + if ( cg.predictedPlayerState.pm_type != PM_NORMAL && cg.predictedPlayerState.pm_type != PM_FLOAT && !spectator ) { + return; + } + + for ( i = 0 ; i < cg_numTriggerEntities ; i++ ) { + cent = cg_triggerEntities[ i ]; + ent = ¢->currentState; + + if ( ent->eType == ET_ITEM && !spectator ) { + CG_TouchItem( cent ); + continue; + } + + if ( ent->solid != SOLID_BMODEL ) { + continue; + } + + cmodel = trap_CM_InlineModel( ent->modelindex ); + if ( !cmodel ) { + continue; + } + + trap_CM_BoxTrace( &trace, cg.predictedPlayerState.origin, cg.predictedPlayerState.origin, + cg_pmove.mins, cg_pmove.maxs, cmodel, -1 ); + + if ( !trace.startsolid ) { + continue; + } + + if ( ent->eType == ET_TELEPORT_TRIGGER ) { + cg.hyperspace = qtrue; + } else if ( ent->eType == ET_PUSH_TRIGGER ) { + BG_TouchJumpPad( &cg.predictedPlayerState, ent ); + } + } + + // if we didn't touch a jump pad this pmove frame + if ( cg.predictedPlayerState.jumppad_frame != cg.predictedPlayerState.pmove_framecount ) { + cg.predictedPlayerState.jumppad_frame = 0; + cg.predictedPlayerState.jumppad_ent = 0; + } +} + +void CG_EntityStateToPlayerState( entityState_t *s, playerState_t *ps ) { + int i; + + ps->clientNum = s->number; + + VectorCopy( s->pos.trBase, ps->origin ); + + VectorCopy( s->pos.trDelta, ps->velocity ); + + VectorCopy( s->apos.trBase, ps->viewangles ); + + ps->fd.forceMindtrickTargetIndex = s->trickedentindex; + ps->fd.forceMindtrickTargetIndex2 = s->trickedentindex2; + ps->fd.forceMindtrickTargetIndex3 = s->trickedentindex3; + ps->fd.forceMindtrickTargetIndex4 = s->trickedentindex4; + + ps->saberLockFrame = s->forceFrame; + + ps->electrifyTime = s->emplacedOwner; + + ps->speed = s->speed; + + ps->genericEnemyIndex = s->genericenemyindex; + + ps->activeForcePass = s->activeForcePass; + + ps->movementDir = s->angles2[YAW]; + ps->legsAnim = s->legsAnim; + ps->torsoAnim = s->torsoAnim; + ps->clientNum = s->clientNum; + + ps->eFlags = s->eFlags; + + ps->saberInFlight = s->saberInFlight; + ps->saberEntityNum = s->saberEntityNum; + ps->saberMove = s->saberMove; + ps->fd.forcePowersActive = s->forcePowersActive; + + if (s->bolt1) + { + ps->duelInProgress = qtrue; + } + else + { + ps->duelInProgress = qfalse; + } + + if (s->bolt2) + { + ps->dualBlade = qtrue; + } + else + { + ps->dualBlade = qfalse; + } + + ps->emplacedIndex = s->otherEntityNum2; + + ps->saberHolstered = s->shouldtarget; //reuse bool in entitystate for players differently + ps->usingATST = s->teamowner; + + /* + if (ps->genericEnemyIndex != -1) + { + s->eFlags |= EF_SEEKERDRONE; + } + */ + ps->genericEnemyIndex = -1; //no real option for this + + //The client has no knowledge of health levels (except for the client entity) + if (s->eFlags & EF_DEAD) + { + ps->stats[STAT_HEALTH] = 0; + } + else + { + ps->stats[STAT_HEALTH] = 100; + } + + /* + if ( ps->externalEvent ) { + s->event = ps->externalEvent; + s->eventParm = ps->externalEventParm; + } else if ( ps->entityEventSequence < ps->eventSequence ) { + int seq; + + if ( ps->entityEventSequence < ps->eventSequence - MAX_PS_EVENTS) { + ps->entityEventSequence = ps->eventSequence - MAX_PS_EVENTS; + } + seq = ps->entityEventSequence & (MAX_PS_EVENTS-1); + s->event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 ); + s->eventParm = ps->eventParms[ seq ]; + ps->entityEventSequence++; + } + */ + //Eh. + + ps->weapon = s->weapon; + ps->groundEntityNum = s->groundEntityNum; + + for ( i = 0 ; i < MAX_POWERUPS ; i++ ) { + if (s->powerups & (1 << i)) + { + ps->powerups[i] = 30; + } + else + { + ps->powerups[i] = 0; + } + } + + ps->loopSound = s->loopSound; + ps->generic1 = s->generic1; +} + +playerState_t cgSendPS[MAX_CLIENTS]; + +/* +================= +CG_PredictPlayerState + +Generates cg.predictedPlayerState for the current cg.time +cg.predictedPlayerState is guaranteed to be valid after exiting. + +For demo playback, this will be an interpolation between two valid +playerState_t. + +For normal gameplay, it will be the result of predicted usercmd_t on +top of the most recent playerState_t received from the server. + +Each new snapshot will usually have one or more new usercmd over the last, +but we simulate all unacknowledged commands each time, not just the new ones. +This means that on an internet connection, quite a few pmoves may be issued +each frame. + +OPTIMIZE: don't re-simulate unless the newly arrived snapshot playerState_t +differs from the predicted one. Would require saving all intermediate +playerState_t during prediction. + +We detect prediction errors and allow them to be decayed off over several frames +to ease the jerk. +================= +*/ +void CG_PredictPlayerState( void ) { + int cmdNum, current, i; + playerState_t oldPlayerState; + qboolean moved; + usercmd_t oldestCmd; + usercmd_t latestCmd; + + cg.hyperspace = qfalse; // will be set if touching a trigger_teleport + + // if this is the first frame we must guarantee + // predictedPlayerState is valid even if there is some + // other error condition + if ( !cg.validPPS ) { + cg.validPPS = qtrue; + cg.predictedPlayerState = cg.snap->ps; + } + + // demo playback just copies the moves + if ( cg.demoPlayback || (cg.snap->ps.pm_flags & PMF_FOLLOW) ) { + CG_InterpolatePlayerState( qfalse ); + return; + } + + // non-predicting local movement will grab the latest angles + if ( cg_nopredict.integer || cg_synchronousClients.integer ) { + CG_InterpolatePlayerState( qtrue ); + return; + } + + // prepare for pmove + cg_pmove.ps = &cg.predictedPlayerState; + cg_pmove.trace = CG_Trace; + cg_pmove.pointcontents = CG_PointContents; + if ( cg_pmove.ps->pm_type == PM_DEAD ) { + cg_pmove.tracemask = MASK_PLAYERSOLID & ~CONTENTS_BODY; + } + else { + cg_pmove.tracemask = MASK_PLAYERSOLID; + } + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ) { + cg_pmove.tracemask &= ~CONTENTS_BODY; // spectators can fly through bodies + } + cg_pmove.noFootsteps = ( cgs.dmflags & DF_NO_FOOTSTEPS ) > 0; + + // save the state before the pmove so we can detect transitions + oldPlayerState = cg.predictedPlayerState; + + current = trap_GetCurrentCmdNumber(); + + // if we don't have the commands right after the snapshot, we + // can't accurately predict a current position, so just freeze at + // the last good position we had + cmdNum = current - CMD_BACKUP + 1; + trap_GetUserCmd( cmdNum, &oldestCmd ); + if ( oldestCmd.serverTime > cg.snap->ps.commandTime + && oldestCmd.serverTime < cg.time ) { // special check for map_restart + if ( cg_showmiss.integer ) { + CG_Printf ("exceeded PACKET_BACKUP on commands\n"); + } + return; + } + + // get the latest command so we can know which commands are from previous map_restarts + trap_GetUserCmd( current, &latestCmd ); + + // get the most recent information we have, even if + // the server time is beyond our current cg.time, + // because predicted player positions are going to + // be ahead of everything else anyway + if ( cg.nextSnap && !cg.nextFrameTeleport && !cg.thisFrameTeleport ) { + cg.predictedPlayerState = cg.nextSnap->ps; + cg.physicsTime = cg.nextSnap->serverTime; + } else { + cg.predictedPlayerState = cg.snap->ps; + cg.physicsTime = cg.snap->serverTime; + } + + if ( pmove_msec.integer < 8 ) { + trap_Cvar_Set("pmove_msec", "8"); + } + else if (pmove_msec.integer > 33) { + trap_Cvar_Set("pmove_msec", "33"); + } + + cg_pmove.pmove_fixed = pmove_fixed.integer;// | cg_pmove_fixed.integer; + cg_pmove.pmove_msec = pmove_msec.integer; + + // run cmds + moved = qfalse; + for ( cmdNum = current - CMD_BACKUP + 1 ; cmdNum <= current ; cmdNum++ ) { + // get the command + trap_GetUserCmd( cmdNum, &cg_pmove.cmd ); + + if ( cg_pmove.pmove_fixed ) { + PM_UpdateViewAngles( cg_pmove.ps, &cg_pmove.cmd ); + } + + // don't do anything if the time is before the snapshot player time + if ( cg_pmove.cmd.serverTime <= cg.predictedPlayerState.commandTime ) { + continue; + } + + // don't do anything if the command was from a previous map_restart + if ( cg_pmove.cmd.serverTime > latestCmd.serverTime ) { + continue; + } + + // check for a prediction error from last frame + // on a lan, this will often be the exact value + // from the snapshot, but on a wan we will have + // to predict several commands to get to the point + // we want to compare + if ( cg.predictedPlayerState.commandTime == oldPlayerState.commandTime ) { + vec3_t delta; + float len; + + if ( cg.thisFrameTeleport ) { + // a teleport will not cause an error decay + VectorClear( cg.predictedError ); + if ( cg_showmiss.integer ) { + CG_Printf( "PredictionTeleport\n" ); + } + cg.thisFrameTeleport = qfalse; + } else { + vec3_t adjusted; + CG_AdjustPositionForMover( cg.predictedPlayerState.origin, + cg.predictedPlayerState.groundEntityNum, cg.physicsTime, cg.oldTime, adjusted ); + + if ( cg_showmiss.integer ) { + if (!VectorCompare( oldPlayerState.origin, adjusted )) { + CG_Printf("prediction error\n"); + } + } + VectorSubtract( oldPlayerState.origin, adjusted, delta ); + len = VectorLength( delta ); + if ( len > 0.1 ) { + if ( cg_showmiss.integer ) { + CG_Printf("Prediction miss: %f\n", len); + } + if ( cg_errorDecay.integer ) { + int t; + float f; + + t = cg.time - cg.predictedErrorTime; + f = ( cg_errorDecay.value - t ) / cg_errorDecay.value; + if ( f < 0 ) { + f = 0; + } + if ( f > 0 && cg_showmiss.integer ) { + CG_Printf("Double prediction decay: %f\n", f); + } + VectorScale( cg.predictedError, f, cg.predictedError ); + } else { + VectorClear( cg.predictedError ); + } + VectorAdd( delta, cg.predictedError, cg.predictedError ); + cg.predictedErrorTime = cg.oldTime; + } + } + } + + if ( cg_pmove.pmove_fixed ) { + cg_pmove.cmd.serverTime = ((cg_pmove.cmd.serverTime + pmove_msec.integer-1) / pmove_msec.integer) * pmove_msec.integer; + } + + cg_pmove.animations = bgGlobalAnimations; + + cg_pmove.gametype = cgs.gametype; + + for ( i = 0 ; i < MAX_CLIENTS ; i++ ) + { + memset(&cgSendPS[i], 0, sizeof(cgSendPS[i])); + CG_EntityStateToPlayerState(&cg_entities[i].currentState, &cgSendPS[i]); + cg_pmove.bgClients[i] = &cgSendPS[i]; + } + + if (cg.snap && cg.snap->ps.saberLockTime > cg.time) + { + centity_t *blockOpp = &cg_entities[cg.snap->ps.saberLockEnemy]; + + if (blockOpp) + { + vec3_t lockDir, lockAng; + + VectorSubtract( blockOpp->lerpOrigin, cg.snap->ps.origin, lockDir ); + //lockAng[YAW] = vectoyaw( defDir ); + vectoangles(lockDir, lockAng); + + VectorCopy(lockAng, cg_pmove.ps->viewangles); + } + } + + Pmove (&cg_pmove); + + for ( i = 0 ; i < MAX_CLIENTS ; i++ ) + { + cg_entities[i].currentState.torsoAnim = cgSendPS[i].torsoAnim; + cg_entities[i].currentState.legsAnim = cgSendPS[i].legsAnim; + cg_entities[i].currentState.forceFrame = cgSendPS[i].saberLockFrame; + cg_entities[i].currentState.saberMove = cgSendPS[i].saberMove; + } + + moved = qtrue; + + // add push trigger movement effects + CG_TouchTriggerPrediction(); + + // check for predictable events that changed from previous predictions + //CG_CheckChangedPredictableEvents(&cg.predictedPlayerState); + } + + if ( cg_showmiss.integer > 1 ) { + CG_Printf( "[%i : %i] ", cg_pmove.cmd.serverTime, cg.time ); + } + + if ( !moved ) { + if ( cg_showmiss.integer ) { + CG_Printf( "not moved\n" ); + } + return; + } + + // adjust for the movement of the groundentity + CG_AdjustPositionForMover( cg.predictedPlayerState.origin, + cg.predictedPlayerState.groundEntityNum, + cg.physicsTime, cg.time, cg.predictedPlayerState.origin ); + + if ( cg_showmiss.integer ) { + if (cg.predictedPlayerState.eventSequence > oldPlayerState.eventSequence + MAX_PS_EVENTS) { + CG_Printf("WARNING: dropped event\n"); + } + } + + // fire events and other transition triggered things + CG_TransitionPlayerState( &cg.predictedPlayerState, &oldPlayerState ); + + if ( cg_showmiss.integer ) { + if (cg.eventSequence > cg.predictedPlayerState.eventSequence) { + CG_Printf("WARNING: double event\n"); + cg.eventSequence = cg.predictedPlayerState.eventSequence; + } + } +} + + diff --git a/code/cgame/cg_public (2).h b/code/cgame/cg_public (2).h new file mode 100644 index 0000000..744c610 --- /dev/null +++ b/code/cgame/cg_public (2).h @@ -0,0 +1,406 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + + +#define CMD_BACKUP 64 +#define CMD_MASK (CMD_BACKUP - 1) +// allow a lot of command backups for very fast systems +// multiple commands may be combined into a single packet, so this +// needs to be larger than PACKET_BACKUP + + +#define MAX_ENTITIES_IN_SNAPSHOT 256 + +// snapshots are a view of the server at a given time + +// Snapshots are generated at regular time intervals by the server, +// but they may not be sent if a client's rate level is exceeded, or +// they may be dropped by the network. +typedef struct { + int snapFlags; // SNAPFLAG_RATE_DELAYED, etc + int ping; + + int serverTime; // server time the message is valid for (in msec) + + byte areamask[MAX_MAP_AREA_BYTES]; // portalarea visibility bits + + playerState_t ps; // complete information about the current player at this time + + int numEntities; // all of the entities that need to be presented + entityState_t entities[MAX_ENTITIES_IN_SNAPSHOT]; // at the time of this snapshot + + int numServerCommands; // text based server commands to execute when this + int serverCommandSequence; // snapshot becomes current +} snapshot_t; + +enum { + CGAME_EVENT_NONE, + CGAME_EVENT_TEAMMENU, + CGAME_EVENT_SCOREBOARD, + CGAME_EVENT_EDITHUD +}; + + +/* +================================================================== + +functions imported from the main executable + +================================================================== +*/ + +#define CGAME_IMPORT_API_VERSION 5 + +typedef enum { + CG_PRINT = 0, + CG_ERROR, + CG_MILLISECONDS, + CG_CVAR_REGISTER, + CG_CVAR_UPDATE, + CG_CVAR_SET, + CG_CVAR_VARIABLESTRINGBUFFER, + CG_ARGC, + CG_ARGV, + CG_ARGS, + CG_FS_FOPENFILE, + CG_FS_READ, + CG_FS_WRITE, + CG_FS_FCLOSEFILE, + CG_SENDCONSOLECOMMAND, + CG_ADDCOMMAND, + CG_REMOVECOMMAND, + CG_SENDCLIENTCOMMAND, + CG_UPDATESCREEN, + CG_CM_LOADMAP, + CG_CM_NUMINLINEMODELS, + CG_CM_INLINEMODEL, + CG_CM_TEMPBOXMODEL, + CG_CM_TEMPCAPSULEMODEL, + CG_CM_POINTCONTENTS, + CG_CM_TRANSFORMEDPOINTCONTENTS, + CG_CM_BOXTRACE, + CG_CM_CAPSULETRACE, + CG_CM_TRANSFORMEDBOXTRACE, + CG_CM_TRANSFORMEDCAPSULETRACE, + CG_CM_MARKFRAGMENTS, + CG_S_MUTESOUND, + CG_S_STARTSOUND, + CG_S_STARTLOCALSOUND, + CG_S_CLEARLOOPINGSOUNDS, + CG_S_ADDLOOPINGSOUND, + CG_S_UPDATEENTITYPOSITION, + CG_S_ADDREALLOOPINGSOUND, + CG_S_STOPLOOPINGSOUND, + CG_S_RESPATIALIZE, + CG_S_REGISTERSOUND, + CG_S_STARTBACKGROUNDTRACK, + CG_R_LOADWORLDMAP, + CG_R_REGISTERMODEL, + CG_R_REGISTERSKIN, + CG_R_REGISTERSHADER, + CG_R_REGISTERSHADERNOMIP, + CG_R_REGISTERFONT, + CG_R_FONT_STRLENPIXELS, + CG_R_FONT_STRLENCHARS, + CG_R_FONT_STRHEIGHTPIXELS, + CG_R_FONT_DRAWSTRING, + CG_LANGUAGE_ISASIAN, + CG_LANGUAGE_USESSPACES, + CG_ANYLANGUAGE_READCHARFROMSTRING, + + CGAME_MEMSET = 100, + CGAME_MEMCPY, + CGAME_STRNCPY, + CGAME_SIN, + CGAME_COS, + CGAME_ATAN2, + CGAME_SQRT, + CGAME_MATRIXMULTIPLY, + CGAME_ANGLEVECTORS, + CGAME_PERPENDICULARVECTOR, + CGAME_FLOOR, + CGAME_CEIL, + CGAME_ACOS, + CGAME_ASIN, + + CG_R_CLEARSCENE = 200, + CG_R_ADDREFENTITYTOSCENE, + CG_R_ADDPOLYTOSCENE, + CG_R_ADDPOLYSTOSCENE, + CG_R_LIGHTFORPOINT, + CG_R_ADDLIGHTTOSCENE, + CG_R_ADDADDITIVELIGHTTOSCENE, + CG_R_RENDERSCENE, + CG_R_SETCOLOR, + CG_R_DRAWSTRETCHPIC, + CG_R_MODELBOUNDS, + CG_R_LERPTAG, + CG_R_DRAWROTATEPIC, + CG_R_DRAWROTATEPIC2, + CG_R_REMAP_SHADER, + CG_R_GET_LIGHT_STYLE, + CG_R_SET_LIGHT_STYLE, + CG_R_GET_BMODEL_VERTS, + CG_FX_ADDLINE, + + CG_GETGLCONFIG, + CG_GETGAMESTATE, + CG_GETCURRENTSNAPSHOTNUMBER, + CG_GETSNAPSHOT, + CG_GETSERVERCOMMAND, + CG_GETCURRENTCMDNUMBER, + CG_GETUSERCMD, + CG_SETUSERCMDVALUE, + CG_SETCLIENTFORCEANGLE, + CG_SETCLIENTTURNEXTENT, + CG_OPENUIMENU, + CG_TESTPRINTINT, + CG_TESTPRINTFLOAT, + CG_MEMORY_REMAINING, + CG_KEY_ISDOWN, + CG_KEY_GETCATCHER, + CG_KEY_SETCATCHER, + CG_KEY_GETKEY, + + CG_PC_ADD_GLOBAL_DEFINE, + CG_PC_LOAD_SOURCE, + CG_PC_FREE_SOURCE, + CG_PC_READ_TOKEN, + CG_PC_SOURCE_FILE_AND_LINE, + CG_PC_LOAD_GLOBAL_DEFINES, + CG_PC_REMOVE_ALL_GLOBAL_DEFINES, + + CG_S_STOPBACKGROUNDTRACK, + CG_REAL_TIME, + CG_SNAPVECTOR, + CG_CIN_PLAYCINEMATIC, + CG_CIN_STOPCINEMATIC, + CG_CIN_RUNCINEMATIC, + CG_CIN_DRAWCINEMATIC, + CG_CIN_SETEXTENTS, + + CG_GET_ENTITY_TOKEN, + CG_R_INPVS, + CG_FX_REGISTER_EFFECT, + CG_FX_PLAY_SIMPLE_EFFECT, + CG_FX_PLAY_EFFECT, + CG_FX_PLAY_ENTITY_EFFECT, + CG_FX_PLAY_SIMPLE_EFFECT_ID, + CG_FX_PLAY_EFFECT_ID, + CG_FX_PLAY_ENTITY_EFFECT_ID, + CG_FX_PLAY_BOLTED_EFFECT_ID, + CG_FX_ADD_SCHEDULED_EFFECTS, + CG_FX_INIT_SYSTEM, + CG_FX_FREE_SYSTEM, + CG_FX_ADJUST_TIME, + CG_FX_ADDPOLY, + CG_FX_ADDBEZIER, + CG_FX_ADDPRIMITIVE, + CG_FX_ADDSPRITE, + + CG_SP_PRINT, + CG_SP_GETSTRINGTEXTSTRING, + CG_SP_REGISTER, + + CG_ROFF_CLEAN, + CG_ROFF_UPDATE_ENTITIES, + CG_ROFF_CACHE, + CG_ROFF_PLAY, + CG_ROFF_PURGE_ENT, + +/* +Ghoul2 Insert Start +*/ + CG_G2_LISTSURFACES, + CG_G2_LISTBONES, + CG_G2_SETMODELS, + CG_G2_HAVEWEGHOULMODELS, + CG_G2_GIVEMEVECTORFROMMATRIX, + CG_G2_GETBOLT, + CG_G2_GETBOLT_NOREC, + CG_G2_GETBOLT_NOREC_NOROT, + CG_G2_INITGHOUL2MODEL, + CG_G2_COLLISIONDETECT, + CG_G2_CLEANMODELS, + CG_G2_ANGLEOVERRIDE, + CG_G2_PLAYANIM, + CG_G2_GETGLANAME, + CG_G2_COPYGHOUL2INSTANCE, + CG_G2_COPYSPECIFICGHOUL2MODEL, + CG_G2_DUPLICATEGHOUL2INSTANCE, + CG_G2_HASGHOUL2MODELONINDEX, + CG_G2_REMOVEGHOUL2MODEL, + CG_G2_ADDBOLT, + CG_G2_SETBOLTON, + CG_G2_SETROOTSURFACE, + CG_G2_SETSURFACEONOFF, + CG_G2_SETNEWORIGIN, + + CG_SET_SHARED_BUFFER, +/* +Ghoul2 Insert End +*/ +} cgameImport_t; + + +/* +================================================================== + +functions exported to the main executable + +================================================================== +*/ + +typedef enum { + CG_INIT, +// void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) + // called when the level loads or when the renderer is restarted + // all media should be registered at this time + // cgame will display loading status by calling SCR_Update, which + // will call CG_DrawInformation during the loading process + // reliableCommandSequence will be 0 on fresh loads, but higher for + // demos, tourney restarts, or vid_restarts + + CG_SHUTDOWN, +// void (*CG_Shutdown)( void ); + // oportunity to flush and close any open files + + CG_CONSOLE_COMMAND, +// qboolean (*CG_ConsoleCommand)( void ); + // a console command has been issued locally that is not recognized by the + // main game system. + // use Cmd_Argc() / Cmd_Argv() to read the command, return qfalse if the + // command is not known to the game + + CG_DRAW_ACTIVE_FRAME, +// void (*CG_DrawActiveFrame)( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ); + // Generates and draws a game scene and status information at the given time. + // If demoPlayback is set, local movement prediction will not be enabled + + CG_CROSSHAIR_PLAYER, +// int (*CG_CrosshairPlayer)( void ); + + CG_LAST_ATTACKER, +// int (*CG_LastAttacker)( void ); + + CG_KEY_EVENT, +// void (*CG_KeyEvent)( int key, qboolean down ); + + CG_MOUSE_EVENT, +// void (*CG_MouseEvent)( int dx, int dy ); + CG_EVENT_HANDLING, +// void (*CG_EventHandling)(int type); + + CG_POINT_CONTENTS, +// int CG_PointContents( const vec3_t point, int passEntityNum ); + + CG_GET_LERP_ORIGIN, +// void CG_LerpOrigin(int num, vec3_t result); + + CG_GET_LERP_ANGLES, + CG_GET_MODEL_SCALE, + CG_GET_GHOUL2, + CG_GET_MODEL_LIST, + + CG_CALC_LERP_POSITIONS, +// void CG_CalcEntityLerpPositions(int num); + + CG_TRACE, +//void CG_Trace( trace_t *result, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, +// int skipNumber, int mask ); + + CG_GET_ORIGIN, // int entnum, vec3_t origin + CG_GET_ANGLES, // int entnum, vec3_t angle + + CG_GET_BOLT_POS, // int entnum, vec3_t origin, vec3_t angle + + CG_GET_ORIGIN_TRAJECTORY, // int entnum + CG_GET_ANGLE_TRAJECTORY, // int entnum + + CG_ROFF_NOTETRACK_CALLBACK, // int entnum, char *notetrack + + CG_IMPACT_MARK, +//void CG_ImpactMark( qhandle_t markShader, const vec3_t origin, const vec3_t dir, +// float orientation, float red, float green, float blue, float alpha, +// qboolean alphaFade, float radius, qboolean temporary ) + + CG_MAP_CHANGE, + +} cgameExport_t; + +// CG_POINT_CONTENTS +typedef struct +{ + vec3_t mPoint; // input + int mPassEntityNum; // input +} TCGPointContents; + +// CG_GET_BOLT_POS +typedef struct +{ + vec3_t mPoint; // output + vec3_t mAngle; // output + int mEntityNum; // input +} TCGBoltPos; + +// CG_IMPACT_MARK +typedef struct +{ + int mHandle; + vec3_t mPoint; + vec3_t mAngle; + float mRotation; + float mRed; + float mGreen; + float mBlue; + float mAlphaStart; + float mSizeStart; +} TCGImpactMark; + +// CG_GET_LERP_ORIGIN +// CG_GET_LERP_ANGLES +// CG_GET_MODEL_SCALE +typedef struct +{ + int mEntityNum; // input + vec3_t mPoint; // output +} TCGVectorData; + +// CG_TRACE +typedef struct +{ + trace_t mResult; // output + vec3_t mStart, mMins, mMaxs, mEnd; // input + int mSkipNumber, mMask; // input +} TCGTrace; + +// CG_FX_CAMERASHAKE +typedef struct +{ + vec3_t mOrigin; // input + float mIntensity; // input + int mRadius; // input + int mTime; // input +} TCGCameraShake; + +// CG_MISC_ENT +typedef struct +{ + char mModel[MAX_QPATH]; // input + vec3_t mOrigin, mAngles, mScale; // input +} TCGMiscEnt; + +typedef struct +{ + refEntity_t ent; // output + void *ghoul2; // input + int modelIndex; // input + int boltIndex; // input + vec3_t origin; // input + vec3_t angles; // input + vec3_t modelScale; // input +} TCGPositionOnBolt; + +#define MAX_CG_SHARED_BUFFER_SIZE 2048 + +//---------------------------------------------- diff --git a/code/cgame/cg_public.h b/code/cgame/cg_public.h new file mode 100644 index 0000000..744c610 --- /dev/null +++ b/code/cgame/cg_public.h @@ -0,0 +1,406 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + + +#define CMD_BACKUP 64 +#define CMD_MASK (CMD_BACKUP - 1) +// allow a lot of command backups for very fast systems +// multiple commands may be combined into a single packet, so this +// needs to be larger than PACKET_BACKUP + + +#define MAX_ENTITIES_IN_SNAPSHOT 256 + +// snapshots are a view of the server at a given time + +// Snapshots are generated at regular time intervals by the server, +// but they may not be sent if a client's rate level is exceeded, or +// they may be dropped by the network. +typedef struct { + int snapFlags; // SNAPFLAG_RATE_DELAYED, etc + int ping; + + int serverTime; // server time the message is valid for (in msec) + + byte areamask[MAX_MAP_AREA_BYTES]; // portalarea visibility bits + + playerState_t ps; // complete information about the current player at this time + + int numEntities; // all of the entities that need to be presented + entityState_t entities[MAX_ENTITIES_IN_SNAPSHOT]; // at the time of this snapshot + + int numServerCommands; // text based server commands to execute when this + int serverCommandSequence; // snapshot becomes current +} snapshot_t; + +enum { + CGAME_EVENT_NONE, + CGAME_EVENT_TEAMMENU, + CGAME_EVENT_SCOREBOARD, + CGAME_EVENT_EDITHUD +}; + + +/* +================================================================== + +functions imported from the main executable + +================================================================== +*/ + +#define CGAME_IMPORT_API_VERSION 5 + +typedef enum { + CG_PRINT = 0, + CG_ERROR, + CG_MILLISECONDS, + CG_CVAR_REGISTER, + CG_CVAR_UPDATE, + CG_CVAR_SET, + CG_CVAR_VARIABLESTRINGBUFFER, + CG_ARGC, + CG_ARGV, + CG_ARGS, + CG_FS_FOPENFILE, + CG_FS_READ, + CG_FS_WRITE, + CG_FS_FCLOSEFILE, + CG_SENDCONSOLECOMMAND, + CG_ADDCOMMAND, + CG_REMOVECOMMAND, + CG_SENDCLIENTCOMMAND, + CG_UPDATESCREEN, + CG_CM_LOADMAP, + CG_CM_NUMINLINEMODELS, + CG_CM_INLINEMODEL, + CG_CM_TEMPBOXMODEL, + CG_CM_TEMPCAPSULEMODEL, + CG_CM_POINTCONTENTS, + CG_CM_TRANSFORMEDPOINTCONTENTS, + CG_CM_BOXTRACE, + CG_CM_CAPSULETRACE, + CG_CM_TRANSFORMEDBOXTRACE, + CG_CM_TRANSFORMEDCAPSULETRACE, + CG_CM_MARKFRAGMENTS, + CG_S_MUTESOUND, + CG_S_STARTSOUND, + CG_S_STARTLOCALSOUND, + CG_S_CLEARLOOPINGSOUNDS, + CG_S_ADDLOOPINGSOUND, + CG_S_UPDATEENTITYPOSITION, + CG_S_ADDREALLOOPINGSOUND, + CG_S_STOPLOOPINGSOUND, + CG_S_RESPATIALIZE, + CG_S_REGISTERSOUND, + CG_S_STARTBACKGROUNDTRACK, + CG_R_LOADWORLDMAP, + CG_R_REGISTERMODEL, + CG_R_REGISTERSKIN, + CG_R_REGISTERSHADER, + CG_R_REGISTERSHADERNOMIP, + CG_R_REGISTERFONT, + CG_R_FONT_STRLENPIXELS, + CG_R_FONT_STRLENCHARS, + CG_R_FONT_STRHEIGHTPIXELS, + CG_R_FONT_DRAWSTRING, + CG_LANGUAGE_ISASIAN, + CG_LANGUAGE_USESSPACES, + CG_ANYLANGUAGE_READCHARFROMSTRING, + + CGAME_MEMSET = 100, + CGAME_MEMCPY, + CGAME_STRNCPY, + CGAME_SIN, + CGAME_COS, + CGAME_ATAN2, + CGAME_SQRT, + CGAME_MATRIXMULTIPLY, + CGAME_ANGLEVECTORS, + CGAME_PERPENDICULARVECTOR, + CGAME_FLOOR, + CGAME_CEIL, + CGAME_ACOS, + CGAME_ASIN, + + CG_R_CLEARSCENE = 200, + CG_R_ADDREFENTITYTOSCENE, + CG_R_ADDPOLYTOSCENE, + CG_R_ADDPOLYSTOSCENE, + CG_R_LIGHTFORPOINT, + CG_R_ADDLIGHTTOSCENE, + CG_R_ADDADDITIVELIGHTTOSCENE, + CG_R_RENDERSCENE, + CG_R_SETCOLOR, + CG_R_DRAWSTRETCHPIC, + CG_R_MODELBOUNDS, + CG_R_LERPTAG, + CG_R_DRAWROTATEPIC, + CG_R_DRAWROTATEPIC2, + CG_R_REMAP_SHADER, + CG_R_GET_LIGHT_STYLE, + CG_R_SET_LIGHT_STYLE, + CG_R_GET_BMODEL_VERTS, + CG_FX_ADDLINE, + + CG_GETGLCONFIG, + CG_GETGAMESTATE, + CG_GETCURRENTSNAPSHOTNUMBER, + CG_GETSNAPSHOT, + CG_GETSERVERCOMMAND, + CG_GETCURRENTCMDNUMBER, + CG_GETUSERCMD, + CG_SETUSERCMDVALUE, + CG_SETCLIENTFORCEANGLE, + CG_SETCLIENTTURNEXTENT, + CG_OPENUIMENU, + CG_TESTPRINTINT, + CG_TESTPRINTFLOAT, + CG_MEMORY_REMAINING, + CG_KEY_ISDOWN, + CG_KEY_GETCATCHER, + CG_KEY_SETCATCHER, + CG_KEY_GETKEY, + + CG_PC_ADD_GLOBAL_DEFINE, + CG_PC_LOAD_SOURCE, + CG_PC_FREE_SOURCE, + CG_PC_READ_TOKEN, + CG_PC_SOURCE_FILE_AND_LINE, + CG_PC_LOAD_GLOBAL_DEFINES, + CG_PC_REMOVE_ALL_GLOBAL_DEFINES, + + CG_S_STOPBACKGROUNDTRACK, + CG_REAL_TIME, + CG_SNAPVECTOR, + CG_CIN_PLAYCINEMATIC, + CG_CIN_STOPCINEMATIC, + CG_CIN_RUNCINEMATIC, + CG_CIN_DRAWCINEMATIC, + CG_CIN_SETEXTENTS, + + CG_GET_ENTITY_TOKEN, + CG_R_INPVS, + CG_FX_REGISTER_EFFECT, + CG_FX_PLAY_SIMPLE_EFFECT, + CG_FX_PLAY_EFFECT, + CG_FX_PLAY_ENTITY_EFFECT, + CG_FX_PLAY_SIMPLE_EFFECT_ID, + CG_FX_PLAY_EFFECT_ID, + CG_FX_PLAY_ENTITY_EFFECT_ID, + CG_FX_PLAY_BOLTED_EFFECT_ID, + CG_FX_ADD_SCHEDULED_EFFECTS, + CG_FX_INIT_SYSTEM, + CG_FX_FREE_SYSTEM, + CG_FX_ADJUST_TIME, + CG_FX_ADDPOLY, + CG_FX_ADDBEZIER, + CG_FX_ADDPRIMITIVE, + CG_FX_ADDSPRITE, + + CG_SP_PRINT, + CG_SP_GETSTRINGTEXTSTRING, + CG_SP_REGISTER, + + CG_ROFF_CLEAN, + CG_ROFF_UPDATE_ENTITIES, + CG_ROFF_CACHE, + CG_ROFF_PLAY, + CG_ROFF_PURGE_ENT, + +/* +Ghoul2 Insert Start +*/ + CG_G2_LISTSURFACES, + CG_G2_LISTBONES, + CG_G2_SETMODELS, + CG_G2_HAVEWEGHOULMODELS, + CG_G2_GIVEMEVECTORFROMMATRIX, + CG_G2_GETBOLT, + CG_G2_GETBOLT_NOREC, + CG_G2_GETBOLT_NOREC_NOROT, + CG_G2_INITGHOUL2MODEL, + CG_G2_COLLISIONDETECT, + CG_G2_CLEANMODELS, + CG_G2_ANGLEOVERRIDE, + CG_G2_PLAYANIM, + CG_G2_GETGLANAME, + CG_G2_COPYGHOUL2INSTANCE, + CG_G2_COPYSPECIFICGHOUL2MODEL, + CG_G2_DUPLICATEGHOUL2INSTANCE, + CG_G2_HASGHOUL2MODELONINDEX, + CG_G2_REMOVEGHOUL2MODEL, + CG_G2_ADDBOLT, + CG_G2_SETBOLTON, + CG_G2_SETROOTSURFACE, + CG_G2_SETSURFACEONOFF, + CG_G2_SETNEWORIGIN, + + CG_SET_SHARED_BUFFER, +/* +Ghoul2 Insert End +*/ +} cgameImport_t; + + +/* +================================================================== + +functions exported to the main executable + +================================================================== +*/ + +typedef enum { + CG_INIT, +// void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) + // called when the level loads or when the renderer is restarted + // all media should be registered at this time + // cgame will display loading status by calling SCR_Update, which + // will call CG_DrawInformation during the loading process + // reliableCommandSequence will be 0 on fresh loads, but higher for + // demos, tourney restarts, or vid_restarts + + CG_SHUTDOWN, +// void (*CG_Shutdown)( void ); + // oportunity to flush and close any open files + + CG_CONSOLE_COMMAND, +// qboolean (*CG_ConsoleCommand)( void ); + // a console command has been issued locally that is not recognized by the + // main game system. + // use Cmd_Argc() / Cmd_Argv() to read the command, return qfalse if the + // command is not known to the game + + CG_DRAW_ACTIVE_FRAME, +// void (*CG_DrawActiveFrame)( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ); + // Generates and draws a game scene and status information at the given time. + // If demoPlayback is set, local movement prediction will not be enabled + + CG_CROSSHAIR_PLAYER, +// int (*CG_CrosshairPlayer)( void ); + + CG_LAST_ATTACKER, +// int (*CG_LastAttacker)( void ); + + CG_KEY_EVENT, +// void (*CG_KeyEvent)( int key, qboolean down ); + + CG_MOUSE_EVENT, +// void (*CG_MouseEvent)( int dx, int dy ); + CG_EVENT_HANDLING, +// void (*CG_EventHandling)(int type); + + CG_POINT_CONTENTS, +// int CG_PointContents( const vec3_t point, int passEntityNum ); + + CG_GET_LERP_ORIGIN, +// void CG_LerpOrigin(int num, vec3_t result); + + CG_GET_LERP_ANGLES, + CG_GET_MODEL_SCALE, + CG_GET_GHOUL2, + CG_GET_MODEL_LIST, + + CG_CALC_LERP_POSITIONS, +// void CG_CalcEntityLerpPositions(int num); + + CG_TRACE, +//void CG_Trace( trace_t *result, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, +// int skipNumber, int mask ); + + CG_GET_ORIGIN, // int entnum, vec3_t origin + CG_GET_ANGLES, // int entnum, vec3_t angle + + CG_GET_BOLT_POS, // int entnum, vec3_t origin, vec3_t angle + + CG_GET_ORIGIN_TRAJECTORY, // int entnum + CG_GET_ANGLE_TRAJECTORY, // int entnum + + CG_ROFF_NOTETRACK_CALLBACK, // int entnum, char *notetrack + + CG_IMPACT_MARK, +//void CG_ImpactMark( qhandle_t markShader, const vec3_t origin, const vec3_t dir, +// float orientation, float red, float green, float blue, float alpha, +// qboolean alphaFade, float radius, qboolean temporary ) + + CG_MAP_CHANGE, + +} cgameExport_t; + +// CG_POINT_CONTENTS +typedef struct +{ + vec3_t mPoint; // input + int mPassEntityNum; // input +} TCGPointContents; + +// CG_GET_BOLT_POS +typedef struct +{ + vec3_t mPoint; // output + vec3_t mAngle; // output + int mEntityNum; // input +} TCGBoltPos; + +// CG_IMPACT_MARK +typedef struct +{ + int mHandle; + vec3_t mPoint; + vec3_t mAngle; + float mRotation; + float mRed; + float mGreen; + float mBlue; + float mAlphaStart; + float mSizeStart; +} TCGImpactMark; + +// CG_GET_LERP_ORIGIN +// CG_GET_LERP_ANGLES +// CG_GET_MODEL_SCALE +typedef struct +{ + int mEntityNum; // input + vec3_t mPoint; // output +} TCGVectorData; + +// CG_TRACE +typedef struct +{ + trace_t mResult; // output + vec3_t mStart, mMins, mMaxs, mEnd; // input + int mSkipNumber, mMask; // input +} TCGTrace; + +// CG_FX_CAMERASHAKE +typedef struct +{ + vec3_t mOrigin; // input + float mIntensity; // input + int mRadius; // input + int mTime; // input +} TCGCameraShake; + +// CG_MISC_ENT +typedef struct +{ + char mModel[MAX_QPATH]; // input + vec3_t mOrigin, mAngles, mScale; // input +} TCGMiscEnt; + +typedef struct +{ + refEntity_t ent; // output + void *ghoul2; // input + int modelIndex; // input + int boltIndex; // input + vec3_t origin; // input + vec3_t angles; // input + vec3_t modelScale; // input +} TCGPositionOnBolt; + +#define MAX_CG_SHARED_BUFFER_SIZE 2048 + +//---------------------------------------------- diff --git a/code/cgame/cg_saga (2).c b/code/cgame/cg_saga (2).c new file mode 100644 index 0000000..c17dc85 --- /dev/null +++ b/code/cgame/cg_saga (2).c @@ -0,0 +1,432 @@ +#include "cg_local.h" +#include "bg_saga.h" + +#define DEFAULT_WIN_OBJECTIVE "sound/chars/kyle/prototype/personal.mp3" +#define DEFAULT_LOSE_OBJECTIVE "sound/chars/kyle/prototype/isntworking.mp3" + +#define DEFAULT_WIN_ROUND "sound/chars/kyle/prototype/personal.mp3" +#define DEFAULT_LOSE_ROUND "sound/chars/kyle/prototype/isntworking.mp3" + +char cg_saga_info[MAX_SAGA_INFO_SIZE]; +int cg_saga_valid; + +//The following two functions are very cheap parsing functions +int CGSagaGetValueGroup(char *buf, char *group, char *outbuf) +{ + char *place, *placesecond; + int iplace; + int failure; + int i; + int startpoint, startletter; + int subg = 0; + + i = 0; + + iplace = 0; + + place = strstr(buf, group); + + if (!place) + { + return 0; + } + + startpoint = place - buf + strlen(group) + 1; + startletter = (place - buf) - 1; + + failure = 0; + + while (buf[startpoint+1] != '{' || buf[startletter] != '\n') + { + placesecond = strstr(place+1, group); + + if (placesecond) + { + startpoint += (placesecond - place); + startletter += (placesecond - place); + place = placesecond; + } + else + { + failure = 1; + break; + } + } + + if (failure) + { + return 0; + } + + //we have found the proper group name if we made it here, so find the opening brace and read into the outbuf + //until hitting the end brace + + while (buf[startpoint] != '{') + { + startpoint++; + } + + startpoint++; + + while (buf[startpoint] != '}' || subg) + { + if (buf[startpoint] == '{') + { + subg++; + } + else if (buf[startpoint] == '}') + { + subg--; + } + outbuf[i] = buf[startpoint]; + i++; + startpoint++; + } + outbuf[i] = '\0'; + + return 1; +} + +int CGSagaGetPairedValue(char *buf, char *key, char *outbuf, int inquotes) +{ + char *place, *placesecond; + int startpoint, startletter; + int i, found; + + if (!buf || !key || !outbuf) + { + return 0; + } + + i = 0; + + while (buf[i] && buf[i] != '\0') + { + if (buf[i] == '/') + { + if (buf[i+1] && buf[i+1] != '\0' && buf[i+1] == '/') + { + while (buf[i] != '\n') + { + buf[i] = '/'; + i++; + } + } + } + i++; + } + + place = strstr(buf, key); + + if (!place) + { + return 0; + } + //tab == 9 + startpoint = place - buf + strlen(key); + startletter = (place - buf) - 1; + + found = 0; + + while (!found) + { + if (startletter == 0 || !buf[startletter] || buf[startletter] == '\0' || buf[startletter] == 9 || buf[startletter] == ' ' || buf[startletter] == '\n') + { + if (buf[startpoint] == '\0' || buf[startpoint] == 9 || buf[startpoint] == ' ' || buf[startpoint] == '\n') + { + found = 1; + break; + } + } + + placesecond = strstr(place+1, key); + + if (placesecond) + { + startpoint += placesecond - place; + startletter += placesecond - place; + place = placesecond; + } + else + { + place = NULL; + break; + } + + } + + if (!found || !place || !buf[startpoint] || buf[startpoint] == '\0') + { + return 0; + } + + while (buf[startpoint] == ' ' || buf[startpoint] == 9 || buf[startpoint] == '\n') + { + startpoint++; + } + + i = 0; + + if (inquotes) + { + while (buf[startpoint] && buf[startpoint] != '\"') + { + startpoint++; + } + + startpoint++; + } + + while (buf[startpoint] && buf[startpoint] != '\0' && buf[startpoint] != '\n') + { + outbuf[i] = buf[startpoint]; + i++; + startpoint++; + + if (inquotes && buf[startpoint] == '\"') + { + break; + } + } + + outbuf[i] = '\0'; + + return 1; +} + +void CG_InitSagaMode(void) +{ + char levelname[512]; + int len = 0; + int i = 0; + fileHandle_t f; + + if (cgs.gametype != GT_SAGA) + { + goto failure; + } + + Com_sprintf(levelname, sizeof(levelname), "%s\0", cgs.mapname); + + i = strlen(levelname)-1; + + while (i > 0 && levelname[i] && levelname[i] != '.') + { + i--; + } + + if (!i) + { + goto failure; + } + + levelname[i] = '\0'; //kill the ".bsp" + + Com_sprintf(levelname, sizeof(levelname), "%s.saga\0", levelname); + + if (!levelname || !levelname[0]) + { + goto failure; + } + + len = trap_FS_FOpenFile(levelname, &f, FS_READ); + + if (!f || len >= MAX_SAGA_INFO_SIZE) + { + goto failure; + } + + trap_FS_Read(cg_saga_info, len, f); + + cg_saga_valid = 1; + + return; + +failure: + cg_saga_valid = 0; +} + +void CG_SagaRoundOver(centity_t *ent, int won) +{ + int myTeam; + char teamstr[64]; + char objectives[MAX_SAGA_INFO_SIZE]; + char appstring[1024]; + char soundstr[1024]; + int success = 0; + + if (!cg_saga_valid) + { + Com_Printf("ERROR: Saga data does not exist on client!\n"); + return; + } + + if (!cg.snap) + { + return; //yikes + } + + myTeam = cg.snap->ps.persistant[PERS_TEAM]; + + if (myTeam == TEAM_SPECTATOR) + { + return; + } + + if (myTeam == SAGATEAM_IMPERIAL) + { + Com_sprintf(teamstr, sizeof(teamstr), "Imperial"); + } + else + { + Com_sprintf(teamstr, sizeof(teamstr), "Rebel"); + } + + if (CGSagaGetValueGroup(cg_saga_info, teamstr, objectives)) + { + if (won == myTeam) + { + success = CGSagaGetPairedValue(objectives, "wonround", appstring, 1); + } + else + { + success = CGSagaGetPairedValue(objectives, "lostround", appstring, 1); + } + + if (success) + { + Com_Printf("%s\n", appstring); + } + + if (myTeam == won) + { + Com_sprintf(teamstr, sizeof(teamstr), "roundover_sound_wewon"); + } + else + { + Com_sprintf(teamstr, sizeof(teamstr), "roundover_sound_welost"); + } + + if (CGSagaGetPairedValue(objectives, teamstr, appstring, 1)) + { + Com_sprintf(soundstr, sizeof(soundstr), appstring); + } + else + { + if (myTeam != won) + { + Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_LOSE_ROUND); + } + else + { + Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_WIN_ROUND); + } + } + + trap_S_StartLocalSound(trap_S_RegisterSound(soundstr), CHAN_ANNOUNCER); + //Com_Printf("Play sound: %s\n", soundstr); + } +} + +void CG_SagaObjectiveCompleted(centity_t *ent, int won, int objectivenum) +{ + int myTeam; + char teamstr[64]; + char objstr[256]; + char objectives[MAX_SAGA_INFO_SIZE]; + char foundobjective[MAX_SAGA_INFO_SIZE]; + char appstring[1024]; + char soundstr[1024]; + int success = 0; + int i = 0; + int i_r = 0; + + if (!cg_saga_valid) + { + Com_Printf("ERROR: Saga data does not exist on client!\n"); + return; + } + + if (!cg.snap) + { + return; //yikes + } + + myTeam = cg.snap->ps.persistant[PERS_TEAM]; + + if (myTeam == TEAM_SPECTATOR) + { + return; + } + + if (won == SAGATEAM_IMPERIAL) + { + Com_sprintf(teamstr, sizeof(teamstr), "Imperial"); + } + else + { + Com_sprintf(teamstr, sizeof(teamstr), "Rebel"); + } + + if (CGSagaGetValueGroup(cg_saga_info, teamstr, objectives)) + { + Com_sprintf(objstr, sizeof(objstr), "Objective%i", objectivenum); + + while (objectives[i]) + { + if (objectives[i] != 9) + { + objectives[i_r] = objectives[i]; + i_r++; + } + + i++; + } + objectives[i_r] = '\0'; + + if (CGSagaGetValueGroup(objectives, objstr, foundobjective)) + { + if (myTeam == SAGATEAM_IMPERIAL) + { + success = CGSagaGetPairedValue(foundobjective, "message_imperial", appstring, 1); + } + else + { + success = CGSagaGetPairedValue(foundobjective, "message_rebel", appstring, 1); + } + + if (success) + { + Com_Printf("%s\n", appstring); + } + + if (myTeam == SAGATEAM_IMPERIAL) + { + Com_sprintf(teamstr, sizeof(teamstr), "sound_imperial"); + } + else + { + Com_sprintf(teamstr, sizeof(teamstr), "sound_rebel"); + } + + if (CGSagaGetPairedValue(foundobjective, teamstr, appstring, 1)) + { + Com_sprintf(soundstr, sizeof(soundstr), appstring); + } + else + { + if (myTeam != won) + { + Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_LOSE_OBJECTIVE); + } + else + { + Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_WIN_OBJECTIVE); + } + } + + trap_S_StartLocalSound(trap_S_RegisterSound(soundstr), CHAN_ANNOUNCER); + //Com_Printf("Play sound: %s\n", soundstr); + } + } +} diff --git a/code/cgame/cg_saga.c b/code/cgame/cg_saga.c new file mode 100644 index 0000000..c17dc85 --- /dev/null +++ b/code/cgame/cg_saga.c @@ -0,0 +1,432 @@ +#include "cg_local.h" +#include "bg_saga.h" + +#define DEFAULT_WIN_OBJECTIVE "sound/chars/kyle/prototype/personal.mp3" +#define DEFAULT_LOSE_OBJECTIVE "sound/chars/kyle/prototype/isntworking.mp3" + +#define DEFAULT_WIN_ROUND "sound/chars/kyle/prototype/personal.mp3" +#define DEFAULT_LOSE_ROUND "sound/chars/kyle/prototype/isntworking.mp3" + +char cg_saga_info[MAX_SAGA_INFO_SIZE]; +int cg_saga_valid; + +//The following two functions are very cheap parsing functions +int CGSagaGetValueGroup(char *buf, char *group, char *outbuf) +{ + char *place, *placesecond; + int iplace; + int failure; + int i; + int startpoint, startletter; + int subg = 0; + + i = 0; + + iplace = 0; + + place = strstr(buf, group); + + if (!place) + { + return 0; + } + + startpoint = place - buf + strlen(group) + 1; + startletter = (place - buf) - 1; + + failure = 0; + + while (buf[startpoint+1] != '{' || buf[startletter] != '\n') + { + placesecond = strstr(place+1, group); + + if (placesecond) + { + startpoint += (placesecond - place); + startletter += (placesecond - place); + place = placesecond; + } + else + { + failure = 1; + break; + } + } + + if (failure) + { + return 0; + } + + //we have found the proper group name if we made it here, so find the opening brace and read into the outbuf + //until hitting the end brace + + while (buf[startpoint] != '{') + { + startpoint++; + } + + startpoint++; + + while (buf[startpoint] != '}' || subg) + { + if (buf[startpoint] == '{') + { + subg++; + } + else if (buf[startpoint] == '}') + { + subg--; + } + outbuf[i] = buf[startpoint]; + i++; + startpoint++; + } + outbuf[i] = '\0'; + + return 1; +} + +int CGSagaGetPairedValue(char *buf, char *key, char *outbuf, int inquotes) +{ + char *place, *placesecond; + int startpoint, startletter; + int i, found; + + if (!buf || !key || !outbuf) + { + return 0; + } + + i = 0; + + while (buf[i] && buf[i] != '\0') + { + if (buf[i] == '/') + { + if (buf[i+1] && buf[i+1] != '\0' && buf[i+1] == '/') + { + while (buf[i] != '\n') + { + buf[i] = '/'; + i++; + } + } + } + i++; + } + + place = strstr(buf, key); + + if (!place) + { + return 0; + } + //tab == 9 + startpoint = place - buf + strlen(key); + startletter = (place - buf) - 1; + + found = 0; + + while (!found) + { + if (startletter == 0 || !buf[startletter] || buf[startletter] == '\0' || buf[startletter] == 9 || buf[startletter] == ' ' || buf[startletter] == '\n') + { + if (buf[startpoint] == '\0' || buf[startpoint] == 9 || buf[startpoint] == ' ' || buf[startpoint] == '\n') + { + found = 1; + break; + } + } + + placesecond = strstr(place+1, key); + + if (placesecond) + { + startpoint += placesecond - place; + startletter += placesecond - place; + place = placesecond; + } + else + { + place = NULL; + break; + } + + } + + if (!found || !place || !buf[startpoint] || buf[startpoint] == '\0') + { + return 0; + } + + while (buf[startpoint] == ' ' || buf[startpoint] == 9 || buf[startpoint] == '\n') + { + startpoint++; + } + + i = 0; + + if (inquotes) + { + while (buf[startpoint] && buf[startpoint] != '\"') + { + startpoint++; + } + + startpoint++; + } + + while (buf[startpoint] && buf[startpoint] != '\0' && buf[startpoint] != '\n') + { + outbuf[i] = buf[startpoint]; + i++; + startpoint++; + + if (inquotes && buf[startpoint] == '\"') + { + break; + } + } + + outbuf[i] = '\0'; + + return 1; +} + +void CG_InitSagaMode(void) +{ + char levelname[512]; + int len = 0; + int i = 0; + fileHandle_t f; + + if (cgs.gametype != GT_SAGA) + { + goto failure; + } + + Com_sprintf(levelname, sizeof(levelname), "%s\0", cgs.mapname); + + i = strlen(levelname)-1; + + while (i > 0 && levelname[i] && levelname[i] != '.') + { + i--; + } + + if (!i) + { + goto failure; + } + + levelname[i] = '\0'; //kill the ".bsp" + + Com_sprintf(levelname, sizeof(levelname), "%s.saga\0", levelname); + + if (!levelname || !levelname[0]) + { + goto failure; + } + + len = trap_FS_FOpenFile(levelname, &f, FS_READ); + + if (!f || len >= MAX_SAGA_INFO_SIZE) + { + goto failure; + } + + trap_FS_Read(cg_saga_info, len, f); + + cg_saga_valid = 1; + + return; + +failure: + cg_saga_valid = 0; +} + +void CG_SagaRoundOver(centity_t *ent, int won) +{ + int myTeam; + char teamstr[64]; + char objectives[MAX_SAGA_INFO_SIZE]; + char appstring[1024]; + char soundstr[1024]; + int success = 0; + + if (!cg_saga_valid) + { + Com_Printf("ERROR: Saga data does not exist on client!\n"); + return; + } + + if (!cg.snap) + { + return; //yikes + } + + myTeam = cg.snap->ps.persistant[PERS_TEAM]; + + if (myTeam == TEAM_SPECTATOR) + { + return; + } + + if (myTeam == SAGATEAM_IMPERIAL) + { + Com_sprintf(teamstr, sizeof(teamstr), "Imperial"); + } + else + { + Com_sprintf(teamstr, sizeof(teamstr), "Rebel"); + } + + if (CGSagaGetValueGroup(cg_saga_info, teamstr, objectives)) + { + if (won == myTeam) + { + success = CGSagaGetPairedValue(objectives, "wonround", appstring, 1); + } + else + { + success = CGSagaGetPairedValue(objectives, "lostround", appstring, 1); + } + + if (success) + { + Com_Printf("%s\n", appstring); + } + + if (myTeam == won) + { + Com_sprintf(teamstr, sizeof(teamstr), "roundover_sound_wewon"); + } + else + { + Com_sprintf(teamstr, sizeof(teamstr), "roundover_sound_welost"); + } + + if (CGSagaGetPairedValue(objectives, teamstr, appstring, 1)) + { + Com_sprintf(soundstr, sizeof(soundstr), appstring); + } + else + { + if (myTeam != won) + { + Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_LOSE_ROUND); + } + else + { + Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_WIN_ROUND); + } + } + + trap_S_StartLocalSound(trap_S_RegisterSound(soundstr), CHAN_ANNOUNCER); + //Com_Printf("Play sound: %s\n", soundstr); + } +} + +void CG_SagaObjectiveCompleted(centity_t *ent, int won, int objectivenum) +{ + int myTeam; + char teamstr[64]; + char objstr[256]; + char objectives[MAX_SAGA_INFO_SIZE]; + char foundobjective[MAX_SAGA_INFO_SIZE]; + char appstring[1024]; + char soundstr[1024]; + int success = 0; + int i = 0; + int i_r = 0; + + if (!cg_saga_valid) + { + Com_Printf("ERROR: Saga data does not exist on client!\n"); + return; + } + + if (!cg.snap) + { + return; //yikes + } + + myTeam = cg.snap->ps.persistant[PERS_TEAM]; + + if (myTeam == TEAM_SPECTATOR) + { + return; + } + + if (won == SAGATEAM_IMPERIAL) + { + Com_sprintf(teamstr, sizeof(teamstr), "Imperial"); + } + else + { + Com_sprintf(teamstr, sizeof(teamstr), "Rebel"); + } + + if (CGSagaGetValueGroup(cg_saga_info, teamstr, objectives)) + { + Com_sprintf(objstr, sizeof(objstr), "Objective%i", objectivenum); + + while (objectives[i]) + { + if (objectives[i] != 9) + { + objectives[i_r] = objectives[i]; + i_r++; + } + + i++; + } + objectives[i_r] = '\0'; + + if (CGSagaGetValueGroup(objectives, objstr, foundobjective)) + { + if (myTeam == SAGATEAM_IMPERIAL) + { + success = CGSagaGetPairedValue(foundobjective, "message_imperial", appstring, 1); + } + else + { + success = CGSagaGetPairedValue(foundobjective, "message_rebel", appstring, 1); + } + + if (success) + { + Com_Printf("%s\n", appstring); + } + + if (myTeam == SAGATEAM_IMPERIAL) + { + Com_sprintf(teamstr, sizeof(teamstr), "sound_imperial"); + } + else + { + Com_sprintf(teamstr, sizeof(teamstr), "sound_rebel"); + } + + if (CGSagaGetPairedValue(foundobjective, teamstr, appstring, 1)) + { + Com_sprintf(soundstr, sizeof(soundstr), appstring); + } + else + { + if (myTeam != won) + { + Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_LOSE_OBJECTIVE); + } + else + { + Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_WIN_OBJECTIVE); + } + } + + trap_S_StartLocalSound(trap_S_RegisterSound(soundstr), CHAN_ANNOUNCER); + //Com_Printf("Play sound: %s\n", soundstr); + } + } +} diff --git a/code/cgame/cg_scoreboard (2).c b/code/cgame/cg_scoreboard (2).c new file mode 100644 index 0000000..7754f14 --- /dev/null +++ b/code/cgame/cg_scoreboard (2).c @@ -0,0 +1,511 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_scoreboard -- draw the scoreboard on top of the game screen +#include "cg_local.h" +#include "../ui/ui_shared.h" + +#define SCOREBOARD_X (0) + +#define SB_HEADER 86 +#define SB_TOP (SB_HEADER+32) + +// Where the status bar starts, so we don't overwrite it +#define SB_STATUSBAR 420 + +#define SB_NORMAL_HEIGHT 25 +#define SB_INTER_HEIGHT 15 // interleaved height + +#define SB_MAXCLIENTS_NORMAL ((SB_STATUSBAR - SB_TOP) / SB_NORMAL_HEIGHT) +#define SB_MAXCLIENTS_INTER ((SB_STATUSBAR - SB_TOP) / SB_INTER_HEIGHT - 1) + +// Used when interleaved + + + +#define SB_LEFT_BOTICON_X (SCOREBOARD_X+0) +#define SB_LEFT_HEAD_X (SCOREBOARD_X+32) +#define SB_RIGHT_BOTICON_X (SCOREBOARD_X+64) +#define SB_RIGHT_HEAD_X (SCOREBOARD_X+96) +// Normal +#define SB_BOTICON_X (SCOREBOARD_X+32) +#define SB_HEAD_X (SCOREBOARD_X+64) + +#define SB_SCORELINE_X 100 +#define SB_SCORELINE_WIDTH (640 - SB_SCORELINE_X * 2) + +#define SB_RATING_WIDTH 0 // (6 * BIGCHAR_WIDTH) +#define SB_NAME_X (SB_SCORELINE_X) +#define SB_SCORE_X (SB_SCORELINE_X + .55 * SB_SCORELINE_WIDTH) +#define SB_PING_X (SB_SCORELINE_X + .70 * SB_SCORELINE_WIDTH) +#define SB_TIME_X (SB_SCORELINE_X + .85 * SB_SCORELINE_WIDTH) + +// The new and improved score board +// +// In cases where the number of clients is high, the score board heads are interleaved +// here's the layout + +// +// 0 32 80 112 144 240 320 400 <-- pixel position +// bot head bot head score ping time name +// +// wins/losses are drawn on bot icon now + +static qboolean localClient; // true if local client has been displayed + + + /* +================= +CG_DrawScoreboard +================= +*/ +static void CG_DrawClientScore( int y, score_t *score, float *color, float fade, qboolean largeFormat ) +{ + //vec3_t headAngles; + clientInfo_t *ci; + int iconx, headx; + float scale; + + if ( largeFormat ) + { + scale = 1.0f; + } + else + { + scale = 0.75f; + } + + if ( score->client < 0 || score->client >= cgs.maxclients ) { + Com_Printf( "Bad score->client: %i\n", score->client ); + return; + } + + ci = &cgs.clientinfo[score->client]; + + iconx = SB_BOTICON_X + (SB_RATING_WIDTH / 2); + headx = SB_HEAD_X + (SB_RATING_WIDTH / 2); + + // draw the handicap or bot skill marker (unless player has flag) + if ( ci->powerups & ( 1 << PW_NEUTRALFLAG ) ) { + if( largeFormat ) { + CG_DrawFlagModel( iconx, y - ( 32 - BIGCHAR_HEIGHT ) / 2, 32, 32, TEAM_FREE, qfalse ); + } + else { + CG_DrawFlagModel( iconx, y, 16, 16, TEAM_FREE, qfalse ); + } + } else if ( ci->powerups & ( 1 << PW_REDFLAG ) ) { + if( largeFormat ) { + CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_RED, qfalse ); + } + else { + CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_RED, qfalse ); + } + } else if ( ci->powerups & ( 1 << PW_BLUEFLAG ) ) { + if( largeFormat ) { + CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_BLUE, qfalse ); + } + else { + CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_BLUE, qfalse ); + } + } else { + // draw the wins / losses + /* + if ( cgs.gametype == GT_TOURNAMENT ) + { + CG_DrawSmallStringColor( iconx, y + SMALLCHAR_HEIGHT/2, va("%i/%i", ci->wins, ci->losses ), color ); + } + */ + //rww - in duel, we now show wins/losses in place of "frags". This is because duel now defaults to 1 kill per round. + } + + // highlight your position + if ( score->client == cg.snap->ps.clientNum ) + { + float hcolor[4]; + int rank; + + localClient = qtrue; + + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR + || cgs.gametype >= GT_TEAM ) { + rank = -1; + } else { + rank = cg.snap->ps.persistant[PERS_RANK] & ~RANK_TIED_FLAG; + } + if ( rank == 0 ) { + hcolor[0] = 0; + hcolor[1] = 0; + hcolor[2] = 0.7f; + } else if ( rank == 1 ) { + hcolor[0] = 0.7f; + hcolor[1] = 0; + hcolor[2] = 0; + } else if ( rank == 2 ) { + hcolor[0] = 0.7f; + hcolor[1] = 0.7f; + hcolor[2] = 0; + } else { + hcolor[0] = 0.7f; + hcolor[1] = 0.7f; + hcolor[2] = 0.7f; + } + + hcolor[3] = fade * 0.7; + CG_FillRect( SB_SCORELINE_X - 5, y + 2, 640 - SB_SCORELINE_X * 2 + 10, largeFormat?SB_NORMAL_HEIGHT:SB_INTER_HEIGHT, hcolor ); + } + + CG_Text_Paint (SB_NAME_X, y, 0.9f * scale, colorWhite, ci->name,0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + + if ( ci->team != TEAM_SPECTATOR || cgs.gametype == GT_TOURNAMENT ) + { + if (cgs.gametype == GT_TOURNAMENT) + { + CG_Text_Paint (SB_SCORE_X, y, 1.0f * scale, colorWhite, va("%i/%i", ci->wins, ci->losses),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); + } + else + { + CG_Text_Paint (SB_SCORE_X, y, 1.0f * scale, colorWhite, va("%i", score->score),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); + } + } + + CG_Text_Paint (SB_PING_X, y, 1.0f * scale, colorWhite, va("%i", score->ping),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); + CG_Text_Paint (SB_TIME_X, y, 1.0f * scale, colorWhite, va("%i", score->time),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); + + // add the "ready" marker for intermission exiting + if ( cg.snap->ps.stats[ STAT_CLIENTS_READY ] & ( 1 << score->client ) ) + { + CG_Text_Paint (SB_NAME_X - 64, y + 2, 0.7f * scale, colorWhite, CG_GetStripEdString("INGAMETEXT", "READY"),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } +} + +/* +================= +CG_TeamScoreboard +================= +*/ +static int CG_TeamScoreboard( int y, team_t team, float fade, int maxClients, int lineHeight, qboolean countOnly ) +{ + int i; + score_t *score; + float color[4]; + int count; + clientInfo_t *ci; + + color[0] = color[1] = color[2] = 1.0; + color[3] = fade; + + count = 0; + for ( i = 0 ; i < cg.numScores && count < maxClients ; i++ ) { + score = &cg.scores[i]; + ci = &cgs.clientinfo[ score->client ]; + + if ( team != ci->team ) { + continue; + } + + if ( !countOnly ) + { + CG_DrawClientScore( y + lineHeight * count, score, color, fade, lineHeight == SB_NORMAL_HEIGHT ); + } + + count++; + } + + return count; +} + +int CG_GetTeamCount(team_t team, int maxClients) +{ + int i = 0; + int count = 0; + clientInfo_t *ci; + score_t *score; + + for ( i = 0 ; i < cg.numScores && count < maxClients ; i++ ) + { + score = &cg.scores[i]; + ci = &cgs.clientinfo[ score->client ]; + + if ( team != ci->team ) + { + continue; + } + + count++; + } + + return count; +} +/* +================= +CG_DrawScoreboard + +Draw the normal in-game scoreboard +================= +*/ +qboolean CG_DrawOldScoreboard( void ) { + int x, y, w, i, n1, n2; + float fade; + float *fadeColor; + char *s; + int maxClients; + int lineHeight; + int topBorderSize, bottomBorderSize; + + // don't draw amuthing if the menu or console is up + if ( cg_paused.integer ) { + cg.deferredPlayerLoading = 0; + return qfalse; + } + + // don't draw scoreboard during death while warmup up + if ( cg.warmup && !cg.showScores ) { + return qfalse; + } + + if ( cg.showScores || cg.predictedPlayerState.pm_type == PM_DEAD || + cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { + fade = 1.0; + fadeColor = colorWhite; + } else { + fadeColor = CG_FadeColor( cg.scoreFadeTime, FADE_TIME ); + + if ( !fadeColor ) { + // next time scoreboard comes up, don't print killer + cg.deferredPlayerLoading = 0; + cg.killerName[0] = 0; + return qfalse; + } + fade = *fadeColor; + } + + // fragged by ... line + // or if in intermission and duel, prints the winner of the duel round + if (cgs.gametype == GT_TOURNAMENT && cgs.duelWinner != -1 && + cg.predictedPlayerState.pm_type == PM_INTERMISSION) + { + s = va("%s %s", cgs.clientinfo[cgs.duelWinner].name, CG_GetStripEdString("INGAMETEXT", "DUEL_WINS") ); + /*w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + x = ( SCREEN_WIDTH - w ) / 2; + y = 40; + CG_DrawBigString( x, y, s, fade ); + */ + x = ( SCREEN_WIDTH ) / 2; + y = 40; + CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + else if (cgs.gametype == GT_TOURNAMENT && cgs.duelist1 != -1 && cgs.duelist2 != -1 && + cg.predictedPlayerState.pm_type == PM_INTERMISSION) + { + s = va("%s %s %s", cgs.clientinfo[cgs.duelist1].name, CG_GetStripEdString("INGAMETEXT", "SPECHUD_VERSUS"), cgs.clientinfo[cgs.duelist2].name ); + /*w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + x = ( SCREEN_WIDTH - w ) / 2; + y = 40; + CG_DrawBigString( x, y, s, fade ); + */ + x = ( SCREEN_WIDTH ) / 2; + y = 40; + CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + else if ( cg.killerName[0] ) { + s = va("%s %s", CG_GetStripEdString("INGAMETEXT", "KILLEDBY"), cg.killerName ); + /*w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + x = ( SCREEN_WIDTH - w ) / 2; + y = 40; + CG_DrawBigString( x, y, s, fade ); + */ + x = ( SCREEN_WIDTH ) / 2; + y = 40; + CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + + // current rank + if ( cgs.gametype < GT_TEAM) { + if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR ) + { + char sPlace[256]; + char sOf[256]; + char sWith[256]; + + trap_SP_GetStringTextString("INGAMETEXT_PLACE", sPlace, sizeof(sPlace)); + trap_SP_GetStringTextString("INGAMETEXT_OF", sOf, sizeof(sOf)); + trap_SP_GetStringTextString("INGAMETEXT_WITH", sWith, sizeof(sWith)); + + s = va("%s %s (%s %i) %s %i", + CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), + sPlace, + sOf, + cg.numScores, + sWith, + cg.snap->ps.persistant[PERS_SCORE] ); + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + x = ( SCREEN_WIDTH ) / 2; + y = 60; + //CG_DrawBigString( x, y, s, fade ); + UI_DrawProportionalString(x, y, s, UI_CENTER|UI_DROPSHADOW, colorTable[CT_WHITE]); + } + } else { + if ( cg.teamScores[0] == cg.teamScores[1] ) { + s = va("Teams are tied at %i", cg.teamScores[0] ); + } else if ( cg.teamScores[0] >= cg.teamScores[1] ) { + s = va("Red leads %i to %i",cg.teamScores[0], cg.teamScores[1] ); + } else { + s = va("Blue leads %i to %i",cg.teamScores[1], cg.teamScores[0] ); + } + + x = ( SCREEN_WIDTH ) / 2; + y = 60; + + CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + + // scoreboard + y = SB_HEADER; + + CG_DrawPic ( SB_SCORELINE_X - 40, y - 5, SB_SCORELINE_WIDTH + 80, 40, trap_R_RegisterShaderNoMip ( "gfx/menus/menu_buttonback.tga" ) ); + + CG_Text_Paint ( SB_NAME_X, y, 1.0f, colorWhite, "Name", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + if (cgs.gametype == GT_TOURNAMENT) + { + char sWL[100]; + trap_SP_GetStringTextString("INGAMETEXT_W_L", sWL, sizeof(sWL)); + + CG_Text_Paint ( SB_SCORE_X, y, 1.0f, colorWhite, sWL, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + else + { + CG_Text_Paint ( SB_SCORE_X, y, 1.0f, colorWhite, "Score", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + CG_Text_Paint ( SB_PING_X, y, 1.0f, colorWhite, "Ping", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + CG_Text_Paint ( SB_TIME_X, y, 1.0f, colorWhite, "Time", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + + y = SB_TOP; + + // If there are more than SB_MAXCLIENTS_NORMAL, use the interleaved scores + if ( cg.numScores > SB_MAXCLIENTS_NORMAL ) { + maxClients = SB_MAXCLIENTS_INTER; + lineHeight = SB_INTER_HEIGHT; + topBorderSize = 8; + bottomBorderSize = 16; + } else { + maxClients = SB_MAXCLIENTS_NORMAL; + lineHeight = SB_NORMAL_HEIGHT; + topBorderSize = 8; + bottomBorderSize = 8; + } + + localClient = qfalse; + + + //I guess this should end up being able to display 19 clients at once. + //In a team game, if there are 9 or more clients on the team not in the lead, + //we only want to show 10 of the clients on the team in the lead, so that we + //have room to display the clients in the lead on the losing team. + + //I guess this can be accomplished simply by printing the first teams score with a maxClients + //value passed in related to how many players are on both teams. + if ( cgs.gametype >= GT_TEAM ) { + // + // teamplay scoreboard + // + y += lineHeight/2; + + if ( cg.teamScores[0] >= cg.teamScores[1] ) { + int team1MaxCl = CG_GetTeamCount(TEAM_RED, maxClients); + int team2MaxCl = CG_GetTeamCount(TEAM_BLUE, maxClients); + + if (team1MaxCl > 10 && (team1MaxCl+team2MaxCl) > maxClients) + { + team1MaxCl -= team2MaxCl; + //subtract as many as you have to down to 10, once we get there + //we just set it to 10 + + if (team1MaxCl < 10) + { + team1MaxCl = 10; + } + } + + team2MaxCl = (maxClients-team1MaxCl); //team2 can display however many is left over after team1's display + + n1 = CG_TeamScoreboard( y, TEAM_RED, fade, team1MaxCl, lineHeight, qtrue ); + CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n1 * lineHeight + bottomBorderSize, 0.33f, TEAM_RED ); + CG_TeamScoreboard( y, TEAM_RED, fade, team1MaxCl, lineHeight, qfalse ); + y += (n1 * lineHeight) + BIGCHAR_HEIGHT; + + //maxClients -= n1; + + n2 = CG_TeamScoreboard( y, TEAM_BLUE, fade, team2MaxCl, lineHeight, qtrue ); + CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n2 * lineHeight + bottomBorderSize, 0.33f, TEAM_BLUE ); + CG_TeamScoreboard( y, TEAM_BLUE, fade, team2MaxCl, lineHeight, qfalse ); + y += (n2 * lineHeight) + BIGCHAR_HEIGHT; + + //maxClients -= n2; + + maxClients -= (team1MaxCl+team2MaxCl); + } else { + int team1MaxCl = CG_GetTeamCount(TEAM_BLUE, maxClients); + int team2MaxCl = CG_GetTeamCount(TEAM_RED, maxClients); + + if (team1MaxCl > 10 && (team1MaxCl+team2MaxCl) > maxClients) + { + team1MaxCl -= team2MaxCl; + //subtract as many as you have to down to 10, once we get there + //we just set it to 10 + + if (team1MaxCl < 10) + { + team1MaxCl = 10; + } + } + + team2MaxCl = (maxClients-team1MaxCl); //team2 can display however many is left over after team1's display + + n1 = CG_TeamScoreboard( y, TEAM_BLUE, fade, team1MaxCl, lineHeight, qtrue ); + CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n1 * lineHeight + bottomBorderSize, 0.33f, TEAM_BLUE ); + CG_TeamScoreboard( y, TEAM_BLUE, fade, team1MaxCl, lineHeight, qfalse ); + y += (n1 * lineHeight) + BIGCHAR_HEIGHT; + + //maxClients -= n1; + + n2 = CG_TeamScoreboard( y, TEAM_RED, fade, team2MaxCl, lineHeight, qtrue ); + CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n2 * lineHeight + bottomBorderSize, 0.33f, TEAM_RED ); + CG_TeamScoreboard( y, TEAM_RED, fade, team2MaxCl, lineHeight, qfalse ); + y += (n2 * lineHeight) + BIGCHAR_HEIGHT; + + //maxClients -= n2; + + maxClients -= (team1MaxCl+team2MaxCl); + } + n1 = CG_TeamScoreboard( y, TEAM_SPECTATOR, fade, maxClients, lineHeight, qfalse ); + y += (n1 * lineHeight) + BIGCHAR_HEIGHT; + + } else { + // + // free for all scoreboard + // + n1 = CG_TeamScoreboard( y, TEAM_FREE, fade, maxClients, lineHeight, qfalse ); + y += (n1 * lineHeight) + BIGCHAR_HEIGHT; + n2 = CG_TeamScoreboard( y, TEAM_SPECTATOR, fade, maxClients - n1, lineHeight, qfalse ); + y += (n2 * lineHeight) + BIGCHAR_HEIGHT; + } + + if (!localClient) { + // draw local client at the bottom + for ( i = 0 ; i < cg.numScores ; i++ ) { + if ( cg.scores[i].client == cg.snap->ps.clientNum ) { + CG_DrawClientScore( y, &cg.scores[i], fadeColor, fade, lineHeight == SB_NORMAL_HEIGHT ); + break; + } + } + } + + // load any models that have been deferred + if ( ++cg.deferredPlayerLoading > 10 ) { + CG_LoadDeferredPlayers(); + } + + return qtrue; +} + +//================================================================================ + diff --git a/code/cgame/cg_scoreboard.c b/code/cgame/cg_scoreboard.c new file mode 100644 index 0000000..7754f14 --- /dev/null +++ b/code/cgame/cg_scoreboard.c @@ -0,0 +1,511 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_scoreboard -- draw the scoreboard on top of the game screen +#include "cg_local.h" +#include "../ui/ui_shared.h" + +#define SCOREBOARD_X (0) + +#define SB_HEADER 86 +#define SB_TOP (SB_HEADER+32) + +// Where the status bar starts, so we don't overwrite it +#define SB_STATUSBAR 420 + +#define SB_NORMAL_HEIGHT 25 +#define SB_INTER_HEIGHT 15 // interleaved height + +#define SB_MAXCLIENTS_NORMAL ((SB_STATUSBAR - SB_TOP) / SB_NORMAL_HEIGHT) +#define SB_MAXCLIENTS_INTER ((SB_STATUSBAR - SB_TOP) / SB_INTER_HEIGHT - 1) + +// Used when interleaved + + + +#define SB_LEFT_BOTICON_X (SCOREBOARD_X+0) +#define SB_LEFT_HEAD_X (SCOREBOARD_X+32) +#define SB_RIGHT_BOTICON_X (SCOREBOARD_X+64) +#define SB_RIGHT_HEAD_X (SCOREBOARD_X+96) +// Normal +#define SB_BOTICON_X (SCOREBOARD_X+32) +#define SB_HEAD_X (SCOREBOARD_X+64) + +#define SB_SCORELINE_X 100 +#define SB_SCORELINE_WIDTH (640 - SB_SCORELINE_X * 2) + +#define SB_RATING_WIDTH 0 // (6 * BIGCHAR_WIDTH) +#define SB_NAME_X (SB_SCORELINE_X) +#define SB_SCORE_X (SB_SCORELINE_X + .55 * SB_SCORELINE_WIDTH) +#define SB_PING_X (SB_SCORELINE_X + .70 * SB_SCORELINE_WIDTH) +#define SB_TIME_X (SB_SCORELINE_X + .85 * SB_SCORELINE_WIDTH) + +// The new and improved score board +// +// In cases where the number of clients is high, the score board heads are interleaved +// here's the layout + +// +// 0 32 80 112 144 240 320 400 <-- pixel position +// bot head bot head score ping time name +// +// wins/losses are drawn on bot icon now + +static qboolean localClient; // true if local client has been displayed + + + /* +================= +CG_DrawScoreboard +================= +*/ +static void CG_DrawClientScore( int y, score_t *score, float *color, float fade, qboolean largeFormat ) +{ + //vec3_t headAngles; + clientInfo_t *ci; + int iconx, headx; + float scale; + + if ( largeFormat ) + { + scale = 1.0f; + } + else + { + scale = 0.75f; + } + + if ( score->client < 0 || score->client >= cgs.maxclients ) { + Com_Printf( "Bad score->client: %i\n", score->client ); + return; + } + + ci = &cgs.clientinfo[score->client]; + + iconx = SB_BOTICON_X + (SB_RATING_WIDTH / 2); + headx = SB_HEAD_X + (SB_RATING_WIDTH / 2); + + // draw the handicap or bot skill marker (unless player has flag) + if ( ci->powerups & ( 1 << PW_NEUTRALFLAG ) ) { + if( largeFormat ) { + CG_DrawFlagModel( iconx, y - ( 32 - BIGCHAR_HEIGHT ) / 2, 32, 32, TEAM_FREE, qfalse ); + } + else { + CG_DrawFlagModel( iconx, y, 16, 16, TEAM_FREE, qfalse ); + } + } else if ( ci->powerups & ( 1 << PW_REDFLAG ) ) { + if( largeFormat ) { + CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_RED, qfalse ); + } + else { + CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_RED, qfalse ); + } + } else if ( ci->powerups & ( 1 << PW_BLUEFLAG ) ) { + if( largeFormat ) { + CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_BLUE, qfalse ); + } + else { + CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_BLUE, qfalse ); + } + } else { + // draw the wins / losses + /* + if ( cgs.gametype == GT_TOURNAMENT ) + { + CG_DrawSmallStringColor( iconx, y + SMALLCHAR_HEIGHT/2, va("%i/%i", ci->wins, ci->losses ), color ); + } + */ + //rww - in duel, we now show wins/losses in place of "frags". This is because duel now defaults to 1 kill per round. + } + + // highlight your position + if ( score->client == cg.snap->ps.clientNum ) + { + float hcolor[4]; + int rank; + + localClient = qtrue; + + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR + || cgs.gametype >= GT_TEAM ) { + rank = -1; + } else { + rank = cg.snap->ps.persistant[PERS_RANK] & ~RANK_TIED_FLAG; + } + if ( rank == 0 ) { + hcolor[0] = 0; + hcolor[1] = 0; + hcolor[2] = 0.7f; + } else if ( rank == 1 ) { + hcolor[0] = 0.7f; + hcolor[1] = 0; + hcolor[2] = 0; + } else if ( rank == 2 ) { + hcolor[0] = 0.7f; + hcolor[1] = 0.7f; + hcolor[2] = 0; + } else { + hcolor[0] = 0.7f; + hcolor[1] = 0.7f; + hcolor[2] = 0.7f; + } + + hcolor[3] = fade * 0.7; + CG_FillRect( SB_SCORELINE_X - 5, y + 2, 640 - SB_SCORELINE_X * 2 + 10, largeFormat?SB_NORMAL_HEIGHT:SB_INTER_HEIGHT, hcolor ); + } + + CG_Text_Paint (SB_NAME_X, y, 0.9f * scale, colorWhite, ci->name,0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + + if ( ci->team != TEAM_SPECTATOR || cgs.gametype == GT_TOURNAMENT ) + { + if (cgs.gametype == GT_TOURNAMENT) + { + CG_Text_Paint (SB_SCORE_X, y, 1.0f * scale, colorWhite, va("%i/%i", ci->wins, ci->losses),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); + } + else + { + CG_Text_Paint (SB_SCORE_X, y, 1.0f * scale, colorWhite, va("%i", score->score),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); + } + } + + CG_Text_Paint (SB_PING_X, y, 1.0f * scale, colorWhite, va("%i", score->ping),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); + CG_Text_Paint (SB_TIME_X, y, 1.0f * scale, colorWhite, va("%i", score->time),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); + + // add the "ready" marker for intermission exiting + if ( cg.snap->ps.stats[ STAT_CLIENTS_READY ] & ( 1 << score->client ) ) + { + CG_Text_Paint (SB_NAME_X - 64, y + 2, 0.7f * scale, colorWhite, CG_GetStripEdString("INGAMETEXT", "READY"),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } +} + +/* +================= +CG_TeamScoreboard +================= +*/ +static int CG_TeamScoreboard( int y, team_t team, float fade, int maxClients, int lineHeight, qboolean countOnly ) +{ + int i; + score_t *score; + float color[4]; + int count; + clientInfo_t *ci; + + color[0] = color[1] = color[2] = 1.0; + color[3] = fade; + + count = 0; + for ( i = 0 ; i < cg.numScores && count < maxClients ; i++ ) { + score = &cg.scores[i]; + ci = &cgs.clientinfo[ score->client ]; + + if ( team != ci->team ) { + continue; + } + + if ( !countOnly ) + { + CG_DrawClientScore( y + lineHeight * count, score, color, fade, lineHeight == SB_NORMAL_HEIGHT ); + } + + count++; + } + + return count; +} + +int CG_GetTeamCount(team_t team, int maxClients) +{ + int i = 0; + int count = 0; + clientInfo_t *ci; + score_t *score; + + for ( i = 0 ; i < cg.numScores && count < maxClients ; i++ ) + { + score = &cg.scores[i]; + ci = &cgs.clientinfo[ score->client ]; + + if ( team != ci->team ) + { + continue; + } + + count++; + } + + return count; +} +/* +================= +CG_DrawScoreboard + +Draw the normal in-game scoreboard +================= +*/ +qboolean CG_DrawOldScoreboard( void ) { + int x, y, w, i, n1, n2; + float fade; + float *fadeColor; + char *s; + int maxClients; + int lineHeight; + int topBorderSize, bottomBorderSize; + + // don't draw amuthing if the menu or console is up + if ( cg_paused.integer ) { + cg.deferredPlayerLoading = 0; + return qfalse; + } + + // don't draw scoreboard during death while warmup up + if ( cg.warmup && !cg.showScores ) { + return qfalse; + } + + if ( cg.showScores || cg.predictedPlayerState.pm_type == PM_DEAD || + cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { + fade = 1.0; + fadeColor = colorWhite; + } else { + fadeColor = CG_FadeColor( cg.scoreFadeTime, FADE_TIME ); + + if ( !fadeColor ) { + // next time scoreboard comes up, don't print killer + cg.deferredPlayerLoading = 0; + cg.killerName[0] = 0; + return qfalse; + } + fade = *fadeColor; + } + + // fragged by ... line + // or if in intermission and duel, prints the winner of the duel round + if (cgs.gametype == GT_TOURNAMENT && cgs.duelWinner != -1 && + cg.predictedPlayerState.pm_type == PM_INTERMISSION) + { + s = va("%s %s", cgs.clientinfo[cgs.duelWinner].name, CG_GetStripEdString("INGAMETEXT", "DUEL_WINS") ); + /*w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + x = ( SCREEN_WIDTH - w ) / 2; + y = 40; + CG_DrawBigString( x, y, s, fade ); + */ + x = ( SCREEN_WIDTH ) / 2; + y = 40; + CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + else if (cgs.gametype == GT_TOURNAMENT && cgs.duelist1 != -1 && cgs.duelist2 != -1 && + cg.predictedPlayerState.pm_type == PM_INTERMISSION) + { + s = va("%s %s %s", cgs.clientinfo[cgs.duelist1].name, CG_GetStripEdString("INGAMETEXT", "SPECHUD_VERSUS"), cgs.clientinfo[cgs.duelist2].name ); + /*w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + x = ( SCREEN_WIDTH - w ) / 2; + y = 40; + CG_DrawBigString( x, y, s, fade ); + */ + x = ( SCREEN_WIDTH ) / 2; + y = 40; + CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + else if ( cg.killerName[0] ) { + s = va("%s %s", CG_GetStripEdString("INGAMETEXT", "KILLEDBY"), cg.killerName ); + /*w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + x = ( SCREEN_WIDTH - w ) / 2; + y = 40; + CG_DrawBigString( x, y, s, fade ); + */ + x = ( SCREEN_WIDTH ) / 2; + y = 40; + CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + + // current rank + if ( cgs.gametype < GT_TEAM) { + if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR ) + { + char sPlace[256]; + char sOf[256]; + char sWith[256]; + + trap_SP_GetStringTextString("INGAMETEXT_PLACE", sPlace, sizeof(sPlace)); + trap_SP_GetStringTextString("INGAMETEXT_OF", sOf, sizeof(sOf)); + trap_SP_GetStringTextString("INGAMETEXT_WITH", sWith, sizeof(sWith)); + + s = va("%s %s (%s %i) %s %i", + CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), + sPlace, + sOf, + cg.numScores, + sWith, + cg.snap->ps.persistant[PERS_SCORE] ); + w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; + x = ( SCREEN_WIDTH ) / 2; + y = 60; + //CG_DrawBigString( x, y, s, fade ); + UI_DrawProportionalString(x, y, s, UI_CENTER|UI_DROPSHADOW, colorTable[CT_WHITE]); + } + } else { + if ( cg.teamScores[0] == cg.teamScores[1] ) { + s = va("Teams are tied at %i", cg.teamScores[0] ); + } else if ( cg.teamScores[0] >= cg.teamScores[1] ) { + s = va("Red leads %i to %i",cg.teamScores[0], cg.teamScores[1] ); + } else { + s = va("Blue leads %i to %i",cg.teamScores[1], cg.teamScores[0] ); + } + + x = ( SCREEN_WIDTH ) / 2; + y = 60; + + CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + + // scoreboard + y = SB_HEADER; + + CG_DrawPic ( SB_SCORELINE_X - 40, y - 5, SB_SCORELINE_WIDTH + 80, 40, trap_R_RegisterShaderNoMip ( "gfx/menus/menu_buttonback.tga" ) ); + + CG_Text_Paint ( SB_NAME_X, y, 1.0f, colorWhite, "Name", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + if (cgs.gametype == GT_TOURNAMENT) + { + char sWL[100]; + trap_SP_GetStringTextString("INGAMETEXT_W_L", sWL, sizeof(sWL)); + + CG_Text_Paint ( SB_SCORE_X, y, 1.0f, colorWhite, sWL, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + else + { + CG_Text_Paint ( SB_SCORE_X, y, 1.0f, colorWhite, "Score", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + } + CG_Text_Paint ( SB_PING_X, y, 1.0f, colorWhite, "Ping", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + CG_Text_Paint ( SB_TIME_X, y, 1.0f, colorWhite, "Time", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); + + y = SB_TOP; + + // If there are more than SB_MAXCLIENTS_NORMAL, use the interleaved scores + if ( cg.numScores > SB_MAXCLIENTS_NORMAL ) { + maxClients = SB_MAXCLIENTS_INTER; + lineHeight = SB_INTER_HEIGHT; + topBorderSize = 8; + bottomBorderSize = 16; + } else { + maxClients = SB_MAXCLIENTS_NORMAL; + lineHeight = SB_NORMAL_HEIGHT; + topBorderSize = 8; + bottomBorderSize = 8; + } + + localClient = qfalse; + + + //I guess this should end up being able to display 19 clients at once. + //In a team game, if there are 9 or more clients on the team not in the lead, + //we only want to show 10 of the clients on the team in the lead, so that we + //have room to display the clients in the lead on the losing team. + + //I guess this can be accomplished simply by printing the first teams score with a maxClients + //value passed in related to how many players are on both teams. + if ( cgs.gametype >= GT_TEAM ) { + // + // teamplay scoreboard + // + y += lineHeight/2; + + if ( cg.teamScores[0] >= cg.teamScores[1] ) { + int team1MaxCl = CG_GetTeamCount(TEAM_RED, maxClients); + int team2MaxCl = CG_GetTeamCount(TEAM_BLUE, maxClients); + + if (team1MaxCl > 10 && (team1MaxCl+team2MaxCl) > maxClients) + { + team1MaxCl -= team2MaxCl; + //subtract as many as you have to down to 10, once we get there + //we just set it to 10 + + if (team1MaxCl < 10) + { + team1MaxCl = 10; + } + } + + team2MaxCl = (maxClients-team1MaxCl); //team2 can display however many is left over after team1's display + + n1 = CG_TeamScoreboard( y, TEAM_RED, fade, team1MaxCl, lineHeight, qtrue ); + CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n1 * lineHeight + bottomBorderSize, 0.33f, TEAM_RED ); + CG_TeamScoreboard( y, TEAM_RED, fade, team1MaxCl, lineHeight, qfalse ); + y += (n1 * lineHeight) + BIGCHAR_HEIGHT; + + //maxClients -= n1; + + n2 = CG_TeamScoreboard( y, TEAM_BLUE, fade, team2MaxCl, lineHeight, qtrue ); + CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n2 * lineHeight + bottomBorderSize, 0.33f, TEAM_BLUE ); + CG_TeamScoreboard( y, TEAM_BLUE, fade, team2MaxCl, lineHeight, qfalse ); + y += (n2 * lineHeight) + BIGCHAR_HEIGHT; + + //maxClients -= n2; + + maxClients -= (team1MaxCl+team2MaxCl); + } else { + int team1MaxCl = CG_GetTeamCount(TEAM_BLUE, maxClients); + int team2MaxCl = CG_GetTeamCount(TEAM_RED, maxClients); + + if (team1MaxCl > 10 && (team1MaxCl+team2MaxCl) > maxClients) + { + team1MaxCl -= team2MaxCl; + //subtract as many as you have to down to 10, once we get there + //we just set it to 10 + + if (team1MaxCl < 10) + { + team1MaxCl = 10; + } + } + + team2MaxCl = (maxClients-team1MaxCl); //team2 can display however many is left over after team1's display + + n1 = CG_TeamScoreboard( y, TEAM_BLUE, fade, team1MaxCl, lineHeight, qtrue ); + CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n1 * lineHeight + bottomBorderSize, 0.33f, TEAM_BLUE ); + CG_TeamScoreboard( y, TEAM_BLUE, fade, team1MaxCl, lineHeight, qfalse ); + y += (n1 * lineHeight) + BIGCHAR_HEIGHT; + + //maxClients -= n1; + + n2 = CG_TeamScoreboard( y, TEAM_RED, fade, team2MaxCl, lineHeight, qtrue ); + CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n2 * lineHeight + bottomBorderSize, 0.33f, TEAM_RED ); + CG_TeamScoreboard( y, TEAM_RED, fade, team2MaxCl, lineHeight, qfalse ); + y += (n2 * lineHeight) + BIGCHAR_HEIGHT; + + //maxClients -= n2; + + maxClients -= (team1MaxCl+team2MaxCl); + } + n1 = CG_TeamScoreboard( y, TEAM_SPECTATOR, fade, maxClients, lineHeight, qfalse ); + y += (n1 * lineHeight) + BIGCHAR_HEIGHT; + + } else { + // + // free for all scoreboard + // + n1 = CG_TeamScoreboard( y, TEAM_FREE, fade, maxClients, lineHeight, qfalse ); + y += (n1 * lineHeight) + BIGCHAR_HEIGHT; + n2 = CG_TeamScoreboard( y, TEAM_SPECTATOR, fade, maxClients - n1, lineHeight, qfalse ); + y += (n2 * lineHeight) + BIGCHAR_HEIGHT; + } + + if (!localClient) { + // draw local client at the bottom + for ( i = 0 ; i < cg.numScores ; i++ ) { + if ( cg.scores[i].client == cg.snap->ps.clientNum ) { + CG_DrawClientScore( y, &cg.scores[i], fadeColor, fade, lineHeight == SB_NORMAL_HEIGHT ); + break; + } + } + } + + // load any models that have been deferred + if ( ++cg.deferredPlayerLoading > 10 ) { + CG_LoadDeferredPlayers(); + } + + return qtrue; +} + +//================================================================================ + diff --git a/code/cgame/cg_servercmds (2).c b/code/cgame/cg_servercmds (2).c new file mode 100644 index 0000000..e7d228b --- /dev/null +++ b/code/cgame/cg_servercmds (2).c @@ -0,0 +1,1367 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_servercmds.c -- reliably sequenced text commands sent by the server +// these are processed at snapshot transition time, so there will definately +// be a valid snapshot this frame + +#include "cg_local.h" +#include "../../ui/menudef.h" +#if !defined(CL_LIGHT_H_INC) + #include "cg_lights.h" +#endif + +typedef struct { + const char *order; + int taskNum; +} orderTask_t; + +static const orderTask_t validOrders[] = { + { VOICECHAT_GETFLAG, TEAMTASK_OFFENSE }, + { VOICECHAT_OFFENSE, TEAMTASK_OFFENSE }, + { VOICECHAT_DEFEND, TEAMTASK_DEFENSE }, + { VOICECHAT_DEFENDFLAG, TEAMTASK_DEFENSE }, + { VOICECHAT_PATROL, TEAMTASK_PATROL }, + { VOICECHAT_CAMP, TEAMTASK_CAMP }, + { VOICECHAT_FOLLOWME, TEAMTASK_FOLLOW }, + { VOICECHAT_RETURNFLAG, TEAMTASK_RETRIEVE }, + { VOICECHAT_FOLLOWFLAGCARRIER, TEAMTASK_ESCORT } +}; + +static const int numValidOrders = sizeof(validOrders) / sizeof(orderTask_t); + +static int CG_ValidOrder(const char *p) { + int i; + for (i = 0; i < numValidOrders; i++) { + if (Q_stricmp(p, validOrders[i].order) == 0) { + return validOrders[i].taskNum; + } + } + return -1; +} + +/* +================= +CG_ParseScores + +================= +*/ +static void CG_ParseScores( void ) { + int i, powerups, readScores; + + cg.numScores = atoi( CG_Argv( 1 ) ); + + readScores = cg.numScores; + + if (readScores > MAX_CLIENT_SCORE_SEND) + { + readScores = MAX_CLIENT_SCORE_SEND; + } + + if ( cg.numScores > MAX_CLIENTS ) { + cg.numScores = MAX_CLIENTS; + } + + cg.numScores = readScores; + + cg.teamScores[0] = atoi( CG_Argv( 2 ) ); + cg.teamScores[1] = atoi( CG_Argv( 3 ) ); + + memset( cg.scores, 0, sizeof( cg.scores ) ); + for ( i = 0 ; i < readScores ; i++ ) { + // + cg.scores[i].client = atoi( CG_Argv( i * 14 + 4 ) ); + cg.scores[i].score = atoi( CG_Argv( i * 14 + 5 ) ); + cg.scores[i].ping = atoi( CG_Argv( i * 14 + 6 ) ); + cg.scores[i].time = atoi( CG_Argv( i * 14 + 7 ) ); + cg.scores[i].scoreFlags = atoi( CG_Argv( i * 14 + 8 ) ); + powerups = atoi( CG_Argv( i * 14 + 9 ) ); + cg.scores[i].accuracy = atoi(CG_Argv(i * 14 + 10)); + cg.scores[i].impressiveCount = atoi(CG_Argv(i * 14 + 11)); + cg.scores[i].excellentCount = atoi(CG_Argv(i * 14 + 12)); + cg.scores[i].guantletCount = atoi(CG_Argv(i * 14 + 13)); + cg.scores[i].defendCount = atoi(CG_Argv(i * 14 + 14)); + cg.scores[i].assistCount = atoi(CG_Argv(i * 14 + 15)); + cg.scores[i].perfect = atoi(CG_Argv(i * 14 + 16)); + cg.scores[i].captures = atoi(CG_Argv(i * 14 + 17)); + + if ( cg.scores[i].client < 0 || cg.scores[i].client >= MAX_CLIENTS ) { + cg.scores[i].client = 0; + } + cgs.clientinfo[ cg.scores[i].client ].score = cg.scores[i].score; + cgs.clientinfo[ cg.scores[i].client ].powerups = powerups; + + cg.scores[i].team = cgs.clientinfo[cg.scores[i].client].team; + } + CG_SetScoreSelection(NULL); +} + +/* +================= +CG_ParseTeamInfo + +================= +*/ +static void CG_ParseTeamInfo( void ) { + int i; + int client; + + numSortedTeamPlayers = atoi( CG_Argv( 1 ) ); + + for ( i = 0 ; i < numSortedTeamPlayers ; i++ ) { + client = atoi( CG_Argv( i * 6 + 2 ) ); + + sortedTeamPlayers[i] = client; + + cgs.clientinfo[ client ].location = atoi( CG_Argv( i * 6 + 3 ) ); + cgs.clientinfo[ client ].health = atoi( CG_Argv( i * 6 + 4 ) ); + cgs.clientinfo[ client ].armor = atoi( CG_Argv( i * 6 + 5 ) ); + cgs.clientinfo[ client ].curWeapon = atoi( CG_Argv( i * 6 + 6 ) ); + cgs.clientinfo[ client ].powerups = atoi( CG_Argv( i * 6 + 7 ) ); + } +} + + +/* +================ +CG_ParseServerinfo + +This is called explicitly when the gamestate is first received, +and whenever the server updates any serverinfo flagged cvars +================ +*/ +void CG_ParseServerinfo( void ) { + const char *info; + char *mapname; + + info = CG_ConfigString( CS_SERVERINFO ); + cgs.gametype = atoi( Info_ValueForKey( info, "g_gametype" ) ); + trap_Cvar_Set("g_gametype", va("%i", cgs.gametype)); + cgs.needpass = atoi( Info_ValueForKey( info, "needpass" ) ); + cgs.jediVmerc = atoi( Info_ValueForKey( info, "g_jediVmerc" ) ); + cgs.wDisable = atoi( Info_ValueForKey( info, "wdisable" ) ); + cgs.fDisable = atoi( Info_ValueForKey( info, "fdisable" ) ); + cgs.dmflags = atoi( Info_ValueForKey( info, "dmflags" ) ); + cgs.teamflags = atoi( Info_ValueForKey( info, "teamflags" ) ); + cgs.fraglimit = atoi( Info_ValueForKey( info, "fraglimit" ) ); + cgs.duel_fraglimit = atoi( Info_ValueForKey( info, "duel_fraglimit" ) ); + cgs.capturelimit = atoi( Info_ValueForKey( info, "capturelimit" ) ); + cgs.timelimit = atoi( Info_ValueForKey( info, "timelimit" ) ); + cgs.maxclients = atoi( Info_ValueForKey( info, "sv_maxclients" ) ); + mapname = Info_ValueForKey( info, "mapname" ); + + + //rww - You must do this one here, Info_ValueForKey always uses the same memory pointer. + trap_Cvar_Set ( "ui_about_mapname", mapname ); + + Com_sprintf( cgs.mapname, sizeof( cgs.mapname ), "maps/%s.bsp", mapname ); + Q_strncpyz( cgs.redTeam, Info_ValueForKey( info, "g_redTeam" ), sizeof(cgs.redTeam) ); + trap_Cvar_Set("g_redTeam", cgs.redTeam); + Q_strncpyz( cgs.blueTeam, Info_ValueForKey( info, "g_blueTeam" ), sizeof(cgs.blueTeam) ); + trap_Cvar_Set("g_blueTeam", cgs.blueTeam); + + trap_Cvar_Set ( "ui_about_gametype", va("%i", cgs.gametype ) ); + trap_Cvar_Set ( "ui_about_fraglimit", va("%i", cgs.fraglimit ) ); + trap_Cvar_Set ( "ui_about_duellimit", va("%i", cgs.duel_fraglimit ) ); + trap_Cvar_Set ( "ui_about_capturelimit", va("%i", cgs.capturelimit ) ); + trap_Cvar_Set ( "ui_about_timelimit", va("%i", cgs.timelimit ) ); + trap_Cvar_Set ( "ui_about_maxclients", va("%i", cgs.maxclients ) ); + trap_Cvar_Set ( "ui_about_dmflags", va("%i", cgs.dmflags ) ); + trap_Cvar_Set ( "ui_about_hostname", Info_ValueForKey( info, "sv_hostname" ) ); + trap_Cvar_Set ( "ui_about_needpass", Info_ValueForKey( info, "g_needpass" ) ); + trap_Cvar_Set ( "ui_about_botminplayers", Info_ValueForKey ( info, "bot_minplayers" ) ); +} + +/* +================== +CG_ParseWarmup +================== +*/ +static void CG_ParseWarmup( void ) { + const char *info; + int warmup; + + info = CG_ConfigString( CS_WARMUP ); + + warmup = atoi( info ); + cg.warmupCount = -1; + + cg.warmup = warmup; +} + +/* +================ +CG_SetConfigValues + +Called on load to set the initial values from configure strings +================ +*/ +void CG_SetConfigValues( void ) +{ + const char *s; + const char *str; + + cgs.scores1 = atoi( CG_ConfigString( CS_SCORES1 ) ); + cgs.scores2 = atoi( CG_ConfigString( CS_SCORES2 ) ); + cgs.levelStartTime = atoi( CG_ConfigString( CS_LEVEL_START_TIME ) ); + if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { + s = CG_ConfigString( CS_FLAGSTATUS ); + cgs.redflag = s[0] - '0'; + cgs.blueflag = s[1] - '0'; + } + cg.warmup = atoi( CG_ConfigString( CS_WARMUP ) ); + + // Track who the jedi master is + cgs.jediMaster = atoi ( CG_ConfigString ( CS_CLIENT_JEDIMASTER ) ); + cgs.duelWinner = atoi ( CG_ConfigString ( CS_CLIENT_DUELWINNER ) ); + + str = CG_ConfigString(CS_CLIENT_DUELISTS); + + if (str && str[0]) + { + char buf[64]; + int c = 0; + int i = 0; + + while (str[i] && str[i] != '|') + { + buf[c] = str[i]; + c++; + i++; + } + buf[c] = 0; + + cgs.duelist1 = atoi ( buf ); + c = 0; + + i++; + while (str[i]) + { + buf[c] = str[i]; + c++; + i++; + } + buf[c] = 0; + + cgs.duelist2 = atoi ( buf ); + } +} + +/* +===================== +CG_ShaderStateChanged +===================== +*/ +void CG_ShaderStateChanged(void) { + char originalShader[MAX_QPATH]; + char newShader[MAX_QPATH]; + char timeOffset[16]; + const char *o; + char *n,*t; + + o = CG_ConfigString( CS_SHADERSTATE ); + while (o && *o) { + n = strstr(o, "="); + if (n && *n) { + strncpy(originalShader, o, n-o); + originalShader[n-o] = 0; + n++; + t = strstr(n, ":"); + if (t && *t) { + strncpy(newShader, n, t-n); + newShader[t-n] = 0; + } else { + break; + } + t++; + o = strstr(t, "@"); + if (o) { + strncpy(timeOffset, t, o-t); + timeOffset[o-t] = 0; + o++; + trap_R_RemapShader( originalShader, newShader, timeOffset ); + } + } else { + break; + } + } +} + +/* +================ +CG_ConfigStringModified + +================ +*/ +static void CG_ConfigStringModified( void ) { + const char *str; + int num; + + num = atoi( CG_Argv( 1 ) ); + + // get the gamestate from the client system, which will have the + // new configstring already integrated + trap_GetGameState( &cgs.gameState ); + + // look up the individual string that was modified + str = CG_ConfigString( num ); + + // do something with it if necessary + if ( num == CS_MUSIC ) { + CG_StartMusic( qtrue ); + } else if ( num == CS_SERVERINFO ) { + CG_ParseServerinfo(); + } else if ( num == CS_WARMUP ) { + CG_ParseWarmup(); + } else if ( num == CS_SCORES1 ) { + cgs.scores1 = atoi( str ); + } else if ( num == CS_SCORES2 ) { + cgs.scores2 = atoi( str ); + } else if ( num == CS_CLIENT_JEDIMASTER ) { + cgs.jediMaster = atoi ( str ); + } else if ( num == CS_CLIENT_DUELWINNER ) { + cgs.duelWinner = atoi ( str ); + } else if ( num == CS_CLIENT_DUELISTS ) { + char buf[64]; + int c = 0; + int i = 0; + + while (str[i] && str[i] != '|') + { + buf[c] = str[i]; + c++; + i++; + } + buf[c] = 0; + + cgs.duelist1 = atoi ( buf ); + c = 0; + + i++; + while (str[i]) + { + buf[c] = str[i]; + c++; + i++; + } + buf[c] = 0; + + cgs.duelist2 = atoi ( buf ); + } else if ( num == CS_LEVEL_START_TIME ) { + cgs.levelStartTime = atoi( str ); + } else if ( num == CS_VOTE_TIME ) { + cgs.voteTime = atoi( str ); + cgs.voteModified = qtrue; + } else if ( num == CS_VOTE_YES ) { + cgs.voteYes = atoi( str ); + cgs.voteModified = qtrue; + } else if ( num == CS_VOTE_NO ) { + cgs.voteNo = atoi( str ); + cgs.voteModified = qtrue; + } else if ( num == CS_VOTE_STRING ) { + Q_strncpyz( cgs.voteString, str, sizeof( cgs.voteString ) ); + } else if ( num >= CS_TEAMVOTE_TIME && num <= CS_TEAMVOTE_TIME + 1) { + cgs.teamVoteTime[num-CS_TEAMVOTE_TIME] = atoi( str ); + cgs.teamVoteModified[num-CS_TEAMVOTE_TIME] = qtrue; + } else if ( num >= CS_TEAMVOTE_YES && num <= CS_TEAMVOTE_YES + 1) { + cgs.teamVoteYes[num-CS_TEAMVOTE_YES] = atoi( str ); + cgs.teamVoteModified[num-CS_TEAMVOTE_YES] = qtrue; + } else if ( num >= CS_TEAMVOTE_NO && num <= CS_TEAMVOTE_NO + 1) { + cgs.teamVoteNo[num-CS_TEAMVOTE_NO] = atoi( str ); + cgs.teamVoteModified[num-CS_TEAMVOTE_NO] = qtrue; + } else if ( num >= CS_TEAMVOTE_STRING && num <= CS_TEAMVOTE_STRING + 1) { + Q_strncpyz( cgs.teamVoteString[num-CS_TEAMVOTE_STRING], str, sizeof( cgs.teamVoteString ) ); + } else if ( num == CS_INTERMISSION ) { + cg.intermissionStarted = atoi( str ); + } else if ( num >= CS_MODELS && num < CS_MODELS+MAX_MODELS ) { + cgs.gameModels[ num-CS_MODELS ] = trap_R_RegisterModel( str ); +// GHOUL2 Insert start + } else if ( num >= CS_CHARSKINS && num < CS_CHARSKINS+MAX_CHARSKINS ) { + cgs.skins[ num-CS_CHARSKINS ] = trap_R_RegisterSkin( str ); +// Ghoul2 Insert end + } else if ( num >= CS_SOUNDS && num < CS_SOUNDS+MAX_SOUNDS ) { + if ( str[0] != '*' ) { // player specific sounds don't register here + cgs.gameSounds[ num-CS_SOUNDS] = trap_S_RegisterSound( str ); + } + } else if ( num >= CS_EFFECTS && num < CS_SOUNDS+MAX_SOUNDS ) { + if ( str[0] != '*' ) { // player specific sounds don't register here + cgs.gameEffects[ num-CS_EFFECTS] = trap_FX_RegisterEffect( str ); + } + } else if ( num >= CS_PLAYERS && num < CS_PLAYERS+MAX_CLIENTS ) { + CG_NewClientInfo( num - CS_PLAYERS, qtrue); + CG_BuildSpectatorString(); + } else if ( num == CS_FLAGSTATUS ) { + if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { + // format is rb where its red/blue, 0 is at base, 1 is taken, 2 is dropped + cgs.redflag = str[0] - '0'; + cgs.blueflag = str[1] - '0'; + } + } + else if ( num == CS_SHADERSTATE ) { + CG_ShaderStateChanged(); + } + else if ( num >= CS_LIGHT_STYLES && num < CS_LIGHT_STYLES + (MAX_LIGHT_STYLES * 3)) + { + CG_SetLightstyle(num - CS_LIGHT_STYLES); + } + +} + + +/* +======================= +CG_AddToTeamChat + +======================= +*/ +static void CG_AddToTeamChat( const char *str ) { + int len; + char *p, *ls; + int lastcolor; + int chatHeight; + + if (cg_teamChatHeight.integer < TEAMCHAT_HEIGHT) { + chatHeight = cg_teamChatHeight.integer; + } else { + chatHeight = TEAMCHAT_HEIGHT; + } + + if (chatHeight <= 0 || cg_teamChatTime.integer <= 0) { + // team chat disabled, dump into normal chat + cgs.teamChatPos = cgs.teamLastChatPos = 0; + return; + } + + len = 0; + + p = cgs.teamChatMsgs[cgs.teamChatPos % chatHeight]; + *p = 0; + + lastcolor = '7'; + + ls = NULL; + while (*str) { + if (len > TEAMCHAT_WIDTH - 1) { + if (ls) { + str -= (p - ls); + str++; + p -= (p - ls); + } + *p = 0; + + cgs.teamChatMsgTimes[cgs.teamChatPos % chatHeight] = cg.time; + + cgs.teamChatPos++; + p = cgs.teamChatMsgs[cgs.teamChatPos % chatHeight]; + *p = 0; + *p++ = Q_COLOR_ESCAPE; + *p++ = lastcolor; + len = 0; + ls = NULL; + } + + if ( Q_IsColorString( str ) ) { + *p++ = *str++; + lastcolor = *str; + *p++ = *str++; + continue; + } + if (*str == ' ') { + ls = p; + } + *p++ = *str++; + len++; + } + *p = 0; + + cgs.teamChatMsgTimes[cgs.teamChatPos % chatHeight] = cg.time; + cgs.teamChatPos++; + + if (cgs.teamChatPos - cgs.teamLastChatPos > chatHeight) + cgs.teamLastChatPos = cgs.teamChatPos - chatHeight; +} + +void CG_LoadClientInfo( clientInfo_t *ci ); + +void CG_KillCEntityInstances() +{ + int i = 0; + + while (i < MAX_GENTITIES) + { + if (i >= MAX_CLIENTS) + { //do not clear G2 instances on client ents, they are constant + if (cg_entities[i].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[i].ghoul2)) + { + trap_G2API_CleanGhoul2Models(&(cg_entities[i].ghoul2)); + } + } + /* + else + { //we must do this, because otherwise after a map_restart it seems to return bad angles in matrices produced by GetBoltMatrix + if (cgs.clientinfo[i].ghoul2Model || cg_entities[i].ghoul2) + { + CG_LoadClientInfo(&cgs.clientinfo[i]); + + if (cg_entities[i].ghoul2 != cgs.clientinfo[i].ghoul2Model) + { + if (cg_entities[i].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[i].ghoul2)) + { + trap_G2API_CleanGhoul2Models(&(cg_entities[i].ghoul2)); + } + + trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[i].ghoul2Model, &cg_entities[i].ghoul2); + } + } + } + */ + + cg_entities[i].isATST = 0; + cg_entities[i].atstFootClang = 0; + cg_entities[i].atstSwinging = 0; + cg_entities[i].bolt1 = 0; + cg_entities[i].bolt2 = 0; + cg_entities[i].bolt3 = 0; + cg_entities[i].bolt4 = 0; + + cg_entities[i].saberLength = SABER_LENGTH_MAX; + cg_entities[i].saberExtendTime = 0; + + cg_entities[i].boltInfo = 0; + + cg_entities[i].frame_minus1_refreshed = 0; + cg_entities[i].frame_minus2_refreshed = 0; + cg_entities[i].dustTrailTime = 0; + cg_entities[i].ghoul2weapon = NULL; +// cg_entities[i].torsoBolt = 0; + cg_entities[i].trailTime = 0; + cg_entities[i].frame_hold_time = 0; + cg_entities[i].frame_hold_refreshed = 0; + cg_entities[i].trickAlpha = 0; + cg_entities[i].trickAlphaTime = 0; + VectorClear(cg_entities[i].turAngles); + cg_entities[i].weapon = 0; + cg_entities[i].teamPowerEffectTime = 0; + cg_entities[i].teamPowerType = 0; + + i++; + } +} + +/* +=============== +CG_MapRestart + +The server has issued a map_restart, so the next snapshot +is completely new and should not be interpolated to. + +A tournement restart will clear everything, but doesn't +require a reload of all the media +=============== +*/ +static void CG_MapRestart( void ) { + if ( cg_showmiss.integer ) { + CG_Printf( "CG_MapRestart\n" ); + } + + CG_InitLocalEntities(); + CG_InitMarkPolys(); + CG_ClearParticles (); + CG_KillCEntityInstances(); + + // make sure the "3 frags left" warnings play again + cg.fraglimitWarnings = 0; + + cg.timelimitWarnings = 0; + + cg.intermissionStarted = qfalse; + + cgs.voteTime = 0; + + cg.mapRestart = qtrue; + + CG_StartMusic(qtrue); + + trap_S_ClearLoopingSounds(qtrue); + + // we really should clear more parts of cg here and stop sounds + + // play the "fight" sound if this is a restart without warmup + if ( cg.warmup == 0 /* && cgs.gametype == GT_TOURNAMENT */) { + trap_S_StartLocalSound( cgs.media.countFightSound, CHAN_ANNOUNCER ); + CG_CenterPrint( CG_GetStripEdString("SVINGAME", "BEGIN_DUEL"), 120, GIANTCHAR_WIDTH*2 ); + } + if (cg_singlePlayerActive.integer) { + trap_Cvar_Set("ui_matchStartTime", va("%i", cg.time)); + if (cg_recordSPDemo.integer && cg_recordSPDemoName.string && *cg_recordSPDemoName.string) { + trap_SendConsoleCommand(va("set g_synchronousclients 1 ; record %s \n", cg_recordSPDemoName.string)); + } + } + trap_Cvar_Set("cg_thirdPerson", "0"); +} + +#define MAX_VOICEFILESIZE 16384 +#define MAX_VOICEFILES 8 +#define MAX_VOICECHATS 64 +#define MAX_VOICESOUNDS 64 +#define MAX_CHATSIZE 64 +#define MAX_HEADMODELS 64 + +typedef struct voiceChat_s +{ + char id[64]; + int numSounds; + sfxHandle_t sounds[MAX_VOICESOUNDS]; + char chats[MAX_VOICESOUNDS][MAX_CHATSIZE]; +} voiceChat_t; + +typedef struct voiceChatList_s +{ + char name[64]; + int gender; + int numVoiceChats; + voiceChat_t voiceChats[MAX_VOICECHATS]; +} voiceChatList_t; + +typedef struct headModelVoiceChat_s +{ + char headmodel[64]; + int voiceChatNum; +} headModelVoiceChat_t; + +voiceChatList_t voiceChatLists[MAX_VOICEFILES]; +//headModelVoiceChat_t headModelVoiceChat[MAX_HEADMODELS]; + +/* +================= +CG_ParseVoiceChats +================= +*/ +int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChatList, int maxVoiceChats ) { + int len, i; + fileHandle_t f; + char buf[MAX_VOICEFILESIZE]; + char **p, *ptr; + char *token; + voiceChat_t *voiceChats; + qboolean compress; + + compress = qtrue; + if (cg_buildScript.integer) { + compress = qfalse; + } + + len = trap_FS_FOpenFile( filename, &f, FS_READ ); + if ( !f ) { + trap_Print( va( S_COLOR_RED "voice chat file not found: %s\n", filename ) ); + return qfalse; + } + if ( len >= MAX_VOICEFILESIZE ) { + trap_Print( va( S_COLOR_RED "voice chat file too large: %s is %i, max allowed is %i", filename, len, MAX_VOICEFILESIZE ) ); + trap_FS_FCloseFile( f ); + return qfalse; + } + + trap_FS_Read( buf, len, f ); + buf[len] = 0; + trap_FS_FCloseFile( f ); + + ptr = buf; + p = &ptr; + + Com_sprintf(voiceChatList->name, sizeof(voiceChatList->name), "%s", filename); + voiceChats = voiceChatList->voiceChats; + for ( i = 0; i < maxVoiceChats; i++ ) { + voiceChats[i].id[0] = 0; + } + token = COM_ParseExt((const char **)p, qtrue); + if (!token || token[0] == 0) { + return qtrue; + } + if (!Q_stricmp(token, "female")) { + voiceChatList->gender = GENDER_FEMALE; + } + else if (!Q_stricmp(token, "male")) { + voiceChatList->gender = GENDER_MALE; + } + else if (!Q_stricmp(token, "neuter")) { + voiceChatList->gender = GENDER_NEUTER; + } + else { + trap_Print( va( S_COLOR_RED "expected gender not found in voice chat file: %s\n", filename ) ); + return qfalse; + } + + voiceChatList->numVoiceChats = 0; + while ( 1 ) { + token = COM_ParseExt((const char **)p, qtrue); + if (!token || token[0] == 0) { + return qtrue; + } + Com_sprintf(voiceChats[voiceChatList->numVoiceChats].id, sizeof( voiceChats[voiceChatList->numVoiceChats].id ), "%s", token); + token = COM_ParseExt((const char **)p, qtrue); + if (Q_stricmp(token, "{")) { + trap_Print( va( S_COLOR_RED "expected { found %s in voice chat file: %s\n", token, filename ) ); + return qfalse; + } + voiceChats[voiceChatList->numVoiceChats].numSounds = 0; + while(1) { + token = COM_ParseExt((const char **)p, qtrue); + if (!token || token[0] == 0) { + return qtrue; + } + if (!Q_stricmp(token, "}")) + break; + voiceChats[voiceChatList->numVoiceChats].sounds[voiceChats[voiceChatList->numVoiceChats].numSounds] = + trap_S_RegisterSound( token ); + token = COM_ParseExt((const char **)p, qtrue); + if (!token || token[0] == 0) { + return qtrue; + } + Com_sprintf(voiceChats[voiceChatList->numVoiceChats].chats[ + voiceChats[voiceChatList->numVoiceChats].numSounds], MAX_CHATSIZE, "%s", token); + voiceChats[voiceChatList->numVoiceChats].numSounds++; + if (voiceChats[voiceChatList->numVoiceChats].numSounds >= MAX_VOICESOUNDS) + break; + } + voiceChatList->numVoiceChats++; + if (voiceChatList->numVoiceChats >= maxVoiceChats) + return qtrue; + } + return qtrue; +} + +/* +================= +CG_LoadVoiceChats +================= +*/ +void CG_LoadVoiceChats( void ) { + int size; + + size = trap_MemoryRemaining(); + CG_ParseVoiceChats( "scripts/female1.voice", &voiceChatLists[0], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/female2.voice", &voiceChatLists[1], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/female3.voice", &voiceChatLists[2], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/male1.voice", &voiceChatLists[3], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/male2.voice", &voiceChatLists[4], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/male3.voice", &voiceChatLists[5], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/male4.voice", &voiceChatLists[6], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/male5.voice", &voiceChatLists[7], MAX_VOICECHATS ); + CG_Printf("voice chat memory size = %d\n", size - trap_MemoryRemaining()); +} + +/* +================= +CG_HeadModelVoiceChats +================= +*/ +int CG_HeadModelVoiceChats( char *filename ) { + int len, i; + fileHandle_t f; + char buf[MAX_VOICEFILESIZE]; + char **p, *ptr; + char *token; + + len = trap_FS_FOpenFile( filename, &f, FS_READ ); + if ( !f ) { + //trap_Print( va( "voice chat file not found: %s\n", filename ) ); + return -1; + } + if ( len >= MAX_VOICEFILESIZE ) { + trap_Print( va( S_COLOR_RED "voice chat file too large: %s is %i, max allowed is %i", filename, len, MAX_VOICEFILESIZE ) ); + trap_FS_FCloseFile( f ); + return -1; + } + + trap_FS_Read( buf, len, f ); + buf[len] = 0; + trap_FS_FCloseFile( f ); + + ptr = buf; + p = &ptr; + + token = COM_ParseExt((const char **)p, qtrue); + if (!token || token[0] == 0) { + return -1; + } + + for ( i = 0; i < MAX_VOICEFILES; i++ ) { + if ( !Q_stricmp(token, voiceChatLists[i].name) ) { + return i; + } + } + + //FIXME: maybe try to load the .voice file which name is stored in token? + + return -1; +} + + +/* +================= +CG_GetVoiceChat +================= +*/ +int CG_GetVoiceChat( voiceChatList_t *voiceChatList, const char *id, sfxHandle_t *snd, char **chat) { + int i, rnd; + + for ( i = 0; i < voiceChatList->numVoiceChats; i++ ) { + if ( !Q_stricmp( id, voiceChatList->voiceChats[i].id ) ) { + rnd = random() * voiceChatList->voiceChats[i].numSounds; + *snd = voiceChatList->voiceChats[i].sounds[rnd]; + *chat = voiceChatList->voiceChats[i].chats[rnd]; + return qtrue; + } + } + return qfalse; +} + +/* +================= +CG_VoiceChatListForClient +================= +*/ +voiceChatList_t *CG_VoiceChatListForClient( int clientNum ) { + clientInfo_t *ci; + + if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { + clientNum = 0; + } + ci = &cgs.clientinfo[ clientNum ]; +/* + int voiceChatNum, i, j, k, gender; + char filename[MAX_QPATH], headModelName[MAX_QPATH]; + + for ( k = 0; k < 2; k++ ) { + if ( k == 0 ) { + if (ci->headModelName[0] == '*') { + Com_sprintf( headModelName, sizeof(headModelName), "%s/%s", ci->headModelName+1, ci->headSkinName ); + } + else { + Com_sprintf( headModelName, sizeof(headModelName), "%s/%s", ci->headModelName, ci->headSkinName ); + } + } + else { + if (ci->headModelName[0] == '*') { + Com_sprintf( headModelName, sizeof(headModelName), "%s", ci->headModelName+1 ); + } + else { + Com_sprintf( headModelName, sizeof(headModelName), "%s", ci->headModelName ); + } + } + // find the voice file for the head model the client uses + for ( i = 0; i < MAX_HEADMODELS; i++ ) { + if (!Q_stricmp(headModelVoiceChat[i].headmodel, headModelName)) { + break; + } + } + if (i < MAX_HEADMODELS) { + return &voiceChatLists[headModelVoiceChat[i].voiceChatNum]; + } + // find a .vc file + for ( i = 0; i < MAX_HEADMODELS; i++ ) { + if (!strlen(headModelVoiceChat[i].headmodel)) { + Com_sprintf(filename, sizeof(filename), "scripts/%s.vc", headModelName); + voiceChatNum = CG_HeadModelVoiceChats(filename); + if (voiceChatNum == -1) + break; + Com_sprintf(headModelVoiceChat[i].headmodel, sizeof ( headModelVoiceChat[i].headmodel ), + "%s", headModelName); + headModelVoiceChat[i].voiceChatNum = voiceChatNum; + return &voiceChatLists[headModelVoiceChat[i].voiceChatNum]; + } + } + } + gender = ci->gender; + for (k = 0; k < 2; k++) { + // just pick the first with the right gender + for ( i = 0; i < MAX_VOICEFILES; i++ ) { + if (strlen(voiceChatLists[i].name)) { + if (voiceChatLists[i].gender == gender) { + // store this head model with voice chat for future reference + for ( j = 0; j < MAX_HEADMODELS; j++ ) { + if (!strlen(headModelVoiceChat[j].headmodel)) { + Com_sprintf(headModelVoiceChat[j].headmodel, sizeof ( headModelVoiceChat[j].headmodel ), + "%s", headModelName); + headModelVoiceChat[j].voiceChatNum = i; + break; + } + } + return &voiceChatLists[i]; + } + } + } + // fall back to male gender because we don't have neuter in the mission pack + if (gender == GENDER_MALE) + break; + gender = GENDER_MALE; + } + // store this head model with voice chat for future reference + for ( j = 0; j < MAX_HEADMODELS; j++ ) { + if (!strlen(headModelVoiceChat[j].headmodel)) { + Com_sprintf(headModelVoiceChat[j].headmodel, sizeof ( headModelVoiceChat[j].headmodel ), + "%s", headModelName); + headModelVoiceChat[j].voiceChatNum = 0; + break; + } + } + */ + // just return the first voice chat list + return &voiceChatLists[0]; +} + +#define MAX_VOICECHATBUFFER 32 + +typedef struct bufferedVoiceChat_s +{ + int clientNum; + sfxHandle_t snd; + int voiceOnly; + char cmd[MAX_SAY_TEXT]; + char message[MAX_SAY_TEXT]; +} bufferedVoiceChat_t; + +bufferedVoiceChat_t voiceChatBuffer[MAX_VOICECHATBUFFER]; + +/* +================= +CG_PlayVoiceChat +================= +*/ +void CG_PlayVoiceChat( bufferedVoiceChat_t *vchat ) { + // if we are going into the intermission, don't start any voices + if ( cg.intermissionStarted ) { + return; + } + + if ( !cg_noVoiceChats.integer ) { + trap_S_StartLocalSound( vchat->snd, CHAN_VOICE); + if (vchat->clientNum != cg.snap->ps.clientNum) { + int orderTask = CG_ValidOrder(vchat->cmd); + if (orderTask > 0) { + cgs.acceptOrderTime = cg.time + 5000; + Q_strncpyz(cgs.acceptVoice, vchat->cmd, sizeof(cgs.acceptVoice)); + cgs.acceptTask = orderTask; + cgs.acceptLeader = vchat->clientNum; + } + // see if this was an order + CG_ShowResponseHead(); + } + } + if (!vchat->voiceOnly && !cg_noVoiceText.integer) { + CG_AddToTeamChat( vchat->message ); + CG_Printf( "%s\n", vchat->message ); + } + voiceChatBuffer[cg.voiceChatBufferOut].snd = 0; +} + +/* +===================== +CG_PlayBufferedVoieChats +===================== +*/ +void CG_PlayBufferedVoiceChats( void ) { + if ( cg.voiceChatTime < cg.time ) { + if (cg.voiceChatBufferOut != cg.voiceChatBufferIn && voiceChatBuffer[cg.voiceChatBufferOut].snd) { + // + CG_PlayVoiceChat(&voiceChatBuffer[cg.voiceChatBufferOut]); + // + cg.voiceChatBufferOut = (cg.voiceChatBufferOut + 1) % MAX_VOICECHATBUFFER; + cg.voiceChatTime = cg.time + 1000; + } + } +} + +/* +===================== +CG_AddBufferedVoiceChat +===================== +*/ +void CG_AddBufferedVoiceChat( bufferedVoiceChat_t *vchat ) { + // if we are going into the intermission, don't start any voices + if ( cg.intermissionStarted ) { + return; + } + + memcpy(&voiceChatBuffer[cg.voiceChatBufferIn], vchat, sizeof(bufferedVoiceChat_t)); + cg.voiceChatBufferIn = (cg.voiceChatBufferIn + 1) % MAX_VOICECHATBUFFER; + if (cg.voiceChatBufferIn == cg.voiceChatBufferOut) { + CG_PlayVoiceChat( &voiceChatBuffer[cg.voiceChatBufferOut] ); + cg.voiceChatBufferOut++; + } +} + +/* +================= +CG_VoiceChatLocal +================= +*/ +void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color, const char *cmd ) { + char *chat; + voiceChatList_t *voiceChatList; + clientInfo_t *ci; + sfxHandle_t snd; + bufferedVoiceChat_t vchat; + + // if we are going into the intermission, don't start any voices + if ( cg.intermissionStarted ) { + return; + } + + if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { + clientNum = 0; + } + ci = &cgs.clientinfo[ clientNum ]; + + cgs.currentVoiceClient = clientNum; + + voiceChatList = CG_VoiceChatListForClient( clientNum ); + + if ( CG_GetVoiceChat( voiceChatList, cmd, &snd, &chat ) ) { + // + if ( mode == SAY_TEAM || !cg_teamChatsOnly.integer ) { + vchat.clientNum = clientNum; + vchat.snd = snd; + vchat.voiceOnly = voiceOnly; + Q_strncpyz(vchat.cmd, cmd, sizeof(vchat.cmd)); + if ( mode == SAY_TELL ) { + Com_sprintf(vchat.message, sizeof(vchat.message), "[%s]: %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat); + } + else if ( mode == SAY_TEAM ) { + Com_sprintf(vchat.message, sizeof(vchat.message), "(%s): %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat); + } + else { + Com_sprintf(vchat.message, sizeof(vchat.message), "%s: %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat); + } + CG_AddBufferedVoiceChat(&vchat); + } + } +} + +/* +================= +CG_VoiceChat +================= +*/ +void CG_VoiceChat( int mode ) { + const char *cmd; + int clientNum, color; + qboolean voiceOnly; + + voiceOnly = atoi(CG_Argv(1)); + clientNum = atoi(CG_Argv(2)); + color = atoi(CG_Argv(3)); + cmd = CG_Argv(4); + + if (cg_noTaunt.integer != 0) { + if (!strcmp(cmd, VOICECHAT_KILLINSULT) || !strcmp(cmd, VOICECHAT_TAUNT) || \ + !strcmp(cmd, VOICECHAT_DEATHINSULT) || !strcmp(cmd, VOICECHAT_KILLGAUNTLET) || \ + !strcmp(cmd, VOICECHAT_PRAISE)) { + return; + } + } + + CG_VoiceChatLocal( mode, voiceOnly, clientNum, color, cmd ); +} + +/* +================= +CG_RemoveChatEscapeChar +================= +*/ +static void CG_RemoveChatEscapeChar( char *text ) { + int i, l; + + l = 0; + for ( i = 0; text[i]; i++ ) { + if (text[i] == '\x19') + continue; + text[l++] = text[i]; + } + text[l] = '\0'; +} + +#define MAX_STRIPED_SV_STRING 1024 + +void CG_CheckSVStripEdRef(char *buf, const char *str) +{ //I don't really like doing this. But it utilizes the system that was already in place. + int i = 0; + int b = 0; + int strLen = 0; + qboolean gotStrip = qfalse; + + if (!str || !str[0]) + { + if (str) + { + strcpy(buf, str); + } + return; + } + + strcpy(buf, str); + + strLen = strlen(str); + + if (strLen >= MAX_STRIPED_SV_STRING) + { + return; + } + + while (i < strLen && str[i]) + { + gotStrip = qfalse; + + if (str[i] == '@' && (i+1) < strLen) + { + if (str[i+1] == '@' && (i+2) < strLen) + { + if (str[i+2] == '@' && (i+3) < strLen) + { //@@@ should mean to insert a striped reference here, so insert it into buf at the current place + char stripRef[MAX_STRIPED_SV_STRING]; + int r = 0; + + while (i < strLen && str[i] == '@') + { + i++; + } + + while (i < strLen && str[i] && str[i] != ' ' && str[i] != ':' && str[i] != '.' && str[i] != '\n') + { + stripRef[r] = str[i]; + r++; + i++; + } + stripRef[r] = 0; + + buf[b] = 0; + Q_strcat(buf, MAX_STRIPED_SV_STRING, CG_GetStripEdString("SVINGAME", stripRef)); + b = strlen(buf); + } + } + } + + if (!gotStrip) + { + buf[b] = str[i]; + b++; + } + i++; + } + + buf[b] = 0; +} + +/* +================= +CG_ServerCommand + +The string has been tokenized and can be retrieved with +Cmd_Argc() / Cmd_Argv() +================= +*/ +static void CG_ServerCommand( void ) { + const char *cmd; + char text[MAX_SAY_TEXT]; + + cmd = CG_Argv(0); + + if ( !cmd[0] ) { + // server claimed the command + return; + } + + if ( !strcmp( cmd, "spd" ) ) + { + const char *ID; + int holdInt,count,i; + char string[1204]; + + count = trap_Argc(); + + ID = CG_Argv(1); + holdInt = atoi(ID); + + memset( &string, 0, sizeof( string ) ); + + Com_sprintf( string,sizeof(string)," \"%s\"", (const char *) CG_Argv(2)); + + for (i=3;i MAX_CLIENT_SCORE_SEND) + { + readScores = MAX_CLIENT_SCORE_SEND; + } + + if ( cg.numScores > MAX_CLIENTS ) { + cg.numScores = MAX_CLIENTS; + } + + cg.numScores = readScores; + + cg.teamScores[0] = atoi( CG_Argv( 2 ) ); + cg.teamScores[1] = atoi( CG_Argv( 3 ) ); + + memset( cg.scores, 0, sizeof( cg.scores ) ); + for ( i = 0 ; i < readScores ; i++ ) { + // + cg.scores[i].client = atoi( CG_Argv( i * 14 + 4 ) ); + cg.scores[i].score = atoi( CG_Argv( i * 14 + 5 ) ); + cg.scores[i].ping = atoi( CG_Argv( i * 14 + 6 ) ); + cg.scores[i].time = atoi( CG_Argv( i * 14 + 7 ) ); + cg.scores[i].scoreFlags = atoi( CG_Argv( i * 14 + 8 ) ); + powerups = atoi( CG_Argv( i * 14 + 9 ) ); + cg.scores[i].accuracy = atoi(CG_Argv(i * 14 + 10)); + cg.scores[i].impressiveCount = atoi(CG_Argv(i * 14 + 11)); + cg.scores[i].excellentCount = atoi(CG_Argv(i * 14 + 12)); + cg.scores[i].guantletCount = atoi(CG_Argv(i * 14 + 13)); + cg.scores[i].defendCount = atoi(CG_Argv(i * 14 + 14)); + cg.scores[i].assistCount = atoi(CG_Argv(i * 14 + 15)); + cg.scores[i].perfect = atoi(CG_Argv(i * 14 + 16)); + cg.scores[i].captures = atoi(CG_Argv(i * 14 + 17)); + + if ( cg.scores[i].client < 0 || cg.scores[i].client >= MAX_CLIENTS ) { + cg.scores[i].client = 0; + } + cgs.clientinfo[ cg.scores[i].client ].score = cg.scores[i].score; + cgs.clientinfo[ cg.scores[i].client ].powerups = powerups; + + cg.scores[i].team = cgs.clientinfo[cg.scores[i].client].team; + } + CG_SetScoreSelection(NULL); +} + +/* +================= +CG_ParseTeamInfo + +================= +*/ +static void CG_ParseTeamInfo( void ) { + int i; + int client; + + numSortedTeamPlayers = atoi( CG_Argv( 1 ) ); + + for ( i = 0 ; i < numSortedTeamPlayers ; i++ ) { + client = atoi( CG_Argv( i * 6 + 2 ) ); + + sortedTeamPlayers[i] = client; + + cgs.clientinfo[ client ].location = atoi( CG_Argv( i * 6 + 3 ) ); + cgs.clientinfo[ client ].health = atoi( CG_Argv( i * 6 + 4 ) ); + cgs.clientinfo[ client ].armor = atoi( CG_Argv( i * 6 + 5 ) ); + cgs.clientinfo[ client ].curWeapon = atoi( CG_Argv( i * 6 + 6 ) ); + cgs.clientinfo[ client ].powerups = atoi( CG_Argv( i * 6 + 7 ) ); + } +} + + +/* +================ +CG_ParseServerinfo + +This is called explicitly when the gamestate is first received, +and whenever the server updates any serverinfo flagged cvars +================ +*/ +void CG_ParseServerinfo( void ) { + const char *info; + char *mapname; + + info = CG_ConfigString( CS_SERVERINFO ); + cgs.gametype = atoi( Info_ValueForKey( info, "g_gametype" ) ); + trap_Cvar_Set("g_gametype", va("%i", cgs.gametype)); + cgs.needpass = atoi( Info_ValueForKey( info, "needpass" ) ); + cgs.jediVmerc = atoi( Info_ValueForKey( info, "g_jediVmerc" ) ); + cgs.wDisable = atoi( Info_ValueForKey( info, "wdisable" ) ); + cgs.fDisable = atoi( Info_ValueForKey( info, "fdisable" ) ); + cgs.dmflags = atoi( Info_ValueForKey( info, "dmflags" ) ); + cgs.teamflags = atoi( Info_ValueForKey( info, "teamflags" ) ); + cgs.fraglimit = atoi( Info_ValueForKey( info, "fraglimit" ) ); + cgs.duel_fraglimit = atoi( Info_ValueForKey( info, "duel_fraglimit" ) ); + cgs.capturelimit = atoi( Info_ValueForKey( info, "capturelimit" ) ); + cgs.timelimit = atoi( Info_ValueForKey( info, "timelimit" ) ); + cgs.maxclients = atoi( Info_ValueForKey( info, "sv_maxclients" ) ); + mapname = Info_ValueForKey( info, "mapname" ); + + + //rww - You must do this one here, Info_ValueForKey always uses the same memory pointer. + trap_Cvar_Set ( "ui_about_mapname", mapname ); + + Com_sprintf( cgs.mapname, sizeof( cgs.mapname ), "maps/%s.bsp", mapname ); + Q_strncpyz( cgs.redTeam, Info_ValueForKey( info, "g_redTeam" ), sizeof(cgs.redTeam) ); + trap_Cvar_Set("g_redTeam", cgs.redTeam); + Q_strncpyz( cgs.blueTeam, Info_ValueForKey( info, "g_blueTeam" ), sizeof(cgs.blueTeam) ); + trap_Cvar_Set("g_blueTeam", cgs.blueTeam); + + trap_Cvar_Set ( "ui_about_gametype", va("%i", cgs.gametype ) ); + trap_Cvar_Set ( "ui_about_fraglimit", va("%i", cgs.fraglimit ) ); + trap_Cvar_Set ( "ui_about_duellimit", va("%i", cgs.duel_fraglimit ) ); + trap_Cvar_Set ( "ui_about_capturelimit", va("%i", cgs.capturelimit ) ); + trap_Cvar_Set ( "ui_about_timelimit", va("%i", cgs.timelimit ) ); + trap_Cvar_Set ( "ui_about_maxclients", va("%i", cgs.maxclients ) ); + trap_Cvar_Set ( "ui_about_dmflags", va("%i", cgs.dmflags ) ); + trap_Cvar_Set ( "ui_about_hostname", Info_ValueForKey( info, "sv_hostname" ) ); + trap_Cvar_Set ( "ui_about_needpass", Info_ValueForKey( info, "g_needpass" ) ); + trap_Cvar_Set ( "ui_about_botminplayers", Info_ValueForKey ( info, "bot_minplayers" ) ); +} + +/* +================== +CG_ParseWarmup +================== +*/ +static void CG_ParseWarmup( void ) { + const char *info; + int warmup; + + info = CG_ConfigString( CS_WARMUP ); + + warmup = atoi( info ); + cg.warmupCount = -1; + + cg.warmup = warmup; +} + +/* +================ +CG_SetConfigValues + +Called on load to set the initial values from configure strings +================ +*/ +void CG_SetConfigValues( void ) +{ + const char *s; + const char *str; + + cgs.scores1 = atoi( CG_ConfigString( CS_SCORES1 ) ); + cgs.scores2 = atoi( CG_ConfigString( CS_SCORES2 ) ); + cgs.levelStartTime = atoi( CG_ConfigString( CS_LEVEL_START_TIME ) ); + if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { + s = CG_ConfigString( CS_FLAGSTATUS ); + cgs.redflag = s[0] - '0'; + cgs.blueflag = s[1] - '0'; + } + cg.warmup = atoi( CG_ConfigString( CS_WARMUP ) ); + + // Track who the jedi master is + cgs.jediMaster = atoi ( CG_ConfigString ( CS_CLIENT_JEDIMASTER ) ); + cgs.duelWinner = atoi ( CG_ConfigString ( CS_CLIENT_DUELWINNER ) ); + + str = CG_ConfigString(CS_CLIENT_DUELISTS); + + if (str && str[0]) + { + char buf[64]; + int c = 0; + int i = 0; + + while (str[i] && str[i] != '|') + { + buf[c] = str[i]; + c++; + i++; + } + buf[c] = 0; + + cgs.duelist1 = atoi ( buf ); + c = 0; + + i++; + while (str[i]) + { + buf[c] = str[i]; + c++; + i++; + } + buf[c] = 0; + + cgs.duelist2 = atoi ( buf ); + } +} + +/* +===================== +CG_ShaderStateChanged +===================== +*/ +void CG_ShaderStateChanged(void) { + char originalShader[MAX_QPATH]; + char newShader[MAX_QPATH]; + char timeOffset[16]; + const char *o; + char *n,*t; + + o = CG_ConfigString( CS_SHADERSTATE ); + while (o && *o) { + n = strstr(o, "="); + if (n && *n) { + strncpy(originalShader, o, n-o); + originalShader[n-o] = 0; + n++; + t = strstr(n, ":"); + if (t && *t) { + strncpy(newShader, n, t-n); + newShader[t-n] = 0; + } else { + break; + } + t++; + o = strstr(t, "@"); + if (o) { + strncpy(timeOffset, t, o-t); + timeOffset[o-t] = 0; + o++; + trap_R_RemapShader( originalShader, newShader, timeOffset ); + } + } else { + break; + } + } +} + +/* +================ +CG_ConfigStringModified + +================ +*/ +static void CG_ConfigStringModified( void ) { + const char *str; + int num; + + num = atoi( CG_Argv( 1 ) ); + + // get the gamestate from the client system, which will have the + // new configstring already integrated + trap_GetGameState( &cgs.gameState ); + + // look up the individual string that was modified + str = CG_ConfigString( num ); + + // do something with it if necessary + if ( num == CS_MUSIC ) { + CG_StartMusic( qtrue ); + } else if ( num == CS_SERVERINFO ) { + CG_ParseServerinfo(); + } else if ( num == CS_WARMUP ) { + CG_ParseWarmup(); + } else if ( num == CS_SCORES1 ) { + cgs.scores1 = atoi( str ); + } else if ( num == CS_SCORES2 ) { + cgs.scores2 = atoi( str ); + } else if ( num == CS_CLIENT_JEDIMASTER ) { + cgs.jediMaster = atoi ( str ); + } else if ( num == CS_CLIENT_DUELWINNER ) { + cgs.duelWinner = atoi ( str ); + } else if ( num == CS_CLIENT_DUELISTS ) { + char buf[64]; + int c = 0; + int i = 0; + + while (str[i] && str[i] != '|') + { + buf[c] = str[i]; + c++; + i++; + } + buf[c] = 0; + + cgs.duelist1 = atoi ( buf ); + c = 0; + + i++; + while (str[i]) + { + buf[c] = str[i]; + c++; + i++; + } + buf[c] = 0; + + cgs.duelist2 = atoi ( buf ); + } else if ( num == CS_LEVEL_START_TIME ) { + cgs.levelStartTime = atoi( str ); + } else if ( num == CS_VOTE_TIME ) { + cgs.voteTime = atoi( str ); + cgs.voteModified = qtrue; + } else if ( num == CS_VOTE_YES ) { + cgs.voteYes = atoi( str ); + cgs.voteModified = qtrue; + } else if ( num == CS_VOTE_NO ) { + cgs.voteNo = atoi( str ); + cgs.voteModified = qtrue; + } else if ( num == CS_VOTE_STRING ) { + Q_strncpyz( cgs.voteString, str, sizeof( cgs.voteString ) ); + } else if ( num >= CS_TEAMVOTE_TIME && num <= CS_TEAMVOTE_TIME + 1) { + cgs.teamVoteTime[num-CS_TEAMVOTE_TIME] = atoi( str ); + cgs.teamVoteModified[num-CS_TEAMVOTE_TIME] = qtrue; + } else if ( num >= CS_TEAMVOTE_YES && num <= CS_TEAMVOTE_YES + 1) { + cgs.teamVoteYes[num-CS_TEAMVOTE_YES] = atoi( str ); + cgs.teamVoteModified[num-CS_TEAMVOTE_YES] = qtrue; + } else if ( num >= CS_TEAMVOTE_NO && num <= CS_TEAMVOTE_NO + 1) { + cgs.teamVoteNo[num-CS_TEAMVOTE_NO] = atoi( str ); + cgs.teamVoteModified[num-CS_TEAMVOTE_NO] = qtrue; + } else if ( num >= CS_TEAMVOTE_STRING && num <= CS_TEAMVOTE_STRING + 1) { + Q_strncpyz( cgs.teamVoteString[num-CS_TEAMVOTE_STRING], str, sizeof( cgs.teamVoteString ) ); + } else if ( num == CS_INTERMISSION ) { + cg.intermissionStarted = atoi( str ); + } else if ( num >= CS_MODELS && num < CS_MODELS+MAX_MODELS ) { + cgs.gameModels[ num-CS_MODELS ] = trap_R_RegisterModel( str ); +// GHOUL2 Insert start + } else if ( num >= CS_CHARSKINS && num < CS_CHARSKINS+MAX_CHARSKINS ) { + cgs.skins[ num-CS_CHARSKINS ] = trap_R_RegisterSkin( str ); +// Ghoul2 Insert end + } else if ( num >= CS_SOUNDS && num < CS_SOUNDS+MAX_SOUNDS ) { + if ( str[0] != '*' ) { // player specific sounds don't register here + cgs.gameSounds[ num-CS_SOUNDS] = trap_S_RegisterSound( str ); + } + } else if ( num >= CS_EFFECTS && num < CS_SOUNDS+MAX_SOUNDS ) { + if ( str[0] != '*' ) { // player specific sounds don't register here + cgs.gameEffects[ num-CS_EFFECTS] = trap_FX_RegisterEffect( str ); + } + } else if ( num >= CS_PLAYERS && num < CS_PLAYERS+MAX_CLIENTS ) { + CG_NewClientInfo( num - CS_PLAYERS, qtrue); + CG_BuildSpectatorString(); + } else if ( num == CS_FLAGSTATUS ) { + if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { + // format is rb where its red/blue, 0 is at base, 1 is taken, 2 is dropped + cgs.redflag = str[0] - '0'; + cgs.blueflag = str[1] - '0'; + } + } + else if ( num == CS_SHADERSTATE ) { + CG_ShaderStateChanged(); + } + else if ( num >= CS_LIGHT_STYLES && num < CS_LIGHT_STYLES + (MAX_LIGHT_STYLES * 3)) + { + CG_SetLightstyle(num - CS_LIGHT_STYLES); + } + +} + + +/* +======================= +CG_AddToTeamChat + +======================= +*/ +static void CG_AddToTeamChat( const char *str ) { + int len; + char *p, *ls; + int lastcolor; + int chatHeight; + + if (cg_teamChatHeight.integer < TEAMCHAT_HEIGHT) { + chatHeight = cg_teamChatHeight.integer; + } else { + chatHeight = TEAMCHAT_HEIGHT; + } + + if (chatHeight <= 0 || cg_teamChatTime.integer <= 0) { + // team chat disabled, dump into normal chat + cgs.teamChatPos = cgs.teamLastChatPos = 0; + return; + } + + len = 0; + + p = cgs.teamChatMsgs[cgs.teamChatPos % chatHeight]; + *p = 0; + + lastcolor = '7'; + + ls = NULL; + while (*str) { + if (len > TEAMCHAT_WIDTH - 1) { + if (ls) { + str -= (p - ls); + str++; + p -= (p - ls); + } + *p = 0; + + cgs.teamChatMsgTimes[cgs.teamChatPos % chatHeight] = cg.time; + + cgs.teamChatPos++; + p = cgs.teamChatMsgs[cgs.teamChatPos % chatHeight]; + *p = 0; + *p++ = Q_COLOR_ESCAPE; + *p++ = lastcolor; + len = 0; + ls = NULL; + } + + if ( Q_IsColorString( str ) ) { + *p++ = *str++; + lastcolor = *str; + *p++ = *str++; + continue; + } + if (*str == ' ') { + ls = p; + } + *p++ = *str++; + len++; + } + *p = 0; + + cgs.teamChatMsgTimes[cgs.teamChatPos % chatHeight] = cg.time; + cgs.teamChatPos++; + + if (cgs.teamChatPos - cgs.teamLastChatPos > chatHeight) + cgs.teamLastChatPos = cgs.teamChatPos - chatHeight; +} + +void CG_LoadClientInfo( clientInfo_t *ci ); + +void CG_KillCEntityInstances() +{ + int i = 0; + + while (i < MAX_GENTITIES) + { + if (i >= MAX_CLIENTS) + { //do not clear G2 instances on client ents, they are constant + if (cg_entities[i].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[i].ghoul2)) + { + trap_G2API_CleanGhoul2Models(&(cg_entities[i].ghoul2)); + } + } + /* + else + { //we must do this, because otherwise after a map_restart it seems to return bad angles in matrices produced by GetBoltMatrix + if (cgs.clientinfo[i].ghoul2Model || cg_entities[i].ghoul2) + { + CG_LoadClientInfo(&cgs.clientinfo[i]); + + if (cg_entities[i].ghoul2 != cgs.clientinfo[i].ghoul2Model) + { + if (cg_entities[i].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[i].ghoul2)) + { + trap_G2API_CleanGhoul2Models(&(cg_entities[i].ghoul2)); + } + + trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[i].ghoul2Model, &cg_entities[i].ghoul2); + } + } + } + */ + + cg_entities[i].isATST = 0; + cg_entities[i].atstFootClang = 0; + cg_entities[i].atstSwinging = 0; + cg_entities[i].bolt1 = 0; + cg_entities[i].bolt2 = 0; + cg_entities[i].bolt3 = 0; + cg_entities[i].bolt4 = 0; + + cg_entities[i].saberLength = SABER_LENGTH_MAX; + cg_entities[i].saberExtendTime = 0; + + cg_entities[i].boltInfo = 0; + + cg_entities[i].frame_minus1_refreshed = 0; + cg_entities[i].frame_minus2_refreshed = 0; + cg_entities[i].dustTrailTime = 0; + cg_entities[i].ghoul2weapon = NULL; +// cg_entities[i].torsoBolt = 0; + cg_entities[i].trailTime = 0; + cg_entities[i].frame_hold_time = 0; + cg_entities[i].frame_hold_refreshed = 0; + cg_entities[i].trickAlpha = 0; + cg_entities[i].trickAlphaTime = 0; + VectorClear(cg_entities[i].turAngles); + cg_entities[i].weapon = 0; + cg_entities[i].teamPowerEffectTime = 0; + cg_entities[i].teamPowerType = 0; + + i++; + } +} + +/* +=============== +CG_MapRestart + +The server has issued a map_restart, so the next snapshot +is completely new and should not be interpolated to. + +A tournement restart will clear everything, but doesn't +require a reload of all the media +=============== +*/ +static void CG_MapRestart( void ) { + if ( cg_showmiss.integer ) { + CG_Printf( "CG_MapRestart\n" ); + } + + CG_InitLocalEntities(); + CG_InitMarkPolys(); + CG_ClearParticles (); + CG_KillCEntityInstances(); + + // make sure the "3 frags left" warnings play again + cg.fraglimitWarnings = 0; + + cg.timelimitWarnings = 0; + + cg.intermissionStarted = qfalse; + + cgs.voteTime = 0; + + cg.mapRestart = qtrue; + + CG_StartMusic(qtrue); + + trap_S_ClearLoopingSounds(qtrue); + + // we really should clear more parts of cg here and stop sounds + + // play the "fight" sound if this is a restart without warmup + if ( cg.warmup == 0 /* && cgs.gametype == GT_TOURNAMENT */) { + trap_S_StartLocalSound( cgs.media.countFightSound, CHAN_ANNOUNCER ); + CG_CenterPrint( CG_GetStripEdString("SVINGAME", "BEGIN_DUEL"), 120, GIANTCHAR_WIDTH*2 ); + } + if (cg_singlePlayerActive.integer) { + trap_Cvar_Set("ui_matchStartTime", va("%i", cg.time)); + if (cg_recordSPDemo.integer && cg_recordSPDemoName.string && *cg_recordSPDemoName.string) { + trap_SendConsoleCommand(va("set g_synchronousclients 1 ; record %s \n", cg_recordSPDemoName.string)); + } + } + trap_Cvar_Set("cg_thirdPerson", "0"); +} + +#define MAX_VOICEFILESIZE 16384 +#define MAX_VOICEFILES 8 +#define MAX_VOICECHATS 64 +#define MAX_VOICESOUNDS 64 +#define MAX_CHATSIZE 64 +#define MAX_HEADMODELS 64 + +typedef struct voiceChat_s +{ + char id[64]; + int numSounds; + sfxHandle_t sounds[MAX_VOICESOUNDS]; + char chats[MAX_VOICESOUNDS][MAX_CHATSIZE]; +} voiceChat_t; + +typedef struct voiceChatList_s +{ + char name[64]; + int gender; + int numVoiceChats; + voiceChat_t voiceChats[MAX_VOICECHATS]; +} voiceChatList_t; + +typedef struct headModelVoiceChat_s +{ + char headmodel[64]; + int voiceChatNum; +} headModelVoiceChat_t; + +voiceChatList_t voiceChatLists[MAX_VOICEFILES]; +//headModelVoiceChat_t headModelVoiceChat[MAX_HEADMODELS]; + +/* +================= +CG_ParseVoiceChats +================= +*/ +int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChatList, int maxVoiceChats ) { + int len, i; + fileHandle_t f; + char buf[MAX_VOICEFILESIZE]; + char **p, *ptr; + char *token; + voiceChat_t *voiceChats; + qboolean compress; + + compress = qtrue; + if (cg_buildScript.integer) { + compress = qfalse; + } + + len = trap_FS_FOpenFile( filename, &f, FS_READ ); + if ( !f ) { + trap_Print( va( S_COLOR_RED "voice chat file not found: %s\n", filename ) ); + return qfalse; + } + if ( len >= MAX_VOICEFILESIZE ) { + trap_Print( va( S_COLOR_RED "voice chat file too large: %s is %i, max allowed is %i", filename, len, MAX_VOICEFILESIZE ) ); + trap_FS_FCloseFile( f ); + return qfalse; + } + + trap_FS_Read( buf, len, f ); + buf[len] = 0; + trap_FS_FCloseFile( f ); + + ptr = buf; + p = &ptr; + + Com_sprintf(voiceChatList->name, sizeof(voiceChatList->name), "%s", filename); + voiceChats = voiceChatList->voiceChats; + for ( i = 0; i < maxVoiceChats; i++ ) { + voiceChats[i].id[0] = 0; + } + token = COM_ParseExt((const char **)p, qtrue); + if (!token || token[0] == 0) { + return qtrue; + } + if (!Q_stricmp(token, "female")) { + voiceChatList->gender = GENDER_FEMALE; + } + else if (!Q_stricmp(token, "male")) { + voiceChatList->gender = GENDER_MALE; + } + else if (!Q_stricmp(token, "neuter")) { + voiceChatList->gender = GENDER_NEUTER; + } + else { + trap_Print( va( S_COLOR_RED "expected gender not found in voice chat file: %s\n", filename ) ); + return qfalse; + } + + voiceChatList->numVoiceChats = 0; + while ( 1 ) { + token = COM_ParseExt((const char **)p, qtrue); + if (!token || token[0] == 0) { + return qtrue; + } + Com_sprintf(voiceChats[voiceChatList->numVoiceChats].id, sizeof( voiceChats[voiceChatList->numVoiceChats].id ), "%s", token); + token = COM_ParseExt((const char **)p, qtrue); + if (Q_stricmp(token, "{")) { + trap_Print( va( S_COLOR_RED "expected { found %s in voice chat file: %s\n", token, filename ) ); + return qfalse; + } + voiceChats[voiceChatList->numVoiceChats].numSounds = 0; + while(1) { + token = COM_ParseExt((const char **)p, qtrue); + if (!token || token[0] == 0) { + return qtrue; + } + if (!Q_stricmp(token, "}")) + break; + voiceChats[voiceChatList->numVoiceChats].sounds[voiceChats[voiceChatList->numVoiceChats].numSounds] = + trap_S_RegisterSound( token ); + token = COM_ParseExt((const char **)p, qtrue); + if (!token || token[0] == 0) { + return qtrue; + } + Com_sprintf(voiceChats[voiceChatList->numVoiceChats].chats[ + voiceChats[voiceChatList->numVoiceChats].numSounds], MAX_CHATSIZE, "%s", token); + voiceChats[voiceChatList->numVoiceChats].numSounds++; + if (voiceChats[voiceChatList->numVoiceChats].numSounds >= MAX_VOICESOUNDS) + break; + } + voiceChatList->numVoiceChats++; + if (voiceChatList->numVoiceChats >= maxVoiceChats) + return qtrue; + } + return qtrue; +} + +/* +================= +CG_LoadVoiceChats +================= +*/ +void CG_LoadVoiceChats( void ) { + int size; + + size = trap_MemoryRemaining(); + CG_ParseVoiceChats( "scripts/female1.voice", &voiceChatLists[0], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/female2.voice", &voiceChatLists[1], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/female3.voice", &voiceChatLists[2], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/male1.voice", &voiceChatLists[3], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/male2.voice", &voiceChatLists[4], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/male3.voice", &voiceChatLists[5], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/male4.voice", &voiceChatLists[6], MAX_VOICECHATS ); + CG_ParseVoiceChats( "scripts/male5.voice", &voiceChatLists[7], MAX_VOICECHATS ); + CG_Printf("voice chat memory size = %d\n", size - trap_MemoryRemaining()); +} + +/* +================= +CG_HeadModelVoiceChats +================= +*/ +int CG_HeadModelVoiceChats( char *filename ) { + int len, i; + fileHandle_t f; + char buf[MAX_VOICEFILESIZE]; + char **p, *ptr; + char *token; + + len = trap_FS_FOpenFile( filename, &f, FS_READ ); + if ( !f ) { + //trap_Print( va( "voice chat file not found: %s\n", filename ) ); + return -1; + } + if ( len >= MAX_VOICEFILESIZE ) { + trap_Print( va( S_COLOR_RED "voice chat file too large: %s is %i, max allowed is %i", filename, len, MAX_VOICEFILESIZE ) ); + trap_FS_FCloseFile( f ); + return -1; + } + + trap_FS_Read( buf, len, f ); + buf[len] = 0; + trap_FS_FCloseFile( f ); + + ptr = buf; + p = &ptr; + + token = COM_ParseExt((const char **)p, qtrue); + if (!token || token[0] == 0) { + return -1; + } + + for ( i = 0; i < MAX_VOICEFILES; i++ ) { + if ( !Q_stricmp(token, voiceChatLists[i].name) ) { + return i; + } + } + + //FIXME: maybe try to load the .voice file which name is stored in token? + + return -1; +} + + +/* +================= +CG_GetVoiceChat +================= +*/ +int CG_GetVoiceChat( voiceChatList_t *voiceChatList, const char *id, sfxHandle_t *snd, char **chat) { + int i, rnd; + + for ( i = 0; i < voiceChatList->numVoiceChats; i++ ) { + if ( !Q_stricmp( id, voiceChatList->voiceChats[i].id ) ) { + rnd = random() * voiceChatList->voiceChats[i].numSounds; + *snd = voiceChatList->voiceChats[i].sounds[rnd]; + *chat = voiceChatList->voiceChats[i].chats[rnd]; + return qtrue; + } + } + return qfalse; +} + +/* +================= +CG_VoiceChatListForClient +================= +*/ +voiceChatList_t *CG_VoiceChatListForClient( int clientNum ) { + clientInfo_t *ci; + + if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { + clientNum = 0; + } + ci = &cgs.clientinfo[ clientNum ]; +/* + int voiceChatNum, i, j, k, gender; + char filename[MAX_QPATH], headModelName[MAX_QPATH]; + + for ( k = 0; k < 2; k++ ) { + if ( k == 0 ) { + if (ci->headModelName[0] == '*') { + Com_sprintf( headModelName, sizeof(headModelName), "%s/%s", ci->headModelName+1, ci->headSkinName ); + } + else { + Com_sprintf( headModelName, sizeof(headModelName), "%s/%s", ci->headModelName, ci->headSkinName ); + } + } + else { + if (ci->headModelName[0] == '*') { + Com_sprintf( headModelName, sizeof(headModelName), "%s", ci->headModelName+1 ); + } + else { + Com_sprintf( headModelName, sizeof(headModelName), "%s", ci->headModelName ); + } + } + // find the voice file for the head model the client uses + for ( i = 0; i < MAX_HEADMODELS; i++ ) { + if (!Q_stricmp(headModelVoiceChat[i].headmodel, headModelName)) { + break; + } + } + if (i < MAX_HEADMODELS) { + return &voiceChatLists[headModelVoiceChat[i].voiceChatNum]; + } + // find a .vc file + for ( i = 0; i < MAX_HEADMODELS; i++ ) { + if (!strlen(headModelVoiceChat[i].headmodel)) { + Com_sprintf(filename, sizeof(filename), "scripts/%s.vc", headModelName); + voiceChatNum = CG_HeadModelVoiceChats(filename); + if (voiceChatNum == -1) + break; + Com_sprintf(headModelVoiceChat[i].headmodel, sizeof ( headModelVoiceChat[i].headmodel ), + "%s", headModelName); + headModelVoiceChat[i].voiceChatNum = voiceChatNum; + return &voiceChatLists[headModelVoiceChat[i].voiceChatNum]; + } + } + } + gender = ci->gender; + for (k = 0; k < 2; k++) { + // just pick the first with the right gender + for ( i = 0; i < MAX_VOICEFILES; i++ ) { + if (strlen(voiceChatLists[i].name)) { + if (voiceChatLists[i].gender == gender) { + // store this head model with voice chat for future reference + for ( j = 0; j < MAX_HEADMODELS; j++ ) { + if (!strlen(headModelVoiceChat[j].headmodel)) { + Com_sprintf(headModelVoiceChat[j].headmodel, sizeof ( headModelVoiceChat[j].headmodel ), + "%s", headModelName); + headModelVoiceChat[j].voiceChatNum = i; + break; + } + } + return &voiceChatLists[i]; + } + } + } + // fall back to male gender because we don't have neuter in the mission pack + if (gender == GENDER_MALE) + break; + gender = GENDER_MALE; + } + // store this head model with voice chat for future reference + for ( j = 0; j < MAX_HEADMODELS; j++ ) { + if (!strlen(headModelVoiceChat[j].headmodel)) { + Com_sprintf(headModelVoiceChat[j].headmodel, sizeof ( headModelVoiceChat[j].headmodel ), + "%s", headModelName); + headModelVoiceChat[j].voiceChatNum = 0; + break; + } + } + */ + // just return the first voice chat list + return &voiceChatLists[0]; +} + +#define MAX_VOICECHATBUFFER 32 + +typedef struct bufferedVoiceChat_s +{ + int clientNum; + sfxHandle_t snd; + int voiceOnly; + char cmd[MAX_SAY_TEXT]; + char message[MAX_SAY_TEXT]; +} bufferedVoiceChat_t; + +bufferedVoiceChat_t voiceChatBuffer[MAX_VOICECHATBUFFER]; + +/* +================= +CG_PlayVoiceChat +================= +*/ +void CG_PlayVoiceChat( bufferedVoiceChat_t *vchat ) { + // if we are going into the intermission, don't start any voices + if ( cg.intermissionStarted ) { + return; + } + + if ( !cg_noVoiceChats.integer ) { + trap_S_StartLocalSound( vchat->snd, CHAN_VOICE); + if (vchat->clientNum != cg.snap->ps.clientNum) { + int orderTask = CG_ValidOrder(vchat->cmd); + if (orderTask > 0) { + cgs.acceptOrderTime = cg.time + 5000; + Q_strncpyz(cgs.acceptVoice, vchat->cmd, sizeof(cgs.acceptVoice)); + cgs.acceptTask = orderTask; + cgs.acceptLeader = vchat->clientNum; + } + // see if this was an order + CG_ShowResponseHead(); + } + } + if (!vchat->voiceOnly && !cg_noVoiceText.integer) { + CG_AddToTeamChat( vchat->message ); + CG_Printf( "%s\n", vchat->message ); + } + voiceChatBuffer[cg.voiceChatBufferOut].snd = 0; +} + +/* +===================== +CG_PlayBufferedVoieChats +===================== +*/ +void CG_PlayBufferedVoiceChats( void ) { + if ( cg.voiceChatTime < cg.time ) { + if (cg.voiceChatBufferOut != cg.voiceChatBufferIn && voiceChatBuffer[cg.voiceChatBufferOut].snd) { + // + CG_PlayVoiceChat(&voiceChatBuffer[cg.voiceChatBufferOut]); + // + cg.voiceChatBufferOut = (cg.voiceChatBufferOut + 1) % MAX_VOICECHATBUFFER; + cg.voiceChatTime = cg.time + 1000; + } + } +} + +/* +===================== +CG_AddBufferedVoiceChat +===================== +*/ +void CG_AddBufferedVoiceChat( bufferedVoiceChat_t *vchat ) { + // if we are going into the intermission, don't start any voices + if ( cg.intermissionStarted ) { + return; + } + + memcpy(&voiceChatBuffer[cg.voiceChatBufferIn], vchat, sizeof(bufferedVoiceChat_t)); + cg.voiceChatBufferIn = (cg.voiceChatBufferIn + 1) % MAX_VOICECHATBUFFER; + if (cg.voiceChatBufferIn == cg.voiceChatBufferOut) { + CG_PlayVoiceChat( &voiceChatBuffer[cg.voiceChatBufferOut] ); + cg.voiceChatBufferOut++; + } +} + +/* +================= +CG_VoiceChatLocal +================= +*/ +void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color, const char *cmd ) { + char *chat; + voiceChatList_t *voiceChatList; + clientInfo_t *ci; + sfxHandle_t snd; + bufferedVoiceChat_t vchat; + + // if we are going into the intermission, don't start any voices + if ( cg.intermissionStarted ) { + return; + } + + if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { + clientNum = 0; + } + ci = &cgs.clientinfo[ clientNum ]; + + cgs.currentVoiceClient = clientNum; + + voiceChatList = CG_VoiceChatListForClient( clientNum ); + + if ( CG_GetVoiceChat( voiceChatList, cmd, &snd, &chat ) ) { + // + if ( mode == SAY_TEAM || !cg_teamChatsOnly.integer ) { + vchat.clientNum = clientNum; + vchat.snd = snd; + vchat.voiceOnly = voiceOnly; + Q_strncpyz(vchat.cmd, cmd, sizeof(vchat.cmd)); + if ( mode == SAY_TELL ) { + Com_sprintf(vchat.message, sizeof(vchat.message), "[%s]: %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat); + } + else if ( mode == SAY_TEAM ) { + Com_sprintf(vchat.message, sizeof(vchat.message), "(%s): %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat); + } + else { + Com_sprintf(vchat.message, sizeof(vchat.message), "%s: %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat); + } + CG_AddBufferedVoiceChat(&vchat); + } + } +} + +/* +================= +CG_VoiceChat +================= +*/ +void CG_VoiceChat( int mode ) { + const char *cmd; + int clientNum, color; + qboolean voiceOnly; + + voiceOnly = atoi(CG_Argv(1)); + clientNum = atoi(CG_Argv(2)); + color = atoi(CG_Argv(3)); + cmd = CG_Argv(4); + + if (cg_noTaunt.integer != 0) { + if (!strcmp(cmd, VOICECHAT_KILLINSULT) || !strcmp(cmd, VOICECHAT_TAUNT) || \ + !strcmp(cmd, VOICECHAT_DEATHINSULT) || !strcmp(cmd, VOICECHAT_KILLGAUNTLET) || \ + !strcmp(cmd, VOICECHAT_PRAISE)) { + return; + } + } + + CG_VoiceChatLocal( mode, voiceOnly, clientNum, color, cmd ); +} + +/* +================= +CG_RemoveChatEscapeChar +================= +*/ +static void CG_RemoveChatEscapeChar( char *text ) { + int i, l; + + l = 0; + for ( i = 0; text[i]; i++ ) { + if (text[i] == '\x19') + continue; + text[l++] = text[i]; + } + text[l] = '\0'; +} + +#define MAX_STRIPED_SV_STRING 1024 + +void CG_CheckSVStripEdRef(char *buf, const char *str) +{ //I don't really like doing this. But it utilizes the system that was already in place. + int i = 0; + int b = 0; + int strLen = 0; + qboolean gotStrip = qfalse; + + if (!str || !str[0]) + { + if (str) + { + strcpy(buf, str); + } + return; + } + + strcpy(buf, str); + + strLen = strlen(str); + + if (strLen >= MAX_STRIPED_SV_STRING) + { + return; + } + + while (i < strLen && str[i]) + { + gotStrip = qfalse; + + if (str[i] == '@' && (i+1) < strLen) + { + if (str[i+1] == '@' && (i+2) < strLen) + { + if (str[i+2] == '@' && (i+3) < strLen) + { //@@@ should mean to insert a striped reference here, so insert it into buf at the current place + char stripRef[MAX_STRIPED_SV_STRING]; + int r = 0; + + while (i < strLen && str[i] == '@') + { + i++; + } + + while (i < strLen && str[i] && str[i] != ' ' && str[i] != ':' && str[i] != '.' && str[i] != '\n') + { + stripRef[r] = str[i]; + r++; + i++; + } + stripRef[r] = 0; + + buf[b] = 0; + Q_strcat(buf, MAX_STRIPED_SV_STRING, CG_GetStripEdString("SVINGAME", stripRef)); + b = strlen(buf); + } + } + } + + if (!gotStrip) + { + buf[b] = str[i]; + b++; + } + i++; + } + + buf[b] = 0; +} + +/* +================= +CG_ServerCommand + +The string has been tokenized and can be retrieved with +Cmd_Argc() / Cmd_Argv() +================= +*/ +static void CG_ServerCommand( void ) { + const char *cmd; + char text[MAX_SAY_TEXT]; + + cmd = CG_Argv(0); + + if ( !cmd[0] ) { + // server claimed the command + return; + } + + if ( !strcmp( cmd, "spd" ) ) + { + const char *ID; + int holdInt,count,i; + char string[1204]; + + count = trap_Argc(); + + ID = CG_Argv(1); + holdInt = atoi(ID); + + memset( &string, 0, sizeof( string ) ); + + Com_sprintf( string,sizeof(string)," \"%s\"", (const char *) CG_Argv(2)); + + for (i=3;isnapShotTime < cg.time - EVENT_VALID_MSEC ) { + cent->previousEvent = 0; + } + + cent->trailTime = cg.snap->serverTime; + + VectorCopy (cent->currentState.origin, cent->lerpOrigin); + VectorCopy (cent->currentState.angles, cent->lerpAngles); + if ( cent->currentState.eType == ET_PLAYER ) { + CG_ResetPlayerEntity( cent ); + } +} + +/* +=============== +CG_TransitionEntity + +cent->nextState is moved to cent->currentState and events are fired +=============== +*/ +static void CG_TransitionEntity( centity_t *cent ) { + cent->currentState = cent->nextState; + cent->currentValid = qtrue; + + // reset if the entity wasn't in the last frame or was teleported + if ( !cent->interpolate ) { + CG_ResetEntity( cent ); + } + + // clear the next state. if will be set by the next CG_SetNextSnap + cent->interpolate = qfalse; + + // check for events + CG_CheckEvents( cent ); +} + + +/* +================== +CG_SetInitialSnapshot + +This will only happen on the very first snapshot, or +on tourney restarts. All other times will use +CG_TransitionSnapshot instead. + +FIXME: Also called by map_restart? +================== +*/ +void CG_SetInitialSnapshot( snapshot_t *snap ) { + int i; + centity_t *cent; + entityState_t *state; + + cg.snap = snap; + + if ((cg_entities[snap->ps.clientNum].ghoul2 == NULL) && trap_G2_HaveWeGhoul2Models(cgs.clientinfo[snap->ps.clientNum].ghoul2Model)) + { + trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[snap->ps.clientNum].ghoul2Model, &cg_entities[snap->ps.clientNum].ghoul2); + CG_CopyG2WeaponInstance(FIRST_WEAPON, cg_entities[snap->ps.clientNum].ghoul2); + } + BG_PlayerStateToEntityState( &snap->ps, &cg_entities[ snap->ps.clientNum ].currentState, qfalse ); + + // sort out solid entities + CG_BuildSolidList(); + + CG_ExecuteNewServerCommands( snap->serverCommandSequence ); + + // set our local weapon selection pointer to + // what the server has indicated the current weapon is + CG_Respawn(); + + for ( i = 0 ; i < cg.snap->numEntities ; i++ ) { + state = &cg.snap->entities[ i ]; + cent = &cg_entities[ state->number ]; + + memcpy(¢->currentState, state, sizeof(entityState_t)); + //cent->currentState = *state; + cent->interpolate = qfalse; + cent->currentValid = qtrue; + + CG_ResetEntity( cent ); + + // check for events + CG_CheckEvents( cent ); + } +} + + +/* +=================== +CG_TransitionSnapshot + +The transition point from snap to nextSnap has passed +=================== +*/ +static void CG_TransitionSnapshot( void ) { + centity_t *cent; + snapshot_t *oldFrame; + int i; + + if ( !cg.snap ) { + CG_Error( "CG_TransitionSnapshot: NULL cg.snap" ); + } + if ( !cg.nextSnap ) { + CG_Error( "CG_TransitionSnapshot: NULL cg.nextSnap" ); + } + + // execute any server string commands before transitioning entities + CG_ExecuteNewServerCommands( cg.nextSnap->serverCommandSequence ); + + // if we had a map_restart, set everthing with initial + if ( !cg.snap ) { + } + + // clear the currentValid flag for all entities in the existing snapshot + for ( i = 0 ; i < cg.snap->numEntities ; i++ ) { + cent = &cg_entities[ cg.snap->entities[ i ].number ]; + cent->currentValid = qfalse; + } + + // move nextSnap to snap and do the transitions + oldFrame = cg.snap; + cg.snap = cg.nextSnap; + + CG_CheckPlayerG2Weapons(&cg.snap->ps, &cg_entities[cg.snap->ps.clientNum]); + BG_PlayerStateToEntityState( &cg.snap->ps, &cg_entities[ cg.snap->ps.clientNum ].currentState, qfalse ); + cg_entities[ cg.snap->ps.clientNum ].interpolate = qfalse; + + for ( i = 0 ; i < cg.snap->numEntities ; i++ ) { + cent = &cg_entities[ cg.snap->entities[ i ].number ]; + CG_TransitionEntity( cent ); + + // remember time of snapshot this entity was last updated in + cent->snapShotTime = cg.snap->serverTime; + } + + cg.nextSnap = NULL; + + // check for playerstate transition events + if ( oldFrame ) { + playerState_t *ops, *ps; + + ops = &oldFrame->ps; + ps = &cg.snap->ps; + // teleporting checks are irrespective of prediction + if ( ( ps->eFlags ^ ops->eFlags ) & EF_TELEPORT_BIT ) { + cg.thisFrameTeleport = qtrue; // will be cleared by prediction code + } + + // if we are not doing client side movement prediction for any + // reason, then the client events and view changes will be issued now + if ( cg.demoPlayback || (cg.snap->ps.pm_flags & PMF_FOLLOW) + || cg_nopredict.integer || cg_synchronousClients.integer ) { + CG_TransitionPlayerState( ps, ops ); + } + } + +} + + +/* +=================== +CG_SetNextSnap + +A new snapshot has just been read in from the client system. +=================== +*/ +static void CG_SetNextSnap( snapshot_t *snap ) { + int num; + entityState_t *es; + centity_t *cent; + + cg.nextSnap = snap; + + CG_CheckPlayerG2Weapons(&cg.snap->ps, &cg_entities[cg.snap->ps.clientNum]); + BG_PlayerStateToEntityState( &snap->ps, &cg_entities[ snap->ps.clientNum ].nextState, qfalse ); + cg_entities[ cg.snap->ps.clientNum ].interpolate = qtrue; + + // check for extrapolation errors + for ( num = 0 ; num < snap->numEntities ; num++ ) + { + es = &snap->entities[num]; + cent = &cg_entities[ es->number ]; + + memcpy(¢->nextState, es, sizeof(entityState_t)); + //cent->nextState = *es; + + // if this frame is a teleport, or the entity wasn't in the + // previous frame, don't interpolate + if ( !cent->currentValid || ( ( cent->currentState.eFlags ^ es->eFlags ) & EF_TELEPORT_BIT ) ) { + cent->interpolate = qfalse; + } else { + cent->interpolate = qtrue; + } + } + + // if the next frame is a teleport for the playerstate, we + // can't interpolate during demos + if ( cg.snap && ( ( snap->ps.eFlags ^ cg.snap->ps.eFlags ) & EF_TELEPORT_BIT ) ) { + cg.nextFrameTeleport = qtrue; + } else { + cg.nextFrameTeleport = qfalse; + } + + // if changing follow mode, don't interpolate + if ( cg.nextSnap->ps.clientNum != cg.snap->ps.clientNum ) { + cg.nextFrameTeleport = qtrue; + } + + // if changing server restarts, don't interpolate + if ( ( cg.nextSnap->snapFlags ^ cg.snap->snapFlags ) & SNAPFLAG_SERVERCOUNT ) { + cg.nextFrameTeleport = qtrue; + } + + // sort out solid entities + CG_BuildSolidList(); +} + + +/* +======================== +CG_ReadNextSnapshot + +This is the only place new snapshots are requested +This may increment cgs.processedSnapshotNum multiple +times if the client system fails to return a +valid snapshot. +======================== +*/ +static snapshot_t *CG_ReadNextSnapshot( void ) { + qboolean r; + snapshot_t *dest; + + if ( cg.latestSnapshotNum > cgs.processedSnapshotNum + 1000 ) { + CG_Printf( "WARNING: CG_ReadNextSnapshot: way out of range, %i > %i", + cg.latestSnapshotNum, cgs.processedSnapshotNum ); + } + + while ( cgs.processedSnapshotNum < cg.latestSnapshotNum ) { + // decide which of the two slots to load it into + if ( cg.snap == &cg.activeSnapshots[0] ) { + dest = &cg.activeSnapshots[1]; + } else { + dest = &cg.activeSnapshots[0]; + } + + // try to read the snapshot from the client system + cgs.processedSnapshotNum++; + r = trap_GetSnapshot( cgs.processedSnapshotNum, dest ); + + // FIXME: why would trap_GetSnapshot return a snapshot with the same server time + if ( cg.snap && r && dest->serverTime == cg.snap->serverTime ) { + //continue; + } + + // if it succeeded, return + if ( r ) { + CG_AddLagometerSnapshotInfo( dest ); + return dest; + } + + // a GetSnapshot will return failure if the snapshot + // never arrived, or is so old that its entities + // have been shoved off the end of the circular + // buffer in the client system. + + // record as a dropped packet + CG_AddLagometerSnapshotInfo( NULL ); + + // If there are additional snapshots, continue trying to + // read them. + } + + // nothing left to read + return NULL; +} + + +/* +============ +CG_ProcessSnapshots + +We are trying to set up a renderable view, so determine +what the simulated time is, and try to get snapshots +both before and after that time if available. + +If we don't have a valid cg.snap after exiting this function, +then a 3D game view cannot be rendered. This should only happen +right after the initial connection. After cg.snap has been valid +once, it will never turn invalid. + +Even if cg.snap is valid, cg.nextSnap may not be, if the snapshot +hasn't arrived yet (it becomes an extrapolating situation instead +of an interpolating one) + +============ +*/ +void CG_ProcessSnapshots( void ) { + snapshot_t *snap; + int n; + + // see what the latest snapshot the client system has is + trap_GetCurrentSnapshotNumber( &n, &cg.latestSnapshotTime ); + if ( n != cg.latestSnapshotNum ) { + if ( n < cg.latestSnapshotNum ) { + // this should never happen + CG_Error( "CG_ProcessSnapshots: n < cg.latestSnapshotNum" ); + } + cg.latestSnapshotNum = n; + } + + // If we have yet to receive a snapshot, check for it. + // Once we have gotten the first snapshot, cg.snap will + // always have valid data for the rest of the game + while ( !cg.snap ) { + snap = CG_ReadNextSnapshot(); + if ( !snap ) { + // we can't continue until we get a snapshot + return; + } + + // set our weapon selection to what + // the playerstate is currently using + if ( !( snap->snapFlags & SNAPFLAG_NOT_ACTIVE ) ) { + CG_SetInitialSnapshot( snap ); + } + } + + // loop until we either have a valid nextSnap with a serverTime + // greater than cg.time to interpolate towards, or we run + // out of available snapshots + do { + // if we don't have a nextframe, try and read a new one in + if ( !cg.nextSnap ) { + snap = CG_ReadNextSnapshot(); + + // if we still don't have a nextframe, we will just have to + // extrapolate + if ( !snap ) { + break; + } + + CG_SetNextSnap( snap ); + + + // if time went backwards, we have a level restart + if ( cg.nextSnap->serverTime < cg.snap->serverTime ) { + CG_Error( "CG_ProcessSnapshots: Server time went backwards" ); + } + } + + // if our time is < nextFrame's, we have a nice interpolating state + if ( cg.time >= cg.snap->serverTime && cg.time < cg.nextSnap->serverTime ) { + break; + } + + // we have passed the transition from nextFrame to frame + CG_TransitionSnapshot(); + } while ( 1 ); + + // assert our valid conditions upon exiting + if ( cg.snap == NULL ) { + CG_Error( "CG_ProcessSnapshots: cg.snap == NULL" ); + } + if ( cg.time < cg.snap->serverTime ) { + // this can happen right after a vid_restart + cg.time = cg.snap->serverTime; + } + if ( cg.nextSnap != NULL && cg.nextSnap->serverTime <= cg.time ) { + CG_Error( "CG_ProcessSnapshots: cg.nextSnap->serverTime <= cg.time" ); + } + +} + diff --git a/code/cgame/cg_snapshot.c b/code/cgame/cg_snapshot.c new file mode 100644 index 0000000..5ee324f --- /dev/null +++ b/code/cgame/cg_snapshot.c @@ -0,0 +1,391 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_snapshot.c -- things that happen on snapshot transition, +// not necessarily every single rendered frame + +#include "cg_local.h" + + + +/* +================== +CG_ResetEntity +================== +*/ +static void CG_ResetEntity( centity_t *cent ) { + // if the previous snapshot this entity was updated in is at least + // an event window back in time then we can reset the previous event + if ( cent->snapShotTime < cg.time - EVENT_VALID_MSEC ) { + cent->previousEvent = 0; + } + + cent->trailTime = cg.snap->serverTime; + + VectorCopy (cent->currentState.origin, cent->lerpOrigin); + VectorCopy (cent->currentState.angles, cent->lerpAngles); + if ( cent->currentState.eType == ET_PLAYER ) { + CG_ResetPlayerEntity( cent ); + } +} + +/* +=============== +CG_TransitionEntity + +cent->nextState is moved to cent->currentState and events are fired +=============== +*/ +static void CG_TransitionEntity( centity_t *cent ) { + cent->currentState = cent->nextState; + cent->currentValid = qtrue; + + // reset if the entity wasn't in the last frame or was teleported + if ( !cent->interpolate ) { + CG_ResetEntity( cent ); + } + + // clear the next state. if will be set by the next CG_SetNextSnap + cent->interpolate = qfalse; + + // check for events + CG_CheckEvents( cent ); +} + + +/* +================== +CG_SetInitialSnapshot + +This will only happen on the very first snapshot, or +on tourney restarts. All other times will use +CG_TransitionSnapshot instead. + +FIXME: Also called by map_restart? +================== +*/ +void CG_SetInitialSnapshot( snapshot_t *snap ) { + int i; + centity_t *cent; + entityState_t *state; + + cg.snap = snap; + + if ((cg_entities[snap->ps.clientNum].ghoul2 == NULL) && trap_G2_HaveWeGhoul2Models(cgs.clientinfo[snap->ps.clientNum].ghoul2Model)) + { + trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[snap->ps.clientNum].ghoul2Model, &cg_entities[snap->ps.clientNum].ghoul2); + CG_CopyG2WeaponInstance(FIRST_WEAPON, cg_entities[snap->ps.clientNum].ghoul2); + } + BG_PlayerStateToEntityState( &snap->ps, &cg_entities[ snap->ps.clientNum ].currentState, qfalse ); + + // sort out solid entities + CG_BuildSolidList(); + + CG_ExecuteNewServerCommands( snap->serverCommandSequence ); + + // set our local weapon selection pointer to + // what the server has indicated the current weapon is + CG_Respawn(); + + for ( i = 0 ; i < cg.snap->numEntities ; i++ ) { + state = &cg.snap->entities[ i ]; + cent = &cg_entities[ state->number ]; + + memcpy(¢->currentState, state, sizeof(entityState_t)); + //cent->currentState = *state; + cent->interpolate = qfalse; + cent->currentValid = qtrue; + + CG_ResetEntity( cent ); + + // check for events + CG_CheckEvents( cent ); + } +} + + +/* +=================== +CG_TransitionSnapshot + +The transition point from snap to nextSnap has passed +=================== +*/ +static void CG_TransitionSnapshot( void ) { + centity_t *cent; + snapshot_t *oldFrame; + int i; + + if ( !cg.snap ) { + CG_Error( "CG_TransitionSnapshot: NULL cg.snap" ); + } + if ( !cg.nextSnap ) { + CG_Error( "CG_TransitionSnapshot: NULL cg.nextSnap" ); + } + + // execute any server string commands before transitioning entities + CG_ExecuteNewServerCommands( cg.nextSnap->serverCommandSequence ); + + // if we had a map_restart, set everthing with initial + if ( !cg.snap ) { + } + + // clear the currentValid flag for all entities in the existing snapshot + for ( i = 0 ; i < cg.snap->numEntities ; i++ ) { + cent = &cg_entities[ cg.snap->entities[ i ].number ]; + cent->currentValid = qfalse; + } + + // move nextSnap to snap and do the transitions + oldFrame = cg.snap; + cg.snap = cg.nextSnap; + + CG_CheckPlayerG2Weapons(&cg.snap->ps, &cg_entities[cg.snap->ps.clientNum]); + BG_PlayerStateToEntityState( &cg.snap->ps, &cg_entities[ cg.snap->ps.clientNum ].currentState, qfalse ); + cg_entities[ cg.snap->ps.clientNum ].interpolate = qfalse; + + for ( i = 0 ; i < cg.snap->numEntities ; i++ ) { + cent = &cg_entities[ cg.snap->entities[ i ].number ]; + CG_TransitionEntity( cent ); + + // remember time of snapshot this entity was last updated in + cent->snapShotTime = cg.snap->serverTime; + } + + cg.nextSnap = NULL; + + // check for playerstate transition events + if ( oldFrame ) { + playerState_t *ops, *ps; + + ops = &oldFrame->ps; + ps = &cg.snap->ps; + // teleporting checks are irrespective of prediction + if ( ( ps->eFlags ^ ops->eFlags ) & EF_TELEPORT_BIT ) { + cg.thisFrameTeleport = qtrue; // will be cleared by prediction code + } + + // if we are not doing client side movement prediction for any + // reason, then the client events and view changes will be issued now + if ( cg.demoPlayback || (cg.snap->ps.pm_flags & PMF_FOLLOW) + || cg_nopredict.integer || cg_synchronousClients.integer ) { + CG_TransitionPlayerState( ps, ops ); + } + } + +} + + +/* +=================== +CG_SetNextSnap + +A new snapshot has just been read in from the client system. +=================== +*/ +static void CG_SetNextSnap( snapshot_t *snap ) { + int num; + entityState_t *es; + centity_t *cent; + + cg.nextSnap = snap; + + CG_CheckPlayerG2Weapons(&cg.snap->ps, &cg_entities[cg.snap->ps.clientNum]); + BG_PlayerStateToEntityState( &snap->ps, &cg_entities[ snap->ps.clientNum ].nextState, qfalse ); + cg_entities[ cg.snap->ps.clientNum ].interpolate = qtrue; + + // check for extrapolation errors + for ( num = 0 ; num < snap->numEntities ; num++ ) + { + es = &snap->entities[num]; + cent = &cg_entities[ es->number ]; + + memcpy(¢->nextState, es, sizeof(entityState_t)); + //cent->nextState = *es; + + // if this frame is a teleport, or the entity wasn't in the + // previous frame, don't interpolate + if ( !cent->currentValid || ( ( cent->currentState.eFlags ^ es->eFlags ) & EF_TELEPORT_BIT ) ) { + cent->interpolate = qfalse; + } else { + cent->interpolate = qtrue; + } + } + + // if the next frame is a teleport for the playerstate, we + // can't interpolate during demos + if ( cg.snap && ( ( snap->ps.eFlags ^ cg.snap->ps.eFlags ) & EF_TELEPORT_BIT ) ) { + cg.nextFrameTeleport = qtrue; + } else { + cg.nextFrameTeleport = qfalse; + } + + // if changing follow mode, don't interpolate + if ( cg.nextSnap->ps.clientNum != cg.snap->ps.clientNum ) { + cg.nextFrameTeleport = qtrue; + } + + // if changing server restarts, don't interpolate + if ( ( cg.nextSnap->snapFlags ^ cg.snap->snapFlags ) & SNAPFLAG_SERVERCOUNT ) { + cg.nextFrameTeleport = qtrue; + } + + // sort out solid entities + CG_BuildSolidList(); +} + + +/* +======================== +CG_ReadNextSnapshot + +This is the only place new snapshots are requested +This may increment cgs.processedSnapshotNum multiple +times if the client system fails to return a +valid snapshot. +======================== +*/ +static snapshot_t *CG_ReadNextSnapshot( void ) { + qboolean r; + snapshot_t *dest; + + if ( cg.latestSnapshotNum > cgs.processedSnapshotNum + 1000 ) { + CG_Printf( "WARNING: CG_ReadNextSnapshot: way out of range, %i > %i", + cg.latestSnapshotNum, cgs.processedSnapshotNum ); + } + + while ( cgs.processedSnapshotNum < cg.latestSnapshotNum ) { + // decide which of the two slots to load it into + if ( cg.snap == &cg.activeSnapshots[0] ) { + dest = &cg.activeSnapshots[1]; + } else { + dest = &cg.activeSnapshots[0]; + } + + // try to read the snapshot from the client system + cgs.processedSnapshotNum++; + r = trap_GetSnapshot( cgs.processedSnapshotNum, dest ); + + // FIXME: why would trap_GetSnapshot return a snapshot with the same server time + if ( cg.snap && r && dest->serverTime == cg.snap->serverTime ) { + //continue; + } + + // if it succeeded, return + if ( r ) { + CG_AddLagometerSnapshotInfo( dest ); + return dest; + } + + // a GetSnapshot will return failure if the snapshot + // never arrived, or is so old that its entities + // have been shoved off the end of the circular + // buffer in the client system. + + // record as a dropped packet + CG_AddLagometerSnapshotInfo( NULL ); + + // If there are additional snapshots, continue trying to + // read them. + } + + // nothing left to read + return NULL; +} + + +/* +============ +CG_ProcessSnapshots + +We are trying to set up a renderable view, so determine +what the simulated time is, and try to get snapshots +both before and after that time if available. + +If we don't have a valid cg.snap after exiting this function, +then a 3D game view cannot be rendered. This should only happen +right after the initial connection. After cg.snap has been valid +once, it will never turn invalid. + +Even if cg.snap is valid, cg.nextSnap may not be, if the snapshot +hasn't arrived yet (it becomes an extrapolating situation instead +of an interpolating one) + +============ +*/ +void CG_ProcessSnapshots( void ) { + snapshot_t *snap; + int n; + + // see what the latest snapshot the client system has is + trap_GetCurrentSnapshotNumber( &n, &cg.latestSnapshotTime ); + if ( n != cg.latestSnapshotNum ) { + if ( n < cg.latestSnapshotNum ) { + // this should never happen + CG_Error( "CG_ProcessSnapshots: n < cg.latestSnapshotNum" ); + } + cg.latestSnapshotNum = n; + } + + // If we have yet to receive a snapshot, check for it. + // Once we have gotten the first snapshot, cg.snap will + // always have valid data for the rest of the game + while ( !cg.snap ) { + snap = CG_ReadNextSnapshot(); + if ( !snap ) { + // we can't continue until we get a snapshot + return; + } + + // set our weapon selection to what + // the playerstate is currently using + if ( !( snap->snapFlags & SNAPFLAG_NOT_ACTIVE ) ) { + CG_SetInitialSnapshot( snap ); + } + } + + // loop until we either have a valid nextSnap with a serverTime + // greater than cg.time to interpolate towards, or we run + // out of available snapshots + do { + // if we don't have a nextframe, try and read a new one in + if ( !cg.nextSnap ) { + snap = CG_ReadNextSnapshot(); + + // if we still don't have a nextframe, we will just have to + // extrapolate + if ( !snap ) { + break; + } + + CG_SetNextSnap( snap ); + + + // if time went backwards, we have a level restart + if ( cg.nextSnap->serverTime < cg.snap->serverTime ) { + CG_Error( "CG_ProcessSnapshots: Server time went backwards" ); + } + } + + // if our time is < nextFrame's, we have a nice interpolating state + if ( cg.time >= cg.snap->serverTime && cg.time < cg.nextSnap->serverTime ) { + break; + } + + // we have passed the transition from nextFrame to frame + CG_TransitionSnapshot(); + } while ( 1 ); + + // assert our valid conditions upon exiting + if ( cg.snap == NULL ) { + CG_Error( "CG_ProcessSnapshots: cg.snap == NULL" ); + } + if ( cg.time < cg.snap->serverTime ) { + // this can happen right after a vid_restart + cg.time = cg.snap->serverTime; + } + if ( cg.nextSnap != NULL && cg.nextSnap->serverTime <= cg.time ) { + CG_Error( "CG_ProcessSnapshots: cg.nextSnap->serverTime <= cg.time" ); + } + +} + diff --git a/code/cgame/cg_syscalls (2).asm b/code/cgame/cg_syscalls (2).asm new file mode 100644 index 0000000..bbf66b9 --- /dev/null +++ b/code/cgame/cg_syscalls (2).asm @@ -0,0 +1,175 @@ +code + +equ trap_Print -1 ; CG_PRINT +equ trap_Error -2 ; CG_ERROR +equ trap_Milliseconds -3 ; CG_MILLISECONDS +equ trap_Cvar_Register -4 ; CG_CVAR_REGISTER +equ trap_Cvar_Update -5 ; CG_CVAR_UPDATE +equ trap_Cvar_Set -6 ; CG_CVAR_SET +equ trap_Cvar_VariableStringBuffer -7 ; CG_CVAR_VARIABLESTRINGBUFFER +equ trap_Argc -8 ; CG_ARGC +equ trap_Argv -9 ; CG_ARGV +equ trap_Args -10 ; CG_ARGS +equ trap_FS_FOpenFile -11 ; CG_FS_FOPENFILE +equ trap_FS_Read -12 ; CG_FS_READ +equ trap_FS_Write -13 ; CG_FS_WRITE +equ trap_FS_FCloseFile -14 ; CG_FS_FCLOSEFILE +equ trap_SendConsoleCommand -15 ; CG_SENDCONSOLECOMMAND +equ trap_AddCommand -16 ; CG_ADDCOMMAND +equ trap_RemoveCommand -17 ; CG_REMOVECOMMAND +equ trap_SendClientCommand -18 ; CG_SENDCLIENTCOMMAND +equ trap_UpdateScreen -19 ; CG_UPDATESCREEN +equ trap_CM_LoadMap -20 ; CG_CM_LOADMAP +equ trap_CM_NumInlineModels -21 ; CG_CM_NUMINLINEMODELS +equ trap_CM_InlineModel -22 ; CG_CM_INLINEMODEL +equ trap_CM_TempBoxModel -23 ; CG_CM_TEMPBOXMODEL +equ trap_CM_TempCapsuleModel -24 ; CG_CM_TEMPCAPSULEMODEL +equ trap_CM_PointContents -25 ; CG_CM_POINTCONTENTS +equ trap_CM_TransformedPointContents -26 ; CG_CM_TRANSFORMEDPOINTCONTENTS +equ trap_CM_BoxTrace -27 ; CG_CM_BOXTRACE +equ trap_CM_CapsuleTrace -28 ; CG_CM_CAPSULETRACE +equ trap_CM_TransformedBoxTrace -29 ; CG_CM_TRANSFORMEDBOXTRACE +equ trap_CM_TransformedCapsuleTrace -30 ; CG_CM_TRANSFORMEDCAPSULETRACE +equ trap_CM_MarkFragments -31 ; CG_CM_MARKFRAGMENTS +equ trap_S_MuteSound -32 ; CG_S_MUTESOUND +equ trap_S_StartSound -33 ; CG_S_STARTSOUND +equ trap_S_StartLocalSound -34 ; CG_S_STARTLOCALSOUND +equ trap_S_ClearLoopingSounds -35 ; CG_S_CLEARLOOPINGSOUNDS +equ trap_S_AddLoopingSound -36 ; CG_S_ADDLOOPINGSOUND +equ trap_S_UpdateEntityPosition -37 ; CG_S_UPDATEENTITYPOSITION +equ trap_S_AddRealLoopingSound -38 ; CG_S_ADDREALLOOPINGSOUND +equ trap_S_StopLoopingSound -39 ; CG_S_STOPLOOPINGSOUND +equ trap_S_Respatialize -40 ; CG_S_RESPATIALIZE +equ trap_S_RegisterSound -41 ; CG_S_REGISTERSOUND +equ trap_S_StartBackgroundTrack -42 ; CG_S_STARTBACKGROUNDTRACK +equ trap_R_LoadWorldMap -43 ; CG_R_LOADWORLDMAP +equ trap_R_RegisterModel -44 ; CG_R_REGISTERMODEL +equ trap_R_RegisterSkin -45 ; CG_R_REGISTERSKIN +equ trap_R_RegisterShader -46 ; CG_R_REGISTERSHADER +equ trap_R_RegisterShaderNoMip -47 ; CG_R_REGISTERSHADERNOMIP +equ trap_R_RegisterFont -48 ; CG_R_REGISTERFONT +equ trap_R_Font_StrLenPixels -49 ; CG_R_FONT_STRLENPIXELS +equ trap_R_Font_StrLenChars -50 ; CG_R_FONT_STRLENCHARS +equ trap_R_Font_HeightPixels -51 ; CG_R_FONT_STRHEIGHTPIXELS +equ trap_R_Font_DrawString -52 ; CG_R_FONT_DRAWSTRING +equ trap_Language_IsAsian -53 ; CG_LANGUAGE_ISASIAN +equ trap_Language_UsesSpaces -54 ; CG_LANGUAGE_USESSPACES +equ trap_AnyLanguage_ReadCharFromString -55 ; CG_ANYLANGUAGE_READCHARFROMSTRING +equ trap_R_ClearScene -201 ; CG_R_CLEARSCENE +equ trap_R_AddRefEntityToScene -202 ; CG_R_ADDREFENTITYTOSCENE +equ trap_R_AddPolyToScene -203 ; CG_R_ADDPOLYTOSCENE +equ trap_R_AddPolysToScene -204 ; CG_R_ADDPOLYSTOSCENE +equ trap_R_LightForPoint -205 ; CG_R_LIGHTFORPOINT +equ trap_R_AddLightToScene -206 ; CG_R_ADDLIGHTTOSCENE +equ trap_R_AddAdditiveLightToScene -207 ; CG_R_ADDADDITIVELIGHTTOSCENE +equ trap_R_RenderScene -208 ; CG_R_RENDERSCENE +equ trap_R_SetColor -209 ; CG_R_SETCOLOR +equ trap_R_DrawStretchPic -210 ; CG_R_DRAWSTRETCHPIC +equ trap_R_ModelBounds -211 ; CG_R_MODELBOUNDS +equ trap_R_LerpTag -212 ; CG_R_LERPTAG +equ trap_R_DrawRotatePic -213 ; CG_R_DRAWROTATEPIC +equ trap_R_DrawRotatePic2 -214 ; CG_R_DRAWROTATEPIC2 +equ trap_R_RemapShader -215 ; CG_R_REMAP_SHADER +equ trap_R_GetLightStyle -216 ; CG_R_GET_LIGHT_STYLE +equ trap_R_SetLightStyle -217 ; CG_R_SET_LIGHT_STYLE +equ trap_R_GetBModelVerts -218 ; CG_R_GET_BMODEL_VERTS +equ trap_FX_AddLine -219 ; CG_FX_ADDLINE +equ trap_GetGlconfig -220 ; CG_GETGLCONFIG +equ trap_GetGameState -221 ; CG_GETGAMESTATE +equ trap_GetCurrentSnapshotNumber -222 ; CG_GETCURRENTSNAPSHOTNUMBER +equ trap_GetSnapshot -223 ; CG_GETSNAPSHOT +equ trap_GetServerCommand -224 ; CG_GETSERVERCOMMAND +equ trap_GetCurrentCmdNumber -225 ; CG_GETCURRENTCMDNUMBER +equ trap_GetUserCmd -226 ; CG_GETUSERCMD +equ trap_SetUserCmdValue -227 ; CG_SETUSERCMDVALUE +equ trap_SetClientForceAngle -228 ; CG_SETCLIENTFORCEANGLE +equ trap_SetClientTurnExtent -229 ; CG_SETCLIENTTURNEXTENT +equ trap_OpenUIMenu -230 ; CG_OPENUIMENU +equ trap_MemoryRemaining -233 ; CG_MEMORY_REMAINING +equ trap_Key_IsDown -234 ; CG_KEY_ISDOWN +equ trap_Key_GetCatcher -235 ; CG_KEY_GETCATCHER +equ trap_Key_SetCatcher -236 ; CG_KEY_SETCATCHER +equ trap_Key_GetKey -237 ; CG_KEY_GETKEY +equ trap_PC_AddGlobalDefine -238 ; CG_PC_ADD_GLOBAL_DEFINE +equ trap_PC_LoadSource -239 ; CG_PC_LOAD_SOURCE +equ trap_PC_FreeSource -240 ; CG_PC_FREE_SOURCE +equ trap_PC_ReadToken -241 ; CG_PC_READ_TOKEN +equ trap_PC_SourceFileAndLine -242 ; CG_PC_SOURCE_FILE_AND_LINE +equ trap_PC_LoadGlobalDefines -243 ; CG_PC_LOAD_GLOBAL_DEFINES +equ trap_PC_RemoveAllGlobalDefines -244 ; CG_PC_REMOVE_ALL_GLOBAL_DEFINES +equ trap_S_StopBackgroundTrack -245 ; CG_S_STOPBACKGROUNDTRACK +equ trap_RealTime -246 ; CG_REAL_TIME +equ trap_SnapVector -247 ; CG_SNAPVECTOR +equ trap_CIN_PlayCinematic -248 ; CG_CIN_PLAYCINEMATIC +equ trap_CIN_StopCinematic -249 ; CG_CIN_STOPCINEMATIC +equ trap_CIN_RunCinematic -250 ; CG_CIN_RUNCINEMATIC +equ trap_CIN_DrawCinematic -251 ; CG_CIN_DRAWCINEMATIC +equ trap_CIN_SetExtents -252 ; CG_CIN_SETEXTENTS +equ trap_GetEntityToken -253 ; CG_GET_ENTITY_TOKEN +equ trap_R_inPVS -254 ; CG_R_INPVS +equ trap_FX_RegisterEffect -255 ; CG_FX_REGISTER_EFFECT +equ trap_FX_PlaySimpleEffect -256 ; CG_FX_PLAY_SIMPLE_EFFECT +equ trap_FX_PlayEffect -257 ; CG_FX_PLAY_EFFECT +equ trap_FX_PlayEntityEffect -258 ; CG_FX_PLAY_ENTITY_EFFECT +equ trap_FX_PlaySimpleEffectID -259 ; CG_FX_PLAY_SIMPLE_EFFECT_ID +equ trap_FX_PlayEffectID -260 ; CG_FX_PLAY_EFFECT_ID +equ trap_FX_PlayEntityEffectID -261 ; CG_FX_PLAY_ENTITY_EFFECT_ID +equ trap_FX_PlayBoltedEffectID -262 ; CG_FX_PLAY_BOLTED_EFFECT_ID +equ trap_FX_AddScheduledEffects -263 ; CG_FX_ADD_SCHEDULED_EFFECTS +equ trap_FX_InitSystem -264 ; CG_FX_INIT_SYSTEM +equ trap_FX_FreeSystem -265 ; CG_FX_FREE_SYSTEM +equ trap_FX_AdjustTime -266 ; CG_FX_ADJUST_TIME +equ trap_FX_AddPoly -267 ; CG_FX_ADDPOLY +equ trap_FX_AddBezier -268 ; CG_FX_ADDBEZIER +equ trap_FX_AddPrimitive -269 ; CG_FX_ADDPRIMITIVE +equ trap_FX_AddSprite -270 ; CG_FX_ADDSPRITE +equ trap_SP_Print -271 ; CG_SP_PRINT +equ trap_SP_GetStringTextString -272 ; CG_SP_GETSTRINGTEXTSTRING +equ trap_SP_Register -273 ; CG_SP_REGISTER +equ trap_ROFF_Clean -274 ; CG_ROFF_CLEAN +equ trap_ROFF_UpdateEntities -275 ; CG_ROFF_UPDATE_ENTITIES +equ trap_ROFF_Cache -276 ; CG_ROFF_CACHE +equ trap_ROFF_Play -277 ; CG_ROFF_PLAY +equ trap_ROFF_Purge_Ent -278 ; CG_ROFF_PURGE_ENT +equ trap_G2_ListModelSurfaces -279 ; CG_G2_LISTSURFACES +equ trap_G2_ListModelBones -280 ; CG_G2_LISTBONES +equ trap_G2_SetGhoul2ModelIndexes -281 ; CG_G2_SETMODELS +equ trap_G2_HaveWeGhoul2Models -282 ; CG_G2_HAVEWEGHOULMODELS +equ trap_G2API_GiveMeVectorFromMatrix -283 ; CG_G2_GIVEMEVECTORFROMMATRIX +equ trap_G2API_GetBoltMatrix -284 ; CG_G2_GETBOLT +equ trap_G2API_GetBoltMatrix_NoReconstruct -285 ; CG_G2_GETBOLT_NOREC +equ trap_G2API_GetBoltMatrix_NoRecNoRot -286 ; CG_G2_GETBOLT_NOREC_NOROT +equ trap_G2API_InitGhoul2Model -287 ; CG_G2_INITGHOUL2MODEL +equ trap_G2API_CollisionDetect -288 ; CG_G2_COLLISIONDETECT +equ trap_G2API_CleanGhoul2Models -289 ; CG_G2_CLEANMODELS +equ trap_G2API_SetBoneAngles -290 ; CG_G2_ANGLEOVERRIDE +equ trap_G2API_SetBoneAnim -291 ; CG_G2_PLAYANIM +equ trap_G2API_GetGLAName -292 ; CG_G2_GETGLANAME +equ trap_G2API_CopyGhoul2Instance -293 ; CG_G2_COPYGHOUL2INSTANCE +equ trap_G2API_CopySpecificGhoul2Model -294 ; CG_G2_COPYSPECIFICGHOUL2MODEL +equ trap_G2API_DuplicateGhoul2Instance -295 ; CG_G2_DUPLICATEGHOUL2INSTANCE +equ trap_G2API_HasGhoul2ModelOnIndex -296 ; CG_G2_HASGHOUL2MODELONINDEX +equ trap_G2API_RemoveGhoul2Model -297 ; CG_G2_REMOVEGHOUL2MODEL +equ trap_G2API_AddBolt -298 ; CG_G2_ADDBOLT +equ trap_G2API_SetBoltInfo -299 ; CG_G2_SETBOLTON +equ trap_G2API_SetRootSurface -300 ; CG_G2_SETROOTSURFACE +equ trap_G2API_SetSurfaceOnOff -301 ; CG_G2_SETSURFACEONOFF +equ trap_G2API_SetNewOrigin -302 ; CG_G2_SETNEWORIGIN +equ trap_CG_RegisterSharedMemory -303 ; CG_SET_SHARED_BUFFER + + +; hardcoded functions +equ memset -101 ; CGAME_MEMSET +equ memcpy -102 ; CGAME_MEMCPY +equ strncpy -103 ; CGAME_STRNCPY +equ sin -104 ; CGAME_SIN +equ cos -105 ; CGAME_COS +equ atan2 -106 ; CGAME_ATAN2 +equ sqrt -107 ; CGAME_SQRT +equ matrixmultiply -108 ; CGAME_MATRIXMULTIPLY +equ anglevectors -109 ; CGAME_ANGLEVECTORS +equ perpendicularvector -110 ; CGAME_PERPENDICULARVECTOR +equ floor -111 ; CGAME_FLOOR +equ ceil -112 ; CGAME_CEIL +equ acos -113 ; CGAME_ACOS +equ asin -114 ; CGAME_ASIN diff --git a/code/cgame/cg_syscalls (2).c b/code/cgame/cg_syscalls (2).c new file mode 100644 index 0000000..072f343 --- /dev/null +++ b/code/cgame/cg_syscalls (2).c @@ -0,0 +1,782 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_syscalls.c -- this file is only included when building a dll +// cg_syscalls.asm is included instead when building a qvm +#include "cg_local.h" + +static int (QDECL *syscall)( int arg, ... ) = (int (QDECL *)( int, ...))-1; + + +void dllEntry( int (QDECL *syscallptr)( int arg,... ) ) { + syscall = syscallptr; +} + + +int PASSFLOAT( float x ) { + float floatTemp; + floatTemp = x; + return *(int *)&floatTemp; +} + +void trap_Print( const char *fmt ) { + syscall( CG_PRINT, fmt ); +} + +void trap_Error( const char *fmt ) { + syscall( CG_ERROR, fmt ); +} + +int trap_Milliseconds( void ) { + return syscall( CG_MILLISECONDS ); +} + +void trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int flags ) { + syscall( CG_CVAR_REGISTER, vmCvar, varName, defaultValue, flags ); +} + +void trap_Cvar_Update( vmCvar_t *vmCvar ) { + syscall( CG_CVAR_UPDATE, vmCvar ); +} + +void trap_Cvar_Set( const char *var_name, const char *value ) { + syscall( CG_CVAR_SET, var_name, value ); +} + +void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int bufsize ) { + syscall( CG_CVAR_VARIABLESTRINGBUFFER, var_name, buffer, bufsize ); +} + +int trap_Argc( void ) { + return syscall( CG_ARGC ); +} + +void trap_Argv( int n, char *buffer, int bufferLength ) { + syscall( CG_ARGV, n, buffer, bufferLength ); +} + +void trap_Args( char *buffer, int bufferLength ) { + syscall( CG_ARGS, buffer, bufferLength ); +} + +int trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode ) { + return syscall( CG_FS_FOPENFILE, qpath, f, mode ); +} + +void trap_FS_Read( void *buffer, int len, fileHandle_t f ) { + syscall( CG_FS_READ, buffer, len, f ); +} + +void trap_FS_Write( const void *buffer, int len, fileHandle_t f ) { + syscall( CG_FS_WRITE, buffer, len, f ); +} + +void trap_FS_FCloseFile( fileHandle_t f ) { + syscall( CG_FS_FCLOSEFILE, f ); +} + +void trap_SendConsoleCommand( const char *text ) { + syscall( CG_SENDCONSOLECOMMAND, text ); +} + +void trap_AddCommand( const char *cmdName ) { + syscall( CG_ADDCOMMAND, cmdName ); +} + +void trap_RemoveCommand( const char *cmdName ) { + syscall( CG_REMOVECOMMAND, cmdName ); +} + +void trap_SendClientCommand( const char *s ) { + syscall( CG_SENDCLIENTCOMMAND, s ); +} + +void trap_UpdateScreen( void ) { + syscall( CG_UPDATESCREEN ); +} + +void trap_CM_LoadMap( const char *mapname ) { + syscall( CG_CM_LOADMAP, mapname ); +} + +int trap_CM_NumInlineModels( void ) { + return syscall( CG_CM_NUMINLINEMODELS ); +} + +clipHandle_t trap_CM_InlineModel( int index ) { + return syscall( CG_CM_INLINEMODEL, index ); +} + +clipHandle_t trap_CM_TempBoxModel( const vec3_t mins, const vec3_t maxs ) { + return syscall( CG_CM_TEMPBOXMODEL, mins, maxs ); +} + +clipHandle_t trap_CM_TempCapsuleModel( const vec3_t mins, const vec3_t maxs ) { + return syscall( CG_CM_TEMPCAPSULEMODEL, mins, maxs ); +} + +int trap_CM_PointContents( const vec3_t p, clipHandle_t model ) { + return syscall( CG_CM_POINTCONTENTS, p, model ); +} + +int trap_CM_TransformedPointContents( const vec3_t p, clipHandle_t model, const vec3_t origin, const vec3_t angles ) { + return syscall( CG_CM_TRANSFORMEDPOINTCONTENTS, p, model, origin, angles ); +} + +void trap_CM_BoxTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask ) { + syscall( CG_CM_BOXTRACE, results, start, end, mins, maxs, model, brushmask ); +} + +void trap_CM_CapsuleTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask ) { + syscall( CG_CM_CAPSULETRACE, results, start, end, mins, maxs, model, brushmask ); +} + +void trap_CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask, + const vec3_t origin, const vec3_t angles ) { + syscall( CG_CM_TRANSFORMEDBOXTRACE, results, start, end, mins, maxs, model, brushmask, origin, angles ); +} + +void trap_CM_TransformedCapsuleTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask, + const vec3_t origin, const vec3_t angles ) { + syscall( CG_CM_TRANSFORMEDCAPSULETRACE, results, start, end, mins, maxs, model, brushmask, origin, angles ); +} + +int trap_CM_MarkFragments( int numPoints, const vec3_t *points, + const vec3_t projection, + int maxPoints, vec3_t pointBuffer, + int maxFragments, markFragment_t *fragmentBuffer ) { + return syscall( CG_CM_MARKFRAGMENTS, numPoints, points, projection, maxPoints, pointBuffer, maxFragments, fragmentBuffer ); +} + +void trap_S_MuteSound( int entityNum, int entchannel ) { + syscall( CG_S_MUTESOUND, entityNum, entchannel ); +} + +void trap_S_StartSound( vec3_t origin, int entityNum, int entchannel, sfxHandle_t sfx ) { + syscall( CG_S_STARTSOUND, origin, entityNum, entchannel, sfx ); +} + +void trap_S_StartLocalSound( sfxHandle_t sfx, int channelNum ) { + syscall( CG_S_STARTLOCALSOUND, sfx, channelNum ); +} + +void trap_S_ClearLoopingSounds( qboolean killall ) { + syscall( CG_S_CLEARLOOPINGSOUNDS, killall ); +} + +void trap_S_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx ) { + syscall( CG_S_ADDLOOPINGSOUND, entityNum, origin, velocity, sfx ); +} + +void trap_S_UpdateEntityPosition( int entityNum, const vec3_t origin ) { + syscall( CG_S_UPDATEENTITYPOSITION, entityNum, origin ); +} + +void trap_S_AddRealLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx ) { + syscall( CG_S_ADDREALLOOPINGSOUND, entityNum, origin, velocity, sfx ); +} + +void trap_S_StopLoopingSound( int entityNum ) { + syscall( CG_S_STOPLOOPINGSOUND, entityNum ); +} + +void trap_S_Respatialize( int entityNum, const vec3_t origin, vec3_t axis[3], int inwater ) { + syscall( CG_S_RESPATIALIZE, entityNum, origin, axis, inwater ); +} + +sfxHandle_t trap_S_RegisterSound( const char *sample ) { + return syscall( CG_S_REGISTERSOUND, sample ); +} + +void trap_S_StartBackgroundTrack( const char *intro, const char *loop, qboolean bReturnWithoutStarting ) { + syscall( CG_S_STARTBACKGROUNDTRACK, intro, loop, bReturnWithoutStarting ); +} + +void trap_R_LoadWorldMap( const char *mapname ) { + syscall( CG_R_LOADWORLDMAP, mapname ); +} + +qhandle_t trap_R_RegisterModel( const char *name ) { + return syscall( CG_R_REGISTERMODEL, name ); +} + +qhandle_t trap_R_RegisterSkin( const char *name ) { + return syscall( CG_R_REGISTERSKIN, name ); +} + +qhandle_t trap_R_RegisterShader( const char *name ) { + return syscall( CG_R_REGISTERSHADER, name ); +} + +qhandle_t trap_R_RegisterShaderNoMip( const char *name ) { + return syscall( CG_R_REGISTERSHADERNOMIP, name ); +} + +qhandle_t trap_R_RegisterFont( const char *fontName ) +{ + return syscall( CG_R_REGISTERFONT, fontName); +} + +int trap_R_Font_StrLenPixels(const char *text, const int iFontIndex, const float scale) +{ + return syscall( CG_R_FONT_STRLENPIXELS, text, iFontIndex, PASSFLOAT(scale)); +} + +int trap_R_Font_StrLenChars(const char *text) +{ + return syscall( CG_R_FONT_STRLENCHARS, text); +} + +int trap_R_Font_HeightPixels(const int iFontIndex, const float scale) +{ + return syscall( CG_R_FONT_STRHEIGHTPIXELS, iFontIndex, PASSFLOAT(scale)); +} + +void trap_R_Font_DrawString(int ox, int oy, const char *text, const float *rgba, const int setIndex, int iCharLimit, const float scale) +{ + syscall( CG_R_FONT_DRAWSTRING, ox, oy, text, rgba, setIndex, iCharLimit, PASSFLOAT(scale)); +} + +qboolean trap_Language_IsAsian(void) +{ + return syscall( CG_LANGUAGE_ISASIAN ); +} + +qboolean trap_Language_UsesSpaces(void) +{ + return syscall( CG_LANGUAGE_USESSPACES ); +} + +unsigned int trap_AnyLanguage_ReadCharFromString( const char *psText, int *piAdvanceCount, qboolean *pbIsTrailingPunctuation/* = NULL*/ ) +{ + return syscall( CG_ANYLANGUAGE_READCHARFROMSTRING, psText, piAdvanceCount, pbIsTrailingPunctuation); +} + +void trap_R_ClearScene( void ) { + syscall( CG_R_CLEARSCENE ); +} + +void trap_R_AddRefEntityToScene( const refEntity_t *re ) { + syscall( CG_R_ADDREFENTITYTOSCENE, re ); +} + +void trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts ) { + syscall( CG_R_ADDPOLYTOSCENE, hShader, numVerts, verts ); +} + +void trap_R_AddPolysToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts, int num ) { + syscall( CG_R_ADDPOLYSTOSCENE, hShader, numVerts, verts, num ); +} + +int trap_R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t directedLight, vec3_t lightDir ) { + return syscall( CG_R_LIGHTFORPOINT, point, ambientLight, directedLight, lightDir ); +} + +void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ) { + syscall( CG_R_ADDLIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) ); +} + +void trap_R_AddAdditiveLightToScene( const vec3_t org, float intensity, float r, float g, float b ) { + syscall( CG_R_ADDADDITIVELIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) ); +} + +void trap_R_RenderScene( const refdef_t *fd ) { + syscall( CG_R_RENDERSCENE, fd ); +} + +void trap_R_SetColor( const float *rgba ) { + syscall( CG_R_SETCOLOR, rgba ); +} + +void trap_R_DrawStretchPic( float x, float y, float w, float h, + float s1, float t1, float s2, float t2, qhandle_t hShader ) { + syscall( CG_R_DRAWSTRETCHPIC, PASSFLOAT(x), PASSFLOAT(y), PASSFLOAT(w), PASSFLOAT(h), PASSFLOAT(s1), PASSFLOAT(t1), PASSFLOAT(s2), PASSFLOAT(t2), hShader ); +} + +void trap_R_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs ) { + syscall( CG_R_MODELBOUNDS, model, mins, maxs ); +} + +int trap_R_LerpTag( orientation_t *tag, clipHandle_t mod, int startFrame, int endFrame, + float frac, const char *tagName ) { + return syscall( CG_R_LERPTAG, tag, mod, startFrame, endFrame, PASSFLOAT(frac), tagName ); +} + +void trap_R_DrawRotatePic( float x, float y, float w, float h, + float s1, float t1, float s2, float t2,float a, qhandle_t hShader ) +{ + syscall( CG_R_DRAWROTATEPIC, PASSFLOAT(x), PASSFLOAT(y), PASSFLOAT(w), PASSFLOAT(h), PASSFLOAT(s1), PASSFLOAT(t1), PASSFLOAT(s2), PASSFLOAT(t2), PASSFLOAT(a), hShader ); +} + +void trap_R_DrawRotatePic2( float x, float y, float w, float h, + float s1, float t1, float s2, float t2,float a, qhandle_t hShader ) +{ + syscall( CG_R_DRAWROTATEPIC2, PASSFLOAT(x), PASSFLOAT(y), PASSFLOAT(w), PASSFLOAT(h), PASSFLOAT(s1), PASSFLOAT(t1), PASSFLOAT(s2), PASSFLOAT(t2), PASSFLOAT(a), hShader ); +} + +void trap_R_RemapShader( const char *oldShader, const char *newShader, const char *timeOffset ) +{ + syscall( CG_R_REMAP_SHADER, oldShader, newShader, timeOffset ); +} + +void trap_R_GetLightStyle(int style, color4ub_t color) +{ + syscall( CG_R_GET_LIGHT_STYLE, style, color ); +} + +void trap_R_SetLightStyle(int style, int color) +{ + syscall( CG_R_SET_LIGHT_STYLE, style, color ); +} + +void trap_R_GetBModelVerts(int bmodelIndex, vec3_t *verts, vec3_t normal ) +{ + syscall( CG_R_GET_BMODEL_VERTS, bmodelIndex, verts, normal ); +} + +void trap_FX_AddLine( const vec3_t start, const vec3_t end, float size1, float size2, float sizeParm, + float alpha1, float alpha2, float alphaParm, + const vec3_t sRGB, const vec3_t eRGB, float rgbParm, + int killTime, qhandle_t shader, int flags) +{ + syscall( CG_FX_ADDLINE, start, end, PASSFLOAT(size1), PASSFLOAT(size2), PASSFLOAT(sizeParm), + PASSFLOAT(alpha1), PASSFLOAT(alpha2), PASSFLOAT(alphaParm), + sRGB, eRGB, PASSFLOAT(rgbParm), + killTime, shader, flags); +} + +void trap_GetGlconfig( glconfig_t *glconfig ) { + syscall( CG_GETGLCONFIG, glconfig ); +} + +void trap_GetGameState( gameState_t *gamestate ) { + syscall( CG_GETGAMESTATE, gamestate ); +} + +void trap_GetCurrentSnapshotNumber( int *snapshotNumber, int *serverTime ) { + syscall( CG_GETCURRENTSNAPSHOTNUMBER, snapshotNumber, serverTime ); +} + +qboolean trap_GetSnapshot( int snapshotNumber, snapshot_t *snapshot ) { + return syscall( CG_GETSNAPSHOT, snapshotNumber, snapshot ); +} + +qboolean trap_GetServerCommand( int serverCommandNumber ) { + return syscall( CG_GETSERVERCOMMAND, serverCommandNumber ); +} + +int trap_GetCurrentCmdNumber( void ) { + return syscall( CG_GETCURRENTCMDNUMBER ); +} + +qboolean trap_GetUserCmd( int cmdNumber, usercmd_t *ucmd ) { + return syscall( CG_GETUSERCMD, cmdNumber, ucmd ); +} + +void trap_SetUserCmdValue( int stateValue, float sensitivityScale, int fpSel, int invenSel ) { + syscall( CG_SETUSERCMDVALUE, stateValue, PASSFLOAT(sensitivityScale), fpSel, invenSel ); +} + +void trap_SetClientForceAngle(int time, vec3_t angle) +{ + syscall( CG_SETCLIENTFORCEANGLE, time, angle ); +} + +void trap_SetClientTurnExtent(float turnAdd, float turnSub, int turnTime) +{ + syscall( CG_SETCLIENTTURNEXTENT, PASSFLOAT(turnAdd), PASSFLOAT(turnSub), turnTime ); +} + +void trap_OpenUIMenu(int menuID) +{ + syscall( CG_OPENUIMENU, menuID ); +} + +void testPrintInt( char *string, int i ) { + syscall( CG_TESTPRINTINT, string, i ); +} + +void testPrintFloat( char *string, float f ) { + syscall( CG_TESTPRINTFLOAT, string, PASSFLOAT(f) ); +} + +int trap_MemoryRemaining( void ) { + return syscall( CG_MEMORY_REMAINING ); +} + +qboolean trap_Key_IsDown( int keynum ) { + return syscall( CG_KEY_ISDOWN, keynum ); +} + +int trap_Key_GetCatcher( void ) { + return syscall( CG_KEY_GETCATCHER ); +} + +void trap_Key_SetCatcher( int catcher ) { + syscall( CG_KEY_SETCATCHER, catcher ); +} + +int trap_Key_GetKey( const char *binding ) { + return syscall( CG_KEY_GETKEY, binding ); +} + +int trap_PC_AddGlobalDefine( char *define ) { + return syscall( CG_PC_ADD_GLOBAL_DEFINE, define ); +} + +int trap_PC_LoadSource( const char *filename ) { + return syscall( CG_PC_LOAD_SOURCE, filename ); +} + +int trap_PC_FreeSource( int handle ) { + return syscall( CG_PC_FREE_SOURCE, handle ); +} + +int trap_PC_ReadToken( int handle, pc_token_t *pc_token ) { + return syscall( CG_PC_READ_TOKEN, handle, pc_token ); +} + +int trap_PC_SourceFileAndLine( int handle, char *filename, int *line ) { + return syscall( CG_PC_SOURCE_FILE_AND_LINE, handle, filename, line ); +} + +int trap_PC_LoadGlobalDefines ( const char* filename ) +{ + return syscall ( CG_PC_LOAD_GLOBAL_DEFINES, filename ); +} + +void trap_PC_RemoveAllGlobalDefines ( void ) +{ + syscall ( CG_PC_REMOVE_ALL_GLOBAL_DEFINES ); +} + +void trap_S_StopBackgroundTrack( void ) { + syscall( CG_S_STOPBACKGROUNDTRACK ); +} + +int trap_RealTime(qtime_t *qtime) { + return syscall( CG_REAL_TIME, qtime ); +} + +void trap_SnapVector( float *v ) { + syscall( CG_SNAPVECTOR, v ); +} + +// this returns a handle. arg0 is the name in the format "idlogo.roq", set arg1 to NULL, alteredstates to qfalse (do not alter gamestate) +int trap_CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits) { + return syscall(CG_CIN_PLAYCINEMATIC, arg0, xpos, ypos, width, height, bits); +} + +// stops playing the cinematic and ends it. should always return FMV_EOF +// cinematics must be stopped in reverse order of when they are started +e_status trap_CIN_StopCinematic(int handle) { + return syscall(CG_CIN_STOPCINEMATIC, handle); +} + + +// will run a frame of the cinematic but will not draw it. Will return FMV_EOF if the end of the cinematic has been reached. +e_status trap_CIN_RunCinematic (int handle) { + return syscall(CG_CIN_RUNCINEMATIC, handle); +} + + +// draws the current frame +void trap_CIN_DrawCinematic (int handle) { + syscall(CG_CIN_DRAWCINEMATIC, handle); +} + + +// allows you to resize the animation dynamically +void trap_CIN_SetExtents (int handle, int x, int y, int w, int h) { + syscall(CG_CIN_SETEXTENTS, handle, x, y, w, h); +} + +qboolean trap_GetEntityToken( char *buffer, int bufferSize ) { + return syscall( CG_GET_ENTITY_TOKEN, buffer, bufferSize ); +} + +qboolean trap_R_inPVS( const vec3_t p1, const vec3_t p2 ) { + return syscall( CG_R_INPVS, p1, p2 ); +} + +int trap_FX_RegisterEffect(const char *file) +{ + return syscall( CG_FX_REGISTER_EFFECT, file); +} + +void trap_FX_PlaySimpleEffect( const char *file, vec3_t org ) +{ + syscall( CG_FX_PLAY_SIMPLE_EFFECT, file, org); +} + +void trap_FX_PlayEffect( const char *file, vec3_t org, vec3_t fwd ) +{ + syscall( CG_FX_PLAY_EFFECT, file, org, fwd); +} + +void trap_FX_PlayEntityEffect( const char *file, vec3_t org, + vec3_t axis[3], const int boltInfo, const int entNum ) +{ + syscall( CG_FX_PLAY_ENTITY_EFFECT, file, org, axis, boltInfo, entNum); +} + +void trap_FX_PlaySimpleEffectID( int id, vec3_t org ) +{ + syscall( CG_FX_PLAY_SIMPLE_EFFECT_ID, id, org); +} + +void trap_FX_PlayEffectID( int id, vec3_t org, vec3_t fwd ) +{ + syscall( CG_FX_PLAY_EFFECT_ID, id, org, fwd); +} + +void trap_FX_PlayEntityEffectID( int id, vec3_t org, + vec3_t axis[3], const int boltInfo, const int entNum ) +{ + syscall( CG_FX_PLAY_ENTITY_EFFECT_ID, id, org, axis, boltInfo, entNum); +} + +void trap_FX_PlayBoltedEffectID( int id, sharedBoltInterface_t *fxObj ) +{ + syscall( CG_FX_PLAY_BOLTED_EFFECT_ID, id, fxObj ); +} + +void trap_FX_AddScheduledEffects( void ) +{ + syscall( CG_FX_ADD_SCHEDULED_EFFECTS ); +} + +int trap_FX_InitSystem( void ) +{ + return syscall( CG_FX_INIT_SYSTEM ); +} + +qboolean trap_FX_FreeSystem( void ) +{ + return syscall( CG_FX_FREE_SYSTEM ); +} + +void trap_FX_AdjustTime( int time, vec3_t vieworg, vec3_t viewaxis[3] ) +{ + syscall( CG_FX_ADJUST_TIME, time, vieworg, viewaxis ); +} + +void trap_FX_AddPoly( addpolyArgStruct_t *p ) +{ + syscall( CG_FX_ADDPOLY, p ); +} + +void trap_FX_AddBezier( addbezierArgStruct_t *p ) +{ + syscall( CG_FX_ADDBEZIER, p ); +} + +void trap_FX_AddPrimitive( effectTrailArgStruct_t *p ) +{ + syscall( CG_FX_ADDPRIMITIVE, p ); +} + +void trap_FX_AddSprite( addspriteArgStruct_t *p ) +{ + syscall( CG_FX_ADDSPRITE, p ); +} + +void trap_SP_Print(const unsigned ID, byte *Data) +{ + syscall( CG_SP_PRINT, ID, Data); +} + +int trap_SP_GetStringTextString(const char *text, char *buffer, int bufferLength) +{ + return syscall( CG_SP_GETSTRINGTEXTSTRING, text, buffer, bufferLength ); +} + +qboolean trap_SP_Register(char *file ) +{ + return syscall( CG_SP_REGISTER,file ); +} + +qboolean trap_ROFF_Clean( void ) +{ + return syscall( CG_ROFF_CLEAN ); +} + +void trap_ROFF_UpdateEntities( void ) +{ + syscall( CG_ROFF_UPDATE_ENTITIES ); +} + +int trap_ROFF_Cache( char *file ) +{ + return syscall( CG_ROFF_CACHE, file ); +} + +qboolean trap_ROFF_Play( int entID, int roffID, qboolean doTranslation ) +{ + return syscall( CG_ROFF_PLAY, entID, roffID, doTranslation ); +} + +qboolean trap_ROFF_Purge_Ent( int entID ) +{ + return syscall( CG_ROFF_PURGE_ENT, entID ); +} + +/* +Ghoul2 Insert Start +*/ +// CG Specific API calls +void trap_G2_ListModelSurfaces(void *ghlInfo) +{ + syscall( CG_G2_LISTSURFACES, ghlInfo); +} + +void trap_G2_ListModelBones(void *ghlInfo, int frame) +{ + syscall( CG_G2_LISTBONES, ghlInfo, frame); +} + +void trap_G2_SetGhoul2ModelIndexes(void *ghoul2, qhandle_t *modelList, qhandle_t *skinList) +{ + syscall( CG_G2_SETMODELS, ghoul2, modelList, skinList); +} + +qboolean trap_G2_HaveWeGhoul2Models(void *ghoul2) +{ + return (qboolean)(syscall(CG_G2_HAVEWEGHOULMODELS, ghoul2)); +} + +void trap_G2API_GiveMeVectorFromMatrix(mdxaBone_t *boltMatrix, int flags, vec3_t vec) +{ + syscall(CG_G2_GIVEMEVECTORFROMMATRIX, boltMatrix, flags, vec); +} + +qboolean trap_G2API_GetBoltMatrix(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) +{ + return (qboolean)(syscall(CG_G2_GETBOLT, ghoul2, modelIndex, boltIndex, matrix, angles, position, frameNum, modelList, scale)); +} + +qboolean trap_G2API_GetBoltMatrix_NoReconstruct(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) +{ //Same as above but force it to not reconstruct the skeleton before getting the bolt position + return (qboolean)(syscall(CG_G2_GETBOLT_NOREC, ghoul2, modelIndex, boltIndex, matrix, angles, position, frameNum, modelList, scale)); +} + +qboolean trap_G2API_GetBoltMatrix_NoRecNoRot(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) +{ //Same as above but force it to not reconstruct the skeleton before getting the bolt position + return (qboolean)(syscall(CG_G2_GETBOLT_NOREC_NOROT, ghoul2, modelIndex, boltIndex, matrix, angles, position, frameNum, modelList, scale)); +} + +int trap_G2API_InitGhoul2Model(void **ghoul2Ptr, const char *fileName, int modelIndex, qhandle_t customSkin, + qhandle_t customShader, int modelFlags, int lodBias) +{ + return syscall(CG_G2_INITGHOUL2MODEL, ghoul2Ptr, fileName, modelIndex, customSkin, customShader, modelFlags, lodBias); +} + +void trap_G2API_CollisionDetect ( + CollisionRecord_t *collRecMap, + void* ghoul2, + const vec3_t angles, + const vec3_t position, + int frameNumber, + int entNum, + const vec3_t rayStart, + const vec3_t rayEnd, + const vec3_t scale, + int traceFlags, + int useLod, + float fRadius + ) +{ + syscall ( CG_G2_COLLISIONDETECT, collRecMap, ghoul2, angles, position, frameNumber, entNum, rayStart, rayEnd, scale, traceFlags, useLod, PASSFLOAT(fRadius) ); +} + +void trap_G2API_CleanGhoul2Models(void **ghoul2Ptr) +{ + syscall(CG_G2_CLEANMODELS, ghoul2Ptr); +} + +qboolean trap_G2API_SetBoneAngles(void *ghoul2, int modelIndex, const char *boneName, const vec3_t angles, const int flags, + const int up, const int right, const int forward, qhandle_t *modelList, + int blendTime , int currentTime ) +{ + return (syscall(CG_G2_ANGLEOVERRIDE, ghoul2, modelIndex, boneName, angles, flags, up, right, forward, modelList, blendTime, currentTime)); +} + +qboolean trap_G2API_SetBoneAnim(void *ghoul2, const int modelIndex, const char *boneName, const int startFrame, const int endFrame, + const int flags, const float animSpeed, const int currentTime, const float setFrame , const int blendTime ) +{ + return syscall(CG_G2_PLAYANIM, ghoul2, modelIndex, boneName, startFrame, endFrame, flags, PASSFLOAT(animSpeed), currentTime, PASSFLOAT(setFrame), blendTime); +} + +void trap_G2API_GetGLAName(void *ghoul2, int modelIndex, char *fillBuf) +{ + syscall(CG_G2_GETGLANAME, ghoul2, modelIndex, fillBuf); +} + +int trap_G2API_CopyGhoul2Instance(void *g2From, void *g2To, int modelIndex) +{ + return syscall(CG_G2_COPYGHOUL2INSTANCE, g2From, g2To, modelIndex); +} + +void trap_G2API_CopySpecificGhoul2Model(void *g2From, int modelFrom, void *g2To, int modelTo) +{ + syscall(CG_G2_COPYSPECIFICGHOUL2MODEL, g2From, modelFrom, g2To, modelTo); +} + +void trap_G2API_DuplicateGhoul2Instance(void *g2From, void **g2To) +{ + syscall(CG_G2_DUPLICATEGHOUL2INSTANCE, g2From, g2To); +} + +qboolean trap_G2API_HasGhoul2ModelOnIndex(void *ghlInfo, int modelIndex) +{ + return syscall(CG_G2_HASGHOUL2MODELONINDEX, ghlInfo, modelIndex); +} + +qboolean trap_G2API_RemoveGhoul2Model(void *ghlInfo, int modelIndex) +{ + return syscall(CG_G2_REMOVEGHOUL2MODEL, ghlInfo, modelIndex); +} + +int trap_G2API_AddBolt(void *ghoul2, int modelIndex, const char *boneName) +{ + return syscall(CG_G2_ADDBOLT, ghoul2, modelIndex, boneName); +} + +void trap_G2API_SetBoltInfo(void *ghoul2, int modelIndex, int boltInfo) +{ + syscall(CG_G2_SETBOLTON, ghoul2, modelIndex, boltInfo); +} + +qboolean trap_G2API_SetRootSurface(void *ghoul2, const int modelIndex, const char *surfaceName) +{ + return syscall(CG_G2_SETROOTSURFACE, ghoul2, modelIndex, surfaceName); +} + +qboolean trap_G2API_SetSurfaceOnOff(void *ghoul2, const char *surfaceName, const int flags) +{ + return syscall(CG_G2_SETSURFACEONOFF, ghoul2, surfaceName, flags); +} + +qboolean trap_G2API_SetNewOrigin(void *ghoul2, const int boltIndex) +{ + return syscall(CG_G2_SETNEWORIGIN, ghoul2, boltIndex); +} + +void trap_CG_RegisterSharedMemory(char *memory) +{ + syscall(CG_SET_SHARED_BUFFER, memory); +} + +/* +Ghoul2 Insert End +*/ \ No newline at end of file diff --git a/code/cgame/cg_syscalls.asm b/code/cgame/cg_syscalls.asm new file mode 100644 index 0000000..bbf66b9 --- /dev/null +++ b/code/cgame/cg_syscalls.asm @@ -0,0 +1,175 @@ +code + +equ trap_Print -1 ; CG_PRINT +equ trap_Error -2 ; CG_ERROR +equ trap_Milliseconds -3 ; CG_MILLISECONDS +equ trap_Cvar_Register -4 ; CG_CVAR_REGISTER +equ trap_Cvar_Update -5 ; CG_CVAR_UPDATE +equ trap_Cvar_Set -6 ; CG_CVAR_SET +equ trap_Cvar_VariableStringBuffer -7 ; CG_CVAR_VARIABLESTRINGBUFFER +equ trap_Argc -8 ; CG_ARGC +equ trap_Argv -9 ; CG_ARGV +equ trap_Args -10 ; CG_ARGS +equ trap_FS_FOpenFile -11 ; CG_FS_FOPENFILE +equ trap_FS_Read -12 ; CG_FS_READ +equ trap_FS_Write -13 ; CG_FS_WRITE +equ trap_FS_FCloseFile -14 ; CG_FS_FCLOSEFILE +equ trap_SendConsoleCommand -15 ; CG_SENDCONSOLECOMMAND +equ trap_AddCommand -16 ; CG_ADDCOMMAND +equ trap_RemoveCommand -17 ; CG_REMOVECOMMAND +equ trap_SendClientCommand -18 ; CG_SENDCLIENTCOMMAND +equ trap_UpdateScreen -19 ; CG_UPDATESCREEN +equ trap_CM_LoadMap -20 ; CG_CM_LOADMAP +equ trap_CM_NumInlineModels -21 ; CG_CM_NUMINLINEMODELS +equ trap_CM_InlineModel -22 ; CG_CM_INLINEMODEL +equ trap_CM_TempBoxModel -23 ; CG_CM_TEMPBOXMODEL +equ trap_CM_TempCapsuleModel -24 ; CG_CM_TEMPCAPSULEMODEL +equ trap_CM_PointContents -25 ; CG_CM_POINTCONTENTS +equ trap_CM_TransformedPointContents -26 ; CG_CM_TRANSFORMEDPOINTCONTENTS +equ trap_CM_BoxTrace -27 ; CG_CM_BOXTRACE +equ trap_CM_CapsuleTrace -28 ; CG_CM_CAPSULETRACE +equ trap_CM_TransformedBoxTrace -29 ; CG_CM_TRANSFORMEDBOXTRACE +equ trap_CM_TransformedCapsuleTrace -30 ; CG_CM_TRANSFORMEDCAPSULETRACE +equ trap_CM_MarkFragments -31 ; CG_CM_MARKFRAGMENTS +equ trap_S_MuteSound -32 ; CG_S_MUTESOUND +equ trap_S_StartSound -33 ; CG_S_STARTSOUND +equ trap_S_StartLocalSound -34 ; CG_S_STARTLOCALSOUND +equ trap_S_ClearLoopingSounds -35 ; CG_S_CLEARLOOPINGSOUNDS +equ trap_S_AddLoopingSound -36 ; CG_S_ADDLOOPINGSOUND +equ trap_S_UpdateEntityPosition -37 ; CG_S_UPDATEENTITYPOSITION +equ trap_S_AddRealLoopingSound -38 ; CG_S_ADDREALLOOPINGSOUND +equ trap_S_StopLoopingSound -39 ; CG_S_STOPLOOPINGSOUND +equ trap_S_Respatialize -40 ; CG_S_RESPATIALIZE +equ trap_S_RegisterSound -41 ; CG_S_REGISTERSOUND +equ trap_S_StartBackgroundTrack -42 ; CG_S_STARTBACKGROUNDTRACK +equ trap_R_LoadWorldMap -43 ; CG_R_LOADWORLDMAP +equ trap_R_RegisterModel -44 ; CG_R_REGISTERMODEL +equ trap_R_RegisterSkin -45 ; CG_R_REGISTERSKIN +equ trap_R_RegisterShader -46 ; CG_R_REGISTERSHADER +equ trap_R_RegisterShaderNoMip -47 ; CG_R_REGISTERSHADERNOMIP +equ trap_R_RegisterFont -48 ; CG_R_REGISTERFONT +equ trap_R_Font_StrLenPixels -49 ; CG_R_FONT_STRLENPIXELS +equ trap_R_Font_StrLenChars -50 ; CG_R_FONT_STRLENCHARS +equ trap_R_Font_HeightPixels -51 ; CG_R_FONT_STRHEIGHTPIXELS +equ trap_R_Font_DrawString -52 ; CG_R_FONT_DRAWSTRING +equ trap_Language_IsAsian -53 ; CG_LANGUAGE_ISASIAN +equ trap_Language_UsesSpaces -54 ; CG_LANGUAGE_USESSPACES +equ trap_AnyLanguage_ReadCharFromString -55 ; CG_ANYLANGUAGE_READCHARFROMSTRING +equ trap_R_ClearScene -201 ; CG_R_CLEARSCENE +equ trap_R_AddRefEntityToScene -202 ; CG_R_ADDREFENTITYTOSCENE +equ trap_R_AddPolyToScene -203 ; CG_R_ADDPOLYTOSCENE +equ trap_R_AddPolysToScene -204 ; CG_R_ADDPOLYSTOSCENE +equ trap_R_LightForPoint -205 ; CG_R_LIGHTFORPOINT +equ trap_R_AddLightToScene -206 ; CG_R_ADDLIGHTTOSCENE +equ trap_R_AddAdditiveLightToScene -207 ; CG_R_ADDADDITIVELIGHTTOSCENE +equ trap_R_RenderScene -208 ; CG_R_RENDERSCENE +equ trap_R_SetColor -209 ; CG_R_SETCOLOR +equ trap_R_DrawStretchPic -210 ; CG_R_DRAWSTRETCHPIC +equ trap_R_ModelBounds -211 ; CG_R_MODELBOUNDS +equ trap_R_LerpTag -212 ; CG_R_LERPTAG +equ trap_R_DrawRotatePic -213 ; CG_R_DRAWROTATEPIC +equ trap_R_DrawRotatePic2 -214 ; CG_R_DRAWROTATEPIC2 +equ trap_R_RemapShader -215 ; CG_R_REMAP_SHADER +equ trap_R_GetLightStyle -216 ; CG_R_GET_LIGHT_STYLE +equ trap_R_SetLightStyle -217 ; CG_R_SET_LIGHT_STYLE +equ trap_R_GetBModelVerts -218 ; CG_R_GET_BMODEL_VERTS +equ trap_FX_AddLine -219 ; CG_FX_ADDLINE +equ trap_GetGlconfig -220 ; CG_GETGLCONFIG +equ trap_GetGameState -221 ; CG_GETGAMESTATE +equ trap_GetCurrentSnapshotNumber -222 ; CG_GETCURRENTSNAPSHOTNUMBER +equ trap_GetSnapshot -223 ; CG_GETSNAPSHOT +equ trap_GetServerCommand -224 ; CG_GETSERVERCOMMAND +equ trap_GetCurrentCmdNumber -225 ; CG_GETCURRENTCMDNUMBER +equ trap_GetUserCmd -226 ; CG_GETUSERCMD +equ trap_SetUserCmdValue -227 ; CG_SETUSERCMDVALUE +equ trap_SetClientForceAngle -228 ; CG_SETCLIENTFORCEANGLE +equ trap_SetClientTurnExtent -229 ; CG_SETCLIENTTURNEXTENT +equ trap_OpenUIMenu -230 ; CG_OPENUIMENU +equ trap_MemoryRemaining -233 ; CG_MEMORY_REMAINING +equ trap_Key_IsDown -234 ; CG_KEY_ISDOWN +equ trap_Key_GetCatcher -235 ; CG_KEY_GETCATCHER +equ trap_Key_SetCatcher -236 ; CG_KEY_SETCATCHER +equ trap_Key_GetKey -237 ; CG_KEY_GETKEY +equ trap_PC_AddGlobalDefine -238 ; CG_PC_ADD_GLOBAL_DEFINE +equ trap_PC_LoadSource -239 ; CG_PC_LOAD_SOURCE +equ trap_PC_FreeSource -240 ; CG_PC_FREE_SOURCE +equ trap_PC_ReadToken -241 ; CG_PC_READ_TOKEN +equ trap_PC_SourceFileAndLine -242 ; CG_PC_SOURCE_FILE_AND_LINE +equ trap_PC_LoadGlobalDefines -243 ; CG_PC_LOAD_GLOBAL_DEFINES +equ trap_PC_RemoveAllGlobalDefines -244 ; CG_PC_REMOVE_ALL_GLOBAL_DEFINES +equ trap_S_StopBackgroundTrack -245 ; CG_S_STOPBACKGROUNDTRACK +equ trap_RealTime -246 ; CG_REAL_TIME +equ trap_SnapVector -247 ; CG_SNAPVECTOR +equ trap_CIN_PlayCinematic -248 ; CG_CIN_PLAYCINEMATIC +equ trap_CIN_StopCinematic -249 ; CG_CIN_STOPCINEMATIC +equ trap_CIN_RunCinematic -250 ; CG_CIN_RUNCINEMATIC +equ trap_CIN_DrawCinematic -251 ; CG_CIN_DRAWCINEMATIC +equ trap_CIN_SetExtents -252 ; CG_CIN_SETEXTENTS +equ trap_GetEntityToken -253 ; CG_GET_ENTITY_TOKEN +equ trap_R_inPVS -254 ; CG_R_INPVS +equ trap_FX_RegisterEffect -255 ; CG_FX_REGISTER_EFFECT +equ trap_FX_PlaySimpleEffect -256 ; CG_FX_PLAY_SIMPLE_EFFECT +equ trap_FX_PlayEffect -257 ; CG_FX_PLAY_EFFECT +equ trap_FX_PlayEntityEffect -258 ; CG_FX_PLAY_ENTITY_EFFECT +equ trap_FX_PlaySimpleEffectID -259 ; CG_FX_PLAY_SIMPLE_EFFECT_ID +equ trap_FX_PlayEffectID -260 ; CG_FX_PLAY_EFFECT_ID +equ trap_FX_PlayEntityEffectID -261 ; CG_FX_PLAY_ENTITY_EFFECT_ID +equ trap_FX_PlayBoltedEffectID -262 ; CG_FX_PLAY_BOLTED_EFFECT_ID +equ trap_FX_AddScheduledEffects -263 ; CG_FX_ADD_SCHEDULED_EFFECTS +equ trap_FX_InitSystem -264 ; CG_FX_INIT_SYSTEM +equ trap_FX_FreeSystem -265 ; CG_FX_FREE_SYSTEM +equ trap_FX_AdjustTime -266 ; CG_FX_ADJUST_TIME +equ trap_FX_AddPoly -267 ; CG_FX_ADDPOLY +equ trap_FX_AddBezier -268 ; CG_FX_ADDBEZIER +equ trap_FX_AddPrimitive -269 ; CG_FX_ADDPRIMITIVE +equ trap_FX_AddSprite -270 ; CG_FX_ADDSPRITE +equ trap_SP_Print -271 ; CG_SP_PRINT +equ trap_SP_GetStringTextString -272 ; CG_SP_GETSTRINGTEXTSTRING +equ trap_SP_Register -273 ; CG_SP_REGISTER +equ trap_ROFF_Clean -274 ; CG_ROFF_CLEAN +equ trap_ROFF_UpdateEntities -275 ; CG_ROFF_UPDATE_ENTITIES +equ trap_ROFF_Cache -276 ; CG_ROFF_CACHE +equ trap_ROFF_Play -277 ; CG_ROFF_PLAY +equ trap_ROFF_Purge_Ent -278 ; CG_ROFF_PURGE_ENT +equ trap_G2_ListModelSurfaces -279 ; CG_G2_LISTSURFACES +equ trap_G2_ListModelBones -280 ; CG_G2_LISTBONES +equ trap_G2_SetGhoul2ModelIndexes -281 ; CG_G2_SETMODELS +equ trap_G2_HaveWeGhoul2Models -282 ; CG_G2_HAVEWEGHOULMODELS +equ trap_G2API_GiveMeVectorFromMatrix -283 ; CG_G2_GIVEMEVECTORFROMMATRIX +equ trap_G2API_GetBoltMatrix -284 ; CG_G2_GETBOLT +equ trap_G2API_GetBoltMatrix_NoReconstruct -285 ; CG_G2_GETBOLT_NOREC +equ trap_G2API_GetBoltMatrix_NoRecNoRot -286 ; CG_G2_GETBOLT_NOREC_NOROT +equ trap_G2API_InitGhoul2Model -287 ; CG_G2_INITGHOUL2MODEL +equ trap_G2API_CollisionDetect -288 ; CG_G2_COLLISIONDETECT +equ trap_G2API_CleanGhoul2Models -289 ; CG_G2_CLEANMODELS +equ trap_G2API_SetBoneAngles -290 ; CG_G2_ANGLEOVERRIDE +equ trap_G2API_SetBoneAnim -291 ; CG_G2_PLAYANIM +equ trap_G2API_GetGLAName -292 ; CG_G2_GETGLANAME +equ trap_G2API_CopyGhoul2Instance -293 ; CG_G2_COPYGHOUL2INSTANCE +equ trap_G2API_CopySpecificGhoul2Model -294 ; CG_G2_COPYSPECIFICGHOUL2MODEL +equ trap_G2API_DuplicateGhoul2Instance -295 ; CG_G2_DUPLICATEGHOUL2INSTANCE +equ trap_G2API_HasGhoul2ModelOnIndex -296 ; CG_G2_HASGHOUL2MODELONINDEX +equ trap_G2API_RemoveGhoul2Model -297 ; CG_G2_REMOVEGHOUL2MODEL +equ trap_G2API_AddBolt -298 ; CG_G2_ADDBOLT +equ trap_G2API_SetBoltInfo -299 ; CG_G2_SETBOLTON +equ trap_G2API_SetRootSurface -300 ; CG_G2_SETROOTSURFACE +equ trap_G2API_SetSurfaceOnOff -301 ; CG_G2_SETSURFACEONOFF +equ trap_G2API_SetNewOrigin -302 ; CG_G2_SETNEWORIGIN +equ trap_CG_RegisterSharedMemory -303 ; CG_SET_SHARED_BUFFER + + +; hardcoded functions +equ memset -101 ; CGAME_MEMSET +equ memcpy -102 ; CGAME_MEMCPY +equ strncpy -103 ; CGAME_STRNCPY +equ sin -104 ; CGAME_SIN +equ cos -105 ; CGAME_COS +equ atan2 -106 ; CGAME_ATAN2 +equ sqrt -107 ; CGAME_SQRT +equ matrixmultiply -108 ; CGAME_MATRIXMULTIPLY +equ anglevectors -109 ; CGAME_ANGLEVECTORS +equ perpendicularvector -110 ; CGAME_PERPENDICULARVECTOR +equ floor -111 ; CGAME_FLOOR +equ ceil -112 ; CGAME_CEIL +equ acos -113 ; CGAME_ACOS +equ asin -114 ; CGAME_ASIN diff --git a/code/cgame/cg_syscalls.c b/code/cgame/cg_syscalls.c new file mode 100644 index 0000000..072f343 --- /dev/null +++ b/code/cgame/cg_syscalls.c @@ -0,0 +1,782 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_syscalls.c -- this file is only included when building a dll +// cg_syscalls.asm is included instead when building a qvm +#include "cg_local.h" + +static int (QDECL *syscall)( int arg, ... ) = (int (QDECL *)( int, ...))-1; + + +void dllEntry( int (QDECL *syscallptr)( int arg,... ) ) { + syscall = syscallptr; +} + + +int PASSFLOAT( float x ) { + float floatTemp; + floatTemp = x; + return *(int *)&floatTemp; +} + +void trap_Print( const char *fmt ) { + syscall( CG_PRINT, fmt ); +} + +void trap_Error( const char *fmt ) { + syscall( CG_ERROR, fmt ); +} + +int trap_Milliseconds( void ) { + return syscall( CG_MILLISECONDS ); +} + +void trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int flags ) { + syscall( CG_CVAR_REGISTER, vmCvar, varName, defaultValue, flags ); +} + +void trap_Cvar_Update( vmCvar_t *vmCvar ) { + syscall( CG_CVAR_UPDATE, vmCvar ); +} + +void trap_Cvar_Set( const char *var_name, const char *value ) { + syscall( CG_CVAR_SET, var_name, value ); +} + +void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int bufsize ) { + syscall( CG_CVAR_VARIABLESTRINGBUFFER, var_name, buffer, bufsize ); +} + +int trap_Argc( void ) { + return syscall( CG_ARGC ); +} + +void trap_Argv( int n, char *buffer, int bufferLength ) { + syscall( CG_ARGV, n, buffer, bufferLength ); +} + +void trap_Args( char *buffer, int bufferLength ) { + syscall( CG_ARGS, buffer, bufferLength ); +} + +int trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode ) { + return syscall( CG_FS_FOPENFILE, qpath, f, mode ); +} + +void trap_FS_Read( void *buffer, int len, fileHandle_t f ) { + syscall( CG_FS_READ, buffer, len, f ); +} + +void trap_FS_Write( const void *buffer, int len, fileHandle_t f ) { + syscall( CG_FS_WRITE, buffer, len, f ); +} + +void trap_FS_FCloseFile( fileHandle_t f ) { + syscall( CG_FS_FCLOSEFILE, f ); +} + +void trap_SendConsoleCommand( const char *text ) { + syscall( CG_SENDCONSOLECOMMAND, text ); +} + +void trap_AddCommand( const char *cmdName ) { + syscall( CG_ADDCOMMAND, cmdName ); +} + +void trap_RemoveCommand( const char *cmdName ) { + syscall( CG_REMOVECOMMAND, cmdName ); +} + +void trap_SendClientCommand( const char *s ) { + syscall( CG_SENDCLIENTCOMMAND, s ); +} + +void trap_UpdateScreen( void ) { + syscall( CG_UPDATESCREEN ); +} + +void trap_CM_LoadMap( const char *mapname ) { + syscall( CG_CM_LOADMAP, mapname ); +} + +int trap_CM_NumInlineModels( void ) { + return syscall( CG_CM_NUMINLINEMODELS ); +} + +clipHandle_t trap_CM_InlineModel( int index ) { + return syscall( CG_CM_INLINEMODEL, index ); +} + +clipHandle_t trap_CM_TempBoxModel( const vec3_t mins, const vec3_t maxs ) { + return syscall( CG_CM_TEMPBOXMODEL, mins, maxs ); +} + +clipHandle_t trap_CM_TempCapsuleModel( const vec3_t mins, const vec3_t maxs ) { + return syscall( CG_CM_TEMPCAPSULEMODEL, mins, maxs ); +} + +int trap_CM_PointContents( const vec3_t p, clipHandle_t model ) { + return syscall( CG_CM_POINTCONTENTS, p, model ); +} + +int trap_CM_TransformedPointContents( const vec3_t p, clipHandle_t model, const vec3_t origin, const vec3_t angles ) { + return syscall( CG_CM_TRANSFORMEDPOINTCONTENTS, p, model, origin, angles ); +} + +void trap_CM_BoxTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask ) { + syscall( CG_CM_BOXTRACE, results, start, end, mins, maxs, model, brushmask ); +} + +void trap_CM_CapsuleTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask ) { + syscall( CG_CM_CAPSULETRACE, results, start, end, mins, maxs, model, brushmask ); +} + +void trap_CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask, + const vec3_t origin, const vec3_t angles ) { + syscall( CG_CM_TRANSFORMEDBOXTRACE, results, start, end, mins, maxs, model, brushmask, origin, angles ); +} + +void trap_CM_TransformedCapsuleTrace( trace_t *results, const vec3_t start, const vec3_t end, + const vec3_t mins, const vec3_t maxs, + clipHandle_t model, int brushmask, + const vec3_t origin, const vec3_t angles ) { + syscall( CG_CM_TRANSFORMEDCAPSULETRACE, results, start, end, mins, maxs, model, brushmask, origin, angles ); +} + +int trap_CM_MarkFragments( int numPoints, const vec3_t *points, + const vec3_t projection, + int maxPoints, vec3_t pointBuffer, + int maxFragments, markFragment_t *fragmentBuffer ) { + return syscall( CG_CM_MARKFRAGMENTS, numPoints, points, projection, maxPoints, pointBuffer, maxFragments, fragmentBuffer ); +} + +void trap_S_MuteSound( int entityNum, int entchannel ) { + syscall( CG_S_MUTESOUND, entityNum, entchannel ); +} + +void trap_S_StartSound( vec3_t origin, int entityNum, int entchannel, sfxHandle_t sfx ) { + syscall( CG_S_STARTSOUND, origin, entityNum, entchannel, sfx ); +} + +void trap_S_StartLocalSound( sfxHandle_t sfx, int channelNum ) { + syscall( CG_S_STARTLOCALSOUND, sfx, channelNum ); +} + +void trap_S_ClearLoopingSounds( qboolean killall ) { + syscall( CG_S_CLEARLOOPINGSOUNDS, killall ); +} + +void trap_S_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx ) { + syscall( CG_S_ADDLOOPINGSOUND, entityNum, origin, velocity, sfx ); +} + +void trap_S_UpdateEntityPosition( int entityNum, const vec3_t origin ) { + syscall( CG_S_UPDATEENTITYPOSITION, entityNum, origin ); +} + +void trap_S_AddRealLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx ) { + syscall( CG_S_ADDREALLOOPINGSOUND, entityNum, origin, velocity, sfx ); +} + +void trap_S_StopLoopingSound( int entityNum ) { + syscall( CG_S_STOPLOOPINGSOUND, entityNum ); +} + +void trap_S_Respatialize( int entityNum, const vec3_t origin, vec3_t axis[3], int inwater ) { + syscall( CG_S_RESPATIALIZE, entityNum, origin, axis, inwater ); +} + +sfxHandle_t trap_S_RegisterSound( const char *sample ) { + return syscall( CG_S_REGISTERSOUND, sample ); +} + +void trap_S_StartBackgroundTrack( const char *intro, const char *loop, qboolean bReturnWithoutStarting ) { + syscall( CG_S_STARTBACKGROUNDTRACK, intro, loop, bReturnWithoutStarting ); +} + +void trap_R_LoadWorldMap( const char *mapname ) { + syscall( CG_R_LOADWORLDMAP, mapname ); +} + +qhandle_t trap_R_RegisterModel( const char *name ) { + return syscall( CG_R_REGISTERMODEL, name ); +} + +qhandle_t trap_R_RegisterSkin( const char *name ) { + return syscall( CG_R_REGISTERSKIN, name ); +} + +qhandle_t trap_R_RegisterShader( const char *name ) { + return syscall( CG_R_REGISTERSHADER, name ); +} + +qhandle_t trap_R_RegisterShaderNoMip( const char *name ) { + return syscall( CG_R_REGISTERSHADERNOMIP, name ); +} + +qhandle_t trap_R_RegisterFont( const char *fontName ) +{ + return syscall( CG_R_REGISTERFONT, fontName); +} + +int trap_R_Font_StrLenPixels(const char *text, const int iFontIndex, const float scale) +{ + return syscall( CG_R_FONT_STRLENPIXELS, text, iFontIndex, PASSFLOAT(scale)); +} + +int trap_R_Font_StrLenChars(const char *text) +{ + return syscall( CG_R_FONT_STRLENCHARS, text); +} + +int trap_R_Font_HeightPixels(const int iFontIndex, const float scale) +{ + return syscall( CG_R_FONT_STRHEIGHTPIXELS, iFontIndex, PASSFLOAT(scale)); +} + +void trap_R_Font_DrawString(int ox, int oy, const char *text, const float *rgba, const int setIndex, int iCharLimit, const float scale) +{ + syscall( CG_R_FONT_DRAWSTRING, ox, oy, text, rgba, setIndex, iCharLimit, PASSFLOAT(scale)); +} + +qboolean trap_Language_IsAsian(void) +{ + return syscall( CG_LANGUAGE_ISASIAN ); +} + +qboolean trap_Language_UsesSpaces(void) +{ + return syscall( CG_LANGUAGE_USESSPACES ); +} + +unsigned int trap_AnyLanguage_ReadCharFromString( const char *psText, int *piAdvanceCount, qboolean *pbIsTrailingPunctuation/* = NULL*/ ) +{ + return syscall( CG_ANYLANGUAGE_READCHARFROMSTRING, psText, piAdvanceCount, pbIsTrailingPunctuation); +} + +void trap_R_ClearScene( void ) { + syscall( CG_R_CLEARSCENE ); +} + +void trap_R_AddRefEntityToScene( const refEntity_t *re ) { + syscall( CG_R_ADDREFENTITYTOSCENE, re ); +} + +void trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts ) { + syscall( CG_R_ADDPOLYTOSCENE, hShader, numVerts, verts ); +} + +void trap_R_AddPolysToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts, int num ) { + syscall( CG_R_ADDPOLYSTOSCENE, hShader, numVerts, verts, num ); +} + +int trap_R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t directedLight, vec3_t lightDir ) { + return syscall( CG_R_LIGHTFORPOINT, point, ambientLight, directedLight, lightDir ); +} + +void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ) { + syscall( CG_R_ADDLIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) ); +} + +void trap_R_AddAdditiveLightToScene( const vec3_t org, float intensity, float r, float g, float b ) { + syscall( CG_R_ADDADDITIVELIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) ); +} + +void trap_R_RenderScene( const refdef_t *fd ) { + syscall( CG_R_RENDERSCENE, fd ); +} + +void trap_R_SetColor( const float *rgba ) { + syscall( CG_R_SETCOLOR, rgba ); +} + +void trap_R_DrawStretchPic( float x, float y, float w, float h, + float s1, float t1, float s2, float t2, qhandle_t hShader ) { + syscall( CG_R_DRAWSTRETCHPIC, PASSFLOAT(x), PASSFLOAT(y), PASSFLOAT(w), PASSFLOAT(h), PASSFLOAT(s1), PASSFLOAT(t1), PASSFLOAT(s2), PASSFLOAT(t2), hShader ); +} + +void trap_R_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs ) { + syscall( CG_R_MODELBOUNDS, model, mins, maxs ); +} + +int trap_R_LerpTag( orientation_t *tag, clipHandle_t mod, int startFrame, int endFrame, + float frac, const char *tagName ) { + return syscall( CG_R_LERPTAG, tag, mod, startFrame, endFrame, PASSFLOAT(frac), tagName ); +} + +void trap_R_DrawRotatePic( float x, float y, float w, float h, + float s1, float t1, float s2, float t2,float a, qhandle_t hShader ) +{ + syscall( CG_R_DRAWROTATEPIC, PASSFLOAT(x), PASSFLOAT(y), PASSFLOAT(w), PASSFLOAT(h), PASSFLOAT(s1), PASSFLOAT(t1), PASSFLOAT(s2), PASSFLOAT(t2), PASSFLOAT(a), hShader ); +} + +void trap_R_DrawRotatePic2( float x, float y, float w, float h, + float s1, float t1, float s2, float t2,float a, qhandle_t hShader ) +{ + syscall( CG_R_DRAWROTATEPIC2, PASSFLOAT(x), PASSFLOAT(y), PASSFLOAT(w), PASSFLOAT(h), PASSFLOAT(s1), PASSFLOAT(t1), PASSFLOAT(s2), PASSFLOAT(t2), PASSFLOAT(a), hShader ); +} + +void trap_R_RemapShader( const char *oldShader, const char *newShader, const char *timeOffset ) +{ + syscall( CG_R_REMAP_SHADER, oldShader, newShader, timeOffset ); +} + +void trap_R_GetLightStyle(int style, color4ub_t color) +{ + syscall( CG_R_GET_LIGHT_STYLE, style, color ); +} + +void trap_R_SetLightStyle(int style, int color) +{ + syscall( CG_R_SET_LIGHT_STYLE, style, color ); +} + +void trap_R_GetBModelVerts(int bmodelIndex, vec3_t *verts, vec3_t normal ) +{ + syscall( CG_R_GET_BMODEL_VERTS, bmodelIndex, verts, normal ); +} + +void trap_FX_AddLine( const vec3_t start, const vec3_t end, float size1, float size2, float sizeParm, + float alpha1, float alpha2, float alphaParm, + const vec3_t sRGB, const vec3_t eRGB, float rgbParm, + int killTime, qhandle_t shader, int flags) +{ + syscall( CG_FX_ADDLINE, start, end, PASSFLOAT(size1), PASSFLOAT(size2), PASSFLOAT(sizeParm), + PASSFLOAT(alpha1), PASSFLOAT(alpha2), PASSFLOAT(alphaParm), + sRGB, eRGB, PASSFLOAT(rgbParm), + killTime, shader, flags); +} + +void trap_GetGlconfig( glconfig_t *glconfig ) { + syscall( CG_GETGLCONFIG, glconfig ); +} + +void trap_GetGameState( gameState_t *gamestate ) { + syscall( CG_GETGAMESTATE, gamestate ); +} + +void trap_GetCurrentSnapshotNumber( int *snapshotNumber, int *serverTime ) { + syscall( CG_GETCURRENTSNAPSHOTNUMBER, snapshotNumber, serverTime ); +} + +qboolean trap_GetSnapshot( int snapshotNumber, snapshot_t *snapshot ) { + return syscall( CG_GETSNAPSHOT, snapshotNumber, snapshot ); +} + +qboolean trap_GetServerCommand( int serverCommandNumber ) { + return syscall( CG_GETSERVERCOMMAND, serverCommandNumber ); +} + +int trap_GetCurrentCmdNumber( void ) { + return syscall( CG_GETCURRENTCMDNUMBER ); +} + +qboolean trap_GetUserCmd( int cmdNumber, usercmd_t *ucmd ) { + return syscall( CG_GETUSERCMD, cmdNumber, ucmd ); +} + +void trap_SetUserCmdValue( int stateValue, float sensitivityScale, int fpSel, int invenSel ) { + syscall( CG_SETUSERCMDVALUE, stateValue, PASSFLOAT(sensitivityScale), fpSel, invenSel ); +} + +void trap_SetClientForceAngle(int time, vec3_t angle) +{ + syscall( CG_SETCLIENTFORCEANGLE, time, angle ); +} + +void trap_SetClientTurnExtent(float turnAdd, float turnSub, int turnTime) +{ + syscall( CG_SETCLIENTTURNEXTENT, PASSFLOAT(turnAdd), PASSFLOAT(turnSub), turnTime ); +} + +void trap_OpenUIMenu(int menuID) +{ + syscall( CG_OPENUIMENU, menuID ); +} + +void testPrintInt( char *string, int i ) { + syscall( CG_TESTPRINTINT, string, i ); +} + +void testPrintFloat( char *string, float f ) { + syscall( CG_TESTPRINTFLOAT, string, PASSFLOAT(f) ); +} + +int trap_MemoryRemaining( void ) { + return syscall( CG_MEMORY_REMAINING ); +} + +qboolean trap_Key_IsDown( int keynum ) { + return syscall( CG_KEY_ISDOWN, keynum ); +} + +int trap_Key_GetCatcher( void ) { + return syscall( CG_KEY_GETCATCHER ); +} + +void trap_Key_SetCatcher( int catcher ) { + syscall( CG_KEY_SETCATCHER, catcher ); +} + +int trap_Key_GetKey( const char *binding ) { + return syscall( CG_KEY_GETKEY, binding ); +} + +int trap_PC_AddGlobalDefine( char *define ) { + return syscall( CG_PC_ADD_GLOBAL_DEFINE, define ); +} + +int trap_PC_LoadSource( const char *filename ) { + return syscall( CG_PC_LOAD_SOURCE, filename ); +} + +int trap_PC_FreeSource( int handle ) { + return syscall( CG_PC_FREE_SOURCE, handle ); +} + +int trap_PC_ReadToken( int handle, pc_token_t *pc_token ) { + return syscall( CG_PC_READ_TOKEN, handle, pc_token ); +} + +int trap_PC_SourceFileAndLine( int handle, char *filename, int *line ) { + return syscall( CG_PC_SOURCE_FILE_AND_LINE, handle, filename, line ); +} + +int trap_PC_LoadGlobalDefines ( const char* filename ) +{ + return syscall ( CG_PC_LOAD_GLOBAL_DEFINES, filename ); +} + +void trap_PC_RemoveAllGlobalDefines ( void ) +{ + syscall ( CG_PC_REMOVE_ALL_GLOBAL_DEFINES ); +} + +void trap_S_StopBackgroundTrack( void ) { + syscall( CG_S_STOPBACKGROUNDTRACK ); +} + +int trap_RealTime(qtime_t *qtime) { + return syscall( CG_REAL_TIME, qtime ); +} + +void trap_SnapVector( float *v ) { + syscall( CG_SNAPVECTOR, v ); +} + +// this returns a handle. arg0 is the name in the format "idlogo.roq", set arg1 to NULL, alteredstates to qfalse (do not alter gamestate) +int trap_CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits) { + return syscall(CG_CIN_PLAYCINEMATIC, arg0, xpos, ypos, width, height, bits); +} + +// stops playing the cinematic and ends it. should always return FMV_EOF +// cinematics must be stopped in reverse order of when they are started +e_status trap_CIN_StopCinematic(int handle) { + return syscall(CG_CIN_STOPCINEMATIC, handle); +} + + +// will run a frame of the cinematic but will not draw it. Will return FMV_EOF if the end of the cinematic has been reached. +e_status trap_CIN_RunCinematic (int handle) { + return syscall(CG_CIN_RUNCINEMATIC, handle); +} + + +// draws the current frame +void trap_CIN_DrawCinematic (int handle) { + syscall(CG_CIN_DRAWCINEMATIC, handle); +} + + +// allows you to resize the animation dynamically +void trap_CIN_SetExtents (int handle, int x, int y, int w, int h) { + syscall(CG_CIN_SETEXTENTS, handle, x, y, w, h); +} + +qboolean trap_GetEntityToken( char *buffer, int bufferSize ) { + return syscall( CG_GET_ENTITY_TOKEN, buffer, bufferSize ); +} + +qboolean trap_R_inPVS( const vec3_t p1, const vec3_t p2 ) { + return syscall( CG_R_INPVS, p1, p2 ); +} + +int trap_FX_RegisterEffect(const char *file) +{ + return syscall( CG_FX_REGISTER_EFFECT, file); +} + +void trap_FX_PlaySimpleEffect( const char *file, vec3_t org ) +{ + syscall( CG_FX_PLAY_SIMPLE_EFFECT, file, org); +} + +void trap_FX_PlayEffect( const char *file, vec3_t org, vec3_t fwd ) +{ + syscall( CG_FX_PLAY_EFFECT, file, org, fwd); +} + +void trap_FX_PlayEntityEffect( const char *file, vec3_t org, + vec3_t axis[3], const int boltInfo, const int entNum ) +{ + syscall( CG_FX_PLAY_ENTITY_EFFECT, file, org, axis, boltInfo, entNum); +} + +void trap_FX_PlaySimpleEffectID( int id, vec3_t org ) +{ + syscall( CG_FX_PLAY_SIMPLE_EFFECT_ID, id, org); +} + +void trap_FX_PlayEffectID( int id, vec3_t org, vec3_t fwd ) +{ + syscall( CG_FX_PLAY_EFFECT_ID, id, org, fwd); +} + +void trap_FX_PlayEntityEffectID( int id, vec3_t org, + vec3_t axis[3], const int boltInfo, const int entNum ) +{ + syscall( CG_FX_PLAY_ENTITY_EFFECT_ID, id, org, axis, boltInfo, entNum); +} + +void trap_FX_PlayBoltedEffectID( int id, sharedBoltInterface_t *fxObj ) +{ + syscall( CG_FX_PLAY_BOLTED_EFFECT_ID, id, fxObj ); +} + +void trap_FX_AddScheduledEffects( void ) +{ + syscall( CG_FX_ADD_SCHEDULED_EFFECTS ); +} + +int trap_FX_InitSystem( void ) +{ + return syscall( CG_FX_INIT_SYSTEM ); +} + +qboolean trap_FX_FreeSystem( void ) +{ + return syscall( CG_FX_FREE_SYSTEM ); +} + +void trap_FX_AdjustTime( int time, vec3_t vieworg, vec3_t viewaxis[3] ) +{ + syscall( CG_FX_ADJUST_TIME, time, vieworg, viewaxis ); +} + +void trap_FX_AddPoly( addpolyArgStruct_t *p ) +{ + syscall( CG_FX_ADDPOLY, p ); +} + +void trap_FX_AddBezier( addbezierArgStruct_t *p ) +{ + syscall( CG_FX_ADDBEZIER, p ); +} + +void trap_FX_AddPrimitive( effectTrailArgStruct_t *p ) +{ + syscall( CG_FX_ADDPRIMITIVE, p ); +} + +void trap_FX_AddSprite( addspriteArgStruct_t *p ) +{ + syscall( CG_FX_ADDSPRITE, p ); +} + +void trap_SP_Print(const unsigned ID, byte *Data) +{ + syscall( CG_SP_PRINT, ID, Data); +} + +int trap_SP_GetStringTextString(const char *text, char *buffer, int bufferLength) +{ + return syscall( CG_SP_GETSTRINGTEXTSTRING, text, buffer, bufferLength ); +} + +qboolean trap_SP_Register(char *file ) +{ + return syscall( CG_SP_REGISTER,file ); +} + +qboolean trap_ROFF_Clean( void ) +{ + return syscall( CG_ROFF_CLEAN ); +} + +void trap_ROFF_UpdateEntities( void ) +{ + syscall( CG_ROFF_UPDATE_ENTITIES ); +} + +int trap_ROFF_Cache( char *file ) +{ + return syscall( CG_ROFF_CACHE, file ); +} + +qboolean trap_ROFF_Play( int entID, int roffID, qboolean doTranslation ) +{ + return syscall( CG_ROFF_PLAY, entID, roffID, doTranslation ); +} + +qboolean trap_ROFF_Purge_Ent( int entID ) +{ + return syscall( CG_ROFF_PURGE_ENT, entID ); +} + +/* +Ghoul2 Insert Start +*/ +// CG Specific API calls +void trap_G2_ListModelSurfaces(void *ghlInfo) +{ + syscall( CG_G2_LISTSURFACES, ghlInfo); +} + +void trap_G2_ListModelBones(void *ghlInfo, int frame) +{ + syscall( CG_G2_LISTBONES, ghlInfo, frame); +} + +void trap_G2_SetGhoul2ModelIndexes(void *ghoul2, qhandle_t *modelList, qhandle_t *skinList) +{ + syscall( CG_G2_SETMODELS, ghoul2, modelList, skinList); +} + +qboolean trap_G2_HaveWeGhoul2Models(void *ghoul2) +{ + return (qboolean)(syscall(CG_G2_HAVEWEGHOULMODELS, ghoul2)); +} + +void trap_G2API_GiveMeVectorFromMatrix(mdxaBone_t *boltMatrix, int flags, vec3_t vec) +{ + syscall(CG_G2_GIVEMEVECTORFROMMATRIX, boltMatrix, flags, vec); +} + +qboolean trap_G2API_GetBoltMatrix(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) +{ + return (qboolean)(syscall(CG_G2_GETBOLT, ghoul2, modelIndex, boltIndex, matrix, angles, position, frameNum, modelList, scale)); +} + +qboolean trap_G2API_GetBoltMatrix_NoReconstruct(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) +{ //Same as above but force it to not reconstruct the skeleton before getting the bolt position + return (qboolean)(syscall(CG_G2_GETBOLT_NOREC, ghoul2, modelIndex, boltIndex, matrix, angles, position, frameNum, modelList, scale)); +} + +qboolean trap_G2API_GetBoltMatrix_NoRecNoRot(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, + const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) +{ //Same as above but force it to not reconstruct the skeleton before getting the bolt position + return (qboolean)(syscall(CG_G2_GETBOLT_NOREC_NOROT, ghoul2, modelIndex, boltIndex, matrix, angles, position, frameNum, modelList, scale)); +} + +int trap_G2API_InitGhoul2Model(void **ghoul2Ptr, const char *fileName, int modelIndex, qhandle_t customSkin, + qhandle_t customShader, int modelFlags, int lodBias) +{ + return syscall(CG_G2_INITGHOUL2MODEL, ghoul2Ptr, fileName, modelIndex, customSkin, customShader, modelFlags, lodBias); +} + +void trap_G2API_CollisionDetect ( + CollisionRecord_t *collRecMap, + void* ghoul2, + const vec3_t angles, + const vec3_t position, + int frameNumber, + int entNum, + const vec3_t rayStart, + const vec3_t rayEnd, + const vec3_t scale, + int traceFlags, + int useLod, + float fRadius + ) +{ + syscall ( CG_G2_COLLISIONDETECT, collRecMap, ghoul2, angles, position, frameNumber, entNum, rayStart, rayEnd, scale, traceFlags, useLod, PASSFLOAT(fRadius) ); +} + +void trap_G2API_CleanGhoul2Models(void **ghoul2Ptr) +{ + syscall(CG_G2_CLEANMODELS, ghoul2Ptr); +} + +qboolean trap_G2API_SetBoneAngles(void *ghoul2, int modelIndex, const char *boneName, const vec3_t angles, const int flags, + const int up, const int right, const int forward, qhandle_t *modelList, + int blendTime , int currentTime ) +{ + return (syscall(CG_G2_ANGLEOVERRIDE, ghoul2, modelIndex, boneName, angles, flags, up, right, forward, modelList, blendTime, currentTime)); +} + +qboolean trap_G2API_SetBoneAnim(void *ghoul2, const int modelIndex, const char *boneName, const int startFrame, const int endFrame, + const int flags, const float animSpeed, const int currentTime, const float setFrame , const int blendTime ) +{ + return syscall(CG_G2_PLAYANIM, ghoul2, modelIndex, boneName, startFrame, endFrame, flags, PASSFLOAT(animSpeed), currentTime, PASSFLOAT(setFrame), blendTime); +} + +void trap_G2API_GetGLAName(void *ghoul2, int modelIndex, char *fillBuf) +{ + syscall(CG_G2_GETGLANAME, ghoul2, modelIndex, fillBuf); +} + +int trap_G2API_CopyGhoul2Instance(void *g2From, void *g2To, int modelIndex) +{ + return syscall(CG_G2_COPYGHOUL2INSTANCE, g2From, g2To, modelIndex); +} + +void trap_G2API_CopySpecificGhoul2Model(void *g2From, int modelFrom, void *g2To, int modelTo) +{ + syscall(CG_G2_COPYSPECIFICGHOUL2MODEL, g2From, modelFrom, g2To, modelTo); +} + +void trap_G2API_DuplicateGhoul2Instance(void *g2From, void **g2To) +{ + syscall(CG_G2_DUPLICATEGHOUL2INSTANCE, g2From, g2To); +} + +qboolean trap_G2API_HasGhoul2ModelOnIndex(void *ghlInfo, int modelIndex) +{ + return syscall(CG_G2_HASGHOUL2MODELONINDEX, ghlInfo, modelIndex); +} + +qboolean trap_G2API_RemoveGhoul2Model(void *ghlInfo, int modelIndex) +{ + return syscall(CG_G2_REMOVEGHOUL2MODEL, ghlInfo, modelIndex); +} + +int trap_G2API_AddBolt(void *ghoul2, int modelIndex, const char *boneName) +{ + return syscall(CG_G2_ADDBOLT, ghoul2, modelIndex, boneName); +} + +void trap_G2API_SetBoltInfo(void *ghoul2, int modelIndex, int boltInfo) +{ + syscall(CG_G2_SETBOLTON, ghoul2, modelIndex, boltInfo); +} + +qboolean trap_G2API_SetRootSurface(void *ghoul2, const int modelIndex, const char *surfaceName) +{ + return syscall(CG_G2_SETROOTSURFACE, ghoul2, modelIndex, surfaceName); +} + +qboolean trap_G2API_SetSurfaceOnOff(void *ghoul2, const char *surfaceName, const int flags) +{ + return syscall(CG_G2_SETSURFACEONOFF, ghoul2, surfaceName, flags); +} + +qboolean trap_G2API_SetNewOrigin(void *ghoul2, const int boltIndex) +{ + return syscall(CG_G2_SETNEWORIGIN, ghoul2, boltIndex); +} + +void trap_CG_RegisterSharedMemory(char *memory) +{ + syscall(CG_SET_SHARED_BUFFER, memory); +} + +/* +Ghoul2 Insert End +*/ \ No newline at end of file diff --git a/code/cgame/cg_turret (2).c b/code/cgame/cg_turret (2).c new file mode 100644 index 0000000..7db6db2 --- /dev/null +++ b/code/cgame/cg_turret (2).c @@ -0,0 +1,258 @@ +#include "cg_local.h" +#include "..\game\q_shared.h" +#include "..\ghoul2\g2.h" + +//rww - The turret is heavily dependant on bone angles. We can't happily set that on the server, so it is done client-only. + +void CreepToPosition(vec3_t ideal, vec3_t current) +{ + float max_degree_switch = 90; + int degrees_negative = 0; + int degrees_positive = 0; + int doNegative = 0; + + int angle_ideal; + int angle_current; + + angle_ideal = (int)ideal[YAW]; + angle_current = (int)current[YAW]; + + if (angle_ideal <= angle_current) + { + degrees_negative = (angle_current - angle_ideal); + + degrees_positive = (360 - angle_current) + angle_ideal; + } + else + { + degrees_negative = angle_current + (360 - angle_ideal); + + degrees_positive = (angle_ideal - angle_current); + } + + if (degrees_negative < degrees_positive) + { + doNegative = 1; + } + + if (doNegative) + { + current[YAW] -= max_degree_switch; + + if (current[YAW] < ideal[YAW] && (current[YAW]+(max_degree_switch*2)) >= ideal[YAW]) + { + current[YAW] = ideal[YAW]; + } + + if (current[YAW] < 0) + { + current[YAW] += 361; + } + } + else + { + current[YAW] += max_degree_switch; + + if (current[YAW] > ideal[YAW] && (current[YAW]-(max_degree_switch*2)) <= ideal[YAW]) + { + current[YAW] = ideal[YAW]; + } + + if (current[YAW] > 360) + { + current[YAW] -= 361; + } + } + + if (ideal[PITCH] < 0) + { + ideal[PITCH] += 360; + } + + angle_ideal = (int)ideal[PITCH]; + angle_current = (int)current[PITCH]; + + doNegative = 0; + + if (angle_ideal <= angle_current) + { + degrees_negative = (angle_current - angle_ideal); + + degrees_positive = (360 - angle_current) + angle_ideal; + } + else + { + degrees_negative = angle_current + (360 - angle_ideal); + + degrees_positive = (angle_ideal - angle_current); + } + + if (degrees_negative < degrees_positive) + { + doNegative = 1; + } + + if (doNegative) + { + current[PITCH] -= max_degree_switch; + + if (current[PITCH] < ideal[PITCH] && (current[PITCH]+(max_degree_switch*2)) >= ideal[PITCH]) + { + current[PITCH] = ideal[PITCH]; + } + + if (current[PITCH] < 0) + { + current[PITCH] += 361; + } + } + else + { + current[PITCH] += max_degree_switch; + + if (current[PITCH] > ideal[PITCH] && (current[PITCH]-(max_degree_switch*2)) <= ideal[PITCH]) + { + current[PITCH] = ideal[PITCH]; + } + + if (current[PITCH] > 360) + { + current[PITCH] -= 361; + } + } +} + +void TurretClientRun(centity_t *ent) +{ + if (!ent->ghoul2) + { + weaponInfo_t *weaponInfo; + + trap_G2API_InitGhoul2Model(&ent->ghoul2, CG_ConfigString( CS_MODELS+ent->currentState.modelindex ), 0, 0, 0, 0, 0); + + if (!ent->ghoul2) + { //bad + return; + } + + ent->torsoBolt = trap_G2API_AddBolt( ent->ghoul2, 0, "*flash02" ); + + trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); + trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_gback", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); + trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_barrel", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); + + trap_G2API_SetBoneAnim( ent->ghoul2, 0, "model_root", 0, 11, BONE_ANIM_OVERRIDE_FREEZE, 0.8f, cg.time, 0, 0 ); + + ent->turAngles[ROLL] = 0; + ent->turAngles[PITCH] = 90; + ent->turAngles[YAW] = 0; + + weaponInfo = &cg_weapons[WP_TURRET]; + + if ( !weaponInfo->registered ) + { + memset( weaponInfo, 0, sizeof( *weaponInfo ) ); + + weaponInfo->flashSound[0] = NULL_SOUND; + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = NULL_HANDLE; + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_TurretProjectileThink; + + cgs.effects.turretShotEffect = trap_FX_RegisterEffect( "turret/shot" ); + trap_FX_RegisterEffect("effects/blaster/wall_impact.efx"); + trap_FX_RegisterEffect("effects/blaster/flesh_impact.efx"); + + weaponInfo->registered = qtrue; + } + } + + if (ent->currentState.fireflag == 2) + { //I'm about to blow + if (ent->turAngles) + { + trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", ent->turAngles, BONE_ANGLES_REPLACE, NEGATIVE_Y, NEGATIVE_Z, NEGATIVE_X, NULL, 100, cg.time ); + } + return; + } + else if (ent->currentState.fireflag && ent->bolt4 != ent->currentState.fireflag) + { + vec3_t muzzleOrg, muzzleDir; + mdxaBone_t boltMatrix; + + trap_G2API_GetBoltMatrix(ent->ghoul2, 0, ent->torsoBolt, &boltMatrix, /*ent->lerpAngles*/vec3_origin, ent->lerpOrigin, cg.time, cgs.gameModels, ent->modelScale); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, muzzleOrg); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_X, muzzleDir); + + trap_FX_PlayEffectID(trap_FX_RegisterEffect("effects/turret/muzzle_flash.efx"), muzzleOrg, muzzleDir); + + ent->bolt4 = ent->currentState.fireflag; + } + else if (!ent->currentState.fireflag) + { + ent->bolt4 = 0; + } + + if (ent->currentState.bolt2 != ENTITYNUM_NONE) + { //turn toward the enemy + centity_t *enemy = &cg_entities[ent->currentState.bolt2]; + + if (enemy) + { + vec3_t enAng; + vec3_t enPos; + + VectorCopy(enemy->currentState.pos.trBase, enPos); + + VectorSubtract(enPos, ent->lerpOrigin, enAng); + VectorNormalize(enAng); + vectoangles(enAng, enAng); + enAng[ROLL] = 0; + enAng[PITCH] += 90; + + CreepToPosition(enAng, ent->turAngles); + } + } + else + { + vec3_t idleAng; + float turnAmount; + + if (ent->turAngles[YAW] > 360) + { + ent->turAngles[YAW] -= 361; + } + + if (!ent->dustTrailTime) + { + ent->dustTrailTime = cg.time; + } + + turnAmount = (cg.time-ent->dustTrailTime)*0.03; + + if (turnAmount > 360) + { + turnAmount = 360; + } + + idleAng[PITCH] = 90; + idleAng[ROLL] = 0; + idleAng[YAW] = ent->turAngles[YAW] + turnAmount; + ent->dustTrailTime = cg.time; + + CreepToPosition(idleAng, ent->turAngles); + } + + if (cg.time < ent->frame_minus1_refreshed) + { + ent->frame_minus1_refreshed = cg.time; + return; + } + + ent->frame_minus1_refreshed = cg.time; + trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", ent->turAngles, BONE_ANGLES_REPLACE, NEGATIVE_Y, NEGATIVE_Z, NEGATIVE_X, NULL, 100, cg.time ); +} diff --git a/code/cgame/cg_turret.c b/code/cgame/cg_turret.c new file mode 100644 index 0000000..7db6db2 --- /dev/null +++ b/code/cgame/cg_turret.c @@ -0,0 +1,258 @@ +#include "cg_local.h" +#include "..\game\q_shared.h" +#include "..\ghoul2\g2.h" + +//rww - The turret is heavily dependant on bone angles. We can't happily set that on the server, so it is done client-only. + +void CreepToPosition(vec3_t ideal, vec3_t current) +{ + float max_degree_switch = 90; + int degrees_negative = 0; + int degrees_positive = 0; + int doNegative = 0; + + int angle_ideal; + int angle_current; + + angle_ideal = (int)ideal[YAW]; + angle_current = (int)current[YAW]; + + if (angle_ideal <= angle_current) + { + degrees_negative = (angle_current - angle_ideal); + + degrees_positive = (360 - angle_current) + angle_ideal; + } + else + { + degrees_negative = angle_current + (360 - angle_ideal); + + degrees_positive = (angle_ideal - angle_current); + } + + if (degrees_negative < degrees_positive) + { + doNegative = 1; + } + + if (doNegative) + { + current[YAW] -= max_degree_switch; + + if (current[YAW] < ideal[YAW] && (current[YAW]+(max_degree_switch*2)) >= ideal[YAW]) + { + current[YAW] = ideal[YAW]; + } + + if (current[YAW] < 0) + { + current[YAW] += 361; + } + } + else + { + current[YAW] += max_degree_switch; + + if (current[YAW] > ideal[YAW] && (current[YAW]-(max_degree_switch*2)) <= ideal[YAW]) + { + current[YAW] = ideal[YAW]; + } + + if (current[YAW] > 360) + { + current[YAW] -= 361; + } + } + + if (ideal[PITCH] < 0) + { + ideal[PITCH] += 360; + } + + angle_ideal = (int)ideal[PITCH]; + angle_current = (int)current[PITCH]; + + doNegative = 0; + + if (angle_ideal <= angle_current) + { + degrees_negative = (angle_current - angle_ideal); + + degrees_positive = (360 - angle_current) + angle_ideal; + } + else + { + degrees_negative = angle_current + (360 - angle_ideal); + + degrees_positive = (angle_ideal - angle_current); + } + + if (degrees_negative < degrees_positive) + { + doNegative = 1; + } + + if (doNegative) + { + current[PITCH] -= max_degree_switch; + + if (current[PITCH] < ideal[PITCH] && (current[PITCH]+(max_degree_switch*2)) >= ideal[PITCH]) + { + current[PITCH] = ideal[PITCH]; + } + + if (current[PITCH] < 0) + { + current[PITCH] += 361; + } + } + else + { + current[PITCH] += max_degree_switch; + + if (current[PITCH] > ideal[PITCH] && (current[PITCH]-(max_degree_switch*2)) <= ideal[PITCH]) + { + current[PITCH] = ideal[PITCH]; + } + + if (current[PITCH] > 360) + { + current[PITCH] -= 361; + } + } +} + +void TurretClientRun(centity_t *ent) +{ + if (!ent->ghoul2) + { + weaponInfo_t *weaponInfo; + + trap_G2API_InitGhoul2Model(&ent->ghoul2, CG_ConfigString( CS_MODELS+ent->currentState.modelindex ), 0, 0, 0, 0, 0); + + if (!ent->ghoul2) + { //bad + return; + } + + ent->torsoBolt = trap_G2API_AddBolt( ent->ghoul2, 0, "*flash02" ); + + trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); + trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_gback", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); + trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_barrel", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); + + trap_G2API_SetBoneAnim( ent->ghoul2, 0, "model_root", 0, 11, BONE_ANIM_OVERRIDE_FREEZE, 0.8f, cg.time, 0, 0 ); + + ent->turAngles[ROLL] = 0; + ent->turAngles[PITCH] = 90; + ent->turAngles[YAW] = 0; + + weaponInfo = &cg_weapons[WP_TURRET]; + + if ( !weaponInfo->registered ) + { + memset( weaponInfo, 0, sizeof( *weaponInfo ) ); + + weaponInfo->flashSound[0] = NULL_SOUND; + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = NULL_HANDLE; + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_TurretProjectileThink; + + cgs.effects.turretShotEffect = trap_FX_RegisterEffect( "turret/shot" ); + trap_FX_RegisterEffect("effects/blaster/wall_impact.efx"); + trap_FX_RegisterEffect("effects/blaster/flesh_impact.efx"); + + weaponInfo->registered = qtrue; + } + } + + if (ent->currentState.fireflag == 2) + { //I'm about to blow + if (ent->turAngles) + { + trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", ent->turAngles, BONE_ANGLES_REPLACE, NEGATIVE_Y, NEGATIVE_Z, NEGATIVE_X, NULL, 100, cg.time ); + } + return; + } + else if (ent->currentState.fireflag && ent->bolt4 != ent->currentState.fireflag) + { + vec3_t muzzleOrg, muzzleDir; + mdxaBone_t boltMatrix; + + trap_G2API_GetBoltMatrix(ent->ghoul2, 0, ent->torsoBolt, &boltMatrix, /*ent->lerpAngles*/vec3_origin, ent->lerpOrigin, cg.time, cgs.gameModels, ent->modelScale); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, muzzleOrg); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_X, muzzleDir); + + trap_FX_PlayEffectID(trap_FX_RegisterEffect("effects/turret/muzzle_flash.efx"), muzzleOrg, muzzleDir); + + ent->bolt4 = ent->currentState.fireflag; + } + else if (!ent->currentState.fireflag) + { + ent->bolt4 = 0; + } + + if (ent->currentState.bolt2 != ENTITYNUM_NONE) + { //turn toward the enemy + centity_t *enemy = &cg_entities[ent->currentState.bolt2]; + + if (enemy) + { + vec3_t enAng; + vec3_t enPos; + + VectorCopy(enemy->currentState.pos.trBase, enPos); + + VectorSubtract(enPos, ent->lerpOrigin, enAng); + VectorNormalize(enAng); + vectoangles(enAng, enAng); + enAng[ROLL] = 0; + enAng[PITCH] += 90; + + CreepToPosition(enAng, ent->turAngles); + } + } + else + { + vec3_t idleAng; + float turnAmount; + + if (ent->turAngles[YAW] > 360) + { + ent->turAngles[YAW] -= 361; + } + + if (!ent->dustTrailTime) + { + ent->dustTrailTime = cg.time; + } + + turnAmount = (cg.time-ent->dustTrailTime)*0.03; + + if (turnAmount > 360) + { + turnAmount = 360; + } + + idleAng[PITCH] = 90; + idleAng[ROLL] = 0; + idleAng[YAW] = ent->turAngles[YAW] + turnAmount; + ent->dustTrailTime = cg.time; + + CreepToPosition(idleAng, ent->turAngles); + } + + if (cg.time < ent->frame_minus1_refreshed) + { + ent->frame_minus1_refreshed = cg.time; + return; + } + + ent->frame_minus1_refreshed = cg.time; + trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", ent->turAngles, BONE_ANGLES_REPLACE, NEGATIVE_Y, NEGATIVE_Z, NEGATIVE_X, NULL, 100, cg.time ); +} diff --git a/code/cgame/cg_view (2).c b/code/cgame/cg_view (2).c new file mode 100644 index 0000000..d523e39 --- /dev/null +++ b/code/cgame/cg_view (2).c @@ -0,0 +1,1666 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_view.c -- setup all the parameters (position, angle, etc) +// for a 3D rendering +#include "cg_local.h" + +#if !defined(CL_LIGHT_H_INC) + #include "cg_lights.h" +#endif + +#define MASK_CAMERACLIP (MASK_SOLID|CONTENTS_PLAYERCLIP) +#define CAMERA_SIZE 4 + + +/* +============================================================================= + + MODEL TESTING + +The viewthing and gun positioning tools from Q2 have been integrated and +enhanced into a single model testing facility. + +Model viewing can begin with either "testmodel " or "testgun ". + +The names must be the full pathname after the basedir, like +"models/weapons/v_launch/tris.md3" or "players/male/tris.md3" + +Testmodel will create a fake entity 100 units in front of the current view +position, directly facing the viewer. It will remain immobile, so you can +move around it to view it from different angles. + +Testgun will cause the model to follow the player around and supress the real +view weapon model. The default frame 0 of most guns is completely off screen, +so you will probably have to cycle a couple frames to see it. + +"nextframe", "prevframe", "nextskin", and "prevskin" commands will change the +frame or skin of the testmodel. These are bound to F5, F6, F7, and F8 in +q3default.cfg. + +If a gun is being tested, the "gun_x", "gun_y", and "gun_z" variables will let +you adjust the positioning. + +Note that none of the model testing features update while the game is paused, so +it may be convenient to test with deathmatch set to 1 so that bringing down the +console doesn't pause the game. + +============================================================================= +*/ + +/* +================= +CG_TestModel_f + +Creates an entity in front of the current position, which +can then be moved around +================= +*/ +void CG_TestModel_f (void) { + vec3_t angles; + + memset( &cg.testModelEntity, 0, sizeof(cg.testModelEntity) ); + if ( trap_Argc() < 2 ) { + return; + } + + Q_strncpyz (cg.testModelName, CG_Argv( 1 ), MAX_QPATH ); + cg.testModelEntity.hModel = trap_R_RegisterModel( cg.testModelName ); + + if ( trap_Argc() == 3 ) { + cg.testModelEntity.backlerp = atof( CG_Argv( 2 ) ); + cg.testModelEntity.frame = 1; + cg.testModelEntity.oldframe = 0; + } + if (! cg.testModelEntity.hModel ) { + CG_Printf( "Can't register model\n" ); + return; + } + + VectorMA( cg.refdef.vieworg, 100, cg.refdef.viewaxis[0], cg.testModelEntity.origin ); + + angles[PITCH] = 0; + angles[YAW] = 180 + cg.refdefViewAngles[1]; + angles[ROLL] = 0; + + AnglesToAxis( angles, cg.testModelEntity.axis ); + cg.testGun = qfalse; +} + +/* +================= +CG_TestGun_f + +Replaces the current view weapon with the given model +================= +*/ +void CG_TestGun_f (void) { + CG_TestModel_f(); + cg.testGun = qtrue; + //cg.testModelEntity.renderfx = RF_MINLIGHT | RF_DEPTHHACK | RF_FIRST_PERSON; + + // rww - 9-13-01 [1-26-01-sof2] + cg.testModelEntity.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON; +} + + +void CG_TestModelNextFrame_f (void) { + cg.testModelEntity.frame++; + CG_Printf( "frame %i\n", cg.testModelEntity.frame ); +} + +void CG_TestModelPrevFrame_f (void) { + cg.testModelEntity.frame--; + if ( cg.testModelEntity.frame < 0 ) { + cg.testModelEntity.frame = 0; + } + CG_Printf( "frame %i\n", cg.testModelEntity.frame ); +} + +void CG_TestModelNextSkin_f (void) { + cg.testModelEntity.skinNum++; + CG_Printf( "skin %i\n", cg.testModelEntity.skinNum ); +} + +void CG_TestModelPrevSkin_f (void) { + cg.testModelEntity.skinNum--; + if ( cg.testModelEntity.skinNum < 0 ) { + cg.testModelEntity.skinNum = 0; + } + CG_Printf( "skin %i\n", cg.testModelEntity.skinNum ); +} + +static void CG_AddTestModel (void) { + int i; + + // re-register the model, because the level may have changed + cg.testModelEntity.hModel = trap_R_RegisterModel( cg.testModelName ); + if (! cg.testModelEntity.hModel ) { + CG_Printf ("Can't register model\n"); + return; + } + + // if testing a gun, set the origin reletive to the view origin + if ( cg.testGun ) { + VectorCopy( cg.refdef.vieworg, cg.testModelEntity.origin ); + VectorCopy( cg.refdef.viewaxis[0], cg.testModelEntity.axis[0] ); + VectorCopy( cg.refdef.viewaxis[1], cg.testModelEntity.axis[1] ); + VectorCopy( cg.refdef.viewaxis[2], cg.testModelEntity.axis[2] ); + + // allow the position to be adjusted + for (i=0 ; i<3 ; i++) { + cg.testModelEntity.origin[i] += cg.refdef.viewaxis[0][i] * cg_gun_x.value; + cg.testModelEntity.origin[i] += cg.refdef.viewaxis[1][i] * cg_gun_y.value; + cg.testModelEntity.origin[i] += cg.refdef.viewaxis[2][i] * cg_gun_z.value; + } + } + + trap_R_AddRefEntityToScene( &cg.testModelEntity ); +} + + + +//============================================================================ + + +/* +================= +CG_CalcVrect + +Sets the coordinates of the rendered window +================= +*/ +static void CG_CalcVrect (void) { + int size; + + // the intermission should allways be full screen + if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { + size = 100; + } else { + // bound normal viewsize + if (cg_viewsize.integer < 30) { + trap_Cvar_Set ("cg_viewsize","30"); + size = 30; + } else if (cg_viewsize.integer > 100) { + trap_Cvar_Set ("cg_viewsize","100"); + size = 100; + } else { + size = cg_viewsize.integer; + } + + } + cg.refdef.width = cgs.glconfig.vidWidth*size/100; + cg.refdef.width &= ~1; + + cg.refdef.height = cgs.glconfig.vidHeight*size/100; + cg.refdef.height &= ~1; + + cg.refdef.x = (cgs.glconfig.vidWidth - cg.refdef.width)/2; + cg.refdef.y = (cgs.glconfig.vidHeight - cg.refdef.height)/2; +} + +//============================================================================== + +//============================================================================== +//============================================================================== +// this causes a compiler bug on mac MrC compiler +static void CG_StepOffset( void ) { + int timeDelta; + + // smooth out stair climbing + timeDelta = cg.time - cg.stepTime; + if ( timeDelta < STEP_TIME ) { + cg.refdef.vieworg[2] -= cg.stepChange + * (STEP_TIME - timeDelta) / STEP_TIME; + } +} + +#define CAMERA_DAMP_INTERVAL 50 + +static vec3_t cameramins = { -CAMERA_SIZE, -CAMERA_SIZE, -CAMERA_SIZE }; +static vec3_t cameramaxs = { CAMERA_SIZE, CAMERA_SIZE, CAMERA_SIZE }; +vec3_t camerafwd, cameraup; + +vec3_t cameraFocusAngles, cameraFocusLoc; +vec3_t cameraIdealTarget, cameraIdealLoc; +vec3_t cameraCurTarget={0,0,0}, cameraCurLoc={0,0,0}; +vec3_t cameraOldLoc={0,0,0}, cameraNewLoc={0,0,0}; +int cameraLastFrame=0; + +float cameraLastYaw=0; +float cameraStiffFactor=0.0f; + +/* +=============== +Notes on the camera viewpoint in and out... + +cg.refdef.vieworg +--at the start of the function holds the player actor's origin (center of player model). +--it is set to the final view location of the camera at the end of the camera code. +cg.refdefViewAngles +--at the start holds the client's view angles +--it is set to the final view angle of the camera at the end of the camera code. + +=============== +*/ + +extern qboolean gCGHasFallVector; +extern vec3_t gCGFallVector; + +/* +=============== +CG_CalcTargetThirdPersonViewLocation + +=============== +*/ +static void CG_CalcIdealThirdPersonViewTarget(void) +{ + float thirdPersonVertOffset = cg_thirdPersonVertOffset.value; + + if (cg.snap && cg.snap->ps.usingATST) + { + thirdPersonVertOffset = 200; + } + + // Initialize IdealTarget + if (gCGHasFallVector) + { + VectorCopy(gCGFallVector, cameraFocusLoc); + } + else + { + VectorCopy(cg.refdef.vieworg, cameraFocusLoc); + } + + // Add in the new viewheight + cameraFocusLoc[2] += cg.snap->ps.viewheight; + + // Add in a vertical offset from the viewpoint, which puts the actual target above the head, regardless of angle. +// VectorMA(cameraFocusLoc, thirdPersonVertOffset, cameraup, cameraIdealTarget); + + // Add in a vertical offset from the viewpoint, which puts the actual target above the head, regardless of angle. + VectorCopy( cameraFocusLoc, cameraIdealTarget ); + cameraIdealTarget[2] += cg_thirdPersonVertOffset.value; + //VectorMA(cameraFocusLoc, cg_thirdPersonVertOffset.value, cameraup, cameraIdealTarget); +} + + + +/* +=============== +CG_CalcTargetThirdPersonViewLocation + +=============== +*/ +static void CG_CalcIdealThirdPersonViewLocation(void) +{ + float thirdPersonRange = cg_thirdPersonRange.value; + + if (cg.snap && cg.snap->ps.usingATST) + { + thirdPersonRange = 300; + } + + VectorMA(cameraIdealTarget, -(thirdPersonRange), camerafwd, cameraIdealLoc); +} + + + +static void CG_ResetThirdPersonViewDamp(void) +{ + trace_t trace; + + // Cap the pitch within reasonable limits + if (cameraFocusAngles[PITCH] > 89.0) + { + cameraFocusAngles[PITCH] = 89.0; + } + else if (cameraFocusAngles[PITCH] < -89.0) + { + cameraFocusAngles[PITCH] = -89.0; + } + + AngleVectors(cameraFocusAngles, camerafwd, NULL, cameraup); + + // Set the cameraIdealTarget + CG_CalcIdealThirdPersonViewTarget(); + + // Set the cameraIdealLoc + CG_CalcIdealThirdPersonViewLocation(); + + // Now, we just set everything to the new positions. + VectorCopy(cameraIdealLoc, cameraCurLoc); + VectorCopy(cameraIdealTarget, cameraCurTarget); + + // First thing we do is trace from the first person viewpoint out to the new target location. + CG_Trace(&trace, cameraFocusLoc, cameramins, cameramaxs, cameraCurTarget, cg.snap->ps.clientNum, MASK_CAMERACLIP); + if (trace.fraction <= 1.0) + { + VectorCopy(trace.endpos, cameraCurTarget); + } + + // Now we trace from the new target location to the new view location, to make sure there is nothing in the way. + CG_Trace(&trace, cameraCurTarget, cameramins, cameramaxs, cameraCurLoc, cg.snap->ps.clientNum, MASK_CAMERACLIP); + if (trace.fraction <= 1.0) + { + VectorCopy(trace.endpos, cameraCurLoc); + } + + cameraLastFrame = cg.time; + cameraLastYaw = cameraFocusAngles[YAW]; + cameraStiffFactor = 0.0f; +} + +// This is called every frame. +static void CG_UpdateThirdPersonTargetDamp(void) +{ + trace_t trace; + vec3_t targetdiff; + float dampfactor, dtime, ratio; + + // Set the cameraIdealTarget + // Automatically get the ideal target, to avoid jittering. + CG_CalcIdealThirdPersonViewTarget(); + + if (cg_thirdPersonTargetDamp.value>=1.0) + { // No damping. + VectorCopy(cameraIdealTarget, cameraCurTarget); + } + else if (cg_thirdPersonTargetDamp.value>=0.0) + { + // Calculate the difference from the current position to the new one. + VectorSubtract(cameraIdealTarget, cameraCurTarget, targetdiff); + + // Now we calculate how much of the difference we cover in the time allotted. + // The equation is (Damp)^(time) + dampfactor = 1.0-cg_thirdPersonTargetDamp.value; // We must exponent the amount LEFT rather than the amount bled off + dtime = (float)(cg.time-cameraLastFrame) * (1.0/(float)CAMERA_DAMP_INTERVAL); // Our dampfactor is geared towards a time interval equal to "1". + + // Note that since there are a finite number of "practical" delta millisecond values possible, + // the ratio should be initialized into a chart ultimately. + ratio = powf(dampfactor, dtime); + + // This value is how much distance is "left" from the ideal. + VectorMA(cameraIdealTarget, -ratio, targetdiff, cameraCurTarget); + ///////////////////////////////////////////////////////////////////////////////////////////////////////// + } + + // Now we trace to see if the new location is cool or not. + + // First thing we do is trace from the first person viewpoint out to the new target location. + CG_Trace(&trace, cameraFocusLoc, cameramins, cameramaxs, cameraCurTarget, cg.snap->ps.clientNum, MASK_CAMERACLIP); + if (trace.fraction < 1.0) + { + VectorCopy(trace.endpos, cameraCurTarget); + } + + // Note that previously there was an upper limit to the number of physics traces that are done through the world + // for the sake of camera collision, since it wasn't calced per frame. Now it is calculated every frame. + // This has the benefit that the camera is a lot smoother now (before it lerped between tested points), + // however two full volume traces each frame is a bit scary to think about. +} + +// This can be called every interval, at the user's discretion. +static void CG_UpdateThirdPersonCameraDamp(void) +{ + trace_t trace; + vec3_t locdiff; + float dampfactor, dtime, ratio; + + // Set the cameraIdealLoc + CG_CalcIdealThirdPersonViewLocation(); + + + // First thing we do is calculate the appropriate damping factor for the camera. + dampfactor=0.0; + if (cg_thirdPersonCameraDamp.value != 0.0) + { + double pitch; + + // Note that the camera pitch has already been capped off to 89. + pitch = Q_fabs(cameraFocusAngles[PITCH]); + + // The higher the pitch, the larger the factor, so as you look up, it damps a lot less. + pitch /= 89.0; + dampfactor = (1.0-cg_thirdPersonCameraDamp.value)*(pitch*pitch); + + dampfactor += cg_thirdPersonCameraDamp.value; + + // Now we also multiply in the stiff factor, so that faster yaw changes are stiffer. + if (cameraStiffFactor > 0.0f) + { // The cameraStiffFactor is how much of the remaining damp below 1 should be shaved off, i.e. approach 1 as stiffening increases. + dampfactor += (1.0-dampfactor)*cameraStiffFactor; + } + } + + if (dampfactor>=1.0) + { // No damping. + VectorCopy(cameraIdealLoc, cameraCurLoc); + } + else if (dampfactor>=0.0) + { + // Calculate the difference from the current position to the new one. + VectorSubtract(cameraIdealLoc, cameraCurLoc, locdiff); + + // Now we calculate how much of the difference we cover in the time allotted. + // The equation is (Damp)^(time) + dampfactor = 1.0-dampfactor; // We must exponent the amount LEFT rather than the amount bled off + dtime = (float)(cg.time-cameraLastFrame) * (1.0/(float)CAMERA_DAMP_INTERVAL); // Our dampfactor is geared towards a time interval equal to "1". + + // Note that since there are a finite number of "practical" delta millisecond values possible, + // the ratio should be initialized into a chart ultimately. + ratio = powf(dampfactor, dtime); + + // This value is how much distance is "left" from the ideal. + VectorMA(cameraIdealLoc, -ratio, locdiff, cameraCurLoc); + ///////////////////////////////////////////////////////////////////////////////////////////////////////// + } + + // Now we trace from the new target location to the new view location, to make sure there is nothing in the way. + CG_Trace(&trace, cameraCurTarget, cameramins, cameramaxs, cameraCurLoc, cg.snap->ps.clientNum, MASK_CAMERACLIP); + + if (trace.fraction < 1.0) + { + VectorCopy( trace.endpos, cameraCurLoc ); + + //FIXME: when the trace hits movers, it gets very very jaggy... ? + /* + //this doesn't actually help any + if ( trace.entityNum != ENTITYNUM_WORLD ) + { + centity_t *cent = &cg_entities[trace.entityNum]; + gentity_t *gent = &g_entities[trace.entityNum]; + if ( cent != NULL && gent != NULL ) + { + if ( cent->currentState.pos.trType == TR_LINEAR || cent->currentState.pos.trType == TR_LINEAR_STOP ) + { + vec3_t diff; + VectorSubtract( cent->lerpOrigin, gent->currentOrigin, diff ); + VectorAdd( cameraCurLoc, diff, cameraCurLoc ); + } + } + } + */ + } + + // Note that previously there was an upper limit to the number of physics traces that are done through the world + // for the sake of camera collision, since it wasn't calced per frame. Now it is calculated every frame. + // This has the benefit that the camera is a lot smoother now (before it lerped between tested points), + // however two full volume traces each frame is a bit scary to think about. +} + + + + +/* +===============` +CG_OffsetThirdPersonView + +=============== +*/ +extern vmCvar_t cg_thirdPersonHorzOffset; +static void CG_OffsetThirdPersonView( void ) +{ + vec3_t diff; + float thirdPersonHorzOffset = cg_thirdPersonHorzOffset.value; + float deltayaw; + + cameraStiffFactor = 0.0; + + // Set camera viewing direction. + VectorCopy( cg.refdefViewAngles, cameraFocusAngles ); + + // if dead, look at killer + if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) + { + cameraFocusAngles[YAW] = cg.snap->ps.stats[STAT_DEAD_YAW]; + } + else + { // Add in the third Person Angle. + cameraFocusAngles[YAW] += cg_thirdPersonAngle.value; + cameraFocusAngles[PITCH] += cg_thirdPersonPitchOffset.value; + } + + // The next thing to do is to see if we need to calculate a new camera target location. + + // If we went back in time for some reason, or if we just started, reset the sample. + if (cameraLastFrame == 0 || cameraLastFrame > cg.time) + { + CG_ResetThirdPersonViewDamp(); + } + else + { + // Cap the pitch within reasonable limits + if (cameraFocusAngles[PITCH] > 80.0) + { + cameraFocusAngles[PITCH] = 80.0; + } + else if (cameraFocusAngles[PITCH] < -80.0) + { + cameraFocusAngles[PITCH] = -80.0; + } + + AngleVectors(cameraFocusAngles, camerafwd, NULL, cameraup); + + deltayaw = fabs(cameraFocusAngles[YAW] - cameraLastYaw); + if (deltayaw > 180.0f) + { // Normalize this angle so that it is between 0 and 180. + deltayaw = fabs(deltayaw - 360.0f); + } + cameraStiffFactor = deltayaw / (float)(cg.time-cameraLastFrame); + if (cameraStiffFactor < 1.0) + { + cameraStiffFactor = 0.0; + } + else if (cameraStiffFactor > 2.5) + { + cameraStiffFactor = 0.75; + } + else + { // 1 to 2 scales from 0.0 to 0.5 + cameraStiffFactor = (cameraStiffFactor-1.0f)*0.5f; + } + cameraLastYaw = cameraFocusAngles[YAW]; + + // Move the target to the new location. + CG_UpdateThirdPersonTargetDamp(); + CG_UpdateThirdPersonCameraDamp(); + } + + // Now interestingly, the Quake method is to calculate a target focus point above the player, and point the camera at it. + // We won't do that for now. + + // We must now take the angle taken from the camera target and location. + /*VectorSubtract(cameraCurTarget, cameraCurLoc, diff); + VectorNormalize(diff); + vectoangles(diff, cg.refdefViewAngles);*/ + VectorSubtract(cameraCurTarget, cameraCurLoc, diff); + { + float dist = VectorNormalize(diff); + //under normal circumstances, should never be 0.00000 and so on. + if ( !dist || (diff[0] == 0 || diff[1] == 0) ) + {//must be hitting something, need some value to calc angles, so use cam forward + VectorCopy( camerafwd, diff ); + } + } + vectoangles(diff, cg.refdefViewAngles); + + // Temp: just move the camera to the side a bit + if ( thirdPersonHorzOffset != 0.0f ) + { + AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); + VectorMA( cameraCurLoc, thirdPersonHorzOffset, cg.refdef.viewaxis[1], cameraCurLoc ); + } + + // ...and of course we should copy the new view location to the proper spot too. + VectorCopy(cameraCurLoc, cg.refdef.vieworg); + + cameraLastFrame=cg.time; +} + + + +/* +=============== +CG_OffsetThirdPersonView + +=============== +*//* +#define FOCUS_DISTANCE 512 +static void CG_OffsetThirdPersonView( void ) { + vec3_t forward, right, up; + vec3_t view; + vec3_t focusAngles; + trace_t trace; + static vec3_t mins = { -4, -4, -4 }; + static vec3_t maxs = { 4, 4, 4 }; + vec3_t focusPoint; + float focusDist; + float forwardScale, sideScale; + + cg.refdef.vieworg[2] += cg.predictedPlayerState.viewheight; + + VectorCopy( cg.refdefViewAngles, focusAngles ); + + // if dead, look at killer + if ( cg.predictedPlayerState.stats[STAT_HEALTH] <= 0 ) { + focusAngles[YAW] = cg.predictedPlayerState.stats[STAT_DEAD_YAW]; + cg.refdefViewAngles[YAW] = cg.predictedPlayerState.stats[STAT_DEAD_YAW]; + } + + if ( focusAngles[PITCH] > 45 ) { + focusAngles[PITCH] = 45; // don't go too far overhead + } + AngleVectors( focusAngles, forward, NULL, NULL ); + + VectorMA( cg.refdef.vieworg, FOCUS_DISTANCE, forward, focusPoint ); + + VectorCopy( cg.refdef.vieworg, view ); + + view[2] += 8; + + cg.refdefViewAngles[PITCH] *= 0.5; + + AngleVectors( cg.refdefViewAngles, forward, right, up ); + + forwardScale = cos( cg_thirdPersonAngle.value / 180 * M_PI ); + sideScale = sin( cg_thirdPersonAngle.value / 180 * M_PI ); + VectorMA( view, -cg_thirdPersonRange.value * forwardScale, forward, view ); + VectorMA( view, -cg_thirdPersonRange.value * sideScale, right, view ); + + // trace a ray from the origin to the viewpoint to make sure the view isn't + // in a solid block. Use an 8 by 8 block to prevent the view from near clipping anything + + if (!cg_cameraMode.integer) { + CG_Trace( &trace, cg.refdef.vieworg, mins, maxs, view, cg.predictedPlayerState.clientNum, MASK_CAMERACLIP); + + if ( trace.fraction != 1.0 ) { + VectorCopy( trace.endpos, view ); + view[2] += (1.0 - trace.fraction) * 32; + // try another trace to this position, because a tunnel may have the ceiling + // close enogh that this is poking out + + CG_Trace( &trace, cg.refdef.vieworg, mins, maxs, view, cg.predictedPlayerState.clientNum, MASK_CAMERACLIP); + VectorCopy( trace.endpos, view ); + } + } + + + VectorCopy( view, cg.refdef.vieworg ); + + // select pitch to look at focus point from vieword + VectorSubtract( focusPoint, cg.refdef.vieworg, focusPoint ); + focusDist = sqrt( focusPoint[0] * focusPoint[0] + focusPoint[1] * focusPoint[1] ); + if ( focusDist < 1 ) { + focusDist = 1; // should never happen + } + cg.refdefViewAngles[PITCH] = -180 / M_PI * atan2( focusPoint[2], focusDist ); + cg.refdefViewAngles[YAW] -= cg_thirdPersonAngle.value; +} + + +// this causes a compiler bug on mac MrC compiler +static void CG_StepOffset( void ) { + int timeDelta; + + // smooth out stair climbing + timeDelta = cg.time - cg.stepTime; + if ( timeDelta < STEP_TIME ) { + cg.refdef.vieworg[2] -= cg.stepChange + * (STEP_TIME - timeDelta) / STEP_TIME; + } +}*/ + +/* +=============== +CG_OffsetFirstPersonView + +=============== +*/ +static void CG_OffsetFirstPersonView( void ) { + float *origin; + float *angles; + float bob; + float ratio; + float delta; + float speed; + float f; + vec3_t predictedVelocity; + int timeDelta; + + if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { + return; + } + + origin = cg.refdef.vieworg; + angles = cg.refdefViewAngles; + + // if dead, fix the angle and don't add any kick + if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) { + angles[ROLL] = 40; + angles[PITCH] = -15; + angles[YAW] = cg.snap->ps.stats[STAT_DEAD_YAW]; + origin[2] += cg.predictedPlayerState.viewheight; + return; + } + + // add angles based on weapon kick + VectorAdd (angles, cg.kick_angles, angles); + + // add angles based on damage kick + if ( cg.damageTime ) { + ratio = cg.time - cg.damageTime; + if ( ratio < DAMAGE_DEFLECT_TIME ) { + ratio /= DAMAGE_DEFLECT_TIME; + angles[PITCH] += ratio * cg.v_dmg_pitch; + angles[ROLL] += ratio * cg.v_dmg_roll; + } else { + ratio = 1.0 - ( ratio - DAMAGE_DEFLECT_TIME ) / DAMAGE_RETURN_TIME; + if ( ratio > 0 ) { + angles[PITCH] += ratio * cg.v_dmg_pitch; + angles[ROLL] += ratio * cg.v_dmg_roll; + } + } + } + + // add pitch based on fall kick +#if 0 + ratio = ( cg.time - cg.landTime) / FALL_TIME; + if (ratio < 0) + ratio = 0; + angles[PITCH] += ratio * cg.fall_value; +#endif + + // add angles based on velocity + VectorCopy( cg.predictedPlayerState.velocity, predictedVelocity ); + + delta = DotProduct ( predictedVelocity, cg.refdef.viewaxis[0]); + angles[PITCH] += delta * cg_runpitch.value; + + delta = DotProduct ( predictedVelocity, cg.refdef.viewaxis[1]); + angles[ROLL] -= delta * cg_runroll.value; + + // add angles based on bob + + // make sure the bob is visible even at low speeds + speed = cg.xyspeed > 200 ? cg.xyspeed : 200; + + delta = cg.bobfracsin * cg_bobpitch.value * speed; + if (cg.predictedPlayerState.pm_flags & PMF_DUCKED) + delta *= 3; // crouching + angles[PITCH] += delta; + delta = cg.bobfracsin * cg_bobroll.value * speed; + if (cg.predictedPlayerState.pm_flags & PMF_DUCKED) + delta *= 3; // crouching accentuates roll + if (cg.bobcycle & 1) + delta = -delta; + angles[ROLL] += delta; + +//=================================== + + // add view height + origin[2] += cg.predictedPlayerState.viewheight; + + // smooth out duck height changes + timeDelta = cg.time - cg.duckTime; + if ( timeDelta < DUCK_TIME) { + cg.refdef.vieworg[2] -= cg.duckChange + * (DUCK_TIME - timeDelta) / DUCK_TIME; + } + + // add bob height + bob = cg.bobfracsin * cg.xyspeed * cg_bobup.value; + if (bob > 6) { + bob = 6; + } + + origin[2] += bob; + + + // add fall height + delta = cg.time - cg.landTime; + if ( delta < LAND_DEFLECT_TIME ) { + f = delta / LAND_DEFLECT_TIME; + cg.refdef.vieworg[2] += cg.landChange * f; + } else if ( delta < LAND_DEFLECT_TIME + LAND_RETURN_TIME ) { + delta -= LAND_DEFLECT_TIME; + f = 1.0 - ( delta / LAND_RETURN_TIME ); + cg.refdef.vieworg[2] += cg.landChange * f; + } + + // add step offset + CG_StepOffset(); + + // add kick offset + + VectorAdd (origin, cg.kick_origin, origin); + + // pivot the eye based on a neck length +#if 0 + { +#define NECK_LENGTH 8 + vec3_t forward, up; + + cg.refdef.vieworg[2] -= NECK_LENGTH; + AngleVectors( cg.refdefViewAngles, forward, NULL, up ); + VectorMA( cg.refdef.vieworg, 3, forward, cg.refdef.vieworg ); + VectorMA( cg.refdef.vieworg, NECK_LENGTH, up, cg.refdef.vieworg ); + } +#endif +} + +//====================================================================== + +void CG_ZoomDown_f( void ) { + if ( cg.zoomed ) { + return; + } + cg.zoomed = qtrue; + cg.zoomTime = cg.time; +} + +void CG_ZoomUp_f( void ) { + if ( !cg.zoomed ) { + return; + } + cg.zoomed = qfalse; + cg.zoomTime = cg.time; +} + + + +/* +==================== +CG_CalcFovFromX + +Calcs Y FOV from given X FOV +==================== +*/ +#define WAVE_AMPLITUDE 1 +#define WAVE_FREQUENCY 0.4 + +qboolean CG_CalcFOVFromX( float fov_x ) +{ + float x; +// float phase; +// float v; +// int contents; + float fov_y; + qboolean inwater; + + x = cg.refdef.width / tan( fov_x / 360 * M_PI ); + fov_y = atan2( cg.refdef.height, x ); + fov_y = fov_y * 360 / M_PI; + + // there's a problem with this, it only takes the leafbrushes into account, not the entity brushes, + // so if you give slime/water etc properties to a func_door area brush in order to move the whole water + // level up/down this doesn't take into account the door position, so warps the view the whole time + // whether the water is up or not. Fortunately there's only one slime area in Trek that you can be under, + // so lose it... +#if 0 +/* + // warp if underwater + contents = CG_PointContents( cg.refdef.vieworg, -1 ); + if ( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ){ + phase = cg.time / 1000.0 * WAVE_FREQUENCY * M_PI * 2; + v = WAVE_AMPLITUDE * sin( phase ); + fov_x += v; + fov_y -= v; + inwater = qtrue; + } + else { + inwater = qfalse; + } +*/ +#else + inwater = qfalse; +#endif + + + // set it + cg.refdef.fov_x = fov_x; + cg.refdef.fov_y = fov_y; + + return (inwater); +} + +/* +==================== +CG_CalcFov + +Fixed fov at intermissions, otherwise account for fov variable and zooms. +==================== +*/ +#define WAVE_AMPLITUDE 1 +#define WAVE_FREQUENCY 0.4 +float zoomFov; //this has to be global client-side + +static int CG_CalcFov( void ) { + float x; + float phase; + float v; + int contents; + float fov_x, fov_y; + float f; + int inwater; + float cgFov = cg_fov.value; + + if (cgFov < 1) + { + cgFov = 1; + } + if (cgFov > 97) + { + cgFov = 97; + } + + if ( cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { + // if in intermission, use a fixed value + fov_x = 80;//90; + } else { + // user selectable + if ( cgs.dmflags & DF_FIXED_FOV ) { + // dmflag to prevent wide fov for all clients + fov_x = 80;//90; + } else { + fov_x = cgFov; + if ( fov_x < 1 ) { + fov_x = 1; + } else if ( fov_x > 160 ) { + fov_x = 160; + } + } + + if (cg.predictedPlayerState.zoomMode == 2) + { //binoculars + if (zoomFov > 40.0f) + { + zoomFov -= cg.frametime * 0.075f; + + if (zoomFov < 40.0f) + { + zoomFov = 40.0f; + } + else if (zoomFov > cgFov) + { + zoomFov = cgFov; + } + } + + fov_x = zoomFov; + } + else if (cg.predictedPlayerState.zoomMode) + { + if (!cg.predictedPlayerState.zoomLocked) + { + if (zoomFov > 50) + { //Now starting out at nearly half zoomed in + zoomFov = 50; + } + zoomFov -= cg.frametime * 0.035f;//0.075f; + + if (zoomFov < MAX_ZOOM_FOV) + { + zoomFov = MAX_ZOOM_FOV; + } + else if (zoomFov > cgFov) + { + zoomFov = cgFov; + } + else + { // Still zooming + static zoomSoundTime = 0; + + if (zoomSoundTime < cg.time || zoomSoundTime > cg.time + 10000) + { + trap_S_StartSound(cg.refdef.vieworg, ENTITYNUM_WORLD, CHAN_LOCAL, cgs.media.disruptorZoomLoop); + zoomSoundTime = cg.time + 300; + } + } + } + + fov_x = zoomFov; + } + else + { + zoomFov = 80; + + f = ( cg.time - cg.predictedPlayerState.zoomTime ) / ZOOM_OUT_TIME; + if ( f > 1.0 ) + { + fov_x = fov_x; + } + else + { + fov_x = cg.predictedPlayerState.zoomFov + f * ( fov_x - cg.predictedPlayerState.zoomFov ); + } + } + } + + x = cg.refdef.width / tan( fov_x / 360 * M_PI ); + fov_y = atan2( cg.refdef.height, x ); + fov_y = fov_y * 360 / M_PI; + + // warp if underwater + contents = CG_PointContents( cg.refdef.vieworg, -1 ); + if ( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ){ + phase = cg.time / 1000.0 * WAVE_FREQUENCY * M_PI * 2; + v = WAVE_AMPLITUDE * sin( phase ); + fov_x += v; + fov_y -= v; + inwater = qtrue; + } + else { + inwater = qfalse; + } + + + // set it + cg.refdef.fov_x = fov_x; + cg.refdef.fov_y = fov_y; + + if (cg.predictedPlayerState.zoomMode) + { + cg.zoomSensitivity = zoomFov/cgFov; + } + else if ( !cg.zoomed ) { + cg.zoomSensitivity = 1; + } else { + cg.zoomSensitivity = cg.refdef.fov_y / 75.0; + } + + return inwater; +} + + +/* +=============== +CG_DamageBlendBlob + +=============== +*/ +static void CG_DamageBlendBlob( void ) +{ + int t; + int maxTime; + refEntity_t ent; + + if ( !cg.damageValue ) { + return; + } + + maxTime = DAMAGE_TIME; + t = cg.time - cg.damageTime; + if ( t <= 0 || t >= maxTime ) { + return; + } + + memset( &ent, 0, sizeof( ent ) ); + ent.reType = RT_SPRITE; + ent.renderfx = RF_FIRST_PERSON; + + VectorMA( cg.refdef.vieworg, 8, cg.refdef.viewaxis[0], ent.origin ); + VectorMA( ent.origin, cg.damageX * -8, cg.refdef.viewaxis[1], ent.origin ); + VectorMA( ent.origin, cg.damageY * 8, cg.refdef.viewaxis[2], ent.origin ); + + ent.radius = cg.damageValue * 3 * ( 1.0 - ((float)t / maxTime) ); + + if (cg.snap->ps.damageType == 0) + { //pure health + ent.customShader = cgs.media.viewPainShader; + ent.shaderRGBA[0] = 180 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[1] = 50 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[2] = 50 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[3] = 255; + } + else if (cg.snap->ps.damageType == 1) + { //pure shields + ent.customShader = cgs.media.viewPainShader_Shields; + ent.shaderRGBA[0] = 50 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[1] = 180 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[2] = 50 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[3] = 255; + } + else + { //shields and health + ent.customShader = cgs.media.viewPainShader_ShieldsAndHealth; + ent.shaderRGBA[0] = 180 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[1] = 180 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[2] = 50 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[3] = 255; + } + trap_R_AddRefEntityToScene( &ent ); +} + +qboolean CheckOutOfConstrict(float curAng) +{ + float degrees_negative, degrees_positive; + + float angle_ideal = cg.constrictValue; + float angle_current = curAng; + + float angle_dif = 0; + + if (angle_current < 0) + { + angle_current += 360; + } + if (angle_current > 360) + { + angle_current -= 360; + } + + if (cg.doConstrict <= cg.time) + { + return qfalse; + } + + if (angle_ideal <= angle_current) + { + degrees_negative = (angle_current - angle_ideal); + + degrees_positive = (360 - angle_current) + angle_ideal; + } + else + { + degrees_negative = angle_current + (360 - angle_ideal); + + degrees_positive = (angle_ideal - angle_current); + } + + if (degrees_negative < degrees_positive) + { + angle_dif = degrees_negative; + } + else + { + angle_dif = degrees_positive; + } + + if (angle_dif > 60) + { + return qtrue; + } + + return qfalse; +} + +/* +=============== +CG_CalcViewValues + +Sets cg.refdef view values +=============== +*/ +static int CG_CalcViewValues( void ) { + playerState_t *ps; + + memset( &cg.refdef, 0, sizeof( cg.refdef ) ); + + // strings for in game rendering + // Q_strncpyz( cg.refdef.text[0], "Park Ranger", sizeof(cg.refdef.text[0]) ); + // Q_strncpyz( cg.refdef.text[1], "19", sizeof(cg.refdef.text[1]) ); + + // calculate size of 3D view + CG_CalcVrect(); + + ps = &cg.predictedPlayerState; +/* + if (cg.cameraMode) { + vec3_t origin, angles; + if (trap_getCameraInfo(cg.time, &origin, &angles)) { + VectorCopy(origin, cg.refdef.vieworg); + angles[ROLL] = 0; + VectorCopy(angles, cg.refdefViewAngles); + AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); + return CG_CalcFov(); + } else { + cg.cameraMode = qfalse; + } + } +*/ + // intermission view + if ( ps->pm_type == PM_INTERMISSION ) { + VectorCopy( ps->origin, cg.refdef.vieworg ); + VectorCopy( ps->viewangles, cg.refdefViewAngles ); + AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); + return CG_CalcFov(); + } + + cg.bobcycle = ( ps->bobCycle & 128 ) >> 7; + cg.bobfracsin = fabs( sin( ( ps->bobCycle & 127 ) / 127.0 * M_PI ) ); + cg.xyspeed = sqrt( ps->velocity[0] * ps->velocity[0] + + ps->velocity[1] * ps->velocity[1] ); + + if (cg.xyspeed > 270) + { + cg.xyspeed = 270; + } + + VectorCopy( ps->origin, cg.refdef.vieworg ); + VectorCopy( ps->viewangles, cg.refdefViewAngles ); + + if (cg_cameraOrbit.integer) { + if (cg.time > cg.nextOrbitTime) { + cg.nextOrbitTime = cg.time + cg_cameraOrbitDelay.integer; + cg_thirdPersonAngle.value += cg_cameraOrbit.value; + } + } + // add error decay + if ( cg_errorDecay.value > 0 ) { + int t; + float f; + + t = cg.time - cg.predictedErrorTime; + f = ( cg_errorDecay.value - t ) / cg_errorDecay.value; + if ( f > 0 && f < 1 ) { + VectorMA( cg.refdef.vieworg, f, cg.predictedError, cg.refdef.vieworg ); + } else { + cg.predictedErrorTime = 0; + } + } + + if ( cg.renderingThirdPerson && !cg.snap->ps.zoomMode) { + // back away from character + CG_OffsetThirdPersonView(); + } else { + // offset for local bobbing and kicks + CG_OffsetFirstPersonView(); + } + + // position eye reletive to origin + AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); + + if ( cg.hyperspace ) { + cg.refdef.rdflags |= RDF_NOWORLDMODEL | RDF_HYPERSPACE; + } + + // field of view + return CG_CalcFov(); +} + + +/* +===================== +CG_PowerupTimerSounds +===================== +*/ +static void CG_PowerupTimerSounds( void ) { + int i; + int t; + + // powerup timers going away + for ( i = 0 ; i < MAX_POWERUPS ; i++ ) { + t = cg.snap->ps.powerups[i]; + if ( t <= cg.time ) { + continue; + } + if ( t - cg.time >= POWERUP_BLINKS * POWERUP_BLINK_TIME ) { + continue; + } + if ( ( t - cg.time ) / POWERUP_BLINK_TIME != ( t - cg.oldTime ) / POWERUP_BLINK_TIME ) { + //trap_S_StartSound( NULL, cg.snap->ps.clientNum, CHAN_ITEM, cgs.media.wearOffSound ); + } + } +} + +/* +===================== +CG_AddBufferedSound +===================== +*/ +void CG_AddBufferedSound( sfxHandle_t sfx ) { + if ( !sfx ) + return; + cg.soundBuffer[cg.soundBufferIn] = sfx; + cg.soundBufferIn = (cg.soundBufferIn + 1) % MAX_SOUNDBUFFER; + if (cg.soundBufferIn == cg.soundBufferOut) { + cg.soundBufferOut++; + } +} + +/* +===================== +CG_PlayBufferedSounds +===================== +*/ +static void CG_PlayBufferedSounds( void ) { + if ( cg.soundTime < cg.time ) { + if (cg.soundBufferOut != cg.soundBufferIn && cg.soundBuffer[cg.soundBufferOut]) { + trap_S_StartLocalSound(cg.soundBuffer[cg.soundBufferOut], CHAN_ANNOUNCER); + cg.soundBuffer[cg.soundBufferOut] = 0; + cg.soundBufferOut = (cg.soundBufferOut + 1) % MAX_SOUNDBUFFER; + cg.soundTime = cg.time + 750; + } + } +} + +void CG_UpdateSoundTrackers() +{ + int num; + centity_t *cent; + + for ( num = 0 ; num < ENTITYNUM_NONE ; num++ ) + { + cent = &cg_entities[num]; + + if (cent && cent->currentState.eFlags & EF_SOUNDTRACKER) + { //keep sound for this entity updated in accordance with its attached entity at all times + if (cg.snap && cent->currentState.trickedentindex == cg.snap->ps.clientNum) + { //this is actually the player, so center the sound origin right on top of us + VectorCopy(cg.refdef.vieworg, cent->lerpOrigin); + trap_S_UpdateEntityPosition( cent->currentState.number, cent->lerpOrigin ); + } + else + { + trap_S_UpdateEntityPosition( cent->currentState.number, cg_entities[cent->currentState.trickedentindex].lerpOrigin ); + } + } + } +} + +//========================================================================= + +/* +================================ +Screen Effect stuff starts here +================================ +*/ +#define CAMERA_DEFAULT_FOV 90.0f +#define MAX_SHAKE_INTENSITY 16.0f + +cgscreffects_t cgScreenEffects; + +void CG_SE_UpdateShake( vec3_t origin, vec3_t angles ) +{ + vec3_t moveDir; + float intensity_scale, intensity; + int i; + + if ( cgScreenEffects.shake_duration <= 0 ) + return; + + if ( cg.time > ( cgScreenEffects.shake_start + cgScreenEffects.shake_duration ) ) + { + cgScreenEffects.shake_intensity = 0; + cgScreenEffects.shake_duration = 0; + cgScreenEffects.shake_start = 0; + return; + } + + cgScreenEffects.FOV = CAMERA_DEFAULT_FOV; + cgScreenEffects.FOV2 = CAMERA_DEFAULT_FOV; + + //intensity_scale now also takes into account FOV with 90.0 as normal + intensity_scale = 1.0f - ( (float) ( cg.time - cgScreenEffects.shake_start ) / (float) cgScreenEffects.shake_duration ) * (((cgScreenEffects.FOV+cgScreenEffects.FOV2)/2.0f)/90.0f); + + intensity = cgScreenEffects.shake_intensity * intensity_scale; + + for ( i = 0; i < 3; i++ ) + { + moveDir[i] = ( crandom() * intensity ); + } + + //Move the camera + VectorAdd( origin, moveDir, origin ); + + for ( i=0; i < 2; i++ ) // Don't do ROLL + moveDir[i] = ( crandom() * intensity ); + + //Move the angles + VectorAdd( angles, moveDir, angles ); +} + +void CG_SE_UpdateMusic(void) +{ + if (cgScreenEffects.music_volume_multiplier < 0.1) + { + cgScreenEffects.music_volume_multiplier = 1.0; + return; + } + + if (cgScreenEffects.music_volume_time < cg.time) + { + if (cgScreenEffects.music_volume_multiplier != 1.0 || cgScreenEffects.music_volume_set) + { + char musMultStr[512]; + + cgScreenEffects.music_volume_multiplier += 0.1; + if (cgScreenEffects.music_volume_multiplier > 1.0) + { + cgScreenEffects.music_volume_multiplier = 1.0; + } + + Com_sprintf(musMultStr, sizeof(musMultStr), "%f", cgScreenEffects.music_volume_multiplier); + trap_Cvar_Set("s_musicMult", musMultStr); + + if (cgScreenEffects.music_volume_multiplier == 1.0) + { + cgScreenEffects.music_volume_set = qfalse; + } + else + { + cgScreenEffects.music_volume_time = cg.time + 200; + } + } + + return; + } + + if (!cgScreenEffects.music_volume_set) + { //if the volume_time is >= cg.time, we should have a volume multiplier set + char musMultStr[512]; + + Com_sprintf(musMultStr, sizeof(musMultStr), "%f", cgScreenEffects.music_volume_multiplier); + trap_Cvar_Set("s_musicMult", musMultStr); + cgScreenEffects.music_volume_set = qtrue; + } +} + +/* +================= +CG_CalcScreenEffects + +Currently just for screen shaking (and music volume management) +================= +*/ +void CG_CalcScreenEffects(void) +{ + CG_SE_UpdateShake(cg.refdef.vieworg, cg.refdefViewAngles); + CG_SE_UpdateMusic(); +} + +void CGCam_Shake( float intensity, int duration ) +{ + if ( intensity > MAX_SHAKE_INTENSITY ) + intensity = MAX_SHAKE_INTENSITY; + + cgScreenEffects.shake_intensity = intensity; + cgScreenEffects.shake_duration = duration; + cgScreenEffects.shake_start = cg.time; +} + +void CGCam_SetMusicMult( float multiplier, int duration ) +{ + if (multiplier < 0.1f) + { + multiplier = 0.1f; + } + + if (multiplier > 1.0f) + { + multiplier = 1.0f; + } + + cgScreenEffects.music_volume_multiplier = multiplier; + cgScreenEffects.music_volume_time = cg.time + duration; + cgScreenEffects.music_volume_set = qfalse; +} + +/* +================================ +Screen Effect stuff ends here +================================ +*/ + +/* +================= +CG_DrawActiveFrame + +Generates and draws a game scene and status information at the given time. +================= +*/ +void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ) { + int inwater; + + cg.time = serverTime; + cg.demoPlayback = demoPlayback; + + if (cg.snap && ui_myteam.integer != cg.snap->ps.persistant[PERS_TEAM]) + { + trap_Cvar_Set ( "ui_myteam", va("%i", cg.snap->ps.persistant[PERS_TEAM]) ); + } + + // update cvars + CG_UpdateCvars(); + + // if we are only updating the screen as a loading + // pacifier, don't even try to read snapshots + if ( cg.infoScreenText[0] != 0 ) { + CG_DrawInformation(); + return; + } + + trap_FX_AdjustTime( cg.time, cg.refdef.vieworg, cg.refdef.viewaxis ); + + CG_RunLightStyles(); + + // any looped sounds will be respecified as entities + // are added to the render list + trap_S_ClearLoopingSounds(qfalse); + + // clear all the render lists + trap_R_ClearScene(); + + // set up cg.snap and possibly cg.nextSnap + CG_ProcessSnapshots(); + + trap_ROFF_UpdateEntities(); + + // if we haven't received any snapshots yet, all + // we can draw is the information screen + if ( !cg.snap || ( cg.snap->snapFlags & SNAPFLAG_NOT_ACTIVE ) ) { + CG_DrawInformation(); + return; + } + + // let the client system know what our weapon and zoom settings are + if (cg.snap && cg.snap->ps.saberLockTime > cg.time) + { + trap_SetUserCmdValue( cg.weaponSelect, 0.01, cg.forceSelect, cg.itemSelect ); + } + else if (cg.snap && cg.snap->ps.usingATST) + { + trap_SetUserCmdValue( cg.weaponSelect, 0.2, cg.forceSelect, cg.itemSelect ); + } + else + { + trap_SetUserCmdValue( cg.weaponSelect, cg.zoomSensitivity, cg.forceSelect, cg.itemSelect ); + } + + // this counter will be bumped for every valid scene we generate + cg.clientFrame++; + + // update cg.predictedPlayerState + CG_PredictPlayerState(); + + // decide on third person view + cg.renderingThirdPerson = cg_thirdPerson.integer || (cg.snap->ps.stats[STAT_HEALTH] <= 0); + + if (cg.snap->ps.stats[STAT_HEALTH] > 0 && (cg.predictedPlayerState.weapon == WP_SABER || cg.predictedPlayerState.usingATST || + cg.predictedPlayerState.forceHandExtend == HANDEXTEND_KNOCKDOWN || cg.predictedPlayerState.fallingToDeath)) + { + if (cg_fpls.integer && cg.predictedPlayerState.weapon == WP_SABER) + { //force to first person for fpls + cg.renderingThirdPerson = 0; + } + else + { + cg.renderingThirdPerson = 1; + } + } + else if (cg.snap->ps.zoomMode) + { //always force first person when zoomed + cg.renderingThirdPerson = 0; + } + + // build cg.refdef + inwater = CG_CalcViewValues(); + + CG_CalcScreenEffects(); + + // first person blend blobs, done after AnglesToAxis + if ( !cg.renderingThirdPerson ) { + CG_DamageBlendBlob(); + } + + // build the render lists + if ( !cg.hyperspace ) { + CG_AddPacketEntities(); // adter calcViewValues, so predicted player state is correct + CG_AddMarks(); + CG_AddParticles (); + CG_AddLocalEntities(); + } + CG_AddViewWeapon( &cg.predictedPlayerState ); + + if ( !cg.hyperspace) + { + trap_FX_AddScheduledEffects(); + } + + // add buffered sounds + CG_PlayBufferedSounds(); + + // play buffered voice chats + CG_PlayBufferedVoiceChats(); + + // finish up the rest of the refdef + if ( cg.testModelEntity.hModel ) { + CG_AddTestModel(); + } + cg.refdef.time = cg.time; + memcpy( cg.refdef.areamask, cg.snap->areamask, sizeof( cg.refdef.areamask ) ); + + // warning sounds when powerup is wearing off + CG_PowerupTimerSounds(); + + // if there are any entities flagged as sound trackers and attached to other entities, update their sound pos + CG_UpdateSoundTrackers(); + + if (gCGHasFallVector) + { + vec3_t lookAng; + + VectorSubtract(cg.snap->ps.origin, cg.refdef.vieworg, lookAng); + VectorNormalize(lookAng); + vectoangles(lookAng, lookAng); + + VectorCopy(gCGFallVector, cg.refdef.vieworg); + AnglesToAxis(lookAng, cg.refdef.viewaxis); + } + + // update audio positions + trap_S_Respatialize( cg.snap->ps.clientNum, cg.refdef.vieworg, cg.refdef.viewaxis, inwater ); + + // make sure the lagometerSample and frame timing isn't done twice when in stereo + if ( stereoView != STEREO_RIGHT ) { + cg.frametime = cg.time - cg.oldTime; + if ( cg.frametime < 0 ) { + cg.frametime = 0; + } + cg.oldTime = cg.time; + CG_AddLagometerFrameInfo(); + } + if (cg_timescale.value != cg_timescaleFadeEnd.value) { + if (cg_timescale.value < cg_timescaleFadeEnd.value) { + cg_timescale.value += cg_timescaleFadeSpeed.value * ((float)cg.frametime) / 1000; + if (cg_timescale.value > cg_timescaleFadeEnd.value) + cg_timescale.value = cg_timescaleFadeEnd.value; + } + else { + cg_timescale.value -= cg_timescaleFadeSpeed.value * ((float)cg.frametime) / 1000; + if (cg_timescale.value < cg_timescaleFadeEnd.value) + cg_timescale.value = cg_timescaleFadeEnd.value; + } + if (cg_timescaleFadeSpeed.value) { + trap_Cvar_Set("timescale", va("%f", cg_timescale.value)); + } + } + + // actually issue the rendering calls + CG_DrawActive( stereoView ); + + if ( cg_stats.integer ) { + CG_Printf( "cg.clientFrame:%i\n", cg.clientFrame ); + } +} + diff --git a/code/cgame/cg_view.c b/code/cgame/cg_view.c new file mode 100644 index 0000000..d523e39 --- /dev/null +++ b/code/cgame/cg_view.c @@ -0,0 +1,1666 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_view.c -- setup all the parameters (position, angle, etc) +// for a 3D rendering +#include "cg_local.h" + +#if !defined(CL_LIGHT_H_INC) + #include "cg_lights.h" +#endif + +#define MASK_CAMERACLIP (MASK_SOLID|CONTENTS_PLAYERCLIP) +#define CAMERA_SIZE 4 + + +/* +============================================================================= + + MODEL TESTING + +The viewthing and gun positioning tools from Q2 have been integrated and +enhanced into a single model testing facility. + +Model viewing can begin with either "testmodel " or "testgun ". + +The names must be the full pathname after the basedir, like +"models/weapons/v_launch/tris.md3" or "players/male/tris.md3" + +Testmodel will create a fake entity 100 units in front of the current view +position, directly facing the viewer. It will remain immobile, so you can +move around it to view it from different angles. + +Testgun will cause the model to follow the player around and supress the real +view weapon model. The default frame 0 of most guns is completely off screen, +so you will probably have to cycle a couple frames to see it. + +"nextframe", "prevframe", "nextskin", and "prevskin" commands will change the +frame or skin of the testmodel. These are bound to F5, F6, F7, and F8 in +q3default.cfg. + +If a gun is being tested, the "gun_x", "gun_y", and "gun_z" variables will let +you adjust the positioning. + +Note that none of the model testing features update while the game is paused, so +it may be convenient to test with deathmatch set to 1 so that bringing down the +console doesn't pause the game. + +============================================================================= +*/ + +/* +================= +CG_TestModel_f + +Creates an entity in front of the current position, which +can then be moved around +================= +*/ +void CG_TestModel_f (void) { + vec3_t angles; + + memset( &cg.testModelEntity, 0, sizeof(cg.testModelEntity) ); + if ( trap_Argc() < 2 ) { + return; + } + + Q_strncpyz (cg.testModelName, CG_Argv( 1 ), MAX_QPATH ); + cg.testModelEntity.hModel = trap_R_RegisterModel( cg.testModelName ); + + if ( trap_Argc() == 3 ) { + cg.testModelEntity.backlerp = atof( CG_Argv( 2 ) ); + cg.testModelEntity.frame = 1; + cg.testModelEntity.oldframe = 0; + } + if (! cg.testModelEntity.hModel ) { + CG_Printf( "Can't register model\n" ); + return; + } + + VectorMA( cg.refdef.vieworg, 100, cg.refdef.viewaxis[0], cg.testModelEntity.origin ); + + angles[PITCH] = 0; + angles[YAW] = 180 + cg.refdefViewAngles[1]; + angles[ROLL] = 0; + + AnglesToAxis( angles, cg.testModelEntity.axis ); + cg.testGun = qfalse; +} + +/* +================= +CG_TestGun_f + +Replaces the current view weapon with the given model +================= +*/ +void CG_TestGun_f (void) { + CG_TestModel_f(); + cg.testGun = qtrue; + //cg.testModelEntity.renderfx = RF_MINLIGHT | RF_DEPTHHACK | RF_FIRST_PERSON; + + // rww - 9-13-01 [1-26-01-sof2] + cg.testModelEntity.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON; +} + + +void CG_TestModelNextFrame_f (void) { + cg.testModelEntity.frame++; + CG_Printf( "frame %i\n", cg.testModelEntity.frame ); +} + +void CG_TestModelPrevFrame_f (void) { + cg.testModelEntity.frame--; + if ( cg.testModelEntity.frame < 0 ) { + cg.testModelEntity.frame = 0; + } + CG_Printf( "frame %i\n", cg.testModelEntity.frame ); +} + +void CG_TestModelNextSkin_f (void) { + cg.testModelEntity.skinNum++; + CG_Printf( "skin %i\n", cg.testModelEntity.skinNum ); +} + +void CG_TestModelPrevSkin_f (void) { + cg.testModelEntity.skinNum--; + if ( cg.testModelEntity.skinNum < 0 ) { + cg.testModelEntity.skinNum = 0; + } + CG_Printf( "skin %i\n", cg.testModelEntity.skinNum ); +} + +static void CG_AddTestModel (void) { + int i; + + // re-register the model, because the level may have changed + cg.testModelEntity.hModel = trap_R_RegisterModel( cg.testModelName ); + if (! cg.testModelEntity.hModel ) { + CG_Printf ("Can't register model\n"); + return; + } + + // if testing a gun, set the origin reletive to the view origin + if ( cg.testGun ) { + VectorCopy( cg.refdef.vieworg, cg.testModelEntity.origin ); + VectorCopy( cg.refdef.viewaxis[0], cg.testModelEntity.axis[0] ); + VectorCopy( cg.refdef.viewaxis[1], cg.testModelEntity.axis[1] ); + VectorCopy( cg.refdef.viewaxis[2], cg.testModelEntity.axis[2] ); + + // allow the position to be adjusted + for (i=0 ; i<3 ; i++) { + cg.testModelEntity.origin[i] += cg.refdef.viewaxis[0][i] * cg_gun_x.value; + cg.testModelEntity.origin[i] += cg.refdef.viewaxis[1][i] * cg_gun_y.value; + cg.testModelEntity.origin[i] += cg.refdef.viewaxis[2][i] * cg_gun_z.value; + } + } + + trap_R_AddRefEntityToScene( &cg.testModelEntity ); +} + + + +//============================================================================ + + +/* +================= +CG_CalcVrect + +Sets the coordinates of the rendered window +================= +*/ +static void CG_CalcVrect (void) { + int size; + + // the intermission should allways be full screen + if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { + size = 100; + } else { + // bound normal viewsize + if (cg_viewsize.integer < 30) { + trap_Cvar_Set ("cg_viewsize","30"); + size = 30; + } else if (cg_viewsize.integer > 100) { + trap_Cvar_Set ("cg_viewsize","100"); + size = 100; + } else { + size = cg_viewsize.integer; + } + + } + cg.refdef.width = cgs.glconfig.vidWidth*size/100; + cg.refdef.width &= ~1; + + cg.refdef.height = cgs.glconfig.vidHeight*size/100; + cg.refdef.height &= ~1; + + cg.refdef.x = (cgs.glconfig.vidWidth - cg.refdef.width)/2; + cg.refdef.y = (cgs.glconfig.vidHeight - cg.refdef.height)/2; +} + +//============================================================================== + +//============================================================================== +//============================================================================== +// this causes a compiler bug on mac MrC compiler +static void CG_StepOffset( void ) { + int timeDelta; + + // smooth out stair climbing + timeDelta = cg.time - cg.stepTime; + if ( timeDelta < STEP_TIME ) { + cg.refdef.vieworg[2] -= cg.stepChange + * (STEP_TIME - timeDelta) / STEP_TIME; + } +} + +#define CAMERA_DAMP_INTERVAL 50 + +static vec3_t cameramins = { -CAMERA_SIZE, -CAMERA_SIZE, -CAMERA_SIZE }; +static vec3_t cameramaxs = { CAMERA_SIZE, CAMERA_SIZE, CAMERA_SIZE }; +vec3_t camerafwd, cameraup; + +vec3_t cameraFocusAngles, cameraFocusLoc; +vec3_t cameraIdealTarget, cameraIdealLoc; +vec3_t cameraCurTarget={0,0,0}, cameraCurLoc={0,0,0}; +vec3_t cameraOldLoc={0,0,0}, cameraNewLoc={0,0,0}; +int cameraLastFrame=0; + +float cameraLastYaw=0; +float cameraStiffFactor=0.0f; + +/* +=============== +Notes on the camera viewpoint in and out... + +cg.refdef.vieworg +--at the start of the function holds the player actor's origin (center of player model). +--it is set to the final view location of the camera at the end of the camera code. +cg.refdefViewAngles +--at the start holds the client's view angles +--it is set to the final view angle of the camera at the end of the camera code. + +=============== +*/ + +extern qboolean gCGHasFallVector; +extern vec3_t gCGFallVector; + +/* +=============== +CG_CalcTargetThirdPersonViewLocation + +=============== +*/ +static void CG_CalcIdealThirdPersonViewTarget(void) +{ + float thirdPersonVertOffset = cg_thirdPersonVertOffset.value; + + if (cg.snap && cg.snap->ps.usingATST) + { + thirdPersonVertOffset = 200; + } + + // Initialize IdealTarget + if (gCGHasFallVector) + { + VectorCopy(gCGFallVector, cameraFocusLoc); + } + else + { + VectorCopy(cg.refdef.vieworg, cameraFocusLoc); + } + + // Add in the new viewheight + cameraFocusLoc[2] += cg.snap->ps.viewheight; + + // Add in a vertical offset from the viewpoint, which puts the actual target above the head, regardless of angle. +// VectorMA(cameraFocusLoc, thirdPersonVertOffset, cameraup, cameraIdealTarget); + + // Add in a vertical offset from the viewpoint, which puts the actual target above the head, regardless of angle. + VectorCopy( cameraFocusLoc, cameraIdealTarget ); + cameraIdealTarget[2] += cg_thirdPersonVertOffset.value; + //VectorMA(cameraFocusLoc, cg_thirdPersonVertOffset.value, cameraup, cameraIdealTarget); +} + + + +/* +=============== +CG_CalcTargetThirdPersonViewLocation + +=============== +*/ +static void CG_CalcIdealThirdPersonViewLocation(void) +{ + float thirdPersonRange = cg_thirdPersonRange.value; + + if (cg.snap && cg.snap->ps.usingATST) + { + thirdPersonRange = 300; + } + + VectorMA(cameraIdealTarget, -(thirdPersonRange), camerafwd, cameraIdealLoc); +} + + + +static void CG_ResetThirdPersonViewDamp(void) +{ + trace_t trace; + + // Cap the pitch within reasonable limits + if (cameraFocusAngles[PITCH] > 89.0) + { + cameraFocusAngles[PITCH] = 89.0; + } + else if (cameraFocusAngles[PITCH] < -89.0) + { + cameraFocusAngles[PITCH] = -89.0; + } + + AngleVectors(cameraFocusAngles, camerafwd, NULL, cameraup); + + // Set the cameraIdealTarget + CG_CalcIdealThirdPersonViewTarget(); + + // Set the cameraIdealLoc + CG_CalcIdealThirdPersonViewLocation(); + + // Now, we just set everything to the new positions. + VectorCopy(cameraIdealLoc, cameraCurLoc); + VectorCopy(cameraIdealTarget, cameraCurTarget); + + // First thing we do is trace from the first person viewpoint out to the new target location. + CG_Trace(&trace, cameraFocusLoc, cameramins, cameramaxs, cameraCurTarget, cg.snap->ps.clientNum, MASK_CAMERACLIP); + if (trace.fraction <= 1.0) + { + VectorCopy(trace.endpos, cameraCurTarget); + } + + // Now we trace from the new target location to the new view location, to make sure there is nothing in the way. + CG_Trace(&trace, cameraCurTarget, cameramins, cameramaxs, cameraCurLoc, cg.snap->ps.clientNum, MASK_CAMERACLIP); + if (trace.fraction <= 1.0) + { + VectorCopy(trace.endpos, cameraCurLoc); + } + + cameraLastFrame = cg.time; + cameraLastYaw = cameraFocusAngles[YAW]; + cameraStiffFactor = 0.0f; +} + +// This is called every frame. +static void CG_UpdateThirdPersonTargetDamp(void) +{ + trace_t trace; + vec3_t targetdiff; + float dampfactor, dtime, ratio; + + // Set the cameraIdealTarget + // Automatically get the ideal target, to avoid jittering. + CG_CalcIdealThirdPersonViewTarget(); + + if (cg_thirdPersonTargetDamp.value>=1.0) + { // No damping. + VectorCopy(cameraIdealTarget, cameraCurTarget); + } + else if (cg_thirdPersonTargetDamp.value>=0.0) + { + // Calculate the difference from the current position to the new one. + VectorSubtract(cameraIdealTarget, cameraCurTarget, targetdiff); + + // Now we calculate how much of the difference we cover in the time allotted. + // The equation is (Damp)^(time) + dampfactor = 1.0-cg_thirdPersonTargetDamp.value; // We must exponent the amount LEFT rather than the amount bled off + dtime = (float)(cg.time-cameraLastFrame) * (1.0/(float)CAMERA_DAMP_INTERVAL); // Our dampfactor is geared towards a time interval equal to "1". + + // Note that since there are a finite number of "practical" delta millisecond values possible, + // the ratio should be initialized into a chart ultimately. + ratio = powf(dampfactor, dtime); + + // This value is how much distance is "left" from the ideal. + VectorMA(cameraIdealTarget, -ratio, targetdiff, cameraCurTarget); + ///////////////////////////////////////////////////////////////////////////////////////////////////////// + } + + // Now we trace to see if the new location is cool or not. + + // First thing we do is trace from the first person viewpoint out to the new target location. + CG_Trace(&trace, cameraFocusLoc, cameramins, cameramaxs, cameraCurTarget, cg.snap->ps.clientNum, MASK_CAMERACLIP); + if (trace.fraction < 1.0) + { + VectorCopy(trace.endpos, cameraCurTarget); + } + + // Note that previously there was an upper limit to the number of physics traces that are done through the world + // for the sake of camera collision, since it wasn't calced per frame. Now it is calculated every frame. + // This has the benefit that the camera is a lot smoother now (before it lerped between tested points), + // however two full volume traces each frame is a bit scary to think about. +} + +// This can be called every interval, at the user's discretion. +static void CG_UpdateThirdPersonCameraDamp(void) +{ + trace_t trace; + vec3_t locdiff; + float dampfactor, dtime, ratio; + + // Set the cameraIdealLoc + CG_CalcIdealThirdPersonViewLocation(); + + + // First thing we do is calculate the appropriate damping factor for the camera. + dampfactor=0.0; + if (cg_thirdPersonCameraDamp.value != 0.0) + { + double pitch; + + // Note that the camera pitch has already been capped off to 89. + pitch = Q_fabs(cameraFocusAngles[PITCH]); + + // The higher the pitch, the larger the factor, so as you look up, it damps a lot less. + pitch /= 89.0; + dampfactor = (1.0-cg_thirdPersonCameraDamp.value)*(pitch*pitch); + + dampfactor += cg_thirdPersonCameraDamp.value; + + // Now we also multiply in the stiff factor, so that faster yaw changes are stiffer. + if (cameraStiffFactor > 0.0f) + { // The cameraStiffFactor is how much of the remaining damp below 1 should be shaved off, i.e. approach 1 as stiffening increases. + dampfactor += (1.0-dampfactor)*cameraStiffFactor; + } + } + + if (dampfactor>=1.0) + { // No damping. + VectorCopy(cameraIdealLoc, cameraCurLoc); + } + else if (dampfactor>=0.0) + { + // Calculate the difference from the current position to the new one. + VectorSubtract(cameraIdealLoc, cameraCurLoc, locdiff); + + // Now we calculate how much of the difference we cover in the time allotted. + // The equation is (Damp)^(time) + dampfactor = 1.0-dampfactor; // We must exponent the amount LEFT rather than the amount bled off + dtime = (float)(cg.time-cameraLastFrame) * (1.0/(float)CAMERA_DAMP_INTERVAL); // Our dampfactor is geared towards a time interval equal to "1". + + // Note that since there are a finite number of "practical" delta millisecond values possible, + // the ratio should be initialized into a chart ultimately. + ratio = powf(dampfactor, dtime); + + // This value is how much distance is "left" from the ideal. + VectorMA(cameraIdealLoc, -ratio, locdiff, cameraCurLoc); + ///////////////////////////////////////////////////////////////////////////////////////////////////////// + } + + // Now we trace from the new target location to the new view location, to make sure there is nothing in the way. + CG_Trace(&trace, cameraCurTarget, cameramins, cameramaxs, cameraCurLoc, cg.snap->ps.clientNum, MASK_CAMERACLIP); + + if (trace.fraction < 1.0) + { + VectorCopy( trace.endpos, cameraCurLoc ); + + //FIXME: when the trace hits movers, it gets very very jaggy... ? + /* + //this doesn't actually help any + if ( trace.entityNum != ENTITYNUM_WORLD ) + { + centity_t *cent = &cg_entities[trace.entityNum]; + gentity_t *gent = &g_entities[trace.entityNum]; + if ( cent != NULL && gent != NULL ) + { + if ( cent->currentState.pos.trType == TR_LINEAR || cent->currentState.pos.trType == TR_LINEAR_STOP ) + { + vec3_t diff; + VectorSubtract( cent->lerpOrigin, gent->currentOrigin, diff ); + VectorAdd( cameraCurLoc, diff, cameraCurLoc ); + } + } + } + */ + } + + // Note that previously there was an upper limit to the number of physics traces that are done through the world + // for the sake of camera collision, since it wasn't calced per frame. Now it is calculated every frame. + // This has the benefit that the camera is a lot smoother now (before it lerped between tested points), + // however two full volume traces each frame is a bit scary to think about. +} + + + + +/* +===============` +CG_OffsetThirdPersonView + +=============== +*/ +extern vmCvar_t cg_thirdPersonHorzOffset; +static void CG_OffsetThirdPersonView( void ) +{ + vec3_t diff; + float thirdPersonHorzOffset = cg_thirdPersonHorzOffset.value; + float deltayaw; + + cameraStiffFactor = 0.0; + + // Set camera viewing direction. + VectorCopy( cg.refdefViewAngles, cameraFocusAngles ); + + // if dead, look at killer + if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) + { + cameraFocusAngles[YAW] = cg.snap->ps.stats[STAT_DEAD_YAW]; + } + else + { // Add in the third Person Angle. + cameraFocusAngles[YAW] += cg_thirdPersonAngle.value; + cameraFocusAngles[PITCH] += cg_thirdPersonPitchOffset.value; + } + + // The next thing to do is to see if we need to calculate a new camera target location. + + // If we went back in time for some reason, or if we just started, reset the sample. + if (cameraLastFrame == 0 || cameraLastFrame > cg.time) + { + CG_ResetThirdPersonViewDamp(); + } + else + { + // Cap the pitch within reasonable limits + if (cameraFocusAngles[PITCH] > 80.0) + { + cameraFocusAngles[PITCH] = 80.0; + } + else if (cameraFocusAngles[PITCH] < -80.0) + { + cameraFocusAngles[PITCH] = -80.0; + } + + AngleVectors(cameraFocusAngles, camerafwd, NULL, cameraup); + + deltayaw = fabs(cameraFocusAngles[YAW] - cameraLastYaw); + if (deltayaw > 180.0f) + { // Normalize this angle so that it is between 0 and 180. + deltayaw = fabs(deltayaw - 360.0f); + } + cameraStiffFactor = deltayaw / (float)(cg.time-cameraLastFrame); + if (cameraStiffFactor < 1.0) + { + cameraStiffFactor = 0.0; + } + else if (cameraStiffFactor > 2.5) + { + cameraStiffFactor = 0.75; + } + else + { // 1 to 2 scales from 0.0 to 0.5 + cameraStiffFactor = (cameraStiffFactor-1.0f)*0.5f; + } + cameraLastYaw = cameraFocusAngles[YAW]; + + // Move the target to the new location. + CG_UpdateThirdPersonTargetDamp(); + CG_UpdateThirdPersonCameraDamp(); + } + + // Now interestingly, the Quake method is to calculate a target focus point above the player, and point the camera at it. + // We won't do that for now. + + // We must now take the angle taken from the camera target and location. + /*VectorSubtract(cameraCurTarget, cameraCurLoc, diff); + VectorNormalize(diff); + vectoangles(diff, cg.refdefViewAngles);*/ + VectorSubtract(cameraCurTarget, cameraCurLoc, diff); + { + float dist = VectorNormalize(diff); + //under normal circumstances, should never be 0.00000 and so on. + if ( !dist || (diff[0] == 0 || diff[1] == 0) ) + {//must be hitting something, need some value to calc angles, so use cam forward + VectorCopy( camerafwd, diff ); + } + } + vectoangles(diff, cg.refdefViewAngles); + + // Temp: just move the camera to the side a bit + if ( thirdPersonHorzOffset != 0.0f ) + { + AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); + VectorMA( cameraCurLoc, thirdPersonHorzOffset, cg.refdef.viewaxis[1], cameraCurLoc ); + } + + // ...and of course we should copy the new view location to the proper spot too. + VectorCopy(cameraCurLoc, cg.refdef.vieworg); + + cameraLastFrame=cg.time; +} + + + +/* +=============== +CG_OffsetThirdPersonView + +=============== +*//* +#define FOCUS_DISTANCE 512 +static void CG_OffsetThirdPersonView( void ) { + vec3_t forward, right, up; + vec3_t view; + vec3_t focusAngles; + trace_t trace; + static vec3_t mins = { -4, -4, -4 }; + static vec3_t maxs = { 4, 4, 4 }; + vec3_t focusPoint; + float focusDist; + float forwardScale, sideScale; + + cg.refdef.vieworg[2] += cg.predictedPlayerState.viewheight; + + VectorCopy( cg.refdefViewAngles, focusAngles ); + + // if dead, look at killer + if ( cg.predictedPlayerState.stats[STAT_HEALTH] <= 0 ) { + focusAngles[YAW] = cg.predictedPlayerState.stats[STAT_DEAD_YAW]; + cg.refdefViewAngles[YAW] = cg.predictedPlayerState.stats[STAT_DEAD_YAW]; + } + + if ( focusAngles[PITCH] > 45 ) { + focusAngles[PITCH] = 45; // don't go too far overhead + } + AngleVectors( focusAngles, forward, NULL, NULL ); + + VectorMA( cg.refdef.vieworg, FOCUS_DISTANCE, forward, focusPoint ); + + VectorCopy( cg.refdef.vieworg, view ); + + view[2] += 8; + + cg.refdefViewAngles[PITCH] *= 0.5; + + AngleVectors( cg.refdefViewAngles, forward, right, up ); + + forwardScale = cos( cg_thirdPersonAngle.value / 180 * M_PI ); + sideScale = sin( cg_thirdPersonAngle.value / 180 * M_PI ); + VectorMA( view, -cg_thirdPersonRange.value * forwardScale, forward, view ); + VectorMA( view, -cg_thirdPersonRange.value * sideScale, right, view ); + + // trace a ray from the origin to the viewpoint to make sure the view isn't + // in a solid block. Use an 8 by 8 block to prevent the view from near clipping anything + + if (!cg_cameraMode.integer) { + CG_Trace( &trace, cg.refdef.vieworg, mins, maxs, view, cg.predictedPlayerState.clientNum, MASK_CAMERACLIP); + + if ( trace.fraction != 1.0 ) { + VectorCopy( trace.endpos, view ); + view[2] += (1.0 - trace.fraction) * 32; + // try another trace to this position, because a tunnel may have the ceiling + // close enogh that this is poking out + + CG_Trace( &trace, cg.refdef.vieworg, mins, maxs, view, cg.predictedPlayerState.clientNum, MASK_CAMERACLIP); + VectorCopy( trace.endpos, view ); + } + } + + + VectorCopy( view, cg.refdef.vieworg ); + + // select pitch to look at focus point from vieword + VectorSubtract( focusPoint, cg.refdef.vieworg, focusPoint ); + focusDist = sqrt( focusPoint[0] * focusPoint[0] + focusPoint[1] * focusPoint[1] ); + if ( focusDist < 1 ) { + focusDist = 1; // should never happen + } + cg.refdefViewAngles[PITCH] = -180 / M_PI * atan2( focusPoint[2], focusDist ); + cg.refdefViewAngles[YAW] -= cg_thirdPersonAngle.value; +} + + +// this causes a compiler bug on mac MrC compiler +static void CG_StepOffset( void ) { + int timeDelta; + + // smooth out stair climbing + timeDelta = cg.time - cg.stepTime; + if ( timeDelta < STEP_TIME ) { + cg.refdef.vieworg[2] -= cg.stepChange + * (STEP_TIME - timeDelta) / STEP_TIME; + } +}*/ + +/* +=============== +CG_OffsetFirstPersonView + +=============== +*/ +static void CG_OffsetFirstPersonView( void ) { + float *origin; + float *angles; + float bob; + float ratio; + float delta; + float speed; + float f; + vec3_t predictedVelocity; + int timeDelta; + + if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { + return; + } + + origin = cg.refdef.vieworg; + angles = cg.refdefViewAngles; + + // if dead, fix the angle and don't add any kick + if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) { + angles[ROLL] = 40; + angles[PITCH] = -15; + angles[YAW] = cg.snap->ps.stats[STAT_DEAD_YAW]; + origin[2] += cg.predictedPlayerState.viewheight; + return; + } + + // add angles based on weapon kick + VectorAdd (angles, cg.kick_angles, angles); + + // add angles based on damage kick + if ( cg.damageTime ) { + ratio = cg.time - cg.damageTime; + if ( ratio < DAMAGE_DEFLECT_TIME ) { + ratio /= DAMAGE_DEFLECT_TIME; + angles[PITCH] += ratio * cg.v_dmg_pitch; + angles[ROLL] += ratio * cg.v_dmg_roll; + } else { + ratio = 1.0 - ( ratio - DAMAGE_DEFLECT_TIME ) / DAMAGE_RETURN_TIME; + if ( ratio > 0 ) { + angles[PITCH] += ratio * cg.v_dmg_pitch; + angles[ROLL] += ratio * cg.v_dmg_roll; + } + } + } + + // add pitch based on fall kick +#if 0 + ratio = ( cg.time - cg.landTime) / FALL_TIME; + if (ratio < 0) + ratio = 0; + angles[PITCH] += ratio * cg.fall_value; +#endif + + // add angles based on velocity + VectorCopy( cg.predictedPlayerState.velocity, predictedVelocity ); + + delta = DotProduct ( predictedVelocity, cg.refdef.viewaxis[0]); + angles[PITCH] += delta * cg_runpitch.value; + + delta = DotProduct ( predictedVelocity, cg.refdef.viewaxis[1]); + angles[ROLL] -= delta * cg_runroll.value; + + // add angles based on bob + + // make sure the bob is visible even at low speeds + speed = cg.xyspeed > 200 ? cg.xyspeed : 200; + + delta = cg.bobfracsin * cg_bobpitch.value * speed; + if (cg.predictedPlayerState.pm_flags & PMF_DUCKED) + delta *= 3; // crouching + angles[PITCH] += delta; + delta = cg.bobfracsin * cg_bobroll.value * speed; + if (cg.predictedPlayerState.pm_flags & PMF_DUCKED) + delta *= 3; // crouching accentuates roll + if (cg.bobcycle & 1) + delta = -delta; + angles[ROLL] += delta; + +//=================================== + + // add view height + origin[2] += cg.predictedPlayerState.viewheight; + + // smooth out duck height changes + timeDelta = cg.time - cg.duckTime; + if ( timeDelta < DUCK_TIME) { + cg.refdef.vieworg[2] -= cg.duckChange + * (DUCK_TIME - timeDelta) / DUCK_TIME; + } + + // add bob height + bob = cg.bobfracsin * cg.xyspeed * cg_bobup.value; + if (bob > 6) { + bob = 6; + } + + origin[2] += bob; + + + // add fall height + delta = cg.time - cg.landTime; + if ( delta < LAND_DEFLECT_TIME ) { + f = delta / LAND_DEFLECT_TIME; + cg.refdef.vieworg[2] += cg.landChange * f; + } else if ( delta < LAND_DEFLECT_TIME + LAND_RETURN_TIME ) { + delta -= LAND_DEFLECT_TIME; + f = 1.0 - ( delta / LAND_RETURN_TIME ); + cg.refdef.vieworg[2] += cg.landChange * f; + } + + // add step offset + CG_StepOffset(); + + // add kick offset + + VectorAdd (origin, cg.kick_origin, origin); + + // pivot the eye based on a neck length +#if 0 + { +#define NECK_LENGTH 8 + vec3_t forward, up; + + cg.refdef.vieworg[2] -= NECK_LENGTH; + AngleVectors( cg.refdefViewAngles, forward, NULL, up ); + VectorMA( cg.refdef.vieworg, 3, forward, cg.refdef.vieworg ); + VectorMA( cg.refdef.vieworg, NECK_LENGTH, up, cg.refdef.vieworg ); + } +#endif +} + +//====================================================================== + +void CG_ZoomDown_f( void ) { + if ( cg.zoomed ) { + return; + } + cg.zoomed = qtrue; + cg.zoomTime = cg.time; +} + +void CG_ZoomUp_f( void ) { + if ( !cg.zoomed ) { + return; + } + cg.zoomed = qfalse; + cg.zoomTime = cg.time; +} + + + +/* +==================== +CG_CalcFovFromX + +Calcs Y FOV from given X FOV +==================== +*/ +#define WAVE_AMPLITUDE 1 +#define WAVE_FREQUENCY 0.4 + +qboolean CG_CalcFOVFromX( float fov_x ) +{ + float x; +// float phase; +// float v; +// int contents; + float fov_y; + qboolean inwater; + + x = cg.refdef.width / tan( fov_x / 360 * M_PI ); + fov_y = atan2( cg.refdef.height, x ); + fov_y = fov_y * 360 / M_PI; + + // there's a problem with this, it only takes the leafbrushes into account, not the entity brushes, + // so if you give slime/water etc properties to a func_door area brush in order to move the whole water + // level up/down this doesn't take into account the door position, so warps the view the whole time + // whether the water is up or not. Fortunately there's only one slime area in Trek that you can be under, + // so lose it... +#if 0 +/* + // warp if underwater + contents = CG_PointContents( cg.refdef.vieworg, -1 ); + if ( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ){ + phase = cg.time / 1000.0 * WAVE_FREQUENCY * M_PI * 2; + v = WAVE_AMPLITUDE * sin( phase ); + fov_x += v; + fov_y -= v; + inwater = qtrue; + } + else { + inwater = qfalse; + } +*/ +#else + inwater = qfalse; +#endif + + + // set it + cg.refdef.fov_x = fov_x; + cg.refdef.fov_y = fov_y; + + return (inwater); +} + +/* +==================== +CG_CalcFov + +Fixed fov at intermissions, otherwise account for fov variable and zooms. +==================== +*/ +#define WAVE_AMPLITUDE 1 +#define WAVE_FREQUENCY 0.4 +float zoomFov; //this has to be global client-side + +static int CG_CalcFov( void ) { + float x; + float phase; + float v; + int contents; + float fov_x, fov_y; + float f; + int inwater; + float cgFov = cg_fov.value; + + if (cgFov < 1) + { + cgFov = 1; + } + if (cgFov > 97) + { + cgFov = 97; + } + + if ( cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { + // if in intermission, use a fixed value + fov_x = 80;//90; + } else { + // user selectable + if ( cgs.dmflags & DF_FIXED_FOV ) { + // dmflag to prevent wide fov for all clients + fov_x = 80;//90; + } else { + fov_x = cgFov; + if ( fov_x < 1 ) { + fov_x = 1; + } else if ( fov_x > 160 ) { + fov_x = 160; + } + } + + if (cg.predictedPlayerState.zoomMode == 2) + { //binoculars + if (zoomFov > 40.0f) + { + zoomFov -= cg.frametime * 0.075f; + + if (zoomFov < 40.0f) + { + zoomFov = 40.0f; + } + else if (zoomFov > cgFov) + { + zoomFov = cgFov; + } + } + + fov_x = zoomFov; + } + else if (cg.predictedPlayerState.zoomMode) + { + if (!cg.predictedPlayerState.zoomLocked) + { + if (zoomFov > 50) + { //Now starting out at nearly half zoomed in + zoomFov = 50; + } + zoomFov -= cg.frametime * 0.035f;//0.075f; + + if (zoomFov < MAX_ZOOM_FOV) + { + zoomFov = MAX_ZOOM_FOV; + } + else if (zoomFov > cgFov) + { + zoomFov = cgFov; + } + else + { // Still zooming + static zoomSoundTime = 0; + + if (zoomSoundTime < cg.time || zoomSoundTime > cg.time + 10000) + { + trap_S_StartSound(cg.refdef.vieworg, ENTITYNUM_WORLD, CHAN_LOCAL, cgs.media.disruptorZoomLoop); + zoomSoundTime = cg.time + 300; + } + } + } + + fov_x = zoomFov; + } + else + { + zoomFov = 80; + + f = ( cg.time - cg.predictedPlayerState.zoomTime ) / ZOOM_OUT_TIME; + if ( f > 1.0 ) + { + fov_x = fov_x; + } + else + { + fov_x = cg.predictedPlayerState.zoomFov + f * ( fov_x - cg.predictedPlayerState.zoomFov ); + } + } + } + + x = cg.refdef.width / tan( fov_x / 360 * M_PI ); + fov_y = atan2( cg.refdef.height, x ); + fov_y = fov_y * 360 / M_PI; + + // warp if underwater + contents = CG_PointContents( cg.refdef.vieworg, -1 ); + if ( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ){ + phase = cg.time / 1000.0 * WAVE_FREQUENCY * M_PI * 2; + v = WAVE_AMPLITUDE * sin( phase ); + fov_x += v; + fov_y -= v; + inwater = qtrue; + } + else { + inwater = qfalse; + } + + + // set it + cg.refdef.fov_x = fov_x; + cg.refdef.fov_y = fov_y; + + if (cg.predictedPlayerState.zoomMode) + { + cg.zoomSensitivity = zoomFov/cgFov; + } + else if ( !cg.zoomed ) { + cg.zoomSensitivity = 1; + } else { + cg.zoomSensitivity = cg.refdef.fov_y / 75.0; + } + + return inwater; +} + + +/* +=============== +CG_DamageBlendBlob + +=============== +*/ +static void CG_DamageBlendBlob( void ) +{ + int t; + int maxTime; + refEntity_t ent; + + if ( !cg.damageValue ) { + return; + } + + maxTime = DAMAGE_TIME; + t = cg.time - cg.damageTime; + if ( t <= 0 || t >= maxTime ) { + return; + } + + memset( &ent, 0, sizeof( ent ) ); + ent.reType = RT_SPRITE; + ent.renderfx = RF_FIRST_PERSON; + + VectorMA( cg.refdef.vieworg, 8, cg.refdef.viewaxis[0], ent.origin ); + VectorMA( ent.origin, cg.damageX * -8, cg.refdef.viewaxis[1], ent.origin ); + VectorMA( ent.origin, cg.damageY * 8, cg.refdef.viewaxis[2], ent.origin ); + + ent.radius = cg.damageValue * 3 * ( 1.0 - ((float)t / maxTime) ); + + if (cg.snap->ps.damageType == 0) + { //pure health + ent.customShader = cgs.media.viewPainShader; + ent.shaderRGBA[0] = 180 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[1] = 50 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[2] = 50 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[3] = 255; + } + else if (cg.snap->ps.damageType == 1) + { //pure shields + ent.customShader = cgs.media.viewPainShader_Shields; + ent.shaderRGBA[0] = 50 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[1] = 180 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[2] = 50 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[3] = 255; + } + else + { //shields and health + ent.customShader = cgs.media.viewPainShader_ShieldsAndHealth; + ent.shaderRGBA[0] = 180 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[1] = 180 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[2] = 50 * ( 1.0 - ((float)t / maxTime) ); + ent.shaderRGBA[3] = 255; + } + trap_R_AddRefEntityToScene( &ent ); +} + +qboolean CheckOutOfConstrict(float curAng) +{ + float degrees_negative, degrees_positive; + + float angle_ideal = cg.constrictValue; + float angle_current = curAng; + + float angle_dif = 0; + + if (angle_current < 0) + { + angle_current += 360; + } + if (angle_current > 360) + { + angle_current -= 360; + } + + if (cg.doConstrict <= cg.time) + { + return qfalse; + } + + if (angle_ideal <= angle_current) + { + degrees_negative = (angle_current - angle_ideal); + + degrees_positive = (360 - angle_current) + angle_ideal; + } + else + { + degrees_negative = angle_current + (360 - angle_ideal); + + degrees_positive = (angle_ideal - angle_current); + } + + if (degrees_negative < degrees_positive) + { + angle_dif = degrees_negative; + } + else + { + angle_dif = degrees_positive; + } + + if (angle_dif > 60) + { + return qtrue; + } + + return qfalse; +} + +/* +=============== +CG_CalcViewValues + +Sets cg.refdef view values +=============== +*/ +static int CG_CalcViewValues( void ) { + playerState_t *ps; + + memset( &cg.refdef, 0, sizeof( cg.refdef ) ); + + // strings for in game rendering + // Q_strncpyz( cg.refdef.text[0], "Park Ranger", sizeof(cg.refdef.text[0]) ); + // Q_strncpyz( cg.refdef.text[1], "19", sizeof(cg.refdef.text[1]) ); + + // calculate size of 3D view + CG_CalcVrect(); + + ps = &cg.predictedPlayerState; +/* + if (cg.cameraMode) { + vec3_t origin, angles; + if (trap_getCameraInfo(cg.time, &origin, &angles)) { + VectorCopy(origin, cg.refdef.vieworg); + angles[ROLL] = 0; + VectorCopy(angles, cg.refdefViewAngles); + AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); + return CG_CalcFov(); + } else { + cg.cameraMode = qfalse; + } + } +*/ + // intermission view + if ( ps->pm_type == PM_INTERMISSION ) { + VectorCopy( ps->origin, cg.refdef.vieworg ); + VectorCopy( ps->viewangles, cg.refdefViewAngles ); + AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); + return CG_CalcFov(); + } + + cg.bobcycle = ( ps->bobCycle & 128 ) >> 7; + cg.bobfracsin = fabs( sin( ( ps->bobCycle & 127 ) / 127.0 * M_PI ) ); + cg.xyspeed = sqrt( ps->velocity[0] * ps->velocity[0] + + ps->velocity[1] * ps->velocity[1] ); + + if (cg.xyspeed > 270) + { + cg.xyspeed = 270; + } + + VectorCopy( ps->origin, cg.refdef.vieworg ); + VectorCopy( ps->viewangles, cg.refdefViewAngles ); + + if (cg_cameraOrbit.integer) { + if (cg.time > cg.nextOrbitTime) { + cg.nextOrbitTime = cg.time + cg_cameraOrbitDelay.integer; + cg_thirdPersonAngle.value += cg_cameraOrbit.value; + } + } + // add error decay + if ( cg_errorDecay.value > 0 ) { + int t; + float f; + + t = cg.time - cg.predictedErrorTime; + f = ( cg_errorDecay.value - t ) / cg_errorDecay.value; + if ( f > 0 && f < 1 ) { + VectorMA( cg.refdef.vieworg, f, cg.predictedError, cg.refdef.vieworg ); + } else { + cg.predictedErrorTime = 0; + } + } + + if ( cg.renderingThirdPerson && !cg.snap->ps.zoomMode) { + // back away from character + CG_OffsetThirdPersonView(); + } else { + // offset for local bobbing and kicks + CG_OffsetFirstPersonView(); + } + + // position eye reletive to origin + AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); + + if ( cg.hyperspace ) { + cg.refdef.rdflags |= RDF_NOWORLDMODEL | RDF_HYPERSPACE; + } + + // field of view + return CG_CalcFov(); +} + + +/* +===================== +CG_PowerupTimerSounds +===================== +*/ +static void CG_PowerupTimerSounds( void ) { + int i; + int t; + + // powerup timers going away + for ( i = 0 ; i < MAX_POWERUPS ; i++ ) { + t = cg.snap->ps.powerups[i]; + if ( t <= cg.time ) { + continue; + } + if ( t - cg.time >= POWERUP_BLINKS * POWERUP_BLINK_TIME ) { + continue; + } + if ( ( t - cg.time ) / POWERUP_BLINK_TIME != ( t - cg.oldTime ) / POWERUP_BLINK_TIME ) { + //trap_S_StartSound( NULL, cg.snap->ps.clientNum, CHAN_ITEM, cgs.media.wearOffSound ); + } + } +} + +/* +===================== +CG_AddBufferedSound +===================== +*/ +void CG_AddBufferedSound( sfxHandle_t sfx ) { + if ( !sfx ) + return; + cg.soundBuffer[cg.soundBufferIn] = sfx; + cg.soundBufferIn = (cg.soundBufferIn + 1) % MAX_SOUNDBUFFER; + if (cg.soundBufferIn == cg.soundBufferOut) { + cg.soundBufferOut++; + } +} + +/* +===================== +CG_PlayBufferedSounds +===================== +*/ +static void CG_PlayBufferedSounds( void ) { + if ( cg.soundTime < cg.time ) { + if (cg.soundBufferOut != cg.soundBufferIn && cg.soundBuffer[cg.soundBufferOut]) { + trap_S_StartLocalSound(cg.soundBuffer[cg.soundBufferOut], CHAN_ANNOUNCER); + cg.soundBuffer[cg.soundBufferOut] = 0; + cg.soundBufferOut = (cg.soundBufferOut + 1) % MAX_SOUNDBUFFER; + cg.soundTime = cg.time + 750; + } + } +} + +void CG_UpdateSoundTrackers() +{ + int num; + centity_t *cent; + + for ( num = 0 ; num < ENTITYNUM_NONE ; num++ ) + { + cent = &cg_entities[num]; + + if (cent && cent->currentState.eFlags & EF_SOUNDTRACKER) + { //keep sound for this entity updated in accordance with its attached entity at all times + if (cg.snap && cent->currentState.trickedentindex == cg.snap->ps.clientNum) + { //this is actually the player, so center the sound origin right on top of us + VectorCopy(cg.refdef.vieworg, cent->lerpOrigin); + trap_S_UpdateEntityPosition( cent->currentState.number, cent->lerpOrigin ); + } + else + { + trap_S_UpdateEntityPosition( cent->currentState.number, cg_entities[cent->currentState.trickedentindex].lerpOrigin ); + } + } + } +} + +//========================================================================= + +/* +================================ +Screen Effect stuff starts here +================================ +*/ +#define CAMERA_DEFAULT_FOV 90.0f +#define MAX_SHAKE_INTENSITY 16.0f + +cgscreffects_t cgScreenEffects; + +void CG_SE_UpdateShake( vec3_t origin, vec3_t angles ) +{ + vec3_t moveDir; + float intensity_scale, intensity; + int i; + + if ( cgScreenEffects.shake_duration <= 0 ) + return; + + if ( cg.time > ( cgScreenEffects.shake_start + cgScreenEffects.shake_duration ) ) + { + cgScreenEffects.shake_intensity = 0; + cgScreenEffects.shake_duration = 0; + cgScreenEffects.shake_start = 0; + return; + } + + cgScreenEffects.FOV = CAMERA_DEFAULT_FOV; + cgScreenEffects.FOV2 = CAMERA_DEFAULT_FOV; + + //intensity_scale now also takes into account FOV with 90.0 as normal + intensity_scale = 1.0f - ( (float) ( cg.time - cgScreenEffects.shake_start ) / (float) cgScreenEffects.shake_duration ) * (((cgScreenEffects.FOV+cgScreenEffects.FOV2)/2.0f)/90.0f); + + intensity = cgScreenEffects.shake_intensity * intensity_scale; + + for ( i = 0; i < 3; i++ ) + { + moveDir[i] = ( crandom() * intensity ); + } + + //Move the camera + VectorAdd( origin, moveDir, origin ); + + for ( i=0; i < 2; i++ ) // Don't do ROLL + moveDir[i] = ( crandom() * intensity ); + + //Move the angles + VectorAdd( angles, moveDir, angles ); +} + +void CG_SE_UpdateMusic(void) +{ + if (cgScreenEffects.music_volume_multiplier < 0.1) + { + cgScreenEffects.music_volume_multiplier = 1.0; + return; + } + + if (cgScreenEffects.music_volume_time < cg.time) + { + if (cgScreenEffects.music_volume_multiplier != 1.0 || cgScreenEffects.music_volume_set) + { + char musMultStr[512]; + + cgScreenEffects.music_volume_multiplier += 0.1; + if (cgScreenEffects.music_volume_multiplier > 1.0) + { + cgScreenEffects.music_volume_multiplier = 1.0; + } + + Com_sprintf(musMultStr, sizeof(musMultStr), "%f", cgScreenEffects.music_volume_multiplier); + trap_Cvar_Set("s_musicMult", musMultStr); + + if (cgScreenEffects.music_volume_multiplier == 1.0) + { + cgScreenEffects.music_volume_set = qfalse; + } + else + { + cgScreenEffects.music_volume_time = cg.time + 200; + } + } + + return; + } + + if (!cgScreenEffects.music_volume_set) + { //if the volume_time is >= cg.time, we should have a volume multiplier set + char musMultStr[512]; + + Com_sprintf(musMultStr, sizeof(musMultStr), "%f", cgScreenEffects.music_volume_multiplier); + trap_Cvar_Set("s_musicMult", musMultStr); + cgScreenEffects.music_volume_set = qtrue; + } +} + +/* +================= +CG_CalcScreenEffects + +Currently just for screen shaking (and music volume management) +================= +*/ +void CG_CalcScreenEffects(void) +{ + CG_SE_UpdateShake(cg.refdef.vieworg, cg.refdefViewAngles); + CG_SE_UpdateMusic(); +} + +void CGCam_Shake( float intensity, int duration ) +{ + if ( intensity > MAX_SHAKE_INTENSITY ) + intensity = MAX_SHAKE_INTENSITY; + + cgScreenEffects.shake_intensity = intensity; + cgScreenEffects.shake_duration = duration; + cgScreenEffects.shake_start = cg.time; +} + +void CGCam_SetMusicMult( float multiplier, int duration ) +{ + if (multiplier < 0.1f) + { + multiplier = 0.1f; + } + + if (multiplier > 1.0f) + { + multiplier = 1.0f; + } + + cgScreenEffects.music_volume_multiplier = multiplier; + cgScreenEffects.music_volume_time = cg.time + duration; + cgScreenEffects.music_volume_set = qfalse; +} + +/* +================================ +Screen Effect stuff ends here +================================ +*/ + +/* +================= +CG_DrawActiveFrame + +Generates and draws a game scene and status information at the given time. +================= +*/ +void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ) { + int inwater; + + cg.time = serverTime; + cg.demoPlayback = demoPlayback; + + if (cg.snap && ui_myteam.integer != cg.snap->ps.persistant[PERS_TEAM]) + { + trap_Cvar_Set ( "ui_myteam", va("%i", cg.snap->ps.persistant[PERS_TEAM]) ); + } + + // update cvars + CG_UpdateCvars(); + + // if we are only updating the screen as a loading + // pacifier, don't even try to read snapshots + if ( cg.infoScreenText[0] != 0 ) { + CG_DrawInformation(); + return; + } + + trap_FX_AdjustTime( cg.time, cg.refdef.vieworg, cg.refdef.viewaxis ); + + CG_RunLightStyles(); + + // any looped sounds will be respecified as entities + // are added to the render list + trap_S_ClearLoopingSounds(qfalse); + + // clear all the render lists + trap_R_ClearScene(); + + // set up cg.snap and possibly cg.nextSnap + CG_ProcessSnapshots(); + + trap_ROFF_UpdateEntities(); + + // if we haven't received any snapshots yet, all + // we can draw is the information screen + if ( !cg.snap || ( cg.snap->snapFlags & SNAPFLAG_NOT_ACTIVE ) ) { + CG_DrawInformation(); + return; + } + + // let the client system know what our weapon and zoom settings are + if (cg.snap && cg.snap->ps.saberLockTime > cg.time) + { + trap_SetUserCmdValue( cg.weaponSelect, 0.01, cg.forceSelect, cg.itemSelect ); + } + else if (cg.snap && cg.snap->ps.usingATST) + { + trap_SetUserCmdValue( cg.weaponSelect, 0.2, cg.forceSelect, cg.itemSelect ); + } + else + { + trap_SetUserCmdValue( cg.weaponSelect, cg.zoomSensitivity, cg.forceSelect, cg.itemSelect ); + } + + // this counter will be bumped for every valid scene we generate + cg.clientFrame++; + + // update cg.predictedPlayerState + CG_PredictPlayerState(); + + // decide on third person view + cg.renderingThirdPerson = cg_thirdPerson.integer || (cg.snap->ps.stats[STAT_HEALTH] <= 0); + + if (cg.snap->ps.stats[STAT_HEALTH] > 0 && (cg.predictedPlayerState.weapon == WP_SABER || cg.predictedPlayerState.usingATST || + cg.predictedPlayerState.forceHandExtend == HANDEXTEND_KNOCKDOWN || cg.predictedPlayerState.fallingToDeath)) + { + if (cg_fpls.integer && cg.predictedPlayerState.weapon == WP_SABER) + { //force to first person for fpls + cg.renderingThirdPerson = 0; + } + else + { + cg.renderingThirdPerson = 1; + } + } + else if (cg.snap->ps.zoomMode) + { //always force first person when zoomed + cg.renderingThirdPerson = 0; + } + + // build cg.refdef + inwater = CG_CalcViewValues(); + + CG_CalcScreenEffects(); + + // first person blend blobs, done after AnglesToAxis + if ( !cg.renderingThirdPerson ) { + CG_DamageBlendBlob(); + } + + // build the render lists + if ( !cg.hyperspace ) { + CG_AddPacketEntities(); // adter calcViewValues, so predicted player state is correct + CG_AddMarks(); + CG_AddParticles (); + CG_AddLocalEntities(); + } + CG_AddViewWeapon( &cg.predictedPlayerState ); + + if ( !cg.hyperspace) + { + trap_FX_AddScheduledEffects(); + } + + // add buffered sounds + CG_PlayBufferedSounds(); + + // play buffered voice chats + CG_PlayBufferedVoiceChats(); + + // finish up the rest of the refdef + if ( cg.testModelEntity.hModel ) { + CG_AddTestModel(); + } + cg.refdef.time = cg.time; + memcpy( cg.refdef.areamask, cg.snap->areamask, sizeof( cg.refdef.areamask ) ); + + // warning sounds when powerup is wearing off + CG_PowerupTimerSounds(); + + // if there are any entities flagged as sound trackers and attached to other entities, update their sound pos + CG_UpdateSoundTrackers(); + + if (gCGHasFallVector) + { + vec3_t lookAng; + + VectorSubtract(cg.snap->ps.origin, cg.refdef.vieworg, lookAng); + VectorNormalize(lookAng); + vectoangles(lookAng, lookAng); + + VectorCopy(gCGFallVector, cg.refdef.vieworg); + AnglesToAxis(lookAng, cg.refdef.viewaxis); + } + + // update audio positions + trap_S_Respatialize( cg.snap->ps.clientNum, cg.refdef.vieworg, cg.refdef.viewaxis, inwater ); + + // make sure the lagometerSample and frame timing isn't done twice when in stereo + if ( stereoView != STEREO_RIGHT ) { + cg.frametime = cg.time - cg.oldTime; + if ( cg.frametime < 0 ) { + cg.frametime = 0; + } + cg.oldTime = cg.time; + CG_AddLagometerFrameInfo(); + } + if (cg_timescale.value != cg_timescaleFadeEnd.value) { + if (cg_timescale.value < cg_timescaleFadeEnd.value) { + cg_timescale.value += cg_timescaleFadeSpeed.value * ((float)cg.frametime) / 1000; + if (cg_timescale.value > cg_timescaleFadeEnd.value) + cg_timescale.value = cg_timescaleFadeEnd.value; + } + else { + cg_timescale.value -= cg_timescaleFadeSpeed.value * ((float)cg.frametime) / 1000; + if (cg_timescale.value < cg_timescaleFadeEnd.value) + cg_timescale.value = cg_timescaleFadeEnd.value; + } + if (cg_timescaleFadeSpeed.value) { + trap_Cvar_Set("timescale", va("%f", cg_timescale.value)); + } + } + + // actually issue the rendering calls + CG_DrawActive( stereoView ); + + if ( cg_stats.integer ) { + CG_Printf( "cg.clientFrame:%i\n", cg.clientFrame ); + } +} + diff --git a/code/cgame/cg_weaponinit (2).c b/code/cgame/cg_weaponinit (2).c new file mode 100644 index 0000000..27ee2c6 --- /dev/null +++ b/code/cgame/cg_weaponinit (2).c @@ -0,0 +1,521 @@ +// +// cg_weaponinit.c -- events and effects dealing with weapons +#include "cg_local.h" +#include "fx_local.h" + + +/* +================= +CG_RegisterWeapon + +The server says this item is used on this level +================= +*/ +void CG_RegisterWeapon( int weaponNum) { + weaponInfo_t *weaponInfo; + gitem_t *item, *ammo; + char path[MAX_QPATH]; + vec3_t mins, maxs; + int i; + + weaponInfo = &cg_weapons[weaponNum]; + + if ( weaponNum == 0 ) { + return; + } + + if ( weaponInfo->registered ) { + return; + } + + memset( weaponInfo, 0, sizeof( *weaponInfo ) ); + weaponInfo->registered = qtrue; + + for ( item = bg_itemlist + 1 ; item->classname ; item++ ) { + if ( item->giType == IT_WEAPON && item->giTag == weaponNum ) { + weaponInfo->item = item; + break; + } + } + if ( !item->classname ) { + CG_Error( "Couldn't find weapon %i", weaponNum ); + } + CG_RegisterItemVisuals( item - bg_itemlist ); + + // load cmodel before model so filecache works + weaponInfo->weaponModel = trap_R_RegisterModel( item->world_model[0] ); + // load in-view model also + weaponInfo->viewModel = trap_R_RegisterModel(item->view_model); + + // calc midpoint for rotation + trap_R_ModelBounds( weaponInfo->weaponModel, mins, maxs ); + for ( i = 0 ; i < 3 ; i++ ) { + weaponInfo->weaponMidpoint[i] = mins[i] + 0.5 * ( maxs[i] - mins[i] ); + } + + weaponInfo->weaponIcon = trap_R_RegisterShader( item->icon ); + weaponInfo->ammoIcon = trap_R_RegisterShader( item->icon ); + + for ( ammo = bg_itemlist + 1 ; ammo->classname ; ammo++ ) { + if ( ammo->giType == IT_AMMO && ammo->giTag == weaponNum ) { + break; + } + } + if ( ammo->classname && ammo->world_model[0] ) { + weaponInfo->ammoModel = trap_R_RegisterModel( ammo->world_model[0] ); + } + +// strcpy( path, item->view_model ); +// COM_StripExtension( path, path ); +// strcat( path, "_flash.md3" ); + weaponInfo->flashModel = 0;//trap_R_RegisterModel( path ); + + if (weaponNum == WP_DISRUPTOR || + weaponNum == WP_FLECHETTE || + weaponNum == WP_REPEATER || + weaponNum == WP_ROCKET_LAUNCHER) + { + strcpy( path, item->view_model ); + COM_StripExtension( path, path ); + strcat( path, "_barrel.md3" ); + weaponInfo->barrelModel = trap_R_RegisterModel( path ); + } + else if (weaponNum == WP_STUN_BATON) + { //only weapon with more than 1 barrel.. + trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel.md3"); + trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel2.md3"); + trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel3.md3"); + } + else + { + weaponInfo->barrelModel = 0; + } + + if (weaponNum != WP_SABER) + { + strcpy( path, item->view_model ); + COM_StripExtension( path, path ); + strcat( path, "_hand.md3" ); + weaponInfo->handsModel = trap_R_RegisterModel( path ); + } + else + { + weaponInfo->handsModel = 0; + } + +// if ( !weaponInfo->handsModel ) { +// weaponInfo->handsModel = trap_R_RegisterModel( "models/weapons2/shotgun/shotgun_hand.md3" ); +// } + + cgs.effects.forceLightning = trap_FX_RegisterEffect( "effects/force/lightning.efx" ); + cgs.effects.forceLightningWide = trap_FX_RegisterEffect( "effects/force/lightningwide.efx" ); + + cgs.effects.forceDrain = trap_FX_RegisterEffect( "effects/mp/drain.efx" ); + cgs.effects.forceDrainWide = trap_FX_RegisterEffect( "effects/mp/drainwide.efx" ); + cgs.effects.forceDrained = trap_FX_RegisterEffect( "effects/mp/drainhit.efx"); + + switch ( weaponNum ) { + case WP_STUN_BATON: +/* MAKERGB( weaponInfo->flashDlightColor, 0.6f, 0.6f, 1.0f ); + weaponInfo->firingSound = trap_S_RegisterSound( "sound/weapons/saber/saberhum.wav" ); +// weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/melee/fstatck.wav" ); +*/ + //trap_R_RegisterShader( "gfx/effects/stunPass" ); + trap_FX_RegisterEffect( "stunBaton/flesh_impact" ); + //TEMP + trap_S_RegisterSound( "sound/weapons/melee/punch1.mp3" ); + trap_S_RegisterSound( "sound/weapons/melee/punch2.mp3" ); + trap_S_RegisterSound( "sound/weapons/melee/punch3.mp3" ); + trap_S_RegisterSound( "sound/weapons/melee/punch4.mp3" ); + + trap_S_RegisterSound( "sound/weapons/baton/idle.wav" ); + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/baton/fire.mp3" ); + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/baton/fire.mp3" ); + + break; + case WP_SABER: + MAKERGB( weaponInfo->flashDlightColor, 0.6f, 0.6f, 1.0f ); + weaponInfo->firingSound = trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ); + weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/saber/saber_w.glm" ); + break; + + case WP_BRYAR_PISTOL: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/bryar/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "bryar/muzzle_flash" ); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; + //weaponInfo->missileDlightColor= {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_BryarProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/bryar/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = trap_S_RegisterSound( "sound/weapons/bryar/altcharge.wav"); + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "bryar/muzzle_flash" ); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; + //weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_BryarAltProjectileThink; + + cgs.effects.bryarShotEffect = trap_FX_RegisterEffect( "bryar/shot" ); + cgs.effects.bryarPowerupShotEffect = trap_FX_RegisterEffect( "bryar/crackleShot" ); + cgs.effects.bryarWallImpactEffect = trap_FX_RegisterEffect( "bryar/wall_impact" ); + cgs.effects.bryarWallImpactEffect2 = trap_FX_RegisterEffect( "bryar/wall_impact2" ); + cgs.effects.bryarWallImpactEffect3 = trap_FX_RegisterEffect( "bryar/wall_impact3" ); + cgs.effects.bryarFleshImpactEffect = trap_FX_RegisterEffect( "bryar/flesh_impact" ); + cgs.effects.bryarDroidImpactEffect = trap_FX_RegisterEffect( "bryar/droid_impact" ); + + cgs.media.bryarFrontFlash = trap_R_RegisterShader( "gfx/effects/bryarFrontFlash" ); + + // Note these are temp shared effects + trap_FX_RegisterEffect("effects/blaster/deflect.efx"); + trap_FX_RegisterEffect("effects/blaster/wall_impact.efx"); + trap_FX_RegisterEffect("effects/blaster/flesh_impact.efx"); + trap_FX_RegisterEffect("effects/blaster/smoke_bolton.efx"); + + break; + + case WP_BLASTER: + case WP_EMPLACED_GUN: //rww - just use the same as this for now.. + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/blaster/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "blaster/muzzle_flash" ); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_BlasterProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/blaster/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "blaster/muzzle_flash" ); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_BlasterProjectileThink; + + trap_FX_RegisterEffect( "blaster/deflect" ); + cgs.effects.blasterShotEffect = trap_FX_RegisterEffect( "blaster/shot" ); + cgs.effects.blasterWallImpactEffect = trap_FX_RegisterEffect( "blaster/wall_impact" ); + cgs.effects.blasterFleshImpactEffect = trap_FX_RegisterEffect( "blaster/flesh_impact" ); + cgs.effects.blasterDroidImpactEffect = trap_FX_RegisterEffect( "blaster/droid_impact" ); + trap_FX_RegisterEffect( "blaster/smoke_bolton" ); // note: this will be called game side + break; + + case WP_DISRUPTOR: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/disruptor/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "disruptor/muzzle_flash" ); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = 0; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/disruptor/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = trap_S_RegisterSound("sound/weapons/disruptor/altCharge.wav"); + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "disruptor/muzzle_flash" ); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = 0; + + cgs.effects.disruptorRingsEffect = trap_FX_RegisterEffect( "disruptor/rings" ); + cgs.effects.disruptorProjectileEffect = trap_FX_RegisterEffect( "disruptor/projectile" ); + cgs.effects.disruptorWallImpactEffect = trap_FX_RegisterEffect( "disruptor/wall_impact" ); + cgs.effects.disruptorFleshImpactEffect = trap_FX_RegisterEffect( "disruptor/flesh_impact" ); + cgs.effects.disruptorAltMissEffect = trap_FX_RegisterEffect( "disruptor/alt_miss" ); + cgs.effects.disruptorAltHitEffect = trap_FX_RegisterEffect( "disruptor/alt_hit" ); + + trap_R_RegisterShader( "gfx/effects/redLine" ); + trap_R_RegisterShader( "gfx/misc/whiteline2" ); + trap_R_RegisterShader( "gfx/effects/smokeTrail" ); + + trap_S_RegisterSound("sound/weapons/disruptor/zoomstart.wav"); + trap_S_RegisterSound("sound/weapons/disruptor/zoomend.wav"); + + // Disruptor gun zoom interface + cgs.media.disruptorMask = trap_R_RegisterShader( "gfx/2d/cropCircle2"); + cgs.media.disruptorInsert = trap_R_RegisterShader( "gfx/2d/cropCircle"); + cgs.media.disruptorLight = trap_R_RegisterShader( "gfx/2d/cropCircleGlow" ); + cgs.media.disruptorInsertTick = trap_R_RegisterShader( "gfx/2d/insertTick" ); + cgs.media.disruptorChargeShader = trap_R_RegisterShaderNoMip("gfx/2d/crop_charge"); + + cgs.media.disruptorZoomLoop = trap_S_RegisterSound( "sound/weapons/disruptor/zoomloop.wav" ); + break; + + case WP_BOWCASTER: + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/bowcaster/fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "bowcaster/muzzle_flash" ); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor = {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_BowcasterProjectileThink; + + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/bowcaster/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = trap_S_RegisterSound( "sound/weapons/bowcaster/altcharge.wav"); + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "bowcaster/muzzle_flash" ); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor= {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_BowcasterAltProjectileThink; + + cgs.effects.bowcasterShotEffect = trap_FX_RegisterEffect( "bowcaster/shot" ); + cgs.effects.bowcasterImpactEffect = trap_FX_RegisterEffect( "bowcaster/explosion" ); + + cgs.media.greenFrontFlash = trap_R_RegisterShader( "gfx/effects/greenFrontFlash" ); + break; + + case WP_REPEATER: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/repeater/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "repeater/muzzle_flash" ); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_RepeaterProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/repeater/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "repeater/muzzle_flash" ); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_RepeaterAltProjectileThink; + + cgs.effects.repeaterProjectileEffect = trap_FX_RegisterEffect( "repeater/projectile" ); + cgs.effects.repeaterAltProjectileEffect = trap_FX_RegisterEffect( "repeater/alt_projectile" ); + cgs.effects.repeaterWallImpactEffect = trap_FX_RegisterEffect( "repeater/wall_impact" ); + cgs.effects.repeaterFleshImpactEffect = trap_FX_RegisterEffect( "repeater/flesh_impact" ); + //cgs.effects.repeaterAltWallImpactEffect = trap_FX_RegisterEffect( "repeater/alt_wall_impact" ); + cgs.effects.repeaterAltWallImpactEffect = trap_FX_RegisterEffect( "repeater/concussion" ); + break; + + case WP_DEMP2: + weaponInfo->flashSound[0] = trap_S_RegisterSound("sound/weapons/demp2/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect("demp2/muzzle_flash"); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_DEMP2_ProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound("sound/weapons/demp2/altfire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = trap_S_RegisterSound("sound/weapons/demp2/altCharge.wav"); + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect("demp2/muzzle_flash"); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = 0; + + cgs.effects.demp2ProjectileEffect = trap_FX_RegisterEffect( "demp2/projectile" ); + cgs.effects.demp2WallImpactEffect = trap_FX_RegisterEffect( "demp2/wall_impact" ); + cgs.effects.demp2FleshImpactEffect = trap_FX_RegisterEffect( "demp2/flesh_impact" ); + + trap_FX_RegisterEffect("demp2/altDetonate.efx"); + cgs.media.demp2Shell = trap_R_RegisterModel( "models/items/sphere.md3" ); + cgs.media.demp2ShellShader = trap_R_RegisterShader( "gfx/effects/demp2shell" ); + + cgs.media.lightningFlash = trap_R_RegisterShader("gfx/misc/lightningFlash"); + break; + + case WP_FLECHETTE: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/flechette/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "flechette/muzzle_flash" ); + weaponInfo->missileModel = trap_R_RegisterModel("models/weapons2/golan_arms/projectileMain.md3"); + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_FlechetteProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/flechette/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "flechette/muzzle_flash" ); + weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/golan_arms/projectile.md3" ); + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_FlechetteAltProjectileThink; + + cgs.effects.flechetteShotEffect = trap_FX_RegisterEffect( "flechette/shot" ); + cgs.effects.flechetteAltShotEffect = trap_FX_RegisterEffect( "flechette/alt_shot" ); + cgs.effects.flechetteWallImpactEffect = trap_FX_RegisterEffect( "flechette/wall_impact" ); + cgs.effects.flechetteFleshImpactEffect = trap_FX_RegisterEffect( "flechette/flesh_impact" ); + + trap_FX_RegisterEffect("flechette/alt_blow.efx"); + break; + + case WP_ROCKET_LAUNCHER: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/rocket/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "rocket/muzzle_flash" ); + weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/merr_sonn/projectile.md3" ); + weaponInfo->missileSound = trap_S_RegisterSound( "sound/weapons/rocket/missileloop.wav"); + weaponInfo->missileDlight = 125; + VectorSet(weaponInfo->missileDlightColor, 1.0, 1.0, 0.5); + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_RocketProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/rocket/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "rocket/muzzle_flash" ); + weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/merr_sonn/projectile.md3" ); + weaponInfo->altMissileSound = trap_S_RegisterSound( "sound/weapons/rocket/missileloop.wav"); + weaponInfo->altMissileDlight = 125; + VectorSet(weaponInfo->altMissileDlightColor, 1.0, 1.0, 0.5); + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_RocketAltProjectileThink; + + cgs.effects.rocketShotEffect = trap_FX_RegisterEffect( "rocket/shot" ); + cgs.effects.rocketExplosionEffect = trap_FX_RegisterEffect( "rocket/explosion" ); + + trap_R_RegisterShaderNoMip( "gfx/2d/wedge" ); + trap_R_RegisterShaderNoMip( "gfx/2d/lock" ); + + trap_S_RegisterSound( "sound/weapons/rocket/lock.wav" ); + trap_S_RegisterSound( "sound/weapons/rocket/tick.wav" ); + break; + + case WP_THERMAL: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/thermal/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = trap_S_RegisterSound( "sound/weapons/thermal/charge.wav"); + weaponInfo->muzzleEffect = NULL_FX; + weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/thermal/thermal_proj.md3" ); + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = 0; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/thermal/fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = trap_S_RegisterSound( "sound/weapons/thermal/charge.wav"); + weaponInfo->altMuzzleEffect = NULL_FX; + weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/thermal/thermal_proj.md3" ); + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = 0; + + cgs.effects.thermalExplosionEffect = trap_FX_RegisterEffect( "thermal/explosion" ); + cgs.effects.thermalShockwaveEffect = trap_FX_RegisterEffect( "thermal/shockwave" ); + + cgs.media.grenadeBounce1 = trap_S_RegisterSound( "sound/weapons/thermal/bounce1.wav" ); + cgs.media.grenadeBounce2 = trap_S_RegisterSound( "sound/weapons/thermal/bounce2.wav" ); + + trap_S_RegisterSound( "sound/weapons/thermal/thermloop.wav" ); + trap_S_RegisterSound( "sound/weapons/thermal/warning.wav" ); + + break; + + case WP_TRIP_MINE: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/laser_trap/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = NULL_FX; + weaponInfo->missileModel = 0;//trap_R_RegisterModel( "models/weapons2/laser_trap/laser_trap_w.md3" ); + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = 0; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/laser_trap/fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = NULL_FX; + weaponInfo->altMissileModel = 0;//trap_R_RegisterModel( "models/weapons2/laser_trap/laser_trap_w.md3" ); + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = 0; + + cgs.effects.tripmineLaserFX = trap_FX_RegisterEffect("tripMine/laserMP.efx"); + + trap_FX_RegisterEffect( "tripMine/explosion" ); + // NOTENOTE temp stuff + trap_S_RegisterSound( "sound/weapons/laser_trap/stick.wav" ); + trap_S_RegisterSound( "sound/weapons/laser_trap/warning.wav" ); + break; + + case WP_DET_PACK: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/detpack/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = NULL_FX; + weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/detpack/det_pack.md3" ); + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = 0; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/detpack/fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = NULL_FX; + weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/detpack/det_pack.md3" ); + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = 0; + + trap_FX_RegisterEffect( "detpack/explosion.efx" ); + + trap_R_RegisterModel( "models/weapons2/detpack/det_pack.md3" ); + trap_S_RegisterSound( "sound/weapons/detpack/stick.wav" ); + trap_S_RegisterSound( "sound/weapons/detpack/warning.wav" ); + trap_S_RegisterSound( "sound/weapons/explosions/explode5.wav" ); + break; + + default: + MAKERGB( weaponInfo->flashDlightColor, 1, 1, 1 ); + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/rocket/rocklf1a.wav" ); + break; + } +} diff --git a/code/cgame/cg_weaponinit.c b/code/cgame/cg_weaponinit.c new file mode 100644 index 0000000..27ee2c6 --- /dev/null +++ b/code/cgame/cg_weaponinit.c @@ -0,0 +1,521 @@ +// +// cg_weaponinit.c -- events and effects dealing with weapons +#include "cg_local.h" +#include "fx_local.h" + + +/* +================= +CG_RegisterWeapon + +The server says this item is used on this level +================= +*/ +void CG_RegisterWeapon( int weaponNum) { + weaponInfo_t *weaponInfo; + gitem_t *item, *ammo; + char path[MAX_QPATH]; + vec3_t mins, maxs; + int i; + + weaponInfo = &cg_weapons[weaponNum]; + + if ( weaponNum == 0 ) { + return; + } + + if ( weaponInfo->registered ) { + return; + } + + memset( weaponInfo, 0, sizeof( *weaponInfo ) ); + weaponInfo->registered = qtrue; + + for ( item = bg_itemlist + 1 ; item->classname ; item++ ) { + if ( item->giType == IT_WEAPON && item->giTag == weaponNum ) { + weaponInfo->item = item; + break; + } + } + if ( !item->classname ) { + CG_Error( "Couldn't find weapon %i", weaponNum ); + } + CG_RegisterItemVisuals( item - bg_itemlist ); + + // load cmodel before model so filecache works + weaponInfo->weaponModel = trap_R_RegisterModel( item->world_model[0] ); + // load in-view model also + weaponInfo->viewModel = trap_R_RegisterModel(item->view_model); + + // calc midpoint for rotation + trap_R_ModelBounds( weaponInfo->weaponModel, mins, maxs ); + for ( i = 0 ; i < 3 ; i++ ) { + weaponInfo->weaponMidpoint[i] = mins[i] + 0.5 * ( maxs[i] - mins[i] ); + } + + weaponInfo->weaponIcon = trap_R_RegisterShader( item->icon ); + weaponInfo->ammoIcon = trap_R_RegisterShader( item->icon ); + + for ( ammo = bg_itemlist + 1 ; ammo->classname ; ammo++ ) { + if ( ammo->giType == IT_AMMO && ammo->giTag == weaponNum ) { + break; + } + } + if ( ammo->classname && ammo->world_model[0] ) { + weaponInfo->ammoModel = trap_R_RegisterModel( ammo->world_model[0] ); + } + +// strcpy( path, item->view_model ); +// COM_StripExtension( path, path ); +// strcat( path, "_flash.md3" ); + weaponInfo->flashModel = 0;//trap_R_RegisterModel( path ); + + if (weaponNum == WP_DISRUPTOR || + weaponNum == WP_FLECHETTE || + weaponNum == WP_REPEATER || + weaponNum == WP_ROCKET_LAUNCHER) + { + strcpy( path, item->view_model ); + COM_StripExtension( path, path ); + strcat( path, "_barrel.md3" ); + weaponInfo->barrelModel = trap_R_RegisterModel( path ); + } + else if (weaponNum == WP_STUN_BATON) + { //only weapon with more than 1 barrel.. + trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel.md3"); + trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel2.md3"); + trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel3.md3"); + } + else + { + weaponInfo->barrelModel = 0; + } + + if (weaponNum != WP_SABER) + { + strcpy( path, item->view_model ); + COM_StripExtension( path, path ); + strcat( path, "_hand.md3" ); + weaponInfo->handsModel = trap_R_RegisterModel( path ); + } + else + { + weaponInfo->handsModel = 0; + } + +// if ( !weaponInfo->handsModel ) { +// weaponInfo->handsModel = trap_R_RegisterModel( "models/weapons2/shotgun/shotgun_hand.md3" ); +// } + + cgs.effects.forceLightning = trap_FX_RegisterEffect( "effects/force/lightning.efx" ); + cgs.effects.forceLightningWide = trap_FX_RegisterEffect( "effects/force/lightningwide.efx" ); + + cgs.effects.forceDrain = trap_FX_RegisterEffect( "effects/mp/drain.efx" ); + cgs.effects.forceDrainWide = trap_FX_RegisterEffect( "effects/mp/drainwide.efx" ); + cgs.effects.forceDrained = trap_FX_RegisterEffect( "effects/mp/drainhit.efx"); + + switch ( weaponNum ) { + case WP_STUN_BATON: +/* MAKERGB( weaponInfo->flashDlightColor, 0.6f, 0.6f, 1.0f ); + weaponInfo->firingSound = trap_S_RegisterSound( "sound/weapons/saber/saberhum.wav" ); +// weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/melee/fstatck.wav" ); +*/ + //trap_R_RegisterShader( "gfx/effects/stunPass" ); + trap_FX_RegisterEffect( "stunBaton/flesh_impact" ); + //TEMP + trap_S_RegisterSound( "sound/weapons/melee/punch1.mp3" ); + trap_S_RegisterSound( "sound/weapons/melee/punch2.mp3" ); + trap_S_RegisterSound( "sound/weapons/melee/punch3.mp3" ); + trap_S_RegisterSound( "sound/weapons/melee/punch4.mp3" ); + + trap_S_RegisterSound( "sound/weapons/baton/idle.wav" ); + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/baton/fire.mp3" ); + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/baton/fire.mp3" ); + + break; + case WP_SABER: + MAKERGB( weaponInfo->flashDlightColor, 0.6f, 0.6f, 1.0f ); + weaponInfo->firingSound = trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ); + weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/saber/saber_w.glm" ); + break; + + case WP_BRYAR_PISTOL: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/bryar/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "bryar/muzzle_flash" ); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; + //weaponInfo->missileDlightColor= {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_BryarProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/bryar/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = trap_S_RegisterSound( "sound/weapons/bryar/altcharge.wav"); + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "bryar/muzzle_flash" ); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; + //weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_BryarAltProjectileThink; + + cgs.effects.bryarShotEffect = trap_FX_RegisterEffect( "bryar/shot" ); + cgs.effects.bryarPowerupShotEffect = trap_FX_RegisterEffect( "bryar/crackleShot" ); + cgs.effects.bryarWallImpactEffect = trap_FX_RegisterEffect( "bryar/wall_impact" ); + cgs.effects.bryarWallImpactEffect2 = trap_FX_RegisterEffect( "bryar/wall_impact2" ); + cgs.effects.bryarWallImpactEffect3 = trap_FX_RegisterEffect( "bryar/wall_impact3" ); + cgs.effects.bryarFleshImpactEffect = trap_FX_RegisterEffect( "bryar/flesh_impact" ); + cgs.effects.bryarDroidImpactEffect = trap_FX_RegisterEffect( "bryar/droid_impact" ); + + cgs.media.bryarFrontFlash = trap_R_RegisterShader( "gfx/effects/bryarFrontFlash" ); + + // Note these are temp shared effects + trap_FX_RegisterEffect("effects/blaster/deflect.efx"); + trap_FX_RegisterEffect("effects/blaster/wall_impact.efx"); + trap_FX_RegisterEffect("effects/blaster/flesh_impact.efx"); + trap_FX_RegisterEffect("effects/blaster/smoke_bolton.efx"); + + break; + + case WP_BLASTER: + case WP_EMPLACED_GUN: //rww - just use the same as this for now.. + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/blaster/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "blaster/muzzle_flash" ); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_BlasterProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/blaster/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "blaster/muzzle_flash" ); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_BlasterProjectileThink; + + trap_FX_RegisterEffect( "blaster/deflect" ); + cgs.effects.blasterShotEffect = trap_FX_RegisterEffect( "blaster/shot" ); + cgs.effects.blasterWallImpactEffect = trap_FX_RegisterEffect( "blaster/wall_impact" ); + cgs.effects.blasterFleshImpactEffect = trap_FX_RegisterEffect( "blaster/flesh_impact" ); + cgs.effects.blasterDroidImpactEffect = trap_FX_RegisterEffect( "blaster/droid_impact" ); + trap_FX_RegisterEffect( "blaster/smoke_bolton" ); // note: this will be called game side + break; + + case WP_DISRUPTOR: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/disruptor/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "disruptor/muzzle_flash" ); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = 0; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/disruptor/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = trap_S_RegisterSound("sound/weapons/disruptor/altCharge.wav"); + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "disruptor/muzzle_flash" ); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = 0; + + cgs.effects.disruptorRingsEffect = trap_FX_RegisterEffect( "disruptor/rings" ); + cgs.effects.disruptorProjectileEffect = trap_FX_RegisterEffect( "disruptor/projectile" ); + cgs.effects.disruptorWallImpactEffect = trap_FX_RegisterEffect( "disruptor/wall_impact" ); + cgs.effects.disruptorFleshImpactEffect = trap_FX_RegisterEffect( "disruptor/flesh_impact" ); + cgs.effects.disruptorAltMissEffect = trap_FX_RegisterEffect( "disruptor/alt_miss" ); + cgs.effects.disruptorAltHitEffect = trap_FX_RegisterEffect( "disruptor/alt_hit" ); + + trap_R_RegisterShader( "gfx/effects/redLine" ); + trap_R_RegisterShader( "gfx/misc/whiteline2" ); + trap_R_RegisterShader( "gfx/effects/smokeTrail" ); + + trap_S_RegisterSound("sound/weapons/disruptor/zoomstart.wav"); + trap_S_RegisterSound("sound/weapons/disruptor/zoomend.wav"); + + // Disruptor gun zoom interface + cgs.media.disruptorMask = trap_R_RegisterShader( "gfx/2d/cropCircle2"); + cgs.media.disruptorInsert = trap_R_RegisterShader( "gfx/2d/cropCircle"); + cgs.media.disruptorLight = trap_R_RegisterShader( "gfx/2d/cropCircleGlow" ); + cgs.media.disruptorInsertTick = trap_R_RegisterShader( "gfx/2d/insertTick" ); + cgs.media.disruptorChargeShader = trap_R_RegisterShaderNoMip("gfx/2d/crop_charge"); + + cgs.media.disruptorZoomLoop = trap_S_RegisterSound( "sound/weapons/disruptor/zoomloop.wav" ); + break; + + case WP_BOWCASTER: + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/bowcaster/fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "bowcaster/muzzle_flash" ); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor = {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_BowcasterProjectileThink; + + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/bowcaster/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = trap_S_RegisterSound( "sound/weapons/bowcaster/altcharge.wav"); + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "bowcaster/muzzle_flash" ); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor= {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_BowcasterAltProjectileThink; + + cgs.effects.bowcasterShotEffect = trap_FX_RegisterEffect( "bowcaster/shot" ); + cgs.effects.bowcasterImpactEffect = trap_FX_RegisterEffect( "bowcaster/explosion" ); + + cgs.media.greenFrontFlash = trap_R_RegisterShader( "gfx/effects/greenFrontFlash" ); + break; + + case WP_REPEATER: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/repeater/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "repeater/muzzle_flash" ); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_RepeaterProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/repeater/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "repeater/muzzle_flash" ); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_RepeaterAltProjectileThink; + + cgs.effects.repeaterProjectileEffect = trap_FX_RegisterEffect( "repeater/projectile" ); + cgs.effects.repeaterAltProjectileEffect = trap_FX_RegisterEffect( "repeater/alt_projectile" ); + cgs.effects.repeaterWallImpactEffect = trap_FX_RegisterEffect( "repeater/wall_impact" ); + cgs.effects.repeaterFleshImpactEffect = trap_FX_RegisterEffect( "repeater/flesh_impact" ); + //cgs.effects.repeaterAltWallImpactEffect = trap_FX_RegisterEffect( "repeater/alt_wall_impact" ); + cgs.effects.repeaterAltWallImpactEffect = trap_FX_RegisterEffect( "repeater/concussion" ); + break; + + case WP_DEMP2: + weaponInfo->flashSound[0] = trap_S_RegisterSound("sound/weapons/demp2/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect("demp2/muzzle_flash"); + weaponInfo->missileModel = NULL_HANDLE; + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_DEMP2_ProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound("sound/weapons/demp2/altfire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = trap_S_RegisterSound("sound/weapons/demp2/altCharge.wav"); + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect("demp2/muzzle_flash"); + weaponInfo->altMissileModel = NULL_HANDLE; + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = 0; + + cgs.effects.demp2ProjectileEffect = trap_FX_RegisterEffect( "demp2/projectile" ); + cgs.effects.demp2WallImpactEffect = trap_FX_RegisterEffect( "demp2/wall_impact" ); + cgs.effects.demp2FleshImpactEffect = trap_FX_RegisterEffect( "demp2/flesh_impact" ); + + trap_FX_RegisterEffect("demp2/altDetonate.efx"); + cgs.media.demp2Shell = trap_R_RegisterModel( "models/items/sphere.md3" ); + cgs.media.demp2ShellShader = trap_R_RegisterShader( "gfx/effects/demp2shell" ); + + cgs.media.lightningFlash = trap_R_RegisterShader("gfx/misc/lightningFlash"); + break; + + case WP_FLECHETTE: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/flechette/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "flechette/muzzle_flash" ); + weaponInfo->missileModel = trap_R_RegisterModel("models/weapons2/golan_arms/projectileMain.md3"); + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_FlechetteProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/flechette/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "flechette/muzzle_flash" ); + weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/golan_arms/projectile.md3" ); + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_FlechetteAltProjectileThink; + + cgs.effects.flechetteShotEffect = trap_FX_RegisterEffect( "flechette/shot" ); + cgs.effects.flechetteAltShotEffect = trap_FX_RegisterEffect( "flechette/alt_shot" ); + cgs.effects.flechetteWallImpactEffect = trap_FX_RegisterEffect( "flechette/wall_impact" ); + cgs.effects.flechetteFleshImpactEffect = trap_FX_RegisterEffect( "flechette/flesh_impact" ); + + trap_FX_RegisterEffect("flechette/alt_blow.efx"); + break; + + case WP_ROCKET_LAUNCHER: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/rocket/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "rocket/muzzle_flash" ); + weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/merr_sonn/projectile.md3" ); + weaponInfo->missileSound = trap_S_RegisterSound( "sound/weapons/rocket/missileloop.wav"); + weaponInfo->missileDlight = 125; + VectorSet(weaponInfo->missileDlightColor, 1.0, 1.0, 0.5); + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = FX_RocketProjectileThink; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/rocket/alt_fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "rocket/muzzle_flash" ); + weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/merr_sonn/projectile.md3" ); + weaponInfo->altMissileSound = trap_S_RegisterSound( "sound/weapons/rocket/missileloop.wav"); + weaponInfo->altMissileDlight = 125; + VectorSet(weaponInfo->altMissileDlightColor, 1.0, 1.0, 0.5); + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = FX_RocketAltProjectileThink; + + cgs.effects.rocketShotEffect = trap_FX_RegisterEffect( "rocket/shot" ); + cgs.effects.rocketExplosionEffect = trap_FX_RegisterEffect( "rocket/explosion" ); + + trap_R_RegisterShaderNoMip( "gfx/2d/wedge" ); + trap_R_RegisterShaderNoMip( "gfx/2d/lock" ); + + trap_S_RegisterSound( "sound/weapons/rocket/lock.wav" ); + trap_S_RegisterSound( "sound/weapons/rocket/tick.wav" ); + break; + + case WP_THERMAL: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/thermal/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = trap_S_RegisterSound( "sound/weapons/thermal/charge.wav"); + weaponInfo->muzzleEffect = NULL_FX; + weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/thermal/thermal_proj.md3" ); + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = 0; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/thermal/fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = trap_S_RegisterSound( "sound/weapons/thermal/charge.wav"); + weaponInfo->altMuzzleEffect = NULL_FX; + weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/thermal/thermal_proj.md3" ); + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = 0; + + cgs.effects.thermalExplosionEffect = trap_FX_RegisterEffect( "thermal/explosion" ); + cgs.effects.thermalShockwaveEffect = trap_FX_RegisterEffect( "thermal/shockwave" ); + + cgs.media.grenadeBounce1 = trap_S_RegisterSound( "sound/weapons/thermal/bounce1.wav" ); + cgs.media.grenadeBounce2 = trap_S_RegisterSound( "sound/weapons/thermal/bounce2.wav" ); + + trap_S_RegisterSound( "sound/weapons/thermal/thermloop.wav" ); + trap_S_RegisterSound( "sound/weapons/thermal/warning.wav" ); + + break; + + case WP_TRIP_MINE: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/laser_trap/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = NULL_FX; + weaponInfo->missileModel = 0;//trap_R_RegisterModel( "models/weapons2/laser_trap/laser_trap_w.md3" ); + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = 0; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/laser_trap/fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = NULL_FX; + weaponInfo->altMissileModel = 0;//trap_R_RegisterModel( "models/weapons2/laser_trap/laser_trap_w.md3" ); + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = 0; + + cgs.effects.tripmineLaserFX = trap_FX_RegisterEffect("tripMine/laserMP.efx"); + + trap_FX_RegisterEffect( "tripMine/explosion" ); + // NOTENOTE temp stuff + trap_S_RegisterSound( "sound/weapons/laser_trap/stick.wav" ); + trap_S_RegisterSound( "sound/weapons/laser_trap/warning.wav" ); + break; + + case WP_DET_PACK: + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/detpack/fire.wav"); + weaponInfo->firingSound = NULL_SOUND; + weaponInfo->chargeSound = NULL_SOUND; + weaponInfo->muzzleEffect = NULL_FX; + weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/detpack/det_pack.md3" ); + weaponInfo->missileSound = NULL_SOUND; + weaponInfo->missileDlight = 0; +// weaponInfo->missileDlightColor = {0,0,0}; + weaponInfo->missileHitSound = NULL_SOUND; + weaponInfo->missileTrailFunc = 0; + + weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/detpack/fire.wav"); + weaponInfo->altFiringSound = NULL_SOUND; + weaponInfo->altChargeSound = NULL_SOUND; + weaponInfo->altMuzzleEffect = NULL_FX; + weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/detpack/det_pack.md3" ); + weaponInfo->altMissileSound = NULL_SOUND; + weaponInfo->altMissileDlight = 0; +// weaponInfo->altMissileDlightColor= {0,0,0}; + weaponInfo->altMissileHitSound = NULL_SOUND; + weaponInfo->altMissileTrailFunc = 0; + + trap_FX_RegisterEffect( "detpack/explosion.efx" ); + + trap_R_RegisterModel( "models/weapons2/detpack/det_pack.md3" ); + trap_S_RegisterSound( "sound/weapons/detpack/stick.wav" ); + trap_S_RegisterSound( "sound/weapons/detpack/warning.wav" ); + trap_S_RegisterSound( "sound/weapons/explosions/explode5.wav" ); + break; + + default: + MAKERGB( weaponInfo->flashDlightColor, 1, 1, 1 ); + weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/rocket/rocklf1a.wav" ); + break; + } +} diff --git a/code/cgame/cg_weapons (2).c b/code/cgame/cg_weapons (2).c new file mode 100644 index 0000000..5c29812 --- /dev/null +++ b/code/cgame/cg_weapons (2).c @@ -0,0 +1,2243 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_weapons.c -- events and effects dealing with weapons +#include "cg_local.h" +#include "fx_local.h" + +extern vec4_t bluehudtint; +extern vec4_t redhudtint; +extern float *hudTintColor; + +/* +Ghoul2 Insert Start +*/ +// set up the appropriate ghoul2 info to a refent +void CG_SetGhoul2InfoRef( refEntity_t *ent, refEntity_t *s1) +{ + ent->ghoul2 = s1->ghoul2; + VectorCopy( s1->modelScale, ent->modelScale); + ent->radius = s1->radius; + VectorCopy( s1->angles, ent->angles); +} + +/* +Ghoul2 Insert End +*/ + +/* +================= +CG_RegisterItemVisuals + +The server says this item is used on this level +================= +*/ +void CG_RegisterItemVisuals( int itemNum ) { + itemInfo_t *itemInfo; + gitem_t *item; + int handle; + + if ( itemNum < 0 || itemNum >= bg_numItems ) { + CG_Error( "CG_RegisterItemVisuals: itemNum %d out of range [0-%d]", itemNum, bg_numItems-1 ); + } + + itemInfo = &cg_items[ itemNum ]; + if ( itemInfo->registered ) { + return; + } + + item = &bg_itemlist[ itemNum ]; + + memset( itemInfo, 0, sizeof( &itemInfo ) ); + itemInfo->registered = qtrue; + + if (item->giType == IT_TEAM && + (item->giTag == PW_REDFLAG || item->giTag == PW_BLUEFLAG) && + cgs.gametype == GT_CTY) + { //in CTY the flag model is different + itemInfo->models[0] = trap_R_RegisterModel( item->world_model[1] ); + } + else if (item->giType == IT_WEAPON && + (item->giTag == WP_THERMAL || item->giTag == WP_TRIP_MINE || item->giTag == WP_DET_PACK)) + { + itemInfo->models[0] = trap_R_RegisterModel( item->world_model[1] ); + } + else + { + itemInfo->models[0] = trap_R_RegisterModel( item->world_model[0] ); + } +/* +Ghoul2 Insert Start +*/ + if (!Q_stricmp(&item->world_model[0][strlen(item->world_model[0]) - 4], ".glm")) + { + handle = trap_G2API_InitGhoul2Model(&itemInfo->g2Models[0], item->world_model[0], 0 , 0, 0, 0, 0); + if (handle<0) + { + itemInfo->g2Models[0] = NULL; + } + else + { + itemInfo->radius[0] = 60; + } + } +/* +Ghoul2 Insert End +*/ + if (item->icon) + { + itemInfo->icon = trap_R_RegisterShader( item->icon ); + } + else + { + itemInfo->icon = 0; + } + + if ( item->giType == IT_WEAPON ) { + CG_RegisterWeapon( item->giTag ); + } + + // + // powerups have an accompanying ring or sphere + // + if ( item->giType == IT_POWERUP || item->giType == IT_HEALTH || + item->giType == IT_ARMOR || item->giType == IT_HOLDABLE ) { + if ( item->world_model[1] ) { + itemInfo->models[1] = trap_R_RegisterModel( item->world_model[1] ); + } + } +} + + +/* +======================================================================================== + +VIEW WEAPON + +======================================================================================== +*/ + +#define WEAPON_FORCE_BUSY_HOLSTER + +#ifdef WEAPON_FORCE_BUSY_HOLSTER +//rww - this was done as a last resort. Forgive me. +static int cgWeapFrame = 0; +static int cgWeapFrameTime = 0; +#endif + +/* +================= +CG_MapTorsoToWeaponFrame + +================= +*/ +static int CG_MapTorsoToWeaponFrame( clientInfo_t *ci, int frame, int animNum ) { + animation_t *animations = bgGlobalAnimations; +#ifdef WEAPON_FORCE_BUSY_HOLSTER + if (cg.snap->ps.forceHandExtend != HANDEXTEND_NONE || cgWeapFrameTime > cg.time) + { //the reason for the after delay is so that it doesn't snap the weapon frame to the "idle" (0) frame + //for a very quick moment + if (cgWeapFrame < 6) + { + cgWeapFrame = 6; + cgWeapFrameTime = cg.time + 10; + } + + if (cgWeapFrameTime < cg.time && cgWeapFrame < 10) + { + cgWeapFrame++; + cgWeapFrameTime = cg.time + 10; + } + + if (cg.snap->ps.forceHandExtend != HANDEXTEND_NONE && + cgWeapFrame == 10) + { + cgWeapFrameTime = cg.time + 100; + } + + return cgWeapFrame; + } + else + { + cgWeapFrame = 0; + cgWeapFrameTime = 0; + } +#endif + + switch( animNum ) + { + case TORSO_DROPWEAP1: + if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 5 ) + { + return frame - animations[animNum].firstFrame + 6; + } + break; + + case TORSO_RAISEWEAP1: + if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 4 ) + { + return frame - animations[animNum].firstFrame + 6 + 4; + } + break; + case BOTH_ATTACK1: + case BOTH_ATTACK2: + case BOTH_ATTACK3: + case BOTH_ATTACK4: + case BOTH_ATTACK5: + case BOTH_ATTACK6: + case BOTH_ATTACK7: + case BOTH_ATTACK8: + case BOTH_ATTACK9: + case BOTH_ATTACK10: + case BOTH_ATTACK11: + case BOTH_ATTACK12: + case BOTH_THERMAL_THROW: + if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 6 ) + { + return 1 + ( frame - animations[animNum].firstFrame ); + } + + break; + } + return -1; +} + + +/* +============== +CG_CalculateWeaponPosition +============== +*/ +static void CG_CalculateWeaponPosition( vec3_t origin, vec3_t angles ) { + float scale; + int delta; + float fracsin; + + VectorCopy( cg.refdef.vieworg, origin ); + VectorCopy( cg.refdefViewAngles, angles ); + + // on odd legs, invert some angles + if ( cg.bobcycle & 1 ) { + scale = -cg.xyspeed; + } else { + scale = cg.xyspeed; + } + + // gun angles from bobbing + angles[ROLL] += scale * cg.bobfracsin * 0.005; + angles[YAW] += scale * cg.bobfracsin * 0.01; + angles[PITCH] += cg.xyspeed * cg.bobfracsin * 0.005; + + // drop the weapon when landing + delta = cg.time - cg.landTime; + if ( delta < LAND_DEFLECT_TIME ) { + origin[2] += cg.landChange*0.25 * delta / LAND_DEFLECT_TIME; + } else if ( delta < LAND_DEFLECT_TIME + LAND_RETURN_TIME ) { + origin[2] += cg.landChange*0.25 * + (LAND_DEFLECT_TIME + LAND_RETURN_TIME - delta) / LAND_RETURN_TIME; + } + +#if 0 + // drop the weapon when stair climbing + delta = cg.time - cg.stepTime; + if ( delta < STEP_TIME/2 ) { + origin[2] -= cg.stepChange*0.25 * delta / (STEP_TIME/2); + } else if ( delta < STEP_TIME ) { + origin[2] -= cg.stepChange*0.25 * (STEP_TIME - delta) / (STEP_TIME/2); + } +#endif + + // idle drift + scale = cg.xyspeed + 40; + fracsin = sin( cg.time * 0.001 ); + angles[ROLL] += scale * fracsin * 0.01; + angles[YAW] += scale * fracsin * 0.01; + angles[PITCH] += scale * fracsin * 0.01; +} + + +/* +=============== +CG_LightningBolt + +Origin will be the exact tag point, which is slightly +different than the muzzle point used for determining hits. +The cent should be the non-predicted cent if it is from the player, +so the endpoint will reflect the simulated strike (lagging the predicted +angle) +=============== +*/ +static void CG_LightningBolt( centity_t *cent, vec3_t origin ) { +// trace_t trace; + refEntity_t beam; +// vec3_t forward; +// vec3_t muzzlePoint, endPoint; + + //Must be a durational weapon that continuously generates an effect. + if ( cent->currentState.weapon == WP_DEMP2 && cent->currentState.eFlags & EF_ALT_FIRING ) + { /*nothing*/ } + else + { + return; + } + + memset( &beam, 0, sizeof( beam ) ); + + // NOTENOTE No lightning gun-ish stuff yet. +/* + // CPMA "true" lightning + if ((cent->currentState.number == cg.predictedPlayerState.clientNum) && (cg_trueLightning.value != 0)) { + vec3_t angle; + int i; + + for (i = 0; i < 3; i++) { + float a = cent->lerpAngles[i] - cg.refdefViewAngles[i]; + if (a > 180) { + a -= 360; + } + if (a < -180) { + a += 360; + } + + angle[i] = cg.refdefViewAngles[i] + a * (1.0 - cg_trueLightning.value); + if (angle[i] < 0) { + angle[i] += 360; + } + if (angle[i] > 360) { + angle[i] -= 360; + } + } + + AngleVectors(angle, forward, NULL, NULL ); + VectorCopy(cent->lerpOrigin, muzzlePoint ); +// VectorCopy(cg.refdef.vieworg, muzzlePoint ); + } else { + // !CPMA + AngleVectors( cent->lerpAngles, forward, NULL, NULL ); + VectorCopy(cent->lerpOrigin, muzzlePoint ); + } + + // FIXME: crouch + muzzlePoint[2] += DEFAULT_VIEWHEIGHT; + + VectorMA( muzzlePoint, 14, forward, muzzlePoint ); + + // project forward by the lightning range + VectorMA( muzzlePoint, LIGHTNING_RANGE, forward, endPoint ); + + // see if it hit a wall + CG_Trace( &trace, muzzlePoint, vec3_origin, vec3_origin, endPoint, + cent->currentState.number, MASK_SHOT ); + + // this is the endpoint + VectorCopy( trace.endpos, beam.oldorigin ); + + // use the provided origin, even though it may be slightly + // different than the muzzle origin + VectorCopy( origin, beam.origin ); + + beam.reType = RT_LIGHTNING; + beam.customShader = cgs.media.lightningShader; + trap_R_AddRefEntityToScene( &beam ); +*/ + + // NOTENOTE No lightning gun-ish stuff yet. +/* + // add the impact flare if it hit something + if ( trace.fraction < 1.0 ) { + vec3_t angles; + vec3_t dir; + + VectorSubtract( beam.oldorigin, beam.origin, dir ); + VectorNormalize( dir ); + + memset( &beam, 0, sizeof( beam ) ); + beam.hModel = cgs.media.lightningExplosionModel; + + VectorMA( trace.endpos, -16, dir, beam.origin ); + + // make a random orientation + angles[0] = rand() % 360; + angles[1] = rand() % 360; + angles[2] = rand() % 360; + AnglesToAxis( angles, beam.axis ); + trap_R_AddRefEntityToScene( &beam ); + } +*/ +} + + +/* +======================== +CG_AddWeaponWithPowerups +======================== +*/ +static void CG_AddWeaponWithPowerups( refEntity_t *gun, int powerups ) { + // add powerup effects + trap_R_AddRefEntityToScene( gun ); + + if ( powerups & ( 1 << PW_BATTLESUIT ) ) { + gun->customShader = cgs.media.battleWeaponShader; + trap_R_AddRefEntityToScene( gun ); + } + if ( powerups & ( 1 << PW_QUAD ) ) { + gun->customShader = cgs.media.quadWeaponShader; + trap_R_AddRefEntityToScene( gun ); + } +} + + +/* +============= +CG_AddPlayerWeapon + +Used for both the view weapon (ps is valid) and the world modelother character models (ps is NULL) +The main player will have this called for BOTH cases, so effects like light and +sound should only be done on the world model case. +============= +*/ +void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent, int team, vec3_t newAngles, qboolean thirdPerson ) { + refEntity_t gun; + refEntity_t barrel; + vec3_t angles; + weapon_t weaponNum; + weaponInfo_t *weapon; + centity_t *nonPredictedCent; + refEntity_t flash; + + weaponNum = cent->currentState.weapon; + + if (cent->currentState.weapon == WP_EMPLACED_GUN) + { + return; + } + + CG_RegisterWeapon( weaponNum ); + weapon = &cg_weapons[weaponNum]; +/* +Ghoul2 Insert Start +*/ + + memset( &gun, 0, sizeof( gun ) ); + + // only do this if we are in first person, since world weapons are now handled on the server by Ghoul2 + if (!thirdPerson) + { + + // add the weapon + VectorCopy( parent->lightingOrigin, gun.lightingOrigin ); + gun.shadowPlane = parent->shadowPlane; + gun.renderfx = parent->renderfx; + + if (ps) + { // this player, in first person view + gun.hModel = weapon->viewModel; + } + else + { + gun.hModel = weapon->weaponModel; + } + if (!gun.hModel) { + return; + } + + if ( !ps ) { + // add weapon ready sound + cent->pe.lightningFiring = qfalse; + if ( ( cent->currentState.eFlags & EF_FIRING ) && weapon->firingSound ) { + // lightning gun and guantlet make a different sound when fire is held down + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, weapon->firingSound ); + cent->pe.lightningFiring = qtrue; + } else if ( weapon->readySound ) { + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, weapon->readySound ); + } + } + + CG_PositionEntityOnTag( &gun, parent, parent->hModel, "tag_weapon"); + + if (!CG_IsMindTricked(cent->currentState.trickedentindex, + cent->currentState.trickedentindex2, + cent->currentState.trickedentindex3, + cent->currentState.trickedentindex4, + cg.snap->ps.clientNum)) + { + CG_AddWeaponWithPowerups( &gun, cent->currentState.powerups ); //don't draw the weapon if the player is invisible + /* + if ( weaponNum == WP_STUN_BATON ) + { + gun.shaderRGBA[0] = gun.shaderRGBA[1] = gun.shaderRGBA[2] = 25; + + gun.customShader = trap_R_RegisterShader( "gfx/effects/stunPass" ); + gun.renderfx = RF_RGB_TINT | RF_FIRST_PERSON | RF_DEPTHHACK; + trap_R_AddRefEntityToScene( &gun ); + } + */ + } + + if (weaponNum == WP_STUN_BATON) + { + int i = 0; + + while (i < 3) + { + memset( &barrel, 0, sizeof( barrel ) ); + VectorCopy( parent->lightingOrigin, barrel.lightingOrigin ); + barrel.shadowPlane = parent->shadowPlane; + barrel.renderfx = parent->renderfx; + + if (i == 0) + { + barrel.hModel = trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel.md3"); + } + else if (i == 1) + { + barrel.hModel = trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel2.md3"); + } + else + { + barrel.hModel = trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel3.md3"); + } + angles[YAW] = 0; + angles[PITCH] = 0; + angles[ROLL] = 0; + + AnglesToAxis( angles, barrel.axis ); + + if (i == 0) + { + CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel" ); + } + else if (i == 1) + { + CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel2" ); + } + else + { + CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel3" ); + } + CG_AddWeaponWithPowerups( &barrel, cent->currentState.powerups ); + + i++; + } + } + else + { + // add the spinning barrel + if ( weapon->barrelModel ) { + memset( &barrel, 0, sizeof( barrel ) ); + VectorCopy( parent->lightingOrigin, barrel.lightingOrigin ); + barrel.shadowPlane = parent->shadowPlane; + barrel.renderfx = parent->renderfx; + + barrel.hModel = weapon->barrelModel; + angles[YAW] = 0; + angles[PITCH] = 0; + angles[ROLL] = 0; + + AnglesToAxis( angles, barrel.axis ); + + CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel" ); + + CG_AddWeaponWithPowerups( &barrel, cent->currentState.powerups ); + } + } + } +/* +Ghoul2 Insert End +*/ + + memset (&flash, 0, sizeof(flash)); + CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash"); + + VectorCopy(flash.origin, cg.lastFPFlashPoint); + + // Do special charge bits + //----------------------- + if ( (ps || cg.renderingThirdPerson || cg.predictedPlayerState.clientNum != cent->currentState.number) && + ( ( cent->currentState.modelindex2 == WEAPON_CHARGING_ALT && cent->currentState.weapon == WP_BRYAR_PISTOL ) || + ( cent->currentState.weapon == WP_BOWCASTER && cent->currentState.modelindex2 == WEAPON_CHARGING ) || + ( cent->currentState.weapon == WP_DEMP2 && cent->currentState.modelindex2 == WEAPON_CHARGING_ALT) ) ) + { + int shader = 0; + float val = 0.0f; + float scale = 1.0f; + addspriteArgStruct_t fxSArgs; + vec3_t flashorigin, flashdir; + + if (!thirdPerson) + { + VectorCopy(flash.origin, flashorigin); + VectorCopy(flash.axis[0], flashdir); + } + else + { + mdxaBone_t boltMatrix; + + if (!trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { //it's quite possible that we may have have no weapon model and be in a valid state, so return here if this is the case + return; + } + + // go away and get me the bolt position for this frame please + if (!(trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, newAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale))) + { // Couldn't find bolt point. + return; + } + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); + } + + if ( cent->currentState.weapon == WP_BRYAR_PISTOL ) + { + // Hardcoded max charge time of 1 second + val = ( cg.time - cent->currentState.constantLight ) * 0.001f; + shader = cgs.media.bryarFrontFlash; + } + else if ( cent->currentState.weapon == WP_BOWCASTER ) + { + // Hardcoded max charge time of 1 second + val = ( cg.time - cent->currentState.constantLight ) * 0.001f; + shader = cgs.media.greenFrontFlash; + } + else if ( cent->currentState.weapon == WP_DEMP2 ) + { + val = ( cg.time - cent->currentState.constantLight ) * 0.001f; + shader = cgs.media.lightningFlash; + scale = 1.75f; + } + + if ( val < 0.0f ) + { + val = 0.0f; + } + else if ( val > 1.0f ) + { + val = 1.0f; + if (ps && cent->currentState.number == ps->clientNum) + { + CGCam_Shake( /*0.1f*/0.2f, 100 ); + } + } + else + { + if (ps && cent->currentState.number == ps->clientNum) + { + CGCam_Shake( val * val * /*0.3f*/0.6f, 100 ); + } + } + + val += random() * 0.5f; + + VectorCopy(flashorigin, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = 3.0f*val*scale; + fxSArgs.dscale = 0.0f; + fxSArgs.sAlpha = 0.7f; + fxSArgs.eAlpha = 0.7f; + fxSArgs.rotation = random()*360; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + fxSArgs.shader = shader; + fxSArgs.flags = 0x08000000; + + //FX_AddSprite( flash.origin, NULL, NULL, 3.0f * val, 0.0f, 0.7f, 0.7f, WHITE, WHITE, random() * 360, 0.0f, 1.0f, shader, FX_USE_ALPHA ); + trap_FX_AddSprite(&fxSArgs); + } + + // make sure we aren't looking at cg.predictedPlayerEntity for LG + nonPredictedCent = &cg_entities[cent->currentState.clientNum]; + + // if the index of the nonPredictedCent is not the same as the clientNum + // then this is a fake player (like on teh single player podiums), so + // go ahead and use the cent + if( ( nonPredictedCent - cg_entities ) != cent->currentState.clientNum ) { + nonPredictedCent = cent; + } + + // add the flash + if ( ( weaponNum == WP_DEMP2) + && ( nonPredictedCent->currentState.eFlags & EF_FIRING ) ) + { + // continuous flash + } else { + // impulse flash + if ( cg.time - cent->muzzleFlashTime > MUZZLE_FLASH_TIME) { + return; + } + } + + if ( ps || cg.renderingThirdPerson || + cent->currentState.number != cg.predictedPlayerState.clientNum ) + { // Make sure we don't do the thirdperson model effects for the local player if we're in first person + vec3_t flashorigin, flashdir; + refEntity_t flash; + + memset (&flash, 0, sizeof(flash)); + + if (!thirdPerson) + { + CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash"); + VectorCopy(flash.origin, flashorigin); + VectorCopy(flash.axis[0], flashdir); + } + else + { + mdxaBone_t boltMatrix; + + if (!trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { //it's quite possible that we may have have no weapon model and be in a valid state, so return here if this is the case + return; + } + + // go away and get me the bolt position for this frame please + if (!(trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, newAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale))) + { // Couldn't find bolt point. + return; + } + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); + } + + if ( cg.time - cent->muzzleFlashTime <= MUZZLE_FLASH_TIME + 10 ) + { // Handle muzzle flashes + if ( cent->currentState.eFlags & EF_ALT_FIRING ) + { // Check the alt firing first. + if (weapon->altMuzzleEffect) + { + trap_FX_PlayEffectID(weapon->altMuzzleEffect, flashorigin, flashdir); + } + } + else + { // Regular firing + if (weapon->muzzleEffect) + { + trap_FX_PlayEffectID(weapon->muzzleEffect, flashorigin, flashdir); + } + } + } + + // add lightning bolt + CG_LightningBolt( nonPredictedCent, flashorigin ); + + if ( weapon->flashDlightColor[0] || weapon->flashDlightColor[1] || weapon->flashDlightColor[2] ) { + trap_R_AddLightToScene( flashorigin, 300 + (rand()&31), weapon->flashDlightColor[0], + weapon->flashDlightColor[1], weapon->flashDlightColor[2] ); + } + } +} + +/* +============== +CG_AddViewWeapon + +Add the weapon, and flash for the player's view +============== +*/ +void CG_AddViewWeapon( playerState_t *ps ) { + refEntity_t hand; + centity_t *cent; + clientInfo_t *ci; + float fovOffset; + vec3_t angles; + weaponInfo_t *weapon; + float cgFov = cg_fov.value; + + if (cgFov < 1) + { + cgFov = 1; + } + if (cgFov > 97) + { + cgFov = 97; + } + + if ( ps->persistant[PERS_TEAM] == TEAM_SPECTATOR ) { + return; + } + + if ( ps->pm_type == PM_INTERMISSION ) { + return; + } + + // no gun if in third person view or a camera is active + //if ( cg.renderingThirdPerson || cg.cameraMode) { + if ( cg.renderingThirdPerson ) { + return; + } + + // allow the gun to be completely removed + if ( !cg_drawGun.integer || cg.predictedPlayerState.zoomMode) { + vec3_t origin; + + if ( cg.predictedPlayerState.eFlags & EF_FIRING ) { + // special hack for lightning gun... + VectorCopy( cg.refdef.vieworg, origin ); + VectorMA( origin, -8, cg.refdef.viewaxis[2], origin ); + CG_LightningBolt( &cg_entities[ps->clientNum], origin ); + } + return; + } + + // don't draw if testing a gun model + if ( cg.testGun ) { + return; + } + + // drop gun lower at higher fov + if ( cgFov > 90 ) { + fovOffset = -0.2 * ( cgFov - 90 ); + } else { + fovOffset = 0; + } + + cent = &cg.predictedPlayerEntity; // &cg_entities[cg.snap->ps.clientNum]; + CG_RegisterWeapon( ps->weapon ); + weapon = &cg_weapons[ ps->weapon ]; + + memset (&hand, 0, sizeof(hand)); + + // set up gun position + CG_CalculateWeaponPosition( hand.origin, angles ); + + VectorMA( hand.origin, cg_gun_x.value, cg.refdef.viewaxis[0], hand.origin ); + VectorMA( hand.origin, cg_gun_y.value, cg.refdef.viewaxis[1], hand.origin ); + VectorMA( hand.origin, (cg_gun_z.value+fovOffset), cg.refdef.viewaxis[2], hand.origin ); + + AnglesToAxis( angles, hand.axis ); + + // map torso animations to weapon animations + if ( cg_gun_frame.integer ) { + // development tool + hand.frame = hand.oldframe = cg_gun_frame.integer; + hand.backlerp = 0; + } else { + // get clientinfo for animation map + ci = &cgs.clientinfo[ cent->currentState.clientNum ]; + hand.frame = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.frame, cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ); + hand.oldframe = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.oldFrame, cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ); + hand.backlerp = cent->pe.torso.backlerp; + + // Handle the fringe situation where oldframe is invalid + if ( hand.frame == -1 ) + { + hand.frame = 0; + hand.oldframe = 0; + hand.backlerp = 0; + } + else if ( hand.oldframe == -1 ) + { + hand.oldframe = hand.frame; + hand.backlerp = 0; + } + } + + hand.hModel = weapon->handsModel; + hand.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON;// | RF_MINLIGHT; + + // add everything onto the hand + CG_AddPlayerWeapon( &hand, ps, &cg.predictedPlayerEntity, ps->persistant[PERS_TEAM], angles, qfalse ); +} + +/* +============================================================================== + +WEAPON SELECTION + +============================================================================== +*/ +#define ICON_WEAPONS 0 +#define ICON_FORCE 1 +#define ICON_INVENTORY 2 + + +void CG_DrawIconBackground(void) +{ + int height,xAdd,x2,y2,t; + int prongLeftX,prongRightX; + float inTime = cg.invenSelectTime+WEAPON_SELECT_TIME; + float wpTime = cg.weaponSelectTime+WEAPON_SELECT_TIME; + float fpTime = cg.forceSelectTime+WEAPON_SELECT_TIME; + qhandle_t background; + int drawType = cgs.media.weaponIconBackground; + int prongsOn = cgs.media.weaponProngsOn; + + // don't display if dead + if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) + { + return; + } + + if (cg_hudFiles.integer) + { //simple hud + return; + } + + x2 = 30; + y2 = SCREEN_HEIGHT-70; + + prongLeftX =x2+37; + prongRightX =x2+544; + + if (inTime > wpTime) + { + drawType = cgs.media.inventoryIconBackground; + prongsOn = cgs.media.inventoryProngsOn; + cg.iconSelectTime = cg.invenSelectTime; + } + else + { + drawType = cgs.media.weaponIconBackground; + prongsOn = cgs.media.weaponProngsOn; + cg.iconSelectTime = cg.weaponSelectTime; + } + + if (fpTime > inTime && fpTime > wpTime) + { + drawType = cgs.media.forceIconBackground; + prongsOn = cgs.media.forceProngsOn; + cg.iconSelectTime = cg.forceSelectTime; + } + + if ((cg.iconSelectTime+WEAPON_SELECT_TIME)1) + { + cg.iconHUDActive = qtrue; + cg.iconHUDPercent=1; + } + else if (cg.iconHUDPercent<0) + { + cg.iconHUDPercent=0; + } + } + else + { + cg.iconHUDPercent=1; + } + + trap_R_SetColor( colorTable[CT_WHITE] ); + height = (int) (60.0f*cg.iconHUDPercent); + CG_DrawPic( x2+60, y2+30, 460, -height, drawType); // Top half + CG_DrawPic( x2+60, y2+30-2,460, height, drawType); // Bottom half + + // And now for the prongs +/* if ((cg.inventorySelectTime+WEAPON_SELECT_TIME)>cg.time) + { + cgs.media.currentBackground = ICON_INVENTORY; + background = &cgs.media.inventoryProngsOn; + } + else if ((cg.weaponSelectTime+WEAPON_SELECT_TIME)>cg.time) + {*/ + cgs.media.currentBackground = ICON_WEAPONS; + background = prongsOn; +/* } + else + { + cgs.media.currentBackground = ICON_FORCE; + background = &cgs.media.forceProngsOn; + } +*/ + // Side Prongs + trap_R_SetColor( colorTable[CT_WHITE]); + xAdd = (int) 8*cg.iconHUDPercent; + CG_DrawPic( prongLeftX+xAdd, y2-10, 40, 80, background); + CG_DrawPic( prongRightX-xAdd, y2-10, -40, 80, background); + +} + +qboolean CG_WeaponCheck(int weap) +{ + if (cg.snap->ps.ammo[weaponData[weap].ammoIndex] < weaponData[weap].energyPerShot && + cg.snap->ps.ammo[weaponData[weap].ammoIndex] < weaponData[weap].altEnergyPerShot) + { + return qfalse; + } + + return qtrue; +} + +/* +=============== +CG_WeaponSelectable +=============== +*/ +static qboolean CG_WeaponSelectable( int i ) { + /*if ( !cg.snap->ps.ammo[weaponData[i].ammoIndex] ) { + return qfalse; + }*/ + if (!i) + { + return qfalse; + } + + if (cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < weaponData[i].energyPerShot && + cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < weaponData[i].altEnergyPerShot) + { + return qfalse; + } + + if (i == WP_DET_PACK && cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < 1 && + !cg.predictedPlayerState.hasDetPackPlanted) + { + return qfalse; + } + + if ( ! (cg.predictedPlayerState.stats[ STAT_WEAPONS ] & ( 1 << i ) ) ) { + return qfalse; + } + + return qtrue; +} + +/* +=================== +CG_DrawWeaponSelect +=================== +*/ +void CG_DrawWeaponSelect( void ) { + int i; + int bits; + int count; + int smallIconSize,bigIconSize; + int holdX,x,y,pad; + int sideLeftIconCnt,sideRightIconCnt; + int sideMax,holdCount,iconCnt; + int height; + + if (cg.predictedPlayerState.emplacedIndex) + { //can't cycle when on a weapon + cg.weaponSelectTime = 0; + } + + if ((cg.weaponSelectTime+WEAPON_SELECT_TIME) (2*sideMax)) // Go to the max on each side + { + sideLeftIconCnt = sideMax; + sideRightIconCnt = sideMax; + } + else // Less than max, so do the calc + { + sideLeftIconCnt = holdCount/2; + sideRightIconCnt = holdCount - sideLeftIconCnt; + } + + i = cg.weaponSelect - 1; + if (i<1) + { + i = 13; + } + + smallIconSize = 40; + bigIconSize = 80; + pad = 12; + + x = 320; + y = 410; + + // Background +// memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); +// calcColor[3] = .35f; +// trap_R_SetColor( calcColor); + + // Left side ICONS + trap_R_SetColor(colorTable[CT_WHITE]); + // Work backwards from current icon + holdX = x - ((bigIconSize/2) + pad + smallIconSize); + height = smallIconSize * 1;//cg.iconHUDPercent; + + for (iconCnt=1;iconCnt<(sideLeftIconCnt+1);i--) + { + if (i<1) + { + i = 13; + } + + if ( !(bits & ( 1 << i ))) // Does he have this weapon? + { + continue; + } + + if ( !CG_WeaponSelectable(i) && + (i == WP_THERMAL || i == WP_TRIP_MINE) ) + { //Don't show thermal and tripmine when out of them + continue; + } + + ++iconCnt; // Good icon + + if (cgs.media.weaponIcons[i]) + { + weaponInfo_t *weaponInfo; + CG_RegisterWeapon( i ); + weaponInfo = &cg_weapons[i]; + + trap_R_SetColor(colorTable[CT_WHITE]); + if (!CG_WeaponCheck(i)) + { + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, /*weaponInfo->weaponIconNoAmmo*/cgs.media.weaponIcons_NA[i] ); + } + else + { + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, /*weaponInfo->weaponIcon*/cgs.media.weaponIcons[i] ); + } + + holdX -= (smallIconSize+pad); + } + } + + // Current Center Icon + height = bigIconSize * cg.iconHUDPercent; + if (cgs.media.weaponIcons[cg.weaponSelect]) + { + weaponInfo_t *weaponInfo; + CG_RegisterWeapon( cg.weaponSelect ); + weaponInfo = &cg_weapons[cg.weaponSelect]; + + trap_R_SetColor( colorTable[CT_WHITE]); + if (!CG_WeaponCheck(cg.weaponSelect)) + { + CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2))+10, bigIconSize, bigIconSize, cgs.media.weaponIcons_NA[cg.weaponSelect] ); + } + else + { + CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2))+10, bigIconSize, bigIconSize, cgs.media.weaponIcons[cg.weaponSelect] ); + } + } + + i = cg.weaponSelect + 1; + if (i> 13) + { + i = 1; + } + + // Right side ICONS + // Work forwards from current icon + holdX = x + (bigIconSize/2) + pad; + height = smallIconSize * cg.iconHUDPercent; + for (iconCnt=1;iconCnt<(sideRightIconCnt+1);i++) + { + if (i>13) + { + i = 1; + } + + if ( !(bits & ( 1 << i ))) // Does he have this weapon? + { + continue; + } + + if ( !CG_WeaponSelectable(i) && + (i == WP_THERMAL || i == WP_TRIP_MINE) ) + { //Don't show thermal and tripmine when out of them + continue; + } + + ++iconCnt; // Good icon + + if (/*weaponData[i].weaponIcon[0]*/cgs.media.weaponIcons[i]) + { + weaponInfo_t *weaponInfo; + CG_RegisterWeapon( i ); + weaponInfo = &cg_weapons[i]; + // No ammo for this weapon? + trap_R_SetColor( colorTable[CT_WHITE]); + if (!CG_WeaponCheck(i)) + { + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.weaponIcons_NA[i] ); + } + else + { + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.weaponIcons[i] ); + } + + + holdX += (smallIconSize+pad); + } + } + + // draw the selected name + if ( cg_weapons[ cg.weaponSelect ].item ) + { + vec4_t textColor = { .875f, .718f, .121f, 1.0f }; + char text[1024]; + + if ( trap_SP_GetStringTextString( va("INGAME_%s",cg_weapons[ cg.weaponSelect ].item->classname), text, sizeof( text ))) + { + UI_DrawProportionalString(320, y+45, text, UI_CENTER|UI_SMALLFONT, textColor); + } + else + { + UI_DrawProportionalString(320, y+45, cg_weapons[ cg.weaponSelect ].item->classname, UI_CENTER|UI_SMALLFONT, textColor); + } + } + + trap_R_SetColor( NULL ); +} + + +/* +=============== +CG_NextWeapon_f +=============== +*/ +void CG_NextWeapon_f( void ) { + int i; + int original; + + if ( !cg.snap ) { + return; + } + if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) { + return; + } + + if (cg.snap->ps.emplacedIndex) + { + return; + } + + cg.weaponSelectTime = cg.time; + original = cg.weaponSelect; + + for ( i = 0 ; i < 16 ; i++ ) { + cg.weaponSelect++; + if ( cg.weaponSelect == 16 ) { + cg.weaponSelect = 0; + } + // if ( cg.weaponSelect == WP_STUN_BATON ) { + // continue; // never cycle to gauntlet + // } + if ( CG_WeaponSelectable( cg.weaponSelect ) ) { + break; + } + } + if ( i == 16 ) { + cg.weaponSelect = original; + } + else + { + trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); + } +} + +/* +=============== +CG_PrevWeapon_f +=============== +*/ +void CG_PrevWeapon_f( void ) { + int i; + int original; + + if ( !cg.snap ) { + return; + } + if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) { + return; + } + + if (cg.snap->ps.emplacedIndex) + { + return; + } + + cg.weaponSelectTime = cg.time; + original = cg.weaponSelect; + + for ( i = 0 ; i < 16 ; i++ ) { + cg.weaponSelect--; + if ( cg.weaponSelect == -1 ) { + cg.weaponSelect = 15; + } + // if ( cg.weaponSelect == WP_STUN_BATON ) { + // continue; // never cycle to gauntlet + // } + if ( CG_WeaponSelectable( cg.weaponSelect ) ) { + break; + } + } + if ( i == 16 ) { + cg.weaponSelect = original; + } + else + { + trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); + } +} + +/* +=============== +CG_Weapon_f +=============== +*/ +void CG_Weapon_f( void ) { + int num; + + if ( !cg.snap ) { + return; + } + if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) { + return; + } + + if (cg.snap->ps.emplacedIndex) + { + return; + } + + num = atoi( CG_Argv( 1 ) ); + + if ( num < 1 || num > 15 ) { + return; + } + + if (num == 1 && cg.snap->ps.weapon == WP_SABER) + { + if (cg.snap->ps.weaponTime < 1) + { + trap_SendConsoleCommand("sv_saberswitch"); + } + return; + } + + //rww - hack to make weapon numbers same as single player + if (num > WP_STUN_BATON) + { + num++; + } + else + { + if (cg.snap->ps.stats[STAT_WEAPONS] & (1 << WP_SABER)) + { + num = WP_SABER; + } + else + { + num = WP_STUN_BATON; + } + } + + if (num > WP_DET_PACK+1) + { //other weapons are off limits due to not actually being weapon weapons + return; + } + + if (num >= WP_THERMAL) + { + int weap, i = 0; + + if (cg.snap->ps.weapon >= WP_THERMAL && + cg.snap->ps.weapon <= WP_DET_PACK) + { + // already in cycle range so start with next cycle item + weap = cg.snap->ps.weapon + 1; + } + else + { + // not in cycle range, so start with thermal detonator + weap = WP_THERMAL; + } + + // prevent an endless loop + while ( i <= 4 ) + { + if (weap > WP_DET_PACK) + { + weap = WP_THERMAL; + } + + if (CG_WeaponSelectable(weap)) + { + num = weap; + break; + } + + weap++; + i++; + } + } + + if (!CG_WeaponSelectable(num)) + { + return; + } + + cg.weaponSelectTime = cg.time; + + if ( ! ( cg.snap->ps.stats[STAT_WEAPONS] & ( 1 << num ) ) ) + { + if (num == WP_SABER) + { //don't have saber, try the stun baton on the same slot + num = WP_STUN_BATON; + + if ( ! ( cg.snap->ps.stats[STAT_WEAPONS] & ( 1 << num ) ) ) + { + return; + } + } + else + { + return; // don't have the weapon + } + } + + if (cg.weaponSelect != num) + { + trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); + } + + cg.weaponSelect = num; +} + +/* +=================== +CG_OutOfAmmoChange + +The current weapon has just run out of ammo +=================== +*/ +void CG_OutOfAmmoChange( int oldWeapon ) +{ + int i; + + cg.weaponSelectTime = cg.time; + + for ( i = WP_DET_PACK ; i > 0 ; i-- ) //We don't want the emplaced or turret + { + if ( CG_WeaponSelectable( i ) ) + { + /* + if ( 1 == cg_autoswitch.integer && + ( i == WP_TRIP_MINE || i == WP_DET_PACK || i == WP_THERMAL || i == WP_ROCKET_LAUNCHER) ) // safe weapon switch + */ + //rww - Don't we want to make sure i != one of these if autoswitch is 1 (safe)? + if (cg_autoswitch.integer != 1 || (i != WP_TRIP_MINE && i != WP_DET_PACK && i != WP_THERMAL && i != WP_ROCKET_LAUNCHER)) + { + if (i != oldWeapon) + { //don't even do anything if we're just selecting the weapon we already have/had + cg.weaponSelect = i; + break; + } + } + } + } + + trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); +} + + + +/* +=================================================================================================== + +WEAPON EVENTS + +=================================================================================================== +*/ + +void CG_FireATST(centity_t *cent, qboolean altFire) +{ +//No muzzle flash for now? +#if 0 + int getMeBolt = 0; + mdxaBone_t boltMatrix; + vec3_t flashorigin, flashdir; + + if (!cgs.clientinfo[cent->currentState.number].bolt_lhand) + { + return; + } + + if (altFire) + { + getMeBolt = cgs.clientinfo[cent->currentState.number].bolt_lhand; + } + else + { + getMeBolt = cgs.clientinfo[cent->currentState.number].bolt_rhand; + } + + if (!(trap_G2API_GetBoltMatrix(cent->ghoul2, 0, getMeBolt, &boltMatrix, cent->lerpAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale))) + { + return; + } + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); + + trap_FX_PlayEffectID(trap_FX_RegisterEffect("turret/muzzle_flash.efx"), flashorigin, flashdir); +#endif + + trap_S_StartSound(NULL, cent->currentState.number, CHAN_WEAPON, trap_S_RegisterSound(va("sound/weapons/atst/ATSTfire1.wav"/*, Q_irand(1,4)*/))); +} + +void CG_GetClientWeaponMuzzleBoltPoint(int clIndex, vec3_t to) +{ + centity_t *cent; + mdxaBone_t boltMatrix; + + if (clIndex < 0 || clIndex >= MAX_CLIENTS) + { + return; + } + + cent = &cg_entities[clIndex]; + + if (!cent || !cent->ghoul2 || !trap_G2_HaveWeGhoul2Models(cent->ghoul2) || + !trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { + return; + } + + trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, to); +} + +/* +================ +CG_FireWeapon + +Caused by an EV_FIRE_WEAPON event +================ +*/ +void CG_FireWeapon( centity_t *cent, qboolean altFire ) { + entityState_t *ent; + int c; + weaponInfo_t *weap; + + if (cent->isATST) + { + CG_FireATST(cent, altFire); + return; + } + + ent = ¢->currentState; + if ( ent->weapon == WP_NONE ) { + return; + } + if ( ent->weapon >= WP_NUM_WEAPONS ) { + CG_Error( "CG_FireWeapon: ent->weapon >= WP_NUM_WEAPONS" ); + return; + } + weap = &cg_weapons[ ent->weapon ]; + + // mark the entity as muzzle flashing, so when it is added it will + // append the flash to the weapon model + cent->muzzleFlashTime = cg.time; + + if (cg.predictedPlayerState.clientNum == cent->currentState.number) + { + if ((ent->weapon == WP_BRYAR_PISTOL && altFire) || + (ent->weapon == WP_BOWCASTER && !altFire) || + (ent->weapon == WP_DEMP2 && altFire)) + { + float val = ( cg.time - cent->currentState.constantLight ) * 0.001f; + + if (val > 3) + { + val = 3; + } + if (val < 0.2) + { + val = 0.2; + } + + val *= 2; + + CGCam_Shake( val, 250 ); + } + else if (ent->weapon == WP_ROCKET_LAUNCHER || + (ent->weapon == WP_REPEATER && altFire) || + ent->weapon == WP_FLECHETTE) + { + if (ent->weapon == WP_ROCKET_LAUNCHER) + { + CGCam_Shake(Q_irand(2, 3), 350); + } + else if (ent->weapon == WP_REPEATER) + { + CGCam_Shake(Q_irand(2, 3), 350); + } + else if (ent->weapon == WP_FLECHETTE) + { + if (altFire) + { + CGCam_Shake(Q_irand(2, 3), 350); + } + else + { + CGCam_Shake(1.5, 250); + } + } + } + } + // lightning gun only does this this on initial press + if ( ent->weapon == WP_DEMP2 ) { + if ( cent->pe.lightningFiring ) { + return; + } + } + + // play quad sound if needed + if ( cent->currentState.powerups & ( 1 << PW_QUAD ) ) { + //trap_S_StartSound (NULL, cent->currentState.number, CHAN_ITEM, cgs.media.quadSound ); + } + + + // play a sound + if (altFire) + { + // play a sound + for ( c = 0 ; c < 4 ; c++ ) { + if ( !weap->altFlashSound[c] ) { + break; + } + } + if ( c > 0 ) { + c = rand() % c; + if ( weap->altFlashSound[c] ) + { + trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->altFlashSound[c] ); + } + } +// if ( weap->altFlashSnd ) +// { +// trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->altFlashSnd ); +// } + } + else + { + // play a sound + for ( c = 0 ; c < 4 ; c++ ) { + if ( !weap->flashSound[c] ) { + break; + } + } + if ( c > 0 ) { + c = rand() % c; + if ( weap->flashSound[c] ) + { + trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->flashSound[c] ); + } + } + } +} + + +/* +================= +CG_MissileHitWall + +Caused by an EV_MISSILE_MISS event, or directly by local bullet tracing +================= +*/ +void CG_MissileHitWall(int weapon, int clientNum, vec3_t origin, vec3_t dir, impactSound_t soundType, qboolean altFire, int charge) +{ + int parm; + vec3_t up={0,0,1}; + + switch( weapon ) + { + case WP_BRYAR_PISTOL: + if ( altFire ) + { + parm = charge; + FX_BryarAltHitWall( origin, dir, parm ); + } + else + { + FX_BryarHitWall( origin, dir ); + } + break; + + case WP_TURRET: + FX_TurretHitWall( origin, dir ); + break; + + case WP_BLASTER: + FX_BlasterWeaponHitWall( origin, dir ); + break; + + case WP_DISRUPTOR: + FX_DisruptorAltMiss( origin, dir ); + break; + + case WP_BOWCASTER: + FX_BowcasterHitWall( origin, dir ); + break; + + case WP_REPEATER: + if ( altFire ) + { + FX_RepeaterAltHitWall( origin, dir ); + } + else + { + FX_RepeaterHitWall( origin, dir ); + } + break; + + case WP_DEMP2: + if (altFire) + { + trap_FX_PlayEffectID(trap_FX_RegisterEffect("demp2/altDetonate.efx"), origin, dir); + } + else + { + FX_DEMP2_HitWall( origin, dir ); + } + break; + + case WP_FLECHETTE: + /*if (altFire) + { + CG_SurfaceExplosion(origin, dir, 20.0f, 12.0f, qtrue); + } + else + */ + if (!altFire) + { + FX_FlechetteWeaponHitWall( origin, dir ); + } + break; + + case WP_ROCKET_LAUNCHER: + FX_RocketHitWall( origin, dir ); + break; + + case WP_THERMAL: + trap_FX_PlayEffectID( cgs.effects.thermalExplosionEffect, origin, dir ); + trap_FX_PlayEffectID( cgs.effects.thermalShockwaveEffect, origin, up ); + break; + + case WP_EMPLACED_GUN: + FX_BlasterWeaponHitWall( origin, dir ); + //FIXME: Give it its own hit wall effect + break; + } +} + + +/* +================= +CG_MissileHitPlayer +================= +*/ +void CG_MissileHitPlayer(int weapon, vec3_t origin, vec3_t dir, int entityNum, qboolean altFire) +{ + qboolean humanoid = qtrue; + vec3_t up={0,0,1}; + + /* + // NOTENOTE Non-portable code from single player + if ( cent->gent ) + { + other = &g_entities[cent->gent->s.otherEntityNum]; + + if ( other->client && other->client->playerTeam == TEAM_BOTS ) + { + humanoid = qfalse; + } + } + */ + + // NOTENOTE No bleeding in this game +// CG_Bleed( origin, entityNum ); + + // some weapons will make an explosion with the blood, while + // others will just make the blood + switch ( weapon ) { + case WP_BRYAR_PISTOL: + if ( altFire ) + { + FX_BryarAltHitPlayer( origin, dir, humanoid ); + } + else + { + FX_BryarHitPlayer( origin, dir, humanoid ); + } + break; + + case WP_TURRET: + FX_TurretHitPlayer( origin, dir, humanoid ); + break; + + case WP_BLASTER: + FX_BlasterWeaponHitPlayer( origin, dir, humanoid ); + break; + + case WP_DISRUPTOR: + FX_DisruptorAltHit( origin, dir); + break; + + case WP_BOWCASTER: + FX_BowcasterHitPlayer( origin, dir, humanoid ); + break; + + case WP_REPEATER: + if ( altFire ) + { + FX_RepeaterAltHitPlayer( origin, dir, humanoid ); + } + else + { + FX_RepeaterHitPlayer( origin, dir, humanoid ); + } + break; + + case WP_DEMP2: + // Do a full body effect here for some more feedback + // NOTENOTE The chaining of the demp2 is not yet implemented. + /* + if ( other ) + { + other->s.powerups |= ( 1 << PW_DISINT_1 ); + other->client->ps.powerups[PW_DISINT_1] = cg.time + 650; + } + */ + if (altFire) + { + trap_FX_PlayEffectID(trap_FX_RegisterEffect("demp2/altDetonate.efx"), origin, dir); + } + else + { + FX_DEMP2_HitPlayer( origin, dir, humanoid ); + } + break; + + case WP_FLECHETTE: + FX_FlechetteWeaponHitPlayer( origin, dir, humanoid ); + break; + + case WP_ROCKET_LAUNCHER: + FX_RocketHitPlayer( origin, dir, humanoid ); + break; + + case WP_THERMAL: + trap_FX_PlayEffectID( cgs.effects.thermalExplosionEffect, origin, dir ); + trap_FX_PlayEffectID( cgs.effects.thermalShockwaveEffect, origin, up ); + break; + case WP_EMPLACED_GUN: + //FIXME: Its own effect? + FX_BlasterWeaponHitPlayer( origin, dir, humanoid ); + break; + + default: + break; + } +} + + +/* +============================================================================ + +BULLETS + +============================================================================ +*/ + + +/* +=============== +CG_Tracer +=============== +*/ +void CG_Tracer( vec3_t source, vec3_t dest ) { + vec3_t forward, right; + polyVert_t verts[4]; + vec3_t line; + float len, begin, end; + vec3_t start, finish; + vec3_t midpoint; + + // tracer + VectorSubtract( dest, source, forward ); + len = VectorNormalize( forward ); + + // start at least a little ways from the muzzle + if ( len < 100 ) { + return; + } + begin = 50 + random() * (len - 60); + end = begin + cg_tracerLength.value; + if ( end > len ) { + end = len; + } + VectorMA( source, begin, forward, start ); + VectorMA( source, end, forward, finish ); + + line[0] = DotProduct( forward, cg.refdef.viewaxis[1] ); + line[1] = DotProduct( forward, cg.refdef.viewaxis[2] ); + + VectorScale( cg.refdef.viewaxis[1], line[1], right ); + VectorMA( right, -line[0], cg.refdef.viewaxis[2], right ); + VectorNormalize( right ); + + VectorMA( finish, cg_tracerWidth.value, right, verts[0].xyz ); + verts[0].st[0] = 0; + verts[0].st[1] = 1; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255; + + VectorMA( finish, -cg_tracerWidth.value, right, verts[1].xyz ); + verts[1].st[0] = 1; + verts[1].st[1] = 0; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255; + + VectorMA( start, -cg_tracerWidth.value, right, verts[2].xyz ); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255; + + VectorMA( start, cg_tracerWidth.value, right, verts[3].xyz ); + verts[3].st[0] = 0; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255; + + trap_R_AddPolyToScene( cgs.media.tracerShader, 4, verts ); + + midpoint[0] = ( start[0] + finish[0] ) * 0.5; + midpoint[1] = ( start[1] + finish[1] ) * 0.5; + midpoint[2] = ( start[2] + finish[2] ) * 0.5; + + // add the tracer sound + //trap_S_StartSound( midpoint, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.tracerSound ); + +} + +/* +====================== +CG_CalcMuzzlePoint +====================== +*/ +qboolean CG_CalcMuzzlePoint( int entityNum, vec3_t muzzle ) { + vec3_t forward, right; + vec3_t gunpoint; + centity_t *cent; + int anim; + + if ( entityNum == cg.snap->ps.clientNum ) + { //I'm not exactly sure why we'd be rendering someone else's crosshair, but hey. + int weapontype = cg.snap->ps.weapon; + vec3_t weaponMuzzle; + + VectorCopy(WP_MuzzlePoint[weapontype], weaponMuzzle); + + if (weapontype == WP_DISRUPTOR || weapontype == WP_STUN_BATON || weapontype == WP_SABER) + { + VectorClear(weaponMuzzle); + } + + if (cg.snap->ps.usingATST) + { + VectorClear(weaponMuzzle); + weaponMuzzle[0] = 16; + weaponMuzzle[2] = 128; + } + + if (cg.renderingThirdPerson) + { + VectorCopy( cg.predictedPlayerEntity.lerpOrigin, gunpoint ); + AngleVectors( cg.predictedPlayerEntity.lerpAngles, forward, right, NULL ); + } + else + { + VectorCopy( cg.refdef.vieworg, gunpoint ); + AngleVectors( cg.refdefViewAngles, forward, right, NULL ); + } + + if (weapontype == WP_EMPLACED_GUN && cg.snap->ps.emplacedIndex) + { + centity_t *gunEnt = &cg_entities[cg.snap->ps.emplacedIndex]; + + if (gunEnt) + { + vec3_t pitchConstraint; + + VectorCopy(gunEnt->lerpOrigin, gunpoint); + gunpoint[2] += 46; + + if (cg.renderingThirdPerson) + { + VectorCopy(cg.predictedPlayerEntity.lerpAngles, pitchConstraint); + } + else + { + VectorCopy(cg.refdefViewAngles, pitchConstraint); + } + + if (pitchConstraint[PITCH] > 40) + { + pitchConstraint[PITCH] = 40; + } + AngleVectors( pitchConstraint, forward, right, NULL ); + } + } + + VectorCopy(gunpoint, muzzle); + + VectorMA(muzzle, weaponMuzzle[0], forward, muzzle); + VectorMA(muzzle, weaponMuzzle[1], right, muzzle); + + if (weapontype == WP_EMPLACED_GUN && cg.snap->ps.emplacedIndex) + { + //Do nothing + } + else if (cg.renderingThirdPerson) + { + muzzle[2] += cg.snap->ps.viewheight + weaponMuzzle[2]; + } + else + { + muzzle[2] += weaponMuzzle[2]; + } + + return qtrue; + } + + cent = &cg_entities[entityNum]; + if ( !cent->currentValid ) { + return qfalse; + } + + VectorCopy( cent->currentState.pos.trBase, muzzle ); + + AngleVectors( cent->currentState.apos.trBase, forward, NULL, NULL ); + anim = cent->currentState.legsAnim & ~ANIM_TOGGLEBIT; + if ( anim == BOTH_CROUCH1WALK || anim == BOTH_CROUCH1IDLE ) { + muzzle[2] += CROUCH_VIEWHEIGHT; + } else { + muzzle[2] += DEFAULT_VIEWHEIGHT; + } + + VectorMA( muzzle, 14, forward, muzzle ); + + return qtrue; + +} + + + +/* +Ghoul2 Insert Start +*/ + +// create one instance of all the weapons we are going to use so we can just copy this info into each clients gun ghoul2 object in fast way +void *g2WeaponInstances[MAX_WEAPONS]; +void CG_InitG2Weapons(void) +{ + int i = 0; + gitem_t *item; + memset(g2WeaponInstances, 0, sizeof(g2WeaponInstances)); + for ( item = bg_itemlist + 1 ; item->classname ; item++ ) + { + if ( item->giType == IT_WEAPON ) + { + // initialise model + trap_G2API_InitGhoul2Model(&g2WeaponInstances[/*i*/item->giTag], item->world_model[0], 0, 0, 0, 0, 0); +// trap_G2API_InitGhoul2Model(&g2WeaponInstances[i], item->world_model[0],G_ModelIndex( item->world_model[0] ) , 0, 0, 0, 0); + if (g2WeaponInstances[/*i*/item->giTag]) + { + // indicate we will be bolted to model 0 (ie the player) on bolt 0 (always the right hand) when we get copied + trap_G2API_SetBoltInfo(g2WeaponInstances[/*i*/item->giTag], 0, 0); + // now set up the gun bolt on it + trap_G2API_AddBolt(g2WeaponInstances[/*i*/item->giTag], 0, "*flash"); + i++; + } + if (i == MAX_WEAPONS) + { + assert(0); + break; + } + + } + } +} + +// clean out any g2 models we instanciated for copying purposes +void CG_ShutDownG2Weapons(void) +{ + int i; + for (i=0; icurrentState.saberInFlight) + { + cent->ghoul2weapon = g2WeaponInstances[WP_SABER]; + } + + if (cent->currentState.eFlags & EF_DEAD) + { //no updating weapons when dead + cent->ghoul2weapon = NULL; + return; + } + + if (cent->torsoBolt) + { //got our limb cut off, no updating weapons until it's restored + cent->ghoul2weapon = NULL; + return; + } + + if (ps && ps->usingATST) + { + cent->ghoul2weapon = NULL; + } + + if (cent->isATST) + { + cent->ghoul2weapon = NULL; + return; + } + + if (cent->ghoul2 && cent->ghoul2weapon != g2WeaponInstances[ps->weapon] && + ps->clientNum == cent->currentState.number) //don't want spectator mode forcing one client's weapon instance over another's + { + CG_CopyG2WeaponInstance(ps->weapon, cent->ghoul2); + cent->ghoul2weapon = g2WeaponInstances[ps->weapon]; + if (cent->weapon == WP_SABER && cg_entities[cent->currentState.number].weapon != ps->weapon && !ps->saberHolstered) + { //switching away from the saber + trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberoffquick.wav" )); + } + else if (ps->weapon == WP_SABER && cg_entities[cent->currentState.number].weapon != ps->weapon) + { //switching to the saber + trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" )); + } + cent->weapon = ps->weapon; + cg_entities[cent->currentState.number].weapon = ps->weapon; + } +} + + +/* +Ghoul2 Insert End +*/ diff --git a/code/cgame/cg_weapons.c b/code/cgame/cg_weapons.c new file mode 100644 index 0000000..5c29812 --- /dev/null +++ b/code/cgame/cg_weapons.c @@ -0,0 +1,2243 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// cg_weapons.c -- events and effects dealing with weapons +#include "cg_local.h" +#include "fx_local.h" + +extern vec4_t bluehudtint; +extern vec4_t redhudtint; +extern float *hudTintColor; + +/* +Ghoul2 Insert Start +*/ +// set up the appropriate ghoul2 info to a refent +void CG_SetGhoul2InfoRef( refEntity_t *ent, refEntity_t *s1) +{ + ent->ghoul2 = s1->ghoul2; + VectorCopy( s1->modelScale, ent->modelScale); + ent->radius = s1->radius; + VectorCopy( s1->angles, ent->angles); +} + +/* +Ghoul2 Insert End +*/ + +/* +================= +CG_RegisterItemVisuals + +The server says this item is used on this level +================= +*/ +void CG_RegisterItemVisuals( int itemNum ) { + itemInfo_t *itemInfo; + gitem_t *item; + int handle; + + if ( itemNum < 0 || itemNum >= bg_numItems ) { + CG_Error( "CG_RegisterItemVisuals: itemNum %d out of range [0-%d]", itemNum, bg_numItems-1 ); + } + + itemInfo = &cg_items[ itemNum ]; + if ( itemInfo->registered ) { + return; + } + + item = &bg_itemlist[ itemNum ]; + + memset( itemInfo, 0, sizeof( &itemInfo ) ); + itemInfo->registered = qtrue; + + if (item->giType == IT_TEAM && + (item->giTag == PW_REDFLAG || item->giTag == PW_BLUEFLAG) && + cgs.gametype == GT_CTY) + { //in CTY the flag model is different + itemInfo->models[0] = trap_R_RegisterModel( item->world_model[1] ); + } + else if (item->giType == IT_WEAPON && + (item->giTag == WP_THERMAL || item->giTag == WP_TRIP_MINE || item->giTag == WP_DET_PACK)) + { + itemInfo->models[0] = trap_R_RegisterModel( item->world_model[1] ); + } + else + { + itemInfo->models[0] = trap_R_RegisterModel( item->world_model[0] ); + } +/* +Ghoul2 Insert Start +*/ + if (!Q_stricmp(&item->world_model[0][strlen(item->world_model[0]) - 4], ".glm")) + { + handle = trap_G2API_InitGhoul2Model(&itemInfo->g2Models[0], item->world_model[0], 0 , 0, 0, 0, 0); + if (handle<0) + { + itemInfo->g2Models[0] = NULL; + } + else + { + itemInfo->radius[0] = 60; + } + } +/* +Ghoul2 Insert End +*/ + if (item->icon) + { + itemInfo->icon = trap_R_RegisterShader( item->icon ); + } + else + { + itemInfo->icon = 0; + } + + if ( item->giType == IT_WEAPON ) { + CG_RegisterWeapon( item->giTag ); + } + + // + // powerups have an accompanying ring or sphere + // + if ( item->giType == IT_POWERUP || item->giType == IT_HEALTH || + item->giType == IT_ARMOR || item->giType == IT_HOLDABLE ) { + if ( item->world_model[1] ) { + itemInfo->models[1] = trap_R_RegisterModel( item->world_model[1] ); + } + } +} + + +/* +======================================================================================== + +VIEW WEAPON + +======================================================================================== +*/ + +#define WEAPON_FORCE_BUSY_HOLSTER + +#ifdef WEAPON_FORCE_BUSY_HOLSTER +//rww - this was done as a last resort. Forgive me. +static int cgWeapFrame = 0; +static int cgWeapFrameTime = 0; +#endif + +/* +================= +CG_MapTorsoToWeaponFrame + +================= +*/ +static int CG_MapTorsoToWeaponFrame( clientInfo_t *ci, int frame, int animNum ) { + animation_t *animations = bgGlobalAnimations; +#ifdef WEAPON_FORCE_BUSY_HOLSTER + if (cg.snap->ps.forceHandExtend != HANDEXTEND_NONE || cgWeapFrameTime > cg.time) + { //the reason for the after delay is so that it doesn't snap the weapon frame to the "idle" (0) frame + //for a very quick moment + if (cgWeapFrame < 6) + { + cgWeapFrame = 6; + cgWeapFrameTime = cg.time + 10; + } + + if (cgWeapFrameTime < cg.time && cgWeapFrame < 10) + { + cgWeapFrame++; + cgWeapFrameTime = cg.time + 10; + } + + if (cg.snap->ps.forceHandExtend != HANDEXTEND_NONE && + cgWeapFrame == 10) + { + cgWeapFrameTime = cg.time + 100; + } + + return cgWeapFrame; + } + else + { + cgWeapFrame = 0; + cgWeapFrameTime = 0; + } +#endif + + switch( animNum ) + { + case TORSO_DROPWEAP1: + if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 5 ) + { + return frame - animations[animNum].firstFrame + 6; + } + break; + + case TORSO_RAISEWEAP1: + if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 4 ) + { + return frame - animations[animNum].firstFrame + 6 + 4; + } + break; + case BOTH_ATTACK1: + case BOTH_ATTACK2: + case BOTH_ATTACK3: + case BOTH_ATTACK4: + case BOTH_ATTACK5: + case BOTH_ATTACK6: + case BOTH_ATTACK7: + case BOTH_ATTACK8: + case BOTH_ATTACK9: + case BOTH_ATTACK10: + case BOTH_ATTACK11: + case BOTH_ATTACK12: + case BOTH_THERMAL_THROW: + if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 6 ) + { + return 1 + ( frame - animations[animNum].firstFrame ); + } + + break; + } + return -1; +} + + +/* +============== +CG_CalculateWeaponPosition +============== +*/ +static void CG_CalculateWeaponPosition( vec3_t origin, vec3_t angles ) { + float scale; + int delta; + float fracsin; + + VectorCopy( cg.refdef.vieworg, origin ); + VectorCopy( cg.refdefViewAngles, angles ); + + // on odd legs, invert some angles + if ( cg.bobcycle & 1 ) { + scale = -cg.xyspeed; + } else { + scale = cg.xyspeed; + } + + // gun angles from bobbing + angles[ROLL] += scale * cg.bobfracsin * 0.005; + angles[YAW] += scale * cg.bobfracsin * 0.01; + angles[PITCH] += cg.xyspeed * cg.bobfracsin * 0.005; + + // drop the weapon when landing + delta = cg.time - cg.landTime; + if ( delta < LAND_DEFLECT_TIME ) { + origin[2] += cg.landChange*0.25 * delta / LAND_DEFLECT_TIME; + } else if ( delta < LAND_DEFLECT_TIME + LAND_RETURN_TIME ) { + origin[2] += cg.landChange*0.25 * + (LAND_DEFLECT_TIME + LAND_RETURN_TIME - delta) / LAND_RETURN_TIME; + } + +#if 0 + // drop the weapon when stair climbing + delta = cg.time - cg.stepTime; + if ( delta < STEP_TIME/2 ) { + origin[2] -= cg.stepChange*0.25 * delta / (STEP_TIME/2); + } else if ( delta < STEP_TIME ) { + origin[2] -= cg.stepChange*0.25 * (STEP_TIME - delta) / (STEP_TIME/2); + } +#endif + + // idle drift + scale = cg.xyspeed + 40; + fracsin = sin( cg.time * 0.001 ); + angles[ROLL] += scale * fracsin * 0.01; + angles[YAW] += scale * fracsin * 0.01; + angles[PITCH] += scale * fracsin * 0.01; +} + + +/* +=============== +CG_LightningBolt + +Origin will be the exact tag point, which is slightly +different than the muzzle point used for determining hits. +The cent should be the non-predicted cent if it is from the player, +so the endpoint will reflect the simulated strike (lagging the predicted +angle) +=============== +*/ +static void CG_LightningBolt( centity_t *cent, vec3_t origin ) { +// trace_t trace; + refEntity_t beam; +// vec3_t forward; +// vec3_t muzzlePoint, endPoint; + + //Must be a durational weapon that continuously generates an effect. + if ( cent->currentState.weapon == WP_DEMP2 && cent->currentState.eFlags & EF_ALT_FIRING ) + { /*nothing*/ } + else + { + return; + } + + memset( &beam, 0, sizeof( beam ) ); + + // NOTENOTE No lightning gun-ish stuff yet. +/* + // CPMA "true" lightning + if ((cent->currentState.number == cg.predictedPlayerState.clientNum) && (cg_trueLightning.value != 0)) { + vec3_t angle; + int i; + + for (i = 0; i < 3; i++) { + float a = cent->lerpAngles[i] - cg.refdefViewAngles[i]; + if (a > 180) { + a -= 360; + } + if (a < -180) { + a += 360; + } + + angle[i] = cg.refdefViewAngles[i] + a * (1.0 - cg_trueLightning.value); + if (angle[i] < 0) { + angle[i] += 360; + } + if (angle[i] > 360) { + angle[i] -= 360; + } + } + + AngleVectors(angle, forward, NULL, NULL ); + VectorCopy(cent->lerpOrigin, muzzlePoint ); +// VectorCopy(cg.refdef.vieworg, muzzlePoint ); + } else { + // !CPMA + AngleVectors( cent->lerpAngles, forward, NULL, NULL ); + VectorCopy(cent->lerpOrigin, muzzlePoint ); + } + + // FIXME: crouch + muzzlePoint[2] += DEFAULT_VIEWHEIGHT; + + VectorMA( muzzlePoint, 14, forward, muzzlePoint ); + + // project forward by the lightning range + VectorMA( muzzlePoint, LIGHTNING_RANGE, forward, endPoint ); + + // see if it hit a wall + CG_Trace( &trace, muzzlePoint, vec3_origin, vec3_origin, endPoint, + cent->currentState.number, MASK_SHOT ); + + // this is the endpoint + VectorCopy( trace.endpos, beam.oldorigin ); + + // use the provided origin, even though it may be slightly + // different than the muzzle origin + VectorCopy( origin, beam.origin ); + + beam.reType = RT_LIGHTNING; + beam.customShader = cgs.media.lightningShader; + trap_R_AddRefEntityToScene( &beam ); +*/ + + // NOTENOTE No lightning gun-ish stuff yet. +/* + // add the impact flare if it hit something + if ( trace.fraction < 1.0 ) { + vec3_t angles; + vec3_t dir; + + VectorSubtract( beam.oldorigin, beam.origin, dir ); + VectorNormalize( dir ); + + memset( &beam, 0, sizeof( beam ) ); + beam.hModel = cgs.media.lightningExplosionModel; + + VectorMA( trace.endpos, -16, dir, beam.origin ); + + // make a random orientation + angles[0] = rand() % 360; + angles[1] = rand() % 360; + angles[2] = rand() % 360; + AnglesToAxis( angles, beam.axis ); + trap_R_AddRefEntityToScene( &beam ); + } +*/ +} + + +/* +======================== +CG_AddWeaponWithPowerups +======================== +*/ +static void CG_AddWeaponWithPowerups( refEntity_t *gun, int powerups ) { + // add powerup effects + trap_R_AddRefEntityToScene( gun ); + + if ( powerups & ( 1 << PW_BATTLESUIT ) ) { + gun->customShader = cgs.media.battleWeaponShader; + trap_R_AddRefEntityToScene( gun ); + } + if ( powerups & ( 1 << PW_QUAD ) ) { + gun->customShader = cgs.media.quadWeaponShader; + trap_R_AddRefEntityToScene( gun ); + } +} + + +/* +============= +CG_AddPlayerWeapon + +Used for both the view weapon (ps is valid) and the world modelother character models (ps is NULL) +The main player will have this called for BOTH cases, so effects like light and +sound should only be done on the world model case. +============= +*/ +void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent, int team, vec3_t newAngles, qboolean thirdPerson ) { + refEntity_t gun; + refEntity_t barrel; + vec3_t angles; + weapon_t weaponNum; + weaponInfo_t *weapon; + centity_t *nonPredictedCent; + refEntity_t flash; + + weaponNum = cent->currentState.weapon; + + if (cent->currentState.weapon == WP_EMPLACED_GUN) + { + return; + } + + CG_RegisterWeapon( weaponNum ); + weapon = &cg_weapons[weaponNum]; +/* +Ghoul2 Insert Start +*/ + + memset( &gun, 0, sizeof( gun ) ); + + // only do this if we are in first person, since world weapons are now handled on the server by Ghoul2 + if (!thirdPerson) + { + + // add the weapon + VectorCopy( parent->lightingOrigin, gun.lightingOrigin ); + gun.shadowPlane = parent->shadowPlane; + gun.renderfx = parent->renderfx; + + if (ps) + { // this player, in first person view + gun.hModel = weapon->viewModel; + } + else + { + gun.hModel = weapon->weaponModel; + } + if (!gun.hModel) { + return; + } + + if ( !ps ) { + // add weapon ready sound + cent->pe.lightningFiring = qfalse; + if ( ( cent->currentState.eFlags & EF_FIRING ) && weapon->firingSound ) { + // lightning gun and guantlet make a different sound when fire is held down + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, weapon->firingSound ); + cent->pe.lightningFiring = qtrue; + } else if ( weapon->readySound ) { + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, weapon->readySound ); + } + } + + CG_PositionEntityOnTag( &gun, parent, parent->hModel, "tag_weapon"); + + if (!CG_IsMindTricked(cent->currentState.trickedentindex, + cent->currentState.trickedentindex2, + cent->currentState.trickedentindex3, + cent->currentState.trickedentindex4, + cg.snap->ps.clientNum)) + { + CG_AddWeaponWithPowerups( &gun, cent->currentState.powerups ); //don't draw the weapon if the player is invisible + /* + if ( weaponNum == WP_STUN_BATON ) + { + gun.shaderRGBA[0] = gun.shaderRGBA[1] = gun.shaderRGBA[2] = 25; + + gun.customShader = trap_R_RegisterShader( "gfx/effects/stunPass" ); + gun.renderfx = RF_RGB_TINT | RF_FIRST_PERSON | RF_DEPTHHACK; + trap_R_AddRefEntityToScene( &gun ); + } + */ + } + + if (weaponNum == WP_STUN_BATON) + { + int i = 0; + + while (i < 3) + { + memset( &barrel, 0, sizeof( barrel ) ); + VectorCopy( parent->lightingOrigin, barrel.lightingOrigin ); + barrel.shadowPlane = parent->shadowPlane; + barrel.renderfx = parent->renderfx; + + if (i == 0) + { + barrel.hModel = trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel.md3"); + } + else if (i == 1) + { + barrel.hModel = trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel2.md3"); + } + else + { + barrel.hModel = trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel3.md3"); + } + angles[YAW] = 0; + angles[PITCH] = 0; + angles[ROLL] = 0; + + AnglesToAxis( angles, barrel.axis ); + + if (i == 0) + { + CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel" ); + } + else if (i == 1) + { + CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel2" ); + } + else + { + CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel3" ); + } + CG_AddWeaponWithPowerups( &barrel, cent->currentState.powerups ); + + i++; + } + } + else + { + // add the spinning barrel + if ( weapon->barrelModel ) { + memset( &barrel, 0, sizeof( barrel ) ); + VectorCopy( parent->lightingOrigin, barrel.lightingOrigin ); + barrel.shadowPlane = parent->shadowPlane; + barrel.renderfx = parent->renderfx; + + barrel.hModel = weapon->barrelModel; + angles[YAW] = 0; + angles[PITCH] = 0; + angles[ROLL] = 0; + + AnglesToAxis( angles, barrel.axis ); + + CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel" ); + + CG_AddWeaponWithPowerups( &barrel, cent->currentState.powerups ); + } + } + } +/* +Ghoul2 Insert End +*/ + + memset (&flash, 0, sizeof(flash)); + CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash"); + + VectorCopy(flash.origin, cg.lastFPFlashPoint); + + // Do special charge bits + //----------------------- + if ( (ps || cg.renderingThirdPerson || cg.predictedPlayerState.clientNum != cent->currentState.number) && + ( ( cent->currentState.modelindex2 == WEAPON_CHARGING_ALT && cent->currentState.weapon == WP_BRYAR_PISTOL ) || + ( cent->currentState.weapon == WP_BOWCASTER && cent->currentState.modelindex2 == WEAPON_CHARGING ) || + ( cent->currentState.weapon == WP_DEMP2 && cent->currentState.modelindex2 == WEAPON_CHARGING_ALT) ) ) + { + int shader = 0; + float val = 0.0f; + float scale = 1.0f; + addspriteArgStruct_t fxSArgs; + vec3_t flashorigin, flashdir; + + if (!thirdPerson) + { + VectorCopy(flash.origin, flashorigin); + VectorCopy(flash.axis[0], flashdir); + } + else + { + mdxaBone_t boltMatrix; + + if (!trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { //it's quite possible that we may have have no weapon model and be in a valid state, so return here if this is the case + return; + } + + // go away and get me the bolt position for this frame please + if (!(trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, newAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale))) + { // Couldn't find bolt point. + return; + } + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); + } + + if ( cent->currentState.weapon == WP_BRYAR_PISTOL ) + { + // Hardcoded max charge time of 1 second + val = ( cg.time - cent->currentState.constantLight ) * 0.001f; + shader = cgs.media.bryarFrontFlash; + } + else if ( cent->currentState.weapon == WP_BOWCASTER ) + { + // Hardcoded max charge time of 1 second + val = ( cg.time - cent->currentState.constantLight ) * 0.001f; + shader = cgs.media.greenFrontFlash; + } + else if ( cent->currentState.weapon == WP_DEMP2 ) + { + val = ( cg.time - cent->currentState.constantLight ) * 0.001f; + shader = cgs.media.lightningFlash; + scale = 1.75f; + } + + if ( val < 0.0f ) + { + val = 0.0f; + } + else if ( val > 1.0f ) + { + val = 1.0f; + if (ps && cent->currentState.number == ps->clientNum) + { + CGCam_Shake( /*0.1f*/0.2f, 100 ); + } + } + else + { + if (ps && cent->currentState.number == ps->clientNum) + { + CGCam_Shake( val * val * /*0.3f*/0.6f, 100 ); + } + } + + val += random() * 0.5f; + + VectorCopy(flashorigin, fxSArgs.origin); + VectorClear(fxSArgs.vel); + VectorClear(fxSArgs.accel); + fxSArgs.scale = 3.0f*val*scale; + fxSArgs.dscale = 0.0f; + fxSArgs.sAlpha = 0.7f; + fxSArgs.eAlpha = 0.7f; + fxSArgs.rotation = random()*360; + fxSArgs.bounce = 0.0f; + fxSArgs.life = 1.0f; + fxSArgs.shader = shader; + fxSArgs.flags = 0x08000000; + + //FX_AddSprite( flash.origin, NULL, NULL, 3.0f * val, 0.0f, 0.7f, 0.7f, WHITE, WHITE, random() * 360, 0.0f, 1.0f, shader, FX_USE_ALPHA ); + trap_FX_AddSprite(&fxSArgs); + } + + // make sure we aren't looking at cg.predictedPlayerEntity for LG + nonPredictedCent = &cg_entities[cent->currentState.clientNum]; + + // if the index of the nonPredictedCent is not the same as the clientNum + // then this is a fake player (like on teh single player podiums), so + // go ahead and use the cent + if( ( nonPredictedCent - cg_entities ) != cent->currentState.clientNum ) { + nonPredictedCent = cent; + } + + // add the flash + if ( ( weaponNum == WP_DEMP2) + && ( nonPredictedCent->currentState.eFlags & EF_FIRING ) ) + { + // continuous flash + } else { + // impulse flash + if ( cg.time - cent->muzzleFlashTime > MUZZLE_FLASH_TIME) { + return; + } + } + + if ( ps || cg.renderingThirdPerson || + cent->currentState.number != cg.predictedPlayerState.clientNum ) + { // Make sure we don't do the thirdperson model effects for the local player if we're in first person + vec3_t flashorigin, flashdir; + refEntity_t flash; + + memset (&flash, 0, sizeof(flash)); + + if (!thirdPerson) + { + CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash"); + VectorCopy(flash.origin, flashorigin); + VectorCopy(flash.axis[0], flashdir); + } + else + { + mdxaBone_t boltMatrix; + + if (!trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { //it's quite possible that we may have have no weapon model and be in a valid state, so return here if this is the case + return; + } + + // go away and get me the bolt position for this frame please + if (!(trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, newAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale))) + { // Couldn't find bolt point. + return; + } + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); + } + + if ( cg.time - cent->muzzleFlashTime <= MUZZLE_FLASH_TIME + 10 ) + { // Handle muzzle flashes + if ( cent->currentState.eFlags & EF_ALT_FIRING ) + { // Check the alt firing first. + if (weapon->altMuzzleEffect) + { + trap_FX_PlayEffectID(weapon->altMuzzleEffect, flashorigin, flashdir); + } + } + else + { // Regular firing + if (weapon->muzzleEffect) + { + trap_FX_PlayEffectID(weapon->muzzleEffect, flashorigin, flashdir); + } + } + } + + // add lightning bolt + CG_LightningBolt( nonPredictedCent, flashorigin ); + + if ( weapon->flashDlightColor[0] || weapon->flashDlightColor[1] || weapon->flashDlightColor[2] ) { + trap_R_AddLightToScene( flashorigin, 300 + (rand()&31), weapon->flashDlightColor[0], + weapon->flashDlightColor[1], weapon->flashDlightColor[2] ); + } + } +} + +/* +============== +CG_AddViewWeapon + +Add the weapon, and flash for the player's view +============== +*/ +void CG_AddViewWeapon( playerState_t *ps ) { + refEntity_t hand; + centity_t *cent; + clientInfo_t *ci; + float fovOffset; + vec3_t angles; + weaponInfo_t *weapon; + float cgFov = cg_fov.value; + + if (cgFov < 1) + { + cgFov = 1; + } + if (cgFov > 97) + { + cgFov = 97; + } + + if ( ps->persistant[PERS_TEAM] == TEAM_SPECTATOR ) { + return; + } + + if ( ps->pm_type == PM_INTERMISSION ) { + return; + } + + // no gun if in third person view or a camera is active + //if ( cg.renderingThirdPerson || cg.cameraMode) { + if ( cg.renderingThirdPerson ) { + return; + } + + // allow the gun to be completely removed + if ( !cg_drawGun.integer || cg.predictedPlayerState.zoomMode) { + vec3_t origin; + + if ( cg.predictedPlayerState.eFlags & EF_FIRING ) { + // special hack for lightning gun... + VectorCopy( cg.refdef.vieworg, origin ); + VectorMA( origin, -8, cg.refdef.viewaxis[2], origin ); + CG_LightningBolt( &cg_entities[ps->clientNum], origin ); + } + return; + } + + // don't draw if testing a gun model + if ( cg.testGun ) { + return; + } + + // drop gun lower at higher fov + if ( cgFov > 90 ) { + fovOffset = -0.2 * ( cgFov - 90 ); + } else { + fovOffset = 0; + } + + cent = &cg.predictedPlayerEntity; // &cg_entities[cg.snap->ps.clientNum]; + CG_RegisterWeapon( ps->weapon ); + weapon = &cg_weapons[ ps->weapon ]; + + memset (&hand, 0, sizeof(hand)); + + // set up gun position + CG_CalculateWeaponPosition( hand.origin, angles ); + + VectorMA( hand.origin, cg_gun_x.value, cg.refdef.viewaxis[0], hand.origin ); + VectorMA( hand.origin, cg_gun_y.value, cg.refdef.viewaxis[1], hand.origin ); + VectorMA( hand.origin, (cg_gun_z.value+fovOffset), cg.refdef.viewaxis[2], hand.origin ); + + AnglesToAxis( angles, hand.axis ); + + // map torso animations to weapon animations + if ( cg_gun_frame.integer ) { + // development tool + hand.frame = hand.oldframe = cg_gun_frame.integer; + hand.backlerp = 0; + } else { + // get clientinfo for animation map + ci = &cgs.clientinfo[ cent->currentState.clientNum ]; + hand.frame = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.frame, cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ); + hand.oldframe = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.oldFrame, cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ); + hand.backlerp = cent->pe.torso.backlerp; + + // Handle the fringe situation where oldframe is invalid + if ( hand.frame == -1 ) + { + hand.frame = 0; + hand.oldframe = 0; + hand.backlerp = 0; + } + else if ( hand.oldframe == -1 ) + { + hand.oldframe = hand.frame; + hand.backlerp = 0; + } + } + + hand.hModel = weapon->handsModel; + hand.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON;// | RF_MINLIGHT; + + // add everything onto the hand + CG_AddPlayerWeapon( &hand, ps, &cg.predictedPlayerEntity, ps->persistant[PERS_TEAM], angles, qfalse ); +} + +/* +============================================================================== + +WEAPON SELECTION + +============================================================================== +*/ +#define ICON_WEAPONS 0 +#define ICON_FORCE 1 +#define ICON_INVENTORY 2 + + +void CG_DrawIconBackground(void) +{ + int height,xAdd,x2,y2,t; + int prongLeftX,prongRightX; + float inTime = cg.invenSelectTime+WEAPON_SELECT_TIME; + float wpTime = cg.weaponSelectTime+WEAPON_SELECT_TIME; + float fpTime = cg.forceSelectTime+WEAPON_SELECT_TIME; + qhandle_t background; + int drawType = cgs.media.weaponIconBackground; + int prongsOn = cgs.media.weaponProngsOn; + + // don't display if dead + if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) + { + return; + } + + if (cg_hudFiles.integer) + { //simple hud + return; + } + + x2 = 30; + y2 = SCREEN_HEIGHT-70; + + prongLeftX =x2+37; + prongRightX =x2+544; + + if (inTime > wpTime) + { + drawType = cgs.media.inventoryIconBackground; + prongsOn = cgs.media.inventoryProngsOn; + cg.iconSelectTime = cg.invenSelectTime; + } + else + { + drawType = cgs.media.weaponIconBackground; + prongsOn = cgs.media.weaponProngsOn; + cg.iconSelectTime = cg.weaponSelectTime; + } + + if (fpTime > inTime && fpTime > wpTime) + { + drawType = cgs.media.forceIconBackground; + prongsOn = cgs.media.forceProngsOn; + cg.iconSelectTime = cg.forceSelectTime; + } + + if ((cg.iconSelectTime+WEAPON_SELECT_TIME)1) + { + cg.iconHUDActive = qtrue; + cg.iconHUDPercent=1; + } + else if (cg.iconHUDPercent<0) + { + cg.iconHUDPercent=0; + } + } + else + { + cg.iconHUDPercent=1; + } + + trap_R_SetColor( colorTable[CT_WHITE] ); + height = (int) (60.0f*cg.iconHUDPercent); + CG_DrawPic( x2+60, y2+30, 460, -height, drawType); // Top half + CG_DrawPic( x2+60, y2+30-2,460, height, drawType); // Bottom half + + // And now for the prongs +/* if ((cg.inventorySelectTime+WEAPON_SELECT_TIME)>cg.time) + { + cgs.media.currentBackground = ICON_INVENTORY; + background = &cgs.media.inventoryProngsOn; + } + else if ((cg.weaponSelectTime+WEAPON_SELECT_TIME)>cg.time) + {*/ + cgs.media.currentBackground = ICON_WEAPONS; + background = prongsOn; +/* } + else + { + cgs.media.currentBackground = ICON_FORCE; + background = &cgs.media.forceProngsOn; + } +*/ + // Side Prongs + trap_R_SetColor( colorTable[CT_WHITE]); + xAdd = (int) 8*cg.iconHUDPercent; + CG_DrawPic( prongLeftX+xAdd, y2-10, 40, 80, background); + CG_DrawPic( prongRightX-xAdd, y2-10, -40, 80, background); + +} + +qboolean CG_WeaponCheck(int weap) +{ + if (cg.snap->ps.ammo[weaponData[weap].ammoIndex] < weaponData[weap].energyPerShot && + cg.snap->ps.ammo[weaponData[weap].ammoIndex] < weaponData[weap].altEnergyPerShot) + { + return qfalse; + } + + return qtrue; +} + +/* +=============== +CG_WeaponSelectable +=============== +*/ +static qboolean CG_WeaponSelectable( int i ) { + /*if ( !cg.snap->ps.ammo[weaponData[i].ammoIndex] ) { + return qfalse; + }*/ + if (!i) + { + return qfalse; + } + + if (cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < weaponData[i].energyPerShot && + cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < weaponData[i].altEnergyPerShot) + { + return qfalse; + } + + if (i == WP_DET_PACK && cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < 1 && + !cg.predictedPlayerState.hasDetPackPlanted) + { + return qfalse; + } + + if ( ! (cg.predictedPlayerState.stats[ STAT_WEAPONS ] & ( 1 << i ) ) ) { + return qfalse; + } + + return qtrue; +} + +/* +=================== +CG_DrawWeaponSelect +=================== +*/ +void CG_DrawWeaponSelect( void ) { + int i; + int bits; + int count; + int smallIconSize,bigIconSize; + int holdX,x,y,pad; + int sideLeftIconCnt,sideRightIconCnt; + int sideMax,holdCount,iconCnt; + int height; + + if (cg.predictedPlayerState.emplacedIndex) + { //can't cycle when on a weapon + cg.weaponSelectTime = 0; + } + + if ((cg.weaponSelectTime+WEAPON_SELECT_TIME) (2*sideMax)) // Go to the max on each side + { + sideLeftIconCnt = sideMax; + sideRightIconCnt = sideMax; + } + else // Less than max, so do the calc + { + sideLeftIconCnt = holdCount/2; + sideRightIconCnt = holdCount - sideLeftIconCnt; + } + + i = cg.weaponSelect - 1; + if (i<1) + { + i = 13; + } + + smallIconSize = 40; + bigIconSize = 80; + pad = 12; + + x = 320; + y = 410; + + // Background +// memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); +// calcColor[3] = .35f; +// trap_R_SetColor( calcColor); + + // Left side ICONS + trap_R_SetColor(colorTable[CT_WHITE]); + // Work backwards from current icon + holdX = x - ((bigIconSize/2) + pad + smallIconSize); + height = smallIconSize * 1;//cg.iconHUDPercent; + + for (iconCnt=1;iconCnt<(sideLeftIconCnt+1);i--) + { + if (i<1) + { + i = 13; + } + + if ( !(bits & ( 1 << i ))) // Does he have this weapon? + { + continue; + } + + if ( !CG_WeaponSelectable(i) && + (i == WP_THERMAL || i == WP_TRIP_MINE) ) + { //Don't show thermal and tripmine when out of them + continue; + } + + ++iconCnt; // Good icon + + if (cgs.media.weaponIcons[i]) + { + weaponInfo_t *weaponInfo; + CG_RegisterWeapon( i ); + weaponInfo = &cg_weapons[i]; + + trap_R_SetColor(colorTable[CT_WHITE]); + if (!CG_WeaponCheck(i)) + { + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, /*weaponInfo->weaponIconNoAmmo*/cgs.media.weaponIcons_NA[i] ); + } + else + { + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, /*weaponInfo->weaponIcon*/cgs.media.weaponIcons[i] ); + } + + holdX -= (smallIconSize+pad); + } + } + + // Current Center Icon + height = bigIconSize * cg.iconHUDPercent; + if (cgs.media.weaponIcons[cg.weaponSelect]) + { + weaponInfo_t *weaponInfo; + CG_RegisterWeapon( cg.weaponSelect ); + weaponInfo = &cg_weapons[cg.weaponSelect]; + + trap_R_SetColor( colorTable[CT_WHITE]); + if (!CG_WeaponCheck(cg.weaponSelect)) + { + CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2))+10, bigIconSize, bigIconSize, cgs.media.weaponIcons_NA[cg.weaponSelect] ); + } + else + { + CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2))+10, bigIconSize, bigIconSize, cgs.media.weaponIcons[cg.weaponSelect] ); + } + } + + i = cg.weaponSelect + 1; + if (i> 13) + { + i = 1; + } + + // Right side ICONS + // Work forwards from current icon + holdX = x + (bigIconSize/2) + pad; + height = smallIconSize * cg.iconHUDPercent; + for (iconCnt=1;iconCnt<(sideRightIconCnt+1);i++) + { + if (i>13) + { + i = 1; + } + + if ( !(bits & ( 1 << i ))) // Does he have this weapon? + { + continue; + } + + if ( !CG_WeaponSelectable(i) && + (i == WP_THERMAL || i == WP_TRIP_MINE) ) + { //Don't show thermal and tripmine when out of them + continue; + } + + ++iconCnt; // Good icon + + if (/*weaponData[i].weaponIcon[0]*/cgs.media.weaponIcons[i]) + { + weaponInfo_t *weaponInfo; + CG_RegisterWeapon( i ); + weaponInfo = &cg_weapons[i]; + // No ammo for this weapon? + trap_R_SetColor( colorTable[CT_WHITE]); + if (!CG_WeaponCheck(i)) + { + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.weaponIcons_NA[i] ); + } + else + { + CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.weaponIcons[i] ); + } + + + holdX += (smallIconSize+pad); + } + } + + // draw the selected name + if ( cg_weapons[ cg.weaponSelect ].item ) + { + vec4_t textColor = { .875f, .718f, .121f, 1.0f }; + char text[1024]; + + if ( trap_SP_GetStringTextString( va("INGAME_%s",cg_weapons[ cg.weaponSelect ].item->classname), text, sizeof( text ))) + { + UI_DrawProportionalString(320, y+45, text, UI_CENTER|UI_SMALLFONT, textColor); + } + else + { + UI_DrawProportionalString(320, y+45, cg_weapons[ cg.weaponSelect ].item->classname, UI_CENTER|UI_SMALLFONT, textColor); + } + } + + trap_R_SetColor( NULL ); +} + + +/* +=============== +CG_NextWeapon_f +=============== +*/ +void CG_NextWeapon_f( void ) { + int i; + int original; + + if ( !cg.snap ) { + return; + } + if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) { + return; + } + + if (cg.snap->ps.emplacedIndex) + { + return; + } + + cg.weaponSelectTime = cg.time; + original = cg.weaponSelect; + + for ( i = 0 ; i < 16 ; i++ ) { + cg.weaponSelect++; + if ( cg.weaponSelect == 16 ) { + cg.weaponSelect = 0; + } + // if ( cg.weaponSelect == WP_STUN_BATON ) { + // continue; // never cycle to gauntlet + // } + if ( CG_WeaponSelectable( cg.weaponSelect ) ) { + break; + } + } + if ( i == 16 ) { + cg.weaponSelect = original; + } + else + { + trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); + } +} + +/* +=============== +CG_PrevWeapon_f +=============== +*/ +void CG_PrevWeapon_f( void ) { + int i; + int original; + + if ( !cg.snap ) { + return; + } + if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) { + return; + } + + if (cg.snap->ps.emplacedIndex) + { + return; + } + + cg.weaponSelectTime = cg.time; + original = cg.weaponSelect; + + for ( i = 0 ; i < 16 ; i++ ) { + cg.weaponSelect--; + if ( cg.weaponSelect == -1 ) { + cg.weaponSelect = 15; + } + // if ( cg.weaponSelect == WP_STUN_BATON ) { + // continue; // never cycle to gauntlet + // } + if ( CG_WeaponSelectable( cg.weaponSelect ) ) { + break; + } + } + if ( i == 16 ) { + cg.weaponSelect = original; + } + else + { + trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); + } +} + +/* +=============== +CG_Weapon_f +=============== +*/ +void CG_Weapon_f( void ) { + int num; + + if ( !cg.snap ) { + return; + } + if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) { + return; + } + + if (cg.snap->ps.emplacedIndex) + { + return; + } + + num = atoi( CG_Argv( 1 ) ); + + if ( num < 1 || num > 15 ) { + return; + } + + if (num == 1 && cg.snap->ps.weapon == WP_SABER) + { + if (cg.snap->ps.weaponTime < 1) + { + trap_SendConsoleCommand("sv_saberswitch"); + } + return; + } + + //rww - hack to make weapon numbers same as single player + if (num > WP_STUN_BATON) + { + num++; + } + else + { + if (cg.snap->ps.stats[STAT_WEAPONS] & (1 << WP_SABER)) + { + num = WP_SABER; + } + else + { + num = WP_STUN_BATON; + } + } + + if (num > WP_DET_PACK+1) + { //other weapons are off limits due to not actually being weapon weapons + return; + } + + if (num >= WP_THERMAL) + { + int weap, i = 0; + + if (cg.snap->ps.weapon >= WP_THERMAL && + cg.snap->ps.weapon <= WP_DET_PACK) + { + // already in cycle range so start with next cycle item + weap = cg.snap->ps.weapon + 1; + } + else + { + // not in cycle range, so start with thermal detonator + weap = WP_THERMAL; + } + + // prevent an endless loop + while ( i <= 4 ) + { + if (weap > WP_DET_PACK) + { + weap = WP_THERMAL; + } + + if (CG_WeaponSelectable(weap)) + { + num = weap; + break; + } + + weap++; + i++; + } + } + + if (!CG_WeaponSelectable(num)) + { + return; + } + + cg.weaponSelectTime = cg.time; + + if ( ! ( cg.snap->ps.stats[STAT_WEAPONS] & ( 1 << num ) ) ) + { + if (num == WP_SABER) + { //don't have saber, try the stun baton on the same slot + num = WP_STUN_BATON; + + if ( ! ( cg.snap->ps.stats[STAT_WEAPONS] & ( 1 << num ) ) ) + { + return; + } + } + else + { + return; // don't have the weapon + } + } + + if (cg.weaponSelect != num) + { + trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); + } + + cg.weaponSelect = num; +} + +/* +=================== +CG_OutOfAmmoChange + +The current weapon has just run out of ammo +=================== +*/ +void CG_OutOfAmmoChange( int oldWeapon ) +{ + int i; + + cg.weaponSelectTime = cg.time; + + for ( i = WP_DET_PACK ; i > 0 ; i-- ) //We don't want the emplaced or turret + { + if ( CG_WeaponSelectable( i ) ) + { + /* + if ( 1 == cg_autoswitch.integer && + ( i == WP_TRIP_MINE || i == WP_DET_PACK || i == WP_THERMAL || i == WP_ROCKET_LAUNCHER) ) // safe weapon switch + */ + //rww - Don't we want to make sure i != one of these if autoswitch is 1 (safe)? + if (cg_autoswitch.integer != 1 || (i != WP_TRIP_MINE && i != WP_DET_PACK && i != WP_THERMAL && i != WP_ROCKET_LAUNCHER)) + { + if (i != oldWeapon) + { //don't even do anything if we're just selecting the weapon we already have/had + cg.weaponSelect = i; + break; + } + } + } + } + + trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); +} + + + +/* +=================================================================================================== + +WEAPON EVENTS + +=================================================================================================== +*/ + +void CG_FireATST(centity_t *cent, qboolean altFire) +{ +//No muzzle flash for now? +#if 0 + int getMeBolt = 0; + mdxaBone_t boltMatrix; + vec3_t flashorigin, flashdir; + + if (!cgs.clientinfo[cent->currentState.number].bolt_lhand) + { + return; + } + + if (altFire) + { + getMeBolt = cgs.clientinfo[cent->currentState.number].bolt_lhand; + } + else + { + getMeBolt = cgs.clientinfo[cent->currentState.number].bolt_rhand; + } + + if (!(trap_G2API_GetBoltMatrix(cent->ghoul2, 0, getMeBolt, &boltMatrix, cent->lerpAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale))) + { + return; + } + + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); + + trap_FX_PlayEffectID(trap_FX_RegisterEffect("turret/muzzle_flash.efx"), flashorigin, flashdir); +#endif + + trap_S_StartSound(NULL, cent->currentState.number, CHAN_WEAPON, trap_S_RegisterSound(va("sound/weapons/atst/ATSTfire1.wav"/*, Q_irand(1,4)*/))); +} + +void CG_GetClientWeaponMuzzleBoltPoint(int clIndex, vec3_t to) +{ + centity_t *cent; + mdxaBone_t boltMatrix; + + if (clIndex < 0 || clIndex >= MAX_CLIENTS) + { + return; + } + + cent = &cg_entities[clIndex]; + + if (!cent || !cent->ghoul2 || !trap_G2_HaveWeGhoul2Models(cent->ghoul2) || + !trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) + { + return; + } + + trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); + trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, to); +} + +/* +================ +CG_FireWeapon + +Caused by an EV_FIRE_WEAPON event +================ +*/ +void CG_FireWeapon( centity_t *cent, qboolean altFire ) { + entityState_t *ent; + int c; + weaponInfo_t *weap; + + if (cent->isATST) + { + CG_FireATST(cent, altFire); + return; + } + + ent = ¢->currentState; + if ( ent->weapon == WP_NONE ) { + return; + } + if ( ent->weapon >= WP_NUM_WEAPONS ) { + CG_Error( "CG_FireWeapon: ent->weapon >= WP_NUM_WEAPONS" ); + return; + } + weap = &cg_weapons[ ent->weapon ]; + + // mark the entity as muzzle flashing, so when it is added it will + // append the flash to the weapon model + cent->muzzleFlashTime = cg.time; + + if (cg.predictedPlayerState.clientNum == cent->currentState.number) + { + if ((ent->weapon == WP_BRYAR_PISTOL && altFire) || + (ent->weapon == WP_BOWCASTER && !altFire) || + (ent->weapon == WP_DEMP2 && altFire)) + { + float val = ( cg.time - cent->currentState.constantLight ) * 0.001f; + + if (val > 3) + { + val = 3; + } + if (val < 0.2) + { + val = 0.2; + } + + val *= 2; + + CGCam_Shake( val, 250 ); + } + else if (ent->weapon == WP_ROCKET_LAUNCHER || + (ent->weapon == WP_REPEATER && altFire) || + ent->weapon == WP_FLECHETTE) + { + if (ent->weapon == WP_ROCKET_LAUNCHER) + { + CGCam_Shake(Q_irand(2, 3), 350); + } + else if (ent->weapon == WP_REPEATER) + { + CGCam_Shake(Q_irand(2, 3), 350); + } + else if (ent->weapon == WP_FLECHETTE) + { + if (altFire) + { + CGCam_Shake(Q_irand(2, 3), 350); + } + else + { + CGCam_Shake(1.5, 250); + } + } + } + } + // lightning gun only does this this on initial press + if ( ent->weapon == WP_DEMP2 ) { + if ( cent->pe.lightningFiring ) { + return; + } + } + + // play quad sound if needed + if ( cent->currentState.powerups & ( 1 << PW_QUAD ) ) { + //trap_S_StartSound (NULL, cent->currentState.number, CHAN_ITEM, cgs.media.quadSound ); + } + + + // play a sound + if (altFire) + { + // play a sound + for ( c = 0 ; c < 4 ; c++ ) { + if ( !weap->altFlashSound[c] ) { + break; + } + } + if ( c > 0 ) { + c = rand() % c; + if ( weap->altFlashSound[c] ) + { + trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->altFlashSound[c] ); + } + } +// if ( weap->altFlashSnd ) +// { +// trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->altFlashSnd ); +// } + } + else + { + // play a sound + for ( c = 0 ; c < 4 ; c++ ) { + if ( !weap->flashSound[c] ) { + break; + } + } + if ( c > 0 ) { + c = rand() % c; + if ( weap->flashSound[c] ) + { + trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->flashSound[c] ); + } + } + } +} + + +/* +================= +CG_MissileHitWall + +Caused by an EV_MISSILE_MISS event, or directly by local bullet tracing +================= +*/ +void CG_MissileHitWall(int weapon, int clientNum, vec3_t origin, vec3_t dir, impactSound_t soundType, qboolean altFire, int charge) +{ + int parm; + vec3_t up={0,0,1}; + + switch( weapon ) + { + case WP_BRYAR_PISTOL: + if ( altFire ) + { + parm = charge; + FX_BryarAltHitWall( origin, dir, parm ); + } + else + { + FX_BryarHitWall( origin, dir ); + } + break; + + case WP_TURRET: + FX_TurretHitWall( origin, dir ); + break; + + case WP_BLASTER: + FX_BlasterWeaponHitWall( origin, dir ); + break; + + case WP_DISRUPTOR: + FX_DisruptorAltMiss( origin, dir ); + break; + + case WP_BOWCASTER: + FX_BowcasterHitWall( origin, dir ); + break; + + case WP_REPEATER: + if ( altFire ) + { + FX_RepeaterAltHitWall( origin, dir ); + } + else + { + FX_RepeaterHitWall( origin, dir ); + } + break; + + case WP_DEMP2: + if (altFire) + { + trap_FX_PlayEffectID(trap_FX_RegisterEffect("demp2/altDetonate.efx"), origin, dir); + } + else + { + FX_DEMP2_HitWall( origin, dir ); + } + break; + + case WP_FLECHETTE: + /*if (altFire) + { + CG_SurfaceExplosion(origin, dir, 20.0f, 12.0f, qtrue); + } + else + */ + if (!altFire) + { + FX_FlechetteWeaponHitWall( origin, dir ); + } + break; + + case WP_ROCKET_LAUNCHER: + FX_RocketHitWall( origin, dir ); + break; + + case WP_THERMAL: + trap_FX_PlayEffectID( cgs.effects.thermalExplosionEffect, origin, dir ); + trap_FX_PlayEffectID( cgs.effects.thermalShockwaveEffect, origin, up ); + break; + + case WP_EMPLACED_GUN: + FX_BlasterWeaponHitWall( origin, dir ); + //FIXME: Give it its own hit wall effect + break; + } +} + + +/* +================= +CG_MissileHitPlayer +================= +*/ +void CG_MissileHitPlayer(int weapon, vec3_t origin, vec3_t dir, int entityNum, qboolean altFire) +{ + qboolean humanoid = qtrue; + vec3_t up={0,0,1}; + + /* + // NOTENOTE Non-portable code from single player + if ( cent->gent ) + { + other = &g_entities[cent->gent->s.otherEntityNum]; + + if ( other->client && other->client->playerTeam == TEAM_BOTS ) + { + humanoid = qfalse; + } + } + */ + + // NOTENOTE No bleeding in this game +// CG_Bleed( origin, entityNum ); + + // some weapons will make an explosion with the blood, while + // others will just make the blood + switch ( weapon ) { + case WP_BRYAR_PISTOL: + if ( altFire ) + { + FX_BryarAltHitPlayer( origin, dir, humanoid ); + } + else + { + FX_BryarHitPlayer( origin, dir, humanoid ); + } + break; + + case WP_TURRET: + FX_TurretHitPlayer( origin, dir, humanoid ); + break; + + case WP_BLASTER: + FX_BlasterWeaponHitPlayer( origin, dir, humanoid ); + break; + + case WP_DISRUPTOR: + FX_DisruptorAltHit( origin, dir); + break; + + case WP_BOWCASTER: + FX_BowcasterHitPlayer( origin, dir, humanoid ); + break; + + case WP_REPEATER: + if ( altFire ) + { + FX_RepeaterAltHitPlayer( origin, dir, humanoid ); + } + else + { + FX_RepeaterHitPlayer( origin, dir, humanoid ); + } + break; + + case WP_DEMP2: + // Do a full body effect here for some more feedback + // NOTENOTE The chaining of the demp2 is not yet implemented. + /* + if ( other ) + { + other->s.powerups |= ( 1 << PW_DISINT_1 ); + other->client->ps.powerups[PW_DISINT_1] = cg.time + 650; + } + */ + if (altFire) + { + trap_FX_PlayEffectID(trap_FX_RegisterEffect("demp2/altDetonate.efx"), origin, dir); + } + else + { + FX_DEMP2_HitPlayer( origin, dir, humanoid ); + } + break; + + case WP_FLECHETTE: + FX_FlechetteWeaponHitPlayer( origin, dir, humanoid ); + break; + + case WP_ROCKET_LAUNCHER: + FX_RocketHitPlayer( origin, dir, humanoid ); + break; + + case WP_THERMAL: + trap_FX_PlayEffectID( cgs.effects.thermalExplosionEffect, origin, dir ); + trap_FX_PlayEffectID( cgs.effects.thermalShockwaveEffect, origin, up ); + break; + case WP_EMPLACED_GUN: + //FIXME: Its own effect? + FX_BlasterWeaponHitPlayer( origin, dir, humanoid ); + break; + + default: + break; + } +} + + +/* +============================================================================ + +BULLETS + +============================================================================ +*/ + + +/* +=============== +CG_Tracer +=============== +*/ +void CG_Tracer( vec3_t source, vec3_t dest ) { + vec3_t forward, right; + polyVert_t verts[4]; + vec3_t line; + float len, begin, end; + vec3_t start, finish; + vec3_t midpoint; + + // tracer + VectorSubtract( dest, source, forward ); + len = VectorNormalize( forward ); + + // start at least a little ways from the muzzle + if ( len < 100 ) { + return; + } + begin = 50 + random() * (len - 60); + end = begin + cg_tracerLength.value; + if ( end > len ) { + end = len; + } + VectorMA( source, begin, forward, start ); + VectorMA( source, end, forward, finish ); + + line[0] = DotProduct( forward, cg.refdef.viewaxis[1] ); + line[1] = DotProduct( forward, cg.refdef.viewaxis[2] ); + + VectorScale( cg.refdef.viewaxis[1], line[1], right ); + VectorMA( right, -line[0], cg.refdef.viewaxis[2], right ); + VectorNormalize( right ); + + VectorMA( finish, cg_tracerWidth.value, right, verts[0].xyz ); + verts[0].st[0] = 0; + verts[0].st[1] = 1; + verts[0].modulate[0] = 255; + verts[0].modulate[1] = 255; + verts[0].modulate[2] = 255; + verts[0].modulate[3] = 255; + + VectorMA( finish, -cg_tracerWidth.value, right, verts[1].xyz ); + verts[1].st[0] = 1; + verts[1].st[1] = 0; + verts[1].modulate[0] = 255; + verts[1].modulate[1] = 255; + verts[1].modulate[2] = 255; + verts[1].modulate[3] = 255; + + VectorMA( start, -cg_tracerWidth.value, right, verts[2].xyz ); + verts[2].st[0] = 1; + verts[2].st[1] = 1; + verts[2].modulate[0] = 255; + verts[2].modulate[1] = 255; + verts[2].modulate[2] = 255; + verts[2].modulate[3] = 255; + + VectorMA( start, cg_tracerWidth.value, right, verts[3].xyz ); + verts[3].st[0] = 0; + verts[3].st[1] = 0; + verts[3].modulate[0] = 255; + verts[3].modulate[1] = 255; + verts[3].modulate[2] = 255; + verts[3].modulate[3] = 255; + + trap_R_AddPolyToScene( cgs.media.tracerShader, 4, verts ); + + midpoint[0] = ( start[0] + finish[0] ) * 0.5; + midpoint[1] = ( start[1] + finish[1] ) * 0.5; + midpoint[2] = ( start[2] + finish[2] ) * 0.5; + + // add the tracer sound + //trap_S_StartSound( midpoint, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.tracerSound ); + +} + +/* +====================== +CG_CalcMuzzlePoint +====================== +*/ +qboolean CG_CalcMuzzlePoint( int entityNum, vec3_t muzzle ) { + vec3_t forward, right; + vec3_t gunpoint; + centity_t *cent; + int anim; + + if ( entityNum == cg.snap->ps.clientNum ) + { //I'm not exactly sure why we'd be rendering someone else's crosshair, but hey. + int weapontype = cg.snap->ps.weapon; + vec3_t weaponMuzzle; + + VectorCopy(WP_MuzzlePoint[weapontype], weaponMuzzle); + + if (weapontype == WP_DISRUPTOR || weapontype == WP_STUN_BATON || weapontype == WP_SABER) + { + VectorClear(weaponMuzzle); + } + + if (cg.snap->ps.usingATST) + { + VectorClear(weaponMuzzle); + weaponMuzzle[0] = 16; + weaponMuzzle[2] = 128; + } + + if (cg.renderingThirdPerson) + { + VectorCopy( cg.predictedPlayerEntity.lerpOrigin, gunpoint ); + AngleVectors( cg.predictedPlayerEntity.lerpAngles, forward, right, NULL ); + } + else + { + VectorCopy( cg.refdef.vieworg, gunpoint ); + AngleVectors( cg.refdefViewAngles, forward, right, NULL ); + } + + if (weapontype == WP_EMPLACED_GUN && cg.snap->ps.emplacedIndex) + { + centity_t *gunEnt = &cg_entities[cg.snap->ps.emplacedIndex]; + + if (gunEnt) + { + vec3_t pitchConstraint; + + VectorCopy(gunEnt->lerpOrigin, gunpoint); + gunpoint[2] += 46; + + if (cg.renderingThirdPerson) + { + VectorCopy(cg.predictedPlayerEntity.lerpAngles, pitchConstraint); + } + else + { + VectorCopy(cg.refdefViewAngles, pitchConstraint); + } + + if (pitchConstraint[PITCH] > 40) + { + pitchConstraint[PITCH] = 40; + } + AngleVectors( pitchConstraint, forward, right, NULL ); + } + } + + VectorCopy(gunpoint, muzzle); + + VectorMA(muzzle, weaponMuzzle[0], forward, muzzle); + VectorMA(muzzle, weaponMuzzle[1], right, muzzle); + + if (weapontype == WP_EMPLACED_GUN && cg.snap->ps.emplacedIndex) + { + //Do nothing + } + else if (cg.renderingThirdPerson) + { + muzzle[2] += cg.snap->ps.viewheight + weaponMuzzle[2]; + } + else + { + muzzle[2] += weaponMuzzle[2]; + } + + return qtrue; + } + + cent = &cg_entities[entityNum]; + if ( !cent->currentValid ) { + return qfalse; + } + + VectorCopy( cent->currentState.pos.trBase, muzzle ); + + AngleVectors( cent->currentState.apos.trBase, forward, NULL, NULL ); + anim = cent->currentState.legsAnim & ~ANIM_TOGGLEBIT; + if ( anim == BOTH_CROUCH1WALK || anim == BOTH_CROUCH1IDLE ) { + muzzle[2] += CROUCH_VIEWHEIGHT; + } else { + muzzle[2] += DEFAULT_VIEWHEIGHT; + } + + VectorMA( muzzle, 14, forward, muzzle ); + + return qtrue; + +} + + + +/* +Ghoul2 Insert Start +*/ + +// create one instance of all the weapons we are going to use so we can just copy this info into each clients gun ghoul2 object in fast way +void *g2WeaponInstances[MAX_WEAPONS]; +void CG_InitG2Weapons(void) +{ + int i = 0; + gitem_t *item; + memset(g2WeaponInstances, 0, sizeof(g2WeaponInstances)); + for ( item = bg_itemlist + 1 ; item->classname ; item++ ) + { + if ( item->giType == IT_WEAPON ) + { + // initialise model + trap_G2API_InitGhoul2Model(&g2WeaponInstances[/*i*/item->giTag], item->world_model[0], 0, 0, 0, 0, 0); +// trap_G2API_InitGhoul2Model(&g2WeaponInstances[i], item->world_model[0],G_ModelIndex( item->world_model[0] ) , 0, 0, 0, 0); + if (g2WeaponInstances[/*i*/item->giTag]) + { + // indicate we will be bolted to model 0 (ie the player) on bolt 0 (always the right hand) when we get copied + trap_G2API_SetBoltInfo(g2WeaponInstances[/*i*/item->giTag], 0, 0); + // now set up the gun bolt on it + trap_G2API_AddBolt(g2WeaponInstances[/*i*/item->giTag], 0, "*flash"); + i++; + } + if (i == MAX_WEAPONS) + { + assert(0); + break; + } + + } + } +} + +// clean out any g2 models we instanciated for copying purposes +void CG_ShutDownG2Weapons(void) +{ + int i; + for (i=0; icurrentState.saberInFlight) + { + cent->ghoul2weapon = g2WeaponInstances[WP_SABER]; + } + + if (cent->currentState.eFlags & EF_DEAD) + { //no updating weapons when dead + cent->ghoul2weapon = NULL; + return; + } + + if (cent->torsoBolt) + { //got our limb cut off, no updating weapons until it's restored + cent->ghoul2weapon = NULL; + return; + } + + if (ps && ps->usingATST) + { + cent->ghoul2weapon = NULL; + } + + if (cent->isATST) + { + cent->ghoul2weapon = NULL; + return; + } + + if (cent->ghoul2 && cent->ghoul2weapon != g2WeaponInstances[ps->weapon] && + ps->clientNum == cent->currentState.number) //don't want spectator mode forcing one client's weapon instance over another's + { + CG_CopyG2WeaponInstance(ps->weapon, cent->ghoul2); + cent->ghoul2weapon = g2WeaponInstances[ps->weapon]; + if (cent->weapon == WP_SABER && cg_entities[cent->currentState.number].weapon != ps->weapon && !ps->saberHolstered) + { //switching away from the saber + trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberoffquick.wav" )); + } + else if (ps->weapon == WP_SABER && cg_entities[cent->currentState.number].weapon != ps->weapon) + { //switching to the saber + trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" )); + } + cent->weapon = ps->weapon; + cg_entities[cent->currentState.number].weapon = ps->weapon; + } +} + + +/* +Ghoul2 Insert End +*/ diff --git a/code/cgame/cgame (2).bat b/code/cgame/cgame (2).bat new file mode 100644 index 0000000..dda5c09 --- /dev/null +++ b/code/cgame/cgame (2).bat @@ -0,0 +1,102 @@ +@set include= +@set savedpath=%path% +@set path=%path%;..\..\..\bin + +del /q vm +if not exist vm\nul mkdir vm +cd vm +set cc=..\..\..\bin\lcc -DQ3_VM -DMISSIONPACK -DCGAME -S -Wf-target=bytecode -Wf-g -I..\..\cgame -I..\..\game -I..\..\ui %1 + +%cc% ../../game/bg_misc.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_weapons.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_panimate.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_pmove.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_slidemove.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_lib.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_saber.c +@if errorlevel 1 goto quit +%cc% ../../game/q_math.c +@if errorlevel 1 goto quit +%cc% ../../game/q_shared.c +@if errorlevel 1 goto quit +%cc% ../cg_consolecmds.c +@if errorlevel 1 goto quit +%cc% ../cg_draw.c +@if errorlevel 1 goto quit +%cc% ../cg_drawtools.c +@if errorlevel 1 goto quit +%cc% ../cg_effects.c +@if errorlevel 1 goto quit +%cc% ../cg_ents.c +@if errorlevel 1 goto quit +%cc% ../cg_event.c +@if errorlevel 1 goto quit +%cc% ../cg_info.c +@if errorlevel 1 goto quit +%cc% ../cg_light.c +@if errorlevel 1 goto quit +%cc% ../cg_localents.c +@if errorlevel 1 goto quit +%cc% ../cg_main.c +@if errorlevel 1 goto quit +%cc% ../cg_marks.c +@if errorlevel 1 goto quit +%cc% ../cg_players.c +@if errorlevel 1 goto quit +%cc% ../cg_playerstate.c +@if errorlevel 1 goto quit +%cc% ../cg_predict.c +@if errorlevel 1 goto quit +%cc% ../cg_saga.c +@if errorlevel 1 goto quit +%cc% ../cg_scoreboard.c +@if errorlevel 1 goto quit +%cc% ../cg_servercmds.c +@if errorlevel 1 goto quit +%cc% ../cg_snapshot.c +@if errorlevel 1 goto quit +%cc% ../cg_turret.c +@if errorlevel 1 goto quit +%cc% ../cg_view.c +@if errorlevel 1 goto quit +%cc% ../cg_weaponinit.c +@if errorlevel 1 goto quit +%cc% ../cg_weapons.c +@if errorlevel 1 goto quit +%cc% ../fx_blaster.c +@if errorlevel 1 goto quit +%cc% ../fx_bowcaster.c +@if errorlevel 1 goto quit +%cc% ../fx_bryarpistol.c +@if errorlevel 1 goto quit +%cc% ../fx_demp2.c +@if errorlevel 1 goto quit +%cc% ../fx_disruptor.c +@if errorlevel 1 goto quit +%cc% ../fx_flechette.c +@if errorlevel 1 goto quit +%cc% ../fx_heavyrepeater.c +@if errorlevel 1 goto quit +%cc% ../fx_rocketlauncher.c +@if errorlevel 1 goto quit +%cc% ../fx_force.c +@if errorlevel 1 goto quit +%cc% ../../ui/ui_shared.c +@if errorlevel 1 goto quit +%cc% ../cg_newDraw.c +@if errorlevel 1 goto quit + +..\..\..\bin\q3asm -f ../cgame +@if errorlevel 1 goto quit + +:quit +@set path=%savedpath% +@set savedpath= + +cd .. diff --git a/code/cgame/cgame (2).q3asm b/code/cgame/cgame (2).q3asm new file mode 100644 index 0000000..6d61a1b --- /dev/null +++ b/code/cgame/cgame (2).q3asm @@ -0,0 +1,44 @@ +-o "../../base/vm/cgame" +cg_main +..\cg_syscalls +cg_consolecmds +cg_draw +cg_drawtools +cg_effects +cg_ents +cg_event +cg_info +cg_light +cg_localents +cg_marks +cg_players +cg_playerstate +cg_predict +cg_saga +cg_scoreboard +cg_servercmds +cg_snapshot +cg_turret +cg_view +cg_weaponinit +cg_weapons +fx_blaster +fx_bowcaster +fx_bryarpistol +fx_demp2 +fx_disruptor +fx_flechette +fx_heavyrepeater +fx_rocketlauncher +fx_force +bg_slidemove +bg_weapons +bg_panimate +bg_pmove +bg_lib +bg_misc +bg_saber +q_math +q_shared +ui_shared +cg_newDraw diff --git a/code/cgame/cgame.bat b/code/cgame/cgame.bat new file mode 100644 index 0000000..dda5c09 --- /dev/null +++ b/code/cgame/cgame.bat @@ -0,0 +1,102 @@ +@set include= +@set savedpath=%path% +@set path=%path%;..\..\..\bin + +del /q vm +if not exist vm\nul mkdir vm +cd vm +set cc=..\..\..\bin\lcc -DQ3_VM -DMISSIONPACK -DCGAME -S -Wf-target=bytecode -Wf-g -I..\..\cgame -I..\..\game -I..\..\ui %1 + +%cc% ../../game/bg_misc.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_weapons.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_panimate.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_pmove.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_slidemove.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_lib.c +@if errorlevel 1 goto quit +%cc% ../../game/bg_saber.c +@if errorlevel 1 goto quit +%cc% ../../game/q_math.c +@if errorlevel 1 goto quit +%cc% ../../game/q_shared.c +@if errorlevel 1 goto quit +%cc% ../cg_consolecmds.c +@if errorlevel 1 goto quit +%cc% ../cg_draw.c +@if errorlevel 1 goto quit +%cc% ../cg_drawtools.c +@if errorlevel 1 goto quit +%cc% ../cg_effects.c +@if errorlevel 1 goto quit +%cc% ../cg_ents.c +@if errorlevel 1 goto quit +%cc% ../cg_event.c +@if errorlevel 1 goto quit +%cc% ../cg_info.c +@if errorlevel 1 goto quit +%cc% ../cg_light.c +@if errorlevel 1 goto quit +%cc% ../cg_localents.c +@if errorlevel 1 goto quit +%cc% ../cg_main.c +@if errorlevel 1 goto quit +%cc% ../cg_marks.c +@if errorlevel 1 goto quit +%cc% ../cg_players.c +@if errorlevel 1 goto quit +%cc% ../cg_playerstate.c +@if errorlevel 1 goto quit +%cc% ../cg_predict.c +@if errorlevel 1 goto quit +%cc% ../cg_saga.c +@if errorlevel 1 goto quit +%cc% ../cg_scoreboard.c +@if errorlevel 1 goto quit +%cc% ../cg_servercmds.c +@if errorlevel 1 goto quit +%cc% ../cg_snapshot.c +@if errorlevel 1 goto quit +%cc% ../cg_turret.c +@if errorlevel 1 goto quit +%cc% ../cg_view.c +@if errorlevel 1 goto quit +%cc% ../cg_weaponinit.c +@if errorlevel 1 goto quit +%cc% ../cg_weapons.c +@if errorlevel 1 goto quit +%cc% ../fx_blaster.c +@if errorlevel 1 goto quit +%cc% ../fx_bowcaster.c +@if errorlevel 1 goto quit +%cc% ../fx_bryarpistol.c +@if errorlevel 1 goto quit +%cc% ../fx_demp2.c +@if errorlevel 1 goto quit +%cc% ../fx_disruptor.c +@if errorlevel 1 goto quit +%cc% ../fx_flechette.c +@if errorlevel 1 goto quit +%cc% ../fx_heavyrepeater.c +@if errorlevel 1 goto quit +%cc% ../fx_rocketlauncher.c +@if errorlevel 1 goto quit +%cc% ../fx_force.c +@if errorlevel 1 goto quit +%cc% ../../ui/ui_shared.c +@if errorlevel 1 goto quit +%cc% ../cg_newDraw.c +@if errorlevel 1 goto quit + +..\..\..\bin\q3asm -f ../cgame +@if errorlevel 1 goto quit + +:quit +@set path=%savedpath% +@set savedpath= + +cd .. diff --git a/code/cgame/cgame.q3asm b/code/cgame/cgame.q3asm new file mode 100644 index 0000000..6d61a1b --- /dev/null +++ b/code/cgame/cgame.q3asm @@ -0,0 +1,44 @@ +-o "../../base/vm/cgame" +cg_main +..\cg_syscalls +cg_consolecmds +cg_draw +cg_drawtools +cg_effects +cg_ents +cg_event +cg_info +cg_light +cg_localents +cg_marks +cg_players +cg_playerstate +cg_predict +cg_saga +cg_scoreboard +cg_servercmds +cg_snapshot +cg_turret +cg_view +cg_weaponinit +cg_weapons +fx_blaster +fx_bowcaster +fx_bryarpistol +fx_demp2 +fx_disruptor +fx_flechette +fx_heavyrepeater +fx_rocketlauncher +fx_force +bg_slidemove +bg_weapons +bg_panimate +bg_pmove +bg_lib +bg_misc +bg_saber +q_math +q_shared +ui_shared +cg_newDraw diff --git a/code/cgame/fx_blaster (2).c b/code/cgame/fx_blaster (2).c new file mode 100644 index 0000000..ae82242 --- /dev/null +++ b/code/cgame/fx_blaster (2).c @@ -0,0 +1,65 @@ +// Blaster Weapon + +#include "cg_local.h" + +/* +------------------------- +FX_BlasterProjectileThink +------------------------- +*/ + +void FX_BlasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.blasterShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_BlasterAltFireThink +------------------------- +*/ +void FX_BlasterAltFireThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.blasterShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_BlasterWeaponHitWall +------------------------- +*/ +void FX_BlasterWeaponHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.blasterWallImpactEffect, origin, normal ); +} + +/* +------------------------- +FX_BlasterWeaponHitPlayer +------------------------- +*/ +void FX_BlasterWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + if ( humanoid ) + { + trap_FX_PlayEffectID( cgs.effects.blasterFleshImpactEffect, origin, normal ); + } + else + { + trap_FX_PlayEffectID( cgs.effects.blasterDroidImpactEffect, origin, normal ); + } +} diff --git a/code/cgame/fx_blaster.c b/code/cgame/fx_blaster.c new file mode 100644 index 0000000..ae82242 --- /dev/null +++ b/code/cgame/fx_blaster.c @@ -0,0 +1,65 @@ +// Blaster Weapon + +#include "cg_local.h" + +/* +------------------------- +FX_BlasterProjectileThink +------------------------- +*/ + +void FX_BlasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.blasterShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_BlasterAltFireThink +------------------------- +*/ +void FX_BlasterAltFireThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.blasterShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_BlasterWeaponHitWall +------------------------- +*/ +void FX_BlasterWeaponHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.blasterWallImpactEffect, origin, normal ); +} + +/* +------------------------- +FX_BlasterWeaponHitPlayer +------------------------- +*/ +void FX_BlasterWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + if ( humanoid ) + { + trap_FX_PlayEffectID( cgs.effects.blasterFleshImpactEffect, origin, normal ); + } + else + { + trap_FX_PlayEffectID( cgs.effects.blasterDroidImpactEffect, origin, normal ); + } +} diff --git a/code/cgame/fx_bowcaster (2).c b/code/cgame/fx_bowcaster (2).c new file mode 100644 index 0000000..638a1ee --- /dev/null +++ b/code/cgame/fx_bowcaster (2).c @@ -0,0 +1,62 @@ +// Bowcaster Weapon + +#include "cg_local.h" + +/* +--------------------------- +FX_BowcasterProjectileThink +--------------------------- +*/ + +void FX_BowcasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.bowcasterShotEffect, cent->lerpOrigin, forward ); +} + +/* +--------------------------- +FX_BowcasterHitWall +--------------------------- +*/ + +void FX_BowcasterHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.bowcasterImpactEffect, origin, normal ); +} + +/* +--------------------------- +FX_BowcasterHitPlayer +--------------------------- +*/ + +void FX_BowcasterHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.bowcasterImpactEffect, origin, normal ); +} + +/* +------------------------------ +FX_BowcasterAltProjectileThink +------------------------------ +*/ + +void FX_BowcasterAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.bowcasterShotEffect, cent->lerpOrigin, forward ); +} + diff --git a/code/cgame/fx_bowcaster.c b/code/cgame/fx_bowcaster.c new file mode 100644 index 0000000..638a1ee --- /dev/null +++ b/code/cgame/fx_bowcaster.c @@ -0,0 +1,62 @@ +// Bowcaster Weapon + +#include "cg_local.h" + +/* +--------------------------- +FX_BowcasterProjectileThink +--------------------------- +*/ + +void FX_BowcasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.bowcasterShotEffect, cent->lerpOrigin, forward ); +} + +/* +--------------------------- +FX_BowcasterHitWall +--------------------------- +*/ + +void FX_BowcasterHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.bowcasterImpactEffect, origin, normal ); +} + +/* +--------------------------- +FX_BowcasterHitPlayer +--------------------------- +*/ + +void FX_BowcasterHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.bowcasterImpactEffect, origin, normal ); +} + +/* +------------------------------ +FX_BowcasterAltProjectileThink +------------------------------ +*/ + +void FX_BowcasterAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.bowcasterShotEffect, cent->lerpOrigin, forward ); +} + diff --git a/code/cgame/fx_bryarpistol (2).c b/code/cgame/fx_bryarpistol (2).c new file mode 100644 index 0000000..464f067 --- /dev/null +++ b/code/cgame/fx_bryarpistol (2).c @@ -0,0 +1,171 @@ +// Bryar Pistol Weapon Effects + +#include "cg_local.h" + +/* +------------------------- + + MAIN FIRE + +------------------------- +FX_BryarProjectileThink +------------------------- +*/ +void FX_BryarProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.bryarShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_BryarHitWall +------------------------- +*/ +void FX_BryarHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect, origin, normal ); +} + +/* +------------------------- +FX_BryarHitPlayer +------------------------- +*/ +void FX_BryarHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + if ( humanoid ) + { + trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal ); + } + else + { + trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal ); + } +} + + +/* +------------------------- + + ALT FIRE + +------------------------- +FX_BryarAltProjectileThink +------------------------- +*/ +void FX_BryarAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + int t; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + // see if we have some sort of extra charge going on + for (t = 1; t < cent->currentState.generic1; t++ ) + { + // just add ourselves over, and over, and over when we are charged + trap_FX_PlayEffectID( cgs.effects.bryarPowerupShotEffect, cent->lerpOrigin, forward ); + } + + // for ( int t = 1; t < cent->gent->count; t++ ) // The single player stores the charge in count, which isn't accessible on the client + + trap_FX_PlayEffectID( cgs.effects.bryarShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_BryarAltHitWall +------------------------- +*/ +void FX_BryarAltHitWall( vec3_t origin, vec3_t normal, int power ) +{ + switch( power ) + { + case 4: + case 5: + trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect3, origin, normal ); + break; + + case 2: + case 3: + trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect2, origin, normal ); + break; + + default: + trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect, origin, normal ); + break; + } +} + +/* +------------------------- +FX_BryarAltHitPlayer +------------------------- +*/ +void FX_BryarAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + if ( humanoid ) + { + trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal ); + } + else + { + trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal ); + } +} + + +//TURRET +/* +------------------------- +FX_TurretProjectileThink +------------------------- +*/ +void FX_TurretProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.turretShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_TurretHitWall +------------------------- +*/ +void FX_TurretHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect, origin, normal ); +} + +/* +------------------------- +FX_TurretHitPlayer +------------------------- +*/ +void FX_TurretHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + if ( humanoid ) + { + trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal ); + } + else + { + trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal ); + } +} diff --git a/code/cgame/fx_bryarpistol.c b/code/cgame/fx_bryarpistol.c new file mode 100644 index 0000000..464f067 --- /dev/null +++ b/code/cgame/fx_bryarpistol.c @@ -0,0 +1,171 @@ +// Bryar Pistol Weapon Effects + +#include "cg_local.h" + +/* +------------------------- + + MAIN FIRE + +------------------------- +FX_BryarProjectileThink +------------------------- +*/ +void FX_BryarProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.bryarShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_BryarHitWall +------------------------- +*/ +void FX_BryarHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect, origin, normal ); +} + +/* +------------------------- +FX_BryarHitPlayer +------------------------- +*/ +void FX_BryarHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + if ( humanoid ) + { + trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal ); + } + else + { + trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal ); + } +} + + +/* +------------------------- + + ALT FIRE + +------------------------- +FX_BryarAltProjectileThink +------------------------- +*/ +void FX_BryarAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + int t; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + // see if we have some sort of extra charge going on + for (t = 1; t < cent->currentState.generic1; t++ ) + { + // just add ourselves over, and over, and over when we are charged + trap_FX_PlayEffectID( cgs.effects.bryarPowerupShotEffect, cent->lerpOrigin, forward ); + } + + // for ( int t = 1; t < cent->gent->count; t++ ) // The single player stores the charge in count, which isn't accessible on the client + + trap_FX_PlayEffectID( cgs.effects.bryarShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_BryarAltHitWall +------------------------- +*/ +void FX_BryarAltHitWall( vec3_t origin, vec3_t normal, int power ) +{ + switch( power ) + { + case 4: + case 5: + trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect3, origin, normal ); + break; + + case 2: + case 3: + trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect2, origin, normal ); + break; + + default: + trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect, origin, normal ); + break; + } +} + +/* +------------------------- +FX_BryarAltHitPlayer +------------------------- +*/ +void FX_BryarAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + if ( humanoid ) + { + trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal ); + } + else + { + trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal ); + } +} + + +//TURRET +/* +------------------------- +FX_TurretProjectileThink +------------------------- +*/ +void FX_TurretProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.turretShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_TurretHitWall +------------------------- +*/ +void FX_TurretHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect, origin, normal ); +} + +/* +------------------------- +FX_TurretHitPlayer +------------------------- +*/ +void FX_TurretHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + if ( humanoid ) + { + trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal ); + } + else + { + trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal ); + } +} diff --git a/code/cgame/fx_demp2 (2).c b/code/cgame/fx_demp2 (2).c new file mode 100644 index 0000000..410b3db --- /dev/null +++ b/code/cgame/fx_demp2 (2).c @@ -0,0 +1,259 @@ +// DEMP2 Weapon + +#include "cg_local.h" + +/* +--------------------------- +FX_DEMP2_ProjectileThink +--------------------------- +*/ + +void FX_DEMP2_ProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.demp2ProjectileEffect, cent->lerpOrigin, forward ); +} + +/* +--------------------------- +FX_DEMP2_HitWall +--------------------------- +*/ + +void FX_DEMP2_HitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.demp2WallImpactEffect, origin, normal ); +} + +/* +--------------------------- +FX_DEMP2_HitPlayer +--------------------------- +*/ + +void FX_DEMP2_HitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.demp2FleshImpactEffect, origin, normal ); +} + +/* +--------------------------- +FX_DEMP2_AltBeam +--------------------------- +*/ +void FX_DEMP2_AltBeam( vec3_t start, vec3_t end, vec3_t normal, //qboolean spark, + vec3_t targ1, vec3_t targ2 ) +{ +//NOTENOTE Fix this after trap calls for all primitives are created. +/* + vec3_t dir, chaos, + c1, c2, + v1, v2; + float len, + s1, s2, s3; + + VectorSubtract( end, start, dir ); + len = VectorNormalize( dir ); + + // Get the base control points, we'll work from there + VectorMA( start, 0.3333f * len, dir, c1 ); + VectorMA( start, 0.6666f * len, dir, c2 ); + + // get some chaos values that really aren't very chaotic :) + s1 = sin( cg.time * 0.005f ) * 2 + crandom() * 0.2f; + s2 = sin( cg.time * 0.001f ); + s3 = sin( cg.time * 0.011f ); + + VectorSet( chaos, len * 0.01f * s1, + len * 0.02f * s2, + len * 0.04f * (s1 + s2 + s3)); + + VectorAdd( c1, chaos, c1 ); + VectorScale( chaos, 4.0f, v1 ); + + VectorSet( chaos, -len * 0.02f * s3, + len * 0.01f * (s1 * s2), + -len * 0.02f * (s1 + s2 * s3)); + + VectorAdd( c2, chaos, c2 ); + VectorScale( chaos, 2.0f, v2 ); + + VectorSet( chaos, 1.0f, 1.0f, 1.0f ); + + FX_AddBezier( start, targ1, + c1, v1, c2, v2, + 5.0f + s1 * 2, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + FX_AddBezier( start, targ1, + c2, v2, c1, v1, + 3.0f + s3, 3.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + s1 = sin( cg.time * 0.0005f ) + crandom() * 0.1f; + s2 = sin( cg.time * 0.0025f ); + float cc2 = cos( cg.time * 0.0025f ); + s3 = sin( cg.time * 0.01f ) + crandom() * 0.1f; + + VectorSet( chaos, len * 0.08f * s2, + len * 0.04f * cc2,//s1 * -s3, + len * 0.06f * s3 ); + + VectorAdd( c1, chaos, c1 ); + VectorScale( chaos, 4.0f, v1 ); + + VectorSet( chaos, len * 0.02f * s1 * s3, + len * 0.04f * s2, + len * 0.03f * s1 * s2 ); + + VectorAdd( c2, chaos, c2 ); + VectorScale( chaos, 3.0f, v2 ); + + VectorSet( chaos, 1.0f, 1.0f, 1.0f ); + + FX_AddBezier( start, targ1, + c1, v1, c2, v2, + 4.0f + s3, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + FX_AddBezier( start, targ1, + c2, v1, c1, v2, + 5.0f + s1 * 2, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + + VectorMA( start, 14.0f, dir, c1 ); + + FX_AddSprite( c1, NULL, NULL, 12.0f + crandom() * 4, 0.0f, 1.0f, 1.0f, random() * 360, 0.0f, 1.0f, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); + FX_AddSprite( c1, NULL, NULL, 6.0f + crandom() * 2, 0.0f, 1.0f, 1.0f, random() * 360, 0.0f, 1.0f, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); + + FX_AddSprite( targ1, NULL, NULL, 4.0f + crandom(), 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); + FX_AddSprite( targ1, NULL, NULL, 8.0f + crandom() * 2, 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); + + + //-------------------------------------------- + + VectorSubtract( targ2, targ1, dir ); + len = VectorNormalize( dir ); + + // Get the base control points, we'll work from there + VectorMA( targ1, 0.3333f * len, dir, c1 ); + VectorMA( targ1, 0.6666f * len, dir, c2 ); + + // get some chaos values that really aren't very chaotic :) + s1 = sin( cg.time * 0.005f ) * 2 + crandom() * 0.2f; + s2 = sin( cg.time * 0.001f ); + s3 = sin( cg.time * 0.011f ); + + VectorSet( chaos, len * 0.01f * s1, + len * 0.02f * s2, + len * 0.04f * (s1 + s2 + s3)); + + VectorAdd( c1, chaos, c1 ); + VectorScale( chaos, 4.0f, v1 ); + + VectorSet( chaos, -len * 0.02f * s3, + len * 0.01f * (s1 * s2), + -len * 0.02f * (s1 + s2 * s3)); + + VectorAdd( c2, chaos, c2 ); + VectorScale( chaos, 2.0f, v2 ); + + VectorSet( chaos, 1.0f, 1.0f, 1.0f ); + + FX_AddBezier( targ1, targ2, + c1, v1, c2, v2, + 5.0f + s1 * 2, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + FX_AddBezier( targ1, targ2, + c2, v2, c1, v1, + 3.0f + s3, 3.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + s1 = sin( cg.time * 0.0005f ) + crandom() * 0.1f; + s2 = sin( cg.time * 0.0025f ); + cc2 = cos( cg.time * 0.0025f ); + s3 = sin( cg.time * 0.01f ) + crandom() * 0.1f; + + VectorSet( chaos, len * 0.08f * s2, + len * 0.04f * cc2,//s1 * -s3, + len * 0.06f * s3 ); + + VectorAdd( c1, chaos, c1 ); + VectorScale( chaos, 4.0f, v1 ); + + VectorSet( chaos, len * 0.02f * s1 * s3, + len * 0.04f * s2, + len * 0.03f * s1 * s2 ); + + VectorAdd( c2, chaos, c2 ); + VectorScale( chaos, 3.0f, v2 ); + + VectorSet( chaos, 1.0f, 1.0f, 1.0f ); + + FX_AddBezier( targ1, targ2, + c1, v1, c2, v2, + 4.0f + s3, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + FX_AddBezier( targ1, targ2, + c2, v1, c1, v2, + 5.0f + s1 * 2, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + + FX_AddSprite( targ2, NULL, NULL, 4.0f + crandom(), 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); + FX_AddSprite( targ2, NULL, NULL, 8.0f + crandom() * 2, 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); +*/ +} + +//--------------------------------------------- +void FX_DEMP2_AltDetonate( vec3_t org, float size ) +{ + localEntity_t *ex; + + ex = CG_AllocLocalEntity(); + ex->leType = LE_FADE_SCALE_MODEL; + memset( &ex->refEntity, 0, sizeof( refEntity_t )); + + ex->refEntity.renderfx |= RF_VOLUMETRIC; + + ex->startTime = cg.time; + ex->endTime = ex->startTime + 800;//1600; + + ex->radius = size; + ex->refEntity.customShader = cgs.media.demp2ShellShader; + ex->refEntity.hModel = cgs.media.demp2Shell; + VectorCopy( org, ex->refEntity.origin ); + + ex->color[0] = ex->color[1] = ex->color[2] = 255.0f; +} diff --git a/code/cgame/fx_demp2.c b/code/cgame/fx_demp2.c new file mode 100644 index 0000000..410b3db --- /dev/null +++ b/code/cgame/fx_demp2.c @@ -0,0 +1,259 @@ +// DEMP2 Weapon + +#include "cg_local.h" + +/* +--------------------------- +FX_DEMP2_ProjectileThink +--------------------------- +*/ + +void FX_DEMP2_ProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.demp2ProjectileEffect, cent->lerpOrigin, forward ); +} + +/* +--------------------------- +FX_DEMP2_HitWall +--------------------------- +*/ + +void FX_DEMP2_HitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.demp2WallImpactEffect, origin, normal ); +} + +/* +--------------------------- +FX_DEMP2_HitPlayer +--------------------------- +*/ + +void FX_DEMP2_HitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.demp2FleshImpactEffect, origin, normal ); +} + +/* +--------------------------- +FX_DEMP2_AltBeam +--------------------------- +*/ +void FX_DEMP2_AltBeam( vec3_t start, vec3_t end, vec3_t normal, //qboolean spark, + vec3_t targ1, vec3_t targ2 ) +{ +//NOTENOTE Fix this after trap calls for all primitives are created. +/* + vec3_t dir, chaos, + c1, c2, + v1, v2; + float len, + s1, s2, s3; + + VectorSubtract( end, start, dir ); + len = VectorNormalize( dir ); + + // Get the base control points, we'll work from there + VectorMA( start, 0.3333f * len, dir, c1 ); + VectorMA( start, 0.6666f * len, dir, c2 ); + + // get some chaos values that really aren't very chaotic :) + s1 = sin( cg.time * 0.005f ) * 2 + crandom() * 0.2f; + s2 = sin( cg.time * 0.001f ); + s3 = sin( cg.time * 0.011f ); + + VectorSet( chaos, len * 0.01f * s1, + len * 0.02f * s2, + len * 0.04f * (s1 + s2 + s3)); + + VectorAdd( c1, chaos, c1 ); + VectorScale( chaos, 4.0f, v1 ); + + VectorSet( chaos, -len * 0.02f * s3, + len * 0.01f * (s1 * s2), + -len * 0.02f * (s1 + s2 * s3)); + + VectorAdd( c2, chaos, c2 ); + VectorScale( chaos, 2.0f, v2 ); + + VectorSet( chaos, 1.0f, 1.0f, 1.0f ); + + FX_AddBezier( start, targ1, + c1, v1, c2, v2, + 5.0f + s1 * 2, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + FX_AddBezier( start, targ1, + c2, v2, c1, v1, + 3.0f + s3, 3.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + s1 = sin( cg.time * 0.0005f ) + crandom() * 0.1f; + s2 = sin( cg.time * 0.0025f ); + float cc2 = cos( cg.time * 0.0025f ); + s3 = sin( cg.time * 0.01f ) + crandom() * 0.1f; + + VectorSet( chaos, len * 0.08f * s2, + len * 0.04f * cc2,//s1 * -s3, + len * 0.06f * s3 ); + + VectorAdd( c1, chaos, c1 ); + VectorScale( chaos, 4.0f, v1 ); + + VectorSet( chaos, len * 0.02f * s1 * s3, + len * 0.04f * s2, + len * 0.03f * s1 * s2 ); + + VectorAdd( c2, chaos, c2 ); + VectorScale( chaos, 3.0f, v2 ); + + VectorSet( chaos, 1.0f, 1.0f, 1.0f ); + + FX_AddBezier( start, targ1, + c1, v1, c2, v2, + 4.0f + s3, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + FX_AddBezier( start, targ1, + c2, v1, c1, v2, + 5.0f + s1 * 2, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + + VectorMA( start, 14.0f, dir, c1 ); + + FX_AddSprite( c1, NULL, NULL, 12.0f + crandom() * 4, 0.0f, 1.0f, 1.0f, random() * 360, 0.0f, 1.0f, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); + FX_AddSprite( c1, NULL, NULL, 6.0f + crandom() * 2, 0.0f, 1.0f, 1.0f, random() * 360, 0.0f, 1.0f, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); + + FX_AddSprite( targ1, NULL, NULL, 4.0f + crandom(), 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); + FX_AddSprite( targ1, NULL, NULL, 8.0f + crandom() * 2, 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); + + + //-------------------------------------------- + + VectorSubtract( targ2, targ1, dir ); + len = VectorNormalize( dir ); + + // Get the base control points, we'll work from there + VectorMA( targ1, 0.3333f * len, dir, c1 ); + VectorMA( targ1, 0.6666f * len, dir, c2 ); + + // get some chaos values that really aren't very chaotic :) + s1 = sin( cg.time * 0.005f ) * 2 + crandom() * 0.2f; + s2 = sin( cg.time * 0.001f ); + s3 = sin( cg.time * 0.011f ); + + VectorSet( chaos, len * 0.01f * s1, + len * 0.02f * s2, + len * 0.04f * (s1 + s2 + s3)); + + VectorAdd( c1, chaos, c1 ); + VectorScale( chaos, 4.0f, v1 ); + + VectorSet( chaos, -len * 0.02f * s3, + len * 0.01f * (s1 * s2), + -len * 0.02f * (s1 + s2 * s3)); + + VectorAdd( c2, chaos, c2 ); + VectorScale( chaos, 2.0f, v2 ); + + VectorSet( chaos, 1.0f, 1.0f, 1.0f ); + + FX_AddBezier( targ1, targ2, + c1, v1, c2, v2, + 5.0f + s1 * 2, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + FX_AddBezier( targ1, targ2, + c2, v2, c1, v1, + 3.0f + s3, 3.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + s1 = sin( cg.time * 0.0005f ) + crandom() * 0.1f; + s2 = sin( cg.time * 0.0025f ); + cc2 = cos( cg.time * 0.0025f ); + s3 = sin( cg.time * 0.01f ) + crandom() * 0.1f; + + VectorSet( chaos, len * 0.08f * s2, + len * 0.04f * cc2,//s1 * -s3, + len * 0.06f * s3 ); + + VectorAdd( c1, chaos, c1 ); + VectorScale( chaos, 4.0f, v1 ); + + VectorSet( chaos, len * 0.02f * s1 * s3, + len * 0.04f * s2, + len * 0.03f * s1 * s2 ); + + VectorAdd( c2, chaos, c2 ); + VectorScale( chaos, 3.0f, v2 ); + + VectorSet( chaos, 1.0f, 1.0f, 1.0f ); + + FX_AddBezier( targ1, targ2, + c1, v1, c2, v2, + 4.0f + s3, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + FX_AddBezier( targ1, targ2, + c2, v1, c1, v2, + 5.0f + s1 * 2, 8.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + chaos, chaos, 0.0f, + 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); + + + FX_AddSprite( targ2, NULL, NULL, 4.0f + crandom(), 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); + FX_AddSprite( targ2, NULL, NULL, 8.0f + crandom() * 2, 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, + trap_R_RegisterShader( "gfx/misc/lightningFlash" )); +*/ +} + +//--------------------------------------------- +void FX_DEMP2_AltDetonate( vec3_t org, float size ) +{ + localEntity_t *ex; + + ex = CG_AllocLocalEntity(); + ex->leType = LE_FADE_SCALE_MODEL; + memset( &ex->refEntity, 0, sizeof( refEntity_t )); + + ex->refEntity.renderfx |= RF_VOLUMETRIC; + + ex->startTime = cg.time; + ex->endTime = ex->startTime + 800;//1600; + + ex->radius = size; + ex->refEntity.customShader = cgs.media.demp2ShellShader; + ex->refEntity.hModel = cgs.media.demp2Shell; + VectorCopy( org, ex->refEntity.origin ); + + ex->color[0] = ex->color[1] = ex->color[2] = 255.0f; +} diff --git a/code/cgame/fx_disruptor (2).c b/code/cgame/fx_disruptor (2).c new file mode 100644 index 0000000..e344e4f --- /dev/null +++ b/code/cgame/fx_disruptor (2).c @@ -0,0 +1,148 @@ +// Disruptor Weapon + +#include "cg_local.h" +#include "fx_local.h" + +/* +--------------------------- +FX_DisruptorMainShot +--------------------------- +*/ +static vec3_t WHITE={1.0f,1.0f,1.0f}; + +void FX_DisruptorMainShot( vec3_t start, vec3_t end ) +{ +// vec3_t dir; +// float len; + + trap_FX_AddLine( start, end, 0.1f, 6.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + WHITE, WHITE, 0.0f, + 150, trap_R_RegisterShader( "gfx/effects/redLine" ), + FX_SIZE_LINEAR | FX_ALPHA_LINEAR ); + +// VectorSubtract( end, start, dir ); +// len = VectorNormalize( dir ); + +// FX_AddCylinder( start, dir, 5.0f, 5.0f, 0.0f, +// 5.0f, 5.0f, 0.0f, +// len, len, 0.0f, +// 1.0f, 1.0f, 0.0f, +// WHITE, WHITE, 0.0f, +// 400, cgi_R_RegisterShader( "gfx/effects/spiral" ), 0 ); +} + + +/* +--------------------------- +FX_DisruptorAltShot +--------------------------- +*/ +void FX_DisruptorAltShot( vec3_t start, vec3_t end, qboolean fullCharge ) +{ + trap_FX_AddLine( start, end, 0.1f, 10.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + WHITE, WHITE, 0.0f, + 175, trap_R_RegisterShader( "gfx/effects/redLine" ), + FX_SIZE_LINEAR | FX_ALPHA_LINEAR ); + + if ( fullCharge ) + { + vec3_t YELLER={0.8f,0.7f,0.0f}; + + // add some beef + trap_FX_AddLine( start, end, 0.1f, 7.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + YELLER, YELLER, 0.0f, + 150, trap_R_RegisterShader( "gfx/misc/whiteline2" ), + FX_SIZE_LINEAR | FX_ALPHA_LINEAR ); + } +} + + +/* +--------------------------- +FX_DisruptorAltMiss +--------------------------- +*/ +#define FX_ALPHA_WAVE 0x00000008 + +void FX_DisruptorAltMiss( vec3_t origin, vec3_t normal ) +{ + vec3_t pos, c1, c2; + addbezierArgStruct_t b; + + VectorMA( origin, 4.0f, normal, c1 ); + VectorCopy( c1, c2 ); + c1[2] += 4; + c2[2] += 12; + + VectorAdd( origin, normal, pos ); + pos[2] += 28; + + /* + FX_AddBezier( origin, pos, c1, vec3_origin, c2, vec3_origin, 6.0f, 6.0f, 0.0f, 0.0f, 0.2f, 0.5f, + WHITE, WHITE, 0.0f, 4000, trap_R_RegisterShader( "gfx/effects/smokeTrail" ), FX_ALPHA_WAVE ); + */ + + VectorCopy(origin, b.start); + VectorCopy(pos, b.end); + VectorCopy(c1, b.control1); + VectorCopy(vec3_origin, b.control1Vel); + VectorCopy(c2, b.control2); + VectorCopy(vec3_origin, b.control2Vel); + + b.size1 = 6.0f; + b.size2 = 6.0f; + b.sizeParm = 0.0f; + b.alpha1 = 0.0f; + b.alpha2 = 0.2f; + b.alphaParm = 0.5f; + + VectorCopy(WHITE, b.sRGB); + VectorCopy(WHITE, b.eRGB); + + b.rgbParm = 0.0f; + b.killTime = 4000; + b.shader = trap_R_RegisterShader( "gfx/effects/smokeTrail" ); + b.flags = FX_ALPHA_WAVE; + + trap_FX_AddBezier(&b); + + trap_FX_PlayEffectID( cgs.effects.disruptorAltMissEffect, origin, normal ); +} + +/* +--------------------------- +FX_DisruptorAltHit +--------------------------- +*/ + +void FX_DisruptorAltHit( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.disruptorAltHitEffect, origin, normal ); +} + + + +/* +--------------------------- +FX_DisruptorHitWall +--------------------------- +*/ + +void FX_DisruptorHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.disruptorWallImpactEffect, origin, normal ); +} + +/* +--------------------------- +FX_DisruptorHitPlayer +--------------------------- +*/ + +void FX_DisruptorHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.disruptorFleshImpactEffect, origin, normal ); +} diff --git a/code/cgame/fx_disruptor.c b/code/cgame/fx_disruptor.c new file mode 100644 index 0000000..e344e4f --- /dev/null +++ b/code/cgame/fx_disruptor.c @@ -0,0 +1,148 @@ +// Disruptor Weapon + +#include "cg_local.h" +#include "fx_local.h" + +/* +--------------------------- +FX_DisruptorMainShot +--------------------------- +*/ +static vec3_t WHITE={1.0f,1.0f,1.0f}; + +void FX_DisruptorMainShot( vec3_t start, vec3_t end ) +{ +// vec3_t dir; +// float len; + + trap_FX_AddLine( start, end, 0.1f, 6.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + WHITE, WHITE, 0.0f, + 150, trap_R_RegisterShader( "gfx/effects/redLine" ), + FX_SIZE_LINEAR | FX_ALPHA_LINEAR ); + +// VectorSubtract( end, start, dir ); +// len = VectorNormalize( dir ); + +// FX_AddCylinder( start, dir, 5.0f, 5.0f, 0.0f, +// 5.0f, 5.0f, 0.0f, +// len, len, 0.0f, +// 1.0f, 1.0f, 0.0f, +// WHITE, WHITE, 0.0f, +// 400, cgi_R_RegisterShader( "gfx/effects/spiral" ), 0 ); +} + + +/* +--------------------------- +FX_DisruptorAltShot +--------------------------- +*/ +void FX_DisruptorAltShot( vec3_t start, vec3_t end, qboolean fullCharge ) +{ + trap_FX_AddLine( start, end, 0.1f, 10.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + WHITE, WHITE, 0.0f, + 175, trap_R_RegisterShader( "gfx/effects/redLine" ), + FX_SIZE_LINEAR | FX_ALPHA_LINEAR ); + + if ( fullCharge ) + { + vec3_t YELLER={0.8f,0.7f,0.0f}; + + // add some beef + trap_FX_AddLine( start, end, 0.1f, 7.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + YELLER, YELLER, 0.0f, + 150, trap_R_RegisterShader( "gfx/misc/whiteline2" ), + FX_SIZE_LINEAR | FX_ALPHA_LINEAR ); + } +} + + +/* +--------------------------- +FX_DisruptorAltMiss +--------------------------- +*/ +#define FX_ALPHA_WAVE 0x00000008 + +void FX_DisruptorAltMiss( vec3_t origin, vec3_t normal ) +{ + vec3_t pos, c1, c2; + addbezierArgStruct_t b; + + VectorMA( origin, 4.0f, normal, c1 ); + VectorCopy( c1, c2 ); + c1[2] += 4; + c2[2] += 12; + + VectorAdd( origin, normal, pos ); + pos[2] += 28; + + /* + FX_AddBezier( origin, pos, c1, vec3_origin, c2, vec3_origin, 6.0f, 6.0f, 0.0f, 0.0f, 0.2f, 0.5f, + WHITE, WHITE, 0.0f, 4000, trap_R_RegisterShader( "gfx/effects/smokeTrail" ), FX_ALPHA_WAVE ); + */ + + VectorCopy(origin, b.start); + VectorCopy(pos, b.end); + VectorCopy(c1, b.control1); + VectorCopy(vec3_origin, b.control1Vel); + VectorCopy(c2, b.control2); + VectorCopy(vec3_origin, b.control2Vel); + + b.size1 = 6.0f; + b.size2 = 6.0f; + b.sizeParm = 0.0f; + b.alpha1 = 0.0f; + b.alpha2 = 0.2f; + b.alphaParm = 0.5f; + + VectorCopy(WHITE, b.sRGB); + VectorCopy(WHITE, b.eRGB); + + b.rgbParm = 0.0f; + b.killTime = 4000; + b.shader = trap_R_RegisterShader( "gfx/effects/smokeTrail" ); + b.flags = FX_ALPHA_WAVE; + + trap_FX_AddBezier(&b); + + trap_FX_PlayEffectID( cgs.effects.disruptorAltMissEffect, origin, normal ); +} + +/* +--------------------------- +FX_DisruptorAltHit +--------------------------- +*/ + +void FX_DisruptorAltHit( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.disruptorAltHitEffect, origin, normal ); +} + + + +/* +--------------------------- +FX_DisruptorHitWall +--------------------------- +*/ + +void FX_DisruptorHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.disruptorWallImpactEffect, origin, normal ); +} + +/* +--------------------------- +FX_DisruptorHitPlayer +--------------------------- +*/ + +void FX_DisruptorHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.disruptorFleshImpactEffect, origin, normal ); +} diff --git a/code/cgame/fx_flechette (2).c b/code/cgame/fx_flechette (2).c new file mode 100644 index 0000000..3111805 --- /dev/null +++ b/code/cgame/fx_flechette (2).c @@ -0,0 +1,67 @@ +// Golan Arms Flechette Weapon + +#include "cg_local.h" + +/* +------------------------- +FX_FlechetteProjectileThink +------------------------- +*/ + +void FX_FlechetteProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.flechetteShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_FlechetteWeaponHitWall +------------------------- +*/ +void FX_FlechetteWeaponHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.flechetteWallImpactEffect, origin, normal ); +} + +/* +------------------------- +FX_FlechetteWeaponHitPlayer +------------------------- +*/ +void FX_FlechetteWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ +// if ( humanoid ) +// { + trap_FX_PlayEffectID( cgs.effects.flechetteFleshImpactEffect, origin, normal ); +// } +// else +// { +// trap_FX_PlayEffect( "blaster/droid_impact", origin, normal ); +// } +} + + +/* +------------------------- +FX_FlechetteProjectileThink +------------------------- +*/ + +void FX_FlechetteAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.flechetteAltShotEffect, cent->lerpOrigin, forward ); +} diff --git a/code/cgame/fx_flechette.c b/code/cgame/fx_flechette.c new file mode 100644 index 0000000..3111805 --- /dev/null +++ b/code/cgame/fx_flechette.c @@ -0,0 +1,67 @@ +// Golan Arms Flechette Weapon + +#include "cg_local.h" + +/* +------------------------- +FX_FlechetteProjectileThink +------------------------- +*/ + +void FX_FlechetteProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.flechetteShotEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------- +FX_FlechetteWeaponHitWall +------------------------- +*/ +void FX_FlechetteWeaponHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.flechetteWallImpactEffect, origin, normal ); +} + +/* +------------------------- +FX_FlechetteWeaponHitPlayer +------------------------- +*/ +void FX_FlechetteWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ +// if ( humanoid ) +// { + trap_FX_PlayEffectID( cgs.effects.flechetteFleshImpactEffect, origin, normal ); +// } +// else +// { +// trap_FX_PlayEffect( "blaster/droid_impact", origin, normal ); +// } +} + + +/* +------------------------- +FX_FlechetteProjectileThink +------------------------- +*/ + +void FX_FlechetteAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.flechetteAltShotEffect, cent->lerpOrigin, forward ); +} diff --git a/code/cgame/fx_force (2).c b/code/cgame/fx_force (2).c new file mode 100644 index 0000000..dc41927 --- /dev/null +++ b/code/cgame/fx_force (2).c @@ -0,0 +1,16 @@ +// Any dedicated force oriented effects + +#include "cg_local.h" + +/* +------------------------- +FX_ForceDrained +------------------------- +*/ +// This effect is not generic because of possible enhancements +void FX_ForceDrained(vec3_t origin, vec3_t dir) +{ + VectorScale(dir, -1.0, dir); + trap_FX_PlayEffectID(cgs.effects.forceDrained, origin, dir); +} + diff --git a/code/cgame/fx_force.c b/code/cgame/fx_force.c new file mode 100644 index 0000000..dc41927 --- /dev/null +++ b/code/cgame/fx_force.c @@ -0,0 +1,16 @@ +// Any dedicated force oriented effects + +#include "cg_local.h" + +/* +------------------------- +FX_ForceDrained +------------------------- +*/ +// This effect is not generic because of possible enhancements +void FX_ForceDrained(vec3_t origin, vec3_t dir) +{ + VectorScale(dir, -1.0, dir); + trap_FX_PlayEffectID(cgs.effects.forceDrained, origin, dir); +} + diff --git a/code/cgame/fx_heavyrepeater (2).c b/code/cgame/fx_heavyrepeater (2).c new file mode 100644 index 0000000..5d38261 --- /dev/null +++ b/code/cgame/fx_heavyrepeater (2).c @@ -0,0 +1,83 @@ +// Heavy Repeater Weapon + +#include "cg_local.h" + +/* +--------------------------- +FX_RepeaterProjectileThink +--------------------------- +*/ + +void FX_RepeaterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.repeaterProjectileEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------ +FX_RepeaterHitWall +------------------------ +*/ + +void FX_RepeaterHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.repeaterWallImpactEffect, origin, normal ); +} + +/* +------------------------ +FX_RepeaterHitPlayer +------------------------ +*/ + +void FX_RepeaterHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.repeaterFleshImpactEffect, origin, normal ); +} + +/* +------------------------------ +FX_RepeaterAltProjectileThink +----------------------------- +*/ + +void FX_RepeaterAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.repeaterAltProjectileEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------ +FX_RepeaterAltHitWall +------------------------ +*/ + +void FX_RepeaterAltHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.repeaterAltWallImpactEffect, origin, normal ); +} + +/* +------------------------ +FX_RepeaterAltHitPlayer +------------------------ +*/ + +void FX_RepeaterAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.repeaterAltWallImpactEffect, origin, normal ); +} diff --git a/code/cgame/fx_heavyrepeater.c b/code/cgame/fx_heavyrepeater.c new file mode 100644 index 0000000..5d38261 --- /dev/null +++ b/code/cgame/fx_heavyrepeater.c @@ -0,0 +1,83 @@ +// Heavy Repeater Weapon + +#include "cg_local.h" + +/* +--------------------------- +FX_RepeaterProjectileThink +--------------------------- +*/ + +void FX_RepeaterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.repeaterProjectileEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------ +FX_RepeaterHitWall +------------------------ +*/ + +void FX_RepeaterHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.repeaterWallImpactEffect, origin, normal ); +} + +/* +------------------------ +FX_RepeaterHitPlayer +------------------------ +*/ + +void FX_RepeaterHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.repeaterFleshImpactEffect, origin, normal ); +} + +/* +------------------------------ +FX_RepeaterAltProjectileThink +----------------------------- +*/ + +void FX_RepeaterAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.repeaterAltProjectileEffect, cent->lerpOrigin, forward ); +} + +/* +------------------------ +FX_RepeaterAltHitWall +------------------------ +*/ + +void FX_RepeaterAltHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.repeaterAltWallImpactEffect, origin, normal ); +} + +/* +------------------------ +FX_RepeaterAltHitPlayer +------------------------ +*/ + +void FX_RepeaterAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.repeaterAltWallImpactEffect, origin, normal ); +} diff --git a/code/cgame/fx_local (2).h b/code/cgame/fx_local (2).h new file mode 100644 index 0000000..fa7bae9 --- /dev/null +++ b/code/cgame/fx_local (2).h @@ -0,0 +1,63 @@ +// +// fx_*.c +// + +// NOTENOTE This is not the best, DO NOT CHANGE THESE! +#define FX_ALPHA_LINEAR 0x00000001 +#define FX_SIZE_LINEAR 0x00000100 + + + +// Bryar +void FX_BryarProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BryarAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BryarHitWall( vec3_t origin, vec3_t normal ); +void FX_BryarAltHitWall( vec3_t origin, vec3_t normal, int power ); +void FX_BryarHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_BryarAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +// Blaster +void FX_BlasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterAltFireThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterWeaponHitWall( vec3_t origin, vec3_t normal ); +void FX_BlasterWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +// Disruptor +void FX_DisruptorMainShot( vec3_t start, vec3_t end ); +void FX_DisruptorAltShot( vec3_t start, vec3_t end, qboolean fullCharge ); +void FX_DisruptorAltMiss( vec3_t origin, vec3_t normal ); +void FX_DisruptorAltHit( vec3_t origin, vec3_t normal ); +void FX_DisruptorHitWall( vec3_t origin, vec3_t normal ); +void FX_DisruptorHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +// Bowcaster +void FX_BowcasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BowcasterAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BowcasterHitWall( vec3_t origin, vec3_t normal ); +void FX_BowcasterHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +// Heavy Repeater +void FX_RepeaterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_RepeaterAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_RepeaterHitWall( vec3_t origin, vec3_t normal ); +void FX_RepeaterAltHitWall( vec3_t origin, vec3_t normal ); +void FX_RepeaterHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_RepeaterAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +// DEMP2 +void FX_DEMP2_ProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_DEMP2_HitWall( vec3_t origin, vec3_t normal ); +void FX_DEMP2_HitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_DEMP2_AltDetonate( vec3_t org, float size ); + +// Golan Arms Flechette +void FX_FlechetteProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_FlechetteWeaponHitWall( vec3_t origin, vec3_t normal ); +void FX_FlechetteWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_FlechetteAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); + +// Personal Rocket Launcher +void FX_RocketProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_RocketAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_RocketHitWall( vec3_t origin, vec3_t normal ); +void FX_RocketHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); diff --git a/code/cgame/fx_local.h b/code/cgame/fx_local.h new file mode 100644 index 0000000..fa7bae9 --- /dev/null +++ b/code/cgame/fx_local.h @@ -0,0 +1,63 @@ +// +// fx_*.c +// + +// NOTENOTE This is not the best, DO NOT CHANGE THESE! +#define FX_ALPHA_LINEAR 0x00000001 +#define FX_SIZE_LINEAR 0x00000100 + + + +// Bryar +void FX_BryarProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BryarAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BryarHitWall( vec3_t origin, vec3_t normal ); +void FX_BryarAltHitWall( vec3_t origin, vec3_t normal, int power ); +void FX_BryarHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_BryarAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +// Blaster +void FX_BlasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterAltFireThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BlasterWeaponHitWall( vec3_t origin, vec3_t normal ); +void FX_BlasterWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +// Disruptor +void FX_DisruptorMainShot( vec3_t start, vec3_t end ); +void FX_DisruptorAltShot( vec3_t start, vec3_t end, qboolean fullCharge ); +void FX_DisruptorAltMiss( vec3_t origin, vec3_t normal ); +void FX_DisruptorAltHit( vec3_t origin, vec3_t normal ); +void FX_DisruptorHitWall( vec3_t origin, vec3_t normal ); +void FX_DisruptorHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +// Bowcaster +void FX_BowcasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BowcasterAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_BowcasterHitWall( vec3_t origin, vec3_t normal ); +void FX_BowcasterHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +// Heavy Repeater +void FX_RepeaterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_RepeaterAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_RepeaterHitWall( vec3_t origin, vec3_t normal ); +void FX_RepeaterAltHitWall( vec3_t origin, vec3_t normal ); +void FX_RepeaterHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_RepeaterAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); + +// DEMP2 +void FX_DEMP2_ProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_DEMP2_HitWall( vec3_t origin, vec3_t normal ); +void FX_DEMP2_HitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_DEMP2_AltDetonate( vec3_t org, float size ); + +// Golan Arms Flechette +void FX_FlechetteProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_FlechetteWeaponHitWall( vec3_t origin, vec3_t normal ); +void FX_FlechetteWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); +void FX_FlechetteAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); + +// Personal Rocket Launcher +void FX_RocketProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_RocketAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ); +void FX_RocketHitWall( vec3_t origin, vec3_t normal ); +void FX_RocketHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ); diff --git a/code/cgame/fx_rocketlauncher (2).c b/code/cgame/fx_rocketlauncher (2).c new file mode 100644 index 0000000..9d6164e --- /dev/null +++ b/code/cgame/fx_rocketlauncher (2).c @@ -0,0 +1,61 @@ +// Rocket Launcher Weapon + +#include "cg_local.h" + +/* +--------------------------- +FX_RocketProjectileThink +--------------------------- +*/ + +void FX_RocketProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.rocketShotEffect, cent->lerpOrigin, forward ); +} + +/* +--------------------------- +FX_RocketHitWall +--------------------------- +*/ + +void FX_RocketHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.rocketExplosionEffect, origin, normal ); +} + +/* +--------------------------- +FX_RocketHitPlayer +--------------------------- +*/ + +void FX_RocketHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.rocketExplosionEffect, origin, normal ); +} + +/* +--------------------------- +FX_RocketAltProjectileThink +--------------------------- +*/ + +void FX_RocketAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.rocketShotEffect, cent->lerpOrigin, forward ); +} diff --git a/code/cgame/fx_rocketlauncher.c b/code/cgame/fx_rocketlauncher.c new file mode 100644 index 0000000..9d6164e --- /dev/null +++ b/code/cgame/fx_rocketlauncher.c @@ -0,0 +1,61 @@ +// Rocket Launcher Weapon + +#include "cg_local.h" + +/* +--------------------------- +FX_RocketProjectileThink +--------------------------- +*/ + +void FX_RocketProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.rocketShotEffect, cent->lerpOrigin, forward ); +} + +/* +--------------------------- +FX_RocketHitWall +--------------------------- +*/ + +void FX_RocketHitWall( vec3_t origin, vec3_t normal ) +{ + trap_FX_PlayEffectID( cgs.effects.rocketExplosionEffect, origin, normal ); +} + +/* +--------------------------- +FX_RocketHitPlayer +--------------------------- +*/ + +void FX_RocketHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +{ + trap_FX_PlayEffectID( cgs.effects.rocketExplosionEffect, origin, normal ); +} + +/* +--------------------------- +FX_RocketAltProjectileThink +--------------------------- +*/ + +void FX_RocketAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +{ + vec3_t forward; + + if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) + { + forward[2] = 1.0f; + } + + trap_FX_PlayEffectID( cgs.effects.rocketShotEffect, cent->lerpOrigin, forward ); +} diff --git a/code/cgame/tr_types (2).h b/code/cgame/tr_types (2).h new file mode 100644 index 0000000..fd3bfec --- /dev/null +++ b/code/cgame/tr_types (2).h @@ -0,0 +1,318 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +#ifndef __TR_TYPES_H +#define __TR_TYPES_H + + +#define MAX_DLIGHTS 32 // can't be increased, because bit flags are used on surfaces +#define MAX_ENTITIES 1023 // can't be increased without changing drawsurf bit packing +#define MAX_MINI_ENTITIES 1024 + +// renderfx flags +#define RF_MINLIGHT 0x00001 // allways have some light (viewmodel, some items) +#define RF_THIRD_PERSON 0x00002 // don't draw through eyes, only mirrors (player bodies, chat sprites) +#define RF_FIRST_PERSON 0x00004 // only draw through eyes (view weapon, damage blood blob) +#define RF_DEPTHHACK 0x00008 // for view weapon Z crunching +#define RF_NODEPTH 0x00010 // No depth at all (seeing through walls) + +#define RF_VOLUMETRIC 0x00020 // fake volumetric shading + +#define RF_NOSHADOW 0x00040 // don't add stencil shadows + +#define RF_LIGHTING_ORIGIN 0x00080 // use refEntity->lightingOrigin instead of refEntity->origin + // for lighting. This allows entities to sink into the floor + // with their origin going solid, and allows all parts of a + // player to get the same lighting +#define RF_SHADOW_PLANE 0x00100 // use refEntity->shadowPlane +#define RF_WRAP_FRAMES 0x00200 // mod the model frames by the maxframes to allow continuous + // animation without needing to know the frame count + +#define RF_FORCE_ENT_ALPHA 0x00400 // override shader alpha settings +#define RF_RGB_TINT 0x00800 // override shader rgb settings + +#define RF_FORKED 0x04000 // override lightning to have forks +#define RF_TAPERED 0x08000 // lightning tapers +#define RF_GROW 0x10000 // lightning grows from start to end during its life + +#define RF_DISINTEGRATE1 0x20000 // does a procedural hole-ripping thing. +#define RF_DISINTEGRATE2 0x40000 // does a procedural hole-ripping thing with scaling at the ripping point + + + +// refdef flags +#define RDF_NOWORLDMODEL 1 // used for player configuration screen +#define RDF_HYPERSPACE 4 // teleportation effect + +typedef byte color4ub_t[4]; + +typedef struct { + vec3_t xyz; + float st[2]; + byte modulate[4]; +} polyVert_t; + +typedef struct poly_s { + qhandle_t hShader; + int numVerts; + polyVert_t *verts; +} poly_t; + +typedef enum { + RT_MODEL, + RT_POLY, + RT_SPRITE, + RT_ORIENTED_QUAD, + RT_BEAM, + RT_SABER_GLOW, + RT_ELECTRICITY, + RT_PORTALSURFACE, // doesn't draw anything, just info for portals + RT_LINE, + RT_ORIENTEDLINE, + RT_CYLINDER, + RT_ENT_CHAIN, + + RT_MAX_REF_ENTITY_TYPE +} refEntityType_t; + +typedef struct miniRefEntity_s +{ + refEntityType_t reType; + int renderfx; + + qhandle_t hModel; // opaque type outside refresh + + // most recent data + vec3_t axis[3]; // rotation vectors + qboolean nonNormalizedAxes; // axis are not normalized, i.e. they have scale + vec3_t origin; // also used as MODEL_BEAM's "from" + + // previous data for frame interpolation + vec3_t oldorigin; // also used as MODEL_BEAM's "to" + + // texturing + qhandle_t customShader; // use one image for the entire thing + + // misc + byte shaderRGBA[4]; // colors used by rgbgen entity shaders + vec2_t shaderTexCoord; // texture coordinates used by tcMod entity modifiers + + // extra sprite information + float radius; + float rotation; // size 2 for RT_CYLINDER or number of verts in RT_ELECTRICITY + + // misc + float shaderTime; // subtracted from refdef time to control effect start times + int frame; // also used as MODEL_BEAM's diameter + +} miniRefEntity_t; + +#pragma warning (disable : 4201 ) +typedef struct { + // this stucture must remain identical as the miniRefEntity_t + // + // + refEntityType_t reType; + int renderfx; + + qhandle_t hModel; // opaque type outside refresh + + // most recent data + vec3_t axis[3]; // rotation vectors + qboolean nonNormalizedAxes; // axis are not normalized, i.e. they have scale + vec3_t origin; // also used as MODEL_BEAM's "from" + + // previous data for frame interpolation + vec3_t oldorigin; // also used as MODEL_BEAM's "to" + + // texturing + qhandle_t customShader; // use one image for the entire thing + + // misc + byte shaderRGBA[4]; // colors used by rgbgen entity shaders + vec2_t shaderTexCoord; // texture coordinates used by tcMod entity modifiers + + // extra sprite information + float radius; + float rotation; + + // misc + float shaderTime; // subtracted from refdef time to control effect start times + int frame; // also used as MODEL_BEAM's diameter + // + // + // end miniRefEntity_t + + // + // + // specific full refEntity_t data + // + // + + // most recent data + vec3_t lightingOrigin; // so multi-part models can be lit identically (RF_LIGHTING_ORIGIN) + float shadowPlane; // projection shadows go here, stencils go slightly lower + + // previous data for frame interpolation + int oldframe; + float backlerp; // 0.0 = current, 1.0 = old + + // texturing + int skinNum; // inline skin index + qhandle_t customSkin; // NULL for default skin + + // texturing + union + { +// int skinNum; // inline skin index +// ivec3_t terxelCoords; // coords of patch for RT_TERXELS + struct + { + int miniStart; + int miniCount; + } uMini; + } uRefEnt; + + // extra sprite information + union { + struct + { + float rotation; + float radius; + byte vertRGBA[4][4]; + } sprite; + struct + { + float width; + float width2; + float stscale; + } line; + struct // that whole put-the-opening-brace-on-the-same-line-as-the-beginning-of-the-definition coding style is fecal + { + float width; + vec3_t control1; + vec3_t control2; + } bezier; + struct + { + float width; + float width2; + float stscale; + float height; + float bias; + qboolean wrap; + } cylinder; + struct + { + float width; + float deviation; + float stscale; + qboolean wrap; + qboolean taper; + } electricity; + } data; + + float endTime; + float saberLength; + +/* +Ghoul2 Insert Start +*/ + vec3_t angles; // rotation angles - used for Ghoul2 + + vec3_t modelScale; // axis scale for models +// CGhoul2Info_v *ghoul2; // has to be at the end of the ref-ent in order for it to be created properly + void *ghoul2; // has to be at the end of the ref-ent in order for it to be created properly +/* +Ghoul2 Insert End +*/ +} refEntity_t; + + +#define MAX_RENDER_STRINGS 8 +#define MAX_RENDER_STRING_LENGTH 32 + +typedef struct { + int x, y, width, height; + float fov_x, fov_y; + vec3_t vieworg; + vec3_t viewaxis[3]; // transformation matrix + + // time in milliseconds for shader effects and other time dependent rendering issues + int time; + + int rdflags; // RDF_NOWORLDMODEL, etc + + // 1 bits will prevent the associated area from rendering at all + byte areamask[MAX_MAP_AREA_BYTES]; + + // text messages for deform text shaders + char text[MAX_RENDER_STRINGS][MAX_RENDER_STRING_LENGTH]; +} refdef_t; + + +typedef enum { + STEREO_CENTER, + STEREO_LEFT, + STEREO_RIGHT +} stereoFrame_t; + + +/* +** glconfig_t +** +** Contains variables specific to the OpenGL configuration +** being run right now. These are constant once the OpenGL +** subsystem is initialized. +*/ +typedef enum { + TC_NONE, + TC_S3TC, + TC_S3TC_DXT +} textureCompression_t; + +typedef struct { + char renderer_string[MAX_STRING_CHARS]; + char vendor_string[MAX_STRING_CHARS]; + char version_string[MAX_STRING_CHARS]; + char extensions_string[BIG_INFO_STRING]; + + int maxTextureSize; // queried from GL + int maxActiveTextures; // multitexture ability + + int colorBits, depthBits, stencilBits; + + qboolean deviceSupportsGamma; + textureCompression_t textureCompression; + qboolean textureEnvAddAvailable; + qboolean textureFilterAnisotropicAvailable; + qboolean clampToEdgeAvailable; + + int vidWidth, vidHeight; + // aspect is the screen's physical width / height, which may be different + // than scrWidth / scrHeight if the pixels are non-square + // normal screens should be 4/3, but wide aspect monitors may be 16/9 + float windowAspect; + + int displayFrequency; + + // synonymous with "does rendering consume the entire screen?", therefore + // a Voodoo or Voodoo2 will have this set to TRUE, as will a Win32 ICD that + // used CDS. + qboolean isFullscreen; + qboolean stereoEnabled; + qboolean smpActive; // dual processor +} glconfig_t; + + +#if !defined _WIN32 + +#define OPENGL_DRIVER_NAME "libGL.so" + +#else + +#define OPENGL_DRIVER_NAME "opengl32" + +#endif // !defined _WIN32 + + +#endif // __TR_TYPES_H diff --git a/code/cgame/tr_types.h b/code/cgame/tr_types.h new file mode 100644 index 0000000..fd3bfec --- /dev/null +++ b/code/cgame/tr_types.h @@ -0,0 +1,318 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +#ifndef __TR_TYPES_H +#define __TR_TYPES_H + + +#define MAX_DLIGHTS 32 // can't be increased, because bit flags are used on surfaces +#define MAX_ENTITIES 1023 // can't be increased without changing drawsurf bit packing +#define MAX_MINI_ENTITIES 1024 + +// renderfx flags +#define RF_MINLIGHT 0x00001 // allways have some light (viewmodel, some items) +#define RF_THIRD_PERSON 0x00002 // don't draw through eyes, only mirrors (player bodies, chat sprites) +#define RF_FIRST_PERSON 0x00004 // only draw through eyes (view weapon, damage blood blob) +#define RF_DEPTHHACK 0x00008 // for view weapon Z crunching +#define RF_NODEPTH 0x00010 // No depth at all (seeing through walls) + +#define RF_VOLUMETRIC 0x00020 // fake volumetric shading + +#define RF_NOSHADOW 0x00040 // don't add stencil shadows + +#define RF_LIGHTING_ORIGIN 0x00080 // use refEntity->lightingOrigin instead of refEntity->origin + // for lighting. This allows entities to sink into the floor + // with their origin going solid, and allows all parts of a + // player to get the same lighting +#define RF_SHADOW_PLANE 0x00100 // use refEntity->shadowPlane +#define RF_WRAP_FRAMES 0x00200 // mod the model frames by the maxframes to allow continuous + // animation without needing to know the frame count + +#define RF_FORCE_ENT_ALPHA 0x00400 // override shader alpha settings +#define RF_RGB_TINT 0x00800 // override shader rgb settings + +#define RF_FORKED 0x04000 // override lightning to have forks +#define RF_TAPERED 0x08000 // lightning tapers +#define RF_GROW 0x10000 // lightning grows from start to end during its life + +#define RF_DISINTEGRATE1 0x20000 // does a procedural hole-ripping thing. +#define RF_DISINTEGRATE2 0x40000 // does a procedural hole-ripping thing with scaling at the ripping point + + + +// refdef flags +#define RDF_NOWORLDMODEL 1 // used for player configuration screen +#define RDF_HYPERSPACE 4 // teleportation effect + +typedef byte color4ub_t[4]; + +typedef struct { + vec3_t xyz; + float st[2]; + byte modulate[4]; +} polyVert_t; + +typedef struct poly_s { + qhandle_t hShader; + int numVerts; + polyVert_t *verts; +} poly_t; + +typedef enum { + RT_MODEL, + RT_POLY, + RT_SPRITE, + RT_ORIENTED_QUAD, + RT_BEAM, + RT_SABER_GLOW, + RT_ELECTRICITY, + RT_PORTALSURFACE, // doesn't draw anything, just info for portals + RT_LINE, + RT_ORIENTEDLINE, + RT_CYLINDER, + RT_ENT_CHAIN, + + RT_MAX_REF_ENTITY_TYPE +} refEntityType_t; + +typedef struct miniRefEntity_s +{ + refEntityType_t reType; + int renderfx; + + qhandle_t hModel; // opaque type outside refresh + + // most recent data + vec3_t axis[3]; // rotation vectors + qboolean nonNormalizedAxes; // axis are not normalized, i.e. they have scale + vec3_t origin; // also used as MODEL_BEAM's "from" + + // previous data for frame interpolation + vec3_t oldorigin; // also used as MODEL_BEAM's "to" + + // texturing + qhandle_t customShader; // use one image for the entire thing + + // misc + byte shaderRGBA[4]; // colors used by rgbgen entity shaders + vec2_t shaderTexCoord; // texture coordinates used by tcMod entity modifiers + + // extra sprite information + float radius; + float rotation; // size 2 for RT_CYLINDER or number of verts in RT_ELECTRICITY + + // misc + float shaderTime; // subtracted from refdef time to control effect start times + int frame; // also used as MODEL_BEAM's diameter + +} miniRefEntity_t; + +#pragma warning (disable : 4201 ) +typedef struct { + // this stucture must remain identical as the miniRefEntity_t + // + // + refEntityType_t reType; + int renderfx; + + qhandle_t hModel; // opaque type outside refresh + + // most recent data + vec3_t axis[3]; // rotation vectors + qboolean nonNormalizedAxes; // axis are not normalized, i.e. they have scale + vec3_t origin; // also used as MODEL_BEAM's "from" + + // previous data for frame interpolation + vec3_t oldorigin; // also used as MODEL_BEAM's "to" + + // texturing + qhandle_t customShader; // use one image for the entire thing + + // misc + byte shaderRGBA[4]; // colors used by rgbgen entity shaders + vec2_t shaderTexCoord; // texture coordinates used by tcMod entity modifiers + + // extra sprite information + float radius; + float rotation; + + // misc + float shaderTime; // subtracted from refdef time to control effect start times + int frame; // also used as MODEL_BEAM's diameter + // + // + // end miniRefEntity_t + + // + // + // specific full refEntity_t data + // + // + + // most recent data + vec3_t lightingOrigin; // so multi-part models can be lit identically (RF_LIGHTING_ORIGIN) + float shadowPlane; // projection shadows go here, stencils go slightly lower + + // previous data for frame interpolation + int oldframe; + float backlerp; // 0.0 = current, 1.0 = old + + // texturing + int skinNum; // inline skin index + qhandle_t customSkin; // NULL for default skin + + // texturing + union + { +// int skinNum; // inline skin index +// ivec3_t terxelCoords; // coords of patch for RT_TERXELS + struct + { + int miniStart; + int miniCount; + } uMini; + } uRefEnt; + + // extra sprite information + union { + struct + { + float rotation; + float radius; + byte vertRGBA[4][4]; + } sprite; + struct + { + float width; + float width2; + float stscale; + } line; + struct // that whole put-the-opening-brace-on-the-same-line-as-the-beginning-of-the-definition coding style is fecal + { + float width; + vec3_t control1; + vec3_t control2; + } bezier; + struct + { + float width; + float width2; + float stscale; + float height; + float bias; + qboolean wrap; + } cylinder; + struct + { + float width; + float deviation; + float stscale; + qboolean wrap; + qboolean taper; + } electricity; + } data; + + float endTime; + float saberLength; + +/* +Ghoul2 Insert Start +*/ + vec3_t angles; // rotation angles - used for Ghoul2 + + vec3_t modelScale; // axis scale for models +// CGhoul2Info_v *ghoul2; // has to be at the end of the ref-ent in order for it to be created properly + void *ghoul2; // has to be at the end of the ref-ent in order for it to be created properly +/* +Ghoul2 Insert End +*/ +} refEntity_t; + + +#define MAX_RENDER_STRINGS 8 +#define MAX_RENDER_STRING_LENGTH 32 + +typedef struct { + int x, y, width, height; + float fov_x, fov_y; + vec3_t vieworg; + vec3_t viewaxis[3]; // transformation matrix + + // time in milliseconds for shader effects and other time dependent rendering issues + int time; + + int rdflags; // RDF_NOWORLDMODEL, etc + + // 1 bits will prevent the associated area from rendering at all + byte areamask[MAX_MAP_AREA_BYTES]; + + // text messages for deform text shaders + char text[MAX_RENDER_STRINGS][MAX_RENDER_STRING_LENGTH]; +} refdef_t; + + +typedef enum { + STEREO_CENTER, + STEREO_LEFT, + STEREO_RIGHT +} stereoFrame_t; + + +/* +** glconfig_t +** +** Contains variables specific to the OpenGL configuration +** being run right now. These are constant once the OpenGL +** subsystem is initialized. +*/ +typedef enum { + TC_NONE, + TC_S3TC, + TC_S3TC_DXT +} textureCompression_t; + +typedef struct { + char renderer_string[MAX_STRING_CHARS]; + char vendor_string[MAX_STRING_CHARS]; + char version_string[MAX_STRING_CHARS]; + char extensions_string[BIG_INFO_STRING]; + + int maxTextureSize; // queried from GL + int maxActiveTextures; // multitexture ability + + int colorBits, depthBits, stencilBits; + + qboolean deviceSupportsGamma; + textureCompression_t textureCompression; + qboolean textureEnvAddAvailable; + qboolean textureFilterAnisotropicAvailable; + qboolean clampToEdgeAvailable; + + int vidWidth, vidHeight; + // aspect is the screen's physical width / height, which may be different + // than scrWidth / scrHeight if the pixels are non-square + // normal screens should be 4/3, but wide aspect monitors may be 16/9 + float windowAspect; + + int displayFrequency; + + // synonymous with "does rendering consume the entire screen?", therefore + // a Voodoo or Voodoo2 will have this set to TRUE, as will a Win32 ICD that + // used CDS. + qboolean isFullscreen; + qboolean stereoEnabled; + qboolean smpActive; // dual processor +} glconfig_t; + + +#if !defined _WIN32 + +#define OPENGL_DRIVER_NAME "libGL.so" + +#else + +#define OPENGL_DRIVER_NAME "opengl32" + +#endif // !defined _WIN32 + + +#endif // __TR_TYPES_H diff --git a/code/cgame/vm/bg_lib.asm b/code/cgame/vm/bg_lib.asm new file mode 100644 index 0000000..12fd4f0 --- /dev/null +++ b/code/cgame/vm/bg_lib.asm @@ -0,0 +1,5881 @@ +code +proc swapfunc 24 0 +file "../../game/bg_lib.c" +line 81 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// Copyright (C) 1999-2000 Id Software, Inc. +;4:// +;5:// bg_lib,c -- standard C library replacement routines used by code +;6:// compiled for the virtual machine +;7: +;8:#include "q_shared.h" +;9: +;10:/*- +;11: * Copyright (c) 1992, 1993 +;12: * The Regents of the University of California. All rights reserved. +;13: * +;14: * Redistribution and use in source and binary forms, with or without +;15: * modification, are permitted provided that the following conditions +;16: * are met: +;17: * 1. Redistributions of source code must retain the above copyright +;18: * notice, this list of conditions and the following disclaimer. +;19: * 2. Redistributions in binary form must reproduce the above copyright +;20: * notice, this list of conditions and the following disclaimer in the +;21: * documentation and/or other materials provided with the distribution. +;22: * 3. All advertising materials mentioning features or use of this software +;23: * must display the following acknowledgement: +;24: * This product includes software developed by the University of +;25: * California, Berkeley and its contributors. +;26: * 4. Neither the name of the University nor the names of its contributors +;27: * may be used to endorse or promote products derived from this software +;28: * without specific prior written permission. +;29: * +;30: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +;31: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +;32: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +;33: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +;34: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +;35: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +;36: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +;37: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +;38: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +;39: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +;40: * SUCH DAMAGE. +;41: */ +;42: +;43:#if defined(LIBC_SCCS) && !defined(lint) +;44:#if 0 +;45:static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93"; +;46:#endif +;47:static const char rcsid[] = +;48: "$Id: bg_lib.c,v 1.23 2000/02/04 06:46:50 zoid Exp $"; +;49:#endif /* LIBC_SCCS and not lint */ +;50: +;51:// bk001127 - needed for DLL's +;52:#if !defined( Q3_VM ) +;53:typedef int cmp_t(const void *, const void *); +;54:#endif +;55: +;56:static char* med3(char *, char *, char *, cmp_t *); +;57:static void swapfunc(char *, char *, int, int); +;58: +;59:#ifndef min +;60:#define min(a, b) (a) < (b) ? a : b +;61:#endif +;62: +;63:/* +;64: * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". +;65: */ +;66:#define swapcode(TYPE, parmi, parmj, n) { \ +;67: long i = (n) / sizeof (TYPE); \ +;68: register TYPE *pi = (TYPE *) (parmi); \ +;69: register TYPE *pj = (TYPE *) (parmj); \ +;70: do { \ +;71: register TYPE t = *pi; \ +;72: *pi++ = *pj; \ +;73: *pj++ = t; \ +;74: } while (--i > 0); \ +;75:} +;76: +;77:#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ +;78: es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; +;79: +;80:static void swapfunc( char* a, char* b, int n, int swaptype) +;81:{ +line 82 +;82: if(swaptype <= 1) +ADDRFP4 12 +INDIRI4 +CNSTI4 1 +GTI4 $37 +line 83 +;83: swapcode(long, a, b, n) +ADDRLP4 8 +ADDRFP4 8 +INDIRI4 +CVIU4 4 +CNSTI4 2 +RSHU4 +CVUI4 4 +ASGNI4 +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +LABELV $39 +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 20 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +LABELV $40 +ADDRLP4 12 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +GTI4 $39 +ADDRGP4 $38 +JUMPV +LABELV $37 +line 85 +;84: else +;85: swapcode(char, a, b, n) +ADDRLP4 8 +ADDRFP4 8 +INDIRI4 +CVIU4 4 +CVUI4 4 +ASGNI4 +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +LABELV $42 +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +INDIRI1 +ASGNI1 +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI1 +ASGNI1 +ADDRLP4 20 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 20 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 12 +INDIRI1 +ASGNI1 +LABELV $43 +ADDRLP4 12 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +GTI4 $42 +LABELV $38 +line 86 +;86:} +LABELV $36 +endproc swapfunc 24 0 +proc med3 40 8 +line 99 +;87: +;88:#define swap(a, b) \ +;89: if (swaptype == 0) { \ +;90: long t = *(long *)(a); \ +;91: *(long *)(a) = *(long *)(b); \ +;92: *(long *)(b) = t; \ +;93: } else \ +;94: swapfunc(a, b, es, swaptype) +;95: +;96:#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) +;97: +;98:static char *med3(char* a, char* b, char* c, cmp_t* cmp) +;99:{ +line 100 +;100: return cmp(a, b) < 0 ? +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRFP4 12 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +GEI4 $51 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 24 +ADDRFP4 12 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +GEI4 $53 +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRGP4 $54 +JUMPV +LABELV $53 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 28 +ADDRFP4 12 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +GEI4 $55 +ADDRLP4 8 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRGP4 $56 +JUMPV +LABELV $55 +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +LABELV $56 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +ASGNP4 +LABELV $54 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRGP4 $52 +JUMPV +LABELV $51 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRFP4 12 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +LEI4 $57 +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRGP4 $58 +JUMPV +LABELV $57 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRFP4 12 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +GEI4 $59 +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $60 +JUMPV +LABELV $59 +ADDRLP4 16 +ADDRFP4 8 +INDIRP4 +ASGNP4 +LABELV $60 +ADDRLP4 12 +ADDRLP4 16 +INDIRP4 +ASGNP4 +LABELV $58 +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +ASGNP4 +LABELV $52 +ADDRLP4 0 +INDIRP4 +RETP4 +LABELV $45 +endproc med3 40 8 +export qsort +proc qsort 104 16 +line 106 +;101: (cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a )) +;102: :(cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c )); +;103:} +;104: +;105:void qsort( void* a, size_t n, size_t es, cmp_t* cmp) +;106:{ +LABELV $62 +line 110 +;107: char *pa, *pb, *pc, *pd, *pl, *pm, *pn; +;108: int d, r, swaptype, swap_cnt; +;109: +;110:loop: SWAPINIT(a, es); +ADDRLP4 52 +CNSTU4 3 +ASGNU4 +ADDRLP4 56 +CNSTU4 0 +ASGNU4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CVUI4 4 +CVIU4 4 +ADDRLP4 52 +INDIRU4 +BANDU4 +ADDRLP4 56 +INDIRU4 +NEU4 $67 +ADDRFP4 8 +INDIRI4 +CVIU4 4 +ADDRLP4 52 +INDIRU4 +BANDU4 +ADDRLP4 56 +INDIRU4 +EQU4 $65 +LABELV $67 +ADDRLP4 44 +CNSTI4 2 +ASGNI4 +ADDRGP4 $66 +JUMPV +LABELV $65 +ADDRFP4 8 +INDIRI4 +CVIU4 4 +CNSTU4 4 +NEU4 $68 +ADDRLP4 48 +CNSTI4 0 +ASGNI4 +ADDRGP4 $69 +JUMPV +LABELV $68 +ADDRLP4 48 +CNSTI4 1 +ASGNI4 +LABELV $69 +ADDRLP4 44 +ADDRLP4 48 +INDIRI4 +ASGNI4 +LABELV $66 +ADDRLP4 16 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 111 +;111: swap_cnt = 0; +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +line 112 +;112: if (n < 7) { +ADDRFP4 4 +INDIRI4 +CNSTI4 7 +GEI4 $70 +line 113 +;113: for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) +ADDRLP4 32 +ADDRFP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ASGNP4 +ADDRGP4 $75 +JUMPV +LABELV $72 +line 114 +;114: for (pl = pm; pl > (char *)a && cmp(pl - es, pl) > 0; +ADDRLP4 0 +ADDRLP4 32 +INDIRP4 +ASGNP4 +ADDRGP4 $79 +JUMPV +LABELV $76 +line 116 +;115: pl -= es) +;116: swap(pl, pl - es); +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $80 +ADDRLP4 60 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ADDRFP4 8 +INDIRI4 +SUBP4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRFP4 8 +INDIRI4 +SUBP4 +ADDRLP4 60 +INDIRI4 +ASGNI4 +ADDRGP4 $81 +JUMPV +LABELV $80 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 64 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 64 +INDIRI4 +SUBP4 +ARGP4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 swapfunc +CALLV +pop +LABELV $81 +LABELV $77 +line 115 +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +ADDRFP4 8 +INDIRI4 +SUBP4 +ASGNP4 +LABELV $79 +line 114 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +LEU4 $82 +ADDRLP4 0 +INDIRP4 +ADDRFP4 8 +INDIRI4 +SUBP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 72 +ADDRFP4 12 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +GTI4 $76 +LABELV $82 +LABELV $73 +line 113 +ADDRLP4 32 +ADDRFP4 8 +INDIRI4 +ADDRLP4 32 +INDIRP4 +ADDP4 +ASGNP4 +LABELV $75 +ADDRLP4 32 +INDIRP4 +CVPU4 4 +ADDRFP4 4 +INDIRI4 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +CVPU4 4 +LTU4 $72 +line 117 +;117: return; +ADDRGP4 $61 +JUMPV +LABELV $70 +line 119 +;118: } +;119: pm = (char *)a + (n / 2) * es; +ADDRLP4 32 +ADDRFP4 4 +INDIRI4 +CNSTI4 2 +DIVI4 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ASGNP4 +line 120 +;120: if (n > 7) { +ADDRFP4 4 +INDIRI4 +CNSTI4 7 +LEI4 $83 +line 121 +;121: pl = a; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 122 +;122: pn = (char *)a + (n - 1) * es; +ADDRLP4 36 +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +SUBI4 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ASGNP4 +line 123 +;123: if (n > 40) { +ADDRFP4 4 +INDIRI4 +CNSTI4 40 +LEI4 $85 +line 124 +;124: d = (n / 8) * es; +ADDRLP4 40 +ADDRFP4 4 +INDIRI4 +CNSTI4 8 +DIVI4 +ADDRFP4 8 +INDIRI4 +MULI4 +ASGNI4 +line 125 +;125: pl = med3(pl, pl + d, pl + 2 * d, cmp); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 64 +ADDRLP4 40 +INDIRI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +ARGP4 +ADDRLP4 64 +INDIRI4 +CNSTI4 1 +LSHI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRLP4 68 +ADDRGP4 med3 +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 68 +INDIRP4 +ASGNP4 +line 126 +;126: pm = med3(pm - d, pm, pm + d, cmp); +ADDRLP4 76 +ADDRLP4 40 +INDIRI4 +ASGNI4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 76 +INDIRI4 +SUBP4 +ARGP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRLP4 76 +INDIRI4 +ADDRLP4 32 +INDIRP4 +ADDP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRLP4 80 +ADDRGP4 med3 +CALLP4 +ASGNP4 +ADDRLP4 32 +ADDRLP4 80 +INDIRP4 +ASGNP4 +line 127 +;127: pn = med3(pn - 2 * d, pn - d, pn, cmp); +ADDRLP4 88 +ADDRLP4 40 +INDIRI4 +ASGNI4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 88 +INDIRI4 +CNSTI4 1 +LSHI4 +SUBP4 +ARGP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 88 +INDIRI4 +SUBP4 +ARGP4 +ADDRLP4 36 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRLP4 92 +ADDRGP4 med3 +CALLP4 +ASGNP4 +ADDRLP4 36 +ADDRLP4 92 +INDIRP4 +ASGNP4 +line 128 +;128: } +LABELV $85 +line 129 +;129: pm = med3(pl, pm, pn, cmp); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRLP4 36 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRLP4 60 +ADDRGP4 med3 +CALLP4 +ASGNP4 +ADDRLP4 32 +ADDRLP4 60 +INDIRP4 +ASGNP4 +line 130 +;130: } +LABELV $83 +line 131 +;131: swap(a, pm); +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $87 +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ASGNI4 +ADDRGP4 $88 +JUMPV +LABELV $87 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 swapfunc +CALLV +pop +LABELV $88 +line 132 +;132: pa = pb = (char *)a + es; +ADDRLP4 60 +ADDRFP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 60 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 60 +INDIRP4 +ASGNP4 +line 134 +;133: +;134: pc = pd = (char *)a + (n - 1) * es; +ADDRLP4 64 +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +SUBI4 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ASGNP4 +ADDRLP4 24 +ADDRLP4 64 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 64 +INDIRP4 +ASGNP4 +line 135 +;135: for (;;) { +ADDRGP4 $94 +JUMPV +LABELV $93 +line 136 +;136: while (pb <= pc && (r = cmp(pb, a)) <= 0) { +line 137 +;137: if (r == 0) { +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $96 +line 138 +;138: swap_cnt = 1; +ADDRLP4 28 +CNSTI4 1 +ASGNI4 +line 139 +;139: swap(pa, pb); +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $98 +ADDRLP4 68 +ADDRLP4 20 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ASGNI4 +ADDRGP4 $99 +JUMPV +LABELV $98 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 swapfunc +CALLV +pop +LABELV $99 +line 140 +;140: pa += es; +ADDRLP4 20 +ADDRFP4 8 +INDIRI4 +ADDRLP4 20 +INDIRP4 +ADDP4 +ASGNP4 +line 141 +;141: } +LABELV $96 +line 142 +;142: pb += es; +ADDRLP4 4 +ADDRFP4 8 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +ASGNP4 +line 143 +;143: } +LABELV $94 +line 136 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +GTU4 $100 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 72 +ADDRFP4 12 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 72 +INDIRI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +LEI4 $93 +LABELV $100 +ADDRGP4 $102 +JUMPV +LABELV $101 +line 144 +;144: while (pb <= pc && (r = cmp(pc, a)) >= 0) { +line 145 +;145: if (r == 0) { +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $104 +line 146 +;146: swap_cnt = 1; +ADDRLP4 28 +CNSTI4 1 +ASGNI4 +line 147 +;147: swap(pc, pd); +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $106 +ADDRLP4 76 +ADDRLP4 8 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 76 +INDIRI4 +ASGNI4 +ADDRGP4 $107 +JUMPV +LABELV $106 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 swapfunc +CALLV +pop +LABELV $107 +line 148 +;148: pd -= es; +ADDRLP4 24 +ADDRLP4 24 +INDIRP4 +ADDRFP4 8 +INDIRI4 +SUBP4 +ASGNP4 +line 149 +;149: } +LABELV $104 +line 150 +;150: pc -= es; +ADDRLP4 8 +ADDRLP4 8 +INDIRP4 +ADDRFP4 8 +INDIRI4 +SUBP4 +ASGNP4 +line 151 +;151: } +LABELV $102 +line 144 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +GTU4 $108 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 80 +ADDRFP4 12 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 80 +INDIRI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 0 +GEI4 $101 +LABELV $108 +line 152 +;152: if (pb > pc) +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +LEU4 $109 +line 153 +;153: break; +ADDRGP4 $91 +JUMPV +LABELV $109 +line 154 +;154: swap(pb, pc); +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $111 +ADDRLP4 84 +ADDRLP4 4 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 84 +INDIRI4 +ASGNI4 +ADDRGP4 $112 +JUMPV +LABELV $111 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 swapfunc +CALLV +pop +LABELV $112 +line 155 +;155: swap_cnt = 1; +ADDRLP4 28 +CNSTI4 1 +ASGNI4 +line 156 +;156: pb += es; +ADDRLP4 4 +ADDRFP4 8 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +ASGNP4 +line 157 +;157: pc -= es; +ADDRLP4 8 +ADDRLP4 8 +INDIRP4 +ADDRFP4 8 +INDIRI4 +SUBP4 +ASGNP4 +line 158 +;158: } +line 135 +ADDRGP4 $94 +JUMPV +LABELV $91 +line 159 +;159: if (swap_cnt == 0) { /* Switch to insertion sort */ +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +NEI4 $113 +line 160 +;160: for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) +ADDRLP4 32 +ADDRFP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ASGNP4 +ADDRGP4 $118 +JUMPV +LABELV $115 +line 161 +;161: for (pl = pm; pl > (char *)a && cmp(pl - es, pl) > 0; +ADDRLP4 0 +ADDRLP4 32 +INDIRP4 +ASGNP4 +ADDRGP4 $122 +JUMPV +LABELV $119 +line 163 +;162: pl -= es) +;163: swap(pl, pl - es); +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $123 +ADDRLP4 68 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ADDRFP4 8 +INDIRI4 +SUBP4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRFP4 8 +INDIRI4 +SUBP4 +ADDRLP4 68 +INDIRI4 +ASGNI4 +ADDRGP4 $124 +JUMPV +LABELV $123 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 72 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 72 +INDIRI4 +SUBP4 +ARGP4 +ADDRLP4 72 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 swapfunc +CALLV +pop +LABELV $124 +LABELV $120 +line 162 +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +ADDRFP4 8 +INDIRI4 +SUBP4 +ASGNP4 +LABELV $122 +line 161 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +LEU4 $125 +ADDRLP4 0 +INDIRP4 +ADDRFP4 8 +INDIRI4 +SUBP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 80 +ADDRFP4 12 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 0 +GTI4 $119 +LABELV $125 +LABELV $116 +line 160 +ADDRLP4 32 +ADDRFP4 8 +INDIRI4 +ADDRLP4 32 +INDIRP4 +ADDP4 +ASGNP4 +LABELV $118 +ADDRLP4 32 +INDIRP4 +CVPU4 4 +ADDRFP4 4 +INDIRI4 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +CVPU4 4 +LTU4 $115 +line 164 +;164: return; +ADDRGP4 $61 +JUMPV +LABELV $113 +line 167 +;165: } +;166: +;167: pn = (char *)a + n * es; +ADDRLP4 36 +ADDRFP4 4 +INDIRI4 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ASGNP4 +line 168 +;168: r = min(pa - (char *)a, pb - pa); +ADDRLP4 72 +ADDRLP4 20 +INDIRP4 +CVPU4 4 +ASGNU4 +ADDRLP4 72 +INDIRU4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 72 +INDIRU4 +SUBU4 +CVUI4 4 +GEI4 $127 +ADDRLP4 68 +ADDRLP4 20 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ASGNI4 +ADDRGP4 $128 +JUMPV +LABELV $127 +ADDRLP4 68 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 20 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ASGNI4 +LABELV $128 +ADDRLP4 12 +ADDRLP4 68 +INDIRI4 +ASGNI4 +line 169 +;169: vecswap(a, pb - r, r); +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +LEI4 $129 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +SUBP4 +ARGP4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 swapfunc +CALLV +pop +LABELV $129 +line 170 +;170: r = min(pd - pc, pn - pd - es); +ADDRLP4 84 +ADDRLP4 24 +INDIRP4 +CVPU4 4 +ASGNU4 +ADDRLP4 84 +INDIRU4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDRLP4 36 +INDIRP4 +CVPU4 4 +ADDRLP4 84 +INDIRU4 +SUBU4 +CVUI4 4 +ADDRFP4 8 +INDIRI4 +SUBI4 +GEI4 $132 +ADDRLP4 80 +ADDRLP4 24 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ASGNI4 +ADDRGP4 $133 +JUMPV +LABELV $132 +ADDRLP4 80 +ADDRLP4 36 +INDIRP4 +CVPU4 4 +ADDRLP4 24 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDRFP4 8 +INDIRI4 +SUBI4 +ASGNI4 +LABELV $133 +ADDRLP4 12 +ADDRLP4 80 +INDIRI4 +ASGNI4 +line 171 +;171: vecswap(pb, pn - r, r); +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +LEI4 $134 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 12 +INDIRI4 +SUBP4 +ARGP4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 swapfunc +CALLV +pop +LABELV $134 +line 172 +;172: if ((r = pb - pa) > es) +ADDRLP4 92 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 20 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 92 +INDIRI4 +ASGNI4 +ADDRLP4 92 +INDIRI4 +ADDRFP4 8 +INDIRI4 +LEI4 $136 +line 173 +;173: qsort(a, r / es, es, cmp); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 96 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 96 +INDIRI4 +DIVI4 +ARGI4 +ADDRLP4 96 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 qsort +CALLV +pop +LABELV $136 +line 174 +;174: if ((r = pd - pc) > es) { +ADDRLP4 100 +ADDRLP4 24 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 100 +INDIRI4 +ASGNI4 +ADDRLP4 100 +INDIRI4 +ADDRFP4 8 +INDIRI4 +LEI4 $138 +line 176 +;175: /* Iterate rather than recurse to save stack space */ +;176: a = pn - r; +ADDRFP4 0 +ADDRLP4 36 +INDIRP4 +ADDRLP4 12 +INDIRI4 +SUBP4 +ASGNP4 +line 177 +;177: n = r / es; +ADDRFP4 4 +ADDRLP4 12 +INDIRI4 +ADDRFP4 8 +INDIRI4 +DIVI4 +ASGNI4 +line 178 +;178: goto loop; +ADDRGP4 $62 +JUMPV +LABELV $138 +line 181 +;179: } +;180:/* qsort(pn - r, r / es, es, cmp);*/ +;181:} +LABELV $61 +endproc qsort 104 16 +export strlen +proc strlen 4 0 +line 191 +;182: +;183://================================================================================== +;184: +;185: +;186:// this file is excluded from release builds because of intrinsics +;187: +;188:// bk001211 - gcc errors on compiling strcpy: parse error before `__extension__' +;189:#if defined ( Q3_VM ) +;190: +;191:size_t strlen( const char *string ) { +line 194 +;192: const char *s; +;193: +;194: s = string; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $142 +JUMPV +LABELV $141 +line 195 +;195: while ( *s ) { +line 196 +;196: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 197 +;197: } +LABELV $142 +line 195 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $141 +line 198 +;198: return s - string; +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +RETI4 +LABELV $140 +endproc strlen 4 0 +export strcat +proc strcat 16 0 +line 202 +;199:} +;200: +;201: +;202:char *strcat( char *strDestination, const char *strSource ) { +line 205 +;203: char *s; +;204: +;205: s = strDestination; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $146 +JUMPV +LABELV $145 +line 206 +;206: while ( *s ) { +line 207 +;207: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 208 +;208: } +LABELV $146 +line 206 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $145 +ADDRGP4 $149 +JUMPV +LABELV $148 +line 209 +;209: while ( *strSource ) { +line 210 +;210: *s++ = *strSource++; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI1 +ASGNI1 +line 211 +;211: } +LABELV $149 +line 209 +ADDRFP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $148 +line 212 +;212: *s = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 213 +;213: return strDestination; +ADDRFP4 0 +INDIRP4 +RETP4 +LABELV $144 +endproc strcat 16 0 +export strcpy +proc strcpy 16 0 +line 216 +;214:} +;215: +;216:char *strcpy( char *strDestination, const char *strSource ) { +line 219 +;217: char *s; +;218: +;219: s = strDestination; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $153 +JUMPV +LABELV $152 +line 220 +;220: while ( *strSource ) { +line 221 +;221: *s++ = *strSource++; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI1 +ASGNI1 +line 222 +;222: } +LABELV $153 +line 220 +ADDRFP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $152 +line 223 +;223: *s = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 224 +;224: return strDestination; +ADDRFP4 0 +INDIRP4 +RETP4 +LABELV $151 +endproc strcpy 16 0 +export strcmp +proc strcmp 12 0 +line 228 +;225:} +;226: +;227: +;228:int strcmp( const char *string1, const char *string2 ) { +ADDRGP4 $157 +JUMPV +LABELV $156 +line 229 +;229: while ( *string1 == *string2 && *string1 && *string2 ) { +line 230 +;230: string1++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 231 +;231: string2++; +ADDRFP4 4 +ADDRFP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 232 +;232: } +LABELV $157 +line 229 +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $160 +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $160 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $156 +LABELV $160 +line 233 +;233: return *string1 - *string2; +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRFP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +SUBI4 +RETI4 +LABELV $155 +endproc strcmp 12 0 +export strchr +proc strchr 0 0 +line 237 +;234:} +;235: +;236: +;237:char *strchr( const char *string, int c ) { +ADDRGP4 $163 +JUMPV +LABELV $162 +line 238 +;238: while ( *string ) { +line 239 +;239: if ( *string == c ) { +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRFP4 4 +INDIRI4 +NEI4 $165 +line 240 +;240: return ( char * )string; +ADDRFP4 0 +INDIRP4 +RETP4 +ADDRGP4 $161 +JUMPV +LABELV $165 +line 242 +;241: } +;242: string++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 243 +;243: } +LABELV $163 +line 238 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $162 +line 244 +;244: return (char *)0; +CNSTP4 0 +RETP4 +LABELV $161 +endproc strchr 0 0 +export strstr +proc strstr 8 0 +line 247 +;245:} +;246: +;247:char *strstr( const char *string, const char *strCharSet ) { +ADDRGP4 $169 +JUMPV +LABELV $168 +line 248 +;248: while ( *string ) { +line 251 +;249: int i; +;250: +;251: for ( i = 0 ; strCharSet[i] ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $174 +JUMPV +LABELV $171 +line 252 +;252: if ( string[i] != strCharSet[i] ) { +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +EQI4 $175 +line 253 +;253: break; +ADDRGP4 $173 +JUMPV +LABELV $175 +line 255 +;254: } +;255: } +LABELV $172 +line 251 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $174 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $171 +LABELV $173 +line 256 +;256: if ( !strCharSet[i] ) { +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $177 +line 257 +;257: return (char *)string; +ADDRFP4 0 +INDIRP4 +RETP4 +ADDRGP4 $167 +JUMPV +LABELV $177 +line 259 +;258: } +;259: string++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 260 +;260: } +LABELV $169 +line 248 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $168 +line 261 +;261: return (char *)0; +CNSTP4 0 +RETP4 +LABELV $167 +endproc strstr 8 0 +export tolower +proc tolower 4 0 +line 269 +;262:} +;263:#endif // bk001211 +;264: +;265:// bk001120 - presumably needed for Mac +;266://#if !defined(_MSC_VER) && !defined(__linux__) +;267:// bk001127 - undid undo +;268:#if defined ( Q3_VM ) +;269:int tolower( int c ) { +line 270 +;270: if ( c >= 'A' && c <= 'Z' ) { +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 65 +LTI4 $180 +ADDRLP4 0 +INDIRI4 +CNSTI4 90 +GTI4 $180 +line 271 +;271: c += 'a' - 'A'; +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 32 +ADDI4 +ASGNI4 +line 272 +;272: } +LABELV $180 +line 273 +;273: return c; +ADDRFP4 0 +INDIRI4 +RETI4 +LABELV $179 +endproc tolower 4 0 +export toupper +proc toupper 4 0 +line 277 +;274:} +;275: +;276: +;277:int toupper( int c ) { +line 278 +;278: if ( c >= 'a' && c <= 'z' ) { +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 97 +LTI4 $183 +ADDRLP4 0 +INDIRI4 +CNSTI4 122 +GTI4 $183 +line 279 +;279: c += 'A' - 'a'; +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -32 +ADDI4 +ASGNI4 +line 280 +;280: } +LABELV $183 +line 281 +;281: return c; +ADDRFP4 0 +INDIRI4 +RETI4 +LABELV $182 +endproc toupper 4 0 +export memmove +proc memmove 8 0 +line 287 +;282:} +;283: +;284:#endif +;285://#ifndef _MSC_VER +;286: +;287:void *memmove( void *dest, const void *src, size_t count ) { +line 290 +;288: int i; +;289: +;290: if ( dest > src ) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +ADDRFP4 4 +INDIRP4 +CVPU4 4 +LEU4 $186 +line 291 +;291: for ( i = count-1 ; i >= 0 ; i-- ) { +ADDRLP4 0 +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRGP4 $191 +JUMPV +LABELV $188 +line 292 +;292: ((char *)dest)[i] = ((char *)src)[i]; +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 293 +;293: } +LABELV $189 +line 291 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +LABELV $191 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GEI4 $188 +line 294 +;294: } else { +ADDRGP4 $187 +JUMPV +LABELV $186 +line 295 +;295: for ( i = 0 ; i < count ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $195 +JUMPV +LABELV $192 +line 296 +;296: ((char *)dest)[i] = ((char *)src)[i]; +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 297 +;297: } +LABELV $193 +line 295 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $195 +ADDRLP4 0 +INDIRI4 +ADDRFP4 8 +INDIRI4 +LTI4 $192 +line 298 +;298: } +LABELV $187 +line 299 +;299: return dest; +ADDRFP4 0 +INDIRP4 +RETP4 +LABELV $185 +endproc memmove 8 0 +export tan +proc tan 8 4 +line 757 +;300:} +;301: +;302: +;303:#if 0 +;304: +;305:double floor( double x ) { +;306: return (int)(x + 0x40000000) - 0x40000000; +;307:} +;308: +;309:void *memset( void *dest, int c, size_t count ) { +;310: while ( count-- ) { +;311: ((char *)dest)[count] = c; +;312: } +;313: return dest; +;314:} +;315: +;316:void *memcpy( void *dest, const void *src, size_t count ) { +;317: while ( count-- ) { +;318: ((char *)dest)[count] = ((char *)src)[count]; +;319: } +;320: return dest; +;321:} +;322: +;323:char *strncpy( char *strDest, const char *strSource, size_t count ) { +;324: char *s; +;325: +;326: s = strDest; +;327: while ( *strSource && count ) { +;328: *s++ = *strSource++; +;329: count--; +;330: } +;331: while ( count-- ) { +;332: *s++ = 0; +;333: } +;334: return strDest; +;335:} +;336: +;337:double sqrt( double x ) { +;338: float y; +;339: float delta; +;340: float maxError; +;341: +;342: if ( x <= 0 ) { +;343: return 0; +;344: } +;345: +;346: // initial guess +;347: y = x / 2; +;348: +;349: // refine +;350: maxError = x * 0.001; +;351: +;352: do { +;353: delta = ( y * y ) - x; +;354: y -= delta / ( 2 * y ); +;355: } while ( delta > maxError || delta < -maxError ); +;356: +;357: return y; +;358:} +;359: +;360: +;361:float sintable[1024] = { +;362:0.000000,0.001534,0.003068,0.004602,0.006136,0.007670,0.009204,0.010738, +;363:0.012272,0.013805,0.015339,0.016873,0.018407,0.019940,0.021474,0.023008, +;364:0.024541,0.026075,0.027608,0.029142,0.030675,0.032208,0.033741,0.035274, +;365:0.036807,0.038340,0.039873,0.041406,0.042938,0.044471,0.046003,0.047535, +;366:0.049068,0.050600,0.052132,0.053664,0.055195,0.056727,0.058258,0.059790, +;367:0.061321,0.062852,0.064383,0.065913,0.067444,0.068974,0.070505,0.072035, +;368:0.073565,0.075094,0.076624,0.078153,0.079682,0.081211,0.082740,0.084269, +;369:0.085797,0.087326,0.088854,0.090381,0.091909,0.093436,0.094963,0.096490, +;370:0.098017,0.099544,0.101070,0.102596,0.104122,0.105647,0.107172,0.108697, +;371:0.110222,0.111747,0.113271,0.114795,0.116319,0.117842,0.119365,0.120888, +;372:0.122411,0.123933,0.125455,0.126977,0.128498,0.130019,0.131540,0.133061, +;373:0.134581,0.136101,0.137620,0.139139,0.140658,0.142177,0.143695,0.145213, +;374:0.146730,0.148248,0.149765,0.151281,0.152797,0.154313,0.155828,0.157343, +;375:0.158858,0.160372,0.161886,0.163400,0.164913,0.166426,0.167938,0.169450, +;376:0.170962,0.172473,0.173984,0.175494,0.177004,0.178514,0.180023,0.181532, +;377:0.183040,0.184548,0.186055,0.187562,0.189069,0.190575,0.192080,0.193586, +;378:0.195090,0.196595,0.198098,0.199602,0.201105,0.202607,0.204109,0.205610, +;379:0.207111,0.208612,0.210112,0.211611,0.213110,0.214609,0.216107,0.217604, +;380:0.219101,0.220598,0.222094,0.223589,0.225084,0.226578,0.228072,0.229565, +;381:0.231058,0.232550,0.234042,0.235533,0.237024,0.238514,0.240003,0.241492, +;382:0.242980,0.244468,0.245955,0.247442,0.248928,0.250413,0.251898,0.253382, +;383:0.254866,0.256349,0.257831,0.259313,0.260794,0.262275,0.263755,0.265234, +;384:0.266713,0.268191,0.269668,0.271145,0.272621,0.274097,0.275572,0.277046, +;385:0.278520,0.279993,0.281465,0.282937,0.284408,0.285878,0.287347,0.288816, +;386:0.290285,0.291752,0.293219,0.294685,0.296151,0.297616,0.299080,0.300543, +;387:0.302006,0.303468,0.304929,0.306390,0.307850,0.309309,0.310767,0.312225, +;388:0.313682,0.315138,0.316593,0.318048,0.319502,0.320955,0.322408,0.323859, +;389:0.325310,0.326760,0.328210,0.329658,0.331106,0.332553,0.334000,0.335445, +;390:0.336890,0.338334,0.339777,0.341219,0.342661,0.344101,0.345541,0.346980, +;391:0.348419,0.349856,0.351293,0.352729,0.354164,0.355598,0.357031,0.358463, +;392:0.359895,0.361326,0.362756,0.364185,0.365613,0.367040,0.368467,0.369892, +;393:0.371317,0.372741,0.374164,0.375586,0.377007,0.378428,0.379847,0.381266, +;394:0.382683,0.384100,0.385516,0.386931,0.388345,0.389758,0.391170,0.392582, +;395:0.393992,0.395401,0.396810,0.398218,0.399624,0.401030,0.402435,0.403838, +;396:0.405241,0.406643,0.408044,0.409444,0.410843,0.412241,0.413638,0.415034, +;397:0.416430,0.417824,0.419217,0.420609,0.422000,0.423390,0.424780,0.426168, +;398:0.427555,0.428941,0.430326,0.431711,0.433094,0.434476,0.435857,0.437237, +;399:0.438616,0.439994,0.441371,0.442747,0.444122,0.445496,0.446869,0.448241, +;400:0.449611,0.450981,0.452350,0.453717,0.455084,0.456449,0.457813,0.459177, +;401:0.460539,0.461900,0.463260,0.464619,0.465976,0.467333,0.468689,0.470043, +;402:0.471397,0.472749,0.474100,0.475450,0.476799,0.478147,0.479494,0.480839, +;403:0.482184,0.483527,0.484869,0.486210,0.487550,0.488889,0.490226,0.491563, +;404:0.492898,0.494232,0.495565,0.496897,0.498228,0.499557,0.500885,0.502212, +;405:0.503538,0.504863,0.506187,0.507509,0.508830,0.510150,0.511469,0.512786, +;406:0.514103,0.515418,0.516732,0.518045,0.519356,0.520666,0.521975,0.523283, +;407:0.524590,0.525895,0.527199,0.528502,0.529804,0.531104,0.532403,0.533701, +;408:0.534998,0.536293,0.537587,0.538880,0.540171,0.541462,0.542751,0.544039, +;409:0.545325,0.546610,0.547894,0.549177,0.550458,0.551738,0.553017,0.554294, +;410:0.555570,0.556845,0.558119,0.559391,0.560662,0.561931,0.563199,0.564466, +;411:0.565732,0.566996,0.568259,0.569521,0.570781,0.572040,0.573297,0.574553, +;412:0.575808,0.577062,0.578314,0.579565,0.580814,0.582062,0.583309,0.584554, +;413:0.585798,0.587040,0.588282,0.589521,0.590760,0.591997,0.593232,0.594466, +;414:0.595699,0.596931,0.598161,0.599389,0.600616,0.601842,0.603067,0.604290, +;415:0.605511,0.606731,0.607950,0.609167,0.610383,0.611597,0.612810,0.614022, +;416:0.615232,0.616440,0.617647,0.618853,0.620057,0.621260,0.622461,0.623661, +;417:0.624859,0.626056,0.627252,0.628446,0.629638,0.630829,0.632019,0.633207, +;418:0.634393,0.635578,0.636762,0.637944,0.639124,0.640303,0.641481,0.642657, +;419:0.643832,0.645005,0.646176,0.647346,0.648514,0.649681,0.650847,0.652011, +;420:0.653173,0.654334,0.655493,0.656651,0.657807,0.658961,0.660114,0.661266, +;421:0.662416,0.663564,0.664711,0.665856,0.667000,0.668142,0.669283,0.670422, +;422:0.671559,0.672695,0.673829,0.674962,0.676093,0.677222,0.678350,0.679476, +;423:0.680601,0.681724,0.682846,0.683965,0.685084,0.686200,0.687315,0.688429, +;424:0.689541,0.690651,0.691759,0.692866,0.693971,0.695075,0.696177,0.697278, +;425:0.698376,0.699473,0.700569,0.701663,0.702755,0.703845,0.704934,0.706021, +;426:0.707107,0.708191,0.709273,0.710353,0.711432,0.712509,0.713585,0.714659, +;427:0.715731,0.716801,0.717870,0.718937,0.720003,0.721066,0.722128,0.723188, +;428:0.724247,0.725304,0.726359,0.727413,0.728464,0.729514,0.730563,0.731609, +;429:0.732654,0.733697,0.734739,0.735779,0.736817,0.737853,0.738887,0.739920, +;430:0.740951,0.741980,0.743008,0.744034,0.745058,0.746080,0.747101,0.748119, +;431:0.749136,0.750152,0.751165,0.752177,0.753187,0.754195,0.755201,0.756206, +;432:0.757209,0.758210,0.759209,0.760207,0.761202,0.762196,0.763188,0.764179, +;433:0.765167,0.766154,0.767139,0.768122,0.769103,0.770083,0.771061,0.772036, +;434:0.773010,0.773983,0.774953,0.775922,0.776888,0.777853,0.778817,0.779778, +;435:0.780737,0.781695,0.782651,0.783605,0.784557,0.785507,0.786455,0.787402, +;436:0.788346,0.789289,0.790230,0.791169,0.792107,0.793042,0.793975,0.794907, +;437:0.795837,0.796765,0.797691,0.798615,0.799537,0.800458,0.801376,0.802293, +;438:0.803208,0.804120,0.805031,0.805940,0.806848,0.807753,0.808656,0.809558, +;439:0.810457,0.811355,0.812251,0.813144,0.814036,0.814926,0.815814,0.816701, +;440:0.817585,0.818467,0.819348,0.820226,0.821103,0.821977,0.822850,0.823721, +;441:0.824589,0.825456,0.826321,0.827184,0.828045,0.828904,0.829761,0.830616, +;442:0.831470,0.832321,0.833170,0.834018,0.834863,0.835706,0.836548,0.837387, +;443:0.838225,0.839060,0.839894,0.840725,0.841555,0.842383,0.843208,0.844032, +;444:0.844854,0.845673,0.846491,0.847307,0.848120,0.848932,0.849742,0.850549, +;445:0.851355,0.852159,0.852961,0.853760,0.854558,0.855354,0.856147,0.856939, +;446:0.857729,0.858516,0.859302,0.860085,0.860867,0.861646,0.862424,0.863199, +;447:0.863973,0.864744,0.865514,0.866281,0.867046,0.867809,0.868571,0.869330, +;448:0.870087,0.870842,0.871595,0.872346,0.873095,0.873842,0.874587,0.875329, +;449:0.876070,0.876809,0.877545,0.878280,0.879012,0.879743,0.880471,0.881197, +;450:0.881921,0.882643,0.883363,0.884081,0.884797,0.885511,0.886223,0.886932, +;451:0.887640,0.888345,0.889048,0.889750,0.890449,0.891146,0.891841,0.892534, +;452:0.893224,0.893913,0.894599,0.895284,0.895966,0.896646,0.897325,0.898001, +;453:0.898674,0.899346,0.900016,0.900683,0.901349,0.902012,0.902673,0.903332, +;454:0.903989,0.904644,0.905297,0.905947,0.906596,0.907242,0.907886,0.908528, +;455:0.909168,0.909806,0.910441,0.911075,0.911706,0.912335,0.912962,0.913587, +;456:0.914210,0.914830,0.915449,0.916065,0.916679,0.917291,0.917901,0.918508, +;457:0.919114,0.919717,0.920318,0.920917,0.921514,0.922109,0.922701,0.923291, +;458:0.923880,0.924465,0.925049,0.925631,0.926210,0.926787,0.927363,0.927935, +;459:0.928506,0.929075,0.929641,0.930205,0.930767,0.931327,0.931884,0.932440, +;460:0.932993,0.933544,0.934093,0.934639,0.935184,0.935726,0.936266,0.936803, +;461:0.937339,0.937872,0.938404,0.938932,0.939459,0.939984,0.940506,0.941026, +;462:0.941544,0.942060,0.942573,0.943084,0.943593,0.944100,0.944605,0.945107, +;463:0.945607,0.946105,0.946601,0.947094,0.947586,0.948075,0.948561,0.949046, +;464:0.949528,0.950008,0.950486,0.950962,0.951435,0.951906,0.952375,0.952842, +;465:0.953306,0.953768,0.954228,0.954686,0.955141,0.955594,0.956045,0.956494, +;466:0.956940,0.957385,0.957826,0.958266,0.958703,0.959139,0.959572,0.960002, +;467:0.960431,0.960857,0.961280,0.961702,0.962121,0.962538,0.962953,0.963366, +;468:0.963776,0.964184,0.964590,0.964993,0.965394,0.965793,0.966190,0.966584, +;469:0.966976,0.967366,0.967754,0.968139,0.968522,0.968903,0.969281,0.969657, +;470:0.970031,0.970403,0.970772,0.971139,0.971504,0.971866,0.972226,0.972584, +;471:0.972940,0.973293,0.973644,0.973993,0.974339,0.974684,0.975025,0.975365, +;472:0.975702,0.976037,0.976370,0.976700,0.977028,0.977354,0.977677,0.977999, +;473:0.978317,0.978634,0.978948,0.979260,0.979570,0.979877,0.980182,0.980485, +;474:0.980785,0.981083,0.981379,0.981673,0.981964,0.982253,0.982539,0.982824, +;475:0.983105,0.983385,0.983662,0.983937,0.984210,0.984480,0.984749,0.985014, +;476:0.985278,0.985539,0.985798,0.986054,0.986308,0.986560,0.986809,0.987057, +;477:0.987301,0.987544,0.987784,0.988022,0.988258,0.988491,0.988722,0.988950, +;478:0.989177,0.989400,0.989622,0.989841,0.990058,0.990273,0.990485,0.990695, +;479:0.990903,0.991108,0.991311,0.991511,0.991710,0.991906,0.992099,0.992291, +;480:0.992480,0.992666,0.992850,0.993032,0.993212,0.993389,0.993564,0.993737, +;481:0.993907,0.994075,0.994240,0.994404,0.994565,0.994723,0.994879,0.995033, +;482:0.995185,0.995334,0.995481,0.995625,0.995767,0.995907,0.996045,0.996180, +;483:0.996313,0.996443,0.996571,0.996697,0.996820,0.996941,0.997060,0.997176, +;484:0.997290,0.997402,0.997511,0.997618,0.997723,0.997825,0.997925,0.998023, +;485:0.998118,0.998211,0.998302,0.998390,0.998476,0.998559,0.998640,0.998719, +;486:0.998795,0.998870,0.998941,0.999011,0.999078,0.999142,0.999205,0.999265, +;487:0.999322,0.999378,0.999431,0.999481,0.999529,0.999575,0.999619,0.999660, +;488:0.999699,0.999735,0.999769,0.999801,0.999831,0.999858,0.999882,0.999905, +;489:0.999925,0.999942,0.999958,0.999971,0.999981,0.999989,0.999995,0.999999 +;490:}; +;491: +;492:double sin( double x ) { +;493: int index; +;494: int quad; +;495: +;496: index = 1024 * x / (M_PI * 0.5); +;497: quad = ( index >> 10 ) & 3; +;498: index &= 1023; +;499: switch ( quad ) { +;500: case 0: +;501: return sintable[index]; +;502: case 1: +;503: return sintable[1023-index]; +;504: case 2: +;505: return -sintable[index]; +;506: case 3: +;507: return -sintable[1023-index]; +;508: } +;509: return 0; +;510:} +;511: +;512: +;513:double cos( double x ) { +;514: int index; +;515: int quad; +;516: +;517: index = 1024 * x / (M_PI * 0.5); +;518: quad = ( index >> 10 ) & 3; +;519: index &= 1023; +;520: switch ( quad ) { +;521: case 3: +;522: return sintable[index]; +;523: case 0: +;524: return sintable[1023-index]; +;525: case 1: +;526: return -sintable[index]; +;527: case 2: +;528: return -sintable[1023-index]; +;529: } +;530: return 0; +;531:} +;532: +;533: +;534:/* +;535:void create_acostable( void ) { +;536: int i; +;537: FILE *fp; +;538: float a; +;539: +;540: fp = fopen("c:\\acostable.txt", "w"); +;541: fprintf(fp, "float acostable[] = {"); +;542: for (i = 0; i < 1024; i++) { +;543: if (!(i & 7)) +;544: fprintf(fp, "\n"); +;545: a = acos( (float) -1 + i / 512 ); +;546: fprintf(fp, "%1.8f,", a); +;547: } +;548: fprintf(fp, "\n}\n"); +;549: fclose(fp); +;550:} +;551:*/ +;552: +;553:float acostable[] = { +;554:3.14159265,3.07908248,3.05317551,3.03328655,3.01651113,3.00172442,2.98834964,2.97604422, +;555:2.96458497,2.95381690,2.94362719,2.93393068,2.92466119,2.91576615,2.90720289,2.89893629, +;556:2.89093699,2.88318015,2.87564455,2.86831188,2.86116621,2.85419358,2.84738169,2.84071962, +;557:2.83419760,2.82780691,2.82153967,2.81538876,2.80934770,2.80341062,2.79757211,2.79182724, +;558:2.78617145,2.78060056,2.77511069,2.76969824,2.76435988,2.75909250,2.75389319,2.74875926, +;559:2.74368816,2.73867752,2.73372510,2.72882880,2.72398665,2.71919677,2.71445741,2.70976688, +;560:2.70512362,2.70052613,2.69597298,2.69146283,2.68699438,2.68256642,2.67817778,2.67382735, +;561:2.66951407,2.66523692,2.66099493,2.65678719,2.65261279,2.64847088,2.64436066,2.64028133, +;562:2.63623214,2.63221238,2.62822133,2.62425835,2.62032277,2.61641398,2.61253138,2.60867440, +;563:2.60484248,2.60103507,2.59725167,2.59349176,2.58975488,2.58604053,2.58234828,2.57867769, +;564:2.57502832,2.57139977,2.56779164,2.56420354,2.56063509,2.55708594,2.55355572,2.55004409, +;565:2.54655073,2.54307530,2.53961750,2.53617701,2.53275354,2.52934680,2.52595650,2.52258238, +;566:2.51922417,2.51588159,2.51255441,2.50924238,2.50594525,2.50266278,2.49939476,2.49614096, +;567:2.49290115,2.48967513,2.48646269,2.48326362,2.48007773,2.47690482,2.47374472,2.47059722, +;568:2.46746215,2.46433933,2.46122860,2.45812977,2.45504269,2.45196720,2.44890314,2.44585034, +;569:2.44280867,2.43977797,2.43675809,2.43374890,2.43075025,2.42776201,2.42478404,2.42181622, +;570:2.41885841,2.41591048,2.41297232,2.41004380,2.40712480,2.40421521,2.40131491,2.39842379, +;571:2.39554173,2.39266863,2.38980439,2.38694889,2.38410204,2.38126374,2.37843388,2.37561237, +;572:2.37279910,2.36999400,2.36719697,2.36440790,2.36162673,2.35885335,2.35608768,2.35332964, +;573:2.35057914,2.34783610,2.34510044,2.34237208,2.33965094,2.33693695,2.33423003,2.33153010, +;574:2.32883709,2.32615093,2.32347155,2.32079888,2.31813284,2.31547337,2.31282041,2.31017388, +;575:2.30753373,2.30489988,2.30227228,2.29965086,2.29703556,2.29442632,2.29182309,2.28922580, +;576:2.28663439,2.28404881,2.28146900,2.27889490,2.27632647,2.27376364,2.27120637,2.26865460, +;577:2.26610827,2.26356735,2.26103177,2.25850149,2.25597646,2.25345663,2.25094195,2.24843238, +;578:2.24592786,2.24342836,2.24093382,2.23844420,2.23595946,2.23347956,2.23100444,2.22853408, +;579:2.22606842,2.22360742,2.22115104,2.21869925,2.21625199,2.21380924,2.21137096,2.20893709, +;580:2.20650761,2.20408248,2.20166166,2.19924511,2.19683280,2.19442469,2.19202074,2.18962092, +;581:2.18722520,2.18483354,2.18244590,2.18006225,2.17768257,2.17530680,2.17293493,2.17056692, +;582:2.16820274,2.16584236,2.16348574,2.16113285,2.15878367,2.15643816,2.15409630,2.15175805, +;583:2.14942338,2.14709226,2.14476468,2.14244059,2.14011997,2.13780279,2.13548903,2.13317865, +;584:2.13087163,2.12856795,2.12626757,2.12397047,2.12167662,2.11938600,2.11709859,2.11481435, +;585:2.11253326,2.11025530,2.10798044,2.10570867,2.10343994,2.10117424,2.09891156,2.09665185, +;586:2.09439510,2.09214129,2.08989040,2.08764239,2.08539725,2.08315496,2.08091550,2.07867884, +;587:2.07644495,2.07421383,2.07198545,2.06975978,2.06753681,2.06531651,2.06309887,2.06088387, +;588:2.05867147,2.05646168,2.05425445,2.05204979,2.04984765,2.04764804,2.04545092,2.04325628, +;589:2.04106409,2.03887435,2.03668703,2.03450211,2.03231957,2.03013941,2.02796159,2.02578610, +;590:2.02361292,2.02144204,2.01927344,2.01710710,2.01494300,2.01278113,2.01062146,2.00846399, +;591:2.00630870,2.00415556,2.00200457,1.99985570,1.99770895,1.99556429,1.99342171,1.99128119, +;592:1.98914271,1.98700627,1.98487185,1.98273942,1.98060898,1.97848051,1.97635399,1.97422942, +;593:1.97210676,1.96998602,1.96786718,1.96575021,1.96363511,1.96152187,1.95941046,1.95730088, +;594:1.95519310,1.95308712,1.95098292,1.94888050,1.94677982,1.94468089,1.94258368,1.94048818, +;595:1.93839439,1.93630228,1.93421185,1.93212308,1.93003595,1.92795046,1.92586659,1.92378433, +;596:1.92170367,1.91962459,1.91754708,1.91547113,1.91339673,1.91132385,1.90925250,1.90718266, +;597:1.90511432,1.90304746,1.90098208,1.89891815,1.89685568,1.89479464,1.89273503,1.89067683, +;598:1.88862003,1.88656463,1.88451060,1.88245794,1.88040664,1.87835668,1.87630806,1.87426076, +;599:1.87221477,1.87017008,1.86812668,1.86608457,1.86404371,1.86200412,1.85996577,1.85792866, +;600:1.85589277,1.85385809,1.85182462,1.84979234,1.84776125,1.84573132,1.84370256,1.84167495, +;601:1.83964848,1.83762314,1.83559892,1.83357582,1.83155381,1.82953289,1.82751305,1.82549429, +;602:1.82347658,1.82145993,1.81944431,1.81742973,1.81541617,1.81340362,1.81139207,1.80938151, +;603:1.80737194,1.80536334,1.80335570,1.80134902,1.79934328,1.79733848,1.79533460,1.79333164, +;604:1.79132959,1.78932843,1.78732817,1.78532878,1.78333027,1.78133261,1.77933581,1.77733985, +;605:1.77534473,1.77335043,1.77135695,1.76936428,1.76737240,1.76538132,1.76339101,1.76140148, +;606:1.75941271,1.75742470,1.75543743,1.75345090,1.75146510,1.74948002,1.74749565,1.74551198, +;607:1.74352900,1.74154672,1.73956511,1.73758417,1.73560389,1.73362426,1.73164527,1.72966692, +;608:1.72768920,1.72571209,1.72373560,1.72175971,1.71978441,1.71780969,1.71583556,1.71386199, +;609:1.71188899,1.70991653,1.70794462,1.70597325,1.70400241,1.70203209,1.70006228,1.69809297, +;610:1.69612416,1.69415584,1.69218799,1.69022062,1.68825372,1.68628727,1.68432127,1.68235571, +;611:1.68039058,1.67842588,1.67646160,1.67449772,1.67253424,1.67057116,1.66860847,1.66664615, +;612:1.66468420,1.66272262,1.66076139,1.65880050,1.65683996,1.65487975,1.65291986,1.65096028, +;613:1.64900102,1.64704205,1.64508338,1.64312500,1.64116689,1.63920905,1.63725148,1.63529416, +;614:1.63333709,1.63138026,1.62942366,1.62746728,1.62551112,1.62355517,1.62159943,1.61964388, +;615:1.61768851,1.61573332,1.61377831,1.61182346,1.60986877,1.60791422,1.60595982,1.60400556, +;616:1.60205142,1.60009739,1.59814349,1.59618968,1.59423597,1.59228235,1.59032882,1.58837536, +;617:1.58642196,1.58446863,1.58251535,1.58056211,1.57860891,1.57665574,1.57470259,1.57274945, +;618:1.57079633,1.56884320,1.56689007,1.56493692,1.56298375,1.56103055,1.55907731,1.55712403, +;619:1.55517069,1.55321730,1.55126383,1.54931030,1.54735668,1.54540297,1.54344917,1.54149526, +;620:1.53954124,1.53758710,1.53563283,1.53367843,1.53172389,1.52976919,1.52781434,1.52585933, +;621:1.52390414,1.52194878,1.51999323,1.51803748,1.51608153,1.51412537,1.51216900,1.51021240, +;622:1.50825556,1.50629849,1.50434117,1.50238360,1.50042576,1.49846765,1.49650927,1.49455060, +;623:1.49259163,1.49063237,1.48867280,1.48671291,1.48475270,1.48279215,1.48083127,1.47887004, +;624:1.47690845,1.47494650,1.47298419,1.47102149,1.46905841,1.46709493,1.46513106,1.46316677, +;625:1.46120207,1.45923694,1.45727138,1.45530538,1.45333893,1.45137203,1.44940466,1.44743682, +;626:1.44546850,1.44349969,1.44153038,1.43956057,1.43759024,1.43561940,1.43364803,1.43167612, +;627:1.42970367,1.42773066,1.42575709,1.42378296,1.42180825,1.41983295,1.41785705,1.41588056, +;628:1.41390346,1.41192573,1.40994738,1.40796840,1.40598877,1.40400849,1.40202755,1.40004594, +;629:1.39806365,1.39608068,1.39409701,1.39211264,1.39012756,1.38814175,1.38615522,1.38416795, +;630:1.38217994,1.38019117,1.37820164,1.37621134,1.37422025,1.37222837,1.37023570,1.36824222, +;631:1.36624792,1.36425280,1.36225684,1.36026004,1.35826239,1.35626387,1.35426449,1.35226422, +;632:1.35026307,1.34826101,1.34625805,1.34425418,1.34224937,1.34024364,1.33823695,1.33622932, +;633:1.33422072,1.33221114,1.33020059,1.32818904,1.32617649,1.32416292,1.32214834,1.32013273, +;634:1.31811607,1.31609837,1.31407960,1.31205976,1.31003885,1.30801684,1.30599373,1.30396951, +;635:1.30194417,1.29991770,1.29789009,1.29586133,1.29383141,1.29180031,1.28976803,1.28773456, +;636:1.28569989,1.28366400,1.28162688,1.27958854,1.27754894,1.27550809,1.27346597,1.27142257, +;637:1.26937788,1.26733189,1.26528459,1.26323597,1.26118602,1.25913471,1.25708205,1.25502803, +;638:1.25297262,1.25091583,1.24885763,1.24679802,1.24473698,1.24267450,1.24061058,1.23854519, +;639:1.23647833,1.23440999,1.23234015,1.23026880,1.22819593,1.22612152,1.22404557,1.22196806, +;640:1.21988898,1.21780832,1.21572606,1.21364219,1.21155670,1.20946958,1.20738080,1.20529037, +;641:1.20319826,1.20110447,1.19900898,1.19691177,1.19481283,1.19271216,1.19060973,1.18850553, +;642:1.18639955,1.18429178,1.18218219,1.18007079,1.17795754,1.17584244,1.17372548,1.17160663, +;643:1.16948589,1.16736324,1.16523866,1.16311215,1.16098368,1.15885323,1.15672081,1.15458638, +;644:1.15244994,1.15031147,1.14817095,1.14602836,1.14388370,1.14173695,1.13958808,1.13743709, +;645:1.13528396,1.13312866,1.13097119,1.12881153,1.12664966,1.12448556,1.12231921,1.12015061, +;646:1.11797973,1.11580656,1.11363107,1.11145325,1.10927308,1.10709055,1.10490563,1.10271831, +;647:1.10052856,1.09833638,1.09614174,1.09394462,1.09174500,1.08954287,1.08733820,1.08513098, +;648:1.08292118,1.08070879,1.07849378,1.07627614,1.07405585,1.07183287,1.06960721,1.06737882, +;649:1.06514770,1.06291382,1.06067715,1.05843769,1.05619540,1.05395026,1.05170226,1.04945136, +;650:1.04719755,1.04494080,1.04268110,1.04041841,1.03815271,1.03588399,1.03361221,1.03133735, +;651:1.02905939,1.02677830,1.02449407,1.02220665,1.01991603,1.01762219,1.01532509,1.01302471, +;652:1.01072102,1.00841400,1.00610363,1.00378986,1.00147268,0.99915206,0.99682798,0.99450039, +;653:0.99216928,0.98983461,0.98749636,0.98515449,0.98280898,0.98045980,0.97810691,0.97575030, +;654:0.97338991,0.97102573,0.96865772,0.96628585,0.96391009,0.96153040,0.95914675,0.95675912, +;655:0.95436745,0.95197173,0.94957191,0.94716796,0.94475985,0.94234754,0.93993099,0.93751017, +;656:0.93508504,0.93265556,0.93022170,0.92778341,0.92534066,0.92289341,0.92044161,0.91798524, +;657:0.91552424,0.91305858,0.91058821,0.90811309,0.90563319,0.90314845,0.90065884,0.89816430, +;658:0.89566479,0.89316028,0.89065070,0.88813602,0.88561619,0.88309116,0.88056088,0.87802531, +;659:0.87548438,0.87293806,0.87038629,0.86782901,0.86526619,0.86269775,0.86012366,0.85754385, +;660:0.85495827,0.85236686,0.84976956,0.84716633,0.84455709,0.84194179,0.83932037,0.83669277, +;661:0.83405893,0.83141877,0.82877225,0.82611928,0.82345981,0.82079378,0.81812110,0.81544172, +;662:0.81275556,0.81006255,0.80736262,0.80465570,0.80194171,0.79922057,0.79649221,0.79375655, +;663:0.79101352,0.78826302,0.78550497,0.78273931,0.77996593,0.77718475,0.77439569,0.77159865, +;664:0.76879355,0.76598029,0.76315878,0.76032891,0.75749061,0.75464376,0.75178826,0.74892402, +;665:0.74605092,0.74316887,0.74027775,0.73737744,0.73446785,0.73154885,0.72862033,0.72568217, +;666:0.72273425,0.71977644,0.71680861,0.71383064,0.71084240,0.70784376,0.70483456,0.70181469, +;667:0.69878398,0.69574231,0.69268952,0.68962545,0.68654996,0.68346288,0.68036406,0.67725332, +;668:0.67413051,0.67099544,0.66784794,0.66468783,0.66151492,0.65832903,0.65512997,0.65191753, +;669:0.64869151,0.64545170,0.64219789,0.63892987,0.63564741,0.63235028,0.62903824,0.62571106, +;670:0.62236849,0.61901027,0.61563615,0.61224585,0.60883911,0.60541564,0.60197515,0.59851735, +;671:0.59504192,0.59154856,0.58803694,0.58450672,0.58095756,0.57738911,0.57380101,0.57019288, +;672:0.56656433,0.56291496,0.55924437,0.55555212,0.55183778,0.54810089,0.54434099,0.54055758, +;673:0.53675018,0.53291825,0.52906127,0.52517867,0.52126988,0.51733431,0.51337132,0.50938028, +;674:0.50536051,0.50131132,0.49723200,0.49312177,0.48897987,0.48480547,0.48059772,0.47635573, +;675:0.47207859,0.46776530,0.46341487,0.45902623,0.45459827,0.45012983,0.44561967,0.44106652, +;676:0.43646903,0.43182577,0.42713525,0.42239588,0.41760600,0.41276385,0.40786755,0.40291513, +;677:0.39790449,0.39283339,0.38769946,0.38250016,0.37723277,0.37189441,0.36648196,0.36099209, +;678:0.35542120,0.34976542,0.34402054,0.33818204,0.33224495,0.32620390,0.32005298,0.31378574, +;679:0.30739505,0.30087304,0.29421096,0.28739907,0.28042645,0.27328078,0.26594810,0.25841250, +;680:0.25065566,0.24265636,0.23438976,0.22582651,0.21693146,0.20766198,0.19796546,0.18777575, +;681:0.17700769,0.16554844,0.15324301,0.13986823,0.12508152,0.10830610,0.08841715,0.06251018, +;682:} +;683: +;684:double acos( double x ) { +;685: int index; +;686: +;687: if (x < -1) +;688: x = -1; +;689: if (x > 1) +;690: x = 1; +;691: index = (float) (1.0 + x) * 511.9; +;692: return acostable[index]; +;693:} +;694: +;695:double atan2( double y, double x ) { +;696: float base; +;697: float temp; +;698: float dir; +;699: float test; +;700: int i; +;701: +;702: if ( x < 0 ) { +;703: if ( y >= 0 ) { +;704: // quad 1 +;705: base = M_PI / 2; +;706: temp = x; +;707: x = y; +;708: y = -temp; +;709: } else { +;710: // quad 2 +;711: base = M_PI; +;712: x = -x; +;713: y = -y; +;714: } +;715: } else { +;716: if ( y < 0 ) { +;717: // quad 3 +;718: base = 3 * M_PI / 2; +;719: temp = x; +;720: x = -y; +;721: y = temp; +;722: } +;723: } +;724: +;725: if ( y > x ) { +;726: base += M_PI/2; +;727: temp = x; +;728: x = y; +;729: y = temp; +;730: dir = -1; +;731: } else { +;732: dir = 1; +;733: } +;734: +;735: // calcualte angle in octant 0 +;736: if ( x == 0 ) { +;737: return base; +;738: } +;739: y /= x; +;740: +;741: for ( i = 0 ; i < 512 ; i++ ) { +;742: test = sintable[i] / sintable[1023-i]; +;743: if ( test > y ) { +;744: break; +;745: } +;746: } +;747: +;748: return base + dir * i * ( M_PI/2048); +;749:} +;750: +;751: +;752:#endif +;753: +;754:#ifdef Q3_VM +;755:// bk001127 - guarded this tan replacement +;756:// ld: undefined versioned symbol name tan@@GLIBC_2.0 +;757:double tan( double x ) { +line 758 +;758: return sin(x) / cos(x); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ADDRLP4 4 +INDIRF4 +DIVF4 +RETF4 +LABELV $196 +endproc tan 8 4 +data +align 4 +LABELV randSeed +byte 4 0 +export srand +code +proc srand 0 0 +line 765 +;759:} +;760:#endif +;761: +;762: +;763:static int randSeed = 0; +;764: +;765:void srand( unsigned seed ) { +line 766 +;766: randSeed = seed; +ADDRGP4 randSeed +ADDRFP4 0 +INDIRU4 +CVUI4 4 +ASGNI4 +line 767 +;767:} +LABELV $197 +endproc srand 0 0 +export rand +proc rand 4 0 +line 769 +;768: +;769:int rand( void ) { +line 770 +;770: randSeed = (69069 * randSeed + 1); +ADDRLP4 0 +ADDRGP4 randSeed +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 69069 +ADDRLP4 0 +INDIRP4 +INDIRI4 +MULI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 771 +;771: return randSeed & 0x7fff; +ADDRGP4 randSeed +INDIRI4 +CNSTI4 32767 +BANDI4 +RETI4 +LABELV $198 +endproc rand 4 0 +export atof +proc atof 32 0 +line 774 +;772:} +;773: +;774:double atof( const char *string ) { +ADDRGP4 $201 +JUMPV +LABELV $200 +line 781 +;775: float sign; +;776: float value; +;777: int c; +;778: +;779: +;780: // skip whitespace +;781: while ( *string <= ' ' ) { +line 782 +;782: if ( !*string ) { +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $203 +line 783 +;783: return 0; +CNSTF4 0 +RETF4 +ADDRGP4 $199 +JUMPV +LABELV $203 +line 785 +;784: } +;785: string++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 786 +;786: } +LABELV $201 +line 781 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 32 +LEI4 $200 +line 789 +;787: +;788: // check sign +;789: switch ( *string ) { +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 43 +EQI4 $208 +ADDRLP4 12 +INDIRI4 +CNSTI4 45 +EQI4 $209 +ADDRGP4 $205 +JUMPV +LABELV $208 +line 791 +;790: case '+': +;791: string++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 792 +;792: sign = 1; +ADDRLP4 8 +CNSTF4 1065353216 +ASGNF4 +line 793 +;793: break; +ADDRGP4 $206 +JUMPV +LABELV $209 +line 795 +;794: case '-': +;795: string++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 796 +;796: sign = -1; +ADDRLP4 8 +CNSTF4 3212836864 +ASGNF4 +line 797 +;797: break; +ADDRGP4 $206 +JUMPV +LABELV $205 +line 799 +;798: default: +;799: sign = 1; +ADDRLP4 8 +CNSTF4 1065353216 +ASGNF4 +line 800 +;800: break; +LABELV $206 +line 804 +;801: } +;802: +;803: // read digits +;804: value = 0; +ADDRLP4 4 +CNSTF4 0 +ASGNF4 +line 805 +;805: c = string[0]; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 806 +;806: if ( c != '.' ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 46 +EQI4 $210 +LABELV $212 +line 807 +;807: do { +line 808 +;808: c = *string++; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 20 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 20 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 809 +;809: if ( c < '0' || c > '9' ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +LTI4 $217 +ADDRLP4 0 +INDIRI4 +CNSTI4 57 +LEI4 $215 +LABELV $217 +line 810 +;810: break; +ADDRGP4 $211 +JUMPV +LABELV $215 +line 812 +;811: } +;812: c -= '0'; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +SUBI4 +ASGNI4 +line 813 +;813: value = value * 10 + c; +ADDRLP4 4 +CNSTF4 1092616192 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 814 +;814: } while ( 1 ); +LABELV $213 +ADDRGP4 $212 +JUMPV +line 815 +;815: } else { +ADDRGP4 $211 +JUMPV +LABELV $210 +line 816 +;816: string++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 817 +;817: } +LABELV $211 +line 820 +;818: +;819: // check for decimal point +;820: if ( c == '.' ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 46 +NEI4 $218 +line 823 +;821: double fraction; +;822: +;823: fraction = 0.1; +ADDRLP4 20 +CNSTF4 1036831949 +ASGNF4 +LABELV $220 +line 824 +;824: do { +line 825 +;825: c = *string++; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 24 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 24 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 826 +;826: if ( c < '0' || c > '9' ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +LTI4 $225 +ADDRLP4 0 +INDIRI4 +CNSTI4 57 +LEI4 $223 +LABELV $225 +line 827 +;827: break; +ADDRGP4 $222 +JUMPV +LABELV $223 +line 829 +;828: } +;829: c -= '0'; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +SUBI4 +ASGNI4 +line 830 +;830: value += c * fraction; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ADDRLP4 20 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 831 +;831: fraction *= 0.1; +ADDRLP4 20 +CNSTF4 1036831949 +ADDRLP4 20 +INDIRF4 +MULF4 +ASGNF4 +line 832 +;832: } while ( 1 ); +LABELV $221 +ADDRGP4 $220 +JUMPV +LABELV $222 +line 834 +;833: +;834: } +LABELV $218 +line 838 +;835: +;836: // not handling 10e10 notation... +;837: +;838: return value * sign; +ADDRLP4 4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +MULF4 +RETF4 +LABELV $199 +endproc atof 32 0 +export _atof +proc _atof 36 0 +line 841 +;839:} +;840: +;841:double _atof( const char **stringPtr ) { +line 845 +;842: const char *string; +;843: float sign; +;844: float value; +;845: int c = '0'; // bk001211 - uninitialized use possible +ADDRLP4 0 +CNSTI4 48 +ASGNI4 +line 847 +;846: +;847: string = *stringPtr; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRGP4 $228 +JUMPV +LABELV $227 +line 850 +;848: +;849: // skip whitespace +;850: while ( *string <= ' ' ) { +line 851 +;851: if ( !*string ) { +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $230 +line 852 +;852: *stringPtr = string; +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 853 +;853: return 0; +CNSTF4 0 +RETF4 +ADDRGP4 $226 +JUMPV +LABELV $230 +line 855 +;854: } +;855: string++; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 856 +;856: } +LABELV $228 +line 850 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 32 +LEI4 $227 +line 859 +;857: +;858: // check sign +;859: switch ( *string ) { +ADDRLP4 16 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 43 +EQI4 $235 +ADDRLP4 16 +INDIRI4 +CNSTI4 45 +EQI4 $236 +ADDRGP4 $232 +JUMPV +LABELV $235 +line 861 +;860: case '+': +;861: string++; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 862 +;862: sign = 1; +ADDRLP4 12 +CNSTF4 1065353216 +ASGNF4 +line 863 +;863: break; +ADDRGP4 $233 +JUMPV +LABELV $236 +line 865 +;864: case '-': +;865: string++; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 866 +;866: sign = -1; +ADDRLP4 12 +CNSTF4 3212836864 +ASGNF4 +line 867 +;867: break; +ADDRGP4 $233 +JUMPV +LABELV $232 +line 869 +;868: default: +;869: sign = 1; +ADDRLP4 12 +CNSTF4 1065353216 +ASGNF4 +line 870 +;870: break; +LABELV $233 +line 874 +;871: } +;872: +;873: // read digits +;874: value = 0; +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +line 875 +;875: if ( string[0] != '.' ) { +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 46 +EQI4 $237 +LABELV $239 +line 876 +;876: do { +line 877 +;877: c = *string++; +ADDRLP4 24 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 24 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 24 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 878 +;878: if ( c < '0' || c > '9' ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +LTI4 $244 +ADDRLP4 0 +INDIRI4 +CNSTI4 57 +LEI4 $242 +LABELV $244 +line 879 +;879: break; +ADDRGP4 $241 +JUMPV +LABELV $242 +line 881 +;880: } +;881: c -= '0'; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +SUBI4 +ASGNI4 +line 882 +;882: value = value * 10 + c; +ADDRLP4 8 +CNSTF4 1092616192 +ADDRLP4 8 +INDIRF4 +MULF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 883 +;883: } while ( 1 ); +LABELV $240 +ADDRGP4 $239 +JUMPV +LABELV $241 +line 884 +;884: } +LABELV $237 +line 887 +;885: +;886: // check for decimal point +;887: if ( c == '.' ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 46 +NEI4 $245 +line 890 +;888: double fraction; +;889: +;890: fraction = 0.1; +ADDRLP4 24 +CNSTF4 1036831949 +ASGNF4 +LABELV $247 +line 891 +;891: do { +line 892 +;892: c = *string++; +ADDRLP4 28 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 28 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 28 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 893 +;893: if ( c < '0' || c > '9' ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +LTI4 $252 +ADDRLP4 0 +INDIRI4 +CNSTI4 57 +LEI4 $250 +LABELV $252 +line 894 +;894: break; +ADDRGP4 $249 +JUMPV +LABELV $250 +line 896 +;895: } +;896: c -= '0'; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +SUBI4 +ASGNI4 +line 897 +;897: value += c * fraction; +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ADDRLP4 24 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 898 +;898: fraction *= 0.1; +ADDRLP4 24 +CNSTF4 1036831949 +ADDRLP4 24 +INDIRF4 +MULF4 +ASGNF4 +line 899 +;899: } while ( 1 ); +LABELV $248 +ADDRGP4 $247 +JUMPV +LABELV $249 +line 901 +;900: +;901: } +LABELV $245 +line 904 +;902: +;903: // not handling 10e10 notation... +;904: *stringPtr = string; +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 906 +;905: +;906: return value * sign; +ADDRLP4 8 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +RETF4 +LABELV $226 +endproc _atof 36 0 +export atoi +proc atoi 28 0 +line 915 +;907:} +;908: +;909: +;910:// bk001120 - presumably needed for Mac +;911://#if !defined ( _MSC_VER ) && ! defined ( __linux__ ) +;912: +;913:// bk001127 - undid undo +;914:#if defined ( Q3_VM ) +;915:int atoi( const char *string ) { +ADDRGP4 $255 +JUMPV +LABELV $254 +line 922 +;916: int sign; +;917: int value; +;918: int c; +;919: +;920: +;921: // skip whitespace +;922: while ( *string <= ' ' ) { +line 923 +;923: if ( !*string ) { +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $257 +line 924 +;924: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $253 +JUMPV +LABELV $257 +line 926 +;925: } +;926: string++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 927 +;927: } +LABELV $255 +line 922 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 32 +LEI4 $254 +line 930 +;928: +;929: // check sign +;930: switch ( *string ) { +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 43 +EQI4 $262 +ADDRLP4 12 +INDIRI4 +CNSTI4 45 +EQI4 $263 +ADDRGP4 $259 +JUMPV +LABELV $262 +line 932 +;931: case '+': +;932: string++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 933 +;933: sign = 1; +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +line 934 +;934: break; +ADDRGP4 $260 +JUMPV +LABELV $263 +line 936 +;935: case '-': +;936: string++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 937 +;937: sign = -1; +ADDRLP4 8 +CNSTI4 -1 +ASGNI4 +line 938 +;938: break; +ADDRGP4 $260 +JUMPV +LABELV $259 +line 940 +;939: default: +;940: sign = 1; +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +line 941 +;941: break; +LABELV $260 +line 945 +;942: } +;943: +;944: // read digits +;945: value = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +LABELV $264 +line 946 +;946: do { +line 947 +;947: c = *string++; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 20 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 20 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 948 +;948: if ( c < '0' || c > '9' ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +LTI4 $269 +ADDRLP4 0 +INDIRI4 +CNSTI4 57 +LEI4 $267 +LABELV $269 +line 949 +;949: break; +ADDRGP4 $266 +JUMPV +LABELV $267 +line 951 +;950: } +;951: c -= '0'; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +SUBI4 +ASGNI4 +line 952 +;952: value = value * 10 + c; +ADDRLP4 4 +CNSTI4 10 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 953 +;953: } while ( 1 ); +LABELV $265 +ADDRGP4 $264 +JUMPV +LABELV $266 +line 957 +;954: +;955: // not handling 10e10 notation... +;956: +;957: return value * sign; +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +RETI4 +LABELV $253 +endproc atoi 28 0 +export _atoi +proc _atoi 32 0 +line 961 +;958:} +;959: +;960: +;961:int _atoi( const char **stringPtr ) { +line 967 +;962: int sign; +;963: int value; +;964: int c; +;965: const char *string; +;966: +;967: string = *stringPtr; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRGP4 $272 +JUMPV +LABELV $271 +line 970 +;968: +;969: // skip whitespace +;970: while ( *string <= ' ' ) { +line 971 +;971: if ( !*string ) { +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $274 +line 972 +;972: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $270 +JUMPV +LABELV $274 +line 974 +;973: } +;974: string++; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 975 +;975: } +LABELV $272 +line 970 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 32 +LEI4 $271 +line 978 +;976: +;977: // check sign +;978: switch ( *string ) { +ADDRLP4 16 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 43 +EQI4 $279 +ADDRLP4 16 +INDIRI4 +CNSTI4 45 +EQI4 $280 +ADDRGP4 $276 +JUMPV +LABELV $279 +line 980 +;979: case '+': +;980: string++; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 981 +;981: sign = 1; +ADDRLP4 12 +CNSTI4 1 +ASGNI4 +line 982 +;982: break; +ADDRGP4 $277 +JUMPV +LABELV $280 +line 984 +;983: case '-': +;984: string++; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 985 +;985: sign = -1; +ADDRLP4 12 +CNSTI4 -1 +ASGNI4 +line 986 +;986: break; +ADDRGP4 $277 +JUMPV +LABELV $276 +line 988 +;987: default: +;988: sign = 1; +ADDRLP4 12 +CNSTI4 1 +ASGNI4 +line 989 +;989: break; +LABELV $277 +line 993 +;990: } +;991: +;992: // read digits +;993: value = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +LABELV $281 +line 994 +;994: do { +line 995 +;995: c = *string++; +ADDRLP4 24 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 24 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 24 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 996 +;996: if ( c < '0' || c > '9' ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +LTI4 $286 +ADDRLP4 0 +INDIRI4 +CNSTI4 57 +LEI4 $284 +LABELV $286 +line 997 +;997: break; +ADDRGP4 $283 +JUMPV +LABELV $284 +line 999 +;998: } +;999: c -= '0'; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 48 +SUBI4 +ASGNI4 +line 1000 +;1000: value = value * 10 + c; +ADDRLP4 8 +CNSTI4 10 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 1001 +;1001: } while ( 1 ); +LABELV $282 +ADDRGP4 $281 +JUMPV +LABELV $283 +line 1005 +;1002: +;1003: // not handling 10e10 notation... +;1004: +;1005: *stringPtr = string; +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 1007 +;1006: +;1007: return value * sign; +ADDRLP4 8 +INDIRI4 +ADDRLP4 12 +INDIRI4 +MULI4 +RETI4 +LABELV $270 +endproc _atoi 32 0 +export abs +proc abs 4 0 +line 1010 +;1008:} +;1009: +;1010:int abs( int n ) { +line 1011 +;1011: return n < 0 ? -n : n; +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +GEI4 $289 +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +NEGI4 +ASGNI4 +ADDRGP4 $290 +JUMPV +LABELV $289 +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +LABELV $290 +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $287 +endproc abs 4 0 +export fabs +proc fabs 4 0 +line 1014 +;1012:} +;1013: +;1014:double fabs( double x ) { +line 1015 +;1015: return x < 0 ? -x : x; +ADDRFP4 0 +INDIRF4 +CNSTF4 0 +GEF4 $293 +ADDRLP4 0 +ADDRFP4 0 +INDIRF4 +NEGF4 +ASGNF4 +ADDRGP4 $294 +JUMPV +LABELV $293 +ADDRLP4 0 +ADDRFP4 0 +INDIRF4 +ASGNF4 +LABELV $294 +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $291 +endproc fabs 4 0 +export AddInt +proc AddInt 56 0 +line 1037 +;1016:} +;1017: +;1018: +;1019: +;1020://========================================================= +;1021: +;1022: +;1023:#define ALT 0x00000001 /* alternate form */ +;1024:#define HEXPREFIX 0x00000002 /* add 0x or 0X prefix */ +;1025:#define LADJUST 0x00000004 /* left adjustment */ +;1026:#define LONGDBL 0x00000008 /* long double */ +;1027:#define LONGINT 0x00000010 /* long integer */ +;1028:#define QUADINT 0x00000020 /* quad integer */ +;1029:#define SHORTINT 0x00000040 /* short integer */ +;1030:#define ZEROPAD 0x00000080 /* zero (as opposed to blank) pad */ +;1031:#define FPT 0x00000100 /* floating point number */ +;1032: +;1033:#define to_digit(c) ((c) - '0') +;1034:#define is_digit(c) ((unsigned)to_digit(c) <= 9) +;1035:#define to_char(n) ((n) + '0') +;1036: +;1037:void AddInt( char **buf_p, int val, int width, int flags ) { +line 1043 +;1038: char text[32]; +;1039: int digits; +;1040: int signedVal; +;1041: char *buf; +;1042: +;1043: digits = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 1044 +;1044: signedVal = val; +ADDRLP4 40 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 1045 +;1045: if ( val < 0 ) { +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +GEI4 $296 +line 1046 +;1046: val = -val; +ADDRFP4 4 +ADDRFP4 4 +INDIRI4 +NEGI4 +ASGNI4 +line 1047 +;1047: } +LABELV $296 +LABELV $298 +line 1048 +;1048: do { +line 1049 +;1049: text[digits++] = '0' + val % 10; +ADDRLP4 44 +ADDRLP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 44 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 8 +ADDP4 +ADDRFP4 4 +INDIRI4 +CNSTI4 10 +MODI4 +CNSTI4 48 +ADDI4 +CVII1 4 +ASGNI1 +line 1050 +;1050: val /= 10; +ADDRFP4 4 +ADDRFP4 4 +INDIRI4 +CNSTI4 10 +DIVI4 +ASGNI4 +line 1051 +;1051: } while ( val ); +LABELV $299 +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $298 +line 1053 +;1052: +;1053: if ( signedVal < 0 ) { +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +GEI4 $301 +line 1054 +;1054: text[digits++] = '-'; +ADDRLP4 44 +ADDRLP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 44 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 8 +ADDP4 +CNSTI1 45 +ASGNI1 +line 1055 +;1055: } +LABELV $301 +line 1057 +;1056: +;1057: buf = *buf_p; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1059 +;1058: +;1059: if( !( flags & LADJUST ) ) { +ADDRFP4 12 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +NEI4 $312 +ADDRGP4 $306 +JUMPV +LABELV $305 +line 1060 +;1060: while ( digits < width ) { +line 1061 +;1061: *buf++ = ( flags & ZEROPAD ) ? '0' : ' '; +ADDRLP4 48 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 48 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRFP4 12 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $309 +ADDRLP4 44 +CNSTI4 48 +ASGNI4 +ADDRGP4 $310 +JUMPV +LABELV $309 +ADDRLP4 44 +CNSTI4 32 +ASGNI4 +LABELV $310 +ADDRLP4 48 +INDIRP4 +ADDRLP4 44 +INDIRI4 +CVII1 4 +ASGNI1 +line 1062 +;1062: width--; +ADDRFP4 8 +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1063 +;1063: } +LABELV $306 +line 1060 +ADDRLP4 0 +INDIRI4 +ADDRFP4 8 +INDIRI4 +LTI4 $305 +line 1064 +;1064: } +ADDRGP4 $312 +JUMPV +LABELV $311 +line 1066 +;1065: +;1066: while ( digits-- ) { +line 1067 +;1067: *buf++ = text[digits]; +ADDRLP4 44 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 44 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +ADDP4 +INDIRI1 +ASGNI1 +line 1068 +;1068: width--; +ADDRFP4 8 +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1069 +;1069: } +LABELV $312 +line 1066 +ADDRLP4 44 +ADDRLP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 44 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +NEI4 $311 +line 1071 +;1070: +;1071: if( flags & LADJUST ) { +ADDRFP4 12 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $314 +ADDRGP4 $317 +JUMPV +LABELV $316 +line 1072 +;1072: while ( width-- ) { +line 1073 +;1073: *buf++ = ( flags & ZEROPAD ) ? '0' : ' '; +ADDRLP4 52 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 52 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRFP4 12 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $320 +ADDRLP4 48 +CNSTI4 48 +ASGNI4 +ADDRGP4 $321 +JUMPV +LABELV $320 +ADDRLP4 48 +CNSTI4 32 +ASGNI4 +LABELV $321 +ADDRLP4 52 +INDIRP4 +ADDRLP4 48 +INDIRI4 +CVII1 4 +ASGNI1 +line 1074 +;1074: } +LABELV $317 +line 1072 +ADDRLP4 48 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRFP4 8 +ADDRLP4 48 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +NEI4 $316 +line 1075 +;1075: } +LABELV $314 +line 1077 +;1076: +;1077: *buf_p = buf; +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 1078 +;1078:} +LABELV $295 +endproc AddInt 56 0 +export AddFloat +proc AddFloat 60 0 +line 1080 +;1079: +;1080:void AddFloat( char **buf_p, float fval, int width, int prec ) { +line 1088 +;1081: char text[32]; +;1082: int digits; +;1083: float signedVal; +;1084: char *buf; +;1085: int val; +;1086: +;1087: // get the sign +;1088: signedVal = fval; +ADDRLP4 44 +ADDRFP4 4 +INDIRF4 +ASGNF4 +line 1089 +;1089: if ( fval < 0 ) { +ADDRFP4 4 +INDIRF4 +CNSTF4 0 +GEF4 $323 +line 1090 +;1090: fval = -fval; +ADDRFP4 4 +ADDRFP4 4 +INDIRF4 +NEGF4 +ASGNF4 +line 1091 +;1091: } +LABELV $323 +line 1094 +;1092: +;1093: // write the float number +;1094: digits = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 1095 +;1095: val = (int)fval; +ADDRLP4 4 +ADDRFP4 4 +INDIRF4 +CVFI4 4 +ASGNI4 +LABELV $325 +line 1096 +;1096: do { +line 1097 +;1097: text[digits++] = '0' + val % 10; +ADDRLP4 48 +ADDRLP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 48 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 8 +ADDP4 +ADDRLP4 4 +INDIRI4 +CNSTI4 10 +MODI4 +CNSTI4 48 +ADDI4 +CVII1 4 +ASGNI1 +line 1098 +;1098: val /= 10; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 10 +DIVI4 +ASGNI4 +line 1099 +;1099: } while ( val ); +LABELV $326 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $325 +line 1101 +;1100: +;1101: if ( signedVal < 0 ) { +ADDRLP4 44 +INDIRF4 +CNSTF4 0 +GEF4 $328 +line 1102 +;1102: text[digits++] = '-'; +ADDRLP4 48 +ADDRLP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 48 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 8 +ADDP4 +CNSTI1 45 +ASGNI1 +line 1103 +;1103: } +LABELV $328 +line 1105 +;1104: +;1105: buf = *buf_p; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRGP4 $331 +JUMPV +LABELV $330 +line 1107 +;1106: +;1107: while ( digits < width ) { +line 1108 +;1108: *buf++ = ' '; +ADDRLP4 48 +ADDRLP4 40 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 48 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +CNSTI1 32 +ASGNI1 +line 1109 +;1109: width--; +ADDRFP4 8 +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1110 +;1110: } +LABELV $331 +line 1107 +ADDRLP4 0 +INDIRI4 +ADDRFP4 8 +INDIRI4 +LTI4 $330 +ADDRGP4 $334 +JUMPV +LABELV $333 +line 1112 +;1111: +;1112: while ( digits-- ) { +line 1113 +;1113: *buf++ = text[digits]; +ADDRLP4 48 +ADDRLP4 40 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 48 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +ADDP4 +INDIRI1 +ASGNI1 +line 1114 +;1114: } +LABELV $334 +line 1112 +ADDRLP4 48 +ADDRLP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 48 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +NEI4 $333 +line 1116 +;1115: +;1116: *buf_p = buf; +ADDRFP4 0 +INDIRP4 +ADDRLP4 40 +INDIRP4 +ASGNP4 +line 1118 +;1117: +;1118: if (prec < 0) +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +GEI4 $336 +line 1119 +;1119: prec = 6; +ADDRFP4 12 +CNSTI4 6 +ASGNI4 +LABELV $336 +line 1121 +;1120: // write the fraction +;1121: digits = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $339 +JUMPV +LABELV $338 +line 1122 +;1122: while (digits < prec) { +line 1123 +;1123: fval -= (int) fval; +ADDRLP4 52 +ADDRFP4 4 +INDIRF4 +ASGNF4 +ADDRFP4 4 +ADDRLP4 52 +INDIRF4 +ADDRLP4 52 +INDIRF4 +CVFI4 4 +CVIF4 4 +SUBF4 +ASGNF4 +line 1124 +;1124: fval *= 10.0; +ADDRFP4 4 +CNSTF4 1092616192 +ADDRFP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1125 +;1125: val = (int) fval; +ADDRLP4 4 +ADDRFP4 4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 1126 +;1126: text[digits++] = '0' + val % 10; +ADDRLP4 56 +ADDRLP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 56 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +ADDRLP4 8 +ADDP4 +ADDRLP4 4 +INDIRI4 +CNSTI4 10 +MODI4 +CNSTI4 48 +ADDI4 +CVII1 4 +ASGNI1 +line 1127 +;1127: } +LABELV $339 +line 1122 +ADDRLP4 0 +INDIRI4 +ADDRFP4 12 +INDIRI4 +LTI4 $338 +line 1129 +;1128: +;1129: if (digits > 0) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LEI4 $341 +line 1130 +;1130: buf = *buf_p; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1131 +;1131: *buf++ = '.'; +ADDRLP4 52 +ADDRLP4 40 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 52 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI1 46 +ASGNI1 +line 1132 +;1132: for (prec = 0; prec < digits; prec++) { +ADDRFP4 12 +CNSTI4 0 +ASGNI4 +ADDRGP4 $346 +JUMPV +LABELV $343 +line 1133 +;1133: *buf++ = text[prec]; +ADDRLP4 56 +ADDRLP4 40 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 56 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRFP4 12 +INDIRI4 +ADDRLP4 8 +ADDP4 +INDIRI1 +ASGNI1 +line 1134 +;1134: } +LABELV $344 +line 1132 +ADDRFP4 12 +ADDRFP4 12 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $346 +ADDRFP4 12 +INDIRI4 +ADDRLP4 0 +INDIRI4 +LTI4 $343 +line 1135 +;1135: *buf_p = buf; +ADDRFP4 0 +INDIRP4 +ADDRLP4 40 +INDIRP4 +ASGNP4 +line 1136 +;1136: } +LABELV $341 +line 1137 +;1137:} +LABELV $322 +endproc AddFloat 60 0 +export AddString +proc AddString 20 4 +line 1140 +;1138: +;1139: +;1140:void AddString( char **buf_p, char *string, int width, int prec ) { +line 1144 +;1141: int size; +;1142: char *buf; +;1143: +;1144: buf = *buf_p; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1146 +;1145: +;1146: if ( string == NULL ) { +ADDRFP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $348 +line 1147 +;1147: string = "(null)"; +ADDRFP4 4 +ADDRGP4 $350 +ASGNP4 +line 1148 +;1148: prec = -1; +ADDRFP4 12 +CNSTI4 -1 +ASGNI4 +line 1149 +;1149: } +LABELV $348 +line 1151 +;1150: +;1151: if ( prec >= 0 ) { +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +LTI4 $351 +line 1152 +;1152: for( size = 0; size < prec; size++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $356 +JUMPV +LABELV $353 +line 1153 +;1153: if( string[size] == '\0' ) { +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $357 +line 1154 +;1154: break; +ADDRGP4 $352 +JUMPV +LABELV $357 +line 1156 +;1155: } +;1156: } +LABELV $354 +line 1152 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $356 +ADDRLP4 0 +INDIRI4 +ADDRFP4 12 +INDIRI4 +LTI4 $353 +line 1157 +;1157: } +ADDRGP4 $352 +JUMPV +LABELV $351 +line 1158 +;1158: else { +line 1159 +;1159: size = strlen( string ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 1160 +;1160: } +LABELV $352 +line 1162 +;1161: +;1162: width -= size; +ADDRFP4 8 +ADDRFP4 8 +INDIRI4 +ADDRLP4 0 +INDIRI4 +SUBI4 +ASGNI4 +ADDRGP4 $360 +JUMPV +LABELV $359 +line 1164 +;1163: +;1164: while( size-- ) { +line 1165 +;1165: *buf++ = *string++; +ADDRLP4 8 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTI4 1 +ASGNI4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI1 +ASGNI1 +line 1166 +;1166: } +LABELV $360 +line 1164 +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $359 +ADDRGP4 $363 +JUMPV +LABELV $362 +line 1168 +;1167: +;1168: while( width-- > 0 ) { +line 1169 +;1169: *buf++ = ' '; +ADDRLP4 12 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 12 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI1 32 +ASGNI1 +line 1170 +;1170: } +LABELV $363 +line 1168 +ADDRLP4 12 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRFP4 8 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +GTI4 $362 +line 1172 +;1171: +;1172: *buf_p = buf; +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 1173 +;1173:} +LABELV $347 +endproc AddString 20 4 +export vsprintf +proc vsprintf 72 16 +line 1183 +;1174: +;1175:/* +;1176:vsprintf +;1177: +;1178:I'm not going to support a bunch of the more arcane stuff in here +;1179:just to keep it simpler. For example, the '*' and '$' are not +;1180:currently supported. I've tried to make it so that it will just +;1181:parse and ignore formats we don't support. +;1182:*/ +;1183:int vsprintf( char *buffer, const char *fmt, va_list argptr ) { +line 1193 +;1184: int *arg; +;1185: char *buf_p; +;1186: char ch; +;1187: int flags; +;1188: int width; +;1189: int prec; +;1190: int n; +;1191: char sign; +;1192: +;1193: buf_p = buffer; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 1194 +;1194: arg = (int *)argptr; +ADDRLP4 24 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRGP4 $367 +JUMPV +LABELV $366 +line 1196 +;1195: +;1196: while( qtrue ) { +line 1198 +;1197: // run through the format string until we hit a '%' or '\0' +;1198: for ( ch = *fmt; (ch = *fmt) != '\0' && ch != '%'; fmt++ ) { +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +INDIRI1 +ASGNI1 +ADDRGP4 $372 +JUMPV +LABELV $369 +line 1199 +;1199: *buf_p++ = ch; +ADDRLP4 32 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 32 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 0 +INDIRI1 +ASGNI1 +line 1200 +;1200: } +LABELV $370 +line 1198 +ADDRFP4 4 +ADDRFP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +LABELV $372 +ADDRLP4 29 +ADDRFP4 4 +INDIRP4 +INDIRI1 +ASGNI1 +ADDRLP4 0 +ADDRLP4 29 +INDIRI1 +ASGNI1 +ADDRLP4 29 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $373 +ADDRLP4 0 +INDIRI1 +CVII4 1 +CNSTI4 37 +NEI4 $369 +LABELV $373 +line 1201 +;1201: if ( ch == '\0' ) { +ADDRLP4 0 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $374 +line 1202 +;1202: goto done; +ADDRGP4 $376 +JUMPV +LABELV $374 +line 1206 +;1203: } +;1204: +;1205: // skip over the '%' +;1206: fmt++; +ADDRFP4 4 +ADDRFP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 1209 +;1207: +;1208: // reset formatting state +;1209: flags = 0; +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +line 1210 +;1210: width = 0; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 1211 +;1211: prec = -1; +ADDRLP4 20 +CNSTI4 -1 +ASGNI4 +line 1212 +;1212: sign = '\0'; +ADDRLP4 28 +CNSTI1 0 +ASGNI1 +LABELV $377 +line 1215 +;1213: +;1214:rflag: +;1215: ch = *fmt++; +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 4 +ADDRLP4 32 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 32 +INDIRP4 +INDIRI1 +ASGNI1 +LABELV $378 +line 1217 +;1216:reswitch: +;1217: switch( ch ) { +ADDRLP4 36 +ADDRLP4 0 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 99 +LTI4 $400 +ADDRLP4 36 +INDIRI4 +CNSTI4 105 +GTI4 $401 +ADDRLP4 36 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $402-396 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $402 +address $395 +address $396 +address $379 +address $397 +address $379 +address $379 +address $396 +code +LABELV $400 +ADDRLP4 36 +INDIRI4 +CNSTI4 37 +LTI4 $379 +ADDRLP4 36 +INDIRI4 +CNSTI4 57 +GTI4 $379 +ADDRLP4 36 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $404-148 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $404 +address $399 +address $379 +address $379 +address $379 +address $379 +address $379 +address $379 +address $379 +address $382 +address $383 +address $379 +address $390 +address $391 +address $391 +address $391 +address $391 +address $391 +address $391 +address $391 +address $391 +address $391 +code +LABELV $401 +ADDRLP4 36 +INDIRI4 +CNSTI4 115 +EQI4 $398 +ADDRGP4 $379 +JUMPV +LABELV $382 +line 1219 +;1218: case '-': +;1219: flags |= LADJUST; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +CNSTI4 4 +BORI4 +ASGNI4 +line 1220 +;1220: goto rflag; +ADDRGP4 $377 +JUMPV +LABELV $383 +line 1222 +;1221: case '.': +;1222: n = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRGP4 $385 +JUMPV +LABELV $384 +line 1223 +;1223: while( is_digit( ( ch = *fmt++ ) ) ) { +line 1224 +;1224: n = 10 * n + ( ch - '0' ); +ADDRLP4 8 +CNSTI4 10 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRI1 +CVII4 1 +CNSTI4 48 +SUBI4 +ADDI4 +ASGNI4 +line 1225 +;1225: } +LABELV $385 +line 1223 +ADDRLP4 48 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 4 +ADDRLP4 48 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 52 +ADDRLP4 48 +INDIRP4 +INDIRI1 +ASGNI1 +ADDRLP4 0 +ADDRLP4 52 +INDIRI1 +ASGNI1 +ADDRLP4 52 +INDIRI1 +CVII4 1 +CNSTI4 48 +SUBI4 +CVIU4 4 +CNSTU4 9 +LEU4 $384 +line 1226 +;1226: prec = n < 0 ? -1 : n; +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +GEI4 $388 +ADDRLP4 56 +CNSTI4 -1 +ASGNI4 +ADDRGP4 $389 +JUMPV +LABELV $388 +ADDRLP4 56 +ADDRLP4 8 +INDIRI4 +ASGNI4 +LABELV $389 +ADDRLP4 20 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 1227 +;1227: goto reswitch; +ADDRGP4 $378 +JUMPV +LABELV $390 +line 1229 +;1228: case '0': +;1229: flags |= ZEROPAD; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +CNSTI4 128 +BORI4 +ASGNI4 +line 1230 +;1230: goto rflag; +ADDRGP4 $377 +JUMPV +LABELV $391 +line 1240 +;1231: case '1': +;1232: case '2': +;1233: case '3': +;1234: case '4': +;1235: case '5': +;1236: case '6': +;1237: case '7': +;1238: case '8': +;1239: case '9': +;1240: n = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +LABELV $392 +line 1241 +;1241: do { +line 1242 +;1242: n = 10 * n + ( ch - '0' ); +ADDRLP4 8 +CNSTI4 10 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRI1 +CVII4 1 +CNSTI4 48 +SUBI4 +ADDI4 +ASGNI4 +line 1243 +;1243: ch = *fmt++; +ADDRLP4 60 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 4 +ADDRLP4 60 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 60 +INDIRP4 +INDIRI1 +ASGNI1 +line 1244 +;1244: } while( is_digit( ch ) ); +LABELV $393 +ADDRLP4 0 +INDIRI1 +CVII4 1 +CNSTI4 48 +SUBI4 +CVIU4 4 +CNSTU4 9 +LEU4 $392 +line 1245 +;1245: width = n; +ADDRLP4 12 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 1246 +;1246: goto reswitch; +ADDRGP4 $378 +JUMPV +LABELV $395 +line 1248 +;1247: case 'c': +;1248: *buf_p++ = (char)*arg; +ADDRLP4 60 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 60 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CVII1 4 +ASGNI1 +line 1249 +;1249: arg++; +ADDRLP4 24 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +line 1250 +;1250: break; +ADDRGP4 $380 +JUMPV +LABELV $396 +line 1253 +;1251: case 'd': +;1252: case 'i': +;1253: AddInt( &buf_p, *arg, width, flags ); +ADDRLP4 4 +ARGP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 AddInt +CALLV +pop +line 1254 +;1254: arg++; +ADDRLP4 24 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +line 1255 +;1255: break; +ADDRGP4 $380 +JUMPV +LABELV $397 +line 1257 +;1256: case 'f': +;1257: AddFloat( &buf_p, *(double *)arg, width, prec ); +ADDRLP4 4 +ARGP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 AddFloat +CALLV +pop +line 1259 +;1258:#ifdef __LCC__ +;1259: arg += 1; // everything is 32 bit in my compiler +ADDRLP4 24 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +line 1263 +;1260:#else +;1261: arg += 2; +;1262:#endif +;1263: break; +ADDRGP4 $380 +JUMPV +LABELV $398 +line 1265 +;1264: case 's': +;1265: AddString( &buf_p, (char *)*arg, width, prec ); +ADDRLP4 4 +ARGP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CVIU4 4 +CVUP4 4 +ARGP4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 AddString +CALLV +pop +line 1266 +;1266: arg++; +ADDRLP4 24 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +line 1267 +;1267: break; +ADDRGP4 $380 +JUMPV +LABELV $399 +line 1269 +;1268: case '%': +;1269: *buf_p++ = ch; +ADDRLP4 64 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 64 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 0 +INDIRI1 +ASGNI1 +line 1270 +;1270: break; +ADDRGP4 $380 +JUMPV +LABELV $379 +line 1272 +;1271: default: +;1272: *buf_p++ = (char)*arg; +ADDRLP4 68 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 68 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CVII1 4 +ASGNI1 +line 1273 +;1273: arg++; +ADDRLP4 24 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +line 1274 +;1274: break; +LABELV $380 +line 1276 +;1275: } +;1276: } +LABELV $367 +line 1196 +ADDRGP4 $366 +JUMPV +LABELV $376 +line 1279 +;1277: +;1278:done: +;1279: *buf_p = 0; +ADDRLP4 4 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1280 +;1280: return buf_p - buffer; +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +RETI4 +LABELV $365 +endproc vsprintf 72 16 +export sscanf +proc sscanf 28 4 +line 1285 +;1281:} +;1282: +;1283: +;1284:/* this is really crappy */ +;1285:int sscanf( const char *buffer, const char *fmt, ... ) { +line 1290 +;1286: int cmd; +;1287: int **arg; +;1288: int count; +;1289: +;1290: arg = (int **)&fmt + 1; +ADDRLP4 4 +ADDRFP4 4+4 +ASGNP4 +line 1291 +;1291: count = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRGP4 $409 +JUMPV +LABELV $408 +line 1293 +;1292: +;1293: while ( *fmt ) { +line 1294 +;1294: if ( fmt[0] != '%' ) { +ADDRFP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 37 +EQI4 $411 +line 1295 +;1295: fmt++; +ADDRFP4 4 +ADDRFP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 1296 +;1296: continue; +ADDRGP4 $409 +JUMPV +LABELV $411 +line 1299 +;1297: } +;1298: +;1299: cmd = fmt[1]; +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 1300 +;1300: fmt += 2; +ADDRFP4 4 +ADDRFP4 4 +INDIRP4 +CNSTI4 2 +ADDP4 +ASGNP4 +line 1302 +;1301: +;1302: switch ( cmd ) { +ADDRLP4 16 +CNSTI4 100 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $415 +ADDRLP4 0 +INDIRI4 +CNSTI4 102 +EQI4 $416 +ADDRLP4 0 +INDIRI4 +CNSTI4 105 +EQI4 $415 +ADDRLP4 0 +INDIRI4 +ADDRLP4 16 +INDIRI4 +LTI4 $413 +LABELV $417 +ADDRLP4 0 +INDIRI4 +CNSTI4 117 +EQI4 $415 +ADDRGP4 $413 +JUMPV +LABELV $415 +line 1306 +;1303: case 'i': +;1304: case 'd': +;1305: case 'u': +;1306: **arg = _atoi( &buffer ); +ADDRFP4 0 +ARGP4 +ADDRLP4 20 +ADDRGP4 _atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 1307 +;1307: break; +ADDRGP4 $414 +JUMPV +LABELV $416 +line 1309 +;1308: case 'f': +;1309: *(float *)*arg = _atof( &buffer ); +ADDRFP4 0 +ARGP4 +ADDRLP4 24 +ADDRGP4 _atof +CALLF4 +ASGNF4 +ADDRLP4 4 +INDIRP4 +INDIRP4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 1310 +;1310: break; +LABELV $413 +LABELV $414 +line 1312 +;1311: } +;1312: arg++; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +line 1313 +;1313: } +LABELV $409 +line 1293 +ADDRFP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $408 +line 1315 +;1314: +;1315: return count; +ADDRLP4 8 +INDIRI4 +RETI4 +LABELV $406 +endproc sscanf 28 4 +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import strncpy +lit +align 1 +LABELV $350 +char 1 40 +char 1 110 +char 1 117 +char 1 108 +char 1 108 +char 1 41 +char 1 0 diff --git a/code/cgame/vm/bg_misc.asm b/code/cgame/vm/bg_misc.asm new file mode 100644 index 0000000..aee7bef --- /dev/null +++ b/code/cgame/vm/bg_misc.asm @@ -0,0 +1,16831 @@ +data +export forceMasteryLevels +align 4 +LABELV forceMasteryLevels +address $120 +address $121 +address $122 +address $123 +address $124 +address $125 +address $126 +address $127 +export forceMasteryPoints +align 4 +LABELV forceMasteryPoints +byte 4 0 +byte 4 5 +byte 4 10 +byte 4 20 +byte 4 30 +byte 4 50 +byte 4 75 +byte 4 100 +export bgForcePowerCost +align 4 +LABELV bgForcePowerCost +byte 4 0 +byte 4 2 +byte 4 4 +byte 4 6 +byte 4 0 +byte 4 0 +byte 4 2 +byte 4 6 +byte 4 0 +byte 4 2 +byte 4 4 +byte 4 6 +byte 4 0 +byte 4 1 +byte 4 3 +byte 4 6 +byte 4 0 +byte 4 1 +byte 4 3 +byte 4 6 +byte 4 0 +byte 4 4 +byte 4 6 +byte 4 8 +byte 4 0 +byte 4 1 +byte 4 3 +byte 4 6 +byte 4 0 +byte 4 2 +byte 4 5 +byte 4 8 +byte 4 0 +byte 4 4 +byte 4 6 +byte 4 8 +byte 4 0 +byte 4 2 +byte 4 5 +byte 4 8 +byte 4 0 +byte 4 1 +byte 4 3 +byte 4 6 +byte 4 0 +byte 4 1 +byte 4 3 +byte 4 6 +byte 4 0 +byte 4 1 +byte 4 3 +byte 4 6 +byte 4 0 +byte 4 2 +byte 4 4 +byte 4 6 +byte 4 0 +byte 4 2 +byte 4 5 +byte 4 8 +byte 4 0 +byte 4 1 +byte 4 5 +byte 4 8 +byte 4 0 +byte 4 1 +byte 4 5 +byte 4 8 +byte 4 0 +byte 4 4 +byte 4 6 +byte 4 8 +export forcePowerSorted +align 4 +LABELV forcePowerSorted +byte 4 5 +byte 4 0 +byte 4 10 +byte 4 9 +byte 4 11 +byte 4 1 +byte 4 2 +byte 4 3 +byte 4 4 +byte 4 14 +byte 4 7 +byte 4 13 +byte 4 8 +byte 4 6 +byte 4 12 +byte 4 15 +byte 4 16 +byte 4 17 +export forcePowerDarkLight +align 4 +LABELV forcePowerDarkLight +byte 4 1 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 1 +byte 4 2 +byte 4 2 +byte 4 2 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 2 +byte 4 2 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +export WeaponReadyAnim +align 4 +LABELV WeaponReadyAnim +byte 4 1091 +byte 4 1101 +byte 4 573 +byte 4 1100 +byte 4 1101 +byte 4 1101 +byte 4 1101 +byte 4 1101 +byte 4 1101 +byte 4 1101 +byte 4 1101 +byte 4 1108 +byte 4 1108 +byte 4 1108 +byte 4 571 +byte 4 1099 +export WeaponAttackAnim +align 4 +LABELV WeaponAttackAnim +byte 4 117 +byte 4 120 +byte 4 573 +byte 4 118 +byte 4 120 +byte 4 120 +byte 4 120 +byte 4 120 +byte 4 120 +byte 4 120 +byte 4 120 +byte 4 137 +byte 4 120 +byte 4 120 +byte 4 571 +byte 4 117 +export BG_LegalizedForcePowers +code +proc BG_LegalizedForcePowers 436 12 +file "../../game/bg_misc.c" +line 177 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// bg_misc.c -- both games misc functions, all completely stateless +;4: +;5:#include "q_shared.h" +;6:#include "bg_public.h" +;7: +;8:#ifdef QAGAME +;9:#include "g_local.h" +;10:#endif +;11: +;12:#ifdef UI_EXPORTS +;13:#include "../ui/ui_local.h" +;14:#endif +;15: +;16:#ifndef UI_EXPORTS +;17:#ifndef QAGAME +;18:#include "../cgame/cg_local.h" +;19:#endif +;20:#endif +;21: +;22://rww - not putting @ in front of these because +;23://we don't need them in a cgame striped lookup. +;24://Let me know if this causes problems, pat. +;25:char *forceMasteryLevels[NUM_FORCE_MASTERY_LEVELS] = +;26:{ +;27: "MASTERY0", //"Uninitiated", // FORCE_MASTERY_UNINITIATED, +;28: "MASTERY1", //"Initiate", // FORCE_MASTERY_INITIATE, +;29: "MASTERY2", //"Padawan", // FORCE_MASTERY_PADAWAN, +;30: "MASTERY3", //"Jedi", // FORCE_MASTERY_JEDI, +;31: "MASTERY4", //"Jedi Adept", // FORCE_MASTERY_JEDI_GUARDIAN, +;32: "MASTERY5", //"Jedi Guardian", // FORCE_MASTERY_JEDI_ADEPT, +;33: "MASTERY6", //"Jedi Knight", // FORCE_MASTERY_JEDI_KNIGHT, +;34: "MASTERY7", //"Jedi Master" // FORCE_MASTERY_JEDI_MASTER, +;35:}; +;36: +;37:int forceMasteryPoints[NUM_FORCE_MASTERY_LEVELS] = +;38:{ +;39: 0, // FORCE_MASTERY_UNINITIATED, +;40: 5, // FORCE_MASTERY_INITIATE, +;41: 10, // FORCE_MASTERY_PADAWAN, +;42: 20, // FORCE_MASTERY_JEDI, +;43: 30, // FORCE_MASTERY_JEDI_GUARDIAN, +;44: 50, // FORCE_MASTERY_JEDI_ADEPT, +;45: 75, // FORCE_MASTERY_JEDI_KNIGHT, +;46: 100 // FORCE_MASTERY_JEDI_MASTER, +;47:}; +;48: +;49:int bgForcePowerCost[NUM_FORCE_POWERS][NUM_FORCE_POWER_LEVELS] = //0 == neutral +;50:{ +;51: { 0, 2, 4, 6 }, // Heal // FP_HEAL +;52: { 0, 0, 2, 6 }, // Jump //FP_LEVITATION,//hold/duration +;53: { 0, 2, 4, 6 }, // Speed //FP_SPEED,//duration +;54: { 0, 1, 3, 6 }, // Push //FP_PUSH,//hold/duration +;55: { 0, 1, 3, 6 }, // Pull //FP_PULL,//hold/duration +;56: { 0, 4, 6, 8 }, // Mind Trick //FP_TELEPATHY,//instant +;57: { 0, 1, 3, 6 }, // Grip //FP_GRIP,//hold/duration +;58: { 0, 2, 5, 8 }, // Lightning //FP_LIGHTNING,//hold/duration +;59: { 0, 4, 6, 8 }, // Dark Rage //FP_RAGE,//duration +;60: { 0, 2, 5, 8 }, // Protection //FP_PROTECT,//duration +;61: { 0, 1, 3, 6 }, // Absorb //FP_ABSORB,//duration +;62: { 0, 1, 3, 6 }, // Team Heal //FP_TEAM_HEAL,//instant +;63: { 0, 1, 3, 6 }, // Team Force //FP_TEAM_FORCE,//instant +;64: { 0, 2, 4, 6 }, // Drain //FP_DRAIN,//hold/duration +;65: { 0, 2, 5, 8 }, // Sight //FP_SEE,//duration +;66: { 0, 1, 5, 8 }, // Saber Attack //FP_SABERATTACK, +;67: { 0, 1, 5, 8 }, // Saber Defend //FP_SABERDEFEND, +;68: { 0, 4, 6, 8 } // Saber Throw //FP_SABERTHROW, +;69: //NUM_FORCE_POWERS +;70:}; +;71: +;72:int forcePowerSorted[NUM_FORCE_POWERS] = +;73:{ //rww - always use this order when drawing force powers for any reason +;74: FP_TELEPATHY, +;75: FP_HEAL, +;76: FP_ABSORB, +;77: FP_PROTECT, +;78: FP_TEAM_HEAL, +;79: FP_LEVITATION, +;80: FP_SPEED, +;81: FP_PUSH, +;82: FP_PULL, +;83: FP_SEE, +;84: FP_LIGHTNING, +;85: FP_DRAIN, +;86: FP_RAGE, +;87: FP_GRIP, +;88: FP_TEAM_FORCE, +;89: FP_SABERATTACK, +;90: FP_SABERDEFEND, +;91: FP_SABERTHROW +;92:}; +;93: +;94:int forcePowerDarkLight[NUM_FORCE_POWERS] = //0 == neutral +;95:{ //nothing should be usable at rank 0.. +;96: FORCE_LIGHTSIDE,//FP_HEAL,//instant +;97: 0,//FP_LEVITATION,//hold/duration +;98: 0,//FP_SPEED,//duration +;99: 0,//FP_PUSH,//hold/duration +;100: 0,//FP_PULL,//hold/duration +;101: FORCE_LIGHTSIDE,//FP_TELEPATHY,//instant +;102: FORCE_DARKSIDE,//FP_GRIP,//hold/duration +;103: FORCE_DARKSIDE,//FP_LIGHTNING,//hold/duration +;104: FORCE_DARKSIDE,//FP_RAGE,//duration +;105: FORCE_LIGHTSIDE,//FP_PROTECT,//duration +;106: FORCE_LIGHTSIDE,//FP_ABSORB,//duration +;107: FORCE_LIGHTSIDE,//FP_TEAM_HEAL,//instant +;108: FORCE_DARKSIDE,//FP_TEAM_FORCE,//instant +;109: FORCE_DARKSIDE,//FP_DRAIN,//hold/duration +;110: 0,//FP_SEE,//duration +;111: 0,//FP_SABERATTACK, +;112: 0,//FP_SABERDEFEND, +;113: 0//FP_SABERTHROW, +;114: //NUM_FORCE_POWERS +;115:}; +;116: +;117:int WeaponReadyAnim[WP_NUM_WEAPONS] = +;118:{ +;119: TORSO_DROPWEAP1,//WP_NONE, +;120: +;121: TORSO_WEAPONREADY3,//WP_STUN_BATON, +;122: BOTH_STAND2,//WP_SABER, +;123: TORSO_WEAPONREADY2,//WP_BRYAR_PISTOL, +;124: TORSO_WEAPONREADY3,//WP_BLASTER, +;125: TORSO_WEAPONREADY3,//TORSO_WEAPONREADY4,//WP_DISRUPTOR, +;126: TORSO_WEAPONREADY3,//TORSO_WEAPONREADY5,//WP_BOWCASTER, +;127: TORSO_WEAPONREADY3,//TORSO_WEAPONREADY6,//WP_REPEATER, +;128: TORSO_WEAPONREADY3,//TORSO_WEAPONREADY7,//WP_DEMP2, +;129: TORSO_WEAPONREADY3,//TORSO_WEAPONREADY8,//WP_FLECHETTE, +;130: TORSO_WEAPONREADY3,//TORSO_WEAPONREADY9,//WP_ROCKET_LAUNCHER, +;131: TORSO_WEAPONREADY10,//WP_THERMAL, +;132: TORSO_WEAPONREADY10,//TORSO_WEAPONREADY11,//WP_TRIP_MINE, +;133: TORSO_WEAPONREADY10,//TORSO_WEAPONREADY12,//WP_DET_PACK, +;134: +;135: //NOT VALID (e.g. should never really be used): +;136: BOTH_STAND1,//WP_EMPLACED_GUN, +;137: TORSO_WEAPONREADY1//WP_TURRET, +;138:}; +;139: +;140:int WeaponAttackAnim[WP_NUM_WEAPONS] = +;141:{ +;142: BOTH_ATTACK1,//WP_NONE, //(shouldn't happen) +;143: +;144: BOTH_ATTACK3,//WP_STUN_BATON, +;145: BOTH_STAND2,//WP_SABER, //(has its own handling) +;146: BOTH_ATTACK2,//WP_BRYAR_PISTOL, +;147: BOTH_ATTACK3,//WP_BLASTER, +;148: BOTH_ATTACK3,//BOTH_ATTACK4,//WP_DISRUPTOR, +;149: BOTH_ATTACK3,//BOTH_ATTACK5,//WP_BOWCASTER, +;150: BOTH_ATTACK3,//BOTH_ATTACK6,//WP_REPEATER, +;151: BOTH_ATTACK3,//BOTH_ATTACK7,//WP_DEMP2, +;152: BOTH_ATTACK3,//BOTH_ATTACK8,//WP_FLECHETTE, +;153: BOTH_ATTACK3,//BOTH_ATTACK9,//WP_ROCKET_LAUNCHER, +;154: BOTH_THERMAL_THROW,//WP_THERMAL, +;155: BOTH_ATTACK3,//BOTH_ATTACK11,//WP_TRIP_MINE, +;156: BOTH_ATTACK3,//BOTH_ATTACK12,//WP_DET_PACK, +;157: +;158: //NOT VALID (e.g. should never really be used): +;159: BOTH_STAND1,//WP_EMPLACED_GUN, +;160: BOTH_ATTACK1//WP_TURRET, +;161:}; +;162: +;163: +;164:/* +;165:================ +;166:BG_LegalizedForcePowers +;167: +;168:The magical function to end all functions. +;169:This will take the force power string in powerOut and parse through it, then legalize +;170:it based on the supposed rank and spit it into powerOut, returning true if it was legal +;171:to begin with and false if not. +;172:fpDisabled is actually only expected (needed) from the server, because the ui disables +;173:force power selection anyway when force powers are disabled on the server. +;174:================ +;175:*/ +;176:qboolean BG_LegalizedForcePowers(char *powerOut, int maxRank, qboolean freeSaber, int teamForce, int gametype, int fpDisabled) +;177:{ +line 180 +;178: char powerBuf[128]; +;179: char readBuf[128]; +;180: qboolean maintainsValidity = qtrue; +ADDRLP4 352 +CNSTI4 1 +ASGNI4 +line 181 +;181: int powerLen = strlen(powerOut); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 360 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 356 +ADDRLP4 360 +INDIRI4 +ASGNI4 +line 182 +;182: int i = 0; +ADDRLP4 76 +CNSTI4 0 +ASGNI4 +line 183 +;183: int c = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 184 +;184: int allowedPoints = 0; +ADDRLP4 88 +CNSTI4 0 +ASGNI4 +line 185 +;185: int usedPoints = 0; +ADDRLP4 80 +CNSTI4 0 +ASGNI4 +line 186 +;186: int countDown = 0; +ADDRLP4 84 +CNSTI4 0 +ASGNI4 +line 191 +;187: +;188: int final_Side; +;189: int final_Powers[NUM_FORCE_POWERS]; +;190: +;191: if (powerLen >= 128) +ADDRLP4 356 +INDIRI4 +CNSTI4 128 +LTI4 $129 +line 192 +;192: { //This should not happen. If it does, this is obviously a bogus string. +line 194 +;193: //They can have this string. Because I said so. +;194: strcpy(powerBuf, "7-1-032330000000001333"); +ADDRLP4 92 +ARGP4 +ADDRGP4 $131 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 195 +;195: maintainsValidity = qfalse; +ADDRLP4 352 +CNSTI4 0 +ASGNI4 +line 196 +;196: } +ADDRGP4 $130 +JUMPV +LABELV $129 +line 198 +;197: else +;198: { +line 199 +;199: strcpy(powerBuf, powerOut); //copy it as the original +ADDRLP4 92 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 200 +;200: } +LABELV $130 +line 203 +;201: +;202: //first of all, print the max rank into the string as the rank +;203: strcpy(powerOut, va("%i-", maxRank)); +ADDRGP4 $132 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 364 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 364 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +ADDRGP4 $134 +JUMPV +LABELV $133 +line 206 +;204: +;205: while (i < 128 && powerBuf[i] && powerBuf[i] != '-') +;206: { +line 207 +;207: i++; +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 208 +;208: } +LABELV $134 +line 205 +ADDRLP4 76 +INDIRI4 +CNSTI4 128 +GEI4 $137 +ADDRLP4 372 +ADDRLP4 76 +INDIRI4 +ADDRLP4 92 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 372 +INDIRI4 +CNSTI4 0 +EQI4 $137 +ADDRLP4 372 +INDIRI4 +CNSTI4 45 +NEI4 $133 +LABELV $137 +line 209 +;209: i++; +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRGP4 $139 +JUMPV +LABELV $138 +line 211 +;210: while (i < 128 && powerBuf[i] && powerBuf[i] != '-') +;211: { +line 212 +;212: readBuf[c] = powerBuf[i]; +ADDRLP4 0 +INDIRI4 +ADDRLP4 220 +ADDP4 +ADDRLP4 76 +INDIRI4 +ADDRLP4 92 +ADDP4 +INDIRI1 +ASGNI1 +line 213 +;213: c++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 214 +;214: i++; +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 215 +;215: } +LABELV $139 +line 210 +ADDRLP4 76 +INDIRI4 +CNSTI4 128 +GEI4 $142 +ADDRLP4 380 +ADDRLP4 76 +INDIRI4 +ADDRLP4 92 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 380 +INDIRI4 +CNSTI4 0 +EQI4 $142 +ADDRLP4 380 +INDIRI4 +CNSTI4 45 +NEI4 $138 +LABELV $142 +line 216 +;216: readBuf[c] = 0; +ADDRLP4 0 +INDIRI4 +ADDRLP4 220 +ADDP4 +CNSTI1 0 +ASGNI1 +line 217 +;217: i++; +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 219 +;218: //at this point, readBuf contains the intended side +;219: final_Side = atoi(readBuf); +ADDRLP4 220 +ARGP4 +ADDRLP4 384 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 348 +ADDRLP4 384 +INDIRI4 +ASGNI4 +line 221 +;220: +;221: if (final_Side != FORCE_LIGHTSIDE && +ADDRLP4 348 +INDIRI4 +CNSTI4 1 +EQI4 $143 +ADDRLP4 348 +INDIRI4 +CNSTI4 2 +EQI4 $143 +line 223 +;222: final_Side != FORCE_DARKSIDE) +;223: { //Not a valid side. You will be dark. Because I said so. (this is something that should never actually happen unless you purposely feed in an invalid config) +line 224 +;224: final_Side = FORCE_DARKSIDE; +ADDRLP4 348 +CNSTI4 2 +ASGNI4 +line 225 +;225: maintainsValidity = qfalse; +ADDRLP4 352 +CNSTI4 0 +ASGNI4 +line 226 +;226: } +LABELV $143 +line 228 +;227: +;228: if (teamForce) +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $145 +line 229 +;229: { //If we are under force-aligned teams, make sure we're on the right side. +line 230 +;230: if (final_Side != teamForce) +ADDRLP4 348 +INDIRI4 +ADDRFP4 12 +INDIRI4 +EQI4 $147 +line 231 +;231: { +line 232 +;232: final_Side = teamForce; +ADDRLP4 348 +ADDRFP4 12 +INDIRI4 +ASGNI4 +line 235 +;233: //maintainsValidity = qfalse; +;234: //Not doing this, for now. Let them join the team with their filtered powers. +;235: } +LABELV $147 +line 236 +;236: } +LABELV $145 +line 240 +;237: +;238: //Now we have established a valid rank, and a valid side. +;239: //Read the force powers in, and cut them down based on the various rules supplied. +;240: c = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $150 +JUMPV +LABELV $149 +line 242 +;241: while (i < 128 && powerBuf[i] && powerBuf[i] != '\n' && c < NUM_FORCE_POWERS) +;242: { +line 243 +;243: readBuf[0] = powerBuf[i]; +ADDRLP4 220 +ADDRLP4 76 +INDIRI4 +ADDRLP4 92 +ADDP4 +INDIRI1 +ASGNI1 +line 244 +;244: readBuf[1] = 0; +ADDRLP4 220+1 +CNSTI1 0 +ASGNI1 +line 245 +;245: final_Powers[c] = atoi(readBuf); +ADDRLP4 220 +ARGP4 +ADDRLP4 392 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +ADDRLP4 392 +INDIRI4 +ASGNI4 +line 246 +;246: c++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 247 +;247: i++; +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 248 +;248: } +LABELV $150 +line 241 +ADDRLP4 76 +INDIRI4 +CNSTI4 128 +GEI4 $155 +ADDRLP4 396 +ADDRLP4 76 +INDIRI4 +ADDRLP4 92 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 396 +INDIRI4 +CNSTI4 0 +EQI4 $155 +ADDRLP4 396 +INDIRI4 +CNSTI4 10 +EQI4 $155 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $149 +LABELV $155 +line 252 +;249: +;250: //final_Powers now contains all the stuff from the string +;251: //Set the maximum allowed points used based on the max rank level, and count the points actually used. +;252: allowedPoints = forceMasteryPoints[maxRank]; +ADDRLP4 88 +ADDRFP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forceMasteryPoints +ADDP4 +INDIRI4 +ASGNI4 +line 254 +;253: +;254: i = 0; +ADDRLP4 76 +CNSTI4 0 +ASGNI4 +ADDRGP4 $157 +JUMPV +LABELV $156 +line 256 +;255: while (i < NUM_FORCE_POWERS) +;256: { //if this power doesn't match the side we're on, then 0 it now. +line 257 +;257: if (final_Powers[i] && +ADDRLP4 400 +ADDRLP4 76 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 404 +CNSTI4 0 +ASGNI4 +ADDRLP4 400 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +ADDRLP4 404 +INDIRI4 +EQI4 $159 +ADDRLP4 408 +ADDRLP4 400 +INDIRI4 +ADDRGP4 forcePowerDarkLight +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 408 +INDIRI4 +ADDRLP4 404 +INDIRI4 +EQI4 $159 +ADDRLP4 408 +INDIRI4 +ADDRLP4 348 +INDIRI4 +EQI4 $159 +line 260 +;258: forcePowerDarkLight[i] && +;259: forcePowerDarkLight[i] != final_Side) +;260: { +line 261 +;261: final_Powers[i] = 0; +ADDRLP4 76 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +CNSTI4 0 +ASGNI4 +line 263 +;262: //This is only likely to happen with g_forceBasedTeams. Let it slide. +;263: } +LABELV $159 +line 265 +;264: +;265: if ( final_Powers[i] && +ADDRLP4 416 +CNSTI4 0 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +ADDRLP4 416 +INDIRI4 +EQI4 $161 +ADDRFP4 20 +INDIRI4 +CNSTI4 1 +ADDRLP4 76 +INDIRI4 +LSHI4 +BANDI4 +ADDRLP4 416 +INDIRI4 +EQI4 $161 +line 267 +;266: (fpDisabled & (1 << i)) ) +;267: { //if this power is disabled on the server via said server option, then we don't get it. +line 268 +;268: final_Powers[i] = 0; +ADDRLP4 76 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +CNSTI4 0 +ASGNI4 +line 269 +;269: } +LABELV $161 +line 271 +;270: +;271: i++; +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 272 +;272: } +LABELV $157 +line 255 +ADDRLP4 76 +INDIRI4 +CNSTI4 18 +LTI4 $156 +line 274 +;273: +;274: if (gametype < GT_TEAM) +ADDRFP4 16 +INDIRI4 +CNSTI4 5 +GEI4 $163 +line 275 +;275: { //don't bother with team powers then +line 276 +;276: final_Powers[FP_TEAM_HEAL] = 0; +ADDRLP4 4+44 +CNSTI4 0 +ASGNI4 +line 277 +;277: final_Powers[FP_TEAM_FORCE] = 0; +ADDRLP4 4+48 +CNSTI4 0 +ASGNI4 +line 278 +;278: } +LABELV $163 +line 280 +;279: +;280: usedPoints = 0; +ADDRLP4 80 +CNSTI4 0 +ASGNI4 +line 281 +;281: i = 0; +ADDRLP4 76 +CNSTI4 0 +ASGNI4 +ADDRGP4 $168 +JUMPV +LABELV $167 +line 283 +;282: while (i < NUM_FORCE_POWERS) +;283: { +line 284 +;284: countDown = 0; +ADDRLP4 84 +CNSTI4 0 +ASGNI4 +line 286 +;285: +;286: countDown = final_Powers[i]; +ADDRLP4 84 +ADDRLP4 76 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRGP4 $171 +JUMPV +LABELV $170 +line 289 +;287: +;288: while (countDown > 0) +;289: { +line 290 +;290: usedPoints += bgForcePowerCost[i][countDown]; //[fp index][fp level] +ADDRLP4 80 +ADDRLP4 80 +INDIRI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 4 +LSHI4 +ADDRGP4 bgForcePowerCost +ADDP4 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 292 +;291: //if this is jump, or we have a free saber and it's offense or defense, take the level back down on level 1 +;292: if ( countDown == 1 && +ADDRLP4 400 +CNSTI4 1 +ASGNI4 +ADDRLP4 84 +INDIRI4 +ADDRLP4 400 +INDIRI4 +NEI4 $173 +ADDRLP4 76 +INDIRI4 +ADDRLP4 400 +INDIRI4 +EQI4 $176 +ADDRLP4 76 +INDIRI4 +CNSTI4 15 +NEI4 $177 +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $176 +LABELV $177 +ADDRLP4 76 +INDIRI4 +CNSTI4 16 +NEI4 $173 +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $173 +LABELV $176 +line 296 +;293: ((i == FP_LEVITATION) || +;294: (i == FP_SABERATTACK && freeSaber) || +;295: (i == FP_SABERDEFEND && freeSaber)) ) +;296: { +line 297 +;297: usedPoints -= bgForcePowerCost[i][countDown]; +ADDRLP4 80 +ADDRLP4 80 +INDIRI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 4 +LSHI4 +ADDRGP4 bgForcePowerCost +ADDP4 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 298 +;298: } +LABELV $173 +line 299 +;299: countDown--; +ADDRLP4 84 +ADDRLP4 84 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 300 +;300: } +LABELV $171 +line 288 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +GTI4 $170 +line 302 +;301: +;302: i++; +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 303 +;303: } +LABELV $168 +line 282 +ADDRLP4 76 +INDIRI4 +CNSTI4 18 +LTI4 $167 +line 305 +;304: +;305: if (usedPoints > allowedPoints) +ADDRLP4 80 +INDIRI4 +ADDRLP4 88 +INDIRI4 +LEI4 $178 +line 306 +;306: { //Time to do the fancy stuff. (meaning, slowly cut parts off while taking a guess at what is most or least important in the config) +line 307 +;307: int attemptedCycles = 0; +ADDRLP4 408 +CNSTI4 0 +ASGNI4 +line 308 +;308: int powerCycle = 2; +ADDRLP4 400 +CNSTI4 2 +ASGNI4 +line 309 +;309: int minPow = 0; +ADDRLP4 404 +CNSTI4 0 +ASGNI4 +line 311 +;310: +;311: if (freeSaber) +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $180 +line 312 +;312: { +line 313 +;313: minPow = 1; +ADDRLP4 404 +CNSTI4 1 +ASGNI4 +line 314 +;314: } +LABELV $180 +line 316 +;315: +;316: maintainsValidity = qfalse; +ADDRLP4 352 +CNSTI4 0 +ASGNI4 +ADDRGP4 $183 +JUMPV +LABELV $182 +line 319 +;317: +;318: while (usedPoints > allowedPoints) +;319: { +line 320 +;320: c = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $186 +JUMPV +LABELV $185 +line 323 +;321: +;322: while (c < NUM_FORCE_POWERS && usedPoints > allowedPoints) +;323: { +line 324 +;324: if (final_Powers[c] && final_Powers[c] < powerCycle) +ADDRLP4 412 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 412 +INDIRI4 +CNSTI4 0 +EQI4 $188 +ADDRLP4 412 +INDIRI4 +ADDRLP4 400 +INDIRI4 +GEI4 $188 +line 325 +;325: { //kill in order of lowest powers, because the higher powers are probably more important +line 326 +;326: if (c == FP_SABERATTACK && +ADDRLP4 0 +INDIRI4 +CNSTI4 15 +NEI4 $207 +ADDRLP4 4+64 +INDIRI4 +ADDRLP4 404 +INDIRI4 +GTI4 $194 +ADDRLP4 4+68 +INDIRI4 +CNSTI4 0 +LEI4 $207 +LABELV $194 +line 328 +;327: (final_Powers[FP_SABERDEFEND] > minPow || final_Powers[FP_SABERTHROW] > 0)) +;328: { //if we're on saber attack, only suck it down if we have no def or throw either +line 329 +;329: int whichOne = FP_SABERTHROW; //first try throw +ADDRLP4 416 +CNSTI4 17 +ASGNI4 +line 331 +;330: +;331: if (!final_Powers[whichOne]) +ADDRLP4 416 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $198 +line 332 +;332: { +line 333 +;333: whichOne = FP_SABERDEFEND; //if no throw, drain defense +ADDRLP4 416 +CNSTI4 16 +ASGNI4 +line 334 +;334: } +ADDRGP4 $198 +JUMPV +LABELV $197 +line 337 +;335: +;336: while (final_Powers[whichOne] > 0 && usedPoints > allowedPoints) +;337: { +line 338 +;338: if ( final_Powers[whichOne] > 1 || +ADDRLP4 416 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +CNSTI4 1 +GTI4 $204 +ADDRLP4 416 +INDIRI4 +CNSTI4 15 +NEI4 $203 +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $191 +LABELV $203 +ADDRLP4 416 +INDIRI4 +CNSTI4 16 +NEI4 $204 +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $191 +LABELV $204 +line 341 +;339: ( (whichOne != FP_SABERATTACK || !freeSaber) && +;340: (whichOne != FP_SABERDEFEND || !freeSaber) ) ) +;341: { //don't take attack or defend down on level 1 still, if it's free +line 342 +;342: usedPoints -= bgForcePowerCost[whichOne][final_Powers[whichOne]]; +ADDRLP4 428 +CNSTI4 2 +ASGNI4 +ADDRLP4 80 +ADDRLP4 80 +INDIRI4 +ADDRLP4 416 +INDIRI4 +ADDRLP4 428 +INDIRI4 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +ADDRLP4 428 +INDIRI4 +LSHI4 +ADDRLP4 416 +INDIRI4 +CNSTI4 4 +LSHI4 +ADDRGP4 bgForcePowerCost +ADDP4 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 343 +;343: final_Powers[whichOne]--; +ADDRLP4 432 +ADDRLP4 416 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +ASGNP4 +ADDRLP4 432 +INDIRP4 +ADDRLP4 432 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 344 +;344: } +line 346 +;345: else +;346: { +line 347 +;347: break; +LABELV $201 +line 349 +;348: } +;349: } +LABELV $198 +line 336 +ADDRLP4 416 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $205 +ADDRLP4 80 +INDIRI4 +ADDRLP4 88 +INDIRI4 +GTI4 $197 +LABELV $205 +line 350 +;350: } +ADDRGP4 $191 +JUMPV +line 352 +;351: else +;352: { +LABELV $206 +line 354 +;353: while (final_Powers[c] > 0 && usedPoints > allowedPoints) +;354: { +line 355 +;355: if ( final_Powers[c] > 1 || +ADDRLP4 420 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +ADDRLP4 420 +INDIRI4 +GTI4 $213 +ADDRLP4 0 +INDIRI4 +ADDRLP4 420 +INDIRI4 +EQI4 $208 +ADDRLP4 0 +INDIRI4 +CNSTI4 15 +NEI4 $212 +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $208 +LABELV $212 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +NEI4 $213 +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $208 +LABELV $213 +line 359 +;356: ((c != FP_LEVITATION) && +;357: (c != FP_SABERATTACK || !freeSaber) && +;358: (c != FP_SABERDEFEND || !freeSaber)) ) +;359: { +line 360 +;360: usedPoints -= bgForcePowerCost[c][final_Powers[c]]; +ADDRLP4 428 +CNSTI4 2 +ASGNI4 +ADDRLP4 80 +ADDRLP4 80 +INDIRI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 428 +INDIRI4 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +ADDRLP4 428 +INDIRI4 +LSHI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LSHI4 +ADDRGP4 bgForcePowerCost +ADDP4 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 361 +;361: final_Powers[c]--; +ADDRLP4 432 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +ASGNP4 +ADDRLP4 432 +INDIRP4 +ADDRLP4 432 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 362 +;362: } +line 364 +;363: else +;364: { +line 365 +;365: break; +LABELV $210 +line 367 +;366: } +;367: } +LABELV $207 +line 353 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $214 +ADDRLP4 80 +INDIRI4 +ADDRLP4 88 +INDIRI4 +GTI4 $206 +LABELV $214 +LABELV $208 +line 368 +;368: } +LABELV $191 +line 369 +;369: } +LABELV $188 +line 371 +;370: +;371: c++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 372 +;372: } +LABELV $186 +line 322 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +GEI4 $215 +ADDRLP4 80 +INDIRI4 +ADDRLP4 88 +INDIRI4 +GTI4 $185 +LABELV $215 +line 374 +;373: +;374: powerCycle++; +ADDRLP4 400 +ADDRLP4 400 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 375 +;375: attemptedCycles++; +ADDRLP4 408 +ADDRLP4 408 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 377 +;376: +;377: if (attemptedCycles > NUM_FORCE_POWERS) +ADDRLP4 408 +INDIRI4 +CNSTI4 18 +LEI4 $216 +line 378 +;378: { //I think this should be impossible. But just in case. +line 379 +;379: break; +ADDRGP4 $184 +JUMPV +LABELV $216 +line 381 +;380: } +;381: } +LABELV $183 +line 318 +ADDRLP4 80 +INDIRI4 +ADDRLP4 88 +INDIRI4 +GTI4 $182 +LABELV $184 +line 383 +;382: +;383: if (usedPoints > allowedPoints) +ADDRLP4 80 +INDIRI4 +ADDRLP4 88 +INDIRI4 +LEI4 $218 +line 384 +;384: { //Still? Fine then.. we will kill all of your powers, except the freebies. +line 385 +;385: i = 0; +ADDRLP4 76 +CNSTI4 0 +ASGNI4 +ADDRGP4 $221 +JUMPV +LABELV $220 +line 388 +;386: +;387: while (i < NUM_FORCE_POWERS) +;388: { +line 389 +;389: final_Powers[i] = 0; +ADDRLP4 76 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +CNSTI4 0 +ASGNI4 +line 390 +;390: if (i == FP_LEVITATION || +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +EQI4 $226 +ADDRLP4 76 +INDIRI4 +CNSTI4 15 +NEI4 $227 +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $226 +LABELV $227 +ADDRLP4 76 +INDIRI4 +CNSTI4 16 +NEI4 $223 +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $223 +LABELV $226 +line 393 +;391: (i == FP_SABERATTACK && freeSaber) || +;392: (i == FP_SABERDEFEND && freeSaber)) +;393: { +line 394 +;394: final_Powers[i] = 1; +ADDRLP4 76 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +CNSTI4 1 +ASGNI4 +line 395 +;395: } +LABELV $223 +line 396 +;396: i++; +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 397 +;397: } +LABELV $221 +line 387 +ADDRLP4 76 +INDIRI4 +CNSTI4 18 +LTI4 $220 +line 398 +;398: usedPoints = 0; +ADDRLP4 80 +CNSTI4 0 +ASGNI4 +line 399 +;399: } +LABELV $218 +line 400 +;400: } +LABELV $178 +line 402 +;401: +;402: if (freeSaber) +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $228 +line 403 +;403: { +line 404 +;404: if (final_Powers[FP_SABERATTACK] < 1) +ADDRLP4 4+60 +INDIRI4 +CNSTI4 1 +GEI4 $230 +line 405 +;405: { +line 406 +;406: final_Powers[FP_SABERATTACK] = 1; +ADDRLP4 4+60 +CNSTI4 1 +ASGNI4 +line 407 +;407: } +LABELV $230 +line 408 +;408: if (final_Powers[FP_SABERDEFEND] < 1) +ADDRLP4 4+64 +INDIRI4 +CNSTI4 1 +GEI4 $234 +line 409 +;409: { +line 410 +;410: final_Powers[FP_SABERDEFEND] = 1; +ADDRLP4 4+64 +CNSTI4 1 +ASGNI4 +line 411 +;411: } +LABELV $234 +line 412 +;412: } +LABELV $228 +line 413 +;413: if (final_Powers[FP_LEVITATION] < 1) +ADDRLP4 4+4 +INDIRI4 +CNSTI4 1 +GEI4 $238 +line 414 +;414: { +line 415 +;415: final_Powers[FP_LEVITATION] = 1; +ADDRLP4 4+4 +CNSTI4 1 +ASGNI4 +line 416 +;416: } +LABELV $238 +line 418 +;417: +;418: if (fpDisabled) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $242 +line 419 +;419: { //If we specifically have attack or def disabled, force them up to level 3. It's the way +line 422 +;420: //things work for the case of all powers disabled. +;421: //If jump is disabled, down-cap it to level 1. Otherwise don't do a thing. +;422: if (fpDisabled & (1 << FP_LEVITATION)) +ADDRFP4 20 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $244 +line 423 +;423: { +line 424 +;424: final_Powers[FP_LEVITATION] = 1; +ADDRLP4 4+4 +CNSTI4 1 +ASGNI4 +line 425 +;425: } +LABELV $244 +line 426 +;426: if (fpDisabled & (1 << FP_SABERATTACK)) +ADDRFP4 20 +INDIRI4 +CNSTI4 32768 +BANDI4 +CNSTI4 0 +EQI4 $247 +line 427 +;427: { +line 428 +;428: final_Powers[FP_SABERATTACK] = 3; +ADDRLP4 4+60 +CNSTI4 3 +ASGNI4 +line 429 +;429: } +LABELV $247 +line 430 +;430: if (fpDisabled & (1 << FP_SABERDEFEND)) +ADDRFP4 20 +INDIRI4 +CNSTI4 65536 +BANDI4 +CNSTI4 0 +EQI4 $250 +line 431 +;431: { +line 432 +;432: final_Powers[FP_SABERDEFEND] = 3; +ADDRLP4 4+64 +CNSTI4 3 +ASGNI4 +line 433 +;433: } +LABELV $250 +line 434 +;434: } +LABELV $242 +line 436 +;435: +;436: if (final_Powers[FP_SABERATTACK] < 1) +ADDRLP4 4+60 +INDIRI4 +CNSTI4 1 +GEI4 $253 +line 437 +;437: { +line 438 +;438: final_Powers[FP_SABERDEFEND] = 0; +ADDRLP4 4+64 +CNSTI4 0 +ASGNI4 +line 439 +;439: final_Powers[FP_SABERTHROW] = 0; +ADDRLP4 4+68 +CNSTI4 0 +ASGNI4 +line 440 +;440: } +LABELV $253 +line 445 +;441: +;442: //We finally have all the force powers legalized and stored locally. +;443: //Put them all into the string and return the result. We already have +;444: //the rank there, so print the side and the powers now. +;445: Q_strcat(powerOut, 128, va("%i-", final_Side)); +ADDRGP4 $132 +ARGP4 +ADDRLP4 348 +INDIRI4 +ARGI4 +ADDRLP4 400 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRLP4 400 +INDIRP4 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 447 +;446: +;447: i = strlen(powerOut); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 404 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 76 +ADDRLP4 404 +INDIRI4 +ASGNI4 +line 448 +;448: c = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $259 +JUMPV +LABELV $258 +line 450 +;449: while (c < NUM_FORCE_POWERS) +;450: { +line 451 +;451: strcpy(readBuf, va("%i", final_Powers[c])); +ADDRGP4 $261 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 408 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 220 +ARGP4 +ADDRLP4 408 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 452 +;452: powerOut[i] = readBuf[0]; +ADDRLP4 76 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ADDRLP4 220 +INDIRI1 +ASGNI1 +line 453 +;453: c++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 454 +;454: i++; +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 455 +;455: } +LABELV $259 +line 449 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $258 +line 456 +;456: powerOut[i] = 0; +ADDRLP4 76 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 458 +;457: +;458: return maintainsValidity; +ADDRLP4 352 +INDIRI4 +RETI4 +LABELV $128 +endproc BG_LegalizedForcePowers 436 12 +data +export bg_itemlist +align 4 +LABELV bg_itemlist +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $262 +address $262 +address $263 +address $264 +address $265 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $266 +byte 4 25 +byte 4 3 +byte 4 1 +address $262 +address $262 +address $267 +address $264 +address $268 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $269 +byte 4 100 +byte 4 3 +byte 4 2 +address $262 +address $262 +address $270 +address $271 +address $272 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $273 +byte 4 25 +byte 4 4 +byte 4 0 +address $262 +address $262 +address $274 +address $275 +address $276 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $277 +byte 4 120 +byte 4 6 +byte 4 1 +address $262 +address $262 +address $278 +address $275 +address $279 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $280 +byte 4 120 +byte 4 6 +byte 4 2 +address $262 +address $281 +address $282 +address $275 +address $283 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $284 +byte 4 25 +byte 4 6 +byte 4 3 +address $262 +address $262 +address $285 +address $275 +address $286 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 1 +byte 4 6 +byte 4 4 +address $262 +address $262 +address $287 +address $275 +address $288 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $289 +byte 4 60 +byte 4 6 +byte 4 5 +address $262 +address $262 +address $290 +address $275 +address $291 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $292 +byte 4 120 +byte 4 6 +byte 4 6 +address $262 +address $262 +address $293 +address $294 +address $295 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $296 +byte 4 25 +byte 4 5 +byte 4 12 +address $262 +address $262 +address $297 +address $294 +address $298 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $299 +byte 4 25 +byte 4 5 +byte 4 13 +address $262 +address $262 +address $300 +address $301 +address $302 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $303 +byte 4 25 +byte 4 5 +byte 4 14 +address $262 +address $262 +address $304 +address $305 +address $306 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $307 +byte 4 25 +byte 4 5 +byte 4 15 +address $262 +address $262 +address $308 +address $275 +address $309 +byte 4 0 +byte 4 0 +byte 4 0 +address $310 +address $311 +byte 4 100 +byte 4 1 +byte 4 1 +address $262 +address $262 +address $312 +address $275 +address $313 +byte 4 0 +byte 4 0 +byte 4 0 +address $314 +address $315 +byte 4 100 +byte 4 1 +byte 4 2 +address $262 +address $262 +address $316 +address $275 +address $317 +byte 4 0 +byte 4 0 +byte 4 0 +address $318 +address $319 +byte 4 100 +byte 4 1 +byte 4 3 +address $262 +address $262 +address $320 +address $275 +address $321 +byte 4 0 +byte 4 0 +byte 4 0 +address $322 +address $323 +byte 4 100 +byte 4 1 +byte 4 4 +address $262 +address $262 +address $324 +address $275 +address $325 +byte 4 0 +byte 4 0 +byte 4 0 +address $326 +address $327 +byte 4 100 +byte 4 1 +byte 4 5 +address $262 +address $262 +address $328 +address $275 +address $329 +byte 4 0 +byte 4 0 +byte 4 0 +address $330 +address $331 +byte 4 100 +byte 4 1 +byte 4 6 +address $262 +address $262 +address $332 +address $275 +address $333 +byte 4 0 +byte 4 0 +byte 4 0 +address $334 +address $335 +byte 4 100 +byte 4 1 +byte 4 7 +address $262 +address $262 +address $336 +address $275 +address $337 +byte 4 0 +byte 4 0 +byte 4 0 +address $338 +address $339 +byte 4 100 +byte 4 1 +byte 4 8 +address $262 +address $262 +address $340 +address $275 +address $341 +byte 4 0 +byte 4 0 +byte 4 0 +address $342 +address $343 +byte 4 100 +byte 4 1 +byte 4 9 +address $262 +address $262 +address $344 +address $275 +address $345 +byte 4 0 +byte 4 0 +byte 4 0 +address $346 +address $347 +byte 4 3 +byte 4 1 +byte 4 10 +address $262 +address $262 +address $348 +address $275 +address $349 +address $350 +byte 4 0 +byte 4 0 +address $351 +address $352 +byte 4 4 +byte 4 2 +byte 4 7 +address $262 +address $262 +address $353 +address $275 +address $354 +address $355 +byte 4 0 +byte 4 0 +address $356 +address $357 +byte 4 3 +byte 4 2 +byte 4 8 +address $262 +address $262 +address $358 +address $275 +address $359 +address $360 +address $361 +byte 4 0 +address $362 +address $363 +byte 4 3 +byte 4 2 +byte 4 9 +address $262 +address $262 +address $364 +address $275 +address $350 +address $349 +byte 4 0 +byte 4 0 +address $351 +address $352 +byte 4 4 +byte 4 1 +byte 4 11 +address $262 +address $262 +address $365 +address $275 +address $355 +address $354 +byte 4 0 +byte 4 0 +address $356 +address $357 +byte 4 3 +byte 4 1 +byte 4 12 +address $262 +address $262 +address $366 +address $275 +address $360 +address $359 +address $361 +byte 4 0 +address $362 +address $363 +byte 4 3 +byte 4 1 +byte 4 13 +address $262 +address $262 +address $367 +address $275 +address $321 +byte 4 0 +byte 4 0 +byte 4 0 +address $322 +address $323 +byte 4 50 +byte 4 1 +byte 4 14 +address $262 +address $262 +address $368 +address $275 +address $321 +byte 4 0 +byte 4 0 +byte 4 0 +address $322 +address $323 +byte 4 50 +byte 4 1 +byte 4 15 +address $262 +address $262 +address $369 +address $370 +address $371 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $323 +byte 4 100 +byte 4 2 +byte 4 1 +address $262 +address $262 +address $372 +address $370 +address $371 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $373 +byte 4 100 +byte 4 2 +byte 4 2 +address $262 +address $262 +address $374 +address $370 +address $375 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $376 +byte 4 100 +byte 4 2 +byte 4 3 +address $262 +address $262 +address $377 +address $370 +address $378 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $379 +byte 4 100 +byte 4 2 +byte 4 4 +address $262 +address $262 +address $380 +address $370 +address $381 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $382 +byte 4 3 +byte 4 2 +byte 4 5 +address $262 +address $262 +address $383 +byte 4 0 +address $384 +address $385 +byte 4 0 +byte 4 0 +byte 4 0 +address $386 +byte 4 0 +byte 4 8 +byte 4 4 +address $262 +address $262 +address $387 +byte 4 0 +address $388 +address $389 +byte 4 0 +byte 4 0 +byte 4 0 +address $390 +byte 4 0 +byte 4 8 +byte 4 5 +address $262 +address $262 +address $391 +byte 4 0 +address $392 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $393 +byte 4 0 +byte 4 8 +byte 4 6 +address $262 +address $262 +address $394 +address $370 +address $395 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $396 +byte 4 0 +byte 4 8 +byte 4 0 +address $262 +address $262 +address $397 +address $370 +address $398 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $399 +byte 4 0 +byte 4 8 +byte 4 0 +address $262 +address $262 +byte 4 0 +skip 48 +export bg_numItems +align 4 +LABELV bg_numItems +byte 4 42 +export vectoyaw +code +proc vectoyaw 20 8 +line 1250 +;459:} +;460: +;461:/*QUAKED item_***** ( 0 0 0 ) (-16 -16 -16) (16 16 16) suspended +;462:DO NOT USE THIS CLASS, IT JUST HOLDS GENERAL INFORMATION. +;463:The suspended flag will allow items to hang in the air, otherwise they are dropped to the next surface. +;464: +;465:If an item is the target of another entity, it will not spawn in until fired. +;466: +;467:An item fires all of its targets when it is picked up. If the toucher can't carry it, the targets won't be fired. +;468: +;469:"notfree" if set to 1, don't spawn in free for all games +;470:"notteam" if set to 1, don't spawn in team games +;471:"notsingle" if set to 1, don't spawn in single player games +;472:"wait" override the default wait before respawning. -1 = never respawn automatically, which can be used with targeted spawning. +;473:"random" random number of plus or minus seconds varied from the respawn time +;474:"count" override quantity or duration on most items. +;475:*/ +;476: +;477:/*QUAKED misc_shield_floor_unit (1 0 0) (-16 -16 0) (16 16 40) +;478:#MODELNAME="/models/items/a_shield_converter.md3" +;479:Gives shield energy when used. +;480: +;481:"count" - max charge value (default 50) +;482:"chargerate" - rechage 1 point every this many milliseconds (default 3000) +;483:*/ +;484: +;485:gitem_t bg_itemlist[] = +;486:{ +;487: { +;488: NULL, // classname +;489: NULL, // pickup_sound +;490: { NULL, // world_model[0] +;491: NULL, // world_model[1] +;492: 0, 0} , // world_model[2],[3] +;493: NULL, // view_model +;494:/* icon */ NULL, // icon +;495:/* pickup */ //NULL, // pickup_name +;496: 0, // quantity +;497: 0, // giType (IT_*) +;498: 0, // giTag +;499:/* precache */ "", // precaches +;500:/* sounds */ "" // sounds +;501: }, // leave index 0 alone +;502: +;503: // +;504: // Pickups +;505: // +;506: +;507:/*QUAKED item_shield_sm_instant (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;508:Instant shield pickup, restores 25 +;509:*/ +;510: { +;511: "item_shield_sm_instant", +;512: "sound/player/pickupshield.wav", +;513: { "models/map_objects/mp/psd_sm.md3", +;514: 0, 0, 0}, +;515:/* view */ NULL, +;516:/* icon */ "gfx/mp/small_shield", +;517:/* pickup */// "Shield Small", +;518: 25, +;519: IT_ARMOR, +;520: 1, //special for shield - max on pickup is maxhealth*tag, thus small shield goes up to 100 shield +;521:/* precache */ "", +;522:/* sounds */ "" +;523: }, +;524: +;525:/*QUAKED item_shield_lrg_instant (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;526:Instant shield pickup, restores 100 +;527:*/ +;528: { +;529: "item_shield_lrg_instant", +;530: "sound/player/pickupshield.wav", +;531: { "models/map_objects/mp/psd.md3", +;532: 0, 0, 0}, +;533:/* view */ NULL, +;534:/* icon */ "gfx/mp/large_shield", +;535:/* pickup */// "Shield Large", +;536: 100, +;537: IT_ARMOR, +;538: 2, //special for shield - max on pickup is maxhealth*tag, thus large shield goes up to 200 shield +;539:/* precache */ "", +;540:/* sounds */ "" +;541: }, +;542: +;543:/*QUAKED item_medpak_instant (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;544:Instant medpack pickup, heals 25 +;545:*/ +;546: { +;547: "item_medpak_instant", +;548: "sound/player/pickuphealth.wav", +;549: { "models/map_objects/mp/medpac.md3", +;550: 0, 0, 0 }, +;551:/* view */ NULL, +;552:/* icon */ "gfx/hud/i_icon_medkit", +;553:/* pickup */// "Medpack", +;554: 25, +;555: IT_HEALTH, +;556: 0, +;557:/* precache */ "", +;558:/* sounds */ "" +;559: }, +;560: +;561: +;562: // +;563: // ITEMS +;564: // +;565: +;566:/*QUAKED item_seeker (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +;567:30 seconds of seeker drone +;568:*/ +;569: { +;570: "item_seeker", +;571: "sound/weapons/w_pkup.wav", +;572: { "models/items/remote.md3", +;573: 0, 0, 0} , +;574:/* view */ NULL, +;575:/* icon */ "gfx/hud/i_icon_seeker", +;576:/* pickup */// "Seeker Drone", +;577: 120, +;578: IT_HOLDABLE, +;579: HI_SEEKER, +;580:/* precache */ "", +;581:/* sounds */ "" +;582: }, +;583: +;584:/*QUAKED item_shield (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +;585:Portable shield +;586:*/ +;587: { +;588: "item_shield", +;589: "sound/weapons/w_pkup.wav", +;590: { "models/map_objects/mp/shield.md3", +;591: 0, 0, 0} , +;592:/* view */ NULL, +;593:/* icon */ "gfx/hud/i_icon_shieldwall", +;594:/* pickup */// "Forcefield", +;595: 120, +;596: IT_HOLDABLE, +;597: HI_SHIELD, +;598:/* precache */ "", +;599:/* sounds */ "sound/weapons/detpack/stick.wav sound/movers/doors/forcefield_on.wav sound/movers/doors/forcefield_off.wav sound/movers/doors/forcefield_lp.wav sound/effects/bumpfield.wav", +;600: }, +;601: +;602:/*QUAKED item_medpac (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +;603:Bacta canister pickup, heals 25 on use +;604:*/ +;605: { +;606: "item_medpac", //should be item_bacta +;607: "sound/weapons/w_pkup.wav", +;608: { "models/map_objects/mp/bacta.md3", +;609: 0, 0, 0} , +;610:/* view */ NULL, +;611:/* icon */ "gfx/hud/i_icon_bacta", +;612:/* pickup */// "Bacta Canister", +;613: 25, +;614: IT_HOLDABLE, +;615: HI_MEDPAC, +;616:/* precache */ "", +;617:/* sounds */ "" +;618: }, +;619: +;620:/*QUAKED item_datapad (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +;621:Do not place this. +;622:*/ +;623: { +;624: "item_datapad", +;625: "sound/weapons/w_pkup.wav", +;626: { "models/items/datapad.md3", +;627: 0, 0, 0} , +;628:/* view */ NULL, +;629:/* icon */ NULL, +;630:/* pickup */// "Datapad", +;631: 1, +;632: IT_HOLDABLE, +;633: HI_DATAPAD, +;634:/* precache */ "", +;635:/* sounds */ "" +;636: }, +;637: +;638:/*QUAKED item_binoculars (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +;639:These will be standard equipment on the player - DO NOT PLACE +;640:*/ +;641: { +;642: "item_binoculars", +;643: "sound/weapons/w_pkup.wav", +;644: { "models/items/binoculars.md3", +;645: 0, 0, 0} , +;646:/* view */ NULL, +;647:/* icon */ "gfx/hud/i_icon_zoom", +;648:/* pickup */// "Binoculars", +;649: 60, +;650: IT_HOLDABLE, +;651: HI_BINOCULARS, +;652:/* precache */ "", +;653:/* sounds */ "" +;654: }, +;655: +;656:/*QUAKED item_sentry_gun (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +;657:Sentry gun inventory pickup. +;658:*/ +;659: { +;660: "item_sentry_gun", +;661: "sound/weapons/w_pkup.wav", +;662: { "models/items/psgun.glm", +;663: 0, 0, 0} , +;664:/* view */ NULL, +;665:/* icon */ "gfx/hud/i_icon_sentrygun", +;666:/* pickup */// "Sentry Gun", +;667: 120, +;668: IT_HOLDABLE, +;669: HI_SENTRY_GUN, +;670:/* precache */ "", +;671:/* sounds */ "" +;672: }, +;673: +;674:/*QUAKED item_force_enlighten_light (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;675:Adds one rank to all Force powers temporarily. Only light jedi can use. +;676:*/ +;677: { +;678: "item_force_enlighten_light", +;679: "sound/player/enlightenment.wav", +;680: { "models/map_objects/mp/jedi_enlightenment.md3", +;681: 0, 0, 0} , +;682:/* view */ NULL, +;683:/* icon */ "gfx/hud/mpi_jlight", +;684:/* pickup */// "Light Force Enlightenment", +;685: 25, +;686: IT_POWERUP, +;687: PW_FORCE_ENLIGHTENED_LIGHT, +;688:/* precache */ "", +;689:/* sounds */ "" +;690: }, +;691: +;692:/*QUAKED item_force_enlighten_dark (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;693:Adds one rank to all Force powers temporarily. Only dark jedi can use. +;694:*/ +;695: { +;696: "item_force_enlighten_dark", +;697: "sound/player/enlightenment.wav", +;698: { "models/map_objects/mp/dk_enlightenment.md3", +;699: 0, 0, 0} , +;700:/* view */ NULL, +;701:/* icon */ "gfx/hud/mpi_dklight", +;702:/* pickup */// "Dark Force Enlightenment", +;703: 25, +;704: IT_POWERUP, +;705: PW_FORCE_ENLIGHTENED_DARK, +;706:/* precache */ "", +;707:/* sounds */ "" +;708: }, +;709: +;710:/*QUAKED item_force_boon (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;711:Unlimited Force Pool for a short time. +;712:*/ +;713: { +;714: "item_force_boon", +;715: "sound/player/boon.wav", +;716: { "models/map_objects/mp/force_boon.md3", +;717: 0, 0, 0} , +;718:/* view */ NULL, +;719:/* icon */ "gfx/hud/mpi_fboon", +;720:/* pickup */// "Force Boon", +;721: 25, +;722: IT_POWERUP, +;723: PW_FORCE_BOON, +;724:/* precache */ "", +;725:/* sounds */ "" +;726: }, +;727: +;728:/*QUAKED item_ysalimari (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;729:A small lizard carried on the player, which prevents the possessor from using any Force power. However, he is unaffected by any Force power. +;730:*/ +;731: { +;732: "item_ysalimari", +;733: "sound/player/ysalimari.wav", +;734: { "models/map_objects/mp/ysalimari.md3", +;735: 0, 0, 0} , +;736:/* view */ NULL, +;737:/* icon */ "gfx/hud/mpi_ysamari", +;738:/* pickup */// "Ysalamiri", +;739: 25, +;740: IT_POWERUP, +;741: PW_YSALAMIRI, +;742:/* precache */ "", +;743:/* sounds */ "" +;744: }, +;745: +;746: // +;747: // WEAPONS +;748: // +;749: +;750:/*QUAKED weapon_stun_baton (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;751:Don't place this +;752:*/ +;753: { +;754: "weapon_stun_baton", +;755: "sound/weapons/w_pkup.wav", +;756: { "models/weapons2/stun_baton/baton_w.glm", +;757: 0, 0, 0}, +;758:/* view */ "models/weapons2/stun_baton/baton.md3", +;759:/* icon */ "gfx/hud/w_icon_stunbaton", +;760:/* pickup */// "Stun Baton", +;761: 100, +;762: IT_WEAPON, +;763: WP_STUN_BATON, +;764:/* precache */ "", +;765:/* sounds */ "" +;766: }, +;767: +;768:/*QUAKED weapon_saber (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;769:Don't place this +;770:*/ +;771: { +;772: "weapon_saber", +;773: "sound/weapons/w_pkup.wav", +;774: { "models/weapons2/saber/saber_w.glm", +;775: 0, 0, 0}, +;776:/* view */ "models/weapons2/saber/saber_w.md3", +;777:/* icon */ "gfx/hud/w_icon_lightsaber", +;778:/* pickup */// "Lightsaber", +;779: 100, +;780: IT_WEAPON, +;781: WP_SABER, +;782:/* precache */ "", +;783:/* sounds */ "" +;784: }, +;785: +;786:/*QUAKED weapon_bryar_pistol (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;787:Don't place this +;788:*/ +;789: { +;790: "weapon_bryar_pistol", +;791: "sound/weapons/w_pkup.wav", +;792: { "models/weapons2/briar_pistol/briar_pistol_w.glm", +;793: 0, 0, 0}, +;794:/* view */ "models/weapons2/briar_pistol/briar_pistol.md3", +;795:/* icon */ "gfx/hud/w_icon_rifle", +;796:/* pickup */// "Bryar Pistol", +;797: 100, +;798: IT_WEAPON, +;799: WP_BRYAR_PISTOL, +;800:/* precache */ "", +;801:/* sounds */ "" +;802: }, +;803: +;804:/*QUAKED weapon_blaster (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;805:*/ +;806: { +;807: "weapon_blaster", +;808: "sound/weapons/w_pkup.wav", +;809: { "models/weapons2/blaster_r/blaster_w.glm", +;810: 0, 0, 0}, +;811:/* view */ "models/weapons2/blaster_r/blaster.md3", +;812:/* icon */ "gfx/hud/w_icon_blaster", +;813:/* pickup */// "E11 Blaster Rifle", +;814: 100, +;815: IT_WEAPON, +;816: WP_BLASTER, +;817:/* precache */ "", +;818:/* sounds */ "" +;819: }, +;820: +;821:/*QUAKED weapon_disruptor (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;822:*/ +;823: { +;824: "weapon_disruptor", +;825: "sound/weapons/w_pkup.wav", +;826: { "models/weapons2/disruptor/disruptor_w.glm", +;827: 0, 0, 0}, +;828:/* view */ "models/weapons2/disruptor/disruptor.md3", +;829:/* icon */ "gfx/hud/w_icon_disruptor", +;830:/* pickup */// "Tenloss Disruptor Rifle", +;831: 100, +;832: IT_WEAPON, +;833: WP_DISRUPTOR, +;834:/* precache */ "", +;835:/* sounds */ "" +;836: }, +;837: +;838:/*QUAKED weapon_bowcaster (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;839:*/ +;840: { +;841: "weapon_bowcaster", +;842: "sound/weapons/w_pkup.wav", +;843: { "models/weapons2/bowcaster/bowcaster_w.glm", +;844: 0, 0, 0}, +;845:/* view */ "models/weapons2/bowcaster/bowcaster.md3", +;846:/* icon */ "gfx/hud/w_icon_bowcaster", +;847:/* pickup */// "Wookiee Bowcaster", +;848: 100, +;849: IT_WEAPON, +;850: WP_BOWCASTER, +;851:/* precache */ "", +;852:/* sounds */ "" +;853: }, +;854: +;855:/*QUAKED weapon_repeater (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;856:*/ +;857: { +;858: "weapon_repeater", +;859: "sound/weapons/w_pkup.wav", +;860: { "models/weapons2/heavy_repeater/heavy_repeater_w.glm", +;861: 0, 0, 0}, +;862:/* view */ "models/weapons2/heavy_repeater/heavy_repeater.md3", +;863:/* icon */ "gfx/hud/w_icon_repeater", +;864:/* pickup */// "Imperial Heavy Repeater", +;865: 100, +;866: IT_WEAPON, +;867: WP_REPEATER, +;868:/* precache */ "", +;869:/* sounds */ "" +;870: }, +;871: +;872:/*QUAKED weapon_demp2 (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;873:NOTENOTE This weapon is not yet complete. Don't place it. +;874:*/ +;875: { +;876: "weapon_demp2", +;877: "sound/weapons/w_pkup.wav", +;878: { "models/weapons2/demp2/demp2_w.glm", +;879: 0, 0, 0}, +;880:/* view */ "models/weapons2/demp2/demp2.md3", +;881:/* icon */ "gfx/hud/w_icon_demp2", +;882:/* pickup */// "DEMP2", +;883: 100, +;884: IT_WEAPON, +;885: WP_DEMP2, +;886:/* precache */ "", +;887:/* sounds */ "" +;888: }, +;889: +;890:/*QUAKED weapon_flechette (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;891:*/ +;892: { +;893: "weapon_flechette", +;894: "sound/weapons/w_pkup.wav", +;895: { "models/weapons2/golan_arms/golan_arms_w.glm", +;896: 0, 0, 0}, +;897:/* view */ "models/weapons2/golan_arms/golan_arms.md3", +;898:/* icon */ "gfx/hud/w_icon_flechette", +;899:/* pickup */// "Golan Arms Flechette", +;900: 100, +;901: IT_WEAPON, +;902: WP_FLECHETTE, +;903:/* precache */ "", +;904:/* sounds */ "" +;905: }, +;906: +;907:/*QUAKED weapon_rocket_launcher (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;908:*/ +;909: { +;910: "weapon_rocket_launcher", +;911: "sound/weapons/w_pkup.wav", +;912: { "models/weapons2/merr_sonn/merr_sonn_w.glm", +;913: 0, 0, 0}, +;914:/* view */ "models/weapons2/merr_sonn/merr_sonn.md3", +;915:/* icon */ "gfx/hud/w_icon_merrsonn", +;916:/* pickup */// "Merr-Sonn Missile System", +;917: 3, +;918: IT_WEAPON, +;919: WP_ROCKET_LAUNCHER, +;920:/* precache */ "", +;921:/* sounds */ "" +;922: }, +;923: +;924:/*QUAKED ammo_thermal (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;925:*/ +;926: { +;927: "ammo_thermal", +;928: "sound/weapons/w_pkup.wav", +;929: { "models/weapons2/thermal/thermal_pu.md3", +;930: "models/weapons2/thermal/thermal_w.glm", 0, 0}, +;931:/* view */ "models/weapons2/thermal/thermal.md3", +;932:/* icon */ "gfx/hud/w_icon_thermal", +;933:/* pickup */// "Thermal Detonators", +;934: 4, +;935: IT_AMMO, +;936: AMMO_THERMAL, +;937:/* precache */ "", +;938:/* sounds */ "" +;939: }, +;940: +;941:/*QUAKED ammo_tripmine (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;942:*/ +;943: { +;944: "ammo_tripmine", +;945: "sound/weapons/w_pkup.wav", +;946: { "models/weapons2/laser_trap/laser_trap_pu.md3", +;947: "models/weapons2/laser_trap/laser_trap_w.glm", 0, 0}, +;948:/* view */ "models/weapons2/laser_trap/laser_trap.md3", +;949:/* icon */ "gfx/hud/w_icon_tripmine", +;950:/* pickup */// "Trip Mines", +;951: 3, +;952: IT_AMMO, +;953: AMMO_TRIPMINE, +;954:/* precache */ "", +;955:/* sounds */ "" +;956: }, +;957: +;958:/*QUAKED ammo_detpack (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;959:*/ +;960: { +;961: "ammo_detpack", +;962: "sound/weapons/w_pkup.wav", +;963: { "models/weapons2/detpack/det_pack_pu.md3", "models/weapons2/detpack/det_pack_proj.glm", "models/weapons2/detpack/det_pack_w.glm", 0}, +;964:/* view */ "models/weapons2/detpack/det_pack.md3", +;965:/* icon */ "gfx/hud/w_icon_detpack", +;966:/* pickup */// "Det Packs", +;967: 3, +;968: IT_AMMO, +;969: AMMO_DETPACK, +;970:/* precache */ "", +;971:/* sounds */ "" +;972: }, +;973: +;974:/*QUAKED weapon_thermal (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;975:*/ +;976: { +;977: "weapon_thermal", +;978: "sound/weapons/w_pkup.wav", +;979: { "models/weapons2/thermal/thermal_w.glm", "models/weapons2/thermal/thermal_pu.md3", +;980: 0, 0 }, +;981:/* view */ "models/weapons2/thermal/thermal.md3", +;982:/* icon */ "gfx/hud/w_icon_thermal", +;983:/* pickup */// "Thermal Detonator", +;984: 4, +;985: IT_WEAPON, +;986: WP_THERMAL, +;987:/* precache */ "", +;988:/* sounds */ "" +;989: }, +;990: +;991:/*QUAKED weapon_trip_mine (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;992:*/ +;993: { +;994: "weapon_trip_mine", +;995: "sound/weapons/w_pkup.wav", +;996: { "models/weapons2/laser_trap/laser_trap_w.glm", "models/weapons2/laser_trap/laser_trap_pu.md3", +;997: 0, 0}, +;998:/* view */ "models/weapons2/laser_trap/laser_trap.md3", +;999:/* icon */ "gfx/hud/w_icon_tripmine", +;1000:/* pickup */// "Trip Mine", +;1001: 3, +;1002: IT_WEAPON, +;1003: WP_TRIP_MINE, +;1004:/* precache */ "", +;1005:/* sounds */ "" +;1006: }, +;1007: +;1008:/*QUAKED weapon_det_pack (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;1009:*/ +;1010: { +;1011: "weapon_det_pack", +;1012: "sound/weapons/w_pkup.wav", +;1013: { "models/weapons2/detpack/det_pack_proj.glm", "models/weapons2/detpack/det_pack_pu.md3", "models/weapons2/detpack/det_pack_w.glm", 0}, +;1014:/* view */ "models/weapons2/detpack/det_pack.md3", +;1015:/* icon */ "gfx/hud/w_icon_detpack", +;1016:/* pickup */// "Det Pack", +;1017: 3, +;1018: IT_WEAPON, +;1019: WP_DET_PACK, +;1020:/* precache */ "", +;1021:/* sounds */ "" +;1022: }, +;1023: +;1024:/*QUAKED weapon_emplaced (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;1025:*/ +;1026: { +;1027: "weapon_emplaced", +;1028: "sound/weapons/w_pkup.wav", +;1029: { "models/weapons2/blaster_r/blaster_w.glm", +;1030: 0, 0, 0}, +;1031:/* view */ "models/weapons2/blaster_r/blaster.md3", +;1032:/* icon */ "gfx/hud/w_icon_blaster", +;1033:/* pickup */// "Emplaced Gun", +;1034: 50, +;1035: IT_WEAPON, +;1036: WP_EMPLACED_GUN, +;1037:/* precache */ "", +;1038:/* sounds */ "" +;1039: }, +;1040: +;1041: +;1042://NOTE: This is to keep things from messing up because the turret weapon type isn't real +;1043: { +;1044: "weapon_turretwp", +;1045: "sound/weapons/w_pkup.wav", +;1046: { "models/weapons2/blaster_r/blaster_w.glm", +;1047: 0, 0, 0}, +;1048:/* view */ "models/weapons2/blaster_r/blaster.md3", +;1049:/* icon */ "gfx/hud/w_icon_blaster", +;1050:/* pickup */// "Turret Gun", +;1051: 50, +;1052: IT_WEAPON, +;1053: WP_TURRET, +;1054:/* precache */ "", +;1055:/* sounds */ "" +;1056: }, +;1057: +;1058: // +;1059: // AMMO ITEMS +;1060: // +;1061: +;1062:/*QUAKED ammo_force (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;1063:Don't place this +;1064:*/ +;1065: { +;1066: "ammo_force", +;1067: "sound/player/pickupenergy.wav", +;1068: { "models/items/energy_cell.md3", +;1069: 0, 0, 0}, +;1070:/* view */ NULL, +;1071:/* icon */ "gfx/hud/w_icon_blaster", +;1072:/* pickup */// "Force??", +;1073: 100, +;1074: IT_AMMO, +;1075: AMMO_FORCE, +;1076:/* precache */ "", +;1077:/* sounds */ "" +;1078: }, +;1079: +;1080:/*QUAKED ammo_blaster (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;1081:Ammo for the Bryar and Blaster pistols. +;1082:*/ +;1083: { +;1084: "ammo_blaster", +;1085: "sound/player/pickupenergy.wav", +;1086: { "models/items/energy_cell.md3", +;1087: 0, 0, 0}, +;1088:/* view */ NULL, +;1089:/* icon */ "gfx/hud/i_icon_battery", +;1090:/* pickup */// "Blaster Pack", +;1091: 100, +;1092: IT_AMMO, +;1093: AMMO_BLASTER, +;1094:/* precache */ "", +;1095:/* sounds */ "" +;1096: }, +;1097: +;1098:/*QUAKED ammo_powercell (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;1099:Ammo for Tenloss Disruptor, Wookie Bowcaster, and the Destructive Electro Magnetic Pulse (demp2 ) guns +;1100:*/ +;1101: { +;1102: "ammo_powercell", +;1103: "sound/player/pickupenergy.wav", +;1104: { "models/items/power_cell.md3", +;1105: 0, 0, 0}, +;1106:/* view */ NULL, +;1107:/* icon */ "gfx/mp/ammo_power_cell", +;1108:/* pickup */// "Power Cell", +;1109: 100, +;1110: IT_AMMO, +;1111: AMMO_POWERCELL, +;1112:/* precache */ "", +;1113:/* sounds */ "" +;1114: }, +;1115: +;1116:/*QUAKED ammo_metallic_bolts (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;1117:Ammo for Imperial Heavy Repeater and the Golan Arms Flechette +;1118:*/ +;1119: { +;1120: "ammo_metallic_bolts", +;1121: "sound/player/pickupenergy.wav", +;1122: { "models/items/metallic_bolts.md3", +;1123: 0, 0, 0}, +;1124:/* view */ NULL, +;1125:/* icon */ "gfx/mp/ammo_metallic_bolts", +;1126:/* pickup */// "Metallic Bolts", +;1127: 100, +;1128: IT_AMMO, +;1129: AMMO_METAL_BOLTS, +;1130:/* precache */ "", +;1131:/* sounds */ "" +;1132: }, +;1133: +;1134:/*QUAKED ammo_rockets (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +;1135:Ammo for Merr-Sonn portable missile launcher +;1136:*/ +;1137: { +;1138: "ammo_rockets", +;1139: "sound/player/pickupenergy.wav", +;1140: { "models/items/rockets.md3", +;1141: 0, 0, 0}, +;1142:/* view */ NULL, +;1143:/* icon */ "gfx/mp/ammo_rockets", +;1144:/* pickup */// "Rockets", +;1145: 3, +;1146: IT_AMMO, +;1147: AMMO_ROCKETS, +;1148:/* precache */ "", +;1149:/* sounds */ "" +;1150: }, +;1151: +;1152: +;1153: // +;1154: // POWERUP ITEMS +;1155: // +;1156:/*QUAKED team_CTF_redflag (1 0 0) (-16 -16 -16) (16 16 16) +;1157:Only in CTF games +;1158:*/ +;1159: { +;1160: "team_CTF_redflag", +;1161: NULL, +;1162: { "models/flags/r_flag.md3", +;1163: "models/flags/r_flag_ysal.md3", 0, 0 }, +;1164:/* view */ NULL, +;1165:/* icon */ "gfx/hud/mpi_rflag", +;1166:/* pickup */// "Red Flag", +;1167: 0, +;1168: IT_TEAM, +;1169: PW_REDFLAG, +;1170:/* precache */ "", +;1171:/* sounds */ "" +;1172: }, +;1173: +;1174:/*QUAKED team_CTF_blueflag (0 0 1) (-16 -16 -16) (16 16 16) +;1175:Only in CTF games +;1176:*/ +;1177: { +;1178: "team_CTF_blueflag", +;1179: NULL, +;1180: { "models/flags/b_flag.md3", +;1181: "models/flags/b_flag_ysal.md3", 0, 0 }, +;1182:/* view */ NULL, +;1183:/* icon */ "gfx/hud/mpi_bflag", +;1184:/* pickup */// "Blue Flag", +;1185: 0, +;1186: IT_TEAM, +;1187: PW_BLUEFLAG, +;1188:/* precache */ "", +;1189:/* sounds */ "" +;1190: }, +;1191: +;1192: // +;1193: // PERSISTANT POWERUP ITEMS +;1194: // +;1195: +;1196: /*QUAKED team_CTF_neutralflag (0 0 1) (-16 -16 -16) (16 16 16) +;1197:Only in One Flag CTF games +;1198:*/ +;1199: { +;1200: "team_CTF_neutralflag", +;1201: NULL, +;1202: { "models/flags/n_flag.md3", +;1203: 0, 0, 0 }, +;1204:/* view */ NULL, +;1205:/* icon */ "icons/iconf_neutral1", +;1206:/* pickup */// "Neutral Flag", +;1207: 0, +;1208: IT_TEAM, +;1209: PW_NEUTRALFLAG, +;1210:/* precache */ "", +;1211:/* sounds */ "" +;1212: }, +;1213: +;1214: { +;1215: "item_redcube", +;1216: "sound/player/pickupenergy.wav", +;1217: { "models/powerups/orb/r_orb.md3", +;1218: 0, 0, 0 }, +;1219:/* view */ NULL, +;1220:/* icon */ "icons/iconh_rorb", +;1221:/* pickup */// "Red Cube", +;1222: 0, +;1223: IT_TEAM, +;1224: 0, +;1225:/* precache */ "", +;1226:/* sounds */ "" +;1227: }, +;1228: +;1229: { +;1230: "item_bluecube", +;1231: "sound/player/pickupenergy.wav", +;1232: { "models/powerups/orb/b_orb.md3", +;1233: 0, 0, 0 }, +;1234:/* view */ NULL, +;1235:/* icon */ "icons/iconh_borb", +;1236:/* pickup */// "Blue Cube", +;1237: 0, +;1238: IT_TEAM, +;1239: 0, +;1240:/* precache */ "", +;1241:/* sounds */ "" +;1242: }, +;1243: +;1244: // end of list marker +;1245: {NULL} +;1246:}; +;1247: +;1248:int bg_numItems = sizeof(bg_itemlist) / sizeof(bg_itemlist[0]) - 1; +;1249: +;1250:float vectoyaw( const vec3_t vec ) { +line 1253 +;1251: float yaw; +;1252: +;1253: if (vec[YAW] == 0 && vec[PITCH] == 0) { +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +NEF4 $401 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +NEF4 $401 +line 1254 +;1254: yaw = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 1255 +;1255: } else { +ADDRGP4 $402 +JUMPV +LABELV $401 +line 1256 +;1256: if (vec[PITCH]) { +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 0 +EQF4 $403 +line 1257 +;1257: yaw = ( atan2( vec[YAW], vec[PITCH]) * 180 / M_PI ); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 16 +ADDRGP4 atan2 +CALLF4 +ASGNF4 +ADDRLP4 0 +CNSTF4 1127481344 +ADDRLP4 16 +INDIRF4 +MULF4 +CNSTF4 1078530011 +DIVF4 +ASGNF4 +line 1258 +;1258: } else if (vec[YAW] > 0) { +ADDRGP4 $404 +JUMPV +LABELV $403 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 0 +LEF4 $405 +line 1259 +;1259: yaw = 90; +ADDRLP4 0 +CNSTF4 1119092736 +ASGNF4 +line 1260 +;1260: } else { +ADDRGP4 $406 +JUMPV +LABELV $405 +line 1261 +;1261: yaw = 270; +ADDRLP4 0 +CNSTF4 1132920832 +ASGNF4 +line 1262 +;1262: } +LABELV $406 +LABELV $404 +line 1263 +;1263: if (yaw < 0) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +GEF4 $407 +line 1264 +;1264: yaw += 360; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 1265 +;1265: } +LABELV $407 +line 1266 +;1266: } +LABELV $402 +line 1268 +;1267: +;1268: return yaw; +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $400 +endproc vectoyaw 20 8 +export BG_HasYsalamiri +proc BG_HasYsalamiri 8 0 +line 1272 +;1269:} +;1270: +;1271:qboolean BG_HasYsalamiri(int gametype, playerState_t *ps) +;1272:{ +line 1273 +;1273: if (gametype == GT_CTY && +ADDRFP4 0 +INDIRI4 +CNSTI4 8 +NEI4 $410 +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 360 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $412 +ADDRLP4 0 +INDIRP4 +CNSTI4 364 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $410 +LABELV $412 +line 1275 +;1274: (ps->powerups[PW_REDFLAG] || ps->powerups[PW_BLUEFLAG])) +;1275: { +line 1276 +;1276: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $409 +JUMPV +LABELV $410 +line 1279 +;1277: } +;1278: +;1279: if (ps->powerups[PW_YSALAMIRI]) +ADDRFP4 4 +INDIRP4 +CNSTI4 404 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $413 +line 1280 +;1280: { +line 1281 +;1281: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $409 +JUMPV +LABELV $413 +line 1284 +;1282: } +;1283: +;1284: return qfalse; +CNSTI4 0 +RETI4 +LABELV $409 +endproc BG_HasYsalamiri 8 0 +export BG_CanUseFPNow +proc BG_CanUseFPNow 16 8 +line 1288 +;1285:} +;1286: +;1287:qboolean BG_CanUseFPNow(int gametype, playerState_t *ps, int time, forcePowers_t power) +;1288:{ +line 1289 +;1289: if (BG_HasYsalamiri(gametype, ps)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 BG_HasYsalamiri +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $416 +line 1290 +;1290: { +line 1291 +;1291: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $415 +JUMPV +LABELV $416 +line 1294 +;1292: } +;1293: +;1294: if ( ps->forceRestricted || ps->trueNonJedi ) +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 608 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $420 +ADDRLP4 4 +INDIRP4 +CNSTI4 616 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $418 +LABELV $420 +line 1295 +;1295: { +line 1296 +;1296: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $415 +JUMPV +LABELV $418 +line 1299 +;1297: } +;1298: +;1299: if (ps->duelInProgress) +ADDRFP4 4 +INDIRP4 +CNSTI4 1304 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $421 +line 1300 +;1300: { +line 1301 +;1301: if (power != FP_SABERATTACK && power != FP_SABERDEFEND && /*power != FP_SABERTHROW &&*/ +ADDRLP4 12 +ADDRFP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 15 +EQI4 $423 +ADDRLP4 12 +INDIRI4 +CNSTI4 16 +EQI4 $423 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +EQI4 $423 +line 1303 +;1302: power != FP_LEVITATION) +;1303: { +line 1304 +;1304: if (!ps->saberLockFrame || power != FP_PUSH) +ADDRFP4 4 +INDIRP4 +CNSTI4 532 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $427 +ADDRFP4 12 +INDIRI4 +CNSTI4 3 +EQI4 $425 +LABELV $427 +line 1305 +;1305: { +line 1306 +;1306: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $415 +JUMPV +LABELV $425 +line 1308 +;1307: } +;1308: } +LABELV $423 +line 1309 +;1309: } +LABELV $421 +line 1311 +;1310: +;1311: if (ps->saberLockFrame || ps->saberLockTime > time) +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 532 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $430 +ADDRLP4 12 +INDIRP4 +CNSTI4 524 +ADDP4 +INDIRI4 +ADDRFP4 8 +INDIRI4 +LEI4 $428 +LABELV $430 +line 1312 +;1312: { +line 1313 +;1313: if (power != FP_PUSH) +ADDRFP4 12 +INDIRI4 +CNSTI4 3 +EQI4 $431 +line 1314 +;1314: { +line 1315 +;1315: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $415 +JUMPV +LABELV $431 +line 1317 +;1316: } +;1317: } +LABELV $428 +line 1319 +;1318: +;1319: if (ps->fallingToDeath) +ADDRFP4 4 +INDIRP4 +CNSTI4 1352 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $433 +line 1320 +;1320: { +line 1321 +;1321: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $415 +JUMPV +LABELV $433 +line 1324 +;1322: } +;1323: +;1324: return qtrue; +CNSTI4 1 +RETI4 +LABELV $415 +endproc BG_CanUseFPNow 16 8 +export BG_FindItemForPowerup +proc BG_FindItemForPowerup 8 0 +line 1332 +;1325:} +;1326: +;1327:/* +;1328:============== +;1329:BG_FindItemForPowerup +;1330:============== +;1331:*/ +;1332:gitem_t *BG_FindItemForPowerup( powerup_t pw ) { +line 1335 +;1333: int i; +;1334: +;1335: for ( i = 0 ; i < bg_numItems ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $439 +JUMPV +LABELV $436 +line 1336 +;1336: if ( (bg_itemlist[i].giType == IT_POWERUP || +ADDRLP4 4 +CNSTI4 52 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 bg_itemlist+36 +ADDP4 +INDIRI4 +CNSTI4 5 +EQI4 $445 +ADDRLP4 4 +INDIRI4 +ADDRGP4 bg_itemlist+36 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $440 +LABELV $445 +CNSTI4 52 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +NEI4 $440 +line 1338 +;1337: bg_itemlist[i].giType == IT_TEAM) && +;1338: bg_itemlist[i].giTag == pw ) { +line 1339 +;1339: return &bg_itemlist[i]; +CNSTI4 52 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +RETP4 +ADDRGP4 $435 +JUMPV +LABELV $440 +line 1341 +;1340: } +;1341: } +LABELV $437 +line 1335 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $439 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_numItems +INDIRI4 +LTI4 $436 +line 1343 +;1342: +;1343: return NULL; +CNSTP4 0 +RETP4 +LABELV $435 +endproc BG_FindItemForPowerup 8 0 +export BG_FindItemForHoldable +proc BG_FindItemForHoldable 8 8 +line 1352 +;1344:} +;1345: +;1346: +;1347:/* +;1348:============== +;1349:BG_FindItemForHoldable +;1350:============== +;1351:*/ +;1352:gitem_t *BG_FindItemForHoldable( holdable_t pw ) { +line 1355 +;1353: int i; +;1354: +;1355: for ( i = 0 ; i < bg_numItems ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $450 +JUMPV +LABELV $447 +line 1356 +;1356: if ( bg_itemlist[i].giType == IT_HOLDABLE && bg_itemlist[i].giTag == pw ) { +ADDRLP4 4 +CNSTI4 52 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 bg_itemlist+36 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $451 +ADDRLP4 4 +INDIRI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +NEI4 $451 +line 1357 +;1357: return &bg_itemlist[i]; +CNSTI4 52 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +RETP4 +ADDRGP4 $446 +JUMPV +LABELV $451 +line 1359 +;1358: } +;1359: } +LABELV $448 +line 1355 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $450 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_numItems +INDIRI4 +LTI4 $447 +line 1361 +;1360: +;1361: Com_Error( ERR_DROP, "HoldableItem not found" ); +CNSTI4 1 +ARGI4 +ADDRGP4 $455 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 1363 +;1362: +;1363: return NULL; +CNSTP4 0 +RETP4 +LABELV $446 +endproc BG_FindItemForHoldable 8 8 +export BG_FindItemForWeapon +proc BG_FindItemForWeapon 8 12 +line 1373 +;1364:} +;1365: +;1366: +;1367:/* +;1368:=============== +;1369:BG_FindItemForWeapon +;1370: +;1371:=============== +;1372:*/ +;1373:gitem_t *BG_FindItemForWeapon( weapon_t weapon ) { +line 1376 +;1374: gitem_t *it; +;1375: +;1376: for ( it = bg_itemlist + 1 ; it->classname ; it++) { +ADDRLP4 0 +ADDRGP4 bg_itemlist+52 +ASGNP4 +ADDRGP4 $460 +JUMPV +LABELV $457 +line 1377 +;1377: if ( it->giType == IT_WEAPON && it->giTag == weapon ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $462 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +NEI4 $462 +line 1378 +;1378: return it; +ADDRLP4 0 +INDIRP4 +RETP4 +ADDRGP4 $456 +JUMPV +LABELV $462 +line 1380 +;1379: } +;1380: } +LABELV $458 +line 1376 +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ASGNP4 +LABELV $460 +ADDRLP4 0 +INDIRP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $457 +line 1382 +;1381: +;1382: Com_Error( ERR_DROP, "Couldn't find item for weapon %i", weapon); +CNSTI4 1 +ARGI4 +ADDRGP4 $464 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 Com_Error +CALLV +pop +line 1383 +;1383: return NULL; +CNSTP4 0 +RETP4 +LABELV $456 +endproc BG_FindItemForWeapon 8 12 +export BG_FindItem +proc BG_FindItem 8 8 +line 1392 +;1384:} +;1385: +;1386:/* +;1387:=============== +;1388:BG_FindItem +;1389: +;1390:=============== +;1391:*/ +;1392:gitem_t *BG_FindItem( const char *classname ) { +line 1395 +;1393: gitem_t *it; +;1394: +;1395: for ( it = bg_itemlist + 1 ; it->classname ; it++ ) { +ADDRLP4 0 +ADDRGP4 bg_itemlist+52 +ASGNP4 +ADDRGP4 $469 +JUMPV +LABELV $466 +line 1396 +;1396: if ( !Q_stricmp( it->classname, classname) ) +ADDRLP4 0 +INDIRP4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $471 +line 1397 +;1397: return it; +ADDRLP4 0 +INDIRP4 +RETP4 +ADDRGP4 $465 +JUMPV +LABELV $471 +line 1398 +;1398: } +LABELV $467 +line 1395 +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ASGNP4 +LABELV $469 +ADDRLP4 0 +INDIRP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $466 +line 1400 +;1399: +;1400: return NULL; +CNSTP4 0 +RETP4 +LABELV $465 +endproc BG_FindItem 8 8 +export BG_PlayerTouchesItem +proc BG_PlayerTouchesItem 36 12 +line 1411 +;1401:} +;1402: +;1403:/* +;1404:============ +;1405:BG_PlayerTouchesItem +;1406: +;1407:Items can be picked up without actually touching their physical bounds to make +;1408:grabbing them easier +;1409:============ +;1410:*/ +;1411:qboolean BG_PlayerTouchesItem( playerState_t *ps, entityState_t *item, int atTime ) { +line 1414 +;1412: vec3_t origin; +;1413: +;1414: BG_EvaluateTrajectory( &item->pos, atTime, origin ); +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 1417 +;1415: +;1416: // we are ignoring ducked differences here +;1417: if ( ps->origin[0] - origin[0] > 44 +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 12 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 16 +INDIRF4 +CNSTF4 1110441984 +GTF4 $484 +ADDRLP4 16 +INDIRF4 +CNSTF4 3259498496 +LTF4 $484 +ADDRLP4 20 +ADDRLP4 12 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 24 +CNSTF4 1108344832 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +SUBF4 +ADDRLP4 24 +INDIRF4 +GTF4 $484 +ADDRLP4 28 +CNSTF4 3255828480 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +SUBF4 +ADDRLP4 28 +INDIRF4 +LTF4 $484 +ADDRLP4 32 +ADDRLP4 12 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +SUBF4 +ADDRLP4 24 +INDIRF4 +GTF4 $484 +ADDRLP4 32 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +SUBF4 +ADDRLP4 28 +INDIRF4 +GEF4 $474 +LABELV $484 +line 1422 +;1418: || ps->origin[0] - origin[0] < -50 +;1419: || ps->origin[1] - origin[1] > 36 +;1420: || ps->origin[1] - origin[1] < -36 +;1421: || ps->origin[2] - origin[2] > 36 +;1422: || ps->origin[2] - origin[2] < -36 ) { +line 1423 +;1423: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $473 +JUMPV +LABELV $474 +line 1426 +;1424: } +;1425: +;1426: return qtrue; +CNSTI4 1 +RETI4 +LABELV $473 +endproc BG_PlayerTouchesItem 36 12 +export BG_ProperForceIndex +proc BG_ProperForceIndex 4 0 +line 1430 +;1427:} +;1428: +;1429:int BG_ProperForceIndex(int power) +;1430:{ +line 1431 +;1431: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $487 +JUMPV +LABELV $486 +line 1434 +;1432: +;1433: while (i < NUM_FORCE_POWERS) +;1434: { +line 1435 +;1435: if (forcePowerSorted[i] == power) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +NEI4 $489 +line 1436 +;1436: { +line 1437 +;1437: return i; +ADDRLP4 0 +INDIRI4 +RETI4 +ADDRGP4 $485 +JUMPV +LABELV $489 +line 1440 +;1438: } +;1439: +;1440: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1441 +;1441: } +LABELV $487 +line 1433 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $486 +line 1443 +;1442: +;1443: return -1; +CNSTI4 -1 +RETI4 +LABELV $485 +endproc BG_ProperForceIndex 4 0 +export BG_CycleForce +proc BG_CycleForce 40 4 +line 1447 +;1444:} +;1445: +;1446:void BG_CycleForce(playerState_t *ps, int direction) +;1447:{ +line 1448 +;1448: int i = ps->fd.forcePowerSelected; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 852 +ADDP4 +INDIRI4 +ASGNI4 +line 1449 +;1449: int x = i; +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 1450 +;1450: int presel = i; +ADDRLP4 8 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 1451 +;1451: int foundnext = -1; +ADDRLP4 12 +CNSTI4 -1 +ASGNI4 +line 1453 +;1452: +;1453: if (!ps->fd.forcePowersKnown & (1 << x) || +ADDRFP4 0 +INDIRP4 +CNSTI4 844 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $496 +ADDRLP4 16 +CNSTI4 1 +ASGNI4 +ADDRGP4 $497 +JUMPV +LABELV $496 +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +LABELV $497 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +NEI4 $498 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +GEI4 $498 +ADDRLP4 0 +INDIRI4 +CNSTI4 -1 +NEI4 $492 +LABELV $498 +line 1456 +;1454: x >= NUM_FORCE_POWERS || +;1455: x == -1) +;1456: { //apparently we have no valid force powers +line 1457 +;1457: return; +ADDRGP4 $491 +JUMPV +LABELV $492 +line 1460 +;1458: } +;1459: +;1460: x = BG_ProperForceIndex(x); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 BG_ProperForceIndex +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 1461 +;1461: presel = x; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 1463 +;1462: +;1463: if (direction == 1) +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +NEI4 $499 +line 1464 +;1464: { //get the next power +line 1465 +;1465: x++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1466 +;1466: } +ADDRGP4 $500 +JUMPV +LABELV $499 +line 1468 +;1467: else +;1468: { //get the previous power +line 1469 +;1469: x--; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1470 +;1470: } +LABELV $500 +line 1472 +;1471: +;1472: if (x >= NUM_FORCE_POWERS) +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $501 +line 1473 +;1473: { //cycled off the end.. cycle around to the first +line 1474 +;1474: x = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 1475 +;1475: } +LABELV $501 +line 1476 +;1476: if (x < 0) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GEI4 $503 +line 1477 +;1477: { //cycled off the beginning.. cycle around to the last +line 1478 +;1478: x = NUM_FORCE_POWERS-1; +ADDRLP4 0 +CNSTI4 17 +ASGNI4 +line 1479 +;1479: } +LABELV $503 +line 1481 +;1480: +;1481: i = forcePowerSorted[x]; //the "sorted" value of this power +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ASGNI4 +ADDRGP4 $506 +JUMPV +LABELV $505 +line 1484 +;1482: +;1483: while (x != presel) +;1484: { //loop around to the current force power +line 1485 +;1485: if (ps->fd.forcePowersKnown & (1 << i) && i != ps->fd.forcePowerSelected) +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 844 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 4 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $508 +ADDRLP4 4 +INDIRI4 +ADDRLP4 28 +INDIRP4 +CNSTI4 852 +ADDP4 +INDIRI4 +EQI4 $508 +line 1486 +;1486: { //we have the force power +line 1487 +;1487: if (i != FP_LEVITATION && +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +EQI4 $510 +ADDRLP4 4 +INDIRI4 +CNSTI4 15 +EQI4 $510 +ADDRLP4 4 +INDIRI4 +CNSTI4 16 +EQI4 $510 +ADDRLP4 4 +INDIRI4 +CNSTI4 17 +EQI4 $510 +line 1491 +;1488: i != FP_SABERATTACK && +;1489: i != FP_SABERDEFEND && +;1490: i != FP_SABERTHROW) +;1491: { //it's selectable +line 1492 +;1492: foundnext = i; +ADDRLP4 12 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 1493 +;1493: break; +ADDRGP4 $507 +JUMPV +LABELV $510 +line 1495 +;1494: } +;1495: } +LABELV $508 +line 1497 +;1496: +;1497: if (direction == 1) +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +NEI4 $512 +line 1498 +;1498: { //next +line 1499 +;1499: x++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1500 +;1500: } +ADDRGP4 $513 +JUMPV +LABELV $512 +line 1502 +;1501: else +;1502: { //previous +line 1503 +;1503: x--; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1504 +;1504: } +LABELV $513 +line 1506 +;1505: +;1506: if (x >= NUM_FORCE_POWERS) +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $514 +line 1507 +;1507: { //loop around +line 1508 +;1508: x = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 1509 +;1509: } +LABELV $514 +line 1510 +;1510: if (x < 0) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GEI4 $516 +line 1511 +;1511: { //loop around +line 1512 +;1512: x = NUM_FORCE_POWERS-1; +ADDRLP4 0 +CNSTI4 17 +ASGNI4 +line 1513 +;1513: } +LABELV $516 +line 1515 +;1514: +;1515: i = forcePowerSorted[x]; //set to the sorted value again +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ASGNI4 +line 1516 +;1516: } +LABELV $506 +line 1483 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $505 +LABELV $507 +line 1518 +;1517: +;1518: if (foundnext != -1) +ADDRLP4 12 +INDIRI4 +CNSTI4 -1 +EQI4 $518 +line 1519 +;1519: { //found one, select it +line 1520 +;1520: ps->fd.forcePowerSelected = foundnext; +ADDRFP4 0 +INDIRP4 +CNSTI4 852 +ADDP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 1521 +;1521: } +LABELV $518 +line 1522 +;1522:} +LABELV $491 +endproc BG_CycleForce 40 4 +export BG_GetItemIndexByTag +proc BG_GetItemIndexByTag 8 0 +line 1525 +;1523: +;1524:int BG_GetItemIndexByTag(int tag, int type) +;1525:{ //Get the itemlist index from the tag and type +line 1526 +;1526: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $522 +JUMPV +LABELV $521 +line 1529 +;1527: +;1528: while (i < bg_numItems) +;1529: { +line 1530 +;1530: if (bg_itemlist[i].giTag == tag && +ADDRLP4 4 +CNSTI4 52 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +NEI4 $524 +ADDRLP4 4 +INDIRI4 +ADDRGP4 bg_itemlist+36 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +NEI4 $524 +line 1532 +;1531: bg_itemlist[i].giType == type) +;1532: { +line 1533 +;1533: return i; +ADDRLP4 0 +INDIRI4 +RETI4 +ADDRGP4 $520 +JUMPV +LABELV $524 +line 1536 +;1534: } +;1535: +;1536: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1537 +;1537: } +LABELV $522 +line 1528 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_numItems +INDIRI4 +LTI4 $521 +line 1539 +;1538: +;1539: return 0; +CNSTI4 0 +RETI4 +LABELV $520 +endproc BG_GetItemIndexByTag 8 0 +export BG_CycleInven +proc BG_CycleInven 12 8 +line 1543 +;1540:} +;1541: +;1542:void BG_CycleInven(playerState_t *ps, int direction) +;1543:{ +line 1547 +;1544: int i; +;1545: int original; +;1546: +;1547: i = bg_itemlist[ps->stats[STAT_HOLDABLE_ITEM]].giTag; +ADDRLP4 0 +CNSTI4 52 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ASGNI4 +line 1548 +;1548: original = i; +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 1550 +;1549: +;1550: if (direction == 1) +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +NEI4 $530 +line 1551 +;1551: { //next +line 1552 +;1552: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1553 +;1553: } +ADDRGP4 $533 +JUMPV +LABELV $530 +line 1555 +;1554: else +;1555: { //previous +line 1556 +;1556: i--; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1557 +;1557: } +ADDRGP4 $533 +JUMPV +LABELV $532 +line 1560 +;1558: +;1559: while (i != original) +;1560: { //go in a full loop until hitting something, if hit nothing then select nothing +line 1561 +;1561: if (ps->stats[STAT_HOLDABLE_ITEMS] & (1 << i)) +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $535 +line 1562 +;1562: { //we have it, select it. +line 1563 +;1563: ps->stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(i, IT_HOLDABLE); +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 8 +ADDRGP4 BG_GetItemIndexByTag +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 1564 +;1564: break; +ADDRGP4 $534 +JUMPV +LABELV $535 +line 1567 +;1565: } +;1566: +;1567: if (direction == 1) +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +NEI4 $537 +line 1568 +;1568: { //next +line 1569 +;1569: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1570 +;1570: } +ADDRGP4 $538 +JUMPV +LABELV $537 +line 1572 +;1571: else +;1572: { //previous +line 1573 +;1573: i--; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1574 +;1574: } +LABELV $538 +line 1576 +;1575: +;1576: if (i < 0) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GEI4 $539 +line 1577 +;1577: { //wrap around to the last +line 1578 +;1578: i = HI_NUM_HOLDABLE; +ADDRLP4 0 +CNSTI4 7 +ASGNI4 +line 1579 +;1579: } +ADDRGP4 $540 +JUMPV +LABELV $539 +line 1580 +;1580: else if (i >= HI_NUM_HOLDABLE) +ADDRLP4 0 +INDIRI4 +CNSTI4 7 +LTI4 $541 +line 1581 +;1581: { //wrap around to the first +line 1582 +;1582: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 1583 +;1583: } +LABELV $541 +LABELV $540 +line 1584 +;1584: } +LABELV $533 +line 1559 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $532 +LABELV $534 +line 1585 +;1585:} +LABELV $528 +endproc BG_CycleInven 12 8 +export BG_CanItemBeGrabbed +proc BG_CanItemBeGrabbed 56 8 +line 1595 +;1586: +;1587:/* +;1588:================ +;1589:BG_CanItemBeGrabbed +;1590: +;1591:Returns false if the item should not be picked up. +;1592:This needs to be the same for client side prediction and server use. +;1593:================ +;1594:*/ +;1595:qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const playerState_t *ps ) { +line 1598 +;1596: gitem_t *item; +;1597: +;1598: if ( ent->modelindex < 1 || ent->modelindex >= bg_numItems ) { +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +LTI4 $546 +ADDRLP4 4 +INDIRI4 +ADDRGP4 bg_numItems +INDIRI4 +LTI4 $544 +LABELV $546 +line 1599 +;1599: Com_Error( ERR_DROP, "BG_CanItemBeGrabbed: index out of range" ); +CNSTI4 1 +ARGI4 +ADDRGP4 $547 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 1600 +;1600: } +LABELV $544 +line 1602 +;1601: +;1602: item = &bg_itemlist[ent->modelindex]; +ADDRLP4 0 +CNSTI4 52 +ADDRFP4 4 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +ASGNP4 +line 1604 +;1603: +;1604: if ( ps ) +ADDRFP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $548 +line 1605 +;1605: { +line 1606 +;1606: if ( ps->trueJedi ) +ADDRFP4 8 +INDIRP4 +CNSTI4 612 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $550 +line 1607 +;1607: {//force powers and saber only +line 1608 +;1608: if ( item->giType != IT_TEAM //not a flag +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 8 +EQI4 $551 +ADDRLP4 12 +INDIRI4 +CNSTI4 3 +EQI4 $551 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +NEI4 $554 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 2 +EQI4 $551 +LABELV $554 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $555 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 1 +EQI4 $551 +LABELV $555 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $556 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 15 +NEI4 $551 +LABELV $556 +line 1613 +;1609: && item->giType != IT_ARMOR//not shields +;1610: && (item->giType != IT_WEAPON || item->giTag != WP_SABER)//not a saber +;1611: && (item->giType != IT_HOLDABLE || item->giTag != HI_SEEKER)//not a seeker +;1612: && (item->giType != IT_POWERUP || item->giTag == PW_YSALAMIRI) )//not a force pick-up +;1613: { +line 1614 +;1614: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +line 1616 +;1615: } +;1616: } +LABELV $550 +line 1617 +;1617: else if ( ps->trueNonJedi ) +ADDRFP4 8 +INDIRP4 +CNSTI4 616 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $557 +line 1618 +;1618: {//can't pick up force powerups +line 1619 +;1619: if ( (item->giType == IT_POWERUP && item->giTag != PW_YSALAMIRI) //if a powerup, can only can pick up ysalamiri +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $562 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 15 +NEI4 $563 +LABELV $562 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $564 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 1 +EQI4 $563 +LABELV $564 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $559 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $559 +LABELV $563 +line 1622 +;1620: || (item->giType == IT_HOLDABLE && item->giTag == HI_SEEKER)//if holdable, cannot pick up seeker +;1621: || (item->giType == IT_WEAPON && item->giTag == WP_SABER ) )//or if it's a saber +;1622: { +line 1623 +;1623: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $559 +line 1625 +;1624: } +;1625: } +LABELV $557 +LABELV $551 +line 1626 +;1626: if ( ps->isJediMaster && item && (item->giType == IT_WEAPON || item->giType == IT_AMMO)) +ADDRFP4 8 +INDIRP4 +CNSTI4 604 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $565 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $565 +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +EQI4 $567 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +NEI4 $565 +LABELV $567 +line 1627 +;1627: {//jedi master cannot pick up weapons +line 1628 +;1628: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $565 +line 1630 +;1629: } +;1630: if ( ps->duelInProgress ) +ADDRFP4 8 +INDIRP4 +CNSTI4 1304 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $549 +line 1631 +;1631: { //no picking stuff up while in a duel, no matter what the type is +line 1632 +;1632: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +line 1634 +;1633: } +;1634: } +LABELV $548 +line 1636 +;1635: else +;1636: {//safety return since below code assumes a non-null ps +line 1637 +;1637: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $549 +line 1640 +;1638: } +;1639: +;1640: switch( item->giType ) { +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +LTI4 $571 +ADDRLP4 8 +INDIRI4 +CNSTI4 8 +GTI4 $571 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $622 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $622 +address $620 +address $573 +address $578 +address $581 +address $584 +address $594 +address $617 +address $571 +address $599 +code +LABELV $573 +line 1642 +;1641: case IT_WEAPON: +;1642: if (ent->generic1 == ps->clientNum && ent->powerups) +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +NEI4 $574 +ADDRLP4 16 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $574 +line 1643 +;1643: { +line 1644 +;1644: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $574 +line 1646 +;1645: } +;1646: if (!(ent->eFlags & EF_DROPPEDWEAPON) && (ps->stats[STAT_WEAPONS] & (1 << item->giTag)) && +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 16777216 +BANDI4 +ADDRLP4 20 +INDIRI4 +NEI4 $576 +ADDRLP4 24 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 24 +INDIRI4 +LSHI4 +BANDI4 +ADDRLP4 20 +INDIRI4 +EQI4 $576 +ADDRLP4 24 +INDIRI4 +CNSTI4 11 +EQI4 $576 +ADDRLP4 24 +INDIRI4 +CNSTI4 12 +EQI4 $576 +ADDRLP4 24 +INDIRI4 +CNSTI4 13 +EQI4 $576 +line 1648 +;1647: item->giTag != WP_THERMAL && item->giTag != WP_TRIP_MINE && item->giTag != WP_DET_PACK) +;1648: { //weaponstay stuff.. if this isn't dropped, and you already have it, you don't get it. +line 1649 +;1649: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $576 +line 1651 +;1650: } +;1651: return qtrue; // weapons are always picked up +CNSTI4 1 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $578 +line 1654 +;1652: +;1653: case IT_AMMO: +;1654: if ( ps->ammo[item->giTag] >= ammoData[item->giTag].max) { +ADDRLP4 28 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +ADDRGP4 ammoData +ADDP4 +INDIRI4 +LTI4 $579 +line 1655 +;1655: return qfalse; // can't hold any more +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $579 +line 1657 +;1656: } +;1657: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $581 +line 1660 +;1658: +;1659: case IT_ARMOR: +;1660: if ( ps->stats[STAT_ARMOR] >= ps->stats[STAT_MAX_HEALTH] * item->giTag ) { +ADDRLP4 32 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +MULI4 +LTI4 $582 +line 1661 +;1661: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $582 +line 1663 +;1662: } +;1663: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $584 +line 1668 +;1664: +;1665: case IT_HEALTH: +;1666: // small and mega healths will go over the max, otherwise +;1667: // don't pick up if already at max +;1668: if ((ps->fd.forcePowersActive & (1 << FP_RAGE))) +ADDRFP4 8 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $585 +line 1669 +;1669: { +line 1670 +;1670: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $585 +line 1673 +;1671: } +;1672: +;1673: if ( item->quantity == 5 || item->quantity == 100 ) { +ADDRLP4 36 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 5 +EQI4 $589 +ADDRLP4 36 +INDIRI4 +CNSTI4 100 +NEI4 $587 +LABELV $589 +line 1674 +;1674: if ( ps->stats[STAT_HEALTH] >= ps->stats[STAT_MAX_HEALTH] * 2 ) { +ADDRLP4 40 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 1 +LSHI4 +LTI4 $590 +line 1675 +;1675: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $590 +line 1677 +;1676: } +;1677: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $587 +line 1680 +;1678: } +;1679: +;1680: if ( ps->stats[STAT_HEALTH] >= ps->stats[STAT_MAX_HEALTH] ) { +ADDRLP4 40 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +LTI4 $592 +line 1681 +;1681: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $592 +line 1683 +;1682: } +;1683: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $594 +line 1686 +;1684: +;1685: case IT_POWERUP: +;1686: if (ps && (ps->powerups[PW_YSALAMIRI])) +ADDRLP4 44 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $595 +ADDRLP4 44 +INDIRP4 +CNSTI4 404 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $595 +line 1687 +;1687: { +line 1688 +;1688: if (item->giTag != PW_YSALAMIRI) +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 15 +EQI4 $597 +line 1689 +;1689: { +line 1690 +;1690: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $597 +line 1692 +;1691: } +;1692: } +LABELV $595 +line 1693 +;1693: return qtrue; // powerups are always picked up +CNSTI4 1 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $599 +line 1696 +;1694: +;1695: case IT_TEAM: // team items, such as flags +;1696: if( gametype == GT_CTF || gametype == GT_CTY ) { +ADDRLP4 48 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 7 +EQI4 $602 +ADDRLP4 48 +INDIRI4 +CNSTI4 8 +NEI4 $600 +LABELV $602 +line 1700 +;1697: // ent->modelindex2 is non-zero on items if they are dropped +;1698: // we need to know this because we can pick up our dropped flag (and return it) +;1699: // but we can't pick up our flag at base +;1700: if (ps->persistant[PERS_TEAM] == TEAM_RED) { +ADDRFP4 8 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $603 +line 1701 +;1701: if (item->giTag == PW_BLUEFLAG || +ADDRLP4 52 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 5 +EQI4 $608 +ADDRLP4 52 +INDIRI4 +CNSTI4 4 +NEI4 $609 +ADDRFP4 4 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $608 +LABELV $609 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 4 +NEI4 $604 +ADDRFP4 8 +INDIRP4 +CNSTI4 364 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $604 +LABELV $608 +line 1704 +;1702: (item->giTag == PW_REDFLAG && ent->modelindex2) || +;1703: (item->giTag == PW_REDFLAG && ps->powerups[PW_BLUEFLAG]) ) +;1704: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $543 +JUMPV +line 1705 +;1705: } else if (ps->persistant[PERS_TEAM] == TEAM_BLUE) { +LABELV $603 +ADDRFP4 8 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $610 +line 1706 +;1706: if (item->giTag == PW_REDFLAG || +ADDRLP4 52 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 4 +EQI4 $615 +ADDRLP4 52 +INDIRI4 +CNSTI4 5 +NEI4 $616 +ADDRFP4 4 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $615 +LABELV $616 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $612 +ADDRFP4 8 +INDIRP4 +CNSTI4 360 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $612 +LABELV $615 +line 1709 +;1707: (item->giTag == PW_BLUEFLAG && ent->modelindex2) || +;1708: (item->giTag == PW_BLUEFLAG && ps->powerups[PW_REDFLAG]) ) +;1709: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $612 +line 1710 +;1710: } +LABELV $610 +LABELV $604 +line 1711 +;1711: } +LABELV $600 +line 1713 +;1712: +;1713: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $617 +line 1716 +;1714: +;1715: case IT_HOLDABLE: +;1716: if ( ps->stats[STAT_HOLDABLE_ITEMS] & (1 << item->giTag)) +ADDRFP4 8 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $618 +line 1717 +;1717: { +line 1718 +;1718: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $618 +line 1720 +;1719: } +;1720: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $543 +JUMPV +LABELV $620 +line 1723 +;1721: +;1722: case IT_BAD: +;1723: Com_Error( ERR_DROP, "BG_CanItemBeGrabbed: IT_BAD" ); +CNSTI4 1 +ARGI4 +ADDRGP4 $621 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 1730 +;1724: default: +;1725:#ifndef Q3_VM +;1726:#ifndef NDEBUG // bk0001204 +;1727: Com_Printf("BG_CanItemBeGrabbed: unknown enum %d\n", item->giType ); +;1728:#endif +;1729:#endif +;1730: break; +LABELV $571 +line 1733 +;1731: } +;1732: +;1733: return qfalse; +CNSTI4 0 +RETI4 +LABELV $543 +endproc BG_CanItemBeGrabbed 56 8 +export BG_EvaluateTrajectory +proc BG_EvaluateTrajectory 84 12 +line 1744 +;1734:} +;1735: +;1736://====================================================================== +;1737: +;1738:/* +;1739:================ +;1740:BG_EvaluateTrajectory +;1741: +;1742:================ +;1743:*/ +;1744:void BG_EvaluateTrajectory( const trajectory_t *tr, int atTime, vec3_t result ) { +line 1748 +;1745: float deltaTime; +;1746: float phase; +;1747: +;1748: switch( tr->trType ) { +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +LTI4 $624 +ADDRLP4 8 +INDIRI4 +CNSTI4 5 +GTI4 $624 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $637 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $637 +address $627 +address $627 +address $628 +address $630 +address $629 +address $635 +code +LABELV $627 +line 1751 +;1749: case TR_STATIONARY: +;1750: case TR_INTERPOLATE: +;1751: VectorCopy( tr->trBase, result ); +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRB +ASGNB 12 +line 1752 +;1752: break; +ADDRGP4 $625 +JUMPV +LABELV $628 +line 1754 +;1753: case TR_LINEAR: +;1754: deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds +ADDRLP4 0 +CNSTF4 981668463 +ADDRFP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 1755 +;1755: VectorMA( tr->trBase, deltaTime, tr->trDelta, result ); +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1756 +;1756: break; +ADDRGP4 $625 +JUMPV +LABELV $629 +line 1758 +;1757: case TR_SINE: +;1758: deltaTime = ( atTime - tr->trTime ) / (float) tr->trDuration; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +ADDRLP4 28 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 28 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 1759 +;1759: phase = sin( deltaTime * M_PI * 2 ); +CNSTF4 1073741824 +CNSTF4 1078530011 +ADDRLP4 0 +INDIRF4 +MULF4 +MULF4 +ARGF4 +ADDRLP4 32 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 1760 +;1760: VectorMA( tr->trBase, phase, tr->trDelta, result ); +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 44 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1761 +;1761: break; +ADDRGP4 $625 +JUMPV +LABELV $630 +line 1763 +;1762: case TR_LINEAR_STOP: +;1763: if ( atTime > tr->trTime + tr->trDuration ) { +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 4 +INDIRI4 +ADDRLP4 48 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 48 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDI4 +LEI4 $631 +line 1764 +;1764: atTime = tr->trTime + tr->trDuration; +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 4 +ADDRLP4 52 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 52 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 1765 +;1765: } +LABELV $631 +line 1766 +;1766: deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds +ADDRLP4 0 +CNSTF4 981668463 +ADDRFP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 1767 +;1767: if ( deltaTime < 0 ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +GEF4 $633 +line 1768 +;1768: deltaTime = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 1769 +;1769: } +LABELV $633 +line 1770 +;1770: VectorMA( tr->trBase, deltaTime, tr->trDelta, result ); +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1771 +;1771: break; +ADDRGP4 $625 +JUMPV +LABELV $635 +line 1773 +;1772: case TR_GRAVITY: +;1773: deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds +ADDRLP4 0 +CNSTF4 981668463 +ADDRFP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 1774 +;1774: VectorMA( tr->trBase, deltaTime, tr->trDelta, result ); +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 64 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 68 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 68 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 68 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 72 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1775 +;1775: result[2] -= 0.5 * DEFAULT_GRAVITY * deltaTime * deltaTime; // FIXME: local gravity... +ADDRLP4 76 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 80 +ADDRLP4 0 +INDIRF4 +ASGNF4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 76 +INDIRP4 +INDIRF4 +CNSTF4 1137180672 +ADDRLP4 80 +INDIRF4 +MULF4 +ADDRLP4 80 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 1776 +;1776: break; +ADDRGP4 $625 +JUMPV +LABELV $624 +line 1781 +;1777: default: +;1778:#ifdef QAGAME +;1779: Com_Error( ERR_DROP, "BG_EvaluateTrajectory: [GAME SIDE] unknown trType: %i", tr->trType ); +;1780:#else +;1781: Com_Error( ERR_DROP, "BG_EvaluateTrajectory: [CLIENTGAME SIDE] unknown trType: %i", tr->trType ); +CNSTI4 1 +ARGI4 +ADDRGP4 $636 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 Com_Error +CALLV +pop +line 1783 +;1782:#endif +;1783: break; +LABELV $625 +line 1785 +;1784: } +;1785:} +LABELV $623 +endproc BG_EvaluateTrajectory 84 12 +export BG_EvaluateTrajectoryDelta +proc BG_EvaluateTrajectoryDelta 44 12 +line 1794 +;1786: +;1787:/* +;1788:================ +;1789:BG_EvaluateTrajectoryDelta +;1790: +;1791:For determining velocity at a given time +;1792:================ +;1793:*/ +;1794:void BG_EvaluateTrajectoryDelta( const trajectory_t *tr, int atTime, vec3_t result ) { +line 1798 +;1795: float deltaTime; +;1796: float phase; +;1797: +;1798: switch( tr->trType ) { +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +LTI4 $639 +ADDRLP4 8 +INDIRI4 +CNSTI4 5 +GTI4 $639 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $650 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $650 +address $642 +address $642 +address $643 +address $645 +address $644 +address $648 +code +LABELV $642 +line 1801 +;1799: case TR_STATIONARY: +;1800: case TR_INTERPOLATE: +;1801: VectorClear( result ); +ADDRLP4 16 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 20 +CNSTF4 0 +ASGNF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 20 +INDIRF4 +ASGNF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 20 +INDIRF4 +ASGNF4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 20 +INDIRF4 +ASGNF4 +line 1802 +;1802: break; +ADDRGP4 $640 +JUMPV +LABELV $643 +line 1804 +;1803: case TR_LINEAR: +;1804: VectorCopy( tr->trDelta, result ); +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRB +ASGNB 12 +line 1805 +;1805: break; +ADDRGP4 $640 +JUMPV +LABELV $644 +line 1807 +;1806: case TR_SINE: +;1807: deltaTime = ( atTime - tr->trTime ) / (float) tr->trDuration; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRFP4 4 +INDIRI4 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 24 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 1808 +;1808: phase = cos( deltaTime * M_PI * 2 ); // derivative of sin = cos +CNSTF4 1073741824 +CNSTF4 1078530011 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ARGF4 +ADDRLP4 28 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 1809 +;1809: phase *= 0.5; +ADDRLP4 0 +CNSTF4 1056964608 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 1810 +;1810: VectorScale( tr->trDelta, phase, result ); +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 1811 +;1811: break; +ADDRGP4 $640 +JUMPV +LABELV $645 +line 1813 +;1812: case TR_LINEAR_STOP: +;1813: if ( atTime > tr->trTime + tr->trDuration ) { +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 4 +INDIRI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDI4 +LEI4 $646 +line 1814 +;1814: VectorClear( result ); +ADDRLP4 36 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 40 +CNSTF4 0 +ASGNF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 40 +INDIRF4 +ASGNF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 40 +INDIRF4 +ASGNF4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 40 +INDIRF4 +ASGNF4 +line 1815 +;1815: return; +ADDRGP4 $638 +JUMPV +LABELV $646 +line 1817 +;1816: } +;1817: VectorCopy( tr->trDelta, result ); +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRB +ASGNB 12 +line 1818 +;1818: break; +ADDRGP4 $640 +JUMPV +LABELV $648 +line 1820 +;1819: case TR_GRAVITY: +;1820: deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds +ADDRLP4 4 +CNSTF4 981668463 +ADDRFP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 1821 +;1821: VectorCopy( tr->trDelta, result ); +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRB +ASGNB 12 +line 1822 +;1822: result[2] -= DEFAULT_GRAVITY * deltaTime; // FIXME: local gravity... +ADDRLP4 36 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +CNSTF4 1145569280 +ADDRLP4 4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 1823 +;1823: break; +ADDRGP4 $640 +JUMPV +LABELV $639 +line 1825 +;1824: default: +;1825: Com_Error( ERR_DROP, "BG_EvaluateTrajectoryDelta: unknown trType: %i", tr->trTime ); +CNSTI4 1 +ARGI4 +ADDRGP4 $649 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 Com_Error +CALLV +pop +line 1826 +;1826: break; +LABELV $640 +line 1828 +;1827: } +;1828:} +LABELV $638 +endproc BG_EvaluateTrajectoryDelta 44 12 +data +export eventnames +align 4 +LABELV eventnames +address $651 +address $652 +address $653 +address $654 +address $655 +address $656 +address $657 +address $658 +address $659 +address $660 +address $661 +address $662 +address $663 +address $664 +address $665 +address $666 +address $667 +address $668 +address $669 +address $670 +address $671 +address $672 +address $673 +address $674 +address $675 +address $676 +address $677 +address $678 +address $679 +address $680 +address $681 +address $682 +address $683 +address $684 +address $685 +address $686 +address $687 +address $688 +address $689 +address $690 +address $691 +address $692 +address $693 +address $694 +address $695 +address $696 +address $697 +address $698 +address $699 +address $700 +address $701 +address $702 +address $703 +address $704 +address $705 +address $706 +address $707 +address $708 +address $709 +address $710 +address $711 +address $712 +address $713 +address $714 +address $715 +address $716 +address $717 +address $718 +address $719 +address $720 +address $721 +address $722 +address $723 +address $724 +address $725 +address $726 +address $727 +address $728 +address $729 +address $730 +address $731 +address $732 +address $733 +address $734 +address $735 +address $736 +address $737 +address $738 +address $739 +address $740 +address $741 +address $742 +address $743 +address $744 +address $745 +address $746 +address $747 +address $748 +address $749 +address $750 +address $751 +address $752 +address $753 +address $754 +address $755 +address $756 +address $757 +address $758 +address $759 +address $760 +export BG_AddPredictableEventToPlayerstate +code +proc BG_AddPredictableEventToPlayerstate 12 0 +line 1991 +;1829: +;1830:char *eventnames[] = { +;1831: "EV_NONE", +;1832: +;1833: "EV_CLIENTJOIN", +;1834: +;1835: "EV_FOOTSTEP", +;1836: "EV_FOOTSTEP_METAL", +;1837: "EV_FOOTSPLASH", +;1838: "EV_FOOTWADE", +;1839: "EV_SWIM", +;1840: +;1841: "EV_STEP_4", +;1842: "EV_STEP_8", +;1843: "EV_STEP_12", +;1844: "EV_STEP_16", +;1845: +;1846: "EV_FALL", +;1847: +;1848: "EV_JUMP_PAD", // boing sound at origin", jump sound on player +;1849: +;1850: "EV_PRIVATE_DUEL", +;1851: +;1852: "EV_JUMP", +;1853: "EV_ROLL", +;1854: "EV_WATER_TOUCH", // foot touches +;1855: "EV_WATER_LEAVE", // foot leaves +;1856: "EV_WATER_UNDER", // head touches +;1857: "EV_WATER_CLEAR", // head leaves +;1858: +;1859: "EV_ITEM_PICKUP", // normal item pickups are predictable +;1860: "EV_GLOBAL_ITEM_PICKUP", // powerup / team sounds are broadcast to everyone +;1861: +;1862: "EV_NOAMMO", +;1863: "EV_CHANGE_WEAPON", +;1864: "EV_FIRE_WEAPON", +;1865: "EV_ALT_FIRE", +;1866: "EV_SABER_ATTACK", +;1867: "EV_SABER_HIT", +;1868: "EV_SABER_BLOCK", +;1869: "EV_SABER_UNHOLSTER", +;1870: "EV_BECOME_JEDIMASTER", +;1871: "EV_DISRUPTOR_MAIN_SHOT", +;1872: "EV_DISRUPTOR_SNIPER_SHOT", +;1873: "EV_DISRUPTOR_SNIPER_MISS", +;1874: "EV_DISRUPTOR_HIT", +;1875: "EV_DISRUPTOR_ZOOMSOUND", +;1876: +;1877: "EV_PREDEFSOUND", +;1878: +;1879: "EV_TEAM_POWER", +;1880: +;1881: "EV_SCREENSHAKE", +;1882: +;1883: "EV_USE", // +Use key +;1884: +;1885: "EV_USE_ITEM0", +;1886: "EV_USE_ITEM1", +;1887: "EV_USE_ITEM2", +;1888: "EV_USE_ITEM3", +;1889: "EV_USE_ITEM4", +;1890: "EV_USE_ITEM5", +;1891: "EV_USE_ITEM6", +;1892: "EV_USE_ITEM7", +;1893: "EV_USE_ITEM8", +;1894: "EV_USE_ITEM9", +;1895: "EV_USE_ITEM10", +;1896: "EV_USE_ITEM11", +;1897: "EV_USE_ITEM12", +;1898: "EV_USE_ITEM13", +;1899: "EV_USE_ITEM14", +;1900: "EV_USE_ITEM15", +;1901: +;1902: "EV_ITEMUSEFAIL", +;1903: +;1904: "EV_ITEM_RESPAWN", +;1905: "EV_ITEM_POP", +;1906: "EV_PLAYER_TELEPORT_IN", +;1907: "EV_PLAYER_TELEPORT_OUT", +;1908: +;1909: "EV_GRENADE_BOUNCE", // eventParm will be the soundindex +;1910: "EV_MISSILE_STICK", +;1911: +;1912: "EV_PLAY_EFFECT", +;1913: "EV_PLAY_EFFECT_ID", //finally gave in and added it.. +;1914: +;1915: "EV_MUTE_SOUND", +;1916: "EV_GENERAL_SOUND", +;1917: "EV_GLOBAL_SOUND", // no attenuation +;1918: "EV_GLOBAL_TEAM_SOUND", +;1919: "EV_ENTITY_SOUND", +;1920: +;1921: "EV_PLAY_ROFF", +;1922: +;1923: "EV_GLASS_SHATTER", +;1924: "EV_DEBRIS", +;1925: +;1926: "EV_MISSILE_HIT", +;1927: "EV_MISSILE_MISS", +;1928: "EV_MISSILE_MISS_METAL", +;1929: "EV_BULLET", // otherEntity is the shooter +;1930: +;1931: "EV_PAIN", +;1932: "EV_DEATH1", +;1933: "EV_DEATH2", +;1934: "EV_DEATH3", +;1935: "EV_OBITUARY", +;1936: +;1937: "EV_POWERUP_QUAD", +;1938: "EV_POWERUP_BATTLESUIT", +;1939: //"EV_POWERUP_REGEN", +;1940: +;1941: "EV_FORCE_DRAINED", +;1942: +;1943: "EV_GIB_PLAYER", // gib a previously living player +;1944: "EV_SCOREPLUM", // score plum +;1945: +;1946: "EV_CTFMESSAGE", +;1947: +;1948: "EV_SAGA_ROUNDOVER", +;1949: "EV_SAGA_OBJECTIVECOMPLETE", +;1950: +;1951: "EV_DESTROY_GHOUL2_INSTANCE", +;1952: +;1953: "EV_DESTROY_WEAPON_MODEL", +;1954: +;1955: "EV_GIVE_NEW_RANK", +;1956: "EV_SET_FREE_SABER", +;1957: "EV_SET_FORCE_DISABLE", +;1958: +;1959: "EV_WEAPON_CHARGE", +;1960: "EV_WEAPON_CHARGE_ALT", +;1961: +;1962: "EV_SHIELD_HIT", +;1963: +;1964: "EV_DEBUG_LINE", +;1965: "EV_TESTLINE", +;1966: "EV_STOPLOOPINGSOUND", +;1967: "EV_STARTLOOPINGSOUND", +;1968: "EV_TAUNT", +;1969: +;1970: "EV_TAUNT_YES", +;1971: "EV_TAUNT_NO", +;1972: "EV_TAUNT_FOLLOWME", +;1973: "EV_TAUNT_GETFLAG", +;1974: "EV_TAUNT_GUARDBASE", +;1975: "EV_TAUNT_PATROL", +;1976: +;1977: "EV_BODY_QUEUE_COPY" +;1978: +;1979:}; +;1980: +;1981:/* +;1982:=============== +;1983:BG_AddPredictableEventToPlayerstate +;1984: +;1985:Handles the sequence numbers +;1986:=============== +;1987:*/ +;1988: +;1989:void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int bufsize ); +;1990: +;1991:void BG_AddPredictableEventToPlayerstate( int newEvent, int eventParm, playerState_t *ps ) { +line 2006 +;1992: +;1993:#ifdef _DEBUG +;1994: { +;1995: char buf[256]; +;1996: trap_Cvar_VariableStringBuffer("showevents", buf, sizeof(buf)); +;1997: if ( atof(buf) != 0 ) { +;1998:#ifdef QAGAME +;1999: Com_Printf(" game event svt %5d -> %5d: num = %20s parm %d\n", ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence, eventnames[newEvent], eventParm); +;2000:#else +;2001: Com_Printf("Cgame event svt %5d -> %5d: num = %20s parm %d\n", ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence, eventnames[newEvent], eventParm); +;2002:#endif +;2003: } +;2004: } +;2005:#endif +;2006: ps->events[ps->eventSequence & (MAX_PS_EVENTS-1)] = newEvent; +ADDRLP4 0 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 2007 +;2007: ps->eventParms[ps->eventSequence & (MAX_PS_EVENTS-1)] = eventParm; +ADDRLP4 4 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 124 +ADDP4 +ADDP4 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 2008 +;2008: ps->eventSequence++; +ADDRLP4 8 +ADDRFP4 8 +INDIRP4 +CNSTI4 112 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2009 +;2009:} +LABELV $761 +endproc BG_AddPredictableEventToPlayerstate 12 0 +export BG_TouchJumpPad +proc BG_TouchJumpPad 32 8 +line 2016 +;2010: +;2011:/* +;2012:======================== +;2013:BG_TouchJumpPad +;2014:======================== +;2015:*/ +;2016:void BG_TouchJumpPad( playerState_t *ps, entityState_t *jumppad ) { +line 2022 +;2017: vec3_t angles; +;2018: float p; +;2019: int effectNum; +;2020: +;2021: // spectators don't use jump pads +;2022: if ( ps->pm_type != PM_NORMAL && ps->pm_type != PM_FLOAT ) { +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $763 +ADDRLP4 20 +INDIRI4 +CNSTI4 1 +EQI4 $763 +line 2023 +;2023: return; +ADDRGP4 $762 +JUMPV +LABELV $763 +line 2028 +;2024: } +;2025: +;2026: // if we didn't hit this same jumppad the previous frame +;2027: // then don't play the event sound again if we are in a fat trigger +;2028: if ( ps->jumppad_ent != jumppad->number ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 480 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +INDIRI4 +EQI4 $765 +line 2030 +;2029: +;2030: vectoangles( jumppad->origin2, angles); +ADDRFP4 4 +INDIRP4 +CNSTI4 104 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 2031 +;2031: p = fabs( AngleNormalize180( angles[PITCH] ) ); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 AngleNormalize180 +CALLF4 +ASGNF4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRLP4 28 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 12 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 2032 +;2032: if( p < 45 ) { +ADDRLP4 12 +INDIRF4 +CNSTF4 1110704128 +GEF4 $767 +line 2033 +;2033: effectNum = 0; +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +line 2034 +;2034: } else { +ADDRGP4 $768 +JUMPV +LABELV $767 +line 2035 +;2035: effectNum = 1; +ADDRLP4 16 +CNSTI4 1 +ASGNI4 +line 2036 +;2036: } +LABELV $768 +line 2037 +;2037: } +LABELV $765 +line 2039 +;2038: // remember hitting this jumppad this frame +;2039: ps->jumppad_ent = jumppad->number; +ADDRFP4 0 +INDIRP4 +CNSTI4 480 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRI4 +ASGNI4 +line 2040 +;2040: ps->jumppad_frame = ps->pmove_framecount; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 492 +ADDP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 488 +ADDP4 +INDIRI4 +ASGNI4 +line 2042 +;2041: // give the player the velocity from the jumppad +;2042: VectorCopy( jumppad->origin2, ps->velocity ); +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRB +ASGNB 12 +line 2043 +;2043:} +LABELV $762 +endproc BG_TouchJumpPad 32 8 +export BG_PlayerStateToEntityState +proc BG_PlayerStateToEntityState 28 0 +line 2053 +;2044: +;2045:/* +;2046:======================== +;2047:BG_PlayerStateToEntityState +;2048: +;2049:This is done after each set of usercmd_t on the server, +;2050:and after local prediction on the client +;2051:======================== +;2052:*/ +;2053:void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean snap ) { +line 2056 +;2054: int i; +;2055: +;2056: if ( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR ) { +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 6 +EQI4 $772 +ADDRLP4 4 +INDIRI4 +CNSTI4 3 +NEI4 $770 +LABELV $772 +line 2057 +;2057: s->eType = ET_INVISIBLE; +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 12 +ASGNI4 +line 2058 +;2058: } else if ( ps->stats[STAT_HEALTH] <= GIB_HEALTH ) { +ADDRGP4 $771 +JUMPV +LABELV $770 +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 -40 +GTI4 $773 +line 2059 +;2059: s->eType = ET_INVISIBLE; +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 12 +ASGNI4 +line 2060 +;2060: } else { +ADDRGP4 $774 +JUMPV +LABELV $773 +line 2061 +;2061: s->eType = ET_PLAYER; +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2062 +;2062: } +LABELV $774 +LABELV $771 +line 2064 +;2063: +;2064: s->number = ps->clientNum; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ASGNI4 +line 2066 +;2065: +;2066: s->pos.trType = TR_INTERPOLATE; +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2067 +;2067: VectorCopy( ps->origin, s->pos.trBase ); +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 2068 +;2068: if ( snap ) { +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $775 +line 2069 +;2069: SnapVector( s->pos.trBase ); +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +line 2070 +;2070: } +LABELV $775 +line 2072 +;2071: // set the trDelta for flag direction +;2072: VectorCopy( ps->velocity, s->pos.trDelta ); +ADDRFP4 4 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRB +ASGNB 12 +line 2074 +;2073: +;2074: s->apos.trType = TR_INTERPOLATE; +ADDRFP4 4 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2075 +;2075: VectorCopy( ps->viewangles, s->apos.trBase ); +ADDRFP4 4 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRB +ASGNB 12 +line 2076 +;2076: if ( snap ) { +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $777 +line 2077 +;2077: SnapVector( s->apos.trBase ); +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +CNSTI4 64 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +line 2078 +;2078: } +LABELV $777 +line 2080 +;2079: +;2080: s->trickedentindex = ps->fd.forceMindtrickTargetIndex; +ADDRFP4 4 +INDIRP4 +CNSTI4 148 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1156 +ADDP4 +INDIRI4 +ASGNI4 +line 2081 +;2081: s->trickedentindex2 = ps->fd.forceMindtrickTargetIndex2; +ADDRFP4 4 +INDIRP4 +CNSTI4 152 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1160 +ADDP4 +INDIRI4 +ASGNI4 +line 2082 +;2082: s->trickedentindex3 = ps->fd.forceMindtrickTargetIndex3; +ADDRFP4 4 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1164 +ADDP4 +INDIRI4 +ASGNI4 +line 2083 +;2083: s->trickedentindex4 = ps->fd.forceMindtrickTargetIndex4; +ADDRFP4 4 +INDIRP4 +CNSTI4 160 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1168 +ADDP4 +INDIRI4 +ASGNI4 +line 2085 +;2084: +;2085: s->forceFrame = ps->saberLockFrame; +ADDRFP4 4 +INDIRP4 +CNSTI4 288 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 532 +ADDP4 +INDIRI4 +ASGNI4 +line 2087 +;2086: +;2087: s->emplacedOwner = ps->electrifyTime; +ADDRFP4 4 +INDIRP4 +CNSTI4 180 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 740 +ADDP4 +INDIRI4 +ASGNI4 +line 2089 +;2088: +;2089: s->speed = ps->speed; +ADDRFP4 4 +INDIRP4 +CNSTI4 164 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2091 +;2090: +;2091: s->genericenemyindex = ps->genericEnemyIndex; +ADDRFP4 4 +INDIRP4 +CNSTI4 172 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 624 +ADDP4 +INDIRI4 +ASGNI4 +line 2093 +;2092: +;2093: s->activeForcePass = ps->activeForcePass; +ADDRFP4 4 +INDIRP4 +CNSTI4 176 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 636 +ADDP4 +INDIRI4 +ASGNI4 +line 2095 +;2094: +;2095: s->angles2[YAW] = ps->movementDir; +ADDRFP4 4 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2096 +;2096: s->legsAnim = ps->legsAnim; +ADDRFP4 4 +INDIRP4 +CNSTI4 280 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ASGNI4 +line 2097 +;2097: s->torsoAnim = ps->torsoAnim; +ADDRFP4 4 +INDIRP4 +CNSTI4 284 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ASGNI4 +line 2098 +;2098: s->clientNum = ps->clientNum; // ET_PLAYER looks here instead of at number +ADDRFP4 4 +INDIRP4 +CNSTI4 220 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ASGNI4 +line 2100 +;2099: // so corpses can also reference the proper config +;2100: s->eFlags = ps->eFlags; +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +ASGNI4 +line 2102 +;2101: +;2102: s->saberInFlight = ps->saberInFlight; +ADDRFP4 4 +INDIRP4 +CNSTI4 228 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRI4 +ASGNI4 +line 2103 +;2103: s->saberEntityNum = ps->saberEntityNum; +ADDRFP4 4 +INDIRP4 +CNSTI4 232 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ASGNI4 +line 2104 +;2104: s->saberMove = ps->saberMove; +ADDRFP4 4 +INDIRP4 +CNSTI4 236 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ASGNI4 +line 2105 +;2105: s->forcePowersActive = ps->fd.forcePowersActive; +ADDRFP4 4 +INDIRP4 +CNSTI4 240 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +ASGNI4 +line 2107 +;2106: +;2107: if (ps->duelInProgress) +ADDRFP4 0 +INDIRP4 +CNSTI4 1304 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $779 +line 2108 +;2108: { +line 2109 +;2109: s->bolt1 = 1; +ADDRFP4 4 +INDIRP4 +CNSTI4 140 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2110 +;2110: } +ADDRGP4 $780 +JUMPV +LABELV $779 +line 2112 +;2111: else +;2112: { +line 2113 +;2113: s->bolt1 = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 140 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2114 +;2114: } +LABELV $780 +line 2116 +;2115: +;2116: if (ps->dualBlade) +ADDRFP4 0 +INDIRP4 +CNSTI4 1364 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $781 +line 2117 +;2117: { +line 2118 +;2118: s->bolt2 = 1; +ADDRFP4 4 +INDIRP4 +CNSTI4 144 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2119 +;2119: } +ADDRGP4 $782 +JUMPV +LABELV $781 +line 2121 +;2120: else +;2121: { +line 2122 +;2122: s->bolt2 = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 144 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2123 +;2123: } +LABELV $782 +line 2125 +;2124: +;2125: s->otherEntityNum2 = ps->emplacedIndex; +ADDRFP4 4 +INDIRP4 +CNSTI4 188 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 596 +ADDP4 +INDIRI4 +ASGNI4 +line 2127 +;2126: +;2127: s->shouldtarget = ps->saberHolstered; //reuse bool in entitystate for players differently +ADDRFP4 4 +INDIRP4 +CNSTI4 268 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1312 +ADDP4 +INDIRI4 +ASGNI4 +line 2128 +;2128: s->teamowner = ps->usingATST; +ADDRFP4 4 +INDIRP4 +CNSTI4 264 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +ASGNI4 +line 2130 +;2129: +;2130: if (ps->genericEnemyIndex != -1) +ADDRFP4 0 +INDIRP4 +CNSTI4 624 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $783 +line 2131 +;2131: { +line 2132 +;2132: s->eFlags |= EF_SEEKERDRONE; +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1048576 +BORI4 +ASGNI4 +line 2133 +;2133: } +LABELV $783 +line 2135 +;2134: +;2135: if ( ps->stats[STAT_HEALTH] <= 0 ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $785 +line 2136 +;2136: s->eFlags |= EF_DEAD; +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 2137 +;2137: } else { +ADDRGP4 $786 +JUMPV +LABELV $785 +line 2138 +;2138: s->eFlags &= ~EF_DEAD; +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 2139 +;2139: } +LABELV $786 +line 2141 +;2140: +;2141: if ( ps->externalEvent ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $787 +line 2142 +;2142: s->event = ps->externalEvent; +ADDRFP4 4 +INDIRP4 +CNSTI4 252 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRI4 +ASGNI4 +line 2143 +;2143: s->eventParm = ps->externalEventParm; +ADDRFP4 4 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRI4 +ASGNI4 +line 2144 +;2144: } else if ( ps->entityEventSequence < ps->eventSequence ) { +ADDRGP4 $788 +JUMPV +LABELV $787 +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 496 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +GEI4 $789 +line 2147 +;2145: int seq; +;2146: +;2147: if ( ps->entityEventSequence < ps->eventSequence - MAX_PS_EVENTS) { +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 496 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +CNSTI4 2 +SUBI4 +GEI4 $791 +line 2148 +;2148: ps->entityEventSequence = ps->eventSequence - MAX_PS_EVENTS; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 496 +ADDP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +CNSTI4 2 +SUBI4 +ASGNI4 +line 2149 +;2149: } +LABELV $791 +line 2150 +;2150: seq = ps->entityEventSequence & (MAX_PS_EVENTS-1); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 496 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ASGNI4 +line 2151 +;2151: s->event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 ); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 252 +ADDP4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 496 +ADDP4 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 8 +LSHI4 +BORI4 +ASGNI4 +line 2152 +;2152: s->eventParm = ps->eventParms[ seq ]; +ADDRFP4 4 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 2153 +;2153: ps->entityEventSequence++; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 496 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2154 +;2154: } +LABELV $789 +LABELV $788 +line 2157 +;2155: +;2156: +;2157: s->weapon = ps->weapon; +ADDRFP4 4 +INDIRP4 +CNSTI4 276 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +line 2158 +;2158: s->groundEntityNum = ps->groundEntityNum; +ADDRFP4 4 +INDIRP4 +CNSTI4 192 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +ASGNI4 +line 2160 +;2159: +;2160: s->powerups = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 272 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2161 +;2161: for ( i = 0 ; i < MAX_POWERUPS ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $793 +line 2162 +;2162: if ( ps->powerups[ i ] ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 344 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $797 +line 2163 +;2163: s->powerups |= 1 << i; +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +CNSTI4 272 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BORI4 +ASGNI4 +line 2164 +;2164: } +LABELV $797 +line 2165 +;2165: } +LABELV $794 +line 2161 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LTI4 $793 +line 2167 +;2166: +;2167: s->loopSound = ps->loopSound; +ADDRFP4 4 +INDIRP4 +CNSTI4 200 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 476 +ADDP4 +INDIRI4 +ASGNI4 +line 2168 +;2168: s->generic1 = ps->generic1; +ADDRFP4 4 +INDIRP4 +CNSTI4 292 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 472 +ADDP4 +INDIRI4 +ASGNI4 +line 2171 +;2169: +;2170: //NOT INCLUDED IN ENTITYSTATETOPLAYERSTATE: +;2171: s->modelindex2 = ps->weaponstate; +ADDRFP4 4 +INDIRP4 +CNSTI4 216 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ASGNI4 +line 2172 +;2172: s->constantLight = ps->weaponChargeTime; +ADDRFP4 4 +INDIRP4 +CNSTI4 196 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +ASGNI4 +line 2174 +;2173: +;2174: VectorCopy(ps->lastHitLoc, s->origin2); +ADDRFP4 4 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1368 +ADDP4 +INDIRB +ASGNB 12 +line 2176 +;2175: +;2176: s->isJediMaster = ps->isJediMaster; +ADDRFP4 4 +INDIRP4 +CNSTI4 244 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 604 +ADDP4 +INDIRI4 +ASGNI4 +line 2178 +;2177: +;2178: s->time2 = ps->holocronBits; +ADDRFP4 4 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 724 +ADDP4 +INDIRI4 +ASGNI4 +line 2180 +;2179: +;2180: s->fireflag = ps->fd.saberAnimLevel; +ADDRFP4 4 +INDIRP4 +CNSTI4 168 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +ASGNI4 +line 2181 +;2181:} +LABELV $769 +endproc BG_PlayerStateToEntityState 28 0 +export BG_PlayerStateToEntityStateExtraPolate +proc BG_PlayerStateToEntityStateExtraPolate 28 0 +line 2191 +;2182: +;2183:/* +;2184:======================== +;2185:BG_PlayerStateToEntityStateExtraPolate +;2186: +;2187:This is done after each set of usercmd_t on the server, +;2188:and after local prediction on the client +;2189:======================== +;2190:*/ +;2191:void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s, int time, qboolean snap ) { +line 2194 +;2192: int i; +;2193: +;2194: if ( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR ) { +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 6 +EQI4 $802 +ADDRLP4 4 +INDIRI4 +CNSTI4 3 +NEI4 $800 +LABELV $802 +line 2195 +;2195: s->eType = ET_INVISIBLE; +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 12 +ASGNI4 +line 2196 +;2196: } else if ( ps->stats[STAT_HEALTH] <= GIB_HEALTH ) { +ADDRGP4 $801 +JUMPV +LABELV $800 +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 -40 +GTI4 $803 +line 2197 +;2197: s->eType = ET_INVISIBLE; +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 12 +ASGNI4 +line 2198 +;2198: } else { +ADDRGP4 $804 +JUMPV +LABELV $803 +line 2199 +;2199: s->eType = ET_PLAYER; +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2200 +;2200: } +LABELV $804 +LABELV $801 +line 2202 +;2201: +;2202: s->number = ps->clientNum; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ASGNI4 +line 2204 +;2203: +;2204: s->pos.trType = TR_LINEAR_STOP; +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 3 +ASGNI4 +line 2205 +;2205: VectorCopy( ps->origin, s->pos.trBase ); +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 2206 +;2206: if ( snap ) { +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $805 +line 2207 +;2207: SnapVector( s->pos.trBase ); +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +line 2208 +;2208: } +LABELV $805 +line 2210 +;2209: // set the trDelta for flag direction and linear prediction +;2210: VectorCopy( ps->velocity, s->pos.trDelta ); +ADDRFP4 4 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRB +ASGNB 12 +line 2212 +;2211: // set the time for linear prediction +;2212: s->pos.trTime = time; +ADDRFP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 2214 +;2213: // set maximum extra polation time +;2214: s->pos.trDuration = 50; // 1000 / sv_fps (default = 20) +ADDRFP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +CNSTI4 50 +ASGNI4 +line 2216 +;2215: +;2216: s->apos.trType = TR_INTERPOLATE; +ADDRFP4 4 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2217 +;2217: VectorCopy( ps->viewangles, s->apos.trBase ); +ADDRFP4 4 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRB +ASGNB 12 +line 2218 +;2218: if ( snap ) { +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $807 +line 2219 +;2219: SnapVector( s->apos.trBase ); +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +CNSTI4 64 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +line 2220 +;2220: } +LABELV $807 +line 2222 +;2221: +;2222: s->trickedentindex = ps->fd.forceMindtrickTargetIndex; +ADDRFP4 4 +INDIRP4 +CNSTI4 148 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1156 +ADDP4 +INDIRI4 +ASGNI4 +line 2223 +;2223: s->trickedentindex2 = ps->fd.forceMindtrickTargetIndex2; +ADDRFP4 4 +INDIRP4 +CNSTI4 152 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1160 +ADDP4 +INDIRI4 +ASGNI4 +line 2224 +;2224: s->trickedentindex3 = ps->fd.forceMindtrickTargetIndex3; +ADDRFP4 4 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1164 +ADDP4 +INDIRI4 +ASGNI4 +line 2225 +;2225: s->trickedentindex4 = ps->fd.forceMindtrickTargetIndex4; +ADDRFP4 4 +INDIRP4 +CNSTI4 160 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1168 +ADDP4 +INDIRI4 +ASGNI4 +line 2227 +;2226: +;2227: s->forceFrame = ps->saberLockFrame; +ADDRFP4 4 +INDIRP4 +CNSTI4 288 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 532 +ADDP4 +INDIRI4 +ASGNI4 +line 2229 +;2228: +;2229: s->emplacedOwner = ps->electrifyTime; +ADDRFP4 4 +INDIRP4 +CNSTI4 180 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 740 +ADDP4 +INDIRI4 +ASGNI4 +line 2231 +;2230: +;2231: s->speed = ps->speed; +ADDRFP4 4 +INDIRP4 +CNSTI4 164 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2233 +;2232: +;2233: s->genericenemyindex = ps->genericEnemyIndex; +ADDRFP4 4 +INDIRP4 +CNSTI4 172 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 624 +ADDP4 +INDIRI4 +ASGNI4 +line 2235 +;2234: +;2235: s->activeForcePass = ps->activeForcePass; +ADDRFP4 4 +INDIRP4 +CNSTI4 176 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 636 +ADDP4 +INDIRI4 +ASGNI4 +line 2237 +;2236: +;2237: s->angles2[YAW] = ps->movementDir; +ADDRFP4 4 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2238 +;2238: s->legsAnim = ps->legsAnim; +ADDRFP4 4 +INDIRP4 +CNSTI4 280 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ASGNI4 +line 2239 +;2239: s->torsoAnim = ps->torsoAnim; +ADDRFP4 4 +INDIRP4 +CNSTI4 284 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ASGNI4 +line 2240 +;2240: s->clientNum = ps->clientNum; // ET_PLAYER looks here instead of at number +ADDRFP4 4 +INDIRP4 +CNSTI4 220 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ASGNI4 +line 2242 +;2241: // so corpses can also reference the proper config +;2242: s->eFlags = ps->eFlags; +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +ASGNI4 +line 2244 +;2243: +;2244: s->saberInFlight = ps->saberInFlight; +ADDRFP4 4 +INDIRP4 +CNSTI4 228 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRI4 +ASGNI4 +line 2245 +;2245: s->saberEntityNum = ps->saberEntityNum; +ADDRFP4 4 +INDIRP4 +CNSTI4 232 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ASGNI4 +line 2246 +;2246: s->saberMove = ps->saberMove; +ADDRFP4 4 +INDIRP4 +CNSTI4 236 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ASGNI4 +line 2247 +;2247: s->forcePowersActive = ps->fd.forcePowersActive; +ADDRFP4 4 +INDIRP4 +CNSTI4 240 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +ASGNI4 +line 2249 +;2248: +;2249: if (ps->duelInProgress) +ADDRFP4 0 +INDIRP4 +CNSTI4 1304 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $809 +line 2250 +;2250: { +line 2251 +;2251: s->bolt1 = 1; +ADDRFP4 4 +INDIRP4 +CNSTI4 140 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2252 +;2252: } +ADDRGP4 $810 +JUMPV +LABELV $809 +line 2254 +;2253: else +;2254: { +line 2255 +;2255: s->bolt1 = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 140 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2256 +;2256: } +LABELV $810 +line 2258 +;2257: +;2258: if (ps->dualBlade) +ADDRFP4 0 +INDIRP4 +CNSTI4 1364 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $811 +line 2259 +;2259: { +line 2260 +;2260: s->bolt2 = 1; +ADDRFP4 4 +INDIRP4 +CNSTI4 144 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2261 +;2261: } +ADDRGP4 $812 +JUMPV +LABELV $811 +line 2263 +;2262: else +;2263: { +line 2264 +;2264: s->bolt2 = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 144 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2265 +;2265: } +LABELV $812 +line 2267 +;2266: +;2267: s->otherEntityNum2 = ps->emplacedIndex; +ADDRFP4 4 +INDIRP4 +CNSTI4 188 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 596 +ADDP4 +INDIRI4 +ASGNI4 +line 2269 +;2268: +;2269: s->shouldtarget = ps->saberHolstered; //reuse bool in entitystate for players differently +ADDRFP4 4 +INDIRP4 +CNSTI4 268 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1312 +ADDP4 +INDIRI4 +ASGNI4 +line 2270 +;2270: s->teamowner = ps->usingATST; +ADDRFP4 4 +INDIRP4 +CNSTI4 264 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +ASGNI4 +line 2272 +;2271: +;2272: if (ps->genericEnemyIndex != -1) +ADDRFP4 0 +INDIRP4 +CNSTI4 624 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $813 +line 2273 +;2273: { +line 2274 +;2274: s->eFlags |= EF_SEEKERDRONE; +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1048576 +BORI4 +ASGNI4 +line 2275 +;2275: } +LABELV $813 +line 2277 +;2276: +;2277: if ( ps->stats[STAT_HEALTH] <= 0 ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $815 +line 2278 +;2278: s->eFlags |= EF_DEAD; +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 2279 +;2279: } else { +ADDRGP4 $816 +JUMPV +LABELV $815 +line 2280 +;2280: s->eFlags &= ~EF_DEAD; +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 2281 +;2281: } +LABELV $816 +line 2283 +;2282: +;2283: if ( ps->externalEvent ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $817 +line 2284 +;2284: s->event = ps->externalEvent; +ADDRFP4 4 +INDIRP4 +CNSTI4 252 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRI4 +ASGNI4 +line 2285 +;2285: s->eventParm = ps->externalEventParm; +ADDRFP4 4 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRI4 +ASGNI4 +line 2286 +;2286: } else if ( ps->entityEventSequence < ps->eventSequence ) { +ADDRGP4 $818 +JUMPV +LABELV $817 +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 496 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +GEI4 $819 +line 2289 +;2287: int seq; +;2288: +;2289: if ( ps->entityEventSequence < ps->eventSequence - MAX_PS_EVENTS) { +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 496 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +CNSTI4 2 +SUBI4 +GEI4 $821 +line 2290 +;2290: ps->entityEventSequence = ps->eventSequence - MAX_PS_EVENTS; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 496 +ADDP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +CNSTI4 2 +SUBI4 +ASGNI4 +line 2291 +;2291: } +LABELV $821 +line 2292 +;2292: seq = ps->entityEventSequence & (MAX_PS_EVENTS-1); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 496 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ASGNI4 +line 2293 +;2293: s->event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 ); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 252 +ADDP4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 496 +ADDP4 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 8 +LSHI4 +BORI4 +ASGNI4 +line 2294 +;2294: s->eventParm = ps->eventParms[ seq ]; +ADDRFP4 4 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 2295 +;2295: ps->entityEventSequence++; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 496 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2296 +;2296: } +LABELV $819 +LABELV $818 +line 2297 +;2297: s->weapon = ps->weapon; +ADDRFP4 4 +INDIRP4 +CNSTI4 276 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +line 2298 +;2298: s->groundEntityNum = ps->groundEntityNum; +ADDRFP4 4 +INDIRP4 +CNSTI4 192 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +ASGNI4 +line 2300 +;2299: +;2300: s->powerups = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 272 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2301 +;2301: for ( i = 0 ; i < MAX_POWERUPS ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $823 +line 2302 +;2302: if ( ps->powerups[ i ] ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 344 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $827 +line 2303 +;2303: s->powerups |= 1 << i; +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +CNSTI4 272 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BORI4 +ASGNI4 +line 2304 +;2304: } +LABELV $827 +line 2305 +;2305: } +LABELV $824 +line 2301 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LTI4 $823 +line 2307 +;2306: +;2307: s->loopSound = ps->loopSound; +ADDRFP4 4 +INDIRP4 +CNSTI4 200 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 476 +ADDP4 +INDIRI4 +ASGNI4 +line 2308 +;2308: s->generic1 = ps->generic1; +ADDRFP4 4 +INDIRP4 +CNSTI4 292 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 472 +ADDP4 +INDIRI4 +ASGNI4 +line 2311 +;2309: +;2310: //NOT INCLUDED IN ENTITYSTATETOPLAYERSTATE: +;2311: s->modelindex2 = ps->weaponstate; +ADDRFP4 4 +INDIRP4 +CNSTI4 216 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ASGNI4 +line 2312 +;2312: s->constantLight = ps->weaponChargeTime; +ADDRFP4 4 +INDIRP4 +CNSTI4 196 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +ASGNI4 +line 2314 +;2313: +;2314: VectorCopy(ps->lastHitLoc, s->origin2); +ADDRFP4 4 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1368 +ADDP4 +INDIRB +ASGNB 12 +line 2316 +;2315: +;2316: s->isJediMaster = ps->isJediMaster; +ADDRFP4 4 +INDIRP4 +CNSTI4 244 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 604 +ADDP4 +INDIRI4 +ASGNI4 +line 2318 +;2317: +;2318: s->time2 = ps->holocronBits; +ADDRFP4 4 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 724 +ADDP4 +INDIRI4 +ASGNI4 +line 2320 +;2319: +;2320: s->fireflag = ps->fd.saberAnimLevel; +ADDRFP4 4 +INDIRP4 +CNSTI4 168 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +ASGNI4 +line 2321 +;2321:} +LABELV $799 +endproc BG_PlayerStateToEntityStateExtraPolate 28 0 +data +align 4 +LABELV bg_poolSize +byte 4 0 +align 4 +LABELV bg_poolTail +byte 4 2048000 +export BG_Alloc +code +proc BG_Alloc 8 16 +line 2337 +;2322: +;2323:/* +;2324:============================================================================= +;2325: +;2326:PLAYER ANGLES +;2327: +;2328:============================================================================= +;2329:*/ +;2330:#define MAX_POOL_SIZE 2048000 //1024000 +;2331: +;2332:static char bg_pool[MAX_POOL_SIZE]; +;2333:static int bg_poolSize = 0; +;2334:static int bg_poolTail = MAX_POOL_SIZE; +;2335: +;2336:void *BG_Alloc ( int size ) +;2337:{ +line 2338 +;2338: bg_poolSize = ((bg_poolSize + 0x00000003) & 0xfffffffc); +ADDRLP4 0 +ADDRGP4 bg_poolSize +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 3 +ADDI4 +CVIU4 4 +CNSTU4 4294967292 +BANDU4 +CVUI4 4 +ASGNI4 +line 2340 +;2339: +;2340: if (bg_poolSize + size > bg_poolTail) +ADDRGP4 bg_poolSize +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +ADDRGP4 bg_poolTail +INDIRI4 +LEI4 $830 +line 2341 +;2341: { +line 2342 +;2342: Com_Error( ERR_DROP, "BG_Alloc: buffer exceeded tail (%d > %d)", bg_poolSize + size, bg_poolTail); +CNSTI4 1 +ARGI4 +ADDRGP4 $832 +ARGP4 +ADDRGP4 bg_poolSize +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +ARGI4 +ADDRGP4 bg_poolTail +INDIRI4 +ARGI4 +ADDRGP4 Com_Error +CALLV +pop +line 2343 +;2343: return 0; +CNSTP4 0 +RETP4 +ADDRGP4 $829 +JUMPV +LABELV $830 +line 2346 +;2344: } +;2345: +;2346: bg_poolSize += size; +ADDRLP4 4 +ADDRGP4 bg_poolSize +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 2348 +;2347: +;2348: return &bg_pool[bg_poolSize-size]; +ADDRGP4 bg_poolSize +INDIRI4 +ADDRFP4 0 +INDIRI4 +SUBI4 +ADDRGP4 bg_pool +ADDP4 +RETP4 +LABELV $829 +endproc BG_Alloc 8 16 +export BG_AllocUnaligned +proc BG_AllocUnaligned 4 16 +line 2352 +;2349:} +;2350: +;2351:void *BG_AllocUnaligned ( int size ) +;2352:{ +line 2353 +;2353: if (bg_poolSize + size > bg_poolTail) +ADDRGP4 bg_poolSize +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +ADDRGP4 bg_poolTail +INDIRI4 +LEI4 $834 +line 2354 +;2354: { +line 2355 +;2355: Com_Error( ERR_DROP, "BG_AllocUnaligned: buffer exceeded tail (%d > %d)", bg_poolSize + size, bg_poolTail); +CNSTI4 1 +ARGI4 +ADDRGP4 $836 +ARGP4 +ADDRGP4 bg_poolSize +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +ARGI4 +ADDRGP4 bg_poolTail +INDIRI4 +ARGI4 +ADDRGP4 Com_Error +CALLV +pop +line 2356 +;2356: return 0; +CNSTP4 0 +RETP4 +ADDRGP4 $833 +JUMPV +LABELV $834 +line 2359 +;2357: } +;2358: +;2359: bg_poolSize += size; +ADDRLP4 0 +ADDRGP4 bg_poolSize +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 2361 +;2360: +;2361: return &bg_pool[bg_poolSize-size]; +ADDRGP4 bg_poolSize +INDIRI4 +ADDRFP4 0 +INDIRI4 +SUBI4 +ADDRGP4 bg_pool +ADDP4 +RETP4 +LABELV $833 +endproc BG_AllocUnaligned 4 16 +export BG_TempAlloc +proc BG_TempAlloc 4 16 +line 2365 +;2362:} +;2363: +;2364:void *BG_TempAlloc( int size ) +;2365:{ +line 2366 +;2366: size = ((size + 0x00000003) & 0xfffffffc); +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 3 +ADDI4 +CVIU4 4 +CNSTU4 4294967292 +BANDU4 +CVUI4 4 +ASGNI4 +line 2368 +;2367: +;2368: if (bg_poolTail - size < bg_poolSize) +ADDRGP4 bg_poolTail +INDIRI4 +ADDRFP4 0 +INDIRI4 +SUBI4 +ADDRGP4 bg_poolSize +INDIRI4 +GEI4 $838 +line 2369 +;2369: { +line 2370 +;2370: Com_Error( ERR_DROP, "BG_TempAlloc: buffer exceeded head (%d > %d)", bg_poolTail - size, bg_poolSize); +CNSTI4 1 +ARGI4 +ADDRGP4 $840 +ARGP4 +ADDRGP4 bg_poolTail +INDIRI4 +ADDRFP4 0 +INDIRI4 +SUBI4 +ARGI4 +ADDRGP4 bg_poolSize +INDIRI4 +ARGI4 +ADDRGP4 Com_Error +CALLV +pop +line 2371 +;2371: return 0; +CNSTP4 0 +RETP4 +ADDRGP4 $837 +JUMPV +LABELV $838 +line 2374 +;2372: } +;2373: +;2374: bg_poolTail -= size; +ADDRLP4 0 +ADDRGP4 bg_poolTail +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +SUBI4 +ASGNI4 +line 2376 +;2375: +;2376: return &bg_pool[bg_poolTail]; +ADDRGP4 bg_poolTail +INDIRI4 +ADDRGP4 bg_pool +ADDP4 +RETP4 +LABELV $837 +endproc BG_TempAlloc 4 16 +export BG_TempFree +proc BG_TempFree 4 16 +line 2380 +;2377:} +;2378: +;2379:void BG_TempFree( int size ) +;2380:{ +line 2381 +;2381: size = ((size + 0x00000003) & 0xfffffffc); +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 3 +ADDI4 +CVIU4 4 +CNSTU4 4294967292 +BANDU4 +CVUI4 4 +ASGNI4 +line 2383 +;2382: +;2383: if (bg_poolTail+size > MAX_POOL_SIZE) +ADDRGP4 bg_poolTail +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +CNSTI4 2048000 +LEI4 $842 +line 2384 +;2384: { +line 2385 +;2385: Com_Error( ERR_DROP, "BG_TempFree: tail greater than size (%d > %d)", bg_poolTail+size, MAX_POOL_SIZE ); +CNSTI4 1 +ARGI4 +ADDRGP4 $844 +ARGP4 +ADDRGP4 bg_poolTail +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +ARGI4 +CNSTI4 2048000 +ARGI4 +ADDRGP4 Com_Error +CALLV +pop +line 2386 +;2386: } +LABELV $842 +line 2388 +;2387: +;2388: bg_poolTail += size; +ADDRLP4 0 +ADDRGP4 bg_poolTail +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 2389 +;2389:} +LABELV $841 +endproc BG_TempFree 4 16 +export BG_StringAlloc +proc BG_StringAlloc 12 8 +line 2392 +;2390: +;2391:char *BG_StringAlloc ( const char *source ) +;2392:{ +line 2395 +;2393: char *dest; +;2394: +;2395: dest = BG_Alloc ( strlen ( source ) + 1 ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 BG_Alloc +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 2396 +;2396: strcpy ( dest, source ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 2397 +;2397: return dest; +ADDRLP4 0 +INDIRP4 +RETP4 +LABELV $845 +endproc BG_StringAlloc 12 8 +export BG_OutOfMemory +proc BG_OutOfMemory 4 0 +line 2401 +;2398:} +;2399: +;2400:qboolean BG_OutOfMemory ( void ) +;2401:{ +line 2402 +;2402: return bg_poolSize >= MAX_POOL_SIZE; +ADDRGP4 bg_poolSize +INDIRI4 +CNSTI4 2048000 +LTI4 $848 +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +ADDRGP4 $849 +JUMPV +LABELV $848 +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $849 +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $846 +endproc BG_OutOfMemory 4 0 +bss +align 1 +LABELV bg_pool +skip 2048000 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import BG_ParseAnimationFile +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import saberMoveData +import Pmove +import PM_UpdateViewAngles +import pm +import bgGlobalAnimations +import BGPAFtextLoaded +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $844 +char 1 66 +char 1 71 +char 1 95 +char 1 84 +char 1 101 +char 1 109 +char 1 112 +char 1 70 +char 1 114 +char 1 101 +char 1 101 +char 1 58 +char 1 32 +char 1 116 +char 1 97 +char 1 105 +char 1 108 +char 1 32 +char 1 103 +char 1 114 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 32 +char 1 116 +char 1 104 +char 1 97 +char 1 110 +char 1 32 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 32 +char 1 40 +char 1 37 +char 1 100 +char 1 32 +char 1 62 +char 1 32 +char 1 37 +char 1 100 +char 1 41 +char 1 0 +align 1 +LABELV $840 +char 1 66 +char 1 71 +char 1 95 +char 1 84 +char 1 101 +char 1 109 +char 1 112 +char 1 65 +char 1 108 +char 1 108 +char 1 111 +char 1 99 +char 1 58 +char 1 32 +char 1 98 +char 1 117 +char 1 102 +char 1 102 +char 1 101 +char 1 114 +char 1 32 +char 1 101 +char 1 120 +char 1 99 +char 1 101 +char 1 101 +char 1 100 +char 1 101 +char 1 100 +char 1 32 +char 1 104 +char 1 101 +char 1 97 +char 1 100 +char 1 32 +char 1 40 +char 1 37 +char 1 100 +char 1 32 +char 1 62 +char 1 32 +char 1 37 +char 1 100 +char 1 41 +char 1 0 +align 1 +LABELV $836 +char 1 66 +char 1 71 +char 1 95 +char 1 65 +char 1 108 +char 1 108 +char 1 111 +char 1 99 +char 1 85 +char 1 110 +char 1 97 +char 1 108 +char 1 105 +char 1 103 +char 1 110 +char 1 101 +char 1 100 +char 1 58 +char 1 32 +char 1 98 +char 1 117 +char 1 102 +char 1 102 +char 1 101 +char 1 114 +char 1 32 +char 1 101 +char 1 120 +char 1 99 +char 1 101 +char 1 101 +char 1 100 +char 1 101 +char 1 100 +char 1 32 +char 1 116 +char 1 97 +char 1 105 +char 1 108 +char 1 32 +char 1 40 +char 1 37 +char 1 100 +char 1 32 +char 1 62 +char 1 32 +char 1 37 +char 1 100 +char 1 41 +char 1 0 +align 1 +LABELV $832 +char 1 66 +char 1 71 +char 1 95 +char 1 65 +char 1 108 +char 1 108 +char 1 111 +char 1 99 +char 1 58 +char 1 32 +char 1 98 +char 1 117 +char 1 102 +char 1 102 +char 1 101 +char 1 114 +char 1 32 +char 1 101 +char 1 120 +char 1 99 +char 1 101 +char 1 101 +char 1 100 +char 1 101 +char 1 100 +char 1 32 +char 1 116 +char 1 97 +char 1 105 +char 1 108 +char 1 32 +char 1 40 +char 1 37 +char 1 100 +char 1 32 +char 1 62 +char 1 32 +char 1 37 +char 1 100 +char 1 41 +char 1 0 +align 1 +LABELV $760 +char 1 69 +char 1 86 +char 1 95 +char 1 66 +char 1 79 +char 1 68 +char 1 89 +char 1 95 +char 1 81 +char 1 85 +char 1 69 +char 1 85 +char 1 69 +char 1 95 +char 1 67 +char 1 79 +char 1 80 +char 1 89 +char 1 0 +align 1 +LABELV $759 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 80 +char 1 65 +char 1 84 +char 1 82 +char 1 79 +char 1 76 +char 1 0 +align 1 +LABELV $758 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 71 +char 1 85 +char 1 65 +char 1 82 +char 1 68 +char 1 66 +char 1 65 +char 1 83 +char 1 69 +char 1 0 +align 1 +LABELV $757 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 70 +char 1 76 +char 1 65 +char 1 71 +char 1 0 +align 1 +LABELV $756 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 70 +char 1 79 +char 1 76 +char 1 76 +char 1 79 +char 1 87 +char 1 77 +char 1 69 +char 1 0 +align 1 +LABELV $755 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 78 +char 1 79 +char 1 0 +align 1 +LABELV $754 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 89 +char 1 69 +char 1 83 +char 1 0 +align 1 +LABELV $753 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 0 +align 1 +LABELV $752 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 73 +char 1 78 +char 1 71 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $751 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 73 +char 1 78 +char 1 71 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $750 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 69 +char 1 83 +char 1 84 +char 1 76 +char 1 73 +char 1 78 +char 1 69 +char 1 0 +align 1 +LABELV $749 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 66 +char 1 85 +char 1 71 +char 1 95 +char 1 76 +char 1 73 +char 1 78 +char 1 69 +char 1 0 +align 1 +LABELV $748 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 72 +char 1 73 +char 1 69 +char 1 76 +char 1 68 +char 1 95 +char 1 72 +char 1 73 +char 1 84 +char 1 0 +align 1 +LABELV $747 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 95 +char 1 67 +char 1 72 +char 1 65 +char 1 82 +char 1 71 +char 1 69 +char 1 95 +char 1 65 +char 1 76 +char 1 84 +char 1 0 +align 1 +LABELV $746 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 95 +char 1 67 +char 1 72 +char 1 65 +char 1 82 +char 1 71 +char 1 69 +char 1 0 +align 1 +LABELV $745 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 69 +char 1 84 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 65 +char 1 66 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $744 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 69 +char 1 84 +char 1 95 +char 1 70 +char 1 82 +char 1 69 +char 1 69 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $743 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 73 +char 1 86 +char 1 69 +char 1 95 +char 1 78 +char 1 69 +char 1 87 +char 1 95 +char 1 82 +char 1 65 +char 1 78 +char 1 75 +char 1 0 +align 1 +LABELV $742 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 83 +char 1 84 +char 1 82 +char 1 79 +char 1 89 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 95 +char 1 77 +char 1 79 +char 1 68 +char 1 69 +char 1 76 +char 1 0 +align 1 +LABELV $741 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 83 +char 1 84 +char 1 82 +char 1 79 +char 1 89 +char 1 95 +char 1 71 +char 1 72 +char 1 79 +char 1 85 +char 1 76 +char 1 50 +char 1 95 +char 1 73 +char 1 78 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 67 +char 1 69 +char 1 0 +align 1 +LABELV $740 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 71 +char 1 65 +char 1 95 +char 1 79 +char 1 66 +char 1 74 +char 1 69 +char 1 67 +char 1 84 +char 1 73 +char 1 86 +char 1 69 +char 1 67 +char 1 79 +char 1 77 +char 1 80 +char 1 76 +char 1 69 +char 1 84 +char 1 69 +char 1 0 +align 1 +LABELV $739 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 71 +char 1 65 +char 1 95 +char 1 82 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 79 +char 1 86 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $738 +char 1 69 +char 1 86 +char 1 95 +char 1 67 +char 1 84 +char 1 70 +char 1 77 +char 1 69 +char 1 83 +char 1 83 +char 1 65 +char 1 71 +char 1 69 +char 1 0 +align 1 +LABELV $737 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 67 +char 1 79 +char 1 82 +char 1 69 +char 1 80 +char 1 76 +char 1 85 +char 1 77 +char 1 0 +align 1 +LABELV $736 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 73 +char 1 66 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $735 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 68 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 68 +char 1 0 +align 1 +LABELV $734 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 79 +char 1 87 +char 1 69 +char 1 82 +char 1 85 +char 1 80 +char 1 95 +char 1 66 +char 1 65 +char 1 84 +char 1 84 +char 1 76 +char 1 69 +char 1 83 +char 1 85 +char 1 73 +char 1 84 +char 1 0 +align 1 +LABELV $733 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 79 +char 1 87 +char 1 69 +char 1 82 +char 1 85 +char 1 80 +char 1 95 +char 1 81 +char 1 85 +char 1 65 +char 1 68 +char 1 0 +align 1 +LABELV $732 +char 1 69 +char 1 86 +char 1 95 +char 1 79 +char 1 66 +char 1 73 +char 1 84 +char 1 85 +char 1 65 +char 1 82 +char 1 89 +char 1 0 +align 1 +LABELV $731 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 51 +char 1 0 +align 1 +LABELV $730 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 50 +char 1 0 +align 1 +LABELV $729 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 0 +align 1 +LABELV $728 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 0 +align 1 +LABELV $727 +char 1 69 +char 1 86 +char 1 95 +char 1 66 +char 1 85 +char 1 76 +char 1 76 +char 1 69 +char 1 84 +char 1 0 +align 1 +LABELV $726 +char 1 69 +char 1 86 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 73 +char 1 76 +char 1 69 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 95 +char 1 77 +char 1 69 +char 1 84 +char 1 65 +char 1 76 +char 1 0 +align 1 +LABELV $725 +char 1 69 +char 1 86 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 73 +char 1 76 +char 1 69 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 0 +align 1 +LABELV $724 +char 1 69 +char 1 86 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 73 +char 1 76 +char 1 69 +char 1 95 +char 1 72 +char 1 73 +char 1 84 +char 1 0 +align 1 +LABELV $723 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 66 +char 1 82 +char 1 73 +char 1 83 +char 1 0 +align 1 +LABELV $722 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 76 +char 1 65 +char 1 83 +char 1 83 +char 1 95 +char 1 83 +char 1 72 +char 1 65 +char 1 84 +char 1 84 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $721 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 95 +char 1 82 +char 1 79 +char 1 70 +char 1 70 +char 1 0 +align 1 +LABELV $720 +char 1 69 +char 1 86 +char 1 95 +char 1 69 +char 1 78 +char 1 84 +char 1 73 +char 1 84 +char 1 89 +char 1 95 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $719 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 76 +char 1 79 +char 1 66 +char 1 65 +char 1 76 +char 1 95 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 95 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $718 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 76 +char 1 79 +char 1 66 +char 1 65 +char 1 76 +char 1 95 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $717 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 69 +char 1 82 +char 1 65 +char 1 76 +char 1 95 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $716 +char 1 69 +char 1 86 +char 1 95 +char 1 77 +char 1 85 +char 1 84 +char 1 69 +char 1 95 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $715 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 95 +char 1 69 +char 1 70 +char 1 70 +char 1 69 +char 1 67 +char 1 84 +char 1 95 +char 1 73 +char 1 68 +char 1 0 +align 1 +LABELV $714 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 95 +char 1 69 +char 1 70 +char 1 70 +char 1 69 +char 1 67 +char 1 84 +char 1 0 +align 1 +LABELV $713 +char 1 69 +char 1 86 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 73 +char 1 76 +char 1 69 +char 1 95 +char 1 83 +char 1 84 +char 1 73 +char 1 67 +char 1 75 +char 1 0 +align 1 +LABELV $712 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 82 +char 1 69 +char 1 78 +char 1 65 +char 1 68 +char 1 69 +char 1 95 +char 1 66 +char 1 79 +char 1 85 +char 1 78 +char 1 67 +char 1 69 +char 1 0 +align 1 +LABELV $711 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 69 +char 1 76 +char 1 69 +char 1 80 +char 1 79 +char 1 82 +char 1 84 +char 1 95 +char 1 79 +char 1 85 +char 1 84 +char 1 0 +align 1 +LABELV $710 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 69 +char 1 76 +char 1 69 +char 1 80 +char 1 79 +char 1 82 +char 1 84 +char 1 95 +char 1 73 +char 1 78 +char 1 0 +align 1 +LABELV $709 +char 1 69 +char 1 86 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 80 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $708 +char 1 69 +char 1 86 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 82 +char 1 69 +char 1 83 +char 1 80 +char 1 65 +char 1 87 +char 1 78 +char 1 0 +align 1 +LABELV $707 +char 1 69 +char 1 86 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 85 +char 1 83 +char 1 69 +char 1 70 +char 1 65 +char 1 73 +char 1 76 +char 1 0 +align 1 +LABELV $706 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 53 +char 1 0 +align 1 +LABELV $705 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 52 +char 1 0 +align 1 +LABELV $704 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 51 +char 1 0 +align 1 +LABELV $703 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 50 +char 1 0 +align 1 +LABELV $702 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 49 +char 1 0 +align 1 +LABELV $701 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $700 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 57 +char 1 0 +align 1 +LABELV $699 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 56 +char 1 0 +align 1 +LABELV $698 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 55 +char 1 0 +align 1 +LABELV $697 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 54 +char 1 0 +align 1 +LABELV $696 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 53 +char 1 0 +align 1 +LABELV $695 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 52 +char 1 0 +align 1 +LABELV $694 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 51 +char 1 0 +align 1 +LABELV $693 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 50 +char 1 0 +align 1 +LABELV $692 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 0 +align 1 +LABELV $691 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 48 +char 1 0 +align 1 +LABELV $690 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 0 +align 1 +LABELV $689 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 67 +char 1 82 +char 1 69 +char 1 69 +char 1 78 +char 1 83 +char 1 72 +char 1 65 +char 1 75 +char 1 69 +char 1 0 +align 1 +LABELV $688 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 95 +char 1 80 +char 1 79 +char 1 87 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $687 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 82 +char 1 69 +char 1 68 +char 1 69 +char 1 70 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $686 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 95 +char 1 90 +char 1 79 +char 1 79 +char 1 77 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $685 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 95 +char 1 72 +char 1 73 +char 1 84 +char 1 0 +align 1 +LABELV $684 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 95 +char 1 83 +char 1 78 +char 1 73 +char 1 80 +char 1 69 +char 1 82 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 0 +align 1 +LABELV $683 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 95 +char 1 83 +char 1 78 +char 1 73 +char 1 80 +char 1 69 +char 1 82 +char 1 95 +char 1 83 +char 1 72 +char 1 79 +char 1 84 +char 1 0 +align 1 +LABELV $682 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 95 +char 1 77 +char 1 65 +char 1 73 +char 1 78 +char 1 95 +char 1 83 +char 1 72 +char 1 79 +char 1 84 +char 1 0 +align 1 +LABELV $681 +char 1 69 +char 1 86 +char 1 95 +char 1 66 +char 1 69 +char 1 67 +char 1 79 +char 1 77 +char 1 69 +char 1 95 +char 1 74 +char 1 69 +char 1 68 +char 1 73 +char 1 77 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $680 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 85 +char 1 78 +char 1 72 +char 1 79 +char 1 76 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $679 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 79 +char 1 67 +char 1 75 +char 1 0 +align 1 +LABELV $678 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 72 +char 1 73 +char 1 84 +char 1 0 +align 1 +LABELV $677 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 0 +align 1 +LABELV $676 +char 1 69 +char 1 86 +char 1 95 +char 1 65 +char 1 76 +char 1 84 +char 1 95 +char 1 70 +char 1 73 +char 1 82 +char 1 69 +char 1 0 +align 1 +LABELV $675 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 73 +char 1 82 +char 1 69 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 0 +align 1 +LABELV $674 +char 1 69 +char 1 86 +char 1 95 +char 1 67 +char 1 72 +char 1 65 +char 1 78 +char 1 71 +char 1 69 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 0 +align 1 +LABELV $673 +char 1 69 +char 1 86 +char 1 95 +char 1 78 +char 1 79 +char 1 65 +char 1 77 +char 1 77 +char 1 79 +char 1 0 +align 1 +LABELV $672 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 76 +char 1 79 +char 1 66 +char 1 65 +char 1 76 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 80 +char 1 73 +char 1 67 +char 1 75 +char 1 85 +char 1 80 +char 1 0 +align 1 +LABELV $671 +char 1 69 +char 1 86 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 80 +char 1 73 +char 1 67 +char 1 75 +char 1 85 +char 1 80 +char 1 0 +align 1 +LABELV $670 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 65 +char 1 84 +char 1 69 +char 1 82 +char 1 95 +char 1 67 +char 1 76 +char 1 69 +char 1 65 +char 1 82 +char 1 0 +align 1 +LABELV $669 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 65 +char 1 84 +char 1 69 +char 1 82 +char 1 95 +char 1 85 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $668 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 65 +char 1 84 +char 1 69 +char 1 82 +char 1 95 +char 1 76 +char 1 69 +char 1 65 +char 1 86 +char 1 69 +char 1 0 +align 1 +LABELV $667 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 65 +char 1 84 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 0 +align 1 +LABELV $666 +char 1 69 +char 1 86 +char 1 95 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $665 +char 1 69 +char 1 86 +char 1 95 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 0 +align 1 +LABELV $664 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 82 +char 1 73 +char 1 86 +char 1 65 +char 1 84 +char 1 69 +char 1 95 +char 1 68 +char 1 85 +char 1 69 +char 1 76 +char 1 0 +align 1 +LABELV $663 +char 1 69 +char 1 86 +char 1 95 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 95 +char 1 80 +char 1 65 +char 1 68 +char 1 0 +align 1 +LABELV $662 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $661 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 84 +char 1 69 +char 1 80 +char 1 95 +char 1 49 +char 1 54 +char 1 0 +align 1 +LABELV $660 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 84 +char 1 69 +char 1 80 +char 1 95 +char 1 49 +char 1 50 +char 1 0 +align 1 +LABELV $659 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 84 +char 1 69 +char 1 80 +char 1 95 +char 1 56 +char 1 0 +align 1 +LABELV $658 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 84 +char 1 69 +char 1 80 +char 1 95 +char 1 52 +char 1 0 +align 1 +LABELV $657 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 87 +char 1 73 +char 1 77 +char 1 0 +align 1 +LABELV $656 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 79 +char 1 79 +char 1 84 +char 1 87 +char 1 65 +char 1 68 +char 1 69 +char 1 0 +align 1 +LABELV $655 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 79 +char 1 79 +char 1 84 +char 1 83 +char 1 80 +char 1 76 +char 1 65 +char 1 83 +char 1 72 +char 1 0 +align 1 +LABELV $654 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 79 +char 1 79 +char 1 84 +char 1 83 +char 1 84 +char 1 69 +char 1 80 +char 1 95 +char 1 77 +char 1 69 +char 1 84 +char 1 65 +char 1 76 +char 1 0 +align 1 +LABELV $653 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 79 +char 1 79 +char 1 84 +char 1 83 +char 1 84 +char 1 69 +char 1 80 +char 1 0 +align 1 +LABELV $652 +char 1 69 +char 1 86 +char 1 95 +char 1 67 +char 1 76 +char 1 73 +char 1 69 +char 1 78 +char 1 84 +char 1 74 +char 1 79 +char 1 73 +char 1 78 +char 1 0 +align 1 +LABELV $651 +char 1 69 +char 1 86 +char 1 95 +char 1 78 +char 1 79 +char 1 78 +char 1 69 +char 1 0 +align 1 +LABELV $649 +char 1 66 +char 1 71 +char 1 95 +char 1 69 +char 1 118 +char 1 97 +char 1 108 +char 1 117 +char 1 97 +char 1 116 +char 1 101 +char 1 84 +char 1 114 +char 1 97 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 111 +char 1 114 +char 1 121 +char 1 68 +char 1 101 +char 1 108 +char 1 116 +char 1 97 +char 1 58 +char 1 32 +char 1 117 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 116 +char 1 114 +char 1 84 +char 1 121 +char 1 112 +char 1 101 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $636 +char 1 66 +char 1 71 +char 1 95 +char 1 69 +char 1 118 +char 1 97 +char 1 108 +char 1 117 +char 1 97 +char 1 116 +char 1 101 +char 1 84 +char 1 114 +char 1 97 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 111 +char 1 114 +char 1 121 +char 1 58 +char 1 32 +char 1 91 +char 1 67 +char 1 76 +char 1 73 +char 1 69 +char 1 78 +char 1 84 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 32 +char 1 83 +char 1 73 +char 1 68 +char 1 69 +char 1 93 +char 1 32 +char 1 117 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 116 +char 1 114 +char 1 84 +char 1 121 +char 1 112 +char 1 101 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $621 +char 1 66 +char 1 71 +char 1 95 +char 1 67 +char 1 97 +char 1 110 +char 1 73 +char 1 116 +char 1 101 +char 1 109 +char 1 66 +char 1 101 +char 1 71 +char 1 114 +char 1 97 +char 1 98 +char 1 98 +char 1 101 +char 1 100 +char 1 58 +char 1 32 +char 1 73 +char 1 84 +char 1 95 +char 1 66 +char 1 65 +char 1 68 +char 1 0 +align 1 +LABELV $547 +char 1 66 +char 1 71 +char 1 95 +char 1 67 +char 1 97 +char 1 110 +char 1 73 +char 1 116 +char 1 101 +char 1 109 +char 1 66 +char 1 101 +char 1 71 +char 1 114 +char 1 97 +char 1 98 +char 1 98 +char 1 101 +char 1 100 +char 1 58 +char 1 32 +char 1 105 +char 1 110 +char 1 100 +char 1 101 +char 1 120 +char 1 32 +char 1 111 +char 1 117 +char 1 116 +char 1 32 +char 1 111 +char 1 102 +char 1 32 +char 1 114 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $464 +char 1 67 +char 1 111 +char 1 117 +char 1 108 +char 1 100 +char 1 110 +char 1 39 +char 1 116 +char 1 32 +char 1 102 +char 1 105 +char 1 110 +char 1 100 +char 1 32 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 32 +char 1 102 +char 1 111 +char 1 114 +char 1 32 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $455 +char 1 72 +char 1 111 +char 1 108 +char 1 100 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 73 +char 1 116 +char 1 101 +char 1 109 +char 1 32 +char 1 110 +char 1 111 +char 1 116 +char 1 32 +char 1 102 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $399 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 104 +char 1 95 +char 1 98 +char 1 111 +char 1 114 +char 1 98 +char 1 0 +align 1 +LABELV $398 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 111 +char 1 114 +char 1 98 +char 1 47 +char 1 98 +char 1 95 +char 1 111 +char 1 114 +char 1 98 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $397 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 99 +char 1 117 +char 1 98 +char 1 101 +char 1 0 +align 1 +LABELV $396 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 104 +char 1 95 +char 1 114 +char 1 111 +char 1 114 +char 1 98 +char 1 0 +align 1 +LABELV $395 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 111 +char 1 114 +char 1 98 +char 1 47 +char 1 114 +char 1 95 +char 1 111 +char 1 114 +char 1 98 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $394 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 114 +char 1 101 +char 1 100 +char 1 99 +char 1 117 +char 1 98 +char 1 101 +char 1 0 +align 1 +LABELV $393 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 102 +char 1 95 +char 1 110 +char 1 101 +char 1 117 +char 1 116 +char 1 114 +char 1 97 +char 1 108 +char 1 49 +char 1 0 +align 1 +LABELV $392 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 115 +char 1 47 +char 1 110 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $391 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 95 +char 1 67 +char 1 84 +char 1 70 +char 1 95 +char 1 110 +char 1 101 +char 1 117 +char 1 116 +char 1 114 +char 1 97 +char 1 108 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $390 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 98 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $389 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 115 +char 1 47 +char 1 98 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 121 +char 1 115 +char 1 97 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $388 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 115 +char 1 47 +char 1 98 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $387 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 95 +char 1 67 +char 1 84 +char 1 70 +char 1 95 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $386 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 114 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $385 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 115 +char 1 47 +char 1 114 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 121 +char 1 115 +char 1 97 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $384 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 115 +char 1 47 +char 1 114 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $383 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 95 +char 1 67 +char 1 84 +char 1 70 +char 1 95 +char 1 114 +char 1 101 +char 1 100 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $382 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $381 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 115 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $380 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $379 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 108 +char 1 105 +char 1 99 +char 1 95 +char 1 98 +char 1 111 +char 1 108 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $378 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 108 +char 1 105 +char 1 99 +char 1 95 +char 1 98 +char 1 111 +char 1 108 +char 1 116 +char 1 115 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $377 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 108 +char 1 105 +char 1 99 +char 1 95 +char 1 98 +char 1 111 +char 1 108 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $376 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 95 +char 1 99 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $375 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 95 +char 1 99 +char 1 101 +char 1 108 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $374 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 99 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $373 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 105 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 116 +char 1 116 +char 1 101 +char 1 114 +char 1 121 +char 1 0 +align 1 +LABELV $372 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $371 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 101 +char 1 110 +char 1 101 +char 1 114 +char 1 103 +char 1 121 +char 1 95 +char 1 99 +char 1 101 +char 1 108 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $370 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 112 +char 1 105 +char 1 99 +char 1 107 +char 1 117 +char 1 112 +char 1 101 +char 1 110 +char 1 101 +char 1 114 +char 1 103 +char 1 121 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $369 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 0 +align 1 +LABELV $368 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 119 +char 1 112 +char 1 0 +align 1 +LABELV $367 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 101 +char 1 109 +char 1 112 +char 1 108 +char 1 97 +char 1 99 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $366 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 101 +char 1 116 +char 1 95 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $365 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 116 +char 1 114 +char 1 105 +char 1 112 +char 1 95 +char 1 109 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $364 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $363 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $362 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 95 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $361 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 95 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $360 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 95 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 95 +char 1 112 +char 1 114 +char 1 111 +char 1 106 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $359 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 95 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 95 +char 1 112 +char 1 117 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $358 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $357 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 116 +char 1 114 +char 1 105 +char 1 112 +char 1 109 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $356 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 108 +char 1 97 +char 1 115 +char 1 101 +char 1 114 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 112 +char 1 47 +char 1 108 +char 1 97 +char 1 115 +char 1 101 +char 1 114 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 112 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $355 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 108 +char 1 97 +char 1 115 +char 1 101 +char 1 114 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 112 +char 1 47 +char 1 108 +char 1 97 +char 1 115 +char 1 101 +char 1 114 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 112 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $354 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 108 +char 1 97 +char 1 115 +char 1 101 +char 1 114 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 112 +char 1 47 +char 1 108 +char 1 97 +char 1 115 +char 1 101 +char 1 114 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 112 +char 1 95 +char 1 112 +char 1 117 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $353 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 116 +char 1 114 +char 1 105 +char 1 112 +char 1 109 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $352 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $351 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $350 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $349 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 95 +char 1 112 +char 1 117 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $348 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $347 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 109 +char 1 101 +char 1 114 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 110 +char 1 0 +align 1 +LABELV $346 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 109 +char 1 101 +char 1 114 +char 1 114 +char 1 95 +char 1 115 +char 1 111 +char 1 110 +char 1 110 +char 1 47 +char 1 109 +char 1 101 +char 1 114 +char 1 114 +char 1 95 +char 1 115 +char 1 111 +char 1 110 +char 1 110 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $345 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 109 +char 1 101 +char 1 114 +char 1 114 +char 1 95 +char 1 115 +char 1 111 +char 1 110 +char 1 110 +char 1 47 +char 1 109 +char 1 101 +char 1 114 +char 1 114 +char 1 95 +char 1 115 +char 1 111 +char 1 110 +char 1 110 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $344 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 95 +char 1 108 +char 1 97 +char 1 117 +char 1 110 +char 1 99 +char 1 104 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $343 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 0 +align 1 +LABELV $342 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 103 +char 1 111 +char 1 108 +char 1 97 +char 1 110 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 115 +char 1 47 +char 1 103 +char 1 111 +char 1 108 +char 1 97 +char 1 110 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 115 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $341 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 103 +char 1 111 +char 1 108 +char 1 97 +char 1 110 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 115 +char 1 47 +char 1 103 +char 1 111 +char 1 108 +char 1 97 +char 1 110 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 115 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $340 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 0 +align 1 +LABELV $339 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 0 +align 1 +LABELV $338 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $337 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $336 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 0 +align 1 +LABELV $335 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $334 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 104 +char 1 101 +char 1 97 +char 1 118 +char 1 121 +char 1 95 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 104 +char 1 101 +char 1 97 +char 1 118 +char 1 121 +char 1 95 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $333 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 104 +char 1 101 +char 1 97 +char 1 118 +char 1 121 +char 1 95 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 104 +char 1 101 +char 1 97 +char 1 118 +char 1 121 +char 1 95 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $332 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $331 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $330 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $329 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $328 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $327 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $326 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $325 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $324 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $323 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $322 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 95 +char 1 114 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $321 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 95 +char 1 114 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $320 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $319 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 114 +char 1 105 +char 1 102 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $318 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 98 +char 1 114 +char 1 105 +char 1 97 +char 1 114 +char 1 95 +char 1 112 +char 1 105 +char 1 115 +char 1 116 +char 1 111 +char 1 108 +char 1 47 +char 1 98 +char 1 114 +char 1 105 +char 1 97 +char 1 114 +char 1 95 +char 1 112 +char 1 105 +char 1 115 +char 1 116 +char 1 111 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $317 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 98 +char 1 114 +char 1 105 +char 1 97 +char 1 114 +char 1 95 +char 1 112 +char 1 105 +char 1 115 +char 1 116 +char 1 111 +char 1 108 +char 1 47 +char 1 98 +char 1 114 +char 1 105 +char 1 97 +char 1 114 +char 1 95 +char 1 112 +char 1 105 +char 1 115 +char 1 116 +char 1 111 +char 1 108 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $316 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 95 +char 1 112 +char 1 105 +char 1 115 +char 1 116 +char 1 111 +char 1 108 +char 1 0 +align 1 +LABELV $315 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $314 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 119 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $313 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $312 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $311 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $310 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $309 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $308 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $307 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 121 +char 1 115 +char 1 97 +char 1 109 +char 1 97 +char 1 114 +char 1 105 +char 1 0 +align 1 +LABELV $306 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 121 +char 1 115 +char 1 97 +char 1 108 +char 1 105 +char 1 109 +char 1 97 +char 1 114 +char 1 105 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $305 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 121 +char 1 115 +char 1 97 +char 1 108 +char 1 105 +char 1 109 +char 1 97 +char 1 114 +char 1 105 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $304 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 121 +char 1 115 +char 1 97 +char 1 108 +char 1 105 +char 1 109 +char 1 97 +char 1 114 +char 1 105 +char 1 0 +align 1 +LABELV $303 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 102 +char 1 98 +char 1 111 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $302 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 98 +char 1 111 +char 1 111 +char 1 110 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $301 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 98 +char 1 111 +char 1 111 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $300 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 98 +char 1 111 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $299 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 100 +char 1 107 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $298 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 107 +char 1 95 +char 1 101 +char 1 110 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 101 +char 1 110 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $297 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 101 +char 1 110 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 101 +char 1 110 +char 1 95 +char 1 100 +char 1 97 +char 1 114 +char 1 107 +char 1 0 +align 1 +LABELV $296 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 106 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $295 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 106 +char 1 101 +char 1 100 +char 1 105 +char 1 95 +char 1 101 +char 1 110 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 101 +char 1 110 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $294 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 101 +char 1 110 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 101 +char 1 110 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $293 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 101 +char 1 110 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 101 +char 1 110 +char 1 95 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $292 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 105 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 101 +char 1 110 +char 1 116 +char 1 114 +char 1 121 +char 1 103 +char 1 117 +char 1 110 +char 1 0 +align 1 +LABELV $291 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 112 +char 1 115 +char 1 103 +char 1 117 +char 1 110 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $290 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 115 +char 1 101 +char 1 110 +char 1 116 +char 1 114 +char 1 121 +char 1 95 +char 1 103 +char 1 117 +char 1 110 +char 1 0 +align 1 +LABELV $289 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 105 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 122 +char 1 111 +char 1 111 +char 1 109 +char 1 0 +align 1 +LABELV $288 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 98 +char 1 105 +char 1 110 +char 1 111 +char 1 99 +char 1 117 +char 1 108 +char 1 97 +char 1 114 +char 1 115 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $287 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 98 +char 1 105 +char 1 110 +char 1 111 +char 1 99 +char 1 117 +char 1 108 +char 1 97 +char 1 114 +char 1 115 +char 1 0 +align 1 +LABELV $286 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 100 +char 1 97 +char 1 116 +char 1 97 +char 1 112 +char 1 97 +char 1 100 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $285 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 100 +char 1 97 +char 1 116 +char 1 97 +char 1 112 +char 1 97 +char 1 100 +char 1 0 +align 1 +LABELV $284 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 105 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 99 +char 1 116 +char 1 97 +char 1 0 +align 1 +LABELV $283 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 98 +char 1 97 +char 1 99 +char 1 116 +char 1 97 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $282 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 109 +char 1 101 +char 1 100 +char 1 112 +char 1 97 +char 1 99 +char 1 0 +align 1 +LABELV $281 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 47 +char 1 115 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 32 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 100 +char 1 111 +char 1 111 +char 1 114 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 102 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 95 +char 1 111 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 32 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 100 +char 1 111 +char 1 111 +char 1 114 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 102 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 32 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 100 +char 1 111 +char 1 111 +char 1 114 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 102 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 95 +char 1 108 +char 1 112 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 32 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 117 +char 1 109 +char 1 112 +char 1 102 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $280 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 105 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $279 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $278 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $277 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 105 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 101 +char 1 101 +char 1 107 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $276 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 109 +char 1 111 +char 1 116 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $275 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 119 +char 1 95 +char 1 112 +char 1 107 +char 1 117 +char 1 112 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $274 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 115 +char 1 101 +char 1 101 +char 1 107 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $273 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 105 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 109 +char 1 101 +char 1 100 +char 1 107 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $272 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 109 +char 1 101 +char 1 100 +char 1 112 +char 1 97 +char 1 99 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $271 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 112 +char 1 105 +char 1 99 +char 1 107 +char 1 117 +char 1 112 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 116 +char 1 104 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $270 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 109 +char 1 101 +char 1 100 +char 1 112 +char 1 97 +char 1 107 +char 1 95 +char 1 105 +char 1 110 +char 1 115 +char 1 116 +char 1 97 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $269 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 108 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 95 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $268 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 112 +char 1 115 +char 1 100 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $267 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 95 +char 1 108 +char 1 114 +char 1 103 +char 1 95 +char 1 105 +char 1 110 +char 1 115 +char 1 116 +char 1 97 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $266 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 115 +char 1 109 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $265 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 112 +char 1 115 +char 1 100 +char 1 95 +char 1 115 +char 1 109 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $264 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 112 +char 1 105 +char 1 99 +char 1 107 +char 1 117 +char 1 112 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $263 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 95 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 95 +char 1 115 +char 1 109 +char 1 95 +char 1 105 +char 1 110 +char 1 115 +char 1 116 +char 1 97 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $262 +char 1 0 +align 1 +LABELV $261 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $132 +char 1 37 +char 1 105 +char 1 45 +char 1 0 +align 1 +LABELV $131 +char 1 55 +char 1 45 +char 1 49 +char 1 45 +char 1 48 +char 1 51 +char 1 50 +char 1 51 +char 1 51 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 49 +char 1 51 +char 1 51 +char 1 51 +char 1 0 +align 1 +LABELV $127 +char 1 77 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 89 +char 1 55 +char 1 0 +align 1 +LABELV $126 +char 1 77 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 89 +char 1 54 +char 1 0 +align 1 +LABELV $125 +char 1 77 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 89 +char 1 53 +char 1 0 +align 1 +LABELV $124 +char 1 77 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 89 +char 1 52 +char 1 0 +align 1 +LABELV $123 +char 1 77 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 89 +char 1 51 +char 1 0 +align 1 +LABELV $122 +char 1 77 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 89 +char 1 50 +char 1 0 +align 1 +LABELV $121 +char 1 77 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 89 +char 1 49 +char 1 0 +align 1 +LABELV $120 +char 1 77 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 89 +char 1 48 +char 1 0 diff --git a/code/cgame/vm/bg_panimate.asm b/code/cgame/vm/bg_panimate.asm new file mode 100644 index 0000000..6c9625c --- /dev/null +++ b/code/cgame/vm/bg_panimate.asm @@ -0,0 +1,29895 @@ +data +export animTable +align 4 +LABELV animTable +address $65 +byte 4 0 +address $66 +byte 4 1 +address $67 +byte 4 2 +address $68 +byte 4 3 +address $69 +byte 4 4 +address $70 +byte 4 5 +address $71 +byte 4 6 +address $72 +byte 4 7 +address $73 +byte 4 8 +address $74 +byte 4 9 +address $75 +byte 4 10 +address $76 +byte 4 11 +address $77 +byte 4 12 +address $78 +byte 4 13 +address $79 +byte 4 14 +address $80 +byte 4 15 +address $81 +byte 4 16 +address $82 +byte 4 17 +address $83 +byte 4 18 +address $84 +byte 4 19 +address $85 +byte 4 20 +address $86 +byte 4 21 +address $87 +byte 4 22 +address $88 +byte 4 23 +address $89 +byte 4 24 +address $90 +byte 4 25 +address $91 +byte 4 26 +address $92 +byte 4 27 +address $93 +byte 4 28 +address $94 +byte 4 29 +address $95 +byte 4 30 +address $96 +byte 4 31 +address $97 +byte 4 32 +address $98 +byte 4 33 +address $99 +byte 4 34 +address $100 +byte 4 35 +address $101 +byte 4 36 +address $102 +byte 4 37 +address $103 +byte 4 38 +address $104 +byte 4 39 +address $105 +byte 4 40 +address $106 +byte 4 41 +address $107 +byte 4 42 +address $108 +byte 4 43 +address $109 +byte 4 44 +address $110 +byte 4 45 +address $111 +byte 4 46 +address $112 +byte 4 47 +address $113 +byte 4 48 +address $114 +byte 4 49 +address $115 +byte 4 50 +address $116 +byte 4 51 +address $117 +byte 4 52 +address $118 +byte 4 53 +address $119 +byte 4 54 +address $120 +byte 4 55 +address $121 +byte 4 56 +address $122 +byte 4 57 +address $123 +byte 4 58 +address $124 +byte 4 59 +address $125 +byte 4 60 +address $126 +byte 4 61 +address $127 +byte 4 62 +address $128 +byte 4 63 +address $129 +byte 4 64 +address $130 +byte 4 65 +address $131 +byte 4 66 +address $132 +byte 4 67 +address $133 +byte 4 68 +address $134 +byte 4 69 +address $135 +byte 4 70 +address $136 +byte 4 71 +address $137 +byte 4 72 +address $138 +byte 4 73 +address $139 +byte 4 74 +address $140 +byte 4 75 +address $141 +byte 4 76 +address $142 +byte 4 77 +address $143 +byte 4 78 +address $144 +byte 4 79 +address $145 +byte 4 80 +address $146 +byte 4 81 +address $147 +byte 4 82 +address $148 +byte 4 83 +address $149 +byte 4 84 +address $150 +byte 4 85 +address $151 +byte 4 86 +address $152 +byte 4 87 +address $153 +byte 4 88 +address $154 +byte 4 89 +address $155 +byte 4 90 +address $156 +byte 4 91 +address $157 +byte 4 92 +address $158 +byte 4 93 +address $159 +byte 4 94 +address $160 +byte 4 95 +address $161 +byte 4 96 +address $162 +byte 4 97 +address $163 +byte 4 98 +address $164 +byte 4 99 +address $165 +byte 4 100 +address $166 +byte 4 101 +address $167 +byte 4 102 +address $168 +byte 4 103 +address $169 +byte 4 104 +address $170 +byte 4 105 +address $171 +byte 4 106 +address $172 +byte 4 107 +address $173 +byte 4 108 +address $174 +byte 4 109 +address $175 +byte 4 110 +address $176 +byte 4 111 +address $177 +byte 4 112 +address $178 +byte 4 113 +address $179 +byte 4 114 +address $180 +byte 4 115 +address $181 +byte 4 116 +address $182 +byte 4 117 +address $183 +byte 4 118 +address $184 +byte 4 119 +address $185 +byte 4 120 +address $186 +byte 4 121 +address $187 +byte 4 122 +address $188 +byte 4 123 +address $189 +byte 4 124 +address $190 +byte 4 125 +address $191 +byte 4 126 +address $192 +byte 4 127 +address $193 +byte 4 128 +address $194 +byte 4 129 +address $195 +byte 4 130 +address $196 +byte 4 131 +address $197 +byte 4 132 +address $198 +byte 4 133 +address $199 +byte 4 134 +address $200 +byte 4 135 +address $201 +byte 4 136 +address $202 +byte 4 137 +address $203 +byte 4 138 +address $204 +byte 4 139 +address $205 +byte 4 140 +address $206 +byte 4 141 +address $207 +byte 4 142 +address $208 +byte 4 143 +address $209 +byte 4 144 +address $210 +byte 4 145 +address $211 +byte 4 146 +address $212 +byte 4 147 +address $213 +byte 4 148 +address $214 +byte 4 149 +address $215 +byte 4 150 +address $216 +byte 4 151 +address $217 +byte 4 152 +address $218 +byte 4 153 +address $219 +byte 4 154 +address $220 +byte 4 155 +address $221 +byte 4 156 +address $222 +byte 4 157 +address $223 +byte 4 158 +address $224 +byte 4 159 +address $225 +byte 4 160 +address $226 +byte 4 161 +address $227 +byte 4 162 +address $228 +byte 4 163 +address $229 +byte 4 164 +address $230 +byte 4 165 +address $231 +byte 4 166 +address $232 +byte 4 167 +address $233 +byte 4 168 +address $234 +byte 4 169 +address $235 +byte 4 170 +address $236 +byte 4 171 +address $237 +byte 4 172 +address $238 +byte 4 173 +address $239 +byte 4 174 +address $240 +byte 4 175 +address $241 +byte 4 176 +address $242 +byte 4 177 +address $243 +byte 4 178 +address $244 +byte 4 179 +address $245 +byte 4 180 +address $246 +byte 4 181 +address $247 +byte 4 182 +address $248 +byte 4 183 +address $249 +byte 4 184 +address $250 +byte 4 185 +address $251 +byte 4 186 +address $252 +byte 4 187 +address $253 +byte 4 188 +address $254 +byte 4 189 +address $255 +byte 4 190 +address $256 +byte 4 191 +address $257 +byte 4 192 +address $258 +byte 4 193 +address $259 +byte 4 194 +address $260 +byte 4 195 +address $261 +byte 4 196 +address $262 +byte 4 197 +address $263 +byte 4 198 +address $264 +byte 4 199 +address $265 +byte 4 200 +address $266 +byte 4 201 +address $267 +byte 4 202 +address $268 +byte 4 203 +address $269 +byte 4 204 +address $270 +byte 4 205 +address $271 +byte 4 206 +address $272 +byte 4 207 +address $273 +byte 4 208 +address $274 +byte 4 209 +address $275 +byte 4 210 +address $276 +byte 4 211 +address $277 +byte 4 212 +address $278 +byte 4 213 +address $279 +byte 4 214 +address $280 +byte 4 215 +address $281 +byte 4 216 +address $282 +byte 4 217 +address $283 +byte 4 218 +address $284 +byte 4 219 +address $285 +byte 4 220 +address $286 +byte 4 221 +address $287 +byte 4 222 +address $288 +byte 4 223 +address $289 +byte 4 224 +address $290 +byte 4 225 +address $291 +byte 4 226 +address $292 +byte 4 227 +address $293 +byte 4 228 +address $294 +byte 4 229 +address $295 +byte 4 230 +address $296 +byte 4 231 +address $297 +byte 4 232 +address $298 +byte 4 233 +address $299 +byte 4 234 +address $300 +byte 4 235 +address $301 +byte 4 236 +address $302 +byte 4 237 +address $303 +byte 4 238 +address $304 +byte 4 239 +address $305 +byte 4 240 +address $306 +byte 4 241 +address $307 +byte 4 242 +address $308 +byte 4 243 +address $309 +byte 4 244 +address $310 +byte 4 245 +address $311 +byte 4 246 +address $312 +byte 4 247 +address $313 +byte 4 248 +address $314 +byte 4 249 +address $315 +byte 4 250 +address $316 +byte 4 251 +address $317 +byte 4 252 +address $318 +byte 4 253 +address $319 +byte 4 254 +address $320 +byte 4 255 +address $321 +byte 4 256 +address $322 +byte 4 257 +address $323 +byte 4 258 +address $324 +byte 4 259 +address $325 +byte 4 260 +address $326 +byte 4 261 +address $327 +byte 4 262 +address $328 +byte 4 263 +address $329 +byte 4 264 +address $330 +byte 4 265 +address $331 +byte 4 266 +address $332 +byte 4 267 +address $333 +byte 4 268 +address $334 +byte 4 269 +address $335 +byte 4 270 +address $336 +byte 4 271 +address $337 +byte 4 272 +address $338 +byte 4 273 +address $339 +byte 4 274 +address $340 +byte 4 275 +address $341 +byte 4 276 +address $342 +byte 4 277 +address $343 +byte 4 278 +address $344 +byte 4 279 +address $345 +byte 4 280 +address $346 +byte 4 281 +address $347 +byte 4 282 +address $348 +byte 4 283 +address $349 +byte 4 284 +address $350 +byte 4 285 +address $351 +byte 4 286 +address $352 +byte 4 287 +address $353 +byte 4 288 +address $354 +byte 4 289 +address $355 +byte 4 290 +address $356 +byte 4 291 +address $357 +byte 4 292 +address $358 +byte 4 293 +address $359 +byte 4 294 +address $360 +byte 4 295 +address $361 +byte 4 296 +address $362 +byte 4 297 +address $363 +byte 4 298 +address $364 +byte 4 299 +address $365 +byte 4 300 +address $366 +byte 4 301 +address $367 +byte 4 302 +address $368 +byte 4 303 +address $369 +byte 4 304 +address $370 +byte 4 305 +address $371 +byte 4 306 +address $372 +byte 4 307 +address $373 +byte 4 308 +address $374 +byte 4 309 +address $375 +byte 4 310 +address $376 +byte 4 311 +address $377 +byte 4 312 +address $378 +byte 4 313 +address $379 +byte 4 314 +address $380 +byte 4 315 +address $381 +byte 4 316 +address $382 +byte 4 317 +address $383 +byte 4 318 +address $384 +byte 4 319 +address $385 +byte 4 320 +address $386 +byte 4 321 +address $387 +byte 4 322 +address $388 +byte 4 323 +address $389 +byte 4 324 +address $390 +byte 4 325 +address $391 +byte 4 326 +address $392 +byte 4 327 +address $393 +byte 4 328 +address $394 +byte 4 329 +address $395 +byte 4 330 +address $396 +byte 4 331 +address $397 +byte 4 332 +address $398 +byte 4 333 +address $399 +byte 4 334 +address $400 +byte 4 335 +address $401 +byte 4 336 +address $402 +byte 4 337 +address $403 +byte 4 338 +address $404 +byte 4 339 +address $405 +byte 4 340 +address $406 +byte 4 341 +address $407 +byte 4 342 +address $408 +byte 4 343 +address $409 +byte 4 344 +address $410 +byte 4 345 +address $411 +byte 4 346 +address $412 +byte 4 347 +address $413 +byte 4 348 +address $414 +byte 4 349 +address $415 +byte 4 350 +address $416 +byte 4 351 +address $417 +byte 4 352 +address $418 +byte 4 353 +address $419 +byte 4 354 +address $420 +byte 4 355 +address $421 +byte 4 356 +address $422 +byte 4 357 +address $423 +byte 4 358 +address $424 +byte 4 359 +address $425 +byte 4 360 +address $426 +byte 4 361 +address $427 +byte 4 362 +address $428 +byte 4 363 +address $429 +byte 4 364 +address $430 +byte 4 365 +address $431 +byte 4 366 +address $432 +byte 4 367 +address $433 +byte 4 368 +address $434 +byte 4 369 +address $435 +byte 4 370 +address $436 +byte 4 371 +address $437 +byte 4 372 +address $438 +byte 4 373 +address $439 +byte 4 374 +address $440 +byte 4 375 +address $441 +byte 4 376 +address $442 +byte 4 377 +address $443 +byte 4 378 +address $444 +byte 4 379 +address $445 +byte 4 380 +address $446 +byte 4 381 +address $447 +byte 4 382 +address $448 +byte 4 383 +address $449 +byte 4 384 +address $450 +byte 4 385 +address $451 +byte 4 386 +address $452 +byte 4 387 +address $453 +byte 4 388 +address $454 +byte 4 389 +address $455 +byte 4 390 +address $456 +byte 4 391 +address $457 +byte 4 392 +address $458 +byte 4 393 +address $459 +byte 4 394 +address $460 +byte 4 395 +address $461 +byte 4 396 +address $462 +byte 4 397 +address $463 +byte 4 398 +address $464 +byte 4 399 +address $465 +byte 4 400 +address $466 +byte 4 401 +address $467 +byte 4 402 +address $468 +byte 4 403 +address $469 +byte 4 404 +address $470 +byte 4 405 +address $471 +byte 4 406 +address $472 +byte 4 407 +address $473 +byte 4 408 +address $474 +byte 4 409 +address $475 +byte 4 410 +address $476 +byte 4 411 +address $477 +byte 4 412 +address $478 +byte 4 413 +address $479 +byte 4 414 +address $480 +byte 4 415 +address $481 +byte 4 416 +address $482 +byte 4 417 +address $483 +byte 4 418 +address $484 +byte 4 419 +address $485 +byte 4 420 +address $486 +byte 4 421 +address $487 +byte 4 422 +address $488 +byte 4 423 +address $489 +byte 4 424 +address $490 +byte 4 425 +address $491 +byte 4 426 +address $492 +byte 4 427 +address $493 +byte 4 428 +address $494 +byte 4 429 +address $495 +byte 4 430 +address $496 +byte 4 431 +address $497 +byte 4 432 +address $498 +byte 4 433 +address $499 +byte 4 434 +address $500 +byte 4 435 +address $501 +byte 4 436 +address $502 +byte 4 437 +address $503 +byte 4 438 +address $504 +byte 4 439 +address $505 +byte 4 440 +address $506 +byte 4 441 +address $507 +byte 4 442 +address $508 +byte 4 443 +address $509 +byte 4 444 +address $510 +byte 4 445 +address $511 +byte 4 446 +address $512 +byte 4 447 +address $513 +byte 4 448 +address $514 +byte 4 449 +address $515 +byte 4 450 +address $516 +byte 4 451 +address $517 +byte 4 452 +address $518 +byte 4 453 +address $519 +byte 4 454 +address $520 +byte 4 455 +address $521 +byte 4 456 +address $522 +byte 4 457 +address $523 +byte 4 458 +address $524 +byte 4 459 +address $525 +byte 4 460 +address $526 +byte 4 461 +address $527 +byte 4 462 +address $528 +byte 4 463 +address $529 +byte 4 464 +address $530 +byte 4 465 +address $531 +byte 4 466 +address $532 +byte 4 467 +address $533 +byte 4 468 +address $534 +byte 4 469 +address $535 +byte 4 470 +address $536 +byte 4 471 +address $537 +byte 4 472 +address $538 +byte 4 473 +address $539 +byte 4 474 +address $540 +byte 4 475 +address $541 +byte 4 476 +address $542 +byte 4 477 +address $543 +byte 4 478 +address $544 +byte 4 479 +address $545 +byte 4 480 +address $546 +byte 4 481 +address $547 +byte 4 482 +address $548 +byte 4 483 +address $549 +byte 4 484 +address $550 +byte 4 485 +address $551 +byte 4 486 +address $552 +byte 4 487 +address $553 +byte 4 488 +address $554 +byte 4 489 +address $555 +byte 4 490 +address $556 +byte 4 491 +address $557 +byte 4 492 +address $558 +byte 4 493 +address $559 +byte 4 494 +address $560 +byte 4 495 +address $561 +byte 4 496 +address $562 +byte 4 497 +address $563 +byte 4 498 +address $564 +byte 4 499 +address $565 +byte 4 500 +address $566 +byte 4 501 +address $567 +byte 4 502 +address $568 +byte 4 503 +address $569 +byte 4 504 +address $570 +byte 4 505 +address $571 +byte 4 506 +address $572 +byte 4 507 +address $573 +byte 4 508 +address $574 +byte 4 509 +address $575 +byte 4 510 +address $576 +byte 4 511 +address $577 +byte 4 512 +address $578 +byte 4 513 +address $579 +byte 4 514 +address $580 +byte 4 515 +address $581 +byte 4 516 +address $582 +byte 4 517 +address $583 +byte 4 518 +address $584 +byte 4 519 +address $585 +byte 4 520 +address $586 +byte 4 521 +address $587 +byte 4 522 +address $588 +byte 4 523 +address $589 +byte 4 524 +address $590 +byte 4 525 +address $591 +byte 4 526 +address $592 +byte 4 527 +address $593 +byte 4 528 +address $594 +byte 4 529 +address $595 +byte 4 530 +address $596 +byte 4 531 +address $597 +byte 4 532 +address $598 +byte 4 533 +address $599 +byte 4 534 +address $600 +byte 4 535 +address $601 +byte 4 536 +address $602 +byte 4 537 +address $603 +byte 4 538 +address $604 +byte 4 539 +address $605 +byte 4 540 +address $606 +byte 4 541 +address $607 +byte 4 542 +address $608 +byte 4 543 +address $609 +byte 4 544 +address $610 +byte 4 545 +address $611 +byte 4 546 +address $612 +byte 4 547 +address $613 +byte 4 548 +address $614 +byte 4 549 +address $615 +byte 4 550 +address $616 +byte 4 551 +address $617 +byte 4 552 +address $618 +byte 4 553 +address $619 +byte 4 554 +address $620 +byte 4 555 +address $621 +byte 4 556 +address $622 +byte 4 557 +address $623 +byte 4 558 +address $624 +byte 4 559 +address $625 +byte 4 560 +address $626 +byte 4 561 +address $627 +byte 4 562 +address $628 +byte 4 563 +address $629 +byte 4 564 +address $630 +byte 4 565 +address $631 +byte 4 566 +address $632 +byte 4 567 +address $633 +byte 4 568 +address $634 +byte 4 569 +address $635 +byte 4 570 +address $636 +byte 4 571 +address $637 +byte 4 572 +address $638 +byte 4 573 +address $639 +byte 4 574 +address $640 +byte 4 575 +address $641 +byte 4 576 +address $642 +byte 4 577 +address $643 +byte 4 578 +address $644 +byte 4 579 +address $645 +byte 4 580 +address $646 +byte 4 581 +address $647 +byte 4 582 +address $648 +byte 4 583 +address $649 +byte 4 584 +address $650 +byte 4 585 +address $651 +byte 4 586 +address $652 +byte 4 587 +address $653 +byte 4 588 +address $654 +byte 4 589 +address $655 +byte 4 590 +address $656 +byte 4 591 +address $657 +byte 4 592 +address $658 +byte 4 593 +address $659 +byte 4 594 +address $660 +byte 4 595 +address $661 +byte 4 596 +address $662 +byte 4 597 +address $663 +byte 4 598 +address $664 +byte 4 599 +address $665 +byte 4 600 +address $666 +byte 4 601 +address $667 +byte 4 602 +address $668 +byte 4 603 +address $669 +byte 4 604 +address $670 +byte 4 605 +address $671 +byte 4 606 +address $672 +byte 4 607 +address $673 +byte 4 608 +address $674 +byte 4 609 +address $675 +byte 4 610 +address $676 +byte 4 611 +address $677 +byte 4 612 +address $678 +byte 4 613 +address $679 +byte 4 614 +address $680 +byte 4 615 +address $681 +byte 4 616 +address $682 +byte 4 617 +address $683 +byte 4 618 +address $684 +byte 4 619 +address $685 +byte 4 620 +address $686 +byte 4 621 +address $687 +byte 4 622 +address $688 +byte 4 623 +address $689 +byte 4 624 +address $690 +byte 4 625 +address $691 +byte 4 626 +address $692 +byte 4 627 +address $693 +byte 4 628 +address $694 +byte 4 629 +address $695 +byte 4 630 +address $696 +byte 4 631 +address $697 +byte 4 632 +address $698 +byte 4 633 +address $699 +byte 4 634 +address $700 +byte 4 635 +address $701 +byte 4 636 +address $702 +byte 4 637 +address $703 +byte 4 638 +address $704 +byte 4 639 +address $705 +byte 4 640 +address $706 +byte 4 641 +address $707 +byte 4 642 +address $708 +byte 4 643 +address $709 +byte 4 644 +address $710 +byte 4 645 +address $711 +byte 4 646 +address $712 +byte 4 647 +address $713 +byte 4 648 +address $714 +byte 4 649 +address $715 +byte 4 650 +address $716 +byte 4 651 +address $717 +byte 4 652 +address $718 +byte 4 653 +address $719 +byte 4 654 +address $720 +byte 4 655 +address $721 +byte 4 656 +address $722 +byte 4 657 +address $723 +byte 4 658 +address $724 +byte 4 659 +address $725 +byte 4 660 +address $726 +byte 4 661 +address $727 +byte 4 662 +address $728 +byte 4 663 +address $729 +byte 4 664 +address $730 +byte 4 665 +address $731 +byte 4 666 +address $732 +byte 4 667 +address $733 +byte 4 668 +address $734 +byte 4 669 +address $735 +byte 4 670 +address $736 +byte 4 671 +address $737 +byte 4 672 +address $738 +byte 4 673 +address $739 +byte 4 674 +address $740 +byte 4 675 +address $741 +byte 4 676 +address $742 +byte 4 677 +address $743 +byte 4 678 +address $744 +byte 4 679 +address $745 +byte 4 680 +address $746 +byte 4 681 +address $747 +byte 4 682 +address $748 +byte 4 683 +address $749 +byte 4 684 +address $750 +byte 4 685 +address $751 +byte 4 686 +address $752 +byte 4 687 +address $753 +byte 4 688 +address $754 +byte 4 689 +address $755 +byte 4 690 +address $756 +byte 4 691 +address $757 +byte 4 692 +address $758 +byte 4 693 +address $759 +byte 4 694 +address $760 +byte 4 695 +address $761 +byte 4 696 +address $762 +byte 4 697 +address $763 +byte 4 698 +address $764 +byte 4 699 +address $765 +byte 4 700 +address $766 +byte 4 701 +address $767 +byte 4 702 +address $768 +byte 4 703 +address $769 +byte 4 704 +address $770 +byte 4 705 +address $771 +byte 4 706 +address $772 +byte 4 707 +address $773 +byte 4 708 +address $774 +byte 4 709 +address $775 +byte 4 710 +address $776 +byte 4 711 +address $777 +byte 4 712 +address $778 +byte 4 713 +address $779 +byte 4 714 +address $780 +byte 4 715 +address $781 +byte 4 716 +address $782 +byte 4 717 +address $783 +byte 4 718 +address $784 +byte 4 719 +address $785 +byte 4 720 +address $786 +byte 4 721 +address $787 +byte 4 722 +address $788 +byte 4 723 +address $789 +byte 4 724 +address $790 +byte 4 725 +address $791 +byte 4 726 +address $792 +byte 4 727 +address $793 +byte 4 728 +address $794 +byte 4 729 +address $795 +byte 4 730 +address $796 +byte 4 731 +address $797 +byte 4 732 +address $798 +byte 4 733 +address $799 +byte 4 734 +address $800 +byte 4 735 +address $801 +byte 4 736 +address $802 +byte 4 737 +address $803 +byte 4 738 +address $804 +byte 4 739 +address $805 +byte 4 740 +address $806 +byte 4 741 +address $807 +byte 4 742 +address $808 +byte 4 743 +address $809 +byte 4 744 +address $810 +byte 4 745 +address $811 +byte 4 746 +address $812 +byte 4 747 +address $813 +byte 4 748 +address $814 +byte 4 749 +address $815 +byte 4 750 +address $816 +byte 4 751 +address $817 +byte 4 752 +address $818 +byte 4 753 +address $819 +byte 4 754 +address $820 +byte 4 755 +address $821 +byte 4 756 +address $822 +byte 4 757 +address $823 +byte 4 758 +address $824 +byte 4 759 +address $825 +byte 4 760 +address $826 +byte 4 761 +address $827 +byte 4 762 +address $828 +byte 4 763 +address $829 +byte 4 764 +address $830 +byte 4 765 +address $831 +byte 4 766 +address $832 +byte 4 767 +address $833 +byte 4 768 +address $834 +byte 4 769 +address $835 +byte 4 770 +address $836 +byte 4 771 +address $837 +byte 4 772 +address $838 +byte 4 773 +address $839 +byte 4 774 +address $840 +byte 4 775 +address $841 +byte 4 776 +address $842 +byte 4 777 +address $843 +byte 4 778 +address $844 +byte 4 779 +address $845 +byte 4 780 +address $846 +byte 4 781 +address $847 +byte 4 782 +address $848 +byte 4 783 +address $849 +byte 4 784 +address $850 +byte 4 785 +address $851 +byte 4 786 +address $852 +byte 4 787 +address $853 +byte 4 788 +address $854 +byte 4 789 +address $855 +byte 4 790 +address $856 +byte 4 791 +address $857 +byte 4 792 +address $858 +byte 4 793 +address $859 +byte 4 794 +address $860 +byte 4 795 +address $861 +byte 4 796 +address $862 +byte 4 797 +address $863 +byte 4 798 +address $864 +byte 4 799 +address $865 +byte 4 800 +address $866 +byte 4 801 +address $867 +byte 4 802 +address $868 +byte 4 803 +address $869 +byte 4 804 +address $870 +byte 4 805 +address $871 +byte 4 806 +address $872 +byte 4 807 +address $873 +byte 4 808 +address $874 +byte 4 809 +address $875 +byte 4 810 +address $876 +byte 4 811 +address $877 +byte 4 812 +address $878 +byte 4 813 +address $879 +byte 4 814 +address $880 +byte 4 815 +address $881 +byte 4 816 +address $882 +byte 4 817 +address $883 +byte 4 818 +address $884 +byte 4 819 +address $885 +byte 4 820 +address $886 +byte 4 821 +address $887 +byte 4 822 +address $888 +byte 4 823 +address $889 +byte 4 824 +address $890 +byte 4 825 +address $891 +byte 4 826 +address $892 +byte 4 827 +address $893 +byte 4 828 +address $894 +byte 4 829 +address $895 +byte 4 830 +address $896 +byte 4 831 +address $897 +byte 4 832 +address $898 +byte 4 833 +address $899 +byte 4 834 +address $900 +byte 4 835 +address $901 +byte 4 836 +address $902 +byte 4 837 +address $903 +byte 4 838 +address $904 +byte 4 839 +address $905 +byte 4 840 +address $906 +byte 4 841 +address $907 +byte 4 842 +address $908 +byte 4 843 +address $909 +byte 4 844 +address $910 +byte 4 845 +address $911 +byte 4 846 +address $912 +byte 4 847 +address $913 +byte 4 848 +address $914 +byte 4 849 +address $915 +byte 4 850 +address $916 +byte 4 851 +address $917 +byte 4 852 +address $918 +byte 4 853 +address $919 +byte 4 854 +address $920 +byte 4 855 +address $921 +byte 4 856 +address $922 +byte 4 857 +address $923 +byte 4 858 +address $924 +byte 4 859 +address $925 +byte 4 860 +address $926 +byte 4 861 +address $927 +byte 4 862 +address $928 +byte 4 863 +address $929 +byte 4 864 +address $930 +byte 4 865 +address $931 +byte 4 866 +address $932 +byte 4 867 +address $933 +byte 4 868 +address $934 +byte 4 869 +address $935 +byte 4 870 +address $936 +byte 4 871 +address $937 +byte 4 872 +address $938 +byte 4 873 +address $939 +byte 4 874 +address $940 +byte 4 875 +address $941 +byte 4 876 +address $942 +byte 4 877 +address $943 +byte 4 878 +address $944 +byte 4 879 +address $945 +byte 4 880 +address $946 +byte 4 881 +address $947 +byte 4 882 +address $948 +byte 4 883 +address $949 +byte 4 884 +address $950 +byte 4 885 +address $951 +byte 4 886 +address $952 +byte 4 887 +address $953 +byte 4 888 +address $954 +byte 4 889 +address $955 +byte 4 890 +address $956 +byte 4 891 +address $957 +byte 4 892 +address $958 +byte 4 893 +address $959 +byte 4 894 +address $960 +byte 4 895 +address $961 +byte 4 896 +address $962 +byte 4 897 +address $963 +byte 4 898 +address $964 +byte 4 899 +address $965 +byte 4 900 +address $966 +byte 4 901 +address $967 +byte 4 902 +address $968 +byte 4 903 +address $969 +byte 4 904 +address $970 +byte 4 905 +address $971 +byte 4 906 +address $972 +byte 4 907 +address $973 +byte 4 908 +address $974 +byte 4 909 +address $975 +byte 4 910 +address $976 +byte 4 911 +address $977 +byte 4 912 +address $978 +byte 4 913 +address $979 +byte 4 914 +address $980 +byte 4 915 +address $981 +byte 4 916 +address $982 +byte 4 917 +address $983 +byte 4 918 +address $984 +byte 4 919 +address $985 +byte 4 920 +address $986 +byte 4 921 +address $987 +byte 4 922 +address $988 +byte 4 923 +address $989 +byte 4 924 +address $990 +byte 4 925 +address $991 +byte 4 926 +address $992 +byte 4 927 +address $993 +byte 4 928 +address $994 +byte 4 929 +address $995 +byte 4 930 +address $996 +byte 4 931 +address $997 +byte 4 932 +address $998 +byte 4 933 +address $999 +byte 4 934 +address $1000 +byte 4 935 +address $1001 +byte 4 936 +address $1002 +byte 4 937 +address $1003 +byte 4 938 +address $1004 +byte 4 939 +address $1005 +byte 4 940 +address $1006 +byte 4 941 +address $1007 +byte 4 942 +address $1008 +byte 4 943 +address $1009 +byte 4 944 +address $1010 +byte 4 945 +address $1011 +byte 4 946 +address $1012 +byte 4 947 +address $1013 +byte 4 948 +address $1014 +byte 4 949 +address $1015 +byte 4 950 +address $1016 +byte 4 951 +address $1017 +byte 4 952 +address $1018 +byte 4 953 +address $1019 +byte 4 954 +address $1020 +byte 4 955 +address $1021 +byte 4 956 +address $1022 +byte 4 957 +address $1023 +byte 4 958 +address $1024 +byte 4 959 +address $1025 +byte 4 960 +address $1026 +byte 4 961 +address $1027 +byte 4 962 +address $1028 +byte 4 963 +address $1029 +byte 4 964 +address $1030 +byte 4 965 +address $1031 +byte 4 966 +address $1032 +byte 4 967 +address $1033 +byte 4 968 +address $1034 +byte 4 969 +address $1035 +byte 4 970 +address $1036 +byte 4 971 +address $1037 +byte 4 972 +address $1038 +byte 4 973 +address $1039 +byte 4 974 +address $1040 +byte 4 975 +address $1041 +byte 4 976 +address $1042 +byte 4 977 +address $1043 +byte 4 978 +address $1044 +byte 4 979 +address $1045 +byte 4 980 +address $1046 +byte 4 981 +address $1047 +byte 4 982 +address $1048 +byte 4 983 +address $1049 +byte 4 984 +address $1050 +byte 4 985 +address $1051 +byte 4 986 +address $1052 +byte 4 987 +address $1053 +byte 4 988 +address $1054 +byte 4 989 +address $1055 +byte 4 990 +address $1056 +byte 4 991 +address $1057 +byte 4 992 +address $1058 +byte 4 993 +address $1059 +byte 4 994 +address $1060 +byte 4 995 +address $1061 +byte 4 996 +address $1062 +byte 4 997 +address $1063 +byte 4 998 +address $1064 +byte 4 999 +address $1065 +byte 4 1000 +address $1066 +byte 4 1001 +address $1067 +byte 4 1002 +address $1068 +byte 4 1003 +address $1069 +byte 4 1004 +address $1070 +byte 4 1005 +address $1071 +byte 4 1006 +address $1072 +byte 4 1007 +address $1073 +byte 4 1008 +address $1074 +byte 4 1009 +address $1075 +byte 4 1010 +address $1076 +byte 4 1011 +address $1077 +byte 4 1012 +address $1078 +byte 4 1013 +address $1079 +byte 4 1014 +address $1080 +byte 4 1015 +address $1081 +byte 4 1016 +address $1082 +byte 4 1017 +address $1083 +byte 4 1018 +address $1084 +byte 4 1019 +address $1085 +byte 4 1020 +address $1086 +byte 4 1021 +address $1087 +byte 4 1022 +address $1088 +byte 4 1023 +address $1089 +byte 4 1024 +address $1090 +byte 4 1025 +address $1091 +byte 4 1026 +address $1092 +byte 4 1027 +address $1093 +byte 4 1028 +address $1094 +byte 4 1029 +address $1095 +byte 4 1030 +address $1096 +byte 4 1031 +address $1097 +byte 4 1032 +address $1098 +byte 4 1033 +address $1099 +byte 4 1034 +address $1100 +byte 4 1035 +address $1101 +byte 4 1036 +address $1102 +byte 4 1037 +address $1103 +byte 4 1038 +address $1104 +byte 4 1039 +address $1105 +byte 4 1040 +address $1106 +byte 4 1041 +address $1107 +byte 4 1042 +address $1108 +byte 4 1043 +address $1109 +byte 4 1044 +address $1110 +byte 4 1045 +address $1111 +byte 4 1046 +address $1112 +byte 4 1047 +address $1113 +byte 4 1048 +address $1114 +byte 4 1049 +address $1115 +byte 4 1050 +address $1116 +byte 4 1051 +address $1117 +byte 4 1052 +address $1118 +byte 4 1053 +address $1119 +byte 4 1054 +address $1120 +byte 4 1055 +address $1121 +byte 4 1056 +address $1122 +byte 4 1057 +address $1123 +byte 4 1058 +address $1124 +byte 4 1059 +address $1125 +byte 4 1060 +address $1126 +byte 4 1061 +address $1127 +byte 4 1062 +address $1128 +byte 4 1063 +address $1129 +byte 4 1064 +address $1130 +byte 4 1065 +address $1131 +byte 4 1066 +address $1132 +byte 4 1067 +address $1133 +byte 4 1068 +address $1134 +byte 4 1069 +address $1135 +byte 4 1070 +address $1136 +byte 4 1071 +address $1137 +byte 4 1072 +address $1138 +byte 4 1073 +address $1139 +byte 4 1074 +address $1140 +byte 4 1075 +address $1141 +byte 4 1076 +address $1142 +byte 4 1077 +address $1143 +byte 4 1078 +address $1144 +byte 4 1079 +address $1145 +byte 4 1080 +address $1146 +byte 4 1081 +address $1147 +byte 4 1082 +address $1148 +byte 4 1083 +address $1149 +byte 4 1084 +address $1150 +byte 4 1085 +address $1151 +byte 4 1086 +address $1152 +byte 4 1087 +address $1153 +byte 4 1088 +address $1154 +byte 4 1089 +address $1155 +byte 4 1090 +address $1156 +byte 4 1091 +address $1157 +byte 4 1092 +address $1158 +byte 4 1093 +address $1159 +byte 4 1094 +address $1160 +byte 4 1095 +address $1161 +byte 4 1096 +address $1162 +byte 4 1097 +address $1163 +byte 4 1098 +address $1164 +byte 4 1099 +address $1165 +byte 4 1100 +address $1166 +byte 4 1101 +address $1167 +byte 4 1102 +address $1168 +byte 4 1103 +address $1169 +byte 4 1104 +address $1170 +byte 4 1105 +address $1171 +byte 4 1106 +address $1172 +byte 4 1107 +address $1173 +byte 4 1108 +address $1174 +byte 4 1109 +address $1175 +byte 4 1110 +address $1176 +byte 4 1111 +address $1177 +byte 4 1112 +address $1178 +byte 4 1113 +address $1179 +byte 4 1114 +address $1180 +byte 4 1115 +address $1181 +byte 4 1116 +address $1182 +byte 4 1117 +address $1183 +byte 4 1118 +address $1184 +byte 4 1119 +address $1185 +byte 4 1120 +address $1186 +byte 4 1121 +address $1187 +byte 4 1122 +address $1188 +byte 4 1123 +address $1189 +byte 4 1124 +address $1190 +byte 4 1125 +address $1191 +byte 4 1126 +address $1192 +byte 4 1127 +address $1193 +byte 4 1128 +address $1194 +byte 4 1129 +address $1195 +byte 4 1130 +address $1196 +byte 4 1131 +address $1197 +byte 4 1132 +address $1198 +byte 4 1133 +address $1199 +byte 4 1134 +address $1200 +byte 4 1135 +address $1201 +byte 4 1136 +address $1202 +byte 4 1137 +address $1203 +byte 4 1138 +address $1204 +byte 4 1139 +address $1205 +byte 4 1140 +address $1206 +byte 4 1141 +address $1207 +byte 4 1142 +address $1208 +byte 4 1143 +address $1209 +byte 4 1144 +address $1210 +byte 4 1145 +address $1211 +byte 4 1146 +address $1212 +byte 4 1147 +address $1213 +byte 4 1148 +address $1214 +byte 4 1149 +address $1215 +byte 4 1150 +address $1216 +byte 4 1151 +address $1217 +byte 4 1152 +address $1218 +byte 4 1153 +address $1219 +byte 4 1154 +address $1220 +byte 4 1155 +address $1221 +byte 4 1156 +address $1222 +byte 4 1157 +address $1223 +byte 4 1158 +address $1224 +byte 4 1159 +address $1225 +byte 4 1160 +address $1226 +byte 4 1161 +address $1227 +byte 4 1162 +address $1228 +byte 4 1163 +address $1229 +byte 4 1164 +address $1230 +byte 4 1165 +address $1231 +byte 4 1166 +address $1232 +byte 4 1167 +address $1233 +byte 4 1168 +address $1234 +byte 4 1169 +address $1235 +byte 4 1170 +address $1236 +byte 4 1171 +address $1237 +byte 4 1172 +address $1238 +byte 4 1173 +address $1239 +byte 4 1174 +address $1240 +byte 4 1175 +address $1241 +byte 4 1176 +address $1242 +byte 4 1177 +address $1243 +byte 4 1178 +address $1244 +byte 4 1179 +address $1245 +byte 4 1180 +address $1246 +byte 4 1181 +address $1247 +byte 4 1182 +address $1248 +byte 4 1183 +address $1249 +byte 4 1184 +address $1250 +byte 4 1185 +address $1251 +byte 4 1186 +address $1252 +byte 4 1187 +address $1253 +byte 4 1188 +address $1254 +byte 4 1189 +address $1255 +byte 4 1190 +address $1256 +byte 4 1191 +address $1257 +byte 4 1192 +address $1258 +byte 4 1193 +address $1259 +byte 4 1194 +address $1260 +byte 4 1195 +address $1261 +byte 4 1196 +address $1262 +byte 4 1197 +address $1263 +byte 4 1198 +address $1264 +byte 4 1199 +address $1265 +byte 4 1200 +address $1266 +byte 4 1201 +address $1267 +byte 4 1202 +address $1268 +byte 4 1203 +address $1269 +byte 4 1204 +address $1270 +byte 4 1205 +address $1271 +byte 4 1206 +address $1272 +byte 4 1207 +address $1273 +byte 4 1208 +address $1274 +byte 4 1209 +byte 4 0 +byte 4 -1 +export BG_InSpecialJump +code +proc BG_InSpecialJump 8 0 +file "../../game/bg_panimate.c" +line 16 +;1:// BG_PAnimate.c +;2: +;3:#include "q_shared.h" +;4:#include "bg_public.h" +;5:#include "bg_local.h" +;6:#include "anims.h" +;7:#include "../cgame/animtable.h" +;8: +;9:/* +;10:============================================================================== +;11:BEGIN: Animation utility functions (sequence checking) +;12:============================================================================== +;13:*/ +;14://Called regardless of pm validity: +;15:qboolean BG_InSpecialJump( int anim ) +;16:{ +line 17 +;17: switch ( (anim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 910 +LTI4 $1276 +ADDRLP4 0 +INDIRI4 +CNSTI4 922 +GTI4 $1280 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1281-3640 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1281 +address $1279 +address $1279 +address $1279 +address $1279 +address $1279 +address $1279 +address $1279 +address $1276 +address $1279 +address $1279 +address $1276 +address $1279 +address $1279 +code +LABELV $1280 +ADDRLP4 0 +INDIRI4 +CNSTI4 944 +EQI4 $1279 +ADDRGP4 $1276 +JUMPV +line 18 +;18: { +LABELV $1279 +line 31 +;19: case BOTH_WALL_RUN_RIGHT: +;20: case BOTH_WALL_RUN_RIGHT_FLIP: +;21: case BOTH_WALL_RUN_LEFT: +;22: case BOTH_WALL_RUN_LEFT_FLIP: +;23: case BOTH_WALL_FLIP_RIGHT: +;24: case BOTH_WALL_FLIP_LEFT: +;25: case BOTH_FLIP_BACK1: +;26: case BOTH_FLIP_BACK2: +;27: case BOTH_FLIP_BACK3: +;28: case BOTH_WALL_FLIP_BACK1: +;29: case BOTH_BUTTERFLY_LEFT: +;30: case BOTH_BUTTERFLY_RIGHT: +;31: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1275 +JUMPV +LABELV $1276 +line 33 +;32: } +;33: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1275 +endproc BG_InSpecialJump 8 0 +export BG_InSaberStandAnim +proc BG_InSaberStandAnim 12 0 +line 37 +;34:} +;35: +;36:qboolean BG_InSaberStandAnim( int anim ) +;37:{ +line 38 +;38: switch ( (anim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 8 +CNSTI4 562 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1287 +ADDRLP4 0 +INDIRI4 +CNSTI4 563 +EQI4 $1287 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $1284 +LABELV $1288 +ADDRLP4 0 +INDIRI4 +CNSTI4 573 +EQI4 $1287 +ADDRGP4 $1284 +JUMPV +line 39 +;39: { +LABELV $1287 +line 43 +;40: case BOTH_SABERFAST_STANCE: +;41: case BOTH_STAND2: +;42: case BOTH_SABERSLOW_STANCE: +;43: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1283 +JUMPV +LABELV $1284 +line 45 +;44: default: +;45: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1283 +endproc BG_InSaberStandAnim 12 0 +export BG_DirectFlippingAnim +proc BG_DirectFlippingAnim 8 0 +line 50 +;46: } +;47:} +;48: +;49:qboolean BG_DirectFlippingAnim( int anim ) +;50:{ +line 51 +;51: switch ( (anim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 881 +LTI4 $1290 +ADDRLP4 0 +INDIRI4 +CNSTI4 884 +GTI4 $1290 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1294-3524 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1294 +address $1293 +address $1293 +address $1293 +address $1293 +code +line 52 +;52: { +LABELV $1293 +line 57 +;53: case BOTH_FLIP_F: //# Flip forward +;54: case BOTH_FLIP_B: //# Flip backwards +;55: case BOTH_FLIP_L: //# Flip left +;56: case BOTH_FLIP_R: //# Flip right +;57: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1289 +JUMPV +line 58 +;58: break; +LABELV $1290 +line 61 +;59: } +;60: +;61: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1289 +endproc BG_DirectFlippingAnim 8 0 +export BG_SaberInAttack +proc BG_SaberInAttack 8 0 +line 65 +;62:} +;63: +;64:qboolean BG_SaberInAttack( int move ) +;65:{ +line 66 +;66: if ( move >= LS_A_TL2BR && move <= LS_A_T2B ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $1297 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +GTI4 $1297 +line 67 +;67: { +line 68 +;68: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1296 +JUMPV +LABELV $1297 +line 70 +;69: } +;70: switch ( move ) +ADDRLP4 4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 11 +LTI4 $1299 +ADDRLP4 4 +INDIRI4 +CNSTI4 17 +GTI4 $1299 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1302-44 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1302 +address $1301 +address $1301 +address $1301 +address $1301 +address $1301 +address $1301 +address $1301 +code +line 71 +;71: { +LABELV $1301 +line 79 +;72: case LS_A_BACK: +;73: case LS_A_BACK_CR: +;74: case LS_A_BACKSTAB: +;75: case LS_A_LUNGE: +;76: case LS_A_JUMP_T__B_: +;77: case LS_A_FLIP_STAB: +;78: case LS_A_FLIP_SLASH: +;79: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1296 +JUMPV +line 80 +;80: break; +LABELV $1299 +line 82 +;81: } +;82: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1296 +endproc BG_SaberInAttack 8 0 +export BG_SaberInSpecial +proc BG_SaberInSpecial 4 0 +line 86 +;83:} +;84: +;85:qboolean BG_SaberInSpecial( int move ) +;86:{ +line 87 +;87: switch( move ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 11 +LTI4 $1305 +ADDRLP4 0 +INDIRI4 +CNSTI4 17 +GTI4 $1305 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1308-44 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1308 +address $1307 +address $1307 +address $1307 +address $1307 +address $1307 +address $1307 +address $1307 +code +line 88 +;88: { +LABELV $1307 +line 96 +;89: case LS_A_BACK: +;90: case LS_A_BACK_CR: +;91: case LS_A_BACKSTAB: +;92: case LS_A_LUNGE: +;93: case LS_A_JUMP_T__B_: +;94: case LS_A_FLIP_STAB: +;95: case LS_A_FLIP_SLASH: +;96: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1304 +JUMPV +LABELV $1305 +line 98 +;97: } +;98: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1304 +endproc BG_SaberInSpecial 4 0 +export BG_SaberInIdle +proc BG_SaberInIdle 4 0 +line 102 +;99:} +;100: +;101:qboolean BG_SaberInIdle( int move ) +;102:{ +line 103 +;103: switch ( move ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $1311 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +GTI4 $1311 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1314 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1314 +address $1313 +address $1313 +address $1313 +address $1313 +code +line 104 +;104: { +LABELV $1313 +line 109 +;105: case LS_NONE: +;106: case LS_READY: +;107: case LS_DRAW: +;108: case LS_PUTAWAY: +;109: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1310 +JUMPV +line 110 +;110: break; +LABELV $1311 +line 112 +;111: } +;112: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1310 +endproc BG_SaberInIdle 4 0 +export BG_FlippingAnim +proc BG_FlippingAnim 20 0 +line 116 +;113:} +;114: +;115:qboolean BG_FlippingAnim( int anim ) +;116:{ +line 117 +;117: switch ( anim&~ANIM_TOGGLEBIT ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 881 +LTI4 $1320 +ADDRLP4 0 +INDIRI4 +CNSTI4 922 +GTI4 $1321 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1322-3524 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1322 +address $1319 +address $1319 +address $1319 +address $1319 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1316 +address $1319 +address $1319 +address $1319 +address $1319 +address $1316 +address $1319 +address $1319 +address $1319 +address $1319 +address $1319 +address $1319 +address $1319 +address $1319 +address $1319 +address $1319 +address $1319 +address $1319 +address $1319 +code +LABELV $1320 +ADDRLP4 0 +INDIRI4 +CNSTI4 566 +EQI4 $1319 +ADDRLP4 0 +INDIRI4 +CNSTI4 567 +EQI4 $1319 +ADDRGP4 $1316 +JUMPV +LABELV $1321 +ADDRLP4 16 +CNSTI4 944 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $1319 +ADDRLP4 0 +INDIRI4 +ADDRLP4 16 +INDIRI4 +LTI4 $1316 +LABELV $1324 +ADDRLP4 0 +INDIRI4 +CNSTI4 955 +EQI4 $1319 +ADDRGP4 $1316 +JUMPV +line 118 +;118: { +LABELV $1319 +line 146 +;119: case BOTH_FLIP_F: //# Flip forward +;120: case BOTH_FLIP_B: //# Flip backwards +;121: case BOTH_FLIP_L: //# Flip left +;122: case BOTH_FLIP_R: //# Flip right +;123: case BOTH_WALL_RUN_RIGHT_FLIP: +;124: case BOTH_WALL_RUN_LEFT_FLIP: +;125: case BOTH_WALL_FLIP_RIGHT: +;126: case BOTH_WALL_FLIP_LEFT: +;127: case BOTH_FLIP_BACK1: +;128: case BOTH_FLIP_BACK2: +;129: case BOTH_FLIP_BACK3: +;130: case BOTH_WALL_FLIP_BACK1: +;131: //Not really flips, but... +;132: case BOTH_WALL_RUN_RIGHT: +;133: case BOTH_WALL_RUN_LEFT: +;134: case BOTH_WALL_RUN_RIGHT_STOP: +;135: case BOTH_WALL_RUN_LEFT_STOP: +;136: case BOTH_BUTTERFLY_LEFT: +;137: case BOTH_BUTTERFLY_RIGHT: +;138: // +;139: case BOTH_ARIAL_LEFT: +;140: case BOTH_ARIAL_RIGHT: +;141: case BOTH_ARIAL_F1: +;142: case BOTH_CARTWHEEL_LEFT: +;143: case BOTH_CARTWHEEL_RIGHT: +;144: case BOTH_JUMPFLIPSLASHDOWN1: +;145: case BOTH_JUMPFLIPSTABDOWN: +;146: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1315 +JUMPV +line 147 +;147: break; +LABELV $1316 +line 149 +;148: } +;149: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1315 +endproc BG_FlippingAnim 20 0 +export BG_SpinningSaberAnim +proc BG_SpinningSaberAnim 76 0 +line 153 +;150:} +;151: +;152:qboolean BG_SpinningSaberAnim( int anim ) +;153:{ +line 154 +;154: switch ( anim&~ANIM_TOGGLEBIT ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 378 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +CNSTI4 379 +EQI4 $1329 +ADDRLP4 8 +CNSTI4 383 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +GTI4 $1331 +LABELV $1330 +ADDRLP4 0 +INDIRI4 +CNSTI4 224 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +CNSTI4 225 +EQI4 $1329 +ADDRLP4 16 +CNSTI4 229 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +ADDRLP4 16 +INDIRI4 +GTI4 $1333 +LABELV $1332 +ADDRLP4 0 +INDIRI4 +CNSTI4 146 +LTI4 $1326 +ADDRLP4 0 +INDIRI4 +CNSTI4 156 +GTI4 $1334 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1335-584 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1335 +address $1329 +address $1329 +address $1329 +address $1326 +address $1326 +address $1329 +address $1329 +address $1326 +address $1326 +address $1326 +address $1329 +code +LABELV $1334 +ADDRLP4 0 +INDIRI4 +CNSTI4 163 +LTI4 $1326 +ADDRLP4 0 +INDIRI4 +CNSTI4 170 +GTI4 $1326 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1337-652 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1337 +address $1329 +address $1326 +address $1329 +address $1329 +address $1326 +address $1329 +address $1329 +address $1329 +code +LABELV $1333 +ADDRLP4 0 +INDIRI4 +CNSTI4 301 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +CNSTI4 302 +EQI4 $1329 +ADDRLP4 32 +CNSTI4 306 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 32 +INDIRI4 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +ADDRLP4 32 +INDIRI4 +GTI4 $1340 +LABELV $1339 +ADDRLP4 0 +INDIRI4 +CNSTI4 242 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +CNSTI4 245 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +CNSTI4 246 +EQI4 $1329 +ADDRGP4 $1326 +JUMPV +LABELV $1340 +ADDRLP4 0 +INDIRI4 +CNSTI4 319 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +CNSTI4 322 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +CNSTI4 323 +EQI4 $1329 +ADDRGP4 $1326 +JUMPV +LABELV $1331 +ADDRLP4 0 +INDIRI4 +CNSTI4 471 +LTI4 $1341 +ADDRLP4 0 +INDIRI4 +CNSTI4 478 +GTI4 $1342 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1343-1884 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1343 +address $1329 +address $1326 +address $1329 +address $1329 +address $1326 +address $1329 +address $1329 +address $1329 +code +LABELV $1341 +ADDRLP4 52 +CNSTI4 396 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 52 +INDIRI4 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +CNSTI4 399 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +CNSTI4 400 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +ADDRLP4 52 +INDIRI4 +LTI4 $1326 +LABELV $1345 +ADDRLP4 0 +INDIRI4 +CNSTI4 454 +LTI4 $1326 +ADDRLP4 0 +INDIRI4 +CNSTI4 464 +GTI4 $1326 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1346-1816 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1346 +address $1329 +address $1329 +address $1329 +address $1326 +address $1326 +address $1329 +address $1329 +address $1326 +address $1326 +address $1326 +address $1329 +code +LABELV $1342 +ADDRLP4 0 +INDIRI4 +CNSTI4 913 +EQI4 $1329 +ADDRLP4 64 +CNSTI4 914 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 64 +INDIRI4 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +ADDRLP4 64 +INDIRI4 +GTI4 $1349 +LABELV $1348 +ADDRLP4 0 +INDIRI4 +CNSTI4 565 +LTI4 $1326 +ADDRLP4 0 +INDIRI4 +CNSTI4 570 +GTI4 $1326 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1350-2260 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1350 +address $1329 +address $1329 +address $1329 +address $1326 +address $1326 +address $1329 +code +LABELV $1349 +ADDRLP4 0 +INDIRI4 +CNSTI4 949 +EQI4 $1329 +ADDRLP4 0 +INDIRI4 +CNSTI4 950 +EQI4 $1329 +ADDRGP4 $1326 +JUMPV +line 155 +;155: { +LABELV $1329 +line 213 +;156: //level 1 - FIXME: level 1 will have *no* spins +;157: case BOTH_T1_BR_BL: +;158: case BOTH_T1__R__L: +;159: case BOTH_T1__R_BL: +;160: case BOTH_T1_TR_BL: +;161: case BOTH_T1_BR_TL: +;162: case BOTH_T1_BR__L: +;163: case BOTH_T1_TL_BR: +;164: case BOTH_T1__L_BR: +;165: case BOTH_T1__L__R: +;166: case BOTH_T1_BL_BR: +;167: case BOTH_T1_BL__R: +;168: case BOTH_T1_BL_TR: +;169: //level 2 +;170: case BOTH_T2_BR__L: +;171: case BOTH_T2_BR_BL: +;172: case BOTH_T2__R_BL: +;173: case BOTH_T2__L_BR: +;174: case BOTH_T2_BL_BR: +;175: case BOTH_T2_BL__R: +;176: //level 3 +;177: case BOTH_T3_BR__L: +;178: case BOTH_T3_BR_BL: +;179: case BOTH_T3__R_BL: +;180: case BOTH_T3__L_BR: +;181: case BOTH_T3_BL_BR: +;182: case BOTH_T3_BL__R: +;183: //level 4 +;184: case BOTH_T4_BR__L: +;185: case BOTH_T4_BR_BL: +;186: case BOTH_T4__R_BL: +;187: case BOTH_T4__L_BR: +;188: case BOTH_T4_BL_BR: +;189: case BOTH_T4_BL__R: +;190: //level 5 +;191: case BOTH_T5_BR_BL: +;192: case BOTH_T5__R__L: +;193: case BOTH_T5__R_BL: +;194: case BOTH_T5_TR_BL: +;195: case BOTH_T5_BR_TL: +;196: case BOTH_T5_BR__L: +;197: case BOTH_T5_TL_BR: +;198: case BOTH_T5__L_BR: +;199: case BOTH_T5__L__R: +;200: case BOTH_T5_BL_BR: +;201: case BOTH_T5_BL__R: +;202: case BOTH_T5_BL_TR: +;203: //special +;204: //case BOTH_A2_STABBACK1: +;205: case BOTH_ATTACK_BACK: +;206: case BOTH_CROUCHATTACKBACK1: +;207: case BOTH_BUTTERFLY_LEFT: +;208: case BOTH_BUTTERFLY_RIGHT: +;209: case BOTH_FJSS_TR_BL: +;210: case BOTH_FJSS_TL_BR: +;211: case BOTH_JUMPFLIPSLASHDOWN1: +;212: case BOTH_JUMPFLIPSTABDOWN: +;213: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1325 +JUMPV +line 214 +;214: break; +LABELV $1326 +line 216 +;215: } +;216: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1325 +endproc BG_SpinningSaberAnim 76 0 +export BG_SaberInSpecialAttack +proc BG_SaberInSpecialAttack 20 0 +line 220 +;217:} +;218: +;219:qboolean BG_SaberInSpecialAttack( int anim ) +;220:{ +line 221 +;221: switch ( anim&~ANIM_TOGGLEBIT ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 913 +EQI4 $1356 +ADDRLP4 8 +CNSTI4 914 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1356 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +GTI4 $1358 +LABELV $1357 +ADDRLP4 0 +INDIRI4 +CNSTI4 564 +LTI4 $1353 +ADDRLP4 0 +INDIRI4 +CNSTI4 570 +GTI4 $1353 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1359-2256 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1359 +address $1356 +address $1356 +address $1356 +address $1356 +address $1356 +address $1356 +address $1356 +code +LABELV $1358 +ADDRLP4 0 +INDIRI4 +CNSTI4 949 +EQI4 $1356 +ADDRLP4 0 +INDIRI4 +CNSTI4 950 +EQI4 $1356 +ADDRGP4 $1353 +JUMPV +line 222 +;222: { +LABELV $1356 +line 234 +;223: case BOTH_A2_STABBACK1: +;224: case BOTH_ATTACK_BACK: +;225: case BOTH_CROUCHATTACKBACK1: +;226: case BOTH_BUTTERFLY_LEFT: +;227: case BOTH_BUTTERFLY_RIGHT: +;228: case BOTH_FJSS_TR_BL: +;229: case BOTH_FJSS_TL_BR: +;230: case BOTH_LUNGE2_B__T_: +;231: case BOTH_FORCELEAP2_T__B_: +;232: case BOTH_JUMPFLIPSLASHDOWN1://# +;233: case BOTH_JUMPFLIPSTABDOWN://# +;234: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1352 +JUMPV +LABELV $1353 +line 236 +;235: } +;236: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1352 +endproc BG_SaberInSpecialAttack 20 0 +export BG_BrokenParryForAttack +proc BG_BrokenParryForAttack 8 0 +line 240 +;237:} +;238: +;239:int BG_BrokenParryForAttack( int move ) +;240:{ +line 244 +;241: //Our attack was knocked away by a knockaway parry +;242: //FIXME: need actual anims for this +;243: //FIXME: need to know which side of the saber was hit! For now, we presume the saber gets knocked away from the center +;244: switch ( saberMoveData[move].startQuad ) +ADDRLP4 0 +CNSTI4 40 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $1362 +ADDRLP4 0 +INDIRI4 +CNSTI4 7 +GTI4 $1362 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1374 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1374 +address $1367 +address $1368 +address $1369 +address $1370 +address $1371 +address $1372 +address $1373 +address $1366 +code +line 245 +;245: { +LABELV $1366 +line 247 +;246: case Q_B: +;247: return LS_V1_B_; +CNSTI4 96 +RETI4 +ADDRGP4 $1361 +JUMPV +line 248 +;248: break; +LABELV $1367 +line 250 +;249: case Q_BR: +;250: return LS_V1_BR; +CNSTI4 89 +RETI4 +ADDRGP4 $1361 +JUMPV +line 251 +;251: break; +LABELV $1368 +line 253 +;252: case Q_R: +;253: return LS_V1__R; +CNSTI4 90 +RETI4 +ADDRGP4 $1361 +JUMPV +line 254 +;254: break; +LABELV $1369 +line 256 +;255: case Q_TR: +;256: return LS_V1_TR; +CNSTI4 91 +RETI4 +ADDRGP4 $1361 +JUMPV +line 257 +;257: break; +LABELV $1370 +line 259 +;258: case Q_T: +;259: return LS_V1_T_; +CNSTI4 92 +RETI4 +ADDRGP4 $1361 +JUMPV +line 260 +;260: break; +LABELV $1371 +line 262 +;261: case Q_TL: +;262: return LS_V1_TL; +CNSTI4 93 +RETI4 +ADDRGP4 $1361 +JUMPV +line 263 +;263: break; +LABELV $1372 +line 265 +;264: case Q_L: +;265: return LS_V1__L; +CNSTI4 94 +RETI4 +ADDRGP4 $1361 +JUMPV +line 266 +;266: break; +LABELV $1373 +line 268 +;267: case Q_BL: +;268: return LS_V1_BL; +CNSTI4 95 +RETI4 +ADDRGP4 $1361 +JUMPV +line 269 +;269: break; +LABELV $1362 +line 271 +;270: } +;271: return LS_NONE; +CNSTI4 0 +RETI4 +LABELV $1361 +endproc BG_BrokenParryForAttack 8 0 +export BG_BrokenParryForParry +proc BG_BrokenParryForParry 16 8 +line 275 +;272:} +;273: +;274:int BG_BrokenParryForParry( int move ) +;275:{ +line 278 +;276: //FIXME: need actual anims for this +;277: //FIXME: need to know which side of the saber was hit! For now, we presume the saber gets knocked away from the center +;278: switch ( move ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $1385 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LTI4 $1376 +LABELV $1386 +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 108 +LTI4 $1376 +ADDRLP4 8 +INDIRI4 +CNSTI4 112 +GTI4 $1376 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1387-432 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1387 +address $1378 +address $1381 +address $1382 +address $1383 +address $1384 +code +line 279 +;279: { +LABELV $1378 +line 282 +;280: case LS_PARRY_UP: +;281: //Hmm... since we don't know what dir the hit came from, randomly pick knock down or knock back +;282: if ( Q_irand( 0, 1 ) ) +CNSTI4 0 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 12 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $1379 +line 283 +;283: { +line 284 +;284: return LS_H1_B_; +CNSTI4 101 +RETI4 +ADDRGP4 $1375 +JUMPV +LABELV $1379 +line 287 +;285: } +;286: else +;287: { +line 288 +;288: return LS_H1_T_; +CNSTI4 97 +RETI4 +ADDRGP4 $1375 +JUMPV +line 290 +;289: } +;290: break; +LABELV $1381 +line 292 +;291: case LS_PARRY_UR: +;292: return LS_H1_TR; +CNSTI4 98 +RETI4 +ADDRGP4 $1375 +JUMPV +line 293 +;293: break; +LABELV $1382 +line 295 +;294: case LS_PARRY_UL: +;295: return LS_H1_TL; +CNSTI4 99 +RETI4 +ADDRGP4 $1375 +JUMPV +line 296 +;296: break; +LABELV $1383 +line 298 +;297: case LS_PARRY_LR: +;298: return LS_H1_BR; +CNSTI4 100 +RETI4 +ADDRGP4 $1375 +JUMPV +line 299 +;299: break; +LABELV $1384 +line 301 +;300: case LS_PARRY_LL: +;301: return LS_H1_BL; +CNSTI4 102 +RETI4 +ADDRGP4 $1375 +JUMPV +line 302 +;302: break; +LABELV $1385 +line 304 +;303: case LS_READY: +;304: return LS_H1_B_;//??? +CNSTI4 101 +RETI4 +ADDRGP4 $1375 +JUMPV +line 305 +;305: break; +LABELV $1376 +line 307 +;306: } +;307: return LS_NONE; +CNSTI4 0 +RETI4 +LABELV $1375 +endproc BG_BrokenParryForParry 16 8 +export BG_KnockawayForParry +proc BG_KnockawayForParry 4 0 +line 311 +;308:} +;309: +;310:int BG_KnockawayForParry( int move ) +;311:{ +line 314 +;312: //FIXME: need actual anims for this +;313: //FIXME: need to know which side of the saber was hit! For now, we presume the saber gets knocked away from the center +;314: switch ( move ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $1390 +ADDRLP4 0 +INDIRI4 +CNSTI4 8 +GTI4 $1390 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1397-16 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1397 +address $1393 +address $1394 +address $1395 +address $1396 +address $1392 +code +line 315 +;315: { +LABELV $1392 +line 317 +;316: case BLOCKED_TOP://LS_PARRY_UP: +;317: return LS_K1_T_;//push up +CNSTI4 103 +RETI4 +ADDRGP4 $1389 +JUMPV +line 318 +;318: break; +LABELV $1393 +LABELV $1390 +line 321 +;319: case BLOCKED_UPPER_RIGHT://LS_PARRY_UR: +;320: default://case LS_READY: +;321: return LS_K1_TR;//push up, slightly to right +CNSTI4 104 +RETI4 +ADDRGP4 $1389 +JUMPV +line 322 +;322: break; +LABELV $1394 +line 324 +;323: case BLOCKED_UPPER_LEFT://LS_PARRY_UL: +;324: return LS_K1_TL;//push up and to left +CNSTI4 105 +RETI4 +ADDRGP4 $1389 +JUMPV +line 325 +;325: break; +LABELV $1395 +line 327 +;326: case BLOCKED_LOWER_RIGHT://LS_PARRY_LR: +;327: return LS_K1_BR;//push down and to left +CNSTI4 106 +RETI4 +ADDRGP4 $1389 +JUMPV +line 328 +;328: break; +LABELV $1396 +line 330 +;329: case BLOCKED_LOWER_LEFT://LS_PARRY_LL: +;330: return LS_K1_BL;//push down and to right +CNSTI4 107 +RETI4 +line 331 +;331: break; +LABELV $1389 +endproc BG_KnockawayForParry 4 0 +export BG_InRoll +proc BG_InRoll 8 0 +line 337 +;332: } +;333: //return LS_NONE; +;334:} +;335: +;336:qboolean BG_InRoll( playerState_t *ps, int anim ) +;337:{ +line 338 +;338: switch ( (anim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 885 +LTI4 $1400 +ADDRLP4 0 +INDIRI4 +CNSTI4 888 +GTI4 $1400 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1406-3540 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1406 +address $1403 +address $1403 +address $1403 +address $1403 +code +line 339 +;339: { +LABELV $1403 +line 344 +;340: case BOTH_ROLL_F: +;341: case BOTH_ROLL_B: +;342: case BOTH_ROLL_R: +;343: case BOTH_ROLL_L: +;344: if ( ps->legsTimer > 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1401 +line 345 +;345: { +line 346 +;346: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1399 +JUMPV +line 348 +;347: } +;348: break; +LABELV $1400 +LABELV $1401 +line 350 +;349: } +;350: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1399 +endproc BG_InRoll 8 0 +export BG_InDeathAnim +proc BG_InDeathAnim 12 0 +line 354 +;351:} +;352: +;353:qboolean BG_InDeathAnim( int anim ) +;354:{ +line 355 +;355: switch((anim&~ANIM_TOGGLEBIT)) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 26 +LTI4 $1413 +ADDRLP4 0 +INDIRI4 +CNSTI4 36 +GTI4 $1414 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1415-104 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1415 +address $1412 +address $1412 +address $1409 +address $1412 +address $1412 +address $1412 +address $1412 +address $1412 +address $1412 +address $1412 +address $1412 +code +LABELV $1413 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +LTI4 $1409 +ADDRLP4 0 +INDIRI4 +CNSTI4 7 +GTI4 $1409 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1417-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1417 +address $1412 +address $1412 +address $1412 +address $1412 +address $1412 +address $1412 +address $1412 +code +LABELV $1414 +ADDRLP4 0 +INDIRI4 +CNSTI4 903 +EQI4 $1412 +ADDRGP4 $1409 +JUMPV +line 356 +;356: { +LABELV $1412 +line 376 +;357: case BOTH_DIVE1: +;358: case BOTH_DEATHBACKWARD1: +;359: case BOTH_DEATHBACKWARD2: +;360: case BOTH_DEATHFORWARD1: +;361: case BOTH_DEATHFORWARD2: +;362: case BOTH_DEATH1: +;363: case BOTH_DEATH2: +;364: case BOTH_DEATH3: +;365: case BOTH_DEATH4: +;366: case BOTH_DEATH5: +;367: case BOTH_DEATH6: +;368: case BOTH_DEATH7: +;369: +;370: case BOTH_DEATH1IDLE: +;371: case BOTH_LYINGDEATH1: +;372: case BOTH_STUMBLEDEATH1: +;373: case BOTH_FALLDEATH1: +;374: case BOTH_FALLDEATH1INAIR: +;375: case BOTH_FALLDEATH1LAND: +;376: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1408 +JUMPV +line 377 +;377: break; +LABELV $1409 +line 379 +;378: default: +;379: return qfalse; +CNSTI4 0 +RETI4 +line 380 +;380: break; +LABELV $1408 +endproc BG_InDeathAnim 12 0 +export PM_SaberBounceForAttack +proc PM_SaberBounceForAttack 8 0 +line 386 +;381: } +;382:} +;383: +;384://Called only where pm is valid (not all require pm, but some do): +;385:int PM_SaberBounceForAttack( int move ) +;386:{ +line 387 +;387: switch ( saberMoveData[move].startQuad ) +ADDRLP4 0 +CNSTI4 40 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $1420 +ADDRLP4 0 +INDIRI4 +CNSTI4 7 +GTI4 $1420 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1431 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1431 +address $1424 +address $1425 +address $1426 +address $1427 +address $1428 +address $1429 +address $1430 +address $1424 +code +line 388 +;388: { +LABELV $1424 +line 391 +;389: case Q_B: +;390: case Q_BR: +;391: return LS_B1_BR; +CNSTI4 74 +RETI4 +ADDRGP4 $1419 +JUMPV +line 392 +;392: break; +LABELV $1425 +line 394 +;393: case Q_R: +;394: return LS_B1__R; +CNSTI4 75 +RETI4 +ADDRGP4 $1419 +JUMPV +line 395 +;395: break; +LABELV $1426 +line 397 +;396: case Q_TR: +;397: return LS_B1_TR; +CNSTI4 76 +RETI4 +ADDRGP4 $1419 +JUMPV +line 398 +;398: break; +LABELV $1427 +line 400 +;399: case Q_T: +;400: return LS_B1_T_; +CNSTI4 77 +RETI4 +ADDRGP4 $1419 +JUMPV +line 401 +;401: break; +LABELV $1428 +line 403 +;402: case Q_TL: +;403: return LS_B1_TL; +CNSTI4 78 +RETI4 +ADDRGP4 $1419 +JUMPV +line 404 +;404: break; +LABELV $1429 +line 406 +;405: case Q_L: +;406: return LS_B1__L; +CNSTI4 79 +RETI4 +ADDRGP4 $1419 +JUMPV +line 407 +;407: break; +LABELV $1430 +line 409 +;408: case Q_BL: +;409: return LS_B1_BL; +CNSTI4 80 +RETI4 +ADDRGP4 $1419 +JUMPV +line 410 +;410: break; +LABELV $1420 +line 412 +;411: } +;412: return LS_NONE; +CNSTI4 0 +RETI4 +LABELV $1419 +endproc PM_SaberBounceForAttack 8 0 +export PM_SaberDeflectionForQuad +proc PM_SaberDeflectionForQuad 4 0 +line 416 +;413:} +;414: +;415:int PM_SaberDeflectionForQuad( int quad ) +;416:{ +line 417 +;417: switch ( quad ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $1433 +ADDRLP4 0 +INDIRI4 +CNSTI4 7 +GTI4 $1433 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1443 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1443 +address $1436 +address $1437 +address $1438 +address $1439 +address $1440 +address $1441 +address $1442 +address $1435 +code +line 418 +;418: { +LABELV $1435 +line 420 +;419: case Q_B: +;420: return LS_D1_B_; +CNSTI4 88 +RETI4 +ADDRGP4 $1432 +JUMPV +line 421 +;421: break; +LABELV $1436 +line 423 +;422: case Q_BR: +;423: return LS_D1_BR; +CNSTI4 81 +RETI4 +ADDRGP4 $1432 +JUMPV +line 424 +;424: break; +LABELV $1437 +line 426 +;425: case Q_R: +;426: return LS_D1__R; +CNSTI4 82 +RETI4 +ADDRGP4 $1432 +JUMPV +line 427 +;427: break; +LABELV $1438 +line 429 +;428: case Q_TR: +;429: return LS_D1_TR; +CNSTI4 83 +RETI4 +ADDRGP4 $1432 +JUMPV +line 430 +;430: break; +LABELV $1439 +line 432 +;431: case Q_T: +;432: return LS_D1_T_; +CNSTI4 84 +RETI4 +ADDRGP4 $1432 +JUMPV +line 433 +;433: break; +LABELV $1440 +line 435 +;434: case Q_TL: +;435: return LS_D1_TL; +CNSTI4 85 +RETI4 +ADDRGP4 $1432 +JUMPV +line 436 +;436: break; +LABELV $1441 +line 438 +;437: case Q_L: +;438: return LS_D1__L; +CNSTI4 86 +RETI4 +ADDRGP4 $1432 +JUMPV +line 439 +;439: break; +LABELV $1442 +line 441 +;440: case Q_BL: +;441: return LS_D1_BL; +CNSTI4 87 +RETI4 +ADDRGP4 $1432 +JUMPV +line 442 +;442: break; +LABELV $1433 +line 444 +;443: } +;444: return LS_NONE; +CNSTI4 0 +RETI4 +LABELV $1432 +endproc PM_SaberDeflectionForQuad 4 0 +export PM_SaberInDeflect +proc PM_SaberInDeflect 4 0 +line 448 +;445:} +;446: +;447:qboolean PM_SaberInDeflect( int move ) +;448:{ +line 449 +;449: if ( move >= LS_D1_BR && move <= LS_D1_B_ ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 81 +LTI4 $1445 +ADDRLP4 0 +INDIRI4 +CNSTI4 88 +GTI4 $1445 +line 450 +;450: { +line 451 +;451: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1444 +JUMPV +LABELV $1445 +line 453 +;452: } +;453: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1444 +endproc PM_SaberInDeflect 4 0 +export PM_SaberInParry +proc PM_SaberInParry 4 0 +line 457 +;454:} +;455: +;456:qboolean PM_SaberInParry( int move ) +;457:{ +line 458 +;458: if ( move >= LS_PARRY_UP && move <= LS_PARRY_LL ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 108 +LTI4 $1448 +ADDRLP4 0 +INDIRI4 +CNSTI4 112 +GTI4 $1448 +line 459 +;459: { +line 460 +;460: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1447 +JUMPV +LABELV $1448 +line 462 +;461: } +;462: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1447 +endproc PM_SaberInParry 4 0 +export PM_SaberInKnockaway +proc PM_SaberInKnockaway 4 0 +line 466 +;463:} +;464: +;465:qboolean PM_SaberInKnockaway( int move ) +;466:{ +line 467 +;467: if ( move >= LS_K1_T_ && move <= LS_K1_BL ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 103 +LTI4 $1451 +ADDRLP4 0 +INDIRI4 +CNSTI4 107 +GTI4 $1451 +line 468 +;468: { +line 469 +;469: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1450 +JUMPV +LABELV $1451 +line 471 +;470: } +;471: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1450 +endproc PM_SaberInKnockaway 4 0 +export PM_SaberInReflect +proc PM_SaberInReflect 4 0 +line 475 +;472:} +;473: +;474:qboolean PM_SaberInReflect( int move ) +;475:{ +line 476 +;476: if ( move >= LS_REFLECT_UP && move <= LS_REFLECT_LL ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 113 +LTI4 $1454 +ADDRLP4 0 +INDIRI4 +CNSTI4 117 +GTI4 $1454 +line 477 +;477: { +line 478 +;478: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1453 +JUMPV +LABELV $1454 +line 480 +;479: } +;480: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1453 +endproc PM_SaberInReflect 4 0 +export PM_SaberInStart +proc PM_SaberInStart 4 0 +line 484 +;481:} +;482: +;483:qboolean PM_SaberInStart( int move ) +;484:{ +line 485 +;485: if ( move >= LS_S_TL2BR && move <= LS_S_T2B ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $1457 +ADDRLP4 0 +INDIRI4 +CNSTI4 24 +GTI4 $1457 +line 486 +;486: { +line 487 +;487: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1456 +JUMPV +LABELV $1457 +line 489 +;488: } +;489: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1456 +endproc PM_SaberInStart 4 0 +export PM_SaberInReturn +proc PM_SaberInReturn 8 0 +line 493 +;490:} +;491: +;492:qboolean PM_SaberInReturn( int move ) +;493:{ +line 494 +;494: if ( move >= LS_R_TL2BR && move <= LS_R_TL2BR ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 4 +CNSTI4 25 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LTI4 $1460 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +GTI4 $1460 +line 495 +;495: { +line 496 +;496: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1459 +JUMPV +LABELV $1460 +line 498 +;497: } +;498: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1459 +endproc PM_SaberInReturn 8 0 +export PM_InSaberAnim +proc PM_InSaberAnim 4 0 +line 502 +;499:} +;500: +;501:qboolean PM_InSaberAnim( int anim ) +;502:{ +line 503 +;503: if ( (anim&~ANIM_TOGGLEBIT) >= BOTH_A1_T__B_ && (anim&~ANIM_TOGGLEBIT) <= BOTH_H1_S1_BR ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 138 +LTI4 $1463 +ADDRLP4 0 +INDIRI4 +CNSTI4 547 +GTI4 $1463 +line 504 +;504: { +line 505 +;505: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1462 +JUMPV +LABELV $1463 +line 507 +;506: } +;507: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1462 +endproc PM_InSaberAnim 4 0 +export PM_InKnockDown +proc PM_InKnockDown 8 0 +line 511 +;508:} +;509: +;510:qboolean PM_InKnockDown( playerState_t *ps ) +;511:{ +line 512 +;512: switch ( (ps->legsAnim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 924 +LTI4 $1466 +ADDRLP4 0 +INDIRI4 +CNSTI4 942 +GTI4 $1466 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1473-3696 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1473 +address $1469 +address $1469 +address $1469 +address $1469 +address $1469 +address $1470 +address $1470 +address $1470 +address $1470 +address $1470 +address $1466 +address $1466 +address $1470 +address $1470 +address $1470 +address $1470 +address $1470 +address $1470 +address $1470 +code +line 513 +;513: { +LABELV $1469 +line 519 +;514: case BOTH_KNOCKDOWN1: +;515: case BOTH_KNOCKDOWN2: +;516: case BOTH_KNOCKDOWN3: +;517: case BOTH_KNOCKDOWN4: +;518: case BOTH_KNOCKDOWN5: +;519: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1465 +JUMPV +line 520 +;520: break; +LABELV $1470 +line 533 +;521: case BOTH_GETUP1: +;522: case BOTH_GETUP2: +;523: case BOTH_GETUP3: +;524: case BOTH_GETUP4: +;525: case BOTH_GETUP5: +;526: case BOTH_FORCE_GETUP_F1: +;527: case BOTH_FORCE_GETUP_F2: +;528: case BOTH_FORCE_GETUP_B1: +;529: case BOTH_FORCE_GETUP_B2: +;530: case BOTH_FORCE_GETUP_B3: +;531: case BOTH_FORCE_GETUP_B4: +;532: case BOTH_FORCE_GETUP_B5: +;533: if ( ps->legsTimer ) +ADDRFP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1467 +line 534 +;534: { +line 535 +;535: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1465 +JUMPV +line 537 +;536: } +;537: break; +LABELV $1466 +LABELV $1467 +line 539 +;538: } +;539: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1465 +endproc PM_InKnockDown 8 0 +export PM_PainAnim +proc PM_PainAnim 8 0 +line 543 +;540:} +;541: +;542:qboolean PM_PainAnim( int anim ) +;543:{ +line 544 +;544: switch ( (anim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 97 +LTI4 $1476 +ADDRLP4 0 +INDIRI4 +CNSTI4 115 +GTI4 $1476 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1480-388 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1480 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +address $1479 +code +line 545 +;545: { +LABELV $1479 +line 565 +;546: case BOTH_PAIN1: //# First take pain anim +;547: case BOTH_PAIN2: //# Second take pain anim +;548: case BOTH_PAIN3: //# Third take pain anim +;549: case BOTH_PAIN4: //# Fourth take pain anim +;550: case BOTH_PAIN5: //# Fifth take pain anim - from behind +;551: case BOTH_PAIN6: //# Sixth take pain anim - from behind +;552: case BOTH_PAIN7: //# Seventh take pain anim - from behind +;553: case BOTH_PAIN8: //# Eigth take pain anim - from behind +;554: case BOTH_PAIN9: //# +;555: case BOTH_PAIN10: //# +;556: case BOTH_PAIN11: //# +;557: case BOTH_PAIN12: //# +;558: case BOTH_PAIN13: //# +;559: case BOTH_PAIN14: //# +;560: case BOTH_PAIN15: //# +;561: case BOTH_PAIN16: //# +;562: case BOTH_PAIN17: //# +;563: case BOTH_PAIN18: //# +;564: case BOTH_PAIN19: //# +;565: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1475 +JUMPV +line 566 +;566: break; +LABELV $1476 +line 568 +;567: } +;568: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1475 +endproc PM_PainAnim 8 0 +export PM_JumpingAnim +proc PM_JumpingAnim 8 0 +line 572 +;569:} +;570: +;571:qboolean PM_JumpingAnim( int anim ) +;572:{ +line 573 +;573: switch ( (anim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 856 +LTI4 $1483 +ADDRLP4 0 +INDIRI4 +CNSTI4 880 +GTI4 $1483 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1487-3424 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1487 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +address $1486 +code +line 574 +;574: { +LABELV $1486 +line 600 +;575: case BOTH_JUMP1: //# Jump - wind-up and leave ground +;576: case BOTH_INAIR1: //# In air loop (from jump) +;577: case BOTH_LAND1: //# Landing (from in air loop) +;578: case BOTH_LAND2: //# Landing Hard (from a great height) +;579: case BOTH_JUMPBACK1: //# Jump backwards - wind-up and leave ground +;580: case BOTH_INAIRBACK1: //# In air loop (from jump back) +;581: case BOTH_LANDBACK1: //# Landing backwards(from in air loop) +;582: case BOTH_JUMPLEFT1: //# Jump left - wind-up and leave ground +;583: case BOTH_INAIRLEFT1: //# In air loop (from jump left) +;584: case BOTH_LANDLEFT1: //# Landing left(from in air loop) +;585: case BOTH_JUMPRIGHT1: //# Jump right - wind-up and leave ground +;586: case BOTH_INAIRRIGHT1: //# In air loop (from jump right) +;587: case BOTH_LANDRIGHT1: //# Landing right(from in air loop) +;588: case BOTH_FORCEJUMP1: //# Jump - wind-up and leave ground +;589: case BOTH_FORCEINAIR1: //# In air loop (from jump) +;590: case BOTH_FORCELAND1: //# Landing (from in air loop) +;591: case BOTH_FORCEJUMPBACK1: //# Jump backwards - wind-up and leave ground +;592: case BOTH_FORCEINAIRBACK1: //# In air loop (from jump back) +;593: case BOTH_FORCELANDBACK1: //# Landing backwards(from in air loop) +;594: case BOTH_FORCEJUMPLEFT1: //# Jump left - wind-up and leave ground +;595: case BOTH_FORCEINAIRLEFT1: //# In air loop (from jump left) +;596: case BOTH_FORCELANDLEFT1: //# Landing left(from in air loop) +;597: case BOTH_FORCEJUMPRIGHT1: //# Jump right - wind-up and leave ground +;598: case BOTH_FORCEINAIRRIGHT1: //# In air loop (from jump right) +;599: case BOTH_FORCELANDRIGHT1: //# Landing right(from in air loop) +;600: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1482 +JUMPV +line 601 +;601: break; +LABELV $1483 +line 603 +;602: } +;603: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1482 +endproc PM_JumpingAnim 8 0 +export PM_LandingAnim +proc PM_LandingAnim 24 0 +line 607 +;604:} +;605: +;606:qboolean PM_LandingAnim( int anim ) +;607:{ +line 608 +;608: switch ( (anim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 868 +EQI4 $1493 +ADDRLP4 8 +CNSTI4 871 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1493 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +GTI4 $1495 +LABELV $1494 +ADDRLP4 0 +INDIRI4 +CNSTI4 858 +LTI4 $1490 +ADDRLP4 0 +INDIRI4 +CNSTI4 865 +GTI4 $1490 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1496-3432 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1496 +address $1493 +address $1493 +address $1490 +address $1490 +address $1493 +address $1490 +address $1490 +address $1493 +code +LABELV $1495 +ADDRLP4 20 +CNSTI4 874 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 20 +INDIRI4 +EQI4 $1493 +ADDRLP4 0 +INDIRI4 +CNSTI4 877 +EQI4 $1493 +ADDRLP4 0 +INDIRI4 +ADDRLP4 20 +INDIRI4 +LTI4 $1490 +LABELV $1498 +ADDRLP4 0 +INDIRI4 +CNSTI4 880 +EQI4 $1493 +ADDRGP4 $1490 +JUMPV +line 609 +;609: { +LABELV $1493 +line 619 +;610: case BOTH_LAND1: //# Landing (from in air loop) +;611: case BOTH_LAND2: //# Landing Hard (from a great height) +;612: case BOTH_LANDBACK1: //# Landing backwards(from in air loop) +;613: case BOTH_LANDLEFT1: //# Landing left(from in air loop) +;614: case BOTH_LANDRIGHT1: //# Landing right(from in air loop) +;615: case BOTH_FORCELAND1: //# Landing (from in air loop) +;616: case BOTH_FORCELANDBACK1: //# Landing backwards(from in air loop) +;617: case BOTH_FORCELANDLEFT1: //# Landing left(from in air loop) +;618: case BOTH_FORCELANDRIGHT1: //# Landing right(from in air loop) +;619: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1489 +JUMPV +line 620 +;620: break; +LABELV $1490 +line 622 +;621: } +;622: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1489 +endproc PM_LandingAnim 24 0 +export PM_SpinningAnim +proc PM_SpinningAnim 4 4 +line 626 +;623:} +;624: +;625:qboolean PM_SpinningAnim( int anim ) +;626:{ +line 635 +;627: /* +;628: switch ( anim ) +;629: { +;630: //FIXME: list any other spinning anims +;631: default: +;632: break; +;633: } +;634: */ +;635: return BG_SpinningSaberAnim( anim ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $1499 +endproc PM_SpinningAnim 4 4 +export PM_InOnGroundAnim +proc PM_InOnGroundAnim 32 0 +line 639 +;636:} +;637: +;638:qboolean PM_InOnGroundAnim ( int anim ) +;639:{ +line 640 +;640: switch( anim&~ANIM_TOGGLEBIT ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 72 +LTI4 $1505 +ADDRLP4 0 +INDIRI4 +CNSTI4 76 +GTI4 $1506 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1507-288 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1507 +address $1504 +address $1504 +address $1504 +address $1504 +address $1504 +code +LABELV $1505 +ADDRLP4 12 +CNSTI4 32 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $1504 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +LTI4 $1501 +LABELV $1509 +ADDRLP4 0 +INDIRI4 +CNSTI4 47 +LTI4 $1501 +ADDRLP4 0 +INDIRI4 +CNSTI4 51 +GTI4 $1501 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1510-188 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1510 +address $1504 +address $1504 +address $1504 +address $1504 +address $1504 +code +LABELV $1506 +ADDRLP4 24 +CNSTI4 924 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 24 +INDIRI4 +EQI4 $1504 +ADDRLP4 0 +INDIRI4 +CNSTI4 925 +EQI4 $1504 +ADDRLP4 0 +INDIRI4 +ADDRLP4 24 +INDIRI4 +LTI4 $1501 +LABELV $1512 +ADDRLP4 0 +INDIRI4 +CNSTI4 985 +LTI4 $1501 +ADDRLP4 0 +INDIRI4 +CNSTI4 1002 +GTI4 $1501 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1513-3940 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1513 +address $1504 +address $1501 +address $1501 +address $1504 +address $1504 +address $1504 +address $1504 +address $1504 +address $1504 +address $1504 +address $1504 +address $1504 +address $1504 +address $1504 +address $1504 +address $1501 +address $1501 +address $1504 +code +line 641 +;641: { +LABELV $1504 +line 669 +;642: case BOTH_DEAD1: +;643: case BOTH_DEAD2: +;644: case BOTH_DEAD3: +;645: case BOTH_DEAD4: +;646: case BOTH_DEAD5: +;647: case BOTH_DEADFORWARD1: +;648: case BOTH_DEADBACKWARD1: +;649: case BOTH_DEADFORWARD2: +;650: case BOTH_DEADBACKWARD2: +;651: case BOTH_LYINGDEATH1: +;652: case BOTH_LYINGDEAD1: +;653: case BOTH_PAIN2WRITHE1: //# Transition from upright position to writhing on ground anim +;654: case BOTH_WRITHING1: //# Lying on ground writhing in pain +;655: case BOTH_WRITHING1RLEG: //# Lying on ground writhing in pain: holding right leg +;656: case BOTH_WRITHING1LLEG: //# Lying on ground writhing in pain: holding left leg +;657: case BOTH_WRITHING2: //# Lying on stomache writhing in pain +;658: case BOTH_INJURED1: //# Lying down: against wall - can also be sleeping +;659: case BOTH_CRAWLBACK1: //# Lying on back: crawling backwards with elbows +;660: case BOTH_INJURED2: //# Injured pose 2 +;661: case BOTH_INJURED3: //# Injured pose 3 +;662: case BOTH_INJURED6: //# Injured pose 6 +;663: case BOTH_INJURED6ATTACKSTART: //# Start attack while in injured 6 pose +;664: case BOTH_INJURED6ATTACKSTOP: //# End attack while in injured 6 pose +;665: case BOTH_INJURED6COMBADGE: //# Hit combadge while in injured 6 pose +;666: case BOTH_INJURED6POINT: //# Chang points to door while in injured state +;667: case BOTH_KNOCKDOWN1: //# +;668: case BOTH_KNOCKDOWN2: //# +;669: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1500 +JUMPV +line 670 +;670: break; +LABELV $1501 +line 673 +;671: } +;672: +;673: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1500 +endproc PM_InOnGroundAnim 32 0 +export PM_InRollComplete +proc PM_InRollComplete 8 0 +line 677 +;674:} +;675: +;676:qboolean PM_InRollComplete( playerState_t *ps, int anim ) +;677:{ +line 678 +;678: switch ( (anim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 885 +LTI4 $1516 +ADDRLP4 0 +INDIRI4 +CNSTI4 888 +GTI4 $1516 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1522-3540 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1522 +address $1519 +address $1519 +address $1519 +address $1519 +code +line 679 +;679: { +LABELV $1519 +line 684 +;680: case BOTH_ROLL_F: +;681: case BOTH_ROLL_B: +;682: case BOTH_ROLL_R: +;683: case BOTH_ROLL_L: +;684: if ( ps->legsTimer < 1 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 1 +GEI4 $1517 +line 685 +;685: { +line 686 +;686: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1515 +JUMPV +line 688 +;687: } +;688: break; +LABELV $1516 +LABELV $1517 +line 690 +;689: } +;690: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1515 +endproc PM_InRollComplete 8 0 +export PM_AnimLength +proc PM_AnimLength 8 4 +line 694 +;691:} +;692: +;693:int PM_AnimLength( int index, animNumber_t anim ) +;694:{ +line 695 +;695: if (anim >= MAX_ANIMATIONS) +ADDRFP4 4 +INDIRI4 +CNSTI4 1210 +LTI4 $1525 +line 696 +;696: { +line 697 +;697: return -1; +CNSTI4 -1 +RETI4 +ADDRGP4 $1524 +JUMPV +LABELV $1525 +line 699 +;698: } +;699: return pm->animations[anim].numFrames * fabs(pm->animations[anim].frameLerp); +ADDRLP4 0 +CNSTI4 28 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 pm +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 4 +INDIRF4 +MULF4 +CVFI4 4 +RETI4 +LABELV $1524 +endproc PM_AnimLength 8 4 +export PM_DebugLegsAnim +proc PM_DebugLegsAnim 40 8 +line 703 +;700:} +;701: +;702:void PM_DebugLegsAnim(int anim) +;703:{ +line 704 +;704: int oldAnim = (pm->ps->legsAnim & ~ANIM_TOGGLEBIT); +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 705 +;705: int newAnim = (anim & ~ANIM_TOGGLEBIT); +ADDRLP4 4 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 707 +;706: +;707: if (oldAnim < MAX_TOTALANIMATIONS && oldAnim >= BOTH_DEATH1 && +ADDRLP4 12 +CNSTI4 1211 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +GEI4 $1528 +ADDRLP4 16 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 16 +INDIRI4 +LTI4 $1528 +ADDRLP4 4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +GEI4 $1528 +ADDRLP4 4 +INDIRI4 +ADDRLP4 16 +INDIRI4 +LTI4 $1528 +line 709 +;708: newAnim < MAX_TOTALANIMATIONS && newAnim >= BOTH_DEATH1) +;709: { +line 710 +;710: Com_Printf("OLD: %s\n", animTable[oldAnim]); +ADDRGP4 $1530 +ARGP4 +ADDRLP4 24 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 animTable +ADDP4 +INDIRB +ASGNB 8 +ADDRLP4 24 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 711 +;711: Com_Printf("NEW: %s\n", animTable[newAnim]); +ADDRGP4 $1531 +ARGP4 +ADDRLP4 32 +ADDRLP4 4 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 animTable +ADDP4 +INDIRB +ASGNB 8 +ADDRLP4 32 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 712 +;712: } +LABELV $1528 +line 713 +;713:} +LABELV $1527 +endproc PM_DebugLegsAnim 40 8 +data +export BGPAFtextLoaded +align 4 +LABELV BGPAFtextLoaded +byte 4 0 +export BG_ParseAnimationFile +code +proc BG_ParseAnimationFile 84 12 +line 762 +;714:/* +;715:============================================================================== +;716:END: Animation utility functions (sequence checking) +;717:============================================================================== +;718:*/ +;719: +;720:/* +;721:====================== +;722:BG_ParseAnimationFile +;723: +;724:Read a configuration file containing animation coutns and rates +;725:models/players/visor/animation.cfg, etc +;726: +;727:====================== +;728:*/ +;729:char BGPAFtext[40000]; +;730:qboolean BGPAFtextLoaded = qfalse; +;731:animation_t bgGlobalAnimations[MAX_TOTALANIMATIONS]; +;732: +;733://#define CONVENIENT_ANIMATION_FILE_DEBUG_THING +;734: +;735:#ifdef CONVENIENT_ANIMATION_FILE_DEBUG_THING +;736:void SpewDebugStuffToFile() +;737:{ +;738: fileHandle_t f; +;739: int i = 0; +;740: +;741: trap_FS_FOpenFile("file_of_debug_stuff_MP.txt", &f, FS_WRITE); +;742: +;743: if (!f) +;744: { +;745: return; +;746: } +;747: +;748: BGPAFtext[0] = 0; +;749: +;750: while (i < MAX_ANIMATIONS) +;751: { +;752: strcat(BGPAFtext, va("%i %i\n", i, bgGlobalAnimations[i].frameLerp)); +;753: i++; +;754: } +;755: +;756: trap_FS_Write(BGPAFtext, strlen(BGPAFtext), f); +;757: trap_FS_FCloseFile(f); +;758:} +;759:#endif +;760: +;761:qboolean BG_ParseAnimationFile(const char *filename) +;762:{ +line 775 +;763: char *text_p; +;764: int len; +;765: int i; +;766: char *token; +;767: float fps; +;768: int skip; +;769: +;770: fileHandle_t f; +;771: int animNum; +;772: +;773: +;774: // load the file +;775: if (!BGPAFtextLoaded) +ADDRGP4 BGPAFtextLoaded +INDIRI4 +CNSTI4 0 +NEI4 $1533 +line 776 +;776: { //rww - We are always using the same animation config now. So only load it once. +line 777 +;777: len = trap_FS_FOpenFile( filename, &f, FS_READ ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 24 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 32 +ADDRGP4 trap_FS_FOpenFile +CALLI4 +ASGNI4 +ADDRLP4 20 +ADDRLP4 32 +INDIRI4 +ASGNI4 +line 778 +;778: if ( len <= 0 ) +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +GTI4 $1535 +line 779 +;779: { +line 780 +;780: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1532 +JUMPV +LABELV $1535 +line 782 +;781: } +;782: if ( len >= sizeof( BGPAFtext ) - 1 ) +ADDRLP4 20 +INDIRI4 +CVIU4 4 +CNSTU4 39999 +LTU4 $1537 +line 783 +;783: { +line 785 +;784: //Com_Printf( "File %s too long\n", filename ); +;785: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1532 +JUMPV +LABELV $1537 +line 788 +;786: } +;787: +;788: trap_FS_Read( BGPAFtext, len, f ); +ADDRGP4 BGPAFtext +ARGP4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_Read +CALLV +pop +line 789 +;789: BGPAFtext[len] = 0; +ADDRLP4 20 +INDIRI4 +ADDRGP4 BGPAFtext +ADDP4 +CNSTI1 0 +ASGNI1 +line 790 +;790: trap_FS_FCloseFile( f ); +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_FCloseFile +CALLV +pop +line 791 +;791: } +ADDRGP4 $1534 +JUMPV +LABELV $1533 +line 793 +;792: else +;793: { +line 794 +;794: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1532 +JUMPV +LABELV $1534 +line 798 +;795: } +;796: +;797: // parse the text +;798: text_p = BGPAFtext; +ADDRLP4 16 +ADDRGP4 BGPAFtext +ASGNP4 +line 799 +;799: skip = 0; // quiet the compiler warning +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +line 804 +;800: +;801: //FIXME: have some way of playing anims backwards... negative numFrames? +;802: +;803: //initialize anim array so that from 0 to MAX_ANIMATIONS, set default values of 0 1 0 100 +;804: for(i = 0; i < MAX_ANIMATIONS; i++) +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +LABELV $1539 +line 805 +;805: { +line 806 +;806: bgGlobalAnimations[i].firstFrame = 0; +CNSTI4 28 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +CNSTI4 0 +ASGNI4 +line 807 +;807: bgGlobalAnimations[i].numFrames = 0; +CNSTI4 28 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations+4 +ADDP4 +CNSTI4 0 +ASGNI4 +line 808 +;808: bgGlobalAnimations[i].loopFrames = -1; +CNSTI4 28 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations+8 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 809 +;809: bgGlobalAnimations[i].frameLerp = 100; +CNSTI4 28 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations+12 +ADDP4 +CNSTI4 100 +ASGNI4 +line 810 +;810: bgGlobalAnimations[i].initialLerp = 100; +CNSTI4 28 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations+16 +ADDP4 +CNSTI4 100 +ASGNI4 +line 811 +;811: } +LABELV $1540 +line 804 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1210 +LTI4 $1539 +ADDRGP4 $1548 +JUMPV +LABELV $1547 +line 815 +;812: +;813: // read information for each frame +;814: while(1) +;815: { +line 816 +;816: token = COM_Parse( (const char **)(&text_p) ); +ADDRLP4 16 +ARGP4 +ADDRLP4 32 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 32 +INDIRP4 +ASGNP4 +line 818 +;817: +;818: if ( !token || !token[0]) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1552 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1550 +LABELV $1552 +line 819 +;819: { +line 820 +;820: break; +ADDRGP4 $1549 +JUMPV +LABELV $1550 +line 823 +;821: } +;822: +;823: animNum = GetIDForString(animTable, token); +ADDRGP4 animTable +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 GetIDForString +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 40 +INDIRI4 +ASGNI4 +line 824 +;824: if(animNum == -1) +ADDRLP4 8 +INDIRI4 +CNSTI4 -1 +NEI4 $1553 +line 825 +;825: { +line 830 +;826://#ifndef FINAL_BUILD +;827:#ifdef _DEBUG +;828: Com_Printf(S_COLOR_RED"WARNING: Unknown token %s in %s\n", token, filename); +;829:#endif +;830: continue; +ADDRGP4 $1548 +JUMPV +LABELV $1553 +line 833 +;831: } +;832: +;833: token = COM_Parse( (const char **)(&text_p) ); +ADDRLP4 16 +ARGP4 +ADDRLP4 44 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 44 +INDIRP4 +ASGNP4 +line 834 +;834: if ( !token ) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1555 +line 835 +;835: { +line 836 +;836: break; +ADDRGP4 $1549 +JUMPV +LABELV $1555 +line 838 +;837: } +;838: bgGlobalAnimations[animNum].firstFrame = atoi( token ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 48 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 28 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ADDRLP4 48 +INDIRI4 +ASGNI4 +line 840 +;839: +;840: token = COM_Parse( (const char **)(&text_p) ); +ADDRLP4 16 +ARGP4 +ADDRLP4 52 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 52 +INDIRP4 +ASGNP4 +line 841 +;841: if ( !token ) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1557 +line 842 +;842: { +line 843 +;843: break; +ADDRGP4 $1549 +JUMPV +LABELV $1557 +line 845 +;844: } +;845: bgGlobalAnimations[animNum].numFrames = atoi( token ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 56 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 28 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations+4 +ADDP4 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 847 +;846: +;847: token = COM_Parse( (const char **)(&text_p) ); +ADDRLP4 16 +ARGP4 +ADDRLP4 60 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 60 +INDIRP4 +ASGNP4 +line 848 +;848: if ( !token ) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1560 +line 849 +;849: { +line 850 +;850: break; +ADDRGP4 $1549 +JUMPV +LABELV $1560 +line 852 +;851: } +;852: bgGlobalAnimations[animNum].loopFrames = atoi( token ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 64 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 28 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations+8 +ADDP4 +ADDRLP4 64 +INDIRI4 +ASGNI4 +line 854 +;853: +;854: token = COM_Parse( (const char **)(&text_p) ); +ADDRLP4 16 +ARGP4 +ADDRLP4 68 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 68 +INDIRP4 +ASGNP4 +line 855 +;855: if ( !token ) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1563 +line 856 +;856: { +line 857 +;857: break; +ADDRGP4 $1549 +JUMPV +LABELV $1563 +line 859 +;858: } +;859: fps = atof( token ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 72 +ADDRGP4 atof +CALLF4 +ASGNF4 +ADDRLP4 12 +ADDRLP4 72 +INDIRF4 +ASGNF4 +line 860 +;860: if ( fps == 0 ) +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $1565 +line 861 +;861: { +line 862 +;862: fps = 1;//Don't allow divide by zero error +ADDRLP4 12 +CNSTF4 1065353216 +ASGNF4 +line 863 +;863: } +LABELV $1565 +line 864 +;864: if ( fps < 0 ) +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +GEF4 $1567 +line 865 +;865: {//backwards +line 866 +;866: bgGlobalAnimations[animNum].frameLerp = floor(1000.0f / fps); +CNSTF4 1148846080 +ADDRLP4 12 +INDIRF4 +DIVF4 +ARGF4 +ADDRLP4 76 +ADDRGP4 floor +CALLF4 +ASGNF4 +CNSTI4 28 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations+12 +ADDP4 +ADDRLP4 76 +INDIRF4 +CVFI4 4 +ASGNI4 +line 867 +;867: } +ADDRGP4 $1568 +JUMPV +LABELV $1567 +line 869 +;868: else +;869: { +line 870 +;870: bgGlobalAnimations[animNum].frameLerp = ceil(1000.0f / fps); +CNSTF4 1148846080 +ADDRLP4 12 +INDIRF4 +DIVF4 +ARGF4 +ADDRLP4 76 +ADDRGP4 ceil +CALLF4 +ASGNF4 +CNSTI4 28 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations+12 +ADDP4 +ADDRLP4 76 +INDIRF4 +CVFI4 4 +ASGNI4 +line 871 +;871: } +LABELV $1568 +line 873 +;872: +;873: bgGlobalAnimations[animNum].initialLerp = ceil(1000.0f / fabs(fps)); +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 76 +ADDRGP4 fabs +CALLF4 +ASGNF4 +CNSTF4 1148846080 +ADDRLP4 76 +INDIRF4 +DIVF4 +ARGF4 +ADDRLP4 80 +ADDRGP4 ceil +CALLF4 +ASGNF4 +CNSTI4 28 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations+16 +ADDP4 +ADDRLP4 80 +INDIRF4 +CVFI4 4 +ASGNI4 +line 874 +;874: } +LABELV $1548 +line 814 +ADDRGP4 $1547 +JUMPV +LABELV $1549 +line 893 +;875: +;876:#ifdef _DEBUG +;877: //Check the array, and print the ones that have nothing in them. +;878: for(i = 0; i < MAX_ANIMATIONS; i++) +;879: { +;880: if (animTable[i].name != NULL) // This animation reference exists. +;881: { +;882: if (bgGlobalAnimations[i].firstFrame <= 0 && bgGlobalAnimations[i].numFrames <=0) +;883: { // This is an empty animation reference. +;884: Com_Printf("***ANIMTABLE reference #%d (%s) is empty!\n", i, animTable[i].name); +;885: } +;886: } +;887: } +;888:#endif // _DEBUG +;889: +;890:#ifdef CONVENIENT_ANIMATION_FILE_DEBUG_THING +;891: SpewDebugStuffToFile(); +;892:#endif +;893: BGPAFtextLoaded = qtrue; +ADDRGP4 BGPAFtextLoaded +CNSTI4 1 +ASGNI4 +line 894 +;894: return qtrue; +CNSTI4 1 +RETI4 +LABELV $1532 +endproc BG_ParseAnimationFile 84 12 +proc PM_StartLegsAnim 28 16 +line 905 +;895:} +;896: +;897: +;898: +;899:/* +;900:=================== +;901:LEGS Animations +;902:Base animation for overall body +;903:=================== +;904:*/ +;905:static void PM_StartLegsAnim( int anim ) { +line 906 +;906: if ( pm->ps->pm_type >= PM_DEAD ) { +ADDRLP4 0 +CNSTI4 4 +ASGNI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +LTI4 $1573 +line 907 +;907: return; +ADDRGP4 $1572 +JUMPV +LABELV $1573 +line 909 +;908: } +;909: if ( pm->ps->legsTimer > 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1575 +line 910 +;910: return; // a high priority animation is running +ADDRGP4 $1572 +JUMPV +LABELV $1575 +line 913 +;911: } +;912: +;913: if (pm->ps->usingATST) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1577 +line 914 +;914: { //animation is handled mostly client-side with only a few exceptions +line 915 +;915: return; +ADDRGP4 $1572 +JUMPV +LABELV $1577 +line 918 +;916: } +;917: +;918: if (BG_InSaberStandAnim(anim) && pm->ps->weapon == WP_SABER && pm->ps->dualBlade) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 BG_InSaberStandAnim +CALLI4 +ASGNI4 +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1579 +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1579 +ADDRLP4 12 +INDIRP4 +CNSTI4 1364 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1579 +line 919 +;919: { //a bit of a hack, but dualblade is cheat-only anyway +line 920 +;920: anim = BOTH_STAND1; +ADDRFP4 0 +CNSTI4 571 +ASGNI4 +line 921 +;921: } +LABELV $1579 +line 923 +;922: +;923: pm->ps->legsAnim = ( ( pm->ps->legsAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +ASGNP4 +ADDRLP4 20 +CNSTI4 2048 +ASGNI4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +ADDRLP4 20 +INDIRI4 +BANDI4 +ADDRLP4 20 +INDIRI4 +BXORI4 +ADDRFP4 0 +INDIRI4 +BORI4 +ASGNI4 +line 926 +;924: | anim; +;925: +;926: if ( pm->debugLevel ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1581 +line 927 +;927: Com_Printf("%d: StartLegsAnim %d, on client#%d\n", pm->cmd.serverTime, anim, pm->ps->clientNum); +ADDRGP4 $1583 +ARGP4 +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 928 +;928: } +LABELV $1581 +line 929 +;929:} +LABELV $1572 +endproc PM_StartLegsAnim 28 16 +export PM_ContinueLegsAnim +proc PM_ContinueLegsAnim 0 4 +line 931 +;930: +;931:void PM_ContinueLegsAnim( int anim ) { +line 932 +;932: if ( ( pm->ps->legsAnim & ~ANIM_TOGGLEBIT ) == anim ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ADDRFP4 0 +INDIRI4 +NEI4 $1585 +line 933 +;933: return; +ADDRGP4 $1584 +JUMPV +LABELV $1585 +line 935 +;934: } +;935: if ( pm->ps->legsTimer > 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1587 +line 936 +;936: return; // a high priority animation is running +ADDRGP4 $1584 +JUMPV +LABELV $1587 +line 939 +;937: } +;938: +;939: PM_StartLegsAnim( anim ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 PM_StartLegsAnim +CALLV +pop +line 940 +;940:} +LABELV $1584 +endproc PM_ContinueLegsAnim 0 4 +export PM_ForceLegsAnim +proc PM_ForceLegsAnim 32 8 +line 942 +;941: +;942:void PM_ForceLegsAnim( int anim) { +line 943 +;943: if (BG_InSpecialJump(pm->ps->legsAnim) && +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $1590 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LEI4 $1590 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $1590 +line 946 +;944: pm->ps->legsTimer > 0 && +;945: !BG_InSpecialJump(anim)) +;946: { +line 947 +;947: return; +ADDRGP4 $1589 +JUMPV +LABELV $1590 +line 950 +;948: } +;949: +;950: if (BG_InRoll(pm->ps, pm->ps->legsAnim) && +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRLP4 16 +INDIRI4 +ADDRLP4 20 +INDIRI4 +EQI4 $1592 +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +ADDRLP4 20 +INDIRI4 +LEI4 $1592 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +NEI4 $1592 +line 953 +;951: pm->ps->legsTimer > 0 && +;952: !BG_InRoll(pm->ps, anim)) +;953: { +line 954 +;954: return; +ADDRGP4 $1589 +JUMPV +LABELV $1592 +line 957 +;955: } +;956: +;957: pm->ps->legsTimer = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 958 +;958: PM_StartLegsAnim( anim ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 PM_StartLegsAnim +CALLV +pop +line 959 +;959:} +LABELV $1589 +endproc PM_ForceLegsAnim 32 8 +export PM_StartTorsoAnim +proc PM_StartTorsoAnim 12 0 +line 969 +;960: +;961: +;962: +;963:/* +;964:=================== +;965:TORSO Animations +;966:Override animations for upper body +;967:=================== +;968:*/ +;969:void PM_StartTorsoAnim( int anim ) { +line 970 +;970: if ( pm->ps->pm_type >= PM_DEAD ) { +ADDRLP4 0 +CNSTI4 4 +ASGNI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +LTI4 $1595 +line 971 +;971: return; +ADDRGP4 $1594 +JUMPV +LABELV $1595 +line 974 +;972: } +;973: +;974: if (pm->ps->usingATST) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1597 +line 975 +;975: { //animation is handled mostly client-side with only a few exceptions +line 976 +;976: return; +ADDRGP4 $1594 +JUMPV +LABELV $1597 +line 985 +;977: } +;978: +;979: //cm NOTE: Causes problems with blocking. +;980: /*if (BG_InSaberStandAnim(anim) && pm->ps->weapon == WP_SABER && pm->ps->dualBlade) +;981: { //a bit of a hack, but dualblade is cheat-only anyway +;982: anim = BOTH_STAND1; +;983: }*/ +;984: +;985: pm->ps->torsoAnim = ( ( pm->ps->torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +ASGNP4 +ADDRLP4 8 +CNSTI4 2048 +ASGNI4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +BANDI4 +ADDRLP4 8 +INDIRI4 +BXORI4 +ADDRFP4 0 +INDIRI4 +BORI4 +ASGNI4 +line 987 +;986: | anim; +;987:} +LABELV $1594 +endproc PM_StartTorsoAnim 12 0 +export PM_SetLegsAnimTimer +proc PM_SetLegsAnimTimer 0 0 +line 997 +;988: +;989: +;990:/* +;991:------------------------- +;992:PM_SetLegsAnimTimer +;993:------------------------- +;994:*/ +;995: +;996:void PM_SetLegsAnimTimer(int time ) +;997:{ +line 998 +;998: pm->ps->legsTimer = time; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1000 +;999: +;1000: if (pm->ps->legsTimer < 0 && time != -1 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 0 +GEI4 $1600 +ADDRFP4 0 +INDIRI4 +CNSTI4 -1 +EQI4 $1600 +line 1001 +;1001: {//Cap timer to 0 if was counting down, but let it be -1 if that was intentional. NOTENOTE Yeah this seems dumb, but it mirrors SP. +line 1002 +;1002: pm->ps->legsTimer = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1003 +;1003: } +LABELV $1600 +line 1004 +;1004:} +LABELV $1599 +endproc PM_SetLegsAnimTimer 0 0 +export PM_SetTorsoAnimTimer +proc PM_SetTorsoAnimTimer 0 0 +line 1013 +;1005: +;1006:/* +;1007:------------------------- +;1008:PM_SetTorsoAnimTimer +;1009:------------------------- +;1010:*/ +;1011: +;1012:void PM_SetTorsoAnimTimer(int time ) +;1013:{ +line 1014 +;1014: pm->ps->torsoTimer = time; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1016 +;1015: +;1016: if (pm->ps->torsoTimer < 0 && time != -1 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +CNSTI4 0 +GEI4 $1603 +ADDRFP4 0 +INDIRI4 +CNSTI4 -1 +EQI4 $1603 +line 1017 +;1017: {//Cap timer to 0 if was counting down, but let it be -1 if that was intentional. NOTENOTE Yeah this seems dumb, but it mirrors SP. +line 1018 +;1018: pm->ps->torsoTimer = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1019 +;1019: } +LABELV $1603 +line 1020 +;1020:} +LABELV $1602 +endproc PM_SetTorsoAnimTimer 0 0 +export BG_SaberStartTransAnim +proc BG_SaberStartTransAnim 16 0 +line 1023 +;1021: +;1022:void BG_SaberStartTransAnim( int saberAnimLevel, int anim, float *animSpeed ) +;1023:{ +line 1024 +;1024: if ( ( (anim&~ANIM_TOGGLEBIT) >= BOTH_T1_BR__R && +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 145 +LTI4 $1609 +ADDRLP4 0 +INDIRI4 +CNSTI4 186 +LEI4 $1610 +LABELV $1609 +ADDRLP4 4 +ADDRFP4 4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 222 +LTI4 $1611 +ADDRLP4 4 +INDIRI4 +CNSTI4 263 +LEI4 $1610 +LABELV $1611 +ADDRLP4 8 +ADDRFP4 4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 299 +LTI4 $1606 +ADDRLP4 8 +INDIRI4 +CNSTI4 340 +GTI4 $1606 +LABELV $1610 +line 1030 +;1025: (anim&~ANIM_TOGGLEBIT) <= BOTH_T1_BL_TL ) || +;1026: ( (anim&~ANIM_TOGGLEBIT) >= BOTH_T2_BR__R && +;1027: (anim&~ANIM_TOGGLEBIT) <= BOTH_T2_BL_TL ) || +;1028: ( (anim&~ANIM_TOGGLEBIT) >= BOTH_T3_BR__R && +;1029: (anim&~ANIM_TOGGLEBIT) <= BOTH_T3_BL_TL ) ) +;1030: { +line 1031 +;1031: if ( saberAnimLevel == FORCE_LEVEL_1 ) +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +NEI4 $1612 +line 1032 +;1032: { +line 1033 +;1033: *animSpeed *= 1.5; +ADDRLP4 12 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTF4 1069547520 +ADDRLP4 12 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 1034 +;1034: } +ADDRGP4 $1613 +JUMPV +LABELV $1612 +line 1035 +;1035: else if ( saberAnimLevel == FORCE_LEVEL_3 ) +ADDRFP4 0 +INDIRI4 +CNSTI4 3 +NEI4 $1614 +line 1036 +;1036: { +line 1037 +;1037: *animSpeed *= 0.75; +ADDRLP4 12 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTF4 1061158912 +ADDRLP4 12 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 1038 +;1038: } +LABELV $1614 +LABELV $1613 +line 1039 +;1039: } +LABELV $1606 +line 1040 +;1040:} +LABELV $1605 +endproc BG_SaberStartTransAnim 16 0 +export PM_SetAnimFinal +proc PM_SetAnimFinal 40 12 +line 1049 +;1041: +;1042:/* +;1043:------------------------- +;1044:PM_SetAnimFinal +;1045:------------------------- +;1046:*/ +;1047:void PM_SetAnimFinal(int setAnimParts,int anim,int setAnimFlags, +;1048: int blendTime) // default blendTime=350 +;1049:{ +line 1050 +;1050: animation_t *animations = pm->animations; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ASGNP4 +line 1052 +;1051: +;1052: float editAnimSpeed = 1; +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +line 1054 +;1053: +;1054: if (!animations) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1617 +line 1055 +;1055: { +line 1056 +;1056: return; +ADDRGP4 $1616 +JUMPV +LABELV $1617 +line 1060 +;1057: } +;1058: +;1059: //NOTE: Setting blendTime here breaks actual blending.. +;1060: blendTime = 0; +ADDRFP4 12 +CNSTI4 0 +ASGNI4 +line 1062 +;1061: +;1062: BG_SaberStartTransAnim(pm->ps->fd.saberAnimLevel, anim, &editAnimSpeed); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRGP4 BG_SaberStartTransAnim +CALLV +pop +line 1065 +;1063: +;1064: // Set torso anim +;1065: if (setAnimParts & SETANIM_TORSO) +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1619 +line 1066 +;1066: { +line 1068 +;1067: // Don't reset if it's already running the anim +;1068: if( !(setAnimFlags & SETANIM_FLAG_RESTART) && (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT ) == anim ) +ADDRFP4 8 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +NEI4 $1621 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ADDRFP4 4 +INDIRI4 +NEI4 $1621 +line 1069 +;1069: { +line 1070 +;1070: goto setAnimLegs; +ADDRGP4 $1623 +JUMPV +LABELV $1621 +line 1073 +;1071: } +;1072: // or if a more important anim is running +;1073: if( !(setAnimFlags & SETANIM_FLAG_OVERRIDE) && ((pm->ps->torsoTimer > 0)||(pm->ps->torsoTimer == -1)) ) +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 8 +INDIRI4 +NEI4 $1624 +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 8 +INDIRI4 +GTI4 $1626 +ADDRLP4 12 +INDIRI4 +CNSTI4 -1 +NEI4 $1624 +LABELV $1626 +line 1074 +;1074: { +line 1075 +;1075: goto setAnimLegs; +ADDRGP4 $1623 +JUMPV +LABELV $1624 +line 1078 +;1076: } +;1077: +;1078: PM_StartTorsoAnim( anim ); +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 1080 +;1079: +;1080: if (setAnimFlags & SETANIM_FLAG_HOLD) +ADDRFP4 8 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1627 +line 1081 +;1081: { +line 1082 +;1082: if (setAnimFlags & SETANIM_FLAG_HOLDLESS) +ADDRFP4 8 +INDIRI4 +CNSTI4 8 +BANDI4 +CNSTI4 0 +EQI4 $1629 +line 1083 +;1083: { // Make sure to only wait in full 1/20 sec server frame intervals. +line 1087 +;1084: int dur; +;1085: int speedDif; +;1086: +;1087: dur = (animations[anim].numFrames-1) * fabs(animations[anim].frameLerp); +ADDRLP4 24 +CNSTI4 28 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 28 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1 +SUBI4 +CVIF4 4 +ADDRLP4 28 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1088 +;1088: speedDif = dur - (dur * editAnimSpeed); +ADDRLP4 32 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 32 +INDIRF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +SUBF4 +CVFI4 4 +ASGNI4 +line 1089 +;1089: dur += speedDif; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +ADDRLP4 20 +INDIRI4 +ADDI4 +ASGNI4 +line 1090 +;1090: if (dur > 1) +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +LEI4 $1631 +line 1091 +;1091: { +line 1092 +;1092: pm->ps->torsoTimer = dur-1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1093 +;1093: } +ADDRGP4 $1630 +JUMPV +LABELV $1631 +line 1095 +;1094: else +;1095: { +line 1096 +;1096: pm->ps->torsoTimer = fabs(animations[anim].frameLerp); +CNSTI4 28 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 36 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 36 +INDIRF4 +CVFI4 4 +ASGNI4 +line 1097 +;1097: } +line 1098 +;1098: } +ADDRGP4 $1630 +JUMPV +LABELV $1629 +line 1100 +;1099: else +;1100: { +line 1101 +;1101: pm->ps->torsoTimer = ((animations[anim].numFrames ) * fabs(animations[anim].frameLerp)); +ADDRLP4 16 +CNSTI4 28 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 20 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1102 +;1102: } +LABELV $1630 +line 1104 +;1103: +;1104: if (pm->ps->fd.forcePowersActive & (1 << FP_RAGE)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $1633 +line 1105 +;1105: { +line 1106 +;1106: pm->ps->torsoTimer /= 1.7; +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +CVIF4 4 +CNSTF4 1071225242 +DIVF4 +CVFI4 4 +ASGNI4 +line 1107 +;1107: } +LABELV $1633 +line 1108 +;1108: } +LABELV $1627 +line 1109 +;1109: } +LABELV $1619 +LABELV $1623 +line 1113 +;1110: +;1111:setAnimLegs: +;1112: // Set legs anim +;1113: if (setAnimParts & SETANIM_LEGS) +ADDRFP4 0 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1616 +line 1114 +;1114: { +line 1116 +;1115: // Don't reset if it's already running the anim +;1116: if( !(setAnimFlags & SETANIM_FLAG_RESTART) && (pm->ps->legsAnim & ~ANIM_TOGGLEBIT ) == anim ) +ADDRFP4 8 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +NEI4 $1637 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ADDRFP4 4 +INDIRI4 +NEI4 $1637 +line 1117 +;1117: { +line 1118 +;1118: goto setAnimDone; +ADDRGP4 $1616 +JUMPV +LABELV $1637 +line 1121 +;1119: } +;1120: // or if a more important anim is running +;1121: if( !(setAnimFlags & SETANIM_FLAG_OVERRIDE) && ((pm->ps->legsTimer > 0)||(pm->ps->legsTimer == -1)) ) +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 8 +INDIRI4 +NEI4 $1640 +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 8 +INDIRI4 +GTI4 $1642 +ADDRLP4 12 +INDIRI4 +CNSTI4 -1 +NEI4 $1640 +LABELV $1642 +line 1122 +;1122: { +line 1123 +;1123: goto setAnimDone; +ADDRGP4 $1616 +JUMPV +LABELV $1640 +line 1126 +;1124: } +;1125: +;1126: PM_StartLegsAnim(anim); +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 PM_StartLegsAnim +CALLV +pop +line 1128 +;1127: +;1128: if (setAnimFlags & SETANIM_FLAG_HOLD) +ADDRFP4 8 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1616 +line 1129 +;1129: { +line 1130 +;1130: if (setAnimFlags & SETANIM_FLAG_HOLDLESS) +ADDRFP4 8 +INDIRI4 +CNSTI4 8 +BANDI4 +CNSTI4 0 +EQI4 $1645 +line 1131 +;1131: { // Make sure to only wait in full 1/20 sec server frame intervals. +line 1135 +;1132: int dur; +;1133: int speedDif; +;1134: +;1135: dur = (animations[anim].numFrames-1) * fabs(animations[anim].frameLerp); +ADDRLP4 24 +CNSTI4 28 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 28 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1 +SUBI4 +CVIF4 4 +ADDRLP4 28 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1136 +;1136: speedDif = dur - (dur * editAnimSpeed); +ADDRLP4 32 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 32 +INDIRF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +SUBF4 +CVFI4 4 +ASGNI4 +line 1137 +;1137: dur += speedDif; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +ADDRLP4 20 +INDIRI4 +ADDI4 +ASGNI4 +line 1138 +;1138: if (dur > 1) +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +LEI4 $1647 +line 1139 +;1139: { +line 1140 +;1140: pm->ps->legsTimer = dur-1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1141 +;1141: } +ADDRGP4 $1646 +JUMPV +LABELV $1647 +line 1143 +;1142: else +;1143: { +line 1144 +;1144: pm->ps->legsTimer = fabs(animations[anim].frameLerp); +CNSTI4 28 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 36 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRLP4 36 +INDIRF4 +CVFI4 4 +ASGNI4 +line 1145 +;1145: } +line 1146 +;1146: } +ADDRGP4 $1646 +JUMPV +LABELV $1645 +line 1148 +;1147: else +;1148: { +line 1149 +;1149: pm->ps->legsTimer = ((animations[anim].numFrames ) * fabs(animations[anim].frameLerp)); +ADDRLP4 16 +CNSTI4 28 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 20 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1150 +;1150: } +LABELV $1646 +line 1152 +;1151: +;1152: if (pm->ps->fd.forcePowersActive & (1 << FP_RAGE)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $1649 +line 1153 +;1153: { +line 1154 +;1154: pm->ps->legsTimer /= 1.3; +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +CVIF4 4 +CNSTF4 1067869798 +DIVF4 +CVFI4 4 +ASGNI4 +line 1155 +;1155: } +ADDRGP4 $1616 +JUMPV +LABELV $1649 +line 1156 +;1156: else if (pm->ps->fd.forcePowersActive & (1 << FP_SPEED)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $1616 +line 1157 +;1157: { +line 1158 +;1158: pm->ps->legsTimer /= 1.7; +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +CVIF4 4 +CNSTF4 1071225242 +DIVF4 +CVFI4 4 +ASGNI4 +line 1159 +;1159: } +line 1160 +;1160: } +line 1161 +;1161: } +line 1164 +;1162: +;1163:setAnimDone: +;1164: return; +LABELV $1616 +endproc PM_SetAnimFinal 40 12 +export PM_SetAnim +proc PM_SetAnim 12 16 +line 1171 +;1165:} +;1166: +;1167: +;1168: +;1169:// Imported from single-player, this function is mainly intended to make porting from SP easier. +;1170:void PM_SetAnim(int setAnimParts,int anim,int setAnimFlags, int blendTime) +;1171:{ +line 1172 +;1172: assert( bgGlobalAnimations[anim].firstFrame != 0 || +line 1175 +;1173: bgGlobalAnimations[anim].numFrames != 0); +;1174: +;1175: if (BG_InSpecialJump(anim)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $1654 +line 1176 +;1176: { +line 1177 +;1177: setAnimFlags |= SETANIM_FLAG_RESTART; +ADDRFP4 8 +ADDRFP4 8 +INDIRI4 +CNSTI4 4 +BORI4 +ASGNI4 +line 1178 +;1178: } +LABELV $1654 +line 1180 +;1179: +;1180: if (BG_InRoll(pm->ps, pm->ps->legsAnim)) +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $1656 +line 1181 +;1181: { //never interrupt a roll +line 1182 +;1182: return; +ADDRGP4 $1653 +JUMPV +LABELV $1656 +line 1185 +;1183: } +;1184: +;1185: if (setAnimFlags&SETANIM_FLAG_OVERRIDE) +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1658 +line 1186 +;1186: { +line 1187 +;1187: if (setAnimParts & SETANIM_TORSO) +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1660 +line 1188 +;1188: { +line 1189 +;1189: if( (setAnimFlags & SETANIM_FLAG_RESTART) || (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT ) != anim ) +ADDRFP4 8 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +NEI4 $1664 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ADDRFP4 4 +INDIRI4 +EQI4 $1662 +LABELV $1664 +line 1190 +;1190: { +line 1191 +;1191: PM_SetTorsoAnimTimer(0); +CNSTI4 0 +ARGI4 +ADDRGP4 PM_SetTorsoAnimTimer +CALLV +pop +line 1192 +;1192: } +LABELV $1662 +line 1193 +;1193: } +LABELV $1660 +line 1194 +;1194: if (setAnimParts & SETANIM_LEGS) +ADDRFP4 0 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1665 +line 1195 +;1195: { +line 1196 +;1196: if( (setAnimFlags & SETANIM_FLAG_RESTART) || (pm->ps->legsAnim & ~ANIM_TOGGLEBIT ) != anim ) +ADDRFP4 8 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +NEI4 $1669 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ADDRFP4 4 +INDIRI4 +EQI4 $1667 +LABELV $1669 +line 1197 +;1197: { +line 1198 +;1198: PM_SetLegsAnimTimer(0); +CNSTI4 0 +ARGI4 +ADDRGP4 PM_SetLegsAnimTimer +CALLV +pop +line 1199 +;1199: } +LABELV $1667 +line 1200 +;1200: } +LABELV $1665 +line 1201 +;1201: } +LABELV $1658 +line 1203 +;1202: +;1203: PM_SetAnimFinal(setAnimParts, anim, setAnimFlags, blendTime); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRGP4 PM_SetAnimFinal +CALLV +pop +line 1204 +;1204:} +LABELV $1653 +endproc PM_SetAnim 12 16 +bss +export BGPAFtext +align 1 +LABELV BGPAFtext +skip 40000 +import PM_SetForceJumpZStart +import PM_SetSaberMove +import PM_WeaponLightsaber +import PM_FinishWeaponChange +import PM_BeginWeaponChange +import BG_CycleInven +import PM_StepSlideMove +import PM_SlideMove +import PM_AddEvent +import PM_AddTouchEnt +import PM_ClipVelocity +import PM_SaberJumpAttackMove +import PM_SaberFlipOverAttackMove +import PM_SomeoneInFront +import PM_GroundDistance +import PM_GetSaberStance +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import forcePowerNeeded +import c_pmove +import pm_flightfriction +import pm_waterfriction +import pm_friction +import pm_flyaccelerate +import pm_wateraccelerate +import pm_airaccelerate +import pm_accelerate +import pm_wadeScale +import pm_swimScale +import pm_duckScale +import pm_stopspeed +import pml +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +export bgGlobalAnimations +align 4 +LABELV bgGlobalAnimations +skip 33908 +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $1583 +char 1 37 +char 1 100 +char 1 58 +char 1 32 +char 1 32 +char 1 83 +char 1 116 +char 1 97 +char 1 114 +char 1 116 +char 1 76 +char 1 101 +char 1 103 +char 1 115 +char 1 65 +char 1 110 +char 1 105 +char 1 109 +char 1 32 +char 1 37 +char 1 100 +char 1 44 +char 1 32 +char 1 111 +char 1 110 +char 1 32 +char 1 99 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 35 +char 1 37 +char 1 100 +char 1 10 +char 1 0 +align 1 +LABELV $1531 +char 1 78 +char 1 69 +char 1 87 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $1530 +char 1 79 +char 1 76 +char 1 68 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $1274 +char 1 70 +char 1 65 +char 1 67 +char 1 69 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 0 +align 1 +LABELV $1273 +char 1 70 +char 1 65 +char 1 67 +char 1 69 +char 1 95 +char 1 70 +char 1 82 +char 1 79 +char 1 87 +char 1 78 +char 1 0 +align 1 +LABELV $1272 +char 1 70 +char 1 65 +char 1 67 +char 1 69 +char 1 95 +char 1 83 +char 1 77 +char 1 73 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $1271 +char 1 70 +char 1 65 +char 1 67 +char 1 69 +char 1 95 +char 1 65 +char 1 76 +char 1 69 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1270 +char 1 70 +char 1 65 +char 1 67 +char 1 69 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 52 +char 1 0 +align 1 +LABELV $1269 +char 1 70 +char 1 65 +char 1 67 +char 1 69 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 51 +char 1 0 +align 1 +LABELV $1268 +char 1 70 +char 1 65 +char 1 67 +char 1 69 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $1267 +char 1 70 +char 1 65 +char 1 67 +char 1 69 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $1266 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $1265 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1264 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1263 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1262 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1261 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $1260 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1259 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1258 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1257 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1256 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $1255 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1254 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1253 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1252 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1251 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $1250 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1249 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1248 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1247 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1246 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $1245 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1244 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1243 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1242 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1241 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $1240 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1239 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1238 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1237 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1236 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $1235 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1234 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1233 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1232 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 82 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1231 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $1230 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1229 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1228 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1227 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 76 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1226 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 85 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $1225 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 85 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1224 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 85 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1223 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1222 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1221 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 85 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $1220 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 85 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1219 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 85 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1218 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1217 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1216 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 67 +char 1 72 +char 1 79 +char 1 75 +char 1 73 +char 1 78 +char 1 71 +char 1 49 +char 1 0 +align 1 +LABELV $1215 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 67 +char 1 82 +char 1 76 +char 1 69 +char 1 65 +char 1 78 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1214 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 67 +char 1 82 +char 1 76 +char 1 69 +char 1 65 +char 1 78 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1213 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 75 +char 1 78 +char 1 69 +char 1 69 +char 1 76 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1212 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 75 +char 1 78 +char 1 69 +char 1 69 +char 1 76 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $1211 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 76 +char 1 69 +char 1 65 +char 1 78 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1210 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 76 +char 1 69 +char 1 65 +char 1 78 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1209 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 50 +char 1 0 +align 1 +LABELV $1208 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $1207 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $1206 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $1205 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $1204 +char 1 76 +char 1 69 +char 1 71 +char 1 83 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $1203 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 67 +char 1 72 +char 1 79 +char 1 75 +char 1 73 +char 1 78 +char 1 71 +char 1 49 +char 1 0 +align 1 +LABELV $1202 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 83 +char 1 85 +char 1 82 +char 1 82 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1201 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 83 +char 1 85 +char 1 82 +char 1 82 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1200 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 71 +char 1 82 +char 1 65 +char 1 66 +char 1 85 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 82 +char 1 0 +align 1 +LABELV $1199 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 71 +char 1 82 +char 1 65 +char 1 66 +char 1 76 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 82 +char 1 0 +align 1 +LABELV $1198 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 71 +char 1 82 +char 1 65 +char 1 66 +char 1 85 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 76 +char 1 0 +align 1 +LABELV $1197 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 71 +char 1 82 +char 1 65 +char 1 66 +char 1 76 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 76 +char 1 0 +align 1 +LABELV $1196 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 82 +char 1 69 +char 1 65 +char 1 67 +char 1 72 +char 1 72 +char 1 69 +char 1 76 +char 1 77 +char 1 69 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1195 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 82 +char 1 65 +char 1 73 +char 1 83 +char 1 69 +char 1 72 +char 1 69 +char 1 76 +char 1 77 +char 1 69 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1194 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 68 +char 1 82 +char 1 79 +char 1 80 +char 1 72 +char 1 69 +char 1 76 +char 1 77 +char 1 69 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1193 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 72 +char 1 65 +char 1 78 +char 1 68 +char 1 82 +char 1 69 +char 1 84 +char 1 82 +char 1 65 +char 1 67 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1192 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 72 +char 1 65 +char 1 78 +char 1 68 +char 1 69 +char 1 88 +char 1 84 +char 1 69 +char 1 78 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $1191 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 72 +char 1 65 +char 1 78 +char 1 68 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 52 +char 1 0 +align 1 +LABELV $1190 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 72 +char 1 65 +char 1 78 +char 1 68 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 51 +char 1 0 +align 1 +LABELV $1189 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 72 +char 1 65 +char 1 78 +char 1 68 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $1188 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 72 +char 1 65 +char 1 78 +char 1 68 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $1187 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 50 +char 1 0 +align 1 +LABELV $1186 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 49 +char 1 0 +align 1 +LABELV $1185 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $1184 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 57 +char 1 0 +align 1 +LABELV $1183 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 56 +char 1 0 +align 1 +LABELV $1182 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 55 +char 1 0 +align 1 +LABELV $1181 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 54 +char 1 0 +align 1 +LABELV $1180 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 53 +char 1 0 +align 1 +LABELV $1179 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 52 +char 1 0 +align 1 +LABELV $1178 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 51 +char 1 0 +align 1 +LABELV $1177 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $1176 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $1175 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 49 +char 1 50 +char 1 0 +align 1 +LABELV $1174 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 49 +char 1 49 +char 1 0 +align 1 +LABELV $1173 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $1172 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 57 +char 1 0 +align 1 +LABELV $1171 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 56 +char 1 0 +align 1 +LABELV $1170 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 55 +char 1 0 +align 1 +LABELV $1169 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 54 +char 1 0 +align 1 +LABELV $1168 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 53 +char 1 0 +align 1 +LABELV $1167 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 52 +char 1 0 +align 1 +LABELV $1166 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 51 +char 1 0 +align 1 +LABELV $1165 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 50 +char 1 0 +align 1 +LABELV $1164 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 49 +char 1 0 +align 1 +LABELV $1163 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 82 +char 1 65 +char 1 73 +char 1 83 +char 1 69 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1162 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 82 +char 1 65 +char 1 73 +char 1 83 +char 1 69 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1161 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 82 +char 1 65 +char 1 73 +char 1 83 +char 1 69 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1160 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 82 +char 1 65 +char 1 73 +char 1 83 +char 1 69 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1159 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 68 +char 1 82 +char 1 79 +char 1 80 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1158 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 68 +char 1 82 +char 1 79 +char 1 80 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1157 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 68 +char 1 82 +char 1 79 +char 1 80 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1156 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 95 +char 1 68 +char 1 82 +char 1 79 +char 1 80 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1155 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 54 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1154 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 54 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1153 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1152 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1151 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 56 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1150 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 56 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1149 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 55 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1148 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 55 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1147 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 82 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1146 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 82 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1145 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 76 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1144 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 76 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1143 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 83 +char 1 72 +char 1 65 +char 1 75 +char 1 69 +char 1 0 +align 1 +LABELV $1142 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 78 +char 1 79 +char 1 68 +char 1 0 +align 1 +LABELV $1141 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 50 +char 1 95 +char 1 80 +char 1 65 +char 1 82 +char 1 84 +char 1 73 +char 1 65 +char 1 76 +char 1 0 +align 1 +LABELV $1140 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $1139 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $1138 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 76 +char 1 49 +char 1 0 +align 1 +LABELV $1137 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 76 +char 1 49 +char 1 77 +char 1 73 +char 1 68 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1136 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 76 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 84 +char 1 79 +char 1 77 +char 1 73 +char 1 68 +char 1 0 +align 1 +LABELV $1135 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 76 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1134 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 76 +char 1 49 +char 1 77 +char 1 73 +char 1 68 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1133 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 76 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 84 +char 1 79 +char 1 77 +char 1 73 +char 1 68 +char 1 0 +align 1 +LABELV $1132 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 76 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1131 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 82 +char 1 49 +char 1 0 +align 1 +LABELV $1130 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 82 +char 1 49 +char 1 77 +char 1 73 +char 1 68 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1129 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 82 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 84 +char 1 79 +char 1 77 +char 1 73 +char 1 68 +char 1 0 +align 1 +LABELV $1128 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 82 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1127 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 82 +char 1 49 +char 1 77 +char 1 73 +char 1 68 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1126 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 82 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 84 +char 1 79 +char 1 77 +char 1 73 +char 1 68 +char 1 0 +align 1 +LABELV $1125 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 82 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1124 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 79 +char 1 83 +char 1 83 +char 1 50 +char 1 0 +align 1 +LABELV $1123 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 79 +char 1 83 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $1122 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 71 +char 1 82 +char 1 73 +char 1 80 +char 1 95 +char 1 82 +char 1 69 +char 1 76 +char 1 69 +char 1 65 +char 1 83 +char 1 69 +char 1 0 +align 1 +LABELV $1121 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 71 +char 1 82 +char 1 73 +char 1 80 +char 1 95 +char 1 72 +char 1 79 +char 1 76 +char 1 68 +char 1 0 +align 1 +LABELV $1120 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 71 +char 1 82 +char 1 73 +char 1 80 +char 1 51 +char 1 84 +char 1 72 +char 1 82 +char 1 79 +char 1 87 +char 1 0 +align 1 +LABELV $1119 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 71 +char 1 82 +char 1 73 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1118 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 71 +char 1 82 +char 1 73 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1117 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 80 +char 1 85 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $1116 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 72 +char 1 69 +char 1 65 +char 1 76 +char 1 95 +char 1 81 +char 1 85 +char 1 73 +char 1 67 +char 1 75 +char 1 0 +align 1 +LABELV $1115 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 72 +char 1 69 +char 1 65 +char 1 76 +char 1 95 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1114 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 72 +char 1 69 +char 1 65 +char 1 76 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1113 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 76 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 82 +char 1 69 +char 1 76 +char 1 69 +char 1 65 +char 1 83 +char 1 69 +char 1 0 +align 1 +LABELV $1112 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 76 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 72 +char 1 79 +char 1 76 +char 1 68 +char 1 0 +align 1 +LABELV $1111 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 76 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1110 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 76 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 0 +align 1 +LABELV $1109 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 77 +char 1 73 +char 1 78 +char 1 68 +char 1 84 +char 1 82 +char 1 73 +char 1 67 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $1108 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 77 +char 1 73 +char 1 78 +char 1 68 +char 1 84 +char 1 82 +char 1 73 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $1107 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 80 +char 1 85 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $1106 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 80 +char 1 85 +char 1 83 +char 1 72 +char 1 0 +align 1 +LABELV $1105 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 69 +char 1 83 +char 1 73 +char 1 83 +char 1 84 +char 1 80 +char 1 85 +char 1 83 +char 1 72 +char 1 0 +align 1 +LABELV $1104 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 85 +char 1 84 +char 1 84 +char 1 79 +char 1 78 +char 1 95 +char 1 82 +char 1 69 +char 1 76 +char 1 69 +char 1 65 +char 1 83 +char 1 69 +char 1 0 +align 1 +LABELV $1103 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 85 +char 1 84 +char 1 84 +char 1 79 +char 1 78 +char 1 95 +char 1 72 +char 1 79 +char 1 76 +char 1 68 +char 1 0 +align 1 +LABELV $1102 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 85 +char 1 84 +char 1 84 +char 1 79 +char 1 78 +char 1 50 +char 1 0 +align 1 +LABELV $1101 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 85 +char 1 84 +char 1 84 +char 1 79 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $1100 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 79 +char 1 70 +char 1 70 +char 1 0 +align 1 +LABELV $1099 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 79 +char 1 78 +char 1 0 +align 1 +LABELV $1098 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 79 +char 1 87 +char 1 69 +char 1 82 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1097 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 72 +char 1 79 +char 1 75 +char 1 69 +char 1 51 +char 1 0 +align 1 +LABELV $1096 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 72 +char 1 79 +char 1 75 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $1095 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 72 +char 1 79 +char 1 75 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $1094 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 72 +char 1 79 +char 1 75 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 72 +char 1 79 +char 1 76 +char 1 68 +char 1 0 +align 1 +LABELV $1093 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 72 +char 1 79 +char 1 75 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1092 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 65 +char 1 82 +char 1 82 +char 1 73 +char 1 69 +char 1 68 +char 1 50 +char 1 0 +align 1 +LABELV $1091 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 65 +char 1 82 +char 1 82 +char 1 73 +char 1 69 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $1090 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 73 +char 1 70 +char 1 84 +char 1 69 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $1089 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 69 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 68 +char 1 49 +char 1 80 +char 1 79 +char 1 73 +char 1 78 +char 1 84 +char 1 0 +align 1 +LABELV $1088 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 69 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $1087 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 50 +char 1 95 +char 1 83 +char 1 72 +char 1 73 +char 1 70 +char 1 84 +char 1 0 +align 1 +LABELV $1086 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 49 +char 1 95 +char 1 78 +char 1 79 +char 1 83 +char 1 69 +char 1 0 +align 1 +LABELV $1085 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 95 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 52 +char 1 0 +align 1 +LABELV $1084 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 95 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 51 +char 1 0 +align 1 +LABELV $1083 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 95 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $1082 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 95 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $1081 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 51 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 0 +align 1 +LABELV $1080 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 51 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 0 +align 1 +LABELV $1079 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 51 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 0 +align 1 +LABELV $1078 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 50 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 0 +align 1 +LABELV $1077 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 49 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1076 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 49 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 0 +align 1 +LABELV $1075 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 54 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1074 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 54 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1073 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $1072 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $1071 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $1070 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $1069 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 69 +char 1 69 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1068 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 49 +char 1 0 +align 1 +LABELV $1067 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 82 +char 1 65 +char 1 87 +char 1 76 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $1066 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 82 +char 1 79 +char 1 80 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1065 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $1064 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 54 +char 1 80 +char 1 79 +char 1 73 +char 1 78 +char 1 84 +char 1 0 +align 1 +LABELV $1063 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 54 +char 1 67 +char 1 79 +char 1 77 +char 1 66 +char 1 65 +char 1 68 +char 1 71 +char 1 69 +char 1 0 +align 1 +LABELV $1062 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 54 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1061 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 54 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $1060 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 54 +char 1 0 +align 1 +LABELV $1059 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 51 +char 1 0 +align 1 +LABELV $1058 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 50 +char 1 0 +align 1 +LABELV $1057 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $1056 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 82 +char 1 73 +char 1 84 +char 1 72 +char 1 73 +char 1 78 +char 1 71 +char 1 50 +char 1 0 +align 1 +LABELV $1055 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 82 +char 1 73 +char 1 84 +char 1 72 +char 1 73 +char 1 78 +char 1 71 +char 1 49 +char 1 76 +char 1 76 +char 1 69 +char 1 71 +char 1 0 +align 1 +LABELV $1054 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 82 +char 1 73 +char 1 84 +char 1 72 +char 1 73 +char 1 78 +char 1 71 +char 1 49 +char 1 82 +char 1 76 +char 1 69 +char 1 71 +char 1 0 +align 1 +LABELV $1053 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 82 +char 1 73 +char 1 84 +char 1 72 +char 1 73 +char 1 78 +char 1 71 +char 1 49 +char 1 0 +align 1 +LABELV $1052 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 82 +char 1 79 +char 1 78 +char 1 69 +char 1 50 +char 1 76 +char 1 76 +char 1 69 +char 1 71 +char 1 0 +align 1 +LABELV $1051 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 82 +char 1 79 +char 1 78 +char 1 69 +char 1 50 +char 1 82 +char 1 76 +char 1 69 +char 1 71 +char 1 0 +align 1 +LABELV $1050 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 50 +char 1 87 +char 1 82 +char 1 73 +char 1 84 +char 1 72 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $1049 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 73 +char 1 69 +char 1 95 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 51 +char 1 0 +align 1 +LABELV $1048 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 73 +char 1 69 +char 1 95 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 50 +char 1 0 +align 1 +LABELV $1047 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 73 +char 1 69 +char 1 95 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $1046 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 87 +char 1 73 +char 1 77 +char 1 70 +char 1 79 +char 1 82 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 0 +align 1 +LABELV $1045 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 87 +char 1 73 +char 1 77 +char 1 95 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $1044 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 79 +char 1 65 +char 1 84 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $1043 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 79 +char 1 65 +char 1 84 +char 1 50 +char 1 0 +align 1 +LABELV $1042 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 79 +char 1 65 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1041 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 89 +char 1 95 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1040 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 89 +char 1 95 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1039 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 89 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1038 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 89 +char 1 95 +char 1 83 +char 1 72 +char 1 73 +char 1 69 +char 1 76 +char 1 68 +char 1 69 +char 1 68 +char 1 0 +align 1 +LABELV $1037 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 89 +char 1 95 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $1036 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 89 +char 1 95 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $1035 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 73 +char 1 82 +char 1 84 +char 1 72 +char 1 49 +char 1 0 +align 1 +LABELV $1034 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 77 +char 1 66 +char 1 85 +char 1 83 +char 1 72 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $1033 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 73 +char 1 84 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 49 +char 1 0 +align 1 +LABELV $1032 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 69 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1031 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 73 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1030 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 79 +char 1 70 +char 1 70 +char 1 76 +char 1 65 +char 1 68 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 79 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1029 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 79 +char 1 78 +char 1 76 +char 1 65 +char 1 68 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 79 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1028 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 79 +char 1 70 +char 1 70 +char 1 76 +char 1 65 +char 1 68 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 66 +char 1 79 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1027 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 79 +char 1 78 +char 1 76 +char 1 65 +char 1 68 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 66 +char 1 79 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1026 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 65 +char 1 68 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $1025 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 65 +char 1 68 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 68 +char 1 87 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $1024 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 65 +char 1 68 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $1023 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 73 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $1022 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 85 +char 1 84 +char 1 84 +char 1 69 +char 1 82 +char 1 70 +char 1 76 +char 1 89 +char 1 95 +char 1 70 +char 1 76 +char 1 49 +char 1 0 +align 1 +LABELV $1021 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 85 +char 1 84 +char 1 84 +char 1 69 +char 1 82 +char 1 70 +char 1 76 +char 1 89 +char 1 95 +char 1 70 +char 1 82 +char 1 49 +char 1 0 +align 1 +LABELV $1020 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 82 +char 1 73 +char 1 65 +char 1 76 +char 1 95 +char 1 70 +char 1 49 +char 1 0 +align 1 +LABELV $1019 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 65 +char 1 83 +char 1 72 +char 1 69 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $1018 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 70 +char 1 76 +char 1 69 +char 1 67 +char 1 84 +char 1 83 +char 1 76 +char 1 65 +char 1 83 +char 1 72 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 70 +char 1 73 +char 1 78 +char 1 0 +align 1 +LABELV $1017 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 72 +char 1 65 +char 1 78 +char 1 68 +char 1 67 +char 1 72 +char 1 79 +char 1 80 +char 1 80 +char 1 69 +char 1 68 +char 1 79 +char 1 70 +char 1 70 +char 1 0 +align 1 +LABELV $1016 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 70 +char 1 82 +char 1 79 +char 1 77 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 83 +char 1 76 +char 1 65 +char 1 83 +char 1 72 +char 1 0 +align 1 +LABELV $1015 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 74 +char 1 83 +char 1 83 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $1014 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 74 +char 1 83 +char 1 83 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $1013 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 69 +char 1 73 +char 1 76 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 68 +char 1 82 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $1012 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 69 +char 1 73 +char 1 76 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 67 +char 1 76 +char 1 73 +char 1 78 +char 1 71 +char 1 0 +align 1 +LABELV $1011 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 80 +char 1 73 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $1010 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $1009 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $1008 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 95 +char 1 66 +char 1 54 +char 1 0 +align 1 +LABELV $1007 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 95 +char 1 66 +char 1 53 +char 1 0 +align 1 +LABELV $1006 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 95 +char 1 66 +char 1 52 +char 1 0 +align 1 +LABELV $1005 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 95 +char 1 66 +char 1 51 +char 1 0 +align 1 +LABELV $1004 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 95 +char 1 66 +char 1 50 +char 1 0 +align 1 +LABELV $1003 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 95 +char 1 66 +char 1 49 +char 1 0 +align 1 +LABELV $1002 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 95 +char 1 70 +char 1 50 +char 1 0 +align 1 +LABELV $1001 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 95 +char 1 70 +char 1 49 +char 1 0 +align 1 +LABELV $1000 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 95 +char 1 66 +char 1 49 +char 1 0 +align 1 +LABELV $999 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 95 +char 1 70 +char 1 49 +char 1 0 +align 1 +LABELV $998 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $997 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $996 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $995 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $994 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $993 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 78 +char 1 79 +char 1 67 +char 1 75 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 53 +char 1 0 +align 1 +LABELV $992 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 78 +char 1 79 +char 1 67 +char 1 75 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 52 +char 1 0 +align 1 +LABELV $991 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 78 +char 1 79 +char 1 67 +char 1 75 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 51 +char 1 0 +align 1 +LABELV $990 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 78 +char 1 79 +char 1 67 +char 1 75 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 50 +char 1 0 +align 1 +LABELV $989 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 78 +char 1 79 +char 1 67 +char 1 75 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $988 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 70 +char 1 87 +char 1 68 +char 1 0 +align 1 +LABELV $987 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 0 +align 1 +LABELV $986 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 0 +align 1 +LABELV $985 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 95 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $984 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 0 +align 1 +LABELV $983 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 0 +align 1 +LABELV $982 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 95 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $981 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 0 +align 1 +LABELV $980 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 76 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 0 +align 1 +LABELV $979 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 85 +char 1 84 +char 1 84 +char 1 69 +char 1 82 +char 1 70 +char 1 76 +char 1 89 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 0 +align 1 +LABELV $978 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 85 +char 1 84 +char 1 84 +char 1 69 +char 1 82 +char 1 70 +char 1 76 +char 1 89 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 0 +align 1 +LABELV $977 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 51 +char 1 0 +align 1 +LABELV $976 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $975 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $974 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 0 +align 1 +LABELV $973 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 65 +char 1 82 +char 1 84 +char 1 87 +char 1 72 +char 1 69 +char 1 69 +char 1 76 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 0 +align 1 +LABELV $972 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 65 +char 1 82 +char 1 84 +char 1 87 +char 1 72 +char 1 69 +char 1 69 +char 1 76 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 0 +align 1 +LABELV $971 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 82 +char 1 73 +char 1 65 +char 1 76 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 0 +align 1 +LABELV $970 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 82 +char 1 73 +char 1 65 +char 1 76 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 0 +align 1 +LABELV $969 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 78 +char 1 71 +char 1 65 +char 1 71 +char 1 69 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 0 +align 1 +LABELV $968 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 73 +char 1 86 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $967 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 79 +char 1 68 +char 1 71 +char 1 69 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $966 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 79 +char 1 68 +char 1 71 +char 1 69 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $965 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 79 +char 1 68 +char 1 71 +char 1 69 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $964 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 79 +char 1 68 +char 1 71 +char 1 69 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $963 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 79 +char 1 68 +char 1 71 +char 1 69 +char 1 95 +char 1 70 +char 1 82 +char 1 0 +align 1 +LABELV $962 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 79 +char 1 68 +char 1 71 +char 1 69 +char 1 95 +char 1 70 +char 1 76 +char 1 0 +align 1 +LABELV $961 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 79 +char 1 80 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $960 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 79 +char 1 80 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $959 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 79 +char 1 80 +char 1 95 +char 1 66 +char 1 0 +align 1 +LABELV $958 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 79 +char 1 80 +char 1 95 +char 1 70 +char 1 0 +align 1 +LABELV $957 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $956 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $955 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 95 +char 1 70 +char 1 76 +char 1 0 +align 1 +LABELV $954 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 95 +char 1 70 +char 1 82 +char 1 0 +align 1 +LABELV $953 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $952 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $951 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 95 +char 1 66 +char 1 0 +align 1 +LABELV $950 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 95 +char 1 70 +char 1 0 +align 1 +LABELV $949 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $948 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $947 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 66 +char 1 0 +align 1 +LABELV $946 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 95 +char 1 70 +char 1 0 +align 1 +LABELV $945 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $944 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 73 +char 1 78 +char 1 65 +char 1 73 +char 1 82 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $943 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $942 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $941 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 73 +char 1 78 +char 1 65 +char 1 73 +char 1 82 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $940 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $939 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $938 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 73 +char 1 78 +char 1 65 +char 1 73 +char 1 82 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $937 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $936 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $935 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 73 +char 1 78 +char 1 65 +char 1 73 +char 1 82 +char 1 49 +char 1 0 +align 1 +LABELV $934 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $933 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $932 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 65 +char 1 73 +char 1 82 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $931 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $930 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $929 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 65 +char 1 73 +char 1 82 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $928 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $927 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $926 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 65 +char 1 73 +char 1 82 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $925 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $924 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 50 +char 1 0 +align 1 +LABELV $923 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $922 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 65 +char 1 73 +char 1 82 +char 1 49 +char 1 0 +align 1 +LABELV $921 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $920 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $919 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $918 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $917 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $916 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 87 +char 1 73 +char 1 77 +char 1 49 +char 1 0 +align 1 +LABELV $915 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 65 +char 1 87 +char 1 65 +char 1 89 +char 1 49 +char 1 0 +align 1 +LABELV $914 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 49 +char 1 0 +align 1 +LABELV $913 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 0 +align 1 +LABELV $912 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 52 +char 1 0 +align 1 +LABELV $911 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 51 +char 1 0 +align 1 +LABELV $910 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 50 +char 1 0 +align 1 +LABELV $909 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $908 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $907 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $906 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 70 +char 1 69 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $905 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 70 +char 1 69 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $904 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 70 +char 1 69 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $903 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 70 +char 1 69 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $902 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $901 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 50 +char 1 0 +align 1 +LABELV $900 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $899 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $898 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $897 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 84 +char 1 79 +char 1 82 +char 1 85 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $896 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $895 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 57 +char 1 0 +align 1 +LABELV $894 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 56 +char 1 0 +align 1 +LABELV $893 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 55 +char 1 0 +align 1 +LABELV $892 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 54 +char 1 0 +align 1 +LABELV $891 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 53 +char 1 0 +align 1 +LABELV $890 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 52 +char 1 0 +align 1 +LABELV $889 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 51 +char 1 0 +align 1 +LABELV $888 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $887 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $886 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 65 +char 1 77 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 0 +align 1 +LABELV $885 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 76 +char 1 73 +char 1 68 +char 1 69 +char 1 71 +char 1 76 +char 1 65 +char 1 83 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $884 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 79 +char 1 76 +char 1 68 +char 1 71 +char 1 76 +char 1 65 +char 1 83 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $883 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 77 +char 1 77 +char 1 65 +char 1 71 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $882 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 77 +char 1 77 +char 1 65 +char 1 71 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $881 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 85 +char 1 77 +char 1 77 +char 1 65 +char 1 71 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $880 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 78 +char 1 69 +char 1 69 +char 1 83 +char 1 50 +char 1 84 +char 1 79 +char 1 49 +char 1 0 +align 1 +LABELV $879 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 78 +char 1 69 +char 1 69 +char 1 83 +char 1 50 +char 1 0 +align 1 +LABELV $878 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 78 +char 1 69 +char 1 69 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $877 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 52 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 85 +char 1 80 +char 1 0 +align 1 +LABELV $876 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 52 +char 1 95 +char 1 85 +char 1 78 +char 1 71 +char 1 82 +char 1 73 +char 1 80 +char 1 0 +align 1 +LABELV $875 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 85 +char 1 78 +char 1 83 +char 1 73 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $874 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 67 +char 1 75 +char 1 80 +char 1 73 +char 1 84 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 0 +align 1 +LABELV $873 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 95 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $872 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 95 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $871 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 85 +char 1 78 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 52 +char 1 0 +align 1 +LABELV $870 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 52 +char 1 0 +align 1 +LABELV $869 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 85 +char 1 78 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 51 +char 1 0 +align 1 +LABELV $868 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 51 +char 1 0 +align 1 +LABELV $867 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 50 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $866 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 50 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $865 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 85 +char 1 78 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 49 +char 1 0 +align 1 +LABELV $864 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 49 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 0 +align 1 +LABELV $863 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 49 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 0 +align 1 +LABELV $862 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 49 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $861 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 49 +char 1 0 +align 1 +LABELV $860 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 55 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $859 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 55 +char 1 0 +align 1 +LABELV $858 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 54 +char 1 84 +char 1 79 +char 1 53 +char 1 0 +align 1 +LABELV $857 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 54 +char 1 84 +char 1 79 +char 1 52 +char 1 0 +align 1 +LABELV $856 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 53 +char 1 84 +char 1 79 +char 1 54 +char 1 0 +align 1 +LABELV $855 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 53 +char 1 84 +char 1 79 +char 1 52 +char 1 0 +align 1 +LABELV $854 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 52 +char 1 84 +char 1 79 +char 1 54 +char 1 0 +align 1 +LABELV $853 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 52 +char 1 84 +char 1 79 +char 1 53 +char 1 0 +align 1 +LABELV $852 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 51 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 0 +align 1 +LABELV $851 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 51 +char 1 84 +char 1 79 +char 1 50 +char 1 0 +align 1 +LABELV $850 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 51 +char 1 84 +char 1 79 +char 1 49 +char 1 0 +align 1 +LABELV $849 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 50 +char 1 84 +char 1 79 +char 1 83 +char 1 73 +char 1 84 +char 1 52 +char 1 0 +align 1 +LABELV $848 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 84 +char 1 79 +char 1 83 +char 1 73 +char 1 84 +char 1 50 +char 1 0 +align 1 +LABELV $847 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 50 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 0 +align 1 +LABELV $846 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 50 +char 1 84 +char 1 79 +char 1 51 +char 1 0 +align 1 +LABELV $845 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 51 +char 1 0 +align 1 +LABELV $844 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 50 +char 1 0 +align 1 +LABELV $843 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $842 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $841 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 53 +char 1 0 +align 1 +LABELV $840 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 52 +char 1 84 +char 1 79 +char 1 53 +char 1 0 +align 1 +LABELV $839 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 73 +char 1 78 +char 1 74 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 52 +char 1 0 +align 1 +LABELV $838 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 86 +char 1 69 +char 1 82 +char 1 85 +char 1 80 +char 1 49 +char 1 95 +char 1 69 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $837 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 86 +char 1 69 +char 1 82 +char 1 85 +char 1 80 +char 1 49 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $836 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 86 +char 1 69 +char 1 82 +char 1 85 +char 1 80 +char 1 49 +char 1 95 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $835 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 84 +char 1 72 +char 1 82 +char 1 79 +char 1 87 +char 1 50 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $834 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 84 +char 1 72 +char 1 82 +char 1 79 +char 1 87 +char 1 50 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $833 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 84 +char 1 72 +char 1 82 +char 1 79 +char 1 87 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $832 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 84 +char 1 72 +char 1 82 +char 1 79 +char 1 87 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $831 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 82 +char 1 73 +char 1 85 +char 1 77 +char 1 80 +char 1 72 +char 1 65 +char 1 78 +char 1 84 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $830 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 82 +char 1 73 +char 1 85 +char 1 77 +char 1 80 +char 1 72 +char 1 65 +char 1 78 +char 1 84 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 0 +align 1 +LABELV $829 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 82 +char 1 73 +char 1 85 +char 1 77 +char 1 80 +char 1 72 +char 1 65 +char 1 78 +char 1 84 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $828 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 65 +char 1 68 +char 1 73 +char 1 79 +char 1 95 +char 1 79 +char 1 78 +char 1 79 +char 1 70 +char 1 70 +char 1 0 +align 1 +LABELV $827 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 72 +char 1 82 +char 1 69 +char 1 65 +char 1 84 +char 1 69 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $826 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 72 +char 1 82 +char 1 69 +char 1 65 +char 1 84 +char 1 69 +char 1 78 +char 1 49 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $825 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 65 +char 1 82 +char 1 84 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 67 +char 1 79 +char 1 87 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $824 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 65 +char 1 82 +char 1 84 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 67 +char 1 79 +char 1 87 +char 1 69 +char 1 82 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $823 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 65 +char 1 82 +char 1 84 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 67 +char 1 79 +char 1 87 +char 1 69 +char 1 82 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $822 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 65 +char 1 82 +char 1 84 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 72 +char 1 82 +char 1 79 +char 1 87 +char 1 49 +char 1 0 +align 1 +LABELV $821 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 65 +char 1 82 +char 1 84 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 95 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $820 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $819 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $818 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $817 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 69 +char 1 49 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $816 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 50 +char 1 0 +align 1 +LABELV $815 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $814 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $813 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 82 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $812 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 82 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $811 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 82 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $810 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 82 +char 1 49 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $809 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 82 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 50 +char 1 0 +align 1 +LABELV $808 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 82 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $807 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 73 +char 1 83 +char 1 83 +char 1 69 +char 1 82 +char 1 49 +char 1 0 +align 1 +LABELV $806 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 85 +char 1 71 +char 1 71 +char 1 69 +char 1 69 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $805 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 85 +char 1 71 +char 1 71 +char 1 69 +char 1 69 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $804 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 85 +char 1 71 +char 1 71 +char 1 69 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $803 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 85 +char 1 71 +char 1 71 +char 1 69 +char 1 82 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $802 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 85 +char 1 71 +char 1 71 +char 1 69 +char 1 82 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $801 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 85 +char 1 71 +char 1 71 +char 1 69 +char 1 82 +char 1 49 +char 1 0 +align 1 +LABELV $800 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 83 +char 1 67 +char 1 65 +char 1 80 +char 1 69 +char 1 80 +char 1 79 +char 1 68 +char 1 95 +char 1 76 +char 1 69 +char 1 65 +char 1 86 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $799 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 83 +char 1 67 +char 1 65 +char 1 80 +char 1 69 +char 1 80 +char 1 79 +char 1 68 +char 1 95 +char 1 76 +char 1 69 +char 1 65 +char 1 86 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $798 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 65 +char 1 85 +char 1 71 +char 1 72 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $797 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 65 +char 1 85 +char 1 71 +char 1 72 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $796 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 65 +char 1 78 +char 1 68 +char 1 83 +char 1 72 +char 1 65 +char 1 75 +char 1 69 +char 1 69 +char 1 49 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $795 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 65 +char 1 78 +char 1 68 +char 1 83 +char 1 72 +char 1 65 +char 1 75 +char 1 69 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $794 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 65 +char 1 78 +char 1 68 +char 1 83 +char 1 72 +char 1 65 +char 1 75 +char 1 69 +char 1 82 +char 1 49 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $793 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 65 +char 1 78 +char 1 68 +char 1 83 +char 1 72 +char 1 65 +char 1 75 +char 1 69 +char 1 82 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $792 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $791 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 82 +char 1 49 +char 1 0 +align 1 +LABELV $790 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 69 +char 1 49 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $789 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 82 +char 1 49 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $788 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 69 +char 1 49 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 0 +align 1 +LABELV $787 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 82 +char 1 49 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 0 +align 1 +LABELV $786 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $785 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 82 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $784 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 69 +char 1 49 +char 1 72 +char 1 79 +char 1 76 +char 1 68 +char 1 0 +align 1 +LABELV $783 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 84 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 82 +char 1 49 +char 1 72 +char 1 79 +char 1 76 +char 1 68 +char 1 0 +align 1 +LABELV $782 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 85 +char 1 78 +char 1 67 +char 1 72 +char 1 69 +char 1 82 +char 1 49 +char 1 0 +align 1 +LABELV $781 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 69 +char 1 65 +char 1 67 +char 1 72 +char 1 70 +char 1 79 +char 1 82 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 49 +char 1 0 +align 1 +LABELV $780 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 76 +char 1 69 +char 1 78 +char 1 67 +char 1 69 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $779 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 83 +char 1 69 +char 1 76 +char 1 70 +char 1 49 +char 1 69 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $778 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 83 +char 1 69 +char 1 76 +char 1 70 +char 1 49 +char 1 0 +align 1 +LABELV $777 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 77 +char 1 69 +char 1 95 +char 1 79 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $776 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 72 +char 1 85 +char 1 77 +char 1 66 +char 1 73 +char 1 78 +char 1 71 +char 1 49 +char 1 0 +align 1 +LABELV $775 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 70 +char 1 79 +char 1 85 +char 1 78 +char 1 84 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 95 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $774 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 70 +char 1 79 +char 1 85 +char 1 78 +char 1 84 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 95 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $773 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 70 +char 1 79 +char 1 85 +char 1 78 +char 1 84 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 95 +char 1 77 +char 1 73 +char 1 68 +char 1 68 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $772 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 70 +char 1 79 +char 1 85 +char 1 78 +char 1 84 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $771 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 69 +char 1 65 +char 1 78 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 51 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $770 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 69 +char 1 65 +char 1 78 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 51 +char 1 0 +align 1 +LABELV $769 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 69 +char 1 65 +char 1 78 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 51 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $768 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 69 +char 1 65 +char 1 78 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 50 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $767 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 69 +char 1 65 +char 1 78 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 50 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $766 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 88 +char 1 65 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 51 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $765 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 88 +char 1 65 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 51 +char 1 0 +align 1 +LABELV $764 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 88 +char 1 65 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 51 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $763 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 88 +char 1 65 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 50 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $762 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 88 +char 1 65 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $761 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 88 +char 1 65 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 50 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $760 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 88 +char 1 65 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $759 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 88 +char 1 65 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $758 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 69 +char 1 88 +char 1 65 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $757 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 69 +char 1 65 +char 1 67 +char 1 72 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $756 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 69 +char 1 65 +char 1 67 +char 1 72 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $755 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 50 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 76 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $754 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 50 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 76 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $753 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 83 +char 1 72 +char 1 65 +char 1 75 +char 1 69 +char 1 0 +align 1 +LABELV $752 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 78 +char 1 79 +char 1 68 +char 1 0 +align 1 +LABELV $751 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 82 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $750 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 82 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $749 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 76 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $748 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 73 +char 1 84 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 76 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $747 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 83 +char 1 72 +char 1 65 +char 1 75 +char 1 69 +char 1 49 +char 1 95 +char 1 82 +char 1 69 +char 1 69 +char 1 76 +char 1 79 +char 1 0 +align 1 +LABELV $746 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 83 +char 1 72 +char 1 65 +char 1 75 +char 1 69 +char 1 0 +align 1 +LABELV $745 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 78 +char 1 79 +char 1 68 +char 1 0 +align 1 +LABELV $744 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 82 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $743 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 82 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $742 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 76 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $741 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 84 +char 1 73 +char 1 76 +char 1 84 +char 1 76 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $740 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 85 +char 1 83 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $739 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 85 +char 1 83 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $738 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 50 +char 1 51 +char 1 0 +align 1 +LABELV $737 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 50 +char 1 50 +char 1 0 +align 1 +LABELV $736 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 50 +char 1 49 +char 1 0 +align 1 +LABELV $735 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 50 +char 1 48 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $734 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 57 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $733 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 57 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $732 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 56 +char 1 0 +align 1 +LABELV $731 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 55 +char 1 0 +align 1 +LABELV $730 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 54 +char 1 0 +align 1 +LABELV $729 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 53 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $728 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 53 +char 1 0 +align 1 +LABELV $727 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 53 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $726 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 52 +char 1 0 +align 1 +LABELV $725 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 51 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $724 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 51 +char 1 0 +align 1 +LABELV $723 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 51 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $722 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 50 +char 1 0 +align 1 +LABELV $721 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $720 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $719 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $718 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 57 +char 1 0 +align 1 +LABELV $717 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 56 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $716 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 56 +char 1 0 +align 1 +LABELV $715 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 56 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $714 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 55 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $713 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 55 +char 1 0 +align 1 +LABELV $712 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 55 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $711 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 54 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $710 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 54 +char 1 0 +align 1 +LABELV $709 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 54 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $708 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 53 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $707 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 53 +char 1 0 +align 1 +LABELV $706 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 53 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $705 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 52 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $704 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 52 +char 1 0 +align 1 +LABELV $703 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 52 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $702 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 51 +char 1 0 +align 1 +LABELV $701 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $700 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $699 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 67 +char 1 79 +char 1 77 +char 1 77 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $698 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 67 +char 1 79 +char 1 77 +char 1 77 +char 1 49 +char 1 0 +align 1 +LABELV $697 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 67 +char 1 79 +char 1 77 +char 1 77 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $696 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $695 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $694 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 49 +char 1 84 +char 1 65 +char 1 76 +char 1 75 +char 1 67 +char 1 79 +char 1 77 +char 1 77 +char 1 49 +char 1 0 +align 1 +LABELV $693 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 51 +char 1 0 +align 1 +LABELV $692 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $691 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 83 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $690 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 76 +char 1 69 +char 1 82 +char 1 84 +char 1 49 +char 1 0 +align 1 +LABELV $689 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 85 +char 1 65 +char 1 82 +char 1 68 +char 1 95 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $688 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 85 +char 1 65 +char 1 82 +char 1 68 +char 1 95 +char 1 76 +char 1 79 +char 1 79 +char 1 75 +char 1 65 +char 1 82 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $687 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 50 +char 1 72 +char 1 79 +char 1 76 +char 1 68 +char 1 67 +char 1 79 +char 1 77 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $686 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 50 +char 1 72 +char 1 79 +char 1 76 +char 1 68 +char 1 67 +char 1 79 +char 1 77 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $685 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 50 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $684 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $683 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 50 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $682 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $681 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $680 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 79 +char 1 78 +char 1 83 +char 1 79 +char 1 76 +char 1 69 +char 1 49 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $679 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 76 +char 1 79 +char 1 79 +char 1 75 +char 1 49 +char 1 56 +char 1 48 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $678 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 76 +char 1 79 +char 1 79 +char 1 75 +char 1 49 +char 1 56 +char 1 48 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $677 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $676 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $675 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $674 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $673 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 83 +char 1 72 +char 1 73 +char 1 70 +char 1 84 +char 1 87 +char 1 69 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $672 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 83 +char 1 72 +char 1 73 +char 1 70 +char 1 84 +char 1 87 +char 1 69 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 0 +align 1 +LABELV $671 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 83 +char 1 72 +char 1 73 +char 1 70 +char 1 84 +char 1 87 +char 1 69 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 0 +align 1 +LABELV $670 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 56 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 0 +align 1 +LABELV $669 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 55 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 56 +char 1 0 +align 1 +LABELV $668 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 56 +char 1 0 +align 1 +LABELV $667 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 76 +char 1 69 +char 1 68 +char 1 76 +char 1 79 +char 1 79 +char 1 75 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 0 +align 1 +LABELV $666 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 76 +char 1 69 +char 1 68 +char 1 76 +char 1 79 +char 1 79 +char 1 75 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 0 +align 1 +LABELV $665 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 84 +char 1 79 +char 1 65 +char 1 73 +char 1 77 +char 1 0 +align 1 +LABELV $664 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $663 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 84 +char 1 79 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 0 +align 1 +LABELV $662 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 95 +char 1 82 +char 1 69 +char 1 69 +char 1 76 +char 1 79 +char 1 0 +align 1 +LABELV $661 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 95 +char 1 82 +char 1 69 +char 1 69 +char 1 76 +char 1 79 +char 1 0 +align 1 +LABELV $660 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 84 +char 1 79 +char 1 83 +char 1 73 +char 1 84 +char 1 51 +char 1 0 +align 1 +LABELV $659 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 85 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $658 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 85 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $657 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 52 +char 1 84 +char 1 79 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $656 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 84 +char 1 79 +char 1 87 +char 1 65 +char 1 76 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $655 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 52 +char 1 84 +char 1 79 +char 1 50 +char 1 0 +align 1 +LABELV $654 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 50 +char 1 84 +char 1 79 +char 1 52 +char 1 0 +align 1 +LABELV $653 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 50 +char 1 84 +char 1 79 +char 1 49 +char 1 0 +align 1 +LABELV $652 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 84 +char 1 79 +char 1 50 +char 1 0 +align 1 +LABELV $651 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 51 +char 1 84 +char 1 79 +char 1 49 +char 1 0 +align 1 +LABELV $650 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 84 +char 1 79 +char 1 51 +char 1 0 +align 1 +LABELV $649 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 56 +char 1 0 +align 1 +LABELV $648 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 55 +char 1 0 +align 1 +LABELV $647 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 54 +char 1 0 +align 1 +LABELV $646 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $645 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 53 +char 1 0 +align 1 +LABELV $644 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 52 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $643 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 52 +char 1 0 +align 1 +LABELV $642 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 51 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $641 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 51 +char 1 0 +align 1 +LABELV $640 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 50 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $639 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 50 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $638 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 50 +char 1 0 +align 1 +LABELV $637 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $636 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $635 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $634 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 85 +char 1 78 +char 1 71 +char 1 69 +char 1 50 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $633 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 76 +char 1 69 +char 1 65 +char 1 80 +char 1 50 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 95 +char 1 0 +align 1 +LABELV $632 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 83 +char 1 84 +char 1 65 +char 1 66 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 0 +align 1 +LABELV $631 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 83 +char 1 76 +char 1 65 +char 1 83 +char 1 72 +char 1 68 +char 1 79 +char 1 87 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $630 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 95 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 0 +align 1 +LABELV $629 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 50 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 66 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $628 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 83 +char 1 76 +char 1 79 +char 1 87 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 67 +char 1 69 +char 1 0 +align 1 +LABELV $627 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 70 +char 1 65 +char 1 83 +char 1 84 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 67 +char 1 69 +char 1 0 +align 1 +LABELV $626 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 67 +char 1 87 +char 1 67 +char 1 73 +char 1 82 +char 1 67 +char 1 76 +char 1 69 +char 1 76 +char 1 79 +char 1 67 +char 1 75 +char 1 0 +align 1 +LABELV $625 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 87 +char 1 67 +char 1 73 +char 1 82 +char 1 67 +char 1 76 +char 1 69 +char 1 76 +char 1 79 +char 1 67 +char 1 75 +char 1 0 +align 1 +LABELV $624 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 67 +char 1 87 +char 1 67 +char 1 73 +char 1 82 +char 1 67 +char 1 76 +char 1 69 +char 1 66 +char 1 82 +char 1 69 +char 1 65 +char 1 75 +char 1 0 +align 1 +LABELV $623 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 87 +char 1 67 +char 1 73 +char 1 82 +char 1 67 +char 1 76 +char 1 69 +char 1 66 +char 1 82 +char 1 69 +char 1 65 +char 1 75 +char 1 0 +align 1 +LABELV $622 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 67 +char 1 87 +char 1 67 +char 1 73 +char 1 82 +char 1 67 +char 1 76 +char 1 69 +char 1 95 +char 1 65 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $621 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 87 +char 1 67 +char 1 73 +char 1 82 +char 1 67 +char 1 76 +char 1 69 +char 1 95 +char 1 65 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $620 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 67 +char 1 87 +char 1 67 +char 1 73 +char 1 82 +char 1 67 +char 1 76 +char 1 69 +char 1 95 +char 1 82 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $619 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 87 +char 1 67 +char 1 73 +char 1 82 +char 1 67 +char 1 76 +char 1 69 +char 1 95 +char 1 82 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $618 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 70 +char 1 49 +char 1 76 +char 1 79 +char 1 67 +char 1 75 +char 1 0 +align 1 +LABELV $617 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 70 +char 1 49 +char 1 66 +char 1 82 +char 1 69 +char 1 65 +char 1 75 +char 1 0 +align 1 +LABELV $616 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 70 +char 1 49 +char 1 82 +char 1 69 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 0 +align 1 +LABELV $615 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 70 +char 1 50 +char 1 76 +char 1 79 +char 1 67 +char 1 75 +char 1 0 +align 1 +LABELV $614 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 70 +char 1 50 +char 1 66 +char 1 82 +char 1 69 +char 1 65 +char 1 75 +char 1 0 +align 1 +LABELV $613 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 70 +char 1 50 +char 1 82 +char 1 69 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 0 +align 1 +LABELV $612 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $611 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 95 +char 1 0 +align 1 +LABELV $610 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $609 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $608 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $607 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 72 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $606 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 86 +char 1 49 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $605 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 86 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $604 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 86 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $603 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 86 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $602 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 86 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $601 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 86 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $600 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 86 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $599 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 86 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $598 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $597 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 95 +char 1 0 +align 1 +LABELV $596 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $595 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $594 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $593 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 75 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $592 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $591 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $590 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $589 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $588 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $587 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 53 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $586 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 53 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $585 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 53 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $584 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 53 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $583 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 53 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $582 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 53 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $581 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 53 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $580 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 53 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $579 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 53 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $578 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 53 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $577 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 53 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $576 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 53 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $575 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 53 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $574 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 53 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $573 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 53 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $572 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 53 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $571 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 53 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $570 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 53 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $569 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 53 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $568 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 53 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $567 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 53 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $566 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $565 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $564 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $563 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $562 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $561 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $560 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 53 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $559 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $558 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $557 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $556 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $555 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $554 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $553 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $552 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $551 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $550 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $549 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $548 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $547 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $546 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $545 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $544 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $543 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $542 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $541 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $540 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $539 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $538 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $537 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $536 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $535 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $534 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $533 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $532 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $531 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $530 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $529 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $528 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $527 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $526 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $525 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $524 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $523 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $522 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $521 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $520 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $519 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $518 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 53 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $517 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 53 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $516 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 53 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $515 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 53 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $514 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 53 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $513 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 53 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $512 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 53 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $511 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 53 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 95 +char 1 0 +align 1 +LABELV $510 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 52 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $509 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 52 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $508 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 52 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $507 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 52 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $506 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 52 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $505 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 52 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $504 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 52 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $503 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 52 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $502 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 52 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $501 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 52 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $500 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 52 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $499 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 52 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $498 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 52 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $497 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 52 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $496 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 52 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $495 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 52 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $494 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 52 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $493 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 52 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $492 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 52 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $491 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 52 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $490 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 52 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $489 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $488 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $487 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $486 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $485 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $484 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $483 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 52 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $482 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $481 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $480 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $479 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $478 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $477 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $476 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $475 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $474 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $473 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $472 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $471 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $470 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $469 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $468 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $467 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $466 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $465 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $464 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $463 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $462 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $461 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $460 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $459 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $458 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $457 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $456 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $455 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $454 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $453 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $452 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $451 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $450 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $449 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $448 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $447 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $446 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $445 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $444 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $443 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $442 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $441 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 52 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $440 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 52 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $439 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 52 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $438 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 52 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $437 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 52 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $436 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 52 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $435 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 52 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $434 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 52 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 95 +char 1 0 +align 1 +LABELV $433 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 51 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $432 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 51 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $431 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 51 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $430 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 51 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $429 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 51 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $428 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 51 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $427 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 51 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $426 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 51 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $425 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 51 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $424 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 51 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $423 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 51 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $422 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 51 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $421 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 51 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $420 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 51 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $419 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 51 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $418 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 51 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $417 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 51 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $416 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 51 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $415 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 51 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $414 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 51 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $413 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 51 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $412 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $411 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $410 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $409 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $408 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $407 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $406 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 51 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $405 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $404 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $403 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $402 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $401 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $400 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $399 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $398 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $397 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $396 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $395 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $394 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $393 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $392 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $391 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $390 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $389 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $388 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $387 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $386 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $385 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $384 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $383 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $382 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $381 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $380 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $379 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $378 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $377 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $376 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $375 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $374 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $373 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $372 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $371 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $370 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $369 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $368 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $367 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $366 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $365 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $364 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 51 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $363 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 51 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $362 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 51 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $361 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 51 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $360 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 51 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $359 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 51 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $358 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 51 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $357 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 51 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 95 +char 1 0 +align 1 +LABELV $356 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 50 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $355 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 50 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $354 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $353 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 50 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $352 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 50 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $351 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $350 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 50 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $349 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 50 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $348 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $347 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 50 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $346 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 50 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $345 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 50 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $344 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $343 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 50 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $342 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 50 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $341 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 50 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $340 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 50 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $339 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 50 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $338 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $337 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $336 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 50 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $335 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 50 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $334 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 50 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $333 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 50 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $332 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 50 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $331 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 50 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $330 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 50 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $329 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 50 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $328 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $327 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $326 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $325 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $324 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $323 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $322 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $321 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $320 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $319 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $318 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $317 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $316 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $315 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $314 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $313 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $312 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $311 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $310 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $309 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $308 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $307 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $306 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $305 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $304 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $303 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $302 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $301 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $300 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $299 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $298 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $297 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $296 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $295 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $294 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $293 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $292 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $291 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $290 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $289 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $288 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $287 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 50 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $286 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 50 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $285 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 50 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $284 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 50 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $283 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 50 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $282 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 50 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $281 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 50 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $280 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 50 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 95 +char 1 0 +align 1 +LABELV $279 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 49 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $278 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $277 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $276 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $275 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $274 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $273 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $272 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $271 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $270 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $269 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $268 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $267 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $266 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 66 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 95 +char 1 0 +align 1 +LABELV $265 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $264 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $263 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $262 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $261 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $260 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $259 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 49 +char 1 95 +char 1 66 +char 1 95 +char 1 95 +char 1 83 +char 1 49 +char 1 0 +align 1 +LABELV $258 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $257 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $256 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $255 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $254 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $253 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $252 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 83 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $251 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $250 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $249 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $248 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $247 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $246 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $245 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $244 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $243 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $242 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $241 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $240 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $239 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $238 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 95 +char 1 0 +align 1 +LABELV $237 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $236 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $235 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $234 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $233 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $232 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $231 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $230 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $229 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $228 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $227 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $226 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $225 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $224 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $223 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $222 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $221 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $220 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $219 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $218 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $217 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $216 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $215 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $214 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $213 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $212 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $211 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $210 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $209 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 49 +char 1 95 +char 1 84 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $208 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 49 +char 1 95 +char 1 66 +char 1 76 +char 1 95 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $207 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 49 +char 1 95 +char 1 66 +char 1 82 +char 1 95 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $206 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 49 +char 1 95 +char 1 84 +char 1 76 +char 1 95 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $205 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 49 +char 1 95 +char 1 95 +char 1 82 +char 1 95 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $204 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 49 +char 1 95 +char 1 95 +char 1 76 +char 1 95 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $203 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 49 +char 1 95 +char 1 84 +char 1 95 +char 1 95 +char 1 66 +char 1 95 +char 1 0 +align 1 +LABELV $202 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 72 +char 1 69 +char 1 82 +char 1 77 +char 1 65 +char 1 76 +char 1 95 +char 1 84 +char 1 72 +char 1 82 +char 1 79 +char 1 87 +char 1 0 +align 1 +LABELV $201 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 84 +char 1 72 +char 1 69 +char 1 82 +char 1 77 +char 1 65 +char 1 76 +char 1 95 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 0 +align 1 +LABELV $200 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 77 +char 1 69 +char 1 76 +char 1 69 +char 1 69 +char 1 54 +char 1 0 +align 1 +LABELV $199 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 77 +char 1 69 +char 1 76 +char 1 69 +char 1 69 +char 1 53 +char 1 0 +align 1 +LABELV $198 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 77 +char 1 69 +char 1 76 +char 1 69 +char 1 69 +char 1 52 +char 1 0 +align 1 +LABELV $197 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 77 +char 1 69 +char 1 76 +char 1 69 +char 1 69 +char 1 51 +char 1 0 +align 1 +LABELV $196 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 77 +char 1 69 +char 1 76 +char 1 69 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $195 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 77 +char 1 69 +char 1 76 +char 1 69 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $194 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 50 +char 1 0 +align 1 +LABELV $193 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 49 +char 1 0 +align 1 +LABELV $192 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $191 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 57 +char 1 0 +align 1 +LABELV $190 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 56 +char 1 0 +align 1 +LABELV $189 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 55 +char 1 0 +align 1 +LABELV $188 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 54 +char 1 0 +align 1 +LABELV $187 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 53 +char 1 0 +align 1 +LABELV $186 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 52 +char 1 0 +align 1 +LABELV $185 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 51 +char 1 0 +align 1 +LABELV $184 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 50 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 49 +char 1 0 +align 1 +LABELV $183 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $182 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 49 +char 1 0 +align 1 +LABELV $181 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 50 +char 1 48 +char 1 0 +align 1 +LABELV $180 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 57 +char 1 0 +align 1 +LABELV $179 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 56 +char 1 0 +align 1 +LABELV $178 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 55 +char 1 0 +align 1 +LABELV $177 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 54 +char 1 0 +align 1 +LABELV $176 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 53 +char 1 0 +align 1 +LABELV $175 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 52 +char 1 0 +align 1 +LABELV $174 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 51 +char 1 0 +align 1 +LABELV $173 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 50 +char 1 0 +align 1 +LABELV $172 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 49 +char 1 0 +align 1 +LABELV $171 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $170 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 57 +char 1 0 +align 1 +LABELV $169 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 56 +char 1 0 +align 1 +LABELV $168 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 55 +char 1 0 +align 1 +LABELV $167 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 54 +char 1 0 +align 1 +LABELV $166 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 53 +char 1 0 +align 1 +LABELV $165 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 52 +char 1 0 +align 1 +LABELV $164 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 51 +char 1 0 +align 1 +LABELV $163 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 50 +char 1 0 +align 1 +LABELV $162 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 49 +char 1 0 +align 1 +LABELV $161 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 77 +char 1 69 +char 1 77 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 76 +char 1 65 +char 1 82 +char 1 77 +char 1 0 +align 1 +LABELV $160 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 77 +char 1 69 +char 1 77 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 82 +char 1 65 +char 1 82 +char 1 77 +char 1 0 +align 1 +LABELV $159 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 77 +char 1 69 +char 1 77 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 82 +char 1 76 +char 1 69 +char 1 71 +char 1 0 +align 1 +LABELV $158 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 77 +char 1 69 +char 1 77 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 76 +char 1 76 +char 1 69 +char 1 71 +char 1 0 +align 1 +LABELV $157 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 77 +char 1 69 +char 1 77 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 79 +char 1 49 +char 1 0 +align 1 +LABELV $156 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 77 +char 1 69 +char 1 77 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $155 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 95 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $154 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 85 +char 1 77 +char 1 66 +char 1 76 +char 1 69 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 95 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $153 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 89 +char 1 73 +char 1 78 +char 1 71 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 95 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $152 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 50 +char 1 95 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $151 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 49 +char 1 95 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $150 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 70 +char 1 79 +char 1 82 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 50 +char 1 95 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $149 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 70 +char 1 79 +char 1 82 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 49 +char 1 95 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 0 +align 1 +LABELV $148 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 53 +char 1 0 +align 1 +LABELV $147 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 52 +char 1 0 +align 1 +LABELV $146 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 51 +char 1 0 +align 1 +LABELV $145 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $144 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 70 +char 1 76 +char 1 79 +char 1 80 +char 1 49 +char 1 0 +align 1 +LABELV $143 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $142 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 85 +char 1 77 +char 1 66 +char 1 76 +char 1 69 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $141 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 89 +char 1 73 +char 1 78 +char 1 71 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $140 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 50 +char 1 0 +align 1 +LABELV $139 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $138 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 70 +char 1 79 +char 1 82 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 50 +char 1 0 +align 1 +LABELV $137 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 70 +char 1 79 +char 1 82 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $136 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 50 +char 1 53 +char 1 0 +align 1 +LABELV $135 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 50 +char 1 52 +char 1 0 +align 1 +LABELV $134 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 50 +char 1 51 +char 1 0 +align 1 +LABELV $133 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 50 +char 1 50 +char 1 0 +align 1 +LABELV $132 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 50 +char 1 49 +char 1 0 +align 1 +LABELV $131 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 50 +char 1 48 +char 1 0 +align 1 +LABELV $130 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 57 +char 1 0 +align 1 +LABELV $129 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 56 +char 1 0 +align 1 +LABELV $128 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 55 +char 1 0 +align 1 +LABELV $127 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 54 +char 1 0 +align 1 +LABELV $126 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 53 +char 1 0 +align 1 +LABELV $125 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 52 +char 1 0 +align 1 +LABELV $124 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 51 +char 1 0 +align 1 +LABELV $123 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 50 +char 1 0 +align 1 +LABELV $122 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 49 +char 1 0 +align 1 +LABELV $121 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $120 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 57 +char 1 0 +align 1 +LABELV $119 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 56 +char 1 0 +align 1 +LABELV $118 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 55 +char 1 0 +align 1 +LABELV $117 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 54 +char 1 0 +align 1 +LABELV $116 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 53 +char 1 0 +align 1 +LABELV $115 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 52 +char 1 0 +align 1 +LABELV $114 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 51 +char 1 0 +align 1 +LABELV $113 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 50 +char 1 0 +align 1 +LABELV $112 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $111 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 67 +char 1 82 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 69 +char 1 68 +char 1 0 +align 1 +LABELV $110 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 85 +char 1 80 +char 1 0 +align 1 +LABELV $109 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 68 +char 1 78 +char 1 0 +align 1 +LABELV $108 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 89 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 68 +char 1 78 +char 1 0 +align 1 +LABELV $107 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 89 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 85 +char 1 80 +char 1 0 +align 1 +LABELV $106 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 80 +char 1 73 +char 1 78 +char 1 95 +char 1 49 +char 1 56 +char 1 48 +char 1 0 +align 1 +LABELV $105 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 80 +char 1 73 +char 1 78 +char 1 95 +char 1 57 +char 1 48 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $104 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 80 +char 1 73 +char 1 78 +char 1 95 +char 1 57 +char 1 48 +char 1 95 +char 1 82 +char 1 0 +align 1 +LABELV $103 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 76 +char 1 73 +char 1 80 +char 1 0 +align 1 +LABELV $102 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $101 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 76 +char 1 65 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $100 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 73 +char 1 78 +char 1 65 +char 1 73 +char 1 82 +char 1 0 +align 1 +LABELV $99 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 0 +align 1 +LABELV $98 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 83 +char 1 84 +char 1 85 +char 1 77 +char 1 66 +char 1 76 +char 1 69 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 0 +align 1 +LABELV $97 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 76 +char 1 89 +char 1 73 +char 1 78 +char 1 71 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 0 +align 1 +LABELV $96 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 73 +char 1 68 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $95 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 50 +char 1 0 +align 1 +LABELV $94 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $93 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 70 +char 1 79 +char 1 82 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 51 +char 1 0 +align 1 +LABELV $92 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 70 +char 1 79 +char 1 82 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 50 +char 1 0 +align 1 +LABELV $91 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 70 +char 1 79 +char 1 82 +char 1 87 +char 1 65 +char 1 82 +char 1 68 +char 1 49 +char 1 0 +align 1 +LABELV $90 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 50 +char 1 53 +char 1 0 +align 1 +LABELV $89 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 50 +char 1 52 +char 1 0 +align 1 +LABELV $88 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 50 +char 1 51 +char 1 0 +align 1 +LABELV $87 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 50 +char 1 50 +char 1 0 +align 1 +LABELV $86 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 50 +char 1 49 +char 1 0 +align 1 +LABELV $85 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 50 +char 1 48 +char 1 0 +align 1 +LABELV $84 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 57 +char 1 0 +align 1 +LABELV $83 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 56 +char 1 0 +align 1 +LABELV $82 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 55 +char 1 0 +align 1 +LABELV $81 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 54 +char 1 0 +align 1 +LABELV $80 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 53 +char 1 0 +align 1 +LABELV $79 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 52 +char 1 0 +align 1 +LABELV $78 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 51 +char 1 0 +align 1 +LABELV $77 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 50 +char 1 0 +align 1 +LABELV $76 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 49 +char 1 0 +align 1 +LABELV $75 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $74 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 57 +char 1 0 +align 1 +LABELV $73 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 56 +char 1 0 +align 1 +LABELV $72 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 55 +char 1 0 +align 1 +LABELV $71 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 54 +char 1 0 +align 1 +LABELV $70 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 53 +char 1 0 +align 1 +LABELV $69 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 52 +char 1 0 +align 1 +LABELV $68 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 51 +char 1 0 +align 1 +LABELV $67 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 50 +char 1 0 +align 1 +LABELV $66 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 49 +char 1 0 +align 1 +LABELV $65 +char 1 66 +char 1 79 +char 1 84 +char 1 72 +char 1 95 +char 1 49 +char 1 67 +char 1 82 +char 1 85 +char 1 70 +char 1 84 +char 1 70 +char 1 79 +char 1 82 +char 1 71 +char 1 73 +char 1 76 +char 1 0 diff --git a/code/cgame/vm/bg_pmove.asm b/code/cgame/vm/bg_pmove.asm new file mode 100644 index 0000000..c5baafb --- /dev/null +++ b/code/cgame/vm/bg_pmove.asm @@ -0,0 +1,29895 @@ +data +export gPMDoSlowFall +align 4 +LABELV gPMDoSlowFall +byte 4 0 +export pm_stopspeed +align 4 +LABELV pm_stopspeed +byte 4 1120403456 +export pm_duckScale +align 4 +LABELV pm_duckScale +byte 4 1056964608 +export pm_swimScale +align 4 +LABELV pm_swimScale +byte 4 1056964608 +export pm_wadeScale +align 4 +LABELV pm_wadeScale +byte 4 1060320051 +export pm_accelerate +align 4 +LABELV pm_accelerate +byte 4 1092616192 +export pm_airaccelerate +align 4 +LABELV pm_airaccelerate +byte 4 1065353216 +export pm_wateraccelerate +align 4 +LABELV pm_wateraccelerate +byte 4 1082130432 +export pm_flyaccelerate +align 4 +LABELV pm_flyaccelerate +byte 4 1090519040 +export pm_friction +align 4 +LABELV pm_friction +byte 4 1086324736 +export pm_waterfriction +align 4 +LABELV pm_waterfriction +byte 4 1065353216 +export pm_flightfriction +align 4 +LABELV pm_flightfriction +byte 4 1077936128 +export pm_spectatorfriction +align 4 +LABELV pm_spectatorfriction +byte 4 1084227584 +export c_pmove +align 4 +LABELV c_pmove +byte 4 0 +export forceSpeedLevels +align 4 +LABELV forceSpeedLevels +byte 4 1065353216 +byte 4 1067450368 +byte 4 1069547520 +byte 4 1071644672 +export forcePowerNeeded +align 4 +LABELV forcePowerNeeded +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 999 +byte 4 65 +byte 4 10 +byte 4 50 +byte 4 20 +byte 4 20 +byte 4 20 +byte 4 30 +byte 4 1 +byte 4 50 +byte 4 50 +byte 4 50 +byte 4 50 +byte 4 50 +byte 4 20 +byte 4 20 +byte 4 0 +byte 4 2 +byte 4 20 +byte 4 60 +byte 4 10 +byte 4 50 +byte 4 20 +byte 4 20 +byte 4 20 +byte 4 30 +byte 4 1 +byte 4 50 +byte 4 25 +byte 4 25 +byte 4 33 +byte 4 33 +byte 4 20 +byte 4 20 +byte 4 0 +byte 4 1 +byte 4 20 +byte 4 50 +byte 4 10 +byte 4 50 +byte 4 20 +byte 4 20 +byte 4 20 +byte 4 60 +byte 4 1 +byte 4 50 +byte 4 10 +byte 4 10 +byte 4 25 +byte 4 25 +byte 4 20 +byte 4 20 +byte 4 0 +byte 4 0 +byte 4 20 +export forceJumpHeight +align 4 +LABELV forceJumpHeight +byte 4 1107296256 +byte 4 1119879168 +byte 4 1128267776 +byte 4 1136656384 +export forceJumpStrength +align 4 +LABELV forceJumpStrength +byte 4 1130430464 +byte 4 1137836032 +byte 4 1142128640 +byte 4 1146224640 +export PM_GetSaberStance +code +proc PM_GetSaberStance 12 0 +file "../../game/bg_pmove.c" +line 148 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// bg_pmove.c -- both games player movement code +;4:// takes a playerstate and a usercmd as input and returns a modifed playerstate +;5: +;6:#include "q_shared.h" +;7:#include "bg_public.h" +;8:#include "bg_local.h" +;9: +;10:#define MAX_WEAPON_CHARGE_TIME 5000 +;11: +;12:pmove_t *pm; +;13:pml_t pml; +;14: +;15:qboolean gPMDoSlowFall = qfalse; +;16: +;17:// movement parameters +;18:float pm_stopspeed = 100.0f; +;19:float pm_duckScale = 0.50f; +;20:float pm_swimScale = 0.50f; +;21:float pm_wadeScale = 0.70f; +;22: +;23:float pm_accelerate = 10.0f; +;24:float pm_airaccelerate = 1.0f; +;25:float pm_wateraccelerate = 4.0f; +;26:float pm_flyaccelerate = 8.0f; +;27: +;28:float pm_friction = 6.0f; +;29:float pm_waterfriction = 1.0f; +;30:float pm_flightfriction = 3.0f; +;31:float pm_spectatorfriction = 5.0f; +;32: +;33:int c_pmove = 0; +;34: +;35:float forceSpeedLevels[4] = +;36:{ +;37: 1, //rank 0? +;38: 1.25, +;39: 1.5, +;40: 1.75 +;41:}; +;42: +;43:int forcePowerNeeded[NUM_FORCE_POWER_LEVELS][NUM_FORCE_POWERS] = +;44:{ +;45: { //nothing should be usable at rank 0.. +;46: 999,//FP_HEAL,//instant +;47: 999,//FP_LEVITATION,//hold/duration +;48: 999,//FP_SPEED,//duration +;49: 999,//FP_PUSH,//hold/duration +;50: 999,//FP_PULL,//hold/duration +;51: 999,//FP_TELEPATHY,//instant +;52: 999,//FP_GRIP,//hold/duration +;53: 999,//FP_LIGHTNING,//hold/duration +;54: 999,//FP_RAGE,//duration +;55: 999,//FP_PROTECT,//duration +;56: 999,//FP_ABSORB,//duration +;57: 999,//FP_TEAM_HEAL,//instant +;58: 999,//FP_TEAM_FORCE,//instant +;59: 999,//FP_DRAIN,//hold/duration +;60: 999,//FP_SEE,//duration +;61: 999,//FP_SABERATTACK, +;62: 999,//FP_SABERDEFEND, +;63: 999//FP_SABERTHROW, +;64: //NUM_FORCE_POWERS +;65: }, +;66: { +;67: 65,//FP_HEAL,//instant //was 25, but that was way too little +;68: 10,//FP_LEVITATION,//hold/duration +;69: 50,//FP_SPEED,//duration +;70: 20,//FP_PUSH,//hold/duration +;71: 20,//FP_PULL,//hold/duration +;72: 20,//FP_TELEPATHY,//instant +;73: 30,//FP_GRIP,//hold/duration +;74: 1,//FP_LIGHTNING,//hold/duration +;75: 50,//FP_RAGE,//duration +;76: 50,//FP_PROTECT,//duration +;77: 50,//FP_ABSORB,//duration +;78: 50,//FP_TEAM_HEAL,//instant +;79: 50,//FP_TEAM_FORCE,//instant +;80: 20,//FP_DRAIN,//hold/duration +;81: 20,//FP_SEE,//duration +;82: 0,//FP_SABERATTACK, +;83: 2,//FP_SABERDEFEND, +;84: 20//FP_SABERTHROW, +;85: //NUM_FORCE_POWERS +;86: }, +;87: { +;88: 60,//FP_HEAL,//instant +;89: 10,//FP_LEVITATION,//hold/duration +;90: 50,//FP_SPEED,//duration +;91: 20,//FP_PUSH,//hold/duration +;92: 20,//FP_PULL,//hold/duration +;93: 20,//FP_TELEPATHY,//instant +;94: 30,//FP_GRIP,//hold/duration +;95: 1,//FP_LIGHTNING,//hold/duration +;96: 50,//FP_RAGE,//duration +;97: 25,//FP_PROTECT,//duration +;98: 25,//FP_ABSORB,//duration +;99: 33,//FP_TEAM_HEAL,//instant +;100: 33,//FP_TEAM_FORCE,//instant +;101: 20,//FP_DRAIN,//hold/duration +;102: 20,//FP_SEE,//duration +;103: 0,//FP_SABERATTACK, +;104: 1,//FP_SABERDEFEND, +;105: 20//FP_SABERTHROW, +;106: //NUM_FORCE_POWERS +;107: }, +;108: { +;109: 50,//FP_HEAL,//instant //You get 5 points of health.. for 50 force points! +;110: 10,//FP_LEVITATION,//hold/duration +;111: 50,//FP_SPEED,//duration +;112: 20,//FP_PUSH,//hold/duration +;113: 20,//FP_PULL,//hold/duration +;114: 20,//FP_TELEPATHY,//instant +;115: 60,//FP_GRIP,//hold/duration +;116: 1,//FP_LIGHTNING,//hold/duration +;117: 50,//FP_RAGE,//duration +;118: 10,//FP_PROTECT,//duration +;119: 10,//FP_ABSORB,//duration +;120: 25,//FP_TEAM_HEAL,//instant +;121: 25,//FP_TEAM_FORCE,//instant +;122: 20,//FP_DRAIN,//hold/duration +;123: 20,//FP_SEE,//duration +;124: 0,//FP_SABERATTACK, +;125: 0,//FP_SABERDEFEND, +;126: 20//FP_SABERTHROW, +;127: //NUM_FORCE_POWERS +;128: } +;129:}; +;130: +;131:float forceJumpHeight[NUM_FORCE_POWER_LEVELS] = +;132:{ +;133: 32,//normal jump (+stepheight+crouchdiff = 66) +;134: 96,//(+stepheight+crouchdiff = 130) +;135: 192,//(+stepheight+crouchdiff = 226) +;136: 384//(+stepheight+crouchdiff = 418) +;137:}; +;138: +;139:float forceJumpStrength[NUM_FORCE_POWER_LEVELS] = +;140:{ +;141: JUMP_VELOCITY,//normal jump +;142: 420, +;143: 590, +;144: 840 +;145:}; +;146: +;147:int PM_GetSaberStance(void) +;148:{ +line 150 +;149: //cm NOTE: This fixes the dualblade freeze problem. +;150: if (pm->ps->dualBlade) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1364 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $66 +line 151 +;151: { //dual blades +line 152 +;152: return BOTH_STAND1; +CNSTI4 571 +RETI4 +ADDRGP4 $65 +JUMPV +LABELV $66 +line 154 +;153: } +;154: else if ((pm->ps->fd.saberAnimLevel == FORCE_LEVEL_1) && !(pm->ps->dualBlade)) +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $68 +ADDRLP4 0 +INDIRP4 +CNSTI4 1364 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $68 +line 155 +;155: { //fast +line 156 +;156: return BOTH_SABERFAST_STANCE; +CNSTI4 562 +RETI4 +ADDRGP4 $65 +JUMPV +LABELV $68 +line 158 +;157: } +;158: else if ((pm->ps->fd.saberAnimLevel == FORCE_LEVEL_2) && !(pm->ps->dualBlade)) +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $70 +ADDRLP4 4 +INDIRP4 +CNSTI4 1364 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $70 +line 159 +;159: { //medium +line 160 +;160: return BOTH_STAND2; +CNSTI4 573 +RETI4 +ADDRGP4 $65 +JUMPV +LABELV $70 +line 162 +;161: } +;162: else if ((pm->ps->fd.saberAnimLevel == FORCE_LEVEL_3) && !(pm->ps->dualBlade)) +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $72 +ADDRLP4 8 +INDIRP4 +CNSTI4 1364 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $72 +line 163 +;163: { //strong +line 164 +;164: return BOTH_SABERSLOW_STANCE; +CNSTI4 563 +RETI4 +ADDRGP4 $65 +JUMPV +LABELV $72 +line 168 +;165: } +;166: +;167: //fast +;168: return BOTH_SABERFAST_STANCE; +CNSTI4 562 +RETI4 +LABELV $65 +endproc PM_GetSaberStance 12 0 +export PM_DoSlowFall +proc PM_DoSlowFall 4 0 +line 172 +;169:} +;170: +;171:qboolean PM_DoSlowFall(void) +;172:{ +line 173 +;173: if ( ( (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT ) && pm->ps->legsTimer > 500 ) +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 915 +EQI4 $77 +ADDRLP4 0 +INDIRI4 +CNSTI4 918 +NEI4 $75 +LABELV $77 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 500 +LEI4 $75 +line 174 +;174: { +line 175 +;175: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $74 +JUMPV +LABELV $75 +line 178 +;176: } +;177: +;178: return qfalse; +CNSTI4 0 +RETI4 +LABELV $74 +endproc PM_DoSlowFall 4 0 +export PM_AddEvent +proc PM_AddEvent 0 12 +line 187 +;179:} +;180: +;181:/* +;182:=============== +;183:PM_AddEvent +;184: +;185:=============== +;186:*/ +;187:void PM_AddEvent( int newEvent ) { +line 188 +;188: BG_AddPredictableEventToPlayerstate( newEvent, 0, pm->ps ); +ADDRFP4 0 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +ADDRGP4 BG_AddPredictableEventToPlayerstate +CALLV +pop +line 189 +;189:} +LABELV $78 +endproc PM_AddEvent 0 12 +export PM_AddEventWithParm +proc PM_AddEventWithParm 0 12 +line 192 +;190: +;191:void PM_AddEventWithParm( int newEvent, int parm ) +;192:{ +line 193 +;193: BG_AddPredictableEventToPlayerstate( newEvent, parm, pm->ps ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +ADDRGP4 BG_AddPredictableEventToPlayerstate +CALLV +pop +line 194 +;194:} +LABELV $79 +endproc PM_AddEventWithParm 0 12 +export PM_AddTouchEnt +proc PM_AddTouchEnt 12 0 +line 201 +;195: +;196:/* +;197:=============== +;198:PM_AddTouchEnt +;199:=============== +;200:*/ +;201:void PM_AddTouchEnt( int entityNum ) { +line 204 +;202: int i; +;203: +;204: if ( entityNum == ENTITYNUM_WORLD ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 1022 +NEI4 $81 +line 205 +;205: return; +ADDRGP4 $80 +JUMPV +LABELV $81 +line 207 +;206: } +;207: if ( pm->numtouch == MAXTOUCH ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 32 +NEI4 $83 +line 208 +;208: return; +ADDRGP4 $80 +JUMPV +LABELV $83 +line 212 +;209: } +;210: +;211: // see if it is already added +;212: for ( i = 0 ; i < pm->numtouch ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $88 +JUMPV +LABELV $85 +line 213 +;213: if ( pm->touchents[ i ] == entityNum ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 pm +INDIRP4 +CNSTI4 56 +ADDP4 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +NEI4 $89 +line 214 +;214: return; +ADDRGP4 $80 +JUMPV +LABELV $89 +line 216 +;215: } +;216: } +LABELV $86 +line 212 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $88 +ADDRLP4 0 +INDIRI4 +ADDRGP4 pm +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +LTI4 $85 +line 219 +;217: +;218: // add it +;219: pm->touchents[pm->numtouch] = entityNum; +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 220 +;220: pm->numtouch++; +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +CNSTI4 52 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 221 +;221:} +LABELV $80 +endproc PM_AddTouchEnt 12 0 +export PM_ClipVelocity +proc PM_ClipVelocity 32 0 +line 231 +;222: +;223: +;224:/* +;225:================== +;226:PM_ClipVelocity +;227: +;228:Slide off of the impacting surface +;229:================== +;230:*/ +;231:void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, float overbounce ) { +line 236 +;232: float backoff; +;233: float change; +;234: int i; +;235: +;236: backoff = DotProduct (in, normal); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +CNSTI4 4 +ASGNI4 +ADDRLP4 24 +CNSTI4 8 +ASGNI4 +ADDRLP4 8 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 238 +;237: +;238: if ( backoff < 0 ) { +ADDRLP4 8 +INDIRF4 +CNSTF4 0 +GEF4 $92 +line 239 +;239: backoff *= overbounce; +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRFP4 12 +INDIRF4 +MULF4 +ASGNF4 +line 240 +;240: } else { +ADDRGP4 $93 +JUMPV +LABELV $92 +line 241 +;241: backoff /= overbounce; +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRFP4 12 +INDIRF4 +DIVF4 +ASGNF4 +line 242 +;242: } +LABELV $93 +line 244 +;243: +;244: for ( i=0 ; i<3 ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $94 +line 245 +;245: change = normal[i]*backoff; +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +MULF4 +ASGNF4 +line 246 +;246: out[i] = in[i] - change; +ADDRLP4 28 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +ADDRLP4 28 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +SUBF4 +ASGNF4 +line 247 +;247: } +LABELV $95 +line 244 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $94 +line 248 +;248:} +LABELV $91 +endproc PM_ClipVelocity 32 0 +proc PM_Friction 52 4 +line 258 +;249: +;250: +;251:/* +;252:================== +;253:PM_Friction +;254: +;255:Handles both ground friction and water friction +;256:================== +;257:*/ +;258:static void PM_Friction( void ) { +line 264 +;259: vec3_t vec; +;260: float *vel; +;261: float speed, newspeed, control; +;262: float drop; +;263: +;264: vel = pm->ps->velocity; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +line 266 +;265: +;266: VectorCopy( vel, vec ); +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 267 +;267: if ( pml.walking ) { +ADDRGP4 pml+44 +INDIRI4 +CNSTI4 0 +EQI4 $99 +line 268 +;268: vec[2] = 0; // ignore slope movement +ADDRLP4 16+8 +CNSTF4 0 +ASGNF4 +line 269 +;269: } +LABELV $99 +line 271 +;270: +;271: speed = VectorLength(vec); +ADDRLP4 16 +ARGP4 +ADDRLP4 32 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 8 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 272 +;272: if (speed < 1) { +ADDRLP4 8 +INDIRF4 +CNSTF4 1065353216 +GEF4 $103 +line 273 +;273: vel[0] = 0; +ADDRLP4 0 +INDIRP4 +CNSTF4 0 +ASGNF4 +line 274 +;274: vel[1] = 0; // allow sinking underwater +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 0 +ASGNF4 +line 276 +;275: // FIXME: still have z friction underwater? +;276: return; +ADDRGP4 $98 +JUMPV +LABELV $103 +line 279 +;277: } +;278: +;279: drop = 0; +ADDRLP4 12 +CNSTF4 0 +ASGNF4 +line 282 +;280: +;281: // apply ground friction +;282: if ( pm->waterlevel <= 1 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 1 +GTI4 $105 +line 283 +;283: if ( pml.walking && !(pml.groundTrace.surfaceFlags & SURF_SLICK) ) { +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRGP4 pml+44 +INDIRI4 +ADDRLP4 36 +INDIRI4 +EQI4 $107 +ADDRGP4 pml+52+44 +INDIRI4 +CNSTI4 16384 +BANDI4 +ADDRLP4 36 +INDIRI4 +NEI4 $107 +line 285 +;284: // if getting knocked back, no friction +;285: if ( ! (pm->ps->pm_flags & PMF_TIME_KNOCKBACK) ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 64 +BANDI4 +CNSTI4 0 +NEI4 $112 +line 286 +;286: control = speed < pm_stopspeed ? pm_stopspeed : speed; +ADDRLP4 8 +INDIRF4 +ADDRGP4 pm_stopspeed +INDIRF4 +GEF4 $115 +ADDRLP4 40 +ADDRGP4 pm_stopspeed +INDIRF4 +ASGNF4 +ADDRGP4 $116 +JUMPV +LABELV $115 +ADDRLP4 40 +ADDRLP4 8 +INDIRF4 +ASGNF4 +LABELV $116 +ADDRLP4 28 +ADDRLP4 40 +INDIRF4 +ASGNF4 +line 287 +;287: drop += control*pm_friction*pml.frametime; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +ADDRLP4 28 +INDIRF4 +ADDRGP4 pm_friction +INDIRF4 +MULF4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 288 +;288: } +LABELV $112 +line 289 +;289: } +LABELV $107 +line 290 +;290: } +LABELV $105 +line 293 +;291: +;292: // apply water friction even if just wading +;293: if ( pm->waterlevel ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $118 +line 294 +;294: drop += speed*pm_waterfriction*pm->waterlevel*pml.frametime; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDRGP4 pm_waterfriction +INDIRF4 +MULF4 +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CVIF4 4 +MULF4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 295 +;295: } +LABELV $118 +line 297 +;296: +;297: if ( pm->ps->pm_type == PM_SPECTATOR || pm->ps->pm_type == PM_FLOAT ) +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 3 +EQI4 $123 +ADDRLP4 36 +INDIRI4 +CNSTI4 1 +NEI4 $121 +LABELV $123 +line 298 +;298: { +line 299 +;299: if (pm->ps->pm_type == PM_FLOAT) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $124 +line 300 +;300: { //almost no friction while floating +line 301 +;301: drop += speed*0.1*pml.frametime; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +CNSTF4 1036831949 +ADDRLP4 8 +INDIRF4 +MULF4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 302 +;302: } +ADDRGP4 $125 +JUMPV +LABELV $124 +line 304 +;303: else +;304: { +line 305 +;305: drop += speed*pm_spectatorfriction*pml.frametime; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDRGP4 pm_spectatorfriction +INDIRF4 +MULF4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 306 +;306: } +LABELV $125 +line 307 +;307: } +LABELV $121 +line 310 +;308: +;309: // scale the velocity +;310: newspeed = speed - drop; +ADDRLP4 4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 12 +INDIRF4 +SUBF4 +ASGNF4 +line 311 +;311: if (newspeed < 0) { +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +GEF4 $128 +line 312 +;312: newspeed = 0; +ADDRLP4 4 +CNSTF4 0 +ASGNF4 +line 313 +;313: } +LABELV $128 +line 314 +;314: newspeed /= speed; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +DIVF4 +ASGNF4 +line 316 +;315: +;316: vel[0] = vel[0] * newspeed; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 317 +;317: vel[1] = vel[1] * newspeed; +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 318 +;318: vel[2] = vel[2] * newspeed; +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 319 +;319:} +LABELV $98 +endproc PM_Friction 52 4 +proc PM_Accelerate 32 0 +line 329 +;320: +;321: +;322:/* +;323:============== +;324:PM_Accelerate +;325: +;326:Handles user intended acceleration +;327:============== +;328:*/ +;329:static void PM_Accelerate( vec3_t wishdir, float wishspeed, float accel ) { +line 335 +;330:#if 1 +;331: // q2 style +;332: int i; +;333: float addspeed, accelspeed, currentspeed; +;334: +;335: currentspeed = DotProduct (pm->ps->velocity, wishdir); +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 16 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 336 +;336: addspeed = wishspeed - currentspeed; +ADDRLP4 8 +ADDRFP4 4 +INDIRF4 +ADDRLP4 12 +INDIRF4 +SUBF4 +ASGNF4 +line 337 +;337: if (addspeed <= 0) { +ADDRLP4 8 +INDIRF4 +CNSTF4 0 +GTF4 $131 +line 338 +;338: return; +ADDRGP4 $130 +JUMPV +LABELV $131 +line 340 +;339: } +;340: accelspeed = accel*pml.frametime*wishspeed; +ADDRLP4 4 +ADDRFP4 8 +INDIRF4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +ADDRFP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 341 +;341: if (accelspeed > addspeed) { +ADDRLP4 4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +LEF4 $134 +line 342 +;342: accelspeed = addspeed; +ADDRLP4 4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 343 +;343: } +LABELV $134 +line 345 +;344: +;345: for (i=0 ; i<3 ; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $136 +line 346 +;346: pm->ps->velocity[i] += accelspeed*wishdir[i]; +ADDRLP4 24 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 24 +INDIRI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 24 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 347 +;347: } +LABELV $137 +line 345 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $136 +line 366 +;348:#else +;349: // proper way (avoids strafe jump maxspeed bug), but feels bad +;350: vec3_t wishVelocity; +;351: vec3_t pushDir; +;352: float pushLen; +;353: float canPush; +;354: +;355: VectorScale( wishdir, wishspeed, wishVelocity ); +;356: VectorSubtract( wishVelocity, pm->ps->velocity, pushDir ); +;357: pushLen = VectorNormalize( pushDir ); +;358: +;359: canPush = accel*pml.frametime*wishspeed; +;360: if (canPush > pushLen) { +;361: canPush = pushLen; +;362: } +;363: +;364: VectorMA( pm->ps->velocity, canPush, pushDir, pm->ps->velocity ); +;365:#endif +;366:} +LABELV $130 +endproc PM_Accelerate 32 0 +proc PM_CmdScale 48 4 +line 379 +;367: +;368: +;369: +;370:/* +;371:============ +;372:PM_CmdScale +;373: +;374:Returns the scale factor to apply to cmd movements +;375:This allows the clients to use axial -127 to 127 values for all directions +;376:without getting a sqrt(2) distortion in speed. +;377:============ +;378:*/ +;379:static float PM_CmdScale( usercmd_t *cmd ) { +line 383 +;380: int max; +;381: float total; +;382: float scale; +;383: int umove = 0; //cmd->upmove; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 386 +;384: //don't factor upmove into scaling speed +;385: +;386: max = abs( cmd->forwardmove ); +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +ARGI4 +ADDRLP4 16 +ADDRGP4 abs +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 387 +;387: if ( abs( cmd->rightmove ) > max ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 25 +ADDP4 +INDIRI1 +CVII4 1 +ARGI4 +ADDRLP4 20 +ADDRGP4 abs +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ADDRLP4 0 +INDIRI4 +LEI4 $141 +line 388 +;388: max = abs( cmd->rightmove ); +ADDRFP4 0 +INDIRP4 +CNSTI4 25 +ADDP4 +INDIRI1 +CVII4 1 +ARGI4 +ADDRLP4 24 +ADDRGP4 abs +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 389 +;389: } +LABELV $141 +line 390 +;390: if ( abs( umove ) > max ) { +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 abs +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ADDRLP4 0 +INDIRI4 +LEI4 $143 +line 391 +;391: max = abs( umove ); +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 abs +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 392 +;392: } +LABELV $143 +line 393 +;393: if ( !max ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $145 +line 394 +;394: return 0; +CNSTF4 0 +RETF4 +ADDRGP4 $140 +JUMPV +LABELV $145 +line 397 +;395: } +;396: +;397: total = sqrt( cmd->forwardmove * cmd->forwardmove +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +ADDRLP4 28 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 36 +ADDRLP4 28 +INDIRP4 +CNSTI4 25 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ADDRLP4 32 +INDIRI4 +MULI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 36 +INDIRI4 +MULI4 +ADDI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 44 +ADDRGP4 sqrt +CALLF4 +ASGNF4 +ADDRLP4 8 +ADDRLP4 44 +INDIRF4 +ASGNF4 +line 399 +;398: + cmd->rightmove * cmd->rightmove + umove * umove ); +;399: scale = (float)pm->ps->speed * max / ( 127.0 * total ); +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +MULF4 +CNSTF4 1123942400 +ADDRLP4 8 +INDIRF4 +MULF4 +DIVF4 +ASGNF4 +line 401 +;400: +;401: return scale; +ADDRLP4 12 +INDIRF4 +RETF4 +LABELV $140 +endproc PM_CmdScale 48 4 +proc PM_SetMovementDir 72 0 +line 413 +;402:} +;403: +;404: +;405:/* +;406:================ +;407:PM_SetMovementDir +;408: +;409:Determine the rotation of the legs reletive +;410:to the facing dir +;411:================ +;412:*/ +;413:static void PM_SetMovementDir( void ) { +line 414 +;414: if ( pm->cmd.forwardmove || pm->cmd.rightmove ) { +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 4 +INDIRI4 +NEI4 $150 +ADDRLP4 0 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 4 +INDIRI4 +EQI4 $148 +LABELV $150 +line 415 +;415: if ( pm->cmd.rightmove == 0 && pm->cmd.forwardmove > 0 ) { +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 12 +INDIRI4 +NEI4 $151 +ADDRLP4 8 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 12 +INDIRI4 +LEI4 $151 +line 416 +;416: pm->ps->movementDir = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 0 +ASGNI4 +line 417 +;417: } else if ( pm->cmd.rightmove < 0 && pm->cmd.forwardmove > 0 ) { +ADDRGP4 $149 +JUMPV +LABELV $151 +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRLP4 16 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 20 +INDIRI4 +GEI4 $153 +ADDRLP4 16 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 20 +INDIRI4 +LEI4 $153 +line 418 +;418: pm->ps->movementDir = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 1 +ASGNI4 +line 419 +;419: } else if ( pm->cmd.rightmove < 0 && pm->cmd.forwardmove == 0 ) { +ADDRGP4 $149 +JUMPV +LABELV $153 +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +ADDRLP4 24 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 28 +INDIRI4 +GEI4 $155 +ADDRLP4 24 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 28 +INDIRI4 +NEI4 $155 +line 420 +;420: pm->ps->movementDir = 2; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 2 +ASGNI4 +line 421 +;421: } else if ( pm->cmd.rightmove < 0 && pm->cmd.forwardmove < 0 ) { +ADDRGP4 $149 +JUMPV +LABELV $155 +ADDRLP4 32 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 36 +INDIRI4 +GEI4 $157 +ADDRLP4 32 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 36 +INDIRI4 +GEI4 $157 +line 422 +;422: pm->ps->movementDir = 3; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 3 +ASGNI4 +line 423 +;423: } else if ( pm->cmd.rightmove == 0 && pm->cmd.forwardmove < 0 ) { +ADDRGP4 $149 +JUMPV +LABELV $157 +ADDRLP4 40 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 44 +INDIRI4 +NEI4 $159 +ADDRLP4 40 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 44 +INDIRI4 +GEI4 $159 +line 424 +;424: pm->ps->movementDir = 4; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 4 +ASGNI4 +line 425 +;425: } else if ( pm->cmd.rightmove > 0 && pm->cmd.forwardmove < 0 ) { +ADDRGP4 $149 +JUMPV +LABELV $159 +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 52 +CNSTI4 0 +ASGNI4 +ADDRLP4 48 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 52 +INDIRI4 +LEI4 $161 +ADDRLP4 48 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 52 +INDIRI4 +GEI4 $161 +line 426 +;426: pm->ps->movementDir = 5; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 5 +ASGNI4 +line 427 +;427: } else if ( pm->cmd.rightmove > 0 && pm->cmd.forwardmove == 0 ) { +ADDRGP4 $149 +JUMPV +LABELV $161 +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 60 +CNSTI4 0 +ASGNI4 +ADDRLP4 56 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 60 +INDIRI4 +LEI4 $163 +ADDRLP4 56 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 60 +INDIRI4 +NEI4 $163 +line 428 +;428: pm->ps->movementDir = 6; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 6 +ASGNI4 +line 429 +;429: } else if ( pm->cmd.rightmove > 0 && pm->cmd.forwardmove > 0 ) { +ADDRGP4 $149 +JUMPV +LABELV $163 +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 68 +CNSTI4 0 +ASGNI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 68 +INDIRI4 +LEI4 $149 +ADDRLP4 64 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 68 +INDIRI4 +LEI4 $149 +line 430 +;430: pm->ps->movementDir = 7; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 7 +ASGNI4 +line 431 +;431: } +line 432 +;432: } else { +ADDRGP4 $149 +JUMPV +LABELV $148 +line 436 +;433: // if they aren't actively going directly sideways, +;434: // change the animation to the diagonal so they +;435: // don't stop too crooked +;436: if ( pm->ps->movementDir == 2 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $167 +line 437 +;437: pm->ps->movementDir = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 1 +ASGNI4 +line 438 +;438: } else if ( pm->ps->movementDir == 6 ) { +ADDRGP4 $168 +JUMPV +LABELV $167 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $169 +line 439 +;439: pm->ps->movementDir = 7; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 7 +ASGNI4 +line 440 +;440: } +LABELV $169 +LABELV $168 +line 441 +;441: } +LABELV $149 +line 442 +;442:} +LABELV $147 +endproc PM_SetMovementDir 72 0 +export PM_ForceJumpingUp +proc PM_ForceJumpingUp 40 16 +line 447 +;443: +;444:#define METROID_JUMP 1 +;445: +;446:qboolean PM_ForceJumpingUp(void) +;447:{ +line 448 +;448: if ( !(pm->ps->fd.forcePowersActive&(1<ps->fd.forceJumpCharge ) +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +NEI4 $172 +ADDRLP4 0 +INDIRP4 +CNSTI4 1096 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $172 +line 449 +;449: {//already jumped and let go +line 450 +;450: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $171 +JUMPV +LABELV $172 +line 453 +;451: } +;452: +;453: if ( BG_InSpecialJump( pm->ps->legsAnim ) ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $174 +line 454 +;454: { +line 455 +;455: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $171 +JUMPV +LABELV $174 +line 458 +;456: } +;457: +;458: if (BG_SaberInSpecial(pm->ps->saberMove)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 BG_SaberInSpecial +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $176 +line 459 +;459: { +line 460 +;460: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $171 +JUMPV +LABELV $176 +line 463 +;461: } +;462: +;463: if (BG_SaberInSpecialAttack(pm->ps->legsAnim)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $178 +line 464 +;464: { +line 465 +;465: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $171 +JUMPV +LABELV $178 +line 468 +;466: } +;467: +;468: if (BG_HasYsalamiri(pm->gametype, pm->ps)) +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 BG_HasYsalamiri +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $180 +line 469 +;469: { +line 470 +;470: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $171 +JUMPV +LABELV $180 +line 473 +;471: } +;472: +;473: if (!BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_LEVITATION)) +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 28 +ADDRGP4 BG_CanUseFPNow +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +NEI4 $182 +line 474 +;474: { +line 475 +;475: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $171 +JUMPV +LABELV $182 +line 478 +;476: } +;477: +;478: if ( pm->ps->groundEntityNum == ENTITYNUM_NONE && //in air +ADDRLP4 32 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +NEI4 $184 +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +ADDRLP4 36 +INDIRI4 +EQI4 $184 +ADDRLP4 32 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +ADDRLP4 36 +INDIRI4 +LEI4 $184 +ADDRLP4 32 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 0 +LEF4 $184 +line 482 +;479: (pm->ps->pm_flags & PMF_JUMP_HELD) && //jumped +;480: pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_0 && //force-jump capable +;481: pm->ps->velocity[2] > 0 )//going up +;482: { +line 483 +;483: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $171 +JUMPV +LABELV $184 +line 485 +;484: } +;485: return qfalse; +CNSTI4 0 +RETI4 +LABELV $171 +endproc PM_ForceJumpingUp 40 16 +proc PM_JumpForDir 8 16 +line 489 +;486:} +;487: +;488:static void PM_JumpForDir( void ) +;489:{ +line 490 +;490: int anim = BOTH_JUMP1; +ADDRLP4 0 +CNSTI4 856 +ASGNI4 +line 491 +;491: if ( pm->cmd.forwardmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $187 +line 492 +;492: { +line 493 +;493: anim = BOTH_JUMP1; +ADDRLP4 0 +CNSTI4 856 +ASGNI4 +line 494 +;494: pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 -9 +BANDI4 +ASGNI4 +line 495 +;495: } +ADDRGP4 $188 +JUMPV +LABELV $187 +line 496 +;496: else if ( pm->cmd.forwardmove < 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $189 +line 497 +;497: { +line 498 +;498: anim = BOTH_JUMPBACK1; +ADDRLP4 0 +CNSTI4 860 +ASGNI4 +line 499 +;499: pm->ps->pm_flags |= PMF_BACKWARDS_JUMP; +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 8 +BORI4 +ASGNI4 +line 500 +;500: } +ADDRGP4 $190 +JUMPV +LABELV $189 +line 501 +;501: else if ( pm->cmd.rightmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $191 +line 502 +;502: { +line 503 +;503: anim = BOTH_JUMPRIGHT1; +ADDRLP4 0 +CNSTI4 866 +ASGNI4 +line 504 +;504: pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 -9 +BANDI4 +ASGNI4 +line 505 +;505: } +ADDRGP4 $192 +JUMPV +LABELV $191 +line 506 +;506: else if ( pm->cmd.rightmove < 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $193 +line 507 +;507: { +line 508 +;508: anim = BOTH_JUMPLEFT1; +ADDRLP4 0 +CNSTI4 863 +ASGNI4 +line 509 +;509: pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 -9 +BANDI4 +ASGNI4 +line 510 +;510: } +ADDRGP4 $194 +JUMPV +LABELV $193 +line 512 +;511: else +;512: { +line 513 +;513: anim = BOTH_JUMP1; +ADDRLP4 0 +CNSTI4 856 +ASGNI4 +line 514 +;514: pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 -9 +BANDI4 +ASGNI4 +line 515 +;515: } +LABELV $194 +LABELV $192 +LABELV $190 +LABELV $188 +line 516 +;516: if(!BG_InDeathAnim(pm->ps->legsAnim)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $195 +line 517 +;517: { +line 518 +;518: PM_SetAnim(SETANIM_LEGS,anim,SETANIM_FLAG_OVERRIDE, 100); +CNSTI4 2 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 519 +;519: } +LABELV $195 +line 520 +;520:} +LABELV $186 +endproc PM_JumpForDir 8 16 +export PM_SetPMViewAngle +proc PM_SetPMViewAngle 12 0 +line 523 +;521: +;522:void PM_SetPMViewAngle(playerState_t *ps, vec3_t angle, usercmd_t *ucmd) +;523:{ +line 526 +;524: int i; +;525: +;526: for (i=0 ; i<3 ; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $198 +line 527 +;527: { // set the delta angle +line 530 +;528: int cmdAngle; +;529: +;530: cmdAngle = ANGLE2SHORT(angle[i]); +ADDRLP4 4 +CNSTF4 1199570944 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +MULF4 +CNSTF4 1135869952 +DIVF4 +CVFI4 4 +CNSTI4 65535 +BANDI4 +ASGNI4 +line 531 +;531: ps->delta_angles[i] = cmdAngle - ucmd->angles[i]; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDP4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 532 +;532: } +LABELV $199 +line 526 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $198 +line 533 +;533: VectorCopy (angle, ps->viewangles); +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 534 +;534:} +LABELV $197 +endproc PM_SetPMViewAngle 12 0 +export PM_AdjustAngleForWallRun +proc PM_AdjustAngleForWallRun 1216 28 +line 537 +;535: +;536:qboolean PM_AdjustAngleForWallRun( playerState_t *ps, usercmd_t *ucmd, qboolean doMove ) +;537:{ +line 538 +;538: if (( (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT ) && ps->legsTimer > 500 ) +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 915 +EQI4 $205 +ADDRLP4 0 +INDIRI4 +CNSTI4 918 +NEI4 $203 +LABELV $205 +ADDRFP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 500 +LEI4 $203 +line 539 +;539: {//wall-running and not at end of anim +line 545 +;540: //stick to wall, if there is one +;541: vec3_t rt, traceTo, mins, maxs, fwdAngles; +;542: trace_t trace; +;543: float dist, yawAdjust; +;544: +;545: VectorSet(mins, -15, -15, 0); +ADDRLP4 1152 +CNSTF4 3245342720 +ASGNF4 +ADDRLP4 44 +ADDRLP4 1152 +INDIRF4 +ASGNF4 +ADDRLP4 44+4 +ADDRLP4 1152 +INDIRF4 +ASGNF4 +ADDRLP4 44+8 +CNSTF4 0 +ASGNF4 +line 546 +;546: VectorSet(maxs, 15, 15, 24); +ADDRLP4 1156 +CNSTF4 1097859072 +ASGNF4 +ADDRLP4 56 +ADDRLP4 1156 +INDIRF4 +ASGNF4 +ADDRLP4 56+4 +ADDRLP4 1156 +INDIRF4 +ASGNF4 +ADDRLP4 56+8 +CNSTF4 1103101952 +ASGNF4 +line 547 +;547: VectorSet(fwdAngles, 0, pm->ps->viewangles[YAW], 0); +ADDRLP4 20 +CNSTF4 0 +ASGNF4 +ADDRLP4 20+4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 20+8 +CNSTF4 0 +ASGNF4 +line 549 +;548: +;549: AngleVectors( fwdAngles, NULL, rt, NULL ); +ADDRLP4 20 +ARGP4 +ADDRLP4 1160 +CNSTP4 0 +ASGNP4 +ADDRLP4 1160 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 1160 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 550 +;550: if ( (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT ) +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 915 +NEI4 $212 +line 551 +;551: { +line 552 +;552: dist = 128; +ADDRLP4 16 +CNSTF4 1124073472 +ASGNF4 +line 553 +;553: yawAdjust = -90; +ADDRLP4 1148 +CNSTF4 3266576384 +ASGNF4 +line 554 +;554: } +ADDRGP4 $213 +JUMPV +LABELV $212 +line 556 +;555: else +;556: { +line 557 +;557: dist = -128; +ADDRLP4 16 +CNSTF4 3271557120 +ASGNF4 +line 558 +;558: yawAdjust = 90; +ADDRLP4 1148 +CNSTF4 1119092736 +ASGNF4 +line 559 +;559: } +LABELV $213 +line 560 +;560: VectorMA( ps->origin, dist, rt, traceTo ); +ADDRLP4 1164 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1168 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 32 +ADDRLP4 1164 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 1168 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 32+4 +ADDRLP4 1164 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 4+4 +INDIRF4 +ADDRLP4 1168 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 32+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 4+8 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 562 +;561: +;562: pm->trace( &trace, ps->origin, mins, maxs, traceTo, ps->clientNum, MASK_PLAYERSOLID ); +ADDRLP4 68 +ARGP4 +ADDRLP4 1172 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1172 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 44 +ARGP4 +ADDRLP4 56 +ARGP4 +ADDRLP4 32 +ARGP4 +ADDRLP4 1172 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 273 +ARGI4 +ADDRGP4 pm +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 564 +;563: +;564: if ( trace.fraction < 1.0f ) +ADDRLP4 68+8 +INDIRF4 +CNSTF4 1065353216 +GEF4 $218 +line 565 +;565: {//still a wall there +line 566 +;566: if ( (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT ) +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 915 +NEI4 $221 +line 567 +;567: { +line 568 +;568: ucmd->rightmove = 127; +ADDRFP4 4 +INDIRP4 +CNSTI4 25 +ADDP4 +CNSTI1 127 +ASGNI1 +line 569 +;569: } +ADDRGP4 $222 +JUMPV +LABELV $221 +line 571 +;570: else +;571: { +line 572 +;572: ucmd->rightmove = -127; +ADDRFP4 4 +INDIRP4 +CNSTI4 25 +ADDP4 +CNSTI1 -127 +ASGNI1 +line 573 +;573: } +LABELV $222 +line 574 +;574: if ( ucmd->upmove < 0 ) +ADDRFP4 4 +INDIRP4 +CNSTI4 26 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $223 +line 575 +;575: { +line 576 +;576: ucmd->upmove = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 26 +ADDP4 +CNSTI1 0 +ASGNI1 +line 577 +;577: } +LABELV $223 +line 579 +;578: //make me face perpendicular to the wall +;579: ps->viewangles[YAW] = vectoyaw( trace.plane.normal )+yawAdjust; +ADDRLP4 68+24 +ARGP4 +ADDRLP4 1176 +ADDRGP4 vectoyaw +CALLF4 +ASGNF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +ADDRLP4 1176 +INDIRF4 +ADDRLP4 1148 +INDIRF4 +ADDF4 +ASGNF4 +line 581 +;580: +;581: PM_SetPMViewAngle(ps, ps->viewangles, ucmd); +ADDRLP4 1180 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1180 +INDIRP4 +ARGP4 +ADDRLP4 1180 +INDIRP4 +CNSTI4 156 +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 PM_SetPMViewAngle +CALLV +pop +line 583 +;582: +;583: ucmd->angles[YAW] = ANGLE2SHORT( ps->viewangles[YAW] ) - ps->delta_angles[YAW]; +ADDRLP4 1184 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 1199570944 +ADDRLP4 1184 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRF4 +MULF4 +CNSTF4 1135869952 +DIVF4 +CVFI4 4 +CNSTI4 65535 +BANDI4 +ADDRLP4 1184 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 584 +;584: if ( doMove ) +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $226 +line 585 +;585: { +line 588 +;586: //push me forward +;587: vec3_t fwd; +;588: float zVel = ps->velocity[2]; +ADDRLP4 1188 +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ASGNF4 +line 589 +;589: if ( ps->legsTimer > 500 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 500 +LEI4 $228 +line 590 +;590: {//not at end of anim yet +line 591 +;591: float speed = 175; +ADDRLP4 1204 +CNSTF4 1127153664 +ASGNF4 +line 593 +;592: +;593: fwdAngles[YAW] = ps->viewangles[YAW]; +ADDRLP4 20+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRF4 +ASGNF4 +line 594 +;594: AngleVectors( fwdAngles, fwd, NULL, NULL ); +ADDRLP4 20 +ARGP4 +ADDRLP4 1192 +ARGP4 +ADDRLP4 1208 +CNSTP4 0 +ASGNP4 +ADDRLP4 1208 +INDIRP4 +ARGP4 +ADDRLP4 1208 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 596 +;595: +;596: if ( ucmd->forwardmove < 0 ) +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $231 +line 597 +;597: {//slower +line 598 +;598: speed = 100; +ADDRLP4 1204 +CNSTF4 1120403456 +ASGNF4 +line 599 +;599: } +ADDRGP4 $232 +JUMPV +LABELV $231 +line 600 +;600: else if ( ucmd->forwardmove > 0 ) +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $233 +line 601 +;601: { +line 602 +;602: speed = 250;//running speed +ADDRLP4 1204 +CNSTF4 1132068864 +ASGNF4 +line 603 +;603: } +LABELV $233 +LABELV $232 +line 604 +;604: VectorScale( fwd, speed, ps->velocity ); +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 1192 +INDIRF4 +ADDRLP4 1204 +INDIRF4 +MULF4 +ASGNF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 1192+4 +INDIRF4 +ADDRLP4 1204 +INDIRF4 +MULF4 +ASGNF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 1192+8 +INDIRF4 +ADDRLP4 1204 +INDIRF4 +MULF4 +ASGNF4 +line 605 +;605: } +LABELV $228 +line 606 +;606: ps->velocity[2] = zVel;//preserve z velocity +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 1188 +INDIRF4 +ASGNF4 +line 608 +;607: //pull me toward the wall, too +;608: VectorMA( ps->velocity, dist, rt, ps->velocity ); +ADDRLP4 1204 +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1204 +INDIRP4 +ADDRLP4 1204 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1208 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 1208 +INDIRP4 +ADDRLP4 1208 +INDIRP4 +INDIRF4 +ADDRLP4 4+4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1212 +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 1212 +INDIRP4 +ADDRLP4 1212 +INDIRP4 +INDIRF4 +ADDRLP4 4+8 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 609 +;609: } +LABELV $226 +line 610 +;610: ucmd->forwardmove = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTI1 0 +ASGNI1 +line 611 +;611: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $202 +JUMPV +LABELV $218 +line 613 +;612: } +;613: else if ( doMove ) +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $239 +line 614 +;614: {//stop it +line 615 +;615: if ( (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT ) +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 915 +NEI4 $241 +line 616 +;616: { +line 617 +;617: PM_SetAnim(SETANIM_BOTH, BOTH_WALL_RUN_RIGHT_STOP, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0); +ADDRLP4 1176 +CNSTI4 3 +ASGNI4 +ADDRLP4 1176 +INDIRI4 +ARGI4 +CNSTI4 917 +ARGI4 +ADDRLP4 1176 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 618 +;618: } +ADDRGP4 $242 +JUMPV +LABELV $241 +line 619 +;619: else if ( (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT ) +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 918 +NEI4 $243 +line 620 +;620: { +line 621 +;621: PM_SetAnim(SETANIM_BOTH, BOTH_WALL_RUN_LEFT_STOP, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0); +ADDRLP4 1176 +CNSTI4 3 +ASGNI4 +ADDRLP4 1176 +INDIRI4 +ARGI4 +CNSTI4 920 +ARGI4 +ADDRLP4 1176 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 622 +;622: } +LABELV $243 +LABELV $242 +line 623 +;623: } +LABELV $239 +line 624 +;624: } +LABELV $203 +line 626 +;625: +;626: return qfalse; +CNSTI4 0 +RETI4 +LABELV $202 +endproc PM_AdjustAngleForWallRun 1216 28 +export PM_SetForceJumpZStart +proc PM_SetForceJumpZStart 4 0 +line 631 +;627:} +;628: +;629://Set the height for when a force jump was started. If it's 0, nuge it up (slight hack to prevent holding jump over slopes) +;630:void PM_SetForceJumpZStart(float value) +;631:{ +line 632 +;632: pm->ps->fd.forceJumpZStart = value; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1092 +ADDP4 +ADDRFP4 0 +INDIRF4 +ASGNF4 +line 633 +;633: if (!pm->ps->fd.forceJumpZStart) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1092 +ADDP4 +INDIRF4 +CNSTF4 0 +NEF4 $246 +line 634 +;634: { +line 635 +;635: pm->ps->fd.forceJumpZStart -= 0.1; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1092 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1036831949 +SUBF4 +ASGNF4 +line 636 +;636: } +LABELV $246 +line 637 +;637:} +LABELV $245 +endproc PM_SetForceJumpZStart 4 0 +proc PM_CheckJump 1288 28 +line 645 +;638: +;639:/* +;640:============= +;641:PM_CheckJump +;642:============= +;643:*/ +;644:static qboolean PM_CheckJump( void ) +;645:{ +line 646 +;646: if (pm->ps->usingATST) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $249 +line 647 +;647: { +line 648 +;648: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $248 +JUMPV +LABELV $249 +line 651 +;649: } +;650: +;651: if (pm->ps->forceHandExtend == HANDEXTEND_KNOCKDOWN) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $251 +line 652 +;652: { +line 653 +;653: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $248 +JUMPV +LABELV $251 +line 657 +;654: } +;655: +;656: //Don't allow jump until all buttons are up +;657: if ( pm->ps->pm_flags & PMF_RESPAWNED ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $253 +line 658 +;658: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $248 +JUMPV +LABELV $253 +line 661 +;659: } +;660: +;661: if ( PM_InKnockDown( pm->ps ) || BG_InRoll( pm->ps, pm->ps->legsAnim ) ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PM_InKnockDown +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $257 +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $255 +LABELV $257 +line 662 +;662: {//in knockdown +line 663 +;663: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $248 +JUMPV +LABELV $255 +line 666 +;664: } +;665: +;666: if (pm->ps->groundEntityNum != ENTITYNUM_NONE || pm->ps->origin[2] < pm->ps->fd.forceJumpZStart) +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +NEI4 $260 +ADDRLP4 12 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 1092 +ADDP4 +INDIRF4 +GEF4 $258 +LABELV $260 +line 667 +;667: { +line 668 +;668: pm->ps->fd.forcePowersActive &= ~(1<ps->fd.forcePowersActive & (1 << FP_LEVITATION)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $261 +line 672 +;672: { //Force jump is already active.. continue draining power appropriately until we land. +line 673 +;673: if (pm->ps->fd.forcePowerDebounce[FP_LEVITATION] < pm->cmd.serverTime) +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +INDIRP4 +CNSTI4 776 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +GEI4 $263 +line 674 +;674: { +line 675 +;675: BG_ForcePowerDrain( pm->ps, FP_LEVITATION, 5 ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 BG_ForcePowerDrain +CALLV +pop +line 676 +;676: if (pm->ps->fd.forcePowerLevel[FP_LEVITATION] >= FORCE_LEVEL_2) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +CNSTI4 2 +LTI4 $265 +line 677 +;677: { +line 678 +;678: pm->ps->fd.forcePowerDebounce[FP_LEVITATION] = pm->cmd.serverTime + 300; +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +INDIRP4 +CNSTI4 776 +ADDP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 300 +ADDI4 +ASGNI4 +line 679 +;679: } +ADDRGP4 $266 +JUMPV +LABELV $265 +line 681 +;680: else +;681: { +line 682 +;682: pm->ps->fd.forcePowerDebounce[FP_LEVITATION] = pm->cmd.serverTime + 200; +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +INDIRP4 +CNSTI4 776 +ADDP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 200 +ADDI4 +ASGNI4 +line 683 +;683: } +LABELV $266 +line 684 +;684: } +LABELV $263 +line 685 +;685: } +LABELV $261 +line 687 +;686: +;687: if (pm->ps->forceJumpFlip) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1244 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $267 +line 688 +;688: { //Forced jump anim +line 689 +;689: int anim = BOTH_FORCEINAIR1; +ADDRLP4 16 +CNSTI4 870 +ASGNI4 +line 690 +;690: int parts = SETANIM_BOTH; +ADDRLP4 20 +CNSTI4 3 +ASGNI4 +line 692 +;691: +;692: if ( pm->cmd.forwardmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $269 +line 693 +;693: { +line 694 +;694: anim = BOTH_FLIP_F; +ADDRLP4 16 +CNSTI4 881 +ASGNI4 +line 695 +;695: } +ADDRGP4 $270 +JUMPV +LABELV $269 +line 696 +;696: else if ( pm->cmd.forwardmove < 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $271 +line 697 +;697: { +line 698 +;698: anim = BOTH_FLIP_B; +ADDRLP4 16 +CNSTI4 882 +ASGNI4 +line 699 +;699: } +ADDRGP4 $272 +JUMPV +LABELV $271 +line 700 +;700: else if ( pm->cmd.rightmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $273 +line 701 +;701: { +line 702 +;702: anim = BOTH_FLIP_R; +ADDRLP4 16 +CNSTI4 884 +ASGNI4 +line 703 +;703: } +ADDRGP4 $274 +JUMPV +LABELV $273 +line 704 +;704: else if ( pm->cmd.rightmove < 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $275 +line 705 +;705: { +line 706 +;706: anim = BOTH_FLIP_L; +ADDRLP4 16 +CNSTI4 883 +ASGNI4 +line 707 +;707: } +LABELV $275 +LABELV $274 +LABELV $272 +LABELV $270 +line 708 +;708: if ( pm->ps->weaponTime ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $277 +line 709 +;709: {//FIXME: really only care if we're in a saber attack anim... +line 710 +;710: parts = SETANIM_LEGS; +ADDRLP4 20 +CNSTI4 2 +ASGNI4 +line 711 +;711: } +LABELV $277 +line 713 +;712: +;713: PM_SetAnim( parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150 ); +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 150 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 714 +;714: pm->ps->forceJumpFlip = qfalse; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1244 +ADDP4 +CNSTI4 0 +ASGNI4 +line 715 +;715: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $248 +JUMPV +LABELV $267 +line 718 +;716: } +;717:#if METROID_JUMP +;718: if ( pm->waterlevel < 2 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 2 +GEI4 $279 +line 719 +;719: { +line 720 +;720: if ( pm->ps->gravity > 0 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $281 +line 721 +;721: {//can't do this in zero-G +line 722 +;722: if ( PM_ForceJumpingUp() ) +ADDRLP4 16 +ADDRGP4 PM_ForceJumpingUp +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $283 +line 723 +;723: {//holding jump in air +line 724 +;724: float curHeight = pm->ps->origin[2] - pm->ps->fd.forceJumpZStart; +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 24 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 1092 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 726 +;725: //check for max force jump level and cap off & cut z vel +;726: if ( ( curHeight<=forceJumpHeight[0] ||//still below minimum jump height +ADDRLP4 20 +INDIRF4 +ADDRGP4 forceJumpHeight +INDIRF4 +LEF4 $287 +ADDRLP4 28 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $285 +ADDRLP4 28 +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 10 +LTI4 $285 +LABELV $287 +ADDRLP4 32 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRF4 +ADDRLP4 32 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forceJumpHeight +ADDP4 +INDIRF4 +GEF4 $285 +ADDRLP4 32 +INDIRP4 +CNSTI4 1092 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $285 +line 730 +;727: (pm->ps->fd.forcePower&&pm->cmd.upmove>=10) ) &&////still have force power available and still trying to jump up +;728: curHeight < forceJumpHeight[pm->ps->fd.forcePowerLevel[FP_LEVITATION]] && +;729: pm->ps->fd.forceJumpZStart)//still below maximum jump height +;730: {//can still go up +line 731 +;731: if ( curHeight > forceJumpHeight[0] ) +ADDRLP4 20 +INDIRF4 +ADDRGP4 forceJumpHeight +INDIRF4 +LEF4 $288 +line 732 +;732: {//passed normal jump height *2? +line 733 +;733: if ( !(pm->ps->fd.forcePowersActive&(1<ps->fd.forcePowersActive |= (1<ps->fd.forceJumpSound = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1100 +ADDP4 +CNSTI4 1 +ASGNI4 +line 739 +;738: //play flip +;739: if ((pm->cmd.forwardmove || pm->cmd.rightmove) && //pushing in a dir +ADDRLP4 40 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 44 +INDIRI4 +NEI4 $294 +ADDRLP4 40 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 44 +INDIRI4 +EQI4 $292 +LABELV $294 +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 881 +EQI4 $292 +ADDRLP4 48 +INDIRI4 +CNSTI4 882 +EQI4 $292 +ADDRLP4 48 +INDIRI4 +CNSTI4 884 +EQI4 $292 +ADDRLP4 48 +INDIRI4 +CNSTI4 883 +EQI4 $292 +line 744 +;740: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_FLIP_F &&//not already flipping +;741: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_FLIP_B && +;742: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_FLIP_R && +;743: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_FLIP_L ) +;744: { +line 745 +;745: int anim = BOTH_FORCEINAIR1; +ADDRLP4 52 +CNSTI4 870 +ASGNI4 +line 746 +;746: int parts = SETANIM_BOTH; +ADDRLP4 56 +CNSTI4 3 +ASGNI4 +line 748 +;747: +;748: if ( pm->cmd.forwardmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $295 +line 749 +;749: { +line 750 +;750: anim = BOTH_FLIP_F; +ADDRLP4 52 +CNSTI4 881 +ASGNI4 +line 751 +;751: } +ADDRGP4 $296 +JUMPV +LABELV $295 +line 752 +;752: else if ( pm->cmd.forwardmove < 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $297 +line 753 +;753: { +line 754 +;754: anim = BOTH_FLIP_B; +ADDRLP4 52 +CNSTI4 882 +ASGNI4 +line 755 +;755: } +ADDRGP4 $298 +JUMPV +LABELV $297 +line 756 +;756: else if ( pm->cmd.rightmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $299 +line 757 +;757: { +line 758 +;758: anim = BOTH_FLIP_R; +ADDRLP4 52 +CNSTI4 884 +ASGNI4 +line 759 +;759: } +ADDRGP4 $300 +JUMPV +LABELV $299 +line 760 +;760: else if ( pm->cmd.rightmove < 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $301 +line 761 +;761: { +line 762 +;762: anim = BOTH_FLIP_L; +ADDRLP4 52 +CNSTI4 883 +ASGNI4 +line 763 +;763: } +LABELV $301 +LABELV $300 +LABELV $298 +LABELV $296 +line 764 +;764: if ( pm->ps->weaponTime ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $303 +line 765 +;765: { +line 766 +;766: parts = SETANIM_LEGS; +ADDRLP4 56 +CNSTI4 2 +ASGNI4 +line 767 +;767: } +LABELV $303 +line 769 +;768: +;769: PM_SetAnim( parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150 ); +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRLP4 52 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 150 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 770 +;770: } +ADDRGP4 $291 +JUMPV +LABELV $292 +line 771 +;771: else if ( pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_1 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +CNSTI4 1 +LEI4 $291 +line 772 +;772: { +line 774 +;773: vec3_t facingFwd, facingRight, facingAngles; +;774: int anim = -1; +ADDRLP4 52 +CNSTI4 -1 +ASGNI4 +line 777 +;775: float dotR, dotF; +;776: +;777: VectorSet(facingAngles, 0, pm->ps->viewangles[YAW], 0); +ADDRLP4 80 +CNSTF4 0 +ASGNF4 +ADDRLP4 80+4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 80+8 +CNSTF4 0 +ASGNF4 +line 779 +;778: +;779: AngleVectors( facingAngles, facingFwd, facingRight, NULL ); +ADDRLP4 80 +ARGP4 +ADDRLP4 56 +ARGP4 +ADDRLP4 68 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 780 +;780: dotR = DotProduct( facingRight, pm->ps->velocity ); +ADDRLP4 100 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 92 +ADDRLP4 68 +INDIRF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 68+4 +INDIRF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 68+8 +INDIRF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 781 +;781: dotF = DotProduct( facingFwd, pm->ps->velocity ); +ADDRLP4 104 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 96 +ADDRLP4 56 +INDIRF4 +ADDRLP4 104 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 56+4 +INDIRF4 +ADDRLP4 104 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 56+8 +INDIRF4 +ADDRLP4 104 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 783 +;782: +;783: if ( fabs(dotR) > fabs(dotF) * 1.5 ) +ADDRLP4 92 +INDIRF4 +ARGF4 +ADDRLP4 108 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 96 +INDIRF4 +ARGF4 +ADDRLP4 112 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 108 +INDIRF4 +CNSTF4 1069547520 +ADDRLP4 112 +INDIRF4 +MULF4 +LEF4 $313 +line 784 +;784: { +line 785 +;785: if ( dotR > 150 ) +ADDRLP4 92 +INDIRF4 +CNSTF4 1125515264 +LEF4 $315 +line 786 +;786: { +line 787 +;787: anim = BOTH_FORCEJUMPRIGHT1; +ADDRLP4 52 +CNSTI4 878 +ASGNI4 +line 788 +;788: } +ADDRGP4 $314 +JUMPV +LABELV $315 +line 789 +;789: else if ( dotR < -150 ) +ADDRLP4 92 +INDIRF4 +CNSTF4 3272998912 +GEF4 $314 +line 790 +;790: { +line 791 +;791: anim = BOTH_FORCEJUMPLEFT1; +ADDRLP4 52 +CNSTI4 875 +ASGNI4 +line 792 +;792: } +line 793 +;793: } +ADDRGP4 $314 +JUMPV +LABELV $313 +line 795 +;794: else +;795: { +line 796 +;796: if ( dotF > 150 ) +ADDRLP4 96 +INDIRF4 +CNSTF4 1125515264 +LEF4 $319 +line 797 +;797: { +line 798 +;798: anim = BOTH_FORCEJUMP1; +ADDRLP4 52 +CNSTI4 869 +ASGNI4 +line 799 +;799: } +ADDRGP4 $320 +JUMPV +LABELV $319 +line 800 +;800: else if ( dotF < -150 ) +ADDRLP4 96 +INDIRF4 +CNSTF4 3272998912 +GEF4 $321 +line 801 +;801: { +line 802 +;802: anim = BOTH_FORCEJUMPBACK1; +ADDRLP4 52 +CNSTI4 872 +ASGNI4 +line 803 +;803: } +LABELV $321 +LABELV $320 +line 804 +;804: } +LABELV $314 +line 805 +;805: if ( anim != -1 ) +ADDRLP4 52 +INDIRI4 +CNSTI4 -1 +EQI4 $291 +line 806 +;806: { +line 807 +;807: int parts = SETANIM_BOTH; +ADDRLP4 116 +CNSTI4 3 +ASGNI4 +line 808 +;808: if ( pm->ps->weaponTime ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $325 +line 809 +;809: {//FIXME: really only care if we're in a saber attack anim... +line 810 +;810: parts = SETANIM_LEGS; +ADDRLP4 116 +CNSTI4 2 +ASGNI4 +line 811 +;811: } +LABELV $325 +line 813 +;812: +;813: PM_SetAnim( parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150 ); +ADDRLP4 116 +INDIRI4 +ARGI4 +ADDRLP4 52 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 150 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 814 +;814: } +line 815 +;815: } +line 816 +;816: } +ADDRGP4 $291 +JUMPV +LABELV $290 +line 818 +;817: else +;818: { //jump is already active (the anim has started) +line 819 +;819: if ( pm->ps->legsTimer < 1 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 1 +GEI4 $327 +line 820 +;820: {//not in the middle of a legsAnim +line 821 +;821: int anim = (pm->ps->legsAnim&~ANIM_TOGGLEBIT); +ADDRLP4 40 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 822 +;822: int newAnim = -1; +ADDRLP4 36 +CNSTI4 -1 +ASGNI4 +line 823 +;823: switch ( anim ) +ADDRLP4 44 +ADDRLP4 40 +INDIRI4 +ASGNI4 +ADDRLP4 48 +CNSTI4 869 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 48 +INDIRI4 +EQI4 $331 +ADDRLP4 44 +INDIRI4 +CNSTI4 872 +EQI4 $332 +ADDRLP4 44 +INDIRI4 +ADDRLP4 48 +INDIRI4 +LTI4 $329 +LABELV $335 +ADDRLP4 52 +ADDRLP4 40 +INDIRI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 875 +EQI4 $333 +ADDRLP4 52 +INDIRI4 +CNSTI4 878 +EQI4 $334 +ADDRGP4 $329 +JUMPV +line 824 +;824: { +LABELV $331 +line 826 +;825: case BOTH_FORCEJUMP1: +;826: newAnim = BOTH_FORCELAND1;//BOTH_FORCEINAIR1; +ADDRLP4 36 +CNSTI4 871 +ASGNI4 +line 827 +;827: break; +ADDRGP4 $330 +JUMPV +LABELV $332 +line 829 +;828: case BOTH_FORCEJUMPBACK1: +;829: newAnim = BOTH_FORCELANDBACK1;//BOTH_FORCEINAIRBACK1; +ADDRLP4 36 +CNSTI4 874 +ASGNI4 +line 830 +;830: break; +ADDRGP4 $330 +JUMPV +LABELV $333 +line 832 +;831: case BOTH_FORCEJUMPLEFT1: +;832: newAnim = BOTH_FORCELANDLEFT1;//BOTH_FORCEINAIRLEFT1; +ADDRLP4 36 +CNSTI4 877 +ASGNI4 +line 833 +;833: break; +ADDRGP4 $330 +JUMPV +LABELV $334 +line 835 +;834: case BOTH_FORCEJUMPRIGHT1: +;835: newAnim = BOTH_FORCELANDRIGHT1;//BOTH_FORCEINAIRRIGHT1; +ADDRLP4 36 +CNSTI4 880 +ASGNI4 +line 836 +;836: break; +LABELV $329 +LABELV $330 +line 838 +;837: } +;838: if ( newAnim != -1 ) +ADDRLP4 36 +INDIRI4 +CNSTI4 -1 +EQI4 $336 +line 839 +;839: { +line 840 +;840: int parts = SETANIM_BOTH; +ADDRLP4 56 +CNSTI4 3 +ASGNI4 +line 841 +;841: if ( pm->ps->weaponTime ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $338 +line 842 +;842: { +line 843 +;843: parts = SETANIM_LEGS; +ADDRLP4 56 +CNSTI4 2 +ASGNI4 +line 844 +;844: } +LABELV $338 +line 846 +;845: +;846: PM_SetAnim( parts, newAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150 ); +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRLP4 36 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 150 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 847 +;847: } +LABELV $336 +line 848 +;848: } +LABELV $327 +line 849 +;849: } +LABELV $291 +line 850 +;850: } +LABELV $288 +line 853 +;851: +;852: //need to scale this down, start with height velocity (based on max force jump height) and scale down to regular jump vel +;853: pm->ps->velocity[2] = (forceJumpHeight[pm->ps->fd.forcePowerLevel[FP_LEVITATION]]-curHeight)/forceJumpHeight[pm->ps->fd.forcePowerLevel[FP_LEVITATION]]*forceJumpStrength[pm->ps->fd.forcePowerLevel[FP_LEVITATION]];//JUMP_VELOCITY; +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 36 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 44 +ADDRLP4 40 +INDIRI4 +ADDRGP4 forceJumpHeight +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 44 +INDIRF4 +ADDRLP4 20 +INDIRF4 +SUBF4 +ADDRLP4 44 +INDIRF4 +DIVF4 +ADDRLP4 40 +INDIRI4 +ADDRGP4 forceJumpStrength +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 854 +;854: pm->ps->velocity[2] /= 10; +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRF4 +CNSTF4 1092616192 +DIVF4 +ASGNF4 +line 855 +;855: pm->ps->velocity[2] += JUMP_VELOCITY; +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +CNSTF4 1130430464 +ADDF4 +ASGNF4 +line 856 +;856: pm->ps->pm_flags |= PMF_JUMP_HELD; +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 857 +;857: } +ADDRGP4 $286 +JUMPV +LABELV $285 +line 858 +;858: else if ( curHeight > forceJumpHeight[0] && curHeight < forceJumpHeight[pm->ps->fd.forcePowerLevel[FP_LEVITATION]] - forceJumpHeight[0] ) +ADDRLP4 36 +ADDRLP4 20 +INDIRF4 +ASGNF4 +ADDRLP4 40 +ADDRGP4 forceJumpHeight +ASGNP4 +ADDRLP4 44 +ADDRLP4 40 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 36 +INDIRF4 +ADDRLP4 44 +INDIRF4 +LEF4 $340 +ADDRLP4 36 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 40 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 44 +INDIRF4 +SUBF4 +GEF4 $340 +line 859 +;859: {//still have some headroom, don't totally stop it +line 860 +;860: if ( pm->ps->velocity[2] > JUMP_VELOCITY ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1130430464 +LEF4 $341 +line 861 +;861: { +line 862 +;862: pm->ps->velocity[2] = JUMP_VELOCITY; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1130430464 +ASGNF4 +line 863 +;863: } +line 864 +;864: } +ADDRGP4 $341 +JUMPV +LABELV $340 +line 866 +;865: else +;866: { +line 870 +;867: //pm->ps->velocity[2] = 0; +;868: //rww - changed for the sake of balance in multiplayer +;869: +;870: if ( pm->ps->velocity[2] > JUMP_VELOCITY ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1130430464 +LEF4 $344 +line 871 +;871: { +line 872 +;872: pm->ps->velocity[2] = JUMP_VELOCITY; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1130430464 +ASGNF4 +line 873 +;873: } +LABELV $344 +line 874 +;874: } +LABELV $341 +LABELV $286 +line 875 +;875: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 876 +;876: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $248 +JUMPV +LABELV $283 +line 878 +;877: } +;878: } +LABELV $281 +line 879 +;879: } +LABELV $279 +line 884 +;880: +;881:#endif +;882: +;883: //Not jumping +;884: if ( pm->cmd.upmove < 10 && pm->ps->groundEntityNum != ENTITYNUM_NONE) { +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 10 +GEI4 $346 +ADDRLP4 16 +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +EQI4 $346 +line 885 +;885: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $248 +JUMPV +LABELV $346 +line 889 +;886: } +;887: +;888: // must wait for jump to be released +;889: if ( pm->ps->pm_flags & PMF_JUMP_HELD ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $348 +line 890 +;890: { +line 892 +;891: // clear upmove so cmdscale doesn't lower running speed +;892: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 893 +;893: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $248 +JUMPV +LABELV $348 +line 896 +;894: } +;895: +;896: if ( pm->ps->gravity <= 0 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $350 +line 897 +;897: {//in low grav, you push in the dir you're facing as long as there is something behind you to shove off of +line 901 +;898: vec3_t forward, back; +;899: trace_t trace; +;900: +;901: AngleVectors( pm->ps->viewangles, forward, NULL, NULL ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 156 +ADDP4 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRLP4 1124 +CNSTP4 0 +ASGNP4 +ADDRLP4 1124 +INDIRP4 +ARGP4 +ADDRLP4 1124 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 902 +;902: VectorMA( pm->ps->origin, -8, forward, back ); +ADDRLP4 1128 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1132 +CNSTF4 3238002688 +ASGNF4 +ADDRLP4 32 +ADDRLP4 1128 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1132 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 32+4 +ADDRLP4 1128 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1132 +INDIRF4 +ADDRLP4 20+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 32+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 3238002688 +ADDRLP4 20+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 903 +;903: pm->trace( &trace, pm->ps->origin, pm->mins, pm->maxs, back, pm->ps->clientNum, pm->tracemask ); +ADDRLP4 44 +ARGP4 +ADDRLP4 1136 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1140 +ADDRLP4 1136 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1140 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 1136 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 1136 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 32 +ARGP4 +ADDRLP4 1140 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1136 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1136 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 905 +;904: +;905: if ( trace.fraction <= 1.0f ) +ADDRLP4 44+8 +INDIRF4 +CNSTF4 1065353216 +GTF4 $356 +line 906 +;906: { +line 907 +;907: VectorMA( pm->ps->velocity, JUMP_VELOCITY*2, forward, pm->ps->velocity ); +ADDRLP4 1144 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1144 +INDIRP4 +ADDRLP4 1144 +INDIRP4 +INDIRF4 +CNSTF4 1138819072 +ADDRLP4 20 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1148 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 1148 +INDIRP4 +ADDRLP4 1148 +INDIRP4 +INDIRF4 +CNSTF4 1138819072 +ADDRLP4 20+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1152 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 1152 +INDIRP4 +ADDRLP4 1152 +INDIRP4 +INDIRF4 +CNSTF4 1138819072 +ADDRLP4 20+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 908 +;908: PM_SetAnim(SETANIM_LEGS,BOTH_FORCEJUMP1,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART, 150); +CNSTI4 2 +ARGI4 +CNSTI4 869 +ARGI4 +CNSTI4 7 +ARGI4 +CNSTI4 150 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 909 +;909: }//else no surf close enough to push off of +LABELV $356 +line 910 +;910: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 911 +;911: } +ADDRGP4 $351 +JUMPV +LABELV $350 +line 912 +;912: else if ( pm->cmd.upmove > 0 && pm->waterlevel < 2 && +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 24 +INDIRI4 +LEI4 $361 +ADDRLP4 28 +CNSTI4 2 +ASGNI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +GEI4 $361 +ADDRLP4 32 +ADDRLP4 20 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +LEI4 $361 +ADDRLP4 32 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +BANDI4 +ADDRLP4 24 +INDIRI4 +NEI4 $361 +ADDRLP4 32 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +NEI4 $361 +ADDRLP4 20 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 BG_HasYsalamiri +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +NEI4 $361 +ADDRLP4 40 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 44 +ADDRGP4 BG_CanUseFPNow +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +EQI4 $361 +line 918 +;913: pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_0 && +;914: !(pm->ps->pm_flags&PMF_JUMP_HELD) && +;915: pm->ps->weapon == WP_SABER && +;916: !BG_HasYsalamiri(pm->gametype, pm->ps) && +;917: BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_LEVITATION) ) +;918: { +line 919 +;919: if ( pm->ps->groundEntityNum != ENTITYNUM_NONE ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +EQI4 $363 +line 920 +;920: {//on the ground +line 922 +;921: //check for left-wall and right-wall special jumps +;922: int anim = -1; +ADDRLP4 48 +CNSTI4 -1 +ASGNI4 +line 923 +;923: float vertPush = 0; +ADDRLP4 52 +CNSTF4 0 +ASGNF4 +line 924 +;924: if ( pm->cmd.rightmove > 0 && pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_1 ) +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $365 +ADDRLP4 56 +INDIRP4 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +CNSTI4 1 +LEI4 $365 +line 925 +;925: {//strafing right +line 926 +;926: if ( pm->cmd.forwardmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $367 +line 927 +;927: {//wall-run +line 928 +;928: vertPush = forceJumpStrength[FORCE_LEVEL_2]/2.0f; +ADDRLP4 52 +ADDRGP4 forceJumpStrength+8 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 929 +;929: anim = BOTH_WALL_RUN_RIGHT; +ADDRLP4 48 +CNSTI4 915 +ASGNI4 +line 930 +;930: } +ADDRGP4 $366 +JUMPV +LABELV $367 +line 931 +;931: else if ( pm->cmd.forwardmove == 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $366 +line 932 +;932: {//wall-flip +line 933 +;933: vertPush = forceJumpStrength[FORCE_LEVEL_2]/2.25f; +ADDRLP4 52 +ADDRGP4 forceJumpStrength+8 +INDIRF4 +CNSTF4 1074790400 +DIVF4 +ASGNF4 +line 934 +;934: anim = BOTH_WALL_FLIP_RIGHT; +ADDRLP4 48 +CNSTI4 921 +ASGNI4 +line 935 +;935: } +line 936 +;936: } +ADDRGP4 $366 +JUMPV +LABELV $365 +line 937 +;937: else if ( pm->cmd.rightmove < 0 && pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_1 ) +ADDRLP4 60 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $373 +ADDRLP4 60 +INDIRP4 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +CNSTI4 1 +LEI4 $373 +line 938 +;938: {//strafing left +line 939 +;939: if ( pm->cmd.forwardmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $375 +line 940 +;940: {//wall-run +line 941 +;941: vertPush = forceJumpStrength[FORCE_LEVEL_2]/2.0f; +ADDRLP4 52 +ADDRGP4 forceJumpStrength+8 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 942 +;942: anim = BOTH_WALL_RUN_LEFT; +ADDRLP4 48 +CNSTI4 918 +ASGNI4 +line 943 +;943: } +ADDRGP4 $374 +JUMPV +LABELV $375 +line 944 +;944: else if ( pm->cmd.forwardmove == 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $374 +line 945 +;945: {//wall-flip +line 946 +;946: vertPush = forceJumpStrength[FORCE_LEVEL_2]/2.25f; +ADDRLP4 52 +ADDRGP4 forceJumpStrength+8 +INDIRF4 +CNSTF4 1074790400 +DIVF4 +ASGNF4 +line 947 +;947: anim = BOTH_WALL_FLIP_LEFT; +ADDRLP4 48 +CNSTI4 922 +ASGNI4 +line 948 +;948: } +line 949 +;949: } +ADDRGP4 $374 +JUMPV +LABELV $373 +line 950 +;950: else if ( pm->cmd.forwardmove < 0 && !(pm->cmd.buttons&BUTTON_ATTACK) ) +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 68 +CNSTI4 0 +ASGNI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 68 +INDIRI4 +GEI4 $381 +ADDRLP4 64 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 68 +INDIRI4 +NEI4 $381 +line 951 +;951: {//backflip +line 952 +;952: vertPush = JUMP_VELOCITY; +ADDRLP4 52 +CNSTF4 1130430464 +ASGNF4 +line 953 +;953: anim = BOTH_FLIP_BACK1;//PM_PickAnim( BOTH_FLIP_BACK1, BOTH_FLIP_BACK3 ); +ADDRLP4 48 +CNSTI4 910 +ASGNI4 +line 954 +;954: } +LABELV $381 +LABELV $374 +LABELV $366 +line 956 +;955: +;956: vertPush += 128; //give them an extra shove +ADDRLP4 52 +ADDRLP4 52 +INDIRF4 +CNSTF4 1124073472 +ADDF4 +ASGNF4 +line 958 +;957: +;958: if ( anim != -1 ) +ADDRLP4 48 +INDIRI4 +CNSTI4 -1 +EQI4 $364 +line 959 +;959: { +line 963 +;960: vec3_t fwd, right, traceto, mins, maxs, fwdAngles; +;961: vec3_t idealNormal; +;962: trace_t trace; +;963: qboolean doTrace = qfalse; +ADDRLP4 72 +CNSTI4 0 +ASGNI4 +line 964 +;964: int contents = MASK_PLAYERSOLID; +ADDRLP4 76 +CNSTI4 273 +ASGNI4 +line 966 +;965: +;966: VectorSet(mins, pm->mins[0],pm->mins[1],0); +ADDRLP4 1244 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1184 +ADDRLP4 1244 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1184+4 +ADDRLP4 1244 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1184+8 +CNSTF4 0 +ASGNF4 +line 967 +;967: VectorSet(maxs, pm->maxs[0],pm->maxs[1],24); +ADDRLP4 1248 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1196 +ADDRLP4 1248 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1196+4 +ADDRLP4 1248 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1196+8 +CNSTF4 1103101952 +ASGNF4 +line 968 +;968: VectorSet(fwdAngles, 0, pm->ps->viewangles[YAW], 0); +ADDRLP4 1172 +CNSTF4 0 +ASGNF4 +ADDRLP4 1172+4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1172+8 +CNSTF4 0 +ASGNF4 +line 970 +;969: +;970: memset(&trace, 0, sizeof(trace)); //to shut the compiler up +ADDRLP4 80 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 1080 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 972 +;971: +;972: AngleVectors( fwdAngles, fwd, right, NULL ); +ADDRLP4 1172 +ARGP4 +ADDRLP4 1232 +ARGP4 +ADDRLP4 1220 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 975 +;973: +;974: //trace-check for a wall, if necc. +;975: switch ( anim ) +ADDRLP4 1252 +ADDRLP4 48 +INDIRI4 +ASGNI4 +ADDRLP4 1252 +INDIRI4 +CNSTI4 915 +LTI4 $391 +ADDRLP4 1252 +INDIRI4 +CNSTI4 922 +GTI4 $408 +ADDRLP4 1252 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $409-3660 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $409 +address $398 +address $391 +address $391 +address $393 +address $391 +address $391 +address $398 +address $393 +code +LABELV $408 +ADDRLP4 48 +INDIRI4 +CNSTI4 944 +EQI4 $403 +ADDRGP4 $391 +JUMPV +line 976 +;976: { +LABELV $393 +line 980 +;977: case BOTH_WALL_FLIP_LEFT: +;978: //NOTE: purposely falls through to next case! +;979: case BOTH_WALL_RUN_LEFT: +;980: doTrace = qtrue; +ADDRLP4 72 +CNSTI4 1 +ASGNI4 +line 981 +;981: VectorMA( pm->ps->origin, -16, right, traceto ); +ADDRLP4 1256 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1260 +CNSTF4 3246391296 +ASGNF4 +ADDRLP4 1208 +ADDRLP4 1256 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1260 +INDIRF4 +ADDRLP4 1220 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1208+4 +ADDRLP4 1256 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1260 +INDIRF4 +ADDRLP4 1220+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1208+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 3246391296 +ADDRLP4 1220+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 982 +;982: break; +ADDRGP4 $392 +JUMPV +LABELV $398 +line 987 +;983: +;984: case BOTH_WALL_FLIP_RIGHT: +;985: //NOTE: purposely falls through to next case! +;986: case BOTH_WALL_RUN_RIGHT: +;987: doTrace = qtrue; +ADDRLP4 72 +CNSTI4 1 +ASGNI4 +line 988 +;988: VectorMA( pm->ps->origin, 16, right, traceto ); +ADDRLP4 1264 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1268 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 1208 +ADDRLP4 1264 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1268 +INDIRF4 +ADDRLP4 1220 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1208+4 +ADDRLP4 1264 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1268 +INDIRF4 +ADDRLP4 1220+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1208+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +ADDRLP4 1220+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 989 +;989: break; +ADDRGP4 $392 +JUMPV +LABELV $403 +line 992 +;990: +;991: case BOTH_WALL_FLIP_BACK1: +;992: doTrace = qtrue; +ADDRLP4 72 +CNSTI4 1 +ASGNI4 +line 993 +;993: VectorMA( pm->ps->origin, 16, fwd, traceto ); +ADDRLP4 1272 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1276 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 1208 +ADDRLP4 1272 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1276 +INDIRF4 +ADDRLP4 1232 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1208+4 +ADDRLP4 1272 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1276 +INDIRF4 +ADDRLP4 1232+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1208+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +ADDRLP4 1232+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 994 +;994: break; +LABELV $391 +LABELV $392 +line 997 +;995: } +;996: +;997: if ( doTrace ) +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +EQI4 $411 +line 998 +;998: { +line 999 +;999: pm->trace( &trace, pm->ps->origin, mins, maxs, traceto, pm->ps->clientNum, contents ); +ADDRLP4 80 +ARGP4 +ADDRLP4 1256 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1260 +ADDRLP4 1256 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1260 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 1184 +ARGP4 +ADDRLP4 1196 +ARGP4 +ADDRLP4 1208 +ARGP4 +ADDRLP4 1260 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 76 +INDIRI4 +ARGI4 +ADDRLP4 1256 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 1000 +;1000: VectorSubtract( pm->ps->origin, traceto, idealNormal ); +ADDRLP4 1264 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1160 +ADDRLP4 1264 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1208 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1160+4 +ADDRLP4 1264 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1208+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1160+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 1208+8 +INDIRF4 +SUBF4 +ASGNF4 +line 1001 +;1001: VectorNormalize( idealNormal ); +ADDRLP4 1160 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1002 +;1002: } +LABELV $411 +line 1004 +;1003: +;1004: if ( !doTrace || (trace.fraction < 1.0f && (trace.entityNum < MAX_CLIENTS || DotProduct(trace.plane.normal,idealNormal) > 0.7)) ) +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +EQI4 $429 +ADDRLP4 80+8 +INDIRF4 +CNSTF4 1065353216 +GEF4 $364 +ADDRLP4 80+52 +INDIRI4 +CNSTI4 32 +LTI4 $429 +ADDRLP4 80+24 +INDIRF4 +ADDRLP4 1160 +INDIRF4 +MULF4 +ADDRLP4 80+24+4 +INDIRF4 +ADDRLP4 1160+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 80+24+8 +INDIRF4 +ADDRLP4 1160+8 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 1060320051 +LEF4 $364 +LABELV $429 +line 1005 +;1005: {//there is a wall there.. or hit a client +line 1008 +;1006: int parts; +;1007: //move me to side +;1008: if ( anim == BOTH_WALL_FLIP_LEFT ) +ADDRLP4 48 +INDIRI4 +CNSTI4 922 +NEI4 $430 +line 1009 +;1009: { +line 1010 +;1010: pm->ps->velocity[0] = pm->ps->velocity[1] = 0; +ADDRLP4 1260 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1264 +CNSTF4 0 +ASGNF4 +ADDRLP4 1260 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 1264 +INDIRF4 +ASGNF4 +ADDRLP4 1260 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 1264 +INDIRF4 +ASGNF4 +line 1011 +;1011: VectorMA( pm->ps->velocity, 150, right, pm->ps->velocity ); +ADDRLP4 1268 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1268 +INDIRP4 +ADDRLP4 1268 +INDIRP4 +INDIRF4 +CNSTF4 1125515264 +ADDRLP4 1220 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1272 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 1272 +INDIRP4 +ADDRLP4 1272 +INDIRP4 +INDIRF4 +CNSTF4 1125515264 +ADDRLP4 1220+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1276 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 1276 +INDIRP4 +ADDRLP4 1276 +INDIRP4 +INDIRF4 +CNSTF4 1125515264 +ADDRLP4 1220+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1012 +;1012: } +ADDRGP4 $431 +JUMPV +LABELV $430 +line 1013 +;1013: else if ( anim == BOTH_WALL_FLIP_RIGHT ) +ADDRLP4 48 +INDIRI4 +CNSTI4 921 +NEI4 $434 +line 1014 +;1014: { +line 1015 +;1015: pm->ps->velocity[0] = pm->ps->velocity[1] = 0; +ADDRLP4 1260 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1264 +CNSTF4 0 +ASGNF4 +ADDRLP4 1260 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 1264 +INDIRF4 +ASGNF4 +ADDRLP4 1260 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 1264 +INDIRF4 +ASGNF4 +line 1016 +;1016: VectorMA( pm->ps->velocity, -150, right, pm->ps->velocity ); +ADDRLP4 1268 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1268 +INDIRP4 +ADDRLP4 1268 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 1220 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1272 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 1272 +INDIRP4 +ADDRLP4 1272 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 1220+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1276 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 1276 +INDIRP4 +ADDRLP4 1276 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 1220+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1017 +;1017: } +ADDRGP4 $435 +JUMPV +LABELV $434 +line 1018 +;1018: else if ( anim == BOTH_FLIP_BACK1 +ADDRLP4 1260 +ADDRLP4 48 +INDIRI4 +ASGNI4 +ADDRLP4 1260 +INDIRI4 +CNSTI4 910 +EQI4 $442 +ADDRLP4 1260 +INDIRI4 +CNSTI4 911 +EQI4 $442 +ADDRLP4 1260 +INDIRI4 +CNSTI4 912 +EQI4 $442 +ADDRLP4 1260 +INDIRI4 +CNSTI4 944 +NEI4 $438 +LABELV $442 +line 1022 +;1019: || anim == BOTH_FLIP_BACK2 +;1020: || anim == BOTH_FLIP_BACK3 +;1021: || anim == BOTH_WALL_FLIP_BACK1 ) +;1022: { +line 1023 +;1023: pm->ps->velocity[0] = pm->ps->velocity[1] = 0; +ADDRLP4 1264 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1268 +CNSTF4 0 +ASGNF4 +ADDRLP4 1264 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 1268 +INDIRF4 +ASGNF4 +ADDRLP4 1264 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 1268 +INDIRF4 +ASGNF4 +line 1024 +;1024: VectorMA( pm->ps->velocity, -150, fwd, pm->ps->velocity ); +ADDRLP4 1272 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1272 +INDIRP4 +ADDRLP4 1272 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 1232 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1276 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 1276 +INDIRP4 +ADDRLP4 1276 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 1232+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1280 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 1280 +INDIRP4 +ADDRLP4 1280 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 1232+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1025 +;1025: } +LABELV $438 +LABELV $435 +LABELV $431 +line 1027 +;1026: +;1027: if ( doTrace && anim != BOTH_WALL_RUN_LEFT && anim != BOTH_WALL_RUN_RIGHT ) +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +EQI4 $445 +ADDRLP4 1264 +ADDRLP4 48 +INDIRI4 +ASGNI4 +ADDRLP4 1264 +INDIRI4 +CNSTI4 918 +EQI4 $445 +ADDRLP4 1264 +INDIRI4 +CNSTI4 915 +EQI4 $445 +line 1028 +;1028: { +line 1029 +;1029: if (trace.entityNum < MAX_CLIENTS) +ADDRLP4 80+52 +INDIRI4 +CNSTI4 32 +GEI4 $447 +line 1030 +;1030: { +line 1031 +;1031: pm->ps->forceKickFlip = trace.entityNum+1; //let the server know that this person gets kicked by this client +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1292 +ADDP4 +ADDRLP4 80+52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1032 +;1032: } +LABELV $447 +line 1033 +;1033: } +LABELV $445 +line 1036 +;1034: +;1035: //up +;1036: if ( vertPush ) +ADDRLP4 52 +INDIRF4 +CNSTF4 0 +EQF4 $451 +line 1037 +;1037: { +line 1038 +;1038: pm->ps->velocity[2] = vertPush; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 52 +INDIRF4 +ASGNF4 +line 1039 +;1039: pm->ps->fd.forcePowersActive |= (1 << FP_LEVITATION); +ADDRLP4 1268 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 848 +ADDP4 +ASGNP4 +ADDRLP4 1268 +INDIRP4 +ADDRLP4 1268 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1040 +;1040: } +LABELV $451 +line 1042 +;1041: //animate me +;1042: parts = SETANIM_LEGS; +ADDRLP4 1256 +CNSTI4 2 +ASGNI4 +line 1043 +;1043: if ( anim == BOTH_BUTTERFLY_LEFT ) +ADDRLP4 48 +INDIRI4 +CNSTI4 913 +NEI4 $453 +line 1044 +;1044: { +line 1045 +;1045: parts = SETANIM_BOTH; +ADDRLP4 1256 +CNSTI4 3 +ASGNI4 +line 1046 +;1046: pm->cmd.buttons&=~BUTTON_ATTACK; +ADDRLP4 1268 +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 1268 +INDIRP4 +ADDRLP4 1268 +INDIRP4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 1047 +;1047: pm->ps->saberMove = LS_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1048 +;1048: } +ADDRGP4 $454 +JUMPV +LABELV $453 +line 1049 +;1049: else if ( !pm->ps->weaponTime ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $455 +line 1050 +;1050: { +line 1051 +;1051: parts = SETANIM_BOTH; +ADDRLP4 1256 +CNSTI4 3 +ASGNI4 +line 1052 +;1052: } +LABELV $455 +LABELV $454 +line 1053 +;1053: PM_SetAnim( parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0 ); +ADDRLP4 1256 +INDIRI4 +ARGI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1054 +;1054: if ( anim == BOTH_BUTTERFLY_LEFT ) +ADDRLP4 48 +INDIRI4 +CNSTI4 913 +NEI4 $457 +line 1055 +;1055: { +line 1056 +;1056: pm->ps->weaponTime = pm->ps->torsoTimer; +ADDRLP4 1268 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1268 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 1268 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +ASGNI4 +line 1057 +;1057: } +LABELV $457 +line 1058 +;1058: PM_SetForceJumpZStart(pm->ps->origin[2]);//so we don't take damage if we land at same height +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 PM_SetForceJumpZStart +CALLV +pop +line 1059 +;1059: pm->ps->pm_flags |= PMF_JUMP_HELD; +ADDRLP4 1268 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1268 +INDIRP4 +ADDRLP4 1268 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1060 +;1060: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 1061 +;1061: pm->ps->fd.forceJumpSound = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1100 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1062 +;1062: } +line 1063 +;1063: } +line 1064 +;1064: } +ADDRGP4 $364 +JUMPV +LABELV $363 +line 1066 +;1065: else +;1066: {//in the air +line 1067 +;1067: int legsAnim = (pm->ps->legsAnim&~ANIM_TOGGLEBIT); +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 1068 +;1068: if ( legsAnim == BOTH_WALL_RUN_LEFT || legsAnim == BOTH_WALL_RUN_RIGHT ) +ADDRLP4 52 +ADDRLP4 48 +INDIRI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 918 +EQI4 $461 +ADDRLP4 52 +INDIRI4 +CNSTI4 915 +NEI4 $459 +LABELV $461 +line 1069 +;1069: {//running on a wall +line 1072 +;1070: vec3_t right, traceto, mins, maxs, fwdAngles; +;1071: trace_t trace; +;1072: int anim = -1; +ADDRLP4 56 +CNSTI4 -1 +ASGNI4 +line 1074 +;1073: +;1074: VectorSet(mins, pm->mins[0], pm->mins[0], 0); +ADDRLP4 1200 +ADDRGP4 pm +INDIRP4 +CNSTI4 188 +ADDP4 +ASGNP4 +ADDRLP4 72 +ADDRLP4 1200 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 72+4 +ADDRLP4 1200 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 72+8 +CNSTF4 0 +ASGNF4 +line 1075 +;1075: VectorSet(maxs, pm->maxs[0], pm->maxs[0], 24); +ADDRLP4 1204 +ADDRGP4 pm +INDIRP4 +CNSTI4 200 +ADDP4 +ASGNP4 +ADDRLP4 84 +ADDRLP4 1204 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 84+4 +ADDRLP4 1204 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 84+8 +CNSTF4 1103101952 +ASGNF4 +line 1076 +;1076: VectorSet(fwdAngles, 0, pm->ps->viewangles[YAW], 0); +ADDRLP4 60 +CNSTF4 0 +ASGNF4 +ADDRLP4 60+4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 60+8 +CNSTF4 0 +ASGNF4 +line 1078 +;1077: +;1078: AngleVectors( fwdAngles, NULL, right, NULL ); +ADDRLP4 60 +ARGP4 +ADDRLP4 1208 +CNSTP4 0 +ASGNP4 +ADDRLP4 1208 +INDIRP4 +ARGP4 +ADDRLP4 96 +ARGP4 +ADDRLP4 1208 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 1080 +;1079: +;1080: if ( legsAnim == BOTH_WALL_RUN_LEFT ) +ADDRLP4 48 +INDIRI4 +CNSTI4 918 +NEI4 $468 +line 1081 +;1081: { +line 1082 +;1082: if ( pm->ps->legsTimer > 400 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 400 +LEI4 $469 +line 1083 +;1083: {//not at the end of the anim +line 1084 +;1084: float animLen = PM_AnimLength( 0, (animNumber_t)BOTH_WALL_RUN_LEFT ); +CNSTI4 0 +ARGI4 +CNSTI4 918 +ARGI4 +ADDRLP4 1216 +ADDRGP4 PM_AnimLength +CALLI4 +ASGNI4 +ADDRLP4 1212 +ADDRLP4 1216 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1085 +;1085: if ( pm->ps->legsTimer < animLen - 400 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 1212 +INDIRF4 +CNSTF4 1137180672 +SUBF4 +GEF4 $469 +line 1086 +;1086: {//not at start of anim +line 1087 +;1087: VectorMA( pm->ps->origin, -16, right, traceto ); +ADDRLP4 1220 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1224 +CNSTF4 3246391296 +ASGNF4 +ADDRLP4 108 +ADDRLP4 1220 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1224 +INDIRF4 +ADDRLP4 96 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 108+4 +ADDRLP4 1220 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1224 +INDIRF4 +ADDRLP4 96+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 108+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 3246391296 +ADDRLP4 96+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1088 +;1088: anim = BOTH_WALL_RUN_LEFT_FLIP; +ADDRLP4 56 +CNSTI4 919 +ASGNI4 +line 1089 +;1089: } +line 1090 +;1090: } +line 1091 +;1091: } +ADDRGP4 $469 +JUMPV +LABELV $468 +line 1092 +;1092: else if ( legsAnim == BOTH_WALL_RUN_RIGHT ) +ADDRLP4 48 +INDIRI4 +CNSTI4 915 +NEI4 $478 +line 1093 +;1093: { +line 1094 +;1094: if ( pm->ps->legsTimer > 400 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 400 +LEI4 $480 +line 1095 +;1095: {//not at the end of the anim +line 1096 +;1096: float animLen = PM_AnimLength( 0, (animNumber_t)BOTH_WALL_RUN_RIGHT ); +CNSTI4 0 +ARGI4 +CNSTI4 915 +ARGI4 +ADDRLP4 1216 +ADDRGP4 PM_AnimLength +CALLI4 +ASGNI4 +ADDRLP4 1212 +ADDRLP4 1216 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1097 +;1097: if ( pm->ps->legsTimer < animLen - 400 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 1212 +INDIRF4 +CNSTF4 1137180672 +SUBF4 +GEF4 $482 +line 1098 +;1098: {//not at start of anim +line 1099 +;1099: VectorMA( pm->ps->origin, 16, right, traceto ); +ADDRLP4 1220 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1224 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 108 +ADDRLP4 1220 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1224 +INDIRF4 +ADDRLP4 96 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 108+4 +ADDRLP4 1220 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1224 +INDIRF4 +ADDRLP4 96+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 108+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +ADDRLP4 96+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1100 +;1100: anim = BOTH_WALL_RUN_RIGHT_FLIP; +ADDRLP4 56 +CNSTI4 916 +ASGNI4 +line 1101 +;1101: } +LABELV $482 +line 1102 +;1102: } +LABELV $480 +line 1103 +;1103: } +LABELV $478 +LABELV $469 +line 1104 +;1104: if ( anim != -1 ) +ADDRLP4 56 +INDIRI4 +CNSTI4 -1 +EQI4 $488 +line 1105 +;1105: { +line 1106 +;1106: pm->trace( &trace, pm->ps->origin, mins, maxs, traceto, pm->ps->clientNum, CONTENTS_SOLID|CONTENTS_BODY ); +ADDRLP4 120 +ARGP4 +ADDRLP4 1212 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1216 +ADDRLP4 1212 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1216 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 72 +ARGP4 +ADDRLP4 84 +ARGP4 +ADDRLP4 108 +ARGP4 +ADDRLP4 1216 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 257 +ARGI4 +ADDRLP4 1212 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 1107 +;1107: if ( trace.fraction < 1.0f ) +ADDRLP4 120+8 +INDIRF4 +CNSTF4 1065353216 +GEF4 $490 +line 1108 +;1108: {//flip off wall +line 1109 +;1109: int parts = 0; +ADDRLP4 1220 +CNSTI4 0 +ASGNI4 +line 1111 +;1110: +;1111: if ( anim == BOTH_WALL_RUN_LEFT_FLIP ) +ADDRLP4 56 +INDIRI4 +CNSTI4 919 +NEI4 $493 +line 1112 +;1112: { +line 1113 +;1113: pm->ps->velocity[0] *= 0.5f; +ADDRLP4 1224 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1224 +INDIRP4 +CNSTF4 1056964608 +ADDRLP4 1224 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 1114 +;1114: pm->ps->velocity[1] *= 0.5f; +ADDRLP4 1228 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 1228 +INDIRP4 +CNSTF4 1056964608 +ADDRLP4 1228 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 1115 +;1115: VectorMA( pm->ps->velocity, 150, right, pm->ps->velocity ); +ADDRLP4 1232 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1232 +INDIRP4 +ADDRLP4 1232 +INDIRP4 +INDIRF4 +CNSTF4 1125515264 +ADDRLP4 96 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1236 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 1236 +INDIRP4 +ADDRLP4 1236 +INDIRP4 +INDIRF4 +CNSTF4 1125515264 +ADDRLP4 96+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1240 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 1240 +INDIRP4 +ADDRLP4 1240 +INDIRP4 +INDIRF4 +CNSTF4 1125515264 +ADDRLP4 96+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1116 +;1116: } +ADDRGP4 $494 +JUMPV +LABELV $493 +line 1117 +;1117: else if ( anim == BOTH_WALL_RUN_RIGHT_FLIP ) +ADDRLP4 56 +INDIRI4 +CNSTI4 916 +NEI4 $497 +line 1118 +;1118: { +line 1119 +;1119: pm->ps->velocity[0] *= 0.5f; +ADDRLP4 1224 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1224 +INDIRP4 +CNSTF4 1056964608 +ADDRLP4 1224 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 1120 +;1120: pm->ps->velocity[1] *= 0.5f; +ADDRLP4 1228 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 1228 +INDIRP4 +CNSTF4 1056964608 +ADDRLP4 1228 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 1121 +;1121: VectorMA( pm->ps->velocity, -150, right, pm->ps->velocity ); +ADDRLP4 1232 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1232 +INDIRP4 +ADDRLP4 1232 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 96 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1236 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 1236 +INDIRP4 +ADDRLP4 1236 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 96+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1240 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 1240 +INDIRP4 +ADDRLP4 1240 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 96+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1122 +;1122: } +LABELV $497 +LABELV $494 +line 1123 +;1123: parts = SETANIM_LEGS; +ADDRLP4 1220 +CNSTI4 2 +ASGNI4 +line 1124 +;1124: if ( !pm->ps->weaponTime ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $501 +line 1125 +;1125: { +line 1126 +;1126: parts = SETANIM_BOTH; +ADDRLP4 1220 +CNSTI4 3 +ASGNI4 +line 1127 +;1127: } +LABELV $501 +line 1128 +;1128: PM_SetAnim( parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0 ); +ADDRLP4 1220 +INDIRI4 +ARGI4 +ADDRLP4 56 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1129 +;1129: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 1130 +;1130: } +LABELV $490 +line 1131 +;1131: } +LABELV $488 +line 1132 +;1132: if ( pm->cmd.upmove != 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $460 +line 1133 +;1133: {//jump failed, so don't try to do normal jump code, just return +line 1134 +;1134: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $248 +JUMPV +line 1136 +;1135: } +;1136: } +LABELV $459 +line 1137 +;1137: else if ( pm->cmd.forwardmove > 0 //pushing forward +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $505 +ADDRLP4 60 +ADDRLP4 56 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +CNSTI4 1 +LEI4 $505 +ADDRLP4 60 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1128792064 +LEF4 $505 +ADDRLP4 64 +ADDRGP4 PM_GroundDistance +CALLF4 +ASGNF4 +ADDRLP4 64 +INDIRF4 +CNSTF4 1117782016 +GTF4 $505 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 68 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +NEI4 $505 +line 1142 +;1138: && pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_1 +;1139: && pm->ps->velocity[2] > 200 +;1140: && PM_GroundDistance() <= 80 //unfortunately we do not have a happy ground timer like SP (this would use up more bandwidth if we wanted prediction workign right), so we'll just use the actual ground distance. +;1141: && !BG_InSpecialJump(pm->ps->legsAnim)) +;1142: {//run up wall, flip backwards +line 1147 +;1143: vec3_t fwd, traceto, mins, maxs, fwdAngles; +;1144: trace_t trace; +;1145: vec3_t idealNormal; +;1146: +;1147: VectorSet(mins, pm->mins[0],pm->mins[1],pm->mins[2]); +ADDRLP4 1224 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 96 +ADDRLP4 1224 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 96+4 +ADDRLP4 1224 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 96+8 +ADDRGP4 pm +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRF4 +ASGNF4 +line 1148 +;1148: VectorSet(maxs, pm->maxs[0],pm->maxs[1],pm->maxs[2]); +ADDRLP4 1228 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 108 +ADDRLP4 1228 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 108+4 +ADDRLP4 1228 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 108+8 +ADDRGP4 pm +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ASGNF4 +line 1149 +;1149: VectorSet(fwdAngles, 0, pm->ps->viewangles[YAW], 0); +ADDRLP4 120 +CNSTF4 0 +ASGNF4 +ADDRLP4 120+4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 120+8 +CNSTF4 0 +ASGNF4 +line 1151 +;1150: +;1151: AngleVectors( fwdAngles, fwd, NULL, NULL ); +ADDRLP4 120 +ARGP4 +ADDRLP4 84 +ARGP4 +ADDRLP4 1232 +CNSTP4 0 +ASGNP4 +ADDRLP4 1232 +INDIRP4 +ARGP4 +ADDRLP4 1232 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 1152 +;1152: VectorMA( pm->ps->origin, 32, fwd, traceto ); +ADDRLP4 1236 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1240 +CNSTF4 1107296256 +ASGNF4 +ADDRLP4 72 +ADDRLP4 1236 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1240 +INDIRF4 +ADDRLP4 84 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 72+4 +ADDRLP4 1236 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1240 +INDIRF4 +ADDRLP4 84+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 72+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1107296256 +ADDRLP4 84+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1154 +;1153: +;1154: pm->trace( &trace, pm->ps->origin, mins, maxs, traceto, pm->ps->clientNum, MASK_PLAYERSOLID );//FIXME: clip brushes too? +ADDRLP4 144 +ARGP4 +ADDRLP4 1244 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1248 +ADDRLP4 1244 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1248 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 96 +ARGP4 +ADDRLP4 108 +ARGP4 +ADDRLP4 72 +ARGP4 +ADDRLP4 1248 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 273 +ARGI4 +ADDRLP4 1244 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 1155 +;1155: VectorSubtract( pm->ps->origin, traceto, idealNormal ); +ADDRLP4 1252 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 132 +ADDRLP4 1252 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 72 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 132+4 +ADDRLP4 1252 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 72+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 132+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 72+8 +INDIRF4 +SUBF4 +ASGNF4 +line 1156 +;1156: VectorNormalize( idealNormal ); +ADDRLP4 132 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1158 +;1157: +;1158: if ( trace.fraction < 1.0f ) +ADDRLP4 144+8 +INDIRF4 +CNSTF4 1065353216 +GEF4 $521 +line 1159 +;1159: {//there is a wall there +line 1160 +;1160: int parts = SETANIM_LEGS; +ADDRLP4 1256 +CNSTI4 2 +ASGNI4 +line 1162 +;1161: +;1162: pm->ps->velocity[0] = pm->ps->velocity[1] = 0; +ADDRLP4 1260 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1264 +CNSTF4 0 +ASGNF4 +ADDRLP4 1260 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 1264 +INDIRF4 +ASGNF4 +ADDRLP4 1260 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 1264 +INDIRF4 +ASGNF4 +line 1163 +;1163: VectorMA( pm->ps->velocity, -150, fwd, pm->ps->velocity ); +ADDRLP4 1268 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1268 +INDIRP4 +ADDRLP4 1268 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 84 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1272 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 1272 +INDIRP4 +ADDRLP4 1272 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 84+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1276 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 1276 +INDIRP4 +ADDRLP4 1276 +INDIRP4 +INDIRF4 +CNSTF4 3272998912 +ADDRLP4 84+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1164 +;1164: pm->ps->velocity[2] += 128; +ADDRLP4 1280 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 1280 +INDIRP4 +ADDRLP4 1280 +INDIRP4 +INDIRF4 +CNSTF4 1124073472 +ADDF4 +ASGNF4 +line 1166 +;1165: +;1166: if ( !pm->ps->weaponTime ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $526 +line 1167 +;1167: { +line 1168 +;1168: parts = SETANIM_BOTH; +ADDRLP4 1256 +CNSTI4 3 +ASGNI4 +line 1169 +;1169: } +LABELV $526 +line 1170 +;1170: PM_SetAnim( parts, BOTH_WALL_FLIP_BACK1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0 ); +ADDRLP4 1256 +INDIRI4 +ARGI4 +CNSTI4 944 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1172 +;1171: +;1172: pm->ps->legsTimer -= 600; //I force this anim to play to the end to prevent landing on your head and suddenly flipping over. +ADDRLP4 1284 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +ASGNP4 +ADDRLP4 1284 +INDIRP4 +ADDRLP4 1284 +INDIRP4 +INDIRI4 +CNSTI4 600 +SUBI4 +ASGNI4 +line 1175 +;1173: //It is a bit too long at the end though, so I'll just shorten it. +;1174: +;1175: PM_SetForceJumpZStart(pm->ps->origin[2]);//so we don't take damage if we land at same height +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 PM_SetForceJumpZStart +CALLV +pop +line 1176 +;1176: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 1177 +;1177: pm->ps->fd.forceJumpSound = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1100 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1178 +;1178: BG_ForcePowerDrain( pm->ps, FP_LEVITATION, 5 ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 BG_ForcePowerDrain +CALLV +pop +line 1180 +;1179: +;1180: if (trace.entityNum < MAX_CLIENTS) +ADDRLP4 144+52 +INDIRI4 +CNSTI4 32 +GEI4 $528 +line 1181 +;1181: { +line 1182 +;1182: pm->ps->forceKickFlip = trace.entityNum+1; //let the server know that this person gets kicked by this client +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1292 +ADDP4 +ADDRLP4 144+52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1183 +;1183: } +LABELV $528 +line 1184 +;1184: } +LABELV $521 +line 1185 +;1185: } +LABELV $505 +LABELV $460 +line 1186 +;1186: } +LABELV $364 +line 1187 +;1187: } +LABELV $361 +LABELV $351 +line 1189 +;1188: +;1189: if ( pm->cmd.upmove > 0 +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 52 +CNSTI4 0 +ASGNI4 +ADDRLP4 48 +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 52 +INDIRI4 +LEI4 $532 +ADDRLP4 56 +ADDRLP4 48 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $532 +ADDRLP4 56 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +ADDRLP4 52 +INDIRI4 +GTI4 $534 +ADDRLP4 48 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 52 +INDIRI4 +EQI4 $532 +LABELV $534 +line 1192 +;1190: && pm->ps->weapon == WP_SABER +;1191: && (pm->ps->weaponTime > 0||pm->cmd.buttons&BUTTON_ATTACK) ) +;1192: {//okay, we just jumped and we're in an attack +line 1193 +;1193: if ( !BG_InRoll( pm->ps, pm->ps->legsAnim ) +ADDRLP4 60 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ARGP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 64 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 0 +NEI4 $535 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 68 +ADDRGP4 PM_InKnockDown +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +NEI4 $535 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 72 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +NEI4 $535 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 BG_FlippingAnim +CALLI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +NEI4 $535 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 80 +ADDRGP4 PM_SpinningAnim +CALLI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 0 +NEI4 $535 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 84 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +NEI4 $535 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 BG_SaberInAttack +CALLI4 +ASGNI4 +ADDRLP4 88 +INDIRI4 +CNSTI4 0 +EQI4 $535 +line 1200 +;1194: && !PM_InKnockDown( pm->ps ) +;1195: && !BG_InDeathAnim(pm->ps->legsAnim) +;1196: && !BG_FlippingAnim( pm->ps->legsAnim ) +;1197: && !PM_SpinningAnim( pm->ps->legsAnim ) +;1198: && !BG_SaberInSpecialAttack( pm->ps->torsoAnim ) +;1199: && ( BG_SaberInAttack( pm->ps->saberMove ) ) ) +;1200: {//not in an anim we shouldn't interrupt +line 1202 +;1201: //see if it's not too late to start a special jump-attack +;1202: float animLength = PM_AnimLength( 0, (animNumber_t)pm->ps->torsoAnim ); +CNSTI4 0 +ARGI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 96 +ADDRGP4 PM_AnimLength +CALLI4 +ASGNI4 +ADDRLP4 92 +ADDRLP4 96 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1203 +;1203: if ( animLength - pm->ps->torsoTimer < 500 ) +ADDRLP4 92 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +CVIF4 4 +SUBF4 +CNSTF4 1140457472 +GEF4 $537 +line 1204 +;1204: {//just started the saberMove +line 1206 +;1205: //check for special-case jump attacks +;1206: if ( pm->ps->fd.saberAnimLevel == FORCE_LEVEL_2 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $539 +line 1207 +;1207: {//using medium attacks +line 1208 +;1208: if (PM_GroundDistance() < 32 && +ADDRLP4 100 +ADDRGP4 PM_GroundDistance +CALLF4 +ASGNF4 +ADDRLP4 100 +INDIRF4 +CNSTF4 1107296256 +GEF4 $540 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 104 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 104 +INDIRI4 +CNSTI4 0 +NEI4 $540 +line 1210 +;1209: !BG_InSpecialJump(pm->ps->legsAnim)) +;1210: { //FLIP AND DOWNWARD ATTACK +line 1213 +;1211: trace_t tr; +;1212: +;1213: if (PM_SomeoneInFront(&tr)) +ADDRLP4 108 +ARGP4 +ADDRLP4 1188 +ADDRGP4 PM_SomeoneInFront +CALLI4 +ASGNI4 +ADDRLP4 1188 +INDIRI4 +CNSTI4 0 +EQI4 $540 +line 1214 +;1214: { +line 1215 +;1215: PM_SetSaberMove(PM_SaberFlipOverAttackMove(&tr)); +ADDRLP4 108 +ARGP4 +ADDRLP4 1192 +ADDRGP4 PM_SaberFlipOverAttackMove +CALLI4 +ASGNI4 +ADDRLP4 1192 +INDIRI4 +CVII2 4 +CVII4 2 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1216 +;1216: pml.groundPlane = qfalse; +ADDRGP4 pml+48 +CNSTI4 0 +ASGNI4 +line 1217 +;1217: pml.walking = qfalse; +ADDRGP4 pml+44 +CNSTI4 0 +ASGNI4 +line 1218 +;1218: pm->ps->pm_flags |= PMF_JUMP_HELD; +ADDRLP4 1196 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1196 +INDIRP4 +ADDRLP4 1196 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1219 +;1219: pm->ps->groundEntityNum = ENTITYNUM_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 1023 +ASGNI4 +line 1220 +;1220: VectorClear(pml.groundTrace.plane.normal); +ADDRLP4 1200 +CNSTF4 0 +ASGNF4 +ADDRGP4 pml+52+24+8 +ADDRLP4 1200 +INDIRF4 +ASGNF4 +ADDRGP4 pml+52+24+4 +ADDRLP4 1200 +INDIRF4 +ASGNF4 +ADDRGP4 pml+52+24 +ADDRLP4 1200 +INDIRF4 +ASGNF4 +line 1222 +;1221: +;1222: pm->ps->weaponTime = pm->ps->torsoTimer; +ADDRLP4 1204 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1204 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 1204 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +ASGNI4 +line 1223 +;1223: } +line 1224 +;1224: } +line 1225 +;1225: } +ADDRGP4 $540 +JUMPV +LABELV $539 +line 1226 +;1226: else if ( pm->ps->fd.saberAnimLevel == FORCE_LEVEL_3 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $555 +line 1227 +;1227: {//using strong attacks +line 1228 +;1228: if ( pm->cmd.forwardmove > 0 && //going forward +ADDRLP4 100 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 104 +CNSTI4 0 +ASGNI4 +ADDRLP4 100 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 104 +INDIRI4 +LEI4 $557 +ADDRLP4 100 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 104 +INDIRI4 +EQI4 $557 +ADDRLP4 108 +ADDRGP4 PM_GroundDistance +CALLF4 +ASGNF4 +ADDRLP4 108 +INDIRF4 +CNSTF4 1107296256 +GEF4 $557 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 112 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 112 +INDIRI4 +CNSTI4 0 +NEI4 $557 +line 1232 +;1229: (pm->cmd.buttons & BUTTON_ATTACK) && //must be holding attack still +;1230: PM_GroundDistance() < 32 && +;1231: !BG_InSpecialJump(pm->ps->legsAnim)) +;1232: {//strong attack: jump-hack +line 1233 +;1233: PM_SetSaberMove( PM_SaberJumpAttackMove() ); +ADDRLP4 116 +ADDRGP4 PM_SaberJumpAttackMove +CALLI4 +ASGNI4 +ADDRLP4 116 +INDIRI4 +CVII2 4 +CVII4 2 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1234 +;1234: pml.groundPlane = qfalse; +ADDRGP4 pml+48 +CNSTI4 0 +ASGNI4 +line 1235 +;1235: pml.walking = qfalse; +ADDRGP4 pml+44 +CNSTI4 0 +ASGNI4 +line 1236 +;1236: pm->ps->pm_flags |= PMF_JUMP_HELD; +ADDRLP4 120 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 120 +INDIRP4 +ADDRLP4 120 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1237 +;1237: pm->ps->groundEntityNum = ENTITYNUM_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 1023 +ASGNI4 +line 1238 +;1238: VectorClear(pml.groundTrace.plane.normal); +ADDRLP4 124 +CNSTF4 0 +ASGNF4 +ADDRGP4 pml+52+24+8 +ADDRLP4 124 +INDIRF4 +ASGNF4 +ADDRGP4 pml+52+24+4 +ADDRLP4 124 +INDIRF4 +ASGNF4 +ADDRGP4 pml+52+24 +ADDRLP4 124 +INDIRF4 +ASGNF4 +line 1240 +;1239: +;1240: pm->ps->weaponTime = pm->ps->torsoTimer; +ADDRLP4 128 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 128 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 128 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +ASGNI4 +line 1241 +;1241: } +LABELV $557 +line 1242 +;1242: } +LABELV $555 +LABELV $540 +line 1243 +;1243: } +LABELV $537 +line 1244 +;1244: } +LABELV $535 +line 1245 +;1245: } +LABELV $532 +line 1246 +;1246: if ( pm->ps->groundEntityNum == ENTITYNUM_NONE ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +NEI4 $569 +line 1247 +;1247: { +line 1248 +;1248: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $248 +JUMPV +LABELV $569 +line 1250 +;1249: } +;1250: if ( pm->cmd.upmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $571 +line 1251 +;1251: {//no special jumps +line 1252 +;1252: pm->ps->velocity[2] = JUMP_VELOCITY; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1130430464 +ASGNF4 +line 1253 +;1253: PM_SetForceJumpZStart(pm->ps->origin[2]);//so we don't take damage if we land at same height +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 PM_SetForceJumpZStart +CALLV +pop +line 1254 +;1254: pm->ps->pm_flags |= PMF_JUMP_HELD; +ADDRLP4 60 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1255 +;1255: } +LABELV $571 +line 1258 +;1256: +;1257: //Jumping +;1258: pml.groundPlane = qfalse; +ADDRGP4 pml+48 +CNSTI4 0 +ASGNI4 +line 1259 +;1259: pml.walking = qfalse; +ADDRGP4 pml+44 +CNSTI4 0 +ASGNI4 +line 1260 +;1260: pm->ps->pm_flags |= PMF_JUMP_HELD; +ADDRLP4 60 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1261 +;1261: pm->ps->groundEntityNum = ENTITYNUM_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 1023 +ASGNI4 +line 1262 +;1262: PM_SetForceJumpZStart(pm->ps->origin[2]); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 PM_SetForceJumpZStart +CALLV +pop +line 1264 +;1263: +;1264: PM_AddEvent( EV_JUMP ); +CNSTI4 14 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 1267 +;1265: +;1266: //Set the animations +;1267: if ( pm->ps->gravity > 0 && !BG_InSpecialJump( pm->ps->legsAnim ) ) +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $575 +ADDRLP4 64 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 68 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +NEI4 $575 +line 1268 +;1268: { +line 1269 +;1269: PM_JumpForDir(); +ADDRGP4 PM_JumpForDir +CALLV +pop +line 1270 +;1270: } +LABELV $575 +line 1272 +;1271: +;1272: return qtrue; +CNSTI4 1 +RETI4 +LABELV $248 +endproc PM_CheckJump 1288 28 +proc PM_CheckWaterJump 56 8 +line 1279 +;1273:} +;1274:/* +;1275:============= +;1276:PM_CheckWaterJump +;1277:============= +;1278:*/ +;1279:static qboolean PM_CheckWaterJump( void ) { +line 1284 +;1280: vec3_t spot; +;1281: int cont; +;1282: vec3_t flatforward; +;1283: +;1284: if (pm->ps->pm_time) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $578 +line 1285 +;1285: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $577 +JUMPV +LABELV $578 +line 1289 +;1286: } +;1287: +;1288: // check for water jump +;1289: if ( pm->waterlevel != 2 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 2 +EQI4 $580 +line 1290 +;1290: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $577 +JUMPV +LABELV $580 +line 1293 +;1291: } +;1292: +;1293: flatforward[0] = pml.forward[0]; +ADDRLP4 12 +ADDRGP4 pml +INDIRF4 +ASGNF4 +line 1294 +;1294: flatforward[1] = pml.forward[1]; +ADDRLP4 12+4 +ADDRGP4 pml+4 +INDIRF4 +ASGNF4 +line 1295 +;1295: flatforward[2] = 0; +ADDRLP4 12+8 +CNSTF4 0 +ASGNF4 +line 1296 +;1296: VectorNormalize (flatforward); +ADDRLP4 12 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1298 +;1297: +;1298: VectorMA (pm->ps->origin, 30, flatforward, spot); +ADDRLP4 28 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 32 +CNSTF4 1106247680 +ASGNF4 +ADDRLP4 0 +ADDRLP4 28 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 28 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 12+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1106247680 +ADDRLP4 12+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1299 +;1299: spot[2] += 4; +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1082130432 +ADDF4 +ASGNF4 +line 1300 +;1300: cont = pm->pointcontents (spot, pm->ps->clientNum ); +ADDRLP4 0 +ARGP4 +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 40 +ADDRLP4 36 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 40 +INDIRI4 +ASGNI4 +line 1301 +;1301: if ( !(cont & CONTENTS_SOLID) ) { +ADDRLP4 24 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $590 +line 1302 +;1302: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $577 +JUMPV +LABELV $590 +line 1305 +;1303: } +;1304: +;1305: spot[2] += 16; +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +ASGNF4 +line 1306 +;1306: cont = pm->pointcontents (spot, pm->ps->clientNum ); +ADDRLP4 0 +ARGP4 +ADDRLP4 44 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 48 +ADDRLP4 44 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 48 +INDIRI4 +ASGNI4 +line 1307 +;1307: if ( cont ) { +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $593 +line 1308 +;1308: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $577 +JUMPV +LABELV $593 +line 1312 +;1309: } +;1310: +;1311: // jump out of water +;1312: VectorScale (pml.forward, 200, pm->ps->velocity); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 1128792064 +ADDRGP4 pml +INDIRF4 +MULF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +CNSTF4 1128792064 +ADDRGP4 pml+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1128792064 +ADDRGP4 pml+8 +INDIRF4 +MULF4 +ASGNF4 +line 1313 +;1313: pm->ps->velocity[2] = 350; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1135542272 +ASGNF4 +line 1315 +;1314: +;1315: pm->ps->pm_flags |= PMF_TIME_WATERJUMP; +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRI4 +CNSTI4 256 +BORI4 +ASGNI4 +line 1316 +;1316: pm->ps->pm_time = 2000; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTI4 2000 +ASGNI4 +line 1318 +;1317: +;1318: return qtrue; +CNSTI4 1 +RETI4 +LABELV $577 +endproc PM_CheckWaterJump 56 8 +proc PM_WaterJumpMove 12 4 +line 1331 +;1319:} +;1320: +;1321://============================================================================ +;1322: +;1323: +;1324:/* +;1325:=================== +;1326:PM_WaterJumpMove +;1327: +;1328:Flying out of the water +;1329:=================== +;1330:*/ +;1331:static void PM_WaterJumpMove( void ) { +line 1334 +;1332: // waterjump has no control, but falls +;1333: +;1334: PM_StepSlideMove( qtrue ); +CNSTI4 1 +ARGI4 +ADDRGP4 PM_StepSlideMove +CALLV +pop +line 1336 +;1335: +;1336: pm->ps->velocity[2] -= pm->ps->gravity * pml.frametime; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 1337 +;1337: if (pm->ps->velocity[2] < 0) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 0 +GEF4 $599 +line 1339 +;1338: // cancel as soon as we are falling down again +;1339: pm->ps->pm_flags &= ~PMF_ALL_TIMES; +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 -353 +BANDI4 +ASGNI4 +line 1340 +;1340: pm->ps->pm_time = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1341 +;1341: } +LABELV $599 +line 1342 +;1342:} +LABELV $597 +endproc PM_WaterJumpMove 12 4 +proc PM_WaterMove 76 16 +line 1350 +;1343: +;1344:/* +;1345:=================== +;1346:PM_WaterMove +;1347: +;1348:=================== +;1349:*/ +;1350:static void PM_WaterMove( void ) { +line 1358 +;1351: int i; +;1352: vec3_t wishvel; +;1353: float wishspeed; +;1354: vec3_t wishdir; +;1355: float scale; +;1356: float vel; +;1357: +;1358: if ( PM_CheckWaterJump() ) { +ADDRLP4 40 +ADDRGP4 PM_CheckWaterJump +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $602 +line 1359 +;1359: PM_WaterJumpMove(); +ADDRGP4 PM_WaterJumpMove +CALLV +pop +line 1360 +;1360: return; +ADDRGP4 $601 +JUMPV +LABELV $602 +line 1376 +;1361: } +;1362:#if 0 +;1363: // jump = head for surface +;1364: if ( pm->cmd.upmove >= 10 ) { +;1365: if (pm->ps->velocity[2] > -300) { +;1366: if ( pm->watertype == CONTENTS_WATER ) { +;1367: pm->ps->velocity[2] = 100; +;1368: } else if (pm->watertype == CONTENTS_SLIME) { +;1369: pm->ps->velocity[2] = 80; +;1370: } else { +;1371: pm->ps->velocity[2] = 50; +;1372: } +;1373: } +;1374: } +;1375:#endif +;1376: PM_Friction (); +ADDRGP4 PM_Friction +CALLV +pop +line 1378 +;1377: +;1378: scale = PM_CmdScale( &pm->cmd ); +ADDRGP4 pm +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 44 +ADDRGP4 PM_CmdScale +CALLF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 44 +INDIRF4 +ASGNF4 +line 1382 +;1379: // +;1380: // user intentions +;1381: // +;1382: if ( !scale ) { +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +NEF4 $604 +line 1383 +;1383: wishvel[0] = 0; +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +line 1384 +;1384: wishvel[1] = 0; +ADDRLP4 8+4 +CNSTF4 0 +ASGNF4 +line 1385 +;1385: wishvel[2] = -60; // sink towards bottom +ADDRLP4 8+8 +CNSTF4 3262119936 +ASGNF4 +line 1386 +;1386: } else { +ADDRGP4 $605 +JUMPV +LABELV $604 +line 1387 +;1387: for (i=0 ; i<3 ; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $608 +line 1388 +;1388: wishvel[i] = scale * pml.forward[i]*pm->cmd.forwardmove + scale * pml.right[i]*pm->cmd.rightmove; +ADDRLP4 48 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 8 +ADDP4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 48 +INDIRI4 +ADDRGP4 pml +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +MULF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 48 +INDIRI4 +ADDRGP4 pml+12 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +LABELV $609 +line 1387 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $608 +line 1390 +;1389: +;1390: wishvel[2] += scale * pm->cmd.upmove; +ADDRLP4 8+8 +ADDRLP4 8+8 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 1391 +;1391: } +LABELV $605 +line 1393 +;1392: +;1393: VectorCopy (wishvel, wishdir); +ADDRLP4 24 +ADDRLP4 8 +INDIRB +ASGNB 12 +line 1394 +;1394: wishspeed = VectorNormalize(wishdir); +ADDRLP4 24 +ARGP4 +ADDRLP4 48 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 48 +INDIRF4 +ASGNF4 +line 1396 +;1395: +;1396: if ( wishspeed > pm->ps->speed * pm_swimScale ) { +ADDRLP4 20 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRGP4 pm_swimScale +INDIRF4 +MULF4 +LEF4 $614 +line 1397 +;1397: wishspeed = pm->ps->speed * pm_swimScale; +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRGP4 pm_swimScale +INDIRF4 +MULF4 +ASGNF4 +line 1398 +;1398: } +LABELV $614 +line 1400 +;1399: +;1400: PM_Accelerate (wishdir, wishspeed, pm_wateraccelerate); +ADDRLP4 24 +ARGP4 +ADDRLP4 20 +INDIRF4 +ARGF4 +ADDRGP4 pm_wateraccelerate +INDIRF4 +ARGF4 +ADDRGP4 PM_Accelerate +CALLV +pop +line 1403 +;1401: +;1402: // make sure we can go up slopes easily under water +;1403: if ( pml.groundPlane && DotProduct( pm->ps->velocity, pml.groundTrace.plane.normal ) < 0 ) { +ADDRGP4 pml+48 +INDIRI4 +CNSTI4 0 +EQI4 $616 +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRGP4 pml+52+24 +INDIRF4 +MULF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRGP4 pml+52+24+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ADDRGP4 pml+52+24+8 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 0 +GEF4 $616 +line 1404 +;1404: vel = VectorLength(pm->ps->velocity); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRLP4 56 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 36 +ADDRLP4 56 +INDIRF4 +ASGNF4 +line 1406 +;1405: // slide along the ground plane +;1406: PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal, +ADDRLP4 60 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ARGP4 +ADDRGP4 pml+52+24 +ARGP4 +ADDRLP4 60 +INDIRP4 +ARGP4 +CNSTF4 1065361605 +ARGF4 +ADDRGP4 PM_ClipVelocity +CALLV +pop +line 1409 +;1407: pm->ps->velocity, OVERCLIP ); +;1408: +;1409: VectorNormalize(pm->ps->velocity); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1410 +;1410: VectorScale(pm->ps->velocity, vel, pm->ps->velocity); +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 64 +INDIRP4 +INDIRF4 +ADDRLP4 36 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 68 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +ADDRLP4 68 +INDIRP4 +INDIRF4 +ADDRLP4 36 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 72 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRF4 +ADDRLP4 36 +INDIRF4 +MULF4 +ASGNF4 +line 1411 +;1411: } +LABELV $616 +line 1413 +;1412: +;1413: PM_SlideMove( qfalse ); +CNSTI4 0 +ARGI4 +ADDRGP4 PM_SlideMove +CALLI4 +pop +line 1414 +;1414:} +LABELV $601 +endproc PM_WaterMove 76 16 +proc PM_FlyMove 56 12 +line 1423 +;1415: +;1416:/* +;1417:=================== +;1418:PM_FlyMove +;1419: +;1420:Only with the flight powerup +;1421:=================== +;1422:*/ +;1423:static void PM_FlyMove( void ) { +line 1431 +;1424: int i; +;1425: vec3_t wishvel; +;1426: float wishspeed; +;1427: vec3_t wishdir; +;1428: float scale; +;1429: +;1430: // normal slowdown +;1431: PM_Friction (); +ADDRGP4 PM_Friction +CALLV +pop +line 1433 +;1432: +;1433: scale = PM_CmdScale( &pm->cmd ); +ADDRGP4 pm +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 PM_CmdScale +CALLF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 36 +INDIRF4 +ASGNF4 +line 1435 +;1434: +;1435: if ( pm->ps->pm_type == PM_SPECTATOR && pm->cmd.buttons & BUTTON_ALT_ATTACK) { +ADDRLP4 40 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $630 +ADDRLP4 40 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $630 +line 1437 +;1436: //turbo boost +;1437: scale *= 10; +ADDRLP4 4 +CNSTF4 1092616192 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1438 +;1438: } +LABELV $630 +line 1443 +;1439: +;1440: // +;1441: // user intentions +;1442: // +;1443: if ( !scale ) { +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +NEF4 $632 +line 1444 +;1444: wishvel[0] = 0; +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +line 1445 +;1445: wishvel[1] = 0; +ADDRLP4 8+4 +CNSTF4 0 +ASGNF4 +line 1446 +;1446: wishvel[2] = pm->ps->speed * (pm->cmd.upmove/127.0f); +ADDRLP4 44 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 8+8 +ADDRLP4 44 +INDIRP4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 44 +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +CNSTF4 1123942400 +DIVF4 +MULF4 +ASGNF4 +line 1447 +;1447: } else { +ADDRGP4 $633 +JUMPV +LABELV $632 +line 1448 +;1448: for (i=0 ; i<3 ; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $636 +line 1449 +;1449: wishvel[i] = scale * pml.forward[i]*pm->cmd.forwardmove + scale * pml.right[i]*pm->cmd.rightmove; +ADDRLP4 44 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 8 +ADDP4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 44 +INDIRI4 +ADDRGP4 pml +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +MULF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 44 +INDIRI4 +ADDRGP4 pml+12 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 1450 +;1450: } +LABELV $637 +line 1448 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $636 +line 1452 +;1451: +;1452: wishvel[2] += scale * pm->cmd.upmove; +ADDRLP4 8+8 +ADDRLP4 8+8 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 1453 +;1453: } +LABELV $633 +line 1455 +;1454: +;1455: VectorCopy (wishvel, wishdir); +ADDRLP4 20 +ADDRLP4 8 +INDIRB +ASGNB 12 +line 1456 +;1456: wishspeed = VectorNormalize(wishdir); +ADDRLP4 20 +ARGP4 +ADDRLP4 44 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 32 +ADDRLP4 44 +INDIRF4 +ASGNF4 +line 1458 +;1457: +;1458: PM_Accelerate (wishdir, wishspeed, pm_flyaccelerate); +ADDRLP4 20 +ARGP4 +ADDRLP4 32 +INDIRF4 +ARGF4 +ADDRGP4 pm_flyaccelerate +INDIRF4 +ARGF4 +ADDRGP4 PM_Accelerate +CALLV +pop +line 1460 +;1459: +;1460: PM_StepSlideMove( qfalse ); +CNSTI4 0 +ARGI4 +ADDRGP4 PM_StepSlideMove +CALLV +pop +line 1461 +;1461:} +LABELV $629 +endproc PM_FlyMove 56 12 +proc PM_AirMove 84 16 +line 1470 +;1462: +;1463: +;1464:/* +;1465:=================== +;1466:PM_AirMove +;1467: +;1468:=================== +;1469:*/ +;1470:static void PM_AirMove( void ) { +line 1479 +;1471: int i; +;1472: vec3_t wishvel; +;1473: float fmove, smove; +;1474: vec3_t wishdir; +;1475: float wishspeed; +;1476: float scale; +;1477: usercmd_t cmd; +;1478: +;1479: if (pm->ps->pm_type != PM_SPECTATOR) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $643 +line 1480 +;1480: { +line 1482 +;1481:#if METROID_JUMP +;1482: PM_CheckJump(); +ADDRGP4 PM_CheckJump +CALLI4 +pop +line 1490 +;1483:#else +;1484: if (pm->ps->fd.forceJumpZStart && +;1485: pm->ps->forceJumpFlip) +;1486: { +;1487: PM_CheckJump(); +;1488: } +;1489:#endif +;1490: } +LABELV $643 +line 1491 +;1491: PM_Friction(); +ADDRGP4 PM_Friction +CALLV +pop +line 1493 +;1492: +;1493: fmove = pm->cmd.forwardmove; +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +ASGNF4 +line 1494 +;1494: smove = pm->cmd.rightmove; +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +ASGNF4 +line 1496 +;1495: +;1496: cmd = pm->cmd; +ADDRLP4 44 +ADDRGP4 pm +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRB +ASGNB 28 +line 1497 +;1497: scale = PM_CmdScale( &cmd ); +ADDRLP4 44 +ARGP4 +ADDRLP4 72 +ADDRGP4 PM_CmdScale +CALLF4 +ASGNF4 +ADDRLP4 40 +ADDRLP4 72 +INDIRF4 +ASGNF4 +line 1500 +;1498: +;1499: // set the movementDir so clients can rotate the legs for strafing +;1500: PM_SetMovementDir(); +ADDRGP4 PM_SetMovementDir +CALLV +pop +line 1503 +;1501: +;1502: // project moves down to flat plane +;1503: pml.forward[2] = 0; +ADDRGP4 pml+8 +CNSTF4 0 +ASGNF4 +line 1504 +;1504: pml.right[2] = 0; +ADDRGP4 pml+12+8 +CNSTF4 0 +ASGNF4 +line 1505 +;1505: VectorNormalize (pml.forward); +ADDRGP4 pml +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1506 +;1506: VectorNormalize (pml.right); +ADDRGP4 pml+12 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1508 +;1507: +;1508: if ( gPMDoSlowFall ) +ADDRGP4 gPMDoSlowFall +INDIRI4 +CNSTI4 0 +EQI4 $649 +line 1509 +;1509: {//no air-control +line 1510 +;1510: VectorClear( wishvel ); +ADDRLP4 76 +CNSTF4 0 +ASGNF4 +ADDRLP4 4+8 +ADDRLP4 76 +INDIRF4 +ASGNF4 +ADDRLP4 4+4 +ADDRLP4 76 +INDIRF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 76 +INDIRF4 +ASGNF4 +line 1511 +;1511: } +ADDRGP4 $650 +JUMPV +LABELV $649 +line 1513 +;1512: else +;1513: { +line 1514 +;1514: for ( i = 0 ; i < 2 ; i++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $653 +line 1515 +;1515: { +line 1516 +;1516: wishvel[i] = pml.forward[i]*fmove + pml.right[i]*smove; +ADDRLP4 76 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +ADDRLP4 4 +ADDP4 +ADDRLP4 76 +INDIRI4 +ADDRGP4 pml +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDRLP4 76 +INDIRI4 +ADDRGP4 pml+12 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1517 +;1517: } +LABELV $654 +line 1514 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LTI4 $653 +line 1518 +;1518: wishvel[2] = 0; +ADDRLP4 4+8 +CNSTF4 0 +ASGNF4 +line 1519 +;1519: } +LABELV $650 +line 1521 +;1520: +;1521: VectorCopy (wishvel, wishdir); +ADDRLP4 24 +ADDRLP4 4 +INDIRB +ASGNB 12 +line 1522 +;1522: wishspeed = VectorNormalize(wishdir); +ADDRLP4 24 +ARGP4 +ADDRLP4 76 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 36 +ADDRLP4 76 +INDIRF4 +ASGNF4 +line 1523 +;1523: wishspeed *= scale; +ADDRLP4 36 +ADDRLP4 36 +INDIRF4 +ADDRLP4 40 +INDIRF4 +MULF4 +ASGNF4 +line 1526 +;1524: +;1525: // not on ground, so little effect on velocity +;1526: PM_Accelerate (wishdir, wishspeed, pm_airaccelerate); +ADDRLP4 24 +ARGP4 +ADDRLP4 36 +INDIRF4 +ARGF4 +ADDRGP4 pm_airaccelerate +INDIRF4 +ARGF4 +ADDRGP4 PM_Accelerate +CALLV +pop +line 1531 +;1527: +;1528: // we may have a ground plane that is very steep, even +;1529: // though we don't have a groundentity +;1530: // slide along the steep plane +;1531: if ( pml.groundPlane ) { +ADDRGP4 pml+48 +INDIRI4 +CNSTI4 0 +EQI4 $659 +line 1532 +;1532: PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal, +ADDRLP4 80 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +ARGP4 +ADDRGP4 pml+52+24 +ARGP4 +ADDRLP4 80 +INDIRP4 +ARGP4 +CNSTF4 1065361605 +ARGF4 +ADDRGP4 PM_ClipVelocity +CALLV +pop +line 1534 +;1533: pm->ps->velocity, OVERCLIP ); +;1534: } +LABELV $659 +line 1536 +;1535: +;1536: PM_StepSlideMove ( qtrue ); +CNSTI4 1 +ARGI4 +ADDRGP4 PM_StepSlideMove +CALLV +pop +line 1537 +;1537:} +LABELV $642 +endproc PM_AirMove 84 16 +proc PM_WalkMove 148 16 +line 1545 +;1538: +;1539:/* +;1540:=================== +;1541:PM_WalkMove +;1542: +;1543:=================== +;1544:*/ +;1545:static void PM_WalkMove( void ) { +line 1557 +;1546: int i; +;1547: vec3_t wishvel; +;1548: float fmove, smove; +;1549: vec3_t wishdir; +;1550: float wishspeed; +;1551: float scale; +;1552: usercmd_t cmd; +;1553: float accelerate; +;1554: float vel; +;1555: float totalVel; +;1556: +;1557: if (pm->ps->velocity[0] < 0) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +CNSTF4 0 +GEF4 $665 +line 1558 +;1558: { +line 1559 +;1559: totalVel = -pm->ps->velocity[0]; +ADDRLP4 44 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +NEGF4 +ASGNF4 +line 1560 +;1560: } +ADDRGP4 $666 +JUMPV +LABELV $665 +line 1562 +;1561: else +;1562: { +line 1563 +;1563: totalVel = pm->ps->velocity[0]; +ADDRLP4 44 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ASGNF4 +line 1564 +;1564: } +LABELV $666 +line 1566 +;1565: +;1566: if (pm->ps->velocity[1] < 0) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +CNSTF4 0 +GEF4 $667 +line 1567 +;1567: { +line 1568 +;1568: totalVel += -pm->ps->velocity[1]; +ADDRLP4 44 +ADDRLP4 44 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +NEGF4 +ADDF4 +ASGNF4 +line 1569 +;1569: } +ADDRGP4 $668 +JUMPV +LABELV $667 +line 1571 +;1570: else +;1571: { +line 1572 +;1572: totalVel += pm->ps->velocity[1]; +ADDRLP4 44 +ADDRLP4 44 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 1573 +;1573: } +LABELV $668 +line 1575 +;1574: +;1575: if (totalVel < 200) +ADDRLP4 44 +INDIRF4 +CNSTF4 1128792064 +GEF4 $669 +line 1576 +;1576: { +line 1577 +;1577: pm->ps->fd.forceSpeedSmash = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1136 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1578 +;1578: } +LABELV $669 +line 1580 +;1579: +;1580: if ( pm->waterlevel > 2 && DotProduct( pml.forward, pml.groundTrace.plane.normal ) > 0 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 2 +LEI4 $671 +ADDRGP4 pml +INDIRF4 +ADDRGP4 pml+52+24 +INDIRF4 +MULF4 +ADDRGP4 pml+4 +INDIRF4 +ADDRGP4 pml+52+24+4 +INDIRF4 +MULF4 +ADDF4 +ADDRGP4 pml+8 +INDIRF4 +ADDRGP4 pml+52+24+8 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 0 +LEF4 $671 +line 1582 +;1581: // begin swimming +;1582: PM_WaterMove(); +ADDRGP4 PM_WaterMove +CALLV +pop +line 1583 +;1583: return; +ADDRGP4 $664 +JUMPV +LABELV $671 +line 1587 +;1584: } +;1585: +;1586: +;1587: if (pm->ps->pm_type != PM_SPECTATOR) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $683 +line 1588 +;1588: { +line 1589 +;1589: if ( PM_CheckJump () ) { +ADDRLP4 84 +ADDRGP4 PM_CheckJump +CALLI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +EQI4 $685 +line 1591 +;1590: // jumped away +;1591: if ( pm->waterlevel > 1 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 1 +LEI4 $687 +line 1592 +;1592: PM_WaterMove(); +ADDRGP4 PM_WaterMove +CALLV +pop +line 1593 +;1593: } else { +ADDRGP4 $664 +JUMPV +LABELV $687 +line 1594 +;1594: PM_AirMove(); +ADDRGP4 PM_AirMove +CALLV +pop +line 1595 +;1595: } +line 1596 +;1596: return; +ADDRGP4 $664 +JUMPV +LABELV $685 +line 1598 +;1597: } +;1598: } +LABELV $683 +line 1600 +;1599: +;1600: PM_Friction (); +ADDRGP4 PM_Friction +CALLV +pop +line 1602 +;1601: +;1602: fmove = pm->cmd.forwardmove; +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +ASGNF4 +line 1603 +;1603: smove = pm->cmd.rightmove; +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +ASGNF4 +line 1605 +;1604: +;1605: cmd = pm->cmd; +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRB +ASGNB 28 +line 1606 +;1606: scale = PM_CmdScale( &cmd ); +ADDRLP4 52 +ARGP4 +ADDRLP4 84 +ADDRGP4 PM_CmdScale +CALLF4 +ASGNF4 +ADDRLP4 48 +ADDRLP4 84 +INDIRF4 +ASGNF4 +line 1609 +;1607: +;1608: // set the movementDir so clients can rotate the legs for strafing +;1609: PM_SetMovementDir(); +ADDRGP4 PM_SetMovementDir +CALLV +pop +line 1612 +;1610: +;1611: // project moves down to flat plane +;1612: pml.forward[2] = 0; +ADDRGP4 pml+8 +CNSTF4 0 +ASGNF4 +line 1613 +;1613: pml.right[2] = 0; +ADDRGP4 pml+12+8 +CNSTF4 0 +ASGNF4 +line 1616 +;1614: +;1615: // project the forward and right directions onto the ground plane +;1616: PM_ClipVelocity (pml.forward, pml.groundTrace.plane.normal, pml.forward, OVERCLIP ); +ADDRLP4 88 +ADDRGP4 pml +ASGNP4 +ADDRLP4 88 +INDIRP4 +ARGP4 +ADDRGP4 pml+52+24 +ARGP4 +ADDRLP4 88 +INDIRP4 +ARGP4 +CNSTF4 1065361605 +ARGF4 +ADDRGP4 PM_ClipVelocity +CALLV +pop +line 1617 +;1617: PM_ClipVelocity (pml.right, pml.groundTrace.plane.normal, pml.right, OVERCLIP ); +ADDRGP4 pml+12 +ARGP4 +ADDRGP4 pml+52+24 +ARGP4 +ADDRGP4 pml+12 +ARGP4 +CNSTF4 1065361605 +ARGF4 +ADDRGP4 PM_ClipVelocity +CALLV +pop +line 1619 +;1618: // +;1619: VectorNormalize (pml.forward); +ADDRGP4 pml +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1620 +;1620: VectorNormalize (pml.right); +ADDRGP4 pml+12 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1622 +;1621: +;1622: for ( i = 0 ; i < 3 ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $699 +line 1623 +;1623: wishvel[i] = pml.forward[i]*fmove + pml.right[i]*smove; +ADDRLP4 92 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 92 +INDIRI4 +ADDRLP4 4 +ADDP4 +ADDRLP4 92 +INDIRI4 +ADDRGP4 pml +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDRLP4 92 +INDIRI4 +ADDRGP4 pml+12 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1624 +;1624: } +LABELV $700 +line 1622 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $699 +line 1627 +;1625: // when going up or down slopes the wish velocity should Not be zero +;1626: +;1627: VectorCopy (wishvel, wishdir); +ADDRLP4 32 +ADDRLP4 4 +INDIRB +ASGNB 12 +line 1628 +;1628: wishspeed = VectorNormalize(wishdir); +ADDRLP4 32 +ARGP4 +ADDRLP4 92 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 24 +ADDRLP4 92 +INDIRF4 +ASGNF4 +line 1629 +;1629: wishspeed *= scale; +ADDRLP4 24 +ADDRLP4 24 +INDIRF4 +ADDRLP4 48 +INDIRF4 +MULF4 +ASGNF4 +line 1632 +;1630: +;1631: // clamp the speed lower if ducking +;1632: if ( pm->ps->pm_flags & PMF_DUCKED ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $704 +line 1633 +;1633: if ( wishspeed > pm->ps->speed * pm_duckScale ) { +ADDRLP4 24 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRGP4 pm_duckScale +INDIRF4 +MULF4 +LEF4 $705 +line 1634 +;1634: wishspeed = pm->ps->speed * pm_duckScale; +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRGP4 pm_duckScale +INDIRF4 +MULF4 +ASGNF4 +line 1635 +;1635: } +line 1636 +;1636: } +ADDRGP4 $705 +JUMPV +LABELV $704 +line 1637 +;1637: else if ( (pm->ps->pm_flags & PMF_ROLLING) && !BG_InRoll(pm->ps, pm->ps->legsAnim) && +ADDRLP4 96 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $708 +ADDRLP4 96 +INDIRP4 +ARGP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 100 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 100 +INDIRI4 +CNSTI4 0 +NEI4 $708 +ADDRLP4 104 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 104 +INDIRP4 +ARGP4 +ADDRLP4 104 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 108 +ADDRGP4 PM_InRollComplete +CALLI4 +ASGNI4 +ADDRLP4 108 +INDIRI4 +CNSTI4 0 +NEI4 $708 +line 1639 +;1638: !PM_InRollComplete(pm->ps, pm->ps->legsAnim)) +;1639: { +line 1640 +;1640: if ( wishspeed > pm->ps->speed * pm_duckScale ) { +ADDRLP4 24 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRGP4 pm_duckScale +INDIRF4 +MULF4 +LEF4 $710 +line 1641 +;1641: wishspeed = pm->ps->speed * pm_duckScale; +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRGP4 pm_duckScale +INDIRF4 +MULF4 +ASGNF4 +line 1642 +;1642: } +LABELV $710 +line 1643 +;1643: } +LABELV $708 +LABELV $705 +line 1646 +;1644: +;1645: // clamp the speed lower if wading or walking on the bottom +;1646: if ( pm->waterlevel ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $712 +line 1649 +;1647: float waterScale; +;1648: +;1649: waterScale = pm->waterlevel / 3.0; +ADDRLP4 112 +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CVIF4 4 +CNSTF4 1077936128 +DIVF4 +ASGNF4 +line 1650 +;1650: waterScale = 1.0 - ( 1.0 - pm_swimScale ) * waterScale; +ADDRLP4 116 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 112 +ADDRLP4 116 +INDIRF4 +ADDRLP4 116 +INDIRF4 +ADDRGP4 pm_swimScale +INDIRF4 +SUBF4 +ADDRLP4 112 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 1651 +;1651: if ( wishspeed > pm->ps->speed * waterScale ) { +ADDRLP4 24 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 112 +INDIRF4 +MULF4 +LEF4 $714 +line 1652 +;1652: wishspeed = pm->ps->speed * waterScale; +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 112 +INDIRF4 +MULF4 +ASGNF4 +line 1653 +;1653: } +LABELV $714 +line 1654 +;1654: } +LABELV $712 +line 1658 +;1655: +;1656: // when a player gets hit, they temporarily lose +;1657: // full control, which allows them to be moved a bit +;1658: if ( ( pml.groundTrace.surfaceFlags & SURF_SLICK ) || pm->ps->pm_flags & PMF_TIME_KNOCKBACK ) { +ADDRLP4 112 +CNSTI4 0 +ASGNI4 +ADDRGP4 pml+52+44 +INDIRI4 +CNSTI4 16384 +BANDI4 +ADDRLP4 112 +INDIRI4 +NEI4 $720 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 64 +BANDI4 +ADDRLP4 112 +INDIRI4 +EQI4 $716 +LABELV $720 +line 1659 +;1659: accelerate = pm_airaccelerate; +ADDRLP4 80 +ADDRGP4 pm_airaccelerate +INDIRF4 +ASGNF4 +line 1660 +;1660: } else { +ADDRGP4 $717 +JUMPV +LABELV $716 +line 1661 +;1661: accelerate = pm_accelerate; +ADDRLP4 80 +ADDRGP4 pm_accelerate +INDIRF4 +ASGNF4 +line 1662 +;1662: } +LABELV $717 +line 1664 +;1663: +;1664: PM_Accelerate (wishdir, wishspeed, accelerate); +ADDRLP4 32 +ARGP4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRGP4 PM_Accelerate +CALLV +pop +line 1669 +;1665: +;1666: //Com_Printf("velocity = %1.1f %1.1f %1.1f\n", pm->ps->velocity[0], pm->ps->velocity[1], pm->ps->velocity[2]); +;1667: //Com_Printf("velocity1 = %1.1f\n", VectorLength(pm->ps->velocity)); +;1668: +;1669: if ( ( pml.groundTrace.surfaceFlags & SURF_SLICK ) || pm->ps->pm_flags & PMF_TIME_KNOCKBACK ) +ADDRLP4 116 +CNSTI4 0 +ASGNI4 +ADDRGP4 pml+52+44 +INDIRI4 +CNSTI4 16384 +BANDI4 +ADDRLP4 116 +INDIRI4 +NEI4 $725 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 64 +BANDI4 +ADDRLP4 116 +INDIRI4 +EQI4 $721 +LABELV $725 +line 1670 +;1670: { +line 1671 +;1671: pm->ps->velocity[2] -= pm->ps->gravity * pml.frametime; +ADDRLP4 120 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 124 +ADDRLP4 120 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 124 +INDIRP4 +ADDRLP4 124 +INDIRP4 +INDIRF4 +ADDRLP4 120 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 1672 +;1672: } +LABELV $721 +line 1674 +;1673: +;1674: vel = VectorLength(pm->ps->velocity); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRLP4 120 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 28 +ADDRLP4 120 +INDIRF4 +ASGNF4 +line 1677 +;1675: +;1676: // slide along the ground plane +;1677: PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal, +ADDRLP4 124 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 124 +INDIRP4 +ARGP4 +ADDRGP4 pml+52+24 +ARGP4 +ADDRLP4 124 +INDIRP4 +ARGP4 +CNSTF4 1065361605 +ARGF4 +ADDRGP4 PM_ClipVelocity +CALLV +pop +line 1681 +;1678: pm->ps->velocity, OVERCLIP ); +;1679: +;1680: // don't decrease velocity when going up or down a slope +;1681: VectorNormalize(pm->ps->velocity); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1682 +;1682: VectorScale(pm->ps->velocity, vel, pm->ps->velocity); +ADDRLP4 128 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 128 +INDIRP4 +ADDRLP4 128 +INDIRP4 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 132 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 132 +INDIRP4 +ADDRLP4 132 +INDIRP4 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 136 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 136 +INDIRP4 +ADDRLP4 136 +INDIRP4 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 1685 +;1683: +;1684: // don't do anything if standing still +;1685: if (!pm->ps->velocity[0] && !pm->ps->velocity[1]) { +ADDRLP4 140 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 144 +CNSTF4 0 +ASGNF4 +ADDRLP4 140 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 144 +INDIRF4 +NEF4 $729 +ADDRLP4 140 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 144 +INDIRF4 +NEF4 $729 +line 1686 +;1686: pm->ps->fd.forceSpeedSmash = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1136 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1687 +;1687: return; +ADDRGP4 $664 +JUMPV +LABELV $729 +line 1690 +;1688: } +;1689: +;1690: PM_StepSlideMove( qfalse ); +CNSTI4 0 +ARGI4 +ADDRGP4 PM_StepSlideMove +CALLV +pop +line 1693 +;1691: +;1692: //Com_Printf("velocity2 = %1.1f\n", VectorLength(pm->ps->velocity)); +;1693:} +LABELV $664 +endproc PM_WalkMove 148 16 +proc PM_DeadMove 20 4 +line 1701 +;1694: +;1695: +;1696:/* +;1697:============== +;1698:PM_DeadMove +;1699:============== +;1700:*/ +;1701:static void PM_DeadMove( void ) { +line 1704 +;1702: float forward; +;1703: +;1704: if ( !pml.walking ) { +ADDRGP4 pml+44 +INDIRI4 +CNSTI4 0 +NEI4 $732 +line 1705 +;1705: return; +ADDRGP4 $731 +JUMPV +LABELV $732 +line 1710 +;1706: } +;1707: +;1708: // extra friction +;1709: +;1710: forward = VectorLength (pm->ps->velocity); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 1711 +;1711: forward -= 20; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1101004800 +SUBF4 +ASGNF4 +line 1712 +;1712: if ( forward <= 0 ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +GTF4 $735 +line 1713 +;1713: VectorClear (pm->ps->velocity); +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTF4 0 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 1714 +;1714: } else { +ADDRGP4 $736 +JUMPV +LABELV $735 +line 1715 +;1715: VectorNormalize (pm->ps->velocity); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1716 +;1716: VectorScale (pm->ps->velocity, forward, pm->ps->velocity); +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 1717 +;1717: } +LABELV $736 +line 1718 +;1718:} +LABELV $731 +endproc PM_DeadMove 20 4 +proc PM_NoclipMove 104 12 +line 1726 +;1719: +;1720: +;1721:/* +;1722:=============== +;1723:PM_NoclipMove +;1724:=============== +;1725:*/ +;1726:static void PM_NoclipMove( void ) { +line 1735 +;1727: float speed, drop, friction, control, newspeed; +;1728: int i; +;1729: vec3_t wishvel; +;1730: float fmove, smove; +;1731: vec3_t wishdir; +;1732: float wishspeed; +;1733: float scale; +;1734: +;1735: pm->ps->viewheight = DEFAULT_VIEWHEIGHT; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTI4 36 +ASGNI4 +line 1739 +;1736: +;1737: // friction +;1738: +;1739: speed = VectorLength (pm->ps->velocity); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRLP4 64 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 24 +ADDRLP4 64 +INDIRF4 +ASGNF4 +line 1740 +;1740: if (speed < 1) +ADDRLP4 24 +INDIRF4 +CNSTF4 1065353216 +GEF4 $738 +line 1741 +;1741: { +line 1742 +;1742: VectorCopy (vec3_origin, pm->ps->velocity); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRGP4 vec3_origin +INDIRB +ASGNB 12 +line 1743 +;1743: } +ADDRGP4 $739 +JUMPV +LABELV $738 +line 1745 +;1744: else +;1745: { +line 1746 +;1746: drop = 0; +ADDRLP4 52 +CNSTF4 0 +ASGNF4 +line 1748 +;1747: +;1748: friction = pm_friction*1.5; // extra friction +ADDRLP4 56 +CNSTF4 1069547520 +ADDRGP4 pm_friction +INDIRF4 +MULF4 +ASGNF4 +line 1749 +;1749: control = speed < pm_stopspeed ? pm_stopspeed : speed; +ADDRLP4 24 +INDIRF4 +ADDRGP4 pm_stopspeed +INDIRF4 +GEF4 $741 +ADDRLP4 68 +ADDRGP4 pm_stopspeed +INDIRF4 +ASGNF4 +ADDRGP4 $742 +JUMPV +LABELV $741 +ADDRLP4 68 +ADDRLP4 24 +INDIRF4 +ASGNF4 +LABELV $742 +ADDRLP4 60 +ADDRLP4 68 +INDIRF4 +ASGNF4 +line 1750 +;1750: drop += control*friction*pml.frametime; +ADDRLP4 52 +ADDRLP4 52 +INDIRF4 +ADDRLP4 60 +INDIRF4 +ADDRLP4 56 +INDIRF4 +MULF4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1753 +;1751: +;1752: // scale the velocity +;1753: newspeed = speed - drop; +ADDRLP4 28 +ADDRLP4 24 +INDIRF4 +ADDRLP4 52 +INDIRF4 +SUBF4 +ASGNF4 +line 1754 +;1754: if (newspeed < 0) +ADDRLP4 28 +INDIRF4 +CNSTF4 0 +GEF4 $744 +line 1755 +;1755: newspeed = 0; +ADDRLP4 28 +CNSTF4 0 +ASGNF4 +LABELV $744 +line 1756 +;1756: newspeed /= speed; +ADDRLP4 28 +ADDRLP4 28 +INDIRF4 +ADDRLP4 24 +INDIRF4 +DIVF4 +ASGNF4 +line 1758 +;1757: +;1758: VectorScale (pm->ps->velocity, newspeed, pm->ps->velocity); +ADDRLP4 72 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 76 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 76 +INDIRP4 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 80 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +ADDRLP4 80 +INDIRP4 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 1759 +;1759: } +LABELV $739 +line 1762 +;1760: +;1761: // accelerate +;1762: scale = PM_CmdScale( &pm->cmd ); +ADDRGP4 pm +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 68 +ADDRGP4 PM_CmdScale +CALLF4 +ASGNF4 +ADDRLP4 48 +ADDRLP4 68 +INDIRF4 +ASGNF4 +line 1763 +;1763: if (pm->cmd.buttons & BUTTON_ATTACK) { //turbo boost +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $746 +line 1764 +;1764: scale *= 10; +ADDRLP4 48 +CNSTF4 1092616192 +ADDRLP4 48 +INDIRF4 +MULF4 +ASGNF4 +line 1765 +;1765: } +LABELV $746 +line 1766 +;1766: if (pm->cmd.buttons & BUTTON_ALT_ATTACK) { //turbo boost +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $748 +line 1767 +;1767: scale *= 10; +ADDRLP4 48 +CNSTF4 1092616192 +ADDRLP4 48 +INDIRF4 +MULF4 +ASGNF4 +line 1768 +;1768: } +LABELV $748 +line 1770 +;1769: +;1770: fmove = pm->cmd.forwardmove; +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +ASGNF4 +line 1771 +;1771: smove = pm->cmd.rightmove; +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +ASGNF4 +line 1773 +;1772: +;1773: for (i=0 ; i<3 ; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $750 +line 1774 +;1774: wishvel[i] = pml.forward[i]*fmove + pml.right[i]*smove; +ADDRLP4 72 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +ADDRLP4 4 +ADDP4 +ADDRLP4 72 +INDIRI4 +ADDRGP4 pml +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDRLP4 72 +INDIRI4 +ADDRGP4 pml+12 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +LABELV $751 +line 1773 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $750 +line 1775 +;1775: wishvel[2] += pm->cmd.upmove; +ADDRLP4 4+8 +ADDRLP4 4+8 +INDIRF4 +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CVIF4 4 +ADDF4 +ASGNF4 +line 1777 +;1776: +;1777: VectorCopy (wishvel, wishdir); +ADDRLP4 32 +ADDRLP4 4 +INDIRB +ASGNB 12 +line 1778 +;1778: wishspeed = VectorNormalize(wishdir); +ADDRLP4 32 +ARGP4 +ADDRLP4 76 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 44 +ADDRLP4 76 +INDIRF4 +ASGNF4 +line 1779 +;1779: wishspeed *= scale; +ADDRLP4 44 +ADDRLP4 44 +INDIRF4 +ADDRLP4 48 +INDIRF4 +MULF4 +ASGNF4 +line 1781 +;1780: +;1781: PM_Accelerate( wishdir, wishspeed, pm_accelerate ); +ADDRLP4 32 +ARGP4 +ADDRLP4 44 +INDIRF4 +ARGF4 +ADDRGP4 pm_accelerate +INDIRF4 +ARGF4 +ADDRGP4 PM_Accelerate +CALLV +pop +line 1784 +;1782: +;1783: // move +;1784: VectorMA (pm->ps->origin, pml.frametime, pm->ps->velocity, pm->ps->origin); +ADDRLP4 80 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 84 +ADDRLP4 80 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +ADDRLP4 80 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 88 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 92 +ADDRLP4 88 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +ADDRLP4 92 +INDIRP4 +INDIRF4 +ADDRLP4 88 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 96 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 100 +ADDRLP4 96 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 100 +INDIRP4 +ADDRLP4 100 +INDIRP4 +INDIRF4 +ADDRLP4 96 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1785 +;1785:} +LABELV $737 +endproc PM_NoclipMove 104 12 +proc PM_FootstepForSurface 0 0 +line 1797 +;1786: +;1787://============================================================================ +;1788: +;1789:/* +;1790:================ +;1791:PM_FootstepForSurface +;1792: +;1793:Returns an event number apropriate for the groundsurface +;1794:================ +;1795:*/ +;1796:static int PM_FootstepForSurface( void ) +;1797:{ +line 1798 +;1798: if ( pml.groundTrace.surfaceFlags & SURF_NOSTEPS ) +ADDRGP4 pml+52+44 +INDIRI4 +CNSTI4 4194304 +BANDI4 +CNSTI4 0 +EQI4 $760 +line 1799 +;1799: { +line 1800 +;1800: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $759 +JUMPV +LABELV $760 +line 1802 +;1801: } +;1802: if ( pml.groundTrace.surfaceFlags & SURF_METALSTEPS ) +ADDRGP4 pml+52+44 +INDIRI4 +CNSTI4 32768 +BANDI4 +CNSTI4 0 +EQI4 $764 +line 1803 +;1803: { +line 1804 +;1804: return EV_FOOTSTEP_METAL; +CNSTI4 3 +RETI4 +ADDRGP4 $759 +JUMPV +LABELV $764 +line 1806 +;1805: } +;1806: return EV_FOOTSTEP; +CNSTI4 2 +RETI4 +LABELV $759 +endproc PM_FootstepForSurface 0 0 +proc PM_TryRoll 1208 28 +line 1810 +;1807:} +;1808: +;1809:static int PM_TryRoll( void ) +;1810:{ +line 1812 +;1811: trace_t trace; +;1812: int anim = -1; +ADDRLP4 36 +CNSTI4 -1 +ASGNI4 +line 1815 +;1813: vec3_t fwd, right, traceto, mins, maxs, fwdAngles; +;1814: +;1815: if ( BG_SaberInAttack( pm->ps->saberMove ) || BG_SaberInSpecialAttack( pm->ps->torsoAnim ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1156 +ADDRGP4 BG_SaberInAttack +CALLI4 +ASGNI4 +ADDRLP4 1156 +INDIRI4 +CNSTI4 0 +NEI4 $773 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1160 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 1160 +INDIRI4 +CNSTI4 0 +NEI4 $773 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1164 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 1164 +INDIRI4 +CNSTI4 0 +NEI4 $773 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1168 +ADDRGP4 PM_SaberInStart +CALLI4 +ASGNI4 +ADDRLP4 1168 +INDIRI4 +CNSTI4 0 +EQI4 $769 +LABELV $773 +line 1818 +;1816: || BG_SpinningSaberAnim( pm->ps->legsAnim ) +;1817: || PM_SaberInStart( pm->ps->saberMove ) ) +;1818: {//attacking or spinning (or, if player, starting an attack) +line 1819 +;1819: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $768 +JUMPV +LABELV $769 +line 1822 +;1820: } +;1821: +;1822: if (pm->ps->weapon != WP_SABER || BG_HasYsalamiri(pm->gametype, pm->ps) || +ADDRLP4 1172 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1176 +ADDRLP4 1172 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1176 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $777 +ADDRLP4 1172 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1176 +INDIRP4 +ARGP4 +ADDRLP4 1180 +ADDRGP4 BG_HasYsalamiri +CALLI4 +ASGNI4 +ADDRLP4 1180 +INDIRI4 +CNSTI4 0 +NEI4 $777 +ADDRLP4 1184 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1184 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1184 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 1184 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 1188 +ADDRGP4 BG_CanUseFPNow +CALLI4 +ASGNI4 +ADDRLP4 1188 +INDIRI4 +CNSTI4 0 +NEI4 $774 +LABELV $777 +line 1824 +;1823: !BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_LEVITATION)) +;1824: { //Not using saber, or can't use jump +line 1825 +;1825: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $768 +JUMPV +LABELV $774 +line 1828 +;1826: } +;1827: +;1828: VectorSet(mins, pm->mins[0],pm->mins[1],pm->mins[2]+STEPSIZE); +ADDRLP4 1192 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 1192 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 12+4 +ADDRLP4 1192 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 12+8 +ADDRGP4 pm +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRF4 +CNSTF4 1099956224 +ADDF4 +ASGNF4 +line 1829 +;1829: VectorSet(maxs, pm->maxs[0],pm->maxs[1],CROUCH_MAXS_2); +ADDRLP4 1196 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 24 +ADDRLP4 1196 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 24+4 +ADDRLP4 1196 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 24+8 +CNSTF4 1098907648 +ASGNF4 +line 1831 +;1830: +;1831: VectorSet(fwdAngles, 0, pm->ps->viewangles[YAW], 0); +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +ADDRLP4 0+4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 1833 +;1832: +;1833: AngleVectors( fwdAngles, fwd, right, NULL ); +ADDRLP4 0 +ARGP4 +ADDRLP4 52 +ARGP4 +ADDRLP4 64 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 1835 +;1834: +;1835: if ( pm->cmd.forwardmove ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $784 +line 1836 +;1836: { //check forward/backward rolls +line 1837 +;1837: if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $786 +line 1838 +;1838: { +line 1839 +;1839: anim = BOTH_ROLL_B; +ADDRLP4 36 +CNSTI4 886 +ASGNI4 +line 1840 +;1840: VectorMA( pm->ps->origin, -64, fwd, traceto ); +ADDRLP4 1200 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1204 +CNSTF4 3263168512 +ASGNF4 +ADDRLP4 40 +ADDRLP4 1200 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1204 +INDIRF4 +ADDRLP4 52 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 40+4 +ADDRLP4 1200 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1204 +INDIRF4 +ADDRLP4 52+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 40+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 3263168512 +ADDRLP4 52+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1841 +;1841: } +ADDRGP4 $785 +JUMPV +LABELV $786 +line 1843 +;1842: else +;1843: { +line 1844 +;1844: anim = BOTH_ROLL_F; +ADDRLP4 36 +CNSTI4 885 +ASGNI4 +line 1845 +;1845: VectorMA( pm->ps->origin, 64, fwd, traceto ); +ADDRLP4 1200 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1204 +CNSTF4 1115684864 +ASGNF4 +ADDRLP4 40 +ADDRLP4 1200 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1204 +INDIRF4 +ADDRLP4 52 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 40+4 +ADDRLP4 1200 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1204 +INDIRF4 +ADDRLP4 52+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 40+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1115684864 +ADDRLP4 52+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1846 +;1846: } +line 1847 +;1847: } +ADDRGP4 $785 +JUMPV +LABELV $784 +line 1848 +;1848: else if ( pm->cmd.rightmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $796 +line 1849 +;1849: { //right +line 1850 +;1850: anim = BOTH_ROLL_R; +ADDRLP4 36 +CNSTI4 888 +ASGNI4 +line 1851 +;1851: VectorMA( pm->ps->origin, 64, right, traceto ); +ADDRLP4 1200 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1204 +CNSTF4 1115684864 +ASGNF4 +ADDRLP4 40 +ADDRLP4 1200 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1204 +INDIRF4 +ADDRLP4 64 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 40+4 +ADDRLP4 1200 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1204 +INDIRF4 +ADDRLP4 64+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 40+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1115684864 +ADDRLP4 64+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1852 +;1852: } +ADDRGP4 $797 +JUMPV +LABELV $796 +line 1853 +;1853: else if ( pm->cmd.rightmove < 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $802 +line 1854 +;1854: { //left +line 1855 +;1855: anim = BOTH_ROLL_L; +ADDRLP4 36 +CNSTI4 887 +ASGNI4 +line 1856 +;1856: VectorMA( pm->ps->origin, -64, right, traceto ); +ADDRLP4 1200 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1204 +CNSTF4 3263168512 +ASGNF4 +ADDRLP4 40 +ADDRLP4 1200 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1204 +INDIRF4 +ADDRLP4 64 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 40+4 +ADDRLP4 1200 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1204 +INDIRF4 +ADDRLP4 64+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 40+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 3263168512 +ADDRLP4 64+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1857 +;1857: } +LABELV $802 +LABELV $797 +LABELV $785 +line 1859 +;1858: +;1859: if ( anim != -1 ) +ADDRLP4 36 +INDIRI4 +CNSTI4 -1 +EQI4 $808 +line 1860 +;1860: { //We want to roll. Perform a trace to see if we can, and if so, send us into one. +line 1861 +;1861: pm->trace( &trace, pm->ps->origin, mins, maxs, traceto, pm->ps->clientNum, CONTENTS_SOLID ); +ADDRLP4 76 +ARGP4 +ADDRLP4 1200 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1204 +ADDRLP4 1200 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1204 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 40 +ARGP4 +ADDRLP4 1204 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 1862 +;1862: if ( trace.fraction >= 1.0f ) +ADDRLP4 76+8 +INDIRF4 +CNSTF4 1065353216 +LTF4 $810 +line 1863 +;1863: { +line 1864 +;1864: pm->ps->saberMove = LS_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1865 +;1865: return anim; +ADDRLP4 36 +INDIRI4 +RETI4 +ADDRGP4 $768 +JUMPV +LABELV $810 +line 1867 +;1866: } +;1867: } +LABELV $808 +line 1868 +;1868: return 0; +CNSTI4 0 +RETI4 +LABELV $768 +endproc PM_TryRoll 1208 28 +proc PM_CrashLand 116 16 +line 1878 +;1869:} +;1870: +;1871:/* +;1872:================= +;1873:PM_CrashLand +;1874: +;1875:Check for hard landings that generate sound events +;1876:================= +;1877:*/ +;1878:static void PM_CrashLand( void ) { +line 1884 +;1879: float delta; +;1880: float dist; +;1881: float vel, acc; +;1882: float t; +;1883: float a, b, c, den; +;1884: qboolean didRoll = qfalse; +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +line 1887 +;1885: +;1886: // calculate the exact velocity on landing +;1887: dist = pm->ps->origin[2] - pml.previous_origin[2]; +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRGP4 pml+1136+8 +INDIRF4 +SUBF4 +ASGNF4 +line 1888 +;1888: vel = pml.previous_velocity[2]; +ADDRLP4 8 +ADDRGP4 pml+1148+8 +INDIRF4 +ASGNF4 +line 1889 +;1889: acc = -pm->ps->gravity; +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +NEGI4 +CVIF4 4 +ASGNF4 +line 1891 +;1890: +;1891: a = acc / 2; +ADDRLP4 16 +ADDRLP4 12 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 1892 +;1892: b = vel; +ADDRLP4 4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 1893 +;1893: c = -dist; +ADDRLP4 32 +ADDRLP4 24 +INDIRF4 +NEGF4 +ASGNF4 +line 1895 +;1894: +;1895: den = b * b - 4 * a * c; +ADDRLP4 20 +ADDRLP4 4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +CNSTF4 1082130432 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDRLP4 32 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 1896 +;1896: if ( den < 0 ) { +ADDRLP4 20 +INDIRF4 +CNSTF4 0 +GEF4 $818 +line 1897 +;1897: pm->ps->inAirAnim = qfalse; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1360 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1898 +;1898: return; +ADDRGP4 $813 +JUMPV +LABELV $818 +line 1900 +;1899: } +;1900: t = (-b - sqrt( den ) ) / ( 2 * a ); +ADDRLP4 20 +INDIRF4 +ARGF4 +ADDRLP4 44 +ADDRGP4 sqrt +CALLF4 +ASGNF4 +ADDRLP4 28 +ADDRLP4 4 +INDIRF4 +NEGF4 +ADDRLP4 44 +INDIRF4 +SUBF4 +CNSTF4 1073741824 +ADDRLP4 16 +INDIRF4 +MULF4 +DIVF4 +ASGNF4 +line 1902 +;1901: +;1902: delta = vel + t * acc; +ADDRLP4 0 +ADDRLP4 8 +INDIRF4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1903 +;1903: delta = delta*delta * 0.0001; +ADDRLP4 0 +CNSTF4 953267991 +ADDRLP4 0 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +line 1906 +;1904: +;1905: // ducking while falling doubles damage +;1906: if ( pm->ps->pm_flags & PMF_DUCKED ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $820 +line 1907 +;1907: delta *= 2; +ADDRLP4 0 +CNSTF4 1073741824 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 1908 +;1908: } +LABELV $820 +line 1911 +;1909: +;1910: // decide which landing animation to use +;1911: if (!BG_InRoll(pm->ps, pm->ps->legsAnim) && pm->ps->inAirAnim) +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ARGP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 56 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 60 +CNSTI4 0 +ASGNI4 +ADDRLP4 56 +INDIRI4 +ADDRLP4 60 +INDIRI4 +NEI4 $822 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1360 +ADDP4 +INDIRI4 +ADDRLP4 60 +INDIRI4 +EQI4 $822 +line 1912 +;1912: { //only play a land animation if we transitioned into an in-air animation while off the ground +line 1913 +;1913: if (!BG_SaberInSpecial(pm->ps->saberMove)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 64 +ADDRGP4 BG_SaberInSpecial +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 0 +NEI4 $824 +line 1914 +;1914: { +line 1915 +;1915: if ( pm->ps->pm_flags & PMF_BACKWARDS_JUMP ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 8 +BANDI4 +CNSTI4 0 +EQI4 $826 +line 1916 +;1916: PM_ForceLegsAnim( BOTH_LANDBACK1 ); +CNSTI4 862 +ARGI4 +ADDRGP4 PM_ForceLegsAnim +CALLV +pop +line 1917 +;1917: } else { +ADDRGP4 $827 +JUMPV +LABELV $826 +line 1918 +;1918: PM_ForceLegsAnim( BOTH_LAND1 ); +CNSTI4 858 +ARGI4 +ADDRGP4 PM_ForceLegsAnim +CALLV +pop +line 1919 +;1919: } +LABELV $827 +line 1920 +;1920: } +LABELV $824 +line 1921 +;1921: } +LABELV $822 +line 1923 +;1922: +;1923: if (pm->ps->weapon != WP_SABER) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +EQI4 $828 +line 1924 +;1924: { //saber handles its own anims +line 1926 +;1925: //This will push us back into our weaponready stance from the land anim. +;1926: if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1) +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $830 +ADDRLP4 64 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $830 +line 1927 +;1927: { +line 1928 +;1928: PM_StartTorsoAnim( TORSO_WEAPONREADY4 ); +CNSTI4 1102 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 1929 +;1929: } +ADDRGP4 $831 +JUMPV +LABELV $830 +line 1931 +;1930: else +;1931: { +line 1932 +;1932: if (pm->ps->weapon == WP_EMPLACED_GUN) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $832 +line 1933 +;1933: { +line 1934 +;1934: PM_StartTorsoAnim( BOTH_GUNSIT1 ); +CNSTI4 810 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 1935 +;1935: } +ADDRGP4 $833 +JUMPV +LABELV $832 +line 1937 +;1936: else +;1937: { +line 1938 +;1938: PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 WeaponReadyAnim +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 1939 +;1939: } +LABELV $833 +line 1940 +;1940: } +LABELV $831 +line 1941 +;1941: } +LABELV $828 +line 1943 +;1942: +;1943: if (!BG_InSpecialJump(pm->ps->legsAnim) || +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 64 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 0 +EQI4 $838 +ADDRLP4 68 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 1 +LTI4 $838 +ADDRLP4 72 +ADDRLP4 68 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 918 +EQI4 $838 +ADDRLP4 72 +INDIRI4 +CNSTI4 915 +NEI4 $834 +LABELV $838 +line 1947 +;1944: pm->ps->legsTimer < 1 || +;1945: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT || +;1946: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT) +;1947: { //Only set the timer if we're in an anim that can be interrupted (this would not be, say, a flip) +line 1948 +;1948: if (!BG_InRoll(pm->ps, pm->ps->legsAnim) && pm->ps->inAirAnim) +ADDRLP4 76 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ARGP4 +ADDRLP4 76 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 80 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 84 +CNSTI4 0 +ASGNI4 +ADDRLP4 80 +INDIRI4 +ADDRLP4 84 +INDIRI4 +NEI4 $839 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1360 +ADDP4 +INDIRI4 +ADDRLP4 84 +INDIRI4 +EQI4 $839 +line 1949 +;1949: { +line 1950 +;1950: if (!BG_SaberInSpecial(pm->ps->saberMove) || pm->ps->weapon != WP_SABER) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 BG_SaberInSpecial +CALLI4 +ASGNI4 +ADDRLP4 88 +INDIRI4 +CNSTI4 0 +EQI4 $843 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +EQI4 $841 +LABELV $843 +line 1951 +;1951: { +line 1952 +;1952: pm->ps->legsTimer = TIMER_LAND; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 130 +ASGNI4 +line 1953 +;1953: } +LABELV $841 +line 1954 +;1954: } +LABELV $839 +line 1955 +;1955: } +LABELV $834 +line 1957 +;1956: +;1957: pm->ps->inAirAnim = qfalse; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1360 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1960 +;1958: +;1959: // never take falling damage if completely underwater +;1960: if ( pm->waterlevel == 3 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $844 +line 1961 +;1961: return; +ADDRGP4 $813 +JUMPV +LABELV $844 +line 1965 +;1962: } +;1963: +;1964: // reduce falling damage if there is standing water +;1965: if ( pm->waterlevel == 2 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $846 +line 1966 +;1966: delta *= 0.25; +ADDRLP4 0 +CNSTF4 1048576000 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 1967 +;1967: } +LABELV $846 +line 1968 +;1968: if ( pm->waterlevel == 1 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $848 +line 1969 +;1969: delta *= 0.5; +ADDRLP4 0 +CNSTF4 1056964608 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 1970 +;1970: } +LABELV $848 +line 1972 +;1971: +;1972: if ( delta < 1 ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 1065353216 +GEF4 $850 +line 1973 +;1973: return; +ADDRGP4 $813 +JUMPV +LABELV $850 +line 1976 +;1974: } +;1975: +;1976: if ( pm->ps->pm_flags & PMF_DUCKED ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $852 +line 1977 +;1977: { +line 1978 +;1978: if( delta >= 2 && !PM_InOnGroundAnim( pm->ps->legsAnim ) && !PM_InKnockDown( pm->ps ) && !BG_InRoll(pm->ps, pm->ps->legsAnim) && +ADDRLP4 0 +INDIRF4 +CNSTF4 1073741824 +LTF4 $854 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 PM_InOnGroundAnim +CALLI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +NEI4 $854 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 80 +ADDRGP4 PM_InKnockDown +CALLI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 0 +NEI4 $854 +ADDRLP4 84 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +ARGP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 92 +CNSTI4 0 +ASGNI4 +ADDRLP4 88 +INDIRI4 +ADDRLP4 92 +INDIRI4 +NEI4 $854 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRI4 +ADDRLP4 92 +INDIRI4 +NEI4 $854 +line 1980 +;1979: pm->ps->forceHandExtend == HANDEXTEND_NONE ) +;1980: {//roll! +line 1981 +;1981: int anim = PM_TryRoll(); +ADDRLP4 100 +ADDRGP4 PM_TryRoll +CALLI4 +ASGNI4 +ADDRLP4 96 +ADDRLP4 100 +INDIRI4 +ASGNI4 +line 1983 +;1982: +;1983: if (PM_InRollComplete(pm->ps, pm->ps->legsAnim)) +ADDRLP4 104 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 104 +INDIRP4 +ARGP4 +ADDRLP4 104 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 108 +ADDRGP4 PM_InRollComplete +CALLI4 +ASGNI4 +ADDRLP4 108 +INDIRI4 +CNSTI4 0 +EQI4 $856 +line 1984 +;1984: { +line 1985 +;1985: anim = 0; +ADDRLP4 96 +CNSTI4 0 +ASGNI4 +line 1986 +;1986: pm->ps->legsTimer = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1987 +;1987: pm->ps->legsAnim = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1988 +;1988: PM_SetAnim(SETANIM_BOTH,BOTH_LAND1,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150); +ADDRLP4 112 +CNSTI4 3 +ASGNI4 +ADDRLP4 112 +INDIRI4 +ARGI4 +CNSTI4 858 +ARGI4 +ADDRLP4 112 +INDIRI4 +ARGI4 +CNSTI4 150 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1989 +;1989: pm->ps->legsTimer = TIMER_LAND; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 130 +ASGNI4 +line 1990 +;1990: } +LABELV $856 +line 1992 +;1991: +;1992: if ( anim ) +ADDRLP4 96 +INDIRI4 +CNSTI4 0 +EQI4 $858 +line 1993 +;1993: {//absorb some impact +line 1994 +;1994: pm->ps->legsTimer = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1995 +;1995: delta /= 3; // /= 2 just cancels out the above delta *= 2 when landing while crouched, the roll itself should absorb a little damage +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1077936128 +DIVF4 +ASGNF4 +line 1996 +;1996: pm->ps->legsAnim = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1997 +;1997: PM_SetAnim(SETANIM_BOTH,anim,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150); +ADDRLP4 112 +CNSTI4 3 +ASGNI4 +ADDRLP4 112 +INDIRI4 +ARGI4 +ADDRLP4 96 +INDIRI4 +ARGI4 +ADDRLP4 112 +INDIRI4 +ARGI4 +CNSTI4 150 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1998 +;1998: didRoll = qtrue; +ADDRLP4 36 +CNSTI4 1 +ASGNI4 +line 1999 +;1999: } +LABELV $858 +line 2000 +;2000: } +LABELV $854 +line 2001 +;2001: } +LABELV $852 +line 2005 +;2002: +;2003: // SURF_NODAMAGE is used for bounce pads where you don't ever +;2004: // want to take damage or play a crunch sound +;2005: if ( !(pml.groundTrace.surfaceFlags & SURF_NODAMAGE) ) { +ADDRGP4 pml+52+44 +INDIRI4 +CNSTI4 262144 +BANDI4 +CNSTI4 0 +NEI4 $860 +line 2006 +;2006: if (delta > 7) +ADDRLP4 0 +INDIRF4 +CNSTF4 1088421888 +LEF4 $864 +line 2007 +;2007: { +line 2008 +;2008: int delta_send = (int)delta; +ADDRLP4 76 +ADDRLP4 0 +INDIRF4 +CVFI4 4 +ASGNI4 +line 2010 +;2009: +;2010: if (delta_send > 600) +ADDRLP4 76 +INDIRI4 +CNSTI4 600 +LEI4 $866 +line 2011 +;2011: { //will never need to know any value above this +line 2012 +;2012: delta_send = 600; +ADDRLP4 76 +CNSTI4 600 +ASGNI4 +line 2013 +;2013: } +LABELV $866 +line 2015 +;2014: +;2015: if (pm->ps->fd.forceJumpZStart) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1092 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $868 +line 2016 +;2016: { +line 2017 +;2017: if ((int)pm->ps->origin[2] >= (int)pm->ps->fd.forceJumpZStart) +ADDRLP4 80 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CVFI4 4 +ADDRLP4 80 +INDIRP4 +CNSTI4 1092 +ADDP4 +INDIRF4 +CVFI4 4 +LTI4 $870 +line 2018 +;2018: { //was force jumping, landed on higher or same level as when force jump was started +line 2019 +;2019: if (delta_send > 8) +ADDRLP4 76 +INDIRI4 +CNSTI4 8 +LEI4 $871 +line 2020 +;2020: { +line 2021 +;2021: delta_send = 8; +ADDRLP4 76 +CNSTI4 8 +ASGNI4 +line 2022 +;2022: } +line 2023 +;2023: } +ADDRGP4 $871 +JUMPV +LABELV $870 +line 2025 +;2024: else +;2025: { +line 2026 +;2026: if (delta_send > 8) +ADDRLP4 76 +INDIRI4 +CNSTI4 8 +LEI4 $874 +line 2027 +;2027: { +line 2028 +;2028: int dif = ((int)pm->ps->fd.forceJumpZStart - (int)pm->ps->origin[2]); +ADDRLP4 92 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 88 +ADDRLP4 92 +INDIRP4 +CNSTI4 1092 +ADDP4 +INDIRF4 +CVFI4 4 +ADDRLP4 92 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CVFI4 4 +SUBI4 +ASGNI4 +line 2029 +;2029: int dmgLess = (forceJumpHeight[pm->ps->fd.forcePowerLevel[FP_LEVITATION]] - dif); +ADDRLP4 84 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forceJumpHeight +ADDP4 +INDIRF4 +ADDRLP4 88 +INDIRI4 +CVIF4 4 +SUBF4 +CVFI4 4 +ASGNI4 +line 2031 +;2030: +;2031: if (dmgLess < 0) +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +GEI4 $876 +line 2032 +;2032: { +line 2033 +;2033: dmgLess = 0; +ADDRLP4 84 +CNSTI4 0 +ASGNI4 +line 2034 +;2034: } +LABELV $876 +line 2036 +;2035: +;2036: delta_send -= (dmgLess*0.3); +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CVIF4 4 +CNSTF4 1050253722 +ADDRLP4 84 +INDIRI4 +CVIF4 4 +MULF4 +SUBF4 +CVFI4 4 +ASGNI4 +line 2038 +;2037: +;2038: if (delta_send < 8) +ADDRLP4 76 +INDIRI4 +CNSTI4 8 +GEI4 $878 +line 2039 +;2039: { +line 2040 +;2040: delta_send = 8; +ADDRLP4 76 +CNSTI4 8 +ASGNI4 +line 2041 +;2041: } +LABELV $878 +line 2044 +;2042: +;2043: //Com_Printf("Damage sub: %i\n", (int)((dmgLess*0.1))); +;2044: } +LABELV $874 +line 2045 +;2045: } +LABELV $871 +line 2046 +;2046: } +LABELV $868 +line 2048 +;2047: +;2048: if (didRoll) +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +EQI4 $880 +line 2049 +;2049: { //Add the appropriate event.. +line 2050 +;2050: PM_AddEventWithParm( EV_ROLL, delta_send ); +CNSTI4 15 +ARGI4 +ADDRLP4 76 +INDIRI4 +ARGI4 +ADDRGP4 PM_AddEventWithParm +CALLV +pop +line 2051 +;2051: } +ADDRGP4 $865 +JUMPV +LABELV $880 +line 2053 +;2052: else +;2053: { +line 2054 +;2054: PM_AddEventWithParm( EV_FALL, delta_send ); +CNSTI4 11 +ARGI4 +ADDRLP4 76 +INDIRI4 +ARGI4 +ADDRGP4 PM_AddEventWithParm +CALLV +pop +line 2055 +;2055: } +line 2056 +;2056: } +ADDRGP4 $865 +JUMPV +LABELV $864 +line 2058 +;2057: else +;2058: { +line 2059 +;2059: if (didRoll) +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +EQI4 $882 +line 2060 +;2060: { +line 2061 +;2061: PM_AddEventWithParm( EV_ROLL, 0 ); +CNSTI4 15 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 PM_AddEventWithParm +CALLV +pop +line 2062 +;2062: } +ADDRGP4 $883 +JUMPV +LABELV $882 +line 2064 +;2063: else +;2064: { +line 2065 +;2065: PM_AddEvent( PM_FootstepForSurface() ); +ADDRLP4 76 +ADDRGP4 PM_FootstepForSurface +CALLI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 2066 +;2066: } +LABELV $883 +line 2067 +;2067: } +LABELV $865 +line 2068 +;2068: } +LABELV $860 +line 2071 +;2069: +;2070: // make sure velocity resets so we don't bounce back up again in case we miss the clear elsewhere +;2071: pm->ps->velocity[2] = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 0 +ASGNF4 +line 2074 +;2072: +;2073: // start footstep cycle over +;2074: pm->ps->bobCycle = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2075 +;2075:} +LABELV $813 +endproc PM_CrashLand 116 16 +proc PM_CorrectAllSolid 36 28 +line 2082 +;2076: +;2077:/* +;2078:============= +;2079:PM_CorrectAllSolid +;2080:============= +;2081:*/ +;2082:static int PM_CorrectAllSolid( trace_t *trace ) { +line 2086 +;2083: int i, j, k; +;2084: vec3_t point; +;2085: +;2086: if ( pm->debugLevel ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $885 +line 2087 +;2087: Com_Printf("%i:allsolid\n", c_pmove); +ADDRGP4 $887 +ARGP4 +ADDRGP4 c_pmove +INDIRI4 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 2088 +;2088: } +LABELV $885 +line 2091 +;2089: +;2090: // jitter around +;2091: for (i = -1; i <= 1; i++) { +ADDRLP4 20 +CNSTI4 -1 +ASGNI4 +LABELV $888 +line 2092 +;2092: for (j = -1; j <= 1; j++) { +ADDRLP4 16 +CNSTI4 -1 +ASGNI4 +LABELV $892 +line 2093 +;2093: for (k = -1; k <= 1; k++) { +ADDRLP4 12 +CNSTI4 -1 +ASGNI4 +LABELV $896 +line 2094 +;2094: VectorCopy(pm->ps->origin, point); +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 2095 +;2095: point[0] += (float) i; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 20 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 2096 +;2096: point[1] += (float) j; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 2097 +;2097: point[2] += (float) k; +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 2098 +;2098: pm->trace (trace, point, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 24 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 2099 +;2099: if ( !trace->allsolid ) { +ADDRFP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $902 +line 2100 +;2100: point[0] = pm->ps->origin[0]; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ASGNF4 +line 2101 +;2101: point[1] = pm->ps->origin[1]; +ADDRLP4 0+4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ASGNF4 +line 2102 +;2102: point[2] = pm->ps->origin[2] - 0.25; +ADDRLP4 0+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1048576000 +SUBF4 +ASGNF4 +line 2104 +;2103: +;2104: pm->trace (trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 32 +ADDRLP4 28 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 28 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 28 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 2105 +;2105: pml.groundTrace = *trace; +ADDRGP4 pml+52 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 1080 +line 2106 +;2106: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $884 +JUMPV +LABELV $902 +line 2108 +;2107: } +;2108: } +LABELV $897 +line 2093 +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +LEI4 $896 +line 2109 +;2109: } +LABELV $893 +line 2092 +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +LEI4 $892 +line 2110 +;2110: } +LABELV $889 +line 2091 +ADDRLP4 20 +ADDRLP4 20 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 1 +LEI4 $888 +line 2112 +;2111: +;2112: pm->ps->groundEntityNum = ENTITYNUM_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 1023 +ASGNI4 +line 2113 +;2113: pml.groundPlane = qfalse; +ADDRGP4 pml+48 +CNSTI4 0 +ASGNI4 +line 2114 +;2114: pml.walking = qfalse; +ADDRGP4 pml+44 +CNSTI4 0 +ASGNI4 +line 2116 +;2115: +;2116: return qfalse; +CNSTI4 0 +RETI4 +LABELV $884 +endproc PM_CorrectAllSolid 36 28 +proc PM_GroundTraceMissed 1112 28 +line 2126 +;2117:} +;2118: +;2119:/* +;2120:============= +;2121:PM_GroundTraceMissed +;2122: +;2123:The ground trace didn't hit a surface, so we are in freefall +;2124:============= +;2125:*/ +;2126:static void PM_GroundTraceMissed( void ) { +line 2132 +;2127: trace_t trace; +;2128: vec3_t point; +;2129: +;2130: //rww - don't want to do this when handextend_choke, because you can be standing on the ground +;2131: //while still holding your throat. +;2132: if ( pm->ps->pm_type == PM_FLOAT ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $910 +line 2133 +;2133: { +line 2135 +;2134: //we're assuming this is because you're being choked +;2135: int parts = SETANIM_LEGS; +ADDRLP4 1092 +CNSTI4 2 +ASGNI4 +line 2139 +;2136: +;2137: //rww - also don't use SETANIM_FLAG_HOLD, it will cause the legs to float around a bit before going into +;2138: //a proper anim even when on the ground. +;2139: PM_SetAnim(parts, BOTH_CHOKE3, SETANIM_FLAG_OVERRIDE, 100); +ADDRLP4 1092 +INDIRI4 +ARGI4 +CNSTI4 1032 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2140 +;2140: } +ADDRGP4 $911 +JUMPV +LABELV $910 +line 2142 +;2141: //If the anim is choke3, act like we just went into the air because we aren't in a float +;2142: else if ( pm->ps->groundEntityNum != ENTITYNUM_NONE || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_CHOKE3 ) +ADDRLP4 1092 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +NEI4 $914 +ADDRLP4 1092 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 1032 +NEI4 $912 +LABELV $914 +line 2143 +;2143: { +line 2145 +;2144: // we just transitioned into freefall +;2145: if ( pm->debugLevel ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $915 +line 2146 +;2146: Com_Printf("%i:lift\n", c_pmove); +ADDRGP4 $917 +ARGP4 +ADDRGP4 c_pmove +INDIRI4 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 2147 +;2147: } +LABELV $915 +line 2151 +;2148: +;2149: // if they aren't in a jumping animation and the ground is a ways away, force into it +;2150: // if we didn't do the trace, the player would be backflipping down staircases +;2151: VectorCopy( pm->ps->origin, point ); +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 2152 +;2152: point[2] -= 64; +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1115684864 +SUBF4 +ASGNF4 +line 2154 +;2153: +;2154: pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask); +ADDRLP4 12 +ARGP4 +ADDRLP4 1096 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1100 +ADDRLP4 1096 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1100 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1100 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 2155 +;2155: if ( trace.fraction == 1.0 || pm->ps->pm_type == PM_FLOAT ) { +ADDRLP4 12+8 +INDIRF4 +CNSTF4 1065353216 +EQF4 $922 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $913 +LABELV $922 +line 2156 +;2156: if ( pm->ps->velocity[2] <= 0 && !(pm->ps->pm_flags&PMF_JUMP_HELD)) +ADDRLP4 1104 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1104 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 0 +GTF4 $923 +ADDRLP4 1104 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +NEI4 $923 +line 2157 +;2157: { +line 2158 +;2158: PM_SetAnim(SETANIM_LEGS,BOTH_INAIR1,SETANIM_FLAG_OVERRIDE, 100); +CNSTI4 2 +ARGI4 +CNSTI4 857 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2159 +;2159: pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ADDRLP4 1108 +INDIRP4 +INDIRI4 +CNSTI4 -9 +BANDI4 +ASGNI4 +line 2160 +;2160: } +ADDRGP4 $924 +JUMPV +LABELV $923 +line 2161 +;2161: else if ( pm->cmd.forwardmove >= 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LTI4 $925 +line 2162 +;2162: { +line 2163 +;2163: PM_SetAnim(SETANIM_LEGS,BOTH_JUMP1,SETANIM_FLAG_OVERRIDE, 100); +CNSTI4 2 +ARGI4 +CNSTI4 856 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2164 +;2164: pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ADDRLP4 1108 +INDIRP4 +INDIRI4 +CNSTI4 -9 +BANDI4 +ASGNI4 +line 2165 +;2165: } +ADDRGP4 $926 +JUMPV +LABELV $925 +line 2167 +;2166: else +;2167: { +line 2168 +;2168: PM_SetAnim(SETANIM_LEGS,BOTH_JUMPBACK1,SETANIM_FLAG_OVERRIDE, 100); +CNSTI4 2 +ARGI4 +CNSTI4 860 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2169 +;2169: pm->ps->pm_flags |= PMF_BACKWARDS_JUMP; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ADDRLP4 1108 +INDIRP4 +INDIRI4 +CNSTI4 8 +BORI4 +ASGNI4 +line 2170 +;2170: } +LABELV $926 +LABELV $924 +line 2172 +;2171: +;2172: pm->ps->inAirAnim = qtrue; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1360 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2173 +;2173: } +line 2174 +;2174: } +ADDRGP4 $913 +JUMPV +LABELV $912 +line 2175 +;2175: else if (!pm->ps->inAirAnim) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1360 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $927 +line 2176 +;2176: { +line 2179 +;2177: // if they aren't in a jumping animation and the ground is a ways away, force into it +;2178: // if we didn't do the trace, the player would be backflipping down staircases +;2179: VectorCopy( pm->ps->origin, point ); +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 2180 +;2180: point[2] -= 64; +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1115684864 +SUBF4 +ASGNF4 +line 2182 +;2181: +;2182: pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask); +ADDRLP4 12 +ARGP4 +ADDRLP4 1096 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1100 +ADDRLP4 1096 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1100 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1100 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 2183 +;2183: if ( trace.fraction == 1.0 || pm->ps->pm_type == PM_FLOAT ) +ADDRLP4 12+8 +INDIRF4 +CNSTF4 1065353216 +EQF4 $933 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $930 +LABELV $933 +line 2184 +;2184: { +line 2185 +;2185: pm->ps->inAirAnim = qtrue; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1360 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2186 +;2186: } +LABELV $930 +line 2187 +;2187: } +LABELV $927 +LABELV $913 +LABELV $911 +line 2189 +;2188: +;2189: if (PM_InRollComplete(pm->ps, pm->ps->legsAnim)) +ADDRLP4 1096 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1096 +INDIRP4 +ARGP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1100 +ADDRGP4 PM_InRollComplete +CALLI4 +ASGNI4 +ADDRLP4 1100 +INDIRI4 +CNSTI4 0 +EQI4 $934 +line 2190 +;2190: { //Client won't catch an animation restart because it only checks frame against incoming frame, so if you roll when you land after rolling +line 2192 +;2191: //off of something it won't replay the roll anim unless we switch it off in the air. This fixes that. +;2192: PM_SetAnim(SETANIM_BOTH,BOTH_INAIR1,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150); +ADDRLP4 1104 +CNSTI4 3 +ASGNI4 +ADDRLP4 1104 +INDIRI4 +ARGI4 +CNSTI4 857 +ARGI4 +ADDRLP4 1104 +INDIRI4 +ARGI4 +CNSTI4 150 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2193 +;2193: pm->ps->inAirAnim = qtrue; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1360 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2194 +;2194: } +LABELV $934 +line 2196 +;2195: +;2196: pm->ps->groundEntityNum = ENTITYNUM_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 1023 +ASGNI4 +line 2197 +;2197: pml.groundPlane = qfalse; +ADDRGP4 pml+48 +CNSTI4 0 +ASGNI4 +line 2198 +;2198: pml.walking = qfalse; +ADDRGP4 pml+44 +CNSTI4 0 +ASGNI4 +line 2199 +;2199:} +LABELV $909 +endproc PM_GroundTraceMissed 1112 28 +proc PM_GroundTrace 1112 28 +line 2207 +;2200: +;2201: +;2202:/* +;2203:============= +;2204:PM_GroundTrace +;2205:============= +;2206:*/ +;2207:static void PM_GroundTrace( void ) { +line 2211 +;2208: vec3_t point; +;2209: trace_t trace; +;2210: +;2211: point[0] = pm->ps->origin[0]; +ADDRLP4 1080 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ASGNF4 +line 2212 +;2212: point[1] = pm->ps->origin[1]; +ADDRLP4 1080+4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ASGNF4 +line 2213 +;2213: point[2] = pm->ps->origin[2] - 0.25; +ADDRLP4 1080+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1048576000 +SUBF4 +ASGNF4 +line 2215 +;2214: +;2215: pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask); +ADDRLP4 0 +ARGP4 +ADDRLP4 1092 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1096 +ADDRLP4 1092 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 1080 +ARGP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 2216 +;2216: pml.groundTrace = trace; +ADDRGP4 pml+52 +ADDRLP4 0 +INDIRB +ASGNB 1080 +line 2219 +;2217: +;2218: // do something corrective if the trace starts in a solid... +;2219: if ( trace.allsolid ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $942 +line 2220 +;2220: if ( !PM_CorrectAllSolid(&trace) ) +ADDRLP4 0 +ARGP4 +ADDRLP4 1100 +ADDRGP4 PM_CorrectAllSolid +CALLI4 +ASGNI4 +ADDRLP4 1100 +INDIRI4 +CNSTI4 0 +NEI4 $944 +line 2221 +;2221: return; +ADDRGP4 $938 +JUMPV +LABELV $944 +line 2222 +;2222: } +LABELV $942 +line 2224 +;2223: +;2224: if (pm->ps->pm_type == PM_FLOAT) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $946 +line 2225 +;2225: { +line 2226 +;2226: PM_GroundTraceMissed(); +ADDRGP4 PM_GroundTraceMissed +CALLV +pop +line 2227 +;2227: pml.groundPlane = qfalse; +ADDRGP4 pml+48 +CNSTI4 0 +ASGNI4 +line 2228 +;2228: pml.walking = qfalse; +ADDRGP4 pml+44 +CNSTI4 0 +ASGNI4 +line 2229 +;2229: return; +ADDRGP4 $938 +JUMPV +LABELV $946 +line 2233 +;2230: } +;2231: +;2232: // if the trace didn't hit anything, we are in free fall +;2233: if ( trace.fraction == 1.0 ) { +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1065353216 +NEF4 $950 +line 2234 +;2234: PM_GroundTraceMissed(); +ADDRGP4 PM_GroundTraceMissed +CALLV +pop +line 2235 +;2235: pml.groundPlane = qfalse; +ADDRGP4 pml+48 +CNSTI4 0 +ASGNI4 +line 2236 +;2236: pml.walking = qfalse; +ADDRGP4 pml+44 +CNSTI4 0 +ASGNI4 +line 2237 +;2237: return; +ADDRGP4 $938 +JUMPV +LABELV $950 +line 2241 +;2238: } +;2239: +;2240: // check if getting thrown off the ground +;2241: if ( pm->ps->velocity[2] > 0 && DotProduct( pm->ps->velocity, trace.plane.normal ) > 10 ) { +ADDRLP4 1100 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1104 +ADDRLP4 1100 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1104 +INDIRF4 +CNSTF4 0 +LEF4 $955 +ADDRLP4 1100 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 0+24 +INDIRF4 +MULF4 +ADDRLP4 1100 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 0+24+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 1104 +INDIRF4 +ADDRLP4 0+24+8 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 1092616192 +LEF4 $955 +line 2242 +;2242: if ( pm->debugLevel ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $962 +line 2243 +;2243: Com_Printf("%i:kickoff\n", c_pmove); +ADDRGP4 $964 +ARGP4 +ADDRGP4 c_pmove +INDIRI4 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 2244 +;2244: } +LABELV $962 +line 2246 +;2245: // go into jump animation +;2246: if ( pm->cmd.forwardmove >= 0 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LTI4 $965 +line 2247 +;2247: PM_ForceLegsAnim( BOTH_JUMP1 ); +CNSTI4 856 +ARGI4 +ADDRGP4 PM_ForceLegsAnim +CALLV +pop +line 2248 +;2248: pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ADDRLP4 1108 +INDIRP4 +INDIRI4 +CNSTI4 -9 +BANDI4 +ASGNI4 +line 2249 +;2249: } else { +ADDRGP4 $966 +JUMPV +LABELV $965 +line 2250 +;2250: PM_ForceLegsAnim( BOTH_JUMPBACK1 ); +CNSTI4 860 +ARGI4 +ADDRGP4 PM_ForceLegsAnim +CALLV +pop +line 2251 +;2251: pm->ps->pm_flags |= PMF_BACKWARDS_JUMP; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ADDRLP4 1108 +INDIRP4 +INDIRI4 +CNSTI4 8 +BORI4 +ASGNI4 +line 2252 +;2252: } +LABELV $966 +line 2254 +;2253: +;2254: pm->ps->groundEntityNum = ENTITYNUM_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 1023 +ASGNI4 +line 2255 +;2255: pml.groundPlane = qfalse; +ADDRGP4 pml+48 +CNSTI4 0 +ASGNI4 +line 2256 +;2256: pml.walking = qfalse; +ADDRGP4 pml+44 +CNSTI4 0 +ASGNI4 +line 2257 +;2257: return; +ADDRGP4 $938 +JUMPV +LABELV $955 +line 2261 +;2258: } +;2259: +;2260: // slopes that are too steep will not be considered onground +;2261: if ( trace.plane.normal[2] < MIN_WALK_NORMAL ) { +ADDRLP4 0+24+8 +INDIRF4 +CNSTF4 1060320051 +GEF4 $969 +line 2262 +;2262: if ( pm->debugLevel ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $973 +line 2263 +;2263: Com_Printf("%i:steep\n", c_pmove); +ADDRGP4 $975 +ARGP4 +ADDRGP4 c_pmove +INDIRI4 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 2264 +;2264: } +LABELV $973 +line 2265 +;2265: pm->ps->groundEntityNum = ENTITYNUM_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 1023 +ASGNI4 +line 2266 +;2266: pml.groundPlane = qtrue; +ADDRGP4 pml+48 +CNSTI4 1 +ASGNI4 +line 2267 +;2267: pml.walking = qfalse; +ADDRGP4 pml+44 +CNSTI4 0 +ASGNI4 +line 2268 +;2268: return; +ADDRGP4 $938 +JUMPV +LABELV $969 +line 2271 +;2269: } +;2270: +;2271: pml.groundPlane = qtrue; +ADDRGP4 pml+48 +CNSTI4 1 +ASGNI4 +line 2272 +;2272: pml.walking = qtrue; +ADDRGP4 pml+44 +CNSTI4 1 +ASGNI4 +line 2275 +;2273: +;2274: // hitting solid ground will end a waterjump +;2275: if (pm->ps->pm_flags & PMF_TIME_WATERJUMP) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $980 +line 2276 +;2276: { +line 2277 +;2277: pm->ps->pm_flags &= ~(PMF_TIME_WATERJUMP | PMF_TIME_LAND); +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ADDRLP4 1108 +INDIRP4 +INDIRI4 +CNSTI4 -289 +BANDI4 +ASGNI4 +line 2278 +;2278: pm->ps->pm_time = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2279 +;2279: } +LABELV $980 +line 2281 +;2280: +;2281: if ( pm->ps->groundEntityNum == ENTITYNUM_NONE ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +NEI4 $982 +line 2283 +;2282: // just hit the ground +;2283: if ( pm->debugLevel ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $984 +line 2284 +;2284: Com_Printf("%i:Land\n", c_pmove); +ADDRGP4 $986 +ARGP4 +ADDRGP4 c_pmove +INDIRI4 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 2285 +;2285: } +LABELV $984 +line 2287 +;2286: +;2287: PM_CrashLand(); +ADDRGP4 PM_CrashLand +CALLV +pop +line 2290 +;2288: +;2289: // don't do landing time if we were just going down a slope +;2290: if ( pml.previous_velocity[2] < -200 ) { +ADDRGP4 pml+1148+8 +INDIRF4 +CNSTF4 3276275712 +GEF4 $987 +line 2292 +;2291: // don't allow another jump for a little while +;2292: pm->ps->pm_flags |= PMF_TIME_LAND; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ADDRLP4 1108 +INDIRP4 +INDIRI4 +CNSTI4 32 +BORI4 +ASGNI4 +line 2293 +;2293: pm->ps->pm_time = 250; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTI4 250 +ASGNI4 +line 2294 +;2294: } +LABELV $987 +line 2295 +;2295: } +LABELV $982 +line 2297 +;2296: +;2297: pm->ps->groundEntityNum = trace.entityNum; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +ADDRLP4 0+52 +INDIRI4 +ASGNI4 +line 2298 +;2298: pm->ps->lastOnGround = pm->cmd.serverTime; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +INDIRP4 +CNSTI4 500 +ADDP4 +ADDRLP4 1108 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 2300 +;2299: +;2300: PM_AddTouchEnt( trace.entityNum ); +ADDRLP4 0+52 +INDIRI4 +ARGI4 +ADDRGP4 PM_AddTouchEnt +CALLV +pop +line 2301 +;2301:} +LABELV $938 +endproc PM_GroundTrace 1112 28 +proc PM_SetWaterLevel 48 8 +line 2309 +;2302: +;2303: +;2304:/* +;2305:============= +;2306:PM_SetWaterLevel +;2307:============= +;2308:*/ +;2309:static void PM_SetWaterLevel( void ) { +line 2318 +;2310: vec3_t point; +;2311: int cont; +;2312: int sample1; +;2313: int sample2; +;2314: +;2315: // +;2316: // get waterlevel, accounting for ducking +;2317: // +;2318: pm->waterlevel = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2319 +;2319: pm->watertype = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 212 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2321 +;2320: +;2321: point[0] = pm->ps->origin[0]; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ASGNF4 +line 2322 +;2322: point[1] = pm->ps->origin[1]; +ADDRLP4 0+4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ASGNF4 +line 2323 +;2323: point[2] = pm->ps->origin[2] + MINS_Z + 1; +ADDRLP4 0+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 3250585600 +ADDF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 2324 +;2324: cont = pm->pointcontents( point, pm->ps->clientNum ); +ADDRLP4 0 +ARGP4 +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRLP4 24 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 2326 +;2325: +;2326: if ( cont & MASK_WATER ) { +ADDRLP4 12 +INDIRI4 +CNSTI4 131078 +BANDI4 +CNSTI4 0 +EQI4 $996 +line 2327 +;2327: sample2 = pm->ps->viewheight - MINS_Z; +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRI4 +CNSTI4 -24 +SUBI4 +ASGNI4 +line 2328 +;2328: sample1 = sample2 / 2; +ADDRLP4 20 +ADDRLP4 16 +INDIRI4 +CNSTI4 2 +DIVI4 +ASGNI4 +line 2330 +;2329: +;2330: pm->watertype = cont; +ADDRGP4 pm +INDIRP4 +CNSTI4 212 +ADDP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2331 +;2331: pm->waterlevel = 1; +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2332 +;2332: point[2] = pm->ps->origin[2] + MINS_Z + sample1; +ADDRLP4 0+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 3250585600 +ADDF4 +ADDRLP4 20 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 2333 +;2333: cont = pm->pointcontents (point, pm->ps->clientNum ); +ADDRLP4 0 +ARGP4 +ADDRLP4 32 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 36 +ADDRLP4 32 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 2334 +;2334: if ( cont & MASK_WATER ) { +ADDRLP4 12 +INDIRI4 +CNSTI4 131078 +BANDI4 +CNSTI4 0 +EQI4 $999 +line 2335 +;2335: pm->waterlevel = 2; +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +CNSTI4 2 +ASGNI4 +line 2336 +;2336: point[2] = pm->ps->origin[2] + MINS_Z + sample2; +ADDRLP4 0+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 3250585600 +ADDF4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 2337 +;2337: cont = pm->pointcontents (point, pm->ps->clientNum ); +ADDRLP4 0 +ARGP4 +ADDRLP4 40 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 44 +ADDRLP4 40 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 2338 +;2338: if ( cont & MASK_WATER ){ +ADDRLP4 12 +INDIRI4 +CNSTI4 131078 +BANDI4 +CNSTI4 0 +EQI4 $1002 +line 2339 +;2339: pm->waterlevel = 3; +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +CNSTI4 3 +ASGNI4 +line 2340 +;2340: } +LABELV $1002 +line 2341 +;2341: } +LABELV $999 +line 2342 +;2342: } +LABELV $996 +line 2344 +;2343: +;2344:} +LABELV $993 +endproc PM_SetWaterLevel 48 8 +proc PM_CheckDuck 1112 28 +line 2354 +;2345: +;2346:/* +;2347:============== +;2348:PM_CheckDuck +;2349: +;2350:Sets mins, maxs, and pm->ps->viewheight +;2351:============== +;2352:*/ +;2353:static void PM_CheckDuck (void) +;2354:{ +line 2357 +;2355: trace_t trace; +;2356: +;2357: pm->mins[0] = -15; +ADDRGP4 pm +INDIRP4 +CNSTI4 188 +ADDP4 +CNSTF4 3245342720 +ASGNF4 +line 2358 +;2358: pm->mins[1] = -15; +ADDRGP4 pm +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTF4 3245342720 +ASGNF4 +line 2360 +;2359: +;2360: pm->maxs[0] = 15; +ADDRGP4 pm +INDIRP4 +CNSTI4 200 +ADDP4 +CNSTF4 1097859072 +ASGNF4 +line 2361 +;2361: pm->maxs[1] = 15; +ADDRGP4 pm +INDIRP4 +CNSTI4 204 +ADDP4 +CNSTF4 1097859072 +ASGNF4 +line 2363 +;2362: +;2363: pm->mins[2] = MINS_Z; +ADDRGP4 pm +INDIRP4 +CNSTI4 196 +ADDP4 +CNSTF4 3250585600 +ASGNF4 +line 2365 +;2364: +;2365: if (pm->ps->pm_type == PM_DEAD) +ADDRLP4 1080 +CNSTI4 4 +ASGNI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 1080 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 1080 +INDIRI4 +NEI4 $1005 +line 2366 +;2366: { +line 2367 +;2367: pm->maxs[2] = -8; +ADDRGP4 pm +INDIRP4 +CNSTI4 208 +ADDP4 +CNSTF4 3238002688 +ASGNF4 +line 2368 +;2368: pm->ps->viewheight = DEAD_VIEWHEIGHT; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTI4 -16 +ASGNI4 +line 2369 +;2369: return; +ADDRGP4 $1004 +JUMPV +LABELV $1005 +line 2372 +;2370: } +;2371: +;2372: if (pm->ps->usingATST) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1007 +line 2373 +;2373: { +line 2374 +;2374: if (pm->cmd.upmove < 0) +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $1009 +line 2375 +;2375: { +line 2376 +;2376: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 2377 +;2377: } +LABELV $1009 +line 2378 +;2378: } +LABELV $1007 +line 2380 +;2379: +;2380: if (BG_InRoll(pm->ps, pm->ps->legsAnim)) +ADDRLP4 1084 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1084 +INDIRP4 +ARGP4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1088 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 1088 +INDIRI4 +CNSTI4 0 +EQI4 $1011 +line 2381 +;2381: { +line 2382 +;2382: pm->maxs[2] = CROUCH_MAXS_2; +ADDRGP4 pm +INDIRP4 +CNSTI4 208 +ADDP4 +CNSTF4 1098907648 +ASGNF4 +line 2383 +;2383: pm->ps->viewheight = DEFAULT_VIEWHEIGHT; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTI4 36 +ASGNI4 +line 2384 +;2384: pm->ps->pm_flags &= ~PMF_DUCKED; +ADDRLP4 1092 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1092 +INDIRP4 +ADDRLP4 1092 +INDIRP4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 2385 +;2385: pm->ps->pm_flags |= PMF_ROLLING; +ADDRLP4 1096 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1096 +INDIRP4 +ADDRLP4 1096 +INDIRP4 +INDIRI4 +CNSTI4 4 +BORI4 +ASGNI4 +line 2386 +;2386: return; +ADDRGP4 $1004 +JUMPV +LABELV $1011 +line 2388 +;2387: } +;2388: else if (pm->ps->pm_flags & PMF_ROLLING) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $1013 +line 2389 +;2389: { +line 2391 +;2390: // try to stand up +;2391: pm->maxs[2] = DEFAULT_MAXS_2; +ADDRGP4 pm +INDIRP4 +CNSTI4 208 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 2392 +;2392: pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, pm->ps->origin, pm->ps->clientNum, pm->tracemask ); +ADDRLP4 0 +ARGP4 +ADDRLP4 1092 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1096 +ADDRLP4 1092 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1100 +ADDRLP4 1096 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 1100 +INDIRP4 +ARGP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 1100 +INDIRP4 +ARGP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 2393 +;2393: if (!trace.allsolid) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1014 +line 2394 +;2394: pm->ps->pm_flags &= ~PMF_ROLLING; +ADDRLP4 1104 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1104 +INDIRP4 +ADDRLP4 1104 +INDIRP4 +INDIRI4 +CNSTI4 -5 +BANDI4 +ASGNI4 +line 2395 +;2395: } +ADDRGP4 $1014 +JUMPV +LABELV $1013 +line 2396 +;2396: else if (pm->cmd.upmove < 0 || +ADDRLP4 1092 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LTI4 $1019 +ADDRLP4 1092 +INDIRP4 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $1017 +LABELV $1019 +line 2398 +;2397: pm->ps->forceHandExtend == HANDEXTEND_KNOCKDOWN) +;2398: { // duck +line 2399 +;2399: pm->ps->pm_flags |= PMF_DUCKED; +ADDRLP4 1096 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1096 +INDIRP4 +ADDRLP4 1096 +INDIRP4 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 2400 +;2400: } +ADDRGP4 $1018 +JUMPV +LABELV $1017 +line 2402 +;2401: else +;2402: { // stand up if possible +line 2403 +;2403: if (pm->ps->pm_flags & PMF_DUCKED) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1020 +line 2404 +;2404: { +line 2406 +;2405: // try to stand up +;2406: pm->maxs[2] = DEFAULT_MAXS_2; +ADDRGP4 pm +INDIRP4 +CNSTI4 208 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 2407 +;2407: pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, pm->ps->origin, pm->ps->clientNum, pm->tracemask ); +ADDRLP4 0 +ARGP4 +ADDRLP4 1096 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1100 +ADDRLP4 1096 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1104 +ADDRLP4 1100 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 1104 +INDIRP4 +ARGP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 1104 +INDIRP4 +ARGP4 +ADDRLP4 1100 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 2408 +;2408: if (!trace.allsolid) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1022 +line 2409 +;2409: pm->ps->pm_flags &= ~PMF_DUCKED; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ADDRLP4 1108 +INDIRP4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +LABELV $1022 +line 2410 +;2410: } +LABELV $1020 +line 2411 +;2411: } +LABELV $1018 +LABELV $1014 +line 2413 +;2412: +;2413: if (pm->ps->pm_flags & PMF_DUCKED) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1024 +line 2414 +;2414: { +line 2415 +;2415: pm->maxs[2] = CROUCH_MAXS_2; +ADDRGP4 pm +INDIRP4 +CNSTI4 208 +ADDP4 +CNSTF4 1098907648 +ASGNF4 +line 2416 +;2416: pm->ps->viewheight = CROUCH_VIEWHEIGHT; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTI4 12 +ASGNI4 +line 2417 +;2417: } +ADDRGP4 $1025 +JUMPV +LABELV $1024 +line 2418 +;2418: else if (pm->ps->pm_flags & PMF_ROLLING) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $1026 +line 2419 +;2419: { +line 2420 +;2420: pm->maxs[2] = CROUCH_MAXS_2; +ADDRGP4 pm +INDIRP4 +CNSTI4 208 +ADDP4 +CNSTF4 1098907648 +ASGNF4 +line 2421 +;2421: pm->ps->viewheight = DEFAULT_VIEWHEIGHT; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTI4 36 +ASGNI4 +line 2422 +;2422: } +ADDRGP4 $1027 +JUMPV +LABELV $1026 +line 2424 +;2423: else +;2424: { +line 2425 +;2425: pm->maxs[2] = DEFAULT_MAXS_2; +ADDRGP4 pm +INDIRP4 +CNSTI4 208 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 2426 +;2426: pm->ps->viewheight = DEFAULT_VIEWHEIGHT; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTI4 36 +ASGNI4 +line 2427 +;2427: } +LABELV $1027 +LABELV $1025 +line 2429 +;2428: +;2429: if (pm->ps->usingATST) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1028 +line 2430 +;2430: { +line 2431 +;2431: pm->mins[0] = ATST_MINS0; +ADDRGP4 pm +INDIRP4 +CNSTI4 188 +ADDP4 +CNSTF4 3256877056 +ASGNF4 +line 2432 +;2432: pm->mins[1] = ATST_MINS1; +ADDRGP4 pm +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTF4 3256877056 +ASGNF4 +line 2433 +;2433: pm->mins[2] = ATST_MINS2; +ADDRGP4 pm +INDIRP4 +CNSTI4 196 +ADDP4 +CNSTF4 3250585600 +ASGNF4 +line 2435 +;2434: +;2435: pm->maxs[0] = ATST_MAXS0; +ADDRGP4 pm +INDIRP4 +CNSTI4 200 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 2436 +;2436: pm->maxs[1] = ATST_MAXS1; +ADDRGP4 pm +INDIRP4 +CNSTI4 204 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 2437 +;2437: pm->maxs[2] = ATST_MAXS2; +ADDRGP4 pm +INDIRP4 +CNSTI4 208 +ADDP4 +CNSTF4 1131937792 +ASGNF4 +line 2438 +;2438: } +LABELV $1028 +line 2439 +;2439:} +LABELV $1004 +endproc PM_CheckDuck 1112 28 +export PM_Use +proc PM_Use 4 0 +line 2457 +;2440: +;2441: +;2442: +;2443://=================================================================== +;2444: +;2445: +;2446: +;2447:/* +;2448:============== +;2449:PM_Use +;2450: +;2451:Generates a use event +;2452:============== +;2453:*/ +;2454:#define USE_DELAY 2000 +;2455: +;2456:void PM_Use( void ) +;2457:{ +line 2458 +;2458: if ( pm->ps->useTime > 0 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1031 +line 2459 +;2459: pm->ps->useTime -= 100;//pm->cmd.msec; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 80 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 100 +SUBI4 +ASGNI4 +LABELV $1031 +line 2461 +;2460: +;2461: if ( pm->ps->useTime > 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1033 +line 2462 +;2462: return; +ADDRGP4 $1030 +JUMPV +LABELV $1033 +line 2465 +;2463: } +;2464: +;2465: if ( ! (pm->cmd.buttons & BUTTON_USE ) ) +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 32 +BANDI4 +CNSTI4 0 +NEI4 $1035 +line 2466 +;2466: { +line 2467 +;2467: pm->useEvent = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 184 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2468 +;2468: pm->ps->useTime = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2469 +;2469: return; +ADDRGP4 $1030 +JUMPV +LABELV $1035 +line 2472 +;2470: } +;2471: +;2472: pm->useEvent = EV_USE; +ADDRGP4 pm +INDIRP4 +CNSTI4 184 +ADDP4 +CNSTI4 39 +ASGNI4 +line 2473 +;2473: pm->ps->useTime = USE_DELAY; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTI4 2000 +ASGNI4 +line 2474 +;2474:} +LABELV $1030 +endproc PM_Use 4 0 +export PM_RunningAnim +proc PM_RunningAnim 16 0 +line 2477 +;2475: +;2476:qboolean PM_RunningAnim( int anim ) +;2477:{ +line 2478 +;2478: switch ( (anim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 8 +CNSTI4 833 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1041 +ADDRLP4 0 +INDIRI4 +CNSTI4 836 +EQI4 $1041 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $1038 +LABELV $1042 +ADDRLP4 0 +INDIRI4 +CNSTI4 850 +EQI4 $1041 +ADDRLP4 0 +INDIRI4 +CNSTI4 854 +EQI4 $1041 +ADDRLP4 0 +INDIRI4 +CNSTI4 855 +EQI4 $1041 +ADDRGP4 $1038 +JUMPV +line 2479 +;2479: { +LABELV $1041 +line 2485 +;2480: case BOTH_RUN1: +;2481: case BOTH_RUN2: +;2482: case BOTH_RUNBACK1: +;2483: case BOTH_RUNBACK2: +;2484: case BOTH_RUNAWAY1: +;2485: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1037 +JUMPV +line 2486 +;2486: break; +LABELV $1038 +line 2488 +;2487: } +;2488: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1037 +endproc PM_RunningAnim 16 0 +proc PM_Footsteps 92 16 +line 2496 +;2489:} +;2490: +;2491:/* +;2492:=============== +;2493:PM_Footsteps +;2494:=============== +;2495:*/ +;2496:static void PM_Footsteps( void ) { +line 2500 +;2497: float bobmove; +;2498: int old; +;2499: qboolean footstep; +;2500: int setAnimFlags = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 2502 +;2501: +;2502: if ( (PM_InSaberAnim( (pm->ps->legsAnim&~ANIM_TOGGLEBIT) ) && !BG_SpinningSaberAnim( (pm->ps->legsAnim&~ANIM_TOGGLEBIT) )) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 16 +ADDRGP4 PM_InSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $1047 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 20 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $1056 +LABELV $1047 +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 571 +EQI4 $1056 +ADDRLP4 24 +INDIRI4 +CNSTI4 587 +EQI4 $1056 +ADDRLP4 24 +INDIRI4 +CNSTI4 588 +EQI4 $1056 +ADDRLP4 24 +INDIRI4 +CNSTI4 573 +EQI4 $1056 +ADDRLP4 24 +INDIRI4 +CNSTI4 562 +EQI4 $1056 +ADDRLP4 24 +INDIRI4 +CNSTI4 563 +EQI4 $1056 +ADDRLP4 24 +INDIRI4 +CNSTI4 1038 +EQI4 $1056 +ADDRLP4 24 +INDIRI4 +CNSTI4 1039 +EQI4 $1056 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 PM_LandingAnim +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +NEI4 $1056 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 32 +ADDRGP4 PM_PainAnim +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $1044 +LABELV $1056 +line 2513 +;2503: || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_STAND1 +;2504: || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_STAND1TO2 +;2505: || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_STAND2TO1 +;2506: || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_STAND2 +;2507: || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_SABERFAST_STANCE +;2508: || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_SABERSLOW_STANCE +;2509: || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_BUTTON_HOLD +;2510: || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_BUTTON_RELEASE +;2511: || PM_LandingAnim( (pm->ps->legsAnim&~ANIM_TOGGLEBIT) ) +;2512: || PM_PainAnim( (pm->ps->legsAnim&~ANIM_TOGGLEBIT) )) +;2513: {//legs are in a saber anim, and not spinning, be sure to override it +line 2514 +;2514: setAnimFlags |= SETANIM_FLAG_OVERRIDE; +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 2515 +;2515: } +LABELV $1044 +line 2521 +;2516: +;2517: // +;2518: // calculate speed and cycle to be used for +;2519: // all cyclic walking effects +;2520: // +;2521: pm->xyspeed = sqrt( pm->ps->velocity[0] * pm->ps->velocity[0] +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 36 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 44 +ADDRLP4 40 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 48 +ADDRLP4 40 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 44 +INDIRF4 +ADDRLP4 44 +INDIRF4 +MULF4 +ADDRLP4 48 +INDIRF4 +ADDRLP4 48 +INDIRF4 +MULF4 +ADDF4 +ARGF4 +ADDRLP4 52 +ADDRGP4 sqrt +CALLF4 +ASGNF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 228 +ADDP4 +ADDRLP4 52 +INDIRF4 +ASGNF4 +line 2524 +;2522: + pm->ps->velocity[1] * pm->ps->velocity[1] ); +;2523: +;2524: if ( pm->ps->groundEntityNum == ENTITYNUM_NONE ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +NEI4 $1057 +line 2527 +;2525: +;2526: // airborne leaves position in cycle intact, but doesn't advance +;2527: if ( pm->waterlevel > 1 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 1 +LEI4 $1043 +line 2528 +;2528: { +line 2529 +;2529: if (pm->xyspeed > 60) +ADDRGP4 pm +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRF4 +CNSTF4 1114636288 +LEF4 $1061 +line 2530 +;2530: { +line 2531 +;2531: PM_ContinueLegsAnim( BOTH_SWIMFORWARD ); +CNSTI4 981 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2532 +;2532: } +ADDRGP4 $1043 +JUMPV +LABELV $1061 +line 2534 +;2533: else +;2534: { +line 2535 +;2535: PM_ContinueLegsAnim( BOTH_SWIM_IDLE1 ); +CNSTI4 980 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2536 +;2536: } +line 2537 +;2537: } +line 2538 +;2538: return; +ADDRGP4 $1043 +JUMPV +LABELV $1057 +line 2542 +;2539: } +;2540: +;2541: // if not trying to move +;2542: if ( !pm->cmd.forwardmove && !pm->cmd.rightmove ) { +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 60 +CNSTI4 0 +ASGNI4 +ADDRLP4 56 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 60 +INDIRI4 +NEI4 $1063 +ADDRLP4 56 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 60 +INDIRI4 +NEI4 $1063 +line 2543 +;2543: if ( pm->xyspeed < 5 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRF4 +CNSTF4 1084227584 +GEF4 $1043 +line 2544 +;2544: pm->ps->bobCycle = 0; // start at beginning of cycle again +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2545 +;2545: if ( (pm->ps->pm_flags & PMF_DUCKED) || (pm->ps->pm_flags & PMF_ROLLING) ) { +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 68 +CNSTI4 0 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 68 +INDIRI4 +NEI4 $1069 +ADDRLP4 64 +INDIRI4 +CNSTI4 4 +BANDI4 +ADDRLP4 68 +INDIRI4 +EQI4 $1067 +LABELV $1069 +line 2546 +;2546: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_CROUCH1IDLE) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 797 +EQI4 $1070 +line 2547 +;2547: { +line 2548 +;2548: PM_SetAnim(SETANIM_LEGS, BOTH_CROUCH1IDLE, setAnimFlags, 100); +CNSTI4 2 +ARGI4 +CNSTI4 797 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2549 +;2549: } +ADDRGP4 $1043 +JUMPV +LABELV $1070 +line 2551 +;2550: else +;2551: { +line 2552 +;2552: PM_ContinueLegsAnim( BOTH_CROUCH1IDLE ); +CNSTI4 797 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2553 +;2553: } +line 2554 +;2554: } else { +ADDRGP4 $1043 +JUMPV +LABELV $1067 +line 2555 +;2555: if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1) +ADDRLP4 72 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1072 +ADDRLP4 72 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1072 +line 2556 +;2556: { +line 2557 +;2557: PM_ContinueLegsAnim( TORSO_WEAPONREADY4 ); +CNSTI4 1102 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2558 +;2558: } +ADDRGP4 $1043 +JUMPV +LABELV $1072 +line 2560 +;2559: else +;2560: { +line 2561 +;2561: if (pm->ps->weapon == WP_SABER && pm->ps->saberHolstered) +ADDRLP4 76 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1074 +ADDRLP4 76 +INDIRP4 +CNSTI4 1312 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1074 +line 2562 +;2562: { +line 2563 +;2563: PM_ContinueLegsAnim( BOTH_STAND1 ); +CNSTI4 571 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2564 +;2564: } +ADDRGP4 $1043 +JUMPV +LABELV $1074 +line 2566 +;2565: else +;2566: { +line 2567 +;2567: PM_ContinueLegsAnim( WeaponReadyAnim[pm->ps->weapon] ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 WeaponReadyAnim +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2568 +;2568: } +line 2569 +;2569: } +line 2570 +;2570: } +line 2571 +;2571: } +line 2572 +;2572: return; +ADDRGP4 $1043 +JUMPV +LABELV $1063 +line 2576 +;2573: } +;2574: +;2575: +;2576: footstep = qfalse; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 2578 +;2577: +;2578: if ( pm->ps->pm_flags & PMF_DUCKED ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1076 +line 2579 +;2579: { +line 2580 +;2580: int rolled = 0; +ADDRLP4 64 +CNSTI4 0 +ASGNI4 +line 2582 +;2581: +;2582: bobmove = 0.5; // ducked characters bob much faster +ADDRLP4 4 +CNSTF4 1056964608 +ASGNF4 +line 2584 +;2583: +;2584: if ( PM_RunningAnim( pm->ps->legsAnim ) && !BG_InRoll(pm->ps, pm->ps->legsAnim) ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 68 +ADDRGP4 PM_RunningAnim +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +EQI4 $1078 +ADDRLP4 72 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ARGP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +NEI4 $1078 +line 2585 +;2585: {//roll! +line 2586 +;2586: rolled = PM_TryRoll(); +ADDRLP4 80 +ADDRGP4 PM_TryRoll +CALLI4 +ASGNI4 +ADDRLP4 64 +ADDRLP4 80 +INDIRI4 +ASGNI4 +line 2587 +;2587: } +LABELV $1078 +line 2588 +;2588: if ( !rolled ) +ADDRLP4 64 +INDIRI4 +CNSTI4 0 +NEI4 $1080 +line 2589 +;2589: { //if the roll failed or didn't attempt, do standard crouching anim stuff. +line 2590 +;2590: if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $1082 +line 2591 +;2591: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_CROUCH1WALKBACK) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 799 +EQI4 $1084 +line 2592 +;2592: { +line 2593 +;2593: PM_SetAnim(SETANIM_LEGS, BOTH_CROUCH1WALKBACK, setAnimFlags, 100); +CNSTI4 2 +ARGI4 +CNSTI4 799 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2594 +;2594: } +ADDRGP4 $1077 +JUMPV +LABELV $1084 +line 2596 +;2595: else +;2596: { +line 2597 +;2597: PM_ContinueLegsAnim( BOTH_CROUCH1WALKBACK ); +CNSTI4 799 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2598 +;2598: } +line 2599 +;2599: } +ADDRGP4 $1077 +JUMPV +LABELV $1082 +line 2600 +;2600: else { +line 2601 +;2601: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_CROUCH1WALK) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 798 +EQI4 $1086 +line 2602 +;2602: { +line 2603 +;2603: PM_SetAnim(SETANIM_LEGS, BOTH_CROUCH1WALK, setAnimFlags, 100); +CNSTI4 2 +ARGI4 +CNSTI4 798 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2604 +;2604: } +ADDRGP4 $1077 +JUMPV +LABELV $1086 +line 2606 +;2605: else +;2606: { +line 2607 +;2607: PM_ContinueLegsAnim( BOTH_CROUCH1WALK ); +CNSTI4 798 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2608 +;2608: } +line 2609 +;2609: } +line 2610 +;2610: } +ADDRGP4 $1077 +JUMPV +LABELV $1080 +line 2612 +;2611: else +;2612: { //otherwise send us into the roll +line 2613 +;2613: pm->ps->legsTimer = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2614 +;2614: pm->ps->legsAnim = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2615 +;2615: PM_SetAnim(SETANIM_BOTH,rolled,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150); +ADDRLP4 80 +CNSTI4 3 +ASGNI4 +ADDRLP4 80 +INDIRI4 +ARGI4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRLP4 80 +INDIRI4 +ARGI4 +CNSTI4 150 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2616 +;2616: PM_AddEventWithParm( EV_ROLL, 0 ); +CNSTI4 15 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 PM_AddEventWithParm +CALLV +pop +line 2617 +;2617: pm->maxs[2] = CROUCH_MAXS_2; +ADDRGP4 pm +INDIRP4 +CNSTI4 208 +ADDP4 +CNSTF4 1098907648 +ASGNF4 +line 2618 +;2618: pm->ps->viewheight = DEFAULT_VIEWHEIGHT; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTI4 36 +ASGNI4 +line 2619 +;2619: pm->ps->pm_flags &= ~PMF_DUCKED; +ADDRLP4 84 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 2620 +;2620: pm->ps->pm_flags |= PMF_ROLLING; +ADDRLP4 88 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +ADDRLP4 88 +INDIRP4 +INDIRI4 +CNSTI4 4 +BORI4 +ASGNI4 +line 2621 +;2621: } +line 2622 +;2622: } +ADDRGP4 $1077 +JUMPV +LABELV $1076 +line 2623 +;2623: else if ((pm->ps->pm_flags & PMF_ROLLING) && !BG_InRoll(pm->ps, pm->ps->legsAnim) && +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $1088 +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 68 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +NEI4 $1088 +ADDRLP4 72 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ARGP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 PM_InRollComplete +CALLI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +NEI4 $1088 +line 2625 +;2624: !PM_InRollComplete(pm->ps, pm->ps->legsAnim)) +;2625: { +line 2626 +;2626: bobmove = 0.5; // ducked characters bob much faster +ADDRLP4 4 +CNSTF4 1056964608 +ASGNF4 +line 2628 +;2627: +;2628: if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $1090 +line 2629 +;2629: { +line 2630 +;2630: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_CROUCH1WALKBACK) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 799 +EQI4 $1092 +line 2631 +;2631: { +line 2632 +;2632: PM_SetAnim(SETANIM_LEGS, BOTH_CROUCH1WALKBACK, setAnimFlags, 100); +CNSTI4 2 +ARGI4 +CNSTI4 799 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2633 +;2633: } +ADDRGP4 $1089 +JUMPV +LABELV $1092 +line 2635 +;2634: else +;2635: { +line 2636 +;2636: PM_ContinueLegsAnim( BOTH_CROUCH1WALKBACK ); +CNSTI4 799 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2637 +;2637: } +line 2638 +;2638: } +ADDRGP4 $1089 +JUMPV +LABELV $1090 +line 2640 +;2639: else +;2640: { +line 2641 +;2641: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_CROUCH1WALK) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 798 +EQI4 $1094 +line 2642 +;2642: { +line 2643 +;2643: PM_SetAnim(SETANIM_LEGS, BOTH_CROUCH1WALK, setAnimFlags, 100); +CNSTI4 2 +ARGI4 +CNSTI4 798 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2644 +;2644: } +ADDRGP4 $1089 +JUMPV +LABELV $1094 +line 2646 +;2645: else +;2646: { +line 2647 +;2647: PM_ContinueLegsAnim( BOTH_CROUCH1WALK ); +CNSTI4 798 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2648 +;2648: } +line 2649 +;2649: } +line 2650 +;2650: } +ADDRGP4 $1089 +JUMPV +LABELV $1088 +line 2652 +;2651: else +;2652: { +line 2653 +;2653: if ( !( pm->cmd.buttons & BUTTON_WALKING ) ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +NEI4 $1096 +line 2654 +;2654: bobmove = 0.4f; // faster speeds bob faster +ADDRLP4 4 +CNSTF4 1053609165 +ASGNF4 +line 2655 +;2655: if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $1098 +line 2656 +;2656: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_RUNBACK1) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 854 +EQI4 $1100 +line 2657 +;2657: { +line 2658 +;2658: PM_SetAnim(SETANIM_LEGS, BOTH_RUNBACK1, setAnimFlags, 100); +CNSTI4 2 +ARGI4 +CNSTI4 854 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2659 +;2659: } +ADDRGP4 $1099 +JUMPV +LABELV $1100 +line 2661 +;2660: else +;2661: { +line 2662 +;2662: PM_ContinueLegsAnim( BOTH_RUNBACK1 ); +CNSTI4 854 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2663 +;2663: } +line 2664 +;2664: } +ADDRGP4 $1099 +JUMPV +LABELV $1098 +line 2665 +;2665: else { +line 2666 +;2666: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_RUN1) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 833 +EQI4 $1102 +line 2667 +;2667: { +line 2668 +;2668: PM_SetAnim(SETANIM_LEGS, BOTH_RUN1, setAnimFlags, 100); +CNSTI4 2 +ARGI4 +CNSTI4 833 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2669 +;2669: } +ADDRGP4 $1103 +JUMPV +LABELV $1102 +line 2671 +;2670: else +;2671: { +line 2672 +;2672: PM_ContinueLegsAnim( BOTH_RUN1 ); +CNSTI4 833 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2673 +;2673: } +LABELV $1103 +line 2674 +;2674: } +LABELV $1099 +line 2675 +;2675: footstep = qtrue; +ADDRLP4 12 +CNSTI4 1 +ASGNI4 +line 2676 +;2676: } else { +ADDRGP4 $1097 +JUMPV +LABELV $1096 +line 2677 +;2677: bobmove = 0.2f; // walking bobs slow +ADDRLP4 4 +CNSTF4 1045220557 +ASGNF4 +line 2678 +;2678: if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $1104 +line 2679 +;2679: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_WALKBACK1) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 852 +EQI4 $1106 +line 2680 +;2680: { +line 2681 +;2681: PM_SetAnim(SETANIM_LEGS, BOTH_WALKBACK1, setAnimFlags, 100); +CNSTI4 2 +ARGI4 +CNSTI4 852 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2682 +;2682: } +ADDRGP4 $1105 +JUMPV +LABELV $1106 +line 2684 +;2683: else +;2684: { +line 2685 +;2685: PM_ContinueLegsAnim( BOTH_WALKBACK1 ); +CNSTI4 852 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2686 +;2686: } +line 2687 +;2687: } +ADDRGP4 $1105 +JUMPV +LABELV $1104 +line 2688 +;2688: else { +line 2689 +;2689: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_WALK1) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 822 +EQI4 $1108 +line 2690 +;2690: { +line 2691 +;2691: PM_SetAnim(SETANIM_LEGS, BOTH_WALK1, setAnimFlags, 100); +CNSTI4 2 +ARGI4 +CNSTI4 822 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 2692 +;2692: } +ADDRGP4 $1109 +JUMPV +LABELV $1108 +line 2694 +;2693: else +;2694: { +line 2695 +;2695: PM_ContinueLegsAnim( BOTH_WALK1 ); +CNSTI4 822 +ARGI4 +ADDRGP4 PM_ContinueLegsAnim +CALLV +pop +line 2696 +;2696: } +LABELV $1109 +line 2697 +;2697: } +LABELV $1105 +line 2698 +;2698: } +LABELV $1097 +line 2699 +;2699: } +LABELV $1089 +LABELV $1077 +line 2702 +;2700: +;2701: // check for footstep / splash sounds +;2702: old = pm->ps->bobCycle; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +line 2703 +;2703: pm->ps->bobCycle = (int)( old + bobmove * pml.msec ) & 255; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ADDRLP4 4 +INDIRF4 +ADDRGP4 pml+40 +INDIRI4 +CVIF4 4 +MULF4 +ADDF4 +CVFI4 4 +CNSTI4 255 +BANDI4 +ASGNI4 +line 2706 +;2704: +;2705: // if we just crossed a cycle boundary, play an apropriate footstep event +;2706: if ( ( ( old + 64 ) ^ ( pm->ps->bobCycle + 64 ) ) & 128 ) +ADDRLP4 80 +CNSTI4 64 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 80 +INDIRI4 +ADDI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 80 +INDIRI4 +ADDI4 +BXORI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $1111 +line 2707 +;2707: { +line 2708 +;2708: pm->ps->footstepTime = pm->cmd.serverTime + 300; +ADDRLP4 84 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +INDIRP4 +CNSTI4 1272 +ADDP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 300 +ADDI4 +ASGNI4 +line 2709 +;2709: if ( pm->waterlevel == 1 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1113 +line 2711 +;2710: // splashing +;2711: PM_AddEvent( EV_FOOTSPLASH ); +CNSTI4 4 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 2712 +;2712: } else if ( pm->waterlevel == 2 ) { +ADDRGP4 $1114 +JUMPV +LABELV $1113 +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1115 +line 2714 +;2713: // wading / swimming at surface +;2714: PM_AddEvent( EV_SWIM ); +CNSTI4 6 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 2715 +;2715: } else if ( pm->waterlevel == 3 ) { +ADDRGP4 $1116 +JUMPV +LABELV $1115 +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1117 +line 2717 +;2716: // no sound when completely underwater +;2717: } +LABELV $1117 +LABELV $1116 +LABELV $1114 +line 2718 +;2718: } +LABELV $1111 +line 2719 +;2719:} +LABELV $1043 +endproc PM_Footsteps 92 16 +proc PM_WaterEvents 16 4 +line 2728 +;2720: +;2721:/* +;2722:============== +;2723:PM_WaterEvents +;2724: +;2725:Generate sound events for entering and leaving water +;2726:============== +;2727:*/ +;2728:static void PM_WaterEvents( void ) { // FIXME? +line 2732 +;2729: // +;2730: // if just entered a water volume, play a sound +;2731: // +;2732: if (!pml.previous_waterlevel && pm->waterlevel) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 pml+1160 +INDIRI4 +ADDRLP4 0 +INDIRI4 +NEI4 $1120 +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +EQI4 $1120 +line 2733 +;2733: PM_AddEvent( EV_WATER_TOUCH ); +CNSTI4 16 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 2734 +;2734: } +LABELV $1120 +line 2739 +;2735: +;2736: // +;2737: // if just completely exited a water volume, play a sound +;2738: // +;2739: if (pml.previous_waterlevel && !pm->waterlevel) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 pml+1160 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $1123 +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $1123 +line 2740 +;2740: PM_AddEvent( EV_WATER_LEAVE ); +CNSTI4 17 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 2741 +;2741: } +LABELV $1123 +line 2746 +;2742: +;2743: // +;2744: // check for head just going under water +;2745: // +;2746: if (pml.previous_waterlevel != 3 && pm->waterlevel == 3) { +ADDRLP4 8 +CNSTI4 3 +ASGNI4 +ADDRGP4 pml+1160 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1126 +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $1126 +line 2747 +;2747: PM_AddEvent( EV_WATER_UNDER ); +CNSTI4 18 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 2748 +;2748: } +LABELV $1126 +line 2753 +;2749: +;2750: // +;2751: // check for head just coming out of water +;2752: // +;2753: if (pml.previous_waterlevel == 3 && pm->waterlevel != 3) { +ADDRLP4 12 +CNSTI4 3 +ASGNI4 +ADDRGP4 pml+1160 +INDIRI4 +ADDRLP4 12 +INDIRI4 +NEI4 $1129 +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $1129 +line 2754 +;2754: PM_AddEvent( EV_WATER_CLEAR ); +CNSTI4 19 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 2755 +;2755: } +LABELV $1129 +line 2756 +;2756:} +LABELV $1119 +endproc PM_WaterEvents 16 4 +export PM_BeginWeaponChange +proc PM_BeginWeaponChange 8 4 +line 2764 +;2757: +;2758: +;2759:/* +;2760:=============== +;2761:PM_BeginWeaponChange +;2762:=============== +;2763:*/ +;2764:void PM_BeginWeaponChange( int weapon ) { +line 2765 +;2765: if ( weapon <= WP_NONE || weapon >= WP_NUM_WEAPONS ) { +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LEI4 $1135 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LTI4 $1133 +LABELV $1135 +line 2766 +;2766: return; +ADDRGP4 $1132 +JUMPV +LABELV $1133 +line 2769 +;2767: } +;2768: +;2769: if ( !( pm->ps->stats[STAT_WEAPONS] & ( 1 << weapon ) ) ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRFP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +NEI4 $1136 +line 2770 +;2770: return; +ADDRGP4 $1132 +JUMPV +LABELV $1136 +line 2773 +;2771: } +;2772: +;2773: if ( pm->ps->weaponstate == WEAPON_DROPPING ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1138 +line 2774 +;2774: return; +ADDRGP4 $1132 +JUMPV +LABELV $1138 +line 2778 +;2775: } +;2776: +;2777: // turn of any kind of zooming when weapon switching. +;2778: if (pm->ps->zoomMode) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1140 +line 2779 +;2779: { +line 2780 +;2780: pm->ps->zoomMode = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1332 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2781 +;2781: pm->ps->zoomTime = pm->ps->commandTime; +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1336 +ADDP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +ASGNI4 +line 2782 +;2782: } +LABELV $1140 +line 2784 +;2783: +;2784: PM_AddEvent( EV_CHANGE_WEAPON ); +CNSTI4 23 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 2785 +;2785: pm->ps->weaponstate = WEAPON_DROPPING; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 2 +ASGNI4 +line 2786 +;2786: pm->ps->weaponTime += 200; +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 200 +ADDI4 +ASGNI4 +line 2787 +;2787: PM_StartTorsoAnim( TORSO_DROPWEAP1 ); +CNSTI4 1091 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 2788 +;2788:} +LABELV $1132 +endproc PM_BeginWeaponChange 8 4 +export PM_FinishWeaponChange +proc PM_FinishWeaponChange 12 4 +line 2796 +;2789: +;2790: +;2791:/* +;2792:=============== +;2793:PM_FinishWeaponChange +;2794:=============== +;2795:*/ +;2796:void PM_FinishWeaponChange( void ) { +line 2799 +;2797: int weapon; +;2798: +;2799: weapon = pm->cmd.weapon; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRU1 +CVUI4 1 +ASGNI4 +line 2800 +;2800: if ( weapon < WP_NONE || weapon >= WP_NUM_WEAPONS ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $1145 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LTI4 $1143 +LABELV $1145 +line 2801 +;2801: weapon = WP_NONE; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 2802 +;2802: } +LABELV $1143 +line 2804 +;2803: +;2804: if ( !( pm->ps->stats[STAT_WEAPONS] & ( 1 << weapon ) ) ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +NEI4 $1146 +line 2805 +;2805: weapon = WP_NONE; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 2806 +;2806: } +LABELV $1146 +line 2808 +;2807: +;2808: if (weapon == WP_SABER) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +NEI4 $1148 +line 2809 +;2809: { +line 2810 +;2810: PM_SetSaberMove(LS_DRAW); +CNSTI4 2 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 2811 +;2811: } +ADDRGP4 $1149 +JUMPV +LABELV $1148 +line 2813 +;2812: else +;2813: { +line 2814 +;2814: PM_StartTorsoAnim( TORSO_RAISEWEAP1); +CNSTI4 1095 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 2815 +;2815: } +LABELV $1149 +line 2816 +;2816: pm->ps->weapon = weapon; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 2817 +;2817: pm->ps->weaponstate = WEAPON_RAISING; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2818 +;2818: pm->ps->weaponTime += 250; +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 250 +ADDI4 +ASGNI4 +line 2819 +;2819:} +LABELV $1142 +endproc PM_FinishWeaponChange 12 4 +proc PM_DoChargedWeapons 1208 28 +line 2826 +;2820: +;2821: +;2822: +;2823://--------------------------------------- +;2824:static qboolean PM_DoChargedWeapons( void ) +;2825://--------------------------------------- +;2826:{ +line 2829 +;2827: vec3_t ang; +;2828: trace_t tr; +;2829: qboolean charging = qfalse, +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 2830 +;2830: altFire = qfalse; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 2833 +;2831: +;2832: // If you want your weapon to be a charging weapon, just set this bit up +;2833: switch( pm->ps->weapon ) +ADDRLP4 1100 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1100 +INDIRI4 +CNSTI4 3 +LTI4 $1151 +ADDRLP4 1100 +INDIRI4 +CNSTI4 11 +GTI4 $1151 +ADDRLP4 1100 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1225-12 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1225 +address $1154 +address $1151 +address $1220 +address $1157 +address $1151 +address $1217 +address $1151 +address $1160 +address $1212 +code +line 2834 +;2834: { +LABELV $1154 +line 2839 +;2835: //------------------ +;2836: case WP_BRYAR_PISTOL: +;2837: +;2838: // alt-fire charges the weapon +;2839: if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $1152 +line 2840 +;2840: { +line 2841 +;2841: charging = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 2842 +;2842: altFire = qtrue; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 2843 +;2843: } +line 2844 +;2844: break; +ADDRGP4 $1152 +JUMPV +LABELV $1157 +line 2850 +;2845: +;2846: //------------------ +;2847: case WP_BOWCASTER: +;2848: +;2849: // primary fire charges the weapon +;2850: if ( pm->cmd.buttons & BUTTON_ATTACK ) +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1152 +line 2851 +;2851: { +line 2852 +;2852: charging = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 2853 +;2853: } +line 2854 +;2854: break; +ADDRGP4 $1152 +JUMPV +LABELV $1160 +line 2861 +;2855: +;2856: //------------------ +;2857: case WP_ROCKET_LAUNCHER: +;2858: +;2859: // Not really a charge weapon, but we still want to delay fire until the button comes up so that we can +;2860: // implement our alt-fire locking stuff +;2861: if ( (pm->cmd.buttons & BUTTON_ALT_ATTACK) && pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] >= weaponData[pm->ps->weapon].altEnergyPerShot ) +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $1152 +ADDRLP4 1112 +ADDRLP4 1108 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1116 +CNSTI4 56 +ADDRLP4 1112 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 1116 +INDIRI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1112 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 1116 +INDIRI4 +ADDRGP4 weaponData+20 +ADDP4 +INDIRI4 +LTI4 $1152 +line 2862 +;2862: { +line 2865 +;2863: vec3_t muzzleOffPoint, muzzlePoint, forward, right, up; +;2864: +;2865: AngleVectors( pm->ps->viewangles, forward, right, up ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 156 +ADDP4 +ARGP4 +ADDRLP4 1144 +ARGP4 +ADDRLP4 1156 +ARGP4 +ADDRLP4 1168 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 2867 +;2866: +;2867: charging = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 2868 +;2868: altFire = qtrue; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 2870 +;2869: +;2870: AngleVectors(pm->ps->viewangles, ang, NULL, NULL); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 156 +ADDP4 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRLP4 1180 +CNSTP4 0 +ASGNP4 +ADDRLP4 1180 +INDIRP4 +ARGP4 +ADDRLP4 1180 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 2872 +;2871: +;2872: VectorCopy( pm->ps->origin, muzzlePoint ); +ADDRLP4 1120 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 2873 +;2873: VectorCopy(WP_MuzzlePoint[WP_ROCKET_LAUNCHER], muzzleOffPoint); +ADDRLP4 1132 +ADDRGP4 WP_MuzzlePoint+120 +INDIRB +ASGNB 12 +line 2875 +;2874: +;2875: VectorMA(muzzlePoint, muzzleOffPoint[0], forward, muzzlePoint); +ADDRLP4 1184 +ADDRLP4 1132 +INDIRF4 +ASGNF4 +ADDRLP4 1120 +ADDRLP4 1120 +INDIRF4 +ADDRLP4 1144 +INDIRF4 +ADDRLP4 1184 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1120+4 +ADDRLP4 1120+4 +INDIRF4 +ADDRLP4 1144+4 +INDIRF4 +ADDRLP4 1184 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1120+8 +ADDRLP4 1120+8 +INDIRF4 +ADDRLP4 1144+8 +INDIRF4 +ADDRLP4 1132 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2876 +;2876: VectorMA(muzzlePoint, muzzleOffPoint[1], right, muzzlePoint); +ADDRLP4 1120 +ADDRLP4 1120 +INDIRF4 +ADDRLP4 1156 +INDIRF4 +ADDRLP4 1132+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1120+4 +ADDRLP4 1120+4 +INDIRF4 +ADDRLP4 1156+4 +INDIRF4 +ADDRLP4 1132+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1120+8 +ADDRLP4 1120+8 +INDIRF4 +ADDRLP4 1156+8 +INDIRF4 +ADDRLP4 1132+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2877 +;2877: muzzlePoint[2] += pm->ps->viewheight + muzzleOffPoint[2]; +ADDRLP4 1120+8 +ADDRLP4 1120+8 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 1132+8 +INDIRF4 +ADDF4 +ADDF4 +ASGNF4 +line 2879 +;2878: +;2879: ang[0] = muzzlePoint[0] + ang[0]*2048; +ADDRLP4 8 +ADDRLP4 1120 +INDIRF4 +CNSTF4 1157627904 +ADDRLP4 8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2880 +;2880: ang[1] = muzzlePoint[1] + ang[1]*2048; +ADDRLP4 8+4 +ADDRLP4 1120+4 +INDIRF4 +CNSTF4 1157627904 +ADDRLP4 8+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2881 +;2881: ang[2] = muzzlePoint[2] + ang[2]*2048; +ADDRLP4 8+8 +ADDRLP4 1120+8 +INDIRF4 +CNSTF4 1157627904 +ADDRLP4 8+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2883 +;2882: +;2883: pm->trace(&tr, muzzlePoint, NULL, NULL, ang, pm->ps->clientNum, MASK_PLAYERSOLID); +ADDRLP4 20 +ARGP4 +ADDRLP4 1120 +ARGP4 +ADDRLP4 1188 +CNSTP4 0 +ASGNP4 +ADDRLP4 1188 +INDIRP4 +ARGP4 +ADDRLP4 1188 +INDIRP4 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRLP4 1192 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1192 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 273 +ARGI4 +ADDRLP4 1192 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 2885 +;2884: +;2885: if (tr.fraction != 1 && tr.entityNum < MAX_CLIENTS && tr.entityNum != pm->ps->clientNum) +ADDRLP4 20+8 +INDIRF4 +CNSTF4 1065353216 +EQF4 $1188 +ADDRLP4 20+52 +INDIRI4 +CNSTI4 32 +GEI4 $1188 +ADDRLP4 20+52 +INDIRI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +EQI4 $1188 +line 2886 +;2886: { +line 2887 +;2887: if (pm->ps->rocketLockIndex == MAX_CLIENTS) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 580 +ADDP4 +INDIRI4 +CNSTI4 32 +NEI4 $1193 +line 2888 +;2888: { +line 2889 +;2889: pm->ps->rocketLockIndex = tr.entityNum; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 580 +ADDP4 +ADDRLP4 20+52 +INDIRI4 +ASGNI4 +line 2890 +;2890: pm->ps->rocketLockTime = pm->cmd.serverTime; +ADDRLP4 1196 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1196 +INDIRP4 +INDIRP4 +CNSTI4 588 +ADDP4 +ADDRLP4 1196 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2891 +;2891: } +ADDRGP4 $1194 +JUMPV +LABELV $1193 +line 2892 +;2892: else if (pm->ps->rocketLockIndex != tr.entityNum && pm->ps->rocketTargetTime < pm->cmd.serverTime) +ADDRLP4 1196 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1200 +ADDRLP4 1196 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 580 +ADDP4 +INDIRI4 +ADDRLP4 20+52 +INDIRI4 +EQI4 $1196 +ADDRLP4 1200 +INDIRP4 +CNSTI4 592 +ADDP4 +INDIRF4 +ADDRLP4 1196 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CVIF4 4 +GEF4 $1196 +line 2893 +;2893: { +line 2894 +;2894: pm->ps->rocketLockIndex = tr.entityNum; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 580 +ADDP4 +ADDRLP4 20+52 +INDIRI4 +ASGNI4 +line 2895 +;2895: pm->ps->rocketLockTime = pm->cmd.serverTime; +ADDRLP4 1204 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1204 +INDIRP4 +INDIRP4 +CNSTI4 588 +ADDP4 +ADDRLP4 1204 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2896 +;2896: } +ADDRGP4 $1197 +JUMPV +LABELV $1196 +line 2897 +;2897: else if (pm->ps->rocketLockIndex == tr.entityNum) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 580 +ADDP4 +INDIRI4 +ADDRLP4 20+52 +INDIRI4 +NEI4 $1200 +line 2898 +;2898: { +line 2899 +;2899: if (pm->ps->rocketLockTime == -1) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 588 +ADDP4 +INDIRF4 +CNSTF4 3212836864 +NEF4 $1203 +line 2900 +;2900: { +line 2901 +;2901: pm->ps->rocketLockTime = pm->ps->rocketLastValidTime; +ADDRLP4 1204 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1204 +INDIRP4 +CNSTI4 588 +ADDP4 +ADDRLP4 1204 +INDIRP4 +CNSTI4 584 +ADDP4 +INDIRF4 +ASGNF4 +line 2902 +;2902: } +LABELV $1203 +line 2903 +;2903: } +LABELV $1200 +LABELV $1197 +LABELV $1194 +line 2905 +;2904: +;2905: if (pm->ps->rocketLockIndex == tr.entityNum) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 580 +ADDP4 +INDIRI4 +ADDRLP4 20+52 +INDIRI4 +NEI4 $1152 +line 2906 +;2906: { +line 2907 +;2907: pm->ps->rocketTargetTime = pm->cmd.serverTime + 500; +ADDRLP4 1204 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1204 +INDIRP4 +INDIRP4 +CNSTI4 592 +ADDP4 +ADDRLP4 1204 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 500 +ADDI4 +CVIF4 4 +ASGNF4 +line 2908 +;2908: } +line 2909 +;2909: } +ADDRGP4 $1152 +JUMPV +LABELV $1188 +line 2910 +;2910: else if (pm->ps->rocketTargetTime < pm->cmd.serverTime) +ADDRLP4 1196 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1196 +INDIRP4 +INDIRP4 +CNSTI4 592 +ADDP4 +INDIRF4 +ADDRLP4 1196 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CVIF4 4 +GEF4 $1208 +line 2911 +;2911: { +line 2912 +;2912: pm->ps->rocketLockIndex = MAX_CLIENTS; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 580 +ADDP4 +CNSTI4 32 +ASGNI4 +line 2913 +;2913: pm->ps->rocketLockTime = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 588 +ADDP4 +CNSTF4 0 +ASGNF4 +line 2914 +;2914: } +ADDRGP4 $1152 +JUMPV +LABELV $1208 +line 2916 +;2915: else +;2916: { +line 2917 +;2917: if (pm->ps->rocketLockTime != -1) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 588 +ADDP4 +INDIRF4 +CNSTF4 3212836864 +EQF4 $1210 +line 2918 +;2918: { +line 2919 +;2919: pm->ps->rocketLastValidTime = pm->ps->rocketLockTime; +ADDRLP4 1200 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 584 +ADDP4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 588 +ADDP4 +INDIRF4 +ASGNF4 +line 2920 +;2920: } +LABELV $1210 +line 2921 +;2921: pm->ps->rocketLockTime = -1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 588 +ADDP4 +CNSTF4 3212836864 +ASGNF4 +line 2922 +;2922: } +line 2923 +;2923: } +line 2924 +;2924: break; +ADDRGP4 $1152 +JUMPV +LABELV $1212 +line 2929 +;2925: +;2926: //------------------ +;2927: case WP_THERMAL: +;2928: +;2929: if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $1213 +line 2930 +;2930: { +line 2931 +;2931: altFire = qtrue; // override default of not being an alt-fire +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 2932 +;2932: charging = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 2933 +;2933: } +ADDRGP4 $1152 +JUMPV +LABELV $1213 +line 2934 +;2934: else if ( pm->cmd.buttons & BUTTON_ATTACK ) +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1152 +line 2935 +;2935: { +line 2936 +;2936: charging = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 2937 +;2937: } +line 2938 +;2938: break; +ADDRGP4 $1152 +JUMPV +LABELV $1217 +line 2941 +;2939: +;2940: case WP_DEMP2: +;2941: if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $1152 +line 2942 +;2942: { +line 2943 +;2943: altFire = qtrue; // override default of not being an alt-fire +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 2944 +;2944: charging = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 2945 +;2945: } +line 2946 +;2946: break; +ADDRGP4 $1152 +JUMPV +LABELV $1220 +line 2949 +;2947: +;2948: case WP_DISRUPTOR: +;2949: if ((pm->cmd.buttons & BUTTON_ATTACK) && +ADDRLP4 1120 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1124 +CNSTI4 1 +ASGNI4 +ADDRLP4 1128 +CNSTI4 0 +ASGNI4 +ADDRLP4 1120 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 1124 +INDIRI4 +BANDI4 +ADDRLP4 1128 +INDIRI4 +EQI4 $1221 +ADDRLP4 1132 +ADDRLP4 1120 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1132 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +ADDRLP4 1124 +INDIRI4 +NEI4 $1221 +ADDRLP4 1132 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +ADDRLP4 1128 +INDIRI4 +EQI4 $1221 +line 2952 +;2950: pm->ps->zoomMode == 1 && +;2951: pm->ps->zoomLocked) +;2952: { +line 2953 +;2953: charging = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 2954 +;2954: altFire = qtrue; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 2955 +;2955: } +LABELV $1221 +line 2957 +;2956: +;2957: if (pm->ps->zoomMode != 1 && +ADDRLP4 1136 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1136 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +EQI4 $1223 +ADDRLP4 1136 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1223 +line 2959 +;2958: pm->ps->weaponstate == WEAPON_CHARGING_ALT) +;2959: { +line 2960 +;2960: pm->ps->weaponstate = WEAPON_READY; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2961 +;2961: charging = qfalse; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 2962 +;2962: altFire = qfalse; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 2963 +;2963: } +LABELV $1223 +line 2965 +;2964: +;2965: } // end switch +LABELV $1151 +LABELV $1152 +line 2970 +;2966: +;2967: +;2968: // set up the appropriate weapon state based on the button that's down. +;2969: // Note that we ALWAYS return if charging is set ( meaning the buttons are still down ) +;2970: if ( charging ) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $1227 +line 2971 +;2971: { +line 2972 +;2972: if ( altFire ) +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $1229 +line 2973 +;2973: { +line 2974 +;2974: if ( pm->ps->weaponstate != WEAPON_CHARGING_ALT ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 5 +EQI4 $1231 +line 2975 +;2975: { +line 2977 +;2976: // charge isn't started, so do it now +;2977: pm->ps->weaponstate = WEAPON_CHARGING_ALT; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 5 +ASGNI4 +line 2978 +;2978: pm->ps->weaponChargeTime = pm->cmd.serverTime; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDRLP4 1108 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 2979 +;2979: pm->ps->weaponChargeSubtractTime = pm->cmd.serverTime + weaponData[pm->ps->weapon].altChargeSubTime; +ADDRLP4 1112 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1116 +ADDRLP4 1112 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1116 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRLP4 1112 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 56 +ADDRLP4 1116 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+36 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 2984 +;2980: +;2981:#ifdef _DEBUG +;2982: Com_Printf("Starting charge\n"); +;2983:#endif +;2984: assert(pm->ps->weapon > WP_NONE); +line 2985 +;2985: BG_AddPredictableEventToPlayerstate(EV_WEAPON_CHARGE_ALT, pm->ps->weapon, pm->ps); +CNSTI4 96 +ARGI4 +ADDRLP4 1120 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1120 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1120 +INDIRP4 +ARGP4 +ADDRGP4 BG_AddPredictableEventToPlayerstate +CALLV +pop +line 2986 +;2986: } +LABELV $1231 +line 2988 +;2987: +;2988: if (pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] < (weaponData[pm->ps->weapon].altChargeSub+weaponData[pm->ps->weapon].altEnergyPerShot)) +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1112 +CNSTI4 56 +ADDRLP4 1108 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 1112 +INDIRI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1108 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 1112 +INDIRI4 +ADDRGP4 weaponData+44 +ADDP4 +INDIRI4 +ADDRLP4 1112 +INDIRI4 +ADDRGP4 weaponData+20 +ADDP4 +INDIRI4 +ADDI4 +GEI4 $1234 +line 2989 +;2989: { +line 2990 +;2990: pm->ps->weaponstate = WEAPON_CHARGING_ALT; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 5 +ASGNI4 +line 2992 +;2991: +;2992: goto rest; +ADDRGP4 $1238 +JUMPV +LABELV $1234 +line 2994 +;2993: } +;2994: else if ((pm->cmd.serverTime - pm->ps->weaponChargeTime) < weaponData[pm->ps->weapon].altMaxCharge) +ADDRLP4 1116 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1120 +ADDRLP4 1116 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1116 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 1120 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 56 +ADDRLP4 1120 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+52 +ADDP4 +INDIRI4 +GEI4 $1230 +line 2995 +;2995: { +line 2996 +;2996: if (pm->ps->weaponChargeSubtractTime < pm->cmd.serverTime) +ADDRLP4 1124 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1124 +INDIRP4 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +ADDRLP4 1124 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +GEI4 $1230 +line 2997 +;2997: { +line 2998 +;2998: pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] -= weaponData[pm->ps->weapon].altChargeSub; +ADDRLP4 1128 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1132 +CNSTI4 56 +ADDRLP4 1128 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 1136 +ADDRLP4 1132 +INDIRI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1128 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +ASGNP4 +ADDRLP4 1136 +INDIRP4 +ADDRLP4 1136 +INDIRP4 +INDIRI4 +ADDRLP4 1132 +INDIRI4 +ADDRGP4 weaponData+44 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 2999 +;2999: pm->ps->weaponChargeSubtractTime = pm->cmd.serverTime + weaponData[pm->ps->weapon].altChargeSubTime; +ADDRLP4 1140 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1144 +ADDRLP4 1140 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1144 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRLP4 1140 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 56 +ADDRLP4 1144 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+36 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 3000 +;3000: } +line 3001 +;3001: } +line 3002 +;3002: } +ADDRGP4 $1230 +JUMPV +LABELV $1229 +line 3004 +;3003: else +;3004: { +line 3005 +;3005: if ( pm->ps->weaponstate != WEAPON_CHARGING ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 4 +EQI4 $1246 +line 3006 +;3006: { +line 3008 +;3007: // charge isn't started, so do it now +;3008: pm->ps->weaponstate = WEAPON_CHARGING; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 4 +ASGNI4 +line 3009 +;3009: pm->ps->weaponChargeTime = pm->cmd.serverTime; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDRLP4 1108 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 3010 +;3010: pm->ps->weaponChargeSubtractTime = pm->cmd.serverTime + weaponData[pm->ps->weapon].chargeSubTime; +ADDRLP4 1112 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1116 +ADDRLP4 1112 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1116 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRLP4 1112 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 56 +ADDRLP4 1116 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+32 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 3015 +;3011: +;3012:#ifdef _DEBUG +;3013: Com_Printf("Starting charge\n"); +;3014:#endif +;3015: BG_AddPredictableEventToPlayerstate(EV_WEAPON_CHARGE, pm->ps->weapon, pm->ps); +CNSTI4 95 +ARGI4 +ADDRLP4 1120 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1120 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1120 +INDIRP4 +ARGP4 +ADDRGP4 BG_AddPredictableEventToPlayerstate +CALLV +pop +line 3016 +;3016: } +LABELV $1246 +line 3018 +;3017: +;3018: if (pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] < (weaponData[pm->ps->weapon].chargeSub+weaponData[pm->ps->weapon].energyPerShot)) +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1112 +CNSTI4 56 +ADDRLP4 1108 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 1112 +INDIRI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1108 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 1112 +INDIRI4 +ADDRGP4 weaponData+40 +ADDP4 +INDIRI4 +ADDRLP4 1112 +INDIRI4 +ADDRGP4 weaponData+8 +ADDP4 +INDIRI4 +ADDI4 +GEI4 $1249 +line 3019 +;3019: { +line 3020 +;3020: pm->ps->weaponstate = WEAPON_CHARGING; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 4 +ASGNI4 +line 3022 +;3021: +;3022: goto rest; +ADDRGP4 $1238 +JUMPV +LABELV $1249 +line 3024 +;3023: } +;3024: else if ((pm->cmd.serverTime - pm->ps->weaponChargeTime) < weaponData[pm->ps->weapon].maxCharge) +ADDRLP4 1116 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1120 +ADDRLP4 1116 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1116 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 1120 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 56 +ADDRLP4 1120 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+48 +ADDP4 +INDIRI4 +GEI4 $1253 +line 3025 +;3025: { +line 3026 +;3026: if (pm->ps->weaponChargeSubtractTime < pm->cmd.serverTime) +ADDRLP4 1124 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1124 +INDIRP4 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +ADDRLP4 1124 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +GEI4 $1256 +line 3027 +;3027: { +line 3028 +;3028: pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] -= weaponData[pm->ps->weapon].chargeSub; +ADDRLP4 1128 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1132 +CNSTI4 56 +ADDRLP4 1128 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 1136 +ADDRLP4 1132 +INDIRI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1128 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +ASGNP4 +ADDRLP4 1136 +INDIRP4 +ADDRLP4 1136 +INDIRP4 +INDIRI4 +ADDRLP4 1132 +INDIRI4 +ADDRGP4 weaponData+40 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 3029 +;3029: pm->ps->weaponChargeSubtractTime = pm->cmd.serverTime + weaponData[pm->ps->weapon].chargeSubTime; +ADDRLP4 1140 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1144 +ADDRLP4 1140 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1144 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRLP4 1140 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 56 +ADDRLP4 1144 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+32 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 3030 +;3030: } +LABELV $1256 +line 3031 +;3031: } +LABELV $1253 +line 3032 +;3032: } +LABELV $1230 +line 3034 +;3033: +;3034: return qtrue; // short-circuit rest of weapon code +CNSTI4 1 +RETI4 +ADDRGP4 $1150 +JUMPV +LABELV $1227 +LABELV $1238 +line 3039 +;3035: } +;3036:rest: +;3037: // Only charging weapons should be able to set these states...so.... +;3038: // let's see which fire mode we need to set up now that the buttons are up +;3039: if ( pm->ps->weaponstate == WEAPON_CHARGING ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 4 +NEI4 $1260 +line 3040 +;3040: { +line 3047 +;3041: // weapon has a charge, so let us do an attack +;3042:#ifdef _DEBUG +;3043: Com_Printf("Firing. Charge time=%d\n", pm->cmd.serverTime - pm->ps->weaponChargeTime); +;3044:#endif +;3045: +;3046: // dumb, but since we shoot a charged weapon on button-up, we need to repress this button for now +;3047: pm->cmd.buttons |= BUTTON_ATTACK; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ADDRLP4 1108 +INDIRP4 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 3048 +;3048: pm->ps->eFlags |= EF_FIRING; +ADDRLP4 1112 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +ASGNP4 +ADDRLP4 1112 +INDIRP4 +ADDRLP4 1112 +INDIRP4 +INDIRI4 +CNSTI4 256 +BORI4 +ASGNI4 +line 3049 +;3049: } +ADDRGP4 $1261 +JUMPV +LABELV $1260 +line 3050 +;3050: else if ( pm->ps->weaponstate == WEAPON_CHARGING_ALT ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1262 +line 3051 +;3051: { +line 3058 +;3052: // weapon has a charge, so let us do an alt-attack +;3053:#ifdef _DEBUG +;3054: Com_Printf("Firing. Charge time=%d\n", pm->cmd.serverTime - pm->ps->weaponChargeTime); +;3055:#endif +;3056: +;3057: // dumb, but since we shoot a charged weapon on button-up, we need to repress this button for now +;3058: pm->cmd.buttons |= BUTTON_ALT_ATTACK; +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ADDRLP4 1108 +INDIRP4 +INDIRI4 +CNSTI4 128 +BORI4 +ASGNI4 +line 3059 +;3059: pm->ps->eFlags |= (EF_FIRING|EF_ALT_FIRING); +ADDRLP4 1112 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +ASGNP4 +ADDRLP4 1112 +INDIRP4 +ADDRLP4 1112 +INDIRP4 +INDIRI4 +CNSTI4 768 +BORI4 +ASGNI4 +line 3060 +;3060: } +LABELV $1262 +LABELV $1261 +line 3062 +;3061: +;3062: return qfalse; // continue with the rest of the weapon code +CNSTI4 0 +RETI4 +LABELV $1150 +endproc PM_DoChargedWeapons 1208 28 +export PM_ItemUsable +proc PM_ItemUsable 1236 28 +line 3070 +;3063:} +;3064: +;3065: +;3066:#define BOWCASTER_CHARGE_UNIT 200.0f // bowcaster charging gives us one more unit every 200ms--if you change this, you'll have to do the same in g_weapon +;3067:#define BRYAR_CHARGE_UNIT 200.0f // bryar charging gives us one more unit every 200ms--if you change this, you'll have to do the same in g_weapon +;3068: +;3069:int PM_ItemUsable(playerState_t *ps, int forcedUse) +;3070:{ +line 3077 +;3071: vec3_t fwd, fwdorg, dest, pos; +;3072: vec3_t yawonly; +;3073: vec3_t mins, maxs; +;3074: vec3_t trtest; +;3075: trace_t tr; +;3076: +;3077: if (ps->usingATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1265 +line 3078 +;3078: { +line 3079 +;3079: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1265 +line 3082 +;3080: } +;3081: +;3082: if (ps->pm_flags & PMF_USE_ITEM_HELD) +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $1267 +line 3083 +;3083: { //force to let go first +line 3084 +;3084: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1267 +line 3087 +;3085: } +;3086: +;3087: if (ps->duelInProgress) +ADDRFP4 0 +INDIRP4 +CNSTI4 1304 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1269 +line 3088 +;3088: { //not allowed to use holdables while in a private duel. +line 3089 +;3089: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1269 +line 3092 +;3090: } +;3091: +;3092: if (!forcedUse) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $1271 +line 3093 +;3093: { +line 3094 +;3094: forcedUse = bg_itemlist[ps->stats[STAT_HOLDABLE_ITEM]].giTag; +ADDRFP4 4 +CNSTI4 52 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ASGNI4 +line 3095 +;3095: } +LABELV $1271 +line 3097 +;3096: +;3097: switch (forcedUse) +ADDRLP4 1176 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 1176 +INDIRI4 +CNSTI4 1 +LTI4 $1274 +ADDRLP4 1176 +INDIRI4 +CNSTI4 6 +GTI4 $1274 +ADDRLP4 1176 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1334-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1334 +address $1282 +address $1312 +address $1276 +address $1274 +address $1274 +address $1285 +code +line 3098 +;3098: { +LABELV $1276 +line 3100 +;3099: case HI_MEDPAC: +;3100: if (ps->stats[STAT_HEALTH] >= ps->stats[STAT_MAX_HEALTH]) +ADDRLP4 1180 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1180 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ADDRLP4 1180 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +LTI4 $1277 +line 3101 +;3101: { +line 3102 +;3102: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1277 +line 3104 +;3103: } +;3104: if (ps->stats[STAT_HEALTH] <= 0 || +ADDRLP4 1184 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1188 +CNSTI4 0 +ASGNI4 +ADDRLP4 1184 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ADDRLP4 1188 +INDIRI4 +LEI4 $1281 +ADDRLP4 1184 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 1188 +INDIRI4 +EQI4 $1279 +LABELV $1281 +line 3106 +;3105: (ps->eFlags & EF_DEAD)) +;3106: { +line 3107 +;3107: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1279 +line 3110 +;3108: } +;3109: +;3110: return 1; +CNSTI4 1 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1282 +line 3112 +;3111: case HI_SEEKER: +;3112: if (ps->eFlags & EF_SEEKERDRONE) +ADDRFP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +CNSTI4 1048576 +BANDI4 +CNSTI4 0 +EQI4 $1283 +line 3113 +;3113: { +line 3114 +;3114: PM_AddEventWithParm(EV_ITEMUSEFAIL, SEEKER_ALREADYDEPLOYED); +CNSTI4 56 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRGP4 PM_AddEventWithParm +CALLV +pop +line 3115 +;3115: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1283 +line 3118 +;3116: } +;3117: +;3118: return 1; +CNSTI4 1 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1285 +line 3120 +;3119: case HI_SENTRY_GUN: +;3120: if (ps->fd.sentryDeployed) +ADDRFP4 0 +INDIRP4 +CNSTI4 1224 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1286 +line 3121 +;3121: { +line 3122 +;3122: PM_AddEventWithParm(EV_ITEMUSEFAIL, SENTRY_ALREADYPLACED); +CNSTI4 56 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 PM_AddEventWithParm +CALLV +pop +line 3123 +;3123: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1286 +line 3126 +;3124: } +;3125: +;3126: yawonly[ROLL] = 0; +ADDRLP4 1140+8 +CNSTF4 0 +ASGNF4 +line 3127 +;3127: yawonly[PITCH] = 0; +ADDRLP4 1140 +CNSTF4 0 +ASGNF4 +line 3128 +;3128: yawonly[YAW] = ps->viewangles[YAW]; +ADDRLP4 1140+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRF4 +ASGNF4 +line 3130 +;3129: +;3130: VectorSet( mins, -8, -8, 0 ); +ADDRLP4 1192 +CNSTF4 3238002688 +ASGNF4 +ADDRLP4 1092 +ADDRLP4 1192 +INDIRF4 +ASGNF4 +ADDRLP4 1092+4 +ADDRLP4 1192 +INDIRF4 +ASGNF4 +ADDRLP4 1092+8 +CNSTF4 0 +ASGNF4 +line 3131 +;3131: VectorSet( maxs, 8, 8, 24 ); +ADDRLP4 1196 +CNSTF4 1090519040 +ASGNF4 +ADDRLP4 1104 +ADDRLP4 1196 +INDIRF4 +ASGNF4 +ADDRLP4 1104+4 +ADDRLP4 1196 +INDIRF4 +ASGNF4 +ADDRLP4 1104+8 +CNSTF4 1103101952 +ASGNF4 +line 3133 +;3132: +;3133: AngleVectors(yawonly, fwd, NULL, NULL); +ADDRLP4 1140 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1200 +CNSTP4 0 +ASGNP4 +ADDRLP4 1200 +INDIRP4 +ARGP4 +ADDRLP4 1200 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 3135 +;3134: +;3135: fwdorg[0] = ps->origin[0] + fwd[0]*64; +ADDRLP4 1116 +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +CNSTF4 1115684864 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3136 +;3136: fwdorg[1] = ps->origin[1] + fwd[1]*64; +ADDRLP4 1116+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +CNSTF4 1115684864 +ADDRLP4 0+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3137 +;3137: fwdorg[2] = ps->origin[2] + fwd[2]*64; +ADDRLP4 1116+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1115684864 +ADDRLP4 0+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3139 +;3138: +;3139: trtest[0] = fwdorg[0] + fwd[0]*16; +ADDRLP4 1152 +ADDRLP4 1116 +INDIRF4 +CNSTF4 1098907648 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3140 +;3140: trtest[1] = fwdorg[1] + fwd[1]*16; +ADDRLP4 1152+4 +ADDRLP4 1116+4 +INDIRF4 +CNSTF4 1098907648 +ADDRLP4 0+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3141 +;3141: trtest[2] = fwdorg[2] + fwd[2]*16; +ADDRLP4 1152+8 +ADDRLP4 1116+8 +INDIRF4 +CNSTF4 1098907648 +ADDRLP4 0+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3143 +;3142: +;3143: pm->trace(&tr, ps->origin, mins, maxs, trtest, ps->clientNum, MASK_PLAYERSOLID); +ADDRLP4 12 +ARGP4 +ADDRLP4 1204 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1204 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 1092 +ARGP4 +ADDRLP4 1104 +ARGP4 +ADDRLP4 1152 +ARGP4 +ADDRLP4 1204 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 273 +ARGI4 +ADDRGP4 pm +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 3145 +;3144: +;3145: if ((tr.fraction != 1 && tr.entityNum != ps->clientNum) || tr.startsolid || tr.allsolid) +ADDRLP4 12+8 +INDIRF4 +CNSTF4 1065353216 +EQF4 $1310 +ADDRLP4 12+52 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +NEI4 $1311 +LABELV $1310 +ADDRLP4 1208 +CNSTI4 0 +ASGNI4 +ADDRLP4 12+4 +INDIRI4 +ADDRLP4 1208 +INDIRI4 +NEI4 $1311 +ADDRLP4 12 +INDIRI4 +ADDRLP4 1208 +INDIRI4 +EQI4 $1304 +LABELV $1311 +line 3146 +;3146: { +line 3147 +;3147: PM_AddEventWithParm(EV_ITEMUSEFAIL, SENTRY_NOROOM); +CNSTI4 56 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 PM_AddEventWithParm +CALLV +pop +line 3148 +;3148: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1304 +line 3151 +;3149: } +;3150: +;3151: return 1; +CNSTI4 1 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1312 +line 3153 +;3152: case HI_SHIELD: +;3153: mins[0] = -8; +ADDRLP4 1092 +CNSTF4 3238002688 +ASGNF4 +line 3154 +;3154: mins[1] = -8; +ADDRLP4 1092+4 +CNSTF4 3238002688 +ASGNF4 +line 3155 +;3155: mins[2] = 0; +ADDRLP4 1092+8 +CNSTF4 0 +ASGNF4 +line 3157 +;3156: +;3157: maxs[0] = 8; +ADDRLP4 1104 +CNSTF4 1090519040 +ASGNF4 +line 3158 +;3158: maxs[1] = 8; +ADDRLP4 1104+4 +CNSTF4 1090519040 +ASGNF4 +line 3159 +;3159: maxs[2] = 8; +ADDRLP4 1104+8 +CNSTF4 1090519040 +ASGNF4 +line 3161 +;3160: +;3161: AngleVectors (ps->viewangles, fwd, NULL, NULL); +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1212 +CNSTP4 0 +ASGNP4 +ADDRLP4 1212 +INDIRP4 +ARGP4 +ADDRLP4 1212 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 3162 +;3162: fwd[2] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 3163 +;3163: VectorMA(ps->origin, 64, fwd, dest); +ADDRLP4 1216 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1220 +CNSTF4 1115684864 +ASGNF4 +ADDRLP4 1128 +ADDRLP4 1216 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1220 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1128+4 +ADDRLP4 1216 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1220 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1128+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1115684864 +ADDRLP4 0+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3164 +;3164: pm->trace(&tr, ps->origin, mins, maxs, dest, ps->clientNum, MASK_SHOT ); +ADDRLP4 12 +ARGP4 +ADDRLP4 1224 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1224 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 1092 +ARGP4 +ADDRLP4 1104 +ARGP4 +ADDRLP4 1128 +ARGP4 +ADDRLP4 1224 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 769 +ARGI4 +ADDRGP4 pm +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 3165 +;3165: if (tr.fraction > 0.9 && !tr.startsolid && !tr.allsolid) +ADDRLP4 12+8 +INDIRF4 +CNSTF4 1063675494 +LEF4 $1322 +ADDRLP4 1228 +CNSTI4 0 +ASGNI4 +ADDRLP4 12+4 +INDIRI4 +ADDRLP4 1228 +INDIRI4 +NEI4 $1322 +ADDRLP4 12 +INDIRI4 +ADDRLP4 1228 +INDIRI4 +NEI4 $1322 +line 3166 +;3166: { +line 3167 +;3167: VectorCopy(tr.endpos, pos); +ADDRLP4 1164 +ADDRLP4 12+12 +INDIRB +ASGNB 12 +line 3168 +;3168: VectorSet( dest, pos[0], pos[1], pos[2] - 4096 ); +ADDRLP4 1128 +ADDRLP4 1164 +INDIRF4 +ASGNF4 +ADDRLP4 1128+4 +ADDRLP4 1164+4 +INDIRF4 +ASGNF4 +ADDRLP4 1128+8 +ADDRLP4 1164+8 +INDIRF4 +CNSTF4 1166016512 +SUBF4 +ASGNF4 +line 3169 +;3169: pm->trace( &tr, pos, mins, maxs, dest, ps->clientNum, MASK_SOLID ); +ADDRLP4 12 +ARGP4 +ADDRLP4 1164 +ARGP4 +ADDRLP4 1092 +ARGP4 +ADDRLP4 1104 +ARGP4 +ADDRLP4 1128 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 pm +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 3170 +;3170: if ( !tr.startsolid && !tr.allsolid ) +ADDRLP4 1232 +CNSTI4 0 +ASGNI4 +ADDRLP4 12+4 +INDIRI4 +ADDRLP4 1232 +INDIRI4 +NEI4 $1331 +ADDRLP4 12 +INDIRI4 +ADDRLP4 1232 +INDIRI4 +NEI4 $1331 +line 3171 +;3171: { +line 3172 +;3172: return 1; +CNSTI4 1 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1331 +line 3174 +;3173: } +;3174: } +LABELV $1322 +line 3175 +;3175: PM_AddEventWithParm(EV_ITEMUSEFAIL, SHIELD_NOROOM); +CNSTI4 56 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRGP4 PM_AddEventWithParm +CALLV +pop +line 3176 +;3176: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $1264 +JUMPV +LABELV $1274 +line 3178 +;3177: default: +;3178: return 1; +CNSTI4 1 +RETI4 +LABELV $1264 +endproc PM_ItemUsable 1236 28 +proc PM_Weapon 156 16 +line 3190 +;3179: } +;3180:} +;3181: +;3182:/* +;3183:============== +;3184:PM_Weapon +;3185: +;3186:Generates weapon events and modifes the weapon counter +;3187:============== +;3188:*/ +;3189:static void PM_Weapon( void ) +;3190:{ +line 3193 +;3191: int addTime; +;3192: int amount; +;3193: int killAfterItem = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 3195 +;3194: +;3195: if (pm->ps->usingATST) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1337 +line 3196 +;3196: { +line 3197 +;3197: if ( pm->ps->weaponTime > 0 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1339 +line 3198 +;3198: { +line 3199 +;3199: pm->ps->weaponTime -= pml.msec; +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +ADDRGP4 pml+40 +INDIRI4 +SUBI4 +ASGNI4 +line 3200 +;3200: } +LABELV $1339 +line 3202 +;3201: +;3202: if (pm->ps->weaponTime < 1 && (pm->cmd.buttons & (BUTTON_ATTACK|BUTTON_ALT_ATTACK))) +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 1 +GEI4 $1336 +ADDRLP4 12 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 129 +BANDI4 +CNSTI4 0 +EQI4 $1336 +line 3203 +;3203: { +line 3204 +;3204: pm->ps->weaponTime += 500; +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +CNSTI4 500 +ADDI4 +ASGNI4 +line 3206 +;3205: +;3206: if (pm->ps->atstAltFire) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1320 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1344 +line 3207 +;3207: { +line 3208 +;3208: PM_AddEvent( EV_ALT_FIRE ); +CNSTI4 25 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 3209 +;3209: pm->ps->atstAltFire = qfalse; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1320 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3210 +;3210: } +ADDRGP4 $1336 +JUMPV +LABELV $1344 +line 3212 +;3211: else +;3212: { +line 3213 +;3213: PM_AddEvent( EV_FIRE_WEAPON ); +CNSTI4 24 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 3214 +;3214: pm->ps->atstAltFire = qtrue; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1320 +ADDP4 +CNSTI4 1 +ASGNI4 +line 3215 +;3215: } +line 3216 +;3216: } +line 3218 +;3217: +;3218: return; +ADDRGP4 $1336 +JUMPV +LABELV $1337 +line 3221 +;3219: } +;3220: +;3221: if (pm->ps->weapon != WP_DISRUPTOR && pm->ps->weapon != WP_ROCKET_LAUNCHER) +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 5 +EQI4 $1346 +ADDRLP4 12 +INDIRI4 +CNSTI4 10 +EQI4 $1346 +line 3222 +;3222: { //check for exceeding max charge time if not using disruptor or rocket launcher +line 3223 +;3223: if ( pm->ps->weaponstate == WEAPON_CHARGING_ALT ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1348 +line 3224 +;3224: { +line 3225 +;3225: int timeDif = (pm->cmd.serverTime - pm->ps->weaponChargeTime); +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 20 +INDIRP4 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 3227 +;3226: +;3227: if (timeDif > MAX_WEAPON_CHARGE_TIME) +ADDRLP4 16 +INDIRI4 +CNSTI4 5000 +LEI4 $1350 +line 3228 +;3228: { +line 3229 +;3229: pm->cmd.buttons &= ~BUTTON_ALT_ATTACK; +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 -129 +BANDI4 +ASGNI4 +line 3230 +;3230: } +LABELV $1350 +line 3231 +;3231: } +LABELV $1348 +line 3233 +;3232: +;3233: if ( pm->ps->weaponstate == WEAPON_CHARGING ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 4 +NEI4 $1352 +line 3234 +;3234: { +line 3235 +;3235: int timeDif = (pm->cmd.serverTime - pm->ps->weaponChargeTime); +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 20 +INDIRP4 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 3237 +;3236: +;3237: if (timeDif > MAX_WEAPON_CHARGE_TIME) +ADDRLP4 16 +INDIRI4 +CNSTI4 5000 +LEI4 $1354 +line 3238 +;3238: { +line 3239 +;3239: pm->cmd.buttons &= ~BUTTON_ATTACK; +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 3240 +;3240: } +LABELV $1354 +line 3241 +;3241: } +LABELV $1352 +line 3242 +;3242: } +LABELV $1346 +line 3244 +;3243: +;3244: if (pm->ps->forceHandExtend == HANDEXTEND_WEAPONREADY) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $1356 +line 3245 +;3245: { //reset into weapon stance +line 3246 +;3246: if (pm->ps->weapon != WP_SABER) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +EQI4 $1358 +line 3247 +;3247: { //saber handles its own anims +line 3248 +;3248: if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1) +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1360 +ADDRLP4 16 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1360 +line 3249 +;3249: { +line 3251 +;3250: //PM_StartTorsoAnim( TORSO_WEAPONREADY4 ); +;3251: PM_StartTorsoAnim( TORSO_RAISEWEAP1); +CNSTI4 1095 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3252 +;3252: } +ADDRGP4 $1361 +JUMPV +LABELV $1360 +line 3254 +;3253: else +;3254: { +line 3255 +;3255: if (pm->ps->weapon == WP_EMPLACED_GUN) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $1362 +line 3256 +;3256: { +line 3257 +;3257: PM_StartTorsoAnim( BOTH_GUNSIT1 ); +CNSTI4 810 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3258 +;3258: } +ADDRGP4 $1363 +JUMPV +LABELV $1362 +line 3260 +;3259: else +;3260: { +line 3262 +;3261: //PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); +;3262: PM_StartTorsoAnim( TORSO_RAISEWEAP1); +CNSTI4 1095 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3263 +;3263: } +LABELV $1363 +line 3264 +;3264: } +LABELV $1361 +line 3265 +;3265: } +LABELV $1358 +line 3269 +;3266: +;3267: //we now go into a weapon raise anim after every force hand extend. +;3268: //this is so that my holster-view-weapon-when-hand-extend stuff works. +;3269: pm->ps->weaponstate = WEAPON_RAISING; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 1 +ASGNI4 +line 3270 +;3270: pm->ps->weaponTime += 250; +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +CNSTI4 250 +ADDI4 +ASGNI4 +line 3272 +;3271: +;3272: pm->ps->forceHandExtend = HANDEXTEND_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1248 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3273 +;3273: } +ADDRGP4 $1357 +JUMPV +LABELV $1356 +line 3274 +;3274: else if (pm->ps->forceHandExtend != HANDEXTEND_NONE) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1364 +line 3275 +;3275: { //nothing else should be allowed to happen during this time, including weapon fire +line 3276 +;3276: int desiredAnim = 0; +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +line 3277 +;3277: qboolean seperateOnTorso = qfalse; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +line 3278 +;3278: int desiredOnTorso = 0; +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +line 3280 +;3279: +;3280: switch(pm->ps->forceHandExtend) +ADDRLP4 28 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 1 +LTI4 $1366 +ADDRLP4 28 +INDIRI4 +CNSTI4 10 +GTI4 $1366 +ADDRLP4 28 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1390-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1390 +address $1369 +address $1370 +address $1371 +address $1372 +address $1373 +address $1366 +address $1374 +address $1375 +address $1388 +address $1389 +code +line 3281 +;3281: { +LABELV $1369 +line 3283 +;3282: case HANDEXTEND_FORCEPUSH: +;3283: desiredAnim = BOTH_FORCEPUSH; +ADDRLP4 16 +CNSTI4 1041 +ASGNI4 +line 3284 +;3284: break; +ADDRGP4 $1367 +JUMPV +LABELV $1370 +line 3286 +;3285: case HANDEXTEND_FORCEPULL: +;3286: desiredAnim = BOTH_FORCEPULL; +ADDRLP4 16 +CNSTI4 1042 +ASGNI4 +line 3287 +;3287: break; +ADDRGP4 $1367 +JUMPV +LABELV $1371 +line 3289 +;3288: case HANDEXTEND_FORCEGRIP: +;3289: desiredAnim = BOTH_FORCEGRIP_HOLD; +ADDRLP4 16 +CNSTI4 1056 +ASGNI4 +line 3290 +;3290: break; +ADDRGP4 $1367 +JUMPV +LABELV $1372 +line 3292 +;3291: case HANDEXTEND_SABERPULL: +;3292: desiredAnim = BOTH_SABERPULL; +ADDRLP4 16 +CNSTI4 1052 +ASGNI4 +line 3293 +;3293: break; +ADDRGP4 $1367 +JUMPV +LABELV $1373 +line 3295 +;3294: case HANDEXTEND_CHOKE: +;3295: desiredAnim = BOTH_CHOKE3; //left-handed choke +ADDRLP4 16 +CNSTI4 1032 +ASGNI4 +line 3296 +;3296: break; +ADDRGP4 $1367 +JUMPV +LABELV $1374 +line 3298 +;3297: case HANDEXTEND_DODGE: +;3298: desiredAnim = pm->ps->forceDodgeAnim; +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1260 +ADDP4 +INDIRI4 +ASGNI4 +line 3299 +;3299: break; +ADDRGP4 $1367 +JUMPV +LABELV $1375 +line 3301 +;3300: case HANDEXTEND_KNOCKDOWN: +;3301: if (pm->ps->forceDodgeAnim) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1260 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1376 +line 3302 +;3302: { +line 3303 +;3303: if (pm->ps->forceDodgeAnim > 4) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1260 +ADDP4 +INDIRI4 +CNSTI4 4 +LEI4 $1378 +line 3304 +;3304: { //this means that we want to play a sepereate anim on the torso +line 3305 +;3305: int originalDAnim = pm->ps->forceDodgeAnim-8; //-8 is the original legs anim +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1260 +ADDP4 +INDIRI4 +CNSTI4 8 +SUBI4 +ASGNI4 +line 3306 +;3306: if (originalDAnim == 2) +ADDRLP4 36 +INDIRI4 +CNSTI4 2 +NEI4 $1380 +line 3307 +;3307: { +line 3308 +;3308: desiredAnim = BOTH_FORCE_GETUP_B1; +ADDRLP4 16 +CNSTI4 938 +ASGNI4 +line 3309 +;3309: } +ADDRGP4 $1381 +JUMPV +LABELV $1380 +line 3310 +;3310: else if (originalDAnim == 3) +ADDRLP4 36 +INDIRI4 +CNSTI4 3 +NEI4 $1382 +line 3311 +;3311: { +line 3312 +;3312: desiredAnim = BOTH_FORCE_GETUP_B3; +ADDRLP4 16 +CNSTI4 940 +ASGNI4 +line 3313 +;3313: } +ADDRGP4 $1383 +JUMPV +LABELV $1382 +line 3315 +;3314: else +;3315: { +line 3316 +;3316: desiredAnim = BOTH_GETUP1; +ADDRLP4 16 +CNSTI4 929 +ASGNI4 +line 3317 +;3317: } +LABELV $1383 +LABELV $1381 +line 3320 +;3318: +;3319: //now specify the torso anim +;3320: seperateOnTorso = qtrue; +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +line 3321 +;3321: desiredOnTorso = BOTH_FORCEPUSH; +ADDRLP4 24 +CNSTI4 1041 +ASGNI4 +line 3322 +;3322: } +ADDRGP4 $1367 +JUMPV +LABELV $1378 +line 3323 +;3323: else if (pm->ps->forceDodgeAnim == 2) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1260 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1384 +line 3324 +;3324: { +line 3325 +;3325: desiredAnim = BOTH_FORCE_GETUP_B1; +ADDRLP4 16 +CNSTI4 938 +ASGNI4 +line 3326 +;3326: } +ADDRGP4 $1367 +JUMPV +LABELV $1384 +line 3327 +;3327: else if (pm->ps->forceDodgeAnim == 3) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1260 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1386 +line 3328 +;3328: { +line 3329 +;3329: desiredAnim = BOTH_FORCE_GETUP_B3; +ADDRLP4 16 +CNSTI4 940 +ASGNI4 +line 3330 +;3330: } +ADDRGP4 $1367 +JUMPV +LABELV $1386 +line 3332 +;3331: else +;3332: { +line 3333 +;3333: desiredAnim = BOTH_GETUP1; +ADDRLP4 16 +CNSTI4 929 +ASGNI4 +line 3334 +;3334: } +line 3335 +;3335: } +ADDRGP4 $1367 +JUMPV +LABELV $1376 +line 3337 +;3336: else +;3337: { +line 3338 +;3338: desiredAnim = BOTH_KNOCKDOWN1; +ADDRLP4 16 +CNSTI4 924 +ASGNI4 +line 3339 +;3339: } +line 3340 +;3340: break; +ADDRGP4 $1367 +JUMPV +LABELV $1388 +line 3342 +;3341: case HANDEXTEND_DUELCHALLENGE: +;3342: desiredAnim = BOTH_ENGAGETAUNT; +ADDRLP4 16 +CNSTI4 904 +ASGNI4 +line 3343 +;3343: break; +ADDRGP4 $1367 +JUMPV +LABELV $1389 +line 3345 +;3344: case HANDEXTEND_TAUNT: +;3345: desiredAnim = pm->ps->forceDodgeAnim; +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1260 +ADDP4 +INDIRI4 +ASGNI4 +line 3346 +;3346: break; +ADDRGP4 $1367 +JUMPV +LABELV $1366 +line 3359 +;3347: //Hmm... maybe use these, too? +;3348: //BOTH_FORCEHEAL_QUICK //quick heal (SP level 2 & 3) +;3349: //BOTH_MINDTRICK1 // wave (maybe for mind trick 2 & 3 - whole area, and for force seeing) +;3350: //BOTH_MINDTRICK2 // tap (maybe for mind trick 1 - one person) +;3351: //BOTH_FORCEGRIP_START //start grip +;3352: //BOTH_FORCEGRIP_HOLD //hold grip +;3353: //BOTH_FORCEGRIP_RELEASE //release grip +;3354: //BOTH_FORCELIGHTNING //quick lightning burst (level 1) +;3355: //BOTH_FORCELIGHTNING_START //start lightning +;3356: //BOTH_FORCELIGHTNING_HOLD //hold lightning +;3357: //BOTH_FORCELIGHTNING_RELEASE //release lightning +;3358: default: +;3359: desiredAnim = BOTH_FORCEPUSH; +ADDRLP4 16 +CNSTI4 1041 +ASGNI4 +line 3360 +;3360: break; +LABELV $1367 +line 3363 +;3361: } +;3362: +;3363: if (!seperateOnTorso) +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $1392 +line 3364 +;3364: { //of seperateOnTorso, handle it after setting the legs +line 3365 +;3365: PM_SetAnim(SETANIM_TORSO, desiredAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); +CNSTI4 1 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 3366 +;3366: pm->ps->torsoTimer = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 1 +ASGNI4 +line 3367 +;3367: } +LABELV $1392 +line 3369 +;3368: +;3369: if (pm->ps->forceHandExtend == HANDEXTEND_DODGE || pm->ps->forceHandExtend == HANDEXTEND_KNOCKDOWN || +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 36 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 7 +EQI4 $1397 +ADDRLP4 40 +INDIRI4 +CNSTI4 8 +EQI4 $1397 +ADDRLP4 40 +INDIRI4 +CNSTI4 5 +NEI4 $1336 +ADDRLP4 36 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +NEI4 $1336 +LABELV $1397 +line 3371 +;3370: (pm->ps->forceHandExtend == HANDEXTEND_CHOKE && pm->ps->groundEntityNum == ENTITYNUM_NONE) ) +;3371: { //special case, play dodge anim on whole body, choke anim too if off ground +line 3372 +;3372: if (seperateOnTorso) +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $1398 +line 3373 +;3373: { +line 3374 +;3374: PM_SetAnim(SETANIM_LEGS, desiredAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); +CNSTI4 2 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 3375 +;3375: pm->ps->legsTimer = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 1 +ASGNI4 +line 3377 +;3376: +;3377: PM_SetAnim(SETANIM_TORSO, desiredOnTorso, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); +CNSTI4 1 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 3378 +;3378: pm->ps->torsoTimer = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 1 +ASGNI4 +line 3379 +;3379: } +ADDRGP4 $1336 +JUMPV +LABELV $1398 +line 3381 +;3380: else +;3381: { +line 3382 +;3382: PM_SetAnim(SETANIM_LEGS, desiredAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); +CNSTI4 2 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 3383 +;3383: pm->ps->legsTimer = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 1 +ASGNI4 +line 3384 +;3384: } +line 3385 +;3385: } +line 3387 +;3386: +;3387: return; +ADDRGP4 $1336 +JUMPV +LABELV $1364 +LABELV $1357 +line 3390 +;3388: } +;3389: +;3390: if (BG_InSpecialJump(pm->ps->legsAnim) || +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $1403 +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +NEI4 $1403 +ADDRLP4 28 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 32 +ADDRGP4 PM_InRollComplete +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $1400 +LABELV $1403 +line 3393 +;3391: BG_InRoll(pm->ps, pm->ps->legsAnim) || +;3392: PM_InRollComplete(pm->ps, pm->ps->legsAnim)) +;3393: { +line 3394 +;3394: pm->cmd.weapon = WP_SABER; +ADDRGP4 pm +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTU1 2 +ASGNU1 +line 3395 +;3395: pm->ps->weapon = WP_SABER; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 2 +ASGNI4 +line 3396 +;3396: } +LABELV $1400 +line 3398 +;3397: +;3398: if (pm->ps->duelInProgress) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1304 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1404 +line 3399 +;3399: { +line 3400 +;3400: pm->cmd.weapon = WP_SABER; +ADDRGP4 pm +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTU1 2 +ASGNU1 +line 3401 +;3401: pm->ps->weapon = WP_SABER; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 2 +ASGNI4 +line 3403 +;3402: +;3403: if (pm->ps->duelTime >= pm->cmd.serverTime) +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +INDIRP4 +CNSTI4 1300 +ADDP4 +INDIRI4 +ADDRLP4 36 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LTI4 $1406 +line 3404 +;3404: { +line 3405 +;3405: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 3406 +;3406: pm->cmd.forwardmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 3407 +;3407: pm->cmd.rightmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 3408 +;3408: } +LABELV $1406 +line 3409 +;3409: } +LABELV $1404 +line 3411 +;3410: +;3411: if (pm->ps->weapon == WP_SABER && pm->ps->saberMove != LS_READY && pm->ps->saberMove != LS_NONE) +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1408 +ADDRLP4 40 +ADDRLP4 36 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 1 +EQI4 $1408 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $1408 +line 3412 +;3412: { +line 3413 +;3413: pm->cmd.weapon = WP_SABER; //don't allow switching out mid-attack +ADDRGP4 pm +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTU1 2 +ASGNU1 +line 3414 +;3414: } +LABELV $1408 +line 3416 +;3415: +;3416: if (pm->ps->weapon == WP_SABER) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1410 +line 3417 +;3417: { +line 3419 +;3418: //rww - we still need the item stuff, so we won't return immediately +;3419: PM_WeaponLightsaber(); +ADDRGP4 PM_WeaponLightsaber +CALLV +pop +line 3420 +;3420: killAfterItem = 1; +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +line 3421 +;3421: } +ADDRGP4 $1411 +JUMPV +LABELV $1410 +line 3423 +;3422: else +;3423: { +line 3424 +;3424: pm->ps->saberHolstered = qfalse; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1312 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3425 +;3425: } +LABELV $1411 +line 3427 +;3426: +;3427: if (pm->ps->weapon == WP_THERMAL || +ADDRLP4 44 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 11 +EQI4 $1415 +ADDRLP4 44 +INDIRI4 +CNSTI4 12 +EQI4 $1415 +ADDRLP4 44 +INDIRI4 +CNSTI4 13 +NEI4 $1412 +LABELV $1415 +line 3430 +;3428: pm->ps->weapon == WP_TRIP_MINE || +;3429: pm->ps->weapon == WP_DET_PACK) +;3430: { +line 3431 +;3431: if (pm->ps->weapon == WP_THERMAL) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 11 +NEI4 $1416 +line 3432 +;3432: { +line 3433 +;3433: if ((pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == WeaponAttackAnim[pm->ps->weapon] && +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ADDRLP4 48 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 WeaponAttackAnim +ADDP4 +INDIRI4 +NEI4 $1417 +ADDRLP4 48 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 200 +SUBI4 +CNSTI4 0 +GTI4 $1417 +line 3435 +;3434: (pm->ps->weaponTime-200) <= 0) +;3435: { +line 3436 +;3436: PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 WeaponReadyAnim +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3437 +;3437: } +line 3438 +;3438: } +ADDRGP4 $1417 +JUMPV +LABELV $1416 +line 3440 +;3439: else +;3440: { +line 3441 +;3441: if ((pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == WeaponAttackAnim[pm->ps->weapon] && +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ADDRLP4 48 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 WeaponAttackAnim +ADDP4 +INDIRI4 +NEI4 $1420 +ADDRLP4 48 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 700 +SUBI4 +CNSTI4 0 +GTI4 $1420 +line 3443 +;3442: (pm->ps->weaponTime-700) <= 0) +;3443: { +line 3444 +;3444: PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 WeaponReadyAnim +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3445 +;3445: } +LABELV $1420 +line 3446 +;3446: } +LABELV $1417 +line 3447 +;3447: } +LABELV $1412 +line 3450 +;3448: +;3449: // don't allow attack until all buttons are up +;3450: if ( pm->ps->pm_flags & PMF_RESPAWNED ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $1422 +line 3451 +;3451: return; +ADDRGP4 $1336 +JUMPV +LABELV $1422 +line 3455 +;3452: } +;3453: +;3454: // ignore if spectator +;3455: if ( pm->ps->persistant[PERS_TEAM] == TEAM_SPECTATOR ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1424 +line 3456 +;3456: return; +ADDRGP4 $1336 +JUMPV +LABELV $1424 +line 3460 +;3457: } +;3458: +;3459: // check for dead player +;3460: if ( pm->ps->stats[STAT_HEALTH] <= 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $1426 +line 3461 +;3461: pm->ps->weapon = WP_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3462 +;3462: return; +ADDRGP4 $1336 +JUMPV +LABELV $1426 +line 3466 +;3463: } +;3464: +;3465: // check for item using +;3466: if ( pm->cmd.buttons & BUTTON_USE_HOLDABLE ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $1428 +line 3467 +;3467: if ( ! ( pm->ps->pm_flags & PMF_USE_ITEM_HELD ) ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +NEI4 $1429 +line 3469 +;3468: +;3469: if (!pm->ps->stats[STAT_HOLDABLE_ITEM]) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1432 +line 3470 +;3470: { +line 3471 +;3471: return; +ADDRGP4 $1336 +JUMPV +LABELV $1432 +line 3474 +;3472: } +;3473: +;3474: if (!PM_ItemUsable(pm->ps, 0)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 48 +ADDRGP4 PM_ItemUsable +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +NEI4 $1434 +line 3475 +;3475: { +line 3476 +;3476: pm->ps->pm_flags |= PMF_USE_ITEM_HELD; +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 3477 +;3477: return; +ADDRGP4 $1336 +JUMPV +LABELV $1434 +line 3480 +;3478: } +;3479: else +;3480: { +line 3481 +;3481: if (pm->ps->stats[STAT_HOLDABLE_ITEMS] & (1 << bg_itemlist[pm->ps->stats[STAT_HOLDABLE_ITEM]].giTag)) +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRI4 +CNSTI4 1 +CNSTI4 52 +ADDRLP4 52 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $1336 +line 3482 +;3482: { +line 3483 +;3483: if (bg_itemlist[pm->ps->stats[STAT_HOLDABLE_ITEM]].giTag != HI_BINOCULARS) +CNSTI4 52 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +CNSTI4 5 +EQI4 $1437 +line 3484 +;3484: { //never use up the binoculars +line 3485 +;3485: pm->ps->stats[STAT_HOLDABLE_ITEMS] -= (1 << bg_itemlist[pm->ps->stats[STAT_HOLDABLE_ITEM]].giTag); +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 60 +ADDRLP4 56 +INDIRP4 +CNSTI4 224 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRI4 +CNSTI4 1 +CNSTI4 52 +ADDRLP4 56 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +LSHI4 +SUBI4 +ASGNI4 +line 3486 +;3486: } +line 3487 +;3487: } +line 3489 +;3488: else +;3489: { +line 3490 +;3490: return; //this should not happen... +LABELV $1437 +line 3493 +;3491: } +;3492: +;3493: pm->ps->pm_flags |= PMF_USE_ITEM_HELD; +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 3494 +;3494: PM_AddEvent( EV_USE_ITEM0 + bg_itemlist[pm->ps->stats[STAT_HOLDABLE_ITEM]].giTag ); +CNSTI4 52 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +CNSTI4 40 +ADDI4 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 3496 +;3495: +;3496: if (bg_itemlist[pm->ps->stats[STAT_HOLDABLE_ITEM]].giTag != HI_BINOCULARS) +CNSTI4 52 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +CNSTI4 5 +EQI4 $1336 +line 3497 +;3497: { +line 3498 +;3498: pm->ps->stats[STAT_HOLDABLE_ITEM] = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 220 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3499 +;3499: BG_CycleInven(pm->ps, 1); +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 BG_CycleInven +CALLV +pop +line 3500 +;3500: } +line 3501 +;3501: } +line 3502 +;3502: return; +ADDRGP4 $1336 +JUMPV +line 3504 +;3503: } +;3504: } else { +LABELV $1428 +line 3505 +;3505: pm->ps->pm_flags &= ~PMF_USE_ITEM_HELD; +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 3506 +;3506: } +LABELV $1429 +line 3508 +;3507: +;3508: if (pm->ps->weapon == WP_SABER) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1447 +line 3509 +;3509: { //we can't toggle zoom while using saber (for obvious reasons) so make sure it's always off +line 3510 +;3510: pm->ps->zoomMode = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1332 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3511 +;3511: pm->ps->zoomFov = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1344 +ADDP4 +CNSTF4 0 +ASGNF4 +line 3512 +;3512: pm->ps->zoomLocked = qfalse; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1340 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3513 +;3513: pm->ps->zoomLockTime = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1348 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3514 +;3514: } +LABELV $1447 +line 3516 +;3515: +;3516: if (killAfterItem) +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $1449 +line 3517 +;3517: { +line 3518 +;3518: return; +ADDRGP4 $1336 +JUMPV +LABELV $1449 +line 3522 +;3519: } +;3520: +;3521: // make weapon function +;3522: if ( pm->ps->weaponTime > 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1451 +line 3523 +;3523: pm->ps->weaponTime -= pml.msec; +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRI4 +ADDRGP4 pml+40 +INDIRI4 +SUBI4 +ASGNI4 +line 3524 +;3524: } +LABELV $1451 +line 3526 +;3525: +;3526: if (pm->ps->isJediMaster && pm->ps->emplacedIndex) +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 52 +CNSTI4 0 +ASGNI4 +ADDRLP4 48 +INDIRP4 +CNSTI4 604 +ADDP4 +INDIRI4 +ADDRLP4 52 +INDIRI4 +EQI4 $1454 +ADDRLP4 48 +INDIRP4 +CNSTI4 596 +ADDP4 +INDIRI4 +ADDRLP4 52 +INDIRI4 +EQI4 $1454 +line 3527 +;3527: { +line 3528 +;3528: pm->ps->emplacedIndex = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 596 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3529 +;3529: } +LABELV $1454 +line 3531 +;3530: +;3531: if (pm->ps->duelInProgress && pm->ps->emplacedIndex) +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 60 +CNSTI4 0 +ASGNI4 +ADDRLP4 56 +INDIRP4 +CNSTI4 1304 +ADDP4 +INDIRI4 +ADDRLP4 60 +INDIRI4 +EQI4 $1456 +ADDRLP4 56 +INDIRP4 +CNSTI4 596 +ADDP4 +INDIRI4 +ADDRLP4 60 +INDIRI4 +EQI4 $1456 +line 3532 +;3532: { +line 3533 +;3533: pm->ps->emplacedIndex = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 596 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3534 +;3534: } +LABELV $1456 +line 3536 +;3535: +;3536: if (pm->ps->weapon == WP_EMPLACED_GUN && pm->ps->emplacedIndex) +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $1458 +ADDRLP4 64 +INDIRP4 +CNSTI4 596 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1458 +line 3537 +;3537: { +line 3538 +;3538: pm->cmd.weapon = WP_EMPLACED_GUN; //No switch for you! +ADDRGP4 pm +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTU1 14 +ASGNU1 +line 3539 +;3539: PM_StartTorsoAnim( BOTH_GUNSIT1 ); +CNSTI4 810 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3540 +;3540: } +LABELV $1458 +line 3542 +;3541: +;3542: if (pm->ps->isJediMaster || pm->ps->duelInProgress || pm->ps->trueJedi) +ADDRLP4 68 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 72 +CNSTI4 0 +ASGNI4 +ADDRLP4 68 +INDIRP4 +CNSTI4 604 +ADDP4 +INDIRI4 +ADDRLP4 72 +INDIRI4 +NEI4 $1463 +ADDRLP4 68 +INDIRP4 +CNSTI4 1304 +ADDP4 +INDIRI4 +ADDRLP4 72 +INDIRI4 +NEI4 $1463 +ADDRLP4 68 +INDIRP4 +CNSTI4 612 +ADDP4 +INDIRI4 +ADDRLP4 72 +INDIRI4 +EQI4 $1460 +LABELV $1463 +line 3543 +;3543: { +line 3544 +;3544: pm->cmd.weapon = WP_SABER; +ADDRGP4 pm +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTU1 2 +ASGNU1 +line 3545 +;3545: pm->ps->weapon = WP_SABER; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 2 +ASGNI4 +line 3547 +;3546: +;3547: if (pm->ps->isJediMaster || pm->ps->trueJedi) +ADDRLP4 76 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 80 +CNSTI4 0 +ASGNI4 +ADDRLP4 76 +INDIRP4 +CNSTI4 604 +ADDP4 +INDIRI4 +ADDRLP4 80 +INDIRI4 +NEI4 $1466 +ADDRLP4 76 +INDIRP4 +CNSTI4 612 +ADDP4 +INDIRI4 +ADDRLP4 80 +INDIRI4 +EQI4 $1464 +LABELV $1466 +line 3548 +;3548: { +line 3549 +;3549: pm->ps->stats[STAT_WEAPONS] = (1 << WP_SABER); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 232 +ADDP4 +CNSTI4 4 +ASGNI4 +line 3550 +;3550: } +LABELV $1464 +line 3551 +;3551: } +LABELV $1460 +line 3553 +;3552: +;3553: amount = weaponData[pm->ps->weapon].energyPerShot; +ADDRLP4 4 +CNSTI4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+8 +ADDP4 +INDIRI4 +ASGNI4 +line 3556 +;3554: +;3555: // take an ammo away if not infinite +;3556: if ( pm->ps->weapon != WP_NONE && +ADDRLP4 76 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 80 +ADDRLP4 76 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 84 +ADDRLP4 80 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 88 +CNSTI4 0 +ASGNI4 +ADDRLP4 84 +INDIRI4 +ADDRLP4 88 +INDIRI4 +EQI4 $1468 +ADDRLP4 84 +INDIRI4 +ADDRLP4 76 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRU1 +CVUI4 1 +NEI4 $1468 +ADDRLP4 80 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +ADDRLP4 88 +INDIRI4 +LEI4 $1470 +ADDRLP4 80 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $1468 +LABELV $1470 +line 3559 +;3557: pm->ps->weapon == pm->cmd.weapon && +;3558: (pm->ps->weaponTime <= 0 || pm->ps->weaponstate != WEAPON_FIRING) ) +;3559: { +line 3560 +;3560: if ( pm->ps->ammo[ weaponData[pm->ps->weapon].ammoIndex ] != -1 ) +ADDRLP4 92 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +CNSTI4 56 +ADDRLP4 92 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 92 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $1471 +line 3561 +;3561: { +line 3563 +;3562: // enough energy to fire this weapon? +;3563: if (pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] < weaponData[pm->ps->weapon].energyPerShot && +ADDRLP4 96 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 100 +CNSTI4 56 +ADDRLP4 96 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 104 +ADDRLP4 100 +INDIRI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 96 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 104 +INDIRI4 +ADDRLP4 100 +INDIRI4 +ADDRGP4 weaponData+8 +ADDP4 +INDIRI4 +GEI4 $1473 +ADDRLP4 104 +INDIRI4 +ADDRLP4 100 +INDIRI4 +ADDRGP4 weaponData+20 +ADDP4 +INDIRI4 +GEI4 $1473 +line 3565 +;3564: pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] < weaponData[pm->ps->weapon].altEnergyPerShot) +;3565: { //the weapon is out of ammo essentially because it cannot fire primary or secondary, so do the switch +line 3567 +;3566: //regardless of if the player is attacking or not +;3567: PM_AddEventWithParm( EV_NOAMMO, WP_NUM_WEAPONS+pm->ps->weapon ); +CNSTI4 22 +ARGI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 16 +ADDI4 +ARGI4 +ADDRGP4 PM_AddEventWithParm +CALLV +pop +line 3569 +;3568: +;3569: if (pm->ps->weaponTime < 500) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 500 +GEI4 $1336 +line 3570 +;3570: { +line 3571 +;3571: pm->ps->weaponTime += 500; +ADDRLP4 108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 108 +INDIRP4 +ADDRLP4 108 +INDIRP4 +INDIRI4 +CNSTI4 500 +ADDI4 +ASGNI4 +line 3572 +;3572: } +line 3573 +;3573: return; +ADDRGP4 $1336 +JUMPV +LABELV $1473 +line 3576 +;3574: } +;3575: +;3576: if (pm->ps->weapon == WP_DET_PACK && !pm->ps->hasDetPackPlanted && pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] < 1) +ADDRLP4 108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 112 +ADDRLP4 108 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 112 +INDIRI4 +CNSTI4 13 +NEI4 $1479 +ADDRLP4 108 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1479 +CNSTI4 56 +ADDRLP4 112 +INDIRI4 +MULI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 108 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 1 +GEI4 $1479 +line 3577 +;3577: { +line 3578 +;3578: PM_AddEventWithParm( EV_NOAMMO, WP_NUM_WEAPONS+pm->ps->weapon ); +CNSTI4 22 +ARGI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 16 +ADDI4 +ARGI4 +ADDRGP4 PM_AddEventWithParm +CALLV +pop +line 3580 +;3579: +;3580: if (pm->ps->weaponTime < 500) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 500 +GEI4 $1336 +line 3581 +;3581: { +line 3582 +;3582: pm->ps->weaponTime += 500; +ADDRLP4 116 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 116 +INDIRP4 +ADDRLP4 116 +INDIRP4 +INDIRI4 +CNSTI4 500 +ADDI4 +ASGNI4 +line 3583 +;3583: } +line 3584 +;3584: return; +ADDRGP4 $1336 +JUMPV +LABELV $1479 +line 3586 +;3585: } +;3586: } +LABELV $1471 +line 3587 +;3587: } +LABELV $1468 +line 3592 +;3588: +;3589: // check for weapon change +;3590: // can't change if weapon is firing, but can change +;3591: // again if lowering or raising +;3592: if ( pm->ps->weaponTime <= 0 || pm->ps->weaponstate != WEAPON_FIRING ) { +ADDRLP4 92 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1485 +ADDRLP4 92 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $1483 +LABELV $1485 +line 3593 +;3593: if ( pm->ps->weapon != pm->cmd.weapon ) { +ADDRLP4 96 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ADDRLP4 96 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRU1 +CVUI4 1 +EQI4 $1486 +line 3594 +;3594: PM_BeginWeaponChange( pm->cmd.weapon ); +ADDRGP4 pm +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRU1 +CVUI4 1 +ARGI4 +ADDRGP4 PM_BeginWeaponChange +CALLV +pop +line 3595 +;3595: } +LABELV $1486 +line 3596 +;3596: } +LABELV $1483 +line 3598 +;3597: +;3598: if ( pm->ps->weaponTime > 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1488 +line 3599 +;3599: return; +ADDRGP4 $1336 +JUMPV +LABELV $1488 +line 3603 +;3600: } +;3601: +;3602: // change weapon if time +;3603: if ( pm->ps->weaponstate == WEAPON_DROPPING ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1490 +line 3604 +;3604: PM_FinishWeaponChange(); +ADDRGP4 PM_FinishWeaponChange +CALLV +pop +line 3605 +;3605: return; +ADDRGP4 $1336 +JUMPV +LABELV $1490 +line 3608 +;3606: } +;3607: +;3608: if ( pm->ps->weaponstate == WEAPON_RAISING ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1492 +line 3609 +;3609: pm->ps->weaponstate = WEAPON_READY; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3610 +;3610: if ( pm->ps->weapon == WP_SABER ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1494 +line 3611 +;3611: PM_StartTorsoAnim( PM_GetSaberStance() ); +ADDRLP4 96 +ADDRGP4 PM_GetSaberStance +CALLI4 +ASGNI4 +ADDRLP4 96 +INDIRI4 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3612 +;3612: } else { +ADDRGP4 $1336 +JUMPV +LABELV $1494 +line 3613 +;3613: if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1) +ADDRLP4 96 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1496 +ADDRLP4 96 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1496 +line 3614 +;3614: { +line 3615 +;3615: PM_StartTorsoAnim( TORSO_WEAPONREADY4 ); +CNSTI4 1102 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3616 +;3616: } +ADDRGP4 $1336 +JUMPV +LABELV $1496 +line 3618 +;3617: else +;3618: { +line 3619 +;3619: if (pm->ps->weapon == WP_EMPLACED_GUN) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $1498 +line 3620 +;3620: { +line 3621 +;3621: PM_StartTorsoAnim( BOTH_GUNSIT1 ); +CNSTI4 810 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3622 +;3622: } +ADDRGP4 $1336 +JUMPV +LABELV $1498 +line 3624 +;3623: else +;3624: { +line 3625 +;3625: PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 WeaponReadyAnim +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3626 +;3626: } +line 3627 +;3627: } +line 3628 +;3628: } +line 3629 +;3629: return; +ADDRGP4 $1336 +JUMPV +LABELV $1492 +line 3632 +;3630: } +;3631: +;3632: if (((pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) == TORSO_WEAPONREADY4 || +ADDRLP4 96 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 96 +INDIRI4 +CNSTI4 1102 +EQI4 $1502 +ADDRLP4 96 +INDIRI4 +CNSTI4 121 +NEI4 $1500 +LABELV $1502 +ADDRLP4 100 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 100 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1503 +ADDRLP4 100 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +EQI4 $1500 +LABELV $1503 +line 3635 +;3633: (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_ATTACK4) && +;3634: (pm->ps->weapon != WP_DISRUPTOR || pm->ps->zoomMode != 1)) +;3635: { +line 3636 +;3636: if (pm->ps->weapon == WP_EMPLACED_GUN) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $1504 +line 3637 +;3637: { +line 3638 +;3638: PM_StartTorsoAnim( BOTH_GUNSIT1 ); +CNSTI4 810 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3639 +;3639: } +ADDRGP4 $1501 +JUMPV +LABELV $1504 +line 3641 +;3640: else +;3641: { +line 3642 +;3642: PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 WeaponReadyAnim +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3643 +;3643: } +line 3644 +;3644: } +ADDRGP4 $1501 +JUMPV +LABELV $1500 +line 3645 +;3645: else if (((pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) != TORSO_WEAPONREADY4 && +ADDRLP4 104 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 108 +ADDRLP4 104 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 108 +INDIRI4 +CNSTI4 1102 +EQI4 $1506 +ADDRLP4 108 +INDIRI4 +CNSTI4 121 +EQI4 $1506 +ADDRLP4 104 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1506 +ADDRLP4 104 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1506 +line 3648 +;3646: (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) != BOTH_ATTACK4) && +;3647: (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1)) +;3648: { +line 3649 +;3649: PM_StartTorsoAnim( TORSO_WEAPONREADY4 ); +CNSTI4 1102 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3650 +;3650: } +LABELV $1506 +LABELV $1501 +line 3653 +;3651: +;3652: +;3653: if (pm->ps->weapon != WP_ROCKET_LAUNCHER) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 10 +EQI4 $1508 +line 3654 +;3654: { +line 3655 +;3655: pm->ps->rocketLockIndex = MAX_CLIENTS; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 580 +ADDP4 +CNSTI4 32 +ASGNI4 +line 3656 +;3656: pm->ps->rocketLockTime = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 588 +ADDP4 +CNSTF4 0 +ASGNF4 +line 3657 +;3657: pm->ps->rocketTargetTime = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 592 +ADDP4 +CNSTF4 0 +ASGNF4 +line 3658 +;3658: } +LABELV $1508 +line 3660 +;3659: +;3660: if ( PM_DoChargedWeapons()) +ADDRLP4 112 +ADDRGP4 PM_DoChargedWeapons +CALLI4 +ASGNI4 +ADDRLP4 112 +INDIRI4 +CNSTI4 0 +EQI4 $1510 +line 3661 +;3661: { +line 3663 +;3662: // In some cases the charged weapon code may want us to short circuit the rest of the firing code +;3663: return; +ADDRGP4 $1336 +JUMPV +LABELV $1510 +line 3667 +;3664: } +;3665: +;3666: // check for fire +;3667: if ( ! (pm->cmd.buttons & (BUTTON_ATTACK|BUTTON_ALT_ATTACK))) +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 129 +BANDI4 +CNSTI4 0 +NEI4 $1512 +line 3668 +;3668: { +line 3669 +;3669: pm->ps->weaponTime = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3670 +;3670: pm->ps->weaponstate = WEAPON_READY; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3671 +;3671: return; +ADDRGP4 $1336 +JUMPV +LABELV $1512 +line 3674 +;3672: } +;3673: +;3674: if (pm->ps->weapon == WP_EMPLACED_GUN) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $1514 +line 3675 +;3675: { +line 3676 +;3676: addTime = weaponData[pm->ps->weapon].fireTime; +ADDRLP4 0 +CNSTI4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+12 +ADDP4 +INDIRI4 +ASGNI4 +line 3677 +;3677: pm->ps->weaponTime += addTime; +ADDRLP4 116 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 116 +INDIRP4 +ADDRLP4 116 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 3678 +;3678: PM_AddEvent( EV_FIRE_WEAPON ); +CNSTI4 24 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 3679 +;3679: return; +ADDRGP4 $1336 +JUMPV +LABELV $1514 +line 3682 +;3680: } +;3681: +;3682: if (pm->ps->weapon == WP_DISRUPTOR && +ADDRLP4 116 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 120 +ADDRLP4 116 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 120 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1517 +ADDRLP4 124 +CNSTI4 0 +ASGNI4 +ADDRLP4 116 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +ADDRLP4 124 +INDIRI4 +EQI4 $1517 +ADDRLP4 120 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +ADDRLP4 124 +INDIRI4 +NEI4 $1517 +line 3685 +;3683: (pm->cmd.buttons & BUTTON_ALT_ATTACK) && +;3684: !pm->ps->zoomLocked) +;3685: { +line 3686 +;3686: return; +ADDRGP4 $1336 +JUMPV +LABELV $1517 +line 3689 +;3687: } +;3688: +;3689: if (pm->ps->weapon == WP_DISRUPTOR && +ADDRLP4 128 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 132 +ADDRLP4 128 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 132 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1519 +ADDRLP4 128 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $1519 +ADDRLP4 132 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1519 +line 3692 +;3690: (pm->cmd.buttons & BUTTON_ALT_ATTACK) && +;3691: pm->ps->zoomMode == 2) +;3692: { //can't use disruptor secondary while zoomed binoculars +line 3693 +;3693: return; +ADDRGP4 $1336 +JUMPV +LABELV $1519 +line 3696 +;3694: } +;3695: +;3696: if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1) +ADDRLP4 136 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 136 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1521 +ADDRLP4 136 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1521 +line 3697 +;3697: { +line 3698 +;3698: PM_StartTorsoAnim( BOTH_ATTACK4 ); +CNSTI4 121 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3699 +;3699: } +ADDRGP4 $1522 +JUMPV +LABELV $1521 +line 3701 +;3700: else +;3701: { +line 3702 +;3702: PM_StartTorsoAnim( WeaponAttackAnim[pm->ps->weapon] ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 WeaponAttackAnim +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 PM_StartTorsoAnim +CALLV +pop +line 3703 +;3703: } +LABELV $1522 +line 3705 +;3704: +;3705: if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $1523 +line 3706 +;3706: { +line 3707 +;3707: amount = weaponData[pm->ps->weapon].altEnergyPerShot; +ADDRLP4 4 +CNSTI4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+20 +ADDP4 +INDIRI4 +ASGNI4 +line 3708 +;3708: } +ADDRGP4 $1524 +JUMPV +LABELV $1523 +line 3710 +;3709: else +;3710: { +line 3711 +;3711: amount = weaponData[pm->ps->weapon].energyPerShot; +ADDRLP4 4 +CNSTI4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+8 +ADDP4 +INDIRI4 +ASGNI4 +line 3712 +;3712: } +LABELV $1524 +line 3714 +;3713: +;3714: pm->ps->weaponstate = WEAPON_FIRING; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 3 +ASGNI4 +line 3717 +;3715: +;3716: // take an ammo away if not infinite +;3717: if ( pm->ps->ammo[ weaponData[pm->ps->weapon].ammoIndex ] != -1 ) +ADDRLP4 140 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +CNSTI4 56 +ADDRLP4 140 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 140 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $1527 +line 3718 +;3718: { +line 3720 +;3719: // enough energy to fire this weapon? +;3720: if ((pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] - amount) >= 0) +ADDRLP4 144 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +CNSTI4 56 +ADDRLP4 144 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 144 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +CNSTI4 0 +LTI4 $1529 +line 3721 +;3721: { +line 3722 +;3722: pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] -= amount; +ADDRLP4 148 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 152 +CNSTI4 56 +ADDRLP4 148 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 148 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +ASGNP4 +ADDRLP4 152 +INDIRP4 +ADDRLP4 152 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ASGNI4 +line 3723 +;3723: } +ADDRGP4 $1530 +JUMPV +LABELV $1529 +line 3725 +;3724: else // Not enough energy +;3725: { +line 3727 +;3726: // Switch weapons +;3727: if (pm->ps->weapon != WP_DET_PACK || !pm->ps->hasDetPackPlanted) +ADDRLP4 148 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 148 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 13 +NEI4 $1533 +ADDRLP4 148 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1336 +LABELV $1533 +line 3728 +;3728: { +line 3729 +;3729: PM_AddEventWithParm( EV_NOAMMO, WP_NUM_WEAPONS+pm->ps->weapon ); +CNSTI4 22 +ARGI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 16 +ADDI4 +ARGI4 +ADDRGP4 PM_AddEventWithParm +CALLV +pop +line 3730 +;3730: if (pm->ps->weaponTime < 500) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 500 +GEI4 $1336 +line 3731 +;3731: { +line 3732 +;3732: pm->ps->weaponTime += 500; +ADDRLP4 152 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 152 +INDIRP4 +ADDRLP4 152 +INDIRP4 +INDIRI4 +CNSTI4 500 +ADDI4 +ASGNI4 +line 3733 +;3733: } +line 3734 +;3734: } +line 3735 +;3735: return; +ADDRGP4 $1336 +JUMPV +LABELV $1530 +line 3737 +;3736: } +;3737: } +LABELV $1527 +line 3739 +;3738: +;3739: if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $1536 +line 3740 +;3740: if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode != 1) +ADDRLP4 144 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 144 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1538 +ADDRLP4 144 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +EQI4 $1538 +line 3741 +;3741: { +line 3742 +;3742: PM_AddEvent( EV_FIRE_WEAPON ); +CNSTI4 24 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 3743 +;3743: addTime = weaponData[pm->ps->weapon].fireTime; +ADDRLP4 0 +CNSTI4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+12 +ADDP4 +INDIRI4 +ASGNI4 +line 3744 +;3744: } +ADDRGP4 $1537 +JUMPV +LABELV $1538 +line 3746 +;3745: else +;3746: { +line 3747 +;3747: PM_AddEvent( EV_ALT_FIRE ); +CNSTI4 25 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 3748 +;3748: addTime = weaponData[pm->ps->weapon].altFireTime; +ADDRLP4 0 +CNSTI4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+24 +ADDP4 +INDIRI4 +ASGNI4 +line 3749 +;3749: } +line 3750 +;3750: } +ADDRGP4 $1537 +JUMPV +LABELV $1536 +line 3751 +;3751: else { +line 3752 +;3752: PM_AddEvent( EV_FIRE_WEAPON ); +CNSTI4 24 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 3753 +;3753: addTime = weaponData[pm->ps->weapon].fireTime; +ADDRLP4 0 +CNSTI4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+12 +ADDP4 +INDIRI4 +ASGNI4 +line 3754 +;3754: } +LABELV $1537 +line 3756 +;3755: +;3756: if ( pm->ps->powerups[PW_HASTE] ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 356 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1543 +line 3757 +;3757: addTime /= 1.3; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +CNSTF4 1067869798 +DIVF4 +CVFI4 4 +ASGNI4 +line 3758 +;3758: } +LABELV $1543 +line 3760 +;3759: +;3760: if (pm->ps->fd.forcePowersActive & (1 << FP_RAGE)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $1545 +line 3761 +;3761: { +line 3762 +;3762: addTime *= 0.75; +ADDRLP4 0 +CNSTF4 1061158912 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 3763 +;3763: } +ADDRGP4 $1546 +JUMPV +LABELV $1545 +line 3764 +;3764: else if (pm->ps->fd.forceRageRecoveryTime > pm->cmd.serverTime) +ADDRLP4 144 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 144 +INDIRP4 +INDIRP4 +CNSTI4 1172 +ADDP4 +INDIRI4 +ADDRLP4 144 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LEI4 $1547 +line 3765 +;3765: { +line 3766 +;3766: addTime *= 1.5; +ADDRLP4 0 +CNSTF4 1069547520 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 3767 +;3767: } +LABELV $1547 +LABELV $1546 +line 3769 +;3768: +;3769: pm->ps->weaponTime += addTime; +ADDRLP4 148 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 148 +INDIRP4 +ADDRLP4 148 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 3770 +;3770:} +LABELV $1336 +endproc PM_Weapon 156 16 +proc PM_Animate 16 4 +line 3778 +;3771: +;3772:/* +;3773:================ +;3774:PM_Animate +;3775:================ +;3776:*/ +;3777: +;3778:static void PM_Animate( void ) { +line 3779 +;3779: if ( pm->cmd.buttons & BUTTON_GESTURE ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 8 +BANDI4 +CNSTI4 0 +EQI4 $1550 +line 3780 +;3780: if ( pm->ps->torsoTimer < 1 && pm->ps->forceHandExtend == HANDEXTEND_NONE && +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +GEI4 $1552 +ADDRLP4 4 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1552 +ADDRLP4 4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +GEI4 $1552 +ADDRLP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +GEI4 $1552 +ADDRLP4 4 +INDIRP4 +CNSTI4 524 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +GEI4 $1552 +line 3781 +;3781: pm->ps->legsTimer < 1 && pm->ps->weaponTime < 1 && pm->ps->saberLockTime < pm->cmd.serverTime) { +line 3783 +;3782: +;3783: pm->ps->forceHandExtend = HANDEXTEND_TAUNT; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1248 +ADDP4 +CNSTI4 10 +ASGNI4 +line 3786 +;3784: +;3785: //FIXME: random taunt anims? +;3786: pm->ps->forceDodgeAnim = BOTH_ENGAGETAUNT; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1260 +ADDP4 +CNSTI4 904 +ASGNI4 +line 3788 +;3787: +;3788: pm->ps->forceHandExtendTime = pm->cmd.serverTime + 1000; +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +INDIRP4 +CNSTI4 1252 +ADDP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1000 +ADDI4 +ASGNI4 +line 3790 +;3789: +;3790: pm->ps->weaponTime = 100; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTI4 100 +ASGNI4 +line 3792 +;3791: +;3792: PM_AddEvent( EV_TAUNT ); +CNSTI4 102 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 3793 +;3793: } +LABELV $1552 +line 3829 +;3794:#if 0 +;3795:// Here's an interesting bit. The bots in TA used buttons to do additional gestures. +;3796:// I ripped them out because I didn't want too many buttons given the fact that I was already adding some for JK2. +;3797:// We can always add some back in if we want though. +;3798: } else if ( pm->cmd.buttons & BUTTON_GETFLAG ) { +;3799: if ( pm->ps->torsoTimer == 0 ) { +;3800: PM_StartTorsoAnim( TORSO_GETFLAG ); +;3801: pm->ps->torsoTimer = 600; //TIMER_GESTURE; +;3802: } +;3803: } else if ( pm->cmd.buttons & BUTTON_GUARDBASE ) { +;3804: if ( pm->ps->torsoTimer == 0 ) { +;3805: PM_StartTorsoAnim( TORSO_GUARDBASE ); +;3806: pm->ps->torsoTimer = 600; //TIMER_GESTURE; +;3807: } +;3808: } else if ( pm->cmd.buttons & BUTTON_PATROL ) { +;3809: if ( pm->ps->torsoTimer == 0 ) { +;3810: PM_StartTorsoAnim( TORSO_PATROL ); +;3811: pm->ps->torsoTimer = 600; //TIMER_GESTURE; +;3812: } +;3813: } else if ( pm->cmd.buttons & BUTTON_FOLLOWME ) { +;3814: if ( pm->ps->torsoTimer == 0 ) { +;3815: PM_StartTorsoAnim( TORSO_FOLLOWME ); +;3816: pm->ps->torsoTimer = 600; //TIMER_GESTURE; +;3817: } +;3818: } else if ( pm->cmd.buttons & BUTTON_AFFIRMATIVE ) { +;3819: if ( pm->ps->torsoTimer == 0 ) { +;3820: PM_StartTorsoAnim( TORSO_AFFIRMATIVE); +;3821: pm->ps->torsoTimer = 600; //TIMER_GESTURE; +;3822: } +;3823: } else if ( pm->cmd.buttons & BUTTON_NEGATIVE ) { +;3824: if ( pm->ps->torsoTimer == 0 ) { +;3825: PM_StartTorsoAnim( TORSO_NEGATIVE ); +;3826: pm->ps->torsoTimer = 600; //TIMER_GESTURE; +;3827: } +;3828:#endif // +;3829: } +LABELV $1550 +line 3830 +;3830:} +LABELV $1549 +endproc PM_Animate 16 4 +proc PM_DropTimers 4 0 +line 3838 +;3831: +;3832: +;3833:/* +;3834:================ +;3835:PM_DropTimers +;3836:================ +;3837:*/ +;3838:static void PM_DropTimers( void ) { +line 3840 +;3839: // drop misc timing counter +;3840: if ( pm->ps->pm_time ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1555 +line 3841 +;3841: if ( pml.msec >= pm->ps->pm_time ) { +ADDRGP4 pml+40 +INDIRI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +LTI4 $1557 +line 3842 +;3842: pm->ps->pm_flags &= ~PMF_ALL_TIMES; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 -353 +BANDI4 +ASGNI4 +line 3843 +;3843: pm->ps->pm_time = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3844 +;3844: } else { +ADDRGP4 $1558 +JUMPV +LABELV $1557 +line 3845 +;3845: pm->ps->pm_time -= pml.msec; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 pml+40 +INDIRI4 +SUBI4 +ASGNI4 +line 3846 +;3846: } +LABELV $1558 +line 3847 +;3847: } +LABELV $1555 +line 3850 +;3848: +;3849: // drop animation counter +;3850: if ( pm->ps->legsTimer > 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1561 +line 3851 +;3851: pm->ps->legsTimer -= pml.msec; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 pml+40 +INDIRI4 +SUBI4 +ASGNI4 +line 3852 +;3852: if ( pm->ps->legsTimer < 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 0 +GEI4 $1564 +line 3853 +;3853: pm->ps->legsTimer = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3854 +;3854: } +LABELV $1564 +line 3855 +;3855: } +LABELV $1561 +line 3857 +;3856: +;3857: if ( pm->ps->torsoTimer > 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1566 +line 3858 +;3858: pm->ps->torsoTimer -= pml.msec; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 pml+40 +INDIRI4 +SUBI4 +ASGNI4 +line 3859 +;3859: if ( pm->ps->torsoTimer < 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +CNSTI4 0 +GEI4 $1569 +line 3860 +;3860: pm->ps->torsoTimer = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3861 +;3861: } +LABELV $1569 +line 3862 +;3862: } +LABELV $1566 +line 3863 +;3863:} +LABELV $1554 +endproc PM_DropTimers 4 0 +export PM_UpdateViewAngles +proc PM_UpdateViewAngles 24 0 +line 3873 +;3864: +;3865:/* +;3866:================ +;3867:PM_UpdateViewAngles +;3868: +;3869:This can be used as another entry point when only the viewangles +;3870:are being updated isntead of a full move +;3871:================ +;3872:*/ +;3873:void PM_UpdateViewAngles( playerState_t *ps, const usercmd_t *cmd ) { +line 3877 +;3874: short temp; +;3875: int i; +;3876: +;3877: if ( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPINTERMISSION) { +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 6 +EQI4 $1574 +ADDRLP4 8 +INDIRI4 +CNSTI4 7 +NEI4 $1572 +LABELV $1574 +line 3878 +;3878: return; // no view changes at all +ADDRGP4 $1571 +JUMPV +LABELV $1572 +line 3881 +;3879: } +;3880: +;3881: if ( ps->pm_type != PM_SPECTATOR && ps->stats[STAT_HEALTH] <= 0 ) { +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $1575 +ADDRLP4 12 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $1575 +line 3882 +;3882: return; // no view changes at all +ADDRGP4 $1571 +JUMPV +LABELV $1575 +line 3886 +;3883: } +;3884: +;3885: // circularly clamp the angles with deltas +;3886: for (i=0 ; i<3 ; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $1577 +line 3887 +;3887: temp = cmd->angles[i] + ps->delta_angles[i]; +ADDRLP4 16 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 16 +INDIRI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDP4 +INDIRI4 +ADDI4 +CVII2 4 +ASGNI2 +line 3888 +;3888: if ( i == PITCH ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1581 +line 3890 +;3889: // don't let the player look up or down more than 90 degrees +;3890: if ( temp > 16000 ) { +ADDRLP4 4 +INDIRI2 +CVII4 2 +CNSTI4 16000 +LEI4 $1583 +line 3891 +;3891: ps->delta_angles[i] = 16000 - cmd->angles[i]; +ADDRLP4 20 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDP4 +CNSTI4 16000 +ADDRLP4 20 +INDIRI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 3892 +;3892: temp = 16000; +ADDRLP4 4 +CNSTI2 16000 +ASGNI2 +line 3893 +;3893: } else if ( temp < -16000 ) { +ADDRGP4 $1584 +JUMPV +LABELV $1583 +ADDRLP4 4 +INDIRI2 +CVII4 2 +CNSTI4 -16000 +GEI4 $1585 +line 3894 +;3894: ps->delta_angles[i] = -16000 - cmd->angles[i]; +ADDRLP4 20 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDP4 +CNSTI4 -16000 +ADDRLP4 20 +INDIRI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 3895 +;3895: temp = -16000; +ADDRLP4 4 +CNSTI2 -16000 +ASGNI2 +line 3896 +;3896: } +LABELV $1585 +LABELV $1584 +line 3897 +;3897: } +LABELV $1581 +line 3898 +;3898: ps->viewangles[i] = SHORT2ANGLE(temp); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDP4 +CNSTF4 1001652224 +ADDRLP4 4 +INDIRI2 +CVII4 2 +CVIF4 4 +MULF4 +ASGNF4 +line 3899 +;3899: } +LABELV $1578 +line 3886 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $1577 +line 3901 +;3900: +;3901:} +LABELV $1571 +endproc PM_UpdateViewAngles 24 0 +export PM_AdjustAttackStates +proc PM_AdjustAttackStates 56 4 +line 3906 +;3902: +;3903://------------------------------------------- +;3904:void PM_AdjustAttackStates( pmove_t *pm ) +;3905://------------------------------------------- +;3906:{ +line 3910 +;3907: int amount; +;3908: +;3909: // get ammo usage +;3910: if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $1588 +line 3911 +;3911: { +line 3912 +;3912: amount = pm->ps->ammo[weaponData[ pm->ps->weapon ].ammoIndex] - weaponData[pm->ps->weapon].altEnergyPerShot; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTI4 56 +ADDRLP4 4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDRGP4 weaponData+20 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 3913 +;3913: } +ADDRGP4 $1589 +JUMPV +LABELV $1588 +line 3915 +;3914: else +;3915: { +line 3916 +;3916: amount = pm->ps->ammo[weaponData[ pm->ps->weapon ].ammoIndex] - weaponData[pm->ps->weapon].energyPerShot; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTI4 56 +ADDRLP4 4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDRGP4 weaponData+8 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 3917 +;3917: } +LABELV $1589 +line 3920 +;3918: +;3919: // disruptor alt-fire should toggle the zoom mode, but only bother doing this for the player? +;3920: if ( pm->ps->weapon == WP_DISRUPTOR && pm->ps->weaponstate == WEAPON_READY ) +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1592 +ADDRLP4 4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1592 +line 3921 +;3921: { +line 3922 +;3922: if ( !(pm->ps->eFlags & EF_ALT_FIRING) && (pm->cmd.buttons & BUTTON_ALT_ATTACK) /*&& +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRLP4 8 +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +ADDRLP4 12 +INDIRI4 +NEI4 $1594 +ADDRLP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +ADDRLP4 12 +INDIRI4 +EQI4 $1594 +line 3924 +;3923: pm->cmd.upmove <= 0 && !pm->cmd.forwardmove && !pm->cmd.rightmove*/) +;3924: { +line 3926 +;3925: // We just pressed the alt-fire key +;3926: if ( !pm->ps->zoomMode ) +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1596 +line 3927 +;3927: { +line 3929 +;3928: // not already zooming, so do it now +;3929: pm->ps->zoomMode = 1; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1332 +ADDP4 +CNSTI4 1 +ASGNI4 +line 3930 +;3930: pm->ps->zoomLocked = qfalse; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1340 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3931 +;3931: pm->ps->zoomFov = 80.0f;//cg_fov.value; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1344 +ADDP4 +CNSTF4 1117782016 +ASGNF4 +line 3932 +;3932: pm->ps->zoomLockTime = pm->cmd.serverTime + 50; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +INDIRP4 +CNSTI4 1348 +ADDP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 50 +ADDI4 +ASGNI4 +line 3933 +;3933: PM_AddEvent(EV_DISRUPTOR_ZOOMSOUND); +CNSTI4 35 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 3934 +;3934: } +ADDRGP4 $1595 +JUMPV +LABELV $1596 +line 3935 +;3935: else if (pm->ps->zoomMode == 1 && pm->ps->zoomLockTime < pm->cmd.serverTime) +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 16 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1595 +ADDRLP4 20 +INDIRP4 +CNSTI4 1348 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +GEI4 $1595 +line 3936 +;3936: { //check for == 1 so we can't turn binoculars off with disruptor alt fire +line 3938 +;3937: // already zooming, so must be wanting to turn it off +;3938: pm->ps->zoomMode = 0; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1332 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3939 +;3939: pm->ps->zoomTime = pm->ps->commandTime; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 1336 +ADDP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +ASGNI4 +line 3940 +;3940: pm->ps->zoomLocked = qfalse; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1340 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3941 +;3941: PM_AddEvent(EV_DISRUPTOR_ZOOMSOUND); +CNSTI4 35 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 3942 +;3942: } +line 3943 +;3943: } +ADDRGP4 $1595 +JUMPV +LABELV $1594 +line 3944 +;3944: else if ( !(pm->cmd.buttons & BUTTON_ALT_ATTACK ) && pm->ps->zoomLockTime < pm->cmd.serverTime) +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +NEI4 $1600 +ADDRLP4 16 +INDIRP4 +INDIRP4 +CNSTI4 1348 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +GEI4 $1600 +line 3945 +;3945: { +line 3947 +;3946: // Not pressing zoom any more +;3947: if ( pm->ps->zoomMode ) +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1602 +line 3948 +;3948: { +line 3949 +;3949: if (pm->ps->zoomMode == 1 && !pm->ps->zoomLocked) +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1604 +ADDRLP4 20 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1604 +line 3950 +;3950: { //approximate what level the client should be zoomed at based on how long zoom was held +line 3951 +;3951: pm->ps->zoomFov = ((pm->cmd.serverTime+50) - pm->ps->zoomLockTime) * 0.035f; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 24 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 1344 +ADDP4 +CNSTF4 1024416809 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 50 +ADDI4 +ADDRLP4 28 +INDIRP4 +CNSTI4 1348 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 3952 +;3952: if (pm->ps->zoomFov > 50) +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1344 +ADDP4 +INDIRF4 +CNSTF4 1112014848 +LEF4 $1606 +line 3953 +;3953: { +line 3954 +;3954: pm->ps->zoomFov = 50; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1344 +ADDP4 +CNSTF4 1112014848 +ASGNF4 +line 3955 +;3955: } +LABELV $1606 +line 3956 +;3956: if (pm->ps->zoomFov < 1) +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1344 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +GEF4 $1608 +line 3957 +;3957: { +line 3958 +;3958: pm->ps->zoomFov = 1; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1344 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 3959 +;3959: } +LABELV $1608 +line 3960 +;3960: } +LABELV $1604 +line 3962 +;3961: // were zooming in, so now lock the zoom +;3962: pm->ps->zoomLocked = qtrue; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1340 +ADDP4 +CNSTI4 1 +ASGNI4 +line 3963 +;3963: } +LABELV $1602 +line 3964 +;3964: } +LABELV $1600 +LABELV $1595 +line 3975 +;3965: //This seemed like a good idea, but apparently it confuses people. So disabled for now. +;3966: /* +;3967: else if (!(pm->ps->eFlags & EF_ALT_FIRING) && (pm->cmd.buttons & BUTTON_ALT_ATTACK) && +;3968: (pm->cmd.upmove > 0 || pm->cmd.forwardmove || pm->cmd.rightmove)) +;3969: { //if you try to zoom while moving, just convert it into a primary attack +;3970: pm->cmd.buttons &= ~BUTTON_ALT_ATTACK; +;3971: pm->cmd.buttons |= BUTTON_ATTACK; +;3972: } +;3973: */ +;3974: +;3975: if (pm->cmd.upmove > 0 || pm->cmd.forwardmove || pm->cmd.rightmove) +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 24 +INDIRI4 +GTI4 $1613 +ADDRLP4 20 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 24 +INDIRI4 +NEI4 $1613 +ADDRLP4 20 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 24 +INDIRI4 +EQI4 $1610 +LABELV $1613 +line 3976 +;3976: { +line 3977 +;3977: if (pm->ps->zoomMode == 1 && pm->ps->zoomLockTime < pm->cmd.serverTime) +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +ADDRLP4 28 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1614 +ADDRLP4 32 +INDIRP4 +CNSTI4 1348 +ADDP4 +INDIRI4 +ADDRLP4 28 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +GEI4 $1614 +line 3978 +;3978: { //check for == 1 so we can't turn binoculars off with disruptor alt fire +line 3979 +;3979: pm->ps->zoomMode = 0; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1332 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3980 +;3980: pm->ps->zoomTime = pm->ps->commandTime; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 1336 +ADDP4 +ADDRLP4 36 +INDIRP4 +INDIRI4 +ASGNI4 +line 3981 +;3981: pm->ps->zoomLocked = qfalse; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1340 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3982 +;3982: PM_AddEvent(EV_DISRUPTOR_ZOOMSOUND); +CNSTI4 35 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 3983 +;3983: } +LABELV $1614 +line 3984 +;3984: } +LABELV $1610 +line 3986 +;3985: +;3986: if ( pm->cmd.buttons & BUTTON_ATTACK ) +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1616 +line 3987 +;3987: { +line 3990 +;3988: // If we are zoomed, we should switch the ammo usage to the alt-fire, otherwise, we'll +;3989: // just use whatever ammo was selected from above +;3990: if ( pm->ps->zoomMode ) +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1593 +line 3991 +;3991: { +line 3992 +;3992: amount = pm->ps->ammo[weaponData[ pm->ps->weapon ].ammoIndex] - +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 32 +CNSTI4 56 +ADDRLP4 28 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 32 +INDIRI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 28 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 32 +INDIRI4 +ADDRGP4 weaponData+20 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 3994 +;3993: weaponData[pm->ps->weapon].altEnergyPerShot; +;3994: } +line 3995 +;3995: } +ADDRGP4 $1593 +JUMPV +LABELV $1616 +line 3997 +;3996: else +;3997: { +line 3999 +;3998: // alt-fire button pressing doesn't use any ammo +;3999: amount = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 4000 +;4000: } +line 4001 +;4001: } +ADDRGP4 $1593 +JUMPV +LABELV $1592 +line 4002 +;4002: else if (pm->ps->weapon == WP_DISRUPTOR) //still perform certain checks, even if the weapon is not ready +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1621 +line 4003 +;4003: { +line 4004 +;4004: if (pm->cmd.upmove > 0 || pm->cmd.forwardmove || pm->cmd.rightmove) +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 12 +INDIRI4 +GTI4 $1626 +ADDRLP4 8 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 12 +INDIRI4 +NEI4 $1626 +ADDRLP4 8 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 12 +INDIRI4 +EQI4 $1623 +LABELV $1626 +line 4005 +;4005: { +line 4006 +;4006: if (pm->ps->zoomMode == 1 && pm->ps->zoomLockTime < pm->cmd.serverTime) +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 16 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1627 +ADDRLP4 20 +INDIRP4 +CNSTI4 1348 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +GEI4 $1627 +line 4007 +;4007: { //check for == 1 so we can't turn binoculars off with disruptor alt fire +line 4008 +;4008: pm->ps->zoomMode = 0; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1332 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4009 +;4009: pm->ps->zoomTime = pm->ps->commandTime; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 1336 +ADDP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +ASGNI4 +line 4010 +;4010: pm->ps->zoomLocked = qfalse; +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1340 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4011 +;4011: PM_AddEvent(EV_DISRUPTOR_ZOOMSOUND); +CNSTI4 35 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 4012 +;4012: } +LABELV $1627 +line 4013 +;4013: } +LABELV $1623 +line 4014 +;4014: } +LABELV $1621 +LABELV $1593 +line 4017 +;4015: +;4016: // set the firing flag for continuous beam weapons, saber will fire even if out of ammo +;4017: if ( !(pm->ps->pm_flags & PMF_RESPAWNED) && +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +ADDRLP4 16 +INDIRI4 +NEI4 $1629 +ADDRLP4 12 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 6 +EQI4 $1629 +ADDRLP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 129 +BANDI4 +ADDRLP4 16 +INDIRI4 +EQI4 $1629 +ADDRLP4 0 +INDIRI4 +ADDRLP4 16 +INDIRI4 +GEI4 $1631 +ADDRLP4 12 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1629 +LABELV $1631 +line 4021 +;4018: pm->ps->pm_type != PM_INTERMISSION && +;4019: ( pm->cmd.buttons & (BUTTON_ATTACK|BUTTON_ALT_ATTACK)) && +;4020: ( amount >= 0 || pm->ps->weapon == WP_SABER )) +;4021: { +line 4022 +;4022: if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $1632 +line 4023 +;4023: { +line 4024 +;4024: pm->ps->eFlags |= EF_ALT_FIRING; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 512 +BORI4 +ASGNI4 +line 4025 +;4025: } +ADDRGP4 $1633 +JUMPV +LABELV $1632 +line 4027 +;4026: else +;4027: { +line 4028 +;4028: pm->ps->eFlags &= ~EF_ALT_FIRING; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 -513 +BANDI4 +ASGNI4 +line 4029 +;4029: } +LABELV $1633 +line 4032 +;4030: +;4031: // This flag should always get set, even when alt-firing +;4032: pm->ps->eFlags |= EF_FIRING; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 256 +BORI4 +ASGNI4 +line 4033 +;4033: } +ADDRGP4 $1630 +JUMPV +LABELV $1629 +line 4035 +;4034: else +;4035: { +line 4037 +;4036: // Clear 'em out +;4037: pm->ps->eFlags &= ~(EF_FIRING|EF_ALT_FIRING); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 -769 +BANDI4 +ASGNI4 +line 4038 +;4038: } +LABELV $1630 +line 4041 +;4039: +;4040: // disruptor should convert a main fire to an alt-fire if the gun is currently zoomed +;4041: if ( pm->ps->weapon == WP_DISRUPTOR) +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1634 +line 4042 +;4042: { +line 4043 +;4043: if ( pm->cmd.buttons & BUTTON_ATTACK && pm->ps->zoomMode == 1 && pm->ps->zoomLocked) +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +CNSTI4 1 +ASGNI4 +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +BANDI4 +ADDRLP4 28 +INDIRI4 +EQI4 $1636 +ADDRLP4 32 +ADDRLP4 20 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $1636 +ADDRLP4 32 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +EQI4 $1636 +line 4044 +;4044: { +line 4046 +;4045: // converting the main fire to an alt-fire +;4046: pm->cmd.buttons |= BUTTON_ALT_ATTACK; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRI4 +CNSTI4 128 +BORI4 +ASGNI4 +line 4047 +;4047: pm->ps->eFlags |= EF_ALT_FIRING; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRI4 +CNSTI4 512 +BORI4 +ASGNI4 +line 4048 +;4048: } +ADDRGP4 $1637 +JUMPV +LABELV $1636 +line 4049 +;4049: else if ( pm->cmd.buttons & BUTTON_ALT_ATTACK && pm->ps->zoomMode == 1 && pm->ps->zoomLocked) +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +CNSTI4 0 +ASGNI4 +ADDRLP4 36 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +ADDRLP4 40 +INDIRI4 +EQI4 $1638 +ADDRLP4 44 +ADDRLP4 36 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +CNSTI4 1332 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1638 +ADDRLP4 44 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +ADDRLP4 40 +INDIRI4 +EQI4 $1638 +line 4050 +;4050: { +line 4051 +;4051: pm->cmd.buttons &= ~BUTTON_ALT_ATTACK; +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRI4 +CNSTI4 -129 +BANDI4 +ASGNI4 +line 4052 +;4052: pm->ps->eFlags &= ~EF_ALT_FIRING; +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRI4 +CNSTI4 -513 +BANDI4 +ASGNI4 +line 4053 +;4053: } +LABELV $1638 +LABELV $1637 +line 4054 +;4054: } +LABELV $1634 +line 4055 +;4055:} +LABELV $1587 +endproc PM_AdjustAttackStates 56 4 +export BG_CmdForRoll +proc BG_CmdForRoll 8 0 +line 4058 +;4056: +;4057:void BG_CmdForRoll( int anim, usercmd_t *pCmd ) +;4058:{ +line 4059 +;4059: switch ( (anim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 885 +LTI4 $1641 +ADDRLP4 0 +INDIRI4 +CNSTI4 888 +GTI4 $1641 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1648-3540 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1648 +address $1644 +address $1645 +address $1647 +address $1646 +code +line 4060 +;4060: { +LABELV $1644 +line 4062 +;4061: case BOTH_ROLL_F: +;4062: pCmd->forwardmove = 127; +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTI1 127 +ASGNI1 +line 4063 +;4063: pCmd->rightmove = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 25 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4064 +;4064: break; +ADDRGP4 $1642 +JUMPV +LABELV $1645 +line 4066 +;4065: case BOTH_ROLL_B: +;4066: pCmd->forwardmove = -127; +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTI1 -127 +ASGNI1 +line 4067 +;4067: pCmd->rightmove = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 25 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4068 +;4068: break; +ADDRGP4 $1642 +JUMPV +LABELV $1646 +line 4070 +;4069: case BOTH_ROLL_R: +;4070: pCmd->forwardmove = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4071 +;4071: pCmd->rightmove = 127; +ADDRFP4 4 +INDIRP4 +CNSTI4 25 +ADDP4 +CNSTI1 127 +ASGNI1 +line 4072 +;4072: break; +ADDRGP4 $1642 +JUMPV +LABELV $1647 +line 4074 +;4073: case BOTH_ROLL_L: +;4074: pCmd->forwardmove = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4075 +;4075: pCmd->rightmove = -127; +ADDRFP4 4 +INDIRP4 +CNSTI4 25 +ADDP4 +CNSTI1 -127 +ASGNI1 +line 4076 +;4076: break; +LABELV $1641 +LABELV $1642 +line 4078 +;4077: } +;4078: pCmd->upmove = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 26 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4079 +;4079:} +LABELV $1640 +endproc BG_CmdForRoll 8 0 +export BG_AdjustClientSpeed +proc BG_AdjustClientSpeed 76 8 +line 4084 +;4080: +;4081:qboolean PM_SaberInTransition( int move ); +;4082: +;4083:void BG_AdjustClientSpeed(playerState_t *ps, usercmd_t *cmd, int svTime) +;4084:{ +line 4088 +;4085: //For prediction, always reset speed back to the last known server base speed +;4086: //If we didn't do this, under lag we'd eventually dwindle speed down to 0 even though +;4087: //that would not be the correct predicted value. +;4088: ps->speed = ps->basespeed; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +ASGNI4 +line 4090 +;4089: +;4090: if (ps->forceHandExtend == HANDEXTEND_DODGE) +ADDRFP4 0 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRI4 +CNSTI4 7 +NEI4 $1651 +line 4091 +;4091: { +line 4092 +;4092: ps->speed = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4093 +;4093: } +LABELV $1651 +line 4095 +;4094: +;4095: if (ps->forceHandExtend == HANDEXTEND_KNOCKDOWN) +ADDRFP4 0 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $1653 +line 4096 +;4096: { +line 4097 +;4097: ps->speed = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4098 +;4098: } +LABELV $1653 +line 4100 +;4099: +;4100: if (ps->usingATST && (cmd->rightmove || +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $1655 +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 25 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 4 +INDIRI4 +NEI4 $1657 +ADDRLP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 4 +INDIRI4 +EQI4 $1655 +LABELV $1657 +line 4102 +;4101: cmd->forwardmove)) +;4102: { +line 4103 +;4103: if (!ps->holdMoveTime) +ADDRFP4 0 +INDIRP4 +CNSTI4 1324 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1656 +line 4104 +;4104: { +line 4105 +;4105: ps->torsoAnim = ( ( ps->torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +ASGNP4 +ADDRLP4 16 +CNSTI4 2048 +ASGNI4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +ADDRLP4 16 +INDIRI4 +BANDI4 +ADDRLP4 16 +INDIRI4 +BXORI4 +CNSTI4 834 +BORI4 +ASGNI4 +line 4107 +;4106: | BOTH_RUN1START; +;4107: ps->holdMoveTime = svTime; +ADDRFP4 0 +INDIRP4 +CNSTI4 1324 +ADDP4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 4108 +;4108: } +line 4109 +;4109: } +ADDRGP4 $1656 +JUMPV +LABELV $1655 +line 4111 +;4110: else +;4111: { +line 4112 +;4112: ps->holdMoveTime = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1324 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4114 +;4113: +;4114: if (ps->usingATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1660 +line 4115 +;4115: { +line 4116 +;4116: ps->torsoAnim = ( ( ps->torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +ASGNP4 +ADDRLP4 16 +CNSTI4 2048 +ASGNI4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +ADDRLP4 16 +INDIRI4 +BANDI4 +ADDRLP4 16 +INDIRI4 +BXORI4 +CNSTI4 571 +BORI4 +ASGNI4 +line 4118 +;4117: | BOTH_STAND1; +;4118: } +LABELV $1660 +line 4119 +;4119: } +LABELV $1656 +line 4121 +;4120: +;4121: if (ps->usingATST && +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $1662 +ADDRLP4 20 +ADDRLP4 12 +INDIRP4 +CNSTI4 1324 +ADDP4 +INDIRI4 +ASGNI4 +ADDRFP4 8 +INDIRI4 +ADDRLP4 20 +INDIRI4 +SUBI4 +CNSTI4 500 +LTI4 $1664 +ADDRLP4 20 +INDIRI4 +ADDRLP4 16 +INDIRI4 +NEI4 $1662 +LABELV $1664 +line 4124 +;4122: ((svTime - ps->holdMoveTime) < 500 || +;4123: !ps->holdMoveTime)) +;4124: { +line 4125 +;4125: ps->speed = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4126 +;4126: } +ADDRGP4 $1663 +JUMPV +LABELV $1662 +line 4127 +;4127: else if (ps->usingATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1665 +line 4128 +;4128: { +line 4129 +;4129: if ((svTime - ps->holdMoveTime) < 600) +ADDRFP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1324 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 600 +GEI4 $1667 +line 4130 +;4130: { +line 4131 +;4131: ps->speed *= 0.4; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTF4 1053609165 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4132 +;4132: } +ADDRGP4 $1668 +JUMPV +LABELV $1667 +line 4133 +;4133: else if ((svTime - ps->holdMoveTime) < 1000) +ADDRFP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1324 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 1000 +GEI4 $1669 +line 4134 +;4134: { +line 4135 +;4135: ps->speed *= 0.5; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTF4 1056964608 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4136 +;4136: } +ADDRGP4 $1670 +JUMPV +LABELV $1669 +line 4137 +;4137: else if ((svTime - ps->holdMoveTime) < 1400) +ADDRFP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1324 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 1400 +GEI4 $1671 +line 4138 +;4138: { +line 4139 +;4139: ps->speed *= 0.6; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTF4 1058642330 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4140 +;4140: } +ADDRGP4 $1672 +JUMPV +LABELV $1671 +line 4141 +;4141: else if ((svTime - ps->holdMoveTime) < 1700) +ADDRFP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1324 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 1700 +GEI4 $1673 +line 4142 +;4142: { +line 4143 +;4143: ps->speed *= 0.7; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTF4 1060320051 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4144 +;4144: } +ADDRGP4 $1674 +JUMPV +LABELV $1673 +line 4145 +;4145: else if ((svTime - ps->holdMoveTime) < 1900) +ADDRFP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1324 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 1900 +GEI4 $1675 +line 4146 +;4146: { +line 4147 +;4147: ps->speed *= 0.8; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTF4 1061997773 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4148 +;4148: } +LABELV $1675 +LABELV $1674 +LABELV $1672 +LABELV $1670 +LABELV $1668 +line 4150 +;4149: +;4150: if (cmd->forwardmove < 0) +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $1677 +line 4151 +;4151: { +line 4152 +;4152: ps->torsoAnim = ( ( ps->torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +ASGNP4 +ADDRLP4 28 +CNSTI4 2048 +ASGNI4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +BANDI4 +ADDRLP4 28 +INDIRI4 +BXORI4 +CNSTI4 852 +BORI4 +ASGNI4 +line 4154 +;4153: | BOTH_WALKBACK1; +;4154: ps->speed *= 0.6; +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTF4 1058642330 +ADDRLP4 32 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4155 +;4155: } +ADDRGP4 $1666 +JUMPV +LABELV $1677 +line 4157 +;4156: else +;4157: { +line 4158 +;4158: ps->torsoAnim = ( ( ps->torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +ASGNP4 +ADDRLP4 28 +CNSTI4 2048 +ASGNI4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +BANDI4 +ADDRLP4 28 +INDIRI4 +BXORI4 +CNSTI4 833 +BORI4 +ASGNI4 +line 4160 +;4159: | BOTH_RUN1; +;4160: } +line 4161 +;4161: } +ADDRGP4 $1666 +JUMPV +LABELV $1665 +line 4162 +;4162: else if ( cmd->forwardmove < 0 && !(cmd->buttons&BUTTON_WALKING) && pm->ps->groundEntityNum != ENTITYNUM_NONE ) +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +ADDRLP4 24 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 28 +INDIRI4 +GEI4 $1679 +ADDRLP4 32 +CNSTI4 16 +ASGNI4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 32 +INDIRI4 +BANDI4 +ADDRLP4 28 +INDIRI4 +NEI4 $1679 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +EQI4 $1679 +line 4163 +;4163: {//running backwards is slower than running forwards (like SP) +line 4164 +;4164: ps->speed *= 0.75; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTF4 1061158912 +ADDRLP4 36 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4165 +;4165: } +LABELV $1679 +LABELV $1666 +LABELV $1663 +line 4167 +;4166: +;4167: if (ps->fd.forcePowersActive & (1 << FP_GRIP)) +ADDRFP4 0 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 64 +BANDI4 +CNSTI4 0 +EQI4 $1681 +line 4168 +;4168: { +line 4169 +;4169: ps->speed *= 0.4; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTF4 1053609165 +ADDRLP4 36 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4170 +;4170: } +LABELV $1681 +line 4172 +;4171: +;4172: if (ps->fd.forcePowersActive & (1 << FP_SPEED)) +ADDRFP4 0 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $1683 +line 4173 +;4173: { +line 4174 +;4174: if (ps->fd.forceSpeedSmash < 1.2) +ADDRFP4 0 +INDIRP4 +CNSTI4 1136 +ADDP4 +INDIRF4 +CNSTF4 1067030938 +GEF4 $1685 +line 4175 +;4175: { +line 4176 +;4176: ps->fd.forceSpeedSmash = 1.2; +ADDRFP4 0 +INDIRP4 +CNSTI4 1136 +ADDP4 +CNSTF4 1067030938 +ASGNF4 +line 4177 +;4177: } +LABELV $1685 +line 4178 +;4178: if (ps->fd.forceSpeedSmash > forceSpeedLevels[ps->fd.forcePowerLevel[FP_SPEED]]) //2.8 +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 1136 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forceSpeedLevels +ADDP4 +INDIRF4 +LEF4 $1687 +line 4179 +;4179: { +line 4180 +;4180: ps->fd.forceSpeedSmash = forceSpeedLevels[ps->fd.forcePowerLevel[FP_SPEED]]; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 1136 +ADDP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forceSpeedLevels +ADDP4 +INDIRF4 +ASGNF4 +line 4181 +;4181: } +LABELV $1687 +line 4182 +;4182: ps->speed *= ps->fd.forceSpeedSmash; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +ADDRLP4 40 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRI4 +CVIF4 4 +ADDRLP4 40 +INDIRP4 +CNSTI4 1136 +ADDP4 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 4183 +;4183: ps->fd.forceSpeedSmash += 0.005f; +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +CNSTI4 1136 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRF4 +CNSTF4 1000593162 +ADDF4 +ASGNF4 +line 4184 +;4184: } +LABELV $1683 +line 4186 +;4185: +;4186: if (ps->fd.forcePowersActive & (1 << FP_RAGE)) +ADDRFP4 0 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $1689 +line 4187 +;4187: { +line 4188 +;4188: ps->speed *= 1.3; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTF4 1067869798 +ADDRLP4 36 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4189 +;4189: } +ADDRGP4 $1690 +JUMPV +LABELV $1689 +line 4190 +;4190: else if (ps->fd.forceRageRecoveryTime > svTime) +ADDRFP4 0 +INDIRP4 +CNSTI4 1172 +ADDP4 +INDIRI4 +ADDRFP4 8 +INDIRI4 +LEI4 $1691 +line 4191 +;4191: { +line 4192 +;4192: ps->speed *= 0.75; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTF4 1061158912 +ADDRLP4 36 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4193 +;4193: } +LABELV $1691 +LABELV $1690 +line 4195 +;4194: +;4195: if (ps->fd.forceGripCripple) +ADDRFP4 0 +INDIRP4 +CNSTI4 1120 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1693 +line 4196 +;4196: { +line 4197 +;4197: if (ps->fd.forcePowersActive & (1 << FP_RAGE)) +ADDRFP4 0 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $1695 +line 4198 +;4198: { +line 4199 +;4199: ps->speed *= 0.9; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTF4 1063675494 +ADDRLP4 36 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4200 +;4200: } +ADDRGP4 $1696 +JUMPV +LABELV $1695 +line 4201 +;4201: else if (ps->fd.forcePowersActive & (1 << FP_SPEED)) +ADDRFP4 0 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $1697 +line 4202 +;4202: { //force speed will help us escape +line 4203 +;4203: ps->speed *= 0.8; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTF4 1061997773 +ADDRLP4 36 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4204 +;4204: } +ADDRGP4 $1698 +JUMPV +LABELV $1697 +line 4206 +;4205: else +;4206: { +line 4207 +;4207: ps->speed *= 0.2; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTF4 1045220557 +ADDRLP4 36 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4208 +;4208: } +LABELV $1698 +LABELV $1696 +line 4209 +;4209: } +LABELV $1693 +line 4211 +;4210: +;4211: if ( BG_SaberInAttack( ps->saberMove ) && cmd->forwardmove < 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 BG_SaberInAttack +CALLI4 +ASGNI4 +ADDRLP4 40 +CNSTI4 0 +ASGNI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 40 +INDIRI4 +EQI4 $1699 +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 40 +INDIRI4 +GEI4 $1699 +line 4212 +;4212: {//if running backwards while attacking, don't run as fast. +line 4213 +;4213: switch( ps->fd.saberAnimLevel ) +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 1 +EQI4 $1704 +ADDRLP4 44 +INDIRI4 +CNSTI4 2 +EQI4 $1705 +ADDRLP4 44 +INDIRI4 +CNSTI4 3 +EQI4 $1706 +ADDRGP4 $1700 +JUMPV +line 4214 +;4214: { +LABELV $1704 +line 4216 +;4215: case FORCE_LEVEL_1: +;4216: ps->speed *= 0.75f; +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTF4 1061158912 +ADDRLP4 52 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4217 +;4217: break; +ADDRGP4 $1700 +JUMPV +LABELV $1705 +line 4219 +;4218: case FORCE_LEVEL_2: +;4219: ps->speed *= 0.60f; +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTF4 1058642330 +ADDRLP4 56 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4220 +;4220: break; +ADDRGP4 $1700 +JUMPV +LABELV $1706 +line 4222 +;4221: case FORCE_LEVEL_3: +;4222: ps->speed *= 0.45f; +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTF4 1055286886 +ADDRLP4 60 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4223 +;4223: break; +line 4225 +;4224: default: +;4225: break; +line 4227 +;4226: } +;4227: } +ADDRGP4 $1700 +JUMPV +LABELV $1699 +line 4228 +;4228: else if ( BG_SpinningSaberAnim( ps->legsAnim ) ) +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 44 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +EQI4 $1707 +line 4229 +;4229: { +line 4230 +;4230: if (ps->fd.saberAnimLevel == FORCE_LEVEL_3) +ADDRFP4 0 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1709 +line 4231 +;4231: { +line 4232 +;4232: ps->speed *= 0.3f; +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +CNSTF4 1050253722 +ADDRLP4 48 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4233 +;4233: } +ADDRGP4 $1708 +JUMPV +LABELV $1709 +line 4235 +;4234: else +;4235: { +line 4236 +;4236: ps->speed *= 0.5f; +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +CNSTF4 1056964608 +ADDRLP4 48 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4237 +;4237: } +line 4238 +;4238: } +ADDRGP4 $1708 +JUMPV +LABELV $1707 +line 4239 +;4239: else if ( ps->weapon == WP_SABER && BG_SaberInAttack( ps->saberMove ) ) +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1711 +ADDRLP4 48 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 52 +ADDRGP4 BG_SaberInAttack +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +EQI4 $1711 +line 4240 +;4240: {//if attacking with saber while running, drop your speed +line 4241 +;4241: switch( ps->fd.saberAnimLevel ) +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 2 +EQI4 $1716 +ADDRLP4 56 +INDIRI4 +CNSTI4 3 +EQI4 $1717 +ADDRGP4 $1712 +JUMPV +line 4242 +;4242: { +LABELV $1716 +line 4244 +;4243: case FORCE_LEVEL_2: +;4244: ps->speed *= 0.85f; +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTF4 1062836634 +ADDRLP4 64 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4245 +;4245: break; +ADDRGP4 $1712 +JUMPV +LABELV $1717 +line 4247 +;4246: case FORCE_LEVEL_3: +;4247: ps->speed *= 0.55f; +ADDRLP4 68 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +CNSTF4 1057803469 +ADDRLP4 68 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4248 +;4248: break; +line 4250 +;4249: default: +;4250: break; +line 4252 +;4251: } +;4252: } +ADDRGP4 $1712 +JUMPV +LABELV $1711 +line 4253 +;4253: else if (ps->weapon == WP_SABER && ps->fd.saberAnimLevel == FORCE_LEVEL_3 && +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1718 +ADDRLP4 56 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1718 +ADDRLP4 56 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +ADDRGP4 PM_SaberInTransition +CALLI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 0 +EQI4 $1718 +line 4255 +;4254: PM_SaberInTransition(ps->saberMove)) +;4255: { //Now, we want to even slow down in transitions for level 3 (since it has chains and stuff now) +line 4256 +;4256: if (cmd->forwardmove < 0) +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $1720 +line 4257 +;4257: { +line 4258 +;4258: ps->speed *= 0.4f; +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTF4 1053609165 +ADDRLP4 64 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4259 +;4259: } +ADDRGP4 $1721 +JUMPV +LABELV $1720 +line 4261 +;4260: else +;4261: { +line 4262 +;4262: ps->speed *= 0.6f; +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTF4 1058642330 +ADDRLP4 64 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4263 +;4263: } +LABELV $1721 +line 4264 +;4264: } +LABELV $1718 +LABELV $1712 +LABELV $1708 +LABELV $1700 +line 4267 +;4265: +;4266: +;4267: if ( BG_InRoll( ps, ps->legsAnim ) && ps->speed > 200 ) +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 68 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +EQI4 $1722 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CNSTI4 200 +LEI4 $1722 +line 4268 +;4268: { //can't roll unless you're able to move normally +line 4269 +;4269: BG_CmdForRoll( ps->legsAnim, cmd ); +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 BG_CmdForRoll +CALLV +pop +line 4270 +;4270: if ((ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_ROLL_B) +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 886 +NEI4 $1724 +line 4271 +;4271: { //backwards roll is pretty fast, should also be slower +line 4272 +;4272: ps->speed = ps->legsTimer/2.5; +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CVIF4 4 +CNSTF4 1075838976 +DIVF4 +CVFI4 4 +ASGNI4 +line 4273 +;4273: } +ADDRGP4 $1725 +JUMPV +LABELV $1724 +line 4275 +;4274: else +;4275: { +line 4276 +;4276: ps->speed = ps->legsTimer/1.5;//450; +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CVIF4 4 +CNSTF4 1069547520 +DIVF4 +CVFI4 4 +ASGNI4 +line 4277 +;4277: } +LABELV $1725 +line 4278 +;4278: if (ps->speed > 600) +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CNSTI4 600 +LEI4 $1726 +line 4279 +;4279: { +line 4280 +;4280: ps->speed = 600; +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTI4 600 +ASGNI4 +line 4281 +;4281: } +LABELV $1726 +line 4283 +;4282: //Automatically slow down as the roll ends. +;4283: } +LABELV $1722 +line 4284 +;4284:} +LABELV $1650 +endproc BG_AdjustClientSpeed 76 8 +export PmoveSingle +proc PmoveSingle 120 16 +line 4294 +;4285: +;4286:/* +;4287:================ +;4288:PmoveSingle +;4289: +;4290:================ +;4291:*/ +;4292:void trap_SnapVector( float *v ); +;4293: +;4294:void PmoveSingle (pmove_t *pmove) { +line 4295 +;4295: pm = pmove; +ADDRGP4 pm +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 4297 +;4296: +;4297: gPMDoSlowFall = PM_DoSlowFall(); +ADDRLP4 0 +ADDRGP4 PM_DoSlowFall +CALLI4 +ASGNI4 +ADDRGP4 gPMDoSlowFall +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 4301 +;4298: +;4299: // this counter lets us debug movement problems with a journal +;4300: // by setting a conditional breakpoint fot the previous frame +;4301: c_pmove++; +ADDRLP4 4 +ADDRGP4 c_pmove +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4304 +;4302: +;4303: // clear results +;4304: pm->numtouch = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 52 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4305 +;4305: pm->watertype = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 212 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4306 +;4306: pm->waterlevel = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4308 +;4307: +;4308: if (pm->ps->pm_type == PM_FLOAT) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1729 +line 4309 +;4309: { //You get no control over where you go in grip movement +line 4310 +;4310: pm->cmd.forwardmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4311 +;4311: pm->cmd.rightmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4312 +;4312: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4313 +;4313: } +LABELV $1729 +line 4315 +;4314: +;4315: if (pm->ps->eFlags & EF_DISINTEGRATION) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +CNSTI4 33554432 +BANDI4 +CNSTI4 0 +EQI4 $1731 +line 4316 +;4316: { +line 4317 +;4317: pm->cmd.forwardmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4318 +;4318: pm->cmd.rightmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4319 +;4319: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4320 +;4320: } +LABELV $1731 +line 4322 +;4321: +;4322: if ( pm->ps->saberMove == LS_A_LUNGE ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $1733 +line 4323 +;4323: {//can't move during lunge +line 4324 +;4324: pm->cmd.rightmove = pm->cmd.upmove = 0; +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTI1 0 +ASGNI1 +ADDRLP4 8 +INDIRP4 +CNSTI4 30 +ADDP4 +ADDRLP4 12 +INDIRI1 +ASGNI1 +ADDRLP4 8 +INDIRP4 +CNSTI4 29 +ADDP4 +ADDRLP4 12 +INDIRI1 +ASGNI1 +line 4325 +;4325: if ( pm->ps->legsTimer > 500 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 500 +LEI4 $1735 +line 4326 +;4326: { +line 4327 +;4327: pm->cmd.forwardmove = 127; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 127 +ASGNI1 +line 4328 +;4328: } +ADDRGP4 $1736 +JUMPV +LABELV $1735 +line 4330 +;4329: else +;4330: { +line 4331 +;4331: pm->cmd.forwardmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4332 +;4332: } +LABELV $1736 +line 4333 +;4333: } +LABELV $1733 +line 4335 +;4334: +;4335: if ( pm->ps->saberMove == LS_A_JUMP_T__B_ ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +CNSTI4 15 +NEI4 $1737 +line 4336 +;4336: {//can't move during leap +line 4337 +;4337: if ( pm->ps->groundEntityNum != ENTITYNUM_NONE ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +EQI4 $1739 +line 4338 +;4338: {//hit the ground +line 4339 +;4339: pm->cmd.forwardmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4340 +;4340: } +LABELV $1739 +line 4341 +;4341: pm->cmd.rightmove = pm->cmd.upmove = 0; +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTI1 0 +ASGNI1 +ADDRLP4 8 +INDIRP4 +CNSTI4 30 +ADDP4 +ADDRLP4 12 +INDIRI1 +ASGNI1 +ADDRLP4 8 +INDIRP4 +CNSTI4 29 +ADDP4 +ADDRLP4 12 +INDIRI1 +ASGNI1 +line 4342 +;4342: } +LABELV $1737 +line 4344 +;4343: +;4344: if ( pm->ps->saberMove == LS_A_BACK || pm->ps->saberMove == LS_A_BACK_CR +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 12 +EQI4 $1747 +ADDRLP4 8 +INDIRI4 +CNSTI4 13 +EQI4 $1747 +ADDRLP4 8 +INDIRI4 +CNSTI4 11 +EQI4 $1747 +ADDRLP4 8 +INDIRI4 +CNSTI4 16 +EQI4 $1747 +ADDRLP4 8 +INDIRI4 +CNSTI4 17 +EQI4 $1747 +ADDRLP4 8 +INDIRI4 +CNSTI4 15 +NEI4 $1741 +LABELV $1747 +line 4347 +;4345: || pm->ps->saberMove == LS_A_BACKSTAB || pm->ps->saberMove == LS_A_FLIP_STAB || +;4346: pm->ps->saberMove == LS_A_FLIP_SLASH || pm->ps->saberMove == LS_A_JUMP_T__B_ ) +;4347: { +line 4348 +;4348: pm->cmd.forwardmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4349 +;4349: pm->cmd.rightmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4350 +;4350: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4351 +;4351: } +LABELV $1741 +line 4353 +;4352: +;4353: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_A2_STABBACK1) || +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 564 +EQI4 $1754 +ADDRLP4 12 +INDIRI4 +CNSTI4 565 +EQI4 $1754 +ADDRLP4 12 +INDIRI4 +CNSTI4 570 +EQI4 $1754 +ADDRLP4 12 +INDIRI4 +CNSTI4 568 +EQI4 $1754 +ADDRLP4 12 +INDIRI4 +CNSTI4 567 +EQI4 $1754 +ADDRLP4 12 +INDIRI4 +CNSTI4 566 +NEI4 $1748 +LABELV $1754 +line 4359 +;4354: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_ATTACK_BACK) || +;4355: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_CROUCHATTACKBACK1) || +;4356: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_FORCELEAP2_T__B_) || +;4357: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_JUMPFLIPSTABDOWN) || +;4358: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_JUMPFLIPSLASHDOWN1)) +;4359: { +line 4360 +;4360: pm->cmd.forwardmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4361 +;4361: pm->cmd.rightmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4362 +;4362: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4363 +;4363: } +LABELV $1748 +line 4365 +;4364: +;4365: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_KISSER1LOOP || +ADDRLP4 16 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 745 +EQI4 $1757 +ADDRLP4 16 +INDIRI4 +CNSTI4 752 +NEI4 $1755 +LABELV $1757 +line 4367 +;4366: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_KISSEE1LOOP) +;4367: { +line 4368 +;4368: pm->cmd.forwardmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4369 +;4369: pm->cmd.rightmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4370 +;4370: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4371 +;4371: } +LABELV $1755 +line 4373 +;4372: +;4373: if (pm->ps->emplacedIndex) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 596 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1758 +line 4374 +;4374: { +line 4375 +;4375: if (pm->cmd.forwardmove < 0) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $1760 +line 4376 +;4376: { +line 4377 +;4377: pm->ps->emplacedIndex = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 596 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4378 +;4378: } +ADDRGP4 $1761 +JUMPV +LABELV $1760 +line 4380 +;4379: else +;4380: { +line 4381 +;4381: pm->cmd.forwardmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4382 +;4382: pm->cmd.rightmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4383 +;4383: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4384 +;4384: } +LABELV $1761 +line 4385 +;4385: } +LABELV $1758 +line 4387 +;4386: +;4387: if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->weaponstate == WEAPON_CHARGING_ALT) +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 24 +CNSTI4 5 +ASGNI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $1762 +ADDRLP4 20 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $1762 +line 4388 +;4388: { //not allowed to move while charging the disruptor +line 4389 +;4389: pm->cmd.forwardmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4390 +;4390: pm->cmd.rightmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4391 +;4391: if (pm->cmd.upmove > 0) +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $1764 +line 4392 +;4392: { +line 4393 +;4393: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4394 +;4394: } +LABELV $1764 +line 4395 +;4395: } +LABELV $1762 +line 4397 +;4396: +;4397: BG_AdjustClientSpeed(pm->ps, &pm->cmd, pm->cmd.serverTime); +ADDRLP4 28 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRLP4 28 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRLP4 32 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 BG_AdjustClientSpeed +CALLV +pop +line 4399 +;4398: +;4399: if ( pm->ps->stats[STAT_HEALTH] <= 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $1766 +line 4400 +;4400: pm->tracemask &= ~CONTENTS_BODY; // corpses can fly through bodies +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRI4 +CNSTI4 -257 +BANDI4 +ASGNI4 +line 4401 +;4401: } +LABELV $1766 +line 4405 +;4402: +;4403: // make sure walking button is clear if they are running, to avoid +;4404: // proxy no-footsteps cheats +;4405: if ( abs( pm->cmd.forwardmove ) > 64 || abs( pm->cmd.rightmove ) > 64 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ARGI4 +ADDRLP4 36 +ADDRGP4 abs +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 64 +GTI4 $1770 +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ARGI4 +ADDRLP4 40 +ADDRGP4 abs +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 64 +LEI4 $1768 +LABELV $1770 +line 4406 +;4406: pm->cmd.buttons &= ~BUTTON_WALKING; +ADDRLP4 44 +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRI4 +CNSTI4 -17 +BANDI4 +ASGNI4 +line 4407 +;4407: } +LABELV $1768 +line 4410 +;4408: +;4409: // set the talk balloon flag +;4410: if ( pm->cmd.buttons & BUTTON_TALK ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1771 +line 4411 +;4411: pm->ps->eFlags |= EF_TALK; +ADDRLP4 44 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRI4 +CNSTI4 4096 +BORI4 +ASGNI4 +line 4412 +;4412: } else { +ADDRGP4 $1772 +JUMPV +LABELV $1771 +line 4413 +;4413: pm->ps->eFlags &= ~EF_TALK; +ADDRLP4 44 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 108 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRI4 +CNSTI4 -4097 +BANDI4 +ASGNI4 +line 4414 +;4414: } +LABELV $1772 +line 4418 +;4415: +;4416: // In certain situations, we may want to control which attack buttons are pressed and what kind of functionality +;4417: // is attached to them +;4418: PM_AdjustAttackStates( pm ); +ADDRGP4 pm +INDIRP4 +ARGP4 +ADDRGP4 PM_AdjustAttackStates +CALLV +pop +line 4421 +;4419: +;4420: // clear the respawned flag if attack and use are cleared +;4421: if ( pm->ps->stats[STAT_HEALTH] > 0 && +ADDRLP4 44 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 48 +CNSTI4 0 +ASGNI4 +ADDRLP4 44 +INDIRP4 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +LEI4 $1773 +ADDRLP4 44 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 5 +BANDI4 +ADDRLP4 48 +INDIRI4 +NEI4 $1773 +line 4422 +;4422: !( pm->cmd.buttons & (BUTTON_ATTACK | BUTTON_USE_HOLDABLE) ) ) { +line 4423 +;4423: pm->ps->pm_flags &= ~PMF_RESPAWNED; +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRI4 +CNSTI4 -513 +BANDI4 +ASGNI4 +line 4424 +;4424: } +LABELV $1773 +line 4429 +;4425: +;4426: // if talk button is down, dissallow all other input +;4427: // this is to prevent any possible intercept proxy from +;4428: // adding fake talk balloons +;4429: if ( pmove->cmd.buttons & BUTTON_TALK ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1775 +line 4432 +;4430: // keep the talk button set tho for when the cmd.serverTime > 66 msec +;4431: // and the same cmd is used multiple times in Pmove +;4432: pmove->cmd.buttons = BUTTON_TALK; +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +CNSTI4 2 +ASGNI4 +line 4433 +;4433: pmove->cmd.forwardmove = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4434 +;4434: pmove->cmd.rightmove = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4435 +;4435: pmove->cmd.upmove = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4436 +;4436: } +LABELV $1775 +line 4439 +;4437: +;4438: // clear all pmove local vars +;4439: memset (&pml, 0, sizeof(pml)); +ADDRGP4 pml +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 1164 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 4442 +;4440: +;4441: // determine the time +;4442: pml.msec = pmove->cmd.serverTime - pm->ps->commandTime; +ADDRGP4 pml+40 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +INDIRI4 +SUBI4 +ASGNI4 +line 4443 +;4443: if ( pml.msec < 1 ) { +ADDRGP4 pml+40 +INDIRI4 +CNSTI4 1 +GEI4 $1778 +line 4444 +;4444: pml.msec = 1; +ADDRGP4 pml+40 +CNSTI4 1 +ASGNI4 +line 4445 +;4445: } else if ( pml.msec > 200 ) { +ADDRGP4 $1779 +JUMPV +LABELV $1778 +ADDRGP4 pml+40 +INDIRI4 +CNSTI4 200 +LEI4 $1782 +line 4446 +;4446: pml.msec = 200; +ADDRGP4 pml+40 +CNSTI4 200 +ASGNI4 +line 4447 +;4447: } +LABELV $1782 +LABELV $1779 +line 4448 +;4448: pm->ps->commandTime = pmove->cmd.serverTime; +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 4451 +;4449: +;4450: // save old org in case we get stuck +;4451: VectorCopy (pm->ps->origin, pml.previous_origin); +ADDRGP4 pml+1136 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 4454 +;4452: +;4453: // save old velocity for crashlanding +;4454: VectorCopy (pm->ps->velocity, pml.previous_velocity); +ADDRGP4 pml+1148 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRB +ASGNB 12 +line 4456 +;4455: +;4456: pml.frametime = pml.msec * 0.001; +ADDRGP4 pml+36 +CNSTF4 981668463 +ADDRGP4 pml+40 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +line 4458 +;4457: +;4458: PM_AdjustAngleForWallRun(pm->ps, &pm->cmd, qtrue); +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 PM_AdjustAngleForWallRun +CALLI4 +pop +line 4460 +;4459: +;4460: if (pm->ps->saberMove == LS_A_JUMP_T__B_ || pm->ps->saberMove == LS_A_LUNGE || +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 15 +EQI4 $1795 +ADDRLP4 56 +INDIRI4 +CNSTI4 14 +EQI4 $1795 +ADDRLP4 56 +INDIRI4 +CNSTI4 13 +EQI4 $1795 +ADDRLP4 56 +INDIRI4 +CNSTI4 12 +EQI4 $1795 +ADDRLP4 56 +INDIRI4 +CNSTI4 11 +NEI4 $1790 +LABELV $1795 +line 4463 +;4461: pm->ps->saberMove == LS_A_BACK_CR || pm->ps->saberMove == LS_A_BACK || +;4462: pm->ps->saberMove == LS_A_BACKSTAB) +;4463: { +line 4464 +;4464: PM_SetPMViewAngle(pm->ps, pm->ps->viewangles, &pm->cmd); +ADDRLP4 60 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 64 +ADDRLP4 60 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 156 +ADDP4 +ARGP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRGP4 PM_SetPMViewAngle +CALLV +pop +line 4465 +;4465: } +LABELV $1790 +line 4467 +;4466: +;4467: if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_KISSER1LOOP || +ADDRLP4 60 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 745 +EQI4 $1798 +ADDRLP4 60 +INDIRI4 +CNSTI4 752 +NEI4 $1796 +LABELV $1798 +line 4469 +;4468: (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_KISSEE1LOOP) +;4469: { +line 4470 +;4470: pm->ps->viewangles[PITCH] = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 156 +ADDP4 +CNSTF4 0 +ASGNF4 +line 4471 +;4471: PM_SetPMViewAngle(pm->ps, pm->ps->viewangles, &pm->cmd); +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 68 +ADDRLP4 64 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +ARGP4 +ADDRLP4 68 +INDIRP4 +CNSTI4 156 +ADDP4 +ARGP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRGP4 PM_SetPMViewAngle +CALLV +pop +line 4472 +;4472: } +LABELV $1796 +line 4475 +;4473: +;4474: // update the viewangles +;4475: PM_UpdateViewAngles( pm->ps, &pm->cmd ); +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRGP4 PM_UpdateViewAngles +CALLV +pop +line 4477 +;4476: +;4477: AngleVectors (pm->ps->viewangles, pml.forward, pml.right, pml.up); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 156 +ADDP4 +ARGP4 +ADDRGP4 pml +ARGP4 +ADDRGP4 pml+12 +ARGP4 +ADDRGP4 pml+24 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 4479 +;4478: +;4479: if ( pm->cmd.upmove < 10 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 10 +GEI4 $1801 +line 4481 +;4480: // not holding jump +;4481: pm->ps->pm_flags &= ~PMF_JUMP_HELD; +ADDRLP4 68 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +ADDRLP4 68 +INDIRP4 +INDIRI4 +CNSTI4 -3 +BANDI4 +ASGNI4 +line 4482 +;4482: } +LABELV $1801 +line 4485 +;4483: +;4484: // decide if backpedaling animations should be used +;4485: if ( pm->cmd.forwardmove < 0 ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $1803 +line 4486 +;4486: pm->ps->pm_flags |= PMF_BACKWARDS_RUN; +ADDRLP4 68 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +ADDRLP4 68 +INDIRP4 +INDIRI4 +CNSTI4 16 +BORI4 +ASGNI4 +line 4487 +;4487: } else if ( pm->cmd.forwardmove > 0 || ( pm->cmd.forwardmove == 0 && pm->cmd.rightmove ) ) { +ADDRGP4 $1804 +JUMPV +LABELV $1803 +ADDRLP4 68 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 72 +ADDRLP4 68 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 76 +CNSTI4 0 +ASGNI4 +ADDRLP4 72 +INDIRI4 +ADDRLP4 76 +INDIRI4 +GTI4 $1807 +ADDRLP4 72 +INDIRI4 +ADDRLP4 76 +INDIRI4 +NEI4 $1805 +ADDRLP4 68 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 76 +INDIRI4 +EQI4 $1805 +LABELV $1807 +line 4488 +;4488: pm->ps->pm_flags &= ~PMF_BACKWARDS_RUN; +ADDRLP4 80 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +ADDRLP4 80 +INDIRP4 +INDIRI4 +CNSTI4 -17 +BANDI4 +ASGNI4 +line 4489 +;4489: } +LABELV $1805 +LABELV $1804 +line 4491 +;4490: +;4491: if ( pm->ps->pm_type >= PM_DEAD ) { +ADDRLP4 80 +CNSTI4 4 +ASGNI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 80 +INDIRI4 +LTI4 $1808 +line 4492 +;4492: pm->cmd.forwardmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4493 +;4493: pm->cmd.rightmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4494 +;4494: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4495 +;4495: } +LABELV $1808 +line 4497 +;4496: +;4497: if (pm->ps->saberLockTime >= pm->cmd.serverTime) +ADDRLP4 84 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +INDIRP4 +CNSTI4 524 +ADDP4 +INDIRI4 +ADDRLP4 84 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LTI4 $1810 +line 4498 +;4498: { +line 4499 +;4499: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4500 +;4500: pm->cmd.forwardmove = 50; +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 50 +ASGNI1 +line 4501 +;4501: pm->cmd.rightmove = 0;//*= 0.1; +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4502 +;4502: } +LABELV $1810 +line 4504 +;4503: +;4504: if ( pm->ps->pm_type == PM_SPECTATOR ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1812 +line 4505 +;4505: PM_CheckDuck (); +ADDRGP4 PM_CheckDuck +CALLV +pop +line 4506 +;4506: PM_FlyMove (); +ADDRGP4 PM_FlyMove +CALLV +pop +line 4507 +;4507: PM_DropTimers (); +ADDRGP4 PM_DropTimers +CALLV +pop +line 4508 +;4508: return; +ADDRGP4 $1728 +JUMPV +LABELV $1812 +line 4511 +;4509: } +;4510: +;4511: if ( pm->ps->pm_type == PM_NOCLIP ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1814 +line 4512 +;4512: PM_NoclipMove (); +ADDRGP4 PM_NoclipMove +CALLV +pop +line 4513 +;4513: PM_DropTimers (); +ADDRGP4 PM_DropTimers +CALLV +pop +line 4514 +;4514: return; +ADDRGP4 $1728 +JUMPV +LABELV $1814 +line 4517 +;4515: } +;4516: +;4517: if (pm->ps->pm_type == PM_FREEZE) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1816 +line 4518 +;4518: return; // no movement at all +ADDRGP4 $1728 +JUMPV +LABELV $1816 +line 4521 +;4519: } +;4520: +;4521: if ( pm->ps->pm_type == PM_INTERMISSION || pm->ps->pm_type == PM_SPINTERMISSION) { +ADDRLP4 88 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 88 +INDIRI4 +CNSTI4 6 +EQI4 $1820 +ADDRLP4 88 +INDIRI4 +CNSTI4 7 +NEI4 $1818 +LABELV $1820 +line 4522 +;4522: return; // no movement at all +ADDRGP4 $1728 +JUMPV +LABELV $1818 +line 4525 +;4523: } +;4524: +;4525: if (gPMDoSlowFall) +ADDRGP4 gPMDoSlowFall +INDIRI4 +CNSTI4 0 +EQI4 $1821 +line 4526 +;4526: { +line 4527 +;4527: pm->ps->gravity *= 0.5; +ADDRLP4 92 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 56 +ADDP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTF4 1056964608 +ADDRLP4 92 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 4528 +;4528: } +LABELV $1821 +line 4531 +;4529: +;4530: // set watertype, and waterlevel +;4531: PM_SetWaterLevel(); +ADDRGP4 PM_SetWaterLevel +CALLV +pop +line 4532 +;4532: pml.previous_waterlevel = pmove->waterlevel; +ADDRGP4 pml+1160 +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ASGNI4 +line 4535 +;4533: +;4534: // set mins, maxs, and viewheight +;4535: PM_CheckDuck (); +ADDRGP4 PM_CheckDuck +CALLV +pop +line 4538 +;4536: +;4537: // set groundentity +;4538: PM_GroundTrace(); +ADDRGP4 PM_GroundTrace +CALLV +pop +line 4540 +;4539: +;4540: if ( pm->ps->groundEntityNum != ENTITYNUM_NONE ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +EQI4 $1824 +line 4541 +;4541: {//on ground +line 4542 +;4542: pm->ps->fd.forceJumpZStart = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1092 +ADDP4 +CNSTF4 0 +ASGNF4 +line 4543 +;4543: } +LABELV $1824 +line 4545 +;4544: +;4545: if ( pm->ps->pm_type == PM_DEAD ) { +ADDRLP4 92 +CNSTI4 4 +ASGNI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 92 +INDIRI4 +NEI4 $1826 +line 4546 +;4546: PM_DeadMove (); +ADDRGP4 PM_DeadMove +CALLV +pop +line 4547 +;4547: } +LABELV $1826 +line 4549 +;4548: +;4549: PM_DropTimers(); +ADDRGP4 PM_DropTimers +CALLV +pop +line 4551 +;4550: +;4551: if (pm->ps->pm_type == PM_FLOAT) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1828 +line 4552 +;4552: { +line 4553 +;4553: PM_FlyMove (); +ADDRGP4 PM_FlyMove +CALLV +pop +line 4554 +;4554: } +ADDRGP4 $1829 +JUMPV +LABELV $1828 +line 4556 +;4555: else +;4556: { +line 4557 +;4557: if (pm->ps->pm_flags & PMF_TIME_WATERJUMP) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $1830 +line 4558 +;4558: PM_WaterJumpMove(); +ADDRGP4 PM_WaterJumpMove +CALLV +pop +line 4559 +;4559: } else if ( pm->waterlevel > 1 ) { +ADDRGP4 $1831 +JUMPV +LABELV $1830 +ADDRGP4 pm +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 1 +LEI4 $1832 +line 4561 +;4560: // swimming +;4561: PM_WaterMove(); +ADDRGP4 PM_WaterMove +CALLV +pop +line 4562 +;4562: } else if ( pml.walking ) { +ADDRGP4 $1833 +JUMPV +LABELV $1832 +ADDRGP4 pml+44 +INDIRI4 +CNSTI4 0 +EQI4 $1834 +line 4564 +;4563: // walking on ground +;4564: PM_WalkMove(); +ADDRGP4 PM_WalkMove +CALLV +pop +line 4565 +;4565: } else { +ADDRGP4 $1835 +JUMPV +LABELV $1834 +line 4567 +;4566: // airborne +;4567: PM_AirMove(); +ADDRGP4 PM_AirMove +CALLV +pop +line 4568 +;4568: } +LABELV $1835 +LABELV $1833 +LABELV $1831 +line 4569 +;4569: } +LABELV $1829 +line 4571 +;4570: +;4571: PM_Animate(); +ADDRGP4 PM_Animate +CALLV +pop +line 4574 +;4572: +;4573: // set groundentity, watertype, and waterlevel +;4574: PM_GroundTrace(); +ADDRGP4 PM_GroundTrace +CALLV +pop +line 4575 +;4575: PM_SetWaterLevel(); +ADDRGP4 PM_SetWaterLevel +CALLV +pop +line 4577 +;4576: +;4577: if (pm->cmd.forcesel != -1 && (pm->ps->fd.forcePowersKnown & (1 << pm->cmd.forcesel))) +ADDRLP4 96 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 100 +ADDRLP4 96 +INDIRP4 +CNSTI4 25 +ADDP4 +INDIRU1 +CVUI4 1 +ASGNI4 +ADDRLP4 100 +INDIRI4 +CNSTI4 -1 +EQI4 $1837 +ADDRLP4 96 +INDIRP4 +INDIRP4 +CNSTI4 844 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 100 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $1837 +line 4578 +;4578: { +line 4579 +;4579: pm->ps->fd.forcePowerSelected = pm->cmd.forcesel; +ADDRLP4 104 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 104 +INDIRP4 +INDIRP4 +CNSTI4 852 +ADDP4 +ADDRLP4 104 +INDIRP4 +CNSTI4 25 +ADDP4 +INDIRU1 +CVUI4 1 +ASGNI4 +line 4580 +;4580: } +LABELV $1837 +line 4581 +;4581: if (pm->cmd.invensel != -1 && (pm->ps->stats[STAT_HOLDABLE_ITEMS] & (1 << pm->cmd.invensel))) +ADDRLP4 104 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 108 +ADDRLP4 104 +INDIRP4 +CNSTI4 26 +ADDP4 +INDIRU1 +CVUI4 1 +ASGNI4 +ADDRLP4 108 +INDIRI4 +CNSTI4 -1 +EQI4 $1839 +ADDRLP4 104 +INDIRP4 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 108 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $1839 +line 4582 +;4582: { +line 4583 +;4583: pm->ps->stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(pm->cmd.invensel, IT_HOLDABLE); +ADDRLP4 112 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 112 +INDIRP4 +CNSTI4 26 +ADDP4 +INDIRU1 +CVUI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 116 +ADDRGP4 BG_GetItemIndexByTag +CALLI4 +ASGNI4 +ADDRLP4 112 +INDIRP4 +INDIRP4 +CNSTI4 220 +ADDP4 +ADDRLP4 116 +INDIRI4 +ASGNI4 +line 4584 +;4584: } +LABELV $1839 +line 4587 +;4585: +;4586: // weapons +;4587: PM_Weapon(); +ADDRGP4 PM_Weapon +CALLV +pop +line 4589 +;4588: +;4589: PM_Use(); +ADDRGP4 PM_Use +CALLV +pop +line 4592 +;4590: +;4591: // footstep events / legs animations +;4592: PM_Footsteps(); +ADDRGP4 PM_Footsteps +CALLV +pop +line 4595 +;4593: +;4594: // entering / leaving water splashes +;4595: PM_WaterEvents(); +ADDRGP4 PM_WaterEvents +CALLV +pop +line 4598 +;4596: +;4597: // snap some parts of playerstate to save network bandwidth +;4598: trap_SnapVector( pm->ps->velocity ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRGP4 trap_SnapVector +CALLV +pop +line 4600 +;4599: +;4600: if (gPMDoSlowFall) +ADDRGP4 gPMDoSlowFall +INDIRI4 +CNSTI4 0 +EQI4 $1841 +line 4601 +;4601: { +line 4602 +;4602: pm->ps->gravity *= 2; +ADDRLP4 112 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 56 +ADDP4 +ASGNP4 +ADDRLP4 112 +INDIRP4 +ADDRLP4 112 +INDIRP4 +INDIRI4 +CNSTI4 1 +LSHI4 +ASGNI4 +line 4603 +;4603: } +LABELV $1841 +line 4604 +;4604:} +LABELV $1728 +endproc PmoveSingle 120 16 +export Pmove +proc Pmove 16 4 +line 4614 +;4605: +;4606: +;4607:/* +;4608:================ +;4609:Pmove +;4610: +;4611:Can be called by either the server or the client +;4612:================ +;4613:*/ +;4614:void Pmove (pmove_t *pmove) { +line 4617 +;4615: int finalTime; +;4616: +;4617: finalTime = pmove->cmd.serverTime; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 4619 +;4618: +;4619: if ( finalTime < pmove->ps->commandTime ) { +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +INDIRP4 +INDIRI4 +GEI4 $1844 +line 4620 +;4620: return; // should not happen +ADDRGP4 $1843 +JUMPV +LABELV $1844 +line 4623 +;4621: } +;4622: +;4623: if ( finalTime > pmove->ps->commandTime + 1000 ) { +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +INDIRP4 +INDIRI4 +CNSTI4 1000 +ADDI4 +LEI4 $1846 +line 4624 +;4624: pmove->ps->commandTime = finalTime - 1000; +ADDRFP4 0 +INDIRP4 +INDIRP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1000 +SUBI4 +ASGNI4 +line 4625 +;4625: } +LABELV $1846 +line 4627 +;4626: +;4627: if (pmove->ps->fallingToDeath) +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 1352 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1848 +line 4628 +;4628: { +line 4629 +;4629: pmove->cmd.forwardmove = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4630 +;4630: pmove->cmd.rightmove = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 29 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4631 +;4631: pmove->cmd.upmove = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 4632 +;4632: pmove->cmd.buttons = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4633 +;4633: } +LABELV $1848 +line 4635 +;4634: +;4635: pmove->ps->pmove_framecount = (pmove->ps->pmove_framecount+1) & ((1<ps->commandTime != finalTime ) { +line 4642 +;4640: int msec; +;4641: +;4642: msec = finalTime - pmove->ps->commandTime; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +INDIRP4 +INDIRI4 +SUBI4 +ASGNI4 +line 4644 +;4643: +;4644: if ( pmove->pmove_fixed ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1853 +line 4645 +;4645: if ( msec > pmove->pmove_msec ) { +ADDRLP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +LEI4 $1854 +line 4646 +;4646: msec = pmove->pmove_msec; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +ASGNI4 +line 4647 +;4647: } +line 4648 +;4648: } +ADDRGP4 $1854 +JUMPV +LABELV $1853 +line 4649 +;4649: else { +line 4650 +;4650: if ( msec > 66 ) { +ADDRLP4 8 +INDIRI4 +CNSTI4 66 +LEI4 $1857 +line 4651 +;4651: msec = 66; +ADDRLP4 8 +CNSTI4 66 +ASGNI4 +line 4652 +;4652: } +LABELV $1857 +line 4653 +;4653: } +LABELV $1854 +line 4654 +;4654: pmove->cmd.serverTime = pmove->ps->commandTime + msec; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 12 +INDIRP4 +INDIRP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDI4 +ASGNI4 +line 4655 +;4655: PmoveSingle( pmove ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 PmoveSingle +CALLV +pop +line 4657 +;4656: +;4657: if ( pmove->ps->pm_flags & PMF_JUMP_HELD ) { +ADDRFP4 0 +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1859 +line 4658 +;4658: pmove->cmd.upmove = 20; +ADDRFP4 0 +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 20 +ASGNI1 +line 4659 +;4659: } +LABELV $1859 +line 4660 +;4660: } +LABELV $1851 +line 4639 +ADDRFP4 0 +INDIRP4 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +NEI4 $1850 +line 4661 +;4661:} +LABELV $1843 +endproc Pmove 16 4 +import trap_SnapVector +import PM_SaberInTransition +import PM_SetSaberMove +import PM_WeaponLightsaber +import PM_SetAnim +import PM_ForceLegsAnim +import PM_ContinueLegsAnim +import PM_StartTorsoAnim +import BG_CycleInven +import PM_StepSlideMove +import PM_SlideMove +import PM_SaberJumpAttackMove +import PM_SaberFlipOverAttackMove +import PM_SomeoneInFront +import PM_GroundDistance +import PM_AnimLength +import PM_InRollComplete +import PM_InOnGroundAnim +import PM_SpinningAnim +import PM_LandingAnim +import PM_JumpingAnim +import PM_PainAnim +import PM_InKnockDown +import PM_InSaberAnim +import PM_SaberInStart +import PM_SaberInReflect +import PM_SaberInKnockaway +import PM_SaberInParry +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +bss +export pml +align 4 +LABELV pml +skip 1164 +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +export pm +align 4 +LABELV pm +skip 4 +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $986 +char 1 37 +char 1 105 +char 1 58 +char 1 76 +char 1 97 +char 1 110 +char 1 100 +char 1 10 +char 1 0 +align 1 +LABELV $975 +char 1 37 +char 1 105 +char 1 58 +char 1 115 +char 1 116 +char 1 101 +char 1 101 +char 1 112 +char 1 10 +char 1 0 +align 1 +LABELV $964 +char 1 37 +char 1 105 +char 1 58 +char 1 107 +char 1 105 +char 1 99 +char 1 107 +char 1 111 +char 1 102 +char 1 102 +char 1 10 +char 1 0 +align 1 +LABELV $917 +char 1 37 +char 1 105 +char 1 58 +char 1 108 +char 1 105 +char 1 102 +char 1 116 +char 1 10 +char 1 0 +align 1 +LABELV $887 +char 1 37 +char 1 105 +char 1 58 +char 1 97 +char 1 108 +char 1 108 +char 1 115 +char 1 111 +char 1 108 +char 1 105 +char 1 100 +char 1 10 +char 1 0 diff --git a/code/cgame/vm/bg_saber.asm b/code/cgame/vm/bg_saber.asm new file mode 100644 index 0000000..4fba946 --- /dev/null +++ b/code/cgame/vm/bg_saber.asm @@ -0,0 +1,13117 @@ +export PM_irand_timesync +code +proc PM_irand_timesync 8 4 +file "../../game/bg_saber.c" +line 6 +;1:#include "q_shared.h" +;2:#include "bg_public.h" +;3:#include "bg_local.h" +;4: +;5:int PM_irand_timesync(int val1, int val2) +;6:{ +line 9 +;7: int i; +;8: +;9: i = (val1-1) + (Q_random( &pm->cmd.serverTime )*(val2 - val1)) + 1; +ADDRGP4 pm +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 Q_random +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +CVIF4 4 +ADDRLP4 4 +INDIRF4 +ADDRFP4 4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ADDF4 +CNSTF4 1065353216 +ADDF4 +CVFI4 4 +ASGNI4 +line 10 +;10: if (i < val1) +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRI4 +GEI4 $66 +line 11 +;11: { +line 12 +;12: i = val1; +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 13 +;13: } +LABELV $66 +line 14 +;14: if (i > val2) +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRI4 +LEI4 $68 +line 15 +;15: { +line 16 +;16: i = val2; +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 17 +;17: } +LABELV $68 +line 19 +;18: +;19: return i; +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $65 +endproc PM_irand_timesync 8 4 +export BG_ForcePowerDrain +proc BG_ForcePowerDrain 12 0 +line 23 +;20:} +;21: +;22:void BG_ForcePowerDrain( playerState_t *ps, forcePowers_t forcePower, int overrideAmt ) +;23:{ +line 25 +;24: //take away the power +;25: int drain = overrideAmt; +ADDRLP4 0 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 35 +;26: +;27: /* +;28: if (ps->powerups[PW_FORCE_BOON]) +;29: { +;30: return; +;31: } +;32: */ +;33: //No longer grant infinite force with boon. +;34: +;35: if ( !drain ) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $71 +line 36 +;36: { +line 37 +;37: drain = forcePowerNeeded[ps->fd.forcePowerLevel[forcePower]][forcePower]; +ADDRLP4 4 +ADDRFP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +CNSTI4 72 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 944 +ADDP4 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 forcePowerNeeded +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 38 +;38: } +LABELV $71 +line 39 +;39: if ( !drain ) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $73 +line 40 +;40: { +line 41 +;41: return; +ADDRGP4 $70 +JUMPV +LABELV $73 +line 44 +;42: } +;43: +;44: if (forcePower == FP_LEVITATION) +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +NEI4 $75 +line 45 +;45: { //special case +line 46 +;46: int jumpDrain = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 48 +;47: +;48: if (ps->velocity[2] > 250) +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1132068864 +LEF4 $77 +line 49 +;49: { +line 50 +;50: jumpDrain = 20; +ADDRLP4 4 +CNSTI4 20 +ASGNI4 +line 51 +;51: } +ADDRGP4 $78 +JUMPV +LABELV $77 +line 52 +;52: else if (ps->velocity[2] > 200) +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1128792064 +LEF4 $79 +line 53 +;53: { +line 54 +;54: jumpDrain = 16; +ADDRLP4 4 +CNSTI4 16 +ASGNI4 +line 55 +;55: } +ADDRGP4 $80 +JUMPV +LABELV $79 +line 56 +;56: else if (ps->velocity[2] > 150) +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1125515264 +LEF4 $81 +line 57 +;57: { +line 58 +;58: jumpDrain = 12; +ADDRLP4 4 +CNSTI4 12 +ASGNI4 +line 59 +;59: } +ADDRGP4 $82 +JUMPV +LABELV $81 +line 60 +;60: else if (ps->velocity[2] > 100) +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1120403456 +LEF4 $83 +line 61 +;61: { +line 62 +;62: jumpDrain = 8; +ADDRLP4 4 +CNSTI4 8 +ASGNI4 +line 63 +;63: } +ADDRGP4 $84 +JUMPV +LABELV $83 +line 64 +;64: else if (ps->velocity[2] > 50) +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1112014848 +LEF4 $85 +line 65 +;65: { +line 66 +;66: jumpDrain = 6; +ADDRLP4 4 +CNSTI4 6 +ASGNI4 +line 67 +;67: } +ADDRGP4 $86 +JUMPV +LABELV $85 +line 68 +;68: else if (ps->velocity[2] > 0) +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 0 +LEF4 $87 +line 69 +;69: { +line 70 +;70: jumpDrain = 4; +ADDRLP4 4 +CNSTI4 4 +ASGNI4 +line 71 +;71: } +LABELV $87 +LABELV $86 +LABELV $84 +LABELV $82 +LABELV $80 +LABELV $78 +line 73 +;72: +;73: if (jumpDrain) +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $89 +line 74 +;74: { +line 75 +;75: jumpDrain /= ps->fd.forcePowerLevel[FP_LEVITATION]; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRI4 +DIVI4 +ASGNI4 +line 76 +;76: } +LABELV $89 +line 78 +;77: +;78: ps->fd.forcePower -= jumpDrain; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 932 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ASGNI4 +line 79 +;79: if ( ps->fd.forcePower < 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRI4 +CNSTI4 0 +GEI4 $70 +line 80 +;80: { +line 81 +;81: ps->fd.forcePower = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 932 +ADDP4 +CNSTI4 0 +ASGNI4 +line 82 +;82: } +line 84 +;83: +;84: return; +ADDRGP4 $70 +JUMPV +LABELV $75 +line 87 +;85: } +;86: +;87: ps->fd.forcePower -= drain; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 932 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +SUBI4 +ASGNI4 +line 88 +;88: if ( ps->fd.forcePower < 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRI4 +CNSTI4 0 +GEI4 $93 +line 89 +;89: { +line 90 +;90: ps->fd.forcePower = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 932 +ADDP4 +CNSTI4 0 +ASGNI4 +line 91 +;91: } +LABELV $93 +line 92 +;92:} +LABELV $70 +endproc BG_ForcePowerDrain 12 0 +data +export saberMoveData +align 4 +LABELV saberMoveData +address $95 +byte 4 571 +byte 4 1 +byte 4 1 +byte 4 0 +byte 4 350 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +address $96 +byte 4 573 +byte 4 1 +byte 4 1 +byte 4 0 +byte 4 350 +byte 4 2 +byte 4 1 +byte 4 22 +byte 4 0 +address $97 +byte 4 587 +byte 4 1 +byte 4 1 +byte 4 2 +byte 4 350 +byte 4 0 +byte 4 1 +byte 4 22 +byte 4 0 +address $98 +byte 4 588 +byte 4 1 +byte 4 1 +byte 4 2 +byte 4 350 +byte 4 0 +byte 4 1 +byte 4 22 +byte 4 0 +address $99 +byte 4 141 +byte 4 4 +byte 4 0 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 25 +byte 4 25 +byte 4 200 +address $100 +byte 4 139 +byte 4 5 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 26 +byte 4 26 +byte 4 200 +address $101 +byte 4 143 +byte 4 6 +byte 4 2 +byte 4 10 +byte 4 50 +byte 4 1 +byte 4 27 +byte 4 27 +byte 4 200 +address $102 +byte 4 142 +byte 4 0 +byte 4 4 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 28 +byte 4 28 +byte 4 200 +address $103 +byte 4 140 +byte 4 1 +byte 4 5 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 29 +byte 4 29 +byte 4 200 +address $104 +byte 4 144 +byte 4 2 +byte 4 6 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 30 +byte 4 30 +byte 4 200 +address $105 +byte 4 138 +byte 4 3 +byte 4 7 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 31 +byte 4 31 +byte 4 200 +address $106 +byte 4 564 +byte 4 1 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $107 +byte 4 565 +byte 4 1 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $108 +byte 4 570 +byte 4 1 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $109 +byte 4 569 +byte 4 7 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $110 +byte 4 568 +byte 4 3 +byte 4 7 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $111 +byte 4 567 +byte 4 1 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 51 +byte 4 200 +address $112 +byte 4 566 +byte 4 5 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 40 +byte 4 200 +address $113 +byte 4 190 +byte 4 1 +byte 4 4 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 4 +byte 4 4 +byte 4 200 +address $114 +byte 4 188 +byte 4 1 +byte 4 5 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 5 +byte 4 5 +byte 4 200 +address $115 +byte 4 192 +byte 4 1 +byte 4 6 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 6 +byte 4 6 +byte 4 200 +address $116 +byte 4 191 +byte 4 1 +byte 4 0 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 7 +byte 4 7 +byte 4 200 +address $117 +byte 4 189 +byte 4 1 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 8 +byte 4 8 +byte 4 200 +address $118 +byte 4 193 +byte 4 1 +byte 4 2 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 9 +byte 4 9 +byte 4 200 +address $119 +byte 4 187 +byte 4 1 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 1 +byte 4 10 +byte 4 10 +byte 4 200 +address $120 +byte 4 198 +byte 4 0 +byte 4 1 +byte 4 2 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $121 +byte 4 196 +byte 4 1 +byte 4 1 +byte 4 2 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $122 +byte 4 200 +byte 4 2 +byte 4 1 +byte 4 2 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $123 +byte 4 197 +byte 4 4 +byte 4 1 +byte 4 2 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $124 +byte 4 195 +byte 4 5 +byte 4 1 +byte 4 2 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $125 +byte 4 199 +byte 4 6 +byte 4 1 +byte 4 2 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $126 +byte 4 194 +byte 4 7 +byte 4 1 +byte 4 2 +byte 4 100 +byte 4 1 +byte 4 1 +byte 4 1 +byte 4 200 +address $127 +byte 4 145 +byte 4 0 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 26 +byte 4 8 +byte 4 150 +address $128 +byte 4 172 +byte 4 0 +byte 4 2 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 9 +byte 4 150 +address $129 +byte 4 173 +byte 4 0 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 10 +byte 4 150 +address $130 +byte 4 146 +byte 4 0 +byte 4 4 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 28 +byte 4 4 +byte 4 150 +address $131 +byte 4 147 +byte 4 0 +byte 4 5 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 29 +byte 4 5 +byte 4 150 +address $132 +byte 4 148 +byte 4 0 +byte 4 6 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 30 +byte 4 6 +byte 4 150 +address $133 +byte 4 174 +byte 4 1 +byte 4 0 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 25 +byte 4 7 +byte 4 150 +address $134 +byte 4 149 +byte 4 1 +byte 4 2 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 9 +byte 4 150 +address $135 +byte 4 175 +byte 4 1 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 10 +byte 4 150 +address $136 +byte 4 150 +byte 4 1 +byte 4 4 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 28 +byte 4 4 +byte 4 150 +address $137 +byte 4 151 +byte 4 1 +byte 4 5 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 29 +byte 4 5 +byte 4 150 +address $138 +byte 4 152 +byte 4 1 +byte 4 6 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 30 +byte 4 6 +byte 4 150 +address $139 +byte 4 153 +byte 4 2 +byte 4 0 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 25 +byte 4 7 +byte 4 150 +address $140 +byte 4 176 +byte 4 2 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 26 +byte 4 8 +byte 4 150 +address $141 +byte 4 177 +byte 4 2 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 10 +byte 4 150 +address $142 +byte 4 154 +byte 4 2 +byte 4 4 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 28 +byte 4 4 +byte 4 150 +address $143 +byte 4 155 +byte 4 2 +byte 4 5 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 29 +byte 4 5 +byte 4 150 +address $144 +byte 4 156 +byte 4 2 +byte 4 6 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 30 +byte 4 6 +byte 4 150 +address $145 +byte 4 157 +byte 4 3 +byte 4 0 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 25 +byte 4 7 +byte 4 150 +address $146 +byte 4 158 +byte 4 3 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 26 +byte 4 8 +byte 4 150 +address $147 +byte 4 159 +byte 4 3 +byte 4 2 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 9 +byte 4 150 +address $148 +byte 4 160 +byte 4 3 +byte 4 4 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 28 +byte 4 4 +byte 4 150 +address $149 +byte 4 161 +byte 4 3 +byte 4 5 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 29 +byte 4 5 +byte 4 150 +address $150 +byte 4 162 +byte 4 3 +byte 4 6 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 30 +byte 4 6 +byte 4 150 +address $151 +byte 4 163 +byte 4 4 +byte 4 0 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 25 +byte 4 7 +byte 4 150 +address $152 +byte 4 178 +byte 4 4 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 26 +byte 4 8 +byte 4 150 +address $153 +byte 4 179 +byte 4 4 +byte 4 2 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 9 +byte 4 150 +address $154 +byte 4 180 +byte 4 4 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 10 +byte 4 150 +address $155 +byte 4 181 +byte 4 4 +byte 4 5 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 29 +byte 4 5 +byte 4 150 +address $156 +byte 4 164 +byte 4 4 +byte 4 6 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 30 +byte 4 6 +byte 4 150 +address $157 +byte 4 165 +byte 4 5 +byte 4 0 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 25 +byte 4 7 +byte 4 150 +address $158 +byte 4 166 +byte 4 5 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 26 +byte 4 8 +byte 4 150 +address $159 +byte 4 182 +byte 4 5 +byte 4 2 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 9 +byte 4 150 +address $160 +byte 4 183 +byte 4 5 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 10 +byte 4 150 +address $161 +byte 4 167 +byte 4 5 +byte 4 4 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 28 +byte 4 4 +byte 4 150 +address $162 +byte 4 184 +byte 4 5 +byte 4 6 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 30 +byte 4 6 +byte 4 150 +address $163 +byte 4 168 +byte 4 6 +byte 4 0 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 25 +byte 4 7 +byte 4 150 +address $164 +byte 4 169 +byte 4 6 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 26 +byte 4 8 +byte 4 150 +address $165 +byte 4 170 +byte 4 6 +byte 4 2 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 9 +byte 4 150 +address $166 +byte 4 185 +byte 4 6 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 10 +byte 4 150 +address $167 +byte 4 186 +byte 4 6 +byte 4 4 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 28 +byte 4 4 +byte 4 150 +address $168 +byte 4 171 +byte 4 6 +byte 4 5 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 29 +byte 4 5 +byte 4 150 +address $169 +byte 4 201 +byte 4 0 +byte 4 0 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 25 +byte 4 33 +byte 4 150 +address $170 +byte 4 202 +byte 4 1 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 26 +byte 4 42 +byte 4 150 +address $171 +byte 4 203 +byte 4 2 +byte 4 2 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 47 +byte 4 150 +address $172 +byte 4 204 +byte 4 3 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 55 +byte 4 150 +address $173 +byte 4 205 +byte 4 4 +byte 4 4 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 28 +byte 4 58 +byte 4 150 +address $174 +byte 4 206 +byte 4 5 +byte 4 5 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 29 +byte 4 63 +byte 4 150 +address $175 +byte 4 207 +byte 4 6 +byte 4 6 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 30 +byte 4 70 +byte 4 150 +address $176 +byte 4 208 +byte 4 0 +byte 4 0 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 25 +byte 4 33 +byte 4 150 +address $177 +byte 4 209 +byte 4 1 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 26 +byte 4 42 +byte 4 150 +address $178 +byte 4 210 +byte 4 2 +byte 4 2 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 47 +byte 4 150 +address $179 +byte 4 204 +byte 4 3 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 55 +byte 4 150 +address $180 +byte 4 211 +byte 4 4 +byte 4 4 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 28 +byte 4 58 +byte 4 150 +address $181 +byte 4 212 +byte 4 5 +byte 4 5 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 29 +byte 4 63 +byte 4 150 +address $182 +byte 4 213 +byte 4 6 +byte 4 6 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 30 +byte 4 70 +byte 4 150 +address $183 +byte 4 214 +byte 4 7 +byte 4 7 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 27 +byte 4 55 +byte 4 150 +address $184 +byte 4 534 +byte 4 0 +byte 4 0 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $185 +byte 4 535 +byte 4 1 +byte 4 1 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $186 +byte 4 536 +byte 4 2 +byte 4 2 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $187 +byte 4 537 +byte 4 3 +byte 4 3 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $188 +byte 4 538 +byte 4 4 +byte 4 4 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $189 +byte 4 539 +byte 4 5 +byte 4 5 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $190 +byte 4 540 +byte 4 6 +byte 4 6 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $191 +byte 4 541 +byte 4 7 +byte 4 7 +byte 4 10 +byte 4 100 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $192 +byte 4 542 +byte 4 3 +byte 4 7 +byte 4 10 +byte 4 50 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $193 +byte 4 543 +byte 4 2 +byte 4 6 +byte 4 10 +byte 4 50 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $194 +byte 4 544 +byte 4 4 +byte 4 0 +byte 4 10 +byte 4 50 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $195 +byte 4 545 +byte 4 6 +byte 4 2 +byte 4 10 +byte 4 50 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $196 +byte 4 546 +byte 4 7 +byte 4 3 +byte 4 10 +byte 4 50 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $197 +byte 4 547 +byte 4 0 +byte 4 4 +byte 4 10 +byte 4 50 +byte 4 0 +byte 4 1 +byte 4 1 +byte 4 150 +address $198 +byte 4 528 +byte 4 1 +byte 4 3 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 27 +byte 4 50 +byte 4 150 +address $199 +byte 4 529 +byte 4 1 +byte 4 2 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 27 +byte 4 45 +byte 4 150 +address $200 +byte 4 530 +byte 4 1 +byte 4 4 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 28 +byte 4 60 +byte 4 150 +address $201 +byte 4 531 +byte 4 1 +byte 4 6 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 25 +byte 4 72 +byte 4 150 +address $202 +byte 4 533 +byte 4 1 +byte 4 0 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 30 +byte 4 33 +byte 4 150 +address $203 +byte 4 523 +byte 4 1 +byte 4 3 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 27 +byte 4 10 +byte 4 150 +address $204 +byte 4 524 +byte 4 1 +byte 4 4 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 27 +byte 4 9 +byte 4 150 +address $205 +byte 4 525 +byte 4 1 +byte 4 2 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 28 +byte 4 4 +byte 4 150 +address $206 +byte 4 526 +byte 4 1 +byte 4 0 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 25 +byte 4 7 +byte 4 150 +address $207 +byte 4 527 +byte 4 1 +byte 4 6 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 30 +byte 4 6 +byte 4 150 +address $208 +byte 4 523 +byte 4 1 +byte 4 3 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 27 +byte 4 10 +byte 4 300 +address $209 +byte 4 525 +byte 4 1 +byte 4 2 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 28 +byte 4 4 +byte 4 300 +address $210 +byte 4 524 +byte 4 1 +byte 4 4 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 27 +byte 4 9 +byte 4 300 +address $211 +byte 4 527 +byte 4 1 +byte 4 6 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 30 +byte 4 6 +byte 4 300 +address $212 +byte 4 526 +byte 4 1 +byte 4 0 +byte 4 10 +byte 4 50 +byte 4 2 +byte 4 25 +byte 4 7 +byte 4 300 +export transitionMove +align 4 +LABELV transitionMove +byte 4 0 +byte 4 32 +byte 4 33 +byte 4 34 +byte 4 35 +byte 4 36 +byte 4 37 +byte 4 0 +byte 4 38 +byte 4 0 +byte 4 39 +byte 4 40 +byte 4 41 +byte 4 42 +byte 4 43 +byte 4 0 +byte 4 44 +byte 4 45 +byte 4 0 +byte 4 46 +byte 4 47 +byte 4 48 +byte 4 49 +byte 4 0 +byte 4 50 +byte 4 51 +byte 4 52 +byte 4 0 +byte 4 53 +byte 4 54 +byte 4 55 +byte 4 0 +byte 4 56 +byte 4 57 +byte 4 58 +byte 4 59 +byte 4 0 +byte 4 60 +byte 4 61 +byte 4 0 +byte 4 62 +byte 4 63 +byte 4 64 +byte 4 65 +byte 4 66 +byte 4 0 +byte 4 67 +byte 4 0 +byte 4 68 +byte 4 69 +byte 4 70 +byte 4 71 +byte 4 72 +byte 4 73 +byte 4 0 +byte 4 0 +byte 4 68 +byte 4 32 +byte 4 33 +byte 4 34 +byte 4 35 +byte 4 36 +byte 4 37 +byte 4 0 +export PM_AttackMoveForQuad +code +proc PM_AttackMoveForQuad 4 0 +line 324 +;93: +;94:// Silly, but I'm replacing these macros so they are shorter! +;95:#define AFLAG_IDLE (SETANIM_FLAG_NORMAL) +;96:#define AFLAG_ACTIVE (/*SETANIM_FLAG_OVERRIDE | */SETANIM_FLAG_HOLD | SETANIM_FLAG_HOLDLESS) +;97:#define AFLAG_WAIT (SETANIM_FLAG_HOLD | SETANIM_FLAG_HOLDLESS) +;98:#define AFLAG_FINISH (SETANIM_FLAG_HOLD) +;99: +;100:saberMoveData_t saberMoveData[LS_MOVE_MAX] = {// NB:randomized +;101: // name anim startQ endQ setanimflag blend, blocking chain_idle chain_attack trailLen +;102: {"None", BOTH_STAND1, Q_R, Q_R, AFLAG_IDLE, 350, BLK_NO, LS_NONE, LS_NONE, 0 }, // LS_NONE = 0, +;103: +;104: // General movements with saber +;105: {"Ready", BOTH_STAND2, Q_R, Q_R, AFLAG_IDLE, 350, BLK_WIDE, LS_READY, LS_S_R2L, 0 }, // LS_READY, +;106: {"Draw", BOTH_STAND1TO2, Q_R, Q_R, AFLAG_FINISH, 350, BLK_NO, LS_READY, LS_S_R2L, 0 }, // LS_DRAW, +;107: {"Putaway", BOTH_STAND2TO1, Q_R, Q_R, AFLAG_FINISH, 350, BLK_NO, LS_READY, LS_S_R2L, 0 }, // LS_PUTAWAY, +;108: +;109: // Attacks +;110: //UL2LR +;111: {"TL2BR Att", BOTH_A1_TL_BR, Q_TL, Q_BR, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_TL2BR, LS_R_TL2BR, 200 }, // LS_A_TL2BR +;112: //SLASH LEFT +;113: {"L2R Att", BOTH_A1__L__R, Q_L, Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_L2R, LS_R_L2R, 200 }, // LS_A_L2R +;114: //LL2UR +;115: {"BL2TR Att", BOTH_A1_BL_TR, Q_BL, Q_TR, AFLAG_ACTIVE, 50, BLK_TIGHT, LS_R_BL2TR, LS_R_BL2TR, 200 }, // LS_A_BL2TR +;116: //LR2UL +;117: {"BR2TL Att", BOTH_A1_BR_TL, Q_BR, Q_TL, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_BR2TL, LS_R_BR2TL, 200 }, // LS_A_BR2TL +;118: //SLASH RIGHT +;119: {"R2L Att", BOTH_A1__R__L, Q_R, Q_L, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_R2L, LS_R_R2L, 200 },// LS_A_R2L +;120: //UR2LL +;121: {"TR2BL Att", BOTH_A1_TR_BL, Q_TR, Q_BL, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_TR2BL, LS_R_TR2BL, 200 }, // LS_A_TR2BL +;122: //SLASH DOWN +;123: {"T2B Att", BOTH_A1_T__B_, Q_T, Q_B, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_T2B, LS_R_T2B, 200 }, // LS_A_T2B +;124: //special attacks +;125: {"Back Stab", BOTH_A2_STABBACK1, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_A_BACKSTAB +;126: {"Back Att", BOTH_ATTACK_BACK, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_A_BACK +;127: {"CR Back Att", BOTH_CROUCHATTACKBACK1,Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_A_BACK_CR +;128: {"Lunge Att", BOTH_LUNGE2_B__T_, Q_B, Q_T, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_A_LUNGE +;129: {"Jump Att", BOTH_FORCELEAP2_T__B_,Q_T, Q_B, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_A_JUMP_T__B_ +;130: {"Flip Stab", BOTH_JUMPFLIPSTABDOWN,Q_R, Q_T, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_T1_T___R, 200 }, // LS_A_FLIP_STAB +;131: {"Flip Slash", BOTH_JUMPFLIPSLASHDOWN1,Q_L,Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_T1__R_T_, 200 }, // LS_A_FLIP_SLASH +;132: +;133: //starts +;134: {"TL2BR St", BOTH_S1_S1_TL, Q_R, Q_TL, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_TL2BR, LS_A_TL2BR, 200 }, // LS_S_TL2BR +;135: {"L2R St", BOTH_S1_S1__L, Q_R, Q_L, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_L2R, LS_A_L2R, 200 }, // LS_S_L2R +;136: {"BL2TR St", BOTH_S1_S1_BL, Q_R, Q_BL, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_BL2TR, LS_A_BL2TR, 200 }, // LS_S_BL2TR +;137: {"BR2TL St", BOTH_S1_S1_BR, Q_R, Q_BR, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_BR2TL, LS_A_BR2TL, 200 }, // LS_S_BR2TL +;138: {"R2L St", BOTH_S1_S1__R, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_R2L, LS_A_R2L, 200 }, // LS_S_R2L +;139: {"TR2BL St", BOTH_S1_S1_TR, Q_R, Q_TR, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_TR2BL, LS_A_TR2BL, 200 }, // LS_S_TR2BL +;140: {"T2B St", BOTH_S1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_T2B, LS_A_T2B, 200 }, // LS_S_T2B +;141: +;142: //returns +;143: {"TL2BR Ret", BOTH_R1_BR_S1, Q_BR, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_TL2BR +;144: {"L2R Ret", BOTH_R1__R_S1, Q_R, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_L2R +;145: {"BL2TR Ret", BOTH_R1_TR_S1, Q_TR, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_BL2TR +;146: {"BR2TL Ret", BOTH_R1_TL_S1, Q_TL, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_BR2TL +;147: {"R2L Ret", BOTH_R1__L_S1, Q_L, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_R2L +;148: {"TR2BL Ret", BOTH_R1_BL_S1, Q_BL, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_TR2BL +;149: {"T2B Ret", BOTH_R1_B__S1, Q_B, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_T2B +;150: +;151: //Transitions +;152: {"BR2R Trans", BOTH_T1_BR__R, Q_BR, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast arc bottom right to right +;153: {"BR2TR Trans", BOTH_T1_BR_TR, Q_BR, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast arc bottom right to top right (use: BOTH_T1_TR_BR) +;154: {"BR2T Trans", BOTH_T1_BR_T_, Q_BR, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast arc bottom right to top (use: BOTH_T1_T__BR) +;155: {"BR2TL Trans", BOTH_T1_BR_TL, Q_BR, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast weak spin bottom right to top left +;156: {"BR2L Trans", BOTH_T1_BR__L, Q_BR, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast weak spin bottom right to left +;157: {"BR2BL Trans", BOTH_T1_BR_BL, Q_BR, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast weak spin bottom right to bottom left +;158: {"R2BR Trans", BOTH_T1__R_BR, Q_R, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast arc right to bottom right (use: BOTH_T1_BR__R) +;159: {"R2TR Trans", BOTH_T1__R_TR, Q_R, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast arc right to top right +;160: {"R2T Trans", BOTH_T1__R_T_, Q_R, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast ar right to top (use: BOTH_T1_T___R) +;161: {"R2TL Trans", BOTH_T1__R_TL, Q_R, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast arc right to top left +;162: {"R2L Trans", BOTH_T1__R__L, Q_R, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast weak spin right to left +;163: {"R2BL Trans", BOTH_T1__R_BL, Q_R, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast weak spin right to bottom left +;164: {"TR2BR Trans", BOTH_T1_TR_BR, Q_TR, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast arc top right to bottom right +;165: {"TR2R Trans", BOTH_T1_TR__R, Q_TR, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast arc top right to right (use: BOTH_T1__R_TR) +;166: {"TR2T Trans", BOTH_T1_TR_T_, Q_TR, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast arc top right to top (use: BOTH_T1_T__TR) +;167: {"TR2TL Trans", BOTH_T1_TR_TL, Q_TR, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast arc top right to top left +;168: {"TR2L Trans", BOTH_T1_TR__L, Q_TR, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast arc top right to left +;169: {"TR2BL Trans", BOTH_T1_TR_BL, Q_TR, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast weak spin top right to bottom left +;170: {"T2BR Trans", BOTH_T1_T__BR, Q_T, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast arc top to bottom right +;171: {"T2R Trans", BOTH_T1_T___R, Q_T, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast arc top to right +;172: {"T2TR Trans", BOTH_T1_T__TR, Q_T, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast arc top to top right +;173: {"T2TL Trans", BOTH_T1_T__TL, Q_T, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast arc top to top left +;174: {"T2L Trans", BOTH_T1_T___L, Q_T, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast arc top to left +;175: {"T2BL Trans", BOTH_T1_T__BL, Q_T, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast arc top to bottom left +;176: {"TL2BR Trans", BOTH_T1_TL_BR, Q_TL, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast weak spin top left to bottom right +;177: {"TL2R Trans", BOTH_T1_TL__R, Q_TL, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast arc top left to right (use: BOTH_T1__R_TL) +;178: {"TL2TR Trans", BOTH_T1_TL_TR, Q_TL, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast arc top left to top right (use: BOTH_T1_TR_TL) +;179: {"TL2T Trans", BOTH_T1_TL_T_, Q_TL, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast arc top left to top (use: BOTH_T1_T__TL) +;180: {"TL2L Trans", BOTH_T1_TL__L, Q_TL, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast arc top left to left (use: BOTH_T1__L_TL) +;181: {"TL2BL Trans", BOTH_T1_TL_BL, Q_TL, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast arc top left to bottom left +;182: {"L2BR Trans", BOTH_T1__L_BR, Q_L, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast weak spin left to bottom right +;183: {"L2R Trans", BOTH_T1__L__R, Q_L, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast weak spin left to right +;184: {"L2TR Trans", BOTH_T1__L_TR, Q_L, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast arc left to top right (use: BOTH_T1_TR__L) +;185: {"L2T Trans", BOTH_T1__L_T_, Q_L, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast arc left to top (use: BOTH_T1_T___L) +;186: {"L2TL Trans", BOTH_T1__L_TL, Q_L, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast arc left to top left +;187: {"L2BL Trans", BOTH_T1__L_BL, Q_L, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast arc left to bottom left (use: BOTH_T1_BL__L) +;188: {"BL2BR Trans", BOTH_T1_BL_BR, Q_BL, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast weak spin bottom left to bottom right +;189: {"BL2R Trans", BOTH_T1_BL__R, Q_BL, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast weak spin bottom left to right +;190: {"BL2TR Trans", BOTH_T1_BL_TR, Q_BL, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast weak spin bottom left to top right +;191: {"BL2T Trans", BOTH_T1_BL_T_, Q_BL, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast arc bottom left to top (use: BOTH_T1_T__BL) +;192: {"BL2TL Trans", BOTH_T1_BL_TL, Q_BL, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast arc bottom left to top left (use: BOTH_T1_TL_BL) +;193: {"BL2L Trans", BOTH_T1_BL__L, Q_BL, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast arc bottom left to left +;194: +;195: //Bounces +;196: {"Bounce BR", BOTH_B1_BR___, Q_BR, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_T1_BR_TR, 150 }, +;197: {"Bounce R", BOTH_B1__R___, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_T1__R__L, 150 }, +;198: {"Bounce TR", BOTH_B1_TR___, Q_TR, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_T1_TR_TL, 150 }, +;199: {"Bounce T", BOTH_B1_T____, Q_T, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_T1_T__BL, 150 }, +;200: {"Bounce TL", BOTH_B1_TL___, Q_TL, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_T1_TL_TR, 150 }, +;201: {"Bounce L", BOTH_B1__L___, Q_L, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_T1__L__R, 150 }, +;202: {"Bounce BL", BOTH_B1_BL___, Q_BL, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_T1_BL_TR, 150 }, +;203: +;204: //Deflected attacks (like bounces, but slide off enemy saber, not straight back) +;205: {"Deflect BR", BOTH_D1_BR___, Q_BR, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_T1_BR_TR, 150 }, +;206: {"Deflect R", BOTH_D1__R___, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_T1__R__L, 150 }, +;207: {"Deflect TR", BOTH_D1_TR___, Q_TR, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_T1_TR_TL, 150 }, +;208: {"Deflect T", BOTH_B1_T____, Q_T, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_T1_T__BL, 150 }, +;209: {"Deflect TL", BOTH_D1_TL___, Q_TL, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_T1_TL_TR, 150 }, +;210: {"Deflect L", BOTH_D1__L___, Q_L, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_T1__L__R, 150 }, +;211: {"Deflect BL", BOTH_D1_BL___, Q_BL, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_T1_BL_TR, 150 }, +;212: {"Deflect B", BOTH_D1_B____, Q_B, Q_B, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_T1_T__BL, 150 }, +;213: +;214: //Reflected attacks +;215: {"Reflected BR",BOTH_V1_BR_S1, Q_BR, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_BR +;216: {"Reflected R", BOTH_V1__R_S1, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1__R +;217: {"Reflected TR",BOTH_V1_TR_S1, Q_TR, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_TR +;218: {"Reflected T", BOTH_V1_T__S1, Q_T, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_T_ +;219: {"Reflected TL",BOTH_V1_TL_S1, Q_TL, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_TL +;220: {"Reflected L", BOTH_V1__L_S1, Q_L, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1__L +;221: {"Reflected BL",BOTH_V1_BL_S1, Q_BL, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_BL +;222: {"Reflected B", BOTH_V1_B__S1, Q_B, Q_B, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_B_ +;223: +;224: // Broken parries +;225: {"BParry Top", BOTH_H1_S1_T_, Q_T, Q_B, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UP, +;226: {"BParry UR", BOTH_H1_S1_TR, Q_TR, Q_BL, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UR, +;227: {"BParry UL", BOTH_H1_S1_TL, Q_TL, Q_BR, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UL, +;228: {"BParry LR", BOTH_H1_S1_BL, Q_BL, Q_TR, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LR, +;229: {"BParry Bot", BOTH_H1_S1_B_, Q_B, Q_T, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LL +;230: {"BParry LL", BOTH_H1_S1_BR, Q_BR, Q_TL, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LL +;231: +;232: // Knockaways +;233: {"Knock Top", BOTH_K1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_T1_T__BR, 150 }, // LS_PARRY_UP, +;234: {"Knock UR", BOTH_K1_S1_TR, Q_R, Q_TR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_T1_TR__R, 150 }, // LS_PARRY_UR, +;235: {"Knock UL", BOTH_K1_S1_TL, Q_R, Q_TL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BR2TL, LS_T1_TL__L, 150 }, // LS_PARRY_UL, +;236: {"Knock LR", BOTH_K1_S1_BL, Q_R, Q_BL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TL2BR, LS_T1_BL_TL, 150 }, // LS_PARRY_LR, +;237: {"Knock LL", BOTH_K1_S1_BR, Q_R, Q_BR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TR2BL, LS_T1_BR_TR, 150 }, // LS_PARRY_LL +;238: +;239: // Parry +;240: {"Parry Top", BOTH_P1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_T2B, 150 }, // LS_PARRY_UP, +;241: {"Parry UR", BOTH_P1_S1_TR, Q_R, Q_TL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_TR2BL, 150 }, // LS_PARRY_UR, +;242: {"Parry UL", BOTH_P1_S1_TL, Q_R, Q_TR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BR2TL, LS_A_TL2BR, 150 }, // LS_PARRY_UL, +;243: {"Parry LR", BOTH_P1_S1_BL, Q_R, Q_BR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TL2BR, LS_A_BR2TL, 150 }, // LS_PARRY_LR, +;244: {"Parry LL", BOTH_P1_S1_BR, Q_R, Q_BL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TR2BL, LS_A_BL2TR, 150 }, // LS_PARRY_LL +;245: +;246: // Reflecting a missile +;247: {"Reflect Top", BOTH_P1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_T2B, 300 }, // LS_PARRY_UP, +;248: {"Reflect UR", BOTH_P1_S1_TL, Q_R, Q_TR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BR2TL, LS_A_TL2BR, 300 }, // LS_PARRY_UR, +;249: {"Reflect UL", BOTH_P1_S1_TR, Q_R, Q_TL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_TR2BL, 300 }, // LS_PARRY_UL, +;250: {"Reflect LR", BOTH_P1_S1_BR, Q_R, Q_BL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TR2BL, LS_A_BL2TR, 300 }, // LS_PARRY_LR +;251: {"Reflect LL", BOTH_P1_S1_BL, Q_R, Q_BR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TL2BR, LS_A_BR2TL, 300 }, // LS_PARRY_LL, +;252:}; +;253: +;254: +;255:int transitionMove[Q_NUM_QUADS][Q_NUM_QUADS] = +;256:{ +;257: LS_NONE, //Can't transition to same pos! +;258: LS_T1_BR__R,//40 +;259: LS_T1_BR_TR, +;260: LS_T1_BR_T_, +;261: LS_T1_BR_TL, +;262: LS_T1_BR__L, +;263: LS_T1_BR_BL, +;264: LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any +;265: LS_T1__R_BR,//46 +;266: LS_NONE, //Can't transition to same pos! +;267: LS_T1__R_TR, +;268: LS_T1__R_T_, +;269: LS_T1__R_TL, +;270: LS_T1__R__L, +;271: LS_T1__R_BL, +;272: LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any +;273: LS_T1_TR_BR,//52 +;274: LS_T1_TR__R, +;275: LS_NONE, //Can't transition to same pos! +;276: LS_T1_TR_T_, +;277: LS_T1_TR_TL, +;278: LS_T1_TR__L, +;279: LS_T1_TR_BL, +;280: LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any +;281: LS_T1_T__BR,//58 +;282: LS_T1_T___R, +;283: LS_T1_T__TR, +;284: LS_NONE, //Can't transition to same pos! +;285: LS_T1_T__TL, +;286: LS_T1_T___L, +;287: LS_T1_T__BL, +;288: LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any +;289: LS_T1_TL_BR,//64 +;290: LS_T1_TL__R, +;291: LS_T1_TL_TR, +;292: LS_T1_TL_T_, +;293: LS_NONE, //Can't transition to same pos! +;294: LS_T1_TL__L, +;295: LS_T1_TL_BL, +;296: LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any +;297: LS_T1__L_BR,//70 +;298: LS_T1__L__R, +;299: LS_T1__L_TR, +;300: LS_T1__L_T_, +;301: LS_T1__L_TL, +;302: LS_NONE, //Can't transition to same pos! +;303: LS_T1__L_BL, +;304: LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any +;305: LS_T1_BL_BR,//76 +;306: LS_T1_BL__R, +;307: LS_T1_BL_TR, +;308: LS_T1_BL_T_, +;309: LS_T1_BL_TL, +;310: LS_T1_BL__L, +;311: LS_NONE, //Can't transition to same pos! +;312: LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any +;313: LS_T1_BL_BR,//NOTE: there are no transitions from bottom, so re-use the bottom right transitions +;314: LS_T1_BR__R, +;315: LS_T1_BR_TR, +;316: LS_T1_BR_T_, +;317: LS_T1_BR_TL, +;318: LS_T1_BR__L, +;319: LS_T1_BR_BL, +;320: LS_NONE //No transitions to bottom, and no anims start there, so shouldn't need any +;321:}; +;322: +;323:saberMoveName_t PM_AttackMoveForQuad( int quad ) +;324:{ +line 325 +;325: switch ( quad ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $214 +ADDRLP4 0 +INDIRI4 +CNSTI4 7 +GTI4 $214 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $223 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $223 +address $216 +address $217 +address $218 +address $219 +address $220 +address $221 +address $222 +address $216 +code +line 326 +;326: { +LABELV $216 +line 329 +;327: case Q_B: +;328: case Q_BR: +;329: return LS_A_BR2TL; +CNSTI4 7 +RETI4 +ADDRGP4 $213 +JUMPV +line 330 +;330: break; +LABELV $217 +line 332 +;331: case Q_R: +;332: return LS_A_R2L; +CNSTI4 8 +RETI4 +ADDRGP4 $213 +JUMPV +line 333 +;333: break; +LABELV $218 +line 335 +;334: case Q_TR: +;335: return LS_A_TR2BL; +CNSTI4 9 +RETI4 +ADDRGP4 $213 +JUMPV +line 336 +;336: break; +LABELV $219 +line 338 +;337: case Q_T: +;338: return LS_A_T2B; +CNSTI4 10 +RETI4 +ADDRGP4 $213 +JUMPV +line 339 +;339: break; +LABELV $220 +line 341 +;340: case Q_TL: +;341: return LS_A_TL2BR; +CNSTI4 4 +RETI4 +ADDRGP4 $213 +JUMPV +line 342 +;342: break; +LABELV $221 +line 344 +;343: case Q_L: +;344: return LS_A_L2R; +CNSTI4 5 +RETI4 +ADDRGP4 $213 +JUMPV +line 345 +;345: break; +LABELV $222 +line 347 +;346: case Q_BL: +;347: return LS_A_BL2TR; +CNSTI4 6 +RETI4 +ADDRGP4 $213 +JUMPV +line 348 +;348: break; +LABELV $214 +line 350 +;349: } +;350: return LS_NONE; +CNSTI4 0 +RETI4 +LABELV $213 +endproc PM_AttackMoveForQuad 4 0 +export PM_SaberAnimTransitionAnim +proc PM_SaberAnimTransitionAnim 32 8 +line 356 +;351:} +;352: +;353:qboolean PM_SaberKataDone(int curmove, int newmove); +;354: +;355:int PM_SaberAnimTransitionAnim( int curmove, int newmove ) +;356:{ +line 357 +;357: int retmove = newmove; +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 358 +;358: if ( curmove == LS_READY ) +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +NEI4 $225 +line 359 +;359: {//just standing there +line 360 +;360: switch ( newmove ) +ADDRLP4 4 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 4 +LTI4 $226 +ADDRLP4 4 +INDIRI4 +CNSTI4 10 +GTI4 $226 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $230-16 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $230 +address $229 +address $229 +address $229 +address $229 +address $229 +address $229 +address $229 +code +line 361 +;361: { +LABELV $229 +line 370 +;362: case LS_A_TL2BR: +;363: case LS_A_L2R: +;364: case LS_A_BL2TR: +;365: case LS_A_BR2TL: +;366: case LS_A_R2L: +;367: case LS_A_TR2BL: +;368: case LS_A_T2B: +;369: //transition is the start +;370: retmove = LS_S_TL2BR + (newmove-LS_A_TL2BR); +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +CNSTI4 4 +SUBI4 +CNSTI4 18 +ADDI4 +ASGNI4 +line 371 +;371: break; +line 373 +;372: } +;373: } +ADDRGP4 $226 +JUMPV +LABELV $225 +line 375 +;374: else +;375: { +line 376 +;376: switch ( newmove ) +ADDRLP4 4 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +LTI4 $232 +ADDRLP4 4 +INDIRI4 +CNSTI4 10 +GTI4 $232 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $264-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $264 +address $234 +address $232 +address $232 +address $240 +address $240 +address $240 +address $240 +address $240 +address $240 +address $240 +code +line 377 +;377: { +LABELV $234 +line 380 +;378: //transitioning to ready pose +;379: case LS_READY: +;380: switch ( curmove ) +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 4 +LTI4 $233 +ADDRLP4 8 +INDIRI4 +CNSTI4 10 +GTI4 $233 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $238-16 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $238 +address $237 +address $237 +address $237 +address $237 +address $237 +address $237 +address $237 +code +line 381 +;381: { +LABELV $237 +line 391 +;382: //transitioning from an attack +;383: case LS_A_TL2BR: +;384: case LS_A_L2R: +;385: case LS_A_BL2TR: +;386: case LS_A_BR2TL: +;387: case LS_A_R2L: +;388: case LS_A_TR2BL: +;389: case LS_A_T2B: +;390: //transition is the return +;391: retmove = LS_R_TL2BR + (newmove-LS_A_TL2BR); +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +CNSTI4 4 +SUBI4 +CNSTI4 25 +ADDI4 +ASGNI4 +line 392 +;392: break; +line 394 +;393: } +;394: break; +ADDRGP4 $233 +JUMPV +LABELV $240 +line 403 +;395: //transitioning to an attack +;396: case LS_A_TL2BR: +;397: case LS_A_L2R: +;398: case LS_A_BL2TR: +;399: case LS_A_BR2TL: +;400: case LS_A_R2L: +;401: case LS_A_TR2BL: +;402: case LS_A_T2B: +;403: if ( newmove == curmove ) +ADDRFP4 4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +NEI4 $241 +line 404 +;404: { +line 406 +;405: //going into an attack +;406: if ( PM_SaberKataDone( curmove, newmove ) ) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 PM_SaberKataDone +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $243 +line 407 +;407: {//done with this kata, must return to ready before attack again +line 408 +;408: retmove = LS_R_TL2BR + (newmove-LS_A_TL2BR); +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +CNSTI4 4 +SUBI4 +CNSTI4 25 +ADDI4 +ASGNI4 +line 409 +;409: } +ADDRGP4 $233 +JUMPV +LABELV $243 +line 411 +;410: else +;411: {//okay to chain to another attack +line 412 +;412: retmove = transitionMove[saberMoveData[curmove].endQuad][saberMoveData[newmove].startQuad]; +ADDRLP4 16 +CNSTI4 40 +ASGNI4 +ADDRLP4 0 +ADDRLP4 16 +INDIRI4 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 16 +INDIRI4 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+12 +ADDP4 +INDIRI4 +CNSTI4 5 +LSHI4 +ADDRGP4 transitionMove +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 413 +;413: } +line 414 +;414: } +ADDRGP4 $233 +JUMPV +LABELV $241 +line 415 +;415: else if ( saberMoveData[curmove].endQuad == saberMoveData[newmove].startQuad ) +ADDRLP4 12 +CNSTI4 40 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+12 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +NEI4 $247 +line 416 +;416: {//new move starts from same quadrant +line 417 +;417: retmove = newmove; +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 418 +;418: } +ADDRGP4 $233 +JUMPV +LABELV $247 +line 420 +;419: else +;420: { +line 421 +;421: switch ( curmove ) +ADDRLP4 16 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 4 +LTI4 $233 +ADDRLP4 16 +INDIRI4 +CNSTI4 31 +GTI4 $259 +ADDRLP4 16 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $260-16 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $260 +address $253 +address $253 +address $253 +address $253 +address $253 +address $253 +address $253 +address $233 +address $233 +address $233 +address $233 +address $233 +address $233 +address $233 +address $233 +address $233 +address $233 +address $233 +address $233 +address $233 +address $233 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +code +LABELV $259 +ADDRLP4 20 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 81 +LTI4 $233 +ADDRLP4 20 +INDIRI4 +CNSTI4 117 +GTI4 $233 +ADDRLP4 20 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $262-324 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $262 +address $253 +address $253 +address $253 +address $253 +address $253 +address $253 +address $253 +address $253 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $233 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +address $256 +code +line 422 +;422: { +LABELV $253 +line 439 +;423: //transitioning from an attack +;424: case LS_A_TL2BR: +;425: case LS_A_L2R: +;426: case LS_A_BL2TR: +;427: case LS_A_BR2TL: +;428: case LS_A_R2L: +;429: case LS_A_TR2BL: +;430: case LS_A_T2B: +;431: case LS_D1_BR: +;432: case LS_D1__R: +;433: case LS_D1_TR: +;434: case LS_D1_T_: +;435: case LS_D1_TL: +;436: case LS_D1__L: +;437: case LS_D1_BL: +;438: case LS_D1_B_: +;439: retmove = transitionMove[saberMoveData[curmove].endQuad][saberMoveData[newmove].startQuad]; +ADDRLP4 24 +CNSTI4 40 +ASGNI4 +ADDRLP4 0 +ADDRLP4 24 +INDIRI4 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 24 +INDIRI4 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+12 +ADDP4 +INDIRI4 +CNSTI4 5 +LSHI4 +ADDRGP4 transitionMove +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 440 +;440: break; +ADDRGP4 $233 +JUMPV +LABELV $256 +line 496 +;441: //transitioning from a return +;442: case LS_R_TL2BR: +;443: case LS_R_L2R: +;444: case LS_R_BL2TR: +;445: case LS_R_BR2TL: +;446: case LS_R_R2L: +;447: case LS_R_TR2BL: +;448: case LS_R_T2B: +;449: //transitioning from a bounce +;450: /* +;451: case LS_BOUNCE_UL2LL: +;452: case LS_BOUNCE_LL2UL: +;453: case LS_BOUNCE_L2LL: +;454: case LS_BOUNCE_L2UL: +;455: case LS_BOUNCE_UR2LR: +;456: case LS_BOUNCE_LR2UR: +;457: case LS_BOUNCE_R2LR: +;458: case LS_BOUNCE_R2UR: +;459: case LS_BOUNCE_TOP: +;460: case LS_OVER_UR2UL: +;461: case LS_OVER_UL2UR: +;462: case LS_BOUNCE_UR: +;463: case LS_BOUNCE_UL: +;464: case LS_BOUNCE_LR: +;465: case LS_BOUNCE_LL: +;466: */ +;467: //transitioning from a parry/reflection/knockaway/broken parry +;468: case LS_PARRY_UP: +;469: case LS_PARRY_UR: +;470: case LS_PARRY_UL: +;471: case LS_PARRY_LR: +;472: case LS_PARRY_LL: +;473: case LS_REFLECT_UP: +;474: case LS_REFLECT_UR: +;475: case LS_REFLECT_UL: +;476: case LS_REFLECT_LR: +;477: case LS_REFLECT_LL: +;478: case LS_K1_T_: +;479: case LS_K1_TR: +;480: case LS_K1_TL: +;481: case LS_K1_BR: +;482: case LS_K1_BL: +;483: case LS_V1_BR: +;484: case LS_V1__R: +;485: case LS_V1_TR: +;486: case LS_V1_T_: +;487: case LS_V1_TL: +;488: case LS_V1__L: +;489: case LS_V1_BL: +;490: case LS_V1_B_: +;491: case LS_H1_T_: +;492: case LS_H1_TR: +;493: case LS_H1_TL: +;494: case LS_H1_BR: +;495: case LS_H1_BL: +;496: retmove = transitionMove[saberMoveData[curmove].endQuad][saberMoveData[newmove].startQuad]; +ADDRLP4 28 +CNSTI4 40 +ASGNI4 +ADDRLP4 0 +ADDRLP4 28 +INDIRI4 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 28 +INDIRI4 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+12 +ADDP4 +INDIRI4 +CNSTI4 5 +LSHI4 +ADDRGP4 transitionMove +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 497 +;497: break; +line 500 +;498: //NB: transitioning from transitions is fine +;499: } +;500: } +line 501 +;501: break; +LABELV $232 +LABELV $233 +line 504 +;502: //transitioning to any other anim is not supported +;503: } +;504: } +LABELV $226 +line 506 +;505: +;506: if ( retmove == LS_NONE ) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $266 +line 507 +;507: { +line 508 +;508: return newmove; +ADDRFP4 4 +INDIRI4 +RETI4 +ADDRGP4 $224 +JUMPV +LABELV $266 +line 511 +;509: } +;510: +;511: return retmove; +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $224 +endproc PM_SaberAnimTransitionAnim 32 8 +export PM_SaberMoveQuadrantForMovement +proc PM_SaberMoveQuadrantForMovement 0 0 +line 515 +;512:} +;513: +;514:int PM_SaberMoveQuadrantForMovement( usercmd_t *ucmd ) +;515:{ +line 516 +;516: if ( ucmd->rightmove > 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 25 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $269 +line 517 +;517: {//moving right +line 518 +;518: if ( ucmd->forwardmove > 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $271 +line 519 +;519: {//forward right = TL2BR slash +line 520 +;520: return Q_TL; +CNSTI4 4 +RETI4 +ADDRGP4 $268 +JUMPV +LABELV $271 +line 522 +;521: } +;522: else if ( ucmd->forwardmove < 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $273 +line 523 +;523: {//backward right = BL2TR uppercut +line 524 +;524: return Q_BL; +CNSTI4 6 +RETI4 +ADDRGP4 $268 +JUMPV +LABELV $273 +line 527 +;525: } +;526: else +;527: {//just right is a left slice +line 528 +;528: return Q_L; +CNSTI4 5 +RETI4 +ADDRGP4 $268 +JUMPV +LABELV $269 +line 531 +;529: } +;530: } +;531: else if ( ucmd->rightmove < 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 25 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $275 +line 532 +;532: {//moving left +line 533 +;533: if ( ucmd->forwardmove > 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $277 +line 534 +;534: {//forward left = TR2BL slash +line 535 +;535: return Q_TR; +CNSTI4 2 +RETI4 +ADDRGP4 $268 +JUMPV +LABELV $277 +line 537 +;536: } +;537: else if ( ucmd->forwardmove < 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $279 +line 538 +;538: {//backward left = BR2TL uppercut +line 539 +;539: return Q_BR; +CNSTI4 0 +RETI4 +ADDRGP4 $268 +JUMPV +LABELV $279 +line 542 +;540: } +;541: else +;542: {//just left is a right slice +line 543 +;543: return Q_R; +CNSTI4 1 +RETI4 +ADDRGP4 $268 +JUMPV +LABELV $275 +line 547 +;544: } +;545: } +;546: else +;547: {//not moving left or right +line 548 +;548: if ( ucmd->forwardmove > 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $281 +line 549 +;549: {//forward= T2B slash +line 550 +;550: return Q_T; +CNSTI4 3 +RETI4 +ADDRGP4 $268 +JUMPV +LABELV $281 +line 552 +;551: } +;552: else if ( ucmd->forwardmove < 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $283 +line 553 +;553: {//backward= T2B slash //or B2T uppercut? +line 554 +;554: return Q_T; +CNSTI4 3 +RETI4 +ADDRGP4 $268 +JUMPV +LABELV $283 +line 557 +;555: } +;556: else +;557: {//Not moving at all +line 558 +;558: return Q_R; +CNSTI4 1 +RETI4 +LABELV $268 +endproc PM_SaberMoveQuadrantForMovement 0 0 +export PM_SaberInBounce +proc PM_SaberInBounce 8 0 +line 565 +;559: } +;560: } +;561:} +;562: +;563://=================================================================== +;564:qboolean PM_SaberInBounce( int move ) +;565:{ +line 566 +;566: if ( move >= LS_B1_BR && move <= LS_B1_BL ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 74 +LTI4 $286 +ADDRLP4 0 +INDIRI4 +CNSTI4 80 +GTI4 $286 +line 567 +;567: { +line 568 +;568: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $285 +JUMPV +LABELV $286 +line 570 +;569: } +;570: if ( move >= LS_D1_BR && move <= LS_D1_BL ) +ADDRLP4 4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 81 +LTI4 $288 +ADDRLP4 4 +INDIRI4 +CNSTI4 87 +GTI4 $288 +line 571 +;571: { +line 572 +;572: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $285 +JUMPV +LABELV $288 +line 574 +;573: } +;574: return qfalse; +CNSTI4 0 +RETI4 +LABELV $285 +endproc PM_SaberInBounce 8 0 +export PM_SaberInTransition +proc PM_SaberInTransition 4 0 +line 578 +;575:} +;576: +;577:qboolean PM_SaberInTransition( int move ) +;578:{ +line 579 +;579: if ( move >= LS_T1_BR__R && move <= LS_T1_BL__L ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +LTI4 $291 +ADDRLP4 0 +INDIRI4 +CNSTI4 73 +GTI4 $291 +line 580 +;580: { +line 581 +;581: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $290 +JUMPV +LABELV $291 +line 583 +;582: } +;583: return qfalse; +CNSTI4 0 +RETI4 +LABELV $290 +endproc PM_SaberInTransition 4 0 +data +export saberMoveTransitionAngle +align 4 +LABELV saberMoveTransitionAngle +byte 4 0 +byte 4 45 +byte 4 90 +byte 4 135 +byte 4 180 +byte 4 215 +byte 4 270 +byte 4 45 +byte 4 45 +byte 4 0 +byte 4 45 +byte 4 90 +byte 4 135 +byte 4 180 +byte 4 215 +byte 4 90 +byte 4 90 +byte 4 45 +byte 4 0 +byte 4 45 +byte 4 90 +byte 4 135 +byte 4 180 +byte 4 135 +byte 4 135 +byte 4 90 +byte 4 45 +byte 4 0 +byte 4 45 +byte 4 90 +byte 4 135 +byte 4 180 +byte 4 180 +byte 4 135 +byte 4 90 +byte 4 45 +byte 4 0 +byte 4 45 +byte 4 90 +byte 4 135 +byte 4 215 +byte 4 180 +byte 4 135 +byte 4 90 +byte 4 45 +byte 4 0 +byte 4 45 +byte 4 90 +byte 4 270 +byte 4 215 +byte 4 180 +byte 4 135 +byte 4 90 +byte 4 45 +byte 4 0 +byte 4 45 +byte 4 45 +byte 4 90 +byte 4 135 +byte 4 180 +byte 4 135 +byte 4 90 +byte 4 45 +byte 4 0 +export PM_SaberAttackChainAngle +code +proc PM_SaberAttackChainAngle 8 0 +line 655 +;584:} +;585: +;586:int saberMoveTransitionAngle[Q_NUM_QUADS][Q_NUM_QUADS] = +;587:{ +;588: 0,//Q_BR,Q_BR, +;589: 45,//Q_BR,Q_R, +;590: 90,//Q_BR,Q_TR, +;591: 135,//Q_BR,Q_T, +;592: 180,//Q_BR,Q_TL, +;593: 215,//Q_BR,Q_L, +;594: 270,//Q_BR,Q_BL, +;595: 45,//Q_BR,Q_B, +;596: 45,//Q_R,Q_BR, +;597: 0,//Q_R,Q_R, +;598: 45,//Q_R,Q_TR, +;599: 90,//Q_R,Q_T, +;600: 135,//Q_R,Q_TL, +;601: 180,//Q_R,Q_L, +;602: 215,//Q_R,Q_BL, +;603: 90,//Q_R,Q_B, +;604: 90,//Q_TR,Q_BR, +;605: 45,//Q_TR,Q_R, +;606: 0,//Q_TR,Q_TR, +;607: 45,//Q_TR,Q_T, +;608: 90,//Q_TR,Q_TL, +;609: 135,//Q_TR,Q_L, +;610: 180,//Q_TR,Q_BL, +;611: 135,//Q_TR,Q_B, +;612: 135,//Q_T,Q_BR, +;613: 90,//Q_T,Q_R, +;614: 45,//Q_T,Q_TR, +;615: 0,//Q_T,Q_T, +;616: 45,//Q_T,Q_TL, +;617: 90,//Q_T,Q_L, +;618: 135,//Q_T,Q_BL, +;619: 180,//Q_T,Q_B, +;620: 180,//Q_TL,Q_BR, +;621: 135,//Q_TL,Q_R, +;622: 90,//Q_TL,Q_TR, +;623: 45,//Q_TL,Q_T, +;624: 0,//Q_TL,Q_TL, +;625: 45,//Q_TL,Q_L, +;626: 90,//Q_TL,Q_BL, +;627: 135,//Q_TL,Q_B, +;628: 215,//Q_L,Q_BR, +;629: 180,//Q_L,Q_R, +;630: 135,//Q_L,Q_TR, +;631: 90,//Q_L,Q_T, +;632: 45,//Q_L,Q_TL, +;633: 0,//Q_L,Q_L, +;634: 45,//Q_L,Q_BL, +;635: 90,//Q_L,Q_B, +;636: 270,//Q_BL,Q_BR, +;637: 215,//Q_BL,Q_R, +;638: 180,//Q_BL,Q_TR, +;639: 135,//Q_BL,Q_T, +;640: 90,//Q_BL,Q_TL, +;641: 45,//Q_BL,Q_L, +;642: 0,//Q_BL,Q_BL, +;643: 45,//Q_BL,Q_B, +;644: 45,//Q_B,Q_BR, +;645: 90,//Q_B,Q_R, +;646: 135,//Q_B,Q_TR, +;647: 180,//Q_B,Q_T, +;648: 135,//Q_B,Q_TL, +;649: 90,//Q_B,Q_L, +;650: 45,//Q_B,Q_BL, +;651: 0//Q_B,Q_B, +;652:}; +;653: +;654:int PM_SaberAttackChainAngle( int move1, int move2 ) +;655:{ +line 656 +;656: if ( move1 == -1 || move2 == -1 ) +ADDRLP4 0 +CNSTI4 -1 +ASGNI4 +ADDRFP4 0 +INDIRI4 +ADDRLP4 0 +INDIRI4 +EQI4 $296 +ADDRFP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +NEI4 $294 +LABELV $296 +line 657 +;657: { +line 658 +;658: return -1; +CNSTI4 -1 +RETI4 +ADDRGP4 $293 +JUMPV +LABELV $294 +line 660 +;659: } +;660: return saberMoveTransitionAngle[saberMoveData[move1].endQuad][saberMoveData[move2].startQuad]; +ADDRLP4 4 +CNSTI4 40 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+12 +ADDP4 +INDIRI4 +CNSTI4 5 +LSHI4 +ADDRGP4 saberMoveTransitionAngle +ADDP4 +ADDP4 +INDIRI4 +RETI4 +LABELV $293 +endproc PM_SaberAttackChainAngle 8 0 +export PM_SaberKataDone +proc PM_SaberKataDone 20 8 +line 664 +;661:} +;662: +;663:qboolean PM_SaberKataDone(int curmove, int newmove) +;664:{ +line 665 +;665: if ( pm->ps->fd.saberAnimLevel == FORCE_LEVEL_3 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $300 +line 666 +;666: { +line 667 +;667: if ( curmove == LS_NONE || newmove == LS_NONE ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRI4 +ADDRLP4 0 +INDIRI4 +EQI4 $304 +ADDRFP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +NEI4 $302 +LABELV $304 +line 668 +;668: { +line 669 +;669: if ( pm->ps->fd.saberAnimLevel >= FORCE_LEVEL_3 && pm->ps->saberAttackChainCount > PM_irand_timesync( 0, 1 ) ) +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 3 +LTI4 $301 +CNSTI4 0 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 8 +ADDRGP4 PM_irand_timesync +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LEI4 $301 +line 670 +;670: { +line 671 +;671: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $299 +JUMPV +line 673 +;672: } +;673: } +LABELV $302 +line 674 +;674: else if ( pm->ps->saberAttackChainCount > PM_irand_timesync( 2, 3 ) ) +CNSTI4 2 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 4 +ADDRGP4 PM_irand_timesync +CALLI4 +ASGNI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LEI4 $307 +line 675 +;675: { +line 676 +;676: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $299 +JUMPV +LABELV $307 +line 678 +;677: } +;678: else if ( pm->ps->saberAttackChainCount > 0 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $301 +line 679 +;679: { +line 680 +;680: int chainAngle = PM_SaberAttackChainAngle( curmove, newmove ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 PM_SaberAttackChainAngle +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 681 +;681: if ( chainAngle < 135 || chainAngle > 215 ) +ADDRLP4 16 +ADDRLP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 135 +LTI4 $313 +ADDRLP4 16 +INDIRI4 +CNSTI4 215 +LEI4 $311 +LABELV $313 +line 682 +;682: {//if trying to chain to a move that doesn't continue the momentum +line 683 +;683: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $299 +JUMPV +LABELV $311 +line 685 +;684: } +;685: else if ( chainAngle == 180 ) +ADDRLP4 8 +INDIRI4 +CNSTI4 180 +NEI4 $314 +line 686 +;686: {//continues the momentum perfectly, allow it to chain 66% of the time +line 687 +;687: if ( pm->ps->saberAttackChainCount > 1 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRI4 +CNSTI4 1 +LEI4 $301 +line 688 +;688: { +line 689 +;689: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $299 +JUMPV +line 691 +;690: } +;691: } +LABELV $314 +line 693 +;692: else +;693: {//would continue the movement somewhat, 50% chance of continuing +line 694 +;694: if ( pm->ps->saberAttackChainCount > 2 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRI4 +CNSTI4 2 +LEI4 $301 +line 695 +;695: { +line 696 +;696: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $299 +JUMPV +line 698 +;697: } +;698: } +line 699 +;699: } +line 700 +;700: } +LABELV $300 +line 702 +;701: else +;702: {//Perhaps have chainAngle influence fast and medium chains as well? For now, just do level 3. +line 703 +;703: if (newmove == LS_A_TL2BR || +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +EQI4 $326 +ADDRLP4 0 +INDIRI4 +CNSTI4 5 +EQI4 $326 +ADDRLP4 0 +INDIRI4 +CNSTI4 6 +EQI4 $326 +ADDRLP4 0 +INDIRI4 +CNSTI4 7 +EQI4 $326 +ADDRLP4 0 +INDIRI4 +CNSTI4 8 +EQI4 $326 +ADDRLP4 0 +INDIRI4 +CNSTI4 9 +NEI4 $320 +LABELV $326 +line 709 +;704: newmove == LS_A_L2R || +;705: newmove == LS_A_BL2TR || +;706: newmove == LS_A_BR2TL || +;707: newmove == LS_A_R2L || +;708: newmove == LS_A_TR2BL ) +;709: { //lower chaining tolerance for spinning saber anims +line 712 +;710: int chainTolerance; +;711: +;712: if (pm->ps->fd.saberAnimLevel == FORCE_LEVEL_1) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $327 +line 713 +;713: { +line 714 +;714: chainTolerance = 5; +ADDRLP4 4 +CNSTI4 5 +ASGNI4 +line 715 +;715: } +ADDRGP4 $328 +JUMPV +LABELV $327 +line 717 +;716: else +;717: { +line 718 +;718: chainTolerance = 3; +ADDRLP4 4 +CNSTI4 3 +ASGNI4 +line 719 +;719: } +LABELV $328 +line 721 +;720: +;721: if (pm->ps->saberAttackChainCount >= chainTolerance && PM_irand_timesync(1, pm->ps->saberAttackChainCount) > chainTolerance) +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LTI4 $329 +CNSTI4 1 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 PM_irand_timesync +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LEI4 $329 +line 722 +;722: { +line 723 +;723: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $299 +JUMPV +LABELV $329 +line 725 +;724: } +;725: } +LABELV $320 +line 726 +;726: if ( pm->ps->fd.saberAnimLevel == FORCE_LEVEL_2 && pm->ps->saberAttackChainCount > PM_irand_timesync( 2, 5 ) ) +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTI4 2 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $331 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 12 +ADDRGP4 PM_irand_timesync +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +LEI4 $331 +line 727 +;727: { +line 728 +;728: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $299 +JUMPV +LABELV $331 +line 730 +;729: } +;730: } +LABELV $301 +line 731 +;731: return qfalse; +CNSTI4 0 +RETI4 +LABELV $299 +endproc PM_SaberKataDone 20 8 +export PM_SetAnimFrame +proc PM_SetAnimFrame 0 0 +line 735 +;732:} +;733: +;734:void PM_SetAnimFrame( playerState_t *gent, int frame, qboolean torso, qboolean legs ) +;735:{ +line 736 +;736: gent->saberLockFrame = frame; +ADDRFP4 0 +INDIRP4 +CNSTI4 532 +ADDP4 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 737 +;737:} +LABELV $333 +endproc PM_SetAnimFrame 0 0 +export PM_SaberLockBreak +proc PM_SaberLockBreak 88 16 +line 740 +;738: +;739:void PM_SaberLockBreak( playerState_t *genemy, qboolean victory ) +;740:{ +line 741 +;741: int winAnim = BOTH_STAND1, loseAnim = BOTH_STAND1; +ADDRLP4 0 +CNSTI4 571 +ASGNI4 +ADDRLP4 8 +CNSTI4 571 +ASGNI4 +line 742 +;742: qboolean punishLoser = qfalse; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 744 +;743: +;744: switch ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) ) +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 20 +CNSTI4 550 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 20 +INDIRI4 +EQI4 $338 +ADDRLP4 12 +INDIRI4 +CNSTI4 553 +EQI4 $341 +ADDRLP4 12 +INDIRI4 +ADDRLP4 20 +INDIRI4 +LTI4 $335 +LABELV $350 +ADDRLP4 12 +INDIRI4 +CNSTI4 560 +EQI4 $344 +ADDRLP4 12 +INDIRI4 +CNSTI4 561 +EQI4 $347 +ADDRGP4 $335 +JUMPV +line 745 +;745: { +LABELV $338 +line 747 +;746: case BOTH_BF2LOCK: +;747: pm->ps->saberMove = LS_A_T2B; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +CNSTI4 10 +ASGNI4 +line 748 +;748: winAnim = BOTH_A3_T__B_; +ADDRLP4 0 +CNSTI4 292 +ASGNI4 +line 749 +;749: if ( !victory ) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $339 +line 750 +;750: {//no-one won +line 751 +;751: genemy->saberMove = LS_A_T2B; +ADDRFP4 0 +INDIRP4 +CNSTI4 512 +ADDP4 +CNSTI4 10 +ASGNI4 +line 752 +;752: loseAnim = winAnim; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 753 +;753: } +ADDRGP4 $336 +JUMPV +LABELV $339 +line 755 +;754: else +;755: { +line 756 +;756: punishLoser = qtrue; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 757 +;757: } +line 758 +;758: break; +ADDRGP4 $336 +JUMPV +LABELV $341 +line 760 +;759: case BOTH_BF1LOCK: +;760: pm->ps->saberMove = LS_K1_T_; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +CNSTI4 103 +ASGNI4 +line 761 +;761: winAnim = BOTH_K1_S1_T_; +ADDRLP4 0 +CNSTI4 528 +ASGNI4 +line 762 +;762: if ( !victory ) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $342 +line 763 +;763: {//no-one won +line 764 +;764: genemy->saberMove = LS_K1_T_; +ADDRFP4 0 +INDIRP4 +CNSTI4 512 +ADDP4 +CNSTI4 103 +ASGNI4 +line 765 +;765: loseAnim = winAnim; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 766 +;766: } +ADDRGP4 $336 +JUMPV +LABELV $342 +line 768 +;767: else +;768: { +line 769 +;769: punishLoser = qtrue; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 770 +;770: } +line 771 +;771: break; +ADDRGP4 $336 +JUMPV +LABELV $344 +line 773 +;772: case BOTH_CWCIRCLELOCK: +;773: winAnim = BOTH_CWCIRCLEBREAK; +ADDRLP4 0 +CNSTI4 558 +ASGNI4 +line 774 +;774: if ( !victory ) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $345 +line 775 +;775: {//no-one won +line 776 +;776: loseAnim = winAnim; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 777 +;777: } +ADDRGP4 $336 +JUMPV +LABELV $345 +line 779 +;778: else +;779: { +line 780 +;780: genemy->saberMove = LS_H1_BL; +ADDRFP4 0 +INDIRP4 +CNSTI4 512 +ADDP4 +CNSTI4 102 +ASGNI4 +line 781 +;781: genemy->saberBlocked = BLOCKED_PARRY_BROKEN; +ADDRFP4 0 +INDIRP4 +CNSTI4 520 +ADDP4 +CNSTI4 2 +ASGNI4 +line 782 +;782: punishLoser = qtrue; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 783 +;783: } +line 784 +;784: break; +ADDRGP4 $336 +JUMPV +LABELV $347 +line 786 +;785: case BOTH_CCWCIRCLELOCK: +;786: winAnim = BOTH_CCWCIRCLEBREAK; +ADDRLP4 0 +CNSTI4 559 +ASGNI4 +line 787 +;787: if ( !victory ) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $348 +line 788 +;788: {//no-one won +line 789 +;789: loseAnim = winAnim; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 790 +;790: } +ADDRGP4 $336 +JUMPV +LABELV $348 +line 792 +;791: else +;792: { +line 793 +;793: genemy->saberMove = LS_H1_BR; +ADDRFP4 0 +INDIRP4 +CNSTI4 512 +ADDP4 +CNSTI4 100 +ASGNI4 +line 794 +;794: genemy->saberBlocked = BLOCKED_PARRY_BROKEN; +ADDRFP4 0 +INDIRP4 +CNSTI4 520 +ADDP4 +CNSTI4 2 +ASGNI4 +line 795 +;795: punishLoser = qtrue; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 796 +;796: } +line 797 +;797: break; +LABELV $335 +LABELV $336 +line 799 +;798: } +;799: PM_SetAnim( SETANIM_BOTH, winAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, -1 ); +ADDRLP4 28 +CNSTI4 3 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +CNSTI4 -1 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 801 +;800: +;801: if (punishLoser) +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $351 +line 802 +;802: { //someone lost the lock, so punish them by knocking them down +line 805 +;803: vec3_t oppDir; +;804: +;805: int strength = 8; +ADDRLP4 44 +CNSTI4 8 +ASGNI4 +line 807 +;806: +;807: VectorSubtract(genemy->origin, pm->ps->origin, oppDir); +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +CNSTI4 20 +ASGNI4 +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 32 +ADDRLP4 48 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 56 +INDIRP4 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 60 +CNSTI4 24 +ASGNI4 +ADDRLP4 32+4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 56 +INDIRP4 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 64 +CNSTI4 28 +ASGNI4 +ADDRLP4 32+8 +ADDRFP4 0 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 808 +;808: VectorNormalize(oppDir); +ADDRLP4 32 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 810 +;809: +;810: genemy->forceHandExtend = HANDEXTEND_KNOCKDOWN; +ADDRFP4 0 +INDIRP4 +CNSTI4 1248 +ADDP4 +CNSTI4 8 +ASGNI4 +line 811 +;811: genemy->forceHandExtendTime = pm->cmd.serverTime + 1100; +ADDRFP4 0 +INDIRP4 +CNSTI4 1252 +ADDP4 +ADDRGP4 pm +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1100 +ADDI4 +ASGNI4 +line 812 +;812: genemy->forceDodgeAnim = 0; //this toggles between 1 and 0, when it's 1 we should play the get up anim +ADDRFP4 0 +INDIRP4 +CNSTI4 1260 +ADDP4 +CNSTI4 0 +ASGNI4 +line 814 +;813: +;814: genemy->otherKiller = pm->ps->clientNum; +ADDRFP4 0 +INDIRP4 +CNSTI4 760 +ADDP4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ASGNI4 +line 815 +;815: genemy->otherKillerTime = pm->cmd.serverTime + 5000; +ADDRFP4 0 +INDIRP4 +CNSTI4 764 +ADDP4 +ADDRGP4 pm +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 5000 +ADDI4 +ASGNI4 +line 816 +;816: genemy->otherKillerDebounceTime = pm->cmd.serverTime + 100; +ADDRFP4 0 +INDIRP4 +CNSTI4 768 +ADDP4 +ADDRGP4 pm +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 100 +ADDI4 +ASGNI4 +line 818 +;817: +;818: genemy->velocity[0] = oppDir[0]*(strength*40); +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 32 +INDIRF4 +CNSTI4 40 +ADDRLP4 44 +INDIRI4 +MULI4 +CVIF4 4 +MULF4 +ASGNF4 +line 819 +;819: genemy->velocity[1] = oppDir[1]*(strength*40); +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 32+4 +INDIRF4 +CNSTI4 40 +ADDRLP4 44 +INDIRI4 +MULI4 +CVIF4 4 +MULF4 +ASGNF4 +line 820 +;820: genemy->velocity[2] = 100; +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1120403456 +ASGNF4 +line 822 +;821: +;822: pm->checkDuelLoss = genemy->clientNum+1; +ADDRGP4 pm +INDIRP4 +CNSTI4 376 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 823 +;823: } +ADDRGP4 $352 +JUMPV +LABELV $351 +line 825 +;824: else +;825: { //If no one lost, then shove each player away from the other +line 828 +;826: vec3_t oppDir; +;827: +;828: int strength = 4; +ADDRLP4 44 +CNSTI4 4 +ASGNI4 +line 830 +;829: +;830: VectorSubtract(genemy->origin, pm->ps->origin, oppDir); +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +CNSTI4 20 +ASGNI4 +ADDRLP4 56 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 32 +ADDRLP4 48 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 56 +INDIRP4 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 60 +CNSTI4 24 +ASGNI4 +ADDRLP4 32+4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 56 +INDIRP4 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 64 +CNSTI4 28 +ASGNI4 +ADDRLP4 32+8 +ADDRFP4 0 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 831 +;831: VectorNormalize(oppDir); +ADDRLP4 32 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 832 +;832: genemy->velocity[0] = oppDir[0]*(strength*40); +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 32 +INDIRF4 +CNSTI4 40 +ADDRLP4 44 +INDIRI4 +MULI4 +CVIF4 4 +MULF4 +ASGNF4 +line 833 +;833: genemy->velocity[1] = oppDir[1]*(strength*40); +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 32+4 +INDIRF4 +CNSTI4 40 +ADDRLP4 44 +INDIRI4 +MULI4 +CVIF4 4 +MULF4 +ASGNF4 +line 834 +;834: genemy->velocity[2] = 150; +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1125515264 +ASGNF4 +line 836 +;835: +;836: VectorSubtract(pm->ps->origin, genemy->origin, oppDir); +ADDRLP4 68 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 72 +CNSTI4 20 +ASGNI4 +ADDRLP4 76 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +ADDRLP4 68 +INDIRP4 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 80 +CNSTI4 24 +ASGNI4 +ADDRLP4 32+4 +ADDRLP4 68 +INDIRP4 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 84 +CNSTI4 28 +ASGNI4 +ADDRLP4 32+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 84 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 84 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 837 +;837: VectorNormalize(oppDir); +ADDRLP4 32 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 838 +;838: pm->ps->velocity[0] = oppDir[0]*(strength*40); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 32 +INDIRF4 +CNSTI4 40 +ADDRLP4 44 +INDIRI4 +MULI4 +CVIF4 4 +MULF4 +ASGNF4 +line 839 +;839: pm->ps->velocity[1] = oppDir[1]*(strength*40); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 32+4 +INDIRF4 +CNSTI4 40 +ADDRLP4 44 +INDIRI4 +MULI4 +CVIF4 4 +MULF4 +ASGNF4 +line 840 +;840: pm->ps->velocity[2] = 150; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1125515264 +ASGNF4 +line 842 +;841: +;842: genemy->forceHandExtend = HANDEXTEND_WEAPONREADY; +ADDRFP4 0 +INDIRP4 +CNSTI4 1248 +ADDP4 +CNSTI4 6 +ASGNI4 +line 843 +;843: } +LABELV $352 +line 845 +;844: +;845: pm->ps->weaponTime = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTI4 0 +ASGNI4 +line 846 +;846: genemy->weaponTime = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTI4 0 +ASGNI4 +line 848 +;847: +;848: pm->ps->saberLockTime = genemy->saberLockTime = 0; +ADDRLP4 32 +CNSTI4 524 +ASGNI4 +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +ADDRLP4 36 +INDIRI4 +ASGNI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 849 +;849: pm->ps->saberLockFrame = genemy->saberLockFrame = 0; +ADDRLP4 40 +CNSTI4 532 +ASGNI4 +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +ADDRLP4 44 +INDIRI4 +ASGNI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 850 +;850: pm->ps->saberLockEnemy = genemy->saberLockEnemy = 0; +ADDRLP4 48 +CNSTI4 528 +ASGNI4 +ADDRLP4 52 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +ADDRLP4 52 +INDIRI4 +ASGNI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 852 +;851: +;852: pm->ps->forceHandExtend = HANDEXTEND_WEAPONREADY; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1248 +ADDP4 +CNSTI4 6 +ASGNI4 +line 854 +;853: +;854: PM_AddEvent( EV_JUMP ); +CNSTI4 14 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 855 +;855: if ( !victory ) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $362 +line 856 +;856: {//no-one won +line 857 +;857: BG_AddPredictableEventToPlayerstate(EV_JUMP, 0, genemy); +CNSTI4 14 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 BG_AddPredictableEventToPlayerstate +CALLV +pop +line 858 +;858: } +ADDRGP4 $363 +JUMPV +LABELV $362 +line 860 +;859: else +;860: { +line 861 +;861: if ( PM_irand_timesync( 0, 1 ) ) +CNSTI4 0 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 56 +ADDRGP4 PM_irand_timesync +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $364 +line 862 +;862: { +line 863 +;863: BG_AddPredictableEventToPlayerstate(EV_JUMP, PM_irand_timesync( 0, 75 ), genemy); +CNSTI4 0 +ARGI4 +CNSTI4 75 +ARGI4 +ADDRLP4 60 +ADDRGP4 PM_irand_timesync +CALLI4 +ASGNI4 +CNSTI4 14 +ARGI4 +ADDRLP4 60 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 BG_AddPredictableEventToPlayerstate +CALLV +pop +line 864 +;864: } +LABELV $364 +line 865 +;865: } +LABELV $363 +line 866 +;866:} +LABELV $334 +endproc PM_SaberLockBreak 88 16 +export PM_SaberLocked +proc PM_SaberLocked 88 16 +line 870 +;867: +;868:extern qboolean ValidAnimFileIndex ( int index ); +;869:void PM_SaberLocked( void ) +;870:{ +line 871 +;871: int remaining = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 873 +;872: +;873: playerState_t *genemy = pm->bgClients[pm->ps->saberLockEnemy]; +ADDRLP4 8 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +INDIRP4 +CNSTI4 528 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 248 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +line 874 +;874: if ( !genemy ) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $367 +line 875 +;875: { +line 876 +;876: return; +ADDRGP4 $366 +JUMPV +LABELV $367 +line 878 +;877: } +;878: if ( ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF2LOCK || +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 550 +EQI4 $373 +ADDRLP4 12 +INDIRI4 +CNSTI4 553 +EQI4 $373 +ADDRLP4 12 +INDIRI4 +CNSTI4 560 +EQI4 $373 +ADDRLP4 12 +INDIRI4 +CNSTI4 561 +NEI4 $369 +LABELV $373 +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 550 +EQI4 $376 +ADDRLP4 16 +INDIRI4 +CNSTI4 553 +EQI4 $376 +ADDRLP4 16 +INDIRI4 +CNSTI4 560 +EQI4 $376 +ADDRLP4 16 +INDIRI4 +CNSTI4 561 +NEI4 $369 +LABELV $376 +line 887 +;879: (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF1LOCK || +;880: (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CWCIRCLELOCK || +;881: (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CCWCIRCLELOCK ) +;882: && ( (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF2LOCK || +;883: (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF1LOCK || +;884: (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CWCIRCLELOCK || +;885: (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CCWCIRCLELOCK ) +;886: ) +;887: { +line 888 +;888: float dist = 0; +ADDRLP4 20 +CNSTF4 0 +ASGNF4 +line 890 +;889: +;890: pm->ps->torsoTimer = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 891 +;891: pm->ps->weaponTime = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTI4 0 +ASGNI4 +line 892 +;892: genemy->torsoTimer = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 893 +;893: genemy->weaponTime = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTI4 0 +ASGNI4 +line 895 +;894: +;895: dist = DistanceSquared(pm->ps->origin,genemy->origin); +ADDRLP4 24 +CNSTI4 20 +ASGNI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 DistanceSquared +CALLF4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 896 +;896: if ( dist < 64 || dist > 6400 ) +ADDRLP4 32 +ADDRLP4 20 +INDIRF4 +ASGNF4 +ADDRLP4 32 +INDIRF4 +CNSTF4 1115684864 +LTF4 $379 +ADDRLP4 32 +INDIRF4 +CNSTF4 1170735104 +LEF4 $377 +LABELV $379 +line 897 +;897: {//between 8 and 80 from each other +line 898 +;898: PM_SaberLockBreak( genemy, qfalse ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 PM_SaberLockBreak +CALLV +pop +line 899 +;899: return; +ADDRGP4 $366 +JUMPV +LABELV $377 +line 901 +;900: } +;901: if ( (pm->cmd.buttons & BUTTON_ATTACK) || pm->ps->saberLockAdvance ) +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 40 +CNSTI4 0 +ASGNI4 +ADDRLP4 36 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 40 +INDIRI4 +NEI4 $382 +ADDRLP4 36 +INDIRP4 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRI4 +ADDRLP4 40 +INDIRI4 +EQI4 $370 +LABELV $382 +line 902 +;902: {//holding attack +line 905 +;903: animation_t *anim; +;904: +;905: if (pm->ps->saberLockAdvance) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $366 +line 906 +;906: {//tapping +line 910 +;907: animation_t *anim; +;908: float currentFrame; +;909: int curFrame; +;910: int strength = 1; +ADDRLP4 48 +CNSTI4 1 +ASGNI4 +line 912 +;911: +;912: pm->ps->saberLockAdvance = qfalse; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 540 +ADDP4 +CNSTI4 0 +ASGNI4 +line 914 +;913: +;914: anim = &pm->animations[pm->ps->torsoAnim&~ANIM_TOGGLEBIT]; +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 52 +CNSTI4 28 +ADDRLP4 64 +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +MULI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ADDP4 +ASGNP4 +line 916 +;915: +;916: currentFrame = pm->ps->saberLockFrame; +ADDRLP4 60 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 532 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 918 +;917: +;918: strength = pm->ps->fd.forcePowerLevel[FP_SABERATTACK]+1; +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1004 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 920 +;919: +;920: if ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CCWCIRCLELOCK || +ADDRLP4 68 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 561 +EQI4 $387 +ADDRLP4 68 +INDIRI4 +CNSTI4 550 +NEI4 $385 +LABELV $387 +line 922 +;921: (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF2LOCK ) +;922: { +line 923 +;923: curFrame = floor( currentFrame )-strength; +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 72 +ADDRGP4 floor +CALLF4 +ASGNF4 +ADDRLP4 56 +ADDRLP4 72 +INDIRF4 +ADDRLP4 48 +INDIRI4 +CVIF4 4 +SUBF4 +CVFI4 4 +ASGNI4 +line 925 +;924: //drop my frame one +;925: if ( curFrame <= anim->firstFrame ) +ADDRLP4 56 +INDIRI4 +ADDRLP4 52 +INDIRP4 +INDIRI4 +GTI4 $388 +line 926 +;926: {//I won! Break out +line 927 +;927: PM_SaberLockBreak( genemy, qtrue ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 PM_SaberLockBreak +CALLV +pop +line 928 +;928: return; +ADDRGP4 $366 +JUMPV +LABELV $388 +line 931 +;929: } +;930: else +;931: { +line 932 +;932: PM_SetAnimFrame( pm->ps, curFrame, qtrue, qtrue ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRLP4 76 +CNSTI4 1 +ASGNI4 +ADDRLP4 76 +INDIRI4 +ARGI4 +ADDRLP4 76 +INDIRI4 +ARGI4 +ADDRGP4 PM_SetAnimFrame +CALLV +pop +line 933 +;933: remaining = curFrame-anim->firstFrame; +ADDRLP4 4 +ADDRLP4 56 +INDIRI4 +ADDRLP4 52 +INDIRP4 +INDIRI4 +SUBI4 +ASGNI4 +line 934 +;934: } +line 935 +;935: } +ADDRGP4 $386 +JUMPV +LABELV $385 +line 937 +;936: else +;937: { +line 938 +;938: curFrame = ceil( currentFrame )+strength; +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 72 +ADDRGP4 ceil +CALLF4 +ASGNF4 +ADDRLP4 56 +ADDRLP4 72 +INDIRF4 +ADDRLP4 48 +INDIRI4 +CVIF4 4 +ADDF4 +CVFI4 4 +ASGNI4 +line 940 +;939: //advance my frame one +;940: if ( curFrame >= anim->firstFrame+anim->numFrames ) +ADDRLP4 76 +ADDRLP4 52 +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRI4 +ADDRLP4 76 +INDIRP4 +INDIRI4 +ADDRLP4 76 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +LTI4 $390 +line 941 +;941: {//I won! Break out +line 942 +;942: PM_SaberLockBreak( genemy, qtrue ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 PM_SaberLockBreak +CALLV +pop +line 943 +;943: return; +ADDRGP4 $366 +JUMPV +LABELV $390 +line 946 +;944: } +;945: else +;946: { +line 947 +;947: PM_SetAnimFrame( pm->ps, curFrame, qtrue, qtrue ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRLP4 80 +CNSTI4 1 +ASGNI4 +ADDRLP4 80 +INDIRI4 +ARGI4 +ADDRLP4 80 +INDIRI4 +ARGI4 +ADDRGP4 PM_SetAnimFrame +CALLV +pop +line 948 +;948: remaining = anim->firstFrame+anim->numFrames-curFrame; +ADDRLP4 84 +ADDRLP4 52 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 84 +INDIRP4 +INDIRI4 +ADDRLP4 84 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ADDRLP4 56 +INDIRI4 +SUBI4 +ASGNI4 +line 949 +;949: } +line 950 +;950: } +LABELV $386 +line 951 +;951: if ( !PM_irand_timesync( 0, 2 ) ) +CNSTI4 0 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 72 +ADDRGP4 PM_irand_timesync +CALLI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +NEI4 $384 +line 952 +;952: { +line 953 +;953: PM_AddEvent( EV_JUMP ); +CNSTI4 14 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 954 +;954: } +line 955 +;955: } +line 957 +;956: else +;957: { +line 958 +;958: return; +LABELV $384 +line 961 +;959: } +;960: +;961: anim = &pm->animations[(genemy->torsoAnim&~ANIM_TOGGLEBIT)]; +ADDRLP4 44 +CNSTI4 28 +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +MULI4 +ADDRGP4 pm +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ADDP4 +ASGNP4 +line 963 +;962: +;963: if ( (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CWCIRCLELOCK || +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 560 +EQI4 $396 +ADDRLP4 48 +INDIRI4 +CNSTI4 553 +NEI4 $394 +LABELV $396 +line 965 +;964: (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF1LOCK ) +;965: { +line 966 +;966: if ( !PM_irand_timesync( 0, 2 ) ) +CNSTI4 0 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 52 +ADDRGP4 PM_irand_timesync +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +NEI4 $397 +line 967 +;967: { +line 968 +;968: BG_AddPredictableEventToPlayerstate(EV_PAIN, floor((float)80/100*100.0f), genemy); +CNSTF4 1117782016 +ARGF4 +ADDRLP4 56 +ADDRGP4 floor +CALLF4 +ASGNF4 +CNSTI4 77 +ARGI4 +ADDRLP4 56 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 BG_AddPredictableEventToPlayerstate +CALLV +pop +line 969 +;969: } +LABELV $397 +line 970 +;970: PM_SetAnimFrame( genemy, anim->firstFrame+remaining, qtrue, qtrue ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 44 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 56 +CNSTI4 1 +ASGNI4 +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRGP4 PM_SetAnimFrame +CALLV +pop +line 971 +;971: } +ADDRGP4 $370 +JUMPV +LABELV $394 +line 973 +;972: else +;973: { +line 974 +;974: PM_SetAnimFrame( genemy, anim->firstFrame+anim->numFrames-remaining, qtrue, qtrue ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 52 +ADDRLP4 44 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +INDIRI4 +ADDRLP4 52 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ARGI4 +ADDRLP4 56 +CNSTI4 1 +ASGNI4 +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRGP4 PM_SetAnimFrame +CALLV +pop +line 975 +;975: } +line 976 +;976: } +line 977 +;977: } +ADDRGP4 $370 +JUMPV +LABELV $369 +line 979 +;978: else +;979: {//something broke us out of it +line 980 +;980: PM_SaberLockBreak( genemy, qfalse ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 PM_SaberLockBreak +CALLV +pop +line 981 +;981: } +LABELV $370 +line 982 +;982:} +LABELV $366 +endproc PM_SaberLocked 88 16 +export PM_SaberInBrokenParry +proc PM_SaberInBrokenParry 8 0 +line 985 +;983: +;984:qboolean PM_SaberInBrokenParry( int move ) +;985:{ +line 986 +;986: if ( move >= LS_V1_BR && move <= LS_V1_B_ ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 89 +LTI4 $400 +ADDRLP4 0 +INDIRI4 +CNSTI4 96 +GTI4 $400 +line 987 +;987: { +line 988 +;988: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $399 +JUMPV +LABELV $400 +line 990 +;989: } +;990: if ( move >= LS_H1_T_ && move <= LS_H1_BL ) +ADDRLP4 4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 97 +LTI4 $402 +ADDRLP4 4 +INDIRI4 +CNSTI4 102 +GTI4 $402 +line 991 +;991: { +line 992 +;992: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $399 +JUMPV +LABELV $402 +line 994 +;993: } +;994: return qfalse; +CNSTI4 0 +RETI4 +LABELV $399 +endproc PM_SaberInBrokenParry 8 0 +export PM_BrokenParryForParry +proc PM_BrokenParryForParry 12 0 +line 999 +;995:} +;996: +;997: +;998:int PM_BrokenParryForParry( int move ) +;999:{ +line 1000 +;1000: switch ( move ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $412 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LTI4 $405 +LABELV $413 +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 108 +LTI4 $405 +ADDRLP4 8 +INDIRI4 +CNSTI4 112 +GTI4 $405 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $414-432 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $414 +address $407 +address $408 +address $409 +address $410 +address $411 +code +line 1001 +;1001: { +LABELV $407 +line 1003 +;1002: case LS_PARRY_UP: +;1003: return LS_H1_T_; +CNSTI4 97 +RETI4 +ADDRGP4 $404 +JUMPV +line 1004 +;1004: break; +LABELV $408 +line 1006 +;1005: case LS_PARRY_UR: +;1006: return LS_H1_TR; +CNSTI4 98 +RETI4 +ADDRGP4 $404 +JUMPV +line 1007 +;1007: break; +LABELV $409 +line 1009 +;1008: case LS_PARRY_UL: +;1009: return LS_H1_TL; +CNSTI4 99 +RETI4 +ADDRGP4 $404 +JUMPV +line 1010 +;1010: break; +LABELV $410 +line 1012 +;1011: case LS_PARRY_LR: +;1012: return LS_H1_BL; +CNSTI4 102 +RETI4 +ADDRGP4 $404 +JUMPV +line 1013 +;1013: break; +LABELV $411 +line 1015 +;1014: case LS_PARRY_LL: +;1015: return LS_H1_BR; +CNSTI4 100 +RETI4 +ADDRGP4 $404 +JUMPV +line 1016 +;1016: break; +LABELV $412 +line 1018 +;1017: case LS_READY: +;1018: return LS_H1_B_; +CNSTI4 101 +RETI4 +ADDRGP4 $404 +JUMPV +line 1019 +;1019: break; +LABELV $405 +line 1021 +;1020: } +;1021: return LS_NONE; +CNSTI4 0 +RETI4 +LABELV $404 +endproc PM_BrokenParryForParry 12 0 +lit +align 4 +LABELV $417 +byte 4 3245342720 +byte 4 3245342720 +byte 4 3238002688 +align 4 +LABELV $418 +byte 4 1097859072 +byte 4 1097859072 +byte 4 1090519040 +export PM_CanBackstab +code +proc PM_CanBackstab 1152 28 +line 1027 +;1022:} +;1023: +;1024:#define BACK_STAB_DISTANCE 128 +;1025: +;1026:qboolean PM_CanBackstab(void) +;1027:{ +line 1031 +;1028: trace_t tr; +;1029: vec3_t flatAng; +;1030: vec3_t fwd, back; +;1031: vec3_t trmins = {-15, -15, -8}; +ADDRLP4 1116 +ADDRGP4 $417 +INDIRB +ASGNB 12 +line 1032 +;1032: vec3_t trmaxs = {15, 15, 8}; +ADDRLP4 1128 +ADDRGP4 $418 +INDIRB +ASGNB 12 +line 1034 +;1033: +;1034: VectorCopy(pm->ps->viewangles, flatAng); +ADDRLP4 1104 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRB +ASGNB 12 +line 1035 +;1035: flatAng[PITCH] = 0; +ADDRLP4 1104 +CNSTF4 0 +ASGNF4 +line 1037 +;1036: +;1037: AngleVectors(flatAng, fwd, 0, 0); +ADDRLP4 1104 +ARGP4 +ADDRLP4 1080 +ARGP4 +ADDRLP4 1140 +CNSTP4 0 +ASGNP4 +ADDRLP4 1140 +INDIRP4 +ARGP4 +ADDRLP4 1140 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 1039 +;1038: +;1039: back[0] = pm->ps->origin[0] - fwd[0]*BACK_STAB_DISTANCE; +ADDRLP4 1092 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +CNSTF4 1124073472 +ADDRLP4 1080 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 1040 +;1040: back[1] = pm->ps->origin[1] - fwd[1]*BACK_STAB_DISTANCE; +ADDRLP4 1092+4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +CNSTF4 1124073472 +ADDRLP4 1080+4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 1041 +;1041: back[2] = pm->ps->origin[2] - fwd[2]*BACK_STAB_DISTANCE; +ADDRLP4 1092+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1124073472 +ADDRLP4 1080+8 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 1043 +;1042: +;1043: pm->trace(&tr, pm->ps->origin, trmins, trmaxs, back, pm->ps->clientNum, MASK_PLAYERSOLID); +ADDRLP4 0 +ARGP4 +ADDRLP4 1144 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1148 +ADDRLP4 1144 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1148 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 1116 +ARGP4 +ADDRLP4 1128 +ARGP4 +ADDRLP4 1092 +ARGP4 +ADDRLP4 1148 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 273 +ARGI4 +ADDRLP4 1144 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 1045 +;1044: +;1045: if (tr.fraction != 1.0 && tr.entityNum >= 0 && tr.entityNum < MAX_CLIENTS) +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1065353216 +EQF4 $423 +ADDRLP4 0+52 +INDIRI4 +CNSTI4 0 +LTI4 $423 +ADDRLP4 0+52 +INDIRI4 +CNSTI4 32 +GEI4 $423 +line 1046 +;1046: { //We don't have real entity access here so we can't do an indepth check. But if it's a client and it's behind us, I guess that's reason enough to stab backward +line 1047 +;1047: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $416 +JUMPV +LABELV $423 +line 1050 +;1048: } +;1049: +;1050: return qfalse; +CNSTI4 0 +RETI4 +LABELV $416 +endproc PM_CanBackstab 1152 28 +export PM_SaberFlipOverAttackMove +proc PM_SaberFlipOverAttackMove 48 16 +line 1054 +;1051:} +;1052: +;1053:saberMoveName_t PM_SaberFlipOverAttackMove(trace_t *tr) +;1054:{ +line 1056 +;1055: vec3_t fwdAngles, jumpFwd; +;1056: float zDiff = 0; +ADDRLP4 24 +CNSTF4 0 +ASGNF4 +line 1059 +;1057: playerState_t *psData; +;1058: +;1059: VectorCopy( pm->ps->viewangles, fwdAngles ); +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRB +ASGNB 12 +line 1060 +;1060: fwdAngles[PITCH] = fwdAngles[ROLL] = 0; +ADDRLP4 32 +CNSTF4 0 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 1061 +;1061: AngleVectors( fwdAngles, jumpFwd, NULL, NULL ); +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 36 +CNSTP4 0 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ARGP4 +ADDRLP4 36 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 1062 +;1062: VectorScale( jumpFwd, 50, pm->ps->velocity ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 1112014848 +ADDRLP4 12 +INDIRF4 +MULF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +CNSTF4 1112014848 +ADDRLP4 12+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1112014848 +ADDRLP4 12+8 +INDIRF4 +MULF4 +ASGNF4 +line 1063 +;1063: pm->ps->velocity[2] = 400; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1137180672 +ASGNF4 +line 1065 +;1064: +;1065: psData = pm->bgClients[tr->entityNum]; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 pm +INDIRP4 +CNSTI4 248 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +line 1068 +;1066: +;1067: //go higher for enemies higher than you, lower for those lower than you +;1068: if (psData) +ADDRLP4 28 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $432 +line 1069 +;1069: { +line 1070 +;1070: zDiff = psData->origin[2] - pm->ps->origin[2]; +ADDRLP4 40 +CNSTI4 28 +ASGNI4 +ADDRLP4 24 +ADDRLP4 28 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 1071 +;1071: } +ADDRGP4 $433 +JUMPV +LABELV $432 +line 1073 +;1072: else +;1073: { +line 1074 +;1074: zDiff = 0; +ADDRLP4 24 +CNSTF4 0 +ASGNF4 +line 1075 +;1075: } +LABELV $433 +line 1076 +;1076: pm->ps->velocity[2] += (zDiff)*1.5f; +ADDRLP4 40 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +CNSTF4 1069547520 +ADDRLP4 24 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1079 +;1077: +;1078: //clamp to decent-looking values +;1079: if ( zDiff <= 0 && pm->ps->velocity[2] < 200 ) +ADDRLP4 24 +INDIRF4 +CNSTF4 0 +GTF4 $434 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1128792064 +GEF4 $434 +line 1080 +;1080: {//if we're on same level, don't let me jump so low, I clip into the ground +line 1081 +;1081: pm->ps->velocity[2] = 200; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1128792064 +ASGNF4 +line 1082 +;1082: } +ADDRGP4 $435 +JUMPV +LABELV $434 +line 1083 +;1083: else if ( pm->ps->velocity[2] < 100 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1120403456 +GEF4 $436 +line 1084 +;1084: { +line 1085 +;1085: pm->ps->velocity[2] = 100; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1120403456 +ASGNF4 +line 1086 +;1086: } +ADDRGP4 $437 +JUMPV +LABELV $436 +line 1087 +;1087: else if ( pm->ps->velocity[2] > 400 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1137180672 +LEF4 $438 +line 1088 +;1088: { +line 1089 +;1089: pm->ps->velocity[2] = 400; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1137180672 +ASGNF4 +line 1090 +;1090: } +LABELV $438 +LABELV $437 +LABELV $435 +line 1092 +;1091: +;1092: PM_SetForceJumpZStart(pm->ps->origin[2]);//so we don't take damage if we land at same height +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 PM_SetForceJumpZStart +CALLV +pop +line 1094 +;1093: +;1094: PM_AddEvent( EV_JUMP ); +CNSTI4 14 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 1095 +;1095: pm->ps->fd.forceJumpSound = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1100 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1096 +;1096: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 1098 +;1097: +;1098: if ( PM_irand_timesync( 0, 1 ) ) +CNSTI4 0 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 44 +ADDRGP4 PM_irand_timesync +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +EQI4 $440 +line 1099 +;1099: { +line 1100 +;1100: return LS_A_FLIP_STAB; +CNSTI4 16 +RETI4 +ADDRGP4 $428 +JUMPV +LABELV $440 +line 1103 +;1101: } +;1102: else +;1103: { +line 1104 +;1104: return LS_A_FLIP_SLASH; +CNSTI4 17 +RETI4 +LABELV $428 +endproc PM_SaberFlipOverAttackMove 48 16 +lit +align 4 +LABELV $443 +byte 4 3245342720 +byte 4 3245342720 +byte 4 3238002688 +align 4 +LABELV $444 +byte 4 1097859072 +byte 4 1097859072 +byte 4 1090519040 +export PM_SomeoneInFront +code +proc PM_SomeoneInFront 80 28 +line 1111 +;1105: } +;1106:} +;1107: +;1108:#define FLIPHACK_DISTANCE 200 +;1109: +;1110:qboolean PM_SomeoneInFront(trace_t *tr) +;1111:{ //Also a very simplified version of the sp counterpart +line 1114 +;1112: vec3_t flatAng; +;1113: vec3_t fwd, back; +;1114: vec3_t trmins = {-15, -15, -8}; +ADDRLP4 36 +ADDRGP4 $443 +INDIRB +ASGNB 12 +line 1115 +;1115: vec3_t trmaxs = {15, 15, 8}; +ADDRLP4 48 +ADDRGP4 $444 +INDIRB +ASGNB 12 +line 1117 +;1116: +;1117: VectorCopy(pm->ps->viewangles, flatAng); +ADDRLP4 24 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRB +ASGNB 12 +line 1118 +;1118: flatAng[PITCH] = 0; +ADDRLP4 24 +CNSTF4 0 +ASGNF4 +line 1120 +;1119: +;1120: AngleVectors(flatAng, fwd, 0, 0); +ADDRLP4 24 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 60 +CNSTP4 0 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ARGP4 +ADDRLP4 60 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 1122 +;1121: +;1122: back[0] = pm->ps->origin[0] + fwd[0]*FLIPHACK_DISTANCE; +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +CNSTF4 1128792064 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1123 +;1123: back[1] = pm->ps->origin[1] + fwd[1]*FLIPHACK_DISTANCE; +ADDRLP4 12+4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +CNSTF4 1128792064 +ADDRLP4 0+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1124 +;1124: back[2] = pm->ps->origin[2] + fwd[2]*FLIPHACK_DISTANCE; +ADDRLP4 12+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1128792064 +ADDRLP4 0+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1126 +;1125: +;1126: pm->trace(tr, pm->ps->origin, trmins, trmaxs, back, pm->ps->clientNum, MASK_PLAYERSOLID); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 68 +ADDRLP4 64 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 36 +ARGP4 +ADDRLP4 48 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 68 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 273 +ARGI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 1128 +;1127: +;1128: if (tr->fraction != 1.0 && tr->entityNum >= 0 && tr->entityNum < MAX_CLIENTS) +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +EQF4 $449 +ADDRLP4 76 +ADDRLP4 72 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +LTI4 $449 +ADDRLP4 76 +INDIRI4 +CNSTI4 32 +GEI4 $449 +line 1129 +;1129: { +line 1130 +;1130: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $442 +JUMPV +LABELV $449 +line 1133 +;1131: } +;1132: +;1133: return qfalse; +CNSTI4 0 +RETI4 +LABELV $442 +endproc PM_SomeoneInFront 80 28 +export PM_SaberLungeAttackMove +proc PM_SaberLungeAttackMove 32 16 +line 1137 +;1134:} +;1135: +;1136:saberMoveName_t PM_SaberLungeAttackMove( void ) +;1137:{ +line 1140 +;1138: vec3_t fwdAngles, jumpFwd; +;1139: +;1140: VectorCopy( pm->ps->viewangles, fwdAngles ); +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRB +ASGNB 12 +line 1141 +;1141: fwdAngles[PITCH] = fwdAngles[ROLL] = 0; +ADDRLP4 24 +CNSTF4 0 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 24 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 1143 +;1142: //do the lunge +;1143: AngleVectors( fwdAngles, jumpFwd, NULL, NULL ); +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 28 +CNSTP4 0 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 1144 +;1144: VectorScale( jumpFwd, 150, pm->ps->velocity ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 1125515264 +ADDRLP4 12 +INDIRF4 +MULF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +CNSTF4 1125515264 +ADDRLP4 12+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1125515264 +ADDRLP4 12+8 +INDIRF4 +MULF4 +ASGNF4 +line 1145 +;1145: PM_AddEvent( EV_JUMP ); +CNSTI4 14 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 1147 +;1146: +;1147: return LS_A_LUNGE; +CNSTI4 14 +RETI4 +LABELV $451 +endproc PM_SaberLungeAttackMove 32 16 +export PM_SaberJumpAttackMove +proc PM_SaberJumpAttackMove 32 16 +line 1151 +;1148:} +;1149: +;1150:saberMoveName_t PM_SaberJumpAttackMove( void ) +;1151:{ +line 1154 +;1152: vec3_t fwdAngles, jumpFwd; +;1153: +;1154: VectorCopy( pm->ps->viewangles, fwdAngles ); +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRB +ASGNB 12 +line 1155 +;1155: fwdAngles[PITCH] = fwdAngles[ROLL] = 0; +ADDRLP4 24 +CNSTF4 0 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 24 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 1156 +;1156: AngleVectors( fwdAngles, jumpFwd, NULL, NULL ); +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 28 +CNSTP4 0 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 1157 +;1157: VectorScale( jumpFwd, 300, pm->ps->velocity ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 1133903872 +ADDRLP4 12 +INDIRF4 +MULF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +CNSTF4 1133903872 +ADDRLP4 12+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1133903872 +ADDRLP4 12+8 +INDIRF4 +MULF4 +ASGNF4 +line 1158 +;1158: pm->ps->velocity[2] = 280; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1133248512 +ASGNF4 +line 1159 +;1159: PM_SetForceJumpZStart(pm->ps->origin[2]);//so we don't take damage if we land at same height +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 PM_SetForceJumpZStart +CALLV +pop +line 1161 +;1160: +;1161: PM_AddEvent( EV_JUMP ); +CNSTI4 14 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 1162 +;1162: pm->ps->fd.forceJumpSound = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1100 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1163 +;1163: pm->cmd.upmove = 0; +ADDRGP4 pm +INDIRP4 +CNSTI4 30 +ADDP4 +CNSTI1 0 +ASGNI1 +line 1165 +;1164: +;1165: return LS_A_JUMP_T__B_; +CNSTI4 15 +RETI4 +LABELV $455 +endproc PM_SaberJumpAttackMove 32 16 +export PM_GroundDistance +proc PM_GroundDistance 1108 28 +line 1169 +;1166:} +;1167: +;1168:float PM_GroundDistance(void) +;1169:{ +line 1173 +;1170: trace_t tr; +;1171: vec3_t down; +;1172: +;1173: VectorCopy(pm->ps->origin, down); +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 1175 +;1174: +;1175: down[2] -= 4096; +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1166016512 +SUBF4 +ASGNF4 +line 1177 +;1176: +;1177: pm->trace(&tr, pm->ps->origin, pm->mins, pm->maxs, down, pm->ps->clientNum, MASK_SOLID); +ADDRLP4 12 +ARGP4 +ADDRLP4 1092 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1096 +ADDRLP4 1092 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 1179 +;1178: +;1179: VectorSubtract(pm->ps->origin, tr.endpos, down); +ADDRLP4 1100 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 1100 +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 12+12 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 1100 +INDIRP4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 12+12+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 12+12+8 +INDIRF4 +SUBF4 +ASGNF4 +line 1181 +;1180: +;1181: return VectorLength(down); +ADDRLP4 0 +ARGP4 +ADDRLP4 1104 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 1104 +INDIRF4 +RETF4 +LABELV $459 +endproc PM_GroundDistance 1108 28 +export PM_SaberAttackForMovement +proc PM_SaberAttackForMovement 1108 8 +line 1185 +;1182:} +;1183: +;1184:saberMoveName_t PM_SaberAttackForMovement(saberMoveName_t curmove) +;1185:{ +line 1186 +;1186: saberMoveName_t newmove = -1; +ADDRLP4 0 +CNSTI4 -1 +ASGNI4 +line 1188 +;1187: +;1188: if ( pm->cmd.rightmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $469 +line 1189 +;1189: {//moving right +line 1190 +;1190: if ( pm->cmd.forwardmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $471 +line 1191 +;1191: {//forward right = TL2BR slash +line 1192 +;1192: newmove = LS_A_TL2BR; +ADDRLP4 0 +CNSTI4 4 +ASGNI4 +line 1193 +;1193: } +ADDRGP4 $470 +JUMPV +LABELV $471 +line 1194 +;1194: else if ( pm->cmd.forwardmove < 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $473 +line 1195 +;1195: {//backward right = BL2TR uppercut +line 1196 +;1196: newmove = LS_A_BL2TR; +ADDRLP4 0 +CNSTI4 6 +ASGNI4 +line 1197 +;1197: } +ADDRGP4 $470 +JUMPV +LABELV $473 +line 1199 +;1198: else +;1199: {//just right is a left slice +line 1200 +;1200: newmove = LS_A_L2R; +ADDRLP4 0 +CNSTI4 5 +ASGNI4 +line 1201 +;1201: } +line 1202 +;1202: } +ADDRGP4 $470 +JUMPV +LABELV $469 +line 1203 +;1203: else if ( pm->cmd.rightmove < 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $475 +line 1204 +;1204: {//moving left +line 1205 +;1205: if ( pm->cmd.forwardmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $477 +line 1206 +;1206: {//forward left = TR2BL slash +line 1207 +;1207: newmove = LS_A_TR2BL; +ADDRLP4 0 +CNSTI4 9 +ASGNI4 +line 1208 +;1208: } +ADDRGP4 $476 +JUMPV +LABELV $477 +line 1209 +;1209: else if ( pm->cmd.forwardmove < 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $479 +line 1210 +;1210: {//backward left = BR2TL uppercut +line 1211 +;1211: newmove = LS_A_BR2TL; +ADDRLP4 0 +CNSTI4 7 +ASGNI4 +line 1212 +;1212: } +ADDRGP4 $476 +JUMPV +LABELV $479 +line 1214 +;1213: else +;1214: {//just left is a right slice +line 1215 +;1215: newmove = LS_A_R2L; +ADDRLP4 0 +CNSTI4 8 +ASGNI4 +line 1216 +;1216: } +line 1217 +;1217: } +ADDRGP4 $476 +JUMPV +LABELV $475 +line 1219 +;1218: else +;1219: {//not moving left or right +line 1220 +;1220: if ( pm->cmd.forwardmove > 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +LEI4 $481 +line 1221 +;1221: {//forward= T2B slash +line 1222 +;1222: if (pm->ps->fd.saberAnimLevel == FORCE_LEVEL_2 && +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $483 +ADDRLP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1120403456 +LEF4 $483 +ADDRLP4 8 +ADDRGP4 PM_GroundDistance +CALLF4 +ASGNF4 +ADDRLP4 8 +INDIRF4 +CNSTF4 1107296256 +GEF4 $483 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $483 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $483 +line 1227 +;1223: pm->ps->velocity[2] > 100 && +;1224: PM_GroundDistance() < 32 && +;1225: !BG_InSpecialJump(pm->ps->legsAnim) && +;1226: !BG_SaberInSpecialAttack(pm->ps->torsoAnim)) +;1227: { //FLIP AND DOWNWARD ATTACK +line 1230 +;1228: trace_t tr; +;1229: +;1230: if (PM_SomeoneInFront(&tr)) +ADDRLP4 20 +ARGP4 +ADDRLP4 1100 +ADDRGP4 PM_SomeoneInFront +CALLI4 +ASGNI4 +ADDRLP4 1100 +INDIRI4 +CNSTI4 0 +EQI4 $482 +line 1231 +;1231: { +line 1232 +;1232: newmove = PM_SaberFlipOverAttackMove(&tr); +ADDRLP4 20 +ARGP4 +ADDRLP4 1104 +ADDRGP4 PM_SaberFlipOverAttackMove +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 1104 +INDIRI4 +ASGNI4 +line 1233 +;1233: } +line 1234 +;1234: } +ADDRGP4 $482 +JUMPV +LABELV $483 +line 1235 +;1235: else if (pm->ps->fd.saberAnimLevel == FORCE_LEVEL_1 && +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 24 +CNSTI4 1 +ASGNI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $487 +ADDRLP4 20 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +EQI4 $487 +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +BANDI4 +ADDRLP4 28 +INDIRI4 +EQI4 $487 +ADDRLP4 20 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +GTI4 $487 +ADDRLP4 20 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 32 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +NEI4 $487 +line 1240 +;1236: pm->ps->groundEntityNum != ENTITYNUM_NONE && +;1237: (pm->ps->pm_flags & PMF_DUCKED) && +;1238: pm->ps->weaponTime <= 0 && +;1239: !BG_SaberInSpecialAttack(pm->ps->torsoAnim)) +;1240: { //LUNGE (weak) +line 1241 +;1241: newmove = PM_SaberLungeAttackMove(); +ADDRLP4 36 +ADDRGP4 PM_SaberLungeAttackMove +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 1242 +;1242: } +ADDRGP4 $482 +JUMPV +LABELV $487 +line 1244 +;1243: else +;1244: { +line 1245 +;1245: newmove = LS_A_T2B; +ADDRLP4 0 +CNSTI4 10 +ASGNI4 +line 1246 +;1246: } +line 1247 +;1247: } +ADDRGP4 $482 +JUMPV +LABELV $481 +line 1248 +;1248: else if ( pm->cmd.forwardmove < 0 ) +ADDRGP4 pm +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +GEI4 $489 +line 1249 +;1249: {//backward= T2B slash//B2T uppercut? +line 1250 +;1250: if (PM_CanBackstab() && !BG_SaberInSpecialAttack(pm->ps->torsoAnim)) +ADDRLP4 4 +ADDRGP4 PM_CanBackstab +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $491 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $491 +line 1251 +;1251: { //BACKSTAB (attack varies by level) +line 1252 +;1252: if (pm->ps->fd.saberAnimLevel >= FORCE_LEVEL_2) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 2 +LTI4 $493 +line 1253 +;1253: {//medium and higher attacks +line 1254 +;1254: if ( (pm->ps->pm_flags&PMF_DUCKED) || pm->cmd.upmove < 0 ) +ADDRLP4 12 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRLP4 12 +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 16 +INDIRI4 +NEI4 $497 +ADDRLP4 12 +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 16 +INDIRI4 +GEI4 $495 +LABELV $497 +line 1255 +;1255: { +line 1256 +;1256: newmove = LS_A_BACK_CR; +ADDRLP4 0 +CNSTI4 13 +ASGNI4 +line 1257 +;1257: } +ADDRGP4 $490 +JUMPV +LABELV $495 +line 1259 +;1258: else +;1259: { +line 1260 +;1260: newmove = LS_A_BACK; +ADDRLP4 0 +CNSTI4 12 +ASGNI4 +line 1261 +;1261: } +line 1262 +;1262: } +ADDRGP4 $490 +JUMPV +LABELV $493 +line 1264 +;1263: else +;1264: { //weak attack +line 1265 +;1265: newmove = LS_A_BACKSTAB; +ADDRLP4 0 +CNSTI4 11 +ASGNI4 +line 1266 +;1266: } +line 1267 +;1267: } +ADDRGP4 $490 +JUMPV +LABELV $491 +line 1269 +;1268: else +;1269: { +line 1270 +;1270: newmove = LS_A_T2B; +ADDRLP4 0 +CNSTI4 10 +ASGNI4 +line 1271 +;1271: } +line 1272 +;1272: } +ADDRGP4 $490 +JUMPV +LABELV $489 +line 1273 +;1273: else if ( PM_SaberInBounce( curmove ) ) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 PM_SaberInBounce +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $498 +line 1274 +;1274: {//bounces should go to their default attack if you don't specify a direction but are attacking +line 1275 +;1275: newmove = saberMoveData[curmove].chain_attack; +ADDRLP4 0 +CNSTI4 40 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+32 +ADDP4 +INDIRI4 +ASGNI4 +line 1277 +;1276: +;1277: if ( PM_SaberKataDone(curmove, newmove) ) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 PM_SaberKataDone +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $501 +line 1278 +;1278: { +line 1279 +;1279: newmove = saberMoveData[curmove].chain_idle; +ADDRLP4 0 +CNSTI4 40 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+28 +ADDP4 +INDIRI4 +ASGNI4 +line 1280 +;1280: } +ADDRGP4 $499 +JUMPV +LABELV $501 +line 1282 +;1281: else +;1282: { +line 1283 +;1283: newmove = saberMoveData[curmove].chain_attack; +ADDRLP4 0 +CNSTI4 40 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+32 +ADDP4 +INDIRI4 +ASGNI4 +line 1284 +;1284: } +line 1285 +;1285: } +ADDRGP4 $499 +JUMPV +LABELV $498 +line 1286 +;1286: else if ( curmove == LS_READY ) +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +NEI4 $505 +line 1287 +;1287: {//Not moving at all, shouldn't have gotten here...? +line 1294 +;1288: //for now, just pick a random attack +;1289: //newmove = Q_irand( LS_A_TL2BR, LS_A_T2B ); +;1290: //rww - If we don't seed with a "common" value, the client and server will get mismatched +;1291: //prediction values. Under laggy conditions this will cause the appearance of rapid swing +;1292: //sequence changes. +;1293: +;1294: newmove = LS_A_T2B; //decided we don't like random attacks when idle, use an overhead instead. +ADDRLP4 0 +CNSTI4 10 +ASGNI4 +line 1295 +;1295: } +LABELV $505 +LABELV $499 +LABELV $490 +LABELV $482 +line 1296 +;1296: } +LABELV $476 +LABELV $470 +line 1298 +;1297: +;1298: return newmove; +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $468 +endproc PM_SaberAttackForMovement 1108 8 +export PM_WeaponLightsaber +proc PM_WeaponLightsaber 120 16 +line 1311 +;1299:} +;1300:/* +;1301:================= +;1302:PM_WeaponLightsaber +;1303: +;1304:Consults a chart to choose what to do with the lightsaber. +;1305:While this is a little different than the Quake 3 code, there is no clean way of using the Q3 code for this kind of thing. +;1306:================= +;1307:*/ +;1308:// Ultimate goal is to set the sabermove to the proper next location +;1309:// Note that if the resultant animation is NONE, then the animation is essentially "idle", and is set in WP_TorsoAnim +;1310:void PM_WeaponLightsaber(void) +;1311:{ +line 1313 +;1312: int addTime,amount; +;1313: qboolean delayed_fire = qfalse; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +line 1314 +;1314: int anim=-1, curmove, newmove=LS_NONE; +ADDRLP4 12 +CNSTI4 -1 +ASGNI4 +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 1316 +;1315: +;1316: qboolean saberInAir = qtrue; +ADDRLP4 24 +CNSTI4 1 +ASGNI4 +line 1317 +;1317: qboolean checkOnlyWeap = qfalse; +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +line 1319 +;1318: +;1319: if ( pm->ps->saberLockTime > pm->cmd.serverTime ) +ADDRLP4 32 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +INDIRP4 +CNSTI4 524 +ADDP4 +INDIRI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LEI4 $508 +line 1320 +;1320: { +line 1321 +;1321: pm->ps->saberMove = LS_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1322 +;1322: PM_SaberLocked(); +ADDRGP4 PM_SaberLocked +CALLV +pop +line 1323 +;1323: return; +ADDRGP4 $507 +JUMPV +LABELV $508 +line 1326 +;1324: } +;1325: else +;1326: { +line 1327 +;1327: if ( ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF2LOCK || +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 36 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 550 +EQI4 $515 +ADDRLP4 40 +INDIRI4 +CNSTI4 553 +EQI4 $515 +ADDRLP4 40 +INDIRI4 +CNSTI4 560 +EQI4 $515 +ADDRLP4 40 +INDIRI4 +CNSTI4 561 +EQI4 $515 +ADDRLP4 36 +INDIRP4 +CNSTI4 532 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $510 +LABELV $515 +line 1333 +;1328: (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF1LOCK || +;1329: (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CWCIRCLELOCK || +;1330: (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CCWCIRCLELOCK || +;1331: pm->ps->saberLockFrame ) +;1332: ) +;1333: { +line 1334 +;1334: if (pm->ps->saberLockEnemy < ENTITYNUM_NONE && +ADDRLP4 44 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 528 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 1023 +GEI4 $516 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +LTI4 $516 +line 1336 +;1335: pm->ps->saberLockEnemy >= 0) +;1336: { +line 1339 +;1337: playerState_t *en; +;1338: +;1339: en = pm->bgClients[pm->ps->saberLockEnemy]; +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 48 +ADDRLP4 52 +INDIRP4 +INDIRP4 +CNSTI4 528 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 52 +INDIRP4 +CNSTI4 248 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +line 1341 +;1340: +;1341: if (en) +ADDRLP4 48 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $518 +line 1342 +;1342: { +line 1343 +;1343: PM_SaberLockBreak(en, qfalse); +ADDRLP4 48 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 PM_SaberLockBreak +CALLV +pop +line 1344 +;1344: return; +ADDRGP4 $507 +JUMPV +LABELV $518 +line 1346 +;1345: } +;1346: } +LABELV $516 +line 1348 +;1347: +;1348: if ( ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF2LOCK || +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 52 +ADDRLP4 48 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 550 +EQI4 $525 +ADDRLP4 52 +INDIRI4 +CNSTI4 553 +EQI4 $525 +ADDRLP4 52 +INDIRI4 +CNSTI4 560 +EQI4 $525 +ADDRLP4 52 +INDIRI4 +CNSTI4 561 +EQI4 $525 +ADDRLP4 48 +INDIRP4 +CNSTI4 532 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $520 +LABELV $525 +line 1354 +;1349: (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF1LOCK || +;1350: (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CWCIRCLELOCK || +;1351: (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CCWCIRCLELOCK || +;1352: pm->ps->saberLockFrame ) +;1353: ) +;1354: { +line 1355 +;1355: pm->ps->torsoTimer = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1356 +;1356: PM_SetAnim(SETANIM_TORSO,BOTH_STAND1,SETANIM_FLAG_OVERRIDE, 100); +ADDRLP4 56 +CNSTI4 1 +ASGNI4 +ADDRLP4 56 +INDIRI4 +ARGI4 +CNSTI4 571 +ARGI4 +ADDRLP4 56 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1357 +;1357: pm->ps->saberLockFrame = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 532 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1358 +;1358: } +LABELV $520 +line 1359 +;1359: } +LABELV $510 +line 1360 +;1360: } +line 1362 +;1361: +;1362: if (pm->ps->saberHolstered) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1312 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $526 +line 1363 +;1363: { +line 1364 +;1364: if (pm->ps->saberMove != LS_READY) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +CNSTI4 1 +EQI4 $528 +line 1365 +;1365: { +line 1366 +;1366: PM_SetSaberMove( LS_READY ); +CNSTI4 1 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1367 +;1367: } +LABELV $528 +line 1369 +;1368: +;1369: if ((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) != (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT)) +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 40 +CNSTI4 -2049 +ASGNI4 +ADDRLP4 36 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ADDRLP4 40 +INDIRI4 +BANDI4 +ADDRLP4 36 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ADDRLP4 40 +INDIRI4 +BANDI4 +EQI4 $530 +line 1370 +;1370: { +line 1371 +;1371: PM_SetAnim(SETANIM_TORSO,(pm->ps->legsAnim & ~ANIM_TOGGLEBIT),SETANIM_FLAG_OVERRIDE, 100); +ADDRLP4 44 +CNSTI4 1 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 44 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1372 +;1372: } +LABELV $530 +line 1374 +;1373: +;1374: if (BG_InSaberStandAnim(pm->ps->torsoAnim)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 44 +ADDRGP4 BG_InSaberStandAnim +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +EQI4 $532 +line 1375 +;1375: { +line 1376 +;1376: PM_SetAnim(SETANIM_TORSO,BOTH_STAND1,SETANIM_FLAG_OVERRIDE, 100); +ADDRLP4 48 +CNSTI4 1 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +CNSTI4 571 +ARGI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1377 +;1377: } +LABELV $532 +line 1379 +;1378: +;1379: if (pm->ps->weaponTime < 1 && ((pm->cmd.buttons & BUTTON_ALT_ATTACK) || (pm->cmd.buttons & BUTTON_ATTACK))) +ADDRLP4 48 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 52 +CNSTI4 1 +ASGNI4 +ADDRLP4 48 +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +ADDRLP4 52 +INDIRI4 +GEI4 $534 +ADDRLP4 56 +ADDRLP4 48 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 60 +CNSTI4 0 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 128 +BANDI4 +ADDRLP4 60 +INDIRI4 +NEI4 $536 +ADDRLP4 56 +INDIRI4 +ADDRLP4 52 +INDIRI4 +BANDI4 +ADDRLP4 60 +INDIRI4 +EQI4 $534 +LABELV $536 +line 1380 +;1380: { +line 1381 +;1381: if (pm->ps->duelTime < pm->cmd.serverTime) +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +INDIRP4 +CNSTI4 1300 +ADDP4 +INDIRI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +GEI4 $537 +line 1382 +;1382: { +line 1383 +;1383: pm->ps->saberHolstered = qfalse; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1312 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1384 +;1384: PM_AddEvent(EV_SABER_UNHOLSTER); +CNSTI4 29 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 1385 +;1385: } +LABELV $537 +line 1386 +;1386: } +LABELV $534 +line 1388 +;1387: +;1388: if ( pm->ps->weaponTime > 0 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $539 +line 1389 +;1389: { +line 1390 +;1390: pm->ps->weaponTime -= pml.msec; +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 64 +INDIRP4 +INDIRI4 +ADDRGP4 pml+40 +INDIRI4 +SUBI4 +ASGNI4 +line 1391 +;1391: } +LABELV $539 +line 1393 +;1392: +;1393: checkOnlyWeap = qtrue; +ADDRLP4 16 +CNSTI4 1 +ASGNI4 +line 1394 +;1394: goto weapChecks; +ADDRGP4 $542 +JUMPV +LABELV $526 +line 1397 +;1395: } +;1396: +;1397: if ((pm->cmd.buttons & BUTTON_ALT_ATTACK) && +ADDRLP4 36 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 40 +CNSTI4 0 +ASGNI4 +ADDRLP4 36 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +ADDRLP4 40 +INDIRI4 +EQI4 $543 +ADDRLP4 44 +ADDRLP4 36 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 1 +GEI4 $543 +ADDRLP4 44 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ADDRLP4 40 +INDIRI4 +EQI4 $543 +ADDRLP4 44 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRI4 +CNSTI4 72 +ADDRLP4 44 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 forcePowerNeeded+68 +ADDP4 +INDIRI4 +LTI4 $543 +ADDRLP4 36 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 44 +INDIRP4 +ARGP4 +ADDRLP4 48 +ADDRGP4 BG_HasYsalamiri +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +NEI4 $543 +ADDRLP4 52 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 52 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 17 +ARGI4 +ADDRLP4 56 +ADDRGP4 BG_CanUseFPNow +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $543 +line 1404 +;1398: pm->ps->weaponTime < 1 && +;1399: pm->ps->saberCanThrow && +;1400: pm->ps->fd.forcePower >= forcePowerNeeded[pm->ps->fd.forcePowerLevel[FP_SABERTHROW]][FP_SABERTHROW] && +;1401: !BG_HasYsalamiri(pm->gametype, pm->ps) && +;1402: BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_SABERTHROW) +;1403: ) +;1404: { //might as well just check for a saber throw right here +line 1406 +;1405: //This will get set to false again once the saber makes it back to its owner game-side +;1406: if (!pm->ps->saberInFlight) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $546 +line 1407 +;1407: { +line 1408 +;1408: pm->ps->fd.forcePower -= forcePowerNeeded[pm->ps->fd.forcePowerLevel[FP_SABERTHROW]][FP_SABERTHROW]; +ADDRLP4 60 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 64 +ADDRLP4 60 +INDIRP4 +CNSTI4 932 +ADDP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 64 +INDIRP4 +INDIRI4 +CNSTI4 72 +ADDRLP4 60 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 forcePowerNeeded+68 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 1409 +;1409: } +LABELV $546 +line 1411 +;1410: +;1411: pm->ps->saberInFlight = qtrue; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 504 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1412 +;1412: } +LABELV $543 +line 1414 +;1413: +;1414: if ( pm->ps->saberInFlight ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $549 +line 1415 +;1415: {//guiding saber +line 1416 +;1416: PM_SetAnim(SETANIM_TORSO, BOTH_SABERPULL, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); +CNSTI4 1 +ARGI4 +CNSTI4 1052 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1417 +;1417: pm->ps->torsoTimer = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1418 +;1418: return; +ADDRGP4 $507 +JUMPV +LABELV $549 +line 1430 +;1419: } +;1420: +;1421: // don't allow attack until all buttons are up +;1422: //This is bad. It freezes the attack state and the animations if you hold the button after respawning, and it looks strange. +;1423: /* +;1424: if ( pm->ps->pm_flags & PMF_RESPAWNED ) { +;1425: return; +;1426: } +;1427: */ +;1428: +;1429: // check for dead player +;1430: if ( pm->ps->stats[STAT_HEALTH] <= 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $551 +line 1431 +;1431: return; +ADDRGP4 $507 +JUMPV +LABELV $551 +line 1434 +;1432: } +;1433: +;1434: if (pm->ps->weaponstate == WEAPON_READY || +ADDRLP4 60 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 0 +EQI4 $555 +ADDRLP4 60 +INDIRI4 +CNSTI4 6 +NEI4 $553 +LABELV $555 +line 1436 +;1435: pm->ps->weaponstate == WEAPON_IDLE) +;1436: { +line 1437 +;1437: if (pm->ps->saberMove != LS_READY && pm->ps->weaponTime <= 0 && !pm->ps->saberBlocked) +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +CNSTI4 1 +EQI4 $556 +ADDRLP4 68 +CNSTI4 0 +ASGNI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +ADDRLP4 68 +INDIRI4 +GTI4 $556 +ADDRLP4 64 +INDIRP4 +CNSTI4 520 +ADDP4 +INDIRI4 +ADDRLP4 68 +INDIRI4 +NEI4 $556 +line 1438 +;1438: { +line 1439 +;1439: PM_SetSaberMove( LS_READY ); +CNSTI4 1 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1440 +;1440: } +LABELV $556 +line 1441 +;1441: } +LABELV $553 +line 1443 +;1442: +;1443: if( (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN2 || +ADDRLP4 64 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 836 +EQI4 $560 +ADDRLP4 64 +INDIRI4 +CNSTI4 833 +NEI4 $558 +LABELV $560 +line 1445 +;1444: (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN1 ) +;1445: { +line 1446 +;1446: if ((pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) != (pm->ps->legsAnim & ~ANIM_TOGGLEBIT)) +ADDRLP4 68 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 72 +CNSTI4 -2049 +ASGNI4 +ADDRLP4 68 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ADDRLP4 72 +INDIRI4 +BANDI4 +ADDRLP4 68 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ADDRLP4 72 +INDIRI4 +BANDI4 +EQI4 $561 +line 1447 +;1447: { +line 1448 +;1448: PM_SetAnim(SETANIM_TORSO,(pm->ps->legsAnim & ~ANIM_TOGGLEBIT),SETANIM_FLAG_OVERRIDE, 100); +ADDRLP4 76 +CNSTI4 1 +ASGNI4 +ADDRLP4 76 +INDIRI4 +ARGI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 76 +INDIRI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1449 +;1449: } +LABELV $561 +line 1450 +;1450: } +LABELV $558 +line 1453 +;1451: +;1452: // make weapon function +;1453: if ( pm->ps->weaponTime > 0 ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $563 +line 1454 +;1454: pm->ps->weaponTime -= pml.msec; +ADDRLP4 68 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +ADDRLP4 68 +INDIRP4 +INDIRI4 +ADDRGP4 pml+40 +INDIRI4 +SUBI4 +ASGNI4 +line 1456 +;1455: +;1456: if (pm->ps->saberBlocked && pm->ps->torsoAnim != saberMoveData[pm->ps->saberMove].animToUse) +ADDRLP4 72 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 520 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $564 +ADDRLP4 72 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 40 +ADDRLP4 72 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+4 +ADDP4 +INDIRI4 +EQI4 $564 +line 1457 +;1457: { //rww - keep him in the blocking pose until he can attack again +line 1458 +;1458: PM_SetAnim(SETANIM_TORSO,saberMoveData[pm->ps->saberMove].animToUse,saberMoveData[pm->ps->saberMove].animSetFlags|SETANIM_FLAG_HOLD, saberMoveData[pm->ps->saberMove].blendTime); +CNSTI4 1 +ARGI4 +ADDRLP4 76 +CNSTI4 40 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +ADDRGP4 saberMoveData+4 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 76 +INDIRI4 +ADDRGP4 saberMoveData+16 +ADDP4 +INDIRU4 +CNSTU4 2 +BORU4 +CVUI4 4 +ARGI4 +ADDRLP4 76 +INDIRI4 +ADDRGP4 saberMoveData+20 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1459 +;1459: return; +ADDRGP4 $507 +JUMPV +line 1461 +;1460: } +;1461: } +LABELV $563 +line 1463 +;1462: else +;1463: { +line 1464 +;1464: pm->ps->weaponstate = WEAPON_READY; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1465 +;1465: } +LABELV $564 +line 1468 +;1466: +;1467: // Now we react to a block action by the player's lightsaber. +;1468: if ( pm->ps->saberBlocked ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 520 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $572 +line 1469 +;1469: { +line 1470 +;1470: int firstSet = 0; +ADDRLP4 68 +CNSTI4 0 +ASGNI4 +line 1472 +;1471: +;1472: if (!pm->ps->weaponTime) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $574 +line 1473 +;1473: { +line 1474 +;1474: firstSet = 1; +ADDRLP4 68 +CNSTI4 1 +ASGNI4 +line 1475 +;1475: } +LABELV $574 +line 1477 +;1476: +;1477: switch ( pm->ps->saberBlocked ) +ADDRLP4 72 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 520 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 1 +LTI4 $576 +ADDRLP4 72 +INDIRI4 +CNSTI4 13 +GTI4 $576 +ADDRLP4 72 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $615-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $615 +address $579 +address $580 +address $587 +address $605 +address $607 +address $609 +address $611 +address $613 +address $606 +address $608 +address $610 +address $612 +address $614 +code +line 1478 +;1478: { +LABELV $579 +line 1480 +;1479: case BLOCKED_BOUNCE_MOVE: +;1480: { //act as a bounceMove and reset the saberMove instead of using a seperate value for it +line 1481 +;1481: PM_SetSaberMove( pm->ps->saberMove ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +CVII2 4 +CVII4 2 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1482 +;1482: pm->ps->weaponTime = pm->ps->torsoTimer; +ADDRLP4 80 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +ASGNI4 +line 1483 +;1483: pm->ps->saberBlocked = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 520 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1484 +;1484: } +line 1485 +;1485: break; +ADDRGP4 $577 +JUMPV +LABELV $580 +line 1488 +;1486: case BLOCKED_PARRY_BROKEN: +;1487: //whatever parry we were is in now broken, play the appropriate knocked-away anim +;1488: { +line 1491 +;1489: int nextMove; +;1490: +;1491: if ( PM_SaberInBrokenParry( pm->ps->saberMove ) ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 84 +ADDRGP4 PM_SaberInBrokenParry +CALLI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +EQI4 $581 +line 1492 +;1492: {//already have one...? +line 1493 +;1493: nextMove = pm->ps->saberMove; +ADDRLP4 80 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ASGNI4 +line 1494 +;1494: } +ADDRGP4 $582 +JUMPV +LABELV $581 +line 1496 +;1495: else +;1496: { +line 1497 +;1497: nextMove = PM_BrokenParryForParry( pm->ps->saberMove ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 PM_BrokenParryForParry +CALLI4 +ASGNI4 +ADDRLP4 80 +ADDRLP4 88 +INDIRI4 +ASGNI4 +line 1498 +;1498: } +LABELV $582 +line 1499 +;1499: if ( nextMove != LS_NONE ) +ADDRLP4 80 +INDIRI4 +CNSTI4 0 +EQI4 $583 +line 1500 +;1500: { +line 1501 +;1501: PM_SetSaberMove( nextMove ); +ADDRLP4 80 +INDIRI4 +CVII2 4 +CVII4 2 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1502 +;1502: pm->ps->weaponTime = pm->ps->torsoTimer; +ADDRLP4 88 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +ASGNI4 +line 1503 +;1503: } +ADDRGP4 $577 +JUMPV +LABELV $583 +line 1505 +;1504: else +;1505: {//Maybe in a knockaway? +line 1506 +;1506: if (pm->ps->weaponTime <= 0) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $577 +line 1507 +;1507: { +line 1508 +;1508: pm->ps->saberBlocked = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 520 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1509 +;1509: } +line 1510 +;1510: } +line 1511 +;1511: } +line 1512 +;1512: break; +ADDRGP4 $577 +JUMPV +LABELV $587 +line 1516 +;1513: case BLOCKED_ATK_BOUNCE: +;1514: // If there is absolutely no blocked move in the chart, don't even mess with the animation. +;1515: // OR if we are already in a block or parry. +;1516: if (pm->ps->saberMove >= LS_T1_BR__R) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +CNSTI4 32 +LTI4 $588 +line 1517 +;1517: {//an actual bounce? Other bounces before this are actually transitions? +line 1518 +;1518: pm->ps->saberBlocked = BLOCKED_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 520 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1519 +;1519: } +ADDRGP4 $577 +JUMPV +LABELV $588 +line 1521 +;1520: else +;1521: { +line 1524 +;1522: int bounceMove; +;1523: +;1524: if ( pm->cmd.buttons & BUTTON_ATTACK ) +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $590 +line 1525 +;1525: {//transition to a new attack +line 1526 +;1526: int newQuad = PM_SaberMoveQuadrantForMovement( &pm->cmd ); +ADDRGP4 pm +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 88 +ADDRGP4 PM_SaberMoveQuadrantForMovement +CALLI4 +ASGNI4 +ADDRLP4 84 +ADDRLP4 88 +INDIRI4 +ASGNI4 +ADDRGP4 $593 +JUMPV +LABELV $592 +line 1528 +;1527: while ( newQuad == saberMoveData[pm->ps->saberMove].startQuad ) +;1528: {//player is still in same attack quad, don't repeat that attack because it looks bad, +line 1531 +;1529: //FIXME: try to pick one that might look cool? +;1530: //newQuad = Q_irand( Q_BR, Q_BL ); +;1531: newQuad = PM_irand_timesync( Q_BR, Q_BL ); +CNSTI4 0 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 92 +ADDRGP4 PM_irand_timesync +CALLI4 +ASGNI4 +ADDRLP4 84 +ADDRLP4 92 +INDIRI4 +ASGNI4 +line 1533 +;1532: //FIXME: sanity check, just in case? +;1533: }//else player is switching up anyway, take the new attack dir +LABELV $593 +line 1527 +ADDRLP4 84 +INDIRI4 +CNSTI4 40 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +EQI4 $592 +line 1534 +;1534: bounceMove = transitionMove[saberMoveData[pm->ps->saberMove].startQuad][newQuad]; +ADDRLP4 80 +ADDRLP4 84 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 40 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +CNSTI4 5 +LSHI4 +ADDRGP4 transitionMove +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 1535 +;1535: } +ADDRGP4 $591 +JUMPV +LABELV $590 +line 1537 +;1536: else +;1537: {//return to ready +line 1538 +;1538: if ( saberMoveData[pm->ps->saberMove].startQuad == Q_T ) +CNSTI4 40 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $597 +line 1539 +;1539: { +line 1540 +;1540: bounceMove = LS_R_BL2TR; +ADDRLP4 80 +CNSTI4 27 +ASGNI4 +line 1541 +;1541: } +ADDRGP4 $598 +JUMPV +LABELV $597 +line 1542 +;1542: else if ( saberMoveData[pm->ps->saberMove].startQuad < Q_T ) +CNSTI4 40 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +CNSTI4 3 +GEI4 $600 +line 1543 +;1543: { +line 1544 +;1544: bounceMove = LS_R_TL2BR+saberMoveData[pm->ps->saberMove].startQuad-Q_BR; +ADDRLP4 80 +CNSTI4 40 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +CNSTI4 25 +ADDI4 +ASGNI4 +line 1545 +;1545: } +ADDRGP4 $601 +JUMPV +LABELV $600 +line 1547 +;1546: else// if ( saberMoveData[pm->ps->saberMove].startQuad > Q_T ) +;1547: { +line 1548 +;1548: bounceMove = LS_R_BR2TL+saberMoveData[pm->ps->saberMove].startQuad-Q_TL; +ADDRLP4 80 +CNSTI4 40 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +CNSTI4 28 +ADDI4 +CNSTI4 4 +SUBI4 +ASGNI4 +line 1549 +;1549: } +LABELV $601 +LABELV $598 +line 1550 +;1550: } +LABELV $591 +line 1551 +;1551: PM_SetSaberMove( bounceMove ); +ADDRLP4 80 +INDIRI4 +CVII2 4 +CVII4 2 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1553 +;1552: +;1553: pm->ps->weaponTime = pm->ps->torsoTimer;//+saberMoveData[bounceMove].blendTime+SABER_BLOCK_DUR; +ADDRLP4 84 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +ASGNI4 +line 1555 +;1554: +;1555: } +line 1556 +;1556: break; +ADDRGP4 $577 +JUMPV +LABELV $605 +line 1558 +;1557: case BLOCKED_UPPER_RIGHT: +;1558: PM_SetSaberMove( LS_PARRY_UR ); +CNSTI4 109 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1559 +;1559: break; +ADDRGP4 $577 +JUMPV +LABELV $606 +line 1561 +;1560: case BLOCKED_UPPER_RIGHT_PROJ: +;1561: PM_SetSaberMove( LS_REFLECT_UR ); +CNSTI4 114 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1562 +;1562: break; +ADDRGP4 $577 +JUMPV +LABELV $607 +line 1564 +;1563: case BLOCKED_UPPER_LEFT: +;1564: PM_SetSaberMove( LS_PARRY_UL ); +CNSTI4 110 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1565 +;1565: break; +ADDRGP4 $577 +JUMPV +LABELV $608 +line 1567 +;1566: case BLOCKED_UPPER_LEFT_PROJ: +;1567: PM_SetSaberMove( LS_REFLECT_UL ); +CNSTI4 115 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1568 +;1568: break; +ADDRGP4 $577 +JUMPV +LABELV $609 +line 1570 +;1569: case BLOCKED_LOWER_RIGHT: +;1570: PM_SetSaberMove( LS_PARRY_LR ); +CNSTI4 111 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1571 +;1571: break; +ADDRGP4 $577 +JUMPV +LABELV $610 +line 1573 +;1572: case BLOCKED_LOWER_RIGHT_PROJ: +;1573: PM_SetSaberMove( LS_REFLECT_LR ); +CNSTI4 116 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1574 +;1574: break; +ADDRGP4 $577 +JUMPV +LABELV $611 +line 1576 +;1575: case BLOCKED_LOWER_LEFT: +;1576: PM_SetSaberMove( LS_PARRY_LL ); +CNSTI4 112 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1577 +;1577: break; +ADDRGP4 $577 +JUMPV +LABELV $612 +line 1579 +;1578: case BLOCKED_LOWER_LEFT_PROJ: +;1579: PM_SetSaberMove( LS_REFLECT_LL); +CNSTI4 117 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1580 +;1580: break; +ADDRGP4 $577 +JUMPV +LABELV $613 +line 1582 +;1581: case BLOCKED_TOP: +;1582: PM_SetSaberMove( LS_PARRY_UP ); +CNSTI4 108 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1583 +;1583: break; +ADDRGP4 $577 +JUMPV +LABELV $614 +line 1585 +;1584: case BLOCKED_TOP_PROJ: +;1585: PM_SetSaberMove( LS_REFLECT_UP ); +CNSTI4 113 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1586 +;1586: break; +ADDRGP4 $577 +JUMPV +LABELV $576 +line 1588 +;1587: default: +;1588: pm->ps->saberBlocked = BLOCKED_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 520 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1589 +;1589: break; +LABELV $577 +line 1592 +;1590: } +;1591: +;1592: if (pm->ps->saberBlocked != BLOCKED_ATK_BOUNCE && pm->ps->saberBlocked != BLOCKED_PARRY_BROKEN && pm->ps->weaponTime < 1) +ADDRLP4 80 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 84 +ADDRLP4 80 +INDIRP4 +CNSTI4 520 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 3 +EQI4 $617 +ADDRLP4 84 +INDIRI4 +CNSTI4 2 +EQI4 $617 +ADDRLP4 80 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 1 +GEI4 $617 +line 1593 +;1593: { +line 1594 +;1594: pm->ps->torsoTimer = SABER_BLOCK_DUR; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 150 +ASGNI4 +line 1595 +;1595: pm->ps->weaponTime = pm->ps->torsoTimer; +ADDRLP4 88 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +ASGNI4 +line 1596 +;1596: } +LABELV $617 +line 1598 +;1597: +;1598: if (firstSet) +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +EQI4 $619 +line 1599 +;1599: { +line 1600 +;1600: return; +ADDRGP4 $507 +JUMPV +LABELV $619 +line 1604 +;1601: } +;1602: +;1603: // Charging is like a lead-up before attacking again. This is an appropriate use, or we can create a new weaponstate for blocking +;1604: pm->ps->weaponstate = WEAPON_READY; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1607 +;1605: +;1606: // Done with block, so stop these active weapon branches. +;1607: return; +ADDRGP4 $507 +JUMPV +LABELV $572 +LABELV $542 +line 1613 +;1608: } +;1609: +;1610:weapChecks: +;1611: // check for weapon change +;1612: // can't change if weapon is firing, but can change again if lowering or raising +;1613: if ( pm->ps->weaponTime <= 0 || pm->ps->weaponstate != WEAPON_FIRING ) { +ADDRLP4 68 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $623 +ADDRLP4 68 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $621 +LABELV $623 +line 1614 +;1614: if ( pm->ps->weapon != pm->cmd.weapon ) { +ADDRLP4 72 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ADDRLP4 72 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRU1 +CVUI4 1 +EQI4 $624 +line 1615 +;1615: PM_BeginWeaponChange( pm->cmd.weapon ); +ADDRGP4 pm +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRU1 +CVUI4 1 +ARGI4 +ADDRGP4 PM_BeginWeaponChange +CALLV +pop +line 1616 +;1616: } +LABELV $624 +line 1617 +;1617: } +LABELV $621 +line 1619 +;1618: +;1619: if ( pm->ps->weaponTime > 0 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $626 +line 1620 +;1620: { +line 1621 +;1621: return; +ADDRGP4 $507 +JUMPV +LABELV $626 +line 1629 +;1622: } +;1623: +;1624: // ********************************************************* +;1625: // WEAPON_DROPPING +;1626: // ********************************************************* +;1627: +;1628: // change weapon if time +;1629: if ( pm->ps->weaponstate == WEAPON_DROPPING ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $628 +line 1630 +;1630: PM_FinishWeaponChange(); +ADDRGP4 PM_FinishWeaponChange +CALLV +pop +line 1631 +;1631: return; +ADDRGP4 $507 +JUMPV +LABELV $628 +line 1638 +;1632: } +;1633: +;1634: // ********************************************************* +;1635: // WEAPON_RAISING +;1636: // ********************************************************* +;1637: +;1638: if ( pm->ps->weaponstate == WEAPON_RAISING ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $630 +line 1639 +;1639: {//Just selected the weapon +line 1640 +;1640: pm->ps->weaponstate = WEAPON_IDLE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 6 +ASGNI4 +line 1641 +;1641: if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_WALK1 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 822 +NEI4 $632 +line 1642 +;1642: { +line 1643 +;1643: PM_SetAnim(SETANIM_TORSO,BOTH_WALK1,SETANIM_FLAG_NORMAL, 100); +CNSTI4 1 +ARGI4 +CNSTI4 822 +ARGI4 +CNSTI4 0 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1644 +;1644: } +ADDRGP4 $633 +JUMPV +LABELV $632 +line 1645 +;1645: else if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN2 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 836 +NEI4 $634 +line 1646 +;1646: { +line 1647 +;1647: PM_SetAnim(SETANIM_TORSO,BOTH_RUN2,SETANIM_FLAG_NORMAL, 100); +CNSTI4 1 +ARGI4 +CNSTI4 836 +ARGI4 +CNSTI4 0 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1648 +;1648: } +ADDRGP4 $635 +JUMPV +LABELV $634 +line 1649 +;1649: else if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_WALK2 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 823 +NEI4 $636 +line 1650 +;1650: { +line 1651 +;1651: PM_SetAnim(SETANIM_TORSO,BOTH_WALK2,SETANIM_FLAG_NORMAL, 100); +CNSTI4 1 +ARGI4 +CNSTI4 823 +ARGI4 +CNSTI4 0 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1652 +;1652: } +ADDRGP4 $637 +JUMPV +LABELV $636 +line 1654 +;1653: else +;1654: { +line 1655 +;1655: PM_SetAnim(SETANIM_TORSO,PM_GetSaberStance(),SETANIM_FLAG_NORMAL, 100); +ADDRLP4 72 +ADDRGP4 PM_GetSaberStance +CALLI4 +ASGNI4 +CNSTI4 1 +ARGI4 +ADDRLP4 72 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1656 +;1656: } +LABELV $637 +LABELV $635 +LABELV $633 +line 1658 +;1657: +;1658: if (pm->ps->weaponstate == WEAPON_RAISING) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $638 +line 1659 +;1659: { +line 1660 +;1660: return; +ADDRGP4 $507 +JUMPV +LABELV $638 +line 1663 +;1661: } +;1662: +;1663: } +LABELV $630 +line 1665 +;1664: +;1665: if (checkOnlyWeap) +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $640 +line 1666 +;1666: { +line 1667 +;1667: return; +ADDRGP4 $507 +JUMPV +LABELV $640 +line 1674 +;1668: } +;1669: +;1670: // ********************************************************* +;1671: // Check for WEAPON ATTACK +;1672: // ********************************************************* +;1673: +;1674: if(!delayed_fire) +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $642 +line 1675 +;1675: { +line 1677 +;1676: // Start with the current move, and cross index it with the current control states. +;1677: if ( pm->ps->saberMove > LS_NONE && pm->ps->saberMove < LS_MOVE_MAX ) +ADDRLP4 72 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +LEI4 $644 +ADDRLP4 72 +INDIRI4 +CNSTI4 118 +GEI4 $644 +line 1678 +;1678: { +line 1679 +;1679: curmove = pm->ps->saberMove; +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ASGNI4 +line 1680 +;1680: } +ADDRGP4 $645 +JUMPV +LABELV $644 +line 1682 +;1681: else +;1682: { +line 1683 +;1683: curmove = LS_READY; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 1684 +;1684: } +LABELV $645 +line 1686 +;1685: // check for fire +;1686: if ( !(pm->cmd.buttons & (BUTTON_ATTACK)) ) +ADDRGP4 pm +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $646 +line 1687 +;1687: { +line 1688 +;1688: if (pm->ps->weaponTime != 0) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $648 +line 1689 +;1689: {//Still firing +line 1690 +;1690: pm->ps->weaponstate = WEAPON_FIRING; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 3 +ASGNI4 +line 1691 +;1691: } +ADDRGP4 $649 +JUMPV +LABELV $648 +line 1692 +;1692: else if ( pm->ps->weaponstate != WEAPON_READY ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 1693 +;1693: { +line 1694 +;1694: pm->ps->weaponstate = WEAPON_IDLE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 6 +ASGNI4 +line 1695 +;1695: } +LABELV $650 +LABELV $649 +line 1697 +;1696: //Check for finishing an anim if necc. +;1697: if ( curmove >= LS_S_TL2BR && curmove <= LS_S_T2B ) +ADDRLP4 76 +ADDRLP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 18 +LTI4 $652 +ADDRLP4 76 +INDIRI4 +CNSTI4 24 +GTI4 $652 +line 1698 +;1698: {//started a swing, must continue from here +line 1699 +;1699: newmove = LS_A_TL2BR + (curmove-LS_S_TL2BR); +ADDRLP4 8 +ADDRLP4 4 +INDIRI4 +CNSTI4 18 +SUBI4 +CNSTI4 4 +ADDI4 +ASGNI4 +line 1700 +;1700: } +ADDRGP4 $653 +JUMPV +LABELV $652 +line 1701 +;1701: else if ( curmove >= LS_A_TL2BR && curmove <= LS_A_T2B ) +ADDRLP4 80 +ADDRLP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 4 +LTI4 $654 +ADDRLP4 80 +INDIRI4 +CNSTI4 10 +GTI4 $654 +line 1702 +;1702: {//finished an attack, must continue from here +line 1703 +;1703: newmove = LS_R_TL2BR + (curmove-LS_A_TL2BR); +ADDRLP4 8 +ADDRLP4 4 +INDIRI4 +CNSTI4 4 +SUBI4 +CNSTI4 25 +ADDI4 +ASGNI4 +line 1704 +;1704: } +ADDRGP4 $655 +JUMPV +LABELV $654 +line 1705 +;1705: else if ( PM_SaberInTransition( curmove ) ) +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 84 +ADDRGP4 PM_SaberInTransition +CALLI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +EQI4 $656 +line 1706 +;1706: {//in a transition, must play sequential attack +line 1707 +;1707: newmove = saberMoveData[curmove].chain_attack; +ADDRLP4 8 +CNSTI4 40 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+32 +ADDP4 +INDIRI4 +ASGNI4 +line 1708 +;1708: } +ADDRGP4 $657 +JUMPV +LABELV $656 +line 1709 +;1709: else if ( PM_SaberInBounce( curmove ) ) +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 PM_SaberInBounce +CALLI4 +ASGNI4 +ADDRLP4 88 +INDIRI4 +CNSTI4 0 +EQI4 $659 +line 1710 +;1710: {//in a bounce +line 1711 +;1711: newmove = saberMoveData[curmove].chain_idle;//oops, not attacking, so don't chain +ADDRLP4 8 +CNSTI4 40 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+28 +ADDP4 +INDIRI4 +ASGNI4 +line 1712 +;1712: } +ADDRGP4 $660 +JUMPV +LABELV $659 +line 1714 +;1713: else +;1714: {//FIXME: what about returning from a parry? +line 1715 +;1715: PM_SetSaberMove( LS_READY ); +CNSTI4 1 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1716 +;1716: return; +ADDRGP4 $507 +JUMPV +LABELV $660 +LABELV $657 +LABELV $655 +LABELV $653 +line 1718 +;1717: } +;1718: } +LABELV $646 +line 1723 +;1719: +;1720: // *************************************************** +;1721: // Pressing attack, so we must look up the proper attack move. +;1722: +;1723: saberInAir = qtrue; +ADDRLP4 24 +CNSTI4 1 +ASGNI4 +line 1725 +;1724: +;1725: if ( pm->ps->weaponTime > 0 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $662 +line 1726 +;1726: { // Last attack is not yet complete. +line 1727 +;1727: pm->ps->weaponstate = WEAPON_FIRING; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 3 +ASGNI4 +line 1728 +;1728: return; +ADDRGP4 $507 +JUMPV +LABELV $662 +line 1731 +;1729: } +;1730: else +;1731: { +line 1732 +;1732: int both = qfalse; +ADDRLP4 76 +CNSTI4 0 +ASGNI4 +line 1734 +;1733: +;1734: if ( curmove >= LS_PARRY_UP && curmove <= LS_REFLECT_LL ) +ADDRLP4 80 +ADDRLP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 108 +LTI4 $664 +ADDRLP4 80 +INDIRI4 +CNSTI4 117 +GTI4 $664 +line 1735 +;1735: {//from a parry or deflection, can go directly into an attack (?) +line 1736 +;1736: switch ( saberMoveData[curmove].endQuad ) +ADDRLP4 84 +CNSTI4 40 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+12 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +LTI4 $666 +ADDRLP4 84 +INDIRI4 +CNSTI4 6 +GTI4 $666 +ADDRLP4 84 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $675 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $675 +address $673 +address $666 +address $671 +address $670 +address $672 +address $666 +address $674 +code +line 1737 +;1737: { +LABELV $670 +line 1739 +;1738: case Q_T: +;1739: newmove = LS_A_T2B; +ADDRLP4 8 +CNSTI4 10 +ASGNI4 +line 1740 +;1740: break; +ADDRGP4 $667 +JUMPV +LABELV $671 +line 1742 +;1741: case Q_TR: +;1742: newmove = LS_A_TL2BR; +ADDRLP4 8 +CNSTI4 4 +ASGNI4 +line 1743 +;1743: break; +ADDRGP4 $667 +JUMPV +LABELV $672 +line 1745 +;1744: case Q_TL: +;1745: newmove = LS_A_TR2BL; +ADDRLP4 8 +CNSTI4 9 +ASGNI4 +line 1746 +;1746: break; +ADDRGP4 $667 +JUMPV +LABELV $673 +line 1748 +;1747: case Q_BR: +;1748: newmove = LS_A_BR2TL; +ADDRLP4 8 +CNSTI4 7 +ASGNI4 +line 1749 +;1749: break; +ADDRGP4 $667 +JUMPV +LABELV $674 +line 1751 +;1750: case Q_BL: +;1751: newmove = LS_A_BL2TR; +ADDRLP4 8 +CNSTI4 6 +ASGNI4 +line 1752 +;1752: break; +LABELV $666 +LABELV $667 +line 1755 +;1753: //shouldn't be a parry that ends at L, R or B +;1754: } +;1755: } +LABELV $664 +line 1757 +;1756: +;1757: if ( newmove != LS_NONE ) +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $676 +line 1758 +;1758: {//have a valid, final LS_ move picked, so skip findingt he transition move and just get the anim +line 1759 +;1759: anim = saberMoveData[newmove].animToUse; +ADDRLP4 12 +CNSTI4 40 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+4 +ADDP4 +INDIRI4 +ASGNI4 +line 1760 +;1760: } +LABELV $676 +line 1763 +;1761: +;1762: //FIXME: diagonal dirs use the figure-eight attacks from ready pose? +;1763: if ( anim == -1 ) +ADDRLP4 12 +INDIRI4 +CNSTI4 -1 +NEI4 $679 +line 1764 +;1764: { +line 1766 +;1765: //FIXME: take FP_SABER_OFFENSE into account here somehow? +;1766: if ( PM_SaberInTransition( curmove ) ) +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 84 +ADDRGP4 PM_SaberInTransition +CALLI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +EQI4 $681 +line 1767 +;1767: {//in a transition, must play sequential attack +line 1768 +;1768: newmove = saberMoveData[curmove].chain_attack; +ADDRLP4 8 +CNSTI4 40 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+32 +ADDP4 +INDIRI4 +ASGNI4 +line 1769 +;1769: } +ADDRGP4 $682 +JUMPV +LABELV $681 +line 1770 +;1770: else if ( curmove >= LS_S_TL2BR && curmove <= LS_S_T2B ) +ADDRLP4 88 +ADDRLP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 88 +INDIRI4 +CNSTI4 18 +LTI4 $684 +ADDRLP4 88 +INDIRI4 +CNSTI4 24 +GTI4 $684 +line 1771 +;1771: {//started a swing, must continue from here +line 1772 +;1772: newmove = LS_A_TL2BR + (curmove-LS_S_TL2BR); +ADDRLP4 8 +ADDRLP4 4 +INDIRI4 +CNSTI4 18 +SUBI4 +CNSTI4 4 +ADDI4 +ASGNI4 +line 1773 +;1773: } +ADDRGP4 $685 +JUMPV +LABELV $684 +line 1774 +;1774: else if ( PM_SaberInBrokenParry( curmove ) ) +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 92 +ADDRGP4 PM_SaberInBrokenParry +CALLI4 +ASGNI4 +ADDRLP4 92 +INDIRI4 +CNSTI4 0 +EQI4 $686 +line 1775 +;1775: {//broken parries must always return to ready +line 1776 +;1776: newmove = LS_READY; +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +line 1777 +;1777: } +ADDRGP4 $687 +JUMPV +LABELV $686 +line 1779 +;1778: else//if ( pm->cmd.buttons&BUTTON_ATTACK && !(pm->ps->pm_flags&PMF_ATTACK_HELD) )//only do this if just pressed attack button? +;1779: {//get attack move from movement command +line 1780 +;1780: saberMoveName_t checkMove = PM_SaberAttackForMovement(curmove); +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 100 +ADDRGP4 PM_SaberAttackForMovement +CALLI4 +ASGNI4 +ADDRLP4 96 +ADDRLP4 100 +INDIRI4 +ASGNI4 +line 1781 +;1781: if (checkMove != -1) +ADDRLP4 96 +INDIRI4 +CNSTI4 -1 +EQI4 $688 +line 1782 +;1782: { +line 1783 +;1783: newmove = checkMove; +ADDRLP4 8 +ADDRLP4 96 +INDIRI4 +ASGNI4 +line 1784 +;1784: } +LABELV $688 +line 1786 +;1785: +;1786: if ( (PM_SaberInBounce( curmove )||PM_SaberInBrokenParry( curmove )) +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 104 +ADDRGP4 PM_SaberInBounce +CALLI4 +ASGNI4 +ADDRLP4 104 +INDIRI4 +CNSTI4 0 +NEI4 $694 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 108 +ADDRGP4 PM_SaberInBrokenParry +CALLI4 +ASGNI4 +ADDRLP4 108 +INDIRI4 +CNSTI4 0 +EQI4 $690 +LABELV $694 +ADDRLP4 112 +CNSTI4 40 +ASGNI4 +ADDRLP4 112 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+8 +ADDP4 +INDIRI4 +ADDRLP4 112 +INDIRI4 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+12 +ADDP4 +INDIRI4 +NEI4 $690 +line 1788 +;1787: && saberMoveData[newmove].startQuad == saberMoveData[curmove].endQuad ) +;1788: {//this attack would be a repeat of the last (which was blocked), so don't actually use it, use the default chain attack for this bounce +line 1789 +;1789: newmove = saberMoveData[curmove].chain_attack; +ADDRLP4 8 +CNSTI4 40 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+32 +ADDP4 +INDIRI4 +ASGNI4 +line 1790 +;1790: } +LABELV $690 +line 1792 +;1791: +;1792: if ( PM_SaberKataDone(curmove, newmove) ) +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 116 +ADDRGP4 PM_SaberKataDone +CALLI4 +ASGNI4 +ADDRLP4 116 +INDIRI4 +CNSTI4 0 +EQI4 $696 +line 1793 +;1793: {//we came from a bounce and cannot chain to another attack because our kata is done +line 1794 +;1794: newmove = saberMoveData[curmove].chain_idle; +ADDRLP4 8 +CNSTI4 40 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+28 +ADDP4 +INDIRI4 +ASGNI4 +line 1795 +;1795: } +LABELV $696 +line 1796 +;1796: } +LABELV $687 +LABELV $685 +LABELV $682 +line 1798 +;1797: +;1798: if ( newmove != LS_NONE ) +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $699 +line 1799 +;1799: { +line 1801 +;1800: //Now get the proper transition move +;1801: newmove = PM_SaberAnimTransitionAnim( curmove, newmove ); +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 96 +ADDRGP4 PM_SaberAnimTransitionAnim +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 96 +INDIRI4 +ASGNI4 +line 1803 +;1802: +;1803: assert( bgGlobalAnimations[saberMoveData[newmove].animToUse].firstFrame != 0 || +line 1806 +;1804: bgGlobalAnimations[saberMoveData[newmove].animToUse].numFrames != 0); +;1805: +;1806: anim = saberMoveData[newmove].animToUse; +ADDRLP4 12 +CNSTI4 40 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+4 +ADDP4 +INDIRI4 +ASGNI4 +line 1807 +;1807: } +LABELV $699 +line 1808 +;1808: } +LABELV $679 +line 1810 +;1809: +;1810: if (anim == -1) +ADDRLP4 12 +INDIRI4 +CNSTI4 -1 +NEI4 $702 +line 1811 +;1811: {//not side-stepping, pick neutral anim +line 1813 +;1812: // Add randomness for prototype? +;1813: newmove = saberMoveData[curmove].chain_attack; +ADDRLP4 8 +CNSTI4 40 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+32 +ADDP4 +INDIRI4 +ASGNI4 +line 1815 +;1814: +;1815: anim= saberMoveData[newmove].animToUse; +ADDRLP4 12 +CNSTI4 40 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+4 +ADDP4 +INDIRI4 +ASGNI4 +line 1817 +;1816: +;1817: if ( !pm->cmd.forwardmove && !pm->cmd.rightmove && pm->cmd.upmove >= 0 && pm->ps->groundEntityNum != ENTITYNUM_NONE ) +ADDRLP4 84 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 88 +CNSTI4 0 +ASGNI4 +ADDRLP4 84 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 88 +INDIRI4 +NEI4 $706 +ADDRLP4 84 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 88 +INDIRI4 +NEI4 $706 +ADDRLP4 84 +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 88 +INDIRI4 +LTI4 $706 +ADDRLP4 84 +INDIRP4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +EQI4 $706 +line 1818 +;1818: {//not moving at all, so set the anim on entire body +line 1819 +;1819: both = qtrue; +ADDRLP4 76 +CNSTI4 1 +ASGNI4 +line 1820 +;1820: } +LABELV $706 +line 1822 +;1821: +;1822: } +LABELV $702 +line 1824 +;1823: +;1824: if ( anim == -1) +ADDRLP4 12 +INDIRI4 +CNSTI4 -1 +NEI4 $708 +line 1825 +;1825: { +line 1826 +;1826: if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_WALK1 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 822 +NEI4 $710 +line 1827 +;1827: { +line 1828 +;1828: anim = BOTH_WALK1; +ADDRLP4 12 +CNSTI4 822 +ASGNI4 +line 1829 +;1829: } +ADDRGP4 $711 +JUMPV +LABELV $710 +line 1830 +;1830: else if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN2 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 836 +NEI4 $712 +line 1831 +;1831: { +line 1832 +;1832: anim = BOTH_RUN2; +ADDRLP4 12 +CNSTI4 836 +ASGNI4 +line 1833 +;1833: } +ADDRGP4 $713 +JUMPV +LABELV $712 +line 1834 +;1834: else if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_WALK2 ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 823 +NEI4 $714 +line 1835 +;1835: { +line 1836 +;1836: anim = BOTH_WALK2; +ADDRLP4 12 +CNSTI4 823 +ASGNI4 +line 1837 +;1837: } +ADDRGP4 $715 +JUMPV +LABELV $714 +line 1839 +;1838: else +;1839: { +line 1840 +;1840: anim = PM_GetSaberStance(); +ADDRLP4 84 +ADDRGP4 PM_GetSaberStance +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 84 +INDIRI4 +ASGNI4 +line 1841 +;1841: } +LABELV $715 +LABELV $713 +LABELV $711 +line 1843 +;1842: +;1843: if (anim == BOTH_RUN2 && !pm->cmd.forwardmove && !pm->cmd.rightmove) +ADDRLP4 12 +INDIRI4 +CNSTI4 836 +NEI4 $716 +ADDRLP4 84 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 88 +CNSTI4 0 +ASGNI4 +ADDRLP4 84 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 88 +INDIRI4 +NEI4 $716 +ADDRLP4 84 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 88 +INDIRI4 +NEI4 $716 +line 1844 +;1844: { //semi-hacky (if not moving on x-y and still playing the running anim, force the player out of it) +line 1845 +;1845: anim = PM_GetSaberStance(); +ADDRLP4 92 +ADDRGP4 PM_GetSaberStance +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 92 +INDIRI4 +ASGNI4 +line 1846 +;1846: } +LABELV $716 +line 1847 +;1847: newmove = LS_READY; +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +line 1848 +;1848: } +LABELV $708 +line 1850 +;1849: +;1850: if ( !pm->ps->saberActive ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 508 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $718 +line 1851 +;1851: {//turn on the saber if it's not on +line 1852 +;1852: pm->ps->saberActive = qtrue; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 508 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1853 +;1853: } +LABELV $718 +line 1855 +;1854: +;1855: PM_SetSaberMove( newmove ); +ADDRLP4 8 +INDIRI4 +CVII2 4 +CVII4 2 +ARGI4 +ADDRGP4 PM_SetSaberMove +CALLV +pop +line 1857 +;1856: +;1857: if ( both ) +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +EQI4 $720 +line 1858 +;1858: { +line 1859 +;1859: PM_SetAnim(SETANIM_LEGS,anim,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); +CNSTI4 2 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1860 +;1860: } +LABELV $720 +line 1863 +;1861: +;1862: //don't fire again until anim is done +;1863: pm->ps->weaponTime = pm->ps->torsoTimer; +ADDRLP4 84 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +ASGNI4 +line 1864 +;1864: } +line 1865 +;1865: } +LABELV $642 +line 1871 +;1866: +;1867: // ********************************************************* +;1868: // WEAPON_FIRING +;1869: // ********************************************************* +;1870: +;1871: pm->ps->weaponstate = WEAPON_FIRING; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 3 +ASGNI4 +line 1873 +;1872: +;1873: amount = weaponData[pm->ps->weapon].energyPerShot; +ADDRLP4 28 +CNSTI4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+8 +ADDP4 +INDIRI4 +ASGNI4 +line 1875 +;1874: +;1875: addTime = pm->ps->weaponTime; +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +ASGNI4 +line 1877 +;1876: +;1877: pm->ps->saberAttackSequence = pm->ps->torsoAnim; +ADDRLP4 72 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 744 +ADDP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ASGNI4 +line 1878 +;1878: if ( !addTime ) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $723 +line 1879 +;1879: { +line 1880 +;1880: addTime = weaponData[pm->ps->weapon].fireTime; +ADDRLP4 0 +CNSTI4 56 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData+12 +ADDP4 +INDIRI4 +ASGNI4 +line 1881 +;1881: } +LABELV $723 +line 1882 +;1882: pm->ps->weaponTime = addTime; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 1883 +;1883:} +LABELV $507 +endproc PM_WeaponLightsaber 120 16 +export PM_SetSaberMove +proc PM_SetSaberMove 100 16 +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +CVII2 4 +ASGNI2 +line 1886 +;1884: +;1885:void PM_SetSaberMove(short newMove) +;1886:{ +line 1887 +;1887: unsigned int setflags = saberMoveData[newMove].animSetFlags; +ADDRLP4 8 +CNSTI4 40 +ADDRFP4 0 +INDIRI2 +CVII4 2 +MULI4 +ADDRGP4 saberMoveData+16 +ADDP4 +INDIRU4 +ASGNU4 +line 1888 +;1888: int anim = saberMoveData[newMove].animToUse; +ADDRLP4 0 +CNSTI4 40 +ADDRFP4 0 +INDIRI2 +CVII4 2 +MULI4 +ADDRGP4 saberMoveData+4 +ADDP4 +INDIRI4 +ASGNI4 +line 1889 +;1889: int parts = SETANIM_TORSO; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 1891 +;1890: +;1891: if ( newMove == LS_READY || newMove == LS_A_FLIP_STAB || newMove == LS_A_FLIP_SLASH ) +ADDRLP4 12 +ADDRFP4 0 +INDIRI2 +CVII4 2 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +EQI4 $732 +ADDRLP4 12 +INDIRI4 +CNSTI4 16 +EQI4 $732 +ADDRLP4 12 +INDIRI4 +CNSTI4 17 +NEI4 $729 +LABELV $732 +line 1892 +;1892: {//finished with a kata (or in a special move) reset attack counter +line 1893 +;1893: pm->ps->saberAttackChainCount = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1308 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1894 +;1894: } +ADDRGP4 $730 +JUMPV +LABELV $729 +line 1895 +;1895: else if ( BG_SaberInAttack( newMove ) ) +ADDRFP4 0 +INDIRI2 +CVII4 2 +ARGI4 +ADDRLP4 16 +ADDRGP4 BG_SaberInAttack +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $733 +line 1896 +;1896: {//continuing with a kata, increment attack counter +line 1897 +;1897: pm->ps->saberAttackChainCount++; +ADDRLP4 20 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1308 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1898 +;1898: } +LABELV $733 +LABELV $730 +line 1900 +;1899: +;1900: if (pm->ps->saberAttackChainCount > 16) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRI4 +CNSTI4 16 +LEI4 $735 +line 1901 +;1901: { //for the sake of being able to send the value over the net within a reasonable bit count +line 1902 +;1902: pm->ps->saberAttackChainCount = 16; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1308 +ADDP4 +CNSTI4 16 +ASGNI4 +line 1903 +;1903: } +LABELV $735 +line 1905 +;1904: +;1905: if ( pm->ps->fd.saberAnimLevel > FORCE_LEVEL_1 && +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +CNSTI4 1 +LEI4 $737 +ADDRFP4 0 +INDIRI2 +CVII4 2 +ARGI4 +ADDRLP4 20 +ADDRGP4 BG_SaberInIdle +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $737 +ADDRFP4 0 +INDIRI2 +CVII4 2 +ARGI4 +ADDRLP4 24 +ADDRGP4 PM_SaberInParry +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +NEI4 $737 +ADDRFP4 0 +INDIRI2 +CVII4 2 +ARGI4 +ADDRLP4 28 +ADDRGP4 PM_SaberInKnockaway +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +NEI4 $737 +ADDRFP4 0 +INDIRI2 +CVII4 2 +ARGI4 +ADDRLP4 32 +ADDRGP4 PM_SaberInBrokenParry +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +NEI4 $737 +ADDRFP4 0 +INDIRI2 +CVII4 2 +ARGI4 +ADDRLP4 36 +ADDRGP4 PM_SaberInReflect +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +NEI4 $737 +ADDRFP4 0 +INDIRI2 +CVII4 2 +ARGI4 +ADDRLP4 40 +ADDRGP4 BG_SaberInSpecial +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +NEI4 $737 +line 1907 +;1906: !BG_SaberInIdle( newMove ) && !PM_SaberInParry( newMove ) && !PM_SaberInKnockaway( newMove ) && !PM_SaberInBrokenParry( newMove ) && !PM_SaberInReflect( newMove ) && !BG_SaberInSpecial(newMove)) +;1907: {//readies, parries and reflections have only 1 level +line 1909 +;1908: //increment the anim to the next level of saber anims +;1909: anim += (pm->ps->fd.saberAnimLevel-FORCE_LEVEL_1) * SABER_ANIM_GROUP_SIZE; +ADDRLP4 44 +CNSTI4 77 +ASGNI4 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 44 +INDIRI4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1228 +ADDP4 +INDIRI4 +MULI4 +ADDRLP4 44 +INDIRI4 +SUBI4 +ADDI4 +ASGNI4 +line 1910 +;1910: } +LABELV $737 +line 1913 +;1911: +;1912: // If the move does the same animation as the last one, we need to force a restart... +;1913: if ( saberMoveData[pm->ps->saberMove].animToUse == anim && newMove > LS_PUTAWAY) +CNSTI4 40 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +NEI4 $739 +ADDRFP4 0 +INDIRI2 +CVII4 2 +CNSTI4 3 +LEI4 $739 +line 1914 +;1914: { +line 1915 +;1915: setflags |= SETANIM_FLAG_RESTART; +ADDRLP4 8 +ADDRLP4 8 +INDIRU4 +CNSTU4 4 +BORU4 +ASGNU4 +line 1916 +;1916: } +LABELV $739 +line 1919 +;1917: +;1918: //saber torso anims should always be highest priority (4/12/02 - for special anims only) +;1919: if ( newMove == LS_A_LUNGE +ADDRLP4 44 +ADDRFP4 0 +INDIRI2 +CVII4 2 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 14 +EQI4 $749 +ADDRLP4 44 +INDIRI4 +CNSTI4 15 +EQI4 $749 +ADDRLP4 44 +INDIRI4 +CNSTI4 11 +EQI4 $749 +ADDRLP4 44 +INDIRI4 +CNSTI4 12 +EQI4 $749 +ADDRLP4 44 +INDIRI4 +CNSTI4 13 +EQI4 $749 +ADDRLP4 44 +INDIRI4 +CNSTI4 16 +EQI4 $749 +ADDRLP4 44 +INDIRI4 +CNSTI4 17 +NEI4 $742 +LABELV $749 +line 1926 +;1920: || newMove == LS_A_JUMP_T__B_ +;1921: || newMove == LS_A_BACKSTAB +;1922: || newMove == LS_A_BACK +;1923: || newMove == LS_A_BACK_CR +;1924: || newMove == LS_A_FLIP_STAB +;1925: || newMove == LS_A_FLIP_SLASH ) +;1926: { +line 1927 +;1927: setflags |= SETANIM_FLAG_OVERRIDE; +ADDRLP4 8 +ADDRLP4 8 +INDIRU4 +CNSTU4 1 +BORU4 +ASGNU4 +line 1928 +;1928: } +LABELV $742 +line 1930 +;1929: +;1930: if ( BG_InSaberStandAnim(anim) || anim == BOTH_STAND1 ) +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 48 +ADDRGP4 BG_InSaberStandAnim +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +NEI4 $752 +ADDRLP4 0 +INDIRI4 +CNSTI4 571 +NEI4 $750 +LABELV $752 +line 1931 +;1931: { +line 1932 +;1932: anim = (pm->ps->legsAnim & ~ANIM_TOGGLEBIT); +ADDRLP4 0 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 1934 +;1933: +;1934: if ((anim >= BOTH_STAND1 && anim <= BOTH_STAND4TOATTACK2) || +ADDRLP4 0 +INDIRI4 +CNSTI4 571 +LTI4 $756 +ADDRLP4 0 +INDIRI4 +CNSTI4 592 +LEI4 $755 +LABELV $756 +ADDRLP4 0 +INDIRI4 +CNSTI4 1091 +LTI4 $753 +ADDRLP4 0 +INDIRI4 +CNSTI4 1122 +GTI4 $753 +LABELV $755 +line 1936 +;1935: (anim >= TORSO_DROPWEAP1 && anim <= TORSO_WEAPONIDLE12)) +;1936: { //If standing then use the special saber stand anim +line 1937 +;1937: anim = PM_GetSaberStance(); +ADDRLP4 60 +ADDRGP4 PM_GetSaberStance +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 60 +INDIRI4 +ASGNI4 +line 1938 +;1938: } +LABELV $753 +line 1940 +;1939: +;1940: if (pm->ps->pm_flags & PMF_DUCKED) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $757 +line 1941 +;1941: { //Playing torso walk anims while crouched makes you look like a monkey +line 1942 +;1942: anim = PM_GetSaberStance(); +ADDRLP4 60 +ADDRGP4 PM_GetSaberStance +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 60 +INDIRI4 +ASGNI4 +line 1943 +;1943: } +LABELV $757 +line 1945 +;1944: +;1945: if (anim == BOTH_WALKBACK1 || anim == BOTH_WALKBACK2) +ADDRLP4 0 +INDIRI4 +CNSTI4 852 +EQI4 $761 +ADDRLP4 0 +INDIRI4 +CNSTI4 853 +NEI4 $759 +LABELV $761 +line 1946 +;1946: { //normal stance when walking backward so saber doesn't look like it's cutting through leg +line 1947 +;1947: anim = PM_GetSaberStance(); +ADDRLP4 64 +ADDRGP4 PM_GetSaberStance +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 64 +INDIRI4 +ASGNI4 +line 1948 +;1948: } +LABELV $759 +line 1950 +;1949: +;1950: parts = SETANIM_TORSO; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 1951 +;1951: } +LABELV $750 +line 1953 +;1952: +;1953: if ( newMove == LS_A_LUNGE +ADDRLP4 52 +ADDRFP4 0 +INDIRI2 +CVII4 2 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 14 +EQI4 $769 +ADDRLP4 52 +INDIRI4 +CNSTI4 15 +EQI4 $769 +ADDRLP4 52 +INDIRI4 +CNSTI4 11 +EQI4 $769 +ADDRLP4 52 +INDIRI4 +CNSTI4 12 +EQI4 $769 +ADDRLP4 52 +INDIRI4 +CNSTI4 13 +EQI4 $769 +ADDRLP4 52 +INDIRI4 +CNSTI4 16 +EQI4 $769 +ADDRLP4 52 +INDIRI4 +CNSTI4 17 +NEI4 $762 +LABELV $769 +line 1960 +;1954: || newMove == LS_A_JUMP_T__B_ +;1955: || newMove == LS_A_BACKSTAB +;1956: || newMove == LS_A_BACK +;1957: || newMove == LS_A_BACK_CR +;1958: || newMove == LS_A_FLIP_STAB +;1959: || newMove == LS_A_FLIP_SLASH ) +;1960: { +line 1961 +;1961: parts = SETANIM_BOTH; +ADDRLP4 4 +CNSTI4 3 +ASGNI4 +line 1962 +;1962: } +ADDRGP4 $763 +JUMPV +LABELV $762 +line 1963 +;1963: else if ( BG_SpinningSaberAnim( anim ) ) +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 56 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $770 +line 1964 +;1964: {//spins must be played on entire body +line 1965 +;1965: parts = SETANIM_BOTH; +ADDRLP4 4 +CNSTI4 3 +ASGNI4 +line 1966 +;1966: } +ADDRGP4 $771 +JUMPV +LABELV $770 +line 1967 +;1967: else if ( (!pm->cmd.forwardmove&&!pm->cmd.rightmove&&!pm->cmd.upmove)) +ADDRLP4 60 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 64 +CNSTI4 0 +ASGNI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 64 +INDIRI4 +NEI4 $772 +ADDRLP4 60 +INDIRP4 +CNSTI4 29 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 64 +INDIRI4 +NEI4 $772 +ADDRLP4 60 +INDIRP4 +CNSTI4 30 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 64 +INDIRI4 +NEI4 $772 +line 1968 +;1968: {//not trying to run, duck or jump +line 1969 +;1969: if ( !BG_FlippingAnim( pm->ps->legsAnim ) && +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 68 +ADDRGP4 BG_FlippingAnim +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +NEI4 $774 +ADDRLP4 72 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ARGP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 BG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +NEI4 $774 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 80 +ADDRGP4 PM_InKnockDown +CALLI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 0 +NEI4 $774 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 84 +ADDRGP4 PM_JumpingAnim +CALLI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +NEI4 $774 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 88 +INDIRI4 +CNSTI4 0 +NEI4 $774 +ADDRLP4 92 +ADDRGP4 PM_GetSaberStance +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 92 +INDIRI4 +EQI4 $774 +ADDRLP4 96 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 1023 +EQI4 $774 +ADDRLP4 96 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $774 +line 1977 +;1970: !BG_InRoll( pm->ps, pm->ps->legsAnim ) && +;1971: !PM_InKnockDown( pm->ps ) && +;1972: !PM_JumpingAnim( pm->ps->legsAnim ) && +;1973: !BG_InSpecialJump( pm->ps->legsAnim ) && +;1974: anim != PM_GetSaberStance() && +;1975: pm->ps->groundEntityNum != ENTITYNUM_NONE && +;1976: !(pm->ps->pm_flags & PMF_DUCKED)) +;1977: { +line 1978 +;1978: parts = SETANIM_BOTH; +ADDRLP4 4 +CNSTI4 3 +ASGNI4 +line 1979 +;1979: } +LABELV $774 +line 1980 +;1980: } +LABELV $772 +LABELV $771 +LABELV $763 +line 1982 +;1981: +;1982: PM_SetAnim(parts, anim, setflags, saberMoveData[newMove].blendTime); +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRU4 +CVUI4 4 +ARGI4 +CNSTI4 40 +ADDRFP4 0 +INDIRI2 +CVII4 2 +MULI4 +ADDRGP4 saberMoveData+20 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 PM_SetAnim +CALLV +pop +line 1984 +;1983: +;1984: if ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == anim ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ADDRLP4 0 +INDIRI4 +NEI4 $777 +line 1985 +;1985: {//successfully changed anims +line 1988 +;1986: //special check for *starting* a saber swing +;1987: //playing at attack +;1988: if ( BG_SaberInAttack( newMove ) || BG_SaberInSpecialAttack( anim ) ) +ADDRFP4 0 +INDIRI2 +CVII4 2 +ARGI4 +ADDRLP4 68 +ADDRGP4 BG_SaberInAttack +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +NEI4 $781 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 72 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +EQI4 $779 +LABELV $781 +line 1989 +;1989: { +line 1990 +;1990: if ( pm->ps->saberMove != newMove ) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRI2 +CVII4 2 +EQI4 $782 +line 1991 +;1991: {//wasn't playing that attack before +line 1992 +;1992: PM_AddEvent(EV_SABER_ATTACK); +CNSTI4 26 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 1993 +;1993: } +LABELV $782 +line 1994 +;1994: } +LABELV $779 +line 1996 +;1995: +;1996: pm->ps->saberMove = newMove; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 512 +ADDP4 +ADDRFP4 0 +INDIRI2 +CVII4 2 +ASGNI4 +line 1997 +;1997: pm->ps->saberBlocking = saberMoveData[newMove].blocking; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 516 +ADDP4 +CNSTI4 40 +ADDRFP4 0 +INDIRI2 +CVII4 2 +MULI4 +ADDRGP4 saberMoveData+24 +ADDP4 +INDIRI4 +ASGNI4 +line 1999 +;1998: +;1999: pm->ps->torsoAnim = anim; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 100 +ADDP4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 2001 +;2000: +;2001: if (pm->ps->weaponTime <= 0) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $785 +line 2002 +;2002: { +line 2003 +;2003: pm->ps->saberBlocked = BLOCKED_NONE; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 520 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2004 +;2004: } +LABELV $785 +line 2005 +;2005: } +LABELV $777 +line 2006 +;2006:} +LABELV $726 +endproc PM_SetSaberMove 100 16 +import ValidAnimFileIndex +import PM_SetForceJumpZStart +import PM_SetAnim +import PM_FinishWeaponChange +import PM_BeginWeaponChange +import PM_ForceLegsAnim +import PM_ContinueLegsAnim +import PM_StartTorsoAnim +import BG_CycleInven +import PM_StepSlideMove +import PM_SlideMove +import PM_AddEvent +import PM_AddTouchEnt +import PM_ClipVelocity +import PM_GetSaberStance +import PM_AnimLength +import PM_InRollComplete +import PM_InOnGroundAnim +import PM_SpinningAnim +import PM_LandingAnim +import PM_JumpingAnim +import PM_PainAnim +import PM_InKnockDown +import PM_InSaberAnim +import PM_SaberInStart +import PM_SaberInReflect +import PM_SaberInKnockaway +import PM_SaberInParry +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import forcePowerNeeded +import c_pmove +import pm_flightfriction +import pm_waterfriction +import pm_friction +import pm_flyaccelerate +import pm_wateraccelerate +import pm_airaccelerate +import pm_accelerate +import pm_wadeScale +import pm_swimScale +import pm_duckScale +import pm_stopspeed +import pml +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $212 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $211 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 76 +char 1 82 +char 1 0 +align 1 +LABELV $210 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 85 +char 1 76 +char 1 0 +align 1 +LABELV $209 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 85 +char 1 82 +char 1 0 +align 1 +LABELV $208 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 84 +char 1 111 +char 1 112 +char 1 0 +align 1 +LABELV $207 +char 1 80 +char 1 97 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $206 +char 1 80 +char 1 97 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 76 +char 1 82 +char 1 0 +align 1 +LABELV $205 +char 1 80 +char 1 97 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 85 +char 1 76 +char 1 0 +align 1 +LABELV $204 +char 1 80 +char 1 97 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 85 +char 1 82 +char 1 0 +align 1 +LABELV $203 +char 1 80 +char 1 97 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 84 +char 1 111 +char 1 112 +char 1 0 +align 1 +LABELV $202 +char 1 75 +char 1 110 +char 1 111 +char 1 99 +char 1 107 +char 1 32 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $201 +char 1 75 +char 1 110 +char 1 111 +char 1 99 +char 1 107 +char 1 32 +char 1 76 +char 1 82 +char 1 0 +align 1 +LABELV $200 +char 1 75 +char 1 110 +char 1 111 +char 1 99 +char 1 107 +char 1 32 +char 1 85 +char 1 76 +char 1 0 +align 1 +LABELV $199 +char 1 75 +char 1 110 +char 1 111 +char 1 99 +char 1 107 +char 1 32 +char 1 85 +char 1 82 +char 1 0 +align 1 +LABELV $198 +char 1 75 +char 1 110 +char 1 111 +char 1 99 +char 1 107 +char 1 32 +char 1 84 +char 1 111 +char 1 112 +char 1 0 +align 1 +LABELV $197 +char 1 66 +char 1 80 +char 1 97 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $196 +char 1 66 +char 1 80 +char 1 97 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 66 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $195 +char 1 66 +char 1 80 +char 1 97 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 76 +char 1 82 +char 1 0 +align 1 +LABELV $194 +char 1 66 +char 1 80 +char 1 97 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 85 +char 1 76 +char 1 0 +align 1 +LABELV $193 +char 1 66 +char 1 80 +char 1 97 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 85 +char 1 82 +char 1 0 +align 1 +LABELV $192 +char 1 66 +char 1 80 +char 1 97 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 84 +char 1 111 +char 1 112 +char 1 0 +align 1 +LABELV $191 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 66 +char 1 0 +align 1 +LABELV $190 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $189 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 76 +char 1 0 +align 1 +LABELV $188 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $187 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 84 +char 1 0 +align 1 +LABELV $186 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $185 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 82 +char 1 0 +align 1 +LABELV $184 +char 1 82 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $183 +char 1 68 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 66 +char 1 0 +align 1 +LABELV $182 +char 1 68 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $181 +char 1 68 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 76 +char 1 0 +align 1 +LABELV $180 +char 1 68 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $179 +char 1 68 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 84 +char 1 0 +align 1 +LABELV $178 +char 1 68 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $177 +char 1 68 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 82 +char 1 0 +align 1 +LABELV $176 +char 1 68 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 32 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $175 +char 1 66 +char 1 111 +char 1 117 +char 1 110 +char 1 99 +char 1 101 +char 1 32 +char 1 66 +char 1 76 +char 1 0 +align 1 +LABELV $174 +char 1 66 +char 1 111 +char 1 117 +char 1 110 +char 1 99 +char 1 101 +char 1 32 +char 1 76 +char 1 0 +align 1 +LABELV $173 +char 1 66 +char 1 111 +char 1 117 +char 1 110 +char 1 99 +char 1 101 +char 1 32 +char 1 84 +char 1 76 +char 1 0 +align 1 +LABELV $172 +char 1 66 +char 1 111 +char 1 117 +char 1 110 +char 1 99 +char 1 101 +char 1 32 +char 1 84 +char 1 0 +align 1 +LABELV $171 +char 1 66 +char 1 111 +char 1 117 +char 1 110 +char 1 99 +char 1 101 +char 1 32 +char 1 84 +char 1 82 +char 1 0 +align 1 +LABELV $170 +char 1 66 +char 1 111 +char 1 117 +char 1 110 +char 1 99 +char 1 101 +char 1 32 +char 1 82 +char 1 0 +align 1 +LABELV $169 +char 1 66 +char 1 111 +char 1 117 +char 1 110 +char 1 99 +char 1 101 +char 1 32 +char 1 66 +char 1 82 +char 1 0 +align 1 +LABELV $168 +char 1 66 +char 1 76 +char 1 50 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $167 +char 1 66 +char 1 76 +char 1 50 +char 1 84 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $166 +char 1 66 +char 1 76 +char 1 50 +char 1 84 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $165 +char 1 66 +char 1 76 +char 1 50 +char 1 84 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $164 +char 1 66 +char 1 76 +char 1 50 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $163 +char 1 66 +char 1 76 +char 1 50 +char 1 66 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $162 +char 1 76 +char 1 50 +char 1 66 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $161 +char 1 76 +char 1 50 +char 1 84 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $160 +char 1 76 +char 1 50 +char 1 84 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $159 +char 1 76 +char 1 50 +char 1 84 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $158 +char 1 76 +char 1 50 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $157 +char 1 76 +char 1 50 +char 1 66 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $156 +char 1 84 +char 1 76 +char 1 50 +char 1 66 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $155 +char 1 84 +char 1 76 +char 1 50 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $154 +char 1 84 +char 1 76 +char 1 50 +char 1 84 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $153 +char 1 84 +char 1 76 +char 1 50 +char 1 84 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $152 +char 1 84 +char 1 76 +char 1 50 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $151 +char 1 84 +char 1 76 +char 1 50 +char 1 66 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $150 +char 1 84 +char 1 50 +char 1 66 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $149 +char 1 84 +char 1 50 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $148 +char 1 84 +char 1 50 +char 1 84 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $147 +char 1 84 +char 1 50 +char 1 84 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $146 +char 1 84 +char 1 50 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $145 +char 1 84 +char 1 50 +char 1 66 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $144 +char 1 84 +char 1 82 +char 1 50 +char 1 66 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $143 +char 1 84 +char 1 82 +char 1 50 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $142 +char 1 84 +char 1 82 +char 1 50 +char 1 84 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $141 +char 1 84 +char 1 82 +char 1 50 +char 1 84 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $140 +char 1 84 +char 1 82 +char 1 50 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $139 +char 1 84 +char 1 82 +char 1 50 +char 1 66 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $138 +char 1 82 +char 1 50 +char 1 66 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $137 +char 1 82 +char 1 50 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $136 +char 1 82 +char 1 50 +char 1 84 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $135 +char 1 82 +char 1 50 +char 1 84 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $134 +char 1 82 +char 1 50 +char 1 84 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $133 +char 1 82 +char 1 50 +char 1 66 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $132 +char 1 66 +char 1 82 +char 1 50 +char 1 66 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $131 +char 1 66 +char 1 82 +char 1 50 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $130 +char 1 66 +char 1 82 +char 1 50 +char 1 84 +char 1 76 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $129 +char 1 66 +char 1 82 +char 1 50 +char 1 84 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $128 +char 1 66 +char 1 82 +char 1 50 +char 1 84 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $127 +char 1 66 +char 1 82 +char 1 50 +char 1 82 +char 1 32 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $126 +char 1 84 +char 1 50 +char 1 66 +char 1 32 +char 1 82 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $125 +char 1 84 +char 1 82 +char 1 50 +char 1 66 +char 1 76 +char 1 32 +char 1 82 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $124 +char 1 82 +char 1 50 +char 1 76 +char 1 32 +char 1 82 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $123 +char 1 66 +char 1 82 +char 1 50 +char 1 84 +char 1 76 +char 1 32 +char 1 82 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $122 +char 1 66 +char 1 76 +char 1 50 +char 1 84 +char 1 82 +char 1 32 +char 1 82 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $121 +char 1 76 +char 1 50 +char 1 82 +char 1 32 +char 1 82 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $120 +char 1 84 +char 1 76 +char 1 50 +char 1 66 +char 1 82 +char 1 32 +char 1 82 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $119 +char 1 84 +char 1 50 +char 1 66 +char 1 32 +char 1 83 +char 1 116 +char 1 0 +align 1 +LABELV $118 +char 1 84 +char 1 82 +char 1 50 +char 1 66 +char 1 76 +char 1 32 +char 1 83 +char 1 116 +char 1 0 +align 1 +LABELV $117 +char 1 82 +char 1 50 +char 1 76 +char 1 32 +char 1 83 +char 1 116 +char 1 0 +align 1 +LABELV $116 +char 1 66 +char 1 82 +char 1 50 +char 1 84 +char 1 76 +char 1 32 +char 1 83 +char 1 116 +char 1 0 +align 1 +LABELV $115 +char 1 66 +char 1 76 +char 1 50 +char 1 84 +char 1 82 +char 1 32 +char 1 83 +char 1 116 +char 1 0 +align 1 +LABELV $114 +char 1 76 +char 1 50 +char 1 82 +char 1 32 +char 1 83 +char 1 116 +char 1 0 +align 1 +LABELV $113 +char 1 84 +char 1 76 +char 1 50 +char 1 66 +char 1 82 +char 1 32 +char 1 83 +char 1 116 +char 1 0 +align 1 +LABELV $112 +char 1 70 +char 1 108 +char 1 105 +char 1 112 +char 1 32 +char 1 83 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $111 +char 1 70 +char 1 108 +char 1 105 +char 1 112 +char 1 32 +char 1 83 +char 1 116 +char 1 97 +char 1 98 +char 1 0 +align 1 +LABELV $110 +char 1 74 +char 1 117 +char 1 109 +char 1 112 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $109 +char 1 76 +char 1 117 +char 1 110 +char 1 103 +char 1 101 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $108 +char 1 67 +char 1 82 +char 1 32 +char 1 66 +char 1 97 +char 1 99 +char 1 107 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $107 +char 1 66 +char 1 97 +char 1 99 +char 1 107 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $106 +char 1 66 +char 1 97 +char 1 99 +char 1 107 +char 1 32 +char 1 83 +char 1 116 +char 1 97 +char 1 98 +char 1 0 +align 1 +LABELV $105 +char 1 84 +char 1 50 +char 1 66 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $104 +char 1 84 +char 1 82 +char 1 50 +char 1 66 +char 1 76 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $103 +char 1 82 +char 1 50 +char 1 76 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $102 +char 1 66 +char 1 82 +char 1 50 +char 1 84 +char 1 76 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $101 +char 1 66 +char 1 76 +char 1 50 +char 1 84 +char 1 82 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $100 +char 1 76 +char 1 50 +char 1 82 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $99 +char 1 84 +char 1 76 +char 1 50 +char 1 66 +char 1 82 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $98 +char 1 80 +char 1 117 +char 1 116 +char 1 97 +char 1 119 +char 1 97 +char 1 121 +char 1 0 +align 1 +LABELV $97 +char 1 68 +char 1 114 +char 1 97 +char 1 119 +char 1 0 +align 1 +LABELV $96 +char 1 82 +char 1 101 +char 1 97 +char 1 100 +char 1 121 +char 1 0 +align 1 +LABELV $95 +char 1 78 +char 1 111 +char 1 110 +char 1 101 +char 1 0 diff --git a/code/cgame/vm/bg_slidemove.asm b/code/cgame/vm/bg_slidemove.asm new file mode 100644 index 0000000..6e98ce8 --- /dev/null +++ b/code/cgame/vm/bg_slidemove.asm @@ -0,0 +1,2886 @@ +export PM_SlideMove +code +proc PM_SlideMove 1332 28 +file "../../game/bg_slidemove.c" +line 25 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// bg_slidemove.c -- part of bg_pmove functionality +;4: +;5:#include "q_shared.h" +;6:#include "bg_public.h" +;7:#include "bg_local.h" +;8: +;9:/* +;10: +;11:input: origin, velocity, bounds, groundPlane, trace function +;12: +;13:output: origin, velocity, impacts, stairup boolean +;14: +;15:*/ +;16: +;17:/* +;18:================== +;19:PM_SlideMove +;20: +;21:Returns qtrue if the velocity was clipped in some way +;22:================== +;23:*/ +;24:#define MAX_CLIP_PLANES 5 +;25:qboolean PM_SlideMove( qboolean gravity ) { +line 41 +;26: int bumpcount, numbumps; +;27: vec3_t dir; +;28: float d; +;29: int numplanes; +;30: vec3_t planes[MAX_CLIP_PLANES]; +;31: vec3_t primal_velocity; +;32: vec3_t clipVelocity; +;33: int i, j, k; +;34: trace_t trace; +;35: vec3_t end; +;36: float time_left; +;37: float into; +;38: vec3_t endVelocity; +;39: vec3_t endClipVelocity; +;40: +;41: numbumps = 4; +ADDRLP4 1232 +CNSTI4 4 +ASGNI4 +line 43 +;42: +;43: VectorCopy (pm->ps->velocity, primal_velocity); +ADDRLP4 1236 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRB +ASGNB 12 +line 45 +;44: +;45: if ( gravity ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $66 +line 46 +;46: VectorCopy( pm->ps->velocity, endVelocity ); +ADDRLP4 116 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRB +ASGNB 12 +line 47 +;47: endVelocity[2] -= pm->ps->gravity * pml.frametime; +ADDRLP4 116+8 +ADDRLP4 116+8 +INDIRF4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRGP4 pml+36 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 48 +;48: pm->ps->velocity[2] = ( pm->ps->velocity[2] + endVelocity[2] ) * 0.5; +ADDRLP4 1248 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 1248 +INDIRP4 +CNSTF4 1056964608 +ADDRLP4 1248 +INDIRP4 +INDIRF4 +ADDRLP4 116+8 +INDIRF4 +ADDF4 +MULF4 +ASGNF4 +line 49 +;49: primal_velocity[2] = endVelocity[2]; +ADDRLP4 1236+8 +ADDRLP4 116+8 +INDIRF4 +ASGNF4 +line 50 +;50: if ( pml.groundPlane ) { +ADDRGP4 pml+48 +INDIRI4 +CNSTI4 0 +EQI4 $73 +line 52 +;51: // slide along the ground plane +;52: PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal, +ADDRLP4 1252 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1252 +INDIRP4 +ARGP4 +ADDRGP4 pml+52+24 +ARGP4 +ADDRLP4 1252 +INDIRP4 +ARGP4 +CNSTF4 1065361605 +ARGF4 +ADDRGP4 PM_ClipVelocity +CALLV +pop +line 54 +;53: pm->ps->velocity, OVERCLIP ); +;54: } +LABELV $73 +line 55 +;55: } +LABELV $66 +line 57 +;56: +;57: time_left = pml.frametime; +ADDRLP4 1212 +ADDRGP4 pml+36 +INDIRF4 +ASGNF4 +line 60 +;58: +;59: // never turn against the ground plane +;60: if ( pml.groundPlane ) { +ADDRGP4 pml+48 +INDIRI4 +CNSTI4 0 +EQI4 $79 +line 61 +;61: numplanes = 1; +ADDRLP4 96 +CNSTI4 1 +ASGNI4 +line 62 +;62: VectorCopy( pml.groundTrace.plane.normal, planes[0] ); +ADDRLP4 4 +ADDRGP4 pml+52+24 +INDIRB +ASGNB 12 +line 63 +;63: } else { +ADDRGP4 $80 +JUMPV +LABELV $79 +line 64 +;64: numplanes = 0; +ADDRLP4 96 +CNSTI4 0 +ASGNI4 +line 65 +;65: } +LABELV $80 +line 68 +;66: +;67: // never turn against original velocity +;68: VectorNormalize2( pm->ps->velocity, planes[numplanes] ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +CNSTI4 12 +ADDRLP4 96 +INDIRI4 +MULI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRGP4 VectorNormalize2 +CALLF4 +pop +line 69 +;69: numplanes++; +ADDRLP4 96 +ADDRLP4 96 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 71 +;70: +;71: for ( bumpcount=0 ; bumpcount < numbumps ; bumpcount++ ) { +ADDRLP4 1228 +CNSTI4 0 +ASGNI4 +ADDRGP4 $87 +JUMPV +LABELV $84 +line 74 +;72: +;73: // calculate position we are trying to move to +;74: VectorMA( pm->ps->origin, time_left, pm->ps->velocity, end ); +ADDRLP4 1248 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1252 +ADDRLP4 1248 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1216 +ADDRLP4 1252 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 1252 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 1212 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1260 +ADDRLP4 1248 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1216+4 +ADDRLP4 1260 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 1260 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 1212 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1264 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1216+8 +ADDRLP4 1264 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 1264 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ADDRLP4 1212 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 77 +;75: +;76: // see if we can make it there +;77: pm->trace ( &trace, pm->ps->origin, pm->mins, pm->maxs, end, pm->ps->clientNum, pm->tracemask); +ADDRLP4 128 +ARGP4 +ADDRLP4 1268 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1272 +ADDRLP4 1268 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1272 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 1268 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 1268 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 1216 +ARGP4 +ADDRLP4 1272 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1268 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1268 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 79 +;78: +;79: if (trace.allsolid) { +ADDRLP4 128 +INDIRI4 +CNSTI4 0 +EQI4 $90 +line 81 +;80: // entity is completely trapped in another solid +;81: pm->ps->velocity[2] = 0; // don't build up falling damage, but allow sideways acceleration +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 0 +ASGNF4 +line 82 +;82: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $65 +JUMPV +LABELV $90 +line 85 +;83: } +;84: +;85: if (trace.fraction > 0) { +ADDRLP4 128+8 +INDIRF4 +CNSTF4 0 +LEF4 $92 +line 87 +;86: // actually covered some distance +;87: VectorCopy (trace.endpos, pm->ps->origin); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 128+12 +INDIRB +ASGNB 12 +line 88 +;88: } +LABELV $92 +line 90 +;89: +;90: if (trace.fraction == 1) { +ADDRLP4 128+8 +INDIRF4 +CNSTF4 1065353216 +NEF4 $96 +line 91 +;91: break; // moved the entire distance +ADDRGP4 $86 +JUMPV +LABELV $96 +line 95 +;92: } +;93: +;94: // save entity for contact +;95: PM_AddTouchEnt( trace.entityNum ); +ADDRLP4 128+52 +INDIRI4 +ARGI4 +ADDRGP4 PM_AddTouchEnt +CALLV +pop +line 97 +;96: +;97: time_left -= time_left * trace.fraction; +ADDRLP4 1212 +ADDRLP4 1212 +INDIRF4 +ADDRLP4 1212 +INDIRF4 +ADDRLP4 128+8 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 99 +;98: +;99: if (numplanes >= MAX_CLIP_PLANES) { +ADDRLP4 96 +INDIRI4 +CNSTI4 5 +LTI4 $101 +line 101 +;100: // this shouldn't really happen +;101: VectorClear( pm->ps->velocity ); +ADDRLP4 1280 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1284 +CNSTF4 0 +ASGNF4 +ADDRLP4 1280 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 1284 +INDIRF4 +ASGNF4 +ADDRLP4 1280 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 1284 +INDIRF4 +ASGNF4 +ADDRLP4 1280 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 1284 +INDIRF4 +ASGNF4 +line 102 +;102: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $65 +JUMPV +LABELV $101 +line 110 +;103: } +;104: +;105: // +;106: // if this is the same plane we hit before, nudge velocity +;107: // out along it, which fixes some epsilon issues with +;108: // non-axial planes +;109: // +;110: for ( i = 0 ; i < numplanes ; i++ ) { +ADDRLP4 80 +CNSTI4 0 +ASGNI4 +ADDRGP4 $106 +JUMPV +LABELV $103 +line 111 +;111: if ( DotProduct( trace.plane.normal, planes[i] ) > 0.99 ) { +ADDRLP4 1280 +CNSTI4 12 +ADDRLP4 80 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 128+24 +INDIRF4 +ADDRLP4 1280 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 128+24+4 +INDIRF4 +ADDRLP4 1280 +INDIRI4 +ADDRLP4 4+4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 128+24+8 +INDIRF4 +ADDRLP4 1280 +INDIRI4 +ADDRLP4 4+8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 1065185444 +LEF4 $107 +line 112 +;112: VectorAdd( trace.plane.normal, pm->ps->velocity, pm->ps->velocity ); +ADDRLP4 1284 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1284 +INDIRP4 +ADDRLP4 128+24 +INDIRF4 +ADDRLP4 1284 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1288 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 1288 +INDIRP4 +ADDRLP4 128+24+4 +INDIRF4 +ADDRLP4 1288 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1292 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 1292 +INDIRP4 +ADDRLP4 128+24+8 +INDIRF4 +ADDRLP4 1292 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +line 113 +;113: break; +ADDRGP4 $105 +JUMPV +LABELV $107 +line 115 +;114: } +;115: } +LABELV $104 +line 110 +ADDRLP4 80 +ADDRLP4 80 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $106 +ADDRLP4 80 +INDIRI4 +ADDRLP4 96 +INDIRI4 +LTI4 $103 +LABELV $105 +line 116 +;116: if ( i < numplanes ) { +ADDRLP4 80 +INDIRI4 +ADDRLP4 96 +INDIRI4 +GEI4 $121 +line 117 +;117: continue; +ADDRGP4 $85 +JUMPV +LABELV $121 +line 119 +;118: } +;119: VectorCopy (trace.plane.normal, planes[numplanes]); +CNSTI4 12 +ADDRLP4 96 +INDIRI4 +MULI4 +ADDRLP4 4 +ADDP4 +ADDRLP4 128+24 +INDIRB +ASGNB 12 +line 120 +;120: numplanes++; +ADDRLP4 96 +ADDRLP4 96 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 127 +;121: +;122: // +;123: // modify velocity so it parallels all of the clip planes +;124: // +;125: +;126: // find a plane that it enters +;127: for ( i = 0 ; i < numplanes ; i++ ) { +ADDRLP4 80 +CNSTI4 0 +ASGNI4 +ADDRGP4 $127 +JUMPV +LABELV $124 +line 128 +;128: into = DotProduct( pm->ps->velocity, planes[i] ); +ADDRLP4 1280 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1284 +CNSTI4 12 +ADDRLP4 80 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 1208 +ADDRLP4 1280 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 1284 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 1280 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 1284 +INDIRI4 +ADDRLP4 4+4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 1280 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ADDRLP4 1284 +INDIRI4 +ADDRLP4 4+8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 129 +;129: if ( into >= 0.1 ) { +ADDRLP4 1208 +INDIRF4 +CNSTF4 1036831949 +LTF4 $130 +line 130 +;130: continue; // move doesn't interact with the plane +ADDRGP4 $125 +JUMPV +LABELV $130 +line 134 +;131: } +;132: +;133: // see how hard we are hitting things +;134: if ( -into > pml.impactSpeed ) { +ADDRLP4 1208 +INDIRF4 +NEGF4 +ADDRGP4 pml+1132 +INDIRF4 +LEF4 $132 +line 135 +;135: pml.impactSpeed = -into; +ADDRGP4 pml+1132 +ADDRLP4 1208 +INDIRF4 +NEGF4 +ASGNF4 +line 136 +;136: } +LABELV $132 +line 139 +;137: +;138: // slide along the plane +;139: PM_ClipVelocity (pm->ps->velocity, planes[i], clipVelocity, OVERCLIP ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +CNSTI4 12 +ADDRLP4 80 +INDIRI4 +MULI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRLP4 64 +ARGP4 +CNSTF4 1065361605 +ARGF4 +ADDRGP4 PM_ClipVelocity +CALLV +pop +line 142 +;140: +;141: // slide along the plane +;142: PM_ClipVelocity (endVelocity, planes[i], endClipVelocity, OVERCLIP ); +ADDRLP4 116 +ARGP4 +CNSTI4 12 +ADDRLP4 80 +INDIRI4 +MULI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRLP4 104 +ARGP4 +CNSTF4 1065361605 +ARGF4 +ADDRGP4 PM_ClipVelocity +CALLV +pop +line 145 +;143: +;144: // see if there is a second plane that the new move enters +;145: for ( j = 0 ; j < numplanes ; j++ ) { +ADDRLP4 76 +CNSTI4 0 +ASGNI4 +ADDRGP4 $139 +JUMPV +LABELV $136 +line 146 +;146: if ( j == i ) { +ADDRLP4 76 +INDIRI4 +ADDRLP4 80 +INDIRI4 +NEI4 $140 +line 147 +;147: continue; +ADDRGP4 $137 +JUMPV +LABELV $140 +line 149 +;148: } +;149: if ( DotProduct( clipVelocity, planes[j] ) >= 0.1 ) { +ADDRLP4 1288 +CNSTI4 12 +ADDRLP4 76 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 64 +INDIRF4 +ADDRLP4 1288 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 64+4 +INDIRF4 +ADDRLP4 1288 +INDIRI4 +ADDRLP4 4+4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 64+8 +INDIRF4 +ADDRLP4 1288 +INDIRI4 +ADDRLP4 4+8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 1036831949 +LTF4 $142 +line 150 +;150: continue; // move doesn't interact with the plane +ADDRGP4 $137 +JUMPV +LABELV $142 +line 154 +;151: } +;152: +;153: // try clipping the move to the plane +;154: PM_ClipVelocity( clipVelocity, planes[j], clipVelocity, OVERCLIP ); +ADDRLP4 64 +ARGP4 +CNSTI4 12 +ADDRLP4 76 +INDIRI4 +MULI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRLP4 64 +ARGP4 +CNSTF4 1065361605 +ARGF4 +ADDRGP4 PM_ClipVelocity +CALLV +pop +line 155 +;155: PM_ClipVelocity( endClipVelocity, planes[j], endClipVelocity, OVERCLIP ); +ADDRLP4 104 +ARGP4 +CNSTI4 12 +ADDRLP4 76 +INDIRI4 +MULI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRLP4 104 +ARGP4 +CNSTF4 1065361605 +ARGF4 +ADDRGP4 PM_ClipVelocity +CALLV +pop +line 158 +;156: +;157: // see if it goes back into the first clip plane +;158: if ( DotProduct( clipVelocity, planes[i] ) >= 0 ) { +ADDRLP4 1292 +CNSTI4 12 +ADDRLP4 80 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 64 +INDIRF4 +ADDRLP4 1292 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 64+4 +INDIRF4 +ADDRLP4 1292 +INDIRI4 +ADDRLP4 4+4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 64+8 +INDIRF4 +ADDRLP4 1292 +INDIRI4 +ADDRLP4 4+8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 0 +LTF4 $148 +line 159 +;159: continue; +ADDRGP4 $137 +JUMPV +LABELV $148 +line 163 +;160: } +;161: +;162: // slide the original velocity along the crease +;163: CrossProduct (planes[i], planes[j], dir); +ADDRLP4 1296 +CNSTI4 12 +ASGNI4 +ADDRLP4 1296 +INDIRI4 +ADDRLP4 80 +INDIRI4 +MULI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRLP4 1296 +INDIRI4 +ADDRLP4 76 +INDIRI4 +MULI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRLP4 84 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 164 +;164: VectorNormalize( dir ); +ADDRLP4 84 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 165 +;165: d = DotProduct( dir, pm->ps->velocity ); +ADDRLP4 1300 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 100 +ADDRLP4 84 +INDIRF4 +ADDRLP4 1300 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 84+4 +INDIRF4 +ADDRLP4 1300 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 84+8 +INDIRF4 +ADDRLP4 1300 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 166 +;166: VectorScale( dir, d, clipVelocity ); +ADDRLP4 64 +ADDRLP4 84 +INDIRF4 +ADDRLP4 100 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 64+4 +ADDRLP4 84+4 +INDIRF4 +ADDRLP4 100 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 64+8 +ADDRLP4 84+8 +INDIRF4 +ADDRLP4 100 +INDIRF4 +MULF4 +ASGNF4 +line 168 +;167: +;168: CrossProduct (planes[i], planes[j], dir); +ADDRLP4 1308 +CNSTI4 12 +ASGNI4 +ADDRLP4 1308 +INDIRI4 +ADDRLP4 80 +INDIRI4 +MULI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRLP4 1308 +INDIRI4 +ADDRLP4 76 +INDIRI4 +MULI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRLP4 84 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 169 +;169: VectorNormalize( dir ); +ADDRLP4 84 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 170 +;170: d = DotProduct( dir, endVelocity ); +ADDRLP4 100 +ADDRLP4 84 +INDIRF4 +ADDRLP4 116 +INDIRF4 +MULF4 +ADDRLP4 84+4 +INDIRF4 +ADDRLP4 116+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 84+8 +INDIRF4 +ADDRLP4 116+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 171 +;171: VectorScale( dir, d, endClipVelocity ); +ADDRLP4 104 +ADDRLP4 84 +INDIRF4 +ADDRLP4 100 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 104+4 +ADDRLP4 84+4 +INDIRF4 +ADDRLP4 100 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 104+8 +ADDRLP4 84+8 +INDIRF4 +ADDRLP4 100 +INDIRF4 +MULF4 +ASGNF4 +line 174 +;172: +;173: // see if there is a third plane the the new move enters +;174: for ( k = 0 ; k < numplanes ; k++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $171 +JUMPV +LABELV $168 +line 175 +;175: if ( k == i || k == j ) { +ADDRLP4 0 +INDIRI4 +ADDRLP4 80 +INDIRI4 +EQI4 $174 +ADDRLP4 0 +INDIRI4 +ADDRLP4 76 +INDIRI4 +NEI4 $172 +LABELV $174 +line 176 +;176: continue; +ADDRGP4 $169 +JUMPV +LABELV $172 +line 178 +;177: } +;178: if ( DotProduct( clipVelocity, planes[k] ) >= 0.1 ) { +ADDRLP4 1320 +CNSTI4 12 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 64 +INDIRF4 +ADDRLP4 1320 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 64+4 +INDIRF4 +ADDRLP4 1320 +INDIRI4 +ADDRLP4 4+4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 64+8 +INDIRF4 +ADDRLP4 1320 +INDIRI4 +ADDRLP4 4+8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 1036831949 +LTF4 $175 +line 179 +;179: continue; // move doesn't interact with the plane +ADDRGP4 $169 +JUMPV +LABELV $175 +line 183 +;180: } +;181: +;182: // stop dead at a tripple plane interaction +;183: VectorClear( pm->ps->velocity ); +ADDRLP4 1324 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1328 +CNSTF4 0 +ASGNF4 +ADDRLP4 1324 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 1328 +INDIRF4 +ASGNF4 +ADDRLP4 1324 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 1328 +INDIRF4 +ASGNF4 +ADDRLP4 1324 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 1328 +INDIRF4 +ASGNF4 +line 184 +;184: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $65 +JUMPV +LABELV $169 +line 174 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $171 +ADDRLP4 0 +INDIRI4 +ADDRLP4 96 +INDIRI4 +LTI4 $168 +line 186 +;185: } +;186: } +LABELV $137 +line 145 +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $139 +ADDRLP4 76 +INDIRI4 +ADDRLP4 96 +INDIRI4 +LTI4 $136 +line 189 +;187: +;188: // if we have fixed all interactions, try another move +;189: VectorCopy( clipVelocity, pm->ps->velocity ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 64 +INDIRB +ASGNB 12 +line 190 +;190: VectorCopy( endClipVelocity, endVelocity ); +ADDRLP4 116 +ADDRLP4 104 +INDIRB +ASGNB 12 +line 191 +;191: break; +ADDRGP4 $126 +JUMPV +LABELV $125 +line 127 +ADDRLP4 80 +ADDRLP4 80 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $127 +ADDRLP4 80 +INDIRI4 +ADDRLP4 96 +INDIRI4 +LTI4 $124 +LABELV $126 +line 193 +;192: } +;193: } +LABELV $85 +line 71 +ADDRLP4 1228 +ADDRLP4 1228 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $87 +ADDRLP4 1228 +INDIRI4 +ADDRLP4 1232 +INDIRI4 +LTI4 $84 +LABELV $86 +line 195 +;194: +;195: if ( gravity ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $181 +line 196 +;196: VectorCopy( endVelocity, pm->ps->velocity ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 116 +INDIRB +ASGNB 12 +line 197 +;197: } +LABELV $181 +line 200 +;198: +;199: // don't change velocity if in a timer (FIXME: is this correct?) +;200: if ( pm->ps->pm_time ) { +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $183 +line 201 +;201: VectorCopy( primal_velocity, pm->ps->velocity ); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 1236 +INDIRB +ASGNB 12 +line 202 +;202: } +LABELV $183 +line 204 +;203: +;204: return ( bumpcount != 0 ); +ADDRLP4 1228 +INDIRI4 +CNSTI4 0 +EQI4 $186 +ADDRLP4 1248 +CNSTI4 1 +ASGNI4 +ADDRGP4 $187 +JUMPV +LABELV $186 +ADDRLP4 1248 +CNSTI4 0 +ASGNI4 +LABELV $187 +ADDRLP4 1248 +INDIRI4 +RETI4 +LABELV $65 +endproc PM_SlideMove 1332 28 +export PM_StepSlideMove +proc PM_StepSlideMove 1244 28 +line 213 +;205:} +;206: +;207:/* +;208:================== +;209:PM_StepSlideMove +;210: +;211:================== +;212:*/ +;213:void PM_StepSlideMove( qboolean gravity ) { +line 227 +;214: vec3_t start_o, start_v; +;215: vec3_t down_o, down_v; +;216: trace_t trace; +;217:// float down_dist, up_dist; +;218:// vec3_t delta, delta2; +;219: vec3_t up, down; +;220: vec3_t nvel, prevel; +;221: float stepSize; +;222: float totalVel; +;223: float pre_z; +;224: int usingspeed; +;225: int i; +;226: +;227: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 229 +;228: +;229: usingspeed = 0; +ADDRLP4 1136 +CNSTI4 0 +ASGNI4 +line 231 +;230: +;231: VectorCopy (pm->ps->origin, start_o); +ADDRLP4 1108 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 232 +;232: VectorCopy (pm->ps->velocity, start_v); +ADDRLP4 1152 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRB +ASGNB 12 +line 234 +;233: +;234: if ( PM_SlideMove( gravity ) == 0 ) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1196 +ADDRGP4 PM_SlideMove +CALLI4 +ASGNI4 +ADDRLP4 1196 +INDIRI4 +CNSTI4 0 +NEI4 $189 +line 235 +;235: return; // we got exactly where we wanted to go first try +ADDRGP4 $188 +JUMPV +LABELV $189 +line 238 +;236: } +;237: +;238: if (pm->ps->fd.forcePowersActive & (1 << FP_SPEED)) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 848 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $191 +line 239 +;239: { +line 240 +;240: usingspeed = 1; +ADDRLP4 1136 +CNSTI4 1 +ASGNI4 +line 241 +;241: } +LABELV $191 +line 243 +;242: +;243: VectorCopy(start_o, down); +ADDRLP4 1120 +ADDRLP4 1108 +INDIRB +ASGNB 12 +line 244 +;244: down[2] -= STEPSIZE; +ADDRLP4 1120+8 +ADDRLP4 1120+8 +INDIRF4 +CNSTF4 1099956224 +SUBF4 +ASGNF4 +line 245 +;245: pm->trace (&trace, start_o, pm->mins, pm->maxs, down, pm->ps->clientNum, pm->tracemask); +ADDRLP4 16 +ARGP4 +ADDRLP4 1108 +ARGP4 +ADDRLP4 1200 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 1120 +ARGP4 +ADDRLP4 1200 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 246 +;246: VectorSet(up, 0, 0, 1); +ADDRLP4 1204 +CNSTF4 0 +ASGNF4 +ADDRLP4 1096 +ADDRLP4 1204 +INDIRF4 +ASGNF4 +ADDRLP4 1096+4 +ADDRLP4 1204 +INDIRF4 +ASGNF4 +ADDRLP4 1096+8 +CNSTF4 1065353216 +ASGNF4 +line 248 +;247: // never step up when you still have up velocity +;248: if ( pm->ps->velocity[2] > 0 && (trace.fraction == 1.0 || +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 0 +LEF4 $196 +ADDRLP4 16+8 +INDIRF4 +CNSTF4 1065353216 +EQF4 $206 +ADDRLP4 16+24 +INDIRF4 +ADDRLP4 1096 +INDIRF4 +MULF4 +ADDRLP4 16+24+4 +INDIRF4 +ADDRLP4 1096+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 16+24+8 +INDIRF4 +ADDRLP4 1096+8 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 1060320051 +GEF4 $196 +LABELV $206 +line 249 +;249: DotProduct(trace.plane.normal, up) < 0.7)) { +line 251 +;250: +;251: if (!usingspeed) +ADDRLP4 1136 +INDIRI4 +CNSTI4 0 +NEI4 $207 +line 252 +;252: { +line 253 +;253: return; +ADDRGP4 $188 +JUMPV +LABELV $207 +line 255 +;254: } +;255: } +LABELV $196 +line 257 +;256: +;257: VectorCopy (pm->ps->origin, down_o); +ADDRLP4 1172 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 258 +;258: VectorCopy (pm->ps->velocity, down_v); +ADDRLP4 1184 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRB +ASGNB 12 +line 260 +;259: +;260: VectorCopy (start_o, up); +ADDRLP4 1096 +ADDRLP4 1108 +INDIRB +ASGNB 12 +line 261 +;261: up[2] += STEPSIZE; +ADDRLP4 1096+8 +ADDRLP4 1096+8 +INDIRF4 +CNSTF4 1099956224 +ADDF4 +ASGNF4 +line 264 +;262: +;263: // test the player position if they were a stepheight higher +;264: pm->trace (&trace, start_o, pm->mins, pm->maxs, up, pm->ps->clientNum, pm->tracemask); +ADDRLP4 16 +ARGP4 +ADDRLP4 1108 +ARGP4 +ADDRLP4 1208 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1208 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 1208 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 1096 +ARGP4 +ADDRLP4 1208 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1208 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1208 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 265 +;265: if ( trace.allsolid ) { +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $210 +line 266 +;266: if ( pm->debugLevel ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $212 +line 267 +;267: Com_Printf("%i:bend can't step\n", c_pmove); +ADDRGP4 $214 +ARGP4 +ADDRGP4 c_pmove +INDIRI4 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 268 +;268: } +LABELV $212 +line 269 +;269: if (!usingspeed) +ADDRLP4 1136 +INDIRI4 +CNSTI4 0 +NEI4 $215 +line 270 +;270: { +line 271 +;271: return; // can't step up +ADDRGP4 $188 +JUMPV +LABELV $215 +line 273 +;272: } +;273: } +LABELV $210 +line 275 +;274: +;275: stepSize = trace.endpos[2] - start_o[2]; +ADDRLP4 1164 +ADDRLP4 16+12+8 +INDIRF4 +ADDRLP4 1108+8 +INDIRF4 +SUBF4 +ASGNF4 +line 277 +;276: // try slidemove from this position +;277: VectorCopy (trace.endpos, pm->ps->origin); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 16+12 +INDIRB +ASGNB 12 +line 278 +;278: VectorCopy (start_v, pm->ps->velocity); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 1152 +INDIRB +ASGNB 12 +line 280 +;279: +;280: VectorCopy(pm->ps->velocity, prevel); +ADDRLP4 4 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRB +ASGNB 12 +line 282 +;281: +;282: pre_z = prevel[2]; +ADDRLP4 1132 +ADDRLP4 4+8 +INDIRF4 +ASGNF4 +line 284 +;283: +;284: PM_SlideMove( gravity ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 PM_SlideMove +CALLI4 +pop +line 286 +;285: +;286: VectorSubtract(pm->ps->velocity, prevel, prevel); +ADDRLP4 1212 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 1212 +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 4+4 +ADDRLP4 1212 +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 4+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 4+8 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ADDRLP4 4+8 +INDIRF4 +SUBF4 +ASGNF4 +line 287 +;287: if (prevel[0] < 0) +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +GEF4 $226 +line 288 +;288: { +line 289 +;289: prevel[0] = -prevel[0]; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +NEGF4 +ASGNF4 +line 290 +;290: } +LABELV $226 +line 291 +;291: if (prevel[1] < 0) +ADDRLP4 4+4 +INDIRF4 +CNSTF4 0 +GEF4 $228 +line 292 +;292: { +line 293 +;293: prevel[1] = -prevel[1]; +ADDRLP4 4+4 +ADDRLP4 4+4 +INDIRF4 +NEGF4 +ASGNF4 +line 294 +;294: } +LABELV $228 +line 296 +;295: +;296: totalVel = prevel[0]+prevel[1]; +ADDRLP4 1168 +ADDRLP4 4 +INDIRF4 +ADDRLP4 4+4 +INDIRF4 +ADDF4 +ASGNF4 +line 298 +;297: +;298: if (pre_z > 480 && (pre_z - pm->ps->velocity[2]) >= 480 && pm->ps->fd.forceJumpZStart) +ADDRLP4 1220 +CNSTF4 1139802112 +ASGNF4 +ADDRLP4 1132 +INDIRF4 +ADDRLP4 1220 +INDIRF4 +LEF4 $234 +ADDRLP4 1224 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1132 +INDIRF4 +ADDRLP4 1224 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +SUBF4 +ADDRLP4 1220 +INDIRF4 +LTF4 $234 +ADDRLP4 1224 +INDIRP4 +CNSTI4 1092 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $234 +line 299 +;299: { //smashed head on the ceiling during a force jump +line 300 +;300: pm->ps->fd.forceSpeedDoDamage = (pre_z - pm->ps->velocity[2])*0.04; +ADDRLP4 1228 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1228 +INDIRP4 +CNSTI4 1140 +ADDP4 +CNSTF4 1025758986 +ADDRLP4 1132 +INDIRF4 +ADDRLP4 1228 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 301 +;301: if (pm->numtouch) +ADDRGP4 pm +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $236 +line 302 +;302: { //do damage to the other player if we hit one +ADDRGP4 $239 +JUMPV +LABELV $238 +line 304 +;303: while (i < pm->numtouch) +;304: { +line 305 +;305: if (pm->touchents[i] < MAX_CLIENTS && pm->touchents[i] != pm->ps->clientNum) +ADDRLP4 1232 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1236 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1232 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1236 +INDIRI4 +CNSTI4 32 +GEI4 $241 +ADDRLP4 1236 +INDIRI4 +ADDRLP4 1232 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +EQI4 $241 +line 306 +;306: { +line 307 +;307: pm->ps->fd.forceSpeedHitIndex = pm->touchents[i]; +ADDRLP4 1240 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1240 +INDIRP4 +INDIRP4 +CNSTI4 1144 +ADDP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1240 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 308 +;308: break; +ADDRGP4 $240 +JUMPV +LABELV $241 +line 311 +;309: } +;310: +;311: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 312 +;312: } +LABELV $239 +line 303 +ADDRLP4 0 +INDIRI4 +ADDRGP4 pm +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +LTI4 $238 +LABELV $240 +line 313 +;313: } +LABELV $236 +line 315 +;314: +;315: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 316 +;316: } +LABELV $234 +line 318 +;317: +;318: if (usingspeed) +ADDRLP4 1136 +INDIRI4 +CNSTI4 0 +EQI4 $243 +line 319 +;319: { +line 320 +;320: if (pm->ps->fd.forceSpeedSmash > 1.3 && totalVel > 500) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1136 +ADDP4 +INDIRF4 +CNSTF4 1067869798 +LEF4 $245 +ADDRLP4 1168 +INDIRF4 +CNSTF4 1140457472 +LEF4 $245 +line 321 +;321: { //if we were going fast enough and hadn't hit a while in a while then smash into it hard +line 324 +;322: //the difference between our velocity pre and post colide must also be greater than 600 to do damage +;323: //Com_Printf("SMASH %f\n", pm->ps->fd.forceSpeedSmash); +;324: VectorCopy(start_v, nvel); //then bounce the player back a bit in the opposite of the direction he was going +ADDRLP4 1140 +ADDRLP4 1152 +INDIRB +ASGNB 12 +line 325 +;325: nvel[0] += start_o[0]; +ADDRLP4 1140 +ADDRLP4 1140 +INDIRF4 +ADDRLP4 1108 +INDIRF4 +ADDF4 +ASGNF4 +line 326 +;326: nvel[1] += start_o[1]; +ADDRLP4 1140+4 +ADDRLP4 1140+4 +INDIRF4 +ADDRLP4 1108+4 +INDIRF4 +ADDF4 +ASGNF4 +line 327 +;327: nvel[2] += start_o[2]; +ADDRLP4 1140+8 +ADDRLP4 1140+8 +INDIRF4 +ADDRLP4 1108+8 +INDIRF4 +ADDF4 +ASGNF4 +line 328 +;328: VectorSubtract(start_o, nvel, nvel); +ADDRLP4 1140 +ADDRLP4 1108 +INDIRF4 +ADDRLP4 1140 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1140+4 +ADDRLP4 1108+4 +INDIRF4 +ADDRLP4 1140+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1140+8 +ADDRLP4 1108+8 +INDIRF4 +ADDRLP4 1140+8 +INDIRF4 +SUBF4 +ASGNF4 +line 329 +;329: pm->ps->velocity[0] = nvel[0]*0.1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 1036831949 +ADDRLP4 1140 +INDIRF4 +MULF4 +ASGNF4 +line 330 +;330: pm->ps->velocity[1] = nvel[1]*0.1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 36 +ADDP4 +CNSTF4 1036831949 +ADDRLP4 1140+4 +INDIRF4 +MULF4 +ASGNF4 +line 331 +;331: pm->ps->velocity[2] = 64; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1115684864 +ASGNF4 +line 332 +;332: pm->ps->fd.forceSpeedDoDamage = pm->ps->fd.forceSpeedSmash*10; //do somewhere in the range of 15-25 damage, depending on speed +ADDRLP4 1228 +ADDRGP4 pm +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1228 +INDIRP4 +CNSTI4 1140 +ADDP4 +CNSTF4 1092616192 +ADDRLP4 1228 +INDIRP4 +CNSTI4 1136 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 333 +;333: pm->ps->fd.forceSpeedSmash = 0; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1136 +ADDP4 +CNSTF4 0 +ASGNF4 +line 335 +;334: +;335: if (pm->numtouch) +ADDRGP4 pm +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $188 +line 336 +;336: { +ADDRGP4 $261 +JUMPV +LABELV $260 +line 338 +;337: while (i < pm->numtouch) +;338: { +line 339 +;339: if (pm->touchents[i] < MAX_CLIENTS && pm->touchents[i] != pm->ps->clientNum) +ADDRLP4 1232 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1236 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1232 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1236 +INDIRI4 +CNSTI4 32 +GEI4 $263 +ADDRLP4 1236 +INDIRI4 +ADDRLP4 1232 +INDIRP4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +EQI4 $263 +line 340 +;340: { +line 341 +;341: pm->ps->fd.forceSpeedHitIndex = pm->touchents[i]; +ADDRLP4 1240 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1240 +INDIRP4 +INDIRP4 +CNSTI4 1144 +ADDP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1240 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 342 +;342: break; +ADDRGP4 $188 +JUMPV +LABELV $263 +line 345 +;343: } +;344: +;345: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 346 +;346: } +LABELV $261 +line 337 +ADDRLP4 0 +INDIRI4 +ADDRGP4 pm +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +LTI4 $260 +line 347 +;347: } +line 348 +;348: return; +ADDRGP4 $188 +JUMPV +LABELV $245 +line 351 +;349: } +;350: +;351: pm->ps->fd.forceSpeedSmash -= 0.1; +ADDRLP4 1228 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1136 +ADDP4 +ASGNP4 +ADDRLP4 1228 +INDIRP4 +ADDRLP4 1228 +INDIRP4 +INDIRF4 +CNSTF4 1036831949 +SUBF4 +ASGNF4 +line 354 +;352: //we hit a wall so decrease speed +;353: +;354: if (pm->ps->fd.forceSpeedSmash < 1) +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1136 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +GEF4 $265 +line 355 +;355: { +line 356 +;356: pm->ps->fd.forceSpeedSmash = 1; +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 1136 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 357 +;357: } +LABELV $265 +line 358 +;358: } +LABELV $243 +line 361 +;359: +;360: // push down the final amount +;361: VectorCopy (pm->ps->origin, down); +ADDRLP4 1120 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 362 +;362: down[2] -= stepSize; +ADDRLP4 1120+8 +ADDRLP4 1120+8 +INDIRF4 +ADDRLP4 1164 +INDIRF4 +SUBF4 +ASGNF4 +line 363 +;363: pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, down, pm->ps->clientNum, pm->tracemask); +ADDRLP4 16 +ARGP4 +ADDRLP4 1228 +ADDRGP4 pm +INDIRP4 +ASGNP4 +ADDRLP4 1232 +ADDRLP4 1228 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRLP4 1232 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 1228 +INDIRP4 +CNSTI4 188 +ADDP4 +ARGP4 +ADDRLP4 1228 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 1120 +ARGP4 +ADDRLP4 1232 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1228 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1228 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CALLV +pop +line 364 +;364: if ( !trace.allsolid ) { +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $268 +line 365 +;365: VectorCopy (trace.endpos, pm->ps->origin); +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 16+12 +INDIRB +ASGNB 12 +line 366 +;366: } +LABELV $268 +line 367 +;367: if ( trace.fraction < 1.0 ) { +ADDRLP4 16+8 +INDIRF4 +CNSTF4 1065353216 +GEF4 $271 +line 368 +;368: PM_ClipVelocity( pm->ps->velocity, trace.plane.normal, pm->ps->velocity, OVERCLIP ); +ADDRLP4 1236 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 1236 +INDIRP4 +ARGP4 +ADDRLP4 16+24 +ARGP4 +ADDRLP4 1236 +INDIRP4 +ARGP4 +CNSTF4 1065361605 +ARGF4 +ADDRGP4 PM_ClipVelocity +CALLV +pop +line 369 +;369: } +LABELV $271 +line 383 +;370: +;371:#if 0 +;372: // if the down trace can trace back to the original position directly, don't step +;373: pm->trace( &trace, pm->ps->origin, pm->mins, pm->maxs, start_o, pm->ps->clientNum, pm->tracemask); +;374: if ( trace.fraction == 1.0 ) { +;375: // use the original move +;376: VectorCopy (down_o, pm->ps->origin); +;377: VectorCopy (down_v, pm->ps->velocity); +;378: if ( pm->debugLevel ) { +;379: Com_Printf("%i:bend\n", c_pmove); +;380: } +;381: } else +;382:#endif +;383: { +line 387 +;384: // use the step move +;385: float delta; +;386: +;387: delta = pm->ps->origin[2] - start_o[2]; +ADDRLP4 1236 +ADDRGP4 pm +INDIRP4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 1108+8 +INDIRF4 +SUBF4 +ASGNF4 +line 388 +;388: if ( delta > 2 ) { +ADDRLP4 1236 +INDIRF4 +CNSTF4 1073741824 +LEF4 $276 +line 389 +;389: if ( delta < 7 ) { +ADDRLP4 1236 +INDIRF4 +CNSTF4 1088421888 +GEF4 $278 +line 390 +;390: PM_AddEvent( EV_STEP_4 ); +CNSTI4 7 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 391 +;391: } else if ( delta < 11 ) { +ADDRGP4 $279 +JUMPV +LABELV $278 +ADDRLP4 1236 +INDIRF4 +CNSTF4 1093664768 +GEF4 $280 +line 392 +;392: PM_AddEvent( EV_STEP_8 ); +CNSTI4 8 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 393 +;393: } else if ( delta < 15 ) { +ADDRGP4 $281 +JUMPV +LABELV $280 +ADDRLP4 1236 +INDIRF4 +CNSTF4 1097859072 +GEF4 $282 +line 394 +;394: PM_AddEvent( EV_STEP_12 ); +CNSTI4 9 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 395 +;395: } else { +ADDRGP4 $283 +JUMPV +LABELV $282 +line 396 +;396: PM_AddEvent( EV_STEP_16 ); +CNSTI4 10 +ARGI4 +ADDRGP4 PM_AddEvent +CALLV +pop +line 397 +;397: } +LABELV $283 +LABELV $281 +LABELV $279 +line 398 +;398: } +LABELV $276 +line 399 +;399: if ( pm->debugLevel ) { +ADDRGP4 pm +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $284 +line 400 +;400: Com_Printf("%i:stepped\n", c_pmove); +ADDRGP4 $286 +ARGP4 +ADDRGP4 c_pmove +INDIRI4 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 401 +;401: } +LABELV $284 +line 402 +;402: } +line 403 +;403:} +LABELV $188 +endproc PM_StepSlideMove 1244 28 +import PM_SetForceJumpZStart +import PM_SetSaberMove +import PM_WeaponLightsaber +import PM_SetAnim +import PM_FinishWeaponChange +import PM_BeginWeaponChange +import PM_ForceLegsAnim +import PM_ContinueLegsAnim +import PM_StartTorsoAnim +import BG_CycleInven +import PM_AddEvent +import PM_AddTouchEnt +import PM_ClipVelocity +import PM_SaberJumpAttackMove +import PM_SaberFlipOverAttackMove +import PM_SomeoneInFront +import PM_GroundDistance +import PM_GetSaberStance +import PM_AnimLength +import PM_InRollComplete +import PM_InOnGroundAnim +import PM_SpinningAnim +import PM_LandingAnim +import PM_JumpingAnim +import PM_PainAnim +import PM_InKnockDown +import PM_InSaberAnim +import PM_SaberInStart +import PM_SaberInReflect +import PM_SaberInKnockaway +import PM_SaberInParry +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import forcePowerNeeded +import c_pmove +import pm_flightfriction +import pm_waterfriction +import pm_friction +import pm_flyaccelerate +import pm_wateraccelerate +import pm_airaccelerate +import pm_accelerate +import pm_wadeScale +import pm_swimScale +import pm_duckScale +import pm_stopspeed +import pml +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $286 +char 1 37 +char 1 105 +char 1 58 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 112 +char 1 101 +char 1 100 +char 1 10 +char 1 0 +align 1 +LABELV $214 +char 1 37 +char 1 105 +char 1 58 +char 1 98 +char 1 101 +char 1 110 +char 1 100 +char 1 32 +char 1 99 +char 1 97 +char 1 110 +char 1 39 +char 1 116 +char 1 32 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 10 +char 1 0 diff --git a/code/cgame/vm/bg_weapons.asm b/code/cgame/vm/bg_weapons.asm new file mode 100644 index 0000000..73dc5ee --- /dev/null +++ b/code/cgame/vm/bg_weapons.asm @@ -0,0 +1,546 @@ +data +export WP_MuzzlePoint +align 4 +LABELV WP_MuzzlePoint +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 1090519040 +byte 4 0 +byte 4 1090519040 +byte 4 1098907648 +byte 4 0 +byte 4 1094713344 +byte 4 1086324736 +byte 4 3233808384 +byte 4 1094713344 +byte 4 1086324736 +byte 4 3233808384 +byte 4 1094713344 +byte 4 1086324736 +byte 4 3233808384 +byte 4 1094713344 +byte 4 1073741824 +byte 4 3233808384 +byte 4 1094713344 +byte 4 1083179008 +byte 4 3233808384 +byte 4 1094713344 +byte 4 1086324736 +byte 4 3233808384 +byte 4 1094713344 +byte 4 1086324736 +byte 4 3233808384 +byte 4 1094713344 +byte 4 1090519040 +byte 4 0 +byte 4 1094713344 +byte 4 0 +byte 4 3229614080 +byte 4 1094713344 +byte 4 0 +byte 4 3240099840 +byte 4 1094713344 +byte 4 0 +byte 4 3229614080 +skip 24 +export weaponData +align 4 +LABELV weaponData +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 5 +byte 4 0 +byte 4 400 +byte 4 8192 +byte 4 0 +byte 4 400 +byte 4 8192 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 5 +byte 4 0 +byte 4 100 +byte 4 8192 +byte 4 0 +byte 4 100 +byte 4 8192 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 2 +byte 4 15 +byte 4 2 +byte 4 400 +byte 4 8192 +byte 4 2 +byte 4 400 +byte 4 8192 +byte 4 0 +byte 4 200 +byte 4 0 +byte 4 1 +byte 4 0 +byte 4 1500 +byte 4 2 +byte 4 5 +byte 4 2 +byte 4 350 +byte 4 8192 +byte 4 3 +byte 4 150 +byte 4 8192 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 3 +byte 4 5 +byte 4 5 +byte 4 600 +byte 4 8192 +byte 4 6 +byte 4 1300 +byte 4 8192 +byte 4 0 +byte 4 200 +byte 4 0 +byte 4 3 +byte 4 0 +byte 4 1700 +byte 4 3 +byte 4 5 +byte 4 5 +byte 4 1000 +byte 4 8192 +byte 4 5 +byte 4 750 +byte 4 8192 +byte 4 400 +byte 4 0 +byte 4 5 +byte 4 0 +byte 4 1700 +byte 4 0 +byte 4 4 +byte 4 5 +byte 4 1 +byte 4 100 +byte 4 8192 +byte 4 15 +byte 4 800 +byte 4 8192 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 3 +byte 4 5 +byte 4 8 +byte 4 500 +byte 4 8192 +byte 4 6 +byte 4 900 +byte 4 8192 +byte 4 0 +byte 4 250 +byte 4 0 +byte 4 3 +byte 4 0 +byte 4 2100 +byte 4 4 +byte 4 5 +byte 4 10 +byte 4 700 +byte 4 8192 +byte 4 15 +byte 4 800 +byte 4 8192 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 5 +byte 4 5 +byte 4 1 +byte 4 900 +byte 4 8192 +byte 4 2 +byte 4 1200 +byte 4 8192 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 7 +byte 4 0 +byte 4 1 +byte 4 800 +byte 4 8192 +byte 4 1 +byte 4 400 +byte 4 8192 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 8 +byte 4 0 +byte 4 1 +byte 4 800 +byte 4 8192 +byte 4 1 +byte 4 400 +byte 4 8192 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 9 +byte 4 0 +byte 4 1 +byte 4 800 +byte 4 8192 +byte 4 0 +byte 4 400 +byte 4 8192 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 100 +byte 4 8192 +byte 4 0 +byte 4 100 +byte 4 8192 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +skip 56 +export ammoData +align 4 +LABELV ammoData +byte 4 0 +byte 4 100 +byte 4 300 +byte 4 300 +byte 4 300 +byte 4 25 +byte 4 800 +byte 4 10 +byte 4 10 +byte 4 10 +import PM_SetForceJumpZStart +import PM_SetSaberMove +import PM_WeaponLightsaber +import PM_SetAnim +import PM_FinishWeaponChange +import PM_BeginWeaponChange +import PM_ForceLegsAnim +import PM_ContinueLegsAnim +import PM_StartTorsoAnim +import BG_CycleInven +import PM_StepSlideMove +import PM_SlideMove +import PM_AddEvent +import PM_AddTouchEnt +import PM_ClipVelocity +import PM_SaberJumpAttackMove +import PM_SaberFlipOverAttackMove +import PM_SomeoneInFront +import PM_GroundDistance +import PM_GetSaberStance +import PM_AnimLength +import PM_InRollComplete +import PM_InOnGroundAnim +import PM_SpinningAnim +import PM_LandingAnim +import PM_JumpingAnim +import PM_PainAnim +import PM_InKnockDown +import PM_InSaberAnim +import PM_SaberInStart +import PM_SaberInReflect +import PM_SaberInKnockaway +import PM_SaberInParry +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import forcePowerNeeded +import c_pmove +import pm_flightfriction +import pm_waterfriction +import pm_friction +import pm_flyaccelerate +import pm_wateraccelerate +import pm_airaccelerate +import pm_accelerate +import pm_wadeScale +import pm_swimScale +import pm_duckScale +import pm_stopspeed +import pml +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort diff --git a/code/cgame/vm/cg_consolecmds.asm b/code/cgame/vm/cg_consolecmds.asm new file mode 100644 index 0000000..bb0eee7 --- /dev/null +++ b/code/cgame/vm/cg_consolecmds.asm @@ -0,0 +1,5106 @@ +export CG_TargetCommand_f +code +proc CG_TargetCommand_f 20 12 +file "../cg_consolecmds.c" +line 12 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_consolecmds.c -- text commands typed in at the local console, or +;4:// executed by a key binding +;5: +;6:#include "cg_local.h" +;7:#include "../ui/ui_shared.h" +;8:extern menuDef_t *menuScoreboard; +;9: +;10: +;11: +;12:void CG_TargetCommand_f( void ) { +line 16 +;13: int targetNum; +;14: char test[4]; +;15: +;16: targetNum = CG_CrosshairPlayer(); +ADDRLP4 8 +ADDRGP4 CG_CrosshairPlayer +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 17 +;17: if (!targetNum ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $130 +line 18 +;18: return; +ADDRGP4 $129 +JUMPV +LABELV $130 +line 21 +;19: } +;20: +;21: trap_Argv( 1, test, 4 ); +CNSTI4 1 +ARGI4 +ADDRLP4 4 +ARGP4 +CNSTI4 4 +ARGI4 +ADDRGP4 trap_Argv +CALLV +pop +line 22 +;22: trap_SendConsoleCommand( va( "gc %i %i", targetNum, atoi( test ) ) ); +ADDRLP4 4 +ARGP4 +ADDRLP4 12 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 $132 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 16 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 23 +;23:} +LABELV $129 +endproc CG_TargetCommand_f 20 12 +proc CG_SizeUp_f 4 8 +line 34 +;24: +;25: +;26: +;27:/* +;28:================= +;29:CG_SizeUp_f +;30: +;31:Keybinding command +;32:================= +;33:*/ +;34:static void CG_SizeUp_f (void) { +line 35 +;35: trap_Cvar_Set("cg_viewsize", va("%i",(int)(cg_viewsize.integer+10))); +ADDRGP4 $135 +ARGP4 +ADDRGP4 cg_viewsize+12 +INDIRI4 +CNSTI4 10 +ADDI4 +ARGI4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $134 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 36 +;36:} +LABELV $133 +endproc CG_SizeUp_f 4 8 +proc CG_SizeDown_f 4 8 +line 46 +;37: +;38: +;39:/* +;40:================= +;41:CG_SizeDown_f +;42: +;43:Keybinding command +;44:================= +;45:*/ +;46:static void CG_SizeDown_f (void) { +line 47 +;47: trap_Cvar_Set("cg_viewsize", va("%i",(int)(cg_viewsize.integer-10))); +ADDRGP4 $135 +ARGP4 +ADDRGP4 cg_viewsize+12 +INDIRI4 +CNSTI4 10 +SUBI4 +ARGI4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $134 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 48 +;48:} +LABELV $137 +endproc CG_SizeDown_f 4 8 +proc CG_Viewpos_f 0 24 +line 58 +;49: +;50: +;51:/* +;52:============= +;53:CG_Viewpos_f +;54: +;55:Debugging command to print the current position +;56:============= +;57:*/ +;58:static void CG_Viewpos_f (void) { +line 59 +;59: CG_Printf ("%s (%i %i %i) : %i\n", cgs.mapname, (int)cg.refdef.vieworg[0], +ADDRGP4 $140 +ARGP4 +ADDRGP4 cgs+33008 +ARGP4 +ADDRGP4 cg+3616+24 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 cg+3616+24+8 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 cg+3984+4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_Printf +CALLV +pop +line 62 +;60: (int)cg.refdef.vieworg[1], (int)cg.refdef.vieworg[2], +;61: (int)cg.refdefViewAngles[YAW]); +;62:} +LABELV $139 +endproc CG_Viewpos_f 0 24 +proc CG_ScoresDown_f 0 4 +line 65 +;63: +;64: +;65:static void CG_ScoresDown_f( void ) { +line 67 +;66: +;67: CG_BuildSpectatorString(); +ADDRGP4 CG_BuildSpectatorString +CALLV +pop +line 68 +;68: if ( cg.scoresRequestTime + 2000 < cg.time ) { +ADDRGP4 cg+5044 +INDIRI4 +CNSTI4 2000 +ADDI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $153 +line 71 +;69: // the scores are more than two seconds out of data, +;70: // so request new ones +;71: cg.scoresRequestTime = cg.time; +ADDRGP4 cg+5044 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 72 +;72: trap_SendClientCommand( "score" ); +ADDRGP4 $159 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 76 +;73: +;74: // leave the current scores up if they were already +;75: // displayed, but if this is the first hit, clear them out +;76: if ( !cg.showScores ) { +ADDRGP4 cg+6984 +INDIRI4 +CNSTI4 0 +NEI4 $154 +line 77 +;77: cg.showScores = qtrue; +ADDRGP4 cg+6984 +CNSTI4 1 +ASGNI4 +line 78 +;78: cg.numScores = 0; +ADDRGP4 cg+5048 +CNSTI4 0 +ASGNI4 +line 79 +;79: } +line 80 +;80: } else { +ADDRGP4 $154 +JUMPV +LABELV $153 +line 83 +;81: // show the cached contents even if they just pressed if it +;82: // is within two seconds +;83: cg.showScores = qtrue; +ADDRGP4 cg+6984 +CNSTI4 1 +ASGNI4 +line 84 +;84: } +LABELV $154 +line 85 +;85:} +LABELV $152 +endproc CG_ScoresDown_f 0 4 +proc CG_ScoresUp_f 0 0 +line 87 +;86: +;87:static void CG_ScoresUp_f( void ) { +line 88 +;88: if ( cg.showScores ) { +ADDRGP4 cg+6984 +INDIRI4 +CNSTI4 0 +EQI4 $167 +line 89 +;89: cg.showScores = qfalse; +ADDRGP4 cg+6984 +CNSTI4 0 +ASGNI4 +line 90 +;90: cg.scoreFadeTime = cg.time; +ADDRGP4 cg+6992 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 91 +;91: } +LABELV $167 +line 92 +;92:} +LABELV $166 +endproc CG_ScoresUp_f 0 0 +proc CG_scrollScoresDown_f 0 12 +line 97 +;93: +;94:extern menuDef_t *menuScoreboard; +;95:void Menu_Reset(); // FIXME: add to right include file +;96: +;97:static void CG_scrollScoresDown_f( void) { +line 98 +;98: if (menuScoreboard && cg.scoreBoardShowing) { +ADDRGP4 menuScoreboard +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $174 +ADDRGP4 cg+6988 +INDIRI4 +CNSTI4 0 +EQI4 $174 +line 99 +;99: Menu_ScrollFeeder(menuScoreboard, FEEDER_SCOREBOARD, qtrue); +ADDRGP4 menuScoreboard +INDIRP4 +ARGP4 +CNSTI4 11 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 Menu_ScrollFeeder +CALLV +pop +line 100 +;100: Menu_ScrollFeeder(menuScoreboard, FEEDER_REDTEAM_LIST, qtrue); +ADDRGP4 menuScoreboard +INDIRP4 +ARGP4 +CNSTI4 5 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 Menu_ScrollFeeder +CALLV +pop +line 101 +;101: Menu_ScrollFeeder(menuScoreboard, FEEDER_BLUETEAM_LIST, qtrue); +ADDRGP4 menuScoreboard +INDIRP4 +ARGP4 +CNSTI4 6 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 Menu_ScrollFeeder +CALLV +pop +line 102 +;102: } +LABELV $174 +line 103 +;103:} +LABELV $173 +endproc CG_scrollScoresDown_f 0 12 +proc CG_scrollScoresUp_f 0 12 +line 106 +;104: +;105: +;106:static void CG_scrollScoresUp_f( void) { +line 107 +;107: if (menuScoreboard && cg.scoreBoardShowing) { +ADDRGP4 menuScoreboard +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $178 +ADDRGP4 cg+6988 +INDIRI4 +CNSTI4 0 +EQI4 $178 +line 108 +;108: Menu_ScrollFeeder(menuScoreboard, FEEDER_SCOREBOARD, qfalse); +ADDRGP4 menuScoreboard +INDIRP4 +ARGP4 +CNSTI4 11 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 Menu_ScrollFeeder +CALLV +pop +line 109 +;109: Menu_ScrollFeeder(menuScoreboard, FEEDER_REDTEAM_LIST, qfalse); +ADDRGP4 menuScoreboard +INDIRP4 +ARGP4 +CNSTI4 5 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 Menu_ScrollFeeder +CALLV +pop +line 110 +;110: Menu_ScrollFeeder(menuScoreboard, FEEDER_BLUETEAM_LIST, qfalse); +ADDRGP4 menuScoreboard +INDIRP4 +ARGP4 +CNSTI4 6 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 Menu_ScrollFeeder +CALLV +pop +line 111 +;111: } +LABELV $178 +line 112 +;112:} +LABELV $177 +endproc CG_scrollScoresUp_f 0 12 +proc CG_spWin_f 0 12 +line 115 +;113: +;114: +;115:static void CG_spWin_f( void) { +line 116 +;116: trap_Cvar_Set("cg_cameraOrbit", "2"); +ADDRGP4 $182 +ARGP4 +ADDRGP4 $183 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 117 +;117: trap_Cvar_Set("cg_cameraOrbitDelay", "35"); +ADDRGP4 $184 +ARGP4 +ADDRGP4 $185 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 118 +;118: trap_Cvar_Set("cg_thirdPerson", "1"); +ADDRGP4 $186 +ARGP4 +ADDRGP4 $187 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 119 +;119: trap_Cvar_Set("cg_thirdPersonAngle", "0"); +ADDRGP4 $188 +ARGP4 +ADDRGP4 $189 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 120 +;120: trap_Cvar_Set("cg_thirdPersonRange", "100"); +ADDRGP4 $190 +ARGP4 +ADDRGP4 $191 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 121 +;121: CG_AddBufferedSound(cgs.media.winnerSound); +ADDRGP4 cgs+70296+668 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 123 +;122: //trap_S_StartLocalSound(cgs.media.winnerSound, CHAN_ANNOUNCER); +;123: CG_CenterPrint("YOU WIN!", SCREEN_HEIGHT * .30, 0); +ADDRGP4 $194 +ARGP4 +CNSTI4 144 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_CenterPrint +CALLV +pop +line 124 +;124:} +LABELV $181 +endproc CG_spWin_f 0 12 +proc CG_spLose_f 0 12 +line 126 +;125: +;126:static void CG_spLose_f( void) { +line 127 +;127: trap_Cvar_Set("cg_cameraOrbit", "2"); +ADDRGP4 $182 +ARGP4 +ADDRGP4 $183 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 128 +;128: trap_Cvar_Set("cg_cameraOrbitDelay", "35"); +ADDRGP4 $184 +ARGP4 +ADDRGP4 $185 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 129 +;129: trap_Cvar_Set("cg_thirdPerson", "1"); +ADDRGP4 $186 +ARGP4 +ADDRGP4 $187 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 130 +;130: trap_Cvar_Set("cg_thirdPersonAngle", "0"); +ADDRGP4 $188 +ARGP4 +ADDRGP4 $189 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 131 +;131: trap_Cvar_Set("cg_thirdPersonRange", "100"); +ADDRGP4 $190 +ARGP4 +ADDRGP4 $191 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 132 +;132: CG_AddBufferedSound(cgs.media.loserSound); +ADDRGP4 cgs+70296+672 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 134 +;133: //trap_S_StartLocalSound(cgs.media.loserSound, CHAN_ANNOUNCER); +;134: CG_CenterPrint("YOU LOSE...", SCREEN_HEIGHT * .30, 0); +ADDRGP4 $198 +ARGP4 +CNSTI4 144 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_CenterPrint +CALLV +pop +line 135 +;135:} +LABELV $195 +endproc CG_spLose_f 0 12 +proc CG_TellTarget_f 264 20 +line 138 +;136: +;137: +;138:static void CG_TellTarget_f( void ) { +line 143 +;139: int clientNum; +;140: char command[128]; +;141: char message[128]; +;142: +;143: clientNum = CG_CrosshairPlayer(); +ADDRLP4 260 +ADDRGP4 CG_CrosshairPlayer +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 260 +INDIRI4 +ASGNI4 +line 144 +;144: if ( clientNum == -1 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 -1 +NEI4 $200 +line 145 +;145: return; +ADDRGP4 $199 +JUMPV +LABELV $200 +line 148 +;146: } +;147: +;148: trap_Args( message, 128 ); +ADDRLP4 132 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 trap_Args +CALLV +pop +line 149 +;149: Com_sprintf( command, 128, "tell %i %s", clientNum, message ); +ADDRLP4 4 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 $202 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 132 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 150 +;150: trap_SendClientCommand( command ); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 151 +;151:} +LABELV $199 +endproc CG_TellTarget_f 264 20 +proc CG_TellAttacker_f 264 20 +line 153 +;152: +;153:static void CG_TellAttacker_f( void ) { +line 158 +;154: int clientNum; +;155: char command[128]; +;156: char message[128]; +;157: +;158: clientNum = CG_LastAttacker(); +ADDRLP4 260 +ADDRGP4 CG_LastAttacker +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 260 +INDIRI4 +ASGNI4 +line 159 +;159: if ( clientNum == -1 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 -1 +NEI4 $204 +line 160 +;160: return; +ADDRGP4 $203 +JUMPV +LABELV $204 +line 163 +;161: } +;162: +;163: trap_Args( message, 128 ); +ADDRLP4 132 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 trap_Args +CALLV +pop +line 164 +;164: Com_sprintf( command, 128, "tell %i %s", clientNum, message ); +ADDRLP4 4 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 $202 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 132 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 165 +;165: trap_SendClientCommand( command ); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 166 +;166:} +LABELV $203 +endproc CG_TellAttacker_f 264 20 +proc CG_VoiceTellTarget_f 264 20 +line 168 +;167: +;168:static void CG_VoiceTellTarget_f( void ) { +line 173 +;169: int clientNum; +;170: char command[128]; +;171: char message[128]; +;172: +;173: clientNum = CG_CrosshairPlayer(); +ADDRLP4 260 +ADDRGP4 CG_CrosshairPlayer +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 260 +INDIRI4 +ASGNI4 +line 174 +;174: if ( clientNum == -1 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 -1 +NEI4 $207 +line 175 +;175: return; +ADDRGP4 $206 +JUMPV +LABELV $207 +line 178 +;176: } +;177: +;178: trap_Args( message, 128 ); +ADDRLP4 132 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 trap_Args +CALLV +pop +line 179 +;179: Com_sprintf( command, 128, "vtell %i %s", clientNum, message ); +ADDRLP4 4 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 $209 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 132 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 180 +;180: trap_SendClientCommand( command ); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 181 +;181:} +LABELV $206 +endproc CG_VoiceTellTarget_f 264 20 +proc CG_VoiceTellAttacker_f 264 20 +line 183 +;182: +;183:static void CG_VoiceTellAttacker_f( void ) { +line 188 +;184: int clientNum; +;185: char command[128]; +;186: char message[128]; +;187: +;188: clientNum = CG_LastAttacker(); +ADDRLP4 260 +ADDRGP4 CG_LastAttacker +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 260 +INDIRI4 +ASGNI4 +line 189 +;189: if ( clientNum == -1 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 -1 +NEI4 $211 +line 190 +;190: return; +ADDRGP4 $210 +JUMPV +LABELV $211 +line 193 +;191: } +;192: +;193: trap_Args( message, 128 ); +ADDRLP4 132 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 trap_Args +CALLV +pop +line 194 +;194: Com_sprintf( command, 128, "vtell %i %s", clientNum, message ); +ADDRLP4 4 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 $209 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 132 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 195 +;195: trap_SendClientCommand( command ); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 196 +;196:} +LABELV $210 +endproc CG_VoiceTellAttacker_f 264 20 +proc CG_NextTeamMember_f 0 0 +line 198 +;197: +;198:static void CG_NextTeamMember_f( void ) { +line 199 +;199: CG_SelectNextPlayer(); +ADDRGP4 CG_SelectNextPlayer +CALLV +pop +line 200 +;200:} +LABELV $213 +endproc CG_NextTeamMember_f 0 0 +proc CG_PrevTeamMember_f 0 0 +line 202 +;201: +;202:static void CG_PrevTeamMember_f( void ) { +line 203 +;203: CG_SelectPrevPlayer(); +ADDRGP4 CG_SelectPrevPlayer +CALLV +pop +line 204 +;204:} +LABELV $214 +endproc CG_PrevTeamMember_f 0 0 +proc CG_NextOrder_f 16 0 +line 208 +;205: +;206:// ASS U ME's enumeration order as far as task specific orders, OFFENSE is zero, CAMP is last +;207:// +;208:static void CG_NextOrder_f( void ) { +line 209 +;209: clientInfo_t *ci = cgs.clientinfo + cg.snap->ps.clientNum; +ADDRLP4 0 +CNSTI4 788 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 210 +;210: if (ci) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $218 +line 211 +;211: if (!ci->teamLeader && sortedTeamPlayers[cg_currentSelectedPlayer.integer] != cg.snap->ps.clientNum) { +ADDRLP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $220 +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $220 +line 212 +;212: return; +ADDRGP4 $215 +JUMPV +LABELV $220 +line 214 +;213: } +;214: } +LABELV $218 +line 215 +;215: if (cgs.currentOrder < TEAMTASK_CAMP) { +ADDRGP4 cgs+70236 +INDIRI4 +CNSTI4 7 +GEI4 $224 +line 216 +;216: cgs.currentOrder++; +ADDRLP4 4 +ADDRGP4 cgs+70236 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 218 +;217: +;218: if (cgs.currentOrder == TEAMTASK_RETRIEVE) { +ADDRGP4 cgs+70236 +INDIRI4 +CNSTI4 5 +NEI4 $228 +line 219 +;219: if (!CG_OtherTeamHasFlag()) { +ADDRLP4 8 +ADDRGP4 CG_OtherTeamHasFlag +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $231 +line 220 +;220: cgs.currentOrder++; +ADDRLP4 12 +ADDRGP4 cgs+70236 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 221 +;221: } +LABELV $231 +line 222 +;222: } +LABELV $228 +line 224 +;223: +;224: if (cgs.currentOrder == TEAMTASK_ESCORT) { +ADDRGP4 cgs+70236 +INDIRI4 +CNSTI4 6 +NEI4 $225 +line 225 +;225: if (!CG_YourTeamHasFlag()) { +ADDRLP4 8 +ADDRGP4 CG_YourTeamHasFlag +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $225 +line 226 +;226: cgs.currentOrder++; +ADDRLP4 12 +ADDRGP4 cgs+70236 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 227 +;227: } +line 228 +;228: } +line 230 +;229: +;230: } else { +ADDRGP4 $225 +JUMPV +LABELV $224 +line 231 +;231: cgs.currentOrder = TEAMTASK_OFFENSE; +ADDRGP4 cgs+70236 +CNSTI4 1 +ASGNI4 +line 232 +;232: } +LABELV $225 +line 233 +;233: cgs.orderPending = qtrue; +ADDRGP4 cgs+70240 +CNSTI4 1 +ASGNI4 +line 234 +;234: cgs.orderTime = cg.time + 3000; +ADDRGP4 cgs+70244 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 3000 +ADDI4 +ASGNI4 +line 235 +;235:} +LABELV $215 +endproc CG_NextOrder_f 16 0 +proc CG_ConfirmOrder_f 8 12 +line 238 +;236: +;237: +;238:static void CG_ConfirmOrder_f (void ) { +line 239 +;239: trap_SendConsoleCommand(va("cmd vtell %d %s\n", cgs.acceptLeader, VOICECHAT_YES)); +ADDRGP4 $245 +ARGP4 +ADDRGP4 cgs+70260 +INDIRI4 +ARGI4 +ADDRGP4 $247 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 240 +;240: trap_SendConsoleCommand("+button5; wait; -button5"); +ADDRGP4 $248 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 241 +;241: if (cg.time < cgs.acceptOrderTime) { +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgs+70252 +INDIRI4 +GEI4 $249 +line 242 +;242: trap_SendClientCommand(va("teamtask %d\n", cgs.acceptTask)); +ADDRGP4 $253 +ARGP4 +ADDRGP4 cgs+70256 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 243 +;243: cgs.acceptOrderTime = 0; +ADDRGP4 cgs+70252 +CNSTI4 0 +ASGNI4 +line 244 +;244: } +LABELV $249 +line 245 +;245:} +LABELV $244 +endproc CG_ConfirmOrder_f 8 12 +proc CG_DenyOrder_f 4 12 +line 247 +;246: +;247:static void CG_DenyOrder_f (void ) { +line 248 +;248: trap_SendConsoleCommand(va("cmd vtell %d %s\n", cgs.acceptLeader, VOICECHAT_NO)); +ADDRGP4 $245 +ARGP4 +ADDRGP4 cgs+70260 +INDIRI4 +ARGI4 +ADDRGP4 $258 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 249 +;249: trap_SendConsoleCommand("+button6; wait; -button6"); +ADDRGP4 $259 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 250 +;250: if (cg.time < cgs.acceptOrderTime) { +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgs+70252 +INDIRI4 +GEI4 $260 +line 251 +;251: cgs.acceptOrderTime = 0; +ADDRGP4 cgs+70252 +CNSTI4 0 +ASGNI4 +line 252 +;252: } +LABELV $260 +line 253 +;253:} +LABELV $256 +endproc CG_DenyOrder_f 4 12 +proc CG_TaskOffense_f 4 8 +line 255 +;254: +;255:static void CG_TaskOffense_f (void ) { +line 256 +;256: if (cgs.gametype == GT_CTF || cgs.gametype == GT_CTY) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +EQI4 $270 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $266 +LABELV $270 +line 257 +;257: trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONGETFLAG)); +ADDRGP4 $271 +ARGP4 +ADDRGP4 $272 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 258 +;258: } else { +ADDRGP4 $267 +JUMPV +LABELV $266 +line 259 +;259: trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONOFFENSE)); +ADDRGP4 $271 +ARGP4 +ADDRGP4 $273 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 260 +;260: } +LABELV $267 +line 261 +;261: trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_OFFENSE)); +ADDRGP4 $253 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 262 +;262:} +LABELV $265 +endproc CG_TaskOffense_f 4 8 +proc CG_TaskDefense_f 8 8 +line 264 +;263: +;264:static void CG_TaskDefense_f (void ) { +line 265 +;265: trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONDEFENSE)); +ADDRGP4 $271 +ARGP4 +ADDRGP4 $275 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 266 +;266: trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_DEFENSE)); +ADDRGP4 $253 +ARGP4 +CNSTI4 2 +ARGI4 +ADDRLP4 4 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 267 +;267:} +LABELV $274 +endproc CG_TaskDefense_f 8 8 +proc CG_TaskPatrol_f 8 8 +line 269 +;268: +;269:static void CG_TaskPatrol_f (void ) { +line 270 +;270: trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONPATROL)); +ADDRGP4 $271 +ARGP4 +ADDRGP4 $277 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 271 +;271: trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_PATROL)); +ADDRGP4 $253 +ARGP4 +CNSTI4 3 +ARGI4 +ADDRLP4 4 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 272 +;272:} +LABELV $276 +endproc CG_TaskPatrol_f 8 8 +proc CG_TaskCamp_f 8 8 +line 274 +;273: +;274:static void CG_TaskCamp_f (void ) { +line 275 +;275: trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONCAMPING)); +ADDRGP4 $271 +ARGP4 +ADDRGP4 $279 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 276 +;276: trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_CAMP)); +ADDRGP4 $253 +ARGP4 +CNSTI4 7 +ARGI4 +ADDRLP4 4 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 277 +;277:} +LABELV $278 +endproc CG_TaskCamp_f 8 8 +proc CG_TaskFollow_f 8 8 +line 279 +;278: +;279:static void CG_TaskFollow_f (void ) { +line 280 +;280: trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONFOLLOW)); +ADDRGP4 $271 +ARGP4 +ADDRGP4 $281 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 281 +;281: trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_FOLLOW)); +ADDRGP4 $253 +ARGP4 +CNSTI4 4 +ARGI4 +ADDRLP4 4 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 282 +;282:} +LABELV $280 +endproc CG_TaskFollow_f 8 8 +proc CG_TaskRetrieve_f 8 8 +line 284 +;283: +;284:static void CG_TaskRetrieve_f (void ) { +line 285 +;285: trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONRETURNFLAG)); +ADDRGP4 $271 +ARGP4 +ADDRGP4 $283 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 286 +;286: trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_RETRIEVE)); +ADDRGP4 $253 +ARGP4 +CNSTI4 5 +ARGI4 +ADDRLP4 4 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 287 +;287:} +LABELV $282 +endproc CG_TaskRetrieve_f 8 8 +proc CG_TaskEscort_f 8 8 +line 289 +;288: +;289:static void CG_TaskEscort_f (void ) { +line 290 +;290: trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONFOLLOWCARRIER)); +ADDRGP4 $271 +ARGP4 +ADDRGP4 $285 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 291 +;291: trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_ESCORT)); +ADDRGP4 $253 +ARGP4 +CNSTI4 6 +ARGI4 +ADDRLP4 4 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 292 +;292:} +LABELV $284 +endproc CG_TaskEscort_f 8 8 +proc CG_TaskOwnFlag_f 4 8 +line 294 +;293: +;294:static void CG_TaskOwnFlag_f (void ) { +line 295 +;295: trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_IHAVEFLAG)); +ADDRGP4 $271 +ARGP4 +ADDRGP4 $287 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 296 +;296:} +LABELV $286 +endproc CG_TaskOwnFlag_f 4 8 +proc CG_TauntKillInsult_f 0 4 +line 298 +;297: +;298:static void CG_TauntKillInsult_f (void ) { +line 299 +;299: trap_SendConsoleCommand("cmd vsay kill_insult\n"); +ADDRGP4 $289 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 300 +;300:} +LABELV $288 +endproc CG_TauntKillInsult_f 0 4 +proc CG_TauntPraise_f 0 4 +line 302 +;301: +;302:static void CG_TauntPraise_f (void ) { +line 303 +;303: trap_SendConsoleCommand("cmd vsay praise\n"); +ADDRGP4 $291 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 304 +;304:} +LABELV $290 +endproc CG_TauntPraise_f 0 4 +proc CG_TauntTaunt_f 0 4 +line 306 +;305: +;306:static void CG_TauntTaunt_f (void ) { +line 307 +;307: trap_SendConsoleCommand("cmd vtaunt\n"); +ADDRGP4 $293 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 308 +;308:} +LABELV $292 +endproc CG_TauntTaunt_f 0 4 +proc CG_TauntDeathInsult_f 0 4 +line 310 +;309: +;310:static void CG_TauntDeathInsult_f (void ) { +line 311 +;311: trap_SendConsoleCommand("cmd vsay death_insult\n"); +ADDRGP4 $295 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 312 +;312:} +LABELV $294 +endproc CG_TauntDeathInsult_f 0 4 +proc CG_TauntGauntlet_f 0 4 +line 314 +;313: +;314:static void CG_TauntGauntlet_f (void ) { +line 315 +;315: trap_SendConsoleCommand("cmd vsay kill_guantlet\n"); +ADDRGP4 $297 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 316 +;316:} +LABELV $296 +endproc CG_TauntGauntlet_f 0 4 +proc CG_TaskSuicide_f 136 16 +line 318 +;317: +;318:static void CG_TaskSuicide_f (void ) { +line 322 +;319: int clientNum; +;320: char command[128]; +;321: +;322: clientNum = CG_CrosshairPlayer(); +ADDRLP4 132 +ADDRGP4 CG_CrosshairPlayer +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 132 +INDIRI4 +ASGNI4 +line 323 +;323: if ( clientNum == -1 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 -1 +NEI4 $299 +line 324 +;324: return; +ADDRGP4 $298 +JUMPV +LABELV $299 +line 327 +;325: } +;326: +;327: Com_sprintf( command, 128, "tell %i suicide", clientNum ); +ADDRLP4 4 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 $301 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 328 +;328: trap_SendClientCommand( command ); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_SendClientCommand +CALLV +pop +line 329 +;329:} +LABELV $298 +endproc CG_TaskSuicide_f 136 16 +proc CG_StartOrbit_f 1028 12 +line 369 +;330: +;331: +;332: +;333:/* +;334:================== +;335:CG_TeamMenu_f +;336:================== +;337:*/ +;338:/* +;339:static void CG_TeamMenu_f( void ) { +;340: if (trap_Key_GetCatcher() & KEYCATCH_CGAME) { +;341: CG_EventHandling(CGAME_EVENT_NONE); +;342: trap_Key_SetCatcher(0); +;343: } else { +;344: CG_EventHandling(CGAME_EVENT_TEAMMENU); +;345: //trap_Key_SetCatcher(KEYCATCH_CGAME); +;346: } +;347:} +;348:*/ +;349: +;350:/* +;351:================== +;352:CG_EditHud_f +;353:================== +;354:*/ +;355:/* +;356:static void CG_EditHud_f( void ) { +;357: //cls.keyCatchers ^= KEYCATCH_CGAME; +;358: //VM_Call (cgvm, CG_EVENT_HANDLING, (cls.keyCatchers & KEYCATCH_CGAME) ? CGAME_EVENT_EDITHUD : CGAME_EVENT_NONE); +;359:} +;360:*/ +;361: +;362: +;363:/* +;364:================== +;365:CG_StartOrbit_f +;366:================== +;367:*/ +;368: +;369:static void CG_StartOrbit_f( void ) { +line 372 +;370: char var[MAX_TOKEN_CHARS]; +;371: +;372: trap_Cvar_VariableStringBuffer( "developer", var, sizeof( var ) ); +ADDRGP4 $303 +ARGP4 +ADDRLP4 0 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 trap_Cvar_VariableStringBuffer +CALLV +pop +line 373 +;373: if ( !atoi(var) ) { +ADDRLP4 0 +ARGP4 +ADDRLP4 1024 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 1024 +INDIRI4 +CNSTI4 0 +NEI4 $304 +line 374 +;374: return; +ADDRGP4 $302 +JUMPV +LABELV $304 +line 376 +;375: } +;376: if (cg_cameraOrbit.value != 0) { +ADDRGP4 cg_cameraOrbit+8 +INDIRF4 +CNSTF4 0 +EQF4 $306 +line 377 +;377: trap_Cvar_Set ("cg_cameraOrbit", "0"); +ADDRGP4 $182 +ARGP4 +ADDRGP4 $189 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 378 +;378: trap_Cvar_Set("cg_thirdPerson", "0"); +ADDRGP4 $186 +ARGP4 +ADDRGP4 $189 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 379 +;379: } else { +ADDRGP4 $307 +JUMPV +LABELV $306 +line 380 +;380: trap_Cvar_Set("cg_cameraOrbit", "5"); +ADDRGP4 $182 +ARGP4 +ADDRGP4 $309 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 381 +;381: trap_Cvar_Set("cg_thirdPerson", "1"); +ADDRGP4 $186 +ARGP4 +ADDRGP4 $187 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 382 +;382: trap_Cvar_Set("cg_thirdPersonAngle", "0"); +ADDRGP4 $188 +ARGP4 +ADDRGP4 $189 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 383 +;383: trap_Cvar_Set("cg_thirdPersonRange", "100"); +ADDRGP4 $190 +ARGP4 +ADDRGP4 $191 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 384 +;384: } +LABELV $307 +line 385 +;385:} +LABELV $302 +endproc CG_StartOrbit_f 1028 12 +data +align 4 +LABELV commands +address $311 +address CG_TestGun_f +address $312 +address CG_TestModel_f +address $313 +address CG_TestModelNextFrame_f +address $314 +address CG_TestModelPrevFrame_f +address $315 +address CG_TestModelNextSkin_f +address $316 +address CG_TestModelPrevSkin_f +address $317 +address CG_Viewpos_f +address $318 +address CG_ScoresDown_f +address $319 +address CG_ScoresUp_f +address $320 +address CG_SizeUp_f +address $321 +address CG_SizeDown_f +address $322 +address CG_NextWeapon_f +address $323 +address CG_PrevWeapon_f +address $324 +address CG_Weapon_f +address $325 +address CG_TellTarget_f +address $326 +address CG_TellAttacker_f +address $327 +address CG_VoiceTellTarget_f +address $328 +address CG_VoiceTellAttacker_f +address $329 +address CG_TargetCommand_f +address $330 +address CG_NextTeamMember_f +address $331 +address CG_PrevTeamMember_f +address $332 +address CG_NextOrder_f +address $333 +address CG_ConfirmOrder_f +address $334 +address CG_DenyOrder_f +address $335 +address CG_TaskOffense_f +address $336 +address CG_TaskDefense_f +address $337 +address CG_TaskPatrol_f +address $338 +address CG_TaskCamp_f +address $339 +address CG_TaskFollow_f +address $340 +address CG_TaskRetrieve_f +address $341 +address CG_TaskEscort_f +address $342 +address CG_TaskSuicide_f +address $343 +address CG_TaskOwnFlag_f +address $344 +address CG_TauntKillInsult_f +address $345 +address CG_TauntPraise_f +address $346 +address CG_TauntTaunt_f +address $347 +address CG_TauntDeathInsult_f +address $348 +address CG_TauntGauntlet_f +address $349 +address CG_spWin_f +address $350 +address CG_spLose_f +address $351 +address CG_scrollScoresDown_f +address $352 +address CG_scrollScoresUp_f +address $353 +address CG_StartOrbit_f +address $354 +address CG_LoadDeferredPlayers +address $355 +address CG_NextInventory_f +address $356 +address CG_PrevInventory_f +address $357 +address CG_NextForcePower_f +address $358 +address CG_PrevForcePower_f +export CG_ConsoleCommand +code +proc CG_ConsoleCommand 16 8 +line 467 +;386: +;387:/* +;388:static void CG_Camera_f( void ) { +;389: char name[1024]; +;390: trap_Argv( 1, name, sizeof(name)); +;391: if (trap_loadCamera(name)) { +;392: cg.cameraMode = qtrue; +;393: trap_startCamera(cg.time); +;394: } else { +;395: CG_Printf ("Unable to load camera %s\n",name); +;396: } +;397:} +;398:*/ +;399: +;400: +;401:typedef struct { +;402: char *cmd; +;403: void (*function)(void); +;404:} consoleCommand_t; +;405: +;406:static consoleCommand_t commands[] = { +;407: { "testgun", CG_TestGun_f }, +;408: { "testmodel", CG_TestModel_f }, +;409: { "nextframe", CG_TestModelNextFrame_f }, +;410: { "prevframe", CG_TestModelPrevFrame_f }, +;411: { "nextskin", CG_TestModelNextSkin_f }, +;412: { "prevskin", CG_TestModelPrevSkin_f }, +;413: { "viewpos", CG_Viewpos_f }, +;414: { "+scores", CG_ScoresDown_f }, +;415: { "-scores", CG_ScoresUp_f }, +;416: { "sizeup", CG_SizeUp_f }, +;417: { "sizedown", CG_SizeDown_f }, +;418: { "weapnext", CG_NextWeapon_f }, +;419: { "weapprev", CG_PrevWeapon_f }, +;420: { "weapon", CG_Weapon_f }, +;421: { "tell_target", CG_TellTarget_f }, +;422: { "tell_attacker", CG_TellAttacker_f }, +;423: { "vtell_target", CG_VoiceTellTarget_f }, +;424: { "vtell_attacker", CG_VoiceTellAttacker_f }, +;425: { "tcmd", CG_TargetCommand_f }, +;426: { "nextTeamMember", CG_NextTeamMember_f }, +;427: { "prevTeamMember", CG_PrevTeamMember_f }, +;428: { "nextOrder", CG_NextOrder_f }, +;429: { "confirmOrder", CG_ConfirmOrder_f }, +;430: { "denyOrder", CG_DenyOrder_f }, +;431: { "taskOffense", CG_TaskOffense_f }, +;432: { "taskDefense", CG_TaskDefense_f }, +;433: { "taskPatrol", CG_TaskPatrol_f }, +;434: { "taskCamp", CG_TaskCamp_f }, +;435: { "taskFollow", CG_TaskFollow_f }, +;436: { "taskRetrieve", CG_TaskRetrieve_f }, +;437: { "taskEscort", CG_TaskEscort_f }, +;438: { "taskSuicide", CG_TaskSuicide_f }, +;439: { "taskOwnFlag", CG_TaskOwnFlag_f }, +;440: { "tauntKillInsult", CG_TauntKillInsult_f }, +;441: { "tauntPraise", CG_TauntPraise_f }, +;442: { "tauntTaunt", CG_TauntTaunt_f }, +;443: { "tauntDeathInsult", CG_TauntDeathInsult_f }, +;444: { "tauntGauntlet", CG_TauntGauntlet_f }, +;445: { "spWin", CG_spWin_f }, +;446: { "spLose", CG_spLose_f }, +;447: { "scoresDown", CG_scrollScoresDown_f }, +;448: { "scoresUp", CG_scrollScoresUp_f }, +;449: { "startOrbit", CG_StartOrbit_f }, +;450: //{ "camera", CG_Camera_f }, +;451: { "loaddeferred", CG_LoadDeferredPlayers }, +;452: { "invnext", CG_NextInventory_f }, +;453: { "invprev", CG_PrevInventory_f }, +;454: { "forcenext", CG_NextForcePower_f }, +;455: { "forceprev", CG_PrevForcePower_f } +;456:}; +;457: +;458: +;459:/* +;460:================= +;461:CG_ConsoleCommand +;462: +;463:The string has been tokenized and can be retrieved with +;464:Cmd_Argc() / Cmd_Argv() +;465:================= +;466:*/ +;467:qboolean CG_ConsoleCommand( void ) { +line 471 +;468: const char *cmd; +;469: int i; +;470: +;471: cmd = CG_Argv(0); +CNSTI4 0 +ARGI4 +ADDRLP4 8 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 473 +;472: +;473: for ( i = 0 ; i < sizeof( commands ) / sizeof( commands[0] ) ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $363 +JUMPV +LABELV $360 +line 474 +;474: if ( !Q_stricmp( cmd, commands[i].cmd ) ) { +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 commands +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $364 +line 475 +;475: commands[i].function(); +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 commands+4 +ADDP4 +INDIRP4 +CALLV +pop +line 476 +;476: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $359 +JUMPV +LABELV $364 +line 478 +;477: } +;478: } +LABELV $361 +line 473 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $363 +ADDRLP4 0 +INDIRI4 +CVIU4 4 +CNSTU4 48 +LTU4 $360 +line 480 +;479: +;480: return qfalse; +CNSTI4 0 +RETI4 +LABELV $359 +endproc CG_ConsoleCommand 16 8 +export CG_InitConsoleCommands +proc CG_InitConsoleCommands 4 4 +line 492 +;481:} +;482: +;483: +;484:/* +;485:================= +;486:CG_InitConsoleCommands +;487: +;488:Let the client system know about all of our commands +;489:so it can perform tab completion +;490:================= +;491:*/ +;492:void CG_InitConsoleCommands( void ) { +line 495 +;493: int i; +;494: +;495: for ( i = 0 ; i < sizeof( commands ) / sizeof( commands[0] ) ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $371 +JUMPV +LABELV $368 +line 496 +;496: trap_AddCommand( commands[i].cmd ); +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 commands +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 497 +;497: } +LABELV $369 +line 495 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $371 +ADDRLP4 0 +INDIRI4 +CVIU4 4 +CNSTU4 48 +LTU4 $368 +line 503 +;498: +;499: // +;500: // the game server will interpret these commands, which will be automatically +;501: // forwarded to the server after they are not recognized locally +;502: // +;503: trap_AddCommand ("forcechanged"); +ADDRGP4 $372 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 504 +;504: trap_AddCommand ("sv_invnext"); +ADDRGP4 $373 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 505 +;505: trap_AddCommand ("sv_invprev"); +ADDRGP4 $374 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 506 +;506: trap_AddCommand ("sv_forcenext"); +ADDRGP4 $375 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 507 +;507: trap_AddCommand ("sv_forceprev"); +ADDRGP4 $376 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 508 +;508: trap_AddCommand ("sv_saberswitch"); +ADDRGP4 $377 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 509 +;509: trap_AddCommand ("engage_duel"); +ADDRGP4 $378 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 510 +;510: trap_AddCommand ("force_heal"); +ADDRGP4 $379 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 511 +;511: trap_AddCommand ("force_speed"); +ADDRGP4 $380 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 512 +;512: trap_AddCommand ("force_throw"); +ADDRGP4 $381 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 513 +;513: trap_AddCommand ("force_pull"); +ADDRGP4 $382 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 514 +;514: trap_AddCommand ("force_distract"); +ADDRGP4 $383 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 515 +;515: trap_AddCommand ("force_rage"); +ADDRGP4 $384 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 516 +;516: trap_AddCommand ("force_protect"); +ADDRGP4 $385 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 517 +;517: trap_AddCommand ("force_absorb"); +ADDRGP4 $386 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 518 +;518: trap_AddCommand ("force_healother"); +ADDRGP4 $387 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 519 +;519: trap_AddCommand ("force_forcepowerother"); +ADDRGP4 $388 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 520 +;520: trap_AddCommand ("force_seeing"); +ADDRGP4 $389 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 521 +;521: trap_AddCommand ("use_seeker"); +ADDRGP4 $390 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 522 +;522: trap_AddCommand ("use_field"); +ADDRGP4 $391 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 523 +;523: trap_AddCommand ("use_bacta"); +ADDRGP4 $392 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 524 +;524: trap_AddCommand ("use_electrobinoculars"); +ADDRGP4 $393 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 525 +;525: trap_AddCommand ("zoom"); +ADDRGP4 $394 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 526 +;526: trap_AddCommand ("use_sentry"); +ADDRGP4 $395 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 527 +;527: trap_AddCommand ("bot_order"); +ADDRGP4 $396 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 528 +;528: trap_AddCommand ("saberAttackCycle"); +ADDRGP4 $397 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 529 +;529: trap_AddCommand ("kill"); +ADDRGP4 $398 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 530 +;530: trap_AddCommand ("say"); +ADDRGP4 $399 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 531 +;531: trap_AddCommand ("say_team"); +ADDRGP4 $400 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 532 +;532: trap_AddCommand ("tell"); +ADDRGP4 $401 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 533 +;533: trap_AddCommand ("vsay"); +ADDRGP4 $402 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 534 +;534: trap_AddCommand ("vsay_team"); +ADDRGP4 $403 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 535 +;535: trap_AddCommand ("vtell"); +ADDRGP4 $404 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 536 +;536: trap_AddCommand ("vtaunt"); +ADDRGP4 $405 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 537 +;537: trap_AddCommand ("vosay"); +ADDRGP4 $406 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 538 +;538: trap_AddCommand ("vosay_team"); +ADDRGP4 $407 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 539 +;539: trap_AddCommand ("votell"); +ADDRGP4 $408 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 540 +;540: trap_AddCommand ("give"); +ADDRGP4 $409 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 541 +;541: trap_AddCommand ("god"); +ADDRGP4 $410 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 542 +;542: trap_AddCommand ("notarget"); +ADDRGP4 $411 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 543 +;543: trap_AddCommand ("noclip"); +ADDRGP4 $412 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 544 +;544: trap_AddCommand ("team"); +ADDRGP4 $413 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 545 +;545: trap_AddCommand ("follow"); +ADDRGP4 $414 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 546 +;546: trap_AddCommand ("levelshot"); +ADDRGP4 $415 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 547 +;547: trap_AddCommand ("addbot"); +ADDRGP4 $416 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 548 +;548: trap_AddCommand ("setviewpos"); +ADDRGP4 $417 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 549 +;549: trap_AddCommand ("callvote"); +ADDRGP4 $418 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 550 +;550: trap_AddCommand ("vote"); +ADDRGP4 $419 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 551 +;551: trap_AddCommand ("callteamvote"); +ADDRGP4 $420 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 552 +;552: trap_AddCommand ("teamvote"); +ADDRGP4 $421 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 553 +;553: trap_AddCommand ("stats"); +ADDRGP4 $422 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 554 +;554: trap_AddCommand ("teamtask"); +ADDRGP4 $423 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 555 +;555: trap_AddCommand ("loaddefered"); // spelled wrong, but not changing for demo +ADDRGP4 $424 +ARGP4 +ADDRGP4 trap_AddCommand +CALLV +pop +line 556 +;556:} +LABELV $367 +endproc CG_InitConsoleCommands 4 4 +import menuScoreboard +import trap_SP_Register +import trap_SP_RegisterServer +import trap_PC_RemoveAllGlobalDefines +import trap_PC_LoadGlobalDefines +import trap_PC_SourceFileAndLine +import trap_PC_ReadToken +import trap_PC_FreeSource +import trap_PC_LoadSource +import trap_PC_AddGlobalDefine +import Controls_SetConfig +import Controls_GetConfig +import UI_OutOfMemory +import UI_InitMemory +import UI_Alloc +import Display_CacheAll +import Menu_SetFeederSelection +import Menu_Paint +import Menus_CloseAll +import LerpColor +import Display_HandleKey +import Menus_CloseByName +import Menus_ShowByName +import Menus_FindByName +import Menus_OpenByName +import Display_KeyBindPending +import Display_CursorType +import Display_MouseMove +import Display_CaptureItem +import Display_GetContext +import Menus_Activate +import Menus_AnyFullScreenVisible +import Menu_Reset +import Menus_ActivateByName +import Menu_PaintAll +import Menu_New +import Menu_Count +import PC_Script_Parse +import PC_String_Parse +import PC_Rect_Parse +import PC_Int_Parse +import PC_Color_Parse +import PC_Float_Parse +import Script_Parse +import String_Parse +import Rect_Parse +import Int_Parse +import Color_Parse +import Float_Parse +import Menu_ScrollFeeder +import Menu_HandleMouseMove +import Menu_HandleKey +import Menu_GetFocused +import Menu_PostParse +import Item_Init +import Menu_Init +import Display_ExpandMacros +import Init_Display +import String_Report +import String_Init +import String_Alloc +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $424 +char 1 108 +char 1 111 +char 1 97 +char 1 100 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 114 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $423 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 0 +align 1 +LABELV $422 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $421 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 118 +char 1 111 +char 1 116 +char 1 101 +char 1 0 +align 1 +LABELV $420 +char 1 99 +char 1 97 +char 1 108 +char 1 108 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 118 +char 1 111 +char 1 116 +char 1 101 +char 1 0 +align 1 +LABELV $419 +char 1 118 +char 1 111 +char 1 116 +char 1 101 +char 1 0 +align 1 +LABELV $418 +char 1 99 +char 1 97 +char 1 108 +char 1 108 +char 1 118 +char 1 111 +char 1 116 +char 1 101 +char 1 0 +align 1 +LABELV $417 +char 1 115 +char 1 101 +char 1 116 +char 1 118 +char 1 105 +char 1 101 +char 1 119 +char 1 112 +char 1 111 +char 1 115 +char 1 0 +align 1 +LABELV $416 +char 1 97 +char 1 100 +char 1 100 +char 1 98 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $415 +char 1 108 +char 1 101 +char 1 118 +char 1 101 +char 1 108 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $414 +char 1 102 +char 1 111 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $413 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 0 +align 1 +LABELV $412 +char 1 110 +char 1 111 +char 1 99 +char 1 108 +char 1 105 +char 1 112 +char 1 0 +align 1 +LABELV $411 +char 1 110 +char 1 111 +char 1 116 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $410 +char 1 103 +char 1 111 +char 1 100 +char 1 0 +align 1 +LABELV $409 +char 1 103 +char 1 105 +char 1 118 +char 1 101 +char 1 0 +align 1 +LABELV $408 +char 1 118 +char 1 111 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $407 +char 1 118 +char 1 111 +char 1 115 +char 1 97 +char 1 121 +char 1 95 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 0 +align 1 +LABELV $406 +char 1 118 +char 1 111 +char 1 115 +char 1 97 +char 1 121 +char 1 0 +align 1 +LABELV $405 +char 1 118 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $404 +char 1 118 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $403 +char 1 118 +char 1 115 +char 1 97 +char 1 121 +char 1 95 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 0 +align 1 +LABELV $402 +char 1 118 +char 1 115 +char 1 97 +char 1 121 +char 1 0 +align 1 +LABELV $401 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $400 +char 1 115 +char 1 97 +char 1 121 +char 1 95 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 0 +align 1 +LABELV $399 +char 1 115 +char 1 97 +char 1 121 +char 1 0 +align 1 +LABELV $398 +char 1 107 +char 1 105 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $397 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 65 +char 1 116 +char 1 116 +char 1 97 +char 1 99 +char 1 107 +char 1 67 +char 1 121 +char 1 99 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $396 +char 1 98 +char 1 111 +char 1 116 +char 1 95 +char 1 111 +char 1 114 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $395 +char 1 117 +char 1 115 +char 1 101 +char 1 95 +char 1 115 +char 1 101 +char 1 110 +char 1 116 +char 1 114 +char 1 121 +char 1 0 +align 1 +LABELV $394 +char 1 122 +char 1 111 +char 1 111 +char 1 109 +char 1 0 +align 1 +LABELV $393 +char 1 117 +char 1 115 +char 1 101 +char 1 95 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 114 +char 1 111 +char 1 98 +char 1 105 +char 1 110 +char 1 111 +char 1 99 +char 1 117 +char 1 108 +char 1 97 +char 1 114 +char 1 115 +char 1 0 +align 1 +LABELV $392 +char 1 117 +char 1 115 +char 1 101 +char 1 95 +char 1 98 +char 1 97 +char 1 99 +char 1 116 +char 1 97 +char 1 0 +align 1 +LABELV $391 +char 1 117 +char 1 115 +char 1 101 +char 1 95 +char 1 102 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $390 +char 1 117 +char 1 115 +char 1 101 +char 1 95 +char 1 115 +char 1 101 +char 1 101 +char 1 107 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $389 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 115 +char 1 101 +char 1 101 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $388 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 111 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $387 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 111 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $386 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 97 +char 1 98 +char 1 115 +char 1 111 +char 1 114 +char 1 98 +char 1 0 +align 1 +LABELV $385 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 112 +char 1 114 +char 1 111 +char 1 116 +char 1 101 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $384 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 114 +char 1 97 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $383 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 100 +char 1 105 +char 1 115 +char 1 116 +char 1 114 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $382 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 112 +char 1 117 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $381 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 116 +char 1 104 +char 1 114 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $380 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 115 +char 1 112 +char 1 101 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $379 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $378 +char 1 101 +char 1 110 +char 1 103 +char 1 97 +char 1 103 +char 1 101 +char 1 95 +char 1 100 +char 1 117 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $377 +char 1 115 +char 1 118 +char 1 95 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 119 +char 1 105 +char 1 116 +char 1 99 +char 1 104 +char 1 0 +align 1 +LABELV $376 +char 1 115 +char 1 118 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 0 +align 1 +LABELV $375 +char 1 115 +char 1 118 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $374 +char 1 115 +char 1 118 +char 1 95 +char 1 105 +char 1 110 +char 1 118 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 0 +align 1 +LABELV $373 +char 1 115 +char 1 118 +char 1 95 +char 1 105 +char 1 110 +char 1 118 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $372 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 99 +char 1 104 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $358 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 0 +align 1 +LABELV $357 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $356 +char 1 105 +char 1 110 +char 1 118 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 0 +align 1 +LABELV $355 +char 1 105 +char 1 110 +char 1 118 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $354 +char 1 108 +char 1 111 +char 1 97 +char 1 100 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 114 +char 1 114 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $353 +char 1 115 +char 1 116 +char 1 97 +char 1 114 +char 1 116 +char 1 79 +char 1 114 +char 1 98 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $352 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 115 +char 1 85 +char 1 112 +char 1 0 +align 1 +LABELV $351 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 115 +char 1 68 +char 1 111 +char 1 119 +char 1 110 +char 1 0 +align 1 +LABELV $350 +char 1 115 +char 1 112 +char 1 76 +char 1 111 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $349 +char 1 115 +char 1 112 +char 1 87 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $348 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 71 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 108 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $347 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 68 +char 1 101 +char 1 97 +char 1 116 +char 1 104 +char 1 73 +char 1 110 +char 1 115 +char 1 117 +char 1 108 +char 1 116 +char 1 0 +align 1 +LABELV $346 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 84 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $345 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 80 +char 1 114 +char 1 97 +char 1 105 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $344 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 75 +char 1 105 +char 1 108 +char 1 108 +char 1 73 +char 1 110 +char 1 115 +char 1 117 +char 1 108 +char 1 116 +char 1 0 +align 1 +LABELV $343 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 79 +char 1 119 +char 1 110 +char 1 70 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $342 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 83 +char 1 117 +char 1 105 +char 1 99 +char 1 105 +char 1 100 +char 1 101 +char 1 0 +align 1 +LABELV $341 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 69 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 116 +char 1 0 +align 1 +LABELV $340 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 82 +char 1 101 +char 1 116 +char 1 114 +char 1 105 +char 1 101 +char 1 118 +char 1 101 +char 1 0 +align 1 +LABELV $339 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 70 +char 1 111 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $338 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 67 +char 1 97 +char 1 109 +char 1 112 +char 1 0 +align 1 +LABELV $337 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 80 +char 1 97 +char 1 116 +char 1 114 +char 1 111 +char 1 108 +char 1 0 +align 1 +LABELV $336 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 68 +char 1 101 +char 1 102 +char 1 101 +char 1 110 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $335 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 79 +char 1 102 +char 1 102 +char 1 101 +char 1 110 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $334 +char 1 100 +char 1 101 +char 1 110 +char 1 121 +char 1 79 +char 1 114 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $333 +char 1 99 +char 1 111 +char 1 110 +char 1 102 +char 1 105 +char 1 114 +char 1 109 +char 1 79 +char 1 114 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $332 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 79 +char 1 114 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $331 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 84 +char 1 101 +char 1 97 +char 1 109 +char 1 77 +char 1 101 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $330 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 84 +char 1 101 +char 1 97 +char 1 109 +char 1 77 +char 1 101 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $329 +char 1 116 +char 1 99 +char 1 109 +char 1 100 +char 1 0 +align 1 +LABELV $328 +char 1 118 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 95 +char 1 97 +char 1 116 +char 1 116 +char 1 97 +char 1 99 +char 1 107 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $327 +char 1 118 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 95 +char 1 116 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $326 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 95 +char 1 97 +char 1 116 +char 1 116 +char 1 97 +char 1 99 +char 1 107 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $325 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 95 +char 1 116 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $324 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $323 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 0 +align 1 +LABELV $322 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $321 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 100 +char 1 111 +char 1 119 +char 1 110 +char 1 0 +align 1 +LABELV $320 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 117 +char 1 112 +char 1 0 +align 1 +LABELV $319 +char 1 45 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 115 +char 1 0 +align 1 +LABELV $318 +char 1 43 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 115 +char 1 0 +align 1 +LABELV $317 +char 1 118 +char 1 105 +char 1 101 +char 1 119 +char 1 112 +char 1 111 +char 1 115 +char 1 0 +align 1 +LABELV $316 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 115 +char 1 107 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $315 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 115 +char 1 107 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $314 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 102 +char 1 114 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $313 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 102 +char 1 114 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $312 +char 1 116 +char 1 101 +char 1 115 +char 1 116 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $311 +char 1 116 +char 1 101 +char 1 115 +char 1 116 +char 1 103 +char 1 117 +char 1 110 +char 1 0 +align 1 +LABELV $309 +char 1 53 +char 1 0 +align 1 +LABELV $303 +char 1 100 +char 1 101 +char 1 118 +char 1 101 +char 1 108 +char 1 111 +char 1 112 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $301 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 115 +char 1 117 +char 1 105 +char 1 99 +char 1 105 +char 1 100 +char 1 101 +char 1 0 +align 1 +LABELV $297 +char 1 99 +char 1 109 +char 1 100 +char 1 32 +char 1 118 +char 1 115 +char 1 97 +char 1 121 +char 1 32 +char 1 107 +char 1 105 +char 1 108 +char 1 108 +char 1 95 +char 1 103 +char 1 117 +char 1 97 +char 1 110 +char 1 116 +char 1 108 +char 1 101 +char 1 116 +char 1 10 +char 1 0 +align 1 +LABELV $295 +char 1 99 +char 1 109 +char 1 100 +char 1 32 +char 1 118 +char 1 115 +char 1 97 +char 1 121 +char 1 32 +char 1 100 +char 1 101 +char 1 97 +char 1 116 +char 1 104 +char 1 95 +char 1 105 +char 1 110 +char 1 115 +char 1 117 +char 1 108 +char 1 116 +char 1 10 +char 1 0 +align 1 +LABELV $293 +char 1 99 +char 1 109 +char 1 100 +char 1 32 +char 1 118 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 10 +char 1 0 +align 1 +LABELV $291 +char 1 99 +char 1 109 +char 1 100 +char 1 32 +char 1 118 +char 1 115 +char 1 97 +char 1 121 +char 1 32 +char 1 112 +char 1 114 +char 1 97 +char 1 105 +char 1 115 +char 1 101 +char 1 10 +char 1 0 +align 1 +LABELV $289 +char 1 99 +char 1 109 +char 1 100 +char 1 32 +char 1 118 +char 1 115 +char 1 97 +char 1 121 +char 1 32 +char 1 107 +char 1 105 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 110 +char 1 115 +char 1 117 +char 1 108 +char 1 116 +char 1 10 +char 1 0 +align 1 +LABELV $287 +char 1 105 +char 1 104 +char 1 97 +char 1 118 +char 1 101 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $285 +char 1 111 +char 1 110 +char 1 102 +char 1 111 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 114 +char 1 114 +char 1 105 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $283 +char 1 111 +char 1 110 +char 1 114 +char 1 101 +char 1 116 +char 1 117 +char 1 114 +char 1 110 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $281 +char 1 111 +char 1 110 +char 1 102 +char 1 111 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $279 +char 1 111 +char 1 110 +char 1 99 +char 1 97 +char 1 109 +char 1 112 +char 1 0 +align 1 +LABELV $277 +char 1 111 +char 1 110 +char 1 112 +char 1 97 +char 1 116 +char 1 114 +char 1 111 +char 1 108 +char 1 0 +align 1 +LABELV $275 +char 1 111 +char 1 110 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 110 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $273 +char 1 111 +char 1 110 +char 1 111 +char 1 102 +char 1 102 +char 1 101 +char 1 110 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $272 +char 1 111 +char 1 110 +char 1 103 +char 1 101 +char 1 116 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $271 +char 1 99 +char 1 109 +char 1 100 +char 1 32 +char 1 118 +char 1 115 +char 1 97 +char 1 121 +char 1 95 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $259 +char 1 43 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 54 +char 1 59 +char 1 32 +char 1 119 +char 1 97 +char 1 105 +char 1 116 +char 1 59 +char 1 32 +char 1 45 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 54 +char 1 0 +align 1 +LABELV $258 +char 1 110 +char 1 111 +char 1 0 +align 1 +LABELV $253 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 32 +char 1 37 +char 1 100 +char 1 10 +char 1 0 +align 1 +LABELV $248 +char 1 43 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 53 +char 1 59 +char 1 32 +char 1 119 +char 1 97 +char 1 105 +char 1 116 +char 1 59 +char 1 32 +char 1 45 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 53 +char 1 0 +align 1 +LABELV $247 +char 1 121 +char 1 101 +char 1 115 +char 1 0 +align 1 +LABELV $245 +char 1 99 +char 1 109 +char 1 100 +char 1 32 +char 1 118 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 32 +char 1 37 +char 1 100 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $209 +char 1 118 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $202 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $198 +char 1 89 +char 1 79 +char 1 85 +char 1 32 +char 1 76 +char 1 79 +char 1 83 +char 1 69 +char 1 46 +char 1 46 +char 1 46 +char 1 0 +align 1 +LABELV $194 +char 1 89 +char 1 79 +char 1 85 +char 1 32 +char 1 87 +char 1 73 +char 1 78 +char 1 33 +char 1 0 +align 1 +LABELV $191 +char 1 49 +char 1 48 +char 1 48 +char 1 0 +align 1 +LABELV $190 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 82 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $189 +char 1 48 +char 1 0 +align 1 +LABELV $188 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 65 +char 1 110 +char 1 103 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $187 +char 1 49 +char 1 0 +align 1 +LABELV $186 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $185 +char 1 51 +char 1 53 +char 1 0 +align 1 +LABELV $184 +char 1 99 +char 1 103 +char 1 95 +char 1 99 +char 1 97 +char 1 109 +char 1 101 +char 1 114 +char 1 97 +char 1 79 +char 1 114 +char 1 98 +char 1 105 +char 1 116 +char 1 68 +char 1 101 +char 1 108 +char 1 97 +char 1 121 +char 1 0 +align 1 +LABELV $183 +char 1 50 +char 1 0 +align 1 +LABELV $182 +char 1 99 +char 1 103 +char 1 95 +char 1 99 +char 1 97 +char 1 109 +char 1 101 +char 1 114 +char 1 97 +char 1 79 +char 1 114 +char 1 98 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $159 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 0 +align 1 +LABELV $140 +char 1 37 +char 1 115 +char 1 32 +char 1 40 +char 1 37 +char 1 105 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 37 +char 1 105 +char 1 41 +char 1 32 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 10 +char 1 0 +align 1 +LABELV $135 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $134 +char 1 99 +char 1 103 +char 1 95 +char 1 118 +char 1 105 +char 1 101 +char 1 119 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 0 +align 1 +LABELV $132 +char 1 103 +char 1 99 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 37 +char 1 105 +char 1 0 diff --git a/code/cgame/vm/cg_draw.asm b/code/cgame/vm/cg_draw.asm new file mode 100644 index 0000000..8a49c04 --- /dev/null +++ b/code/cgame/vm/cg_draw.asm @@ -0,0 +1,24405 @@ +data +export menuScoreboard +align 4 +LABELV menuScoreboard +byte 4 0 +export bluehudtint +align 4 +LABELV bluehudtint +byte 4 1056964608 +byte 4 1056964608 +byte 4 1065353216 +byte 4 1065353216 +export redhudtint +align 4 +LABELV redhudtint +byte 4 1065353216 +byte 4 1056964608 +byte 4 1056964608 +byte 4 1065353216 +export showPowersName +align 4 +LABELV showPowersName +address $129 +address $130 +address $131 +address $132 +address $133 +address $134 +address $135 +address $136 +address $137 +address $138 +address $139 +address $140 +address $141 +address $142 +address $143 +address $144 +address $145 +address $146 +byte 4 0 +export MenuFontToHandle +code +proc MenuFontToHandle 4 0 +file "../cg_draw.c" +line 56 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_draw.c -- draw all of the graphical elements during +;4:// active (after loading) gameplay +;5: +;6:#include "cg_local.h" +;7: +;8:#include "../ui/ui_shared.h" +;9: +;10:qboolean CG_WorldCoordToScreenCoordFloat(vec3_t worldCoord, float *x, float *y); +;11:qboolean CG_CalcMuzzlePoint( int entityNum, vec3_t muzzle ); +;12: +;13:// used for scoreboard +;14:extern displayContextDef_t cgDC; +;15:menuDef_t *menuScoreboard = NULL; +;16:vec4_t bluehudtint = {0.5, 0.5, 1.0, 1.0}; +;17:vec4_t redhudtint = {1.0, 0.5, 0.5, 1.0}; +;18:float *hudTintColor; +;19: +;20:int sortedTeamPlayers[TEAM_MAXOVERLAY]; +;21:int numSortedTeamPlayers; +;22: +;23:int lastvalidlockdif; +;24: +;25:extern float zoomFov; //this has to be global client-side +;26: +;27:char systemChat[256]; +;28:char teamChat1[256]; +;29:char teamChat2[256]; +;30: +;31:char *showPowersName[] = +;32:{ +;33: "HEAL2",//FP_HEAL +;34: "JUMP2",//FP_LEVITATION +;35: "SPEED2",//FP_SPEED +;36: "PUSH2",//FP_PUSH +;37: "PULL2",//FP_PULL +;38: "MINDTRICK2",//FP_TELEPTAHY +;39: "GRIP2",//FP_GRIP +;40: "LIGHTNING2",//FP_LIGHTNING +;41: "DARK_RAGE2",//FP_RAGE +;42: "PROTECT2",//FP_PROTECT +;43: "ABSORB2",//FP_ABSORB +;44: "TEAM_HEAL2",//FP_TEAM_HEAL +;45: "TEAM_REPLENISH2",//FP_TEAM_FORCE +;46: "DRAIN2",//FP_DRAIN +;47: "SEEING2",//FP_SEE +;48: "SABER_OFFENSE2",//FP_SABERATTACK +;49: "SABER_DEFENSE2",//FP_SABERDEFEND +;50: "SABER_THROW2",//FP_SABERTHROW +;51: NULL +;52:}; +;53: +;54: +;55:int MenuFontToHandle(int iMenuFont) +;56:{ +line 57 +;57: switch (iMenuFont) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +EQI4 $150 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +EQI4 $153 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +EQI4 $156 +ADDRGP4 $148 +JUMPV +line 58 +;58: { +LABELV $150 +line 59 +;59: case FONT_SMALL: return cgDC.Assets.qhSmallFont; +ADDRGP4 cgDC+260+12 +INDIRI4 +RETI4 +ADDRGP4 $147 +JUMPV +LABELV $153 +line 60 +;60: case FONT_MEDIUM: return cgDC.Assets.qhMediumFont; +ADDRGP4 cgDC+260+16 +INDIRI4 +RETI4 +ADDRGP4 $147 +JUMPV +LABELV $156 +line 61 +;61: case FONT_LARGE: return cgDC.Assets.qhBigFont; +ADDRGP4 cgDC+260+20 +INDIRI4 +RETI4 +ADDRGP4 $147 +JUMPV +LABELV $148 +line 64 +;62: } +;63: +;64: return cgDC.Assets.qhMediumFont; +ADDRGP4 cgDC+260+16 +INDIRI4 +RETI4 +LABELV $147 +endproc MenuFontToHandle 4 0 +export CG_Text_Width +proc CG_Text_Width 12 12 +line 68 +;65:} +;66: +;67:int CG_Text_Width(const char *text, float scale, int iMenuFont) +;68:{ +line 69 +;69: int iFontIndex = MenuFontToHandle(iMenuFont); +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 MenuFontToHandle +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 71 +;70: +;71: return trap_R_Font_StrLenPixels(text, iFontIndex, scale); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 trap_R_Font_StrLenPixels +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +RETI4 +LABELV $161 +endproc CG_Text_Width 12 12 +export CG_Text_Height +proc CG_Text_Height 12 8 +line 75 +;72:} +;73: +;74:int CG_Text_Height(const char *text, float scale, int iMenuFont) +;75:{ +line 76 +;76: int iFontIndex = MenuFontToHandle(iMenuFont); +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 MenuFontToHandle +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 78 +;77: +;78: return trap_R_Font_HeightPixels(iFontIndex, scale); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 trap_R_Font_HeightPixels +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +RETI4 +LABELV $162 +endproc CG_Text_Height 12 8 +export CG_Text_Paint +proc CG_Text_Paint 20 28 +line 83 +;79:} +;80: +;81:#include "../qcommon/qfiles.h" // for STYLE_BLINK etc +;82:void CG_Text_Paint(float x, float y, float scale, vec4_t color, const char *text, float adjust, int limit, int style, int iMenuFont) +;83:{ +line 84 +;84: int iStyleOR = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 85 +;85: int iFontIndex = MenuFontToHandle(iMenuFont); +ADDRFP4 32 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 MenuFontToHandle +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 87 +;86: +;87: switch (style) +ADDRLP4 12 +ADDRFP4 28 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +LTI4 $196 +ADDRLP4 12 +INDIRI4 +CNSTI4 6 +GTI4 $196 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $205 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $205 +address $198 +address $199 +address $200 +address $201 +address $202 +address $203 +address $204 +code +line 88 +;88: { +LABELV $198 +line 89 +;89: case ITEM_TEXTSTYLE_NORMAL: iStyleOR = 0;break; // JK2 normal text +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $197 +JUMPV +LABELV $199 +line 90 +;90: case ITEM_TEXTSTYLE_BLINK: iStyleOR = STYLE_BLINK;break; // JK2 fast blinking +ADDRLP4 0 +CNSTI4 1073741824 +ASGNI4 +ADDRGP4 $197 +JUMPV +LABELV $200 +line 91 +;91: case ITEM_TEXTSTYLE_PULSE: iStyleOR = STYLE_BLINK;break; // JK2 slow pulsing +ADDRLP4 0 +CNSTI4 1073741824 +ASGNI4 +ADDRGP4 $197 +JUMPV +LABELV $201 +line 92 +;92: case ITEM_TEXTSTYLE_SHADOWED: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) +ADDRLP4 0 +CNSTU4 2147483648 +CVUI4 4 +ASGNI4 +ADDRGP4 $197 +JUMPV +LABELV $202 +line 93 +;93: case ITEM_TEXTSTYLE_OUTLINED: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) +ADDRLP4 0 +CNSTU4 2147483648 +CVUI4 4 +ASGNI4 +ADDRGP4 $197 +JUMPV +LABELV $203 +line 94 +;94: case ITEM_TEXTSTYLE_OUTLINESHADOWED: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) +ADDRLP4 0 +CNSTU4 2147483648 +CVUI4 4 +ASGNI4 +ADDRGP4 $197 +JUMPV +LABELV $204 +line 95 +;95: case ITEM_TEXTSTYLE_SHADOWEDMORE: iStyleOR = (int)STYLE_DROPSHADOW;break; // JK2 drop shadow ( need a color for this ) +ADDRLP4 0 +CNSTU4 2147483648 +CVUI4 4 +ASGNI4 +LABELV $196 +LABELV $197 +line 98 +;96: } +;97: +;98: trap_R_Font_DrawString( x, // int ox +ADDRFP4 0 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRFP4 4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +BORI4 +ARGI4 +ADDRFP4 24 +INDIRI4 +CNSTI4 0 +NEI4 $207 +ADDRLP4 16 +CNSTI4 -1 +ASGNI4 +ADDRGP4 $208 +JUMPV +LABELV $207 +ADDRLP4 16 +ADDRFP4 24 +INDIRI4 +ASGNI4 +LABELV $208 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRGP4 trap_R_Font_DrawString +CALLV +pop +line 106 +;99: y, // int oy +;100: text, // const char *text +;101: color, // paletteRGBA_c c +;102: iStyleOR | iFontIndex, // const int iFontHandle +;103: !limit?-1:limit, // iCharLimit (-1 = none) +;104: scale // const float scale = 1.0f +;105: ); +;106:} +LABELV $195 +endproc CG_Text_Paint 20 28 +data +align 4 +LABELV $210 +byte 4 1 +code +proc CG_DrawZoomMask 96 36 +line 165 +;107: +;108:/* +;109:qboolean CG_WorldCoordToScreenCoord(vec3_t worldCoord, int *x, int *y) +;110: +;111: Take any world coord and convert it to a 2D virtual 640x480 screen coord +;112:*/ +;113:/* +;114:qboolean CG_WorldCoordToScreenCoordFloat(vec3_t worldCoord, float *x, float *y) +;115:{ +;116: int xcenter, ycenter; +;117: vec3_t local, transformed; +;118: +;119:// xcenter = cg.refdef.width / 2;//gives screen coords adjusted for resolution +;120:// ycenter = cg.refdef.height / 2;//gives screen coords adjusted for resolution +;121: +;122: //NOTE: did it this way because most draw functions expect virtual 640x480 coords +;123: // and adjust them for current resolution +;124: xcenter = 640 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn +;125: ycenter = 480 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn +;126: +;127: VectorSubtract (worldCoord, cg.refdef.vieworg, local); +;128: +;129: transformed[0] = DotProduct(local,vright); +;130: transformed[1] = DotProduct(local,vup); +;131: transformed[2] = DotProduct(local,vfwd); +;132: +;133: // Make sure Z is not negative. +;134: if(transformed[2] < 0.01) +;135: { +;136: return qfalse; +;137: } +;138: // Simple convert to screen coords. +;139: float xzi = xcenter / transformed[2] * (90.0/cg.refdef.fov_x); +;140: float yzi = ycenter / transformed[2] * (90.0/cg.refdef.fov_y); +;141: +;142: *x = xcenter + xzi * transformed[0]; +;143: *y = ycenter - yzi * transformed[1]; +;144: +;145: return qtrue; +;146:} +;147: +;148:qboolean CG_WorldCoordToScreenCoord( vec3_t worldCoord, int *x, int *y ) +;149:{ +;150: float xF, yF; +;151: qboolean retVal = CG_WorldCoordToScreenCoordFloat( worldCoord, &xF, &yF ); +;152: *x = (int)xF; +;153: *y = (int)yF; +;154: return retVal; +;155:} +;156:*/ +;157: +;158:/* +;159:================ +;160:CG_DrawZoomMask +;161: +;162:================ +;163:*/ +;164:static void CG_DrawZoomMask( void ) +;165:{ +line 176 +;166: vec4_t color1; +;167: float level; +;168: static qboolean flip = qtrue; +;169: +;170:// int ammo = cg_entities[0].gent->client->ps.ammo[weaponData[cent->currentState.weapon].ammoIndex]; +;171: float cx, cy; +;172:// int val[5]; +;173: float max, fi; +;174: +;175: // Check for Binocular specific zooming since we'll want to render different bits in each case +;176: if ( cg.predictedPlayerState.zoomMode == 2 ) +ADDRGP4 cg+96+1332 +INDIRI4 +CNSTI4 2 +NEI4 $211 +line 177 +;177: { +line 182 +;178: int val, i; +;179: float off; +;180: +;181: // zoom level +;182: level = (float)(80.0f - cg.predictedPlayerState.zoomFov) / 80.0f; +ADDRLP4 48 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 32 +ADDRLP4 48 +INDIRF4 +ADDRGP4 cg+96+1344 +INDIRF4 +SUBF4 +ADDRLP4 48 +INDIRF4 +DIVF4 +ASGNF4 +line 185 +;183: +;184: // ...so we'll clamp it +;185: if ( level < 0.0f ) +ADDRLP4 32 +INDIRF4 +CNSTF4 0 +GEF4 $217 +line 186 +;186: { +line 187 +;187: level = 0.0f; +ADDRLP4 32 +CNSTF4 0 +ASGNF4 +line 188 +;188: } +ADDRGP4 $218 +JUMPV +LABELV $217 +line 189 +;189: else if ( level > 1.0f ) +ADDRLP4 32 +INDIRF4 +CNSTF4 1065353216 +LEF4 $219 +line 190 +;190: { +line 191 +;191: level = 1.0f; +ADDRLP4 32 +CNSTF4 1065353216 +ASGNF4 +line 192 +;192: } +LABELV $219 +LABELV $218 +line 195 +;193: +;194: // Using a magic number to convert the zoom level to scale amount +;195: level *= 162.0f; +ADDRLP4 32 +CNSTF4 1126301696 +ADDRLP4 32 +INDIRF4 +MULF4 +ASGNF4 +line 198 +;196: +;197: // draw blue tinted distortion mask, trying to make it as small as is necessary to fill in the viewable area +;198: trap_R_SetColor( colorTable[CT_WHITE] ); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 199 +;199: CG_DrawPic( 34, 48, 570, 362, cgs.media.binocularStatic ); +CNSTF4 1107820544 +ARGF4 +CNSTF4 1111490560 +ARGF4 +CNSTF4 1141800960 +ARGF4 +CNSTF4 1135935488 +ARGF4 +ADDRGP4 cgs+70296+540 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 202 +;200: +;201: // Black out the area behind the numbers +;202: trap_R_SetColor( colorTable[CT_BLACK]); +ADDRGP4 colorTable+16 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 203 +;203: CG_DrawPic( 212, 367, 200, 40, cgs.media.whiteShader ); +CNSTF4 1129578496 +ARGF4 +CNSTF4 1136099328 +ARGF4 +CNSTF4 1128792064 +ARGF4 +CNSTF4 1109393408 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 206 +;204: +;205: // Numbers should be kind of greenish +;206: color1[0] = 0.2f; +ADDRLP4 0 +CNSTF4 1045220557 +ASGNF4 +line 207 +;207: color1[1] = 0.4f; +ADDRLP4 0+4 +CNSTF4 1053609165 +ASGNF4 +line 208 +;208: color1[2] = 0.2f; +ADDRLP4 0+8 +CNSTF4 1045220557 +ASGNF4 +line 209 +;209: color1[3] = 0.3f; +ADDRLP4 0+12 +CNSTF4 1050253722 +ASGNF4 +line 210 +;210: trap_R_SetColor( color1 ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 214 +;211: +;212: // Draw scrolling numbers, use intervals 10 units apart--sorry, this section of code is just kind of hacked +;213: // up with a bunch of magic numbers..... +;214: val = ((int)((cg.refdefViewAngles[YAW] + 180) / 10)) * 10; +ADDRLP4 40 +CNSTI4 10 +ADDRGP4 cg+3984+4 +INDIRF4 +CNSTF4 1127481344 +ADDF4 +CNSTF4 1092616192 +DIVF4 +CVFI4 4 +MULI4 +ASGNI4 +line 215 +;215: off = (cg.refdefViewAngles[YAW] + 180) - val; +ADDRLP4 44 +ADDRGP4 cg+3984+4 +INDIRF4 +CNSTF4 1127481344 +ADDF4 +ADDRLP4 40 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 217 +;216: +;217: for ( i = -10; i < 30; i += 10 ) +ADDRLP4 36 +CNSTI4 -10 +ASGNI4 +LABELV $234 +line 218 +;218: { +line 219 +;219: val -= 10; +ADDRLP4 40 +ADDRLP4 40 +INDIRI4 +CNSTI4 10 +SUBI4 +ASGNI4 +line 221 +;220: +;221: if ( val < 0 ) +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +GEI4 $238 +line 222 +;222: { +line 223 +;223: val += 360; +ADDRLP4 40 +ADDRLP4 40 +INDIRI4 +CNSTI4 360 +ADDI4 +ASGNI4 +line 224 +;224: } +LABELV $238 +line 228 +;225: +;226: // we only want to draw the very far left one some of the time, if it's too far to the left it will +;227: // poke outside the mask. +;228: if (( off > 3.0f && i == -10 ) || i > -10 ) +ADDRLP4 44 +INDIRF4 +CNSTF4 1077936128 +LEF4 $243 +ADDRLP4 36 +INDIRI4 +CNSTI4 -10 +EQI4 $242 +LABELV $243 +ADDRLP4 36 +INDIRI4 +CNSTI4 -10 +LEI4 $240 +LABELV $242 +line 229 +;229: { +line 231 +;230: // draw the value, but add 200 just to bump the range up...arbitrary, so change it if you like +;231: CG_DrawNumField( 155 + i * 10 + off * 10, 374, 3, val + 200, 24, 14, NUM_FONT_CHUNKY, qtrue ); +CNSTI4 10 +ADDRLP4 36 +INDIRI4 +MULI4 +CNSTI4 155 +ADDI4 +CVIF4 4 +CNSTF4 1092616192 +ADDRLP4 44 +INDIRF4 +MULF4 +ADDF4 +CVFI4 4 +ARGI4 +CNSTI4 374 +ARGI4 +ADDRLP4 52 +CNSTI4 3 +ASGNI4 +ADDRLP4 52 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 200 +ADDI4 +ARGI4 +CNSTI4 24 +ARGI4 +CNSTI4 14 +ARGI4 +ADDRLP4 52 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_DrawNumField +CALLV +pop +line 232 +;232: CG_DrawPic( 245 + (i-1) * 10 + off * 10, 376, 6, 6, cgs.media.whiteShader ); +ADDRLP4 56 +CNSTI4 10 +ASGNI4 +ADDRLP4 56 +INDIRI4 +ADDRLP4 36 +INDIRI4 +MULI4 +ADDRLP4 56 +INDIRI4 +SUBI4 +CNSTI4 245 +ADDI4 +CVIF4 4 +CNSTF4 1092616192 +ADDRLP4 44 +INDIRF4 +MULF4 +ADDF4 +ARGF4 +CNSTF4 1136394240 +ARGF4 +ADDRLP4 60 +CNSTF4 1086324736 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 233 +;233: } +LABELV $240 +line 234 +;234: } +LABELV $235 +line 217 +ADDRLP4 36 +ADDRLP4 36 +INDIRI4 +CNSTI4 10 +ADDI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 30 +LTI4 $234 +line 236 +;235: +;236: CG_DrawPic( 212, 367, 200, 28, cgs.media.binocularOverlay ); +CNSTF4 1129578496 +ARGF4 +CNSTF4 1136099328 +ARGF4 +CNSTF4 1128792064 +ARGF4 +CNSTF4 1105199104 +ARGF4 +ADDRGP4 cgs+70296+544 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 238 +;237: +;238: color1[0] = sin( cg.time * 0.01f ) * 0.5f + 0.5f; +CNSTF4 1008981770 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 52 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 0 +CNSTF4 1056964608 +ADDRLP4 52 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ASGNF4 +line 239 +;239: color1[0] = color1[0] * color1[0]; +ADDRLP4 56 +ADDRLP4 0 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 56 +INDIRF4 +ADDRLP4 56 +INDIRF4 +MULF4 +ASGNF4 +line 240 +;240: color1[1] = color1[0]; +ADDRLP4 0+4 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 241 +;241: color1[2] = color1[0]; +ADDRLP4 0+8 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 242 +;242: color1[3] = 1.0f; +ADDRLP4 0+12 +CNSTF4 1065353216 +ASGNF4 +line 244 +;243: +;244: trap_R_SetColor( color1 ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 246 +;245: +;246: CG_DrawPic( 82, 94, 16, 16, cgs.media.binocularCircle ); +CNSTF4 1118044160 +ARGF4 +CNSTF4 1119617024 +ARGF4 +ADDRLP4 60 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+524 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 249 +;247: +;248: // Flickery color +;249: color1[0] = 0.7f + crandom() * 0.1f; +ADDRLP4 64 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +CNSTF4 1036831949 +CNSTF4 1073741824 +ADDRLP4 64 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1060320051 +ADDF4 +ASGNF4 +line 250 +;250: color1[1] = 0.8f + crandom() * 0.1f; +ADDRLP4 68 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0+4 +CNSTF4 1036831949 +CNSTF4 1073741824 +ADDRLP4 68 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1061997773 +ADDF4 +ASGNF4 +line 251 +;251: color1[2] = 0.7f + crandom() * 0.1f; +ADDRLP4 72 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0+8 +CNSTF4 1036831949 +CNSTF4 1073741824 +ADDRLP4 72 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1060320051 +ADDF4 +ASGNF4 +line 252 +;252: color1[3] = 1.0f; +ADDRLP4 0+12 +CNSTF4 1065353216 +ASGNF4 +line 253 +;253: trap_R_SetColor( color1 ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 255 +;254: +;255: CG_DrawPic( 0, 0, 640, 480, cgs.media.binocularMask ); +ADDRLP4 76 +CNSTF4 0 +ASGNF4 +ADDRLP4 76 +INDIRF4 +ARGF4 +ADDRLP4 76 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +ADDRGP4 cgs+70296+528 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 257 +;256: +;257: CG_DrawPic( 4, 282 - level, 16, 16, cgs.media.binocularArrow ); +CNSTF4 1082130432 +ARGF4 +CNSTF4 1133314048 +ADDRLP4 32 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 80 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+532 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 260 +;258: +;259: // The top triangle bit randomly flips +;260: if ( flip ) +ADDRGP4 $210 +INDIRI4 +CNSTI4 0 +EQI4 $261 +line 261 +;261: { +line 262 +;262: CG_DrawPic( 330, 60, -26, -30, cgs.media.binocularTri ); +CNSTF4 1134886912 +ARGF4 +CNSTF4 1114636288 +ARGF4 +CNSTF4 3251634176 +ARGF4 +CNSTF4 3253731328 +ARGF4 +ADDRGP4 cgs+70296+536 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 263 +;263: } +ADDRGP4 $262 +JUMPV +LABELV $261 +line 265 +;264: else +;265: { +line 266 +;266: CG_DrawPic( 307, 40, 26, 30, cgs.media.binocularTri ); +CNSTF4 1134133248 +ARGF4 +CNSTF4 1109393408 +ARGF4 +CNSTF4 1104150528 +ARGF4 +CNSTF4 1106247680 +ARGF4 +ADDRGP4 cgs+70296+536 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 267 +;267: } +LABELV $262 +line 269 +;268: +;269: if ( random() > 0.98f && ( cg.time & 1024 )) +ADDRLP4 84 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1065017672 +LEF4 $212 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $212 +line 270 +;270: { +line 271 +;271: flip = !flip; +ADDRLP4 92 +ADDRGP4 $210 +ASGNP4 +ADDRLP4 92 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $271 +ADDRLP4 88 +CNSTI4 1 +ASGNI4 +ADDRGP4 $272 +JUMPV +LABELV $271 +ADDRLP4 88 +CNSTI4 0 +ASGNI4 +LABELV $272 +ADDRLP4 92 +INDIRP4 +ADDRLP4 88 +INDIRI4 +ASGNI4 +line 272 +;272: } +line 273 +;273: } +ADDRGP4 $212 +JUMPV +LABELV $211 +line 274 +;274: else if ( cg.predictedPlayerState.zoomMode) +ADDRGP4 cg+96+1332 +INDIRI4 +CNSTI4 0 +EQI4 $273 +line 275 +;275: { +line 277 +;276: // disruptor zoom mode +;277: level = (float)(50.0f - zoomFov) / 50.0f;//(float)(80.0f - zoomFov) / 80.0f; +ADDRLP4 36 +CNSTF4 1112014848 +ASGNF4 +ADDRLP4 32 +ADDRLP4 36 +INDIRF4 +ADDRGP4 zoomFov +INDIRF4 +SUBF4 +ADDRLP4 36 +INDIRF4 +DIVF4 +ASGNF4 +line 280 +;278: +;279: // ...so we'll clamp it +;280: if ( level < 0.0f ) +ADDRLP4 32 +INDIRF4 +CNSTF4 0 +GEF4 $277 +line 281 +;281: { +line 282 +;282: level = 0.0f; +ADDRLP4 32 +CNSTF4 0 +ASGNF4 +line 283 +;283: } +ADDRGP4 $278 +JUMPV +LABELV $277 +line 284 +;284: else if ( level > 1.0f ) +ADDRLP4 32 +INDIRF4 +CNSTF4 1065353216 +LEF4 $279 +line 285 +;285: { +line 286 +;286: level = 1.0f; +ADDRLP4 32 +CNSTF4 1065353216 +ASGNF4 +line 287 +;287: } +LABELV $279 +LABELV $278 +line 290 +;288: +;289: // Using a magic number to convert the zoom level to a rotation amount that correlates more or less with the zoom artwork. +;290: level *= 103.0f; +ADDRLP4 32 +CNSTF4 1120796672 +ADDRLP4 32 +INDIRF4 +MULF4 +ASGNF4 +line 293 +;291: +;292: // Draw target mask +;293: trap_R_SetColor( colorTable[CT_WHITE] ); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 294 +;294: CG_DrawPic( 0, 0, 640, 480, cgs.media.disruptorMask ); +ADDRLP4 40 +CNSTF4 0 +ASGNF4 +ADDRLP4 40 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +ADDRGP4 cgs+70296+504 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 297 +;295: +;296: // apparently 99.0f is the full zoom level +;297: if ( level >= 99 ) +ADDRLP4 32 +INDIRF4 +CNSTF4 1120272384 +LTF4 $284 +line 298 +;298: { +line 300 +;299: // Fully zoomed, so make the rotating insert pulse +;300: color1[0] = 1.0f; +ADDRLP4 0 +CNSTF4 1065353216 +ASGNF4 +line 301 +;301: color1[1] = 1.0f; +ADDRLP4 0+4 +CNSTF4 1065353216 +ASGNF4 +line 302 +;302: color1[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 303 +;303: color1[3] = 0.7f + sin( cg.time * 0.01f ) * 0.3f; +CNSTF4 1008981770 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 44 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 0+12 +CNSTF4 1050253722 +ADDRLP4 44 +INDIRF4 +MULF4 +CNSTF4 1060320051 +ADDF4 +ASGNF4 +line 305 +;304: +;305: trap_R_SetColor( color1 ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 306 +;306: } +LABELV $284 +line 309 +;307: +;308: // Draw rotating insert +;309: CG_DrawRotatePic2( 320, 240, 640, 480, -level, cgs.media.disruptorInsert ); +CNSTF4 1134559232 +ARGF4 +CNSTF4 1131413504 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +ADDRLP4 32 +INDIRF4 +NEGF4 +ARGF4 +ADDRGP4 cgs+70296+508 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawRotatePic2 +CALLV +pop +line 337 +;310: +;311: // Increase the light levels under the center of the target +;312:// CG_DrawPic( 198, 118, 246, 246, cgs.media.disruptorLight ); +;313: +;314: // weirdness.....converting ammo to a base five number scale just to be geeky. +;315:/* val[0] = ammo % 5; +;316: val[1] = (ammo / 5) % 5; +;317: val[2] = (ammo / 25) % 5; +;318: val[3] = (ammo / 125) % 5; +;319: val[4] = (ammo / 625) % 5; +;320: +;321: color1[0] = 0.2f; +;322: color1[1] = 0.55f + crandom() * 0.1f; +;323: color1[2] = 0.5f + crandom() * 0.1f; +;324: color1[3] = 1.0f; +;325: trap_R_SetColor( color1 ); +;326: +;327: for ( int t = 0; t < 5; t++ ) +;328: { +;329: cx = 320 + sin( (t*10+45)/57.296f ) * 192; +;330: cy = 240 + cos( (t*10+45)/57.296f ) * 192; +;331: +;332: CG_DrawRotatePic2( cx, cy, 24, 38, 45 - t * 10, trap_R_RegisterShader( va("gfx/2d/char%d",val[4-t] ))); +;333: } +;334:*/ +;335: //max = ( cg_entities[0].gent->health / 100.0f ); +;336: +;337: max = cg.snap->ps.ammo[weaponData[WP_DISRUPTOR].ammoIndex] / (float)ammoData[weaponData[WP_DISRUPTOR].ammoIndex].max; +ADDRLP4 44 +CNSTI4 2 +ASGNI4 +ADDRLP4 28 +ADDRGP4 weaponData+280 +INDIRI4 +ADDRLP4 44 +INDIRI4 +LSHI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 452 +ADDP4 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRGP4 weaponData+280 +INDIRI4 +ADDRLP4 44 +INDIRI4 +LSHI4 +ADDRGP4 ammoData +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 338 +;338: if ( max > 1.0f ) +ADDRLP4 28 +INDIRF4 +CNSTF4 1065353216 +LEF4 $295 +line 339 +;339: { +line 340 +;340: max = 1.0f; +ADDRLP4 28 +CNSTF4 1065353216 +ASGNF4 +line 341 +;341: } +LABELV $295 +line 343 +;342: +;343: color1[0] = (1.0f - max) * 2.0f; +ADDRLP4 0 +CNSTF4 1073741824 +CNSTF4 1065353216 +ADDRLP4 28 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 344 +;344: color1[1] = max * 1.5f; +ADDRLP4 0+4 +CNSTF4 1069547520 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 345 +;345: color1[2] = 0.0f; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 346 +;346: color1[3] = 1.0f; +ADDRLP4 0+12 +CNSTF4 1065353216 +ASGNF4 +line 349 +;347: +;348: // If we are low on health, make us flash +;349: if ( max < 0.15f && ( cg.time & 512 )) +ADDRLP4 28 +INDIRF4 +CNSTF4 1041865114 +GEF4 $300 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $300 +line 350 +;350: { +line 351 +;351: VectorClear( color1 ); +ADDRLP4 48 +CNSTF4 0 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 48 +INDIRF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 48 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 48 +INDIRF4 +ASGNF4 +line 352 +;352: } +LABELV $300 +line 354 +;353: +;354: if ( color1[0] > 1.0f ) +ADDRLP4 0 +INDIRF4 +CNSTF4 1065353216 +LEF4 $305 +line 355 +;355: { +line 356 +;356: color1[0] = 1.0f; +ADDRLP4 0 +CNSTF4 1065353216 +ASGNF4 +line 357 +;357: } +LABELV $305 +line 359 +;358: +;359: if ( color1[1] > 1.0f ) +ADDRLP4 0+4 +INDIRF4 +CNSTF4 1065353216 +LEF4 $307 +line 360 +;360: { +line 361 +;361: color1[1] = 1.0f; +ADDRLP4 0+4 +CNSTF4 1065353216 +ASGNF4 +line 362 +;362: } +LABELV $307 +line 364 +;363: +;364: trap_R_SetColor( color1 ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 366 +;365: +;366: max *= 58.0f; +ADDRLP4 28 +CNSTF4 1114112000 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 368 +;367: +;368: for (fi = 18.5f; fi <= 18.5f + max; fi+= 3 ) // going from 15 to 45 degrees, with 5 degree increments +ADDRLP4 16 +CNSTF4 1100218368 +ASGNF4 +ADDRGP4 $314 +JUMPV +LABELV $311 +line 369 +;369: { +line 370 +;370: cx = 320 + sin( (fi+90.0f)/57.296f ) * 190; +ADDRLP4 16 +INDIRF4 +CNSTF4 1119092736 +ADDF4 +CNSTF4 1113927451 +DIVF4 +ARGF4 +ADDRLP4 48 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 20 +CNSTF4 1128136704 +ADDRLP4 48 +INDIRF4 +MULF4 +CNSTF4 1134559232 +ADDF4 +ASGNF4 +line 371 +;371: cy = 240 + cos( (fi+90.0f)/57.296f ) * 190; +ADDRLP4 16 +INDIRF4 +CNSTF4 1119092736 +ADDF4 +CNSTF4 1113927451 +DIVF4 +ARGF4 +ADDRLP4 52 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 24 +CNSTF4 1128136704 +ADDRLP4 52 +INDIRF4 +MULF4 +CNSTF4 1131413504 +ADDF4 +ASGNF4 +line 373 +;372: +;373: CG_DrawRotatePic2( cx, cy, 12, 24, 90 - fi, cgs.media.disruptorInsertTick ); +ADDRLP4 20 +INDIRF4 +ARGF4 +ADDRLP4 24 +INDIRF4 +ARGF4 +CNSTF4 1094713344 +ARGF4 +CNSTF4 1103101952 +ARGF4 +CNSTF4 1119092736 +ADDRLP4 16 +INDIRF4 +SUBF4 +ARGF4 +ADDRGP4 cgs+70296+516 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawRotatePic2 +CALLV +pop +line 374 +;374: } +LABELV $312 +line 368 +ADDRLP4 16 +ADDRLP4 16 +INDIRF4 +CNSTF4 1077936128 +ADDF4 +ASGNF4 +LABELV $314 +ADDRLP4 16 +INDIRF4 +ADDRLP4 28 +INDIRF4 +CNSTF4 1100218368 +ADDF4 +LEF4 $311 +line 376 +;375: +;376: if ( cg.predictedPlayerState.weaponstate == WEAPON_CHARGING_ALT ) +ADDRGP4 cg+96+152 +INDIRI4 +CNSTI4 5 +NEI4 $317 +line 377 +;377: { +line 378 +;378: trap_R_SetColor( colorTable[CT_WHITE] ); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 381 +;379: +;380: // draw the charge level +;381: max = ( cg.time - cg.predictedPlayerState.weaponChargeTime ) / ( 50.0f * 30.0f ); // bad hardcodedness 50 is disruptor charge unit and 30 is max charge units allowed. +ADDRLP4 28 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+96+48 +INDIRI4 +SUBI4 +CVIF4 4 +CNSTF4 1153138688 +DIVF4 +ASGNF4 +line 383 +;382: +;383: if ( max > 1.0f ) +ADDRLP4 28 +INDIRF4 +CNSTF4 1065353216 +LEF4 $325 +line 384 +;384: { +line 385 +;385: max = 1.0f; +ADDRLP4 28 +CNSTF4 1065353216 +ASGNF4 +line 386 +;386: } +LABELV $325 +line 388 +;387: +;388: trap_R_DrawStretchPic(257, 435, 134*max, 34, 0, 0, max, 1, cgs.media.disruptorChargeShader); +CNSTF4 1132494848 +ARGF4 +CNSTF4 1138327552 +ARGF4 +CNSTF4 1124466688 +ADDRLP4 28 +INDIRF4 +MULF4 +ARGF4 +CNSTF4 1107820544 +ARGF4 +ADDRLP4 52 +CNSTF4 0 +ASGNF4 +ADDRLP4 52 +INDIRF4 +ARGF4 +ADDRLP4 52 +INDIRF4 +ARGF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 cgs+70296+520 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 389 +;389: } +LABELV $317 +line 393 +;390:// trap_R_SetColor( colorTable[CT_WHITE] ); +;391:// CG_DrawPic( 0, 0, 640, 480, cgs.media.disruptorMask ); +;392: +;393: } +LABELV $273 +LABELV $212 +line 394 +;394:} +LABELV $209 +endproc CG_DrawZoomMask 96 36 +export CG_Draw3DModel +proc CG_Draw3DModel 584 12 +line 403 +;395: +;396: +;397:/* +;398:================ +;399:CG_Draw3DModel +;400: +;401:================ +;402:*/ +;403:void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles ) { +line 407 +;404: refdef_t refdef; +;405: refEntity_t ent; +;406: +;407: if ( !cg_draw3dIcons.integer || !cg_drawIcons.integer ) { +ADDRLP4 580 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_draw3dIcons+12 +INDIRI4 +ADDRLP4 580 +INDIRI4 +EQI4 $334 +ADDRGP4 cg_drawIcons+12 +INDIRI4 +ADDRLP4 580 +INDIRI4 +NEI4 $330 +LABELV $334 +line 408 +;408: return; +ADDRGP4 $329 +JUMPV +LABELV $330 +line 411 +;409: } +;410: +;411: memset( &refdef, 0, sizeof( refdef ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 368 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 413 +;412: +;413: memset( &ent, 0, sizeof( ent ) ); +ADDRLP4 368 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 414 +;414: AnglesToAxis( angles, ent.axis ); +ADDRFP4 28 +INDIRP4 +ARGP4 +ADDRLP4 368+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 415 +;415: VectorCopy( origin, ent.origin ); +ADDRLP4 368+52 +ADDRFP4 24 +INDIRP4 +INDIRB +ASGNB 12 +line 416 +;416: ent.hModel = model; +ADDRLP4 368+8 +ADDRFP4 16 +INDIRI4 +ASGNI4 +line 417 +;417: ent.customSkin = skin; +ADDRLP4 368+136 +ADDRFP4 20 +INDIRI4 +ASGNI4 +line 418 +;418: ent.renderfx = RF_NOSHADOW; // no stencil shadows +ADDRLP4 368+4 +CNSTI4 64 +ASGNI4 +line 420 +;419: +;420: refdef.rdflags = RDF_NOWORLDMODEL; +ADDRLP4 0+76 +CNSTI4 1 +ASGNI4 +line 422 +;421: +;422: AxisClear( refdef.viewaxis ); +ADDRLP4 0+36 +ARGP4 +ADDRGP4 AxisClear +CALLV +pop +line 424 +;423: +;424: refdef.fov_x = 30; +ADDRLP4 0+16 +CNSTF4 1106247680 +ASGNF4 +line 425 +;425: refdef.fov_y = 30; +ADDRLP4 0+20 +CNSTF4 1106247680 +ASGNF4 +line 427 +;426: +;427: refdef.x = x; +ADDRLP4 0 +ADDRFP4 0 +INDIRF4 +CVFI4 4 +ASGNI4 +line 428 +;428: refdef.y = y; +ADDRLP4 0+4 +ADDRFP4 4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 429 +;429: refdef.width = w; +ADDRLP4 0+8 +ADDRFP4 8 +INDIRF4 +CVFI4 4 +ASGNI4 +line 430 +;430: refdef.height = h; +ADDRLP4 0+12 +ADDRFP4 12 +INDIRF4 +CVFI4 4 +ASGNI4 +line 432 +;431: +;432: refdef.time = cg.time; +ADDRLP4 0+72 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 434 +;433: +;434: trap_R_ClearScene(); +ADDRGP4 trap_R_ClearScene +CALLV +pop +line 435 +;435: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 368 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 436 +;436: trap_R_RenderScene( &refdef ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_RenderScene +CALLV +pop +line 437 +;437:} +LABELV $329 +endproc CG_Draw3DModel 584 12 +export CG_DrawHead +proc CG_DrawHead 4 20 +line 447 +;438: +;439:/* +;440:================ +;441:CG_DrawHead +;442: +;443:Used for both the status bar and the scoreboard +;444:================ +;445:*/ +;446:void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec3_t headAngles ) +;447:{ +line 450 +;448: clientInfo_t *ci; +;449: +;450: ci = &cgs.clientinfo[ clientNum ]; +ADDRLP4 0 +CNSTI4 788 +ADDRFP4 16 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 452 +;451: +;452: CG_DrawPic( x, y, w, h, ci->modelIcon ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 508 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 455 +;453: +;454: // if they are deferred, draw a cross out +;455: if ( ci->deferred ) +ADDRLP4 0 +INDIRP4 +CNSTI4 448 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $351 +line 456 +;456: { +line 457 +;457: CG_DrawPic( x, y, w, h, cgs.media.deferShader ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+108 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 458 +;458: } +LABELV $351 +line 459 +;459:} +LABELV $349 +endproc CG_DrawHead 4 20 +export CG_DrawFlagModel +proc CG_DrawFlagModel 72 32 +line 468 +;460: +;461:/* +;462:================ +;463:CG_DrawFlagModel +;464: +;465:Used for both the status bar and the scoreboard +;466:================ +;467:*/ +;468:void CG_DrawFlagModel( float x, float y, float w, float h, int team, qboolean force2D ) { +line 475 +;469: qhandle_t cm; +;470: float len; +;471: vec3_t origin, angles; +;472: vec3_t mins, maxs; +;473: qhandle_t handle; +;474: +;475: if ( !force2D && cg_draw3dIcons.integer ) { +ADDRLP4 60 +CNSTI4 0 +ASGNI4 +ADDRFP4 20 +INDIRI4 +ADDRLP4 60 +INDIRI4 +NEI4 $356 +ADDRGP4 cg_draw3dIcons+12 +INDIRI4 +ADDRLP4 60 +INDIRI4 +EQI4 $356 +line 477 +;476: +;477: VectorClear( angles ); +ADDRLP4 64 +CNSTF4 0 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 64 +INDIRF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 64 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 64 +INDIRF4 +ASGNF4 +line 479 +;478: +;479: cm = cgs.media.redFlagModel; +ADDRLP4 48 +ADDRGP4 cgs+70296+36 +INDIRI4 +ASGNI4 +line 482 +;480: +;481: // offset the origin y and z to center the flag +;482: trap_R_ModelBounds( cm, mins, maxs ); +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRLP4 24 +ARGP4 +ADDRLP4 36 +ARGP4 +ADDRGP4 trap_R_ModelBounds +CALLV +pop +line 484 +;483: +;484: origin[2] = -0.5 * ( mins[2] + maxs[2] ); +ADDRLP4 12+8 +CNSTF4 3204448256 +ADDRLP4 24+8 +INDIRF4 +ADDRLP4 36+8 +INDIRF4 +ADDF4 +MULF4 +ASGNF4 +line 485 +;485: origin[1] = 0.5 * ( mins[1] + maxs[1] ); +ADDRLP4 12+4 +CNSTF4 1056964608 +ADDRLP4 24+4 +INDIRF4 +ADDRLP4 36+4 +INDIRF4 +ADDF4 +MULF4 +ASGNF4 +line 489 +;486: +;487: // calculate distance so the flag nearly fills the box +;488: // assume heads are taller than wide +;489: len = 0.5 * ( maxs[2] - mins[2] ); +ADDRLP4 52 +CNSTF4 1056964608 +ADDRLP4 36+8 +INDIRF4 +ADDRLP4 24+8 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 490 +;490: origin[0] = len / 0.268; // len / tan( fov/2 ) +ADDRLP4 12 +ADDRLP4 52 +INDIRF4 +CNSTF4 1049179980 +DIVF4 +ASGNF4 +line 492 +;491: +;492: angles[YAW] = 60 * sin( cg.time / 2000.0 );; +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +CNSTF4 1157234688 +DIVF4 +ARGF4 +ADDRLP4 68 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 0+4 +CNSTF4 1114636288 +ADDRLP4 68 +INDIRF4 +MULF4 +ASGNF4 +line 494 +;493: +;494: if( team == TEAM_RED ) { +ADDRFP4 16 +INDIRI4 +CNSTI4 1 +NEI4 $373 +line 495 +;495: handle = cgs.media.redFlagModel; +ADDRLP4 56 +ADDRGP4 cgs+70296+36 +INDIRI4 +ASGNI4 +line 496 +;496: } else if( team == TEAM_BLUE ) { +ADDRGP4 $374 +JUMPV +LABELV $373 +ADDRFP4 16 +INDIRI4 +CNSTI4 2 +NEI4 $377 +line 497 +;497: handle = cgs.media.blueFlagModel; +ADDRLP4 56 +ADDRGP4 cgs+70296+40 +INDIRI4 +ASGNI4 +line 498 +;498: } else if( team == TEAM_FREE ) { +ADDRGP4 $378 +JUMPV +LABELV $377 +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $355 +line 499 +;499: handle = cgs.media.neutralFlagModel; +ADDRLP4 56 +ADDRGP4 cgs+70296+44 +INDIRI4 +ASGNI4 +line 500 +;500: } else { +line 501 +;501: return; +LABELV $382 +LABELV $378 +LABELV $374 +line 503 +;502: } +;503: CG_Draw3DModel( x, y, w, h, handle, 0, origin, angles ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 12 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_Draw3DModel +CALLV +pop +line 504 +;504: } else if ( cg_drawIcons.integer ) { +ADDRGP4 $357 +JUMPV +LABELV $356 +ADDRGP4 cg_drawIcons+12 +INDIRI4 +CNSTI4 0 +EQI4 $385 +line 507 +;505: gitem_t *item; +;506: +;507: if( team == TEAM_RED ) { +ADDRFP4 16 +INDIRI4 +CNSTI4 1 +NEI4 $388 +line 508 +;508: item = BG_FindItemForPowerup( PW_REDFLAG ); +CNSTI4 4 +ARGI4 +ADDRLP4 68 +ADDRGP4 BG_FindItemForPowerup +CALLP4 +ASGNP4 +ADDRLP4 64 +ADDRLP4 68 +INDIRP4 +ASGNP4 +line 509 +;509: } else if( team == TEAM_BLUE ) { +ADDRGP4 $389 +JUMPV +LABELV $388 +ADDRFP4 16 +INDIRI4 +CNSTI4 2 +NEI4 $390 +line 510 +;510: item = BG_FindItemForPowerup( PW_BLUEFLAG ); +CNSTI4 5 +ARGI4 +ADDRLP4 68 +ADDRGP4 BG_FindItemForPowerup +CALLP4 +ASGNP4 +ADDRLP4 64 +ADDRLP4 68 +INDIRP4 +ASGNP4 +line 511 +;511: } else if( team == TEAM_FREE ) { +ADDRGP4 $391 +JUMPV +LABELV $390 +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $355 +line 512 +;512: item = BG_FindItemForPowerup( PW_NEUTRALFLAG ); +CNSTI4 6 +ARGI4 +ADDRLP4 68 +ADDRGP4 BG_FindItemForPowerup +CALLP4 +ASGNP4 +ADDRLP4 64 +ADDRLP4 68 +INDIRP4 +ASGNP4 +line 513 +;513: } else { +line 514 +;514: return; +LABELV $393 +LABELV $391 +LABELV $389 +line 516 +;515: } +;516: if (item) { +ADDRLP4 64 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $394 +line 517 +;517: CG_DrawPic( x, y, w, h, cg_items[ ITEM_INDEX(item) ].icon ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +CNSTI4 56 +ADDRLP4 64 +INDIRP4 +CVPU4 4 +ADDRGP4 bg_itemlist +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 52 +DIVI4 +MULI4 +ADDRGP4 cg_items+20 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 518 +;518: } +LABELV $394 +line 519 +;519: } +LABELV $385 +LABELV $357 +line 520 +;520:} +LABELV $355 +endproc CG_DrawFlagModel 72 32 +export DrawAmmo +proc DrawAmmo 8 0 +line 528 +;521: +;522:/* +;523:================ +;524:DrawAmmo +;525:================ +;526:*/ +;527:void DrawAmmo() +;528:{ +line 531 +;529: int x, y; +;530: +;531: x = SCREEN_WIDTH-80; +ADDRLP4 0 +CNSTI4 560 +ASGNI4 +line 532 +;532: y = SCREEN_HEIGHT-80; +ADDRLP4 4 +CNSTI4 400 +ASGNI4 +line 534 +;533: +;534:} +LABELV $397 +endproc DrawAmmo 8 0 +export CG_DrawHUDLeftFrame1 +proc CG_DrawHUDLeftFrame1 4 20 +line 542 +;535: +;536:/* +;537:================ +;538:CG_DrawHUDLeftFrame1 +;539:================ +;540:*/ +;541:void CG_DrawHUDLeftFrame1(int x,int y) +;542:{ +line 544 +;543: // Inner gray wire frame +;544: trap_R_SetColor( hudTintColor ); +ADDRGP4 hudTintColor +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 545 +;545: CG_DrawPic( x, y, 80, 80, cgs.media.HUDInnerLeft ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1244 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 546 +;546:} +LABELV $398 +endproc CG_DrawHUDLeftFrame1 4 20 +export CG_DrawHUDLeftFrame2 +proc CG_DrawHUDLeftFrame2 4 20 +line 554 +;547: +;548:/* +;549:================ +;550:CG_DrawHUDLeftFrame2 +;551:================ +;552:*/ +;553:void CG_DrawHUDLeftFrame2(int x,int y) +;554:{ +line 556 +;555: // Inner gray wire frame +;556: trap_R_SetColor( hudTintColor ); +ADDRGP4 hudTintColor +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 557 +;557: CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeftFrame ); // Metal frame +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1160 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 558 +;558:} +LABELV $401 +endproc CG_DrawHUDLeftFrame2 4 20 +export DrawHealthArmor +proc DrawHealthArmor 72 32 +line 566 +;559: +;560:/* +;561:================ +;562:DrawHealthArmor +;563:================ +;564:*/ +;565:void DrawHealthArmor(int x,int y) +;566:{ +line 574 +;567: vec4_t calcColor; +;568: float armorPercent,hold,healthPercent; +;569: playerState_t *ps; +;570: +;571: int healthAmt; +;572: int armorAmt; +;573: +;574: ps = &cg.snap->ps; +ADDRLP4 20 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +line 576 +;575: +;576: healthAmt = ps->stats[STAT_HEALTH]; +ADDRLP4 32 +ADDRLP4 20 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ASGNI4 +line 577 +;577: armorAmt = ps->stats[STAT_ARMOR]; +ADDRLP4 28 +ADDRLP4 20 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +ASGNI4 +line 579 +;578: +;579: if (healthAmt > ps->stats[STAT_MAX_HEALTH]) +ADDRLP4 32 +INDIRI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +LEI4 $406 +line 580 +;580: { +line 581 +;581: healthAmt = ps->stats[STAT_MAX_HEALTH]; +ADDRLP4 32 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +ASGNI4 +line 582 +;582: } +LABELV $406 +line 584 +;583: +;584: if (armorAmt > 100) +ADDRLP4 28 +INDIRI4 +CNSTI4 100 +LEI4 $408 +line 585 +;585: { +line 586 +;586: armorAmt = 100; +ADDRLP4 28 +CNSTI4 100 +ASGNI4 +line 587 +;587: } +LABELV $408 +line 589 +;588: +;589: trap_R_SetColor( colorTable[CT_WHITE] ); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 590 +;590: CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeftFrame ); // Circular black background +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 40 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 40 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1160 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 593 +;591: +;592: // Outer Armor circular +;593: memcpy(calcColor, colorTable[CT_GREEN], sizeof(vec4_t)); +ADDRLP4 0 +ARGP4 +ADDRGP4 colorTable+48 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 595 +;594: +;595: hold = armorAmt-(ps->stats[STAT_MAX_HEALTH]/2); +ADDRLP4 36 +ADDRLP4 28 +INDIRI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 596 +;596: armorPercent = (float) hold/(ps->stats[STAT_MAX_HEALTH]/2); +ADDRLP4 16 +ADDRLP4 36 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 2 +DIVI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 597 +;597: if (armorPercent <0) +ADDRLP4 16 +INDIRF4 +CNSTF4 0 +GEF4 $414 +line 598 +;598: { +line 599 +;599: armorPercent = 0; +ADDRLP4 16 +CNSTF4 0 +ASGNF4 +line 600 +;600: } +LABELV $414 +line 601 +;601: calcColor[0] *= armorPercent; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ASGNF4 +line 602 +;602: calcColor[1] *= armorPercent; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ASGNF4 +line 603 +;603: calcColor[2] *= armorPercent; +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ASGNF4 +line 604 +;604: trap_R_SetColor( calcColor); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 605 +;605: CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor1 ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 44 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 44 +INDIRF4 +ARGF4 +ADDRLP4 44 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1164 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 608 +;606: +;607: // Inner Armor circular +;608: if (armorPercent>0) +ADDRLP4 16 +INDIRF4 +CNSTF4 0 +LEF4 $420 +line 609 +;609: { +line 610 +;610: armorPercent = 1; +ADDRLP4 16 +CNSTF4 1065353216 +ASGNF4 +line 611 +;611: } +ADDRGP4 $421 +JUMPV +LABELV $420 +line 613 +;612: else +;613: { +line 614 +;614: armorPercent = (float) armorAmt/(ps->stats[STAT_MAX_HEALTH]/2); +ADDRLP4 16 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 2 +DIVI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 615 +;615: } +LABELV $421 +line 616 +;616: memcpy(calcColor, colorTable[CT_GREEN], sizeof(vec4_t)); +ADDRLP4 0 +ARGP4 +ADDRGP4 colorTable+48 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 617 +;617: calcColor[0] *= armorPercent; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ASGNF4 +line 618 +;618: calcColor[1] *= armorPercent; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ASGNF4 +line 619 +;619: calcColor[2] *= armorPercent; +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ASGNF4 +line 620 +;620: trap_R_SetColor( calcColor); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 621 +;621: CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor2 ); // Inner Armor circular +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 48 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 48 +INDIRF4 +ARGF4 +ADDRLP4 48 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1168 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 623 +;622: +;623: if (ps->stats[STAT_ARMOR]) // Is there armor? Draw the HUD Armor TIC +ADDRLP4 20 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $427 +line 624 +;624: { +line 626 +;625: // Make tic flash if inner armor is at 50% (25% of full armor) +;626: if (armorPercent<.5) // Do whatever the flash timer says +ADDRLP4 16 +INDIRF4 +CNSTF4 1056964608 +GEF4 $429 +line 627 +;627: { +line 628 +;628: if (cg.HUDTickFlashTime < cg.time) // Flip at the same time +ADDRGP4 cg+13764 +INDIRF4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +GEF4 $428 +line 629 +;629: { +line 630 +;630: cg.HUDTickFlashTime = cg.time + 100; +ADDRGP4 cg+13764 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 100 +ADDI4 +CVIF4 4 +ASGNF4 +line 631 +;631: if (cg.HUDArmorFlag) +ADDRGP4 cg+13768 +INDIRI4 +CNSTI4 0 +EQI4 $437 +line 632 +;632: { +line 633 +;633: cg.HUDArmorFlag = qfalse; +ADDRGP4 cg+13768 +CNSTI4 0 +ASGNI4 +line 634 +;634: } +ADDRGP4 $428 +JUMPV +LABELV $437 +line 636 +;635: else +;636: { +line 637 +;637: cg.HUDArmorFlag = qtrue; +ADDRGP4 cg+13768 +CNSTI4 1 +ASGNI4 +line 638 +;638: } +line 639 +;639: } +line 640 +;640: } +ADDRGP4 $428 +JUMPV +LABELV $429 +line 642 +;641: else +;642: { +line 643 +;643: cg.HUDArmorFlag=qtrue; +ADDRGP4 cg+13768 +CNSTI4 1 +ASGNI4 +line 644 +;644: } +line 645 +;645: } +ADDRGP4 $428 +JUMPV +LABELV $427 +line 647 +;646: else // No armor? Don't show it. +;647: { +line 648 +;648: cg.HUDArmorFlag=qfalse; +ADDRGP4 cg+13768 +CNSTI4 0 +ASGNI4 +line 649 +;649: } +LABELV $428 +line 651 +;650: +;651: memcpy(calcColor, colorTable[CT_RED], sizeof(vec4_t)); +ADDRLP4 0 +ARGP4 +ADDRGP4 colorTable+32 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 652 +;652: healthPercent = (float) healthAmt/ps->stats[STAT_MAX_HEALTH]; +ADDRLP4 24 +ADDRLP4 32 +INDIRI4 +CVIF4 4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 653 +;653: calcColor[0] *= healthPercent; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 24 +INDIRF4 +MULF4 +ASGNF4 +line 654 +;654: calcColor[1] *= healthPercent; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +MULF4 +ASGNF4 +line 655 +;655: calcColor[2] *= healthPercent; +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 24 +INDIRF4 +MULF4 +ASGNF4 +line 656 +;656: trap_R_SetColor( calcColor); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 657 +;657: CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealth ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 52 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 52 +INDIRF4 +ARGF4 +ADDRLP4 52 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1172 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 660 +;658: +;659: // Make tic flash if health is at 20% of full +;660: if (healthPercent>.20) +ADDRLP4 24 +INDIRF4 +CNSTF4 1045220557 +LEF4 $449 +line 661 +;661: { +line 662 +;662: cg.HUDHealthFlag=qtrue; +ADDRGP4 cg+13772 +CNSTI4 1 +ASGNI4 +line 663 +;663: } +ADDRGP4 $450 +JUMPV +LABELV $449 +line 665 +;664: else +;665: { +line 666 +;666: if (cg.HUDTickFlashTime < cg.time) // Flip at the same time +ADDRGP4 cg+13764 +INDIRF4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +GEF4 $452 +line 667 +;667: { +line 668 +;668: cg.HUDTickFlashTime = cg.time + 100; +ADDRGP4 cg+13764 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 100 +ADDI4 +CVIF4 4 +ASGNF4 +line 670 +;669: +;670: if ((armorPercent>0) && (armorPercent<.5)) // Keep the tics in sync if flashing +ADDRLP4 16 +INDIRF4 +CNSTF4 0 +LEF4 $458 +ADDRLP4 16 +INDIRF4 +CNSTF4 1056964608 +GEF4 $458 +line 671 +;671: { +line 672 +;672: cg.HUDHealthFlag=cg.HUDArmorFlag; +ADDRGP4 cg+13772 +ADDRGP4 cg+13768 +INDIRI4 +ASGNI4 +line 673 +;673: } +ADDRGP4 $459 +JUMPV +LABELV $458 +line 675 +;674: else +;675: { +line 676 +;676: if (cg.HUDHealthFlag) +ADDRGP4 cg+13772 +INDIRI4 +CNSTI4 0 +EQI4 $462 +line 677 +;677: { +line 678 +;678: cg.HUDHealthFlag = qfalse; +ADDRGP4 cg+13772 +CNSTI4 0 +ASGNI4 +line 679 +;679: } +ADDRGP4 $463 +JUMPV +LABELV $462 +line 681 +;680: else +;681: { +line 682 +;682: cg.HUDHealthFlag = qtrue; +ADDRGP4 cg+13772 +CNSTI4 1 +ASGNI4 +line 683 +;683: } +LABELV $463 +line 684 +;684: } +LABELV $459 +line 685 +;685: } +LABELV $452 +line 686 +;686: } +LABELV $450 +line 689 +;687: +;688: // Draw the ticks +;689: if (cg.HUDHealthFlag) +ADDRGP4 cg+13772 +INDIRI4 +CNSTI4 0 +EQI4 $467 +line 690 +;690: { +line 691 +;691: trap_R_SetColor( colorTable[CT_RED] ); +ADDRGP4 colorTable+32 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 692 +;692: CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealthTic ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 56 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1176 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 693 +;693: } +LABELV $467 +line 695 +;694: +;695: if (cg.HUDArmorFlag) +ADDRGP4 cg+13768 +INDIRI4 +CNSTI4 0 +EQI4 $473 +line 696 +;696: { +line 697 +;697: trap_R_SetColor( colorTable[CT_GREEN] ); +ADDRGP4 colorTable+48 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 698 +;698: CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmorTic ); // +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 56 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1180 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 699 +;699: } +LABELV $473 +line 701 +;700: +;701: trap_R_SetColor(hudTintColor); +ADDRGP4 hudTintColor +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 702 +;702: CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeftStatic ); // +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 56 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1184 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 704 +;703: +;704: trap_R_SetColor( colorTable[CT_RED] ); +ADDRGP4 colorTable+32 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 705 +;705: CG_DrawNumField (x + 16, y + 40, 3, ps->stats[STAT_HEALTH], 14, 18, +ADDRFP4 0 +INDIRI4 +CNSTI4 16 +ADDI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +CNSTI4 40 +ADDI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 14 +ARGI4 +CNSTI4 18 +ARGI4 +CNSTI4 2 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawNumField +CALLV +pop +line 708 +;706: NUM_FONT_SMALL,qfalse); +;707: +;708: trap_R_SetColor( colorTable[CT_GREEN] ); +ADDRGP4 colorTable+48 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 709 +;709: CG_DrawNumField (x + 18 + 14, y + 40 + 14, 3, ps->stats[STAT_ARMOR], 14, 18, +ADDRLP4 60 +CNSTI4 18 +ASGNI4 +ADDRLP4 64 +CNSTI4 14 +ASGNI4 +ADDRFP4 0 +INDIRI4 +ADDRLP4 60 +INDIRI4 +ADDI4 +ADDRLP4 64 +INDIRI4 +ADDI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +CNSTI4 40 +ADDI4 +ADDRLP4 64 +INDIRI4 +ADDI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawNumField +CALLV +pop +line 712 +;710: NUM_FONT_SMALL,qfalse); +;711: +;712: trap_R_SetColor(hudTintColor ); +ADDRGP4 hudTintColor +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 713 +;713: CG_DrawPic( x, y, 80, 80, cgs.media.HUDLeft ); // Metal frame +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 68 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 68 +INDIRF4 +ARGF4 +ADDRLP4 68 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1188 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 714 +;714:} +LABELV $404 +endproc DrawHealthArmor 72 32 +export CG_DrawHealth +proc CG_DrawHealth 36 32 +line 722 +;715: +;716:/* +;717:================ +;718:CG_DrawHealth +;719:================ +;720:*/ +;721:void CG_DrawHealth(int x,int y) +;722:{ +line 728 +;723: vec4_t calcColor; +;724: float healthPercent; +;725: playerState_t *ps; +;726: int healthAmt; +;727: +;728: ps = &cg.snap->ps; +ADDRLP4 0 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +line 730 +;729: +;730: healthAmt = ps->stats[STAT_HEALTH]; +ADDRLP4 24 +ADDRLP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ASGNI4 +line 732 +;731: +;732: if (healthAmt > ps->stats[STAT_MAX_HEALTH]) +ADDRLP4 24 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +LEI4 $487 +line 733 +;733: { +line 734 +;734: healthAmt = ps->stats[STAT_MAX_HEALTH]; +ADDRLP4 24 +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +ASGNI4 +line 735 +;735: } +LABELV $487 +line 737 +;736: +;737: memcpy(calcColor, colorTable[CT_HUD_RED], sizeof(vec4_t)); +ADDRLP4 4 +ARGP4 +ADDRGP4 colorTable+1008 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 738 +;738: healthPercent = (float) healthAmt/ps->stats[STAT_MAX_HEALTH]; +ADDRLP4 20 +ADDRLP4 24 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 739 +;739: calcColor[0] *= healthPercent; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ASGNF4 +line 740 +;740: calcColor[1] *= healthPercent; +ADDRLP4 4+4 +ADDRLP4 4+4 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ASGNF4 +line 741 +;741: calcColor[2] *= healthPercent; +ADDRLP4 4+8 +ADDRLP4 4+8 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ASGNF4 +line 742 +;742: trap_R_SetColor( calcColor); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 743 +;743: CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealth ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 28 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1172 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 746 +;744: +;745: // Draw the ticks +;746: if (cg.HUDHealthFlag) +ADDRGP4 cg+13772 +INDIRI4 +CNSTI4 0 +EQI4 $494 +line 747 +;747: { +line 748 +;748: trap_R_SetColor( colorTable[CT_HUD_RED] ); +ADDRGP4 colorTable+1008 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 749 +;749: CG_DrawPic( x, y, 80, 80, cgs.media.HUDHealthTic ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 32 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ARGF4 +ADDRLP4 32 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1176 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 750 +;750: } +LABELV $494 +line 752 +;751: +;752: trap_R_SetColor( colorTable[CT_HUD_RED] ); +ADDRGP4 colorTable+1008 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 753 +;753: CG_DrawNumField (x + 16, y + 40, 3, ps->stats[STAT_HEALTH], 6, 12, +ADDRFP4 0 +INDIRI4 +CNSTI4 16 +ADDI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +CNSTI4 40 +ADDI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 12 +ARGI4 +CNSTI4 2 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawNumField +CALLV +pop +line 756 +;754: NUM_FONT_SMALL,qfalse); +;755: +;756:} +LABELV $485 +endproc CG_DrawHealth 36 32 +export CG_DrawArmor +proc CG_DrawArmor 44 32 +line 764 +;757: +;758:/* +;759:================ +;760:CG_DrawArmor +;761:================ +;762:*/ +;763:void CG_DrawArmor(int x,int y) +;764:{ +line 770 +;765: vec4_t calcColor; +;766: float armorPercent,hold; +;767: playerState_t *ps; +;768: int armor; +;769: +;770: ps = &cg.snap->ps; +ADDRLP4 20 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +line 773 +;771: +;772: // Outer Armor circular +;773: memcpy(calcColor, colorTable[CT_HUD_GREEN], sizeof(vec4_t)); +ADDRLP4 4 +ARGP4 +ADDRGP4 colorTable+992 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 775 +;774: +;775: armor =ps->stats[STAT_ARMOR]; +ADDRLP4 24 +ADDRLP4 20 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +ASGNI4 +line 777 +;776: +;777: if (armor> ps->stats[STAT_MAX_HEALTH]) +ADDRLP4 24 +INDIRI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +LEI4 $504 +line 778 +;778: { +line 779 +;779: armor = ps->stats[STAT_MAX_HEALTH]; +ADDRLP4 24 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +ASGNI4 +line 780 +;780: } +LABELV $504 +line 782 +;781: +;782: hold = armor-(ps->stats[STAT_MAX_HEALTH]/2); +ADDRLP4 28 +ADDRLP4 24 +INDIRI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 783 +;783: armorPercent = (float) hold/(ps->stats[STAT_MAX_HEALTH]/2); +ADDRLP4 0 +ADDRLP4 28 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 2 +DIVI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 784 +;784: if (armorPercent <0) +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +GEF4 $506 +line 785 +;785: { +line 786 +;786: armorPercent = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 787 +;787: } +LABELV $506 +line 788 +;788: calcColor[0] *= armorPercent; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 789 +;789: calcColor[1] *= armorPercent; +ADDRLP4 4+4 +ADDRLP4 4+4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 790 +;790: calcColor[2] *= armorPercent; +ADDRLP4 4+8 +ADDRLP4 4+8 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 791 +;791: trap_R_SetColor( calcColor); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 792 +;792: CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor1 ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 32 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ARGF4 +ADDRLP4 32 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1164 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 795 +;793: +;794: // Inner Armor circular +;795: if (armorPercent>0) +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +LEF4 $512 +line 796 +;796: { +line 797 +;797: armorPercent = 1; +ADDRLP4 0 +CNSTF4 1065353216 +ASGNF4 +line 798 +;798: } +ADDRGP4 $513 +JUMPV +LABELV $512 +line 800 +;799: else +;800: { +line 801 +;801: armorPercent = (float) ps->stats[STAT_ARMOR]/(ps->stats[STAT_MAX_HEALTH]/2); +ADDRLP4 0 +ADDRLP4 20 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 2 +DIVI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 802 +;802: } +LABELV $513 +line 803 +;803: memcpy(calcColor, colorTable[CT_HUD_GREEN], sizeof(vec4_t)); +ADDRLP4 4 +ARGP4 +ADDRGP4 colorTable+992 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 804 +;804: calcColor[0] *= armorPercent; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 805 +;805: calcColor[1] *= armorPercent; +ADDRLP4 4+4 +ADDRLP4 4+4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 806 +;806: calcColor[2] *= armorPercent; +ADDRLP4 4+8 +ADDRLP4 4+8 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 807 +;807: trap_R_SetColor( calcColor); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 808 +;808: CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmor2 ); // Inner Armor circular +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 36 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 36 +INDIRF4 +ARGF4 +ADDRLP4 36 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1168 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 810 +;809: +;810: if (ps->stats[STAT_ARMOR]) // Is there armor? Draw the HUD Armor TIC +ADDRLP4 20 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $519 +line 811 +;811: { +line 813 +;812: // Make tic flash if inner armor is at 50% (25% of full armor) +;813: if (armorPercent<.5) // Do whatever the flash timer says +ADDRLP4 0 +INDIRF4 +CNSTF4 1056964608 +GEF4 $521 +line 814 +;814: { +line 815 +;815: if (cg.HUDTickFlashTime < cg.time) // Flip at the same time +ADDRGP4 cg+13764 +INDIRF4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +GEF4 $520 +line 816 +;816: { +line 817 +;817: cg.HUDTickFlashTime = cg.time + 100; +ADDRGP4 cg+13764 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 100 +ADDI4 +CVIF4 4 +ASGNF4 +line 818 +;818: if (cg.HUDArmorFlag) +ADDRGP4 cg+13768 +INDIRI4 +CNSTI4 0 +EQI4 $529 +line 819 +;819: { +line 820 +;820: cg.HUDArmorFlag = qfalse; +ADDRGP4 cg+13768 +CNSTI4 0 +ASGNI4 +line 821 +;821: } +ADDRGP4 $520 +JUMPV +LABELV $529 +line 823 +;822: else +;823: { +line 824 +;824: cg.HUDArmorFlag = qtrue; +ADDRGP4 cg+13768 +CNSTI4 1 +ASGNI4 +line 825 +;825: } +line 826 +;826: } +line 827 +;827: } +ADDRGP4 $520 +JUMPV +LABELV $521 +line 829 +;828: else +;829: { +line 830 +;830: cg.HUDArmorFlag=qtrue; +ADDRGP4 cg+13768 +CNSTI4 1 +ASGNI4 +line 831 +;831: } +line 832 +;832: } +ADDRGP4 $520 +JUMPV +LABELV $519 +line 834 +;833: else // No armor? Don't show it. +;834: { +line 835 +;835: cg.HUDArmorFlag=qfalse; +ADDRGP4 cg+13768 +CNSTI4 0 +ASGNI4 +line 836 +;836: } +LABELV $520 +line 838 +;837: +;838: if (cg.HUDArmorFlag) +ADDRGP4 cg+13768 +INDIRI4 +CNSTI4 0 +EQI4 $536 +line 839 +;839: { +line 840 +;840: trap_R_SetColor( colorTable[CT_HUD_GREEN] ); +ADDRGP4 colorTable+992 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 841 +;841: CG_DrawPic( x, y, 80, 80, cgs.media.HUDArmorTic ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 40 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 40 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1180 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 842 +;842: } +LABELV $536 +line 844 +;843: +;844: trap_R_SetColor( colorTable[CT_HUD_GREEN] ); +ADDRGP4 colorTable+992 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 845 +;845: CG_DrawNumField (x + 18 + 14, y + 40 + 14, 3, ps->stats[STAT_ARMOR], 6, 12, +ADDRLP4 40 +CNSTI4 14 +ASGNI4 +ADDRFP4 0 +INDIRI4 +CNSTI4 18 +ADDI4 +ADDRLP4 40 +INDIRI4 +ADDI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +CNSTI4 40 +ADDI4 +ADDRLP4 40 +INDIRI4 +ADDI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 12 +ARGI4 +CNSTI4 2 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawNumField +CALLV +pop +line 848 +;846: NUM_FONT_SMALL,qfalse); +;847: +;848:} +LABELV $501 +endproc CG_DrawArmor 44 32 +export CG_DrawHUDRightFrame1 +proc CG_DrawHUDRightFrame1 4 20 +line 856 +;849: +;850:/* +;851:================ +;852:CG_DrawHUDRightFrame1 +;853:================ +;854:*/ +;855:void CG_DrawHUDRightFrame1(int x,int y) +;856:{ +line 857 +;857: trap_R_SetColor( hudTintColor ); +ADDRGP4 hudTintColor +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 859 +;858: // Inner gray wire frame +;859: CG_DrawPic( x, y, 80, 80, cgs.media.HUDInnerRight ); // +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1208 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 860 +;860:} +LABELV $543 +endproc CG_DrawHUDRightFrame1 4 20 +export CG_DrawHUDRightFrame2 +proc CG_DrawHUDRightFrame2 4 20 +line 868 +;861: +;862:/* +;863:================ +;864:CG_DrawHUDRightFrame2 +;865:================ +;866:*/ +;867:void CG_DrawHUDRightFrame2(int x,int y) +;868:{ +line 869 +;869: trap_R_SetColor( hudTintColor ); +ADDRGP4 hudTintColor +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 870 +;870: CG_DrawPic( x, y, 80, 80, cgs.media.HUDRightFrame ); // Metal frame +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +CNSTF4 1117782016 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+1204 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 871 +;871:} +LABELV $546 +endproc CG_DrawHUDRightFrame2 4 20 +proc CG_DrawAmmo 44 32 +line 879 +;872: +;873:/* +;874:================ +;875:CG_DrawAmmo +;876:================ +;877:*/ +;878:static void CG_DrawAmmo(centity_t *cent,int x,int y) +;879:{ +line 886 +;880: playerState_t *ps; +;881: int numColor_i; +;882: int i; +;883: vec4_t calcColor; +;884: float value,inc,percent; +;885: +;886: ps = &cg.snap->ps; +ADDRLP4 32 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +line 888 +;887: +;888: if (!cent->currentState.weapon ) // We don't have a weapon right now +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $551 +line 889 +;889: { +line 890 +;890: return; +ADDRGP4 $549 +JUMPV +LABELV $551 +line 893 +;891: } +;892: +;893: if ( cent->currentState.weapon == WP_SABER ) +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $553 +line 894 +;894: { +line 895 +;895: trap_R_SetColor( colorTable[CT_WHITE] ); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 897 +;896: // don't need to draw ammo, but we will draw the current saber style in this window +;897: switch ( cg.predictedPlayerState.fd.saberDrawAnimLevel ) +ADDRLP4 40 +ADDRGP4 cg+96+772+460 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 1 +EQI4 $561 +ADDRLP4 40 +INDIRI4 +CNSTI4 2 +EQI4 $564 +ADDRLP4 40 +INDIRI4 +CNSTI4 3 +EQI4 $567 +ADDRGP4 $549 +JUMPV +line 898 +;898: { +LABELV $561 +line 900 +;899: case 1://FORCE_LEVEL_1: +;900: CG_DrawPic( x, y, 80, 40, cgs.media.HUDSaberStyle1 ); +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1117782016 +ARGF4 +CNSTF4 1109393408 +ARGF4 +ADDRGP4 cgs+70296+1192 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 901 +;901: break; +ADDRGP4 $549 +JUMPV +LABELV $564 +line 903 +;902: case 2://FORCE_LEVEL_2: +;903: CG_DrawPic( x, y, 80, 40, cgs.media.HUDSaberStyle2 ); +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1117782016 +ARGF4 +CNSTF4 1109393408 +ARGF4 +ADDRGP4 cgs+70296+1196 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 904 +;904: break; +ADDRGP4 $549 +JUMPV +LABELV $567 +line 906 +;905: case 3://FORCE_LEVEL_3: +;906: CG_DrawPic( x, y, 80, 40, cgs.media.HUDSaberStyle3 ); +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1117782016 +ARGF4 +CNSTF4 1109393408 +ARGF4 +ADDRGP4 cgs+70296+1200 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 907 +;907: break; +line 909 +;908: } +;909: return; +ADDRGP4 $549 +JUMPV +LABELV $553 +line 912 +;910: } +;911: else +;912: { +line 913 +;913: value = ps->ammo[weaponData[cent->currentState.weapon].ammoIndex]; +ADDRLP4 4 +CNSTI4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 914 +;914: } +line 916 +;915: +;916: if (value < 0) // No ammo +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +GEF4 $570 +line 917 +;917: { +line 918 +;918: return; +ADDRGP4 $549 +JUMPV +LABELV $570 +line 962 +;919: } +;920: +;921: +;922: // +;923: // ammo +;924: // +;925:/* if (cg.oldammo < value) +;926: { +;927: cg.oldAmmoTime = cg.time + 200; +;928: } +;929: +;930: cg.oldammo = value; +;931:*/ +;932: // Firing or reloading? +;933:/* if (( pm->ps->weaponstate == WEAPON_FIRING +;934: && cg.predictedPlayerState.weaponTime > 100 )) +;935: { +;936: numColor_i = CT_LTGREY; +;937: } */ +;938: // Overcharged? +;939:// else if ( cent->gent->s.powerups & ( 1 << PW_WEAPON_OVERCHARGE ) ) +;940:// { +;941:// numColor_i = CT_WHITE; +;942:// } +;943:// else +;944:// { +;945:// if ( value > 0 ) +;946:// { +;947:// if (cg.oldAmmoTime > cg.time) +;948:// { +;949:// numColor_i = CT_YELLOW; +;950:// } +;951:// else +;952:// { +;953:// numColor_i = CT_HUD_ORANGE; +;954:// } +;955:// } +;956:// else +;957:// { +;958:// numColor_i = CT_RED; +;959:// } +;960:// } +;961: +;962: numColor_i = CT_HUD_ORANGE; +ADDRLP4 36 +CNSTI4 66 +ASGNI4 +line 964 +;963: +;964: trap_R_SetColor( colorTable[numColor_i] ); +ADDRLP4 36 +INDIRI4 +CNSTI4 4 +LSHI4 +ADDRGP4 colorTable +ADDP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 965 +;965: CG_DrawNumField (x + 30, y + 26, 3, value, 6, 12, NUM_FONT_SMALL,qfalse); +ADDRFP4 4 +INDIRI4 +CNSTI4 30 +ADDI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +CNSTI4 26 +ADDI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 4 +INDIRF4 +CVFI4 4 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 12 +ARGI4 +CNSTI4 2 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawNumField +CALLV +pop +line 970 +;966: +;967: +;968://cg.snap->ps.ammo[weaponData[cg.snap->ps.weapon].ammoIndex] +;969: +;970: inc = (float) ammoData[weaponData[cent->currentState.weapon].ammoIndex].max / MAX_TICS; +ADDRLP4 24 +CNSTI4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 ammoData +ADDP4 +INDIRI4 +CVIF4 4 +CNSTF4 1096810496 +DIVF4 +ASGNF4 +line 971 +;971: value =ps->ammo[weaponData[cent->currentState.weapon].ammoIndex]; +ADDRLP4 4 +CNSTI4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 973 +;972: +;973: for (i=MAX_TICS-1;i>=0;i--) +ADDRLP4 0 +CNSTI4 13 +ASGNI4 +LABELV $572 +line 974 +;974: { +line 976 +;975: +;976: if (value <= 0) // partial tic +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +GTF4 $576 +line 977 +;977: { +line 978 +;978: memcpy(calcColor, colorTable[CT_BLACK], sizeof(vec4_t)); +ADDRLP4 8 +ARGP4 +ADDRGP4 colorTable+16 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 979 +;979: } +ADDRGP4 $577 +JUMPV +LABELV $576 +line 980 +;980: else if (value < inc) // partial tic +ADDRLP4 4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +GEF4 $579 +line 981 +;981: { +line 982 +;982: memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); +ADDRLP4 8 +ARGP4 +ADDRGP4 colorTable+128 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 983 +;983: percent = value / inc; +ADDRLP4 28 +ADDRLP4 4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +DIVF4 +ASGNF4 +line 984 +;984: calcColor[0] *= percent; +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 985 +;985: calcColor[1] *= percent; +ADDRLP4 8+4 +ADDRLP4 8+4 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 986 +;986: calcColor[2] *= percent; +ADDRLP4 8+8 +ADDRLP4 8+8 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 987 +;987: } +ADDRGP4 $580 +JUMPV +LABELV $579 +line 989 +;988: else +;989: { +line 990 +;990: memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); +ADDRLP4 8 +ARGP4 +ADDRGP4 colorTable+128 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 991 +;991: } +LABELV $580 +LABELV $577 +line 993 +;992: +;993: trap_R_SetColor( calcColor); +ADDRLP4 8 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 994 +;994: CG_DrawPic( x + ammoTicPos[i].x, +ADDRLP4 40 +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRFP4 4 +INDIRI4 +ADDRLP4 40 +INDIRI4 +ADDRGP4 ammoTicPos +ADDP4 +INDIRI4 +ADDI4 +CVIF4 4 +ARGF4 +ADDRFP4 8 +INDIRI4 +ADDRLP4 40 +INDIRI4 +ADDRGP4 ammoTicPos+4 +ADDP4 +INDIRI4 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 40 +INDIRI4 +ADDRGP4 ammoTicPos+8 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 40 +INDIRI4 +ADDRGP4 ammoTicPos+12 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 40 +INDIRI4 +ADDRGP4 ammoTicPos+20 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1000 +;995: y + ammoTicPos[i].y, +;996: ammoTicPos[i].width, +;997: ammoTicPos[i].height, +;998: ammoTicPos[i].tic ); +;999: +;1000: value -= inc; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +SUBF4 +ASGNF4 +line 1001 +;1001: } +LABELV $573 +line 973 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GEI4 $572 +line 1003 +;1002: +;1003:} +LABELV $549 +endproc CG_DrawAmmo 44 32 +export CG_DrawForcePower +proc CG_DrawForcePower 36 20 +line 1011 +;1004: +;1005:/* +;1006:================ +;1007:CG_DrawForcePower +;1008:================ +;1009:*/ +;1010:void CG_DrawForcePower(int x,int y) +;1011:{ +line 1016 +;1012: int i; +;1013: vec4_t calcColor; +;1014: float value,inc,percent; +;1015: +;1016: inc = (float) 100 / MAX_TICS; +ADDRLP4 24 +CNSTF4 1088721481 +ASGNF4 +line 1017 +;1017: value = cg.snap->ps.fd.forcePower; +ADDRLP4 4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 976 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1019 +;1018: +;1019: for (i=MAX_TICS-1;i>=0;i--) +ADDRLP4 0 +CNSTI4 13 +ASGNI4 +LABELV $591 +line 1020 +;1020: { +line 1022 +;1021: +;1022: if (value <= 0) // partial tic +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +GTF4 $595 +line 1023 +;1023: { +line 1024 +;1024: memcpy(calcColor, colorTable[CT_BLACK], sizeof(vec4_t)); +ADDRLP4 8 +ARGP4 +ADDRGP4 colorTable+16 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 1025 +;1025: } +ADDRGP4 $596 +JUMPV +LABELV $595 +line 1026 +;1026: else if (value < inc) // partial tic +ADDRLP4 4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +GEF4 $598 +line 1027 +;1027: { +line 1028 +;1028: memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); +ADDRLP4 8 +ARGP4 +ADDRGP4 colorTable+128 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 1029 +;1029: percent = value / inc; +ADDRLP4 28 +ADDRLP4 4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +DIVF4 +ASGNF4 +line 1030 +;1030: calcColor[0] *= percent; +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 1031 +;1031: calcColor[1] *= percent; +ADDRLP4 8+4 +ADDRLP4 8+4 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 1032 +;1032: calcColor[2] *= percent; +ADDRLP4 8+8 +ADDRLP4 8+8 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 1033 +;1033: } +ADDRGP4 $599 +JUMPV +LABELV $598 +line 1035 +;1034: else +;1035: { +line 1036 +;1036: memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); +ADDRLP4 8 +ARGP4 +ADDRGP4 colorTable+128 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 1037 +;1037: } +LABELV $599 +LABELV $596 +line 1039 +;1038: +;1039: trap_R_SetColor( calcColor); +ADDRLP4 8 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1040 +;1040: CG_DrawPic( x + forceTicPos[i].x, +ADDRLP4 32 +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRFP4 0 +INDIRI4 +ADDRLP4 32 +INDIRI4 +ADDRGP4 forceTicPos +ADDP4 +INDIRI4 +ADDI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +ADDRLP4 32 +INDIRI4 +ADDRGP4 forceTicPos+4 +ADDP4 +INDIRI4 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 32 +INDIRI4 +ADDRGP4 forceTicPos+8 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 32 +INDIRI4 +ADDRGP4 forceTicPos+12 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 32 +INDIRI4 +ADDRGP4 forceTicPos+20 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1046 +;1041: y + forceTicPos[i].y, +;1042: forceTicPos[i].width, +;1043: forceTicPos[i].height, +;1044: forceTicPos[i].tic ); +;1045: +;1046: value -= inc; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +SUBF4 +ASGNF4 +line 1047 +;1047: } +LABELV $592 +line 1019 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GEI4 $591 +line 1048 +;1048:} +LABELV $589 +endproc CG_DrawForcePower 36 20 +export CG_DrawHUD +proc CG_DrawHUD 128 24 +line 1056 +;1049: +;1050:/* +;1051:================ +;1052:CG_DrawHUD +;1053:================ +;1054:*/ +;1055:void CG_DrawHUD(centity_t *cent) +;1056:{ +line 1057 +;1057: menuDef_t *menuHUD = NULL; +ADDRLP4 0 +CNSTP4 0 +ASGNP4 +line 1058 +;1058: const char *scoreStr = NULL; +ADDRLP4 4 +CNSTP4 0 +ASGNP4 +line 1062 +;1059: int scoreBias; +;1060: char scoreBiasStr[16]; +;1061: +;1062: if (cg_hudFiles.integer) +ADDRGP4 cg_hudFiles+12 +INDIRI4 +CNSTI4 0 +EQI4 $609 +line 1063 +;1063: { +line 1064 +;1064: int x = 0; +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +line 1065 +;1065: int y = SCREEN_HEIGHT-80; +ADDRLP4 32 +CNSTI4 400 +ASGNI4 +line 1067 +;1066: char ammoString[64]; +;1067: int weapX = x; +ADDRLP4 36 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 1069 +;1068: +;1069: UI_DrawProportionalString( x+16, y+40, va( "%i", cg.snap->ps.stats[STAT_HEALTH] ), +ADDRGP4 $612 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 104 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 28 +INDIRI4 +CNSTI4 16 +ADDI4 +ARGI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 40 +ADDI4 +ARGI4 +ADDRLP4 104 +INDIRP4 +ARGP4 +CNSTI4 2064 +ARGI4 +ADDRGP4 colorTable+1008 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 1072 +;1070: UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_HUD_RED] ); +;1071: +;1072: UI_DrawProportionalString( x+18+14, y+40+14, va( "%i", cg.snap->ps.stats[STAT_ARMOR] ), +ADDRGP4 $612 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 108 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 112 +CNSTI4 14 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 18 +ADDI4 +ADDRLP4 112 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 40 +ADDI4 +ADDRLP4 112 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 108 +INDIRP4 +ARGP4 +CNSTI4 2064 +ARGI4 +ADDRGP4 colorTable+992 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 1075 +;1073: UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_HUD_GREEN] ); +;1074: +;1075: if (cg.snap->ps.weapon == WP_SABER) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $617 +line 1076 +;1076: { +line 1077 +;1077: if (cg.snap->ps.fd.saberDrawAnimLevel == FORCE_LEVEL_3) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1276 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $620 +line 1078 +;1078: { +line 1079 +;1079: Com_sprintf(ammoString, sizeof(ammoString), "STRONG"); +ADDRLP4 40 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $623 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1080 +;1080: weapX += 16; +ADDRLP4 36 +ADDRLP4 36 +INDIRI4 +CNSTI4 16 +ADDI4 +ASGNI4 +line 1081 +;1081: } +ADDRGP4 $618 +JUMPV +LABELV $620 +line 1082 +;1082: else if (cg.snap->ps.fd.saberDrawAnimLevel == FORCE_LEVEL_2) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1276 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $624 +line 1083 +;1083: { +line 1084 +;1084: Com_sprintf(ammoString, sizeof(ammoString), "MEDIUM"); +ADDRLP4 40 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $627 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1085 +;1085: weapX += 16; +ADDRLP4 36 +ADDRLP4 36 +INDIRI4 +CNSTI4 16 +ADDI4 +ASGNI4 +line 1086 +;1086: } +ADDRGP4 $618 +JUMPV +LABELV $624 +line 1088 +;1087: else +;1088: { +line 1089 +;1089: Com_sprintf(ammoString, sizeof(ammoString), "FAST"); +ADDRLP4 40 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $628 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1090 +;1090: } +line 1091 +;1091: } +ADDRGP4 $618 +JUMPV +LABELV $617 +line 1093 +;1092: else +;1093: { +line 1094 +;1094: Com_sprintf(ammoString, sizeof(ammoString), "%i", cg.snap->ps.ammo[weaponData[cent->currentState.weapon].ammoIndex]); +ADDRLP4 40 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $612 +ARGP4 +CNSTI4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 452 +ADDP4 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1095 +;1095: } +LABELV $618 +line 1097 +;1096: +;1097: UI_DrawProportionalString( SCREEN_WIDTH-(weapX+16+32), y+40, va( "%s", ammoString ), +ADDRGP4 $630 +ARGP4 +ADDRLP4 40 +ARGP4 +ADDRLP4 116 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 640 +ADDRLP4 36 +INDIRI4 +CNSTI4 16 +ADDI4 +CNSTI4 32 +ADDI4 +SUBI4 +ARGI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 40 +ADDI4 +ARGI4 +ADDRLP4 116 +INDIRP4 +ARGP4 +CNSTI4 2064 +ARGI4 +ADDRGP4 colorTable+1056 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 1100 +;1098: UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_HUD_ORANGE] ); +;1099: +;1100: UI_DrawProportionalString( SCREEN_WIDTH-(x+18+14+32), y+40+14, va( "%i", cg.snap->ps.fd.forcePower), +ADDRGP4 $612 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 976 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 120 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 124 +CNSTI4 14 +ASGNI4 +CNSTI4 640 +ADDRLP4 28 +INDIRI4 +CNSTI4 18 +ADDI4 +ADDRLP4 124 +INDIRI4 +ADDI4 +CNSTI4 32 +ADDI4 +SUBI4 +ARGI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 40 +ADDI4 +ADDRLP4 124 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 120 +INDIRP4 +ARGP4 +CNSTI4 2064 +ARGI4 +ADDRGP4 colorTable+1024 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 1103 +;1101: UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_ICON_BLUE] ); +;1102: +;1103: return; +ADDRGP4 $608 +JUMPV +LABELV $609 +line 1106 +;1104: } +;1105: +;1106: if (cgs.gametype >= GT_TEAM) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $634 +line 1107 +;1107: { // tint the hud items based on team +line 1108 +;1108: if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $637 +line 1109 +;1109: hudTintColor = redhudtint; +ADDRGP4 hudTintColor +ADDRGP4 redhudtint +ASGNP4 +ADDRGP4 $635 +JUMPV +LABELV $637 +line 1110 +;1110: else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $640 +line 1111 +;1111: hudTintColor = bluehudtint; +ADDRGP4 hudTintColor +ADDRGP4 bluehudtint +ASGNP4 +ADDRGP4 $635 +JUMPV +LABELV $640 +line 1113 +;1112: else // If we're not on a team for whatever reason, leave things as they are. +;1113: hudTintColor = colorTable[CT_WHITE]; +ADDRGP4 hudTintColor +ADDRGP4 colorTable+128 +ASGNP4 +line 1114 +;1114: } +ADDRGP4 $635 +JUMPV +LABELV $634 +line 1116 +;1115: else +;1116: { // tint the hud items white (dont' tint) +line 1117 +;1117: hudTintColor = colorTable[CT_WHITE]; +ADDRGP4 hudTintColor +ADDRGP4 colorTable+128 +ASGNP4 +line 1118 +;1118: } +LABELV $635 +line 1120 +;1119: +;1120: menuHUD = Menus_FindByName("lefthud"); +ADDRGP4 $645 +ARGP4 +ADDRLP4 28 +ADDRGP4 Menus_FindByName +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 28 +INDIRP4 +ASGNP4 +line 1121 +;1121: if (menuHUD) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $646 +line 1122 +;1122: { +line 1123 +;1123: CG_DrawHUDLeftFrame1(menuHUD->window.rect.x,menuHUD->window.rect.y); +ADDRLP4 0 +INDIRP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_DrawHUDLeftFrame1 +CALLV +pop +line 1124 +;1124: CG_DrawArmor(menuHUD->window.rect.x,menuHUD->window.rect.y); +ADDRLP4 0 +INDIRP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_DrawArmor +CALLV +pop +line 1125 +;1125: CG_DrawHealth(menuHUD->window.rect.x,menuHUD->window.rect.y); +ADDRLP4 0 +INDIRP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_DrawHealth +CALLV +pop +line 1126 +;1126: CG_DrawHUDLeftFrame2(menuHUD->window.rect.x,menuHUD->window.rect.y); +ADDRLP4 0 +INDIRP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_DrawHUDLeftFrame2 +CALLV +pop +line 1127 +;1127: } +ADDRGP4 $647 +JUMPV +LABELV $646 +line 1129 +;1128: else +;1129: { //Apparently we failed to get proper coordinates from the menu, so resort to manually inputting them. +line 1130 +;1130: CG_DrawHUDLeftFrame1(0,SCREEN_HEIGHT-80); +CNSTI4 0 +ARGI4 +CNSTI4 400 +ARGI4 +ADDRGP4 CG_DrawHUDLeftFrame1 +CALLV +pop +line 1131 +;1131: CG_DrawArmor(0,SCREEN_HEIGHT-80); +CNSTI4 0 +ARGI4 +CNSTI4 400 +ARGI4 +ADDRGP4 CG_DrawArmor +CALLV +pop +line 1132 +;1132: CG_DrawHealth(0,SCREEN_HEIGHT-80); +CNSTI4 0 +ARGI4 +CNSTI4 400 +ARGI4 +ADDRGP4 CG_DrawHealth +CALLV +pop +line 1133 +;1133: CG_DrawHUDLeftFrame2(0,SCREEN_HEIGHT-80); +CNSTI4 0 +ARGI4 +CNSTI4 400 +ARGI4 +ADDRGP4 CG_DrawHUDLeftFrame2 +CALLV +pop +line 1134 +;1134: } +LABELV $647 +line 1137 +;1135: +;1136: //scoreStr = va("Score: %i", cgs.clientinfo[cg.snap->ps.clientNum].score); +;1137: if ( cgs.gametype == GT_TOURNAMENT ) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $648 +line 1138 +;1138: {//A duel that requires more than one kill to knock the current enemy back to the queue +line 1140 +;1139: //show current kills out of how many needed +;1140: scoreStr = va("Score: %i/%i", cg.snap->ps.persistant[PERS_SCORE], cgs.fraglimit); +ADDRGP4 $651 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 324 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cgs+32972 +INDIRI4 +ARGI4 +ADDRLP4 32 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 32 +INDIRP4 +ASGNP4 +line 1141 +;1141: } +ADDRGP4 $649 +JUMPV +LABELV $648 +line 1142 +;1142: else if (0 && cgs.gametype < GT_TEAM ) +ADDRGP4 $654 +JUMPV +line 1143 +;1143: { // This is a teamless mode, draw the score bias. +line 1144 +;1144: scoreBias = cg.snap->ps.persistant[PERS_SCORE] - cgs.scores1; +ADDRLP4 8 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 324 +ADDP4 +INDIRI4 +ADDRGP4 cgs+36324 +INDIRI4 +SUBI4 +ASGNI4 +line 1145 +;1145: if (scoreBias == 0) +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $659 +line 1146 +;1146: { // We are the leader! +line 1147 +;1147: if (cgs.scores2 <= 0) +ADDRGP4 cgs+36328 +INDIRI4 +CNSTI4 0 +GTI4 $661 +line 1148 +;1148: { // Nobody to be ahead of yet. +line 1149 +;1149: Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), ""); +ADDRLP4 12 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 $664 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1150 +;1150: } +ADDRGP4 $660 +JUMPV +LABELV $661 +line 1152 +;1151: else +;1152: { +line 1153 +;1153: scoreBias = cg.snap->ps.persistant[PERS_SCORE] - cgs.scores2; +ADDRLP4 8 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 324 +ADDP4 +INDIRI4 +ADDRGP4 cgs+36328 +INDIRI4 +SUBI4 +ASGNI4 +line 1154 +;1154: if (scoreBias == 0) +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $667 +line 1155 +;1155: { +line 1156 +;1156: Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), " (Tie)"); +ADDRLP4 12 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 $669 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1157 +;1157: } +ADDRGP4 $660 +JUMPV +LABELV $667 +line 1159 +;1158: else +;1159: { +line 1160 +;1160: Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), " (+%d)", scoreBias); +ADDRLP4 12 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 $670 +ARGP4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1161 +;1161: } +line 1162 +;1162: } +line 1163 +;1163: } +ADDRGP4 $660 +JUMPV +LABELV $659 +line 1165 +;1164: else // if (scoreBias < 0) +;1165: { // We are behind! +line 1166 +;1166: Com_sprintf(scoreBiasStr, sizeof(scoreBiasStr), " (%d)", scoreBias); +ADDRLP4 12 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 $671 +ARGP4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1167 +;1167: } +LABELV $660 +line 1168 +;1168: scoreStr = va("Score: %i%s", cg.snap->ps.persistant[PERS_SCORE], scoreBiasStr); +ADDRGP4 $672 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 324 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 12 +ARGP4 +ADDRLP4 32 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 32 +INDIRP4 +ASGNP4 +line 1169 +;1169: } +ADDRGP4 $655 +JUMPV +LABELV $654 +line 1171 +;1170: else +;1171: { // Don't draw a bias. +line 1172 +;1172: scoreStr = va("Score: %i", cg.snap->ps.persistant[PERS_SCORE]); +ADDRGP4 $674 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 324 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 32 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 32 +INDIRP4 +ASGNP4 +line 1173 +;1173: } +LABELV $655 +LABELV $649 +line 1174 +;1174: UI_DrawScaledProportionalString(SCREEN_WIDTH-124/*(strlen(scoreStr)*20.5)*/, SCREEN_HEIGHT-23, scoreStr, UI_RIGHT|UI_DROPSHADOW, colorTable[CT_WHITE], 0.7); +CNSTI4 516 +ARGI4 +CNSTI4 457 +ARGI4 +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTI4 2050 +ARGI4 +ADDRGP4 colorTable+128 +ARGP4 +CNSTF4 1060320051 +ARGF4 +ADDRGP4 UI_DrawScaledProportionalString +CALLV +pop +line 1176 +;1175: +;1176: menuHUD = Menus_FindByName("righthud"); +ADDRGP4 $677 +ARGP4 +ADDRLP4 32 +ADDRGP4 Menus_FindByName +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 32 +INDIRP4 +ASGNP4 +line 1177 +;1177: if (menuHUD) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $678 +line 1178 +;1178: { +line 1179 +;1179: CG_DrawHUDRightFrame1(menuHUD->window.rect.x,menuHUD->window.rect.y); +ADDRLP4 0 +INDIRP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_DrawHUDRightFrame1 +CALLV +pop +line 1180 +;1180: CG_DrawForcePower(menuHUD->window.rect.x,menuHUD->window.rect.y); +ADDRLP4 0 +INDIRP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_DrawForcePower +CALLV +pop +line 1181 +;1181: CG_DrawAmmo(cent,menuHUD->window.rect.x,menuHUD->window.rect.y); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_DrawAmmo +CALLV +pop +line 1182 +;1182: CG_DrawHUDRightFrame2(menuHUD->window.rect.x,menuHUD->window.rect.y); +ADDRLP4 0 +INDIRP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_DrawHUDRightFrame2 +CALLV +pop +line 1184 +;1183: +;1184: } +ADDRGP4 $679 +JUMPV +LABELV $678 +line 1186 +;1185: else +;1186: { //Apparently we failed to get proper coordinates from the menu, so resort to manually inputting them. +line 1187 +;1187: CG_DrawHUDRightFrame1(SCREEN_WIDTH-80,SCREEN_HEIGHT-80); +CNSTI4 560 +ARGI4 +CNSTI4 400 +ARGI4 +ADDRGP4 CG_DrawHUDRightFrame1 +CALLV +pop +line 1188 +;1188: CG_DrawForcePower(SCREEN_WIDTH-80,SCREEN_HEIGHT-80); +CNSTI4 560 +ARGI4 +CNSTI4 400 +ARGI4 +ADDRGP4 CG_DrawForcePower +CALLV +pop +line 1189 +;1189: CG_DrawAmmo(cent,SCREEN_WIDTH-80,SCREEN_HEIGHT-80); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 560 +ARGI4 +CNSTI4 400 +ARGI4 +ADDRGP4 CG_DrawAmmo +CALLV +pop +line 1190 +;1190: CG_DrawHUDRightFrame2(SCREEN_WIDTH-80,SCREEN_HEIGHT-80); +CNSTI4 560 +ARGI4 +CNSTI4 400 +ARGI4 +ADDRGP4 CG_DrawHUDRightFrame2 +CALLV +pop +line 1191 +;1191: } +LABELV $679 +line 1192 +;1192:} +LABELV $608 +endproc CG_DrawHUD 128 24 +export ForcePower_Valid +proc ForcePower_Valid 4 0 +line 1197 +;1193: +;1194:#define MAX_SHOWPOWERS NUM_FORCE_POWERS +;1195: +;1196:qboolean ForcePower_Valid(int i) +;1197:{ +line 1198 +;1198: if (i == FP_LEVITATION || +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +EQI4 $685 +ADDRLP4 0 +INDIRI4 +CNSTI4 15 +EQI4 $685 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +EQI4 $685 +ADDRLP4 0 +INDIRI4 +CNSTI4 17 +NEI4 $681 +LABELV $685 +line 1202 +;1199: i == FP_SABERATTACK || +;1200: i == FP_SABERDEFEND || +;1201: i == FP_SABERTHROW) +;1202: { +line 1203 +;1203: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $680 +JUMPV +LABELV $681 +line 1206 +;1204: } +;1205: +;1206: if (cg.snap->ps.fd.forcePowersKnown & (1 << i)) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 888 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRFP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $686 +line 1207 +;1207: { +line 1208 +;1208: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $680 +JUMPV +LABELV $686 +line 1211 +;1209: } +;1210: +;1211: return qfalse; +CNSTI4 0 +RETI4 +LABELV $680 +endproc ForcePower_Valid 4 0 +export CG_DrawForceSelect +proc CG_DrawForceSelect 108 20 +line 1220 +;1212:} +;1213: +;1214:/* +;1215:=================== +;1216:CG_DrawForceSelect +;1217:=================== +;1218:*/ +;1219:void CG_DrawForceSelect( void ) +;1220:{ +line 1229 +;1221: int i; +;1222: int count; +;1223: int smallIconSize,bigIconSize; +;1224: int holdX,x,y,x2,y2,pad,length; +;1225: int sideLeftIconCnt,sideRightIconCnt; +;1226: int sideMax,holdCount,iconCnt; +;1227: +;1228: +;1229: x2 = 0; +ADDRLP4 52 +CNSTI4 0 +ASGNI4 +line 1230 +;1230: y2 = 0; +ADDRLP4 56 +CNSTI4 0 +ASGNI4 +line 1233 +;1231: +;1232: // don't display if dead +;1233: if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $690 +line 1234 +;1234: { +line 1235 +;1235: return; +ADDRGP4 $689 +JUMPV +LABELV $690 +line 1238 +;1236: } +;1237: +;1238: if ((cg.forceSelectTime+WEAPON_SELECT_TIME)ps.fd.forcePowerSelected; +ADDRGP4 cg+3512 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 896 +ADDP4 +INDIRI4 +ASGNI4 +line 1241 +;1241: return; +ADDRGP4 $689 +JUMPV +LABELV $693 +line 1244 +;1242: } +;1243: +;1244: if (!cg.snap->ps.fd.forcePowersKnown) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 888 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $699 +line 1245 +;1245: { +line 1246 +;1246: return; +ADDRGP4 $689 +JUMPV +LABELV $699 +line 1250 +;1247: } +;1248: +;1249: // count the number of powers owned +;1250: count = 0; +ADDRLP4 32 +CNSTI4 0 +ASGNI4 +line 1252 +;1251: +;1252: for (i=0;i < NUM_FORCE_POWERS;++i) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $702 +line 1253 +;1253: { +line 1254 +;1254: if (ForcePower_Valid(i)) +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 64 +ADDRGP4 ForcePower_Valid +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 0 +EQI4 $706 +line 1255 +;1255: { +line 1256 +;1256: count++; +ADDRLP4 32 +ADDRLP4 32 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1257 +;1257: } +LABELV $706 +line 1258 +;1258: } +LABELV $703 +line 1252 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $702 +line 1260 +;1259: +;1260: if (count == 0) // If no force powers, don't display +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +NEI4 $708 +line 1261 +;1261: { +line 1262 +;1262: return; +ADDRGP4 $689 +JUMPV +LABELV $708 +line 1265 +;1263: } +;1264: +;1265: sideMax = 3; // Max number of icons on the side +ADDRLP4 48 +CNSTI4 3 +ASGNI4 +line 1268 +;1266: +;1267: // Calculate how many icons will appear to either side of the center one +;1268: holdCount = count - 1; // -1 for the center icon +ADDRLP4 44 +ADDRLP4 32 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1269 +;1269: if (holdCount == 0) // No icons to either side +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +NEI4 $710 +line 1270 +;1270: { +line 1271 +;1271: sideLeftIconCnt = 0; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +line 1272 +;1272: sideRightIconCnt = 0; +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +line 1273 +;1273: } +ADDRGP4 $711 +JUMPV +LABELV $710 +line 1274 +;1274: else if (count > (2*sideMax)) // Go to the max on each side +ADDRLP4 32 +INDIRI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 1 +LSHI4 +LEI4 $712 +line 1275 +;1275: { +line 1276 +;1276: sideLeftIconCnt = sideMax; +ADDRLP4 20 +ADDRLP4 48 +INDIRI4 +ASGNI4 +line 1277 +;1277: sideRightIconCnt = sideMax; +ADDRLP4 24 +ADDRLP4 48 +INDIRI4 +ASGNI4 +line 1278 +;1278: } +ADDRGP4 $713 +JUMPV +LABELV $712 +line 1280 +;1279: else // Less than max, so do the calc +;1280: { +line 1281 +;1281: sideLeftIconCnt = holdCount/2; +ADDRLP4 20 +ADDRLP4 44 +INDIRI4 +CNSTI4 2 +DIVI4 +ASGNI4 +line 1282 +;1282: sideRightIconCnt = holdCount - sideLeftIconCnt; +ADDRLP4 24 +ADDRLP4 44 +INDIRI4 +ADDRLP4 20 +INDIRI4 +SUBI4 +ASGNI4 +line 1283 +;1283: } +LABELV $713 +LABELV $711 +line 1285 +;1284: +;1285: smallIconSize = 30; +ADDRLP4 8 +CNSTI4 30 +ASGNI4 +line 1286 +;1286: bigIconSize = 60; +ADDRLP4 36 +CNSTI4 60 +ASGNI4 +line 1287 +;1287: pad = 12; +ADDRLP4 16 +CNSTI4 12 +ASGNI4 +line 1289 +;1288: +;1289: x = 320; +ADDRLP4 40 +CNSTI4 320 +ASGNI4 +line 1290 +;1290: y = 425; +ADDRLP4 28 +CNSTI4 425 +ASGNI4 +line 1293 +;1291: +;1292: // Background +;1293: length = (sideLeftIconCnt * smallIconSize) + (sideLeftIconCnt*pad) + +ADDRLP4 60 +ADDRLP4 20 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRLP4 20 +INDIRI4 +ADDRLP4 16 +INDIRI4 +MULI4 +ADDI4 +ADDRLP4 36 +INDIRI4 +ADDI4 +ADDRLP4 24 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDI4 +ADDRLP4 24 +INDIRI4 +ADDRLP4 16 +INDIRI4 +MULI4 +ADDI4 +CNSTI4 12 +ADDI4 +ASGNI4 +line 1296 +;1294: bigIconSize + (sideRightIconCnt * smallIconSize) + (sideRightIconCnt*pad) + 12; +;1295: +;1296: i = BG_ProperForceIndex(cg.forceSelect) - 1; +ADDRGP4 cg+3512 +INDIRI4 +ARGI4 +ADDRLP4 80 +ADDRGP4 BG_ProperForceIndex +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 80 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1297 +;1297: if (i < 0) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GEI4 $715 +line 1298 +;1298: { +line 1299 +;1299: i = MAX_SHOWPOWERS; +ADDRLP4 0 +CNSTI4 18 +ASGNI4 +line 1300 +;1300: } +LABELV $715 +line 1302 +;1301: +;1302: trap_R_SetColor(NULL); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1304 +;1303: // Work backwards from current icon +;1304: holdX = x - ((bigIconSize/2) + pad + smallIconSize); +ADDRLP4 12 +ADDRLP4 40 +INDIRI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 2 +DIVI4 +ADDRLP4 16 +INDIRI4 +ADDI4 +ADDRLP4 8 +INDIRI4 +ADDI4 +SUBI4 +ASGNI4 +line 1305 +;1305: for (iconCnt=1;iconCnt<(sideLeftIconCnt+1);i--) +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +ADDRGP4 $720 +JUMPV +LABELV $717 +line 1306 +;1306: { +line 1307 +;1307: if (i < 0) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GEI4 $721 +line 1308 +;1308: { +line 1309 +;1309: i = MAX_SHOWPOWERS; +ADDRLP4 0 +CNSTI4 18 +ASGNI4 +line 1310 +;1310: } +LABELV $721 +line 1312 +;1311: +;1312: if (!ForcePower_Valid(forcePowerSorted[i])) // Does he have this power? +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 84 +ADDRGP4 ForcePower_Valid +CALLI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +NEI4 $723 +line 1313 +;1313: { +line 1314 +;1314: continue; +ADDRGP4 $718 +JUMPV +LABELV $723 +line 1317 +;1315: } +;1316: +;1317: ++iconCnt; // Good icon +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1319 +;1318: +;1319: if (cgs.media.forcePowerIcons[forcePowerSorted[i]]) +ADDRLP4 88 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 88 +INDIRI4 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ADDRLP4 88 +INDIRI4 +LSHI4 +ADDRGP4 cgs+70296+1084 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $725 +line 1320 +;1320: { +line 1321 +;1321: CG_DrawPic( holdX, y, smallIconSize, smallIconSize, cgs.media.forcePowerIcons[forcePowerSorted[i]] ); +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 92 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 92 +INDIRF4 +ARGF4 +ADDRLP4 92 +INDIRF4 +ARGF4 +ADDRLP4 96 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 96 +INDIRI4 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ADDRLP4 96 +INDIRI4 +LSHI4 +ADDRGP4 cgs+70296+1084 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1322 +;1322: holdX -= (smallIconSize+pad); +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 16 +INDIRI4 +ADDI4 +SUBI4 +ASGNI4 +line 1323 +;1323: } +LABELV $725 +line 1324 +;1324: } +LABELV $718 +line 1305 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +LABELV $720 +ADDRLP4 4 +INDIRI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 1 +ADDI4 +LTI4 $717 +line 1326 +;1325: +;1326: if (ForcePower_Valid(cg.forceSelect)) +ADDRGP4 cg+3512 +INDIRI4 +ARGI4 +ADDRLP4 84 +ADDRGP4 ForcePower_Valid +CALLI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +EQI4 $731 +line 1327 +;1327: { +line 1329 +;1328: // Current Center Icon +;1329: if (cgs.media.forcePowerIcons[cg.forceSelect]) +ADDRGP4 cg+3512 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+1084 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $734 +line 1330 +;1330: { +line 1331 +;1331: CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2)), bigIconSize, bigIconSize, cgs.media.forcePowerIcons[cg.forceSelect] ); //only cache the icon for display +ADDRLP4 92 +CNSTI4 2 +ASGNI4 +ADDRLP4 40 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 92 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 8 +INDIRI4 +SUBI4 +ADDRLP4 92 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 96 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 96 +INDIRF4 +ARGF4 +ADDRLP4 96 +INDIRF4 +ARGF4 +ADDRGP4 cg+3512 +INDIRI4 +ADDRLP4 92 +INDIRI4 +LSHI4 +ADDRGP4 cgs+70296+1084 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1332 +;1332: } +LABELV $734 +line 1333 +;1333: } +LABELV $731 +line 1335 +;1334: +;1335: i = BG_ProperForceIndex(cg.forceSelect) + 1; +ADDRGP4 cg+3512 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 BG_ProperForceIndex +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 88 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1336 +;1336: if (i>MAX_SHOWPOWERS) +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LEI4 $743 +line 1337 +;1337: { +line 1338 +;1338: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 1339 +;1339: } +LABELV $743 +line 1342 +;1340: +;1341: // Work forwards from current icon +;1342: holdX = x + (bigIconSize/2) + pad; +ADDRLP4 12 +ADDRLP4 40 +INDIRI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 2 +DIVI4 +ADDI4 +ADDRLP4 16 +INDIRI4 +ADDI4 +ASGNI4 +line 1343 +;1343: for (iconCnt=1;iconCnt<(sideRightIconCnt+1);i++) +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +ADDRGP4 $748 +JUMPV +LABELV $745 +line 1344 +;1344: { +line 1345 +;1345: if (i>MAX_SHOWPOWERS) +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LEI4 $749 +line 1346 +;1346: { +line 1347 +;1347: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 1348 +;1348: } +LABELV $749 +line 1350 +;1349: +;1350: if (!ForcePower_Valid(forcePowerSorted[i])) // Does he have this power? +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 92 +ADDRGP4 ForcePower_Valid +CALLI4 +ASGNI4 +ADDRLP4 92 +INDIRI4 +CNSTI4 0 +NEI4 $751 +line 1351 +;1351: { +line 1352 +;1352: continue; +ADDRGP4 $746 +JUMPV +LABELV $751 +line 1355 +;1353: } +;1354: +;1355: ++iconCnt; // Good icon +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1357 +;1356: +;1357: if (cgs.media.forcePowerIcons[forcePowerSorted[i]]) +ADDRLP4 96 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 96 +INDIRI4 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ADDRLP4 96 +INDIRI4 +LSHI4 +ADDRGP4 cgs+70296+1084 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $753 +line 1358 +;1358: { +line 1359 +;1359: CG_DrawPic( holdX, y, smallIconSize, smallIconSize, cgs.media.forcePowerIcons[forcePowerSorted[i]] ); //only cache the icon for display +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 100 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 100 +INDIRF4 +ARGF4 +ADDRLP4 100 +INDIRF4 +ARGF4 +ADDRLP4 104 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 104 +INDIRI4 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ADDRLP4 104 +INDIRI4 +LSHI4 +ADDRGP4 cgs+70296+1084 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1360 +;1360: holdX += (smallIconSize+pad); +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 16 +INDIRI4 +ADDI4 +ADDI4 +ASGNI4 +line 1361 +;1361: } +LABELV $753 +line 1362 +;1362: } +LABELV $746 +line 1343 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $748 +ADDRLP4 4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 1 +ADDI4 +LTI4 $745 +line 1364 +;1363: +;1364: if ( showPowersName[cg.forceSelect] ) +ADDRGP4 cg+3512 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 showPowersName +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $759 +line 1365 +;1365: { +line 1366 +;1366: UI_DrawProportionalString(320, y + 30, CG_GetStripEdString("INGAME", showPowersName[cg.forceSelect]), UI_CENTER | UI_SMALLFONT, colorTable[CT_ICON_BLUE]); +ADDRGP4 $762 +ARGP4 +ADDRGP4 cg+3512 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 showPowersName +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 92 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 30 +ADDI4 +ARGI4 +ADDRLP4 92 +INDIRP4 +ARGP4 +CNSTI4 17 +ARGI4 +ADDRGP4 colorTable+1024 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 1367 +;1367: } +LABELV $759 +line 1368 +;1368:} +LABELV $689 +endproc CG_DrawForceSelect 108 20 +lit +align 4 +LABELV $834 +byte 4 1050656375 +byte 4 1061158912 +byte 4 1058994651 +byte 4 1065353216 +export CG_DrawInvenSelect +code +proc CG_DrawInvenSelect 1136 20 +line 1376 +;1369: +;1370:/* +;1371:=================== +;1372:CG_DrawInventorySelect +;1373:=================== +;1374:*/ +;1375:void CG_DrawInvenSelect( void ) +;1376:{ +line 1387 +;1377: int i; +;1378: int sideMax,holdCount,iconCnt; +;1379: int smallIconSize,bigIconSize; +;1380: int sideLeftIconCnt,sideRightIconCnt; +;1381: int count; +;1382: int holdX,x,y,y2,pad; +;1383: int height; +;1384: float addX; +;1385: +;1386: // don't display if dead +;1387: if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $766 +line 1388 +;1388: { +line 1389 +;1389: return; +ADDRGP4 $765 +JUMPV +LABELV $766 +line 1392 +;1390: } +;1391: +;1392: if ((cg.invenSelectTime+WEAPON_SELECT_TIME)ps.stats[STAT_HOLDABLE_ITEM] || !cg.snap->ps.stats[STAT_HOLDABLE_ITEMS]) +ADDRLP4 64 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +ADDRLP4 64 +INDIRI4 +EQI4 $777 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRI4 +ADDRLP4 64 +INDIRI4 +NEI4 $773 +LABELV $777 +line 1398 +;1398: { +line 1399 +;1399: return; +ADDRGP4 $765 +JUMPV +LABELV $773 +line 1402 +;1400: } +;1401: +;1402: if (cg.itemSelect == -1) +ADDRGP4 cg+3516 +INDIRI4 +CNSTI4 -1 +NEI4 $778 +line 1403 +;1403: { +line 1404 +;1404: cg.itemSelect = bg_itemlist[cg.snap->ps.stats[STAT_HOLDABLE_ITEM]].giTag; +ADDRGP4 cg+3516 +CNSTI4 52 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ASGNI4 +line 1405 +;1405: } +LABELV $778 +line 1410 +;1406: +;1407://const int bits = cg.snap->ps.stats[ STAT_ITEMS ]; +;1408: +;1409: // count the number of items owned +;1410: count = 0; +ADDRLP4 32 +CNSTI4 0 +ASGNI4 +line 1411 +;1411: for ( i = 0 ; i < HI_NUM_HOLDABLE ; i++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $784 +line 1412 +;1412: { +line 1414 +;1413: if (/*CG_InventorySelectable(i) && inv_icons[i]*/ +;1414: (cg.snap->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << i)) ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $788 +line 1415 +;1415: { +line 1416 +;1416: count++; +ADDRLP4 32 +ADDRLP4 32 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1417 +;1417: } +LABELV $788 +line 1418 +;1418: } +LABELV $785 +line 1411 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 7 +LTI4 $784 +line 1420 +;1419: +;1420: if (!count) +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +NEI4 $791 +line 1421 +;1421: { +line 1422 +;1422: y2 = 0; //err? +ADDRLP4 60 +CNSTI4 0 +ASGNI4 +line 1423 +;1423: UI_DrawProportionalString(320, y2 + 22, "EMPTY INVENTORY", UI_CENTER | UI_SMALLFONT, colorTable[CT_ICON_BLUE]); +CNSTI4 320 +ARGI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 22 +ADDI4 +ARGI4 +ADDRGP4 $793 +ARGP4 +CNSTI4 17 +ARGI4 +ADDRGP4 colorTable+1024 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 1424 +;1424: return; +ADDRGP4 $765 +JUMPV +LABELV $791 +line 1427 +;1425: } +;1426: +;1427: sideMax = 3; // Max number of icons on the side +ADDRLP4 56 +CNSTI4 3 +ASGNI4 +line 1430 +;1428: +;1429: // Calculate how many icons will appear to either side of the center one +;1430: holdCount = count - 1; // -1 for the center icon +ADDRLP4 48 +ADDRLP4 32 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1431 +;1431: if (holdCount == 0) // No icons to either side +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +NEI4 $795 +line 1432 +;1432: { +line 1433 +;1433: sideLeftIconCnt = 0; +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +line 1434 +;1434: sideRightIconCnt = 0; +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +line 1435 +;1435: } +ADDRGP4 $796 +JUMPV +LABELV $795 +line 1436 +;1436: else if (count > (2*sideMax)) // Go to the max on each side +ADDRLP4 32 +INDIRI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 1 +LSHI4 +LEI4 $797 +line 1437 +;1437: { +line 1438 +;1438: sideLeftIconCnt = sideMax; +ADDRLP4 24 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 1439 +;1439: sideRightIconCnt = sideMax; +ADDRLP4 28 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 1440 +;1440: } +ADDRGP4 $798 +JUMPV +LABELV $797 +line 1442 +;1441: else // Less than max, so do the calc +;1442: { +line 1443 +;1443: sideLeftIconCnt = holdCount/2; +ADDRLP4 24 +ADDRLP4 48 +INDIRI4 +CNSTI4 2 +DIVI4 +ASGNI4 +line 1444 +;1444: sideRightIconCnt = holdCount - sideLeftIconCnt; +ADDRLP4 28 +ADDRLP4 48 +INDIRI4 +ADDRLP4 24 +INDIRI4 +SUBI4 +ASGNI4 +line 1445 +;1445: } +LABELV $798 +LABELV $796 +line 1447 +;1446: +;1447: i = cg.itemSelect - 1; +ADDRLP4 0 +ADDRGP4 cg+3516 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1448 +;1448: if (i<0) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GEI4 $800 +line 1449 +;1449: { +line 1450 +;1450: i = HI_NUM_HOLDABLE-1; +ADDRLP4 0 +CNSTI4 6 +ASGNI4 +line 1451 +;1451: } +LABELV $800 +line 1453 +;1452: +;1453: smallIconSize = 40; +ADDRLP4 8 +CNSTI4 40 +ASGNI4 +line 1454 +;1454: bigIconSize = 80; +ADDRLP4 36 +CNSTI4 80 +ASGNI4 +line 1455 +;1455: pad = 16; +ADDRLP4 16 +CNSTI4 16 +ASGNI4 +line 1457 +;1456: +;1457: x = 320; +ADDRLP4 40 +CNSTI4 320 +ASGNI4 +line 1458 +;1458: y = 410; +ADDRLP4 20 +CNSTI4 410 +ASGNI4 +line 1462 +;1459: +;1460: // Left side ICONS +;1461: // Work backwards from current icon +;1462: holdX = x - ((bigIconSize/2) + pad + smallIconSize); +ADDRLP4 12 +ADDRLP4 40 +INDIRI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 2 +DIVI4 +ADDRLP4 16 +INDIRI4 +ADDI4 +ADDRLP4 8 +INDIRI4 +ADDI4 +SUBI4 +ASGNI4 +line 1463 +;1463: height = smallIconSize * cg.iconHUDPercent; +ADDRLP4 44 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDRGP4 cg+13780 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1464 +;1464: addX = (float) smallIconSize * .75; +ADDRLP4 52 +CNSTF4 1061158912 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +line 1466 +;1465: +;1466: for (iconCnt=0;iconCntps.stats[STAT_HOLDABLE_ITEMS] & (1 << i)) || i == cg.itemSelect ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $813 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+3516 +INDIRI4 +NEI4 $809 +LABELV $813 +line 1474 +;1474: { +line 1475 +;1475: continue; +ADDRGP4 $804 +JUMPV +LABELV $809 +line 1478 +;1476: } +;1477: +;1478: ++iconCnt; // Good icon +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1480 +;1479: +;1480: if (cgs.media.invenIcons[i]) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+1056 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $814 +line 1481 +;1481: { +line 1482 +;1482: trap_R_SetColor(NULL); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1483 +;1483: CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.invenIcons[i] ); +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRI4 +CNSTI4 10 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 72 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 72 +INDIRF4 +ARGF4 +ADDRLP4 72 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+1056 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1485 +;1484: +;1485: trap_R_SetColor(colorTable[CT_ICON_BLUE]); +ADDRGP4 colorTable+1024 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1490 +;1486: /*CG_DrawNumField (holdX + addX, y + smallIconSize, 2, cg.snap->ps.inventory[i], 6, 12, +;1487: NUM_FONT_SMALL,qfalse); +;1488: */ +;1489: +;1490: holdX -= (smallIconSize+pad); +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 16 +INDIRI4 +ADDI4 +SUBI4 +ASGNI4 +line 1491 +;1491: } +LABELV $814 +line 1492 +;1492: } +LABELV $804 +line 1466 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +LABELV $806 +ADDRLP4 4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +LTI4 $803 +line 1495 +;1493: +;1494: // Current Center Icon +;1495: height = bigIconSize * cg.iconHUDPercent; +ADDRLP4 44 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +ADDRGP4 cg+13780 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1496 +;1496: if (cgs.media.invenIcons[cg.itemSelect]) +ADDRGP4 cg+3516 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+1056 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $822 +line 1497 +;1497: { +line 1499 +;1498: int itemNdex; +;1499: trap_R_SetColor(NULL); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1500 +;1500: CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2))+10, bigIconSize, bigIconSize, cgs.media.invenIcons[cg.itemSelect] ); +ADDRLP4 76 +CNSTI4 2 +ASGNI4 +ADDRLP4 40 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 76 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 8 +INDIRI4 +SUBI4 +ADDRLP4 76 +INDIRI4 +DIVI4 +SUBI4 +CNSTI4 10 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 80 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRGP4 cg+3516 +INDIRI4 +ADDRLP4 76 +INDIRI4 +LSHI4 +ADDRGP4 cgs+70296+1056 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1501 +;1501: addX = (float) bigIconSize * .75; +ADDRLP4 52 +CNSTF4 1061158912 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +line 1502 +;1502: trap_R_SetColor(colorTable[CT_ICON_BLUE]); +ADDRGP4 colorTable+1024 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1506 +;1503: /*CG_DrawNumField ((x-(bigIconSize/2)) + addX, y, 2, cg.snap->ps.inventory[cg.inventorySelect], 6, 12, +;1504: NUM_FONT_SMALL,qfalse);*/ +;1505: +;1506: itemNdex = BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE); +ADDRGP4 cg+3516 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 84 +ADDRGP4 BG_GetItemIndexByTag +CALLI4 +ASGNI4 +ADDRLP4 68 +ADDRLP4 84 +INDIRI4 +ASGNI4 +line 1507 +;1507: if (bg_itemlist[itemNdex].classname) +CNSTI4 52 +ADDRLP4 68 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $832 +line 1508 +;1508: { +line 1509 +;1509: vec4_t textColor = { .312f, .75f, .621f, 1.0f }; +ADDRLP4 88 +ADDRGP4 $834 +INDIRB +ASGNB 16 +line 1512 +;1510: char text[1024]; +;1511: +;1512: if ( trap_SP_GetStringTextString( va("INGAME_%s",bg_itemlist[itemNdex].classname), text, sizeof( text ))) +ADDRGP4 $837 +ARGP4 +CNSTI4 52 +ADDRLP4 68 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1128 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1128 +INDIRP4 +ARGP4 +ADDRLP4 104 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRLP4 1132 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +ASGNI4 +ADDRLP4 1132 +INDIRI4 +CNSTI4 0 +EQI4 $835 +line 1513 +;1513: { +line 1514 +;1514: UI_DrawProportionalString(320, y+45, text, UI_CENTER | UI_SMALLFONT, textColor); +CNSTI4 320 +ARGI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 45 +ADDI4 +ARGI4 +ADDRLP4 104 +ARGP4 +CNSTI4 17 +ARGI4 +ADDRLP4 88 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 1515 +;1515: } +ADDRGP4 $836 +JUMPV +LABELV $835 +line 1517 +;1516: else +;1517: { +line 1518 +;1518: UI_DrawProportionalString(320, y+45, bg_itemlist[itemNdex].classname, UI_CENTER | UI_SMALLFONT, textColor); +CNSTI4 320 +ARGI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 45 +ADDI4 +ARGI4 +CNSTI4 52 +ADDRLP4 68 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 17 +ARGI4 +ADDRLP4 88 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 1519 +;1519: } +LABELV $836 +line 1520 +;1520: } +LABELV $832 +line 1521 +;1521: } +LABELV $822 +line 1523 +;1522: +;1523: i = cg.itemSelect + 1; +ADDRLP4 0 +ADDRGP4 cg+3516 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1524 +;1524: if (i> HI_NUM_HOLDABLE-1) +ADDRLP4 0 +INDIRI4 +CNSTI4 6 +LEI4 $839 +line 1525 +;1525: { +line 1526 +;1526: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 1527 +;1527: } +LABELV $839 +line 1531 +;1528: +;1529: // Right side ICONS +;1530: // Work forwards from current icon +;1531: holdX = x + (bigIconSize/2) + pad; +ADDRLP4 12 +ADDRLP4 40 +INDIRI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 2 +DIVI4 +ADDI4 +ADDRLP4 16 +INDIRI4 +ADDI4 +ASGNI4 +line 1532 +;1532: height = smallIconSize * cg.iconHUDPercent; +ADDRLP4 44 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDRGP4 cg+13780 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1533 +;1533: addX = (float) smallIconSize * .75; +ADDRLP4 52 +CNSTF4 1061158912 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +line 1534 +;1534: for (iconCnt=0;iconCnt HI_NUM_HOLDABLE-1) +ADDRLP4 0 +INDIRI4 +CNSTI4 6 +LEI4 $846 +line 1537 +;1537: { +line 1538 +;1538: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 1539 +;1539: } +LABELV $846 +line 1541 +;1540: +;1541: if ( !(cg.snap->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << i)) || i == cg.itemSelect ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $852 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+3516 +INDIRI4 +NEI4 $848 +LABELV $852 +line 1542 +;1542: { +line 1543 +;1543: continue; +ADDRGP4 $843 +JUMPV +LABELV $848 +line 1546 +;1544: } +;1545: +;1546: ++iconCnt; // Good icon +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1548 +;1547: +;1548: if (cgs.media.invenIcons[i]) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+1056 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $853 +line 1549 +;1549: { +line 1550 +;1550: trap_R_SetColor(NULL); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1551 +;1551: CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.invenIcons[i] ); +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRI4 +CNSTI4 10 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 72 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 72 +INDIRF4 +ARGF4 +ADDRLP4 72 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+1056 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1553 +;1552: +;1553: trap_R_SetColor(colorTable[CT_ICON_BLUE]); +ADDRGP4 colorTable+1024 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1557 +;1554: /*CG_DrawNumField (holdX + addX, y + smallIconSize, 2, cg.snap->ps.inventory[i], 6, 12, +;1555: NUM_FONT_SMALL,qfalse);*/ +;1556: +;1557: holdX += (smallIconSize+pad); +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 16 +INDIRI4 +ADDI4 +ADDI4 +ASGNI4 +line 1558 +;1558: } +LABELV $853 +line 1559 +;1559: } +LABELV $843 +line 1534 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $845 +ADDRLP4 4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +LTI4 $842 +line 1560 +;1560:} +LABELV $765 +endproc CG_DrawInvenSelect 1136 20 +proc CG_DrawStats 4 4 +line 1569 +;1561: +;1562:/* +;1563:================ +;1564:CG_DrawStats +;1565: +;1566:================ +;1567:*/ +;1568:static void CG_DrawStats( void ) +;1569:{ +line 1579 +;1570: centity_t *cent; +;1571:/* playerState_t *ps; +;1572: vec3_t angles; +;1573:// vec3_t origin; +;1574: +;1575: if ( cg_drawStatus.integer == 0 ) { +;1576: return; +;1577: } +;1578:*/ +;1579: cent = &cg_entities[cg.snap->ps.clientNum]; +ADDRLP4 0 +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 1592 +;1580:/* ps = &cg.snap->ps; +;1581: +;1582: VectorClear( angles ); +;1583: +;1584: // Do start +;1585: if (!cg.interfaceStartupDone) +;1586: { +;1587: CG_InterfaceStartup(); +;1588: } +;1589: +;1590: cgi_UI_MenuPaintAll();*/ +;1591: +;1592: CG_DrawHUD(cent); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_DrawHUD +CALLV +pop +line 1598 +;1593: /*CG_DrawArmor(cent); +;1594: CG_DrawHealth(cent); +;1595: CG_DrawAmmo(cent); +;1596: +;1597: CG_DrawTalk(cent);*/ +;1598:} +LABELV $860 +endproc CG_DrawStats 4 4 +export CG_DrawTeamBackground +proc CG_DrawTeamBackground 16 20 +line 1608 +;1599: +;1600: +;1601:/* +;1602:================ +;1603:CG_DrawTeamBackground +;1604: +;1605:================ +;1606:*/ +;1607:void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int team ) +;1608:{ +line 1611 +;1609: vec4_t hcolor; +;1610: +;1611: hcolor[3] = alpha; +ADDRLP4 0+12 +ADDRFP4 16 +INDIRF4 +ASGNF4 +line 1612 +;1612: if ( team == TEAM_RED ) { +ADDRFP4 20 +INDIRI4 +CNSTI4 1 +NEI4 $864 +line 1613 +;1613: hcolor[0] = 1; +ADDRLP4 0 +CNSTF4 1065353216 +ASGNF4 +line 1614 +;1614: hcolor[1] = .2f; +ADDRLP4 0+4 +CNSTF4 1045220557 +ASGNF4 +line 1615 +;1615: hcolor[2] = .2f; +ADDRLP4 0+8 +CNSTF4 1045220557 +ASGNF4 +line 1616 +;1616: } else if ( team == TEAM_BLUE ) { +ADDRGP4 $865 +JUMPV +LABELV $864 +ADDRFP4 20 +INDIRI4 +CNSTI4 2 +NEI4 $862 +line 1617 +;1617: hcolor[0] = .2f; +ADDRLP4 0 +CNSTF4 1045220557 +ASGNF4 +line 1618 +;1618: hcolor[1] = .2f; +ADDRLP4 0+4 +CNSTF4 1045220557 +ASGNF4 +line 1619 +;1619: hcolor[2] = 1; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 1620 +;1620: } else { +line 1621 +;1621: return; +LABELV $869 +LABELV $865 +line 1625 +;1622: } +;1623:// trap_R_SetColor( hcolor ); +;1624: +;1625: CG_FillRect ( x, y, w, h, hcolor ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_FillRect +CALLV +pop +line 1627 +;1626:// CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar ); +;1627: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1628 +;1628:} +LABELV $862 +endproc CG_DrawTeamBackground 16 20 +proc CG_DrawMiniScoreboard 84 36 +line 1645 +;1629: +;1630: +;1631:/* +;1632:=========================================================================================== +;1633: +;1634: UPPER RIGHT CORNER +;1635: +;1636:=========================================================================================== +;1637:*/ +;1638: +;1639:/* +;1640:================ +;1641:CG_DrawMiniScoreboard +;1642:================ +;1643:*/ +;1644:static float CG_DrawMiniScoreboard ( float y ) +;1645:{ +line 1648 +;1646: char temp[MAX_QPATH]; +;1647: +;1648: if ( !cg_drawScores.integer ) +ADDRGP4 cg_drawScores+12 +INDIRI4 +CNSTI4 0 +NEI4 $873 +line 1649 +;1649: { +line 1650 +;1650: return y; +ADDRFP4 0 +INDIRF4 +RETF4 +ADDRGP4 $872 +JUMPV +LABELV $873 +line 1653 +;1651: } +;1652: +;1653: if ( cgs.gametype >= GT_TEAM ) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $876 +line 1654 +;1654: { +line 1655 +;1655: strcpy ( temp, "Red: " ); +ADDRLP4 0 +ARGP4 +ADDRGP4 $879 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 1656 +;1656: Q_strcat ( temp, MAX_QPATH, cgs.scores1==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores1)) ); +ADDRGP4 cgs+36324 +INDIRI4 +CNSTI4 -9999 +NEI4 $884 +ADDRLP4 64 +ADDRGP4 $881 +ASGNP4 +ADDRGP4 $885 +JUMPV +LABELV $884 +ADDRGP4 $612 +ARGP4 +ADDRGP4 cgs+36324 +INDIRI4 +ARGI4 +ADDRLP4 68 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 64 +ADDRLP4 68 +INDIRP4 +ASGNP4 +LABELV $885 +ADDRLP4 0 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 1657 +;1657: Q_strcat ( temp, MAX_QPATH, " Blue: " ); +ADDRLP4 0 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $886 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 1658 +;1658: Q_strcat ( temp, MAX_QPATH, cgs.scores2==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores2)) ); +ADDRGP4 cgs+36328 +INDIRI4 +CNSTI4 -9999 +NEI4 $890 +ADDRLP4 72 +ADDRGP4 $881 +ASGNP4 +ADDRGP4 $891 +JUMPV +LABELV $890 +ADDRGP4 $612 +ARGP4 +ADDRGP4 cgs+36328 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 72 +ADDRLP4 76 +INDIRP4 +ASGNP4 +LABELV $891 +ADDRLP4 0 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRLP4 72 +INDIRP4 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 1660 +;1659: +;1660: CG_Text_Paint( 630 - CG_Text_Width ( temp, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, temp, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM ); +ADDRLP4 0 +ARGP4 +CNSTF4 1060320051 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 80 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +CNSTI4 630 +ADDRLP4 80 +INDIRI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +CNSTF4 1060320051 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 0 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 1661 +;1661: y += 15; +ADDRFP4 0 +ADDRFP4 0 +INDIRF4 +CNSTF4 1097859072 +ADDF4 +ASGNF4 +line 1662 +;1662: } +LABELV $876 +line 1664 +;1663: else +;1664: { +line 1676 +;1665: /* +;1666: strcpy ( temp, "1st: " ); +;1667: Q_strcat ( temp, MAX_QPATH, cgs.scores1==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores1)) ); +;1668: +;1669: Q_strcat ( temp, MAX_QPATH, " 2nd: " ); +;1670: Q_strcat ( temp, MAX_QPATH, cgs.scores2==SCORE_NOT_PRESENT?"-":(va("%i",cgs.scores2)) ); +;1671: +;1672: CG_Text_Paint( 630 - CG_Text_Width ( temp, 0.7f, FONT_SMALL ), y, 0.7f, colorWhite, temp, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM ); +;1673: y += 15; +;1674: */ +;1675: //rww - no longer doing this. Since the attacker now shows who is first, we print the score there. +;1676: } +LABELV $877 +line 1679 +;1677: +;1678: +;1679: return y; +ADDRFP4 0 +INDIRF4 +RETF4 +LABELV $872 +endproc CG_DrawMiniScoreboard 84 36 +proc CG_DrawEnemyInfo 1072 36 +line 1688 +;1680:} +;1681: +;1682:/* +;1683:================ +;1684:CG_DrawEnemyInfo +;1685:================ +;1686:*/ +;1687:static float CG_DrawEnemyInfo ( float y ) +;1688:{ +line 1694 +;1689: float size; +;1690: int clientNum; +;1691: const char *title; +;1692: clientInfo_t *ci; +;1693: +;1694: if ( !cg_drawEnemyInfo.integer ) +ADDRGP4 cg_drawEnemyInfo+12 +INDIRI4 +CNSTI4 0 +NEI4 $893 +line 1695 +;1695: { +line 1696 +;1696: return y; +ADDRFP4 0 +INDIRF4 +RETF4 +ADDRGP4 $892 +JUMPV +LABELV $893 +line 1699 +;1697: } +;1698: +;1699: if ( cg.predictedPlayerState.stats[STAT_HEALTH] <= 0 ) +ADDRGP4 cg+96+216 +INDIRI4 +CNSTI4 0 +GTI4 $896 +line 1700 +;1700: { +line 1701 +;1701: return y; +ADDRFP4 0 +INDIRF4 +RETF4 +ADDRGP4 $892 +JUMPV +LABELV $896 +line 1704 +;1702: } +;1703: +;1704: if ( cgs.gametype == GT_JEDIMASTER ) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 2 +NEI4 $900 +line 1705 +;1705: { +line 1707 +;1706: //title = "Jedi Master"; +;1707: title = CG_GetStripEdString("INGAMETEXT", "MASTERY7"); +ADDRGP4 $903 +ARGP4 +ADDRGP4 $904 +ARGP4 +ADDRLP4 16 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 1708 +;1708: clientNum = cgs.jediMaster; +ADDRLP4 12 +ADDRGP4 cgs+36332 +INDIRI4 +ASGNI4 +line 1710 +;1709: +;1710: if ( clientNum < 0 ) +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +GEI4 $901 +line 1711 +;1711: { +line 1714 +;1712: //return y; +;1713:// title = "Get Saber!"; +;1714: title = CG_GetStripEdString("INGAMETEXT", "GET_SABER"); +ADDRGP4 $903 +ARGP4 +ADDRGP4 $908 +ARGP4 +ADDRLP4 20 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 20 +INDIRP4 +ASGNP4 +line 1717 +;1715: +;1716: +;1717: size = ICON_SIZE * 1.25; +ADDRLP4 4 +CNSTF4 1114636288 +ASGNF4 +line 1718 +;1718: y += 5; +ADDRFP4 0 +ADDRFP4 0 +INDIRF4 +CNSTF4 1084227584 +ADDF4 +ASGNF4 +line 1720 +;1719: +;1720: CG_DrawPic( 640 - size - 12, y, size, size, cgs.media.weaponIcons[WP_SABER] ); +CNSTF4 1142947840 +ADDRLP4 4 +INDIRF4 +SUBF4 +CNSTF4 1094713344 +SUBF4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+928+8 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1722 +;1721: +;1722: y += size; +ADDRFP4 0 +ADDRFP4 0 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDF4 +ASGNF4 +line 1729 +;1723: +;1724: /* +;1725: CG_Text_Paint( 630 - CG_Text_Width ( ci->name, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, ci->name, 0, 0, 0, FONT_MEDIUM ); +;1726: y += 15; +;1727: */ +;1728: +;1729: CG_Text_Paint( 630 - CG_Text_Width ( title, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, title, 0, 0, 0, FONT_MEDIUM ); +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTF4 1060320051 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 28 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +CNSTI4 630 +ADDRLP4 28 +INDIRI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +CNSTF4 1060320051 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 32 +CNSTI4 0 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRLP4 32 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 1731 +;1730: +;1731: return y + BIGCHAR_HEIGHT + 2; +ADDRFP4 0 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1073741824 +ADDF4 +RETF4 +ADDRGP4 $892 +JUMPV +line 1733 +;1732: } +;1733: } +LABELV $900 +line 1734 +;1734: else if ( cg.snap->ps.duelInProgress ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1348 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $912 +line 1735 +;1735: { +line 1737 +;1736:// title = "Dueling"; +;1737: title = CG_GetStripEdString("INGAMETEXT", "DUELING"); +ADDRGP4 $903 +ARGP4 +ADDRGP4 $915 +ARGP4 +ADDRLP4 16 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 1738 +;1738: clientNum = cg.snap->ps.duelIndex; +ADDRLP4 12 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +ASGNI4 +line 1739 +;1739: } +ADDRGP4 $913 +JUMPV +LABELV $912 +line 1740 +;1740: else if ( cgs.gametype == GT_TOURNAMENT && cgs.clientinfo[cg.snap->ps.clientNum].team != TEAM_SPECTATOR) +ADDRLP4 16 +CNSTI4 3 +ASGNI4 +ADDRGP4 cgs+32960 +INDIRI4 +ADDRLP4 16 +INDIRI4 +NEI4 $917 +CNSTI4 788 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $917 +line 1741 +;1741: { +line 1743 +;1742:// title = "Dueling"; +;1743: title = CG_GetStripEdString("INGAMETEXT", "DUELING"); +ADDRGP4 $903 +ARGP4 +ADDRGP4 $915 +ARGP4 +ADDRLP4 20 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 20 +INDIRP4 +ASGNP4 +line 1744 +;1744: if (cg.snap->ps.clientNum == cgs.duelist1) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRGP4 cgs+36340 +INDIRI4 +NEI4 $923 +line 1745 +;1745: { +line 1746 +;1746: clientNum = cgs.duelist2; +ADDRLP4 12 +ADDRGP4 cgs+36344 +INDIRI4 +ASGNI4 +line 1747 +;1747: } +ADDRGP4 $918 +JUMPV +LABELV $923 +line 1748 +;1748: else if (cg.snap->ps.clientNum == cgs.duelist2) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRGP4 cgs+36344 +INDIRI4 +NEI4 $928 +line 1749 +;1749: { +line 1750 +;1750: clientNum = cgs.duelist1; +ADDRLP4 12 +ADDRGP4 cgs+36340 +INDIRI4 +ASGNI4 +line 1751 +;1751: } +ADDRGP4 $918 +JUMPV +LABELV $928 +line 1753 +;1752: else +;1753: { +line 1754 +;1754: return y; +ADDRFP4 0 +INDIRF4 +RETF4 +ADDRGP4 $892 +JUMPV +line 1756 +;1755: } +;1756: } +LABELV $917 +line 1758 +;1757: else +;1758: { +line 1775 +;1759: /* +;1760: title = "Attacker"; +;1761: clientNum = cg.predictedPlayerState.persistant[PERS_ATTACKER]; +;1762: +;1763: if ( clientNum < 0 || clientNum >= MAX_CLIENTS || clientNum == cg.snap->ps.clientNum ) +;1764: { +;1765: return y; +;1766: } +;1767: +;1768: if ( cg.time - cg.attackerTime > ATTACKER_HEAD_TIME ) +;1769: { +;1770: cg.attackerTime = 0; +;1771: return y; +;1772: } +;1773: */ +;1774: //As of current, we don't want to draw the attacker. Instead, draw whoever is in first place. +;1775: if (cgs.duelWinner < 0 || cgs.duelWinner >= MAX_CLIENTS) +ADDRGP4 cgs+36336 +INDIRI4 +CNSTI4 0 +LTI4 $937 +ADDRGP4 cgs+36336 +INDIRI4 +CNSTI4 32 +LTI4 $933 +LABELV $937 +line 1776 +;1776: { +line 1777 +;1777: return y; +ADDRFP4 0 +INDIRF4 +RETF4 +ADDRGP4 $892 +JUMPV +LABELV $933 +line 1781 +;1778: } +;1779: +;1780: +;1781: title = va("%s: %i",CG_GetStripEdString("INGAMETEXT", "LEADER"), cgs.scores1); +ADDRGP4 $903 +ARGP4 +ADDRGP4 $939 +ARGP4 +ADDRLP4 20 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $938 +ARGP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRGP4 cgs+36324 +INDIRI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 24 +INDIRP4 +ASGNP4 +line 1793 +;1782: +;1783: /* +;1784: if (cgs.scores1 == 1) +;1785: { +;1786: title = va("%i kill", cgs.scores1); +;1787: } +;1788: else +;1789: { +;1790: title = va("%i kills", cgs.scores1); +;1791: } +;1792: */ +;1793: clientNum = cgs.duelWinner; +ADDRLP4 12 +ADDRGP4 cgs+36336 +INDIRI4 +ASGNI4 +line 1794 +;1794: } +LABELV $918 +LABELV $913 +LABELV $901 +line 1796 +;1795: +;1796: ci = &cgs.clientinfo[ clientNum ]; +ADDRLP4 0 +CNSTI4 788 +ADDRLP4 12 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 1798 +;1797: +;1798: if ( !ci ) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $943 +line 1799 +;1799: { +line 1800 +;1800: return y; +ADDRFP4 0 +INDIRF4 +RETF4 +ADDRGP4 $892 +JUMPV +LABELV $943 +line 1803 +;1801: } +;1802: +;1803: size = ICON_SIZE * 1.25; +ADDRLP4 4 +CNSTF4 1114636288 +ASGNF4 +line 1804 +;1804: y += 5; +ADDRFP4 0 +ADDRFP4 0 +INDIRF4 +CNSTF4 1084227584 +ADDF4 +ASGNF4 +line 1806 +;1805: +;1806: if ( ci->modelIcon ) +ADDRLP4 0 +INDIRP4 +CNSTI4 508 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $945 +line 1807 +;1807: { +line 1808 +;1808: CG_DrawPic( 640 - size - 5, y, size, size, ci->modelIcon ); +CNSTF4 1142947840 +ADDRLP4 4 +INDIRF4 +SUBF4 +CNSTF4 1084227584 +SUBF4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 508 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1809 +;1809: } +LABELV $945 +line 1811 +;1810: +;1811: y += size; +ADDRFP4 0 +ADDRFP4 0 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDF4 +ASGNF4 +line 1813 +;1812: +;1813: CG_Text_Paint( 630 - CG_Text_Width ( ci->name, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, ci->name, 0, 0, 0, FONT_MEDIUM ); +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +CNSTF4 1060320051 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 20 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +CNSTI4 630 +ADDRLP4 20 +INDIRI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +CNSTF4 1060320051 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 1815 +;1814: +;1815: y += 15; +ADDRFP4 0 +ADDRFP4 0 +INDIRF4 +CNSTF4 1097859072 +ADDF4 +ASGNF4 +line 1816 +;1816: CG_Text_Paint( 630 - CG_Text_Width ( title, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, title, 0, 0, 0, FONT_MEDIUM ); +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTF4 1060320051 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 28 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +CNSTI4 630 +ADDRLP4 28 +INDIRI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +CNSTF4 1060320051 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 32 +CNSTI4 0 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRLP4 32 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 1818 +;1817: +;1818: if ( cgs.gametype == GT_TOURNAMENT && cgs.clientinfo[cg.snap->ps.clientNum].team != TEAM_SPECTATOR) +ADDRLP4 36 +CNSTI4 3 +ASGNI4 +ADDRGP4 cgs+32960 +INDIRI4 +ADDRLP4 36 +INDIRI4 +NEI4 $947 +CNSTI4 788 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +ADDRLP4 36 +INDIRI4 +EQI4 $947 +line 1819 +;1819: {//also print their score +line 1821 +;1820: char text[1024]; +;1821: y += 15; +ADDRFP4 0 +ADDRFP4 0 +INDIRF4 +CNSTF4 1097859072 +ADDF4 +ASGNF4 +line 1822 +;1822: Com_sprintf(text, sizeof(text), "%i/%i", cgs.clientinfo[clientNum].score, cgs.fraglimit ); +ADDRLP4 40 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $953 +ARGP4 +CNSTI4 788 +ADDRLP4 12 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+108 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cgs+32972 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1823 +;1823: CG_Text_Paint( 630 - CG_Text_Width ( text, 0.7f, FONT_MEDIUM ), y, 0.7f, colorWhite, text, 0, 0, 0, FONT_MEDIUM ); +ADDRLP4 40 +ARGP4 +CNSTF4 1060320051 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 1064 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +CNSTI4 630 +ADDRLP4 1064 +INDIRI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +CNSTF4 1060320051 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 40 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 1068 +CNSTI4 0 +ASGNI4 +ADDRLP4 1068 +INDIRI4 +ARGI4 +ADDRLP4 1068 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 1824 +;1824: } +LABELV $947 +line 1826 +;1825: +;1826: return y + BIGCHAR_HEIGHT + 2; +ADDRFP4 0 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1073741824 +ADDF4 +RETF4 +LABELV $892 +endproc CG_DrawEnemyInfo 1072 36 +proc CG_DrawSnapshot 16 16 +line 1834 +;1827:} +;1828: +;1829:/* +;1830:================== +;1831:CG_DrawSnapshot +;1832:================== +;1833:*/ +;1834:static float CG_DrawSnapshot( float y ) { +line 1838 +;1835: char *s; +;1836: int w; +;1837: +;1838: s = va( "time:%i snap:%i cmd:%i", cg.snap->serverTime, +ADDRGP4 $958 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+28 +INDIRI4 +ARGI4 +ADDRGP4 cgs+32948 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 1840 +;1839: cg.latestSnapshotNum, cgs.serverCommandSequence ); +;1840: w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 CG_DrawStrlen +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 12 +INDIRI4 +CNSTI4 4 +LSHI4 +ASGNI4 +line 1842 +;1841: +;1842: CG_DrawBigString( 635 - w, y + 2, s, 1.0F); +CNSTI4 635 +ADDRLP4 4 +INDIRI4 +SUBI4 +ARGI4 +ADDRFP4 0 +INDIRF4 +CNSTF4 1073741824 +ADDF4 +CVFI4 4 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 CG_DrawBigString +CALLV +pop +line 1844 +;1843: +;1844: return y + BIGCHAR_HEIGHT + 4; +ADDRFP4 0 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1082130432 +ADDF4 +RETF4 +LABELV $957 +endproc CG_DrawSnapshot 16 16 +bss +align 4 +LABELV $963 +skip 16 +align 4 +LABELV $964 +skip 4 +align 4 +LABELV $965 +skip 4 +code +proc CG_DrawFPS 44 16 +line 1853 +;1845:} +;1846: +;1847:/* +;1848:================== +;1849:CG_DrawFPS +;1850:================== +;1851:*/ +;1852:#define FPS_FRAMES 4 +;1853:static float CG_DrawFPS( float y ) { +line 1865 +;1854: char *s; +;1855: int w; +;1856: static int previousTimes[FPS_FRAMES]; +;1857: static int index; +;1858: int i, total; +;1859: int fps; +;1860: static int previous; +;1861: int t, frameTime; +;1862: +;1863: // don't use serverTime, because that will be drifting to +;1864: // correct for internet lag changes, timescales, timedemos, etc +;1865: t = trap_Milliseconds(); +ADDRLP4 28 +ADDRGP4 trap_Milliseconds +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 1866 +;1866: frameTime = t - previous; +ADDRLP4 12 +ADDRLP4 8 +INDIRI4 +ADDRGP4 $965 +INDIRI4 +SUBI4 +ASGNI4 +line 1867 +;1867: previous = t; +ADDRGP4 $965 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 1869 +;1868: +;1869: previousTimes[index % FPS_FRAMES] = frameTime; +ADDRGP4 $964 +INDIRI4 +CNSTI4 4 +MODI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $963 +ADDP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 1870 +;1870: index++; +ADDRLP4 32 +ADDRGP4 $964 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1871 +;1871: if ( index > FPS_FRAMES ) { +ADDRGP4 $964 +INDIRI4 +CNSTI4 4 +LEI4 $966 +line 1873 +;1872: // average multiple frames together to smooth changes out a bit +;1873: total = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 1874 +;1874: for ( i = 0 ; i < FPS_FRAMES ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $968 +line 1875 +;1875: total += previousTimes[i]; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $963 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 1876 +;1876: } +LABELV $969 +line 1874 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $968 +line 1877 +;1877: if ( !total ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $972 +line 1878 +;1878: total = 1; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 1879 +;1879: } +LABELV $972 +line 1880 +;1880: fps = 1000 * FPS_FRAMES / total; +ADDRLP4 24 +CNSTI4 4000 +ADDRLP4 4 +INDIRI4 +DIVI4 +ASGNI4 +line 1882 +;1881: +;1882: s = va( "%ifps", fps ); +ADDRGP4 $974 +ARGP4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 36 +INDIRP4 +ASGNP4 +line 1883 +;1883: w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 CG_DrawStrlen +CALLI4 +ASGNI4 +ADDRLP4 20 +ADDRLP4 40 +INDIRI4 +CNSTI4 4 +LSHI4 +ASGNI4 +line 1885 +;1884: +;1885: CG_DrawBigString( 635 - w, y + 2, s, 1.0F); +CNSTI4 635 +ADDRLP4 20 +INDIRI4 +SUBI4 +ARGI4 +ADDRFP4 0 +INDIRF4 +CNSTF4 1073741824 +ADDF4 +CVFI4 4 +ARGI4 +ADDRLP4 16 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 CG_DrawBigString +CALLV +pop +line 1886 +;1886: } +LABELV $966 +line 1888 +;1887: +;1888: return y + BIGCHAR_HEIGHT + 4; +ADDRFP4 0 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1082130432 +ADDF4 +RETF4 +LABELV $962 +endproc CG_DrawFPS 44 16 +proc CG_DrawTimer 32 16 +line 1896 +;1889:} +;1890: +;1891:/* +;1892:================= +;1893:CG_DrawTimer +;1894:================= +;1895:*/ +;1896:static float CG_DrawTimer( float y ) { +line 1902 +;1897: char *s; +;1898: int w; +;1899: int mins, seconds, tens; +;1900: int msec; +;1901: +;1902: msec = cg.time - cgs.levelStartTime; +ADDRLP4 20 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgs+36320 +INDIRI4 +SUBI4 +ASGNI4 +line 1904 +;1903: +;1904: seconds = msec / 1000; +ADDRLP4 0 +ADDRLP4 20 +INDIRI4 +CNSTI4 1000 +DIVI4 +ASGNI4 +line 1905 +;1905: mins = seconds / 60; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +CNSTI4 60 +DIVI4 +ASGNI4 +line 1906 +;1906: seconds -= mins * 60; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 60 +ADDRLP4 8 +INDIRI4 +MULI4 +SUBI4 +ASGNI4 +line 1907 +;1907: tens = seconds / 10; +ADDRLP4 12 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +DIVI4 +ASGNI4 +line 1908 +;1908: seconds -= tens * 10; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +ADDRLP4 12 +INDIRI4 +MULI4 +SUBI4 +ASGNI4 +line 1910 +;1909: +;1910: s = va( "%i:%i%i", mins, tens, seconds ); +ADDRGP4 $978 +ARGP4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 24 +INDIRP4 +ASGNP4 +line 1911 +;1911: w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 CG_DrawStrlen +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 28 +INDIRI4 +CNSTI4 4 +LSHI4 +ASGNI4 +line 1913 +;1912: +;1913: CG_DrawBigString( 635 - w, y + 2, s, 1.0F); +CNSTI4 635 +ADDRLP4 16 +INDIRI4 +SUBI4 +ARGI4 +ADDRFP4 0 +INDIRF4 +CNSTF4 1073741824 +ADDF4 +CVFI4 4 +ARGI4 +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 CG_DrawBigString +CALLV +pop +line 1915 +;1914: +;1915: return y + BIGCHAR_HEIGHT + 4; +ADDRFP4 0 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1082130432 +ADDF4 +RETF4 +LABELV $975 +endproc CG_DrawTimer 32 16 +proc CG_DrawTeamOverlay 148 36 +line 1925 +;1916:} +;1917: +;1918: +;1919:/* +;1920:================= +;1921:CG_DrawTeamOverlay +;1922:================= +;1923:*/ +;1924: +;1925:static float CG_DrawTeamOverlay( float y, qboolean right, qboolean upper ) { +line 1937 +;1926: int x, w, h, xx; +;1927: int i, j, len; +;1928: const char *p; +;1929: vec4_t hcolor; +;1930: int pwidth, lwidth; +;1931: int plyrs; +;1932: char st[16]; +;1933: clientInfo_t *ci; +;1934: gitem_t *item; +;1935: int ret_y, count; +;1936: +;1937: if ( !cg_drawTeamOverlay.integer ) { +ADDRGP4 cg_drawTeamOverlay+12 +INDIRI4 +CNSTI4 0 +NEI4 $980 +line 1938 +;1938: return y; +ADDRFP4 0 +INDIRF4 +RETF4 +ADDRGP4 $979 +JUMPV +LABELV $980 +line 1941 +;1939: } +;1940: +;1941: if ( cg.snap->ps.persistant[PERS_TEAM] != TEAM_RED && cg.snap->ps.persistant[PERS_TEAM] != TEAM_BLUE ) { +ADDRLP4 92 +CNSTI4 336 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 1 +EQI4 $983 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 2 +EQI4 $983 +line 1942 +;1942: return y; // Not on any team +ADDRFP4 0 +INDIRF4 +RETF4 +ADDRGP4 $979 +JUMPV +LABELV $983 +line 1945 +;1943: } +;1944: +;1945: plyrs = 0; +ADDRLP4 76 +CNSTI4 0 +ASGNI4 +line 1948 +;1946: +;1947: // max player name width +;1948: pwidth = 0; +ADDRLP4 56 +CNSTI4 0 +ASGNI4 +line 1949 +;1949: count = (numSortedTeamPlayers > 8) ? 8 : numSortedTeamPlayers; +ADDRGP4 numSortedTeamPlayers +INDIRI4 +CNSTI4 8 +LEI4 $988 +ADDRLP4 96 +CNSTI4 8 +ASGNI4 +ADDRGP4 $989 +JUMPV +LABELV $988 +ADDRLP4 96 +ADDRGP4 numSortedTeamPlayers +INDIRI4 +ASGNI4 +LABELV $989 +ADDRLP4 48 +ADDRLP4 96 +INDIRI4 +ASGNI4 +line 1950 +;1950: for (i = 0; i < count; i++) { +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRGP4 $993 +JUMPV +LABELV $990 +line 1951 +;1951: ci = cgs.clientinfo + sortedTeamPlayers[i]; +ADDRLP4 4 +CNSTI4 788 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 1952 +;1952: if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 0 +EQI4 $995 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +NEI4 $995 +line 1953 +;1953: plyrs++; +ADDRLP4 76 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1954 +;1954: len = CG_DrawStrlen(ci->name); +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 104 +ADDRGP4 CG_DrawStrlen +CALLI4 +ASGNI4 +ADDRLP4 40 +ADDRLP4 104 +INDIRI4 +ASGNI4 +line 1955 +;1955: if (len > pwidth) +ADDRLP4 40 +INDIRI4 +ADDRLP4 56 +INDIRI4 +LEI4 $998 +line 1956 +;1956: pwidth = len; +ADDRLP4 56 +ADDRLP4 40 +INDIRI4 +ASGNI4 +LABELV $998 +line 1957 +;1957: } +LABELV $995 +line 1958 +;1958: } +LABELV $991 +line 1950 +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $993 +ADDRLP4 8 +INDIRI4 +ADDRLP4 48 +INDIRI4 +LTI4 $990 +line 1960 +;1959: +;1960: if (!plyrs) +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +NEI4 $1000 +line 1961 +;1961: return y; +ADDRFP4 0 +INDIRF4 +RETF4 +ADDRGP4 $979 +JUMPV +LABELV $1000 +line 1963 +;1962: +;1963: if (pwidth > TEAM_OVERLAY_MAXNAME_WIDTH) +ADDRLP4 56 +INDIRI4 +CNSTI4 12 +LEI4 $1002 +line 1964 +;1964: pwidth = TEAM_OVERLAY_MAXNAME_WIDTH; +ADDRLP4 56 +CNSTI4 12 +ASGNI4 +LABELV $1002 +line 1967 +;1965: +;1966: // max location name width +;1967: lwidth = 0; +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +line 1968 +;1968: for (i = 1; i < MAX_LOCATIONS; i++) { +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +LABELV $1004 +line 1969 +;1969: p = CG_ConfigString(CS_LOCATIONS + i); +ADDRLP4 8 +INDIRI4 +CNSTI4 640 +ADDI4 +ARGI4 +ADDRLP4 100 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 100 +INDIRP4 +ASGNP4 +line 1970 +;1970: if (p && *p) { +ADDRLP4 20 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1008 +ADDRLP4 20 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $1008 +line 1971 +;1971: len = CG_DrawStrlen(p); +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRLP4 108 +ADDRGP4 CG_DrawStrlen +CALLI4 +ASGNI4 +ADDRLP4 40 +ADDRLP4 108 +INDIRI4 +ASGNI4 +line 1972 +;1972: if (len > lwidth) +ADDRLP4 40 +INDIRI4 +ADDRLP4 44 +INDIRI4 +LEI4 $1010 +line 1973 +;1973: lwidth = len; +ADDRLP4 44 +ADDRLP4 40 +INDIRI4 +ASGNI4 +LABELV $1010 +line 1974 +;1974: } +LABELV $1008 +line 1975 +;1975: } +LABELV $1005 +line 1968 +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 64 +LTI4 $1004 +line 1977 +;1976: +;1977: if (lwidth > TEAM_OVERLAY_MAXLOCATION_WIDTH) +ADDRLP4 44 +INDIRI4 +CNSTI4 16 +LEI4 $1012 +line 1978 +;1978: lwidth = TEAM_OVERLAY_MAXLOCATION_WIDTH; +ADDRLP4 44 +CNSTI4 16 +ASGNI4 +LABELV $1012 +line 1980 +;1979: +;1980: w = (pwidth + lwidth + 4 + 7) * TINYCHAR_WIDTH; +ADDRLP4 80 +ADDRLP4 56 +INDIRI4 +ADDRLP4 44 +INDIRI4 +ADDI4 +CNSTI4 3 +LSHI4 +CNSTI4 32 +ADDI4 +CNSTI4 56 +ADDI4 +ASGNI4 +line 1982 +;1981: +;1982: if ( right ) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $1014 +line 1983 +;1983: x = 640 - w; +ADDRLP4 52 +CNSTI4 640 +ADDRLP4 80 +INDIRI4 +SUBI4 +ASGNI4 +ADDRGP4 $1015 +JUMPV +LABELV $1014 +line 1985 +;1984: else +;1985: x = 0; +ADDRLP4 52 +CNSTI4 0 +ASGNI4 +LABELV $1015 +line 1987 +;1986: +;1987: h = plyrs * TINYCHAR_HEIGHT; +ADDRLP4 84 +ADDRLP4 76 +INDIRI4 +CNSTI4 3 +LSHI4 +ASGNI4 +line 1989 +;1988: +;1989: if ( upper ) { +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $1016 +line 1990 +;1990: ret_y = y + h; +ADDRLP4 88 +ADDRFP4 0 +INDIRF4 +ADDRLP4 84 +INDIRI4 +CVIF4 4 +ADDF4 +CVFI4 4 +ASGNI4 +line 1991 +;1991: } else { +ADDRGP4 $1017 +JUMPV +LABELV $1016 +line 1992 +;1992: y -= h; +ADDRFP4 0 +ADDRFP4 0 +INDIRF4 +ADDRLP4 84 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 1993 +;1993: ret_y = y; +ADDRLP4 88 +ADDRFP4 0 +INDIRF4 +CVFI4 4 +ASGNI4 +line 1994 +;1994: } +LABELV $1017 +line 1996 +;1995: +;1996: if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1018 +line 1997 +;1997: hcolor[0] = 1.0f; +ADDRLP4 24 +CNSTF4 1065353216 +ASGNF4 +line 1998 +;1998: hcolor[1] = 0.0f; +ADDRLP4 24+4 +CNSTF4 0 +ASGNF4 +line 1999 +;1999: hcolor[2] = 0.0f; +ADDRLP4 24+8 +CNSTF4 0 +ASGNF4 +line 2000 +;2000: hcolor[3] = 0.33f; +ADDRLP4 24+12 +CNSTF4 1051260355 +ASGNF4 +line 2001 +;2001: } else { // if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) +ADDRGP4 $1019 +JUMPV +LABELV $1018 +line 2002 +;2002: hcolor[0] = 0.0f; +ADDRLP4 24 +CNSTF4 0 +ASGNF4 +line 2003 +;2003: hcolor[1] = 0.0f; +ADDRLP4 24+4 +CNSTF4 0 +ASGNF4 +line 2004 +;2004: hcolor[2] = 1.0f; +ADDRLP4 24+8 +CNSTF4 1065353216 +ASGNF4 +line 2005 +;2005: hcolor[3] = 0.33f; +ADDRLP4 24+12 +CNSTF4 1051260355 +ASGNF4 +line 2006 +;2006: } +LABELV $1019 +line 2007 +;2007: trap_R_SetColor( hcolor ); +ADDRLP4 24 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2008 +;2008: CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar ); +ADDRLP4 52 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 84 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 cgs+70296+104 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 2009 +;2009: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2011 +;2010: +;2011: for (i = 0; i < count; i++) { +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1032 +JUMPV +LABELV $1029 +line 2012 +;2012: ci = cgs.clientinfo + sortedTeamPlayers[i]; +ADDRLP4 4 +CNSTI4 788 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 2013 +;2013: if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 0 +EQI4 $1034 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +NEI4 $1034 +line 2015 +;2014: +;2015: hcolor[0] = hcolor[1] = hcolor[2] = hcolor[3] = 1.0; +ADDRLP4 104 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 24+12 +ADDRLP4 104 +INDIRF4 +ASGNF4 +ADDRLP4 24+8 +ADDRLP4 104 +INDIRF4 +ASGNF4 +ADDRLP4 24+4 +ADDRLP4 104 +INDIRF4 +ASGNF4 +ADDRLP4 24 +ADDRLP4 104 +INDIRF4 +ASGNF4 +line 2017 +;2016: +;2017: xx = x + TINYCHAR_WIDTH; +ADDRLP4 12 +ADDRLP4 52 +INDIRI4 +CNSTI4 8 +ADDI4 +ASGNI4 +line 2019 +;2018: +;2019: CG_DrawStringExt( xx, y, +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 108 +CNSTI4 0 +ASGNI4 +ADDRLP4 108 +INDIRI4 +ARGI4 +ADDRLP4 108 +INDIRI4 +ARGI4 +ADDRLP4 112 +CNSTI4 8 +ASGNI4 +ADDRLP4 112 +INDIRI4 +ARGI4 +ADDRLP4 112 +INDIRI4 +ARGI4 +CNSTI4 12 +ARGI4 +ADDRGP4 CG_DrawStringExt +CALLV +pop +line 2023 +;2020: ci->name, hcolor, qfalse, qfalse, +;2021: TINYCHAR_WIDTH, TINYCHAR_HEIGHT, TEAM_OVERLAY_MAXNAME_WIDTH); +;2022: +;2023: if (lwidth) { +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +EQI4 $1040 +line 2024 +;2024: p = CG_ConfigString(CS_LOCATIONS + ci->location); +ADDRLP4 4 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +CNSTI4 640 +ADDI4 +ARGI4 +ADDRLP4 116 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 116 +INDIRP4 +ASGNP4 +line 2025 +;2025: if (!p || !*p) +ADDRLP4 20 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1044 +ADDRLP4 20 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1042 +LABELV $1044 +line 2026 +;2026: p = "unknown"; +ADDRLP4 20 +ADDRGP4 $1045 +ASGNP4 +LABELV $1042 +line 2027 +;2027: len = CG_DrawStrlen(p); +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRLP4 124 +ADDRGP4 CG_DrawStrlen +CALLI4 +ASGNI4 +ADDRLP4 40 +ADDRLP4 124 +INDIRI4 +ASGNI4 +line 2028 +;2028: if (len > lwidth) +ADDRLP4 40 +INDIRI4 +ADDRLP4 44 +INDIRI4 +LEI4 $1046 +line 2029 +;2029: len = lwidth; +ADDRLP4 40 +ADDRLP4 44 +INDIRI4 +ASGNI4 +LABELV $1046 +line 2033 +;2030: +;2031:// xx = x + TINYCHAR_WIDTH * 2 + TINYCHAR_WIDTH * pwidth + +;2032:// ((lwidth/2 - len/2) * TINYCHAR_WIDTH); +;2033: xx = x + TINYCHAR_WIDTH * 2 + TINYCHAR_WIDTH * pwidth; +ADDRLP4 12 +ADDRLP4 52 +INDIRI4 +CNSTI4 16 +ADDI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDI4 +ASGNI4 +line 2034 +;2034: CG_DrawStringExt( xx, y, +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 128 +CNSTI4 0 +ASGNI4 +ADDRLP4 128 +INDIRI4 +ARGI4 +ADDRLP4 128 +INDIRI4 +ARGI4 +ADDRLP4 132 +CNSTI4 8 +ASGNI4 +ADDRLP4 132 +INDIRI4 +ARGI4 +ADDRLP4 132 +INDIRI4 +ARGI4 +CNSTI4 16 +ARGI4 +ADDRGP4 CG_DrawStringExt +CALLV +pop +line 2037 +;2035: p, hcolor, qfalse, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, +;2036: TEAM_OVERLAY_MAXLOCATION_WIDTH); +;2037: } +LABELV $1040 +line 2039 +;2038: +;2039: CG_GetColorForHealth( ci->health, ci->armor, hcolor ); +ADDRLP4 4 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 24 +ARGP4 +ADDRGP4 CG_GetColorForHealth +CALLV +pop +line 2041 +;2040: +;2041: Com_sprintf (st, sizeof(st), "%3i %3i", ci->health, ci->armor); +ADDRLP4 60 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 $1048 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 2043 +;2042: +;2043: xx = x + TINYCHAR_WIDTH * 3 + +ADDRLP4 124 +CNSTI4 3 +ASGNI4 +ADDRLP4 12 +ADDRLP4 52 +INDIRI4 +CNSTI4 24 +ADDI4 +ADDRLP4 56 +INDIRI4 +ADDRLP4 124 +INDIRI4 +LSHI4 +ADDI4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 124 +INDIRI4 +LSHI4 +ADDI4 +ASGNI4 +line 2046 +;2044: TINYCHAR_WIDTH * pwidth + TINYCHAR_WIDTH * lwidth; +;2045: +;2046: CG_DrawStringExt( xx, y, +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 60 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 128 +CNSTI4 0 +ASGNI4 +ADDRLP4 128 +INDIRI4 +ARGI4 +ADDRLP4 128 +INDIRI4 +ARGI4 +ADDRLP4 132 +CNSTI4 8 +ASGNI4 +ADDRLP4 132 +INDIRI4 +ARGI4 +ADDRLP4 132 +INDIRI4 +ARGI4 +ADDRLP4 128 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawStringExt +CALLV +pop +line 2051 +;2047: st, hcolor, qfalse, qfalse, +;2048: TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 0 ); +;2049: +;2050: // draw weapon icon +;2051: xx += TINYCHAR_WIDTH * 3; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 24 +ADDI4 +ASGNI4 +line 2053 +;2052: +;2053: if ( cg_weapons[ci->curWeapon].weaponIcon ) { +CNSTI4 208 +ADDRLP4 4 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons+56 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1049 +line 2054 +;2054: CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRLP4 136 +CNSTF4 1090519040 +ASGNF4 +ADDRLP4 136 +INDIRF4 +ARGF4 +ADDRLP4 136 +INDIRF4 +ARGF4 +CNSTI4 208 +ADDRLP4 4 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons+56 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 2056 +;2055: cg_weapons[ci->curWeapon].weaponIcon ); +;2056: } else { +ADDRGP4 $1050 +JUMPV +LABELV $1049 +line 2057 +;2057: CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRLP4 136 +CNSTF4 1090519040 +ASGNF4 +ADDRLP4 136 +INDIRF4 +ARGF4 +ADDRLP4 136 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+108 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 2059 +;2058: cgs.media.deferShader ); +;2059: } +LABELV $1050 +line 2062 +;2060: +;2061: // Draw powerup icons +;2062: if (right) { +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $1055 +line 2063 +;2063: xx = x; +ADDRLP4 12 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 2064 +;2064: } else { +ADDRGP4 $1056 +JUMPV +LABELV $1055 +line 2065 +;2065: xx = x + w - TINYCHAR_WIDTH; +ADDRLP4 12 +ADDRLP4 52 +INDIRI4 +ADDRLP4 80 +INDIRI4 +ADDI4 +CNSTI4 8 +SUBI4 +ASGNI4 +line 2066 +;2066: } +LABELV $1056 +line 2067 +;2067: for (j = 0; j <= PW_NUM_POWERUPS; j++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $1057 +line 2068 +;2068: if (ci->powerups & (1 << j)) { +ADDRLP4 4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $1061 +line 2070 +;2069: +;2070: item = BG_FindItemForPowerup( j ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 136 +ADDRGP4 BG_FindItemForPowerup +CALLP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 136 +INDIRP4 +ASGNP4 +line 2072 +;2071: +;2072: if (item) { +ADDRLP4 16 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1063 +line 2073 +;2073: CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, +ADDRLP4 16 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 140 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRLP4 144 +CNSTF4 1090519040 +ASGNF4 +ADDRLP4 144 +INDIRF4 +ARGF4 +ADDRLP4 144 +INDIRF4 +ARGF4 +ADDRLP4 140 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 2075 +;2074: trap_R_RegisterShader( item->icon ) ); +;2075: if (right) { +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $1065 +line 2076 +;2076: xx -= TINYCHAR_WIDTH; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 8 +SUBI4 +ASGNI4 +line 2077 +;2077: } else { +ADDRGP4 $1066 +JUMPV +LABELV $1065 +line 2078 +;2078: xx += TINYCHAR_WIDTH; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 8 +ADDI4 +ASGNI4 +line 2079 +;2079: } +LABELV $1066 +line 2080 +;2080: } +LABELV $1063 +line 2081 +;2081: } +LABELV $1061 +line 2082 +;2082: } +LABELV $1058 +line 2067 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LEI4 $1057 +line 2084 +;2083: +;2084: y += TINYCHAR_HEIGHT; +ADDRFP4 0 +ADDRFP4 0 +INDIRF4 +CNSTF4 1090519040 +ADDF4 +ASGNF4 +line 2085 +;2085: } +LABELV $1034 +line 2086 +;2086: } +LABELV $1030 +line 2011 +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1032 +ADDRLP4 8 +INDIRI4 +ADDRLP4 48 +INDIRI4 +LTI4 $1029 +line 2088 +;2087: +;2088: return ret_y; +ADDRLP4 88 +INDIRI4 +CVIF4 4 +RETF4 +LABELV $979 +endproc CG_DrawTeamOverlay 148 36 +proc CG_DrawPowerupIcons 44 20 +line 2094 +;2089://#endif +;2090:} +;2091: +;2092: +;2093:static void CG_DrawPowerupIcons(int y) +;2094:{ +line 2096 +;2095: int j; +;2096: int ico_size = 64; +ADDRLP4 4 +CNSTI4 64 +ASGNI4 +line 2100 +;2097: //int y = ico_size/2; +;2098: gitem_t *item; +;2099: +;2100: if (!cg.snap) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1068 +line 2101 +;2101: { +line 2102 +;2102: return; +ADDRGP4 $1067 +JUMPV +LABELV $1068 +line 2105 +;2103: } +;2104: +;2105: y += 16; +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 16 +ADDI4 +ASGNI4 +line 2107 +;2106: +;2107: for (j = 0; j <= PW_NUM_POWERUPS; j++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $1071 +line 2108 +;2108: { +line 2109 +;2109: if (cg.snap->ps.powerups[j] > cg.time) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 388 +ADDP4 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $1075 +line 2110 +;2110: { +line 2111 +;2111: int secondsleft = (cg.snap->ps.powerups[j] - cg.time)/1000; +ADDRLP4 12 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 388 +ADDP4 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CNSTI4 1000 +DIVI4 +ASGNI4 +line 2113 +;2112: +;2113: item = BG_FindItemForPowerup( j ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 16 +ADDRGP4 BG_FindItemForPowerup +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 2115 +;2114: +;2115: if (item) +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1081 +line 2116 +;2116: { +line 2117 +;2117: int icoShader = 0; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +line 2118 +;2118: if (cgs.gametype == GT_CTY && (j == PW_REDFLAG || j == PW_BLUEFLAG)) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $1083 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +EQI4 $1086 +ADDRLP4 0 +INDIRI4 +CNSTI4 5 +NEI4 $1083 +LABELV $1086 +line 2119 +;2119: { +line 2120 +;2120: if (j == PW_REDFLAG) +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +NEI4 $1087 +line 2121 +;2121: { +line 2122 +;2122: icoShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_ys" ); +ADDRGP4 $1089 +ARGP4 +ADDRLP4 28 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 20 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 2123 +;2123: } +ADDRGP4 $1084 +JUMPV +LABELV $1087 +line 2125 +;2124: else +;2125: { +line 2126 +;2126: icoShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_ys" ); +ADDRGP4 $1090 +ARGP4 +ADDRLP4 28 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 20 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 2127 +;2127: } +line 2128 +;2128: } +ADDRGP4 $1084 +JUMPV +LABELV $1083 +line 2130 +;2129: else +;2130: { +line 2131 +;2131: icoShader = trap_R_RegisterShader( item->icon ); +ADDRLP4 8 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 20 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 2132 +;2132: } +LABELV $1084 +line 2134 +;2133: +;2134: CG_DrawPic( (640-(ico_size*1.1)), y, ico_size, ico_size, icoShader ); +ADDRLP4 28 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ASGNF4 +CNSTF4 1142947840 +CNSTF4 1066192077 +ADDRLP4 28 +INDIRF4 +MULF4 +SUBF4 +ARGF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 2136 +;2135: +;2136: y += ico_size; +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +ASGNI4 +line 2138 +;2137: +;2138: if (j != PW_REDFLAG && j != PW_BLUEFLAG && secondsleft < 999) +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +EQI4 $1091 +ADDRLP4 0 +INDIRI4 +CNSTI4 5 +EQI4 $1091 +ADDRLP4 12 +INDIRI4 +CNSTI4 999 +GEI4 $1091 +line 2139 +;2139: { +line 2140 +;2140: UI_DrawProportionalString((640-(ico_size*1.1))+(ico_size/2), y-8, va("%i", secondsleft), UI_CENTER | UI_BIGFONT | UI_DROPSHADOW, colorTable[CT_WHITE]); +ADDRGP4 $612 +ARGP4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTF4 1142947840 +CNSTF4 1066192077 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +MULF4 +SUBF4 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +DIVI4 +CVIF4 4 +ADDF4 +CVFI4 4 +ARGI4 +ADDRFP4 0 +INDIRI4 +CNSTI4 8 +SUBI4 +ARGI4 +ADDRLP4 36 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 2141 +;2141: } +LABELV $1091 +line 2143 +;2142: +;2143: y += (ico_size/3); +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 3 +DIVI4 +ADDI4 +ASGNI4 +line 2144 +;2144: } +LABELV $1081 +line 2145 +;2145: } +LABELV $1075 +line 2146 +;2146: } +LABELV $1072 +line 2107 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LEI4 $1071 +line 2147 +;2147:} +LABELV $1067 +endproc CG_DrawPowerupIcons 44 20 +proc CG_DrawUpperRight 12 12 +line 2156 +;2148: +;2149: +;2150:/* +;2151:===================== +;2152:CG_DrawUpperRight +;2153: +;2154:===================== +;2155:*/ +;2156:static void CG_DrawUpperRight( void ) { +line 2159 +;2157: float y; +;2158: +;2159: y = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 2161 +;2160: +;2161: if ( cgs.gametype >= GT_TEAM && cg_drawTeamOverlay.integer == 1 ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $1095 +ADDRGP4 cg_drawTeamOverlay+12 +INDIRI4 +CNSTI4 1 +NEI4 $1095 +line 2162 +;2162: y = CG_DrawTeamOverlay( y, qtrue, qtrue ); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 CG_DrawTeamOverlay +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 2163 +;2163: } +LABELV $1095 +line 2164 +;2164: if ( cg_drawSnapshot.integer ) { +ADDRGP4 cg_drawSnapshot+12 +INDIRI4 +CNSTI4 0 +EQI4 $1099 +line 2165 +;2165: y = CG_DrawSnapshot( y ); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +ADDRGP4 CG_DrawSnapshot +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 2166 +;2166: } +LABELV $1099 +line 2167 +;2167: if ( cg_drawFPS.integer ) { +ADDRGP4 cg_drawFPS+12 +INDIRI4 +CNSTI4 0 +EQI4 $1102 +line 2168 +;2168: y = CG_DrawFPS( y ); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +ADDRGP4 CG_DrawFPS +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 2169 +;2169: } +LABELV $1102 +line 2170 +;2170: if ( cg_drawTimer.integer ) { +ADDRGP4 cg_drawTimer+12 +INDIRI4 +CNSTI4 0 +EQI4 $1105 +line 2171 +;2171: y = CG_DrawTimer( y ); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +ADDRGP4 CG_DrawTimer +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 2172 +;2172: } +LABELV $1105 +line 2174 +;2173: +;2174: y = CG_DrawEnemyInfo ( y ); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +ADDRGP4 CG_DrawEnemyInfo +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 2176 +;2175: +;2176: y = CG_DrawMiniScoreboard ( y ); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 CG_DrawMiniScoreboard +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 2178 +;2177: +;2178: CG_DrawPowerupIcons(y); +ADDRLP4 0 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_DrawPowerupIcons +CALLV +pop +line 2179 +;2179:} +LABELV $1094 +endproc CG_DrawUpperRight 12 12 +export CG_AddLagometerFrameInfo +proc CG_AddLagometerFrameInfo 8 0 +line 2284 +;2180: +;2181:/* +;2182:=================== +;2183:CG_DrawReward +;2184:=================== +;2185:*/ +;2186:#ifdef JK2AWARDS +;2187:static void CG_DrawReward( void ) { +;2188: float *color; +;2189: int i, count; +;2190: float x, y; +;2191: char buf[32]; +;2192: +;2193: if ( !cg_drawRewards.integer ) { +;2194: return; +;2195: } +;2196: +;2197: color = CG_FadeColor( cg.rewardTime, REWARD_TIME ); +;2198: if ( !color ) { +;2199: if (cg.rewardStack > 0) { +;2200: for(i = 0; i < cg.rewardStack; i++) { +;2201: cg.rewardSound[i] = cg.rewardSound[i+1]; +;2202: cg.rewardShader[i] = cg.rewardShader[i+1]; +;2203: cg.rewardCount[i] = cg.rewardCount[i+1]; +;2204: } +;2205: cg.rewardTime = cg.time; +;2206: cg.rewardStack--; +;2207: color = CG_FadeColor( cg.rewardTime, REWARD_TIME ); +;2208: trap_S_StartLocalSound(cg.rewardSound[0], CHAN_ANNOUNCER); +;2209: } else { +;2210: return; +;2211: } +;2212: } +;2213: +;2214: trap_R_SetColor( color ); +;2215: +;2216: /* +;2217: count = cg.rewardCount[0]/10; // number of big rewards to draw +;2218: +;2219: if (count) { +;2220: y = 4; +;2221: x = 320 - count * ICON_SIZE; +;2222: for ( i = 0 ; i < count ; i++ ) { +;2223: CG_DrawPic( x, y, (ICON_SIZE*2)-4, (ICON_SIZE*2)-4, cg.rewardShader[0] ); +;2224: x += (ICON_SIZE*2); +;2225: } +;2226: } +;2227: +;2228: count = cg.rewardCount[0] - count*10; // number of small rewards to draw +;2229: */ +;2230: +;2231: if ( cg.rewardCount[0] >= 10 ) { +;2232: y = 56; +;2233: x = 320 - ICON_SIZE/2; +;2234: CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] ); +;2235: Com_sprintf(buf, sizeof(buf), "%d", cg.rewardCount[0]); +;2236: x = ( SCREEN_WIDTH - SMALLCHAR_WIDTH * CG_DrawStrlen( buf ) ) / 2; +;2237: CG_DrawStringExt( x, y+ICON_SIZE, buf, color, qfalse, qtrue, +;2238: SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 ); +;2239: } +;2240: else { +;2241: +;2242: count = cg.rewardCount[0]; +;2243: +;2244: y = 56; +;2245: x = 320 - count * ICON_SIZE/2; +;2246: for ( i = 0 ; i < count ; i++ ) { +;2247: CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] ); +;2248: x += ICON_SIZE; +;2249: } +;2250: } +;2251: trap_R_SetColor( NULL ); +;2252:} +;2253:#endif +;2254: +;2255: +;2256:/* +;2257:=============================================================================== +;2258: +;2259:LAGOMETER +;2260: +;2261:=============================================================================== +;2262:*/ +;2263: +;2264:#define LAG_SAMPLES 128 +;2265: +;2266: +;2267:typedef struct { +;2268: int frameSamples[LAG_SAMPLES]; +;2269: int frameCount; +;2270: int snapshotFlags[LAG_SAMPLES]; +;2271: int snapshotSamples[LAG_SAMPLES]; +;2272: int snapshotCount; +;2273:} lagometer_t; +;2274: +;2275:lagometer_t lagometer; +;2276: +;2277:/* +;2278:============== +;2279:CG_AddLagometerFrameInfo +;2280: +;2281:Adds the current interpolate / extrapolate bar for this frame +;2282:============== +;2283:*/ +;2284:void CG_AddLagometerFrameInfo( void ) { +line 2287 +;2285: int offset; +;2286: +;2287: offset = cg.time - cg.latestSnapshotTime; +ADDRLP4 0 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+32 +INDIRI4 +SUBI4 +ASGNI4 +line 2288 +;2288: lagometer.frameSamples[ lagometer.frameCount & ( LAG_SAMPLES - 1) ] = offset; +ADDRGP4 lagometer+512 +INDIRI4 +CNSTI4 127 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 lagometer +ADDP4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 2289 +;2289: lagometer.frameCount++; +ADDRLP4 4 +ADDRGP4 lagometer+512 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2290 +;2290:} +LABELV $1109 +endproc CG_AddLagometerFrameInfo 8 0 +export CG_AddLagometerSnapshotInfo +proc CG_AddLagometerSnapshotInfo 4 0 +line 2302 +;2291: +;2292:/* +;2293:============== +;2294:CG_AddLagometerSnapshotInfo +;2295: +;2296:Each time a snapshot is received, log its ping time and +;2297:the number of snapshots that were dropped before it. +;2298: +;2299:Pass NULL for a dropped packet. +;2300:============== +;2301:*/ +;2302:void CG_AddLagometerSnapshotInfo( snapshot_t *snap ) { +line 2304 +;2303: // dropped packet +;2304: if ( !snap ) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1115 +line 2305 +;2305: lagometer.snapshotSamples[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = -1; +ADDRGP4 lagometer+1540 +INDIRI4 +CNSTI4 127 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 lagometer+1028 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 2306 +;2306: lagometer.snapshotCount++; +ADDRLP4 0 +ADDRGP4 lagometer+1540 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2307 +;2307: return; +ADDRGP4 $1114 +JUMPV +LABELV $1115 +line 2311 +;2308: } +;2309: +;2310: // add this snapshot's info +;2311: lagometer.snapshotSamples[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = snap->ping; +ADDRGP4 lagometer+1540 +INDIRI4 +CNSTI4 127 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 lagometer+1028 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 2312 +;2312: lagometer.snapshotFlags[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = snap->snapFlags; +ADDRGP4 lagometer+1540 +INDIRI4 +CNSTI4 127 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 lagometer+516 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +line 2313 +;2313: lagometer.snapshotCount++; +ADDRLP4 0 +ADDRGP4 lagometer+1540 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2314 +;2314:} +LABELV $1114 +endproc CG_AddLagometerSnapshotInfo 4 0 +proc CG_DrawDisconnect 72 20 +line 2323 +;2315: +;2316:/* +;2317:============== +;2318:CG_DrawDisconnect +;2319: +;2320:Should we draw something differnet for long lag vs no packets? +;2321:============== +;2322:*/ +;2323:static void CG_DrawDisconnect( void ) { +line 2330 +;2324: float x, y; +;2325: int cmdNum; +;2326: usercmd_t cmd; +;2327: const char *s; +;2328: int w; // bk010215 - FIXME char message[1024]; +;2329: +;2330: if (cg.mMapChange) +ADDRGP4 cg+48 +INDIRI4 +CNSTI4 0 +EQI4 $1126 +line 2331 +;2331: { +line 2332 +;2332: s = CG_GetStripEdString("INGAMETEXT", "SERVER_CHANGING_MAPS"); // s = "Server Changing Maps"; +ADDRGP4 $903 +ARGP4 +ADDRGP4 $1129 +ARGP4 +ADDRLP4 48 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 48 +INDIRP4 +ASGNP4 +line 2333 +;2333: w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 52 +ADDRGP4 CG_DrawStrlen +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 52 +INDIRI4 +CNSTI4 4 +LSHI4 +ASGNI4 +line 2334 +;2334: CG_DrawBigString( 320 - w/2, 100, s, 1.0F); +CNSTI4 320 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 CG_DrawBigString +CALLV +pop +line 2336 +;2335: +;2336: s = CG_GetStripEdString("INGAMETEXT", "PLEASE_WAIT"); // s = "Please wait..."; +ADDRGP4 $903 +ARGP4 +ADDRGP4 $1130 +ARGP4 +ADDRLP4 56 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 56 +INDIRP4 +ASGNP4 +line 2337 +;2337: w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 60 +ADDRGP4 CG_DrawStrlen +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 60 +INDIRI4 +CNSTI4 4 +LSHI4 +ASGNI4 +line 2338 +;2338: CG_DrawBigString( 320 - w/2, 200, s, 1.0F); +CNSTI4 320 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +ARGI4 +CNSTI4 200 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 CG_DrawBigString +CALLV +pop +line 2339 +;2339: return; +ADDRGP4 $1125 +JUMPV +LABELV $1126 +line 2343 +;2340: } +;2341: +;2342: // draw the phone jack if we are completely past our buffers +;2343: cmdNum = trap_GetCurrentCmdNumber() - CMD_BACKUP + 1; +ADDRLP4 48 +ADDRGP4 trap_GetCurrentCmdNumber +CALLI4 +ASGNI4 +ADDRLP4 44 +ADDRLP4 48 +INDIRI4 +CNSTI4 64 +SUBI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2344 +;2344: trap_GetUserCmd( cmdNum, &cmd ); +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 8 +ARGP4 +ADDRGP4 trap_GetUserCmd +CALLI4 +pop +line 2345 +;2345: if ( cmd.serverTime <= cg.snap->ps.commandTime +ADDRLP4 52 +ADDRLP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +LEI4 $1135 +ADDRLP4 52 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $1131 +LABELV $1135 +line 2346 +;2346: || cmd.serverTime > cg.time ) { // special check for map_restart // bk 0102165 - FIXME +line 2347 +;2347: return; +ADDRGP4 $1125 +JUMPV +LABELV $1131 +line 2351 +;2348: } +;2349: +;2350: // also add text in center of screen +;2351: s = CG_GetStripEdString("INGAMETEXT", "CONNECTION_INTERRUPTED"); // s = "Connection Interrupted"; // bk 010215 - FIXME +ADDRGP4 $903 +ARGP4 +ADDRGP4 $1136 +ARGP4 +ADDRLP4 56 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 56 +INDIRP4 +ASGNP4 +line 2352 +;2352: w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 60 +ADDRGP4 CG_DrawStrlen +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 60 +INDIRI4 +CNSTI4 4 +LSHI4 +ASGNI4 +line 2353 +;2353: CG_DrawBigString( 320 - w/2, 100, s, 1.0F); +CNSTI4 320 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +ARGI4 +CNSTI4 100 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 CG_DrawBigString +CALLV +pop +line 2356 +;2354: +;2355: // blink the icon +;2356: if ( ( cg.time >> 9 ) & 1 ) { +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 9 +RSHI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1137 +line 2357 +;2357: return; +ADDRGP4 $1125 +JUMPV +LABELV $1137 +line 2360 +;2358: } +;2359: +;2360: x = 640 - 48; +ADDRLP4 36 +CNSTF4 1142161408 +ASGNF4 +line 2361 +;2361: y = 480 - 48; +ADDRLP4 40 +CNSTF4 1138229248 +ASGNF4 +line 2363 +;2362: +;2363: CG_DrawPic( x, y, 48, 48, trap_R_RegisterShader("gfx/2d/net.tga" ) ); +ADDRGP4 $1140 +ARGP4 +ADDRLP4 64 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRF4 +ARGF4 +ADDRLP4 68 +CNSTF4 1111490560 +ASGNF4 +ADDRLP4 68 +INDIRF4 +ARGF4 +ADDRLP4 68 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 2364 +;2364:} +LABELV $1125 +endproc CG_DrawDisconnect 72 20 +proc CG_DrawLagometer 68 36 +line 2375 +;2365: +;2366: +;2367:#define MAX_LAGOMETER_PING 900 +;2368:#define MAX_LAGOMETER_RANGE 300 +;2369: +;2370:/* +;2371:============== +;2372:CG_DrawLagometer +;2373:============== +;2374:*/ +;2375:static void CG_DrawLagometer( void ) { +line 2382 +;2376: int a, x, y, i; +;2377: float v; +;2378: float ax, ay, aw, ah, mid, range; +;2379: int color; +;2380: float vscale; +;2381: +;2382: if ( !cg_lagometer.integer || cgs.localServer ) { +ADDRLP4 52 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_lagometer+12 +INDIRI4 +ADDRLP4 52 +INDIRI4 +EQI4 $1146 +ADDRGP4 cgs+32956 +INDIRI4 +ADDRLP4 52 +INDIRI4 +EQI4 $1142 +LABELV $1146 +line 2383 +;2383: CG_DrawDisconnect(); +ADDRGP4 CG_DrawDisconnect +CALLV +pop +line 2384 +;2384: return; +ADDRGP4 $1141 +JUMPV +LABELV $1142 +line 2390 +;2385: } +;2386: +;2387: // +;2388: // draw the graph +;2389: // +;2390: x = 640 - 48; +ADDRLP4 44 +CNSTI4 592 +ASGNI4 +line 2391 +;2391: y = 480 - 144; +ADDRLP4 48 +CNSTI4 336 +ASGNI4 +line 2393 +;2392: +;2393: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2394 +;2394: CG_DrawPic( x, y, 48, 48, cgs.media.lagometerShader ); +ADDRLP4 44 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 48 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 56 +CNSTF4 1111490560 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+240 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 2396 +;2395: +;2396: ax = x; +ADDRLP4 28 +ADDRLP4 44 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2397 +;2397: ay = y; +ADDRLP4 36 +ADDRLP4 48 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2398 +;2398: aw = 48; +ADDRLP4 12 +CNSTF4 1111490560 +ASGNF4 +line 2399 +;2399: ah = 48; +ADDRLP4 32 +CNSTF4 1111490560 +ASGNF4 +line 2401 +;2400: +;2401: color = -1; +ADDRLP4 20 +CNSTI4 -1 +ASGNI4 +line 2402 +;2402: range = ah / 3; +ADDRLP4 16 +ADDRLP4 32 +INDIRF4 +CNSTF4 1077936128 +DIVF4 +ASGNF4 +line 2403 +;2403: mid = ay + range; +ADDRLP4 40 +ADDRLP4 36 +INDIRF4 +ADDRLP4 16 +INDIRF4 +ADDF4 +ASGNF4 +line 2405 +;2404: +;2405: vscale = range / MAX_LAGOMETER_RANGE; +ADDRLP4 24 +ADDRLP4 16 +INDIRF4 +CNSTF4 1133903872 +DIVF4 +ASGNF4 +line 2408 +;2406: +;2407: // draw the frame interpoalte / extrapolate graph +;2408: for ( a = 0 ; a < aw ; a++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1152 +JUMPV +LABELV $1149 +line 2409 +;2409: i = ( lagometer.frameCount - 1 - a ) & (LAG_SAMPLES - 1); +ADDRLP4 8 +ADDRGP4 lagometer+512 +INDIRI4 +CNSTI4 1 +SUBI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +CNSTI4 127 +BANDI4 +ASGNI4 +line 2410 +;2410: v = lagometer.frameSamples[i]; +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 lagometer +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2411 +;2411: v *= vscale; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 24 +INDIRF4 +MULF4 +ASGNF4 +line 2412 +;2412: if ( v > 0 ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +LEF4 $1154 +line 2413 +;2413: if ( color != 1 ) { +ADDRLP4 20 +INDIRI4 +CNSTI4 1 +EQI4 $1156 +line 2414 +;2414: color = 1; +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +line 2415 +;2415: trap_R_SetColor( g_color_table[ColorIndex(COLOR_YELLOW)] ); +ADDRGP4 g_color_table+48 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2416 +;2416: } +LABELV $1156 +line 2417 +;2417: if ( v > range ) { +ADDRLP4 0 +INDIRF4 +ADDRLP4 16 +INDIRF4 +LEF4 $1159 +line 2418 +;2418: v = range; +ADDRLP4 0 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 2419 +;2419: } +LABELV $1159 +line 2420 +;2420: trap_R_DrawStretchPic ( ax + aw - a, mid - v, 1, v, 0, 0, 0, 0, cgs.media.whiteShader ); +ADDRLP4 28 +INDIRF4 +ADDRLP4 12 +INDIRF4 +ADDF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +SUBF4 +ARGF4 +ADDRLP4 40 +INDIRF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 64 +CNSTF4 0 +ASGNF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 2421 +;2421: } else if ( v < 0 ) { +ADDRGP4 $1155 +JUMPV +LABELV $1154 +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +GEF4 $1163 +line 2422 +;2422: if ( color != 2 ) { +ADDRLP4 20 +INDIRI4 +CNSTI4 2 +EQI4 $1165 +line 2423 +;2423: color = 2; +ADDRLP4 20 +CNSTI4 2 +ASGNI4 +line 2424 +;2424: trap_R_SetColor( g_color_table[ColorIndex(COLOR_BLUE)] ); +ADDRGP4 g_color_table+64 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2425 +;2425: } +LABELV $1165 +line 2426 +;2426: v = -v; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +NEGF4 +ASGNF4 +line 2427 +;2427: if ( v > range ) { +ADDRLP4 0 +INDIRF4 +ADDRLP4 16 +INDIRF4 +LEF4 $1168 +line 2428 +;2428: v = range; +ADDRLP4 0 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 2429 +;2429: } +LABELV $1168 +line 2430 +;2430: trap_R_DrawStretchPic( ax + aw - a, mid, 1, v, 0, 0, 0, 0, cgs.media.whiteShader ); +ADDRLP4 28 +INDIRF4 +ADDRLP4 12 +INDIRF4 +ADDF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +SUBF4 +ARGF4 +ADDRLP4 40 +INDIRF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 60 +CNSTF4 0 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 2431 +;2431: } +LABELV $1163 +LABELV $1155 +line 2432 +;2432: } +LABELV $1150 +line 2408 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1152 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ADDRLP4 12 +INDIRF4 +LTF4 $1149 +line 2435 +;2433: +;2434: // draw the snapshot latency / drop graph +;2435: range = ah / 2; +ADDRLP4 16 +ADDRLP4 32 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 2436 +;2436: vscale = range / MAX_LAGOMETER_PING; +ADDRLP4 24 +ADDRLP4 16 +INDIRF4 +CNSTF4 1147207680 +DIVF4 +ASGNF4 +line 2438 +;2437: +;2438: for ( a = 0 ; a < aw ; a++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1175 +JUMPV +LABELV $1172 +line 2439 +;2439: i = ( lagometer.snapshotCount - 1 - a ) & (LAG_SAMPLES - 1); +ADDRLP4 8 +ADDRGP4 lagometer+1540 +INDIRI4 +CNSTI4 1 +SUBI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +CNSTI4 127 +BANDI4 +ASGNI4 +line 2440 +;2440: v = lagometer.snapshotSamples[i]; +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 lagometer+1028 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2441 +;2441: if ( v > 0 ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +LEF4 $1178 +line 2442 +;2442: if ( lagometer.snapshotFlags[i] & SNAPFLAG_RATE_DELAYED ) { +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 lagometer+516 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1180 +line 2443 +;2443: if ( color != 5 ) { +ADDRLP4 20 +INDIRI4 +CNSTI4 5 +EQI4 $1181 +line 2444 +;2444: color = 5; // YELLOW for rate delay +ADDRLP4 20 +CNSTI4 5 +ASGNI4 +line 2445 +;2445: trap_R_SetColor( g_color_table[ColorIndex(COLOR_YELLOW)] ); +ADDRGP4 g_color_table+48 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2446 +;2446: } +line 2447 +;2447: } else { +ADDRGP4 $1181 +JUMPV +LABELV $1180 +line 2448 +;2448: if ( color != 3 ) { +ADDRLP4 20 +INDIRI4 +CNSTI4 3 +EQI4 $1186 +line 2449 +;2449: color = 3; +ADDRLP4 20 +CNSTI4 3 +ASGNI4 +line 2450 +;2450: trap_R_SetColor( g_color_table[ColorIndex(COLOR_GREEN)] ); +ADDRGP4 g_color_table+32 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2451 +;2451: } +LABELV $1186 +line 2452 +;2452: } +LABELV $1181 +line 2453 +;2453: v = v * vscale; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 24 +INDIRF4 +MULF4 +ASGNF4 +line 2454 +;2454: if ( v > range ) { +ADDRLP4 0 +INDIRF4 +ADDRLP4 16 +INDIRF4 +LEF4 $1189 +line 2455 +;2455: v = range; +ADDRLP4 0 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 2456 +;2456: } +LABELV $1189 +line 2457 +;2457: trap_R_DrawStretchPic( ax + aw - a, ay + ah - v, 1, v, 0, 0, 0, 0, cgs.media.whiteShader ); +ADDRLP4 28 +INDIRF4 +ADDRLP4 12 +INDIRF4 +ADDF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +SUBF4 +ARGF4 +ADDRLP4 36 +INDIRF4 +ADDRLP4 32 +INDIRF4 +ADDF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 64 +CNSTF4 0 +ASGNF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 2458 +;2458: } else if ( v < 0 ) { +ADDRGP4 $1179 +JUMPV +LABELV $1178 +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +GEF4 $1193 +line 2459 +;2459: if ( color != 4 ) { +ADDRLP4 20 +INDIRI4 +CNSTI4 4 +EQI4 $1195 +line 2460 +;2460: color = 4; // RED for dropped snapshots +ADDRLP4 20 +CNSTI4 4 +ASGNI4 +line 2461 +;2461: trap_R_SetColor( g_color_table[ColorIndex(COLOR_RED)] ); +ADDRGP4 g_color_table+16 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2462 +;2462: } +LABELV $1195 +line 2463 +;2463: trap_R_DrawStretchPic( ax + aw - a, ay + ah - range, 1, range, 0, 0, 0, 0, cgs.media.whiteShader ); +ADDRLP4 28 +INDIRF4 +ADDRLP4 12 +INDIRF4 +ADDF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +SUBF4 +ARGF4 +ADDRLP4 36 +INDIRF4 +ADDRLP4 32 +INDIRF4 +ADDF4 +ADDRLP4 16 +INDIRF4 +SUBF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 64 +CNSTF4 0 +ASGNF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 2464 +;2464: } +LABELV $1193 +LABELV $1179 +line 2465 +;2465: } +LABELV $1173 +line 2438 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1175 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ADDRLP4 12 +INDIRF4 +LTF4 $1172 +line 2467 +;2466: +;2467: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2469 +;2468: +;2469: if ( cg_nopredict.integer || cg_synchronousClients.integer ) { +ADDRLP4 60 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_nopredict+12 +INDIRI4 +ADDRLP4 60 +INDIRI4 +NEI4 $1204 +ADDRGP4 cg_synchronousClients+12 +INDIRI4 +ADDRLP4 60 +INDIRI4 +EQI4 $1200 +LABELV $1204 +line 2470 +;2470: CG_DrawBigString( ax, ay, "snc", 1.0 ); +ADDRLP4 28 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 36 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 $1205 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 CG_DrawBigString +CALLV +pop +line 2471 +;2471: } +LABELV $1200 +line 2473 +;2472: +;2473: CG_DrawDisconnect(); +ADDRGP4 CG_DrawDisconnect +CALLV +pop +line 2474 +;2474:} +LABELV $1141 +endproc CG_DrawLagometer 68 36 +export CG_CenterPrint +proc CG_CenterPrint 8 12 +line 2495 +;2475: +;2476: +;2477: +;2478:/* +;2479:=============================================================================== +;2480: +;2481:CENTER PRINTING +;2482: +;2483:=============================================================================== +;2484:*/ +;2485: +;2486: +;2487:/* +;2488:============== +;2489:CG_CenterPrint +;2490: +;2491:Called for important messages that should stay in the center of the screen +;2492:for a few moments +;2493:============== +;2494:*/ +;2495:void CG_CenterPrint( const char *str, int y, int charWidth ) { +line 2498 +;2496: char *s; +;2497: +;2498: Q_strncpyz( cg.centerPrint, str, sizeof(cg.centerPrint) ); +ADDRGP4 cg+12060 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 2500 +;2499: +;2500: cg.centerPrintTime = cg.time; +ADDRGP4 cg+12048 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 2501 +;2501: cg.centerPrintY = y; +ADDRGP4 cg+12056 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 2502 +;2502: cg.centerPrintCharWidth = charWidth; +ADDRGP4 cg+12052 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 2505 +;2503: +;2504: // count the number of lines for centering +;2505: cg.centerPrintLines = 1; +ADDRGP4 cg+13084 +CNSTI4 1 +ASGNI4 +line 2506 +;2506: s = cg.centerPrint; +ADDRLP4 0 +ADDRGP4 cg+12060 +ASGNP4 +ADDRGP4 $1216 +JUMPV +LABELV $1215 +line 2507 +;2507: while( *s ) { +line 2508 +;2508: if (*s == '\n') +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 10 +NEI4 $1218 +line 2509 +;2509: cg.centerPrintLines++; +ADDRLP4 4 +ADDRGP4 cg+13084 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1218 +line 2510 +;2510: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 2511 +;2511: } +LABELV $1216 +line 2507 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1215 +line 2512 +;2512:} +LABELV $1206 +endproc CG_CenterPrint 8 12 +proc CG_DrawCenterString 1072 36 +line 2520 +;2513: +;2514: +;2515:/* +;2516:=================== +;2517:CG_DrawCenterString +;2518:=================== +;2519:*/ +;2520:static void CG_DrawCenterString( void ) { +line 2526 +;2521: char *start; +;2522: int l; +;2523: int x, y, w; +;2524: int h; +;2525: float *color; +;2526: const float scale = 1.0; //0.5 +ADDRLP4 8 +CNSTF4 1065353216 +ASGNF4 +line 2528 +;2527: +;2528: if ( !cg.centerPrintTime ) { +ADDRGP4 cg+12048 +INDIRI4 +CNSTI4 0 +NEI4 $1222 +line 2529 +;2529: return; +ADDRGP4 $1221 +JUMPV +LABELV $1222 +line 2532 +;2530: } +;2531: +;2532: color = CG_FadeColor( cg.centerPrintTime, 1000 * cg_centertime.value ); +ADDRGP4 cg+12048 +INDIRI4 +ARGI4 +CNSTF4 1148846080 +ADDRGP4 cg_centertime+8 +INDIRF4 +MULF4 +CVFI4 4 +ARGI4 +ADDRLP4 32 +ADDRGP4 CG_FadeColor +CALLP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 32 +INDIRP4 +ASGNP4 +line 2533 +;2533: if ( !color ) { +ADDRLP4 28 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1227 +line 2534 +;2534: return; +ADDRGP4 $1221 +JUMPV +LABELV $1227 +line 2537 +;2535: } +;2536: +;2537: trap_R_SetColor( color ); +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2539 +;2538: +;2539: start = cg.centerPrint; +ADDRLP4 0 +ADDRGP4 cg+12060 +ASGNP4 +line 2541 +;2540: +;2541: y = cg.centerPrintY - cg.centerPrintLines * BIGCHAR_HEIGHT / 2; +ADDRLP4 16 +ADDRGP4 cg+12056 +INDIRI4 +ADDRGP4 cg+13084 +INDIRI4 +CNSTI4 4 +LSHI4 +CNSTI4 2 +DIVI4 +SUBI4 +ASGNI4 +ADDRGP4 $1233 +JUMPV +LABELV $1232 +line 2543 +;2542: +;2543: while ( 1 ) { +line 2546 +;2544: char linebuffer[1024]; +;2545: +;2546: for ( l = 0; l < 50; l++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +LABELV $1235 +line 2547 +;2547: if ( !start[l] || start[l] == '\n' ) { +ADDRLP4 1060 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 1060 +INDIRI4 +CNSTI4 0 +EQI4 $1241 +ADDRLP4 1060 +INDIRI4 +CNSTI4 10 +NEI4 $1239 +LABELV $1241 +line 2548 +;2548: break; +ADDRGP4 $1237 +JUMPV +LABELV $1239 +line 2550 +;2549: } +;2550: linebuffer[l] = start[l]; +ADDRLP4 4 +INDIRI4 +ADDRLP4 36 +ADDP4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 2551 +;2551: } +LABELV $1236 +line 2546 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 50 +LTI4 $1235 +LABELV $1237 +line 2552 +;2552: linebuffer[l] = 0; +ADDRLP4 4 +INDIRI4 +ADDRLP4 36 +ADDP4 +CNSTI1 0 +ASGNI1 +line 2554 +;2553: +;2554: w = CG_Text_Width(linebuffer, scale, FONT_MEDIUM); +ADDRLP4 36 +ARGP4 +ADDRLP4 8 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 1060 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 1060 +INDIRI4 +ASGNI4 +line 2555 +;2555: h = CG_Text_Height(linebuffer, scale, FONT_MEDIUM); +ADDRLP4 36 +ARGP4 +ADDRLP4 8 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 1064 +ADDRGP4 CG_Text_Height +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 1064 +INDIRI4 +ASGNI4 +line 2556 +;2556: x = (SCREEN_WIDTH - w) / 2; +ADDRLP4 20 +CNSTI4 640 +ADDRLP4 24 +INDIRI4 +SUBI4 +CNSTI4 2 +DIVI4 +ASGNI4 +line 2557 +;2557: CG_Text_Paint(x, y + h, scale, color, linebuffer, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM); +ADDRLP4 20 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRLP4 36 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 2558 +;2558: y += h + 6; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 6 +ADDI4 +ADDI4 +ASGNI4 +ADDRGP4 $1243 +JUMPV +LABELV $1242 +line 2560 +;2559: +;2560: while ( *start && ( *start != '\n' ) ) { +line 2561 +;2561: start++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 2562 +;2562: } +LABELV $1243 +line 2560 +ADDRLP4 1068 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 1068 +INDIRI4 +CNSTI4 0 +EQI4 $1245 +ADDRLP4 1068 +INDIRI4 +CNSTI4 10 +NEI4 $1242 +LABELV $1245 +line 2563 +;2563: if ( !*start ) { +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1246 +line 2564 +;2564: break; +ADDRGP4 $1234 +JUMPV +LABELV $1246 +line 2566 +;2565: } +;2566: start++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 2567 +;2567: } +LABELV $1233 +line 2543 +ADDRGP4 $1232 +JUMPV +LABELV $1234 +line 2569 +;2568: +;2569: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2570 +;2570:} +LABELV $1221 +endproc CG_DrawCenterString 1072 36 +lit +align 4 +LABELV $1271 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +code +proc CG_DrawCrosshair 68 36 +line 2588 +;2571: +;2572: +;2573: +;2574:/* +;2575:================================================================================ +;2576: +;2577:CROSSHAIR +;2578: +;2579:================================================================================ +;2580:*/ +;2581: +;2582: +;2583:/* +;2584:================= +;2585:CG_DrawCrosshair +;2586:================= +;2587:*/ +;2588:static void CG_DrawCrosshair( vec3_t worldPoint, int chEntValid ) { +line 2594 +;2589: float w, h; +;2590: qhandle_t hShader; +;2591: float f; +;2592: float x, y; +;2593: +;2594: if ( !cg_drawCrosshair.integer ) +ADDRGP4 cg_drawCrosshair+12 +INDIRI4 +CNSTI4 0 +NEI4 $1249 +line 2595 +;2595: { +line 2596 +;2596: return; +ADDRGP4 $1248 +JUMPV +LABELV $1249 +line 2599 +;2597: } +;2598: +;2599: if (cg.snap->ps.fallingToDeath) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1396 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1252 +line 2600 +;2600: { +line 2601 +;2601: return; +ADDRGP4 $1248 +JUMPV +LABELV $1252 +line 2604 +;2602: } +;2603: +;2604: if ( cg.predictedPlayerState.zoomMode != 0 ) +ADDRGP4 cg+96+1332 +INDIRI4 +CNSTI4 0 +EQI4 $1255 +line 2605 +;2605: {//not while scoped +line 2606 +;2606: return; +ADDRGP4 $1248 +JUMPV +LABELV $1255 +line 2609 +;2607: } +;2608: +;2609: if ( cg_crosshairHealth.integer ) +ADDRGP4 cg_crosshairHealth+12 +INDIRI4 +CNSTI4 0 +EQI4 $1259 +line 2610 +;2610: { +line 2613 +;2611: vec4_t hcolor; +;2612: +;2613: CG_ColorForHealth( hcolor ); +ADDRLP4 24 +ARGP4 +ADDRGP4 CG_ColorForHealth +CALLV +pop +line 2614 +;2614: trap_R_SetColor( hcolor ); +ADDRLP4 24 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2615 +;2615: } +ADDRGP4 $1260 +JUMPV +LABELV $1259 +line 2617 +;2616: else +;2617: { +line 2619 +;2618: //set color based on what kind of ent is under crosshair +;2619: if ( cg.crosshairClientNum >= ENTITYNUM_WORLD ) +ADDRGP4 cg+13096 +INDIRI4 +CNSTI4 1022 +LTI4 $1262 +line 2620 +;2620: { +line 2621 +;2621: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2622 +;2622: } +ADDRGP4 $1263 +JUMPV +LABELV $1262 +line 2623 +;2623: else if (chEntValid && (cg_entities[cg.crosshairClientNum].currentState.number < MAX_CLIENTS || cg_entities[cg.crosshairClientNum].currentState.shouldtarget)) +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRFP4 4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +EQI4 $1265 +ADDRLP4 28 +CNSTI4 1920 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ADDRGP4 cg+13096 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +INDIRI4 +CNSTI4 32 +LTI4 $1270 +ADDRLP4 28 +INDIRI4 +ADDRGP4 cg+13096 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+268 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +EQI4 $1265 +LABELV $1270 +line 2624 +;2624: { +line 2625 +;2625: vec4_t ecolor = {0,0,0,0}; +ADDRLP4 32 +ADDRGP4 $1271 +INDIRB +ASGNB 16 +line 2626 +;2626: centity_t *crossEnt = &cg_entities[cg.crosshairClientNum]; +ADDRLP4 48 +CNSTI4 1920 +ADDRGP4 cg+13096 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 2628 +;2627: +;2628: if ( crossEnt->currentState.number < MAX_CLIENTS ) +ADDRLP4 48 +INDIRP4 +INDIRI4 +CNSTI4 32 +GEI4 $1273 +line 2629 +;2629: { +line 2630 +;2630: if (cgs.gametype >= GT_TEAM && +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $1275 +ADDRLP4 52 +CNSTI4 788 +ASGNI4 +ADDRLP4 52 +INDIRI4 +ADDRLP4 48 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +ADDRLP4 52 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +NEI4 $1275 +line 2632 +;2631: cgs.clientinfo[crossEnt->currentState.number].team == cgs.clientinfo[cg.snap->ps.clientNum].team ) +;2632: { +line 2634 +;2633: //Allies are green +;2634: ecolor[0] = 0.0;//R +ADDRLP4 32 +CNSTF4 0 +ASGNF4 +line 2635 +;2635: ecolor[1] = 1.0;//G +ADDRLP4 32+4 +CNSTF4 1065353216 +ASGNF4 +line 2636 +;2636: ecolor[2] = 0.0;//B +ADDRLP4 32+8 +CNSTF4 0 +ASGNF4 +line 2637 +;2637: } +ADDRGP4 $1276 +JUMPV +LABELV $1275 +line 2639 +;2638: else +;2639: { +line 2641 +;2640: //Enemies are red +;2641: ecolor[0] = 1.0;//R +ADDRLP4 32 +CNSTF4 1065353216 +ASGNF4 +line 2642 +;2642: ecolor[1] = 0.0;//G +ADDRLP4 32+4 +CNSTF4 0 +ASGNF4 +line 2643 +;2643: ecolor[2] = 0.0;//B +ADDRLP4 32+8 +CNSTF4 0 +ASGNF4 +line 2644 +;2644: } +LABELV $1276 +line 2646 +;2645: +;2646: if (cg.snap->ps.duelInProgress) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1348 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1287 +line 2647 +;2647: { +line 2648 +;2648: if (crossEnt->currentState.number != cg.snap->ps.duelIndex) +ADDRLP4 48 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +EQI4 $1274 +line 2649 +;2649: { //grey out crosshair for everyone but your foe if you're in a duel +line 2650 +;2650: ecolor[0] = 0.4; +ADDRLP4 32 +CNSTF4 1053609165 +ASGNF4 +line 2651 +;2651: ecolor[1] = 0.4; +ADDRLP4 32+4 +CNSTF4 1053609165 +ASGNF4 +line 2652 +;2652: ecolor[2] = 0.4; +ADDRLP4 32+8 +CNSTF4 1053609165 +ASGNF4 +line 2653 +;2653: } +line 2654 +;2654: } +ADDRGP4 $1274 +JUMPV +LABELV $1287 +line 2655 +;2655: else if (crossEnt->currentState.bolt1) +ADDRLP4 48 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1274 +line 2656 +;2656: { //this fellow is in a duel. We just checked if we were in a duel above, so +line 2658 +;2657: //this means we aren't and he is. Which of course means our crosshair greys out over him. +;2658: ecolor[0] = 0.4; +ADDRLP4 32 +CNSTF4 1053609165 +ASGNF4 +line 2659 +;2659: ecolor[1] = 0.4; +ADDRLP4 32+4 +CNSTF4 1053609165 +ASGNF4 +line 2660 +;2660: ecolor[2] = 0.4; +ADDRLP4 32+8 +CNSTF4 1053609165 +ASGNF4 +line 2661 +;2661: } +line 2662 +;2662: } +ADDRGP4 $1274 +JUMPV +LABELV $1273 +line 2663 +;2663: else if (crossEnt->currentState.shouldtarget) +ADDRLP4 48 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1299 +line 2664 +;2664: { +line 2666 +;2665: //VectorCopy( crossEnt->startRGBA, ecolor ); +;2666: if ( !ecolor[0] && !ecolor[1] && !ecolor[2] ) +ADDRLP4 52 +CNSTF4 0 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 52 +INDIRF4 +NEF4 $1301 +ADDRLP4 32+4 +INDIRF4 +ADDRLP4 52 +INDIRF4 +NEF4 $1301 +ADDRLP4 32+8 +INDIRF4 +ADDRLP4 52 +INDIRF4 +NEF4 $1301 +line 2667 +;2667: { +line 2669 +;2668: // We really don't want black, so set it to yellow +;2669: ecolor[0] = 1.0F;//R +ADDRLP4 32 +CNSTF4 1065353216 +ASGNF4 +line 2670 +;2670: ecolor[1] = 0.8F;//G +ADDRLP4 32+4 +CNSTF4 1061997773 +ASGNF4 +line 2671 +;2671: ecolor[2] = 0.3F;//B +ADDRLP4 32+8 +CNSTF4 1050253722 +ASGNF4 +line 2672 +;2672: } +LABELV $1301 +line 2674 +;2673: +;2674: if (crossEnt->currentState.owner == cg.snap->ps.clientNum || +ADDRLP4 56 +ADDRLP4 48 +INDIRP4 +ASGNP4 +ADDRLP4 60 +CNSTI4 188 +ASGNI4 +ADDRLP4 56 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $1314 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $1307 +ADDRLP4 56 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +CNSTI4 788 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +NEI4 $1307 +LABELV $1314 +line 2676 +;2675: (cgs.gametype >= GT_TEAM && crossEnt->currentState.teamowner == cgs.clientinfo[cg.snap->ps.clientNum].team)) +;2676: { +line 2677 +;2677: ecolor[0] = 0.0;//R +ADDRLP4 32 +CNSTF4 0 +ASGNF4 +line 2678 +;2678: ecolor[1] = 1.0;//G +ADDRLP4 32+4 +CNSTF4 1065353216 +ASGNF4 +line 2679 +;2679: ecolor[2] = 0.0;//B +ADDRLP4 32+8 +CNSTF4 0 +ASGNF4 +line 2680 +;2680: } +ADDRGP4 $1308 +JUMPV +LABELV $1307 +line 2681 +;2681: else if (crossEnt->currentState.teamowner == 16 || +ADDRLP4 64 +ADDRLP4 48 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 16 +EQI4 $1323 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $1317 +ADDRLP4 64 +INDIRI4 +CNSTI4 0 +EQI4 $1317 +ADDRLP4 64 +INDIRI4 +CNSTI4 788 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +EQI4 $1317 +LABELV $1323 +line 2683 +;2682: (cgs.gametype >= GT_TEAM && crossEnt->currentState.teamowner && crossEnt->currentState.teamowner != cgs.clientinfo[cg.snap->ps.clientNum].team)) +;2683: { +line 2684 +;2684: ecolor[0] = 1.0;//R +ADDRLP4 32 +CNSTF4 1065353216 +ASGNF4 +line 2685 +;2685: ecolor[1] = 0.0;//G +ADDRLP4 32+4 +CNSTF4 0 +ASGNF4 +line 2686 +;2686: ecolor[2] = 0.0;//B +ADDRLP4 32+8 +CNSTF4 0 +ASGNF4 +line 2687 +;2687: } +ADDRGP4 $1318 +JUMPV +LABELV $1317 +line 2688 +;2688: else if (crossEnt->currentState.eType == ET_GRAPPLE) +ADDRLP4 48 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 13 +NEI4 $1326 +line 2689 +;2689: { +line 2690 +;2690: ecolor[0] = 1.0;//R +ADDRLP4 32 +CNSTF4 1065353216 +ASGNF4 +line 2691 +;2691: ecolor[1] = 0.0;//G +ADDRLP4 32+4 +CNSTF4 0 +ASGNF4 +line 2692 +;2692: ecolor[2] = 0.0;//B +ADDRLP4 32+8 +CNSTF4 0 +ASGNF4 +line 2693 +;2693: } +LABELV $1326 +LABELV $1318 +LABELV $1308 +line 2694 +;2694: } +LABELV $1299 +LABELV $1274 +line 2696 +;2695: +;2696: ecolor[3] = 1.0; +ADDRLP4 32+12 +CNSTF4 1065353216 +ASGNF4 +line 2698 +;2697: +;2698: trap_R_SetColor( ecolor ); +ADDRLP4 32 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2699 +;2699: } +LABELV $1265 +LABELV $1263 +line 2700 +;2700: } +LABELV $1260 +line 2702 +;2701: +;2702: w = h = cg_crosshairSize.value; +ADDRLP4 24 +ADDRGP4 cg_crosshairSize+8 +INDIRF4 +ASGNF4 +ADDRLP4 8 +ADDRLP4 24 +INDIRF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 2705 +;2703: +;2704: // pulse the size of the crosshair when picking up items +;2705: f = cg.time - cg.itemPickupBlendTime; +ADDRLP4 0 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+13368 +INDIRI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 2706 +;2706: if ( f > 0 && f < ITEM_BLOB_TIME ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +LEF4 $1334 +ADDRLP4 0 +INDIRF4 +CNSTF4 1128792064 +GEF4 $1334 +line 2707 +;2707: f /= ITEM_BLOB_TIME; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1128792064 +DIVF4 +ASGNF4 +line 2708 +;2708: w *= ( 1 + f ); +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +MULF4 +ASGNF4 +line 2709 +;2709: h *= ( 1 + f ); +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRLP4 0 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +MULF4 +ASGNF4 +line 2710 +;2710: } +LABELV $1334 +line 2712 +;2711: +;2712: if ( worldPoint && VectorLength( worldPoint ) ) +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1336 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 36 +INDIRF4 +CNSTF4 0 +EQF4 $1336 +line 2713 +;2713: { +line 2714 +;2714: if ( !CG_WorldCoordToScreenCoordFloat( worldPoint, &x, &y ) ) +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRLP4 40 +ADDRGP4 CG_WorldCoordToScreenCoordFloat +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +NEI4 $1338 +line 2715 +;2715: {//off screen, don't draw it +line 2716 +;2716: return; +ADDRGP4 $1248 +JUMPV +LABELV $1338 +line 2718 +;2717: } +;2718: x -= 320; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +CNSTF4 1134559232 +SUBF4 +ASGNF4 +line 2719 +;2719: y -= 240; +ADDRLP4 16 +ADDRLP4 16 +INDIRF4 +CNSTF4 1131413504 +SUBF4 +ASGNF4 +line 2720 +;2720: } +ADDRGP4 $1337 +JUMPV +LABELV $1336 +line 2722 +;2721: else +;2722: { +line 2723 +;2723: x = cg_crosshairX.integer; +ADDRLP4 12 +ADDRGP4 cg_crosshairX+12 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2724 +;2724: y = cg_crosshairY.integer; +ADDRLP4 16 +ADDRGP4 cg_crosshairY+12 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2725 +;2725: } +LABELV $1337 +line 2727 +;2726: +;2727: hShader = cgs.media.crosshairShader[ cg_drawCrosshair.integer % NUM_CROSSHAIRS ]; +ADDRLP4 20 +ADDRGP4 cg_drawCrosshair+12 +INDIRI4 +CNSTI4 10 +MODI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+200 +ADDP4 +INDIRI4 +ASGNI4 +line 2729 +;2728: +;2729: trap_R_DrawStretchPic( x + cg.refdef.x + 0.5 * (640 - w), +ADDRLP4 40 +CNSTF4 1056964608 +ASGNF4 +ADDRLP4 12 +INDIRF4 +ADDRGP4 cg+3616 +INDIRI4 +CVIF4 4 +ADDF4 +ADDRLP4 40 +INDIRF4 +CNSTF4 1142947840 +ADDRLP4 4 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ARGF4 +ADDRLP4 16 +INDIRF4 +ADDRGP4 cg+3616+4 +INDIRI4 +CVIF4 4 +ADDF4 +ADDRLP4 40 +INDIRF4 +CNSTF4 1139802112 +ADDRLP4 8 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 52 +CNSTF4 0 +ASGNF4 +ADDRLP4 52 +INDIRF4 +ARGF4 +ADDRLP4 52 +INDIRF4 +ARGF4 +ADDRLP4 56 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 2732 +;2730: y + cg.refdef.y + 0.5 * (480 - h), +;2731: w, h, 0, 0, 1, 1, hShader ); +;2732:} +LABELV $1248 +endproc CG_DrawCrosshair 68 36 +export CG_WorldCoordToScreenCoordFloat +proc CG_WorldCoordToScreenCoordFloat 80 16 +line 2735 +;2733: +;2734:qboolean CG_WorldCoordToScreenCoordFloat(vec3_t worldCoord, float *x, float *y) +;2735:{ +line 2749 +;2736: int xcenter, ycenter; +;2737: vec3_t local, transformed; +;2738: vec3_t vfwd; +;2739: vec3_t vright; +;2740: vec3_t vup; +;2741: float xzi; +;2742: float yzi; +;2743: +;2744:// xcenter = cg.refdef.width / 2;//gives screen coords adjusted for resolution +;2745:// ycenter = cg.refdef.height / 2;//gives screen coords adjusted for resolution +;2746: +;2747: //NOTE: did it this way because most draw functions expect virtual 640x480 coords +;2748: // and adjust them for current resolution +;2749: xcenter = 640 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn +ADDRLP4 60 +CNSTI4 320 +ASGNI4 +line 2750 +;2750: ycenter = 480 / 2;//gives screen coords in virtual 640x480, to be adjusted when drawn +ADDRLP4 64 +CNSTI4 240 +ASGNI4 +line 2752 +;2751: +;2752: AngleVectors (cg.refdefViewAngles, vfwd, vright, vup); +ADDRGP4 cg+3984 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 36 +ARGP4 +ADDRLP4 48 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 2754 +;2753: +;2754: VectorSubtract (worldCoord, cg.refdef.vieworg, local); +ADDRLP4 76 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 76 +INDIRP4 +INDIRF4 +ADDRGP4 cg+3616+24 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 76 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+8 +INDIRF4 +SUBF4 +ASGNF4 +line 2756 +;2755: +;2756: transformed[0] = DotProduct(local,vright); +ADDRLP4 12 +ADDRLP4 0 +INDIRF4 +ADDRLP4 36 +INDIRF4 +MULF4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 36+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 36+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2757 +;2757: transformed[1] = DotProduct(local,vup); +ADDRLP4 12+4 +ADDRLP4 0 +INDIRF4 +ADDRLP4 48 +INDIRF4 +MULF4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 48+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 48+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2758 +;2758: transformed[2] = DotProduct(local,vfwd); +ADDRLP4 12+8 +ADDRLP4 0 +INDIRF4 +ADDRLP4 24 +INDIRF4 +MULF4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 24+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 24+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2761 +;2759: +;2760: // Make sure Z is not negative. +;2761: if(transformed[2] < 0.01) +ADDRLP4 12+8 +INDIRF4 +CNSTF4 1008981770 +GEF4 $1374 +line 2762 +;2762: { +line 2763 +;2763: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1348 +JUMPV +LABELV $1374 +line 2766 +;2764: } +;2765: +;2766: xzi = xcenter / transformed[2] * (90.0/cg.refdef.fov_x); +ADDRLP4 68 +ADDRLP4 60 +INDIRI4 +CVIF4 4 +ADDRLP4 12+8 +INDIRF4 +DIVF4 +CNSTF4 1119092736 +ADDRGP4 cg+3616+16 +INDIRF4 +DIVF4 +MULF4 +ASGNF4 +line 2767 +;2767: yzi = ycenter / transformed[2] * (90.0/cg.refdef.fov_y); +ADDRLP4 72 +ADDRLP4 64 +INDIRI4 +CVIF4 4 +ADDRLP4 12+8 +INDIRF4 +DIVF4 +CNSTF4 1119092736 +ADDRGP4 cg+3616+20 +INDIRF4 +DIVF4 +MULF4 +ASGNF4 +line 2769 +;2768: +;2769: *x = xcenter + xzi * transformed[0]; +ADDRFP4 4 +INDIRP4 +ADDRLP4 60 +INDIRI4 +CVIF4 4 +ADDRLP4 68 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2770 +;2770: *y = ycenter - yzi * transformed[1]; +ADDRFP4 8 +INDIRP4 +ADDRLP4 64 +INDIRI4 +CVIF4 4 +ADDRLP4 72 +INDIRF4 +ADDRLP4 12+4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 2772 +;2771: +;2772: return qtrue; +CNSTI4 1 +RETI4 +LABELV $1348 +endproc CG_WorldCoordToScreenCoordFloat 80 16 +export CG_WorldCoordToScreenCoord +proc CG_WorldCoordToScreenCoord 16 12 +line 2776 +;2773:} +;2774: +;2775:qboolean CG_WorldCoordToScreenCoord( vec3_t worldCoord, int *x, int *y ) +;2776:{ +line 2778 +;2777: float xF, yF; +;2778: qboolean retVal = CG_WorldCoordToScreenCoordFloat( worldCoord, &xF, &yF ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 12 +ADDRGP4 CG_WorldCoordToScreenCoordFloat +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2779 +;2779: *x = (int)xF; +ADDRFP4 4 +INDIRP4 +ADDRLP4 0 +INDIRF4 +CVFI4 4 +ASGNI4 +line 2780 +;2780: *y = (int)yF; +ADDRFP4 8 +INDIRP4 +ADDRLP4 4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 2781 +;2781: return retVal; +ADDRLP4 8 +INDIRI4 +RETI4 +LABELV $1384 +endproc CG_WorldCoordToScreenCoord 16 12 +data +export g_saberFlashTime +align 4 +LABELV g_saberFlashTime +byte 4 0 +export g_saberFlashPos +align 4 +LABELV g_saberFlashPos +byte 4 0 +byte 4 0 +byte 4 0 +export CG_SaberClashFlare +code +proc CG_SaberClashFlare 1164 28 +line 2792 +;2782:} +;2783: +;2784:/* +;2785:==================== +;2786:CG_SaberClashFlare +;2787:==================== +;2788:*/ +;2789:int g_saberFlashTime = 0; +;2790:vec3_t g_saberFlashPos = {0, 0, 0}; +;2791:void CG_SaberClashFlare( void ) +;2792:{ +line 2793 +;2793: int t, maxTime = 150; +ADDRLP4 36 +CNSTI4 150 +ASGNI4 +line 2800 +;2794: vec3_t dif; +;2795: vec3_t color; +;2796: int x,y; +;2797: float v, len; +;2798: trace_t tr; +;2799: +;2800: t = cg.time - g_saberFlashTime; +ADDRLP4 16 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 g_saberFlashTime +INDIRI4 +SUBI4 +ASGNI4 +line 2802 +;2801: +;2802: if ( t <= 0 || t >= maxTime ) +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +LEI4 $1389 +ADDRLP4 16 +INDIRI4 +ADDRLP4 36 +INDIRI4 +LTI4 $1387 +LABELV $1389 +line 2803 +;2803: { +line 2804 +;2804: return; +ADDRGP4 $1385 +JUMPV +LABELV $1387 +line 2808 +;2805: } +;2806: +;2807: // Don't do clashes for things that are behind us +;2808: VectorSubtract( g_saberFlashPos, cg.refdef.vieworg, dif ); +ADDRLP4 0 +ADDRGP4 g_saberFlashPos +INDIRF4 +ADDRGP4 cg+3616+24 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+4 +ADDRGP4 g_saberFlashPos+4 +INDIRF4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+8 +ADDRGP4 g_saberFlashPos+8 +INDIRF4 +ADDRGP4 cg+3616+24+8 +INDIRF4 +SUBF4 +ASGNF4 +line 2810 +;2809: +;2810: if ( DotProduct( dif, cg.refdef.viewaxis[0] ) < 0.2 ) +ADDRLP4 0 +INDIRF4 +ADDRGP4 cg+3616+36 +INDIRF4 +MULF4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 cg+3616+36+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 cg+3616+36+8 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 1045220557 +GEF4 $1402 +line 2811 +;2811: { +line 2812 +;2812: return; +ADDRGP4 $1385 +JUMPV +LABELV $1402 +line 2815 +;2813: } +;2814: +;2815: CG_Trace( &tr, cg.refdef.vieworg, NULL, NULL, g_saberFlashPos, -1, CONTENTS_SOLID ); +ADDRLP4 48 +ARGP4 +ADDRGP4 cg+3616+24 +ARGP4 +ADDRLP4 1132 +CNSTP4 0 +ASGNP4 +ADDRLP4 1132 +INDIRP4 +ARGP4 +ADDRLP4 1132 +INDIRP4 +ARGP4 +ADDRGP4 g_saberFlashPos +ARGP4 +CNSTI4 -1 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 2817 +;2816: +;2817: if ( tr.fraction < 1.0f ) +ADDRLP4 48+8 +INDIRF4 +CNSTF4 1065353216 +GEF4 $1416 +line 2818 +;2818: { +line 2819 +;2819: return; +ADDRGP4 $1385 +JUMPV +LABELV $1416 +line 2822 +;2820: } +;2821: +;2822: len = VectorNormalize( dif ); +ADDRLP4 0 +ARGP4 +ADDRLP4 1136 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 32 +ADDRLP4 1136 +INDIRF4 +ASGNF4 +line 2825 +;2823: +;2824: // clamp to a known range +;2825: if ( len > 800 ) +ADDRLP4 32 +INDIRF4 +CNSTF4 1145569280 +LEF4 $1419 +line 2826 +;2826: { +line 2827 +;2827: len = 800; +ADDRLP4 32 +CNSTF4 1145569280 +ASGNF4 +line 2828 +;2828: } +LABELV $1419 +line 2830 +;2829: +;2830: v = ( 1.0f - ((float)t / maxTime )) * ((1.0f - ( len / 800.0f )) * 2.0f + 0.35f); +ADDRLP4 1140 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 12 +ADDRLP4 1140 +INDIRF4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +CNSTF4 1073741824 +ADDRLP4 1140 +INDIRF4 +ADDRLP4 32 +INDIRF4 +CNSTF4 1145569280 +DIVF4 +SUBF4 +MULF4 +CNSTF4 1051931443 +ADDF4 +MULF4 +ASGNF4 +line 2832 +;2831: +;2832: CG_WorldCoordToScreenCoord( g_saberFlashPos, &x, &y ); +ADDRGP4 g_saberFlashPos +ARGP4 +ADDRLP4 40 +ARGP4 +ADDRLP4 44 +ARGP4 +ADDRGP4 CG_WorldCoordToScreenCoord +CALLI4 +pop +line 2834 +;2833: +;2834: VectorSet( color, 0.8f, 0.8f, 0.8f ); +ADDRLP4 1144 +CNSTF4 1061997773 +ASGNF4 +ADDRLP4 20 +ADDRLP4 1144 +INDIRF4 +ASGNF4 +ADDRLP4 20+4 +ADDRLP4 1144 +INDIRF4 +ASGNF4 +ADDRLP4 20+8 +CNSTF4 1061997773 +ASGNF4 +line 2835 +;2835: trap_R_SetColor( color ); +ADDRLP4 20 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 2837 +;2836: +;2837: CG_DrawPic( x - ( v * 300 ), y - ( v * 300 ), +ADDRGP4 $1423 +ARGP4 +ADDRLP4 1148 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 1156 +CNSTF4 1133903872 +ADDRLP4 12 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 40 +INDIRI4 +CVIF4 4 +ADDRLP4 1156 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 44 +INDIRI4 +CVIF4 4 +ADDRLP4 1156 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 1160 +CNSTF4 1142292480 +ADDRLP4 12 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 1160 +INDIRF4 +ARGF4 +ADDRLP4 1160 +INDIRF4 +ARGF4 +ADDRLP4 1148 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 2840 +;2838: v * 600, v * 600, +;2839: trap_R_RegisterShader( "gfx/effects/saberFlare" )); +;2840:} +LABELV $1385 +endproc CG_SaberClashFlare 1164 28 +proc CG_DrawHolocronIcons 28 20 +line 2845 +;2841: +;2842://-------------------------------------------------------------- +;2843:static void CG_DrawHolocronIcons(void) +;2844://-------------------------------------------------------------- +;2845:{ +line 2846 +;2846: int icon_size = 40; +ADDRLP4 8 +CNSTI4 40 +ASGNI4 +line 2847 +;2847: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 2848 +;2848: int startx = 10; +ADDRLP4 12 +CNSTI4 10 +ASGNI4 +line 2849 +;2849: int starty = 10;//SCREEN_HEIGHT - icon_size*3; +ADDRLP4 4 +CNSTI4 10 +ASGNI4 +line 2851 +;2850: +;2851: int endx = icon_size; +ADDRLP4 16 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 2852 +;2852: int endy = icon_size; +ADDRLP4 20 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 2854 +;2853: +;2854: if (cg.snap->ps.zoomMode) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1376 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1425 +line 2855 +;2855: { //don't display over zoom mask +line 2856 +;2856: return; +ADDRGP4 $1424 +JUMPV +LABELV $1425 +line 2859 +;2857: } +;2858: +;2859: if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) +CNSTI4 788 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1434 +line 2860 +;2860: { +line 2861 +;2861: return; +ADDRGP4 $1424 +JUMPV +LABELV $1433 +line 2865 +;2862: } +;2863: +;2864: while (i < NUM_FORCE_POWERS) +;2865: { +line 2866 +;2866: if (cg.snap->ps.holocronBits & (1 << forcePowerSorted[i])) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 768 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $1436 +line 2867 +;2867: { +line 2868 +;2868: CG_DrawPic( startx, starty, endx, endy, cgs.media.forcePowerIcons[forcePowerSorted[i]]); +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 24 +INDIRI4 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +LSHI4 +ADDRGP4 cgs+70296+1084 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 2869 +;2869: starty += (icon_size+2); //+2 for spacing +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +ADDI4 +ADDI4 +ASGNI4 +line 2870 +;2870: if ((starty+icon_size) >= SCREEN_HEIGHT-80) +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDI4 +CNSTI4 400 +LTI4 $1441 +line 2871 +;2871: { +line 2872 +;2872: starty = 10;//SCREEN_HEIGHT - icon_size*3; +ADDRLP4 4 +CNSTI4 10 +ASGNI4 +line 2873 +;2873: startx += (icon_size+2); +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +ADDI4 +ADDI4 +ASGNI4 +line 2874 +;2874: } +LABELV $1441 +line 2875 +;2875: } +LABELV $1436 +line 2877 +;2876: +;2877: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2878 +;2878: } +LABELV $1434 +line 2864 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $1433 +line 2879 +;2879:} +LABELV $1424 +endproc CG_DrawHolocronIcons 28 20 +proc CG_IsDurationPower 4 0 +line 2882 +;2880: +;2881:static qboolean CG_IsDurationPower(int power) +;2882:{ +line 2883 +;2883: if (power == FP_HEAL || +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $1451 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +EQI4 $1451 +ADDRLP4 0 +INDIRI4 +CNSTI4 5 +EQI4 $1451 +ADDRLP4 0 +INDIRI4 +CNSTI4 8 +EQI4 $1451 +ADDRLP4 0 +INDIRI4 +CNSTI4 9 +EQI4 $1451 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +EQI4 $1451 +ADDRLP4 0 +INDIRI4 +CNSTI4 14 +NEI4 $1444 +LABELV $1451 +line 2890 +;2884: power == FP_SPEED || +;2885: power == FP_TELEPATHY || +;2886: power == FP_RAGE || +;2887: power == FP_PROTECT || +;2888: power == FP_ABSORB || +;2889: power == FP_SEE) +;2890: { +line 2891 +;2891: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1443 +JUMPV +LABELV $1444 +line 2894 +;2892: } +;2893: +;2894: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1443 +endproc CG_IsDurationPower 4 0 +proc CG_DrawActivePowers 36 20 +line 2900 +;2895:} +;2896: +;2897://-------------------------------------------------------------- +;2898:static void CG_DrawActivePowers(void) +;2899://-------------------------------------------------------------- +;2900:{ +line 2901 +;2901: int icon_size = 40; +ADDRLP4 4 +CNSTI4 40 +ASGNI4 +line 2902 +;2902: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 2903 +;2903: int startx = icon_size*2+16; +ADDRLP4 8 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +LSHI4 +CNSTI4 16 +ADDI4 +ASGNI4 +line 2904 +;2904: int starty = SCREEN_HEIGHT - icon_size*2; +ADDRLP4 12 +CNSTI4 480 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +LSHI4 +SUBI4 +ASGNI4 +line 2906 +;2905: +;2906: int endx = icon_size; +ADDRLP4 16 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 2907 +;2907: int endy = icon_size; +ADDRLP4 20 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 2909 +;2908: +;2909: if (cg.snap->ps.zoomMode) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1376 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1453 +line 2910 +;2910: { //don't display over zoom mask +line 2911 +;2911: return; +ADDRGP4 $1452 +JUMPV +LABELV $1453 +line 2914 +;2912: } +;2913: +;2914: if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) +CNSTI4 788 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1462 +line 2915 +;2915: { +line 2916 +;2916: return; +ADDRGP4 $1452 +JUMPV +LABELV $1461 +line 2920 +;2917: } +;2918: +;2919: while (i < NUM_FORCE_POWERS) +;2920: { +line 2921 +;2921: if ((cg.snap->ps.fd.forcePowersActive & (1 << forcePowerSorted[i])) && +ADDRLP4 24 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 892 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 24 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $1464 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 CG_IsDurationPower +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +EQI4 $1464 +line 2923 +;2922: CG_IsDurationPower(forcePowerSorted[i])) +;2923: { +line 2924 +;2924: CG_DrawPic( startx, starty, endx, endy, cgs.media.forcePowerIcons[forcePowerSorted[i]]); +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 32 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 32 +INDIRI4 +LSHI4 +ADDRGP4 forcePowerSorted +ADDP4 +INDIRI4 +ADDRLP4 32 +INDIRI4 +LSHI4 +ADDRGP4 cgs+70296+1084 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 2925 +;2925: startx += (icon_size+2); //+2 for spacing +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +ADDI4 +ADDI4 +ASGNI4 +line 2926 +;2926: if ((startx+icon_size) >= SCREEN_WIDTH-80) +ADDRLP4 8 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +CNSTI4 560 +LTI4 $1469 +line 2927 +;2927: { +line 2928 +;2928: startx = icon_size*2+16; +ADDRLP4 8 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +LSHI4 +CNSTI4 16 +ADDI4 +ASGNI4 +line 2929 +;2929: starty += (icon_size+2); +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +ADDI4 +ADDI4 +ASGNI4 +line 2930 +;2930: } +LABELV $1469 +line 2931 +;2931: } +LABELV $1464 +line 2933 +;2932: +;2933: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2934 +;2934: } +LABELV $1462 +line 2919 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $1461 +line 2937 +;2935: +;2936: //additionally, draw an icon force force rage recovery +;2937: if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1216 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $1471 +line 2938 +;2938: { +line 2939 +;2939: CG_DrawPic( startx, starty, endx, endy, cgs.media.rageRecShader); +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 cgs+70296+1156 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 2940 +;2940: } +LABELV $1471 +line 2941 +;2941:} +LABELV $1452 +endproc CG_DrawActivePowers 36 20 +data +align 4 +LABELV $1478 +byte 4 0 +lit +align 4 +LABELV $1479 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +code +proc CG_DrawRocketLocking 88 24 +line 2946 +;2942: +;2943://-------------------------------------------------------------- +;2944:static void CG_DrawRocketLocking( int lockEntNum, int lockTime ) +;2945://-------------------------------------------------------------- +;2946:{ +line 2950 +;2947: int cx, cy; +;2948: vec3_t org; +;2949: static int oldDif = 0; +;2950: centity_t *cent = &cg_entities[lockEntNum]; +ADDRLP4 32 +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 2951 +;2951: vec4_t color={0.0f,0.0f,0.0f,0.0f}; +ADDRLP4 0 +ADDRGP4 $1479 +INDIRB +ASGNB 16 +line 2952 +;2952: int dif = ( cg.time - cg.snap->ps.rocketLockTime ) / ( 1200.0f / /*8.0f*/16.0f ); +ADDRLP4 20 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 632 +ADDP4 +INDIRF4 +SUBF4 +CNSTF4 1117126656 +DIVF4 +CVFI4 4 +ASGNI4 +line 2955 +;2953: int i; +;2954: +;2955: if (!cg.snap->ps.rocketLockTime) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 632 +ADDP4 +INDIRF4 +CNSTF4 0 +NEF4 $1482 +line 2956 +;2956: { +line 2957 +;2957: return; +ADDRGP4 $1477 +JUMPV +LABELV $1482 +line 2960 +;2958: } +;2959: +;2960: if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) +CNSTI4 788 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1485 +line 2961 +;2961: { +line 2962 +;2962: return; +ADDRGP4 $1477 +JUMPV +LABELV $1485 +line 2967 +;2963: } +;2964: +;2965: //We can't check to see in pmove if players are on the same team, so we resort +;2966: //to just not drawing the lock if a teammate is the locked on ent +;2967: if (cg.snap->ps.rocketLockIndex >= 0 && +ADDRLP4 48 +CNSTI4 624 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 0 +LTI4 $1490 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 32 +GEI4 $1490 +line 2969 +;2968: cg.snap->ps.rocketLockIndex < MAX_CLIENTS) +;2969: { +line 2970 +;2970: if (cgs.clientinfo[cg.snap->ps.rocketLockIndex].team == cgs.clientinfo[cg.snap->ps.clientNum].team) +ADDRLP4 52 +CNSTI4 788 +ASGNI4 +ADDRLP4 52 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 624 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +ADDRLP4 52 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +NEI4 $1494 +line 2971 +;2971: { +line 2972 +;2972: if (cgs.gametype >= GT_TEAM) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $1502 +line 2973 +;2973: { +line 2974 +;2974: return; +ADDRGP4 $1477 +JUMPV +LABELV $1502 +line 2976 +;2975: } +;2976: } +LABELV $1494 +line 2977 +;2977: } +LABELV $1490 +line 2979 +;2978: +;2979: if (cg.snap->ps.rocketLockTime != -1) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 632 +ADDP4 +INDIRF4 +CNSTF4 3212836864 +EQF4 $1505 +line 2980 +;2980: { +line 2981 +;2981: lastvalidlockdif = dif; +ADDRGP4 lastvalidlockdif +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 2982 +;2982: } +ADDRGP4 $1506 +JUMPV +LABELV $1505 +line 2984 +;2983: else +;2984: { +line 2985 +;2985: dif = lastvalidlockdif; +ADDRLP4 20 +ADDRGP4 lastvalidlockdif +INDIRI4 +ASGNI4 +line 2986 +;2986: } +LABELV $1506 +line 2988 +;2987: +;2988: if ( !cent ) +ADDRLP4 32 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1508 +line 2989 +;2989: { +line 2990 +;2990: return; +ADDRGP4 $1477 +JUMPV +LABELV $1508 +line 2993 +;2991: } +;2992: +;2993: VectorCopy( cent->lerpOrigin, org ); +ADDRLP4 36 +ADDRLP4 32 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 2995 +;2994: +;2995: if ( CG_WorldCoordToScreenCoord( org, &cx, &cy )) +ADDRLP4 36 +ARGP4 +ADDRLP4 28 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 52 +ADDRGP4 CG_WorldCoordToScreenCoord +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +EQI4 $1510 +line 2996 +;2996: { +line 2998 +;2997: // we care about distance from enemy to eye, so this is good enough +;2998: float sz = Distance( cent->lerpOrigin, cg.refdef.vieworg ) / 1024.0f; +ADDRLP4 32 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+3616+24 +ARGP4 +ADDRLP4 60 +ADDRGP4 Distance +CALLF4 +ASGNF4 +ADDRLP4 56 +ADDRLP4 60 +INDIRF4 +CNSTF4 1149239296 +DIVF4 +ASGNF4 +line 3000 +;2999: +;3000: if ( sz > 1.0f ) +ADDRLP4 56 +INDIRF4 +CNSTF4 1065353216 +LEF4 $1514 +line 3001 +;3001: { +line 3002 +;3002: sz = 1.0f; +ADDRLP4 56 +CNSTF4 1065353216 +ASGNF4 +line 3003 +;3003: } +ADDRGP4 $1515 +JUMPV +LABELV $1514 +line 3004 +;3004: else if ( sz < 0.0f ) +ADDRLP4 56 +INDIRF4 +CNSTF4 0 +GEF4 $1516 +line 3005 +;3005: { +line 3006 +;3006: sz = 0.0f; +ADDRLP4 56 +CNSTF4 0 +ASGNF4 +line 3007 +;3007: } +LABELV $1516 +LABELV $1515 +line 3009 +;3008: +;3009: sz = (1.0f - sz) * (1.0f - sz) * 32 + 6; +ADDRLP4 64 +CNSTF4 1065353216 +ADDRLP4 56 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 56 +CNSTF4 1107296256 +ADDRLP4 64 +INDIRF4 +ADDRLP4 64 +INDIRF4 +MULF4 +MULF4 +CNSTF4 1086324736 +ADDF4 +ASGNF4 +line 3011 +;3010: +;3011: cy += sz * 0.5f; +ADDRLP4 24 +ADDRLP4 24 +INDIRI4 +CVIF4 4 +CNSTF4 1056964608 +ADDRLP4 56 +INDIRF4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 3013 +;3012: +;3013: if ( dif < 0 ) +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +GEI4 $1518 +line 3014 +;3014: { +line 3015 +;3015: oldDif = 0; +ADDRGP4 $1478 +CNSTI4 0 +ASGNI4 +line 3016 +;3016: return; +ADDRGP4 $1477 +JUMPV +LABELV $1518 +line 3018 +;3017: } +;3018: else if ( dif > 8 ) +ADDRLP4 20 +INDIRI4 +CNSTI4 8 +LEI4 $1520 +line 3019 +;3019: { +line 3020 +;3020: dif = 8; +ADDRLP4 20 +CNSTI4 8 +ASGNI4 +line 3021 +;3021: } +LABELV $1520 +line 3024 +;3022: +;3023: // do sounds +;3024: if ( oldDif != dif ) +ADDRGP4 $1478 +INDIRI4 +ADDRLP4 20 +INDIRI4 +EQI4 $1522 +line 3025 +;3025: { +line 3026 +;3026: if ( dif == 8 ) +ADDRLP4 20 +INDIRI4 +CNSTI4 8 +NEI4 $1524 +line 3027 +;3027: { +line 3028 +;3028: trap_S_StartSound( org, 0, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/rocket/lock.wav" )); +ADDRGP4 $1526 +ARGP4 +ADDRLP4 68 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 36 +ARGP4 +ADDRLP4 72 +CNSTI4 0 +ASGNI4 +ADDRLP4 72 +INDIRI4 +ARGI4 +ADDRLP4 72 +INDIRI4 +ARGI4 +ADDRLP4 68 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 3029 +;3029: } +ADDRGP4 $1525 +JUMPV +LABELV $1524 +line 3031 +;3030: else +;3031: { +line 3032 +;3032: trap_S_StartSound( org, 0, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/rocket/tick.wav" )); +ADDRGP4 $1527 +ARGP4 +ADDRLP4 68 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 36 +ARGP4 +ADDRLP4 72 +CNSTI4 0 +ASGNI4 +ADDRLP4 72 +INDIRI4 +ARGI4 +ADDRLP4 72 +INDIRI4 +ARGI4 +ADDRLP4 68 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 3033 +;3033: } +LABELV $1525 +line 3034 +;3034: } +LABELV $1522 +line 3036 +;3035: +;3036: oldDif = dif; +ADDRGP4 $1478 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 3038 +;3037: +;3038: for ( i = 0; i < dif; i++ ) +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1531 +JUMPV +LABELV $1528 +line 3039 +;3039: { +line 3040 +;3040: color[0] = 1.0f; +ADDRLP4 0 +CNSTF4 1065353216 +ASGNF4 +line 3041 +;3041: color[1] = 0.0f; +ADDRLP4 0+4 +CNSTF4 0 +ASGNF4 +line 3042 +;3042: color[2] = 0.0f; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 3043 +;3043: color[3] = 0.1f * i + 0.2f; +ADDRLP4 0+12 +CNSTF4 1036831949 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +MULF4 +CNSTF4 1045220557 +ADDF4 +ASGNF4 +line 3045 +;3044: +;3045: trap_R_SetColor( color ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 3048 +;3046: +;3047: // our slices are offset by about 45 degrees. +;3048: CG_DrawRotatePic( cx - sz, cy - sz, sz, sz, i * 45.0f, trap_R_RegisterShaderNoMip( "gfx/2d/wedge" )); +ADDRGP4 $1535 +ARGP4 +ADDRLP4 68 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ADDRLP4 56 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 24 +INDIRI4 +CVIF4 4 +ADDRLP4 56 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +CNSTF4 1110704128 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 68 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawRotatePic +CALLV +pop +line 3049 +;3049: } +LABELV $1529 +line 3038 +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1531 +ADDRLP4 16 +INDIRI4 +ADDRLP4 20 +INDIRI4 +LTI4 $1528 +line 3052 +;3050: +;3051: // we are locked and loaded baby +;3052: if ( dif == 8 ) +ADDRLP4 20 +INDIRI4 +CNSTI4 8 +NEI4 $1536 +line 3053 +;3053: { +line 3054 +;3054: color[0] = color[1] = color[2] = sin( cg.time * 0.05f ) * 0.5f + 0.5f; +CNSTF4 1028443341 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 68 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 72 +CNSTF4 1056964608 +ADDRLP4 68 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 72 +INDIRF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 72 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 72 +INDIRF4 +ASGNF4 +line 3055 +;3055: color[3] = 1.0f; // this art is additive, so the alpha value does nothing +ADDRLP4 0+12 +CNSTF4 1065353216 +ASGNF4 +line 3057 +;3056: +;3057: trap_R_SetColor( color ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 3059 +;3058: +;3059: CG_DrawPic( cx - sz, cy - sz * 2, sz * 2, sz * 2, trap_R_RegisterShaderNoMip( "gfx/2d/lock" )); +ADDRGP4 $1542 +ARGP4 +ADDRLP4 76 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ADDRLP4 56 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 84 +CNSTF4 1073741824 +ADDRLP4 56 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 24 +INDIRI4 +CVIF4 4 +ADDRLP4 84 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 84 +INDIRF4 +ARGF4 +ADDRLP4 84 +INDIRF4 +ARGF4 +ADDRLP4 76 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 3060 +;3060: } +LABELV $1536 +line 3061 +;3061: } +LABELV $1510 +line 3062 +;3062:} +LABELV $1477 +endproc CG_DrawRocketLocking 88 24 +proc CG_ScanForCrosshairEntity 1156 28 +line 3069 +;3063: +;3064:/* +;3065:================= +;3066:CG_ScanForCrosshairEntity +;3067:================= +;3068:*/ +;3069:static void CG_ScanForCrosshairEntity( void ) { +line 3074 +;3070: trace_t trace; +;3071: vec3_t start, end; +;3072: int content; +;3073: +;3074: if ( cg_dynamicCrosshair.integer ) +ADDRGP4 cg_dynamicCrosshair+12 +INDIRI4 +CNSTI4 0 +EQI4 $1544 +line 3075 +;3075: { +line 3089 +;3076: vec3_t d_f, d_rt, d_up; +;3077: /* +;3078: if ( cg.snap->ps.weapon == WP_NONE || +;3079: cg.snap->ps.weapon == WP_SABER || +;3080: cg.snap->ps.weapon == WP_STUN_BATON) +;3081: { +;3082: VectorCopy( cg.refdef.vieworg, start ); +;3083: AngleVectors( cg.refdefViewAngles, d_f, d_rt, d_up ); +;3084: } +;3085: else +;3086: */ +;3087: //For now we still want to draw the crosshair in relation to the player's world coordinates +;3088: //even if we have a melee weapon/no weapon. +;3089: { +line 3090 +;3090: if (cg.snap && cg.snap->ps.weapon == WP_EMPLACED_GUN && cg.snap->ps.emplacedIndex) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1547 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $1547 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1547 +line 3091 +;3091: { +line 3094 +;3092: vec3_t pitchConstraint; +;3093: +;3094: VectorCopy(cg.refdefViewAngles, pitchConstraint); +ADDRLP4 1144 +ADDRGP4 cg+3984 +INDIRB +ASGNB 12 +line 3096 +;3095: +;3096: if (cg.renderingThirdPerson) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +EQI4 $1553 +line 3097 +;3097: { +line 3098 +;3098: VectorCopy(cg.predictedPlayerState.viewangles, pitchConstraint); +ADDRLP4 1144 +ADDRGP4 cg+96+156 +INDIRB +ASGNB 12 +line 3099 +;3099: } +ADDRGP4 $1554 +JUMPV +LABELV $1553 +line 3101 +;3100: else +;3101: { +line 3102 +;3102: VectorCopy(cg.refdefViewAngles, pitchConstraint); +ADDRLP4 1144 +ADDRGP4 cg+3984 +INDIRB +ASGNB 12 +line 3103 +;3103: } +LABELV $1554 +line 3105 +;3104: +;3105: if (pitchConstraint[PITCH] > 40) +ADDRLP4 1144 +INDIRF4 +CNSTF4 1109393408 +LEF4 $1559 +line 3106 +;3106: { +line 3107 +;3107: pitchConstraint[PITCH] = 40; +ADDRLP4 1144 +CNSTF4 1109393408 +ASGNF4 +line 3108 +;3108: } +LABELV $1559 +line 3110 +;3109: +;3110: AngleVectors( pitchConstraint, d_f, d_rt, d_up ); +ADDRLP4 1144 +ARGP4 +ADDRLP4 1108 +ARGP4 +ADDRLP4 1120 +ARGP4 +ADDRLP4 1132 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 3111 +;3111: } +ADDRGP4 $1548 +JUMPV +LABELV $1547 +line 3113 +;3112: else +;3113: { +line 3116 +;3114: vec3_t pitchConstraint; +;3115: +;3116: if (cg.renderingThirdPerson) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +EQI4 $1561 +line 3117 +;3117: { +line 3118 +;3118: VectorCopy(cg.predictedPlayerState.viewangles, pitchConstraint); +ADDRLP4 1144 +ADDRGP4 cg+96+156 +INDIRB +ASGNB 12 +line 3119 +;3119: } +ADDRGP4 $1562 +JUMPV +LABELV $1561 +line 3121 +;3120: else +;3121: { +line 3122 +;3122: VectorCopy(cg.refdefViewAngles, pitchConstraint); +ADDRLP4 1144 +ADDRGP4 cg+3984 +INDIRB +ASGNB 12 +line 3123 +;3123: } +LABELV $1562 +line 3125 +;3124: +;3125: AngleVectors( pitchConstraint, d_f, d_rt, d_up ); +ADDRLP4 1144 +ARGP4 +ADDRLP4 1108 +ARGP4 +ADDRLP4 1120 +ARGP4 +ADDRLP4 1132 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 3126 +;3126: } +LABELV $1548 +line 3127 +;3127: CG_CalcMuzzlePoint(cg.snap->ps.clientNum, start); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1080 +ARGP4 +ADDRGP4 CG_CalcMuzzlePoint +CALLI4 +pop +line 3128 +;3128: } +line 3131 +;3129: +;3130: //FIXME: increase this? Increase when zoom in? +;3131: VectorMA( start, 4096, d_f, end );//was 8192 +ADDRLP4 1144 +CNSTF4 1166016512 +ASGNF4 +ADDRLP4 1092 +ADDRLP4 1080 +INDIRF4 +ADDRLP4 1144 +INDIRF4 +ADDRLP4 1108 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1092+4 +ADDRLP4 1080+4 +INDIRF4 +ADDRLP4 1144 +INDIRF4 +ADDRLP4 1108+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1092+8 +ADDRLP4 1080+8 +INDIRF4 +CNSTF4 1166016512 +ADDRLP4 1108+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3132 +;3132: } +ADDRGP4 $1545 +JUMPV +LABELV $1544 +line 3134 +;3133: else +;3134: { +line 3135 +;3135: VectorCopy( cg.refdef.vieworg, start ); +ADDRLP4 1080 +ADDRGP4 cg+3616+24 +INDIRB +ASGNB 12 +line 3136 +;3136: VectorMA( start, 131072, cg.refdef.viewaxis[0], end ); +ADDRLP4 1108 +CNSTF4 1207959552 +ASGNF4 +ADDRLP4 1092 +ADDRLP4 1080 +INDIRF4 +ADDRLP4 1108 +INDIRF4 +ADDRGP4 cg+3616+36 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1092+4 +ADDRLP4 1080+4 +INDIRF4 +ADDRLP4 1108 +INDIRF4 +ADDRGP4 cg+3616+36+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1092+8 +ADDRLP4 1080+8 +INDIRF4 +CNSTF4 1207959552 +ADDRGP4 cg+3616+36+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3137 +;3137: } +LABELV $1545 +line 3139 +;3138: +;3139: CG_Trace( &trace, start, vec3_origin, vec3_origin, end, +ADDRLP4 0 +ARGP4 +ADDRLP4 1080 +ARGP4 +ADDRLP4 1108 +ADDRGP4 vec3_origin +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ARGP4 +ADDRLP4 1108 +INDIRP4 +ARGP4 +ADDRLP4 1092 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 257 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 3142 +;3140: cg.snap->ps.clientNum, CONTENTS_SOLID|CONTENTS_BODY ); +;3141: +;3142: if (trace.entityNum < MAX_CLIENTS) +ADDRLP4 0+52 +INDIRI4 +CNSTI4 32 +GEI4 $1589 +line 3143 +;3143: { +line 3144 +;3144: if (CG_IsMindTricked(cg_entities[trace.entityNum].currentState.trickedentindex, +ADDRLP4 1112 +CNSTI4 1920 +ASGNI4 +ADDRLP4 1112 +INDIRI4 +ADDRLP4 0+52 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+148 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1112 +INDIRI4 +ADDRLP4 0+52 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+152 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1112 +INDIRI4 +ADDRLP4 0+52 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+156 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1112 +INDIRI4 +ADDRLP4 0+52 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+160 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1116 +ADDRGP4 CG_IsMindTricked +CALLI4 +ASGNI4 +ADDRLP4 1116 +INDIRI4 +CNSTI4 0 +EQI4 $1592 +line 3149 +;3145: cg_entities[trace.entityNum].currentState.trickedentindex2, +;3146: cg_entities[trace.entityNum].currentState.trickedentindex3, +;3147: cg_entities[trace.entityNum].currentState.trickedentindex4, +;3148: cg.snap->ps.clientNum)) +;3149: { +line 3150 +;3150: if (cg.crosshairClientNum == trace.entityNum) +ADDRGP4 cg+13096 +INDIRI4 +ADDRLP4 0+52 +INDIRI4 +NEI4 $1603 +line 3151 +;3151: { +line 3152 +;3152: cg.crosshairClientNum = ENTITYNUM_NONE; +ADDRGP4 cg+13096 +CNSTI4 1023 +ASGNI4 +line 3153 +;3153: cg.crosshairClientTime = 0; +ADDRGP4 cg+13100 +CNSTI4 0 +ASGNI4 +line 3154 +;3154: } +LABELV $1603 +line 3156 +;3155: +;3156: CG_DrawCrosshair(trace.endpos, 0); +ADDRLP4 0+12 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawCrosshair +CALLV +pop +line 3158 +;3157: +;3158: return; //this entity is mind-tricking the current client, so don't render it +ADDRGP4 $1543 +JUMPV +LABELV $1592 +line 3160 +;3159: } +;3160: } +LABELV $1589 +line 3162 +;3161: +;3162: if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $1610 +line 3163 +;3163: { +line 3164 +;3164: if (trace.entityNum < /*MAX_CLIENTS*/ENTITYNUM_WORLD) +ADDRLP4 0+52 +INDIRI4 +CNSTI4 1022 +GEI4 $1613 +line 3165 +;3165: { +line 3166 +;3166: CG_DrawCrosshair(trace.endpos, 1); +ADDRLP4 0+12 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_DrawCrosshair +CALLV +pop +line 3167 +;3167: } +ADDRGP4 $1614 +JUMPV +LABELV $1613 +line 3169 +;3168: else +;3169: { +line 3170 +;3170: CG_DrawCrosshair(trace.endpos, 0); +ADDRLP4 0+12 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawCrosshair +CALLV +pop +line 3171 +;3171: } +LABELV $1614 +line 3172 +;3172: } +LABELV $1610 +line 3179 +;3173: +;3174:// if ( trace.entityNum >= MAX_CLIENTS ) { +;3175:// return; +;3176:// } +;3177: +;3178: // if the player is in fog, don't show it +;3179: content = trap_CM_PointContents( trace.endpos, 0 ); +ADDRLP4 0+12 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1112 +ADDRGP4 trap_CM_PointContents +CALLI4 +ASGNI4 +ADDRLP4 1104 +ADDRLP4 1112 +INDIRI4 +ASGNI4 +line 3180 +;3180: if ( content & CONTENTS_FOG ) { +ADDRLP4 1104 +INDIRI4 +CNSTI4 8 +BANDI4 +CNSTI4 0 +EQI4 $1619 +line 3181 +;3181: return; +ADDRGP4 $1543 +JUMPV +LABELV $1619 +line 3184 +;3182: } +;3183: +;3184: if ( trace.entityNum >= MAX_CLIENTS ) { +ADDRLP4 0+52 +INDIRI4 +CNSTI4 32 +LTI4 $1621 +line 3185 +;3185: cg.crosshairClientNum = trace.entityNum; +ADDRGP4 cg+13096 +ADDRLP4 0+52 +INDIRI4 +ASGNI4 +line 3186 +;3186: cg.crosshairClientTime = cg.time; +ADDRGP4 cg+13100 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3187 +;3187: return; +ADDRGP4 $1543 +JUMPV +LABELV $1621 +line 3191 +;3188: } +;3189: +;3190: // update the fade timer +;3191: cg.crosshairClientNum = trace.entityNum; +ADDRGP4 cg+13096 +ADDRLP4 0+52 +INDIRI4 +ASGNI4 +line 3192 +;3192: cg.crosshairClientTime = cg.time; +ADDRGP4 cg+13100 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3193 +;3193:} +LABELV $1543 +endproc CG_ScanForCrosshairEntity 1156 28 +proc CG_DrawCrosshairNames 32 20 +line 3201 +;3194: +;3195: +;3196:/* +;3197:===================== +;3198:CG_DrawCrosshairNames +;3199:===================== +;3200:*/ +;3201:static void CG_DrawCrosshairNames( void ) { +line 3207 +;3202: float *color; +;3203: vec4_t tcolor; +;3204: char *name; +;3205: int baseColor; +;3206: +;3207: if ( !cg_drawCrosshair.integer ) { +ADDRGP4 cg_drawCrosshair+12 +INDIRI4 +CNSTI4 0 +NEI4 $1633 +line 3208 +;3208: return; +ADDRGP4 $1632 +JUMPV +LABELV $1633 +line 3212 +;3209: } +;3210: +;3211: // scan the known entities to see if the crosshair is sighted on one +;3212: CG_ScanForCrosshairEntity(); +ADDRGP4 CG_ScanForCrosshairEntity +CALLV +pop +line 3214 +;3213: +;3214: if ( !cg_drawCrosshairNames.integer ) { +ADDRGP4 cg_drawCrosshairNames+12 +INDIRI4 +CNSTI4 0 +NEI4 $1636 +line 3215 +;3215: return; +ADDRGP4 $1632 +JUMPV +LABELV $1636 +line 3219 +;3216: } +;3217: //rww - still do the trace, our dynamic crosshair depends on it +;3218: +;3219: if (cg.crosshairClientNum >= MAX_CLIENTS) +ADDRGP4 cg+13096 +INDIRI4 +CNSTI4 32 +LTI4 $1639 +line 3220 +;3220: { +line 3221 +;3221: return; +ADDRGP4 $1632 +JUMPV +LABELV $1639 +line 3225 +;3222: } +;3223: +;3224: // draw the name of the player being looked at +;3225: color = CG_FadeColor( cg.crosshairClientTime, 1000 ); +ADDRGP4 cg+13100 +INDIRI4 +ARGI4 +CNSTI4 1000 +ARGI4 +ADDRLP4 28 +ADDRGP4 CG_FadeColor +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 28 +INDIRP4 +ASGNP4 +line 3226 +;3226: if ( !color ) { +ADDRLP4 20 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1643 +line 3227 +;3227: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 3228 +;3228: return; +ADDRGP4 $1632 +JUMPV +LABELV $1643 +line 3231 +;3229: } +;3230: +;3231: name = cgs.clientinfo[ cg.crosshairClientNum ].name; +ADDRLP4 24 +CNSTI4 788 +ADDRGP4 cg+13096 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+4 +ADDP4 +ASGNP4 +line 3233 +;3232: +;3233: if (cgs.gametype >= GT_TEAM) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $1648 +line 3234 +;3234: { +line 3235 +;3235: if (cgs.clientinfo[cg.crosshairClientNum].team == TEAM_RED) +CNSTI4 788 +ADDRGP4 cg+13096 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1651 +line 3236 +;3236: { +line 3237 +;3237: baseColor = CT_RED; +ADDRLP4 16 +CNSTI4 2 +ASGNI4 +line 3238 +;3238: } +ADDRGP4 $1649 +JUMPV +LABELV $1651 +line 3240 +;3239: else +;3240: { +line 3241 +;3241: baseColor = CT_BLUE; +ADDRLP4 16 +CNSTI4 4 +ASGNI4 +line 3242 +;3242: } +line 3255 +;3243: +;3244: /* +;3245: //For now instead of team-based we'll make it oriented based on which team we're on +;3246: if (cgs.clientinfo[cg.crosshairClientNum].team == cgs.clientinfo[cg.snap->ps.clientNum].team) +;3247: { +;3248: baseColor = CT_GREEN; +;3249: } +;3250: else +;3251: { +;3252: baseColor = CT_RED; +;3253: } +;3254: */ +;3255: } +ADDRGP4 $1649 +JUMPV +LABELV $1648 +line 3257 +;3256: else +;3257: { +line 3259 +;3258: //baseColor = CT_WHITE; +;3259: baseColor = CT_RED; //just make it red in nonteam modes since everyone is hostile and crosshair will be red on them too +ADDRLP4 16 +CNSTI4 2 +ASGNI4 +line 3260 +;3260: } +LABELV $1649 +line 3262 +;3261: +;3262: if (cg.snap->ps.duelInProgress) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1348 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1656 +line 3263 +;3263: { +line 3264 +;3264: if (cg.crosshairClientNum != cg.snap->ps.duelIndex) +ADDRGP4 cg+13096 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +EQI4 $1657 +line 3265 +;3265: { //grey out crosshair for everyone but your foe if you're in a duel +line 3266 +;3266: baseColor = CT_BLACK; +ADDRLP4 16 +CNSTI4 1 +ASGNI4 +line 3267 +;3267: } +line 3268 +;3268: } +ADDRGP4 $1657 +JUMPV +LABELV $1656 +line 3269 +;3269: else if (cg_entities[cg.crosshairClientNum].currentState.bolt1) +CNSTI4 1920 +ADDRGP4 cg+13096 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+140 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1663 +line 3270 +;3270: { //this fellow is in a duel. We just checked if we were in a duel above, so +line 3272 +;3271: //this means we aren't and he is. Which of course means our crosshair greys out over him. +;3272: baseColor = CT_BLACK; +ADDRLP4 16 +CNSTI4 1 +ASGNI4 +line 3273 +;3273: } +LABELV $1663 +LABELV $1657 +line 3275 +;3274: +;3275: tcolor[0] = colorTable[baseColor][0]; +ADDRLP4 0 +ADDRLP4 16 +INDIRI4 +CNSTI4 4 +LSHI4 +ADDRGP4 colorTable +ADDP4 +INDIRF4 +ASGNF4 +line 3276 +;3276: tcolor[1] = colorTable[baseColor][1]; +ADDRLP4 0+4 +ADDRLP4 16 +INDIRI4 +CNSTI4 4 +LSHI4 +ADDRGP4 colorTable+4 +ADDP4 +INDIRF4 +ASGNF4 +line 3277 +;3277: tcolor[2] = colorTable[baseColor][2]; +ADDRLP4 0+8 +ADDRLP4 16 +INDIRI4 +CNSTI4 4 +LSHI4 +ADDRGP4 colorTable+8 +ADDP4 +INDIRF4 +ASGNF4 +line 3278 +;3278: tcolor[3] = color[3]*0.5f; +ADDRLP4 0+12 +CNSTF4 1056964608 +ADDRLP4 20 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3280 +;3279: +;3280: UI_DrawProportionalString(320, 170, name, UI_CENTER, tcolor); +CNSTI4 320 +ARGI4 +CNSTI4 170 +ARGI4 +ADDRLP4 24 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 3282 +;3281: +;3282: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 3283 +;3283:} +LABELV $1632 +endproc CG_DrawCrosshairNames 32 20 +proc CG_DrawSpectator 1080 36 +line 3294 +;3284: +;3285: +;3286://============================================================================== +;3287: +;3288:/* +;3289:================= +;3290:CG_DrawSpectator +;3291:================= +;3292:*/ +;3293:static void CG_DrawSpectator(void) +;3294:{ +line 3296 +;3295: const char* s; +;3296: s = CG_GetStripEdString("INGAMETEXT", "SPECTATOR"); +ADDRGP4 $903 +ARGP4 +ADDRGP4 $1673 +ARGP4 +ADDRLP4 4 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 3297 +;3297: if (cgs.gametype == GT_TOURNAMENT && +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $1674 +ADDRLP4 8 +CNSTI4 -1 +ASGNI4 +ADDRGP4 cgs+36340 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1674 +ADDRGP4 cgs+36344 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1674 +line 3300 +;3298: cgs.duelist1 != -1 && +;3299: cgs.duelist2 != -1) +;3300: { +line 3302 +;3301: char text[1024]; +;3302: int size = 64; +ADDRLP4 1036 +CNSTI4 64 +ASGNI4 +line 3304 +;3303: +;3304: Com_sprintf(text, sizeof(text), "%s %s %s", cgs.clientinfo[cgs.duelist1].name, CG_GetStripEdString("INGAMETEXT", "SPECHUD_VERSUS"), cgs.clientinfo[cgs.duelist2].name); +ADDRGP4 $903 +ARGP4 +ADDRGP4 $1683 +ARGP4 +ADDRLP4 1040 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 12 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $1679 +ARGP4 +ADDRLP4 1044 +CNSTI4 788 +ASGNI4 +ADDRLP4 1044 +INDIRI4 +ADDRGP4 cgs+36340 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+4 +ADDP4 +ARGP4 +ADDRLP4 1040 +INDIRP4 +ARGP4 +ADDRLP4 1044 +INDIRI4 +ADDRGP4 cgs+36344 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+4 +ADDP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 3305 +;3305: CG_Text_Paint ( 320 - CG_Text_Width ( text, 1.0f, 3 ) / 2, 420, 1.0f, colorWhite, text, 0, 0, 0, 3 ); +ADDRLP4 12 +ARGP4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 3 +ARGI4 +ADDRLP4 1048 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +CNSTI4 320 +ADDRLP4 1048 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1137836032 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 12 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 1052 +CNSTI4 0 +ASGNI4 +ADDRLP4 1052 +INDIRI4 +ARGI4 +ADDRLP4 1052 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 3308 +;3306: +;3307: +;3308: trap_R_SetColor( colorTable[CT_WHITE] ); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 3309 +;3309: if ( cgs.clientinfo[cgs.duelist1].modelIcon ) +CNSTI4 788 +ADDRGP4 cgs+36340 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+508 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1688 +line 3310 +;3310: { +line 3311 +;3311: CG_DrawPic( 10, SCREEN_HEIGHT-(size*1.5), size, size, cgs.clientinfo[cgs.duelist1].modelIcon ); +CNSTF4 1092616192 +ARGF4 +ADDRLP4 1056 +ADDRLP4 1036 +INDIRI4 +CVIF4 4 +ASGNF4 +CNSTF4 1139802112 +CNSTF4 1069547520 +ADDRLP4 1056 +INDIRF4 +MULF4 +SUBF4 +ARGF4 +ADDRLP4 1056 +INDIRF4 +ARGF4 +ADDRLP4 1056 +INDIRF4 +ARGF4 +CNSTI4 788 +ADDRGP4 cgs+36340 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+508 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 3312 +;3312: } +LABELV $1688 +line 3313 +;3313: if ( cgs.clientinfo[cgs.duelist2].modelIcon ) +CNSTI4 788 +ADDRGP4 cgs+36344 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+508 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1696 +line 3314 +;3314: { +line 3315 +;3315: CG_DrawPic( SCREEN_WIDTH-size-10, SCREEN_HEIGHT-(size*1.5), size, size, cgs.clientinfo[cgs.duelist2].modelIcon ); +CNSTI4 640 +ADDRLP4 1036 +INDIRI4 +SUBI4 +CNSTI4 10 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 1060 +ADDRLP4 1036 +INDIRI4 +CVIF4 4 +ASGNF4 +CNSTF4 1139802112 +CNSTF4 1069547520 +ADDRLP4 1060 +INDIRF4 +MULF4 +SUBF4 +ARGF4 +ADDRLP4 1060 +INDIRF4 +ARGF4 +ADDRLP4 1060 +INDIRF4 +ARGF4 +CNSTI4 788 +ADDRGP4 cgs+36344 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+508 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 3316 +;3316: } +LABELV $1696 +line 3317 +;3317: Com_sprintf(text, sizeof(text), "%i/%i", cgs.clientinfo[cgs.duelist1].score, cgs.fraglimit ); +ADDRLP4 12 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $953 +ARGP4 +CNSTI4 788 +ADDRGP4 cgs+36340 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+108 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cgs+32972 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 3318 +;3318: CG_Text_Paint( 42 - CG_Text_Width( text, 1.0f, 2 ) / 2, SCREEN_HEIGHT-(size*1.5) + 64, 1.0f, colorWhite, text, 0, 0, 0, 2 ); +ADDRLP4 12 +ARGP4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 1056 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 1060 +CNSTI4 2 +ASGNI4 +CNSTI4 42 +ADDRLP4 1056 +INDIRI4 +ADDRLP4 1060 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1139802112 +CNSTF4 1069547520 +ADDRLP4 1036 +INDIRI4 +CVIF4 4 +MULF4 +SUBF4 +CNSTF4 1115684864 +ADDF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 12 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 1064 +CNSTI4 0 +ASGNI4 +ADDRLP4 1064 +INDIRI4 +ARGI4 +ADDRLP4 1064 +INDIRI4 +ARGI4 +ADDRLP4 1060 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 3320 +;3319: +;3320: Com_sprintf(text, sizeof(text), "%i/%i", cgs.clientinfo[cgs.duelist2].score, cgs.fraglimit ); +ADDRLP4 12 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $953 +ARGP4 +CNSTI4 788 +ADDRGP4 cgs+36344 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+108 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cgs+32972 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 3321 +;3321: CG_Text_Paint( SCREEN_WIDTH-size+22 - CG_Text_Width( text, 1.0f, 2 ) / 2, SCREEN_HEIGHT-(size*1.5) + 64, 1.0f, colorWhite, text, 0, 0, 0, 2 ); +ADDRLP4 12 +ARGP4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 1068 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 1072 +CNSTI4 2 +ASGNI4 +CNSTI4 640 +ADDRLP4 1036 +INDIRI4 +SUBI4 +CNSTI4 22 +ADDI4 +ADDRLP4 1068 +INDIRI4 +ADDRLP4 1072 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1139802112 +CNSTF4 1069547520 +ADDRLP4 1036 +INDIRI4 +CVIF4 4 +MULF4 +SUBF4 +CNSTF4 1115684864 +ADDF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 12 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 1076 +CNSTI4 0 +ASGNI4 +ADDRLP4 1076 +INDIRI4 +ARGI4 +ADDRLP4 1076 +INDIRI4 +ARGI4 +ADDRLP4 1072 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 3322 +;3322: } +ADDRGP4 $1675 +JUMPV +LABELV $1674 +line 3324 +;3323: else +;3324: { +line 3325 +;3325: CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, 3 ) / 2, 420, 1.0f, colorWhite, s, 0, 0, 0, 3 ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 3 +ARGI4 +ADDRLP4 12 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +CNSTI4 320 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1137836032 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 3326 +;3326: } +LABELV $1675 +line 3328 +;3327: +;3328: if ( cgs.gametype == GT_TOURNAMENT ) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $1712 +line 3329 +;3329: { +line 3330 +;3330: s = CG_GetStripEdString("INGAMETEXT", "WAITING_TO_PLAY"); // "waiting to play"; +ADDRGP4 $903 +ARGP4 +ADDRGP4 $1715 +ARGP4 +ADDRLP4 12 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +ASGNP4 +line 3331 +;3331: CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, 3 ) / 2, 440, 1.0f, colorWhite, s, 0, 0, 0, 3 ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 3 +ARGI4 +ADDRLP4 16 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +CNSTI4 320 +ADDRLP4 16 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1138491392 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 3332 +;3332: } +ADDRGP4 $1713 +JUMPV +LABELV $1712 +line 3334 +;3333: else //if ( cgs.gametype >= GT_TEAM ) +;3334: { +line 3336 +;3335: //s = "press ESC and use the JOIN menu to play"; +;3336: s = CG_GetStripEdString("INGAMETEXT", "SPEC_CHOOSEJOIN"); +ADDRGP4 $903 +ARGP4 +ADDRGP4 $1716 +ARGP4 +ADDRLP4 12 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +ASGNP4 +line 3337 +;3337: CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, 3 ) / 2, 440, 1.0f, colorWhite, s, 0, 0, 0, 3 ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 3 +ARGI4 +ADDRLP4 16 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +CNSTI4 320 +ADDRLP4 16 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1138491392 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 3338 +;3338: } +LABELV $1713 +line 3339 +;3339:} +LABELV $1672 +endproc CG_DrawSpectator 1080 36 +proc CG_DrawVote 56 28 +line 3346 +;3340: +;3341:/* +;3342:================= +;3343:CG_DrawVote +;3344:================= +;3345:*/ +;3346:static void CG_DrawVote(void) { +line 3352 +;3347: const char *s; +;3348: int sec; +;3349: char sYes[20]; +;3350: char sNo[20]; +;3351: +;3352: if ( !cgs.voteTime ) { +ADDRGP4 cgs+33200 +INDIRI4 +CNSTI4 0 +NEI4 $1718 +line 3353 +;3353: return; +ADDRGP4 $1717 +JUMPV +LABELV $1718 +line 3357 +;3354: } +;3355: +;3356: // play a talk beep whenever it is modified +;3357: if ( cgs.voteModified ) { +ADDRGP4 cgs+33212 +INDIRI4 +CNSTI4 0 +EQI4 $1721 +line 3358 +;3358: cgs.voteModified = qfalse; +ADDRGP4 cgs+33212 +CNSTI4 0 +ASGNI4 +line 3360 +;3359:// trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND ); +;3360: } +LABELV $1721 +line 3362 +;3361: +;3362: sec = ( VOTE_TIME - ( cg.time - cgs.voteTime ) ) / 1000; +ADDRLP4 4 +CNSTI4 30000 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgs+33200 +INDIRI4 +SUBI4 +SUBI4 +CNSTI4 1000 +DIVI4 +ASGNI4 +line 3363 +;3363: if ( sec < 0 ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +GEI4 $1727 +line 3364 +;3364: sec = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 3365 +;3365: } +LABELV $1727 +line 3367 +;3366: +;3367: trap_SP_GetStringTextString("MENUS0_YES", sYes, sizeof(sYes) ); +ADDRGP4 $1729 +ARGP4 +ADDRLP4 8 +ARGP4 +CNSTI4 20 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 3368 +;3368: trap_SP_GetStringTextString("MENUS0_NO", sNo, sizeof(sNo) ); +ADDRGP4 $1730 +ARGP4 +ADDRLP4 28 +ARGP4 +CNSTI4 20 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 3370 +;3369: +;3370: s = va("VOTE(%i):%s %s:%i %s:%i", sec, cgs.voteString, sYes, cgs.voteYes, sNo, cgs.voteNo); +ADDRGP4 $1731 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 cgs+33216 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRGP4 cgs+33204 +INDIRI4 +ARGI4 +ADDRLP4 28 +ARGP4 +ADDRGP4 cgs+33208 +INDIRI4 +ARGI4 +ADDRLP4 48 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 48 +INDIRP4 +ASGNP4 +line 3371 +;3371: CG_DrawSmallString( 4, 58, s, 1.0F ); +CNSTI4 4 +ARGI4 +CNSTI4 58 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 CG_DrawSmallString +CALLV +pop +line 3372 +;3372: s = CG_GetStripEdString("INGAMETEXT", "OR_PRESS_ESC_THEN_CLICK_VOTE"); // s = "or press ESC then click Vote"; +ADDRGP4 $903 +ARGP4 +ADDRGP4 $1735 +ARGP4 +ADDRLP4 52 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 52 +INDIRP4 +ASGNP4 +line 3373 +;3373: CG_DrawSmallString( 4, 58 + SMALLCHAR_HEIGHT + 2, s, 1.0F ); +CNSTI4 4 +ARGI4 +CNSTI4 76 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 CG_DrawSmallString +CALLV +pop +line 3374 +;3374:} +LABELV $1717 +endproc CG_DrawVote 56 28 +proc CG_DrawTeamVote 300 20 +line 3381 +;3375: +;3376:/* +;3377:================= +;3378:CG_DrawTeamVote +;3379:================= +;3380:*/ +;3381:static void CG_DrawTeamVote(void) { +line 3385 +;3382: char *s; +;3383: int sec, cs_offset; +;3384: +;3385: if ( cgs.clientinfo->team == TEAM_RED ) +ADDRGP4 cgs+43024+68 +INDIRI4 +CNSTI4 1 +NEI4 $1737 +line 3386 +;3386: cs_offset = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1738 +JUMPV +LABELV $1737 +line 3387 +;3387: else if ( cgs.clientinfo->team == TEAM_BLUE ) +ADDRGP4 cgs+43024+68 +INDIRI4 +CNSTI4 2 +NEI4 $1736 +line 3388 +;3388: cs_offset = 1; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 3390 +;3389: else +;3390: return; +LABELV $1742 +LABELV $1738 +line 3392 +;3391: +;3392: if ( !cgs.teamVoteTime[cs_offset] ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+34240 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1745 +line 3393 +;3393: return; +ADDRGP4 $1736 +JUMPV +LABELV $1745 +line 3397 +;3394: } +;3395: +;3396: // play a talk beep whenever it is modified +;3397: if ( cgs.teamVoteModified[cs_offset] ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+34264 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1748 +line 3398 +;3398: cgs.teamVoteModified[cs_offset] = qfalse; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+34264 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3400 +;3399:// trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND ); +;3400: } +LABELV $1748 +line 3402 +;3401: +;3402: sec = ( VOTE_TIME - ( cg.time - cgs.teamVoteTime[cs_offset] ) ) / 1000; +ADDRLP4 4 +CNSTI4 30000 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+34240 +ADDP4 +INDIRI4 +SUBI4 +SUBI4 +CNSTI4 1000 +DIVI4 +ASGNI4 +line 3403 +;3403: if ( sec < 0 ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +GEI4 $1754 +line 3404 +;3404: sec = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 3405 +;3405: } +LABELV $1754 +line 3406 +;3406: if (strstr(cgs.teamVoteString[cs_offset], "leader")) +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +LSHI4 +ADDRGP4 cgs+34272 +ADDP4 +ARGP4 +ADDRGP4 $1759 +ARGP4 +ADDRLP4 12 +ADDRGP4 strstr +CALLP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1756 +line 3407 +;3407: { +line 3408 +;3408: int i = 0; +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1761 +JUMPV +LABELV $1760 +line 3411 +;3409: +;3410: while (cgs.teamVoteString[cs_offset][i] && cgs.teamVoteString[cs_offset][i] != ' ') +;3411: { +line 3412 +;3412: i++; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 3413 +;3413: } +LABELV $1761 +line 3410 +ADDRLP4 24 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +LSHI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +ADDRLP4 24 +INDIRI4 +ADDRGP4 cgs+34272 +ADDP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $1765 +ADDRLP4 16 +INDIRI4 +ADDRLP4 24 +INDIRI4 +ADDRGP4 cgs+34272 +ADDP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 32 +NEI4 $1760 +LABELV $1765 +line 3415 +;3414: +;3415: if (cgs.teamVoteString[cs_offset][i] == ' ') +ADDRLP4 16 +INDIRI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +LSHI4 +ADDRGP4 cgs+34272 +ADDP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 32 +NEI4 $1766 +line 3416 +;3416: { +line 3417 +;3417: int voteIndex = 0; +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +line 3420 +;3418: char voteIndexStr[256]; +;3419: +;3420: i++; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRGP4 $1770 +JUMPV +LABELV $1769 +line 3423 +;3421: +;3422: while (cgs.teamVoteString[cs_offset][i]) +;3423: { +line 3424 +;3424: voteIndexStr[voteIndex] = cgs.teamVoteString[cs_offset][i]; +ADDRLP4 28 +INDIRI4 +ADDRLP4 32 +ADDP4 +ADDRLP4 16 +INDIRI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +LSHI4 +ADDRGP4 cgs+34272 +ADDP4 +ADDP4 +INDIRI1 +ASGNI1 +line 3425 +;3425: voteIndex++; +ADDRLP4 28 +ADDRLP4 28 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 3426 +;3426: i++; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 3427 +;3427: } +LABELV $1770 +line 3422 +ADDRLP4 16 +INDIRI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +LSHI4 +ADDRGP4 cgs+34272 +ADDP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1769 +line 3428 +;3428: voteIndexStr[voteIndex] = 0; +ADDRLP4 28 +INDIRI4 +ADDRLP4 32 +ADDP4 +CNSTI1 0 +ASGNI1 +line 3430 +;3429: +;3430: voteIndex = atoi(voteIndexStr); +ADDRLP4 32 +ARGP4 +ADDRLP4 288 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 288 +INDIRI4 +ASGNI4 +line 3432 +;3431: +;3432: s = va("TEAMVOTE(%i):(Make %s the new team leader) yes:%i no:%i", sec, cgs.clientinfo[voteIndex].name, +ADDRGP4 $1774 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +CNSTI4 788 +ADDRLP4 28 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+4 +ADDP4 +ARGP4 +ADDRLP4 292 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 292 +INDIRI4 +ADDRGP4 cgs+34248 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 292 +INDIRI4 +ADDRGP4 cgs+34256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 296 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 296 +INDIRP4 +ASGNP4 +line 3434 +;3433: cgs.teamVoteYes[cs_offset], cgs.teamVoteNo[cs_offset] ); +;3434: } +ADDRGP4 $1757 +JUMPV +LABELV $1766 +line 3436 +;3435: else +;3436: { +line 3437 +;3437: s = va("TEAMVOTE(%i):%s yes:%i no:%i", sec, cgs.teamVoteString[cs_offset], +ADDRGP4 $1779 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +LSHI4 +ADDRGP4 cgs+34272 +ADDP4 +ARGP4 +ADDRLP4 32 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ADDRGP4 cgs+34248 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 32 +INDIRI4 +ADDRGP4 cgs+34256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 36 +INDIRP4 +ASGNP4 +line 3439 +;3438: cgs.teamVoteYes[cs_offset], cgs.teamVoteNo[cs_offset] ); +;3439: } +line 3440 +;3440: } +ADDRGP4 $1757 +JUMPV +LABELV $1756 +line 3442 +;3441: else +;3442: { +line 3443 +;3443: s = va("TEAMVOTE(%i):%s yes:%i no:%i", sec, cgs.teamVoteString[cs_offset], +ADDRGP4 $1779 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +LSHI4 +ADDRGP4 cgs+34272 +ADDP4 +ARGP4 +ADDRLP4 20 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ADDRGP4 cgs+34248 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRI4 +ADDRGP4 cgs+34256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 24 +INDIRP4 +ASGNP4 +line 3445 +;3444: cgs.teamVoteYes[cs_offset], cgs.teamVoteNo[cs_offset] ); +;3445: } +LABELV $1757 +line 3446 +;3446: CG_DrawSmallString( 4, 90, s, 1.0F ); +CNSTI4 4 +ARGI4 +CNSTI4 90 +ARGI4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 CG_DrawSmallString +CALLV +pop +line 3447 +;3447:} +LABELV $1736 +endproc CG_DrawTeamVote 300 20 +proc CG_DrawScoreboard 4 0 +line 3449 +;3448: +;3449:static qboolean CG_DrawScoreboard() { +line 3450 +;3450: return CG_DrawOldScoreboard(); +ADDRLP4 0 +ADDRGP4 CG_DrawOldScoreboard +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $1786 +endproc CG_DrawScoreboard 4 0 +proc CG_DrawIntermission 4 0 +line 3522 +;3451:#if 0 +;3452: static qboolean firstTime = qtrue; +;3453: float fade, *fadeColor; +;3454: +;3455: if (menuScoreboard) { +;3456: menuScoreboard->window.flags &= ~WINDOW_FORCED; +;3457: } +;3458: if (cg_paused.integer) { +;3459: cg.deferredPlayerLoading = 0; +;3460: firstTime = qtrue; +;3461: return qfalse; +;3462: } +;3463: +;3464: // should never happen in Team Arena +;3465: if (cgs.gametype == GT_SINGLE_PLAYER && cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { +;3466: cg.deferredPlayerLoading = 0; +;3467: firstTime = qtrue; +;3468: return qfalse; +;3469: } +;3470: +;3471: // don't draw scoreboard during death while warmup up +;3472: if ( cg.warmup && !cg.showScores ) { +;3473: return qfalse; +;3474: } +;3475: +;3476: if ( cg.showScores || cg.predictedPlayerState.pm_type == PM_DEAD || cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { +;3477: fade = 1.0; +;3478: fadeColor = colorWhite; +;3479: } else { +;3480: fadeColor = CG_FadeColor( cg.scoreFadeTime, FADE_TIME ); +;3481: if ( !fadeColor ) { +;3482: // next time scoreboard comes up, don't print killer +;3483: cg.deferredPlayerLoading = 0; +;3484: cg.killerName[0] = 0; +;3485: firstTime = qtrue; +;3486: return qfalse; +;3487: } +;3488: fade = *fadeColor; +;3489: } +;3490: +;3491: +;3492: if (menuScoreboard == NULL) { +;3493: if ( cgs.gametype >= GT_TEAM ) { +;3494: menuScoreboard = Menus_FindByName("teamscore_menu"); +;3495: } else { +;3496: menuScoreboard = Menus_FindByName("score_menu"); +;3497: } +;3498: } +;3499: +;3500: if (menuScoreboard) { +;3501: if (firstTime) { +;3502: CG_SetScoreSelection(menuScoreboard); +;3503: firstTime = qfalse; +;3504: } +;3505: Menu_Paint(menuScoreboard, qtrue); +;3506: } +;3507: +;3508: // load any models that have been deferred +;3509: if ( ++cg.deferredPlayerLoading > 10 ) { +;3510: CG_LoadDeferredPlayers(); +;3511: } +;3512: +;3513: return qtrue; +;3514:#endif +;3515:} +;3516: +;3517:/* +;3518:================= +;3519:CG_DrawIntermission +;3520:================= +;3521:*/ +;3522:static void CG_DrawIntermission( void ) { +line 3528 +;3523:// int key; +;3524: //if (cg_singlePlayer.integer) { +;3525: // CG_DrawCenterString(); +;3526: // return; +;3527: //} +;3528: cg.scoreFadeTime = cg.time; +ADDRGP4 cg+6992 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3529 +;3529: cg.scoreBoardShowing = CG_DrawScoreboard(); +ADDRLP4 0 +ADDRGP4 CG_DrawScoreboard +CALLI4 +ASGNI4 +ADDRGP4 cg+6988 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 3530 +;3530:} +LABELV $1787 +endproc CG_DrawIntermission 4 0 +proc CG_DrawFollow 32 36 +line 3538 +;3531: +;3532:/* +;3533:================= +;3534:CG_DrawFollow +;3535:================= +;3536:*/ +;3537:static qboolean CG_DrawFollow( void ) +;3538:{ +line 3541 +;3539: const char *s; +;3540: +;3541: if ( !(cg.snap->ps.pm_flags & PMF_FOLLOW) ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +NEI4 $1792 +line 3542 +;3542: { +line 3543 +;3543: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1791 +JUMPV +LABELV $1792 +line 3547 +;3544: } +;3545: +;3546:// s = "following"; +;3547: s = CG_GetStripEdString("INGAMETEXT", "FOLLOWING"); +ADDRGP4 $903 +ARGP4 +ADDRGP4 $1795 +ARGP4 +ADDRLP4 4 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 3548 +;3548: CG_Text_Paint ( 320 - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, 60, 1.0f, colorWhite, s, 0, 0, 0, FONT_MEDIUM ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 8 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 12 +CNSTI4 2 +ASGNI4 +CNSTI4 320 +ADDRLP4 8 +INDIRI4 +ADDRLP4 12 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1114636288 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 3550 +;3549: +;3550: s = cgs.clientinfo[ cg.snap->ps.clientNum ].name; +ADDRLP4 0 +CNSTI4 788 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+4 +ADDP4 +ASGNP4 +line 3551 +;3551: CG_Text_Paint ( 320 - CG_Text_Width ( s, 2.0f, FONT_MEDIUM ) / 2, 80, 2.0f, colorWhite, s, 0, 0, 0, FONT_MEDIUM ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 1073741824 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 20 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 24 +CNSTI4 2 +ASGNI4 +CNSTI4 320 +ADDRLP4 20 +INDIRI4 +ADDRLP4 24 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1117782016 +ARGF4 +CNSTF4 1073741824 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 3553 +;3552: +;3553: return qtrue; +CNSTI4 1 +RETI4 +LABELV $1791 +endproc CG_DrawFollow 32 36 +proc CG_DrawAmmoWarning 0 0 +line 3589 +;3554:} +;3555: +;3556:#if 0 +;3557:static void CG_DrawTemporaryStats() +;3558:{ //placeholder for testing (draws ammo and force power) +;3559: char s[512]; +;3560: +;3561: if (!cg.snap) +;3562: { +;3563: return; +;3564: } +;3565: +;3566: sprintf(s, "Force: %i", cg.snap->ps.fd.forcePower); +;3567: +;3568: CG_DrawBigString(SCREEN_WIDTH-164, SCREEN_HEIGHT-128, s, 1.0f); +;3569: +;3570: sprintf(s, "Ammo: %i", cg.snap->ps.ammo[weaponData[cg.snap->ps.weapon].ammoIndex]); +;3571: +;3572: CG_DrawBigString(SCREEN_WIDTH-164, SCREEN_HEIGHT-112, s, 1.0f); +;3573: +;3574: sprintf(s, "Health: %i", cg.snap->ps.stats[STAT_HEALTH]); +;3575: +;3576: CG_DrawBigString(8, SCREEN_HEIGHT-128, s, 1.0f); +;3577: +;3578: sprintf(s, "Armor: %i", cg.snap->ps.stats[STAT_ARMOR]); +;3579: +;3580: CG_DrawBigString(8, SCREEN_HEIGHT-112, s, 1.0f); +;3581:} +;3582:#endif +;3583: +;3584:/* +;3585:================= +;3586:CG_DrawAmmoWarning +;3587:================= +;3588:*/ +;3589:static void CG_DrawAmmoWarning( void ) { +line 3615 +;3590:#if 0 +;3591: const char *s; +;3592: int w; +;3593: +;3594: if (!cg_drawStatus.integer) +;3595: { +;3596: return; +;3597: } +;3598: +;3599: if ( cg_drawAmmoWarning.integer == 0 ) { +;3600: return; +;3601: } +;3602: +;3603: if ( !cg.lowAmmoWarning ) { +;3604: return; +;3605: } +;3606: +;3607: if ( cg.lowAmmoWarning == 2 ) { +;3608: s = "OUT OF AMMO"; +;3609: } else { +;3610: s = "LOW AMMO WARNING"; +;3611: } +;3612: w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +;3613: CG_DrawBigString(320 - w / 2, 64, s, 1.0F); +;3614:#endif +;3615:} +LABELV $1799 +endproc CG_DrawAmmoWarning 0 0 +proc CG_DrawWarmup 52 36 +line 3624 +;3616: +;3617: +;3618: +;3619:/* +;3620:================= +;3621:CG_DrawWarmup +;3622:================= +;3623:*/ +;3624:static void CG_DrawWarmup( void ) { +line 3633 +;3625: int w; +;3626: int sec; +;3627: int i; +;3628: float scale; +;3629: clientInfo_t *ci1, *ci2; +;3630: int cw; +;3631: const char *s; +;3632: +;3633: sec = cg.warmup; +ADDRLP4 4 +ADDRGP4 cg+13352 +INDIRI4 +ASGNI4 +line 3634 +;3634: if ( !sec ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $1802 +line 3635 +;3635: return; +ADDRGP4 $1800 +JUMPV +LABELV $1802 +line 3638 +;3636: } +;3637: +;3638: if ( sec < 0 ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +GEI4 $1804 +line 3640 +;3639:// s = "Waiting for players"; +;3640: s = CG_GetStripEdString("INGAMETEXT", "WAITING_FOR_PLAYERS"); +ADDRGP4 $903 +ARGP4 +ADDRGP4 $1806 +ARGP4 +ADDRLP4 32 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 32 +INDIRP4 +ASGNP4 +line 3641 +;3641: w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 CG_DrawStrlen +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 36 +INDIRI4 +CNSTI4 4 +LSHI4 +ASGNI4 +line 3642 +;3642: CG_DrawBigString(320 - w / 2, 24, s, 1.0F); +CNSTI4 320 +ADDRLP4 16 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +ARGI4 +CNSTI4 24 +ARGI4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 CG_DrawBigString +CALLV +pop +line 3643 +;3643: cg.warmupCount = 0; +ADDRGP4 cg+13356 +CNSTI4 0 +ASGNI4 +line 3644 +;3644: return; +ADDRGP4 $1800 +JUMPV +LABELV $1804 +line 3647 +;3645: } +;3646: +;3647: if (cgs.gametype == GT_TOURNAMENT) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $1808 +line 3649 +;3648: // find the two active players +;3649: ci1 = NULL; +ADDRLP4 12 +CNSTP4 0 +ASGNP4 +line 3650 +;3650: ci2 = NULL; +ADDRLP4 24 +CNSTP4 0 +ASGNP4 +line 3651 +;3651: for ( i = 0 ; i < cgs.maxclients ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1814 +JUMPV +LABELV $1811 +line 3652 +;3652: if ( cgs.clientinfo[i].infoValid && cgs.clientinfo[i].team == TEAM_FREE ) { +ADDRLP4 32 +CNSTI4 788 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ADDRGP4 cgs+43024 +ADDP4 +INDIRI4 +ADDRLP4 36 +INDIRI4 +EQI4 $1816 +ADDRLP4 32 +INDIRI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +ADDRLP4 36 +INDIRI4 +NEI4 $1816 +line 3653 +;3653: if ( !ci1 ) { +ADDRLP4 12 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1821 +line 3654 +;3654: ci1 = &cgs.clientinfo[i]; +ADDRLP4 12 +CNSTI4 788 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 3655 +;3655: } else { +ADDRGP4 $1822 +JUMPV +LABELV $1821 +line 3656 +;3656: ci2 = &cgs.clientinfo[i]; +ADDRLP4 24 +CNSTI4 788 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 3657 +;3657: } +LABELV $1822 +line 3658 +;3658: } +LABELV $1816 +line 3659 +;3659: } +LABELV $1812 +line 3651 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1814 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cgs+32988 +INDIRI4 +LTI4 $1811 +line 3661 +;3660: +;3661: if ( ci1 && ci2 ) { +ADDRLP4 32 +CNSTU4 0 +ASGNU4 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +ADDRLP4 32 +INDIRU4 +EQU4 $1809 +ADDRLP4 24 +INDIRP4 +CVPU4 4 +ADDRLP4 32 +INDIRU4 +EQU4 $1809 +line 3662 +;3662: s = va( "%s vs %s", ci1->name, ci2->name ); +ADDRGP4 $1827 +ARGP4 +ADDRLP4 36 +CNSTI4 4 +ASGNI4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 40 +INDIRP4 +ASGNP4 +line 3663 +;3663: w = CG_Text_Width(s, 0.6f, FONT_MEDIUM); +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTF4 1058642330 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 44 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 3664 +;3664: CG_Text_Paint(320 - w / 2, 60, 0.6f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE,FONT_MEDIUM); +ADDRLP4 48 +CNSTI4 2 +ASGNI4 +CNSTI4 320 +ADDRLP4 16 +INDIRI4 +ADDRLP4 48 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1114636288 +ARGF4 +CNSTF4 1058642330 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 3665 +;3665: } +line 3666 +;3666: } else { +ADDRGP4 $1809 +JUMPV +LABELV $1808 +line 3667 +;3667: if ( cgs.gametype == GT_FFA ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 0 +NEI4 $1828 +line 3668 +;3668: s = "Free For All"; +ADDRLP4 8 +ADDRGP4 $1831 +ASGNP4 +line 3669 +;3669: } else if ( cgs.gametype == GT_HOLOCRON ) { +ADDRGP4 $1829 +JUMPV +LABELV $1828 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 1 +NEI4 $1832 +line 3670 +;3670: s = "Holocron FFA"; +ADDRLP4 8 +ADDRGP4 $1835 +ASGNP4 +line 3671 +;3671: } else if ( cgs.gametype == GT_JEDIMASTER ) { +ADDRGP4 $1833 +JUMPV +LABELV $1832 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 2 +NEI4 $1836 +line 3672 +;3672: s = "Jedi Master"; +ADDRLP4 8 +ADDRGP4 $1839 +ASGNP4 +line 3673 +;3673: } else if ( cgs.gametype == GT_TEAM ) { +ADDRGP4 $1837 +JUMPV +LABELV $1836 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +NEI4 $1840 +line 3674 +;3674: s = "Team FFA"; +ADDRLP4 8 +ADDRGP4 $1843 +ASGNP4 +line 3675 +;3675: } else if ( cgs.gametype == GT_SAGA ) { +ADDRGP4 $1841 +JUMPV +LABELV $1840 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 6 +NEI4 $1844 +line 3676 +;3676: s = "N/A"; +ADDRLP4 8 +ADDRGP4 $1847 +ASGNP4 +line 3677 +;3677: } else if ( cgs.gametype == GT_CTF ) { +ADDRGP4 $1845 +JUMPV +LABELV $1844 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +NEI4 $1848 +line 3678 +;3678: s = "Capture the Flag"; +ADDRLP4 8 +ADDRGP4 $1851 +ASGNP4 +line 3679 +;3679: } else if ( cgs.gametype == GT_CTY ) { +ADDRGP4 $1849 +JUMPV +LABELV $1848 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $1852 +line 3680 +;3680: s = "Capture the Ysalamiri"; +ADDRLP4 8 +ADDRGP4 $1855 +ASGNP4 +line 3681 +;3681: } else { +ADDRGP4 $1853 +JUMPV +LABELV $1852 +line 3682 +;3682: s = ""; +ADDRLP4 8 +ADDRGP4 $664 +ASGNP4 +line 3683 +;3683: } +LABELV $1853 +LABELV $1849 +LABELV $1845 +LABELV $1841 +LABELV $1837 +LABELV $1833 +LABELV $1829 +line 3684 +;3684: w = CG_Text_Width(s, 1.5f, FONT_MEDIUM); +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTF4 1069547520 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 32 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 32 +INDIRI4 +ASGNI4 +line 3685 +;3685: CG_Text_Paint(320 - w / 2, 90, 1.5f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE,FONT_MEDIUM); +ADDRLP4 36 +CNSTI4 2 +ASGNI4 +CNSTI4 320 +ADDRLP4 16 +INDIRI4 +ADDRLP4 36 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1119092736 +ARGF4 +CNSTF4 1069547520 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 36 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 3686 +;3686: } +LABELV $1809 +line 3688 +;3687: +;3688: sec = ( sec - cg.time ) / 1000; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CNSTI4 1000 +DIVI4 +ASGNI4 +line 3689 +;3689: if ( sec < 0 ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +GEI4 $1857 +line 3690 +;3690: cg.warmup = 0; +ADDRGP4 cg+13352 +CNSTI4 0 +ASGNI4 +line 3691 +;3691: sec = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 3692 +;3692: } +LABELV $1857 +line 3694 +;3693:// s = va( "Starts in: %i", sec + 1 ); +;3694: s = va( "%s: %i",CG_GetStripEdString("INGAMETEXT", "STARTS_IN"), sec + 1 ); +ADDRGP4 $903 +ARGP4 +ADDRGP4 $1860 +ARGP4 +ADDRLP4 32 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $938 +ARGP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 36 +INDIRP4 +ASGNP4 +line 3695 +;3695: if ( sec != cg.warmupCount ) { +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+13356 +INDIRI4 +EQI4 $1861 +line 3696 +;3696: cg.warmupCount = sec; +ADDRGP4 cg+13356 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 3697 +;3697: switch ( sec ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $1867 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +EQI4 $1870 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +EQI4 $1873 +ADDRGP4 $1866 +JUMPV +LABELV $1867 +line 3699 +;3698: case 0: +;3699: trap_S_StartLocalSound( cgs.media.count1Sound, CHAN_ANNOUNCER ); +ADDRGP4 cgs+70296+848 +INDIRI4 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 3700 +;3700: break; +ADDRGP4 $1866 +JUMPV +LABELV $1870 +line 3702 +;3701: case 1: +;3702: trap_S_StartLocalSound( cgs.media.count2Sound, CHAN_ANNOUNCER ); +ADDRGP4 cgs+70296+844 +INDIRI4 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 3703 +;3703: break; +ADDRGP4 $1866 +JUMPV +LABELV $1873 +line 3705 +;3704: case 2: +;3705: trap_S_StartLocalSound( cgs.media.count3Sound, CHAN_ANNOUNCER ); +ADDRGP4 cgs+70296+840 +INDIRI4 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 3706 +;3706: break; +line 3708 +;3707: default: +;3708: break; +LABELV $1866 +line 3710 +;3709: } +;3710: } +LABELV $1861 +line 3711 +;3711: scale = 0.45f; +ADDRLP4 20 +CNSTF4 1055286886 +ASGNF4 +line 3712 +;3712: switch ( cg.warmupCount ) { +ADDRLP4 40 +ADDRGP4 cg+13356 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $1879 +ADDRLP4 40 +INDIRI4 +CNSTI4 1 +EQI4 $1880 +ADDRLP4 40 +INDIRI4 +CNSTI4 2 +EQI4 $1881 +ADDRGP4 $1876 +JUMPV +LABELV $1879 +line 3714 +;3713: case 0: +;3714: cw = 28; +ADDRLP4 28 +CNSTI4 28 +ASGNI4 +line 3715 +;3715: scale = 1.25f; +ADDRLP4 20 +CNSTF4 1067450368 +ASGNF4 +line 3716 +;3716: break; +ADDRGP4 $1877 +JUMPV +LABELV $1880 +line 3718 +;3717: case 1: +;3718: cw = 24; +ADDRLP4 28 +CNSTI4 24 +ASGNI4 +line 3719 +;3719: scale = 1.15f; +ADDRLP4 20 +CNSTF4 1066611507 +ASGNF4 +line 3720 +;3720: break; +ADDRGP4 $1877 +JUMPV +LABELV $1881 +line 3722 +;3721: case 2: +;3722: cw = 20; +ADDRLP4 28 +CNSTI4 20 +ASGNI4 +line 3723 +;3723: scale = 1.05f; +ADDRLP4 20 +CNSTF4 1065772646 +ASGNF4 +line 3724 +;3724: break; +ADDRGP4 $1877 +JUMPV +LABELV $1876 +line 3726 +;3725: default: +;3726: cw = 16; +ADDRLP4 28 +CNSTI4 16 +ASGNI4 +line 3727 +;3727: scale = 0.9f; +ADDRLP4 20 +CNSTF4 1063675494 +ASGNF4 +line 3728 +;3728: break; +LABELV $1877 +line 3731 +;3729: } +;3730: +;3731: w = CG_Text_Width(s, scale, FONT_MEDIUM); +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 20 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 44 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 3732 +;3732: CG_Text_Paint(320 - w / 2, 125, scale, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE, FONT_MEDIUM); +ADDRLP4 48 +CNSTI4 2 +ASGNI4 +CNSTI4 320 +ADDRLP4 16 +INDIRI4 +ADDRLP4 48 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1123680256 +ARGF4 +ADDRLP4 20 +INDIRF4 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 3733 +;3733:} +LABELV $1800 +endproc CG_DrawWarmup 52 36 +export CG_DrawTimedMenus +proc CG_DrawTimedMenus 4 8 +line 3741 +;3734: +;3735://================================================================================== +;3736:/* +;3737:================= +;3738:CG_DrawTimedMenus +;3739:================= +;3740:*/ +;3741:void CG_DrawTimedMenus() { +line 3742 +;3742: if (cg.voiceTime) { +ADDRGP4 cg+13116 +INDIRI4 +CNSTI4 0 +EQI4 $1883 +line 3743 +;3743: int t = cg.time - cg.voiceTime; +ADDRLP4 0 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+13116 +INDIRI4 +SUBI4 +ASGNI4 +line 3744 +;3744: if ( t > 2500 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2500 +LEI4 $1888 +line 3745 +;3745: Menus_CloseByName("voiceMenu"); +ADDRGP4 $1890 +ARGP4 +ADDRGP4 Menus_CloseByName +CALLV +pop +line 3746 +;3746: trap_Cvar_Set("cl_conXOffset", "0"); +ADDRGP4 $1891 +ARGP4 +ADDRGP4 $1892 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 3747 +;3747: cg.voiceTime = 0; +ADDRGP4 cg+13116 +CNSTI4 0 +ASGNI4 +line 3748 +;3748: } +LABELV $1888 +line 3749 +;3749: } +LABELV $1883 +line 3750 +;3750:} +LABELV $1882 +endproc CG_DrawTimedMenus 4 8 +export CG_DrawFlagStatus +proc CG_DrawFlagStatus 32 20 +line 3753 +;3751: +;3752:void CG_DrawFlagStatus() +;3753:{ +line 3754 +;3754: int myFlagTakenShader = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 3755 +;3755: int theirFlagShader = 0; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 3756 +;3756: int team = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 3757 +;3757: int startDrawPos = 2; +ADDRLP4 16 +CNSTI4 2 +ASGNI4 +line 3758 +;3758: int ico_size = 32; +ADDRLP4 0 +CNSTI4 32 +ASGNI4 +line 3760 +;3759: +;3760: if (!cg.snap) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1895 +line 3761 +;3761: { +line 3762 +;3762: return; +ADDRGP4 $1894 +JUMPV +LABELV $1895 +line 3765 +;3763: } +;3764: +;3765: if (cgs.gametype != GT_CTF && cgs.gametype != GT_CTY) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +EQI4 $1898 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +EQI4 $1898 +line 3766 +;3766: { +line 3767 +;3767: return; +ADDRGP4 $1894 +JUMPV +LABELV $1898 +line 3770 +;3768: } +;3769: +;3770: team = cg.snap->ps.persistant[PERS_TEAM]; +ADDRLP4 4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +ASGNI4 +line 3772 +;3771: +;3772: if (cgs.gametype == GT_CTY) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $1903 +line 3773 +;3773: { +line 3774 +;3774: if (team == TEAM_RED) +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +NEI4 $1906 +line 3775 +;3775: { +line 3776 +;3776: myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_x" ); +ADDRGP4 $1908 +ARGP4 +ADDRLP4 20 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 3777 +;3777: theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_ys" ); +ADDRGP4 $1090 +ARGP4 +ADDRLP4 24 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 3778 +;3778: } +ADDRGP4 $1904 +JUMPV +LABELV $1906 +line 3780 +;3779: else +;3780: { +line 3781 +;3781: myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_x" ); +ADDRGP4 $1909 +ARGP4 +ADDRLP4 20 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 3782 +;3782: theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_ys" ); +ADDRGP4 $1089 +ARGP4 +ADDRLP4 24 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 3783 +;3783: } +line 3784 +;3784: } +ADDRGP4 $1904 +JUMPV +LABELV $1903 +line 3786 +;3785: else +;3786: { +line 3787 +;3787: if (team == TEAM_RED) +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +NEI4 $1910 +line 3788 +;3788: { +line 3789 +;3789: myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_x" ); +ADDRGP4 $1908 +ARGP4 +ADDRLP4 20 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 3790 +;3790: theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag" ); +ADDRGP4 $1912 +ARGP4 +ADDRLP4 24 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 3791 +;3791: } +ADDRGP4 $1911 +JUMPV +LABELV $1910 +line 3793 +;3792: else +;3793: { +line 3794 +;3794: myFlagTakenShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_x" ); +ADDRGP4 $1909 +ARGP4 +ADDRLP4 20 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 3795 +;3795: theirFlagShader = trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag" ); +ADDRGP4 $1913 +ARGP4 +ADDRLP4 24 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 3796 +;3796: } +LABELV $1911 +line 3797 +;3797: } +LABELV $1904 +line 3799 +;3798: +;3799: if (CG_YourTeamHasFlag()) +ADDRLP4 20 +ADDRGP4 CG_YourTeamHasFlag +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $1914 +line 3800 +;3800: { +line 3801 +;3801: CG_DrawPic( startDrawPos, 365, ico_size, ico_size, theirFlagShader ); +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1136033792 +ARGF4 +ADDRLP4 24 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 3802 +;3802: startDrawPos += ico_size+2; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +ADDI4 +ADDI4 +ASGNI4 +line 3803 +;3803: } +LABELV $1914 +line 3805 +;3804: +;3805: if (CG_OtherTeamHasFlag()) +ADDRLP4 24 +ADDRGP4 CG_OtherTeamHasFlag +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $1916 +line 3806 +;3806: { +line 3807 +;3807: CG_DrawPic( startDrawPos, 365, ico_size, ico_size, myFlagTakenShader ); +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1136033792 +ARGF4 +ADDRLP4 28 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 3808 +;3808: } +LABELV $1916 +line 3809 +;3809:} +LABELV $1894 +endproc CG_DrawFlagStatus 32 20 +data +export cgRageTime +align 4 +LABELV cgRageTime +byte 4 0 +export cgRageFadeTime +align 4 +LABELV cgRageFadeTime +byte 4 0 +export cgRageFadeVal +align 4 +LABELV cgRageFadeVal +byte 4 0 +export cgRageRecTime +align 4 +LABELV cgRageRecTime +byte 4 0 +export cgRageRecFadeTime +align 4 +LABELV cgRageRecFadeTime +byte 4 0 +export cgRageRecFadeVal +align 4 +LABELV cgRageRecFadeVal +byte 4 0 +export cgAbsorbTime +align 4 +LABELV cgAbsorbTime +byte 4 0 +export cgAbsorbFadeTime +align 4 +LABELV cgAbsorbFadeTime +byte 4 0 +export cgAbsorbFadeVal +align 4 +LABELV cgAbsorbFadeVal +byte 4 0 +export cgProtectTime +align 4 +LABELV cgProtectTime +byte 4 0 +export cgProtectFadeTime +align 4 +LABELV cgProtectFadeTime +byte 4 0 +export cgProtectFadeVal +align 4 +LABELV cgProtectFadeVal +byte 4 0 +export cgYsalTime +align 4 +LABELV cgYsalTime +byte 4 0 +export cgYsalFadeTime +align 4 +LABELV cgYsalFadeTime +byte 4 0 +export cgYsalFadeVal +align 4 +LABELV cgYsalFadeVal +byte 4 0 +export gCGHasFallVector +align 4 +LABELV gCGHasFallVector +byte 4 0 +code +proc CG_Draw2D 68 24 +line 3839 +;3810: +;3811:int cgRageTime = 0; +;3812:int cgRageFadeTime = 0; +;3813:float cgRageFadeVal = 0; +;3814: +;3815:int cgRageRecTime = 0; +;3816:int cgRageRecFadeTime = 0; +;3817:float cgRageRecFadeVal = 0; +;3818: +;3819:int cgAbsorbTime = 0; +;3820:int cgAbsorbFadeTime = 0; +;3821:float cgAbsorbFadeVal = 0; +;3822: +;3823:int cgProtectTime = 0; +;3824:int cgProtectFadeTime = 0; +;3825:float cgProtectFadeVal = 0; +;3826: +;3827:int cgYsalTime = 0; +;3828:int cgYsalFadeTime = 0; +;3829:float cgYsalFadeVal = 0; +;3830: +;3831:qboolean gCGHasFallVector = qfalse; +;3832:vec3_t gCGFallVector; +;3833: +;3834:/* +;3835:================= +;3836:CG_Draw2D +;3837:================= +;3838:*/ +;3839:static void CG_Draw2D( void ) { +line 3840 +;3840: float inTime = cg.invenSelectTime+WEAPON_SELECT_TIME; +ADDRLP4 40 +ADDRGP4 cg+13788 +INDIRF4 +CNSTF4 1152319488 +ADDF4 +ASGNF4 +line 3841 +;3841: float wpTime = cg.weaponSelectTime+WEAPON_SELECT_TIME; +ADDRLP4 44 +ADDRGP4 cg+13372 +INDIRI4 +CNSTI4 1400 +ADDI4 +CVIF4 4 +ASGNF4 +line 3843 +;3842: float bestTime; +;3843: int drawSelect = 0; +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +line 3847 +;3844: float fallTime, rageTime, rageRecTime, absorbTime, protectTime, ysalTime; +;3845: vec4_t hcolor; +;3846: +;3847: if (cgs.orderPending && cg.time > cgs.orderTime) { +ADDRGP4 cgs+70240 +INDIRI4 +CNSTI4 0 +EQI4 $1921 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgs+70244 +INDIRI4 +LEI4 $1921 +line 3848 +;3848: CG_CheckOrderPending(); +ADDRGP4 CG_CheckOrderPending +CALLV +pop +line 3849 +;3849: } +LABELV $1921 +line 3851 +;3850: // if we are taking a levelshot for the menu, don't draw anything +;3851: if ( cg.levelShot ) { +ADDRGP4 cg+12 +INDIRI4 +CNSTI4 0 +EQI4 $1926 +line 3852 +;3852: return; +ADDRGP4 $1918 +JUMPV +LABELV $1926 +line 3855 +;3853: } +;3854: +;3855: if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) +CNSTI4 788 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1929 +line 3856 +;3856: { +line 3857 +;3857: cgRageTime = 0; +ADDRGP4 cgRageTime +CNSTI4 0 +ASGNI4 +line 3858 +;3858: cgRageFadeTime = 0; +ADDRGP4 cgRageFadeTime +CNSTI4 0 +ASGNI4 +line 3859 +;3859: cgRageFadeVal = 0; +ADDRGP4 cgRageFadeVal +CNSTF4 0 +ASGNF4 +line 3861 +;3860: +;3861: cgRageRecTime = 0; +ADDRGP4 cgRageRecTime +CNSTI4 0 +ASGNI4 +line 3862 +;3862: cgRageRecFadeTime = 0; +ADDRGP4 cgRageRecFadeTime +CNSTI4 0 +ASGNI4 +line 3863 +;3863: cgRageRecFadeVal = 0; +ADDRGP4 cgRageRecFadeVal +CNSTF4 0 +ASGNF4 +line 3865 +;3864: +;3865: cgAbsorbTime = 0; +ADDRGP4 cgAbsorbTime +CNSTI4 0 +ASGNI4 +line 3866 +;3866: cgAbsorbFadeTime = 0; +ADDRGP4 cgAbsorbFadeTime +CNSTI4 0 +ASGNI4 +line 3867 +;3867: cgAbsorbFadeVal = 0; +ADDRGP4 cgAbsorbFadeVal +CNSTF4 0 +ASGNF4 +line 3869 +;3868: +;3869: cgProtectTime = 0; +ADDRGP4 cgProtectTime +CNSTI4 0 +ASGNI4 +line 3870 +;3870: cgProtectFadeTime = 0; +ADDRGP4 cgProtectFadeTime +CNSTI4 0 +ASGNI4 +line 3871 +;3871: cgProtectFadeVal = 0; +ADDRGP4 cgProtectFadeVal +CNSTF4 0 +ASGNF4 +line 3873 +;3872: +;3873: cgYsalTime = 0; +ADDRGP4 cgYsalTime +CNSTI4 0 +ASGNI4 +line 3874 +;3874: cgYsalFadeTime = 0; +ADDRGP4 cgYsalFadeTime +CNSTI4 0 +ASGNI4 +line 3875 +;3875: cgYsalFadeVal = 0; +ADDRGP4 cgYsalFadeVal +CNSTF4 0 +ASGNF4 +line 3876 +;3876: } +LABELV $1929 +line 3878 +;3877: +;3878: if ( cg_draw2D.integer == 0 ) { +ADDRGP4 cg_draw2D+12 +INDIRI4 +CNSTI4 0 +NEI4 $1934 +line 3879 +;3879: return; +ADDRGP4 $1918 +JUMPV +LABELV $1934 +line 3882 +;3880: } +;3881: +;3882: if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $1937 +line 3883 +;3883: CG_DrawIntermission(); +ADDRGP4 CG_DrawIntermission +CALLV +pop +line 3884 +;3884: return; +ADDRGP4 $1918 +JUMPV +LABELV $1937 +line 3887 +;3885: } +;3886: +;3887: if (cgs.clientinfo[cg.snap->ps.clientNum].team != TEAM_SPECTATOR) +CNSTI4 788 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $1940 +line 3888 +;3888: { +line 3889 +;3889: if (cg.snap->ps.fd.forcePowersActive & (1 << FP_RAGE)) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 892 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $1945 +line 3890 +;3890: { +line 3891 +;3891: if (!cgRageTime) +ADDRGP4 cgRageTime +INDIRI4 +CNSTI4 0 +NEI4 $1948 +line 3892 +;3892: { +line 3893 +;3893: cgRageTime = cg.time; +ADDRGP4 cgRageTime +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3894 +;3894: } +LABELV $1948 +line 3896 +;3895: +;3896: rageTime = (float)(cg.time - cgRageTime); +ADDRLP4 20 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgRageTime +INDIRI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 3898 +;3897: +;3898: rageTime /= 9000; +ADDRLP4 20 +ADDRLP4 20 +INDIRF4 +CNSTF4 1175232512 +DIVF4 +ASGNF4 +line 3900 +;3899: +;3900: if (rageTime < 0) +ADDRLP4 20 +INDIRF4 +CNSTF4 0 +GEF4 $1952 +line 3901 +;3901: { +line 3902 +;3902: rageTime = 0; +ADDRLP4 20 +CNSTF4 0 +ASGNF4 +line 3903 +;3903: } +LABELV $1952 +line 3904 +;3904: if (rageTime > 0.15) +ADDRLP4 20 +INDIRF4 +CNSTF4 1041865114 +LEF4 $1954 +line 3905 +;3905: { +line 3906 +;3906: rageTime = 0.15; +ADDRLP4 20 +CNSTF4 1041865114 +ASGNF4 +line 3907 +;3907: } +LABELV $1954 +line 3909 +;3908: +;3909: hcolor[3] = rageTime; +ADDRLP4 0+12 +ADDRLP4 20 +INDIRF4 +ASGNF4 +line 3910 +;3910: hcolor[0] = 0.7; +ADDRLP4 0 +CNSTF4 1060320051 +ASGNF4 +line 3911 +;3911: hcolor[1] = 0; +ADDRLP4 0+4 +CNSTF4 0 +ASGNF4 +line 3912 +;3912: hcolor[2] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 3914 +;3913: +;3914: if (!cg.renderingThirdPerson) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $1959 +line 3915 +;3915: { +line 3916 +;3916: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 56 +CNSTF4 0 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 3917 +;3917: } +LABELV $1959 +line 3919 +;3918: +;3919: cgRageFadeTime = 0; +ADDRGP4 cgRageFadeTime +CNSTI4 0 +ASGNI4 +line 3920 +;3920: cgRageFadeVal = 0; +ADDRGP4 cgRageFadeVal +CNSTF4 0 +ASGNF4 +line 3921 +;3921: } +ADDRGP4 $1946 +JUMPV +LABELV $1945 +line 3922 +;3922: else if (cgRageTime) +ADDRGP4 cgRageTime +INDIRI4 +CNSTI4 0 +EQI4 $1962 +line 3923 +;3923: { +line 3924 +;3924: if (!cgRageFadeTime) +ADDRGP4 cgRageFadeTime +INDIRI4 +CNSTI4 0 +NEI4 $1964 +line 3925 +;3925: { +line 3926 +;3926: cgRageFadeTime = cg.time; +ADDRGP4 cgRageFadeTime +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3927 +;3927: cgRageFadeVal = 0.15; +ADDRGP4 cgRageFadeVal +CNSTF4 1041865114 +ASGNF4 +line 3928 +;3928: } +LABELV $1964 +line 3930 +;3929: +;3930: rageTime = cgRageFadeVal; +ADDRLP4 20 +ADDRGP4 cgRageFadeVal +INDIRF4 +ASGNF4 +line 3932 +;3931: +;3932: cgRageFadeVal -= (cg.time - cgRageFadeTime)*0.000005; +ADDRLP4 56 +ADDRGP4 cgRageFadeVal +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRF4 +CNSTF4 916964780 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgRageFadeTime +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +SUBF4 +ASGNF4 +line 3934 +;3933: +;3934: if (rageTime < 0) +ADDRLP4 20 +INDIRF4 +CNSTF4 0 +GEF4 $1968 +line 3935 +;3935: { +line 3936 +;3936: rageTime = 0; +ADDRLP4 20 +CNSTF4 0 +ASGNF4 +line 3937 +;3937: } +LABELV $1968 +line 3938 +;3938: if (rageTime > 0.15) +ADDRLP4 20 +INDIRF4 +CNSTF4 1041865114 +LEF4 $1970 +line 3939 +;3939: { +line 3940 +;3940: rageTime = 0.15; +ADDRLP4 20 +CNSTF4 1041865114 +ASGNF4 +line 3941 +;3941: } +LABELV $1970 +line 3943 +;3942: +;3943: if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1216 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $1972 +line 3944 +;3944: { +line 3945 +;3945: float checkRageRecTime = rageTime; +ADDRLP4 60 +ADDRLP4 20 +INDIRF4 +ASGNF4 +line 3947 +;3946: +;3947: if (checkRageRecTime < 0.15) +ADDRLP4 60 +INDIRF4 +CNSTF4 1041865114 +GEF4 $1976 +line 3948 +;3948: { +line 3949 +;3949: checkRageRecTime = 0.15; +ADDRLP4 60 +CNSTF4 1041865114 +ASGNF4 +line 3950 +;3950: } +LABELV $1976 +line 3952 +;3951: +;3952: hcolor[3] = checkRageRecTime; +ADDRLP4 0+12 +ADDRLP4 60 +INDIRF4 +ASGNF4 +line 3953 +;3953: hcolor[0] = rageTime*4; +ADDRLP4 0 +CNSTF4 1082130432 +ADDRLP4 20 +INDIRF4 +MULF4 +ASGNF4 +line 3954 +;3954: if (hcolor[0] < 0.2) +ADDRLP4 0 +INDIRF4 +CNSTF4 1045220557 +GEF4 $1979 +line 3955 +;3955: { +line 3956 +;3956: hcolor[0] = 0.2; +ADDRLP4 0 +CNSTF4 1045220557 +ASGNF4 +line 3957 +;3957: } +LABELV $1979 +line 3958 +;3958: hcolor[1] = 0.2; +ADDRLP4 0+4 +CNSTF4 1045220557 +ASGNF4 +line 3959 +;3959: hcolor[2] = 0.2; +ADDRLP4 0+8 +CNSTF4 1045220557 +ASGNF4 +line 3960 +;3960: } +ADDRGP4 $1973 +JUMPV +LABELV $1972 +line 3962 +;3961: else +;3962: { +line 3963 +;3963: hcolor[3] = rageTime; +ADDRLP4 0+12 +ADDRLP4 20 +INDIRF4 +ASGNF4 +line 3964 +;3964: hcolor[0] = 0.7; +ADDRLP4 0 +CNSTF4 1060320051 +ASGNF4 +line 3965 +;3965: hcolor[1] = 0; +ADDRLP4 0+4 +CNSTF4 0 +ASGNF4 +line 3966 +;3966: hcolor[2] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 3967 +;3967: } +LABELV $1973 +line 3969 +;3968: +;3969: if (!cg.renderingThirdPerson && rageTime) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $1986 +ADDRLP4 20 +INDIRF4 +CNSTF4 0 +EQF4 $1986 +line 3970 +;3970: { +line 3971 +;3971: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 60 +CNSTF4 0 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 3972 +;3972: } +ADDRGP4 $1963 +JUMPV +LABELV $1986 +line 3974 +;3973: else +;3974: { +line 3975 +;3975: if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1216 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $1989 +line 3976 +;3976: { +line 3977 +;3977: hcolor[3] = 0.15; +ADDRLP4 0+12 +CNSTF4 1041865114 +ASGNF4 +line 3978 +;3978: hcolor[0] = 0.2; +ADDRLP4 0 +CNSTF4 1045220557 +ASGNF4 +line 3979 +;3979: hcolor[1] = 0.2; +ADDRLP4 0+4 +CNSTF4 1045220557 +ASGNF4 +line 3980 +;3980: hcolor[2] = 0.2; +ADDRLP4 0+8 +CNSTF4 1045220557 +ASGNF4 +line 3981 +;3981: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 60 +CNSTF4 0 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 3982 +;3982: } +LABELV $1989 +line 3983 +;3983: cgRageTime = 0; +ADDRGP4 cgRageTime +CNSTI4 0 +ASGNI4 +line 3984 +;3984: } +line 3985 +;3985: } +ADDRGP4 $1963 +JUMPV +LABELV $1962 +line 3986 +;3986: else if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1216 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $1996 +line 3987 +;3987: { +line 3988 +;3988: if (!cgRageRecTime) +ADDRGP4 cgRageRecTime +INDIRI4 +CNSTI4 0 +NEI4 $2000 +line 3989 +;3989: { +line 3990 +;3990: cgRageRecTime = cg.time; +ADDRGP4 cgRageRecTime +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3991 +;3991: } +LABELV $2000 +line 3993 +;3992: +;3993: rageRecTime = (float)(cg.time - cgRageRecTime); +ADDRLP4 48 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgRageRecTime +INDIRI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 3995 +;3994: +;3995: rageRecTime /= 9000; +ADDRLP4 48 +ADDRLP4 48 +INDIRF4 +CNSTF4 1175232512 +DIVF4 +ASGNF4 +line 3997 +;3996: +;3997: if (rageRecTime < 0.15)//0) +ADDRLP4 48 +INDIRF4 +CNSTF4 1041865114 +GEF4 $2004 +line 3998 +;3998: { +line 3999 +;3999: rageRecTime = 0.15;//0; +ADDRLP4 48 +CNSTF4 1041865114 +ASGNF4 +line 4000 +;4000: } +LABELV $2004 +line 4001 +;4001: if (rageRecTime > 0.15) +ADDRLP4 48 +INDIRF4 +CNSTF4 1041865114 +LEF4 $2006 +line 4002 +;4002: { +line 4003 +;4003: rageRecTime = 0.15; +ADDRLP4 48 +CNSTF4 1041865114 +ASGNF4 +line 4004 +;4004: } +LABELV $2006 +line 4006 +;4005: +;4006: hcolor[3] = rageRecTime; +ADDRLP4 0+12 +ADDRLP4 48 +INDIRF4 +ASGNF4 +line 4007 +;4007: hcolor[0] = 0.2; +ADDRLP4 0 +CNSTF4 1045220557 +ASGNF4 +line 4008 +;4008: hcolor[1] = 0.2; +ADDRLP4 0+4 +CNSTF4 1045220557 +ASGNF4 +line 4009 +;4009: hcolor[2] = 0.2; +ADDRLP4 0+8 +CNSTF4 1045220557 +ASGNF4 +line 4011 +;4010: +;4011: if (!cg.renderingThirdPerson) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $2011 +line 4012 +;4012: { +line 4013 +;4013: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 56 +CNSTF4 0 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 4014 +;4014: } +LABELV $2011 +line 4016 +;4015: +;4016: cgRageRecFadeTime = 0; +ADDRGP4 cgRageRecFadeTime +CNSTI4 0 +ASGNI4 +line 4017 +;4017: cgRageRecFadeVal = 0; +ADDRGP4 cgRageRecFadeVal +CNSTF4 0 +ASGNF4 +line 4018 +;4018: } +ADDRGP4 $1997 +JUMPV +LABELV $1996 +line 4019 +;4019: else if (cgRageRecTime) +ADDRGP4 cgRageRecTime +INDIRI4 +CNSTI4 0 +EQI4 $2014 +line 4020 +;4020: { +line 4021 +;4021: if (!cgRageRecFadeTime) +ADDRGP4 cgRageRecFadeTime +INDIRI4 +CNSTI4 0 +NEI4 $2016 +line 4022 +;4022: { +line 4023 +;4023: cgRageRecFadeTime = cg.time; +ADDRGP4 cgRageRecFadeTime +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 4024 +;4024: cgRageRecFadeVal = 0.15; +ADDRGP4 cgRageRecFadeVal +CNSTF4 1041865114 +ASGNF4 +line 4025 +;4025: } +LABELV $2016 +line 4027 +;4026: +;4027: rageRecTime = cgRageRecFadeVal; +ADDRLP4 48 +ADDRGP4 cgRageRecFadeVal +INDIRF4 +ASGNF4 +line 4029 +;4028: +;4029: cgRageRecFadeVal -= (cg.time - cgRageRecFadeTime)*0.000005; +ADDRLP4 56 +ADDRGP4 cgRageRecFadeVal +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRF4 +CNSTF4 916964780 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgRageRecFadeTime +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +SUBF4 +ASGNF4 +line 4031 +;4030: +;4031: if (rageRecTime < 0) +ADDRLP4 48 +INDIRF4 +CNSTF4 0 +GEF4 $2020 +line 4032 +;4032: { +line 4033 +;4033: rageRecTime = 0; +ADDRLP4 48 +CNSTF4 0 +ASGNF4 +line 4034 +;4034: } +LABELV $2020 +line 4035 +;4035: if (rageRecTime > 0.15) +ADDRLP4 48 +INDIRF4 +CNSTF4 1041865114 +LEF4 $2022 +line 4036 +;4036: { +line 4037 +;4037: rageRecTime = 0.15; +ADDRLP4 48 +CNSTF4 1041865114 +ASGNF4 +line 4038 +;4038: } +LABELV $2022 +line 4040 +;4039: +;4040: hcolor[3] = rageRecTime; +ADDRLP4 0+12 +ADDRLP4 48 +INDIRF4 +ASGNF4 +line 4041 +;4041: hcolor[0] = 0.2; +ADDRLP4 0 +CNSTF4 1045220557 +ASGNF4 +line 4042 +;4042: hcolor[1] = 0.2; +ADDRLP4 0+4 +CNSTF4 1045220557 +ASGNF4 +line 4043 +;4043: hcolor[2] = 0.2; +ADDRLP4 0+8 +CNSTF4 1045220557 +ASGNF4 +line 4045 +;4044: +;4045: if (!cg.renderingThirdPerson && rageRecTime) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $2027 +ADDRLP4 48 +INDIRF4 +CNSTF4 0 +EQF4 $2027 +line 4046 +;4046: { +line 4047 +;4047: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 60 +CNSTF4 0 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 4048 +;4048: } +ADDRGP4 $2028 +JUMPV +LABELV $2027 +line 4050 +;4049: else +;4050: { +line 4051 +;4051: cgRageRecTime = 0; +ADDRGP4 cgRageRecTime +CNSTI4 0 +ASGNI4 +line 4052 +;4052: } +LABELV $2028 +line 4053 +;4053: } +LABELV $2014 +LABELV $1997 +LABELV $1963 +LABELV $1946 +line 4055 +;4054: +;4055: if (cg.snap->ps.fd.forcePowersActive & (1 << FP_ABSORB)) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 892 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $2030 +line 4056 +;4056: { +line 4057 +;4057: if (!cgAbsorbTime) +ADDRGP4 cgAbsorbTime +INDIRI4 +CNSTI4 0 +NEI4 $2033 +line 4058 +;4058: { +line 4059 +;4059: cgAbsorbTime = cg.time; +ADDRGP4 cgAbsorbTime +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 4060 +;4060: } +LABELV $2033 +line 4062 +;4061: +;4062: absorbTime = (float)(cg.time - cgAbsorbTime); +ADDRLP4 24 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgAbsorbTime +INDIRI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 4064 +;4063: +;4064: absorbTime /= 9000; +ADDRLP4 24 +ADDRLP4 24 +INDIRF4 +CNSTF4 1175232512 +DIVF4 +ASGNF4 +line 4066 +;4065: +;4066: if (absorbTime < 0) +ADDRLP4 24 +INDIRF4 +CNSTF4 0 +GEF4 $2037 +line 4067 +;4067: { +line 4068 +;4068: absorbTime = 0; +ADDRLP4 24 +CNSTF4 0 +ASGNF4 +line 4069 +;4069: } +LABELV $2037 +line 4070 +;4070: if (absorbTime > 0.15) +ADDRLP4 24 +INDIRF4 +CNSTF4 1041865114 +LEF4 $2039 +line 4071 +;4071: { +line 4072 +;4072: absorbTime = 0.15; +ADDRLP4 24 +CNSTF4 1041865114 +ASGNF4 +line 4073 +;4073: } +LABELV $2039 +line 4075 +;4074: +;4075: hcolor[3] = absorbTime/2; +ADDRLP4 0+12 +ADDRLP4 24 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 4076 +;4076: hcolor[0] = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 4077 +;4077: hcolor[1] = 0; +ADDRLP4 0+4 +CNSTF4 0 +ASGNF4 +line 4078 +;4078: hcolor[2] = 0.7; +ADDRLP4 0+8 +CNSTF4 1060320051 +ASGNF4 +line 4080 +;4079: +;4080: if (!cg.renderingThirdPerson) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $2044 +line 4081 +;4081: { +line 4082 +;4082: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 56 +CNSTF4 0 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 4083 +;4083: } +LABELV $2044 +line 4085 +;4084: +;4085: cgAbsorbFadeTime = 0; +ADDRGP4 cgAbsorbFadeTime +CNSTI4 0 +ASGNI4 +line 4086 +;4086: cgAbsorbFadeVal = 0; +ADDRGP4 cgAbsorbFadeVal +CNSTF4 0 +ASGNF4 +line 4087 +;4087: } +ADDRGP4 $2031 +JUMPV +LABELV $2030 +line 4088 +;4088: else if (cgAbsorbTime) +ADDRGP4 cgAbsorbTime +INDIRI4 +CNSTI4 0 +EQI4 $2047 +line 4089 +;4089: { +line 4090 +;4090: if (!cgAbsorbFadeTime) +ADDRGP4 cgAbsorbFadeTime +INDIRI4 +CNSTI4 0 +NEI4 $2049 +line 4091 +;4091: { +line 4092 +;4092: cgAbsorbFadeTime = cg.time; +ADDRGP4 cgAbsorbFadeTime +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 4093 +;4093: cgAbsorbFadeVal = 0.15; +ADDRGP4 cgAbsorbFadeVal +CNSTF4 1041865114 +ASGNF4 +line 4094 +;4094: } +LABELV $2049 +line 4096 +;4095: +;4096: absorbTime = cgAbsorbFadeVal; +ADDRLP4 24 +ADDRGP4 cgAbsorbFadeVal +INDIRF4 +ASGNF4 +line 4098 +;4097: +;4098: cgAbsorbFadeVal -= (cg.time - cgAbsorbFadeTime)*0.000005; +ADDRLP4 56 +ADDRGP4 cgAbsorbFadeVal +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRF4 +CNSTF4 916964780 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgAbsorbFadeTime +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +SUBF4 +ASGNF4 +line 4100 +;4099: +;4100: if (absorbTime < 0) +ADDRLP4 24 +INDIRF4 +CNSTF4 0 +GEF4 $2053 +line 4101 +;4101: { +line 4102 +;4102: absorbTime = 0; +ADDRLP4 24 +CNSTF4 0 +ASGNF4 +line 4103 +;4103: } +LABELV $2053 +line 4104 +;4104: if (absorbTime > 0.15) +ADDRLP4 24 +INDIRF4 +CNSTF4 1041865114 +LEF4 $2055 +line 4105 +;4105: { +line 4106 +;4106: absorbTime = 0.15; +ADDRLP4 24 +CNSTF4 1041865114 +ASGNF4 +line 4107 +;4107: } +LABELV $2055 +line 4109 +;4108: +;4109: hcolor[3] = absorbTime/2; +ADDRLP4 0+12 +ADDRLP4 24 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 4110 +;4110: hcolor[0] = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 4111 +;4111: hcolor[1] = 0; +ADDRLP4 0+4 +CNSTF4 0 +ASGNF4 +line 4112 +;4112: hcolor[2] = 0.7; +ADDRLP4 0+8 +CNSTF4 1060320051 +ASGNF4 +line 4114 +;4113: +;4114: if (!cg.renderingThirdPerson && absorbTime) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $2060 +ADDRLP4 24 +INDIRF4 +CNSTF4 0 +EQF4 $2060 +line 4115 +;4115: { +line 4116 +;4116: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 60 +CNSTF4 0 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 4117 +;4117: } +ADDRGP4 $2061 +JUMPV +LABELV $2060 +line 4119 +;4118: else +;4119: { +line 4120 +;4120: cgAbsorbTime = 0; +ADDRGP4 cgAbsorbTime +CNSTI4 0 +ASGNI4 +line 4121 +;4121: } +LABELV $2061 +line 4122 +;4122: } +LABELV $2047 +LABELV $2031 +line 4124 +;4123: +;4124: if (cg.snap->ps.fd.forcePowersActive & (1 << FP_PROTECT)) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 892 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $2063 +line 4125 +;4125: { +line 4126 +;4126: if (!cgProtectTime) +ADDRGP4 cgProtectTime +INDIRI4 +CNSTI4 0 +NEI4 $2066 +line 4127 +;4127: { +line 4128 +;4128: cgProtectTime = cg.time; +ADDRGP4 cgProtectTime +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 4129 +;4129: } +LABELV $2066 +line 4131 +;4130: +;4131: protectTime = (float)(cg.time - cgProtectTime); +ADDRLP4 28 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgProtectTime +INDIRI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 4133 +;4132: +;4133: protectTime /= 9000; +ADDRLP4 28 +ADDRLP4 28 +INDIRF4 +CNSTF4 1175232512 +DIVF4 +ASGNF4 +line 4135 +;4134: +;4135: if (protectTime < 0) +ADDRLP4 28 +INDIRF4 +CNSTF4 0 +GEF4 $2070 +line 4136 +;4136: { +line 4137 +;4137: protectTime = 0; +ADDRLP4 28 +CNSTF4 0 +ASGNF4 +line 4138 +;4138: } +LABELV $2070 +line 4139 +;4139: if (protectTime > 0.15) +ADDRLP4 28 +INDIRF4 +CNSTF4 1041865114 +LEF4 $2072 +line 4140 +;4140: { +line 4141 +;4141: protectTime = 0.15; +ADDRLP4 28 +CNSTF4 1041865114 +ASGNF4 +line 4142 +;4142: } +LABELV $2072 +line 4144 +;4143: +;4144: hcolor[3] = protectTime/2; +ADDRLP4 0+12 +ADDRLP4 28 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 4145 +;4145: hcolor[0] = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 4146 +;4146: hcolor[1] = 0.7; +ADDRLP4 0+4 +CNSTF4 1060320051 +ASGNF4 +line 4147 +;4147: hcolor[2] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 4149 +;4148: +;4149: if (!cg.renderingThirdPerson) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $2077 +line 4150 +;4150: { +line 4151 +;4151: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 56 +CNSTF4 0 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 4152 +;4152: } +LABELV $2077 +line 4154 +;4153: +;4154: cgProtectFadeTime = 0; +ADDRGP4 cgProtectFadeTime +CNSTI4 0 +ASGNI4 +line 4155 +;4155: cgProtectFadeVal = 0; +ADDRGP4 cgProtectFadeVal +CNSTF4 0 +ASGNF4 +line 4156 +;4156: } +ADDRGP4 $2064 +JUMPV +LABELV $2063 +line 4157 +;4157: else if (cgProtectTime) +ADDRGP4 cgProtectTime +INDIRI4 +CNSTI4 0 +EQI4 $2080 +line 4158 +;4158: { +line 4159 +;4159: if (!cgProtectFadeTime) +ADDRGP4 cgProtectFadeTime +INDIRI4 +CNSTI4 0 +NEI4 $2082 +line 4160 +;4160: { +line 4161 +;4161: cgProtectFadeTime = cg.time; +ADDRGP4 cgProtectFadeTime +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 4162 +;4162: cgProtectFadeVal = 0.15; +ADDRGP4 cgProtectFadeVal +CNSTF4 1041865114 +ASGNF4 +line 4163 +;4163: } +LABELV $2082 +line 4165 +;4164: +;4165: protectTime = cgProtectFadeVal; +ADDRLP4 28 +ADDRGP4 cgProtectFadeVal +INDIRF4 +ASGNF4 +line 4167 +;4166: +;4167: cgProtectFadeVal -= (cg.time - cgProtectFadeTime)*0.000005; +ADDRLP4 56 +ADDRGP4 cgProtectFadeVal +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRF4 +CNSTF4 916964780 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgProtectFadeTime +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +SUBF4 +ASGNF4 +line 4169 +;4168: +;4169: if (protectTime < 0) +ADDRLP4 28 +INDIRF4 +CNSTF4 0 +GEF4 $2086 +line 4170 +;4170: { +line 4171 +;4171: protectTime = 0; +ADDRLP4 28 +CNSTF4 0 +ASGNF4 +line 4172 +;4172: } +LABELV $2086 +line 4173 +;4173: if (protectTime > 0.15) +ADDRLP4 28 +INDIRF4 +CNSTF4 1041865114 +LEF4 $2088 +line 4174 +;4174: { +line 4175 +;4175: protectTime = 0.15; +ADDRLP4 28 +CNSTF4 1041865114 +ASGNF4 +line 4176 +;4176: } +LABELV $2088 +line 4178 +;4177: +;4178: hcolor[3] = protectTime/2; +ADDRLP4 0+12 +ADDRLP4 28 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 4179 +;4179: hcolor[0] = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 4180 +;4180: hcolor[1] = 0.7; +ADDRLP4 0+4 +CNSTF4 1060320051 +ASGNF4 +line 4181 +;4181: hcolor[2] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 4183 +;4182: +;4183: if (!cg.renderingThirdPerson && protectTime) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $2093 +ADDRLP4 28 +INDIRF4 +CNSTF4 0 +EQF4 $2093 +line 4184 +;4184: { +line 4185 +;4185: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 60 +CNSTF4 0 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 4186 +;4186: } +ADDRGP4 $2094 +JUMPV +LABELV $2093 +line 4188 +;4187: else +;4188: { +line 4189 +;4189: cgProtectTime = 0; +ADDRGP4 cgProtectTime +CNSTI4 0 +ASGNI4 +line 4190 +;4190: } +LABELV $2094 +line 4191 +;4191: } +LABELV $2080 +LABELV $2064 +line 4193 +;4192: +;4193: if (cg.snap->ps.rocketLockIndex != MAX_CLIENTS && (cg.time - cg.snap->ps.rocketLockTime) > 0) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 624 +ADDP4 +INDIRI4 +CNSTI4 32 +EQI4 $2096 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 632 +ADDP4 +INDIRF4 +SUBF4 +CNSTF4 0 +LEF4 $2096 +line 4194 +;4194: { +line 4195 +;4195: CG_DrawRocketLocking( cg.snap->ps.rocketLockIndex, cg.snap->ps.rocketLockTime ); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 624 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 632 +ADDP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_DrawRocketLocking +CALLV +pop +line 4196 +;4196: } +LABELV $2096 +line 4198 +;4197: +;4198: if (BG_HasYsalamiri(cgs.gametype, &cg.snap->ps)) +ADDRGP4 cgs+32960 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +ADDRLP4 56 +ADDRGP4 BG_HasYsalamiri +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $2103 +line 4199 +;4199: { +line 4200 +;4200: if (!cgYsalTime) +ADDRGP4 cgYsalTime +INDIRI4 +CNSTI4 0 +NEI4 $2107 +line 4201 +;4201: { +line 4202 +;4202: cgYsalTime = cg.time; +ADDRGP4 cgYsalTime +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 4203 +;4203: } +LABELV $2107 +line 4205 +;4204: +;4205: ysalTime = (float)(cg.time - cgYsalTime); +ADDRLP4 32 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgYsalTime +INDIRI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 4207 +;4206: +;4207: ysalTime /= 9000; +ADDRLP4 32 +ADDRLP4 32 +INDIRF4 +CNSTF4 1175232512 +DIVF4 +ASGNF4 +line 4209 +;4208: +;4209: if (ysalTime < 0) +ADDRLP4 32 +INDIRF4 +CNSTF4 0 +GEF4 $2111 +line 4210 +;4210: { +line 4211 +;4211: ysalTime = 0; +ADDRLP4 32 +CNSTF4 0 +ASGNF4 +line 4212 +;4212: } +LABELV $2111 +line 4213 +;4213: if (ysalTime > 0.15) +ADDRLP4 32 +INDIRF4 +CNSTF4 1041865114 +LEF4 $2113 +line 4214 +;4214: { +line 4215 +;4215: ysalTime = 0.15; +ADDRLP4 32 +CNSTF4 1041865114 +ASGNF4 +line 4216 +;4216: } +LABELV $2113 +line 4218 +;4217: +;4218: hcolor[3] = ysalTime/2; +ADDRLP4 0+12 +ADDRLP4 32 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 4219 +;4219: hcolor[0] = 0.7; +ADDRLP4 0 +CNSTF4 1060320051 +ASGNF4 +line 4220 +;4220: hcolor[1] = 0.7; +ADDRLP4 0+4 +CNSTF4 1060320051 +ASGNF4 +line 4221 +;4221: hcolor[2] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 4223 +;4222: +;4223: if (!cg.renderingThirdPerson) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $2118 +line 4224 +;4224: { +line 4225 +;4225: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 60 +CNSTF4 0 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 4226 +;4226: } +LABELV $2118 +line 4228 +;4227: +;4228: cgYsalFadeTime = 0; +ADDRGP4 cgYsalFadeTime +CNSTI4 0 +ASGNI4 +line 4229 +;4229: cgYsalFadeVal = 0; +ADDRGP4 cgYsalFadeVal +CNSTF4 0 +ASGNF4 +line 4230 +;4230: } +ADDRGP4 $2104 +JUMPV +LABELV $2103 +line 4231 +;4231: else if (cgYsalTime) +ADDRGP4 cgYsalTime +INDIRI4 +CNSTI4 0 +EQI4 $2121 +line 4232 +;4232: { +line 4233 +;4233: if (!cgYsalFadeTime) +ADDRGP4 cgYsalFadeTime +INDIRI4 +CNSTI4 0 +NEI4 $2123 +line 4234 +;4234: { +line 4235 +;4235: cgYsalFadeTime = cg.time; +ADDRGP4 cgYsalFadeTime +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 4236 +;4236: cgYsalFadeVal = 0.15; +ADDRGP4 cgYsalFadeVal +CNSTF4 1041865114 +ASGNF4 +line 4237 +;4237: } +LABELV $2123 +line 4239 +;4238: +;4239: ysalTime = cgYsalFadeVal; +ADDRLP4 32 +ADDRGP4 cgYsalFadeVal +INDIRF4 +ASGNF4 +line 4241 +;4240: +;4241: cgYsalFadeVal -= (cg.time - cgYsalFadeTime)*0.000005; +ADDRLP4 60 +ADDRGP4 cgYsalFadeVal +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +CNSTF4 916964780 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgYsalFadeTime +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +SUBF4 +ASGNF4 +line 4243 +;4242: +;4243: if (ysalTime < 0) +ADDRLP4 32 +INDIRF4 +CNSTF4 0 +GEF4 $2127 +line 4244 +;4244: { +line 4245 +;4245: ysalTime = 0; +ADDRLP4 32 +CNSTF4 0 +ASGNF4 +line 4246 +;4246: } +LABELV $2127 +line 4247 +;4247: if (ysalTime > 0.15) +ADDRLP4 32 +INDIRF4 +CNSTF4 1041865114 +LEF4 $2129 +line 4248 +;4248: { +line 4249 +;4249: ysalTime = 0.15; +ADDRLP4 32 +CNSTF4 1041865114 +ASGNF4 +line 4250 +;4250: } +LABELV $2129 +line 4252 +;4251: +;4252: hcolor[3] = ysalTime/2; +ADDRLP4 0+12 +ADDRLP4 32 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 4253 +;4253: hcolor[0] = 0.7; +ADDRLP4 0 +CNSTF4 1060320051 +ASGNF4 +line 4254 +;4254: hcolor[1] = 0.7; +ADDRLP4 0+4 +CNSTF4 1060320051 +ASGNF4 +line 4255 +;4255: hcolor[2] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 4257 +;4256: +;4257: if (!cg.renderingThirdPerson && ysalTime) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $2134 +ADDRLP4 32 +INDIRF4 +CNSTF4 0 +EQF4 $2134 +line 4258 +;4258: { +line 4259 +;4259: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 64 +CNSTF4 0 +ASGNF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 4260 +;4260: } +ADDRGP4 $2135 +JUMPV +LABELV $2134 +line 4262 +;4261: else +;4262: { +line 4263 +;4263: cgYsalTime = 0; +ADDRGP4 cgYsalTime +CNSTI4 0 +ASGNI4 +line 4264 +;4264: } +LABELV $2135 +line 4265 +;4265: } +LABELV $2121 +LABELV $2104 +line 4266 +;4266: } +LABELV $1940 +line 4268 +;4267: +;4268: if (cg.snap->ps.rocketLockIndex != MAX_CLIENTS && (cg.time - cg.snap->ps.rocketLockTime) > 0) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 624 +ADDP4 +INDIRI4 +CNSTI4 32 +EQI4 $2137 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 632 +ADDP4 +INDIRF4 +SUBF4 +CNSTF4 0 +LEF4 $2137 +line 4269 +;4269: { +line 4270 +;4270: CG_DrawRocketLocking( cg.snap->ps.rocketLockIndex, cg.snap->ps.rocketLockTime ); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 624 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 632 +ADDP4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 CG_DrawRocketLocking +CALLV +pop +line 4271 +;4271: } +LABELV $2137 +line 4273 +;4272: +;4273: if (cg.snap->ps.holocronBits) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 768 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2144 +line 4274 +;4274: { +line 4275 +;4275: CG_DrawHolocronIcons(); +ADDRGP4 CG_DrawHolocronIcons +CALLV +pop +line 4276 +;4276: } +LABELV $2144 +line 4277 +;4277: if (cg.snap->ps.fd.forcePowersActive || cg.snap->ps.fd.forceRageRecoveryTime > cg.time) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 892 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $2152 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1216 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $2147 +LABELV $2152 +line 4278 +;4278: { +line 4279 +;4279: CG_DrawActivePowers(); +ADDRGP4 CG_DrawActivePowers +CALLV +pop +line 4280 +;4280: } +LABELV $2147 +line 4283 +;4281: +;4282: // Draw this before the text so that any text won't get clipped off +;4283: CG_DrawZoomMask(); +ADDRGP4 CG_DrawZoomMask +CALLV +pop +line 4290 +;4284: +;4285:/* +;4286: if (cg.cameraMode) { +;4287: return; +;4288: } +;4289:*/ +;4290: if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $2153 +line 4291 +;4291: CG_DrawSpectator(); +ADDRGP4 CG_DrawSpectator +CALLV +pop +line 4292 +;4292: CG_DrawCrosshair(NULL, 0); +CNSTP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawCrosshair +CALLV +pop +line 4293 +;4293: CG_DrawCrosshairNames(); +ADDRGP4 CG_DrawCrosshairNames +CALLV +pop +line 4294 +;4294: CG_SaberClashFlare(); +ADDRGP4 CG_SaberClashFlare +CALLV +pop +line 4295 +;4295: } else { +ADDRGP4 $2154 +JUMPV +LABELV $2153 +line 4297 +;4296: // don't draw any status if dead or the scoreboard is being explicitly shown +;4297: if ( !cg.showScores && cg.snap->ps.stats[STAT_HEALTH] > 0 ) { +ADDRLP4 56 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+6984 +INDIRI4 +ADDRLP4 56 +INDIRI4 +NEI4 $2156 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +ADDRLP4 56 +INDIRI4 +LEI4 $2156 +line 4299 +;4298: +;4299: if ( /*cg_drawStatus.integer*/0 ) { +ADDRGP4 $2160 +JUMPV +line 4301 +;4300: //Reenable if stats are drawn with menu system again +;4301: Menu_PaintAll(); +ADDRGP4 Menu_PaintAll +CALLV +pop +line 4302 +;4302: CG_DrawTimedMenus(); +ADDRGP4 CG_DrawTimedMenus +CALLV +pop +line 4303 +;4303: } +LABELV $2160 +line 4307 +;4304: +;4305: //CG_DrawTemporaryStats(); +;4306: +;4307: CG_DrawAmmoWarning(); +ADDRGP4 CG_DrawAmmoWarning +CALLV +pop +line 4309 +;4308: +;4309: CG_DrawCrosshairNames(); +ADDRGP4 CG_DrawCrosshairNames +CALLV +pop +line 4311 +;4310: +;4311: if (cg_drawStatus.integer) +ADDRGP4 cg_drawStatus+12 +INDIRI4 +CNSTI4 0 +EQI4 $2162 +line 4312 +;4312: { +line 4313 +;4313: CG_DrawIconBackground(); +ADDRGP4 CG_DrawIconBackground +CALLV +pop +line 4314 +;4314: } +LABELV $2162 +line 4316 +;4315: +;4316: if (inTime > wpTime) +ADDRLP4 40 +INDIRF4 +ADDRLP4 44 +INDIRF4 +LEF4 $2165 +line 4317 +;4317: { +line 4318 +;4318: drawSelect = 1; +ADDRLP4 36 +CNSTI4 1 +ASGNI4 +line 4319 +;4319: bestTime = cg.invenSelectTime; +ADDRLP4 52 +ADDRGP4 cg+13788 +INDIRF4 +ASGNF4 +line 4320 +;4320: } +ADDRGP4 $2166 +JUMPV +LABELV $2165 +line 4322 +;4321: else //only draw the most recent since they're drawn in the same place +;4322: { +line 4323 +;4323: drawSelect = 2; +ADDRLP4 36 +CNSTI4 2 +ASGNI4 +line 4324 +;4324: bestTime = cg.weaponSelectTime; +ADDRLP4 52 +ADDRGP4 cg+13372 +INDIRI4 +CVIF4 4 +ASGNF4 +line 4325 +;4325: } +LABELV $2166 +line 4327 +;4326: +;4327: if (cg.forceSelectTime > bestTime) +ADDRGP4 cg+13792 +INDIRF4 +ADDRLP4 52 +INDIRF4 +LEF4 $2169 +line 4328 +;4328: { +line 4329 +;4329: drawSelect = 3; +ADDRLP4 36 +CNSTI4 3 +ASGNI4 +line 4330 +;4330: } +LABELV $2169 +line 4332 +;4331: +;4332: switch(drawSelect) +ADDRLP4 60 +ADDRLP4 36 +INDIRI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 1 +EQI4 $2174 +ADDRLP4 60 +INDIRI4 +CNSTI4 2 +EQI4 $2175 +ADDRLP4 60 +INDIRI4 +CNSTI4 3 +EQI4 $2176 +ADDRGP4 $2173 +JUMPV +line 4333 +;4333: { +LABELV $2174 +line 4335 +;4334: case 1: +;4335: CG_DrawInvenSelect(); +ADDRGP4 CG_DrawInvenSelect +CALLV +pop +line 4336 +;4336: break; +ADDRGP4 $2173 +JUMPV +LABELV $2175 +line 4338 +;4337: case 2: +;4338: CG_DrawWeaponSelect(); +ADDRGP4 CG_DrawWeaponSelect +CALLV +pop +line 4339 +;4339: break; +ADDRGP4 $2173 +JUMPV +LABELV $2176 +line 4341 +;4340: case 3: +;4341: CG_DrawForceSelect(); +ADDRGP4 CG_DrawForceSelect +CALLV +pop +line 4342 +;4342: break; +line 4344 +;4343: default: +;4344: break; +LABELV $2173 +line 4347 +;4345: } +;4346: +;4347: if (cg_drawStatus.integer) +ADDRGP4 cg_drawStatus+12 +INDIRI4 +CNSTI4 0 +EQI4 $2177 +line 4348 +;4348: { +line 4352 +;4349: //Powerups now done with upperright stuff +;4350: //CG_DrawPowerupIcons(); +;4351: +;4352: CG_DrawFlagStatus(); +ADDRGP4 CG_DrawFlagStatus +CALLV +pop +line 4353 +;4353: } +LABELV $2177 +line 4355 +;4354: +;4355: CG_SaberClashFlare(); +ADDRGP4 CG_SaberClashFlare +CALLV +pop +line 4357 +;4356: +;4357: if (cg_drawStatus.integer) +ADDRGP4 cg_drawStatus+12 +INDIRI4 +CNSTI4 0 +EQI4 $2180 +line 4358 +;4358: { +line 4359 +;4359: CG_DrawStats(); +ADDRGP4 CG_DrawStats +CALLV +pop +line 4360 +;4360: } +LABELV $2180 +line 4364 +;4361: +;4362: //Do we want to use this system again at some point? +;4363: //CG_DrawReward(); +;4364: } +LABELV $2156 +line 4366 +;4365: +;4366: } +LABELV $2154 +line 4368 +;4367: +;4368: if (cg.snap->ps.fallingToDeath) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1396 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2183 +line 4369 +;4369: { +line 4370 +;4370: fallTime = (float)(cg.time - cg.snap->ps.fallingToDeath); +ADDRLP4 16 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1396 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 4372 +;4371: +;4372: fallTime /= (FALL_FADE_TIME/2); +ADDRLP4 16 +ADDRLP4 16 +INDIRF4 +CNSTF4 1153138688 +DIVF4 +ASGNF4 +line 4374 +;4373: +;4374: if (fallTime < 0) +ADDRLP4 16 +INDIRF4 +CNSTF4 0 +GEF4 $2188 +line 4375 +;4375: { +line 4376 +;4376: fallTime = 0; +ADDRLP4 16 +CNSTF4 0 +ASGNF4 +line 4377 +;4377: } +LABELV $2188 +line 4378 +;4378: if (fallTime > 1) +ADDRLP4 16 +INDIRF4 +CNSTF4 1065353216 +LEF4 $2190 +line 4379 +;4379: { +line 4380 +;4380: fallTime = 1; +ADDRLP4 16 +CNSTF4 1065353216 +ASGNF4 +line 4381 +;4381: } +LABELV $2190 +line 4383 +;4382: +;4383: hcolor[3] = fallTime; +ADDRLP4 0+12 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 4384 +;4384: hcolor[0] = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 4385 +;4385: hcolor[1] = 0; +ADDRLP4 0+4 +CNSTF4 0 +ASGNF4 +line 4386 +;4386: hcolor[2] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 4388 +;4387: +;4388: CG_DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_WIDTH*SCREEN_HEIGHT, hcolor); +ADDRLP4 56 +CNSTF4 0 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +CNSTF4 1217789952 +ARGF4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_DrawRect +CALLV +pop +line 4390 +;4389: +;4390: if (!gCGHasFallVector) +ADDRGP4 gCGHasFallVector +INDIRI4 +CNSTI4 0 +NEI4 $2184 +line 4391 +;4391: { +line 4392 +;4392: VectorCopy(cg.snap->ps.origin, gCGFallVector); +ADDRGP4 gCGFallVector +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRB +ASGNB 12 +line 4393 +;4393: gCGHasFallVector = qtrue; +ADDRGP4 gCGHasFallVector +CNSTI4 1 +ASGNI4 +line 4394 +;4394: } +line 4395 +;4395: } +ADDRGP4 $2184 +JUMPV +LABELV $2183 +line 4397 +;4396: else +;4397: { +line 4398 +;4398: if (gCGHasFallVector) +ADDRGP4 gCGHasFallVector +INDIRI4 +CNSTI4 0 +EQI4 $2198 +line 4399 +;4399: { +line 4400 +;4400: gCGHasFallVector = qfalse; +ADDRGP4 gCGHasFallVector +CNSTI4 0 +ASGNI4 +line 4401 +;4401: VectorClear(gCGFallVector); +ADDRLP4 56 +CNSTF4 0 +ASGNF4 +ADDRGP4 gCGFallVector+8 +ADDRLP4 56 +INDIRF4 +ASGNF4 +ADDRGP4 gCGFallVector+4 +ADDRLP4 56 +INDIRF4 +ASGNF4 +ADDRGP4 gCGFallVector +ADDRLP4 56 +INDIRF4 +ASGNF4 +line 4402 +;4402: } +LABELV $2198 +line 4403 +;4403: } +LABELV $2184 +line 4405 +;4404: +;4405: CG_DrawVote(); +ADDRGP4 CG_DrawVote +CALLV +pop +line 4406 +;4406: CG_DrawTeamVote(); +ADDRGP4 CG_DrawTeamVote +CALLV +pop +line 4408 +;4407: +;4408: CG_DrawLagometer(); +ADDRGP4 CG_DrawLagometer +CALLV +pop +line 4410 +;4409: +;4410: if (!cg_paused.integer) { +ADDRGP4 cg_paused+12 +INDIRI4 +CNSTI4 0 +NEI4 $2202 +line 4411 +;4411: CG_DrawUpperRight(); +ADDRGP4 CG_DrawUpperRight +CALLV +pop +line 4412 +;4412: } +LABELV $2202 +line 4414 +;4413: +;4414: if ( !CG_DrawFollow() ) { +ADDRLP4 56 +ADDRGP4 CG_DrawFollow +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +NEI4 $2205 +line 4415 +;4415: CG_DrawWarmup(); +ADDRGP4 CG_DrawWarmup +CALLV +pop +line 4416 +;4416: } +LABELV $2205 +line 4419 +;4417: +;4418: // don't draw center string if scoreboard is up +;4419: cg.scoreBoardShowing = CG_DrawScoreboard(); +ADDRLP4 60 +ADDRGP4 CG_DrawScoreboard +CALLI4 +ASGNI4 +ADDRGP4 cg+6988 +ADDRLP4 60 +INDIRI4 +ASGNI4 +line 4420 +;4420: if ( !cg.scoreBoardShowing) { +ADDRGP4 cg+6988 +INDIRI4 +CNSTI4 0 +NEI4 $2208 +line 4421 +;4421: CG_DrawCenterString(); +ADDRGP4 CG_DrawCenterString +CALLV +pop +line 4422 +;4422: } +LABELV $2208 +line 4423 +;4423:} +LABELV $1918 +endproc CG_Draw2D 68 24 +proc CG_DrawTourneyScoreboard 0 0 +line 4426 +;4424: +;4425: +;4426:static void CG_DrawTourneyScoreboard() { +line 4427 +;4427:} +LABELV $2211 +endproc CG_DrawTourneyScoreboard 0 0 +export CG_DrawActive +proc CG_DrawActive 24 4 +line 4436 +;4428: +;4429:/* +;4430:===================== +;4431:CG_DrawActive +;4432: +;4433:Perform all drawing needed to completely fill the screen +;4434:===================== +;4435:*/ +;4436:void CG_DrawActive( stereoFrame_t stereoView ) { +line 4441 +;4437: float separation; +;4438: vec3_t baseOrg; +;4439: +;4440: // optionally draw the info screen instead +;4441: if ( !cg.snap ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2213 +line 4442 +;4442: CG_DrawInformation(); +ADDRGP4 CG_DrawInformation +CALLV +pop +line 4443 +;4443: return; +ADDRGP4 $2212 +JUMPV +LABELV $2213 +line 4447 +;4444: } +;4445: +;4446: // optionally draw the tournement scoreboard instead +;4447: if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR && +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $2216 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 8192 +BANDI4 +CNSTI4 0 +EQI4 $2216 +line 4448 +;4448: ( cg.snap->ps.pm_flags & PMF_SCOREBOARD ) ) { +line 4449 +;4449: CG_DrawTourneyScoreboard(); +ADDRGP4 CG_DrawTourneyScoreboard +CALLV +pop +line 4450 +;4450: return; +ADDRGP4 $2212 +JUMPV +LABELV $2216 +line 4453 +;4451: } +;4452: +;4453: switch ( stereoView ) { +ADDRLP4 16 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $2223 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +EQI4 $2224 +ADDRLP4 16 +INDIRI4 +CNSTI4 2 +EQI4 $2226 +ADDRGP4 $2220 +JUMPV +LABELV $2223 +line 4455 +;4454: case STEREO_CENTER: +;4455: separation = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 4456 +;4456: break; +ADDRGP4 $2221 +JUMPV +LABELV $2224 +line 4458 +;4457: case STEREO_LEFT: +;4458: separation = -cg_stereoSeparation.value / 2; +ADDRLP4 0 +ADDRGP4 cg_stereoSeparation+8 +INDIRF4 +NEGF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 4459 +;4459: break; +ADDRGP4 $2221 +JUMPV +LABELV $2226 +line 4461 +;4460: case STEREO_RIGHT: +;4461: separation = cg_stereoSeparation.value / 2; +ADDRLP4 0 +ADDRGP4 cg_stereoSeparation+8 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 4462 +;4462: break; +ADDRGP4 $2221 +JUMPV +LABELV $2220 +line 4464 +;4463: default: +;4464: separation = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 4465 +;4465: CG_Error( "CG_DrawActive: Undefined stereoView" ); +ADDRGP4 $2228 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 4466 +;4466: } +LABELV $2221 +line 4470 +;4467: +;4468: +;4469: // clear around the rendered view if sized down +;4470: CG_TileClear(); +ADDRGP4 CG_TileClear +CALLV +pop +line 4473 +;4471: +;4472: // offset vieworg appropriately if we're doing stereo separation +;4473: VectorCopy( cg.refdef.vieworg, baseOrg ); +ADDRLP4 4 +ADDRGP4 cg+3616+24 +INDIRB +ASGNB 12 +line 4474 +;4474: if ( separation != 0 ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +EQF4 $2231 +line 4475 +;4475: VectorMA( cg.refdef.vieworg, -separation, cg.refdef.viewaxis[1], cg.refdef.vieworg ); +ADDRGP4 cg+3616+24 +ADDRGP4 cg+3616+24 +INDIRF4 +ADDRGP4 cg+3616+36+12 +INDIRF4 +ADDRLP4 0 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cg+3616+24+4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cg+3616+24+8 +ADDRGP4 cg+3616+24+8 +INDIRF4 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +ADDRLP4 0 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 4476 +;4476: } +LABELV $2231 +line 4479 +;4477: +;4478: // draw 3D view +;4479: trap_R_RenderScene( &cg.refdef ); +ADDRGP4 cg+3616 +ARGP4 +ADDRGP4 trap_R_RenderScene +CALLV +pop +line 4482 +;4480: +;4481: // restore original viewpoint if running stereo +;4482: if ( separation != 0 ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +EQF4 $2261 +line 4483 +;4483: VectorCopy( baseOrg, cg.refdef.vieworg ); +ADDRGP4 cg+3616+24 +ADDRLP4 4 +INDIRB +ASGNB 12 +line 4484 +;4484: } +LABELV $2261 +line 4487 +;4485: +;4486: // draw status bar and other floating elements +;4487: CG_Draw2D(); +ADDRGP4 CG_Draw2D +CALLV +pop +line 4488 +;4488:} +LABELV $2212 +endproc CG_DrawActive 24 4 +bss +export gCGFallVector +align 4 +LABELV gCGFallVector +skip 12 +export lagometer +align 4 +LABELV lagometer +skip 1544 +import zoomFov +export lastvalidlockdif +align 4 +LABELV lastvalidlockdif +skip 4 +export hudTintColor +align 4 +LABELV hudTintColor +skip 4 +import cgDC +import CG_CalcMuzzlePoint +import trap_SP_Register +import trap_SP_RegisterServer +import trap_PC_RemoveAllGlobalDefines +import trap_PC_LoadGlobalDefines +import trap_PC_SourceFileAndLine +import trap_PC_ReadToken +import trap_PC_FreeSource +import trap_PC_LoadSource +import trap_PC_AddGlobalDefine +import Controls_SetConfig +import Controls_GetConfig +import UI_OutOfMemory +import UI_InitMemory +import UI_Alloc +import Display_CacheAll +import Menu_SetFeederSelection +import Menu_Paint +import Menus_CloseAll +import LerpColor +import Display_HandleKey +import Menus_CloseByName +import Menus_ShowByName +import Menus_FindByName +import Menus_OpenByName +import Display_KeyBindPending +import Display_CursorType +import Display_MouseMove +import Display_CaptureItem +import Display_GetContext +import Menus_Activate +import Menus_AnyFullScreenVisible +import Menu_Reset +import Menus_ActivateByName +import Menu_PaintAll +import Menu_New +import Menu_Count +import PC_Script_Parse +import PC_String_Parse +import PC_Rect_Parse +import PC_Int_Parse +import PC_Color_Parse +import PC_Float_Parse +import Script_Parse +import String_Parse +import Rect_Parse +import Int_Parse +import Color_Parse +import Float_Parse +import Menu_ScrollFeeder +import Menu_HandleMouseMove +import Menu_HandleKey +import Menu_GetFocused +import Menu_PostParse +import Item_Init +import Menu_Init +import Display_ExpandMacros +import Init_Display +import String_Report +import String_Init +import String_Alloc +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_OwnerDraw +export teamChat2 +align 1 +LABELV teamChat2 +skip 256 +export teamChat1 +align 1 +LABELV teamChat1 +skip 256 +export systemChat +align 1 +LABELV systemChat +skip 256 +import drawTeamOverlayModificationCount +export numSortedTeamPlayers +align 4 +LABELV numSortedTeamPlayers +skip 4 +export sortedTeamPlayers +align 4 +LABELV sortedTeamPlayers +skip 128 +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $2228 +char 1 67 +char 1 71 +char 1 95 +char 1 68 +char 1 114 +char 1 97 +char 1 119 +char 1 65 +char 1 99 +char 1 116 +char 1 105 +char 1 118 +char 1 101 +char 1 58 +char 1 32 +char 1 85 +char 1 110 +char 1 100 +char 1 101 +char 1 102 +char 1 105 +char 1 110 +char 1 101 +char 1 100 +char 1 32 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 101 +char 1 111 +char 1 86 +char 1 105 +char 1 101 +char 1 119 +char 1 0 +align 1 +LABELV $1913 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 114 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $1912 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 98 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $1909 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 98 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 120 +char 1 0 +align 1 +LABELV $1908 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 114 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 120 +char 1 0 +align 1 +LABELV $1892 +char 1 48 +char 1 0 +align 1 +LABELV $1891 +char 1 99 +char 1 108 +char 1 95 +char 1 99 +char 1 111 +char 1 110 +char 1 88 +char 1 79 +char 1 102 +char 1 102 +char 1 115 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $1890 +char 1 118 +char 1 111 +char 1 105 +char 1 99 +char 1 101 +char 1 77 +char 1 101 +char 1 110 +char 1 117 +char 1 0 +align 1 +LABELV $1860 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 83 +char 1 95 +char 1 73 +char 1 78 +char 1 0 +align 1 +LABELV $1855 +char 1 67 +char 1 97 +char 1 112 +char 1 116 +char 1 117 +char 1 114 +char 1 101 +char 1 32 +char 1 116 +char 1 104 +char 1 101 +char 1 32 +char 1 89 +char 1 115 +char 1 97 +char 1 108 +char 1 97 +char 1 109 +char 1 105 +char 1 114 +char 1 105 +char 1 0 +align 1 +LABELV $1851 +char 1 67 +char 1 97 +char 1 112 +char 1 116 +char 1 117 +char 1 114 +char 1 101 +char 1 32 +char 1 116 +char 1 104 +char 1 101 +char 1 32 +char 1 70 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $1847 +char 1 78 +char 1 47 +char 1 65 +char 1 0 +align 1 +LABELV $1843 +char 1 84 +char 1 101 +char 1 97 +char 1 109 +char 1 32 +char 1 70 +char 1 70 +char 1 65 +char 1 0 +align 1 +LABELV $1839 +char 1 74 +char 1 101 +char 1 100 +char 1 105 +char 1 32 +char 1 77 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1835 +char 1 72 +char 1 111 +char 1 108 +char 1 111 +char 1 99 +char 1 114 +char 1 111 +char 1 110 +char 1 32 +char 1 70 +char 1 70 +char 1 65 +char 1 0 +align 1 +LABELV $1831 +char 1 70 +char 1 114 +char 1 101 +char 1 101 +char 1 32 +char 1 70 +char 1 111 +char 1 114 +char 1 32 +char 1 65 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $1827 +char 1 37 +char 1 115 +char 1 32 +char 1 118 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $1806 +char 1 87 +char 1 65 +char 1 73 +char 1 84 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 69 +char 1 82 +char 1 83 +char 1 0 +align 1 +LABELV $1795 +char 1 70 +char 1 79 +char 1 76 +char 1 76 +char 1 79 +char 1 87 +char 1 73 +char 1 78 +char 1 71 +char 1 0 +align 1 +LABELV $1779 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 86 +char 1 79 +char 1 84 +char 1 69 +char 1 40 +char 1 37 +char 1 105 +char 1 41 +char 1 58 +char 1 37 +char 1 115 +char 1 32 +char 1 121 +char 1 101 +char 1 115 +char 1 58 +char 1 37 +char 1 105 +char 1 32 +char 1 110 +char 1 111 +char 1 58 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $1774 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 86 +char 1 79 +char 1 84 +char 1 69 +char 1 40 +char 1 37 +char 1 105 +char 1 41 +char 1 58 +char 1 40 +char 1 77 +char 1 97 +char 1 107 +char 1 101 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 116 +char 1 104 +char 1 101 +char 1 32 +char 1 110 +char 1 101 +char 1 119 +char 1 32 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 32 +char 1 108 +char 1 101 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 41 +char 1 32 +char 1 121 +char 1 101 +char 1 115 +char 1 58 +char 1 37 +char 1 105 +char 1 32 +char 1 110 +char 1 111 +char 1 58 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $1759 +char 1 108 +char 1 101 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1735 +char 1 79 +char 1 82 +char 1 95 +char 1 80 +char 1 82 +char 1 69 +char 1 83 +char 1 83 +char 1 95 +char 1 69 +char 1 83 +char 1 67 +char 1 95 +char 1 84 +char 1 72 +char 1 69 +char 1 78 +char 1 95 +char 1 67 +char 1 76 +char 1 73 +char 1 67 +char 1 75 +char 1 95 +char 1 86 +char 1 79 +char 1 84 +char 1 69 +char 1 0 +align 1 +LABELV $1731 +char 1 86 +char 1 79 +char 1 84 +char 1 69 +char 1 40 +char 1 37 +char 1 105 +char 1 41 +char 1 58 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 58 +char 1 37 +char 1 105 +char 1 32 +char 1 37 +char 1 115 +char 1 58 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $1730 +char 1 77 +char 1 69 +char 1 78 +char 1 85 +char 1 83 +char 1 48 +char 1 95 +char 1 78 +char 1 79 +char 1 0 +align 1 +LABELV $1729 +char 1 77 +char 1 69 +char 1 78 +char 1 85 +char 1 83 +char 1 48 +char 1 95 +char 1 89 +char 1 69 +char 1 83 +char 1 0 +align 1 +LABELV $1716 +char 1 83 +char 1 80 +char 1 69 +char 1 67 +char 1 95 +char 1 67 +char 1 72 +char 1 79 +char 1 79 +char 1 83 +char 1 69 +char 1 74 +char 1 79 +char 1 73 +char 1 78 +char 1 0 +align 1 +LABELV $1715 +char 1 87 +char 1 65 +char 1 73 +char 1 84 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 84 +char 1 79 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 0 +align 1 +LABELV $1683 +char 1 83 +char 1 80 +char 1 69 +char 1 67 +char 1 72 +char 1 85 +char 1 68 +char 1 95 +char 1 86 +char 1 69 +char 1 82 +char 1 83 +char 1 85 +char 1 83 +char 1 0 +align 1 +LABELV $1679 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $1673 +char 1 83 +char 1 80 +char 1 69 +char 1 67 +char 1 84 +char 1 65 +char 1 84 +char 1 79 +char 1 82 +char 1 0 +align 1 +LABELV $1542 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 108 +char 1 111 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $1535 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 100 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $1527 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $1526 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 108 +char 1 111 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $1423 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 70 +char 1 108 +char 1 97 +char 1 114 +char 1 101 +char 1 0 +align 1 +LABELV $1205 +char 1 115 +char 1 110 +char 1 99 +char 1 0 +align 1 +LABELV $1140 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 101 +char 1 116 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1136 +char 1 67 +char 1 79 +char 1 78 +char 1 78 +char 1 69 +char 1 67 +char 1 84 +char 1 73 +char 1 79 +char 1 78 +char 1 95 +char 1 73 +char 1 78 +char 1 84 +char 1 69 +char 1 82 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 69 +char 1 68 +char 1 0 +align 1 +LABELV $1130 +char 1 80 +char 1 76 +char 1 69 +char 1 65 +char 1 83 +char 1 69 +char 1 95 +char 1 87 +char 1 65 +char 1 73 +char 1 84 +char 1 0 +align 1 +LABELV $1129 +char 1 83 +char 1 69 +char 1 82 +char 1 86 +char 1 69 +char 1 82 +char 1 95 +char 1 67 +char 1 72 +char 1 65 +char 1 78 +char 1 71 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 77 +char 1 65 +char 1 80 +char 1 83 +char 1 0 +align 1 +LABELV $1090 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 98 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 121 +char 1 115 +char 1 0 +align 1 +LABELV $1089 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 114 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 121 +char 1 115 +char 1 0 +align 1 +LABELV $1048 +char 1 37 +char 1 51 +char 1 105 +char 1 32 +char 1 37 +char 1 51 +char 1 105 +char 1 0 +align 1 +LABELV $1045 +char 1 117 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 0 +align 1 +LABELV $978 +char 1 37 +char 1 105 +char 1 58 +char 1 37 +char 1 105 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $974 +char 1 37 +char 1 105 +char 1 102 +char 1 112 +char 1 115 +char 1 0 +align 1 +LABELV $958 +char 1 116 +char 1 105 +char 1 109 +char 1 101 +char 1 58 +char 1 37 +char 1 105 +char 1 32 +char 1 115 +char 1 110 +char 1 97 +char 1 112 +char 1 58 +char 1 37 +char 1 105 +char 1 32 +char 1 99 +char 1 109 +char 1 100 +char 1 58 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $953 +char 1 37 +char 1 105 +char 1 47 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $939 +char 1 76 +char 1 69 +char 1 65 +char 1 68 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $938 +char 1 37 +char 1 115 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $915 +char 1 68 +char 1 85 +char 1 69 +char 1 76 +char 1 73 +char 1 78 +char 1 71 +char 1 0 +align 1 +LABELV $908 +char 1 71 +char 1 69 +char 1 84 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $904 +char 1 77 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 89 +char 1 55 +char 1 0 +align 1 +LABELV $903 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 0 +align 1 +LABELV $886 +char 1 32 +char 1 66 +char 1 108 +char 1 117 +char 1 101 +char 1 58 +char 1 32 +char 1 0 +align 1 +LABELV $881 +char 1 45 +char 1 0 +align 1 +LABELV $879 +char 1 82 +char 1 101 +char 1 100 +char 1 58 +char 1 32 +char 1 0 +align 1 +LABELV $837 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 95 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $793 +char 1 69 +char 1 77 +char 1 80 +char 1 84 +char 1 89 +char 1 32 +char 1 73 +char 1 78 +char 1 86 +char 1 69 +char 1 78 +char 1 84 +char 1 79 +char 1 82 +char 1 89 +char 1 0 +align 1 +LABELV $762 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 0 +align 1 +LABELV $677 +char 1 114 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 104 +char 1 117 +char 1 100 +char 1 0 +align 1 +LABELV $674 +char 1 83 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $672 +char 1 83 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $671 +char 1 32 +char 1 40 +char 1 37 +char 1 100 +char 1 41 +char 1 0 +align 1 +LABELV $670 +char 1 32 +char 1 40 +char 1 43 +char 1 37 +char 1 100 +char 1 41 +char 1 0 +align 1 +LABELV $669 +char 1 32 +char 1 40 +char 1 84 +char 1 105 +char 1 101 +char 1 41 +char 1 0 +align 1 +LABELV $664 +char 1 0 +align 1 +LABELV $651 +char 1 83 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 47 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $645 +char 1 108 +char 1 101 +char 1 102 +char 1 116 +char 1 104 +char 1 117 +char 1 100 +char 1 0 +align 1 +LABELV $630 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $628 +char 1 70 +char 1 65 +char 1 83 +char 1 84 +char 1 0 +align 1 +LABELV $627 +char 1 77 +char 1 69 +char 1 68 +char 1 73 +char 1 85 +char 1 77 +char 1 0 +align 1 +LABELV $623 +char 1 83 +char 1 84 +char 1 82 +char 1 79 +char 1 78 +char 1 71 +char 1 0 +align 1 +LABELV $612 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $146 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 72 +char 1 82 +char 1 79 +char 1 87 +char 1 50 +char 1 0 +align 1 +LABELV $145 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 68 +char 1 69 +char 1 70 +char 1 69 +char 1 78 +char 1 83 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $144 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 79 +char 1 70 +char 1 70 +char 1 69 +char 1 78 +char 1 83 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $143 +char 1 83 +char 1 69 +char 1 69 +char 1 73 +char 1 78 +char 1 71 +char 1 50 +char 1 0 +align 1 +LABELV $142 +char 1 68 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 50 +char 1 0 +align 1 +LABELV $141 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 95 +char 1 82 +char 1 69 +char 1 80 +char 1 76 +char 1 69 +char 1 78 +char 1 73 +char 1 83 +char 1 72 +char 1 50 +char 1 0 +align 1 +LABELV $140 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 95 +char 1 72 +char 1 69 +char 1 65 +char 1 76 +char 1 50 +char 1 0 +align 1 +LABELV $139 +char 1 65 +char 1 66 +char 1 83 +char 1 79 +char 1 82 +char 1 66 +char 1 50 +char 1 0 +align 1 +LABELV $138 +char 1 80 +char 1 82 +char 1 79 +char 1 84 +char 1 69 +char 1 67 +char 1 84 +char 1 50 +char 1 0 +align 1 +LABELV $137 +char 1 68 +char 1 65 +char 1 82 +char 1 75 +char 1 95 +char 1 82 +char 1 65 +char 1 71 +char 1 69 +char 1 50 +char 1 0 +align 1 +LABELV $136 +char 1 76 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 50 +char 1 0 +align 1 +LABELV $135 +char 1 71 +char 1 82 +char 1 73 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $134 +char 1 77 +char 1 73 +char 1 78 +char 1 68 +char 1 84 +char 1 82 +char 1 73 +char 1 67 +char 1 75 +char 1 50 +char 1 0 +align 1 +LABELV $133 +char 1 80 +char 1 85 +char 1 76 +char 1 76 +char 1 50 +char 1 0 +align 1 +LABELV $132 +char 1 80 +char 1 85 +char 1 83 +char 1 72 +char 1 50 +char 1 0 +align 1 +LABELV $131 +char 1 83 +char 1 80 +char 1 69 +char 1 69 +char 1 68 +char 1 50 +char 1 0 +align 1 +LABELV $130 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $129 +char 1 72 +char 1 69 +char 1 65 +char 1 76 +char 1 50 +char 1 0 diff --git a/code/cgame/vm/cg_drawtools.asm b/code/cgame/vm/cg_drawtools.asm new file mode 100644 index 0000000..a84fd3a --- /dev/null +++ b/code/cgame/vm/cg_drawtools.asm @@ -0,0 +1,4532 @@ +export CG_DrawRect +code +proc CG_DrawRect 0 20 +file "../cg_drawtools.c" +line 24 +;1:/* +;2:// this line must stay at top so the whole PCH thing works... +;3:#include "cg_headers.h" +;4: +;5://#include "cg_local.h" +;6:#include "cg_media.h" +;7:#include "cg_text.h" +;8:*/ +;9: +;10:// Copyright (C) 1999-2000 Id Software, Inc. +;11:// +;12:// cg_drawtools.c -- helper functions called by cg_draw, cg_scoreboard, cg_info, etc +;13:#include "cg_local.h" +;14:#include "../game/q_shared.h" +;15: +;16: +;17:/* +;18:================ +;19:UI_DrawRect +;20: +;21:Coordinates are 640*480 virtual values +;22:================= +;23:*/ +;24:void CG_DrawRect( float x, float y, float width, float height, float size, const float *color ) { +line 25 +;25: trap_R_SetColor( color ); +ADDRFP4 20 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 27 +;26: +;27: CG_DrawTopBottom(x, y, width, height, size); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRF4 +ARGF4 +ADDRGP4 CG_DrawTopBottom +CALLV +pop +line 28 +;28: CG_DrawSides(x, y, width, height, size); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRF4 +ARGF4 +ADDRGP4 CG_DrawSides +CALLV +pop +line 30 +;29: +;30: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 31 +;31:} +LABELV $120 +endproc CG_DrawRect 0 20 +export CG_GetColorForHealth +proc CG_GetColorForHealth 16 0 +line 40 +;32: +;33: +;34: +;35:/* +;36:================= +;37:CG_GetColorForHealth +;38:================= +;39:*/ +;40:void CG_GetColorForHealth( int health, int armor, vec4_t hcolor ) { +line 46 +;41: int count; +;42: int max; +;43: +;44: // calculate the total points of damage that can +;45: // be sustained at the current health / armor level +;46: if ( health <= 0 ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +GTI4 $122 +line 47 +;47: VectorClear( hcolor ); // black +ADDRLP4 8 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTF4 0 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 48 +;48: hcolor[3] = 1; +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 49 +;49: return; +ADDRGP4 $121 +JUMPV +LABELV $122 +line 51 +;50: } +;51: count = armor; +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 52 +;52: max = health * ARMOR_PROTECTION / ( 1.0 - ARMOR_PROTECTION ); +ADDRLP4 8 +CNSTF4 1056964608 +ASGNF4 +ADDRLP4 4 +ADDRLP4 8 +INDIRF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +MULF4 +ADDRLP4 8 +INDIRF4 +DIVF4 +CVFI4 4 +ASGNI4 +line 53 +;53: if ( max < count ) { +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +GEI4 $124 +line 54 +;54: count = max; +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 55 +;55: } +LABELV $124 +line 56 +;56: health += count; +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +ADDRLP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 59 +;57: +;58: // set the color based on health +;59: hcolor[0] = 1.0; +ADDRFP4 8 +INDIRP4 +CNSTF4 1065353216 +ASGNF4 +line 60 +;60: hcolor[3] = 1.0; +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 61 +;61: if ( health >= 100 ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 100 +LTI4 $126 +line 62 +;62: hcolor[2] = 1.0; +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 63 +;63: } else if ( health < 66 ) { +ADDRGP4 $127 +JUMPV +LABELV $126 +ADDRFP4 0 +INDIRI4 +CNSTI4 66 +GEI4 $128 +line 64 +;64: hcolor[2] = 0; +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 0 +ASGNF4 +line 65 +;65: } else { +ADDRGP4 $129 +JUMPV +LABELV $128 +line 66 +;66: hcolor[2] = ( health - 66 ) / 33.0; +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRFP4 0 +INDIRI4 +CNSTI4 66 +SUBI4 +CVIF4 4 +CNSTF4 1107558400 +DIVF4 +ASGNF4 +line 67 +;67: } +LABELV $129 +LABELV $127 +line 69 +;68: +;69: if ( health > 60 ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 60 +LEI4 $130 +line 70 +;70: hcolor[1] = 1.0; +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 71 +;71: } else if ( health < 30 ) { +ADDRGP4 $131 +JUMPV +LABELV $130 +ADDRFP4 0 +INDIRI4 +CNSTI4 30 +GEI4 $132 +line 72 +;72: hcolor[1] = 0; +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 0 +ASGNF4 +line 73 +;73: } else { +ADDRGP4 $133 +JUMPV +LABELV $132 +line 74 +;74: hcolor[1] = ( health - 30 ) / 30.0; +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRFP4 0 +INDIRI4 +CNSTI4 30 +SUBI4 +CVIF4 4 +CNSTF4 1106247680 +DIVF4 +ASGNF4 +line 75 +;75: } +LABELV $133 +LABELV $131 +line 76 +;76:} +LABELV $121 +endproc CG_GetColorForHealth 16 0 +export CG_DrawSides +proc CG_DrawSides 12 36 +line 85 +;77: +;78:/* +;79:================ +;80:CG_DrawSides +;81: +;82:Coords are virtual 640x480 +;83:================ +;84:*/ +;85:void CG_DrawSides(float x, float y, float w, float h, float size) { +line 86 +;86: size *= cgs.screenXScale; +ADDRFP4 16 +ADDRFP4 16 +INDIRF4 +ADDRGP4 cgs+32936 +INDIRF4 +MULF4 +ASGNF4 +line 87 +;87: trap_R_DrawStretchPic( x, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 88 +;88: trap_R_DrawStretchPic( x + w - size, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader ); +ADDRLP4 4 +ADDRFP4 16 +INDIRF4 +ASGNF4 +ADDRFP4 0 +INDIRF4 +ADDRFP4 8 +INDIRF4 +ADDF4 +ADDRLP4 4 +INDIRF4 +SUBF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 89 +;89:} +LABELV $134 +endproc CG_DrawSides 12 36 +export CG_DrawTopBottom +proc CG_DrawTopBottom 12 36 +line 91 +;90: +;91:void CG_DrawTopBottom(float x, float y, float w, float h, float size) { +line 92 +;92: size *= cgs.screenYScale; +ADDRFP4 16 +ADDRFP4 16 +INDIRF4 +ADDRGP4 cgs+32940 +INDIRF4 +MULF4 +ASGNF4 +line 93 +;93: trap_R_DrawStretchPic( x, y, w, size, 0, 0, 0, 0, cgs.media.whiteShader ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRF4 +ARGF4 +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 94 +;94: trap_R_DrawStretchPic( x, y + h - size, w, size, 0, 0, 0, 0, cgs.media.whiteShader ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +ADDRFP4 16 +INDIRF4 +ASGNF4 +ADDRFP4 4 +INDIRF4 +ADDRFP4 12 +INDIRF4 +ADDF4 +ADDRLP4 4 +INDIRF4 +SUBF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 95 +;95:} +LABELV $140 +endproc CG_DrawTopBottom 12 36 +export CG_FillRect2 +proc CG_FillRect2 4 36 +line 103 +;96: +;97:/* +;98:------------------------- +;99:CGC_FillRect2 +;100:real coords +;101:------------------------- +;102:*/ +;103:void CG_FillRect2( float x, float y, float width, float height, const float *color ) { +line 104 +;104: trap_R_SetColor( color ); +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 105 +;105: trap_R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, cgs.media.whiteShader); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 106 +;106: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 107 +;107:} +LABELV $146 +endproc CG_FillRect2 4 36 +export CG_FillRect +proc CG_FillRect 4 36 +line 116 +;108: +;109:/* +;110:================ +;111:CG_FillRect +;112: +;113:Coordinates are 640*480 virtual values +;114:================= +;115:*/ +;116:void CG_FillRect( float x, float y, float width, float height, const float *color ) { +line 117 +;117: trap_R_SetColor( color ); +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 119 +;118: +;119: trap_R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, cgs.media.whiteShader); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 121 +;120: +;121: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 122 +;122:} +LABELV $149 +endproc CG_FillRect 4 36 +export CG_DrawPic +proc CG_DrawPic 8 36 +line 133 +;123: +;124: +;125:/* +;126:================ +;127:CG_DrawPic +;128: +;129:Coordinates are 640*480 virtual values +;130:A width of 0 will draw with the original image width +;131:================= +;132:*/ +;133:void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader ) { +line 134 +;134: trap_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 135 +;135:} +LABELV $152 +endproc CG_DrawPic 8 36 +export CG_DrawRotatePic +proc CG_DrawRotatePic 8 40 +line 146 +;136: +;137:/* +;138:================ +;139:CG_DrawRotatePic +;140: +;141:Coordinates are 640*480 virtual values +;142:A width of 0 will draw with the original image width +;143:rotates around the upper right corner of the passed in point +;144:================= +;145:*/ +;146:void CG_DrawRotatePic( float x, float y, float width, float height,float angle, qhandle_t hShader ) { +line 147 +;147: trap_R_DrawRotatePic( x, y, width, height, 0, 0, 1, 1, angle, hShader ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRF4 +ARGF4 +ADDRFP4 20 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawRotatePic +CALLV +pop +line 148 +;148:} +LABELV $153 +endproc CG_DrawRotatePic 8 40 +export CG_DrawRotatePic2 +proc CG_DrawRotatePic2 8 40 +line 159 +;149: +;150:/* +;151:================ +;152:CG_DrawRotatePic2 +;153: +;154:Coordinates are 640*480 virtual values +;155:A width of 0 will draw with the original image width +;156:Actually rotates around the center point of the passed in coordinates +;157:================= +;158:*/ +;159:void CG_DrawRotatePic2( float x, float y, float width, float height,float angle, qhandle_t hShader ) { +line 160 +;160: trap_R_DrawRotatePic2( x, y, width, height, 0, 0, 1, 1, angle, hShader ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRF4 +ARGF4 +ADDRFP4 20 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawRotatePic2 +CALLV +pop +line 161 +;161:} +LABELV $154 +endproc CG_DrawRotatePic2 8 40 +export CG_DrawChar +proc CG_DrawChar 48 36 +line 170 +;162: +;163:/* +;164:=============== +;165:CG_DrawChar +;166: +;167:Coordinates and size in 640*480 virtual screen size +;168:=============== +;169:*/ +;170:void CG_DrawChar( int x, int y, int width, int height, int ch ) { +line 177 +;171: int row, col; +;172: float frow, fcol; +;173: float size; +;174: float ax, ay, aw, ah; +;175: float size2; +;176: +;177: ch &= 255; +ADDRFP4 16 +ADDRFP4 16 +INDIRI4 +CNSTI4 255 +BANDI4 +ASGNI4 +line 179 +;178: +;179: if ( ch == ' ' ) { +ADDRFP4 16 +INDIRI4 +CNSTI4 32 +NEI4 $156 +line 180 +;180: return; +ADDRGP4 $155 +JUMPV +LABELV $156 +line 183 +;181: } +;182: +;183: ax = x; +ADDRLP4 20 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ASGNF4 +line 184 +;184: ay = y; +ADDRLP4 24 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 185 +;185: aw = width; +ADDRLP4 28 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +line 186 +;186: ah = height; +ADDRLP4 32 +ADDRFP4 12 +INDIRI4 +CVIF4 4 +ASGNF4 +line 188 +;187: +;188: row = ch>>4; +ADDRLP4 8 +ADDRFP4 16 +INDIRI4 +CNSTI4 4 +RSHI4 +ASGNI4 +line 189 +;189: col = ch&15; +ADDRLP4 12 +ADDRFP4 16 +INDIRI4 +CNSTI4 15 +BANDI4 +ASGNI4 +line 191 +;190: +;191: frow = row*0.0625; +ADDRLP4 0 +CNSTF4 1031798784 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +line 192 +;192: fcol = col*0.0625; +ADDRLP4 4 +CNSTF4 1031798784 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +line 193 +;193: size = 0.03125; +ADDRLP4 16 +CNSTF4 1023410176 +ASGNF4 +line 194 +;194: size2 = 0.0625; +ADDRLP4 36 +CNSTF4 1031798784 +ASGNF4 +line 196 +;195: +;196: trap_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol + size, frow + size2, +ADDRLP4 20 +INDIRF4 +ARGF4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 32 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ADDRLP4 36 +INDIRF4 +ADDF4 +ARGF4 +ADDRGP4 cgs+70296 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 199 +;197: cgs.media.charsetShader ); +;198: +;199:} +LABELV $155 +endproc CG_DrawChar 48 36 +export CG_DrawStringExt +proc CG_DrawStringExt 48 36 +line 214 +;200: +;201:/* +;202:================== +;203:CG_DrawStringExt +;204: +;205:Draws a multi-colored string with a drop shadow, optionally forcing +;206:to a fixed color. +;207: +;208:Coordinates are at 640 by 480 virtual resolution +;209:================== +;210:*/ +;211:#include "../../ui/menudef.h" // for "ITEM_TEXTSTYLE_SHADOWED" +;212:void CG_DrawStringExt( int x, int y, const char *string, const float *setColor, +;213: qboolean forceColor, qboolean shadow, int charWidth, int charHeight, int maxChars ) +;214:{ +line 215 +;215: if (trap_Language_IsAsian()) +ADDRLP4 0 +ADDRGP4 trap_Language_IsAsian +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $160 +line 216 +;216: { +line 220 +;217: // hack-a-doodle-do (post-release quick fix code)... +;218: // +;219: vec4_t color; +;220: memcpy(color,setColor, sizeof(color)); // de-const it +ADDRLP4 4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 221 +;221: CG_Text_Paint(x, y, 1.0f, // float scale, +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRFP4 20 +INDIRI4 +ADDRLP4 24 +INDIRI4 +EQI4 $163 +ADDRLP4 20 +CNSTI4 3 +ASGNI4 +ADDRGP4 $164 +JUMPV +LABELV $163 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +LABELV $164 +ADDRLP4 20 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 229 +;222: color, // vec4_t color, +;223: string, // const char *text, +;224: 0.0f, // float adjust, +;225: 0, // int limit, +;226: shadow ? ITEM_TEXTSTYLE_SHADOWED : 0, // int style, +;227: FONT_MEDIUM // iMenuFont +;228: ) ; +;229: } +ADDRGP4 $161 +JUMPV +LABELV $160 +line 231 +;230: else +;231: { +line 237 +;232: vec4_t color; +;233: const char *s; +;234: int xx; +;235: +;236: // draw the drop shadow +;237: if (shadow) { +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $165 +line 238 +;238: color[0] = color[1] = color[2] = 0; +ADDRLP4 28 +CNSTF4 0 +ASGNF4 +ADDRLP4 12+8 +ADDRLP4 28 +INDIRF4 +ASGNF4 +ADDRLP4 12+4 +ADDRLP4 28 +INDIRF4 +ASGNF4 +ADDRLP4 12 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 239 +;239: color[3] = setColor[3]; +ADDRLP4 12+12 +ADDRFP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ASGNF4 +line 240 +;240: trap_R_SetColor( color ); +ADDRLP4 12 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 241 +;241: s = string; +ADDRLP4 4 +ADDRFP4 8 +INDIRP4 +ASGNP4 +line 242 +;242: xx = x; +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRGP4 $171 +JUMPV +LABELV $170 +line 243 +;243: while ( *s ) { +line 244 +;244: if ( Q_IsColorString( s ) ) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $173 +ADDRLP4 36 +CNSTI4 94 +ASGNI4 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 36 +INDIRI4 +NEI4 $173 +ADDRLP4 40 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $173 +ADDRLP4 40 +INDIRI4 +ADDRLP4 36 +INDIRI4 +EQI4 $173 +ADDRLP4 40 +INDIRI4 +CNSTI4 55 +GTI4 $173 +ADDRLP4 40 +INDIRI4 +CNSTI4 48 +LTI4 $173 +line 245 +;245: s += 2; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 2 +ADDP4 +ASGNP4 +line 246 +;246: continue; +ADDRGP4 $171 +JUMPV +LABELV $173 +line 248 +;247: } +;248: CG_DrawChar( xx + 2, y + 2, charWidth, charHeight, *s ); +ADDRLP4 44 +CNSTI4 2 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 44 +INDIRI4 +ADDI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ADDRLP4 44 +INDIRI4 +ADDI4 +ARGI4 +ADDRFP4 24 +INDIRI4 +ARGI4 +ADDRFP4 28 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +ARGI4 +ADDRGP4 CG_DrawChar +CALLV +pop +line 249 +;249: xx += charWidth; +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +ADDRFP4 24 +INDIRI4 +ADDI4 +ASGNI4 +line 250 +;250: s++; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 251 +;251: } +LABELV $171 +line 243 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $170 +line 252 +;252: } +LABELV $165 +line 255 +;253: +;254: // draw the colored text +;255: s = string; +ADDRLP4 4 +ADDRFP4 8 +INDIRP4 +ASGNP4 +line 256 +;256: xx = x; +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 257 +;257: trap_R_SetColor( setColor ); +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +ADDRGP4 $176 +JUMPV +LABELV $175 +line 258 +;258: while ( *s ) { +line 259 +;259: if ( Q_IsColorString( s ) ) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $178 +ADDRLP4 32 +CNSTI4 94 +ASGNI4 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 32 +INDIRI4 +NEI4 $178 +ADDRLP4 36 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +EQI4 $178 +ADDRLP4 36 +INDIRI4 +ADDRLP4 32 +INDIRI4 +EQI4 $178 +ADDRLP4 36 +INDIRI4 +CNSTI4 55 +GTI4 $178 +ADDRLP4 36 +INDIRI4 +CNSTI4 48 +LTI4 $178 +line 260 +;260: if ( !forceColor ) { +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $180 +line 261 +;261: memcpy( color, g_color_table[ColorIndex(*(s+1))], sizeof( color ) ); +ADDRLP4 12 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 48 +SUBI4 +CNSTI4 7 +BANDI4 +CNSTI4 4 +LSHI4 +ADDRGP4 g_color_table +ADDP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 262 +;262: color[3] = setColor[3]; +ADDRLP4 12+12 +ADDRFP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ASGNF4 +line 263 +;263: trap_R_SetColor( color ); +ADDRLP4 12 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 264 +;264: } +LABELV $180 +line 265 +;265: s += 2; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 2 +ADDP4 +ASGNP4 +line 266 +;266: continue; +ADDRGP4 $176 +JUMPV +LABELV $178 +line 268 +;267: } +;268: CG_DrawChar( xx, y, charWidth, charHeight, *s ); +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 24 +INDIRI4 +ARGI4 +ADDRFP4 28 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +ARGI4 +ADDRGP4 CG_DrawChar +CALLV +pop +line 269 +;269: xx += charWidth; +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +ADDRFP4 24 +INDIRI4 +ADDI4 +ASGNI4 +line 270 +;270: s++; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 271 +;271: } +LABELV $176 +line 258 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $175 +line 272 +;272: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 273 +;273: } +LABELV $161 +line 274 +;274:} +LABELV $159 +endproc CG_DrawStringExt 48 36 +export CG_DrawBigString +proc CG_DrawBigString 28 36 +line 276 +;275: +;276:void CG_DrawBigString( int x, int y, const char *s, float alpha ) { +line 279 +;277: float color[4]; +;278: +;279: color[0] = color[1] = color[2] = 1.0; +ADDRLP4 16 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 280 +;280: color[3] = alpha; +ADDRLP4 0+12 +ADDRFP4 12 +INDIRF4 +ASGNF4 +line 281 +;281: CG_DrawStringExt( x, y, s, color, qfalse, qtrue, BIGCHAR_WIDTH, BIGCHAR_HEIGHT, 0 ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 24 +CNSTI4 16 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawStringExt +CALLV +pop +line 282 +;282:} +LABELV $183 +endproc CG_DrawBigString 28 36 +export CG_DrawBigStringColor +proc CG_DrawBigStringColor 8 36 +line 284 +;283: +;284:void CG_DrawBigStringColor( int x, int y, const char *s, vec4_t color ) { +line 285 +;285: CG_DrawStringExt( x, y, s, color, qtrue, qtrue, BIGCHAR_WIDTH, BIGCHAR_HEIGHT, 0 ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 4 +CNSTI4 16 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawStringExt +CALLV +pop +line 286 +;286:} +LABELV $187 +endproc CG_DrawBigStringColor 8 36 +export CG_DrawSmallString +proc CG_DrawSmallString 24 36 +line 288 +;287: +;288:void CG_DrawSmallString( int x, int y, const char *s, float alpha ) { +line 291 +;289: float color[4]; +;290: +;291: color[0] = color[1] = color[2] = 1.0; +ADDRLP4 16 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 292 +;292: color[3] = alpha; +ADDRLP4 0+12 +ADDRFP4 12 +INDIRF4 +ASGNF4 +line 293 +;293: CG_DrawStringExt( x, y, s, color, qfalse, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +CNSTI4 8 +ARGI4 +CNSTI4 16 +ARGI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawStringExt +CALLV +pop +line 294 +;294:} +LABELV $188 +endproc CG_DrawSmallString 24 36 +export CG_DrawSmallStringColor +proc CG_DrawSmallStringColor 4 36 +line 296 +;295: +;296:void CG_DrawSmallStringColor( int x, int y, const char *s, vec4_t color ) { +line 297 +;297: CG_DrawStringExt( x, y, s, color, qtrue, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0 ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 8 +ARGI4 +CNSTI4 16 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawStringExt +CALLV +pop +line 298 +;298:} +LABELV $192 +endproc CG_DrawSmallStringColor 4 36 +export CG_DrawStrlen +proc CG_DrawStrlen 20 0 +line 307 +;299: +;300:/* +;301:================= +;302:CG_DrawStrlen +;303: +;304:Returns character count, skiping color escape codes +;305:================= +;306:*/ +;307:int CG_DrawStrlen( const char *str ) { +line 308 +;308: const char *s = str; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 309 +;309: int count = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $195 +JUMPV +LABELV $194 +line 311 +;310: +;311: while ( *s ) { +line 312 +;312: if ( Q_IsColorString( s ) ) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $197 +ADDRLP4 12 +CNSTI4 94 +ASGNI4 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 12 +INDIRI4 +NEI4 $197 +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $197 +ADDRLP4 16 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $197 +ADDRLP4 16 +INDIRI4 +CNSTI4 55 +GTI4 $197 +ADDRLP4 16 +INDIRI4 +CNSTI4 48 +LTI4 $197 +line 313 +;313: s += 2; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 2 +ADDP4 +ASGNP4 +line 314 +;314: } else { +ADDRGP4 $198 +JUMPV +LABELV $197 +line 315 +;315: count++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 316 +;316: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 317 +;317: } +LABELV $198 +line 318 +;318: } +LABELV $195 +line 311 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $194 +line 320 +;319: +;320: return count; +ADDRLP4 4 +INDIRI4 +RETI4 +LABELV $193 +endproc CG_DrawStrlen 20 0 +proc CG_TileClearBox 16 36 +line 331 +;321:} +;322: +;323:/* +;324:============= +;325:CG_TileClearBox +;326: +;327:This repeats a 64*64 tile graphic to fill the screen around a sized down +;328:refresh window. +;329:============= +;330:*/ +;331:static void CG_TileClearBox( int x, int y, int w, int h, qhandle_t hShader ) { +line 334 +;332: float s1, t1, s2, t2; +;333: +;334: s1 = x/64.0; +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +CNSTF4 1115684864 +DIVF4 +ASGNF4 +line 335 +;335: t1 = y/64.0; +ADDRLP4 4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +CNSTF4 1115684864 +DIVF4 +ASGNF4 +line 336 +;336: s2 = (x+w)/64.0; +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ADDRFP4 8 +INDIRI4 +ADDI4 +CVIF4 4 +CNSTF4 1115684864 +DIVF4 +ASGNF4 +line 337 +;337: t2 = (y+h)/64.0; +ADDRLP4 12 +ADDRFP4 4 +INDIRI4 +ADDRFP4 12 +INDIRI4 +ADDI4 +CVIF4 4 +CNSTF4 1115684864 +DIVF4 +ASGNF4 +line 338 +;338: trap_R_DrawStretchPic( x, y, w, h, s1, t1, s2, t2, hShader ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_DrawStretchPic +CALLV +pop +line 339 +;339:} +LABELV $199 +endproc CG_TileClearBox 16 36 +export CG_TileClear +proc CG_TileClear 48 20 +line 350 +;340: +;341: +;342: +;343:/* +;344:============== +;345:CG_TileClear +;346: +;347:Clear around a sized down screen +;348:============== +;349:*/ +;350:void CG_TileClear( void ) { +line 354 +;351: int top, bottom, left, right; +;352: int w, h; +;353: +;354: w = cgs.glconfig.vidWidth; +ADDRLP4 8 +ADDRGP4 cgs+21604+11304 +INDIRI4 +ASGNI4 +line 355 +;355: h = cgs.glconfig.vidHeight; +ADDRLP4 20 +ADDRGP4 cgs+21604+11308 +INDIRI4 +ASGNI4 +line 357 +;356: +;357: if ( cg.refdef.x == 0 && cg.refdef.y == 0 && +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+3616 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $205 +ADDRGP4 cg+3616+4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $205 +ADDRGP4 cg+3616+8 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $205 +ADDRGP4 cg+3616+12 +INDIRI4 +ADDRLP4 20 +INDIRI4 +NEI4 $205 +line 358 +;358: cg.refdef.width == w && cg.refdef.height == h ) { +line 359 +;359: return; // full screen rendering +ADDRGP4 $200 +JUMPV +LABELV $205 +line 362 +;360: } +;361: +;362: top = cg.refdef.y; +ADDRLP4 0 +ADDRGP4 cg+3616+4 +INDIRI4 +ASGNI4 +line 363 +;363: bottom = top + cg.refdef.height-1; +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+3616+12 +INDIRI4 +ADDI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 364 +;364: left = cg.refdef.x; +ADDRLP4 12 +ADDRGP4 cg+3616 +INDIRI4 +ASGNI4 +line 365 +;365: right = left + cg.refdef.width-1; +ADDRLP4 16 +ADDRLP4 12 +INDIRI4 +ADDRGP4 cg+3616+8 +INDIRI4 +ADDI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 368 +;366: +;367: // clear above view screen +;368: CG_TileClearBox( 0, 0, w, top, cgs.media.backTileShader ); +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 cgs+70296+244 +INDIRI4 +ARGI4 +ADDRGP4 CG_TileClearBox +CALLV +pop +line 371 +;369: +;370: // clear below view screen +;371: CG_TileClearBox( 0, bottom, w, h - bottom, cgs.media.backTileShader ); +CNSTI4 0 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ARGI4 +ADDRGP4 cgs+70296+244 +INDIRI4 +ARGI4 +ADDRGP4 CG_TileClearBox +CALLV +pop +line 374 +;372: +;373: // clear left of view screen +;374: CG_TileClearBox( 0, top, left, bottom - top + 1, cgs.media.backTileShader ); +CNSTI4 0 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +SUBI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRGP4 cgs+70296+244 +INDIRI4 +ARGI4 +ADDRGP4 CG_TileClearBox +CALLV +pop +line 377 +;375: +;376: // clear right of view screen +;377: CG_TileClearBox( right, top, w - right, bottom - top + 1, cgs.media.backTileShader ); +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 16 +INDIRI4 +SUBI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +SUBI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRGP4 cgs+70296+244 +INDIRI4 +ARGI4 +ADDRGP4 CG_TileClearBox +CALLV +pop +line 378 +;378:} +LABELV $200 +endproc CG_TileClear 48 20 +bss +align 4 +LABELV $230 +skip 16 +export CG_FadeColor +code +proc CG_FadeColor 8 0 +line 387 +;379: +;380: +;381: +;382:/* +;383:================ +;384:CG_FadeColor +;385:================ +;386:*/ +;387:float *CG_FadeColor( int startMsec, int totalMsec ) { +line 391 +;388: static vec4_t color; +;389: int t; +;390: +;391: if ( startMsec == 0 ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $231 +line 392 +;392: return NULL; +CNSTP4 0 +RETP4 +ADDRGP4 $229 +JUMPV +LABELV $231 +line 395 +;393: } +;394: +;395: t = cg.time - startMsec; +ADDRLP4 0 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 0 +INDIRI4 +SUBI4 +ASGNI4 +line 397 +;396: +;397: if ( t >= totalMsec ) { +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRI4 +LTI4 $234 +line 398 +;398: return NULL; +CNSTP4 0 +RETP4 +ADDRGP4 $229 +JUMPV +LABELV $234 +line 402 +;399: } +;400: +;401: // fade out +;402: if ( totalMsec - t < FADE_TIME ) { +ADDRFP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +SUBI4 +CNSTI4 200 +GEI4 $236 +line 403 +;403: color[3] = ( totalMsec - t ) * 1.0/FADE_TIME; +ADDRGP4 $230+12 +CNSTF4 1065353216 +ADDRFP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +CNSTF4 1128792064 +DIVF4 +ASGNF4 +line 404 +;404: } else { +ADDRGP4 $237 +JUMPV +LABELV $236 +line 405 +;405: color[3] = 1.0; +ADDRGP4 $230+12 +CNSTF4 1065353216 +ASGNF4 +line 406 +;406: } +LABELV $237 +line 407 +;407: color[0] = color[1] = color[2] = 1; +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +ADDRGP4 $230+8 +ADDRLP4 4 +INDIRF4 +ASGNF4 +ADDRGP4 $230+4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +ADDRGP4 $230 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 409 +;408: +;409: return color; +ADDRGP4 $230 +RETP4 +LABELV $229 +endproc CG_FadeColor 8 0 +export CG_ColorForGivenHealth +proc CG_ColorForGivenHealth 0 0 +line 419 +;410:} +;411: +;412: +;413:/* +;414:================= +;415:CG_ColorForHealth +;416:================= +;417:*/ +;418:void CG_ColorForGivenHealth( vec4_t hcolor, int health ) +;419:{ +line 421 +;420: // set the color based on health +;421: hcolor[0] = 1.0; +ADDRFP4 0 +INDIRP4 +CNSTF4 1065353216 +ASGNF4 +line 422 +;422: if ( health >= 100 ) +ADDRFP4 4 +INDIRI4 +CNSTI4 100 +LTI4 $243 +line 423 +;423: { +line 424 +;424: hcolor[2] = 1.0; +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 425 +;425: } +ADDRGP4 $244 +JUMPV +LABELV $243 +line 426 +;426: else if ( health < 66 ) +ADDRFP4 4 +INDIRI4 +CNSTI4 66 +GEI4 $245 +line 427 +;427: { +line 428 +;428: hcolor[2] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 0 +ASGNF4 +line 429 +;429: } +ADDRGP4 $246 +JUMPV +LABELV $245 +line 431 +;430: else +;431: { +line 432 +;432: hcolor[2] = ( health - 66 ) / 33.0; +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRFP4 4 +INDIRI4 +CNSTI4 66 +SUBI4 +CVIF4 4 +CNSTF4 1107558400 +DIVF4 +ASGNF4 +line 433 +;433: } +LABELV $246 +LABELV $244 +line 435 +;434: +;435: if ( health > 60 ) +ADDRFP4 4 +INDIRI4 +CNSTI4 60 +LEI4 $247 +line 436 +;436: { +line 437 +;437: hcolor[1] = 1.0; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 438 +;438: } +ADDRGP4 $248 +JUMPV +LABELV $247 +line 439 +;439: else if ( health < 30 ) +ADDRFP4 4 +INDIRI4 +CNSTI4 30 +GEI4 $249 +line 440 +;440: { +line 441 +;441: hcolor[1] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 0 +ASGNF4 +line 442 +;442: } +ADDRGP4 $250 +JUMPV +LABELV $249 +line 444 +;443: else +;444: { +line 445 +;445: hcolor[1] = ( health - 30 ) / 30.0; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRFP4 4 +INDIRI4 +CNSTI4 30 +SUBI4 +CVIF4 4 +CNSTF4 1106247680 +DIVF4 +ASGNF4 +line 446 +;446: } +LABELV $250 +LABELV $248 +line 447 +;447:} +LABELV $242 +endproc CG_ColorForGivenHealth 0 0 +export CG_ColorForHealth +proc CG_ColorForHealth 20 8 +line 455 +;448: +;449:/* +;450:================= +;451:CG_ColorForHealth +;452:================= +;453:*/ +;454:void CG_ColorForHealth( vec4_t hcolor ) +;455:{ +line 462 +;456: int health; +;457: int count; +;458: int max; +;459: +;460: // calculate the total points of damage that can +;461: // be sustained at the current health / armor level +;462: health = cg.snap->ps.stats[STAT_HEALTH]; +ADDRLP4 0 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +ASGNI4 +line 464 +;463: +;464: if ( health <= 0 ) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GTI4 $253 +line 465 +;465: { +line 466 +;466: VectorClear( hcolor ); // black +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTF4 0 +ASGNF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 467 +;467: hcolor[3] = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 468 +;468: return; +ADDRGP4 $251 +JUMPV +LABELV $253 +line 471 +;469: } +;470: +;471: count = cg.snap->ps.stats[STAT_ARMOR]; +ADDRLP4 4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +ASGNI4 +line 472 +;472: max = health * ARMOR_PROTECTION / ( 1.0 - ARMOR_PROTECTION ); +ADDRLP4 12 +CNSTF4 1056964608 +ASGNF4 +ADDRLP4 8 +ADDRLP4 12 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +MULF4 +ADDRLP4 12 +INDIRF4 +DIVF4 +CVFI4 4 +ASGNI4 +line 473 +;473: if ( max < count ) +ADDRLP4 8 +INDIRI4 +ADDRLP4 4 +INDIRI4 +GEI4 $256 +line 474 +;474: { +line 475 +;475: count = max; +ADDRLP4 4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 476 +;476: } +LABELV $256 +line 477 +;477: health += count; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +ASGNI4 +line 479 +;478: +;479: hcolor[3] = 1.0; +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 480 +;480: CG_ColorForGivenHealth( hcolor, health ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 CG_ColorForGivenHealth +CALLV +pop +line 481 +;481:} +LABELV $251 +endproc CG_ColorForHealth 20 8 +export CG_DrawNumField +proc CG_DrawNumField 72 20 +line 492 +;482: +;483:/* +;484:============== +;485:CG_DrawNumField +;486: +;487:Take x,y positions as if 640 x 480 and scales them to the proper resolution +;488: +;489:============== +;490:*/ +;491:void CG_DrawNumField (int x, int y, int width, int value,int charWidth,int charHeight,int style,qboolean zeroFill) +;492:{ +line 497 +;493: char num[16], *ptr; +;494: int l; +;495: int frame; +;496: int xWidth; +;497: int i = 0; +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +line 499 +;498: +;499: if (width < 1) { +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +GEI4 $259 +line 500 +;500: return; +ADDRGP4 $258 +JUMPV +LABELV $259 +line 504 +;501: } +;502: +;503: // draw number string +;504: if (width > 5) { +ADDRFP4 8 +INDIRI4 +CNSTI4 5 +LEI4 $261 +line 505 +;505: width = 5; +ADDRFP4 8 +CNSTI4 5 +ASGNI4 +line 506 +;506: } +LABELV $261 +line 508 +;507: +;508: switch ( width ) { +ADDRLP4 36 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 1 +LTI4 $263 +ADDRLP4 36 +INDIRI4 +CNSTI4 4 +GTI4 $263 +ADDRLP4 36 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $293-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $293 +address $265 +address $272 +address $279 +address $286 +code +LABELV $265 +line 510 +;509: case 1: +;510: value = value > 9 ? 9 : value; +ADDRFP4 12 +INDIRI4 +CNSTI4 9 +LEI4 $267 +ADDRLP4 40 +CNSTI4 9 +ASGNI4 +ADDRGP4 $268 +JUMPV +LABELV $267 +ADDRLP4 40 +ADDRFP4 12 +INDIRI4 +ASGNI4 +LABELV $268 +ADDRFP4 12 +ADDRLP4 40 +INDIRI4 +ASGNI4 +line 511 +;511: value = value < 0 ? 0 : value; +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +GEI4 $270 +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +ADDRGP4 $271 +JUMPV +LABELV $270 +ADDRLP4 44 +ADDRFP4 12 +INDIRI4 +ASGNI4 +LABELV $271 +ADDRFP4 12 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 512 +;512: break; +ADDRGP4 $264 +JUMPV +LABELV $272 +line 514 +;513: case 2: +;514: value = value > 99 ? 99 : value; +ADDRFP4 12 +INDIRI4 +CNSTI4 99 +LEI4 $274 +ADDRLP4 48 +CNSTI4 99 +ASGNI4 +ADDRGP4 $275 +JUMPV +LABELV $274 +ADDRLP4 48 +ADDRFP4 12 +INDIRI4 +ASGNI4 +LABELV $275 +ADDRFP4 12 +ADDRLP4 48 +INDIRI4 +ASGNI4 +line 515 +;515: value = value < -9 ? -9 : value; +ADDRFP4 12 +INDIRI4 +CNSTI4 -9 +GEI4 $277 +ADDRLP4 52 +CNSTI4 -9 +ASGNI4 +ADDRGP4 $278 +JUMPV +LABELV $277 +ADDRLP4 52 +ADDRFP4 12 +INDIRI4 +ASGNI4 +LABELV $278 +ADDRFP4 12 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 516 +;516: break; +ADDRGP4 $264 +JUMPV +LABELV $279 +line 518 +;517: case 3: +;518: value = value > 999 ? 999 : value; +ADDRFP4 12 +INDIRI4 +CNSTI4 999 +LEI4 $281 +ADDRLP4 56 +CNSTI4 999 +ASGNI4 +ADDRGP4 $282 +JUMPV +LABELV $281 +ADDRLP4 56 +ADDRFP4 12 +INDIRI4 +ASGNI4 +LABELV $282 +ADDRFP4 12 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 519 +;519: value = value < -99 ? -99 : value; +ADDRFP4 12 +INDIRI4 +CNSTI4 -99 +GEI4 $284 +ADDRLP4 60 +CNSTI4 -99 +ASGNI4 +ADDRGP4 $285 +JUMPV +LABELV $284 +ADDRLP4 60 +ADDRFP4 12 +INDIRI4 +ASGNI4 +LABELV $285 +ADDRFP4 12 +ADDRLP4 60 +INDIRI4 +ASGNI4 +line 520 +;520: break; +ADDRGP4 $264 +JUMPV +LABELV $286 +line 522 +;521: case 4: +;522: value = value > 9999 ? 9999 : value; +ADDRFP4 12 +INDIRI4 +CNSTI4 9999 +LEI4 $288 +ADDRLP4 64 +CNSTI4 9999 +ASGNI4 +ADDRGP4 $289 +JUMPV +LABELV $288 +ADDRLP4 64 +ADDRFP4 12 +INDIRI4 +ASGNI4 +LABELV $289 +ADDRFP4 12 +ADDRLP4 64 +INDIRI4 +ASGNI4 +line 523 +;523: value = value < -999 ? -999 : value; +ADDRFP4 12 +INDIRI4 +CNSTI4 -999 +GEI4 $291 +ADDRLP4 68 +CNSTI4 -999 +ASGNI4 +ADDRGP4 $292 +JUMPV +LABELV $291 +ADDRLP4 68 +ADDRFP4 12 +INDIRI4 +ASGNI4 +LABELV $292 +ADDRFP4 12 +ADDRLP4 68 +INDIRI4 +ASGNI4 +line 524 +;524: break; +LABELV $263 +LABELV $264 +line 527 +;525: } +;526: +;527: Com_sprintf (num, sizeof(num), "%i", value); +ADDRLP4 20 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 $295 +ARGP4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 528 +;528: l = strlen(num); +ADDRLP4 20 +ARGP4 +ADDRLP4 40 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 40 +INDIRI4 +ASGNI4 +line 529 +;529: if (l > width) +ADDRLP4 4 +INDIRI4 +ADDRFP4 8 +INDIRI4 +LEI4 $296 +line 530 +;530: l = width; +ADDRLP4 4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +LABELV $296 +line 533 +;531: +;532: // FIXME: Might need to do something different for the chunky font?? +;533: switch(style) +ADDRLP4 44 +ADDRFP4 24 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 1 +EQI4 $302 +ADDRLP4 44 +INDIRI4 +CNSTI4 2 +EQI4 $300 +ADDRLP4 44 +INDIRI4 +CNSTI4 3 +EQI4 $301 +ADDRGP4 $298 +JUMPV +line 534 +;534: { +LABELV $300 +line 536 +;535: case NUM_FONT_SMALL: +;536: xWidth = charWidth; +ADDRLP4 8 +ADDRFP4 16 +INDIRI4 +ASGNI4 +line 537 +;537: break; +ADDRGP4 $299 +JUMPV +LABELV $301 +line 539 +;538: case NUM_FONT_CHUNKY: +;539: xWidth = (charWidth/1.2f) + 2; +ADDRLP4 8 +ADDRFP4 16 +INDIRI4 +CVIF4 4 +CNSTF4 1067030938 +DIVF4 +CNSTF4 1073741824 +ADDF4 +CVFI4 4 +ASGNI4 +line 540 +;540: break; +ADDRGP4 $299 +JUMPV +LABELV $298 +LABELV $302 +line 543 +;541: default: +;542: case NUM_FONT_BIG: +;543: xWidth = (charWidth/2) + 7;//(charWidth/6); +ADDRLP4 8 +ADDRFP4 16 +INDIRI4 +CNSTI4 2 +DIVI4 +CNSTI4 7 +ADDI4 +ASGNI4 +line 544 +;544: break; +LABELV $299 +line 547 +;545: } +;546: +;547: if ( zeroFill ) +ADDRFP4 28 +INDIRI4 +CNSTI4 0 +EQI4 $303 +line 548 +;548: { +line 549 +;549: for (i = 0; i < (width - l); i++ ) +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRGP4 $308 +JUMPV +LABELV $305 +line 550 +;550: { +line 551 +;551: switch(style) +ADDRLP4 48 +ADDRFP4 24 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 1 +EQI4 $317 +ADDRLP4 48 +INDIRI4 +CNSTI4 2 +EQI4 $311 +ADDRLP4 48 +INDIRI4 +CNSTI4 3 +EQI4 $314 +ADDRGP4 $309 +JUMPV +line 552 +;552: { +LABELV $311 +line 554 +;553: case NUM_FONT_SMALL: +;554: CG_DrawPic( x,y, charWidth, charHeight, cgs.media.smallnumberShaders[0] ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 20 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 cgs+70296+308 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 555 +;555: break; +ADDRGP4 $310 +JUMPV +LABELV $314 +line 557 +;556: case NUM_FONT_CHUNKY: +;557: CG_DrawPic( x,y, charWidth, charHeight, cgs.media.chunkyNumberShaders[0] ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 20 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 cgs+70296+352 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 558 +;558: break; +ADDRGP4 $310 +JUMPV +LABELV $309 +LABELV $317 +line 561 +;559: default: +;560: case NUM_FONT_BIG: +;561: CG_DrawPic( x,y, charWidth, charHeight, cgs.media.numberShaders[0] ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 20 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 cgs+70296+264 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 562 +;562: break; +LABELV $310 +line 564 +;563: } +;564: x += 2 + (xWidth); +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +ADDI4 +ADDI4 +ASGNI4 +line 565 +;565: } +LABELV $306 +line 549 +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $308 +ADDRLP4 16 +INDIRI4 +ADDRFP4 8 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +LTI4 $305 +line 566 +;566: } +ADDRGP4 $304 +JUMPV +LABELV $303 +line 568 +;567: else +;568: { +line 569 +;569: x += 2 + (xWidth)*(width - l); +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDRFP4 8 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +MULI4 +CNSTI4 2 +ADDI4 +ADDI4 +ASGNI4 +line 570 +;570: } +LABELV $304 +line 572 +;571: +;572: ptr = num; +ADDRLP4 0 +ADDRLP4 20 +ASGNP4 +ADDRGP4 $321 +JUMPV +LABELV $320 +line 574 +;573: while (*ptr && l) +;574: { +line 575 +;575: if (*ptr == '-') +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 45 +NEI4 $323 +line 576 +;576: frame = STAT_MINUS; +ADDRLP4 12 +CNSTI4 10 +ASGNI4 +ADDRGP4 $324 +JUMPV +LABELV $323 +line 578 +;577: else +;578: frame = *ptr -'0'; +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 48 +SUBI4 +ASGNI4 +LABELV $324 +line 580 +;579: +;580: switch(style) +ADDRLP4 48 +ADDRFP4 24 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 1 +EQI4 $333 +ADDRLP4 48 +INDIRI4 +CNSTI4 2 +EQI4 $327 +ADDRLP4 48 +INDIRI4 +CNSTI4 3 +EQI4 $330 +ADDRGP4 $325 +JUMPV +line 581 +;581: { +LABELV $327 +line 583 +;582: case NUM_FONT_SMALL: +;583: CG_DrawPic( x,y, charWidth, charHeight, cgs.media.smallnumberShaders[frame] ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 20 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+308 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 584 +;584: x++; // For a one line gap +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 585 +;585: break; +ADDRGP4 $326 +JUMPV +LABELV $330 +line 587 +;586: case NUM_FONT_CHUNKY: +;587: CG_DrawPic( x,y, charWidth, charHeight, cgs.media.chunkyNumberShaders[frame] ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 20 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+352 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 588 +;588: break; +ADDRGP4 $326 +JUMPV +LABELV $325 +LABELV $333 +line 591 +;589: default: +;590: case NUM_FONT_BIG: +;591: CG_DrawPic( x,y, charWidth, charHeight, cgs.media.numberShaders[frame] ); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 20 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+264 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 592 +;592: break; +LABELV $326 +line 595 +;593: } +;594: +;595: x += (xWidth); +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDI4 +ASGNI4 +line 596 +;596: ptr++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 597 +;597: l--; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 598 +;598: } +LABELV $321 +line 573 +ADDRLP4 48 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 48 +INDIRI4 +EQI4 $336 +ADDRLP4 4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +NEI4 $320 +LABELV $336 +line 600 +;599: +;600:} +LABELV $258 +endproc CG_DrawNumField 72 20 +export UI_DrawProportionalString +proc UI_DrawProportionalString 24 36 +line 604 +;601: +;602:#include "../ui/ui_shared.h" // for some text style junk +;603:void UI_DrawProportionalString( int x, int y, const char* str, int style, vec4_t color ) +;604:{ +line 608 +;605: // having all these different style defines (1 for UI, one for CG, and now one for the re->font stuff) +;606: // is dumb, but for now... +;607: // +;608: int iStyle = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 609 +;609: int iMenuFont = (style & UI_SMALLFONT) ? FONT_SMALL : FONT_MEDIUM; +ADDRFP4 12 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $348 +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +ADDRGP4 $349 +JUMPV +LABELV $348 +ADDRLP4 8 +CNSTI4 2 +ASGNI4 +LABELV $349 +ADDRLP4 4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 611 +;610: +;611: switch (style & (UI_LEFT|UI_CENTER|UI_RIGHT)) +ADDRLP4 12 +ADDRFP4 12 +INDIRI4 +CNSTI4 3 +BANDI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $351 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +EQI4 $354 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +EQI4 $355 +ADDRGP4 $351 +JUMPV +line 612 +;612: { +line 615 +;613: default: +;614: case UI_LEFT: +;615: { +line 617 +;616: // nada... +;617: } +line 618 +;618: break; +LABELV $354 +line 621 +;619: +;620: case UI_CENTER: +;621: { +line 622 +;622: x -= CG_Text_Width(str, 1.0, iMenuFont) / 2; +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 20 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +ASGNI4 +line 623 +;623: } +line 624 +;624: break; +ADDRGP4 $351 +JUMPV +LABELV $355 +line 627 +;625: +;626: case UI_RIGHT: +;627: { +line 628 +;628: x -= CG_Text_Width(str, 1.0, iMenuFont) / 2; +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 20 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +ASGNI4 +line 629 +;629: } +line 630 +;630: break; +LABELV $351 +line 633 +;631: } +;632: +;633: if (style & UI_DROPSHADOW) +ADDRFP4 12 +INDIRI4 +CNSTI4 2048 +BANDI4 +CNSTI4 0 +EQI4 $356 +line 634 +;634: { +line 635 +;635: iStyle = ITEM_TEXTSTYLE_SHADOWED; +ADDRLP4 0 +CNSTI4 3 +ASGNI4 +line 636 +;636: } +ADDRGP4 $357 +JUMPV +LABELV $356 +line 638 +;637: else +;638: if ( style & (UI_BLINK|UI_PULSE) ) +ADDRFP4 12 +INDIRI4 +CNSTI4 20480 +BANDI4 +CNSTI4 0 +EQI4 $358 +line 639 +;639: { +line 640 +;640: iStyle = ITEM_TEXTSTYLE_BLINK; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 641 +;641: } +LABELV $358 +LABELV $357 +line 643 +;642: +;643: CG_Text_Paint(x, y, 1.0, color, str, 0, 0, iStyle, iMenuFont); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 644 +;644:} +LABELV $346 +endproc UI_DrawProportionalString 24 36 +export UI_DrawScaledProportionalString +proc UI_DrawScaledProportionalString 16 36 +line 647 +;645: +;646:void UI_DrawScaledProportionalString( int x, int y, const char* str, int style, vec4_t color, float scale) +;647:{ +line 651 +;648: // having all these different style defines (1 for UI, one for CG, and now one for the re->font stuff) +;649: // is dumb, but for now... +;650: // +;651: int iStyle = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 653 +;652: +;653: switch (style & (UI_LEFT|UI_CENTER|UI_RIGHT)) +ADDRLP4 4 +ADDRFP4 12 +INDIRI4 +CNSTI4 3 +BANDI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $362 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +EQI4 $365 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +EQI4 $366 +ADDRGP4 $362 +JUMPV +line 654 +;654: { +line 657 +;655: default: +;656: case UI_LEFT: +;657: { +line 659 +;658: // nada... +;659: } +line 660 +;660: break; +LABELV $365 +line 663 +;661: +;662: case UI_CENTER: +;663: { +line 664 +;664: x -= CG_Text_Width(str, scale, FONT_MEDIUM) / 2; +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 20 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 12 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +ASGNI4 +line 665 +;665: } +line 666 +;666: break; +ADDRGP4 $362 +JUMPV +LABELV $366 +line 669 +;667: +;668: case UI_RIGHT: +;669: { +line 670 +;670: x -= CG_Text_Width(str, scale, FONT_MEDIUM) / 2; +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 20 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 12 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +ASGNI4 +line 671 +;671: } +line 672 +;672: break; +LABELV $362 +line 675 +;673: } +;674: +;675: if (style & UI_DROPSHADOW) +ADDRFP4 12 +INDIRI4 +CNSTI4 2048 +BANDI4 +CNSTI4 0 +EQI4 $367 +line 676 +;676: { +line 677 +;677: iStyle = ITEM_TEXTSTYLE_SHADOWED; +ADDRLP4 0 +CNSTI4 3 +ASGNI4 +line 678 +;678: } +ADDRGP4 $368 +JUMPV +LABELV $367 +line 680 +;679: else +;680: if ( style & (UI_BLINK|UI_PULSE) ) +ADDRFP4 12 +INDIRI4 +CNSTI4 20480 +BANDI4 +CNSTI4 0 +EQI4 $369 +line 681 +;681: { +line 682 +;682: iStyle = ITEM_TEXTSTYLE_BLINK; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 683 +;683: } +LABELV $369 +LABELV $368 +line 685 +;684: +;685: CG_Text_Paint(x, y, scale, color, str, 0, 0, iStyle, FONT_MEDIUM); +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 20 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 686 +;686:} +LABELV $360 +endproc UI_DrawScaledProportionalString 16 36 +import trap_SP_Register +import trap_SP_RegisterServer +import trap_PC_RemoveAllGlobalDefines +import trap_PC_LoadGlobalDefines +import trap_PC_SourceFileAndLine +import trap_PC_ReadToken +import trap_PC_FreeSource +import trap_PC_LoadSource +import trap_PC_AddGlobalDefine +import Controls_SetConfig +import Controls_GetConfig +import UI_OutOfMemory +import UI_InitMemory +import UI_Alloc +import Display_CacheAll +import Menu_SetFeederSelection +import Menu_Paint +import Menus_CloseAll +import LerpColor +import Display_HandleKey +import Menus_CloseByName +import Menus_ShowByName +import Menus_FindByName +import Menus_OpenByName +import Display_KeyBindPending +import Display_CursorType +import Display_MouseMove +import Display_CaptureItem +import Display_GetContext +import Menus_Activate +import Menus_AnyFullScreenVisible +import Menu_Reset +import Menus_ActivateByName +import Menu_PaintAll +import Menu_New +import Menu_Count +import PC_Script_Parse +import PC_String_Parse +import PC_Rect_Parse +import PC_Int_Parse +import PC_Color_Parse +import PC_Float_Parse +import Script_Parse +import String_Parse +import Rect_Parse +import Int_Parse +import Color_Parse +import Float_Parse +import Menu_ScrollFeeder +import Menu_HandleMouseMove +import Menu_HandleKey +import Menu_GetFocused +import Menu_PostParse +import Item_Init +import Menu_Init +import Display_ExpandMacros +import Init_Display +import String_Report +import String_Init +import String_Alloc +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_TeamColor +import CG_DrawString +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $295 +char 1 37 +char 1 105 +char 1 0 diff --git a/code/cgame/vm/cg_effects.asm b/code/cgame/vm/cg_effects.asm new file mode 100644 index 0000000..a4dc2b7 --- /dev/null +++ b/code/cgame/vm/cg_effects.asm @@ -0,0 +1,10652 @@ +export CG_BubbleTrail +code +proc CG_BubbleTrail 96 4 +file "../cg_effects.c" +line 15 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_effects.c -- these functions generate localentities, usually as a result +;4:// of event processing +;5: +;6:#include "cg_local.h" +;7: +;8:/* +;9:================== +;10:CG_BubbleTrail +;11: +;12:Bullets shot underwater +;13:================== +;14:*/ +;15:void CG_BubbleTrail( vec3_t start, vec3_t end, float spacing ) { +line 21 +;16: vec3_t move; +;17: vec3_t vec; +;18: float len; +;19: int i; +;20: +;21: if ( cg_noProjectileTrail.integer ) { +ADDRGP4 cg_noProjectileTrail+12 +INDIRI4 +CNSTI4 0 +EQI4 $121 +line 22 +;22: return; +ADDRGP4 $120 +JUMPV +LABELV $121 +line 25 +;23: } +;24: +;25: VectorCopy (start, move); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 26 +;26: VectorSubtract (end, start, vec); +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 40 +CNSTI4 4 +ASGNI4 +ADDRLP4 12+4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 44 +CNSTI4 8 +ASGNI4 +ADDRLP4 12+8 +ADDRFP4 4 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 27 +;27: len = VectorNormalize (vec); +ADDRLP4 12 +ARGP4 +ADDRLP4 48 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 28 +ADDRLP4 48 +INDIRF4 +ASGNF4 +line 30 +;28: +;29: // advance a random amount first +;30: i = rand() % (int)spacing; +ADDRLP4 52 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 52 +INDIRI4 +ADDRFP4 8 +INDIRF4 +CVFI4 4 +MODI4 +ASGNI4 +line 31 +;31: VectorMA( move, i, vec, move ); +ADDRLP4 56 +ADDRLP4 24 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 56 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 12+4 +INDIRF4 +ADDRLP4 56 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 12+8 +INDIRF4 +ADDRLP4 24 +INDIRI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 33 +;32: +;33: VectorScale (vec, spacing, vec); +ADDRLP4 60 +ADDRFP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +ADDRLP4 60 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 12+4 +ADDRLP4 12+4 +INDIRF4 +ADDRLP4 60 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 12+8 +ADDRLP4 12+8 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +line 35 +;34: +;35: for ( ; i < len; i += spacing ) { +ADDRGP4 $139 +JUMPV +LABELV $136 +line 39 +;36: localEntity_t *le; +;37: refEntity_t *re; +;38: +;39: le = CG_AllocLocalEntity(); +ADDRLP4 72 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 64 +ADDRLP4 72 +INDIRP4 +ASGNP4 +line 40 +;40: le->leFlags = LEF_PUFF_DONT_SCALE; +ADDRLP4 64 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 1 +ASGNI4 +line 41 +;41: le->leType = LE_MOVE_SCALE_FADE; +ADDRLP4 64 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 6 +ASGNI4 +line 42 +;42: le->startTime = cg.time; +ADDRLP4 64 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 43 +;43: le->endTime = cg.time + 1000 + random() * 250; +ADDRLP4 76 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1000 +ADDI4 +CVIF4 4 +CNSTF4 1132068864 +ADDRLP4 76 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 44 +;44: le->lifeRate = 1.0 / ( le->endTime - le->startTime ); +ADDRLP4 64 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 1065353216 +ADDRLP4 64 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 46 +;45: +;46: re = &le->refEntity; +ADDRLP4 68 +ADDRLP4 64 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 47 +;47: re->shaderTime = cg.time / 1000.0f; +ADDRLP4 68 +INDIRP4 +CNSTI4 100 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +CNSTF4 1148846080 +DIVF4 +ASGNF4 +line 49 +;48: +;49: re->reType = RT_SPRITE; +ADDRLP4 68 +INDIRP4 +CNSTI4 2 +ASGNI4 +line 50 +;50: re->rotation = 0; +ADDRLP4 68 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTF4 0 +ASGNF4 +line 51 +;51: re->radius = 3; +ADDRLP4 68 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTF4 1077936128 +ASGNF4 +line 52 +;52: re->customShader = cgs.media.waterBubbleShader; +ADDRLP4 68 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRGP4 cgs+70296+256 +INDIRI4 +ASGNI4 +line 53 +;53: re->shaderRGBA[0] = 0xff; +ADDRLP4 68 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTU1 255 +ASGNU1 +line 54 +;54: re->shaderRGBA[1] = 0xff; +ADDRLP4 68 +INDIRP4 +CNSTI4 81 +ADDP4 +CNSTU1 255 +ASGNU1 +line 55 +;55: re->shaderRGBA[2] = 0xff; +ADDRLP4 68 +INDIRP4 +CNSTI4 82 +ADDP4 +CNSTU1 255 +ASGNU1 +line 56 +;56: re->shaderRGBA[3] = 0xff; +ADDRLP4 68 +INDIRP4 +CNSTI4 83 +ADDP4 +CNSTU1 255 +ASGNU1 +line 58 +;57: +;58: le->color[3] = 1.0; +ADDRLP4 64 +INDIRP4 +CNSTI4 136 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 60 +;59: +;60: le->pos.trType = TR_LINEAR; +ADDRLP4 64 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTI4 2 +ASGNI4 +line 61 +;61: le->pos.trTime = cg.time; +ADDRLP4 64 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 62 +;62: VectorCopy( move, le->pos.trBase ); +ADDRLP4 64 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 63 +;63: le->pos.trDelta[0] = crandom()*5; +ADDRLP4 84 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1084227584 +CNSTF4 1073741824 +ADDRLP4 84 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 64 +;64: le->pos.trDelta[1] = crandom()*5; +ADDRLP4 88 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 1084227584 +CNSTF4 1073741824 +ADDRLP4 88 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 65 +;65: le->pos.trDelta[2] = crandom()*5 + 6; +ADDRLP4 92 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTF4 1084227584 +CNSTF4 1073741824 +ADDRLP4 92 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1086324736 +ADDF4 +ASGNF4 +line 67 +;66: +;67: VectorAdd (move, vec, move); +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 12 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 12+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 12+8 +INDIRF4 +ADDF4 +ASGNF4 +line 68 +;68: } +LABELV $137 +line 35 +ADDRLP4 24 +ADDRLP4 24 +INDIRI4 +CVIF4 4 +ADDRFP4 8 +INDIRF4 +ADDF4 +CVFI4 4 +ASGNI4 +LABELV $139 +ADDRLP4 24 +INDIRI4 +CVIF4 4 +ADDRLP4 28 +INDIRF4 +LTF4 $136 +line 69 +;69:} +LABELV $120 +endproc CG_BubbleTrail 96 4 +data +align 4 +LABELV $153 +byte 4 146 +export CG_SmokePuff +code +proc CG_SmokePuff 52 4 +line 85 +;70: +;71:/* +;72:===================== +;73:CG_SmokePuff +;74: +;75:Adds a smoke puff or blood trail localEntity. +;76:===================== +;77:*/ +;78:localEntity_t *CG_SmokePuff( const vec3_t p, const vec3_t vel, +;79: float radius, +;80: float r, float g, float b, float a, +;81: float duration, +;82: int startTime, +;83: int fadeInTime, +;84: int leFlags, +;85: qhandle_t hShader ) { +line 91 +;86: static int seed = 0x92; +;87: localEntity_t *le; +;88: refEntity_t *re; +;89:// int fadeInTime = startTime + duration / 2; +;90: +;91: le = CG_AllocLocalEntity(); +ADDRLP4 8 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 92 +;92: le->leFlags = leFlags; +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 40 +INDIRI4 +ASGNI4 +line 93 +;93: le->radius = radius; +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +ADDRFP4 8 +INDIRF4 +ASGNF4 +line 95 +;94: +;95: re = &le->refEntity; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 96 +;96: re->rotation = Q_random( &seed ) * 360; +ADDRGP4 $153 +ARGP4 +ADDRLP4 12 +ADDRGP4 Q_random +CALLF4 +ASGNF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTF4 1135869952 +ADDRLP4 12 +INDIRF4 +MULF4 +ASGNF4 +line 97 +;97: re->radius = radius; +ADDRLP4 4 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 8 +INDIRF4 +ASGNF4 +line 98 +;98: re->shaderTime = startTime / 1000.0f; +ADDRLP4 4 +INDIRP4 +CNSTI4 100 +ADDP4 +ADDRFP4 32 +INDIRI4 +CVIF4 4 +CNSTF4 1148846080 +DIVF4 +ASGNF4 +line 100 +;99: +;100: le->leType = LE_MOVE_SCALE_FADE; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 6 +ASGNI4 +line 101 +;101: le->startTime = startTime; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRFP4 32 +INDIRI4 +ASGNI4 +line 102 +;102: le->fadeInTime = fadeInTime; +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRFP4 36 +INDIRI4 +ASGNI4 +line 103 +;103: le->endTime = startTime + duration; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRFP4 32 +INDIRI4 +CVIF4 4 +ADDRFP4 28 +INDIRF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 104 +;104: if ( fadeInTime > startTime ) { +ADDRFP4 36 +INDIRI4 +ADDRFP4 32 +INDIRI4 +LEI4 $154 +line 105 +;105: le->lifeRate = 1.0 / ( le->endTime - le->fadeInTime ); +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 1065353216 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 106 +;106: } +ADDRGP4 $155 +JUMPV +LABELV $154 +line 107 +;107: else { +line 108 +;108: le->lifeRate = 1.0 / ( le->endTime - le->startTime ); +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 1065353216 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 109 +;109: } +LABELV $155 +line 110 +;110: le->color[0] = r; +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +ADDRFP4 12 +INDIRF4 +ASGNF4 +line 111 +;111: le->color[1] = g; +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ADDRFP4 16 +INDIRF4 +ASGNF4 +line 112 +;112: le->color[2] = b; +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRFP4 20 +INDIRF4 +ASGNF4 +line 113 +;113: le->color[3] = a; +ADDRLP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +ADDRFP4 24 +INDIRF4 +ASGNF4 +line 116 +;114: +;115: +;116: le->pos.trType = TR_LINEAR; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTI4 2 +ASGNI4 +line 117 +;117: le->pos.trTime = startTime; +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRFP4 32 +INDIRI4 +ASGNI4 +line 118 +;118: VectorCopy( vel, le->pos.trDelta ); +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 119 +;119: VectorCopy( p, le->pos.trBase ); +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 121 +;120: +;121: VectorCopy( p, re->origin ); +ADDRLP4 4 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 122 +;122: re->customShader = hShader; +ADDRLP4 4 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRFP4 44 +INDIRI4 +ASGNI4 +line 124 +;123: +;124: re->shaderRGBA[0] = le->color[0] * 0xff; +ADDRLP4 20 +CNSTF4 1132396544 +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 24 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ADDRLP4 24 +INDIRF4 +LTF4 $157 +ADDRLP4 16 +ADDRLP4 20 +INDIRF4 +ADDRLP4 24 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $158 +JUMPV +LABELV $157 +ADDRLP4 16 +ADDRLP4 20 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $158 +ADDRLP4 4 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRLP4 16 +INDIRU4 +CVUU1 4 +ASGNU1 +line 125 +;125: re->shaderRGBA[1] = le->color[1] * 0xff; +ADDRLP4 32 +CNSTF4 1132396544 +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 36 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LTF4 $160 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $161 +JUMPV +LABELV $160 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $161 +ADDRLP4 4 +INDIRP4 +CNSTI4 81 +ADDP4 +ADDRLP4 28 +INDIRU4 +CVUU1 4 +ASGNU1 +line 126 +;126: re->shaderRGBA[2] = le->color[2] * 0xff; +ADDRLP4 44 +CNSTF4 1132396544 +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 48 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 44 +INDIRF4 +ADDRLP4 48 +INDIRF4 +LTF4 $163 +ADDRLP4 40 +ADDRLP4 44 +INDIRF4 +ADDRLP4 48 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $164 +JUMPV +LABELV $163 +ADDRLP4 40 +ADDRLP4 44 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $164 +ADDRLP4 4 +INDIRP4 +CNSTI4 82 +ADDP4 +ADDRLP4 40 +INDIRU4 +CVUU1 4 +ASGNU1 +line 127 +;127: re->shaderRGBA[3] = 0xff; +ADDRLP4 4 +INDIRP4 +CNSTI4 83 +ADDP4 +CNSTU1 255 +ASGNU1 +line 129 +;128: +;129: re->reType = RT_SPRITE; +ADDRLP4 4 +INDIRP4 +CNSTI4 2 +ASGNI4 +line 130 +;130: re->radius = le->radius; +ADDRLP4 4 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +ASGNF4 +line 132 +;131: +;132: return le; +ADDRLP4 0 +INDIRP4 +RETP4 +LABELV $152 +endproc CG_SmokePuff 52 4 +export CG_TestLine +proc CG_TestLine 29 0 +line 135 +;133:} +;134: +;135:void CG_TestLine( vec3_t start, vec3_t end, int time, unsigned int color, int radius) { +line 139 +;136: localEntity_t *le; +;137: refEntity_t *re; +;138: +;139: le = CG_AllocLocalEntity(); +ADDRLP4 8 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 140 +;140: le->leType = LE_LINE; +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 13 +ASGNI4 +line 141 +;141: le->startTime = cg.time; +ADDRLP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 142 +;142: le->endTime = cg.time + time; +ADDRLP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRI4 +ADDI4 +ASGNI4 +line 143 +;143: le->lifeRate = 1.0 / ( le->endTime - le->startTime ); +ADDRLP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 1065353216 +ADDRLP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 145 +;144: +;145: re = &le->refEntity; +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 146 +;146: VectorCopy( start, re->origin ); +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 147 +;147: VectorCopy( end, re->oldorigin); +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 148 +;148: re->shaderTime = cg.time / 1000.0f; +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +CNSTF4 1148846080 +DIVF4 +ASGNF4 +line 150 +;149: +;150: re->reType = RT_LINE; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ASGNI4 +line 151 +;151: re->radius = 0.5*radius; +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTF4 1056964608 +ADDRFP4 16 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +line 152 +;152: re->customShader = cgs.media.whiteShader; //trap_R_RegisterShaderNoMip("textures/colombia/canvas_doublesided"); +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRGP4 cgs+70296+4 +INDIRI4 +ASGNI4 +line 154 +;153: +;154: re->shaderTexCoord[0] = re->shaderTexCoord[1] = 1.0f; +ADDRLP4 20 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRLP4 20 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +ADDRLP4 20 +INDIRF4 +ASGNF4 +line 156 +;155: +;156: if (color==0) +ADDRFP4 12 +INDIRU4 +CNSTU4 0 +NEU4 $171 +line 157 +;157: { +line 158 +;158: re->shaderRGBA[0] = re->shaderRGBA[1] = re->shaderRGBA[2] = re->shaderRGBA[3] = 0xff; +ADDRLP4 28 +CNSTU1 255 +ASGNU1 +ADDRLP4 0 +INDIRP4 +CNSTI4 83 +ADDP4 +ADDRLP4 28 +INDIRU1 +ASGNU1 +ADDRLP4 0 +INDIRP4 +CNSTI4 82 +ADDP4 +ADDRLP4 28 +INDIRU1 +ASGNU1 +ADDRLP4 0 +INDIRP4 +CNSTI4 81 +ADDP4 +ADDRLP4 28 +INDIRU1 +ASGNU1 +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRLP4 28 +INDIRU1 +ASGNU1 +line 159 +;159: } +ADDRGP4 $172 +JUMPV +LABELV $171 +line 161 +;160: else +;161: { +line 162 +;162: re->shaderRGBA[0] = color & 0xff; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRFP4 12 +INDIRU4 +CNSTU4 255 +BANDU4 +CVUU1 4 +ASGNU1 +line 163 +;163: color >>= 8; +ADDRFP4 12 +ADDRFP4 12 +INDIRU4 +CNSTI4 8 +RSHU4 +ASGNU4 +line 164 +;164: re->shaderRGBA[1] = color & 0xff; +ADDRLP4 0 +INDIRP4 +CNSTI4 81 +ADDP4 +ADDRFP4 12 +INDIRU4 +CNSTU4 255 +BANDU4 +CVUU1 4 +ASGNU1 +line 165 +;165: color >>= 8; +ADDRFP4 12 +ADDRFP4 12 +INDIRU4 +CNSTI4 8 +RSHU4 +ASGNU4 +line 166 +;166: re->shaderRGBA[2] = color & 0xff; +ADDRLP4 0 +INDIRP4 +CNSTI4 82 +ADDP4 +ADDRFP4 12 +INDIRU4 +CNSTU4 255 +BANDU4 +CVUU1 4 +ASGNU1 +line 169 +;167:// color >>= 8; +;168:// re->shaderRGBA[3] = color & 0xff; +;169: re->shaderRGBA[3] = 0xff; +ADDRLP4 0 +INDIRP4 +CNSTI4 83 +ADDP4 +CNSTU1 255 +ASGNU1 +line 170 +;170: } +LABELV $172 +line 172 +;171: +;172: le->color[3] = 1.0; +ADDRLP4 4 +INDIRP4 +CNSTI4 136 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 173 +;173:} +LABELV $165 +endproc CG_TestLine 29 0 +export CG_ThrowChunk +proc CG_ThrowChunk 20 8 +line 180 +;174: +;175:/* +;176:================== +;177:CG_ThrowChunk +;178:================== +;179:*/ +;180:void CG_ThrowChunk( vec3_t origin, vec3_t velocity, qhandle_t hModel, int optionalSound, int startalpha ) { +line 184 +;181: localEntity_t *le; +;182: refEntity_t *re; +;183: +;184: le = CG_AllocLocalEntity(); +ADDRLP4 8 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 185 +;185: re = &le->refEntity; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 187 +;186: +;187: le->leType = LE_FRAGMENT; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 4 +ASGNI4 +line 188 +;188: le->startTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 189 +;189: le->endTime = le->startTime + 5000 + random() * 3000; +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 5000 +ADDI4 +CVIF4 4 +CNSTF4 1161527296 +ADDRLP4 12 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 191 +;190: +;191: VectorCopy( origin, re->origin ); +ADDRLP4 4 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 192 +;192: AxisCopy( axisDefault, re->axis ); +ADDRGP4 axisDefault +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRGP4 AxisCopy +CALLV +pop +line 193 +;193: re->hModel = hModel; +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 195 +;194: +;195: le->pos.trType = TR_GRAVITY; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTI4 5 +ASGNI4 +line 196 +;196: le->angles.trType = TR_GRAVITY; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +CNSTI4 5 +ASGNI4 +line 197 +;197: VectorCopy( origin, le->pos.trBase ); +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 198 +;198: VectorCopy( velocity, le->pos.trDelta ); +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 199 +;199: VectorSet(le->angles.trBase, 20, 20, 20); +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTF4 1101004800 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1101004800 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTF4 1101004800 +ASGNF4 +line 200 +;200: VectorCopy( velocity, le->angles.trDelta ); +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 201 +;201: le->pos.trTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 202 +;202: le->angles.trTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 204 +;203: +;204: le->leFlags = LEF_TUMBLE; +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 2 +ASGNI4 +line 206 +;205: +;206: le->angles.trBase[YAW] = 180; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1127481344 +ASGNF4 +line 208 +;207: +;208: le->bounceFactor = 0.3f; +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTF4 1050253722 +ASGNF4 +line 209 +;209: le->bounceSound = optionalSound; +ADDRLP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +ADDRFP4 12 +INDIRI4 +ASGNI4 +line 211 +;210: +;211: le->forceAlpha = startalpha; +ADDRLP4 0 +INDIRP4 +CNSTI4 120 +ADDP4 +ADDRFP4 16 +INDIRI4 +ASGNI4 +line 212 +;212:} +LABELV $173 +endproc CG_ThrowChunk 20 8 +proc CG_DoGlassQuad 280 4 +line 231 +;213: +;214://---------------------------- +;215:// +;216:// Breaking Glass Technology +;217:// +;218://---------------------------- +;219: +;220:// Since we have shared verts when we tesselate the glass sheet, it helps to have a +;221:// random offset table set up up front. +;222: +;223:static float offX[20][20], +;224: offZ[20][20]; +;225: +;226:#define FX_ALPHA_NONLINEAR 0x00000004 +;227:#define FX_APPLY_PHYSICS 0x02000000 +;228:#define FX_USE_ALPHA 0x08000000 +;229: +;230:static void CG_DoGlassQuad( vec3_t p[4], vec2_t uv[4], qboolean stick, int time, vec3_t dmgDir ) +;231:{ +line 239 +;232: float bounce; +;233: vec3_t rotDelta; +;234: vec3_t vel, accel; +;235: vec3_t rgb1; +;236: addpolyArgStruct_t apArgs; +;237: int i, i_2; +;238: +;239: VectorSet( vel, crandom() * 12, crandom() * 12, -1 ); +ADDRLP4 240 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 188 +CNSTF4 1094713344 +CNSTF4 1073741824 +ADDRLP4 240 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 244 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 188+4 +CNSTF4 1094713344 +CNSTF4 1073741824 +ADDRLP4 244 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 188+8 +CNSTF4 3212836864 +ASGNF4 +line 241 +;240: +;241: if ( !stick ) +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $180 +line 242 +;242: { +line 244 +;243: // We aren't a motion delayed chunk, so let us move quickly +;244: VectorMA( vel, 0.3f, dmgDir, vel ); +ADDRLP4 248 +CNSTF4 1050253722 +ASGNF4 +ADDRLP4 252 +ADDRFP4 16 +INDIRP4 +ASGNP4 +ADDRLP4 188 +ADDRLP4 188 +INDIRF4 +ADDRLP4 248 +INDIRF4 +ADDRLP4 252 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 188+4 +ADDRLP4 188+4 +INDIRF4 +ADDRLP4 248 +INDIRF4 +ADDRLP4 252 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 188+8 +ADDRLP4 188+8 +INDIRF4 +CNSTF4 1050253722 +ADDRFP4 16 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 245 +;245: } +LABELV $180 +line 248 +;246: +;247: // Set up acceleration due to gravity, 800 is standard QuakeIII gravity, so let's use something close +;248: VectorSet( accel, 0.0f, 0.0f, -(600.0f + random() * 100.0f ) ); +ADDRLP4 248 +CNSTF4 0 +ASGNF4 +ADDRLP4 224 +ADDRLP4 248 +INDIRF4 +ASGNF4 +ADDRLP4 224+4 +ADDRLP4 248 +INDIRF4 +ASGNF4 +ADDRLP4 252 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 224+8 +CNSTF4 1120403456 +ADDRLP4 252 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +CNSTF4 1142292480 +ADDF4 +NEGF4 +ASGNF4 +line 252 +;249: +;250: // We are using an additive shader, so let's set the RGB low so we look more like transparent glass +;251:// VectorSet( rgb1, 0.1f, 0.1f, 0.1f ); +;252: VectorSet( rgb1, 1.0f, 1.0f, 1.0f ); +ADDRLP4 256 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 200 +ADDRLP4 256 +INDIRF4 +ASGNF4 +ADDRLP4 200+4 +ADDRLP4 256 +INDIRF4 +ASGNF4 +ADDRLP4 200+8 +CNSTF4 1065353216 +ASGNF4 +line 255 +;253: +;254: // Being glass, we don't want to bounce much +;255: bounce = random() * 0.2f + 0.15f; +ADDRLP4 260 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 236 +CNSTF4 1045220557 +ADDRLP4 260 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +CNSTF4 1041865114 +ADDF4 +ASGNF4 +line 258 +;256: +;257: // Set up our random rotate, we only do PITCH and YAW, not ROLL. This is something like degrees per second +;258: VectorSet( rotDelta, crandom() * 40.0f, crandom() * 40.0f, 0.0f ); +ADDRLP4 264 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 212 +CNSTF4 1109393408 +CNSTF4 1073741824 +ADDRLP4 264 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 268 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 212+4 +CNSTF4 1109393408 +CNSTF4 1073741824 +ADDRLP4 268 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 0 +ASGNF4 +line 280 +;259: +;260: //In an ideal world, this might actually work. +;261: /* +;262: CPoly *pol = FX_AddPoly(p, uv, 4, // verts, ST, vertCount +;263: vel, accel, // motion +;264: 0.15f, 0.0f, 85.0f, // alpha start, alpha end, alpha parm ( begin alpha fade when 85% of life is complete ) +;265: rgb1, rgb1, 0.0f, // rgb start, rgb end, rgb parm ( not used ) +;266: rotDelta, bounce, time, // rotation amount, bounce, and time to delay motion for ( zero if no delay ); +;267: 6000, // life +;268: cgi_R_RegisterShader( "gfx/misc/test_crackle" ), +;269: FX_APPLY_PHYSICS | FX_ALPHA_NONLINEAR | FX_USE_ALPHA ); +;270: +;271: if ( random() > 0.95f && pol ) +;272: { +;273: pol->AddFlags( FX_IMPACT_RUNS_FX | FX_KILL_ON_IMPACT ); +;274: pol->SetImpactFxID( theFxScheduler.RegisterEffect( "glass_impact" )); +;275: } +;276: */ +;277: +;278: //rww - this is dirty. +;279: +;280: i = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 281 +;281: i_2 = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $193 +JUMPV +line 284 +;282: +;283: while (i < 4) +;284: { +LABELV $195 +line 286 +;285: while (i_2 < 3) +;286: { +line 287 +;287: apArgs.p[i][i_2] = p[i][i_2]; +ADDRLP4 272 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 276 +CNSTI4 12 +ADDRLP4 4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 272 +INDIRI4 +ADDRLP4 276 +INDIRI4 +ADDRLP4 8 +ADDP4 +ADDP4 +ADDRLP4 272 +INDIRI4 +ADDRLP4 276 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ADDP4 +INDIRF4 +ASGNF4 +line 289 +;288: +;289: i_2++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 290 +;290: } +LABELV $196 +line 285 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $195 +line 292 +;291: +;292: i_2 = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 293 +;293: i++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 294 +;294: } +LABELV $193 +line 283 +ADDRLP4 4 +INDIRI4 +CNSTI4 4 +LTI4 $196 +line 296 +;295: +;296: i = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 297 +;297: i_2 = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $199 +JUMPV +line 300 +;298: +;299: while (i < 4) +;300: { +LABELV $201 +line 302 +;301: while (i_2 < 2) +;302: { +line 303 +;303: apArgs.ev[i][i_2] = uv[i][i_2]; +ADDRLP4 272 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 276 +ADDRLP4 4 +INDIRI4 +CNSTI4 3 +LSHI4 +ASGNI4 +ADDRLP4 272 +INDIRI4 +ADDRLP4 276 +INDIRI4 +ADDRLP4 8+48 +ADDP4 +ADDP4 +ADDRLP4 272 +INDIRI4 +ADDRLP4 276 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +ADDP4 +INDIRF4 +ASGNF4 +line 305 +;304: +;305: i_2++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 306 +;306: } +LABELV $202 +line 301 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LTI4 $201 +line 308 +;307: +;308: i_2 = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 309 +;309: i++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 310 +;310: } +LABELV $199 +line 299 +ADDRLP4 4 +INDIRI4 +CNSTI4 4 +LTI4 $202 +line 312 +;311: +;312: apArgs.numVerts = 4; +ADDRLP4 8+80 +CNSTI4 4 +ASGNI4 +line 313 +;313: VectorCopy(vel, apArgs.vel); +ADDRLP4 8+84 +ADDRLP4 188 +INDIRB +ASGNB 12 +line 314 +;314: VectorCopy(accel, apArgs.accel); +ADDRLP4 8+96 +ADDRLP4 224 +INDIRB +ASGNB 12 +line 316 +;315: +;316: apArgs.alpha1 = 0.15f; +ADDRLP4 8+108 +CNSTF4 1041865114 +ASGNF4 +line 317 +;317: apArgs.alpha2 = 0.0f; +ADDRLP4 8+112 +CNSTF4 0 +ASGNF4 +line 318 +;318: apArgs.alphaParm = 85.0f; +ADDRLP4 8+116 +CNSTF4 1118437376 +ASGNF4 +line 320 +;319: +;320: VectorCopy(rgb1, apArgs.rgb1); +ADDRLP4 8+120 +ADDRLP4 200 +INDIRB +ASGNB 12 +line 321 +;321: VectorCopy(rgb1, apArgs.rgb2); +ADDRLP4 8+132 +ADDRLP4 200 +INDIRB +ASGNB 12 +line 323 +;322: +;323: apArgs.rgbParm = 0.0f; +ADDRLP4 8+144 +CNSTF4 0 +ASGNF4 +line 325 +;324: +;325: VectorCopy(rotDelta, apArgs.rotationDelta); +ADDRLP4 8+148 +ADDRLP4 212 +INDIRB +ASGNB 12 +line 327 +;326: +;327: apArgs.bounce = bounce; +ADDRLP4 8+160 +ADDRLP4 236 +INDIRF4 +ASGNF4 +line 328 +;328: apArgs.motionDelay = time; +ADDRLP4 8+164 +ADDRFP4 12 +INDIRI4 +ASGNI4 +line 329 +;329: apArgs.killTime = 6000; +ADDRLP4 8+168 +CNSTI4 6000 +ASGNI4 +line 330 +;330: apArgs.shader = cgs.media.glassShardShader; +ADDRLP4 8+172 +ADDRGP4 cgs+70296+408 +INDIRI4 +ASGNI4 +line 331 +;331: apArgs.flags = (FX_APPLY_PHYSICS | FX_ALPHA_NONLINEAR | FX_USE_ALPHA); +ADDRLP4 8+176 +CNSTI4 167772164 +ASGNI4 +line 333 +;332: +;333: trap_FX_AddPoly(&apArgs); +ADDRLP4 8 +ARGP4 +ADDRGP4 trap_FX_AddPoly +CALLV +pop +line 334 +;334:} +LABELV $177 +endproc CG_DoGlassQuad 280 4 +proc CG_CalcBiLerp 276 0 +line 337 +;335: +;336:static void CG_CalcBiLerp( vec3_t verts[4], vec3_t subVerts[4], vec2_t uv[4] ) +;337:{ +line 341 +;338: vec3_t temp; +;339: +;340: // Nasty crap +;341: VectorScale( verts[0], 1.0f - uv[0][0], subVerts[0] ); +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 12 +CNSTI4 4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 16 +CNSTI4 8 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 342 +;342: VectorMA( subVerts[0], uv[0][0], verts[1], subVerts[0] ); +ADDRLP4 20 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 28 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 343 +;343: VectorScale( subVerts[0], 1.0f - uv[0][1], temp ); +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 40 +CNSTI4 4 +ASGNI4 +ADDRLP4 44 +ADDRFP4 8 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 36 +INDIRF4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRF4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 344 +;344: VectorScale( verts[3], 1.0f - uv[0][0], subVerts[0] ); +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 345 +;345: VectorMA( subVerts[0], uv[0][0], verts[2], subVerts[0] ); +ADDRLP4 48 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 52 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 56 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 346 +;346: VectorMA( temp, uv[0][1], subVerts[0], subVerts[0] ); +ADDRLP4 60 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 0 +INDIRF4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 64 +CNSTI4 4 +ASGNI4 +ADDRLP4 68 +ADDRFP4 4 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 68 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 72 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 72 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 348 +;347: +;348: VectorScale( verts[0], 1.0f - uv[1][0], subVerts[1] ); +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 76 +CNSTI4 8 +ASGNI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 76 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +ADDRLP4 76 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 349 +;349: VectorMA( subVerts[1], uv[1][0], verts[1], subVerts[1] ); +ADDRLP4 80 +CNSTI4 12 +ASGNI4 +ADDRLP4 84 +ADDRFP4 4 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 88 +CNSTI4 16 +ASGNI4 +ADDRLP4 92 +ADDRFP4 4 +INDIRP4 +ADDRLP4 88 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +ADDRLP4 92 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 88 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 96 +CNSTI4 20 +ASGNI4 +ADDRLP4 100 +ADDRFP4 4 +INDIRP4 +ADDRLP4 96 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 100 +INDIRP4 +ADDRLP4 100 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 96 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 350 +;350: VectorScale( subVerts[1], 1.0f - uv[1][1], temp ); +ADDRLP4 104 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 108 +CNSTI4 12 +ASGNI4 +ADDRLP4 112 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 116 +ADDRFP4 8 +INDIRP4 +ADDRLP4 108 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 104 +INDIRP4 +ADDRLP4 108 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 112 +INDIRF4 +ADDRLP4 116 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 104 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 112 +INDIRF4 +ADDRLP4 116 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 351 +;351: VectorScale( verts[3], 1.0f - uv[1][0], subVerts[1] ); +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 352 +;352: VectorMA( subVerts[1], uv[1][0], verts[2], subVerts[1] ); +ADDRLP4 120 +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 120 +INDIRP4 +ADDRLP4 120 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 124 +ADDRFP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +ADDRLP4 124 +INDIRP4 +ADDRLP4 124 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 128 +ADDRFP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 128 +INDIRP4 +ADDRLP4 128 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 353 +;353: VectorMA( temp, uv[1][1], subVerts[1], subVerts[1] ); +ADDRLP4 132 +CNSTI4 12 +ASGNI4 +ADDRLP4 136 +ADDRFP4 4 +INDIRP4 +ADDRLP4 132 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 136 +INDIRP4 +ADDRLP4 0 +INDIRF4 +ADDRLP4 136 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 132 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 140 +ADDRFP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +ADDRLP4 140 +INDIRP4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 140 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 144 +ADDRFP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 144 +INDIRP4 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 144 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 355 +;354: +;355: VectorScale( verts[0], 1.0f - uv[2][0], subVerts[2] ); +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 356 +;356: VectorMA( subVerts[2], uv[2][0], verts[1], subVerts[2] ); +ADDRLP4 148 +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 148 +INDIRP4 +ADDRLP4 148 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 152 +ADDRFP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 156 +CNSTI4 16 +ASGNI4 +ADDRLP4 152 +INDIRP4 +ADDRLP4 152 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 156 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 156 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 160 +ADDRFP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 160 +INDIRP4 +ADDRLP4 160 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 357 +;357: VectorScale( subVerts[2], 1.0f - uv[2][1], temp ); +ADDRLP4 164 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 168 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 172 +ADDRFP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 164 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 168 +INDIRF4 +ADDRLP4 172 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 164 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 168 +INDIRF4 +ADDRLP4 172 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 358 +;358: VectorScale( verts[3], 1.0f - uv[2][0], subVerts[2] ); +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 359 +;359: VectorMA( subVerts[2], uv[2][0], verts[2], subVerts[2] ); +ADDRLP4 176 +CNSTI4 24 +ASGNI4 +ADDRLP4 180 +ADDRFP4 4 +INDIRP4 +ADDRLP4 176 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 180 +INDIRP4 +ADDRLP4 180 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 176 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 184 +CNSTI4 28 +ASGNI4 +ADDRLP4 188 +ADDRFP4 4 +INDIRP4 +ADDRLP4 184 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 188 +INDIRP4 +ADDRLP4 188 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 184 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 192 +CNSTI4 32 +ASGNI4 +ADDRLP4 196 +ADDRFP4 4 +INDIRP4 +ADDRLP4 192 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 196 +INDIRP4 +ADDRLP4 196 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 192 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 360 +;360: VectorMA( temp, uv[2][1], subVerts[2], subVerts[2] ); +ADDRLP4 200 +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 200 +INDIRP4 +ADDRLP4 0 +INDIRF4 +ADDRLP4 200 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 204 +ADDRFP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 204 +INDIRP4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 204 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 208 +ADDRFP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 208 +INDIRP4 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 208 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 362 +;361: +;362: VectorScale( verts[0], 1.0f - uv[3][0], subVerts[3] ); +ADDRFP4 4 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 363 +;363: VectorMA( subVerts[3], uv[3][0], verts[1], subVerts[3] ); +ADDRLP4 212 +ADDRFP4 4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 212 +INDIRP4 +ADDRLP4 212 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 216 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 216 +INDIRP4 +ADDRLP4 216 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 220 +ADDRFP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 220 +INDIRP4 +ADDRLP4 220 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 364 +;364: VectorScale( subVerts[3], 1.0f - uv[3][1], temp ); +ADDRLP4 224 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 228 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 232 +ADDRFP4 8 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 224 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 228 +INDIRF4 +ADDRLP4 232 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 224 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ADDRLP4 228 +INDIRF4 +ADDRLP4 232 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 365 +;365: VectorScale( verts[3], 1.0f - uv[3][0], subVerts[3] ); +ADDRLP4 236 +CNSTI4 36 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 236 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 236 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 240 +CNSTI4 40 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 240 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 240 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 244 +CNSTI4 44 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 244 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 244 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRFP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 366 +;366: VectorMA( subVerts[3], uv[3][0], verts[2], subVerts[3] ); +ADDRLP4 248 +ADDRFP4 4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 252 +CNSTI4 24 +ASGNI4 +ADDRLP4 248 +INDIRP4 +ADDRLP4 248 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 252 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 252 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 256 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 256 +INDIRP4 +ADDRLP4 256 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 260 +ADDRFP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 260 +INDIRP4 +ADDRLP4 260 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 367 +;367: VectorMA( temp, uv[3][1], subVerts[3], subVerts[3] ); +ADDRLP4 264 +ADDRFP4 4 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 264 +INDIRP4 +ADDRLP4 0 +INDIRF4 +ADDRLP4 264 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 268 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 268 +INDIRP4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 268 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 272 +ADDRFP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 272 +INDIRP4 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 272 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 368 +;368:} +LABELV $222 +endproc CG_CalcBiLerp 276 0 +proc CG_CalcHeightWidth 132 12 +line 374 +;369:// bilinear +;370://f(p',q') = (1 - y) × {[(1 - x) × f(p,q)] + [x × f(p,q+1)]} + y × {[(1 - x) × f(p+1,q)] + [x × f(p+1,q+1)]}. +;371: +;372: +;373:static void CG_CalcHeightWidth( vec3_t verts[4], float *height, float *width ) +;374:{ +line 377 +;375: vec3_t dir1, dir2, cross; +;376: +;377: VectorSubtract( verts[3], verts[0], dir1 ); // v +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 36 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 12+4 +ADDRLP4 36 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12+8 +ADDRLP4 40 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 378 +;378: VectorSubtract( verts[1], verts[0], dir2 ); // p-a +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 44 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 44 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0+8 +ADDRLP4 48 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 48 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 379 +;379: CrossProduct( dir1, dir2, cross ); +ADDRLP4 12 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 380 +;380: *width = VectorNormalize( cross ) / VectorNormalize( dir1 ); // v +ADDRLP4 24 +ARGP4 +ADDRLP4 52 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 12 +ARGP4 +ADDRLP4 56 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 52 +INDIRF4 +ADDRLP4 56 +INDIRF4 +DIVF4 +ASGNF4 +line 381 +;381: VectorSubtract( verts[2], verts[0], dir2 ); // p-a +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 60 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 60 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0+8 +ADDRLP4 64 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 64 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 382 +;382: CrossProduct( dir1, dir2, cross ); +ADDRLP4 12 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 383 +;383: *width += VectorNormalize( cross ) / VectorNormalize( dir1 ); // v +ADDRLP4 24 +ARGP4 +ADDRLP4 68 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 12 +ARGP4 +ADDRLP4 72 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 76 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 76 +INDIRP4 +INDIRF4 +ADDRLP4 68 +INDIRF4 +ADDRLP4 72 +INDIRF4 +DIVF4 +ADDF4 +ASGNF4 +line 384 +;384: *width *= 0.5f; +ADDRLP4 80 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +CNSTF4 1056964608 +ADDRLP4 80 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 386 +;385: +;386: VectorSubtract( verts[1], verts[0], dir1 ); // v +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 84 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 12+4 +ADDRLP4 84 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 84 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 88 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12+8 +ADDRLP4 88 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 88 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 387 +;387: VectorSubtract( verts[2], verts[0], dir2 ); // p-a +ADDRLP4 92 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 92 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 92 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 92 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 92 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 96 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0+8 +ADDRLP4 96 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 96 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 388 +;388: CrossProduct( dir1, dir2, cross ); +ADDRLP4 12 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 389 +;389: *height = VectorNormalize( cross ) / VectorNormalize( dir1 ); // v +ADDRLP4 24 +ARGP4 +ADDRLP4 100 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 12 +ARGP4 +ADDRLP4 104 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 100 +INDIRF4 +ADDRLP4 104 +INDIRF4 +DIVF4 +ASGNF4 +line 390 +;390: VectorSubtract( verts[3], verts[0], dir2 ); // p-a +ADDRLP4 108 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 108 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 108 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 108 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ADDRLP4 108 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 112 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0+8 +ADDRLP4 112 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRF4 +ADDRLP4 112 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 391 +;391: CrossProduct( dir1, dir2, cross ); +ADDRLP4 12 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 392 +;392: *height += VectorNormalize( cross ) / VectorNormalize( dir1 ); // v +ADDRLP4 24 +ARGP4 +ADDRLP4 116 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 12 +ARGP4 +ADDRLP4 120 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 124 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 124 +INDIRP4 +ADDRLP4 124 +INDIRP4 +INDIRF4 +ADDRLP4 116 +INDIRF4 +ADDRLP4 120 +INDIRF4 +DIVF4 +ADDF4 +ASGNF4 +line 393 +;393: *height *= 0.5f; +ADDRLP4 128 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 128 +INDIRP4 +CNSTF4 1056964608 +ADDRLP4 128 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 394 +;394:} +LABELV $239 +endproc CG_CalcHeightWidth 132 12 +export CG_InitGlass +proc CG_InitGlass 16 0 +line 400 +;395://Consider a line in 3D with position vector "a" and direction vector "v" and +;396:// let "p" be the position vector of an arbitrary point in 3D +;397://dist = len( crossprod(p-a,v) ) / len(v); +;398: +;399:void CG_InitGlass( void ) +;400:{ +line 405 +;401: int i, t; +;402: +;403: // Build a table first, so that we can do a more unpredictable crack scheme +;404: // do it once, up front to save a bit of time. +;405: for ( i = 0; i < 20; i++ ) +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +LABELV $253 +line 406 +;406: { +line 407 +;407: for ( t = 0; t < 20; t++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $257 +line 408 +;408: { +line 409 +;409: offX[t][i] = crandom() * 0.03f; +ADDRLP4 8 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 80 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 offX +ADDP4 +ADDP4 +CNSTF4 1022739087 +CNSTF4 1073741824 +ADDRLP4 8 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 410 +;410: offZ[i][t] = crandom() * 0.03f; +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 80 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 offZ +ADDP4 +ADDP4 +CNSTF4 1022739087 +CNSTF4 1073741824 +ADDRLP4 12 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 411 +;411: } +LABELV $258 +line 407 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 20 +LTI4 $257 +line 412 +;412: } +LABELV $254 +line 405 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 20 +LTI4 $253 +line 413 +;413:} +LABELV $252 +endproc CG_InitGlass 16 0 +export Vector2Set +proc Vector2Set 0 0 +line 416 +;414: +;415:void Vector2Set(vec2_t a,float b,float c) +;416:{ +line 417 +;417: a[0] = b; +ADDRFP4 0 +INDIRP4 +ADDRFP4 4 +INDIRF4 +ASGNF4 +line 418 +;418: a[1] = c; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRFP4 8 +INDIRF4 +ASGNF4 +line 419 +;419:} +LABELV $261 +endproc Vector2Set 0 0 +export CG_DoGlass +proc CG_DoGlass 200 20 +line 426 +;420: +;421:#define TIME_DECAY_SLOW 0.1f +;422:#define TIME_DECAY_MED 0.04f +;423:#define TIME_DECAY_FAST 0.009f +;424: +;425:void CG_DoGlass( vec3_t verts[4], vec3_t normal, vec3_t dmgPt, vec3_t dmgDir, float dmgRadius, int maxShards ) +;426:{ +line 435 +;427: int i, t; +;428: int mxHeight, mxWidth; +;429: float height, width; +;430: float stepWidth, stepHeight; +;431: float timeDecay; +;432: float x, z; +;433: float xx, zz; +;434: float dif; +;435: int time = 0; +ADDRLP4 124 +CNSTI4 0 +ASGNI4 +line 436 +;436: int glassShards = 0; +ADDRLP4 128 +CNSTI4 0 +ASGNI4 +line 437 +;437: qboolean stick = qtrue; +ADDRLP4 132 +CNSTI4 1 +ASGNI4 +line 444 +;438: vec3_t subVerts[4]; +;439: vec2_t biPoints[4]; +;440: +;441: // To do a smarter tesselation, we should figure out the relative height and width of the brush face, +;442: // then use this to pick a lod value from 1-3 in each axis. This will give us 1-9 lod levels, which will +;443: // hopefully be sufficient. +;444: CG_CalcHeightWidth( verts, &height, &width ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 144 +ARGP4 +ADDRLP4 140 +ARGP4 +ADDRGP4 CG_CalcHeightWidth +CALLV +pop +line 446 +;445: +;446: trap_S_StartSound( dmgPt, -1, CHAN_AUTO, trap_S_RegisterSound("sound/effects/glassbreak1.wav")); +ADDRGP4 $263 +ARGP4 +ADDRLP4 148 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTI4 -1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 148 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 449 +;447: +;448: // Pick "LOD" for height +;449: if ( height < 100 ) +ADDRLP4 144 +INDIRF4 +CNSTF4 1120403456 +GEF4 $264 +line 450 +;450: { +line 451 +;451: stepHeight = 0.2f; +ADDRLP4 120 +CNSTF4 1045220557 +ASGNF4 +line 452 +;452: mxHeight = 5; +ADDRLP4 60 +CNSTI4 5 +ASGNI4 +line 453 +;453: timeDecay = TIME_DECAY_SLOW; +ADDRLP4 136 +CNSTF4 1036831949 +ASGNF4 +line 454 +;454: } +ADDRGP4 $265 +JUMPV +LABELV $264 +line 455 +;455: else if ( height > 220 ) +ADDRLP4 144 +INDIRF4 +CNSTF4 1130102784 +LEF4 $266 +line 456 +;456: { +line 457 +;457: stepHeight = 0.05f; +ADDRLP4 120 +CNSTF4 1028443341 +ASGNF4 +line 458 +;458: mxHeight = 20; +ADDRLP4 60 +CNSTI4 20 +ASGNI4 +line 459 +;459: timeDecay = TIME_DECAY_FAST; +ADDRLP4 136 +CNSTF4 1007908028 +ASGNF4 +line 460 +;460: } +ADDRGP4 $267 +JUMPV +LABELV $266 +line 462 +;461: else +;462: { +line 463 +;463: stepHeight = 0.1f; +ADDRLP4 120 +CNSTF4 1036831949 +ASGNF4 +line 464 +;464: mxHeight = 10; +ADDRLP4 60 +CNSTI4 10 +ASGNI4 +line 465 +;465: timeDecay = TIME_DECAY_MED; +ADDRLP4 136 +CNSTF4 1025758986 +ASGNF4 +line 466 +;466: } +LABELV $267 +LABELV $265 +line 492 +;467: +;468: // Pick "LOD" for width +;469: /* +;470: if ( width < 100 ) +;471: { +;472: stepWidth = 0.2f; +;473: mxWidth = 5; +;474: timeDecay = ( timeDecay + TIME_DECAY_SLOW ) * 0.5f; +;475: } +;476: else if ( width > 220 ) +;477: { +;478: stepWidth = 0.05f; +;479: mxWidth = 20; +;480: timeDecay = ( timeDecay + TIME_DECAY_FAST ) * 0.5f; +;481: } +;482: else +;483: { +;484: stepWidth = 0.1f; +;485: mxWidth = 10; +;486: timeDecay = ( timeDecay + TIME_DECAY_MED ) * 0.5f; +;487: } +;488: */ +;489: +;490: //Attempt to scale the glass directly to the size of the window +;491: +;492: stepWidth = (0.25f - (width*0.0002)); //(width*0.0005)); +ADDRLP4 68 +CNSTF4 1048576000 +CNSTF4 961656599 +ADDRLP4 140 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 493 +;493: mxWidth = width*0.2; +ADDRLP4 56 +CNSTF4 1045220557 +ADDRLP4 140 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 494 +;494: timeDecay = ( timeDecay + TIME_DECAY_FAST ) * 0.5f; +ADDRLP4 136 +CNSTF4 1056964608 +ADDRLP4 136 +INDIRF4 +CNSTF4 1007908028 +ADDF4 +MULF4 +ASGNF4 +line 496 +;495: +;496: if (stepWidth < 0.01f) +ADDRLP4 68 +INDIRF4 +CNSTF4 1008981770 +GEF4 $268 +line 497 +;497: { +line 498 +;498: stepWidth = 0.01f; +ADDRLP4 68 +CNSTF4 1008981770 +ASGNF4 +line 499 +;499: } +LABELV $268 +line 500 +;500: if (mxWidth < 5) +ADDRLP4 56 +INDIRI4 +CNSTI4 5 +GEI4 $270 +line 501 +;501: { +line 502 +;502: mxWidth = 5; +ADDRLP4 56 +CNSTI4 5 +ASGNI4 +line 503 +;503: } +LABELV $270 +line 505 +;504: +;505: for ( z = 0.0f, i = 0; z < 1.0f; z += stepHeight, i++ ) +ADDRLP4 52 +CNSTF4 0 +ASGNF4 +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $275 +JUMPV +LABELV $272 +line 506 +;506: { +line 507 +;507: for ( x = 0.0f, t = 0; x < 1.0f; x += stepWidth, t++ ) +ADDRLP4 16 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $279 +JUMPV +LABELV $276 +line 508 +;508: { +line 510 +;509: // This is nasty.. +;510: if ( t > 0 && t < mxWidth ) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LEI4 $280 +ADDRLP4 0 +INDIRI4 +ADDRLP4 56 +INDIRI4 +GEI4 $280 +line 511 +;511: { +line 512 +;512: xx = x - offX[i][t]; +ADDRLP4 8 +ADDRLP4 16 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 80 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 offX +ADDP4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 513 +;513: } +ADDRGP4 $281 +JUMPV +LABELV $280 +line 515 +;514: else +;515: { +line 516 +;516: xx = x; +ADDRLP4 8 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 517 +;517: } +LABELV $281 +line 519 +;518: +;519: if ( i > 0 && i < mxHeight ) +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +LEI4 $282 +ADDRLP4 4 +INDIRI4 +ADDRLP4 60 +INDIRI4 +GEI4 $282 +line 520 +;520: { +line 521 +;521: zz = z - offZ[t][i]; +ADDRLP4 12 +ADDRLP4 52 +INDIRF4 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 80 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 offZ +ADDP4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 522 +;522: } +ADDRGP4 $283 +JUMPV +LABELV $282 +line 524 +;523: else +;524: { +line 525 +;525: zz = z; +ADDRLP4 12 +ADDRLP4 52 +INDIRF4 +ASGNF4 +line 526 +;526: } +LABELV $283 +line 528 +;527: +;528: Vector2Set( biPoints[0], xx, zz ); +ADDRLP4 20 +ARGP4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRGP4 Vector2Set +CALLV +pop +line 530 +;529: +;530: if ( t + 1 > 0 && t + 1 < mxWidth ) +ADDRLP4 160 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 160 +INDIRI4 +CNSTI4 0 +LEI4 $284 +ADDRLP4 160 +INDIRI4 +ADDRLP4 56 +INDIRI4 +GEI4 $284 +line 531 +;531: { +line 532 +;532: xx = x - offX[i][t + 1]; +ADDRLP4 8 +ADDRLP4 16 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 4 +ADDI4 +CNSTI4 80 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 offX +ADDP4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 533 +;533: } +ADDRGP4 $285 +JUMPV +LABELV $284 +line 535 +;534: else +;535: { +line 536 +;536: xx = x; +ADDRLP4 8 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 537 +;537: } +LABELV $285 +line 539 +;538: +;539: if ( i > 0 && i < mxHeight ) +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +LEI4 $286 +ADDRLP4 4 +INDIRI4 +ADDRLP4 60 +INDIRI4 +GEI4 $286 +line 540 +;540: { +line 541 +;541: zz = z - offZ[t + 1][i]; +ADDRLP4 12 +ADDRLP4 52 +INDIRF4 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 80 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 offZ+80 +ADDP4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 542 +;542: } +ADDRGP4 $287 +JUMPV +LABELV $286 +line 544 +;543: else +;544: { +line 545 +;545: zz = z; +ADDRLP4 12 +ADDRLP4 52 +INDIRF4 +ASGNF4 +line 546 +;546: } +LABELV $287 +line 548 +;547: +;548: Vector2Set( biPoints[1], xx + stepWidth, zz ); +ADDRLP4 20+8 +ARGP4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 68 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRGP4 Vector2Set +CALLV +pop +line 550 +;549: +;550: if ( t + 1 > 0 && t + 1 < mxWidth ) +ADDRLP4 168 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 168 +INDIRI4 +CNSTI4 0 +LEI4 $290 +ADDRLP4 168 +INDIRI4 +ADDRLP4 56 +INDIRI4 +GEI4 $290 +line 551 +;551: { +line 552 +;552: xx = x - offX[i + 1][t + 1]; +ADDRLP4 8 +ADDRLP4 16 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 4 +ADDI4 +CNSTI4 80 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 offX+80 +ADDP4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 553 +;553: } +ADDRGP4 $291 +JUMPV +LABELV $290 +line 555 +;554: else +;555: { +line 556 +;556: xx = x; +ADDRLP4 8 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 557 +;557: } +LABELV $291 +line 559 +;558: +;559: if ( i + 1 > 0 && i + 1 < mxHeight ) +ADDRLP4 172 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 172 +INDIRI4 +CNSTI4 0 +LEI4 $293 +ADDRLP4 172 +INDIRI4 +ADDRLP4 60 +INDIRI4 +GEI4 $293 +line 560 +;560: { +line 561 +;561: zz = z - offZ[t + 1][i + 1]; +ADDRLP4 12 +ADDRLP4 52 +INDIRF4 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 4 +ADDI4 +CNSTI4 80 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 offZ+80 +ADDP4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 562 +;562: } +ADDRGP4 $294 +JUMPV +LABELV $293 +line 564 +;563: else +;564: { +line 565 +;565: zz = z; +ADDRLP4 12 +ADDRLP4 52 +INDIRF4 +ASGNF4 +line 566 +;566: } +LABELV $294 +line 568 +;567: +;568: Vector2Set( biPoints[2], xx + stepWidth, zz + stepHeight); +ADDRLP4 20+16 +ARGP4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 68 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 120 +INDIRF4 +ADDF4 +ARGF4 +ADDRGP4 Vector2Set +CALLV +pop +line 570 +;569: +;570: if ( t > 0 && t < mxWidth ) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LEI4 $297 +ADDRLP4 0 +INDIRI4 +ADDRLP4 56 +INDIRI4 +GEI4 $297 +line 571 +;571: { +line 572 +;572: xx = x - offX[i + 1][t]; +ADDRLP4 8 +ADDRLP4 16 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 80 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 offX+80 +ADDP4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 573 +;573: } +ADDRGP4 $298 +JUMPV +LABELV $297 +line 575 +;574: else +;575: { +line 576 +;576: xx = x; +ADDRLP4 8 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 577 +;577: } +LABELV $298 +line 579 +;578: +;579: if ( i + 1 > 0 && i + 1 < mxHeight ) +ADDRLP4 180 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 180 +INDIRI4 +CNSTI4 0 +LEI4 $300 +ADDRLP4 180 +INDIRI4 +ADDRLP4 60 +INDIRI4 +GEI4 $300 +line 580 +;580: { +line 581 +;581: zz = z - offZ[t][i + 1]; +ADDRLP4 12 +ADDRLP4 52 +INDIRF4 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 4 +ADDI4 +CNSTI4 80 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 offZ +ADDP4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 582 +;582: } +ADDRGP4 $301 +JUMPV +LABELV $300 +line 584 +;583: else +;584: { +line 585 +;585: zz = z; +ADDRLP4 12 +ADDRLP4 52 +INDIRF4 +ASGNF4 +line 586 +;586: } +LABELV $301 +line 588 +;587: +;588: Vector2Set( biPoints[3], xx, zz + stepHeight ); +ADDRLP4 20+24 +ARGP4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 120 +INDIRF4 +ADDF4 +ARGF4 +ADDRGP4 Vector2Set +CALLV +pop +line 590 +;589: +;590: CG_CalcBiLerp( verts, subVerts, biPoints ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 72 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRGP4 CG_CalcBiLerp +CALLV +pop +line 592 +;591: +;592: dif = DistanceSquared( subVerts[0], dmgPt ) * timeDecay - random() * 32; +ADDRLP4 72 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 184 +ADDRGP4 DistanceSquared +CALLF4 +ASGNF4 +ADDRLP4 188 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 64 +ADDRLP4 184 +INDIRF4 +ADDRLP4 136 +INDIRF4 +MULF4 +CNSTF4 1107296256 +ADDRLP4 188 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +SUBF4 +ASGNF4 +line 595 +;593: +;594: // If we decrease dif, we are increasing the impact area, making it more likely to blow out large holes +;595: dif -= dmgRadius * dmgRadius; +ADDRLP4 192 +ADDRFP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 64 +ADDRLP4 64 +INDIRF4 +ADDRLP4 192 +INDIRF4 +ADDRLP4 192 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 597 +;596: +;597: if ( dif > 1 ) +ADDRLP4 64 +INDIRF4 +CNSTF4 1065353216 +LEF4 $303 +line 598 +;598: { +line 599 +;599: stick = qtrue; +ADDRLP4 132 +CNSTI4 1 +ASGNI4 +line 600 +;600: time = dif + random() * 200; +ADDRLP4 196 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 124 +ADDRLP4 64 +INDIRF4 +CNSTF4 1128792064 +ADDRLP4 196 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 601 +;601: } +ADDRGP4 $304 +JUMPV +LABELV $303 +line 603 +;602: else +;603: { +line 604 +;604: stick = qfalse; +ADDRLP4 132 +CNSTI4 0 +ASGNI4 +line 605 +;605: time = 0; +ADDRLP4 124 +CNSTI4 0 +ASGNI4 +line 606 +;606: } +LABELV $304 +line 608 +;607: +;608: CG_DoGlassQuad( subVerts, biPoints, stick, time, dmgDir ); +ADDRLP4 72 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRLP4 132 +INDIRI4 +ARGI4 +ADDRLP4 124 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 CG_DoGlassQuad +CALLV +pop +line 609 +;609: glassShards++; +ADDRLP4 128 +ADDRLP4 128 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 611 +;610: +;611: if (maxShards && glassShards >= maxShards) +ADDRLP4 196 +ADDRFP4 20 +INDIRI4 +ASGNI4 +ADDRLP4 196 +INDIRI4 +CNSTI4 0 +EQI4 $305 +ADDRLP4 128 +INDIRI4 +ADDRLP4 196 +INDIRI4 +LTI4 $305 +line 612 +;612: { +line 613 +;613: return; +ADDRGP4 $262 +JUMPV +LABELV $305 +line 615 +;614: } +;615: } +LABELV $277 +line 507 +ADDRLP4 16 +ADDRLP4 16 +INDIRF4 +ADDRLP4 68 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $279 +ADDRLP4 16 +INDIRF4 +CNSTF4 1065353216 +LTF4 $276 +line 616 +;616: } +LABELV $273 +line 505 +ADDRLP4 52 +ADDRLP4 52 +INDIRF4 +ADDRLP4 120 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $275 +ADDRLP4 52 +INDIRF4 +CNSTF4 1065353216 +LTF4 $272 +line 617 +;617:} +LABELV $262 +endproc CG_DoGlass 200 20 +export CG_GlassShatter +proc CG_GlassShatter 60 24 +line 626 +;618: +;619:/* +;620:================== +;621:CG_GlassShatter +;622:Break glass with fancy method +;623:================== +;624:*/ +;625:void CG_GlassShatter(int entnum, vec3_t dmgPt, vec3_t dmgDir, float dmgRadius, int maxShards) +;626:{ +line 629 +;627: vec3_t verts[4], normal; +;628: +;629: if (cgs.inlineDrawModel[cg_entities[entnum].currentState.modelindex]) +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+212 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+38928 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $308 +line 630 +;630: { +line 631 +;631: trap_R_GetBModelVerts(cgs.inlineDrawModel[cg_entities[entnum].currentState.modelindex], verts, normal); +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+212 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+38928 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 48 +ARGP4 +ADDRGP4 trap_R_GetBModelVerts +CALLV +pop +line 632 +;632: CG_DoGlass(verts, normal, dmgPt, dmgDir, dmgRadius, maxShards); +ADDRLP4 0 +ARGP4 +ADDRLP4 48 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRI4 +ARGI4 +ADDRGP4 CG_DoGlass +CALLV +pop +line 633 +;633: } +LABELV $308 +line 635 +;634: //otherwise something awful has happened. +;635:} +LABELV $307 +endproc CG_GlassShatter 60 24 +export CG_GlassShatter_Old +proc CG_GlassShatter_Old 388 20 +line 644 +;636: +;637:/* +;638:================== +;639:CG_GlassShatter_Old +;640:Throws glass shards from within a given bounding box in the world +;641:================== +;642:*/ +;643:void CG_GlassShatter_Old(int entnum, vec3_t org, vec3_t mins, vec3_t maxs) +;644:{ +line 647 +;645: vec3_t velocity, a, shardorg, dif, difx; +;646: float windowmass; +;647: float shardsthrow = 0; +ADDRLP4 304 +CNSTF4 0 +ASGNF4 +line 650 +;648: char chunkname[256]; +;649: +;650: trap_S_StartSound(org, entnum, CHAN_BODY, trap_S_RegisterSound("sound/effects/glassbreak1.wav")); +ADDRGP4 $263 +ARGP4 +ADDRLP4 324 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 324 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 652 +;651: +;652: VectorSubtract(maxs, mins, a); +ADDRLP4 328 +ADDRFP4 12 +INDIRP4 +ASGNP4 +ADDRLP4 332 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 312 +ADDRLP4 328 +INDIRP4 +INDIRF4 +ADDRLP4 332 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 336 +CNSTI4 4 +ASGNI4 +ADDRLP4 312+4 +ADDRLP4 328 +INDIRP4 +ADDRLP4 336 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 332 +INDIRP4 +ADDRLP4 336 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 340 +CNSTI4 8 +ASGNI4 +ADDRLP4 312+8 +ADDRFP4 12 +INDIRP4 +ADDRLP4 340 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 340 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 654 +;653: +;654: windowmass = VectorLength(a); //should give us some idea of how big the chunk of glass is +ADDRLP4 312 +ARGP4 +ADDRLP4 344 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 308 +ADDRLP4 344 +INDIRF4 +ASGNF4 +ADDRGP4 $318 +JUMPV +LABELV $317 +line 657 +;655: +;656: while (shardsthrow < windowmass) +;657: { +line 658 +;658: velocity[0] = crandom()*150; +ADDRLP4 348 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 36 +CNSTF4 1125515264 +CNSTF4 1073741824 +ADDRLP4 348 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 659 +;659: velocity[1] = crandom()*150; +ADDRLP4 352 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 36+4 +CNSTF4 1125515264 +CNSTF4 1073741824 +ADDRLP4 352 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 660 +;660: velocity[2] = 150 + crandom()*75; +ADDRLP4 356 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 36+8 +CNSTF4 1117126656 +CNSTF4 1073741824 +ADDRLP4 356 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1125515264 +ADDF4 +ASGNF4 +line 662 +;661: +;662: Com_sprintf(chunkname, sizeof(chunkname), "models/chunks/glass/glchunks_%i.md3", Q_irand(1, 6)); +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 360 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 48 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 $322 +ARGP4 +ADDRLP4 360 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 663 +;663: VectorCopy(org, shardorg); +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 665 +;664: +;665: dif[0] = (maxs[0]-mins[0])/2; +ADDRLP4 0 +ADDRFP4 12 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +SUBF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 666 +;666: dif[1] = (maxs[1]-mins[1])/2; +ADDRLP4 364 +CNSTI4 4 +ASGNI4 +ADDRLP4 0+4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 364 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 364 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 667 +;667: dif[2] = (maxs[2]-mins[2])/2; +ADDRLP4 368 +CNSTI4 8 +ASGNI4 +ADDRLP4 0+8 +ADDRFP4 12 +INDIRP4 +ADDRLP4 368 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 368 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 669 +;668: +;669: if (dif[0] < 2) +ADDRLP4 0 +INDIRF4 +CNSTF4 1073741824 +GEF4 $325 +line 670 +;670: { +line 671 +;671: dif[0] = 2; +ADDRLP4 0 +CNSTF4 1073741824 +ASGNF4 +line 672 +;672: } +LABELV $325 +line 673 +;673: if (dif[1] < 2) +ADDRLP4 0+4 +INDIRF4 +CNSTF4 1073741824 +GEF4 $327 +line 674 +;674: { +line 675 +;675: dif[1] = 2; +ADDRLP4 0+4 +CNSTF4 1073741824 +ASGNF4 +line 676 +;676: } +LABELV $327 +line 677 +;677: if (dif[2] < 2) +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1073741824 +GEF4 $331 +line 678 +;678: { +line 679 +;679: dif[2] = 2; +ADDRLP4 0+8 +CNSTF4 1073741824 +ASGNF4 +line 680 +;680: } +LABELV $331 +line 682 +;681: +;682: difx[0] = Q_irand(1, (dif[0]*0.9)*2); +CNSTI4 1 +ARGI4 +CNSTF4 1073741824 +CNSTF4 1063675494 +ADDRLP4 0 +INDIRF4 +MULF4 +MULF4 +CVFI4 4 +ARGI4 +ADDRLP4 372 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 372 +INDIRI4 +CVIF4 4 +ASGNF4 +line 683 +;683: difx[1] = Q_irand(1, (dif[1]*0.9)*2); +CNSTI4 1 +ARGI4 +CNSTF4 1073741824 +CNSTF4 1063675494 +ADDRLP4 0+4 +INDIRF4 +MULF4 +MULF4 +CVFI4 4 +ARGI4 +ADDRLP4 376 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12+4 +ADDRLP4 376 +INDIRI4 +CVIF4 4 +ASGNF4 +line 684 +;684: difx[2] = Q_irand(1, (dif[2]*0.9)*2); +CNSTI4 1 +ARGI4 +CNSTF4 1073741824 +CNSTF4 1063675494 +ADDRLP4 0+8 +INDIRF4 +MULF4 +MULF4 +CVFI4 4 +ARGI4 +ADDRLP4 380 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12+8 +ADDRLP4 380 +INDIRI4 +CVIF4 4 +ASGNF4 +line 686 +;685: +;686: if (difx[0] > dif[0]) +ADDRLP4 12 +INDIRF4 +ADDRLP4 0 +INDIRF4 +LEF4 $339 +line 687 +;687: { +line 688 +;688: shardorg[0] += difx[0]-(dif[0]); +ADDRLP4 24 +ADDRLP4 24 +INDIRF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ADDF4 +ASGNF4 +line 689 +;689: } +ADDRGP4 $340 +JUMPV +LABELV $339 +line 691 +;690: else +;691: { +line 692 +;692: shardorg[0] -= difx[0]; +ADDRLP4 24 +ADDRLP4 24 +INDIRF4 +ADDRLP4 12 +INDIRF4 +SUBF4 +ASGNF4 +line 693 +;693: } +LABELV $340 +line 694 +;694: if (difx[1] > dif[1]) +ADDRLP4 12+4 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +LEF4 $341 +line 695 +;695: { +line 696 +;696: shardorg[1] += difx[1]-(dif[1]); +ADDRLP4 24+4 +ADDRLP4 24+4 +INDIRF4 +ADDRLP4 12+4 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +SUBF4 +ADDF4 +ASGNF4 +line 697 +;697: } +ADDRGP4 $342 +JUMPV +LABELV $341 +line 699 +;698: else +;699: { +line 700 +;700: shardorg[1] -= difx[1]; +ADDRLP4 24+4 +ADDRLP4 24+4 +INDIRF4 +ADDRLP4 12+4 +INDIRF4 +SUBF4 +ASGNF4 +line 701 +;701: } +LABELV $342 +line 702 +;702: if (difx[2] > dif[2]) +ADDRLP4 12+8 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +LEF4 $350 +line 703 +;703: { +line 704 +;704: shardorg[2] += difx[2]-(dif[2]); +ADDRLP4 24+8 +ADDRLP4 24+8 +INDIRF4 +ADDRLP4 12+8 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +SUBF4 +ADDF4 +ASGNF4 +line 705 +;705: } +ADDRGP4 $351 +JUMPV +LABELV $350 +line 707 +;706: else +;707: { +line 708 +;708: shardorg[2] -= difx[2]; +ADDRLP4 24+8 +ADDRLP4 24+8 +INDIRF4 +ADDRLP4 12+8 +INDIRF4 +SUBF4 +ASGNF4 +line 709 +;709: } +LABELV $351 +line 713 +;710: +;711: //CG_TestLine(org, shardorg, 5000, 0x0000ff, 3); +;712: +;713: CG_ThrowChunk( shardorg, velocity, trap_R_RegisterModel( chunkname ), 0, 254 ); +ADDRLP4 48 +ARGP4 +ADDRLP4 384 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 24 +ARGP4 +ADDRLP4 36 +ARGP4 +ADDRLP4 384 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +CNSTI4 254 +ARGI4 +ADDRGP4 CG_ThrowChunk +CALLV +pop +line 715 +;714: +;715: shardsthrow += 10; +ADDRLP4 304 +ADDRLP4 304 +INDIRF4 +CNSTF4 1092616192 +ADDF4 +ASGNF4 +line 716 +;716: } +LABELV $318 +line 656 +ADDRLP4 304 +INDIRF4 +ADDRLP4 308 +INDIRF4 +LTF4 $317 +line 717 +;717:} +LABELV $314 +endproc CG_GlassShatter_Old 388 20 +export CG_CreateDebris +proc CG_CreateDebris 124 20 +line 741 +;718: +;719:/* +;720:================== +;721:CG_CreateDebris +;722:Throws specified debris from within a given bounding box in the world +;723:================== +;724:*/ +;725:#define DEBRIS_SPECIALCASE_ROCK -1 +;726:#define DEBRIS_SPECIALCASE_CHUNKS -2 +;727:#define DEBRIS_SPECIALCASE_WOOD -3 +;728:#define DEBRIS_SPECIALCASE_GLASS -4 +;729: +;730:#define NUM_DEBRIS_MODELS_GLASS 8 +;731:#define NUM_DEBRIS_MODELS_WOOD 8 +;732:#define NUM_DEBRIS_MODELS_CHUNKS 3 +;733:#define NUM_DEBRIS_MODELS_ROCKS 4 //12 +;734: +;735:int dbModels_Glass[NUM_DEBRIS_MODELS_GLASS]; +;736:int dbModels_Wood[NUM_DEBRIS_MODELS_WOOD]; +;737:int dbModels_Chunks[NUM_DEBRIS_MODELS_CHUNKS]; +;738:int dbModels_Rocks[NUM_DEBRIS_MODELS_ROCKS]; +;739: +;740:void CG_CreateDebris(int entnum, vec3_t org, vec3_t mins, vec3_t maxs, int debrissound, int debrismodel) +;741:{ +line 744 +;742: vec3_t velocity, a, shardorg, dif, difx; +;743: float windowmass; +;744: float shardsthrow = 0; +ADDRLP4 52 +CNSTF4 0 +ASGNF4 +line 745 +;745: int omodel = debrismodel; +ADDRLP4 48 +ADDRFP4 20 +INDIRI4 +ASGNI4 +line 747 +;746: +;747: if (omodel == DEBRIS_SPECIALCASE_GLASS && !dbModels_Glass[0]) +ADDRLP4 48 +INDIRI4 +CNSTI4 -4 +NEI4 $360 +ADDRGP4 dbModels_Glass +INDIRI4 +CNSTI4 0 +NEI4 $360 +line 748 +;748: { //glass no longer exists, using it for metal. +line 749 +;749: dbModels_Glass[0] = trap_R_RegisterModel("models/chunks/metal/metal1_1.md3"); +ADDRGP4 $362 +ARGP4 +ADDRLP4 72 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Glass +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 750 +;750: dbModels_Glass[1] = trap_R_RegisterModel("models/chunks/metal/metal1_2.md3"); +ADDRGP4 $364 +ARGP4 +ADDRLP4 76 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Glass+4 +ADDRLP4 76 +INDIRI4 +ASGNI4 +line 751 +;751: dbModels_Glass[2] = trap_R_RegisterModel("models/chunks/metal/metal1_3.md3"); +ADDRGP4 $366 +ARGP4 +ADDRLP4 80 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Glass+8 +ADDRLP4 80 +INDIRI4 +ASGNI4 +line 752 +;752: dbModels_Glass[3] = trap_R_RegisterModel("models/chunks/metal/metal1_4.md3"); +ADDRGP4 $368 +ARGP4 +ADDRLP4 84 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Glass+12 +ADDRLP4 84 +INDIRI4 +ASGNI4 +line 753 +;753: dbModels_Glass[4] = trap_R_RegisterModel("models/chunks/metal/metal2_1.md3"); +ADDRGP4 $370 +ARGP4 +ADDRLP4 88 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Glass+16 +ADDRLP4 88 +INDIRI4 +ASGNI4 +line 754 +;754: dbModels_Glass[5] = trap_R_RegisterModel("models/chunks/metal/metal2_2.md3"); +ADDRGP4 $372 +ARGP4 +ADDRLP4 92 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Glass+20 +ADDRLP4 92 +INDIRI4 +ASGNI4 +line 755 +;755: dbModels_Glass[6] = trap_R_RegisterModel("models/chunks/metal/metal2_3.md3"); +ADDRGP4 $374 +ARGP4 +ADDRLP4 96 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Glass+24 +ADDRLP4 96 +INDIRI4 +ASGNI4 +line 756 +;756: dbModels_Glass[7] = trap_R_RegisterModel("models/chunks/metal/metal2_4.md3"); +ADDRGP4 $376 +ARGP4 +ADDRLP4 100 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Glass+28 +ADDRLP4 100 +INDIRI4 +ASGNI4 +line 757 +;757: } +LABELV $360 +line 758 +;758: if (omodel == DEBRIS_SPECIALCASE_WOOD && !dbModels_Wood[0]) +ADDRLP4 48 +INDIRI4 +CNSTI4 -3 +NEI4 $377 +ADDRGP4 dbModels_Wood +INDIRI4 +CNSTI4 0 +NEI4 $377 +line 759 +;759: { +line 760 +;760: dbModels_Wood[0] = trap_R_RegisterModel("models/chunks/crate/crate1_1.md3"); +ADDRGP4 $379 +ARGP4 +ADDRLP4 72 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Wood +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 761 +;761: dbModels_Wood[1] = trap_R_RegisterModel("models/chunks/crate/crate1_2.md3"); +ADDRGP4 $381 +ARGP4 +ADDRLP4 76 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Wood+4 +ADDRLP4 76 +INDIRI4 +ASGNI4 +line 762 +;762: dbModels_Wood[2] = trap_R_RegisterModel("models/chunks/crate/crate1_3.md3"); +ADDRGP4 $383 +ARGP4 +ADDRLP4 80 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Wood+8 +ADDRLP4 80 +INDIRI4 +ASGNI4 +line 763 +;763: dbModels_Wood[3] = trap_R_RegisterModel("models/chunks/crate/crate1_4.md3"); +ADDRGP4 $385 +ARGP4 +ADDRLP4 84 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Wood+12 +ADDRLP4 84 +INDIRI4 +ASGNI4 +line 764 +;764: dbModels_Wood[4] = trap_R_RegisterModel("models/chunks/crate/crate2_1.md3"); +ADDRGP4 $387 +ARGP4 +ADDRLP4 88 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Wood+16 +ADDRLP4 88 +INDIRI4 +ASGNI4 +line 765 +;765: dbModels_Wood[5] = trap_R_RegisterModel("models/chunks/crate/crate2_2.md3"); +ADDRGP4 $389 +ARGP4 +ADDRLP4 92 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Wood+20 +ADDRLP4 92 +INDIRI4 +ASGNI4 +line 766 +;766: dbModels_Wood[6] = trap_R_RegisterModel("models/chunks/crate/crate2_3.md3"); +ADDRGP4 $391 +ARGP4 +ADDRLP4 96 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Wood+24 +ADDRLP4 96 +INDIRI4 +ASGNI4 +line 767 +;767: dbModels_Wood[7] = trap_R_RegisterModel("models/chunks/crate/crate2_4.md3"); +ADDRGP4 $393 +ARGP4 +ADDRLP4 100 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Wood+28 +ADDRLP4 100 +INDIRI4 +ASGNI4 +line 768 +;768: } +LABELV $377 +line 769 +;769: if (omodel == DEBRIS_SPECIALCASE_CHUNKS && !dbModels_Chunks[0]) +ADDRLP4 48 +INDIRI4 +CNSTI4 -2 +NEI4 $394 +ADDRGP4 dbModels_Chunks +INDIRI4 +CNSTI4 0 +NEI4 $394 +line 770 +;770: { +line 771 +;771: dbModels_Chunks[0] = trap_R_RegisterModel("models/chunks/generic/chunks_1.md3"); +ADDRGP4 $396 +ARGP4 +ADDRLP4 72 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Chunks +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 772 +;772: dbModels_Chunks[1] = trap_R_RegisterModel("models/chunks/generic/chunks_2.md3"); +ADDRGP4 $398 +ARGP4 +ADDRLP4 76 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Chunks+4 +ADDRLP4 76 +INDIRI4 +ASGNI4 +line 773 +;773: } +LABELV $394 +line 774 +;774: if (omodel == DEBRIS_SPECIALCASE_ROCK && !dbModels_Rocks[0]) +ADDRLP4 48 +INDIRI4 +CNSTI4 -1 +NEI4 $399 +ADDRGP4 dbModels_Rocks +INDIRI4 +CNSTI4 0 +NEI4 $399 +line 775 +;775: { +line 776 +;776: dbModels_Rocks[0] = trap_R_RegisterModel("models/chunks/rock/rock1_1.md3"); +ADDRGP4 $401 +ARGP4 +ADDRLP4 72 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Rocks +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 777 +;777: dbModels_Rocks[1] = trap_R_RegisterModel("models/chunks/rock/rock1_2.md3"); +ADDRGP4 $403 +ARGP4 +ADDRLP4 76 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Rocks+4 +ADDRLP4 76 +INDIRI4 +ASGNI4 +line 778 +;778: dbModels_Rocks[2] = trap_R_RegisterModel("models/chunks/rock/rock1_3.md3"); +ADDRGP4 $405 +ARGP4 +ADDRLP4 80 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Rocks+8 +ADDRLP4 80 +INDIRI4 +ASGNI4 +line 779 +;779: dbModels_Rocks[3] = trap_R_RegisterModel("models/chunks/rock/rock1_4.md3"); +ADDRGP4 $407 +ARGP4 +ADDRLP4 84 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 dbModels_Rocks+12 +ADDRLP4 84 +INDIRI4 +ASGNI4 +line 790 +;780: /* +;781: dbModels_Rocks[4] = trap_R_RegisterModel("models/chunks/rock/rock2_1.md3"); +;782: dbModels_Rocks[5] = trap_R_RegisterModel("models/chunks/rock/rock2_2.md3"); +;783: dbModels_Rocks[6] = trap_R_RegisterModel("models/chunks/rock/rock2_3.md3"); +;784: dbModels_Rocks[7] = trap_R_RegisterModel("models/chunks/rock/rock2_4.md3"); +;785: dbModels_Rocks[8] = trap_R_RegisterModel("models/chunks/rock/rock3_1.md3"); +;786: dbModels_Rocks[9] = trap_R_RegisterModel("models/chunks/rock/rock3_2.md3"); +;787: dbModels_Rocks[10] = trap_R_RegisterModel("models/chunks/rock/rock3_3.md3"); +;788: dbModels_Rocks[11] = trap_R_RegisterModel("models/chunks/rock/rock3_4.md3"); +;789: */ +;790: } +LABELV $399 +line 792 +;791: +;792: VectorSubtract(maxs, mins, a); +ADDRLP4 72 +ADDRFP4 12 +INDIRP4 +ASGNP4 +ADDRLP4 76 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 60 +ADDRLP4 72 +INDIRP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 80 +CNSTI4 4 +ASGNI4 +ADDRLP4 60+4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 84 +CNSTI4 8 +ASGNI4 +ADDRLP4 60+8 +ADDRFP4 12 +INDIRP4 +ADDRLP4 84 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 84 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 794 +;793: +;794: windowmass = VectorLength(a); //should give us some idea of how big the chunk of glass is +ADDRLP4 60 +ARGP4 +ADDRLP4 88 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 56 +ADDRLP4 88 +INDIRF4 +ASGNF4 +ADDRGP4 $411 +JUMPV +LABELV $410 +line 797 +;795: +;796: while (shardsthrow < windowmass) +;797: { +line 798 +;798: velocity[0] = crandom()*150; +ADDRLP4 92 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 36 +CNSTF4 1125515264 +CNSTF4 1073741824 +ADDRLP4 92 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 799 +;799: velocity[1] = crandom()*150; +ADDRLP4 96 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 36+4 +CNSTF4 1125515264 +CNSTF4 1073741824 +ADDRLP4 96 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 800 +;800: velocity[2] = 150 + crandom()*75; +ADDRLP4 100 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 36+8 +CNSTF4 1117126656 +CNSTF4 1073741824 +ADDRLP4 100 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1125515264 +ADDF4 +ASGNF4 +line 802 +;801: +;802: if (omodel == DEBRIS_SPECIALCASE_GLASS) +ADDRLP4 48 +INDIRI4 +CNSTI4 -4 +NEI4 $415 +line 803 +;803: { +line 804 +;804: debrismodel = dbModels_Glass[Q_irand(0, NUM_DEBRIS_MODELS_GLASS-1)]; +CNSTI4 0 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRLP4 104 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRFP4 20 +ADDRLP4 104 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 dbModels_Glass +ADDP4 +INDIRI4 +ASGNI4 +line 805 +;805: } +ADDRGP4 $416 +JUMPV +LABELV $415 +line 806 +;806: else if (omodel == DEBRIS_SPECIALCASE_WOOD) +ADDRLP4 48 +INDIRI4 +CNSTI4 -3 +NEI4 $417 +line 807 +;807: { +line 808 +;808: debrismodel = dbModels_Wood[Q_irand(0, NUM_DEBRIS_MODELS_WOOD-1)]; +CNSTI4 0 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRLP4 104 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRFP4 20 +ADDRLP4 104 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 dbModels_Wood +ADDP4 +INDIRI4 +ASGNI4 +line 809 +;809: } +ADDRGP4 $418 +JUMPV +LABELV $417 +line 810 +;810: else if (omodel == DEBRIS_SPECIALCASE_CHUNKS) +ADDRLP4 48 +INDIRI4 +CNSTI4 -2 +NEI4 $419 +line 811 +;811: { +line 812 +;812: debrismodel = dbModels_Chunks[Q_irand(0, NUM_DEBRIS_MODELS_CHUNKS-1)]; +CNSTI4 0 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 104 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRFP4 20 +ADDRLP4 104 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 dbModels_Chunks +ADDP4 +INDIRI4 +ASGNI4 +line 813 +;813: } +ADDRGP4 $420 +JUMPV +LABELV $419 +line 814 +;814: else if (omodel == DEBRIS_SPECIALCASE_ROCK) +ADDRLP4 48 +INDIRI4 +CNSTI4 -1 +NEI4 $421 +line 815 +;815: { +line 816 +;816: debrismodel = dbModels_Rocks[Q_irand(0, NUM_DEBRIS_MODELS_ROCKS-1)]; +CNSTI4 0 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 104 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRFP4 20 +ADDRLP4 104 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 dbModels_Rocks +ADDP4 +INDIRI4 +ASGNI4 +line 817 +;817: } +LABELV $421 +LABELV $420 +LABELV $418 +LABELV $416 +line 819 +;818: +;819: VectorCopy(org, shardorg); +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 821 +;820: +;821: dif[0] = (maxs[0]-mins[0])/2; +ADDRLP4 0 +ADDRFP4 12 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +SUBF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 822 +;822: dif[1] = (maxs[1]-mins[1])/2; +ADDRLP4 104 +CNSTI4 4 +ASGNI4 +ADDRLP4 0+4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 104 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 104 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 823 +;823: dif[2] = (maxs[2]-mins[2])/2; +ADDRLP4 108 +CNSTI4 8 +ASGNI4 +ADDRLP4 0+8 +ADDRFP4 12 +INDIRP4 +ADDRLP4 108 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 108 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 825 +;824: +;825: if (dif[0] < 2) +ADDRLP4 0 +INDIRF4 +CNSTF4 1073741824 +GEF4 $425 +line 826 +;826: { +line 827 +;827: dif[0] = 2; +ADDRLP4 0 +CNSTF4 1073741824 +ASGNF4 +line 828 +;828: } +LABELV $425 +line 829 +;829: if (dif[1] < 2) +ADDRLP4 0+4 +INDIRF4 +CNSTF4 1073741824 +GEF4 $427 +line 830 +;830: { +line 831 +;831: dif[1] = 2; +ADDRLP4 0+4 +CNSTF4 1073741824 +ASGNF4 +line 832 +;832: } +LABELV $427 +line 833 +;833: if (dif[2] < 2) +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1073741824 +GEF4 $431 +line 834 +;834: { +line 835 +;835: dif[2] = 2; +ADDRLP4 0+8 +CNSTF4 1073741824 +ASGNF4 +line 836 +;836: } +LABELV $431 +line 838 +;837: +;838: difx[0] = Q_irand(1, (dif[0]*0.9)*2); +CNSTI4 1 +ARGI4 +CNSTF4 1073741824 +CNSTF4 1063675494 +ADDRLP4 0 +INDIRF4 +MULF4 +MULF4 +CVFI4 4 +ARGI4 +ADDRLP4 112 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 112 +INDIRI4 +CVIF4 4 +ASGNF4 +line 839 +;839: difx[1] = Q_irand(1, (dif[1]*0.9)*2); +CNSTI4 1 +ARGI4 +CNSTF4 1073741824 +CNSTF4 1063675494 +ADDRLP4 0+4 +INDIRF4 +MULF4 +MULF4 +CVFI4 4 +ARGI4 +ADDRLP4 116 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12+4 +ADDRLP4 116 +INDIRI4 +CVIF4 4 +ASGNF4 +line 840 +;840: difx[2] = Q_irand(1, (dif[2]*0.9)*2); +CNSTI4 1 +ARGI4 +CNSTF4 1073741824 +CNSTF4 1063675494 +ADDRLP4 0+8 +INDIRF4 +MULF4 +MULF4 +CVFI4 4 +ARGI4 +ADDRLP4 120 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12+8 +ADDRLP4 120 +INDIRI4 +CVIF4 4 +ASGNF4 +line 842 +;841: +;842: if (difx[0] > dif[0]) +ADDRLP4 12 +INDIRF4 +ADDRLP4 0 +INDIRF4 +LEF4 $439 +line 843 +;843: { +line 844 +;844: shardorg[0] += difx[0]-(dif[0]); +ADDRLP4 24 +ADDRLP4 24 +INDIRF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ADDF4 +ASGNF4 +line 845 +;845: } +ADDRGP4 $440 +JUMPV +LABELV $439 +line 847 +;846: else +;847: { +line 848 +;848: shardorg[0] -= difx[0]; +ADDRLP4 24 +ADDRLP4 24 +INDIRF4 +ADDRLP4 12 +INDIRF4 +SUBF4 +ASGNF4 +line 849 +;849: } +LABELV $440 +line 850 +;850: if (difx[1] > dif[1]) +ADDRLP4 12+4 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +LEF4 $441 +line 851 +;851: { +line 852 +;852: shardorg[1] += difx[1]-(dif[1]); +ADDRLP4 24+4 +ADDRLP4 24+4 +INDIRF4 +ADDRLP4 12+4 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +SUBF4 +ADDF4 +ASGNF4 +line 853 +;853: } +ADDRGP4 $442 +JUMPV +LABELV $441 +line 855 +;854: else +;855: { +line 856 +;856: shardorg[1] -= difx[1]; +ADDRLP4 24+4 +ADDRLP4 24+4 +INDIRF4 +ADDRLP4 12+4 +INDIRF4 +SUBF4 +ASGNF4 +line 857 +;857: } +LABELV $442 +line 858 +;858: if (difx[2] > dif[2]) +ADDRLP4 12+8 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +LEF4 $450 +line 859 +;859: { +line 860 +;860: shardorg[2] += difx[2]-(dif[2]); +ADDRLP4 24+8 +ADDRLP4 24+8 +INDIRF4 +ADDRLP4 12+8 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +SUBF4 +ADDF4 +ASGNF4 +line 861 +;861: } +ADDRGP4 $451 +JUMPV +LABELV $450 +line 863 +;862: else +;863: { +line 864 +;864: shardorg[2] -= difx[2]; +ADDRLP4 24+8 +ADDRLP4 24+8 +INDIRF4 +ADDRLP4 12+8 +INDIRF4 +SUBF4 +ASGNF4 +line 865 +;865: } +LABELV $451 +line 869 +;866: +;867: //CG_TestLine(org, shardorg, 5000, 0x0000ff, 3); +;868: +;869: CG_ThrowChunk( shardorg, velocity, debrismodel, debrissound, 0 ); +ADDRLP4 24 +ARGP4 +ADDRLP4 36 +ARGP4 +ADDRFP4 20 +INDIRI4 +ARGI4 +ADDRFP4 16 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_ThrowChunk +CALLV +pop +line 871 +;870: +;871: shardsthrow += 10; +ADDRLP4 52 +ADDRLP4 52 +INDIRF4 +CNSTF4 1092616192 +ADDF4 +ASGNF4 +line 872 +;872: } +LABELV $411 +line 796 +ADDRLP4 52 +INDIRF4 +ADDRLP4 56 +INDIRF4 +LTF4 $410 +line 873 +;873:} +LABELV $359 +endproc CG_CreateDebris 124 20 +bss +align 4 +LABELV $460 +skip 12 +export CG_ScorePlum +code +proc CG_ScorePlum 48 8 +line 880 +;874: +;875:/* +;876:================== +;877:CG_ScorePlum +;878:================== +;879:*/ +;880:void CG_ScorePlum( int client, vec3_t org, int score ) { +line 887 +;881: localEntity_t *le; +;882: refEntity_t *re; +;883: vec3_t angles; +;884: static vec3_t lastPos; +;885: +;886: // only visualize for the client that scored +;887: if (client != cg.predictedPlayerState.clientNum || cg_scorePlum.integer == 0) { +ADDRFP4 0 +INDIRI4 +ADDRGP4 cg+96+144 +INDIRI4 +NEI4 $466 +ADDRGP4 cg_scorePlum+12 +INDIRI4 +CNSTI4 0 +NEI4 $461 +LABELV $466 +line 888 +;888: return; +ADDRGP4 $459 +JUMPV +LABELV $461 +line 891 +;889: } +;890: +;891: le = CG_AllocLocalEntity(); +ADDRLP4 20 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 20 +INDIRP4 +ASGNP4 +line 892 +;892: le->leFlags = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 0 +ASGNI4 +line 893 +;893: le->leType = LE_SCOREPLUM; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 10 +ASGNI4 +line 894 +;894: le->startTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 895 +;895: le->endTime = cg.time + 4000; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 4000 +ADDI4 +ASGNI4 +line 896 +;896: le->lifeRate = 1.0 / ( le->endTime - le->startTime ); +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 1065353216 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 899 +;897: +;898: +;899: le->color[0] = le->color[1] = le->color[2] = le->color[3] = 1.0; +ADDRLP4 32 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 900 +;900: le->radius = score; +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +line 902 +;901: +;902: VectorCopy( org, le->pos.trBase ); +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 903 +;903: if (org[2] >= lastPos[2] - 20 && org[2] <= lastPos[2] + 20) { +ADDRLP4 36 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 40 +CNSTF4 1101004800 +ASGNF4 +ADDRLP4 36 +INDIRF4 +ADDRGP4 $460+8 +INDIRF4 +ADDRLP4 40 +INDIRF4 +SUBF4 +LTF4 $469 +ADDRLP4 36 +INDIRF4 +ADDRGP4 $460+8 +INDIRF4 +ADDRLP4 40 +INDIRF4 +ADDF4 +GTF4 $469 +line 904 +;904: le->pos.trBase[2] -= 20; +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +CNSTF4 1101004800 +SUBF4 +ASGNF4 +line 905 +;905: } +LABELV $469 +line 908 +;906: +;907: //CG_Printf( "Plum origin %i %i %i -- %i\n", (int)org[0], (int)org[1], (int)org[2], (int)Distance(org, lastPos)); +;908: VectorCopy(org, lastPos); +ADDRGP4 $460 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 911 +;909: +;910: +;911: re = &le->refEntity; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 913 +;912: +;913: re->reType = RT_SPRITE; +ADDRLP4 4 +INDIRP4 +CNSTI4 2 +ASGNI4 +line 914 +;914: re->radius = 16; +ADDRLP4 4 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTF4 1098907648 +ASGNF4 +line 916 +;915: +;916: VectorClear(angles); +ADDRLP4 44 +CNSTF4 0 +ASGNF4 +ADDRLP4 8+8 +ADDRLP4 44 +INDIRF4 +ASGNF4 +ADDRLP4 8+4 +ADDRLP4 44 +INDIRF4 +ASGNF4 +ADDRLP4 8 +ADDRLP4 44 +INDIRF4 +ASGNF4 +line 917 +;917: AnglesToAxis( angles, re->axis ); +ADDRLP4 8 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 918 +;918:} +LABELV $459 +endproc CG_ScorePlum 48 8 +export CG_ExplosionEffects +proc CG_ExplosionEffects 32 4 +line 931 +;919: +;920: +;921:/* +;922:------------------------- +;923:CG_ExplosionEffects +;924: +;925:Used to find the player and shake the camera if close enough +;926:intensity ranges from 1 (minor tremble) to 16 (major quake) +;927:------------------------- +;928:*/ +;929: +;930:void CG_ExplosionEffects( vec3_t origin, float intensity, int radius) +;931:{ +line 938 +;932: //FIXME: When exactly is the vieworg calculated in relation to the rest of the frame?s +;933: +;934: vec3_t dir; +;935: float dist, intensityScale; +;936: float realIntensity; +;937: +;938: VectorSubtract( cg.refdef.vieworg, origin, dir ); +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRGP4 cg+3616+24 +INDIRF4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+8 +ADDRGP4 cg+3616+24+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 939 +;939: dist = VectorNormalize( dir ); +ADDRLP4 0 +ARGP4 +ADDRLP4 28 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 12 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 943 +;940: +;941: //Use the dir to add kick to the explosion +;942: +;943: if ( dist > radius ) +ADDRLP4 12 +INDIRF4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +LEF4 $486 +line 944 +;944: return; +ADDRGP4 $475 +JUMPV +LABELV $486 +line 946 +;945: +;946: intensityScale = 1 - ( dist / (float) radius ); +ADDRLP4 16 +CNSTF4 1065353216 +ADDRLP4 12 +INDIRF4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +ASGNF4 +line 947 +;947: realIntensity = intensity * intensityScale; +ADDRLP4 20 +ADDRFP4 4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ASGNF4 +line 950 +;948: +;949:// CGCam_Shake( realIntensity, 750 ); // 500 seemed a bit too quick +;950:} +LABELV $475 +endproc CG_ExplosionEffects 32 4 +export CG_MakeExplosion +proc CG_MakeExplosion 88 8 +line 961 +;951: +;952: +;953:/* +;954:==================== +;955:CG_MakeExplosion +;956:==================== +;957:*/ +;958:localEntity_t *CG_MakeExplosion( vec3_t origin, vec3_t dir, +;959: qhandle_t hModel, int numFrames, qhandle_t shader, +;960: int msec, qboolean isSprite, float scale, int flags ) +;961:{ +line 962 +;962: float ang = 0; +ADDRLP4 32 +CNSTF4 0 +ASGNF4 +line 967 +;963: localEntity_t *ex; +;964: int offset; +;965: vec3_t tmpVec, newOrigin; +;966: +;967: if ( msec <= 0 ) { +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +GTI4 $489 +line 968 +;968: CG_Error( "CG_MakeExplosion: msec = %i", msec ); +ADDRGP4 $491 +ARGP4 +ADDRFP4 20 +INDIRI4 +ARGI4 +ADDRGP4 CG_Error +CALLV +pop +line 969 +;969: } +LABELV $489 +line 972 +;970: +;971: // skew the time a bit so they aren't all in sync +;972: offset = rand() & 63; +ADDRLP4 36 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 36 +INDIRI4 +CNSTI4 63 +BANDI4 +ASGNI4 +line 974 +;973: +;974: ex = CG_AllocLocalEntity(); +ADDRLP4 40 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 40 +INDIRP4 +ASGNP4 +line 975 +;975: if ( isSprite ) { +ADDRFP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $492 +line 976 +;976: ex->leType = LE_SPRITE_EXPLOSION; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 2 +ASGNI4 +line 977 +;977: ex->refEntity.rotation = rand() % 360; +ADDRLP4 44 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 344 +ADDP4 +ADDRLP4 44 +INDIRI4 +CNSTI4 360 +MODI4 +CVIF4 4 +ASGNF4 +line 978 +;978: ex->radius = scale; +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +ADDRFP4 28 +INDIRF4 +ASGNF4 +line 979 +;979: VectorScale( dir, 16, tmpVec ); +ADDRLP4 48 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 52 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 48 +INDIRF4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 16+4 +ADDRLP4 48 +INDIRF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 16+8 +CNSTF4 1098907648 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 980 +;980: VectorAdd( tmpVec, origin, newOrigin ); +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 56 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 4+4 +ADDRLP4 16+4 +INDIRF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 4+8 +ADDRLP4 16+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 981 +;981: } else { +ADDRGP4 $493 +JUMPV +LABELV $492 +line 982 +;982: ex->leType = LE_EXPLOSION; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 1 +ASGNI4 +line 983 +;983: VectorCopy( origin, newOrigin ); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 986 +;984: +;985: // set axis with random rotate when necessary +;986: if ( !dir ) +ADDRFP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $500 +line 987 +;987: { +line 988 +;988: AxisClear( ex->refEntity.axis ); +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ARGP4 +ADDRGP4 AxisClear +CALLV +pop +line 989 +;989: } +ADDRGP4 $501 +JUMPV +LABELV $500 +line 991 +;990: else +;991: { +line 992 +;992: if ( !(flags & LEF_NO_RANDOM_ROTATE) ) +ADDRFP4 32 +INDIRI4 +CNSTI4 8 +BANDI4 +CNSTI4 0 +NEI4 $502 +line 993 +;993: ang = rand() % 360; +ADDRLP4 44 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 32 +ADDRLP4 44 +INDIRI4 +CNSTI4 360 +MODI4 +CVIF4 4 +ASGNF4 +LABELV $502 +line 994 +;994: VectorCopy( dir, ex->refEntity.axis[0] ); +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 995 +;995: RotateAroundDirection( ex->refEntity.axis, ang ); +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ARGP4 +ADDRLP4 32 +INDIRF4 +ARGF4 +ADDRGP4 RotateAroundDirection +CALLV +pop +line 996 +;996: } +LABELV $501 +line 997 +;997: } +LABELV $493 +line 999 +;998: +;999: ex->startTime = cg.time - offset; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 28 +INDIRI4 +SUBI4 +ASGNI4 +line 1000 +;1000: ex->endTime = ex->startTime + msec; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ADDRFP4 20 +INDIRI4 +ADDI4 +ASGNI4 +line 1003 +;1001: +;1002: // bias the time so all shader effects start correctly +;1003: ex->refEntity.shaderTime = ex->startTime / 1000.0f; +ADDRLP4 0 +INDIRP4 +CNSTI4 348 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CVIF4 4 +CNSTF4 1148846080 +DIVF4 +ASGNF4 +line 1005 +;1004: +;1005: ex->refEntity.hModel = hModel; +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 1006 +;1006: ex->refEntity.customShader = shader; +ADDRLP4 0 +INDIRP4 +CNSTI4 324 +ADDP4 +ADDRFP4 16 +INDIRI4 +ASGNI4 +line 1007 +;1007: ex->lifeRate = (float)numFrames / msec; +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRFP4 12 +INDIRI4 +CVIF4 4 +ADDRFP4 20 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 1008 +;1008: ex->leFlags = flags; +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 32 +INDIRI4 +ASGNI4 +line 1011 +;1009: +;1010: //Scale the explosion +;1011: if (scale != 1) { +ADDRFP4 28 +INDIRF4 +CNSTF4 1065353216 +EQF4 $505 +line 1012 +;1012: ex->refEntity.nonNormalizedAxes = qtrue; +ADDRLP4 0 +INDIRP4 +CNSTI4 296 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1014 +;1013: +;1014: VectorScale( ex->refEntity.axis[0], scale, ex->refEntity.axis[0] ); +ADDRLP4 52 +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +ADDRFP4 28 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 56 +ADDRLP4 0 +INDIRP4 +CNSTI4 264 +ADDP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRF4 +ADDRFP4 28 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 60 +ADDRLP4 0 +INDIRP4 +CNSTI4 268 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +ADDRFP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 1015 +;1015: VectorScale( ex->refEntity.axis[1], scale, ex->refEntity.axis[1] ); +ADDRLP4 64 +ADDRLP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 64 +INDIRP4 +INDIRF4 +ADDRFP4 28 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 68 +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +ADDRLP4 68 +INDIRP4 +INDIRF4 +ADDRFP4 28 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 72 +ADDRLP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRF4 +ADDRFP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 1016 +;1016: VectorScale( ex->refEntity.axis[2], scale, ex->refEntity.axis[2] ); +ADDRLP4 76 +ADDRLP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 76 +INDIRP4 +INDIRF4 +ADDRFP4 28 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 80 +ADDRLP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +ADDRLP4 80 +INDIRP4 +INDIRF4 +ADDRFP4 28 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 84 +ADDRLP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +ADDRFP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 1017 +;1017: } +LABELV $505 +line 1019 +;1018: // set origin +;1019: VectorCopy ( newOrigin, ex->refEntity.origin); +ADDRLP4 0 +INDIRP4 +CNSTI4 300 +ADDP4 +ADDRLP4 4 +INDIRB +ASGNB 12 +line 1020 +;1020: VectorCopy ( newOrigin, ex->refEntity.oldorigin ); +ADDRLP4 0 +INDIRP4 +CNSTI4 312 +ADDP4 +ADDRLP4 4 +INDIRB +ASGNB 12 +line 1022 +;1021: +;1022: ex->color[0] = ex->color[1] = ex->color[2] = 1.0; +ADDRLP4 56 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 56 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ADDRLP4 56 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +ADDRLP4 56 +INDIRF4 +ASGNF4 +line 1024 +;1023: +;1024: return ex; +ADDRLP4 0 +INDIRP4 +RETP4 +LABELV $488 +endproc CG_MakeExplosion 88 8 +lit +align 4 +LABELV $508 +byte 4 0 +byte 4 0 +byte 4 0 +export CG_SurfaceExplosion +code +proc CG_SurfaceExplosion 164 36 +line 1041 +;1025:} +;1026: +;1027: +;1028:/* +;1029:------------------------- +;1030:CG_SurfaceExplosion +;1031: +;1032:Adds an explosion to a surface +;1033:------------------------- +;1034:*/ +;1035: +;1036:#define NUM_SPARKS 12 +;1037:#define NUM_PUFFS 1 +;1038:#define NUM_EXPLOSIONS 4 +;1039: +;1040:void CG_SurfaceExplosion( vec3_t origin, vec3_t normal, float radius, float shake_speed, qboolean smoke ) +;1041:{ +line 1045 +;1042: localEntity_t *le; +;1043: //FXTrail *particle; +;1044: vec3_t direction, new_org; +;1045: vec3_t velocity = { 0, 0, 0 }; +ADDRLP4 16 +ADDRGP4 $508 +INDIRB +ASGNB 12 +line 1051 +;1046: vec3_t temp_org, temp_vel; +;1047: float scale, dscale; +;1048: int i, numSparks; +;1049: +;1050: //Sparks +;1051: numSparks = 16 + (random() * 16.0f); +ADDRLP4 80 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 72 +CNSTF4 1098907648 +ADDRLP4 80 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +CNSTF4 1098907648 +ADDF4 +CVFI4 4 +ASGNI4 +line 1053 +;1052: +;1053: for ( i = 0; i < numSparks; i++ ) +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRGP4 $512 +JUMPV +LABELV $509 +line 1054 +;1054: { +line 1055 +;1055: scale = 0.25f + (random() * 2.0f); +ADDRLP4 84 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 52 +CNSTF4 1073741824 +ADDRLP4 84 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +CNSTF4 1048576000 +ADDF4 +ASGNF4 +line 1056 +;1056: dscale = -scale*0.5; +ADDRLP4 76 +CNSTF4 1056964608 +ADDRLP4 52 +INDIRF4 +NEGF4 +MULF4 +ASGNF4 +line 1075 +;1057: +;1058:/* particle = FX_AddTrail( origin, +;1059: NULL, +;1060: NULL, +;1061: 32.0f, +;1062: -64.0f, +;1063: scale, +;1064: -scale, +;1065: 1.0f, +;1066: 0.0f, +;1067: 0.25f, +;1068: 4000.0f, +;1069: cgs.media.sparkShader, +;1070: rand() & FXF_BOUNCE); +;1071: if ( particle == NULL ) +;1072: return; +;1073: +;1074: FXE_Spray( normal, 500, 150, 1.0f, 768 + (rand() & 255), (FXPrimitive *) particle );*/ +;1075: } +LABELV $510 +line 1053 +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $512 +ADDRLP4 12 +INDIRI4 +ADDRLP4 72 +INDIRI4 +LTI4 $509 +line 1079 +;1076: +;1077: //Smoke +;1078: //Move this out a little from the impact surface +;1079: VectorMA( origin, 4, normal, new_org ); +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 88 +CNSTF4 1082130432 +ASGNF4 +ADDRLP4 92 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 84 +INDIRP4 +INDIRF4 +ADDRLP4 88 +INDIRF4 +ADDRLP4 92 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 96 +CNSTI4 4 +ASGNI4 +ADDRLP4 0+4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 96 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 88 +INDIRF4 +ADDRLP4 92 +INDIRP4 +ADDRLP4 96 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 100 +CNSTI4 8 +ASGNI4 +ADDRLP4 0+8 +ADDRFP4 0 +INDIRP4 +ADDRLP4 100 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 1082130432 +ADDRFP4 4 +INDIRP4 +ADDRLP4 100 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1080 +;1080: VectorSet( velocity, 0.0f, 0.0f, 16.0f ); +ADDRLP4 104 +CNSTF4 0 +ASGNF4 +ADDRLP4 16 +ADDRLP4 104 +INDIRF4 +ASGNF4 +ADDRLP4 16+4 +ADDRLP4 104 +INDIRF4 +ASGNF4 +ADDRLP4 16+8 +CNSTF4 1098907648 +ASGNF4 +line 1082 +;1081: +;1082: for ( i = 0; i < 4; i++ ) +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +LABELV $517 +line 1083 +;1083: { +line 1084 +;1084: VectorSet( temp_org, new_org[0] + (crandom() * 16.0f), new_org[1] + (crandom() * 16.0f), new_org[2] + (random() * 4.0f) ); +ADDRLP4 108 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 0 +INDIRF4 +CNSTF4 1098907648 +CNSTF4 1073741824 +ADDRLP4 108 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 112 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 28+4 +ADDRLP4 0+4 +INDIRF4 +CNSTF4 1098907648 +CNSTF4 1073741824 +ADDRLP4 112 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 116 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 28+8 +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1082130432 +ADDRLP4 116 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ADDF4 +ASGNF4 +line 1085 +;1085: VectorSet( temp_vel, velocity[0] + (crandom() * 8.0f), velocity[1] + (crandom() * 8.0f), velocity[2] + (crandom() * 8.0f) ); +ADDRLP4 120 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 40 +ADDRLP4 16 +INDIRF4 +CNSTF4 1090519040 +CNSTF4 1073741824 +ADDRLP4 120 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 124 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 40+4 +ADDRLP4 16+4 +INDIRF4 +CNSTF4 1090519040 +CNSTF4 1073741824 +ADDRLP4 124 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 128 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 40+8 +ADDRLP4 16+8 +INDIRF4 +CNSTF4 1090519040 +CNSTF4 1073741824 +ADDRLP4 128 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 1098 +;1086: +;1087:/* FX_AddSprite( temp_org, +;1088: temp_vel, +;1089: NULL, +;1090: 64.0f + (random() * 32.0f), +;1091: 16.0f, +;1092: 1.0f, +;1093: 0.0f, +;1094: 20.0f + (crandom() * 90.0f), +;1095: 0.5f, +;1096: 1500.0f, +;1097: cgs.media.smokeShader, FXF_USE_ALPHA_CHAN );*/ +;1098: } +LABELV $518 +line 1082 +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 4 +LTI4 $517 +line 1103 +;1099: +;1100: //Core of the explosion +;1101: +;1102: //Orient the explosions to face the camera +;1103: VectorSubtract( cg.refdef.vieworg, origin, direction ); +ADDRLP4 108 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 60 +ADDRGP4 cg+3616+24 +INDIRF4 +ADDRLP4 108 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 60+4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +ADDRLP4 108 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 60+8 +ADDRGP4 cg+3616+24+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 1104 +;1104: VectorNormalize( direction ); +ADDRLP4 60 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1107 +;1105: +;1106: //Tag the last one with a light +;1107: le = CG_MakeExplosion( origin, direction, cgs.media.explosionModel, 6, cgs.media.surfaceExplosionShader, 500, qfalse, radius * 0.02f + (random() * 0.3f), 0); +ADDRLP4 112 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 60 +ARGP4 +ADDRGP4 cgs+70296+552 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRGP4 cgs+70296+556 +INDIRI4 +ARGI4 +CNSTI4 500 +ARGI4 +ADDRLP4 116 +CNSTI4 0 +ASGNI4 +ADDRLP4 116 +INDIRI4 +ARGI4 +CNSTF4 1017370378 +ADDRFP4 8 +INDIRF4 +MULF4 +CNSTF4 1050253722 +ADDRLP4 112 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ADDF4 +ARGF4 +ADDRLP4 116 +INDIRI4 +ARGI4 +ADDRLP4 120 +ADDRGP4 CG_MakeExplosion +CALLP4 +ASGNP4 +ADDRLP4 56 +ADDRLP4 120 +INDIRP4 +ASGNP4 +line 1108 +;1108: le->light = 150; +ADDRLP4 56 +INDIRP4 +CNSTI4 144 +ADDP4 +CNSTF4 1125515264 +ASGNF4 +line 1109 +;1109: VectorSet( le->lightColor, 0.9f, 0.8f, 0.5f ); +ADDRLP4 56 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTF4 1063675494 +ASGNF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTF4 1061997773 +ASGNF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 156 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 1111 +;1110: +;1111: for ( i = 0; i < NUM_EXPLOSIONS-1; i ++) +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +LABELV $543 +line 1112 +;1112: { +line 1113 +;1113: VectorSet( new_org, (origin[0] + (16 + (crandom() * 8))*crandom()), (origin[1] + (16 + (crandom() * 8))*crandom()), (origin[2] + (16 + (crandom() * 8))*crandom()) ); +ADDRLP4 124 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 128 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1090519040 +CNSTF4 1073741824 +ADDRLP4 124 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1073741824 +ADDRLP4 128 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 132 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 136 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1090519040 +CNSTF4 1073741824 +ADDRLP4 132 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1073741824 +ADDRLP4 136 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 140 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 144 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1090519040 +CNSTF4 1073741824 +ADDRLP4 140 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1073741824 +ADDRLP4 144 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 1114 +;1114: le = CG_MakeExplosion( new_org, direction, cgs.media.explosionModel, 6, cgs.media.surfaceExplosionShader, 300 + (rand() & 99), qfalse, radius * 0.05f + (crandom() *0.3f), 0); +ADDRLP4 148 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 152 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 60 +ARGP4 +ADDRGP4 cgs+70296+552 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRGP4 cgs+70296+556 +INDIRI4 +ARGI4 +ADDRLP4 148 +INDIRI4 +CNSTI4 99 +BANDI4 +CNSTI4 300 +ADDI4 +ARGI4 +ADDRLP4 156 +CNSTI4 0 +ASGNI4 +ADDRLP4 156 +INDIRI4 +ARGI4 +CNSTF4 1028443341 +ADDRFP4 8 +INDIRF4 +MULF4 +CNSTF4 1050253722 +CNSTF4 1073741824 +ADDRLP4 152 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ARGF4 +ADDRLP4 156 +INDIRI4 +ARGI4 +ADDRLP4 160 +ADDRGP4 CG_MakeExplosion +CALLP4 +ASGNP4 +ADDRLP4 56 +ADDRLP4 160 +INDIRP4 +ASGNP4 +line 1115 +;1115: } +LABELV $544 +line 1111 +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 3 +LTI4 $543 +line 1118 +;1116: +;1117: //Shake the camera +;1118: CG_ExplosionEffects( origin, shake_speed, 350 ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRF4 +ARGF4 +CNSTI4 350 +ARGI4 +ADDRGP4 CG_ExplosionEffects +CALLV +pop +line 1123 +;1119: +;1120: // The level designers wanted to be able to turn the smoke spawners off. The rationale is that they +;1121: // want to blow up catwalks and such that fall down...when that happens, it shouldn't really leave a mark +;1122: // and a smoke spewer at the explosion point... +;1123: if ( smoke ) +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $553 +line 1124 +;1124: { +line 1125 +;1125: VectorMA( origin, -8, normal, temp_org ); +ADDRLP4 124 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 128 +CNSTF4 3238002688 +ASGNF4 +ADDRLP4 132 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 124 +INDIRP4 +INDIRF4 +ADDRLP4 128 +INDIRF4 +ADDRLP4 132 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 136 +CNSTI4 4 +ASGNI4 +ADDRLP4 28+4 +ADDRLP4 124 +INDIRP4 +ADDRLP4 136 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 128 +INDIRF4 +ADDRLP4 132 +INDIRP4 +ADDRLP4 136 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 140 +CNSTI4 8 +ASGNI4 +ADDRLP4 28+8 +ADDRFP4 0 +INDIRP4 +ADDRLP4 140 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 3238002688 +ADDRFP4 4 +INDIRP4 +ADDRLP4 140 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1131 +;1126:// FX_AddSpawner( temp_org, normal, NULL, NULL, 100, random()*25.0f, 5000.0f, (void *) CG_SmokeSpawn ); +;1127: +;1128: //Impact mark +;1129: //FIXME: Replace mark +;1130: //CG_ImpactMark( cgs.media.burnMarkShader, origin, normal, random()*360, 1,1,1,1, qfalse, 8, qfalse ); +;1131: } +LABELV $553 +line 1132 +;1132:} +LABELV $507 +endproc CG_SurfaceExplosion 164 36 +export CG_Bleed +proc CG_Bleed 20 0 +line 1141 +;1133: +;1134:/* +;1135:================= +;1136:CG_Bleed +;1137: +;1138:This is the spurt of blood when a character gets hit +;1139:================= +;1140:*/ +;1141:void CG_Bleed( vec3_t origin, int entityNum ) { +line 1144 +;1142: localEntity_t *ex; +;1143: +;1144: if ( !cg_blood.integer ) { +ADDRGP4 cg_blood+12 +INDIRI4 +CNSTI4 0 +NEI4 $558 +line 1145 +;1145: return; +ADDRGP4 $557 +JUMPV +LABELV $558 +line 1148 +;1146: } +;1147: +;1148: ex = CG_AllocLocalEntity(); +ADDRLP4 4 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 1149 +;1149: ex->leType = LE_EXPLOSION; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1151 +;1150: +;1151: ex->startTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1152 +;1152: ex->endTime = ex->startTime + 500; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 500 +ADDI4 +ASGNI4 +line 1154 +;1153: +;1154: VectorCopy ( origin, ex->refEntity.origin); +ADDRLP4 0 +INDIRP4 +CNSTI4 300 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 1155 +;1155: ex->refEntity.reType = RT_SPRITE; +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +CNSTI4 2 +ASGNI4 +line 1156 +;1156: ex->refEntity.rotation = rand() % 360; +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 344 +ADDP4 +ADDRLP4 12 +INDIRI4 +CNSTI4 360 +MODI4 +CVIF4 4 +ASGNF4 +line 1157 +;1157: ex->refEntity.radius = 24; +ADDRLP4 0 +INDIRP4 +CNSTI4 340 +ADDP4 +CNSTF4 1103101952 +ASGNF4 +line 1159 +;1158: +;1159: ex->refEntity.customShader = 0;//cgs.media.bloodExplosionShader; +ADDRLP4 0 +INDIRP4 +CNSTI4 324 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1162 +;1160: +;1161: // don't show player's own blood in view +;1162: if ( entityNum == cg.snap->ps.clientNum ) { +ADDRFP4 4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $562 +line 1163 +;1163: ex->refEntity.renderfx |= RF_THIRD_PERSON; +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 252 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1164 +;1164: } +LABELV $562 +line 1165 +;1165:} +LABELV $557 +endproc CG_Bleed 20 0 +export CG_LaunchGib +proc CG_LaunchGib 20 8 +line 1174 +;1166: +;1167: +;1168: +;1169:/* +;1170:================== +;1171:CG_LaunchGib +;1172:================== +;1173:*/ +;1174:void CG_LaunchGib( vec3_t origin, vec3_t velocity, qhandle_t hModel ) { +line 1178 +;1175: localEntity_t *le; +;1176: refEntity_t *re; +;1177: +;1178: le = CG_AllocLocalEntity(); +ADDRLP4 8 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 1179 +;1179: re = &le->refEntity; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 1181 +;1180: +;1181: le->leType = LE_FRAGMENT; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 4 +ASGNI4 +line 1182 +;1182: le->startTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1183 +;1183: le->endTime = le->startTime + 5000 + random() * 3000; +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 5000 +ADDI4 +CVIF4 4 +CNSTF4 1161527296 +ADDRLP4 12 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 1185 +;1184: +;1185: VectorCopy( origin, re->origin ); +ADDRLP4 4 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 1186 +;1186: AxisCopy( axisDefault, re->axis ); +ADDRGP4 axisDefault +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRGP4 AxisCopy +CALLV +pop +line 1187 +;1187: re->hModel = hModel; +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 1189 +;1188: +;1189: le->pos.trType = TR_GRAVITY; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTI4 5 +ASGNI4 +line 1190 +;1190: VectorCopy( origin, le->pos.trBase ); +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 1191 +;1191: VectorCopy( velocity, le->pos.trDelta ); +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 1192 +;1192: le->pos.trTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1194 +;1193: +;1194: le->bounceFactor = 0.6f; +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTF4 1058642330 +ASGNF4 +line 1196 +;1195: +;1196: le->leBounceSoundType = LEBS_BLOOD; +ADDRLP4 0 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1197 +;1197: le->leMarkType = LEMT_BLOOD; +ADDRLP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +CNSTI4 2 +ASGNI4 +line 1198 +;1198:} +LABELV $565 +endproc CG_LaunchGib 20 8 +bss +export dbModels_Rocks +align 4 +LABELV dbModels_Rocks +skip 16 +export dbModels_Chunks +align 4 +LABELV dbModels_Chunks +skip 12 +export dbModels_Wood +align 4 +LABELV dbModels_Wood +skip 32 +export dbModels_Glass +align 4 +LABELV dbModels_Glass +skip 32 +align 4 +LABELV offZ +skip 1600 +align 4 +LABELV offX +skip 1600 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $491 +char 1 67 +char 1 71 +char 1 95 +char 1 77 +char 1 97 +char 1 107 +char 1 101 +char 1 69 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 58 +char 1 32 +char 1 109 +char 1 115 +char 1 101 +char 1 99 +char 1 32 +char 1 61 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $407 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 49 +char 1 95 +char 1 52 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $405 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 49 +char 1 95 +char 1 51 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $403 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 49 +char 1 95 +char 1 50 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $401 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 49 +char 1 95 +char 1 49 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $398 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 103 +char 1 101 +char 1 110 +char 1 101 +char 1 114 +char 1 105 +char 1 99 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 95 +char 1 50 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $396 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 103 +char 1 101 +char 1 110 +char 1 101 +char 1 114 +char 1 105 +char 1 99 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 95 +char 1 49 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $393 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 50 +char 1 95 +char 1 52 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $391 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 50 +char 1 95 +char 1 51 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $389 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 50 +char 1 95 +char 1 50 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $387 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 50 +char 1 95 +char 1 49 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $385 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 49 +char 1 95 +char 1 52 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $383 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 49 +char 1 95 +char 1 51 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $381 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 49 +char 1 95 +char 1 50 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $379 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 116 +char 1 101 +char 1 49 +char 1 95 +char 1 49 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $376 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 50 +char 1 95 +char 1 52 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $374 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 50 +char 1 95 +char 1 51 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $372 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 50 +char 1 95 +char 1 50 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $370 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 50 +char 1 95 +char 1 49 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $368 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 49 +char 1 95 +char 1 52 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $366 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 49 +char 1 95 +char 1 51 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $364 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 49 +char 1 95 +char 1 50 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $362 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 47 +char 1 109 +char 1 101 +char 1 116 +char 1 97 +char 1 108 +char 1 49 +char 1 95 +char 1 49 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $322 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 47 +char 1 103 +char 1 108 +char 1 97 +char 1 115 +char 1 115 +char 1 47 +char 1 103 +char 1 108 +char 1 99 +char 1 104 +char 1 117 +char 1 110 +char 1 107 +char 1 115 +char 1 95 +char 1 37 +char 1 105 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $263 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 103 +char 1 108 +char 1 97 +char 1 115 +char 1 115 +char 1 98 +char 1 114 +char 1 101 +char 1 97 +char 1 107 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 diff --git a/code/cgame/vm/cg_ents.asm b/code/cgame/vm/cg_ents.asm new file mode 100644 index 0000000..0f158b7 --- /dev/null +++ b/code/cgame/vm/cg_ents.asm @@ -0,0 +1,18121 @@ +export CG_PositionEntityOnTag +code +proc CG_PositionEntityOnTag 96 24 +file "../cg_ents.c" +line 26 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_ents.c -- present snapshot entities, happens every single frame +;4: +;5:#include "cg_local.h" +;6:/* +;7:Ghoul2 Insert Start +;8:*/ +;9:#include "..\game\q_shared.h" +;10:#include "..\ghoul2\g2.h" +;11:/* +;12:Ghoul2 Insert end +;13:*/ +;14: +;15:static void CG_Missile( centity_t *cent ); +;16: +;17:/* +;18:====================== +;19:CG_PositionEntityOnTag +;20: +;21:Modifies the entities position and axis by the given +;22:tag location +;23:====================== +;24:*/ +;25:void CG_PositionEntityOnTag( refEntity_t *entity, const refEntity_t *parent, +;26: qhandle_t parentModel, char *tagName ) { +line 31 +;27: int i; +;28: orientation_t lerped; +;29: +;30: // lerp the tag +;31: trap_R_LerpTag( &lerped, parentModel, parent->oldframe, parent->frame, +ADDRLP4 4 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 52 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 52 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRI4 +ARGI4 +CNSTF4 1065353216 +ADDRLP4 52 +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRF4 +SUBF4 +ARGF4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_LerpTag +CALLI4 +pop +line 35 +;32: 1.0 - parent->backlerp, tagName ); +;33: +;34: // FIXME: allow origin offsets along tag? +;35: VectorCopy( parent->origin, entity->origin ); +ADDRLP4 56 +CNSTI4 52 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +INDIRB +ASGNB 12 +line 36 +;36: for ( i = 0 ; i < 3 ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $121 +line 37 +;37: VectorMA( entity->origin, lerped.origin[i], parent->axis[i], entity->origin ); +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ASGNP4 +ADDRLP4 64 +CNSTI4 12 +ASGNI4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +ADDRLP4 64 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +ASGNP4 +ADDRLP4 76 +CNSTI4 12 +ASGNI4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRF4 +ADDRLP4 76 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 76 +INDIRI4 +ADDP4 +ADDP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 88 +CNSTI4 12 +ASGNI4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +ADDRLP4 88 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 88 +INDIRI4 +ADDP4 +ADDP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 38 +;38: } +LABELV $122 +line 36 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $121 +line 41 +;39: +;40: // had to cast away the const to avoid compiler problems... +;41: MatrixMultiply( lerped.axis, ((refEntity_t *)parent)->axis, entity->axis ); +ADDRLP4 4+12 +ARGP4 +ADDRLP4 60 +CNSTI4 12 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP +ARGP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +ARGP4 +ADDRGP4 MatrixMultiply +CALLV +pop +line 42 +;42: entity->backlerp = parent->backlerp; +ADDRLP4 64 +CNSTI4 128 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +line 43 +;43:} +LABELV $120 +endproc CG_PositionEntityOnTag 96 24 +export CG_PositionRotatedEntityOnTag +proc CG_PositionRotatedEntityOnTag 132 24 +line 55 +;44: +;45: +;46:/* +;47:====================== +;48:CG_PositionRotatedEntityOnTag +;49: +;50:Modifies the entities position and axis by the given +;51:tag location +;52:====================== +;53:*/ +;54:void CG_PositionRotatedEntityOnTag( refEntity_t *entity, const refEntity_t *parent, +;55: qhandle_t parentModel, char *tagName ) { +line 62 +;56: int i; +;57: orientation_t lerped; +;58: vec3_t tempAxis[3]; +;59: +;60://AxisClear( entity->axis ); +;61: // lerp the tag +;62: trap_R_LerpTag( &lerped, parentModel, parent->oldframe, parent->frame, +ADDRLP4 4 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 88 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRI4 +ARGI4 +CNSTF4 1065353216 +ADDRLP4 88 +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRF4 +SUBF4 +ARGF4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_LerpTag +CALLI4 +pop +line 66 +;63: 1.0 - parent->backlerp, tagName ); +;64: +;65: // FIXME: allow origin offsets along tag? +;66: VectorCopy( parent->origin, entity->origin ); +ADDRLP4 92 +CNSTI4 52 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +INDIRB +ASGNB 12 +line 67 +;67: for ( i = 0 ; i < 3 ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $127 +line 68 +;68: VectorMA( entity->origin, lerped.origin[i], parent->axis[i], entity->origin ); +ADDRLP4 96 +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ASGNP4 +ADDRLP4 100 +CNSTI4 12 +ASGNI4 +ADDRLP4 96 +INDIRP4 +ADDRLP4 96 +INDIRP4 +INDIRF4 +ADDRLP4 100 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 100 +INDIRI4 +ADDP4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 108 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +ASGNP4 +ADDRLP4 112 +CNSTI4 12 +ASGNI4 +ADDRLP4 108 +INDIRP4 +ADDRLP4 108 +INDIRP4 +INDIRF4 +ADDRLP4 112 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 112 +INDIRI4 +ADDP4 +ADDP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 120 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 124 +CNSTI4 12 +ASGNI4 +ADDRLP4 120 +INDIRP4 +ADDRLP4 120 +INDIRP4 +INDIRF4 +ADDRLP4 124 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 124 +INDIRI4 +ADDP4 +ADDP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 69 +;69: } +LABELV $128 +line 67 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $127 +line 72 +;70: +;71: // had to cast away the const to avoid compiler problems... +;72: MatrixMultiply( entity->axis, lerped.axis, tempAxis ); +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRLP4 4+12 +ARGP4 +ADDRLP4 52 +ARGP4 +ADDRGP4 MatrixMultiply +CALLV +pop +line 73 +;73: MatrixMultiply( tempAxis, ((refEntity_t *)parent)->axis, entity->axis ); +ADDRLP4 52 +ARGP4 +ADDRLP4 96 +CNSTI4 12 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 96 +INDIRI4 +ADDP +ARGP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 96 +INDIRI4 +ADDP4 +ARGP4 +ADDRGP4 MatrixMultiply +CALLV +pop +line 74 +;74:} +LABELV $126 +endproc CG_PositionRotatedEntityOnTag 132 24 +export CG_SetEntitySoundPosition +proc CG_SetEntitySoundPosition 24 8 +line 93 +;75: +;76: +;77: +;78:/* +;79:========================================================================== +;80: +;81:FUNCTIONS CALLED EACH FRAME +;82: +;83:========================================================================== +;84:*/ +;85: +;86:/* +;87:====================== +;88:CG_SetEntitySoundPosition +;89: +;90:Also called by event processing code +;91:====================== +;92:*/ +;93:void CG_SetEntitySoundPosition( centity_t *cent ) { +line 94 +;94: if ( cent->currentState.solid == SOLID_BMODEL ) +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 16777215 +NEI4 $133 +line 95 +;95: { +line 99 +;96: vec3_t origin; +;97: float *v; +;98: +;99: v = cgs.inlineModelMidpoints[ cent->currentState.modelindex ]; +ADDRLP4 12 +CNSTI4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+39952 +ADDP4 +ASGNP4 +line 100 +;100: VectorAdd( cent->lerpOrigin, v, origin ); +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 12 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 16 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 101 +;101: trap_S_UpdateEntityPosition( cent->currentState.number, origin ); +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_S_UpdateEntityPosition +CALLV +pop +line 102 +;102: } +ADDRGP4 $134 +JUMPV +LABELV $133 +line 104 +;103: else +;104: { +line 105 +;105: trap_S_UpdateEntityPosition( cent->currentState.number, cent->lerpOrigin ); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 trap_S_UpdateEntityPosition +CALLV +pop +line 106 +;106: } +LABELV $134 +line 107 +;107:} +LABELV $132 +endproc CG_SetEntitySoundPosition 24 8 +proc CG_EntityEffects 28 20 +line 116 +;108: +;109:/* +;110:================== +;111:CG_EntityEffects +;112: +;113:Add continuous entity effects, like local entity emission and lighting +;114:================== +;115:*/ +;116:static void CG_EntityEffects( centity_t *cent ) { +line 119 +;117: +;118: // update sound origins +;119: CG_SetEntitySoundPosition( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_SetEntitySoundPosition +CALLV +pop +line 122 +;120: +;121: // add loop sound +;122: if ( cent->currentState.loopSound ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $139 +line 124 +;123: //rww - doors and things with looping sounds have a crazy origin (being brush models and all) +;124: if ( cent->currentState.solid == SOLID_BMODEL ) +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 16777215 +NEI4 $141 +line 125 +;125: { +line 129 +;126: vec3_t origin; +;127: float *v; +;128: +;129: v = cgs.inlineModelMidpoints[ cent->currentState.modelindex ]; +ADDRLP4 12 +CNSTI4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+39952 +ADDP4 +ASGNP4 +line 130 +;130: VectorAdd( cent->lerpOrigin, v, origin ); +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 12 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 16 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 131 +;131: trap_S_AddLoopingSound( cent->currentState.number, origin, vec3_origin, +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddLoopingSound +CALLV +pop +line 133 +;132: cgs.gameSounds[ cent->currentState.loopSound ] ); +;133: } +ADDRGP4 $142 +JUMPV +LABELV $141 +line 134 +;134: else if (cent->currentState.eType != ET_SPEAKER) { +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 9 +EQI4 $147 +line 135 +;135: trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddLoopingSound +CALLV +pop +line 137 +;136: cgs.gameSounds[ cent->currentState.loopSound ] ); +;137: } else { +ADDRGP4 $148 +JUMPV +LABELV $147 +line 138 +;138: trap_S_AddRealLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddRealLoopingSound +CALLV +pop +line 140 +;139: cgs.gameSounds[ cent->currentState.loopSound ] ); +;140: } +LABELV $148 +LABELV $142 +line 141 +;141: } +LABELV $139 +line 145 +;142: +;143: +;144: // constant light glow +;145: if ( cent->currentState.constantLight ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $151 +line 149 +;146: int cl; +;147: int i, r, g, b; +;148: +;149: cl = cent->currentState.constantLight; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +line 150 +;150: r = cl & 255; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +CNSTI4 255 +BANDI4 +ASGNI4 +line 151 +;151: g = ( cl >> 8 ) & 255; +ADDRLP4 12 +ADDRLP4 0 +INDIRI4 +CNSTI4 8 +RSHI4 +CNSTI4 255 +BANDI4 +ASGNI4 +line 152 +;152: b = ( cl >> 16 ) & 255; +ADDRLP4 16 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +RSHI4 +CNSTI4 255 +BANDI4 +ASGNI4 +line 153 +;153: i = ( ( cl >> 24 ) & 255 ) * 4; +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 24 +RSHI4 +CNSTI4 255 +BANDI4 +CNSTI4 2 +LSHI4 +ASGNI4 +line 154 +;154: trap_R_AddLightToScene( cent->lerpOrigin, i, r, g, b ); +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 trap_R_AddLightToScene +CALLV +pop +line 155 +;155: } +LABELV $151 +line 157 +;156: +;157:} +LABELV $138 +endproc CG_EntityEffects 28 20 +export FX_AddOrientedLine +proc FX_AddOrientedLine 16 8 +line 161 +;158: +;159:localEntity_t *FX_AddOrientedLine(vec3_t start, vec3_t end, vec3_t normal, float stScale, float scale, +;160: float dscale, float startalpha, float endalpha, float killTime, qhandle_t shader) +;161:{ +line 171 +;162: localEntity_t *le; +;163: +;164:#ifdef _DEBUG +;165: if (!shader) +;166: { +;167: Com_Printf("FX_AddLine: NULL shader\n"); +;168: } +;169:#endif +;170: +;171: le = CG_AllocLocalEntity(); +ADDRLP4 4 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 172 +;172: le->leType = LE_OLINE; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 11 +ASGNI4 +line 174 +;173: +;174: le->startTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 175 +;175: le->endTime = le->startTime + killTime; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRFP4 32 +INDIRF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 176 +;176: le->data.line.width = scale; +ADDRLP4 0 +INDIRP4 +CNSTI4 168 +ADDP4 +ADDRFP4 16 +INDIRF4 +ASGNF4 +line 177 +;177: le->data.line.dwidth = dscale; +ADDRLP4 0 +INDIRP4 +CNSTI4 172 +ADDP4 +ADDRFP4 20 +INDIRF4 +ASGNF4 +line 179 +;178: +;179: le->alpha = startalpha; +ADDRLP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ADDRFP4 24 +INDIRF4 +ASGNF4 +line 180 +;180: le->dalpha = endalpha - startalpha; +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDRFP4 28 +INDIRF4 +ADDRFP4 24 +INDIRF4 +SUBF4 +ASGNF4 +line 182 +;181: +;182: le->refEntity.data.line.stscale = stScale; +ADDRLP4 0 +INDIRP4 +CNSTI4 404 +ADDP4 +ADDRFP4 12 +INDIRF4 +ASGNF4 +line 183 +;183: le->refEntity.data.line.width = scale; +ADDRLP4 0 +INDIRP4 +CNSTI4 396 +ADDP4 +ADDRFP4 16 +INDIRF4 +ASGNF4 +line 185 +;184: +;185: le->refEntity.customShader = shader; +ADDRLP4 0 +INDIRP4 +CNSTI4 324 +ADDP4 +ADDRFP4 36 +INDIRI4 +ASGNI4 +line 188 +;186: +;187: // set origin +;188: VectorCopy ( start, le->refEntity.origin); +ADDRLP4 0 +INDIRP4 +CNSTI4 300 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 189 +;189: VectorCopy ( end, le->refEntity.oldorigin ); +ADDRLP4 0 +INDIRP4 +CNSTI4 312 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 191 +;190: +;191: AxisClear(le->refEntity.axis); +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ARGP4 +ADDRGP4 AxisClear +CALLV +pop +line 192 +;192: VectorCopy( normal, le->refEntity.axis[0] ); +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDRFP4 8 +INDIRP4 +INDIRB +ASGNB 12 +line 193 +;193: RotateAroundDirection( le->refEntity.axis, 0); // le->refEntity.data.sprite.rotation ); This is roll in quad land +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRGP4 RotateAroundDirection +CALLV +pop +line 195 +;194: +;195: le->refEntity.shaderRGBA[0] = 0xff; +ADDRLP4 0 +INDIRP4 +CNSTI4 328 +ADDP4 +CNSTU1 255 +ASGNU1 +line 196 +;196: le->refEntity.shaderRGBA[1] = 0xff; +ADDRLP4 0 +INDIRP4 +CNSTI4 329 +ADDP4 +CNSTU1 255 +ASGNU1 +line 197 +;197: le->refEntity.shaderRGBA[2] = 0xff; +ADDRLP4 0 +INDIRP4 +CNSTI4 330 +ADDP4 +CNSTU1 255 +ASGNU1 +line 198 +;198: le->refEntity.shaderRGBA[3] = 0xff; +ADDRLP4 0 +INDIRP4 +CNSTI4 331 +ADDP4 +CNSTU1 255 +ASGNU1 +line 200 +;199: +;200: le->color[0] = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 201 +;201: le->color[1] = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 202 +;202: le->color[2] = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 203 +;203: le->color[3] = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 204 +;204: le->lifeRate = 1.0 / ( le->endTime - le->startTime ); +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 1065353216 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 206 +;205: +;206: return(le); +ADDRLP4 0 +INDIRP4 +RETP4 +LABELV $153 +endproc FX_AddOrientedLine 16 8 +export FX_DrawPortableShield +proc FX_DrawPortableShield 1104 40 +line 210 +;207:} +;208: +;209:void FX_DrawPortableShield(centity_t *cent) +;210:{ +line 220 +;211: //rww - this code differs a bit from the draw code in EF, I don't know why I had to do +;212: //it this way yet it worked in EF the other way. +;213: +;214: int xaxis, height, posWidth, negWidth, team; +;215: vec3_t start, end, normal; +;216: localEntity_t *le; +;217: qhandle_t shader; +;218: char buf[1024]; +;219: +;220: trap_Cvar_VariableStringBuffer("cl_paused", buf, sizeof(buf)); +ADDRGP4 $156 +ARGP4 +ADDRLP4 40 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 trap_Cvar_VariableStringBuffer +CALLV +pop +line 222 +;221: +;222: if (atoi(buf)) +ADDRLP4 40 +ARGP4 +ADDRLP4 1088 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 1088 +INDIRI4 +CNSTI4 0 +EQI4 $157 +line 223 +;223: { //rww - fix to keep from rendering repeatedly while HUD menu is up +line 224 +;224: return; +ADDRGP4 $155 +JUMPV +LABELV $157 +line 227 +;225: } +;226: +;227: if (cent->currentState.eFlags & EF_NODRAW) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $159 +line 228 +;228: { +line 229 +;229: return; +ADDRGP4 $155 +JUMPV +LABELV $159 +line 233 +;230: } +;231: +;232: // decode the data stored in time2 +;233: xaxis = ((cent->currentState.time2 >> 24) & 1); +ADDRLP4 1064 +ADDRFP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 24 +RSHI4 +CNSTI4 1 +BANDI4 +ASGNI4 +line 234 +;234: height = ((cent->currentState.time2 >> 16) & 255); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 16 +RSHI4 +CNSTI4 255 +BANDI4 +ASGNI4 +line 235 +;235: posWidth = ((cent->currentState.time2 >> 8) & 255); +ADDRLP4 1068 +ADDRFP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 8 +RSHI4 +CNSTI4 255 +BANDI4 +ASGNI4 +line 236 +;236: negWidth = (cent->currentState.time2 & 255); +ADDRLP4 1072 +ADDRFP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 255 +BANDI4 +ASGNI4 +line 238 +;237: +;238: team = (cent->currentState.otherEntityNum2); +ADDRLP4 1076 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ASGNI4 +line 240 +;239: +;240: VectorClear(normal); +ADDRLP4 1092 +CNSTF4 0 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 1092 +INDIRF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 1092 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 1092 +INDIRF4 +ASGNF4 +line 242 +;241: +;242: VectorCopy(cent->lerpOrigin, start); +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 243 +;243: VectorCopy(cent->lerpOrigin, end); +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 245 +;244: +;245: if (xaxis) // drawing along x-axis +ADDRLP4 1064 +INDIRI4 +CNSTI4 0 +EQI4 $163 +line 246 +;246: { +line 247 +;247: start[0] -= negWidth; +ADDRLP4 16 +ADDRLP4 16 +INDIRF4 +ADDRLP4 1072 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 248 +;248: end[0] += posWidth; +ADDRLP4 28 +ADDRLP4 28 +INDIRF4 +ADDRLP4 1068 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 249 +;249: } +ADDRGP4 $164 +JUMPV +LABELV $163 +line 251 +;250: else +;251: { +line 252 +;252: start[1] -= negWidth; +ADDRLP4 16+4 +ADDRLP4 16+4 +INDIRF4 +ADDRLP4 1072 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 253 +;253: end[1] += posWidth; +ADDRLP4 28+4 +ADDRLP4 28+4 +INDIRF4 +ADDRLP4 1068 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 254 +;254: } +LABELV $164 +line 256 +;255: +;256: normal[0] = 1; +ADDRLP4 0 +CNSTF4 1065353216 +ASGNF4 +line 257 +;257: normal[1] = 1; +ADDRLP4 0+4 +CNSTF4 1065353216 +ASGNF4 +line 259 +;258: +;259: start[2] += height/2; +ADDRLP4 16+8 +ADDRLP4 16+8 +INDIRF4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +DIVI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 260 +;260: end[2] += height/2; +ADDRLP4 28+8 +ADDRLP4 28+8 +INDIRF4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +DIVI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 262 +;261: +;262: if (team == TEAM_RED) +ADDRLP4 1076 +INDIRI4 +CNSTI4 1 +NEI4 $170 +line 263 +;263: { +line 264 +;264: if (cent->currentState.trickedentindex) +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $172 +line 265 +;265: { +line 266 +;266: shader = trap_R_RegisterShader( "gfx/misc/red_dmgshield" ); +ADDRGP4 $174 +ARGP4 +ADDRLP4 1096 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 1080 +ADDRLP4 1096 +INDIRI4 +ASGNI4 +line 267 +;267: } +ADDRGP4 $171 +JUMPV +LABELV $172 +line 269 +;268: else +;269: { +line 270 +;270: shader = trap_R_RegisterShader( "gfx/misc/red_portashield" ); +ADDRGP4 $175 +ARGP4 +ADDRLP4 1096 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 1080 +ADDRLP4 1096 +INDIRI4 +ASGNI4 +line 271 +;271: } +line 272 +;272: } +ADDRGP4 $171 +JUMPV +LABELV $170 +line 274 +;273: else +;274: { +line 275 +;275: if (cent->currentState.trickedentindex) +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $176 +line 276 +;276: { +line 277 +;277: shader = trap_R_RegisterShader( "gfx/misc/blue_dmgshield" ); +ADDRGP4 $178 +ARGP4 +ADDRLP4 1096 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 1080 +ADDRLP4 1096 +INDIRI4 +ASGNI4 +line 278 +;278: } +ADDRGP4 $177 +JUMPV +LABELV $176 +line 280 +;279: else +;280: { +line 281 +;281: shader = trap_R_RegisterShader( "gfx/misc/blue_portashield" ); +ADDRGP4 $179 +ARGP4 +ADDRLP4 1096 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 1080 +ADDRLP4 1096 +INDIRI4 +ASGNI4 +line 282 +;282: } +LABELV $177 +line 283 +;283: } +LABELV $171 +line 285 +;284: +;285: le = FX_AddOrientedLine(start, end, normal, 1.0f, height, 0.0f, 1.0f, 1.0f, 50.0, shader); +ADDRLP4 16 +ARGP4 +ADDRLP4 28 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1096 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 1096 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 0 +ARGF4 +ADDRLP4 1096 +INDIRF4 +ARGF4 +ADDRLP4 1096 +INDIRF4 +ARGF4 +CNSTF4 1112014848 +ARGF4 +ADDRLP4 1080 +INDIRI4 +ARGI4 +ADDRLP4 1100 +ADDRGP4 FX_AddOrientedLine +CALLP4 +ASGNP4 +ADDRLP4 1084 +ADDRLP4 1100 +INDIRP4 +ASGNP4 +line 286 +;286:} +LABELV $155 +endproc FX_DrawPortableShield 1104 40 +export CG_Special +proc CG_Special 4 4 +line 293 +;287: +;288:/* +;289:================== +;290:CG_Special +;291:================== +;292:*/ +;293:void CG_Special( centity_t *cent ) { +line 296 +;294: entityState_t *s1; +;295: +;296: s1 = ¢->currentState; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 298 +;297: +;298: if (!s1) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $181 +line 299 +;299: { +line 300 +;300: return; +ADDRGP4 $180 +JUMPV +LABELV $181 +line 304 +;301: } +;302: +;303: // if set to invisible, skip +;304: if (!s1->modelindex) { +ADDRLP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $183 +line 305 +;305: return; +ADDRGP4 $180 +JUMPV +LABELV $183 +line 308 +;306: } +;307: +;308: if (s1->modelindex == HI_SHIELD) +ADDRLP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $185 +line 309 +;309: { // The portable shield should go through a different rendering function. +line 310 +;310: FX_DrawPortableShield(cent); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 FX_DrawPortableShield +CALLV +pop +line 311 +;311: return; +LABELV $185 +line 313 +;312: } +;313:} +LABELV $180 +endproc CG_Special 4 4 +export CG_SetGhoul2Info +proc CG_SetGhoul2Info 0 0 +line 321 +;314: +;315:/* +;316:Ghoul2 Insert Start +;317:*/ +;318: +;319:// Copy the ghoul2 data into the ref ent correctly +;320:void CG_SetGhoul2Info( refEntity_t *ent, centity_t *cent) +;321:{ +line 323 +;322: +;323: ent->ghoul2 = cent->ghoul2; +ADDRFP4 0 +INDIRP4 +CNSTI4 208 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ASGNP4 +line 324 +;324: VectorCopy( cent->modelScale, ent->modelScale); +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 964 +ADDP4 +INDIRB +ASGNB 12 +line 325 +;325: ent->radius = cent->radius; +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 976 +ADDP4 +INDIRF4 +ASGNF4 +line 326 +;326: VectorCopy (cent->lerpAngles, ent->angles); +ADDRFP4 0 +INDIRP4 +CNSTI4 184 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 327 +;327:} +LABELV $187 +endproc CG_SetGhoul2Info 0 0 +export CG_CreateBBRefEnts +proc CG_CreateBBRefEnts 0 0 +line 333 +;328: +;329: +;330: +;331:// create 8 new points on screen around a model so we can see it's bounding box +;332:void CG_CreateBBRefEnts(entityState_t *s1, vec3_t origin ) +;333:{ +line 398 +;334:/* +;335://g2r +;336:#if _DEBUG +;337: refEntity_t point[8]; +;338: int i; +;339: vec3_t angles = {0,0,0}; +;340: +;341: for (i=0; i<8; i++) +;342: { +;343: memset (&point[i], 0, sizeof(refEntity_t)); +;344: point[i].reType = RT_SPRITE; +;345: point[i].radius = 1; +;346: point[i].customShader = trap_R_RegisterShader("textures/tests/circle"); +;347: point[i].shaderRGBA[0] = 255; +;348: point[i].shaderRGBA[1] = 255; +;349: point[i].shaderRGBA[2] = 255; +;350: point[i].shaderRGBA[3] = 255; +;351: +;352: AnglesToAxis( angles, point[i].axis ); +;353: +;354: // now, we need to put the correct origins into each origin from the mins and max's +;355: switch(i) +;356: { +;357: case 0: +;358: VectorCopy(s1->mins, point[i].origin); +;359: break; +;360: case 1: +;361: VectorCopy(s1->mins, point[i].origin); +;362: point[i].origin[0] = s1->maxs[0]; +;363: break; +;364: case 2: +;365: VectorCopy(s1->mins, point[i].origin); +;366: point[i].origin[1] = s1->maxs[1]; +;367: break; +;368: case 3: +;369: VectorCopy(s1->mins, point[i].origin); +;370: point[i].origin[0] = s1->maxs[0]; +;371: point[i].origin[1] = s1->maxs[1]; +;372: break; +;373: case 4: +;374: VectorCopy(s1->maxs, point[i].origin); +;375: break; +;376: case 5: +;377: VectorCopy(s1->maxs, point[i].origin); +;378: point[i].origin[0] = s1->mins[0]; +;379: break; +;380: case 6: +;381: VectorCopy(s1->maxs, point[i].origin); +;382: point[i].origin[1] = s1->mins[1]; +;383: break; +;384: case 7: +;385: VectorCopy(s1->maxs, point[i].origin); +;386: point[i].origin[0] = s1->mins[0]; +;387: point[i].origin[1] = s1->mins[1]; +;388: break; +;389: } +;390: +;391: // add the original origin to each point and then stuff them out there +;392: VectorAdd(point[i].origin, origin, point[i].origin); +;393: +;394: trap_R_AddRefEntityToScene (&point[i]); +;395: } +;396:#endif +;397: */ +;398:} +LABELV $188 +endproc CG_CreateBBRefEnts 0 0 +export G2_BoltToGhoul2Model +proc G2_BoltToGhoul2Model 68 36 +line 402 +;399: +;400:// write in the axis and stuff +;401:void G2_BoltToGhoul2Model(centity_t *cent, refEntity_t *ent) +;402:{ +line 404 +;403: // extract the wraith ID from the bolt info +;404: int modelNum = cent->boltInfo >> MODEL_SHIFT; +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +CNSTI4 980 +ADDP4 +INDIRI4 +CNSTI4 10 +RSHI4 +ASGNI4 +line 405 +;405: int boltNum = cent->boltInfo >> BOLT_SHIFT; +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 980 +ADDP4 +INDIRI4 +ASGNI4 +line 406 +;406: int entNum = cent->boltInfo >> ENTITY_SHIFT; +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +CNSTI4 980 +ADDP4 +INDIRI4 +CNSTI4 20 +RSHI4 +ASGNI4 +line 409 +;407: mdxaBone_t boltMatrix; +;408: +;409: modelNum &= MODEL_AND; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1023 +BANDI4 +ASGNI4 +line 410 +;410: boltNum &= BOLT_AND; +ADDRLP4 56 +ADDRLP4 56 +INDIRI4 +CNSTI4 1023 +BANDI4 +ASGNI4 +line 411 +;411: entNum &= ENTITY_AND; +ADDRLP4 48 +ADDRLP4 48 +INDIRI4 +CNSTI4 4095 +BANDI4 +ASGNI4 +line 415 +;412: +;413: +;414: //NOTENOTE I put this here because the cgs.gamemodels array no longer gets initialized. +;415: assert(0); +line 419 +;416: +;417: +;418: // go away and get me the bolt position for this frame please +;419: trap_G2API_GetBoltMatrix(cent->ghoul2, modelNum, boltNum, &boltMatrix, cg_entities[entNum].currentState.angles, cg_entities[entNum].currentState.origin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 52 +INDIRI4 +ARGI4 +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 64 +CNSTI4 1920 +ADDRLP4 48 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +ADDRGP4 cg_entities+116 +ADDP4 +ARGP4 +ADDRLP4 64 +INDIRI4 +ADDRGP4 cg_entities+92 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 422 +;420: +;421: // set up the axis and origin we need for the actual effect spawning +;422: ent->origin[0] = boltMatrix.matrix[0][3]; +ADDRFP4 4 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRLP4 0+12 +INDIRF4 +ASGNF4 +line 423 +;423: ent->origin[1] = boltMatrix.matrix[1][3]; +ADDRFP4 4 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDRLP4 0+16+12 +INDIRF4 +ASGNF4 +line 424 +;424: ent->origin[2] = boltMatrix.matrix[2][3]; +ADDRFP4 4 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRLP4 0+32+12 +INDIRF4 +ASGNF4 +line 426 +;425: +;426: ent->axis[0][0] = boltMatrix.matrix[0][0]; +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 427 +;427: ent->axis[0][1] = boltMatrix.matrix[1][0]; +ADDRFP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 0+16 +INDIRF4 +ASGNF4 +line 428 +;428: ent->axis[0][2] = boltMatrix.matrix[2][0]; +ADDRFP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0+32 +INDIRF4 +ASGNF4 +line 430 +;429: +;430: ent->axis[1][0] = boltMatrix.matrix[0][1]; +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 0+4 +INDIRF4 +ASGNF4 +line 431 +;431: ent->axis[1][1] = boltMatrix.matrix[1][1]; +ADDRFP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 0+16+4 +INDIRF4 +ASGNF4 +line 432 +;432: ent->axis[1][2] = boltMatrix.matrix[2][1]; +ADDRFP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 0+32+4 +INDIRF4 +ASGNF4 +line 434 +;433: +;434: ent->axis[2][0] = boltMatrix.matrix[0][2]; +ADDRFP4 4 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 0+8 +INDIRF4 +ASGNF4 +line 435 +;435: ent->axis[2][1] = boltMatrix.matrix[1][2]; +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 0+16+8 +INDIRF4 +ASGNF4 +line 436 +;436: ent->axis[2][2] = boltMatrix.matrix[2][2]; +ADDRFP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 0+32+8 +INDIRF4 +ASGNF4 +line 437 +;437:} +LABELV $189 +endproc G2_BoltToGhoul2Model 68 36 +export ScaleModelAxis +proc ScaleModelAxis 36 0 +line 441 +;438: +;439:void ScaleModelAxis(refEntity_t *ent) +;440: +;441:{ // scale the model should we need to +line 442 +;442: if (ent->modelScale[0] && ent->modelScale[0] != 1.0f) +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +EQF4 $212 +ADDRLP4 0 +INDIRF4 +CNSTF4 1065353216 +EQF4 $212 +line 443 +;443: { +line 444 +;444: VectorScale( ent->axis[0], ent->modelScale[0] , ent->axis[0] ); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 12 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +ADDRLP4 20 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 445 +;445: ent->nonNormalizedAxes = qtrue; +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 1 +ASGNI4 +line 446 +;446: } +LABELV $212 +line 447 +;447: if (ent->modelScale[1] && ent->modelScale[1] != 1.0f) +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +EQF4 $214 +ADDRLP4 4 +INDIRF4 +CNSTF4 1065353216 +EQF4 $214 +line 448 +;448: { +line 449 +;449: VectorScale( ent->axis[1], ent->modelScale[1] , ent->axis[1] ); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 16 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 24 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 450 +;450: ent->nonNormalizedAxes = qtrue; +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 1 +ASGNI4 +line 451 +;451: } +LABELV $214 +line 452 +;452: if (ent->modelScale[2] && ent->modelScale[2] != 1.0f) +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 8 +INDIRF4 +CNSTF4 0 +EQF4 $216 +ADDRLP4 8 +INDIRF4 +CNSTF4 1065353216 +EQF4 $216 +line 453 +;453: { +line 454 +;454: VectorScale( ent->axis[2], ent->modelScale[2] , ent->axis[2] ); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 12 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +ADDRLP4 20 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +ADDRLP4 28 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 28 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 455 +;455: ent->nonNormalizedAxes = qtrue; +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 1 +ASGNI4 +line 456 +;456: } +LABELV $216 +line 457 +;457:} +LABELV $211 +endproc ScaleModelAxis 36 0 +data +export forceHolocronModels +align 4 +LABELV forceHolocronModels +address $218 +address $219 +address $220 +address $221 +address $222 +address $223 +address $224 +address $225 +address $226 +address $227 +address $228 +address $229 +address $230 +address $231 +address $232 +address $233 +address $234 +address $235 +code +proc CG_General 472 44 +line 488 +;458:/* +;459:Ghoul2 Insert End +;460:*/ +;461: +;462:char *forceHolocronModels[] = { +;463: "models/map_objects/mp/lt_heal.md3", //FP_HEAL, +;464: "models/map_objects/mp/force_jump.md3", //FP_LEVITATION, +;465: "models/map_objects/mp/force_speed.md3", //FP_SPEED, +;466: "models/map_objects/mp/force_push.md3", //FP_PUSH, +;467: "models/map_objects/mp/force_pull.md3", //FP_PULL, +;468: "models/map_objects/mp/lt_telepathy.md3", //FP_TELEPATHY, +;469: "models/map_objects/mp/dk_grip.md3", //FP_GRIP, +;470: "models/map_objects/mp/dk_lightning.md3", //FP_LIGHTNING, +;471: "models/map_objects/mp/dk_rage.md3", //FP_RAGE, +;472: "models/map_objects/mp/lt_protect.md3", //FP_PROTECT, +;473: "models/map_objects/mp/lt_absorb.md3", //FP_ABSORB, +;474: "models/map_objects/mp/lt_healother.md3", //FP_TEAM_HEAL, +;475: "models/map_objects/mp/dk_powerother.md3", //FP_TEAM_FORCE, +;476: "models/map_objects/mp/dk_drain.md3", //FP_DRAIN, +;477: "models/map_objects/mp/force_sight.md3", //FP_SEE, +;478: "models/map_objects/mp/saber_attack.md3", //FP_SABERATTACK, +;479: "models/map_objects/mp/saber_defend.md3", //FP_SABERDEFEND, +;480: "models/map_objects/mp/saber_throw.md3" //FP_SABERTHROW +;481:}; +;482: +;483:/* +;484:================== +;485:CG_General +;486:================== +;487:*/ +;488:static void CG_General( centity_t *cent ) { +line 495 +;489: refEntity_t ent; +;490: entityState_t *s1; +;491: float val; +;492: int beamID; +;493: vec3_t beamOrg; +;494: mdxaBone_t matrix; +;495: qboolean doNotSetModel = qfalse; +ADDRLP4 232 +CNSTI4 0 +ASGNI4 +line 497 +;496: +;497: if (cent->currentState.modelGhoul2 == 127) +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 127 +NEI4 $237 +line 498 +;498: { //not ready to be drawn or initialized.. +line 499 +;499: return; +ADDRGP4 $236 +JUMPV +LABELV $237 +line 502 +;500: } +;501: +;502: if (cent->ghoul2 && !cent->currentState.modelGhoul2 && cent->currentState.eType != ET_BODY && +ADDRLP4 288 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 288 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $239 +ADDRLP4 288 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $239 +ADDRLP4 288 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 15 +EQI4 $239 +ADDRLP4 288 +INDIRP4 +INDIRI4 +CNSTI4 32 +LTI4 $239 +line 504 +;503: cent->currentState.number >= MAX_CLIENTS) +;504: { //this is a bad thing +line 505 +;505: if (trap_G2_HaveWeGhoul2Models(cent->ghoul2)) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 292 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 292 +INDIRI4 +CNSTI4 0 +EQI4 $241 +line 506 +;506: { +line 507 +;507: trap_G2API_CleanGhoul2Models(&(cent->ghoul2)); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 508 +;508: } +LABELV $241 +line 509 +;509: } +LABELV $239 +line 511 +;510: +;511: if (cent->currentState.modelGhoul2 >= G2_MODELPART_HEAD && +ADDRLP4 292 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 296 +ADDRLP4 292 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 296 +INDIRI4 +CNSTI4 10 +LTI4 $243 +ADDRLP4 296 +INDIRI4 +CNSTI4 16 +GTI4 $243 +ADDRLP4 292 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 32 +GEI4 $243 +ADDRLP4 292 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 50 +NEI4 $243 +line 515 +;512: cent->currentState.modelGhoul2 <= G2_MODELPART_RLEG && +;513: cent->currentState.modelindex < MAX_CLIENTS && +;514: cent->currentState.weapon == G2_MODEL_PART) +;515: { //special case for client limbs +line 517 +;516: centity_t *clEnt; +;517: int dismember_settings = cg_dismember.integer; +ADDRLP4 304 +ADDRGP4 cg_dismember+12 +INDIRI4 +ASGNI4 +line 519 +;518: +;519: doNotSetModel = qtrue; +ADDRLP4 232 +CNSTI4 1 +ASGNI4 +line 521 +;520: +;521: if (cent->currentState.modelindex >= 0) +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 0 +LTI4 $246 +line 522 +;522: { +line 523 +;523: clEnt = &cg_entities[cent->currentState.modelindex]; +ADDRLP4 300 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 524 +;524: } +ADDRGP4 $247 +JUMPV +LABELV $246 +line 526 +;525: else +;526: { +line 527 +;527: clEnt = &cg_entities[cent->currentState.otherEntityNum2]; +ADDRLP4 300 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 528 +;528: } +LABELV $247 +line 530 +;529: +;530: if (!dismember_settings) +ADDRLP4 304 +INDIRI4 +CNSTI4 0 +NEI4 $248 +line 531 +;531: { //This client does not wish to see dismemberment. +line 532 +;532: return; +ADDRGP4 $236 +JUMPV +LABELV $248 +line 535 +;533: } +;534: +;535: if (dismember_settings < 2 && (cent->currentState.modelGhoul2 == G2_MODELPART_HEAD || cent->currentState.modelGhoul2 == G2_MODELPART_WAIST)) +ADDRLP4 304 +INDIRI4 +CNSTI4 2 +GEI4 $250 +ADDRLP4 308 +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 308 +INDIRI4 +CNSTI4 10 +EQI4 $252 +ADDRLP4 308 +INDIRI4 +CNSTI4 11 +NEI4 $250 +LABELV $252 +line 536 +;536: { //dismember settings are not high enough to display decaps and torso slashes +line 537 +;537: return; +ADDRGP4 $236 +JUMPV +LABELV $250 +line 540 +;538: } +;539: +;540: if (!cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $253 +line 541 +;541: { +line 552 +;542: const char *limbBone; +;543: const char *rotateBone; +;544: char *limbName; +;545: char *limbCapName; +;546: char *stubCapName; +;547: char *limbTagName; +;548: char *stubTagName; +;549: int limb_anim; +;550: int newBolt; +;551: +;552: if (clEnt && clEnt->torsoBolt) +ADDRLP4 300 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $255 +ADDRLP4 300 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $255 +line 553 +;553: { //already have a limb missing! +line 554 +;554: return; +ADDRGP4 $236 +JUMPV +LABELV $255 +line 558 +;555: } +;556: +;557: +;558: if (clEnt && !(clEnt->currentState.eFlags & EF_DEAD)) +ADDRLP4 300 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $257 +ADDRLP4 300 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $257 +line 559 +;559: { //death flag hasn't made it through yet for the limb owner, we cannot create the limb until he's flagged as dead +line 560 +;560: return; +ADDRGP4 $236 +JUMPV +LABELV $257 +line 563 +;561: } +;562: +;563: cent->bolt4 = -1; +ADDRFP4 0 +INDIRP4 +CNSTI4 996 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 564 +;564: cent->trailTime = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 612 +ADDP4 +CNSTI4 0 +ASGNI4 +line 566 +;565: +;566: if (cent->currentState.modelGhoul2 == G2_MODELPART_HEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 10 +NEI4 $259 +line 567 +;567: { +line 568 +;568: limbBone = "cervical"; +ADDRLP4 344 +ADDRGP4 $261 +ASGNP4 +line 569 +;569: rotateBone = "cranium"; +ADDRLP4 320 +ADDRGP4 $262 +ASGNP4 +line 570 +;570: limbName = "head"; +ADDRLP4 316 +ADDRGP4 $263 +ASGNP4 +line 571 +;571: limbCapName = "head_cap_torso_off"; +ADDRLP4 324 +ADDRGP4 $264 +ASGNP4 +line 572 +;572: stubCapName = "torso_cap_head_off"; +ADDRLP4 328 +ADDRGP4 $265 +ASGNP4 +line 573 +;573: limbTagName = "*head_cap_torso"; +ADDRLP4 332 +ADDRGP4 $266 +ASGNP4 +line 574 +;574: stubTagName = "*torso_cap_head"; +ADDRLP4 336 +ADDRGP4 $267 +ASGNP4 +line 575 +;575: limb_anim = BOTH_DISMEMBER_HEAD1; +ADDRLP4 340 +CNSTI4 91 +ASGNI4 +line 576 +;576: } +ADDRGP4 $260 +JUMPV +LABELV $259 +line 577 +;577: else if (cent->currentState.modelGhoul2 == G2_MODELPART_WAIST) +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 11 +NEI4 $268 +line 578 +;578: { +line 579 +;579: limbBone = "pelvis"; +ADDRLP4 344 +ADDRGP4 $270 +ASGNP4 +line 580 +;580: rotateBone = "thoracic"; +ADDRLP4 320 +ADDRGP4 $271 +ASGNP4 +line 581 +;581: limbName = "torso"; +ADDRLP4 316 +ADDRGP4 $272 +ASGNP4 +line 582 +;582: limbCapName = "torso_cap_hips_off"; +ADDRLP4 324 +ADDRGP4 $273 +ASGNP4 +line 583 +;583: stubCapName = "hips_cap_torso_off"; +ADDRLP4 328 +ADDRGP4 $274 +ASGNP4 +line 584 +;584: limbTagName = "*torso_cap_hips"; +ADDRLP4 332 +ADDRGP4 $275 +ASGNP4 +line 585 +;585: stubTagName = "*hips_cap_torso"; +ADDRLP4 336 +ADDRGP4 $276 +ASGNP4 +line 586 +;586: limb_anim = BOTH_DISMEMBER_TORSO1; +ADDRLP4 340 +CNSTI4 92 +ASGNI4 +line 587 +;587: } +ADDRGP4 $269 +JUMPV +LABELV $268 +line 588 +;588: else if (cent->currentState.modelGhoul2 == G2_MODELPART_LARM) +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 12 +NEI4 $277 +line 589 +;589: { +line 590 +;590: limbBone = "lhumerus"; +ADDRLP4 344 +ADDRGP4 $279 +ASGNP4 +line 591 +;591: rotateBone = "lradius"; +ADDRLP4 320 +ADDRGP4 $280 +ASGNP4 +line 592 +;592: limbName = "l_arm"; +ADDRLP4 316 +ADDRGP4 $281 +ASGNP4 +line 593 +;593: limbCapName = "l_arm_cap_torso_off"; +ADDRLP4 324 +ADDRGP4 $282 +ASGNP4 +line 594 +;594: stubCapName = "torso_cap_l_arm_off"; +ADDRLP4 328 +ADDRGP4 $283 +ASGNP4 +line 595 +;595: limbTagName = "*l_arm_cap_torso"; +ADDRLP4 332 +ADDRGP4 $284 +ASGNP4 +line 596 +;596: stubTagName = "*torso_cap_l_arm"; +ADDRLP4 336 +ADDRGP4 $285 +ASGNP4 +line 597 +;597: limb_anim = BOTH_DISMEMBER_LARM; +ADDRLP4 340 +CNSTI4 96 +ASGNI4 +line 598 +;598: } +ADDRGP4 $278 +JUMPV +LABELV $277 +line 599 +;599: else if (cent->currentState.modelGhoul2 == G2_MODELPART_RARM) +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 13 +NEI4 $286 +line 600 +;600: { +line 601 +;601: limbBone = "rhumerus"; +ADDRLP4 344 +ADDRGP4 $288 +ASGNP4 +line 602 +;602: rotateBone = "rradius"; +ADDRLP4 320 +ADDRGP4 $289 +ASGNP4 +line 603 +;603: limbName = "r_arm"; +ADDRLP4 316 +ADDRGP4 $290 +ASGNP4 +line 604 +;604: limbCapName = "r_arm_cap_torso_off"; +ADDRLP4 324 +ADDRGP4 $291 +ASGNP4 +line 605 +;605: stubCapName = "torso_cap_r_arm_off"; +ADDRLP4 328 +ADDRGP4 $292 +ASGNP4 +line 606 +;606: limbTagName = "*r_arm_cap_torso"; +ADDRLP4 332 +ADDRGP4 $293 +ASGNP4 +line 607 +;607: stubTagName = "*torso_cap_r_arm"; +ADDRLP4 336 +ADDRGP4 $294 +ASGNP4 +line 608 +;608: limb_anim = BOTH_DISMEMBER_RARM; +ADDRLP4 340 +CNSTI4 95 +ASGNI4 +line 609 +;609: } +ADDRGP4 $287 +JUMPV +LABELV $286 +line 610 +;610: else if (cent->currentState.modelGhoul2 == G2_MODELPART_RHAND) +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $295 +line 611 +;611: { +line 612 +;612: limbBone = "rradiusX"; +ADDRLP4 344 +ADDRGP4 $297 +ASGNP4 +line 613 +;613: rotateBone = "rhand"; +ADDRLP4 320 +ADDRGP4 $298 +ASGNP4 +line 614 +;614: limbName = "r_hand"; +ADDRLP4 316 +ADDRGP4 $299 +ASGNP4 +line 615 +;615: limbCapName = "r_hand_cap_r_arm_off"; +ADDRLP4 324 +ADDRGP4 $300 +ASGNP4 +line 616 +;616: stubCapName = "r_arm_cap_r_hand_off"; +ADDRLP4 328 +ADDRGP4 $301 +ASGNP4 +line 617 +;617: limbTagName = "*r_hand_cap_r_arm"; +ADDRLP4 332 +ADDRGP4 $302 +ASGNP4 +line 618 +;618: stubTagName = "*r_arm_cap_r_hand"; +ADDRLP4 336 +ADDRGP4 $303 +ASGNP4 +line 619 +;619: limb_anim = BOTH_DISMEMBER_RARM; +ADDRLP4 340 +CNSTI4 95 +ASGNI4 +line 620 +;620: } +ADDRGP4 $296 +JUMPV +LABELV $295 +line 621 +;621: else if (cent->currentState.modelGhoul2 == G2_MODELPART_LLEG) +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 15 +NEI4 $304 +line 622 +;622: { +line 623 +;623: limbBone = "lfemurYZ"; +ADDRLP4 344 +ADDRGP4 $306 +ASGNP4 +line 624 +;624: rotateBone = "ltibia"; +ADDRLP4 320 +ADDRGP4 $307 +ASGNP4 +line 625 +;625: limbName = "l_leg"; +ADDRLP4 316 +ADDRGP4 $308 +ASGNP4 +line 626 +;626: limbCapName = "l_leg_cap_hips_off"; +ADDRLP4 324 +ADDRGP4 $309 +ASGNP4 +line 627 +;627: stubCapName = "hips_cap_l_leg_off"; +ADDRLP4 328 +ADDRGP4 $310 +ASGNP4 +line 628 +;628: limbTagName = "*l_leg_cap_hips"; +ADDRLP4 332 +ADDRGP4 $311 +ASGNP4 +line 629 +;629: stubTagName = "*hips_cap_l_leg"; +ADDRLP4 336 +ADDRGP4 $312 +ASGNP4 +line 630 +;630: limb_anim = BOTH_DISMEMBER_LLEG; +ADDRLP4 340 +CNSTI4 93 +ASGNI4 +line 631 +;631: } +ADDRGP4 $305 +JUMPV +LABELV $304 +line 632 +;632: else if (cent->currentState.modelGhoul2 == G2_MODELPART_RLEG) +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 16 +NEI4 $313 +line 633 +;633: { +line 634 +;634: limbBone = "rfemurYZ"; +ADDRLP4 344 +ADDRGP4 $315 +ASGNP4 +line 635 +;635: rotateBone = "rtibia"; +ADDRLP4 320 +ADDRGP4 $316 +ASGNP4 +line 636 +;636: limbName = "r_leg"; +ADDRLP4 316 +ADDRGP4 $317 +ASGNP4 +line 637 +;637: limbCapName = "r_leg_cap_hips_off"; +ADDRLP4 324 +ADDRGP4 $318 +ASGNP4 +line 638 +;638: stubCapName = "hips_cap_r_leg_off"; +ADDRLP4 328 +ADDRGP4 $319 +ASGNP4 +line 639 +;639: limbTagName = "*r_leg_cap_hips"; +ADDRLP4 332 +ADDRGP4 $320 +ASGNP4 +line 640 +;640: stubTagName = "*hips_cap_r_leg"; +ADDRLP4 336 +ADDRGP4 $321 +ASGNP4 +line 641 +;641: limb_anim = BOTH_DISMEMBER_RLEG; +ADDRLP4 340 +CNSTI4 94 +ASGNI4 +line 642 +;642: } +ADDRGP4 $314 +JUMPV +LABELV $313 +line 644 +;643: else +;644: { +line 645 +;645: limbBone = "rfemurYZ"; +ADDRLP4 344 +ADDRGP4 $315 +ASGNP4 +line 646 +;646: rotateBone = "rtibia"; +ADDRLP4 320 +ADDRGP4 $316 +ASGNP4 +line 647 +;647: limbName = "r_leg"; +ADDRLP4 316 +ADDRGP4 $317 +ASGNP4 +line 648 +;648: limbCapName = "r_leg_cap_hips_off"; +ADDRLP4 324 +ADDRGP4 $318 +ASGNP4 +line 649 +;649: stubCapName = "hips_cap_r_leg_off"; +ADDRLP4 328 +ADDRGP4 $319 +ASGNP4 +line 650 +;650: limbTagName = "*r_leg_cap_hips"; +ADDRLP4 332 +ADDRGP4 $320 +ASGNP4 +line 651 +;651: stubTagName = "*hips_cap_r_leg"; +ADDRLP4 336 +ADDRGP4 $321 +ASGNP4 +line 652 +;652: limb_anim = BOTH_DISMEMBER_RLEG; +ADDRLP4 340 +CNSTI4 94 +ASGNI4 +line 653 +;653: } +LABELV $314 +LABELV $305 +LABELV $296 +LABELV $287 +LABELV $278 +LABELV $269 +LABELV $260 +line 655 +;654: +;655: if (clEnt && clEnt->ghoul2) +ADDRLP4 360 +CNSTU4 0 +ASGNU4 +ADDRLP4 300 +INDIRP4 +CVPU4 4 +ADDRLP4 360 +INDIRU4 +EQU4 $322 +ADDRLP4 300 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 360 +INDIRU4 +EQU4 $322 +line 656 +;656: { +line 657 +;657: animation_t *anim = NULL; +ADDRLP4 364 +CNSTP4 0 +ASGNP4 +line 659 +;658: float animSpeed; +;659: int flags=BONE_ANIM_OVERRIDE_FREEZE; +ADDRLP4 368 +CNSTI4 72 +ASGNI4 +line 662 +;660: clientInfo_t *ci; +;661: +;662: if (clEnt->currentState.number < MAX_CLIENTS) +ADDRLP4 300 +INDIRP4 +INDIRI4 +CNSTI4 32 +GEI4 $324 +line 663 +;663: { +line 664 +;664: ci = &cgs.clientinfo[ clEnt->currentState.number ]; +ADDRLP4 372 +CNSTI4 788 +ADDRLP4 300 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 665 +;665: } +ADDRGP4 $325 +JUMPV +LABELV $324 +line 667 +;666: else +;667: { +line 668 +;668: ci = NULL; +ADDRLP4 372 +CNSTP4 0 +ASGNP4 +line 669 +;669: } +LABELV $325 +line 671 +;670: +;671: if (ci) +ADDRLP4 372 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $327 +line 672 +;672: { +line 676 +;673: //anim = &bgGlobalAnimations[ limb_anim ]; +;674: //I guess it looks better to continue the body anim on the severed limb. If not a bit strange. It's what +;675: //SP seems to do anyway. +;676: anim = &bgGlobalAnimations[ (clEnt->currentState.torsoAnim&~ANIM_TOGGLEBIT) ]; +ADDRLP4 364 +CNSTI4 28 +ADDRLP4 300 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ASGNP4 +line 677 +;677: } +ADDRGP4 $328 +JUMPV +LABELV $327 +line 679 +;678: else +;679: { //a g2anim ent, maybe? For those, we can settle for generic limb anims. +line 680 +;680: anim = &bgGlobalAnimations[ limb_anim ]; +ADDRLP4 364 +CNSTI4 28 +ADDRLP4 340 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ASGNP4 +line 681 +;681: } +LABELV $328 +line 683 +;682: +;683: trap_G2API_DuplicateGhoul2Instance(clEnt->ghoul2, ¢->ghoul2); +ADDRLP4 380 +CNSTI4 952 +ASGNI4 +ADDRLP4 300 +INDIRP4 +ADDRLP4 380 +INDIRI4 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 380 +INDIRI4 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_DuplicateGhoul2Instance +CALLV +pop +line 685 +;684: +;685: if (anim) +ADDRLP4 364 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $329 +line 686 +;686: { +line 688 +;687: int aNum; +;688: animSpeed = 50.0f / anim->frameLerp; +ADDRLP4 376 +CNSTF4 1112014848 +ADDRLP4 364 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 704 +;689: +;690: /* +;691: if (cent->currentState.modelGhoul2 == G2_MODELPART_WAIST) +;692: { +;693: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); +;694: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); +;695: } +;696: else +;697: { +;698: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", anim->firstFrame + anim->numFrames-1, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); +;699: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame + anim->numFrames-1, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0); +;700: } +;701: */ +;702: //I guess it looks better to continue the body anim on the severed limb. If not a bit strange. It's what +;703: //SP seems to do anyway. +;704: if (ci) +ADDRLP4 372 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $331 +line 705 +;705: { +line 706 +;706: aNum = ci->frame+1; +ADDRLP4 384 +ADDRLP4 372 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRGP4 $334 +JUMPV +LABELV $333 +line 709 +;707: +;708: while (aNum >= anim->firstFrame+anim->numFrames) +;709: { +line 710 +;710: aNum--; +ADDRLP4 384 +ADDRLP4 384 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 711 +;711: } +LABELV $334 +line 708 +ADDRLP4 388 +ADDRLP4 364 +INDIRP4 +ASGNP4 +ADDRLP4 384 +INDIRI4 +ADDRLP4 388 +INDIRP4 +INDIRI4 +ADDRLP4 388 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +GEI4 $333 +line 713 +;712: +;713: if (aNum < anim->firstFrame-1) +ADDRLP4 384 +INDIRI4 +ADDRLP4 364 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +GEI4 $332 +line 714 +;714: { //wrong animation...? +line 715 +;715: aNum = (anim->firstFrame+anim->numFrames)-1; +ADDRLP4 392 +ADDRLP4 364 +INDIRP4 +ASGNP4 +ADDRLP4 384 +ADDRLP4 392 +INDIRP4 +INDIRI4 +ADDRLP4 392 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 716 +;716: } +line 717 +;717: } +ADDRGP4 $332 +JUMPV +LABELV $331 +line 719 +;718: else +;719: { +line 720 +;720: aNum = anim->firstFrame; +ADDRLP4 384 +ADDRLP4 364 +INDIRP4 +INDIRI4 +ASGNI4 +line 721 +;721: } +LABELV $332 +line 723 +;722: +;723: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $338 +ARGP4 +ADDRLP4 384 +INDIRI4 +ARGI4 +ADDRLP4 388 +ADDRLP4 364 +INDIRP4 +ASGNP4 +ADDRLP4 388 +INDIRP4 +INDIRI4 +ADDRLP4 388 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 368 +INDIRI4 +ARGI4 +ADDRLP4 376 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 724 +;724: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $340 +ARGP4 +ADDRLP4 384 +INDIRI4 +ARGI4 +ADDRLP4 392 +ADDRLP4 364 +INDIRP4 +ASGNP4 +ADDRLP4 392 +INDIRP4 +INDIRI4 +ADDRLP4 392 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 368 +INDIRI4 +ARGI4 +ADDRLP4 376 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 725 +;725: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $342 +ARGP4 +ADDRLP4 384 +INDIRI4 +ARGI4 +ADDRLP4 396 +ADDRLP4 364 +INDIRP4 +ASGNP4 +ADDRLP4 396 +INDIRP4 +INDIRI4 +ADDRLP4 396 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 368 +INDIRI4 +ARGI4 +ADDRLP4 376 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 726 +;726: } +LABELV $329 +line 727 +;727: } +LABELV $322 +line 729 +;728: +;729: if (!cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $344 +line 730 +;730: { +line 731 +;731: return; +ADDRGP4 $236 +JUMPV +LABELV $344 +line 734 +;732: } +;733: +;734: newBolt = trap_G2API_AddBolt( cent->ghoul2, 0, limbTagName ); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 332 +INDIRP4 +ARGP4 +ADDRLP4 364 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 312 +ADDRLP4 364 +INDIRI4 +ASGNI4 +line 735 +;735: if ( newBolt != -1 ) +ADDRLP4 312 +INDIRI4 +CNSTI4 -1 +EQI4 $346 +line 736 +;736: { +line 739 +;737: vec3_t boltOrg, boltAng; +;738: +;739: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, newBolt, &matrix, cent->lerpAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 392 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 392 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 312 +INDIRI4 +ARGI4 +ADDRLP4 240 +ARGP4 +ADDRLP4 392 +INDIRP4 +CNSTI4 940 +ADDP4 +ARGP4 +ADDRLP4 392 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 392 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 741 +;740: +;741: trap_G2API_GiveMeVectorFromMatrix(&matrix, ORIGIN, boltOrg); +ADDRLP4 240 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 368 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 742 +;742: trap_G2API_GiveMeVectorFromMatrix(&matrix, NEGATIVE_Y, boltAng); +ADDRLP4 240 +ARGP4 +CNSTI4 6 +ARGI4 +ADDRLP4 380 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 744 +;743: +;744: trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/smoke_bolton"), boltOrg, boltAng); +ADDRGP4 $350 +ARGP4 +ADDRLP4 396 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 396 +INDIRI4 +ARGI4 +ADDRLP4 368 +ARGP4 +ADDRLP4 380 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 745 +;745: } +LABELV $346 +line 747 +;746: +;747: cent->bolt4 = newBolt; +ADDRFP4 0 +INDIRP4 +CNSTI4 996 +ADDP4 +ADDRLP4 312 +INDIRI4 +ASGNI4 +line 749 +;748: +;749: trap_G2API_SetRootSurface(cent->ghoul2, 0, limbName); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 316 +INDIRP4 +ARGP4 +ADDRGP4 trap_G2API_SetRootSurface +CALLI4 +pop +line 751 +;750: +;751: trap_G2API_SetNewOrigin(cent->ghoul2, trap_G2API_AddBolt(cent->ghoul2, 0, rotateBone)); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 320 +INDIRP4 +ARGP4 +ADDRLP4 368 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 368 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetNewOrigin +CALLI4 +pop +line 753 +;752: +;753: trap_G2API_SetSurfaceOnOff(cent->ghoul2, limbCapName, 0); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 324 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 trap_G2API_SetSurfaceOnOff +CALLI4 +pop +line 755 +;754: +;755: trap_G2API_SetSurfaceOnOff(clEnt->ghoul2, limbName, 0x00000100); +ADDRLP4 300 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 316 +INDIRP4 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 trap_G2API_SetSurfaceOnOff +CALLI4 +pop +line 756 +;756: trap_G2API_SetSurfaceOnOff(clEnt->ghoul2, stubCapName, 0); +ADDRLP4 300 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 328 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 trap_G2API_SetSurfaceOnOff +CALLI4 +pop +line 758 +;757: +;758: newBolt = trap_G2API_AddBolt( clEnt->ghoul2, 0, stubTagName ); +ADDRLP4 300 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 336 +INDIRP4 +ARGP4 +ADDRLP4 372 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 312 +ADDRLP4 372 +INDIRI4 +ASGNI4 +line 759 +;759: if ( newBolt != -1 ) +ADDRLP4 312 +INDIRI4 +CNSTI4 -1 +EQI4 $351 +line 760 +;760: { +line 763 +;761: vec3_t boltOrg, boltAng; +;762: +;763: trap_G2API_GetBoltMatrix(clEnt->ghoul2, 0, newBolt, &matrix, clEnt->lerpAngles, clEnt->lerpOrigin, cg.time, cgs.gameModels, clEnt->modelScale); +ADDRLP4 300 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 312 +INDIRI4 +ARGI4 +ADDRLP4 240 +ARGP4 +ADDRLP4 300 +INDIRP4 +CNSTI4 940 +ADDP4 +ARGP4 +ADDRLP4 300 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 300 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 765 +;764: +;765: trap_G2API_GiveMeVectorFromMatrix(&matrix, ORIGIN, boltOrg); +ADDRLP4 240 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 376 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 766 +;766: trap_G2API_GiveMeVectorFromMatrix(&matrix, NEGATIVE_Y, boltAng); +ADDRLP4 240 +ARGP4 +CNSTI4 6 +ARGI4 +ADDRLP4 388 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 768 +;767: +;768: trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/smoke_bolton"), boltOrg, boltAng); +ADDRGP4 $350 +ARGP4 +ADDRLP4 404 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 404 +INDIRI4 +ARGI4 +ADDRLP4 376 +ARGP4 +ADDRLP4 388 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 769 +;769: } +LABELV $351 +line 771 +;770: +;771: if (cent->currentState.modelGhoul2 == G2_MODELPART_RARM || cent->currentState.modelGhoul2 == G2_MODELPART_RHAND || cent->currentState.modelGhoul2 == G2_MODELPART_WAIST) +ADDRLP4 376 +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 376 +INDIRI4 +CNSTI4 13 +EQI4 $358 +ADDRLP4 376 +INDIRI4 +CNSTI4 14 +EQI4 $358 +ADDRLP4 376 +INDIRI4 +CNSTI4 11 +NEI4 $355 +LABELV $358 +line 772 +;772: { //Cut his weapon holding arm off, so remove the weapon +line 773 +;773: if (trap_G2API_HasGhoul2ModelOnIndex(&(clEnt->ghoul2), 1)) +ADDRLP4 300 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 380 +ADDRGP4 trap_G2API_HasGhoul2ModelOnIndex +CALLI4 +ASGNI4 +ADDRLP4 380 +INDIRI4 +CNSTI4 0 +EQI4 $359 +line 774 +;774: { +line 775 +;775: trap_G2API_RemoveGhoul2Model(&(clEnt->ghoul2), 1); +ADDRLP4 300 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_G2API_RemoveGhoul2Model +CALLI4 +pop +line 776 +;776: } +LABELV $359 +line 777 +;777: } +LABELV $355 +line 779 +;778: +;779: clEnt->torsoBolt = cent->currentState.modelGhoul2; //reinit model after copying limbless one to queue +ADDRLP4 300 +INDIRP4 +CNSTI4 1012 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +ASGNI4 +line 781 +;780: +;781: return; +ADDRGP4 $236 +JUMPV +LABELV $253 +line 784 +;782: } +;783: +;784: if (cent->ghoul2 && cent->bolt4 != -1 && cent->trailTime < cg.time) +ADDRLP4 312 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 312 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $361 +ADDRLP4 312 +INDIRP4 +CNSTI4 996 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $361 +ADDRLP4 312 +INDIRP4 +CNSTI4 612 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $361 +line 785 +;785: { +line 786 +;786: if ( cent->bolt4 != -1 && +ADDRLP4 316 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 316 +INDIRP4 +CNSTI4 996 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $364 +ADDRLP4 320 +CNSTF4 0 +ASGNF4 +ADDRLP4 316 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 320 +INDIRF4 +NEF4 $367 +ADDRLP4 316 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ADDRLP4 320 +INDIRF4 +NEF4 $367 +ADDRLP4 316 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRF4 +ADDRLP4 320 +INDIRF4 +EQF4 $364 +LABELV $367 +line 788 +;787: (cent->currentState.pos.trDelta[0] || cent->currentState.pos.trDelta[1] || cent->currentState.pos.trDelta[2]) ) +;788: { +line 791 +;789: vec3_t boltOrg, boltAng; +;790: +;791: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cent->bolt4, &matrix, cent->lerpAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 348 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 348 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 348 +INDIRP4 +CNSTI4 996 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 240 +ARGP4 +ADDRLP4 348 +INDIRP4 +CNSTI4 940 +ADDP4 +ARGP4 +ADDRLP4 348 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 348 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 793 +;792: +;793: trap_G2API_GiveMeVectorFromMatrix(&matrix, ORIGIN, boltOrg); +ADDRLP4 240 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 336 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 794 +;794: trap_G2API_GiveMeVectorFromMatrix(&matrix, NEGATIVE_Y, boltAng); +ADDRLP4 240 +ARGP4 +CNSTI4 6 +ARGI4 +ADDRLP4 324 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 796 +;795: +;796: if (!boltAng[0] && !boltAng[1] && !boltAng[2]) +ADDRLP4 352 +CNSTF4 0 +ASGNF4 +ADDRLP4 324 +INDIRF4 +ADDRLP4 352 +INDIRF4 +NEF4 $370 +ADDRLP4 324+4 +INDIRF4 +ADDRLP4 352 +INDIRF4 +NEF4 $370 +ADDRLP4 324+8 +INDIRF4 +ADDRLP4 352 +INDIRF4 +NEF4 $370 +line 797 +;797: { +line 798 +;798: boltAng[1] = 1; +ADDRLP4 324+4 +CNSTF4 1065353216 +ASGNF4 +line 799 +;799: } +LABELV $370 +line 800 +;800: trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/smoke_bolton"), boltOrg, boltAng); +ADDRGP4 $350 +ARGP4 +ADDRLP4 356 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 356 +INDIRI4 +ARGI4 +ADDRLP4 336 +ARGP4 +ADDRLP4 324 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 802 +;801: +;802: cent->trailTime = cg.time + 400; +ADDRFP4 0 +INDIRP4 +CNSTI4 612 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 400 +ADDI4 +ASGNI4 +line 803 +;803: } +LABELV $364 +line 804 +;804: } +LABELV $361 +line 806 +;805: +;806: ent.radius = cent->currentState.g2radius; +ADDRLP4 0+92 +ADDRFP4 0 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 807 +;807: ent.hModel = 0; +ADDRLP4 0+8 +CNSTI4 0 +ASGNI4 +line 808 +;808: } +LABELV $243 +line 810 +;809: +;810: if (cent->currentState.number >= MAX_CLIENTS && +ADDRLP4 300 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 300 +INDIRP4 +INDIRI4 +CNSTI4 32 +LTI4 $378 +ADDRLP4 300 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +CNSTI4 19 +NEI4 $378 +line 812 +;811: cent->currentState.activeForcePass == NUM_FORCE_POWERS+1) +;812: { +line 817 +;813: centity_t *empOwn; +;814: vec3_t empAngles, empOrg, anglesToOwner; +;815: float angle_ideal, angle_current, angle_dif; +;816: float degrees_positive, degrees_negative; +;817: int overturn = 0; +ADDRLP4 340 +CNSTI4 0 +ASGNI4 +line 819 +;818: +;819: empOwn = &cg_entities[cent->currentState.emplacedOwner]; +ADDRLP4 316 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 821 +;820: +;821: if (empOwn) +ADDRLP4 316 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $380 +line 822 +;822: { +line 824 +;823: +;824: if (cg.snap->ps.clientNum == empOwn->currentState.number && +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRLP4 316 +INDIRP4 +INDIRI4 +NEI4 $382 +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $382 +line 826 +;825: !cg.renderingThirdPerson) +;826: { +line 827 +;827: VectorCopy(cg.refdefViewAngles, empAngles); +ADDRLP4 304 +ADDRGP4 cg+3984 +INDIRB +ASGNB 12 +line 828 +;828: VectorCopy(cg.refdef.vieworg, empOrg); +ADDRLP4 344 +ADDRGP4 cg+3616+24 +INDIRB +ASGNB 12 +line 829 +;829: } +ADDRGP4 $383 +JUMPV +LABELV $382 +line 831 +;830: else +;831: { +line 832 +;832: VectorCopy(empOwn->lerpAngles, empAngles); +ADDRLP4 304 +ADDRLP4 316 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 833 +;833: VectorCopy(empOwn->lerpOrigin, empOrg); +ADDRLP4 344 +ADDRLP4 316 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 834 +;834: } +LABELV $383 +line 836 +;835: +;836: VectorSubtract(cent->lerpOrigin, empOrg, anglesToOwner); +ADDRLP4 368 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 320 +ADDRLP4 368 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +ADDRLP4 344 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 320+4 +ADDRLP4 368 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +ADDRLP4 344+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 320+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +ADDRLP4 344+8 +INDIRF4 +SUBF4 +ASGNF4 +line 838 +;837: +;838: vectoangles(anglesToOwner, anglesToOwner); +ADDRLP4 320 +ARGP4 +ADDRLP4 320 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 840 +;839: +;840: if (empAngles[PITCH] > 40) +ADDRLP4 304 +INDIRF4 +CNSTF4 1109393408 +LEF4 $393 +line 841 +;841: { +line 842 +;842: empAngles[PITCH] = 40; +ADDRLP4 304 +CNSTF4 1109393408 +ASGNF4 +line 843 +;843: } +LABELV $393 +line 845 +;844: +;845: angle_ideal = empAngles[YAW]; +ADDRLP4 332 +ADDRLP4 304+4 +INDIRF4 +ASGNF4 +line 846 +;846: angle_current = anglesToOwner[YAW]; +ADDRLP4 336 +ADDRLP4 320+4 +INDIRF4 +ASGNF4 +line 848 +;847: +;848: if (angle_current < 0) +ADDRLP4 336 +INDIRF4 +CNSTF4 0 +GEF4 $397 +line 849 +;849: { +line 850 +;850: angle_current += 360; +ADDRLP4 336 +ADDRLP4 336 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 851 +;851: } +LABELV $397 +line 852 +;852: if (angle_current > 360) +ADDRLP4 336 +INDIRF4 +CNSTF4 1135869952 +LEF4 $399 +line 853 +;853: { +line 854 +;854: angle_current -= 360; +ADDRLP4 336 +ADDRLP4 336 +INDIRF4 +CNSTF4 1135869952 +SUBF4 +ASGNF4 +line 855 +;855: } +LABELV $399 +line 856 +;856: if (angle_ideal < 0) +ADDRLP4 332 +INDIRF4 +CNSTF4 0 +GEF4 $401 +line 857 +;857: { +line 858 +;858: angle_ideal += 360; +ADDRLP4 332 +ADDRLP4 332 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 859 +;859: } +LABELV $401 +line 860 +;860: if (angle_ideal > 360) +ADDRLP4 332 +INDIRF4 +CNSTF4 1135869952 +LEF4 $403 +line 861 +;861: { +line 862 +;862: angle_ideal -= 360; +ADDRLP4 332 +ADDRLP4 332 +INDIRF4 +CNSTF4 1135869952 +SUBF4 +ASGNF4 +line 863 +;863: } +LABELV $403 +line 865 +;864: +;865: if (angle_ideal <= angle_current) +ADDRLP4 332 +INDIRF4 +ADDRLP4 336 +INDIRF4 +GTF4 $405 +line 866 +;866: { +line 867 +;867: degrees_negative = (angle_current - angle_ideal); +ADDRLP4 360 +ADDRLP4 336 +INDIRF4 +ADDRLP4 332 +INDIRF4 +SUBF4 +ASGNF4 +line 869 +;868: +;869: degrees_positive = (360 - angle_current) + angle_ideal; +ADDRLP4 364 +CNSTF4 1135869952 +ADDRLP4 336 +INDIRF4 +SUBF4 +ADDRLP4 332 +INDIRF4 +ADDF4 +ASGNF4 +line 870 +;870: } +ADDRGP4 $406 +JUMPV +LABELV $405 +line 872 +;871: else +;872: { +line 873 +;873: degrees_negative = angle_current + (360 - angle_ideal); +ADDRLP4 360 +ADDRLP4 336 +INDIRF4 +CNSTF4 1135869952 +ADDRLP4 332 +INDIRF4 +SUBF4 +ADDF4 +ASGNF4 +line 875 +;874: +;875: degrees_positive = (angle_ideal - angle_current); +ADDRLP4 364 +ADDRLP4 332 +INDIRF4 +ADDRLP4 336 +INDIRF4 +SUBF4 +ASGNF4 +line 876 +;876: } +LABELV $406 +line 878 +;877: +;878: if (degrees_negative < degrees_positive) +ADDRLP4 360 +INDIRF4 +ADDRLP4 364 +INDIRF4 +GEF4 $407 +line 879 +;879: { +line 880 +;880: angle_dif = degrees_negative; +ADDRLP4 356 +ADDRLP4 360 +INDIRF4 +ASGNF4 +line 881 +;881: } +ADDRGP4 $408 +JUMPV +LABELV $407 +line 883 +;882: else +;883: { +line 884 +;884: angle_dif = degrees_positive; +ADDRLP4 356 +ADDRLP4 364 +INDIRF4 +ASGNF4 +line 885 +;885: } +LABELV $408 +line 887 +;886: +;887: if (cg.snap->ps.clientNum == empOwn->currentState.number) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRLP4 316 +INDIRP4 +INDIRI4 +NEI4 $409 +line 888 +;888: { +line 889 +;889: cg.constrictValue = anglesToOwner[YAW]; +ADDRGP4 cg+3996 +ADDRLP4 320+4 +INDIRF4 +ASGNF4 +line 891 +;890: +;891: cg.doConstrict = cg.time + 50; +ADDRGP4 cg+4004 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 50 +ADDI4 +ASGNI4 +line 892 +;892: } +LABELV $409 +line 894 +;893: +;894: if (angle_dif > 90) +ADDRLP4 356 +INDIRF4 +CNSTF4 1119092736 +LEF4 $416 +line 895 +;895: { +line 896 +;896: overturn = 1; +ADDRLP4 340 +CNSTI4 1 +ASGNI4 +line 898 +;897: +;898: if (angle_dif == degrees_negative) +ADDRLP4 356 +INDIRF4 +ADDRLP4 360 +INDIRF4 +NEF4 $418 +line 899 +;899: { +line 900 +;900: empAngles[YAW] += (angle_dif - 90); +ADDRLP4 304+4 +ADDRLP4 304+4 +INDIRF4 +ADDRLP4 356 +INDIRF4 +CNSTF4 1119092736 +SUBF4 +ADDF4 +ASGNF4 +line 901 +;901: } +ADDRGP4 $417 +JUMPV +LABELV $418 +line 903 +;902: else +;903: { +line 904 +;904: empAngles[YAW] -= (angle_dif - 90); +ADDRLP4 304+4 +ADDRLP4 304+4 +INDIRF4 +ADDRLP4 356 +INDIRF4 +CNSTF4 1119092736 +SUBF4 +SUBF4 +ASGNF4 +line 905 +;905: } +line 906 +;906: } +ADDRGP4 $417 +JUMPV +LABELV $416 +line 907 +;907: else if (angle_dif > 80) +ADDRLP4 356 +INDIRF4 +CNSTF4 1117782016 +LEF4 $422 +line 908 +;908: { +line 909 +;909: overturn = 2; +ADDRLP4 340 +CNSTI4 2 +ASGNI4 +line 910 +;910: } +LABELV $422 +LABELV $417 +line 912 +;911: +;912: if (!overturn && cg.snap->ps.clientNum == empOwn->currentState.number) +ADDRLP4 340 +INDIRI4 +CNSTI4 0 +NEI4 $424 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRLP4 316 +INDIRP4 +INDIRI4 +NEI4 $424 +line 913 +;913: { +line 914 +;914: float plusExt = anglesToOwner[YAW]+70; +ADDRLP4 372 +ADDRLP4 320+4 +INDIRF4 +CNSTF4 1116471296 +ADDF4 +ASGNF4 +line 915 +;915: float minusExt = anglesToOwner[YAW]-70; +ADDRLP4 376 +ADDRLP4 320+4 +INDIRF4 +CNSTF4 1116471296 +SUBF4 +ASGNF4 +line 917 +;916: +;917: if (plusExt > 360) +ADDRLP4 372 +INDIRF4 +CNSTF4 1135869952 +LEF4 $429 +line 918 +;918: { +line 919 +;919: plusExt -= 360; +ADDRLP4 372 +ADDRLP4 372 +INDIRF4 +CNSTF4 1135869952 +SUBF4 +ASGNF4 +line 920 +;920: } +LABELV $429 +line 921 +;921: if (minusExt < 0) +ADDRLP4 376 +INDIRF4 +CNSTF4 0 +GEF4 $431 +line 922 +;922: { +line 923 +;923: minusExt += 360; +ADDRLP4 376 +ADDRLP4 376 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 924 +;924: } +LABELV $431 +line 926 +;925: +;926: trap_SetClientTurnExtent(minusExt, plusExt, cg.time+5000); +ADDRLP4 376 +INDIRF4 +ARGF4 +ADDRLP4 372 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 5000 +ADDI4 +ARGI4 +ADDRGP4 trap_SetClientTurnExtent +CALLV +pop +line 928 +;927: +;928: VectorCopy(empAngles, cent->turAngles); +ADDRFP4 0 +INDIRP4 +CNSTI4 1016 +ADDP4 +ADDRLP4 304 +INDIRB +ASGNB 12 +line 929 +;929: } +ADDRGP4 $425 +JUMPV +LABELV $424 +line 930 +;930: else if (cg.snap->ps.clientNum == empOwn->currentState.number) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRLP4 316 +INDIRP4 +INDIRI4 +NEI4 $434 +line 931 +;931: { +line 932 +;932: trap_SetClientForceAngle(cg.time+5000, cent->turAngles); +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 5000 +ADDI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1016 +ADDP4 +ARGP4 +ADDRGP4 trap_SetClientForceAngle +CALLV +pop +line 933 +;933: } +LABELV $434 +LABELV $425 +line 937 +;934: +;935: // empAngles[PITCH] -= 160; +;936: +;937: if (empAngles[PITCH] < 0) +ADDRLP4 304 +INDIRF4 +CNSTF4 0 +GEF4 $438 +line 938 +;938: { +line 939 +;939: empAngles[PITCH] += 360; +ADDRLP4 304 +ADDRLP4 304 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 940 +;940: } +LABELV $438 +line 941 +;941: if (empAngles[YAW] < 0) +ADDRLP4 304+4 +INDIRF4 +CNSTF4 0 +GEF4 $440 +line 942 +;942: { +line 943 +;943: empAngles[YAW] += 360; +ADDRLP4 304+4 +ADDRLP4 304+4 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 944 +;944: } +LABELV $440 +line 946 +;945: +;946: empAngles[YAW] -= cent->currentState.angles[YAW]; //slight hack so that upper rotated half looks right on angled turrets +ADDRLP4 304+4 +ADDRLP4 304+4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 968 +;947: +;948: //AngleVectors(empAngles, NULL, NULL, up); +;949: +;950: //empAngles[ROLL] = -empAngles[YAW]; +;951: //empAngles[YAW] = 0; +;952: +;953: //trap_G2API_SetBoneAngles(cent->ghoul2, 0, "swivel_bone", empAngles, BONE_ANGLES_REPLACE, POSITIVE_Z, NEGATIVE_X, NEGATIVE_Y, NULL, 0, cg.time); +;954: //trap_G2API_SetBoneAngles(cent->ghoul2, 0, "swivel_bone", empAngles, BONE_ANGLES_REPLACE, POSITIVE_Z, POSITIVE_X, POSITIVE_Y, NULL, 0, cg.time); +;955: +;956: //constrict the pitch angles of the turret but not the player view +;957: /* +;958: if (empAngles[PITCH] < 170) +;959: { +;960: empAngles[PITCH] = 170; +;961: } +;962: if (empAngles[PITCH] > 240) +;963: { +;964: empAngles[PITCH] = 240; +;965: } +;966: */ +;967: +;968: trap_G2API_SetBoneAngles( cent->ghoul2, 0, /*"swivel_bone"*/"Bone02", empAngles, BONE_ANGLES_REPLACE, NEGATIVE_Y, NEGATIVE_X, POSITIVE_Z, NULL, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 372 +CNSTI4 0 +ASGNI4 +ADDRLP4 372 +INDIRI4 +ARGI4 +ADDRGP4 $445 +ARGP4 +ADDRLP4 304 +ARGP4 +ADDRLP4 376 +CNSTI4 4 +ASGNI4 +ADDRLP4 376 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 376 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +CNSTP4 0 +ARGP4 +ADDRLP4 372 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 970 +;969: //trap_G2API_SetBoneAngles( cent->ghoul2, 0, "swivel_bone", empAngles, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 0, cg.time); +;970: } +LABELV $380 +line 971 +;971: } +LABELV $378 +line 973 +;972: +;973: s1 = ¢->currentState; +ADDRLP4 212 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 978 +;974:/* +;975:Ghoul2 Insert Start +;976:*/ +;977: // if set to invisible, skip +;978: if ((!s1->modelindex) && !(trap_G2_HaveWeGhoul2Models(cent->ghoul2))) +ADDRLP4 212 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $447 +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 304 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 304 +INDIRI4 +CNSTI4 0 +NEI4 $447 +line 979 +;979: { +line 980 +;980: return; +ADDRGP4 $236 +JUMPV +LABELV $447 +line 986 +;981: } +;982:/* +;983:Ghoul2 Insert End +;984:*/ +;985: +;986: memset (&ent, 0, sizeof(ent)); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 990 +;987: +;988: // set frame +;989: +;990: ent.frame = s1->frame; +ADDRLP4 0+104 +ADDRLP4 212 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRI4 +ASGNI4 +line 991 +;991: ent.oldframe = ent.frame; +ADDRLP4 0+124 +ADDRLP4 0+104 +INDIRI4 +ASGNI4 +line 992 +;992: ent.backlerp = 0; +ADDRLP4 0+128 +CNSTF4 0 +ASGNF4 +line 997 +;993: +;994:/* +;995:Ghoul2 Insert Start +;996:*/ +;997: CG_SetGhoul2Info(&ent, cent); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_SetGhoul2Info +CALLV +pop +line 1002 +;998: +;999:/* +;1000:Ghoul2 Insert End +;1001:*/ +;1002: VectorCopy( cent->lerpOrigin, ent.origin); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 1003 +;1003: VectorCopy( cent->lerpOrigin, ent.oldorigin); +ADDRLP4 0+64 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 1005 +;1004: +;1005: if (cent->currentState.modelGhoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $455 +line 1006 +;1006: { //If the game says this guy uses a ghoul2 model and the g2 instance handle is null, then initialize it +line 1007 +;1007: if (!cent->ghoul2 && !cent->currentState.bolt1) +ADDRLP4 308 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 308 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $457 +ADDRLP4 308 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $457 +line 1008 +;1008: { +line 1009 +;1009: trap_G2API_InitGhoul2Model(¢->ghoul2, CG_ConfigString( CS_MODELS+cent->currentState.modelindex ), 0, 0, 0, 0, 0); +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 32 +ADDI4 +ARGI4 +ADDRLP4 312 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRLP4 312 +INDIRP4 +ARGP4 +ADDRLP4 316 +CNSTI4 0 +ASGNI4 +ADDRLP4 316 +INDIRI4 +ARGI4 +ADDRLP4 316 +INDIRI4 +ARGI4 +ADDRLP4 316 +INDIRI4 +ARGI4 +ADDRLP4 316 +INDIRI4 +ARGI4 +ADDRLP4 316 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_InitGhoul2Model +CALLI4 +pop +line 1010 +;1010: } +ADDRGP4 $458 +JUMPV +LABELV $457 +line 1011 +;1011: else if (cent->currentState.bolt1) +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $459 +line 1012 +;1012: { +line 1013 +;1013: TurretClientRun(cent); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 TurretClientRun +CALLV +pop +line 1014 +;1014: } +LABELV $459 +LABELV $458 +line 1016 +;1015: +;1016: if (cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $461 +line 1017 +;1017: { //give us a proper radius +line 1018 +;1018: ent.radius = cent->currentState.g2radius; +ADDRLP4 0+92 +ADDRFP4 0 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1019 +;1019: } +LABELV $461 +line 1020 +;1020: } +LABELV $455 +line 1022 +;1021: +;1022: if (s1->eType == ET_BODY) +ADDRLP4 212 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 15 +NEI4 $464 +line 1023 +;1023: { //bodies should have a radius as well +line 1024 +;1024: ent.radius = cent->currentState.g2radius; +ADDRLP4 0+92 +ADDRFP4 0 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1026 +;1025: +;1026: if (cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $467 +line 1027 +;1027: { //all bodies should already have a ghoul2 instance. Use it to set the torso/head angles to 0. +line 1028 +;1028: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $469 +line 1029 +;1029: { +line 1030 +;1030: trap_G2API_SetBoneAngles(cent->ghoul2, 0, "pelvis", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 100, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $270 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +CNSTI4 100 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 1031 +;1031: ent.radius = 250; +ADDRLP4 0+92 +CNSTF4 1132068864 +ASGNF4 +line 1032 +;1032: } +ADDRGP4 $470 +JUMPV +LABELV $469 +line 1034 +;1033: else +;1034: { +line 1035 +;1035: cent->lerpAngles[PITCH] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1036 +;1036: cent->lerpAngles[ROLL] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 948 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1037 +;1037: trap_G2API_SetBoneAngles(cent->ghoul2, 0, "pelvis", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 308 +CNSTI4 0 +ASGNI4 +ADDRLP4 308 +INDIRI4 +ARGI4 +ADDRGP4 $270 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 308 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 1038 +;1038: trap_G2API_SetBoneAngles(cent->ghoul2, 0, "thoracic", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 312 +CNSTI4 0 +ASGNI4 +ADDRLP4 312 +INDIRI4 +ARGI4 +ADDRGP4 $271 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 312 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 1039 +;1039: trap_G2API_SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 100, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $338 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +CNSTI4 100 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 1040 +;1040: trap_G2API_SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 100, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $480 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +CNSTI4 100 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 1041 +;1041: trap_G2API_SetBoneAngles(cent->ghoul2, 0, "cranium", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, cgs.gameModels, 100, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $262 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 316 +CNSTI4 2 +ASGNI4 +ADDRLP4 316 +INDIRI4 +ARGI4 +ADDRLP4 316 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +CNSTI4 100 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 1042 +;1042: } +LABELV $470 +line 1043 +;1043: } +LABELV $467 +line 1044 +;1044: } +LABELV $464 +line 1046 +;1045: +;1046: if (s1->eType == ET_HOLOCRON && s1->modelindex < -100) +ADDRLP4 212 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $485 +ADDRLP4 212 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 -100 +GEI4 $485 +line 1047 +;1047: { //special render, it's a holocron +line 1049 +;1048: //Using actual models now: +;1049: ent.hModel = trap_R_RegisterModel(forceHolocronModels[s1->modelindex+128]); +ADDRLP4 212 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forceHolocronModels+512 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 312 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 0+8 +ADDRLP4 312 +INDIRI4 +ASGNI4 +line 1052 +;1050: +;1051: //Rotate them +;1052: VectorCopy( cg.autoAngles, cent->lerpAngles ); +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRGP4 cg+3520 +INDIRB +ASGNB 12 +line 1053 +;1053: AxisCopy( cg.autoAxis, ent.axis ); +ADDRGP4 cg+3532 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AxisCopy +CALLV +pop +line 1054 +;1054: } +ADDRGP4 $486 +JUMPV +LABELV $485 +line 1055 +;1055: else if (!doNotSetModel) +ADDRLP4 232 +INDIRI4 +CNSTI4 0 +NEI4 $492 +line 1056 +;1056: { +line 1057 +;1057: ent.hModel = cgs.gameModels[s1->modelindex]; +ADDRLP4 0+8 +ADDRLP4 212 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+36364 +ADDP4 +INDIRI4 +ASGNI4 +line 1058 +;1058: } +LABELV $492 +LABELV $486 +line 1061 +;1059: +;1060: // player model +;1061: if (s1->number == cg.snap->ps.clientNum) { +ADDRLP4 212 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $496 +line 1062 +;1062: ent.renderfx |= RF_THIRD_PERSON; // only draw from mirrors +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1063 +;1063: } +LABELV $496 +line 1074 +;1064:/* +;1065:Ghoul2 Insert Start +;1066:*/ +;1067: // are we bolted to a Ghoul2 model? +;1068:/* +;1069://g2r if (s1->boltInfo) +;1070: { +;1071: G2_BoltToGhoul2Model(s1, &ent); +;1072: } +;1073: else */ +;1074: { +line 1076 +;1075: // convert angles to axis +;1076: AnglesToAxis( cent->lerpAngles, ent.axis ); +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 1077 +;1077: } +line 1082 +;1078: +;1079:/* +;1080:Ghoul2 Insert End +;1081:*/ +;1082: if ( cent->currentState.time > cg.time && cent->currentState.weapon == WP_EMPLACED_GUN ) +ADDRLP4 312 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 312 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $501 +ADDRLP4 312 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $501 +line 1083 +;1083: { +line 1085 +;1084: // make the gun pulse red to warn about it exploding +;1085: val = (1.0f - (float)(cent->currentState.time - cg.time) / 3200.0f ) * 0.3f; +ADDRLP4 236 +CNSTF4 1050253722 +CNSTF4 1065353216 +ADDRFP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIF4 4 +CNSTF4 1162346496 +DIVF4 +SUBF4 +MULF4 +ASGNF4 +line 1087 +;1086: +;1087: ent.customShader = trap_R_RegisterShader( "gfx/effects/turretflashdie" ); +ADDRGP4 $506 +ARGP4 +ADDRLP4 316 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0+76 +ADDRLP4 316 +INDIRI4 +ASGNI4 +line 1088 +;1088: ent.shaderRGBA[0] = (sin( cg.time * 0.04f ) * val * 0.4f + val) * 255; +CNSTF4 1025758986 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 324 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 328 +ADDRLP4 236 +INDIRF4 +ASGNF4 +ADDRLP4 332 +CNSTF4 1132396544 +CNSTF4 1053609165 +ADDRLP4 324 +INDIRF4 +ADDRLP4 328 +INDIRF4 +MULF4 +MULF4 +ADDRLP4 328 +INDIRF4 +ADDF4 +MULF4 +ASGNF4 +ADDRLP4 336 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 332 +INDIRF4 +ADDRLP4 336 +INDIRF4 +LTF4 $510 +ADDRLP4 320 +ADDRLP4 332 +INDIRF4 +ADDRLP4 336 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $511 +JUMPV +LABELV $510 +ADDRLP4 320 +ADDRLP4 332 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $511 +ADDRLP4 0+80 +ADDRLP4 320 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1089 +;1089: ent.shaderRGBA[1] = ent.shaderRGBA[2] = 0; +ADDRLP4 340 +CNSTU1 0 +ASGNU1 +ADDRLP4 0+80+2 +ADDRLP4 340 +INDIRU1 +ASGNU1 +ADDRLP4 0+80+1 +ADDRLP4 340 +INDIRU1 +ASGNU1 +line 1091 +;1090: +;1091: ent.shaderRGBA[3] = 100; +ADDRLP4 0+80+3 +CNSTU1 100 +ASGNU1 +line 1092 +;1092: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1093 +;1093: ent.customShader = 0; +ADDRLP4 0+76 +CNSTI4 0 +ASGNI4 +line 1094 +;1094: } +ADDRGP4 $502 +JUMPV +LABELV $501 +line 1095 +;1095: else if ( cent->currentState.time == -1 && cent->currentState.weapon == WP_EMPLACED_GUN) +ADDRLP4 316 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 316 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 -1 +NEI4 $519 +ADDRLP4 316 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $519 +line 1096 +;1096: { +line 1097 +;1097: ent.customShader = trap_R_RegisterShader( "models/map_objects/imp_mine/turret_chair_dmg.tga" ); +ADDRGP4 $522 +ARGP4 +ADDRLP4 320 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0+76 +ADDRLP4 320 +INDIRI4 +ASGNI4 +line 1099 +;1098: //trap_R_AddRefEntityToScene( &ent ); +;1099: } +LABELV $519 +LABELV $502 +line 1101 +;1100: +;1101: if ((cent->currentState.eFlags & EF_DISINTEGRATION) && cent->currentState.eType == ET_BODY) +ADDRLP4 320 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 320 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 33554432 +BANDI4 +CNSTI4 0 +EQI4 $523 +ADDRLP4 320 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 15 +NEI4 $523 +line 1102 +;1102: { +line 1106 +;1103: vec3_t tempAng, hitLoc; +;1104: float tempLength; +;1105: +;1106: if (!cent->dustTrailTime) +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $525 +line 1107 +;1107: { +line 1108 +;1108: cent->dustTrailTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1109 +;1109: } +LABELV $525 +line 1111 +;1110: +;1111: VectorCopy(cent->currentState.origin2, hitLoc); +ADDRLP4 324 +ADDRFP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRB +ASGNB 12 +line 1113 +;1112: +;1113: VectorSubtract( hitLoc, ent.origin, ent.oldorigin ); +ADDRLP4 0+64 +ADDRLP4 324 +INDIRF4 +ADDRLP4 0+52 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+64+4 +ADDRLP4 324+4 +INDIRF4 +ADDRLP4 0+52+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+64+8 +ADDRLP4 324+8 +INDIRF4 +ADDRLP4 0+52+8 +INDIRF4 +SUBF4 +ASGNF4 +line 1115 +;1114: +;1115: tempLength = VectorNormalize( ent.oldorigin ); +ADDRLP4 0+64 +ARGP4 +ADDRLP4 352 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 336 +ADDRLP4 352 +INDIRF4 +ASGNF4 +line 1116 +;1116: vectoangles( ent.oldorigin, tempAng ); +ADDRLP4 0+64 +ARGP4 +ADDRLP4 340 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 1117 +;1117: tempAng[YAW] -= cent->lerpAngles[YAW]; +ADDRLP4 340+4 +ADDRLP4 340+4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 944 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 1118 +;1118: AngleVectors( tempAng, ent.oldorigin, NULL, NULL ); +ADDRLP4 340 +ARGP4 +ADDRLP4 0+64 +ARGP4 +ADDRLP4 356 +CNSTP4 0 +ASGNP4 +ADDRLP4 356 +INDIRP4 +ARGP4 +ADDRLP4 356 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 1119 +;1119: VectorScale( ent.oldorigin, tempLength, ent.oldorigin ); +ADDRLP4 0+64 +ADDRLP4 0+64 +INDIRF4 +ADDRLP4 336 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+64+4 +ADDRLP4 0+64+4 +INDIRF4 +ADDRLP4 336 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+64+8 +ADDRLP4 0+64+8 +INDIRF4 +ADDRLP4 336 +INDIRF4 +MULF4 +ASGNF4 +line 1121 +;1120: +;1121: ent.endTime = cent->dustTrailTime; +ADDRLP4 0+176 +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1130 +;1122: +;1123: /* +;1124: ent.renderfx |= RF_DISINTEGRATE2; +;1125: +;1126: ent.customShader = cgs.media.disruptorShader; +;1127: trap_R_AddRefEntityToScene( &ent ); +;1128: */ +;1129: +;1130: ent.renderfx &= ~(RF_DISINTEGRATE2); +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -262145 +BANDI4 +ASGNI4 +line 1131 +;1131: ent.renderfx |= (RF_DISINTEGRATE1); +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 131072 +BORI4 +ASGNI4 +line 1132 +;1132: ent.customShader = 0; +ADDRLP4 0+76 +CNSTI4 0 +ASGNI4 +line 1133 +;1133: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1135 +;1134: +;1135: return; +ADDRGP4 $236 +JUMPV +LABELV $523 +line 1137 +;1136: } +;1137: else if (cent->currentState.eType == ET_BODY) +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 15 +NEI4 $558 +line 1138 +;1138: { +line 1139 +;1139: cent->dustTrailTime = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1140 +;1140: } +LABELV $558 +line 1142 +;1141: +;1142: if (cent->currentState.modelGhoul2 && +ADDRLP4 324 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +ADDRLP4 324 +INDIRI4 +EQI4 $560 +ADDRLP4 0+208 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $560 +ADDRLP4 0+8 +INDIRI4 +ADDRLP4 324 +INDIRI4 +NEI4 $560 +line 1145 +;1143: !ent.ghoul2 && +;1144: !ent.hModel) +;1145: { +line 1146 +;1146: return; +ADDRGP4 $236 +JUMPV +LABELV $560 +line 1150 +;1147: } +;1148: +;1149: // add to refresh list +;1150: trap_R_AddRefEntityToScene (&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1152 +;1151: +;1152: if (cent->bolt3 == 999) +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +INDIRI4 +CNSTI4 999 +NEI4 $564 +line 1153 +;1153: { //this is an in-flight saber being rendered manually +line 1161 +;1154: vec3_t org; +;1155: float wv; +;1156: int i; +;1157: addspriteArgStruct_t fxSArgs; +;1158: //refEntity_t sRef; +;1159: //memcpy( &sRef, &ent, sizeof( sRef ) ); +;1160: +;1161: ent.customShader = cgs.media.solidWhite; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+564 +INDIRI4 +ASGNI4 +line 1162 +;1162: ent.renderfx = RF_RGB_TINT; +ADDRLP4 0+4 +CNSTI4 2048 +ASGNI4 +line 1163 +;1163: wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; +CNSTF4 994352038 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 420 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 416 +CNSTF4 1034147594 +ADDRLP4 420 +INDIRF4 +MULF4 +CNSTF4 1036831949 +ADDF4 +ASGNF4 +line 1164 +;1164: ent.shaderRGBA[0] = wv * 255; +ADDRLP4 428 +CNSTF4 1132396544 +ADDRLP4 416 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 432 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 428 +INDIRF4 +ADDRLP4 432 +INDIRF4 +LTF4 $573 +ADDRLP4 424 +ADDRLP4 428 +INDIRF4 +ADDRLP4 432 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $574 +JUMPV +LABELV $573 +ADDRLP4 424 +ADDRLP4 428 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $574 +ADDRLP4 0+80 +ADDRLP4 424 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1165 +;1165: ent.shaderRGBA[1] = wv * 255; +ADDRLP4 440 +CNSTF4 1132396544 +ADDRLP4 416 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 444 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 440 +INDIRF4 +ADDRLP4 444 +INDIRF4 +LTF4 $578 +ADDRLP4 436 +ADDRLP4 440 +INDIRF4 +ADDRLP4 444 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $579 +JUMPV +LABELV $578 +ADDRLP4 436 +ADDRLP4 440 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $579 +ADDRLP4 0+80+1 +ADDRLP4 436 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1166 +;1166: ent.shaderRGBA[2] = wv * 0; +ADDRLP4 452 +CNSTF4 0 +ADDRLP4 416 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 456 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 452 +INDIRF4 +ADDRLP4 456 +INDIRF4 +LTF4 $583 +ADDRLP4 448 +ADDRLP4 452 +INDIRF4 +ADDRLP4 456 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $584 +JUMPV +LABELV $583 +ADDRLP4 448 +ADDRLP4 452 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $584 +ADDRLP4 0+80+2 +ADDRLP4 448 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1167 +;1167: trap_R_AddRefEntityToScene (&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1169 +;1168: +;1169: for ( i = -4; i < 10; i += 1 ) +ADDRLP4 400 +CNSTI4 -4 +ASGNI4 +LABELV $585 +line 1170 +;1170: { +line 1171 +;1171: VectorMA( ent.origin, -i, ent.axis[2], org ); +ADDRLP4 460 +ADDRLP4 400 +INDIRI4 +NEGI4 +CVIF4 4 +ASGNF4 +ADDRLP4 404 +ADDRLP4 0+52 +INDIRF4 +ADDRLP4 0+12+24 +INDIRF4 +ADDRLP4 460 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 404+4 +ADDRLP4 0+52+4 +INDIRF4 +ADDRLP4 0+12+24+4 +INDIRF4 +ADDRLP4 460 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 404+8 +ADDRLP4 0+52+8 +INDIRF4 +ADDRLP4 0+12+24+8 +INDIRF4 +ADDRLP4 400 +INDIRI4 +NEGI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 1173 +;1172: +;1173: VectorCopy(org, fxSArgs.origin); +ADDRLP4 328 +ADDRLP4 404 +INDIRB +ASGNB 12 +line 1174 +;1174: VectorClear(fxSArgs.vel); +ADDRLP4 464 +CNSTF4 0 +ASGNF4 +ADDRLP4 328+12+8 +ADDRLP4 464 +INDIRF4 +ASGNF4 +ADDRLP4 328+12+4 +ADDRLP4 464 +INDIRF4 +ASGNF4 +ADDRLP4 328+12 +ADDRLP4 464 +INDIRF4 +ASGNF4 +line 1175 +;1175: VectorClear(fxSArgs.accel); +ADDRLP4 468 +CNSTF4 0 +ASGNF4 +ADDRLP4 328+24+8 +ADDRLP4 468 +INDIRF4 +ASGNF4 +ADDRLP4 328+24+4 +ADDRLP4 468 +INDIRF4 +ASGNF4 +ADDRLP4 328+24 +ADDRLP4 468 +INDIRF4 +ASGNF4 +line 1176 +;1176: fxSArgs.scale = 5.5f; +ADDRLP4 328+36 +CNSTF4 1085276160 +ASGNF4 +line 1177 +;1177: fxSArgs.dscale = 5.5f; +ADDRLP4 328+40 +CNSTF4 1085276160 +ASGNF4 +line 1178 +;1178: fxSArgs.sAlpha = wv; +ADDRLP4 328+44 +ADDRLP4 416 +INDIRF4 +ASGNF4 +line 1179 +;1179: fxSArgs.eAlpha = wv; +ADDRLP4 328+48 +ADDRLP4 416 +INDIRF4 +ASGNF4 +line 1180 +;1180: fxSArgs.rotation = 0.0f; +ADDRLP4 328+52 +CNSTF4 0 +ASGNF4 +line 1181 +;1181: fxSArgs.bounce = 0.0f; +ADDRLP4 328+56 +CNSTF4 0 +ASGNF4 +line 1182 +;1182: fxSArgs.life = 1.0f; +ADDRLP4 328+60 +CNSTI4 1 +ASGNI4 +line 1183 +;1183: fxSArgs.shader = cgs.media.yellowDroppedSaberShader; +ADDRLP4 328+64 +ADDRGP4 cgs+70296+168 +INDIRI4 +ASGNI4 +line 1184 +;1184: fxSArgs.flags = 0x08000000; +ADDRLP4 328+68 +CNSTI4 134217728 +ASGNI4 +line 1187 +;1185: +;1186: //trap_FX_AddSprite( org, NULL, NULL, 5.5f, 5.5f, wv, wv, 0.0f, 0.0f, 1.0f, cgs.media.yellowSaberGlowShader, 0x08000000 ); +;1187: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 328 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 1188 +;1188: } +LABELV $586 +line 1169 +ADDRLP4 400 +ADDRLP4 400 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 400 +INDIRI4 +CNSTI4 10 +LTI4 $585 +line 1189 +;1189: } +ADDRGP4 $565 +JUMPV +LABELV $564 +line 1190 +;1190: else if (cent->currentState.trickedentindex3) +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $625 +line 1191 +;1191: { //holocron special effects +line 1198 +;1192: vec3_t org; +;1193: float wv; +;1194: addspriteArgStruct_t fxSArgs; +;1195: //refEntity_t sRef; +;1196: //memcpy( &sRef, &ent, sizeof( sRef ) ); +;1197: +;1198: ent.customShader = cgs.media.solidWhite; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+564 +INDIRI4 +ASGNI4 +line 1199 +;1199: ent.renderfx = RF_RGB_TINT; +ADDRLP4 0+4 +CNSTI4 2048 +ASGNI4 +line 1200 +;1200: wv = sin( cg.time * 0.005f ) * 0.08f + 0.1f; //* 0.08f + 0.1f; +CNSTF4 1000593162 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 416 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 400 +CNSTF4 1034147594 +ADDRLP4 416 +INDIRF4 +MULF4 +CNSTF4 1036831949 +ADDF4 +ASGNF4 +line 1202 +;1201: +;1202: if (cent->currentState.trickedentindex3 == 1) +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $632 +line 1203 +;1203: { //dark +line 1204 +;1204: ent.shaderRGBA[0] = wv*255; +ADDRLP4 424 +CNSTF4 1132396544 +ADDRLP4 400 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 428 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 424 +INDIRF4 +ADDRLP4 428 +INDIRF4 +LTF4 $636 +ADDRLP4 420 +ADDRLP4 424 +INDIRF4 +ADDRLP4 428 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $637 +JUMPV +LABELV $636 +ADDRLP4 420 +ADDRLP4 424 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $637 +ADDRLP4 0+80 +ADDRLP4 420 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1205 +;1205: ent.shaderRGBA[1] = 0; +ADDRLP4 0+80+1 +CNSTU1 0 +ASGNU1 +line 1206 +;1206: ent.shaderRGBA[2] = 0; +ADDRLP4 0+80+2 +CNSTU1 0 +ASGNU1 +line 1207 +;1207: } +ADDRGP4 $633 +JUMPV +LABELV $632 +line 1208 +;1208: else if (cent->currentState.trickedentindex3 == 2) +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $642 +line 1209 +;1209: { //light +line 1210 +;1210: ent.shaderRGBA[0] = wv*255; +ADDRLP4 424 +CNSTF4 1132396544 +ADDRLP4 400 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 428 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 424 +INDIRF4 +ADDRLP4 428 +INDIRF4 +LTF4 $646 +ADDRLP4 420 +ADDRLP4 424 +INDIRF4 +ADDRLP4 428 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $647 +JUMPV +LABELV $646 +ADDRLP4 420 +ADDRLP4 424 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $647 +ADDRLP4 0+80 +ADDRLP4 420 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1211 +;1211: ent.shaderRGBA[1] = wv*255; +ADDRLP4 436 +CNSTF4 1132396544 +ADDRLP4 400 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 440 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 436 +INDIRF4 +ADDRLP4 440 +INDIRF4 +LTF4 $651 +ADDRLP4 432 +ADDRLP4 436 +INDIRF4 +ADDRLP4 440 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $652 +JUMPV +LABELV $651 +ADDRLP4 432 +ADDRLP4 436 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $652 +ADDRLP4 0+80+1 +ADDRLP4 432 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1212 +;1212: ent.shaderRGBA[2] = wv*255; +ADDRLP4 448 +CNSTF4 1132396544 +ADDRLP4 400 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 452 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 448 +INDIRF4 +ADDRLP4 452 +INDIRF4 +LTF4 $656 +ADDRLP4 444 +ADDRLP4 448 +INDIRF4 +ADDRLP4 452 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $657 +JUMPV +LABELV $656 +ADDRLP4 444 +ADDRLP4 448 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $657 +ADDRLP4 0+80+2 +ADDRLP4 444 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1213 +;1213: } +ADDRGP4 $643 +JUMPV +LABELV $642 +line 1215 +;1214: else +;1215: { //neutral +line 1216 +;1216: if ((s1->modelindex+128) == FP_SABERATTACK || +ADDRLP4 420 +ADDRLP4 212 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 128 +ADDI4 +ASGNI4 +ADDRLP4 420 +INDIRI4 +CNSTI4 15 +EQI4 $661 +ADDRLP4 420 +INDIRI4 +CNSTI4 16 +EQI4 $661 +ADDRLP4 420 +INDIRI4 +CNSTI4 17 +NEI4 $658 +LABELV $661 +line 1219 +;1217: (s1->modelindex+128) == FP_SABERDEFEND || +;1218: (s1->modelindex+128) == FP_SABERTHROW) +;1219: { //saber power +line 1220 +;1220: ent.shaderRGBA[0] = 0; +ADDRLP4 0+80 +CNSTU1 0 +ASGNU1 +line 1221 +;1221: ent.shaderRGBA[1] = wv*255; +ADDRLP4 428 +CNSTF4 1132396544 +ADDRLP4 400 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 432 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 428 +INDIRF4 +ADDRLP4 432 +INDIRF4 +LTF4 $666 +ADDRLP4 424 +ADDRLP4 428 +INDIRF4 +ADDRLP4 432 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $667 +JUMPV +LABELV $666 +ADDRLP4 424 +ADDRLP4 428 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $667 +ADDRLP4 0+80+1 +ADDRLP4 424 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1222 +;1222: ent.shaderRGBA[2] = 0; +ADDRLP4 0+80+2 +CNSTU1 0 +ASGNU1 +line 1223 +;1223: } +ADDRGP4 $659 +JUMPV +LABELV $658 +line 1225 +;1224: else +;1225: { +line 1226 +;1226: ent.shaderRGBA[0] = 0; +ADDRLP4 0+80 +CNSTU1 0 +ASGNU1 +line 1227 +;1227: ent.shaderRGBA[1] = wv*255; +ADDRLP4 428 +CNSTF4 1132396544 +ADDRLP4 400 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 432 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 428 +INDIRF4 +ADDRLP4 432 +INDIRF4 +LTF4 $674 +ADDRLP4 424 +ADDRLP4 428 +INDIRF4 +ADDRLP4 432 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $675 +JUMPV +LABELV $674 +ADDRLP4 424 +ADDRLP4 428 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $675 +ADDRLP4 0+80+1 +ADDRLP4 424 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1228 +;1228: ent.shaderRGBA[2] = wv*255; +ADDRLP4 440 +CNSTF4 1132396544 +ADDRLP4 400 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 444 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 440 +INDIRF4 +ADDRLP4 444 +INDIRF4 +LTF4 $679 +ADDRLP4 436 +ADDRLP4 440 +INDIRF4 +ADDRLP4 444 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $680 +JUMPV +LABELV $679 +ADDRLP4 436 +ADDRLP4 440 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $680 +ADDRLP4 0+80+2 +ADDRLP4 436 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1229 +;1229: } +LABELV $659 +line 1230 +;1230: } +LABELV $643 +LABELV $633 +line 1232 +;1231: +;1232: ent.modelScale[0] = 1.1; +ADDRLP4 0+196 +CNSTF4 1066192077 +ASGNF4 +line 1233 +;1233: ent.modelScale[1] = 1.1; +ADDRLP4 0+196+4 +CNSTF4 1066192077 +ASGNF4 +line 1234 +;1234: ent.modelScale[2] = 1.1; +ADDRLP4 0+196+8 +CNSTF4 1066192077 +ASGNF4 +line 1236 +;1235: +;1236: ent.origin[2] -= 2; +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 1237 +;1237: ScaleModelAxis(&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 ScaleModelAxis +CALLV +pop +line 1239 +;1238: +;1239: trap_R_AddRefEntityToScene (&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1241 +;1240: +;1241: VectorMA( ent.origin, 1, ent.axis[2], org ); +ADDRLP4 420 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 404 +ADDRLP4 0+52 +INDIRF4 +ADDRLP4 420 +INDIRF4 +ADDRLP4 0+12+24 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 404+4 +ADDRLP4 0+52+4 +INDIRF4 +ADDRLP4 420 +INDIRF4 +ADDRLP4 0+12+24+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 404+8 +ADDRLP4 0+52+8 +INDIRF4 +CNSTF4 1065353216 +ADDRLP4 0+12+24+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1243 +;1242: +;1243: org[2] += 18; +ADDRLP4 404+8 +ADDRLP4 404+8 +INDIRF4 +CNSTF4 1099956224 +ADDF4 +ASGNF4 +line 1245 +;1244: +;1245: wv = sin( cg.time * 0.002f ) * 0.08f + 0.1f; //* 0.08f + 0.1f; +CNSTF4 990057071 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 424 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 400 +CNSTF4 1034147594 +ADDRLP4 424 +INDIRF4 +MULF4 +CNSTF4 1036831949 +ADDF4 +ASGNF4 +line 1247 +;1246: +;1247: VectorCopy(org, fxSArgs.origin); +ADDRLP4 328 +ADDRLP4 404 +INDIRB +ASGNB 12 +line 1248 +;1248: VectorClear(fxSArgs.vel); +ADDRLP4 428 +CNSTF4 0 +ASGNF4 +ADDRLP4 328+12+8 +ADDRLP4 428 +INDIRF4 +ASGNF4 +ADDRLP4 328+12+4 +ADDRLP4 428 +INDIRF4 +ASGNF4 +ADDRLP4 328+12 +ADDRLP4 428 +INDIRF4 +ASGNF4 +line 1249 +;1249: VectorClear(fxSArgs.accel); +ADDRLP4 432 +CNSTF4 0 +ASGNF4 +ADDRLP4 328+24+8 +ADDRLP4 432 +INDIRF4 +ASGNF4 +ADDRLP4 328+24+4 +ADDRLP4 432 +INDIRF4 +ASGNF4 +ADDRLP4 328+24 +ADDRLP4 432 +INDIRF4 +ASGNF4 +line 1250 +;1250: fxSArgs.scale = wv*120;//16.0f; +ADDRLP4 328+36 +CNSTF4 1123024896 +ADDRLP4 400 +INDIRF4 +MULF4 +ASGNF4 +line 1251 +;1251: fxSArgs.dscale = wv*120;//16.0f; +ADDRLP4 328+40 +CNSTF4 1123024896 +ADDRLP4 400 +INDIRF4 +MULF4 +ASGNF4 +line 1252 +;1252: fxSArgs.sAlpha = wv*12; +ADDRLP4 328+44 +CNSTF4 1094713344 +ADDRLP4 400 +INDIRF4 +MULF4 +ASGNF4 +line 1253 +;1253: fxSArgs.eAlpha = wv*12; +ADDRLP4 328+48 +CNSTF4 1094713344 +ADDRLP4 400 +INDIRF4 +MULF4 +ASGNF4 +line 1254 +;1254: fxSArgs.rotation = 0.0f; +ADDRLP4 328+52 +CNSTF4 0 +ASGNF4 +line 1255 +;1255: fxSArgs.bounce = 0.0f; +ADDRLP4 328+56 +CNSTF4 0 +ASGNF4 +line 1256 +;1256: fxSArgs.life = 1.0f; +ADDRLP4 328+60 +CNSTI4 1 +ASGNI4 +line 1258 +;1257: +;1258: fxSArgs.flags = 0x08000000|0x00000001; +ADDRLP4 328+68 +CNSTI4 134217729 +ASGNI4 +line 1260 +;1259: +;1260: if (cent->currentState.trickedentindex3 == 1) +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $723 +line 1261 +;1261: { //dark +line 1262 +;1262: fxSArgs.sAlpha *= 3; +ADDRLP4 328+44 +CNSTF4 1077936128 +ADDRLP4 328+44 +INDIRF4 +MULF4 +ASGNF4 +line 1263 +;1263: fxSArgs.eAlpha *= 3; +ADDRLP4 328+48 +CNSTF4 1077936128 +ADDRLP4 328+48 +INDIRF4 +MULF4 +ASGNF4 +line 1264 +;1264: fxSArgs.shader = cgs.media.redSaberGlowShader; +ADDRLP4 328+64 +ADDRGP4 cgs+70296+116 +INDIRI4 +ASGNI4 +line 1265 +;1265: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 328 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 1266 +;1266: } +ADDRGP4 $724 +JUMPV +LABELV $723 +line 1267 +;1267: else if (cent->currentState.trickedentindex3 == 2) +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $730 +line 1268 +;1268: { //light +line 1269 +;1269: fxSArgs.sAlpha *= 1.5; +ADDRLP4 328+44 +CNSTF4 1069547520 +ADDRLP4 328+44 +INDIRF4 +MULF4 +ASGNF4 +line 1270 +;1270: fxSArgs.eAlpha *= 1.5; +ADDRLP4 328+48 +CNSTF4 1069547520 +ADDRLP4 328+48 +INDIRF4 +MULF4 +ASGNF4 +line 1271 +;1271: fxSArgs.shader = cgs.media.redSaberGlowShader; +ADDRLP4 328+64 +ADDRGP4 cgs+70296+116 +INDIRI4 +ASGNI4 +line 1272 +;1272: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 328 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 1273 +;1273: fxSArgs.shader = cgs.media.greenSaberGlowShader; +ADDRLP4 328+64 +ADDRGP4 cgs+70296+140 +INDIRI4 +ASGNI4 +line 1274 +;1274: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 328 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 1275 +;1275: fxSArgs.shader = cgs.media.blueSaberGlowShader; +ADDRLP4 328+64 +ADDRGP4 cgs+70296+148 +INDIRI4 +ASGNI4 +line 1276 +;1276: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 328 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 1277 +;1277: } +ADDRGP4 $731 +JUMPV +LABELV $730 +line 1279 +;1278: else +;1279: { //neutral +line 1280 +;1280: if ((s1->modelindex+128) == FP_SABERATTACK || +ADDRLP4 436 +ADDRLP4 212 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 128 +ADDI4 +ASGNI4 +ADDRLP4 436 +INDIRI4 +CNSTI4 15 +EQI4 $746 +ADDRLP4 436 +INDIRI4 +CNSTI4 16 +EQI4 $746 +ADDRLP4 436 +INDIRI4 +CNSTI4 17 +NEI4 $743 +LABELV $746 +line 1283 +;1281: (s1->modelindex+128) == FP_SABERDEFEND || +;1282: (s1->modelindex+128) == FP_SABERTHROW) +;1283: { //saber power +line 1284 +;1284: fxSArgs.sAlpha *= 1.5; +ADDRLP4 328+44 +CNSTF4 1069547520 +ADDRLP4 328+44 +INDIRF4 +MULF4 +ASGNF4 +line 1285 +;1285: fxSArgs.eAlpha *= 1.5; +ADDRLP4 328+48 +CNSTF4 1069547520 +ADDRLP4 328+48 +INDIRF4 +MULF4 +ASGNF4 +line 1286 +;1286: fxSArgs.shader = cgs.media.greenSaberGlowShader; +ADDRLP4 328+64 +ADDRGP4 cgs+70296+140 +INDIRI4 +ASGNI4 +line 1287 +;1287: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 328 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 1288 +;1288: } +ADDRGP4 $744 +JUMPV +LABELV $743 +line 1290 +;1289: else +;1290: { +line 1291 +;1291: fxSArgs.sAlpha *= 0.5; +ADDRLP4 328+44 +CNSTF4 1056964608 +ADDRLP4 328+44 +INDIRF4 +MULF4 +ASGNF4 +line 1292 +;1292: fxSArgs.eAlpha *= 0.5; +ADDRLP4 328+48 +CNSTF4 1056964608 +ADDRLP4 328+48 +INDIRF4 +MULF4 +ASGNF4 +line 1293 +;1293: fxSArgs.shader = cgs.media.greenSaberGlowShader; +ADDRLP4 328+64 +ADDRGP4 cgs+70296+140 +INDIRI4 +ASGNI4 +line 1294 +;1294: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 328 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 1295 +;1295: fxSArgs.shader = cgs.media.blueSaberGlowShader; +ADDRLP4 328+64 +ADDRGP4 cgs+70296+148 +INDIRI4 +ASGNI4 +line 1296 +;1296: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 328 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 1297 +;1297: } +LABELV $744 +line 1298 +;1298: } +LABELV $731 +LABELV $724 +line 1299 +;1299: } +LABELV $625 +LABELV $565 +line 1301 +;1300: +;1301: if ( cent->currentState.time == -1 && cent->currentState.weapon == WP_TRIP_MINE && (cent->currentState.eFlags & EF_FIRING) ) +ADDRLP4 328 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 328 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CNSTI4 -1 +NEI4 $760 +ADDRLP4 328 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 12 +NEI4 $760 +ADDRLP4 328 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $760 +line 1302 +;1302: { //if force sight is active, render the laser multiple times up to the force sight level to increase visibility +line 1303 +;1303: int i = 0; +ADDRLP4 332 +CNSTI4 0 +ASGNI4 +line 1305 +;1304: +;1305: VectorMA( ent.origin, 6.6f, ent.axis[0], beamOrg );// forward +ADDRLP4 336 +CNSTF4 1087583027 +ASGNF4 +ADDRLP4 216 +ADDRLP4 0+52 +INDIRF4 +ADDRLP4 336 +INDIRF4 +ADDRLP4 0+12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 216+4 +ADDRLP4 0+52+4 +INDIRF4 +ADDRLP4 336 +INDIRF4 +ADDRLP4 0+12+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 216+8 +ADDRLP4 0+52+8 +INDIRF4 +CNSTF4 1087583027 +ADDRLP4 0+12+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1306 +;1306: beamID = cgs.effects.tripmineLaserFX; +ADDRLP4 228 +ADDRGP4 cgs+71564+140 +INDIRI4 +ASGNI4 +line 1308 +;1307: +;1308: if (cg.snap->ps.fd.forcePowersActive & (1 << FP_SEE)) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 892 +ADDP4 +INDIRI4 +CNSTI4 16384 +BANDI4 +CNSTI4 0 +EQI4 $776 +line 1309 +;1309: { +line 1310 +;1310: i = cg.snap->ps.fd.forcePowerLevel[FP_SEE]; +ADDRLP4 332 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1044 +ADDP4 +INDIRI4 +ASGNI4 +ADDRGP4 $781 +JUMPV +LABELV $780 +line 1313 +;1311: +;1312: while (i > 0) +;1313: { +line 1314 +;1314: trap_FX_PlayEffectID( beamID, beamOrg, cent->currentState.pos.trDelta ); +ADDRLP4 228 +INDIRI4 +ARGI4 +ADDRLP4 216 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1315 +;1315: trap_FX_PlayEffectID( beamID, beamOrg, cent->currentState.pos.trDelta ); +ADDRLP4 228 +INDIRI4 +ARGI4 +ADDRLP4 216 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1316 +;1316: i--; +ADDRLP4 332 +ADDRLP4 332 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1317 +;1317: } +LABELV $781 +line 1312 +ADDRLP4 332 +INDIRI4 +CNSTI4 0 +GTI4 $780 +line 1318 +;1318: } +LABELV $776 +line 1320 +;1319: +;1320: trap_FX_PlayEffectID( beamID, beamOrg, cent->currentState.pos.trDelta ); +ADDRLP4 228 +INDIRI4 +ARGI4 +ADDRLP4 216 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1321 +;1321: } +LABELV $760 +line 1326 +;1322:/* +;1323:Ghoul2 Insert Start +;1324:*/ +;1325: +;1326: if (cg_debugBB.integer) +ADDRGP4 cg_debugBB+12 +INDIRI4 +CNSTI4 0 +EQI4 $783 +line 1327 +;1327: { +line 1328 +;1328: CG_CreateBBRefEnts(s1, cent->lerpOrigin); +ADDRLP4 212 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 CG_CreateBBRefEnts +CALLV +pop +line 1329 +;1329: } +LABELV $783 +line 1333 +;1330:/* +;1331:Ghoul2 Insert End +;1332:*/ +;1333:} +LABELV $236 +endproc CG_General 472 44 +proc CG_Speaker 16 16 +line 1342 +;1334: +;1335:/* +;1336:================== +;1337:CG_Speaker +;1338: +;1339:Speaker entities can automatically play sounds +;1340:================== +;1341:*/ +;1342:static void CG_Speaker( centity_t *cent ) { +line 1343 +;1343: if (cent->currentState.trickedentindex) +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $787 +line 1344 +;1344: { +line 1345 +;1345: trap_S_StopLoopingSound(cent->currentState.number); +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StopLoopingSound +CALLV +pop +line 1346 +;1346: } +LABELV $787 +line 1348 +;1347: +;1348: if ( ! cent->currentState.clientNum ) { // FIXME: use something other than clientNum... +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $789 +line 1349 +;1349: return; // not auto triggering +ADDRGP4 $786 +JUMPV +LABELV $789 +line 1352 +;1350: } +;1351: +;1352: if ( cg.time < cent->miscTime ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 620 +ADDP4 +INDIRI4 +GEI4 $791 +line 1353 +;1353: return; +ADDRGP4 $786 +JUMPV +LABELV $791 +line 1356 +;1354: } +;1355: +;1356: trap_S_StartSound (NULL, cent->currentState.number, CHAN_ITEM, cgs.gameSounds[cent->currentState.eventParm] ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1360 +;1357: +;1358: // ent->s.frame = ent->wait * 10; +;1359: // ent->s.clientNum = ent->random * 10; +;1360: cent->miscTime = cg.time + cent->currentState.frame * 100 + cent->currentState.clientNum * 100 * crandom(); +ADDRLP4 4 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTI4 100 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 620 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRI4 +MULI4 +ADDI4 +CVIF4 4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +CVIF4 4 +CNSTF4 1073741824 +ADDRLP4 4 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 1361 +;1361:} +LABELV $786 +endproc CG_Speaker 16 16 +export CG_GreyItem +proc CG_GreyItem 4 0 +line 1364 +;1362: +;1363:qboolean CG_GreyItem(int type, int tag, int plSide) +;1364:{ +line 1365 +;1365: if (type == IT_POWERUP && +ADDRFP4 0 +INDIRI4 +CNSTI4 5 +NEI4 $797 +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 12 +EQI4 $799 +ADDRLP4 0 +INDIRI4 +CNSTI4 13 +NEI4 $797 +LABELV $799 +line 1367 +;1366: (tag == PW_FORCE_ENLIGHTENED_LIGHT || tag == PW_FORCE_ENLIGHTENED_DARK)) +;1367: { +line 1368 +;1368: if (plSide == FORCE_LIGHTSIDE) +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +NEI4 $800 +line 1369 +;1369: { +line 1370 +;1370: if (tag == PW_FORCE_ENLIGHTENED_DARK) +ADDRFP4 4 +INDIRI4 +CNSTI4 13 +NEI4 $801 +line 1371 +;1371: { +line 1372 +;1372: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $796 +JUMPV +line 1374 +;1373: } +;1374: } +LABELV $800 +line 1375 +;1375: else if (plSide == FORCE_DARKSIDE) +ADDRFP4 8 +INDIRI4 +CNSTI4 2 +NEI4 $804 +line 1376 +;1376: { +line 1377 +;1377: if (tag == PW_FORCE_ENLIGHTENED_LIGHT) +ADDRFP4 4 +INDIRI4 +CNSTI4 12 +NEI4 $806 +line 1378 +;1378: { +line 1379 +;1379: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $796 +JUMPV +LABELV $806 +line 1381 +;1380: } +;1381: } +LABELV $804 +LABELV $801 +line 1382 +;1382: } +LABELV $797 +line 1384 +;1383: +;1384: return qfalse; +CNSTI4 0 +RETI4 +LABELV $796 +endproc CG_GreyItem 4 0 +proc CG_Item 312 12 +line 1392 +;1385:} +;1386: +;1387:/* +;1388:================== +;1389:CG_Item +;1390:================== +;1391:*/ +;1392:static void CG_Item( centity_t *cent ) { +line 1400 +;1393: refEntity_t ent; +;1394: entityState_t *es; +;1395: gitem_t *item; +;1396: int msec; +;1397: float scale; +;1398: weaponInfo_t *wi; +;1399: +;1400: es = ¢->currentState; +ADDRLP4 216 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 1401 +;1401: if ( es->modelindex >= bg_numItems ) { +ADDRLP4 216 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +ADDRGP4 bg_numItems +INDIRI4 +LTI4 $809 +line 1402 +;1402: CG_Error( "Bad item index %i on entity", es->modelindex ); +ADDRGP4 $811 +ARGP4 +ADDRLP4 216 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_Error +CALLV +pop +line 1403 +;1403: } +LABELV $809 +line 1409 +;1404: +;1405:/* +;1406:Ghoul2 Insert Start +;1407:*/ +;1408: +;1409: if ((es->eFlags & EF_NODRAW) && (es->eFlags & EF_ITEMPLACEHOLDER)) +ADDRLP4 232 +ADDRLP4 216 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 236 +CNSTI4 0 +ASGNI4 +ADDRLP4 232 +INDIRI4 +CNSTI4 128 +BANDI4 +ADDRLP4 236 +INDIRI4 +EQI4 $812 +ADDRLP4 232 +INDIRI4 +CNSTI4 4194304 +BANDI4 +ADDRLP4 236 +INDIRI4 +EQI4 $812 +line 1410 +;1410: { +line 1411 +;1411: es->eFlags &= ~EF_NODRAW; +ADDRLP4 240 +ADDRLP4 216 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 240 +INDIRP4 +ADDRLP4 240 +INDIRP4 +INDIRI4 +CNSTI4 -129 +BANDI4 +ASGNI4 +line 1412 +;1412: } +LABELV $812 +line 1414 +;1413: +;1414: if ( !es->modelindex ) +ADDRLP4 216 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $814 +line 1415 +;1415: { +line 1416 +;1416: return; +ADDRGP4 $808 +JUMPV +LABELV $814 +line 1419 +;1417: } +;1418: +;1419: item = &bg_itemlist[ es->modelindex ]; +ADDRLP4 212 +CNSTI4 52 +ADDRLP4 216 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +ASGNP4 +line 1421 +;1420: +;1421: if ((item->giType == IT_WEAPON || item->giType == IT_POWERUP) && +ADDRLP4 240 +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 240 +INDIRI4 +CNSTI4 1 +EQI4 $819 +ADDRLP4 240 +INDIRI4 +CNSTI4 5 +NEI4 $816 +LABELV $819 +ADDRLP4 244 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 16777216 +BANDI4 +ADDRLP4 244 +INDIRI4 +NEI4 $816 +ADDRGP4 cg_simpleItems+12 +INDIRI4 +ADDRLP4 244 +INDIRI4 +NEI4 $816 +line 1424 +;1422: !(cent->currentState.eFlags & EF_DROPPEDWEAPON) && +;1423: !cg_simpleItems.integer) +;1424: { +line 1428 +;1425: vec3_t uNorm; +;1426: qboolean doGrey; +;1427: +;1428: VectorClear(uNorm); +ADDRLP4 264 +CNSTF4 0 +ASGNF4 +ADDRLP4 248+8 +ADDRLP4 264 +INDIRF4 +ASGNF4 +ADDRLP4 248+4 +ADDRLP4 264 +INDIRF4 +ASGNF4 +ADDRLP4 248 +ADDRLP4 264 +INDIRF4 +ASGNF4 +line 1430 +;1429: +;1430: uNorm[2] = 1; +ADDRLP4 248+8 +CNSTF4 1065353216 +ASGNF4 +line 1432 +;1431: +;1432: memset( &ent, 0, sizeof( ent ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 1434 +;1433: +;1434: ent.customShader = 0; +ADDRLP4 0+76 +CNSTI4 0 +ASGNI4 +line 1435 +;1435: VectorCopy(cent->lerpOrigin, ent.origin); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 1436 +;1436: VectorCopy( cent->currentState.angles, cent->lerpAngles ); +ADDRLP4 268 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 268 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRLP4 268 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRB +ASGNB 12 +line 1437 +;1437: AnglesToAxis(cent->lerpAngles, ent.axis); +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 1438 +;1438: ent.hModel = cgs.media.itemHoloModel; +ADDRLP4 0+8 +ADDRGP4 cgs+70296+32 +INDIRI4 +ASGNI4 +line 1440 +;1439: +;1440: doGrey = CG_GreyItem(item->giType, item->giTag, cg.snap->ps.fd.forceSide); +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1232 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 276 +ADDRGP4 CG_GreyItem +CALLI4 +ASGNI4 +ADDRLP4 260 +ADDRLP4 276 +INDIRI4 +ASGNI4 +line 1442 +;1441: +;1442: if (doGrey) +ADDRLP4 260 +INDIRI4 +CNSTI4 0 +EQI4 $830 +line 1443 +;1443: { +line 1444 +;1444: ent.renderfx |= RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 1446 +;1445: +;1446: ent.shaderRGBA[0] = 150; +ADDRLP4 0+80 +CNSTU1 150 +ASGNU1 +line 1447 +;1447: ent.shaderRGBA[1] = 150; +ADDRLP4 0+80+1 +CNSTU1 150 +ASGNU1 +line 1448 +;1448: ent.shaderRGBA[2] = 150; +ADDRLP4 0+80+2 +CNSTU1 150 +ASGNU1 +line 1449 +;1449: } +LABELV $830 +line 1451 +;1450: +;1451: trap_R_AddRefEntityToScene(&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1453 +;1452: +;1453: if (!doGrey) +ADDRLP4 260 +INDIRI4 +CNSTI4 0 +NEI4 $838 +line 1454 +;1454: { +line 1455 +;1455: trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/itemcone.efx"), ent.origin, uNorm); +ADDRGP4 $840 +ARGP4 +ADDRLP4 280 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 280 +INDIRI4 +ARGI4 +ADDRLP4 0+52 +ARGP4 +ADDRLP4 248 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1456 +;1456: } +LABELV $838 +line 1457 +;1457: } +LABELV $816 +line 1460 +;1458: +;1459: // if set to invisible, skip +;1460: if ( ( es->eFlags & EF_NODRAW ) ) +ADDRLP4 216 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $842 +line 1461 +;1461: { +line 1462 +;1462: return; +ADDRGP4 $808 +JUMPV +LABELV $842 +line 1468 +;1463: } +;1464:/* +;1465:Ghoul2 Insert End +;1466:*/ +;1467: +;1468: if ( cg_simpleItems.integer && item->giType != IT_TEAM ) { +ADDRGP4 cg_simpleItems+12 +INDIRI4 +CNSTI4 0 +EQI4 $844 +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 8 +EQI4 $844 +line 1469 +;1469: memset( &ent, 0, sizeof( ent ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 1470 +;1470: ent.reType = RT_SPRITE; +ADDRLP4 0 +CNSTI4 2 +ASGNI4 +line 1471 +;1471: VectorCopy( cent->lerpOrigin, ent.origin ); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 1472 +;1472: ent.radius = 14; +ADDRLP4 0+92 +CNSTF4 1096810496 +ASGNF4 +line 1473 +;1473: ent.customShader = cg_items[es->modelindex].icon; +ADDRLP4 0+76 +CNSTI4 56 +ADDRLP4 216 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_items+20 +ADDP4 +INDIRI4 +ASGNI4 +line 1474 +;1474: ent.shaderRGBA[0] = 255; +ADDRLP4 0+80 +CNSTU1 255 +ASGNU1 +line 1475 +;1475: ent.shaderRGBA[1] = 255; +ADDRLP4 0+80+1 +CNSTU1 255 +ASGNU1 +line 1476 +;1476: ent.shaderRGBA[2] = 255; +ADDRLP4 0+80+2 +CNSTU1 255 +ASGNU1 +line 1478 +;1477: +;1478: ent.origin[2] += 16; +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +ASGNF4 +line 1480 +;1479: +;1480: if (item->giType != IT_POWERUP || item->giTag != PW_FORCE_BOON) +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $860 +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 14 +EQI4 $858 +LABELV $860 +line 1481 +;1481: { +line 1482 +;1482: ent.renderfx |= RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 1483 +;1483: } +LABELV $858 +line 1485 +;1484: +;1485: if ( es->eFlags & EF_ITEMPLACEHOLDER ) +ADDRLP4 216 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 4194304 +BANDI4 +CNSTI4 0 +EQI4 $862 +line 1486 +;1486: { +line 1487 +;1487: if (item->giType == IT_POWERUP && item->giTag == PW_FORCE_BOON) +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $864 +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $864 +line 1488 +;1488: { +line 1489 +;1489: return; +ADDRGP4 $808 +JUMPV +LABELV $864 +line 1491 +;1490: } +;1491: ent.shaderRGBA[0] = 200; +ADDRLP4 0+80 +CNSTU1 200 +ASGNU1 +line 1492 +;1492: ent.shaderRGBA[1] = 200; +ADDRLP4 0+80+1 +CNSTU1 200 +ASGNU1 +line 1493 +;1493: ent.shaderRGBA[2] = 200; +ADDRLP4 0+80+2 +CNSTU1 200 +ASGNU1 +line 1494 +;1494: ent.shaderRGBA[3] = 150 + sin(cg.time*0.01)*30; +CNSTF4 1008981770 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 260 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 264 +CNSTF4 1106247680 +ADDRLP4 260 +INDIRF4 +MULF4 +CNSTF4 1125515264 +ADDF4 +ASGNF4 +ADDRLP4 268 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 264 +INDIRF4 +ADDRLP4 268 +INDIRF4 +LTF4 $875 +ADDRLP4 256 +ADDRLP4 264 +INDIRF4 +ADDRLP4 268 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $876 +JUMPV +LABELV $875 +ADDRLP4 256 +ADDRLP4 264 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $876 +ADDRLP4 0+80+3 +ADDRLP4 256 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1495 +;1495: } +ADDRGP4 $863 +JUMPV +LABELV $862 +line 1497 +;1496: else +;1497: { +line 1498 +;1498: ent.shaderRGBA[3] = 255; +ADDRLP4 0+80+3 +CNSTU1 255 +ASGNU1 +line 1499 +;1499: } +LABELV $863 +line 1501 +;1500: +;1501: if (CG_GreyItem(item->giType, item->giTag, cg.snap->ps.fd.forceSide)) +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1232 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 256 +ADDRGP4 CG_GreyItem +CALLI4 +ASGNI4 +ADDRLP4 256 +INDIRI4 +CNSTI4 0 +EQI4 $879 +line 1502 +;1502: { +line 1503 +;1503: ent.shaderRGBA[0] = 100; +ADDRLP4 0+80 +CNSTU1 100 +ASGNU1 +line 1504 +;1504: ent.shaderRGBA[1] = 100; +ADDRLP4 0+80+1 +CNSTU1 100 +ASGNU1 +line 1505 +;1505: ent.shaderRGBA[2] = 100; +ADDRLP4 0+80+2 +CNSTU1 100 +ASGNU1 +line 1507 +;1506: +;1507: ent.shaderRGBA[3] = 200; +ADDRLP4 0+80+3 +CNSTU1 200 +ASGNU1 +line 1509 +;1508: +;1509: if (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT) +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 12 +NEI4 $889 +line 1510 +;1510: { +line 1511 +;1511: ent.customShader = trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable"); +ADDRGP4 $892 +ARGP4 +ADDRLP4 260 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0+76 +ADDRLP4 260 +INDIRI4 +ASGNI4 +line 1512 +;1512: } +ADDRGP4 $890 +JUMPV +LABELV $889 +line 1514 +;1513: else +;1514: { +line 1515 +;1515: ent.customShader = trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable"); +ADDRGP4 $894 +ARGP4 +ADDRLP4 260 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0+76 +ADDRLP4 260 +INDIRI4 +ASGNI4 +line 1516 +;1516: } +LABELV $890 +line 1517 +;1517: } +LABELV $879 +line 1518 +;1518: trap_R_AddRefEntityToScene(&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1519 +;1519: return; +ADDRGP4 $808 +JUMPV +LABELV $844 +line 1522 +;1520: } +;1521: +;1522: if ((item->giType == IT_WEAPON || item->giType == IT_POWERUP) && +ADDRLP4 248 +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 248 +INDIRI4 +CNSTI4 1 +EQI4 $897 +ADDRLP4 248 +INDIRI4 +CNSTI4 5 +NEI4 $895 +LABELV $897 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 16777216 +BANDI4 +CNSTI4 0 +NEI4 $895 +line 1524 +;1523: !(cent->currentState.eFlags & EF_DROPPEDWEAPON)) +;1524: { +line 1525 +;1525: cent->lerpOrigin[2] += 16; +ADDRLP4 252 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 252 +INDIRP4 +ADDRLP4 252 +INDIRP4 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +ASGNF4 +line 1526 +;1526: } +LABELV $895 +line 1528 +;1527: +;1528: if ((!(cent->currentState.eFlags & EF_DROPPEDWEAPON) || item->giType == IT_POWERUP) && +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 16777216 +BANDI4 +CNSTI4 0 +EQI4 $900 +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $898 +LABELV $900 +ADDRLP4 252 +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 252 +INDIRI4 +CNSTI4 1 +EQI4 $901 +ADDRLP4 252 +INDIRI4 +CNSTI4 5 +NEI4 $898 +LABELV $901 +line 1530 +;1529: (item->giType == IT_WEAPON || item->giType == IT_POWERUP)) +;1530: { +line 1532 +;1531: // items bob up and down continuously +;1532: scale = 0.005 + cent->currentState.number * 0.00001; +ADDRLP4 228 +CNSTF4 925353388 +ADDRFP4 0 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +CNSTF4 1000593162 +ADDF4 +ASGNF4 +line 1533 +;1533: cent->lerpOrigin[2] += 4 + cos( ( cg.time + 1000 ) * scale ) * 4; +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1000 +ADDI4 +CVIF4 4 +ADDRLP4 228 +INDIRF4 +MULF4 +ARGF4 +ADDRLP4 256 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 260 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 260 +INDIRP4 +ADDRLP4 260 +INDIRP4 +INDIRF4 +CNSTF4 1082130432 +ADDRLP4 256 +INDIRF4 +MULF4 +CNSTF4 1082130432 +ADDF4 +ADDF4 +ASGNF4 +line 1534 +;1534: } +ADDRGP4 $899 +JUMPV +LABELV $898 +line 1536 +;1535: else +;1536: { +line 1537 +;1537: if (item->giType == IT_HOLDABLE) +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $903 +line 1538 +;1538: { +line 1539 +;1539: if (item->giTag == HI_SEEKER) +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $905 +line 1540 +;1540: { +line 1541 +;1541: cent->lerpOrigin[2] += 5; +ADDRLP4 256 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 256 +INDIRP4 +ADDRLP4 256 +INDIRP4 +INDIRF4 +CNSTF4 1084227584 +ADDF4 +ASGNF4 +line 1542 +;1542: } +LABELV $905 +line 1543 +;1543: if (item->giTag == HI_SHIELD) +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $907 +line 1544 +;1544: { +line 1545 +;1545: cent->lerpOrigin[2] += 2; +ADDRLP4 256 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 256 +INDIRP4 +ADDRLP4 256 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDF4 +ASGNF4 +line 1546 +;1546: } +LABELV $907 +line 1547 +;1547: if (item->giTag == HI_BINOCULARS) +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $909 +line 1548 +;1548: { +line 1549 +;1549: cent->lerpOrigin[2] += 2; +ADDRLP4 256 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 256 +INDIRP4 +ADDRLP4 256 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDF4 +ASGNF4 +line 1550 +;1550: } +LABELV $909 +line 1551 +;1551: } +LABELV $903 +line 1552 +;1552: if (item->giType == IT_HEALTH) +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 4 +NEI4 $911 +line 1553 +;1553: { +line 1554 +;1554: cent->lerpOrigin[2] += 2; +ADDRLP4 256 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 256 +INDIRP4 +ADDRLP4 256 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDF4 +ASGNF4 +line 1555 +;1555: } +LABELV $911 +line 1556 +;1556: if (item->giType == IT_ARMOR) +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $913 +line 1557 +;1557: { +line 1558 +;1558: if (item->quantity == 100) +ADDRLP4 212 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +CNSTI4 100 +NEI4 $915 +line 1559 +;1559: { +line 1560 +;1560: cent->lerpOrigin[2] += 7; +ADDRLP4 256 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 256 +INDIRP4 +ADDRLP4 256 +INDIRP4 +INDIRF4 +CNSTF4 1088421888 +ADDF4 +ASGNF4 +line 1561 +;1561: } +LABELV $915 +line 1562 +;1562: } +LABELV $913 +line 1563 +;1563: } +LABELV $899 +line 1565 +;1564: +;1565: memset (&ent, 0, sizeof(ent)); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 1567 +;1566: +;1567: if ( (!(cent->currentState.eFlags & EF_DROPPEDWEAPON) || item->giType == IT_POWERUP) && +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 16777216 +BANDI4 +CNSTI4 0 +EQI4 $919 +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $917 +LABELV $919 +ADDRLP4 256 +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 256 +INDIRI4 +CNSTI4 1 +EQI4 $920 +ADDRLP4 256 +INDIRI4 +CNSTI4 5 +NEI4 $917 +LABELV $920 +line 1569 +;1568: (item->giType == IT_WEAPON || item->giType == IT_POWERUP) ) +;1569: { //only weapons and powerups rotate now +line 1571 +;1570: // autorotate at one of two speeds +;1571: VectorCopy( cg.autoAngles, cent->lerpAngles ); +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRGP4 cg+3520 +INDIRB +ASGNB 12 +line 1572 +;1572: AxisCopy( cg.autoAxis, ent.axis ); +ADDRGP4 cg+3532 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AxisCopy +CALLV +pop +line 1573 +;1573: } +ADDRGP4 $918 +JUMPV +LABELV $917 +line 1575 +;1574: else +;1575: { +line 1576 +;1576: VectorCopy( cent->currentState.angles, cent->lerpAngles ); +ADDRLP4 260 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 260 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRLP4 260 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRB +ASGNB 12 +line 1577 +;1577: AnglesToAxis(cent->lerpAngles, ent.axis); +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 1578 +;1578: } +LABELV $918 +line 1580 +;1579: +;1580: wi = NULL; +ADDRLP4 220 +CNSTP4 0 +ASGNP4 +line 1584 +;1581: // the weapons have their origin where they attatch to player +;1582: // models, so we need to offset them or they will rotate +;1583: // eccentricly +;1584: if (!(cent->currentState.eFlags & EF_DROPPEDWEAPON)) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 16777216 +BANDI4 +CNSTI4 0 +NEI4 $925 +line 1585 +;1585: { +line 1586 +;1586: if ( item->giType == IT_WEAPON ) { +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $926 +line 1587 +;1587: wi = &cg_weapons[item->giTag]; +ADDRLP4 220 +CNSTI4 208 +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons +ADDP4 +ASGNP4 +line 1588 +;1588: cent->lerpOrigin[0] -= +ADDRLP4 260 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ASGNP4 +ADDRLP4 260 +INDIRP4 +ADDRLP4 260 +INDIRP4 +INDIRF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 0+12 +INDIRF4 +MULF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 0+12+12 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 0+12+24 +INDIRF4 +MULF4 +ADDF4 +SUBF4 +ASGNF4 +line 1592 +;1589: wi->weaponMidpoint[0] * ent.axis[0][0] + +;1590: wi->weaponMidpoint[1] * ent.axis[1][0] + +;1591: wi->weaponMidpoint[2] * ent.axis[2][0]; +;1592: cent->lerpOrigin[1] -= +ADDRLP4 268 +ADDRFP4 0 +INDIRP4 +CNSTI4 932 +ADDP4 +ASGNP4 +ADDRLP4 268 +INDIRP4 +ADDRLP4 268 +INDIRP4 +INDIRF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 0+12+4 +INDIRF4 +MULF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 0+12+12+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 0+12+24+4 +INDIRF4 +MULF4 +ADDF4 +SUBF4 +ASGNF4 +line 1596 +;1593: wi->weaponMidpoint[0] * ent.axis[0][1] + +;1594: wi->weaponMidpoint[1] * ent.axis[1][1] + +;1595: wi->weaponMidpoint[2] * ent.axis[2][1]; +;1596: cent->lerpOrigin[2] -= +ADDRLP4 276 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 276 +INDIRP4 +ADDRLP4 276 +INDIRP4 +INDIRF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 0+12+8 +INDIRF4 +MULF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 0+12+12+8 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 0+12+24+8 +INDIRF4 +MULF4 +ADDF4 +SUBF4 +ASGNF4 +line 1601 +;1597: wi->weaponMidpoint[0] * ent.axis[0][2] + +;1598: wi->weaponMidpoint[1] * ent.axis[1][2] + +;1599: wi->weaponMidpoint[2] * ent.axis[2][2]; +;1600: +;1601: cent->lerpOrigin[2] += 8; // an extra height boost +ADDRLP4 284 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 284 +INDIRP4 +ADDRLP4 284 +INDIRP4 +INDIRF4 +CNSTF4 1090519040 +ADDF4 +ASGNF4 +line 1602 +;1602: } +line 1603 +;1603: } +ADDRGP4 $926 +JUMPV +LABELV $925 +line 1605 +;1604: else +;1605: { +line 1606 +;1606: wi = &cg_weapons[item->giTag]; +ADDRLP4 220 +CNSTI4 208 +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons +ADDP4 +ASGNP4 +line 1608 +;1607: +;1608: switch(item->giTag) +ADDRLP4 260 +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 260 +INDIRI4 +CNSTI4 4 +LTI4 $950 +ADDRLP4 260 +INDIRI4 +CNSTI4 13 +GTI4 $950 +ADDRLP4 260 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $963-16 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $963 +address $953 +address $954 +address $955 +address $956 +address $957 +address $958 +address $959 +address $960 +address $961 +address $962 +code +line 1609 +;1609: { +LABELV $953 +line 1611 +;1610: case WP_BLASTER: +;1611: cent->lerpOrigin[2] -= 12; +ADDRLP4 268 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 268 +INDIRP4 +ADDRLP4 268 +INDIRP4 +INDIRF4 +CNSTF4 1094713344 +SUBF4 +ASGNF4 +line 1612 +;1612: break; +ADDRGP4 $951 +JUMPV +LABELV $954 +line 1614 +;1613: case WP_DISRUPTOR: +;1614: cent->lerpOrigin[2] -= 13; +ADDRLP4 272 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 272 +INDIRP4 +ADDRLP4 272 +INDIRP4 +INDIRF4 +CNSTF4 1095761920 +SUBF4 +ASGNF4 +line 1615 +;1615: break; +ADDRGP4 $951 +JUMPV +LABELV $955 +line 1617 +;1616: case WP_BOWCASTER: +;1617: cent->lerpOrigin[2] -= 16; +ADDRLP4 276 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 276 +INDIRP4 +ADDRLP4 276 +INDIRP4 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 1618 +;1618: break; +ADDRGP4 $951 +JUMPV +LABELV $956 +line 1620 +;1619: case WP_REPEATER: +;1620: cent->lerpOrigin[2] -= 12; +ADDRLP4 280 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 280 +INDIRP4 +ADDRLP4 280 +INDIRP4 +INDIRF4 +CNSTF4 1094713344 +SUBF4 +ASGNF4 +line 1621 +;1621: break; +ADDRGP4 $951 +JUMPV +LABELV $957 +line 1623 +;1622: case WP_DEMP2: +;1623: cent->lerpOrigin[2] -= 10; +ADDRLP4 284 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 284 +INDIRP4 +ADDRLP4 284 +INDIRP4 +INDIRF4 +CNSTF4 1092616192 +SUBF4 +ASGNF4 +line 1624 +;1624: break; +ADDRGP4 $951 +JUMPV +LABELV $958 +line 1626 +;1625: case WP_FLECHETTE: +;1626: cent->lerpOrigin[2] -= 6; +ADDRLP4 288 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 288 +INDIRP4 +ADDRLP4 288 +INDIRP4 +INDIRF4 +CNSTF4 1086324736 +SUBF4 +ASGNF4 +line 1627 +;1627: break; +ADDRGP4 $951 +JUMPV +LABELV $959 +line 1629 +;1628: case WP_ROCKET_LAUNCHER: +;1629: cent->lerpOrigin[2] -= 11; +ADDRLP4 292 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 292 +INDIRP4 +ADDRLP4 292 +INDIRP4 +INDIRF4 +CNSTF4 1093664768 +SUBF4 +ASGNF4 +line 1630 +;1630: break; +ADDRGP4 $951 +JUMPV +LABELV $960 +line 1632 +;1631: case WP_THERMAL: +;1632: cent->lerpOrigin[2] -= 12; +ADDRLP4 296 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 296 +INDIRP4 +ADDRLP4 296 +INDIRP4 +INDIRF4 +CNSTF4 1094713344 +SUBF4 +ASGNF4 +line 1633 +;1633: break; +ADDRGP4 $951 +JUMPV +LABELV $961 +line 1635 +;1634: case WP_TRIP_MINE: +;1635: cent->lerpOrigin[2] -= 16; +ADDRLP4 300 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 300 +INDIRP4 +ADDRLP4 300 +INDIRP4 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 1636 +;1636: break; +ADDRGP4 $951 +JUMPV +LABELV $962 +line 1638 +;1637: case WP_DET_PACK: +;1638: cent->lerpOrigin[2] -= 16; +ADDRLP4 304 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 304 +INDIRP4 +ADDRLP4 304 +INDIRP4 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 1639 +;1639: break; +ADDRGP4 $951 +JUMPV +LABELV $950 +line 1641 +;1640: default: +;1641: cent->lerpOrigin[2] -= 8; +ADDRLP4 308 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ASGNP4 +ADDRLP4 308 +INDIRP4 +ADDRLP4 308 +INDIRP4 +INDIRF4 +CNSTF4 1090519040 +SUBF4 +ASGNF4 +line 1642 +;1642: break; +LABELV $951 +line 1644 +;1643: } +;1644: } +LABELV $926 +line 1646 +;1645: +;1646: ent.hModel = cg_items[es->modelindex].models[0]; +ADDRLP4 0+8 +CNSTI4 56 +ADDRLP4 216 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_items+4 +ADDP4 +INDIRI4 +ASGNI4 +line 1650 +;1647:/* +;1648:Ghoul2 Insert Start +;1649:*/ +;1650: ent.ghoul2 = cg_items[es->modelindex].g2Models[0]; +ADDRLP4 0+208 +CNSTI4 56 +ADDRLP4 216 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_items+24 +ADDP4 +INDIRP4 +ASGNP4 +line 1651 +;1651: ent.radius = cg_items[es->modelindex].radius[0]; +ADDRLP4 0+92 +CNSTI4 56 +ADDRLP4 216 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_items+40 +ADDP4 +INDIRF4 +ASGNF4 +line 1652 +;1652: VectorCopy (cent->lerpAngles, ent.angles); +ADDRLP4 0+184 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 1656 +;1653:/* +;1654:Ghoul2 Insert End +;1655:*/ +;1656: VectorCopy( cent->lerpOrigin, ent.origin); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 1657 +;1657: VectorCopy( cent->lerpOrigin, ent.oldorigin); +ADDRLP4 0+64 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 1659 +;1658: +;1659: ent.nonNormalizedAxes = qfalse; +ADDRLP4 0+48 +CNSTI4 0 +ASGNI4 +line 1663 +;1660: +;1661: // if just respawned, slowly scale up +;1662: +;1663: msec = cg.time - cent->miscTime; +ADDRLP4 224 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 620 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 1665 +;1664: +;1665: if (CG_GreyItem(item->giType, item->giTag, cg.snap->ps.fd.forceSide)) +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1232 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 264 +ADDRGP4 CG_GreyItem +CALLI4 +ASGNI4 +ADDRLP4 264 +INDIRI4 +CNSTI4 0 +EQI4 $976 +line 1666 +;1666: { +line 1667 +;1667: ent.renderfx |= RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 1669 +;1668: +;1669: ent.shaderRGBA[0] = 150; +ADDRLP4 0+80 +CNSTU1 150 +ASGNU1 +line 1670 +;1670: ent.shaderRGBA[1] = 150; +ADDRLP4 0+80+1 +CNSTU1 150 +ASGNU1 +line 1671 +;1671: ent.shaderRGBA[2] = 150; +ADDRLP4 0+80+2 +CNSTU1 150 +ASGNU1 +line 1673 +;1672: +;1673: ent.renderfx |= RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 1675 +;1674: +;1675: ent.shaderRGBA[3] = 200; +ADDRLP4 0+80+3 +CNSTU1 200 +ASGNU1 +line 1677 +;1676: +;1677: if (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT) +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 12 +NEI4 $988 +line 1678 +;1678: { +line 1679 +;1679: ent.customShader = trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable"); +ADDRGP4 $892 +ARGP4 +ADDRLP4 268 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0+76 +ADDRLP4 268 +INDIRI4 +ASGNI4 +line 1680 +;1680: } +ADDRGP4 $989 +JUMPV +LABELV $988 +line 1682 +;1681: else +;1682: { +line 1683 +;1683: ent.customShader = trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable"); +ADDRGP4 $894 +ARGP4 +ADDRLP4 268 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0+76 +ADDRLP4 268 +INDIRI4 +ASGNI4 +line 1684 +;1684: } +LABELV $989 +line 1686 +;1685: +;1686: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1687 +;1687: return; +ADDRGP4 $808 +JUMPV +LABELV $976 +line 1690 +;1688: } +;1689: +;1690: if ( es->eFlags & EF_ITEMPLACEHOLDER ) // item has been picked up +ADDRLP4 216 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 4194304 +BANDI4 +CNSTI4 0 +EQI4 $992 +line 1691 +;1691: { +line 1692 +;1692: if ( es->eFlags & EF_DEAD ) // if item had been droped, don't show at all +ADDRLP4 216 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $994 +line 1693 +;1693: return; +ADDRGP4 $808 +JUMPV +LABELV $994 +line 1695 +;1694: +;1695: ent.renderfx |= RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 1696 +;1696: ent.shaderRGBA[0] = 0; +ADDRLP4 0+80 +CNSTU1 0 +ASGNU1 +line 1697 +;1697: ent.shaderRGBA[1] = 200; +ADDRLP4 0+80+1 +CNSTU1 200 +ASGNU1 +line 1698 +;1698: ent.shaderRGBA[2] = 85; +ADDRLP4 0+80+2 +CNSTU1 85 +ASGNU1 +line 1699 +;1699: ent.customShader = cgs.media.itemRespawningPlaceholder; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+480 +INDIRI4 +ASGNI4 +line 1700 +;1700: } +LABELV $992 +line 1703 +;1701: +;1702: // increase the size of the weapons when they are presented as items +;1703: if ( item->giType == IT_WEAPON ) { +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1005 +line 1704 +;1704: VectorScale( ent.axis[0], 1.5, ent.axis[0] ); +ADDRLP4 0+12 +CNSTF4 1069547520 +ADDRLP4 0+12 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+4 +CNSTF4 1069547520 +ADDRLP4 0+12+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+8 +CNSTF4 1069547520 +ADDRLP4 0+12+8 +INDIRF4 +MULF4 +ASGNF4 +line 1705 +;1705: VectorScale( ent.axis[1], 1.5, ent.axis[1] ); +ADDRLP4 0+12+12 +CNSTF4 1069547520 +ADDRLP4 0+12+12 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+12+4 +CNSTF4 1069547520 +ADDRLP4 0+12+12+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+12+8 +CNSTF4 1069547520 +ADDRLP4 0+12+12+8 +INDIRF4 +MULF4 +ASGNF4 +line 1706 +;1706: VectorScale( ent.axis[2], 1.5, ent.axis[2] ); +ADDRLP4 0+12+24 +CNSTF4 1069547520 +ADDRLP4 0+12+24 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+24+4 +CNSTF4 1069547520 +ADDRLP4 0+12+24+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+24+8 +CNSTF4 1069547520 +ADDRLP4 0+12+24+8 +INDIRF4 +MULF4 +ASGNF4 +line 1707 +;1707: ent.nonNormalizedAxes = qtrue; +ADDRLP4 0+48 +CNSTI4 1 +ASGNI4 +line 1709 +;1708: //trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.weaponHoverSound ); +;1709: } +LABELV $1005 +line 1711 +;1710: +;1711: if (!(cent->currentState.eFlags & EF_DROPPEDWEAPON) && +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 16777216 +BANDI4 +CNSTI4 0 +NEI4 $1050 +ADDRLP4 268 +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 268 +INDIRI4 +CNSTI4 1 +EQI4 $1052 +ADDRLP4 268 +INDIRI4 +CNSTI4 5 +NEI4 $1050 +LABELV $1052 +line 1713 +;1712: (item->giType == IT_WEAPON || item->giType == IT_POWERUP)) +;1713: { +line 1714 +;1714: ent.renderfx |= RF_MINLIGHT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 1715 +;1715: } +LABELV $1050 +line 1717 +;1716: +;1717: if (item->giType != IT_TEAM && msec >= 0 && msec < ITEM_SCALEUP_TIME && !(es->eFlags & EF_ITEMPLACEHOLDER) && !(es->eFlags & EF_DROPPEDWEAPON)) +ADDRLP4 272 +CNSTI4 8 +ASGNI4 +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ADDRLP4 272 +INDIRI4 +EQI4 $1054 +ADDRLP4 280 +CNSTI4 0 +ASGNI4 +ADDRLP4 224 +INDIRI4 +ADDRLP4 280 +INDIRI4 +LTI4 $1054 +ADDRLP4 224 +INDIRI4 +CNSTI4 1000 +GEI4 $1054 +ADDRLP4 284 +ADDRLP4 216 +INDIRP4 +ADDRLP4 272 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 284 +INDIRI4 +CNSTI4 4194304 +BANDI4 +ADDRLP4 280 +INDIRI4 +NEI4 $1054 +ADDRLP4 284 +INDIRI4 +CNSTI4 16777216 +BANDI4 +ADDRLP4 280 +INDIRI4 +NEI4 $1054 +line 1718 +;1718: { // if just respawned, fade in, but don't do this for flags. +line 1722 +;1719: float alpha; +;1720: int a; +;1721: +;1722: alpha = (float)msec / ITEM_SCALEUP_TIME; +ADDRLP4 292 +ADDRLP4 224 +INDIRI4 +CVIF4 4 +CNSTF4 1148846080 +DIVF4 +ASGNF4 +line 1723 +;1723: a = alpha * 255.0; +ADDRLP4 288 +CNSTF4 1132396544 +ADDRLP4 292 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1724 +;1724: if (a <= 0) +ADDRLP4 288 +INDIRI4 +CNSTI4 0 +GTI4 $1056 +line 1725 +;1725: a=1; +ADDRLP4 288 +CNSTI4 1 +ASGNI4 +LABELV $1056 +line 1727 +;1726: +;1727: ent.shaderRGBA[3] = a; +ADDRLP4 0+80+3 +ADDRLP4 288 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 1728 +;1728: if (item->giType != IT_POWERUP || item->giTag != PW_FORCE_BOON) +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1062 +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 14 +EQI4 $1060 +LABELV $1062 +line 1729 +;1729: { //boon model uses a different blending mode for the sprite inside and doesn't look proper with this method +line 1730 +;1730: ent.renderfx |= RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 1731 +;1731: } +LABELV $1060 +line 1732 +;1732: trap_R_AddRefEntityToScene(&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1734 +;1733: +;1734: ent.renderfx &= ~RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 1740 +;1735: +;1736: // Now draw the static shader over it. +;1737: // Alpha in over half the time, out over half. +;1738: +;1739: //alpha = sin(M_PI*alpha); +;1740: a = alpha * 255.0; +ADDRLP4 288 +CNSTF4 1132396544 +ADDRLP4 292 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1742 +;1741: +;1742: a = 255 - a; +ADDRLP4 288 +CNSTI4 255 +ADDRLP4 288 +INDIRI4 +SUBI4 +ASGNI4 +line 1744 +;1743: +;1744: if (a <= 0) +ADDRLP4 288 +INDIRI4 +CNSTI4 0 +GTI4 $1065 +line 1745 +;1745: a=1; +ADDRLP4 288 +CNSTI4 1 +ASGNI4 +LABELV $1065 +line 1746 +;1746: if (a > 255) +ADDRLP4 288 +INDIRI4 +CNSTI4 255 +LEI4 $1067 +line 1747 +;1747: a=255; +ADDRLP4 288 +CNSTI4 255 +ASGNI4 +LABELV $1067 +line 1749 +;1748: +;1749: ent.customShader = cgs.media.itemRespawningRezOut; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+484 +INDIRI4 +ASGNI4 +line 1768 +;1750: +;1751: /* +;1752: ent.shaderRGBA[0] = 0; +;1753: ent.shaderRGBA[1] = a; +;1754: ent.shaderRGBA[2] = a-100; +;1755: +;1756: if (ent.shaderRGBA[2] < 0) +;1757: { +;1758: ent.shaderRGBA[2] = 0; +;1759: } +;1760: */ +;1761: +;1762: /* +;1763: ent.shaderRGBA[0] = +;1764: ent.shaderRGBA[1] = +;1765: ent.shaderRGBA[2] = a; +;1766: */ +;1767: +;1768: ent.renderfx |= RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 1769 +;1769: ent.shaderRGBA[0] = 0; +ADDRLP4 0+80 +CNSTU1 0 +ASGNU1 +line 1770 +;1770: ent.shaderRGBA[1] = 200; +ADDRLP4 0+80+1 +CNSTU1 200 +ASGNU1 +line 1771 +;1771: ent.shaderRGBA[2] = 85; +ADDRLP4 0+80+2 +CNSTU1 85 +ASGNU1 +line 1773 +;1772: +;1773: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1774 +;1774: } +ADDRGP4 $1055 +JUMPV +LABELV $1054 +line 1776 +;1775: else +;1776: { // add to refresh list -- normal item +line 1777 +;1777: if (item->giType == IT_TEAM && +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $1078 +ADDRLP4 292 +ADDRLP4 212 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 292 +INDIRI4 +CNSTI4 4 +EQI4 $1080 +ADDRLP4 292 +INDIRI4 +CNSTI4 5 +NEI4 $1078 +LABELV $1080 +line 1779 +;1778: (item->giTag == PW_REDFLAG || item->giTag == PW_BLUEFLAG)) +;1779: { +line 1780 +;1780: ent.modelScale[0] = 0.7; +ADDRLP4 0+196 +CNSTF4 1060320051 +ASGNF4 +line 1781 +;1781: ent.modelScale[1] = 0.7; +ADDRLP4 0+196+4 +CNSTF4 1060320051 +ASGNF4 +line 1782 +;1782: ent.modelScale[2] = 0.7; +ADDRLP4 0+196+8 +CNSTF4 1060320051 +ASGNF4 +line 1783 +;1783: ScaleModelAxis(&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 ScaleModelAxis +CALLV +pop +line 1784 +;1784: } +LABELV $1078 +line 1785 +;1785: trap_R_AddRefEntityToScene(&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1786 +;1786: } +LABELV $1055 +line 1813 +;1787: +;1788: //rww - As far as I can see, this is useless. +;1789: /* +;1790: if ( item->giType == IT_WEAPON && wi->barrelModel ) { +;1791: refEntity_t barrel; +;1792: +;1793: memset( &barrel, 0, sizeof( barrel ) ); +;1794: +;1795: barrel.hModel = wi->barrelModel; +;1796: +;1797: VectorCopy( ent.lightingOrigin, barrel.lightingOrigin ); +;1798: barrel.shadowPlane = ent.shadowPlane; +;1799: barrel.renderfx = ent.renderfx; +;1800: +;1801: barrel.customShader = ent.customShader; +;1802: +;1803: CG_PositionRotatedEntityOnTag( &barrel, &ent, wi->weaponModel, "tag_barrel" ); +;1804: +;1805: AxisCopy( ent.axis, barrel.axis ); +;1806: barrel.nonNormalizedAxes = ent.nonNormalizedAxes; +;1807: +;1808: trap_R_AddRefEntityToScene( &barrel ); +;1809: } +;1810: */ +;1811: +;1812: // accompanying rings / spheres for powerups +;1813: if ( !cg_simpleItems.integer ) +ADDRGP4 cg_simpleItems+12 +INDIRI4 +CNSTI4 0 +NEI4 $1086 +line 1814 +;1814: { +line 1817 +;1815: vec3_t spinAngles; +;1816: +;1817: VectorClear( spinAngles ); +ADDRLP4 300 +CNSTF4 0 +ASGNF4 +ADDRLP4 288+8 +ADDRLP4 300 +INDIRF4 +ASGNF4 +ADDRLP4 288+4 +ADDRLP4 300 +INDIRF4 +ASGNF4 +ADDRLP4 288 +ADDRLP4 300 +INDIRF4 +ASGNF4 +line 1819 +;1818: +;1819: if ( item->giType == IT_HEALTH || item->giType == IT_POWERUP ) +ADDRLP4 304 +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 304 +INDIRI4 +CNSTI4 4 +EQI4 $1093 +ADDRLP4 304 +INDIRI4 +CNSTI4 5 +NEI4 $1091 +LABELV $1093 +line 1820 +;1820: { +line 1821 +;1821: if ( ( ent.hModel = cg_items[es->modelindex].models[1] ) != 0 ) +ADDRLP4 308 +CNSTI4 56 +ADDRLP4 216 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_items+4+4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 0+8 +ADDRLP4 308 +INDIRI4 +ASGNI4 +ADDRLP4 308 +INDIRI4 +CNSTI4 0 +EQI4 $1094 +line 1822 +;1822: { +line 1823 +;1823: if ( item->giType == IT_POWERUP ) +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1099 +line 1824 +;1824: { +line 1825 +;1825: ent.origin[2] += 12; +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +CNSTF4 1094713344 +ADDF4 +ASGNF4 +line 1826 +;1826: spinAngles[1] = ( cg.time & 1023 ) * 360 / -1024.0f; +ADDRLP4 288+4 +CNSTI4 360 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1023 +BANDI4 +MULI4 +CVIF4 4 +CNSTF4 3296722944 +DIVF4 +ASGNF4 +line 1827 +;1827: } +LABELV $1099 +line 1828 +;1828: AnglesToAxis( spinAngles, ent.axis ); +ADDRLP4 288 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 1830 +;1829: +;1830: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1831 +;1831: } +LABELV $1094 +line 1832 +;1832: } +LABELV $1091 +line 1833 +;1833: } +LABELV $1086 +line 1834 +;1834:} +LABELV $808 +endproc CG_Item 312 12 +proc CG_Missile 376 28 +line 1843 +;1835: +;1836://============================================================================ +;1837: +;1838:/* +;1839:=============== +;1840:CG_Missile +;1841:=============== +;1842:*/ +;1843:static void CG_Missile( centity_t *cent ) { +line 1849 +;1844: refEntity_t ent; +;1845: entityState_t *s1; +;1846: const weaponInfo_t *weapon; +;1847:// int col; +;1848: +;1849: s1 = ¢->currentState; +ADDRLP4 212 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 1850 +;1850: if ( s1->weapon > WP_NUM_WEAPONS && s1->weapon != G2_MODEL_PART ) { +ADDRLP4 220 +ADDRLP4 212 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 220 +INDIRI4 +CNSTI4 16 +LEI4 $1107 +ADDRLP4 220 +INDIRI4 +CNSTI4 50 +EQI4 $1107 +line 1851 +;1851: s1->weapon = 0; +ADDRLP4 212 +INDIRP4 +CNSTI4 276 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1852 +;1852: } +LABELV $1107 +line 1854 +;1853: +;1854: if (cent->ghoul2 && s1->weapon == G2_MODEL_PART) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1109 +ADDRLP4 212 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 50 +NEI4 $1109 +line 1855 +;1855: { +line 1856 +;1856: weapon = &cg_weapons[WP_SABER]; +ADDRLP4 216 +ADDRGP4 cg_weapons+416 +ASGNP4 +line 1857 +;1857: } +ADDRGP4 $1110 +JUMPV +LABELV $1109 +line 1859 +;1858: else +;1859: { +line 1860 +;1860: weapon = &cg_weapons[s1->weapon]; +ADDRLP4 216 +CNSTI4 208 +ADDRLP4 212 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons +ADDP4 +ASGNP4 +line 1861 +;1861: } +LABELV $1110 +line 1863 +;1862: +;1863: if (s1->weapon == WP_SABER) +ADDRLP4 212 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1112 +line 1864 +;1864: { +line 1865 +;1865: if (!cent->ghoul2 && !(s1->eFlags & EF_NODRAW)) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1114 +ADDRLP4 212 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +NEI4 $1114 +line 1866 +;1866: { +line 1867 +;1867: trap_G2API_InitGhoul2Model(¢->ghoul2, "models/weapons2/saber/saber_w.glm", 0, 0, 0, 0, 0); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRGP4 $1116 +ARGP4 +ADDRLP4 224 +CNSTI4 0 +ASGNI4 +ADDRLP4 224 +INDIRI4 +ARGI4 +ADDRLP4 224 +INDIRI4 +ARGI4 +ADDRLP4 224 +INDIRI4 +ARGI4 +ADDRLP4 224 +INDIRI4 +ARGI4 +ADDRLP4 224 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_InitGhoul2Model +CALLI4 +pop +line 1868 +;1868: return; +ADDRGP4 $1106 +JUMPV +LABELV $1114 +line 1870 +;1869: } +;1870: else if (s1->eFlags & EF_NODRAW) +ADDRLP4 212 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $1117 +line 1871 +;1871: { +line 1872 +;1872: return; +ADDRGP4 $1106 +JUMPV +LABELV $1117 +line 1874 +;1873: } +;1874: } +LABELV $1112 +line 1876 +;1875: +;1876: if (cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1119 +line 1877 +;1877: { //give us a proper radius +line 1878 +;1878: ent.radius = cent->currentState.g2radius; +ADDRLP4 0+92 +ADDRFP4 0 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1879 +;1879: } +LABELV $1119 +line 1882 +;1880: +;1881: // calculate the axis +;1882: VectorCopy( s1->angles, cent->lerpAngles); +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRLP4 212 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRB +ASGNB 12 +line 1884 +;1883: +;1884: if ( cent->currentState.eFlags & EF_ALT_FIRING ) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $1122 +line 1885 +;1885: { +line 1887 +;1886: // add trails +;1887: if ( weapon->altMissileTrailFunc ) +ADDRLP4 216 +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1124 +line 1888 +;1888: weapon->altMissileTrailFunc( cent, weapon ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 216 +INDIRP4 +ARGP4 +ADDRLP4 216 +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRP4 +CALLV +pop +LABELV $1124 +line 1891 +;1889: +;1890: // add dynamic light +;1891: if ( weapon->altMissileDlight ) +ADDRLP4 216 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $1126 +line 1892 +;1892: { +line 1893 +;1893: trap_R_AddLightToScene(cent->lerpOrigin, weapon->altMissileDlight, +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 216 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 216 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 216 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 216 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 trap_R_AddLightToScene +CALLV +pop +line 1895 +;1894: weapon->altMissileDlightColor[0], weapon->altMissileDlightColor[1], weapon->altMissileDlightColor[2] ); +;1895: } +LABELV $1126 +line 1898 +;1896: +;1897: // add missile sound +;1898: if ( weapon->altMissileSound ) { +ADDRLP4 216 +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1128 +line 1901 +;1899: vec3_t velocity; +;1900: +;1901: BG_EvaluateTrajectoryDelta( ¢->currentState.pos, cg.time, velocity ); +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 228 +ARGP4 +ADDRGP4 BG_EvaluateTrajectoryDelta +CALLV +pop +line 1903 +;1902: +;1903: trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, velocity, weapon->altMissileSound ); +ADDRLP4 240 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 240 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 240 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 228 +ARGP4 +ADDRLP4 216 +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddLoopingSound +CALLV +pop +line 1904 +;1904: } +LABELV $1128 +line 1907 +;1905: +;1906: //Don't draw something without a model +;1907: if ( weapon->altMissileModel == NULL_HANDLE ) +ADDRLP4 216 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1123 +line 1908 +;1908: return; +ADDRGP4 $1106 +JUMPV +line 1909 +;1909: } +LABELV $1122 +line 1911 +;1910: else +;1911: { +line 1913 +;1912: // add trails +;1913: if ( weapon->missileTrailFunc ) +ADDRLP4 216 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1133 +line 1914 +;1914: weapon->missileTrailFunc( cent, weapon ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 216 +INDIRP4 +ARGP4 +ADDRLP4 216 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRP4 +CALLV +pop +LABELV $1133 +line 1917 +;1915: +;1916: // add dynamic light +;1917: if ( weapon->missileDlight ) +ADDRLP4 216 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $1135 +line 1918 +;1918: { +line 1919 +;1919: trap_R_AddLightToScene(cent->lerpOrigin, weapon->missileDlight, +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 216 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 216 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 216 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 216 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 trap_R_AddLightToScene +CALLV +pop +line 1921 +;1920: weapon->missileDlightColor[0], weapon->missileDlightColor[1], weapon->missileDlightColor[2] ); +;1921: } +LABELV $1135 +line 1924 +;1922: +;1923: // add missile sound +;1924: if ( weapon->missileSound ) +ADDRLP4 216 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1137 +line 1925 +;1925: { +line 1928 +;1926: vec3_t velocity; +;1927: +;1928: BG_EvaluateTrajectoryDelta( ¢->currentState.pos, cg.time, velocity ); +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 228 +ARGP4 +ADDRGP4 BG_EvaluateTrajectoryDelta +CALLV +pop +line 1930 +;1929: +;1930: trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, velocity, weapon->missileSound ); +ADDRLP4 240 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 240 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 240 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 228 +ARGP4 +ADDRLP4 216 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddLoopingSound +CALLV +pop +line 1931 +;1931: } +LABELV $1137 +line 1934 +;1932: +;1933: //Don't draw something without a model +;1934: if ( weapon->missileModel == NULL_HANDLE && s1->weapon != WP_SABER && s1->weapon != G2_MODEL_PART ) //saber uses ghoul2 model, doesn't matter +ADDRLP4 216 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1140 +ADDRLP4 228 +ADDRLP4 212 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 228 +INDIRI4 +CNSTI4 2 +EQI4 $1140 +ADDRLP4 228 +INDIRI4 +CNSTI4 50 +EQI4 $1140 +line 1935 +;1935: return; +ADDRGP4 $1106 +JUMPV +LABELV $1140 +line 1936 +;1936: } +LABELV $1123 +line 1939 +;1937: +;1938: // create the render entity +;1939: memset (&ent, 0, sizeof(ent)); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 1940 +;1940: VectorCopy( cent->lerpOrigin, ent.origin); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 1941 +;1941: VectorCopy( cent->lerpOrigin, ent.oldorigin); +ADDRLP4 0+64 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 1945 +;1942:/* +;1943:Ghoul2 Insert Start +;1944:*/ +;1945: CG_SetGhoul2Info(&ent, cent); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_SetGhoul2Info +CALLV +pop +line 1952 +;1946: +;1947:/* +;1948:Ghoul2 Insert End +;1949:*/ +;1950: +;1951: // flicker between two skins +;1952: ent.skinNum = cg.clientFrame & 1; +ADDRLP4 0+132 +ADDRGP4 cg +INDIRI4 +CNSTI4 1 +BANDI4 +ASGNI4 +line 1953 +;1953: ent.renderfx = /*weapon->missileRenderfx | */RF_NOSHADOW; +ADDRLP4 0+4 +CNSTI4 64 +ASGNI4 +line 1955 +;1954: +;1955: if (s1->weapon != WP_SABER && s1->weapon != G2_MODEL_PART) +ADDRLP4 224 +ADDRLP4 212 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 224 +INDIRI4 +CNSTI4 2 +EQI4 $1146 +ADDRLP4 224 +INDIRI4 +CNSTI4 50 +EQI4 $1146 +line 1956 +;1956: { +line 1959 +;1957: //if ( cent->currentState.eFlags | EF_ALT_FIRING ) +;1958: //rww - why was this like this? +;1959: if ( cent->currentState.eFlags & EF_ALT_FIRING ) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $1148 +line 1960 +;1960: { +line 1961 +;1961: ent.hModel = weapon->altMissileModel; +ADDRLP4 0+8 +ADDRLP4 216 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRI4 +ASGNI4 +line 1962 +;1962: } +ADDRGP4 $1149 +JUMPV +LABELV $1148 +line 1964 +;1963: else +;1964: { +line 1965 +;1965: ent.hModel = weapon->missileModel; +ADDRLP4 0+8 +ADDRLP4 216 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRI4 +ASGNI4 +line 1966 +;1966: } +LABELV $1149 +line 1967 +;1967: } +LABELV $1146 +line 1970 +;1968: +;1969: // spin as it moves +;1970: if ( s1->apos.trType != TR_INTERPOLATE ) +ADDRLP4 212 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 1 +EQI4 $1152 +line 1971 +;1971: { +line 1973 +;1972: // convert direction of travel into axis +;1973: if ( VectorNormalize2( s1->pos.trDelta, ent.axis[0] ) == 0 ) { +ADDRLP4 212 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRLP4 228 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 228 +INDIRF4 +CNSTF4 0 +NEF4 $1154 +line 1974 +;1974: ent.axis[0][2] = 1; +ADDRLP4 0+12+8 +CNSTF4 1065353216 +ASGNF4 +line 1975 +;1975: } +LABELV $1154 +line 1978 +;1976: +;1977: // spin as it moves +;1978: if ( s1->pos.trType != TR_STATIONARY ) +ADDRLP4 212 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1159 +line 1979 +;1979: { +line 1980 +;1980: if ( s1->eFlags & EF_MISSILE_STICK ) +ADDRLP4 212 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 2097152 +BANDI4 +CNSTI4 0 +EQI4 $1161 +line 1981 +;1981: { +line 1982 +;1982: RotateAroundDirection( ent.axis, cg.time * 0.5f );//Did this so regular missiles don't get broken +ADDRLP4 0+12 +ARGP4 +CNSTF4 1056964608 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRGP4 RotateAroundDirection +CALLV +pop +line 1983 +;1983: } +ADDRGP4 $1153 +JUMPV +LABELV $1161 +line 1985 +;1984: else +;1985: { +line 1986 +;1986: RotateAroundDirection( ent.axis, cg.time * 0.25f );//JFM:FLOAT FIX +ADDRLP4 0+12 +ARGP4 +CNSTF4 1048576000 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRGP4 RotateAroundDirection +CALLV +pop +line 1987 +;1987: } +line 1988 +;1988: } +ADDRGP4 $1153 +JUMPV +LABELV $1159 +line 1990 +;1989: else +;1990: { +line 1991 +;1991: if ( s1->eFlags & EF_MISSILE_STICK ) +ADDRLP4 212 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 2097152 +BANDI4 +CNSTI4 0 +EQI4 $1167 +line 1992 +;1992: { +line 1993 +;1993: RotateAroundDirection( ent.axis, (float)s1->pos.trTime * 0.5f ); +ADDRLP4 0+12 +ARGP4 +CNSTF4 1056964608 +ADDRLP4 212 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRGP4 RotateAroundDirection +CALLV +pop +line 1994 +;1994: } +ADDRGP4 $1153 +JUMPV +LABELV $1167 +line 1996 +;1995: else +;1996: { +line 1997 +;1997: RotateAroundDirection( ent.axis, (float)s1->time ); +ADDRLP4 0+12 +ARGP4 +ADDRLP4 212 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 RotateAroundDirection +CALLV +pop +line 1998 +;1998: } +line 1999 +;1999: } +line 2000 +;2000: } +ADDRGP4 $1153 +JUMPV +LABELV $1152 +line 2002 +;2001: else +;2002: { +line 2003 +;2003: AnglesToAxis( cent->lerpAngles, ent.axis ); +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 2004 +;2004: } +LABELV $1153 +line 2006 +;2005: +;2006: if (s1->weapon == WP_SABER) +ADDRLP4 212 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1172 +line 2007 +;2007: { +line 2008 +;2008: ent.radius = s1->g2radius; +ADDRLP4 0+92 +ADDRLP4 212 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2009 +;2009: } +LABELV $1172 +line 2012 +;2010: +;2011: // add to refresh list, possibly with quad glow +;2012: CG_AddRefEntityWithPowerups( &ent, s1, TEAM_FREE ); +ADDRLP4 0 +ARGP4 +ADDRLP4 212 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_AddRefEntityWithPowerups +CALLV +pop +line 2014 +;2013: +;2014: if (s1->weapon == WP_SABER && cgs.gametype == GT_JEDIMASTER) +ADDRLP4 228 +CNSTI4 2 +ASGNI4 +ADDRLP4 212 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ADDRLP4 228 +INDIRI4 +NEI4 $1175 +ADDRGP4 cgs+32960 +INDIRI4 +ADDRLP4 228 +INDIRI4 +NEI4 $1175 +line 2015 +;2015: { //in jedimaster always make the saber glow when on the ground +line 2023 +;2016: vec3_t org; +;2017: float wv; +;2018: int i; +;2019: addspriteArgStruct_t fxSArgs; +;2020: //refEntity_t sRef; +;2021: //memcpy( &sRef, &ent, sizeof( sRef ) ); +;2022: +;2023: ent.customShader = cgs.media.solidWhite; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+564 +INDIRI4 +ASGNI4 +line 2024 +;2024: ent.renderfx = RF_RGB_TINT; +ADDRLP4 0+4 +CNSTI4 2048 +ASGNI4 +line 2025 +;2025: wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; +CNSTF4 994352038 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 324 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 320 +CNSTF4 1034147594 +ADDRLP4 324 +INDIRF4 +MULF4 +CNSTF4 1036831949 +ADDF4 +ASGNF4 +line 2026 +;2026: ent.shaderRGBA[0] = wv * 255; +ADDRLP4 332 +CNSTF4 1132396544 +ADDRLP4 320 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 336 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 332 +INDIRF4 +ADDRLP4 336 +INDIRF4 +LTF4 $1185 +ADDRLP4 328 +ADDRLP4 332 +INDIRF4 +ADDRLP4 336 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1186 +JUMPV +LABELV $1185 +ADDRLP4 328 +ADDRLP4 332 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1186 +ADDRLP4 0+80 +ADDRLP4 328 +INDIRU4 +CVUU1 4 +ASGNU1 +line 2027 +;2027: ent.shaderRGBA[1] = wv * 255; +ADDRLP4 344 +CNSTF4 1132396544 +ADDRLP4 320 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 348 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 344 +INDIRF4 +ADDRLP4 348 +INDIRF4 +LTF4 $1190 +ADDRLP4 340 +ADDRLP4 344 +INDIRF4 +ADDRLP4 348 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1191 +JUMPV +LABELV $1190 +ADDRLP4 340 +ADDRLP4 344 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1191 +ADDRLP4 0+80+1 +ADDRLP4 340 +INDIRU4 +CVUU1 4 +ASGNU1 +line 2028 +;2028: ent.shaderRGBA[2] = wv * 0; +ADDRLP4 356 +CNSTF4 0 +ADDRLP4 320 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 360 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 356 +INDIRF4 +ADDRLP4 360 +INDIRF4 +LTF4 $1195 +ADDRLP4 352 +ADDRLP4 356 +INDIRF4 +ADDRLP4 360 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1196 +JUMPV +LABELV $1195 +ADDRLP4 352 +ADDRLP4 356 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1196 +ADDRLP4 0+80+2 +ADDRLP4 352 +INDIRU4 +CVUU1 4 +ASGNU1 +line 2029 +;2029: trap_R_AddRefEntityToScene (&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 2031 +;2030: +;2031: for ( i = -4; i < 10; i += 1 ) +ADDRLP4 304 +CNSTI4 -4 +ASGNI4 +LABELV $1197 +line 2032 +;2032: { +line 2033 +;2033: VectorMA( ent.origin, -i, ent.axis[2], org ); +ADDRLP4 364 +ADDRLP4 304 +INDIRI4 +NEGI4 +CVIF4 4 +ASGNF4 +ADDRLP4 308 +ADDRLP4 0+52 +INDIRF4 +ADDRLP4 0+12+24 +INDIRF4 +ADDRLP4 364 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 308+4 +ADDRLP4 0+52+4 +INDIRF4 +ADDRLP4 0+12+24+4 +INDIRF4 +ADDRLP4 364 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 308+8 +ADDRLP4 0+52+8 +INDIRF4 +ADDRLP4 0+12+24+8 +INDIRF4 +ADDRLP4 304 +INDIRI4 +NEGI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 2035 +;2034: +;2035: VectorCopy(org, fxSArgs.origin); +ADDRLP4 232 +ADDRLP4 308 +INDIRB +ASGNB 12 +line 2036 +;2036: VectorClear(fxSArgs.vel); +ADDRLP4 368 +CNSTF4 0 +ASGNF4 +ADDRLP4 232+12+8 +ADDRLP4 368 +INDIRF4 +ASGNF4 +ADDRLP4 232+12+4 +ADDRLP4 368 +INDIRF4 +ASGNF4 +ADDRLP4 232+12 +ADDRLP4 368 +INDIRF4 +ASGNF4 +line 2037 +;2037: VectorClear(fxSArgs.accel); +ADDRLP4 372 +CNSTF4 0 +ASGNF4 +ADDRLP4 232+24+8 +ADDRLP4 372 +INDIRF4 +ASGNF4 +ADDRLP4 232+24+4 +ADDRLP4 372 +INDIRF4 +ASGNF4 +ADDRLP4 232+24 +ADDRLP4 372 +INDIRF4 +ASGNF4 +line 2038 +;2038: fxSArgs.scale = 5.5f; +ADDRLP4 232+36 +CNSTF4 1085276160 +ASGNF4 +line 2039 +;2039: fxSArgs.dscale = 5.5f; +ADDRLP4 232+40 +CNSTF4 1085276160 +ASGNF4 +line 2040 +;2040: fxSArgs.sAlpha = wv; +ADDRLP4 232+44 +ADDRLP4 320 +INDIRF4 +ASGNF4 +line 2041 +;2041: fxSArgs.eAlpha = wv; +ADDRLP4 232+48 +ADDRLP4 320 +INDIRF4 +ASGNF4 +line 2042 +;2042: fxSArgs.rotation = 0.0f; +ADDRLP4 232+52 +CNSTF4 0 +ASGNF4 +line 2043 +;2043: fxSArgs.bounce = 0.0f; +ADDRLP4 232+56 +CNSTF4 0 +ASGNF4 +line 2044 +;2044: fxSArgs.life = 1.0f; +ADDRLP4 232+60 +CNSTI4 1 +ASGNI4 +line 2045 +;2045: fxSArgs.shader = cgs.media.yellowDroppedSaberShader; +ADDRLP4 232+64 +ADDRGP4 cgs+70296+168 +INDIRI4 +ASGNI4 +line 2046 +;2046: fxSArgs.flags = 0x08000000; +ADDRLP4 232+68 +CNSTI4 134217728 +ASGNI4 +line 2049 +;2047: +;2048: //trap_FX_AddSprite( org, NULL, NULL, 5.5f, 5.5f, wv, wv, 0.0f, 0.0f, 1.0f, cgs.media.yellowSaberGlowShader, 0x08000000 ); +;2049: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 232 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 2050 +;2050: } +LABELV $1198 +line 2031 +ADDRLP4 304 +ADDRLP4 304 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 304 +INDIRI4 +CNSTI4 10 +LTI4 $1197 +line 2052 +;2051: +;2052: if (cgs.gametype == GT_JEDIMASTER) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 2 +NEI4 $1237 +line 2053 +;2053: { +line 2054 +;2054: ent.shaderRGBA[0] = 255; +ADDRLP4 0+80 +CNSTU1 255 +ASGNU1 +line 2055 +;2055: ent.shaderRGBA[1] = 255; +ADDRLP4 0+80+1 +CNSTU1 255 +ASGNU1 +line 2056 +;2056: ent.shaderRGBA[2] = 0; +ADDRLP4 0+80+2 +CNSTU1 0 +ASGNU1 +line 2058 +;2057: +;2058: ent.renderfx |= RF_DEPTHHACK; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 8 +BORI4 +ASGNI4 +line 2059 +;2059: ent.customShader = cgs.media.forceSightBubble; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+492 +INDIRI4 +ASGNI4 +line 2061 +;2060: +;2061: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 2062 +;2062: } +LABELV $1237 +line 2063 +;2063: } +LABELV $1175 +line 2065 +;2064: +;2065: if ( s1->eFlags & EF_FIRING ) +ADDRLP4 212 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $1249 +line 2066 +;2066: {//special code for adding the beam to the attached tripwire mine +line 2069 +;2067: vec3_t beamOrg; +;2068: +;2069: VectorMA( ent.origin, 8, ent.axis[0], beamOrg );// forward +ADDRLP4 244 +CNSTF4 1090519040 +ASGNF4 +ADDRLP4 232 +ADDRLP4 0+52 +INDIRF4 +ADDRLP4 244 +INDIRF4 +ADDRLP4 0+12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 232+4 +ADDRLP4 0+52+4 +INDIRF4 +ADDRLP4 244 +INDIRF4 +ADDRLP4 0+12+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 232+8 +ADDRLP4 0+52+8 +INDIRF4 +CNSTF4 1090519040 +ADDRLP4 0+12+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2070 +;2070: trap_FX_PlayEffect( "tripMine/laser.efx", beamOrg, ent.axis[0] ); +ADDRGP4 $1263 +ARGP4 +ADDRLP4 232 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 trap_FX_PlayEffect +CALLV +pop +line 2071 +;2071: } +LABELV $1249 +line 2072 +;2072:} +LABELV $1106 +endproc CG_Missile 376 28 +proc CG_Mover 216 12 +line 2079 +;2073: +;2074:/* +;2075:=============== +;2076:CG_Mover +;2077:=============== +;2078:*/ +;2079:static void CG_Mover( centity_t *cent ) { +line 2083 +;2080: refEntity_t ent; +;2081: entityState_t *s1; +;2082: +;2083: s1 = ¢->currentState; +ADDRLP4 212 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2086 +;2084: +;2085: // create the render entity +;2086: memset (&ent, 0, sizeof(ent)); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 2087 +;2087: VectorCopy( cent->lerpOrigin, ent.origin); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 2088 +;2088: VectorCopy( cent->lerpOrigin, ent.oldorigin); +ADDRLP4 0+64 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 2089 +;2089: AnglesToAxis( cent->lerpAngles, ent.axis ); +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 2091 +;2090: +;2091: ent.renderfx = RF_NOSHADOW; +ADDRLP4 0+4 +CNSTI4 64 +ASGNI4 +line 2096 +;2092:/* +;2093:Ghoul2 Insert Start +;2094:*/ +;2095: +;2096: CG_SetGhoul2Info(&ent, cent); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_SetGhoul2Info +CALLV +pop +line 2101 +;2097:/* +;2098:Ghoul2 Insert End +;2099:*/ +;2100: // flicker between two skins (FIXME?) +;2101: ent.skinNum = ( cg.time >> 6 ) & 1; +ADDRLP4 0+132 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 6 +RSHI4 +CNSTI4 1 +BANDI4 +ASGNI4 +line 2104 +;2102: +;2103: // get the model, either as a bmodel or a modelindex +;2104: if ( s1->solid == SOLID_BMODEL ) +ADDRLP4 212 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 16777215 +NEI4 $1272 +line 2105 +;2105: { +line 2106 +;2106: ent.hModel = cgs.inlineDrawModel[s1->modelindex]; +ADDRLP4 0+8 +ADDRLP4 212 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+38928 +ADDP4 +INDIRI4 +ASGNI4 +line 2107 +;2107: } +ADDRGP4 $1273 +JUMPV +LABELV $1272 +line 2109 +;2108: else +;2109: { +line 2110 +;2110: ent.hModel = cgs.gameModels[s1->modelindex]; +ADDRLP4 0+8 +ADDRLP4 212 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+36364 +ADDP4 +INDIRI4 +ASGNI4 +line 2111 +;2111: } +LABELV $1273 +line 2114 +;2112: +;2113: // add to refresh list +;2114: trap_R_AddRefEntityToScene(&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 2117 +;2115: +;2116: // add the secondary model +;2117: if ( s1->modelindex2 ) +ADDRLP4 212 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1278 +line 2118 +;2118: { +line 2119 +;2119: ent.skinNum = 0; +ADDRLP4 0+132 +CNSTI4 0 +ASGNI4 +line 2120 +;2120: ent.hModel = cgs.gameModels[s1->modelindex2]; +ADDRLP4 0+8 +ADDRLP4 212 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+36364 +ADDP4 +INDIRI4 +ASGNI4 +line 2121 +;2121: trap_R_AddRefEntityToScene(&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 2122 +;2122: } +LABELV $1278 +line 2124 +;2123: +;2124:} +LABELV $1265 +endproc CG_Mover 216 12 +export CG_Beam +proc CG_Beam 216 12 +line 2133 +;2125: +;2126:/* +;2127:=============== +;2128:CG_Beam +;2129: +;2130:Also called as an event +;2131:=============== +;2132:*/ +;2133:void CG_Beam( centity_t *cent ) { +line 2137 +;2134: refEntity_t ent; +;2135: entityState_t *s1; +;2136: +;2137: s1 = ¢->currentState; +ADDRLP4 212 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2140 +;2138: +;2139: // create the render entity +;2140: memset (&ent, 0, sizeof(ent)); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 2141 +;2141: VectorCopy( s1->pos.trBase, ent.origin ); +ADDRLP4 0+52 +ADDRLP4 212 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRB +ASGNB 12 +line 2142 +;2142: VectorCopy( s1->origin2, ent.oldorigin ); +ADDRLP4 0+64 +ADDRLP4 212 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRB +ASGNB 12 +line 2143 +;2143: AxisClear( ent.axis ); +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AxisClear +CALLV +pop +line 2144 +;2144: ent.reType = RT_BEAM; +ADDRLP4 0 +CNSTI4 4 +ASGNI4 +line 2146 +;2145: +;2146: ent.renderfx = RF_NOSHADOW; +ADDRLP4 0+4 +CNSTI4 64 +ASGNI4 +line 2150 +;2147:/* +;2148:Ghoul2 Insert Start +;2149:*/ +;2150: CG_SetGhoul2Info(&ent, cent); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_SetGhoul2Info +CALLV +pop +line 2156 +;2151: +;2152:/* +;2153:Ghoul2 Insert End +;2154:*/ +;2155: // add to refresh list +;2156: trap_R_AddRefEntityToScene(&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 2157 +;2157:} +LABELV $1283 +endproc CG_Beam 216 12 +proc CG_Portal 216 12 +line 2165 +;2158: +;2159: +;2160:/* +;2161:=============== +;2162:CG_Portal +;2163:=============== +;2164:*/ +;2165:static void CG_Portal( centity_t *cent ) { +line 2169 +;2166: refEntity_t ent; +;2167: entityState_t *s1; +;2168: +;2169: s1 = ¢->currentState; +ADDRLP4 212 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2172 +;2170: +;2171: // create the render entity +;2172: memset (&ent, 0, sizeof(ent)); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 2173 +;2173: VectorCopy( cent->lerpOrigin, ent.origin ); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 2174 +;2174: VectorCopy( s1->origin2, ent.oldorigin ); +ADDRLP4 0+64 +ADDRLP4 212 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRB +ASGNB 12 +line 2175 +;2175: ByteToDir( s1->eventParm, ent.axis[0] ); +ADDRLP4 212 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 ByteToDir +CALLV +pop +line 2176 +;2176: PerpendicularVector( ent.axis[1], ent.axis[0] ); +ADDRLP4 0+12+12 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 PerpendicularVector +CALLV +pop +line 2180 +;2177: +;2178: // negating this tends to get the directions like they want +;2179: // we really should have a camera roll value +;2180: VectorSubtract( vec3_origin, ent.axis[1], ent.axis[1] ); +ADDRLP4 0+12+12 +ADDRGP4 vec3_origin +INDIRF4 +ADDRLP4 0+12+12 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+12+12+4 +ADDRGP4 vec3_origin+4 +INDIRF4 +ADDRLP4 0+12+12+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+12+12+8 +ADDRGP4 vec3_origin+8 +INDIRF4 +ADDRLP4 0+12+12+8 +INDIRF4 +SUBF4 +ASGNF4 +line 2182 +;2181: +;2182: CrossProduct( ent.axis[0], ent.axis[1], ent.axis[2] ); +ADDRLP4 0+12 +ARGP4 +ADDRLP4 0+12+12 +ARGP4 +ADDRLP4 0+12+24 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 2183 +;2183: ent.reType = RT_PORTALSURFACE; +ADDRLP4 0 +CNSTI4 7 +ASGNI4 +line 2184 +;2184: ent.oldframe = s1->powerups; +ADDRLP4 0+124 +ADDRLP4 212 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +ASGNI4 +line 2185 +;2185: ent.frame = s1->frame; // rotation speed +ADDRLP4 0+104 +ADDRLP4 212 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRI4 +ASGNI4 +line 2186 +;2186: ent.skinNum = s1->clientNum/256.0 * 360; // roll offset +ADDRLP4 0+132 +CNSTF4 1135869952 +ADDRLP4 212 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +CVIF4 4 +CNSTF4 1132462080 +DIVF4 +MULF4 +CVFI4 4 +ASGNI4 +line 2190 +;2187:/* +;2188:Ghoul2 Insert Start +;2189:*/ +;2190: CG_SetGhoul2Info(&ent, cent); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_SetGhoul2Info +CALLV +pop +line 2195 +;2191:/* +;2192:Ghoul2 Insert End +;2193:*/ +;2194: // add to refresh list +;2195: trap_R_AddRefEntityToScene(&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 2196 +;2196:} +LABELV $1288 +endproc CG_Portal 216 12 +export CG_AdjustPositionForMover +proc CG_AdjustPositionForMover 88 12 +line 2206 +;2197: +;2198: +;2199:/* +;2200:========================= +;2201:CG_AdjustPositionForMover +;2202: +;2203:Also called by client movement prediction code +;2204:========================= +;2205:*/ +;2206:void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out ) { +line 2211 +;2207: centity_t *cent; +;2208: vec3_t oldOrigin, origin, deltaOrigin; +;2209: vec3_t oldAngles, angles, deltaAngles; +;2210: +;2211: if ( moverNum <= 0 || moverNum >= ENTITYNUM_MAX_NORMAL ) { +ADDRLP4 76 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +LEI4 $1324 +ADDRLP4 76 +INDIRI4 +CNSTI4 1022 +LTI4 $1322 +LABELV $1324 +line 2212 +;2212: VectorCopy( in, out ); +ADDRFP4 16 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 2213 +;2213: return; +ADDRGP4 $1321 +JUMPV +LABELV $1322 +line 2216 +;2214: } +;2215: +;2216: cent = &cg_entities[ moverNum ]; +ADDRLP4 0 +CNSTI4 1920 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 2217 +;2217: if ( cent->currentState.eType != ET_MOVER ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 6 +EQI4 $1325 +line 2218 +;2218: VectorCopy( in, out ); +ADDRFP4 16 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 2219 +;2219: return; +ADDRGP4 $1321 +JUMPV +LABELV $1325 +line 2222 +;2220: } +;2221: +;2222: BG_EvaluateTrajectory( ¢->currentState.pos, fromTime, oldOrigin ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 16 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 2223 +;2223: BG_EvaluateTrajectory( ¢->currentState.apos, fromTime, oldAngles ); +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 40 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 2225 +;2224: +;2225: BG_EvaluateTrajectory( ¢->currentState.pos, toTime, origin ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRLP4 28 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 2226 +;2226: BG_EvaluateTrajectory( ¢->currentState.apos, toTime, angles ); +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ARGP4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRLP4 52 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 2228 +;2227: +;2228: VectorSubtract( origin, oldOrigin, deltaOrigin ); +ADDRLP4 4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 16 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 4+4 +ADDRLP4 28+4 +INDIRF4 +ADDRLP4 16+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 4+8 +ADDRLP4 28+8 +INDIRF4 +ADDRLP4 16+8 +INDIRF4 +SUBF4 +ASGNF4 +line 2229 +;2229: VectorSubtract( angles, oldAngles, deltaAngles ); +ADDRLP4 64 +ADDRLP4 52 +INDIRF4 +ADDRLP4 40 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 64+4 +ADDRLP4 52+4 +INDIRF4 +ADDRLP4 40+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 64+8 +ADDRLP4 52+8 +INDIRF4 +ADDRLP4 40+8 +INDIRF4 +SUBF4 +ASGNF4 +line 2231 +;2230: +;2231: VectorAdd( in, deltaOrigin, out ); +ADDRFP4 16 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 80 +CNSTI4 4 +ASGNI4 +ADDRFP4 16 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 4+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 84 +CNSTI4 8 +ASGNI4 +ADDRFP4 16 +INDIRP4 +ADDRLP4 84 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 84 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 4+8 +INDIRF4 +ADDF4 +ASGNF4 +line 2234 +;2232: +;2233: // FIXME: origin change when on a rotating object +;2234:} +LABELV $1321 +endproc CG_AdjustPositionForMover 88 12 +proc LerpBoneAngleOverrides 0 0 +line 2240 +;2235: +;2236:/* +;2237:Ghoul2 Insert Start +;2238:*/ +;2239:static void LerpBoneAngleOverrides( centity_t *cent) +;2240:{ +line 2242 +;2241: +;2242:} +LABELV $1341 +endproc LerpBoneAngleOverrides 0 0 +proc CG_InterpolateEntityPosition 44 12 +line 2251 +;2243:/* +;2244:Ghoul2 Insert End +;2245:*/ +;2246:/* +;2247:============================= +;2248:CG_InterpolateEntityPosition +;2249:============================= +;2250:*/ +;2251:static void CG_InterpolateEntityPosition( centity_t *cent ) { +line 2257 +;2252: vec3_t current, next; +;2253: float f; +;2254: +;2255: // it would be an internal error to find an entity that interpolates without +;2256: // a snapshot ahead of the current one +;2257: if ( cg.nextSnap == NULL ) { +ADDRGP4 cg+40 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1343 +line 2258 +;2258: CG_Error( "CG_InterpoateEntityPosition: cg.nextSnap == NULL" ); +ADDRGP4 $1346 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 2259 +;2259: } +LABELV $1343 +line 2261 +;2260: +;2261: f = cg.frameInterpolation; +ADDRLP4 24 +ADDRGP4 cg+44 +INDIRF4 +ASGNF4 +line 2265 +;2262: +;2263: // this will linearize a sine or parabolic curve, but it is important +;2264: // to not extrapolate player positions if more recent data is available +;2265: BG_EvaluateTrajectory( ¢->currentState.pos, cg.snap->serverTime, current ); +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 2266 +;2266: BG_EvaluateTrajectory( ¢->nextState.pos, cg.nextSnap->serverTime, next ); +ADDRFP4 0 +INDIRP4 +CNSTI4 308 +ADDP4 +ARGP4 +ADDRGP4 cg+40 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 12 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 2268 +;2267: +;2268: cent->lerpOrigin[0] = current[0] + f * ( next[0] - current[0] ); +ADDRLP4 28 +ADDRLP4 0 +INDIRF4 +ASGNF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 24 +INDIRF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 28 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 2269 +;2269: cent->lerpOrigin[1] = current[1] + f * ( next[1] - current[1] ); +ADDRFP4 0 +INDIRP4 +CNSTI4 932 +ADDP4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +ADDRLP4 12+4 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 2270 +;2270: cent->lerpOrigin[2] = current[2] + f * ( next[2] - current[2] ); +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 24 +INDIRF4 +ADDRLP4 12+8 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 2272 +;2271: +;2272: BG_EvaluateTrajectory( ¢->currentState.apos, cg.snap->serverTime, current ); +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 2273 +;2273: BG_EvaluateTrajectory( ¢->nextState.apos, cg.nextSnap->serverTime, next ); +ADDRFP4 0 +INDIRP4 +CNSTI4 344 +ADDP4 +ARGP4 +ADDRGP4 cg+40 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 12 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 2275 +;2274: +;2275: cent->lerpAngles[0] = LerpAngle( current[0], next[0], f ); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRLP4 32 +ADDRGP4 LerpAngle +CALLF4 +ASGNF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 2276 +;2276: cent->lerpAngles[1] = LerpAngle( current[1], next[1], f ); +ADDRLP4 0+4 +INDIRF4 +ARGF4 +ADDRLP4 12+4 +INDIRF4 +ARGF4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRLP4 36 +ADDRGP4 LerpAngle +CALLF4 +ASGNF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 944 +ADDP4 +ADDRLP4 36 +INDIRF4 +ASGNF4 +line 2277 +;2277: cent->lerpAngles[2] = LerpAngle( current[2], next[2], f ); +ADDRLP4 0+8 +INDIRF4 +ARGF4 +ADDRLP4 12+8 +INDIRF4 +ARGF4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRLP4 40 +ADDRGP4 LerpAngle +CALLF4 +ASGNF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 948 +ADDP4 +ADDRLP4 40 +INDIRF4 +ASGNF4 +line 2283 +;2278:/* +;2279:Ghoul2 Insert Start +;2280:*/ +;2281: // now the nasty stuff - this will interpolate all ghoul2 models bone angle overrides per model attached to this cent +;2282:// if (cent->currentState.ghoul2.size()) +;2283: { +line 2284 +;2284: LerpBoneAngleOverrides(cent); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 LerpBoneAngleOverrides +CALLV +pop +line 2285 +;2285: } +line 2289 +;2286:/* +;2287:Ghoul2 Insert End +;2288:*/ +;2289:} +LABELV $1342 +endproc CG_InterpolateEntityPosition 44 12 +export CG_CalcEntityLerpPositions +proc CG_CalcEntityLerpPositions 24 20 +line 2297 +;2290: +;2291:/* +;2292:=============== +;2293:CG_CalcEntityLerpPositions +;2294: +;2295:=============== +;2296:*/ +;2297:void CG_CalcEntityLerpPositions( centity_t *cent ) { +line 2300 +;2298: +;2299: // if this player does not want to see extrapolated players +;2300: if ( !cg_smoothClients.integer ) { +ADDRGP4 cg_smoothClients+12 +INDIRI4 +CNSTI4 0 +NEI4 $1363 +line 2302 +;2301: // make sure the clients use TR_INTERPOLATE +;2302: if ( cent->currentState.number < MAX_CLIENTS ) { +ADDRFP4 0 +INDIRP4 +INDIRI4 +CNSTI4 32 +GEI4 $1366 +line 2303 +;2303: cent->currentState.pos.trType = TR_INTERPOLATE; +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2304 +;2304: cent->nextState.pos.trType = TR_INTERPOLATE; +ADDRFP4 0 +INDIRP4 +CNSTI4 308 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2305 +;2305: } +LABELV $1366 +line 2306 +;2306: } +LABELV $1363 +line 2308 +;2307: +;2308: if ( cent->interpolate && cent->currentState.pos.trType == TR_INTERPOLATE ) { +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 592 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1368 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1368 +line 2309 +;2309: CG_InterpolateEntityPosition( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_InterpolateEntityPosition +CALLV +pop +line 2310 +;2310: return; +ADDRGP4 $1362 +JUMPV +LABELV $1368 +line 2315 +;2311: } +;2312: +;2313: // first see if we can interpolate between two snaps for +;2314: // linear extrapolated clients +;2315: if ( cent->interpolate && cent->currentState.pos.trType == TR_LINEAR_STOP && +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 592 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1370 +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1370 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 32 +GEI4 $1370 +line 2316 +;2316: cent->currentState.number < MAX_CLIENTS) { +line 2317 +;2317: CG_InterpolateEntityPosition( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_InterpolateEntityPosition +CALLV +pop +line 2318 +;2318: return; +ADDRGP4 $1362 +JUMPV +LABELV $1370 +line 2322 +;2319: } +;2320: +;2321: // just use the current frame and evaluate as best we can +;2322: BG_EvaluateTrajectory( ¢->currentState.pos, cg.time, cent->lerpOrigin ); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 2323 +;2323: BG_EvaluateTrajectory( ¢->currentState.apos, cg.time, cent->lerpAngles ); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 48 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 940 +ADDP4 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 2327 +;2324: +;2325: // adjust for riding a mover if it wasn't rolled into the predicted +;2326: // player state +;2327: if ( cent != &cg.predictedPlayerEntity ) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +ADDRGP4 cg+1476 +CVPU4 4 +EQU4 $1374 +line 2328 +;2328: CG_AdjustPositionForMover( cent->lerpOrigin, cent->currentState.groundEntityNum, +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 16 +INDIRP4 +CNSTI4 928 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRGP4 CG_AdjustPositionForMover +CALLV +pop +line 2330 +;2329: cg.snap->serverTime, cg.time, cent->lerpOrigin ); +;2330: } +LABELV $1374 +line 2336 +;2331:/* +;2332:Ghoul2 Insert Start +;2333:*/ +;2334: // now the nasty stuff - this will interpolate all ghoul2 models bone angle overrides per model attached to this cent +;2335:// if (cent->currentState.ghoul2.size()) +;2336: { +line 2337 +;2337: LerpBoneAngleOverrides(cent); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 LerpBoneAngleOverrides +CALLV +pop +line 2338 +;2338: } +line 2342 +;2339:/* +;2340:Ghoul2 Insert End +;2341:*/ +;2342:} +LABELV $1362 +endproc CG_CalcEntityLerpPositions 24 20 +proc CG_TeamBase 212 12 +line 2349 +;2343: +;2344:/* +;2345:=============== +;2346:CG_TeamBase +;2347:=============== +;2348:*/ +;2349:static void CG_TeamBase( centity_t *cent ) { +line 2351 +;2350: refEntity_t model; +;2351: if ( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +EQI4 $1384 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $1380 +LABELV $1384 +line 2353 +;2352: // show the flag base +;2353: memset(&model, 0, sizeof(model)); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 2354 +;2354: model.reType = RT_MODEL; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 2355 +;2355: VectorCopy( cent->lerpOrigin, model.lightingOrigin ); +ADDRLP4 0+108 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 2356 +;2356: VectorCopy( cent->lerpOrigin, model.origin ); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 2357 +;2357: AnglesToAxis( cent->currentState.angles, model.axis ); +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 2358 +;2358: if ( cent->currentState.modelindex == TEAM_RED ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1388 +line 2359 +;2359: model.hModel = cgs.media.redFlagBaseModel; +ADDRLP4 0+8 +ADDRGP4 cgs+70296+84 +INDIRI4 +ASGNI4 +line 2360 +;2360: } +ADDRGP4 $1389 +JUMPV +LABELV $1388 +line 2361 +;2361: else if ( cent->currentState.modelindex == TEAM_BLUE ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1393 +line 2362 +;2362: model.hModel = cgs.media.blueFlagBaseModel; +ADDRLP4 0+8 +ADDRGP4 cgs+70296+88 +INDIRI4 +ASGNI4 +line 2363 +;2363: } +ADDRGP4 $1394 +JUMPV +LABELV $1393 +line 2364 +;2364: else { +line 2365 +;2365: model.hModel = cgs.media.neutralFlagBaseModel; +ADDRLP4 0+8 +ADDRGP4 cgs+70296+92 +INDIRI4 +ASGNI4 +line 2366 +;2366: } +LABELV $1394 +LABELV $1389 +line 2368 +;2367: +;2368: if (cent->currentState.eType != ET_GRAPPLE) +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 13 +EQI4 $1401 +line 2369 +;2369: { //do not do this for g2animents +line 2370 +;2370: trap_R_AddRefEntityToScene( &model ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 2371 +;2371: } +LABELV $1401 +line 2372 +;2372: } +LABELV $1380 +line 2373 +;2373:} +LABELV $1379 +endproc CG_TeamBase 212 12 +proc CG_AddCEntity 12 12 +line 2383 +;2374: +;2375:void CG_G2Animated( centity_t *cent ); +;2376: +;2377:/* +;2378:=============== +;2379:CG_AddCEntity +;2380: +;2381:=============== +;2382:*/ +;2383:static void CG_AddCEntity( centity_t *cent ) { +line 2385 +;2384: // event-only entities will have been dealt with already +;2385: if ( cent->currentState.eType >= ET_EVENTS ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 16 +LTI4 $1404 +line 2386 +;2386: return; +ADDRGP4 $1403 +JUMPV +LABELV $1404 +line 2390 +;2387: } +;2388: +;2389: // calculate the current origin +;2390: CG_CalcEntityLerpPositions( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_CalcEntityLerpPositions +CALLV +pop +line 2393 +;2391: +;2392: // add automatic effects +;2393: CG_EntityEffects( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_EntityEffects +CALLV +pop +line 2399 +;2394:/* +;2395:Ghoul2 Insert Start +;2396:*/ +;2397: +;2398: // do this before we copy the data to refEnts +;2399: if (trap_G2_HaveWeGhoul2Models(cent->ghoul2)) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $1406 +line 2400 +;2400: { +line 2401 +;2401: trap_G2_SetGhoul2ModelIndexes(cent->ghoul2, cgs.gameModels, cgs.skins); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRGP4 cgs+38668 +ARGP4 +ADDRGP4 trap_G2_SetGhoul2ModelIndexes +CALLV +pop +line 2402 +;2402: } +LABELV $1406 +line 2407 +;2403: +;2404:/* +;2405:Ghoul2 Insert End +;2406:*/ +;2407: switch ( cent->currentState.eType ) { +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +LTI4 $1410 +ADDRLP4 4 +INDIRI4 +CNSTI4 15 +GTI4 $1410 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1428 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1428 +address $1415 +address $1416 +address $1417 +address $1418 +address $1419 +address $1420 +address $1421 +address $1422 +address $1423 +address $1424 +address $1411 +address $1411 +address $1411 +address $1425 +address $1426 +address $1427 +code +LABELV $1410 +line 2409 +;2408: default: +;2409: CG_Error( "Bad entity type: %i\n", cent->currentState.eType ); +ADDRGP4 $1413 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_Error +CALLV +pop +line 2410 +;2410: break; +ADDRGP4 $1411 +JUMPV +line 2414 +;2411: case ET_INVISIBLE: +;2412: case ET_PUSH_TRIGGER: +;2413: case ET_TELEPORT_TRIGGER: +;2414: break; +LABELV $1415 +line 2416 +;2415: case ET_GENERAL: +;2416: CG_General( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_General +CALLV +pop +line 2417 +;2417: break; +ADDRGP4 $1411 +JUMPV +LABELV $1416 +line 2419 +;2418: case ET_PLAYER: +;2419: CG_Player( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_Player +CALLV +pop +line 2420 +;2420: break; +ADDRGP4 $1411 +JUMPV +LABELV $1417 +line 2422 +;2421: case ET_ITEM: +;2422: CG_Item( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_Item +CALLV +pop +line 2423 +;2423: break; +ADDRGP4 $1411 +JUMPV +LABELV $1418 +line 2425 +;2424: case ET_MISSILE: +;2425: CG_Missile( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_Missile +CALLV +pop +line 2426 +;2426: break; +ADDRGP4 $1411 +JUMPV +LABELV $1419 +line 2428 +;2427: case ET_SPECIAL: +;2428: CG_Special( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_Special +CALLV +pop +line 2429 +;2429: break; +ADDRGP4 $1411 +JUMPV +LABELV $1420 +line 2431 +;2430: case ET_HOLOCRON: +;2431: CG_General( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_General +CALLV +pop +line 2432 +;2432: break; +ADDRGP4 $1411 +JUMPV +LABELV $1421 +line 2434 +;2433: case ET_MOVER: +;2434: CG_Mover( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_Mover +CALLV +pop +line 2435 +;2435: break; +ADDRGP4 $1411 +JUMPV +LABELV $1422 +line 2437 +;2436: case ET_BEAM: +;2437: CG_Beam( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_Beam +CALLV +pop +line 2438 +;2438: break; +ADDRGP4 $1411 +JUMPV +LABELV $1423 +line 2440 +;2439: case ET_PORTAL: +;2440: CG_Portal( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_Portal +CALLV +pop +line 2441 +;2441: break; +ADDRGP4 $1411 +JUMPV +LABELV $1424 +line 2443 +;2442: case ET_SPEAKER: +;2443: CG_Speaker( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_Speaker +CALLV +pop +line 2444 +;2444: break; +ADDRGP4 $1411 +JUMPV +LABELV $1425 +line 2446 +;2445: case ET_GRAPPLE: //An entity that wants to be able to use ghoul2 humanoid anims. Like a player, but not. +;2446: CG_G2Animated( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_G2Animated +CALLV +pop +LABELV $1426 +line 2448 +;2447: case ET_TEAM: +;2448: CG_TeamBase( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_TeamBase +CALLV +pop +line 2449 +;2449: break; +ADDRGP4 $1411 +JUMPV +LABELV $1427 +line 2451 +;2450: case ET_BODY: +;2451: CG_General( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_General +CALLV +pop +line 2452 +;2452: break; +LABELV $1411 +line 2454 +;2453: } +;2454:} +LABELV $1403 +endproc CG_AddCEntity 12 12 +export CG_ManualEntityRender +proc CG_ManualEntityRender 0 4 +line 2457 +;2455: +;2456:void CG_ManualEntityRender(centity_t *cent) +;2457:{ +line 2458 +;2458: CG_AddCEntity(cent); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddCEntity +CALLV +pop +line 2459 +;2459:} +LABELV $1429 +endproc CG_ManualEntityRender 0 4 +export CG_AddPacketEntities +proc CG_AddPacketEntities 20 12 +line 2467 +;2460: +;2461:/* +;2462:=============== +;2463:CG_AddPacketEntities +;2464: +;2465:=============== +;2466:*/ +;2467:void CG_AddPacketEntities( void ) { +line 2473 +;2468: int num; +;2469: centity_t *cent; +;2470: playerState_t *ps; +;2471: +;2472: // set cg.frameInterpolation +;2473: if ( cg.nextSnap ) { +ADDRGP4 cg+40 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1431 +line 2476 +;2474: int delta; +;2475: +;2476: delta = (cg.nextSnap->serverTime - cg.snap->serverTime); +ADDRLP4 16 +CNSTI4 8 +ASGNI4 +ADDRLP4 12 +ADDRGP4 cg+40 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 2477 +;2477: if ( delta == 0 ) { +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $1436 +line 2478 +;2478: cg.frameInterpolation = 0; +ADDRGP4 cg+44 +CNSTF4 0 +ASGNF4 +line 2479 +;2479: } else { +ADDRGP4 $1432 +JUMPV +LABELV $1436 +line 2480 +;2480: cg.frameInterpolation = (float)( cg.time - cg.snap->serverTime ) / delta; +ADDRGP4 cg+44 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 2481 +;2481: } +line 2482 +;2482: } else { +ADDRGP4 $1432 +JUMPV +LABELV $1431 +line 2483 +;2483: cg.frameInterpolation = 0; // actually, it should never be used, because +ADDRGP4 cg+44 +CNSTF4 0 +ASGNF4 +line 2485 +;2484: // no entities should be marked as interpolating +;2485: } +LABELV $1432 +line 2488 +;2486: +;2487: // the auto-rotating items will all have the same axis +;2488: cg.autoAngles[0] = 0; +ADDRGP4 cg+3520 +CNSTF4 0 +ASGNF4 +line 2489 +;2489: cg.autoAngles[1] = ( cg.time & 2047 ) * 360 / 2048.0; +ADDRGP4 cg+3520+4 +CNSTI4 360 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 2047 +BANDI4 +MULI4 +CVIF4 4 +CNSTF4 1157627904 +DIVF4 +ASGNF4 +line 2490 +;2490: cg.autoAngles[2] = 0; +ADDRGP4 cg+3520+8 +CNSTF4 0 +ASGNF4 +line 2492 +;2491: +;2492: cg.autoAnglesFast[0] = 0; +ADDRGP4 cg+3568 +CNSTF4 0 +ASGNF4 +line 2493 +;2493: cg.autoAnglesFast[1] = ( cg.time & 1023 ) * 360 / 1024.0f; +ADDRGP4 cg+3568+4 +CNSTI4 360 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1023 +BANDI4 +MULI4 +CVIF4 4 +CNSTF4 1149239296 +DIVF4 +ASGNF4 +line 2494 +;2494: cg.autoAnglesFast[2] = 0; +ADDRGP4 cg+3568+8 +CNSTF4 0 +ASGNF4 +line 2496 +;2495: +;2496: AnglesToAxis( cg.autoAngles, cg.autoAxis ); +ADDRGP4 cg+3520 +ARGP4 +ADDRGP4 cg+3532 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 2497 +;2497: AnglesToAxis( cg.autoAnglesFast, cg.autoAxisFast ); +ADDRGP4 cg+3568 +ARGP4 +ADDRGP4 cg+3580 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 2500 +;2498: +;2499: // generate and add the entity from the playerstate +;2500: ps = &cg.predictedPlayerState; +ADDRLP4 8 +ADDRGP4 cg+96 +ASGNP4 +line 2506 +;2501: +;2502: //rww - update the g2 pointer BEFORE the weapons, otherwise bad things could happen +;2503: //FIXME: These two pointers seem to differ sometimes, they shouldn't, should they? +;2504: //the one on predictedPlayerEntity also seems to often be invalid, so it can't be +;2505: //reliably checked and cleared. +;2506: cg.predictedPlayerEntity.ghoul2 = cg_entities[ cg.snap->ps.clientNum].ghoul2; +ADDRGP4 cg+1476+952 +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +ASGNP4 +line 2507 +;2507: CG_CheckPlayerG2Weapons(ps, &cg.predictedPlayerEntity); +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRGP4 cg+1476 +ARGP4 +ADDRGP4 CG_CheckPlayerG2Weapons +CALLV +pop +line 2508 +;2508: BG_PlayerStateToEntityState( ps, &cg.predictedPlayerEntity.currentState, qfalse ); +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRGP4 cg+1476 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 BG_PlayerStateToEntityState +CALLV +pop +line 2511 +;2509: +;2510: // add in the Ghoul2 stuff. +;2511: VectorCopy( cg_entities[ cg.snap->ps.clientNum].modelScale, cg.predictedPlayerEntity.modelScale); +ADDRGP4 cg+1476+964 +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+964 +ADDP4 +INDIRB +ASGNB 12 +line 2512 +;2512: cg.predictedPlayerEntity.radius = cg_entities[ cg.snap->ps.clientNum].radius; +ADDRGP4 cg+1476+976 +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+976 +ADDP4 +INDIRF4 +ASGNF4 +line 2514 +;2513: +;2514: CG_AddCEntity( &cg.predictedPlayerEntity ); +ADDRGP4 cg+1476 +ARGP4 +ADDRGP4 CG_AddCEntity +CALLV +pop +line 2517 +;2515: +;2516: // lerp the non-predicted value for lightning gun origins +;2517: CG_CalcEntityLerpPositions( &cg_entities[ cg.snap->ps.clientNum ] ); +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +ADDRGP4 CG_CalcEntityLerpPositions +CALLV +pop +line 2520 +;2518: +;2519: // add each entity sent over by the server +;2520: for ( num = 0 ; num < cg.snap->numEntities ; num++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1479 +JUMPV +LABELV $1476 +line 2522 +;2521: // Don't re-add ents that have been predicted. +;2522: if (cg.snap->entities[ num ].number != cg.snap->ps.clientNum) +CNSTI4 296 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1428 +ADDP4 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $1481 +line 2523 +;2523: { +line 2524 +;2524: cent = &cg_entities[ cg.snap->entities[ num ].number ]; +ADDRLP4 4 +CNSTI4 1920 +CNSTI4 296 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1428 +ADDP4 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 2525 +;2525: CG_AddCEntity( cent ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddCEntity +CALLV +pop +line 2526 +;2526: } +LABELV $1481 +line 2527 +;2527: } +LABELV $1477 +line 2520 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1479 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1424 +ADDP4 +INDIRI4 +LTI4 $1476 +line 2528 +;2528:} +LABELV $1430 +endproc CG_AddPacketEntities 20 12 +export CG_ROFF_NotetrackCallback +proc CG_ROFF_NotetrackCallback 1736 16 +line 2531 +;2529: +;2530:void CG_ROFF_NotetrackCallback( centity_t *cent, const char *notetrack) +;2531:{ +line 2532 +;2532: int i = 0, r = 0, objectID = 0, anglesGathered = 0, posoffsetGathered = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRLP4 516 +CNSTI4 0 +ASGNI4 +ADDRLP4 1372 +CNSTI4 0 +ASGNI4 +ADDRLP4 1368 +CNSTI4 0 +ASGNI4 +ADDRLP4 584 +CNSTI4 0 +ASGNI4 +line 2538 +;2533: char type[256]; +;2534: char argument[512]; +;2535: char addlArg[512]; +;2536: char errMsg[256]; +;2537: char t[64]; +;2538: int addlArgs = 0; +ADDRLP4 1388 +CNSTI4 0 +ASGNI4 +line 2541 +;2539: vec3_t parsedAngles, parsedOffset, useAngles, useOrigin, forward, right, up; +;2540: +;2541: if (!cent || !notetrack) +ADDRLP4 1708 +CNSTU4 0 +ASGNU4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 1708 +INDIRU4 +EQU4 $1489 +ADDRFP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 1708 +INDIRU4 +NEU4 $1491 +LABELV $1489 +line 2542 +;2542: { +line 2543 +;2543: return; +ADDRGP4 $1486 +JUMPV +LABELV $1490 +line 2549 +;2544: } +;2545: +;2546: //notetrack = "effect effects/explosion1.efx 0+0+64 0-0-1"; +;2547: +;2548: while (notetrack[i] && notetrack[i] != ' ') +;2549: { +line 2550 +;2550: type[i] = notetrack[i]; +ADDRLP4 0 +INDIRI4 +ADDRLP4 600 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 2551 +;2551: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2552 +;2552: } +LABELV $1491 +line 2548 +ADDRLP4 1712 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 1712 +INDIRI4 +CNSTI4 0 +EQI4 $1493 +ADDRLP4 1712 +INDIRI4 +CNSTI4 32 +NEI4 $1490 +LABELV $1493 +line 2554 +;2553: +;2554: type[i] = '\0'; +ADDRLP4 0 +INDIRI4 +ADDRLP4 600 +ADDP4 +CNSTI1 0 +ASGNI1 +line 2556 +;2555: +;2556: if (notetrack[i] != ' ') +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 32 +EQI4 $1494 +line 2557 +;2557: { //didn't pass in a valid notetrack type, or forgot the argument for it +line 2558 +;2558: return; +ADDRGP4 $1486 +JUMPV +LABELV $1494 +line 2561 +;2559: } +;2560: +;2561: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRGP4 $1497 +JUMPV +LABELV $1496 +line 2564 +;2562: +;2563: while (notetrack[i] && notetrack[i] != ' ') +;2564: { +line 2565 +;2565: argument[r] = notetrack[i]; +ADDRLP4 516 +INDIRI4 +ADDRLP4 856 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 2566 +;2566: r++; +ADDRLP4 516 +ADDRLP4 516 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2567 +;2567: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2568 +;2568: } +LABELV $1497 +line 2563 +ADDRLP4 1716 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 1716 +INDIRI4 +CNSTI4 0 +EQI4 $1499 +ADDRLP4 1716 +INDIRI4 +CNSTI4 32 +NEI4 $1496 +LABELV $1499 +line 2569 +;2569: argument[r] = '\0'; +ADDRLP4 516 +INDIRI4 +ADDRLP4 856 +ADDP4 +CNSTI1 0 +ASGNI1 +line 2571 +;2570: +;2571: if (!r) +ADDRLP4 516 +INDIRI4 +CNSTI4 0 +NEI4 $1500 +line 2572 +;2572: { +line 2573 +;2573: return; +ADDRGP4 $1486 +JUMPV +LABELV $1500 +line 2576 +;2574: } +;2575: +;2576: if (notetrack[i] == ' ') +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 32 +NEI4 $1502 +line 2577 +;2577: { //additional arguments... +line 2578 +;2578: addlArgs = 1; +ADDRLP4 1388 +CNSTI4 1 +ASGNI4 +line 2580 +;2579: +;2580: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2581 +;2581: r = 0; +ADDRLP4 516 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1505 +JUMPV +LABELV $1504 +line 2583 +;2582: while (notetrack[i]) +;2583: { +line 2584 +;2584: addlArg[r] = notetrack[i]; +ADDRLP4 516 +INDIRI4 +ADDRLP4 4 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 2585 +;2585: r++; +ADDRLP4 516 +ADDRLP4 516 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2586 +;2586: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2587 +;2587: } +LABELV $1505 +line 2582 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1504 +line 2588 +;2588: addlArg[r] = '\0'; +ADDRLP4 516 +INDIRI4 +ADDRLP4 4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 2589 +;2589: } +LABELV $1502 +line 2591 +;2590: +;2591: if (strcmp(type, "effect") == 0) +ADDRLP4 600 +ARGP4 +ADDRGP4 $1509 +ARGP4 +ADDRLP4 1720 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 1720 +INDIRI4 +CNSTI4 0 +NEI4 $1507 +line 2592 +;2592: { +line 2593 +;2593: if (!addlArgs) +ADDRLP4 1388 +INDIRI4 +CNSTI4 0 +NEI4 $1510 +line 2594 +;2594: { +line 2597 +;2595: //sprintf(errMsg, "Offset position argument for 'effect' type is invalid."); +;2596: //goto functionend; +;2597: VectorClear(parsedOffset); +ADDRLP4 1724 +CNSTF4 0 +ASGNF4 +ADDRLP4 588+8 +ADDRLP4 1724 +INDIRF4 +ASGNF4 +ADDRLP4 588+4 +ADDRLP4 1724 +INDIRF4 +ASGNF4 +ADDRLP4 588 +ADDRLP4 1724 +INDIRF4 +ASGNF4 +line 2598 +;2598: goto defaultoffsetposition; +ADDRGP4 $1514 +JUMPV +LABELV $1510 +line 2601 +;2599: } +;2600: +;2601: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1516 +JUMPV +LABELV $1515 +line 2604 +;2602: +;2603: while (posoffsetGathered < 3) +;2604: { +line 2605 +;2605: r = 0; +ADDRLP4 516 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1519 +JUMPV +LABELV $1518 +line 2607 +;2606: while (addlArg[i] && addlArg[i] != '+' && addlArg[i] != ' ') +;2607: { +line 2608 +;2608: t[r] = addlArg[i]; +ADDRLP4 516 +INDIRI4 +ADDRLP4 520 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRI1 +ASGNI1 +line 2609 +;2609: r++; +ADDRLP4 516 +ADDRLP4 516 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2610 +;2610: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2611 +;2611: } +LABELV $1519 +line 2606 +ADDRLP4 1724 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 1724 +INDIRI4 +CNSTI4 0 +EQI4 $1522 +ADDRLP4 1724 +INDIRI4 +CNSTI4 43 +EQI4 $1522 +ADDRLP4 1724 +INDIRI4 +CNSTI4 32 +NEI4 $1518 +LABELV $1522 +line 2612 +;2612: t[r] = '\0'; +ADDRLP4 516 +INDIRI4 +ADDRLP4 520 +ADDP4 +CNSTI1 0 +ASGNI1 +line 2613 +;2613: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2614 +;2614: if (!r) +ADDRLP4 516 +INDIRI4 +CNSTI4 0 +NEI4 $1523 +line 2615 +;2615: { //failure.. +line 2618 +;2616: //sprintf(errMsg, "Offset position argument for 'effect' type is invalid."); +;2617: //goto functionend; +;2618: VectorClear(parsedOffset); +ADDRLP4 1728 +CNSTF4 0 +ASGNF4 +ADDRLP4 588+8 +ADDRLP4 1728 +INDIRF4 +ASGNF4 +ADDRLP4 588+4 +ADDRLP4 1728 +INDIRF4 +ASGNF4 +ADDRLP4 588 +ADDRLP4 1728 +INDIRF4 +ASGNF4 +line 2619 +;2619: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 2620 +;2620: goto defaultoffsetposition; +ADDRGP4 $1514 +JUMPV +LABELV $1523 +line 2622 +;2621: } +;2622: parsedOffset[posoffsetGathered] = atof(t); +ADDRLP4 520 +ARGP4 +ADDRLP4 1728 +ADDRGP4 atof +CALLF4 +ASGNF4 +ADDRLP4 584 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 588 +ADDP4 +ADDRLP4 1728 +INDIRF4 +ASGNF4 +line 2623 +;2623: posoffsetGathered++; +ADDRLP4 584 +ADDRLP4 584 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2624 +;2624: } +LABELV $1516 +line 2603 +ADDRLP4 584 +INDIRI4 +CNSTI4 3 +LTI4 $1515 +line 2626 +;2625: +;2626: if (posoffsetGathered < 3) +ADDRLP4 584 +INDIRI4 +CNSTI4 3 +GEI4 $1527 +line 2627 +;2627: { +line 2628 +;2628: Com_sprintf(errMsg, sizeof(errMsg), "Offset position argument for 'effect' type is invalid."); +ADDRLP4 1392 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 $1529 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 2629 +;2629: goto functionend; +ADDRGP4 $1530 +JUMPV +LABELV $1527 +line 2632 +;2630: } +;2631: +;2632: i--; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2634 +;2633: +;2634: if (addlArg[i] != ' ') +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 32 +EQI4 $1531 +line 2635 +;2635: { +line 2636 +;2636: addlArgs = 0; +ADDRLP4 1388 +CNSTI4 0 +ASGNI4 +line 2637 +;2637: } +LABELV $1531 +LABELV $1514 +line 2641 +;2638: +;2639:defaultoffsetposition: +;2640: +;2641: objectID = trap_FX_RegisterEffect(argument); +ADDRLP4 856 +ARGP4 +ADDRLP4 1724 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 1372 +ADDRLP4 1724 +INDIRI4 +ASGNI4 +line 2643 +;2642: +;2643: if (objectID) +ADDRLP4 1372 +INDIRI4 +CNSTI4 0 +EQI4 $1486 +line 2644 +;2644: { +line 2645 +;2645: if (addlArgs) +ADDRLP4 1388 +INDIRI4 +CNSTI4 0 +EQI4 $1535 +line 2646 +;2646: { //if there is an additional argument for an effect it is expected to be XANGLE-YANGLE-ZANGLE +line 2647 +;2647: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRGP4 $1538 +JUMPV +LABELV $1537 +line 2649 +;2648: while (anglesGathered < 3) +;2649: { +line 2650 +;2650: r = 0; +ADDRLP4 516 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1541 +JUMPV +LABELV $1540 +line 2652 +;2651: while (addlArg[i] && addlArg[i] != '-') +;2652: { +line 2653 +;2653: t[r] = addlArg[i]; +ADDRLP4 516 +INDIRI4 +ADDRLP4 520 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRI1 +ASGNI1 +line 2654 +;2654: r++; +ADDRLP4 516 +ADDRLP4 516 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2655 +;2655: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2656 +;2656: } +LABELV $1541 +line 2651 +ADDRLP4 1728 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 1728 +INDIRI4 +CNSTI4 0 +EQI4 $1543 +ADDRLP4 1728 +INDIRI4 +CNSTI4 45 +NEI4 $1540 +LABELV $1543 +line 2657 +;2657: t[r] = '\0'; +ADDRLP4 516 +INDIRI4 +ADDRLP4 520 +ADDP4 +CNSTI1 0 +ASGNI1 +line 2658 +;2658: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2660 +;2659: +;2660: if (!r) +ADDRLP4 516 +INDIRI4 +CNSTI4 0 +NEI4 $1544 +line 2661 +;2661: { //failed to get a new part of the vector +line 2662 +;2662: anglesGathered = 0; +ADDRLP4 1368 +CNSTI4 0 +ASGNI4 +line 2663 +;2663: break; +ADDRGP4 $1539 +JUMPV +LABELV $1544 +line 2666 +;2664: } +;2665: +;2666: parsedAngles[anglesGathered] = atof(t); +ADDRLP4 520 +ARGP4 +ADDRLP4 1732 +ADDRGP4 atof +CALLF4 +ASGNF4 +ADDRLP4 1368 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1648 +ADDP4 +ADDRLP4 1732 +INDIRF4 +ASGNF4 +line 2667 +;2667: anglesGathered++; +ADDRLP4 1368 +ADDRLP4 1368 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2668 +;2668: } +LABELV $1538 +line 2648 +ADDRLP4 1368 +INDIRI4 +CNSTI4 3 +LTI4 $1537 +LABELV $1539 +line 2670 +;2669: +;2670: if (anglesGathered) +ADDRLP4 1368 +INDIRI4 +CNSTI4 0 +EQI4 $1546 +line 2671 +;2671: { +line 2672 +;2672: VectorCopy(parsedAngles, useAngles); +ADDRLP4 1696 +ADDRLP4 1648 +INDIRB +ASGNB 12 +line 2673 +;2673: } +ADDRGP4 $1536 +JUMPV +LABELV $1546 +line 2675 +;2674: else +;2675: { //failed to parse angles from the extra argument provided.. +line 2676 +;2676: VectorCopy(cent->lerpAngles, useAngles); +ADDRLP4 1696 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 2677 +;2677: } +line 2678 +;2678: } +ADDRGP4 $1536 +JUMPV +LABELV $1535 +line 2680 +;2679: else +;2680: { //if no constant angles, play in direction entity is facing +line 2681 +;2681: VectorCopy(cent->lerpAngles, useAngles); +ADDRLP4 1696 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 2682 +;2682: } +LABELV $1536 +line 2684 +;2683: +;2684: AngleVectors(useAngles, forward, right, up); +ADDRLP4 1696 +ARGP4 +ADDRLP4 1660 +ARGP4 +ADDRLP4 1672 +ARGP4 +ADDRLP4 1684 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 2686 +;2685: +;2686: VectorCopy(cent->lerpOrigin, useOrigin); +ADDRLP4 1376 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 2689 +;2687: +;2688: //forward +;2689: useOrigin[0] += forward[0]*parsedOffset[0]; +ADDRLP4 1376 +ADDRLP4 1376 +INDIRF4 +ADDRLP4 1660 +INDIRF4 +ADDRLP4 588 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2690 +;2690: useOrigin[1] += forward[1]*parsedOffset[0]; +ADDRLP4 1376+4 +ADDRLP4 1376+4 +INDIRF4 +ADDRLP4 1660+4 +INDIRF4 +ADDRLP4 588 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2691 +;2691: useOrigin[2] += forward[2]*parsedOffset[0]; +ADDRLP4 1376+8 +ADDRLP4 1376+8 +INDIRF4 +ADDRLP4 1660+8 +INDIRF4 +ADDRLP4 588 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2694 +;2692: +;2693: //right +;2694: useOrigin[0] += right[0]*parsedOffset[1]; +ADDRLP4 1376 +ADDRLP4 1376 +INDIRF4 +ADDRLP4 1672 +INDIRF4 +ADDRLP4 588+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2695 +;2695: useOrigin[1] += right[1]*parsedOffset[1]; +ADDRLP4 1376+4 +ADDRLP4 1376+4 +INDIRF4 +ADDRLP4 1672+4 +INDIRF4 +ADDRLP4 588+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2696 +;2696: useOrigin[2] += right[2]*parsedOffset[1]; +ADDRLP4 1376+8 +ADDRLP4 1376+8 +INDIRF4 +ADDRLP4 1672+8 +INDIRF4 +ADDRLP4 588+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2699 +;2697: +;2698: //up +;2699: useOrigin[0] += up[0]*parsedOffset[2]; +ADDRLP4 1376 +ADDRLP4 1376 +INDIRF4 +ADDRLP4 1684 +INDIRF4 +ADDRLP4 588+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2700 +;2700: useOrigin[1] += up[1]*parsedOffset[2]; +ADDRLP4 1376+4 +ADDRLP4 1376+4 +INDIRF4 +ADDRLP4 1684+4 +INDIRF4 +ADDRLP4 588+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2701 +;2701: useOrigin[2] += up[2]*parsedOffset[2]; +ADDRLP4 1376+8 +ADDRLP4 1376+8 +INDIRF4 +ADDRLP4 1684+8 +INDIRF4 +ADDRLP4 588+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2703 +;2702: +;2703: trap_FX_PlayEffectID(objectID, useOrigin, useAngles); +ADDRLP4 1372 +INDIRI4 +ARGI4 +ADDRLP4 1376 +ARGP4 +ADDRLP4 1696 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 2704 +;2704: } +line 2705 +;2705: } +ADDRGP4 $1486 +JUMPV +LABELV $1507 +line 2706 +;2706: else if (strcmp(type, "sound") == 0) +ADDRLP4 600 +ARGP4 +ADDRGP4 $1568 +ARGP4 +ADDRLP4 1724 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 1724 +INDIRI4 +CNSTI4 0 +NEI4 $1566 +line 2707 +;2707: { +line 2708 +;2708: objectID = trap_S_RegisterSound(argument); +ADDRLP4 856 +ARGP4 +ADDRLP4 1728 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 1372 +ADDRLP4 1728 +INDIRI4 +ASGNI4 +line 2709 +;2709: trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_BODY, objectID); +ADDRLP4 1732 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1732 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 1732 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 1372 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2710 +;2710: } +ADDRGP4 $1486 +JUMPV +LABELV $1566 +line 2711 +;2711: else if (strcmp(type, "loop") == 0) +ADDRLP4 600 +ARGP4 +ADDRGP4 $1571 +ARGP4 +ADDRLP4 1728 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 1728 +INDIRI4 +CNSTI4 0 +NEI4 $1569 +line 2712 +;2712: { //handled server-side +line 2713 +;2713: return; +ADDRGP4 $1486 +JUMPV +LABELV $1569 +line 2717 +;2714: } +;2715: //else if ... +;2716: else +;2717: { +line 2718 +;2718: if (type[0]) +ADDRLP4 600 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $1572 +line 2719 +;2719: { +line 2720 +;2720: Com_Printf("^3Warning: \"%s\" is an invalid ROFF notetrack function\n", type); +ADDRGP4 $1574 +ARGP4 +ADDRLP4 600 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 2721 +;2721: } +ADDRGP4 $1486 +JUMPV +LABELV $1572 +line 2723 +;2722: else +;2723: { +line 2724 +;2724: Com_Printf("^3Warning: Notetrack is missing function and/or arguments\n"); +ADDRGP4 $1575 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 2725 +;2725: } +line 2726 +;2726: } +line 2728 +;2727: +;2728: return; +ADDRGP4 $1486 +JUMPV +LABELV $1530 +line 2731 +;2729: +;2730:functionend: +;2731: Com_Printf("^3Type-specific notetrack error: %s\n", errMsg); +ADDRGP4 $1576 +ARGP4 +ADDRLP4 1392 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 2732 +;2732: return; +LABELV $1486 +endproc CG_ROFF_NotetrackCallback 1736 16 +import CG_G2Animated +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $1576 +char 1 94 +char 1 51 +char 1 84 +char 1 121 +char 1 112 +char 1 101 +char 1 45 +char 1 115 +char 1 112 +char 1 101 +char 1 99 +char 1 105 +char 1 102 +char 1 105 +char 1 99 +char 1 32 +char 1 110 +char 1 111 +char 1 116 +char 1 101 +char 1 116 +char 1 114 +char 1 97 +char 1 99 +char 1 107 +char 1 32 +char 1 101 +char 1 114 +char 1 114 +char 1 111 +char 1 114 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $1575 +char 1 94 +char 1 51 +char 1 87 +char 1 97 +char 1 114 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 58 +char 1 32 +char 1 78 +char 1 111 +char 1 116 +char 1 101 +char 1 116 +char 1 114 +char 1 97 +char 1 99 +char 1 107 +char 1 32 +char 1 105 +char 1 115 +char 1 32 +char 1 109 +char 1 105 +char 1 115 +char 1 115 +char 1 105 +char 1 110 +char 1 103 +char 1 32 +char 1 102 +char 1 117 +char 1 110 +char 1 99 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 97 +char 1 110 +char 1 100 +char 1 47 +char 1 111 +char 1 114 +char 1 32 +char 1 97 +char 1 114 +char 1 103 +char 1 117 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $1574 +char 1 94 +char 1 51 +char 1 87 +char 1 97 +char 1 114 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 58 +char 1 32 +char 1 34 +char 1 37 +char 1 115 +char 1 34 +char 1 32 +char 1 105 +char 1 115 +char 1 32 +char 1 97 +char 1 110 +char 1 32 +char 1 105 +char 1 110 +char 1 118 +char 1 97 +char 1 108 +char 1 105 +char 1 100 +char 1 32 +char 1 82 +char 1 79 +char 1 70 +char 1 70 +char 1 32 +char 1 110 +char 1 111 +char 1 116 +char 1 101 +char 1 116 +char 1 114 +char 1 97 +char 1 99 +char 1 107 +char 1 32 +char 1 102 +char 1 117 +char 1 110 +char 1 99 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 10 +char 1 0 +align 1 +LABELV $1571 +char 1 108 +char 1 111 +char 1 111 +char 1 112 +char 1 0 +align 1 +LABELV $1568 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $1529 +char 1 79 +char 1 102 +char 1 102 +char 1 115 +char 1 101 +char 1 116 +char 1 32 +char 1 112 +char 1 111 +char 1 115 +char 1 105 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 97 +char 1 114 +char 1 103 +char 1 117 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 32 +char 1 102 +char 1 111 +char 1 114 +char 1 32 +char 1 39 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 39 +char 1 32 +char 1 116 +char 1 121 +char 1 112 +char 1 101 +char 1 32 +char 1 105 +char 1 115 +char 1 32 +char 1 105 +char 1 110 +char 1 118 +char 1 97 +char 1 108 +char 1 105 +char 1 100 +char 1 46 +char 1 0 +align 1 +LABELV $1509 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $1413 +char 1 66 +char 1 97 +char 1 100 +char 1 32 +char 1 101 +char 1 110 +char 1 116 +char 1 105 +char 1 116 +char 1 121 +char 1 32 +char 1 116 +char 1 121 +char 1 112 +char 1 101 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 10 +char 1 0 +align 1 +LABELV $1346 +char 1 67 +char 1 71 +char 1 95 +char 1 73 +char 1 110 +char 1 116 +char 1 101 +char 1 114 +char 1 112 +char 1 111 +char 1 97 +char 1 116 +char 1 101 +char 1 69 +char 1 110 +char 1 116 +char 1 105 +char 1 116 +char 1 121 +char 1 80 +char 1 111 +char 1 115 +char 1 105 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 58 +char 1 32 +char 1 99 +char 1 103 +char 1 46 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 32 +char 1 61 +char 1 61 +char 1 32 +char 1 78 +char 1 85 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $1263 +char 1 116 +char 1 114 +char 1 105 +char 1 112 +char 1 77 +char 1 105 +char 1 110 +char 1 101 +char 1 47 +char 1 108 +char 1 97 +char 1 115 +char 1 101 +char 1 114 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1116 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $894 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 109 +char 1 112 +char 1 95 +char 1 100 +char 1 97 +char 1 114 +char 1 107 +char 1 95 +char 1 101 +char 1 110 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 95 +char 1 100 +char 1 105 +char 1 115 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $892 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 109 +char 1 112 +char 1 95 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 95 +char 1 101 +char 1 110 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 95 +char 1 100 +char 1 105 +char 1 115 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $840 +char 1 109 +char 1 112 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 99 +char 1 111 +char 1 110 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $811 +char 1 66 +char 1 97 +char 1 100 +char 1 32 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 32 +char 1 105 +char 1 110 +char 1 100 +char 1 101 +char 1 120 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 111 +char 1 110 +char 1 32 +char 1 101 +char 1 110 +char 1 116 +char 1 105 +char 1 116 +char 1 121 +char 1 0 +align 1 +LABELV $522 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 105 +char 1 109 +char 1 112 +char 1 95 +char 1 109 +char 1 105 +char 1 110 +char 1 101 +char 1 47 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 95 +char 1 99 +char 1 104 +char 1 97 +char 1 105 +char 1 114 +char 1 95 +char 1 100 +char 1 109 +char 1 103 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $506 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 100 +char 1 105 +char 1 101 +char 1 0 +align 1 +LABELV $480 +char 1 108 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 95 +char 1 108 +char 1 117 +char 1 109 +char 1 98 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $445 +char 1 66 +char 1 111 +char 1 110 +char 1 101 +char 1 48 +char 1 50 +char 1 0 +align 1 +LABELV $350 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 95 +char 1 98 +char 1 111 +char 1 108 +char 1 116 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $342 +char 1 77 +char 1 111 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $340 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 114 +char 1 111 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $338 +char 1 117 +char 1 112 +char 1 112 +char 1 101 +char 1 114 +char 1 95 +char 1 108 +char 1 117 +char 1 109 +char 1 98 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $321 +char 1 42 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 114 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 0 +align 1 +LABELV $320 +char 1 42 +char 1 114 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 0 +align 1 +LABELV $319 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 114 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $318 +char 1 114 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $317 +char 1 114 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 0 +align 1 +LABELV $316 +char 1 114 +char 1 116 +char 1 105 +char 1 98 +char 1 105 +char 1 97 +char 1 0 +align 1 +LABELV $315 +char 1 114 +char 1 102 +char 1 101 +char 1 109 +char 1 117 +char 1 114 +char 1 89 +char 1 90 +char 1 0 +align 1 +LABELV $312 +char 1 42 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 108 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 0 +align 1 +LABELV $311 +char 1 42 +char 1 108 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 0 +align 1 +LABELV $310 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 108 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $309 +char 1 108 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $308 +char 1 108 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 0 +align 1 +LABELV $307 +char 1 108 +char 1 116 +char 1 105 +char 1 98 +char 1 105 +char 1 97 +char 1 0 +align 1 +LABELV $306 +char 1 108 +char 1 102 +char 1 101 +char 1 109 +char 1 117 +char 1 114 +char 1 89 +char 1 90 +char 1 0 +align 1 +LABELV $303 +char 1 42 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 114 +char 1 95 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $302 +char 1 42 +char 1 114 +char 1 95 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 0 +align 1 +LABELV $301 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 114 +char 1 95 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $300 +char 1 114 +char 1 95 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $299 +char 1 114 +char 1 95 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $298 +char 1 114 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $297 +char 1 114 +char 1 114 +char 1 97 +char 1 100 +char 1 105 +char 1 117 +char 1 115 +char 1 88 +char 1 0 +align 1 +LABELV $294 +char 1 42 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 0 +align 1 +LABELV $293 +char 1 42 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 0 +align 1 +LABELV $292 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $291 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $290 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 0 +align 1 +LABELV $289 +char 1 114 +char 1 114 +char 1 97 +char 1 100 +char 1 105 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $288 +char 1 114 +char 1 104 +char 1 117 +char 1 109 +char 1 101 +char 1 114 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $285 +char 1 42 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 108 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 0 +align 1 +LABELV $284 +char 1 42 +char 1 108 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 0 +align 1 +LABELV $283 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 108 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $282 +char 1 108 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $281 +char 1 108 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 0 +align 1 +LABELV $280 +char 1 108 +char 1 114 +char 1 97 +char 1 100 +char 1 105 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $279 +char 1 108 +char 1 104 +char 1 117 +char 1 109 +char 1 101 +char 1 114 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $276 +char 1 42 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 0 +align 1 +LABELV $275 +char 1 42 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 0 +align 1 +LABELV $274 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $273 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $272 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 0 +align 1 +LABELV $271 +char 1 116 +char 1 104 +char 1 111 +char 1 114 +char 1 97 +char 1 99 +char 1 105 +char 1 99 +char 1 0 +align 1 +LABELV $270 +char 1 112 +char 1 101 +char 1 108 +char 1 118 +char 1 105 +char 1 115 +char 1 0 +align 1 +LABELV $267 +char 1 42 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 100 +char 1 0 +align 1 +LABELV $266 +char 1 42 +char 1 104 +char 1 101 +char 1 97 +char 1 100 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 0 +align 1 +LABELV $265 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 100 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $264 +char 1 104 +char 1 101 +char 1 97 +char 1 100 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $263 +char 1 104 +char 1 101 +char 1 97 +char 1 100 +char 1 0 +align 1 +LABELV $262 +char 1 99 +char 1 114 +char 1 97 +char 1 110 +char 1 105 +char 1 117 +char 1 109 +char 1 0 +align 1 +LABELV $261 +char 1 99 +char 1 101 +char 1 114 +char 1 118 +char 1 105 +char 1 99 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $235 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 116 +char 1 104 +char 1 114 +char 1 111 +char 1 119 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $234 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 110 +char 1 100 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $233 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 97 +char 1 116 +char 1 116 +char 1 97 +char 1 99 +char 1 107 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $232 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 115 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $231 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 107 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 105 +char 1 110 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $230 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 107 +char 1 95 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 111 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $229 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 108 +char 1 116 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 111 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $228 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 108 +char 1 116 +char 1 95 +char 1 97 +char 1 98 +char 1 115 +char 1 111 +char 1 114 +char 1 98 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $227 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 108 +char 1 116 +char 1 95 +char 1 112 +char 1 114 +char 1 111 +char 1 116 +char 1 101 +char 1 99 +char 1 116 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $226 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 107 +char 1 95 +char 1 114 +char 1 97 +char 1 103 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $225 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 107 +char 1 95 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $224 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 107 +char 1 95 +char 1 103 +char 1 114 +char 1 105 +char 1 112 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $223 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 108 +char 1 116 +char 1 95 +char 1 116 +char 1 101 +char 1 108 +char 1 101 +char 1 112 +char 1 97 +char 1 116 +char 1 104 +char 1 121 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $222 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 112 +char 1 117 +char 1 108 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $221 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 112 +char 1 117 +char 1 115 +char 1 104 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $220 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 115 +char 1 112 +char 1 101 +char 1 101 +char 1 100 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $219 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 106 +char 1 117 +char 1 109 +char 1 112 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $218 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 108 +char 1 116 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $179 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 95 +char 1 112 +char 1 111 +char 1 114 +char 1 116 +char 1 97 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $178 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 95 +char 1 100 +char 1 109 +char 1 103 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $175 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 114 +char 1 101 +char 1 100 +char 1 95 +char 1 112 +char 1 111 +char 1 114 +char 1 116 +char 1 97 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $174 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 114 +char 1 101 +char 1 100 +char 1 95 +char 1 100 +char 1 109 +char 1 103 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $156 +char 1 99 +char 1 108 +char 1 95 +char 1 112 +char 1 97 +char 1 117 +char 1 115 +char 1 101 +char 1 100 +char 1 0 diff --git a/code/cgame/vm/cg_event.asm b/code/cgame/vm/cg_event.asm new file mode 100644 index 0000000..35a88de --- /dev/null +++ b/code/cgame/vm/cg_event.asm @@ -0,0 +1,20367 @@ +bss +align 1 +LABELV $130 +skip 64 +export CG_PlaceString +code +proc CG_PlaceString 116 20 +file "../cg_event.c" +line 25 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_event.c -- handle entity events at snapshot or playerstate transitions +;4: +;5:#include "cg_local.h" +;6:#include "fx_local.h" +;7:#include "..\ghoul2\g2.h" +;8:#include "../ui/ui_shared.h" +;9: +;10:// for the voice chats +;11:#include "../../ui/menudef.h" +;12://========================================================================== +;13: +;14:extern int g_saberFlashTime; +;15:extern vec3_t g_saberFlashPos; +;16:extern char *showPowersName[]; +;17: +;18:/* +;19:=================== +;20:CG_PlaceString +;21: +;22:Also called by scoreboard drawing +;23:=================== +;24:*/ +;25:const char *CG_PlaceString( int rank ) { +line 36 +;26: static char str[64]; +;27: char *s, *t; +;28: // number extenstions, eg 1st, 2nd, 3rd, 4th etc. +;29: // note that the rules are different for french, but by changing the required strip strings they seem to work +;30: char sST[10]; +;31: char sND[10]; +;32: char sRD[10]; +;33: char sTH[10]; +;34: char sTiedFor[64]; // german is much longer, super safe... +;35: +;36: trap_SP_GetStringTextString("INGAMETEXT_NUMBER_ST",sST, sizeof(sST) ); +ADDRGP4 $131 +ARGP4 +ADDRLP4 64 +ARGP4 +CNSTI4 10 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 37 +;37: trap_SP_GetStringTextString("INGAMETEXT_NUMBER_ND",sND, sizeof(sND) ); +ADDRGP4 $132 +ARGP4 +ADDRLP4 74 +ARGP4 +CNSTI4 10 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 38 +;38: trap_SP_GetStringTextString("INGAMETEXT_NUMBER_RD",sRD, sizeof(sRD) ); +ADDRGP4 $133 +ARGP4 +ADDRLP4 84 +ARGP4 +CNSTI4 10 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 39 +;39: trap_SP_GetStringTextString("INGAMETEXT_NUMBER_TH",sTH, sizeof(sTH) ); +ADDRGP4 $134 +ARGP4 +ADDRLP4 94 +ARGP4 +CNSTI4 10 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 40 +;40: trap_SP_GetStringTextString("INGAMETEXT_TIED_FOR" ,sTiedFor,sizeof(sTiedFor) ); +ADDRGP4 $135 +ARGP4 +ADDRLP4 0 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 41 +;41: strcat(sTiedFor," "); // save worrying about translators adding spaces or not +ADDRLP4 0 +ARGP4 +ADDRGP4 $136 +ARGP4 +ADDRGP4 strcat +CALLP4 +pop +line 43 +;42: +;43: if ( rank & RANK_TIED_FLAG ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 16384 +BANDI4 +CNSTI4 0 +EQI4 $137 +line 44 +;44: rank &= ~RANK_TIED_FLAG; +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -16385 +BANDI4 +ASGNI4 +line 45 +;45: t = sTiedFor;//"Tied for "; +ADDRLP4 108 +ADDRLP4 0 +ASGNP4 +line 46 +;46: } else { +ADDRGP4 $138 +JUMPV +LABELV $137 +line 47 +;47: t = ""; +ADDRLP4 108 +ADDRGP4 $139 +ASGNP4 +line 48 +;48: } +LABELV $138 +line 50 +;49: +;50: if ( rank == 1 ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +NEI4 $140 +line 51 +;51: s = va("1%s",sST);//S_COLOR_BLUE "1st" S_COLOR_WHITE; // draw in blue +ADDRGP4 $142 +ARGP4 +ADDRLP4 64 +ARGP4 +ADDRLP4 112 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 112 +INDIRP4 +ASGNP4 +line 52 +;52: } else if ( rank == 2 ) { +ADDRGP4 $141 +JUMPV +LABELV $140 +ADDRFP4 0 +INDIRI4 +CNSTI4 2 +NEI4 $143 +line 53 +;53: s = va("2%s",sND);//S_COLOR_RED "2nd" S_COLOR_WHITE; // draw in red +ADDRGP4 $145 +ARGP4 +ADDRLP4 74 +ARGP4 +ADDRLP4 112 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 112 +INDIRP4 +ASGNP4 +line 54 +;54: } else if ( rank == 3 ) { +ADDRGP4 $144 +JUMPV +LABELV $143 +ADDRFP4 0 +INDIRI4 +CNSTI4 3 +NEI4 $146 +line 55 +;55: s = va("3%s",sRD);//S_COLOR_YELLOW "3rd" S_COLOR_WHITE; // draw in yellow +ADDRGP4 $148 +ARGP4 +ADDRLP4 84 +ARGP4 +ADDRLP4 112 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 112 +INDIRP4 +ASGNP4 +line 56 +;56: } else if ( rank == 11 ) { +ADDRGP4 $147 +JUMPV +LABELV $146 +ADDRFP4 0 +INDIRI4 +CNSTI4 11 +NEI4 $149 +line 57 +;57: s = va("11%s",sTH); +ADDRGP4 $151 +ARGP4 +ADDRLP4 94 +ARGP4 +ADDRLP4 112 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 112 +INDIRP4 +ASGNP4 +line 58 +;58: } else if ( rank == 12 ) { +ADDRGP4 $150 +JUMPV +LABELV $149 +ADDRFP4 0 +INDIRI4 +CNSTI4 12 +NEI4 $152 +line 59 +;59: s = va("12%s",sTH); +ADDRGP4 $154 +ARGP4 +ADDRLP4 94 +ARGP4 +ADDRLP4 112 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 112 +INDIRP4 +ASGNP4 +line 60 +;60: } else if ( rank == 13 ) { +ADDRGP4 $153 +JUMPV +LABELV $152 +ADDRFP4 0 +INDIRI4 +CNSTI4 13 +NEI4 $155 +line 61 +;61: s = va("13%s",sTH); +ADDRGP4 $157 +ARGP4 +ADDRLP4 94 +ARGP4 +ADDRLP4 112 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 112 +INDIRP4 +ASGNP4 +line 62 +;62: } else if ( rank % 10 == 1 ) { +ADDRGP4 $156 +JUMPV +LABELV $155 +ADDRFP4 0 +INDIRI4 +CNSTI4 10 +MODI4 +CNSTI4 1 +NEI4 $158 +line 63 +;63: s = va("%i%s", rank,sST); +ADDRGP4 $160 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 64 +ARGP4 +ADDRLP4 112 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 112 +INDIRP4 +ASGNP4 +line 64 +;64: } else if ( rank % 10 == 2 ) { +ADDRGP4 $159 +JUMPV +LABELV $158 +ADDRFP4 0 +INDIRI4 +CNSTI4 10 +MODI4 +CNSTI4 2 +NEI4 $161 +line 65 +;65: s = va("%i%s", rank,sND); +ADDRGP4 $160 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 74 +ARGP4 +ADDRLP4 112 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 112 +INDIRP4 +ASGNP4 +line 66 +;66: } else if ( rank % 10 == 3 ) { +ADDRGP4 $162 +JUMPV +LABELV $161 +ADDRFP4 0 +INDIRI4 +CNSTI4 10 +MODI4 +CNSTI4 3 +NEI4 $163 +line 67 +;67: s = va("%i%s", rank,sRD); +ADDRGP4 $160 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 84 +ARGP4 +ADDRLP4 112 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 112 +INDIRP4 +ASGNP4 +line 68 +;68: } else { +ADDRGP4 $164 +JUMPV +LABELV $163 +line 69 +;69: s = va("%i%s", rank,sTH); +ADDRGP4 $160 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 94 +ARGP4 +ADDRLP4 112 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 112 +INDIRP4 +ASGNP4 +line 70 +;70: } +LABELV $164 +LABELV $162 +LABELV $159 +LABELV $156 +LABELV $153 +LABELV $150 +LABELV $147 +LABELV $144 +LABELV $141 +line 72 +;71: +;72: Com_sprintf( str, sizeof( str ), "%s%s", t, s ); +ADDRGP4 $130 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $165 +ARGP4 +ADDRLP4 108 +INDIRP4 +ARGP4 +ADDRLP4 104 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 73 +;73: return str; +ADDRGP4 $130 +RETP4 +LABELV $129 +endproc CG_PlaceString 116 20 +proc CG_Obituary 1168 24 +line 83 +;74:} +;75: +;76:qboolean CG_ThereIsAMaster(void); +;77: +;78:/* +;79:============= +;80:CG_Obituary +;81:============= +;82:*/ +;83:static void CG_Obituary( entityState_t *ent ) { +line 94 +;84: int mod; +;85: int target, attacker; +;86: char *message; +;87: const char *targetInfo; +;88: const char *attackerInfo; +;89: char targetName[32]; +;90: char attackerName[32]; +;91: gender_t gender; +;92: clientInfo_t *ci; +;93: +;94: target = ent->otherEntityNum; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRI4 +ASGNI4 +line 95 +;95: attacker = ent->otherEntityNum2; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ASGNI4 +line 96 +;96: mod = ent->eventParm; +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ASGNI4 +line 98 +;97: +;98: if ( target < 0 || target >= MAX_CLIENTS ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +LTI4 $169 +ADDRLP4 4 +INDIRI4 +CNSTI4 32 +LTI4 $167 +LABELV $169 +line 99 +;99: CG_Error( "CG_Obituary: target out of range" ); +ADDRGP4 $170 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 100 +;100: } +LABELV $167 +line 101 +;101: ci = &cgs.clientinfo[target]; +ADDRLP4 88 +CNSTI4 788 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 103 +;102: +;103: if ( attacker < 0 || attacker >= MAX_CLIENTS ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $174 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +LTI4 $172 +LABELV $174 +line 104 +;104: attacker = ENTITYNUM_WORLD; +ADDRLP4 0 +CNSTI4 1022 +ASGNI4 +line 105 +;105: attackerInfo = NULL; +ADDRLP4 52 +CNSTP4 0 +ASGNP4 +line 106 +;106: } else { +ADDRGP4 $173 +JUMPV +LABELV $172 +line 107 +;107: attackerInfo = CG_ConfigString( CS_PLAYERS + attacker ); +ADDRLP4 0 +INDIRI4 +CNSTI4 544 +ADDI4 +ARGI4 +ADDRLP4 104 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 52 +ADDRLP4 104 +INDIRP4 +ASGNP4 +line 108 +;108: } +LABELV $173 +line 110 +;109: +;110: targetInfo = CG_ConfigString( CS_PLAYERS + target ); +ADDRLP4 4 +INDIRI4 +CNSTI4 544 +ADDI4 +ARGI4 +ADDRLP4 104 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 48 +ADDRLP4 104 +INDIRP4 +ASGNP4 +line 111 +;111: if ( !targetInfo ) { +ADDRLP4 48 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $175 +line 112 +;112: return; +ADDRGP4 $166 +JUMPV +LABELV $175 +line 114 +;113: } +;114: Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2); +ADDRLP4 48 +INDIRP4 +ARGP4 +ADDRGP4 $177 +ARGP4 +ADDRLP4 108 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 108 +INDIRP4 +ARGP4 +CNSTI4 30 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 115 +;115: strcat( targetName, S_COLOR_WHITE ); +ADDRLP4 12 +ARGP4 +ADDRGP4 $178 +ARGP4 +ADDRGP4 strcat +CALLP4 +pop +line 119 +;116: +;117: // check for single client messages +;118: +;119: switch( mod ) { +ADDRLP4 44 +INDIRI4 +CNSTI4 29 +LTI4 $179 +ADDRLP4 44 +INDIRI4 +CNSTI4 37 +GTI4 $179 +ADDRLP4 44 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $183-116 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $183 +address $181 +address $181 +address $181 +address $181 +address $179 +address $181 +address $181 +address $181 +address $181 +code +LABELV $181 +line 128 +;120: case MOD_SUICIDE: +;121: case MOD_FALLING: +;122: case MOD_CRUSH: +;123: case MOD_WATER: +;124: case MOD_SLIME: +;125: case MOD_LAVA: +;126: case MOD_TARGET_LASER: +;127: case MOD_TRIGGER_HURT: +;128: message = "DIED_GENERIC"; +ADDRLP4 8 +ADDRGP4 $182 +ASGNP4 +line 129 +;129: break; +ADDRGP4 $180 +JUMPV +LABELV $179 +line 131 +;130: default: +;131: message = NULL; +ADDRLP4 8 +CNSTP4 0 +ASGNP4 +line 132 +;132: break; +LABELV $180 +line 136 +;133: } +;134: +;135: // Attacker killed themselves. Ridicule them for it. +;136: if (attacker == target) { +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $185 +line 137 +;137: gender = ci->gender; +ADDRLP4 92 +ADDRLP4 88 +INDIRP4 +CNSTI4 480 +ADDP4 +INDIRI4 +ASGNI4 +line 138 +;138: switch (mod) { +ADDRLP4 44 +INDIRI4 +CNSTI4 4 +LTI4 $187 +ADDRLP4 44 +INDIRI4 +CNSTI4 34 +GTI4 $187 +ADDRLP4 44 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $228-16 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $228 +address $189 +address $189 +address $189 +address $189 +address $189 +address $189 +address $189 +address $189 +address $189 +address $197 +address $205 +address $187 +address $189 +address $197 +address $197 +address $197 +address $197 +address $197 +address $197 +address $197 +address $197 +address $197 +address $197 +address $187 +address $187 +address $187 +address $187 +address $187 +address $187 +address $187 +address $213 +code +LABELV $189 +line 149 +;139: case MOD_BRYAR_PISTOL: +;140: case MOD_BRYAR_PISTOL_ALT: +;141: case MOD_BLASTER: +;142: case MOD_DISRUPTOR: +;143: case MOD_DISRUPTOR_SPLASH: +;144: case MOD_DISRUPTOR_SNIPER: +;145: case MOD_BOWCASTER: +;146: case MOD_REPEATER: +;147: case MOD_REPEATER_ALT: +;148: case MOD_FLECHETTE: +;149: if ( gender == GENDER_FEMALE ) +ADDRLP4 92 +INDIRI4 +CNSTI4 1 +NEI4 $190 +line 150 +;150: message = "SUICIDE_SHOT_FEMALE"; +ADDRLP4 8 +ADDRGP4 $192 +ASGNP4 +ADDRGP4 $188 +JUMPV +LABELV $190 +line 151 +;151: else if ( gender == GENDER_NEUTER ) +ADDRLP4 92 +INDIRI4 +CNSTI4 2 +NEI4 $193 +line 152 +;152: message = "SUICIDE_SHOT_GENDERLESS"; +ADDRLP4 8 +ADDRGP4 $195 +ASGNP4 +ADDRGP4 $188 +JUMPV +LABELV $193 +line 154 +;153: else +;154: message = "SUICIDE_SHOT_MALE"; +ADDRLP4 8 +ADDRGP4 $196 +ASGNP4 +line 155 +;155: break; +ADDRGP4 $188 +JUMPV +LABELV $197 +line 167 +;156: case MOD_REPEATER_ALT_SPLASH: +;157: case MOD_FLECHETTE_ALT_SPLASH: +;158: case MOD_ROCKET: +;159: case MOD_ROCKET_SPLASH: +;160: case MOD_ROCKET_HOMING: +;161: case MOD_ROCKET_HOMING_SPLASH: +;162: case MOD_THERMAL: +;163: case MOD_THERMAL_SPLASH: +;164: case MOD_TRIP_MINE_SPLASH: +;165: case MOD_TIMED_MINE_SPLASH: +;166: case MOD_DET_PACK_SPLASH: +;167: if ( gender == GENDER_FEMALE ) +ADDRLP4 92 +INDIRI4 +CNSTI4 1 +NEI4 $198 +line 168 +;168: message = "SUICIDE_EXPLOSIVES_FEMALE"; +ADDRLP4 8 +ADDRGP4 $200 +ASGNP4 +ADDRGP4 $188 +JUMPV +LABELV $198 +line 169 +;169: else if ( gender == GENDER_NEUTER ) +ADDRLP4 92 +INDIRI4 +CNSTI4 2 +NEI4 $201 +line 170 +;170: message = "SUICIDE_EXPLOSIVES_GENDERLESS"; +ADDRLP4 8 +ADDRGP4 $203 +ASGNP4 +ADDRGP4 $188 +JUMPV +LABELV $201 +line 172 +;171: else +;172: message = "SUICIDE_EXPLOSIVES_MALE"; +ADDRLP4 8 +ADDRGP4 $204 +ASGNP4 +line 173 +;173: break; +ADDRGP4 $188 +JUMPV +LABELV $205 +line 175 +;174: case MOD_DEMP2: +;175: if ( gender == GENDER_FEMALE ) +ADDRLP4 92 +INDIRI4 +CNSTI4 1 +NEI4 $206 +line 176 +;176: message = "SUICIDE_ELECTROCUTED_FEMALE"; +ADDRLP4 8 +ADDRGP4 $208 +ASGNP4 +ADDRGP4 $188 +JUMPV +LABELV $206 +line 177 +;177: else if ( gender == GENDER_NEUTER ) +ADDRLP4 92 +INDIRI4 +CNSTI4 2 +NEI4 $209 +line 178 +;178: message = "SUICIDE_ELECTROCUTED_GENDERLESS"; +ADDRLP4 8 +ADDRGP4 $211 +ASGNP4 +ADDRGP4 $188 +JUMPV +LABELV $209 +line 180 +;179: else +;180: message = "SUICIDE_ELECTROCUTED_MALE"; +ADDRLP4 8 +ADDRGP4 $212 +ASGNP4 +line 181 +;181: break; +ADDRGP4 $188 +JUMPV +LABELV $213 +line 183 +;182: case MOD_FALLING: +;183: if ( gender == GENDER_FEMALE ) +ADDRLP4 92 +INDIRI4 +CNSTI4 1 +NEI4 $214 +line 184 +;184: message = "SUICIDE_FALLDEATH_FEMALE"; +ADDRLP4 8 +ADDRGP4 $216 +ASGNP4 +ADDRGP4 $188 +JUMPV +LABELV $214 +line 185 +;185: else if ( gender == GENDER_NEUTER ) +ADDRLP4 92 +INDIRI4 +CNSTI4 2 +NEI4 $217 +line 186 +;186: message = "SUICIDE_FALLDEATH_GENDERLESS"; +ADDRLP4 8 +ADDRGP4 $219 +ASGNP4 +ADDRGP4 $188 +JUMPV +LABELV $217 +line 188 +;187: else +;188: message = "SUICIDE_FALLDEATH_MALE"; +ADDRLP4 8 +ADDRGP4 $220 +ASGNP4 +line 189 +;189: break; +ADDRGP4 $188 +JUMPV +LABELV $187 +line 191 +;190: default: +;191: if ( gender == GENDER_FEMALE ) +ADDRLP4 92 +INDIRI4 +CNSTI4 1 +NEI4 $221 +line 192 +;192: message = "SUICIDE_GENERICDEATH_FEMALE"; +ADDRLP4 8 +ADDRGP4 $223 +ASGNP4 +ADDRGP4 $188 +JUMPV +LABELV $221 +line 193 +;193: else if ( gender == GENDER_NEUTER ) +ADDRLP4 92 +INDIRI4 +CNSTI4 2 +NEI4 $224 +line 194 +;194: message = "SUICIDE_GENERICDEATH_GENDERLESS"; +ADDRLP4 8 +ADDRGP4 $226 +ASGNP4 +ADDRGP4 $188 +JUMPV +LABELV $224 +line 196 +;195: else +;196: message = "SUICIDE_GENERICDEATH_MALE"; +ADDRLP4 8 +ADDRGP4 $227 +ASGNP4 +line 197 +;197: break; +LABELV $188 +line 199 +;198: } +;199: } +LABELV $185 +line 201 +;200: +;201: if (target != attacker && target < MAX_CLIENTS && attacker < MAX_CLIENTS) +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +EQI4 $230 +ADDRLP4 124 +CNSTI4 32 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 124 +INDIRI4 +GEI4 $230 +ADDRLP4 0 +INDIRI4 +ADDRLP4 124 +INDIRI4 +GEI4 $230 +line 202 +;202: { +line 203 +;203: goto clientkilled; +ADDRGP4 $232 +JUMPV +LABELV $230 +line 206 +;204: } +;205: +;206: if (message) { +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $233 +line 207 +;207: gender = ci->gender; +ADDRLP4 92 +ADDRLP4 88 +INDIRP4 +CNSTI4 480 +ADDP4 +INDIRI4 +ASGNI4 +line 209 +;208: +;209: if (!message[0]) +ADDRLP4 8 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $235 +line 210 +;210: { +line 211 +;211: if ( gender == GENDER_FEMALE ) +ADDRLP4 92 +INDIRI4 +CNSTI4 1 +NEI4 $237 +line 212 +;212: message = "SUICIDE_GENERICDEATH_FEMALE"; +ADDRLP4 8 +ADDRGP4 $223 +ASGNP4 +ADDRGP4 $238 +JUMPV +LABELV $237 +line 213 +;213: else if ( gender == GENDER_NEUTER ) +ADDRLP4 92 +INDIRI4 +CNSTI4 2 +NEI4 $239 +line 214 +;214: message = "SUICIDE_GENERICDEATH_GENDERLESS"; +ADDRLP4 8 +ADDRGP4 $226 +ASGNP4 +ADDRGP4 $240 +JUMPV +LABELV $239 +line 216 +;215: else +;216: message = "SUICIDE_GENERICDEATH_MALE"; +ADDRLP4 8 +ADDRGP4 $227 +ASGNP4 +LABELV $240 +LABELV $238 +line 217 +;217: } +LABELV $235 +line 218 +;218: message = (char *)CG_GetStripEdString("INGAMETEXT", message); +ADDRGP4 $241 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 128 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 128 +INDIRP4 +ASGNP4 +line 220 +;219: +;220: CG_Printf( "%s %s\n", targetName, message); +ADDRGP4 $242 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 221 +;221: return; +ADDRGP4 $166 +JUMPV +LABELV $233 +LABELV $232 +line 227 +;222: } +;223: +;224:clientkilled: +;225: +;226: // check for kill messages from the current clientNum +;227: if ( attacker == cg.snap->ps.clientNum ) { +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $243 +line 230 +;228: char *s; +;229: +;230: if ( cgs.gametype < GT_TEAM && cgs.gametype != GT_TOURNAMENT ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +GEI4 $246 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +EQI4 $246 +line 231 +;231: if (cgs.gametype == GT_JEDIMASTER && +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 2 +NEI4 $250 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +GEI4 $250 +ADDRLP4 132 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRI4 +ADDRLP4 132 +INDIRI4 +NEI4 $250 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 648 +ADDP4 +INDIRI4 +ADDRLP4 132 +INDIRI4 +NEI4 $250 +ADDRLP4 136 +ADDRGP4 CG_ThereIsAMaster +CALLI4 +ASGNI4 +ADDRLP4 136 +INDIRI4 +CNSTI4 0 +EQI4 $250 +line 236 +;232: attacker < MAX_CLIENTS && +;233: !ent->isJediMaster && +;234: !cg.snap->ps.isJediMaster && +;235: CG_ThereIsAMaster()) +;236: { +line 239 +;237: char part1[512]; +;238: char part2[512]; +;239: trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", part1, sizeof(part1)); +ADDRGP4 $254 +ARGP4 +ADDRLP4 140 +ARGP4 +CNSTI4 512 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 240 +;240: trap_SP_GetStringTextString("INGAMETEXT_JMKILLED_NOTJM", part2, sizeof(part2)); +ADDRGP4 $255 +ARGP4 +ADDRLP4 652 +ARGP4 +CNSTI4 512 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 241 +;241: s = va("%s %s\n%s\n", part1, targetName, part2); +ADDRGP4 $256 +ARGP4 +ADDRLP4 140 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 652 +ARGP4 +ADDRLP4 1164 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 128 +ADDRLP4 1164 +INDIRP4 +ASGNP4 +line 242 +;242: } +ADDRGP4 $247 +JUMPV +LABELV $250 +line 243 +;243: else if (cgs.gametype == GT_JEDIMASTER && +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 2 +NEI4 $257 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +GEI4 $257 +ADDRLP4 140 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRI4 +ADDRLP4 140 +INDIRI4 +NEI4 $257 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 648 +ADDP4 +INDIRI4 +ADDRLP4 140 +INDIRI4 +NEI4 $257 +line 247 +;244: attacker < MAX_CLIENTS && +;245: !ent->isJediMaster && +;246: !cg.snap->ps.isJediMaster) +;247: { //no JM, saber must be out +line 249 +;248: char part1[512]; +;249: trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", part1, sizeof(part1)); +ADDRGP4 $254 +ARGP4 +ADDRLP4 144 +ARGP4 +CNSTI4 512 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 256 +;250: /* +;251: kmsg1 = "for 0 points.\nGo for the saber!"; +;252: strcpy(part2, kmsg1); +;253: +;254: s = va("%s %s %s\n", part1, targetName, part2); +;255: */ +;256: s = va("%s %s\n", part1, targetName); +ADDRGP4 $242 +ARGP4 +ADDRLP4 144 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 656 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 128 +ADDRLP4 656 +INDIRP4 +ASGNP4 +line 257 +;257: } +ADDRGP4 $247 +JUMPV +LABELV $257 +line 259 +;258: else +;259: { +line 262 +;260: char sPlaceWith[256]; +;261: char sKilledStr[256]; +;262: trap_SP_GetStringTextString("INGAMETEXT_PLACE_WITH", sPlaceWith, sizeof(sPlaceWith)); +ADDRGP4 $261 +ARGP4 +ADDRLP4 144 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 263 +;263: trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", sKilledStr, sizeof(sKilledStr)); +ADDRGP4 $254 +ARGP4 +ADDRLP4 400 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 265 +;264: +;265: s = va("%s %s.\n%s %s %i.", sKilledStr, targetName, +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 332 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 656 +ADDRGP4 CG_PlaceString +CALLP4 +ASGNP4 +ADDRGP4 $262 +ARGP4 +ADDRLP4 400 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 656 +INDIRP4 +ARGP4 +ADDRLP4 144 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 324 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 660 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 128 +ADDRLP4 660 +INDIRP4 +ASGNP4 +line 269 +;266: CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), +;267: sPlaceWith, +;268: cg.snap->ps.persistant[PERS_SCORE] ); +;269: } +line 270 +;270: } else { +ADDRGP4 $247 +JUMPV +LABELV $246 +line 272 +;271: char sKilledStr[256]; +;272: trap_SP_GetStringTextString("INGAMETEXT_KILLED_MESSAGE", sKilledStr, sizeof(sKilledStr)); +ADDRGP4 $254 +ARGP4 +ADDRLP4 132 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 273 +;273: s = va("%s %s", sKilledStr, targetName ); +ADDRGP4 $265 +ARGP4 +ADDRLP4 132 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 388 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 128 +ADDRLP4 388 +INDIRP4 +ASGNP4 +line 274 +;274: } +LABELV $247 +line 275 +;275: if (!(cg_singlePlayerActive.integer && cg_cameraOrbit.integer)) { +ADDRLP4 132 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_singlePlayerActive+12 +INDIRI4 +ADDRLP4 132 +INDIRI4 +EQI4 $270 +ADDRGP4 cg_cameraOrbit+12 +INDIRI4 +ADDRLP4 132 +INDIRI4 +NEI4 $266 +LABELV $270 +line 276 +;276: CG_CenterPrint( s, SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH ); +ADDRLP4 128 +INDIRP4 +ARGP4 +CNSTI4 144 +ARGI4 +CNSTI4 16 +ARGI4 +ADDRGP4 CG_CenterPrint +CALLV +pop +line 277 +;277: } +LABELV $266 +line 279 +;278: // print the text message as well +;279: } +LABELV $243 +line 282 +;280: +;281: // check for double client messages +;282: if ( !attackerInfo ) { +ADDRLP4 52 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $271 +line 283 +;283: attacker = ENTITYNUM_WORLD; +ADDRLP4 0 +CNSTI4 1022 +ASGNI4 +line 284 +;284: strcpy( attackerName, "noname" ); +ADDRLP4 56 +ARGP4 +ADDRGP4 $273 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 285 +;285: } else { +ADDRGP4 $272 +JUMPV +LABELV $271 +line 286 +;286: Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof(attackerName) - 2); +ADDRLP4 52 +INDIRP4 +ARGP4 +ADDRGP4 $177 +ARGP4 +ADDRLP4 128 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 56 +ARGP4 +ADDRLP4 128 +INDIRP4 +ARGP4 +CNSTI4 30 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 287 +;287: strcat( attackerName, S_COLOR_WHITE ); +ADDRLP4 56 +ARGP4 +ADDRGP4 $178 +ARGP4 +ADDRGP4 strcat +CALLP4 +pop +line 289 +;288: // check for kill messages about the current clientNum +;289: if ( target == cg.snap->ps.clientNum ) { +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $274 +line 290 +;290: Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) ); +ADDRGP4 cg+6996 +ARGP4 +ADDRLP4 56 +ARGP4 +CNSTI4 32 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 291 +;291: } +LABELV $274 +line 292 +;292: } +LABELV $272 +line 294 +;293: +;294: if ( attacker != ENTITYNUM_WORLD ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 1022 +EQI4 $279 +line 295 +;295: switch (mod) { +ADDRLP4 44 +INDIRI4 +CNSTI4 1 +LTI4 $281 +ADDRLP4 44 +INDIRI4 +CNSTI4 37 +GTI4 $281 +ADDRLP4 44 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $332-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $332 +address $283 +address $285 +address $287 +address $289 +address $289 +address $291 +address $293 +address $293 +address $295 +address $297 +address $299 +address $301 +address $301 +address $303 +address $303 +address $305 +address $307 +address $309 +address $309 +address $311 +address $311 +address $313 +address $313 +address $315 +address $317 +address $319 +address $321 +address $323 +address $281 +address $281 +address $281 +address $327 +address $325 +address $329 +address $281 +address $281 +address $331 +code +LABELV $283 +line 297 +;296: case MOD_STUN_BATON: +;297: message = "KILLED_STUN"; +ADDRLP4 8 +ADDRGP4 $284 +ASGNP4 +line 298 +;298: break; +ADDRGP4 $282 +JUMPV +LABELV $285 +line 300 +;299: case MOD_MELEE: +;300: message = "KILLED_MELEE"; +ADDRLP4 8 +ADDRGP4 $286 +ASGNP4 +line 301 +;301: break; +ADDRGP4 $282 +JUMPV +LABELV $287 +line 303 +;302: case MOD_SABER: +;303: message = "KILLED_SABER"; +ADDRLP4 8 +ADDRGP4 $288 +ASGNP4 +line 304 +;304: break; +ADDRGP4 $282 +JUMPV +LABELV $289 +line 307 +;305: case MOD_BRYAR_PISTOL: +;306: case MOD_BRYAR_PISTOL_ALT: +;307: message = "KILLED_BRYAR"; +ADDRLP4 8 +ADDRGP4 $290 +ASGNP4 +line 308 +;308: break; +ADDRGP4 $282 +JUMPV +LABELV $291 +line 310 +;309: case MOD_BLASTER: +;310: message = "KILLED_BLASTER"; +ADDRLP4 8 +ADDRGP4 $292 +ASGNP4 +line 311 +;311: break; +ADDRGP4 $282 +JUMPV +LABELV $293 +line 314 +;312: case MOD_DISRUPTOR: +;313: case MOD_DISRUPTOR_SPLASH: +;314: message = "KILLED_DISRUPTOR"; +ADDRLP4 8 +ADDRGP4 $294 +ASGNP4 +line 315 +;315: break; +ADDRGP4 $282 +JUMPV +LABELV $295 +line 317 +;316: case MOD_DISRUPTOR_SNIPER: +;317: message = "KILLED_DISRUPTORSNIPE"; +ADDRLP4 8 +ADDRGP4 $296 +ASGNP4 +line 318 +;318: break; +ADDRGP4 $282 +JUMPV +LABELV $297 +line 320 +;319: case MOD_BOWCASTER: +;320: message = "KILLED_BOWCASTER"; +ADDRLP4 8 +ADDRGP4 $298 +ASGNP4 +line 321 +;321: break; +ADDRGP4 $282 +JUMPV +LABELV $299 +line 323 +;322: case MOD_REPEATER: +;323: message = "KILLED_REPEATER"; +ADDRLP4 8 +ADDRGP4 $300 +ASGNP4 +line 324 +;324: break; +ADDRGP4 $282 +JUMPV +LABELV $301 +line 327 +;325: case MOD_REPEATER_ALT: +;326: case MOD_REPEATER_ALT_SPLASH: +;327: message = "KILLED_REPEATERALT"; +ADDRLP4 8 +ADDRGP4 $302 +ASGNP4 +line 328 +;328: break; +ADDRGP4 $282 +JUMPV +LABELV $303 +line 331 +;329: case MOD_DEMP2: +;330: case MOD_DEMP2_ALT: +;331: message = "KILLED_DEMP2"; +ADDRLP4 8 +ADDRGP4 $304 +ASGNP4 +line 332 +;332: break; +ADDRGP4 $282 +JUMPV +LABELV $305 +line 334 +;333: case MOD_FLECHETTE: +;334: message = "KILLED_FLECHETTE"; +ADDRLP4 8 +ADDRGP4 $306 +ASGNP4 +line 335 +;335: break; +ADDRGP4 $282 +JUMPV +LABELV $307 +line 337 +;336: case MOD_FLECHETTE_ALT_SPLASH: +;337: message = "KILLED_FLECHETTE_MINE"; +ADDRLP4 8 +ADDRGP4 $308 +ASGNP4 +line 338 +;338: break; +ADDRGP4 $282 +JUMPV +LABELV $309 +line 341 +;339: case MOD_ROCKET: +;340: case MOD_ROCKET_SPLASH: +;341: message = "KILLED_ROCKET"; +ADDRLP4 8 +ADDRGP4 $310 +ASGNP4 +line 342 +;342: break; +ADDRGP4 $282 +JUMPV +LABELV $311 +line 345 +;343: case MOD_ROCKET_HOMING: +;344: case MOD_ROCKET_HOMING_SPLASH: +;345: message = "KILLED_ROCKET_HOMING"; +ADDRLP4 8 +ADDRGP4 $312 +ASGNP4 +line 346 +;346: break; +ADDRGP4 $282 +JUMPV +LABELV $313 +line 349 +;347: case MOD_THERMAL: +;348: case MOD_THERMAL_SPLASH: +;349: message = "KILLED_THERMAL"; +ADDRLP4 8 +ADDRGP4 $314 +ASGNP4 +line 350 +;350: break; +ADDRGP4 $282 +JUMPV +LABELV $315 +line 352 +;351: case MOD_TRIP_MINE_SPLASH: +;352: message = "KILLED_TRIPMINE"; +ADDRLP4 8 +ADDRGP4 $316 +ASGNP4 +line 353 +;353: break; +ADDRGP4 $282 +JUMPV +LABELV $317 +line 355 +;354: case MOD_TIMED_MINE_SPLASH: +;355: message = "KILLED_TRIPMINE_TIMED"; +ADDRLP4 8 +ADDRGP4 $318 +ASGNP4 +line 356 +;356: break; +ADDRGP4 $282 +JUMPV +LABELV $319 +line 358 +;357: case MOD_DET_PACK_SPLASH: +;358: message = "KILLED_DETPACK"; +ADDRLP4 8 +ADDRGP4 $320 +ASGNP4 +line 359 +;359: break; +ADDRGP4 $282 +JUMPV +LABELV $321 +line 361 +;360: case MOD_FORCE_DARK: +;361: message = "KILLED_DARKFORCE"; +ADDRLP4 8 +ADDRGP4 $322 +ASGNP4 +line 362 +;362: break; +ADDRGP4 $282 +JUMPV +LABELV $323 +line 364 +;363: case MOD_SENTRY: +;364: message = "KILLED_SENTRY"; +ADDRLP4 8 +ADDRGP4 $324 +ASGNP4 +line 365 +;365: break; +ADDRGP4 $282 +JUMPV +LABELV $325 +line 367 +;366: case MOD_TELEFRAG: +;367: message = "KILLED_TELEFRAG"; +ADDRLP4 8 +ADDRGP4 $326 +ASGNP4 +line 368 +;368: break; +ADDRGP4 $282 +JUMPV +LABELV $327 +line 370 +;369: case MOD_CRUSH: +;370: message = "KILLED_GENERIC";//"KILLED_FORCETOSS"; +ADDRLP4 8 +ADDRGP4 $328 +ASGNP4 +line 371 +;371: break; +ADDRGP4 $282 +JUMPV +LABELV $329 +line 373 +;372: case MOD_FALLING: +;373: message = "KILLED_FORCETOSS"; +ADDRLP4 8 +ADDRGP4 $330 +ASGNP4 +line 374 +;374: break; +ADDRGP4 $282 +JUMPV +LABELV $331 +line 376 +;375: case MOD_TRIGGER_HURT: +;376: message = "KILLED_GENERIC";//"KILLED_FORCETOSS"; +ADDRLP4 8 +ADDRGP4 $328 +ASGNP4 +line 377 +;377: break; +ADDRGP4 $282 +JUMPV +LABELV $281 +line 379 +;378: default: +;379: message = "KILLED_GENERIC"; +ADDRLP4 8 +ADDRGP4 $328 +ASGNP4 +line 380 +;380: break; +LABELV $282 +line 383 +;381: } +;382: +;383: if (message) { +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $334 +line 384 +;384: message = (char *)CG_GetStripEdString("INGAMETEXT", message); +ADDRGP4 $241 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 132 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 132 +INDIRP4 +ASGNP4 +line 386 +;385: +;386: CG_Printf( "%s %s %s\n", +ADDRGP4 $336 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 56 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 388 +;387: targetName, message, attackerName); +;388: return; +ADDRGP4 $166 +JUMPV +LABELV $334 +line 390 +;389: } +;390: } +LABELV $279 +line 393 +;391: +;392: // we don't know what it was +;393: CG_Printf( "%s %s\n", targetName, (char *)CG_GetStripEdString("INGAMETEXT", "DIED_GENERIC") ); +ADDRGP4 $241 +ARGP4 +ADDRGP4 $182 +ARGP4 +ADDRLP4 128 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $242 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 128 +INDIRP4 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 394 +;394:} +LABELV $166 +endproc CG_Obituary 1168 24 +export CG_ToggleBinoculars +proc CG_ToggleBinoculars 0 16 +line 399 +;395: +;396://========================================================================== +;397: +;398:void CG_ToggleBinoculars(centity_t *cent, int forceZoom) +;399:{ +line 400 +;400: if (cent->currentState.number != cg.snap->ps.clientNum) +ADDRFP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $338 +line 401 +;401: { +line 402 +;402: return; +ADDRGP4 $337 +JUMPV +LABELV $338 +line 405 +;403: } +;404: +;405: if (cg.snap->ps.weaponstate != WEAPON_READY) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $341 +line 406 +;406: { //So we can't fool it and reactivate while switching to the saber or something. +line 407 +;407: return; +ADDRGP4 $337 +JUMPV +LABELV $341 +line 410 +;408: } +;409: +;410: if (cg.snap->ps.weapon == WP_SABER) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $344 +line 411 +;411: { //No. +line 412 +;412: return; +ADDRGP4 $337 +JUMPV +LABELV $344 +line 415 +;413: } +;414: +;415: if (forceZoom) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $347 +line 416 +;416: { +line 417 +;417: if (forceZoom == 2) +ADDRFP4 4 +INDIRI4 +CNSTI4 2 +NEI4 $349 +line 418 +;418: { +line 419 +;419: cg.snap->ps.zoomMode = 0; +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1376 +ADDP4 +CNSTI4 0 +ASGNI4 +line 420 +;420: } +ADDRGP4 $350 +JUMPV +LABELV $349 +line 421 +;421: else if (forceZoom == 1) +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +NEI4 $352 +line 422 +;422: { +line 423 +;423: cg.snap->ps.zoomMode = 2; +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1376 +ADDP4 +CNSTI4 2 +ASGNI4 +line 424 +;424: } +LABELV $352 +LABELV $350 +line 425 +;425: } +LABELV $347 +line 427 +;426: +;427: if (cg.snap->ps.zoomMode == 0) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1376 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $355 +line 428 +;428: { +line 429 +;429: trap_S_StartSound( NULL, cg.snap->ps.clientNum, CHAN_AUTO, cgs.media.zoomStart ); +CNSTP4 0 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+1252 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 430 +;430: } +ADDRGP4 $356 +JUMPV +LABELV $355 +line 431 +;431: else if (cg.snap->ps.zoomMode == 2) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1376 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $361 +line 432 +;432: { +line 433 +;433: trap_S_StartSound( NULL, cg.snap->ps.clientNum, CHAN_AUTO, cgs.media.zoomEnd ); +CNSTP4 0 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+1260 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 434 +;434: } +LABELV $361 +LABELV $356 +line 435 +;435:} +LABELV $337 +endproc CG_ToggleBinoculars 0 16 +proc CG_UseItem 32 16 +line 442 +;436: +;437:/* +;438:=============== +;439:CG_UseItem +;440:=============== +;441:*/ +;442:static void CG_UseItem( centity_t *cent ) { +line 448 +;443: clientInfo_t *ci; +;444: int itemNum, clientNum; +;445: gitem_t *item; +;446: entityState_t *es; +;447: +;448: es = ¢->currentState; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 450 +;449: +;450: itemNum = (es->event & ~EV_EVENT_BITS) - EV_USE_ITEM0; +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CNSTI4 -769 +BANDI4 +CNSTI4 40 +SUBI4 +ASGNI4 +line 451 +;451: if ( itemNum < 0 || itemNum > HI_NUM_HOLDABLE ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $370 +ADDRLP4 0 +INDIRI4 +CNSTI4 7 +LEI4 $368 +LABELV $370 +line 452 +;452: itemNum = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 453 +;453: } +LABELV $368 +line 456 +;454: +;455: // print a message if the local player +;456: if ( es->number == cg.snap->ps.clientNum ) { +ADDRLP4 4 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $371 +line 457 +;457: if ( !itemNum ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $374 +line 459 +;458: //CG_CenterPrint( "No item to use", SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH ); +;459: } else { +ADDRGP4 $375 +JUMPV +LABELV $374 +line 460 +;460: item = BG_FindItemForHoldable( itemNum ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 BG_FindItemForHoldable +CALLP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 24 +INDIRP4 +ASGNP4 +line 461 +;461: } +LABELV $375 +line 462 +;462: } +LABELV $371 +line 464 +;463: +;464: switch ( itemNum ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $377 +ADDRLP4 0 +INDIRI4 +CNSTI4 6 +GTI4 $377 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $391 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $391 +address $377 +address $380 +address $377 +address $384 +address $377 +address $379 +address $377 +code +line 468 +;465: default: +;466: case HI_NONE: +;467: //trap_S_StartSound (NULL, es->number, CHAN_BODY, cgs.media.useNothingSound ); +;468: break; +LABELV $379 +line 471 +;469: +;470: case HI_BINOCULARS: +;471: CG_ToggleBinoculars(cent, es->eventParm); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_ToggleBinoculars +CALLV +pop +line 472 +;472: break; +ADDRGP4 $377 +JUMPV +LABELV $380 +line 475 +;473: +;474: case HI_SEEKER: +;475: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.deploySeeker ); +CNSTP4 0 +ARGP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+768 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 476 +;476: break; +ADDRGP4 $377 +JUMPV +line 481 +;477: +;478: case HI_SHIELD: +;479: case HI_DATAPAD: +;480: case HI_SENTRY_GUN: +;481: break; +LABELV $384 +line 485 +;482: +;483:// case HI_MEDKIT: +;484: case HI_MEDPAC: +;485: clientNum = cent->currentState.clientNum; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ASGNI4 +line 486 +;486: if ( clientNum >= 0 && clientNum < MAX_CLIENTS ) { +ADDRLP4 28 +ADDRLP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +LTI4 $385 +ADDRLP4 28 +INDIRI4 +CNSTI4 32 +GEI4 $385 +line 487 +;487: ci = &cgs.clientinfo[ clientNum ]; +ADDRLP4 16 +CNSTI4 788 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 488 +;488: ci->medkitUsageTime = cg.time; +ADDRLP4 16 +INDIRP4 +CNSTI4 152 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 489 +;489: } +LABELV $385 +line 490 +;490: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.medkitSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+772 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 491 +;491: break; +LABELV $377 +line 494 +;492: } +;493: +;494: if (cg.snap && cg.snap->ps.clientNum == cent->currentState.number && itemNum != HI_BINOCULARS) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $392 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +NEI4 $392 +ADDRLP4 0 +INDIRI4 +CNSTI4 5 +EQI4 $392 +line 495 +;495: { //if not using binoculars, we just used that item up, so switch +line 496 +;496: BG_CycleInven(&cg.snap->ps, 1); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 BG_CycleInven +CALLV +pop +line 497 +;497: cg.itemSelect = -1; //update the client-side selection display +ADDRGP4 cg+3516 +CNSTI4 -1 +ASGNI4 +line 498 +;498: } +LABELV $392 +line 499 +;499:} +LABELV $367 +endproc CG_UseItem 32 16 +proc CG_ItemPickup 1044 12 +line 509 +;500: +;501: +;502:/* +;503:================ +;504:CG_ItemPickup +;505: +;506:A new item was picked up this frame +;507:================ +;508:*/ +;509:static void CG_ItemPickup( int itemNum ) { +line 510 +;510: cg.itemPickup = itemNum; +ADDRGP4 cg+13360 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 511 +;511: cg.itemPickupTime = cg.time; +ADDRGP4 cg+13364 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 512 +;512: cg.itemPickupBlendTime = cg.time; +ADDRGP4 cg+13368 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 514 +;513: // see if it should be the grabbed weapon +;514: if ( cg.snap && bg_itemlist[itemNum].giType == IT_WEAPON ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $404 +CNSTI4 52 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+36 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $404 +line 521 +;515: +;516: // 0 == no switching +;517: // 1 == automatically switch to best SAFE weapon +;518: // 2 == automatically switch to best weapon, safe or otherwise +;519: // 3 == if not saber, automatically switch to best weapon, safe or otherwise +;520: +;521: if (0 == cg_autoswitch.integer) +ADDRGP4 cg_autoswitch+12 +INDIRI4 +CNSTI4 0 +NEI4 $408 +line 522 +;522: { +line 524 +;523: // don't switch +;524: } +ADDRGP4 $409 +JUMPV +LABELV $408 +line 525 +;525: else if ( cg_autoswitch.integer == 1) +ADDRGP4 cg_autoswitch+12 +INDIRI4 +CNSTI4 1 +NEI4 $411 +line 526 +;526: { //only autoselect if not explosive ("safe") +line 527 +;527: if (bg_itemlist[itemNum].giTag != WP_TRIP_MINE && +ADDRLP4 0 +CNSTI4 52 +ADDRFP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +CNSTI4 12 +EQI4 $412 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +CNSTI4 13 +EQI4 $412 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +CNSTI4 11 +EQI4 $412 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +CNSTI4 10 +EQI4 $412 +ADDRLP4 4 +CNSTI4 192 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRI4 +LEI4 $412 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 2 +EQI4 $412 +line 533 +;528: bg_itemlist[itemNum].giTag != WP_DET_PACK && +;529: bg_itemlist[itemNum].giTag != WP_THERMAL && +;530: bg_itemlist[itemNum].giTag != WP_ROCKET_LAUNCHER && +;531: bg_itemlist[itemNum].giTag > cg.snap->ps.weapon && +;532: cg.snap->ps.weapon != WP_SABER) +;533: { +line 534 +;534: if (!cg.snap->ps.emplacedIndex) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $423 +line 535 +;535: { +line 536 +;536: cg.weaponSelectTime = cg.time; +ADDRGP4 cg+13372 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 537 +;537: } +LABELV $423 +line 538 +;538: cg.weaponSelect = bg_itemlist[itemNum].giTag; +ADDRGP4 cg+3508 +CNSTI4 52 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ASGNI4 +line 539 +;539: } +line 540 +;540: } +ADDRGP4 $412 +JUMPV +LABELV $411 +line 541 +;541: else if ( cg_autoswitch.integer == 2) +ADDRGP4 cg_autoswitch+12 +INDIRI4 +CNSTI4 2 +NEI4 $430 +line 542 +;542: { //autoselect if better +line 543 +;543: if (bg_itemlist[itemNum].giTag > cg.snap->ps.weapon && +ADDRLP4 0 +CNSTI4 192 +ASGNI4 +CNSTI4 52 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRI4 +LEI4 $433 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 2 +EQI4 $433 +line 545 +;544: cg.snap->ps.weapon != WP_SABER) +;545: { +line 546 +;546: if (!cg.snap->ps.emplacedIndex) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $438 +line 547 +;547: { +line 548 +;548: cg.weaponSelectTime = cg.time; +ADDRGP4 cg+13372 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 549 +;549: } +LABELV $438 +line 550 +;550: cg.weaponSelect = bg_itemlist[itemNum].giTag; +ADDRGP4 cg+3508 +CNSTI4 52 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ASGNI4 +line 551 +;551: } +LABELV $433 +line 552 +;552: } +LABELV $430 +LABELV $412 +LABELV $409 +line 568 +;553: /* +;554: else if ( cg_autoswitch.integer == 3) +;555: { //autoselect if better and not using the saber as a weapon +;556: if (bg_itemlist[itemNum].giTag > cg.snap->ps.weapon && +;557: cg.snap->ps.weapon != WP_SABER) +;558: { +;559: if (!cg.snap->ps.emplacedIndex) +;560: { +;561: cg.weaponSelectTime = cg.time; +;562: } +;563: cg.weaponSelect = bg_itemlist[itemNum].giTag; +;564: } +;565: } +;566: */ +;567: //No longer required - just not switching ever if using saber +;568: } +LABELV $404 +line 571 +;569: +;570: //rww - print pickup messages +;571: if (bg_itemlist[itemNum].classname && bg_itemlist[itemNum].classname[0] && +ADDRLP4 0 +CNSTI4 52 +ADDRFP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_itemlist +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $445 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $445 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_itemlist+36 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $450 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +CNSTI4 4 +EQI4 $445 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +CNSTI4 5 +EQI4 $445 +LABELV $450 +line 573 +;572: (bg_itemlist[itemNum].giType != IT_TEAM || (bg_itemlist[itemNum].giTag != PW_REDFLAG && bg_itemlist[itemNum].giTag != PW_BLUEFLAG)) ) +;573: { //don't print messages for flags, they have their own pickup event broadcasts +line 576 +;574: char text[1024]; +;575: +;576: if ( trap_SP_GetStringTextString( va("INGAME_%s",bg_itemlist[itemNum].classname), text, sizeof( text ))) +ADDRGP4 $453 +ARGP4 +CNSTI4 52 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1032 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1032 +INDIRP4 +ARGP4 +ADDRLP4 8 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRLP4 1036 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +ASGNI4 +ADDRLP4 1036 +INDIRI4 +CNSTI4 0 +EQI4 $451 +line 577 +;577: { +line 578 +;578: Com_Printf("%s %s\n", CG_GetStripEdString("INGAMETEXT", "PICKUPLINE"), text); +ADDRGP4 $241 +ARGP4 +ADDRGP4 $454 +ARGP4 +ADDRLP4 1040 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $242 +ARGP4 +ADDRLP4 1040 +INDIRP4 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 579 +;579: } +ADDRGP4 $452 +JUMPV +LABELV $451 +line 581 +;580: else +;581: { +line 582 +;582: Com_Printf("%s %s\n", CG_GetStripEdString("INGAMETEXT", "PICKUPLINE"), bg_itemlist[itemNum].classname); +ADDRGP4 $241 +ARGP4 +ADDRGP4 $454 +ARGP4 +ADDRLP4 1040 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $242 +ARGP4 +ADDRLP4 1040 +INDIRP4 +ARGP4 +CNSTI4 52 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 583 +;583: } +LABELV $452 +line 584 +;584: } +LABELV $445 +line 585 +;585:} +LABELV $398 +endproc CG_ItemPickup 1044 12 +export CG_PainEvent +proc CG_PainEvent 12 16 +line 595 +;586: +;587: +;588:/* +;589:================ +;590:CG_PainEvent +;591: +;592:Also called by playerstate transition +;593:================ +;594:*/ +;595:void CG_PainEvent( centity_t *cent, int health ) { +line 599 +;596: char *snd; +;597: +;598: // don't do more than two pain sounds a second +;599: if ( cg.time - cent->pe.painTime < 500 ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 836 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 500 +GEI4 $456 +line 600 +;600: return; +ADDRGP4 $455 +JUMPV +LABELV $456 +line 603 +;601: } +;602: +;603: if ( health < 25 ) { +ADDRFP4 4 +INDIRI4 +CNSTI4 25 +GEI4 $459 +line 604 +;604: snd = "*pain25.wav"; +ADDRLP4 0 +ADDRGP4 $461 +ASGNP4 +line 605 +;605: } else if ( health < 50 ) { +ADDRGP4 $460 +JUMPV +LABELV $459 +ADDRFP4 4 +INDIRI4 +CNSTI4 50 +GEI4 $462 +line 606 +;606: snd = "*pain50.wav"; +ADDRLP4 0 +ADDRGP4 $464 +ASGNP4 +line 607 +;607: } else if ( health < 75 ) { +ADDRGP4 $463 +JUMPV +LABELV $462 +ADDRFP4 4 +INDIRI4 +CNSTI4 75 +GEI4 $465 +line 608 +;608: snd = "*pain75.wav"; +ADDRLP4 0 +ADDRGP4 $467 +ASGNP4 +line 609 +;609: } else { +ADDRGP4 $466 +JUMPV +LABELV $465 +line 610 +;610: snd = "*pain100.wav"; +ADDRLP4 0 +ADDRGP4 $468 +ASGNP4 +line 611 +;611: } +LABELV $466 +LABELV $463 +LABELV $460 +line 612 +;612: trap_S_StartSound( NULL, cent->currentState.number, CHAN_VOICE, +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 616 +;613: CG_CustomSound( cent->currentState.number, snd ) ); +;614: +;615: // save pain time for programitic twitch animation +;616: cent->pe.painTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 836 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 617 +;617: cent->pe.painDirection ^= 1; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 840 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +BXORI4 +ASGNI4 +line 618 +;618:} +LABELV $455 +endproc CG_PainEvent 12 16 +export CG_ReattachLimb +proc CG_ReattachLimb 16 12 +line 621 +;619: +;620:void CG_ReattachLimb(centity_t *source) +;621:{ +line 625 +;622: char *limbName; +;623: char *stubCapName; +;624: +;625: switch (source->torsoBolt) +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 10 +LTI4 $471 +ADDRLP4 8 +INDIRI4 +CNSTI4 16 +GTI4 $471 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $495-40 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $495 +address $474 +address $477 +address $480 +address $483 +address $486 +address $489 +address $492 +code +line 626 +;626: { +LABELV $474 +line 628 +;627: case G2_MODELPART_HEAD: +;628: limbName = "head"; +ADDRLP4 0 +ADDRGP4 $475 +ASGNP4 +line 629 +;629: stubCapName = "torso_cap_head_off"; +ADDRLP4 4 +ADDRGP4 $476 +ASGNP4 +line 630 +;630: break; +ADDRGP4 $472 +JUMPV +LABELV $477 +line 632 +;631: case G2_MODELPART_WAIST: +;632: limbName = "torso"; +ADDRLP4 0 +ADDRGP4 $478 +ASGNP4 +line 633 +;633: stubCapName = "hips_cap_torso_off"; +ADDRLP4 4 +ADDRGP4 $479 +ASGNP4 +line 634 +;634: break; +ADDRGP4 $472 +JUMPV +LABELV $480 +line 636 +;635: case G2_MODELPART_LARM: +;636: limbName = "l_arm"; +ADDRLP4 0 +ADDRGP4 $481 +ASGNP4 +line 637 +;637: stubCapName = "torso_cap_l_arm_off"; +ADDRLP4 4 +ADDRGP4 $482 +ASGNP4 +line 638 +;638: break; +ADDRGP4 $472 +JUMPV +LABELV $483 +line 640 +;639: case G2_MODELPART_RARM: +;640: limbName = "r_arm"; +ADDRLP4 0 +ADDRGP4 $484 +ASGNP4 +line 641 +;641: stubCapName = "torso_cap_r_arm_off"; +ADDRLP4 4 +ADDRGP4 $485 +ASGNP4 +line 642 +;642: break; +ADDRGP4 $472 +JUMPV +LABELV $486 +line 644 +;643: case G2_MODELPART_RHAND: +;644: limbName = "r_hand"; +ADDRLP4 0 +ADDRGP4 $487 +ASGNP4 +line 645 +;645: stubCapName = "r_arm_cap_r_hand_off"; +ADDRLP4 4 +ADDRGP4 $488 +ASGNP4 +line 646 +;646: break; +ADDRGP4 $472 +JUMPV +LABELV $489 +line 648 +;647: case G2_MODELPART_LLEG: +;648: limbName = "l_leg"; +ADDRLP4 0 +ADDRGP4 $490 +ASGNP4 +line 649 +;649: stubCapName = "hips_cap_l_leg_off"; +ADDRLP4 4 +ADDRGP4 $491 +ASGNP4 +line 650 +;650: break; +ADDRGP4 $472 +JUMPV +LABELV $492 +line 652 +;651: case G2_MODELPART_RLEG: +;652: limbName = "r_leg"; +ADDRLP4 0 +ADDRGP4 $493 +ASGNP4 +line 653 +;653: stubCapName = "hips_cap_r_leg_off"; +ADDRLP4 4 +ADDRGP4 $494 +ASGNP4 +line 654 +;654: break; +ADDRGP4 $472 +JUMPV +LABELV $471 +line 656 +;655: default: +;656: source->torsoBolt = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1012 +ADDP4 +CNSTI4 0 +ASGNI4 +line 657 +;657: source->ghoul2weapon = NULL; +ADDRFP4 0 +INDIRP4 +CNSTI4 960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 658 +;658: return; +ADDRGP4 $470 +JUMPV +LABELV $472 +line 661 +;659: } +;660: +;661: trap_G2API_SetSurfaceOnOff(source->ghoul2, limbName, 0); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 trap_G2API_SetSurfaceOnOff +CALLI4 +pop +line 662 +;662: trap_G2API_SetSurfaceOnOff(source->ghoul2, stubCapName, 0x00000100); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 trap_G2API_SetSurfaceOnOff +CALLI4 +pop +line 664 +;663: +;664: source->torsoBolt = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1012 +ADDP4 +CNSTI4 0 +ASGNI4 +line 666 +;665: +;666: source->ghoul2weapon = NULL; +ADDRFP4 0 +INDIRP4 +CNSTI4 960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 667 +;667:} +LABELV $470 +endproc CG_ReattachLimb 16 12 +proc CG_BodyQueueCopy 64 40 +line 670 +;668: +;669:static void CG_BodyQueueCopy(centity_t *cent, int clientNum, int knownWeapon) +;670:{ +line 674 +;671: centity_t *source; +;672: animation_t *anim; +;673: float animSpeed; +;674: int flags=BONE_ANIM_OVERRIDE_FREEZE; +ADDRLP4 12 +CNSTI4 72 +ASGNI4 +line 677 +;675: clientInfo_t *ci; +;676: +;677: if (cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $498 +line 678 +;678: { +line 679 +;679: trap_G2API_CleanGhoul2Models(¢->ghoul2); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 680 +;680: } +LABELV $498 +line 682 +;681: +;682: if (clientNum < 0 || clientNum >= MAX_CLIENTS) +ADDRLP4 20 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +LTI4 $502 +ADDRLP4 20 +INDIRI4 +CNSTI4 32 +LTI4 $500 +LABELV $502 +line 683 +;683: { +line 684 +;684: return; +ADDRGP4 $497 +JUMPV +LABELV $500 +line 687 +;685: } +;686: +;687: source = &cg_entities[ clientNum ]; +ADDRLP4 4 +CNSTI4 1920 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 688 +;688: ci = &cgs.clientinfo[ clientNum ]; +ADDRLP4 16 +CNSTI4 788 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 690 +;689: +;690: if (!source) +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $504 +line 691 +;691: { +line 692 +;692: return; +ADDRGP4 $497 +JUMPV +LABELV $504 +line 695 +;693: } +;694: +;695: if (!source->ghoul2) +ADDRLP4 4 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $506 +line 696 +;696: { +line 697 +;697: return; +ADDRGP4 $497 +JUMPV +LABELV $506 +line 700 +;698: } +;699: +;700: cent->isATST = source->isATST; +ADDRLP4 24 +CNSTI4 1028 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 702 +;701: +;702: cent->dustTrailTime = source->dustTrailTime; +ADDRLP4 28 +CNSTI4 616 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 704 +;703: +;704: trap_G2API_DuplicateGhoul2Instance(source->ghoul2, ¢->ghoul2); +ADDRLP4 32 +CNSTI4 952 +ASGNI4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_DuplicateGhoul2Instance +CALLV +pop +line 707 +;705: +;706: //either force the weapon from when we died or remove it if it was a dropped weapon +;707: if (knownWeapon > WP_BRYAR_PISTOL && trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) +ADDRFP4 8 +INDIRI4 +CNSTI4 3 +LEI4 $508 +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 36 +ADDRGP4 trap_G2API_HasGhoul2ModelOnIndex +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +EQI4 $508 +line 708 +;708: { +line 709 +;709: trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_G2API_RemoveGhoul2Model +CALLI4 +pop +line 710 +;710: } +ADDRGP4 $509 +JUMPV +LABELV $508 +line 711 +;711: else if (trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 40 +ADDRGP4 trap_G2API_HasGhoul2ModelOnIndex +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $510 +line 712 +;712: { +line 713 +;713: trap_G2API_CopySpecificGhoul2Model(g2WeaponInstances[knownWeapon], 0, cent->ghoul2, 1); +ADDRFP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 g2WeaponInstances +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_G2API_CopySpecificGhoul2Model +CALLV +pop +line 714 +;714: } +LABELV $510 +LABELV $509 +line 716 +;715: +;716: anim = &bgGlobalAnimations[ cent->currentState.torsoAnim ]; +ADDRLP4 0 +CNSTI4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ASGNP4 +line 717 +;717: animSpeed = 50.0f / anim->frameLerp; +ADDRLP4 8 +CNSTF4 1112014848 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 720 +;718: +;719: //this will just set us to the last frame of the animation, in theory +;720: if (source->isATST) +ADDRLP4 4 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $512 +line 721 +;721: { +line 722 +;722: int aNum = cgs.clientinfo[source->currentState.number].frame+1; +ADDRLP4 44 +CNSTI4 788 +ADDRLP4 4 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+76 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 723 +;723: anim = &bgGlobalAnimations[ BOTH_DEAD1 ]; +ADDRLP4 0 +ADDRGP4 bgGlobalAnimations+1316 +ASGNP4 +line 724 +;724: animSpeed = 1; +ADDRLP4 8 +CNSTF4 1065353216 +ASGNF4 +line 726 +;725: +;726: flags &= ~BONE_ANIM_OVERRIDE_LOOP; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 -17 +BANDI4 +ASGNI4 +ADDRGP4 $518 +JUMPV +LABELV $517 +line 729 +;727: +;728: while (aNum >= anim->firstFrame+anim->numFrames) +;729: { +line 730 +;730: aNum--; +ADDRLP4 44 +ADDRLP4 44 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 731 +;731: } +LABELV $518 +line 728 +ADDRLP4 44 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +GEI4 $517 +line 733 +;732: +;733: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "pelvis", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $520 +ARGP4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 734 +;734: } +ADDRGP4 $513 +JUMPV +LABELV $512 +line 736 +;735: else +;736: { +line 737 +;737: int aNum = cgs.clientinfo[source->currentState.number].frame+1; +ADDRLP4 44 +CNSTI4 788 +ADDRLP4 4 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+76 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRGP4 $525 +JUMPV +LABELV $524 +line 740 +;738: +;739: while (aNum >= anim->firstFrame+anim->numFrames) +;740: { +line 741 +;741: aNum--; +ADDRLP4 44 +ADDRLP4 44 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 742 +;742: } +LABELV $525 +line 739 +ADDRLP4 44 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +GEI4 $524 +line 744 +;743: +;744: if (aNum < anim->firstFrame-1) +ADDRLP4 44 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +GEI4 $527 +line 745 +;745: { //wrong animation...? +line 746 +;746: aNum = (anim->firstFrame+anim->numFrames)-1; +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 747 +;747: } +LABELV $527 +line 754 +;748: +;749: //if (!cgs.clientinfo[source->currentState.number].frame || (cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) != (source->currentState.torsoAnim&~ANIM_TOGGLEBIT) ) +;750: //{ +;751: // aNum = (anim->firstFrame+anim->numFrames)-1; +;752: //} +;753: +;754: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $529 +ARGP4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 755 +;755: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $531 +ARGP4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 756 +;756: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", aNum, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 150); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $533 +ARGP4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 757 +;757: } +LABELV $513 +line 760 +;758: +;759: //After we create the bodyqueue, regenerate any limbs on the real instance +;760: if (source->torsoBolt) +ADDRLP4 4 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $535 +line 761 +;761: { +line 762 +;762: CG_ReattachLimb(source); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 CG_ReattachLimb +CALLV +pop +line 763 +;763: } +LABELV $535 +line 764 +;764:} +LABELV $497 +endproc CG_BodyQueueCopy 64 40 +export CG_TeamName +proc CG_TeamName 0 0 +line 767 +;765: +;766:const char *CG_TeamName(int team) +;767:{ +line 768 +;768: if (team==TEAM_RED) +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +NEI4 $538 +line 769 +;769: return "RED"; +ADDRGP4 $540 +RETP4 +ADDRGP4 $537 +JUMPV +LABELV $538 +line 770 +;770: else if (team==TEAM_BLUE) +ADDRFP4 0 +INDIRI4 +CNSTI4 2 +NEI4 $541 +line 771 +;771: return "BLUE"; +ADDRGP4 $543 +RETP4 +ADDRGP4 $537 +JUMPV +LABELV $541 +line 772 +;772: else if (team==TEAM_SPECTATOR) +ADDRFP4 0 +INDIRI4 +CNSTI4 3 +NEI4 $544 +line 773 +;773: return "SPECTATOR"; +ADDRGP4 $546 +RETP4 +ADDRGP4 $537 +JUMPV +LABELV $544 +line 774 +;774: return "FREE"; +ADDRGP4 $547 +RETP4 +LABELV $537 +endproc CG_TeamName 0 0 +export CG_PrintCTFMessage +proc CG_PrintCTFMessage 1076 20 +line 778 +;775:} +;776: +;777:void CG_PrintCTFMessage(clientInfo_t *ci, const char *teamName, int ctfMessage) +;778:{ +line 780 +;779: char printMsg[1024]; +;780: char *refName = NULL; +ADDRLP4 1028 +CNSTP4 0 +ASGNP4 +line 781 +;781: const char *stripEdString = NULL; +ADDRLP4 0 +CNSTP4 0 +ASGNP4 +line 783 +;782: +;783: switch (ctfMessage) +ADDRLP4 1032 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 1032 +INDIRI4 +CNSTI4 0 +LTI4 $548 +ADDRLP4 1032 +INDIRI4 +CNSTI4 4 +GTI4 $548 +ADDRLP4 1032 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $561 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $561 +address $551 +address $553 +address $555 +address $557 +address $559 +code +line 784 +;784: { +LABELV $551 +line 786 +;785: case CTFMESSAGE_FRAGGED_FLAG_CARRIER: +;786: refName = "FRAGGED_FLAG_CARRIER"; +ADDRLP4 1028 +ADDRGP4 $552 +ASGNP4 +line 787 +;787: break; +ADDRGP4 $550 +JUMPV +LABELV $553 +line 789 +;788: case CTFMESSAGE_FLAG_RETURNED: +;789: refName = "FLAG_RETURNED"; +ADDRLP4 1028 +ADDRGP4 $554 +ASGNP4 +line 790 +;790: break; +ADDRGP4 $550 +JUMPV +LABELV $555 +line 792 +;791: case CTFMESSAGE_PLAYER_RETURNED_FLAG: +;792: refName = "PLAYER_RETURNED_FLAG"; +ADDRLP4 1028 +ADDRGP4 $556 +ASGNP4 +line 793 +;793: break; +ADDRGP4 $550 +JUMPV +LABELV $557 +line 795 +;794: case CTFMESSAGE_PLAYER_CAPTURED_FLAG: +;795: refName = "PLAYER_CAPTURED_FLAG"; +ADDRLP4 1028 +ADDRGP4 $558 +ASGNP4 +line 796 +;796: break; +ADDRGP4 $550 +JUMPV +LABELV $559 +line 798 +;797: case CTFMESSAGE_PLAYER_GOT_FLAG: +;798: refName = "PLAYER_GOT_FLAG"; +ADDRLP4 1028 +ADDRGP4 $560 +ASGNP4 +line 799 +;799: break; +line 801 +;800: default: +;801: return; +LABELV $550 +line 804 +;802: } +;803: +;804: stripEdString = CG_GetStripEdString("INGAMETEXT", refName); +ADDRGP4 $241 +ARGP4 +ADDRLP4 1028 +INDIRP4 +ARGP4 +ADDRLP4 1036 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 1036 +INDIRP4 +ASGNP4 +line 806 +;805: +;806: if (!stripEdString || !stripEdString[0]) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $564 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $562 +LABELV $564 +line 807 +;807: { +line 808 +;808: return; +ADDRGP4 $548 +JUMPV +LABELV $562 +line 811 +;809: } +;810: +;811: if (teamName && teamName[0]) +ADDRLP4 1044 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 1044 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $565 +ADDRLP4 1044 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $565 +line 812 +;812: { +line 813 +;813: const char *f = strstr(stripEdString, "%s"); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $567 +ARGP4 +ADDRLP4 1052 +ADDRGP4 strstr +CALLP4 +ASGNP4 +ADDRLP4 1048 +ADDRLP4 1052 +INDIRP4 +ASGNP4 +line 815 +;814: +;815: if (f) +ADDRLP4 1048 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $568 +line 816 +;816: { +line 817 +;817: int strLen = 0; +ADDRLP4 1060 +CNSTI4 0 +ASGNI4 +line 818 +;818: int i = 0; +ADDRLP4 1056 +CNSTI4 0 +ASGNI4 +line 820 +;819: +;820: if (ci) +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $574 +line 821 +;821: { +line 822 +;822: Com_sprintf(printMsg, sizeof(printMsg), "%s ", ci->name); +ADDRLP4 4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $572 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 823 +;823: strLen = strlen(printMsg); +ADDRLP4 4 +ARGP4 +ADDRLP4 1064 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 1060 +ADDRLP4 1064 +INDIRI4 +ASGNI4 +line 824 +;824: } +ADDRGP4 $574 +JUMPV +LABELV $573 +line 827 +;825: +;826: while (stripEdString[i] && i < 512) +;827: { +line 828 +;828: if (stripEdString[i] == '%' && +ADDRLP4 1056 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 37 +NEI4 $576 +ADDRLP4 1056 +INDIRI4 +CNSTI4 1 +ADDI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 115 +NEI4 $576 +line 830 +;829: stripEdString[i+1] == 's') +;830: { +line 831 +;831: printMsg[strLen] = '\0'; +ADDRLP4 1060 +INDIRI4 +ADDRLP4 4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 832 +;832: Q_strcat(printMsg, sizeof(printMsg), teamName); +ADDRLP4 4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 833 +;833: strLen = strlen(printMsg); +ADDRLP4 4 +ARGP4 +ADDRLP4 1072 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 1060 +ADDRLP4 1072 +INDIRI4 +ASGNI4 +line 835 +;834: +;835: i++; +ADDRLP4 1056 +ADDRLP4 1056 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 836 +;836: } +ADDRGP4 $577 +JUMPV +LABELV $576 +line 838 +;837: else +;838: { +line 839 +;839: printMsg[strLen] = stripEdString[i]; +ADDRLP4 1060 +INDIRI4 +ADDRLP4 4 +ADDP4 +ADDRLP4 1056 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 840 +;840: strLen++; +ADDRLP4 1060 +ADDRLP4 1060 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 841 +;841: } +LABELV $577 +line 843 +;842: +;843: i++; +ADDRLP4 1056 +ADDRLP4 1056 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 844 +;844: } +LABELV $574 +line 826 +ADDRLP4 1056 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $578 +ADDRLP4 1056 +INDIRI4 +CNSTI4 512 +LTI4 $573 +LABELV $578 +line 846 +;845: +;846: printMsg[strLen] = '\0'; +ADDRLP4 1060 +INDIRI4 +ADDRLP4 4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 848 +;847: +;848: goto doPrint; +ADDRGP4 $579 +JUMPV +LABELV $568 +line 850 +;849: } +;850: } +LABELV $565 +line 852 +;851: +;852: if (ci) +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $580 +line 853 +;853: { +line 854 +;854: Com_sprintf(printMsg, sizeof(printMsg), "%s %s", ci->name, stripEdString); +ADDRLP4 4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $265 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 855 +;855: } +ADDRGP4 $581 +JUMPV +LABELV $580 +line 857 +;856: else +;857: { +line 858 +;858: Com_sprintf(printMsg, sizeof(printMsg), "%s", stripEdString); +ADDRLP4 4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $567 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 859 +;859: } +LABELV $581 +LABELV $579 +line 862 +;860: +;861:doPrint: +;862: Com_Printf("%s\n", printMsg); +ADDRGP4 $582 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 863 +;863:} +LABELV $548 +endproc CG_PrintCTFMessage 1076 20 +export CG_GetCTFMessageEvent +proc CG_GetCTFMessageEvent 20 12 +line 866 +;864: +;865:void CG_GetCTFMessageEvent(entityState_t *es) +;866:{ +line 867 +;867: int clIndex = es->trickedentindex; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +line 868 +;868: int teamIndex = es->trickedentindex2; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ASGNI4 +line 869 +;869: clientInfo_t *ci = NULL; +ADDRLP4 8 +CNSTP4 0 +ASGNP4 +line 870 +;870: const char *teamName = NULL; +ADDRLP4 12 +CNSTP4 0 +ASGNP4 +line 872 +;871: +;872: if (clIndex < MAX_CLIENTS) +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +GEI4 $584 +line 873 +;873: { +line 874 +;874: ci = &cgs.clientinfo[clIndex]; +ADDRLP4 8 +CNSTI4 788 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 875 +;875: } +LABELV $584 +line 877 +;876: +;877: if (teamIndex < 50) +ADDRLP4 4 +INDIRI4 +CNSTI4 50 +GEI4 $587 +line 878 +;878: { +line 879 +;879: teamName = CG_TeamName(teamIndex); +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ADDRGP4 CG_TeamName +CALLP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 880 +;880: } +LABELV $587 +line 882 +;881: +;882: CG_PrintCTFMessage(ci, teamName, es->eventParm); +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_PrintCTFMessage +CALLV +pop +line 883 +;883:} +LABELV $583 +endproc CG_GetCTFMessageEvent 20 12 +export DoFall +proc DoFall 8 16 +line 886 +;884: +;885:void DoFall(centity_t *cent, entityState_t *es, int clientNum) +;886:{ +line 887 +;887: int delta = es->eventParm; +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ASGNI4 +line 889 +;888: +;889: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $590 +line 890 +;890: { //corpses crack into the ground ^_^ +line 891 +;891: if (delta > 25) +ADDRLP4 0 +INDIRI4 +CNSTI4 25 +LEI4 $592 +line 892 +;892: { +line 893 +;893: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.fallSound ); +CNSTP4 0 +ARGP4 +ADDRFP4 4 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+716 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 894 +;894: } +ADDRGP4 $591 +JUMPV +LABELV $592 +line 896 +;895: else +;896: { +line 897 +;897: trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( "sound/movers/objects/objectHit.wav" ) ); +ADDRGP4 $596 +ARGP4 +ADDRLP4 4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 4 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 898 +;898: } +line 899 +;899: } +ADDRGP4 $591 +JUMPV +LABELV $590 +line 900 +;900: else if (delta > 50) +ADDRLP4 0 +INDIRI4 +CNSTI4 50 +LEI4 $597 +line 901 +;901: { +line 902 +;902: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.fallSound ); +CNSTP4 0 +ARGP4 +ADDRFP4 4 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+716 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 903 +;903: trap_S_StartSound( NULL, cent->currentState.number, CHAN_VOICE, +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 $601 +ARGP4 +ADDRLP4 4 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 905 +;904: CG_CustomSound( cent->currentState.number, "*land1.wav" ) ); +;905: cent->pe.painTime = cg.time; // don't play a pain sound right after this +ADDRFP4 0 +INDIRP4 +CNSTI4 836 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 906 +;906: } +ADDRGP4 $598 +JUMPV +LABELV $597 +line 907 +;907: else if (delta > 44) +ADDRLP4 0 +INDIRI4 +CNSTI4 44 +LEI4 $603 +line 908 +;908: { +line 909 +;909: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.fallSound ); +CNSTP4 0 +ARGP4 +ADDRFP4 4 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+716 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 910 +;910: trap_S_StartSound( NULL, cent->currentState.number, CHAN_VOICE, +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 $601 +ARGP4 +ADDRLP4 4 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 912 +;911: CG_CustomSound( cent->currentState.number, "*land1.wav" ) ); +;912: cent->pe.painTime = cg.time; // don't play a pain sound right after this +ADDRFP4 0 +INDIRP4 +CNSTI4 836 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 913 +;913: } +ADDRGP4 $604 +JUMPV +LABELV $603 +line 915 +;914: else +;915: { +line 916 +;916: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.landSound ); +CNSTP4 0 +ARGP4 +ADDRFP4 4 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+712 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 917 +;917: } +LABELV $604 +LABELV $598 +LABELV $591 +line 919 +;918: +;919: if ( clientNum == cg.predictedPlayerState.clientNum ) +ADDRFP4 8 +INDIRI4 +ADDRGP4 cg+96+144 +INDIRI4 +NEI4 $610 +line 920 +;920: { +line 922 +;921: // smooth landing z changes +;922: cg.landChange = -delta; +ADDRGP4 cg+3500 +ADDRLP4 0 +INDIRI4 +NEGI4 +CVIF4 4 +ASGNF4 +line 923 +;923: if (cg.landChange > 32) +ADDRGP4 cg+3500 +INDIRF4 +CNSTF4 1107296256 +LEF4 $615 +line 924 +;924: { +line 925 +;925: cg.landChange = 32; +ADDRGP4 cg+3500 +CNSTF4 1107296256 +ASGNF4 +line 926 +;926: } +LABELV $615 +line 927 +;927: if (cg.landChange < -32) +ADDRGP4 cg+3500 +INDIRF4 +CNSTF4 3254779904 +GEF4 $619 +line 928 +;928: { +line 929 +;929: cg.landChange = -32; +ADDRGP4 cg+3500 +CNSTF4 3254779904 +ASGNF4 +line 930 +;930: } +LABELV $619 +line 931 +;931: cg.landTime = cg.time; +ADDRGP4 cg+3504 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 932 +;932: } +LABELV $610 +line 933 +;933:} +LABELV $589 +endproc DoFall 8 16 +export CG_InClientBitflags +proc CG_InClientBitflags 8 0 +line 936 +;934: +;935:int CG_InClientBitflags(entityState_t *ent, int client) +;936:{ +line 938 +;937: int checkIn; +;938: int sub = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 940 +;939: +;940: if (client > 47) +ADDRFP4 4 +INDIRI4 +CNSTI4 47 +LEI4 $626 +line 941 +;941: { +line 942 +;942: checkIn = ent->trickedentindex4; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRI4 +ASGNI4 +line 943 +;943: sub = 48; +ADDRLP4 0 +CNSTI4 48 +ASGNI4 +line 944 +;944: } +ADDRGP4 $627 +JUMPV +LABELV $626 +line 945 +;945: else if (client > 31) +ADDRFP4 4 +INDIRI4 +CNSTI4 31 +LEI4 $628 +line 946 +;946: { +line 947 +;947: checkIn = ent->trickedentindex3; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +ASGNI4 +line 948 +;948: sub = 32; +ADDRLP4 0 +CNSTI4 32 +ASGNI4 +line 949 +;949: } +ADDRGP4 $629 +JUMPV +LABELV $628 +line 950 +;950: else if (client > 15) +ADDRFP4 4 +INDIRI4 +CNSTI4 15 +LEI4 $630 +line 951 +;951: { +line 952 +;952: checkIn = ent->trickedentindex2; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ASGNI4 +line 953 +;953: sub = 16; +ADDRLP4 0 +CNSTI4 16 +ASGNI4 +line 954 +;954: } +ADDRGP4 $631 +JUMPV +LABELV $630 +line 956 +;955: else +;956: { +line 957 +;957: checkIn = ent->trickedentindex; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +line 958 +;958: } +LABELV $631 +LABELV $629 +LABELV $627 +line 960 +;959: +;960: if (checkIn & (1 << (client-sub))) +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDRFP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +SUBI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $632 +line 961 +;961: { +line 962 +;962: return 1; +CNSTI4 1 +RETI4 +ADDRGP4 $625 +JUMPV +LABELV $632 +line 965 +;963: } +;964: +;965: return 0; +CNSTI4 0 +RETI4 +LABELV $625 +endproc CG_InClientBitflags 8 0 +lit +align 4 +LABELV $1063 +byte 4 3245342720 +byte 4 3245342720 +byte 4 3246391296 +align 4 +LABELV $1064 +byte 4 1097859072 +byte 4 1097859072 +byte 4 1109393408 +align 4 +LABELV $1310 +byte 4 3245342720 +byte 4 3245342720 +byte 4 3246391296 +align 4 +LABELV $1311 +byte 4 1097859072 +byte 4 1097859072 +byte 4 1109393408 +align 4 +LABELV $1328 +byte 4 3245342720 +byte 4 3245342720 +byte 4 3246391296 +align 4 +LABELV $1329 +byte 4 1097859072 +byte 4 1097859072 +byte 4 1109393408 +export CG_EntityEvent +code +proc CG_EntityEvent 1252 36 +line 977 +;966:} +;967: +;968:/* +;969:============== +;970:CG_EntityEvent +;971: +;972:An entity has an event value +;973:also called by CG_CheckPlayerstateEvents +;974:============== +;975:*/ +;976:#define DEBUGNAME(x) if(cg_debugEvents.integer){CG_Printf(x"\n");} +;977:void CG_EntityEvent( centity_t *cent, vec3_t position ) { +line 984 +;978: entityState_t *es; +;979: int event; +;980: vec3_t dir; +;981: const char *s; +;982: int clientNum; +;983: clientInfo_t *ci; +;984: int eID = 0; +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +line 985 +;985: int isnd = 0; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 988 +;986: centity_t *cl_ent; +;987: +;988: es = ¢->currentState; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 989 +;989: event = es->event & ~EV_EVENT_BITS; +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CNSTI4 -769 +BANDI4 +ASGNI4 +line 991 +;990: +;991: if ( cg_debugEvents.integer ) { +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $635 +line 992 +;992: CG_Printf( "ent:%3i event:%3i ", es->number, event ); +ADDRGP4 $638 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRGP4 CG_Printf +CALLV +pop +line 993 +;993: } +LABELV $635 +line 995 +;994: +;995: if ( !event ) { +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $639 +line 996 +;996: DEBUGNAME("ZEROEVENT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $634 +ADDRGP4 $644 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 997 +;997: return; +ADDRGP4 $634 +JUMPV +LABELV $639 +line 1000 +;998: } +;999: +;1000: clientNum = es->clientNum; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ASGNI4 +line 1001 +;1001: if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +LTI4 $647 +ADDRLP4 4 +INDIRI4 +CNSTI4 32 +LTI4 $645 +LABELV $647 +line 1002 +;1002: clientNum = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 1003 +;1003: } +LABELV $645 +line 1004 +;1004: ci = &cgs.clientinfo[ clientNum ]; +ADDRLP4 36 +CNSTI4 788 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 1006 +;1005: +;1006: switch ( event ) { +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +LTI4 $649 +ADDRLP4 8 +INDIRI4 +CNSTI4 109 +GTI4 $649 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1756-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1756 +address $651 +address $658 +address $668 +address $679 +address $690 +address $701 +address $721 +address $721 +address $721 +address $721 +address $712 +address $751 +address $756 +address $773 +address $779 +address $834 +address $841 +address $848 +address $855 +address $861 +address $913 +address $927 +address $941 +address $948 +address $986 +address $999 +address $1005 +address $1032 +address $1053 +address $1059 +address $1079 +address $1099 +address $1119 +address $1126 +address $1133 +address $1146 +address $1175 +address $1197 +address $649 +address $1207 +address $1212 +address $1217 +address $1222 +address $1227 +address $1232 +address $1237 +address $1242 +address $1247 +address $1252 +address $1257 +address $1262 +address $1267 +address $1272 +address $1277 +address $649 +address $1282 +address $1347 +address $1340 +address $1305 +address $1323 +address $1355 +address $1428 +address $1454 +address $1489 +address $1505 +address $1514 +address $1531 +address $1542 +address $1600 +address $1609 +address $1614 +address $1619 +address $1433 +address $1440 +address $1447 +address $649 +address $1636 +address $1646 +address $1646 +address $1646 +address $1657 +address $1662 +address $1673 +address $1684 +address $1694 +address $1360 +address $1365 +address $1370 +address $1375 +address $1380 +address $1392 +address $1403 +address $1416 +address $1422 +address $1713 +address $1722 +address $1731 +address $1736 +address $1741 +address $1708 +address $1699 +address $792 +address $798 +address $804 +address $810 +address $816 +address $822 +address $828 +address $1746 +code +LABELV $651 +line 1011 +;1007: // +;1008: // movement generated events +;1009: // +;1010: case EV_CLIENTJOIN: +;1011: DEBUGNAME("EV_CLIENTJOIN"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $652 +ADDRGP4 $655 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $652 +line 1014 +;1012: +;1013: //Slight hack to force a local reinit of client entity on join. +;1014: cl_ent = &cg_entities[es->eventParm]; +ADDRLP4 32 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 1016 +;1015: +;1016: if (cl_ent) +ADDRLP4 32 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $650 +line 1017 +;1017: { +line 1018 +;1018: cl_ent->isATST = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1028 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1019 +;1019: cl_ent->atstFootClang = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1032 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1020 +;1020: cl_ent->atstSwinging = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1036 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1022 +;1021:// cl_ent->torsoBolt = 0; +;1022: cl_ent->bolt1 = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 984 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1023 +;1023: cl_ent->bolt2 = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 988 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1024 +;1024: cl_ent->bolt3 = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 992 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1025 +;1025: cl_ent->bolt4 = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 996 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1026 +;1026: cl_ent->saberLength = SABER_LENGTH_MAX; +ADDRLP4 32 +INDIRP4 +CNSTI4 1000 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 1027 +;1027: cl_ent->saberExtendTime = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1004 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1028 +;1028: cl_ent->boltInfo = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 980 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1029 +;1029: cl_ent->frame_minus1_refreshed = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1464 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1030 +;1030: cl_ent->frame_minus2_refreshed = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1468 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1031 +;1031: cl_ent->frame_hold_time = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1684 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1032 +;1032: cl_ent->frame_hold_refreshed = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1688 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1033 +;1033: cl_ent->trickAlpha = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1904 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1034 +;1034: cl_ent->trickAlphaTime = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1908 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1035 +;1035: cl_ent->ghoul2weapon = NULL; +ADDRLP4 32 +INDIRP4 +CNSTI4 960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 1036 +;1036: cl_ent->weapon = WP_NONE; +ADDRLP4 32 +INDIRP4 +CNSTI4 956 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1037 +;1037: cl_ent->teamPowerEffectTime = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1912 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1038 +;1038: cl_ent->teamPowerType = 0; +ADDRLP4 32 +INDIRP4 +CNSTI4 1916 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1039 +;1039: } +line 1040 +;1040: break; +ADDRGP4 $650 +JUMPV +LABELV $658 +line 1043 +;1041: +;1042: case EV_FOOTSTEP: +;1043: DEBUGNAME("EV_FOOTSTEP"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $659 +ADDRGP4 $662 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $659 +line 1044 +;1044: if (cg_footsteps.integer) { +ADDRGP4 cg_footsteps+12 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 1045 +;1045: trap_S_StartSound (NULL, es->number, CHAN_BODY, +ADDRLP4 52 +ADDRGP4 rand +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRLP4 36 +INDIRP4 +CNSTI4 476 +ADDP4 +INDIRI4 +CNSTI4 4 +LSHI4 +ADDRGP4 cgs+70296+604 +ADDP4 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1047 +;1046: cgs.media.footsteps[ ci->footsteps ][rand()&3] ); +;1047: } +line 1048 +;1048: break; +ADDRGP4 $650 +JUMPV +LABELV $668 +line 1050 +;1049: case EV_FOOTSTEP_METAL: +;1050: DEBUGNAME("EV_FOOTSTEP_METAL"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $669 +ADDRGP4 $672 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $669 +line 1051 +;1051: if (cg_footsteps.integer) { +ADDRGP4 cg_footsteps+12 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 1052 +;1052: trap_S_StartSound (NULL, es->number, CHAN_BODY, +ADDRLP4 52 +ADDRGP4 rand +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+604+16 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1054 +;1053: cgs.media.footsteps[ FOOTSTEP_METAL ][rand()&3] ); +;1054: } +line 1055 +;1055: break; +ADDRGP4 $650 +JUMPV +LABELV $679 +line 1057 +;1056: case EV_FOOTSPLASH: +;1057: DEBUGNAME("EV_FOOTSPLASH"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $680 +ADDRGP4 $683 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $680 +line 1058 +;1058: if (cg_footsteps.integer) { +ADDRGP4 cg_footsteps+12 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 1059 +;1059: trap_S_StartSound (NULL, es->number, CHAN_BODY, +ADDRLP4 52 +ADDRGP4 rand +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+604+32 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1061 +;1060: cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] ); +;1061: } +line 1062 +;1062: break; +ADDRGP4 $650 +JUMPV +LABELV $690 +line 1064 +;1063: case EV_FOOTWADE: +;1064: DEBUGNAME("EV_FOOTWADE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $691 +ADDRGP4 $694 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $691 +line 1065 +;1065: if (cg_footsteps.integer) { +ADDRGP4 cg_footsteps+12 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 1066 +;1066: trap_S_StartSound (NULL, es->number, CHAN_BODY, +ADDRLP4 52 +ADDRGP4 rand +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+604+32 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1068 +;1067: cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] ); +;1068: } +line 1069 +;1069: break; +ADDRGP4 $650 +JUMPV +LABELV $701 +line 1071 +;1070: case EV_SWIM: +;1071: DEBUGNAME("EV_SWIM"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $702 +ADDRGP4 $705 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $702 +line 1072 +;1072: if (cg_footsteps.integer) { +ADDRGP4 cg_footsteps+12 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 1073 +;1073: trap_S_StartSound (NULL, es->number, CHAN_BODY, +ADDRLP4 52 +ADDRGP4 rand +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+604+32 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1075 +;1074: cgs.media.footsteps[ FOOTSTEP_SPLASH ][rand()&3] ); +;1075: } +line 1076 +;1076: break; +ADDRGP4 $650 +JUMPV +LABELV $712 +line 1080 +;1077: +;1078: +;1079: case EV_FALL: +;1080: DEBUGNAME("EV_FALL"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $713 +ADDRGP4 $716 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $713 +line 1081 +;1081: if (es->number == cg.snap->ps.clientNum && cg.snap->ps.fallingToDeath) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $717 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1396 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $717 +line 1082 +;1082: { +line 1083 +;1083: break; +ADDRGP4 $650 +JUMPV +LABELV $717 +line 1085 +;1084: } +;1085: DoFall(cent, es, clientNum); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 DoFall +CALLV +pop +line 1086 +;1086: break; +ADDRGP4 $650 +JUMPV +LABELV $721 +line 1091 +;1087: case EV_STEP_4: +;1088: case EV_STEP_8: +;1089: case EV_STEP_12: +;1090: case EV_STEP_16: // smooth out step up transitions +;1091: DEBUGNAME("EV_STEP"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $722 +ADDRGP4 $725 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $722 +line 1092 +;1092: { +line 1097 +;1093: float oldStep; +;1094: int delta; +;1095: int step; +;1096: +;1097: if ( clientNum != cg.predictedPlayerState.clientNum ) { +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+96+144 +INDIRI4 +EQI4 $726 +line 1098 +;1098: break; +ADDRGP4 $650 +JUMPV +LABELV $726 +line 1101 +;1099: } +;1100: // if we are interpolating, we don't need to smooth steps +;1101: if ( cg.demoPlayback || (cg.snap->ps.pm_flags & PMF_FOLLOW) || +ADDRLP4 64 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+8 +INDIRI4 +ADDRLP4 64 +INDIRI4 +NEI4 $738 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +ADDRLP4 64 +INDIRI4 +NEI4 $738 +ADDRGP4 cg_nopredict+12 +INDIRI4 +ADDRLP4 64 +INDIRI4 +NEI4 $738 +ADDRGP4 cg_synchronousClients+12 +INDIRI4 +ADDRLP4 64 +INDIRI4 +EQI4 $730 +LABELV $738 +line 1102 +;1102: cg_nopredict.integer || cg_synchronousClients.integer ) { +line 1103 +;1103: break; +ADDRGP4 $650 +JUMPV +LABELV $730 +line 1106 +;1104: } +;1105: // check for stepping up before a previous step is completed +;1106: delta = cg.time - cg.stepTime; +ADDRLP4 52 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+3488 +INDIRI4 +SUBI4 +ASGNI4 +line 1107 +;1107: if (delta < STEP_TIME) { +ADDRLP4 52 +INDIRI4 +CNSTI4 200 +GEI4 $741 +line 1108 +;1108: oldStep = cg.stepChange * (STEP_TIME - delta) / STEP_TIME; +ADDRLP4 56 +ADDRGP4 cg+3484 +INDIRF4 +CNSTI4 200 +ADDRLP4 52 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +CNSTF4 1128792064 +DIVF4 +ASGNF4 +line 1109 +;1109: } else { +ADDRGP4 $742 +JUMPV +LABELV $741 +line 1110 +;1110: oldStep = 0; +ADDRLP4 56 +CNSTF4 0 +ASGNF4 +line 1111 +;1111: } +LABELV $742 +line 1114 +;1112: +;1113: // add this amount +;1114: step = 4 * (event - EV_STEP_4 + 1 ); +ADDRLP4 60 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 28 +SUBI4 +CNSTI4 4 +ADDI4 +ASGNI4 +line 1115 +;1115: cg.stepChange = oldStep + step; +ADDRGP4 cg+3484 +ADDRLP4 56 +INDIRF4 +ADDRLP4 60 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 1116 +;1116: if ( cg.stepChange > MAX_STEP_CHANGE ) { +ADDRGP4 cg+3484 +INDIRF4 +CNSTF4 1107296256 +LEF4 $745 +line 1117 +;1117: cg.stepChange = MAX_STEP_CHANGE; +ADDRGP4 cg+3484 +CNSTF4 1107296256 +ASGNF4 +line 1118 +;1118: } +LABELV $745 +line 1119 +;1119: cg.stepTime = cg.time; +ADDRGP4 cg+3488 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1120 +;1120: break; +ADDRGP4 $650 +JUMPV +LABELV $751 +line 1124 +;1121: } +;1122: +;1123: case EV_JUMP_PAD: +;1124: DEBUGNAME("EV_JUMP_PAD"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $650 +ADDRGP4 $755 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 1125 +;1125: break; +ADDRGP4 $650 +JUMPV +LABELV $756 +line 1128 +;1126: +;1127: case EV_PRIVATE_DUEL: +;1128: DEBUGNAME("EV_PRIVATE_DUEL"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $757 +ADDRGP4 $760 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $757 +line 1130 +;1129: +;1130: if (cg.snap->ps.clientNum != es->number) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +EQI4 $761 +line 1131 +;1131: { +line 1132 +;1132: break; +ADDRGP4 $650 +JUMPV +LABELV $761 +line 1135 +;1133: } +;1134: +;1135: if (es->eventParm) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $764 +line 1136 +;1136: { //starting the duel +line 1137 +;1137: if (es->eventParm == 2) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $766 +line 1138 +;1138: { +line 1139 +;1139: CG_CenterPrint( CG_GetStripEdString("SVINGAME", "BEGIN_DUEL"), 120, GIANTCHAR_WIDTH*2 ); +ADDRGP4 $768 +ARGP4 +ADDRGP4 $769 +ARGP4 +ADDRLP4 52 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ARGP4 +CNSTI4 120 +ARGI4 +CNSTI4 64 +ARGI4 +ADDRGP4 CG_CenterPrint +CALLV +pop +line 1140 +;1140: trap_S_StartLocalSound( cgs.media.countFightSound, CHAN_ANNOUNCER ); +ADDRGP4 cgs+70296+852 +INDIRI4 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 1141 +;1141: } +ADDRGP4 $650 +JUMPV +LABELV $766 +line 1143 +;1142: else +;1143: { +line 1144 +;1144: trap_S_StartBackgroundTrack( "music/mp/duel.mp3", "music/mp/duel.mp3", qfalse ); +ADDRLP4 52 +ADDRGP4 $772 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ARGP4 +ADDRLP4 52 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 trap_S_StartBackgroundTrack +CALLV +pop +line 1145 +;1145: } +line 1146 +;1146: } +ADDRGP4 $650 +JUMPV +LABELV $764 +line 1148 +;1147: else +;1148: { //ending the duel +line 1149 +;1149: CG_StartMusic(qtrue); +CNSTI4 1 +ARGI4 +ADDRGP4 CG_StartMusic +CALLV +pop +line 1150 +;1150: } +line 1151 +;1151: break; +ADDRGP4 $650 +JUMPV +LABELV $773 +line 1154 +;1152: +;1153: case EV_JUMP: +;1154: DEBUGNAME("EV_JUMP"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $774 +ADDRGP4 $777 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $774 +line 1155 +;1155: trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*jump1.wav" ) ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 $778 +ARGP4 +ADDRLP4 52 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 52 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1156 +;1156: break; +ADDRGP4 $650 +JUMPV +LABELV $779 +line 1158 +;1157: case EV_ROLL: +;1158: DEBUGNAME("EV_ROLL"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $780 +ADDRGP4 $783 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $780 +line 1159 +;1159: if (es->number == cg.snap->ps.clientNum && cg.snap->ps.fallingToDeath) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $784 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1396 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $784 +line 1160 +;1160: { +line 1161 +;1161: break; +ADDRGP4 $650 +JUMPV +LABELV $784 +line 1163 +;1162: } +;1163: if (es->eventParm) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $788 +line 1164 +;1164: { //fall-roll-in-one event +line 1165 +;1165: DoFall(cent, es, clientNum); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 DoFall +CALLV +pop +line 1166 +;1166: } +LABELV $788 +line 1168 +;1167: +;1168: trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*jump1.wav" ) ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 $778 +ARGP4 +ADDRLP4 56 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1169 +;1169: trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.rollSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+70296+752 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1172 +;1170: +;1171: //FIXME: need some sort of body impact on ground sound and maybe kick up some dust? +;1172: break; +ADDRGP4 $650 +JUMPV +LABELV $792 +line 1175 +;1173: +;1174: case EV_TAUNT: +;1175: DEBUGNAME("EV_TAUNT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $793 +ADDRGP4 $796 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $793 +line 1176 +;1176: trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*taunt.wav" ) ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 $797 +ARGP4 +ADDRLP4 60 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 60 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1177 +;1177: break; +ADDRGP4 $650 +JUMPV +LABELV $798 +line 1179 +;1178: case EV_TAUNT_YES: +;1179: DEBUGNAME("EV_TAUNT_YES"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $799 +ADDRGP4 $802 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $799 +line 1180 +;1180: CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_YES); +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 53 +ARGI4 +ADDRGP4 $803 +ARGP4 +ADDRGP4 CG_VoiceChatLocal +CALLV +pop +line 1181 +;1181: break; +ADDRGP4 $650 +JUMPV +LABELV $804 +line 1183 +;1182: case EV_TAUNT_NO: +;1183: DEBUGNAME("EV_TAUNT_NO"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $805 +ADDRGP4 $808 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $805 +line 1184 +;1184: CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_NO); +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 53 +ARGI4 +ADDRGP4 $809 +ARGP4 +ADDRGP4 CG_VoiceChatLocal +CALLV +pop +line 1185 +;1185: break; +ADDRGP4 $650 +JUMPV +LABELV $810 +line 1187 +;1186: case EV_TAUNT_FOLLOWME: +;1187: DEBUGNAME("EV_TAUNT_FOLLOWME"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $811 +ADDRGP4 $814 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $811 +line 1188 +;1188: CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_FOLLOWME); +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 53 +ARGI4 +ADDRGP4 $815 +ARGP4 +ADDRGP4 CG_VoiceChatLocal +CALLV +pop +line 1189 +;1189: break; +ADDRGP4 $650 +JUMPV +LABELV $816 +line 1191 +;1190: case EV_TAUNT_GETFLAG: +;1191: DEBUGNAME("EV_TAUNT_GETFLAG"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $817 +ADDRGP4 $820 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $817 +line 1192 +;1192: CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONGETFLAG); +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 53 +ARGI4 +ADDRGP4 $821 +ARGP4 +ADDRGP4 CG_VoiceChatLocal +CALLV +pop +line 1193 +;1193: break; +ADDRGP4 $650 +JUMPV +LABELV $822 +line 1195 +;1194: case EV_TAUNT_GUARDBASE: +;1195: DEBUGNAME("EV_TAUNT_GUARDBASE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $823 +ADDRGP4 $826 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $823 +line 1196 +;1196: CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONDEFENSE); +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 53 +ARGI4 +ADDRGP4 $827 +ARGP4 +ADDRGP4 CG_VoiceChatLocal +CALLV +pop +line 1197 +;1197: break; +ADDRGP4 $650 +JUMPV +LABELV $828 +line 1199 +;1198: case EV_TAUNT_PATROL: +;1199: DEBUGNAME("EV_TAUNT_PATROL"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $829 +ADDRGP4 $832 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $829 +line 1200 +;1200: CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONPATROL); +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 53 +ARGI4 +ADDRGP4 $833 +ARGP4 +ADDRGP4 CG_VoiceChatLocal +CALLV +pop +line 1201 +;1201: break; +ADDRGP4 $650 +JUMPV +LABELV $834 +line 1203 +;1202: case EV_WATER_TOUCH: +;1203: DEBUGNAME("EV_WATER_TOUCH"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $835 +ADDRGP4 $838 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $835 +line 1204 +;1204: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrInSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+756 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1205 +;1205: break; +ADDRGP4 $650 +JUMPV +LABELV $841 +line 1207 +;1206: case EV_WATER_LEAVE: +;1207: DEBUGNAME("EV_WATER_LEAVE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $842 +ADDRGP4 $845 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $842 +line 1208 +;1208: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrOutSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+760 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1209 +;1209: break; +ADDRGP4 $650 +JUMPV +LABELV $848 +line 1211 +;1210: case EV_WATER_UNDER: +;1211: DEBUGNAME("EV_WATER_UNDER"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $849 +ADDRGP4 $852 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $849 +line 1212 +;1212: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrUnSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+764 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1213 +;1213: break; +ADDRGP4 $650 +JUMPV +LABELV $855 +line 1215 +;1214: case EV_WATER_CLEAR: +;1215: DEBUGNAME("EV_WATER_CLEAR"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $856 +ADDRGP4 $859 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $856 +line 1216 +;1216: trap_S_StartSound (NULL, es->number, CHAN_AUTO, CG_CustomSound( es->number, "*gasp.wav" ) ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 $860 +ARGP4 +ADDRLP4 64 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1217 +;1217: break; +ADDRGP4 $650 +JUMPV +LABELV $861 +line 1220 +;1218: +;1219: case EV_ITEM_PICKUP: +;1220: DEBUGNAME("EV_ITEM_PICKUP"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $862 +ADDRGP4 $865 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $862 +line 1221 +;1221: { +line 1224 +;1222: gitem_t *item; +;1223: int index; +;1224: qboolean newindex = qfalse; +ADDRLP4 68 +CNSTI4 0 +ASGNI4 +line 1226 +;1225: +;1226: index = cg_entities[es->eventParm].currentState.modelindex; // player predicted +ADDRLP4 72 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+212 +ADDP4 +INDIRI4 +ASGNI4 +line 1228 +;1227: +;1228: if (index < 1 && cg_entities[es->eventParm].currentState.isJediMaster) +ADDRLP4 72 +INDIRI4 +CNSTI4 1 +GEI4 $867 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+244 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $867 +line 1229 +;1229: { //a holocron most likely +line 1230 +;1230: index = cg_entities[es->eventParm].currentState.trickedentindex4; +ADDRLP4 72 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+160 +ADDP4 +INDIRI4 +ASGNI4 +line 1231 +;1231: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.holocronPickup ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+1248 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1233 +;1232: +;1233: if (es->number == cg.snap->ps.clientNum && showPowersName[index]) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $873 +ADDRLP4 72 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 showPowersName +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $873 +line 1234 +;1234: { +line 1235 +;1235: const char *strText = CG_GetStripEdString("INGAMETEXT", "PICKUPLINE"); +ADDRGP4 $241 +ARGP4 +ADDRGP4 $454 +ARGP4 +ADDRLP4 84 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 80 +ADDRLP4 84 +INDIRP4 +ASGNP4 +line 1238 +;1236: +;1237: //Com_Printf("%s %s\n", strText, showPowersName[index]); +;1238: CG_CenterPrint( va("%s %s\n", strText, CG_GetStripEdString("INGAME",showPowersName[index])), SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH ); +ADDRGP4 $876 +ARGP4 +ADDRLP4 72 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 showPowersName +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 88 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $242 +ARGP4 +ADDRLP4 80 +INDIRP4 +ARGP4 +ADDRLP4 88 +INDIRP4 +ARGP4 +ADDRLP4 92 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +ARGP4 +CNSTI4 144 +ARGI4 +CNSTI4 16 +ARGI4 +ADDRGP4 CG_CenterPrint +CALLV +pop +line 1239 +;1239: } +LABELV $873 +line 1242 +;1240: +;1241: //Show the player their force selection bar in case picking the holocron up changed the current selection +;1242: if (index != FP_SABERATTACK && index != FP_SABERDEFEND && index != FP_SABERTHROW && +ADDRLP4 80 +ADDRLP4 72 +INDIRI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 15 +EQI4 $877 +ADDRLP4 80 +INDIRI4 +CNSTI4 16 +EQI4 $877 +ADDRLP4 80 +INDIRI4 +CNSTI4 17 +EQI4 $877 +ADDRLP4 84 +CNSTI4 1 +ASGNI4 +ADDRLP4 80 +INDIRI4 +ADDRLP4 84 +INDIRI4 +EQI4 $877 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $877 +ADDRLP4 88 +CNSTI4 896 +ASGNI4 +ADDRLP4 80 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 88 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $883 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 892 +ADDP4 +INDIRI4 +ADDRLP4 84 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 88 +INDIRI4 +ADDP4 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +NEI4 $877 +LABELV $883 +line 1246 +;1243: index != FP_LEVITATION && +;1244: es->number == cg.snap->ps.clientNum && +;1245: (index == cg.snap->ps.fd.forcePowerSelected || !(cg.snap->ps.fd.forcePowersActive & (1 << cg.snap->ps.fd.forcePowerSelected)))) +;1246: { +line 1247 +;1247: if (cg.forceSelect != index) +ADDRGP4 cg+3512 +INDIRI4 +ADDRLP4 72 +INDIRI4 +EQI4 $884 +line 1248 +;1248: { +line 1249 +;1249: cg.forceSelect = index; +ADDRGP4 cg+3512 +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 1250 +;1250: newindex = qtrue; +ADDRLP4 68 +CNSTI4 1 +ASGNI4 +line 1251 +;1251: } +LABELV $884 +line 1252 +;1252: } +LABELV $877 +line 1254 +;1253: +;1254: if (es->number == cg.snap->ps.clientNum && newindex) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $650 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 1255 +;1255: { +line 1256 +;1256: if (cg.forceSelectTime < cg.time) +ADDRGP4 cg+13792 +INDIRF4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +GEF4 $650 +line 1257 +;1257: { +line 1258 +;1258: cg.forceSelectTime = cg.time; +ADDRGP4 cg+13792 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1259 +;1259: } +line 1260 +;1260: } +line 1262 +;1261: +;1262: break; +ADDRGP4 $650 +JUMPV +LABELV $867 +line 1265 +;1263: } +;1264: +;1265: if (cg_entities[es->eventParm].weapon >= cg.time) +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+956 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LTI4 $897 +line 1266 +;1266: { //rww - an unfortunately necessary hack to prevent double item pickups +line 1267 +;1267: break; +ADDRGP4 $650 +JUMPV +LABELV $897 +line 1274 +;1268: } +;1269: +;1270: //Hopefully even if this entity is somehow removed and replaced with, say, another +;1271: //item, this time will have expired by the time that item needs to be picked up. +;1272: //Of course, it's quite possible this will fail miserably, so if you've got a better +;1273: //solution then please do use it. +;1274: cg_entities[es->eventParm].weapon = cg.time+500; +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+956 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 500 +ADDI4 +ASGNI4 +line 1276 +;1275: +;1276: if ( index < 1 || index >= bg_numItems ) { +ADDRLP4 80 +ADDRLP4 72 +INDIRI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 1 +LTI4 $905 +ADDRLP4 80 +INDIRI4 +ADDRGP4 bg_numItems +INDIRI4 +LTI4 $903 +LABELV $905 +line 1277 +;1277: break; +ADDRGP4 $650 +JUMPV +LABELV $903 +line 1279 +;1278: } +;1279: item = &bg_itemlist[ index ]; +ADDRLP4 76 +CNSTI4 52 +ADDRLP4 72 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +ASGNP4 +line 1281 +;1280: +;1281: if ( /*item->giType != IT_POWERUP && */item->giType != IT_TEAM) { +ADDRLP4 76 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 8 +EQI4 $906 +line 1282 +;1282: if (item->pickup_sound && item->pickup_sound[0]) +ADDRLP4 84 +ADDRLP4 76 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $908 +ADDRLP4 84 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $908 +line 1283 +;1283: { +line 1284 +;1284: trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound ) ); +ADDRLP4 76 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 88 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 88 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1285 +;1285: } +LABELV $908 +line 1286 +;1286: } +LABELV $906 +line 1289 +;1287: +;1288: // show icon and name on status bar +;1289: if ( es->number == cg.snap->ps.clientNum ) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $650 +line 1290 +;1290: CG_ItemPickup( index ); +ADDRLP4 72 +INDIRI4 +ARGI4 +ADDRGP4 CG_ItemPickup +CALLV +pop +line 1291 +;1291: } +line 1292 +;1292: } +line 1293 +;1293: break; +ADDRGP4 $650 +JUMPV +LABELV $913 +line 1296 +;1294: +;1295: case EV_GLOBAL_ITEM_PICKUP: +;1296: DEBUGNAME("EV_GLOBAL_ITEM_PICKUP"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $914 +ADDRGP4 $917 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $914 +line 1297 +;1297: { +line 1301 +;1298: gitem_t *item; +;1299: int index; +;1300: +;1301: index = es->eventParm; // player predicted +ADDRLP4 68 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ASGNI4 +line 1303 +;1302: +;1303: if ( index < 1 || index >= bg_numItems ) { +ADDRLP4 76 +ADDRLP4 68 +INDIRI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 1 +LTI4 $920 +ADDRLP4 76 +INDIRI4 +ADDRGP4 bg_numItems +INDIRI4 +LTI4 $918 +LABELV $920 +line 1304 +;1304: break; +ADDRGP4 $650 +JUMPV +LABELV $918 +line 1306 +;1305: } +;1306: item = &bg_itemlist[ index ]; +ADDRLP4 72 +CNSTI4 52 +ADDRLP4 68 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +ASGNP4 +line 1308 +;1307: // powerup pickups are global +;1308: if( item->pickup_sound && item->pickup_sound[0] ) { +ADDRLP4 80 +ADDRLP4 72 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $921 +ADDRLP4 80 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $921 +line 1309 +;1309: trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound) ); +ADDRLP4 72 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 84 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 84 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1310 +;1310: } +LABELV $921 +line 1313 +;1311: +;1312: // show icon and name on status bar +;1313: if ( es->number == cg.snap->ps.clientNum ) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $650 +line 1314 +;1314: CG_ItemPickup( index ); +ADDRLP4 68 +INDIRI4 +ARGI4 +ADDRGP4 CG_ItemPickup +CALLV +pop +line 1315 +;1315: } +line 1316 +;1316: } +line 1317 +;1317: break; +ADDRGP4 $650 +JUMPV +LABELV $927 +line 1323 +;1318: +;1319: // +;1320: // weapon events +;1321: // +;1322: case EV_NOAMMO: +;1323: DEBUGNAME("EV_NOAMMO"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $928 +ADDRGP4 $931 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $928 +line 1325 +;1324:// trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.noAmmoSound ); +;1325: if ( es->number == cg.snap->ps.clientNum ) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $650 +line 1326 +;1326: { +line 1327 +;1327: int weap = 0; +ADDRLP4 68 +CNSTI4 0 +ASGNI4 +line 1329 +;1328: +;1329: if (es->eventParm && es->eventParm < WP_NUM_WEAPONS) +ADDRLP4 72 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +EQI4 $935 +ADDRLP4 72 +INDIRI4 +CNSTI4 16 +GEI4 $935 +line 1330 +;1330: { +line 1331 +;1331: cg.snap->ps.stats[STAT_WEAPONS] &= ~(1 << es->eventParm); +ADDRLP4 76 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 276 +ADDP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 76 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +LSHI4 +BCOMI4 +BANDI4 +ASGNI4 +line 1332 +;1332: weap = cg.snap->ps.weapon; +ADDRLP4 68 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +ASGNI4 +line 1333 +;1333: } +ADDRGP4 $936 +JUMPV +LABELV $935 +line 1334 +;1334: else if (es->eventParm) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $939 +line 1335 +;1335: { +line 1336 +;1336: weap = (es->eventParm-WP_NUM_WEAPONS); +ADDRLP4 68 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 16 +SUBI4 +ASGNI4 +line 1337 +;1337: } +LABELV $939 +LABELV $936 +line 1338 +;1338: CG_OutOfAmmoChange(weap); +ADDRLP4 68 +INDIRI4 +ARGI4 +ADDRGP4 CG_OutOfAmmoChange +CALLV +pop +line 1339 +;1339: } +line 1340 +;1340: break; +ADDRGP4 $650 +JUMPV +LABELV $941 +line 1342 +;1341: case EV_CHANGE_WEAPON: +;1342: DEBUGNAME("EV_CHANGE_WEAPON"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $942 +ADDRGP4 $945 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $942 +line 1343 +;1343: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.selectSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+600 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1344 +;1344: break; +ADDRGP4 $650 +JUMPV +LABELV $948 +line 1346 +;1345: case EV_FIRE_WEAPON: +;1346: DEBUGNAME("EV_FIRE_WEAPON"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $949 +ADDRGP4 $952 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $949 +line 1347 +;1347: if (cent->currentState.number >= MAX_CLIENTS && cent->currentState.eType != ET_GRAPPLE) +ADDRLP4 68 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +INDIRI4 +CNSTI4 32 +LTI4 $953 +ADDRLP4 68 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 13 +EQI4 $953 +line 1348 +;1348: { //special case for turret firing +line 1352 +;1349: vec3_t gunpoint, gunangle; +;1350: mdxaBone_t matrix; +;1351: +;1352: weaponInfo_t *weaponInfo = &cg_weapons[WP_TURRET]; +ADDRLP4 72 +ADDRGP4 cg_weapons+3120 +ASGNP4 +line 1354 +;1353: +;1354: if ( !weaponInfo->registered ) +ADDRLP4 72 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $956 +line 1355 +;1355: { +line 1356 +;1356: memset( weaponInfo, 0, sizeof( *weaponInfo ) ); +ADDRLP4 72 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 208 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 1358 +;1357: +;1358: weaponInfo->flashSound[0] = NULL_SOUND; +ADDRLP4 72 +INDIRP4 +CNSTI4 68 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1359 +;1359: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 72 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1360 +;1360: weaponInfo->chargeSound = NULL_SOUND; +ADDRLP4 72 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1361 +;1361: weaponInfo->muzzleEffect = NULL_HANDLE; +ADDRLP4 72 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1362 +;1362: weaponInfo->missileModel = NULL_HANDLE; +ADDRLP4 72 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1363 +;1363: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 72 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1364 +;1364: weaponInfo->missileDlight = 0; +ADDRLP4 72 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1365 +;1365: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 72 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1366 +;1366: weaponInfo->missileTrailFunc = FX_TurretProjectileThink; +ADDRLP4 72 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRGP4 FX_TurretProjectileThink +ASGNP4 +line 1368 +;1367: +;1368: trap_FX_RegisterEffect("effects/blaster/wall_impact.efx"); +ADDRGP4 $958 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1369 +;1369: trap_FX_RegisterEffect("effects/blaster/flesh_impact.efx"); +ADDRGP4 $959 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1371 +;1370: +;1371: weaponInfo->registered = qtrue; +ADDRLP4 72 +INDIRP4 +CNSTI4 1 +ASGNI4 +line 1372 +;1372: } +LABELV $956 +line 1374 +;1373: +;1374: if (cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $650 +line 1375 +;1375: { +line 1376 +;1376: if (!cent->bolt1) +ADDRFP4 0 +INDIRP4 +CNSTI4 984 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $962 +line 1377 +;1377: { +line 1378 +;1378: cent->bolt1 = trap_G2API_AddBolt(cent->ghoul2, 0, "*flash01"); +ADDRLP4 148 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 148 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $964 +ARGP4 +ADDRLP4 152 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 148 +INDIRP4 +CNSTI4 984 +ADDP4 +ADDRLP4 152 +INDIRI4 +ASGNI4 +line 1379 +;1379: } +LABELV $962 +line 1380 +;1380: if (!cent->bolt2) +ADDRFP4 0 +INDIRP4 +CNSTI4 988 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $961 +line 1381 +;1381: { +line 1382 +;1382: cent->bolt2 = trap_G2API_AddBolt(cent->ghoul2, 0, "*flash02"); +ADDRLP4 148 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 148 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $967 +ARGP4 +ADDRLP4 152 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 148 +INDIRP4 +CNSTI4 988 +ADDP4 +ADDRLP4 152 +INDIRI4 +ASGNI4 +line 1383 +;1383: } +line 1384 +;1384: } +line 1386 +;1385: else +;1386: { +line 1387 +;1387: break; +LABELV $961 +line 1390 +;1388: } +;1389: +;1390: if (cent->currentState.eventParm) +ADDRFP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $968 +line 1391 +;1391: { +line 1392 +;1392: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cent->bolt2, &matrix, cent->currentState.angles, cent->currentState.origin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 148 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 148 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 148 +INDIRP4 +CNSTI4 988 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 76 +ARGP4 +ADDRLP4 148 +INDIRP4 +CNSTI4 116 +ADDP4 +ARGP4 +ADDRLP4 148 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 148 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 1393 +;1393: } +ADDRGP4 $969 +JUMPV +LABELV $968 +line 1395 +;1394: else +;1395: { +line 1396 +;1396: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cent->bolt1, &matrix, cent->currentState.angles, cent->currentState.origin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 148 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 148 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 148 +INDIRP4 +CNSTI4 984 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 76 +ARGP4 +ADDRLP4 148 +INDIRP4 +CNSTI4 116 +ADDP4 +ARGP4 +ADDRLP4 148 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 148 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 1397 +;1397: } +LABELV $969 +line 1399 +;1398: +;1399: gunpoint[0] = matrix.matrix[0][3]; +ADDRLP4 124 +ADDRLP4 76+12 +INDIRF4 +ASGNF4 +line 1400 +;1400: gunpoint[1] = matrix.matrix[1][3]; +ADDRLP4 124+4 +ADDRLP4 76+16+12 +INDIRF4 +ASGNF4 +line 1401 +;1401: gunpoint[2] = matrix.matrix[2][3]; +ADDRLP4 124+8 +ADDRLP4 76+32+12 +INDIRF4 +ASGNF4 +line 1403 +;1402: +;1403: gunangle[0] = -matrix.matrix[0][0]; +ADDRLP4 136 +ADDRLP4 76 +INDIRF4 +NEGF4 +ASGNF4 +line 1404 +;1404: gunangle[1] = -matrix.matrix[1][0]; +ADDRLP4 136+4 +ADDRLP4 76+16 +INDIRF4 +NEGF4 +ASGNF4 +line 1405 +;1405: gunangle[2] = -matrix.matrix[2][0]; +ADDRLP4 136+8 +ADDRLP4 76+32 +INDIRF4 +NEGF4 +ASGNF4 +line 1407 +;1406: +;1407: trap_FX_PlayEffectID(trap_FX_RegisterEffect( "effects/turret/muzzle_flash.efx" ), gunpoint, gunangle); +ADDRGP4 $985 +ARGP4 +ADDRLP4 148 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 148 +INDIRI4 +ARGI4 +ADDRLP4 124 +ARGP4 +ADDRLP4 136 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1408 +;1408: } +ADDRGP4 $650 +JUMPV +LABELV $953 +line 1410 +;1409: else +;1410: { +line 1411 +;1411: CG_FireWeapon( cent, qfalse ); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_FireWeapon +CALLV +pop +line 1412 +;1412: } +line 1413 +;1413: break; +ADDRGP4 $650 +JUMPV +LABELV $986 +line 1416 +;1414: +;1415: case EV_ALT_FIRE: +;1416: DEBUGNAME("EV_ALT_FIRE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $987 +ADDRGP4 $990 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $987 +line 1417 +;1417: CG_FireWeapon( cent, qtrue ); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_FireWeapon +CALLV +pop +line 1420 +;1418: +;1419: //if you just exploded your detpacks and you have no ammo left for them, autoswitch +;1420: if ( cg.snap->ps.clientNum == cent->currentState.number && +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +NEI4 $650 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +CNSTI4 13 +NEI4 $650 +line 1422 +;1421: cg.snap->ps.weapon == WP_DET_PACK ) +;1422: { +line 1423 +;1423: if (cg.snap->ps.ammo[weaponData[WP_DET_PACK].ammoIndex] == 0) +ADDRGP4 weaponData+728 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 452 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $650 +line 1424 +;1424: { +line 1425 +;1425: CG_OutOfAmmoChange(WP_DET_PACK); +CNSTI4 13 +ARGI4 +ADDRGP4 CG_OutOfAmmoChange +CALLV +pop +line 1426 +;1426: } +line 1427 +;1427: } +line 1429 +;1428: +;1429: break; +ADDRGP4 $650 +JUMPV +LABELV $999 +line 1432 +;1430: +;1431: case EV_SABER_ATTACK: +;1432: DEBUGNAME("EV_SABER_ATTACK"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1000 +ADDRGP4 $1003 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1000 +line 1433 +;1433: trap_S_StartSound(es->pos.trBase, es->number, CHAN_WEAPON, trap_S_RegisterSound(va("sound/weapons/saber/saberhup%i.wav", Q_irand(1, 8)))); +CNSTI4 1 +ARGI4 +CNSTI4 8 +ARGI4 +ADDRLP4 72 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRGP4 $1004 +ARGP4 +ADDRLP4 72 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ARGP4 +ADDRLP4 80 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 80 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1434 +;1434: break; +ADDRGP4 $650 +JUMPV +LABELV $1005 +line 1437 +;1435: +;1436: case EV_SABER_HIT: +;1437: DEBUGNAME("EV_SABER_HIT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1006 +ADDRGP4 $1009 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1006 +line 1438 +;1438: if (es->eventParm == 16) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 16 +NEI4 $1010 +line 1439 +;1439: { //Make lots of sparks, something special happened +line 1441 +;1440: vec3_t fxDir; +;1441: VectorCopy(es->angles, fxDir); +ADDRLP4 88 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRB +ASGNB 12 +line 1442 +;1442: if (!fxDir[0] && !fxDir[1] && !fxDir[2]) +ADDRLP4 100 +CNSTF4 0 +ASGNF4 +ADDRLP4 88 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1012 +ADDRLP4 88+4 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1012 +ADDRLP4 88+8 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1012 +line 1443 +;1443: { +line 1444 +;1444: fxDir[1] = 1; +ADDRLP4 88+4 +CNSTF4 1065353216 +ASGNF4 +line 1445 +;1445: } +LABELV $1012 +line 1446 +;1446: trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/saber/saberhit.wav")); +ADDRGP4 $1017 +ARGP4 +ADDRLP4 104 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 104 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1447 +;1447: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); +ADDRGP4 $1018 +ARGP4 +ADDRLP4 112 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 112 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 88 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1448 +;1448: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); +ADDRGP4 $1018 +ARGP4 +ADDRLP4 116 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 116 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 88 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1449 +;1449: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); +ADDRGP4 $1018 +ARGP4 +ADDRLP4 120 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 120 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 88 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1450 +;1450: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); +ADDRGP4 $1018 +ARGP4 +ADDRLP4 124 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 124 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 88 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1451 +;1451: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); +ADDRGP4 $1018 +ARGP4 +ADDRLP4 128 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 128 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 88 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1452 +;1452: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); +ADDRGP4 $1018 +ARGP4 +ADDRLP4 132 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 132 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 88 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1453 +;1453: } +ADDRGP4 $650 +JUMPV +LABELV $1010 +line 1454 +;1454: else if (es->eventParm) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1019 +line 1455 +;1455: { //hit a person +line 1457 +;1456: vec3_t fxDir; +;1457: VectorCopy(es->angles, fxDir); +ADDRLP4 88 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRB +ASGNB 12 +line 1458 +;1458: if (!fxDir[0] && !fxDir[1] && !fxDir[2]) +ADDRLP4 100 +CNSTF4 0 +ASGNF4 +ADDRLP4 88 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1021 +ADDRLP4 88+4 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1021 +ADDRLP4 88+8 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1021 +line 1459 +;1459: { +line 1460 +;1460: fxDir[1] = 1; +ADDRLP4 88+4 +CNSTF4 1065353216 +ASGNF4 +line 1461 +;1461: } +LABELV $1021 +line 1462 +;1462: trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/saber/saberhit.wav")); +ADDRGP4 $1017 +ARGP4 +ADDRLP4 104 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 104 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1463 +;1463: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir ); +ADDRGP4 $1018 +ARGP4 +ADDRLP4 112 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 112 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 88 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1464 +;1464: } +ADDRGP4 $650 +JUMPV +LABELV $1019 +line 1466 +;1465: else +;1466: { //hit something else +line 1468 +;1467: vec3_t fxDir; +;1468: VectorCopy(es->angles, fxDir); +ADDRLP4 88 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRB +ASGNB 12 +line 1469 +;1469: if (!fxDir[0] && !fxDir[1] && !fxDir[2]) +ADDRLP4 100 +CNSTF4 0 +ASGNF4 +ADDRLP4 88 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1026 +ADDRLP4 88+4 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1026 +ADDRLP4 88+8 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1026 +line 1470 +;1470: { +line 1471 +;1471: fxDir[1] = 1; +ADDRLP4 88+4 +CNSTF4 1065353216 +ASGNF4 +line 1472 +;1472: } +LABELV $1026 +line 1473 +;1473: trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/saber/saberhit.wav")); +ADDRGP4 $1017 +ARGP4 +ADDRLP4 104 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 104 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1474 +;1474: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), es->origin, fxDir ); +ADDRGP4 $1031 +ARGP4 +ADDRLP4 112 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 112 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 88 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1475 +;1475: } +line 1476 +;1476: break; +ADDRGP4 $650 +JUMPV +LABELV $1032 +line 1479 +;1477: +;1478: case EV_SABER_BLOCK: +;1479: DEBUGNAME("EV_SABER_BLOCK"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1033 +ADDRGP4 $1036 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1033 +line 1481 +;1480: +;1481: if (es->eventParm) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1037 +line 1482 +;1482: { //saber block +line 1484 +;1483: vec3_t fxDir; +;1484: VectorCopy(es->angles, fxDir); +ADDRLP4 88 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRB +ASGNB 12 +line 1485 +;1485: if (!fxDir[0] && !fxDir[1] && !fxDir[2]) +ADDRLP4 100 +CNSTF4 0 +ASGNF4 +ADDRLP4 88 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1039 +ADDRLP4 88+4 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1039 +ADDRLP4 88+8 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1039 +line 1486 +;1486: { +line 1487 +;1487: fxDir[1] = 1; +ADDRLP4 88+4 +CNSTF4 1065353216 +ASGNF4 +line 1488 +;1488: } +LABELV $1039 +line 1489 +;1489: trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound(va( "sound/weapons/saber/saberblock%d.wav", Q_irand(1, 9) ))); +CNSTI4 1 +ARGI4 +CNSTI4 9 +ARGI4 +ADDRLP4 104 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRGP4 $1044 +ARGP4 +ADDRLP4 104 +INDIRI4 +ARGI4 +ADDRLP4 108 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 108 +INDIRP4 +ARGP4 +ADDRLP4 112 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 112 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1490 +;1490: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/saber_block.efx"), es->origin, fxDir ); +ADDRGP4 $1045 +ARGP4 +ADDRLP4 120 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 120 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 88 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1492 +;1491: +;1492: g_saberFlashTime = cg.time-50; +ADDRGP4 g_saberFlashTime +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 50 +SUBI4 +ASGNI4 +line 1493 +;1493: VectorCopy( es->origin, g_saberFlashPos ); +ADDRGP4 g_saberFlashPos +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRB +ASGNB 12 +line 1494 +;1494: } +ADDRGP4 $650 +JUMPV +LABELV $1037 +line 1496 +;1495: else +;1496: { //projectile block +line 1498 +;1497: vec3_t fxDir; +;1498: VectorCopy(es->angles, fxDir); +ADDRLP4 88 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRB +ASGNB 12 +line 1499 +;1499: if (!fxDir[0] && !fxDir[1] && !fxDir[2]) +ADDRLP4 100 +CNSTF4 0 +ASGNF4 +ADDRLP4 88 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1047 +ADDRLP4 88+4 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1047 +ADDRLP4 88+8 +INDIRF4 +ADDRLP4 100 +INDIRF4 +NEF4 $1047 +line 1500 +;1500: { +line 1501 +;1501: fxDir[1] = 1; +ADDRLP4 88+4 +CNSTF4 1065353216 +ASGNF4 +line 1502 +;1502: } +LABELV $1047 +line 1503 +;1503: trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/deflect.efx"), es->origin, fxDir); +ADDRGP4 $1052 +ARGP4 +ADDRLP4 104 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 104 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 88 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1504 +;1504: } +line 1505 +;1505: break; +ADDRGP4 $650 +JUMPV +LABELV $1053 +line 1508 +;1506: +;1507: case EV_SABER_UNHOLSTER: +;1508: DEBUGNAME("EV_SABER_UNHOLSTER"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1054 +ADDRGP4 $1057 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1054 +line 1509 +;1509: trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" ) ); +ADDRGP4 $1058 +ARGP4 +ADDRLP4 88 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 88 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1510 +;1510: break; +ADDRGP4 $650 +JUMPV +LABELV $1059 +line 1513 +;1511: +;1512: case EV_BECOME_JEDIMASTER: +;1513: DEBUGNAME("EV_SABER_UNHOLSTER"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1060 +ADDRGP4 $1057 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1060 +line 1514 +;1514: { +line 1516 +;1515: trace_t tr; +;1516: vec3_t playerMins = {-15, -15, DEFAULT_MINS_2+8}; +ADDRLP4 92 +ADDRGP4 $1063 +INDIRB +ASGNB 12 +line 1517 +;1517: vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; +ADDRLP4 104 +ADDRGP4 $1064 +INDIRB +ASGNB 12 +line 1520 +;1518: vec3_t ang, pos, dpos; +;1519: +;1520: VectorClear(ang); +ADDRLP4 1232 +CNSTF4 0 +ASGNF4 +ADDRLP4 116+8 +ADDRLP4 1232 +INDIRF4 +ASGNF4 +ADDRLP4 116+4 +ADDRLP4 1232 +INDIRF4 +ASGNF4 +ADDRLP4 116 +ADDRLP4 1232 +INDIRF4 +ASGNF4 +line 1521 +;1521: ang[ROLL] = 1; +ADDRLP4 116+8 +CNSTF4 1065353216 +ASGNF4 +line 1523 +;1522: +;1523: VectorCopy(position, dpos); +ADDRLP4 1208 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 1524 +;1524: dpos[2] -= 4096; +ADDRLP4 1208+8 +ADDRLP4 1208+8 +INDIRF4 +CNSTF4 1166016512 +SUBF4 +ASGNF4 +line 1526 +;1525: +;1526: CG_Trace(&tr, position, playerMins, playerMaxs, dpos, es->number, MASK_SOLID); +ADDRLP4 128 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 92 +ARGP4 +ADDRLP4 104 +ARGP4 +ADDRLP4 1208 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 1527 +;1527: VectorCopy(tr.endpos, pos); +ADDRLP4 1220 +ADDRLP4 128+12 +INDIRB +ASGNB 12 +line 1529 +;1528: +;1529: if (tr.fraction == 1) +ADDRLP4 128+8 +INDIRF4 +CNSTF4 1065353216 +NEF4 $1070 +line 1530 +;1530: { +line 1531 +;1531: break; +ADDRGP4 $650 +JUMPV +LABELV $1070 +line 1533 +;1532: } +;1533: trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/jedispawn.efx"), pos, ang); +ADDRGP4 $1073 +ARGP4 +ADDRLP4 1236 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 1236 +INDIRI4 +ARGI4 +ADDRLP4 1220 +ARGP4 +ADDRLP4 116 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1535 +;1534: +;1535: trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" ) ); +ADDRGP4 $1058 +ARGP4 +ADDRLP4 1240 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 1240 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1537 +;1536: +;1537: if (cg.snap->ps.clientNum == es->number) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +NEI4 $650 +line 1538 +;1538: { +line 1539 +;1539: trap_S_StartLocalSound(cgs.media.happyMusic, CHAN_LOCAL); +ADDRGP4 cgs+70296+832 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 1540 +;1540: CGCam_SetMusicMult(0.3, 5000); +CNSTF4 1050253722 +ARGF4 +CNSTI4 5000 +ARGI4 +ADDRGP4 CGCam_SetMusicMult +CALLV +pop +line 1541 +;1541: } +line 1542 +;1542: } +line 1543 +;1543: break; +ADDRGP4 $650 +JUMPV +LABELV $1079 +line 1546 +;1544: +;1545: case EV_DISRUPTOR_MAIN_SHOT: +;1546: DEBUGNAME("EV_DISRUPTOR_MAIN_SHOT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1080 +ADDRGP4 $1083 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1080 +line 1547 +;1547: if (cent->currentState.eventParm != cg.snap->ps.clientNum || +ADDRFP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $1088 +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +EQI4 $1084 +LABELV $1088 +line 1549 +;1548: cg.renderingThirdPerson) +;1549: { //h4q3ry +line 1550 +;1550: CG_GetClientWeaponMuzzleBoltPoint(cent->currentState.eventParm, cent->currentState.origin2); +ADDRLP4 92 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 92 +INDIRP4 +CNSTI4 104 +ADDP4 +ARGP4 +ADDRGP4 CG_GetClientWeaponMuzzleBoltPoint +CALLV +pop +line 1551 +;1551: } +ADDRGP4 $1085 +JUMPV +LABELV $1084 +line 1553 +;1552: else +;1553: { +line 1554 +;1554: if (cg.lastFPFlashPoint[0] ||cg.lastFPFlashPoint[1] || cg.lastFPFlashPoint[2]) +ADDRLP4 92 +CNSTF4 0 +ASGNF4 +ADDRGP4 cg+13796 +INDIRF4 +ADDRLP4 92 +INDIRF4 +NEF4 $1097 +ADDRGP4 cg+13796+4 +INDIRF4 +ADDRLP4 92 +INDIRF4 +NEF4 $1097 +ADDRGP4 cg+13796+8 +INDIRF4 +ADDRLP4 92 +INDIRF4 +EQF4 $1089 +LABELV $1097 +line 1555 +;1555: { //get the position of the muzzle flash for the first person weapon model from the last frame +line 1556 +;1556: VectorCopy(cg.lastFPFlashPoint, cent->currentState.origin2); +ADDRFP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRGP4 cg+13796 +INDIRB +ASGNB 12 +line 1557 +;1557: } +LABELV $1089 +line 1558 +;1558: } +LABELV $1085 +line 1559 +;1559: FX_DisruptorMainShot( cent->currentState.origin2, cent->lerpOrigin ); +ADDRLP4 92 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 104 +ADDP4 +ARGP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 FX_DisruptorMainShot +CALLV +pop +line 1560 +;1560: break; +ADDRGP4 $650 +JUMPV +LABELV $1099 +line 1563 +;1561: +;1562: case EV_DISRUPTOR_SNIPER_SHOT: +;1563: DEBUGNAME("EV_DISRUPTOR_SNIPER_SHOT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1100 +ADDRGP4 $1103 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1100 +line 1564 +;1564: if (cent->currentState.eventParm != cg.snap->ps.clientNum || +ADDRFP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $1108 +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +EQI4 $1104 +LABELV $1108 +line 1566 +;1565: cg.renderingThirdPerson) +;1566: { //h4q3ry +line 1567 +;1567: CG_GetClientWeaponMuzzleBoltPoint(cent->currentState.eventParm, cent->currentState.origin2); +ADDRLP4 96 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 96 +INDIRP4 +CNSTI4 104 +ADDP4 +ARGP4 +ADDRGP4 CG_GetClientWeaponMuzzleBoltPoint +CALLV +pop +line 1568 +;1568: } +ADDRGP4 $1105 +JUMPV +LABELV $1104 +line 1570 +;1569: else +;1570: { +line 1571 +;1571: if (cg.lastFPFlashPoint[0] ||cg.lastFPFlashPoint[1] || cg.lastFPFlashPoint[2]) +ADDRLP4 96 +CNSTF4 0 +ASGNF4 +ADDRGP4 cg+13796 +INDIRF4 +ADDRLP4 96 +INDIRF4 +NEF4 $1117 +ADDRGP4 cg+13796+4 +INDIRF4 +ADDRLP4 96 +INDIRF4 +NEF4 $1117 +ADDRGP4 cg+13796+8 +INDIRF4 +ADDRLP4 96 +INDIRF4 +EQF4 $1109 +LABELV $1117 +line 1572 +;1572: { //get the position of the muzzle flash for the first person weapon model from the last frame +line 1573 +;1573: VectorCopy(cg.lastFPFlashPoint, cent->currentState.origin2); +ADDRFP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRGP4 cg+13796 +INDIRB +ASGNB 12 +line 1574 +;1574: } +LABELV $1109 +line 1575 +;1575: } +LABELV $1105 +line 1576 +;1576: FX_DisruptorAltShot( cent->currentState.origin2, cent->lerpOrigin, cent->currentState.shouldtarget ); +ADDRLP4 96 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 104 +ADDP4 +ARGP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 FX_DisruptorAltShot +CALLV +pop +line 1577 +;1577: break; +ADDRGP4 $650 +JUMPV +LABELV $1119 +line 1580 +;1578: +;1579: case EV_DISRUPTOR_SNIPER_MISS: +;1580: DEBUGNAME("EV_DISRUPTOR_SNIPER_MISS"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1120 +ADDRGP4 $1123 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1120 +line 1581 +;1581: ByteToDir( es->eventParm, dir ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ARGP4 +ADDRGP4 ByteToDir +CALLV +pop +line 1582 +;1582: if (es->weapon) +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1124 +line 1583 +;1583: { //primary +line 1584 +;1584: FX_DisruptorHitWall( cent->lerpOrigin, dir ); +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRGP4 FX_DisruptorHitWall +CALLV +pop +line 1585 +;1585: } +ADDRGP4 $650 +JUMPV +LABELV $1124 +line 1587 +;1586: else +;1587: { //secondary +line 1588 +;1588: FX_DisruptorAltMiss( cent->lerpOrigin, dir ); +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRGP4 FX_DisruptorAltMiss +CALLV +pop +line 1589 +;1589: } +line 1590 +;1590: break; +ADDRGP4 $650 +JUMPV +LABELV $1126 +line 1593 +;1591: +;1592: case EV_DISRUPTOR_HIT: +;1593: DEBUGNAME("EV_DISRUPTOR_HIT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1127 +ADDRGP4 $1130 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1127 +line 1594 +;1594: ByteToDir( es->eventParm, dir ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ARGP4 +ADDRGP4 ByteToDir +CALLV +pop +line 1595 +;1595: if (es->weapon) +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1131 +line 1596 +;1596: { //client +line 1597 +;1597: FX_DisruptorHitPlayer( cent->lerpOrigin, dir, qtrue ); +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 16 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 FX_DisruptorHitPlayer +CALLV +pop +line 1598 +;1598: } +ADDRGP4 $650 +JUMPV +LABELV $1131 +line 1600 +;1599: else +;1600: { //non-client +line 1601 +;1601: FX_DisruptorHitWall( cent->lerpOrigin, dir ); +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRGP4 FX_DisruptorHitWall +CALLV +pop +line 1602 +;1602: } +line 1603 +;1603: break; +ADDRGP4 $650 +JUMPV +LABELV $1133 +line 1606 +;1604: +;1605: case EV_DISRUPTOR_ZOOMSOUND: +;1606: DEBUGNAME("EV_DISRUPTOR_ZOOMSOUND"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1134 +ADDRGP4 $1137 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1134 +line 1607 +;1607: if (es->number == cg.snap->ps.clientNum) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $650 +line 1608 +;1608: { +line 1609 +;1609: if (cg.snap->ps.zoomMode) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1376 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1141 +line 1610 +;1610: { +line 1611 +;1611: trap_S_StartLocalSound(trap_S_RegisterSound("sound/weapons/disruptor/zoomstart.wav"), CHAN_AUTO); +ADDRGP4 $1144 +ARGP4 +ADDRLP4 100 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 100 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 1612 +;1612: } +ADDRGP4 $650 +JUMPV +LABELV $1141 +line 1614 +;1613: else +;1614: { +line 1615 +;1615: trap_S_StartLocalSound(trap_S_RegisterSound("sound/weapons/disruptor/zoomend.wav"), CHAN_AUTO); +ADDRGP4 $1145 +ARGP4 +ADDRLP4 100 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 100 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 1616 +;1616: } +line 1617 +;1617: } +line 1618 +;1618: break; +ADDRGP4 $650 +JUMPV +LABELV $1146 +line 1620 +;1619: case EV_PREDEFSOUND: +;1620: DEBUGNAME("EV_PREDEFSOUND"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1147 +ADDRGP4 $1150 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1147 +line 1621 +;1621: { +line 1622 +;1622: int sID = -1; +ADDRLP4 100 +CNSTI4 -1 +ASGNI4 +line 1624 +;1623: +;1624: switch (es->eventParm) +ADDRLP4 104 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 104 +INDIRI4 +CNSTI4 1 +LTI4 $1152 +ADDRLP4 104 +INDIRI4 +CNSTI4 6 +GTI4 $1152 +ADDRLP4 104 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1171-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1171 +address $1154 +address $1156 +address $1158 +address $1165 +address $1167 +address $1169 +code +line 1625 +;1625: { +LABELV $1154 +line 1627 +;1626: case PDSOUND_PROTECTHIT: +;1627: sID = trap_S_RegisterSound("sound/weapons/force/protecthit.mp3"); +ADDRGP4 $1155 +ARGP4 +ADDRLP4 112 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 100 +ADDRLP4 112 +INDIRI4 +ASGNI4 +line 1628 +;1628: break; +ADDRGP4 $1152 +JUMPV +LABELV $1156 +line 1630 +;1629: case PDSOUND_PROTECT: +;1630: sID = trap_S_RegisterSound("sound/weapons/force/protect.mp3"); +ADDRGP4 $1157 +ARGP4 +ADDRLP4 116 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 100 +ADDRLP4 116 +INDIRI4 +ASGNI4 +line 1631 +;1631: break; +ADDRGP4 $1152 +JUMPV +LABELV $1158 +line 1633 +;1632: case PDSOUND_ABSORBHIT: +;1633: sID = trap_S_RegisterSound("sound/weapons/force/absorbhit.mp3"); +ADDRGP4 $1159 +ARGP4 +ADDRLP4 120 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 100 +ADDRLP4 120 +INDIRI4 +ASGNI4 +line 1634 +;1634: if (es->trickedentindex >= 0 && es->trickedentindex < MAX_CLIENTS) +ADDRLP4 124 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 124 +INDIRI4 +CNSTI4 0 +LTI4 $1152 +ADDRLP4 124 +INDIRI4 +CNSTI4 32 +GEI4 $1152 +line 1635 +;1635: { +line 1636 +;1636: int clnum = es->trickedentindex; +ADDRLP4 128 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +line 1638 +;1637: +;1638: cg_entities[clnum].teamPowerEffectTime = cg.time + 1000; +CNSTI4 1920 +ADDRLP4 128 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1912 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1000 +ADDI4 +ASGNI4 +line 1639 +;1639: cg_entities[clnum].teamPowerType = 3; +CNSTI4 1920 +ADDRLP4 128 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1916 +ADDP4 +CNSTI4 3 +ASGNI4 +line 1640 +;1640: } +line 1641 +;1641: break; +ADDRGP4 $1152 +JUMPV +LABELV $1165 +line 1643 +;1642: case PDSOUND_ABSORB: +;1643: sID = trap_S_RegisterSound("sound/weapons/force/absorb.mp3"); +ADDRGP4 $1166 +ARGP4 +ADDRLP4 128 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 100 +ADDRLP4 128 +INDIRI4 +ASGNI4 +line 1644 +;1644: break; +ADDRGP4 $1152 +JUMPV +LABELV $1167 +line 1646 +;1645: case PDSOUND_FORCEJUMP: +;1646: sID = trap_S_RegisterSound("sound/weapons/force/jump.mp3"); +ADDRGP4 $1168 +ARGP4 +ADDRLP4 132 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 100 +ADDRLP4 132 +INDIRI4 +ASGNI4 +line 1647 +;1647: break; +ADDRGP4 $1152 +JUMPV +LABELV $1169 +line 1649 +;1648: case PDSOUND_FORCEGRIP: +;1649: sID = trap_S_RegisterSound("sound/weapons/force/grip.mp3"); +ADDRGP4 $1170 +ARGP4 +ADDRLP4 136 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 100 +ADDRLP4 136 +INDIRI4 +ASGNI4 +line 1650 +;1650: break; +line 1652 +;1651: default: +;1652: break; +LABELV $1152 +line 1655 +;1653: } +;1654: +;1655: if (sID != 1) +ADDRLP4 100 +INDIRI4 +CNSTI4 1 +EQI4 $650 +line 1656 +;1656: { +line 1657 +;1657: trap_S_StartSound(es->origin, es->number, CHAN_AUTO, sID); +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 100 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1658 +;1658: } +line 1659 +;1659: } +line 1660 +;1660: break; +ADDRGP4 $650 +JUMPV +LABELV $1175 +line 1663 +;1661: +;1662: case EV_TEAM_POWER: +;1663: DEBUGNAME("EV_TEAM_POWER"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1176 +ADDRGP4 $1179 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1176 +line 1664 +;1664: { +line 1665 +;1665: int clnum = 0; +ADDRLP4 100 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1181 +JUMPV +LABELV $1180 +line 1668 +;1666: +;1667: while (clnum < MAX_CLIENTS) +;1668: { +line 1669 +;1669: if (CG_InClientBitflags(es, clnum)) +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 100 +INDIRI4 +ARGI4 +ADDRLP4 104 +ADDRGP4 CG_InClientBitflags +CALLI4 +ASGNI4 +ADDRLP4 104 +INDIRI4 +CNSTI4 0 +EQI4 $1183 +line 1670 +;1670: { +line 1671 +;1671: if (es->eventParm == 1) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1185 +line 1672 +;1672: { //eventParm 1 is heal +line 1673 +;1673: trap_S_StartSound (NULL, clnum, CHAN_AUTO, cgs.media.teamHealSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 100 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+688 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1674 +;1674: cg_entities[clnum].teamPowerEffectTime = cg.time + 1000; +CNSTI4 1920 +ADDRLP4 100 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1912 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1000 +ADDI4 +ASGNI4 +line 1675 +;1675: cg_entities[clnum].teamPowerType = 1; +CNSTI4 1920 +ADDRLP4 100 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1916 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1676 +;1676: } +ADDRGP4 $1186 +JUMPV +LABELV $1185 +line 1678 +;1677: else +;1678: { //eventParm 2 is force regen +line 1679 +;1679: trap_S_StartSound (NULL, clnum, CHAN_AUTO, cgs.media.teamRegenSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 100 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+692 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1680 +;1680: cg_entities[clnum].teamPowerEffectTime = cg.time + 1000; +CNSTI4 1920 +ADDRLP4 100 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1912 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1000 +ADDI4 +ASGNI4 +line 1681 +;1681: cg_entities[clnum].teamPowerType = 0; +CNSTI4 1920 +ADDRLP4 100 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1916 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1682 +;1682: } +LABELV $1186 +line 1683 +;1683: } +LABELV $1183 +line 1684 +;1684: clnum++; +ADDRLP4 100 +ADDRLP4 100 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1685 +;1685: } +LABELV $1181 +line 1667 +ADDRLP4 100 +INDIRI4 +CNSTI4 32 +LTI4 $1180 +line 1686 +;1686: } +line 1687 +;1687: break; +ADDRGP4 $650 +JUMPV +LABELV $1197 +line 1690 +;1688: +;1689: case EV_SCREENSHAKE: +;1690: DEBUGNAME("EV_SCREENSHAKE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1198 +ADDRGP4 $1201 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1198 +line 1691 +;1691: if (!es->modelindex || cg.predictedPlayerState.clientNum == es->modelindex-1) +ADDRLP4 100 +ADDRLP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 100 +INDIRI4 +CNSTI4 0 +EQI4 $1206 +ADDRGP4 cg+96+144 +INDIRI4 +ADDRLP4 100 +INDIRI4 +CNSTI4 1 +SUBI4 +NEI4 $650 +LABELV $1206 +line 1692 +;1692: { +line 1693 +;1693: CGCam_Shake(es->angles[0], es->time); +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CGCam_Shake +CALLV +pop +line 1694 +;1694: } +line 1695 +;1695: break; +ADDRGP4 $650 +JUMPV +LABELV $1207 +line 1697 +;1696: case EV_USE_ITEM0: +;1697: DEBUGNAME("EV_USE_ITEM0"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1208 +ADDRGP4 $1211 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1208 +line 1698 +;1698: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1699 +;1699: break; +ADDRGP4 $650 +JUMPV +LABELV $1212 +line 1701 +;1700: case EV_USE_ITEM1: +;1701: DEBUGNAME("EV_USE_ITEM1"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1213 +ADDRGP4 $1216 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1213 +line 1702 +;1702: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1703 +;1703: break; +ADDRGP4 $650 +JUMPV +LABELV $1217 +line 1705 +;1704: case EV_USE_ITEM2: +;1705: DEBUGNAME("EV_USE_ITEM2"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1218 +ADDRGP4 $1221 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1218 +line 1706 +;1706: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1707 +;1707: break; +ADDRGP4 $650 +JUMPV +LABELV $1222 +line 1709 +;1708: case EV_USE_ITEM3: +;1709: DEBUGNAME("EV_USE_ITEM3"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1223 +ADDRGP4 $1226 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1223 +line 1710 +;1710: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1711 +;1711: break; +ADDRGP4 $650 +JUMPV +LABELV $1227 +line 1713 +;1712: case EV_USE_ITEM4: +;1713: DEBUGNAME("EV_USE_ITEM4"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1228 +ADDRGP4 $1231 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1228 +line 1714 +;1714: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1715 +;1715: break; +ADDRGP4 $650 +JUMPV +LABELV $1232 +line 1717 +;1716: case EV_USE_ITEM5: +;1717: DEBUGNAME("EV_USE_ITEM5"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1233 +ADDRGP4 $1236 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1233 +line 1718 +;1718: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1719 +;1719: break; +ADDRGP4 $650 +JUMPV +LABELV $1237 +line 1721 +;1720: case EV_USE_ITEM6: +;1721: DEBUGNAME("EV_USE_ITEM6"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1238 +ADDRGP4 $1241 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1238 +line 1722 +;1722: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1723 +;1723: break; +ADDRGP4 $650 +JUMPV +LABELV $1242 +line 1725 +;1724: case EV_USE_ITEM7: +;1725: DEBUGNAME("EV_USE_ITEM7"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1243 +ADDRGP4 $1246 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1243 +line 1726 +;1726: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1727 +;1727: break; +ADDRGP4 $650 +JUMPV +LABELV $1247 +line 1729 +;1728: case EV_USE_ITEM8: +;1729: DEBUGNAME("EV_USE_ITEM8"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1248 +ADDRGP4 $1251 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1248 +line 1730 +;1730: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1731 +;1731: break; +ADDRGP4 $650 +JUMPV +LABELV $1252 +line 1733 +;1732: case EV_USE_ITEM9: +;1733: DEBUGNAME("EV_USE_ITEM9"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1253 +ADDRGP4 $1256 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1253 +line 1734 +;1734: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1735 +;1735: break; +ADDRGP4 $650 +JUMPV +LABELV $1257 +line 1737 +;1736: case EV_USE_ITEM10: +;1737: DEBUGNAME("EV_USE_ITEM10"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1258 +ADDRGP4 $1261 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1258 +line 1738 +;1738: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1739 +;1739: break; +ADDRGP4 $650 +JUMPV +LABELV $1262 +line 1741 +;1740: case EV_USE_ITEM11: +;1741: DEBUGNAME("EV_USE_ITEM11"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1263 +ADDRGP4 $1266 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1263 +line 1742 +;1742: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1743 +;1743: break; +ADDRGP4 $650 +JUMPV +LABELV $1267 +line 1745 +;1744: case EV_USE_ITEM12: +;1745: DEBUGNAME("EV_USE_ITEM12"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1268 +ADDRGP4 $1271 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1268 +line 1746 +;1746: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1747 +;1747: break; +ADDRGP4 $650 +JUMPV +LABELV $1272 +line 1749 +;1748: case EV_USE_ITEM13: +;1749: DEBUGNAME("EV_USE_ITEM13"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1273 +ADDRGP4 $1276 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1273 +line 1750 +;1750: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1751 +;1751: break; +ADDRGP4 $650 +JUMPV +LABELV $1277 +line 1753 +;1752: case EV_USE_ITEM14: +;1753: DEBUGNAME("EV_USE_ITEM14"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1278 +ADDRGP4 $1281 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1278 +line 1754 +;1754: CG_UseItem( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_UseItem +CALLV +pop +line 1755 +;1755: break; +ADDRGP4 $650 +JUMPV +LABELV $1282 +line 1758 +;1756: +;1757: case EV_ITEMUSEFAIL: +;1758: DEBUGNAME("EV_ITEMUSEFAIL"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1283 +ADDRGP4 $1286 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1283 +line 1759 +;1759: if (cg.snap->ps.clientNum == es->number) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +NEI4 $650 +line 1760 +;1760: { +line 1761 +;1761: char *stripedref = NULL; +ADDRLP4 104 +CNSTP4 0 +ASGNP4 +line 1763 +;1762: +;1763: switch(es->eventParm) +ADDRLP4 108 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 108 +INDIRI4 +CNSTI4 1 +LTI4 $1291 +ADDRLP4 108 +INDIRI4 +CNSTI4 4 +GTI4 $1291 +ADDRLP4 108 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1301-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1301 +address $1293 +address $1295 +address $1297 +address $1299 +code +line 1764 +;1764: { +LABELV $1293 +line 1766 +;1765: case SENTRY_NOROOM: +;1766: stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SENTRY_NOROOM"); +ADDRGP4 $241 +ARGP4 +ADDRGP4 $1294 +ARGP4 +ADDRLP4 116 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 116 +INDIRP4 +ASGNP4 +line 1767 +;1767: break; +ADDRGP4 $1291 +JUMPV +LABELV $1295 +line 1769 +;1768: case SENTRY_ALREADYPLACED: +;1769: stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SENTRY_ALREADYPLACED"); +ADDRGP4 $241 +ARGP4 +ADDRGP4 $1296 +ARGP4 +ADDRLP4 120 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 120 +INDIRP4 +ASGNP4 +line 1770 +;1770: break; +ADDRGP4 $1291 +JUMPV +LABELV $1297 +line 1772 +;1771: case SHIELD_NOROOM: +;1772: stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SHIELD_NOROOM"); +ADDRGP4 $241 +ARGP4 +ADDRGP4 $1298 +ARGP4 +ADDRLP4 124 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 124 +INDIRP4 +ASGNP4 +line 1773 +;1773: break; +ADDRGP4 $1291 +JUMPV +LABELV $1299 +line 1775 +;1774: case SEEKER_ALREADYDEPLOYED: +;1775: stripedref = (char *)CG_GetStripEdString("INGAMETEXT", "SEEKER_ALREADYDEPLOYED"); +ADDRGP4 $241 +ARGP4 +ADDRGP4 $1300 +ARGP4 +ADDRLP4 128 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 104 +ADDRLP4 128 +INDIRP4 +ASGNP4 +line 1776 +;1776: break; +line 1778 +;1777: default: +;1778: break; +LABELV $1291 +line 1781 +;1779: } +;1780: +;1781: if (!stripedref) +ADDRLP4 104 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1303 +line 1782 +;1782: { +line 1783 +;1783: break; +ADDRGP4 $650 +JUMPV +LABELV $1303 +line 1786 +;1784: } +;1785: +;1786: Com_Printf("%s\n", stripedref); +ADDRGP4 $582 +ARGP4 +ADDRLP4 104 +INDIRP4 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 1787 +;1787: } +line 1788 +;1788: break; +ADDRGP4 $650 +JUMPV +LABELV $1305 +line 1796 +;1789: +;1790: //================================================================= +;1791: +;1792: // +;1793: // other events +;1794: // +;1795: case EV_PLAYER_TELEPORT_IN: +;1796: DEBUGNAME("EV_PLAYER_TELEPORT_IN"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1306 +ADDRGP4 $1309 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1306 +line 1797 +;1797: { +line 1799 +;1798: trace_t tr; +;1799: vec3_t playerMins = {-15, -15, DEFAULT_MINS_2+8}; +ADDRLP4 104 +ADDRGP4 $1310 +INDIRB +ASGNB 12 +line 1800 +;1800: vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; +ADDRLP4 116 +ADDRGP4 $1311 +INDIRB +ASGNB 12 +line 1803 +;1801: vec3_t ang, pos, dpos; +;1802: +;1803: VectorClear(ang); +ADDRLP4 1244 +CNSTF4 0 +ASGNF4 +ADDRLP4 128+8 +ADDRLP4 1244 +INDIRF4 +ASGNF4 +ADDRLP4 128+4 +ADDRLP4 1244 +INDIRF4 +ASGNF4 +ADDRLP4 128 +ADDRLP4 1244 +INDIRF4 +ASGNF4 +line 1804 +;1804: ang[ROLL] = 1; +ADDRLP4 128+8 +CNSTF4 1065353216 +ASGNF4 +line 1806 +;1805: +;1806: VectorCopy(position, dpos); +ADDRLP4 1220 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 1807 +;1807: dpos[2] -= 4096; +ADDRLP4 1220+8 +ADDRLP4 1220+8 +INDIRF4 +CNSTF4 1166016512 +SUBF4 +ASGNF4 +line 1809 +;1808: +;1809: CG_Trace(&tr, position, playerMins, playerMaxs, dpos, es->number, MASK_SOLID); +ADDRLP4 140 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 104 +ARGP4 +ADDRLP4 116 +ARGP4 +ADDRLP4 1220 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 1810 +;1810: VectorCopy(tr.endpos, pos); +ADDRLP4 1232 +ADDRLP4 140+12 +INDIRB +ASGNB 12 +line 1812 +;1811: +;1812: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.teleInSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+696 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1814 +;1813: +;1814: if (tr.fraction == 1) +ADDRLP4 140+8 +INDIRF4 +CNSTF4 1065353216 +NEF4 $1319 +line 1815 +;1815: { +line 1816 +;1816: break; +ADDRGP4 $650 +JUMPV +LABELV $1319 +line 1818 +;1817: } +;1818: trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/spawn.efx"), pos, ang); +ADDRGP4 $1322 +ARGP4 +ADDRLP4 1248 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 1248 +INDIRI4 +ARGI4 +ADDRLP4 1232 +ARGP4 +ADDRLP4 128 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1819 +;1819: } +line 1820 +;1820: break; +ADDRGP4 $650 +JUMPV +LABELV $1323 +line 1823 +;1821: +;1822: case EV_PLAYER_TELEPORT_OUT: +;1823: DEBUGNAME("EV_PLAYER_TELEPORT_OUT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1324 +ADDRGP4 $1327 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1324 +line 1824 +;1824: { +line 1826 +;1825: trace_t tr; +;1826: vec3_t playerMins = {-15, -15, DEFAULT_MINS_2+8}; +ADDRLP4 104 +ADDRGP4 $1328 +INDIRB +ASGNB 12 +line 1827 +;1827: vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; +ADDRLP4 116 +ADDRGP4 $1329 +INDIRB +ASGNB 12 +line 1830 +;1828: vec3_t ang, pos, dpos; +;1829: +;1830: VectorClear(ang); +ADDRLP4 1244 +CNSTF4 0 +ASGNF4 +ADDRLP4 128+8 +ADDRLP4 1244 +INDIRF4 +ASGNF4 +ADDRLP4 128+4 +ADDRLP4 1244 +INDIRF4 +ASGNF4 +ADDRLP4 128 +ADDRLP4 1244 +INDIRF4 +ASGNF4 +line 1831 +;1831: ang[ROLL] = 1; +ADDRLP4 128+8 +CNSTF4 1065353216 +ASGNF4 +line 1833 +;1832: +;1833: VectorCopy(position, dpos); +ADDRLP4 1220 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 1834 +;1834: dpos[2] -= 4096; +ADDRLP4 1220+8 +ADDRLP4 1220+8 +INDIRF4 +CNSTF4 1166016512 +SUBF4 +ASGNF4 +line 1836 +;1835: +;1836: CG_Trace(&tr, position, playerMins, playerMaxs, dpos, es->number, MASK_SOLID); +ADDRLP4 140 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 104 +ARGP4 +ADDRLP4 116 +ARGP4 +ADDRLP4 1220 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 1837 +;1837: VectorCopy(tr.endpos, pos); +ADDRLP4 1232 +ADDRLP4 140+12 +INDIRB +ASGNB 12 +line 1839 +;1838: +;1839: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.teleOutSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+700 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1841 +;1840: +;1841: if (tr.fraction == 1) +ADDRLP4 140+8 +INDIRF4 +CNSTF4 1065353216 +NEF4 $1337 +line 1842 +;1842: { +line 1843 +;1843: break; +ADDRGP4 $650 +JUMPV +LABELV $1337 +line 1845 +;1844: } +;1845: trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/spawn.efx"), pos, ang); +ADDRGP4 $1322 +ARGP4 +ADDRLP4 1248 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 1248 +INDIRI4 +ARGI4 +ADDRLP4 1232 +ARGP4 +ADDRLP4 128 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1846 +;1846: } +line 1847 +;1847: break; +ADDRGP4 $650 +JUMPV +LABELV $1340 +line 1850 +;1848: +;1849: case EV_ITEM_POP: +;1850: DEBUGNAME("EV_ITEM_POP"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1341 +ADDRGP4 $1344 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1341 +line 1851 +;1851: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.respawnSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+704 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1852 +;1852: break; +ADDRGP4 $650 +JUMPV +LABELV $1347 +line 1854 +;1853: case EV_ITEM_RESPAWN: +;1854: DEBUGNAME("EV_ITEM_RESPAWN"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1348 +ADDRGP4 $1351 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1348 +line 1855 +;1855: cent->miscTime = cg.time; // scale up from this +ADDRFP4 0 +INDIRP4 +CNSTI4 620 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1856 +;1856: trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.respawnSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+704 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1857 +;1857: break; +ADDRGP4 $650 +JUMPV +LABELV $1355 +line 1860 +;1858: +;1859: case EV_GRENADE_BOUNCE: +;1860: DEBUGNAME("EV_GRENADE_BOUNCE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $650 +ADDRGP4 $1359 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 1862 +;1861: //Do something here? +;1862: break; +ADDRGP4 $650 +JUMPV +LABELV $1360 +line 1865 +;1863: +;1864: case EV_SCOREPLUM: +;1865: DEBUGNAME("EV_SCOREPLUM"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1361 +ADDRGP4 $1364 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1361 +line 1866 +;1866: CG_ScorePlum( cent->currentState.otherEntityNum, cent->lerpOrigin, cent->currentState.time ); +ADDRLP4 104 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 104 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 104 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 104 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_ScorePlum +CALLV +pop +line 1867 +;1867: break; +ADDRGP4 $650 +JUMPV +LABELV $1365 +line 1870 +;1868: +;1869: case EV_CTFMESSAGE: +;1870: DEBUGNAME("EV_CTFMESSAGE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1366 +ADDRGP4 $1369 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1366 +line 1871 +;1871: CG_GetCTFMessageEvent(es); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_GetCTFMessageEvent +CALLV +pop +line 1872 +;1872: break; +ADDRGP4 $650 +JUMPV +LABELV $1370 +line 1878 +;1873: +;1874: // +;1875: // saga gameplay events +;1876: // +;1877: case EV_SAGA_ROUNDOVER: +;1878: DEBUGNAME("EV_SAGA_ROUNDOVER"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1371 +ADDRGP4 $1374 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1371 +line 1879 +;1879: CG_SagaRoundOver(&cg_entities[cent->currentState.weapon], cent->currentState.eventParm); +ADDRLP4 108 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 108 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +ADDRLP4 108 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_SagaRoundOver +CALLV +pop +line 1880 +;1880: break; +ADDRGP4 $650 +JUMPV +LABELV $1375 +line 1882 +;1881: case EV_SAGA_OBJECTIVECOMPLETE: +;1882: DEBUGNAME("EV_SAGA_OBJECTIVECOMPLETE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1376 +ADDRGP4 $1379 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1376 +line 1883 +;1883: CG_SagaObjectiveCompleted(&cg_entities[cent->currentState.weapon], cent->currentState.eventParm, cent->currentState.trickedentindex); +ADDRLP4 112 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 112 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +ADDRLP4 112 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 112 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_SagaObjectiveCompleted +CALLV +pop +line 1884 +;1884: break; +ADDRGP4 $650 +JUMPV +LABELV $1380 +line 1887 +;1885: +;1886: case EV_DESTROY_GHOUL2_INSTANCE: +;1887: DEBUGNAME("EV_DESTROY_GHOUL2_INSTANCE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1381 +ADDRGP4 $1384 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1381 +line 1888 +;1888: if (cg_entities[es->eventParm].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[es->eventParm].ghoul2)) +ADDRLP4 116 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 116 +INDIRI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $650 +ADDRLP4 116 +INDIRI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 120 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 120 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 1889 +;1889: { +line 1890 +;1890: if (es->eventParm < MAX_CLIENTS) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 32 +GEI4 $1389 +line 1891 +;1891: { //You try to do very bad thing! +line 1895 +;1892:#ifdef _DEBUG +;1893: Com_Printf("WARNING: Tried to kill a client ghoul2 instance with a server event!\n"); +;1894:#endif +;1895: break; +ADDRGP4 $650 +JUMPV +LABELV $1389 +line 1897 +;1896: } +;1897: trap_G2API_CleanGhoul2Models(&(cg_entities[es->eventParm].ghoul2)); +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 1898 +;1898: } +line 1899 +;1899: break; +ADDRGP4 $650 +JUMPV +LABELV $1392 +line 1902 +;1900: +;1901: case EV_DESTROY_WEAPON_MODEL: +;1902: DEBUGNAME("EV_DESTROY_WEAPON_MODEL"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1393 +ADDRGP4 $1396 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1393 +line 1903 +;1903: if (cg_entities[es->eventParm].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[es->eventParm].ghoul2) && +ADDRLP4 124 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 124 +INDIRI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $650 +ADDRLP4 124 +INDIRI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 128 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 128 +INDIRI4 +CNSTI4 0 +EQI4 $650 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 132 +ADDRGP4 trap_G2API_HasGhoul2ModelOnIndex +CALLI4 +ASGNI4 +ADDRLP4 132 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 1905 +;1904: trap_G2API_HasGhoul2ModelOnIndex(&(cg_entities[es->eventParm].ghoul2), 1)) +;1905: { +line 1906 +;1906: trap_G2API_RemoveGhoul2Model(&(cg_entities[es->eventParm].ghoul2), 1); +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_G2API_RemoveGhoul2Model +CALLI4 +pop +line 1907 +;1907: } +line 1908 +;1908: break; +ADDRGP4 $650 +JUMPV +LABELV $1403 +line 1911 +;1909: +;1910: case EV_GIVE_NEW_RANK: +;1911: DEBUGNAME("EV_GIVE_NEW_RANK"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1404 +ADDRGP4 $1407 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1404 +line 1912 +;1912: if (es->trickedentindex == cg.snap->ps.clientNum) +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $650 +line 1913 +;1913: { +line 1914 +;1914: trap_Cvar_Set("ui_rankChange", va("%i", es->eventParm)); +ADDRGP4 $1412 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 136 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $1411 +ARGP4 +ADDRLP4 136 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 1916 +;1915: +;1916: trap_Cvar_Set("ui_myteam", va("%i", es->bolt2)); +ADDRGP4 $1412 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 140 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $1413 +ARGP4 +ADDRLP4 140 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 1918 +;1917: +;1918: if (!( trap_Key_GetCatcher() & KEYCATCH_UI ) && !es->bolt1) +ADDRLP4 144 +ADDRGP4 trap_Key_GetCatcher +CALLI4 +ASGNI4 +ADDRLP4 148 +CNSTI4 0 +ASGNI4 +ADDRLP4 144 +INDIRI4 +CNSTI4 2 +BANDI4 +ADDRLP4 148 +INDIRI4 +NEI4 $650 +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRI4 +ADDRLP4 148 +INDIRI4 +NEI4 $650 +line 1919 +;1919: { +line 1920 +;1920: trap_OpenUIMenu(3); +CNSTI4 3 +ARGI4 +ADDRGP4 trap_OpenUIMenu +CALLV +pop +line 1921 +;1921: } +line 1922 +;1922: } +line 1923 +;1923: break; +ADDRGP4 $650 +JUMPV +LABELV $1416 +line 1926 +;1924: +;1925: case EV_SET_FREE_SABER: +;1926: DEBUGNAME("EV_SET_FREE_SABER"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1417 +ADDRGP4 $1420 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1417 +line 1928 +;1927: +;1928: trap_Cvar_Set("ui_freeSaber", va("%i", es->eventParm)); +ADDRGP4 $1412 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 136 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $1421 +ARGP4 +ADDRLP4 136 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 1929 +;1929: break; +ADDRGP4 $650 +JUMPV +LABELV $1422 +line 1932 +;1930: +;1931: case EV_SET_FORCE_DISABLE: +;1932: DEBUGNAME("EV_SET_FORCE_DISABLE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1423 +ADDRGP4 $1426 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1423 +line 1934 +;1933: +;1934: trap_Cvar_Set("ui_forcePowerDisable", va("%i", es->eventParm)); +ADDRGP4 $1412 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 140 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $1427 +ARGP4 +ADDRLP4 140 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 1935 +;1935: break; +ADDRGP4 $650 +JUMPV +LABELV $1428 +line 1941 +;1936: +;1937: // +;1938: // missile impacts +;1939: // +;1940: case EV_MISSILE_STICK: +;1941: DEBUGNAME("EV_MISSILE_STICK"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $650 +ADDRGP4 $1432 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 1943 +;1942:// trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.missileStick ); +;1943: break; +ADDRGP4 $650 +JUMPV +LABELV $1433 +line 1946 +;1944: +;1945: case EV_MISSILE_HIT: +;1946: DEBUGNAME("EV_MISSILE_HIT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1434 +ADDRGP4 $1437 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1434 +line 1947 +;1947: ByteToDir( es->eventParm, dir ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ARGP4 +ADDRGP4 ByteToDir +CALLV +pop +line 1948 +;1948: if (cent->currentState.eFlags & EF_ALT_FIRING) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $1438 +line 1949 +;1949: { +line 1950 +;1950: CG_MissileHitPlayer( es->weapon, position, dir, es->otherEntityNum, qtrue); +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_MissileHitPlayer +CALLV +pop +line 1951 +;1951: } +ADDRGP4 $650 +JUMPV +LABELV $1438 +line 1953 +;1952: else +;1953: { +line 1954 +;1954: CG_MissileHitPlayer( es->weapon, position, dir, es->otherEntityNum, qfalse); +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_MissileHitPlayer +CALLV +pop +line 1955 +;1955: } +line 1956 +;1956: break; +ADDRGP4 $650 +JUMPV +LABELV $1440 +line 1959 +;1957: +;1958: case EV_MISSILE_MISS: +;1959: DEBUGNAME("EV_MISSILE_MISS"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1441 +ADDRGP4 $1444 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1441 +line 1960 +;1960: ByteToDir( es->eventParm, dir ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ARGP4 +ADDRGP4 ByteToDir +CALLV +pop +line 1961 +;1961: if (cent->currentState.eFlags & EF_ALT_FIRING) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $1445 +line 1962 +;1962: { +line 1963 +;1963: CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_DEFAULT, qtrue, es->generic1); +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 148 +CNSTI4 0 +ASGNI4 +ADDRLP4 148 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRLP4 148 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_MissileHitWall +CALLV +pop +line 1964 +;1964: } +ADDRGP4 $650 +JUMPV +LABELV $1445 +line 1966 +;1965: else +;1966: { +line 1967 +;1967: CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_DEFAULT, qfalse, 0); +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 144 +CNSTI4 0 +ASGNI4 +ADDRLP4 144 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRLP4 144 +INDIRI4 +ARGI4 +ADDRLP4 144 +INDIRI4 +ARGI4 +ADDRLP4 144 +INDIRI4 +ARGI4 +ADDRGP4 CG_MissileHitWall +CALLV +pop +line 1968 +;1968: } +line 1969 +;1969: break; +ADDRGP4 $650 +JUMPV +LABELV $1447 +line 1972 +;1970: +;1971: case EV_MISSILE_MISS_METAL: +;1972: DEBUGNAME("EV_MISSILE_MISS_METAL"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1448 +ADDRGP4 $1451 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1448 +line 1973 +;1973: ByteToDir( es->eventParm, dir ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ARGP4 +ADDRGP4 ByteToDir +CALLV +pop +line 1974 +;1974: if (cent->currentState.eFlags & EF_ALT_FIRING) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $1452 +line 1975 +;1975: { +line 1976 +;1976: CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_METAL, qtrue, es->generic1); +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRLP4 148 +CNSTI4 1 +ASGNI4 +ADDRLP4 148 +INDIRI4 +ARGI4 +ADDRLP4 148 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_MissileHitWall +CALLV +pop +line 1977 +;1977: } +ADDRGP4 $650 +JUMPV +LABELV $1452 +line 1979 +;1978: else +;1979: { +line 1980 +;1980: CG_MissileHitWall(es->weapon, 0, position, dir, IMPACTSOUND_METAL, qfalse, 0); +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 144 +CNSTI4 0 +ASGNI4 +ADDRLP4 144 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 144 +INDIRI4 +ARGI4 +ADDRLP4 144 +INDIRI4 +ARGI4 +ADDRGP4 CG_MissileHitWall +CALLV +pop +line 1981 +;1981: } +line 1982 +;1982: break; +ADDRGP4 $650 +JUMPV +LABELV $1454 +line 1985 +;1983: +;1984: case EV_PLAY_EFFECT: +;1985: DEBUGNAME("EV_PLAY_EFFECT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1455 +ADDRGP4 $1458 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1455 +line 1986 +;1986: switch(es->eventParm) +ADDRLP4 144 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 144 +INDIRI4 +CNSTI4 1 +LTI4 $1459 +ADDRLP4 144 +INDIRI4 +CNSTI4 9 +GTI4 $1459 +ADDRLP4 144 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1480-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1480 +address $1462 +address $1464 +address $1466 +address $1468 +address $1470 +address $1472 +address $1474 +address $1476 +address $1478 +code +line 1987 +;1987: { //it isn't a hack, it's ingenuity! +LABELV $1462 +line 1989 +;1988: case EFFECT_SMOKE: +;1989: eID = trap_FX_RegisterEffect("emplaced/dead_smoke.efx"); +ADDRGP4 $1463 +ARGP4 +ADDRLP4 152 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 152 +INDIRI4 +ASGNI4 +line 1990 +;1990: break; +ADDRGP4 $1460 +JUMPV +LABELV $1464 +line 1992 +;1991: case EFFECT_EXPLOSION: +;1992: eID = trap_FX_RegisterEffect("emplaced/explode.efx"); +ADDRGP4 $1465 +ARGP4 +ADDRLP4 156 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 156 +INDIRI4 +ASGNI4 +line 1993 +;1993: break; +ADDRGP4 $1460 +JUMPV +LABELV $1466 +line 1995 +;1994: case EFFECT_EXPLOSION_PAS: +;1995: eID = trap_FX_RegisterEffect("turret/explode.efx"); +ADDRGP4 $1467 +ARGP4 +ADDRLP4 160 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 160 +INDIRI4 +ASGNI4 +line 1996 +;1996: break; +ADDRGP4 $1460 +JUMPV +LABELV $1468 +line 1998 +;1997: case EFFECT_SPARK_EXPLOSION: +;1998: eID = trap_FX_RegisterEffect("spark_explosion.efx"); +ADDRGP4 $1469 +ARGP4 +ADDRLP4 164 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 164 +INDIRI4 +ASGNI4 +line 1999 +;1999: break; +ADDRGP4 $1460 +JUMPV +LABELV $1470 +line 2001 +;2000: case EFFECT_EXPLOSION_TRIPMINE: +;2001: eID = trap_FX_RegisterEffect("tripMine/explosion.efx"); +ADDRGP4 $1471 +ARGP4 +ADDRLP4 168 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 168 +INDIRI4 +ASGNI4 +line 2002 +;2002: break; +ADDRGP4 $1460 +JUMPV +LABELV $1472 +line 2004 +;2003: case EFFECT_EXPLOSION_DETPACK: +;2004: eID = trap_FX_RegisterEffect("detpack/explosion.efx"); +ADDRGP4 $1473 +ARGP4 +ADDRLP4 172 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 172 +INDIRI4 +ASGNI4 +line 2005 +;2005: break; +ADDRGP4 $1460 +JUMPV +LABELV $1474 +line 2007 +;2006: case EFFECT_EXPLOSION_FLECHETTE: +;2007: eID = trap_FX_RegisterEffect("flechette/alt_blow.efx"); +ADDRGP4 $1475 +ARGP4 +ADDRLP4 176 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 176 +INDIRI4 +ASGNI4 +line 2008 +;2008: break; +ADDRGP4 $1460 +JUMPV +LABELV $1476 +line 2010 +;2009: case EFFECT_STUNHIT: +;2010: eID = trap_FX_RegisterEffect("stunBaton/flesh_impact.efx"); +ADDRGP4 $1477 +ARGP4 +ADDRLP4 180 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 180 +INDIRI4 +ASGNI4 +line 2011 +;2011: break; +ADDRGP4 $1460 +JUMPV +LABELV $1478 +line 2013 +;2012: case EFFECT_EXPLOSION_DEMP2ALT: +;2013: FX_DEMP2_AltDetonate( cent->lerpOrigin, es->weapon ); +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 FX_DEMP2_AltDetonate +CALLV +pop +line 2014 +;2014: eID = trap_FX_RegisterEffect("demp2/altDetonate.efx"); +ADDRGP4 $1479 +ARGP4 +ADDRLP4 184 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 184 +INDIRI4 +ASGNI4 +line 2015 +;2015: break; +ADDRGP4 $1460 +JUMPV +LABELV $1459 +line 2017 +;2016: default: +;2017: eID = -1; +ADDRLP4 28 +CNSTI4 -1 +ASGNI4 +line 2018 +;2018: break; +LABELV $1460 +line 2021 +;2019: } +;2020: +;2021: if (eID != -1) +ADDRLP4 28 +INDIRI4 +CNSTI4 -1 +EQI4 $650 +line 2022 +;2022: { +line 2025 +;2023: vec3_t fxDir; +;2024: +;2025: VectorCopy(es->angles, fxDir); +ADDRLP4 152 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRB +ASGNB 12 +line 2027 +;2026: +;2027: if (!fxDir[0] && !fxDir[1] && !fxDir[2]) +ADDRLP4 164 +CNSTF4 0 +ASGNF4 +ADDRLP4 152 +INDIRF4 +ADDRLP4 164 +INDIRF4 +NEF4 $1484 +ADDRLP4 152+4 +INDIRF4 +ADDRLP4 164 +INDIRF4 +NEF4 $1484 +ADDRLP4 152+8 +INDIRF4 +ADDRLP4 164 +INDIRF4 +NEF4 $1484 +line 2028 +;2028: { +line 2029 +;2029: fxDir[1] = 1; +ADDRLP4 152+4 +CNSTF4 1065353216 +ASGNF4 +line 2030 +;2030: } +LABELV $1484 +line 2032 +;2031: +;2032: trap_FX_PlayEffectID(eID, es->origin, fxDir); +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 152 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 2033 +;2033: } +line 2034 +;2034: break; +ADDRGP4 $650 +JUMPV +LABELV $1489 +line 2037 +;2035: +;2036: case EV_PLAY_EFFECT_ID: +;2037: DEBUGNAME("EV_PLAY_EFFECT_ID"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1490 +ADDRGP4 $1493 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1490 +line 2038 +;2038: { +line 2041 +;2039: vec3_t fxDir; +;2040: +;2041: AngleVectors(es->angles, fxDir, 0, 0); +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ARGP4 +ADDRLP4 152 +ARGP4 +ADDRLP4 164 +CNSTP4 0 +ASGNP4 +ADDRLP4 164 +INDIRP4 +ARGP4 +ADDRLP4 164 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 2043 +;2042: +;2043: if (!fxDir[0] && !fxDir[1] && !fxDir[2]) +ADDRLP4 168 +CNSTF4 0 +ASGNF4 +ADDRLP4 152 +INDIRF4 +ADDRLP4 168 +INDIRF4 +NEF4 $1494 +ADDRLP4 152+4 +INDIRF4 +ADDRLP4 168 +INDIRF4 +NEF4 $1494 +ADDRLP4 152+8 +INDIRF4 +ADDRLP4 168 +INDIRF4 +NEF4 $1494 +line 2044 +;2044: { +line 2045 +;2045: fxDir[1] = 1; +ADDRLP4 152+4 +CNSTF4 1065353216 +ASGNF4 +line 2046 +;2046: } +LABELV $1494 +line 2048 +;2047: +;2048: if ( cgs.gameEffects[ es->eventParm ] ) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+38412 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1499 +line 2049 +;2049: { +line 2050 +;2050: trap_FX_PlayEffectID(cgs.gameEffects[es->eventParm], es->origin, fxDir ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+38412 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 152 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 2051 +;2051: } +ADDRGP4 $650 +JUMPV +LABELV $1499 +line 2053 +;2052: else +;2053: { +line 2054 +;2054: s = CG_ConfigString( CS_EFFECTS + es->eventParm ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 768 +ADDI4 +ARGI4 +ADDRLP4 172 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 172 +INDIRP4 +ASGNP4 +line 2055 +;2055: if (s && s[0]) +ADDRLP4 176 +ADDRLP4 40 +INDIRP4 +ASGNP4 +ADDRLP4 176 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $650 +ADDRLP4 176 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $650 +line 2056 +;2056: { +line 2057 +;2057: trap_FX_PlayEffectID(trap_FX_RegisterEffect(s), es->origin, fxDir ); +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRLP4 180 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 180 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 152 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 2058 +;2058: } +line 2059 +;2059: } +line 2060 +;2060: } +line 2061 +;2061: break; +ADDRGP4 $650 +JUMPV +LABELV $1505 +line 2064 +;2062: +;2063: case EV_MUTE_SOUND: +;2064: DEBUGNAME("EV_MUTE_SOUND"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1506 +ADDRGP4 $1509 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1506 +line 2065 +;2065: if (cg_entities[es->trickedentindex2].currentState.eFlags & EF_SOUNDTRACKER) +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+8 +ADDP4 +INDIRI4 +CNSTI4 8388608 +BANDI4 +CNSTI4 0 +EQI4 $1510 +line 2066 +;2066: { +line 2067 +;2067: cg_entities[es->trickedentindex2].currentState.eFlags -= EF_SOUNDTRACKER; +ADDRLP4 152 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+8 +ADDP4 +ASGNP4 +ADDRLP4 152 +INDIRP4 +ADDRLP4 152 +INDIRP4 +INDIRI4 +CNSTI4 8388608 +SUBI4 +ASGNI4 +line 2068 +;2068: } +LABELV $1510 +line 2069 +;2069: trap_S_MuteSound(es->trickedentindex2, es->trickedentindex); +ADDRLP4 0 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_MuteSound +CALLV +pop +line 2070 +;2070: trap_S_StopLoopingSound(es->trickedentindex2); +ADDRLP4 0 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StopLoopingSound +CALLV +pop +line 2071 +;2071: break; +ADDRGP4 $650 +JUMPV +LABELV $1514 +line 2074 +;2072: +;2073: case EV_GENERAL_SOUND: +;2074: DEBUGNAME("EV_GENERAL_SOUND"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1515 +ADDRGP4 $1518 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1515 +line 2075 +;2075: if (es->saberEntityNum == TRACK_CHANNEL_2 || es->saberEntityNum == TRACK_CHANNEL_3 || +ADDRLP4 156 +ADDRLP4 0 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 156 +INDIRI4 +CNSTI4 52 +EQI4 $1522 +ADDRLP4 156 +INDIRI4 +CNSTI4 53 +EQI4 $1522 +ADDRLP4 156 +INDIRI4 +CNSTI4 55 +NEI4 $1519 +LABELV $1522 +line 2077 +;2076: es->saberEntityNum == TRACK_CHANNEL_5) +;2077: { //channels 2 and 3 are for speed and rage, 5 for sight +line 2078 +;2078: if ( cgs.gameSounds[ es->eventParm ] ) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 2079 +;2079: { +line 2080 +;2080: trap_S_AddRealLoopingSound(es->number, es->pos.trBase, vec3_origin, cgs.gameSounds[ es->eventParm ] ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddRealLoopingSound +CALLV +pop +line 2081 +;2081: } +line 2082 +;2082: } +ADDRGP4 $650 +JUMPV +LABELV $1519 +line 2084 +;2083: else +;2084: { +line 2085 +;2085: if ( cgs.gameSounds[ es->eventParm ] ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1527 +line 2086 +;2086: trap_S_StartSound (NULL, es->number, CHAN_VOICE, cgs.gameSounds[ es->eventParm ] ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2087 +;2087: } else { +ADDRGP4 $650 +JUMPV +LABELV $1527 +line 2088 +;2088: s = CG_ConfigString( CS_SOUNDS + es->eventParm ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 288 +ADDI4 +ARGI4 +ADDRLP4 160 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 160 +INDIRP4 +ASGNP4 +line 2089 +;2089: trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, s ) ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRLP4 164 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 164 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2090 +;2090: } +line 2091 +;2091: } +line 2092 +;2092: break; +ADDRGP4 $650 +JUMPV +LABELV $1531 +line 2095 +;2093: +;2094: case EV_GLOBAL_SOUND: // play from the player's head so it never diminishes +;2095: DEBUGNAME("EV_GLOBAL_SOUND"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1532 +ADDRGP4 $1535 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1532 +line 2096 +;2096: if ( cgs.gameSounds[ es->eventParm ] ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1536 +line 2097 +;2097: trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, cgs.gameSounds[ es->eventParm ] ); +CNSTP4 0 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2098 +;2098: } else { +ADDRGP4 $650 +JUMPV +LABELV $1536 +line 2099 +;2099: s = CG_ConfigString( CS_SOUNDS + es->eventParm ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 288 +ADDI4 +ARGI4 +ADDRLP4 160 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 160 +INDIRP4 +ASGNP4 +line 2100 +;2100: trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, CG_CustomSound( es->number, s ) ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRLP4 164 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 164 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2101 +;2101: } +line 2102 +;2102: break; +ADDRGP4 $650 +JUMPV +LABELV $1542 +line 2105 +;2103: +;2104: case EV_GLOBAL_TEAM_SOUND: // play from the player's head so it never diminishes +;2105: { +line 2106 +;2106: DEBUGNAME("EV_GLOBAL_TEAM_SOUND"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1543 +ADDRGP4 $1546 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1543 +line 2107 +;2107: switch( es->eventParm ) { +ADDRLP4 160 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 160 +INDIRI4 +CNSTI4 0 +LTI4 $650 +ADDRLP4 160 +INDIRI4 +CNSTI4 10 +GTI4 $650 +ADDRLP4 160 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1599 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1599 +address $650 +address $650 +address $1552 +address $1560 +address $1568 +address $1576 +address $1584 +address $1587 +address $1590 +address $1593 +address $1596 +code +line 2110 +;2108: case GTS_RED_CAPTURE: // CTF: red team captured the blue flag, 1FCTF: red team captured the neutral flag +;2109: //CG_AddBufferedSound( cgs.media.redScoredSound ); +;2110: break; +line 2113 +;2111: case GTS_BLUE_CAPTURE: // CTF: blue team captured the red flag, 1FCTF: blue team captured the neutral flag +;2112: //CG_AddBufferedSound( cgs.media.blueScoredSound ); +;2113: break; +LABELV $1552 +line 2115 +;2114: case GTS_RED_RETURN: // CTF: blue flag returned, 1FCTF: never used +;2115: if (cgs.gametype == GT_CTY) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $1553 +line 2116 +;2116: { +line 2117 +;2117: CG_AddBufferedSound( cgs.media.blueYsalReturnedSound ); +ADDRGP4 cgs+70296+816 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2118 +;2118: } +ADDRGP4 $650 +JUMPV +LABELV $1553 +line 2120 +;2119: else +;2120: { +line 2121 +;2121: CG_AddBufferedSound( cgs.media.blueFlagReturnedSound ); +ADDRGP4 cgs+70296+800 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2122 +;2122: } +line 2123 +;2123: break; +ADDRGP4 $650 +JUMPV +LABELV $1560 +line 2125 +;2124: case GTS_BLUE_RETURN: // CTF red flag returned, 1FCTF: neutral flag returned +;2125: if (cgs.gametype == GT_CTY) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $1561 +line 2126 +;2126: { +line 2127 +;2127: CG_AddBufferedSound( cgs.media.redYsalReturnedSound ); +ADDRGP4 cgs+70296+812 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2128 +;2128: } +ADDRGP4 $650 +JUMPV +LABELV $1561 +line 2130 +;2129: else +;2130: { +line 2131 +;2131: CG_AddBufferedSound( cgs.media.redFlagReturnedSound ); +ADDRGP4 cgs+70296+796 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2132 +;2132: } +line 2133 +;2133: break; +ADDRGP4 $650 +JUMPV +LABELV $1568 +line 2137 +;2134: +;2135: case GTS_RED_TAKEN: // CTF: red team took blue flag, 1FCTF: blue team took the neutral flag +;2136: // if this player picked up the flag then a sound is played in CG_CheckLocalSounds +;2137: if (cgs.gametype == GT_CTY) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $1569 +line 2138 +;2138: { +line 2139 +;2139: CG_AddBufferedSound( cgs.media.redTookYsalSound ); +ADDRGP4 cgs+70296+820 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2140 +;2140: } +ADDRGP4 $650 +JUMPV +LABELV $1569 +line 2142 +;2141: else +;2142: { +line 2143 +;2143: CG_AddBufferedSound( cgs.media.redTookFlagSound ); +ADDRGP4 cgs+70296+804 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2144 +;2144: } +line 2145 +;2145: break; +ADDRGP4 $650 +JUMPV +LABELV $1576 +line 2148 +;2146: case GTS_BLUE_TAKEN: // CTF: blue team took the red flag, 1FCTF red team took the neutral flag +;2147: // if this player picked up the flag then a sound is played in CG_CheckLocalSounds +;2148: if (cgs.gametype == GT_CTY) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $1577 +line 2149 +;2149: { +line 2150 +;2150: CG_AddBufferedSound( cgs.media.blueTookYsalSound ); +ADDRGP4 cgs+70296+824 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2151 +;2151: } +ADDRGP4 $650 +JUMPV +LABELV $1577 +line 2153 +;2152: else +;2153: { +line 2154 +;2154: CG_AddBufferedSound( cgs.media.blueTookFlagSound ); +ADDRGP4 cgs+70296+808 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2155 +;2155: } +line 2156 +;2156: break; +ADDRGP4 $650 +JUMPV +LABELV $1584 +line 2158 +;2157: case GTS_REDTEAM_SCORED: +;2158: CG_AddBufferedSound(cgs.media.redScoredSound); +ADDRGP4 cgs+70296+776 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2159 +;2159: break; +ADDRGP4 $650 +JUMPV +LABELV $1587 +line 2161 +;2160: case GTS_BLUETEAM_SCORED: +;2161: CG_AddBufferedSound(cgs.media.blueScoredSound); +ADDRGP4 cgs+70296+780 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2162 +;2162: break; +ADDRGP4 $650 +JUMPV +LABELV $1590 +line 2164 +;2163: case GTS_REDTEAM_TOOK_LEAD: +;2164: CG_AddBufferedSound(cgs.media.redLeadsSound); +ADDRGP4 cgs+70296+784 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2165 +;2165: break; +ADDRGP4 $650 +JUMPV +LABELV $1593 +line 2167 +;2166: case GTS_BLUETEAM_TOOK_LEAD: +;2167: CG_AddBufferedSound(cgs.media.blueLeadsSound); +ADDRGP4 cgs+70296+788 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2168 +;2168: break; +ADDRGP4 $650 +JUMPV +LABELV $1596 +line 2170 +;2169: case GTS_TEAMS_ARE_TIED: +;2170: CG_AddBufferedSound( cgs.media.teamsTiedSound ); +ADDRGP4 cgs+70296+792 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 2171 +;2171: break; +line 2173 +;2172: default: +;2173: break; +line 2175 +;2174: } +;2175: break; +ADDRGP4 $650 +JUMPV +LABELV $1600 +line 2179 +;2176: } +;2177: +;2178: case EV_ENTITY_SOUND: +;2179: DEBUGNAME("EV_ENTITY_SOUND"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1601 +ADDRGP4 $1604 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1601 +line 2181 +;2180: //somewhat of a hack - weapon is the caller entity's index, trickedentindex is the proper sound channel +;2181: if ( cgs.gameSounds[ es->eventParm ] ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1605 +line 2182 +;2182: trap_S_StartSound (NULL, es->weapon, es->trickedentindex, cgs.gameSounds[ es->eventParm ] ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2183 +;2183: } else { +ADDRGP4 $650 +JUMPV +LABELV $1605 +line 2184 +;2184: s = CG_ConfigString( CS_SOUNDS + es->eventParm ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 288 +ADDI4 +ARGI4 +ADDRLP4 160 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 160 +INDIRP4 +ASGNP4 +line 2185 +;2185: trap_S_StartSound (NULL, es->weapon, es->trickedentindex, CG_CustomSound( es->weapon, s ) ); +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRLP4 164 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 164 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2186 +;2186: } +line 2187 +;2187: break; +ADDRGP4 $650 +JUMPV +LABELV $1609 +line 2190 +;2188: +;2189: case EV_PLAY_ROFF: +;2190: DEBUGNAME("EV_PLAY_ROFF"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1610 +ADDRGP4 $1613 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1610 +line 2191 +;2191: trap_ROFF_Play(es->weapon, es->eventParm, es->trickedentindex); +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_ROFF_Play +CALLI4 +pop +line 2192 +;2192: break; +ADDRGP4 $650 +JUMPV +LABELV $1614 +line 2195 +;2193: +;2194: case EV_GLASS_SHATTER: +;2195: DEBUGNAME("EV_GLASS_SHATTER"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1615 +ADDRGP4 $1618 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1615 +line 2196 +;2196: CG_GlassShatter(es->genericenemyindex, es->origin, es->angles, es->trickedentindex, es->pos.trTime); +ADDRLP4 0 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_GlassShatter +CALLV +pop +line 2197 +;2197: break; +ADDRGP4 $650 +JUMPV +LABELV $1619 +line 2200 +;2198: +;2199: case EV_DEBRIS: +;2200: DEBUGNAME("EV_DEBRIS"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1620 +ADDRGP4 $1623 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1620 +line 2201 +;2201: if (es->weapon) +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1624 +line 2202 +;2202: { +line 2203 +;2203: if (cgs.gameSounds[es->weapon]) +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1626 +line 2204 +;2204: { +line 2205 +;2205: isnd = cgs.gameSounds[es->weapon]; +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +ASGNI4 +line 2206 +;2206: } +ADDRGP4 $1625 +JUMPV +LABELV $1626 +line 2208 +;2207: else +;2208: { +line 2209 +;2209: s = CG_ConfigString( CS_SOUNDS + es->eventParm ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 288 +ADDI4 +ARGI4 +ADDRLP4 168 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 168 +INDIRP4 +ASGNP4 +line 2210 +;2210: isnd = CG_CustomSound( es->number, s ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRLP4 172 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 172 +INDIRI4 +ASGNI4 +line 2211 +;2211: } +line 2212 +;2212: } +ADDRGP4 $1625 +JUMPV +LABELV $1624 +line 2214 +;2213: else +;2214: { +line 2215 +;2215: isnd = 0; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 2216 +;2216: } +LABELV $1625 +line 2218 +;2217: +;2218: if (es->trickedentindex > 0) +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1630 +line 2219 +;2219: { +line 2220 +;2220: if (cgs.gameModels[es->trickedentindex]) +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+36364 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1632 +line 2221 +;2221: { +line 2222 +;2222: CG_CreateDebris(es->number, es->pos.trBase, es->angles, es->origin, isnd, cgs.gameModels[es->trickedentindex]); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+36364 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_CreateDebris +CALLV +pop +line 2223 +;2223: } +ADDRGP4 $650 +JUMPV +LABELV $1632 +line 2225 +;2224: else +;2225: { //default to "rock" type +line 2226 +;2226: CG_CreateDebris(es->number, es->pos.trBase, es->angles, es->origin, isnd, -1); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 12 +INDIRI4 +ARGI4 +CNSTI4 -1 +ARGI4 +ADDRGP4 CG_CreateDebris +CALLV +pop +line 2227 +;2227: } +line 2228 +;2228: } +ADDRGP4 $650 +JUMPV +LABELV $1630 +line 2230 +;2229: else +;2230: { +line 2231 +;2231: CG_CreateDebris(es->number, es->pos.trBase, es->angles, es->origin, isnd, es->trickedentindex); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_CreateDebris +CALLV +pop +line 2232 +;2232: } +line 2233 +;2233: break; +ADDRGP4 $650 +JUMPV +LABELV $1636 +line 2238 +;2234: +;2235: case EV_PAIN: +;2236: // local player sounds are triggered in CG_CheckLocalSounds, +;2237: // so ignore events on the player +;2238: DEBUGNAME("EV_PAIN"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1637 +ADDRGP4 $1640 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1637 +line 2240 +;2239: +;2240: if ( !cg_oldPainSounds.integer || (cent->currentState.number != cg.snap->ps.clientNum) ) +ADDRGP4 cg_oldPainSounds+12 +INDIRI4 +CNSTI4 0 +EQI4 $1645 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $650 +LABELV $1645 +line 2241 +;2241: { +line 2242 +;2242: CG_PainEvent( cent, es->eventParm ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_PainEvent +CALLV +pop +line 2243 +;2243: } +line 2244 +;2244: break; +ADDRGP4 $650 +JUMPV +LABELV $1646 +line 2249 +;2245: +;2246: case EV_DEATH1: +;2247: case EV_DEATH2: +;2248: case EV_DEATH3: +;2249: DEBUGNAME("EV_DEATHx"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1647 +ADDRGP4 $1650 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1647 +line 2250 +;2250: trap_S_StartSound( NULL, es->number, CHAN_VOICE, +ADDRGP4 $1651 +ARGP4 +ADDRLP4 8 +INDIRI4 +CNSTI4 78 +SUBI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 168 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 168 +INDIRP4 +ARGP4 +ADDRLP4 172 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 172 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2252 +;2251: CG_CustomSound( es->number, va("*death%i.wav", event - EV_DEATH1 + 1) ) ); +;2252: if (es->eventParm && es->number == cg.snap->ps.clientNum) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $650 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $650 +line 2253 +;2253: { +line 2254 +;2254: trap_S_StartLocalSound(cgs.media.dramaticFailure, CHAN_LOCAL); +ADDRGP4 cgs+70296+836 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 2255 +;2255: CGCam_SetMusicMult(0.3, 5000); +CNSTF4 1050253722 +ARGF4 +CNSTI4 5000 +ARGI4 +ADDRGP4 CGCam_SetMusicMult +CALLV +pop +line 2256 +;2256: } +line 2257 +;2257: break; +ADDRGP4 $650 +JUMPV +LABELV $1657 +line 2261 +;2258: +;2259: +;2260: case EV_OBITUARY: +;2261: DEBUGNAME("EV_OBITUARY"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1658 +ADDRGP4 $1661 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1658 +line 2262 +;2262: CG_Obituary( es ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_Obituary +CALLV +pop +line 2263 +;2263: break; +ADDRGP4 $650 +JUMPV +LABELV $1662 +line 2269 +;2264: +;2265: // +;2266: // powerup events +;2267: // +;2268: case EV_POWERUP_QUAD: +;2269: DEBUGNAME("EV_POWERUP_QUAD"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1663 +ADDRGP4 $1666 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1663 +line 2270 +;2270: if ( es->number == cg.snap->ps.clientNum ) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $650 +line 2271 +;2271: cg.powerupActive = PW_QUAD; +ADDRGP4 cg+13104 +CNSTI4 1 +ASGNI4 +line 2272 +;2272: cg.powerupTime = cg.time; +ADDRGP4 cg+13108 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 2273 +;2273: } +line 2275 +;2274: //trap_S_StartSound (NULL, es->number, CHAN_ITEM, cgs.media.quadSound ); +;2275: break; +ADDRGP4 $650 +JUMPV +LABELV $1673 +line 2277 +;2276: case EV_POWERUP_BATTLESUIT: +;2277: DEBUGNAME("EV_POWERUP_BATTLESUIT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1674 +ADDRGP4 $1677 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1674 +line 2278 +;2278: if ( es->number == cg.snap->ps.clientNum ) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $650 +line 2279 +;2279: cg.powerupActive = PW_BATTLESUIT; +ADDRGP4 cg+13104 +CNSTI4 2 +ASGNI4 +line 2280 +;2280: cg.powerupTime = cg.time; +ADDRGP4 cg+13108 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 2281 +;2281: } +line 2283 +;2282: //trap_S_StartSound (NULL, es->number, CHAN_ITEM, cgs.media.protectSound ); +;2283: break; +ADDRGP4 $650 +JUMPV +LABELV $1684 +line 2286 +;2284: +;2285: case EV_FORCE_DRAINED: +;2286: DEBUGNAME("EV_FORCE_DRAINED"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1685 +ADDRGP4 $1688 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1685 +line 2287 +;2287: ByteToDir( es->eventParm, dir ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ARGP4 +ADDRGP4 ByteToDir +CALLV +pop +line 2289 +;2288: //FX_ForceDrained(position, dir); +;2289: trap_S_StartSound (NULL, es->owner, CHAN_AUTO, cgs.media.drainSound ); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+828 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2290 +;2290: cg_entities[es->owner].teamPowerEffectTime = cg.time + 1000; +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1912 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1000 +ADDI4 +ASGNI4 +line 2291 +;2291: cg_entities[es->owner].teamPowerType = 2; +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1916 +ADDP4 +CNSTI4 2 +ASGNI4 +line 2292 +;2292: break; +ADDRGP4 $650 +JUMPV +LABELV $1694 +line 2295 +;2293: +;2294: case EV_GIB_PLAYER: +;2295: DEBUGNAME("EV_GIB_PLAYER"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $650 +ADDRGP4 $1698 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 2298 +;2296: //trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.gibSound ); +;2297: //CG_GibPlayer( cent->lerpOrigin ); +;2298: break; +ADDRGP4 $650 +JUMPV +LABELV $1699 +line 2301 +;2299: +;2300: case EV_STARTLOOPINGSOUND: +;2301: DEBUGNAME("EV_STARTLOOPINGSOUND"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1700 +ADDRGP4 $1703 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1700 +line 2302 +;2302: if ( cgs.gameSounds[ es->eventParm ] ) +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1704 +line 2303 +;2303: { +line 2304 +;2304: isnd = cgs.gameSounds[es->eventParm]; +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +INDIRI4 +ASGNI4 +line 2305 +;2305: } +ADDRGP4 $1705 +JUMPV +LABELV $1704 +line 2307 +;2306: else +;2307: { +line 2308 +;2308: s = CG_ConfigString( CS_SOUNDS + es->eventParm ); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +CNSTI4 288 +ADDI4 +ARGI4 +ADDRLP4 180 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 180 +INDIRP4 +ASGNP4 +line 2309 +;2309: isnd = CG_CustomSound(es->number, s); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRLP4 184 +ADDRGP4 CG_CustomSound +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 184 +INDIRI4 +ASGNI4 +line 2310 +;2310: } +LABELV $1705 +line 2312 +;2311: +;2312: trap_S_AddRealLoopingSound( es->number, es->pos.trBase, vec3_origin, isnd ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddRealLoopingSound +CALLV +pop +line 2313 +;2313: es->loopSound = isnd; +ADDRLP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2314 +;2314: break; +ADDRGP4 $650 +JUMPV +LABELV $1708 +line 2317 +;2315: +;2316: case EV_STOPLOOPINGSOUND: +;2317: DEBUGNAME("EV_STOPLOOPINGSOUND"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1709 +ADDRGP4 $1712 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1709 +line 2318 +;2318: trap_S_StopLoopingSound( es->number ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StopLoopingSound +CALLV +pop +line 2319 +;2319: es->loopSound = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2320 +;2320: break; +ADDRGP4 $650 +JUMPV +LABELV $1713 +line 2323 +;2321: +;2322: case EV_WEAPON_CHARGE: +;2323: DEBUGNAME("EV_WEAPON_CHARGE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1714 +ADDRGP4 $1717 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1714 +line 2324 +;2324: assert(es->eventParm > WP_NONE && es->eventParm < WP_NUM_WEAPONS); +line 2325 +;2325: if (cg_weapons[es->eventParm].chargeSound) +CNSTI4 208 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons+88 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 2326 +;2326: { +line 2327 +;2327: trap_S_StartSound(NULL, es->number, CHAN_WEAPON, cg_weapons[es->eventParm].chargeSound); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +CNSTI4 208 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons+88 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2328 +;2328: } +line 2329 +;2329: break; +ADDRGP4 $650 +JUMPV +LABELV $1722 +line 2332 +;2330: +;2331: case EV_WEAPON_CHARGE_ALT: +;2332: DEBUGNAME("EV_WEAPON_CHARGE_ALT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1723 +ADDRGP4 $1726 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1723 +line 2333 +;2333: assert(es->eventParm > WP_NONE && es->eventParm < WP_NUM_WEAPONS); +line 2334 +;2334: if (cg_weapons[es->eventParm].altChargeSound) +CNSTI4 208 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons+152 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $650 +line 2335 +;2335: { +line 2336 +;2336: trap_S_StartSound(NULL, es->number, CHAN_WEAPON, cg_weapons[es->eventParm].altChargeSound); +CNSTP4 0 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +CNSTI4 208 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons+152 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2337 +;2337: } +line 2338 +;2338: break; +ADDRGP4 $650 +JUMPV +LABELV $1731 +line 2341 +;2339: +;2340: case EV_SHIELD_HIT: +;2341: DEBUGNAME("EV_SHIELD_HIT"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1732 +ADDRGP4 $1735 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1732 +line 2342 +;2342: ByteToDir(es->eventParm, dir); +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ARGP4 +ADDRGP4 ByteToDir +CALLV +pop +line 2343 +;2343: CG_PlayerShieldHit(es->otherEntityNum, dir, es->time2); +ADDRLP4 0 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_PlayerShieldHit +CALLV +pop +line 2344 +;2344: break; +ADDRGP4 $650 +JUMPV +LABELV $1736 +line 2347 +;2345: +;2346: case EV_DEBUG_LINE: +;2347: DEBUGNAME("EV_DEBUG_LINE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1737 +ADDRGP4 $1740 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1737 +line 2348 +;2348: CG_Beam( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_Beam +CALLV +pop +line 2349 +;2349: break; +ADDRGP4 $650 +JUMPV +LABELV $1741 +line 2352 +;2350: +;2351: case EV_TESTLINE: +;2352: DEBUGNAME("EV_TESTLINE"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1742 +ADDRGP4 $1745 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1742 +line 2353 +;2353: CG_TestLine(es->origin, es->origin2, es->time2, es->weapon, 1); +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CVIU4 4 +ARGU4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_TestLine +CALLV +pop +line 2354 +;2354: break; +ADDRGP4 $650 +JUMPV +LABELV $1746 +line 2357 +;2355: +;2356: case EV_BODY_QUEUE_COPY: +;2357: DEBUGNAME("EV_BODY_QUEUE_COPY"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1747 +ADDRGP4 $1750 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1747 +line 2358 +;2358: CG_BodyQueueCopy(cent, es->eventParm, es->weapon); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_BodyQueueCopy +CALLV +pop +line 2359 +;2359: break; +ADDRGP4 $650 +JUMPV +LABELV $649 +line 2362 +;2360: +;2361: default: +;2362: DEBUGNAME("UNKNOWN"); +ADDRGP4 cg_debugEvents+12 +INDIRI4 +CNSTI4 0 +EQI4 $1751 +ADDRGP4 $1754 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1751 +line 2363 +;2363: CG_Error( "Unknown event: %i", event ); +ADDRGP4 $1755 +ARGP4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRGP4 CG_Error +CALLV +pop +line 2364 +;2364: break; +LABELV $650 +line 2367 +;2365: } +;2366: +;2367:} +LABELV $634 +endproc CG_EntityEvent 1252 36 +export CG_CheckEvents +proc CG_CheckEvents 8 12 +line 2376 +;2368: +;2369: +;2370:/* +;2371:============== +;2372:CG_CheckEvents +;2373: +;2374:============== +;2375:*/ +;2376:void CG_CheckEvents( centity_t *cent ) { +line 2378 +;2377: // check for event-only entities +;2378: if ( cent->currentState.eType > ET_EVENTS ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 16 +LEI4 $1759 +line 2379 +;2379: if ( cent->previousEvent ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 604 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1761 +line 2380 +;2380: return; // already fired +ADDRGP4 $1758 +JUMPV +LABELV $1761 +line 2383 +;2381: } +;2382: // if this is a player event set the entity number of the client entity number +;2383: if ( cent->currentState.eFlags & EF_PLAYER_EVENT ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $1763 +line 2384 +;2384: cent->currentState.number = cent->currentState.otherEntityNum; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRI4 +ASGNI4 +line 2385 +;2385: } +LABELV $1763 +line 2387 +;2386: +;2387: cent->previousEvent = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 604 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2389 +;2388: +;2389: cent->currentState.event = cent->currentState.eType - ET_EVENTS; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 252 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 16 +SUBI4 +ASGNI4 +line 2390 +;2390: } else { +ADDRGP4 $1760 +JUMPV +LABELV $1759 +line 2392 +;2391: // check for events riding with another entity +;2392: if ( cent->currentState.event == cent->previousEvent ) { +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 604 +ADDP4 +INDIRI4 +NEI4 $1765 +line 2393 +;2393: return; +ADDRGP4 $1758 +JUMPV +LABELV $1765 +line 2395 +;2394: } +;2395: cent->previousEvent = cent->currentState.event; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 604 +ADDP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +ASGNI4 +line 2396 +;2396: if ( ( cent->currentState.event & ~EV_EVENT_BITS ) == 0 ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CNSTI4 -769 +BANDI4 +CNSTI4 0 +NEI4 $1767 +line 2397 +;2397: return; +ADDRGP4 $1758 +JUMPV +LABELV $1767 +line 2399 +;2398: } +;2399: } +LABELV $1760 +line 2402 +;2400: +;2401: // calculate the position at exactly the frame time +;2402: BG_EvaluateTrajectory( ¢->currentState.pos, cg.snap->serverTime, cent->lerpOrigin ); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 2403 +;2403: CG_SetEntitySoundPosition( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_SetEntitySoundPosition +CALLV +pop +line 2405 +;2404: +;2405: CG_EntityEvent( cent, cent->lerpOrigin ); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 CG_EntityEvent +CALLV +pop +line 2406 +;2406:} +LABELV $1758 +endproc CG_CheckEvents 8 12 +import CG_ThereIsAMaster +import showPowersName +import g_saberFlashPos +import g_saberFlashTime +import trap_SP_Register +import trap_SP_RegisterServer +import trap_PC_RemoveAllGlobalDefines +import trap_PC_LoadGlobalDefines +import trap_PC_SourceFileAndLine +import trap_PC_ReadToken +import trap_PC_FreeSource +import trap_PC_LoadSource +import trap_PC_AddGlobalDefine +import Controls_SetConfig +import Controls_GetConfig +import UI_OutOfMemory +import UI_InitMemory +import UI_Alloc +import Display_CacheAll +import Menu_SetFeederSelection +import Menu_Paint +import Menus_CloseAll +import LerpColor +import Display_HandleKey +import Menus_CloseByName +import Menus_ShowByName +import Menus_FindByName +import Menus_OpenByName +import Display_KeyBindPending +import Display_CursorType +import Display_MouseMove +import Display_CaptureItem +import Display_GetContext +import Menus_Activate +import Menus_AnyFullScreenVisible +import Menu_Reset +import Menus_ActivateByName +import Menu_PaintAll +import Menu_New +import Menu_Count +import PC_Script_Parse +import PC_String_Parse +import PC_Rect_Parse +import PC_Int_Parse +import PC_Color_Parse +import PC_Float_Parse +import Script_Parse +import String_Parse +import Rect_Parse +import Int_Parse +import Color_Parse +import Float_Parse +import Menu_ScrollFeeder +import Menu_HandleMouseMove +import Menu_HandleKey +import Menu_GetFocused +import Menu_PostParse +import Item_Init +import Menu_Init +import Display_ExpandMacros +import Init_Display +import String_Report +import String_Init +import String_Alloc +import FX_RocketHitPlayer +import FX_RocketHitWall +import FX_RocketAltProjectileThink +import FX_RocketProjectileThink +import FX_FlechetteAltProjectileThink +import FX_FlechetteWeaponHitPlayer +import FX_FlechetteWeaponHitWall +import FX_FlechetteProjectileThink +import FX_DEMP2_AltDetonate +import FX_DEMP2_HitPlayer +import FX_DEMP2_HitWall +import FX_DEMP2_ProjectileThink +import FX_RepeaterAltHitPlayer +import FX_RepeaterHitPlayer +import FX_RepeaterAltHitWall +import FX_RepeaterHitWall +import FX_RepeaterAltProjectileThink +import FX_RepeaterProjectileThink +import FX_BowcasterHitPlayer +import FX_BowcasterHitWall +import FX_BowcasterAltProjectileThink +import FX_BowcasterProjectileThink +import FX_DisruptorHitPlayer +import FX_DisruptorHitWall +import FX_DisruptorAltHit +import FX_DisruptorAltMiss +import FX_DisruptorAltShot +import FX_DisruptorMainShot +import FX_BryarAltProjectileThink +import FX_BryarProjectileThink +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $1755 +char 1 85 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 101 +char 1 118 +char 1 101 +char 1 110 +char 1 116 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $1754 +char 1 85 +char 1 78 +char 1 75 +char 1 78 +char 1 79 +char 1 87 +char 1 78 +char 1 10 +char 1 0 +align 1 +LABELV $1750 +char 1 69 +char 1 86 +char 1 95 +char 1 66 +char 1 79 +char 1 68 +char 1 89 +char 1 95 +char 1 81 +char 1 85 +char 1 69 +char 1 85 +char 1 69 +char 1 95 +char 1 67 +char 1 79 +char 1 80 +char 1 89 +char 1 10 +char 1 0 +align 1 +LABELV $1745 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 69 +char 1 83 +char 1 84 +char 1 76 +char 1 73 +char 1 78 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $1740 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 66 +char 1 85 +char 1 71 +char 1 95 +char 1 76 +char 1 73 +char 1 78 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $1735 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 72 +char 1 73 +char 1 69 +char 1 76 +char 1 68 +char 1 95 +char 1 72 +char 1 73 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $1726 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 95 +char 1 67 +char 1 72 +char 1 65 +char 1 82 +char 1 71 +char 1 69 +char 1 95 +char 1 65 +char 1 76 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $1717 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 95 +char 1 67 +char 1 72 +char 1 65 +char 1 82 +char 1 71 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $1712 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 84 +char 1 79 +char 1 80 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 73 +char 1 78 +char 1 71 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1703 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 84 +char 1 65 +char 1 82 +char 1 84 +char 1 76 +char 1 79 +char 1 79 +char 1 80 +char 1 73 +char 1 78 +char 1 71 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1698 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 73 +char 1 66 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 69 +char 1 82 +char 1 10 +char 1 0 +align 1 +LABELV $1688 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 68 +char 1 82 +char 1 65 +char 1 73 +char 1 78 +char 1 69 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1677 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 79 +char 1 87 +char 1 69 +char 1 82 +char 1 85 +char 1 80 +char 1 95 +char 1 66 +char 1 65 +char 1 84 +char 1 84 +char 1 76 +char 1 69 +char 1 83 +char 1 85 +char 1 73 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $1666 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 79 +char 1 87 +char 1 69 +char 1 82 +char 1 85 +char 1 80 +char 1 95 +char 1 81 +char 1 85 +char 1 65 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1661 +char 1 69 +char 1 86 +char 1 95 +char 1 79 +char 1 66 +char 1 73 +char 1 84 +char 1 85 +char 1 65 +char 1 82 +char 1 89 +char 1 10 +char 1 0 +align 1 +LABELV $1651 +char 1 42 +char 1 100 +char 1 101 +char 1 97 +char 1 116 +char 1 104 +char 1 37 +char 1 105 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $1650 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 120 +char 1 10 +char 1 0 +align 1 +LABELV $1640 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 65 +char 1 73 +char 1 78 +char 1 10 +char 1 0 +align 1 +LABELV $1623 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 66 +char 1 82 +char 1 73 +char 1 83 +char 1 10 +char 1 0 +align 1 +LABELV $1618 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 76 +char 1 65 +char 1 83 +char 1 83 +char 1 95 +char 1 83 +char 1 72 +char 1 65 +char 1 84 +char 1 84 +char 1 69 +char 1 82 +char 1 10 +char 1 0 +align 1 +LABELV $1613 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 95 +char 1 82 +char 1 79 +char 1 70 +char 1 70 +char 1 10 +char 1 0 +align 1 +LABELV $1604 +char 1 69 +char 1 86 +char 1 95 +char 1 69 +char 1 78 +char 1 84 +char 1 73 +char 1 84 +char 1 89 +char 1 95 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1546 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 76 +char 1 79 +char 1 66 +char 1 65 +char 1 76 +char 1 95 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 95 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1535 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 76 +char 1 79 +char 1 66 +char 1 65 +char 1 76 +char 1 95 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1518 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 69 +char 1 82 +char 1 65 +char 1 76 +char 1 95 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1509 +char 1 69 +char 1 86 +char 1 95 +char 1 77 +char 1 85 +char 1 84 +char 1 69 +char 1 95 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1493 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 95 +char 1 69 +char 1 70 +char 1 70 +char 1 69 +char 1 67 +char 1 84 +char 1 95 +char 1 73 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1479 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 68 +char 1 101 +char 1 116 +char 1 111 +char 1 110 +char 1 97 +char 1 116 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1477 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 66 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 115 +char 1 104 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1475 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 98 +char 1 108 +char 1 111 +char 1 119 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1473 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1471 +char 1 116 +char 1 114 +char 1 105 +char 1 112 +char 1 77 +char 1 105 +char 1 110 +char 1 101 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1469 +char 1 115 +char 1 112 +char 1 97 +char 1 114 +char 1 107 +char 1 95 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1467 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 100 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1465 +char 1 101 +char 1 109 +char 1 112 +char 1 108 +char 1 97 +char 1 99 +char 1 101 +char 1 100 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 100 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1463 +char 1 101 +char 1 109 +char 1 112 +char 1 108 +char 1 97 +char 1 99 +char 1 101 +char 1 100 +char 1 47 +char 1 100 +char 1 101 +char 1 97 +char 1 100 +char 1 95 +char 1 115 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1458 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 95 +char 1 69 +char 1 70 +char 1 70 +char 1 69 +char 1 67 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $1451 +char 1 69 +char 1 86 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 73 +char 1 76 +char 1 69 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 95 +char 1 77 +char 1 69 +char 1 84 +char 1 65 +char 1 76 +char 1 10 +char 1 0 +align 1 +LABELV $1444 +char 1 69 +char 1 86 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 73 +char 1 76 +char 1 69 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 10 +char 1 0 +align 1 +LABELV $1437 +char 1 69 +char 1 86 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 73 +char 1 76 +char 1 69 +char 1 95 +char 1 72 +char 1 73 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $1432 +char 1 69 +char 1 86 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 73 +char 1 76 +char 1 69 +char 1 95 +char 1 83 +char 1 84 +char 1 73 +char 1 67 +char 1 75 +char 1 10 +char 1 0 +align 1 +LABELV $1427 +char 1 117 +char 1 105 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 80 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 68 +char 1 105 +char 1 115 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $1426 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 69 +char 1 84 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 65 +char 1 66 +char 1 76 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $1421 +char 1 117 +char 1 105 +char 1 95 +char 1 102 +char 1 114 +char 1 101 +char 1 101 +char 1 83 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1420 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 69 +char 1 84 +char 1 95 +char 1 70 +char 1 82 +char 1 69 +char 1 69 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 10 +char 1 0 +align 1 +LABELV $1413 +char 1 117 +char 1 105 +char 1 95 +char 1 109 +char 1 121 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 0 +align 1 +LABELV $1412 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $1411 +char 1 117 +char 1 105 +char 1 95 +char 1 114 +char 1 97 +char 1 110 +char 1 107 +char 1 67 +char 1 104 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $1407 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 73 +char 1 86 +char 1 69 +char 1 95 +char 1 78 +char 1 69 +char 1 87 +char 1 95 +char 1 82 +char 1 65 +char 1 78 +char 1 75 +char 1 10 +char 1 0 +align 1 +LABELV $1396 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 83 +char 1 84 +char 1 82 +char 1 79 +char 1 89 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 95 +char 1 77 +char 1 79 +char 1 68 +char 1 69 +char 1 76 +char 1 10 +char 1 0 +align 1 +LABELV $1384 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 69 +char 1 83 +char 1 84 +char 1 82 +char 1 79 +char 1 89 +char 1 95 +char 1 71 +char 1 72 +char 1 79 +char 1 85 +char 1 76 +char 1 50 +char 1 95 +char 1 73 +char 1 78 +char 1 83 +char 1 84 +char 1 65 +char 1 78 +char 1 67 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $1379 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 71 +char 1 65 +char 1 95 +char 1 79 +char 1 66 +char 1 74 +char 1 69 +char 1 67 +char 1 84 +char 1 73 +char 1 86 +char 1 69 +char 1 67 +char 1 79 +char 1 77 +char 1 80 +char 1 76 +char 1 69 +char 1 84 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $1374 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 71 +char 1 65 +char 1 95 +char 1 82 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 79 +char 1 86 +char 1 69 +char 1 82 +char 1 10 +char 1 0 +align 1 +LABELV $1369 +char 1 69 +char 1 86 +char 1 95 +char 1 67 +char 1 84 +char 1 70 +char 1 77 +char 1 69 +char 1 83 +char 1 83 +char 1 65 +char 1 71 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $1364 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 67 +char 1 79 +char 1 82 +char 1 69 +char 1 80 +char 1 76 +char 1 85 +char 1 77 +char 1 10 +char 1 0 +align 1 +LABELV $1359 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 82 +char 1 69 +char 1 78 +char 1 65 +char 1 68 +char 1 69 +char 1 95 +char 1 66 +char 1 79 +char 1 85 +char 1 78 +char 1 67 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $1351 +char 1 69 +char 1 86 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 82 +char 1 69 +char 1 83 +char 1 80 +char 1 65 +char 1 87 +char 1 78 +char 1 10 +char 1 0 +align 1 +LABELV $1344 +char 1 69 +char 1 86 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 80 +char 1 79 +char 1 80 +char 1 10 +char 1 0 +align 1 +LABELV $1327 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 69 +char 1 76 +char 1 69 +char 1 80 +char 1 79 +char 1 82 +char 1 84 +char 1 95 +char 1 79 +char 1 85 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $1322 +char 1 109 +char 1 112 +char 1 47 +char 1 115 +char 1 112 +char 1 97 +char 1 119 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1309 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 69 +char 1 76 +char 1 69 +char 1 80 +char 1 79 +char 1 82 +char 1 84 +char 1 95 +char 1 73 +char 1 78 +char 1 10 +char 1 0 +align 1 +LABELV $1300 +char 1 83 +char 1 69 +char 1 69 +char 1 75 +char 1 69 +char 1 82 +char 1 95 +char 1 65 +char 1 76 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 68 +char 1 69 +char 1 80 +char 1 76 +char 1 79 +char 1 89 +char 1 69 +char 1 68 +char 1 0 +align 1 +LABELV $1298 +char 1 83 +char 1 72 +char 1 73 +char 1 69 +char 1 76 +char 1 68 +char 1 95 +char 1 78 +char 1 79 +char 1 82 +char 1 79 +char 1 79 +char 1 77 +char 1 0 +align 1 +LABELV $1296 +char 1 83 +char 1 69 +char 1 78 +char 1 84 +char 1 82 +char 1 89 +char 1 95 +char 1 65 +char 1 76 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 80 +char 1 76 +char 1 65 +char 1 67 +char 1 69 +char 1 68 +char 1 0 +align 1 +LABELV $1294 +char 1 83 +char 1 69 +char 1 78 +char 1 84 +char 1 82 +char 1 89 +char 1 95 +char 1 78 +char 1 79 +char 1 82 +char 1 79 +char 1 79 +char 1 77 +char 1 0 +align 1 +LABELV $1286 +char 1 69 +char 1 86 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 85 +char 1 83 +char 1 69 +char 1 70 +char 1 65 +char 1 73 +char 1 76 +char 1 10 +char 1 0 +align 1 +LABELV $1281 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 52 +char 1 10 +char 1 0 +align 1 +LABELV $1276 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 51 +char 1 10 +char 1 0 +align 1 +LABELV $1271 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 50 +char 1 10 +char 1 0 +align 1 +LABELV $1266 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 49 +char 1 10 +char 1 0 +align 1 +LABELV $1261 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 48 +char 1 10 +char 1 0 +align 1 +LABELV $1256 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 57 +char 1 10 +char 1 0 +align 1 +LABELV $1251 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 56 +char 1 10 +char 1 0 +align 1 +LABELV $1246 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 55 +char 1 10 +char 1 0 +align 1 +LABELV $1241 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 54 +char 1 10 +char 1 0 +align 1 +LABELV $1236 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 53 +char 1 10 +char 1 0 +align 1 +LABELV $1231 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 52 +char 1 10 +char 1 0 +align 1 +LABELV $1226 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 51 +char 1 10 +char 1 0 +align 1 +LABELV $1221 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 50 +char 1 10 +char 1 0 +align 1 +LABELV $1216 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 49 +char 1 10 +char 1 0 +align 1 +LABELV $1211 +char 1 69 +char 1 86 +char 1 95 +char 1 85 +char 1 83 +char 1 69 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 48 +char 1 10 +char 1 0 +align 1 +LABELV $1201 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 67 +char 1 82 +char 1 69 +char 1 69 +char 1 78 +char 1 83 +char 1 72 +char 1 65 +char 1 75 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $1179 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 95 +char 1 80 +char 1 79 +char 1 87 +char 1 69 +char 1 82 +char 1 10 +char 1 0 +align 1 +LABELV $1170 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 103 +char 1 114 +char 1 105 +char 1 112 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $1168 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 106 +char 1 117 +char 1 109 +char 1 112 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $1166 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 97 +char 1 98 +char 1 115 +char 1 111 +char 1 114 +char 1 98 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $1159 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 97 +char 1 98 +char 1 115 +char 1 111 +char 1 114 +char 1 98 +char 1 104 +char 1 105 +char 1 116 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $1157 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 116 +char 1 101 +char 1 99 +char 1 116 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $1155 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 116 +char 1 101 +char 1 99 +char 1 116 +char 1 104 +char 1 105 +char 1 116 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $1150 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 82 +char 1 69 +char 1 68 +char 1 69 +char 1 70 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1145 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 122 +char 1 111 +char 1 111 +char 1 109 +char 1 101 +char 1 110 +char 1 100 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $1144 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 122 +char 1 111 +char 1 111 +char 1 109 +char 1 115 +char 1 116 +char 1 97 +char 1 114 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $1137 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 95 +char 1 90 +char 1 79 +char 1 79 +char 1 77 +char 1 83 +char 1 79 +char 1 85 +char 1 78 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $1130 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 95 +char 1 72 +char 1 73 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $1123 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 95 +char 1 83 +char 1 78 +char 1 73 +char 1 80 +char 1 69 +char 1 82 +char 1 95 +char 1 77 +char 1 73 +char 1 83 +char 1 83 +char 1 10 +char 1 0 +align 1 +LABELV $1103 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 95 +char 1 83 +char 1 78 +char 1 73 +char 1 80 +char 1 69 +char 1 82 +char 1 95 +char 1 83 +char 1 72 +char 1 79 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $1083 +char 1 69 +char 1 86 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 95 +char 1 77 +char 1 65 +char 1 73 +char 1 78 +char 1 95 +char 1 83 +char 1 72 +char 1 79 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $1073 +char 1 109 +char 1 112 +char 1 47 +char 1 106 +char 1 101 +char 1 100 +char 1 105 +char 1 115 +char 1 112 +char 1 97 +char 1 119 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1058 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 111 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $1057 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 85 +char 1 78 +char 1 72 +char 1 79 +char 1 76 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 10 +char 1 0 +align 1 +LABELV $1052 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 100 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1045 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 98 +char 1 108 +char 1 111 +char 1 99 +char 1 107 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1044 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 98 +char 1 108 +char 1 111 +char 1 99 +char 1 107 +char 1 37 +char 1 100 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $1036 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 66 +char 1 76 +char 1 79 +char 1 67 +char 1 75 +char 1 10 +char 1 0 +align 1 +LABELV $1031 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 112 +char 1 97 +char 1 114 +char 1 107 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1018 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 98 +char 1 108 +char 1 111 +char 1 111 +char 1 100 +char 1 95 +char 1 115 +char 1 112 +char 1 97 +char 1 114 +char 1 107 +char 1 115 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1017 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 104 +char 1 105 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $1009 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 72 +char 1 73 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $1004 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 104 +char 1 117 +char 1 112 +char 1 37 +char 1 105 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $1003 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 65 +char 1 84 +char 1 84 +char 1 65 +char 1 67 +char 1 75 +char 1 10 +char 1 0 +align 1 +LABELV $990 +char 1 69 +char 1 86 +char 1 95 +char 1 65 +char 1 76 +char 1 84 +char 1 95 +char 1 70 +char 1 73 +char 1 82 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $985 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 47 +char 1 109 +char 1 117 +char 1 122 +char 1 122 +char 1 108 +char 1 101 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $967 +char 1 42 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 48 +char 1 50 +char 1 0 +align 1 +LABELV $964 +char 1 42 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 48 +char 1 49 +char 1 0 +align 1 +LABELV $959 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 115 +char 1 104 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $958 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $952 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 73 +char 1 82 +char 1 69 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 10 +char 1 0 +align 1 +LABELV $945 +char 1 69 +char 1 86 +char 1 95 +char 1 67 +char 1 72 +char 1 65 +char 1 78 +char 1 71 +char 1 69 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 10 +char 1 0 +align 1 +LABELV $931 +char 1 69 +char 1 86 +char 1 95 +char 1 78 +char 1 79 +char 1 65 +char 1 77 +char 1 77 +char 1 79 +char 1 10 +char 1 0 +align 1 +LABELV $917 +char 1 69 +char 1 86 +char 1 95 +char 1 71 +char 1 76 +char 1 79 +char 1 66 +char 1 65 +char 1 76 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 80 +char 1 73 +char 1 67 +char 1 75 +char 1 85 +char 1 80 +char 1 10 +char 1 0 +align 1 +LABELV $876 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 0 +align 1 +LABELV $865 +char 1 69 +char 1 86 +char 1 95 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 80 +char 1 73 +char 1 67 +char 1 75 +char 1 85 +char 1 80 +char 1 10 +char 1 0 +align 1 +LABELV $860 +char 1 42 +char 1 103 +char 1 97 +char 1 115 +char 1 112 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $859 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 65 +char 1 84 +char 1 69 +char 1 82 +char 1 95 +char 1 67 +char 1 76 +char 1 69 +char 1 65 +char 1 82 +char 1 10 +char 1 0 +align 1 +LABELV $852 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 65 +char 1 84 +char 1 69 +char 1 82 +char 1 95 +char 1 85 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 10 +char 1 0 +align 1 +LABELV $845 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 65 +char 1 84 +char 1 69 +char 1 82 +char 1 95 +char 1 76 +char 1 69 +char 1 65 +char 1 86 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $838 +char 1 69 +char 1 86 +char 1 95 +char 1 87 +char 1 65 +char 1 84 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 79 +char 1 85 +char 1 67 +char 1 72 +char 1 10 +char 1 0 +align 1 +LABELV $833 +char 1 111 +char 1 110 +char 1 112 +char 1 97 +char 1 116 +char 1 114 +char 1 111 +char 1 108 +char 1 0 +align 1 +LABELV $832 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 80 +char 1 65 +char 1 84 +char 1 82 +char 1 79 +char 1 76 +char 1 10 +char 1 0 +align 1 +LABELV $827 +char 1 111 +char 1 110 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 110 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $826 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 71 +char 1 85 +char 1 65 +char 1 82 +char 1 68 +char 1 66 +char 1 65 +char 1 83 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $821 +char 1 111 +char 1 110 +char 1 103 +char 1 101 +char 1 116 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $820 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 71 +char 1 69 +char 1 84 +char 1 70 +char 1 76 +char 1 65 +char 1 71 +char 1 10 +char 1 0 +align 1 +LABELV $815 +char 1 102 +char 1 111 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $814 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 70 +char 1 79 +char 1 76 +char 1 76 +char 1 79 +char 1 87 +char 1 77 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $809 +char 1 110 +char 1 111 +char 1 0 +align 1 +LABELV $808 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 78 +char 1 79 +char 1 10 +char 1 0 +align 1 +LABELV $803 +char 1 121 +char 1 101 +char 1 115 +char 1 0 +align 1 +LABELV $802 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 95 +char 1 89 +char 1 69 +char 1 83 +char 1 10 +char 1 0 +align 1 +LABELV $797 +char 1 42 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $796 +char 1 69 +char 1 86 +char 1 95 +char 1 84 +char 1 65 +char 1 85 +char 1 78 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $783 +char 1 69 +char 1 86 +char 1 95 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 10 +char 1 0 +align 1 +LABELV $778 +char 1 42 +char 1 106 +char 1 117 +char 1 109 +char 1 112 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $777 +char 1 69 +char 1 86 +char 1 95 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 10 +char 1 0 +align 1 +LABELV $772 +char 1 109 +char 1 117 +char 1 115 +char 1 105 +char 1 99 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 117 +char 1 101 +char 1 108 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $769 +char 1 66 +char 1 69 +char 1 71 +char 1 73 +char 1 78 +char 1 95 +char 1 68 +char 1 85 +char 1 69 +char 1 76 +char 1 0 +align 1 +LABELV $768 +char 1 83 +char 1 86 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 0 +align 1 +LABELV $760 +char 1 69 +char 1 86 +char 1 95 +char 1 80 +char 1 82 +char 1 73 +char 1 86 +char 1 65 +char 1 84 +char 1 69 +char 1 95 +char 1 68 +char 1 85 +char 1 69 +char 1 76 +char 1 10 +char 1 0 +align 1 +LABELV $755 +char 1 69 +char 1 86 +char 1 95 +char 1 74 +char 1 85 +char 1 77 +char 1 80 +char 1 95 +char 1 80 +char 1 65 +char 1 68 +char 1 10 +char 1 0 +align 1 +LABELV $725 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 84 +char 1 69 +char 1 80 +char 1 10 +char 1 0 +align 1 +LABELV $716 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 10 +char 1 0 +align 1 +LABELV $705 +char 1 69 +char 1 86 +char 1 95 +char 1 83 +char 1 87 +char 1 73 +char 1 77 +char 1 10 +char 1 0 +align 1 +LABELV $694 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 79 +char 1 79 +char 1 84 +char 1 87 +char 1 65 +char 1 68 +char 1 69 +char 1 10 +char 1 0 +align 1 +LABELV $683 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 79 +char 1 79 +char 1 84 +char 1 83 +char 1 80 +char 1 76 +char 1 65 +char 1 83 +char 1 72 +char 1 10 +char 1 0 +align 1 +LABELV $672 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 79 +char 1 79 +char 1 84 +char 1 83 +char 1 84 +char 1 69 +char 1 80 +char 1 95 +char 1 77 +char 1 69 +char 1 84 +char 1 65 +char 1 76 +char 1 10 +char 1 0 +align 1 +LABELV $662 +char 1 69 +char 1 86 +char 1 95 +char 1 70 +char 1 79 +char 1 79 +char 1 84 +char 1 83 +char 1 84 +char 1 69 +char 1 80 +char 1 10 +char 1 0 +align 1 +LABELV $655 +char 1 69 +char 1 86 +char 1 95 +char 1 67 +char 1 76 +char 1 73 +char 1 69 +char 1 78 +char 1 84 +char 1 74 +char 1 79 +char 1 73 +char 1 78 +char 1 10 +char 1 0 +align 1 +LABELV $644 +char 1 90 +char 1 69 +char 1 82 +char 1 79 +char 1 69 +char 1 86 +char 1 69 +char 1 78 +char 1 84 +char 1 10 +char 1 0 +align 1 +LABELV $638 +char 1 101 +char 1 110 +char 1 116 +char 1 58 +char 1 37 +char 1 51 +char 1 105 +char 1 32 +char 1 32 +char 1 101 +char 1 118 +char 1 101 +char 1 110 +char 1 116 +char 1 58 +char 1 37 +char 1 51 +char 1 105 +char 1 32 +char 1 0 +align 1 +LABELV $601 +char 1 42 +char 1 108 +char 1 97 +char 1 110 +char 1 100 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $596 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 72 +char 1 105 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $582 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $572 +char 1 37 +char 1 115 +char 1 32 +char 1 0 +align 1 +LABELV $567 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $560 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 69 +char 1 82 +char 1 95 +char 1 71 +char 1 79 +char 1 84 +char 1 95 +char 1 70 +char 1 76 +char 1 65 +char 1 71 +char 1 0 +align 1 +LABELV $558 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 69 +char 1 82 +char 1 95 +char 1 67 +char 1 65 +char 1 80 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 68 +char 1 95 +char 1 70 +char 1 76 +char 1 65 +char 1 71 +char 1 0 +align 1 +LABELV $556 +char 1 80 +char 1 76 +char 1 65 +char 1 89 +char 1 69 +char 1 82 +char 1 95 +char 1 82 +char 1 69 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 69 +char 1 68 +char 1 95 +char 1 70 +char 1 76 +char 1 65 +char 1 71 +char 1 0 +align 1 +LABELV $554 +char 1 70 +char 1 76 +char 1 65 +char 1 71 +char 1 95 +char 1 82 +char 1 69 +char 1 84 +char 1 85 +char 1 82 +char 1 78 +char 1 69 +char 1 68 +char 1 0 +align 1 +LABELV $552 +char 1 70 +char 1 82 +char 1 65 +char 1 71 +char 1 71 +char 1 69 +char 1 68 +char 1 95 +char 1 70 +char 1 76 +char 1 65 +char 1 71 +char 1 95 +char 1 67 +char 1 65 +char 1 82 +char 1 82 +char 1 73 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $547 +char 1 70 +char 1 82 +char 1 69 +char 1 69 +char 1 0 +align 1 +LABELV $546 +char 1 83 +char 1 80 +char 1 69 +char 1 67 +char 1 84 +char 1 65 +char 1 84 +char 1 79 +char 1 82 +char 1 0 +align 1 +LABELV $543 +char 1 66 +char 1 76 +char 1 85 +char 1 69 +char 1 0 +align 1 +LABELV $540 +char 1 82 +char 1 69 +char 1 68 +char 1 0 +align 1 +LABELV $533 +char 1 77 +char 1 111 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $531 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 114 +char 1 111 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $529 +char 1 117 +char 1 112 +char 1 112 +char 1 101 +char 1 114 +char 1 95 +char 1 108 +char 1 117 +char 1 109 +char 1 98 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $520 +char 1 112 +char 1 101 +char 1 108 +char 1 118 +char 1 105 +char 1 115 +char 1 0 +align 1 +LABELV $494 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 114 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $493 +char 1 114 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 0 +align 1 +LABELV $491 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 108 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $490 +char 1 108 +char 1 95 +char 1 108 +char 1 101 +char 1 103 +char 1 0 +align 1 +LABELV $488 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 114 +char 1 95 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $487 +char 1 114 +char 1 95 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $485 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $484 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 0 +align 1 +LABELV $482 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 108 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $481 +char 1 108 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 0 +align 1 +LABELV $479 +char 1 104 +char 1 105 +char 1 112 +char 1 115 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $478 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 0 +align 1 +LABELV $476 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 100 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $475 +char 1 104 +char 1 101 +char 1 97 +char 1 100 +char 1 0 +align 1 +LABELV $468 +char 1 42 +char 1 112 +char 1 97 +char 1 105 +char 1 110 +char 1 49 +char 1 48 +char 1 48 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $467 +char 1 42 +char 1 112 +char 1 97 +char 1 105 +char 1 110 +char 1 55 +char 1 53 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $464 +char 1 42 +char 1 112 +char 1 97 +char 1 105 +char 1 110 +char 1 53 +char 1 48 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $461 +char 1 42 +char 1 112 +char 1 97 +char 1 105 +char 1 110 +char 1 50 +char 1 53 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $454 +char 1 80 +char 1 73 +char 1 67 +char 1 75 +char 1 85 +char 1 80 +char 1 76 +char 1 73 +char 1 78 +char 1 69 +char 1 0 +align 1 +LABELV $453 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 95 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $336 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $330 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 84 +char 1 79 +char 1 83 +char 1 83 +char 1 0 +align 1 +LABELV $328 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 69 +char 1 82 +char 1 73 +char 1 67 +char 1 0 +align 1 +LABELV $326 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 84 +char 1 69 +char 1 76 +char 1 69 +char 1 70 +char 1 82 +char 1 65 +char 1 71 +char 1 0 +align 1 +LABELV $324 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 83 +char 1 69 +char 1 78 +char 1 84 +char 1 82 +char 1 89 +char 1 0 +align 1 +LABELV $322 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 68 +char 1 65 +char 1 82 +char 1 75 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 0 +align 1 +LABELV $320 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 68 +char 1 69 +char 1 84 +char 1 80 +char 1 65 +char 1 67 +char 1 75 +char 1 0 +align 1 +LABELV $318 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 84 +char 1 82 +char 1 73 +char 1 80 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 95 +char 1 84 +char 1 73 +char 1 77 +char 1 69 +char 1 68 +char 1 0 +align 1 +LABELV $316 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 84 +char 1 82 +char 1 73 +char 1 80 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 0 +align 1 +LABELV $314 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 84 +char 1 72 +char 1 69 +char 1 82 +char 1 77 +char 1 65 +char 1 76 +char 1 0 +align 1 +LABELV $312 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 82 +char 1 79 +char 1 67 +char 1 75 +char 1 69 +char 1 84 +char 1 95 +char 1 72 +char 1 79 +char 1 77 +char 1 73 +char 1 78 +char 1 71 +char 1 0 +align 1 +LABELV $310 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 82 +char 1 79 +char 1 67 +char 1 75 +char 1 69 +char 1 84 +char 1 0 +align 1 +LABELV $308 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 70 +char 1 76 +char 1 69 +char 1 67 +char 1 72 +char 1 69 +char 1 84 +char 1 84 +char 1 69 +char 1 95 +char 1 77 +char 1 73 +char 1 78 +char 1 69 +char 1 0 +align 1 +LABELV $306 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 70 +char 1 76 +char 1 69 +char 1 67 +char 1 72 +char 1 69 +char 1 84 +char 1 84 +char 1 69 +char 1 0 +align 1 +LABELV $304 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 68 +char 1 69 +char 1 77 +char 1 80 +char 1 50 +char 1 0 +align 1 +LABELV $302 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 82 +char 1 69 +char 1 80 +char 1 69 +char 1 65 +char 1 84 +char 1 69 +char 1 82 +char 1 65 +char 1 76 +char 1 84 +char 1 0 +align 1 +LABELV $300 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 82 +char 1 69 +char 1 80 +char 1 69 +char 1 65 +char 1 84 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $298 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 66 +char 1 79 +char 1 87 +char 1 67 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $296 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 83 +char 1 78 +char 1 73 +char 1 80 +char 1 69 +char 1 0 +align 1 +LABELV $294 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 68 +char 1 73 +char 1 83 +char 1 82 +char 1 85 +char 1 80 +char 1 84 +char 1 79 +char 1 82 +char 1 0 +align 1 +LABELV $292 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 66 +char 1 76 +char 1 65 +char 1 83 +char 1 84 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $290 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 66 +char 1 82 +char 1 89 +char 1 65 +char 1 82 +char 1 0 +align 1 +LABELV $288 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $286 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 77 +char 1 69 +char 1 76 +char 1 69 +char 1 69 +char 1 0 +align 1 +LABELV $284 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 83 +char 1 84 +char 1 85 +char 1 78 +char 1 0 +align 1 +LABELV $273 +char 1 110 +char 1 111 +char 1 110 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $265 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $262 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 46 +char 1 10 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 105 +char 1 46 +char 1 0 +align 1 +LABELV $261 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 67 +char 1 69 +char 1 95 +char 1 87 +char 1 73 +char 1 84 +char 1 72 +char 1 0 +align 1 +LABELV $256 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $255 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 74 +char 1 77 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 78 +char 1 79 +char 1 84 +char 1 74 +char 1 77 +char 1 0 +align 1 +LABELV $254 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 95 +char 1 77 +char 1 69 +char 1 83 +char 1 83 +char 1 65 +char 1 71 +char 1 69 +char 1 0 +align 1 +LABELV $242 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $241 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 0 +align 1 +LABELV $227 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 69 +char 1 82 +char 1 73 +char 1 67 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 77 +char 1 65 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $226 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 69 +char 1 82 +char 1 73 +char 1 67 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 76 +char 1 69 +char 1 83 +char 1 83 +char 1 0 +align 1 +LABELV $223 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 69 +char 1 82 +char 1 73 +char 1 67 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 69 +char 1 77 +char 1 65 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $220 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 77 +char 1 65 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $219 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 76 +char 1 69 +char 1 83 +char 1 83 +char 1 0 +align 1 +LABELV $216 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 70 +char 1 65 +char 1 76 +char 1 76 +char 1 68 +char 1 69 +char 1 65 +char 1 84 +char 1 72 +char 1 95 +char 1 70 +char 1 69 +char 1 77 +char 1 65 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $212 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 69 +char 1 76 +char 1 69 +char 1 67 +char 1 84 +char 1 82 +char 1 79 +char 1 67 +char 1 85 +char 1 84 +char 1 69 +char 1 68 +char 1 95 +char 1 77 +char 1 65 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $211 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 69 +char 1 76 +char 1 69 +char 1 67 +char 1 84 +char 1 82 +char 1 79 +char 1 67 +char 1 85 +char 1 84 +char 1 69 +char 1 68 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 76 +char 1 69 +char 1 83 +char 1 83 +char 1 0 +align 1 +LABELV $208 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 69 +char 1 76 +char 1 69 +char 1 67 +char 1 84 +char 1 82 +char 1 79 +char 1 67 +char 1 85 +char 1 84 +char 1 69 +char 1 68 +char 1 95 +char 1 70 +char 1 69 +char 1 77 +char 1 65 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $204 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 69 +char 1 88 +char 1 80 +char 1 76 +char 1 79 +char 1 83 +char 1 73 +char 1 86 +char 1 69 +char 1 83 +char 1 95 +char 1 77 +char 1 65 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $203 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 69 +char 1 88 +char 1 80 +char 1 76 +char 1 79 +char 1 83 +char 1 73 +char 1 86 +char 1 69 +char 1 83 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 76 +char 1 69 +char 1 83 +char 1 83 +char 1 0 +align 1 +LABELV $200 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 69 +char 1 88 +char 1 80 +char 1 76 +char 1 79 +char 1 83 +char 1 73 +char 1 86 +char 1 69 +char 1 83 +char 1 95 +char 1 70 +char 1 69 +char 1 77 +char 1 65 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $196 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 83 +char 1 72 +char 1 79 +char 1 84 +char 1 95 +char 1 77 +char 1 65 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $195 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 83 +char 1 72 +char 1 79 +char 1 84 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 68 +char 1 69 +char 1 82 +char 1 76 +char 1 69 +char 1 83 +char 1 83 +char 1 0 +align 1 +LABELV $192 +char 1 83 +char 1 85 +char 1 73 +char 1 67 +char 1 73 +char 1 68 +char 1 69 +char 1 95 +char 1 83 +char 1 72 +char 1 79 +char 1 84 +char 1 95 +char 1 70 +char 1 69 +char 1 77 +char 1 65 +char 1 76 +char 1 69 +char 1 0 +align 1 +LABELV $182 +char 1 68 +char 1 73 +char 1 69 +char 1 68 +char 1 95 +char 1 71 +char 1 69 +char 1 78 +char 1 69 +char 1 82 +char 1 73 +char 1 67 +char 1 0 +align 1 +LABELV $178 +char 1 94 +char 1 55 +char 1 0 +align 1 +LABELV $177 +char 1 110 +char 1 0 +align 1 +LABELV $170 +char 1 67 +char 1 71 +char 1 95 +char 1 79 +char 1 98 +char 1 105 +char 1 116 +char 1 117 +char 1 97 +char 1 114 +char 1 121 +char 1 58 +char 1 32 +char 1 116 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 116 +char 1 32 +char 1 111 +char 1 117 +char 1 116 +char 1 32 +char 1 111 +char 1 102 +char 1 32 +char 1 114 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $165 +char 1 37 +char 1 115 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $160 +char 1 37 +char 1 105 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $157 +char 1 49 +char 1 51 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $154 +char 1 49 +char 1 50 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $151 +char 1 49 +char 1 49 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $148 +char 1 51 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $145 +char 1 50 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $142 +char 1 49 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $139 +char 1 0 +align 1 +LABELV $136 +char 1 32 +char 1 0 +align 1 +LABELV $135 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 84 +char 1 73 +char 1 69 +char 1 68 +char 1 95 +char 1 70 +char 1 79 +char 1 82 +char 1 0 +align 1 +LABELV $134 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 78 +char 1 85 +char 1 77 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 84 +char 1 72 +char 1 0 +align 1 +LABELV $133 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 78 +char 1 85 +char 1 77 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 82 +char 1 68 +char 1 0 +align 1 +LABELV $132 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 78 +char 1 85 +char 1 77 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $131 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 78 +char 1 85 +char 1 77 +char 1 66 +char 1 69 +char 1 82 +char 1 95 +char 1 83 +char 1 84 +char 1 0 diff --git a/code/cgame/vm/cg_info.asm b/code/cgame/vm/cg_info.asm new file mode 100644 index 0000000..666a3fe --- /dev/null +++ b/code/cgame/vm/cg_info.asm @@ -0,0 +1,4255 @@ +export CG_LoadingString +code +proc CG_LoadingString 0 12 +file "../cg_info.c" +line 21 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_info.c -- display information while data is being loading +;4: +;5:#include "cg_local.h" +;6: +;7:#define MAX_LOADING_PLAYER_ICONS 16 +;8:#define MAX_LOADING_ITEM_ICONS 26 +;9: +;10://static int loadingPlayerIconCount; +;11://static qhandle_t loadingPlayerIcons[MAX_LOADING_PLAYER_ICONS]; +;12: +;13:void CG_LoadBar(void); +;14: +;15:/* +;16:====================== +;17:CG_LoadingString +;18: +;19:====================== +;20:*/ +;21:void CG_LoadingString( const char *s ) { +line 22 +;22: Q_strncpyz( cg.infoScreenText, s, sizeof( cg.infoScreenText ) ); +ADDRGP4 cg+4020 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 24 +;23: +;24: trap_UpdateScreen(); +ADDRGP4 trap_UpdateScreen +CALLV +pop +line 25 +;25:} +LABELV $120 +endproc CG_LoadingString 0 12 +export CG_LoadingItem +proc CG_LoadingItem 8 8 +line 32 +;26: +;27:/* +;28:=================== +;29:CG_LoadingItem +;30:=================== +;31:*/ +;32:void CG_LoadingItem( int itemNum ) { +line 35 +;33: gitem_t *item; +;34: +;35: item = &bg_itemlist[itemNum]; +ADDRLP4 0 +CNSTI4 52 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +ASGNP4 +line 37 +;36: +;37: CG_LoadingString( CG_GetStripEdString("INGAME",item->classname) ); +ADDRGP4 $124 +ARGP4 +ADDRLP4 0 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 CG_LoadingString +CALLV +pop +line 38 +;38:} +LABELV $123 +endproc CG_LoadingItem 8 8 +export CG_LoadingClient +proc CG_LoadingClient 76 12 +line 45 +;39: +;40:/* +;41:=================== +;42:CG_LoadingClient +;43:=================== +;44:*/ +;45:void CG_LoadingClient( int clientNum ) { +line 49 +;46: const char *info; +;47: char personality[MAX_QPATH]; +;48: +;49: info = CG_ConfigString( CS_PLAYERS + clientNum ); +ADDRFP4 0 +INDIRI4 +CNSTI4 544 +ADDI4 +ARGI4 +ADDRLP4 68 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 64 +ADDRLP4 68 +INDIRP4 +ASGNP4 +line 80 +;50: +;51:/* +;52: char model[MAX_QPATH]; +;53: char iconName[MAX_QPATH]; +;54: char *skin; +;55: if ( loadingPlayerIconCount < MAX_LOADING_PLAYER_ICONS ) { +;56: Q_strncpyz( model, Info_ValueForKey( info, "model" ), sizeof( model ) ); +;57: skin = Q_strrchr( model, '/' ); +;58: if ( skin ) { +;59: *skin++ = '\0'; +;60: } else { +;61: skin = "default"; +;62: } +;63: +;64: Com_sprintf( iconName, MAX_QPATH, "models/players/%s/icon_%s.tga", model, skin ); +;65: +;66: loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName ); +;67: if ( !loadingPlayerIcons[loadingPlayerIconCount] ) { +;68: Com_sprintf( iconName, MAX_QPATH, "models/players/characters/%s/icon_%s.tga", model, skin ); +;69: loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName ); +;70: } +;71: if ( !loadingPlayerIcons[loadingPlayerIconCount] ) { +;72: Com_sprintf( iconName, MAX_QPATH, "models/players/%s/icon_%s.tga", DEFAULT_MODEL, "default" ); +;73: loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName ); +;74: } +;75: if ( loadingPlayerIcons[loadingPlayerIconCount] ) { +;76: loadingPlayerIconCount++; +;77: } +;78: } +;79:*/ +;80: Q_strncpyz( personality, Info_ValueForKey( info, "n" ), sizeof(personality) ); +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRGP4 $126 +ARGP4 +ADDRLP4 72 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 72 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 81 +;81: Q_CleanStr( personality ); +ADDRLP4 0 +ARGP4 +ADDRGP4 Q_CleanStr +CALLP4 +pop +line 89 +;82: +;83: /* +;84: if( cgs.gametype == GT_SINGLE_PLAYER ) { +;85: trap_S_RegisterSound( va( "sound/player/announce/%s.wav", personality )); +;86: } +;87: */ +;88: +;89: CG_LoadingString( personality ); +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_LoadingString +CALLV +pop +line 90 +;90:} +LABELV $125 +endproc CG_LoadingClient 76 12 +export CG_DrawInformation +proc CG_DrawInformation 2160 20 +line 101 +;91: +;92: +;93:/* +;94:==================== +;95:CG_DrawInformation +;96: +;97:Draw all the status / pacifier stuff during level loading +;98:==================== +;99:*/ +;100:#define UI_INFOFONT (UI_BIGFONT) +;101:void CG_DrawInformation( void ) { +line 109 +;102: const char *s; +;103: const char *info; +;104: const char *sysInfo; +;105: int y; +;106: int value, valueNOFP; +;107: qhandle_t levelshot; +;108: char buf[1024]; +;109: int iPropHeight = 18; // I know, this is total crap, but as a post release asian-hack.... -Ste +ADDRLP4 12 +CNSTI4 18 +ASGNI4 +line 111 +;110: +;111: info = CG_ConfigString( CS_SERVERINFO ); +CNSTI4 0 +ARGI4 +ADDRLP4 1056 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 1056 +INDIRP4 +ASGNP4 +line 112 +;112: sysInfo = CG_ConfigString( CS_SYSTEMINFO ); +CNSTI4 1 +ARGI4 +ADDRLP4 1060 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 1052 +ADDRLP4 1060 +INDIRP4 +ASGNP4 +line 114 +;113: +;114: s = Info_ValueForKey( info, "mapname" ); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 $128 +ARGP4 +ADDRLP4 1064 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 1064 +INDIRP4 +ASGNP4 +line 115 +;115: levelshot = trap_R_RegisterShaderNoMip( va( "levelshots/%s", s ) ); +ADDRGP4 $129 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 1068 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1068 +INDIRP4 +ARGP4 +ADDRLP4 1072 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 1048 +ADDRLP4 1072 +INDIRI4 +ASGNI4 +line 116 +;116: if ( !levelshot ) { +ADDRLP4 1048 +INDIRI4 +CNSTI4 0 +NEI4 $130 +line 117 +;117: levelshot = trap_R_RegisterShaderNoMip( "menu/art/unknownmap" ); +ADDRGP4 $132 +ARGP4 +ADDRLP4 1076 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 1048 +ADDRLP4 1076 +INDIRI4 +ASGNI4 +line 118 +;118: } +LABELV $130 +line 119 +;119: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 120 +;120: CG_DrawPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, levelshot ); +ADDRLP4 1076 +CNSTF4 0 +ASGNF4 +ADDRLP4 1076 +INDIRF4 +ARGF4 +ADDRLP4 1076 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +ADDRLP4 1048 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 122 +;121: +;122: CG_LoadBar(); +ADDRGP4 CG_LoadBar +CALLV +pop +line 129 +;123: +;124: // draw the icons of things as they are loaded +;125:// CG_DrawLoadingIcons(); +;126: +;127: // the first 150 rows are reserved for the client connection +;128: // screen to write into +;129: if ( cg.infoScreenText[0] ) { +ADDRGP4 cg+4020 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $133 +line 130 +;130: const char *psLoading = CG_GetStripEdString("MENUS3", "LOADING_MAPNAME"); +ADDRGP4 $136 +ARGP4 +ADDRGP4 $137 +ARGP4 +ADDRLP4 1084 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 1080 +ADDRLP4 1084 +INDIRP4 +ASGNP4 +line 131 +;131: UI_DrawProportionalString( 320, 128-32, va(/*"Loading... %s"*/ psLoading, cg.infoScreenText), +ADDRLP4 1080 +INDIRP4 +ARGP4 +ADDRGP4 cg+4020 +ARGP4 +ADDRLP4 1088 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +CNSTI4 96 +ARGI4 +ADDRLP4 1088 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 133 +;132: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;133: } else { +ADDRGP4 $134 +JUMPV +LABELV $133 +line 134 +;134: const char *psAwaitingSnapshot = CG_GetStripEdString("MENUS3", "AWAITING_SNAPSHOT"); +ADDRGP4 $136 +ARGP4 +ADDRGP4 $139 +ARGP4 +ADDRLP4 1084 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 1080 +ADDRLP4 1084 +INDIRP4 +ASGNP4 +line 135 +;135: UI_DrawProportionalString( 320, 128-32, /*"Awaiting snapshot..."*/psAwaitingSnapshot, +CNSTI4 320 +ARGI4 +CNSTI4 96 +ARGI4 +ADDRLP4 1080 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 137 +;136: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;137: } +LABELV $134 +line 141 +;138: +;139: // draw info string information +;140: +;141: y = 180-32; +ADDRLP4 0 +CNSTI4 148 +ASGNI4 +line 144 +;142: +;143: // don't print server lines if playing a local game +;144: trap_Cvar_VariableStringBuffer( "sv_running", buf, sizeof( buf ) ); +ADDRGP4 $140 +ARGP4 +ADDRLP4 20 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 trap_Cvar_VariableStringBuffer +CALLV +pop +line 145 +;145: if ( !atoi( buf ) ) { +ADDRLP4 20 +ARGP4 +ADDRLP4 1080 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 1080 +INDIRI4 +CNSTI4 0 +NEI4 $141 +line 147 +;146: // server hostname +;147: Q_strncpyz(buf, Info_ValueForKey( info, "sv_hostname" ), 1024); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 $143 +ARGP4 +ADDRLP4 1084 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 20 +ARGP4 +ADDRLP4 1084 +INDIRP4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 148 +;148: Q_CleanStr(buf); +ADDRLP4 20 +ARGP4 +ADDRGP4 Q_CleanStr +CALLP4 +pop +line 149 +;149: UI_DrawProportionalString( 320, y, buf, +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 20 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 151 +;150: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;151: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 154 +;152: +;153: // pure server +;154: s = Info_ValueForKey( sysInfo, "sv_pure" ); +ADDRLP4 1052 +INDIRP4 +ARGP4 +ADDRGP4 $144 +ARGP4 +ADDRLP4 1088 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 1088 +INDIRP4 +ASGNP4 +line 155 +;155: if ( s[0] == '1' ) { +ADDRLP4 8 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 49 +NEI4 $145 +line 156 +;156: const char *psPure = CG_GetStripEdString("INGAMETEXT", "PURE_SERVER"); +ADDRGP4 $147 +ARGP4 +ADDRGP4 $148 +ARGP4 +ADDRLP4 1096 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 1092 +ADDRLP4 1096 +INDIRP4 +ASGNP4 +line 157 +;157: UI_DrawProportionalString( 320, y, psPure, +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1092 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 159 +;158: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;159: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 160 +;160: } +LABELV $145 +line 163 +;161: +;162: // server-specific message of the day +;163: s = CG_ConfigString( CS_MOTD ); +CNSTI4 4 +ARGI4 +ADDRLP4 1092 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 1092 +INDIRP4 +ASGNP4 +line 164 +;164: if ( s[0] ) { +ADDRLP4 8 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $149 +line 165 +;165: UI_DrawProportionalString( 320, y, s, +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 167 +;166: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;167: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 168 +;168: } +LABELV $149 +line 170 +;169: +;170: { // display global MOTD at bottom (mirrors ui_main UI_DrawConnectScreen +line 172 +;171: char motdString[1024]; +;172: trap_Cvar_VariableStringBuffer( "cl_motdString", motdString, sizeof( motdString ) ); +ADDRGP4 $151 +ARGP4 +ADDRLP4 1096 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 trap_Cvar_VariableStringBuffer +CALLV +pop +line 174 +;173: +;174: if (motdString[0]) +ADDRLP4 1096 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $152 +line 175 +;175: { +line 176 +;176: UI_DrawProportionalString( 320, 425, motdString, +CNSTI4 320 +ARGI4 +CNSTI4 425 +ARGI4 +ADDRLP4 1096 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 178 +;177: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;178: } +LABELV $152 +line 179 +;179: } +line 182 +;180: +;181: // some extra space after hostname and motd +;182: y += 10; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +ADDI4 +ASGNI4 +line 183 +;183: } +LABELV $141 +line 186 +;184: +;185: // map-specific message (long map name) +;186: s = CG_ConfigString( CS_MESSAGE ); +CNSTI4 3 +ARGI4 +ADDRLP4 1084 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 1084 +INDIRP4 +ASGNP4 +line 187 +;187: if ( s[0] ) { +ADDRLP4 8 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $154 +line 188 +;188: UI_DrawProportionalString( 320, y, s, +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 190 +;189: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;190: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 191 +;191: } +LABELV $154 +line 194 +;192: +;193: // cheats warning +;194: s = Info_ValueForKey( sysInfo, "sv_cheats" ); +ADDRLP4 1052 +INDIRP4 +ARGP4 +ADDRGP4 $156 +ARGP4 +ADDRLP4 1088 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 1088 +INDIRP4 +ASGNP4 +line 195 +;195: if ( s[0] == '1' ) { +ADDRLP4 8 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 49 +NEI4 $157 +line 196 +;196: UI_DrawProportionalString( 320, y, CG_GetStripEdString("INGAMETEXT", "CHEATSAREENABLED"), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $159 +ARGP4 +ADDRLP4 1092 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1092 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 198 +;197: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;198: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 199 +;199: } +LABELV $157 +line 202 +;200: +;201: // game type +;202: switch ( cgs.gametype ) { +ADDRLP4 1092 +ADDRGP4 cgs+32960 +INDIRI4 +ASGNI4 +ADDRLP4 1092 +INDIRI4 +CNSTI4 0 +LTI4 $160 +ADDRLP4 1092 +INDIRI4 +CNSTI4 8 +GTI4 $160 +ADDRLP4 1092 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $183 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $183 +address $164 +address $166 +address $168 +address $172 +address $170 +address $174 +address $176 +address $178 +address $180 +code +LABELV $164 +line 204 +;203: case GT_FFA: +;204: s = "Free For All"; +ADDRLP4 8 +ADDRGP4 $165 +ASGNP4 +line 205 +;205: break; +ADDRGP4 $161 +JUMPV +LABELV $166 +line 207 +;206: case GT_HOLOCRON: +;207: s = "Holocron FFA"; +ADDRLP4 8 +ADDRGP4 $167 +ASGNP4 +line 208 +;208: break; +ADDRGP4 $161 +JUMPV +LABELV $168 +line 210 +;209: case GT_JEDIMASTER: +;210: s = "Jedi Master"; +ADDRLP4 8 +ADDRGP4 $169 +ASGNP4 +line 211 +;211: break; +ADDRGP4 $161 +JUMPV +LABELV $170 +line 213 +;212: case GT_SINGLE_PLAYER: +;213: s = "Single Player"; +ADDRLP4 8 +ADDRGP4 $171 +ASGNP4 +line 214 +;214: break; +ADDRGP4 $161 +JUMPV +LABELV $172 +line 216 +;215: case GT_TOURNAMENT: +;216: s = "Duel"; +ADDRLP4 8 +ADDRGP4 $173 +ASGNP4 +line 217 +;217: break; +ADDRGP4 $161 +JUMPV +LABELV $174 +line 219 +;218: case GT_TEAM: +;219: s = "Team FFA"; +ADDRLP4 8 +ADDRGP4 $175 +ASGNP4 +line 220 +;220: break; +ADDRGP4 $161 +JUMPV +LABELV $176 +line 222 +;221: case GT_SAGA: +;222: s = "N/A"; +ADDRLP4 8 +ADDRGP4 $177 +ASGNP4 +line 223 +;223: break; +ADDRGP4 $161 +JUMPV +LABELV $178 +line 225 +;224: case GT_CTF: +;225: s = "Capture The Flag"; +ADDRLP4 8 +ADDRGP4 $179 +ASGNP4 +line 226 +;226: break; +ADDRGP4 $161 +JUMPV +LABELV $180 +line 228 +;227: case GT_CTY: +;228: s = "Capture The Ysalamiri"; +ADDRLP4 8 +ADDRGP4 $181 +ASGNP4 +line 229 +;229: break; +ADDRGP4 $161 +JUMPV +LABELV $160 +line 231 +;230: default: +;231: s = "Unknown Gametype"; +ADDRLP4 8 +ADDRGP4 $182 +ASGNP4 +line 232 +;232: break; +LABELV $161 +line 234 +;233: } +;234: UI_DrawProportionalString( 320, y, s, +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 236 +;235: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;236: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 238 +;237: +;238: value = atoi( Info_ValueForKey( info, "timelimit" ) ); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 $184 +ARGP4 +ADDRLP4 1100 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 1100 +INDIRP4 +ARGP4 +ADDRLP4 1104 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 1104 +INDIRI4 +ASGNI4 +line 239 +;239: if ( value ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $185 +line 240 +;240: UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "TIMELIMIT"), value ), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $188 +ARGP4 +ADDRLP4 1108 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $187 +ARGP4 +ADDRLP4 1108 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 1112 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1112 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 242 +;241: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;242: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 243 +;243: } +LABELV $185 +line 245 +;244: +;245: if (cgs.gametype < GT_CTF ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +GEI4 $189 +line 246 +;246: value = atoi( Info_ValueForKey( info, "fraglimit" ) ); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 $192 +ARGP4 +ADDRLP4 1108 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ARGP4 +ADDRLP4 1112 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 1112 +INDIRI4 +ASGNI4 +line 247 +;247: if ( value ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $193 +line 248 +;248: UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "FRAGLIMIT"), value ), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $195 +ARGP4 +ADDRLP4 1116 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $187 +ARGP4 +ADDRLP4 1116 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 1120 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1120 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 250 +;249: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;250: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 251 +;251: } +LABELV $193 +line 253 +;252: +;253: if (cgs.gametype == GT_TOURNAMENT) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $196 +line 254 +;254: { +line 255 +;255: value = atoi( Info_ValueForKey( info, "duel_fraglimit" ) ); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 $199 +ARGP4 +ADDRLP4 1116 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 1116 +INDIRP4 +ARGP4 +ADDRLP4 1120 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 1120 +INDIRI4 +ASGNI4 +line 256 +;256: if ( value ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $200 +line 257 +;257: UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "WINLIMIT"), value ), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $202 +ARGP4 +ADDRLP4 1124 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $187 +ARGP4 +ADDRLP4 1124 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 1128 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1128 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 259 +;258: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;259: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 260 +;260: } +LABELV $200 +line 261 +;261: } +LABELV $196 +line 262 +;262: } +LABELV $189 +line 264 +;263: +;264: if (cgs.gametype >= GT_CTF) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +LTI4 $203 +line 265 +;265: value = atoi( Info_ValueForKey( info, "capturelimit" ) ); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 $206 +ARGP4 +ADDRLP4 1108 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ARGP4 +ADDRLP4 1112 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 1112 +INDIRI4 +ASGNI4 +line 266 +;266: if ( value ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $207 +line 267 +;267: UI_DrawProportionalString( 320, y, va( "%s %i", CG_GetStripEdString("INGAMETEXT", "CAPTURELIMIT"), value ), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $209 +ARGP4 +ADDRLP4 1116 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $187 +ARGP4 +ADDRLP4 1116 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 1120 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1120 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 269 +;268: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;269: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 270 +;270: } +LABELV $207 +line 271 +;271: } +LABELV $203 +line 273 +;272: +;273: if (cgs.gametype >= GT_TEAM) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $210 +line 274 +;274: { +line 275 +;275: value = atoi( Info_ValueForKey( info, "g_forceBasedTeams" ) ); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 $213 +ARGP4 +ADDRLP4 1108 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ARGP4 +ADDRLP4 1112 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 1112 +INDIRI4 +ASGNI4 +line 276 +;276: if ( value ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $214 +line 277 +;277: UI_DrawProportionalString( 320, y, CG_GetStripEdString("INGAMETEXT", "FORCEBASEDTEAMS"), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $216 +ARGP4 +ADDRLP4 1116 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1116 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 279 +;278: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;279: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 280 +;280: } +LABELV $214 +line 281 +;281: } +LABELV $210 +line 283 +;282: +;283: valueNOFP = atoi( Info_ValueForKey( info, "g_forcePowerDisable" ) ); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 $217 +ARGP4 +ADDRLP4 1108 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ARGP4 +ADDRLP4 1112 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 1044 +ADDRLP4 1112 +INDIRI4 +ASGNI4 +line 285 +;284: +;285: value = atoi( Info_ValueForKey( info, "g_maxForceRank" ) ); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 $218 +ARGP4 +ADDRLP4 1116 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 1116 +INDIRP4 +ARGP4 +ADDRLP4 1120 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 1120 +INDIRI4 +ASGNI4 +line 286 +;286: if ( value && !valueNOFP ) { +ADDRLP4 1124 +CNSTI4 0 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 1124 +INDIRI4 +EQI4 $219 +ADDRLP4 1044 +INDIRI4 +ADDRLP4 1124 +INDIRI4 +NEI4 $219 +line 289 +;287: char fmStr[1024]; +;288: +;289: trap_SP_GetStringTextString("INGAMETEXT_MAXFORCERANK",fmStr, sizeof(fmStr)); +ADDRGP4 $221 +ARGP4 +ADDRLP4 1128 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 291 +;290: +;291: UI_DrawProportionalString( 320, y, va( "%s %s", fmStr, CG_GetStripEdString("INGAMETEXT", forceMasteryLevels[value]) ), +ADDRGP4 $147 +ARGP4 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forceMasteryLevels +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2152 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $222 +ARGP4 +ADDRLP4 1128 +ARGP4 +ADDRLP4 2152 +INDIRP4 +ARGP4 +ADDRLP4 2156 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 2156 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 293 +;292: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;293: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 294 +;294: } +ADDRGP4 $220 +JUMPV +LABELV $219 +line 295 +;295: else if (!valueNOFP) +ADDRLP4 1044 +INDIRI4 +CNSTI4 0 +NEI4 $223 +line 296 +;296: { +line 298 +;297: char fmStr[1024]; +;298: trap_SP_GetStringTextString("INGAMETEXT_MAXFORCERANK",fmStr, sizeof(fmStr)); +ADDRGP4 $221 +ARGP4 +ADDRLP4 1128 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 300 +;299: +;300: UI_DrawProportionalString( 320, y, va( "%s %s", fmStr, (char *)CG_GetStripEdString("INGAMETEXT", forceMasteryLevels[7]) ), +ADDRGP4 $147 +ARGP4 +ADDRGP4 forceMasteryLevels+28 +INDIRP4 +ARGP4 +ADDRLP4 2152 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $222 +ARGP4 +ADDRLP4 1128 +ARGP4 +ADDRLP4 2152 +INDIRP4 +ARGP4 +ADDRLP4 2156 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 2156 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 302 +;301: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;302: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 303 +;303: } +LABELV $223 +LABELV $220 +line 305 +;304: +;305: if (cgs.gametype == GT_TOURNAMENT) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $226 +line 306 +;306: { +line 307 +;307: value = atoi( Info_ValueForKey( info, "g_duelWeaponDisable" ) ); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 $229 +ARGP4 +ADDRLP4 1128 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 1128 +INDIRP4 +ARGP4 +ADDRLP4 1132 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 1132 +INDIRI4 +ASGNI4 +line 308 +;308: } +ADDRGP4 $227 +JUMPV +LABELV $226 +line 310 +;309: else +;310: { +line 311 +;311: value = atoi( Info_ValueForKey( info, "g_weaponDisable" ) ); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRGP4 $230 +ARGP4 +ADDRLP4 1128 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 1128 +INDIRP4 +ARGP4 +ADDRLP4 1132 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 1132 +INDIRI4 +ASGNI4 +line 312 +;312: } +LABELV $227 +line 313 +;313: if ( cgs.gametype != GT_JEDIMASTER && value ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 2 +EQI4 $231 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $231 +line 314 +;314: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "SABERONLYSET") ), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $235 +ARGP4 +ADDRLP4 1128 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1128 +INDIRP4 +ARGP4 +ADDRLP4 1132 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1132 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 316 +;315: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;316: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 317 +;317: } +LABELV $231 +line 319 +;318: +;319: if ( valueNOFP ) { +ADDRLP4 1044 +INDIRI4 +CNSTI4 0 +EQI4 $236 +line 320 +;320: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "NOFPSET") ), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $238 +ARGP4 +ADDRLP4 1128 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1128 +INDIRP4 +ARGP4 +ADDRLP4 1132 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1132 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 322 +;321: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;322: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 323 +;323: } +LABELV $236 +line 327 +;324: +;325: +;326: // Display the rules based on type +;327: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 328 +;328: switch ( cgs.gametype ) { +ADDRLP4 1128 +ADDRGP4 cgs+32960 +INDIRI4 +ASGNI4 +ADDRLP4 1128 +INDIRI4 +CNSTI4 0 +LTI4 $240 +ADDRLP4 1128 +INDIRI4 +CNSTI4 8 +GTI4 $240 +ADDRLP4 1128 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $265 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $265 +address $243 +address $245 +address $248 +address $252 +address $240 +address $255 +address $240 +address $259 +address $262 +code +LABELV $243 +line 330 +;329: case GT_FFA: +;330: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_FFA_1")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $244 +ARGP4 +ADDRLP4 1136 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1136 +INDIRP4 +ARGP4 +ADDRLP4 1140 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1140 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 332 +;331: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;332: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 333 +;333: break; +ADDRGP4 $240 +JUMPV +LABELV $245 +line 335 +;334: case GT_HOLOCRON: +;335: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_HOLO_1")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $246 +ARGP4 +ADDRLP4 1144 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1144 +INDIRP4 +ARGP4 +ADDRLP4 1148 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1148 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 337 +;336: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;337: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 338 +;338: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_HOLO_2")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $247 +ARGP4 +ADDRLP4 1152 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1152 +INDIRP4 +ARGP4 +ADDRLP4 1156 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1156 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 340 +;339: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;340: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 341 +;341: break; +ADDRGP4 $240 +JUMPV +LABELV $248 +line 343 +;342: case GT_JEDIMASTER: +;343: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_JEDI_1")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $249 +ARGP4 +ADDRLP4 1160 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1160 +INDIRP4 +ARGP4 +ADDRLP4 1164 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1164 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 345 +;344: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;345: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 346 +;346: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_JEDI_2")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $250 +ARGP4 +ADDRLP4 1168 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1168 +INDIRP4 +ARGP4 +ADDRLP4 1172 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1172 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 348 +;347: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;348: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 349 +;349: break; +ADDRGP4 $240 +JUMPV +line 351 +;350: case GT_SINGLE_PLAYER: +;351: break; +LABELV $252 +line 353 +;352: case GT_TOURNAMENT: +;353: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_DUEL_1")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $253 +ARGP4 +ADDRLP4 1176 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1176 +INDIRP4 +ARGP4 +ADDRLP4 1180 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1180 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 355 +;354: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;355: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 356 +;356: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_DUEL_2")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $254 +ARGP4 +ADDRLP4 1184 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1184 +INDIRP4 +ARGP4 +ADDRLP4 1188 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1188 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 358 +;357: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;358: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 359 +;359: break; +ADDRGP4 $240 +JUMPV +LABELV $255 +line 361 +;360: case GT_TEAM: +;361: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_TEAM_1")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $256 +ARGP4 +ADDRLP4 1192 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1192 +INDIRP4 +ARGP4 +ADDRLP4 1196 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1196 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 363 +;362: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;363: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 364 +;364: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_TEAM_2")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $257 +ARGP4 +ADDRLP4 1200 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1200 +INDIRP4 +ARGP4 +ADDRLP4 1204 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1204 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 366 +;365: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;366: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 367 +;367: break; +ADDRGP4 $240 +JUMPV +line 369 +;368: case GT_SAGA: +;369: break; +LABELV $259 +line 371 +;370: case GT_CTF: +;371: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTF_1")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $260 +ARGP4 +ADDRLP4 1208 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1208 +INDIRP4 +ARGP4 +ADDRLP4 1212 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1212 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 373 +;372: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;373: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 374 +;374: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTF_2")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $261 +ARGP4 +ADDRLP4 1216 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1216 +INDIRP4 +ARGP4 +ADDRLP4 1220 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1220 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 376 +;375: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;376: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 377 +;377: break; +ADDRGP4 $240 +JUMPV +LABELV $262 +line 379 +;378: case GT_CTY: +;379: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTY_1")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $263 +ARGP4 +ADDRLP4 1224 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1224 +INDIRP4 +ARGP4 +ADDRLP4 1228 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1228 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 381 +;380: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;381: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 382 +;382: UI_DrawProportionalString( 320, y, va( "%s", (char *)CG_GetStripEdString("INGAMETEXT", "RULES_CTY_2")), +ADDRGP4 $147 +ARGP4 +ADDRGP4 $264 +ARGP4 +ADDRLP4 1232 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $234 +ARGP4 +ADDRLP4 1232 +INDIRP4 +ARGP4 +ADDRLP4 1236 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 320 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1236 +INDIRP4 +ARGP4 +CNSTI4 2081 +ARGI4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 384 +;383: UI_CENTER|UI_INFOFONT|UI_DROPSHADOW, colorWhite ); +;384: y += iPropHeight; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +ASGNI4 +line 385 +;385: break; +line 387 +;386: default: +;387: break; +LABELV $240 +line 389 +;388: } +;389:} +LABELV $127 +endproc CG_DrawInformation 2160 20 +export CG_LoadBar +proc CG_LoadBar 56 20 +line 397 +;390: +;391:/* +;392:=================== +;393:CG_LoadBar +;394:=================== +;395:*/ +;396:void CG_LoadBar(void) +;397:{ +line 398 +;398: const int numticks = 9, tickwidth = 40, tickheight = 8; +ADDRLP4 44 +CNSTI4 9 +ASGNI4 +ADDRLP4 8 +CNSTI4 40 +ASGNI4 +ADDRLP4 0 +CNSTI4 8 +ASGNI4 +line 399 +;399: const int tickpadx = 20, tickpady = 12; +ADDRLP4 20 +CNSTI4 20 +ASGNI4 +ADDRLP4 24 +CNSTI4 12 +ASGNI4 +line 400 +;400: const int capwidth = 8; +ADDRLP4 4 +CNSTI4 8 +ASGNI4 +line 401 +;401: const int barwidth = numticks*tickwidth+tickpadx*2+capwidth*2, barleft = ((640-barwidth)/2); +ADDRLP4 52 +CNSTI4 1 +ASGNI4 +ADDRLP4 28 +ADDRLP4 44 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRLP4 20 +INDIRI4 +ADDRLP4 52 +INDIRI4 +LSHI4 +ADDI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 52 +INDIRI4 +LSHI4 +ADDI4 +ASGNI4 +ADDRLP4 32 +CNSTI4 640 +ADDRLP4 28 +INDIRI4 +SUBI4 +CNSTI4 2 +DIVI4 +ASGNI4 +line 402 +;402: const int barheight = tickheight + tickpady*2, bartop = 480-barheight; +ADDRLP4 36 +ADDRLP4 0 +INDIRI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 1 +LSHI4 +ADDI4 +ASGNI4 +ADDRLP4 40 +CNSTI4 480 +ADDRLP4 36 +INDIRI4 +SUBI4 +ASGNI4 +line 403 +;403: const int capleft = barleft+tickpadx, tickleft = capleft+capwidth, ticktop = bartop+tickpady; +ADDRLP4 48 +ADDRLP4 32 +INDIRI4 +ADDRLP4 20 +INDIRI4 +ADDI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 48 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 40 +INDIRI4 +ADDRLP4 24 +INDIRI4 +ADDI4 +ASGNI4 +line 405 +;404: +;405: trap_R_SetColor( colorWhite ); +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 407 +;406: // Draw background +;407: CG_DrawPic(barleft, bartop, barwidth, barheight, cgs.media.loadBarLEDSurround); +ADDRLP4 32 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 40 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 cgs+70296+16 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 410 +;408: +;409: // Draw left cap (backwards) +;410: CG_DrawPic(tickleft, ticktop, -capwidth, tickheight, cgs.media.loadBarLEDCap); +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +INDIRI4 +NEGI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 cgs+70296+12 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 413 +;411: +;412: // Draw bar +;413: CG_DrawPic(tickleft, ticktop, tickwidth*cg.loadLCARSStage, tickheight, cgs.media.loadBarLED); +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 8 +INDIRI4 +ADDRGP4 cg+13480 +INDIRI4 +MULI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 cgs+70296+8 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 416 +;414: +;415: // Draw right cap +;416: CG_DrawPic(tickleft+tickwidth*cg.loadLCARSStage, ticktop, capwidth, tickheight, cgs.media.loadBarLEDCap); +ADDRLP4 12 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDRGP4 cg+13480 +INDIRI4 +MULI4 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 cgs+70296+12 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 417 +;417:} +LABELV $266 +endproc CG_LoadBar 56 20 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $264 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 67 +char 1 84 +char 1 89 +char 1 95 +char 1 50 +char 1 0 +align 1 +LABELV $263 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 67 +char 1 84 +char 1 89 +char 1 95 +char 1 49 +char 1 0 +align 1 +LABELV $261 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 67 +char 1 84 +char 1 70 +char 1 95 +char 1 50 +char 1 0 +align 1 +LABELV $260 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 67 +char 1 84 +char 1 70 +char 1 95 +char 1 49 +char 1 0 +align 1 +LABELV $257 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 95 +char 1 50 +char 1 0 +align 1 +LABELV $256 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 95 +char 1 49 +char 1 0 +align 1 +LABELV $254 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 68 +char 1 85 +char 1 69 +char 1 76 +char 1 95 +char 1 50 +char 1 0 +align 1 +LABELV $253 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 68 +char 1 85 +char 1 69 +char 1 76 +char 1 95 +char 1 49 +char 1 0 +align 1 +LABELV $250 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 74 +char 1 69 +char 1 68 +char 1 73 +char 1 95 +char 1 50 +char 1 0 +align 1 +LABELV $249 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 74 +char 1 69 +char 1 68 +char 1 73 +char 1 95 +char 1 49 +char 1 0 +align 1 +LABELV $247 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 72 +char 1 79 +char 1 76 +char 1 79 +char 1 95 +char 1 50 +char 1 0 +align 1 +LABELV $246 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 72 +char 1 79 +char 1 76 +char 1 79 +char 1 95 +char 1 49 +char 1 0 +align 1 +LABELV $244 +char 1 82 +char 1 85 +char 1 76 +char 1 69 +char 1 83 +char 1 95 +char 1 70 +char 1 70 +char 1 65 +char 1 95 +char 1 49 +char 1 0 +align 1 +LABELV $238 +char 1 78 +char 1 79 +char 1 70 +char 1 80 +char 1 83 +char 1 69 +char 1 84 +char 1 0 +align 1 +LABELV $235 +char 1 83 +char 1 65 +char 1 66 +char 1 69 +char 1 82 +char 1 79 +char 1 78 +char 1 76 +char 1 89 +char 1 83 +char 1 69 +char 1 84 +char 1 0 +align 1 +LABELV $234 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $230 +char 1 103 +char 1 95 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 68 +char 1 105 +char 1 115 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $229 +char 1 103 +char 1 95 +char 1 100 +char 1 117 +char 1 101 +char 1 108 +char 1 87 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 68 +char 1 105 +char 1 115 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $222 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $221 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 77 +char 1 65 +char 1 88 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 82 +char 1 65 +char 1 78 +char 1 75 +char 1 0 +align 1 +LABELV $218 +char 1 103 +char 1 95 +char 1 109 +char 1 97 +char 1 120 +char 1 70 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 82 +char 1 97 +char 1 110 +char 1 107 +char 1 0 +align 1 +LABELV $217 +char 1 103 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 80 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 68 +char 1 105 +char 1 115 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $216 +char 1 70 +char 1 79 +char 1 82 +char 1 67 +char 1 69 +char 1 66 +char 1 65 +char 1 83 +char 1 69 +char 1 68 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 83 +char 1 0 +align 1 +LABELV $213 +char 1 103 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 66 +char 1 97 +char 1 115 +char 1 101 +char 1 100 +char 1 84 +char 1 101 +char 1 97 +char 1 109 +char 1 115 +char 1 0 +align 1 +LABELV $209 +char 1 67 +char 1 65 +char 1 80 +char 1 84 +char 1 85 +char 1 82 +char 1 69 +char 1 76 +char 1 73 +char 1 77 +char 1 73 +char 1 84 +char 1 0 +align 1 +LABELV $206 +char 1 99 +char 1 97 +char 1 112 +char 1 116 +char 1 117 +char 1 114 +char 1 101 +char 1 108 +char 1 105 +char 1 109 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $202 +char 1 87 +char 1 73 +char 1 78 +char 1 76 +char 1 73 +char 1 77 +char 1 73 +char 1 84 +char 1 0 +align 1 +LABELV $199 +char 1 100 +char 1 117 +char 1 101 +char 1 108 +char 1 95 +char 1 102 +char 1 114 +char 1 97 +char 1 103 +char 1 108 +char 1 105 +char 1 109 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $195 +char 1 70 +char 1 82 +char 1 65 +char 1 71 +char 1 76 +char 1 73 +char 1 77 +char 1 73 +char 1 84 +char 1 0 +align 1 +LABELV $192 +char 1 102 +char 1 114 +char 1 97 +char 1 103 +char 1 108 +char 1 105 +char 1 109 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $188 +char 1 84 +char 1 73 +char 1 77 +char 1 69 +char 1 76 +char 1 73 +char 1 77 +char 1 73 +char 1 84 +char 1 0 +align 1 +LABELV $187 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $184 +char 1 116 +char 1 105 +char 1 109 +char 1 101 +char 1 108 +char 1 105 +char 1 109 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $182 +char 1 85 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 71 +char 1 97 +char 1 109 +char 1 101 +char 1 116 +char 1 121 +char 1 112 +char 1 101 +char 1 0 +align 1 +LABELV $181 +char 1 67 +char 1 97 +char 1 112 +char 1 116 +char 1 117 +char 1 114 +char 1 101 +char 1 32 +char 1 84 +char 1 104 +char 1 101 +char 1 32 +char 1 89 +char 1 115 +char 1 97 +char 1 108 +char 1 97 +char 1 109 +char 1 105 +char 1 114 +char 1 105 +char 1 0 +align 1 +LABELV $179 +char 1 67 +char 1 97 +char 1 112 +char 1 116 +char 1 117 +char 1 114 +char 1 101 +char 1 32 +char 1 84 +char 1 104 +char 1 101 +char 1 32 +char 1 70 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $177 +char 1 78 +char 1 47 +char 1 65 +char 1 0 +align 1 +LABELV $175 +char 1 84 +char 1 101 +char 1 97 +char 1 109 +char 1 32 +char 1 70 +char 1 70 +char 1 65 +char 1 0 +align 1 +LABELV $173 +char 1 68 +char 1 117 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $171 +char 1 83 +char 1 105 +char 1 110 +char 1 103 +char 1 108 +char 1 101 +char 1 32 +char 1 80 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $169 +char 1 74 +char 1 101 +char 1 100 +char 1 105 +char 1 32 +char 1 77 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $167 +char 1 72 +char 1 111 +char 1 108 +char 1 111 +char 1 99 +char 1 114 +char 1 111 +char 1 110 +char 1 32 +char 1 70 +char 1 70 +char 1 65 +char 1 0 +align 1 +LABELV $165 +char 1 70 +char 1 114 +char 1 101 +char 1 101 +char 1 32 +char 1 70 +char 1 111 +char 1 114 +char 1 32 +char 1 65 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $159 +char 1 67 +char 1 72 +char 1 69 +char 1 65 +char 1 84 +char 1 83 +char 1 65 +char 1 82 +char 1 69 +char 1 69 +char 1 78 +char 1 65 +char 1 66 +char 1 76 +char 1 69 +char 1 68 +char 1 0 +align 1 +LABELV $156 +char 1 115 +char 1 118 +char 1 95 +char 1 99 +char 1 104 +char 1 101 +char 1 97 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $151 +char 1 99 +char 1 108 +char 1 95 +char 1 109 +char 1 111 +char 1 116 +char 1 100 +char 1 83 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $148 +char 1 80 +char 1 85 +char 1 82 +char 1 69 +char 1 95 +char 1 83 +char 1 69 +char 1 82 +char 1 86 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $147 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 0 +align 1 +LABELV $144 +char 1 115 +char 1 118 +char 1 95 +char 1 112 +char 1 117 +char 1 114 +char 1 101 +char 1 0 +align 1 +LABELV $143 +char 1 115 +char 1 118 +char 1 95 +char 1 104 +char 1 111 +char 1 115 +char 1 116 +char 1 110 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $140 +char 1 115 +char 1 118 +char 1 95 +char 1 114 +char 1 117 +char 1 110 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $139 +char 1 65 +char 1 87 +char 1 65 +char 1 73 +char 1 84 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 83 +char 1 78 +char 1 65 +char 1 80 +char 1 83 +char 1 72 +char 1 79 +char 1 84 +char 1 0 +align 1 +LABELV $137 +char 1 76 +char 1 79 +char 1 65 +char 1 68 +char 1 73 +char 1 78 +char 1 71 +char 1 95 +char 1 77 +char 1 65 +char 1 80 +char 1 78 +char 1 65 +char 1 77 +char 1 69 +char 1 0 +align 1 +LABELV $136 +char 1 77 +char 1 69 +char 1 78 +char 1 85 +char 1 83 +char 1 51 +char 1 0 +align 1 +LABELV $132 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 97 +char 1 114 +char 1 116 +char 1 47 +char 1 117 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 109 +char 1 97 +char 1 112 +char 1 0 +align 1 +LABELV $129 +char 1 108 +char 1 101 +char 1 118 +char 1 101 +char 1 108 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $128 +char 1 109 +char 1 97 +char 1 112 +char 1 110 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $126 +char 1 110 +char 1 0 +align 1 +LABELV $124 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 0 diff --git a/code/cgame/vm/cg_light.asm b/code/cgame/vm/cg_light.asm new file mode 100644 index 0000000..a2ff4b6 --- /dev/null +++ b/code/cgame/vm/cg_light.asm @@ -0,0 +1,1277 @@ +export CG_ClearLightStyles +code +proc CG_ClearLightStyles 4 12 +file "../cg_light.c" +line 16 +;1:#include "cg_local.h" +;2: +;3:#if !defined(CG_LIGHTS_H_INC) +;4: #include "cg_lights.h" +;5:#endif +;6: +;7:static clightstyle_t cl_lightstyle[MAX_LIGHT_STYLES]; +;8:static int lastofs; +;9: +;10:/* +;11:================ +;12:FX_ClearLightStyles +;13:================ +;14:*/ +;15:void CG_ClearLightStyles (void) +;16:{ +line 19 +;17: int i; +;18: +;19: memset (cl_lightstyle, 0, sizeof(cl_lightstyle)); +ADDRGP4 cl_lightstyle +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 16896 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 20 +;20: lastofs = -1; +ADDRGP4 lastofs +CNSTI4 -1 +ASGNI4 +line 22 +;21: +;22: for(i=0;ilength) +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $132 +line 47 +;47: { +line 48 +;48: ls->value[0] = ls->value[1] = ls->value[2] = ls->value[3] = 255; +ADDRLP4 16 +CNSTU1 255 +ASGNU1 +ADDRLP4 0 +INDIRP4 +CNSTI4 7 +ADDP4 +ADDRLP4 16 +INDIRU1 +ASGNU1 +ADDRLP4 0 +INDIRP4 +CNSTI4 6 +ADDP4 +ADDRLP4 16 +INDIRU1 +ASGNU1 +ADDRLP4 0 +INDIRP4 +CNSTI4 5 +ADDP4 +ADDRLP4 16 +INDIRU1 +ASGNU1 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 16 +INDIRU1 +ASGNU1 +line 49 +;49: } +ADDRGP4 $133 +JUMPV +LABELV $132 +line 50 +;50: else if (ls->length == 1) +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +NEI4 $134 +line 51 +;51: { +line 52 +;52: ls->value[0] = ls->map[0][0]; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRU1 +ASGNU1 +line 53 +;53: ls->value[1] = ls->map[0][1]; +ADDRLP4 0 +INDIRP4 +CNSTI4 5 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 9 +ADDP4 +INDIRU1 +ASGNU1 +line 54 +;54: ls->value[2] = ls->map[0][2]; +ADDRLP4 0 +INDIRP4 +CNSTI4 6 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 10 +ADDP4 +INDIRU1 +ASGNU1 +line 55 +;55: ls->value[3] = 255; //ls->map[0][3]; +ADDRLP4 0 +INDIRP4 +CNSTI4 7 +ADDP4 +CNSTU1 255 +ASGNU1 +line 56 +;56: } +ADDRGP4 $135 +JUMPV +LABELV $134 +line 58 +;57: else +;58: { +line 59 +;59: ls->value[0] = ls->map[ofs%ls->length][0]; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +MODI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDP4 +INDIRU1 +ASGNU1 +line 60 +;60: ls->value[1] = ls->map[ofs%ls->length][1]; +ADDRLP4 0 +INDIRP4 +CNSTI4 5 +ADDP4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +MODI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDP4 +CNSTI4 1 +ADDP4 +INDIRU1 +ASGNU1 +line 61 +;61: ls->value[2] = ls->map[ofs%ls->length][2]; +ADDRLP4 24 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 6 +ADDP4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +MODI4 +ADDRLP4 24 +INDIRI4 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRU1 +ASGNU1 +line 62 +;62: ls->value[3] = 255; //ls->map[ofs%ls->length][3]; +ADDRLP4 0 +INDIRP4 +CNSTI4 7 +ADDP4 +CNSTU1 255 +ASGNU1 +line 63 +;63: } +LABELV $135 +LABELV $133 +line 64 +;64: trap_R_SetLightStyle(i, *(int*)ls->value); +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_R_SetLightStyle +CALLV +pop +line 65 +;65: } +LABELV $129 +line 44 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 264 +ADDP4 +ASGNP4 +LABELV $131 +ADDRLP4 4 +INDIRI4 +CNSTI4 64 +LTI4 $128 +line 66 +;66:} +LABELV $126 +endproc CG_RunLightStyles 28 8 +export CG_SetLightstyle +proc CG_SetLightstyle 44 12 +line 69 +;67: +;68:void CG_SetLightstyle (int i) +;69:{ +line 73 +;70: const char *s; +;71: int j, k; +;72: +;73: s = CG_ConfigString( i+CS_LIGHT_STYLES ); +ADDRFP4 0 +INDIRI4 +CNSTI4 832 +ADDI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 12 +INDIRP4 +ASGNP4 +line 74 +;74: j = strlen (s); +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 75 +;75: if (j >= MAX_QPATH) +ADDRLP4 4 +INDIRI4 +CNSTI4 64 +LTI4 $137 +line 76 +;76: { +line 77 +;77: Com_Error (ERR_DROP, "svc_lightstyle length=%i", j); +CNSTI4 1 +ARGI4 +ADDRGP4 $139 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 Com_Error +CALLV +pop +line 78 +;78: } +LABELV $137 +line 80 +;79: +;80: cl_lightstyle[(i/3)].length = j; +CNSTI4 264 +ADDRFP4 0 +INDIRI4 +CNSTI4 3 +DIVI4 +MULI4 +ADDRGP4 cl_lightstyle +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 81 +;81: for (k=0 ; kprev ) { +ADDRFP4 0 +INDIRP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $129 +line 41 +;41: CG_Error( "CG_FreeLocalEntity: not active" ); +ADDRGP4 $131 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 42 +;42: } +LABELV $129 +line 45 +;43: +;44: // remove from the doubly linked active list +;45: le->prev->next = le->next; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTI4 4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRP4 +ASGNP4 +line 46 +;46: le->next->prev = le->prev; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRP4 +ASGNP4 +line 49 +;47: +;48: // the free list is only singly linked +;49: le->next = cg_freeLocalEntities; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg_freeLocalEntities +INDIRP4 +ASGNP4 +line 50 +;50: cg_freeLocalEntities = le; +ADDRGP4 cg_freeLocalEntities +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 51 +;51:} +LABELV $128 +endproc CG_FreeLocalEntity 12 4 +export CG_AllocLocalEntity +proc CG_AllocLocalEntity 8 12 +line 60 +;52: +;53:/* +;54:=================== +;55:CG_AllocLocalEntity +;56: +;57:Will allways succeed, even if it requires freeing an old active entity +;58:=================== +;59:*/ +;60:localEntity_t *CG_AllocLocalEntity( void ) { +line 63 +;61: localEntity_t *le; +;62: +;63: if ( !cg_freeLocalEntities ) { +ADDRGP4 cg_freeLocalEntities +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $133 +line 66 +;64: // no free entities, so free the one at the end of the chain +;65: // remove the oldest active entity +;66: CG_FreeLocalEntity( cg_activeLocalEntities.prev ); +ADDRGP4 cg_activeLocalEntities +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeLocalEntity +CALLV +pop +line 67 +;67: } +LABELV $133 +line 69 +;68: +;69: le = cg_freeLocalEntities; +ADDRLP4 0 +ADDRGP4 cg_freeLocalEntities +INDIRP4 +ASGNP4 +line 70 +;70: cg_freeLocalEntities = cg_freeLocalEntities->next; +ADDRLP4 4 +ADDRGP4 cg_freeLocalEntities +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ASGNP4 +line 72 +;71: +;72: memset( le, 0, sizeof( *le ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 460 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 75 +;73: +;74: // link into the active list +;75: le->next = cg_activeLocalEntities.next; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg_activeLocalEntities+4 +INDIRP4 +ASGNP4 +line 76 +;76: le->prev = &cg_activeLocalEntities; +ADDRLP4 0 +INDIRP4 +ADDRGP4 cg_activeLocalEntities +ASGNP4 +line 77 +;77: cg_activeLocalEntities.next->prev = le; +ADDRGP4 cg_activeLocalEntities+4 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 78 +;78: cg_activeLocalEntities.next = le; +ADDRGP4 cg_activeLocalEntities+4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 79 +;79: return le; +ADDRLP4 0 +INDIRP4 +RETP4 +LABELV $132 +endproc CG_AllocLocalEntity 8 12 +export CG_BloodTrail +proc CG_BloodTrail 48 48 +line 101 +;80:} +;81: +;82: +;83:/* +;84:==================================================================================== +;85: +;86:FRAGMENT PROCESSING +;87: +;88:A fragment localentity interacts with the environment in some way (hitting walls), +;89:or generates more localentities along a trail. +;90: +;91:==================================================================================== +;92:*/ +;93: +;94:/* +;95:================ +;96:CG_BloodTrail +;97: +;98:Leave expanding blood puffs behind gibs +;99:================ +;100:*/ +;101:void CG_BloodTrail( localEntity_t *le ) { +line 108 +;102: int t; +;103: int t2; +;104: int step; +;105: vec3_t newOrigin; +;106: localEntity_t *blood; +;107: +;108: step = 150; +ADDRLP4 20 +CNSTI4 150 +ASGNI4 +line 109 +;109: t = step * ( (cg.time - cg.frametime + step ) / step ); +ADDRLP4 0 +ADDRLP4 20 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+60 +INDIRI4 +SUBI4 +ADDRLP4 20 +INDIRI4 +ADDI4 +ADDRLP4 20 +INDIRI4 +DIVI4 +MULI4 +ASGNI4 +line 110 +;110: t2 = step * ( cg.time / step ); +ADDRLP4 24 +ADDRLP4 20 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 20 +INDIRI4 +DIVI4 +MULI4 +ASGNI4 +line 112 +;111: +;112: for ( ; t <= t2; t += step ) { +ADDRGP4 $145 +JUMPV +LABELV $142 +line 113 +;113: BG_EvaluateTrajectory( &le->pos, t, newOrigin ); +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 8 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 115 +;114: +;115: blood = CG_SmokePuff( newOrigin, vec3_origin, +ADDRLP4 8 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTF4 1101004800 +ARGF4 +ADDRLP4 36 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 36 +INDIRF4 +ARGF4 +ADDRLP4 36 +INDIRF4 +ARGF4 +ADDRLP4 36 +INDIRF4 +ARGF4 +ADDRLP4 36 +INDIRF4 +ARGF4 +CNSTF4 1157234688 +ARGF4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 40 +CNSTI4 0 +ASGNI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRGP4 cgs+70296+260 +INDIRI4 +ARGI4 +ADDRLP4 44 +ADDRGP4 CG_SmokePuff +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 44 +INDIRP4 +ASGNP4 +line 124 +;116: 20, // radius +;117: 1, 1, 1, 1, // color +;118: 2000, // trailTime +;119: t, // startTime +;120: 0, // fadeInTime +;121: 0, // flags +;122: cgs.media.bloodTrailShader ); +;123: // use the optimized version +;124: blood->leType = LE_FALL_SCALE_FADE; +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 7 +ASGNI4 +line 126 +;125: // drop a total of 40 units over its lifetime +;126: blood->pos.trDelta[2] = 40; +ADDRLP4 4 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 127 +;127: } +LABELV $143 +line 112 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 20 +INDIRI4 +ADDI4 +ASGNI4 +LABELV $145 +ADDRLP4 0 +INDIRI4 +ADDRLP4 24 +INDIRI4 +LEI4 $142 +line 128 +;128:} +LABELV $138 +endproc CG_BloodTrail 48 48 +export CG_FragmentBounceMark +proc CG_FragmentBounceMark 20 44 +line 136 +;129: +;130: +;131:/* +;132:================ +;133:CG_FragmentBounceMark +;134:================ +;135:*/ +;136:void CG_FragmentBounceMark( localEntity_t *le, trace_t *trace ) { +line 139 +;137: int radius; +;138: +;139: if ( le->leMarkType == LEMT_BLOOD ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $149 +line 141 +;140: +;141: radius = 16 + (rand()&31); +ADDRLP4 4 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +CNSTI4 31 +BANDI4 +CNSTI4 16 +ADDI4 +ASGNI4 +line 142 +;142: CG_ImpactMark( cgs.media.bloodMarkShader, trace->endpos, trace->plane.normal, random()*360, +ADDRLP4 8 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+416 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +CNSTF4 1135869952 +ADDRLP4 8 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ARGF4 +ADDRLP4 16 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRF4 +ARGF4 +CNSTI4 1 +ARGI4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_ImpactMark +CALLV +pop +line 144 +;143: 1,1,1,1, qtrue, radius, qfalse ); +;144: } else if ( le->leMarkType == LEMT_BURN ) { +ADDRGP4 $150 +JUMPV +LABELV $149 +ADDRFP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $153 +line 146 +;145: +;146: radius = 8 + (rand()&15); +ADDRLP4 4 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +CNSTI4 15 +BANDI4 +CNSTI4 8 +ADDI4 +ASGNI4 +line 147 +;147: CG_ImpactMark( cgs.media.burnMarkShader, trace->endpos, trace->plane.normal, random()*360, +ADDRLP4 8 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+424 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +CNSTF4 1135869952 +ADDRLP4 8 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ARGF4 +ADDRLP4 16 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRF4 +ARGF4 +CNSTI4 1 +ARGI4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_ImpactMark +CALLV +pop +line 149 +;148: 1,1,1,1, qtrue, radius, qfalse ); +;149: } +LABELV $153 +LABELV $150 +line 154 +;150: +;151: +;152: // don't allow a fragment to make multiple marks, or they +;153: // pile up while settling +;154: le->leMarkType = LEMT_NONE; +ADDRFP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +CNSTI4 0 +ASGNI4 +line 155 +;155:} +LABELV $148 +endproc CG_FragmentBounceMark 20 44 +export CG_FragmentBounceSound +proc CG_FragmentBounceSound 0 0 +line 162 +;156: +;157:/* +;158:================ +;159:CG_FragmentBounceSound +;160:================ +;161:*/ +;162:void CG_FragmentBounceSound( localEntity_t *le, trace_t *trace ) { +line 163 +;163: if ( le->leBounceSoundType == LEBS_BLOOD ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $158 +line 181 +;164: // half the gibs will make splat sounds +;165: /* +;166: if ( rand() & 1 ) { +;167: int r = rand()&3; +;168: sfxHandle_t s; +;169: +;170: if ( r == 0 ) { +;171: s = cgs.media.gibBounce1Sound; +;172: } else if ( r == 1 ) { +;173: s = cgs.media.gibBounce2Sound; +;174: } else { +;175: s = cgs.media.gibBounce3Sound; +;176: } +;177: trap_S_StartSound( trace->endpos, ENTITYNUM_WORLD, CHAN_AUTO, s ); +;178: +;179: } +;180: */ +;181: } else if ( le->leBounceSoundType == LEBS_BRASS ) { +ADDRGP4 $159 +JUMPV +LABELV $158 +ADDRFP4 0 +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $160 +line 183 +;182: +;183: } +LABELV $160 +LABELV $159 +line 187 +;184: +;185: // don't allow a fragment to make multiple bounce sounds, +;186: // or it gets too noisy as they settle +;187: le->leBounceSoundType = LEBS_NONE; +ADDRFP4 0 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 0 +ASGNI4 +line 188 +;188:} +LABELV $157 +endproc CG_FragmentBounceSound 0 0 +export CG_ReflectVelocity +proc CG_ReflectVelocity 56 12 +line 196 +;189: +;190: +;191:/* +;192:================ +;193:CG_ReflectVelocity +;194:================ +;195:*/ +;196:void CG_ReflectVelocity( localEntity_t *le, trace_t *trace ) { +line 202 +;197: vec3_t velocity; +;198: float dot; +;199: int hitTime; +;200: +;201: // reflect the velocity on the trace plane +;202: hitTime = cg.time - cg.frametime + cg.frametime * trace->fraction; +ADDRLP4 16 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+60 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRGP4 cg+60 +INDIRI4 +CVIF4 4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 203 +;203: BG_EvaluateTrajectoryDelta( &le->pos, hitTime, velocity ); +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRGP4 BG_EvaluateTrajectoryDelta +CALLV +pop +line 204 +;204: dot = DotProduct( velocity, trace->plane.normal ); +ADDRLP4 20 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 0 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 205 +;205: VectorMA( velocity, -2*dot, trace->plane.normal, le->pos.trDelta ); +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDRLP4 0 +INDIRF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +CNSTF4 3221225472 +ADDRLP4 12 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRLP4 0+4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 3221225472 +ADDRLP4 12 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +ADDRLP4 0+8 +INDIRF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +CNSTF4 3221225472 +ADDRLP4 12 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 207 +;206: +;207: VectorScale( le->pos.trDelta, le->bounceFactor, le->pos.trDelta ); +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 24 +INDIRP4 +CNSTI4 56 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +ADDRLP4 32 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +ADDRLP4 32 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +ADDRLP4 40 +INDIRP4 +CNSTI4 64 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 209 +;208: +;209: VectorCopy( trace->endpos, le->pos.trBase ); +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRB +ASGNB 12 +line 210 +;210: le->pos.trTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 213 +;211: +;212: // check for stop, making sure that even on low FPS systems it doesn't bobble +;213: if ( trace->allsolid || +ADDRLP4 48 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $175 +ADDRLP4 48 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +CNSTF4 0 +LEF4 $171 +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 52 +INDIRF4 +CNSTF4 1109393408 +LTF4 $175 +ADDRLP4 52 +INDIRF4 +ADDRGP4 cg+60 +INDIRI4 +NEGI4 +CVIF4 4 +ADDRLP4 52 +INDIRF4 +MULF4 +GEF4 $171 +LABELV $175 +line 215 +;214: ( trace->plane.normal[2] > 0 && +;215: ( le->pos.trDelta[2] < 40 || le->pos.trDelta[2] < -cg.frametime * le->pos.trDelta[2] ) ) ) { +line 216 +;216: le->pos.trType = TR_STATIONARY; +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTI4 0 +ASGNI4 +line 217 +;217: } else { +LABELV $171 +line 219 +;218: +;219: } +LABELV $172 +line 220 +;220:} +LABELV $162 +endproc CG_ReflectVelocity 56 12 +export CG_AddFragment +proc CG_AddFragment 1120 28 +line 227 +;221: +;222:/* +;223:================ +;224:CG_AddFragment +;225:================ +;226:*/ +;227:void CG_AddFragment( localEntity_t *le ) { +line 231 +;228: vec3_t newOrigin; +;229: trace_t trace; +;230: +;231: if (le->forceAlpha) +ADDRFP4 0 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $177 +line 232 +;232: { +line 233 +;233: le->refEntity.renderfx |= RF_FORCE_ENT_ALPHA; +ADDRLP4 1092 +ADDRFP4 0 +INDIRP4 +CNSTI4 252 +ADDP4 +ASGNP4 +ADDRLP4 1092 +INDIRP4 +ADDRLP4 1092 +INDIRP4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 234 +;234: le->refEntity.shaderRGBA[3] = le->forceAlpha; +ADDRLP4 1096 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 331 +ADDP4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 235 +;235: } +LABELV $177 +line 237 +;236: +;237: if ( le->pos.trType == TR_STATIONARY ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $179 +line 242 +;238: // sink into the ground if near the removal time +;239: int t; +;240: float t_e; +;241: +;242: t = le->endTime - cg.time; +ADDRLP4 1096 +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +ASGNI4 +line 243 +;243: if ( t < (SINK_TIME*2) ) { +ADDRLP4 1096 +INDIRI4 +CNSTI4 2000 +GEI4 $182 +line 244 +;244: le->refEntity.renderfx |= RF_FORCE_ENT_ALPHA; +ADDRLP4 1100 +ADDRFP4 0 +INDIRP4 +CNSTI4 252 +ADDP4 +ASGNP4 +ADDRLP4 1100 +INDIRP4 +ADDRLP4 1100 +INDIRP4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 245 +;245: t_e = (float)((float)(le->endTime - cg.time)/(SINK_TIME*2)); +ADDRLP4 1092 +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIF4 4 +CNSTF4 1157234688 +DIVF4 +ASGNF4 +line 246 +;246: t_e = (int)((t_e)*255); +ADDRLP4 1092 +CNSTF4 1132396544 +ADDRLP4 1092 +INDIRF4 +MULF4 +CVFI4 4 +CVIF4 4 +ASGNF4 +line 248 +;247: +;248: if (t_e > 255) +ADDRLP4 1092 +INDIRF4 +CNSTF4 1132396544 +LEF4 $185 +line 249 +;249: { +line 250 +;250: t_e = 255; +ADDRLP4 1092 +CNSTF4 1132396544 +ASGNF4 +line 251 +;251: } +LABELV $185 +line 252 +;252: if (t_e < 1) +ADDRLP4 1092 +INDIRF4 +CNSTF4 1065353216 +GEF4 $187 +line 253 +;253: { +line 254 +;254: t_e = 1; +ADDRLP4 1092 +CNSTF4 1065353216 +ASGNF4 +line 255 +;255: } +LABELV $187 +line 257 +;256: +;257: if (le->refEntity.shaderRGBA[3] && t_e > le->refEntity.shaderRGBA[3]) +ADDRLP4 1104 +ADDRFP4 0 +INDIRP4 +CNSTI4 331 +ADDP4 +INDIRU1 +CVUI4 1 +ASGNI4 +ADDRLP4 1104 +INDIRI4 +CNSTI4 0 +EQI4 $189 +ADDRLP4 1092 +INDIRF4 +ADDRLP4 1104 +INDIRI4 +CVIF4 4 +LEF4 $189 +line 258 +;258: { +line 259 +;259: t_e = le->refEntity.shaderRGBA[3]; +ADDRLP4 1092 +ADDRFP4 0 +INDIRP4 +CNSTI4 331 +ADDP4 +INDIRU1 +CVUI4 1 +CVIF4 4 +ASGNF4 +line 260 +;260: } +LABELV $189 +line 262 +;261: +;262: le->refEntity.shaderRGBA[3] = t_e; +ADDRLP4 1112 +ADDRLP4 1092 +INDIRF4 +ASGNF4 +ADDRLP4 1116 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1112 +INDIRF4 +ADDRLP4 1116 +INDIRF4 +LTF4 $192 +ADDRLP4 1108 +ADDRLP4 1112 +INDIRF4 +ADDRLP4 1116 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $193 +JUMPV +LABELV $192 +ADDRLP4 1108 +ADDRLP4 1112 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $193 +ADDRFP4 0 +INDIRP4 +CNSTI4 331 +ADDP4 +ADDRLP4 1108 +INDIRU4 +CVUU1 4 +ASGNU1 +line 264 +;263: +;264: trap_R_AddRefEntityToScene( &le->refEntity ); +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 265 +;265: } else { +ADDRGP4 $176 +JUMPV +LABELV $182 +line 266 +;266: trap_R_AddRefEntityToScene( &le->refEntity ); +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 267 +;267: } +line 269 +;268: +;269: return; +ADDRGP4 $176 +JUMPV +LABELV $179 +line 273 +;270: } +;271: +;272: // calculate new position +;273: BG_EvaluateTrajectory( &le->pos, cg.time, newOrigin ); +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 1080 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 276 +;274: +;275: // trace a line from previous position to new position +;276: CG_Trace( &trace, le->refEntity.origin, NULL, NULL, newOrigin, -1, CONTENTS_SOLID ); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 300 +ADDP4 +ARGP4 +ADDRLP4 1092 +CNSTP4 0 +ASGNP4 +ADDRLP4 1092 +INDIRP4 +ARGP4 +ADDRLP4 1092 +INDIRP4 +ARGP4 +ADDRLP4 1080 +ARGP4 +CNSTI4 -1 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 277 +;277: if ( trace.fraction == 1.0 ) { +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1065353216 +NEF4 $195 +line 279 +;278: // still in free fall +;279: VectorCopy( newOrigin, le->refEntity.origin ); +ADDRFP4 0 +INDIRP4 +CNSTI4 300 +ADDP4 +ADDRLP4 1080 +INDIRB +ASGNB 12 +line 281 +;280: +;281: if ( le->leFlags & LEF_TUMBLE ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $198 +line 284 +;282: vec3_t angles; +;283: +;284: BG_EvaluateTrajectory( &le->angles, cg.time, angles ); +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 1096 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 285 +;285: AnglesToAxis( angles, le->refEntity.axis ); +ADDRLP4 1096 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 286 +;286: } +LABELV $198 +line 288 +;287: +;288: trap_R_AddRefEntityToScene( &le->refEntity ); +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 291 +;289: +;290: // add a blood trail +;291: if ( le->leBounceSoundType == LEBS_BLOOD ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $176 +line 292 +;292: CG_BloodTrail( le ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_BloodTrail +CALLV +pop +line 293 +;293: } +line 295 +;294: +;295: return; +ADDRGP4 $176 +JUMPV +LABELV $195 +line 301 +;296: } +;297: +;298: // if it is in a nodrop zone, remove it +;299: // this keeps gibs from waiting at the bottom of pits of death +;300: // and floating levels +;301: if ( trap_CM_PointContents( trace.endpos, 0 ) & CONTENTS_NODROP ) { +ADDRLP4 0+12 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1096 +ADDRGP4 trap_CM_PointContents +CALLI4 +ASGNI4 +ADDRLP4 1096 +INDIRI4 +CNSTI4 2048 +BANDI4 +CNSTI4 0 +EQI4 $203 +line 302 +;302: CG_FreeLocalEntity( le ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeLocalEntity +CALLV +pop +line 303 +;303: return; +ADDRGP4 $176 +JUMPV +LABELV $203 +line 306 +;304: } +;305: +;306: if (!trace.startsolid) +ADDRLP4 0+4 +INDIRI4 +CNSTI4 0 +NEI4 $206 +line 307 +;307: { +line 309 +;308: // leave a mark +;309: CG_FragmentBounceMark( le, &trace ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_FragmentBounceMark +CALLV +pop +line 312 +;310: +;311: // do a bouncy sound +;312: CG_FragmentBounceSound( le, &trace ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_FragmentBounceSound +CALLV +pop +line 314 +;313: +;314: if (le->bounceSound) +ADDRFP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $209 +line 315 +;315: { //specified bounce sound (debris) +line 316 +;316: trap_S_StartSound(le->pos.trBase, ENTITYNUM_WORLD, CHAN_AUTO, le->bounceSound); +ADDRLP4 1100 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1100 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +CNSTI4 1022 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 1100 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 317 +;317: } +LABELV $209 +line 320 +;318: +;319: // reflect the velocity on the trace plane +;320: CG_ReflectVelocity( le, &trace ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_ReflectVelocity +CALLV +pop +line 322 +;321: +;322: trap_R_AddRefEntityToScene( &le->refEntity ); +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 323 +;323: } +LABELV $206 +line 324 +;324:} +LABELV $176 +endproc CG_AddFragment 1120 28 +export CG_AddFadeRGB +proc CG_AddFadeRGB 60 4 +line 340 +;325: +;326:/* +;327:===================================================================== +;328: +;329:TRIVIAL LOCAL ENTITIES +;330: +;331:These only do simple scaling or modulation before passing to the renderer +;332:===================================================================== +;333:*/ +;334: +;335:/* +;336:==================== +;337:CG_AddFadeRGB +;338:==================== +;339:*/ +;340:void CG_AddFadeRGB( localEntity_t *le ) { +line 344 +;341: refEntity_t *re; +;342: float c; +;343: +;344: re = &le->refEntity; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 346 +;345: +;346: c = ( le->endTime - cg.time ) * le->lifeRate; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 8 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 347 +;347: c *= 0xff; +ADDRLP4 4 +CNSTF4 1132396544 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 349 +;348: +;349: re->shaderRGBA[0] = le->color[0] * c; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 20 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 20 +INDIRF4 +LTF4 $214 +ADDRLP4 12 +ADDRLP4 16 +INDIRF4 +ADDRLP4 20 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $215 +JUMPV +LABELV $214 +ADDRLP4 12 +ADDRLP4 16 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $215 +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRLP4 12 +INDIRU4 +CVUU1 4 +ASGNU1 +line 350 +;350: re->shaderRGBA[1] = le->color[1] * c; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 32 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 32 +INDIRF4 +LTF4 $217 +ADDRLP4 24 +ADDRLP4 28 +INDIRF4 +ADDRLP4 32 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $218 +JUMPV +LABELV $217 +ADDRLP4 24 +ADDRLP4 28 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $218 +ADDRLP4 0 +INDIRP4 +CNSTI4 81 +ADDP4 +ADDRLP4 24 +INDIRU4 +CVUU1 4 +ASGNU1 +line 351 +;351: re->shaderRGBA[2] = le->color[2] * c; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 44 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 40 +INDIRF4 +ADDRLP4 44 +INDIRF4 +LTF4 $220 +ADDRLP4 36 +ADDRLP4 40 +INDIRF4 +ADDRLP4 44 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $221 +JUMPV +LABELV $220 +ADDRLP4 36 +ADDRLP4 40 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $221 +ADDRLP4 0 +INDIRP4 +CNSTI4 82 +ADDP4 +ADDRLP4 36 +INDIRU4 +CVUU1 4 +ASGNU1 +line 352 +;352: re->shaderRGBA[3] = le->color[3] * c; +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 56 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 52 +INDIRF4 +ADDRLP4 56 +INDIRF4 +LTF4 $223 +ADDRLP4 48 +ADDRLP4 52 +INDIRF4 +ADDRLP4 56 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $224 +JUMPV +LABELV $223 +ADDRLP4 48 +ADDRLP4 52 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $224 +ADDRLP4 0 +INDIRP4 +CNSTI4 83 +ADDP4 +ADDRLP4 48 +INDIRU4 +CVUU1 4 +ASGNU1 +line 354 +;353: +;354: trap_R_AddRefEntityToScene( re ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 355 +;355:} +LABELV $211 +endproc CG_AddFadeRGB 60 4 +proc CG_AddFadeScaleModel 104 8 +line 358 +;356: +;357:static void CG_AddFadeScaleModel( localEntity_t *le ) +;358:{ +line 359 +;359: refEntity_t *ent = &le->refEntity; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 361 +;360: +;361: float frac = ( cg.time - le->startTime )/((float)( le->endTime - le->startTime )); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 12 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 363 +;362: +;363: frac *= frac * frac; // yes, this is completely ridiculous...but it causes the shell to grow slowly then "explode" at the end +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +line 365 +;364: +;365: ent->nonNormalizedAxes = qtrue; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 1 +ASGNI4 +line 367 +;366: +;367: AxisCopy( axisDefault, ent->axis ); +ADDRGP4 axisDefault +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRGP4 AxisCopy +CALLV +pop +line 369 +;368: +;369: VectorScale( ent->axis[0], le->radius * frac, ent->axis[0] ); +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 24 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 28 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +line 370 +;370: VectorScale( ent->axis[1], le->radius * frac, ent->axis[1] ); +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 36 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 40 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +line 371 +;371: VectorScale( ent->axis[2], le->radius * 0.5f * frac, ent->axis[2] ); +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +CNSTF4 1056964608 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRF4 +CNSTF4 1056964608 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 52 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +CNSTF4 1056964608 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +line 373 +;372: +;373: frac = 1.0f - frac; +ADDRLP4 4 +CNSTF4 1065353216 +ADDRLP4 4 +INDIRF4 +SUBF4 +ASGNF4 +line 375 +;374: +;375: ent->shaderRGBA[0] = le->color[0] * frac; +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 64 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ADDRLP4 64 +INDIRF4 +LTF4 $228 +ADDRLP4 56 +ADDRLP4 60 +INDIRF4 +ADDRLP4 64 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $229 +JUMPV +LABELV $228 +ADDRLP4 56 +ADDRLP4 60 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $229 +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRLP4 56 +INDIRU4 +CVUU1 4 +ASGNU1 +line 376 +;376: ent->shaderRGBA[1] = le->color[1] * frac; +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 76 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 72 +INDIRF4 +ADDRLP4 76 +INDIRF4 +LTF4 $231 +ADDRLP4 68 +ADDRLP4 72 +INDIRF4 +ADDRLP4 76 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $232 +JUMPV +LABELV $231 +ADDRLP4 68 +ADDRLP4 72 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $232 +ADDRLP4 0 +INDIRP4 +CNSTI4 81 +ADDP4 +ADDRLP4 68 +INDIRU4 +CVUU1 4 +ASGNU1 +line 377 +;377: ent->shaderRGBA[2] = le->color[2] * frac; +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 88 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 84 +INDIRF4 +ADDRLP4 88 +INDIRF4 +LTF4 $234 +ADDRLP4 80 +ADDRLP4 84 +INDIRF4 +ADDRLP4 88 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $235 +JUMPV +LABELV $234 +ADDRLP4 80 +ADDRLP4 84 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $235 +ADDRLP4 0 +INDIRP4 +CNSTI4 82 +ADDP4 +ADDRLP4 80 +INDIRU4 +CVUU1 4 +ASGNU1 +line 378 +;378: ent->shaderRGBA[3] = le->color[3] * frac; +ADDRLP4 96 +ADDRFP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 100 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 96 +INDIRF4 +ADDRLP4 100 +INDIRF4 +LTF4 $237 +ADDRLP4 92 +ADDRLP4 96 +INDIRF4 +ADDRLP4 100 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $238 +JUMPV +LABELV $237 +ADDRLP4 92 +ADDRLP4 96 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $238 +ADDRLP4 0 +INDIRP4 +CNSTI4 83 +ADDP4 +ADDRLP4 92 +INDIRU4 +CVUU1 4 +ASGNU1 +line 381 +;379: +;380: // add the entity +;381: trap_R_AddRefEntityToScene( ent ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 382 +;382:} +LABELV $225 +endproc CG_AddFadeScaleModel 104 8 +proc CG_AddMoveScaleFade 52 12 +line 389 +;383: +;384:/* +;385:================== +;386:CG_AddMoveScaleFade +;387:================== +;388:*/ +;389:static void CG_AddMoveScaleFade( localEntity_t *le ) { +line 395 +;390: refEntity_t *re; +;391: float c; +;392: vec3_t delta; +;393: float len; +;394: +;395: re = &le->refEntity; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 397 +;396: +;397: if ( le->fadeInTime > le->startTime && cg.time < le->fadeInTime ) { +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 24 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 24 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +LEI4 $240 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 28 +INDIRI4 +GEI4 $240 +line 399 +;398: // fade / grow time +;399: c = 1.0 - (float) ( le->fadeInTime - cg.time ) / ( le->fadeInTime - le->startTime ); +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +ADDRLP4 32 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 16 +CNSTF4 1065353216 +ADDRLP4 36 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +SUBF4 +ASGNF4 +line 400 +;400: } +ADDRGP4 $241 +JUMPV +LABELV $240 +line 401 +;401: else { +line 403 +;402: // fade / grow time +;403: c = ( le->endTime - cg.time ) * le->lifeRate; +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 32 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 32 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 404 +;404: } +LABELV $241 +line 406 +;405: +;406: re->shaderRGBA[3] = 0xff * c * le->color[3]; +ADDRLP4 36 +CNSTF4 1132396544 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 40 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 36 +INDIRF4 +ADDRLP4 40 +INDIRF4 +LTF4 $246 +ADDRLP4 32 +ADDRLP4 36 +INDIRF4 +ADDRLP4 40 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $247 +JUMPV +LABELV $246 +ADDRLP4 32 +ADDRLP4 36 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $247 +ADDRLP4 0 +INDIRP4 +CNSTI4 83 +ADDP4 +ADDRLP4 32 +INDIRU4 +CVUU1 4 +ASGNU1 +line 408 +;407: +;408: if ( !( le->leFlags & LEF_PUFF_DONT_SCALE ) ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $248 +line 409 +;409: re->radius = le->radius * ( 1.0 - c ) + 8; +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRLP4 16 +INDIRF4 +SUBF4 +MULF4 +CNSTF4 1090519040 +ADDF4 +ASGNF4 +line 410 +;410: } +LABELV $248 +line 412 +;411: +;412: BG_EvaluateTrajectory( &le->pos, cg.time, re->origin ); +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 416 +;413: +;414: // if the view would be "inside" the sprite, kill the sprite +;415: // so it doesn't add too much overdraw +;416: VectorSubtract( re->origin, cg.refdef.vieworg, delta ); +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 4+4 +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 4+8 +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+8 +INDIRF4 +SUBF4 +ASGNF4 +line 417 +;417: len = VectorLength( delta ); +ADDRLP4 4 +ARGP4 +ADDRLP4 48 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 48 +INDIRF4 +ASGNF4 +line 418 +;418: if ( len < le->radius ) { +ADDRLP4 20 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +GEF4 $261 +line 419 +;419: CG_FreeLocalEntity( le ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeLocalEntity +CALLV +pop +line 420 +;420: return; +ADDRGP4 $239 +JUMPV +LABELV $261 +line 423 +;421: } +;422: +;423: trap_R_AddRefEntityToScene( re ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 424 +;424:} +LABELV $239 +endproc CG_AddMoveScaleFade 52 12 +proc CG_AddPuff 76 12 +line 431 +;425: +;426:/* +;427:================== +;428:CG_AddPuff +;429:================== +;430:*/ +;431:static void CG_AddPuff( localEntity_t *le ) { +line 437 +;432: refEntity_t *re; +;433: float c; +;434: vec3_t delta; +;435: float len; +;436: +;437: re = &le->refEntity; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 440 +;438: +;439: // fade / grow time +;440: c = ( le->endTime - cg.time ) / (float)( le->endTime - le->startTime ); +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 24 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 28 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 24 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 442 +;441: +;442: re->shaderRGBA[0] = le->color[0] * c; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 40 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 36 +INDIRF4 +ADDRLP4 40 +INDIRF4 +LTF4 $266 +ADDRLP4 32 +ADDRLP4 36 +INDIRF4 +ADDRLP4 40 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $267 +JUMPV +LABELV $266 +ADDRLP4 32 +ADDRLP4 36 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $267 +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRLP4 32 +INDIRU4 +CVUU1 4 +ASGNU1 +line 443 +;443: re->shaderRGBA[1] = le->color[1] * c; +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 52 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 48 +INDIRF4 +ADDRLP4 52 +INDIRF4 +LTF4 $269 +ADDRLP4 44 +ADDRLP4 48 +INDIRF4 +ADDRLP4 52 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $270 +JUMPV +LABELV $269 +ADDRLP4 44 +ADDRLP4 48 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $270 +ADDRLP4 0 +INDIRP4 +CNSTI4 81 +ADDP4 +ADDRLP4 44 +INDIRU4 +CVUU1 4 +ASGNU1 +line 444 +;444: re->shaderRGBA[2] = le->color[2] * c; +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 64 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ADDRLP4 64 +INDIRF4 +LTF4 $272 +ADDRLP4 56 +ADDRLP4 60 +INDIRF4 +ADDRLP4 64 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $273 +JUMPV +LABELV $272 +ADDRLP4 56 +ADDRLP4 60 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $273 +ADDRLP4 0 +INDIRP4 +CNSTI4 82 +ADDP4 +ADDRLP4 56 +INDIRU4 +CVUU1 4 +ASGNU1 +line 446 +;445: +;446: if ( !( le->leFlags & LEF_PUFF_DONT_SCALE ) ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $274 +line 447 +;447: re->radius = le->radius * ( 1.0 - c ) + 8; +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRLP4 4 +INDIRF4 +SUBF4 +MULF4 +CNSTF4 1090519040 +ADDF4 +ASGNF4 +line 448 +;448: } +LABELV $274 +line 450 +;449: +;450: BG_EvaluateTrajectory( &le->pos, cg.time, re->origin ); +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 454 +;451: +;452: // if the view would be "inside" the sprite, kill the sprite +;453: // so it doesn't add too much overdraw +;454: VectorSubtract( re->origin, cg.refdef.vieworg, delta ); +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 8+4 +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 8+8 +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+8 +INDIRF4 +SUBF4 +ASGNF4 +line 455 +;455: len = VectorLength( delta ); +ADDRLP4 8 +ARGP4 +ADDRLP4 72 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 72 +INDIRF4 +ASGNF4 +line 456 +;456: if ( len < le->radius ) { +ADDRLP4 20 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +GEF4 $287 +line 457 +;457: CG_FreeLocalEntity( le ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeLocalEntity +CALLV +pop +line 458 +;458: return; +ADDRGP4 $263 +JUMPV +LABELV $287 +line 461 +;459: } +;460: +;461: trap_R_AddRefEntityToScene( re ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 462 +;462:} +LABELV $263 +endproc CG_AddPuff 76 12 +proc CG_AddScaleFade 48 4 +line 473 +;463: +;464:/* +;465:=================== +;466:CG_AddScaleFade +;467: +;468:For rocket smokes that hang in place, fade out, and are +;469:removed if the view passes through them. +;470:There are often many of these, so it needs to be simple. +;471:=================== +;472:*/ +;473:static void CG_AddScaleFade( localEntity_t *le ) { +line 479 +;474: refEntity_t *re; +;475: float c; +;476: vec3_t delta; +;477: float len; +;478: +;479: re = &le->refEntity; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 482 +;480: +;481: // fade / grow time +;482: c = ( le->endTime - cg.time ) * le->lifeRate; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 24 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 24 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 484 +;483: +;484: re->shaderRGBA[3] = 0xff * c * le->color[3]; +ADDRLP4 32 +CNSTF4 1132396544 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 36 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LTF4 $292 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $293 +JUMPV +LABELV $292 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $293 +ADDRLP4 0 +INDIRP4 +CNSTI4 83 +ADDP4 +ADDRLP4 28 +INDIRU4 +CVUU1 4 +ASGNU1 +line 485 +;485: re->radius = le->radius * ( 1.0 - c ) + 8; +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRLP4 16 +INDIRF4 +SUBF4 +MULF4 +CNSTF4 1090519040 +ADDF4 +ASGNF4 +line 489 +;486: +;487: // if the view would be "inside" the sprite, kill the sprite +;488: // so it doesn't add too much overdraw +;489: VectorSubtract( re->origin, cg.refdef.vieworg, delta ); +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 4+4 +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 4+8 +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+8 +INDIRF4 +SUBF4 +ASGNF4 +line 490 +;490: len = VectorLength( delta ); +ADDRLP4 4 +ARGP4 +ADDRLP4 44 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 44 +INDIRF4 +ASGNF4 +line 491 +;491: if ( len < le->radius ) { +ADDRLP4 20 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +GEF4 $304 +line 492 +;492: CG_FreeLocalEntity( le ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeLocalEntity +CALLV +pop +line 493 +;493: return; +ADDRGP4 $289 +JUMPV +LABELV $304 +line 496 +;494: } +;495: +;496: trap_R_AddRefEntityToScene( re ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 497 +;497:} +LABELV $289 +endproc CG_AddScaleFade 48 4 +proc CG_AddFallScaleFade 52 4 +line 510 +;498: +;499: +;500:/* +;501:================= +;502:CG_AddFallScaleFade +;503: +;504:This is just an optimized CG_AddMoveScaleFade +;505:For blood mists that drift down, fade out, and are +;506:removed if the view passes through them. +;507:There are often 100+ of these, so it needs to be simple. +;508:================= +;509:*/ +;510:static void CG_AddFallScaleFade( localEntity_t *le ) { +line 516 +;511: refEntity_t *re; +;512: float c; +;513: vec3_t delta; +;514: float len; +;515: +;516: re = &le->refEntity; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 519 +;517: +;518: // fade time +;519: c = ( le->endTime - cg.time ) * le->lifeRate; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 24 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 24 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 521 +;520: +;521: re->shaderRGBA[3] = 0xff * c * le->color[3]; +ADDRLP4 32 +CNSTF4 1132396544 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 36 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LTF4 $309 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $310 +JUMPV +LABELV $309 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $310 +ADDRLP4 0 +INDIRP4 +CNSTI4 83 +ADDP4 +ADDRLP4 28 +INDIRU4 +CVUU1 4 +ASGNU1 +line 523 +;522: +;523: re->origin[2] = le->pos.trBase[2] - ( 1.0 - c ) * le->pos.trDelta[2]; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRLP4 4 +INDIRF4 +SUBF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 525 +;524: +;525: re->radius = le->radius * ( 1.0 - c ) + 16; +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDRLP4 4 +INDIRF4 +SUBF4 +MULF4 +CNSTF4 1098907648 +ADDF4 +ASGNF4 +line 529 +;526: +;527: // if the view would be "inside" the sprite, kill the sprite +;528: // so it doesn't add too much overdraw +;529: VectorSubtract( re->origin, cg.refdef.vieworg, delta ); +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 8+4 +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 8+8 +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+8 +INDIRF4 +SUBF4 +ASGNF4 +line 530 +;530: len = VectorLength( delta ); +ADDRLP4 8 +ARGP4 +ADDRLP4 48 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 48 +INDIRF4 +ASGNF4 +line 531 +;531: if ( len < le->radius ) { +ADDRLP4 20 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +GEF4 $321 +line 532 +;532: CG_FreeLocalEntity( le ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeLocalEntity +CALLV +pop +line 533 +;533: return; +ADDRGP4 $306 +JUMPV +LABELV $321 +line 536 +;534: } +;535: +;536: trap_R_AddRefEntityToScene( re ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 537 +;537:} +LABELV $306 +endproc CG_AddFallScaleFade 52 4 +proc CG_AddExplosion 20 20 +line 546 +;538: +;539: +;540: +;541:/* +;542:================ +;543:CG_AddExplosion +;544:================ +;545:*/ +;546:static void CG_AddExplosion( localEntity_t *ex ) { +line 549 +;547: refEntity_t *ent; +;548: +;549: ent = &ex->refEntity; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 552 +;550: +;551: // add the entity +;552: trap_R_AddRefEntityToScene(ent); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 555 +;553: +;554: // add the dlight +;555: if ( ex->light ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $324 +line 558 +;556: float light; +;557: +;558: light = (float)( cg.time - ex->startTime ) / ( ex->endTime - ex->startTime ); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 12 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 559 +;559: if ( light < 0.5 ) { +ADDRLP4 4 +INDIRF4 +CNSTF4 1056964608 +GEF4 $327 +line 560 +;560: light = 1.0; +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +line 561 +;561: } else { +ADDRGP4 $328 +JUMPV +LABELV $327 +line 562 +;562: light = 1.0 - ( light - 0.5 ) * 2; +ADDRLP4 4 +CNSTF4 1065353216 +CNSTF4 1073741824 +ADDRLP4 4 +INDIRF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +SUBF4 +ASGNF4 +line 563 +;563: } +LABELV $328 +line 564 +;564: light = ex->light * light; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 565 +;565: trap_R_AddLightToScene(ent->origin, light, ex->lightColor[0], ex->lightColor[1], ex->lightColor[2] ); +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ARGP4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 trap_R_AddLightToScene +CALLV +pop +line 566 +;566: } +LABELV $324 +line 567 +;567:} +LABELV $323 +endproc CG_AddExplosion 20 20 +proc CG_AddSpriteExplosion 252 20 +line 574 +;568: +;569:/* +;570:================ +;571:CG_AddSpriteExplosion +;572:================ +;573:*/ +;574:static void CG_AddSpriteExplosion( localEntity_t *le ) { +line 578 +;575: refEntity_t re; +;576: float c; +;577: +;578: re = le->refEntity; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRB +ASGNB 212 +line 580 +;579: +;580: c = ( le->endTime - cg.time ) / ( float ) ( le->endTime - le->startTime ); +ADDRLP4 216 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 220 +ADDRLP4 216 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 212 +ADDRLP4 220 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 220 +INDIRI4 +ADDRLP4 216 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 581 +;581: if ( c > 1 ) { +ADDRLP4 212 +INDIRF4 +CNSTF4 1065353216 +LEF4 $331 +line 582 +;582: c = 1.0; // can happen during connection problems +ADDRLP4 212 +CNSTF4 1065353216 +ASGNF4 +line 583 +;583: } +LABELV $331 +line 585 +;584: +;585: re.shaderRGBA[0] = 0xff; +ADDRLP4 0+80 +CNSTU1 255 +ASGNU1 +line 586 +;586: re.shaderRGBA[1] = 0xff; +ADDRLP4 0+80+1 +CNSTU1 255 +ASGNU1 +line 587 +;587: re.shaderRGBA[2] = 0xff; +ADDRLP4 0+80+2 +CNSTU1 255 +ASGNU1 +line 588 +;588: re.shaderRGBA[3] = 0xff * c * 0.33; +ADDRLP4 228 +CNSTF4 1051260355 +CNSTF4 1132396544 +ADDRLP4 212 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 232 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 228 +INDIRF4 +ADDRLP4 232 +INDIRF4 +LTF4 $341 +ADDRLP4 224 +ADDRLP4 228 +INDIRF4 +ADDRLP4 232 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $342 +JUMPV +LABELV $341 +ADDRLP4 224 +ADDRLP4 228 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $342 +ADDRLP4 0+80+3 +ADDRLP4 224 +INDIRU4 +CVUU1 4 +ASGNU1 +line 590 +;589: +;590: re.reType = RT_SPRITE; +ADDRLP4 0 +CNSTI4 2 +ASGNI4 +line 591 +;591: re.radius = 42 * ( 1.0 - c ) + 30; +ADDRLP4 0+92 +CNSTF4 1109917696 +CNSTF4 1065353216 +ADDRLP4 212 +INDIRF4 +SUBF4 +MULF4 +CNSTF4 1106247680 +ADDF4 +ASGNF4 +line 593 +;592: +;593: trap_R_AddRefEntityToScene( &re ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 596 +;594: +;595: // add the dlight +;596: if ( le->light ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $344 +line 599 +;597: float light; +;598: +;599: light = (float)( cg.time - le->startTime ) / ( le->endTime - le->startTime ); +ADDRLP4 240 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 244 +ADDRLP4 240 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 236 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 244 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 240 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 244 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 600 +;600: if ( light < 0.5 ) { +ADDRLP4 236 +INDIRF4 +CNSTF4 1056964608 +GEF4 $347 +line 601 +;601: light = 1.0; +ADDRLP4 236 +CNSTF4 1065353216 +ASGNF4 +line 602 +;602: } else { +ADDRGP4 $348 +JUMPV +LABELV $347 +line 603 +;603: light = 1.0 - ( light - 0.5 ) * 2; +ADDRLP4 236 +CNSTF4 1065353216 +CNSTF4 1073741824 +ADDRLP4 236 +INDIRF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +SUBF4 +ASGNF4 +line 604 +;604: } +LABELV $348 +line 605 +;605: light = le->light * light; +ADDRLP4 236 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRF4 +ADDRLP4 236 +INDIRF4 +MULF4 +ASGNF4 +line 606 +;606: trap_R_AddLightToScene(re.origin, light, le->lightColor[0], le->lightColor[1], le->lightColor[2] ); +ADDRLP4 0+52 +ARGP4 +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 248 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 248 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 248 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 248 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 trap_R_AddLightToScene +CALLV +pop +line 607 +;607: } +LABELV $344 +line 608 +;608:} +LABELV $329 +endproc CG_AddSpriteExplosion 252 20 +export CG_AddRefEntity +proc CG_AddRefEntity 0 4 +line 616 +;609: +;610: +;611:/* +;612:=================== +;613:CG_AddRefEntity +;614:=================== +;615:*/ +;616:void CG_AddRefEntity( localEntity_t *le ) { +line 617 +;617: if (le->endTime < cg.time) { +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $351 +line 618 +;618: CG_FreeLocalEntity( le ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeLocalEntity +CALLV +pop +line 619 +;619: return; +ADDRGP4 $350 +JUMPV +LABELV $351 +line 621 +;620: } +;621: trap_R_AddRefEntityToScene( &le->refEntity ); +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 622 +;622:} +LABELV $350 +endproc CG_AddRefEntity 0 4 +lit +align 4 +LABELV $355 +byte 4 0 +byte 4 0 +byte 4 1065353216 +export CG_AddScorePlum +code +proc CG_AddScorePlum 168 12 +line 631 +;623: +;624:/* +;625:=================== +;626:CG_AddScorePlum +;627:=================== +;628:*/ +;629:#define NUMBER_SIZE 8 +;630: +;631:void CG_AddScorePlum( localEntity_t *le ) { +line 633 +;632: refEntity_t *re; +;633: vec3_t origin, delta, dir, vec, up = {0, 0, 1}; +ADDRLP4 112 +ADDRGP4 $355 +INDIRB +ASGNB 12 +line 637 +;634: float c, len; +;635: int i, score, digits[10], numdigits, negative; +;636: +;637: re = &le->refEntity; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 639 +;638: +;639: c = ( le->endTime - cg.time ) * le->lifeRate; +ADDRLP4 128 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 80 +ADDRLP4 128 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 128 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 641 +;640: +;641: score = le->radius; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 642 +;642: if (score < 0) { +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +GEI4 $357 +line 643 +;643: re->shaderRGBA[0] = 0xff; +ADDRLP4 8 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTU1 255 +ASGNU1 +line 644 +;644: re->shaderRGBA[1] = 0x11; +ADDRLP4 8 +INDIRP4 +CNSTI4 81 +ADDP4 +CNSTU1 17 +ASGNU1 +line 645 +;645: re->shaderRGBA[2] = 0x11; +ADDRLP4 8 +INDIRP4 +CNSTI4 82 +ADDP4 +CNSTU1 17 +ASGNU1 +line 646 +;646: } +ADDRGP4 $358 +JUMPV +LABELV $357 +line 647 +;647: else { +line 648 +;648: re->shaderRGBA[0] = 0xff; +ADDRLP4 8 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTU1 255 +ASGNU1 +line 649 +;649: re->shaderRGBA[1] = 0xff; +ADDRLP4 8 +INDIRP4 +CNSTI4 81 +ADDP4 +CNSTU1 255 +ASGNU1 +line 650 +;650: re->shaderRGBA[2] = 0xff; +ADDRLP4 8 +INDIRP4 +CNSTI4 82 +ADDP4 +CNSTU1 255 +ASGNU1 +line 651 +;651: if (score >= 50) { +ADDRLP4 12 +INDIRI4 +CNSTI4 50 +LTI4 $359 +line 652 +;652: re->shaderRGBA[1] = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 81 +ADDP4 +CNSTU1 0 +ASGNU1 +line 653 +;653: } else if (score >= 20) { +ADDRGP4 $360 +JUMPV +LABELV $359 +ADDRLP4 12 +INDIRI4 +CNSTI4 20 +LTI4 $361 +line 654 +;654: re->shaderRGBA[0] = re->shaderRGBA[1] = 0; +ADDRLP4 136 +CNSTU1 0 +ASGNU1 +ADDRLP4 8 +INDIRP4 +CNSTI4 81 +ADDP4 +ADDRLP4 136 +INDIRU1 +ASGNU1 +ADDRLP4 8 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRLP4 136 +INDIRU1 +ASGNU1 +line 655 +;655: } else if (score >= 10) { +ADDRGP4 $362 +JUMPV +LABELV $361 +ADDRLP4 12 +INDIRI4 +CNSTI4 10 +LTI4 $363 +line 656 +;656: re->shaderRGBA[2] = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 82 +ADDP4 +CNSTU1 0 +ASGNU1 +line 657 +;657: } else if (score >= 2) { +ADDRGP4 $364 +JUMPV +LABELV $363 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LTI4 $365 +line 658 +;658: re->shaderRGBA[0] = re->shaderRGBA[2] = 0; +ADDRLP4 136 +CNSTU1 0 +ASGNU1 +ADDRLP4 8 +INDIRP4 +CNSTI4 82 +ADDP4 +ADDRLP4 136 +INDIRU1 +ASGNU1 +ADDRLP4 8 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRLP4 136 +INDIRU1 +ASGNU1 +line 659 +;659: } +LABELV $365 +LABELV $364 +LABELV $362 +LABELV $360 +line 661 +;660: +;661: } +LABELV $358 +line 662 +;662: if (c < 0.25) +ADDRLP4 80 +INDIRF4 +CNSTF4 1048576000 +GEF4 $367 +line 663 +;663: re->shaderRGBA[3] = 0xff * 4 * c; +ADDRLP4 136 +CNSTF4 1149173760 +ADDRLP4 80 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 140 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 136 +INDIRF4 +ADDRLP4 140 +INDIRF4 +LTF4 $370 +ADDRLP4 132 +ADDRLP4 136 +INDIRF4 +ADDRLP4 140 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $371 +JUMPV +LABELV $370 +ADDRLP4 132 +ADDRLP4 136 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $371 +ADDRLP4 8 +INDIRP4 +CNSTI4 83 +ADDP4 +ADDRLP4 132 +INDIRU4 +CVUU1 4 +ASGNU1 +ADDRGP4 $368 +JUMPV +LABELV $367 +line 665 +;664: else +;665: re->shaderRGBA[3] = 0xff; +ADDRLP4 8 +INDIRP4 +CNSTI4 83 +ADDP4 +CNSTU1 255 +ASGNU1 +LABELV $368 +line 667 +;666: +;667: re->radius = NUMBER_SIZE / 2; +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTF4 1082130432 +ASGNF4 +line 669 +;668: +;669: VectorCopy(le->pos.trBase, origin); +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRB +ASGNB 12 +line 670 +;670: origin[2] += 110 - c * 100; +ADDRLP4 16+8 +ADDRLP4 16+8 +INDIRF4 +CNSTF4 1121714176 +CNSTF4 1120403456 +ADDRLP4 80 +INDIRF4 +MULF4 +SUBF4 +ADDF4 +ASGNF4 +line 672 +;671: +;672: VectorSubtract(cg.refdef.vieworg, origin, dir); +ADDRLP4 96 +ADDRGP4 cg+3616+24 +INDIRF4 +ADDRLP4 16 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 96+4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +ADDRLP4 16+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 96+8 +ADDRGP4 cg+3616+24+8 +INDIRF4 +ADDRLP4 16+8 +INDIRF4 +SUBF4 +ASGNF4 +line 673 +;673: CrossProduct(dir, up, vec); +ADDRLP4 96 +ARGP4 +ADDRLP4 112 +ARGP4 +ADDRLP4 28 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 674 +;674: VectorNormalize(vec); +ADDRLP4 28 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 676 +;675: +;676: VectorMA(origin, -10 + 20 * sin(c * 2 * M_PI), vec, origin); +CNSTF4 1078530011 +CNSTF4 1073741824 +ADDRLP4 80 +INDIRF4 +MULF4 +MULF4 +ARGF4 +ADDRLP4 144 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 16 +INDIRF4 +ADDRLP4 28 +INDIRF4 +CNSTF4 1101004800 +ADDRLP4 144 +INDIRF4 +MULF4 +CNSTF4 3240099840 +ADDF4 +MULF4 +ADDF4 +ASGNF4 +CNSTF4 1078530011 +CNSTF4 1073741824 +ADDRLP4 80 +INDIRF4 +MULF4 +MULF4 +ARGF4 +ADDRLP4 148 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 16+4 +ADDRLP4 16+4 +INDIRF4 +ADDRLP4 28+4 +INDIRF4 +CNSTF4 1101004800 +ADDRLP4 148 +INDIRF4 +MULF4 +CNSTF4 3240099840 +ADDF4 +MULF4 +ADDF4 +ASGNF4 +CNSTF4 1078530011 +CNSTF4 1073741824 +ADDRLP4 80 +INDIRF4 +MULF4 +MULF4 +ARGF4 +ADDRLP4 152 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 16+8 +ADDRLP4 16+8 +INDIRF4 +ADDRLP4 28+8 +INDIRF4 +CNSTF4 1101004800 +ADDRLP4 152 +INDIRF4 +MULF4 +CNSTF4 3240099840 +ADDF4 +MULF4 +ADDF4 +ASGNF4 +line 680 +;677: +;678: // if the view would be "inside" the sprite, kill the sprite +;679: // so it doesn't add too much overdraw +;680: VectorSubtract( origin, cg.refdef.vieworg, delta ); +ADDRLP4 84 +ADDRLP4 16 +INDIRF4 +ADDRGP4 cg+3616+24 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 84+4 +ADDRLP4 16+4 +INDIRF4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 84+8 +ADDRLP4 16+8 +INDIRF4 +ADDRGP4 cg+3616+24+8 +INDIRF4 +SUBF4 +ASGNF4 +line 681 +;681: len = VectorLength( delta ); +ADDRLP4 84 +ARGP4 +ADDRLP4 156 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 124 +ADDRLP4 156 +INDIRF4 +ASGNF4 +line 682 +;682: if ( len < 20 ) { +ADDRLP4 124 +INDIRF4 +CNSTF4 1101004800 +GEF4 $403 +line 683 +;683: CG_FreeLocalEntity( le ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeLocalEntity +CALLV +pop +line 684 +;684: return; +ADDRGP4 $354 +JUMPV +LABELV $403 +line 687 +;685: } +;686: +;687: negative = qfalse; +ADDRLP4 108 +CNSTI4 0 +ASGNI4 +line 688 +;688: if (score < 0) { +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +GEI4 $405 +line 689 +;689: negative = qtrue; +ADDRLP4 108 +CNSTI4 1 +ASGNI4 +line 690 +;690: score = -score; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +NEGI4 +ASGNI4 +line 691 +;691: } +LABELV $405 +line 693 +;692: +;693: for (numdigits = 0; !(numdigits && !score); numdigits++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $410 +JUMPV +LABELV $407 +line 694 +;694: digits[numdigits] = score % 10; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 40 +ADDP4 +ADDRLP4 12 +INDIRI4 +CNSTI4 10 +MODI4 +ASGNI4 +line 695 +;695: score = score / 10; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 10 +DIVI4 +ASGNI4 +line 696 +;696: } +LABELV $408 +line 693 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $410 +ADDRLP4 160 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 160 +INDIRI4 +EQI4 $407 +ADDRLP4 12 +INDIRI4 +ADDRLP4 160 +INDIRI4 +NEI4 $407 +line 698 +;697: +;698: if (negative) { +ADDRLP4 108 +INDIRI4 +CNSTI4 0 +EQI4 $411 +line 699 +;699: digits[numdigits] = 10; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 40 +ADDP4 +CNSTI4 10 +ASGNI4 +line 700 +;700: numdigits++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 701 +;701: } +LABELV $411 +line 703 +;702: +;703: for (i = 0; i < numdigits; i++) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $416 +JUMPV +LABELV $413 +line 704 +;704: VectorMA(origin, (float) (((float) numdigits / 2) - i) * NUMBER_SIZE, vec, re->origin); +ADDRLP4 8 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 28 +INDIRF4 +CNSTF4 1090519040 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +CNSTF4 1073741824 +DIVF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDRLP4 16+4 +INDIRF4 +ADDRLP4 28+4 +INDIRF4 +CNSTF4 1090519040 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +CNSTF4 1073741824 +DIVF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRLP4 16+8 +INDIRF4 +ADDRLP4 28+8 +INDIRF4 +CNSTF4 1090519040 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +CNSTF4 1073741824 +DIVF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 705 +;705: re->customShader = cgs.media.numberShaders[digits[numdigits-1-i]]; +ADDRLP4 164 +CNSTI4 2 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ADDRLP4 164 +INDIRI4 +LSHI4 +ADDRLP4 40 +ADDP4 +INDIRI4 +ADDRLP4 164 +INDIRI4 +LSHI4 +ADDRGP4 cgs+70296+264 +ADDP4 +INDIRI4 +ASGNI4 +line 706 +;706: trap_R_AddRefEntityToScene( re ); +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 707 +;707: } +LABELV $414 +line 703 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $416 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +LTI4 $413 +line 708 +;708:} +LABELV $354 +endproc CG_AddScorePlum 168 12 +export CG_AddOLine +proc CG_AddOLine 76 4 +line 718 +;709: +;710:/* +;711:=================== +;712:CG_AddOLine +;713: +;714:For forcefields/other rectangular things +;715:=================== +;716:*/ +;717:void CG_AddOLine( localEntity_t *le ) +;718:{ +line 722 +;719: refEntity_t *re; +;720: float frac, alpha; +;721: +;722: re = &le->refEntity; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 724 +;723: +;724: frac = (cg.time - le->startTime) / ( float ) ( le->endTime - le->startTime ); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 12 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 16 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 12 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 725 +;725: if ( frac > 1 ) +ADDRLP4 4 +INDIRF4 +CNSTF4 1065353216 +LEF4 $425 +line 726 +;726: frac = 1.0; // can happen during connection problems +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +ADDRGP4 $426 +JUMPV +LABELV $425 +line 727 +;727: else if (frac < 0) +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +GEF4 $427 +line 728 +;728: frac = 0.0; +ADDRLP4 4 +CNSTF4 0 +ASGNF4 +LABELV $427 +LABELV $426 +line 731 +;729: +;730: // Use the liferate to set the scale over time. +;731: re->data.line.width = le->data.line.width + (le->data.line.dwidth * frac); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 732 +;732: if (re->data.line.width <= 0) +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRF4 +CNSTF4 0 +GTF4 $429 +line 733 +;733: { +line 734 +;734: CG_FreeLocalEntity( le ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeLocalEntity +CALLV +pop +line 735 +;735: return; +ADDRGP4 $423 +JUMPV +LABELV $429 +line 739 +;736: } +;737: +;738: // We will assume here that we want additive transparency effects. +;739: alpha = le->alpha + (le->dalpha * frac); +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 24 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 740 +;740: re->shaderRGBA[0] = 0xff * alpha; +ADDRLP4 32 +CNSTF4 1132396544 +ADDRLP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 36 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LTF4 $432 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $433 +JUMPV +LABELV $432 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $433 +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRLP4 28 +INDIRU4 +CVUU1 4 +ASGNU1 +line 741 +;741: re->shaderRGBA[1] = 0xff * alpha; +ADDRLP4 44 +CNSTF4 1132396544 +ADDRLP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 48 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 44 +INDIRF4 +ADDRLP4 48 +INDIRF4 +LTF4 $435 +ADDRLP4 40 +ADDRLP4 44 +INDIRF4 +ADDRLP4 48 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $436 +JUMPV +LABELV $435 +ADDRLP4 40 +ADDRLP4 44 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $436 +ADDRLP4 0 +INDIRP4 +CNSTI4 81 +ADDP4 +ADDRLP4 40 +INDIRU4 +CVUU1 4 +ASGNU1 +line 742 +;742: re->shaderRGBA[2] = 0xff * alpha; +ADDRLP4 56 +CNSTF4 1132396544 +ADDRLP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 60 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ADDRLP4 60 +INDIRF4 +LTF4 $438 +ADDRLP4 52 +ADDRLP4 56 +INDIRF4 +ADDRLP4 60 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $439 +JUMPV +LABELV $438 +ADDRLP4 52 +ADDRLP4 56 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $439 +ADDRLP4 0 +INDIRP4 +CNSTI4 82 +ADDP4 +ADDRLP4 52 +INDIRU4 +CVUU1 4 +ASGNU1 +line 743 +;743: re->shaderRGBA[3] = 0xff * alpha; // Yes, we could apply c to this too, but fading the color is better for lines. +ADDRLP4 68 +CNSTF4 1132396544 +ADDRLP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 72 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 68 +INDIRF4 +ADDRLP4 72 +INDIRF4 +LTF4 $441 +ADDRLP4 64 +ADDRLP4 68 +INDIRF4 +ADDRLP4 72 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $442 +JUMPV +LABELV $441 +ADDRLP4 64 +ADDRLP4 68 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $442 +ADDRLP4 0 +INDIRP4 +CNSTI4 83 +ADDP4 +ADDRLP4 64 +INDIRU4 +CVUU1 4 +ASGNU1 +line 745 +;744: +;745: re->shaderTexCoord[0] = 1; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 746 +;746: re->shaderTexCoord[1] = 1; +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 748 +;747: +;748: re->rotation = 90; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTF4 1119092736 +ASGNF4 +line 750 +;749: +;750: re->reType = RT_ORIENTEDLINE; +ADDRLP4 0 +INDIRP4 +CNSTI4 9 +ASGNI4 +line 752 +;751: +;752: trap_R_AddRefEntityToScene( re ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 753 +;753:} +LABELV $423 +endproc CG_AddOLine 76 4 +export CG_AddLine +proc CG_AddLine 4 4 +line 763 +;754: +;755:/* +;756:=================== +;757:CG_AddLine +;758: +;759:for beams and the like. +;760:=================== +;761:*/ +;762:void CG_AddLine( localEntity_t *le ) +;763:{ +line 766 +;764: refEntity_t *re; +;765: +;766: re = &le->refEntity; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ASGNP4 +line 768 +;767: +;768: re->reType = RT_LINE; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ASGNI4 +line 770 +;769: +;770: trap_R_AddRefEntityToScene( re ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 771 +;771:} +LABELV $443 +endproc CG_AddLine 4 4 +export CG_AddLocalEntities +proc CG_AddLocalEntities 16 8 +line 781 +;772: +;773://============================================================================== +;774: +;775:/* +;776:=================== +;777:CG_AddLocalEntities +;778: +;779:=================== +;780:*/ +;781:void CG_AddLocalEntities( void ) { +line 786 +;782: localEntity_t *le, *next; +;783: +;784: // walk the list backwards, so any new local entities generated +;785: // (trails, marks, etc) will be present this frame +;786: le = cg_activeLocalEntities.prev; +ADDRLP4 0 +ADDRGP4 cg_activeLocalEntities +INDIRP4 +ASGNP4 +line 787 +;787: for ( ; le != &cg_activeLocalEntities ; le = next ) { +ADDRGP4 $448 +JUMPV +LABELV $445 +line 790 +;788: // grab next now, so if the local entity is freed we +;789: // still have it +;790: next = le->prev; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 792 +;791: +;792: if ( cg.time >= le->endTime ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +LTI4 $449 +line 793 +;793: CG_FreeLocalEntity( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeLocalEntity +CALLV +pop +line 794 +;794: continue; +ADDRGP4 $446 +JUMPV +LABELV $449 +line 796 +;795: } +;796: switch ( le->leType ) { +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +LTI4 $452 +ADDRLP4 8 +INDIRI4 +CNSTI4 13 +GTI4 $452 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $470 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $470 +address $453 +address $458 +address $457 +address $459 +address $460 +address $461 +address $462 +address $464 +address $463 +address $465 +address $466 +address $467 +address $468 +address $469 +code +LABELV $452 +line 798 +;797: default: +;798: CG_Error( "Bad leType: %i", le->leType ); +ADDRGP4 $455 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_Error +CALLV +pop +line 799 +;799: break; +ADDRGP4 $453 +JUMPV +line 802 +;800: +;801: case LE_MARK: +;802: break; +LABELV $457 +line 805 +;803: +;804: case LE_SPRITE_EXPLOSION: +;805: CG_AddSpriteExplosion( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddSpriteExplosion +CALLV +pop +line 806 +;806: break; +ADDRGP4 $453 +JUMPV +LABELV $458 +line 809 +;807: +;808: case LE_EXPLOSION: +;809: CG_AddExplosion( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddExplosion +CALLV +pop +line 810 +;810: break; +ADDRGP4 $453 +JUMPV +LABELV $459 +line 813 +;811: +;812: case LE_FADE_SCALE_MODEL: +;813: CG_AddFadeScaleModel( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddFadeScaleModel +CALLV +pop +line 814 +;814: break; +ADDRGP4 $453 +JUMPV +LABELV $460 +line 817 +;815: +;816: case LE_FRAGMENT: // gibs and brass +;817: CG_AddFragment( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddFragment +CALLV +pop +line 818 +;818: break; +ADDRGP4 $453 +JUMPV +LABELV $461 +line 821 +;819: +;820: case LE_PUFF: +;821: CG_AddPuff( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddPuff +CALLV +pop +line 822 +;822: break; +ADDRGP4 $453 +JUMPV +LABELV $462 +line 825 +;823: +;824: case LE_MOVE_SCALE_FADE: // water bubbles +;825: CG_AddMoveScaleFade( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddMoveScaleFade +CALLV +pop +line 826 +;826: break; +ADDRGP4 $453 +JUMPV +LABELV $463 +line 829 +;827: +;828: case LE_FADE_RGB: // teleporters, railtrails +;829: CG_AddFadeRGB( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddFadeRGB +CALLV +pop +line 830 +;830: break; +ADDRGP4 $453 +JUMPV +LABELV $464 +line 833 +;831: +;832: case LE_FALL_SCALE_FADE: // gib blood trails +;833: CG_AddFallScaleFade( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddFallScaleFade +CALLV +pop +line 834 +;834: break; +ADDRGP4 $453 +JUMPV +LABELV $465 +line 837 +;835: +;836: case LE_SCALE_FADE: // rocket trails +;837: CG_AddScaleFade( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddScaleFade +CALLV +pop +line 838 +;838: break; +ADDRGP4 $453 +JUMPV +LABELV $466 +line 841 +;839: +;840: case LE_SCOREPLUM: +;841: CG_AddScorePlum( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddScorePlum +CALLV +pop +line 842 +;842: break; +ADDRGP4 $453 +JUMPV +LABELV $467 +line 845 +;843: +;844: case LE_OLINE: +;845: CG_AddOLine( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddOLine +CALLV +pop +line 846 +;846: break; +ADDRGP4 $453 +JUMPV +LABELV $468 +line 849 +;847: +;848: case LE_SHOWREFENTITY: +;849: CG_AddRefEntity( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddRefEntity +CALLV +pop +line 850 +;850: break; +ADDRGP4 $453 +JUMPV +LABELV $469 +line 853 +;851: +;852: case LE_LINE: // oriented lines for FX +;853: CG_AddLine( le ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddLine +CALLV +pop +line 854 +;854: break; +LABELV $453 +line 856 +;855: } +;856: } +LABELV $446 +line 787 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +LABELV $448 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRGP4 cg_activeLocalEntities +CVPU4 4 +NEU4 $445 +line 857 +;857:} +LABELV $444 +endproc CG_AddLocalEntities 16 8 +bss +export cg_freeLocalEntities +align 4 +LABELV cg_freeLocalEntities +skip 4 +export cg_activeLocalEntities +align 4 +LABELV cg_activeLocalEntities +skip 460 +export cg_localEntities +align 4 +LABELV cg_localEntities +skip 235520 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $455 +char 1 66 +char 1 97 +char 1 100 +char 1 32 +char 1 108 +char 1 101 +char 1 84 +char 1 121 +char 1 112 +char 1 101 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $131 +char 1 67 +char 1 71 +char 1 95 +char 1 70 +char 1 114 +char 1 101 +char 1 101 +char 1 76 +char 1 111 +char 1 99 +char 1 97 +char 1 108 +char 1 69 +char 1 110 +char 1 116 +char 1 105 +char 1 116 +char 1 121 +char 1 58 +char 1 32 +char 1 110 +char 1 111 +char 1 116 +char 1 32 +char 1 97 +char 1 99 +char 1 116 +char 1 105 +char 1 118 +char 1 101 +char 1 0 diff --git a/code/cgame/vm/cg_main.asm b/code/cgame/vm/cg_main.asm new file mode 100644 index 0000000..a41648b --- /dev/null +++ b/code/cgame/vm/cg_main.asm @@ -0,0 +1,28430 @@ +data +export colorTable +align 4 +LABELV colorTable +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +byte 4 0 +byte 4 0 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +byte 4 0 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1061158912 +byte 4 1061158912 +byte 4 1061158912 +byte 4 1065353216 +byte 4 1056964608 +byte 4 1056964608 +byte 4 1056964608 +byte 4 1065353216 +byte 4 1048576000 +byte 4 1048576000 +byte 4 1048576000 +byte 4 1065353216 +byte 4 1041865114 +byte 4 1041865114 +byte 4 1041865114 +byte 4 1065353216 +byte 4 1062165545 +byte 4 1057467924 +byte 4 0 +byte 4 1065353216 +byte 4 1062165545 +byte 4 1057467924 +byte 4 0 +byte 4 1065353216 +byte 4 1058810102 +byte 4 1051260355 +byte 4 0 +byte 4 1065353216 +byte 4 1053676274 +byte 4 1049079316 +byte 4 0 +byte 4 1065353216 +byte 4 1057014940 +byte 4 1052770304 +byte 4 1065286107 +byte 4 1065353216 +byte 4 1052501869 +byte 4 1048945099 +byte 4 1060689150 +byte 4 1065353216 +byte 4 1045153448 +byte 4 0 +byte 4 1053542056 +byte 4 1065353216 +byte 4 1042536202 +byte 4 1039113650 +byte 4 1051059028 +byte 4 1065353216 +byte 4 1050253722 +byte 4 1059112092 +byte 4 1062266208 +byte 4 1065353216 +byte 4 1050253722 +byte 4 1059112092 +byte 4 1062266208 +byte 4 1065353216 +byte 4 1044616577 +byte 4 1049884623 +byte 4 1055521767 +byte 4 1065353216 +byte 4 1040187392 +byte 4 1048576000 +byte 4 1051059028 +byte 4 1065353216 +byte 4 1061930664 +byte 4 1053542056 +byte 4 1045153448 +byte 4 1065353216 +byte 4 1061930664 +byte 4 1053542056 +byte 4 1045153448 +byte 4 1065353216 +byte 4 1057937687 +byte 4 1045690319 +byte 4 1021128475 +byte 4 1065353216 +byte 4 1051193246 +byte 4 1040187392 +byte 4 1024416809 +byte 4 1065353216 +byte 4 1065286107 +byte 4 1061930664 +byte 4 1053542056 +byte 4 1065353216 +byte 4 1065286107 +byte 4 1061930664 +byte 4 1053542056 +byte 4 1065353216 +byte 4 1058726216 +byte 4 1054984897 +byte 4 1038576779 +byte 4 1065353216 +byte 4 1053139403 +byte 4 1050522157 +byte 4 1041730896 +byte 4 1065353216 +byte 4 1059447636 +byte 4 1058004795 +byte 4 1061729337 +byte 4 1065353216 +byte 4 1059447636 +byte 4 1058004795 +byte 4 1061729337 +byte 4 1065353216 +byte 4 1054850679 +byte 4 1051428127 +byte 4 1058591998 +byte 4 1065353216 +byte 4 1050522157 +byte 4 1049213534 +byte 4 1052770304 +byte 4 1065353216 +byte 4 1062266208 +byte 4 1057484702 +byte 4 1060487823 +byte 4 1065353216 +byte 4 1062266208 +byte 4 1057484702 +byte 4 1060487823 +byte 4 1065353216 +byte 4 1058071904 +byte 4 1049213534 +byte 4 1055521767 +byte 4 1065353216 +byte 4 1051696562 +byte 4 1046965387 +byte 4 1050790593 +byte 4 1065353216 +byte 4 1064162034 +byte 4 1058591998 +byte 4 1064162034 +byte 4 1065353216 +byte 4 1058139013 +byte 4 1052636086 +byte 4 1058139013 +byte 4 1065353216 +byte 4 1052099215 +byte 4 1045153448 +byte 4 1052099215 +byte 4 1065353216 +byte 4 1049750405 +byte 4 1040925590 +byte 4 1047233823 +byte 4 1065353216 +byte 4 1064564687 +byte 4 1052870967 +byte 4 1048576000 +byte 4 1065353216 +byte 4 1064564687 +byte 4 1052870967 +byte 4 1048576000 +byte 4 1065353216 +byte 4 1058524889 +byte 4 1039650521 +byte 4 1038039908 +byte 4 1065353216 +byte 4 1054582243 +byte 4 1043274400 +byte 4 1038576779 +byte 4 1065353216 +byte 4 1048576000 +byte 4 0 +byte 4 0 +byte 4 1065353216 +byte 4 1060320051 +byte 4 0 +byte 4 0 +byte 4 1065353216 +byte 4 1060605264 +byte 4 1063709049 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1058206122 +byte 4 1060689150 +byte 4 1062064882 +byte 4 1065353216 +byte 4 1049817514 +byte 4 1052300542 +byte 4 1053676274 +byte 4 1065353216 +byte 4 1041395352 +byte 4 1043878380 +byte 4 1045287666 +byte 4 1065353216 +byte 4 1063188955 +byte 4 1053139403 +byte 4 1052770304 +byte 4 1065353216 +byte 4 1054783570 +byte 4 1044750795 +byte 4 1044348142 +byte 4 1065353216 +byte 4 0 +byte 4 1056964608 +byte 4 1056964608 +byte 4 1065353216 +byte 4 0 +byte 4 1048576000 +byte 4 1048576000 +byte 4 1065353216 +byte 4 1043811271 +byte 4 1057132380 +byte 4 1064011039 +byte 4 1065353216 +byte 4 1045153448 +byte 4 1060487823 +byte 4 1064011039 +byte 4 1065353216 +byte 4 1056964608 +byte 4 1028443341 +byte 4 1053609165 +byte 4 1065353216 +byte 4 0 +byte 4 1058860433 +byte 4 1036429296 +byte 4 1065353216 +byte 4 1062584975 +byte 4 1014350479 +byte 4 1014350479 +byte 4 1065353216 +byte 4 1058088681 +byte 4 1060068393 +byte 4 1065353216 +byte 4 1061158912 +byte 4 1057216266 +byte 4 1053810491 +byte 4 1057082049 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1059615408 +byte 4 1031664566 +byte 4 1065353216 +export HolocronIcons +align 4 +LABELV HolocronIcons +address $130 +address $131 +address $132 +address $133 +address $134 +address $135 +address $136 +address $137 +address $138 +address $139 +address $140 +address $141 +address $142 +address $143 +address $144 +address $145 +address $146 +address $147 +export forceModelModificationCount +align 4 +LABELV forceModelModificationCount +byte 4 -1 +export vmMain +code +proc vmMain 20 12 +file "../cg_main.c" +line 151 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_main.c -- initialization and primary entry point for cgame +;4:#include "cg_local.h" +;5: +;6:#include "../ui/ui_shared.h" +;7:// display context for new ui stuff +;8:displayContextDef_t cgDC; +;9: +;10:#if !defined(CL_LIGHT_H_INC) +;11: #include "cg_lights.h" +;12:#endif +;13: +;14:/* +;15:Ghoul2 Insert Start +;16:*/ +;17:void CG_InitItems(void); +;18:/* +;19:Ghoul2 Insert End +;20:*/ +;21: +;22:vec4_t colorTable[CT_MAX] = +;23:{ +;24:{0, 0, 0, 0}, // CT_NONE +;25:{0, 0, 0, 1}, // CT_BLACK +;26:{1, 0, 0, 1}, // CT_RED +;27:{0, 1, 0, 1}, // CT_GREEN +;28:{0, 0, 1, 1}, // CT_BLUE +;29:{1, 1, 0, 1}, // CT_YELLOW +;30:{1, 0, 1, 1}, // CT_MAGENTA +;31:{0, 1, 1, 1}, // CT_CYAN +;32:{1, 1, 1, 1}, // CT_WHITE +;33:{0.75f, 0.75f, 0.75f, 1}, // CT_LTGREY +;34:{0.50f, 0.50f, 0.50f, 1}, // CT_MDGREY +;35:{0.25f, 0.25f, 0.25f, 1}, // CT_DKGREY +;36:{0.15f, 0.15f, 0.15f, 1}, // CT_DKGREY2 +;37: +;38:{0.810f, 0.530f, 0.0f, 1}, // CT_VLTORANGE -- needs values +;39:{0.810f, 0.530f, 0.0f, 1}, // CT_LTORANGE +;40:{0.610f, 0.330f, 0.0f, 1}, // CT_DKORANGE +;41:{0.402f, 0.265f, 0.0f, 1}, // CT_VDKORANGE +;42: +;43:{0.503f, 0.375f, 0.996f, 1}, // CT_VLTBLUE1 +;44:{0.367f, 0.261f, 0.722f, 1}, // CT_LTBLUE1 +;45:{0.199f, 0.0f, 0.398f, 1}, // CT_DKBLUE1 +;46:{0.160f, 0.117f, 0.324f, 1}, // CT_VDKBLUE1 +;47: +;48:{0.300f, 0.628f, 0.816f, 1}, // CT_VLTBLUE2 -- needs values +;49:{0.300f, 0.628f, 0.816f, 1}, // CT_LTBLUE2 +;50:{0.191f, 0.289f, 0.457f, 1}, // CT_DKBLUE2 +;51:{0.125f, 0.250f, 0.324f, 1}, // CT_VDKBLUE2 +;52: +;53:{0.796f, 0.398f, 0.199f, 1}, // CT_VLTBROWN1 -- needs values +;54:{0.796f, 0.398f, 0.199f, 1}, // CT_LTBROWN1 +;55:{0.558f, 0.207f, 0.027f, 1}, // CT_DKBROWN1 +;56:{0.328f, 0.125f, 0.035f, 1}, // CT_VDKBROWN1 +;57: +;58:{0.996f, 0.796f, 0.398f, 1}, // CT_VLTGOLD1 -- needs values +;59:{0.996f, 0.796f, 0.398f, 1}, // CT_LTGOLD1 +;60:{0.605f, 0.441f, 0.113f, 1}, // CT_DKGOLD1 +;61:{0.386f, 0.308f, 0.148f, 1}, // CT_VDKGOLD1 +;62: +;63:{0.648f, 0.562f, 0.784f, 1}, // CT_VLTPURPLE1 -- needs values +;64:{0.648f, 0.562f, 0.784f, 1}, // CT_LTPURPLE1 +;65:{0.437f, 0.335f, 0.597f, 1}, // CT_DKPURPLE1 +;66:{0.308f, 0.269f, 0.375f, 1}, // CT_VDKPURPLE1 +;67: +;68:{0.816f, 0.531f, 0.710f, 1}, // CT_VLTPURPLE2 -- needs values +;69:{0.816f, 0.531f, 0.710f, 1}, // CT_LTPURPLE2 +;70:{0.566f, 0.269f, 0.457f, 1}, // CT_DKPURPLE2 +;71:{0.343f, 0.226f, 0.316f, 1}, // CT_VDKPURPLE2 +;72: +;73:{0.929f, 0.597f, 0.929f, 1}, // CT_VLTPURPLE3 +;74:{0.570f, 0.371f, 0.570f, 1}, // CT_LTPURPLE3 +;75:{0.355f, 0.199f, 0.355f, 1}, // CT_DKPURPLE3 +;76:{0.285f, 0.136f, 0.230f, 1}, // CT_VDKPURPLE3 +;77: +;78:{0.953f, 0.378f, 0.250f, 1}, // CT_VLTRED1 +;79:{0.953f, 0.378f, 0.250f, 1}, // CT_LTRED1 +;80:{0.593f, 0.121f, 0.109f, 1}, // CT_DKRED1 +;81:{0.429f, 0.171f, 0.113f, 1}, // CT_VDKRED1 +;82:{.25f, 0, 0, 1}, // CT_VDKRED +;83:{.70f, 0, 0, 1}, // CT_DKRED +;84: +;85:{0.717f, 0.902f, 1.0f, 1}, // CT_VLTAQUA +;86:{0.574f, 0.722f, 0.804f, 1}, // CT_LTAQUA +;87:{0.287f, 0.361f, 0.402f, 1}, // CT_DKAQUA +;88:{0.143f, 0.180f, 0.201f, 1}, // CT_VDKAQUA +;89: +;90:{0.871f, 0.386f, 0.375f, 1}, // CT_LTPINK +;91:{0.435f, 0.193f, 0.187f, 1}, // CT_DKPINK +;92:{ 0, .5f, .5f, 1}, // CT_LTCYAN +;93:{ 0, .25f, .25f, 1}, // CT_DKCYAN +;94:{ .179f, .51f, .92f, 1}, // CT_LTBLUE3 +;95:{ .199f, .71f, .92f, 1}, // CT_LTBLUE3 +;96:{ .5f, .05f, .4f, 1}, // CT_DKBLUE3 +;97: +;98:{ 0.0f, .613f, .097f, 1}, // CT_HUD_GREEN +;99:{ 0.835f, .015f, .015f, 1}, // CT_HUD_RED +;100:{ .567f, .685f, 1.0f, .75f}, // CT_ICON_BLUE +;101:{ .515f, .406f, .507f, 1}, // CT_NO_AMMO_RED +;102:{ 1.0f, .658f, .062f, 1}, // CT_HUD_ORANGE +;103: +;104:}; +;105: +;106:char *HolocronIcons[] = { +;107: "gfx/mp/f_icon_lt_heal", //FP_HEAL, +;108: "gfx/mp/f_icon_levitation", //FP_LEVITATION, +;109: "gfx/mp/f_icon_speed", //FP_SPEED, +;110: "gfx/mp/f_icon_push", //FP_PUSH, +;111: "gfx/mp/f_icon_pull", //FP_PULL, +;112: "gfx/mp/f_icon_lt_telepathy", //FP_TELEPATHY, +;113: "gfx/mp/f_icon_dk_grip", //FP_GRIP, +;114: "gfx/mp/f_icon_dk_l1", //FP_LIGHTNING, +;115: "gfx/mp/f_icon_dk_rage", //FP_RAGE, +;116: "gfx/mp/f_icon_lt_protect", //FP_PROTECT, +;117: "gfx/mp/f_icon_lt_absorb", //FP_ABSORB, +;118: "gfx/mp/f_icon_lt_healother", //FP_TEAM_HEAL, +;119: "gfx/mp/f_icon_dk_forceother", //FP_TEAM_FORCE, +;120: "gfx/mp/f_icon_dk_drain", //FP_DRAIN, +;121: "gfx/mp/f_icon_sight", //FP_SEE, +;122: "gfx/mp/f_icon_saber_attack", //FP_SABERATTACK, +;123: "gfx/mp/f_icon_saber_defend", //FP_SABERDEFEND, +;124: "gfx/mp/f_icon_saber_throw" //FP_SABERTHROW +;125:}; +;126: +;127:int forceModelModificationCount = -1; +;128: +;129:void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ); +;130:void CG_Shutdown( void ); +;131: +;132:void CG_CalcEntityLerpPositions( centity_t *cent ); +;133:void CG_ROFF_NotetrackCallback( centity_t *cent, const char *notetrack); +;134: +;135:static int C_PointContents(void); +;136:static void C_GetLerpOrigin(void); +;137:static void C_GetLerpAngles(void); +;138:static void C_GetModelScale(void); +;139:static void C_Trace(void); +;140:static void C_GetBoltPos(void); +;141:static void C_ImpactMark(void); +;142: +;143:/* +;144:================ +;145:vmMain +;146: +;147:This is the only way control passes into the module. +;148:This must be the very first function compiled into the .q3vm file +;149:================ +;150:*/ +;151:int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11 ) { +line 153 +;152: +;153: switch ( command ) { +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $149 +ADDRLP4 0 +INDIRI4 +CNSTI4 24 +GTI4 $149 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $192 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $192 +address $151 +address $152 +address $153 +address $154 +address $155 +address $156 +address $157 +address $158 +address $163 +address $164 +address $165 +address $166 +address $167 +address $168 +address $170 +address $172 +address $173 +address $174 +address $177 +address $180 +address $181 +address $184 +address $187 +address $188 +address $189 +code +LABELV $151 +line 155 +;154: case CG_INIT: +;155: CG_Init( arg0, arg1, arg2 ); +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRGP4 CG_Init +CALLV +pop +line 156 +;156: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $152 +line 158 +;157: case CG_SHUTDOWN: +;158: CG_Shutdown(); +ADDRGP4 CG_Shutdown +CALLV +pop +line 159 +;159: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $153 +line 161 +;160: case CG_CONSOLE_COMMAND: +;161: return CG_ConsoleCommand(); +ADDRLP4 4 +ADDRGP4 CG_ConsoleCommand +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $154 +line 163 +;162: case CG_DRAW_ACTIVE_FRAME: +;163: CG_DrawActiveFrame( arg0, arg1, arg2 ); +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawActiveFrame +CALLV +pop +line 164 +;164: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $155 +line 166 +;165: case CG_CROSSHAIR_PLAYER: +;166: return CG_CrosshairPlayer(); +ADDRLP4 8 +ADDRGP4 CG_CrosshairPlayer +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $156 +line 168 +;167: case CG_LAST_ATTACKER: +;168: return CG_LastAttacker(); +ADDRLP4 12 +ADDRGP4 CG_LastAttacker +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $157 +line 170 +;169: case CG_KEY_EVENT: +;170: CG_KeyEvent(arg0, arg1); +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRGP4 CG_KeyEvent +CALLV +pop +line 171 +;171: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $158 +line 173 +;172: case CG_MOUSE_EVENT: +;173: cgDC.cursorx = cgs.cursorX; +ADDRGP4 cgDC+248 +ADDRGP4 cgs+70208 +INDIRI4 +ASGNI4 +line 174 +;174: cgDC.cursory = cgs.cursorY; +ADDRGP4 cgDC+252 +ADDRGP4 cgs+70212 +INDIRI4 +ASGNI4 +line 175 +;175: CG_MouseEvent(arg0, arg1); +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRGP4 CG_MouseEvent +CALLV +pop +line 176 +;176: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $163 +line 178 +;177: case CG_EVENT_HANDLING: +;178: CG_EventHandling(arg0); +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 CG_EventHandling +CALLV +pop +line 179 +;179: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $164 +line 182 +;180: +;181: case CG_POINT_CONTENTS: +;182: return C_PointContents(); +ADDRLP4 16 +ADDRGP4 C_PointContents +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $165 +line 185 +;183: +;184: case CG_GET_LERP_ORIGIN: +;185: C_GetLerpOrigin(); +ADDRGP4 C_GetLerpOrigin +CALLV +pop +line 186 +;186: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $166 +line 189 +;187: +;188: case CG_GET_LERP_ANGLES: +;189: C_GetLerpAngles(); +ADDRGP4 C_GetLerpAngles +CALLV +pop +line 190 +;190: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $167 +line 193 +;191: +;192: case CG_GET_MODEL_SCALE: +;193: C_GetModelScale(); +ADDRGP4 C_GetModelScale +CALLV +pop +line 194 +;194: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $168 +line 197 +;195: +;196: case CG_GET_GHOUL2: +;197: return (int)cg_entities[arg0].ghoul2; //NOTE: This is used by the effect bolting which is actually not used at all. +CNSTI4 1920 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +CVPU4 4 +CVUI4 4 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $170 +line 202 +;198: //I'm fairly sure if you try to use it with vm's it will just give you total +;199: //garbage. In other words, use at your own risk. +;200: +;201: case CG_GET_MODEL_LIST: +;202: return (int)cgs.gameModels; +ADDRGP4 cgs+36364 +CVPU4 4 +CVUI4 4 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $172 +line 205 +;203: +;204: case CG_CALC_LERP_POSITIONS: +;205: CG_CalcEntityLerpPositions( &cg_entities[arg0] ); +CNSTI4 1920 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +ADDRGP4 CG_CalcEntityLerpPositions +CALLV +pop +line 206 +;206: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $173 +line 209 +;207: +;208: case CG_TRACE: +;209: C_Trace(); +ADDRGP4 C_Trace +CALLV +pop +line 210 +;210: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $174 +line 213 +;211: +;212: case CG_GET_ORIGIN: +;213: VectorCopy(cg_entities[arg0].currentState.pos.trBase, (float *)arg1); +ADDRFP4 8 +INDIRI4 +CVIU4 4 +CVUP4 4 +CNSTI4 1920 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+12+12 +ADDP4 +INDIRB +ASGNB 12 +line 214 +;214: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $177 +line 217 +;215: +;216: case CG_GET_ANGLES: +;217: VectorCopy(cg_entities[arg0].currentState.apos.trBase, (float *)arg1); +ADDRFP4 8 +INDIRI4 +CVIU4 4 +CVUP4 4 +CNSTI4 1920 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+48+12 +ADDP4 +INDIRB +ASGNB 12 +line 218 +;218: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $180 +line 221 +;219: +;220: case CG_GET_BOLT_POS: +;221: C_GetBoltPos(); +ADDRGP4 C_GetBoltPos +CALLV +pop +line 222 +;222: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $181 +line 225 +;223: +;224: case CG_GET_ORIGIN_TRAJECTORY: +;225: return (int)&cg_entities[arg0].nextState.pos; +CNSTI4 1920 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+296+12 +ADDP4 +CVPU4 4 +CVUI4 4 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $184 +line 228 +;226: +;227: case CG_GET_ANGLE_TRAJECTORY: +;228: return (int)&cg_entities[arg0].nextState.apos; +CNSTI4 1920 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+296+48 +ADDP4 +CVPU4 4 +CVUI4 4 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $187 +line 231 +;229: +;230: case CG_ROFF_NOTETRACK_CALLBACK: +;231: CG_ROFF_NotetrackCallback( &cg_entities[arg0], (const char *)arg1 ); +CNSTI4 1920 +ADDRFP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +CVIU4 4 +CVUP4 4 +ARGP4 +ADDRGP4 CG_ROFF_NotetrackCallback +CALLV +pop +line 232 +;232: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $188 +line 235 +;233: +;234: case CG_IMPACT_MARK: +;235: C_ImpactMark(); +ADDRGP4 C_ImpactMark +CALLV +pop +line 236 +;236: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $189 +line 242 +;237: +;238: case CG_MAP_CHANGE: +;239: // this trap map be called more than once for a given map change, as the +;240: // server is going to attempt to send out multiple broadcasts in hopes that +;241: // the client will receive one of them +;242: cg.mMapChange = qtrue; +ADDRGP4 cg+48 +CNSTI4 1 +ASGNI4 +line 243 +;243: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $148 +JUMPV +LABELV $149 +line 246 +;244: +;245: default: +;246: CG_Error( "vmMain: unknown command %i", command ); +ADDRGP4 $191 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 CG_Error +CALLV +pop +line 247 +;247: break; +LABELV $150 +line 249 +;248: } +;249: return -1; +CNSTI4 -1 +RETI4 +LABELV $148 +endproc vmMain 20 12 +proc C_PointContents 12 8 +line 253 +;250:} +;251: +;252:static int C_PointContents(void) +;253:{ +line 254 +;254: TCGPointContents *data = (TCGPointContents *)cg.sharedBuffer; +ADDRLP4 0 +ADDRGP4 cg+168236 +ASGNP4 +line 256 +;255: +;256: return CG_PointContents( data->mPoint, data->mPassEntityNum ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 CG_PointContents +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +RETI4 +LABELV $193 +endproc C_PointContents 12 8 +proc C_GetLerpOrigin 8 0 +line 260 +;257:} +;258: +;259:static void C_GetLerpOrigin(void) +;260:{ +line 261 +;261: TCGVectorData *data = (TCGVectorData *)cg.sharedBuffer; +ADDRLP4 0 +ADDRGP4 cg+168236 +ASGNP4 +line 263 +;262: +;263: VectorCopy(cg_entities[data->mEntityNum].lerpOrigin, data->mPoint); +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+928 +ADDP4 +INDIRB +ASGNB 12 +line 264 +;264:} +LABELV $195 +endproc C_GetLerpOrigin 8 0 +proc C_GetLerpAngles 8 0 +line 267 +;265: +;266:static void C_GetLerpAngles(void) +;267:{ +line 268 +;268: TCGVectorData *data = (TCGVectorData *)cg.sharedBuffer; +ADDRLP4 0 +ADDRGP4 cg+168236 +ASGNP4 +line 270 +;269: +;270: VectorCopy(cg_entities[data->mEntityNum].lerpAngles, data->mPoint); +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+940 +ADDP4 +INDIRB +ASGNB 12 +line 271 +;271:} +LABELV $198 +endproc C_GetLerpAngles 8 0 +proc C_GetModelScale 8 0 +line 274 +;272: +;273:static void C_GetModelScale(void) +;274:{ +line 275 +;275: TCGVectorData *data = (TCGVectorData *)cg.sharedBuffer; +ADDRLP4 0 +ADDRGP4 cg+168236 +ASGNP4 +line 277 +;276: +;277: VectorCopy(cg_entities[data->mEntityNum].modelScale, data->mPoint); +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+964 +ADDP4 +INDIRB +ASGNB 12 +line 278 +;278:} +LABELV $201 +endproc C_GetModelScale 8 0 +proc C_Trace 8 28 +line 281 +;279: +;280:static void C_Trace(void) +;281:{ +line 282 +;282: TCGTrace *td = (TCGTrace *)cg.sharedBuffer; +ADDRLP4 0 +ADDRGP4 cg+168236 +ASGNP4 +line 284 +;283: +;284: CG_Trace(&td->mResult, td->mStart, td->mMins, td->mMaxs, td->mEnd, td->mSkipNumber, td->mMask); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1080 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1092 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1104 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1116 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1128 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1132 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 285 +;285:} +LABELV $204 +endproc C_Trace 8 28 +proc C_GetBoltPos 20 0 +line 288 +;286: +;287:static void C_GetBoltPos(void) +;288:{ +line 289 +;289: TCGBoltPos *data = (TCGBoltPos *)cg.sharedBuffer; +ADDRLP4 0 +ADDRGP4 cg+168236 +ASGNP4 +line 291 +;290: +;291: if (!cg_entities[data->mEntityNum].ghoul2) +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $208 +line 292 +;292: { +line 293 +;293: VectorClear(data->mPoint); +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 294 +;294: VectorClear(data->mAngle); +ADDRLP4 16 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 295 +;295: return; +ADDRGP4 $206 +JUMPV +LABELV $208 +line 298 +;296: } +;297: +;298: VectorCopy(cg_entities[data->mEntityNum].lerpOrigin, data->mPoint); +ADDRLP4 0 +INDIRP4 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+928 +ADDP4 +INDIRB +ASGNB 12 +line 299 +;299: if (data->mEntityNum < MAX_CLIENTS) +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +CNSTI4 32 +GEI4 $212 +line 300 +;300: { +line 301 +;301: VectorCopy(cg_entities[data->mEntityNum].turAngles, data->mAngle); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1016 +ADDP4 +INDIRB +ASGNB 12 +line 302 +;302: } +ADDRGP4 $213 +JUMPV +LABELV $212 +line 304 +;303: else +;304: { +line 305 +;305: VectorCopy(cg_entities[data->mEntityNum].lerpAngles, data->mAngle); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+940 +ADDP4 +INDIRB +ASGNB 12 +line 306 +;306: } +LABELV $213 +line 307 +;307:} +LABELV $206 +endproc C_GetBoltPos 20 0 +proc C_ImpactMark 8 44 +line 310 +;308: +;309:static void C_ImpactMark(void) +;310:{ +line 311 +;311: TCGImpactMark *data = (TCGImpactMark *)cg.sharedBuffer; +ADDRLP4 0 +ADDRGP4 cg+168236 +ASGNP4 +line 317 +;312: +;313: /* +;314: CG_ImpactMark((int)arg0, (const float *)arg1, (const float *)arg2, (float)arg3, +;315: (float)arg4, (float)arg5, (float)arg6, (float)arg7, qtrue, (float)arg8, qfalse); +;316: */ +;317: CG_ImpactMark(data->mHandle, data->mPoint, data->mAngle, data->mRotation, +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRF4 +ARGF4 +CNSTI4 1 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRF4 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_ImpactMark +CALLV +pop +line 319 +;318: data->mRed, data->mGreen, data->mBlue, data->mAlphaStart, qtrue, data->mSizeStart, qfalse); +;319:} +LABELV $216 +endproc C_ImpactMark 8 44 +data +align 4 +LABELV cvarTable +address cg_ignore +address $219 +address $220 +byte 4 0 +address cg_autoswitch +address $221 +address $222 +byte 4 1 +address cg_drawGun +address $223 +address $222 +byte 4 1 +address cg_zoomFov +address $224 +address $225 +byte 4 1 +address cg_fov +address $226 +address $227 +byte 4 1 +address cg_viewsize +address $228 +address $229 +byte 4 1 +address cg_stereoSeparation +address $230 +address $231 +byte 4 1 +address cg_shadows +address $232 +address $222 +byte 4 1 +address cg_draw2D +address $233 +address $222 +byte 4 1 +address cg_drawStatus +address $234 +address $222 +byte 4 1 +address cg_drawTimer +address $235 +address $220 +byte 4 1 +address cg_drawFPS +address $236 +address $220 +byte 4 1 +address cg_drawSnapshot +address $237 +address $220 +byte 4 1 +address cg_draw3dIcons +address $238 +address $222 +byte 4 1 +address cg_drawIcons +address $239 +address $222 +byte 4 1 +address cg_drawAmmoWarning +address $240 +address $220 +byte 4 1 +address cg_drawEnemyInfo +address $241 +address $222 +byte 4 1 +address cg_drawCrosshair +address $242 +address $222 +byte 4 1 +address cg_drawCrosshairNames +address $243 +address $222 +byte 4 1 +address cg_drawScores +address $244 +address $222 +byte 4 1 +address cg_dynamicCrosshair +address $245 +address $222 +byte 4 1 +address cg_drawRewards +address $246 +address $222 +byte 4 1 +address cg_crosshairSize +address $247 +address $248 +byte 4 1 +address cg_crosshairHealth +address $249 +address $220 +byte 4 1 +address cg_crosshairX +address $250 +address $220 +byte 4 1 +address cg_crosshairY +address $251 +address $220 +byte 4 1 +address cg_simpleItems +address $252 +address $220 +byte 4 1 +address cg_addMarks +address $253 +address $222 +byte 4 1 +address cg_lagometer +address $254 +address $220 +byte 4 1 +address cg_gun_x +address $255 +address $220 +byte 4 512 +address cg_gun_y +address $256 +address $220 +byte 4 512 +address cg_gun_z +address $257 +address $220 +byte 4 512 +address cg_centertime +address $258 +address $259 +byte 4 512 +address cg_runpitch +address $260 +address $261 +byte 4 1 +address cg_runroll +address $262 +address $263 +byte 4 1 +address cg_bobup +address $264 +address $263 +byte 4 1 +address cg_bobpitch +address $265 +address $261 +byte 4 1 +address cg_bobroll +address $266 +address $261 +byte 4 1 +address cg_animSpeed +address $267 +address $222 +byte 4 512 +address cg_debugAnim +address $268 +address $220 +byte 4 512 +address cg_debugSaber +address $269 +address $220 +byte 4 512 +address cg_debugPosition +address $270 +address $220 +byte 4 512 +address cg_debugEvents +address $271 +address $220 +byte 4 512 +address cg_errorDecay +address $272 +address $229 +byte 4 0 +address cg_nopredict +address $273 +address $220 +byte 4 0 +address cg_noPlayerAnims +address $274 +address $220 +byte 4 512 +address cg_showmiss +address $275 +address $220 +byte 4 0 +address cg_footsteps +address $276 +address $222 +byte 4 512 +address cg_tracerChance +address $277 +address $231 +byte 4 512 +address cg_tracerWidth +address $278 +address $222 +byte 4 512 +address cg_tracerLength +address $279 +address $229 +byte 4 512 +address cg_swingAngles +address $280 +address $222 +byte 4 0 +address cg_oldPainSounds +address $281 +address $220 +byte 4 0 +address cg_saberModelTraceEffect +address $282 +address $220 +byte 4 0 +address cg_fpls +address $283 +address $220 +byte 4 0 +address cg_saberDynamicMarks +address $284 +address $220 +byte 4 0 +address cg_saberDynamicMarkTime +address $285 +address $286 +byte 4 0 +address cg_saberContact +address $287 +address $222 +byte 4 0 +address cg_saberTrail +address $288 +address $222 +byte 4 0 +address cg_duelHeadAngles +address $289 +address $220 +byte 4 0 +address cg_speedTrail +address $290 +address $222 +byte 4 0 +address cg_auraShell +address $291 +address $222 +byte 4 0 +address cg_animBlend +address $292 +address $222 +byte 4 0 +address cg_dismember +address $293 +address $220 +byte 4 1 +address cg_thirdPerson +address $294 +address $220 +byte 4 0 +address cg_thirdPersonRange +address $295 +address $227 +byte 4 512 +address cg_thirdPersonAngle +address $296 +address $220 +byte 4 512 +address cg_thirdPersonPitchOffset +address $297 +address $220 +byte 4 512 +address cg_thirdPersonVertOffset +address $298 +address $299 +byte 4 512 +address cg_thirdPersonCameraDamp +address $300 +address $301 +byte 4 0 +address cg_thirdPersonTargetDamp +address $302 +address $303 +byte 4 512 +address cg_thirdPersonHorzOffset +address $304 +address $220 +byte 4 512 +address cg_thirdPersonAlpha +address $305 +address $306 +byte 4 512 +address cg_teamChatTime +address $307 +address $308 +byte 4 1 +address cg_teamChatHeight +address $309 +address $220 +byte 4 1 +address cg_forceModel +address $310 +address $220 +byte 4 1 +address cg_predictItems +address $311 +address $222 +byte 4 1 +address cg_deferPlayers +address $312 +address $222 +byte 4 1 +address cg_drawTeamOverlay +address $313 +address $220 +byte 4 1 +address cg_teamOverlayUserinfo +address $314 +address $220 +byte 4 66 +address cg_stats +address $315 +address $220 +byte 4 0 +address cg_drawFriend +address $316 +address $222 +byte 4 1 +address cg_teamChatsOnly +address $317 +address $220 +byte 4 1 +address cg_noVoiceChats +address $318 +address $220 +byte 4 1 +address cg_noVoiceText +address $319 +address $220 +byte 4 1 +address cg_buildScript +address $320 +address $220 +byte 4 0 +address cg_paused +address $321 +address $220 +byte 4 64 +address cg_blood +address $322 +address $222 +byte 4 1 +address cg_synchronousClients +address $323 +address $220 +byte 4 0 +address cg_redTeamName +address $324 +address $325 +byte 4 7 +address cg_blueTeamName +address $326 +address $327 +byte 4 7 +address cg_currentSelectedPlayer +address $328 +address $220 +byte 4 1 +address cg_currentSelectedPlayerName +address $329 +address $330 +byte 4 1 +address cg_singlePlayer +address $331 +address $220 +byte 4 2 +address cg_enableDust +address $332 +address $220 +byte 4 0 +address cg_enableBreath +address $333 +address $220 +byte 4 0 +address cg_singlePlayerActive +address $331 +address $220 +byte 4 2 +address cg_recordSPDemo +address $334 +address $220 +byte 4 1 +address cg_recordSPDemoName +address $335 +address $330 +byte 4 1 +address cg_cameraOrbit +address $336 +address $220 +byte 4 512 +address cg_cameraOrbitDelay +address $337 +address $338 +byte 4 1 +address cg_timescaleFadeEnd +address $339 +address $222 +byte 4 0 +address cg_timescaleFadeSpeed +address $340 +address $220 +byte 4 0 +address cg_timescale +address $341 +address $222 +byte 4 0 +address cg_scorePlum +address $342 +address $222 +byte 4 3 +address cg_hudFiles +address $343 +address $220 +byte 4 3 +address cg_smoothClients +address $344 +address $220 +byte 4 3 +address cg_cameraMode +address $345 +address $220 +byte 4 512 +address pmove_fixed +address $346 +address $220 +byte 4 0 +address pmove_msec +address $347 +address $348 +byte 4 0 +address cg_noTaunt +address $349 +address $220 +byte 4 1 +address cg_noProjectileTrail +address $350 +address $220 +byte 4 1 +address cg_smallFont +address $351 +address $352 +byte 4 1 +address cg_bigFont +address $353 +address $231 +byte 4 1 +address cg_trueLightning +address $354 +address $355 +byte 4 1 +address ui_myteam +address $356 +address $220 +byte 4 2112 +address cg_debugBB +address $357 +address $220 +byte 4 0 +align 4 +LABELV cvarTableSize +byte 4 117 +export CG_RegisterCvars +code +proc CG_RegisterCvars 1036 16 +line 668 +;320: +;321:/* +;322:Ghoul2 Insert Start +;323:*/ +;324:/* +;325:void CG_ResizeG2Bolt(boltInfo_v *bolt, int newCount) +;326:{ +;327: bolt->resize(newCount); +;328:} +;329: +;330:void CG_ResizeG2Surface(surfaceInfo_v *surface, int newCount) +;331:{ +;332: surface->resize(newCount); +;333:} +;334: +;335:void CG_ResizeG2Bone(boneInfo_v *bone, int newCount) +;336:{ +;337: bone->resize(newCount); +;338:} +;339: +;340:void CG_ResizeG2(CGhoul2Info_v *ghoul2, int newCount) +;341:{ +;342: ghoul2->resize(newCount); +;343:} +;344: +;345:void CG_ResizeG2TempBone(mdxaBone_v *tempBone, int newCount) +;346:{ +;347: tempBone->resize(newCount); +;348:} +;349:*/ +;350:/* +;351:Ghoul2 Insert End +;352:*/ +;353:cg_t cg; +;354:cgs_t cgs; +;355:centity_t cg_entities[MAX_GENTITIES]; +;356:weaponInfo_t cg_weapons[MAX_WEAPONS]; +;357:itemInfo_t cg_items[MAX_ITEMS]; +;358: +;359: +;360:vmCvar_t cg_centertime; +;361:vmCvar_t cg_runpitch; +;362:vmCvar_t cg_runroll; +;363:vmCvar_t cg_bobup; +;364:vmCvar_t cg_bobpitch; +;365:vmCvar_t cg_bobroll; +;366://vmCvar_t cg_swingSpeed; +;367:vmCvar_t cg_shadows; +;368:vmCvar_t cg_drawTimer; +;369:vmCvar_t cg_drawFPS; +;370:vmCvar_t cg_drawSnapshot; +;371:vmCvar_t cg_draw3dIcons; +;372:vmCvar_t cg_drawIcons; +;373:vmCvar_t cg_drawAmmoWarning; +;374:vmCvar_t cg_drawCrosshair; +;375:vmCvar_t cg_drawCrosshairNames; +;376:vmCvar_t cg_dynamicCrosshair; +;377:vmCvar_t cg_drawRewards; +;378:vmCvar_t cg_drawScores; +;379:vmCvar_t cg_crosshairSize; +;380:vmCvar_t cg_crosshairX; +;381:vmCvar_t cg_crosshairY; +;382:vmCvar_t cg_crosshairHealth; +;383:vmCvar_t cg_draw2D; +;384:vmCvar_t cg_drawStatus; +;385:vmCvar_t cg_animSpeed; +;386:vmCvar_t cg_debugAnim; +;387:vmCvar_t cg_debugSaber; +;388:vmCvar_t cg_debugPosition; +;389:vmCvar_t cg_debugEvents; +;390:vmCvar_t cg_errorDecay; +;391:vmCvar_t cg_nopredict; +;392:vmCvar_t cg_noPlayerAnims; +;393:vmCvar_t cg_showmiss; +;394:vmCvar_t cg_footsteps; +;395:vmCvar_t cg_addMarks; +;396:vmCvar_t cg_viewsize; +;397:vmCvar_t cg_drawGun; +;398:vmCvar_t cg_gun_frame; +;399:vmCvar_t cg_gun_x; +;400:vmCvar_t cg_gun_y; +;401:vmCvar_t cg_gun_z; +;402:vmCvar_t cg_tracerChance; +;403:vmCvar_t cg_tracerWidth; +;404:vmCvar_t cg_tracerLength; +;405:vmCvar_t cg_autoswitch; +;406:vmCvar_t cg_ignore; +;407:vmCvar_t cg_simpleItems; +;408:vmCvar_t cg_fov; +;409:vmCvar_t cg_zoomFov; +;410: +;411:vmCvar_t cg_swingAngles; +;412: +;413:vmCvar_t cg_oldPainSounds; +;414: +;415:#ifdef G2_COLLISION_ENABLED +;416:vmCvar_t cg_saberModelTraceEffect; +;417:#endif +;418: +;419:vmCvar_t cg_fpls; +;420: +;421:vmCvar_t cg_saberDynamicMarks; +;422:vmCvar_t cg_saberDynamicMarkTime; +;423: +;424:vmCvar_t cg_saberContact; +;425:vmCvar_t cg_saberTrail; +;426: +;427:vmCvar_t cg_duelHeadAngles; +;428: +;429:vmCvar_t cg_speedTrail; +;430:vmCvar_t cg_auraShell; +;431: +;432:vmCvar_t cg_animBlend; +;433: +;434:vmCvar_t cg_dismember; +;435: +;436:vmCvar_t cg_thirdPerson; +;437:vmCvar_t cg_thirdPersonRange; +;438:vmCvar_t cg_thirdPersonAngle; +;439:vmCvar_t cg_thirdPersonPitchOffset; +;440:vmCvar_t cg_thirdPersonVertOffset; +;441:vmCvar_t cg_thirdPersonCameraDamp; +;442:vmCvar_t cg_thirdPersonTargetDamp; +;443: +;444:vmCvar_t cg_thirdPersonAlpha; +;445:vmCvar_t cg_thirdPersonHorzOffset; +;446: +;447:vmCvar_t cg_stereoSeparation; +;448:vmCvar_t cg_lagometer; +;449:vmCvar_t cg_drawEnemyInfo; +;450:vmCvar_t cg_synchronousClients; +;451:vmCvar_t cg_teamChatTime; +;452:vmCvar_t cg_teamChatHeight; +;453:vmCvar_t cg_stats; +;454:vmCvar_t cg_buildScript; +;455:vmCvar_t cg_forceModel; +;456:vmCvar_t cg_paused; +;457:vmCvar_t cg_blood; +;458:vmCvar_t cg_predictItems; +;459:vmCvar_t cg_deferPlayers; +;460:vmCvar_t cg_drawTeamOverlay; +;461:vmCvar_t cg_teamOverlayUserinfo; +;462:vmCvar_t cg_drawFriend; +;463:vmCvar_t cg_teamChatsOnly; +;464:vmCvar_t cg_noVoiceChats; +;465:vmCvar_t cg_noVoiceText; +;466:vmCvar_t cg_hudFiles; +;467:vmCvar_t cg_scorePlum; +;468:vmCvar_t cg_smoothClients; +;469:vmCvar_t pmove_fixed; +;470://vmCvar_t cg_pmove_fixed; +;471:vmCvar_t pmove_msec; +;472:vmCvar_t cg_pmove_msec; +;473:vmCvar_t cg_cameraMode; +;474:vmCvar_t cg_cameraOrbit; +;475:vmCvar_t cg_cameraOrbitDelay; +;476:vmCvar_t cg_timescaleFadeEnd; +;477:vmCvar_t cg_timescaleFadeSpeed; +;478:vmCvar_t cg_timescale; +;479:vmCvar_t cg_smallFont; +;480:vmCvar_t cg_bigFont; +;481:vmCvar_t cg_noTaunt; +;482:vmCvar_t cg_noProjectileTrail; +;483:vmCvar_t cg_trueLightning; +;484:/* +;485:Ghoul2 Insert Start +;486:*/ +;487:vmCvar_t cg_debugBB; +;488:/* +;489:Ghoul2 Insert End +;490:*/ +;491:vmCvar_t cg_redTeamName; +;492:vmCvar_t cg_blueTeamName; +;493:vmCvar_t cg_currentSelectedPlayer; +;494:vmCvar_t cg_currentSelectedPlayerName; +;495:vmCvar_t cg_singlePlayer; +;496:vmCvar_t cg_enableDust; +;497:vmCvar_t cg_enableBreath; +;498:vmCvar_t cg_singlePlayerActive; +;499:vmCvar_t cg_recordSPDemo; +;500:vmCvar_t cg_recordSPDemoName; +;501: +;502:vmCvar_t ui_myteam; +;503: +;504:typedef struct { +;505: vmCvar_t *vmCvar; +;506: char *cvarName; +;507: char *defaultString; +;508: int cvarFlags; +;509:} cvarTable_t; +;510: +;511:static cvarTable_t cvarTable[] = { // bk001129 +;512: { &cg_ignore, "cg_ignore", "0", 0 }, // used for debugging +;513: { &cg_autoswitch, "cg_autoswitch", "1", CVAR_ARCHIVE }, +;514: { &cg_drawGun, "cg_drawGun", "1", CVAR_ARCHIVE }, +;515: { &cg_zoomFov, "cg_zoomfov", "40.0", CVAR_ARCHIVE }, +;516: { &cg_fov, "cg_fov", "80", CVAR_ARCHIVE }, +;517: { &cg_viewsize, "cg_viewsize", "100", CVAR_ARCHIVE }, +;518: { &cg_stereoSeparation, "cg_stereoSeparation", "0.4", CVAR_ARCHIVE }, +;519: { &cg_shadows, "cg_shadows", "1", CVAR_ARCHIVE }, +;520: { &cg_draw2D, "cg_draw2D", "1", CVAR_ARCHIVE }, +;521: { &cg_drawStatus, "cg_drawStatus", "1", CVAR_ARCHIVE }, +;522: { &cg_drawTimer, "cg_drawTimer", "0", CVAR_ARCHIVE }, +;523: { &cg_drawFPS, "cg_drawFPS", "0", CVAR_ARCHIVE }, +;524: { &cg_drawSnapshot, "cg_drawSnapshot", "0", CVAR_ARCHIVE }, +;525: { &cg_draw3dIcons, "cg_draw3dIcons", "1", CVAR_ARCHIVE }, +;526: { &cg_drawIcons, "cg_drawIcons", "1", CVAR_ARCHIVE }, +;527: { &cg_drawAmmoWarning, "cg_drawAmmoWarning", "0", CVAR_ARCHIVE }, +;528: { &cg_drawEnemyInfo, "cg_drawEnemyInfo", "1", CVAR_ARCHIVE }, +;529: { &cg_drawCrosshair, "cg_drawCrosshair", "1", CVAR_ARCHIVE }, +;530: { &cg_drawCrosshairNames, "cg_drawCrosshairNames", "1", CVAR_ARCHIVE }, +;531: { &cg_drawScores, "cg_drawScores", "1", CVAR_ARCHIVE }, +;532: { &cg_dynamicCrosshair, "cg_dynamicCrosshair", "1", CVAR_ARCHIVE }, +;533: { &cg_drawRewards, "cg_drawRewards", "1", CVAR_ARCHIVE }, +;534: { &cg_crosshairSize, "cg_crosshairSize", "24", CVAR_ARCHIVE }, +;535: { &cg_crosshairHealth, "cg_crosshairHealth", "0", CVAR_ARCHIVE }, +;536: { &cg_crosshairX, "cg_crosshairX", "0", CVAR_ARCHIVE }, +;537: { &cg_crosshairY, "cg_crosshairY", "0", CVAR_ARCHIVE }, +;538: { &cg_simpleItems, "cg_simpleItems", "0", CVAR_ARCHIVE }, +;539: { &cg_addMarks, "cg_marks", "1", CVAR_ARCHIVE }, +;540: { &cg_lagometer, "cg_lagometer", "0", CVAR_ARCHIVE }, +;541: { &cg_gun_x, "cg_gunX", "0", CVAR_CHEAT }, +;542: { &cg_gun_y, "cg_gunY", "0", CVAR_CHEAT }, +;543: { &cg_gun_z, "cg_gunZ", "0", CVAR_CHEAT }, +;544: { &cg_centertime, "cg_centertime", "3", CVAR_CHEAT }, +;545: { &cg_runpitch, "cg_runpitch", "0.002", CVAR_ARCHIVE}, +;546: { &cg_runroll, "cg_runroll", "0.005", CVAR_ARCHIVE }, +;547: { &cg_bobup , "cg_bobup", "0.005", CVAR_ARCHIVE }, +;548: { &cg_bobpitch, "cg_bobpitch", "0.002", CVAR_ARCHIVE }, +;549: { &cg_bobroll, "cg_bobroll", "0.002", CVAR_ARCHIVE }, +;550: //{ &cg_swingSpeed, "cg_swingSpeed", "0.3", CVAR_CHEAT }, +;551: { &cg_animSpeed, "cg_animspeed", "1", CVAR_CHEAT }, +;552: { &cg_debugAnim, "cg_debuganim", "0", CVAR_CHEAT }, +;553: { &cg_debugSaber, "cg_debugsaber", "0", CVAR_CHEAT }, +;554: { &cg_debugPosition, "cg_debugposition", "0", CVAR_CHEAT }, +;555: { &cg_debugEvents, "cg_debugevents", "0", CVAR_CHEAT }, +;556: { &cg_errorDecay, "cg_errordecay", "100", 0 }, +;557: { &cg_nopredict, "cg_nopredict", "0", 0 }, +;558: { &cg_noPlayerAnims, "cg_noplayeranims", "0", CVAR_CHEAT }, +;559: { &cg_showmiss, "cg_showmiss", "0", 0 }, +;560: { &cg_footsteps, "cg_footsteps", "1", CVAR_CHEAT }, +;561: { &cg_tracerChance, "cg_tracerchance", "0.4", CVAR_CHEAT }, +;562: { &cg_tracerWidth, "cg_tracerwidth", "1", CVAR_CHEAT }, +;563: { &cg_tracerLength, "cg_tracerlength", "100", CVAR_CHEAT }, +;564: +;565: { &cg_swingAngles, "cg_swingAngles", "1", 0 }, +;566: +;567: { &cg_oldPainSounds, "cg_oldPainSounds", "0", 0 }, +;568: +;569:#ifdef G2_COLLISION_ENABLED +;570: { &cg_saberModelTraceEffect, "cg_saberModelTraceEffect", "0", 0 }, +;571:#endif +;572: +;573: { &cg_fpls, "cg_fpls", "0", 0 }, +;574: +;575: { &cg_saberDynamicMarks, "cg_saberDynamicMarks", "0", 0 }, +;576: { &cg_saberDynamicMarkTime, "cg_saberDynamicMarkTime", "60000", 0 }, +;577: +;578: { &cg_saberContact, "cg_saberContact", "1", 0 }, +;579: { &cg_saberTrail, "cg_saberTrail", "1", 0 }, +;580: +;581: { &cg_duelHeadAngles, "cg_duelHeadAngles", "0", 0 }, +;582: +;583: { &cg_speedTrail, "cg_speedTrail", "1", 0 }, +;584: { &cg_auraShell, "cg_auraShell", "1", 0 }, +;585: +;586: { &cg_animBlend, "cg_animBlend", "1", 0 }, +;587: +;588: { &cg_dismember, "cg_dismember", "0", CVAR_ARCHIVE }, +;589: +;590: { &cg_thirdPerson, "cg_thirdPerson", "0", 0 }, +;591: { &cg_thirdPersonRange, "cg_thirdPersonRange", "80", CVAR_CHEAT }, +;592: { &cg_thirdPersonAngle, "cg_thirdPersonAngle", "0", CVAR_CHEAT }, +;593: { &cg_thirdPersonPitchOffset, "cg_thirdPersonPitchOffset", "0", CVAR_CHEAT }, +;594: { &cg_thirdPersonVertOffset, "cg_thirdPersonVertOffset", "16", CVAR_CHEAT }, +;595: { &cg_thirdPersonCameraDamp, "cg_thirdPersonCameraDamp", "0.3", 0 }, +;596: { &cg_thirdPersonTargetDamp, "cg_thirdPersonTargetDamp", "0.5", CVAR_CHEAT }, +;597: +;598: { &cg_thirdPersonHorzOffset, "cg_thirdPersonHorzOffset", "0", CVAR_CHEAT }, +;599: { &cg_thirdPersonAlpha, "cg_thirdPersonAlpha", "1.0", CVAR_CHEAT }, +;600: +;601: { &cg_teamChatTime, "cg_teamChatTime", "3000", CVAR_ARCHIVE }, +;602: { &cg_teamChatHeight, "cg_teamChatHeight", "0", CVAR_ARCHIVE }, +;603: { &cg_forceModel, "cg_forceModel", "0", CVAR_ARCHIVE }, +;604: { &cg_predictItems, "cg_predictItems", "1", CVAR_ARCHIVE }, +;605: { &cg_deferPlayers, "cg_deferPlayers", "1", CVAR_ARCHIVE }, +;606: { &cg_drawTeamOverlay, "cg_drawTeamOverlay", "0", CVAR_ARCHIVE }, +;607: { &cg_teamOverlayUserinfo, "teamoverlay", "0", CVAR_ROM | CVAR_USERINFO }, +;608: { &cg_stats, "cg_stats", "0", 0 }, +;609: { &cg_drawFriend, "cg_drawFriend", "1", CVAR_ARCHIVE }, +;610: { &cg_teamChatsOnly, "cg_teamChatsOnly", "0", CVAR_ARCHIVE }, +;611: { &cg_noVoiceChats, "cg_noVoiceChats", "0", CVAR_ARCHIVE }, +;612: { &cg_noVoiceText, "cg_noVoiceText", "0", CVAR_ARCHIVE }, +;613: // the following variables are created in other parts of the system, +;614: // but we also reference them here +;615: { &cg_buildScript, "com_buildScript", "0", 0 }, // force loading of all possible data amd error on failures +;616: { &cg_paused, "cl_paused", "0", CVAR_ROM }, +;617: { &cg_blood, "com_blood", "1", CVAR_ARCHIVE }, +;618: { &cg_synchronousClients, "g_synchronousClients", "0", 0 }, // communicated by systeminfo +;619: +;620: { &cg_redTeamName, "g_redteam", DEFAULT_REDTEAM_NAME, CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO }, +;621: { &cg_blueTeamName, "g_blueteam", DEFAULT_BLUETEAM_NAME, CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO }, +;622: { &cg_currentSelectedPlayer, "cg_currentSelectedPlayer", "0", CVAR_ARCHIVE}, +;623: { &cg_currentSelectedPlayerName, "cg_currentSelectedPlayerName", "", CVAR_ARCHIVE}, +;624: { &cg_singlePlayer, "ui_singlePlayerActive", "0", CVAR_USERINFO}, +;625: { &cg_enableDust, "g_enableDust", "0", 0}, +;626: { &cg_enableBreath, "g_enableBreath", "0", 0}, +;627: { &cg_singlePlayerActive, "ui_singlePlayerActive", "0", CVAR_USERINFO}, +;628: { &cg_recordSPDemo, "ui_recordSPDemo", "0", CVAR_ARCHIVE}, +;629: { &cg_recordSPDemoName, "ui_recordSPDemoName", "", CVAR_ARCHIVE}, +;630: +;631: { &cg_cameraOrbit, "cg_cameraOrbit", "0", CVAR_CHEAT}, +;632: { &cg_cameraOrbitDelay, "cg_cameraOrbitDelay", "50", CVAR_ARCHIVE}, +;633: { &cg_timescaleFadeEnd, "cg_timescaleFadeEnd", "1", 0}, +;634: { &cg_timescaleFadeSpeed, "cg_timescaleFadeSpeed", "0", 0}, +;635: { &cg_timescale, "timescale", "1", 0}, +;636: { &cg_scorePlum, "cg_scorePlums", "1", CVAR_USERINFO | CVAR_ARCHIVE}, +;637: { &cg_hudFiles, "cg_hudFiles", "0", CVAR_USERINFO | CVAR_ARCHIVE}, +;638: { &cg_smoothClients, "cg_smoothClients", "0", CVAR_USERINFO | CVAR_ARCHIVE}, +;639: { &cg_cameraMode, "com_cameraMode", "0", CVAR_CHEAT}, +;640: +;641: { &pmove_fixed, "pmove_fixed", "0", 0}, +;642: { &pmove_msec, "pmove_msec", "8", 0}, +;643: { &cg_noTaunt, "cg_noTaunt", "0", CVAR_ARCHIVE}, +;644: { &cg_noProjectileTrail, "cg_noProjectileTrail", "0", CVAR_ARCHIVE}, +;645: { &cg_smallFont, "ui_smallFont", "0.25", CVAR_ARCHIVE}, +;646: { &cg_bigFont, "ui_bigFont", "0.4", CVAR_ARCHIVE}, +;647: { &cg_trueLightning, "cg_trueLightning", "0.0", CVAR_ARCHIVE}, +;648: +;649: { &ui_myteam, "ui_myteam", "0", CVAR_ROM|CVAR_INTERNAL}, +;650: +;651:// { &cg_pmove_fixed, "cg_pmove_fixed", "0", CVAR_USERINFO | CVAR_ARCHIVE } +;652:/* +;653:Ghoul2 Insert Start +;654:*/ +;655: { &cg_debugBB, "debugBB", "0", 0}, +;656:/* +;657:Ghoul2 Insert End +;658:*/ +;659:}; +;660: +;661:static int cvarTableSize = sizeof( cvarTable ) / sizeof( cvarTable[0] ); +;662: +;663:/* +;664:================= +;665:CG_RegisterCvars +;666:================= +;667:*/ +;668:void CG_RegisterCvars( void ) { +line 673 +;669: int i; +;670: cvarTable_t *cv; +;671: char var[MAX_TOKEN_CHARS]; +;672: +;673: for ( i = 0, cv = cvarTable ; i < cvarTableSize ; i++, cv++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +ADDRGP4 cvarTable +ASGNP4 +ADDRGP4 $362 +JUMPV +LABELV $359 +line 674 +;674: trap_Cvar_Register( cv->vmCvar, cv->cvarName, +ADDRLP4 0 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 676 +;675: cv->defaultString, cv->cvarFlags ); +;676: } +LABELV $360 +line 673 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +LABELV $362 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cvarTableSize +INDIRI4 +LTI4 $359 +line 679 +;677: +;678: // see if we are also running the server on this machine +;679: trap_Cvar_VariableStringBuffer( "sv_running", var, sizeof( var ) ); +ADDRGP4 $363 +ARGP4 +ADDRLP4 8 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 trap_Cvar_VariableStringBuffer +CALLV +pop +line 680 +;680: cgs.localServer = atoi( var ); +ADDRLP4 8 +ARGP4 +ADDRLP4 1032 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+32956 +ADDRLP4 1032 +INDIRI4 +ASGNI4 +line 682 +;681: +;682: forceModelModificationCount = cg_forceModel.modificationCount; +ADDRGP4 forceModelModificationCount +ADDRGP4 cg_forceModel+4 +INDIRI4 +ASGNI4 +line 684 +;683: +;684: trap_Cvar_Register(NULL, "model", DEFAULT_MODEL, CVAR_USERINFO | CVAR_ARCHIVE ); +CNSTP4 0 +ARGP4 +ADDRGP4 $366 +ARGP4 +ADDRGP4 $367 +ARGP4 +CNSTI4 3 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 686 +;685: //trap_Cvar_Register(NULL, "headmodel", DEFAULT_MODEL, CVAR_USERINFO | CVAR_ARCHIVE ); +;686: trap_Cvar_Register(NULL, "team_model", DEFAULT_TEAM_MODEL, CVAR_USERINFO | CVAR_ARCHIVE ); +CNSTP4 0 +ARGP4 +ADDRGP4 $368 +ARGP4 +ADDRGP4 $367 +ARGP4 +CNSTI4 3 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 688 +;687: //trap_Cvar_Register(NULL, "team_headmodel", DEFAULT_TEAM_HEAD, CVAR_USERINFO | CVAR_ARCHIVE ); +;688: trap_Cvar_Register(NULL, "forcepowers", DEFAULT_FORCEPOWERS, CVAR_USERINFO | CVAR_ARCHIVE ); +CNSTP4 0 +ARGP4 +ADDRGP4 $369 +ARGP4 +ADDRGP4 $370 +ARGP4 +CNSTI4 3 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 691 +;689: +;690: // Cvars uses for transferring data between client and server +;691: trap_Cvar_Register(NULL, "ui_about_gametype", "0", CVAR_ROM|CVAR_INTERNAL ); +CNSTP4 0 +ARGP4 +ADDRGP4 $371 +ARGP4 +ADDRGP4 $220 +ARGP4 +CNSTI4 2112 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 692 +;692: trap_Cvar_Register(NULL, "ui_about_fraglimit", "0", CVAR_ROM|CVAR_INTERNAL ); +CNSTP4 0 +ARGP4 +ADDRGP4 $372 +ARGP4 +ADDRGP4 $220 +ARGP4 +CNSTI4 2112 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 693 +;693: trap_Cvar_Register(NULL, "ui_about_capturelimit", "0", CVAR_ROM|CVAR_INTERNAL ); +CNSTP4 0 +ARGP4 +ADDRGP4 $373 +ARGP4 +ADDRGP4 $220 +ARGP4 +CNSTI4 2112 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 694 +;694: trap_Cvar_Register(NULL, "ui_about_duellimit", "0", CVAR_ROM|CVAR_INTERNAL ); +CNSTP4 0 +ARGP4 +ADDRGP4 $374 +ARGP4 +ADDRGP4 $220 +ARGP4 +CNSTI4 2112 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 695 +;695: trap_Cvar_Register(NULL, "ui_about_timelimit", "0", CVAR_ROM|CVAR_INTERNAL ); +CNSTP4 0 +ARGP4 +ADDRGP4 $375 +ARGP4 +ADDRGP4 $220 +ARGP4 +CNSTI4 2112 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 696 +;696: trap_Cvar_Register(NULL, "ui_about_maxclients", "0", CVAR_ROM|CVAR_INTERNAL ); +CNSTP4 0 +ARGP4 +ADDRGP4 $376 +ARGP4 +ADDRGP4 $220 +ARGP4 +CNSTI4 2112 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 697 +;697: trap_Cvar_Register(NULL, "ui_about_dmflags", "0", CVAR_ROM|CVAR_INTERNAL ); +CNSTP4 0 +ARGP4 +ADDRGP4 $377 +ARGP4 +ADDRGP4 $220 +ARGP4 +CNSTI4 2112 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 698 +;698: trap_Cvar_Register(NULL, "ui_about_mapname", "0", CVAR_ROM|CVAR_INTERNAL ); +CNSTP4 0 +ARGP4 +ADDRGP4 $378 +ARGP4 +ADDRGP4 $220 +ARGP4 +CNSTI4 2112 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 699 +;699: trap_Cvar_Register(NULL, "ui_about_hostname", "0", CVAR_ROM|CVAR_INTERNAL ); +CNSTP4 0 +ARGP4 +ADDRGP4 $379 +ARGP4 +ADDRGP4 $220 +ARGP4 +CNSTI4 2112 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 700 +;700: trap_Cvar_Register(NULL, "ui_about_needpass", "0", CVAR_ROM|CVAR_INTERNAL ); +CNSTP4 0 +ARGP4 +ADDRGP4 $380 +ARGP4 +ADDRGP4 $220 +ARGP4 +CNSTI4 2112 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 701 +;701: trap_Cvar_Register(NULL, "ui_about_botminplayers", "0", CVAR_ROM|CVAR_INTERNAL ); +CNSTP4 0 +ARGP4 +ADDRGP4 $381 +ARGP4 +ADDRGP4 $220 +ARGP4 +CNSTI4 2112 +ARGI4 +ADDRGP4 trap_Cvar_Register +CALLV +pop +line 702 +;702:} +LABELV $358 +endproc CG_RegisterCvars 1036 16 +proc CG_ForceModelChange 16 8 +line 709 +;703: +;704:/* +;705:=================== +;706:CG_ForceModelChange +;707:=================== +;708:*/ +;709:static void CG_ForceModelChange( void ) { +line 712 +;710: int i; +;711: +;712: for (i=0 ; ivmCvar ); +ADDRLP4 4 +INDIRP4 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Update +CALLV +pop +line 737 +;737: } +LABELV $393 +line 735 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +LABELV $395 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cvarTableSize +INDIRI4 +LTI4 $392 +line 743 +;738: +;739: // check for modications here +;740: +;741: // If team overlay is on, ask for updates from the server. If its off, +;742: // let the server know so we don't receive it +;743: if ( drawTeamOverlayModificationCount != cg_drawTeamOverlay.modificationCount ) { +ADDRGP4 drawTeamOverlayModificationCount +INDIRI4 +ADDRGP4 cg_drawTeamOverlay+4 +INDIRI4 +EQI4 $396 +line 744 +;744: drawTeamOverlayModificationCount = cg_drawTeamOverlay.modificationCount; +ADDRGP4 drawTeamOverlayModificationCount +ADDRGP4 cg_drawTeamOverlay+4 +INDIRI4 +ASGNI4 +line 746 +;745: +;746: if ( cg_drawTeamOverlay.integer > 0 ) { +ADDRGP4 cg_drawTeamOverlay+12 +INDIRI4 +CNSTI4 0 +LEI4 $400 +line 747 +;747: trap_Cvar_Set( "teamoverlay", "1" ); +ADDRGP4 $314 +ARGP4 +ADDRGP4 $222 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 748 +;748: } else { +ADDRGP4 $401 +JUMPV +LABELV $400 +line 749 +;749: trap_Cvar_Set( "teamoverlay", "0" ); +ADDRGP4 $314 +ARGP4 +ADDRGP4 $220 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 750 +;750: } +LABELV $401 +line 752 +;751: // FIXME E3 HACK +;752: trap_Cvar_Set( "teamoverlay", "1" ); +ADDRGP4 $314 +ARGP4 +ADDRGP4 $222 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 753 +;753: } +LABELV $396 +line 756 +;754: +;755: // if force model changed +;756: if ( forceModelModificationCount != cg_forceModel.modificationCount ) { +ADDRGP4 forceModelModificationCount +INDIRI4 +ADDRGP4 cg_forceModel+4 +INDIRI4 +EQI4 $403 +line 757 +;757: forceModelModificationCount = cg_forceModel.modificationCount; +ADDRGP4 forceModelModificationCount +ADDRGP4 cg_forceModel+4 +INDIRI4 +ASGNI4 +line 758 +;758: CG_ForceModelChange(); +ADDRGP4 CG_ForceModelChange +CALLV +pop +line 759 +;759: } +LABELV $403 +line 760 +;760:} +LABELV $391 +endproc CG_UpdateCvars 8 8 +export CG_CrosshairPlayer +proc CG_CrosshairPlayer 0 0 +line 762 +;761: +;762:int CG_CrosshairPlayer( void ) { +line 763 +;763: if ( cg.time > ( cg.crosshairClientTime + 1000 ) ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+13100 +INDIRI4 +CNSTI4 1000 +ADDI4 +LEI4 $408 +line 764 +;764: return -1; +CNSTI4 -1 +RETI4 +ADDRGP4 $407 +JUMPV +LABELV $408 +line 767 +;765: } +;766: +;767: if (cg.crosshairClientNum >= MAX_CLIENTS) +ADDRGP4 cg+13096 +INDIRI4 +CNSTI4 32 +LTI4 $412 +line 768 +;768: { +line 769 +;769: return -1; +CNSTI4 -1 +RETI4 +ADDRGP4 $407 +JUMPV +LABELV $412 +line 772 +;770: } +;771: +;772: return cg.crosshairClientNum; +ADDRGP4 cg+13096 +INDIRI4 +RETI4 +LABELV $407 +endproc CG_CrosshairPlayer 0 0 +export CG_LastAttacker +proc CG_LastAttacker 0 0 +line 775 +;773:} +;774: +;775:int CG_LastAttacker( void ) { +line 776 +;776: if ( !cg.attackerTime ) { +ADDRGP4 cg+13112 +INDIRI4 +CNSTI4 0 +NEI4 $417 +line 777 +;777: return -1; +CNSTI4 -1 +RETI4 +ADDRGP4 $416 +JUMPV +LABELV $417 +line 779 +;778: } +;779: return cg.snap->ps.persistant[PERS_ATTACKER]; +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 348 +ADDP4 +INDIRI4 +RETI4 +LABELV $416 +endproc CG_LastAttacker 0 0 +export CG_Printf +proc CG_Printf 1028 12 +line 782 +;780:} +;781: +;782:void QDECL CG_Printf( const char *msg, ... ) { +line 786 +;783: va_list argptr; +;784: char text[1024]; +;785: +;786: va_start (argptr, msg); +ADDRLP4 0 +ADDRFP4 0+4 +ASGNP4 +line 787 +;787: vsprintf (text, msg, argptr); +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 vsprintf +CALLI4 +pop +line 788 +;788: va_end (argptr); +ADDRLP4 0 +CNSTP4 0 +ASGNP4 +line 790 +;789: +;790: trap_Print( text ); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_Print +CALLV +pop +line 791 +;791:} +LABELV $421 +endproc CG_Printf 1028 12 +export CG_Error +proc CG_Error 1028 12 +line 793 +;792: +;793:void QDECL CG_Error( const char *msg, ... ) { +line 797 +;794: va_list argptr; +;795: char text[1024]; +;796: +;797: va_start (argptr, msg); +ADDRLP4 0 +ADDRFP4 0+4 +ASGNP4 +line 798 +;798: vsprintf (text, msg, argptr); +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 vsprintf +CALLI4 +pop +line 799 +;799: va_end (argptr); +ADDRLP4 0 +CNSTP4 0 +ASGNP4 +line 801 +;800: +;801: trap_Error( text ); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_Error +CALLV +pop +line 802 +;802:} +LABELV $423 +endproc CG_Error 1028 12 +export Com_Error +proc Com_Error 1028 12 +line 807 +;803: +;804:#ifndef CGAME_HARD_LINKED +;805:// this is only here so the functions in q_shared.c and bg_*.c can link (FIXME) +;806: +;807:void QDECL Com_Error( int level, const char *error, ... ) { +line 811 +;808: va_list argptr; +;809: char text[1024]; +;810: +;811: va_start (argptr, error); +ADDRLP4 0 +ADDRFP4 4+4 +ASGNP4 +line 812 +;812: vsprintf (text, error, argptr); +ADDRLP4 4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 vsprintf +CALLI4 +pop +line 813 +;813: va_end (argptr); +ADDRLP4 0 +CNSTP4 0 +ASGNP4 +line 815 +;814: +;815: CG_Error( "%s", text); +ADDRGP4 $427 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 816 +;816:} +LABELV $425 +endproc Com_Error 1028 12 +export Com_Printf +proc Com_Printf 1028 12 +line 818 +;817: +;818:void QDECL Com_Printf( const char *msg, ... ) { +line 822 +;819: va_list argptr; +;820: char text[1024]; +;821: +;822: va_start (argptr, msg); +ADDRLP4 0 +ADDRFP4 0+4 +ASGNP4 +line 823 +;823: vsprintf (text, msg, argptr); +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 vsprintf +CALLI4 +pop +line 824 +;824: va_end (argptr); +ADDRLP4 0 +CNSTP4 0 +ASGNP4 +line 826 +;825: +;826: CG_Printf ("%s", text); +ADDRGP4 $427 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 827 +;827:} +LABELV $428 +endproc Com_Printf 1028 12 +bss +align 1 +LABELV $431 +skip 1024 +export CG_Argv +code +proc CG_Argv 0 12 +line 836 +;828: +;829:#endif +;830: +;831:/* +;832:================ +;833:CG_Argv +;834:================ +;835:*/ +;836:const char *CG_Argv( int arg ) { +line 839 +;837: static char buffer[MAX_STRING_CHARS]; +;838: +;839: trap_Argv( arg, buffer, sizeof( buffer ) ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 $431 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 trap_Argv +CALLV +pop +line 841 +;840: +;841: return buffer; +ADDRGP4 $431 +RETP4 +LABELV $430 +endproc CG_Argv 0 12 +proc CG_RegisterItemSounds 96 12 +line 854 +;842:} +;843: +;844: +;845://======================================================================== +;846: +;847:/* +;848:================= +;849:CG_RegisterItemSounds +;850: +;851:The server says this item is used on this level +;852:================= +;853:*/ +;854:static void CG_RegisterItemSounds( int itemNum ) { +line 860 +;855: gitem_t *item; +;856: char data[MAX_QPATH]; +;857: char *s, *start; +;858: int len; +;859: +;860: item = &bg_itemlist[ itemNum ]; +ADDRLP4 76 +CNSTI4 52 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +ASGNP4 +line 862 +;861: +;862: if( item->pickup_sound ) { +ADDRLP4 76 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $433 +line 863 +;863: trap_S_RegisterSound( item->pickup_sound ); +ADDRLP4 76 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 864 +;864: } +LABELV $433 +line 867 +;865: +;866: // parse the space seperated precache string for other media +;867: s = item->sounds; +ADDRLP4 0 +ADDRLP4 76 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRP4 +ASGNP4 +line 868 +;868: if (!s || !s[0]) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $437 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $439 +LABELV $437 +line 869 +;869: return; +ADDRGP4 $432 +JUMPV +LABELV $438 +line 871 +;870: +;871: while (*s) { +line 872 +;872: start = s; +ADDRLP4 72 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $442 +JUMPV +LABELV $441 +line 873 +;873: while (*s && *s != ' ') { +line 874 +;874: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 875 +;875: } +LABELV $442 +line 873 +ADDRLP4 84 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +EQI4 $444 +ADDRLP4 84 +INDIRI4 +CNSTI4 32 +NEI4 $441 +LABELV $444 +line 877 +;876: +;877: len = s-start; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 72 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ASGNI4 +line 878 +;878: if (len >= MAX_QPATH || len < 5) { +ADDRLP4 4 +INDIRI4 +CNSTI4 64 +GEI4 $447 +ADDRLP4 4 +INDIRI4 +CNSTI4 5 +GEI4 $445 +LABELV $447 +line 879 +;879: CG_Error( "PrecacheItem: %s has bad precache string", +ADDRGP4 $448 +ARGP4 +ADDRLP4 76 +INDIRP4 +INDIRP4 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 881 +;880: item->classname); +;881: return; +ADDRGP4 $432 +JUMPV +LABELV $445 +line 883 +;882: } +;883: memcpy (data, start, len); +ADDRLP4 8 +ARGP4 +ADDRLP4 72 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 884 +;884: data[len] = 0; +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +ADDP4 +CNSTI1 0 +ASGNI1 +line 885 +;885: if ( *s ) { +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $449 +line 886 +;886: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 887 +;887: } +LABELV $449 +line 889 +;888: +;889: if ( !strcmp(data+len-3, "wav" )) { +ADDRLP4 4 +INDIRI4 +ADDRLP4 8-3 +ADDP4 +ARGP4 +ADDRGP4 $454 +ARGP4 +ADDRLP4 92 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 92 +INDIRI4 +CNSTI4 0 +NEI4 $451 +line 890 +;890: trap_S_RegisterSound( data ); +ADDRLP4 8 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 891 +;891: } +LABELV $451 +line 892 +;892: } +LABELV $439 +line 871 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $438 +line 893 +;893:} +LABELV $432 +endproc CG_RegisterItemSounds 96 12 +proc CG_RegisterSounds 560 16 +line 903 +;894: +;895: +;896:/* +;897:================= +;898:CG_RegisterSounds +;899: +;900:called during a precache command +;901:================= +;902:*/ +;903:static void CG_RegisterSounds( void ) { +line 913 +;904: int i; +;905: char items[MAX_ITEMS+1]; +;906: char name[MAX_QPATH]; +;907: const char *soundName; +;908: +;909: // voice commands +;910: // rww - no "voice commands" I guess. +;911: //CG_LoadVoiceChats(); +;912: +;913: cgs.media.oneMinuteSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM004" ); +ADDRGP4 $458 +ARGP4 +ADDRLP4 332 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+720 +ADDRLP4 332 +INDIRI4 +ASGNI4 +line 914 +;914: cgs.media.fiveMinuteSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM005" ); +ADDRGP4 $461 +ARGP4 +ADDRLP4 336 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+724 +ADDRLP4 336 +INDIRI4 +ASGNI4 +line 915 +;915: cgs.media.oneFragSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM001" ); +ADDRGP4 $464 +ARGP4 +ADDRLP4 340 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+736 +ADDRLP4 340 +INDIRI4 +ASGNI4 +line 916 +;916: cgs.media.twoFragSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM002" ); +ADDRGP4 $467 +ARGP4 +ADDRLP4 344 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+732 +ADDRLP4 344 +INDIRI4 +ASGNI4 +line 917 +;917: cgs.media.threeFragSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM003"); +ADDRGP4 $470 +ARGP4 +ADDRLP4 348 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+728 +ADDRLP4 348 +INDIRI4 +ASGNI4 +line 918 +;918: cgs.media.count3Sound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM035" ); +ADDRGP4 $473 +ARGP4 +ADDRLP4 352 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+840 +ADDRLP4 352 +INDIRI4 +ASGNI4 +line 919 +;919: cgs.media.count2Sound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM036" ); +ADDRGP4 $476 +ARGP4 +ADDRLP4 356 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+844 +ADDRLP4 356 +INDIRI4 +ASGNI4 +line 920 +;920: cgs.media.count1Sound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM037" ); +ADDRGP4 $479 +ARGP4 +ADDRLP4 360 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+848 +ADDRLP4 360 +INDIRI4 +ASGNI4 +line 921 +;921: cgs.media.countFightSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM038" ); +ADDRGP4 $482 +ARGP4 +ADDRLP4 364 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+852 +ADDRLP4 364 +INDIRI4 +ASGNI4 +line 923 +;922: +;923: cgs.media.redSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/red_glow" ); +ADDRGP4 $485 +ARGP4 +ADDRLP4 368 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+116 +ADDRLP4 368 +INDIRI4 +ASGNI4 +line 924 +;924: cgs.media.redSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/red_line" ); +ADDRGP4 $488 +ARGP4 +ADDRLP4 372 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+120 +ADDRLP4 372 +INDIRI4 +ASGNI4 +line 925 +;925: cgs.media.orangeSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/orange_glow" ); +ADDRGP4 $491 +ARGP4 +ADDRLP4 376 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+124 +ADDRLP4 376 +INDIRI4 +ASGNI4 +line 926 +;926: cgs.media.orangeSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/orange_line" ); +ADDRGP4 $494 +ARGP4 +ADDRLP4 380 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+128 +ADDRLP4 380 +INDIRI4 +ASGNI4 +line 927 +;927: cgs.media.yellowSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/yellow_glow" ); +ADDRGP4 $497 +ARGP4 +ADDRLP4 384 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+132 +ADDRLP4 384 +INDIRI4 +ASGNI4 +line 928 +;928: cgs.media.yellowSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/yellow_line" ); +ADDRGP4 $500 +ARGP4 +ADDRLP4 388 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+136 +ADDRLP4 388 +INDIRI4 +ASGNI4 +line 929 +;929: cgs.media.greenSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/green_glow" ); +ADDRGP4 $503 +ARGP4 +ADDRLP4 392 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+140 +ADDRLP4 392 +INDIRI4 +ASGNI4 +line 930 +;930: cgs.media.greenSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/green_line" ); +ADDRGP4 $506 +ARGP4 +ADDRLP4 396 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+144 +ADDRLP4 396 +INDIRI4 +ASGNI4 +line 931 +;931: cgs.media.blueSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/blue_glow" ); +ADDRGP4 $509 +ARGP4 +ADDRLP4 400 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+148 +ADDRLP4 400 +INDIRI4 +ASGNI4 +line 932 +;932: cgs.media.blueSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/blue_line" ); +ADDRGP4 $512 +ARGP4 +ADDRLP4 404 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+152 +ADDRLP4 404 +INDIRI4 +ASGNI4 +line 933 +;933: cgs.media.purpleSaberGlowShader = trap_R_RegisterShader( "gfx/effects/sabers/purple_glow" ); +ADDRGP4 $515 +ARGP4 +ADDRLP4 408 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+156 +ADDRLP4 408 +INDIRI4 +ASGNI4 +line 934 +;934: cgs.media.purpleSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/purple_line" ); +ADDRGP4 $518 +ARGP4 +ADDRLP4 412 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+160 +ADDRLP4 412 +INDIRI4 +ASGNI4 +line 935 +;935: cgs.media.saberBlurShader = trap_R_RegisterShader( "gfx/effects/sabers/saberBlur" ); +ADDRGP4 $521 +ARGP4 +ADDRLP4 416 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+164 +ADDRLP4 416 +INDIRI4 +ASGNI4 +line 937 +;936: +;937: cgs.media.yellowDroppedSaberShader = trap_R_RegisterShader("gfx/effects/yellow_glow"); +ADDRGP4 $524 +ARGP4 +ADDRLP4 420 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+168 +ADDRLP4 420 +INDIRI4 +ASGNI4 +line 939 +;938: +;939: cgs.media.rivetMarkShader = trap_R_RegisterShader( "gfx/damage/rivetmark" ); +ADDRGP4 $527 +ARGP4 +ADDRLP4 424 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+172 +ADDRLP4 424 +INDIRI4 +ASGNI4 +line 941 +;940: +;941: trap_R_RegisterShader( "gfx/effects/saberFlare" ); +ADDRGP4 $528 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 943 +;942: +;943: trap_R_RegisterShader( "powerups/ysalimarishell" ); +ADDRGP4 $529 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 944 +;944: trap_R_RegisterShader("gfx/effects/saberDamageGlow" ); +ADDRGP4 $530 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 946 +;945: +;946: trap_R_RegisterShader( "gfx/effects/forcePush" ); +ADDRGP4 $531 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 948 +;947: +;948: trap_R_RegisterShader( "gfx/misc/red_dmgshield" ); +ADDRGP4 $532 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 949 +;949: trap_R_RegisterShader( "gfx/misc/red_portashield" ); +ADDRGP4 $533 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 950 +;950: trap_R_RegisterShader( "gfx/misc/blue_dmgshield" ); +ADDRGP4 $534 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 951 +;951: trap_R_RegisterShader( "gfx/misc/blue_portashield" ); +ADDRGP4 $535 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 953 +;952: +;953: trap_R_RegisterShader( "models/map_objects/imp_mine/turret_chair_dmg.tga" ); +ADDRGP4 $536 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 955 +;954: +;955: for (i=1 ; i<9 ; i++) +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +LABELV $537 +line 956 +;956: { +line 957 +;957: trap_S_RegisterSound(va("sound/weapons/saber/saberhup%i.wav", i)); +ADDRGP4 $541 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 428 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 428 +INDIRP4 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 958 +;958: } +LABELV $538 +line 955 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 9 +LTI4 $537 +line 960 +;959: +;960: for (i=1 ; i<10 ; i++) +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +LABELV $542 +line 961 +;961: { +line 962 +;962: trap_S_RegisterSound(va("sound/weapons/saber/saberblock%i.wav", i)); +ADDRGP4 $546 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 428 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 428 +INDIRP4 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 963 +;963: } +LABELV $543 +line 960 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +LTI4 $542 +line 965 +;964: +;965: for (i=1 ; i<4 ; i++) +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +LABELV $547 +line 966 +;966: { +line 967 +;967: trap_S_RegisterSound(va("sound/weapons/saber/bounce%i.wav", i)); +ADDRGP4 $551 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 428 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 428 +INDIRP4 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 968 +;968: } +LABELV $548 +line 965 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $547 +line 970 +;969: +;970: trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ); +ADDRGP4 $552 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 971 +;971: trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" ); +ADDRGP4 $553 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 972 +;972: trap_S_RegisterSound( "sound/weapons/saber/saberoffquick.wav" ); +ADDRGP4 $554 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 973 +;973: trap_S_RegisterSound( "sound/weapons/saber/saberhitwall1" ); +ADDRGP4 $555 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 974 +;974: trap_S_RegisterSound( "sound/weapons/saber/saberhitwall2" ); +ADDRGP4 $556 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 975 +;975: trap_S_RegisterSound( "sound/weapons/saber/saberhitwall3" ); +ADDRGP4 $557 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 976 +;976: trap_S_RegisterSound("sound/weapons/saber/saberhit.wav"); +ADDRGP4 $558 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 978 +;977: +;978: cgs.media.teamHealSound = trap_S_RegisterSound("sound/weapons/force/teamheal.wav"); +ADDRGP4 $561 +ARGP4 +ADDRLP4 428 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+688 +ADDRLP4 428 +INDIRI4 +ASGNI4 +line 979 +;979: cgs.media.teamRegenSound = trap_S_RegisterSound("sound/weapons/force/teamforce.wav"); +ADDRGP4 $564 +ARGP4 +ADDRLP4 432 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+692 +ADDRLP4 432 +INDIRI4 +ASGNI4 +line 981 +;980: +;981: trap_S_RegisterSound("sound/weapons/force/heal.wav"); +ADDRGP4 $565 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 982 +;982: trap_S_RegisterSound("sound/weapons/force/speed.wav"); +ADDRGP4 $566 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 983 +;983: trap_S_RegisterSound("sound/weapons/force/see.wav"); +ADDRGP4 $567 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 984 +;984: trap_S_RegisterSound("sound/weapons/force/rage.wav"); +ADDRGP4 $568 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 985 +;985: trap_S_RegisterSound("sound/weapons/force/lightning.wav"); +ADDRGP4 $569 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 986 +;986: trap_S_RegisterSound("sound/weapons/force/lightninghit.wav"); +ADDRGP4 $570 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 987 +;987: trap_S_RegisterSound("sound/weapons/force/drain.wav"); +ADDRGP4 $571 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 988 +;988: trap_S_RegisterSound("sound/weapons/force/jumpbuild.wav"); +ADDRGP4 $572 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 989 +;989: trap_S_RegisterSound("sound/weapons/force/distract.wav"); +ADDRGP4 $573 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 990 +;990: trap_S_RegisterSound("sound/weapons/force/distractstop.wav"); +ADDRGP4 $574 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 991 +;991: trap_S_RegisterSound("sound/weapons/force/pull.wav"); +ADDRGP4 $575 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 992 +;992: trap_S_RegisterSound("sound/weapons/force/push.wav"); +ADDRGP4 $576 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 994 +;993: +;994: if (cg_buildScript.integer) +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $577 +line 995 +;995: { +line 996 +;996: trap_S_RegisterSound("sound/chars/atst/ATSTcrash.wav"); +ADDRGP4 $580 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 997 +;997: trap_S_RegisterSound("sound/chars/atst/ATSTstart.wav"); +ADDRGP4 $581 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 998 +;998: trap_S_RegisterSound("sound/chars/atst/ATSTstep1.wav"); +ADDRGP4 $582 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 999 +;999: trap_S_RegisterSound("sound/chars/atst/ATSTstep2.wav"); +ADDRGP4 $583 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1001 +;1000: +;1001: trap_S_RegisterSound("sound/weapons/atst/ATSTfire1.wav"); +ADDRGP4 $584 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1002 +;1002: trap_S_RegisterSound("sound/weapons/atst/ATSTfire2.wav"); +ADDRGP4 $585 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1003 +;1003: trap_S_RegisterSound("sound/weapons/atst/ATSTfire3.wav"); +ADDRGP4 $586 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1004 +;1004: trap_S_RegisterSound("sound/weapons/atst/ATSTfire4.wav"); +ADDRGP4 $587 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1005 +;1005: } +LABELV $577 +line 1007 +;1006: +;1007: for (i=1 ; i<3 ; i++) +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +LABELV $588 +line 1008 +;1008: { +line 1009 +;1009: trap_S_RegisterSound(va("sound/weapons/thermal/bounce%i.wav", i)); +ADDRGP4 $592 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 436 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 436 +INDIRP4 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1010 +;1010: } +LABELV $589 +line 1007 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $588 +line 1012 +;1011: +;1012: trap_S_RegisterSound("sound/movers/switches/switch2.wav"); +ADDRGP4 $593 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1013 +;1013: trap_S_RegisterSound("sound/movers/switches/switch3.wav"); +ADDRGP4 $594 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1014 +;1014: trap_S_RegisterSound("sound/ambience/spark5.wav"); +ADDRGP4 $595 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1015 +;1015: trap_S_RegisterSound("sound/chars/turret/ping.wav"); +ADDRGP4 $596 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1016 +;1016: trap_S_RegisterSound("sound/chars/turret/startup.wav"); +ADDRGP4 $597 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1017 +;1017: trap_S_RegisterSound("sound/chars/turret/shutdown.wav"); +ADDRGP4 $598 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1018 +;1018: trap_S_RegisterSound("sound/chars/turret/move.wav"); +ADDRGP4 $599 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1019 +;1019: trap_S_RegisterSound("sound/player/pickuphealth.wav"); +ADDRGP4 $600 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1020 +;1020: trap_S_RegisterSound("sound/player/pickupshield.wav"); +ADDRGP4 $601 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1022 +;1021: +;1022: trap_S_RegisterSound("sound/effects/glassbreak1.wav"); +ADDRGP4 $602 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1024 +;1023: +;1024: trap_S_RegisterSound( "sound/weapons/rocket/tick.wav" ); +ADDRGP4 $603 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1025 +;1025: trap_S_RegisterSound( "sound/weapons/rocket/lock.wav" ); +ADDRGP4 $604 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1027 +;1026: +;1027: trap_S_RegisterSound("sound/weapons/force/speedloop.wav"); +ADDRGP4 $605 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1029 +;1028: +;1029: trap_S_RegisterSound("sound/weapons/force/protecthit.mp3"); //PDSOUND_PROTECTHIT +ADDRGP4 $606 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1030 +;1030: trap_S_RegisterSound("sound/weapons/force/protect.mp3"); //PDSOUND_PROTECT +ADDRGP4 $607 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1031 +;1031: trap_S_RegisterSound("sound/weapons/force/absorbhit.mp3"); //PDSOUND_ABSORBHIT +ADDRGP4 $608 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1032 +;1032: trap_S_RegisterSound("sound/weapons/force/absorb.mp3"); //PDSOUND_ABSORB +ADDRGP4 $609 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1033 +;1033: trap_S_RegisterSound("sound/weapons/force/jump.mp3"); //PDSOUND_FORCEJUMP +ADDRGP4 $610 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1034 +;1034: trap_S_RegisterSound("sound/weapons/force/grip.mp3"); //PDSOUND_FORCEGRIP +ADDRGP4 $611 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1036 +;1035: +;1036: if ( cgs.gametype >= GT_TEAM || cg_buildScript.integer ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +GEI4 $616 +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $612 +LABELV $616 +line 1041 +;1037: +;1038:#ifdef JK2AWARDS +;1039: cgs.media.captureAwardSound = trap_S_RegisterSound( "sound/teamplay/flagcapture_yourteam.wav" ); +;1040:#endif +;1041: cgs.media.redLeadsSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM046"); +ADDRGP4 $619 +ARGP4 +ADDRLP4 436 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+784 +ADDRLP4 436 +INDIRI4 +ASGNI4 +line 1042 +;1042: cgs.media.blueLeadsSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM045"); +ADDRGP4 $622 +ARGP4 +ADDRLP4 440 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+788 +ADDRLP4 440 +INDIRI4 +ASGNI4 +line 1043 +;1043: cgs.media.teamsTiedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM032" ); +ADDRGP4 $625 +ARGP4 +ADDRLP4 444 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+792 +ADDRLP4 444 +INDIRI4 +ASGNI4 +line 1045 +;1044: +;1045: cgs.media.redScoredSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM044"); +ADDRGP4 $628 +ARGP4 +ADDRLP4 448 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+776 +ADDRLP4 448 +INDIRI4 +ASGNI4 +line 1046 +;1046: cgs.media.blueScoredSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM043" ); +ADDRGP4 $631 +ARGP4 +ADDRLP4 452 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+780 +ADDRLP4 452 +INDIRI4 +ASGNI4 +line 1048 +;1047: +;1048: if ( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY || cg_buildScript.integer ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +EQI4 $638 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +EQI4 $638 +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $632 +LABELV $638 +line 1049 +;1049: cgs.media.redFlagReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM042" ); +ADDRGP4 $641 +ARGP4 +ADDRLP4 456 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+796 +ADDRLP4 456 +INDIRI4 +ASGNI4 +line 1050 +;1050: cgs.media.blueFlagReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM041" ); +ADDRGP4 $644 +ARGP4 +ADDRLP4 460 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+800 +ADDRLP4 460 +INDIRI4 +ASGNI4 +line 1051 +;1051: cgs.media.redTookFlagSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM040" ); +ADDRGP4 $647 +ARGP4 +ADDRLP4 464 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+804 +ADDRLP4 464 +INDIRI4 +ASGNI4 +line 1052 +;1052: cgs.media.blueTookFlagSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM039" ); +ADDRGP4 $650 +ARGP4 +ADDRLP4 468 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+808 +ADDRLP4 468 +INDIRI4 +ASGNI4 +line 1054 +;1053: +;1054: cgs.media.redYsalReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM050" ); +ADDRGP4 $653 +ARGP4 +ADDRLP4 472 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+812 +ADDRLP4 472 +INDIRI4 +ASGNI4 +line 1055 +;1055: cgs.media.blueYsalReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM049" ); +ADDRGP4 $656 +ARGP4 +ADDRLP4 476 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+816 +ADDRLP4 476 +INDIRI4 +ASGNI4 +line 1056 +;1056: cgs.media.redTookYsalSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM048" ); +ADDRGP4 $659 +ARGP4 +ADDRLP4 480 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+820 +ADDRLP4 480 +INDIRI4 +ASGNI4 +line 1057 +;1057: cgs.media.blueTookYsalSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM047" ); +ADDRGP4 $662 +ARGP4 +ADDRLP4 484 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+824 +ADDRLP4 484 +INDIRI4 +ASGNI4 +line 1058 +;1058: } +LABELV $632 +line 1059 +;1059: } +LABELV $612 +line 1061 +;1060: +;1061: cgs.media.drainSound = trap_S_RegisterSound("sound/weapons/force/drained.mp3"); +ADDRGP4 $665 +ARGP4 +ADDRLP4 436 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+828 +ADDRLP4 436 +INDIRI4 +ASGNI4 +line 1063 +;1062: +;1063: cgs.media.happyMusic = trap_S_RegisterSound("music/goodsmall.mp3"); +ADDRGP4 $668 +ARGP4 +ADDRLP4 440 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+832 +ADDRLP4 440 +INDIRI4 +ASGNI4 +line 1064 +;1064: cgs.media.dramaticFailure = trap_S_RegisterSound("music/badsmall.mp3"); +ADDRGP4 $671 +ARGP4 +ADDRLP4 444 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+836 +ADDRLP4 444 +INDIRI4 +ASGNI4 +line 1067 +;1065: +;1066: //PRECACHE ALL MUSIC HERE (don't need to precache normally because it's streamed off the disk) +;1067: if (cg_buildScript.integer) +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $672 +line 1068 +;1068: { +line 1069 +;1069: trap_S_StartBackgroundTrack( "music/mp/duel.mp3", "music/mp/duel.mp3", qfalse ); +ADDRLP4 448 +ADDRGP4 $675 +ASGNP4 +ADDRLP4 448 +INDIRP4 +ARGP4 +ADDRLP4 448 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 trap_S_StartBackgroundTrack +CALLV +pop +line 1070 +;1070: } +LABELV $672 +line 1072 +;1071: +;1072: cg.loadLCARSStage = 1; +ADDRGP4 cg+13480 +CNSTI4 1 +ASGNI4 +line 1074 +;1073: +;1074: cgs.media.selectSound = trap_S_RegisterSound( "sound/weapons/change.wav" ); +ADDRGP4 $679 +ARGP4 +ADDRLP4 448 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+600 +ADDRLP4 448 +INDIRI4 +ASGNI4 +line 1076 +;1075: +;1076: cgs.media.teleInSound = trap_S_RegisterSound( "sound/player/telein.wav" ); +ADDRGP4 $682 +ARGP4 +ADDRLP4 452 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+696 +ADDRLP4 452 +INDIRI4 +ASGNI4 +line 1077 +;1077: cgs.media.teleOutSound = trap_S_RegisterSound( "sound/player/teleout.wav" ); +ADDRGP4 $685 +ARGP4 +ADDRLP4 456 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+700 +ADDRLP4 456 +INDIRI4 +ASGNI4 +line 1078 +;1078: cgs.media.respawnSound = trap_S_RegisterSound( "sound/items/respawn1.wav" ); +ADDRGP4 $688 +ARGP4 +ADDRLP4 460 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+704 +ADDRLP4 460 +INDIRI4 +ASGNI4 +line 1080 +;1079: +;1080: trap_S_RegisterSound( "sound/movers/objects/objectHit.wav" ); +ADDRGP4 $689 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1082 +;1081: +;1082: cgs.media.talkSound = trap_S_RegisterSound( "sound/player/talk.wav" ); +ADDRGP4 $692 +ARGP4 +ADDRLP4 464 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+708 +ADDRLP4 464 +INDIRI4 +ASGNI4 +line 1083 +;1083: cgs.media.landSound = trap_S_RegisterSound( "sound/player/land1.wav"); +ADDRGP4 $695 +ARGP4 +ADDRLP4 468 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+712 +ADDRLP4 468 +INDIRI4 +ASGNI4 +line 1084 +;1084: cgs.media.fallSound = trap_S_RegisterSound( "sound/player/fallsplat.wav"); +ADDRGP4 $698 +ARGP4 +ADDRLP4 472 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+716 +ADDRLP4 472 +INDIRI4 +ASGNI4 +line 1086 +;1085: +;1086: cgs.media.crackleSound = trap_S_RegisterSound( "sound/effects/energy_crackle.wav" ); +ADDRGP4 $701 +ARGP4 +ADDRLP4 476 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+676 +ADDRLP4 476 +INDIRI4 +ASGNI4 +line 1095 +;1087:#ifdef JK2AWARDS +;1088: cgs.media.impressiveSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM025" ); +;1089: cgs.media.excellentSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM053" ); +;1090: cgs.media.deniedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM017" ); +;1091: cgs.media.humiliationSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM019" ); +;1092: cgs.media.defendSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM024" ); +;1093:#endif +;1094: +;1095: cgs.media.takenLeadSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM051"); +ADDRGP4 $704 +ARGP4 +ADDRLP4 480 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+740 +ADDRLP4 480 +INDIRI4 +ASGNI4 +line 1096 +;1096: cgs.media.tiedLeadSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM032"); +ADDRGP4 $625 +ARGP4 +ADDRLP4 484 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+744 +ADDRLP4 484 +INDIRI4 +ASGNI4 +line 1097 +;1097: cgs.media.lostLeadSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM052"); +ADDRGP4 $709 +ARGP4 +ADDRLP4 488 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+748 +ADDRLP4 488 +INDIRI4 +ASGNI4 +line 1099 +;1098: +;1099: cgs.media.rollSound = trap_S_RegisterSound( "sound/player/roll1.wav"); +ADDRGP4 $712 +ARGP4 +ADDRLP4 492 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+752 +ADDRLP4 492 +INDIRI4 +ASGNI4 +line 1101 +;1100: +;1101: cgs.media.watrInSound = trap_S_RegisterSound( "sound/player/watr_in.wav"); +ADDRGP4 $715 +ARGP4 +ADDRLP4 496 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+756 +ADDRLP4 496 +INDIRI4 +ASGNI4 +line 1102 +;1102: cgs.media.watrOutSound = trap_S_RegisterSound( "sound/player/watr_out.wav"); +ADDRGP4 $718 +ARGP4 +ADDRLP4 500 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+760 +ADDRLP4 500 +INDIRI4 +ASGNI4 +line 1103 +;1103: cgs.media.watrUnSound = trap_S_RegisterSound( "sound/player/watr_un.wav"); +ADDRGP4 $721 +ARGP4 +ADDRLP4 504 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+764 +ADDRLP4 504 +INDIRI4 +ASGNI4 +line 1105 +;1104: +;1105: cgs.media.explosionModel = trap_R_RegisterModel ( "models/map_objects/mp/sphere.md3" ); +ADDRGP4 $724 +ARGP4 +ADDRLP4 508 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+552 +ADDRLP4 508 +INDIRI4 +ASGNI4 +line 1106 +;1106: cgs.media.surfaceExplosionShader = trap_R_RegisterShader( "surfaceExplosion" ); +ADDRGP4 $727 +ARGP4 +ADDRLP4 512 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+556 +ADDRLP4 512 +INDIRI4 +ASGNI4 +line 1108 +;1107: +;1108: cgs.media.disruptorShader = trap_R_RegisterShader( "gfx/effects/burn"); +ADDRGP4 $730 +ARGP4 +ADDRLP4 516 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+560 +ADDRLP4 516 +INDIRI4 +ASGNI4 +line 1110 +;1109: +;1110: if (cg_buildScript.integer) +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $731 +line 1111 +;1111: { +line 1112 +;1112: trap_R_RegisterShader( "gfx/effects/turretflashdie" ); +ADDRGP4 $734 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 1113 +;1113: } +LABELV $731 +line 1115 +;1114: +;1115: cgs.media.solidWhite = trap_R_RegisterShader( "gfx/effects/solidWhite_cull" ); +ADDRGP4 $737 +ARGP4 +ADDRLP4 520 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+564 +ADDRLP4 520 +INDIRI4 +ASGNI4 +line 1117 +;1116: +;1117: trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable"); +ADDRGP4 $738 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 1118 +;1118: trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable"); +ADDRGP4 $739 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 1120 +;1119: +;1120: trap_R_RegisterModel ( "models/map_objects/mp/sphere.md3" ); +ADDRGP4 $724 +ARGP4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +pop +line 1121 +;1121: trap_R_RegisterModel("models/items/remote.md3"); +ADDRGP4 $740 +ARGP4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +pop +line 1123 +;1122: +;1123: cgs.media.holocronPickup = trap_S_RegisterSound( "sound/player/holocron.wav" ); +ADDRGP4 $743 +ARGP4 +ADDRLP4 524 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1248 +ADDRLP4 524 +INDIRI4 +ASGNI4 +line 1126 +;1124: +;1125: // Zoom +;1126: cgs.media.zoomStart = trap_S_RegisterSound( "sound/interface/zoomstart.wav" ); +ADDRGP4 $746 +ARGP4 +ADDRLP4 528 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1252 +ADDRLP4 528 +INDIRI4 +ASGNI4 +line 1127 +;1127: cgs.media.zoomLoop = trap_S_RegisterSound( "sound/interface/zoomloop.wav" ); +ADDRGP4 $749 +ARGP4 +ADDRLP4 532 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1256 +ADDRLP4 532 +INDIRI4 +ASGNI4 +line 1128 +;1128: cgs.media.zoomEnd = trap_S_RegisterSound( "sound/interface/zoomend.wav" ); +ADDRGP4 $752 +ARGP4 +ADDRLP4 536 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1260 +ADDRLP4 536 +INDIRI4 +ASGNI4 +line 1130 +;1129: +;1130: for (i=0 ; i<4 ; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $753 +line 1131 +;1131: Com_sprintf (name, sizeof(name), "sound/player/footsteps/boot%i.wav", i+1); +ADDRLP4 4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $757 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1132 +;1132: cgs.media.footsteps[FOOTSTEP_NORMAL][i] = trap_S_RegisterSound (name); +ADDRLP4 4 +ARGP4 +ADDRLP4 540 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+604 +ADDP4 +ADDRLP4 540 +INDIRI4 +ASGNI4 +line 1134 +;1133: +;1134: Com_sprintf (name, sizeof(name), "sound/player/footsteps/splash%i.wav", i+1); +ADDRLP4 4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $760 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1135 +;1135: cgs.media.footsteps[FOOTSTEP_SPLASH][i] = trap_S_RegisterSound (name); +ADDRLP4 4 +ARGP4 +ADDRLP4 544 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+604+32 +ADDP4 +ADDRLP4 544 +INDIRI4 +ASGNI4 +line 1137 +;1136: +;1137: Com_sprintf (name, sizeof(name), "sound/player/footsteps/clank%i.wav", i+1); +ADDRLP4 4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $764 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1138 +;1138: cgs.media.footsteps[FOOTSTEP_METAL][i] = trap_S_RegisterSound (name); +ADDRLP4 4 +ARGP4 +ADDRLP4 548 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+604+16 +ADDP4 +ADDRLP4 548 +INDIRI4 +ASGNI4 +line 1141 +;1139: +;1140: // should these always be registered?? +;1141: Com_sprintf (name, sizeof(name), "sound/player/footsteps/step%i.wav", i+1); +ADDRLP4 4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $768 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1142 +;1142: trap_S_RegisterSound (name); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 1143 +;1143: } +LABELV $754 +line 1130 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $753 +line 1146 +;1144: +;1145: // only register the items that the server says we need +;1146: strcpy( items, CG_ConfigString( CS_ITEMS ) ); +CNSTI4 27 +ARGI4 +ADDRLP4 540 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 72 +ARGP4 +ADDRLP4 540 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 1148 +;1147: +;1148: for ( i = 1 ; i < bg_numItems ; i++ ) { +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +ADDRGP4 $772 +JUMPV +LABELV $769 +line 1150 +;1149:// if ( items[ i ] == '1' || cg_buildScript.integer ) { +;1150: CG_RegisterItemSounds( i ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 CG_RegisterItemSounds +CALLV +pop +line 1152 +;1151:// } +;1152: } +LABELV $770 +line 1148 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $772 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_numItems +INDIRI4 +LTI4 $769 +line 1154 +;1153: +;1154: for ( i = 1 ; i < MAX_SOUNDS ; i++ ) { +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +LABELV $773 +line 1155 +;1155: soundName = CG_ConfigString( CS_SOUNDS+i ); +ADDRLP4 0 +INDIRI4 +CNSTI4 288 +ADDI4 +ARGI4 +ADDRLP4 544 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 68 +ADDRLP4 544 +INDIRP4 +ASGNP4 +line 1156 +;1156: if ( !soundName[0] ) { +ADDRLP4 68 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $777 +line 1157 +;1157: break; +ADDRGP4 $775 +JUMPV +LABELV $777 +line 1159 +;1158: } +;1159: if ( soundName[0] == '*' ) { +ADDRLP4 68 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 42 +NEI4 $779 +line 1160 +;1160: continue; // custom sound +ADDRGP4 $774 +JUMPV +LABELV $779 +line 1162 +;1161: } +;1162: cgs.gameSounds[i] = trap_S_RegisterSound( soundName ); +ADDRLP4 68 +INDIRP4 +ARGP4 +ADDRLP4 548 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388 +ADDP4 +ADDRLP4 548 +INDIRI4 +ASGNI4 +line 1163 +;1163: } +LABELV $774 +line 1154 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 256 +LTI4 $773 +LABELV $775 +line 1165 +;1164: +;1165: for ( i = 1 ; i < MAX_FX ; i++ ) { +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +LABELV $782 +line 1166 +;1166: soundName = CG_ConfigString( CS_EFFECTS+i ); +ADDRLP4 0 +INDIRI4 +CNSTI4 768 +ADDI4 +ARGI4 +ADDRLP4 544 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 68 +ADDRLP4 544 +INDIRP4 +ASGNP4 +line 1167 +;1167: if ( !soundName[0] ) { +ADDRLP4 68 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $786 +line 1168 +;1168: break; +ADDRGP4 $784 +JUMPV +LABELV $786 +line 1170 +;1169: } +;1170: if ( soundName[0] == '*' ) { +ADDRLP4 68 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 42 +NEI4 $788 +line 1171 +;1171: continue; // custom sound +ADDRGP4 $783 +JUMPV +LABELV $788 +line 1173 +;1172: } +;1173: cgs.gameEffects[i] = trap_FX_RegisterEffect( soundName ); +ADDRLP4 68 +INDIRP4 +ARGP4 +ADDRLP4 548 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+38412 +ADDP4 +ADDRLP4 548 +INDIRI4 +ASGNI4 +line 1174 +;1174: } +LABELV $783 +line 1165 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 64 +LTI4 $782 +LABELV $784 +line 1176 +;1175: +;1176: cg.loadLCARSStage = 2; +ADDRGP4 cg+13480 +CNSTI4 2 +ASGNI4 +line 1179 +;1177: +;1178: // FIXME: only needed with item +;1179: cgs.media.deploySeeker = trap_S_RegisterSound ("sound/chars/seeker/misc/hiss"); +ADDRGP4 $794 +ARGP4 +ADDRLP4 544 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+768 +ADDRLP4 544 +INDIRI4 +ASGNI4 +line 1180 +;1180: cgs.media.medkitSound = trap_S_RegisterSound ("sound/items/use_bacta.wav"); +ADDRGP4 $797 +ARGP4 +ADDRLP4 548 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+772 +ADDRLP4 548 +INDIRI4 +ASGNI4 +line 1182 +;1181: +;1182: cgs.media.winnerSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM006" ); +ADDRGP4 $800 +ARGP4 +ADDRLP4 552 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+668 +ADDRLP4 552 +INDIRI4 +ASGNI4 +line 1183 +;1183: cgs.media.loserSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM010" ); +ADDRGP4 $803 +ARGP4 +ADDRLP4 556 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+672 +ADDRLP4 556 +INDIRI4 +ASGNI4 +line 1184 +;1184:} +LABELV $455 +endproc CG_RegisterSounds 560 16 +proc CG_RegisterEffects 12 4 +line 1195 +;1185: +;1186: +;1187://------------------------------------- +;1188:// CG_RegisterEffects +;1189:// +;1190:// Handles precaching all effect files +;1191:// and any shader, model, or sound +;1192:// files an effect may use. +;1193://------------------------------------- +;1194:static void CG_RegisterEffects( void ) +;1195:{ +line 1199 +;1196: const char *effectName; +;1197: int i; +;1198: +;1199: for ( i = 1 ; i < MAX_FX ; i++ ) +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +LABELV $805 +line 1200 +;1200: { +line 1201 +;1201: effectName = CG_ConfigString( CS_EFFECTS + i ); +ADDRLP4 0 +INDIRI4 +CNSTI4 768 +ADDI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 1203 +;1202: +;1203: if ( !effectName[0] ) +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $809 +line 1204 +;1204: { +line 1205 +;1205: break; +ADDRGP4 $807 +JUMPV +LABELV $809 +line 1208 +;1206: } +;1207: +;1208: trap_FX_RegisterEffect( effectName ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1209 +;1209: } +LABELV $806 +line 1199 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 64 +LTI4 $805 +LABELV $807 +line 1212 +;1210: +;1211: // Set up the glass effects mini-system. +;1212: CG_InitGlass(); +ADDRGP4 CG_InitGlass +CALLV +pop +line 1213 +;1213:} +LABELV $804 +endproc CG_RegisterEffects 12 4 +data +align 4 +LABELV $812 +address $813 +address $814 +address $815 +address $816 +address $817 +address $818 +address $819 +address $820 +address $821 +address $822 +address $823 +align 4 +LABELV $824 +address $825 +address $826 +address $827 +address $828 +address $829 +address $830 +address $831 +address $832 +address $833 +address $834 +address $835 +align 4 +LABELV $836 +address $837 +address $838 +address $839 +address $840 +address $841 +address $842 +address $843 +address $844 +address $845 +address $846 +address $835 +code +proc CG_RegisterGraphics 548 16 +line 1225 +;1214: +;1215://=================================================================================== +;1216: +;1217:extern char *forceHolocronModels[]; +;1218:/* +;1219:================= +;1220:CG_RegisterGraphics +;1221: +;1222:This function may execute for a couple of minutes with a slow disk. +;1223:================= +;1224:*/ +;1225:static void CG_RegisterGraphics( void ) { +line 1271 +;1226: int i; +;1227: char items[MAX_ITEMS+1]; +;1228: static char *sb_nums[11] = { +;1229: "gfx/2d/numbers/zero", +;1230: "gfx/2d/numbers/one", +;1231: "gfx/2d/numbers/two", +;1232: "gfx/2d/numbers/three", +;1233: "gfx/2d/numbers/four", +;1234: "gfx/2d/numbers/five", +;1235: "gfx/2d/numbers/six", +;1236: "gfx/2d/numbers/seven", +;1237: "gfx/2d/numbers/eight", +;1238: "gfx/2d/numbers/nine", +;1239: "gfx/2d/numbers/minus", +;1240: }; +;1241: +;1242: static char *sb_t_nums[11] = { +;1243: "gfx/2d/numbers/t_zero", +;1244: "gfx/2d/numbers/t_one", +;1245: "gfx/2d/numbers/t_two", +;1246: "gfx/2d/numbers/t_three", +;1247: "gfx/2d/numbers/t_four", +;1248: "gfx/2d/numbers/t_five", +;1249: "gfx/2d/numbers/t_six", +;1250: "gfx/2d/numbers/t_seven", +;1251: "gfx/2d/numbers/t_eight", +;1252: "gfx/2d/numbers/t_nine", +;1253: "gfx/2d/numbers/t_minus", +;1254: }; +;1255: +;1256: static char *sb_c_nums[11] = { +;1257: "gfx/2d/numbers/c_zero", +;1258: "gfx/2d/numbers/c_one", +;1259: "gfx/2d/numbers/c_two", +;1260: "gfx/2d/numbers/c_three", +;1261: "gfx/2d/numbers/c_four", +;1262: "gfx/2d/numbers/c_five", +;1263: "gfx/2d/numbers/c_six", +;1264: "gfx/2d/numbers/c_seven", +;1265: "gfx/2d/numbers/c_eight", +;1266: "gfx/2d/numbers/c_nine", +;1267: "gfx/2d/numbers/t_minus", //????? +;1268: }; +;1269: +;1270: // clear any references to old media +;1271: memset( &cg.refdef, 0, sizeof( cg.refdef ) ); +ADDRGP4 cg+3616 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 368 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 1272 +;1272: trap_R_ClearScene(); +ADDRGP4 trap_R_ClearScene +CALLV +pop +line 1274 +;1273: +;1274: CG_LoadingString( cgs.mapname ); +ADDRGP4 cgs+33008 +ARGP4 +ADDRGP4 CG_LoadingString +CALLV +pop +line 1276 +;1275: +;1276: trap_R_LoadWorldMap( cgs.mapname ); +ADDRGP4 cgs+33008 +ARGP4 +ADDRGP4 trap_R_LoadWorldMap +CALLV +pop +line 1279 +;1277: +;1278: // precache status bar pics +;1279: CG_LoadingString( "game media" ); +ADDRGP4 $851 +ARGP4 +ADDRGP4 CG_LoadingString +CALLV +pop +line 1281 +;1280: +;1281: for ( i=0 ; i<11 ; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $852 +line 1282 +;1282: cgs.media.numberShaders[i] = trap_R_RegisterShader( sb_nums[i] ); +ADDRLP4 264 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 264 +INDIRI4 +ADDRGP4 $812 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 268 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 264 +INDIRI4 +ADDRGP4 cgs+70296+264 +ADDP4 +ADDRLP4 268 +INDIRI4 +ASGNI4 +line 1283 +;1283: } +LABELV $853 +line 1281 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 11 +LTI4 $852 +line 1285 +;1284: +;1285: cg.loadLCARSStage = 3; +ADDRGP4 cg+13480 +CNSTI4 3 +ASGNI4 +line 1287 +;1286: +;1287: for ( i=0; i < 11; i++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $859 +line 1288 +;1288: { +line 1289 +;1289: cgs.media.numberShaders[i] = trap_R_RegisterShaderNoMip( sb_nums[i] ); +ADDRLP4 264 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 264 +INDIRI4 +ADDRGP4 $812 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 268 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 264 +INDIRI4 +ADDRGP4 cgs+70296+264 +ADDP4 +ADDRLP4 268 +INDIRI4 +ASGNI4 +line 1290 +;1290: cgs.media.smallnumberShaders[i] = trap_R_RegisterShaderNoMip( sb_t_nums[i] ); +ADDRLP4 272 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 272 +INDIRI4 +ADDRGP4 $824 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 276 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 272 +INDIRI4 +ADDRGP4 cgs+70296+308 +ADDP4 +ADDRLP4 276 +INDIRI4 +ASGNI4 +line 1291 +;1291: cgs.media.chunkyNumberShaders[i] = trap_R_RegisterShaderNoMip( sb_c_nums[i] ); +ADDRLP4 280 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 280 +INDIRI4 +ADDRGP4 $836 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 284 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 280 +INDIRI4 +ADDRGP4 cgs+70296+352 +ADDP4 +ADDRLP4 284 +INDIRI4 +ASGNI4 +line 1292 +;1292: } +LABELV $860 +line 1287 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 11 +LTI4 $859 +line 1294 +;1293: +;1294: cgs.media.balloonShader = trap_R_RegisterShader( "gfx/mp/chat_icon" ); +ADDRGP4 $871 +ARGP4 +ADDRLP4 264 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+184 +ADDRLP4 264 +INDIRI4 +ASGNI4 +line 1296 +;1295: +;1296: cgs.media.viewBloodShader = trap_R_RegisterShader( "viewBloodBlend" ); +ADDRGP4 $874 +ARGP4 +ADDRLP4 268 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+192 +ADDRLP4 268 +INDIRI4 +ASGNI4 +line 1298 +;1297: +;1298: cgs.media.deferShader = trap_R_RegisterShaderNoMip( "gfx/2d/defer.tga" ); +ADDRGP4 $877 +ARGP4 +ADDRLP4 272 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+108 +ADDRLP4 272 +INDIRI4 +ASGNI4 +line 1300 +;1299: +;1300: cgs.media.smokePuffShader = trap_R_RegisterShader( "smokePuff" ); +ADDRGP4 $880 +ARGP4 +ADDRLP4 276 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+252 +ADDRLP4 276 +INDIRI4 +ASGNI4 +line 1301 +;1301: cgs.media.bloodTrailShader = trap_R_RegisterShader( "bloodTrail" ); +ADDRGP4 $883 +ARGP4 +ADDRLP4 280 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+260 +ADDRLP4 280 +INDIRI4 +ASGNI4 +line 1302 +;1302: cgs.media.lagometerShader = trap_R_RegisterShaderNoMip("gfx/2d/lag" ); +ADDRGP4 $886 +ARGP4 +ADDRLP4 284 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+240 +ADDRLP4 284 +INDIRI4 +ASGNI4 +line 1303 +;1303: cgs.media.connectionShader = trap_R_RegisterShaderNoMip( "gfx/2d/net" ); +ADDRGP4 $889 +ARGP4 +ADDRLP4 288 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+188 +ADDRLP4 288 +INDIRI4 +ASGNI4 +line 1305 +;1304: +;1305: cgs.media.waterBubbleShader = trap_R_RegisterShader( "waterBubble" ); +ADDRGP4 $892 +ARGP4 +ADDRLP4 292 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+256 +ADDRLP4 292 +INDIRI4 +ASGNI4 +line 1307 +;1306: +;1307: cgs.media.tracerShader = trap_R_RegisterShader( "gfx/misc/tracer" ); +ADDRGP4 $895 +ARGP4 +ADDRLP4 296 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+196 +ADDRLP4 296 +INDIRI4 +ASGNI4 +line 1309 +;1308: +;1309: Com_Printf( S_COLOR_CYAN "---------- Fx System Initialization ---------\n" ); +ADDRGP4 $896 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 1310 +;1310: trap_FX_InitSystem(); +ADDRGP4 trap_FX_InitSystem +CALLI4 +pop +line 1311 +;1311: Com_Printf( S_COLOR_CYAN "----- Fx System Initialization Complete -----\n" ); +ADDRGP4 $897 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 1312 +;1312: CG_RegisterEffects(); +ADDRGP4 CG_RegisterEffects +CALLV +pop +line 1315 +;1313: +;1314: +;1315: cgs.effects.turretShotEffect = trap_FX_RegisterEffect( "turret/shot" ); +ADDRGP4 $900 +ARGP4 +ADDRLP4 300 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+164 +ADDRLP4 300 +INDIRI4 +ASGNI4 +line 1317 +;1316: +;1317: trap_FX_RegisterEffect("effects/blaster/deflect.efx"); +ADDRGP4 $901 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1319 +;1318: +;1319: trap_FX_RegisterEffect("emplaced/dead_smoke.efx"); +ADDRGP4 $902 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1320 +;1320: trap_FX_RegisterEffect("emplaced/explode.efx"); +ADDRGP4 $903 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1322 +;1321: +;1322: trap_FX_RegisterEffect("turret/explode.efx"); +ADDRGP4 $904 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1324 +;1323: +;1324: trap_FX_RegisterEffect("spark_explosion.efx"); +ADDRGP4 $905 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1326 +;1325: +;1326: trap_FX_RegisterEffect("effects/turret/muzzle_flash.efx"); +ADDRGP4 $906 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1327 +;1327: trap_FX_RegisterEffect("saber/spark.efx"); +ADDRGP4 $907 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1328 +;1328: trap_FX_RegisterEffect("mp/spawn.efx"); +ADDRGP4 $908 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1329 +;1329: trap_FX_RegisterEffect("mp/jedispawn.efx"); +ADDRGP4 $909 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1330 +;1330: trap_FX_RegisterEffect("mp/itemcone.efx"); +ADDRGP4 $910 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1331 +;1331: trap_FX_RegisterEffect("blaster/deflect.efx"); +ADDRGP4 $911 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1332 +;1332: trap_FX_RegisterEffect("saber/saber_block.efx"); +ADDRGP4 $912 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1333 +;1333: trap_FX_RegisterEffect("saber/spark.efx"); +ADDRGP4 $907 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1334 +;1334: trap_FX_RegisterEffect("saber/blood_sparks.efx"); +ADDRGP4 $913 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1335 +;1335: trap_FX_RegisterEffect("blaster/smoke_bolton"); +ADDRGP4 $914 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1336 +;1336: trap_FX_RegisterEffect("force/confusion.efx"); +ADDRGP4 $915 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1338 +;1337: +;1338: trap_FX_RegisterEffect("effects/force/lightning.efx"); +ADDRGP4 $916 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 1341 +;1339: +;1340: +;1341: for ( i = 0 ; i < NUM_CROSSHAIRS ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $917 +line 1342 +;1342: cgs.media.crosshairShader[i] = trap_R_RegisterShader( va("gfx/2d/crosshair%c", 'a'+i) ); +ADDRGP4 $923 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 97 +ADDI4 +ARGI4 +ADDRLP4 308 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 308 +INDIRP4 +ARGP4 +ADDRLP4 312 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+200 +ADDP4 +ADDRLP4 312 +INDIRI4 +ASGNI4 +line 1343 +;1343: } +LABELV $918 +line 1341 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +LTI4 $917 +line 1345 +;1344: +;1345: cg.loadLCARSStage = 4; +ADDRGP4 cg+13480 +CNSTI4 4 +ASGNI4 +line 1347 +;1346: +;1347: cgs.media.backTileShader = trap_R_RegisterShader( "gfx/2d/backtile" ); +ADDRGP4 $927 +ARGP4 +ADDRLP4 304 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+244 +ADDRLP4 304 +INDIRI4 +ASGNI4 +line 1348 +;1348: cgs.media.noammoShader = trap_R_RegisterShader( "icons/noammo" ); +ADDRGP4 $930 +ARGP4 +ADDRLP4 308 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+248 +ADDRLP4 308 +INDIRI4 +ASGNI4 +line 1351 +;1349: +;1350: // powerup shaders +;1351: cgs.media.quadShader = trap_R_RegisterShader("powerups/quad" ); +ADDRGP4 $933 +ARGP4 +ADDRLP4 312 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+448 +ADDRLP4 312 +INDIRI4 +ASGNI4 +line 1352 +;1352: cgs.media.quadWeaponShader = trap_R_RegisterShader("powerups/quadWeapon" ); +ADDRGP4 $936 +ARGP4 +ADDRLP4 316 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+456 +ADDRLP4 316 +INDIRI4 +ASGNI4 +line 1353 +;1353: cgs.media.battleSuitShader = trap_R_RegisterShader("powerups/battleSuit" ); +ADDRGP4 $939 +ARGP4 +ADDRLP4 320 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+468 +ADDRLP4 320 +INDIRI4 +ASGNI4 +line 1354 +;1354: cgs.media.battleWeaponShader = trap_R_RegisterShader("powerups/battleWeapon" ); +ADDRGP4 $942 +ARGP4 +ADDRLP4 324 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+472 +ADDRLP4 324 +INDIRI4 +ASGNI4 +line 1355 +;1355: cgs.media.invisShader = trap_R_RegisterShader("powerups/invisibility" ); +ADDRGP4 $945 +ARGP4 +ADDRLP4 328 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+460 +ADDRLP4 328 +INDIRI4 +ASGNI4 +line 1356 +;1356: cgs.media.regenShader = trap_R_RegisterShader("powerups/regen" ); +ADDRGP4 $948 +ARGP4 +ADDRLP4 332 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+464 +ADDRLP4 332 +INDIRI4 +ASGNI4 +line 1357 +;1357: cgs.media.hastePuffShader = trap_R_RegisterShader("hasteSmokePuff" ); +ADDRGP4 $951 +ARGP4 +ADDRLP4 336 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+476 +ADDRLP4 336 +INDIRI4 +ASGNI4 +line 1359 +;1358: +;1359: cgs.media.itemRespawningPlaceholder = trap_R_RegisterShader("powerups/placeholder"); +ADDRGP4 $954 +ARGP4 +ADDRLP4 340 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+480 +ADDRLP4 340 +INDIRI4 +ASGNI4 +line 1360 +;1360: cgs.media.itemRespawningRezOut = trap_R_RegisterShader("powerups/rezout"); +ADDRGP4 $957 +ARGP4 +ADDRLP4 344 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+484 +ADDRLP4 344 +INDIRI4 +ASGNI4 +line 1362 +;1361: +;1362: cgs.media.playerShieldDamage = trap_R_RegisterShader("gfx/misc/personalshield"); +ADDRGP4 $960 +ARGP4 +ADDRLP4 348 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+488 +ADDRLP4 348 +INDIRI4 +ASGNI4 +line 1363 +;1363: cgs.media.forceSightBubble = trap_R_RegisterShader("gfx/misc/sightbubble"); +ADDRGP4 $963 +ARGP4 +ADDRLP4 352 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+492 +ADDRLP4 352 +INDIRI4 +ASGNI4 +line 1364 +;1364: cgs.media.forceShell = trap_R_RegisterShader("powerups/forceshell"); +ADDRGP4 $966 +ARGP4 +ADDRLP4 356 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+496 +ADDRLP4 356 +INDIRI4 +ASGNI4 +line 1365 +;1365: cgs.media.sightShell = trap_R_RegisterShader("powerups/sightshell"); +ADDRGP4 $969 +ARGP4 +ADDRLP4 360 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+500 +ADDRLP4 360 +INDIRI4 +ASGNI4 +line 1367 +;1366: +;1367: cgs.media.itemHoloModel = trap_R_RegisterModel("models/map_objects/mp/holo.md3"); +ADDRGP4 $972 +ARGP4 +ADDRLP4 364 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+32 +ADDRLP4 364 +INDIRI4 +ASGNI4 +line 1369 +;1368: +;1369: if (cgs.gametype == GT_HOLOCRON || cg_buildScript.integer) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 1 +EQI4 $977 +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $973 +LABELV $977 +line 1370 +;1370: { +line 1371 +;1371: for ( i=0; i < NUM_FORCE_POWERS; i++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $978 +line 1372 +;1372: { +line 1373 +;1373: if (forceHolocronModels[i] && +ADDRLP4 368 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forceHolocronModels +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 368 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $982 +ADDRLP4 368 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $982 +line 1375 +;1374: forceHolocronModels[i][0]) +;1375: { +line 1376 +;1376: trap_R_RegisterModel(forceHolocronModels[i]); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forceHolocronModels +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +pop +line 1377 +;1377: } +LABELV $982 +line 1378 +;1378: } +LABELV $979 +line 1371 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $978 +line 1379 +;1379: } +LABELV $973 +line 1381 +;1380: +;1381: if ( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY || cg_buildScript.integer ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +EQI4 $990 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +EQI4 $990 +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $984 +LABELV $990 +line 1382 +;1382: if (cg_buildScript.integer) +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $991 +line 1383 +;1383: { +line 1384 +;1384: trap_R_RegisterModel( "models/flags/r_flag.md3" ); +ADDRGP4 $994 +ARGP4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +pop +line 1385 +;1385: trap_R_RegisterModel( "models/flags/b_flag.md3" ); +ADDRGP4 $995 +ARGP4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +pop +line 1386 +;1386: trap_R_RegisterModel( "models/flags/r_flag_ysal.md3" ); +ADDRGP4 $996 +ARGP4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +pop +line 1387 +;1387: trap_R_RegisterModel( "models/flags/b_flag_ysal.md3" ); +ADDRGP4 $997 +ARGP4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +pop +line 1388 +;1388: } +LABELV $991 +line 1390 +;1389: +;1390: if (cgs.gametype == GT_CTF) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +NEI4 $998 +line 1391 +;1391: { +line 1392 +;1392: cgs.media.redFlagModel = trap_R_RegisterModel( "models/flags/r_flag.md3" ); +ADDRGP4 $994 +ARGP4 +ADDRLP4 368 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+36 +ADDRLP4 368 +INDIRI4 +ASGNI4 +line 1393 +;1393: cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/b_flag.md3" ); +ADDRGP4 $995 +ARGP4 +ADDRLP4 372 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+40 +ADDRLP4 372 +INDIRI4 +ASGNI4 +line 1394 +;1394: } +ADDRGP4 $999 +JUMPV +LABELV $998 +line 1396 +;1395: else +;1396: { +line 1397 +;1397: cgs.media.redFlagModel = trap_R_RegisterModel( "models/flags/r_flag_ysal.md3" ); +ADDRGP4 $996 +ARGP4 +ADDRLP4 368 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+36 +ADDRLP4 368 +INDIRI4 +ASGNI4 +line 1398 +;1398: cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/b_flag_ysal.md3" ); +ADDRGP4 $997 +ARGP4 +ADDRLP4 372 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+40 +ADDRLP4 372 +INDIRI4 +ASGNI4 +line 1399 +;1399: } +LABELV $999 +line 1401 +;1400: +;1401: trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_x" ); +ADDRGP4 $1009 +ARGP4 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +pop +line 1402 +;1402: trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_x" ); +ADDRGP4 $1010 +ARGP4 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +pop +line 1404 +;1403: +;1404: trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag_ys" ); +ADDRGP4 $1011 +ARGP4 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +pop +line 1405 +;1405: trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag_ys" ); +ADDRGP4 $1012 +ARGP4 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +pop +line 1407 +;1406: +;1407: trap_R_RegisterShaderNoMip( "gfx/hud/mpi_rflag" ); +ADDRGP4 $1013 +ARGP4 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +pop +line 1408 +;1408: trap_R_RegisterShaderNoMip( "gfx/hud/mpi_bflag" ); +ADDRGP4 $1014 +ARGP4 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +pop +line 1410 +;1409: +;1410: trap_R_RegisterShaderNoMip("gfx/2d/net.tga"); +ADDRGP4 $1015 +ARGP4 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +pop +line 1412 +;1411: +;1412: cgs.media.flagPoleModel = trap_R_RegisterModel( "models/flag2/flagpole.md3" ); +ADDRGP4 $1018 +ARGP4 +ADDRLP4 368 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+64 +ADDRLP4 368 +INDIRI4 +ASGNI4 +line 1413 +;1413: cgs.media.flagFlapModel = trap_R_RegisterModel( "models/flag2/flagflap3.md3" ); +ADDRGP4 $1021 +ARGP4 +ADDRLP4 372 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+68 +ADDRLP4 372 +INDIRI4 +ASGNI4 +line 1415 +;1414: +;1415: cgs.media.redFlagFlapSkin = trap_R_RegisterSkin( "models/flag2/red.skin" ); +ADDRGP4 $1024 +ARGP4 +ADDRLP4 376 +ADDRGP4 trap_R_RegisterSkin +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+72 +ADDRLP4 376 +INDIRI4 +ASGNI4 +line 1416 +;1416: cgs.media.blueFlagFlapSkin = trap_R_RegisterSkin( "models/flag2/blue.skin" ); +ADDRGP4 $1027 +ARGP4 +ADDRLP4 380 +ADDRGP4 trap_R_RegisterSkin +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+76 +ADDRLP4 380 +INDIRI4 +ASGNI4 +line 1417 +;1417: cgs.media.neutralFlagFlapSkin = trap_R_RegisterSkin( "models/flag2/white.skin" ); +ADDRGP4 $1030 +ARGP4 +ADDRLP4 384 +ADDRGP4 trap_R_RegisterSkin +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+80 +ADDRLP4 384 +INDIRI4 +ASGNI4 +line 1419 +;1418: +;1419: cgs.media.redFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/red_base.md3" ); +ADDRGP4 $1033 +ARGP4 +ADDRLP4 388 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+84 +ADDRLP4 388 +INDIRI4 +ASGNI4 +line 1420 +;1420: cgs.media.blueFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/blue_base.md3" ); +ADDRGP4 $1036 +ARGP4 +ADDRLP4 392 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+88 +ADDRLP4 392 +INDIRI4 +ASGNI4 +line 1421 +;1421: cgs.media.neutralFlagBaseModel = trap_R_RegisterModel( "models/mapobjects/flagbase/ntrl_base.md3" ); +ADDRGP4 $1039 +ARGP4 +ADDRLP4 396 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+92 +ADDRLP4 396 +INDIRI4 +ASGNI4 +line 1422 +;1422: } +LABELV $984 +line 1424 +;1423: +;1424: if ( cg_buildScript.integer ) { +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $1040 +line 1425 +;1425: cgs.media.neutralFlagModel = 0;//trap_R_RegisterModel( "models/flags/n_flag.md3" ); +ADDRGP4 cgs+70296+44 +CNSTI4 0 +ASGNI4 +line 1426 +;1426: cgs.media.flagShader[0] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_neutral1" ); +ADDRGP4 cgs+70296+48 +CNSTI4 0 +ASGNI4 +line 1427 +;1427: cgs.media.flagShader[1] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_red2" ); +ADDRGP4 cgs+70296+48+4 +CNSTI4 0 +ASGNI4 +line 1428 +;1428: cgs.media.flagShader[2] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_blu2" ); +ADDRGP4 cgs+70296+48+8 +CNSTI4 0 +ASGNI4 +line 1429 +;1429: cgs.media.flagShader[3] = 0;//trap_R_RegisterShaderNoMip( "icons/iconf_neutral3" ); +ADDRGP4 cgs+70296+48+12 +CNSTI4 0 +ASGNI4 +line 1430 +;1430: } +LABELV $1040 +line 1433 +;1431: +;1432: +;1433: if ( cgs.gametype >= GT_TEAM || cg_buildScript.integer ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +GEI4 $1060 +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $1056 +LABELV $1060 +line 1434 +;1434: cgs.media.teamRedShader = trap_R_RegisterShader( "sprites/team_red" ); +ADDRGP4 $1063 +ARGP4 +ADDRLP4 368 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+176 +ADDRLP4 368 +INDIRI4 +ASGNI4 +line 1435 +;1435: cgs.media.teamBlueShader = trap_R_RegisterShader( "sprites/team_blue" ); +ADDRGP4 $1066 +ARGP4 +ADDRLP4 372 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+180 +ADDRLP4 372 +INDIRI4 +ASGNI4 +line 1436 +;1436: cgs.media.redQuadShader = trap_R_RegisterShader("powerups/blueflag" ); +ADDRGP4 $1069 +ARGP4 +ADDRLP4 376 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+452 +ADDRLP4 376 +INDIRI4 +ASGNI4 +line 1437 +;1437: cgs.media.teamStatusBar = trap_R_RegisterShader( "gfx/2d/colorbar.tga" ); +ADDRGP4 $1072 +ARGP4 +ADDRLP4 380 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+104 +ADDRLP4 380 +INDIRI4 +ASGNI4 +line 1438 +;1438: } +ADDRGP4 $1057 +JUMPV +LABELV $1056 +line 1439 +;1439: else if ( cgs.gametype == GT_JEDIMASTER ) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 2 +NEI4 $1073 +line 1440 +;1440: { +line 1441 +;1441: cgs.media.teamRedShader = trap_R_RegisterShader( "sprites/team_red" ); +ADDRGP4 $1063 +ARGP4 +ADDRLP4 368 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+176 +ADDRLP4 368 +INDIRI4 +ASGNI4 +line 1442 +;1442: } +LABELV $1073 +LABELV $1057 +line 1444 +;1443: +;1444: cgs.media.armorModel = 0;//trap_R_RegisterModel( "models/powerups/armor/armor_yel.md3" ); +ADDRGP4 cgs+70296+96 +CNSTI4 0 +ASGNI4 +line 1445 +;1445: cgs.media.armorIcon = 0;//trap_R_RegisterShaderNoMip( "icons/iconr_yellow" ); +ADDRGP4 cgs+70296+100 +CNSTI4 0 +ASGNI4 +line 1447 +;1446: +;1447: cgs.media.heartShader = trap_R_RegisterShaderNoMip( "ui/assets/statusbar/selectedhealth.tga" ); +ADDRGP4 $1084 +ARGP4 +ADDRLP4 368 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+568 +ADDRLP4 368 +INDIRI4 +ASGNI4 +line 1449 +;1448: +;1449: cgs.media.ysaliredShader = trap_R_RegisterShader( "powerups/ysaliredshell"); +ADDRGP4 $1087 +ARGP4 +ADDRLP4 372 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+572 +ADDRLP4 372 +INDIRI4 +ASGNI4 +line 1450 +;1450: cgs.media.ysaliblueShader = trap_R_RegisterShader( "powerups/ysaliblueshell"); +ADDRGP4 $1090 +ARGP4 +ADDRLP4 376 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+576 +ADDRLP4 376 +INDIRI4 +ASGNI4 +line 1451 +;1451: cgs.media.ysalimariShader = trap_R_RegisterShader( "powerups/ysalimarishell"); +ADDRGP4 $529 +ARGP4 +ADDRLP4 380 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+580 +ADDRLP4 380 +INDIRI4 +ASGNI4 +line 1452 +;1452: cgs.media.boonShader = trap_R_RegisterShader( "powerups/boonshell"); +ADDRGP4 $1095 +ARGP4 +ADDRLP4 384 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+584 +ADDRLP4 384 +INDIRI4 +ASGNI4 +line 1453 +;1453: cgs.media.endarkenmentShader = trap_R_RegisterShader( "powerups/endarkenmentshell"); +ADDRGP4 $1098 +ARGP4 +ADDRLP4 388 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+588 +ADDRLP4 388 +INDIRI4 +ASGNI4 +line 1454 +;1454: cgs.media.enlightenmentShader = trap_R_RegisterShader( "powerups/enlightenmentshell"); +ADDRGP4 $1101 +ARGP4 +ADDRLP4 392 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+592 +ADDRLP4 392 +INDIRI4 +ASGNI4 +line 1455 +;1455: cgs.media.invulnerabilityShader = trap_R_RegisterShader( "powerups/invulnerabilityshell"); +ADDRGP4 $1104 +ARGP4 +ADDRLP4 396 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+596 +ADDRLP4 396 +INDIRI4 +ASGNI4 +line 1467 +;1456: +;1457:#ifdef JK2AWARDS +;1458: cgs.media.medalImpressive = trap_R_RegisterShaderNoMip( "medal_impressive" ); +;1459: cgs.media.medalExcellent = trap_R_RegisterShaderNoMip( "medal_excellent" ); +;1460: cgs.media.medalGauntlet = trap_R_RegisterShaderNoMip( "medal_gauntlet" ); +;1461: cgs.media.medalDefend = trap_R_RegisterShaderNoMip( "medal_defend" ); +;1462: cgs.media.medalAssist = trap_R_RegisterShaderNoMip( "medal_assist" ); +;1463: cgs.media.medalCapture = trap_R_RegisterShaderNoMip( "medal_capture" ); +;1464:#endif +;1465: +;1466: // Binocular interface +;1467: cgs.media.binocularCircle = trap_R_RegisterShader( "gfx/2d/binCircle" ); +ADDRGP4 $1107 +ARGP4 +ADDRLP4 400 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+524 +ADDRLP4 400 +INDIRI4 +ASGNI4 +line 1468 +;1468: cgs.media.binocularMask = trap_R_RegisterShader( "gfx/2d/binMask" ); +ADDRGP4 $1110 +ARGP4 +ADDRLP4 404 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+528 +ADDRLP4 404 +INDIRI4 +ASGNI4 +line 1469 +;1469: cgs.media.binocularArrow = trap_R_RegisterShader( "gfx/2d/binSideArrow" ); +ADDRGP4 $1113 +ARGP4 +ADDRLP4 408 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+532 +ADDRLP4 408 +INDIRI4 +ASGNI4 +line 1470 +;1470: cgs.media.binocularTri = trap_R_RegisterShader( "gfx/2d/binTopTri" ); +ADDRGP4 $1116 +ARGP4 +ADDRLP4 412 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+536 +ADDRLP4 412 +INDIRI4 +ASGNI4 +line 1471 +;1471: cgs.media.binocularStatic = trap_R_RegisterShader( "gfx/2d/binocularWindow" ); +ADDRGP4 $1119 +ARGP4 +ADDRLP4 416 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+540 +ADDRLP4 416 +INDIRI4 +ASGNI4 +line 1472 +;1472: cgs.media.binocularOverlay = trap_R_RegisterShader( "gfx/2d/binocularNumOverlay" ); +ADDRGP4 $1122 +ARGP4 +ADDRLP4 420 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+544 +ADDRLP4 420 +INDIRI4 +ASGNI4 +line 1474 +;1473: +;1474: cg.loadLCARSStage = 5; +ADDRGP4 cg+13480 +CNSTI4 5 +ASGNI4 +line 1479 +;1475: +;1476:/* +;1477:Ghoul2 Insert Start +;1478:*/ +;1479: CG_InitItems(); +ADDRGP4 CG_InitItems +CALLV +pop +line 1483 +;1480:/* +;1481:Ghoul2 Insert End +;1482:*/ +;1483: memset( cg_weapons, 0, sizeof( cg_weapons ) ); +ADDRGP4 cg_weapons +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 3328 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 1486 +;1484: +;1485: // only register the items that the server says we need +;1486: strcpy( items, CG_ConfigString( CS_ITEMS) ); +CNSTI4 27 +ARGI4 +ADDRLP4 424 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 424 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 1488 +;1487: +;1488: for ( i = 1 ; i < bg_numItems ; i++ ) { +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +ADDRGP4 $1127 +JUMPV +LABELV $1124 +line 1489 +;1489: if ( items[ i ] == '1' || cg_buildScript.integer ) { +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 49 +EQI4 $1131 +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $1128 +LABELV $1131 +line 1490 +;1490: CG_LoadingItem( i ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 CG_LoadingItem +CALLV +pop +line 1491 +;1491: CG_RegisterItemVisuals( i ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 CG_RegisterItemVisuals +CALLV +pop +line 1492 +;1492: } +LABELV $1128 +line 1493 +;1493: } +LABELV $1125 +line 1488 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1127 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_numItems +INDIRI4 +LTI4 $1124 +line 1495 +;1494: +;1495: cg.loadLCARSStage = 6; +ADDRGP4 cg+13480 +CNSTI4 6 +ASGNI4 +line 1497 +;1496: +;1497: cgs.media.glassShardShader = trap_R_RegisterShader( "gfx/misc/test_crackle" ); +ADDRGP4 $1135 +ARGP4 +ADDRLP4 428 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+408 +ADDRLP4 428 +INDIRI4 +ASGNI4 +line 1500 +;1498: +;1499: // doing one shader just makes it look like a shell. By using two shaders with different bulge offsets and different texture scales, it has a much more chaotic look +;1500: cgs.media.electricBodyShader = trap_R_RegisterShader( "gfx/misc/electric" ); +ADDRGP4 $1138 +ARGP4 +ADDRLP4 432 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+396 +ADDRLP4 432 +INDIRI4 +ASGNI4 +line 1501 +;1501: cgs.media.electricBody2Shader = trap_R_RegisterShader( "gfx/misc/fullbodyelectric2" ); +ADDRGP4 $1141 +ARGP4 +ADDRLP4 436 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+400 +ADDRLP4 436 +INDIRI4 +ASGNI4 +line 1504 +;1502: +;1503: // wall marks +;1504: cgs.media.bulletMarkShader = trap_R_RegisterShader( "gfx/damage/bullet_mrk" ); +ADDRGP4 $1144 +ARGP4 +ADDRLP4 440 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+420 +ADDRLP4 440 +INDIRI4 +ASGNI4 +line 1505 +;1505: cgs.media.burnMarkShader = trap_R_RegisterShader( "gfx/damage/burn_med_mrk" ); +ADDRGP4 $1147 +ARGP4 +ADDRLP4 444 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+424 +ADDRLP4 444 +INDIRI4 +ASGNI4 +line 1506 +;1506: cgs.media.holeMarkShader = trap_R_RegisterShader( "gfx/damage/hole_lg_mrk" ); +ADDRGP4 $1150 +ARGP4 +ADDRLP4 448 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+428 +ADDRLP4 448 +INDIRI4 +ASGNI4 +line 1507 +;1507: cgs.media.energyMarkShader = trap_R_RegisterShader( "gfx/damage/plasma_mrk" ); +ADDRGP4 $1153 +ARGP4 +ADDRLP4 452 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+432 +ADDRLP4 452 +INDIRI4 +ASGNI4 +line 1508 +;1508: cgs.media.shadowMarkShader = trap_R_RegisterShader( "markShadow" ); +ADDRGP4 $1156 +ARGP4 +ADDRLP4 456 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+404 +ADDRLP4 456 +INDIRI4 +ASGNI4 +line 1509 +;1509: cgs.media.wakeMarkShader = trap_R_RegisterShader( "wake" ); +ADDRGP4 $1159 +ARGP4 +ADDRLP4 460 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+412 +ADDRLP4 460 +INDIRI4 +ASGNI4 +line 1510 +;1510: cgs.media.bloodMarkShader = trap_R_RegisterShader( "bloodMark" ); +ADDRGP4 $1162 +ARGP4 +ADDRLP4 464 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+416 +ADDRLP4 464 +INDIRI4 +ASGNI4 +line 1512 +;1511: +;1512: cgs.media.viewPainShader = trap_R_RegisterShader( "gfx/misc/borgeyeflare" ); +ADDRGP4 $1165 +ARGP4 +ADDRLP4 468 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+436 +ADDRLP4 468 +INDIRI4 +ASGNI4 +line 1513 +;1513: cgs.media.viewPainShader_Shields = trap_R_RegisterShader( "gfx/mp/dmgshader_shields" ); +ADDRGP4 $1168 +ARGP4 +ADDRLP4 472 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+440 +ADDRLP4 472 +INDIRI4 +ASGNI4 +line 1514 +;1514: cgs.media.viewPainShader_ShieldsAndHealth = trap_R_RegisterShader( "gfx/mp/dmgshader_shieldsandhealth" ); +ADDRGP4 $1171 +ARGP4 +ADDRLP4 476 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+444 +ADDRLP4 476 +INDIRI4 +ASGNI4 +line 1517 +;1515: +;1516: // register the inline models +;1517: cgs.numInlineModels = trap_CM_NumInlineModels(); +ADDRLP4 480 +ADDRGP4 trap_CM_NumInlineModels +CALLI4 +ASGNI4 +ADDRGP4 cgs+38924 +ADDRLP4 480 +INDIRI4 +ASGNI4 +line 1518 +;1518: for ( i = 1 ; i < cgs.numInlineModels ; i++ ) { +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +ADDRGP4 $1176 +JUMPV +LABELV $1173 +line 1523 +;1519: char name[10]; +;1520: vec3_t mins, maxs; +;1521: int j; +;1522: +;1523: Com_sprintf( name, sizeof(name), "*%i", i ); +ADDRLP4 512 +ARGP4 +CNSTI4 10 +ARGI4 +ADDRGP4 $1178 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1524 +;1524: cgs.inlineDrawModel[i] = trap_R_RegisterModel( name ); +ADDRLP4 512 +ARGP4 +ADDRLP4 524 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+38928 +ADDP4 +ADDRLP4 524 +INDIRI4 +ASGNI4 +line 1525 +;1525: trap_R_ModelBounds( cgs.inlineDrawModel[i], mins, maxs ); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+38928 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 488 +ARGP4 +ADDRLP4 500 +ARGP4 +ADDRGP4 trap_R_ModelBounds +CALLV +pop +line 1526 +;1526: for ( j = 0 ; j < 3 ; j++ ) { +ADDRLP4 484 +CNSTI4 0 +ASGNI4 +LABELV $1181 +line 1527 +;1527: cgs.inlineModelMidpoints[i][j] = mins[j] + 0.5 * ( maxs[j] - mins[j] ); +ADDRLP4 528 +ADDRLP4 484 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 532 +ADDRLP4 528 +INDIRI4 +ADDRLP4 488 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 528 +INDIRI4 +CNSTI4 12 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgs+39952 +ADDP4 +ADDP4 +ADDRLP4 532 +INDIRF4 +CNSTF4 1056964608 +ADDRLP4 528 +INDIRI4 +ADDRLP4 500 +ADDP4 +INDIRF4 +ADDRLP4 532 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 1528 +;1528: } +LABELV $1182 +line 1526 +ADDRLP4 484 +ADDRLP4 484 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 484 +INDIRI4 +CNSTI4 3 +LTI4 $1181 +line 1529 +;1529: } +LABELV $1174 +line 1518 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1176 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cgs+38924 +INDIRI4 +LTI4 $1173 +line 1531 +;1530: +;1531: cg.loadLCARSStage = 7; +ADDRGP4 cg+13480 +CNSTI4 7 +ASGNI4 +line 1534 +;1532: +;1533: // register all the server specified models +;1534: for (i=1 ; i= MAX_CONFIGSTRINGS ) { +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $1295 +ADDRLP4 0 +INDIRI4 +CNSTI4 1400 +LTI4 $1293 +LABELV $1295 +line 1673 +;1673: CG_Error( "CG_ConfigString: bad index: %i", index ); +ADDRGP4 $1296 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 CG_Error +CALLV +pop +line 1674 +;1674: } +LABELV $1293 +line 1675 +;1675: return cgs.gameState.stringData + cgs.gameState.stringOffsets[ index ]; +ADDRFP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs +ADDP4 +INDIRI4 +ADDRGP4 cgs+5600 +ADDP4 +RETP4 +LABELV $1292 +endproc CG_ConfigString 4 8 +export CG_StartMusic +proc CG_StartMusic 148 12 +line 1686 +;1676:} +;1677: +;1678://================================================================== +;1679: +;1680:/* +;1681:====================== +;1682:CG_StartMusic +;1683: +;1684:====================== +;1685:*/ +;1686:void CG_StartMusic( qboolean bForceStart ) { +line 1691 +;1687: char *s; +;1688: char parm1[MAX_QPATH], parm2[MAX_QPATH]; +;1689: +;1690: // start the background music +;1691: s = (char *)CG_ConfigString( CS_MUSIC ); +CNSTI4 2 +ARGI4 +ADDRLP4 132 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 132 +INDIRP4 +ASGNP4 +line 1692 +;1692: Q_strncpyz( parm1, COM_Parse( (const char **)&s ), sizeof( parm1 ) ); +ADDRLP4 0 +ARGP4 +ADDRLP4 136 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 136 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1693 +;1693: Q_strncpyz( parm2, COM_Parse( (const char **)&s ), sizeof( parm2 ) ); +ADDRLP4 0 +ARGP4 +ADDRLP4 140 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 68 +ARGP4 +ADDRLP4 140 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1695 +;1694: +;1695: trap_S_StartBackgroundTrack( parm1, parm2, !bForceStart ); +ADDRLP4 4 +ARGP4 +ADDRLP4 68 +ARGP4 +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1300 +ADDRLP4 144 +CNSTI4 1 +ASGNI4 +ADDRGP4 $1301 +JUMPV +LABELV $1300 +ADDRLP4 144 +CNSTI4 0 +ASGNI4 +LABELV $1301 +ADDRLP4 144 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartBackgroundTrack +CALLV +pop +line 1696 +;1696:} +LABELV $1298 +endproc CG_StartMusic 148 12 +bss +align 1 +LABELV $1303 +skip 32768 +export CG_GetMenuBuffer +code +proc CG_GetMenuBuffer 16 16 +line 1698 +;1697: +;1698:char *CG_GetMenuBuffer(const char *filename) { +line 1703 +;1699: int len; +;1700: fileHandle_t f; +;1701: static char buf[MAX_MENUFILE]; +;1702: +;1703: len = trap_FS_FOpenFile( filename, &f, FS_READ ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 8 +ADDRGP4 trap_FS_FOpenFile +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 1704 +;1704: if ( !f ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $1304 +line 1705 +;1705: trap_Print( va( S_COLOR_RED "menu file not found: %s, using default\n", filename ) ); +ADDRGP4 $1306 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRGP4 trap_Print +CALLV +pop +line 1706 +;1706: return NULL; +CNSTP4 0 +RETP4 +ADDRGP4 $1302 +JUMPV +LABELV $1304 +line 1708 +;1707: } +;1708: if ( len >= MAX_MENUFILE ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 32768 +LTI4 $1307 +line 1709 +;1709: trap_Print( va( S_COLOR_RED "menu file too large: %s is %i, max allowed is %i", filename, len, MAX_MENUFILE ) ); +ADDRGP4 $1309 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 32768 +ARGI4 +ADDRLP4 12 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRGP4 trap_Print +CALLV +pop +line 1710 +;1710: trap_FS_FCloseFile( f ); +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_FCloseFile +CALLV +pop +line 1711 +;1711: return NULL; +CNSTP4 0 +RETP4 +ADDRGP4 $1302 +JUMPV +LABELV $1307 +line 1714 +;1712: } +;1713: +;1714: trap_FS_Read( buf, len, f ); +ADDRGP4 $1303 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_Read +CALLV +pop +line 1715 +;1715: buf[len] = 0; +ADDRLP4 0 +INDIRI4 +ADDRGP4 $1303 +ADDP4 +CNSTI1 0 +ASGNI1 +line 1716 +;1716: trap_FS_FCloseFile( f ); +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_FCloseFile +CALLV +pop +line 1718 +;1717: +;1718: return buf; +ADDRGP4 $1303 +RETP4 +LABELV $1302 +endproc CG_GetMenuBuffer 16 16 +export CG_Asset_Parse +proc CG_Asset_Parse 1124 8 +line 1726 +;1719:} +;1720: +;1721:// +;1722:// ============================== +;1723:// new hud stuff ( mission pack ) +;1724:// ============================== +;1725:// +;1726:qboolean CG_Asset_Parse(int handle) { +line 1730 +;1727: pc_token_t token; +;1728: const char *tempStr; +;1729: +;1730: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1044 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1044 +INDIRI4 +CNSTI4 0 +NEI4 $1311 +line 1731 +;1731: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1311 +line 1732 +;1732: if (Q_stricmp(token.string, "{") != 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1316 +ARGP4 +ADDRLP4 1048 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1048 +INDIRI4 +CNSTI4 0 +EQI4 $1318 +line 1733 +;1733: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1317 +line 1736 +;1734: } +;1735: +;1736: while ( 1 ) { +line 1737 +;1737: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1052 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1052 +INDIRI4 +CNSTI4 0 +NEI4 $1320 +line 1738 +;1738: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1320 +line 1740 +;1739: +;1740: if (Q_stricmp(token.string, "}") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1325 +ARGP4 +ADDRLP4 1056 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1056 +INDIRI4 +CNSTI4 0 +NEI4 $1322 +line 1741 +;1741: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1322 +line 1745 +;1742: } +;1743: +;1744: // font +;1745: if (Q_stricmp(token.string, "font") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1329 +ARGP4 +ADDRLP4 1060 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1060 +INDIRI4 +CNSTI4 0 +NEI4 $1326 +line 1747 +;1746: int pointSize; +;1747: if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 1068 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 1068 +INDIRI4 +CNSTI4 0 +EQI4 $1332 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1064 +ARGP4 +ADDRLP4 1072 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 1072 +INDIRI4 +CNSTI4 0 +NEI4 $1330 +LABELV $1332 +line 1748 +;1748: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1330 +line 1752 +;1749: } +;1750: +;1751:// cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.textFont); +;1752: cgDC.Assets.qhMediumFont = cgDC.RegisterFont(tempStr); +ADDRLP4 1040 +INDIRP4 +ARGP4 +ADDRLP4 1076 +ADDRGP4 cgDC+64 +INDIRP4 +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+16 +ADDRLP4 1076 +INDIRI4 +ASGNI4 +line 1753 +;1753: continue; +ADDRGP4 $1318 +JUMPV +LABELV $1326 +line 1757 +;1754: } +;1755: +;1756: // smallFont +;1757: if (Q_stricmp(token.string, "smallFont") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1339 +ARGP4 +ADDRLP4 1064 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1064 +INDIRI4 +CNSTI4 0 +NEI4 $1336 +line 1759 +;1758: int pointSize; +;1759: if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 1072 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 1072 +INDIRI4 +CNSTI4 0 +EQI4 $1342 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1068 +ARGP4 +ADDRLP4 1076 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 1076 +INDIRI4 +CNSTI4 0 +NEI4 $1340 +LABELV $1342 +line 1760 +;1760: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1340 +line 1763 +;1761: } +;1762:// cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.smallFont); +;1763: cgDC.Assets.qhSmallFont = cgDC.RegisterFont(tempStr); +ADDRLP4 1040 +INDIRP4 +ARGP4 +ADDRLP4 1080 +ADDRGP4 cgDC+64 +INDIRP4 +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+12 +ADDRLP4 1080 +INDIRI4 +ASGNI4 +line 1764 +;1764: continue; +ADDRGP4 $1318 +JUMPV +LABELV $1336 +line 1768 +;1765: } +;1766: +;1767: // font +;1768: if (Q_stricmp(token.string, "bigfont") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1349 +ARGP4 +ADDRLP4 1068 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1068 +INDIRI4 +CNSTI4 0 +NEI4 $1346 +line 1770 +;1769: int pointSize; +;1770: if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 1076 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 1076 +INDIRI4 +CNSTI4 0 +EQI4 $1352 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1072 +ARGP4 +ADDRLP4 1080 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 1080 +INDIRI4 +CNSTI4 0 +NEI4 $1350 +LABELV $1352 +line 1771 +;1771: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1350 +line 1774 +;1772: } +;1773:// cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.bigFont); +;1774: cgDC.Assets.qhBigFont = cgDC.RegisterFont(tempStr); +ADDRLP4 1040 +INDIRP4 +ARGP4 +ADDRLP4 1084 +ADDRGP4 cgDC+64 +INDIRP4 +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+20 +ADDRLP4 1084 +INDIRI4 +ASGNI4 +line 1775 +;1775: continue; +ADDRGP4 $1318 +JUMPV +LABELV $1346 +line 1779 +;1776: } +;1777: +;1778: // gradientbar +;1779: if (Q_stricmp(token.string, "gradientbar") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1359 +ARGP4 +ADDRLP4 1072 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1072 +INDIRI4 +CNSTI4 0 +NEI4 $1356 +line 1780 +;1780: if (!PC_String_Parse(handle, &tempStr)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 1076 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 1076 +INDIRI4 +CNSTI4 0 +NEI4 $1360 +line 1781 +;1781: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1360 +line 1783 +;1782: } +;1783: cgDC.Assets.gradientBar = trap_R_RegisterShaderNoMip(tempStr); +ADDRLP4 1040 +INDIRP4 +ARGP4 +ADDRLP4 1080 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+28 +ADDRLP4 1080 +INDIRI4 +ASGNI4 +line 1784 +;1784: continue; +ADDRGP4 $1318 +JUMPV +LABELV $1356 +line 1788 +;1785: } +;1786: +;1787: // enterMenuSound +;1788: if (Q_stricmp(token.string, "menuEnterSound") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1367 +ARGP4 +ADDRLP4 1076 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1076 +INDIRI4 +CNSTI4 0 +NEI4 $1364 +line 1789 +;1789: if (!PC_String_Parse(handle, &tempStr)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 1080 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 1080 +INDIRI4 +CNSTI4 0 +NEI4 $1368 +line 1790 +;1790: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1368 +line 1792 +;1791: } +;1792: cgDC.Assets.menuEnterSound = trap_S_RegisterSound( tempStr ); +ADDRLP4 1040 +INDIRP4 +ARGP4 +ADDRLP4 1084 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+76 +ADDRLP4 1084 +INDIRI4 +ASGNI4 +line 1793 +;1793: continue; +ADDRGP4 $1318 +JUMPV +LABELV $1364 +line 1797 +;1794: } +;1795: +;1796: // exitMenuSound +;1797: if (Q_stricmp(token.string, "menuExitSound") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1375 +ARGP4 +ADDRLP4 1080 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1080 +INDIRI4 +CNSTI4 0 +NEI4 $1372 +line 1798 +;1798: if (!PC_String_Parse(handle, &tempStr)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 1084 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 1084 +INDIRI4 +CNSTI4 0 +NEI4 $1376 +line 1799 +;1799: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1376 +line 1801 +;1800: } +;1801: cgDC.Assets.menuExitSound = trap_S_RegisterSound( tempStr ); +ADDRLP4 1040 +INDIRP4 +ARGP4 +ADDRLP4 1088 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+80 +ADDRLP4 1088 +INDIRI4 +ASGNI4 +line 1802 +;1802: continue; +ADDRGP4 $1318 +JUMPV +LABELV $1372 +line 1806 +;1803: } +;1804: +;1805: // itemFocusSound +;1806: if (Q_stricmp(token.string, "itemFocusSound") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1383 +ARGP4 +ADDRLP4 1084 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1084 +INDIRI4 +CNSTI4 0 +NEI4 $1380 +line 1807 +;1807: if (!PC_String_Parse(handle, &tempStr)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 1088 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 1088 +INDIRI4 +CNSTI4 0 +NEI4 $1384 +line 1808 +;1808: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1384 +line 1810 +;1809: } +;1810: cgDC.Assets.itemFocusSound = trap_S_RegisterSound( tempStr ); +ADDRLP4 1040 +INDIRP4 +ARGP4 +ADDRLP4 1092 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+88 +ADDRLP4 1092 +INDIRI4 +ASGNI4 +line 1811 +;1811: continue; +ADDRGP4 $1318 +JUMPV +LABELV $1380 +line 1815 +;1812: } +;1813: +;1814: // menuBuzzSound +;1815: if (Q_stricmp(token.string, "menuBuzzSound") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1391 +ARGP4 +ADDRLP4 1088 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1088 +INDIRI4 +CNSTI4 0 +NEI4 $1388 +line 1816 +;1816: if (!PC_String_Parse(handle, &tempStr)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 1092 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 1092 +INDIRI4 +CNSTI4 0 +NEI4 $1392 +line 1817 +;1817: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1392 +line 1819 +;1818: } +;1819: cgDC.Assets.menuBuzzSound = trap_S_RegisterSound( tempStr ); +ADDRLP4 1040 +INDIRP4 +ARGP4 +ADDRLP4 1096 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+84 +ADDRLP4 1096 +INDIRI4 +ASGNI4 +line 1820 +;1820: continue; +ADDRGP4 $1318 +JUMPV +LABELV $1388 +line 1823 +;1821: } +;1822: +;1823: if (Q_stricmp(token.string, "cursor") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1399 +ARGP4 +ADDRLP4 1092 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1092 +INDIRI4 +CNSTI4 0 +NEI4 $1396 +line 1824 +;1824: if (!PC_String_Parse(handle, &cgDC.Assets.cursorStr)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 cgDC+260+4 +ARGP4 +ADDRLP4 1096 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 1096 +INDIRI4 +CNSTI4 0 +NEI4 $1400 +line 1825 +;1825: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1400 +line 1827 +;1826: } +;1827: cgDC.Assets.cursor = trap_R_RegisterShaderNoMip( cgDC.Assets.cursorStr); +ADDRGP4 cgDC+260+4 +INDIRP4 +ARGP4 +ADDRLP4 1100 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+24 +ADDRLP4 1100 +INDIRI4 +ASGNI4 +line 1828 +;1828: continue; +ADDRGP4 $1318 +JUMPV +LABELV $1396 +line 1831 +;1829: } +;1830: +;1831: if (Q_stricmp(token.string, "fadeClamp") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1411 +ARGP4 +ADDRLP4 1096 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1096 +INDIRI4 +CNSTI4 0 +NEI4 $1408 +line 1832 +;1832: if (!PC_Float_Parse(handle, &cgDC.Assets.fadeClamp)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 cgDC+260+92 +ARGP4 +ADDRLP4 1100 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 1100 +INDIRI4 +CNSTI4 0 +NEI4 $1318 +line 1833 +;1833: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +line 1835 +;1834: } +;1835: continue; +LABELV $1408 +line 1838 +;1836: } +;1837: +;1838: if (Q_stricmp(token.string, "fadeCycle") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1419 +ARGP4 +ADDRLP4 1100 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1100 +INDIRI4 +CNSTI4 0 +NEI4 $1416 +line 1839 +;1839: if (!PC_Int_Parse(handle, &cgDC.Assets.fadeCycle)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 cgDC+260+96 +ARGP4 +ADDRLP4 1104 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 1104 +INDIRI4 +CNSTI4 0 +NEI4 $1318 +line 1840 +;1840: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +line 1842 +;1841: } +;1842: continue; +LABELV $1416 +line 1845 +;1843: } +;1844: +;1845: if (Q_stricmp(token.string, "fadeAmount") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1427 +ARGP4 +ADDRLP4 1104 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1104 +INDIRI4 +CNSTI4 0 +NEI4 $1424 +line 1846 +;1846: if (!PC_Float_Parse(handle, &cgDC.Assets.fadeAmount)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 cgDC+260+100 +ARGP4 +ADDRLP4 1108 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 1108 +INDIRI4 +CNSTI4 0 +NEI4 $1318 +line 1847 +;1847: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +line 1849 +;1848: } +;1849: continue; +LABELV $1424 +line 1852 +;1850: } +;1851: +;1852: if (Q_stricmp(token.string, "shadowX") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1435 +ARGP4 +ADDRLP4 1108 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1108 +INDIRI4 +CNSTI4 0 +NEI4 $1432 +line 1853 +;1853: if (!PC_Float_Parse(handle, &cgDC.Assets.shadowX)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 cgDC+260+104 +ARGP4 +ADDRLP4 1112 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 1112 +INDIRI4 +CNSTI4 0 +NEI4 $1318 +line 1854 +;1854: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +line 1856 +;1855: } +;1856: continue; +LABELV $1432 +line 1859 +;1857: } +;1858: +;1859: if (Q_stricmp(token.string, "shadowY") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1443 +ARGP4 +ADDRLP4 1112 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1112 +INDIRI4 +CNSTI4 0 +NEI4 $1440 +line 1860 +;1860: if (!PC_Float_Parse(handle, &cgDC.Assets.shadowY)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 cgDC+260+108 +ARGP4 +ADDRLP4 1116 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 1116 +INDIRI4 +CNSTI4 0 +NEI4 $1318 +line 1861 +;1861: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +line 1863 +;1862: } +;1863: continue; +LABELV $1440 +line 1866 +;1864: } +;1865: +;1866: if (Q_stricmp(token.string, "shadowColor") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1451 +ARGP4 +ADDRLP4 1116 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1116 +INDIRI4 +CNSTI4 0 +NEI4 $1448 +line 1867 +;1867: if (!PC_Color_Parse(handle, &cgDC.Assets.shadowColor)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 cgDC+260+112 +ARGP4 +ADDRLP4 1120 +ADDRGP4 PC_Color_Parse +CALLI4 +ASGNI4 +ADDRLP4 1120 +INDIRI4 +CNSTI4 0 +NEI4 $1452 +line 1868 +;1868: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1310 +JUMPV +LABELV $1452 +line 1870 +;1869: } +;1870: cgDC.Assets.shadowFadeClamp = cgDC.Assets.shadowColor[3]; +ADDRGP4 cgDC+260+128 +ADDRGP4 cgDC+260+112+12 +INDIRF4 +ASGNF4 +line 1871 +;1871: continue; +LABELV $1448 +line 1873 +;1872: } +;1873: } +LABELV $1318 +line 1736 +ADDRGP4 $1317 +JUMPV +line 1874 +;1874: return qfalse; // bk001204 - why not? +CNSTI4 0 +RETI4 +LABELV $1310 +endproc CG_Asset_Parse 1124 8 +export CG_ParseMenu +proc CG_ParseMenu 1064 8 +line 1877 +;1875:} +;1876: +;1877:void CG_ParseMenu(const char *menuFile) { +line 1881 +;1878: pc_token_t token; +;1879: int handle; +;1880: +;1881: handle = trap_PC_LoadSource(menuFile); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 1044 +ADDRGP4 trap_PC_LoadSource +CALLI4 +ASGNI4 +ADDRLP4 1040 +ADDRLP4 1044 +INDIRI4 +ASGNI4 +line 1882 +;1882: if (!handle) +ADDRLP4 1040 +INDIRI4 +CNSTI4 0 +NEI4 $1462 +line 1883 +;1883: handle = trap_PC_LoadSource("ui/testhud.menu"); +ADDRGP4 $1464 +ARGP4 +ADDRLP4 1048 +ADDRGP4 trap_PC_LoadSource +CALLI4 +ASGNI4 +ADDRLP4 1040 +ADDRLP4 1048 +INDIRI4 +ASGNI4 +LABELV $1462 +line 1884 +;1884: if (!handle) +ADDRLP4 1040 +INDIRI4 +CNSTI4 0 +NEI4 $1468 +line 1885 +;1885: return; +ADDRGP4 $1461 +JUMPV +LABELV $1467 +line 1887 +;1886: +;1887: while ( 1 ) { +line 1888 +;1888: if (!trap_PC_ReadToken( handle, &token )) { +ADDRLP4 1040 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1052 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1052 +INDIRI4 +CNSTI4 0 +NEI4 $1470 +line 1889 +;1889: break; +ADDRGP4 $1469 +JUMPV +LABELV $1470 +line 1902 +;1890: } +;1891: +;1892: //if ( Q_stricmp( token, "{" ) ) { +;1893: // Com_Printf( "Missing { in menu file\n" ); +;1894: // break; +;1895: //} +;1896: +;1897: //if ( menuCount == MAX_MENUS ) { +;1898: // Com_Printf( "Too many menus!\n" ); +;1899: // break; +;1900: //} +;1901: +;1902: if ( token.string[0] == '}' ) { +ADDRLP4 0+16 +INDIRI1 +CVII4 1 +CNSTI4 125 +NEI4 $1472 +line 1903 +;1903: break; +ADDRGP4 $1469 +JUMPV +LABELV $1472 +line 1906 +;1904: } +;1905: +;1906: if (Q_stricmp(token.string, "assetGlobalDef") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1478 +ARGP4 +ADDRLP4 1056 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1056 +INDIRI4 +CNSTI4 0 +NEI4 $1475 +line 1907 +;1907: if (CG_Asset_Parse(handle)) { +ADDRLP4 1040 +INDIRI4 +ARGI4 +ADDRLP4 1060 +ADDRGP4 CG_Asset_Parse +CALLI4 +ASGNI4 +ADDRLP4 1060 +INDIRI4 +CNSTI4 0 +EQI4 $1469 +line 1908 +;1908: continue; +ADDRGP4 $1468 +JUMPV +line 1909 +;1909: } else { +line 1910 +;1910: break; +LABELV $1475 +line 1915 +;1911: } +;1912: } +;1913: +;1914: +;1915: if (Q_stricmp(token.string, "menudef") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $1484 +ARGP4 +ADDRLP4 1060 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1060 +INDIRI4 +CNSTI4 0 +NEI4 $1481 +line 1917 +;1916: // start a new menu +;1917: Menu_New(handle); +ADDRLP4 1040 +INDIRI4 +ARGI4 +ADDRGP4 Menu_New +CALLV +pop +line 1918 +;1918: } +LABELV $1481 +line 1919 +;1919: } +LABELV $1468 +line 1887 +ADDRGP4 $1467 +JUMPV +LABELV $1469 +line 1920 +;1920: trap_PC_FreeSource(handle); +ADDRLP4 1040 +INDIRI4 +ARGI4 +ADDRGP4 trap_PC_FreeSource +CALLI4 +pop +line 1921 +;1921:} +LABELV $1461 +endproc CG_ParseMenu 1064 8 +export CG_Load_Menu +proc CG_Load_Menu 20 8 +line 1923 +;1922: +;1923:qboolean CG_Load_Menu(char **p) { +line 1926 +;1924: char *token; +;1925: +;1926: token = COM_ParseExt((const char **)p, qtrue); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 4 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 1928 +;1927: +;1928: if (token[0] != '{') { +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 123 +EQI4 $1489 +line 1929 +;1929: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1485 +JUMPV +LABELV $1488 +line 1932 +;1930: } +;1931: +;1932: while ( 1 ) { +line 1934 +;1933: +;1934: token = COM_ParseExt((const char **)p, qtrue); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 8 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 1936 +;1935: +;1936: if (Q_stricmp(token, "}") == 0) { +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $1325 +ARGP4 +ADDRLP4 12 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $1491 +line 1937 +;1937: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1485 +JUMPV +LABELV $1491 +line 1940 +;1938: } +;1939: +;1940: if ( !token || token[0] == 0 ) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1495 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1493 +LABELV $1495 +line 1941 +;1941: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1485 +JUMPV +LABELV $1493 +line 1944 +;1942: } +;1943: +;1944: CG_ParseMenu(token); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_ParseMenu +CALLV +pop +line 1945 +;1945: } +LABELV $1489 +line 1932 +ADDRGP4 $1488 +JUMPV +line 1946 +;1946: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1485 +endproc CG_Load_Menu 20 8 +proc CG_OwnerDrawHandleKey 0 0 +line 1950 +;1947:} +;1948: +;1949: +;1950:static qboolean CG_OwnerDrawHandleKey(int ownerDraw, int flags, float *special, int key) { +line 1951 +;1951: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1496 +endproc CG_OwnerDrawHandleKey 0 0 +proc CG_FeederCount 8 0 +line 1955 +;1952:} +;1953: +;1954: +;1955:static int CG_FeederCount(float feederID) { +line 1957 +;1956: int i, count; +;1957: count = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 1958 +;1958: if (feederID == FEEDER_REDTEAM_LIST) { +ADDRFP4 0 +INDIRF4 +CNSTF4 1084227584 +NEF4 $1498 +line 1959 +;1959: for (i = 0; i < cg.numScores; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1503 +JUMPV +LABELV $1500 +line 1960 +;1960: if (cg.scores[i].team == TEAM_RED) { +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+56 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1505 +line 1961 +;1961: count++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1962 +;1962: } +LABELV $1505 +line 1963 +;1963: } +LABELV $1501 +line 1959 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1503 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+5048 +INDIRI4 +LTI4 $1500 +line 1964 +;1964: } else if (feederID == FEEDER_BLUETEAM_LIST) { +ADDRGP4 $1499 +JUMPV +LABELV $1498 +ADDRFP4 0 +INDIRF4 +CNSTF4 1086324736 +NEF4 $1509 +line 1965 +;1965: for (i = 0; i < cg.numScores; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1514 +JUMPV +LABELV $1511 +line 1966 +;1966: if (cg.scores[i].team == TEAM_BLUE) { +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+56 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1516 +line 1967 +;1967: count++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1968 +;1968: } +LABELV $1516 +line 1969 +;1969: } +LABELV $1512 +line 1965 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1514 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+5048 +INDIRI4 +LTI4 $1511 +line 1970 +;1970: } else if (feederID == FEEDER_SCOREBOARD) { +ADDRGP4 $1510 +JUMPV +LABELV $1509 +ADDRFP4 0 +INDIRF4 +CNSTF4 1093664768 +NEF4 $1520 +line 1971 +;1971: return cg.numScores; +ADDRGP4 cg+5048 +INDIRI4 +RETI4 +ADDRGP4 $1497 +JUMPV +LABELV $1520 +LABELV $1510 +LABELV $1499 +line 1973 +;1972: } +;1973: return count; +ADDRLP4 4 +INDIRI4 +RETI4 +LABELV $1497 +endproc CG_FeederCount 8 0 +export CG_SetScoreSelection +proc CG_SetScoreSelection 28 16 +line 1977 +;1974:} +;1975: +;1976: +;1977:void CG_SetScoreSelection(void *p) { +line 1978 +;1978: menuDef_t *menu = (menuDef_t*)p; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 1979 +;1979: playerState_t *ps = &cg.snap->ps; +ADDRLP4 4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +line 1981 +;1980: int i, red, blue; +;1981: red = blue = 0; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRLP4 12 +ADDRLP4 20 +INDIRI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 1982 +;1982: for (i = 0; i < cg.numScores; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1528 +JUMPV +LABELV $1525 +line 1983 +;1983: if (cg.scores[i].team == TEAM_RED) { +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+56 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1530 +line 1984 +;1984: red++; +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1985 +;1985: } else if (cg.scores[i].team == TEAM_BLUE) { +ADDRGP4 $1531 +JUMPV +LABELV $1530 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+56 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1534 +line 1986 +;1986: blue++; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1987 +;1987: } +LABELV $1534 +LABELV $1531 +line 1988 +;1988: if (ps->clientNum == cg.scores[i].client) { +ADDRLP4 4 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +INDIRI4 +NEI4 $1538 +line 1989 +;1989: cg.selectedScore = i; +ADDRGP4 cg+5052 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 1990 +;1990: } +LABELV $1538 +line 1991 +;1991: } +LABELV $1526 +line 1982 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1528 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+5048 +INDIRI4 +LTI4 $1525 +line 1993 +;1992: +;1993: if (menu == NULL) { +ADDRLP4 16 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1542 +line 1995 +;1994: // just interested in setting the selected score +;1995: return; +ADDRGP4 $1523 +JUMPV +LABELV $1542 +line 1998 +;1996: } +;1997: +;1998: if ( cgs.gametype >= GT_TEAM ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $1544 +line 1999 +;1999: int feeder = FEEDER_REDTEAM_LIST; +ADDRLP4 24 +CNSTI4 5 +ASGNI4 +line 2000 +;2000: i = red; +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 2001 +;2001: if (cg.scores[cg.selectedScore].team == TEAM_BLUE) { +CNSTI4 60 +ADDRGP4 cg+5052 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+56 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1547 +line 2002 +;2002: feeder = FEEDER_BLUETEAM_LIST; +ADDRLP4 24 +CNSTI4 6 +ASGNI4 +line 2003 +;2003: i = blue; +ADDRLP4 0 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2004 +;2004: } +LABELV $1547 +line 2005 +;2005: Menu_SetFeederSelection(menu, feeder, i, NULL); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTP4 0 +ARGP4 +ADDRGP4 Menu_SetFeederSelection +CALLV +pop +line 2006 +;2006: } else { +ADDRGP4 $1545 +JUMPV +LABELV $1544 +line 2007 +;2007: Menu_SetFeederSelection(menu, FEEDER_SCOREBOARD, cg.selectedScore, NULL); +ADDRLP4 16 +INDIRP4 +ARGP4 +CNSTI4 11 +ARGI4 +ADDRGP4 cg+5052 +INDIRI4 +ARGI4 +CNSTP4 0 +ARGP4 +ADDRGP4 Menu_SetFeederSelection +CALLV +pop +line 2008 +;2008: } +LABELV $1545 +line 2009 +;2009:} +LABELV $1523 +endproc CG_SetScoreSelection 28 16 +proc CG_InfoFromScoreIndex 8 0 +line 2012 +;2010: +;2011:// FIXME: might need to cache this info +;2012:static clientInfo_t * CG_InfoFromScoreIndex(int index, int team, int *scoreIndex) { +line 2014 +;2013: int i, count; +;2014: if ( cgs.gametype >= GT_TEAM ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $1554 +line 2015 +;2015: count = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 2016 +;2016: for (i = 0; i < cg.numScores; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1560 +JUMPV +LABELV $1557 +line 2017 +;2017: if (cg.scores[i].team == team) { +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+56 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +NEI4 $1562 +line 2018 +;2018: if (count == index) { +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +NEI4 $1566 +line 2019 +;2019: *scoreIndex = i; +ADDRFP4 8 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 2020 +;2020: return &cgs.clientinfo[cg.scores[i].client]; +CNSTI4 788 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +RETP4 +ADDRGP4 $1553 +JUMPV +LABELV $1566 +line 2022 +;2021: } +;2022: count++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2023 +;2023: } +LABELV $1562 +line 2024 +;2024: } +LABELV $1558 +line 2016 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1560 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+5048 +INDIRI4 +LTI4 $1557 +line 2025 +;2025: } +LABELV $1554 +line 2026 +;2026: *scoreIndex = index; +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 2027 +;2027: return &cgs.clientinfo[ cg.scores[index].client ]; +CNSTI4 788 +CNSTI4 60 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +RETP4 +LABELV $1553 +endproc CG_InfoFromScoreIndex 8 0 +proc CG_FeederItemText 48 12 +line 2031 +;2028:} +;2029: +;2030:static const char *CG_FeederItemText(float feederID, int index, int column, +;2031: qhandle_t *handle1, qhandle_t *handle2, qhandle_t *handle3) { +line 2033 +;2032: gitem_t *item; +;2033: int scoreIndex = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 2034 +;2034: clientInfo_t *info = NULL; +ADDRLP4 0 +CNSTP4 0 +ASGNP4 +line 2035 +;2035: int team = -1; +ADDRLP4 8 +CNSTI4 -1 +ASGNI4 +line 2036 +;2036: score_t *sp = NULL; +ADDRLP4 12 +CNSTP4 0 +ASGNP4 +line 2038 +;2037: +;2038: *handle1 = *handle2 = *handle3 = -1; +ADDRLP4 20 +CNSTI4 -1 +ASGNI4 +ADDRFP4 20 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +ADDRFP4 16 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 2040 +;2039: +;2040: if (feederID == FEEDER_REDTEAM_LIST) { +ADDRFP4 0 +INDIRF4 +CNSTF4 1084227584 +NEF4 $1573 +line 2041 +;2041: team = TEAM_RED; +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +line 2042 +;2042: } else if (feederID == FEEDER_BLUETEAM_LIST) { +ADDRGP4 $1574 +JUMPV +LABELV $1573 +ADDRFP4 0 +INDIRF4 +CNSTF4 1086324736 +NEF4 $1575 +line 2043 +;2043: team = TEAM_BLUE; +ADDRLP4 8 +CNSTI4 2 +ASGNI4 +line 2044 +;2044: } +LABELV $1575 +LABELV $1574 +line 2046 +;2045: +;2046: info = CG_InfoFromScoreIndex(index, team, &scoreIndex); +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 24 +ADDRGP4 CG_InfoFromScoreIndex +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 24 +INDIRP4 +ASGNP4 +line 2047 +;2047: sp = &cg.scores[scoreIndex]; +ADDRLP4 12 +CNSTI4 60 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +ASGNP4 +line 2049 +;2048: +;2049: if (info && info->infoValid) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1578 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +EQI4 $1578 +line 2050 +;2050: switch (column) { +ADDRLP4 32 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +LTI4 $1580 +ADDRLP4 32 +INDIRI4 +CNSTI4 6 +GTI4 $1580 +ADDRLP4 32 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1621 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1621 +address $1582 +address $1592 +address $1595 +address $1612 +address $1613 +address $1615 +address $1617 +code +LABELV $1582 +line 2052 +;2051: case 0: +;2052: if ( info->powerups & ( 1 << PW_NEUTRALFLAG ) ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 64 +BANDI4 +CNSTI4 0 +EQI4 $1583 +line 2053 +;2053: item = BG_FindItemForPowerup( PW_NEUTRALFLAG ); +CNSTI4 6 +ARGI4 +ADDRLP4 36 +ADDRGP4 BG_FindItemForPowerup +CALLP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 36 +INDIRP4 +ASGNP4 +line 2054 +;2054: *handle1 = cg_items[ ITEM_INDEX(item) ].icon; +ADDRFP4 12 +INDIRP4 +CNSTI4 56 +ADDRLP4 16 +INDIRP4 +CVPU4 4 +ADDRGP4 bg_itemlist +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 52 +DIVI4 +MULI4 +ADDRGP4 cg_items+20 +ADDP4 +INDIRI4 +ASGNI4 +line 2055 +;2055: } else if ( info->powerups & ( 1 << PW_REDFLAG ) ) { +ADDRGP4 $1581 +JUMPV +LABELV $1583 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $1586 +line 2056 +;2056: item = BG_FindItemForPowerup( PW_REDFLAG ); +CNSTI4 4 +ARGI4 +ADDRLP4 36 +ADDRGP4 BG_FindItemForPowerup +CALLP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 36 +INDIRP4 +ASGNP4 +line 2057 +;2057: *handle1 = cg_items[ ITEM_INDEX(item) ].icon; +ADDRFP4 12 +INDIRP4 +CNSTI4 56 +ADDRLP4 16 +INDIRP4 +CVPU4 4 +ADDRGP4 bg_itemlist +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 52 +DIVI4 +MULI4 +ADDRGP4 cg_items+20 +ADDP4 +INDIRI4 +ASGNI4 +line 2058 +;2058: } else if ( info->powerups & ( 1 << PW_BLUEFLAG ) ) { +ADDRGP4 $1581 +JUMPV +LABELV $1586 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 32 +BANDI4 +CNSTI4 0 +EQI4 $1581 +line 2059 +;2059: item = BG_FindItemForPowerup( PW_BLUEFLAG ); +CNSTI4 5 +ARGI4 +ADDRLP4 36 +ADDRGP4 BG_FindItemForPowerup +CALLP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 36 +INDIRP4 +ASGNP4 +line 2060 +;2060: *handle1 = cg_items[ ITEM_INDEX(item) ].icon; +ADDRFP4 12 +INDIRP4 +CNSTI4 56 +ADDRLP4 16 +INDIRP4 +CVPU4 4 +ADDRGP4 bg_itemlist +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 52 +DIVI4 +MULI4 +ADDRGP4 cg_items+20 +ADDP4 +INDIRI4 +ASGNI4 +line 2061 +;2061: } else { +line 2069 +;2062: /* +;2063: if ( info->botSkill > 0 && info->botSkill <= 5 ) { +;2064: *handle1 = cgs.media.botSkillShaders[ info->botSkill - 1 ]; +;2065: } else if ( info->handicap < 100 ) { +;2066: return va("%i", info->handicap ); +;2067: } +;2068: */ +;2069: } +line 2070 +;2070: break; +ADDRGP4 $1581 +JUMPV +LABELV $1592 +line 2072 +;2071: case 1: +;2072: if (team == -1) { +ADDRLP4 8 +INDIRI4 +CNSTI4 -1 +NEI4 $1593 +line 2073 +;2073: return ""; +ADDRGP4 $330 +RETP4 +ADDRGP4 $1572 +JUMPV +LABELV $1593 +line 2074 +;2074: } else { +line 2075 +;2075: *handle1 = CG_StatusHandle(info->teamTask); +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 CG_StatusHandle +CALLI4 +ASGNI4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 2076 +;2076: } +line 2077 +;2077: break; +ADDRGP4 $1581 +JUMPV +LABELV $1595 +line 2079 +;2078: case 2: +;2079: if ( cg.snap->ps.stats[ STAT_CLIENTS_READY ] & ( 1 << sp->client ) ) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 12 +INDIRP4 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $1596 +line 2080 +;2080: return "Ready"; +ADDRGP4 $1599 +RETP4 +ADDRGP4 $1572 +JUMPV +LABELV $1596 +line 2082 +;2081: } +;2082: if (team == -1) { +ADDRLP4 8 +INDIRI4 +CNSTI4 -1 +NEI4 $1600 +line 2083 +;2083: if (cgs.gametype == GT_TOURNAMENT) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $1602 +line 2084 +;2084: return va("%i/%i", info->wins, info->losses); +ADDRGP4 $1605 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 40 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +RETP4 +ADDRGP4 $1572 +JUMPV +LABELV $1602 +line 2085 +;2085: } else if (info->infoValid && info->team == TEAM_SPECTATOR ) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +EQI4 $1606 +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $1606 +line 2086 +;2086: return "Spectator"; +ADDRGP4 $1608 +RETP4 +ADDRGP4 $1572 +JUMPV +LABELV $1606 +line 2087 +;2087: } else { +line 2088 +;2088: return ""; +ADDRGP4 $330 +RETP4 +ADDRGP4 $1572 +JUMPV +LABELV $1600 +line 2090 +;2089: } +;2090: } else { +line 2091 +;2091: if (info->teamLeader) { +ADDRLP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1581 +line 2092 +;2092: return "Leader"; +ADDRGP4 $1611 +RETP4 +ADDRGP4 $1572 +JUMPV +line 2094 +;2093: } +;2094: } +line 2095 +;2095: break; +LABELV $1612 +line 2097 +;2096: case 3: +;2097: return info->name; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +RETP4 +ADDRGP4 $1572 +JUMPV +line 2098 +;2098: break; +LABELV $1613 +line 2100 +;2099: case 4: +;2100: return va("%i", info->score); +ADDRGP4 $1614 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +RETP4 +ADDRGP4 $1572 +JUMPV +line 2101 +;2101: break; +LABELV $1615 +line 2103 +;2102: case 5: +;2103: return va("%4i", sp->time); +ADDRGP4 $1616 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 40 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +RETP4 +ADDRGP4 $1572 +JUMPV +line 2104 +;2104: break; +LABELV $1617 +line 2106 +;2105: case 6: +;2106: if ( sp->ping == -1 ) { +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 -1 +NEI4 $1618 +line 2107 +;2107: return "connecting"; +ADDRGP4 $1620 +RETP4 +ADDRGP4 $1572 +JUMPV +LABELV $1618 +line 2109 +;2108: } +;2109: return va("%4i", sp->ping); +ADDRGP4 $1616 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 44 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +RETP4 +ADDRGP4 $1572 +JUMPV +line 2110 +;2110: break; +LABELV $1580 +LABELV $1581 +line 2112 +;2111: } +;2112: } +LABELV $1578 +line 2114 +;2113: +;2114: return ""; +ADDRGP4 $330 +RETP4 +LABELV $1572 +endproc CG_FeederItemText 48 12 +proc CG_FeederItemImage 0 0 +line 2117 +;2115:} +;2116: +;2117:static qhandle_t CG_FeederItemImage(float feederID, int index) { +line 2118 +;2118: return 0; +CNSTI4 0 +RETI4 +LABELV $1622 +endproc CG_FeederItemImage 0 0 +proc CG_FeederSelection 16 0 +line 2121 +;2119:} +;2120: +;2121:static qboolean CG_FeederSelection(float feederID, int index) { +line 2122 +;2122: if ( cgs.gametype >= GT_TEAM ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $1624 +line 2124 +;2123: int i, count; +;2124: int team = (feederID == FEEDER_REDTEAM_LIST) ? TEAM_RED : TEAM_BLUE; +ADDRFP4 0 +INDIRF4 +CNSTF4 1084227584 +NEF4 $1628 +ADDRLP4 12 +CNSTI4 1 +ASGNI4 +ADDRGP4 $1629 +JUMPV +LABELV $1628 +ADDRLP4 12 +CNSTI4 2 +ASGNI4 +LABELV $1629 +ADDRLP4 4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2125 +;2125: count = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 2126 +;2126: for (i = 0; i < cg.numScores; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1633 +JUMPV +LABELV $1630 +line 2127 +;2127: if (cg.scores[i].team == team) { +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+56 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $1635 +line 2128 +;2128: if (index == count) { +ADDRFP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $1639 +line 2129 +;2129: cg.selectedScore = i; +ADDRGP4 cg+5052 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 2130 +;2130: } +LABELV $1639 +line 2131 +;2131: count++; +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2132 +;2132: } +LABELV $1635 +line 2133 +;2133: } +LABELV $1631 +line 2126 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1633 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+5048 +INDIRI4 +LTI4 $1630 +line 2134 +;2134: } else { +ADDRGP4 $1625 +JUMPV +LABELV $1624 +line 2135 +;2135: cg.selectedScore = index; +ADDRGP4 cg+5052 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 2136 +;2136: } +LABELV $1625 +line 2138 +;2137: +;2138: return qtrue; +CNSTI4 1 +RETI4 +LABELV $1623 +endproc CG_FeederSelection 16 0 +proc CG_Cvar_Get 132 12 +line 2141 +;2139:} +;2140: +;2141:static float CG_Cvar_Get(const char *cvar) { +line 2143 +;2142: char buff[128]; +;2143: memset(buff, 0, sizeof(buff)); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 128 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 2144 +;2144: trap_Cvar_VariableStringBuffer(cvar, buff, sizeof(buff)); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 trap_Cvar_VariableStringBuffer +CALLV +pop +line 2145 +;2145: return atof(buff); +ADDRLP4 0 +ARGP4 +ADDRLP4 128 +ADDRGP4 atof +CALLF4 +ASGNF4 +ADDRLP4 128 +INDIRF4 +RETF4 +LABELV $1643 +endproc CG_Cvar_Get 132 12 +export CG_Text_PaintWithCursor +proc CG_Text_PaintWithCursor 0 36 +ADDRFP4 24 +ADDRFP4 24 +INDIRI4 +CVII1 4 +ASGNI1 +line 2148 +;2146:} +;2147: +;2148:void CG_Text_PaintWithCursor(float x, float y, float scale, vec4_t color, const char *text, int cursorPos, char cursor, int limit, int style, int iMenuFont) { +line 2149 +;2149: CG_Text_Paint(x, y, scale, color, text, 0, limit, style, iMenuFont); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRFP4 16 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRFP4 28 +INDIRI4 +ARGI4 +ADDRFP4 32 +INDIRI4 +ARGI4 +ADDRFP4 36 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 2150 +;2150:} +LABELV $1644 +endproc CG_Text_PaintWithCursor 0 36 +proc CG_OwnerDrawWidth 48 12 +line 2152 +;2151: +;2152:static int CG_OwnerDrawWidth(int ownerDraw, float scale) { +line 2153 +;2153: switch (ownerDraw) { +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 4 +CNSTI4 39 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $1648 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +GTI4 $1656 +LABELV $1655 +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 29 +EQI4 $1651 +ADDRLP4 8 +INDIRI4 +CNSTI4 30 +EQI4 $1653 +ADDRGP4 $1646 +JUMPV +LABELV $1656 +ADDRLP4 12 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 49 +EQI4 $1649 +ADDRLP4 12 +INDIRI4 +CNSTI4 50 +EQI4 $1650 +ADDRGP4 $1646 +JUMPV +LABELV $1648 +line 2155 +;2154: case CG_GAME_TYPE: +;2155: return CG_Text_Width(CG_GameTypeString(), scale, FONT_MEDIUM); +ADDRLP4 16 +ADDRGP4 CG_GameTypeString +CALLP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 20 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +RETI4 +ADDRGP4 $1645 +JUMPV +LABELV $1649 +line 2157 +;2156: case CG_GAME_STATUS: +;2157: return CG_Text_Width(CG_GetGameStatusText(), scale, FONT_MEDIUM); +ADDRLP4 24 +ADDRGP4 CG_GetGameStatusText +CALLP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 28 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +RETI4 +ADDRGP4 $1645 +JUMPV +line 2158 +;2158: break; +LABELV $1650 +line 2160 +;2159: case CG_KILLER: +;2160: return CG_Text_Width(CG_GetKillerText(), scale, FONT_MEDIUM); +ADDRLP4 32 +ADDRGP4 CG_GetKillerText +CALLP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 36 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +RETI4 +ADDRGP4 $1645 +JUMPV +line 2161 +;2161: break; +LABELV $1651 +line 2163 +;2162: case CG_RED_NAME: +;2163: return CG_Text_Width(cg_redTeamName.string, scale, FONT_MEDIUM); +ADDRGP4 cg_redTeamName+16 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 40 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +RETI4 +ADDRGP4 $1645 +JUMPV +line 2164 +;2164: break; +LABELV $1653 +line 2166 +;2165: case CG_BLUE_NAME: +;2166: return CG_Text_Width(cg_blueTeamName.string, scale, FONT_MEDIUM); +ADDRGP4 cg_blueTeamName+16 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 44 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +RETI4 +ADDRGP4 $1645 +JUMPV +line 2167 +;2167: break; +LABELV $1646 +line 2171 +;2168: +;2169: +;2170: } +;2171: return 0; +CNSTI4 0 +RETI4 +LABELV $1645 +endproc CG_OwnerDrawWidth 48 12 +proc CG_PlayCinematic 4 24 +line 2174 +;2172:} +;2173: +;2174:static int CG_PlayCinematic(const char *name, float x, float y, float w, float h) { +line 2175 +;2175: return trap_CIN_PlayCinematic(name, x, y, w, h, CIN_loop); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRFP4 8 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRFP4 12 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRFP4 16 +INDIRF4 +CVFI4 4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 0 +ADDRGP4 trap_CIN_PlayCinematic +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $1657 +endproc CG_PlayCinematic 4 24 +proc CG_StopCinematic 0 4 +line 2178 +;2176:} +;2177: +;2178:static void CG_StopCinematic(int handle) { +line 2179 +;2179: trap_CIN_StopCinematic(handle); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 trap_CIN_StopCinematic +CALLI4 +pop +line 2180 +;2180:} +LABELV $1658 +endproc CG_StopCinematic 0 4 +proc CG_DrawCinematic 0 20 +line 2182 +;2181: +;2182:static void CG_DrawCinematic(int handle, float x, float y, float w, float h) { +line 2183 +;2183: trap_CIN_SetExtents(handle, x, y, w, h); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRFP4 8 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRFP4 12 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRFP4 16 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRGP4 trap_CIN_SetExtents +CALLV +pop +line 2184 +;2184: trap_CIN_DrawCinematic(handle); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 trap_CIN_DrawCinematic +CALLV +pop +line 2185 +;2185:} +LABELV $1659 +endproc CG_DrawCinematic 0 20 +proc CG_RunCinematicFrame 0 4 +line 2187 +;2186: +;2187:static void CG_RunCinematicFrame(int handle) { +line 2188 +;2188: trap_CIN_RunCinematic(handle); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 trap_CIN_RunCinematic +CALLI4 +pop +line 2189 +;2189:} +LABELV $1660 +endproc CG_RunCinematicFrame 0 4 +export CG_LoadHudMenu +proc CG_LoadHudMenu 0 4 +line 2198 +;2190: +;2191:/* +;2192:================= +;2193:CG_LoadHudMenu(); +;2194: +;2195:================= +;2196:*/ +;2197:void CG_LoadHudMenu() +;2198:{ +line 2199 +;2199: cgDC.registerShaderNoMip = &trap_R_RegisterShaderNoMip; +ADDRGP4 cgDC +ADDRGP4 trap_R_RegisterShaderNoMip +ASGNP4 +line 2200 +;2200: cgDC.setColor = &trap_R_SetColor; +ADDRGP4 cgDC+4 +ADDRGP4 trap_R_SetColor +ASGNP4 +line 2201 +;2201: cgDC.drawHandlePic = &CG_DrawPic; +ADDRGP4 cgDC+8 +ADDRGP4 CG_DrawPic +ASGNP4 +line 2202 +;2202: cgDC.drawStretchPic = &trap_R_DrawStretchPic; +ADDRGP4 cgDC+12 +ADDRGP4 trap_R_DrawStretchPic +ASGNP4 +line 2203 +;2203: cgDC.drawText = &CG_Text_Paint; +ADDRGP4 cgDC+16 +ADDRGP4 CG_Text_Paint +ASGNP4 +line 2204 +;2204: cgDC.textWidth = &CG_Text_Width; +ADDRGP4 cgDC+20 +ADDRGP4 CG_Text_Width +ASGNP4 +line 2205 +;2205: cgDC.textHeight = &CG_Text_Height; +ADDRGP4 cgDC+24 +ADDRGP4 CG_Text_Height +ASGNP4 +line 2206 +;2206: cgDC.registerModel = &trap_R_RegisterModel; +ADDRGP4 cgDC+28 +ADDRGP4 trap_R_RegisterModel +ASGNP4 +line 2207 +;2207: cgDC.modelBounds = &trap_R_ModelBounds; +ADDRGP4 cgDC+32 +ADDRGP4 trap_R_ModelBounds +ASGNP4 +line 2208 +;2208: cgDC.fillRect = &CG_FillRect; +ADDRGP4 cgDC+36 +ADDRGP4 CG_FillRect +ASGNP4 +line 2209 +;2209: cgDC.drawRect = &CG_DrawRect; +ADDRGP4 cgDC+40 +ADDRGP4 CG_DrawRect +ASGNP4 +line 2210 +;2210: cgDC.drawSides = &CG_DrawSides; +ADDRGP4 cgDC+44 +ADDRGP4 CG_DrawSides +ASGNP4 +line 2211 +;2211: cgDC.drawTopBottom = &CG_DrawTopBottom; +ADDRGP4 cgDC+48 +ADDRGP4 CG_DrawTopBottom +ASGNP4 +line 2212 +;2212: cgDC.clearScene = &trap_R_ClearScene; +ADDRGP4 cgDC+52 +ADDRGP4 trap_R_ClearScene +ASGNP4 +line 2213 +;2213: cgDC.addRefEntityToScene = &trap_R_AddRefEntityToScene; +ADDRGP4 cgDC+56 +ADDRGP4 trap_R_AddRefEntityToScene +ASGNP4 +line 2214 +;2214: cgDC.renderScene = &trap_R_RenderScene; +ADDRGP4 cgDC+60 +ADDRGP4 trap_R_RenderScene +ASGNP4 +line 2215 +;2215: cgDC.RegisterFont = &trap_R_RegisterFont; +ADDRGP4 cgDC+64 +ADDRGP4 trap_R_RegisterFont +ASGNP4 +line 2216 +;2216: cgDC.Font_StrLenPixels = &trap_R_Font_StrLenPixels; +ADDRGP4 cgDC+68 +ADDRGP4 trap_R_Font_StrLenPixels +ASGNP4 +line 2217 +;2217: cgDC.Font_StrLenChars = &trap_R_Font_StrLenChars; +ADDRGP4 cgDC+72 +ADDRGP4 trap_R_Font_StrLenChars +ASGNP4 +line 2218 +;2218: cgDC.Font_HeightPixels = &trap_R_Font_HeightPixels; +ADDRGP4 cgDC+76 +ADDRGP4 trap_R_Font_HeightPixels +ASGNP4 +line 2219 +;2219: cgDC.Font_DrawString = &trap_R_Font_DrawString; +ADDRGP4 cgDC+80 +ADDRGP4 trap_R_Font_DrawString +ASGNP4 +line 2220 +;2220: cgDC.Language_IsAsian = &trap_Language_IsAsian; +ADDRGP4 cgDC+84 +ADDRGP4 trap_Language_IsAsian +ASGNP4 +line 2221 +;2221: cgDC.Language_UsesSpaces = &trap_Language_UsesSpaces; +ADDRGP4 cgDC+88 +ADDRGP4 trap_Language_UsesSpaces +ASGNP4 +line 2222 +;2222: cgDC.AnyLanguage_ReadCharFromString = &trap_AnyLanguage_ReadCharFromString; +ADDRGP4 cgDC+92 +ADDRGP4 trap_AnyLanguage_ReadCharFromString +ASGNP4 +line 2223 +;2223: cgDC.ownerDrawItem = &CG_OwnerDraw; +ADDRGP4 cgDC+96 +ADDRGP4 CG_OwnerDraw +ASGNP4 +line 2224 +;2224: cgDC.getValue = &CG_GetValue; +ADDRGP4 cgDC+100 +ADDRGP4 CG_GetValue +ASGNP4 +line 2225 +;2225: cgDC.ownerDrawVisible = &CG_OwnerDrawVisible; +ADDRGP4 cgDC+104 +ADDRGP4 CG_OwnerDrawVisible +ASGNP4 +line 2226 +;2226: cgDC.runScript = &CG_RunMenuScript; +ADDRGP4 cgDC+108 +ADDRGP4 CG_RunMenuScript +ASGNP4 +line 2227 +;2227: cgDC.deferScript = &CG_DeferMenuScript; +ADDRGP4 cgDC+112 +ADDRGP4 CG_DeferMenuScript +ASGNP4 +line 2228 +;2228: cgDC.getTeamColor = &CG_GetTeamColor; +ADDRGP4 cgDC+116 +ADDRGP4 CG_GetTeamColor +ASGNP4 +line 2229 +;2229: cgDC.setCVar = trap_Cvar_Set; +ADDRGP4 cgDC+128 +ADDRGP4 trap_Cvar_Set +ASGNP4 +line 2230 +;2230: cgDC.getCVarString = trap_Cvar_VariableStringBuffer; +ADDRGP4 cgDC+120 +ADDRGP4 trap_Cvar_VariableStringBuffer +ASGNP4 +line 2231 +;2231: cgDC.getCVarValue = CG_Cvar_Get; +ADDRGP4 cgDC+124 +ADDRGP4 CG_Cvar_Get +ASGNP4 +line 2232 +;2232: cgDC.drawTextWithCursor = &CG_Text_PaintWithCursor; +ADDRGP4 cgDC+132 +ADDRGP4 CG_Text_PaintWithCursor +ASGNP4 +line 2235 +;2233: //cgDC.setOverstrikeMode = &trap_Key_SetOverstrikeMode; +;2234: //cgDC.getOverstrikeMode = &trap_Key_GetOverstrikeMode; +;2235: cgDC.startLocalSound = &trap_S_StartLocalSound; +ADDRGP4 cgDC+144 +ADDRGP4 trap_S_StartLocalSound +ASGNP4 +line 2236 +;2236: cgDC.ownerDrawHandleKey = &CG_OwnerDrawHandleKey; +ADDRGP4 cgDC+148 +ADDRGP4 CG_OwnerDrawHandleKey +ASGNP4 +line 2237 +;2237: cgDC.feederCount = &CG_FeederCount; +ADDRGP4 cgDC+152 +ADDRGP4 CG_FeederCount +ASGNP4 +line 2238 +;2238: cgDC.feederItemImage = &CG_FeederItemImage; +ADDRGP4 cgDC+160 +ADDRGP4 CG_FeederItemImage +ASGNP4 +line 2239 +;2239: cgDC.feederItemText = &CG_FeederItemText; +ADDRGP4 cgDC+156 +ADDRGP4 CG_FeederItemText +ASGNP4 +line 2240 +;2240: cgDC.feederSelection = &CG_FeederSelection; +ADDRGP4 cgDC+164 +ADDRGP4 CG_FeederSelection +ASGNP4 +line 2245 +;2241: //cgDC.setBinding = &trap_Key_SetBinding; +;2242: //cgDC.getBindingBuf = &trap_Key_GetBindingBuf; +;2243: //cgDC.keynumToStringBuf = &trap_Key_KeynumToStringBuf; +;2244: //cgDC.executeText = &trap_Cmd_ExecuteText; +;2245: cgDC.Error = &Com_Error; +ADDRGP4 cgDC+184 +ADDRGP4 Com_Error +ASGNP4 +line 2246 +;2246: cgDC.Print = &Com_Printf; +ADDRGP4 cgDC+188 +ADDRGP4 Com_Printf +ASGNP4 +line 2247 +;2247: cgDC.ownerDrawWidth = &CG_OwnerDrawWidth; +ADDRGP4 cgDC+196 +ADDRGP4 CG_OwnerDrawWidth +ASGNP4 +line 2249 +;2248: //cgDC.Pause = &CG_Pause; +;2249: cgDC.registerSound = &trap_S_RegisterSound; +ADDRGP4 cgDC+200 +ADDRGP4 trap_S_RegisterSound +ASGNP4 +line 2250 +;2250: cgDC.startBackgroundTrack = &trap_S_StartBackgroundTrack; +ADDRGP4 cgDC+204 +ADDRGP4 trap_S_StartBackgroundTrack +ASGNP4 +line 2251 +;2251: cgDC.stopBackgroundTrack = &trap_S_StopBackgroundTrack; +ADDRGP4 cgDC+208 +ADDRGP4 trap_S_StopBackgroundTrack +ASGNP4 +line 2252 +;2252: cgDC.playCinematic = &CG_PlayCinematic; +ADDRGP4 cgDC+212 +ADDRGP4 CG_PlayCinematic +ASGNP4 +line 2253 +;2253: cgDC.stopCinematic = &CG_StopCinematic; +ADDRGP4 cgDC+216 +ADDRGP4 CG_StopCinematic +ASGNP4 +line 2254 +;2254: cgDC.drawCinematic = &CG_DrawCinematic; +ADDRGP4 cgDC+220 +ADDRGP4 CG_DrawCinematic +ASGNP4 +line 2255 +;2255: cgDC.runCinematicFrame = &CG_RunCinematicFrame; +ADDRGP4 cgDC+224 +ADDRGP4 CG_RunCinematicFrame +ASGNP4 +line 2257 +;2256: +;2257: Init_Display(&cgDC); +ADDRGP4 cgDC +ARGP4 +ADDRGP4 Init_Display +CALLV +pop +line 2259 +;2258: +;2259: Menu_Reset(); +ADDRGP4 Menu_Reset +CALLV +pop +line 2260 +;2260:} +LABELV $1661 +endproc CG_LoadHudMenu 0 4 +export CG_AssetCache +proc CG_AssetCache 68 4 +line 2262 +;2261: +;2262:void CG_AssetCache() { +line 2268 +;2263: //if (Assets.textFont == NULL) { +;2264: // trap_R_RegisterFont("fonts/arial.ttf", 72, &Assets.textFont); +;2265: //} +;2266: //Assets.background = trap_R_RegisterShaderNoMip( ASSET_BACKGROUND ); +;2267: //Com_Printf("Menu Size: %i bytes\n", sizeof(Menus)); +;2268: cgDC.Assets.gradientBar = trap_R_RegisterShaderNoMip( ASSET_GRADIENTBAR ); +ADDRGP4 $1714 +ARGP4 +ADDRLP4 0 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+28 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 2269 +;2269: cgDC.Assets.fxBasePic = trap_R_RegisterShaderNoMip( ART_FX_BASE ); +ADDRGP4 $1717 +ARGP4 +ADDRLP4 4 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+136 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 2270 +;2270: cgDC.Assets.fxPic[0] = trap_R_RegisterShaderNoMip( ART_FX_RED ); +ADDRGP4 $1720 +ARGP4 +ADDRLP4 8 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+140 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 2271 +;2271: cgDC.Assets.fxPic[1] = trap_R_RegisterShaderNoMip( ART_FX_YELLOW ); +ADDRGP4 $1724 +ARGP4 +ADDRLP4 12 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+140+4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2272 +;2272: cgDC.Assets.fxPic[2] = trap_R_RegisterShaderNoMip( ART_FX_GREEN ); +ADDRGP4 $1728 +ARGP4 +ADDRLP4 16 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+140+8 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 2273 +;2273: cgDC.Assets.fxPic[3] = trap_R_RegisterShaderNoMip( ART_FX_TEAL ); +ADDRGP4 $1732 +ARGP4 +ADDRLP4 20 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+140+12 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 2274 +;2274: cgDC.Assets.fxPic[4] = trap_R_RegisterShaderNoMip( ART_FX_BLUE ); +ADDRGP4 $1736 +ARGP4 +ADDRLP4 24 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+140+16 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 2275 +;2275: cgDC.Assets.fxPic[5] = trap_R_RegisterShaderNoMip( ART_FX_CYAN ); +ADDRGP4 $1740 +ARGP4 +ADDRLP4 28 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+140+20 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 2276 +;2276: cgDC.Assets.fxPic[6] = trap_R_RegisterShaderNoMip( ART_FX_WHITE ); +ADDRGP4 $1744 +ARGP4 +ADDRLP4 32 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+140+24 +ADDRLP4 32 +INDIRI4 +ASGNI4 +line 2277 +;2277: cgDC.Assets.scrollBar = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR ); +ADDRGP4 $1747 +ARGP4 +ADDRLP4 36 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+48 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 2278 +;2278: cgDC.Assets.scrollBarArrowDown = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWDOWN ); +ADDRGP4 $1750 +ARGP4 +ADDRLP4 40 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+36 +ADDRLP4 40 +INDIRI4 +ASGNI4 +line 2279 +;2279: cgDC.Assets.scrollBarArrowUp = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWUP ); +ADDRGP4 $1753 +ARGP4 +ADDRLP4 44 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+32 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 2280 +;2280: cgDC.Assets.scrollBarArrowLeft = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWLEFT ); +ADDRGP4 $1756 +ARGP4 +ADDRLP4 48 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+40 +ADDRLP4 48 +INDIRI4 +ASGNI4 +line 2281 +;2281: cgDC.Assets.scrollBarArrowRight = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWRIGHT ); +ADDRGP4 $1759 +ARGP4 +ADDRLP4 52 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+44 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 2282 +;2282: cgDC.Assets.scrollBarThumb = trap_R_RegisterShaderNoMip( ASSET_SCROLL_THUMB ); +ADDRGP4 $1762 +ARGP4 +ADDRLP4 56 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+52 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 2283 +;2283: cgDC.Assets.sliderBar = trap_R_RegisterShaderNoMip( ASSET_SLIDER_BAR ); +ADDRGP4 $1765 +ARGP4 +ADDRLP4 60 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+68 +ADDRLP4 60 +INDIRI4 +ASGNI4 +line 2284 +;2284: cgDC.Assets.sliderThumb = trap_R_RegisterShaderNoMip( ASSET_SLIDER_THUMB ); +ADDRGP4 $1768 +ARGP4 +ADDRLP4 64 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+72 +ADDRLP4 64 +INDIRI4 +ASGNI4 +line 2285 +;2285:} +LABELV $1711 +endproc CG_AssetCache 68 4 +export CG_Init_CG +proc CG_Init_CG 0 12 +line 2296 +;2286: +;2287:/* +;2288: +;2289: +;2290:/* +;2291:Ghoul2 Insert Start +;2292:*/ +;2293: +;2294:// initialise the cg_entities structure - take into account the ghoul2 stl stuff in the active snap shots +;2295:void CG_Init_CG(void) +;2296:{ +line 2297 +;2297: memset( &cg, 0, sizeof(cg)); +ADDRGP4 cg +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 170284 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 2298 +;2298:} +LABELV $1769 +endproc CG_Init_CG 0 12 +export CG_Init_CGents +proc CG_Init_CGents 0 12 +line 2302 +;2299: +;2300:// initialise the cg_entities structure - take into account the ghoul2 stl stuff +;2301:void CG_Init_CGents(void) +;2302:{ +line 2304 +;2303: +;2304: memset(&cg_entities, 0, sizeof(cg_entities)); +ADDRGP4 cg_entities +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 1966080 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 2305 +;2305:} +LABELV $1770 +endproc CG_Init_CGents 0 12 +export CG_InitItems +proc CG_InitItems 0 12 +line 2309 +;2306: +;2307: +;2308:void CG_InitItems(void) +;2309:{ +line 2310 +;2310: memset( cg_items, 0, sizeof( cg_items ) ); +ADDRGP4 cg_items +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 14336 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 2311 +;2311:} +LABELV $1771 +endproc CG_InitItems 0 12 +data +export forceTicPos +align 4 +LABELV forceTicPos +byte 4 11 +byte 4 41 +byte 4 20 +byte 4 10 +address $1772 +byte 4 0 +byte 4 12 +byte 4 45 +byte 4 20 +byte 4 10 +address $1773 +byte 4 0 +byte 4 14 +byte 4 49 +byte 4 20 +byte 4 10 +address $1774 +byte 4 0 +byte 4 17 +byte 4 52 +byte 4 20 +byte 4 10 +address $1775 +byte 4 0 +byte 4 22 +byte 4 55 +byte 4 10 +byte 4 10 +address $1776 +byte 4 0 +byte 4 28 +byte 4 57 +byte 4 10 +byte 4 20 +address $1777 +byte 4 0 +byte 4 34 +byte 4 59 +byte 4 10 +byte 4 10 +address $1778 +byte 4 0 +byte 4 46 +byte 4 59 +byte 4 -10 +byte 4 10 +address $1778 +byte 4 0 +byte 4 52 +byte 4 57 +byte 4 -10 +byte 4 20 +address $1777 +byte 4 0 +byte 4 58 +byte 4 55 +byte 4 -10 +byte 4 10 +address $1776 +byte 4 0 +byte 4 63 +byte 4 52 +byte 4 -20 +byte 4 10 +address $1775 +byte 4 0 +byte 4 66 +byte 4 49 +byte 4 -20 +byte 4 10 +address $1774 +byte 4 0 +byte 4 68 +byte 4 45 +byte 4 -20 +byte 4 10 +address $1773 +byte 4 0 +byte 4 69 +byte 4 41 +byte 4 -20 +byte 4 10 +address $1772 +byte 4 0 +export ammoTicPos +align 4 +LABELV ammoTicPos +byte 4 12 +byte 4 34 +byte 4 10 +byte 4 10 +address $1779 +byte 4 0 +byte 4 13 +byte 4 28 +byte 4 10 +byte 4 10 +address $1780 +byte 4 0 +byte 4 15 +byte 4 23 +byte 4 10 +byte 4 10 +address $1781 +byte 4 0 +byte 4 19 +byte 4 19 +byte 4 10 +byte 4 10 +address $1782 +byte 4 0 +byte 4 23 +byte 4 15 +byte 4 10 +byte 4 10 +address $1783 +byte 4 0 +byte 4 29 +byte 4 12 +byte 4 10 +byte 4 10 +address $1784 +byte 4 0 +byte 4 34 +byte 4 11 +byte 4 10 +byte 4 10 +address $1785 +byte 4 0 +byte 4 47 +byte 4 11 +byte 4 -10 +byte 4 10 +address $1785 +byte 4 0 +byte 4 52 +byte 4 12 +byte 4 -10 +byte 4 10 +address $1784 +byte 4 0 +byte 4 58 +byte 4 15 +byte 4 -10 +byte 4 10 +address $1783 +byte 4 0 +byte 4 62 +byte 4 19 +byte 4 -10 +byte 4 10 +address $1782 +byte 4 0 +byte 4 66 +byte 4 23 +byte 4 -10 +byte 4 10 +address $1781 +byte 4 0 +byte 4 68 +byte 4 28 +byte 4 -10 +byte 4 10 +address $1780 +byte 4 0 +byte 4 69 +byte 4 34 +byte 4 -10 +byte 4 10 +address $1779 +byte 4 0 +export CG_Init +code +proc CG_Init 240 12 +line 2365 +;2312: +;2313:/* +;2314:Ghoul2 Insert End +;2315:*/ +;2316: +;2317:forceTicPos_t forceTicPos[] = +;2318:{ +;2319: +;2320: 11, 41, 20, 10, "gfx/hud/force_tick1", 0, // Left Top +;2321: 12, 45, 20, 10, "gfx/hud/force_tick2", 0, +;2322: 14, 49, 20, 10, "gfx/hud/force_tick3", 0, +;2323: 17, 52, 20, 10, "gfx/hud/force_tick4", 0, +;2324: 22, 55, 10, 10, "gfx/hud/force_tick5", 0, +;2325: 28, 57, 10, 20, "gfx/hud/force_tick6", 0, +;2326: 34, 59, 10, 10, "gfx/hud/force_tick7", 0, // Left bottom +;2327: +;2328: 46, 59, -10, 10, "gfx/hud/force_tick7", 0, // Right bottom +;2329: 52, 57, -10, 20, "gfx/hud/force_tick6", 0, +;2330: 58, 55, -10, 10, "gfx/hud/force_tick5", 0, +;2331: 63, 52, -20, 10, "gfx/hud/force_tick4", 0, +;2332: 66, 49, -20, 10, "gfx/hud/force_tick3", 0, +;2333: 68, 45, -20, 10, "gfx/hud/force_tick2", 0, +;2334: 69, 41, -20, 10, "gfx/hud/force_tick1", 0, // Right top +;2335:}; +;2336: +;2337:forceTicPos_t ammoTicPos[] = +;2338:{ +;2339: 12, 34, 10, 10, "gfx/hud/ammo_tick7", 0, // Bottom +;2340: 13, 28, 10, 10, "gfx/hud/ammo_tick6", 0, +;2341: 15, 23, 10, 10, "gfx/hud/ammo_tick5", 0, +;2342: 19, 19, 10, 10, "gfx/hud/ammo_tick4", 0, +;2343: 23, 15, 10, 10, "gfx/hud/ammo_tick3", 0, +;2344: 29, 12, 10, 10, "gfx/hud/ammo_tick2", 0, +;2345: 34, 11, 10, 10, "gfx/hud/ammo_tick1", 0, +;2346: +;2347: 47, 11, -10, 10, "gfx/hud/ammo_tick1", 0, +;2348: 52, 12, -10, 10, "gfx/hud/ammo_tick2", 0, +;2349: 58, 15, -10, 10, "gfx/hud/ammo_tick3", 0, +;2350: 62, 19, -10, 10, "gfx/hud/ammo_tick4", 0, +;2351: 66, 23, -10, 10, "gfx/hud/ammo_tick5", 0, +;2352: 68, 28, -10, 10, "gfx/hud/ammo_tick6", 0, +;2353: 69, 34, -10, 10, "gfx/hud/ammo_tick7", 0, +;2354:}; +;2355: +;2356: +;2357:/* +;2358:================= +;2359:CG_Init +;2360: +;2361:Called after every level change or subsystem restart +;2362:Will perform callbacks to make the loading info screen update. +;2363:================= +;2364:*/ +;2365:void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) { +line 2367 +;2366: const char *s; +;2367: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 2369 +;2368: +;2369: trap_CG_RegisterSharedMemory(cg.sharedBuffer); +ADDRGP4 cg+168236 +ARGP4 +ADDRGP4 trap_CG_RegisterSharedMemory +CALLV +pop +line 2377 +;2370: +;2371: // clear everything +;2372:/* +;2373:Ghoul2 Insert Start +;2374:*/ +;2375: +;2376:// memset( cg_entities, 0, sizeof( cg_entities ) ); +;2377: CG_Init_CGents(); +ADDRGP4 CG_Init_CGents +CALLV +pop +line 2380 +;2378:// this is a No-No now we have stl vector classes in here. +;2379:// memset( &cg, 0, sizeof( cg ) ); +;2380: CG_Init_CG(); +ADDRGP4 CG_Init_CG +CALLV +pop +line 2381 +;2381: CG_InitItems(); +ADDRGP4 CG_InitItems +CALLV +pop +line 2392 +;2382:/* +;2383:Ghoul2 Insert End +;2384:*/ +;2385: +;2386: // this is kinda dumb as well, but I need to pre-load some fonts in order to have the text available +;2387: // to say I'm loading the assets.... which includes loading the fonts. So I'll set these up as reasonable +;2388: // defaults, then let the menu asset parser (which actually specifies the ingame fonts) load over them +;2389: // if desired during parse. Dunno how legal it is to store in these cgDC things, but it causes no harm +;2390: // and even if/when they get overwritten they'll be legalised by the menu asset parser :-) +;2391:// CG_LoadFonts(); +;2392: cgDC.Assets.qhSmallFont = trap_R_RegisterFont("ocr_a"); +ADDRGP4 $1790 +ARGP4 +ADDRLP4 8 +ADDRGP4 trap_R_RegisterFont +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+12 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 2393 +;2393: cgDC.Assets.qhMediumFont = trap_R_RegisterFont("ergoec"); +ADDRGP4 $1793 +ARGP4 +ADDRLP4 12 +ADDRGP4 trap_R_RegisterFont +CALLI4 +ASGNI4 +ADDRGP4 cgDC+260+16 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2394 +;2394: cgDC.Assets.qhBigFont = cgDC.Assets.qhMediumFont; +ADDRGP4 cgDC+260+20 +ADDRGP4 cgDC+260+16 +INDIRI4 +ASGNI4 +line 2396 +;2395: +;2396: memset( &cgs, 0, sizeof( cgs ) ); +ADDRGP4 cgs +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 71732 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 2397 +;2397: memset( cg_weapons, 0, sizeof(cg_weapons) ); +ADDRGP4 cg_weapons +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 3328 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 2399 +;2398: +;2399: cg.clientNum = clientNum; +ADDRGP4 cg+4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 2401 +;2400: +;2401: cgs.processedSnapshotNum = serverMessageNum; +ADDRGP4 cgs+32952 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 2402 +;2402: cgs.serverCommandSequence = serverCommandSequence; +ADDRGP4 cgs+32948 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 2404 +;2403: +;2404: cg.loadLCARSStage = 0; +ADDRGP4 cg+13480 +CNSTI4 0 +ASGNI4 +line 2406 +;2405: +;2406: cg.itemSelect = -1; +ADDRGP4 cg+3516 +CNSTI4 -1 +ASGNI4 +line 2407 +;2407: cg.forceSelect = -1; +ADDRGP4 cg+3512 +CNSTI4 -1 +ASGNI4 +line 2410 +;2408: +;2409: // load a few needed things before we do any screen updates +;2410: cgs.media.charsetShader = trap_R_RegisterShaderNoMip( "gfx/2d/charsgrid_med" ); +ADDRGP4 $1805 +ARGP4 +ADDRLP4 16 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 2411 +;2411: cgs.media.whiteShader = trap_R_RegisterShader( "white" ); +ADDRGP4 $1808 +ARGP4 +ADDRLP4 20 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 2413 +;2412: +;2413: cgs.media.loadBarLED = trap_R_RegisterShaderNoMip( "gfx/hud/load_tick" ); +ADDRGP4 $1811 +ARGP4 +ADDRLP4 24 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+8 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 2414 +;2414: cgs.media.loadBarLEDCap = trap_R_RegisterShaderNoMip( "gfx/hud/load_tick_cap" ); +ADDRGP4 $1814 +ARGP4 +ADDRLP4 28 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+12 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 2415 +;2415: cgs.media.loadBarLEDSurround= trap_R_RegisterShaderNoMip( "gfx/hud/mp_levelload" ); +ADDRGP4 $1817 +ARGP4 +ADDRLP4 32 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+16 +ADDRLP4 32 +INDIRI4 +ASGNI4 +line 2419 +;2416: +;2417: //rww - precache HUD weapon icons here +;2418: //actually, these should be stored in the icon field of each item def +;2419: cgs.media.weaponIcons[WP_STUN_BATON] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_stunbaton"); +ADDRGP4 $1821 +ARGP4 +ADDRLP4 36 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+4 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 2420 +;2420: cgs.media.weaponIcons_NA[WP_STUN_BATON] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_stunbaton_na"); +ADDRGP4 $1825 +ARGP4 +ADDRLP4 40 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+4 +ADDRLP4 40 +INDIRI4 +ASGNI4 +line 2422 +;2421: +;2422: cgs.media.weaponIcons[WP_SABER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_lightsaber"); +ADDRGP4 $1829 +ARGP4 +ADDRLP4 44 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+8 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 2423 +;2423: cgs.media.weaponIcons_NA[WP_SABER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_lightsaber_na"); +ADDRGP4 $1833 +ARGP4 +ADDRLP4 48 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+8 +ADDRLP4 48 +INDIRI4 +ASGNI4 +line 2425 +;2424: +;2425: cgs.media.weaponIcons[WP_BRYAR_PISTOL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_briar"); +ADDRGP4 $1837 +ARGP4 +ADDRLP4 52 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+12 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 2426 +;2426: cgs.media.weaponIcons_NA[WP_BRYAR_PISTOL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_briar_na"); +ADDRGP4 $1841 +ARGP4 +ADDRLP4 56 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+12 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 2428 +;2427: +;2428: cgs.media.weaponIcons[WP_BLASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_blaster"); +ADDRGP4 $1845 +ARGP4 +ADDRLP4 60 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+16 +ADDRLP4 60 +INDIRI4 +ASGNI4 +line 2429 +;2429: cgs.media.weaponIcons_NA[WP_BLASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_blaster_na"); +ADDRGP4 $1849 +ARGP4 +ADDRLP4 64 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+16 +ADDRLP4 64 +INDIRI4 +ASGNI4 +line 2431 +;2430: +;2431: cgs.media.weaponIcons[WP_DISRUPTOR] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_disruptor"); +ADDRGP4 $1853 +ARGP4 +ADDRLP4 68 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+20 +ADDRLP4 68 +INDIRI4 +ASGNI4 +line 2432 +;2432: cgs.media.weaponIcons_NA[WP_DISRUPTOR] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_disruptor_na"); +ADDRGP4 $1857 +ARGP4 +ADDRLP4 72 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+20 +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 2434 +;2433: +;2434: cgs.media.weaponIcons[WP_BOWCASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_bowcaster"); +ADDRGP4 $1861 +ARGP4 +ADDRLP4 76 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+24 +ADDRLP4 76 +INDIRI4 +ASGNI4 +line 2435 +;2435: cgs.media.weaponIcons_NA[WP_BOWCASTER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_bowcaster_na"); +ADDRGP4 $1865 +ARGP4 +ADDRLP4 80 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+24 +ADDRLP4 80 +INDIRI4 +ASGNI4 +line 2437 +;2436: +;2437: cgs.media.weaponIcons[WP_REPEATER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_repeater"); +ADDRGP4 $1869 +ARGP4 +ADDRLP4 84 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+28 +ADDRLP4 84 +INDIRI4 +ASGNI4 +line 2438 +;2438: cgs.media.weaponIcons_NA[WP_REPEATER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_repeater_na"); +ADDRGP4 $1873 +ARGP4 +ADDRLP4 88 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+28 +ADDRLP4 88 +INDIRI4 +ASGNI4 +line 2440 +;2439: +;2440: cgs.media.weaponIcons[WP_DEMP2] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_demp2"); +ADDRGP4 $1877 +ARGP4 +ADDRLP4 92 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+32 +ADDRLP4 92 +INDIRI4 +ASGNI4 +line 2441 +;2441: cgs.media.weaponIcons_NA[WP_DEMP2] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_demp2_na"); +ADDRGP4 $1881 +ARGP4 +ADDRLP4 96 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+32 +ADDRLP4 96 +INDIRI4 +ASGNI4 +line 2443 +;2442: +;2443: cgs.media.weaponIcons[WP_FLECHETTE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_flechette"); +ADDRGP4 $1885 +ARGP4 +ADDRLP4 100 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+36 +ADDRLP4 100 +INDIRI4 +ASGNI4 +line 2444 +;2444: cgs.media.weaponIcons_NA[WP_FLECHETTE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_flechette_na"); +ADDRGP4 $1889 +ARGP4 +ADDRLP4 104 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+36 +ADDRLP4 104 +INDIRI4 +ASGNI4 +line 2446 +;2445: +;2446: cgs.media.weaponIcons[WP_ROCKET_LAUNCHER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_merrsonn"); +ADDRGP4 $1893 +ARGP4 +ADDRLP4 108 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+40 +ADDRLP4 108 +INDIRI4 +ASGNI4 +line 2447 +;2447: cgs.media.weaponIcons_NA[WP_ROCKET_LAUNCHER] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_merrsonn_na"); +ADDRGP4 $1897 +ARGP4 +ADDRLP4 112 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+40 +ADDRLP4 112 +INDIRI4 +ASGNI4 +line 2449 +;2448: +;2449: cgs.media.weaponIcons[WP_THERMAL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_thermal"); +ADDRGP4 $1901 +ARGP4 +ADDRLP4 116 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+44 +ADDRLP4 116 +INDIRI4 +ASGNI4 +line 2450 +;2450: cgs.media.weaponIcons_NA[WP_THERMAL] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_thermal_na"); +ADDRGP4 $1905 +ARGP4 +ADDRLP4 120 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+44 +ADDRLP4 120 +INDIRI4 +ASGNI4 +line 2452 +;2451: +;2452: cgs.media.weaponIcons[WP_TRIP_MINE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_tripmine"); +ADDRGP4 $1909 +ARGP4 +ADDRLP4 124 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+48 +ADDRLP4 124 +INDIRI4 +ASGNI4 +line 2453 +;2453: cgs.media.weaponIcons_NA[WP_TRIP_MINE] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_tripmine_na"); +ADDRGP4 $1913 +ARGP4 +ADDRLP4 128 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+48 +ADDRLP4 128 +INDIRI4 +ASGNI4 +line 2455 +;2454: +;2455: cgs.media.weaponIcons[WP_DET_PACK] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_detpack"); +ADDRGP4 $1917 +ARGP4 +ADDRLP4 132 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+928+52 +ADDRLP4 132 +INDIRI4 +ASGNI4 +line 2456 +;2456: cgs.media.weaponIcons_NA[WP_DET_PACK] = trap_R_RegisterShaderNoMip("gfx/hud/w_icon_detpack_na"); +ADDRGP4 $1921 +ARGP4 +ADDRLP4 136 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+992+52 +ADDRLP4 136 +INDIRI4 +ASGNI4 +line 2459 +;2457: +;2458: // HUD artwork for cycling inventory,weapons and force powers +;2459: cgs.media.weaponIconBackground = trap_R_RegisterShaderNoMip( "gfx/hud/background"); +ADDRGP4 $1924 +ARGP4 +ADDRLP4 140 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1216 +ADDRLP4 140 +INDIRI4 +ASGNI4 +line 2460 +;2460: cgs.media.weaponProngsOn = trap_R_RegisterShaderNoMip( "gfx/hud/prong_on_w"); +ADDRGP4 $1927 +ARGP4 +ADDRLP4 144 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1224 +ADDRLP4 144 +INDIRI4 +ASGNI4 +line 2461 +;2461: cgs.media.weaponProngsOff = trap_R_RegisterShaderNoMip( "gfx/hud/prong_off"); +ADDRGP4 $1930 +ARGP4 +ADDRLP4 148 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1220 +ADDRLP4 148 +INDIRI4 +ASGNI4 +line 2462 +;2462: cgs.media.forceProngsOn = trap_R_RegisterShaderNoMip( "gfx/hud/prong_on_f"); +ADDRGP4 $1933 +ARGP4 +ADDRLP4 152 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1232 +ADDRLP4 152 +INDIRI4 +ASGNI4 +line 2463 +;2463: cgs.media.forceIconBackground = trap_R_RegisterShaderNoMip( "gfx/hud/background_f"); +ADDRGP4 $1936 +ARGP4 +ADDRLP4 156 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1228 +ADDRLP4 156 +INDIRI4 +ASGNI4 +line 2464 +;2464: cgs.media.inventoryIconBackground = trap_R_RegisterShaderNoMip( "gfx/hud/background_i"); +ADDRGP4 $1939 +ARGP4 +ADDRLP4 160 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1236 +ADDRLP4 160 +INDIRI4 +ASGNI4 +line 2465 +;2465: cgs.media.inventoryProngsOn = trap_R_RegisterShaderNoMip( "gfx/hud/prong_on_i"); +ADDRGP4 $1942 +ARGP4 +ADDRLP4 164 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1240 +ADDRLP4 164 +INDIRI4 +ASGNI4 +ADDRGP4 $1944 +JUMPV +LABELV $1943 +line 2469 +;2466: +;2467: //rww - precache holdable item icons here +;2468: while (i < bg_numItems) +;2469: { +line 2470 +;2470: if (bg_itemlist[i].giType == IT_HOLDABLE) +CNSTI4 52 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+36 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $1946 +line 2471 +;2471: { +line 2472 +;2472: if (bg_itemlist[i].icon) +CNSTI4 52 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+28 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1949 +line 2473 +;2473: { +line 2474 +;2474: cgs.media.invenIcons[bg_itemlist[i].giTag] = trap_R_RegisterShaderNoMip(bg_itemlist[i].icon); +ADDRLP4 168 +CNSTI4 52 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 168 +INDIRI4 +ADDRGP4 bg_itemlist+28 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 172 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 168 +INDIRI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+1056 +ADDP4 +ADDRLP4 172 +INDIRI4 +ASGNI4 +line 2475 +;2475: } +ADDRGP4 $1950 +JUMPV +LABELV $1949 +line 2477 +;2476: else +;2477: { +line 2478 +;2478: cgs.media.invenIcons[bg_itemlist[i].giTag] = 0; +CNSTI4 52 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+1056 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2479 +;2479: } +LABELV $1950 +line 2480 +;2480: } +LABELV $1946 +line 2482 +;2481: +;2482: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2483 +;2483: } +LABELV $1944 +line 2468 +ADDRLP4 0 +INDIRI4 +ADDRGP4 bg_numItems +INDIRI4 +LTI4 $1943 +line 2486 +;2484: +;2485: //rww - precache force power icons here +;2486: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1960 +JUMPV +LABELV $1959 +line 2489 +;2487: +;2488: while (i < NUM_FORCE_POWERS) +;2489: { +line 2490 +;2490: cgs.media.forcePowerIcons[i] = trap_R_RegisterShaderNoMip(HolocronIcons[i]); +ADDRLP4 168 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 168 +INDIRI4 +ADDRGP4 HolocronIcons +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 172 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRLP4 168 +INDIRI4 +ADDRGP4 cgs+70296+1084 +ADDP4 +ADDRLP4 172 +INDIRI4 +ASGNI4 +line 2492 +;2491: +;2492: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2493 +;2493: } +LABELV $1960 +line 2488 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $1959 +line 2494 +;2494: cgs.media.rageRecShader = trap_R_RegisterShaderNoMip("gfx/mp/f_icon_ragerec"); +ADDRGP4 $1966 +ARGP4 +ADDRLP4 168 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1156 +ADDRLP4 168 +INDIRI4 +ASGNI4 +line 2497 +;2495: +;2496: //rww - precache other HUD graphics +;2497: cgs.media.HUDLeftFrame = trap_R_RegisterShaderNoMip( "gfx/hud/static_test" ); +ADDRGP4 $1969 +ARGP4 +ADDRLP4 172 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1160 +ADDRLP4 172 +INDIRI4 +ASGNI4 +line 2498 +;2498: cgs.media.HUDInnerLeft = trap_R_RegisterShaderNoMip( "gfx/hud/hudleft_innerframe" ); +ADDRGP4 $1972 +ARGP4 +ADDRLP4 176 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1244 +ADDRLP4 176 +INDIRI4 +ASGNI4 +line 2499 +;2499: cgs.media.HUDArmor1 = trap_R_RegisterShaderNoMip( "gfx/hud/armor1" ); +ADDRGP4 $1975 +ARGP4 +ADDRLP4 180 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1164 +ADDRLP4 180 +INDIRI4 +ASGNI4 +line 2500 +;2500: cgs.media.HUDArmor2 = trap_R_RegisterShaderNoMip( "gfx/hud/armor2" ); +ADDRGP4 $1978 +ARGP4 +ADDRLP4 184 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1168 +ADDRLP4 184 +INDIRI4 +ASGNI4 +line 2501 +;2501: cgs.media.HUDHealth = trap_R_RegisterShaderNoMip( "gfx/hud/health" ); +ADDRGP4 $1981 +ARGP4 +ADDRLP4 188 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1172 +ADDRLP4 188 +INDIRI4 +ASGNI4 +line 2502 +;2502: cgs.media.HUDHealthTic = trap_R_RegisterShaderNoMip( "gfx/hud/health_tic" ); +ADDRGP4 $1984 +ARGP4 +ADDRLP4 192 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1176 +ADDRLP4 192 +INDIRI4 +ASGNI4 +line 2503 +;2503: cgs.media.HUDArmorTic = trap_R_RegisterShaderNoMip( "gfx/hud/armor_tic" ); +ADDRGP4 $1987 +ARGP4 +ADDRLP4 196 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1180 +ADDRLP4 196 +INDIRI4 +ASGNI4 +line 2505 +;2504: +;2505: cgs.media.HUDLeftStatic = cgs.media.HUDLeftFrame;//trap_R_RegisterShaderNoMip( "gfx/hud/static_test" ); +ADDRGP4 cgs+70296+1184 +ADDRGP4 cgs+70296+1160 +INDIRI4 +ASGNI4 +line 2506 +;2506: cgs.media.HUDLeft = cgs.media.HUDInnerLeft;//trap_R_RegisterShaderNoMip( "gfx/hud/hudleft" ); +ADDRGP4 cgs+70296+1188 +ADDRGP4 cgs+70296+1244 +INDIRI4 +ASGNI4 +line 2508 +;2507: +;2508: cgs.media.HUDSaberStyle1 = trap_R_RegisterShader( "gfx/hud/saber_stylesFast" ); +ADDRGP4 $1998 +ARGP4 +ADDRLP4 200 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1192 +ADDRLP4 200 +INDIRI4 +ASGNI4 +line 2509 +;2509: cgs.media.HUDSaberStyle2 = trap_R_RegisterShader( "gfx/hud/saber_stylesMed" ); +ADDRGP4 $2001 +ARGP4 +ADDRLP4 204 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1196 +ADDRLP4 204 +INDIRI4 +ASGNI4 +line 2510 +;2510: cgs.media.HUDSaberStyle3 = trap_R_RegisterShader( "gfx/hud/saber_stylesStrong" ); +ADDRGP4 $2004 +ARGP4 +ADDRLP4 208 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1200 +ADDRLP4 208 +INDIRI4 +ASGNI4 +line 2512 +;2511: +;2512: cgs.media.HUDRightFrame = trap_R_RegisterShaderNoMip("gfx/hud/hudrightframe"); +ADDRGP4 $2007 +ARGP4 +ADDRLP4 212 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1204 +ADDRLP4 212 +INDIRI4 +ASGNI4 +line 2513 +;2513: cgs.media.HUDInnerRight = trap_R_RegisterShaderNoMip( "gfx/hud/hudright_innerframe" ); +ADDRGP4 $2010 +ARGP4 +ADDRLP4 216 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1208 +ADDRLP4 216 +INDIRI4 +ASGNI4 +line 2516 +;2514: +;2515: // Load tics +;2516: for (i=0;ips.pm_flags & PMF_FOLLOW) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $2049 +line 2636 +;2636: { +line 2637 +;2637: return; +ADDRGP4 $2045 +JUMPV +LABELV $2049 +line 2641 +;2638: } +;2639: +;2640:// BG_CycleForce(&cg.snap->ps, 1); +;2641: if (cg.forceSelect != -1) +ADDRGP4 cg+3512 +INDIRI4 +CNSTI4 -1 +EQI4 $2052 +line 2642 +;2642: { +line 2643 +;2643: cg.snap->ps.fd.forcePowerSelected = cg.forceSelect; +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 896 +ADDP4 +ADDRGP4 cg+3512 +INDIRI4 +ASGNI4 +line 2644 +;2644: } +LABELV $2052 +line 2646 +;2645: +;2646: BG_CycleForce(&cg.snap->ps, 1); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 BG_CycleForce +CALLV +pop +line 2648 +;2647: +;2648: if (cg.snap->ps.fd.forcePowersKnown & (1 << cg.snap->ps.fd.forcePowerSelected)) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 888 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 896 +ADDP4 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $2058 +line 2649 +;2649: { +line 2650 +;2650: cg.forceSelect = cg.snap->ps.fd.forcePowerSelected; +ADDRGP4 cg+3512 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 896 +ADDP4 +INDIRI4 +ASGNI4 +line 2651 +;2651: cg.forceSelectTime = cg.time; +ADDRGP4 cg+13792 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2652 +;2652: } +LABELV $2058 +line 2653 +;2653:} +LABELV $2045 +endproc CG_NextForcePower_f 0 8 +export CG_PrevForcePower_f +proc CG_PrevForcePower_f 0 8 +line 2661 +;2654: +;2655:/* +;2656:=============== +;2657:CG_PrevForcePower_f +;2658:=============== +;2659:*/ +;2660:void CG_PrevForcePower_f( void ) +;2661:{ +line 2662 +;2662: if ( !cg.snap ) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2067 +line 2663 +;2663: { +line 2664 +;2664: return; +ADDRGP4 $2066 +JUMPV +LABELV $2067 +line 2667 +;2665: } +;2666: +;2667: if (cg.snap->ps.pm_flags & PMF_FOLLOW) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $2070 +line 2668 +;2668: { +line 2669 +;2669: return; +ADDRGP4 $2066 +JUMPV +LABELV $2070 +line 2673 +;2670: } +;2671: +;2672:// BG_CycleForce(&cg.snap->ps, -1); +;2673: if (cg.forceSelect != -1) +ADDRGP4 cg+3512 +INDIRI4 +CNSTI4 -1 +EQI4 $2073 +line 2674 +;2674: { +line 2675 +;2675: cg.snap->ps.fd.forcePowerSelected = cg.forceSelect; +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 896 +ADDP4 +ADDRGP4 cg+3512 +INDIRI4 +ASGNI4 +line 2676 +;2676: } +LABELV $2073 +line 2678 +;2677: +;2678: BG_CycleForce(&cg.snap->ps, -1); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +CNSTI4 -1 +ARGI4 +ADDRGP4 BG_CycleForce +CALLV +pop +line 2680 +;2679: +;2680: if (cg.snap->ps.fd.forcePowersKnown & (1 << cg.snap->ps.fd.forcePowerSelected)) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 888 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 896 +ADDP4 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $2079 +line 2681 +;2681: { +line 2682 +;2682: cg.forceSelect = cg.snap->ps.fd.forcePowerSelected; +ADDRGP4 cg+3512 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 896 +ADDP4 +INDIRI4 +ASGNI4 +line 2683 +;2683: cg.forceSelectTime = cg.time; +ADDRGP4 cg+13792 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2684 +;2684: } +LABELV $2079 +line 2685 +;2685:} +LABELV $2066 +endproc CG_PrevForcePower_f 0 8 +export CG_NextInventory_f +proc CG_NextInventory_f 4 8 +line 2688 +;2686: +;2687:void CG_NextInventory_f(void) +;2688:{ +line 2689 +;2689: if ( !cg.snap ) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2088 +line 2690 +;2690: { +line 2691 +;2691: return; +ADDRGP4 $2087 +JUMPV +LABELV $2088 +line 2694 +;2692: } +;2693: +;2694: if (cg.snap->ps.pm_flags & PMF_FOLLOW) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $2091 +line 2695 +;2695: { +line 2696 +;2696: return; +ADDRGP4 $2087 +JUMPV +LABELV $2091 +line 2699 +;2697: } +;2698: +;2699: if (cg.itemSelect != -1) +ADDRGP4 cg+3516 +INDIRI4 +CNSTI4 -1 +EQI4 $2094 +line 2700 +;2700: { +line 2701 +;2701: cg.snap->ps.stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE); +ADDRGP4 cg+3516 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 0 +ADDRGP4 BG_GetItemIndexByTag +CALLI4 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 264 +ADDP4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 2702 +;2702: } +LABELV $2094 +line 2703 +;2703: BG_CycleInven(&cg.snap->ps, 1); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 BG_CycleInven +CALLV +pop +line 2705 +;2704: +;2705: if (cg.snap->ps.stats[STAT_HOLDABLE_ITEM]) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2100 +line 2706 +;2706: { +line 2707 +;2707: cg.itemSelect = bg_itemlist[cg.snap->ps.stats[STAT_HOLDABLE_ITEM]].giTag; +ADDRGP4 cg+3516 +CNSTI4 52 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ASGNI4 +line 2708 +;2708: cg.invenSelectTime = cg.time; +ADDRGP4 cg+13788 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2709 +;2709: } +LABELV $2100 +line 2710 +;2710:} +LABELV $2087 +endproc CG_NextInventory_f 4 8 +export CG_PrevInventory_f +proc CG_PrevInventory_f 4 8 +line 2713 +;2711: +;2712:void CG_PrevInventory_f(void) +;2713:{ +line 2714 +;2714: if ( !cg.snap ) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2109 +line 2715 +;2715: { +line 2716 +;2716: return; +ADDRGP4 $2108 +JUMPV +LABELV $2109 +line 2719 +;2717: } +;2718: +;2719: if (cg.snap->ps.pm_flags & PMF_FOLLOW) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $2112 +line 2720 +;2720: { +line 2721 +;2721: return; +ADDRGP4 $2108 +JUMPV +LABELV $2112 +line 2724 +;2722: } +;2723: +;2724: if (cg.itemSelect != -1) +ADDRGP4 cg+3516 +INDIRI4 +CNSTI4 -1 +EQI4 $2115 +line 2725 +;2725: { +line 2726 +;2726: cg.snap->ps.stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE); +ADDRGP4 cg+3516 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 0 +ADDRGP4 BG_GetItemIndexByTag +CALLI4 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 264 +ADDP4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 2727 +;2727: } +LABELV $2115 +line 2728 +;2728: BG_CycleInven(&cg.snap->ps, -1); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +CNSTI4 -1 +ARGI4 +ADDRGP4 BG_CycleInven +CALLV +pop +line 2730 +;2729: +;2730: if (cg.snap->ps.stats[STAT_HOLDABLE_ITEM]) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2121 +line 2731 +;2731: { +line 2732 +;2732: cg.itemSelect = bg_itemlist[cg.snap->ps.stats[STAT_HOLDABLE_ITEM]].giTag; +ADDRGP4 cg+3516 +CNSTI4 52 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist+40 +ADDP4 +INDIRI4 +ASGNI4 +line 2733 +;2733: cg.invenSelectTime = cg.time; +ADDRGP4 cg+13788 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2734 +;2734: } +LABELV $2121 +line 2735 +;2735:} +LABELV $2108 +endproc CG_PrevInventory_f 4 8 +import forceHolocronModels +bss +export cg_pmove_msec +align 4 +LABELV cg_pmove_msec +skip 272 +export cg_debugSaber +align 4 +LABELV cg_debugSaber +skip 272 +import CG_ROFF_NotetrackCallback +import CG_CalcEntityLerpPositions +import CG_SetLightstyle +import CG_RunLightStyles +import CG_ClearLightStyles +export cgDC +align 4 +LABELV cgDC +skip 11816 +import trap_SP_Register +import trap_SP_RegisterServer +import trap_PC_RemoveAllGlobalDefines +import trap_PC_LoadGlobalDefines +import trap_PC_SourceFileAndLine +import trap_PC_ReadToken +import trap_PC_FreeSource +import trap_PC_LoadSource +import trap_PC_AddGlobalDefine +import Controls_SetConfig +import Controls_GetConfig +import UI_OutOfMemory +import UI_InitMemory +import UI_Alloc +import Display_CacheAll +import Menu_SetFeederSelection +import Menu_Paint +import Menus_CloseAll +import LerpColor +import Display_HandleKey +import Menus_CloseByName +import Menus_ShowByName +import Menus_FindByName +import Menus_OpenByName +import Display_KeyBindPending +import Display_CursorType +import Display_MouseMove +import Display_CaptureItem +import Display_GetContext +import Menus_Activate +import Menus_AnyFullScreenVisible +import Menu_Reset +import Menus_ActivateByName +import Menu_PaintAll +import Menu_New +import Menu_Count +import PC_Script_Parse +import PC_String_Parse +import PC_Rect_Parse +import PC_Int_Parse +import PC_Color_Parse +import PC_Float_Parse +import Script_Parse +import String_Parse +import Rect_Parse +import Int_Parse +import Color_Parse +import Float_Parse +import Menu_ScrollFeeder +import Menu_HandleMouseMove +import Menu_HandleKey +import Menu_GetFocused +import Menu_PostParse +import Item_Init +import Menu_Init +import Display_ExpandMacros +import Init_Display +import String_Report +import String_Init +import String_Alloc +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +export cg_debugBB +align 4 +LABELV cg_debugBB +skip 272 +export ui_myteam +align 4 +LABELV ui_myteam +skip 272 +export cg_recordSPDemoName +align 4 +LABELV cg_recordSPDemoName +skip 272 +export cg_recordSPDemo +align 4 +LABELV cg_recordSPDemo +skip 272 +export cg_singlePlayerActive +align 4 +LABELV cg_singlePlayerActive +skip 272 +export cg_enableBreath +align 4 +LABELV cg_enableBreath +skip 272 +export cg_enableDust +align 4 +LABELV cg_enableDust +skip 272 +export cg_singlePlayer +align 4 +LABELV cg_singlePlayer +skip 272 +export cg_currentSelectedPlayerName +align 4 +LABELV cg_currentSelectedPlayerName +skip 272 +export cg_currentSelectedPlayer +align 4 +LABELV cg_currentSelectedPlayer +skip 272 +export cg_blueTeamName +align 4 +LABELV cg_blueTeamName +skip 272 +export cg_redTeamName +align 4 +LABELV cg_redTeamName +skip 272 +export cg_trueLightning +align 4 +LABELV cg_trueLightning +skip 272 +export cg_noProjectileTrail +align 4 +LABELV cg_noProjectileTrail +skip 272 +export cg_noTaunt +align 4 +LABELV cg_noTaunt +skip 272 +export cg_bigFont +align 4 +LABELV cg_bigFont +skip 272 +export cg_smallFont +align 4 +LABELV cg_smallFont +skip 272 +export cg_cameraMode +align 4 +LABELV cg_cameraMode +skip 272 +export cg_timescale +align 4 +LABELV cg_timescale +skip 272 +export cg_timescaleFadeSpeed +align 4 +LABELV cg_timescaleFadeSpeed +skip 272 +export cg_timescaleFadeEnd +align 4 +LABELV cg_timescaleFadeEnd +skip 272 +export cg_cameraOrbitDelay +align 4 +LABELV cg_cameraOrbitDelay +skip 272 +export cg_cameraOrbit +align 4 +LABELV cg_cameraOrbit +skip 272 +export pmove_msec +align 4 +LABELV pmove_msec +skip 272 +export pmove_fixed +align 4 +LABELV pmove_fixed +skip 272 +export cg_smoothClients +align 4 +LABELV cg_smoothClients +skip 272 +export cg_hudFiles +align 4 +LABELV cg_hudFiles +skip 272 +export cg_scorePlum +align 4 +LABELV cg_scorePlum +skip 272 +export cg_noVoiceText +align 4 +LABELV cg_noVoiceText +skip 272 +export cg_noVoiceChats +align 4 +LABELV cg_noVoiceChats +skip 272 +export cg_teamChatsOnly +align 4 +LABELV cg_teamChatsOnly +skip 272 +export cg_drawFriend +align 4 +LABELV cg_drawFriend +skip 272 +export cg_deferPlayers +align 4 +LABELV cg_deferPlayers +skip 272 +export cg_predictItems +align 4 +LABELV cg_predictItems +skip 272 +export cg_blood +align 4 +LABELV cg_blood +skip 272 +export cg_paused +align 4 +LABELV cg_paused +skip 272 +export cg_buildScript +align 4 +LABELV cg_buildScript +skip 272 +export cg_forceModel +align 4 +LABELV cg_forceModel +skip 272 +export cg_stats +align 4 +LABELV cg_stats +skip 272 +export cg_teamChatHeight +align 4 +LABELV cg_teamChatHeight +skip 272 +export cg_teamChatTime +align 4 +LABELV cg_teamChatTime +skip 272 +export cg_synchronousClients +align 4 +LABELV cg_synchronousClients +skip 272 +export cg_drawEnemyInfo +align 4 +LABELV cg_drawEnemyInfo +skip 272 +export cg_lagometer +align 4 +LABELV cg_lagometer +skip 272 +export cg_stereoSeparation +align 4 +LABELV cg_stereoSeparation +skip 272 +export cg_thirdPersonHorzOffset +align 4 +LABELV cg_thirdPersonHorzOffset +skip 272 +export cg_thirdPersonAlpha +align 4 +LABELV cg_thirdPersonAlpha +skip 272 +export cg_thirdPersonTargetDamp +align 4 +LABELV cg_thirdPersonTargetDamp +skip 272 +export cg_thirdPersonCameraDamp +align 4 +LABELV cg_thirdPersonCameraDamp +skip 272 +export cg_thirdPersonVertOffset +align 4 +LABELV cg_thirdPersonVertOffset +skip 272 +export cg_thirdPersonPitchOffset +align 4 +LABELV cg_thirdPersonPitchOffset +skip 272 +export cg_thirdPersonAngle +align 4 +LABELV cg_thirdPersonAngle +skip 272 +export cg_thirdPersonRange +align 4 +LABELV cg_thirdPersonRange +skip 272 +export cg_thirdPerson +align 4 +LABELV cg_thirdPerson +skip 272 +export cg_dismember +align 4 +LABELV cg_dismember +skip 272 +export cg_animBlend +align 4 +LABELV cg_animBlend +skip 272 +export cg_auraShell +align 4 +LABELV cg_auraShell +skip 272 +export cg_speedTrail +align 4 +LABELV cg_speedTrail +skip 272 +export cg_duelHeadAngles +align 4 +LABELV cg_duelHeadAngles +skip 272 +export cg_saberTrail +align 4 +LABELV cg_saberTrail +skip 272 +export cg_saberContact +align 4 +LABELV cg_saberContact +skip 272 +export cg_saberDynamicMarkTime +align 4 +LABELV cg_saberDynamicMarkTime +skip 272 +export cg_saberDynamicMarks +align 4 +LABELV cg_saberDynamicMarks +skip 272 +export cg_fpls +align 4 +LABELV cg_fpls +skip 272 +export cg_saberModelTraceEffect +align 4 +LABELV cg_saberModelTraceEffect +skip 272 +export cg_oldPainSounds +align 4 +LABELV cg_oldPainSounds +skip 272 +export cg_swingAngles +align 4 +LABELV cg_swingAngles +skip 272 +export cg_zoomFov +align 4 +LABELV cg_zoomFov +skip 272 +export cg_fov +align 4 +LABELV cg_fov +skip 272 +export cg_simpleItems +align 4 +LABELV cg_simpleItems +skip 272 +export cg_ignore +align 4 +LABELV cg_ignore +skip 272 +export cg_autoswitch +align 4 +LABELV cg_autoswitch +skip 272 +export cg_tracerLength +align 4 +LABELV cg_tracerLength +skip 272 +export cg_tracerWidth +align 4 +LABELV cg_tracerWidth +skip 272 +export cg_tracerChance +align 4 +LABELV cg_tracerChance +skip 272 +export cg_viewsize +align 4 +LABELV cg_viewsize +skip 272 +export cg_drawGun +align 4 +LABELV cg_drawGun +skip 272 +export cg_gun_z +align 4 +LABELV cg_gun_z +skip 272 +export cg_gun_y +align 4 +LABELV cg_gun_y +skip 272 +export cg_gun_x +align 4 +LABELV cg_gun_x +skip 272 +export cg_gun_frame +align 4 +LABELV cg_gun_frame +skip 272 +export cg_addMarks +align 4 +LABELV cg_addMarks +skip 272 +export cg_footsteps +align 4 +LABELV cg_footsteps +skip 272 +export cg_showmiss +align 4 +LABELV cg_showmiss +skip 272 +export cg_noPlayerAnims +align 4 +LABELV cg_noPlayerAnims +skip 272 +export cg_nopredict +align 4 +LABELV cg_nopredict +skip 272 +export cg_errorDecay +align 4 +LABELV cg_errorDecay +skip 272 +export cg_debugEvents +align 4 +LABELV cg_debugEvents +skip 272 +export cg_debugPosition +align 4 +LABELV cg_debugPosition +skip 272 +export cg_debugAnim +align 4 +LABELV cg_debugAnim +skip 272 +export cg_animSpeed +align 4 +LABELV cg_animSpeed +skip 272 +export cg_draw2D +align 4 +LABELV cg_draw2D +skip 272 +export cg_drawStatus +align 4 +LABELV cg_drawStatus +skip 272 +export cg_crosshairHealth +align 4 +LABELV cg_crosshairHealth +skip 272 +export cg_crosshairSize +align 4 +LABELV cg_crosshairSize +skip 272 +export cg_crosshairY +align 4 +LABELV cg_crosshairY +skip 272 +export cg_crosshairX +align 4 +LABELV cg_crosshairX +skip 272 +export cg_teamOverlayUserinfo +align 4 +LABELV cg_teamOverlayUserinfo +skip 272 +export cg_drawTeamOverlay +align 4 +LABELV cg_drawTeamOverlay +skip 272 +export cg_drawRewards +align 4 +LABELV cg_drawRewards +skip 272 +export cg_dynamicCrosshair +align 4 +LABELV cg_dynamicCrosshair +skip 272 +export cg_drawScores +align 4 +LABELV cg_drawScores +skip 272 +export cg_drawCrosshairNames +align 4 +LABELV cg_drawCrosshairNames +skip 272 +export cg_drawCrosshair +align 4 +LABELV cg_drawCrosshair +skip 272 +export cg_drawAmmoWarning +align 4 +LABELV cg_drawAmmoWarning +skip 272 +export cg_drawIcons +align 4 +LABELV cg_drawIcons +skip 272 +export cg_draw3dIcons +align 4 +LABELV cg_draw3dIcons +skip 272 +export cg_drawSnapshot +align 4 +LABELV cg_drawSnapshot +skip 272 +export cg_drawFPS +align 4 +LABELV cg_drawFPS +skip 272 +export cg_drawTimer +align 4 +LABELV cg_drawTimer +skip 272 +export cg_shadows +align 4 +LABELV cg_shadows +skip 272 +export cg_bobroll +align 4 +LABELV cg_bobroll +skip 272 +export cg_bobpitch +align 4 +LABELV cg_bobpitch +skip 272 +export cg_bobup +align 4 +LABELV cg_bobup +skip 272 +export cg_runroll +align 4 +LABELV cg_runroll +skip 272 +export cg_runpitch +align 4 +LABELV cg_runpitch +skip 272 +export cg_centertime +align 4 +LABELV cg_centertime +skip 272 +import cg_markPolys +export cg_items +align 4 +LABELV cg_items +skip 14336 +export cg_weapons +align 4 +LABELV cg_weapons +skip 3328 +export cg_entities +align 4 +LABELV cg_entities +skip 1966080 +export cg +align 4 +LABELV cg +skip 170284 +export cgs +align 4 +LABELV cgs +skip 71732 +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $2043 +char 1 67 +char 1 108 +char 1 101 +char 1 97 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 32 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 32 +char 1 115 +char 1 116 +char 1 121 +char 1 108 +char 1 101 +char 1 115 +char 1 0 +align 1 +LABELV $2040 +char 1 99 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $2039 +char 1 103 +char 1 114 +char 1 97 +char 1 112 +char 1 104 +char 1 105 +char 1 99 +char 1 115 +char 1 0 +align 1 +LABELV $2038 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 115 +char 1 0 +align 1 +LABELV $2035 +char 1 99 +char 1 111 +char 1 108 +char 1 108 +char 1 105 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 109 +char 1 97 +char 1 112 +char 1 0 +align 1 +LABELV $2033 +char 1 67 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 47 +char 1 83 +char 1 101 +char 1 114 +char 1 118 +char 1 101 +char 1 114 +char 1 32 +char 1 103 +char 1 97 +char 1 109 +char 1 101 +char 1 32 +char 1 109 +char 1 105 +char 1 115 +char 1 109 +char 1 97 +char 1 116 +char 1 99 +char 1 104 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $2032 +char 1 98 +char 1 97 +char 1 115 +char 1 101 +char 1 106 +char 1 107 +char 1 45 +char 1 49 +char 1 0 +align 1 +LABELV $2010 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 114 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 95 +char 1 105 +char 1 110 +char 1 110 +char 1 101 +char 1 114 +char 1 102 +char 1 114 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $2007 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 114 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 102 +char 1 114 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $2004 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 115 +char 1 116 +char 1 121 +char 1 108 +char 1 101 +char 1 115 +char 1 83 +char 1 116 +char 1 114 +char 1 111 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $2001 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 115 +char 1 116 +char 1 121 +char 1 108 +char 1 101 +char 1 115 +char 1 77 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $1998 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 115 +char 1 116 +char 1 121 +char 1 108 +char 1 101 +char 1 115 +char 1 70 +char 1 97 +char 1 115 +char 1 116 +char 1 0 +align 1 +LABELV $1987 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 97 +char 1 114 +char 1 109 +char 1 111 +char 1 114 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 0 +align 1 +LABELV $1984 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 116 +char 1 104 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 0 +align 1 +LABELV $1981 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 116 +char 1 104 +char 1 0 +align 1 +LABELV $1978 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 97 +char 1 114 +char 1 109 +char 1 111 +char 1 114 +char 1 50 +char 1 0 +align 1 +LABELV $1975 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 97 +char 1 114 +char 1 109 +char 1 111 +char 1 114 +char 1 49 +char 1 0 +align 1 +LABELV $1972 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 108 +char 1 101 +char 1 102 +char 1 116 +char 1 95 +char 1 105 +char 1 110 +char 1 110 +char 1 101 +char 1 114 +char 1 102 +char 1 114 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $1969 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 105 +char 1 99 +char 1 95 +char 1 116 +char 1 101 +char 1 115 +char 1 116 +char 1 0 +align 1 +LABELV $1966 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 114 +char 1 97 +char 1 103 +char 1 101 +char 1 114 +char 1 101 +char 1 99 +char 1 0 +align 1 +LABELV $1942 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 110 +char 1 103 +char 1 95 +char 1 111 +char 1 110 +char 1 95 +char 1 105 +char 1 0 +align 1 +LABELV $1939 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 98 +char 1 97 +char 1 99 +char 1 107 +char 1 103 +char 1 114 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 95 +char 1 105 +char 1 0 +align 1 +LABELV $1936 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 98 +char 1 97 +char 1 99 +char 1 107 +char 1 103 +char 1 114 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 95 +char 1 102 +char 1 0 +align 1 +LABELV $1933 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 110 +char 1 103 +char 1 95 +char 1 111 +char 1 110 +char 1 95 +char 1 102 +char 1 0 +align 1 +LABELV $1930 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 110 +char 1 103 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $1927 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 110 +char 1 103 +char 1 95 +char 1 111 +char 1 110 +char 1 95 +char 1 119 +char 1 0 +align 1 +LABELV $1924 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 98 +char 1 97 +char 1 99 +char 1 107 +char 1 103 +char 1 114 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $1921 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1917 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $1913 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 116 +char 1 114 +char 1 105 +char 1 112 +char 1 109 +char 1 105 +char 1 110 +char 1 101 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1909 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 116 +char 1 114 +char 1 105 +char 1 112 +char 1 109 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $1905 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1901 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $1897 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 109 +char 1 101 +char 1 114 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 110 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1893 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 109 +char 1 101 +char 1 114 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 110 +char 1 0 +align 1 +LABELV $1889 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1885 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 0 +align 1 +LABELV $1881 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1877 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 0 +align 1 +LABELV $1873 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1869 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1865 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1861 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1857 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1853 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $1849 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1845 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1841 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 114 +char 1 105 +char 1 97 +char 1 114 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1837 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 114 +char 1 105 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $1833 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1829 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1825 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 95 +char 1 110 +char 1 97 +char 1 0 +align 1 +LABELV $1821 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 119 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $1817 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 95 +char 1 108 +char 1 101 +char 1 118 +char 1 101 +char 1 108 +char 1 108 +char 1 111 +char 1 97 +char 1 100 +char 1 0 +align 1 +LABELV $1814 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 108 +char 1 111 +char 1 97 +char 1 100 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 0 +align 1 +LABELV $1811 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 108 +char 1 111 +char 1 97 +char 1 100 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $1808 +char 1 119 +char 1 104 +char 1 105 +char 1 116 +char 1 101 +char 1 0 +align 1 +LABELV $1805 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 103 +char 1 114 +char 1 105 +char 1 100 +char 1 95 +char 1 109 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $1793 +char 1 101 +char 1 114 +char 1 103 +char 1 111 +char 1 101 +char 1 99 +char 1 0 +align 1 +LABELV $1790 +char 1 111 +char 1 99 +char 1 114 +char 1 95 +char 1 97 +char 1 0 +align 1 +LABELV $1785 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 49 +char 1 0 +align 1 +LABELV $1784 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 50 +char 1 0 +align 1 +LABELV $1783 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 51 +char 1 0 +align 1 +LABELV $1782 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 52 +char 1 0 +align 1 +LABELV $1781 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 53 +char 1 0 +align 1 +LABELV $1780 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 54 +char 1 0 +align 1 +LABELV $1779 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 55 +char 1 0 +align 1 +LABELV $1778 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 55 +char 1 0 +align 1 +LABELV $1777 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 54 +char 1 0 +align 1 +LABELV $1776 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 53 +char 1 0 +align 1 +LABELV $1775 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 52 +char 1 0 +align 1 +LABELV $1774 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 51 +char 1 0 +align 1 +LABELV $1773 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 50 +char 1 0 +align 1 +LABELV $1772 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 49 +char 1 0 +align 1 +LABELV $1768 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 110 +char 1 101 +char 1 119 +char 1 47 +char 1 115 +char 1 108 +char 1 105 +char 1 100 +char 1 101 +char 1 114 +char 1 116 +char 1 104 +char 1 117 +char 1 109 +char 1 98 +char 1 0 +align 1 +LABELV $1765 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 110 +char 1 101 +char 1 119 +char 1 47 +char 1 115 +char 1 108 +char 1 105 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1762 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 115 +char 1 47 +char 1 115 +char 1 99 +char 1 114 +char 1 111 +char 1 108 +char 1 108 +char 1 98 +char 1 97 +char 1 114 +char 1 95 +char 1 116 +char 1 104 +char 1 117 +char 1 109 +char 1 98 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1759 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 115 +char 1 47 +char 1 115 +char 1 99 +char 1 114 +char 1 111 +char 1 108 +char 1 108 +char 1 98 +char 1 97 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 114 +char 1 111 +char 1 119 +char 1 95 +char 1 114 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1756 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 115 +char 1 47 +char 1 115 +char 1 99 +char 1 114 +char 1 111 +char 1 108 +char 1 108 +char 1 98 +char 1 97 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 114 +char 1 111 +char 1 119 +char 1 95 +char 1 108 +char 1 101 +char 1 102 +char 1 116 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1753 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 115 +char 1 47 +char 1 115 +char 1 99 +char 1 114 +char 1 111 +char 1 108 +char 1 108 +char 1 98 +char 1 97 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 114 +char 1 111 +char 1 119 +char 1 95 +char 1 117 +char 1 112 +char 1 95 +char 1 97 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1750 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 115 +char 1 47 +char 1 115 +char 1 99 +char 1 114 +char 1 111 +char 1 108 +char 1 108 +char 1 98 +char 1 97 +char 1 114 +char 1 95 +char 1 97 +char 1 114 +char 1 114 +char 1 111 +char 1 119 +char 1 95 +char 1 100 +char 1 119 +char 1 110 +char 1 95 +char 1 97 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1747 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 115 +char 1 47 +char 1 115 +char 1 99 +char 1 114 +char 1 111 +char 1 108 +char 1 108 +char 1 98 +char 1 97 +char 1 114 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1744 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 97 +char 1 114 +char 1 116 +char 1 47 +char 1 102 +char 1 120 +char 1 95 +char 1 119 +char 1 104 +char 1 105 +char 1 116 +char 1 101 +char 1 0 +align 1 +LABELV $1740 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 97 +char 1 114 +char 1 116 +char 1 47 +char 1 102 +char 1 120 +char 1 95 +char 1 99 +char 1 121 +char 1 97 +char 1 110 +char 1 0 +align 1 +LABELV $1736 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 97 +char 1 114 +char 1 116 +char 1 47 +char 1 102 +char 1 120 +char 1 95 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 0 +align 1 +LABELV $1732 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 97 +char 1 114 +char 1 116 +char 1 47 +char 1 102 +char 1 120 +char 1 95 +char 1 116 +char 1 101 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $1728 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 97 +char 1 114 +char 1 116 +char 1 47 +char 1 102 +char 1 120 +char 1 95 +char 1 103 +char 1 114 +char 1 110 +char 1 0 +align 1 +LABELV $1724 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 97 +char 1 114 +char 1 116 +char 1 47 +char 1 102 +char 1 120 +char 1 95 +char 1 121 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $1720 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 97 +char 1 114 +char 1 116 +char 1 47 +char 1 102 +char 1 120 +char 1 95 +char 1 114 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $1717 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 97 +char 1 114 +char 1 116 +char 1 47 +char 1 102 +char 1 120 +char 1 95 +char 1 98 +char 1 97 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $1714 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 103 +char 1 114 +char 1 97 +char 1 100 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 98 +char 1 97 +char 1 114 +char 1 50 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1620 +char 1 99 +char 1 111 +char 1 110 +char 1 110 +char 1 101 +char 1 99 +char 1 116 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $1616 +char 1 37 +char 1 52 +char 1 105 +char 1 0 +align 1 +LABELV $1614 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $1611 +char 1 76 +char 1 101 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1608 +char 1 83 +char 1 112 +char 1 101 +char 1 99 +char 1 116 +char 1 97 +char 1 116 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $1605 +char 1 37 +char 1 105 +char 1 47 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $1599 +char 1 82 +char 1 101 +char 1 97 +char 1 100 +char 1 121 +char 1 0 +align 1 +LABELV $1484 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 100 +char 1 101 +char 1 102 +char 1 0 +align 1 +LABELV $1478 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 71 +char 1 108 +char 1 111 +char 1 98 +char 1 97 +char 1 108 +char 1 68 +char 1 101 +char 1 102 +char 1 0 +align 1 +LABELV $1464 +char 1 117 +char 1 105 +char 1 47 +char 1 116 +char 1 101 +char 1 115 +char 1 116 +char 1 104 +char 1 117 +char 1 100 +char 1 46 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 0 +align 1 +LABELV $1451 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 111 +char 1 119 +char 1 67 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $1443 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 111 +char 1 119 +char 1 89 +char 1 0 +align 1 +LABELV $1435 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 111 +char 1 119 +char 1 88 +char 1 0 +align 1 +LABELV $1427 +char 1 102 +char 1 97 +char 1 100 +char 1 101 +char 1 65 +char 1 109 +char 1 111 +char 1 117 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $1419 +char 1 102 +char 1 97 +char 1 100 +char 1 101 +char 1 67 +char 1 121 +char 1 99 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $1411 +char 1 102 +char 1 97 +char 1 100 +char 1 101 +char 1 67 +char 1 108 +char 1 97 +char 1 109 +char 1 112 +char 1 0 +align 1 +LABELV $1399 +char 1 99 +char 1 117 +char 1 114 +char 1 115 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $1391 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 66 +char 1 117 +char 1 122 +char 1 122 +char 1 83 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $1383 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 70 +char 1 111 +char 1 99 +char 1 117 +char 1 115 +char 1 83 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $1375 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 69 +char 1 120 +char 1 105 +char 1 116 +char 1 83 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $1367 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 69 +char 1 110 +char 1 116 +char 1 101 +char 1 114 +char 1 83 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $1359 +char 1 103 +char 1 114 +char 1 97 +char 1 100 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 98 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $1349 +char 1 98 +char 1 105 +char 1 103 +char 1 102 +char 1 111 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $1339 +char 1 115 +char 1 109 +char 1 97 +char 1 108 +char 1 108 +char 1 70 +char 1 111 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $1329 +char 1 102 +char 1 111 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $1325 +char 1 125 +char 1 0 +align 1 +LABELV $1316 +char 1 123 +char 1 0 +align 1 +LABELV $1309 +char 1 94 +char 1 49 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 32 +char 1 102 +char 1 105 +char 1 108 +char 1 101 +char 1 32 +char 1 116 +char 1 111 +char 1 111 +char 1 32 +char 1 108 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 105 +char 1 115 +char 1 32 +char 1 37 +char 1 105 +char 1 44 +char 1 32 +char 1 109 +char 1 97 +char 1 120 +char 1 32 +char 1 97 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 101 +char 1 100 +char 1 32 +char 1 105 +char 1 115 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $1306 +char 1 94 +char 1 49 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 32 +char 1 102 +char 1 105 +char 1 108 +char 1 101 +char 1 32 +char 1 110 +char 1 111 +char 1 116 +char 1 32 +char 1 102 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 44 +char 1 32 +char 1 117 +char 1 115 +char 1 105 +char 1 110 +char 1 103 +char 1 32 +char 1 100 +char 1 101 +char 1 102 +char 1 97 +char 1 117 +char 1 108 +char 1 116 +char 1 10 +char 1 0 +align 1 +LABELV $1296 +char 1 67 +char 1 71 +char 1 95 +char 1 67 +char 1 111 +char 1 110 +char 1 102 +char 1 105 +char 1 103 +char 1 83 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 58 +char 1 32 +char 1 98 +char 1 97 +char 1 100 +char 1 32 +char 1 105 +char 1 110 +char 1 100 +char 1 101 +char 1 120 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $1271 +char 1 37 +char 1 115 +char 1 32 +char 1 32 +char 1 32 +char 1 32 +char 1 32 +char 1 0 +align 1 +LABELV $1257 +char 1 37 +char 1 115 +char 1 95 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $1253 +char 1 104 +char 1 97 +char 1 108 +char 1 102 +char 1 83 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 83 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $1250 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 104 +char 1 105 +char 1 116 +char 1 115 +char 1 47 +char 1 116 +char 1 101 +char 1 115 +char 1 116 +char 1 98 +char 1 111 +char 1 111 +char 1 109 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $1247 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 109 +char 1 105 +char 1 115 +char 1 115 +char 1 105 +char 1 110 +char 1 103 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1243 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 116 +char 1 117 +char 1 114 +char 1 101 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1239 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 105 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 115 +char 1 101 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1236 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 99 +char 1 117 +char 1 114 +char 1 115 +char 1 111 +char 1 114 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1233 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 99 +char 1 117 +char 1 114 +char 1 115 +char 1 111 +char 1 114 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1230 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 47 +char 1 97 +char 1 114 +char 1 116 +char 1 47 +char 1 51 +char 1 95 +char 1 99 +char 1 117 +char 1 114 +char 1 115 +char 1 111 +char 1 114 +char 1 50 +char 1 0 +align 1 +LABELV $1227 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 101 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 116 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1224 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 114 +char 1 101 +char 1 116 +char 1 114 +char 1 105 +char 1 101 +char 1 118 +char 1 101 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1221 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 95 +char 1 108 +char 1 101 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1218 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 110 +char 1 100 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1215 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 102 +char 1 111 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1212 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 99 +char 1 97 +char 1 109 +char 1 112 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1209 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 97 +char 1 117 +char 1 108 +char 1 116 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1206 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 112 +char 1 97 +char 1 116 +char 1 114 +char 1 111 +char 1 108 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1195 +char 1 115 +char 1 107 +char 1 105 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $1178 +char 1 42 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $1171 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 109 +char 1 103 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 95 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 115 +char 1 97 +char 1 110 +char 1 100 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 116 +char 1 104 +char 1 0 +align 1 +LABELV $1168 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 109 +char 1 103 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 95 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 115 +char 1 0 +align 1 +LABELV $1165 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 98 +char 1 111 +char 1 114 +char 1 103 +char 1 101 +char 1 121 +char 1 101 +char 1 102 +char 1 108 +char 1 97 +char 1 114 +char 1 101 +char 1 0 +align 1 +LABELV $1162 +char 1 98 +char 1 108 +char 1 111 +char 1 111 +char 1 100 +char 1 77 +char 1 97 +char 1 114 +char 1 107 +char 1 0 +align 1 +LABELV $1159 +char 1 119 +char 1 97 +char 1 107 +char 1 101 +char 1 0 +align 1 +LABELV $1156 +char 1 109 +char 1 97 +char 1 114 +char 1 107 +char 1 83 +char 1 104 +char 1 97 +char 1 100 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $1153 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 100 +char 1 97 +char 1 109 +char 1 97 +char 1 103 +char 1 101 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 115 +char 1 109 +char 1 97 +char 1 95 +char 1 109 +char 1 114 +char 1 107 +char 1 0 +align 1 +LABELV $1150 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 100 +char 1 97 +char 1 109 +char 1 97 +char 1 103 +char 1 101 +char 1 47 +char 1 104 +char 1 111 +char 1 108 +char 1 101 +char 1 95 +char 1 108 +char 1 103 +char 1 95 +char 1 109 +char 1 114 +char 1 107 +char 1 0 +align 1 +LABELV $1147 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 100 +char 1 97 +char 1 109 +char 1 97 +char 1 103 +char 1 101 +char 1 47 +char 1 98 +char 1 117 +char 1 114 +char 1 110 +char 1 95 +char 1 109 +char 1 101 +char 1 100 +char 1 95 +char 1 109 +char 1 114 +char 1 107 +char 1 0 +align 1 +LABELV $1144 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 100 +char 1 97 +char 1 109 +char 1 97 +char 1 103 +char 1 101 +char 1 47 +char 1 98 +char 1 117 +char 1 108 +char 1 108 +char 1 101 +char 1 116 +char 1 95 +char 1 109 +char 1 114 +char 1 107 +char 1 0 +align 1 +LABELV $1141 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 102 +char 1 117 +char 1 108 +char 1 108 +char 1 98 +char 1 111 +char 1 100 +char 1 121 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 114 +char 1 105 +char 1 99 +char 1 50 +char 1 0 +align 1 +LABELV $1138 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 114 +char 1 105 +char 1 99 +char 1 0 +align 1 +LABELV $1135 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 116 +char 1 101 +char 1 115 +char 1 116 +char 1 95 +char 1 99 +char 1 114 +char 1 97 +char 1 99 +char 1 107 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $1122 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 98 +char 1 105 +char 1 110 +char 1 111 +char 1 99 +char 1 117 +char 1 108 +char 1 97 +char 1 114 +char 1 78 +char 1 117 +char 1 109 +char 1 79 +char 1 118 +char 1 101 +char 1 114 +char 1 108 +char 1 97 +char 1 121 +char 1 0 +align 1 +LABELV $1119 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 98 +char 1 105 +char 1 110 +char 1 111 +char 1 99 +char 1 117 +char 1 108 +char 1 97 +char 1 114 +char 1 87 +char 1 105 +char 1 110 +char 1 100 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $1116 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 98 +char 1 105 +char 1 110 +char 1 84 +char 1 111 +char 1 112 +char 1 84 +char 1 114 +char 1 105 +char 1 0 +align 1 +LABELV $1113 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 98 +char 1 105 +char 1 110 +char 1 83 +char 1 105 +char 1 100 +char 1 101 +char 1 65 +char 1 114 +char 1 114 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $1110 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 98 +char 1 105 +char 1 110 +char 1 77 +char 1 97 +char 1 115 +char 1 107 +char 1 0 +align 1 +LABELV $1107 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 98 +char 1 105 +char 1 110 +char 1 67 +char 1 105 +char 1 114 +char 1 99 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $1104 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 105 +char 1 110 +char 1 118 +char 1 117 +char 1 108 +char 1 110 +char 1 101 +char 1 114 +char 1 97 +char 1 98 +char 1 105 +char 1 108 +char 1 105 +char 1 116 +char 1 121 +char 1 115 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $1101 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 101 +char 1 110 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 101 +char 1 110 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 115 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $1098 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 101 +char 1 110 +char 1 100 +char 1 97 +char 1 114 +char 1 107 +char 1 101 +char 1 110 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 115 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $1095 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 98 +char 1 111 +char 1 111 +char 1 110 +char 1 115 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $1090 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 121 +char 1 115 +char 1 97 +char 1 108 +char 1 105 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 115 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $1087 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 121 +char 1 115 +char 1 97 +char 1 108 +char 1 105 +char 1 114 +char 1 101 +char 1 100 +char 1 115 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $1084 +char 1 117 +char 1 105 +char 1 47 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 98 +char 1 97 +char 1 114 +char 1 47 +char 1 115 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 116 +char 1 104 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1072 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 98 +char 1 97 +char 1 114 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1069 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $1066 +char 1 115 +char 1 112 +char 1 114 +char 1 105 +char 1 116 +char 1 101 +char 1 115 +char 1 47 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 95 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 0 +align 1 +LABELV $1063 +char 1 115 +char 1 112 +char 1 114 +char 1 105 +char 1 116 +char 1 101 +char 1 115 +char 1 47 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 95 +char 1 114 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $1039 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 98 +char 1 97 +char 1 115 +char 1 101 +char 1 47 +char 1 110 +char 1 116 +char 1 114 +char 1 108 +char 1 95 +char 1 98 +char 1 97 +char 1 115 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $1036 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 98 +char 1 97 +char 1 115 +char 1 101 +char 1 47 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 95 +char 1 98 +char 1 97 +char 1 115 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $1033 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 98 +char 1 97 +char 1 115 +char 1 101 +char 1 47 +char 1 114 +char 1 101 +char 1 100 +char 1 95 +char 1 98 +char 1 97 +char 1 115 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $1030 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 50 +char 1 47 +char 1 119 +char 1 104 +char 1 105 +char 1 116 +char 1 101 +char 1 46 +char 1 115 +char 1 107 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $1027 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 50 +char 1 47 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 46 +char 1 115 +char 1 107 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $1024 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 50 +char 1 47 +char 1 114 +char 1 101 +char 1 100 +char 1 46 +char 1 115 +char 1 107 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $1021 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 50 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 102 +char 1 108 +char 1 97 +char 1 112 +char 1 51 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $1018 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 50 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 112 +char 1 111 +char 1 108 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $1015 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 101 +char 1 116 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $1014 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 98 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $1013 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 114 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $1012 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 98 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 121 +char 1 115 +char 1 0 +align 1 +LABELV $1011 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 114 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 121 +char 1 115 +char 1 0 +align 1 +LABELV $1010 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 98 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 120 +char 1 0 +align 1 +LABELV $1009 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 104 +char 1 117 +char 1 100 +char 1 47 +char 1 109 +char 1 112 +char 1 105 +char 1 95 +char 1 114 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 120 +char 1 0 +align 1 +LABELV $997 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 115 +char 1 47 +char 1 98 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 121 +char 1 115 +char 1 97 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $996 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 115 +char 1 47 +char 1 114 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 95 +char 1 121 +char 1 115 +char 1 97 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $995 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 115 +char 1 47 +char 1 98 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $994 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 115 +char 1 47 +char 1 114 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $972 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 104 +char 1 111 +char 1 108 +char 1 111 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $969 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 115 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 115 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $966 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 115 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $963 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 115 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 98 +char 1 117 +char 1 98 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $960 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 112 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 97 +char 1 108 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $957 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 122 +char 1 111 +char 1 117 +char 1 116 +char 1 0 +align 1 +LABELV $954 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 99 +char 1 101 +char 1 104 +char 1 111 +char 1 108 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $951 +char 1 104 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 83 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 80 +char 1 117 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $948 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 103 +char 1 101 +char 1 110 +char 1 0 +align 1 +LABELV $945 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 105 +char 1 110 +char 1 118 +char 1 105 +char 1 115 +char 1 105 +char 1 98 +char 1 105 +char 1 108 +char 1 105 +char 1 116 +char 1 121 +char 1 0 +align 1 +LABELV $942 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 116 +char 1 108 +char 1 101 +char 1 87 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $939 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 116 +char 1 108 +char 1 101 +char 1 83 +char 1 117 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $936 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 113 +char 1 117 +char 1 97 +char 1 100 +char 1 87 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $933 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 113 +char 1 117 +char 1 97 +char 1 100 +char 1 0 +align 1 +LABELV $930 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 110 +char 1 111 +char 1 97 +char 1 109 +char 1 109 +char 1 111 +char 1 0 +align 1 +LABELV $927 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 98 +char 1 97 +char 1 99 +char 1 107 +char 1 116 +char 1 105 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $923 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 99 +char 1 114 +char 1 111 +char 1 115 +char 1 115 +char 1 104 +char 1 97 +char 1 105 +char 1 114 +char 1 37 +char 1 99 +char 1 0 +align 1 +LABELV $916 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $915 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 99 +char 1 111 +char 1 110 +char 1 102 +char 1 117 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $914 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 95 +char 1 98 +char 1 111 +char 1 108 +char 1 116 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $913 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 98 +char 1 108 +char 1 111 +char 1 111 +char 1 100 +char 1 95 +char 1 115 +char 1 112 +char 1 97 +char 1 114 +char 1 107 +char 1 115 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $912 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 98 +char 1 108 +char 1 111 +char 1 99 +char 1 107 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $911 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 100 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $910 +char 1 109 +char 1 112 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 99 +char 1 111 +char 1 110 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $909 +char 1 109 +char 1 112 +char 1 47 +char 1 106 +char 1 101 +char 1 100 +char 1 105 +char 1 115 +char 1 112 +char 1 97 +char 1 119 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $908 +char 1 109 +char 1 112 +char 1 47 +char 1 115 +char 1 112 +char 1 97 +char 1 119 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $907 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 112 +char 1 97 +char 1 114 +char 1 107 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $906 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 47 +char 1 109 +char 1 117 +char 1 122 +char 1 122 +char 1 108 +char 1 101 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $905 +char 1 115 +char 1 112 +char 1 97 +char 1 114 +char 1 107 +char 1 95 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $904 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 100 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $903 +char 1 101 +char 1 109 +char 1 112 +char 1 108 +char 1 97 +char 1 99 +char 1 101 +char 1 100 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 100 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $902 +char 1 101 +char 1 109 +char 1 112 +char 1 108 +char 1 97 +char 1 99 +char 1 101 +char 1 100 +char 1 47 +char 1 100 +char 1 101 +char 1 97 +char 1 100 +char 1 95 +char 1 115 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $901 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 100 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $900 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 47 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $897 +char 1 94 +char 1 53 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 32 +char 1 70 +char 1 120 +char 1 32 +char 1 83 +char 1 121 +char 1 115 +char 1 116 +char 1 101 +char 1 109 +char 1 32 +char 1 73 +char 1 110 +char 1 105 +char 1 116 +char 1 105 +char 1 97 +char 1 108 +char 1 105 +char 1 122 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 67 +char 1 111 +char 1 109 +char 1 112 +char 1 108 +char 1 101 +char 1 116 +char 1 101 +char 1 32 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 10 +char 1 0 +align 1 +LABELV $896 +char 1 94 +char 1 53 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 32 +char 1 70 +char 1 120 +char 1 32 +char 1 83 +char 1 121 +char 1 115 +char 1 116 +char 1 101 +char 1 109 +char 1 32 +char 1 73 +char 1 110 +char 1 105 +char 1 116 +char 1 105 +char 1 97 +char 1 108 +char 1 105 +char 1 122 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 10 +char 1 0 +align 1 +LABELV $895 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 116 +char 1 114 +char 1 97 +char 1 99 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $892 +char 1 119 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 66 +char 1 117 +char 1 98 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $889 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $886 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $883 +char 1 98 +char 1 108 +char 1 111 +char 1 111 +char 1 100 +char 1 84 +char 1 114 +char 1 97 +char 1 105 +char 1 108 +char 1 0 +align 1 +LABELV $880 +char 1 115 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 80 +char 1 117 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $877 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 114 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $874 +char 1 118 +char 1 105 +char 1 101 +char 1 119 +char 1 66 +char 1 108 +char 1 111 +char 1 111 +char 1 100 +char 1 66 +char 1 108 +char 1 101 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $871 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 116 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $851 +char 1 103 +char 1 97 +char 1 109 +char 1 101 +char 1 32 +char 1 109 +char 1 101 +char 1 100 +char 1 105 +char 1 97 +char 1 0 +align 1 +LABELV $846 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 99 +char 1 95 +char 1 110 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $845 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 99 +char 1 95 +char 1 101 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $844 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 99 +char 1 95 +char 1 115 +char 1 101 +char 1 118 +char 1 101 +char 1 110 +char 1 0 +align 1 +LABELV $843 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 99 +char 1 95 +char 1 115 +char 1 105 +char 1 120 +char 1 0 +align 1 +LABELV $842 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 99 +char 1 95 +char 1 102 +char 1 105 +char 1 118 +char 1 101 +char 1 0 +align 1 +LABELV $841 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 99 +char 1 95 +char 1 102 +char 1 111 +char 1 117 +char 1 114 +char 1 0 +align 1 +LABELV $840 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 99 +char 1 95 +char 1 116 +char 1 104 +char 1 114 +char 1 101 +char 1 101 +char 1 0 +align 1 +LABELV $839 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 99 +char 1 95 +char 1 116 +char 1 119 +char 1 111 +char 1 0 +align 1 +LABELV $838 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 99 +char 1 95 +char 1 111 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $837 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 99 +char 1 95 +char 1 122 +char 1 101 +char 1 114 +char 1 111 +char 1 0 +align 1 +LABELV $835 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 95 +char 1 109 +char 1 105 +char 1 110 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $834 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 95 +char 1 110 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $833 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 95 +char 1 101 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $832 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 95 +char 1 115 +char 1 101 +char 1 118 +char 1 101 +char 1 110 +char 1 0 +align 1 +LABELV $831 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 95 +char 1 115 +char 1 105 +char 1 120 +char 1 0 +align 1 +LABELV $830 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 95 +char 1 102 +char 1 105 +char 1 118 +char 1 101 +char 1 0 +align 1 +LABELV $829 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 95 +char 1 102 +char 1 111 +char 1 117 +char 1 114 +char 1 0 +align 1 +LABELV $828 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 95 +char 1 116 +char 1 104 +char 1 114 +char 1 101 +char 1 101 +char 1 0 +align 1 +LABELV $827 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 95 +char 1 116 +char 1 119 +char 1 111 +char 1 0 +align 1 +LABELV $826 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 95 +char 1 111 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $825 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 95 +char 1 122 +char 1 101 +char 1 114 +char 1 111 +char 1 0 +align 1 +LABELV $823 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 105 +char 1 110 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $822 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 110 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $821 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 101 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $820 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 115 +char 1 101 +char 1 118 +char 1 101 +char 1 110 +char 1 0 +align 1 +LABELV $819 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 115 +char 1 105 +char 1 120 +char 1 0 +align 1 +LABELV $818 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 102 +char 1 105 +char 1 118 +char 1 101 +char 1 0 +align 1 +LABELV $817 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 117 +char 1 114 +char 1 0 +align 1 +LABELV $816 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 104 +char 1 114 +char 1 101 +char 1 101 +char 1 0 +align 1 +LABELV $815 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 119 +char 1 111 +char 1 0 +align 1 +LABELV $814 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 111 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $813 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 122 +char 1 101 +char 1 114 +char 1 111 +char 1 0 +align 1 +LABELV $803 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $800 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 48 +char 1 54 +char 1 0 +align 1 +LABELV $797 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 117 +char 1 115 +char 1 101 +char 1 95 +char 1 98 +char 1 97 +char 1 99 +char 1 116 +char 1 97 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $794 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 115 +char 1 101 +char 1 101 +char 1 107 +char 1 101 +char 1 114 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 104 +char 1 105 +char 1 115 +char 1 115 +char 1 0 +align 1 +LABELV $768 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 111 +char 1 111 +char 1 116 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 115 +char 1 47 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 37 +char 1 105 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $764 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 111 +char 1 111 +char 1 116 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 115 +char 1 47 +char 1 99 +char 1 108 +char 1 97 +char 1 110 +char 1 107 +char 1 37 +char 1 105 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $760 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 111 +char 1 111 +char 1 116 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 115 +char 1 47 +char 1 115 +char 1 112 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 37 +char 1 105 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $757 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 111 +char 1 111 +char 1 116 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 115 +char 1 47 +char 1 98 +char 1 111 +char 1 111 +char 1 116 +char 1 37 +char 1 105 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $752 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 105 +char 1 110 +char 1 116 +char 1 101 +char 1 114 +char 1 102 +char 1 97 +char 1 99 +char 1 101 +char 1 47 +char 1 122 +char 1 111 +char 1 111 +char 1 109 +char 1 101 +char 1 110 +char 1 100 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $749 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 105 +char 1 110 +char 1 116 +char 1 101 +char 1 114 +char 1 102 +char 1 97 +char 1 99 +char 1 101 +char 1 47 +char 1 122 +char 1 111 +char 1 111 +char 1 109 +char 1 108 +char 1 111 +char 1 111 +char 1 112 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $746 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 105 +char 1 110 +char 1 116 +char 1 101 +char 1 114 +char 1 102 +char 1 97 +char 1 99 +char 1 101 +char 1 47 +char 1 122 +char 1 111 +char 1 111 +char 1 109 +char 1 115 +char 1 116 +char 1 97 +char 1 114 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $743 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 104 +char 1 111 +char 1 108 +char 1 111 +char 1 99 +char 1 114 +char 1 111 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $740 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 109 +char 1 111 +char 1 116 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $739 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 109 +char 1 112 +char 1 95 +char 1 100 +char 1 97 +char 1 114 +char 1 107 +char 1 95 +char 1 101 +char 1 110 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 95 +char 1 100 +char 1 105 +char 1 115 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $738 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 109 +char 1 112 +char 1 95 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 95 +char 1 101 +char 1 110 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 95 +char 1 100 +char 1 105 +char 1 115 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $737 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 111 +char 1 108 +char 1 105 +char 1 100 +char 1 87 +char 1 104 +char 1 105 +char 1 116 +char 1 101 +char 1 95 +char 1 99 +char 1 117 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $734 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 100 +char 1 105 +char 1 101 +char 1 0 +align 1 +LABELV $730 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 117 +char 1 114 +char 1 110 +char 1 0 +align 1 +LABELV $727 +char 1 115 +char 1 117 +char 1 114 +char 1 102 +char 1 97 +char 1 99 +char 1 101 +char 1 69 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $724 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 115 +char 1 112 +char 1 104 +char 1 101 +char 1 114 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $721 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 116 +char 1 114 +char 1 95 +char 1 117 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $718 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 116 +char 1 114 +char 1 95 +char 1 111 +char 1 117 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $715 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 116 +char 1 114 +char 1 95 +char 1 105 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $712 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 114 +char 1 111 +char 1 108 +char 1 108 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $709 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 53 +char 1 50 +char 1 0 +align 1 +LABELV $704 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 53 +char 1 49 +char 1 0 +align 1 +LABELV $701 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 101 +char 1 110 +char 1 101 +char 1 114 +char 1 103 +char 1 121 +char 1 95 +char 1 99 +char 1 114 +char 1 97 +char 1 99 +char 1 107 +char 1 108 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $698 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 97 +char 1 108 +char 1 108 +char 1 115 +char 1 112 +char 1 108 +char 1 97 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $695 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 108 +char 1 97 +char 1 110 +char 1 100 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $692 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 116 +char 1 97 +char 1 108 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $689 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 72 +char 1 105 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $688 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 115 +char 1 112 +char 1 97 +char 1 119 +char 1 110 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $685 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 116 +char 1 101 +char 1 108 +char 1 101 +char 1 111 +char 1 117 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $682 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 116 +char 1 101 +char 1 108 +char 1 101 +char 1 105 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $679 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $675 +char 1 109 +char 1 117 +char 1 115 +char 1 105 +char 1 99 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 117 +char 1 101 +char 1 108 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $671 +char 1 109 +char 1 117 +char 1 115 +char 1 105 +char 1 99 +char 1 47 +char 1 98 +char 1 97 +char 1 100 +char 1 115 +char 1 109 +char 1 97 +char 1 108 +char 1 108 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $668 +char 1 109 +char 1 117 +char 1 115 +char 1 105 +char 1 99 +char 1 47 +char 1 103 +char 1 111 +char 1 111 +char 1 100 +char 1 115 +char 1 109 +char 1 97 +char 1 108 +char 1 108 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $665 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 100 +char 1 114 +char 1 97 +char 1 105 +char 1 110 +char 1 101 +char 1 100 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $662 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 52 +char 1 55 +char 1 0 +align 1 +LABELV $659 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 52 +char 1 56 +char 1 0 +align 1 +LABELV $656 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 52 +char 1 57 +char 1 0 +align 1 +LABELV $653 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 53 +char 1 48 +char 1 0 +align 1 +LABELV $650 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 51 +char 1 57 +char 1 0 +align 1 +LABELV $647 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 52 +char 1 48 +char 1 0 +align 1 +LABELV $644 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 52 +char 1 49 +char 1 0 +align 1 +LABELV $641 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 52 +char 1 50 +char 1 0 +align 1 +LABELV $631 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 52 +char 1 51 +char 1 0 +align 1 +LABELV $628 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 52 +char 1 52 +char 1 0 +align 1 +LABELV $625 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 51 +char 1 50 +char 1 0 +align 1 +LABELV $622 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 52 +char 1 53 +char 1 0 +align 1 +LABELV $619 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 52 +char 1 54 +char 1 0 +align 1 +LABELV $611 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 103 +char 1 114 +char 1 105 +char 1 112 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $610 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 106 +char 1 117 +char 1 109 +char 1 112 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $609 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 97 +char 1 98 +char 1 115 +char 1 111 +char 1 114 +char 1 98 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $608 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 97 +char 1 98 +char 1 115 +char 1 111 +char 1 114 +char 1 98 +char 1 104 +char 1 105 +char 1 116 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $607 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 116 +char 1 101 +char 1 99 +char 1 116 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $606 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 116 +char 1 101 +char 1 99 +char 1 116 +char 1 104 +char 1 105 +char 1 116 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $605 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 115 +char 1 112 +char 1 101 +char 1 101 +char 1 100 +char 1 108 +char 1 111 +char 1 111 +char 1 112 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $604 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 108 +char 1 111 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $603 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $602 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 103 +char 1 108 +char 1 97 +char 1 115 +char 1 115 +char 1 98 +char 1 114 +char 1 101 +char 1 97 +char 1 107 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $601 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 112 +char 1 105 +char 1 99 +char 1 107 +char 1 117 +char 1 112 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $600 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 47 +char 1 112 +char 1 105 +char 1 99 +char 1 107 +char 1 117 +char 1 112 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 116 +char 1 104 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $599 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 47 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $598 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 47 +char 1 115 +char 1 104 +char 1 117 +char 1 116 +char 1 100 +char 1 111 +char 1 119 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $597 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 47 +char 1 115 +char 1 116 +char 1 97 +char 1 114 +char 1 116 +char 1 117 +char 1 112 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $596 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 47 +char 1 112 +char 1 105 +char 1 110 +char 1 103 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $595 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 97 +char 1 109 +char 1 98 +char 1 105 +char 1 101 +char 1 110 +char 1 99 +char 1 101 +char 1 47 +char 1 115 +char 1 112 +char 1 97 +char 1 114 +char 1 107 +char 1 53 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $594 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 115 +char 1 119 +char 1 105 +char 1 116 +char 1 99 +char 1 104 +char 1 101 +char 1 115 +char 1 47 +char 1 115 +char 1 119 +char 1 105 +char 1 116 +char 1 99 +char 1 104 +char 1 51 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $593 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 115 +char 1 119 +char 1 105 +char 1 116 +char 1 99 +char 1 104 +char 1 101 +char 1 115 +char 1 47 +char 1 115 +char 1 119 +char 1 105 +char 1 116 +char 1 99 +char 1 104 +char 1 50 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $592 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 98 +char 1 111 +char 1 117 +char 1 110 +char 1 99 +char 1 101 +char 1 37 +char 1 105 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $587 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 52 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $586 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 51 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $585 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 50 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $584 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $583 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 50 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $582 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $581 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 115 +char 1 116 +char 1 97 +char 1 114 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $580 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 99 +char 1 114 +char 1 97 +char 1 115 +char 1 104 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $576 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 112 +char 1 117 +char 1 115 +char 1 104 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $575 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 112 +char 1 117 +char 1 108 +char 1 108 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $574 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 116 +char 1 114 +char 1 97 +char 1 99 +char 1 116 +char 1 115 +char 1 116 +char 1 111 +char 1 112 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $573 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 116 +char 1 114 +char 1 97 +char 1 99 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $572 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 106 +char 1 117 +char 1 109 +char 1 112 +char 1 98 +char 1 117 +char 1 105 +char 1 108 +char 1 100 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $571 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 100 +char 1 114 +char 1 97 +char 1 105 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $570 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 104 +char 1 105 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $569 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $568 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 114 +char 1 97 +char 1 103 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $567 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 115 +char 1 101 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $566 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 115 +char 1 112 +char 1 101 +char 1 101 +char 1 100 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $565 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $564 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $561 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $558 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 104 +char 1 105 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $557 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 104 +char 1 105 +char 1 116 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 51 +char 1 0 +align 1 +LABELV $556 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 104 +char 1 105 +char 1 116 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 50 +char 1 0 +align 1 +LABELV $555 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 104 +char 1 105 +char 1 116 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 49 +char 1 0 +align 1 +LABELV $554 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 111 +char 1 102 +char 1 102 +char 1 113 +char 1 117 +char 1 105 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $553 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 111 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $552 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 104 +char 1 117 +char 1 109 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $551 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 98 +char 1 111 +char 1 117 +char 1 110 +char 1 99 +char 1 101 +char 1 37 +char 1 105 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $546 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 98 +char 1 108 +char 1 111 +char 1 99 +char 1 107 +char 1 37 +char 1 105 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $541 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 104 +char 1 117 +char 1 112 +char 1 37 +char 1 105 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $536 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 109 +char 1 97 +char 1 112 +char 1 95 +char 1 111 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 105 +char 1 109 +char 1 112 +char 1 95 +char 1 109 +char 1 105 +char 1 110 +char 1 101 +char 1 47 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 95 +char 1 99 +char 1 104 +char 1 97 +char 1 105 +char 1 114 +char 1 95 +char 1 100 +char 1 109 +char 1 103 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $535 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 95 +char 1 112 +char 1 111 +char 1 114 +char 1 116 +char 1 97 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $534 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 95 +char 1 100 +char 1 109 +char 1 103 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $533 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 114 +char 1 101 +char 1 100 +char 1 95 +char 1 112 +char 1 111 +char 1 114 +char 1 116 +char 1 97 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $532 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 114 +char 1 101 +char 1 100 +char 1 95 +char 1 100 +char 1 109 +char 1 103 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $531 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 80 +char 1 117 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $530 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 68 +char 1 97 +char 1 109 +char 1 97 +char 1 103 +char 1 101 +char 1 71 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $529 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 121 +char 1 115 +char 1 97 +char 1 108 +char 1 105 +char 1 109 +char 1 97 +char 1 114 +char 1 105 +char 1 115 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $528 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 70 +char 1 108 +char 1 97 +char 1 114 +char 1 101 +char 1 0 +align 1 +LABELV $527 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 100 +char 1 97 +char 1 109 +char 1 97 +char 1 103 +char 1 101 +char 1 47 +char 1 114 +char 1 105 +char 1 118 +char 1 101 +char 1 116 +char 1 109 +char 1 97 +char 1 114 +char 1 107 +char 1 0 +align 1 +LABELV $524 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 121 +char 1 101 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 95 +char 1 103 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $521 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 66 +char 1 108 +char 1 117 +char 1 114 +char 1 0 +align 1 +LABELV $518 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 112 +char 1 117 +char 1 114 +char 1 112 +char 1 108 +char 1 101 +char 1 95 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $515 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 112 +char 1 117 +char 1 114 +char 1 112 +char 1 108 +char 1 101 +char 1 95 +char 1 103 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $512 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 95 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $509 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 95 +char 1 103 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $506 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 103 +char 1 114 +char 1 101 +char 1 101 +char 1 110 +char 1 95 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $503 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 103 +char 1 114 +char 1 101 +char 1 101 +char 1 110 +char 1 95 +char 1 103 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $500 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 121 +char 1 101 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 95 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $497 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 121 +char 1 101 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 95 +char 1 103 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $494 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 111 +char 1 114 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 95 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $491 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 111 +char 1 114 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 95 +char 1 103 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $488 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 100 +char 1 95 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $485 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 100 +char 1 95 +char 1 103 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $482 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 51 +char 1 56 +char 1 0 +align 1 +LABELV $479 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 51 +char 1 55 +char 1 0 +align 1 +LABELV $476 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 51 +char 1 54 +char 1 0 +align 1 +LABELV $473 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 51 +char 1 53 +char 1 0 +align 1 +LABELV $470 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 48 +char 1 51 +char 1 0 +align 1 +LABELV $467 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 48 +char 1 50 +char 1 0 +align 1 +LABELV $464 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 48 +char 1 49 +char 1 0 +align 1 +LABELV $461 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 48 +char 1 53 +char 1 0 +align 1 +LABELV $458 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 116 +char 1 104 +char 1 109 +char 1 97 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 52 +char 1 48 +char 1 77 +char 1 79 +char 1 77 +char 1 48 +char 1 48 +char 1 52 +char 1 0 +align 1 +LABELV $454 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $448 +char 1 80 +char 1 114 +char 1 101 +char 1 99 +char 1 97 +char 1 99 +char 1 104 +char 1 101 +char 1 73 +char 1 116 +char 1 101 +char 1 109 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 104 +char 1 97 +char 1 115 +char 1 32 +char 1 98 +char 1 97 +char 1 100 +char 1 32 +char 1 112 +char 1 114 +char 1 101 +char 1 99 +char 1 97 +char 1 99 +char 1 104 +char 1 101 +char 1 32 +char 1 115 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $427 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $381 +char 1 117 +char 1 105 +char 1 95 +char 1 97 +char 1 98 +char 1 111 +char 1 117 +char 1 116 +char 1 95 +char 1 98 +char 1 111 +char 1 116 +char 1 109 +char 1 105 +char 1 110 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 0 +align 1 +LABELV $380 +char 1 117 +char 1 105 +char 1 95 +char 1 97 +char 1 98 +char 1 111 +char 1 117 +char 1 116 +char 1 95 +char 1 110 +char 1 101 +char 1 101 +char 1 100 +char 1 112 +char 1 97 +char 1 115 +char 1 115 +char 1 0 +align 1 +LABELV $379 +char 1 117 +char 1 105 +char 1 95 +char 1 97 +char 1 98 +char 1 111 +char 1 117 +char 1 116 +char 1 95 +char 1 104 +char 1 111 +char 1 115 +char 1 116 +char 1 110 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $378 +char 1 117 +char 1 105 +char 1 95 +char 1 97 +char 1 98 +char 1 111 +char 1 117 +char 1 116 +char 1 95 +char 1 109 +char 1 97 +char 1 112 +char 1 110 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $377 +char 1 117 +char 1 105 +char 1 95 +char 1 97 +char 1 98 +char 1 111 +char 1 117 +char 1 116 +char 1 95 +char 1 100 +char 1 109 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 115 +char 1 0 +align 1 +LABELV $376 +char 1 117 +char 1 105 +char 1 95 +char 1 97 +char 1 98 +char 1 111 +char 1 117 +char 1 116 +char 1 95 +char 1 109 +char 1 97 +char 1 120 +char 1 99 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $375 +char 1 117 +char 1 105 +char 1 95 +char 1 97 +char 1 98 +char 1 111 +char 1 117 +char 1 116 +char 1 95 +char 1 116 +char 1 105 +char 1 109 +char 1 101 +char 1 108 +char 1 105 +char 1 109 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $374 +char 1 117 +char 1 105 +char 1 95 +char 1 97 +char 1 98 +char 1 111 +char 1 117 +char 1 116 +char 1 95 +char 1 100 +char 1 117 +char 1 101 +char 1 108 +char 1 108 +char 1 105 +char 1 109 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $373 +char 1 117 +char 1 105 +char 1 95 +char 1 97 +char 1 98 +char 1 111 +char 1 117 +char 1 116 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 116 +char 1 117 +char 1 114 +char 1 101 +char 1 108 +char 1 105 +char 1 109 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $372 +char 1 117 +char 1 105 +char 1 95 +char 1 97 +char 1 98 +char 1 111 +char 1 117 +char 1 116 +char 1 95 +char 1 102 +char 1 114 +char 1 97 +char 1 103 +char 1 108 +char 1 105 +char 1 109 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $371 +char 1 117 +char 1 105 +char 1 95 +char 1 97 +char 1 98 +char 1 111 +char 1 117 +char 1 116 +char 1 95 +char 1 103 +char 1 97 +char 1 109 +char 1 101 +char 1 116 +char 1 121 +char 1 112 +char 1 101 +char 1 0 +align 1 +LABELV $370 +char 1 53 +char 1 45 +char 1 49 +char 1 45 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 0 +align 1 +LABELV $369 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 115 +char 1 0 +align 1 +LABELV $368 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 95 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $367 +char 1 107 +char 1 121 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $366 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $363 +char 1 115 +char 1 118 +char 1 95 +char 1 114 +char 1 117 +char 1 110 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $357 +char 1 100 +char 1 101 +char 1 98 +char 1 117 +char 1 103 +char 1 66 +char 1 66 +char 1 0 +align 1 +LABELV $356 +char 1 117 +char 1 105 +char 1 95 +char 1 109 +char 1 121 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 0 +align 1 +LABELV $355 +char 1 48 +char 1 46 +char 1 48 +char 1 0 +align 1 +LABELV $354 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 114 +char 1 117 +char 1 101 +char 1 76 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $353 +char 1 117 +char 1 105 +char 1 95 +char 1 98 +char 1 105 +char 1 103 +char 1 70 +char 1 111 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $352 +char 1 48 +char 1 46 +char 1 50 +char 1 53 +char 1 0 +align 1 +LABELV $351 +char 1 117 +char 1 105 +char 1 95 +char 1 115 +char 1 109 +char 1 97 +char 1 108 +char 1 108 +char 1 70 +char 1 111 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $350 +char 1 99 +char 1 103 +char 1 95 +char 1 110 +char 1 111 +char 1 80 +char 1 114 +char 1 111 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 105 +char 1 108 +char 1 101 +char 1 84 +char 1 114 +char 1 97 +char 1 105 +char 1 108 +char 1 0 +align 1 +LABELV $349 +char 1 99 +char 1 103 +char 1 95 +char 1 110 +char 1 111 +char 1 84 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $348 +char 1 56 +char 1 0 +align 1 +LABELV $347 +char 1 112 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 95 +char 1 109 +char 1 115 +char 1 101 +char 1 99 +char 1 0 +align 1 +LABELV $346 +char 1 112 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 95 +char 1 102 +char 1 105 +char 1 120 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $345 +char 1 99 +char 1 111 +char 1 109 +char 1 95 +char 1 99 +char 1 97 +char 1 109 +char 1 101 +char 1 114 +char 1 97 +char 1 77 +char 1 111 +char 1 100 +char 1 101 +char 1 0 +align 1 +LABELV $344 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 109 +char 1 111 +char 1 111 +char 1 116 +char 1 104 +char 1 67 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $343 +char 1 99 +char 1 103 +char 1 95 +char 1 104 +char 1 117 +char 1 100 +char 1 70 +char 1 105 +char 1 108 +char 1 101 +char 1 115 +char 1 0 +align 1 +LABELV $342 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 80 +char 1 108 +char 1 117 +char 1 109 +char 1 115 +char 1 0 +align 1 +LABELV $341 +char 1 116 +char 1 105 +char 1 109 +char 1 101 +char 1 115 +char 1 99 +char 1 97 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $340 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 105 +char 1 109 +char 1 101 +char 1 115 +char 1 99 +char 1 97 +char 1 108 +char 1 101 +char 1 70 +char 1 97 +char 1 100 +char 1 101 +char 1 83 +char 1 112 +char 1 101 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $339 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 105 +char 1 109 +char 1 101 +char 1 115 +char 1 99 +char 1 97 +char 1 108 +char 1 101 +char 1 70 +char 1 97 +char 1 100 +char 1 101 +char 1 69 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $338 +char 1 53 +char 1 48 +char 1 0 +align 1 +LABELV $337 +char 1 99 +char 1 103 +char 1 95 +char 1 99 +char 1 97 +char 1 109 +char 1 101 +char 1 114 +char 1 97 +char 1 79 +char 1 114 +char 1 98 +char 1 105 +char 1 116 +char 1 68 +char 1 101 +char 1 108 +char 1 97 +char 1 121 +char 1 0 +align 1 +LABELV $336 +char 1 99 +char 1 103 +char 1 95 +char 1 99 +char 1 97 +char 1 109 +char 1 101 +char 1 114 +char 1 97 +char 1 79 +char 1 114 +char 1 98 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $335 +char 1 117 +char 1 105 +char 1 95 +char 1 114 +char 1 101 +char 1 99 +char 1 111 +char 1 114 +char 1 100 +char 1 83 +char 1 80 +char 1 68 +char 1 101 +char 1 109 +char 1 111 +char 1 78 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $334 +char 1 117 +char 1 105 +char 1 95 +char 1 114 +char 1 101 +char 1 99 +char 1 111 +char 1 114 +char 1 100 +char 1 83 +char 1 80 +char 1 68 +char 1 101 +char 1 109 +char 1 111 +char 1 0 +align 1 +LABELV $333 +char 1 103 +char 1 95 +char 1 101 +char 1 110 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 66 +char 1 114 +char 1 101 +char 1 97 +char 1 116 +char 1 104 +char 1 0 +align 1 +LABELV $332 +char 1 103 +char 1 95 +char 1 101 +char 1 110 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 68 +char 1 117 +char 1 115 +char 1 116 +char 1 0 +align 1 +LABELV $331 +char 1 117 +char 1 105 +char 1 95 +char 1 115 +char 1 105 +char 1 110 +char 1 103 +char 1 108 +char 1 101 +char 1 80 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 65 +char 1 99 +char 1 116 +char 1 105 +char 1 118 +char 1 101 +char 1 0 +align 1 +LABELV $330 +char 1 0 +align 1 +LABELV $329 +char 1 99 +char 1 103 +char 1 95 +char 1 99 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 110 +char 1 116 +char 1 83 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 80 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 78 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $328 +char 1 99 +char 1 103 +char 1 95 +char 1 99 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 110 +char 1 116 +char 1 83 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 80 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $327 +char 1 82 +char 1 101 +char 1 98 +char 1 101 +char 1 108 +char 1 108 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $326 +char 1 103 +char 1 95 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 0 +align 1 +LABELV $325 +char 1 69 +char 1 109 +char 1 112 +char 1 105 +char 1 114 +char 1 101 +char 1 0 +align 1 +LABELV $324 +char 1 103 +char 1 95 +char 1 114 +char 1 101 +char 1 100 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 0 +align 1 +LABELV $323 +char 1 103 +char 1 95 +char 1 115 +char 1 121 +char 1 110 +char 1 99 +char 1 104 +char 1 114 +char 1 111 +char 1 110 +char 1 111 +char 1 117 +char 1 115 +char 1 67 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $322 +char 1 99 +char 1 111 +char 1 109 +char 1 95 +char 1 98 +char 1 108 +char 1 111 +char 1 111 +char 1 100 +char 1 0 +align 1 +LABELV $321 +char 1 99 +char 1 108 +char 1 95 +char 1 112 +char 1 97 +char 1 117 +char 1 115 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $320 +char 1 99 +char 1 111 +char 1 109 +char 1 95 +char 1 98 +char 1 117 +char 1 105 +char 1 108 +char 1 100 +char 1 83 +char 1 99 +char 1 114 +char 1 105 +char 1 112 +char 1 116 +char 1 0 +align 1 +LABELV $319 +char 1 99 +char 1 103 +char 1 95 +char 1 110 +char 1 111 +char 1 86 +char 1 111 +char 1 105 +char 1 99 +char 1 101 +char 1 84 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $318 +char 1 99 +char 1 103 +char 1 95 +char 1 110 +char 1 111 +char 1 86 +char 1 111 +char 1 105 +char 1 99 +char 1 101 +char 1 67 +char 1 104 +char 1 97 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $317 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 67 +char 1 104 +char 1 97 +char 1 116 +char 1 115 +char 1 79 +char 1 110 +char 1 108 +char 1 121 +char 1 0 +align 1 +LABELV $316 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 70 +char 1 114 +char 1 105 +char 1 101 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $315 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 116 +char 1 97 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $314 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 108 +char 1 97 +char 1 121 +char 1 0 +align 1 +LABELV $313 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 84 +char 1 101 +char 1 97 +char 1 109 +char 1 79 +char 1 118 +char 1 101 +char 1 114 +char 1 108 +char 1 97 +char 1 121 +char 1 0 +align 1 +LABELV $312 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 114 +char 1 80 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 0 +align 1 +LABELV $311 +char 1 99 +char 1 103 +char 1 95 +char 1 112 +char 1 114 +char 1 101 +char 1 100 +char 1 105 +char 1 99 +char 1 116 +char 1 73 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 0 +align 1 +LABELV $310 +char 1 99 +char 1 103 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 77 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $309 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 67 +char 1 104 +char 1 97 +char 1 116 +char 1 72 +char 1 101 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $308 +char 1 51 +char 1 48 +char 1 48 +char 1 48 +char 1 0 +align 1 +LABELV $307 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 67 +char 1 104 +char 1 97 +char 1 116 +char 1 84 +char 1 105 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $306 +char 1 49 +char 1 46 +char 1 48 +char 1 0 +align 1 +LABELV $305 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 65 +char 1 108 +char 1 112 +char 1 104 +char 1 97 +char 1 0 +align 1 +LABELV $304 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 72 +char 1 111 +char 1 114 +char 1 122 +char 1 79 +char 1 102 +char 1 102 +char 1 115 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $303 +char 1 48 +char 1 46 +char 1 53 +char 1 0 +align 1 +LABELV $302 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 84 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 116 +char 1 68 +char 1 97 +char 1 109 +char 1 112 +char 1 0 +align 1 +LABELV $301 +char 1 48 +char 1 46 +char 1 51 +char 1 0 +align 1 +LABELV $300 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 67 +char 1 97 +char 1 109 +char 1 101 +char 1 114 +char 1 97 +char 1 68 +char 1 97 +char 1 109 +char 1 112 +char 1 0 +align 1 +LABELV $299 +char 1 49 +char 1 54 +char 1 0 +align 1 +LABELV $298 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 86 +char 1 101 +char 1 114 +char 1 116 +char 1 79 +char 1 102 +char 1 102 +char 1 115 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $297 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 80 +char 1 105 +char 1 116 +char 1 99 +char 1 104 +char 1 79 +char 1 102 +char 1 102 +char 1 115 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $296 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 65 +char 1 110 +char 1 103 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $295 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 82 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $294 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 80 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $293 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 105 +char 1 115 +char 1 109 +char 1 101 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $292 +char 1 99 +char 1 103 +char 1 95 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 66 +char 1 108 +char 1 101 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $291 +char 1 99 +char 1 103 +char 1 95 +char 1 97 +char 1 117 +char 1 114 +char 1 97 +char 1 83 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $290 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 112 +char 1 101 +char 1 101 +char 1 100 +char 1 84 +char 1 114 +char 1 97 +char 1 105 +char 1 108 +char 1 0 +align 1 +LABELV $289 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 117 +char 1 101 +char 1 108 +char 1 72 +char 1 101 +char 1 97 +char 1 100 +char 1 65 +char 1 110 +char 1 103 +char 1 108 +char 1 101 +char 1 115 +char 1 0 +align 1 +LABELV $288 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 84 +char 1 114 +char 1 97 +char 1 105 +char 1 108 +char 1 0 +align 1 +LABELV $287 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 67 +char 1 111 +char 1 110 +char 1 116 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $286 +char 1 54 +char 1 48 +char 1 48 +char 1 48 +char 1 48 +char 1 0 +align 1 +LABELV $285 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 68 +char 1 121 +char 1 110 +char 1 97 +char 1 109 +char 1 105 +char 1 99 +char 1 77 +char 1 97 +char 1 114 +char 1 107 +char 1 84 +char 1 105 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $284 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 68 +char 1 121 +char 1 110 +char 1 97 +char 1 109 +char 1 105 +char 1 99 +char 1 77 +char 1 97 +char 1 114 +char 1 107 +char 1 115 +char 1 0 +align 1 +LABELV $283 +char 1 99 +char 1 103 +char 1 95 +char 1 102 +char 1 112 +char 1 108 +char 1 115 +char 1 0 +align 1 +LABELV $282 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 77 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 84 +char 1 114 +char 1 97 +char 1 99 +char 1 101 +char 1 69 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $281 +char 1 99 +char 1 103 +char 1 95 +char 1 111 +char 1 108 +char 1 100 +char 1 80 +char 1 97 +char 1 105 +char 1 110 +char 1 83 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 115 +char 1 0 +align 1 +LABELV $280 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 119 +char 1 105 +char 1 110 +char 1 103 +char 1 65 +char 1 110 +char 1 103 +char 1 108 +char 1 101 +char 1 115 +char 1 0 +align 1 +LABELV $279 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 99 +char 1 101 +char 1 114 +char 1 108 +char 1 101 +char 1 110 +char 1 103 +char 1 116 +char 1 104 +char 1 0 +align 1 +LABELV $278 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 99 +char 1 101 +char 1 114 +char 1 119 +char 1 105 +char 1 100 +char 1 116 +char 1 104 +char 1 0 +align 1 +LABELV $277 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 99 +char 1 101 +char 1 114 +char 1 99 +char 1 104 +char 1 97 +char 1 110 +char 1 99 +char 1 101 +char 1 0 +align 1 +LABELV $276 +char 1 99 +char 1 103 +char 1 95 +char 1 102 +char 1 111 +char 1 111 +char 1 116 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 115 +char 1 0 +align 1 +LABELV $275 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 104 +char 1 111 +char 1 119 +char 1 109 +char 1 105 +char 1 115 +char 1 115 +char 1 0 +align 1 +LABELV $274 +char 1 99 +char 1 103 +char 1 95 +char 1 110 +char 1 111 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 115 +char 1 0 +align 1 +LABELV $273 +char 1 99 +char 1 103 +char 1 95 +char 1 110 +char 1 111 +char 1 112 +char 1 114 +char 1 101 +char 1 100 +char 1 105 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $272 +char 1 99 +char 1 103 +char 1 95 +char 1 101 +char 1 114 +char 1 114 +char 1 111 +char 1 114 +char 1 100 +char 1 101 +char 1 99 +char 1 97 +char 1 121 +char 1 0 +align 1 +LABELV $271 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 101 +char 1 98 +char 1 117 +char 1 103 +char 1 101 +char 1 118 +char 1 101 +char 1 110 +char 1 116 +char 1 115 +char 1 0 +align 1 +LABELV $270 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 101 +char 1 98 +char 1 117 +char 1 103 +char 1 112 +char 1 111 +char 1 115 +char 1 105 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $269 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 101 +char 1 98 +char 1 117 +char 1 103 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $268 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 101 +char 1 98 +char 1 117 +char 1 103 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 0 +align 1 +LABELV $267 +char 1 99 +char 1 103 +char 1 95 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 115 +char 1 112 +char 1 101 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $266 +char 1 99 +char 1 103 +char 1 95 +char 1 98 +char 1 111 +char 1 98 +char 1 114 +char 1 111 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $265 +char 1 99 +char 1 103 +char 1 95 +char 1 98 +char 1 111 +char 1 98 +char 1 112 +char 1 105 +char 1 116 +char 1 99 +char 1 104 +char 1 0 +align 1 +LABELV $264 +char 1 99 +char 1 103 +char 1 95 +char 1 98 +char 1 111 +char 1 98 +char 1 117 +char 1 112 +char 1 0 +align 1 +LABELV $263 +char 1 48 +char 1 46 +char 1 48 +char 1 48 +char 1 53 +char 1 0 +align 1 +LABELV $262 +char 1 99 +char 1 103 +char 1 95 +char 1 114 +char 1 117 +char 1 110 +char 1 114 +char 1 111 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $261 +char 1 48 +char 1 46 +char 1 48 +char 1 48 +char 1 50 +char 1 0 +align 1 +LABELV $260 +char 1 99 +char 1 103 +char 1 95 +char 1 114 +char 1 117 +char 1 110 +char 1 112 +char 1 105 +char 1 116 +char 1 99 +char 1 104 +char 1 0 +align 1 +LABELV $259 +char 1 51 +char 1 0 +align 1 +LABELV $258 +char 1 99 +char 1 103 +char 1 95 +char 1 99 +char 1 101 +char 1 110 +char 1 116 +char 1 101 +char 1 114 +char 1 116 +char 1 105 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $257 +char 1 99 +char 1 103 +char 1 95 +char 1 103 +char 1 117 +char 1 110 +char 1 90 +char 1 0 +align 1 +LABELV $256 +char 1 99 +char 1 103 +char 1 95 +char 1 103 +char 1 117 +char 1 110 +char 1 89 +char 1 0 +align 1 +LABELV $255 +char 1 99 +char 1 103 +char 1 95 +char 1 103 +char 1 117 +char 1 110 +char 1 88 +char 1 0 +align 1 +LABELV $254 +char 1 99 +char 1 103 +char 1 95 +char 1 108 +char 1 97 +char 1 103 +char 1 111 +char 1 109 +char 1 101 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $253 +char 1 99 +char 1 103 +char 1 95 +char 1 109 +char 1 97 +char 1 114 +char 1 107 +char 1 115 +char 1 0 +align 1 +LABELV $252 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 105 +char 1 109 +char 1 112 +char 1 108 +char 1 101 +char 1 73 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 0 +align 1 +LABELV $251 +char 1 99 +char 1 103 +char 1 95 +char 1 99 +char 1 114 +char 1 111 +char 1 115 +char 1 115 +char 1 104 +char 1 97 +char 1 105 +char 1 114 +char 1 89 +char 1 0 +align 1 +LABELV $250 +char 1 99 +char 1 103 +char 1 95 +char 1 99 +char 1 114 +char 1 111 +char 1 115 +char 1 115 +char 1 104 +char 1 97 +char 1 105 +char 1 114 +char 1 88 +char 1 0 +align 1 +LABELV $249 +char 1 99 +char 1 103 +char 1 95 +char 1 99 +char 1 114 +char 1 111 +char 1 115 +char 1 115 +char 1 104 +char 1 97 +char 1 105 +char 1 114 +char 1 72 +char 1 101 +char 1 97 +char 1 108 +char 1 116 +char 1 104 +char 1 0 +align 1 +LABELV $248 +char 1 50 +char 1 52 +char 1 0 +align 1 +LABELV $247 +char 1 99 +char 1 103 +char 1 95 +char 1 99 +char 1 114 +char 1 111 +char 1 115 +char 1 115 +char 1 104 +char 1 97 +char 1 105 +char 1 114 +char 1 83 +char 1 105 +char 1 122 +char 1 101 +char 1 0 +align 1 +LABELV $246 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 82 +char 1 101 +char 1 119 +char 1 97 +char 1 114 +char 1 100 +char 1 115 +char 1 0 +align 1 +LABELV $245 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 121 +char 1 110 +char 1 97 +char 1 109 +char 1 105 +char 1 99 +char 1 67 +char 1 114 +char 1 111 +char 1 115 +char 1 115 +char 1 104 +char 1 97 +char 1 105 +char 1 114 +char 1 0 +align 1 +LABELV $244 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 83 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 115 +char 1 0 +align 1 +LABELV $243 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 67 +char 1 114 +char 1 111 +char 1 115 +char 1 115 +char 1 104 +char 1 97 +char 1 105 +char 1 114 +char 1 78 +char 1 97 +char 1 109 +char 1 101 +char 1 115 +char 1 0 +align 1 +LABELV $242 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 67 +char 1 114 +char 1 111 +char 1 115 +char 1 115 +char 1 104 +char 1 97 +char 1 105 +char 1 114 +char 1 0 +align 1 +LABELV $241 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 69 +char 1 110 +char 1 101 +char 1 109 +char 1 121 +char 1 73 +char 1 110 +char 1 102 +char 1 111 +char 1 0 +align 1 +LABELV $240 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 65 +char 1 109 +char 1 109 +char 1 111 +char 1 87 +char 1 97 +char 1 114 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $239 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 73 +char 1 99 +char 1 111 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $238 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 51 +char 1 100 +char 1 73 +char 1 99 +char 1 111 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $237 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $236 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 70 +char 1 80 +char 1 83 +char 1 0 +align 1 +LABELV $235 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 84 +char 1 105 +char 1 109 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $234 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 83 +char 1 116 +char 1 97 +char 1 116 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $233 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 50 +char 1 68 +char 1 0 +align 1 +LABELV $232 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 111 +char 1 119 +char 1 115 +char 1 0 +align 1 +LABELV $231 +char 1 48 +char 1 46 +char 1 52 +char 1 0 +align 1 +LABELV $230 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 101 +char 1 111 +char 1 83 +char 1 101 +char 1 112 +char 1 97 +char 1 114 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $229 +char 1 49 +char 1 48 +char 1 48 +char 1 0 +align 1 +LABELV $228 +char 1 99 +char 1 103 +char 1 95 +char 1 118 +char 1 105 +char 1 101 +char 1 119 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 0 +align 1 +LABELV $227 +char 1 56 +char 1 48 +char 1 0 +align 1 +LABELV $226 +char 1 99 +char 1 103 +char 1 95 +char 1 102 +char 1 111 +char 1 118 +char 1 0 +align 1 +LABELV $225 +char 1 52 +char 1 48 +char 1 46 +char 1 48 +char 1 0 +align 1 +LABELV $224 +char 1 99 +char 1 103 +char 1 95 +char 1 122 +char 1 111 +char 1 111 +char 1 109 +char 1 102 +char 1 111 +char 1 118 +char 1 0 +align 1 +LABELV $223 +char 1 99 +char 1 103 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 71 +char 1 117 +char 1 110 +char 1 0 +align 1 +LABELV $222 +char 1 49 +char 1 0 +align 1 +LABELV $221 +char 1 99 +char 1 103 +char 1 95 +char 1 97 +char 1 117 +char 1 116 +char 1 111 +char 1 115 +char 1 119 +char 1 105 +char 1 116 +char 1 99 +char 1 104 +char 1 0 +align 1 +LABELV $220 +char 1 48 +char 1 0 +align 1 +LABELV $219 +char 1 99 +char 1 103 +char 1 95 +char 1 105 +char 1 103 +char 1 110 +char 1 111 +char 1 114 +char 1 101 +char 1 0 +align 1 +LABELV $191 +char 1 118 +char 1 109 +char 1 77 +char 1 97 +char 1 105 +char 1 110 +char 1 58 +char 1 32 +char 1 117 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 99 +char 1 111 +char 1 109 +char 1 109 +char 1 97 +char 1 110 +char 1 100 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $147 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 116 +char 1 104 +char 1 114 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $146 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $145 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 97 +char 1 116 +char 1 116 +char 1 97 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $144 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $143 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 107 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $142 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 107 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 111 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $141 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 108 +char 1 116 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 111 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $140 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 108 +char 1 116 +char 1 95 +char 1 97 +char 1 98 +char 1 115 +char 1 111 +char 1 114 +char 1 98 +char 1 0 +align 1 +LABELV $139 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 108 +char 1 116 +char 1 95 +char 1 112 +char 1 114 +char 1 111 +char 1 116 +char 1 101 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $138 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 107 +char 1 95 +char 1 114 +char 1 97 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $137 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 107 +char 1 95 +char 1 108 +char 1 49 +char 1 0 +align 1 +LABELV $136 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 100 +char 1 107 +char 1 95 +char 1 103 +char 1 114 +char 1 105 +char 1 112 +char 1 0 +align 1 +LABELV $135 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 108 +char 1 116 +char 1 95 +char 1 116 +char 1 101 +char 1 108 +char 1 101 +char 1 112 +char 1 97 +char 1 116 +char 1 104 +char 1 121 +char 1 0 +align 1 +LABELV $134 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 112 +char 1 117 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $133 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 112 +char 1 117 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $132 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 115 +char 1 112 +char 1 101 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $131 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 108 +char 1 101 +char 1 118 +char 1 105 +char 1 116 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $130 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 102 +char 1 95 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 108 +char 1 116 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 0 diff --git a/code/cgame/vm/cg_marks.asm b/code/cgame/vm/cg_marks.asm new file mode 100644 index 0000000..5c28875 --- /dev/null +++ b/code/cgame/vm/cg_marks.asm @@ -0,0 +1,19388 @@ +export CG_InitMarkPolys +code +proc CG_InitMarkPolys 12 12 +file "../cg_marks.c" +line 28 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_marks.c -- wall marks +;4: +;5:#include "cg_local.h" +;6: +;7:/* +;8:=================================================================== +;9: +;10:MARK POLYS +;11: +;12:=================================================================== +;13:*/ +;14: +;15: +;16:markPoly_t cg_activeMarkPolys; // double linked list +;17:markPoly_t *cg_freeMarkPolys; // single linked list +;18:markPoly_t cg_markPolys[MAX_MARK_POLYS]; +;19:static int markTotal; +;20: +;21:/* +;22:=================== +;23:CG_InitMarkPolys +;24: +;25:This is called at startup and for tournement restarts +;26:=================== +;27:*/ +;28:void CG_InitMarkPolys( void ) { +line 31 +;29: int i; +;30: +;31: memset( cg_markPolys, 0, sizeof(cg_markPolys) ); +ADDRGP4 cg_markPolys +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 73728 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 33 +;32: +;33: cg_activeMarkPolys.nextMark = &cg_activeMarkPolys; +ADDRGP4 cg_activeMarkPolys+4 +ADDRGP4 cg_activeMarkPolys +ASGNP4 +line 34 +;34: cg_activeMarkPolys.prevMark = &cg_activeMarkPolys; +ADDRLP4 4 +ADDRGP4 cg_activeMarkPolys +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 35 +;35: cg_freeMarkPolys = cg_markPolys; +ADDRGP4 cg_freeMarkPolys +ADDRGP4 cg_markPolys +ASGNP4 +line 36 +;36: for ( i = 0 ; i < MAX_MARK_POLYS - 1 ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $122 +line 37 +;37: cg_markPolys[i].nextMark = &cg_markPolys[i+1]; +ADDRLP4 8 +CNSTI4 288 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ADDRGP4 cg_markPolys+4 +ADDP4 +ADDRLP4 8 +INDIRI4 +ADDRGP4 cg_markPolys+288 +ADDP4 +ASGNP4 +line 38 +;38: } +LABELV $123 +line 36 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 255 +LTI4 $122 +line 39 +;39:} +LABELV $120 +endproc CG_InitMarkPolys 12 12 +export CG_FreeMarkPoly +proc CG_FreeMarkPoly 12 4 +line 47 +;40: +;41: +;42:/* +;43:================== +;44:CG_FreeMarkPoly +;45:================== +;46:*/ +;47:void CG_FreeMarkPoly( markPoly_t *le ) { +line 48 +;48: if ( !le->prevMark ) { +ADDRFP4 0 +INDIRP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $129 +line 49 +;49: CG_Error( "CG_FreeLocalEntity: not active" ); +ADDRGP4 $131 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 50 +;50: } +LABELV $129 +line 53 +;51: +;52: // remove from the doubly linked active list +;53: le->prevMark->nextMark = le->nextMark; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTI4 4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRP4 +ASGNP4 +line 54 +;54: le->nextMark->prevMark = le->prevMark; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRP4 +ASGNP4 +line 57 +;55: +;56: // the free list is only singly linked +;57: le->nextMark = cg_freeMarkPolys; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg_freeMarkPolys +INDIRP4 +ASGNP4 +line 58 +;58: cg_freeMarkPolys = le; +ADDRGP4 cg_freeMarkPolys +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 59 +;59:} +LABELV $128 +endproc CG_FreeMarkPoly 12 4 +export CG_AllocMark +proc CG_AllocMark 12 12 +line 68 +;60: +;61:/* +;62:=================== +;63:CG_AllocMark +;64: +;65:Will allways succeed, even if it requires freeing an old active mark +;66:=================== +;67:*/ +;68:markPoly_t *CG_AllocMark( void ) { +line 72 +;69: markPoly_t *le; +;70: int time; +;71: +;72: if ( !cg_freeMarkPolys ) { +ADDRGP4 cg_freeMarkPolys +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $133 +line 75 +;73: // no free entities, so free the one at the end of the chain +;74: // remove the oldest active entity +;75: time = cg_activeMarkPolys.prevMark->time; +ADDRLP4 4 +ADDRGP4 cg_activeMarkPolys +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +ADDRGP4 $136 +JUMPV +LABELV $135 +line 76 +;76: while (cg_activeMarkPolys.prevMark && time == cg_activeMarkPolys.prevMark->time) { +line 77 +;77: CG_FreeMarkPoly( cg_activeMarkPolys.prevMark ); +ADDRGP4 cg_activeMarkPolys +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeMarkPoly +CALLV +pop +line 78 +;78: } +LABELV $136 +line 76 +ADDRLP4 8 +ADDRGP4 cg_activeMarkPolys +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $138 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +EQI4 $135 +LABELV $138 +line 79 +;79: } +LABELV $133 +line 81 +;80: +;81: le = cg_freeMarkPolys; +ADDRLP4 0 +ADDRGP4 cg_freeMarkPolys +INDIRP4 +ASGNP4 +line 82 +;82: cg_freeMarkPolys = cg_freeMarkPolys->nextMark; +ADDRLP4 8 +ADDRGP4 cg_freeMarkPolys +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ASGNP4 +line 84 +;83: +;84: memset( le, 0, sizeof( *le ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 288 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 87 +;85: +;86: // link into the active list +;87: le->nextMark = cg_activeMarkPolys.nextMark; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg_activeMarkPolys+4 +INDIRP4 +ASGNP4 +line 88 +;88: le->prevMark = &cg_activeMarkPolys; +ADDRLP4 0 +INDIRP4 +ADDRGP4 cg_activeMarkPolys +ASGNP4 +line 89 +;89: cg_activeMarkPolys.nextMark->prevMark = le; +ADDRGP4 cg_activeMarkPolys+4 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 90 +;90: cg_activeMarkPolys.nextMark = le; +ADDRGP4 cg_activeMarkPolys+4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 91 +;91: return le; +ADDRLP4 0 +INDIRP4 +RETP4 +LABELV $132 +endproc CG_AllocMark 12 12 +export CG_ImpactMark +proc CG_ImpactMark 6088 28 +line 112 +;92:} +;93: +;94: +;95: +;96:/* +;97:================= +;98:CG_ImpactMark +;99: +;100:origin should be a point within a unit of the plane +;101:dir should be the plane normal +;102: +;103:temporary marks will not be stored or randomly oriented, but immediately +;104:passed to the renderer. +;105:================= +;106:*/ +;107:#define MAX_MARK_FRAGMENTS 128 +;108:#define MAX_MARK_POINTS 384 +;109: +;110:void CG_ImpactMark( qhandle_t markShader, const vec3_t origin, const vec3_t dir, +;111: float orientation, float red, float green, float blue, float alpha, +;112: qboolean alphaFade, float radius, qboolean temporary ) { +line 123 +;113: vec3_t axis[3]; +;114: float texCoordScale; +;115: vec3_t originalPoints[4]; +;116: byte colors[4]; +;117: int i, j; +;118: int numFragments; +;119: markFragment_t markFragments[MAX_MARK_FRAGMENTS], *mf; +;120: vec3_t markPoints[MAX_MARK_POINTS]; +;121: vec3_t projection; +;122: +;123: if ( !cg_addMarks.integer ) { +ADDRGP4 cg_addMarks+12 +INDIRI4 +CNSTI4 0 +NEI4 $143 +line 124 +;124: return; +ADDRGP4 $142 +JUMPV +LABELV $143 +line 127 +;125: } +;126: +;127: if ( radius <= 0 ) { +ADDRFP4 36 +INDIRF4 +CNSTF4 0 +GTF4 $146 +line 128 +;128: CG_Error( "CG_ImpactMark called with <= 0 radius" ); +ADDRGP4 $148 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 129 +;129: } +LABELV $146 +line 136 +;130: +;131: //if ( markTotal >= MAX_MARK_POLYS ) { +;132: // return; +;133: //} +;134: +;135: // create the texture axis +;136: VectorNormalize2( dir, axis[0] ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 VectorNormalize2 +CALLF4 +pop +line 137 +;137: PerpendicularVector( axis[1], axis[0] ); +ADDRLP4 0+12 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 PerpendicularVector +CALLV +pop +line 138 +;138: RotatePointAroundVector( axis[2], axis[0], axis[1], orientation ); +ADDRLP4 0+24 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRGP4 RotatePointAroundVector +CALLV +pop +line 139 +;139: CrossProduct( axis[0], axis[2], axis[1] ); +ADDRLP4 0 +ARGP4 +ADDRLP4 0+24 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 141 +;140: +;141: texCoordScale = 0.5 * 1.0 / radius; +ADDRLP4 48 +CNSTF4 1056964608 +ADDRFP4 36 +INDIRF4 +DIVF4 +ASGNF4 +line 144 +;142: +;143: // create the full polygon +;144: for ( i = 0 ; i < 3 ; i++ ) { +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +LABELV $154 +line 145 +;145: originalPoints[0][i] = origin[i] - radius * axis[1][i] - radius * axis[2][i]; +ADDRLP4 5752 +ADDRLP4 44 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 5756 +ADDRFP4 36 +INDIRF4 +ASGNF4 +ADDRLP4 5752 +INDIRI4 +ADDRLP4 4664 +ADDP4 +ADDRLP4 5752 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 5756 +INDIRF4 +ADDRLP4 5752 +INDIRI4 +ADDRLP4 0+12 +ADDP4 +INDIRF4 +MULF4 +SUBF4 +ADDRLP4 5756 +INDIRF4 +ADDRLP4 5752 +INDIRI4 +ADDRLP4 0+24 +ADDP4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 146 +;146: originalPoints[1][i] = origin[i] + radius * axis[1][i] - radius * axis[2][i]; +ADDRLP4 5760 +ADDRLP4 44 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 5764 +ADDRFP4 36 +INDIRF4 +ASGNF4 +ADDRLP4 5760 +INDIRI4 +ADDRLP4 4664+12 +ADDP4 +ADDRLP4 5760 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 5764 +INDIRF4 +ADDRLP4 5760 +INDIRI4 +ADDRLP4 0+12 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 5764 +INDIRF4 +ADDRLP4 5760 +INDIRI4 +ADDRLP4 0+24 +ADDP4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 147 +;147: originalPoints[2][i] = origin[i] + radius * axis[1][i] + radius * axis[2][i]; +ADDRLP4 5768 +ADDRLP4 44 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 5772 +ADDRFP4 36 +INDIRF4 +ASGNF4 +ADDRLP4 5768 +INDIRI4 +ADDRLP4 4664+24 +ADDP4 +ADDRLP4 5768 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 5772 +INDIRF4 +ADDRLP4 5768 +INDIRI4 +ADDRLP4 0+12 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 5772 +INDIRF4 +ADDRLP4 5768 +INDIRI4 +ADDRLP4 0+24 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 148 +;148: originalPoints[3][i] = origin[i] - radius * axis[1][i] + radius * axis[2][i]; +ADDRLP4 5776 +ADDRLP4 44 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 5780 +ADDRFP4 36 +INDIRF4 +ASGNF4 +ADDRLP4 5776 +INDIRI4 +ADDRLP4 4664+36 +ADDP4 +ADDRLP4 5776 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 5780 +INDIRF4 +ADDRLP4 5776 +INDIRI4 +ADDRLP4 0+12 +ADDP4 +INDIRF4 +MULF4 +SUBF4 +ADDRLP4 5780 +INDIRF4 +ADDRLP4 5776 +INDIRI4 +ADDRLP4 0+24 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 149 +;149: } +LABELV $155 +line 144 +ADDRLP4 44 +ADDRLP4 44 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 3 +LTI4 $154 +line 152 +;150: +;151: // get the fragments +;152: VectorScale( dir, -20, projection ); +ADDRLP4 5752 +CNSTF4 3248488448 +ASGNF4 +ADDRLP4 5756 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 4716 +ADDRLP4 5752 +INDIRF4 +ADDRLP4 5756 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 4716+4 +ADDRLP4 5752 +INDIRF4 +ADDRLP4 5756 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 4716+8 +CNSTF4 3248488448 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 153 +;153: numFragments = trap_CM_MarkFragments( 4, (void *)originalPoints, +CNSTI4 4 +ARGI4 +ADDRLP4 4664 +ARGP4 +ADDRLP4 4716 +ARGP4 +CNSTI4 384 +ARGI4 +ADDRLP4 56 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRLP4 4728 +ARGP4 +ADDRLP4 5760 +ADDRGP4 trap_CM_MarkFragments +CALLI4 +ASGNI4 +ADDRLP4 4712 +ADDRLP4 5760 +INDIRI4 +ASGNI4 +line 157 +;154: projection, MAX_MARK_POINTS, markPoints[0], +;155: MAX_MARK_FRAGMENTS, markFragments ); +;156: +;157: colors[0] = red * 255; +ADDRLP4 5768 +CNSTF4 1132396544 +ADDRFP4 16 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 5772 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 5768 +INDIRF4 +ADDRLP4 5772 +INDIRF4 +LTF4 $172 +ADDRLP4 5764 +ADDRLP4 5768 +INDIRF4 +ADDRLP4 5772 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $173 +JUMPV +LABELV $172 +ADDRLP4 5764 +ADDRLP4 5768 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $173 +ADDRLP4 52 +ADDRLP4 5764 +INDIRU4 +CVUU1 4 +ASGNU1 +line 158 +;158: colors[1] = green * 255; +ADDRLP4 5780 +CNSTF4 1132396544 +ADDRFP4 20 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 5784 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 5780 +INDIRF4 +ADDRLP4 5784 +INDIRF4 +LTF4 $176 +ADDRLP4 5776 +ADDRLP4 5780 +INDIRF4 +ADDRLP4 5784 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $177 +JUMPV +LABELV $176 +ADDRLP4 5776 +ADDRLP4 5780 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $177 +ADDRLP4 52+1 +ADDRLP4 5776 +INDIRU4 +CVUU1 4 +ASGNU1 +line 159 +;159: colors[2] = blue * 255; +ADDRLP4 5792 +CNSTF4 1132396544 +ADDRFP4 24 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 5796 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 5792 +INDIRF4 +ADDRLP4 5796 +INDIRF4 +LTF4 $180 +ADDRLP4 5788 +ADDRLP4 5792 +INDIRF4 +ADDRLP4 5796 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $181 +JUMPV +LABELV $180 +ADDRLP4 5788 +ADDRLP4 5792 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $181 +ADDRLP4 52+2 +ADDRLP4 5788 +INDIRU4 +CVUU1 4 +ASGNU1 +line 160 +;160: colors[3] = alpha * 255; +ADDRLP4 5804 +CNSTF4 1132396544 +ADDRFP4 28 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 5808 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 5804 +INDIRF4 +ADDRLP4 5808 +INDIRF4 +LTF4 $184 +ADDRLP4 5800 +ADDRLP4 5804 +INDIRF4 +ADDRLP4 5808 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $185 +JUMPV +LABELV $184 +ADDRLP4 5800 +ADDRLP4 5804 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $185 +ADDRLP4 52+3 +ADDRLP4 5800 +INDIRU4 +CVUU1 4 +ASGNU1 +line 162 +;161: +;162: for ( i = 0, mf = markFragments ; i < numFragments ; i++, mf++ ) { +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +ADDRLP4 40 +ADDRLP4 4728 +ASGNP4 +ADDRGP4 $189 +JUMPV +LABELV $186 +line 169 +;163: polyVert_t *v; +;164: polyVert_t verts[MAX_VERTS_ON_POLY]; +;165: markPoly_t *mark; +;166: +;167: // we have an upper limit on the complexity of polygons +;168: // that we store persistantly +;169: if ( mf->numPoints > MAX_VERTS_ON_POLY ) { +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 10 +LEI4 $190 +line 170 +;170: mf->numPoints = MAX_VERTS_ON_POLY; +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 10 +ASGNI4 +line 171 +;171: } +LABELV $190 +line 172 +;172: for ( j = 0, v = verts ; j < mf->numPoints ; j++, v++ ) { +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRLP4 5812 +ADDRLP4 5820 +ASGNP4 +ADDRGP4 $195 +JUMPV +LABELV $192 +line 175 +;173: vec3_t delta; +;174: +;175: VectorCopy( markPoints[mf->firstPoint + j], v->xyz ); +ADDRLP4 5812 +INDIRP4 +CNSTI4 12 +ADDRLP4 40 +INDIRP4 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDI4 +MULI4 +ADDRLP4 56 +ADDP4 +INDIRB +ASGNB 12 +line 177 +;176: +;177: VectorSubtract( v->xyz, origin, delta ); +ADDRLP4 6076 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 6060 +ADDRLP4 5812 +INDIRP4 +INDIRF4 +ADDRLP4 6076 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 6080 +CNSTI4 4 +ASGNI4 +ADDRLP4 6060+4 +ADDRLP4 5812 +INDIRP4 +ADDRLP4 6080 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 6076 +INDIRP4 +ADDRLP4 6080 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 6084 +CNSTI4 8 +ASGNI4 +ADDRLP4 6060+8 +ADDRLP4 5812 +INDIRP4 +ADDRLP4 6084 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 6084 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 178 +;178: v->st[0] = 0.5 + DotProduct( delta, axis[1] ) * texCoordScale; +ADDRLP4 5812 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 6060 +INDIRF4 +ADDRLP4 0+12 +INDIRF4 +MULF4 +ADDRLP4 6060+4 +INDIRF4 +ADDRLP4 0+12+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 6060+8 +INDIRF4 +ADDRLP4 0+12+8 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 48 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ASGNF4 +line 179 +;179: v->st[1] = 0.5 + DotProduct( delta, axis[2] ) * texCoordScale; +ADDRLP4 5812 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 6060 +INDIRF4 +ADDRLP4 0+24 +INDIRF4 +MULF4 +ADDRLP4 6060+4 +INDIRF4 +ADDRLP4 0+24+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 6060+8 +INDIRF4 +ADDRLP4 0+24+8 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 48 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ASGNF4 +line 180 +;180: *(int *)v->modulate = *(int *)colors; +ADDRLP4 5812 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 181 +;181: } +LABELV $193 +line 172 +ADDRLP4 36 +ADDRLP4 36 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 5812 +ADDRLP4 5812 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +LABELV $195 +ADDRLP4 36 +INDIRI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LTI4 $192 +line 184 +;182: +;183: // if it is a temporary (shadow) mark, add it immediately and forget about it +;184: if ( temporary ) { +ADDRFP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $212 +line 185 +;185: trap_R_AddPolyToScene( markShader, mf->numPoints, verts ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 5820 +ARGP4 +ADDRGP4 trap_R_AddPolyToScene +CALLV +pop +line 186 +;186: continue; +ADDRGP4 $187 +JUMPV +LABELV $212 +line 190 +;187: } +;188: +;189: // otherwise save it persistantly +;190: mark = CG_AllocMark(); +ADDRLP4 6060 +ADDRGP4 CG_AllocMark +CALLP4 +ASGNP4 +ADDRLP4 5816 +ADDRLP4 6060 +INDIRP4 +ASGNP4 +line 191 +;191: mark->time = cg.time; +ADDRLP4 5816 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 192 +;192: mark->alphaFade = alphaFade; +ADDRLP4 5816 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRFP4 32 +INDIRI4 +ASGNI4 +line 193 +;193: mark->markShader = markShader; +ADDRLP4 5816 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 194 +;194: mark->poly.numVerts = mf->numPoints; +ADDRLP4 5816 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 195 +;195: mark->color[0] = red; +ADDRLP4 5816 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRFP4 16 +INDIRF4 +ASGNF4 +line 196 +;196: mark->color[1] = green; +ADDRLP4 5816 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRFP4 20 +INDIRF4 +ASGNF4 +line 197 +;197: mark->color[2] = blue; +ADDRLP4 5816 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRFP4 24 +INDIRF4 +ASGNF4 +line 198 +;198: mark->color[3] = alpha; +ADDRLP4 5816 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRFP4 28 +INDIRF4 +ASGNF4 +line 199 +;199: memcpy( mark->verts, verts, mf->numPoints * sizeof( verts[0] ) ); +ADDRLP4 5816 +INDIRP4 +CNSTI4 48 +ADDP4 +ARGP4 +ADDRLP4 5820 +ARGP4 +CNSTU4 24 +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CVIU4 4 +MULU4 +CVUI4 4 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 200 +;200: markTotal++; +ADDRLP4 6064 +ADDRGP4 markTotal +ASGNP4 +ADDRLP4 6064 +INDIRP4 +ADDRLP4 6064 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 201 +;201: } +LABELV $187 +line 162 +ADDRLP4 44 +ADDRLP4 44 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 40 +ADDRLP4 40 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +LABELV $189 +ADDRLP4 44 +INDIRI4 +ADDRLP4 4712 +INDIRI4 +LTI4 $186 +line 202 +;202:} +LABELV $142 +endproc CG_ImpactMark 6088 28 +export CG_AddMarks +proc CG_AddMarks 80 12 +line 213 +;203: +;204: +;205:/* +;206:=============== +;207:CG_AddMarks +;208:=============== +;209:*/ +;210:#define MARK_TOTAL_TIME 10000 +;211:#define MARK_FADE_TIME 1000 +;212: +;213:void CG_AddMarks( void ) { +line 219 +;214: int j; +;215: markPoly_t *mp, *next; +;216: int t; +;217: int fade; +;218: +;219: if ( !cg_addMarks.integer ) { +ADDRGP4 cg_addMarks+12 +INDIRI4 +CNSTI4 0 +NEI4 $216 +line 220 +;220: return; +ADDRGP4 $215 +JUMPV +LABELV $216 +line 223 +;221: } +;222: +;223: mp = cg_activeMarkPolys.nextMark; +ADDRLP4 0 +ADDRGP4 cg_activeMarkPolys+4 +INDIRP4 +ASGNP4 +line 224 +;224: for ( ; mp != &cg_activeMarkPolys ; mp = next ) { +ADDRGP4 $223 +JUMPV +LABELV $220 +line 227 +;225: // grab next now, so if the local entity is freed we +;226: // still have it +;227: next = mp->nextMark; +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ASGNP4 +line 230 +;228: +;229: // see if it is time to completely remove it +;230: if ( cg.time > mp->time + MARK_TOTAL_TIME ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 10000 +ADDI4 +LEI4 $224 +line 231 +;231: CG_FreeMarkPoly( mp ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_FreeMarkPoly +CALLV +pop +line 232 +;232: continue; +ADDRGP4 $221 +JUMPV +LABELV $224 +line 236 +;233: } +;234: +;235: // fade out the energy bursts +;236: if ( mp->markShader == cgs.media.energyMarkShader ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRGP4 cgs+70296+432 +INDIRI4 +NEI4 $227 +line 238 +;237: +;238: fade = 450 - 450 * ( (cg.time - mp->time ) / 3000.0 ); +ADDRLP4 20 +CNSTF4 1138819072 +ASGNF4 +ADDRLP4 8 +ADDRLP4 20 +INDIRF4 +ADDRLP4 20 +INDIRF4 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +CNSTF4 1161527296 +DIVF4 +MULF4 +SUBF4 +CVFI4 4 +ASGNI4 +line 239 +;239: if ( fade < 255 ) { +ADDRLP4 8 +INDIRI4 +CNSTI4 255 +GEI4 $232 +line 240 +;240: if ( fade < 0 ) { +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +GEI4 $234 +line 241 +;241: fade = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 242 +;242: } +LABELV $234 +line 243 +;243: if ( mp->verts[0].modulate[0] != 0 ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRU1 +CVUI4 1 +CNSTI4 0 +EQI4 $236 +line 244 +;244: for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $241 +JUMPV +LABELV $238 +line 245 +;245: mp->verts[j].modulate[0] = mp->color[0] * fade; +ADDRLP4 32 +CNSTI4 20 +ASGNI4 +ADDRLP4 36 +ADDRLP4 0 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +ADDRLP4 40 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 36 +INDIRF4 +ADDRLP4 40 +INDIRF4 +LTF4 $243 +ADDRLP4 24 +ADDRLP4 36 +INDIRF4 +ADDRLP4 40 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $244 +JUMPV +LABELV $243 +ADDRLP4 24 +ADDRLP4 36 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $244 +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +ADDRLP4 24 +INDIRU4 +CVUU1 4 +ASGNU1 +line 246 +;246: mp->verts[j].modulate[1] = mp->color[1] * fade; +ADDRLP4 52 +CNSTI4 24 +ASGNI4 +ADDRLP4 56 +ADDRLP4 0 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +ADDRLP4 60 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ADDRLP4 60 +INDIRF4 +LTF4 $246 +ADDRLP4 44 +ADDRLP4 56 +INDIRF4 +ADDRLP4 60 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $247 +JUMPV +LABELV $246 +ADDRLP4 44 +ADDRLP4 56 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $247 +ADDRLP4 52 +INDIRI4 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDP4 +CNSTI4 21 +ADDP4 +ADDRLP4 44 +INDIRU4 +CVUU1 4 +ASGNU1 +line 247 +;247: mp->verts[j].modulate[2] = mp->color[2] * fade; +ADDRLP4 72 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +ADDRLP4 76 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 72 +INDIRF4 +ADDRLP4 76 +INDIRF4 +LTF4 $249 +ADDRLP4 64 +ADDRLP4 72 +INDIRF4 +ADDRLP4 76 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $250 +JUMPV +LABELV $249 +ADDRLP4 64 +ADDRLP4 72 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $250 +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDP4 +CNSTI4 22 +ADDP4 +ADDRLP4 64 +INDIRU4 +CVUU1 4 +ASGNU1 +line 248 +;248: } +LABELV $239 +line 244 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $241 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +LTI4 $238 +line 249 +;249: } +LABELV $236 +line 250 +;250: } +LABELV $232 +line 251 +;251: } +LABELV $227 +line 254 +;252: +;253: // fade all marks out with time +;254: t = mp->time + MARK_TOTAL_TIME - cg.time; +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 10000 +ADDI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +ASGNI4 +line 255 +;255: if ( t < MARK_FADE_TIME ) { +ADDRLP4 12 +INDIRI4 +CNSTI4 1000 +GEI4 $252 +line 256 +;256: fade = 255 * t / MARK_FADE_TIME; +ADDRLP4 8 +CNSTI4 255 +ADDRLP4 12 +INDIRI4 +MULI4 +CNSTI4 1000 +DIVI4 +ASGNI4 +line 257 +;257: if ( mp->alphaFade ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $254 +line 258 +;258: for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $259 +JUMPV +LABELV $256 +line 259 +;259: mp->verts[j].modulate[3] = fade; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDP4 +CNSTI4 23 +ADDP4 +ADDRLP4 8 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 260 +;260: } +LABELV $257 +line 258 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $259 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +LTI4 $256 +line 261 +;261: } +ADDRGP4 $253 +JUMPV +LABELV $254 +line 263 +;262: else +;263: { +line 264 +;264: float f = (float)t / MARK_FADE_TIME; +ADDRLP4 20 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +CNSTF4 1148846080 +DIVF4 +ASGNF4 +line 265 +;265: for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $263 +JUMPV +LABELV $260 +line 266 +;266: mp->verts[j].modulate[0] = mp->color[0] * f; +ADDRLP4 32 +CNSTI4 20 +ASGNI4 +ADDRLP4 36 +ADDRLP4 0 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 40 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 36 +INDIRF4 +ADDRLP4 40 +INDIRF4 +LTF4 $265 +ADDRLP4 24 +ADDRLP4 36 +INDIRF4 +ADDRLP4 40 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $266 +JUMPV +LABELV $265 +ADDRLP4 24 +ADDRLP4 36 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $266 +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +ADDRLP4 24 +INDIRU4 +CVUU1 4 +ASGNU1 +line 267 +;267: mp->verts[j].modulate[1] = mp->color[1] * f; +ADDRLP4 52 +CNSTI4 24 +ASGNI4 +ADDRLP4 56 +ADDRLP4 0 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 60 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ADDRLP4 60 +INDIRF4 +LTF4 $268 +ADDRLP4 44 +ADDRLP4 56 +INDIRF4 +ADDRLP4 60 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $269 +JUMPV +LABELV $268 +ADDRLP4 44 +ADDRLP4 56 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $269 +ADDRLP4 52 +INDIRI4 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDP4 +CNSTI4 21 +ADDP4 +ADDRLP4 44 +INDIRU4 +CVUU1 4 +ASGNU1 +line 268 +;268: mp->verts[j].modulate[2] = mp->color[2] * f; +ADDRLP4 72 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 76 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 72 +INDIRF4 +ADDRLP4 76 +INDIRF4 +LTF4 $271 +ADDRLP4 64 +ADDRLP4 72 +INDIRF4 +ADDRLP4 76 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $272 +JUMPV +LABELV $271 +ADDRLP4 64 +ADDRLP4 72 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $272 +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDP4 +CNSTI4 22 +ADDP4 +ADDRLP4 64 +INDIRU4 +CVUU1 4 +ASGNU1 +line 269 +;269: } +LABELV $261 +line 265 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $263 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +LTI4 $260 +line 270 +;270: } +line 271 +;271: } +ADDRGP4 $253 +JUMPV +LABELV $252 +line 273 +;272: else +;273: { +line 274 +;274: for ( j = 0 ; j < mp->poly.numVerts ; j++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $276 +JUMPV +LABELV $273 +line 275 +;275: mp->verts[j].modulate[0] = mp->color[0]; +ADDRLP4 28 +CNSTI4 20 +ASGNI4 +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 36 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LTF4 $278 +ADDRLP4 20 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $279 +JUMPV +LABELV $278 +ADDRLP4 20 +ADDRLP4 32 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $279 +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +ADDRLP4 20 +INDIRU4 +CVUU1 4 +ASGNU1 +line 276 +;276: mp->verts[j].modulate[1] = mp->color[1]; +ADDRLP4 48 +CNSTI4 24 +ASGNI4 +ADDRLP4 52 +ADDRLP4 0 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 56 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 52 +INDIRF4 +ADDRLP4 56 +INDIRF4 +LTF4 $281 +ADDRLP4 40 +ADDRLP4 52 +INDIRF4 +ADDRLP4 56 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $282 +JUMPV +LABELV $281 +ADDRLP4 40 +ADDRLP4 52 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $282 +ADDRLP4 48 +INDIRI4 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDP4 +CNSTI4 21 +ADDP4 +ADDRLP4 40 +INDIRU4 +CVUU1 4 +ASGNU1 +line 277 +;277: mp->verts[j].modulate[2] = mp->color[2]; +ADDRLP4 68 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 72 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 68 +INDIRF4 +ADDRLP4 72 +INDIRF4 +LTF4 $284 +ADDRLP4 60 +ADDRLP4 68 +INDIRF4 +ADDRLP4 72 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $285 +JUMPV +LABELV $284 +ADDRLP4 60 +ADDRLP4 68 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $285 +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDP4 +CNSTI4 22 +ADDP4 +ADDRLP4 60 +INDIRU4 +CVUU1 4 +ASGNU1 +line 278 +;278: } +LABELV $274 +line 274 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $276 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +LTI4 $273 +line 279 +;279: } +LABELV $253 +line 281 +;280: +;281: trap_R_AddPolyToScene( mp->markShader, mp->poly.numVerts, mp->verts ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ARGP4 +ADDRGP4 trap_R_AddPolyToScene +CALLV +pop +line 282 +;282: } +LABELV $221 +line 224 +ADDRLP4 0 +ADDRLP4 16 +INDIRP4 +ASGNP4 +LABELV $223 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRGP4 cg_activeMarkPolys +CVPU4 4 +NEU4 $220 +line 283 +;283:} +LABELV $215 +endproc CG_AddMarks 80 12 +data +align 4 +LABELV shaderAnimNames +address $287 +byte 4 0 +skip 120 +align 4 +LABELV shaderAnimCounts +byte 4 23 +skip 124 +align 4 +LABELV shaderAnimSTRatio +byte 4 1065353216 +skip 124 +export cl_numparticles +align 4 +LABELV cl_numparticles +byte 4 1024 +export initparticles +align 4 +LABELV initparticles +byte 4 0 +export CG_ClearParticles +code +proc CG_ClearParticles 28 12 +line 387 +;284: +;285:// cg_particles.c +;286: +;287:#define BLOODRED 2 +;288:#define EMISIVEFADE 3 +;289:#define GREY75 4 +;290: +;291:typedef struct particle_s +;292:{ +;293: struct particle_s *next; +;294: +;295: float time; +;296: float endtime; +;297: +;298: vec3_t org; +;299: vec3_t vel; +;300: vec3_t accel; +;301: int color; +;302: float colorvel; +;303: float alpha; +;304: float alphavel; +;305: int type; +;306: qhandle_t pshader; +;307: +;308: float height; +;309: float width; +;310: +;311: float endheight; +;312: float endwidth; +;313: +;314: float start; +;315: float end; +;316: +;317: float startfade; +;318: qboolean rotate; +;319: int snum; +;320: +;321: qboolean link; +;322: +;323: // Ridah +;324: int shaderAnim; +;325: int roll; +;326: +;327: int accumroll; +;328: +;329:} cparticle_t; +;330: +;331:typedef enum +;332:{ +;333: P_NONE, +;334: P_WEATHER, +;335: P_FLAT, +;336: P_SMOKE, +;337: P_ROTATE, +;338: P_WEATHER_TURBULENT, +;339: P_ANIM, // Ridah +;340: P_BAT, +;341: P_BLEED, +;342: P_FLAT_SCALEUP, +;343: P_FLAT_SCALEUP_FADE, +;344: P_WEATHER_FLURRY, +;345: P_SMOKE_IMPACT, +;346: P_BUBBLE, +;347: P_BUBBLE_TURBULENT, +;348: P_SPRITE +;349:} particle_type_t; +;350: +;351:#define MAX_SHADER_ANIMS 32 +;352:#define MAX_SHADER_ANIM_FRAMES 64 +;353: +;354:static char *shaderAnimNames[MAX_SHADER_ANIMS] = { +;355: "explode1", +;356: NULL +;357:}; +;358:static qhandle_t shaderAnims[MAX_SHADER_ANIMS][MAX_SHADER_ANIM_FRAMES]; +;359:static int shaderAnimCounts[MAX_SHADER_ANIMS] = { +;360: 23 +;361:}; +;362:static float shaderAnimSTRatio[MAX_SHADER_ANIMS] = { +;363: 1.0f +;364:}; +;365:static int numShaderAnims; +;366:// done. +;367: +;368:#define PARTICLE_GRAVITY 40 +;369:#define MAX_PARTICLES 1024 +;370: +;371:cparticle_t *active_particles, *free_particles; +;372:cparticle_t particles[MAX_PARTICLES]; +;373:int cl_numparticles = MAX_PARTICLES; +;374: +;375:qboolean initparticles = qfalse; +;376:vec3_t pvforward, pvright, pvup; +;377:vec3_t rforward, rright, rup; +;378: +;379:float oldtime; +;380: +;381:/* +;382:=============== +;383:CL_ClearParticles +;384:=============== +;385:*/ +;386:void CG_ClearParticles (void) +;387:{ +line 390 +;388: int i; +;389: +;390: memset( particles, 0, sizeof(particles) ); +ADDRGP4 particles +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 126976 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 392 +;391: +;392: free_particles = &particles[0]; +ADDRGP4 free_particles +ADDRGP4 particles +ASGNP4 +line 393 +;393: active_particles = NULL; +ADDRGP4 active_particles +CNSTP4 0 +ASGNP4 +line 395 +;394: +;395: for (i=0 ;itype == P_WEATHER || p->type == P_WEATHER_TURBULENT || p->type == P_WEATHER_FLURRY +ADDRLP4 240 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 240 +INDIRI4 +CNSTI4 1 +EQI4 $312 +ADDRLP4 240 +INDIRI4 +CNSTI4 5 +EQI4 $312 +ADDRLP4 240 +INDIRI4 +CNSTI4 11 +EQI4 $312 +ADDRLP4 240 +INDIRI4 +CNSTI4 13 +EQI4 $312 +ADDRLP4 240 +INDIRI4 +CNSTI4 14 +NEI4 $307 +LABELV $312 +line 440 +;439: || p->type == P_BUBBLE || p->type == P_BUBBLE_TURBULENT) +;440: {// create a front facing polygon +line 442 +;441: +;442: if (p->type != P_WEATHER_FLURRY) +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 11 +EQI4 $313 +line 443 +;443: { +line 444 +;444: if (p->type == P_BUBBLE || p->type == P_BUBBLE_TURBULENT) +ADDRLP4 244 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 244 +INDIRI4 +CNSTI4 13 +EQI4 $317 +ADDRLP4 244 +INDIRI4 +CNSTI4 14 +NEI4 $315 +LABELV $317 +line 445 +;445: { +line 446 +;446: if (org[2] > p->end) +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRF4 +LEF4 $316 +line 447 +;447: { +line 448 +;448: p->time = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 449 +;449: VectorCopy (org, p->org); // Ridah, fixes rare snow flakes that flicker on the ground +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 451 +;450: +;451: p->org[2] = ( p->start + crandom () * 4 ); +ADDRLP4 248 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 252 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 252 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 252 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRF4 +CNSTF4 1082130432 +CNSTF4 1073741824 +ADDRLP4 248 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 454 +;452: +;453: +;454: if (p->type == P_BUBBLE_TURBULENT) +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $316 +line 455 +;455: { +line 456 +;456: p->vel[0] = crandom() * 4; +ADDRLP4 256 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 1082130432 +CNSTF4 1073741824 +ADDRLP4 256 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 457 +;457: p->vel[1] = crandom() * 4; +ADDRLP4 260 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 1082130432 +CNSTF4 1073741824 +ADDRLP4 260 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 458 +;458: } +line 460 +;459: +;460: } +line 461 +;461: } +ADDRGP4 $316 +JUMPV +LABELV $315 +line 463 +;462: else +;463: { +line 464 +;464: if (org[2] < p->end) +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRF4 +GEF4 $323 +line 465 +;465: { +line 466 +;466: p->time = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 467 +;467: VectorCopy (org, p->org); // Ridah, fixes rare snow flakes that flicker on the ground +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +ADDRGP4 $327 +JUMPV +LABELV $326 +line 470 +;468: +;469: while (p->org[2] < p->end) +;470: { +line 471 +;471: p->org[2] += (p->start - p->end); +ADDRLP4 248 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 252 +ADDRLP4 248 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 252 +INDIRP4 +ADDRLP4 252 +INDIRP4 +INDIRF4 +ADDRLP4 248 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRF4 +ADDRLP4 248 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRF4 +SUBF4 +ADDF4 +ASGNF4 +line 472 +;472: } +LABELV $327 +line 469 +ADDRLP4 248 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 248 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 248 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRF4 +LTF4 $326 +line 475 +;473: +;474: +;475: if (p->type == P_WEATHER_TURBULENT) +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $329 +line 476 +;476: { +line 477 +;477: p->vel[0] = crandom() * 16; +ADDRLP4 252 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 1098907648 +CNSTF4 1073741824 +ADDRLP4 252 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 478 +;478: p->vel[1] = crandom() * 16; +ADDRLP4 256 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 1098907648 +CNSTF4 1073741824 +ADDRLP4 256 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 479 +;479: } +LABELV $329 +line 481 +;480: +;481: } +LABELV $323 +line 482 +;482: } +LABELV $316 +line 486 +;483: +;484: +;485: // Rafael snow pvs check +;486: if (!p->link) +ADDRFP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $331 +line 487 +;487: return; +ADDRGP4 $306 +JUMPV +LABELV $331 +line 489 +;488: +;489: p->alpha = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 490 +;490: } +LABELV $313 +line 493 +;491: +;492: // Ridah, had to do this or MAX_POLYS is being exceeded in village1.bsp +;493: if (Distance( cg.snap->ps.origin, org ) > 1024) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 64 +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 244 +ADDRGP4 Distance +CALLF4 +ASGNF4 +ADDRLP4 244 +INDIRF4 +CNSTF4 1149239296 +LEF4 $333 +line 494 +;494: return; +ADDRGP4 $306 +JUMPV +LABELV $333 +line 498 +;495: } +;496: // done. +;497: +;498: if (p->type == P_BUBBLE || p->type == P_BUBBLE_TURBULENT) +ADDRLP4 248 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 248 +INDIRI4 +CNSTI4 13 +EQI4 $338 +ADDRLP4 248 +INDIRI4 +CNSTI4 14 +NEI4 $336 +LABELV $338 +line 499 +;499: { +line 500 +;500: VectorMA (org, -p->height, pvup, point); +ADDRLP4 252 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 256 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 252 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 256 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 252 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 256 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 501 +;501: VectorMA (point, -p->width, pvright, point); +ADDRLP4 260 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 260 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 260 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 502 +;502: VectorCopy (point, verts[0].xyz); +ADDRLP4 12 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 503 +;503: verts[0].st[0] = 0; +ADDRLP4 12+12 +CNSTF4 0 +ASGNF4 +line 504 +;504: verts[0].st[1] = 0; +ADDRLP4 12+12+4 +CNSTF4 0 +ASGNF4 +line 505 +;505: verts[0].modulate[0] = 255; +ADDRLP4 12+20 +CNSTU1 255 +ASGNU1 +line 506 +;506: verts[0].modulate[1] = 255; +ADDRLP4 12+20+1 +CNSTU1 255 +ASGNU1 +line 507 +;507: verts[0].modulate[2] = 255; +ADDRLP4 12+20+2 +CNSTU1 255 +ASGNU1 +line 508 +;508: verts[0].modulate[3] = 255 * p->alpha; +ADDRLP4 268 +CNSTF4 1132396544 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 272 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 268 +INDIRF4 +ADDRLP4 272 +INDIRF4 +LTF4 $360 +ADDRLP4 264 +ADDRLP4 268 +INDIRF4 +ADDRLP4 272 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $361 +JUMPV +LABELV $360 +ADDRLP4 264 +ADDRLP4 268 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $361 +ADDRLP4 12+20+3 +ADDRLP4 264 +INDIRU4 +CVUU1 4 +ASGNU1 +line 510 +;509: +;510: VectorMA (org, -p->height, pvup, point); +ADDRLP4 276 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 280 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 276 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 280 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 276 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 280 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 511 +;511: VectorMA (point, p->width, pvright, point); +ADDRLP4 284 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 284 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 284 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 512 +;512: VectorCopy (point, verts[1].xyz); +ADDRLP4 12+24 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 513 +;513: verts[1].st[0] = 0; +ADDRLP4 12+24+12 +CNSTF4 0 +ASGNF4 +line 514 +;514: verts[1].st[1] = 1; +ADDRLP4 12+24+12+4 +CNSTF4 1065353216 +ASGNF4 +line 515 +;515: verts[1].modulate[0] = 255; +ADDRLP4 12+24+20 +CNSTU1 255 +ASGNU1 +line 516 +;516: verts[1].modulate[1] = 255; +ADDRLP4 12+24+20+1 +CNSTU1 255 +ASGNU1 +line 517 +;517: verts[1].modulate[2] = 255; +ADDRLP4 12+24+20+2 +CNSTU1 255 +ASGNU1 +line 518 +;518: verts[1].modulate[3] = 255 * p->alpha; +ADDRLP4 292 +CNSTF4 1132396544 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 296 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 292 +INDIRF4 +ADDRLP4 296 +INDIRF4 +LTF4 $390 +ADDRLP4 288 +ADDRLP4 292 +INDIRF4 +ADDRLP4 296 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $391 +JUMPV +LABELV $390 +ADDRLP4 288 +ADDRLP4 292 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $391 +ADDRLP4 12+24+20+3 +ADDRLP4 288 +INDIRU4 +CVUU1 4 +ASGNU1 +line 520 +;519: +;520: VectorMA (org, p->height, pvup, point); +ADDRLP4 300 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 304 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 300 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 304 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 300 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 304 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 521 +;521: VectorMA (point, p->width, pvright, point); +ADDRLP4 308 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 308 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 308 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 522 +;522: VectorCopy (point, verts[2].xyz); +ADDRLP4 12+48 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 523 +;523: verts[2].st[0] = 1; +ADDRLP4 12+48+12 +CNSTF4 1065353216 +ASGNF4 +line 524 +;524: verts[2].st[1] = 1; +ADDRLP4 12+48+12+4 +CNSTF4 1065353216 +ASGNF4 +line 525 +;525: verts[2].modulate[0] = 255; +ADDRLP4 12+48+20 +CNSTU1 255 +ASGNU1 +line 526 +;526: verts[2].modulate[1] = 255; +ADDRLP4 12+48+20+1 +CNSTU1 255 +ASGNU1 +line 527 +;527: verts[2].modulate[2] = 255; +ADDRLP4 12+48+20+2 +CNSTU1 255 +ASGNU1 +line 528 +;528: verts[2].modulate[3] = 255 * p->alpha; +ADDRLP4 316 +CNSTF4 1132396544 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 320 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 316 +INDIRF4 +ADDRLP4 320 +INDIRF4 +LTF4 $420 +ADDRLP4 312 +ADDRLP4 316 +INDIRF4 +ADDRLP4 320 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $421 +JUMPV +LABELV $420 +ADDRLP4 312 +ADDRLP4 316 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $421 +ADDRLP4 12+48+20+3 +ADDRLP4 312 +INDIRU4 +CVUU1 4 +ASGNU1 +line 530 +;529: +;530: VectorMA (org, p->height, pvup, point); +ADDRLP4 324 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 328 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 324 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 328 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 324 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 328 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 531 +;531: VectorMA (point, -p->width, pvright, point); +ADDRLP4 332 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 332 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 332 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 532 +;532: VectorCopy (point, verts[3].xyz); +ADDRLP4 12+72 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 533 +;533: verts[3].st[0] = 1; +ADDRLP4 12+72+12 +CNSTF4 1065353216 +ASGNF4 +line 534 +;534: verts[3].st[1] = 0; +ADDRLP4 12+72+12+4 +CNSTF4 0 +ASGNF4 +line 535 +;535: verts[3].modulate[0] = 255; +ADDRLP4 12+72+20 +CNSTU1 255 +ASGNU1 +line 536 +;536: verts[3].modulate[1] = 255; +ADDRLP4 12+72+20+1 +CNSTU1 255 +ASGNU1 +line 537 +;537: verts[3].modulate[2] = 255; +ADDRLP4 12+72+20+2 +CNSTU1 255 +ASGNU1 +line 538 +;538: verts[3].modulate[3] = 255 * p->alpha; +ADDRLP4 340 +CNSTF4 1132396544 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 344 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 340 +INDIRF4 +ADDRLP4 344 +INDIRF4 +LTF4 $450 +ADDRLP4 336 +ADDRLP4 340 +INDIRF4 +ADDRLP4 344 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $451 +JUMPV +LABELV $450 +ADDRLP4 336 +ADDRLP4 340 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $451 +ADDRLP4 12+72+20+3 +ADDRLP4 336 +INDIRU4 +CVUU1 4 +ASGNU1 +line 539 +;539: } +ADDRGP4 $308 +JUMPV +LABELV $336 +line 541 +;540: else +;541: { +line 542 +;542: VectorMA (org, -p->height, pvup, point); +ADDRLP4 252 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 256 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 252 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 256 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 252 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 256 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 543 +;543: VectorMA (point, -p->width, pvright, point); +ADDRLP4 260 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 260 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 260 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 544 +;544: VectorCopy( point, TRIverts[0].xyz ); +ADDRLP4 108 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 545 +;545: TRIverts[0].st[0] = 1; +ADDRLP4 108+12 +CNSTF4 1065353216 +ASGNF4 +line 546 +;546: TRIverts[0].st[1] = 0; +ADDRLP4 108+12+4 +CNSTF4 0 +ASGNF4 +line 547 +;547: TRIverts[0].modulate[0] = 255; +ADDRLP4 108+20 +CNSTU1 255 +ASGNU1 +line 548 +;548: TRIverts[0].modulate[1] = 255; +ADDRLP4 108+20+1 +CNSTU1 255 +ASGNU1 +line 549 +;549: TRIverts[0].modulate[2] = 255; +ADDRLP4 108+20+2 +CNSTU1 255 +ASGNU1 +line 550 +;550: TRIverts[0].modulate[3] = 255 * p->alpha; +ADDRLP4 268 +CNSTF4 1132396544 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 272 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 268 +INDIRF4 +ADDRLP4 272 +INDIRF4 +LTF4 $473 +ADDRLP4 264 +ADDRLP4 268 +INDIRF4 +ADDRLP4 272 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $474 +JUMPV +LABELV $473 +ADDRLP4 264 +ADDRLP4 268 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $474 +ADDRLP4 108+20+3 +ADDRLP4 264 +INDIRU4 +CVUU1 4 +ASGNU1 +line 552 +;551: +;552: VectorMA (org, p->height, pvup, point); +ADDRLP4 276 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 280 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 276 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 280 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 276 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 280 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 553 +;553: VectorMA (point, -p->width, pvright, point); +ADDRLP4 284 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 284 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 284 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 554 +;554: VectorCopy (point, TRIverts[1].xyz); +ADDRLP4 108+24 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 555 +;555: TRIverts[1].st[0] = 0; +ADDRLP4 108+24+12 +CNSTF4 0 +ASGNF4 +line 556 +;556: TRIverts[1].st[1] = 0; +ADDRLP4 108+24+12+4 +CNSTF4 0 +ASGNF4 +line 557 +;557: TRIverts[1].modulate[0] = 255; +ADDRLP4 108+24+20 +CNSTU1 255 +ASGNU1 +line 558 +;558: TRIverts[1].modulate[1] = 255; +ADDRLP4 108+24+20+1 +CNSTU1 255 +ASGNU1 +line 559 +;559: TRIverts[1].modulate[2] = 255; +ADDRLP4 108+24+20+2 +CNSTU1 255 +ASGNU1 +line 560 +;560: TRIverts[1].modulate[3] = 255 * p->alpha; +ADDRLP4 292 +CNSTF4 1132396544 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 296 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 292 +INDIRF4 +ADDRLP4 296 +INDIRF4 +LTF4 $503 +ADDRLP4 288 +ADDRLP4 292 +INDIRF4 +ADDRLP4 296 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $504 +JUMPV +LABELV $503 +ADDRLP4 288 +ADDRLP4 292 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $504 +ADDRLP4 108+24+20+3 +ADDRLP4 288 +INDIRU4 +CVUU1 4 +ASGNU1 +line 562 +;561: +;562: VectorMA (org, p->height, pvup, point); +ADDRLP4 300 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 304 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 300 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 304 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 300 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 304 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 563 +;563: VectorMA (point, p->width, pvright, point); +ADDRLP4 308 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 308 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 308 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 564 +;564: VectorCopy (point, TRIverts[2].xyz); +ADDRLP4 108+48 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 565 +;565: TRIverts[2].st[0] = 0; +ADDRLP4 108+48+12 +CNSTF4 0 +ASGNF4 +line 566 +;566: TRIverts[2].st[1] = 1; +ADDRLP4 108+48+12+4 +CNSTF4 1065353216 +ASGNF4 +line 567 +;567: TRIverts[2].modulate[0] = 255; +ADDRLP4 108+48+20 +CNSTU1 255 +ASGNU1 +line 568 +;568: TRIverts[2].modulate[1] = 255; +ADDRLP4 108+48+20+1 +CNSTU1 255 +ASGNU1 +line 569 +;569: TRIverts[2].modulate[2] = 255; +ADDRLP4 108+48+20+2 +CNSTU1 255 +ASGNU1 +line 570 +;570: TRIverts[2].modulate[3] = 255 * p->alpha; +ADDRLP4 316 +CNSTF4 1132396544 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 320 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 316 +INDIRF4 +ADDRLP4 320 +INDIRF4 +LTF4 $533 +ADDRLP4 312 +ADDRLP4 316 +INDIRF4 +ADDRLP4 320 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $534 +JUMPV +LABELV $533 +ADDRLP4 312 +ADDRLP4 316 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $534 +ADDRLP4 108+48+20+3 +ADDRLP4 312 +INDIRU4 +CVUU1 4 +ASGNU1 +line 571 +;571: } +line 573 +;572: +;573: } +ADDRGP4 $308 +JUMPV +LABELV $307 +line 574 +;574: else if (p->type == P_SPRITE) +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 15 +NEI4 $535 +line 575 +;575: { +line 579 +;576: vec3_t rr, ru; +;577: vec3_t rotate_ang; +;578: +;579: VectorSet (color, 1.0, 1.0, 0.5); +ADDRLP4 280 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 184 +ADDRLP4 280 +INDIRF4 +ASGNF4 +ADDRLP4 184+4 +ADDRLP4 280 +INDIRF4 +ASGNF4 +ADDRLP4 184+8 +CNSTF4 1056964608 +ASGNF4 +line 580 +;580: time = cg.time - p->time; +ADDRLP4 232 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 581 +;581: time2 = p->endtime - p->time; +ADDRLP4 284 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 236 +ADDRLP4 284 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 284 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 582 +;582: ratio = time / time2; +ADDRLP4 200 +ADDRLP4 232 +INDIRF4 +ADDRLP4 236 +INDIRF4 +DIVF4 +ASGNF4 +line 584 +;583: +;584: width = p->width + ( ratio * ( p->endwidth - p->width) ); +ADDRLP4 288 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 292 +ADDRLP4 288 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 196 +ADDRLP4 292 +INDIRF4 +ADDRLP4 200 +INDIRF4 +ADDRLP4 288 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +ADDRLP4 292 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 585 +;585: height = p->height + ( ratio * ( p->endheight - p->height) ); +ADDRLP4 296 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 300 +ADDRLP4 296 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 180 +ADDRLP4 300 +INDIRF4 +ADDRLP4 200 +INDIRF4 +ADDRLP4 296 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +ADDRLP4 300 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 587 +;586: +;587: if (p->roll) { +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $540 +line 588 +;588: vectoangles( cg.refdef.viewaxis[0], rotate_ang ); +ADDRGP4 cg+3616+36 +ARGP4 +ADDRLP4 268 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 589 +;589: rotate_ang[ROLL] += p->roll; +ADDRLP4 268+8 +ADDRLP4 268+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 590 +;590: AngleVectors ( rotate_ang, NULL, rr, ru); +ADDRLP4 268 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRLP4 256 +ARGP4 +ADDRLP4 244 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 591 +;591: } +LABELV $540 +line 593 +;592: +;593: if (p->roll) { +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $545 +line 594 +;594: VectorMA (org, -height, ru, point); +ADDRLP4 304 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 308 +ADDRLP4 180 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 304 +INDIRP4 +INDIRF4 +ADDRLP4 244 +INDIRF4 +ADDRLP4 308 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 304 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 244+4 +INDIRF4 +ADDRLP4 308 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 244+8 +INDIRF4 +ADDRLP4 180 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 595 +;595: VectorMA (point, -width, rr, point); +ADDRLP4 312 +ADDRLP4 196 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 256 +INDIRF4 +ADDRLP4 312 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 256+4 +INDIRF4 +ADDRLP4 312 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 256+8 +INDIRF4 +ADDRLP4 196 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 596 +;596: } else { +ADDRGP4 $546 +JUMPV +LABELV $545 +line 597 +;597: VectorMA (org, -height, pvup, point); +ADDRLP4 304 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 308 +ADDRLP4 180 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 304 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 308 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 304 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 308 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRLP4 180 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 598 +;598: VectorMA (point, -width, pvright, point); +ADDRLP4 312 +ADDRLP4 196 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 312 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 312 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRLP4 196 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 599 +;599: } +LABELV $546 +line 600 +;600: VectorCopy (point, verts[0].xyz); +ADDRLP4 12 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 601 +;601: verts[0].st[0] = 0; +ADDRLP4 12+12 +CNSTF4 0 +ASGNF4 +line 602 +;602: verts[0].st[1] = 0; +ADDRLP4 12+12+4 +CNSTF4 0 +ASGNF4 +line 603 +;603: verts[0].modulate[0] = 255; +ADDRLP4 12+20 +CNSTU1 255 +ASGNU1 +line 604 +;604: verts[0].modulate[1] = 255; +ADDRLP4 12+20+1 +CNSTU1 255 +ASGNU1 +line 605 +;605: verts[0].modulate[2] = 255; +ADDRLP4 12+20+2 +CNSTU1 255 +ASGNU1 +line 606 +;606: verts[0].modulate[3] = 255; +ADDRLP4 12+20+3 +CNSTU1 255 +ASGNU1 +line 608 +;607: +;608: if (p->roll) { +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $577 +line 609 +;609: VectorMA (point, 2*height, ru, point); +ADDRLP4 304 +CNSTF4 1073741824 +ADDRLP4 180 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 244 +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 244+4 +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 244+8 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 180 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 610 +;610: } else { +ADDRGP4 $578 +JUMPV +LABELV $577 +line 611 +;611: VectorMA (point, 2*height, pvup, point); +ADDRLP4 304 +CNSTF4 1073741824 +ADDRLP4 180 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 180 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 612 +;612: } +LABELV $578 +line 613 +;613: VectorCopy (point, verts[1].xyz); +ADDRLP4 12+24 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 614 +;614: verts[1].st[0] = 0; +ADDRLP4 12+24+12 +CNSTF4 0 +ASGNF4 +line 615 +;615: verts[1].st[1] = 1; +ADDRLP4 12+24+12+4 +CNSTF4 1065353216 +ASGNF4 +line 616 +;616: verts[1].modulate[0] = 255; +ADDRLP4 12+24+20 +CNSTU1 255 +ASGNU1 +line 617 +;617: verts[1].modulate[1] = 255; +ADDRLP4 12+24+20+1 +CNSTU1 255 +ASGNU1 +line 618 +;618: verts[1].modulate[2] = 255; +ADDRLP4 12+24+20+2 +CNSTU1 255 +ASGNU1 +line 619 +;619: verts[1].modulate[3] = 255; +ADDRLP4 12+24+20+3 +CNSTU1 255 +ASGNU1 +line 621 +;620: +;621: if (p->roll) { +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $608 +line 622 +;622: VectorMA (point, 2*width, rr, point); +ADDRLP4 304 +CNSTF4 1073741824 +ADDRLP4 196 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 256 +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 256+4 +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 256+8 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 196 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 623 +;623: } else { +ADDRGP4 $609 +JUMPV +LABELV $608 +line 624 +;624: VectorMA (point, 2*width, pvright, point); +ADDRLP4 304 +CNSTF4 1073741824 +ADDRLP4 196 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 196 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 625 +;625: } +LABELV $609 +line 626 +;626: VectorCopy (point, verts[2].xyz); +ADDRLP4 12+48 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 627 +;627: verts[2].st[0] = 1; +ADDRLP4 12+48+12 +CNSTF4 1065353216 +ASGNF4 +line 628 +;628: verts[2].st[1] = 1; +ADDRLP4 12+48+12+4 +CNSTF4 1065353216 +ASGNF4 +line 629 +;629: verts[2].modulate[0] = 255; +ADDRLP4 12+48+20 +CNSTU1 255 +ASGNU1 +line 630 +;630: verts[2].modulate[1] = 255; +ADDRLP4 12+48+20+1 +CNSTU1 255 +ASGNU1 +line 631 +;631: verts[2].modulate[2] = 255; +ADDRLP4 12+48+20+2 +CNSTU1 255 +ASGNU1 +line 632 +;632: verts[2].modulate[3] = 255; +ADDRLP4 12+48+20+3 +CNSTU1 255 +ASGNU1 +line 634 +;633: +;634: if (p->roll) { +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $639 +line 635 +;635: VectorMA (point, -2*height, ru, point); +ADDRLP4 304 +CNSTF4 3221225472 +ADDRLP4 180 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 244 +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 244+4 +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 244+8 +INDIRF4 +CNSTF4 3221225472 +ADDRLP4 180 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 636 +;636: } else { +ADDRGP4 $640 +JUMPV +LABELV $639 +line 637 +;637: VectorMA (point, -2*height, pvup, point); +ADDRLP4 304 +CNSTF4 3221225472 +ADDRLP4 180 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +CNSTF4 3221225472 +ADDRLP4 180 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 638 +;638: } +LABELV $640 +line 639 +;639: VectorCopy (point, verts[3].xyz); +ADDRLP4 12+72 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 640 +;640: verts[3].st[0] = 1; +ADDRLP4 12+72+12 +CNSTF4 1065353216 +ASGNF4 +line 641 +;641: verts[3].st[1] = 0; +ADDRLP4 12+72+12+4 +CNSTF4 0 +ASGNF4 +line 642 +;642: verts[3].modulate[0] = 255; +ADDRLP4 12+72+20 +CNSTU1 255 +ASGNU1 +line 643 +;643: verts[3].modulate[1] = 255; +ADDRLP4 12+72+20+1 +CNSTU1 255 +ASGNU1 +line 644 +;644: verts[3].modulate[2] = 255; +ADDRLP4 12+72+20+2 +CNSTU1 255 +ASGNU1 +line 645 +;645: verts[3].modulate[3] = 255; +ADDRLP4 12+72+20+3 +CNSTU1 255 +ASGNU1 +line 646 +;646: } +ADDRGP4 $536 +JUMPV +LABELV $535 +line 647 +;647: else if (p->type == P_SMOKE || p->type == P_SMOKE_IMPACT) +ADDRLP4 244 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 244 +INDIRI4 +CNSTI4 3 +EQI4 $672 +ADDRLP4 244 +INDIRI4 +CNSTI4 12 +NEI4 $670 +LABELV $672 +line 648 +;648: {// create a front rotating facing polygon +line 650 +;649: +;650: if ( p->type == P_SMOKE_IMPACT && Distance( cg.snap->ps.origin, org ) > 1024) { +ADDRLP4 248 +CNSTI4 64 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 248 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 12 +NEI4 $673 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 248 +INDIRI4 +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 252 +ADDRGP4 Distance +CALLF4 +ASGNF4 +ADDRLP4 252 +INDIRF4 +CNSTF4 1149239296 +LEF4 $673 +line 651 +;651: return; +ADDRGP4 $306 +JUMPV +LABELV $673 +line 654 +;652: } +;653: +;654: if (p->color == BLOODRED) +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $676 +line 655 +;655: VectorSet (color, 0.22f, 0.0f, 0.0f); +ADDRLP4 184 +CNSTF4 1046562734 +ASGNF4 +ADDRLP4 184+4 +CNSTF4 0 +ASGNF4 +ADDRLP4 184+8 +CNSTF4 0 +ASGNF4 +ADDRGP4 $677 +JUMPV +LABELV $676 +line 656 +;656: else if (p->color == GREY75) +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 4 +NEI4 $680 +line 657 +;657: { +line 661 +;658: float len; +;659: float greyit; +;660: float val; +;661: len = Distance (cg.snap->ps.origin, org); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 64 +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 268 +ADDRGP4 Distance +CALLF4 +ASGNF4 +ADDRLP4 260 +ADDRLP4 268 +INDIRF4 +ASGNF4 +line 662 +;662: if (!len) +ADDRLP4 260 +INDIRF4 +CNSTF4 0 +NEF4 $683 +line 663 +;663: len = 1; +ADDRLP4 260 +CNSTF4 1065353216 +ASGNF4 +LABELV $683 +line 665 +;664: +;665: val = 4096/len; +ADDRLP4 264 +CNSTF4 1166016512 +ADDRLP4 260 +INDIRF4 +DIVF4 +ASGNF4 +line 666 +;666: greyit = 0.25 * val; +ADDRLP4 256 +CNSTF4 1048576000 +ADDRLP4 264 +INDIRF4 +MULF4 +ASGNF4 +line 667 +;667: if (greyit > 0.5) +ADDRLP4 256 +INDIRF4 +CNSTF4 1056964608 +LEF4 $685 +line 668 +;668: greyit = 0.5; +ADDRLP4 256 +CNSTF4 1056964608 +ASGNF4 +LABELV $685 +line 670 +;669: +;670: VectorSet (color, greyit, greyit, greyit); +ADDRLP4 272 +ADDRLP4 256 +INDIRF4 +ASGNF4 +ADDRLP4 184 +ADDRLP4 272 +INDIRF4 +ASGNF4 +ADDRLP4 184+4 +ADDRLP4 272 +INDIRF4 +ASGNF4 +ADDRLP4 184+8 +ADDRLP4 256 +INDIRF4 +ASGNF4 +line 671 +;671: } +ADDRGP4 $681 +JUMPV +LABELV $680 +line 673 +;672: else +;673: VectorSet (color, 1.0, 1.0, 1.0); +ADDRLP4 256 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 184 +ADDRLP4 256 +INDIRF4 +ASGNF4 +ADDRLP4 184+4 +ADDRLP4 256 +INDIRF4 +ASGNF4 +ADDRLP4 184+8 +CNSTF4 1065353216 +ASGNF4 +LABELV $681 +LABELV $677 +line 675 +;674: +;675: time = cg.time - p->time; +ADDRLP4 232 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 676 +;676: time2 = p->endtime - p->time; +ADDRLP4 260 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 236 +ADDRLP4 260 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 260 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 677 +;677: ratio = time / time2; +ADDRLP4 200 +ADDRLP4 232 +INDIRF4 +ADDRLP4 236 +INDIRF4 +DIVF4 +ASGNF4 +line 679 +;678: +;679: if (cg.time > p->startfade) +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRF4 +LEF4 $692 +line 680 +;680: { +line 681 +;681: invratio = 1 - ( (cg.time - p->startfade) / (p->endtime - p->startfade) ); +ADDRLP4 264 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 268 +ADDRLP4 264 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 204 +CNSTF4 1065353216 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRLP4 268 +INDIRF4 +SUBF4 +ADDRLP4 264 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 268 +INDIRF4 +SUBF4 +DIVF4 +SUBF4 +ASGNF4 +line 683 +;682: +;683: if (p->color == EMISIVEFADE) +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $696 +line 684 +;684: { +line 686 +;685: float fval; +;686: fval = (invratio * invratio); +ADDRLP4 276 +ADDRLP4 204 +INDIRF4 +ASGNF4 +ADDRLP4 272 +ADDRLP4 276 +INDIRF4 +ADDRLP4 276 +INDIRF4 +MULF4 +ASGNF4 +line 687 +;687: if (fval < 0) +ADDRLP4 272 +INDIRF4 +CNSTF4 0 +GEF4 $698 +line 688 +;688: fval = 0; +ADDRLP4 272 +CNSTF4 0 +ASGNF4 +LABELV $698 +line 689 +;689: VectorSet (color, fval , fval , fval ); +ADDRLP4 280 +ADDRLP4 272 +INDIRF4 +ASGNF4 +ADDRLP4 184 +ADDRLP4 280 +INDIRF4 +ASGNF4 +ADDRLP4 184+4 +ADDRLP4 280 +INDIRF4 +ASGNF4 +ADDRLP4 184+8 +ADDRLP4 272 +INDIRF4 +ASGNF4 +line 690 +;690: } +LABELV $696 +line 691 +;691: invratio *= p->alpha; +ADDRLP4 204 +ADDRLP4 204 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 692 +;692: } +ADDRGP4 $693 +JUMPV +LABELV $692 +line 694 +;693: else +;694: invratio = 1 * p->alpha; +ADDRLP4 204 +CNSTF4 1065353216 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +LABELV $693 +line 696 +;695: +;696: if (invratio > 1) +ADDRLP4 204 +INDIRF4 +CNSTF4 1065353216 +LEF4 $702 +line 697 +;697: invratio = 1; +ADDRLP4 204 +CNSTF4 1065353216 +ASGNF4 +LABELV $702 +line 699 +;698: +;699: width = p->width + ( ratio * ( p->endwidth - p->width) ); +ADDRLP4 264 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 268 +ADDRLP4 264 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 196 +ADDRLP4 268 +INDIRF4 +ADDRLP4 200 +INDIRF4 +ADDRLP4 264 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +ADDRLP4 268 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 700 +;700: height = p->height + ( ratio * ( p->endheight - p->height) ); +ADDRLP4 272 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 276 +ADDRLP4 272 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 180 +ADDRLP4 276 +INDIRF4 +ADDRLP4 200 +INDIRF4 +ADDRLP4 272 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +ADDRLP4 276 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 702 +;701: +;702: if (p->type != P_SMOKE_IMPACT) +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 12 +EQI4 $704 +line 703 +;703: { +line 706 +;704: vec3_t temp; +;705: +;706: vectoangles (rforward, temp); +ADDRGP4 rforward +ARGP4 +ADDRLP4 280 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 707 +;707: p->accumroll += p->roll; +ADDRLP4 292 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 296 +ADDRLP4 292 +INDIRP4 +CNSTI4 120 +ADDP4 +ASGNP4 +ADDRLP4 296 +INDIRP4 +ADDRLP4 296 +INDIRP4 +INDIRI4 +ADDRLP4 292 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 708 +;708: temp[ROLL] += p->accumroll * 0.1; +ADDRLP4 280+8 +ADDRLP4 280+8 +INDIRF4 +CNSTF4 1036831949 +ADDRFP4 0 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 709 +;709: AngleVectors ( temp, NULL, rright2, rup2); +ADDRLP4 280 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRLP4 208 +ARGP4 +ADDRLP4 220 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 710 +;710: } +ADDRGP4 $705 +JUMPV +LABELV $704 +line 712 +;711: else +;712: { +line 713 +;713: VectorCopy (rright, rright2); +ADDRLP4 208 +ADDRGP4 rright +INDIRB +ASGNB 12 +line 714 +;714: VectorCopy (rup, rup2); +ADDRLP4 220 +ADDRGP4 rup +INDIRB +ASGNB 12 +line 715 +;715: } +LABELV $705 +line 717 +;716: +;717: if (p->rotate) +ADDRFP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $707 +line 718 +;718: { +line 719 +;719: VectorMA (org, -height, rup2, point); +ADDRLP4 280 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 284 +ADDRLP4 180 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 280 +INDIRP4 +INDIRF4 +ADDRLP4 220 +INDIRF4 +ADDRLP4 284 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 280 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 220+4 +INDIRF4 +ADDRLP4 284 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 220+8 +INDIRF4 +ADDRLP4 180 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 720 +;720: VectorMA (point, -width, rright2, point); +ADDRLP4 288 +ADDRLP4 196 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 208 +INDIRF4 +ADDRLP4 288 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 208+4 +INDIRF4 +ADDRLP4 288 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 208+8 +INDIRF4 +ADDRLP4 196 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 721 +;721: } +ADDRGP4 $708 +JUMPV +LABELV $707 +line 723 +;722: else +;723: { +line 724 +;724: VectorMA (org, -p->height, pvup, point); +ADDRLP4 280 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 284 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 280 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 284 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 280 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 284 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 725 +;725: VectorMA (point, -p->width, pvright, point); +ADDRLP4 288 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 288 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 288 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 726 +;726: } +LABELV $708 +line 727 +;727: VectorCopy (point, verts[0].xyz); +ADDRLP4 12 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 728 +;728: verts[0].st[0] = 0; +ADDRLP4 12+12 +CNSTF4 0 +ASGNF4 +line 729 +;729: verts[0].st[1] = 0; +ADDRLP4 12+12+4 +CNSTF4 0 +ASGNF4 +line 730 +;730: verts[0].modulate[0] = 255 * color[0]; +ADDRLP4 284 +CNSTF4 1132396544 +ADDRLP4 184 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 288 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 284 +INDIRF4 +ADDRLP4 288 +INDIRF4 +LTF4 $734 +ADDRLP4 280 +ADDRLP4 284 +INDIRF4 +ADDRLP4 288 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $735 +JUMPV +LABELV $734 +ADDRLP4 280 +ADDRLP4 284 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $735 +ADDRLP4 12+20 +ADDRLP4 280 +INDIRU4 +CVUU1 4 +ASGNU1 +line 731 +;731: verts[0].modulate[1] = 255 * color[1]; +ADDRLP4 296 +CNSTF4 1132396544 +ADDRLP4 184+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 300 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 296 +INDIRF4 +ADDRLP4 300 +INDIRF4 +LTF4 $740 +ADDRLP4 292 +ADDRLP4 296 +INDIRF4 +ADDRLP4 300 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $741 +JUMPV +LABELV $740 +ADDRLP4 292 +ADDRLP4 296 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $741 +ADDRLP4 12+20+1 +ADDRLP4 292 +INDIRU4 +CVUU1 4 +ASGNU1 +line 732 +;732: verts[0].modulate[2] = 255 * color[2]; +ADDRLP4 308 +CNSTF4 1132396544 +ADDRLP4 184+8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 312 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 308 +INDIRF4 +ADDRLP4 312 +INDIRF4 +LTF4 $746 +ADDRLP4 304 +ADDRLP4 308 +INDIRF4 +ADDRLP4 312 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $747 +JUMPV +LABELV $746 +ADDRLP4 304 +ADDRLP4 308 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $747 +ADDRLP4 12+20+2 +ADDRLP4 304 +INDIRU4 +CVUU1 4 +ASGNU1 +line 733 +;733: verts[0].modulate[3] = 255 * invratio; +ADDRLP4 320 +CNSTF4 1132396544 +ADDRLP4 204 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 324 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 320 +INDIRF4 +ADDRLP4 324 +INDIRF4 +LTF4 $751 +ADDRLP4 316 +ADDRLP4 320 +INDIRF4 +ADDRLP4 324 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $752 +JUMPV +LABELV $751 +ADDRLP4 316 +ADDRLP4 320 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $752 +ADDRLP4 12+20+3 +ADDRLP4 316 +INDIRU4 +CVUU1 4 +ASGNU1 +line 735 +;734: +;735: if (p->rotate) +ADDRFP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $753 +line 736 +;736: { +line 737 +;737: VectorMA (org, -height, rup2, point); +ADDRLP4 328 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 332 +ADDRLP4 180 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 328 +INDIRP4 +INDIRF4 +ADDRLP4 220 +INDIRF4 +ADDRLP4 332 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 328 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 220+4 +INDIRF4 +ADDRLP4 332 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 220+8 +INDIRF4 +ADDRLP4 180 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 738 +;738: VectorMA (point, width, rright2, point); +ADDRLP4 336 +ADDRLP4 196 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 208 +INDIRF4 +ADDRLP4 336 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 208+4 +INDIRF4 +ADDRLP4 336 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 208+8 +INDIRF4 +ADDRLP4 196 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 739 +;739: } +ADDRGP4 $754 +JUMPV +LABELV $753 +line 741 +;740: else +;741: { +line 742 +;742: VectorMA (org, -p->height, pvup, point); +ADDRLP4 328 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 332 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 328 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 332 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 328 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 332 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 743 +;743: VectorMA (point, p->width, pvright, point); +ADDRLP4 336 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 336 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 336 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 744 +;744: } +LABELV $754 +line 745 +;745: VectorCopy (point, verts[1].xyz); +ADDRLP4 12+24 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 746 +;746: verts[1].st[0] = 0; +ADDRLP4 12+24+12 +CNSTF4 0 +ASGNF4 +line 747 +;747: verts[1].st[1] = 1; +ADDRLP4 12+24+12+4 +CNSTF4 1065353216 +ASGNF4 +line 748 +;748: verts[1].modulate[0] = 255 * color[0]; +ADDRLP4 332 +CNSTF4 1132396544 +ADDRLP4 184 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 336 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 332 +INDIRF4 +ADDRLP4 336 +INDIRF4 +LTF4 $784 +ADDRLP4 328 +ADDRLP4 332 +INDIRF4 +ADDRLP4 336 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $785 +JUMPV +LABELV $784 +ADDRLP4 328 +ADDRLP4 332 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $785 +ADDRLP4 12+24+20 +ADDRLP4 328 +INDIRU4 +CVUU1 4 +ASGNU1 +line 749 +;749: verts[1].modulate[1] = 255 * color[1]; +ADDRLP4 344 +CNSTF4 1132396544 +ADDRLP4 184+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 348 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 344 +INDIRF4 +ADDRLP4 348 +INDIRF4 +LTF4 $791 +ADDRLP4 340 +ADDRLP4 344 +INDIRF4 +ADDRLP4 348 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $792 +JUMPV +LABELV $791 +ADDRLP4 340 +ADDRLP4 344 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $792 +ADDRLP4 12+24+20+1 +ADDRLP4 340 +INDIRU4 +CVUU1 4 +ASGNU1 +line 750 +;750: verts[1].modulate[2] = 255 * color[2]; +ADDRLP4 356 +CNSTF4 1132396544 +ADDRLP4 184+8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 360 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 356 +INDIRF4 +ADDRLP4 360 +INDIRF4 +LTF4 $798 +ADDRLP4 352 +ADDRLP4 356 +INDIRF4 +ADDRLP4 360 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $799 +JUMPV +LABELV $798 +ADDRLP4 352 +ADDRLP4 356 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $799 +ADDRLP4 12+24+20+2 +ADDRLP4 352 +INDIRU4 +CVUU1 4 +ASGNU1 +line 751 +;751: verts[1].modulate[3] = 255 * invratio; +ADDRLP4 368 +CNSTF4 1132396544 +ADDRLP4 204 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 372 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 368 +INDIRF4 +ADDRLP4 372 +INDIRF4 +LTF4 $804 +ADDRLP4 364 +ADDRLP4 368 +INDIRF4 +ADDRLP4 372 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $805 +JUMPV +LABELV $804 +ADDRLP4 364 +ADDRLP4 368 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $805 +ADDRLP4 12+24+20+3 +ADDRLP4 364 +INDIRU4 +CVUU1 4 +ASGNU1 +line 753 +;752: +;753: if (p->rotate) +ADDRFP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $806 +line 754 +;754: { +line 755 +;755: VectorMA (org, height, rup2, point); +ADDRLP4 376 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 376 +INDIRP4 +INDIRF4 +ADDRLP4 220 +INDIRF4 +ADDRLP4 180 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 376 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 220+4 +INDIRF4 +ADDRLP4 180 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 220+8 +INDIRF4 +ADDRLP4 180 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 756 +;756: VectorMA (point, width, rright2, point); +ADDRLP4 384 +ADDRLP4 196 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 208 +INDIRF4 +ADDRLP4 384 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 208+4 +INDIRF4 +ADDRLP4 384 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 208+8 +INDIRF4 +ADDRLP4 196 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 757 +;757: } +ADDRGP4 $807 +JUMPV +LABELV $806 +line 759 +;758: else +;759: { +line 760 +;760: VectorMA (org, p->height, pvup, point); +ADDRLP4 376 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 380 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 376 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 380 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 376 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 380 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 761 +;761: VectorMA (point, p->width, pvright, point); +ADDRLP4 384 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 384 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 384 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 762 +;762: } +LABELV $807 +line 763 +;763: VectorCopy (point, verts[2].xyz); +ADDRLP4 12+48 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 764 +;764: verts[2].st[0] = 1; +ADDRLP4 12+48+12 +CNSTF4 1065353216 +ASGNF4 +line 765 +;765: verts[2].st[1] = 1; +ADDRLP4 12+48+12+4 +CNSTF4 1065353216 +ASGNF4 +line 766 +;766: verts[2].modulate[0] = 255 * color[0]; +ADDRLP4 380 +CNSTF4 1132396544 +ADDRLP4 184 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 384 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 380 +INDIRF4 +ADDRLP4 384 +INDIRF4 +LTF4 $837 +ADDRLP4 376 +ADDRLP4 380 +INDIRF4 +ADDRLP4 384 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $838 +JUMPV +LABELV $837 +ADDRLP4 376 +ADDRLP4 380 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $838 +ADDRLP4 12+48+20 +ADDRLP4 376 +INDIRU4 +CVUU1 4 +ASGNU1 +line 767 +;767: verts[2].modulate[1] = 255 * color[1]; +ADDRLP4 392 +CNSTF4 1132396544 +ADDRLP4 184+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 396 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 392 +INDIRF4 +ADDRLP4 396 +INDIRF4 +LTF4 $844 +ADDRLP4 388 +ADDRLP4 392 +INDIRF4 +ADDRLP4 396 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $845 +JUMPV +LABELV $844 +ADDRLP4 388 +ADDRLP4 392 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $845 +ADDRLP4 12+48+20+1 +ADDRLP4 388 +INDIRU4 +CVUU1 4 +ASGNU1 +line 768 +;768: verts[2].modulate[2] = 255 * color[2]; +ADDRLP4 404 +CNSTF4 1132396544 +ADDRLP4 184+8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 408 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 404 +INDIRF4 +ADDRLP4 408 +INDIRF4 +LTF4 $851 +ADDRLP4 400 +ADDRLP4 404 +INDIRF4 +ADDRLP4 408 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $852 +JUMPV +LABELV $851 +ADDRLP4 400 +ADDRLP4 404 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $852 +ADDRLP4 12+48+20+2 +ADDRLP4 400 +INDIRU4 +CVUU1 4 +ASGNU1 +line 769 +;769: verts[2].modulate[3] = 255 * invratio; +ADDRLP4 416 +CNSTF4 1132396544 +ADDRLP4 204 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 420 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 416 +INDIRF4 +ADDRLP4 420 +INDIRF4 +LTF4 $857 +ADDRLP4 412 +ADDRLP4 416 +INDIRF4 +ADDRLP4 420 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $858 +JUMPV +LABELV $857 +ADDRLP4 412 +ADDRLP4 416 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $858 +ADDRLP4 12+48+20+3 +ADDRLP4 412 +INDIRU4 +CVUU1 4 +ASGNU1 +line 771 +;770: +;771: if (p->rotate) +ADDRFP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $859 +line 772 +;772: { +line 773 +;773: VectorMA (org, height, rup2, point); +ADDRLP4 424 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 424 +INDIRP4 +INDIRF4 +ADDRLP4 220 +INDIRF4 +ADDRLP4 180 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 424 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 220+4 +INDIRF4 +ADDRLP4 180 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 220+8 +INDIRF4 +ADDRLP4 180 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 774 +;774: VectorMA (point, -width, rright2, point); +ADDRLP4 432 +ADDRLP4 196 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 208 +INDIRF4 +ADDRLP4 432 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 208+4 +INDIRF4 +ADDRLP4 432 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 208+8 +INDIRF4 +ADDRLP4 196 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 775 +;775: } +ADDRGP4 $860 +JUMPV +LABELV $859 +line 777 +;776: else +;777: { +line 778 +;778: VectorMA (org, p->height, pvup, point); +ADDRLP4 424 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 428 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 424 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 428 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 424 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 428 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 779 +;779: VectorMA (point, -p->width, pvright, point); +ADDRLP4 432 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 432 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 432 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 780 +;780: } +LABELV $860 +line 781 +;781: VectorCopy (point, verts[3].xyz); +ADDRLP4 12+72 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 782 +;782: verts[3].st[0] = 1; +ADDRLP4 12+72+12 +CNSTF4 1065353216 +ASGNF4 +line 783 +;783: verts[3].st[1] = 0; +ADDRLP4 12+72+12+4 +CNSTF4 0 +ASGNF4 +line 784 +;784: verts[3].modulate[0] = 255 * color[0]; +ADDRLP4 428 +CNSTF4 1132396544 +ADDRLP4 184 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 432 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 428 +INDIRF4 +ADDRLP4 432 +INDIRF4 +LTF4 $890 +ADDRLP4 424 +ADDRLP4 428 +INDIRF4 +ADDRLP4 432 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $891 +JUMPV +LABELV $890 +ADDRLP4 424 +ADDRLP4 428 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $891 +ADDRLP4 12+72+20 +ADDRLP4 424 +INDIRU4 +CVUU1 4 +ASGNU1 +line 785 +;785: verts[3].modulate[1] = 255 * color[1]; +ADDRLP4 440 +CNSTF4 1132396544 +ADDRLP4 184+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 444 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 440 +INDIRF4 +ADDRLP4 444 +INDIRF4 +LTF4 $897 +ADDRLP4 436 +ADDRLP4 440 +INDIRF4 +ADDRLP4 444 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $898 +JUMPV +LABELV $897 +ADDRLP4 436 +ADDRLP4 440 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $898 +ADDRLP4 12+72+20+1 +ADDRLP4 436 +INDIRU4 +CVUU1 4 +ASGNU1 +line 786 +;786: verts[3].modulate[2] = 255 * color[2]; +ADDRLP4 452 +CNSTF4 1132396544 +ADDRLP4 184+8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 456 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 452 +INDIRF4 +ADDRLP4 456 +INDIRF4 +LTF4 $904 +ADDRLP4 448 +ADDRLP4 452 +INDIRF4 +ADDRLP4 456 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $905 +JUMPV +LABELV $904 +ADDRLP4 448 +ADDRLP4 452 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $905 +ADDRLP4 12+72+20+2 +ADDRLP4 448 +INDIRU4 +CVUU1 4 +ASGNU1 +line 787 +;787: verts[3].modulate[3] = 255 * invratio; +ADDRLP4 464 +CNSTF4 1132396544 +ADDRLP4 204 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 468 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 464 +INDIRF4 +ADDRLP4 468 +INDIRF4 +LTF4 $910 +ADDRLP4 460 +ADDRLP4 464 +INDIRF4 +ADDRLP4 468 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $911 +JUMPV +LABELV $910 +ADDRLP4 460 +ADDRLP4 464 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $911 +ADDRLP4 12+72+20+3 +ADDRLP4 460 +INDIRU4 +CVUU1 4 +ASGNU1 +line 789 +;788: +;789: } +ADDRGP4 $671 +JUMPV +LABELV $670 +line 790 +;790: else if (p->type == P_BLEED) +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $912 +line 791 +;791: { +line 796 +;792: vec3_t rr, ru; +;793: vec3_t rotate_ang; +;794: float alpha; +;795: +;796: alpha = p->alpha; +ADDRLP4 272 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +ASGNF4 +line 798 +;797: +;798: if (p->roll) +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $914 +line 799 +;799: { +line 800 +;800: vectoangles( cg.refdef.viewaxis[0], rotate_ang ); +ADDRGP4 cg+3616+36 +ARGP4 +ADDRLP4 276 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 801 +;801: rotate_ang[ROLL] += p->roll; +ADDRLP4 276+8 +ADDRLP4 276+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 802 +;802: AngleVectors ( rotate_ang, NULL, rr, ru); +ADDRLP4 276 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRLP4 248 +ARGP4 +ADDRLP4 260 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 803 +;803: } +ADDRGP4 $915 +JUMPV +LABELV $914 +line 805 +;804: else +;805: { +line 806 +;806: VectorCopy (pvup, ru); +ADDRLP4 260 +ADDRGP4 pvup +INDIRB +ASGNB 12 +line 807 +;807: VectorCopy (pvright, rr); +ADDRLP4 248 +ADDRGP4 pvright +INDIRB +ASGNB 12 +line 808 +;808: } +LABELV $915 +line 810 +;809: +;810: VectorMA (org, -p->height, ru, point); +ADDRLP4 288 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 292 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 288 +INDIRP4 +INDIRF4 +ADDRLP4 260 +INDIRF4 +ADDRLP4 292 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 288 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 260+4 +INDIRF4 +ADDRLP4 292 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 260+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 811 +;811: VectorMA (point, -p->width, rr, point); +ADDRLP4 296 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 248 +INDIRF4 +ADDRLP4 296 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 248+4 +INDIRF4 +ADDRLP4 296 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 248+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 812 +;812: VectorCopy (point, verts[0].xyz); +ADDRLP4 12 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 813 +;813: verts[0].st[0] = 0; +ADDRLP4 12+12 +CNSTF4 0 +ASGNF4 +line 814 +;814: verts[0].st[1] = 0; +ADDRLP4 12+12+4 +CNSTF4 0 +ASGNF4 +line 815 +;815: verts[0].modulate[0] = 111; +ADDRLP4 12+20 +CNSTU1 111 +ASGNU1 +line 816 +;816: verts[0].modulate[1] = 19; +ADDRLP4 12+20+1 +CNSTU1 19 +ASGNU1 +line 817 +;817: verts[0].modulate[2] = 9; +ADDRLP4 12+20+2 +CNSTU1 9 +ASGNU1 +line 818 +;818: verts[0].modulate[3] = 255 * alpha; +ADDRLP4 304 +CNSTF4 1132396544 +ADDRLP4 272 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 308 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 304 +INDIRF4 +ADDRLP4 308 +INDIRF4 +LTF4 $940 +ADDRLP4 300 +ADDRLP4 304 +INDIRF4 +ADDRLP4 308 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $941 +JUMPV +LABELV $940 +ADDRLP4 300 +ADDRLP4 304 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $941 +ADDRLP4 12+20+3 +ADDRLP4 300 +INDIRU4 +CVUU1 4 +ASGNU1 +line 820 +;819: +;820: VectorMA (org, -p->height, ru, point); +ADDRLP4 312 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 316 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 312 +INDIRP4 +INDIRF4 +ADDRLP4 260 +INDIRF4 +ADDRLP4 316 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 312 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 260+4 +INDIRF4 +ADDRLP4 316 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 260+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 821 +;821: VectorMA (point, p->width, rr, point); +ADDRLP4 320 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 248 +INDIRF4 +ADDRLP4 320 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 248+4 +INDIRF4 +ADDRLP4 320 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 248+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 822 +;822: VectorCopy (point, verts[1].xyz); +ADDRLP4 12+24 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 823 +;823: verts[1].st[0] = 0; +ADDRLP4 12+24+12 +CNSTF4 0 +ASGNF4 +line 824 +;824: verts[1].st[1] = 1; +ADDRLP4 12+24+12+4 +CNSTF4 1065353216 +ASGNF4 +line 825 +;825: verts[1].modulate[0] = 111; +ADDRLP4 12+24+20 +CNSTU1 111 +ASGNU1 +line 826 +;826: verts[1].modulate[1] = 19; +ADDRLP4 12+24+20+1 +CNSTU1 19 +ASGNU1 +line 827 +;827: verts[1].modulate[2] = 9; +ADDRLP4 12+24+20+2 +CNSTU1 9 +ASGNU1 +line 828 +;828: verts[1].modulate[3] = 255 * alpha; +ADDRLP4 328 +CNSTF4 1132396544 +ADDRLP4 272 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 332 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 328 +INDIRF4 +ADDRLP4 332 +INDIRF4 +LTF4 $970 +ADDRLP4 324 +ADDRLP4 328 +INDIRF4 +ADDRLP4 332 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $971 +JUMPV +LABELV $970 +ADDRLP4 324 +ADDRLP4 328 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $971 +ADDRLP4 12+24+20+3 +ADDRLP4 324 +INDIRU4 +CVUU1 4 +ASGNU1 +line 830 +;829: +;830: VectorMA (org, p->height, ru, point); +ADDRLP4 336 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 340 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 336 +INDIRP4 +INDIRF4 +ADDRLP4 260 +INDIRF4 +ADDRLP4 340 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 336 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 260+4 +INDIRF4 +ADDRLP4 340 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 260+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 831 +;831: VectorMA (point, p->width, rr, point); +ADDRLP4 344 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 248 +INDIRF4 +ADDRLP4 344 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 248+4 +INDIRF4 +ADDRLP4 344 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 248+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 832 +;832: VectorCopy (point, verts[2].xyz); +ADDRLP4 12+48 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 833 +;833: verts[2].st[0] = 1; +ADDRLP4 12+48+12 +CNSTF4 1065353216 +ASGNF4 +line 834 +;834: verts[2].st[1] = 1; +ADDRLP4 12+48+12+4 +CNSTF4 1065353216 +ASGNF4 +line 835 +;835: verts[2].modulate[0] = 111; +ADDRLP4 12+48+20 +CNSTU1 111 +ASGNU1 +line 836 +;836: verts[2].modulate[1] = 19; +ADDRLP4 12+48+20+1 +CNSTU1 19 +ASGNU1 +line 837 +;837: verts[2].modulate[2] = 9; +ADDRLP4 12+48+20+2 +CNSTU1 9 +ASGNU1 +line 838 +;838: verts[2].modulate[3] = 255 * alpha; +ADDRLP4 352 +CNSTF4 1132396544 +ADDRLP4 272 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 356 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 352 +INDIRF4 +ADDRLP4 356 +INDIRF4 +LTF4 $1000 +ADDRLP4 348 +ADDRLP4 352 +INDIRF4 +ADDRLP4 356 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1001 +JUMPV +LABELV $1000 +ADDRLP4 348 +ADDRLP4 352 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1001 +ADDRLP4 12+48+20+3 +ADDRLP4 348 +INDIRU4 +CVUU1 4 +ASGNU1 +line 840 +;839: +;840: VectorMA (org, p->height, ru, point); +ADDRLP4 360 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 364 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 360 +INDIRP4 +INDIRF4 +ADDRLP4 260 +INDIRF4 +ADDRLP4 364 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 360 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 260+4 +INDIRF4 +ADDRLP4 364 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 260+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 841 +;841: VectorMA (point, -p->width, rr, point); +ADDRLP4 368 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 248 +INDIRF4 +ADDRLP4 368 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 248+4 +INDIRF4 +ADDRLP4 368 +INDIRP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 248+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 842 +;842: VectorCopy (point, verts[3].xyz); +ADDRLP4 12+72 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 843 +;843: verts[3].st[0] = 1; +ADDRLP4 12+72+12 +CNSTF4 1065353216 +ASGNF4 +line 844 +;844: verts[3].st[1] = 0; +ADDRLP4 12+72+12+4 +CNSTF4 0 +ASGNF4 +line 845 +;845: verts[3].modulate[0] = 111; +ADDRLP4 12+72+20 +CNSTU1 111 +ASGNU1 +line 846 +;846: verts[3].modulate[1] = 19; +ADDRLP4 12+72+20+1 +CNSTU1 19 +ASGNU1 +line 847 +;847: verts[3].modulate[2] = 9; +ADDRLP4 12+72+20+2 +CNSTU1 9 +ASGNU1 +line 848 +;848: verts[3].modulate[3] = 255 * alpha; +ADDRLP4 376 +CNSTF4 1132396544 +ADDRLP4 272 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 380 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 376 +INDIRF4 +ADDRLP4 380 +INDIRF4 +LTF4 $1030 +ADDRLP4 372 +ADDRLP4 376 +INDIRF4 +ADDRLP4 380 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1031 +JUMPV +LABELV $1030 +ADDRLP4 372 +ADDRLP4 376 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1031 +ADDRLP4 12+72+20+3 +ADDRLP4 372 +INDIRU4 +CVUU1 4 +ASGNU1 +line 850 +;849: +;850: } +ADDRGP4 $913 +JUMPV +LABELV $912 +line 851 +;851: else if (p->type == P_FLAT_SCALEUP) +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 9 +NEI4 $1032 +line 852 +;852: { +line 856 +;853: float width, height; +;854: float sinR, cosR; +;855: +;856: if (p->color == BLOODRED) +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1034 +line 857 +;857: VectorSet (color, 1, 1, 1); +ADDRLP4 264 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 184 +ADDRLP4 264 +INDIRF4 +ASGNF4 +ADDRLP4 184+4 +ADDRLP4 264 +INDIRF4 +ASGNF4 +ADDRLP4 184+8 +CNSTF4 1065353216 +ASGNF4 +ADDRGP4 $1035 +JUMPV +LABELV $1034 +line 859 +;858: else +;859: VectorSet (color, 0.5, 0.5, 0.5); +ADDRLP4 268 +CNSTF4 1056964608 +ASGNF4 +ADDRLP4 184 +ADDRLP4 268 +INDIRF4 +ASGNF4 +ADDRLP4 184+4 +ADDRLP4 268 +INDIRF4 +ASGNF4 +ADDRLP4 184+8 +CNSTF4 1056964608 +ASGNF4 +LABELV $1035 +line 861 +;860: +;861: time = cg.time - p->time; +ADDRLP4 232 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 862 +;862: time2 = p->endtime - p->time; +ADDRLP4 272 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 236 +ADDRLP4 272 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 272 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 863 +;863: ratio = time / time2; +ADDRLP4 200 +ADDRLP4 232 +INDIRF4 +ADDRLP4 236 +INDIRF4 +DIVF4 +ASGNF4 +line 865 +;864: +;865: width = p->width + ( ratio * ( p->endwidth - p->width) ); +ADDRLP4 276 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 280 +ADDRLP4 276 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 256 +ADDRLP4 280 +INDIRF4 +ADDRLP4 200 +INDIRF4 +ADDRLP4 276 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +ADDRLP4 280 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 866 +;866: height = p->height + ( ratio * ( p->endheight - p->height) ); +ADDRLP4 284 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 288 +ADDRLP4 284 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 260 +ADDRLP4 288 +INDIRF4 +ADDRLP4 200 +INDIRF4 +ADDRLP4 284 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +ADDRLP4 288 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 868 +;867: +;868: if (width > p->endwidth) +ADDRLP4 256 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +LEF4 $1041 +line 869 +;869: width = p->endwidth; +ADDRLP4 256 +ADDRFP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +ASGNF4 +LABELV $1041 +line 871 +;870: +;871: if (height > p->endheight) +ADDRLP4 260 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +LEF4 $1043 +line 872 +;872: height = p->endheight; +ADDRLP4 260 +ADDRFP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +ASGNF4 +LABELV $1043 +line 874 +;873: +;874: sinR = height * sin(DEG2RAD(p->roll)) * sqrt(2); +CNSTF4 1078530011 +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CVIF4 4 +MULF4 +CNSTF4 1127481344 +DIVF4 +ARGF4 +ADDRLP4 292 +ADDRGP4 sin +CALLF4 +ASGNF4 +CNSTF4 1073741824 +ARGF4 +ADDRLP4 296 +ADDRGP4 sqrt +CALLF4 +ASGNF4 +ADDRLP4 248 +ADDRLP4 260 +INDIRF4 +ADDRLP4 292 +INDIRF4 +MULF4 +ADDRLP4 296 +INDIRF4 +MULF4 +ASGNF4 +line 875 +;875: cosR = width * cos(DEG2RAD(p->roll)) * sqrt(2); +CNSTF4 1078530011 +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CVIF4 4 +MULF4 +CNSTF4 1127481344 +DIVF4 +ARGF4 +ADDRLP4 300 +ADDRGP4 cos +CALLF4 +ASGNF4 +CNSTF4 1073741824 +ARGF4 +ADDRLP4 304 +ADDRGP4 sqrt +CALLF4 +ASGNF4 +ADDRLP4 252 +ADDRLP4 256 +INDIRF4 +ADDRLP4 300 +INDIRF4 +MULF4 +ADDRLP4 304 +INDIRF4 +MULF4 +ASGNF4 +line 877 +;876: +;877: VectorCopy (org, verts[0].xyz); +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 878 +;878: verts[0].xyz[0] -= sinR; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +ADDRLP4 248 +INDIRF4 +SUBF4 +ASGNF4 +line 879 +;879: verts[0].xyz[1] -= cosR; +ADDRLP4 12+4 +ADDRLP4 12+4 +INDIRF4 +ADDRLP4 252 +INDIRF4 +SUBF4 +ASGNF4 +line 880 +;880: verts[0].st[0] = 0; +ADDRLP4 12+12 +CNSTF4 0 +ASGNF4 +line 881 +;881: verts[0].st[1] = 0; +ADDRLP4 12+12+4 +CNSTF4 0 +ASGNF4 +line 882 +;882: verts[0].modulate[0] = 255 * color[0]; +ADDRLP4 312 +CNSTF4 1132396544 +ADDRLP4 184 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 316 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 312 +INDIRF4 +ADDRLP4 316 +INDIRF4 +LTF4 $1051 +ADDRLP4 308 +ADDRLP4 312 +INDIRF4 +ADDRLP4 316 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1052 +JUMPV +LABELV $1051 +ADDRLP4 308 +ADDRLP4 312 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1052 +ADDRLP4 12+20 +ADDRLP4 308 +INDIRU4 +CVUU1 4 +ASGNU1 +line 883 +;883: verts[0].modulate[1] = 255 * color[1]; +ADDRLP4 324 +CNSTF4 1132396544 +ADDRLP4 184+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 328 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 324 +INDIRF4 +ADDRLP4 328 +INDIRF4 +LTF4 $1057 +ADDRLP4 320 +ADDRLP4 324 +INDIRF4 +ADDRLP4 328 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1058 +JUMPV +LABELV $1057 +ADDRLP4 320 +ADDRLP4 324 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1058 +ADDRLP4 12+20+1 +ADDRLP4 320 +INDIRU4 +CVUU1 4 +ASGNU1 +line 884 +;884: verts[0].modulate[2] = 255 * color[2]; +ADDRLP4 336 +CNSTF4 1132396544 +ADDRLP4 184+8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 340 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 336 +INDIRF4 +ADDRLP4 340 +INDIRF4 +LTF4 $1063 +ADDRLP4 332 +ADDRLP4 336 +INDIRF4 +ADDRLP4 340 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1064 +JUMPV +LABELV $1063 +ADDRLP4 332 +ADDRLP4 336 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1064 +ADDRLP4 12+20+2 +ADDRLP4 332 +INDIRU4 +CVUU1 4 +ASGNU1 +line 885 +;885: verts[0].modulate[3] = 255; +ADDRLP4 12+20+3 +CNSTU1 255 +ASGNU1 +line 887 +;886: +;887: VectorCopy (org, verts[1].xyz); +ADDRLP4 12+24 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 888 +;888: verts[1].xyz[0] -= cosR; +ADDRLP4 12+24 +ADDRLP4 12+24 +INDIRF4 +ADDRLP4 252 +INDIRF4 +SUBF4 +ASGNF4 +line 889 +;889: verts[1].xyz[1] += sinR; +ADDRLP4 12+24+4 +ADDRLP4 12+24+4 +INDIRF4 +ADDRLP4 248 +INDIRF4 +ADDF4 +ASGNF4 +line 890 +;890: verts[1].st[0] = 0; +ADDRLP4 12+24+12 +CNSTF4 0 +ASGNF4 +line 891 +;891: verts[1].st[1] = 1; +ADDRLP4 12+24+12+4 +CNSTF4 1065353216 +ASGNF4 +line 892 +;892: verts[1].modulate[0] = 255 * color[0]; +ADDRLP4 348 +CNSTF4 1132396544 +ADDRLP4 184 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 352 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 348 +INDIRF4 +ADDRLP4 352 +INDIRF4 +LTF4 $1079 +ADDRLP4 344 +ADDRLP4 348 +INDIRF4 +ADDRLP4 352 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1080 +JUMPV +LABELV $1079 +ADDRLP4 344 +ADDRLP4 348 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1080 +ADDRLP4 12+24+20 +ADDRLP4 344 +INDIRU4 +CVUU1 4 +ASGNU1 +line 893 +;893: verts[1].modulate[1] = 255 * color[1]; +ADDRLP4 360 +CNSTF4 1132396544 +ADDRLP4 184+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 364 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 360 +INDIRF4 +ADDRLP4 364 +INDIRF4 +LTF4 $1086 +ADDRLP4 356 +ADDRLP4 360 +INDIRF4 +ADDRLP4 364 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1087 +JUMPV +LABELV $1086 +ADDRLP4 356 +ADDRLP4 360 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1087 +ADDRLP4 12+24+20+1 +ADDRLP4 356 +INDIRU4 +CVUU1 4 +ASGNU1 +line 894 +;894: verts[1].modulate[2] = 255 * color[2]; +ADDRLP4 372 +CNSTF4 1132396544 +ADDRLP4 184+8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 376 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 372 +INDIRF4 +ADDRLP4 376 +INDIRF4 +LTF4 $1093 +ADDRLP4 368 +ADDRLP4 372 +INDIRF4 +ADDRLP4 376 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1094 +JUMPV +LABELV $1093 +ADDRLP4 368 +ADDRLP4 372 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1094 +ADDRLP4 12+24+20+2 +ADDRLP4 368 +INDIRU4 +CVUU1 4 +ASGNU1 +line 895 +;895: verts[1].modulate[3] = 255; +ADDRLP4 12+24+20+3 +CNSTU1 255 +ASGNU1 +line 897 +;896: +;897: VectorCopy (org, verts[2].xyz); +ADDRLP4 12+48 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 898 +;898: verts[2].xyz[0] += sinR; +ADDRLP4 12+48 +ADDRLP4 12+48 +INDIRF4 +ADDRLP4 248 +INDIRF4 +ADDF4 +ASGNF4 +line 899 +;899: verts[2].xyz[1] += cosR; +ADDRLP4 12+48+4 +ADDRLP4 12+48+4 +INDIRF4 +ADDRLP4 252 +INDIRF4 +ADDF4 +ASGNF4 +line 900 +;900: verts[2].st[0] = 1; +ADDRLP4 12+48+12 +CNSTF4 1065353216 +ASGNF4 +line 901 +;901: verts[2].st[1] = 1; +ADDRLP4 12+48+12+4 +CNSTF4 1065353216 +ASGNF4 +line 902 +;902: verts[2].modulate[0] = 255 * color[0]; +ADDRLP4 384 +CNSTF4 1132396544 +ADDRLP4 184 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 388 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 384 +INDIRF4 +ADDRLP4 388 +INDIRF4 +LTF4 $1110 +ADDRLP4 380 +ADDRLP4 384 +INDIRF4 +ADDRLP4 388 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1111 +JUMPV +LABELV $1110 +ADDRLP4 380 +ADDRLP4 384 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1111 +ADDRLP4 12+48+20 +ADDRLP4 380 +INDIRU4 +CVUU1 4 +ASGNU1 +line 903 +;903: verts[2].modulate[1] = 255 * color[1]; +ADDRLP4 396 +CNSTF4 1132396544 +ADDRLP4 184+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 400 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 396 +INDIRF4 +ADDRLP4 400 +INDIRF4 +LTF4 $1117 +ADDRLP4 392 +ADDRLP4 396 +INDIRF4 +ADDRLP4 400 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1118 +JUMPV +LABELV $1117 +ADDRLP4 392 +ADDRLP4 396 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1118 +ADDRLP4 12+48+20+1 +ADDRLP4 392 +INDIRU4 +CVUU1 4 +ASGNU1 +line 904 +;904: verts[2].modulate[2] = 255 * color[2]; +ADDRLP4 408 +CNSTF4 1132396544 +ADDRLP4 184+8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 412 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 408 +INDIRF4 +ADDRLP4 412 +INDIRF4 +LTF4 $1124 +ADDRLP4 404 +ADDRLP4 408 +INDIRF4 +ADDRLP4 412 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1125 +JUMPV +LABELV $1124 +ADDRLP4 404 +ADDRLP4 408 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1125 +ADDRLP4 12+48+20+2 +ADDRLP4 404 +INDIRU4 +CVUU1 4 +ASGNU1 +line 905 +;905: verts[2].modulate[3] = 255; +ADDRLP4 12+48+20+3 +CNSTU1 255 +ASGNU1 +line 907 +;906: +;907: VectorCopy (org, verts[3].xyz); +ADDRLP4 12+72 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 908 +;908: verts[3].xyz[0] += cosR; +ADDRLP4 12+72 +ADDRLP4 12+72 +INDIRF4 +ADDRLP4 252 +INDIRF4 +ADDF4 +ASGNF4 +line 909 +;909: verts[3].xyz[1] -= sinR; +ADDRLP4 12+72+4 +ADDRLP4 12+72+4 +INDIRF4 +ADDRLP4 248 +INDIRF4 +SUBF4 +ASGNF4 +line 910 +;910: verts[3].st[0] = 1; +ADDRLP4 12+72+12 +CNSTF4 1065353216 +ASGNF4 +line 911 +;911: verts[3].st[1] = 0; +ADDRLP4 12+72+12+4 +CNSTF4 0 +ASGNF4 +line 912 +;912: verts[3].modulate[0] = 255 * color[0]; +ADDRLP4 420 +CNSTF4 1132396544 +ADDRLP4 184 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 424 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 420 +INDIRF4 +ADDRLP4 424 +INDIRF4 +LTF4 $1141 +ADDRLP4 416 +ADDRLP4 420 +INDIRF4 +ADDRLP4 424 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1142 +JUMPV +LABELV $1141 +ADDRLP4 416 +ADDRLP4 420 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1142 +ADDRLP4 12+72+20 +ADDRLP4 416 +INDIRU4 +CVUU1 4 +ASGNU1 +line 913 +;913: verts[3].modulate[1] = 255 * color[1]; +ADDRLP4 432 +CNSTF4 1132396544 +ADDRLP4 184+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 436 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 432 +INDIRF4 +ADDRLP4 436 +INDIRF4 +LTF4 $1148 +ADDRLP4 428 +ADDRLP4 432 +INDIRF4 +ADDRLP4 436 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1149 +JUMPV +LABELV $1148 +ADDRLP4 428 +ADDRLP4 432 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1149 +ADDRLP4 12+72+20+1 +ADDRLP4 428 +INDIRU4 +CVUU1 4 +ASGNU1 +line 914 +;914: verts[3].modulate[2] = 255 * color[2]; +ADDRLP4 444 +CNSTF4 1132396544 +ADDRLP4 184+8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 448 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 444 +INDIRF4 +ADDRLP4 448 +INDIRF4 +LTF4 $1155 +ADDRLP4 440 +ADDRLP4 444 +INDIRF4 +ADDRLP4 448 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1156 +JUMPV +LABELV $1155 +ADDRLP4 440 +ADDRLP4 444 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1156 +ADDRLP4 12+72+20+2 +ADDRLP4 440 +INDIRU4 +CVUU1 4 +ASGNU1 +line 915 +;915: verts[3].modulate[3] = 255; +ADDRLP4 12+72+20+3 +CNSTU1 255 +ASGNU1 +line 916 +;916: } +ADDRGP4 $1033 +JUMPV +LABELV $1032 +line 917 +;917: else if (p->type == P_FLAT) +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1160 +line 918 +;918: { +line 920 +;919: +;920: VectorCopy (org, verts[0].xyz); +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 921 +;921: verts[0].xyz[0] -= p->height; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 922 +;922: verts[0].xyz[1] -= p->width; +ADDRLP4 12+4 +ADDRLP4 12+4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 923 +;923: verts[0].st[0] = 0; +ADDRLP4 12+12 +CNSTF4 0 +ASGNF4 +line 924 +;924: verts[0].st[1] = 0; +ADDRLP4 12+12+4 +CNSTF4 0 +ASGNF4 +line 925 +;925: verts[0].modulate[0] = 255; +ADDRLP4 12+20 +CNSTU1 255 +ASGNU1 +line 926 +;926: verts[0].modulate[1] = 255; +ADDRLP4 12+20+1 +CNSTU1 255 +ASGNU1 +line 927 +;927: verts[0].modulate[2] = 255; +ADDRLP4 12+20+2 +CNSTU1 255 +ASGNU1 +line 928 +;928: verts[0].modulate[3] = 255; +ADDRLP4 12+20+3 +CNSTU1 255 +ASGNU1 +line 930 +;929: +;930: VectorCopy (org, verts[1].xyz); +ADDRLP4 12+24 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 931 +;931: verts[1].xyz[0] -= p->height; +ADDRLP4 12+24 +ADDRLP4 12+24 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 932 +;932: verts[1].xyz[1] += p->width; +ADDRLP4 12+24+4 +ADDRLP4 12+24+4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 933 +;933: verts[1].st[0] = 0; +ADDRLP4 12+24+12 +CNSTF4 0 +ASGNF4 +line 934 +;934: verts[1].st[1] = 1; +ADDRLP4 12+24+12+4 +CNSTF4 1065353216 +ASGNF4 +line 935 +;935: verts[1].modulate[0] = 255; +ADDRLP4 12+24+20 +CNSTU1 255 +ASGNU1 +line 936 +;936: verts[1].modulate[1] = 255; +ADDRLP4 12+24+20+1 +CNSTU1 255 +ASGNU1 +line 937 +;937: verts[1].modulate[2] = 255; +ADDRLP4 12+24+20+2 +CNSTU1 255 +ASGNU1 +line 938 +;938: verts[1].modulate[3] = 255; +ADDRLP4 12+24+20+3 +CNSTU1 255 +ASGNU1 +line 940 +;939: +;940: VectorCopy (org, verts[2].xyz); +ADDRLP4 12+48 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 941 +;941: verts[2].xyz[0] += p->height; +ADDRLP4 12+48 +ADDRLP4 12+48 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 942 +;942: verts[2].xyz[1] += p->width; +ADDRLP4 12+48+4 +ADDRLP4 12+48+4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 943 +;943: verts[2].st[0] = 1; +ADDRLP4 12+48+12 +CNSTF4 1065353216 +ASGNF4 +line 944 +;944: verts[2].st[1] = 1; +ADDRLP4 12+48+12+4 +CNSTF4 1065353216 +ASGNF4 +line 945 +;945: verts[2].modulate[0] = 255; +ADDRLP4 12+48+20 +CNSTU1 255 +ASGNU1 +line 946 +;946: verts[2].modulate[1] = 255; +ADDRLP4 12+48+20+1 +CNSTU1 255 +ASGNU1 +line 947 +;947: verts[2].modulate[2] = 255; +ADDRLP4 12+48+20+2 +CNSTU1 255 +ASGNU1 +line 948 +;948: verts[2].modulate[3] = 255; +ADDRLP4 12+48+20+3 +CNSTU1 255 +ASGNU1 +line 950 +;949: +;950: VectorCopy (org, verts[3].xyz); +ADDRLP4 12+72 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 951 +;951: verts[3].xyz[0] += p->height; +ADDRLP4 12+72 +ADDRLP4 12+72 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 952 +;952: verts[3].xyz[1] -= p->width; +ADDRLP4 12+72+4 +ADDRLP4 12+72+4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 953 +;953: verts[3].st[0] = 1; +ADDRLP4 12+72+12 +CNSTF4 1065353216 +ASGNF4 +line 954 +;954: verts[3].st[1] = 0; +ADDRLP4 12+72+12+4 +CNSTF4 0 +ASGNF4 +line 955 +;955: verts[3].modulate[0] = 255; +ADDRLP4 12+72+20 +CNSTU1 255 +ASGNU1 +line 956 +;956: verts[3].modulate[1] = 255; +ADDRLP4 12+72+20+1 +CNSTU1 255 +ASGNU1 +line 957 +;957: verts[3].modulate[2] = 255; +ADDRLP4 12+72+20+2 +CNSTU1 255 +ASGNU1 +line 958 +;958: verts[3].modulate[3] = 255; +ADDRLP4 12+72+20+3 +CNSTU1 255 +ASGNU1 +line 960 +;959: +;960: } +ADDRGP4 $1161 +JUMPV +LABELV $1160 +line 962 +;961: // Ridah +;962: else if (p->type == P_ANIM) { +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $1233 +line 967 +;963: vec3_t rr, ru; +;964: vec3_t rotate_ang; +;965: int i, j; +;966: +;967: time = cg.time - p->time; +ADDRLP4 232 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 968 +;968: time2 = p->endtime - p->time; +ADDRLP4 292 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 236 +ADDRLP4 292 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 292 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 969 +;969: ratio = time / time2; +ADDRLP4 200 +ADDRLP4 232 +INDIRF4 +ADDRLP4 236 +INDIRF4 +DIVF4 +ASGNF4 +line 970 +;970: if (ratio >= 1.0f) { +ADDRLP4 200 +INDIRF4 +CNSTF4 1065353216 +LTF4 $1236 +line 971 +;971: ratio = 0.9999f; +ADDRLP4 200 +CNSTF4 1065351538 +ASGNF4 +line 972 +;972: } +LABELV $1236 +line 974 +;973: +;974: width = p->width + ( ratio * ( p->endwidth - p->width) ); +ADDRLP4 296 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 300 +ADDRLP4 296 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 196 +ADDRLP4 300 +INDIRF4 +ADDRLP4 200 +INDIRF4 +ADDRLP4 296 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +ADDRLP4 300 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 975 +;975: height = p->height + ( ratio * ( p->endheight - p->height) ); +ADDRLP4 304 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 308 +ADDRLP4 304 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 180 +ADDRLP4 308 +INDIRF4 +ADDRLP4 200 +INDIRF4 +ADDRLP4 304 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +ADDRLP4 308 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 978 +;976: +;977: // if we are "inside" this sprite, don't draw +;978: if (Distance( cg.snap->ps.origin, org ) < width/1.5) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 64 +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 312 +ADDRGP4 Distance +CALLF4 +ASGNF4 +ADDRLP4 312 +INDIRF4 +ADDRLP4 196 +INDIRF4 +CNSTF4 1069547520 +DIVF4 +GEF4 $1238 +line 979 +;979: return; +ADDRGP4 $306 +JUMPV +LABELV $1238 +line 982 +;980: } +;981: +;982: i = p->shaderAnim; +ADDRLP4 272 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +ASGNI4 +line 983 +;983: j = (int)floor(ratio * shaderAnimCounts[p->shaderAnim]); +ADDRLP4 200 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 shaderAnimCounts +ADDP4 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 316 +ADDRGP4 floor +CALLF4 +ASGNF4 +ADDRLP4 276 +ADDRLP4 316 +INDIRF4 +CVFI4 4 +ASGNI4 +line 984 +;984: p->pshader = shaderAnims[i][j]; +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 276 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 272 +INDIRI4 +CNSTI4 8 +LSHI4 +ADDRGP4 shaderAnims +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 986 +;985: +;986: if (p->roll) { +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1241 +line 987 +;987: vectoangles( cg.refdef.viewaxis[0], rotate_ang ); +ADDRGP4 cg+3616+36 +ARGP4 +ADDRLP4 280 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 988 +;988: rotate_ang[ROLL] += p->roll; +ADDRLP4 280+8 +ADDRLP4 280+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 989 +;989: AngleVectors ( rotate_ang, NULL, rr, ru); +ADDRLP4 280 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRLP4 260 +ARGP4 +ADDRLP4 248 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 990 +;990: } +LABELV $1241 +line 992 +;991: +;992: if (p->roll) { +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1246 +line 993 +;993: VectorMA (org, -height, ru, point); +ADDRLP4 320 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 324 +ADDRLP4 180 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 320 +INDIRP4 +INDIRF4 +ADDRLP4 248 +INDIRF4 +ADDRLP4 324 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 320 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 248+4 +INDIRF4 +ADDRLP4 324 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 248+8 +INDIRF4 +ADDRLP4 180 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 994 +;994: VectorMA (point, -width, rr, point); +ADDRLP4 328 +ADDRLP4 196 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 260 +INDIRF4 +ADDRLP4 328 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 260+4 +INDIRF4 +ADDRLP4 328 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 260+8 +INDIRF4 +ADDRLP4 196 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 995 +;995: } else { +ADDRGP4 $1247 +JUMPV +LABELV $1246 +line 996 +;996: VectorMA (org, -height, pvup, point); +ADDRLP4 320 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 324 +ADDRLP4 180 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 320 +INDIRP4 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 324 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 320 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 324 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +ADDRLP4 180 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 997 +;997: VectorMA (point, -width, pvright, point); +ADDRLP4 328 +ADDRLP4 196 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 328 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 328 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +ADDRLP4 196 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 998 +;998: } +LABELV $1247 +line 999 +;999: VectorCopy (point, verts[0].xyz); +ADDRLP4 12 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 1000 +;1000: verts[0].st[0] = 0; +ADDRLP4 12+12 +CNSTF4 0 +ASGNF4 +line 1001 +;1001: verts[0].st[1] = 0; +ADDRLP4 12+12+4 +CNSTF4 0 +ASGNF4 +line 1002 +;1002: verts[0].modulate[0] = 255; +ADDRLP4 12+20 +CNSTU1 255 +ASGNU1 +line 1003 +;1003: verts[0].modulate[1] = 255; +ADDRLP4 12+20+1 +CNSTU1 255 +ASGNU1 +line 1004 +;1004: verts[0].modulate[2] = 255; +ADDRLP4 12+20+2 +CNSTU1 255 +ASGNU1 +line 1005 +;1005: verts[0].modulate[3] = 255; +ADDRLP4 12+20+3 +CNSTU1 255 +ASGNU1 +line 1007 +;1006: +;1007: if (p->roll) { +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1278 +line 1008 +;1008: VectorMA (point, 2*height, ru, point); +ADDRLP4 320 +CNSTF4 1073741824 +ADDRLP4 180 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 248 +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 248+4 +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 248+8 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 180 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 1009 +;1009: } else { +ADDRGP4 $1279 +JUMPV +LABELV $1278 +line 1010 +;1010: VectorMA (point, 2*height, pvup, point); +ADDRLP4 320 +CNSTF4 1073741824 +ADDRLP4 180 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 180 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 1011 +;1011: } +LABELV $1279 +line 1012 +;1012: VectorCopy (point, verts[1].xyz); +ADDRLP4 12+24 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 1013 +;1013: verts[1].st[0] = 0; +ADDRLP4 12+24+12 +CNSTF4 0 +ASGNF4 +line 1014 +;1014: verts[1].st[1] = 1; +ADDRLP4 12+24+12+4 +CNSTF4 1065353216 +ASGNF4 +line 1015 +;1015: verts[1].modulate[0] = 255; +ADDRLP4 12+24+20 +CNSTU1 255 +ASGNU1 +line 1016 +;1016: verts[1].modulate[1] = 255; +ADDRLP4 12+24+20+1 +CNSTU1 255 +ASGNU1 +line 1017 +;1017: verts[1].modulate[2] = 255; +ADDRLP4 12+24+20+2 +CNSTU1 255 +ASGNU1 +line 1018 +;1018: verts[1].modulate[3] = 255; +ADDRLP4 12+24+20+3 +CNSTU1 255 +ASGNU1 +line 1020 +;1019: +;1020: if (p->roll) { +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1309 +line 1021 +;1021: VectorMA (point, 2*width, rr, point); +ADDRLP4 320 +CNSTF4 1073741824 +ADDRLP4 196 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 260 +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 260+4 +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 260+8 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 196 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 1022 +;1022: } else { +ADDRGP4 $1310 +JUMPV +LABELV $1309 +line 1023 +;1023: VectorMA (point, 2*width, pvright, point); +ADDRLP4 320 +CNSTF4 1073741824 +ADDRLP4 196 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvright +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvright+4 +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvright+8 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 196 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 1024 +;1024: } +LABELV $1310 +line 1025 +;1025: VectorCopy (point, verts[2].xyz); +ADDRLP4 12+48 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 1026 +;1026: verts[2].st[0] = 1; +ADDRLP4 12+48+12 +CNSTF4 1065353216 +ASGNF4 +line 1027 +;1027: verts[2].st[1] = 1; +ADDRLP4 12+48+12+4 +CNSTF4 1065353216 +ASGNF4 +line 1028 +;1028: verts[2].modulate[0] = 255; +ADDRLP4 12+48+20 +CNSTU1 255 +ASGNU1 +line 1029 +;1029: verts[2].modulate[1] = 255; +ADDRLP4 12+48+20+1 +CNSTU1 255 +ASGNU1 +line 1030 +;1030: verts[2].modulate[2] = 255; +ADDRLP4 12+48+20+2 +CNSTU1 255 +ASGNU1 +line 1031 +;1031: verts[2].modulate[3] = 255; +ADDRLP4 12+48+20+3 +CNSTU1 255 +ASGNU1 +line 1033 +;1032: +;1033: if (p->roll) { +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1340 +line 1034 +;1034: VectorMA (point, -2*height, ru, point); +ADDRLP4 320 +CNSTF4 3221225472 +ADDRLP4 180 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 248 +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 248+4 +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 248+8 +INDIRF4 +CNSTF4 3221225472 +ADDRLP4 180 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 1035 +;1035: } else { +ADDRGP4 $1341 +JUMPV +LABELV $1340 +line 1036 +;1036: VectorMA (point, -2*height, pvup, point); +ADDRLP4 320 +CNSTF4 3221225472 +ADDRLP4 180 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 pvup +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 pvup+4 +INDIRF4 +ADDRLP4 320 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 pvup+8 +INDIRF4 +CNSTF4 3221225472 +ADDRLP4 180 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 1037 +;1037: } +LABELV $1341 +line 1038 +;1038: VectorCopy (point, verts[3].xyz); +ADDRLP4 12+72 +ADDRLP4 0 +INDIRB +ASGNB 12 +line 1039 +;1039: verts[3].st[0] = 1; +ADDRLP4 12+72+12 +CNSTF4 1065353216 +ASGNF4 +line 1040 +;1040: verts[3].st[1] = 0; +ADDRLP4 12+72+12+4 +CNSTF4 0 +ASGNF4 +line 1041 +;1041: verts[3].modulate[0] = 255; +ADDRLP4 12+72+20 +CNSTU1 255 +ASGNU1 +line 1042 +;1042: verts[3].modulate[1] = 255; +ADDRLP4 12+72+20+1 +CNSTU1 255 +ASGNU1 +line 1043 +;1043: verts[3].modulate[2] = 255; +ADDRLP4 12+72+20+2 +CNSTU1 255 +ASGNU1 +line 1044 +;1044: verts[3].modulate[3] = 255; +ADDRLP4 12+72+20+3 +CNSTU1 255 +ASGNU1 +line 1045 +;1045: } +LABELV $1233 +LABELV $1161 +LABELV $1033 +LABELV $913 +LABELV $671 +LABELV $536 +LABELV $308 +line 1048 +;1046: // done. +;1047: +;1048: if (!p->pshader) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1371 +line 1051 +;1049:// (SA) temp commented out for DM +;1050:// CG_Printf ("CG_AddParticleToScene type %d p->pshader == ZERO\n", p->type); +;1051: return; +ADDRGP4 $306 +JUMPV +LABELV $1371 +line 1054 +;1052: } +;1053: +;1054: if (p->type == P_WEATHER || p->type == P_WEATHER_TURBULENT || p->type == P_WEATHER_FLURRY) +ADDRLP4 248 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 248 +INDIRI4 +CNSTI4 1 +EQI4 $1376 +ADDRLP4 248 +INDIRI4 +CNSTI4 5 +EQI4 $1376 +ADDRLP4 248 +INDIRI4 +CNSTI4 11 +NEI4 $1373 +LABELV $1376 +line 1055 +;1055: trap_R_AddPolyToScene( p->pshader, 3, TRIverts ); +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 108 +ARGP4 +ADDRGP4 trap_R_AddPolyToScene +CALLV +pop +ADDRGP4 $1374 +JUMPV +LABELV $1373 +line 1057 +;1056: else +;1057: trap_R_AddPolyToScene( p->pshader, 4, verts ); +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRLP4 12 +ARGP4 +ADDRGP4 trap_R_AddPolyToScene +CALLV +pop +LABELV $1374 +line 1059 +;1058: +;1059:} +LABELV $306 +endproc CG_AddParticleToScene 472 16 +data +align 4 +LABELV roll +byte 4 0 +export CG_AddParticles +code +proc CG_AddParticles 96 16 +line 1070 +;1060: +;1061:// Ridah, made this static so it doesn't interfere with other files +;1062:static float roll = 0.0; +;1063: +;1064:/* +;1065:=============== +;1066:CG_AddParticles +;1067:=============== +;1068:*/ +;1069:void CG_AddParticles (void) +;1070:{ +line 1080 +;1071: cparticle_t *p, *next; +;1072: float alpha; +;1073: float time, time2; +;1074: vec3_t org; +;1075: int color; +;1076: cparticle_t *active, *tail; +;1077: int type; +;1078: vec3_t rotate_ang; +;1079: +;1080: if (!initparticles) +ADDRGP4 initparticles +INDIRI4 +CNSTI4 0 +NEI4 $1378 +line 1081 +;1081: CG_ClearParticles (); +ADDRGP4 CG_ClearParticles +CALLV +pop +LABELV $1378 +line 1083 +;1082: +;1083: VectorCopy( cg.refdef.viewaxis[0], pvforward ); +ADDRGP4 pvforward +ADDRGP4 cg+3616+36 +INDIRB +ASGNB 12 +line 1084 +;1084: VectorCopy( cg.refdef.viewaxis[1], pvright ); +ADDRGP4 pvright +ADDRGP4 cg+3616+36+12 +INDIRB +ASGNB 12 +line 1085 +;1085: VectorCopy( cg.refdef.viewaxis[2], pvup ); +ADDRGP4 pvup +ADDRGP4 cg+3616+36+24 +INDIRB +ASGNB 12 +line 1087 +;1086: +;1087: vectoangles( cg.refdef.viewaxis[0], rotate_ang ); +ADDRGP4 cg+3616+36 +ARGP4 +ADDRLP4 48 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 1088 +;1088: roll += ((cg.time - oldtime) * 0.1) ; +ADDRLP4 60 +ADDRGP4 roll +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +CNSTF4 1036831949 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRGP4 oldtime +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 1089 +;1089: rotate_ang[ROLL] += (roll*0.9); +ADDRLP4 48+8 +ADDRLP4 48+8 +INDIRF4 +CNSTF4 1063675494 +ADDRGP4 roll +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1090 +;1090: AngleVectors ( rotate_ang, rforward, rright, rup); +ADDRLP4 48 +ARGP4 +ADDRGP4 rforward +ARGP4 +ADDRGP4 rright +ARGP4 +ADDRGP4 rup +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 1092 +;1091: +;1092: oldtime = cg.time; +ADDRGP4 oldtime +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1094 +;1093: +;1094: active = NULL; +ADDRLP4 44 +CNSTP4 0 +ASGNP4 +line 1095 +;1095: tail = NULL; +ADDRLP4 28 +CNSTP4 0 +ASGNP4 +line 1097 +;1096: +;1097: for (p=active_particles ; p ; p=next) +ADDRLP4 0 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +ADDRGP4 $1396 +JUMPV +LABELV $1393 +line 1098 +;1098: { +line 1100 +;1099: +;1100: next = p->next; +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1102 +;1101: +;1102: time = (cg.time - p->time)*0.001; +ADDRLP4 4 +CNSTF4 981668463 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 1104 +;1103: +;1104: alpha = p->alpha + time*p->alphavel; +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1105 +;1105: if (alpha <= 0) +ADDRLP4 8 +INDIRF4 +CNSTF4 0 +GTF4 $1398 +line 1106 +;1106: { // faded out +line 1107 +;1107: p->next = free_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1108 +;1108: free_particles = p; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1109 +;1109: p->type = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1110 +;1110: p->color = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1111 +;1111: p->alpha = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1112 +;1112: continue; +ADDRGP4 $1394 +JUMPV +LABELV $1398 +line 1115 +;1113: } +;1114: +;1115: if (p->type == P_SMOKE || p->type == P_ANIM || p->type == P_BLEED || p->type == P_SMOKE_IMPACT) +ADDRLP4 68 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 3 +EQI4 $1404 +ADDRLP4 68 +INDIRI4 +CNSTI4 6 +EQI4 $1404 +ADDRLP4 68 +INDIRI4 +CNSTI4 8 +EQI4 $1404 +ADDRLP4 68 +INDIRI4 +CNSTI4 12 +NEI4 $1400 +LABELV $1404 +line 1116 +;1116: { +line 1117 +;1117: if (cg.time > p->endtime) +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +LEF4 $1405 +line 1118 +;1118: { +line 1119 +;1119: p->next = free_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1120 +;1120: free_particles = p; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1121 +;1121: p->type = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1122 +;1122: p->color = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1123 +;1123: p->alpha = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1125 +;1124: +;1125: continue; +ADDRGP4 $1394 +JUMPV +LABELV $1405 +line 1128 +;1126: } +;1127: +;1128: } +LABELV $1400 +line 1130 +;1129: +;1130: if (p->type == P_WEATHER_FLURRY) +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 11 +NEI4 $1408 +line 1131 +;1131: { +line 1132 +;1132: if (cg.time > p->endtime) +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +LEF4 $1410 +line 1133 +;1133: { +line 1134 +;1134: p->next = free_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1135 +;1135: free_particles = p; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1136 +;1136: p->type = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1137 +;1137: p->color = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1138 +;1138: p->alpha = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1140 +;1139: +;1140: continue; +ADDRGP4 $1394 +JUMPV +LABELV $1410 +line 1142 +;1141: } +;1142: } +LABELV $1408 +line 1145 +;1143: +;1144: +;1145: if (p->type == P_FLAT_SCALEUP_FADE) +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 10 +NEI4 $1413 +line 1146 +;1146: { +line 1147 +;1147: if (cg.time > p->endtime) +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +LEF4 $1415 +line 1148 +;1148: { +line 1149 +;1149: p->next = free_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1150 +;1150: free_particles = p; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1151 +;1151: p->type = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1152 +;1152: p->color = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1153 +;1153: p->alpha = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1154 +;1154: continue; +ADDRGP4 $1394 +JUMPV +LABELV $1415 +line 1157 +;1155: } +;1156: +;1157: } +LABELV $1413 +line 1159 +;1158: +;1159: if ((p->type == P_BAT || p->type == P_SPRITE) && p->endtime < 0) { +ADDRLP4 72 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 7 +EQI4 $1420 +ADDRLP4 72 +INDIRI4 +CNSTI4 15 +NEI4 $1418 +LABELV $1420 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 0 +GEF4 $1418 +line 1161 +;1160: // temporary sprite +;1161: CG_AddParticleToScene (p, p->org, alpha); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 CG_AddParticleToScene +CALLV +pop +line 1162 +;1162: p->next = free_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1163 +;1163: free_particles = p; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1164 +;1164: p->type = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1165 +;1165: p->color = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1166 +;1166: p->alpha = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1167 +;1167: continue; +ADDRGP4 $1394 +JUMPV +LABELV $1418 +line 1170 +;1168: } +;1169: +;1170: p->next = NULL; +ADDRLP4 0 +INDIRP4 +CNSTP4 0 +ASGNP4 +line 1171 +;1171: if (!tail) +ADDRLP4 28 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1421 +line 1172 +;1172: active = tail = p; +ADDRLP4 28 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $1422 +JUMPV +LABELV $1421 +line 1174 +;1173: else +;1174: { +line 1175 +;1175: tail->next = p; +ADDRLP4 28 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1176 +;1176: tail = p; +ADDRLP4 28 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1177 +;1177: } +LABELV $1422 +line 1179 +;1178: +;1179: if (alpha > 1.0) +ADDRLP4 8 +INDIRF4 +CNSTF4 1065353216 +LEF4 $1423 +line 1180 +;1180: alpha = 1; +ADDRLP4 8 +CNSTF4 1065353216 +ASGNF4 +LABELV $1423 +line 1182 +;1181: +;1182: color = p->color; +ADDRLP4 36 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +ASGNI4 +line 1184 +;1183: +;1184: time2 = time*time; +ADDRLP4 12 +ADDRLP4 4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1186 +;1185: +;1186: org[0] = p->org[0] + p->vel[0]*time + p->accel[0]*time2; +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1187 +;1187: org[1] = p->org[1] + p->vel[1]*time + p->accel[1]*time2; +ADDRLP4 16+4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1188 +;1188: org[2] = p->org[2] + p->vel[2]*time + p->accel[2]*time2; +ADDRLP4 16+8 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1190 +;1189: +;1190: type = p->type; +ADDRLP4 40 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +ASGNI4 +line 1192 +;1191: +;1192: CG_AddParticleToScene (p, org, alpha); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 CG_AddParticleToScene +CALLV +pop +line 1193 +;1193: } +LABELV $1394 +line 1097 +ADDRLP4 0 +ADDRLP4 32 +INDIRP4 +ASGNP4 +LABELV $1396 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1393 +line 1195 +;1194: +;1195: active_particles = active; +ADDRGP4 active_particles +ADDRLP4 44 +INDIRP4 +ASGNP4 +line 1196 +;1196:} +LABELV $1377 +endproc CG_AddParticles 96 16 +export CG_ParticleSnowFlurry +proc CG_ParticleSnowFlurry 68 4 +line 1204 +;1197: +;1198:/* +;1199:====================== +;1200:CG_AddParticles +;1201:====================== +;1202:*/ +;1203:void CG_ParticleSnowFlurry (qhandle_t pshader, centity_t *cent) +;1204:{ +line 1206 +;1205: cparticle_t *p; +;1206: qboolean turb = qtrue; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 1208 +;1207: +;1208: if (!pshader) +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1428 +line 1209 +;1209: CG_Printf ("CG_ParticleSnowFlurry pshader == ZERO!\n"); +ADDRGP4 $1430 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1428 +line 1211 +;1210: +;1211: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1431 +line 1212 +;1212: return; +ADDRGP4 $1427 +JUMPV +LABELV $1431 +line 1213 +;1213: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1214 +;1214: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1215 +;1215: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 1216 +;1216: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1217 +;1217: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1218 +;1218: p->color = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1219 +;1219: p->alpha = 0.90f; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1063675494 +ASGNF4 +line 1220 +;1220: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1222 +;1221: +;1222: p->start = cent->currentState.origin2[0]; +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRF4 +ASGNF4 +line 1223 +;1223: p->end = cent->currentState.origin2[1]; +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRF4 +ASGNF4 +line 1225 +;1224: +;1225: p->endtime = cg.time + cent->currentState.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +ADDI4 +CVIF4 4 +ASGNF4 +line 1226 +;1226: p->startfade = cg.time + cent->currentState.time2; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +ADDI4 +CVIF4 4 +ASGNF4 +line 1228 +;1227: +;1228: p->pshader = pshader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1230 +;1229: +;1230: if (rand()%100 > 90) +ADDRLP4 8 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 100 +MODI4 +CNSTI4 90 +LEI4 $1436 +line 1231 +;1231: { +line 1232 +;1232: p->height = 32; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 1233 +;1233: p->width = 32; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 1234 +;1234: p->alpha = 0.10f; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1036831949 +ASGNF4 +line 1235 +;1235: } +ADDRGP4 $1437 +JUMPV +LABELV $1436 +line 1237 +;1236: else +;1237: { +line 1238 +;1238: p->height = 1; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1239 +;1239: p->width = 1; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1240 +;1240: } +LABELV $1437 +line 1242 +;1241: +;1242: p->vel[2] = -20; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 3248488448 +ASGNF4 +line 1244 +;1243: +;1244: p->type = P_WEATHER_FLURRY; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 11 +ASGNI4 +line 1246 +;1245: +;1246: if (turb) +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $1438 +line 1247 +;1247: p->vel[2] = -10; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 3240099840 +ASGNF4 +LABELV $1438 +line 1249 +;1248: +;1249: VectorCopy(cent->currentState.origin, p->org); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRB +ASGNB 12 +line 1251 +;1250: +;1251: p->org[0] = p->org[0]; +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ASGNF4 +line 1252 +;1252: p->org[1] = p->org[1]; +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +ASGNF4 +line 1253 +;1253: p->org[2] = p->org[2]; +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ASGNF4 +line 1255 +;1254: +;1255: p->vel[0] = p->vel[1] = 0; +ADDRLP4 28 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 28 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 1257 +;1256: +;1257: p->accel[0] = p->accel[1] = p->accel[2] = 0; +ADDRLP4 36 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 36 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 36 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 36 +INDIRF4 +ASGNF4 +line 1259 +;1258: +;1259: p->vel[0] += cent->currentState.angles[0] * 32 + (crandom() * 16); +ADDRLP4 40 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +CNSTF4 1107296256 +ADDRFP4 4 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRF4 +MULF4 +CNSTF4 1098907648 +CNSTF4 1073741824 +ADDRLP4 40 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ADDF4 +ASGNF4 +line 1260 +;1260: p->vel[1] += cent->currentState.angles[1] * 32 + (crandom() * 16); +ADDRLP4 48 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 52 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +CNSTF4 1107296256 +ADDRFP4 4 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRF4 +MULF4 +CNSTF4 1098907648 +CNSTF4 1073741824 +ADDRLP4 48 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ADDF4 +ASGNF4 +line 1261 +;1261: p->vel[2] += cent->currentState.angles[2]; +ADDRLP4 56 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 1263 +;1262: +;1263: if (turb) +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $1440 +line 1264 +;1264: { +line 1265 +;1265: p->accel[0] = crandom () * 16; +ADDRLP4 60 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +CNSTF4 1098907648 +CNSTF4 1073741824 +ADDRLP4 60 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 1266 +;1266: p->accel[1] = crandom () * 16; +ADDRLP4 64 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1098907648 +CNSTF4 1073741824 +ADDRLP4 64 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 1267 +;1267: } +LABELV $1440 +line 1269 +;1268: +;1269:} +LABELV $1427 +endproc CG_ParticleSnowFlurry 68 4 +export CG_ParticleSnow +proc CG_ParticleSnow 56 4 +line 1272 +;1270: +;1271:void CG_ParticleSnow (qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb, float range, int snum) +;1272:{ +line 1275 +;1273: cparticle_t *p; +;1274: +;1275: if (!pshader) +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1443 +line 1276 +;1276: CG_Printf ("CG_ParticleSnow pshader == ZERO!\n"); +ADDRGP4 $1445 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1443 +line 1278 +;1277: +;1278: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1446 +line 1279 +;1279: return; +ADDRGP4 $1442 +JUMPV +LABELV $1446 +line 1280 +;1280: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1281 +;1281: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1282 +;1282: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 1283 +;1283: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1284 +;1284: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1285 +;1285: p->color = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1286 +;1286: p->alpha = 0.40f; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1053609165 +ASGNF4 +line 1287 +;1287: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1288 +;1288: p->start = origin[2]; +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 1289 +;1289: p->end = origin2[2]; +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 1290 +;1290: p->pshader = pshader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1291 +;1291: p->height = 1; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1292 +;1292: p->width = 1; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1294 +;1293: +;1294: p->vel[2] = -50; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 3259498496 +ASGNF4 +line 1296 +;1295: +;1296: if (turb) +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $1449 +line 1297 +;1297: { +line 1298 +;1298: p->type = P_WEATHER_TURBULENT; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 5 +ASGNI4 +line 1299 +;1299: p->vel[2] = -50 * 1.3; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 3263299584 +ASGNF4 +line 1300 +;1300: } +ADDRGP4 $1450 +JUMPV +LABELV $1449 +line 1302 +;1301: else +;1302: { +line 1303 +;1303: p->type = P_WEATHER; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1304 +;1304: } +LABELV $1450 +line 1306 +;1305: +;1306: VectorCopy(origin, p->org); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 1308 +;1307: +;1308: p->org[0] = p->org[0] + ( crandom() * range); +ADDRLP4 4 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 4 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +ADDRFP4 16 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1309 +;1309: p->org[1] = p->org[1] + ( crandom() * range); +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 12 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +ADDRFP4 16 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1310 +;1310: p->org[2] = p->org[2] + ( crandom() * (p->start - p->end)); +ADDRLP4 20 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 20 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 1312 +;1311: +;1312: p->vel[0] = p->vel[1] = 0; +ADDRLP4 36 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 36 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 36 +INDIRF4 +ASGNF4 +line 1314 +;1313: +;1314: p->accel[0] = p->accel[1] = p->accel[2] = 0; +ADDRLP4 44 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 44 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 44 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 44 +INDIRF4 +ASGNF4 +line 1316 +;1315: +;1316: if (turb) +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $1451 +line 1317 +;1317: { +line 1318 +;1318: p->vel[0] = crandom() * 16; +ADDRLP4 48 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 1098907648 +CNSTF4 1073741824 +ADDRLP4 48 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 1319 +;1319: p->vel[1] = crandom() * 16; +ADDRLP4 52 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 1098907648 +CNSTF4 1073741824 +ADDRLP4 52 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 1320 +;1320: } +LABELV $1451 +line 1323 +;1321: +;1322: // Rafael snow pvs check +;1323: p->snum = snum; +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRFP4 20 +INDIRI4 +ASGNI4 +line 1324 +;1324: p->link = qtrue; +ADDRLP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1326 +;1325: +;1326:} +LABELV $1442 +endproc CG_ParticleSnow 56 4 +export CG_ParticleBubble +proc CG_ParticleBubble 68 4 +line 1329 +;1327: +;1328:void CG_ParticleBubble (qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb, float range, int snum) +;1329:{ +line 1333 +;1330: cparticle_t *p; +;1331: float randsize; +;1332: +;1333: if (!pshader) +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1454 +line 1334 +;1334: CG_Printf ("CG_ParticleSnow pshader == ZERO!\n"); +ADDRGP4 $1445 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1454 +line 1336 +;1335: +;1336: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1456 +line 1337 +;1337: return; +ADDRGP4 $1453 +JUMPV +LABELV $1456 +line 1338 +;1338: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1339 +;1339: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1340 +;1340: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 1341 +;1341: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1342 +;1342: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1343 +;1343: p->color = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1344 +;1344: p->alpha = 0.40f; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1053609165 +ASGNF4 +line 1345 +;1345: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1346 +;1346: p->start = origin[2]; +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 1347 +;1347: p->end = origin2[2]; +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 1348 +;1348: p->pshader = pshader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1350 +;1349: +;1350: randsize = 1 + (crandom() * 0.5); +ADDRLP4 8 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 4 +CNSTF4 1056964608 +CNSTF4 1073741824 +ADDRLP4 8 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 1352 +;1351: +;1352: p->height = randsize; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 1353 +;1353: p->width = randsize; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 1355 +;1354: +;1355: p->vel[2] = 50 + ( crandom() * 10 ); +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 1092616192 +CNSTF4 1073741824 +ADDRLP4 12 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1112014848 +ADDF4 +ASGNF4 +line 1357 +;1356: +;1357: if (turb) +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $1459 +line 1358 +;1358: { +line 1359 +;1359: p->type = P_BUBBLE_TURBULENT; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 14 +ASGNI4 +line 1360 +;1360: p->vel[2] = 50 * 1.3; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 1115815936 +ASGNF4 +line 1361 +;1361: } +ADDRGP4 $1460 +JUMPV +LABELV $1459 +line 1363 +;1362: else +;1363: { +line 1364 +;1364: p->type = P_BUBBLE; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 13 +ASGNI4 +line 1365 +;1365: } +LABELV $1460 +line 1367 +;1366: +;1367: VectorCopy(origin, p->org); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 1369 +;1368: +;1369: p->org[0] = p->org[0] + ( crandom() * range); +ADDRLP4 16 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 16 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +ADDRFP4 16 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1370 +;1370: p->org[1] = p->org[1] + ( crandom() * range); +ADDRLP4 24 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 24 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +ADDRFP4 16 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1371 +;1371: p->org[2] = p->org[2] + ( crandom() * (p->start - p->end)); +ADDRLP4 32 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 36 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 32 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 1373 +;1372: +;1373: p->vel[0] = p->vel[1] = 0; +ADDRLP4 48 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 48 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 48 +INDIRF4 +ASGNF4 +line 1375 +;1374: +;1375: p->accel[0] = p->accel[1] = p->accel[2] = 0; +ADDRLP4 56 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 56 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 56 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 56 +INDIRF4 +ASGNF4 +line 1377 +;1376: +;1377: if (turb) +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $1461 +line 1378 +;1378: { +line 1379 +;1379: p->vel[0] = crandom() * 4; +ADDRLP4 60 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 1082130432 +CNSTF4 1073741824 +ADDRLP4 60 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 1380 +;1380: p->vel[1] = crandom() * 4; +ADDRLP4 64 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 1082130432 +CNSTF4 1073741824 +ADDRLP4 64 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 1381 +;1381: } +LABELV $1461 +line 1384 +;1382: +;1383: // Rafael snow pvs check +;1384: p->snum = snum; +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRFP4 20 +INDIRI4 +ASGNI4 +line 1385 +;1385: p->link = qtrue; +ADDRLP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1387 +;1386: +;1387:} +LABELV $1453 +endproc CG_ParticleBubble 68 4 +export CG_ParticleSmoke +proc CG_ParticleSmoke 28 4 +line 1390 +;1388: +;1389:void CG_ParticleSmoke (qhandle_t pshader, centity_t *cent) +;1390:{ +line 1396 +;1391: +;1392: // using cent->density = enttime +;1393: // cent->frame = startfade +;1394: cparticle_t *p; +;1395: +;1396: if (!pshader) +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1464 +line 1397 +;1397: CG_Printf ("CG_ParticleSmoke == ZERO!\n"); +ADDRGP4 $1466 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1464 +line 1399 +;1398: +;1399: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1467 +line 1400 +;1400: return; +ADDRGP4 $1463 +JUMPV +LABELV $1467 +line 1401 +;1401: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1402 +;1402: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1403 +;1403: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 1404 +;1404: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1405 +;1405: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1407 +;1406: +;1407: p->endtime = cg.time + cent->currentState.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +ADDI4 +CVIF4 4 +ASGNF4 +line 1408 +;1408: p->startfade = cg.time + cent->currentState.time2; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +ADDI4 +CVIF4 4 +ASGNF4 +line 1410 +;1409: +;1410: p->color = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1411 +;1411: p->alpha = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1412 +;1412: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1413 +;1413: p->start = cent->currentState.origin[2]; +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRF4 +ASGNF4 +line 1414 +;1414: p->end = cent->currentState.origin2[2]; +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRF4 +ASGNF4 +line 1415 +;1415: p->pshader = pshader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1416 +;1416: p->rotate = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1417 +;1417: p->height = 8; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1090519040 +ASGNF4 +line 1418 +;1418: p->width = 8; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1090519040 +ASGNF4 +line 1419 +;1419: p->endheight = 32; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 1420 +;1420: p->endwidth = 32; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 1421 +;1421: p->type = P_SMOKE; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 3 +ASGNI4 +line 1423 +;1422: +;1423: VectorCopy(cent->currentState.origin, p->org); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRB +ASGNB 12 +line 1425 +;1424: +;1425: p->vel[0] = p->vel[1] = 0; +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 1426 +;1426: p->accel[0] = p->accel[1] = p->accel[2] = 0; +ADDRLP4 16 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 1428 +;1427: +;1428: p->vel[2] = 5; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 1084227584 +ASGNF4 +line 1430 +;1429: +;1430: if (cent->currentState.frame == 1)// reverse gravity +ADDRFP4 4 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1472 +line 1431 +;1431: p->vel[2] *= -1; +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTF4 3212836864 +ADDRLP4 20 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +LABELV $1472 +line 1433 +;1432: +;1433: p->roll = 8 + (crandom() * 4); +ADDRLP4 24 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +CNSTF4 1082130432 +CNSTF4 1073741824 +ADDRLP4 24 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1090519040 +ADDF4 +CVFI4 4 +ASGNI4 +line 1434 +;1434:} +LABELV $1463 +endproc CG_ParticleSmoke 28 4 +export CG_ParticleBulletDebris +proc CG_ParticleBulletDebris 16 0 +line 1438 +;1435: +;1436: +;1437:void CG_ParticleBulletDebris (vec3_t org, vec3_t vel, int duration) +;1438:{ +line 1442 +;1439: +;1440: cparticle_t *p; +;1441: +;1442: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1475 +line 1443 +;1443: return; +ADDRGP4 $1474 +JUMPV +LABELV $1475 +line 1444 +;1444: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1445 +;1445: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1446 +;1446: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 1447 +;1447: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1448 +;1448: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1450 +;1449: +;1450: p->endtime = cg.time + duration; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRI4 +ADDI4 +CVIF4 4 +ASGNF4 +line 1451 +;1451: p->startfade = cg.time + duration/2; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRI4 +CNSTI4 2 +DIVI4 +ADDI4 +CVIF4 4 +ASGNF4 +line 1453 +;1452: +;1453: p->color = EMISIVEFADE; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 3 +ASGNI4 +line 1454 +;1454: p->alpha = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1455 +;1455: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1457 +;1456: +;1457: p->height = 0.5; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 1458 +;1458: p->width = 0.5; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 1459 +;1459: p->endheight = 0.5; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 1460 +;1460: p->endwidth = 0.5; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 1462 +;1461: +;1462: p->pshader = cgs.media.tracerShader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRGP4 cgs+70296+196 +INDIRI4 +ASGNI4 +line 1464 +;1463: +;1464: p->type = P_SMOKE; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 3 +ASGNI4 +line 1466 +;1465: +;1466: VectorCopy(org, p->org); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 1468 +;1467: +;1468: p->vel[0] = vel[0]; +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRF4 +ASGNF4 +line 1469 +;1469: p->vel[1] = vel[1]; +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 1470 +;1470: p->vel[2] = vel[2]; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 1471 +;1471: p->accel[0] = p->accel[1] = p->accel[2] = 0; +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 1473 +;1472: +;1473: p->accel[2] = -60; +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTF4 3262119936 +ASGNF4 +line 1474 +;1474: p->vel[2] += -20; +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +CNSTF4 3248488448 +ADDF4 +ASGNF4 +line 1476 +;1475: +;1476:} +LABELV $1474 +endproc CG_ParticleBulletDebris 16 0 +export CG_ParticleExplosion +proc CG_ParticleExplosion 16 8 +line 1485 +;1477: +;1478:/* +;1479:====================== +;1480:CG_ParticleExplosion +;1481:====================== +;1482:*/ +;1483: +;1484:void CG_ParticleExplosion (char *animStr, vec3_t origin, vec3_t vel, int duration, int sizeStart, int sizeEnd) +;1485:{ +line 1489 +;1486: cparticle_t *p; +;1487: int anim; +;1488: +;1489: if (animStr < (char *)10) +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 10 +GEU4 $1483 +line 1490 +;1490: CG_Error( "CG_ParticleExplosion: animStr is probably an index rather than a string" ); +ADDRGP4 $1485 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +LABELV $1483 +line 1493 +;1491: +;1492: // find the animation string +;1493: for (anim=0; shaderAnimNames[anim]; anim++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1489 +JUMPV +LABELV $1486 +line 1494 +;1494: if (!Q_stricmp( animStr, shaderAnimNames[anim] )) +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 shaderAnimNames +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $1490 +line 1495 +;1495: break; +ADDRGP4 $1488 +JUMPV +LABELV $1490 +line 1496 +;1496: } +LABELV $1487 +line 1493 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1489 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 shaderAnimNames +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1486 +LABELV $1488 +line 1497 +;1497: if (!shaderAnimNames[anim]) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 shaderAnimNames +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1492 +line 1498 +;1498: CG_Error("CG_ParticleExplosion: unknown animation string: %s\n", animStr); +ADDRGP4 $1494 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 1499 +;1499: return; +ADDRGP4 $1482 +JUMPV +LABELV $1492 +line 1502 +;1500: } +;1501: +;1502: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1495 +line 1503 +;1503: return; +ADDRGP4 $1482 +JUMPV +LABELV $1495 +line 1504 +;1504: p = free_particles; +ADDRLP4 4 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1505 +;1505: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 4 +INDIRP4 +INDIRP4 +ASGNP4 +line 1506 +;1506: p->next = active_particles; +ADDRLP4 4 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 1507 +;1507: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 1508 +;1508: p->time = cg.time; +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1509 +;1509: p->alpha = 0.5; +ADDRLP4 4 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 1510 +;1510: p->alphavel = 0; +ADDRLP4 4 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1512 +;1511: +;1512: if (duration < 0) { +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +GEI4 $1498 +line 1513 +;1513: duration *= -1; +ADDRFP4 12 +CNSTI4 -1 +ADDRFP4 12 +INDIRI4 +MULI4 +ASGNI4 +line 1514 +;1514: p->roll = 0; +ADDRLP4 4 +INDIRP4 +CNSTI4 116 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1515 +;1515: } else { +ADDRGP4 $1499 +JUMPV +LABELV $1498 +line 1516 +;1516: p->roll = crandom()*179; +ADDRLP4 8 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 116 +ADDP4 +CNSTF4 1127415808 +CNSTF4 1073741824 +ADDRLP4 8 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1517 +;1517: } +LABELV $1499 +line 1519 +;1518: +;1519: p->shaderAnim = anim; +ADDRLP4 4 +INDIRP4 +CNSTI4 112 +ADDP4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 1521 +;1520: +;1521: p->width = sizeStart; +ADDRLP4 4 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRFP4 16 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1522 +;1522: p->height = sizeStart*shaderAnimSTRatio[anim]; // for sprites that are stretch in either direction +ADDRLP4 4 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDRFP4 16 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 shaderAnimSTRatio +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 1524 +;1523: +;1524: p->endheight = sizeEnd; +ADDRLP4 4 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRFP4 20 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1525 +;1525: p->endwidth = sizeEnd*shaderAnimSTRatio[anim]; +ADDRLP4 4 +INDIRP4 +CNSTI4 84 +ADDP4 +ADDRFP4 20 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 shaderAnimSTRatio +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 1527 +;1526: +;1527: p->endtime = cg.time + duration; +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 12 +INDIRI4 +ADDI4 +CVIF4 4 +ASGNF4 +line 1529 +;1528: +;1529: p->type = P_ANIM; +ADDRLP4 4 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 6 +ASGNI4 +line 1531 +;1530: +;1531: VectorCopy( origin, p->org ); +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 1532 +;1532: VectorCopy( vel, p->vel ); +ADDRLP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRFP4 8 +INDIRP4 +INDIRB +ASGNB 12 +line 1533 +;1533: VectorClear( p->accel ); +ADDRLP4 12 +CNSTF4 0 +ASGNF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 1535 +;1534: +;1535:} +LABELV $1482 +endproc CG_ParticleExplosion 16 8 +export CG_AddParticleShrapnel +proc CG_AddParticleShrapnel 0 0 +line 1539 +;1536: +;1537:// Rafael Shrapnel +;1538:void CG_AddParticleShrapnel (localEntity_t *le) +;1539:{ +line 1540 +;1540: return; +LABELV $1501 +endproc CG_AddParticleShrapnel 0 0 +export CG_NewParticleArea +proc CG_NewParticleArea 92 24 +line 1545 +;1541:} +;1542:// done. +;1543: +;1544:int CG_NewParticleArea (int num) +;1545:{ +line 1552 +;1546: // const char *str; +;1547: char *str; +;1548: char *token; +;1549: int type; +;1550: vec3_t origin, origin2; +;1551: int i; +;1552: float range = 0; +ADDRLP4 40 +CNSTF4 0 +ASGNF4 +line 1557 +;1553: int turb; +;1554: int numparticles; +;1555: int snum; +;1556: +;1557: str = (char *) CG_ConfigString (num); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 56 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 56 +INDIRP4 +ASGNP4 +line 1558 +;1558: if (!str[0]) +ADDRLP4 8 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1503 +line 1559 +;1559: return (0); +CNSTI4 0 +RETI4 +ADDRGP4 $1502 +JUMPV +LABELV $1503 +line 1562 +;1560: +;1561: // returns type 128 64 or 32 +;1562: token = COM_Parse ((const char **)&str); +ADDRLP4 8 +ARGP4 +ADDRLP4 60 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 60 +INDIRP4 +ASGNP4 +line 1563 +;1563: type = atoi (token); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 64 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 36 +ADDRLP4 64 +INDIRI4 +ASGNI4 +line 1565 +;1564: +;1565: if (type == 1) +ADDRLP4 36 +INDIRI4 +CNSTI4 1 +NEI4 $1505 +line 1566 +;1566: range = 128; +ADDRLP4 40 +CNSTF4 1124073472 +ASGNF4 +ADDRGP4 $1506 +JUMPV +LABELV $1505 +line 1567 +;1567: else if (type == 2) +ADDRLP4 36 +INDIRI4 +CNSTI4 2 +NEI4 $1507 +line 1568 +;1568: range = 64; +ADDRLP4 40 +CNSTF4 1115684864 +ASGNF4 +ADDRGP4 $1508 +JUMPV +LABELV $1507 +line 1569 +;1569: else if (type == 3) +ADDRLP4 36 +INDIRI4 +CNSTI4 3 +NEI4 $1509 +line 1570 +;1570: range = 32; +ADDRLP4 40 +CNSTF4 1107296256 +ASGNF4 +ADDRGP4 $1510 +JUMPV +LABELV $1509 +line 1571 +;1571: else if (type == 0) +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +NEI4 $1511 +line 1572 +;1572: range = 256; +ADDRLP4 40 +CNSTF4 1132462080 +ASGNF4 +ADDRGP4 $1512 +JUMPV +LABELV $1511 +line 1573 +;1573: else if (type == 4) +ADDRLP4 36 +INDIRI4 +CNSTI4 4 +NEI4 $1513 +line 1574 +;1574: range = 8; +ADDRLP4 40 +CNSTF4 1090519040 +ASGNF4 +ADDRGP4 $1514 +JUMPV +LABELV $1513 +line 1575 +;1575: else if (type == 5) +ADDRLP4 36 +INDIRI4 +CNSTI4 5 +NEI4 $1515 +line 1576 +;1576: range = 16; +ADDRLP4 40 +CNSTF4 1098907648 +ASGNF4 +ADDRGP4 $1516 +JUMPV +LABELV $1515 +line 1577 +;1577: else if (type == 6) +ADDRLP4 36 +INDIRI4 +CNSTI4 6 +NEI4 $1517 +line 1578 +;1578: range = 32; +ADDRLP4 40 +CNSTF4 1107296256 +ASGNF4 +ADDRGP4 $1518 +JUMPV +LABELV $1517 +line 1579 +;1579: else if (type == 7) +ADDRLP4 36 +INDIRI4 +CNSTI4 7 +NEI4 $1519 +line 1580 +;1580: range = 64; +ADDRLP4 40 +CNSTF4 1115684864 +ASGNF4 +LABELV $1519 +LABELV $1518 +LABELV $1516 +LABELV $1514 +LABELV $1512 +LABELV $1510 +LABELV $1508 +LABELV $1506 +line 1583 +;1581: +;1582: +;1583: for (i=0; i<3; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $1521 +line 1584 +;1584: { +line 1585 +;1585: token = COM_Parse ((const char **)&str); +ADDRLP4 8 +ARGP4 +ADDRLP4 68 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 68 +INDIRP4 +ASGNP4 +line 1586 +;1586: origin[i] = atof (token); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 72 +ADDRGP4 atof +CALLF4 +ASGNF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 12 +ADDP4 +ADDRLP4 72 +INDIRF4 +ASGNF4 +line 1587 +;1587: } +LABELV $1522 +line 1583 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $1521 +line 1589 +;1588: +;1589: for (i=0; i<3; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $1525 +line 1590 +;1590: { +line 1591 +;1591: token = COM_Parse ((const char **)&str); +ADDRLP4 8 +ARGP4 +ADDRLP4 68 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 68 +INDIRP4 +ASGNP4 +line 1592 +;1592: origin2[i] = atof (token); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 72 +ADDRGP4 atof +CALLF4 +ASGNF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 24 +ADDP4 +ADDRLP4 72 +INDIRF4 +ASGNF4 +line 1593 +;1593: } +LABELV $1526 +line 1589 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $1525 +line 1595 +;1594: +;1595: token = COM_Parse ((const char **)&str); +ADDRLP4 8 +ARGP4 +ADDRLP4 68 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 68 +INDIRP4 +ASGNP4 +line 1596 +;1596: numparticles = atoi (token); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 72 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 48 +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 1598 +;1597: +;1598: token = COM_Parse ((const char **)&str); +ADDRLP4 8 +ARGP4 +ADDRLP4 76 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 76 +INDIRP4 +ASGNP4 +line 1599 +;1599: turb = atoi (token); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 80 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 44 +ADDRLP4 80 +INDIRI4 +ASGNI4 +line 1601 +;1600: +;1601: token = COM_Parse ((const char **)&str); +ADDRLP4 8 +ARGP4 +ADDRLP4 84 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 84 +INDIRP4 +ASGNP4 +line 1602 +;1602: snum = atoi (token); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 88 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 52 +ADDRLP4 88 +INDIRI4 +ASGNI4 +line 1604 +;1603: +;1604: for (i=0; i= 4) +ADDRLP4 36 +INDIRI4 +CNSTI4 4 +LTI4 $1533 +line 1607 +;1607: CG_ParticleBubble (cgs.media.waterBubbleShader, origin, origin2, turb, range, snum); +ADDRGP4 cgs+70296+256 +INDIRI4 +ARGI4 +ADDRLP4 12 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRF4 +ARGF4 +ADDRLP4 52 +INDIRI4 +ARGI4 +ADDRGP4 CG_ParticleBubble +CALLV +pop +ADDRGP4 $1534 +JUMPV +LABELV $1533 +line 1609 +;1608: else +;1609: CG_ParticleSnow (cgs.media.waterBubbleShader, origin, origin2, turb, range, snum); +ADDRGP4 cgs+70296+256 +INDIRI4 +ARGI4 +ADDRLP4 12 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRF4 +ARGF4 +ADDRLP4 52 +INDIRI4 +ARGI4 +ADDRGP4 CG_ParticleSnow +CALLV +pop +LABELV $1534 +line 1610 +;1610: } +LABELV $1530 +line 1604 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1532 +ADDRLP4 0 +INDIRI4 +ADDRLP4 48 +INDIRI4 +LTI4 $1529 +line 1612 +;1611: +;1612: return (1); +CNSTI4 1 +RETI4 +LABELV $1502 +endproc CG_NewParticleArea 92 24 +export CG_SnowLink +proc CG_SnowLink 16 0 +line 1616 +;1613:} +;1614: +;1615:void CG_SnowLink (centity_t *cent, qboolean particleOn) +;1616:{ +line 1620 +;1617: cparticle_t *p, *next; +;1618: int id; +;1619: +;1620: id = cent->currentState.frame; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRI4 +ASGNI4 +line 1622 +;1621: +;1622: for (p=active_particles ; p ; p=next) +ADDRLP4 0 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +ADDRGP4 $1543 +JUMPV +LABELV $1540 +line 1623 +;1623: { +line 1624 +;1624: next = p->next; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1626 +;1625: +;1626: if (p->type == P_WEATHER || p->type == P_WEATHER_TURBULENT) +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +EQI4 $1546 +ADDRLP4 12 +INDIRI4 +CNSTI4 5 +NEI4 $1544 +LABELV $1546 +line 1627 +;1627: { +line 1628 +;1628: if (p->snum == id) +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $1547 +line 1629 +;1629: { +line 1630 +;1630: if (particleOn) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $1549 +line 1631 +;1631: p->link = qtrue; +ADDRLP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTI4 1 +ASGNI4 +ADDRGP4 $1550 +JUMPV +LABELV $1549 +line 1633 +;1632: else +;1633: p->link = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTI4 0 +ASGNI4 +LABELV $1550 +line 1634 +;1634: } +LABELV $1547 +line 1635 +;1635: } +LABELV $1544 +line 1637 +;1636: +;1637: } +LABELV $1541 +line 1622 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +LABELV $1543 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1540 +line 1638 +;1638:} +LABELV $1539 +endproc CG_SnowLink 16 0 +export CG_ParticleImpactSmokePuff +proc CG_ParticleImpactSmokePuff 24 4 +line 1641 +;1639: +;1640:void CG_ParticleImpactSmokePuff (qhandle_t pshader, vec3_t origin) +;1641:{ +line 1644 +;1642: cparticle_t *p; +;1643: +;1644: if (!pshader) +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1552 +line 1645 +;1645: CG_Printf ("CG_ParticleImpactSmokePuff pshader == ZERO!\n"); +ADDRGP4 $1554 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1552 +line 1647 +;1646: +;1647: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1555 +line 1648 +;1648: return; +ADDRGP4 $1551 +JUMPV +LABELV $1555 +line 1649 +;1649: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1650 +;1650: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1651 +;1651: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 1652 +;1652: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1653 +;1653: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1654 +;1654: p->alpha = 0.25; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1048576000 +ASGNF4 +line 1655 +;1655: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1656 +;1656: p->roll = crandom()*179; +ADDRLP4 4 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +CNSTF4 1127415808 +CNSTF4 1073741824 +ADDRLP4 4 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1658 +;1657: +;1658: p->pshader = pshader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1660 +;1659: +;1660: p->endtime = cg.time + 1000; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1000 +ADDI4 +CVIF4 4 +ASGNF4 +line 1661 +;1661: p->startfade = cg.time + 100; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 100 +ADDI4 +CVIF4 4 +ASGNF4 +line 1663 +;1662: +;1663: p->width = rand()%4 + 8; +ADDRLP4 8 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRLP4 8 +INDIRI4 +CNSTI4 4 +MODI4 +CNSTI4 8 +ADDI4 +CVIF4 4 +ASGNF4 +line 1664 +;1664: p->height = rand()%4 + 8; +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDRLP4 12 +INDIRI4 +CNSTI4 4 +MODI4 +CNSTI4 8 +ADDI4 +CVIF4 4 +ASGNF4 +line 1666 +;1665: +;1666: p->endheight = p->height *2; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTF4 1073741824 +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 1667 +;1667: p->endwidth = p->width * 2; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1073741824 +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 1669 +;1668: +;1669: p->endtime = cg.time + 500; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 500 +ADDI4 +CVIF4 4 +ASGNF4 +line 1671 +;1670: +;1671: p->type = P_SMOKE_IMPACT; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 12 +ASGNI4 +line 1673 +;1672: +;1673: VectorCopy( origin, p->org ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 1674 +;1674: VectorSet(p->vel, 0, 0, 20); +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 1101004800 +ASGNF4 +line 1675 +;1675: VectorSet(p->accel, 0, 0, 20); +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTF4 1101004800 +ASGNF4 +line 1677 +;1676: +;1677: p->rotate = qtrue; +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1678 +;1678:} +LABELV $1551 +endproc CG_ParticleImpactSmokePuff 24 4 +export CG_Particle_Bleed +proc CG_Particle_Bleed 24 4 +line 1681 +;1679: +;1680:void CG_Particle_Bleed (qhandle_t pshader, vec3_t start, vec3_t dir, int fleshEntityNum, int duration) +;1681:{ +line 1684 +;1682: cparticle_t *p; +;1683: +;1684: if (!pshader) +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1562 +line 1685 +;1685: CG_Printf ("CG_Particle_Bleed pshader == ZERO!\n"); +ADDRGP4 $1564 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1562 +line 1687 +;1686: +;1687: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1565 +line 1688 +;1688: return; +ADDRGP4 $1561 +JUMPV +LABELV $1565 +line 1689 +;1689: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1690 +;1690: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1691 +;1691: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 1692 +;1692: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1693 +;1693: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1694 +;1694: p->alpha = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1695 +;1695: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1696 +;1696: p->roll = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1698 +;1697: +;1698: p->pshader = pshader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1700 +;1699: +;1700: p->endtime = cg.time + duration; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 16 +INDIRI4 +ADDI4 +CVIF4 4 +ASGNF4 +line 1702 +;1701: +;1702: if (fleshEntityNum) +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $1569 +line 1703 +;1703: p->startfade = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRGP4 $1570 +JUMPV +LABELV $1569 +line 1705 +;1704: else +;1705: p->startfade = cg.time + 100; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 100 +ADDI4 +CVIF4 4 +ASGNF4 +LABELV $1570 +line 1707 +;1706: +;1707: p->width = 4; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1082130432 +ASGNF4 +line 1708 +;1708: p->height = 4; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1082130432 +ASGNF4 +line 1710 +;1709: +;1710: p->endheight = 4+rand()%3; +ADDRLP4 4 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRLP4 4 +INDIRI4 +CNSTI4 3 +MODI4 +CNSTI4 4 +ADDI4 +CVIF4 4 +ASGNF4 +line 1711 +;1711: p->endwidth = p->endheight; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +ASGNF4 +line 1713 +;1712: +;1713: p->type = P_SMOKE; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 3 +ASGNI4 +line 1715 +;1714: +;1715: VectorCopy( start, p->org ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 1716 +;1716: p->vel[0] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1717 +;1717: p->vel[1] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1718 +;1718: p->vel[2] = -20; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 3248488448 +ASGNF4 +line 1719 +;1719: VectorClear( p->accel ); +ADDRLP4 16 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 1721 +;1720: +;1721: p->rotate = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1723 +;1722: +;1723: p->roll = rand()%179; +ADDRLP4 20 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDRLP4 20 +INDIRI4 +CNSTI4 179 +MODI4 +ASGNI4 +line 1725 +;1724: +;1725: p->color = BLOODRED; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 2 +ASGNI4 +line 1726 +;1726: p->alpha = 0.75; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1061158912 +ASGNF4 +line 1728 +;1727: +;1728:} +LABELV $1561 +endproc CG_Particle_Bleed 24 4 +export CG_Particle_OilParticle +proc CG_Particle_OilParticle 36 4 +line 1731 +;1729: +;1730:void CG_Particle_OilParticle (qhandle_t pshader, centity_t *cent) +;1731:{ +line 1738 +;1732: cparticle_t *p; +;1733: +;1734: int time; +;1735: int time2; +;1736: float ratio; +;1737: +;1738: float duration = 1500; +ADDRLP4 16 +CNSTF4 1153138688 +ASGNF4 +line 1740 +;1739: +;1740: time = cg.time; +ADDRLP4 8 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1741 +;1741: time2 = cg.time + cent->currentState.time; +ADDRLP4 12 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 1743 +;1742: +;1743: ratio =(float)1 - ((float)time / (float)time2); +ADDRLP4 4 +CNSTF4 1065353216 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +ASGNF4 +line 1745 +;1744: +;1745: if (!pshader) +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1576 +line 1746 +;1746: CG_Printf ("CG_Particle_OilParticle == ZERO!\n"); +ADDRGP4 $1578 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1576 +line 1748 +;1747: +;1748: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1579 +line 1749 +;1749: return; +ADDRGP4 $1573 +JUMPV +LABELV $1579 +line 1750 +;1750: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1751 +;1751: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1752 +;1752: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 1753 +;1753: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1754 +;1754: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1755 +;1755: p->alpha = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1756 +;1756: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1757 +;1757: p->roll = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1759 +;1758: +;1759: p->pshader = pshader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1761 +;1760: +;1761: p->endtime = cg.time + duration; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRLP4 16 +INDIRF4 +ADDF4 +ASGNF4 +line 1763 +;1762: +;1763: p->startfade = p->endtime; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 1765 +;1764: +;1765: p->width = 1; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1766 +;1766: p->height = 3; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1077936128 +ASGNF4 +line 1768 +;1767: +;1768: p->endheight = 3; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTF4 1077936128 +ASGNF4 +line 1769 +;1769: p->endwidth = 1; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1771 +;1770: +;1771: p->type = P_SMOKE; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 3 +ASGNI4 +line 1773 +;1772: +;1773: VectorCopy(cent->currentState.origin, p->org ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRB +ASGNB 12 +line 1775 +;1774: +;1775: p->vel[0] = (cent->currentState.origin2[0] * (16 * ratio)); +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +line 1776 +;1776: p->vel[1] = (cent->currentState.origin2[1] * (16 * ratio)); +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +line 1777 +;1777: p->vel[2] = (cent->currentState.origin2[2]); +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRF4 +ASGNF4 +line 1779 +;1778: +;1779: p->snum = 1.0f; +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1781 +;1780: +;1781: VectorClear( p->accel ); +ADDRLP4 28 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 28 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 28 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 1783 +;1782: +;1783: p->accel[2] = -20; +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTF4 3248488448 +ASGNF4 +line 1785 +;1784: +;1785: p->rotate = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1787 +;1786: +;1787: p->roll = rand()%179; +ADDRLP4 32 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDRLP4 32 +INDIRI4 +CNSTI4 179 +MODI4 +ASGNI4 +line 1789 +;1788: +;1789: p->alpha = 0.75; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1061158912 +ASGNF4 +line 1791 +;1790: +;1791:} +LABELV $1573 +endproc CG_Particle_OilParticle 36 4 +export CG_Particle_OilSlick +proc CG_Particle_OilSlick 36 4 +line 1795 +;1792: +;1793: +;1794:void CG_Particle_OilSlick (qhandle_t pshader, centity_t *cent) +;1795:{ +line 1798 +;1796: cparticle_t *p; +;1797: +;1798: if (!pshader) +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1584 +line 1799 +;1799: CG_Printf ("CG_Particle_OilSlick == ZERO!\n"); +ADDRGP4 $1586 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1584 +line 1801 +;1800: +;1801: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1587 +line 1802 +;1802: return; +ADDRGP4 $1583 +JUMPV +LABELV $1587 +line 1803 +;1803: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1804 +;1804: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1805 +;1805: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 1806 +;1806: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1807 +;1807: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1809 +;1808: +;1809: if (cent->currentState.angles2[2]) +ADDRFP4 4 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $1590 +line 1810 +;1810: p->endtime = cg.time + cent->currentState.angles2[2]; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRFP4 4 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRGP4 $1591 +JUMPV +LABELV $1590 +line 1812 +;1811: else +;1812: p->endtime = cg.time + 60000; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 60000 +ADDI4 +CVIF4 4 +ASGNF4 +LABELV $1591 +line 1814 +;1813: +;1814: p->startfade = p->endtime; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 1816 +;1815: +;1816: p->alpha = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1817 +;1817: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1818 +;1818: p->roll = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1820 +;1819: +;1820: p->pshader = pshader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1822 +;1821: +;1822: if (cent->currentState.angles2[0] || cent->currentState.angles2[1]) +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTF4 0 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRF4 +NEF4 $1596 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRF4 +EQF4 $1594 +LABELV $1596 +line 1823 +;1823: { +line 1824 +;1824: p->width = cent->currentState.angles2[0]; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRF4 +ASGNF4 +line 1825 +;1825: p->height = cent->currentState.angles2[0]; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRF4 +ASGNF4 +line 1827 +;1826: +;1827: p->endheight = cent->currentState.angles2[1]; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRF4 +ASGNF4 +line 1828 +;1828: p->endwidth = cent->currentState.angles2[1]; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRF4 +ASGNF4 +line 1829 +;1829: } +ADDRGP4 $1595 +JUMPV +LABELV $1594 +line 1831 +;1830: else +;1831: { +line 1832 +;1832: p->width = 8; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1090519040 +ASGNF4 +line 1833 +;1833: p->height = 8; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1090519040 +ASGNF4 +line 1835 +;1834: +;1835: p->endheight = 16; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTF4 1098907648 +ASGNF4 +line 1836 +;1836: p->endwidth = 16; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1098907648 +ASGNF4 +line 1837 +;1837: } +LABELV $1595 +line 1839 +;1838: +;1839: p->type = P_FLAT_SCALEUP; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 9 +ASGNI4 +line 1841 +;1840: +;1841: p->snum = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTI4 1 +ASGNI4 +line 1843 +;1842: +;1843: VectorCopy(cent->currentState.origin, p->org ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRB +ASGNB 12 +line 1845 +;1844: +;1845: p->org[2]+= 0.55 + (crandom() * 0.5); +ADDRLP4 16 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +CNSTF4 1056964608 +CNSTF4 1073741824 +ADDRLP4 16 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1057803469 +ADDF4 +ADDF4 +ASGNF4 +line 1847 +;1846: +;1847: p->vel[0] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1848 +;1848: p->vel[1] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1849 +;1849: p->vel[2] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1850 +;1850: VectorClear( p->accel ); +ADDRLP4 28 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 28 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 28 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 1852 +;1851: +;1852: p->rotate = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1854 +;1853: +;1854: p->roll = rand()%179; +ADDRLP4 32 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDRLP4 32 +INDIRI4 +CNSTI4 179 +MODI4 +ASGNI4 +line 1856 +;1855: +;1856: p->alpha = 0.75; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1061158912 +ASGNF4 +line 1858 +;1857: +;1858:} +LABELV $1583 +endproc CG_Particle_OilSlick 36 4 +export CG_OilSlickRemove +proc CG_OilSlickRemove 16 4 +line 1861 +;1859: +;1860:void CG_OilSlickRemove (centity_t *cent) +;1861:{ +line 1865 +;1862: cparticle_t *p, *next; +;1863: int id; +;1864: +;1865: id = 1.0f; +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +line 1867 +;1866: +;1867: if (!id) +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $1598 +line 1868 +;1868: CG_Printf ("CG_OilSlickRevove NULL id\n"); +ADDRGP4 $1600 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1598 +line 1870 +;1869: +;1870: for (p=active_particles ; p ; p=next) +ADDRLP4 0 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +ADDRGP4 $1604 +JUMPV +LABELV $1601 +line 1871 +;1871: { +line 1872 +;1872: next = p->next; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1874 +;1873: +;1874: if (p->type == P_FLAT_SCALEUP) +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 9 +NEI4 $1605 +line 1875 +;1875: { +line 1876 +;1876: if (p->snum == id) +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $1607 +line 1877 +;1877: { +line 1878 +;1878: p->endtime = cg.time + 100; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 100 +ADDI4 +CVIF4 4 +ASGNF4 +line 1879 +;1879: p->startfade = p->endtime; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 1880 +;1880: p->type = P_FLAT_SCALEUP_FADE; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 10 +ASGNI4 +line 1882 +;1881: +;1882: } +LABELV $1607 +line 1883 +;1883: } +LABELV $1605 +line 1885 +;1884: +;1885: } +LABELV $1602 +line 1870 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +LABELV $1604 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1601 +line 1886 +;1886:} +LABELV $1597 +endproc CG_OilSlickRemove 16 4 +export ValidBloodPool +proc ValidBloodPool 1220 28 +line 1889 +;1887: +;1888:qboolean ValidBloodPool (vec3_t start) +;1889:{ +line 1900 +;1890:#define EXTRUDE_DIST 0.5 +;1891: +;1892: vec3_t angles; +;1893: vec3_t right, up; +;1894: vec3_t this_pos, x_pos, center_pos, end_pos; +;1895: float x, y; +;1896: float fwidth, fheight; +;1897: trace_t trace; +;1898: vec3_t normal; +;1899: +;1900: fwidth = 16; +ADDRLP4 1176 +CNSTF4 1098907648 +ASGNF4 +line 1901 +;1901: fheight = 16; +ADDRLP4 1144 +CNSTF4 1098907648 +ASGNF4 +line 1903 +;1902: +;1903: VectorSet (normal, 0, 0, 1); +ADDRLP4 1192 +CNSTF4 0 +ASGNF4 +ADDRLP4 1120 +ADDRLP4 1192 +INDIRF4 +ASGNF4 +ADDRLP4 1120+4 +ADDRLP4 1192 +INDIRF4 +ASGNF4 +ADDRLP4 1120+8 +CNSTF4 1065353216 +ASGNF4 +line 1905 +;1904: +;1905: vectoangles (normal, angles); +ADDRLP4 1120 +ARGP4 +ADDRLP4 1180 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 1906 +;1906: AngleVectors (angles, NULL, right, up); +ADDRLP4 1180 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRLP4 1164 +ARGP4 +ADDRLP4 1132 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 1908 +;1907: +;1908: VectorMA (start, EXTRUDE_DIST, normal, center_pos); +ADDRLP4 1196 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1200 +CNSTF4 1056964608 +ASGNF4 +ADDRLP4 1152 +ADDRLP4 1196 +INDIRP4 +INDIRF4 +ADDRLP4 1200 +INDIRF4 +ADDRLP4 1120 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1152+4 +ADDRLP4 1196 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 1200 +INDIRF4 +ADDRLP4 1120+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1152+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1056964608 +ADDRLP4 1120+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1910 +;1909: +;1910: for (x= -fwidth/2; xendpos, start); +ADDRLP4 8 +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRB +ASGNB 12 +line 1948 +;1948: legit = ValidBloodPool (start); +ADDRLP4 8 +ARGP4 +ADDRLP4 24 +ADDRGP4 ValidBloodPool +CALLI4 +ASGNI4 +ADDRLP4 20 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 1950 +;1949: +;1950: if (!legit) +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $1657 +line 1951 +;1951: return; +ADDRGP4 $1651 +JUMPV +LABELV $1657 +line 1953 +;1952: +;1953: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 1954 +;1954: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1955 +;1955: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 1956 +;1956: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1957 +;1957: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1959 +;1958: +;1959: p->endtime = cg.time + 3000; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 3000 +ADDI4 +CVIF4 4 +ASGNF4 +line 1960 +;1960: p->startfade = p->endtime; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 1962 +;1961: +;1962: p->alpha = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1963 +;1963: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1964 +;1964: p->roll = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1966 +;1965: +;1966: p->pshader = pshader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 1968 +;1967: +;1968: rndSize = 0.4 + random()*0.6; +ADDRLP4 32 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 4 +CNSTF4 1058642330 +ADDRLP4 32 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +CNSTF4 1053609165 +ADDF4 +ASGNF4 +line 1970 +;1969: +;1970: p->width = 8*rndSize; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1090519040 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1971 +;1971: p->height = 8*rndSize; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1090519040 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1973 +;1972: +;1973: p->endheight = 16*rndSize; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTF4 1098907648 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1974 +;1974: p->endwidth = 16*rndSize; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1098907648 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1976 +;1975: +;1976: p->type = P_FLAT_SCALEUP; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 9 +ASGNI4 +line 1978 +;1977: +;1978: VectorCopy(start, p->org ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 8 +INDIRB +ASGNB 12 +line 1980 +;1979: +;1980: p->vel[0] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1981 +;1981: p->vel[1] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1982 +;1982: p->vel[2] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 0 +ASGNF4 +line 1983 +;1983: VectorClear( p->accel ); +ADDRLP4 40 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 40 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 40 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 40 +INDIRF4 +ASGNF4 +line 1985 +;1984: +;1985: p->rotate = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1987 +;1986: +;1987: p->roll = rand()%179; +ADDRLP4 44 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDRLP4 44 +INDIRI4 +CNSTI4 179 +MODI4 +ASGNI4 +line 1989 +;1988: +;1989: p->alpha = 0.75; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1061158912 +ASGNF4 +line 1991 +;1990: +;1991: p->color = BLOODRED; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 2 +ASGNI4 +line 1992 +;1992:} +LABELV $1651 +endproc CG_BloodPool 48 4 +export CG_ParticleBloodCloud +proc CG_ParticleBloodCloud 84 16 +line 1998 +;1993: +;1994:#define NORMALSIZE 16 +;1995:#define LARGESIZE 32 +;1996: +;1997:void CG_ParticleBloodCloud (centity_t *cent, vec3_t origin, vec3_t dir) +;1998:{ +line 2007 +;1999: float length; +;2000: float dist; +;2001: float crittersize; +;2002: vec3_t angles, forward; +;2003: vec3_t point; +;2004: cparticle_t *p; +;2005: int i; +;2006: +;2007: dist = 0; +ADDRLP4 36 +CNSTF4 0 +ASGNF4 +line 2009 +;2008: +;2009: length = VectorLength (dir); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 56 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 40 +ADDRLP4 56 +INDIRF4 +ASGNF4 +line 2010 +;2010: vectoangles (dir, angles); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 44 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 2011 +;2011: AngleVectors (angles, forward, NULL, NULL); +ADDRLP4 44 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRLP4 60 +CNSTP4 0 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ARGP4 +ADDRLP4 60 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 2013 +;2012: +;2013: crittersize = LARGESIZE; +ADDRLP4 16 +CNSTF4 1107296256 +ASGNF4 +line 2015 +;2014: +;2015: if (length) +ADDRLP4 40 +INDIRF4 +CNSTF4 0 +EQF4 $1662 +line 2016 +;2016: dist = length / crittersize; +ADDRLP4 36 +ADDRLP4 40 +INDIRF4 +ADDRLP4 16 +INDIRF4 +DIVF4 +ASGNF4 +LABELV $1662 +line 2018 +;2017: +;2018: if (dist < 1) +ADDRLP4 36 +INDIRF4 +CNSTF4 1065353216 +GEF4 $1664 +line 2019 +;2019: dist = 1; +ADDRLP4 36 +CNSTF4 1065353216 +ASGNF4 +LABELV $1664 +line 2021 +;2020: +;2021: VectorCopy (origin, point); +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 2023 +;2022: +;2023: for (i=0; inext; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 2032 +;2032: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 2033 +;2033: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 2035 +;2034: +;2035: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2036 +;2036: p->alpha = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 2037 +;2037: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 2038 +;2038: p->roll = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2040 +;2039: +;2040: p->pshader = cgs.media.smokePuffShader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRGP4 cgs+70296+252 +INDIRI4 +ASGNI4 +line 2042 +;2041: +;2042: p->endtime = cg.time + 350 + (crandom() * 100); +ADDRLP4 68 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 350 +ADDI4 +CVIF4 4 +CNSTF4 1120403456 +CNSTF4 1073741824 +ADDRLP4 68 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 2044 +;2043: +;2044: p->startfade = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2046 +;2045: +;2046: p->width = LARGESIZE; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 2047 +;2047: p->height = LARGESIZE; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 2048 +;2048: p->endheight = LARGESIZE; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 2049 +;2049: p->endwidth = LARGESIZE; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 2051 +;2050: +;2051: p->type = P_SMOKE; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 3 +ASGNI4 +line 2053 +;2052: +;2053: VectorCopy( origin, p->org ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 2055 +;2054: +;2055: p->vel[0] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 0 +ASGNF4 +line 2056 +;2056: p->vel[1] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 0 +ASGNF4 +line 2057 +;2057: p->vel[2] = -1; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 3212836864 +ASGNF4 +line 2059 +;2058: +;2059: VectorClear( p->accel ); +ADDRLP4 76 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 76 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 76 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 76 +INDIRF4 +ASGNF4 +line 2061 +;2060: +;2061: p->rotate = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2063 +;2062: +;2063: p->roll = rand()%179; +ADDRLP4 80 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDRLP4 80 +INDIRI4 +CNSTI4 179 +MODI4 +ASGNI4 +line 2065 +;2064: +;2065: p->color = BLOODRED; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 2 +ASGNI4 +line 2067 +;2066: +;2067: p->alpha = 0.75; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1061158912 +ASGNF4 +line 2069 +;2068: +;2069: } +LABELV $1667 +line 2023 +ADDRLP4 32 +ADDRLP4 32 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1669 +ADDRLP4 32 +INDIRI4 +CVIF4 4 +ADDRLP4 36 +INDIRF4 +LTF4 $1666 +line 2072 +;2070: +;2071: +;2072:} +LABELV $1661 +endproc CG_ParticleBloodCloud 84 16 +export CG_ParticleSparks +proc CG_ParticleSparks 60 0 +line 2075 +;2073: +;2074:void CG_ParticleSparks (vec3_t org, vec3_t vel, int duration, float x, float y, float speed) +;2075:{ +line 2078 +;2076: cparticle_t *p; +;2077: +;2078: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1684 +line 2079 +;2079: return; +ADDRGP4 $1683 +JUMPV +LABELV $1684 +line 2080 +;2080: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 2081 +;2081: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 2082 +;2082: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 2083 +;2083: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 2084 +;2084: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2086 +;2085: +;2086: p->endtime = cg.time + duration; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRI4 +ADDI4 +CVIF4 4 +ASGNF4 +line 2087 +;2087: p->startfade = cg.time + duration/2; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRI4 +CNSTI4 2 +DIVI4 +ADDI4 +CVIF4 4 +ASGNF4 +line 2089 +;2088: +;2089: p->color = EMISIVEFADE; +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTI4 3 +ASGNI4 +line 2090 +;2090: p->alpha = 0.4f; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1053609165 +ASGNF4 +line 2091 +;2091: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 2093 +;2092: +;2093: p->height = 0.5; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 2094 +;2094: p->width = 0.5; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 2095 +;2095: p->endheight = 0.5; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 2096 +;2096: p->endwidth = 0.5; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 2098 +;2097: +;2098: p->pshader = cgs.media.tracerShader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRGP4 cgs+70296+196 +INDIRI4 +ASGNI4 +line 2100 +;2099: +;2100: p->type = P_SMOKE; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 3 +ASGNI4 +line 2102 +;2101: +;2102: VectorCopy(org, p->org); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 2104 +;2103: +;2104: p->org[0] += (crandom() * x); +ADDRLP4 4 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 4 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +ADDRFP4 12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2105 +;2105: p->org[1] += (crandom() * y); +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 12 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +ADDRFP4 16 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2107 +;2106: +;2107: p->vel[0] = vel[0]; +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRF4 +ASGNF4 +line 2108 +;2108: p->vel[1] = vel[1]; +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 2109 +;2109: p->vel[2] = vel[2]; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 2111 +;2110: +;2111: p->accel[0] = p->accel[1] = p->accel[2] = 0; +ADDRLP4 24 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 2113 +;2112: +;2113: p->vel[0] += (crandom() * 4); +ADDRLP4 28 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +CNSTF4 1082130432 +CNSTF4 1073741824 +ADDRLP4 28 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 2114 +;2114: p->vel[1] += (crandom() * 4); +ADDRLP4 36 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 40 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +CNSTF4 1082130432 +CNSTF4 1073741824 +ADDRLP4 36 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 2115 +;2115: p->vel[2] += (20 + (crandom() * 10)) * speed; +ADDRLP4 44 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRF4 +CNSTF4 1092616192 +CNSTF4 1073741824 +ADDRLP4 44 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1101004800 +ADDF4 +ADDRFP4 20 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2117 +;2116: +;2117: p->accel[0] = crandom () * 4; +ADDRLP4 52 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +CNSTF4 1082130432 +CNSTF4 1073741824 +ADDRLP4 52 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 2118 +;2118: p->accel[1] = crandom () * 4; +ADDRLP4 56 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1082130432 +CNSTF4 1073741824 +ADDRLP4 56 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 2120 +;2119: +;2120:} +LABELV $1683 +endproc CG_ParticleSparks 60 0 +export CG_ParticleDust +proc CG_ParticleDust 120 16 +line 2123 +;2121: +;2122:void CG_ParticleDust (centity_t *cent, vec3_t origin, vec3_t dir) +;2123:{ +line 2132 +;2124: float length; +;2125: float dist; +;2126: float crittersize; +;2127: vec3_t angles, forward; +;2128: vec3_t point; +;2129: cparticle_t *p; +;2130: int i; +;2131: +;2132: dist = 0; +ADDRLP4 40 +CNSTF4 0 +ASGNF4 +line 2134 +;2133: +;2134: VectorNegate (dir, dir); +ADDRLP4 56 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 60 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 64 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 64 +INDIRP4 +INDIRF4 +NEGF4 +ASGNF4 +line 2135 +;2135: length = VectorLength (dir); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 68 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 32 +ADDRLP4 68 +INDIRF4 +ASGNF4 +line 2136 +;2136: vectoangles (dir, angles); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 44 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 2137 +;2137: AngleVectors (angles, forward, NULL, NULL); +ADDRLP4 44 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRLP4 72 +CNSTP4 0 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ARGP4 +ADDRLP4 72 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 2139 +;2138: +;2139: crittersize = LARGESIZE; +ADDRLP4 16 +CNSTF4 1107296256 +ASGNF4 +line 2141 +;2140: +;2141: if (length) +ADDRLP4 32 +INDIRF4 +CNSTF4 0 +EQF4 $1692 +line 2142 +;2142: dist = length / crittersize; +ADDRLP4 40 +ADDRLP4 32 +INDIRF4 +ADDRLP4 16 +INDIRF4 +DIVF4 +ASGNF4 +LABELV $1692 +line 2144 +;2143: +;2144: if (dist < 1) +ADDRLP4 40 +INDIRF4 +CNSTF4 1065353216 +GEF4 $1694 +line 2145 +;2145: dist = 1; +ADDRLP4 40 +CNSTF4 1065353216 +ASGNF4 +LABELV $1694 +line 2147 +;2146: +;2147: VectorCopy (origin, point); +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 2149 +;2148: +;2149: for (i=0; inext; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 2158 +;2158: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 2159 +;2159: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 2161 +;2160: +;2161: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2162 +;2162: p->alpha = 5.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1084227584 +ASGNF4 +line 2163 +;2163: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 2164 +;2164: p->roll = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2166 +;2165: +;2166: p->pshader = cgs.media.smokePuffShader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRGP4 cgs+70296+252 +INDIRI4 +ASGNI4 +line 2169 +;2167: +;2168: // RF, stay around for long enough to expand and dissipate naturally +;2169: if (length) +ADDRLP4 32 +INDIRF4 +CNSTF4 0 +EQF4 $1711 +line 2170 +;2170: p->endtime = cg.time + 4500 + (crandom() * 3500); +ADDRLP4 80 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 4500 +ADDI4 +CVIF4 4 +CNSTF4 1163575296 +CNSTF4 1073741824 +ADDRLP4 80 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 $1712 +JUMPV +LABELV $1711 +line 2172 +;2171: else +;2172: p->endtime = cg.time + 750 + (crandom() * 500); +ADDRLP4 84 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 750 +ADDI4 +CVIF4 4 +CNSTF4 1140457472 +CNSTF4 1073741824 +ADDRLP4 84 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +LABELV $1712 +line 2174 +;2173: +;2174: p->startfade = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2176 +;2175: +;2176: p->width = LARGESIZE; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 2177 +;2177: p->height = LARGESIZE; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 2180 +;2178: +;2179: // RF, expand while falling +;2180: p->endheight = LARGESIZE*3.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTF4 1119879168 +ASGNF4 +line 2181 +;2181: p->endwidth = LARGESIZE*3.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1119879168 +ASGNF4 +line 2183 +;2182: +;2183: if (!length) +ADDRLP4 32 +INDIRF4 +CNSTF4 0 +NEF4 $1716 +line 2184 +;2184: { +line 2185 +;2185: p->width *= 0.2f; +ADDRLP4 88 +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +CNSTF4 1045220557 +ADDRLP4 88 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 2186 +;2186: p->height *= 0.2f; +ADDRLP4 92 +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTF4 1045220557 +ADDRLP4 92 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 2188 +;2187: +;2188: p->endheight = NORMALSIZE; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +CNSTF4 1098907648 +ASGNF4 +line 2189 +;2189: p->endwidth = NORMALSIZE; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTF4 1098907648 +ASGNF4 +line 2190 +;2190: } +LABELV $1716 +line 2192 +;2191: +;2192: p->type = P_SMOKE; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 3 +ASGNI4 +line 2194 +;2193: +;2194: VectorCopy( point, p->org ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 4 +INDIRB +ASGNB 12 +line 2196 +;2195: +;2196: p->vel[0] = crandom()*6; +ADDRLP4 88 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 1086324736 +CNSTF4 1073741824 +ADDRLP4 88 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 2197 +;2197: p->vel[1] = crandom()*6; +ADDRLP4 92 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 1086324736 +CNSTF4 1073741824 +ADDRLP4 92 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 2198 +;2198: p->vel[2] = random()*20; +ADDRLP4 96 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 1101004800 +ADDRLP4 96 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ASGNF4 +line 2201 +;2199: +;2200: // RF, add some gravity/randomness +;2201: p->accel[0] = crandom()*3; +ADDRLP4 100 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +CNSTF4 1077936128 +CNSTF4 1073741824 +ADDRLP4 100 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 2202 +;2202: p->accel[1] = crandom()*3; +ADDRLP4 104 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1077936128 +CNSTF4 1073741824 +ADDRLP4 104 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ASGNF4 +line 2203 +;2203: p->accel[2] = -PARTICLE_GRAVITY*0.4; +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTF4 3246391296 +ASGNF4 +line 2205 +;2204: +;2205: VectorClear( p->accel ); +ADDRLP4 112 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 112 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 112 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 112 +INDIRF4 +ASGNF4 +line 2207 +;2206: +;2207: p->rotate = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2209 +;2208: +;2209: p->roll = rand()%179; +ADDRLP4 116 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDRLP4 116 +INDIRI4 +CNSTI4 179 +MODI4 +ASGNI4 +line 2211 +;2210: +;2211: p->alpha = 0.75; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1061158912 +ASGNF4 +line 2213 +;2212: +;2213: } +LABELV $1697 +line 2149 +ADDRLP4 36 +ADDRLP4 36 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1699 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +ADDRLP4 40 +INDIRF4 +LTF4 $1696 +line 2216 +;2214: +;2215: +;2216:} +LABELV $1691 +endproc CG_ParticleDust 120 16 +export CG_ParticleMisc +proc CG_ParticleMisc 8 4 +line 2219 +;2217: +;2218:void CG_ParticleMisc (qhandle_t pshader, vec3_t origin, int size, int duration, float alpha) +;2219:{ +line 2222 +;2220: cparticle_t *p; +;2221: +;2222: if (!pshader) +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1719 +line 2223 +;2223: CG_Printf ("CG_ParticleImpactSmokePuff pshader == ZERO!\n"); +ADDRGP4 $1554 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +LABELV $1719 +line 2225 +;2224: +;2225: if (!free_particles) +ADDRGP4 free_particles +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1721 +line 2226 +;2226: return; +ADDRGP4 $1718 +JUMPV +LABELV $1721 +line 2228 +;2227: +;2228: p = free_particles; +ADDRLP4 0 +ADDRGP4 free_particles +INDIRP4 +ASGNP4 +line 2229 +;2229: free_particles = p->next; +ADDRGP4 free_particles +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 2230 +;2230: p->next = active_particles; +ADDRLP4 0 +INDIRP4 +ADDRGP4 active_particles +INDIRP4 +ASGNP4 +line 2231 +;2231: active_particles = p; +ADDRGP4 active_particles +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 2232 +;2232: p->time = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2233 +;2233: p->alpha = 1.0; +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 2234 +;2234: p->alphavel = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 0 +ASGNF4 +line 2235 +;2235: p->roll = rand()%179; +ADDRLP4 4 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDRLP4 4 +INDIRI4 +CNSTI4 179 +MODI4 +ASGNI4 +line 2237 +;2236: +;2237: p->pshader = pshader; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 2239 +;2238: +;2239: if (duration > 0) +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +LEI4 $1724 +line 2240 +;2240: p->endtime = cg.time + duration; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 12 +INDIRI4 +ADDI4 +CVIF4 4 +ASGNF4 +ADDRGP4 $1725 +JUMPV +LABELV $1724 +line 2242 +;2241: else +;2242: p->endtime = duration; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRFP4 12 +INDIRI4 +CVIF4 4 +ASGNF4 +LABELV $1725 +line 2244 +;2243: +;2244: p->startfade = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2246 +;2245: +;2246: p->width = size; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2247 +;2247: p->height = size; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2249 +;2248: +;2249: p->endheight = size; +ADDRLP4 0 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2250 +;2250: p->endwidth = size; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2252 +;2251: +;2252: p->type = P_SPRITE; +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 15 +ASGNI4 +line 2254 +;2253: +;2254: VectorCopy( origin, p->org ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 2256 +;2255: +;2256: p->rotate = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2257 +;2257:} +LABELV $1718 +endproc CG_ParticleMisc 8 4 +bss +export oldtime +align 4 +LABELV oldtime +skip 4 +export rup +align 4 +LABELV rup +skip 12 +export rright +align 4 +LABELV rright +skip 12 +export rforward +align 4 +LABELV rforward +skip 12 +export pvup +align 4 +LABELV pvup +skip 12 +export pvright +align 4 +LABELV pvright +skip 12 +export pvforward +align 4 +LABELV pvforward +skip 12 +export particles +align 4 +LABELV particles +skip 126976 +export free_particles +align 4 +LABELV free_particles +skip 4 +export active_particles +align 4 +LABELV active_particles +skip 4 +align 4 +LABELV numShaderAnims +skip 4 +align 4 +LABELV shaderAnims +skip 8192 +align 4 +LABELV markTotal +skip 4 +export cg_freeMarkPolys +align 4 +LABELV cg_freeMarkPolys +skip 4 +export cg_activeMarkPolys +align 4 +LABELV cg_activeMarkPolys +skip 288 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_GetStripEdString +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +export cg_markPolys +align 4 +LABELV cg_markPolys +skip 73728 +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $1654 +char 1 67 +char 1 71 +char 1 95 +char 1 66 +char 1 108 +char 1 111 +char 1 111 +char 1 100 +char 1 80 +char 1 111 +char 1 111 +char 1 108 +char 1 32 +char 1 112 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 32 +char 1 61 +char 1 61 +char 1 32 +char 1 90 +char 1 69 +char 1 82 +char 1 79 +char 1 33 +char 1 10 +char 1 0 +align 1 +LABELV $1600 +char 1 67 +char 1 71 +char 1 95 +char 1 79 +char 1 105 +char 1 108 +char 1 83 +char 1 108 +char 1 105 +char 1 99 +char 1 107 +char 1 82 +char 1 101 +char 1 118 +char 1 111 +char 1 118 +char 1 101 +char 1 32 +char 1 78 +char 1 85 +char 1 76 +char 1 76 +char 1 32 +char 1 105 +char 1 100 +char 1 10 +char 1 0 +align 1 +LABELV $1586 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 97 +char 1 114 +char 1 116 +char 1 105 +char 1 99 +char 1 108 +char 1 101 +char 1 95 +char 1 79 +char 1 105 +char 1 108 +char 1 83 +char 1 108 +char 1 105 +char 1 99 +char 1 107 +char 1 32 +char 1 61 +char 1 61 +char 1 32 +char 1 90 +char 1 69 +char 1 82 +char 1 79 +char 1 33 +char 1 10 +char 1 0 +align 1 +LABELV $1578 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 97 +char 1 114 +char 1 116 +char 1 105 +char 1 99 +char 1 108 +char 1 101 +char 1 95 +char 1 79 +char 1 105 +char 1 108 +char 1 80 +char 1 97 +char 1 114 +char 1 116 +char 1 105 +char 1 99 +char 1 108 +char 1 101 +char 1 32 +char 1 61 +char 1 61 +char 1 32 +char 1 90 +char 1 69 +char 1 82 +char 1 79 +char 1 33 +char 1 10 +char 1 0 +align 1 +LABELV $1564 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 97 +char 1 114 +char 1 116 +char 1 105 +char 1 99 +char 1 108 +char 1 101 +char 1 95 +char 1 66 +char 1 108 +char 1 101 +char 1 101 +char 1 100 +char 1 32 +char 1 112 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 32 +char 1 61 +char 1 61 +char 1 32 +char 1 90 +char 1 69 +char 1 82 +char 1 79 +char 1 33 +char 1 10 +char 1 0 +align 1 +LABELV $1554 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 97 +char 1 114 +char 1 116 +char 1 105 +char 1 99 +char 1 108 +char 1 101 +char 1 73 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 83 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 80 +char 1 117 +char 1 102 +char 1 102 +char 1 32 +char 1 112 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 32 +char 1 61 +char 1 61 +char 1 32 +char 1 90 +char 1 69 +char 1 82 +char 1 79 +char 1 33 +char 1 10 +char 1 0 +align 1 +LABELV $1494 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 97 +char 1 114 +char 1 116 +char 1 105 +char 1 99 +char 1 108 +char 1 101 +char 1 69 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 58 +char 1 32 +char 1 117 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 115 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $1485 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 97 +char 1 114 +char 1 116 +char 1 105 +char 1 99 +char 1 108 +char 1 101 +char 1 69 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 58 +char 1 32 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 83 +char 1 116 +char 1 114 +char 1 32 +char 1 105 +char 1 115 +char 1 32 +char 1 112 +char 1 114 +char 1 111 +char 1 98 +char 1 97 +char 1 98 +char 1 108 +char 1 121 +char 1 32 +char 1 97 +char 1 110 +char 1 32 +char 1 105 +char 1 110 +char 1 100 +char 1 101 +char 1 120 +char 1 32 +char 1 114 +char 1 97 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 32 +char 1 116 +char 1 104 +char 1 97 +char 1 110 +char 1 32 +char 1 97 +char 1 32 +char 1 115 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $1466 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 97 +char 1 114 +char 1 116 +char 1 105 +char 1 99 +char 1 108 +char 1 101 +char 1 83 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 32 +char 1 61 +char 1 61 +char 1 32 +char 1 90 +char 1 69 +char 1 82 +char 1 79 +char 1 33 +char 1 10 +char 1 0 +align 1 +LABELV $1445 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 97 +char 1 114 +char 1 116 +char 1 105 +char 1 99 +char 1 108 +char 1 101 +char 1 83 +char 1 110 +char 1 111 +char 1 119 +char 1 32 +char 1 112 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 32 +char 1 61 +char 1 61 +char 1 32 +char 1 90 +char 1 69 +char 1 82 +char 1 79 +char 1 33 +char 1 10 +char 1 0 +align 1 +LABELV $1430 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 97 +char 1 114 +char 1 116 +char 1 105 +char 1 99 +char 1 108 +char 1 101 +char 1 83 +char 1 110 +char 1 111 +char 1 119 +char 1 70 +char 1 108 +char 1 117 +char 1 114 +char 1 114 +char 1 121 +char 1 32 +char 1 112 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 32 +char 1 61 +char 1 61 +char 1 32 +char 1 90 +char 1 69 +char 1 82 +char 1 79 +char 1 33 +char 1 10 +char 1 0 +align 1 +LABELV $305 +char 1 37 +char 1 115 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $287 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 100 +char 1 101 +char 1 49 +char 1 0 +align 1 +LABELV $148 +char 1 67 +char 1 71 +char 1 95 +char 1 73 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 77 +char 1 97 +char 1 114 +char 1 107 +char 1 32 +char 1 99 +char 1 97 +char 1 108 +char 1 108 +char 1 101 +char 1 100 +char 1 32 +char 1 119 +char 1 105 +char 1 116 +char 1 104 +char 1 32 +char 1 60 +char 1 61 +char 1 32 +char 1 48 +char 1 32 +char 1 114 +char 1 97 +char 1 100 +char 1 105 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $131 +char 1 67 +char 1 71 +char 1 95 +char 1 70 +char 1 114 +char 1 101 +char 1 101 +char 1 76 +char 1 111 +char 1 99 +char 1 97 +char 1 108 +char 1 69 +char 1 110 +char 1 116 +char 1 105 +char 1 116 +char 1 121 +char 1 58 +char 1 32 +char 1 110 +char 1 111 +char 1 116 +char 1 32 +char 1 97 +char 1 99 +char 1 116 +char 1 105 +char 1 118 +char 1 101 +char 1 0 diff --git a/code/cgame/vm/cg_newDraw.asm b/code/cgame/vm/cg_newDraw.asm new file mode 100644 index 0000000..b65ca6b --- /dev/null +++ b/code/cgame/vm/cg_newDraw.asm @@ -0,0 +1,6709 @@ +data +export drawTeamOverlayModificationCount +align 4 +LABELV drawTeamOverlayModificationCount +byte 4 -1 +export CG_InitTeamChat +code +proc CG_InitTeamChat 0 12 +file "../cg_newDraw.c" +line 17 +;1:#include "cg_local.h" +;2:#include "../ui/ui_shared.h" +;3: +;4:extern displayContextDef_t cgDC; +;5: +;6: +;7:// set in CG_ParseTeamInfo +;8: +;9://static int sortedTeamPlayers[TEAM_MAXOVERLAY]; +;10://static int numSortedTeamPlayers; +;11:int drawTeamOverlayModificationCount = -1; +;12: +;13://static char systemChat[256]; +;14://static char teamChat1[256]; +;15://static char teamChat2[256]; +;16: +;17:void CG_InitTeamChat(void) { +line 18 +;18: memset(teamChat1, 0, sizeof(teamChat1)); +ADDRGP4 teamChat1 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 256 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 19 +;19: memset(teamChat2, 0, sizeof(teamChat2)); +ADDRGP4 teamChat2 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 256 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 20 +;20: memset(systemChat, 0, sizeof(systemChat)); +ADDRGP4 systemChat +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 256 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 21 +;21:} +LABELV $129 +endproc CG_InitTeamChat 0 12 +export CG_SetPrintString +proc CG_SetPrintString 0 8 +line 23 +;22: +;23:void CG_SetPrintString(int type, const char *p) { +line 24 +;24: if (type == SYSTEM_PRINT) { +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $131 +line 25 +;25: strcpy(systemChat, p); +ADDRGP4 systemChat +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 26 +;26: } else { +ADDRGP4 $132 +JUMPV +LABELV $131 +line 27 +;27: strcpy(teamChat2, teamChat1); +ADDRGP4 teamChat2 +ARGP4 +ADDRGP4 teamChat1 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 28 +;28: strcpy(teamChat1, p); +ADDRGP4 teamChat1 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 29 +;29: } +LABELV $132 +line 30 +;30:} +LABELV $130 +endproc CG_SetPrintString 0 8 +export CG_CheckOrderPending +proc CG_CheckOrderPending 28 12 +line 32 +;31: +;32:void CG_CheckOrderPending(void) { +line 33 +;33: if (cgs.gametype < GT_CTF) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +GEI4 $134 +line 34 +;34: return; +ADDRGP4 $133 +JUMPV +LABELV $134 +line 36 +;35: } +;36: if (cgs.orderPending) { +ADDRGP4 cgs+70240 +INDIRI4 +CNSTI4 0 +EQI4 $137 +line 39 +;37: //clientInfo_t *ci = cgs.clientinfo + sortedTeamPlayers[cg_currentSelectedPlayer.integer]; +;38: const char *p1, *p2, *b; +;39: p1 = p2 = b = NULL; +ADDRLP4 12 +CNSTP4 0 +ASGNP4 +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 12 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 12 +INDIRP4 +ASGNP4 +line 40 +;40: switch (cgs.currentOrder) { +ADDRLP4 16 +ADDRGP4 cgs+70236 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +LTI4 $140 +ADDRLP4 16 +INDIRI4 +CNSTI4 7 +GTI4 $140 +ADDRLP4 16 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $168-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $168 +address $143 +address $147 +address $151 +address $155 +address $162 +address $165 +address $159 +code +LABELV $143 +line 42 +;41: case TEAMTASK_OFFENSE: +;42: p1 = VOICECHAT_ONOFFENSE; +ADDRLP4 8 +ADDRGP4 $144 +ASGNP4 +line 43 +;43: p2 = VOICECHAT_OFFENSE; +ADDRLP4 4 +ADDRGP4 $145 +ASGNP4 +line 44 +;44: b = "+button7; wait; -button7"; +ADDRLP4 0 +ADDRGP4 $146 +ASGNP4 +line 45 +;45: break; +ADDRGP4 $141 +JUMPV +LABELV $147 +line 47 +;46: case TEAMTASK_DEFENSE: +;47: p1 = VOICECHAT_ONDEFENSE; +ADDRLP4 8 +ADDRGP4 $148 +ASGNP4 +line 48 +;48: p2 = VOICECHAT_DEFEND; +ADDRLP4 4 +ADDRGP4 $149 +ASGNP4 +line 49 +;49: b = "+button8; wait; -button8"; +ADDRLP4 0 +ADDRGP4 $150 +ASGNP4 +line 50 +;50: break; +ADDRGP4 $141 +JUMPV +LABELV $151 +line 52 +;51: case TEAMTASK_PATROL: +;52: p1 = VOICECHAT_ONPATROL; +ADDRLP4 8 +ADDRGP4 $152 +ASGNP4 +line 53 +;53: p2 = VOICECHAT_PATROL; +ADDRLP4 4 +ADDRGP4 $153 +ASGNP4 +line 54 +;54: b = "+button9; wait; -button9"; +ADDRLP4 0 +ADDRGP4 $154 +ASGNP4 +line 55 +;55: break; +ADDRGP4 $141 +JUMPV +LABELV $155 +line 57 +;56: case TEAMTASK_FOLLOW: +;57: p1 = VOICECHAT_ONFOLLOW; +ADDRLP4 8 +ADDRGP4 $156 +ASGNP4 +line 58 +;58: p2 = VOICECHAT_FOLLOWME; +ADDRLP4 4 +ADDRGP4 $157 +ASGNP4 +line 59 +;59: b = "+button10; wait; -button10"; +ADDRLP4 0 +ADDRGP4 $158 +ASGNP4 +line 60 +;60: break; +ADDRGP4 $141 +JUMPV +LABELV $159 +line 62 +;61: case TEAMTASK_CAMP: +;62: p1 = VOICECHAT_ONCAMPING; +ADDRLP4 8 +ADDRGP4 $160 +ASGNP4 +line 63 +;63: p2 = VOICECHAT_CAMP; +ADDRLP4 4 +ADDRGP4 $161 +ASGNP4 +line 64 +;64: break; +ADDRGP4 $141 +JUMPV +LABELV $162 +line 66 +;65: case TEAMTASK_RETRIEVE: +;66: p1 = VOICECHAT_ONGETFLAG; +ADDRLP4 8 +ADDRGP4 $163 +ASGNP4 +line 67 +;67: p2 = VOICECHAT_RETURNFLAG; +ADDRLP4 4 +ADDRGP4 $164 +ASGNP4 +line 68 +;68: break; +ADDRGP4 $141 +JUMPV +LABELV $165 +line 70 +;69: case TEAMTASK_ESCORT: +;70: p1 = VOICECHAT_ONFOLLOWCARRIER; +ADDRLP4 8 +ADDRGP4 $166 +ASGNP4 +line 71 +;71: p2 = VOICECHAT_FOLLOWFLAGCARRIER; +ADDRLP4 4 +ADDRGP4 $167 +ASGNP4 +line 72 +;72: break; +LABELV $140 +LABELV $141 +line 75 +;73: } +;74: +;75: if (cg_currentSelectedPlayer.integer == numSortedTeamPlayers) { +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +ADDRGP4 numSortedTeamPlayers +INDIRI4 +NEI4 $170 +line 77 +;76: // to everyone +;77: trap_SendConsoleCommand(va("cmd vsay_team %s\n", p2)); +ADDRGP4 $173 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 78 +;78: } else { +ADDRGP4 $171 +JUMPV +LABELV $170 +line 80 +;79: // for the player self +;80: if (sortedTeamPlayers[cg_currentSelectedPlayer.integer] == cg.snap->ps.clientNum && p1) { +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $174 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $174 +line 81 +;81: trap_SendConsoleCommand(va("teamtask %i\n", cgs.currentOrder)); +ADDRGP4 $178 +ARGP4 +ADDRGP4 cgs+70236 +INDIRI4 +ARGI4 +ADDRLP4 20 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 83 +;82: //trap_SendConsoleCommand(va("cmd say_team %s\n", p2)); +;83: trap_SendConsoleCommand(va("cmd vsay_team %s\n", p1)); +ADDRGP4 $173 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 24 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 84 +;84: } else if (p2) { +ADDRGP4 $175 +JUMPV +LABELV $174 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $180 +line 86 +;85: //trap_SendConsoleCommand(va("cmd say_team %s, %s\n", ci->name,p)); +;86: trap_SendConsoleCommand(va("cmd vtell %d %s\n", sortedTeamPlayers[cg_currentSelectedPlayer.integer], p2)); +ADDRGP4 $182 +ARGP4 +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 87 +;87: } +LABELV $180 +LABELV $175 +line 88 +;88: } +LABELV $171 +line 89 +;89: if (b) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $184 +line 90 +;90: trap_SendConsoleCommand(b); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 91 +;91: } +LABELV $184 +line 92 +;92: cgs.orderPending = qfalse; +ADDRGP4 cgs+70240 +CNSTI4 0 +ASGNI4 +line 93 +;93: } +LABELV $137 +line 94 +;94:} +LABELV $133 +endproc CG_CheckOrderPending 28 12 +proc CG_SetSelectedPlayerName 8 8 +line 96 +;95: +;96:static void CG_SetSelectedPlayerName() { +line 97 +;97: if (cg_currentSelectedPlayer.integer >= 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +CNSTI4 0 +LTI4 $188 +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +ADDRGP4 numSortedTeamPlayers +INDIRI4 +GEI4 $188 +line 98 +;98: clientInfo_t *ci = cgs.clientinfo + sortedTeamPlayers[cg_currentSelectedPlayer.integer]; +ADDRLP4 0 +CNSTI4 788 +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 99 +;99: if (ci) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $189 +line 100 +;100: trap_Cvar_Set("cg_selectedPlayerName", ci->name); +ADDRGP4 $196 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 101 +;101: trap_Cvar_Set("cg_selectedPlayer", va("%d", sortedTeamPlayers[cg_currentSelectedPlayer.integer])); +ADDRGP4 $198 +ARGP4 +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $197 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 102 +;102: cgs.currentOrder = ci->teamTask; +ADDRGP4 cgs+70236 +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRI4 +ASGNI4 +line 103 +;103: } +line 104 +;104: } else { +ADDRGP4 $189 +JUMPV +LABELV $188 +line 105 +;105: trap_Cvar_Set("cg_selectedPlayerName", "Everyone"); +ADDRGP4 $196 +ARGP4 +ADDRGP4 $201 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 106 +;106: } +LABELV $189 +line 107 +;107:} +LABELV $187 +endproc CG_SetSelectedPlayerName 8 8 +export CG_GetSelectedPlayer +proc CG_GetSelectedPlayer 0 0 +line 108 +;108:int CG_GetSelectedPlayer() { +line 109 +;109: if (cg_currentSelectedPlayer.integer < 0 || cg_currentSelectedPlayer.integer >= numSortedTeamPlayers) { +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +CNSTI4 0 +LTI4 $207 +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +ADDRGP4 numSortedTeamPlayers +INDIRI4 +LTI4 $203 +LABELV $207 +line 110 +;110: cg_currentSelectedPlayer.integer = 0; +ADDRGP4 cg_currentSelectedPlayer+12 +CNSTI4 0 +ASGNI4 +line 111 +;111: } +LABELV $203 +line 112 +;112: return cg_currentSelectedPlayer.integer; +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +RETI4 +LABELV $202 +endproc CG_GetSelectedPlayer 0 0 +export CG_SelectNextPlayer +proc CG_SelectNextPlayer 4 0 +line 115 +;113:} +;114: +;115:void CG_SelectNextPlayer(void) { +line 116 +;116: CG_CheckOrderPending(); +ADDRGP4 CG_CheckOrderPending +CALLV +pop +line 117 +;117: if (cg_currentSelectedPlayer.integer >= 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +CNSTI4 0 +LTI4 $211 +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +ADDRGP4 numSortedTeamPlayers +INDIRI4 +GEI4 $211 +line 118 +;118: cg_currentSelectedPlayer.integer++; +ADDRLP4 0 +ADDRGP4 cg_currentSelectedPlayer+12 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 119 +;119: } else { +ADDRGP4 $212 +JUMPV +LABELV $211 +line 120 +;120: cg_currentSelectedPlayer.integer = 0; +ADDRGP4 cg_currentSelectedPlayer+12 +CNSTI4 0 +ASGNI4 +line 121 +;121: } +LABELV $212 +line 122 +;122: CG_SetSelectedPlayerName(); +ADDRGP4 CG_SetSelectedPlayerName +CALLV +pop +line 123 +;123:} +LABELV $210 +endproc CG_SelectNextPlayer 4 0 +export CG_SelectPrevPlayer +proc CG_SelectPrevPlayer 4 0 +line 125 +;124: +;125:void CG_SelectPrevPlayer(void) { +line 126 +;126: CG_CheckOrderPending(); +ADDRGP4 CG_CheckOrderPending +CALLV +pop +line 127 +;127: if (cg_currentSelectedPlayer.integer > 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) { +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +CNSTI4 0 +LEI4 $218 +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +ADDRGP4 numSortedTeamPlayers +INDIRI4 +GEI4 $218 +line 128 +;128: cg_currentSelectedPlayer.integer--; +ADDRLP4 0 +ADDRGP4 cg_currentSelectedPlayer+12 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 129 +;129: } else { +ADDRGP4 $219 +JUMPV +LABELV $218 +line 130 +;130: cg_currentSelectedPlayer.integer = numSortedTeamPlayers; +ADDRGP4 cg_currentSelectedPlayer+12 +ADDRGP4 numSortedTeamPlayers +INDIRI4 +ASGNI4 +line 131 +;131: } +LABELV $219 +line 132 +;132: CG_SetSelectedPlayerName(); +ADDRGP4 CG_SetSelectedPlayerName +CALLV +pop +line 133 +;133:} +LABELV $217 +endproc CG_SelectPrevPlayer 4 0 +export CG_StatusHandle +proc CG_StatusHandle 8 0 +line 136 +;134: +;135: +;136:qhandle_t CG_StatusHandle(int task) { +line 137 +;137: qhandle_t h = cgs.media.assaultShader; +ADDRLP4 0 +ADDRGP4 cgs+70296+860 +INDIRI4 +ASGNI4 +line 138 +;138: switch (task) { +ADDRLP4 4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +LTI4 $227 +ADDRLP4 4 +INDIRI4 +CNSTI4 7 +GTI4 $227 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $252-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $252 +address $229 +address $232 +address $235 +address $238 +address $244 +address $247 +address $241 +code +LABELV $229 +line 140 +;139: case TEAMTASK_OFFENSE : +;140: h = cgs.media.assaultShader; +ADDRLP4 0 +ADDRGP4 cgs+70296+860 +INDIRI4 +ASGNI4 +line 141 +;141: break; +ADDRGP4 $228 +JUMPV +LABELV $232 +line 143 +;142: case TEAMTASK_DEFENSE : +;143: h = cgs.media.defendShader; +ADDRLP4 0 +ADDRGP4 cgs+70296+872 +INDIRI4 +ASGNI4 +line 144 +;144: break; +ADDRGP4 $228 +JUMPV +LABELV $235 +line 146 +;145: case TEAMTASK_PATROL : +;146: h = cgs.media.patrolShader; +ADDRLP4 0 +ADDRGP4 cgs+70296+856 +INDIRI4 +ASGNI4 +line 147 +;147: break; +ADDRGP4 $228 +JUMPV +LABELV $238 +line 149 +;148: case TEAMTASK_FOLLOW : +;149: h = cgs.media.followShader; +ADDRLP4 0 +ADDRGP4 cgs+70296+868 +INDIRI4 +ASGNI4 +line 150 +;150: break; +ADDRGP4 $228 +JUMPV +LABELV $241 +line 152 +;151: case TEAMTASK_CAMP : +;152: h = cgs.media.campShader; +ADDRLP4 0 +ADDRGP4 cgs+70296+864 +INDIRI4 +ASGNI4 +line 153 +;153: break; +ADDRGP4 $228 +JUMPV +LABELV $244 +line 155 +;154: case TEAMTASK_RETRIEVE : +;155: h = cgs.media.retrieveShader; +ADDRLP4 0 +ADDRGP4 cgs+70296+880 +INDIRI4 +ASGNI4 +line 156 +;156: break; +ADDRGP4 $228 +JUMPV +LABELV $247 +line 158 +;157: case TEAMTASK_ESCORT : +;158: h = cgs.media.escortShader; +ADDRLP4 0 +ADDRGP4 cgs+70296+884 +INDIRI4 +ASGNI4 +line 159 +;159: break; +ADDRGP4 $228 +JUMPV +LABELV $227 +line 161 +;160: default : +;161: h = cgs.media.assaultShader; +ADDRLP4 0 +ADDRGP4 cgs+70296+860 +INDIRI4 +ASGNI4 +line 162 +;162: break; +LABELV $228 +line 164 +;163: } +;164: return h; +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $224 +endproc CG_StatusHandle 8 0 +export CG_GetValue +proc CG_GetValue 44 0 +line 168 +;165:} +;166: +;167: +;168:float CG_GetValue(int ownerDraw) { +line 173 +;169: centity_t *cent; +;170: clientInfo_t *ci; +;171: playerState_t *ps; +;172: +;173: cent = &cg_entities[cg.snap->ps.clientNum]; +ADDRLP4 4 +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 174 +;174: ps = &cg.snap->ps; +ADDRLP4 0 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +line 176 +;175: +;176: switch (ownerDraw) { +ADDRLP4 12 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 27 +EQI4 $272 +ADDRLP4 16 +CNSTI4 28 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $270 +ADDRLP4 12 +INDIRI4 +ADDRLP4 16 +INDIRI4 +GTI4 $276 +LABELV $275 +ADDRLP4 20 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 24 +CNSTI4 2 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ADDRLP4 24 +INDIRI4 +EQI4 $263 +ADDRLP4 20 +INDIRI4 +CNSTI4 4 +EQI4 $269 +ADDRLP4 20 +INDIRI4 +CNSTI4 6 +EQI4 $264 +ADDRLP4 20 +INDIRI4 +ADDRLP4 24 +INDIRI4 +LTI4 $258 +LABELV $277 +ADDRFP4 0 +INDIRI4 +CNSTI4 20 +EQI4 $267 +ADDRGP4 $258 +JUMPV +LABELV $276 +ADDRLP4 28 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 32 +CNSTI4 40 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 32 +INDIRI4 +EQI4 $259 +ADDRLP4 28 +INDIRI4 +CNSTI4 41 +EQI4 $261 +ADDRLP4 28 +INDIRI4 +ADDRLP4 32 +INDIRI4 +LTI4 $258 +LABELV $278 +ADDRFP4 0 +INDIRI4 +CNSTI4 70 +EQI4 $274 +ADDRGP4 $258 +JUMPV +LABELV $259 +line 178 +;177: case CG_SELECTEDPLAYER_ARMOR: +;178: ci = cgs.clientinfo + sortedTeamPlayers[CG_GetSelectedPlayer()]; +ADDRLP4 36 +ADDRGP4 CG_GetSelectedPlayer +CALLI4 +ASGNI4 +ADDRLP4 8 +CNSTI4 788 +ADDRLP4 36 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 179 +;179: return ci->armor; +ADDRLP4 8 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRI4 +CVIF4 4 +RETF4 +ADDRGP4 $254 +JUMPV +line 180 +;180: break; +LABELV $261 +line 182 +;181: case CG_SELECTEDPLAYER_HEALTH: +;182: ci = cgs.clientinfo + sortedTeamPlayers[CG_GetSelectedPlayer()]; +ADDRLP4 40 +ADDRGP4 CG_GetSelectedPlayer +CALLI4 +ASGNI4 +ADDRLP4 8 +CNSTI4 788 +ADDRLP4 40 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 183 +;183: return ci->health; +ADDRLP4 8 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +CVIF4 4 +RETF4 +ADDRGP4 $254 +JUMPV +line 184 +;184: break; +LABELV $263 +line 186 +;185: case CG_PLAYER_ARMOR_VALUE: +;186: return ps->stats[STAT_ARMOR]; +ADDRLP4 0 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +CVIF4 4 +RETF4 +ADDRGP4 $254 +JUMPV +line 187 +;187: break; +LABELV $264 +line 189 +;188: case CG_PLAYER_AMMO_VALUE: +;189: if ( cent->currentState.weapon ) +ADDRLP4 4 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $258 +line 190 +;190: { +line 191 +;191: return ps->ammo[weaponData[cent->currentState.weapon].ammoIndex]; +CNSTI4 56 +ADDRLP4 4 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 408 +ADDP4 +ADDP4 +INDIRI4 +CVIF4 4 +RETF4 +ADDRGP4 $254 +JUMPV +line 193 +;192: } +;193: break; +LABELV $267 +line 195 +;194: case CG_PLAYER_SCORE: +;195: return cg.snap->ps.persistant[PERS_SCORE]; +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 324 +ADDP4 +INDIRI4 +CVIF4 4 +RETF4 +ADDRGP4 $254 +JUMPV +line 196 +;196: break; +LABELV $269 +line 198 +;197: case CG_PLAYER_HEALTH: +;198: return ps->stats[STAT_HEALTH]; +ADDRLP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CVIF4 4 +RETF4 +ADDRGP4 $254 +JUMPV +line 199 +;199: break; +LABELV $270 +line 201 +;200: case CG_RED_SCORE: +;201: return cgs.scores1; +ADDRGP4 cgs+36324 +INDIRI4 +CVIF4 4 +RETF4 +ADDRGP4 $254 +JUMPV +line 202 +;202: break; +LABELV $272 +line 204 +;203: case CG_BLUE_SCORE: +;204: return cgs.scores2; +ADDRGP4 cgs+36328 +INDIRI4 +CVIF4 4 +RETF4 +ADDRGP4 $254 +JUMPV +line 205 +;205: break; +LABELV $274 +line 207 +;206: case CG_PLAYER_FORCE_VALUE: +;207: return ps->fd.forcePower; +ADDRLP4 0 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRI4 +CVIF4 4 +RETF4 +ADDRGP4 $254 +JUMPV +line 208 +;208: break; +line 210 +;209: default: +;210: break; +LABELV $258 +line 212 +;211: } +;212: return -1; +CNSTF4 3212836864 +RETF4 +LABELV $254 +endproc CG_GetValue 44 0 +export CG_OtherTeamHasFlag +proc CG_OtherTeamHasFlag 8 0 +line 215 +;213:} +;214: +;215:qboolean CG_OtherTeamHasFlag(void) { +line 216 +;216: if (cgs.gametype == GT_CTF || cgs.gametype == GT_CTY) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +EQI4 $284 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $280 +LABELV $284 +line 217 +;217: int team = cg.snap->ps.persistant[PERS_TEAM]; +ADDRLP4 0 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +ASGNI4 +line 218 +;218: if (team == TEAM_RED && cgs.redflag == FLAG_TAKEN) { +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $286 +ADDRGP4 cgs+36348 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $286 +line 219 +;219: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $279 +JUMPV +LABELV $286 +line 220 +;220: } else if (team == TEAM_BLUE && cgs.blueflag == FLAG_TAKEN) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +NEI4 $289 +ADDRGP4 cgs+36352 +INDIRI4 +CNSTI4 1 +NEI4 $289 +line 221 +;221: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $279 +JUMPV +LABELV $289 +line 222 +;222: } else { +line 223 +;223: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $279 +JUMPV +LABELV $280 +line 226 +;224: } +;225: } +;226: return qfalse; +CNSTI4 0 +RETI4 +LABELV $279 +endproc CG_OtherTeamHasFlag 8 0 +export CG_YourTeamHasFlag +proc CG_YourTeamHasFlag 8 0 +line 229 +;227:} +;228: +;229:qboolean CG_YourTeamHasFlag(void) { +line 230 +;230: if (cgs.gametype == GT_CTF || cgs.gametype == GT_CTY) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +EQI4 $297 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $293 +LABELV $297 +line 231 +;231: int team = cg.snap->ps.persistant[PERS_TEAM]; +ADDRLP4 0 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +ASGNI4 +line 232 +;232: if (team == TEAM_RED && cgs.blueflag == FLAG_TAKEN) { +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $299 +ADDRGP4 cgs+36352 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $299 +line 233 +;233: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $292 +JUMPV +LABELV $299 +line 234 +;234: } else if (team == TEAM_BLUE && cgs.redflag == FLAG_TAKEN) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +NEI4 $302 +ADDRGP4 cgs+36348 +INDIRI4 +CNSTI4 1 +NEI4 $302 +line 235 +;235: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $292 +JUMPV +LABELV $302 +line 236 +;236: } else { +line 237 +;237: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $292 +JUMPV +LABELV $293 +line 240 +;238: } +;239: } +;240: return qfalse; +CNSTI4 0 +RETI4 +LABELV $292 +endproc CG_YourTeamHasFlag 8 0 +export CG_OwnerDrawVisible +proc CG_OwnerDrawVisible 4 0 +line 245 +;241:} +;242: +;243:// THINKABOUTME: should these be exclusive or inclusive.. +;244:// +;245:qboolean CG_OwnerDrawVisible(int flags) { +line 247 +;246: +;247: if (flags & CG_SHOW_TEAMINFO) { +ADDRFP4 0 +INDIRI4 +CNSTI4 32768 +BANDI4 +CNSTI4 0 +EQI4 $306 +line 248 +;248: return (cg_currentSelectedPlayer.integer == numSortedTeamPlayers); +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +ADDRGP4 numSortedTeamPlayers +INDIRI4 +NEI4 $310 +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +ADDRGP4 $311 +JUMPV +LABELV $310 +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $311 +ADDRLP4 0 +INDIRI4 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $306 +line 251 +;249: } +;250: +;251: if (flags & CG_SHOW_NOTEAMINFO) { +ADDRFP4 0 +INDIRI4 +CNSTI4 65536 +BANDI4 +CNSTI4 0 +EQI4 $312 +line 252 +;252: return !(cg_currentSelectedPlayer.integer == numSortedTeamPlayers); +ADDRGP4 cg_currentSelectedPlayer+12 +INDIRI4 +ADDRGP4 numSortedTeamPlayers +INDIRI4 +EQI4 $316 +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +ADDRGP4 $317 +JUMPV +LABELV $316 +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $317 +ADDRLP4 0 +INDIRI4 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $312 +line 255 +;253: } +;254: +;255: if (flags & CG_SHOW_OTHERTEAMHASFLAG) { +ADDRFP4 0 +INDIRI4 +CNSTI4 131072 +BANDI4 +CNSTI4 0 +EQI4 $318 +line 256 +;256: return CG_OtherTeamHasFlag(); +ADDRLP4 0 +ADDRGP4 CG_OtherTeamHasFlag +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $318 +line 259 +;257: } +;258: +;259: if (flags & CG_SHOW_YOURTEAMHASENEMYFLAG) { +ADDRFP4 0 +INDIRI4 +CNSTI4 262144 +BANDI4 +CNSTI4 0 +EQI4 $320 +line 260 +;260: return CG_YourTeamHasFlag(); +ADDRLP4 0 +ADDRGP4 CG_YourTeamHasFlag +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $320 +line 263 +;261: } +;262: +;263: if (flags & (CG_SHOW_BLUE_TEAM_HAS_REDFLAG | CG_SHOW_RED_TEAM_HAS_BLUEFLAG)) { +ADDRFP4 0 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 0 +EQI4 $322 +line 264 +;264: if (flags & CG_SHOW_BLUE_TEAM_HAS_REDFLAG && (cgs.redflag == FLAG_TAKEN || cgs.flagStatus == FLAG_TAKEN_RED)) { +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +ADDRFP4 0 +INDIRI4 +ADDRLP4 0 +INDIRI4 +BANDI4 +CNSTI4 0 +EQI4 $324 +ADDRGP4 cgs+36348 +INDIRI4 +ADDRLP4 0 +INDIRI4 +EQI4 $328 +ADDRGP4 cgs+36356 +INDIRI4 +CNSTI4 2 +NEI4 $324 +LABELV $328 +line 265 +;265: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $324 +line 266 +;266: } else if (flags & CG_SHOW_RED_TEAM_HAS_BLUEFLAG && (cgs.blueflag == FLAG_TAKEN || cgs.flagStatus == FLAG_TAKEN_BLUE)) { +ADDRFP4 0 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $329 +ADDRGP4 cgs+36352 +INDIRI4 +CNSTI4 1 +EQI4 $333 +ADDRGP4 cgs+36356 +INDIRI4 +CNSTI4 3 +NEI4 $329 +LABELV $333 +line 267 +;267: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $329 +line 269 +;268: } +;269: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $322 +line 272 +;270: } +;271: +;272: if (flags & CG_SHOW_ANYTEAMGAME) { +ADDRFP4 0 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $334 +line 273 +;273: if( cgs.gametype >= GT_TEAM) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $336 +line 274 +;274: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $336 +line 276 +;275: } +;276: } +LABELV $334 +line 278 +;277: +;278: if (flags & CG_SHOW_ANYNONTEAMGAME) { +ADDRFP4 0 +INDIRI4 +CNSTI4 524288 +BANDI4 +CNSTI4 0 +EQI4 $339 +line 279 +;279: if( cgs.gametype < GT_TEAM) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +GEI4 $341 +line 280 +;280: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $341 +line 282 +;281: } +;282: } +LABELV $339 +line 284 +;283: +;284: if (flags & CG_SHOW_CTF) { +ADDRFP4 0 +INDIRI4 +CNSTI4 32 +BANDI4 +CNSTI4 0 +EQI4 $344 +line 285 +;285: if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +EQI4 $350 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $346 +LABELV $350 +line 286 +;286: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $346 +line 288 +;287: } +;288: } +LABELV $344 +line 290 +;289: +;290: if (flags & CG_SHOW_HEALTHCRITICAL) { +ADDRFP4 0 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $351 +line 291 +;291: if (cg.snap->ps.stats[STAT_HEALTH] < 25) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +CNSTI4 25 +GEI4 $353 +line 292 +;292: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $353 +line 294 +;293: } +;294: } +LABELV $351 +line 296 +;295: +;296: if (flags & CG_SHOW_HEALTHOK) { +ADDRFP4 0 +INDIRI4 +CNSTI4 16384 +BANDI4 +CNSTI4 0 +EQI4 $356 +line 297 +;297: if (cg.snap->ps.stats[STAT_HEALTH] >= 25) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +CNSTI4 25 +LTI4 $358 +line 298 +;298: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $358 +line 300 +;299: } +;300: } +LABELV $356 +line 302 +;301: +;302: if (flags & CG_SHOW_SINGLEPLAYER) { +ADDRFP4 0 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $361 +line 303 +;303: if( cgs.gametype == GT_SINGLE_PLAYER ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 4 +NEI4 $363 +line 304 +;304: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $363 +line 306 +;305: } +;306: } +LABELV $361 +line 308 +;307: +;308: if (flags & CG_SHOW_TOURNAMENT) { +ADDRFP4 0 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $366 +line 309 +;309: if( cgs.gametype == GT_TOURNAMENT ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $368 +line 310 +;310: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $368 +line 312 +;311: } +;312: } +LABELV $366 +line 314 +;313: +;314: if (flags & CG_SHOW_DURINGINCOMINGVOICE) { +ADDRFP4 0 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $371 +line 315 +;315: } +LABELV $371 +line 317 +;316: +;317: if (flags & CG_SHOW_IF_PLAYER_HAS_FLAG) { +ADDRFP4 0 +INDIRI4 +CNSTI4 2048 +BANDI4 +CNSTI4 0 +EQI4 $373 +line 318 +;318: if (cg.snap->ps.powerups[PW_REDFLAG] || cg.snap->ps.powerups[PW_BLUEFLAG] || cg.snap->ps.powerups[PW_NEUTRALFLAG]) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 404 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +NEI4 $381 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 408 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +NEI4 $381 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 412 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +EQI4 $375 +LABELV $381 +line 319 +;319: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $305 +JUMPV +LABELV $375 +line 321 +;320: } +;321: } +LABELV $373 +line 322 +;322: return qfalse; +CNSTI4 0 +RETI4 +LABELV $305 +endproc CG_OwnerDrawVisible 4 0 +data +align 4 +LABELV $383 +address $384 +export CG_GetKillerText +code +proc CG_GetKillerText 8 12 +line 326 +;323:} +;324: +;325: +;326:const char *CG_GetKillerText(void) { +line 328 +;327: static const char *s = ""; +;328: if ( cg.killerName[0] ) { +ADDRGP4 cg+6996 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $385 +line 329 +;329: s = va("%s %s", CG_GetStripEdString("INGAMETEXT", "KILLEDBY"), cg.killerName ); +ADDRGP4 $389 +ARGP4 +ADDRGP4 $390 +ARGP4 +ADDRLP4 0 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $388 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 cg+6996 +ARGP4 +ADDRLP4 4 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $383 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 330 +;330: } +LABELV $385 +line 331 +;331: return s; +ADDRGP4 $383 +INDIRP4 +RETP4 +LABELV $382 +endproc CG_GetKillerText 8 12 +data +align 4 +LABELV $393 +address $384 +export CG_GetGameStatusText +code +proc CG_GetGameStatusText 264 16 +line 335 +;332:} +;333: +;334: +;335:const char *CG_GetGameStatusText(void) { +line 337 +;336: static const char *s = ""; +;337: if ( cgs.gametype < GT_TEAM) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +GEI4 $394 +line 338 +;338: if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $395 +line 339 +;339: { +line 341 +;340: char sPlaceWith[256]; +;341: trap_SP_GetStringTextString("INGAMETEXT_PLACE_WITH", sPlaceWith, sizeof(sPlaceWith)); +ADDRGP4 $400 +ARGP4 +ADDRLP4 0 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 343 +;342: +;343: s = va("%s %s %i",CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), sPlaceWith, cg.snap->ps.persistant[PERS_SCORE] ); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 332 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 256 +ADDRGP4 CG_PlaceString +CALLP4 +ASGNP4 +ADDRGP4 $401 +ARGP4 +ADDRLP4 256 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 324 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 260 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $393 +ADDRLP4 260 +INDIRP4 +ASGNP4 +line 344 +;344: } +line 345 +;345: } else { +ADDRGP4 $395 +JUMPV +LABELV $394 +line 346 +;346: if ( cg.teamScores[0] == cg.teamScores[1] ) { +ADDRGP4 cg+5056 +INDIRI4 +ADDRGP4 cg+5056+4 +INDIRI4 +NEI4 $404 +line 347 +;347: s = va("Teams are tied at %i", cg.teamScores[0] ); +ADDRGP4 $409 +ARGP4 +ADDRGP4 cg+5056 +INDIRI4 +ARGI4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $393 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 348 +;348: } else if ( cg.teamScores[0] >= cg.teamScores[1] ) { +ADDRGP4 $405 +JUMPV +LABELV $404 +ADDRGP4 cg+5056 +INDIRI4 +ADDRGP4 cg+5056+4 +INDIRI4 +LTI4 $411 +line 349 +;349: s = va("Red leads Blue, %i to %i", cg.teamScores[0], cg.teamScores[1] ); +ADDRGP4 $416 +ARGP4 +ADDRGP4 cg+5056 +INDIRI4 +ARGI4 +ADDRGP4 cg+5056+4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $393 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 350 +;350: } else { +ADDRGP4 $412 +JUMPV +LABELV $411 +line 351 +;351: s = va("Blue leads Red, %i to %i", cg.teamScores[1], cg.teamScores[0] ); +ADDRGP4 $420 +ARGP4 +ADDRGP4 cg+5056+4 +INDIRI4 +ARGI4 +ADDRGP4 cg+5056 +INDIRI4 +ARGI4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $393 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 352 +;352: } +LABELV $412 +LABELV $405 +line 353 +;353: } +LABELV $395 +line 354 +;354: return s; +ADDRGP4 $393 +INDIRP4 +RETP4 +LABELV $392 +endproc CG_GetGameStatusText 264 16 +export CG_GameTypeString +proc CG_GameTypeString 0 0 +line 357 +;355:} +;356: +;357:const char *CG_GameTypeString(void) { +line 358 +;358: if ( cgs.gametype == GT_FFA ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 0 +NEI4 $425 +line 359 +;359: return "Free For All"; +ADDRGP4 $428 +RETP4 +ADDRGP4 $424 +JUMPV +LABELV $425 +line 360 +;360: } else if ( cgs.gametype == GT_HOLOCRON ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 1 +NEI4 $429 +line 361 +;361: return "Holocron FFA"; +ADDRGP4 $432 +RETP4 +ADDRGP4 $424 +JUMPV +LABELV $429 +line 362 +;362: } else if ( cgs.gametype == GT_JEDIMASTER ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 2 +NEI4 $433 +line 363 +;363: return "Jedi Master"; +ADDRGP4 $436 +RETP4 +ADDRGP4 $424 +JUMPV +LABELV $433 +line 364 +;364: } else if ( cgs.gametype == GT_TEAM ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +NEI4 $437 +line 365 +;365: return "Team FFA"; +ADDRGP4 $440 +RETP4 +ADDRGP4 $424 +JUMPV +LABELV $437 +line 366 +;366: } else if ( cgs.gametype == GT_SAGA ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 6 +NEI4 $441 +line 367 +;367: return "N/A"; +ADDRGP4 $444 +RETP4 +ADDRGP4 $424 +JUMPV +LABELV $441 +line 368 +;368: } else if ( cgs.gametype == GT_CTF ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +NEI4 $445 +line 369 +;369: return "Capture the Flag"; +ADDRGP4 $448 +RETP4 +ADDRGP4 $424 +JUMPV +LABELV $445 +line 370 +;370: } else if ( cgs.gametype == GT_CTY ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $449 +line 371 +;371: return "Capture the Ysalamiri"; +ADDRGP4 $452 +RETP4 +ADDRGP4 $424 +JUMPV +LABELV $449 +line 373 +;372: } +;373: return ""; +ADDRGP4 $384 +RETP4 +LABELV $424 +endproc CG_GameTypeString 0 0 +lit +align 1 +LABELV $456 +char 1 0 +skip 4095 +code +proc CG_Text_Paint_Limit 4148 36 +line 381 +;374:} +;375: +;376:extern int MenuFontToHandle(int iMenuFont); +;377: +;378:// maxX param is initially an X limit, but is also used as feedback. 0 = text was clipped to fit within, else maxX = next pos +;379:// +;380:static void CG_Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4_t color, const char* text, float adjust, int limit, int iMenuFont) +;381:{ +line 386 +;382: qboolean bIsTrailingPunctuation; +;383: +;384: // this is kinda dirty, but... +;385: // +;386: int iFontIndex = MenuFontToHandle(iMenuFont); +ADDRFP4 32 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 MenuFontToHandle +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 389 +;387: +;388: //float fMax = *maxX; +;389: int iPixelLen = trap_R_Font_StrLenPixels(text, iFontIndex, scale); +ADDRFP4 20 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 16 +ADDRGP4 trap_R_Font_StrLenPixels +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 390 +;390: if (x + iPixelLen > *maxX) +ADDRFP4 4 +INDIRF4 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDF4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +LEF4 $454 +line 391 +;391: { +line 395 +;392: // whole text won't fit, so we need to print just the amount that does... +;393: // Ok, this is slow and tacky, but only called occasionally, and it works... +;394: // +;395: char sTemp[4096]={0}; // lazy assumption +ADDRLP4 28 +ADDRGP4 $456 +INDIRB +ASGNB 4096 +line 396 +;396: const char *psText = text; +ADDRLP4 4124 +ADDRFP4 20 +INDIRP4 +ASGNP4 +line 397 +;397: char *psOut = &sTemp[0]; +ADDRLP4 20 +ADDRLP4 28 +ASGNP4 +line 398 +;398: char *psOutLastGood = psOut; +ADDRLP4 4128 +ADDRLP4 20 +INDIRP4 +ASGNP4 +ADDRGP4 $458 +JUMPV +LABELV $457 +line 404 +;399: unsigned int uiLetter; +;400: +;401: while (*psText && (x + trap_R_Font_StrLenPixels(sTemp, iFontIndex, scale)<=*maxX) +;402: && psOut < &sTemp[sizeof(sTemp)-1] // sanity +;403: ) +;404: { +line 406 +;405: int iAdvanceCount; +;406: psOutLastGood = psOut; +ADDRLP4 4128 +ADDRLP4 20 +INDIRP4 +ASGNP4 +line 408 +;407: +;408: uiLetter = trap_AnyLanguage_ReadCharFromString(psText, &iAdvanceCount, &bIsTrailingPunctuation); +ADDRLP4 4124 +INDIRP4 +ARGP4 +ADDRLP4 4132 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 4136 +ADDRGP4 trap_AnyLanguage_ReadCharFromString +CALLU4 +ASGNU4 +ADDRLP4 24 +ADDRLP4 4136 +INDIRU4 +ASGNU4 +line 409 +;409: psText += iAdvanceCount; +ADDRLP4 4124 +ADDRLP4 4132 +INDIRI4 +ADDRLP4 4124 +INDIRP4 +ADDP4 +ASGNP4 +line 411 +;410: +;411: if (uiLetter > 255) +ADDRLP4 24 +INDIRU4 +CNSTU4 255 +LEU4 $461 +line 412 +;412: { +line 413 +;413: *psOut++ = uiLetter>>8; +ADDRLP4 4140 +ADDRLP4 20 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 4140 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 4140 +INDIRP4 +ADDRLP4 24 +INDIRU4 +CNSTI4 8 +RSHU4 +CVUI4 4 +CVII1 4 +ASGNI1 +line 414 +;414: *psOut++ = uiLetter&0xFF; +ADDRLP4 4144 +ADDRLP4 20 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 4144 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 4144 +INDIRP4 +ADDRLP4 24 +INDIRU4 +CNSTU4 255 +BANDU4 +CVUI4 4 +CVII1 4 +ASGNI1 +line 415 +;415: } +ADDRGP4 $462 +JUMPV +LABELV $461 +line 417 +;416: else +;417: { +line 418 +;418: *psOut++ = uiLetter&0xFF; +ADDRLP4 4140 +ADDRLP4 20 +INDIRP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 4140 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 4140 +INDIRP4 +ADDRLP4 24 +INDIRU4 +CNSTU4 255 +BANDU4 +CVUI4 4 +CVII1 4 +ASGNI1 +line 419 +;419: } +LABELV $462 +line 420 +;420: } +LABELV $458 +line 401 +ADDRLP4 4124 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $464 +ADDRLP4 28 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 4132 +ADDRGP4 trap_R_Font_StrLenPixels +CALLI4 +ASGNI4 +ADDRFP4 4 +INDIRF4 +ADDRLP4 4132 +INDIRI4 +CVIF4 4 +ADDF4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +GTF4 $464 +ADDRLP4 20 +INDIRP4 +CVPU4 4 +ADDRLP4 28+4095 +CVPU4 4 +LTU4 $457 +LABELV $464 +line 421 +;421: *psOutLastGood = '\0'; +ADDRLP4 4128 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 423 +;422: +;423: *maxX = 0; // feedback +ADDRFP4 0 +INDIRP4 +CNSTF4 0 +ASGNF4 +line 424 +;424: CG_Text_Paint(x, y, scale, color, sTemp, adjust, limit, ITEM_TEXTSTYLE_NORMAL, iMenuFont); +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRLP4 28 +ARGP4 +ADDRFP4 24 +INDIRF4 +ARGF4 +ADDRFP4 28 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRFP4 32 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 425 +;425: } +ADDRGP4 $455 +JUMPV +LABELV $454 +line 427 +;426: else +;427: { +line 430 +;428: // whole text fits fine, so print it all... +;429: // +;430: *maxX = x + iPixelLen; // feedback the next position, as the caller expects +ADDRFP4 0 +INDIRP4 +ADDRFP4 4 +INDIRF4 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 431 +;431: CG_Text_Paint(x, y, scale, color, text, adjust, limit, ITEM_TEXTSTYLE_NORMAL, iMenuFont); +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRFP4 20 +INDIRP4 +ARGP4 +ADDRFP4 24 +INDIRF4 +ARGF4 +ADDRFP4 28 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRFP4 32 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 432 +;432: } +LABELV $455 +line 433 +;433:} +LABELV $453 +endproc CG_Text_Paint_Limit 4148 36 +export CG_DrawNewTeamInfo +proc CG_DrawNewTeamInfo 100 36 +line 439 +;434: +;435: +;436: +;437:#define PIC_WIDTH 12 +;438: +;439:void CG_DrawNewTeamInfo(rectDef_t *rect, float text_x, float text_y, float scale, vec4_t color, qhandle_t shader) { +line 451 +;440: int xx; +;441: float y; +;442: int i, j, len, count; +;443: const char *p; +;444: vec4_t hcolor; +;445: float pwidth, lwidth, maxx, leftOver; +;446: clientInfo_t *ci; +;447: gitem_t *item; +;448: qhandle_t h; +;449: +;450: // max player name width +;451: pwidth = 0; +ADDRLP4 64 +CNSTF4 0 +ASGNF4 +line 452 +;452: count = (numSortedTeamPlayers > 8) ? 8 : numSortedTeamPlayers; +ADDRGP4 numSortedTeamPlayers +INDIRI4 +CNSTI4 8 +LEI4 $467 +ADDRLP4 72 +CNSTI4 8 +ASGNI4 +ADDRGP4 $468 +JUMPV +LABELV $467 +ADDRLP4 72 +ADDRGP4 numSortedTeamPlayers +INDIRI4 +ASGNI4 +LABELV $468 +ADDRLP4 32 +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 453 +;453: for (i = 0; i < count; i++) { +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRGP4 $472 +JUMPV +LABELV $469 +line 454 +;454: ci = cgs.clientinfo + sortedTeamPlayers[i]; +ADDRLP4 4 +CNSTI4 788 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 455 +;455: if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 0 +EQI4 $474 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +NEI4 $474 +line 456 +;456: len = CG_Text_Width( ci->name, scale, 0); +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRFP4 12 +INDIRF4 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 80 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 80 +INDIRI4 +ASGNI4 +line 457 +;457: if (len > pwidth) +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ADDRLP4 64 +INDIRF4 +LEF4 $477 +line 458 +;458: pwidth = len; +ADDRLP4 64 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ASGNF4 +LABELV $477 +line 459 +;459: } +LABELV $474 +line 460 +;460: } +LABELV $470 +line 453 +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $472 +ADDRLP4 8 +INDIRI4 +ADDRLP4 32 +INDIRI4 +LTI4 $469 +line 463 +;461: +;462: // max location name width +;463: lwidth = 0; +ADDRLP4 68 +CNSTF4 0 +ASGNF4 +line 464 +;464: for (i = 1; i < MAX_LOCATIONS; i++) { +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +LABELV $479 +line 465 +;465: p = CG_ConfigString(CS_LOCATIONS + i); +ADDRLP4 8 +INDIRI4 +CNSTI4 640 +ADDI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 76 +INDIRP4 +ASGNP4 +line 466 +;466: if (p && *p) { +ADDRLP4 20 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $483 +ADDRLP4 20 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $483 +line 467 +;467: len = CG_Text_Width(p, scale, 0); +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRF4 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 84 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 84 +INDIRI4 +ASGNI4 +line 468 +;468: if (len > lwidth) +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ADDRLP4 68 +INDIRF4 +LEF4 $485 +line 469 +;469: lwidth = len; +ADDRLP4 68 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ASGNF4 +LABELV $485 +line 470 +;470: } +LABELV $483 +line 471 +;471: } +LABELV $480 +line 464 +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 64 +LTI4 $479 +line 473 +;472: +;473: y = rect->y; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 475 +;474: +;475: for (i = 0; i < count; i++) { +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRGP4 $490 +JUMPV +LABELV $487 +line 476 +;476: ci = cgs.clientinfo + sortedTeamPlayers[i]; +ADDRLP4 4 +CNSTI4 788 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 477 +;477: if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) { +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 0 +EQI4 $492 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +NEI4 $492 +line 479 +;478: +;479: xx = rect->x + 1; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +CVFI4 4 +ASGNI4 +line 480 +;480: for (j = 0; j <= PW_NUM_POWERUPS; j++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $495 +line 481 +;481: if (ci->powerups & (1 << j)) { +ADDRLP4 4 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $499 +line 483 +;482: +;483: item = BG_FindItemForPowerup( j ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 80 +ADDRGP4 BG_FindItemForPowerup +CALLP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 80 +INDIRP4 +ASGNP4 +line 485 +;484: +;485: if (item) { +ADDRLP4 16 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $501 +line 486 +;486: CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, trap_R_RegisterShader( item->icon ) ); +ADDRLP4 16 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 84 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRLP4 88 +CNSTF4 1094713344 +ASGNF4 +ADDRLP4 88 +INDIRF4 +ARGF4 +ADDRLP4 88 +INDIRF4 +ARGF4 +ADDRLP4 84 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 487 +;487: xx += PIC_WIDTH; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 12 +ADDI4 +ASGNI4 +line 488 +;488: } +LABELV $501 +line 489 +;489: } +LABELV $499 +line 490 +;490: } +LABELV $496 +line 480 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LEI4 $495 +line 493 +;491: +;492: // FIXME: max of 3 powerups shown properly +;493: xx = rect->x + (PIC_WIDTH * 3) + 2; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1108344832 +ADDF4 +CNSTF4 1073741824 +ADDF4 +CVFI4 4 +ASGNI4 +line 495 +;494: +;495: CG_GetColorForHealth( ci->health, ci->armor, hcolor ); +ADDRLP4 4 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 48 +ARGP4 +ADDRGP4 CG_GetColorForHealth +CALLV +pop +line 496 +;496: trap_R_SetColor(hcolor); +ADDRLP4 48 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 497 +;497: CG_DrawPic( xx, y + 1, PIC_WIDTH - 2, PIC_WIDTH - 2, cgs.media.heartShader ); +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ARGF4 +ADDRLP4 84 +CNSTF4 1092616192 +ASGNF4 +ADDRLP4 84 +INDIRF4 +ARGF4 +ADDRLP4 84 +INDIRF4 +ARGF4 +ADDRGP4 cgs+70296+568 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 503 +;498: +;499: //Com_sprintf (st, sizeof(st), "%3i %3i", ci->health, ci->armor); +;500: //CG_Text_Paint(xx, y + text_y, scale, hcolor, st, 0, 0); +;501: +;502: // draw weapon icon +;503: xx += PIC_WIDTH + 1; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 13 +ADDI4 +ASGNI4 +line 514 +;504: +;505:// weapon used is not that useful, use the space for task +;506:#if 0 +;507: if ( cg_weapons[ci->curWeapon].weaponIcon ) { +;508: CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, cg_weapons[ci->curWeapon].weaponIcon ); +;509: } else { +;510: CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, cgs.media.deferShader ); +;511: } +;512:#endif +;513: +;514: trap_R_SetColor(NULL); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 515 +;515: if (cgs.orderPending) { +ADDRGP4 cgs+70240 +INDIRI4 +CNSTI4 0 +EQI4 $505 +line 517 +;516: // blink the icon +;517: if ( cg.time > cgs.orderTime - 2500 && (cg.time >> 9 ) & 1 ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgs+70244 +INDIRI4 +CNSTI4 2500 +SUBI4 +LEI4 $508 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 9 +RSHI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $508 +line 518 +;518: h = 0; +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +line 519 +;519: } else { +ADDRGP4 $506 +JUMPV +LABELV $508 +line 520 +;520: h = CG_StatusHandle(cgs.currentOrder); +ADDRGP4 cgs+70236 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 CG_StatusHandle +CALLI4 +ASGNI4 +ADDRLP4 44 +ADDRLP4 88 +INDIRI4 +ASGNI4 +line 521 +;521: } +line 522 +;522: } else { +ADDRGP4 $506 +JUMPV +LABELV $505 +line 523 +;523: h = CG_StatusHandle(ci->teamTask); +ADDRLP4 4 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 CG_StatusHandle +CALLI4 +ASGNI4 +ADDRLP4 44 +ADDRLP4 88 +INDIRI4 +ASGNI4 +line 524 +;524: } +LABELV $506 +line 526 +;525: +;526: if (h) { +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +EQI4 $514 +line 527 +;527: CG_DrawPic( xx, y, PIC_WIDTH, PIC_WIDTH, h); +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRLP4 88 +CNSTF4 1094713344 +ASGNF4 +ADDRLP4 88 +INDIRF4 +ARGF4 +ADDRLP4 88 +INDIRF4 +ARGF4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 528 +;528: } +LABELV $514 +line 530 +;529: +;530: xx += PIC_WIDTH + 1; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 13 +ADDI4 +ASGNI4 +line 532 +;531: +;532: leftOver = rect->w - xx; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 533 +;533: maxx = xx + leftOver / 3; +ADDRLP4 36 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ADDRLP4 40 +INDIRF4 +CNSTF4 1077936128 +DIVF4 +ADDF4 +ASGNF4 +line 537 +;534: +;535: +;536: +;537: CG_Text_Paint_Limit(&maxx, xx, y + text_y, scale, color, ci->name, 0, 0, FONT_MEDIUM); +ADDRLP4 36 +ARGP4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +INDIRF4 +ADDRFP4 8 +INDIRF4 +ADDF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint_Limit +CALLV +pop +line 539 +;538: +;539: p = CG_ConfigString(CS_LOCATIONS + ci->location); +ADDRLP4 4 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +CNSTI4 640 +ADDI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 88 +INDIRP4 +ASGNP4 +line 540 +;540: if (!p || !*p) { +ADDRLP4 20 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $518 +ADDRLP4 20 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $516 +LABELV $518 +line 541 +;541: p = "unknown"; +ADDRLP4 20 +ADDRGP4 $519 +ASGNP4 +line 542 +;542: } +LABELV $516 +line 544 +;543: +;544: xx += leftOver / 3 + 2; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ADDRLP4 40 +INDIRF4 +CNSTF4 1077936128 +DIVF4 +CNSTF4 1073741824 +ADDF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 545 +;545: maxx = rect->w - 4; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1082130432 +SUBF4 +ASGNF4 +line 547 +;546: +;547: CG_Text_Paint_Limit(&maxx, xx, y + text_y, scale, color, p, 0, 0, FONT_MEDIUM); +ADDRLP4 36 +ARGP4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +INDIRF4 +ADDRFP4 8 +INDIRF4 +ADDF4 +ARGF4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint_Limit +CALLV +pop +line 548 +;548: y += text_y + 2; +ADDRLP4 24 +ADDRLP4 24 +INDIRF4 +ADDRFP4 8 +INDIRF4 +CNSTF4 1073741824 +ADDF4 +ADDF4 +ASGNF4 +line 549 +;549: if ( y + text_y + 2 > rect->y + rect->h ) { +ADDRLP4 96 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRF4 +ADDRFP4 8 +INDIRF4 +ADDF4 +CNSTF4 1073741824 +ADDF4 +ADDRLP4 96 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 96 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +LEF4 $520 +line 550 +;550: break; +ADDRGP4 $489 +JUMPV +LABELV $520 +line 553 +;551: } +;552: +;553: } +LABELV $492 +line 554 +;554: } +LABELV $488 +line 475 +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $490 +ADDRLP4 8 +INDIRI4 +ADDRLP4 32 +INDIRI4 +LTI4 $487 +LABELV $489 +line 555 +;555:} +LABELV $465 +endproc CG_DrawNewTeamInfo 100 36 +export CG_DrawTeamSpectators +proc CG_DrawTeamSpectators 24 36 +line 558 +;556: +;557: +;558:void CG_DrawTeamSpectators(rectDef_t *rect, float scale, vec4_t color, qhandle_t shader) { +line 559 +;559: if (cg.spectatorLen) { +ADDRGP4 cg+8052 +INDIRI4 +CNSTI4 0 +EQI4 $523 +line 562 +;560: float maxX; +;561: +;562: if (cg.spectatorWidth == -1) { +ADDRGP4 cg+8056 +INDIRF4 +CNSTF4 3212836864 +NEF4 $526 +line 563 +;563: cg.spectatorWidth = 0; +ADDRGP4 cg+8056 +CNSTF4 0 +ASGNF4 +line 564 +;564: cg.spectatorPaintX = rect->x + 1; +ADDRGP4 cg+8064 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +CVFI4 4 +ASGNI4 +line 565 +;565: cg.spectatorPaintX2 = -1; +ADDRGP4 cg+8068 +CNSTI4 -1 +ASGNI4 +line 566 +;566: } +LABELV $526 +line 568 +;567: +;568: if (cg.spectatorOffset > cg.spectatorLen) { +ADDRGP4 cg+8072 +INDIRI4 +ADDRGP4 cg+8052 +INDIRI4 +LEI4 $532 +line 569 +;569: cg.spectatorOffset = 0; +ADDRGP4 cg+8072 +CNSTI4 0 +ASGNI4 +line 570 +;570: cg.spectatorPaintX = rect->x + 1; +ADDRGP4 cg+8064 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +CVFI4 4 +ASGNI4 +line 571 +;571: cg.spectatorPaintX2 = -1; +ADDRGP4 cg+8068 +CNSTI4 -1 +ASGNI4 +line 572 +;572: } +LABELV $532 +line 574 +;573: +;574: if (cg.time > cg.spectatorTime) { +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+8060 +INDIRI4 +LEI4 $539 +line 575 +;575: cg.spectatorTime = cg.time + 10; +ADDRGP4 cg+8060 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 10 +ADDI4 +ASGNI4 +line 576 +;576: if (cg.spectatorPaintX <= rect->x + 2) { +ADDRGP4 cg+8064 +INDIRI4 +CVIF4 4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1073741824 +ADDF4 +GTF4 $545 +line 577 +;577: if (cg.spectatorOffset < cg.spectatorLen) { +ADDRGP4 cg+8072 +INDIRI4 +ADDRGP4 cg+8052 +INDIRI4 +GEI4 $548 +line 578 +;578: cg.spectatorPaintX += CG_Text_Width(&cg.spectatorList[cg.spectatorOffset], scale, 1) - 1; +ADDRGP4 cg+8072 +INDIRI4 +ADDRGP4 cg+7028 +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +CNSTI4 1 +ARGI4 +ADDRLP4 4 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRGP4 cg+8064 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +SUBI4 +ADDI4 +ASGNI4 +line 579 +;579: cg.spectatorOffset++; +ADDRLP4 12 +ADDRGP4 cg+8072 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 580 +;580: } else { +ADDRGP4 $546 +JUMPV +LABELV $548 +line 581 +;581: cg.spectatorOffset = 0; +ADDRGP4 cg+8072 +CNSTI4 0 +ASGNI4 +line 582 +;582: if (cg.spectatorPaintX2 >= 0) { +ADDRGP4 cg+8068 +INDIRI4 +CNSTI4 0 +LTI4 $557 +line 583 +;583: cg.spectatorPaintX = cg.spectatorPaintX2; +ADDRGP4 cg+8064 +ADDRGP4 cg+8068 +INDIRI4 +ASGNI4 +line 584 +;584: } else { +ADDRGP4 $558 +JUMPV +LABELV $557 +line 585 +;585: cg.spectatorPaintX = rect->x + rect->w - 2; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 cg+8064 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1073741824 +SUBF4 +CVFI4 4 +ASGNI4 +line 586 +;586: } +LABELV $558 +line 587 +;587: cg.spectatorPaintX2 = -1; +ADDRGP4 cg+8068 +CNSTI4 -1 +ASGNI4 +line 588 +;588: } +line 589 +;589: } else { +ADDRGP4 $546 +JUMPV +LABELV $545 +line 590 +;590: cg.spectatorPaintX--; +ADDRLP4 4 +ADDRGP4 cg+8064 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 591 +;591: if (cg.spectatorPaintX2 >= 0) { +ADDRGP4 cg+8068 +INDIRI4 +CNSTI4 0 +LTI4 $565 +line 592 +;592: cg.spectatorPaintX2--; +ADDRLP4 8 +ADDRGP4 cg+8068 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 593 +;593: } +LABELV $565 +line 594 +;594: } +LABELV $546 +line 595 +;595: } +LABELV $539 +line 597 +;596: +;597: maxX = rect->x + rect->w - 2; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 598 +;598: CG_Text_Paint_Limit(&maxX, cg.spectatorPaintX, rect->y + rect->h - 3, scale, color, &cg.spectatorList[cg.spectatorOffset], 0, 0, FONT_MEDIUM); +ADDRLP4 0 +ARGP4 +ADDRGP4 cg+8064 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1077936128 +SUBF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRGP4 cg+8072 +INDIRI4 +ADDRGP4 cg+7028 +ADDP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint_Limit +CALLV +pop +line 599 +;599: if (cg.spectatorPaintX2 >= 0) { +ADDRGP4 cg+8068 +INDIRI4 +CNSTI4 0 +LTI4 $572 +line 600 +;600: float maxX2 = rect->x + rect->w - 2; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 16 +INDIRP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 601 +;601: CG_Text_Paint_Limit(&maxX2, cg.spectatorPaintX2, rect->y + rect->h - 3, scale, color, cg.spectatorList, 0, cg.spectatorOffset, FONT_MEDIUM); +ADDRLP4 12 +ARGP4 +ADDRGP4 cg+8068 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1077936128 +SUBF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRGP4 cg+7028 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRGP4 cg+8072 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint_Limit +CALLV +pop +line 602 +;602: } +LABELV $572 +line 603 +;603: if (cg.spectatorOffset && maxX > 0) { +ADDRGP4 cg+8072 +INDIRI4 +CNSTI4 0 +EQI4 $578 +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +LEF4 $578 +line 605 +;604: // if we have an offset ( we are skipping the first part of the string ) and we fit the string +;605: if (cg.spectatorPaintX2 == -1) { +ADDRGP4 cg+8068 +INDIRI4 +CNSTI4 -1 +NEI4 $579 +line 606 +;606: cg.spectatorPaintX2 = rect->x + rect->w - 2; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 cg+8068 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1073741824 +SUBF4 +CVFI4 4 +ASGNI4 +line 607 +;607: } +line 608 +;608: } else { +ADDRGP4 $579 +JUMPV +LABELV $578 +line 609 +;609: cg.spectatorPaintX2 = -1; +ADDRGP4 cg+8068 +CNSTI4 -1 +ASGNI4 +line 610 +;610: } +LABELV $579 +line 612 +;611: +;612: } +LABELV $523 +line 613 +;613:} +LABELV $522 +endproc CG_DrawTeamSpectators 24 36 +export CG_DrawMedal +proc CG_DrawMedal 32 36 +line 617 +;614: +;615: +;616: +;617:void CG_DrawMedal(int ownerDraw, rectDef_t *rect, float scale, vec4_t color, qhandle_t shader) { +line 618 +;618: score_t *score = &cg.scores[cg.selectedScore]; +ADDRLP4 8 +CNSTI4 60 +ADDRGP4 cg+5052 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +ASGNP4 +line 619 +;619: float value = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 620 +;620: char *text = NULL; +ADDRLP4 4 +CNSTP4 0 +ASGNP4 +line 621 +;621: color[3] = 0.25; +ADDRFP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1048576000 +ASGNF4 +line 623 +;622: +;623: switch (ownerDraw) { +ADDRLP4 12 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 53 +LTI4 $589 +ADDRLP4 12 +INDIRI4 +CNSTI4 59 +GTI4 $599 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $600-212 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $600 +address $591 +address $592 +address $593 +address $594 +address $595 +address $596 +address $597 +code +LABELV $599 +ADDRFP4 0 +INDIRI4 +CNSTI4 69 +EQI4 $598 +ADDRGP4 $589 +JUMPV +LABELV $591 +line 625 +;624: case CG_ACCURACY: +;625: value = score->accuracy; +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 626 +;626: break; +ADDRGP4 $590 +JUMPV +LABELV $592 +line 628 +;627: case CG_ASSISTS: +;628: value = score->assistCount; +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 629 +;629: break; +ADDRGP4 $590 +JUMPV +LABELV $593 +line 631 +;630: case CG_DEFEND: +;631: value = score->defendCount; +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 632 +;632: break; +ADDRGP4 $590 +JUMPV +LABELV $594 +line 634 +;633: case CG_EXCELLENT: +;634: value = score->excellentCount; +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 635 +;635: break; +ADDRGP4 $590 +JUMPV +LABELV $595 +line 637 +;636: case CG_IMPRESSIVE: +;637: value = score->impressiveCount; +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 638 +;638: break; +ADDRGP4 $590 +JUMPV +LABELV $596 +line 640 +;639: case CG_PERFECT: +;640: value = score->perfect; +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 641 +;641: break; +ADDRGP4 $590 +JUMPV +LABELV $597 +line 643 +;642: case CG_GAUNTLET: +;643: value = score->guantletCount; +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 644 +;644: break; +ADDRGP4 $590 +JUMPV +LABELV $598 +line 646 +;645: case CG_CAPTURES: +;646: value = score->captures; +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 647 +;647: break; +LABELV $589 +LABELV $590 +line 650 +;648: } +;649: +;650: if (value > 0) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +LEF4 $602 +line 651 +;651: if (ownerDraw != CG_PERFECT) { +ADDRFP4 0 +INDIRI4 +CNSTI4 58 +EQI4 $604 +line 652 +;652: if (ownerDraw == CG_ACCURACY) { +ADDRFP4 0 +INDIRI4 +CNSTI4 53 +NEI4 $606 +line 653 +;653: text = va("%i%%", (int)value); +ADDRGP4 $608 +ARGP4 +ADDRLP4 0 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 16 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 654 +;654: if (value > 50) { +ADDRLP4 0 +INDIRF4 +CNSTF4 1112014848 +LEF4 $605 +line 655 +;655: color[3] = 1.0; +ADDRFP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 656 +;656: } +line 657 +;657: } else { +ADDRGP4 $605 +JUMPV +LABELV $606 +line 658 +;658: text = va("%i", (int)value); +ADDRGP4 $611 +ARGP4 +ADDRLP4 0 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 16 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 659 +;659: color[3] = 1.0; +ADDRFP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 660 +;660: } +line 661 +;661: } else { +ADDRGP4 $605 +JUMPV +LABELV $604 +line 662 +;662: if (value) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +EQF4 $612 +line 663 +;663: color[3] = 1.0; +ADDRFP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 664 +;664: } +LABELV $612 +line 665 +;665: text = "Wow"; +ADDRLP4 4 +ADDRGP4 $614 +ASGNP4 +line 666 +;666: } +LABELV $605 +line 667 +;667: } +LABELV $602 +line 669 +;668: +;669: trap_R_SetColor(color); +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 670 +;670: CG_DrawPic( rect->x, rect->y, rect->w, rect->h, shader ); +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 672 +;671: +;672: if (text) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $615 +line 673 +;673: color[3] = 1.0; +ADDRFP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 674 +;674: value = CG_Text_Width(text, scale, 0); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRF4 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 20 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 20 +INDIRI4 +CVIF4 4 +ASGNF4 +line 675 +;675: CG_Text_Paint(rect->x + (rect->w - value) / 2, rect->y + rect->h + 10 , scale, color, text, 0, 0, 0, FONT_MEDIUM); +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +CNSTF4 1073741824 +DIVF4 +ADDF4 +ARGF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1092616192 +ADDF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 676 +;676: } +LABELV $615 +line 677 +;677: trap_R_SetColor(NULL); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 679 +;678: +;679:} +LABELV $586 +endproc CG_DrawMedal 32 36 +export CG_OwnerDraw +proc CG_OwnerDraw 0 0 +line 683 +;680: +;681: +;682:// +;683:void CG_OwnerDraw(float x, float y, float w, float h, float text_x, float text_y, int ownerDraw, int ownerDrawFlags, int align, float special, float scale, vec4_t color, qhandle_t shader, int textStyle,int font) { +line 866 +;684: +;685://Ignore all this, at least for now. May put some stat stuff back in menu files later. +;686:#if 0 +;687: rectDef_t rect; +;688: +;689: if ( cg_drawStatus.integer == 0 ) { +;690: return; +;691: } +;692: +;693: //if (ownerDrawFlags != 0 && !CG_OwnerDrawVisible(ownerDrawFlags)) { +;694: // return; +;695: //} +;696: +;697: rect.x = x; +;698: rect.y = y; +;699: rect.w = w; +;700: rect.h = h; +;701: +;702: switch (ownerDraw) { +;703: case CG_PLAYER_ARMOR_ICON: +;704: CG_DrawPlayerArmorIcon(&rect, ownerDrawFlags & CG_SHOW_2DONLY); +;705: break; +;706: case CG_PLAYER_ARMOR_ICON2D: +;707: CG_DrawPlayerArmorIcon(&rect, qtrue); +;708: break; +;709: case CG_PLAYER_ARMOR_VALUE: +;710: CG_DrawPlayerArmorValue(&rect, scale, color, shader, textStyle); +;711: break; +;712: case CG_PLAYER_FORCE_VALUE: +;713: CG_DrawPlayerForceValue(&rect, scale, color, shader, textStyle); +;714: return ; +;715: case CG_PLAYER_AMMO_ICON: +;716: CG_DrawPlayerAmmoIcon(&rect, ownerDrawFlags & CG_SHOW_2DONLY); +;717: break; +;718: case CG_PLAYER_AMMO_ICON2D: +;719: CG_DrawPlayerAmmoIcon(&rect, qtrue); +;720: break; +;721: case CG_PLAYER_AMMO_VALUE: +;722: CG_DrawPlayerAmmoValue(&rect, scale, color, shader, textStyle); +;723: break; +;724: case CG_SELECTEDPLAYER_HEAD: +;725: CG_DrawSelectedPlayerHead(&rect, ownerDrawFlags & CG_SHOW_2DONLY, qfalse); +;726: break; +;727: case CG_VOICE_HEAD: +;728: CG_DrawSelectedPlayerHead(&rect, ownerDrawFlags & CG_SHOW_2DONLY, qtrue); +;729: break; +;730: case CG_VOICE_NAME: +;731: CG_DrawSelectedPlayerName(&rect, scale, color, qtrue, textStyle); +;732: break; +;733: case CG_SELECTEDPLAYER_STATUS: +;734: CG_DrawSelectedPlayerStatus(&rect); +;735: break; +;736: case CG_SELECTEDPLAYER_ARMOR: +;737: CG_DrawSelectedPlayerArmor(&rect, scale, color, shader, textStyle); +;738: break; +;739: case CG_SELECTEDPLAYER_HEALTH: +;740: CG_DrawSelectedPlayerHealth(&rect, scale, color, shader, textStyle); +;741: break; +;742: case CG_SELECTEDPLAYER_NAME: +;743: CG_DrawSelectedPlayerName(&rect, scale, color, qfalse, textStyle); +;744: break; +;745: case CG_SELECTEDPLAYER_LOCATION: +;746: CG_DrawSelectedPlayerLocation(&rect, scale, color, textStyle); +;747: break; +;748: case CG_SELECTEDPLAYER_WEAPON: +;749: CG_DrawSelectedPlayerWeapon(&rect); +;750: break; +;751: case CG_SELECTEDPLAYER_POWERUP: +;752: CG_DrawSelectedPlayerPowerup(&rect, ownerDrawFlags & CG_SHOW_2DONLY); +;753: break; +;754: case CG_PLAYER_HEAD: +;755: CG_DrawPlayerHead(&rect, ownerDrawFlags & CG_SHOW_2DONLY); +;756: break; +;757: case CG_PLAYER_ITEM: +;758: CG_DrawPlayerItem(&rect, scale, ownerDrawFlags & CG_SHOW_2DONLY); +;759: break; +;760: case CG_PLAYER_SCORE: +;761: CG_DrawPlayerScore(&rect, scale, color, shader, textStyle); +;762: break; +;763: case CG_PLAYER_HEALTH: +;764: CG_DrawPlayerHealth(&rect, scale, color, shader, textStyle); +;765: break; +;766: case CG_RED_SCORE: +;767: CG_DrawRedScore(&rect, scale, color, shader, textStyle); +;768: break; +;769: case CG_BLUE_SCORE: +;770: CG_DrawBlueScore(&rect, scale, color, shader, textStyle); +;771: break; +;772: case CG_RED_NAME: +;773: CG_DrawRedName(&rect, scale, color, textStyle); +;774: break; +;775: case CG_BLUE_NAME: +;776: CG_DrawBlueName(&rect, scale, color, textStyle); +;777: break; +;778: case CG_BLUE_FLAGHEAD: +;779: CG_DrawBlueFlagHead(&rect); +;780: break; +;781: case CG_BLUE_FLAGSTATUS: +;782: CG_DrawBlueFlagStatus(&rect, shader); +;783: break; +;784: case CG_BLUE_FLAGNAME: +;785: CG_DrawBlueFlagName(&rect, scale, color, textStyle); +;786: break; +;787: case CG_RED_FLAGHEAD: +;788: CG_DrawRedFlagHead(&rect); +;789: break; +;790: case CG_RED_FLAGSTATUS: +;791: CG_DrawRedFlagStatus(&rect, shader); +;792: break; +;793: case CG_RED_FLAGNAME: +;794: CG_DrawRedFlagName(&rect, scale, color, textStyle); +;795: break; +;796: case CG_PLAYER_LOCATION: +;797: CG_DrawPlayerLocation(&rect, scale, color, textStyle); +;798: break; +;799: case CG_TEAM_COLOR: +;800: CG_DrawTeamColor(&rect, color); +;801: break; +;802: case CG_CTF_POWERUP: +;803: CG_DrawCTFPowerUp(&rect); +;804: break; +;805: case CG_AREA_POWERUP: +;806: CG_DrawAreaPowerUp(&rect, align, special, scale, color); +;807: break; +;808: case CG_PLAYER_STATUS: +;809: CG_DrawPlayerStatus(&rect); +;810: break; +;811: case CG_PLAYER_HASFLAG: +;812: CG_DrawPlayerHasFlag(&rect, qfalse); +;813: break; +;814: case CG_PLAYER_HASFLAG2D: +;815: CG_DrawPlayerHasFlag(&rect, qtrue); +;816: break; +;817: case CG_AREA_SYSTEMCHAT: +;818: CG_DrawAreaSystemChat(&rect, scale, color, shader); +;819: break; +;820: case CG_AREA_TEAMCHAT: +;821: CG_DrawAreaTeamChat(&rect, scale, color, shader); +;822: break; +;823: case CG_AREA_CHAT: +;824: CG_DrawAreaChat(&rect, scale, color, shader); +;825: break; +;826: case CG_GAME_TYPE: +;827: CG_DrawGameType(&rect, scale, color, shader, textStyle); +;828: break; +;829: case CG_GAME_STATUS: +;830: CG_DrawGameStatus(&rect, scale, color, shader, textStyle); +;831: break; +;832: case CG_KILLER: +;833: CG_DrawKiller(&rect, scale, color, shader, textStyle); +;834: break; +;835: case CG_ACCURACY: +;836: case CG_ASSISTS: +;837: case CG_DEFEND: +;838: case CG_EXCELLENT: +;839: case CG_IMPRESSIVE: +;840: case CG_PERFECT: +;841: case CG_GAUNTLET: +;842: case CG_CAPTURES: +;843: CG_DrawMedal(ownerDraw, &rect, scale, color, shader); +;844: break; +;845: case CG_SPECTATORS: +;846: CG_DrawTeamSpectators(&rect, scale, color, shader); +;847: break; +;848: case CG_TEAMINFO: +;849: if (cg_currentSelectedPlayer.integer == numSortedTeamPlayers) { +;850: CG_DrawNewTeamInfo(&rect, text_x, text_y, scale, color, shader); +;851: } +;852: break; +;853: case CG_CAPFRAGLIMIT: +;854: CG_DrawCapFragLimit(&rect, scale, color, shader, textStyle); +;855: break; +;856: case CG_1STPLACE: +;857: CG_Draw1stPlace(&rect, scale, color, shader, textStyle); +;858: break; +;859: case CG_2NDPLACE: +;860: CG_Draw2ndPlace(&rect, scale, color, shader, textStyle); +;861: break; +;862: default: +;863: break; +;864: } +;865:#endif +;866:} +LABELV $617 +endproc CG_OwnerDraw 0 0 +export CG_MouseEvent +proc CG_MouseEvent 16 12 +line 868 +;867: +;868:void CG_MouseEvent(int x, int y) { +line 871 +;869: int n; +;870: +;871: if ( (cg.predictedPlayerState.pm_type == PM_NORMAL || cg.predictedPlayerState.pm_type == PM_FLOAT || cg.predictedPlayerState.pm_type == PM_SPECTATOR) && cg.showScores == qfalse) { +ADDRGP4 cg+96+4 +INDIRI4 +CNSTI4 0 +EQI4 $629 +ADDRGP4 cg+96+4 +INDIRI4 +CNSTI4 1 +EQI4 $629 +ADDRGP4 cg+96+4 +INDIRI4 +CNSTI4 3 +NEI4 $619 +LABELV $629 +ADDRGP4 cg+6984 +INDIRI4 +CNSTI4 0 +NEI4 $619 +line 872 +;872: trap_Key_SetCatcher(0); +CNSTI4 0 +ARGI4 +ADDRGP4 trap_Key_SetCatcher +CALLV +pop +line 873 +;873: return; +ADDRGP4 $618 +JUMPV +LABELV $619 +line 876 +;874: } +;875: +;876: cgs.cursorX+= x; +ADDRLP4 4 +ADDRGP4 cgs+70208 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 877 +;877: if (cgs.cursorX < 0) +ADDRGP4 cgs+70208 +INDIRI4 +CNSTI4 0 +GEI4 $631 +line 878 +;878: cgs.cursorX = 0; +ADDRGP4 cgs+70208 +CNSTI4 0 +ASGNI4 +ADDRGP4 $632 +JUMPV +LABELV $631 +line 879 +;879: else if (cgs.cursorX > 640) +ADDRGP4 cgs+70208 +INDIRI4 +CNSTI4 640 +LEI4 $635 +line 880 +;880: cgs.cursorX = 640; +ADDRGP4 cgs+70208 +CNSTI4 640 +ASGNI4 +LABELV $635 +LABELV $632 +line 882 +;881: +;882: cgs.cursorY += y; +ADDRLP4 8 +ADDRGP4 cgs+70212 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +ADDI4 +ASGNI4 +line 883 +;883: if (cgs.cursorY < 0) +ADDRGP4 cgs+70212 +INDIRI4 +CNSTI4 0 +GEI4 $640 +line 884 +;884: cgs.cursorY = 0; +ADDRGP4 cgs+70212 +CNSTI4 0 +ASGNI4 +ADDRGP4 $641 +JUMPV +LABELV $640 +line 885 +;885: else if (cgs.cursorY > 480) +ADDRGP4 cgs+70212 +INDIRI4 +CNSTI4 480 +LEI4 $644 +line 886 +;886: cgs.cursorY = 480; +ADDRGP4 cgs+70212 +CNSTI4 480 +ASGNI4 +LABELV $644 +LABELV $641 +line 888 +;887: +;888: n = Display_CursorType(cgs.cursorX, cgs.cursorY); +ADDRGP4 cgs+70208 +INDIRI4 +ARGI4 +ADDRGP4 cgs+70212 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 Display_CursorType +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 889 +;889: cgs.activeCursor = 0; +ADDRGP4 cgs+70232 +CNSTI4 0 +ASGNI4 +line 890 +;890: if (n == CURSOR_ARROW) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +NEI4 $651 +line 891 +;891: cgs.activeCursor = cgs.media.selectCursor; +ADDRGP4 cgs+70232 +ADDRGP4 cgs+70296+920 +INDIRI4 +ASGNI4 +line 892 +;892: } else if (n == CURSOR_SIZER) { +ADDRGP4 $652 +JUMPV +LABELV $651 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +NEI4 $656 +line 893 +;893: cgs.activeCursor = cgs.media.sizeCursor; +ADDRGP4 cgs+70232 +ADDRGP4 cgs+70296+924 +INDIRI4 +ASGNI4 +line 894 +;894: } +LABELV $656 +LABELV $652 +line 896 +;895: +;896: if (cgs.capturedItem) { +ADDRGP4 cgs+70228 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $661 +line 897 +;897: Display_MouseMove(cgs.capturedItem, x, y); +ADDRGP4 cgs+70228 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 Display_MouseMove +CALLI4 +pop +line 898 +;898: } else { +ADDRGP4 $662 +JUMPV +LABELV $661 +line 899 +;899: Display_MouseMove(NULL, cgs.cursorX, cgs.cursorY); +CNSTP4 0 +ARGP4 +ADDRGP4 cgs+70208 +INDIRI4 +ARGI4 +ADDRGP4 cgs+70212 +INDIRI4 +ARGI4 +ADDRGP4 Display_MouseMove +CALLI4 +pop +line 900 +;900: } +LABELV $662 +line 902 +;901: +;902:} +LABELV $618 +endproc CG_MouseEvent 16 12 +export CG_HideTeamMenu +proc CG_HideTeamMenu 0 4 +line 910 +;903: +;904:/* +;905:================== +;906:CG_HideTeamMenus +;907:================== +;908: +;909:*/ +;910:void CG_HideTeamMenu() { +line 911 +;911: Menus_CloseByName("teamMenu"); +ADDRGP4 $668 +ARGP4 +ADDRGP4 Menus_CloseByName +CALLV +pop +line 912 +;912: Menus_CloseByName("getMenu"); +ADDRGP4 $669 +ARGP4 +ADDRGP4 Menus_CloseByName +CALLV +pop +line 913 +;913:} +LABELV $667 +endproc CG_HideTeamMenu 0 4 +export CG_ShowTeamMenu +proc CG_ShowTeamMenu 0 4 +line 921 +;914: +;915:/* +;916:================== +;917:CG_ShowTeamMenus +;918:================== +;919: +;920:*/ +;921:void CG_ShowTeamMenu() { +line 922 +;922: Menus_OpenByName("teamMenu"); +ADDRGP4 $668 +ARGP4 +ADDRGP4 Menus_OpenByName +CALLV +pop +line 923 +;923:} +LABELV $670 +endproc CG_ShowTeamMenu 0 4 +export CG_EventHandling +proc CG_EventHandling 0 0 +line 937 +;924: +;925: +;926: +;927: +;928:/* +;929:================== +;930:CG_EventHandling +;931:================== +;932: type 0 - no event handling +;933: 1 - team menu +;934: 2 - hud editor +;935: +;936:*/ +;937:void CG_EventHandling(int type) { +line 938 +;938: cgs.eventHandling = type; +ADDRGP4 cgs+70216 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 939 +;939: if (type == CGAME_EVENT_NONE) { +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $673 +line 940 +;940: CG_HideTeamMenu(); +ADDRGP4 CG_HideTeamMenu +CALLV +pop +line 941 +;941: } else if (type == CGAME_EVENT_TEAMMENU) { +ADDRGP4 $674 +JUMPV +LABELV $673 +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +NEI4 $675 +line 943 +;942: //CG_ShowTeamMenu(); +;943: } else if (type == CGAME_EVENT_SCOREBOARD) { +ADDRGP4 $676 +JUMPV +LABELV $675 +ADDRFP4 0 +INDIRI4 +CNSTI4 2 +NEI4 $677 +line 944 +;944: } +LABELV $677 +LABELV $676 +LABELV $674 +line 946 +;945: +;946:} +LABELV $671 +endproc CG_EventHandling 0 0 +export CG_KeyEvent +proc CG_KeyEvent 8 16 +line 950 +;947: +;948: +;949: +;950:void CG_KeyEvent(int key, qboolean down) { +line 952 +;951: +;952: if (!down) { +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $680 +line 953 +;953: return; +ADDRGP4 $679 +JUMPV +LABELV $680 +line 956 +;954: } +;955: +;956: if ( cg.predictedPlayerState.pm_type == PM_NORMAL || cg.predictedPlayerState.pm_type == PM_NORMAL || (cg.predictedPlayerState.pm_type == PM_SPECTATOR && cg.showScores == qfalse)) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+96+4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +EQI4 $692 +ADDRGP4 cg+96+4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +EQI4 $692 +ADDRGP4 cg+96+4 +INDIRI4 +CNSTI4 3 +NEI4 $682 +ADDRGP4 cg+6984 +INDIRI4 +ADDRLP4 0 +INDIRI4 +NEI4 $682 +LABELV $692 +line 957 +;957: CG_EventHandling(CGAME_EVENT_NONE); +CNSTI4 0 +ARGI4 +ADDRGP4 CG_EventHandling +CALLV +pop +line 958 +;958: trap_Key_SetCatcher(0); +CNSTI4 0 +ARGI4 +ADDRGP4 trap_Key_SetCatcher +CALLV +pop +line 959 +;959: return; +ADDRGP4 $679 +JUMPV +LABELV $682 +line 970 +;960: } +;961: +;962: //if (key == trap_Key_GetKey("teamMenu") || !Display_CaptureItem(cgs.cursorX, cgs.cursorY)) { +;963: // if we see this then we should always be visible +;964: // CG_EventHandling(CGAME_EVENT_NONE); +;965: // trap_Key_SetCatcher(0); +;966: //} +;967: +;968: +;969: +;970: Display_HandleKey(key, down, cgs.cursorX, cgs.cursorY); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 cgs+70208 +INDIRI4 +ARGI4 +ADDRGP4 cgs+70212 +INDIRI4 +ARGI4 +ADDRGP4 Display_HandleKey +CALLV +pop +line 972 +;971: +;972: if (cgs.capturedItem) { +ADDRGP4 cgs+70228 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $695 +line 973 +;973: cgs.capturedItem = NULL; +ADDRGP4 cgs+70228 +CNSTP4 0 +ASGNP4 +line 974 +;974: } else { +ADDRGP4 $696 +JUMPV +LABELV $695 +line 975 +;975: if (key == A_MOUSE2 && down) { +ADDRFP4 0 +INDIRI4 +CNSTI4 142 +NEI4 $699 +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $699 +line 976 +;976: cgs.capturedItem = Display_CaptureItem(cgs.cursorX, cgs.cursorY); +ADDRGP4 cgs+70208 +INDIRI4 +ARGI4 +ADDRGP4 cgs+70212 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 Display_CaptureItem +CALLP4 +ASGNP4 +ADDRGP4 cgs+70228 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 977 +;977: } +LABELV $699 +line 978 +;978: } +LABELV $696 +line 979 +;979:} +LABELV $679 +endproc CG_KeyEvent 8 16 +export CG_ClientNumFromName +proc CG_ClientNumFromName 12 8 +line 981 +;980: +;981:int CG_ClientNumFromName(const char *p) { +line 983 +;982: int i; +;983: for (i = 0; i < cgs.maxclients; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $708 +JUMPV +LABELV $705 +line 984 +;984: if (cgs.clientinfo[i].infoValid && Q_stricmp(cgs.clientinfo[i].name, p) == 0) { +ADDRLP4 4 +CNSTI4 788 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cgs+43024 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $710 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cgs+43024+4 +ADDP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $710 +line 985 +;985: return i; +ADDRLP4 0 +INDIRI4 +RETI4 +ADDRGP4 $704 +JUMPV +LABELV $710 +line 987 +;986: } +;987: } +LABELV $706 +line 983 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $708 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cgs+32988 +INDIRI4 +LTI4 $705 +line 988 +;988: return -1; +CNSTI4 -1 +RETI4 +LABELV $704 +endproc CG_ClientNumFromName 12 8 +export CG_ShowResponseHead +proc CG_ShowResponseHead 0 8 +line 991 +;989:} +;990: +;991:void CG_ShowResponseHead(void) { +line 992 +;992: Menus_OpenByName("voiceMenu"); +ADDRGP4 $716 +ARGP4 +ADDRGP4 Menus_OpenByName +CALLV +pop +line 993 +;993: trap_Cvar_Set("cl_conXOffset", "72"); +ADDRGP4 $717 +ARGP4 +ADDRGP4 $718 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 994 +;994: cg.voiceTime = cg.time; +ADDRGP4 cg+13116 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 995 +;995:} +LABELV $715 +endproc CG_ShowResponseHead 0 8 +export CG_RunMenuScript +proc CG_RunMenuScript 0 0 +line 997 +;996: +;997:void CG_RunMenuScript(char **args) { +line 998 +;998:} +LABELV $721 +endproc CG_RunMenuScript 0 0 +export CG_DeferMenuScript +proc CG_DeferMenuScript 0 0 +line 1001 +;999: +;1000:qboolean CG_DeferMenuScript (char **args) +;1001:{ +line 1002 +;1002: return qfalse; +CNSTI4 0 +RETI4 +LABELV $722 +endproc CG_DeferMenuScript 0 0 +export CG_GetTeamColor +proc CG_GetTeamColor 8 0 +line 1005 +;1003:} +;1004: +;1005:void CG_GetTeamColor(vec4_t *color) { +line 1006 +;1006: if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $724 +line 1007 +;1007: (*color)[0] = 1.0f; +ADDRFP4 0 +INDIRP4 +CNSTF4 1065353216 +ASGNF4 +line 1008 +;1008: (*color)[3] = 0.25f; +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1048576000 +ASGNF4 +line 1009 +;1009: (*color)[1] = (*color)[2] = 0.0f; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 1010 +;1010: } else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) { +ADDRGP4 $725 +JUMPV +LABELV $724 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $727 +line 1011 +;1011: (*color)[0] = (*color)[1] = 0.0f; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 1012 +;1012: (*color)[2] = 1.0f; +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1013 +;1013: (*color)[3] = 0.25f; +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1048576000 +ASGNF4 +line 1014 +;1014: } else { +ADDRGP4 $728 +JUMPV +LABELV $727 +line 1015 +;1015: (*color)[0] = (*color)[2] = 0.0f; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTF4 0 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 1016 +;1016: (*color)[1] = 0.17f; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 1043207291 +ASGNF4 +line 1017 +;1017: (*color)[3] = 0.25f; +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1048576000 +ASGNF4 +line 1018 +;1018: } +LABELV $728 +LABELV $725 +line 1019 +;1019:} +LABELV $723 +endproc CG_GetTeamColor 8 0 +import MenuFontToHandle +import cgDC +import trap_SP_Register +import trap_SP_RegisterServer +import trap_PC_RemoveAllGlobalDefines +import trap_PC_LoadGlobalDefines +import trap_PC_SourceFileAndLine +import trap_PC_ReadToken +import trap_PC_FreeSource +import trap_PC_LoadSource +import trap_PC_AddGlobalDefine +import Controls_SetConfig +import Controls_GetConfig +import UI_OutOfMemory +import UI_InitMemory +import UI_Alloc +import Display_CacheAll +import Menu_SetFeederSelection +import Menu_Paint +import Menus_CloseAll +import LerpColor +import Display_HandleKey +import Menus_CloseByName +import Menus_ShowByName +import Menus_FindByName +import Menus_OpenByName +import Display_KeyBindPending +import Display_CursorType +import Display_MouseMove +import Display_CaptureItem +import Display_GetContext +import Menus_Activate +import Menus_AnyFullScreenVisible +import Menu_Reset +import Menus_ActivateByName +import Menu_PaintAll +import Menu_New +import Menu_Count +import PC_Script_Parse +import PC_String_Parse +import PC_Rect_Parse +import PC_Int_Parse +import PC_Color_Parse +import PC_Float_Parse +import Script_Parse +import String_Parse +import Rect_Parse +import Int_Parse +import Color_Parse +import Float_Parse +import Menu_ScrollFeeder +import Menu_HandleMouseMove +import Menu_HandleKey +import Menu_GetFocused +import Menu_PostParse +import Item_Init +import Menu_Init +import Display_ExpandMacros +import Init_Display +import String_Report +import String_Init +import String_Alloc +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $718 +char 1 55 +char 1 50 +char 1 0 +align 1 +LABELV $717 +char 1 99 +char 1 108 +char 1 95 +char 1 99 +char 1 111 +char 1 110 +char 1 88 +char 1 79 +char 1 102 +char 1 102 +char 1 115 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $716 +char 1 118 +char 1 111 +char 1 105 +char 1 99 +char 1 101 +char 1 77 +char 1 101 +char 1 110 +char 1 117 +char 1 0 +align 1 +LABELV $669 +char 1 103 +char 1 101 +char 1 116 +char 1 77 +char 1 101 +char 1 110 +char 1 117 +char 1 0 +align 1 +LABELV $668 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 77 +char 1 101 +char 1 110 +char 1 117 +char 1 0 +align 1 +LABELV $614 +char 1 87 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $611 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $608 +char 1 37 +char 1 105 +char 1 37 +char 1 37 +char 1 0 +align 1 +LABELV $519 +char 1 117 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 0 +align 1 +LABELV $452 +char 1 67 +char 1 97 +char 1 112 +char 1 116 +char 1 117 +char 1 114 +char 1 101 +char 1 32 +char 1 116 +char 1 104 +char 1 101 +char 1 32 +char 1 89 +char 1 115 +char 1 97 +char 1 108 +char 1 97 +char 1 109 +char 1 105 +char 1 114 +char 1 105 +char 1 0 +align 1 +LABELV $448 +char 1 67 +char 1 97 +char 1 112 +char 1 116 +char 1 117 +char 1 114 +char 1 101 +char 1 32 +char 1 116 +char 1 104 +char 1 101 +char 1 32 +char 1 70 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $444 +char 1 78 +char 1 47 +char 1 65 +char 1 0 +align 1 +LABELV $440 +char 1 84 +char 1 101 +char 1 97 +char 1 109 +char 1 32 +char 1 70 +char 1 70 +char 1 65 +char 1 0 +align 1 +LABELV $436 +char 1 74 +char 1 101 +char 1 100 +char 1 105 +char 1 32 +char 1 77 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $432 +char 1 72 +char 1 111 +char 1 108 +char 1 111 +char 1 99 +char 1 114 +char 1 111 +char 1 110 +char 1 32 +char 1 70 +char 1 70 +char 1 65 +char 1 0 +align 1 +LABELV $428 +char 1 70 +char 1 114 +char 1 101 +char 1 101 +char 1 32 +char 1 70 +char 1 111 +char 1 114 +char 1 32 +char 1 65 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $420 +char 1 66 +char 1 108 +char 1 117 +char 1 101 +char 1 32 +char 1 108 +char 1 101 +char 1 97 +char 1 100 +char 1 115 +char 1 32 +char 1 82 +char 1 101 +char 1 100 +char 1 44 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 116 +char 1 111 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $416 +char 1 82 +char 1 101 +char 1 100 +char 1 32 +char 1 108 +char 1 101 +char 1 97 +char 1 100 +char 1 115 +char 1 32 +char 1 66 +char 1 108 +char 1 117 +char 1 101 +char 1 44 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 116 +char 1 111 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $409 +char 1 84 +char 1 101 +char 1 97 +char 1 109 +char 1 115 +char 1 32 +char 1 97 +char 1 114 +char 1 101 +char 1 32 +char 1 116 +char 1 105 +char 1 101 +char 1 100 +char 1 32 +char 1 97 +char 1 116 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $401 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $400 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 67 +char 1 69 +char 1 95 +char 1 87 +char 1 73 +char 1 84 +char 1 72 +char 1 0 +align 1 +LABELV $390 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 66 +char 1 89 +char 1 0 +align 1 +LABELV $389 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 0 +align 1 +LABELV $388 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $384 +char 1 0 +align 1 +LABELV $201 +char 1 69 +char 1 118 +char 1 101 +char 1 114 +char 1 121 +char 1 111 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $198 +char 1 37 +char 1 100 +char 1 0 +align 1 +LABELV $197 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 80 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $196 +char 1 99 +char 1 103 +char 1 95 +char 1 115 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 80 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 78 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $182 +char 1 99 +char 1 109 +char 1 100 +char 1 32 +char 1 118 +char 1 116 +char 1 101 +char 1 108 +char 1 108 +char 1 32 +char 1 37 +char 1 100 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $178 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 32 +char 1 37 +char 1 105 +char 1 10 +char 1 0 +align 1 +LABELV $173 +char 1 99 +char 1 109 +char 1 100 +char 1 32 +char 1 118 +char 1 115 +char 1 97 +char 1 121 +char 1 95 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $167 +char 1 102 +char 1 111 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 99 +char 1 97 +char 1 114 +char 1 114 +char 1 105 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $166 +char 1 111 +char 1 110 +char 1 102 +char 1 111 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 114 +char 1 114 +char 1 105 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $164 +char 1 114 +char 1 101 +char 1 116 +char 1 117 +char 1 114 +char 1 110 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $163 +char 1 111 +char 1 110 +char 1 103 +char 1 101 +char 1 116 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $161 +char 1 99 +char 1 97 +char 1 109 +char 1 112 +char 1 0 +align 1 +LABELV $160 +char 1 111 +char 1 110 +char 1 99 +char 1 97 +char 1 109 +char 1 112 +char 1 0 +align 1 +LABELV $158 +char 1 43 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 49 +char 1 48 +char 1 59 +char 1 32 +char 1 119 +char 1 97 +char 1 105 +char 1 116 +char 1 59 +char 1 32 +char 1 45 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $157 +char 1 102 +char 1 111 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $156 +char 1 111 +char 1 110 +char 1 102 +char 1 111 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $154 +char 1 43 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 57 +char 1 59 +char 1 32 +char 1 119 +char 1 97 +char 1 105 +char 1 116 +char 1 59 +char 1 32 +char 1 45 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 57 +char 1 0 +align 1 +LABELV $153 +char 1 112 +char 1 97 +char 1 116 +char 1 114 +char 1 111 +char 1 108 +char 1 0 +align 1 +LABELV $152 +char 1 111 +char 1 110 +char 1 112 +char 1 97 +char 1 116 +char 1 114 +char 1 111 +char 1 108 +char 1 0 +align 1 +LABELV $150 +char 1 43 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 56 +char 1 59 +char 1 32 +char 1 119 +char 1 97 +char 1 105 +char 1 116 +char 1 59 +char 1 32 +char 1 45 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 56 +char 1 0 +align 1 +LABELV $149 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $148 +char 1 111 +char 1 110 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 110 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $146 +char 1 43 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 55 +char 1 59 +char 1 32 +char 1 119 +char 1 97 +char 1 105 +char 1 116 +char 1 59 +char 1 32 +char 1 45 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 55 +char 1 0 +align 1 +LABELV $145 +char 1 111 +char 1 102 +char 1 102 +char 1 101 +char 1 110 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $144 +char 1 111 +char 1 110 +char 1 111 +char 1 102 +char 1 102 +char 1 101 +char 1 110 +char 1 115 +char 1 101 +char 1 0 diff --git a/code/cgame/vm/cg_players.asm b/code/cgame/vm/cg_players.asm new file mode 100644 index 0000000..1bef92c --- /dev/null +++ b/code/cgame/vm/cg_players.asm @@ -0,0 +1,50449 @@ +data +export cg_customSoundNames +align 4 +LABELV cg_customSoundNames +address $120 +address $121 +address $122 +address $123 +address $124 +address $125 +address $126 +address $127 +address $128 +address $129 +address $130 +address $131 +address $132 +address $133 +address $128 +address $134 +skip 64 +export CG_CustomSound +code +proc CG_CustomSound 16 8 +file "../cg_players.c" +line 35 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_players.c -- handle the media and animation for player entities +;4:#include "cg_local.h" +;5:#include "..\ghoul2\g2.h" +;6: +;7:extern stringID_table_t animTable [MAX_ANIMATIONS+1]; +;8: +;9:char *cg_customSoundNames[MAX_CUSTOM_SOUNDS] = { +;10: "*death1.wav", +;11: "*death2.wav", +;12: "*death3.wav", +;13: "*jump1.wav", +;14: "*pain25.wav", +;15: "*pain50.wav", +;16: "*pain75.wav", +;17: "*pain100.wav", +;18: "*falling1.wav", +;19: "*choke1.wav", +;20: "*choke2.wav", +;21: "*choke3.wav", +;22: "*gasp.wav", +;23: "*land1.wav", +;24: "*falling1.wav", +;25: "*taunt.wav" +;26:}; +;27: +;28: +;29:/* +;30:================ +;31:CG_CustomSound +;32: +;33:================ +;34:*/ +;35:sfxHandle_t CG_CustomSound( int clientNum, const char *soundName ) { +line 39 +;36: clientInfo_t *ci; +;37: int i; +;38: +;39: if ( soundName[0] != '*' ) { +ADDRFP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 42 +EQI4 $136 +line 40 +;40: return trap_S_RegisterSound( soundName ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +RETI4 +ADDRGP4 $135 +JUMPV +LABELV $136 +line 43 +;41: } +;42: +;43: if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +LTI4 $140 +ADDRLP4 8 +INDIRI4 +CNSTI4 32 +LTI4 $138 +LABELV $140 +line 44 +;44: clientNum = 0; +ADDRFP4 0 +CNSTI4 0 +ASGNI4 +line 45 +;45: } +LABELV $138 +line 46 +;46: ci = &cgs.clientinfo[ clientNum ]; +ADDRLP4 4 +CNSTI4 788 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 48 +;47: +;48: for ( i = 0 ; i < MAX_CUSTOM_SOUNDS && cg_customSoundNames[i] ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $145 +JUMPV +LABELV $142 +line 49 +;49: if ( !strcmp( soundName, cg_customSoundNames[i] ) ) { +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg_customSoundNames +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $146 +line 50 +;50: return ci->sounds[i]; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 652 +ADDP4 +ADDP4 +INDIRI4 +RETI4 +ADDRGP4 $135 +JUMPV +LABELV $146 +line 52 +;51: } +;52: } +LABELV $143 +line 48 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $145 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +GEI4 $148 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg_customSoundNames +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $142 +LABELV $148 +line 54 +;53: +;54: CG_Error( "Unknown custom sound: %s", soundName ); +ADDRGP4 $149 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 55 +;55: return 0; +CNSTI4 0 +RETI4 +LABELV $135 +endproc CG_CustomSound 16 8 +export CG_NeedAnimSequence +proc CG_NeedAnimSequence 12 0 +line 79 +;56:} +;57: +;58: +;59: +;60:/* +;61:============================================================================= +;62: +;63:CLIENT INFO +;64: +;65:============================================================================= +;66:*/ +;67: +;68:/* +;69:========================== +;70:CG_NeedAnimSequence +;71: +;72:Called to check if models are missing required animation sequences +;73:We do not list all used animations here but this check should eliminate +;74:a broad range of unsupported models. At least the ones that are included, +;75:which is all we really care about. +;76:========================== +;77:*/ +;78:qboolean CG_NeedAnimSequence(int anim) +;79:{ +line 80 +;80: if (anim >= BOTH_DEATH1 && +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +LTI4 $151 +ADDRLP4 0 +INDIRI4 +CNSTI4 19 +GTI4 $151 +line 82 +;81: anim <= BOTH_DEATH19) +;82: { +line 83 +;83: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $150 +JUMPV +LABELV $151 +line 86 +;84: } +;85: +;86: if (anim >= BOTH_DISMEMBER_HEAD1 && +ADDRLP4 4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 91 +LTI4 $153 +ADDRLP4 4 +INDIRI4 +CNSTI4 96 +GTI4 $153 +line 88 +;87: anim <= BOTH_DISMEMBER_LARM) +;88: { +line 89 +;89: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $150 +JUMPV +LABELV $153 +line 92 +;90: } +;91: +;92: if (anim >= BOTH_A1_T__B_ && +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 138 +LTI4 $155 +ADDRLP4 8 +INDIRI4 +CNSTI4 547 +GTI4 $155 +line 94 +;93: anim <= BOTH_H1_S1_BR) +;94: { +line 95 +;95: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $150 +JUMPV +LABELV $155 +line 98 +;96: } +;97: +;98: return qfalse; +CNSTI4 0 +RETI4 +LABELV $150 +endproc CG_NeedAnimSequence 12 0 +proc CG_IsValidCharacterModel 20 8 +line 104 +;99:} +;100: +;101://To see if the client is trying to use one of the included skins not meant for MP. +;102://I don't much care for hardcoded strings, but this seems the best way to go. +;103:static qboolean CG_IsValidCharacterModel(const char *modelName, const char *skinName) +;104:{ +line 105 +;105: if (!Q_stricmp(modelName, "kyle")) +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $160 +ARGP4 +ADDRLP4 0 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $158 +line 106 +;106: { +line 107 +;107: if (!Q_stricmp(skinName, "fpls")) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 $163 +ARGP4 +ADDRLP4 4 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $161 +line 108 +;108: { +line 109 +;109: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $157 +JUMPV +LABELV $161 +line 111 +;110: } +;111: else if (!Q_stricmp(skinName, "fpls2")) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 $166 +ARGP4 +ADDRLP4 8 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $164 +line 112 +;112: { +line 113 +;113: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $157 +JUMPV +LABELV $164 +line 115 +;114: } +;115: else if (!Q_stricmp(skinName, "fpls3")) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 $169 +ARGP4 +ADDRLP4 12 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $159 +line 116 +;116: { +line 117 +;117: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $157 +JUMPV +line 119 +;118: } +;119: } +LABELV $158 +line 120 +;120: else if (!Q_stricmp(modelName, "morgan")) +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $172 +ARGP4 +ADDRLP4 4 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $170 +line 121 +;121: { +line 126 +;122: //For morgan, we want to deny if the skin is anything but one of the valid ones +;123: //Since his default skin is actually the bad one, you could just type +;124: //"model morgan/blah" and get it. This rules out custom morgan skins without +;125: //programming assistance unfortunately. +;126: if (Q_stricmp(skinName, "default_mp") && +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 $175 +ARGP4 +ADDRLP4 8 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $173 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 $176 +ARGP4 +ADDRLP4 12 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $173 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 $177 +ARGP4 +ADDRLP4 16 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $173 +line 129 +;127: Q_stricmp(skinName, "red") && +;128: Q_stricmp(skinName, "blue")) +;129: { +line 130 +;130: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $157 +JUMPV +LABELV $173 +line 132 +;131: } +;132: } +LABELV $170 +LABELV $159 +line 134 +;133: +;134: return qtrue; +CNSTI4 1 +RETI4 +LABELV $157 +endproc CG_IsValidCharacterModel 20 8 +export CG_ParseSurfsFile +proc CG_ParseSurfsFile 20112 20 +line 139 +;135:} +;136: +;137:#define MAX_SURF_LIST_SIZE 1024 +;138:qboolean CG_ParseSurfsFile( const char *modelName, const char *skinName, char *surfOff, char *surfOn ) +;139:{ +line 149 +;140: const char *text_p; +;141: int len; +;142: const char *token; +;143: const char *value; +;144: char text[20000]; +;145: char sfilename[MAX_QPATH]; +;146: fileHandle_t f; +;147: +;148: // Load and parse .surf file +;149: Com_sprintf( sfilename, sizeof( sfilename ), "models/players/%s/model_%s.surf", modelName, skinName ); +ADDRLP4 20016 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $179 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 152 +;150: +;151: // load the file +;152: len = trap_FS_FOpenFile( sfilename, &f, FS_READ ); +ADDRLP4 20016 +ARGP4 +ADDRLP4 20080 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 20084 +ADDRGP4 trap_FS_FOpenFile +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 20084 +INDIRI4 +ASGNI4 +line 153 +;153: if ( len <= 0 ) +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +GTI4 $180 +line 154 +;154: {//no file +line 155 +;155: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $178 +JUMPV +LABELV $180 +line 157 +;156: } +;157: if ( len >= sizeof( text ) - 1 ) +ADDRLP4 12 +INDIRI4 +CVIU4 4 +CNSTU4 19999 +LTU4 $182 +line 158 +;158: { +line 159 +;159: Com_Printf( "File %s too long\n", sfilename ); +ADDRGP4 $184 +ARGP4 +ADDRLP4 20016 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 160 +;160: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $178 +JUMPV +LABELV $182 +line 163 +;161: } +;162: +;163: trap_FS_Read( text, len, f ); +ADDRLP4 16 +ARGP4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 20080 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_Read +CALLV +pop +line 164 +;164: text[len] = 0; +ADDRLP4 12 +INDIRI4 +ADDRLP4 16 +ADDP4 +CNSTI1 0 +ASGNI1 +line 165 +;165: trap_FS_FCloseFile( f ); +ADDRLP4 20080 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_FCloseFile +CALLV +pop +line 168 +;166: +;167: // parse the text +;168: text_p = text; +ADDRLP4 4 +ADDRLP4 16 +ASGNP4 +line 170 +;169: +;170: memset( (char *)surfOff, 0, sizeof(surfOff) ); +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 171 +;171: memset( (char *)surfOn, 0, sizeof(surfOn) ); +ADDRFP4 12 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +ADDRGP4 $186 +JUMPV +LABELV $185 +line 175 +;172: +;173: // read information for surfOff and surfOn +;174: while ( 1 ) +;175: { +line 176 +;176: token = COM_ParseExt( &text_p, qtrue ); +ADDRLP4 4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 20088 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 20088 +INDIRP4 +ASGNP4 +line 177 +;177: if ( !token || !token[0] ) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $190 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $188 +LABELV $190 +line 178 +;178: { +line 179 +;179: break; +ADDRGP4 $187 +JUMPV +LABELV $188 +line 183 +;180: } +;181: +;182: // surfOff +;183: if ( !Q_stricmp( token, "surfOff" ) ) +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $193 +ARGP4 +ADDRLP4 20096 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 20096 +INDIRI4 +CNSTI4 0 +NEI4 $191 +line 184 +;184: { +line 185 +;185: if ( COM_ParseString( &text_p, &value ) ) +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRLP4 20100 +ADDRGP4 COM_ParseString +CALLI4 +ASGNI4 +ADDRLP4 20100 +INDIRI4 +CNSTI4 0 +EQI4 $194 +line 186 +;186: { +line 187 +;187: continue; +ADDRGP4 $186 +JUMPV +LABELV $194 +line 189 +;188: } +;189: if ( surfOff && surfOff[0] ) +ADDRLP4 20104 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 20104 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $196 +ADDRLP4 20104 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $196 +line 190 +;190: { +line 191 +;191: Q_strcat( surfOff, MAX_SURF_LIST_SIZE, "," ); +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $198 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 192 +;192: Q_strcat( surfOff, MAX_SURF_LIST_SIZE, value ); +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 193 +;193: } +ADDRGP4 $186 +JUMPV +LABELV $196 +line 195 +;194: else +;195: { +line 196 +;196: Q_strncpyz( surfOff, value, MAX_SURF_LIST_SIZE ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 197 +;197: } +line 198 +;198: continue; +ADDRGP4 $186 +JUMPV +LABELV $191 +line 202 +;199: } +;200: +;201: // surfOn +;202: if ( !Q_stricmp( token, "surfOn" ) ) +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $201 +ARGP4 +ADDRLP4 20100 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 20100 +INDIRI4 +CNSTI4 0 +NEI4 $199 +line 203 +;203: { +line 204 +;204: if ( COM_ParseString( &text_p, &value ) ) +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRLP4 20104 +ADDRGP4 COM_ParseString +CALLI4 +ASGNI4 +ADDRLP4 20104 +INDIRI4 +CNSTI4 0 +EQI4 $202 +line 205 +;205: { +line 206 +;206: continue; +ADDRGP4 $186 +JUMPV +LABELV $202 +line 208 +;207: } +;208: if ( surfOn && surfOn[0] ) +ADDRLP4 20108 +ADDRFP4 12 +INDIRP4 +ASGNP4 +ADDRLP4 20108 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $204 +ADDRLP4 20108 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $204 +line 209 +;209: { +line 210 +;210: Q_strcat( surfOn, MAX_SURF_LIST_SIZE, ","); +ADDRFP4 12 +INDIRP4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $198 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 211 +;211: Q_strcat( surfOn, MAX_SURF_LIST_SIZE, value ); +ADDRFP4 12 +INDIRP4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 212 +;212: } +ADDRGP4 $186 +JUMPV +LABELV $204 +line 214 +;213: else +;214: { +line 215 +;215: Q_strncpyz( surfOn, value, MAX_SURF_LIST_SIZE ); +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 216 +;216: } +line 217 +;217: continue; +LABELV $199 +line 219 +;218: } +;219: } +LABELV $186 +line 174 +ADDRGP4 $185 +JUMPV +LABELV $187 +line 220 +;220: return qtrue; +CNSTI4 1 +RETI4 +LABELV $178 +endproc CG_ParseSurfsFile 20112 20 +lit +align 4 +LABELV $207 +byte 4 0 +byte 4 0 +byte 4 0 +code +proc CG_RegisterClientModelname 2320 44 +line 228 +;221:} +;222: +;223:/* +;224:========================== +;225:CG_RegisterClientModelname +;226:========================== +;227:*/ +;228:static qboolean CG_RegisterClientModelname( clientInfo_t *ci, const char *modelName, const char *skinName, const char *teamName, int clientNum ) { +line 233 +;229: int handle; +;230: char afilename[MAX_QPATH]; +;231: char /**GLAName,*/ *slash; +;232: char GLAName[MAX_QPATH]; +;233: vec3_t tempVec = {0,0,0}; +ADDRLP4 132 +ADDRGP4 $207 +INDIRB +ASGNB 12 +line 234 +;234: qboolean badModel = qfalse; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 235 +;235: qboolean retriedAlready = qfalse; +ADDRLP4 2196 +CNSTI4 0 +ASGNI4 +LABELV $208 +line 240 +;236: char surfOff[MAX_SURF_LIST_SIZE]; +;237: char surfOn[MAX_SURF_LIST_SIZE]; +;238: +;239:retryModel: +;240: if (ci->ATST && clientNum == -1) +ADDRFP4 0 +INDIRP4 +CNSTI4 500 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $209 +ADDRFP4 16 +INDIRI4 +CNSTI4 -1 +NEI4 $209 +line 241 +;241: { +line 242 +;242: Com_sprintf(ci->teamName, sizeof(ci->teamName), teamName); +ADDRFP4 0 +INDIRP4 +CNSTI4 416 +ADDP4 +ARGP4 +CNSTI4 32 +ARGI4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 243 +;243: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $206 +JUMPV +LABELV $209 +line 246 +;244: } +;245: +;246: if (badModel) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $211 +line 247 +;247: { +line 248 +;248: modelName = "kyle"; +ADDRFP4 4 +ADDRGP4 $160 +ASGNP4 +line 249 +;249: skinName = "default"; +ADDRFP4 8 +ADDRGP4 $213 +ASGNP4 +line 250 +;250: Com_Printf("WARNING: Attempted to load an unsupported multiplayer model! (bad or missing bone, or missing animation sequence)\n"); +ADDRGP4 $214 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 252 +;251: +;252: badModel = qfalse; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 253 +;253: retriedAlready = qtrue; +ADDRLP4 2196 +CNSTI4 1 +ASGNI4 +line 254 +;254: } +LABELV $211 +line 256 +;255: +;256: if (!CG_IsValidCharacterModel(modelName, skinName)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 2204 +ADDRGP4 CG_IsValidCharacterModel +CALLI4 +ASGNI4 +ADDRLP4 2204 +INDIRI4 +CNSTI4 0 +NEI4 $215 +line 257 +;257: { +line 258 +;258: modelName = "kyle"; +ADDRFP4 4 +ADDRGP4 $160 +ASGNP4 +line 259 +;259: skinName = "default"; +ADDRFP4 8 +ADDRGP4 $213 +ASGNP4 +line 260 +;260: } +LABELV $215 +line 263 +;261: +;262: // First things first. If this is a ghoul2 model, then let's make sure we demolish this first. +;263: if (ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) +ADDRLP4 2208 +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 2208 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $217 +ADDRLP4 2208 +INDIRP4 +ARGP4 +ADDRLP4 2212 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 2212 +INDIRI4 +CNSTI4 0 +EQI4 $217 +line 264 +;264: { +line 265 +;265: trap_G2API_CleanGhoul2Models(&(ci->ghoul2Model)); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 266 +;266: } +LABELV $217 +line 268 +;267: +;268: if ( cgs.gametype >= GT_TEAM && !cgs.jediVmerc ) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $219 +ADDRGP4 cgs+32996 +INDIRI4 +CNSTI4 0 +NEI4 $219 +line 269 +;269: { +line 270 +;270: if (ci->team == TEAM_RED) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $223 +line 271 +;271: { +line 272 +;272: Q_strncpyz(ci->skinName, "red", sizeof(ci->skinName)); +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +ARGP4 +ADDRGP4 $176 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 273 +;273: skinName = "red"; +ADDRFP4 8 +ADDRGP4 $176 +ASGNP4 +line 274 +;274: } +ADDRGP4 $224 +JUMPV +LABELV $223 +line 275 +;275: else if (ci->team == TEAM_BLUE) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $225 +line 276 +;276: { +line 277 +;277: Q_strncpyz(ci->skinName, "blue", sizeof(ci->skinName)); +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +ARGP4 +ADDRGP4 $177 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 278 +;278: skinName = "blue"; +ADDRFP4 8 +ADDRGP4 $177 +ASGNP4 +line 279 +;279: } +LABELV $225 +LABELV $224 +line 280 +;280: } +LABELV $219 +line 282 +;281: +;282: if (clientNum != -1 && cg_entities[clientNum].currentState.teamowner && !cg_entities[clientNum].isATST) +ADDRLP4 2216 +ADDRFP4 16 +INDIRI4 +ASGNI4 +ADDRLP4 2216 +INDIRI4 +CNSTI4 -1 +EQI4 $227 +ADDRLP4 2220 +CNSTI4 1920 +ADDRLP4 2216 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 2224 +CNSTI4 0 +ASGNI4 +ADDRLP4 2220 +INDIRI4 +ADDRGP4 cg_entities+264 +ADDP4 +INDIRI4 +ADDRLP4 2224 +INDIRI4 +EQI4 $227 +ADDRLP4 2220 +INDIRI4 +ADDRGP4 cg_entities+1028 +ADDP4 +INDIRI4 +ADDRLP4 2224 +INDIRI4 +NEI4 $227 +line 283 +;283: { +line 284 +;284: ci->torsoSkin = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 496 +ADDP4 +CNSTI4 0 +ASGNI4 +line 285 +;285: ci->ATST = qtrue; +ADDRFP4 0 +INDIRP4 +CNSTI4 500 +ADDP4 +CNSTI4 1 +ASGNI4 +line 286 +;286: handle = trap_G2API_InitGhoul2Model(&ci->ghoul2Model, "models/players/atst/model.glm", 0, 0, 0, 0, 0); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +ARGP4 +ADDRGP4 $231 +ARGP4 +ADDRLP4 2228 +CNSTI4 0 +ASGNI4 +ADDRLP4 2228 +INDIRI4 +ARGI4 +ADDRLP4 2228 +INDIRI4 +ARGI4 +ADDRLP4 2228 +INDIRI4 +ARGI4 +ADDRLP4 2228 +INDIRI4 +ARGI4 +ADDRLP4 2228 +INDIRI4 +ARGI4 +ADDRLP4 2232 +ADDRGP4 trap_G2API_InitGhoul2Model +CALLI4 +ASGNI4 +ADDRLP4 2192 +ADDRLP4 2232 +INDIRI4 +ASGNI4 +line 287 +;287: } +ADDRGP4 $228 +JUMPV +LABELV $227 +line 289 +;288: else +;289: { +line 290 +;290: ci->torsoSkin = trap_R_RegisterSkin(va("models/players/%s/model_%s.skin", modelName, skinName)); +ADDRGP4 $232 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 2228 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 2228 +INDIRP4 +ARGP4 +ADDRLP4 2232 +ADDRGP4 trap_R_RegisterSkin +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 496 +ADDP4 +ADDRLP4 2232 +INDIRI4 +ASGNI4 +line 291 +;291: ci->ATST = qfalse; +ADDRFP4 0 +INDIRP4 +CNSTI4 500 +ADDP4 +CNSTI4 0 +ASGNI4 +line 292 +;292: Com_sprintf( afilename, sizeof( afilename ), "models/players/%s/model.glm", modelName ); +ADDRLP4 68 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $233 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 293 +;293: handle = trap_G2API_InitGhoul2Model(&ci->ghoul2Model, afilename, 0, ci->torsoSkin, 0, 0, 0); +ADDRLP4 2236 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2236 +INDIRP4 +CNSTI4 504 +ADDP4 +ARGP4 +ADDRLP4 68 +ARGP4 +ADDRLP4 2240 +CNSTI4 0 +ASGNI4 +ADDRLP4 2240 +INDIRI4 +ARGI4 +ADDRLP4 2236 +INDIRP4 +CNSTI4 496 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 2240 +INDIRI4 +ARGI4 +ADDRLP4 2240 +INDIRI4 +ARGI4 +ADDRLP4 2240 +INDIRI4 +ARGI4 +ADDRLP4 2244 +ADDRGP4 trap_G2API_InitGhoul2Model +CALLI4 +ASGNI4 +ADDRLP4 2192 +ADDRLP4 2244 +INDIRI4 +ASGNI4 +line 294 +;294: } +LABELV $228 +line 295 +;295: if (handle<0) +ADDRLP4 2192 +INDIRI4 +CNSTI4 0 +GEI4 $234 +line 296 +;296: { +line 297 +;297: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $206 +JUMPV +LABELV $234 +line 302 +;298: } +;299: +;300: // The model is now loaded. +;301: +;302: GLAName[0] = 0; +ADDRLP4 4 +CNSTI1 0 +ASGNI1 +line 304 +;303: +;304: trap_G2API_GetGLAName( ci->ghoul2Model, 0, GLAName); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_G2API_GetGLAName +CALLV +pop +line 305 +;305: if (GLAName[0] != 0) +ADDRLP4 4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $236 +line 306 +;306: { +line 307 +;307: if (!strstr(GLAName, "players/_humanoid/")) +ADDRLP4 4 +ARGP4 +ADDRGP4 $240 +ARGP4 +ADDRLP4 2228 +ADDRGP4 strstr +CALLP4 +ASGNP4 +ADDRLP4 2228 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $238 +line 308 +;308: { //Bad! +line 309 +;309: badModel = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 310 +;310: goto retryModel; +ADDRGP4 $208 +JUMPV +LABELV $238 +line 312 +;311: } +;312: } +LABELV $236 +line 314 +;313: +;314: if (!BGPAFtextLoaded) +ADDRGP4 BGPAFtextLoaded +INDIRI4 +CNSTI4 0 +NEI4 $241 +line 315 +;315: { +line 316 +;316: if (GLAName[0] == 0/*GLAName == NULL*/) +ADDRLP4 4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $243 +line 317 +;317: { +line 318 +;318: if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg")) +ADDRGP4 $247 +ARGP4 +ADDRLP4 2228 +ADDRGP4 BG_ParseAnimationFile +CALLI4 +ASGNI4 +ADDRLP4 2228 +INDIRI4 +CNSTI4 0 +NEI4 $245 +line 319 +;319: { +line 320 +;320: Com_Printf( "Failed to load animation file %s\n", afilename ); +ADDRGP4 $248 +ARGP4 +ADDRLP4 68 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 321 +;321: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $206 +JUMPV +LABELV $245 +line 323 +;322: } +;323: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $206 +JUMPV +LABELV $243 +line 325 +;324: } +;325: Q_strncpyz( afilename, GLAName, sizeof( afilename )); +ADDRLP4 68 +ARGP4 +ADDRLP4 4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 326 +;326: slash = Q_strrchr( afilename, '/' ); +ADDRLP4 68 +ARGP4 +CNSTI4 47 +ARGI4 +ADDRLP4 2228 +ADDRGP4 Q_strrchr +CALLP4 +ASGNP4 +ADDRLP4 2200 +ADDRLP4 2228 +INDIRP4 +ASGNP4 +line 327 +;327: if ( slash ) +ADDRLP4 2200 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $249 +line 328 +;328: { +line 329 +;329: strcpy(slash, "/animation.cfg"); +ADDRLP4 2200 +INDIRP4 +ARGP4 +ADDRGP4 $251 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 330 +;330: } // Now afilename holds just the path to the animation.cfg +ADDRGP4 $250 +JUMPV +LABELV $249 +line 332 +;331: else +;332: { // Didn't find any slashes, this is a raw filename right in base (whish isn't a good thing) +line 333 +;333: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $206 +JUMPV +LABELV $250 +line 349 +;334: } +;335: +;336: /* +;337: // Try to load the animation.cfg for this model then. +;338: if ( !BG_ParseAnimationFile( afilename, ci->animations ) ) +;339: { // The GLA's animations failed +;340: if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg", ci->animations)) +;341: { +;342: Com_Printf( "Failed to load animation file %s\n", afilename ); +;343: return qfalse; +;344: } +;345: } +;346: */ +;347: //rww - For now, we'll just ignore what animation file it wants. In theory all multiplayer-supported models +;348: //should want _humanoid/animation.cfg, so if it doesn't want that then throw it away +;349: if (Q_stricmp(afilename, "models/players/_humanoid/animation.cfg")) +ADDRLP4 68 +ARGP4 +ADDRGP4 $247 +ARGP4 +ADDRLP4 2232 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 2232 +INDIRI4 +CNSTI4 0 +EQI4 $252 +line 350 +;350: { +line 351 +;351: Com_Printf( "Model does not use supported animation config.\n"); +ADDRGP4 $254 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 352 +;352: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $206 +JUMPV +LABELV $252 +line 354 +;353: } +;354: else if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg")) +ADDRGP4 $247 +ARGP4 +ADDRLP4 2236 +ADDRGP4 BG_ParseAnimationFile +CALLI4 +ASGNI4 +ADDRLP4 2236 +INDIRI4 +CNSTI4 0 +NEI4 $255 +line 355 +;355: { +line 356 +;356: Com_Printf( "Failed to load animation file models/players/_humanoid/animation.cfg\n" ); +ADDRGP4 $257 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 357 +;357: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $206 +JUMPV +LABELV $255 +line 359 +;358: } +;359: else if (!retriedAlready) +ADDRLP4 2196 +INDIRI4 +CNSTI4 0 +NEI4 $258 +line 360 +;360: { +line 363 +;361: int i; +;362: +;363: for(i = 0; i < MAX_ANIMATIONS; i++) +ADDRLP4 2240 +CNSTI4 0 +ASGNI4 +LABELV $260 +line 364 +;364: { +line 365 +;365: if (!bgGlobalAnimations[i].firstFrame && !bgGlobalAnimations[i].numFrames && CG_NeedAnimSequence(i)) +ADDRLP4 2248 +CNSTI4 28 +ADDRLP4 2240 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 2252 +CNSTI4 0 +ASGNI4 +ADDRLP4 2248 +INDIRI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +INDIRI4 +ADDRLP4 2252 +INDIRI4 +NEI4 $264 +ADDRLP4 2248 +INDIRI4 +ADDRGP4 bgGlobalAnimations+4 +ADDP4 +INDIRI4 +ADDRLP4 2252 +INDIRI4 +NEI4 $264 +ADDRLP4 2240 +INDIRI4 +ARGI4 +ADDRLP4 2256 +ADDRGP4 CG_NeedAnimSequence +CALLI4 +ASGNI4 +ADDRLP4 2256 +INDIRI4 +CNSTI4 0 +EQI4 $264 +line 366 +;366: { //using default for this animation so it obviously never got filled in. +line 368 +;367: //if it's a sequence that we need, this model must be an unsupported one. +;368: badModel = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 369 +;369: goto retryModel; +ADDRGP4 $208 +JUMPV +LABELV $264 +line 371 +;370: } +;371: } +LABELV $261 +line 363 +ADDRLP4 2240 +ADDRLP4 2240 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 2240 +INDIRI4 +CNSTI4 1210 +LTI4 $260 +line 372 +;372: } +LABELV $258 +line 373 +;373: } +LABELV $241 +line 375 +;374: +;375: if ( CG_ParseSurfsFile( modelName, skinName, surfOff, surfOn ) ) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 144 +ARGP4 +ADDRLP4 1168 +ARGP4 +ADDRLP4 2228 +ADDRGP4 CG_ParseSurfsFile +CALLI4 +ASGNI4 +ADDRLP4 2228 +INDIRI4 +CNSTI4 0 +EQI4 $267 +line 376 +;376: {//turn on/off any surfs +line 381 +;377: const char *token; +;378: const char *p; +;379: +;380: //Now turn on/off any surfaces +;381: if ( surfOff && surfOff[0] ) +ADDRLP4 144 +CVPU4 4 +CNSTU4 0 +EQU4 $269 +ADDRLP4 144 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $269 +line 382 +;382: { +line 383 +;383: p = surfOff; +ADDRLP4 2236 +ADDRLP4 144 +ASGNP4 +ADDRGP4 $272 +JUMPV +LABELV $271 +line 385 +;384: while ( 1 ) +;385: { +line 386 +;386: token = COM_ParseExt( &p, qtrue ); +ADDRLP4 2236 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 2240 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 2232 +ADDRLP4 2240 +INDIRP4 +ASGNP4 +line 387 +;387: if ( !token[0] ) +ADDRLP4 2232 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $274 +line 388 +;388: {//reached end of list +line 389 +;389: break; +ADDRGP4 $273 +JUMPV +LABELV $274 +line 392 +;390: } +;391: //turn off this surf +;392: trap_G2API_SetSurfaceOnOff( ci->ghoul2Model, token, 0x00000002/*G2SURFACEFLAG_OFF*/ ); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2232 +INDIRP4 +ARGP4 +CNSTI4 2 +ARGI4 +ADDRGP4 trap_G2API_SetSurfaceOnOff +CALLI4 +pop +line 393 +;393: } +LABELV $272 +line 384 +ADDRGP4 $271 +JUMPV +LABELV $273 +line 394 +;394: } +LABELV $269 +line 395 +;395: if ( surfOn && surfOn[0] ) +ADDRLP4 1168 +CVPU4 4 +CNSTU4 0 +EQU4 $276 +ADDRLP4 1168 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $276 +line 396 +;396: { +line 397 +;397: p = surfOn; +ADDRLP4 2236 +ADDRLP4 1168 +ASGNP4 +ADDRGP4 $279 +JUMPV +LABELV $278 +line 399 +;398: while ( 1 ) +;399: { +line 400 +;400: token = COM_ParseExt( &p, qtrue ); +ADDRLP4 2236 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 2240 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 2232 +ADDRLP4 2240 +INDIRP4 +ASGNP4 +line 401 +;401: if ( !token[0] ) +ADDRLP4 2232 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $281 +line 402 +;402: {//reached end of list +line 403 +;403: break; +ADDRGP4 $280 +JUMPV +LABELV $281 +line 406 +;404: } +;405: //turn on this surf +;406: trap_G2API_SetSurfaceOnOff( ci->ghoul2Model, token, 0 ); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2232 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 trap_G2API_SetSurfaceOnOff +CALLI4 +pop +line 407 +;407: } +LABELV $279 +line 398 +ADDRGP4 $278 +JUMPV +LABELV $280 +line 408 +;408: } +LABELV $276 +line 409 +;409: } +LABELV $267 +line 411 +;410: +;411: if (clientNum != -1 && cg_entities[clientNum].currentState.teamowner && !cg_entities[clientNum].isATST) +ADDRLP4 2232 +ADDRFP4 16 +INDIRI4 +ASGNI4 +ADDRLP4 2232 +INDIRI4 +CNSTI4 -1 +EQI4 $283 +ADDRLP4 2236 +CNSTI4 1920 +ADDRLP4 2232 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 2240 +CNSTI4 0 +ASGNI4 +ADDRLP4 2236 +INDIRI4 +ADDRGP4 cg_entities+264 +ADDP4 +INDIRI4 +ADDRLP4 2240 +INDIRI4 +EQI4 $283 +ADDRLP4 2236 +INDIRI4 +ADDRGP4 cg_entities+1028 +ADDP4 +INDIRI4 +ADDRLP4 2240 +INDIRI4 +NEI4 $283 +line 412 +;412: { +line 413 +;413: ci->torsoSkin = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 496 +ADDP4 +CNSTI4 0 +ASGNI4 +line 414 +;414: ci->bolt_rhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*flash1"); +ADDRLP4 2244 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2244 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $287 +ARGP4 +ADDRLP4 2248 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 2244 +INDIRP4 +CNSTI4 512 +ADDP4 +ADDRLP4 2248 +INDIRI4 +ASGNI4 +line 415 +;415: trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "Model_root", 0, 12, BONE_ANIM_OVERRIDE_LOOP, 1.0f, cg.time, -1, -1); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2252 +CNSTI4 0 +ASGNI4 +ADDRLP4 2252 +INDIRI4 +ARGI4 +ADDRGP4 $288 +ARGP4 +ADDRLP4 2252 +INDIRI4 +ARGI4 +CNSTI4 12 +ARGI4 +CNSTI4 16 +ARGI4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 -1 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 416 +;416: trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "l_clavical", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2256 +CNSTI4 0 +ASGNI4 +ADDRLP4 2256 +INDIRI4 +ARGI4 +ADDRGP4 $290 +ARGP4 +ADDRLP4 132 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +CNSTP4 0 +ARGP4 +ADDRLP4 2256 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 417 +;417: trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "r_clavical", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, NULL, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2260 +CNSTI4 0 +ASGNI4 +ADDRLP4 2260 +INDIRI4 +ARGI4 +ADDRGP4 $292 +ARGP4 +ADDRLP4 132 +ARGP4 +ADDRLP4 2264 +CNSTI4 2 +ASGNI4 +ADDRLP4 2264 +INDIRI4 +ARGI4 +ADDRLP4 2264 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTP4 0 +ARGP4 +ADDRLP4 2260 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 419 +;418: +;419: ci->bolt_lhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*flash2"); +ADDRLP4 2268 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2268 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $294 +ARGP4 +ADDRLP4 2272 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 2268 +INDIRP4 +CNSTI4 516 +ADDP4 +ADDRLP4 2272 +INDIRI4 +ASGNI4 +line 420 +;420: ci->bolt_head = trap_G2API_AddBolt(ci->ghoul2Model, 0, "pelvis"); +ADDRLP4 2276 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2276 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $295 +ARGP4 +ADDRLP4 2280 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 2276 +INDIRP4 +CNSTI4 520 +ADDP4 +ADDRLP4 2280 +INDIRI4 +ASGNI4 +line 421 +;421: } +ADDRGP4 $284 +JUMPV +LABELV $283 +line 423 +;422: else +;423: { +line 424 +;424: ci->bolt_rhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*r_hand"); +ADDRLP4 2244 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2244 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $296 +ARGP4 +ADDRLP4 2248 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 2244 +INDIRP4 +CNSTI4 512 +ADDP4 +ADDRLP4 2248 +INDIRI4 +ASGNI4 +line 426 +;425: +;426: if (!trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", 0, 12, BONE_ANIM_OVERRIDE_LOOP, 1.0f, cg.time, -1, -1)) +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2252 +CNSTI4 0 +ASGNI4 +ADDRLP4 2252 +INDIRI4 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 2252 +INDIRI4 +ARGI4 +CNSTI4 12 +ARGI4 +CNSTI4 16 +ARGI4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 -1 +ARGI4 +ADDRLP4 2256 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +ASGNI4 +ADDRLP4 2256 +INDIRI4 +CNSTI4 0 +NEI4 $297 +line 427 +;427: { +line 428 +;428: badModel = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 429 +;429: } +LABELV $297 +line 431 +;430: +;431: if (!trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "upper_lumbar", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, cg.time)) +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2260 +CNSTI4 0 +ASGNI4 +ADDRLP4 2260 +INDIRI4 +ARGI4 +ADDRGP4 $303 +ARGP4 +ADDRLP4 132 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +CNSTP4 0 +ARGP4 +ADDRLP4 2260 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 2264 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +ASGNI4 +ADDRLP4 2264 +INDIRI4 +CNSTI4 0 +NEI4 $301 +line 432 +;432: { +line 433 +;433: badModel = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 434 +;434: } +LABELV $301 +line 436 +;435: +;436: if (!trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "cranium", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, NULL, 0, cg.time)) +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2268 +CNSTI4 0 +ASGNI4 +ADDRLP4 2268 +INDIRI4 +ARGI4 +ADDRGP4 $307 +ARGP4 +ADDRLP4 132 +ARGP4 +ADDRLP4 2272 +CNSTI4 2 +ASGNI4 +ADDRLP4 2272 +INDIRI4 +ARGI4 +ADDRLP4 2272 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTP4 0 +ARGP4 +ADDRLP4 2268 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 2276 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +ASGNI4 +ADDRLP4 2276 +INDIRI4 +CNSTI4 0 +NEI4 $305 +line 437 +;437: { +line 438 +;438: badModel = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 439 +;439: } +LABELV $305 +line 441 +;440: +;441: ci->bolt_lhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*l_hand"); +ADDRLP4 2280 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2280 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $309 +ARGP4 +ADDRLP4 2284 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 2280 +INDIRP4 +CNSTI4 516 +ADDP4 +ADDRLP4 2284 +INDIRI4 +ASGNI4 +line 442 +;442: ci->bolt_head = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*head_top"); +ADDRLP4 2288 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2288 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $310 +ARGP4 +ADDRLP4 2292 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 2288 +INDIRP4 +CNSTI4 520 +ADDP4 +ADDRLP4 2292 +INDIRI4 +ASGNI4 +line 444 +;443: +;444: ci->bolt_motion = trap_G2API_AddBolt(ci->ghoul2Model, 0, "Motion"); +ADDRLP4 2296 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2296 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $311 +ARGP4 +ADDRLP4 2300 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 2296 +INDIRP4 +CNSTI4 524 +ADDP4 +ADDRLP4 2300 +INDIRI4 +ASGNI4 +line 447 +;445: +;446: //We need a lower lumbar bolt for footsteps +;447: ci->bolt_llumbar = trap_G2API_AddBolt(ci->ghoul2Model, 0, "lower_lumbar"); +ADDRLP4 2304 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2304 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 2308 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 2304 +INDIRP4 +CNSTI4 528 +ADDP4 +ADDRLP4 2308 +INDIRI4 +ASGNI4 +line 449 +;448: +;449: if (ci->bolt_rhand == -1 || ci->bolt_lhand == -1 || ci->bolt_head == -1 || ci->bolt_motion == -1 || ci->bolt_llumbar == -1) +ADDRLP4 2312 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2316 +CNSTI4 -1 +ASGNI4 +ADDRLP4 2312 +INDIRP4 +CNSTI4 512 +ADDP4 +INDIRI4 +ADDRLP4 2316 +INDIRI4 +EQI4 $318 +ADDRLP4 2312 +INDIRP4 +CNSTI4 516 +ADDP4 +INDIRI4 +ADDRLP4 2316 +INDIRI4 +EQI4 $318 +ADDRLP4 2312 +INDIRP4 +CNSTI4 520 +ADDP4 +INDIRI4 +ADDRLP4 2316 +INDIRI4 +EQI4 $318 +ADDRLP4 2312 +INDIRP4 +CNSTI4 524 +ADDP4 +INDIRI4 +ADDRLP4 2316 +INDIRI4 +EQI4 $318 +ADDRLP4 2312 +INDIRP4 +CNSTI4 528 +ADDP4 +INDIRI4 +ADDRLP4 2316 +INDIRI4 +NEI4 $313 +LABELV $318 +line 450 +;450: { +line 451 +;451: badModel = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 452 +;452: } +LABELV $313 +line 454 +;453: +;454: if (badModel) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $319 +line 455 +;455: { +line 456 +;456: goto retryModel; +ADDRGP4 $208 +JUMPV +LABELV $319 +line 458 +;457: } +;458: } +LABELV $284 +line 462 +;459: +;460:// ent->s.radius = 90; +;461: +;462: if (clientNum != -1) +ADDRFP4 16 +INDIRI4 +CNSTI4 -1 +EQI4 $321 +line 463 +;463: { +line 464 +;464: if (cg_entities[clientNum].isATST) +CNSTI4 1920 +ADDRFP4 16 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $323 +line 465 +;465: { +line 468 +;466: animation_t *anim; +;467: +;468: anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.legsAnim & ~ANIM_TOGGLEBIT) ]; +ADDRLP4 2244 +CNSTI4 28 +CNSTI4 1920 +ADDRFP4 16 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ASGNP4 +line 470 +;469: +;470: if (anim) +ADDRLP4 2244 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $327 +line 471 +;471: { +line 472 +;472: int flags = BONE_ANIM_OVERRIDE_FREEZE; +ADDRLP4 2248 +CNSTI4 72 +ASGNI4 +line 473 +;473: int firstFrame = anim->firstFrame + anim->numFrames-1; +ADDRLP4 2256 +ADDRLP4 2244 +INDIRP4 +ASGNP4 +ADDRLP4 2252 +ADDRLP4 2256 +INDIRP4 +INDIRI4 +ADDRLP4 2256 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 475 +;474: +;475: if (anim->loopFrames != -1) +ADDRLP4 2244 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $329 +line 476 +;476: { +line 477 +;477: flags = BONE_ANIM_OVERRIDE_LOOP; +ADDRLP4 2248 +CNSTI4 16 +ASGNI4 +line 478 +;478: firstFrame = anim->firstFrame; +ADDRLP4 2252 +ADDRLP4 2244 +INDIRP4 +INDIRI4 +ASGNI4 +line 479 +;479: } +LABELV $329 +line 482 +;480: +;481: //rww - Set the animation again because it just got reset due to the model change +;482: trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", firstFrame, anim->firstFrame + anim->numFrames, flags, 1.0f, cg.time, -1, 150); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 2252 +INDIRI4 +ARGI4 +ADDRLP4 2260 +ADDRLP4 2244 +INDIRP4 +ASGNP4 +ADDRLP4 2260 +INDIRP4 +INDIRI4 +ADDRLP4 2260 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 2248 +INDIRI4 +ARGI4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 484 +;483: +;484: cg_entities[clientNum].currentState.legsAnim = 0; +CNSTI4 1920 +ADDRFP4 16 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+280 +ADDP4 +CNSTI4 0 +ASGNI4 +line 485 +;485: } +LABELV $327 +line 487 +;486: +;487: anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.torsoAnim & ~ANIM_TOGGLEBIT) ]; +ADDRLP4 2244 +CNSTI4 28 +CNSTI4 1920 +ADDRFP4 16 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ASGNP4 +line 489 +;488: +;489: if (anim) +ADDRLP4 2244 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $334 +line 490 +;490: { +line 491 +;491: int flags = BONE_ANIM_OVERRIDE_FREEZE; +ADDRLP4 2248 +CNSTI4 72 +ASGNI4 +line 492 +;492: int firstFrame = anim->firstFrame + anim->numFrames-1; +ADDRLP4 2256 +ADDRLP4 2244 +INDIRP4 +ASGNP4 +ADDRLP4 2252 +ADDRLP4 2256 +INDIRP4 +INDIRI4 +ADDRLP4 2256 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 494 +;493: +;494: if (anim->loopFrames != -1) +ADDRLP4 2244 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $336 +line 495 +;495: { +line 496 +;496: flags = BONE_ANIM_OVERRIDE_LOOP; +ADDRLP4 2248 +CNSTI4 16 +ASGNI4 +line 497 +;497: firstFrame = anim->firstFrame; +ADDRLP4 2252 +ADDRLP4 2244 +INDIRP4 +INDIRI4 +ASGNI4 +line 498 +;498: } +LABELV $336 +line 501 +;499: +;500: //rww - Set the animation again because it just got reset due to the model change +;501: trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "lower_lumbar", anim->firstFrame + anim->numFrames-1, anim->firstFrame + anim->numFrames, flags, 1.0f, cg.time, -1, 150); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 2260 +ADDRLP4 2244 +INDIRP4 +ASGNP4 +ADDRLP4 2264 +ADDRLP4 2260 +INDIRP4 +INDIRI4 +ADDRLP4 2260 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +ADDRLP4 2264 +INDIRI4 +CNSTI4 1 +SUBI4 +ARGI4 +ADDRLP4 2264 +INDIRI4 +ARGI4 +ADDRLP4 2248 +INDIRI4 +ARGI4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 503 +;502: +;503: cg_entities[clientNum].currentState.torsoAnim = 0; +CNSTI4 1920 +ADDRFP4 16 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+284 +ADDP4 +CNSTI4 0 +ASGNI4 +line 504 +;504: } +LABELV $334 +line 505 +;505: } +LABELV $323 +line 515 +;506: +;507: /* +;508: if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2)) +;509: { +;510: trap_G2API_CleanGhoul2Models(&(cg_entities[clientNum].ghoul2)); +;511: } +;512: trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2); +;513: */ +;514: +;515: cg_entities[clientNum].ghoul2weapon = NULL; +CNSTI4 1920 +ADDRFP4 16 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 516 +;516: } +LABELV $321 +line 518 +;517: +;518: Q_strncpyz (ci->teamName, teamName, sizeof(ci->teamName)); +ADDRFP4 0 +INDIRP4 +CNSTI4 416 +ADDP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +CNSTI4 32 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 521 +;519: +;520: // Model icon for drawing the portrait on screen +;521: ci->modelIcon = trap_R_RegisterShaderNoMip ( va ( "models/players/%s/icon_%s", modelName, skinName ) ); +ADDRGP4 $341 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 2244 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 2244 +INDIRP4 +ARGP4 +ADDRLP4 2248 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 508 +ADDP4 +ADDRLP4 2248 +INDIRI4 +ASGNI4 +line 523 +;522: +;523: return qtrue; +CNSTI4 1 +RETI4 +LABELV $206 +endproc CG_RegisterClientModelname 2320 44 +proc CG_ColorFromString 20 4 +line 531 +;524:} +;525: +;526:/* +;527:==================== +;528:CG_ColorFromString +;529:==================== +;530:*/ +;531:static void CG_ColorFromString( const char *v, vec3_t color ) { +line 534 +;532: int val; +;533: +;534: VectorClear( color ); +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 536 +;535: +;536: val = atoi( v ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 538 +;537: +;538: if ( val < 1 || val > 7 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +LTI4 $345 +ADDRLP4 0 +INDIRI4 +CNSTI4 7 +LEI4 $343 +LABELV $345 +line 539 +;539: VectorSet( color, 1, 1, 1 ); +ADDRFP4 4 +INDIRP4 +CNSTF4 1065353216 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 540 +;540: return; +ADDRGP4 $342 +JUMPV +LABELV $343 +line 543 +;541: } +;542: +;543: if ( val & 1 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $346 +line 544 +;544: color[2] = 1.0f; +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 545 +;545: } +LABELV $346 +line 546 +;546: if ( val & 2 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $348 +line 547 +;547: color[1] = 1.0f; +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 548 +;548: } +LABELV $348 +line 549 +;549: if ( val & 4 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $350 +line 550 +;550: color[0] = 1.0f; +ADDRFP4 4 +INDIRP4 +CNSTF4 1065353216 +ASGNF4 +line 551 +;551: } +LABELV $350 +line 552 +;552:} +LABELV $342 +endproc CG_ColorFromString 20 4 +export CG_LoadClientInfo +proc CG_LoadClientInfo 1264 24 +line 564 +;553: +;554:#define DEFAULT_FEMALE_SOUNDPATH "chars/mp_generic_female/misc"//"chars/tavion/misc" +;555:#define DEFAULT_MALE_SOUNDPATH "chars/mp_generic_male/misc"//"chars/kyle/misc" +;556:/* +;557:=================== +;558:CG_LoadClientInfo +;559: +;560:Load it now, taking the disk hits. +;561:This will usually be deferred to a safe time +;562:=================== +;563:*/ +;564:void CG_LoadClientInfo( clientInfo_t *ci ) { +line 570 +;565: const char *dir, *fallback; +;566: int i, modelloaded; +;567: const char *s; +;568: int clientNum; +;569: char teamname[MAX_QPATH]; +;570: int fLen = 0; +ADDRLP4 1184 +CNSTI4 0 +ASGNI4 +line 573 +;571: char soundpath[MAX_QPATH]; +;572: char soundName[1024]; +;573: qboolean isFemale = qfalse; +ADDRLP4 1100 +CNSTI4 0 +ASGNI4 +line 576 +;574: fileHandle_t f; +;575: +;576: clientNum = ci - cgs.clientinfo; +ADDRLP4 1096 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +ADDRGP4 cgs+43024 +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 788 +DIVI4 +ASGNI4 +line 578 +;577: +;578: if (clientNum < 0 || clientNum >= MAX_CLIENTS) +ADDRLP4 1096 +INDIRI4 +CNSTI4 0 +LTI4 $356 +ADDRLP4 1096 +INDIRI4 +CNSTI4 32 +LTI4 $354 +LABELV $356 +line 579 +;579: { +line 580 +;580: clientNum = -1; +ADDRLP4 1096 +CNSTI4 -1 +ASGNI4 +line 581 +;581: } +LABELV $354 +line 583 +;582: +;583: ci->deferred = qfalse; +ADDRFP4 0 +INDIRP4 +CNSTI4 448 +ADDP4 +CNSTI4 0 +ASGNI4 +line 607 +;584: +;585: /* +;586: if (ci->team == TEAM_SPECTATOR) +;587: { +;588: // reset any existing players and bodies, because they might be in bad +;589: // frames for this new model +;590: clientNum = ci - cgs.clientinfo; +;591: for ( i = 0 ; i < MAX_GENTITIES ; i++ ) { +;592: if ( cg_entities[i].currentState.clientNum == clientNum +;593: && cg_entities[i].currentState.eType == ET_PLAYER ) { +;594: CG_ResetPlayerEntity( &cg_entities[i] ); +;595: } +;596: } +;597: +;598: if (ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) +;599: { +;600: trap_G2API_CleanGhoul2Models(&ci->ghoul2Model); +;601: } +;602: +;603: return; +;604: } +;605: */ +;606: +;607: teamname[0] = 0; +ADDRLP4 1108 +CNSTI1 0 +ASGNI1 +line 608 +;608: if( cgs.gametype >= GT_TEAM) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $357 +line 609 +;609: if( ci->team == TEAM_BLUE ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $360 +line 610 +;610: Q_strncpyz(teamname, cg_blueTeamName.string, sizeof(teamname) ); +ADDRLP4 1108 +ARGP4 +ADDRGP4 cg_blueTeamName+16 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 611 +;611: } else { +ADDRGP4 $361 +JUMPV +LABELV $360 +line 612 +;612: Q_strncpyz(teamname, cg_redTeamName.string, sizeof(teamname) ); +ADDRLP4 1108 +ARGP4 +ADDRGP4 cg_redTeamName+16 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 613 +;613: } +LABELV $361 +line 614 +;614: } +LABELV $357 +line 615 +;615: if( teamname[0] ) { +ADDRLP4 1108 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $364 +line 616 +;616: strcat( teamname, "/" ); +ADDRLP4 1108 +ARGP4 +ADDRGP4 $366 +ARGP4 +ADDRGP4 strcat +CALLP4 +pop +line 617 +;617: } +LABELV $364 +line 618 +;618: modelloaded = qtrue; +ADDRLP4 1104 +CNSTI4 1 +ASGNI4 +line 619 +;619: if ( !CG_RegisterClientModelname( ci, ci->modelName, ci->skinName, teamname, clientNum ) ) { +ADDRLP4 1192 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1192 +INDIRP4 +ARGP4 +ADDRLP4 1192 +INDIRP4 +CNSTI4 160 +ADDP4 +ARGP4 +ADDRLP4 1192 +INDIRP4 +CNSTI4 224 +ADDP4 +ARGP4 +ADDRLP4 1108 +ARGP4 +ADDRLP4 1096 +INDIRI4 +ARGI4 +ADDRLP4 1196 +ADDRGP4 CG_RegisterClientModelname +CALLI4 +ASGNI4 +ADDRLP4 1196 +INDIRI4 +CNSTI4 0 +NEI4 $367 +line 625 +;620: //CG_Error( "CG_RegisterClientModelname( %s, %s, %s, %s %s ) failed", ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname ); +;621: //rww - DO NOT error out here! Someone could just type in a nonsense model name and crash everyone's client. +;622: //Give it a chance to load default model for this client instead. +;623: +;624: // fall back to default team name +;625: if( cgs.gametype >= GT_TEAM) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $369 +line 627 +;626: // keep skin name +;627: if( ci->team == TEAM_BLUE ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $372 +line 628 +;628: Q_strncpyz(teamname, DEFAULT_BLUETEAM_NAME, sizeof(teamname) ); +ADDRLP4 1108 +ARGP4 +ADDRGP4 $374 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 629 +;629: } else { +ADDRGP4 $373 +JUMPV +LABELV $372 +line 630 +;630: Q_strncpyz(teamname, DEFAULT_REDTEAM_NAME, sizeof(teamname) ); +ADDRLP4 1108 +ARGP4 +ADDRGP4 $375 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 631 +;631: } +LABELV $373 +line 632 +;632: if ( !CG_RegisterClientModelname( ci, DEFAULT_TEAM_MODEL, ci->skinName, teamname, -1 ) ) { +ADDRLP4 1200 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1200 +INDIRP4 +ARGP4 +ADDRGP4 $160 +ARGP4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 224 +ADDP4 +ARGP4 +ADDRLP4 1108 +ARGP4 +CNSTI4 -1 +ARGI4 +ADDRLP4 1204 +ADDRGP4 CG_RegisterClientModelname +CALLI4 +ASGNI4 +ADDRLP4 1204 +INDIRI4 +CNSTI4 0 +NEI4 $370 +line 633 +;633: CG_Error( "DEFAULT_TEAM_MODEL / skin (%s/%s) failed to register", DEFAULT_TEAM_MODEL, ci->skinName ); +ADDRGP4 $378 +ARGP4 +ADDRGP4 $160 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 634 +;634: } +line 635 +;635: } else { +ADDRGP4 $370 +JUMPV +LABELV $369 +line 636 +;636: if ( !CG_RegisterClientModelname( ci, DEFAULT_MODEL, "default", teamname, -1 ) ) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $160 +ARGP4 +ADDRGP4 $213 +ARGP4 +ADDRLP4 1108 +ARGP4 +CNSTI4 -1 +ARGI4 +ADDRLP4 1200 +ADDRGP4 CG_RegisterClientModelname +CALLI4 +ASGNI4 +ADDRLP4 1200 +INDIRI4 +CNSTI4 0 +NEI4 $379 +line 637 +;637: CG_Error( "DEFAULT_MODEL (%s) failed to register", DEFAULT_MODEL ); +ADDRGP4 $381 +ARGP4 +ADDRGP4 $160 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 638 +;638: } +LABELV $379 +line 639 +;639: } +LABELV $370 +line 640 +;640: modelloaded = qfalse; +ADDRLP4 1104 +CNSTI4 0 +ASGNI4 +line 641 +;641: } +LABELV $367 +line 643 +;642: +;643: if (clientNum != -1 && ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) +ADDRLP4 1096 +INDIRI4 +CNSTI4 -1 +EQI4 $382 +ADDRLP4 1200 +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 1200 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $382 +ADDRLP4 1200 +INDIRP4 +ARGP4 +ADDRLP4 1204 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 1204 +INDIRI4 +CNSTI4 0 +EQI4 $382 +line 644 +;644: { +line 645 +;645: if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2)) +ADDRLP4 1208 +CNSTI4 1920 +ADDRLP4 1096 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 1208 +INDIRI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $384 +ADDRLP4 1208 +INDIRI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1212 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 1212 +INDIRI4 +CNSTI4 0 +EQI4 $384 +line 646 +;646: { +line 647 +;647: trap_G2API_CleanGhoul2Models(&cg_entities[clientNum].ghoul2); +CNSTI4 1920 +ADDRLP4 1096 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 648 +;648: } +LABELV $384 +line 649 +;649: trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 1920 +ADDRLP4 1096 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_DuplicateGhoul2Instance +CALLV +pop +line 650 +;650: } +LABELV $382 +line 652 +;651: +;652: ci->newAnims = qfalse; +ADDRFP4 0 +INDIRP4 +CNSTI4 452 +ADDP4 +CNSTI4 0 +ASGNI4 +line 653 +;653: if ( ci->torsoModel ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 492 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $390 +line 656 +;654: orientation_t tag; +;655: // if the torso model has the "tag_flag" +;656: if ( trap_R_LerpTag( &tag, ci->torsoModel, 0, 0, 1, "tag_flag" ) ) { +ADDRLP4 1208 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 492 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1256 +CNSTI4 0 +ASGNI4 +ADDRLP4 1256 +INDIRI4 +ARGI4 +ADDRLP4 1256 +INDIRI4 +ARGI4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 $394 +ARGP4 +ADDRLP4 1260 +ADDRGP4 trap_R_LerpTag +CALLI4 +ASGNI4 +ADDRLP4 1260 +INDIRI4 +CNSTI4 0 +EQI4 $392 +line 657 +;657: ci->newAnims = qtrue; +ADDRFP4 0 +INDIRP4 +CNSTI4 452 +ADDP4 +CNSTI4 1 +ASGNI4 +line 658 +;658: } +LABELV $392 +line 659 +;659: } +LABELV $390 +line 662 +;660: +;661: // sounds +;662: dir = ci->modelName; +ADDRLP4 1172 +ADDRFP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +ASGNP4 +line 663 +;663: fallback = DEFAULT_MALE_SOUNDPATH; //(cgs.gametype >= GT_TEAM) ? DEFAULT_TEAM_MODEL : DEFAULT_MODEL; +ADDRLP4 1180 +ADDRGP4 $395 +ASGNP4 +line 665 +;664: +;665: if ( !ci->skinName || !Q_stricmp( "default", ci->skinName ) ) +ADDRLP4 1208 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +ASGNP4 +ADDRLP4 1208 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $398 +ADDRGP4 $213 +ARGP4 +ADDRLP4 1208 +INDIRP4 +ARGP4 +ADDRLP4 1212 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1212 +INDIRI4 +CNSTI4 0 +NEI4 $396 +LABELV $398 +line 666 +;666: {//try default sounds.cfg first +line 667 +;667: fLen = trap_FS_FOpenFile(va("models/players/%s/sounds.cfg", dir), &f, FS_READ); +ADDRGP4 $399 +ARGP4 +ADDRLP4 1172 +INDIRP4 +ARGP4 +ADDRLP4 1216 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1216 +INDIRP4 +ARGP4 +ADDRLP4 1176 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1220 +ADDRGP4 trap_FS_FOpenFile +CALLI4 +ASGNI4 +ADDRLP4 1184 +ADDRLP4 1220 +INDIRI4 +ASGNI4 +line 668 +;668: if ( !f ) +ADDRLP4 1176 +INDIRI4 +CNSTI4 0 +NEI4 $397 +line 669 +;669: {//no? Look for _default sounds.cfg +line 670 +;670: fLen = trap_FS_FOpenFile(va("models/players/%s/sounds_default.cfg", dir), &f, FS_READ); +ADDRGP4 $402 +ARGP4 +ADDRLP4 1172 +INDIRP4 +ARGP4 +ADDRLP4 1224 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1224 +INDIRP4 +ARGP4 +ADDRLP4 1176 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1228 +ADDRGP4 trap_FS_FOpenFile +CALLI4 +ASGNI4 +ADDRLP4 1184 +ADDRLP4 1228 +INDIRI4 +ASGNI4 +line 671 +;671: } +line 672 +;672: } +ADDRGP4 $397 +JUMPV +LABELV $396 +line 674 +;673: else +;674: {//use the .skin associated with this skin +line 675 +;675: fLen = trap_FS_FOpenFile(va("models/players/%s/sounds_%s.cfg", dir, ci->skinName), &f, FS_READ); +ADDRGP4 $403 +ARGP4 +ADDRLP4 1172 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +ARGP4 +ADDRLP4 1216 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1216 +INDIRP4 +ARGP4 +ADDRLP4 1176 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1220 +ADDRGP4 trap_FS_FOpenFile +CALLI4 +ASGNI4 +ADDRLP4 1184 +ADDRLP4 1220 +INDIRI4 +ASGNI4 +line 676 +;676: if ( !f ) +ADDRLP4 1176 +INDIRI4 +CNSTI4 0 +NEI4 $404 +line 677 +;677: {//fall back to default sounds +line 678 +;678: fLen = trap_FS_FOpenFile(va("models/players/%s/sounds.cfg", dir), &f, FS_READ); +ADDRGP4 $399 +ARGP4 +ADDRLP4 1172 +INDIRP4 +ARGP4 +ADDRLP4 1224 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1224 +INDIRP4 +ARGP4 +ADDRLP4 1176 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1228 +ADDRGP4 trap_FS_FOpenFile +CALLI4 +ASGNI4 +ADDRLP4 1184 +ADDRLP4 1228 +INDIRI4 +ASGNI4 +line 679 +;679: } +LABELV $404 +line 680 +;680: } +LABELV $397 +line 682 +;681: +;682: soundpath[0] = 0; +ADDRLP4 1032 +CNSTI1 0 +ASGNI1 +line 684 +;683: +;684: if (f) +ADDRLP4 1176 +INDIRI4 +CNSTI4 0 +EQI4 $406 +line 685 +;685: { +line 686 +;686: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 688 +;687: +;688: trap_FS_Read(soundpath, fLen, f); +ADDRLP4 1032 +ARGP4 +ADDRLP4 1184 +INDIRI4 +ARGI4 +ADDRLP4 1176 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_Read +CALLV +pop +line 690 +;689: +;690: i = fLen; +ADDRLP4 0 +ADDRLP4 1184 +INDIRI4 +ASGNI4 +ADDRGP4 $409 +JUMPV +LABELV $408 +line 693 +;691: +;692: while (i >= 0 && soundpath[i] != '\n') +;693: { +line 694 +;694: if (soundpath[i] == 'f') +ADDRLP4 0 +INDIRI4 +ADDRLP4 1032 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 102 +NEI4 $411 +line 695 +;695: { +line 696 +;696: isFemale = qtrue; +ADDRLP4 1100 +CNSTI4 1 +ASGNI4 +line 697 +;697: } +LABELV $411 +line 699 +;698: +;699: i--; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 700 +;700: } +LABELV $409 +line 692 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $413 +ADDRLP4 0 +INDIRI4 +ADDRLP4 1032 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 10 +NEI4 $408 +LABELV $413 +line 702 +;701: +;702: soundpath[i-1] = '\0'; +ADDRLP4 0 +INDIRI4 +ADDRLP4 1032-1 +ADDP4 +CNSTI1 0 +ASGNI1 +line 704 +;703: +;704: trap_FS_FCloseFile(f); +ADDRLP4 1176 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_FCloseFile +CALLV +pop +line 705 +;705: } +LABELV $406 +line 707 +;706: +;707: if (isFemale) +ADDRLP4 1100 +INDIRI4 +CNSTI4 0 +EQI4 $415 +line 708 +;708: { +line 709 +;709: ci->gender = GENDER_FEMALE; +ADDRFP4 0 +INDIRP4 +CNSTI4 480 +ADDP4 +CNSTI4 1 +ASGNI4 +line 710 +;710: } +ADDRGP4 $416 +JUMPV +LABELV $415 +line 712 +;711: else +;712: { +line 713 +;713: ci->gender = GENDER_MALE; +ADDRFP4 0 +INDIRP4 +CNSTI4 480 +ADDP4 +CNSTI4 0 +ASGNI4 +line 714 +;714: } +LABELV $416 +line 716 +;715: +;716: for ( i = 0 ; i < MAX_CUSTOM_SOUNDS ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $417 +line 717 +;717: s = cg_customSoundNames[i]; +ADDRLP4 1028 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg_customSoundNames +ADDP4 +INDIRP4 +ASGNP4 +line 718 +;718: if ( !s ) { +ADDRLP4 1028 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $421 +line 719 +;719: break; +ADDRGP4 $419 +JUMPV +LABELV $421 +line 722 +;720: } +;721: +;722: Com_sprintf(soundName, sizeof(soundName), "%s", s+1); +ADDRLP4 4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $423 +ARGP4 +ADDRLP4 1028 +INDIRP4 +CNSTI4 1 +ADDP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 723 +;723: COM_StripExtension(soundName, soundName); +ADDRLP4 4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 COM_StripExtension +CALLV +pop +line 728 +;724: //strip the extension because we might want .mp3's +;725: +;726: //ci->sounds[i] = 0; +;727: // if the model didn't load use the sounds of the default model +;728: if (soundpath[0]) +ADDRLP4 1032 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $424 +line 729 +;729: { +line 730 +;730: ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", soundpath, soundName) ); +ADDRGP4 $426 +ARGP4 +ADDRLP4 1032 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 1216 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1216 +INDIRP4 +ARGP4 +ADDRLP4 1220 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +ADDP4 +ADDRLP4 1220 +INDIRI4 +ASGNI4 +line 732 +;731: +;732: if (!ci->sounds[i]) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $425 +line 733 +;733: { +line 734 +;734: if (isFemale) +ADDRLP4 1100 +INDIRI4 +CNSTI4 0 +EQI4 $429 +line 735 +;735: { +line 736 +;736: ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", DEFAULT_FEMALE_SOUNDPATH, soundName) ); +ADDRGP4 $426 +ARGP4 +ADDRGP4 $431 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 1224 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1224 +INDIRP4 +ARGP4 +ADDRLP4 1228 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +ADDP4 +ADDRLP4 1228 +INDIRI4 +ASGNI4 +line 737 +;737: } +ADDRGP4 $425 +JUMPV +LABELV $429 +line 739 +;738: else +;739: { +line 740 +;740: ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", DEFAULT_MALE_SOUNDPATH, soundName) ); +ADDRGP4 $426 +ARGP4 +ADDRGP4 $395 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 1224 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1224 +INDIRP4 +ARGP4 +ADDRLP4 1228 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +ADDP4 +ADDRLP4 1228 +INDIRI4 +ASGNI4 +line 741 +;741: } +line 742 +;742: } +line 743 +;743: } +ADDRGP4 $425 +JUMPV +LABELV $424 +line 745 +;744: else +;745: { +line 746 +;746: if (modelloaded) +ADDRLP4 1104 +INDIRI4 +CNSTI4 0 +EQI4 $432 +line 747 +;747: { +line 748 +;748: ci->sounds[i] = trap_S_RegisterSound( va("sound/chars/%s/misc/%s", dir, soundName) ); +ADDRGP4 $434 +ARGP4 +ADDRLP4 1172 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 1216 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1216 +INDIRP4 +ARGP4 +ADDRLP4 1220 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +ADDP4 +ADDRLP4 1220 +INDIRI4 +ASGNI4 +line 749 +;749: } +LABELV $432 +line 751 +;750: +;751: if ( !ci->sounds[i] ) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $435 +line 752 +;752: { +line 753 +;753: ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", fallback, soundName) ); +ADDRGP4 $426 +ARGP4 +ADDRLP4 1180 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 1216 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1216 +INDIRP4 +ARGP4 +ADDRLP4 1220 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +ADDP4 +ADDRLP4 1220 +INDIRI4 +ASGNI4 +line 754 +;754: } +LABELV $435 +line 755 +;755: } +LABELV $425 +line 756 +;756: } +LABELV $418 +line 716 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +LTI4 $417 +LABELV $419 +line 758 +;757: +;758: ci->deferred = qfalse; +ADDRFP4 0 +INDIRP4 +CNSTI4 448 +ADDP4 +CNSTI4 0 +ASGNI4 +line 762 +;759: +;760: // reset any existing players and bodies, because they might be in bad +;761: // frames for this new model +;762: clientNum = ci - cgs.clientinfo; +ADDRLP4 1096 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +ADDRGP4 cgs+43024 +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 788 +DIVI4 +ASGNI4 +line 763 +;763: for ( i = 0 ; i < MAX_GENTITIES ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $438 +line 764 +;764: if ( cg_entities[i].currentState.clientNum == clientNum +ADDRLP4 1216 +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 1216 +INDIRI4 +ADDRGP4 cg_entities+220 +ADDP4 +INDIRI4 +ADDRLP4 1096 +INDIRI4 +NEI4 $442 +ADDRLP4 1216 +INDIRI4 +ADDRGP4 cg_entities+4 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $442 +line 765 +;765: && cg_entities[i].currentState.eType == ET_PLAYER ) { +line 766 +;766: CG_ResetPlayerEntity( &cg_entities[i] ); +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +ADDRGP4 CG_ResetPlayerEntity +CALLV +pop +line 767 +;767: } +LABELV $442 +line 768 +;768: } +LABELV $439 +line 763 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1024 +LTI4 $438 +line 769 +;769:} +LABELV $352 +endproc CG_LoadClientInfo 1264 24 +proc CG_CopyClientInfoModel 76 12 +line 779 +;770: +;771: +;772: +;773: +;774:/* +;775:====================== +;776:CG_CopyClientInfoModel +;777:====================== +;778:*/ +;779:static void CG_CopyClientInfoModel( clientInfo_t *from, clientInfo_t *to ) { +line 780 +;780: VectorCopy( from->headOffset, to->headOffset ); +ADDRLP4 0 +CNSTI4 464 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRB +ASGNB 12 +line 781 +;781: to->footsteps = from->footsteps; +ADDRLP4 4 +CNSTI4 476 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 782 +;782: to->gender = from->gender; +ADDRLP4 8 +CNSTI4 480 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 784 +;783: +;784: to->legsModel = from->legsModel; +ADDRLP4 12 +CNSTI4 484 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 785 +;785: to->legsSkin = from->legsSkin; +ADDRLP4 16 +CNSTI4 488 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 786 +;786: to->torsoModel = from->torsoModel; +ADDRLP4 20 +CNSTI4 492 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 787 +;787: to->torsoSkin = from->torsoSkin; +ADDRLP4 24 +CNSTI4 496 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 790 +;788: //to->headModel = from->headModel; +;789: //to->headSkin = from->headSkin; +;790: to->modelIcon = from->modelIcon; +ADDRLP4 28 +CNSTI4 508 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 792 +;791: +;792: to->newAnims = from->newAnims; +ADDRLP4 32 +CNSTI4 452 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 796 +;793: +;794: //to->ghoul2Model = from->ghoul2Model; +;795: //rww - Trying to use the same ghoul2 pointer for two seperate clients == DISASTER +;796: if (to->ghoul2Model && trap_G2_HaveWeGhoul2Models(to->ghoul2Model)) +ADDRLP4 36 +ADDRFP4 4 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $447 +ADDRLP4 36 +INDIRP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $447 +line 797 +;797: { +line 798 +;798: trap_G2API_CleanGhoul2Models(&to->ghoul2Model); +ADDRFP4 4 +INDIRP4 +CNSTI4 504 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 799 +;799: } +LABELV $447 +line 800 +;800: if (from->ghoul2Model && trap_G2_HaveWeGhoul2Models(from->ghoul2Model)) +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $449 +ADDRLP4 44 +INDIRP4 +ARGP4 +ADDRLP4 48 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +EQI4 $449 +line 801 +;801: { +line 802 +;802: trap_G2API_DuplicateGhoul2Instance(from->ghoul2Model, &to->ghoul2Model); +ADDRLP4 52 +CNSTI4 504 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_DuplicateGhoul2Instance +CALLV +pop +line 803 +;803: } +LABELV $449 +line 805 +;804: +;805: to->bolt_head = from->bolt_head; +ADDRLP4 52 +CNSTI4 520 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 806 +;806: to->bolt_lhand = from->bolt_lhand; +ADDRLP4 56 +CNSTI4 516 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 807 +;807: to->bolt_rhand = from->bolt_rhand; +ADDRLP4 60 +CNSTI4 512 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 808 +;808: to->bolt_motion = from->bolt_motion; +ADDRLP4 64 +CNSTI4 524 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 809 +;809: to->bolt_llumbar = from->bolt_llumbar; +ADDRLP4 68 +CNSTI4 528 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 813 +;810: +;811:// to->ATST = from->ATST; +;812: +;813: memcpy( to->sounds, from->sounds, sizeof( to->sounds ) ); +ADDRLP4 72 +CNSTI4 652 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 814 +;814:} +LABELV $446 +endproc CG_CopyClientInfoModel 76 12 +proc CG_ScanForExistingClientInfo 128 12 +line 821 +;815: +;816:/* +;817:====================== +;818:CG_ScanForExistingClientInfo +;819:====================== +;820:*/ +;821:static qboolean CG_ScanForExistingClientInfo( clientInfo_t *ci, int clientNum ) { +line 825 +;822: int i; +;823: clientInfo_t *match; +;824: +;825: for ( i = 0 ; i < cgs.maxclients ; i++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $455 +JUMPV +LABELV $452 +line 826 +;826: match = &cgs.clientinfo[ i ]; +ADDRLP4 0 +CNSTI4 788 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 827 +;827: if ( !match->infoValid ) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $458 +line 828 +;828: continue; +ADDRGP4 $453 +JUMPV +LABELV $458 +line 830 +;829: } +;830: if ( match->deferred ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 448 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $460 +line 831 +;831: continue; +ADDRGP4 $453 +JUMPV +LABELV $460 +line 833 +;832: } +;833: if ( !Q_stricmp( ci->modelName, match->modelName ) +ADDRLP4 8 +CNSTI4 160 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $462 +ADDRLP4 16 +CNSTI4 224 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $462 +ADDRLP4 24 +CNSTI4 384 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +NEI4 $462 +ADDRLP4 32 +CNSTI4 352 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +NEI4 $462 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $465 +ADDRLP4 40 +CNSTI4 68 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +INDIRI4 +NEI4 $462 +LABELV $465 +ADDRLP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $462 +ADDRLP4 0 +INDIRP4 +CNSTI4 520 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $462 +line 842 +;834: && !Q_stricmp( ci->skinName, match->skinName ) +;835:// && !Q_stricmp( ci->headModelName, match->headModelName ) +;836:// && !Q_stricmp( ci->headSkinName, match->headSkinName ) +;837: && !Q_stricmp( ci->blueTeam, match->blueTeam ) +;838: && !Q_stricmp( ci->redTeam, match->redTeam ) +;839: && (cgs.gametype < GT_TEAM || ci->team == match->team) +;840: && match->ghoul2Model +;841: && match->bolt_head) //if the bolts haven't been initialized, this "match" is useless to us +;842: { +line 845 +;843: // this clientinfo is identical, so use it's handles +;844: +;845: ci->deferred = qfalse; +ADDRFP4 0 +INDIRP4 +CNSTI4 448 +ADDP4 +CNSTI4 0 +ASGNI4 +line 851 +;846: +;847: //rww - Filthy hack. If this is actually the info already belonging to us, just reassign the pointer. +;848: //Switching instances when not necessary produces small animation glitches. +;849: //Actually, before, were we even freeing the instance attached to the old clientinfo before copying +;850: //this new clientinfo over it? Could be a nasty leak possibility. (though this should remedy it in theory) +;851: if (clientNum == i) +ADDRFP4 4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $466 +line 852 +;852: { +line 853 +;853: if (match->ghoul2Model && trap_G2_HaveWeGhoul2Models(match->ghoul2Model)) +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $467 +ADDRLP4 48 +INDIRP4 +ARGP4 +ADDRLP4 52 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +EQI4 $467 +line 854 +;854: { //The match has a valid instance (if it didn't, we'd probably already be fudged (^_^) at this state) +line 855 +;855: if (ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $470 +ADDRLP4 56 +INDIRP4 +ARGP4 +ADDRLP4 60 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 0 +EQI4 $470 +line 856 +;856: { //First kill the copy we have if we have one. (but it should be null) +line 857 +;857: trap_G2API_CleanGhoul2Models(&ci->ghoul2Model); +ADDRFP4 0 +INDIRP4 +CNSTI4 504 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 858 +;858: } +LABELV $470 +line 860 +;859: +;860: VectorCopy( match->headOffset, ci->headOffset ); +ADDRLP4 64 +CNSTI4 464 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +INDIRB +ASGNB 12 +line 861 +;861: ci->footsteps = match->footsteps; +ADDRLP4 68 +CNSTI4 476 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 862 +;862: ci->gender = match->gender; +ADDRLP4 72 +CNSTI4 480 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 864 +;863: +;864: ci->legsModel = match->legsModel; +ADDRLP4 76 +CNSTI4 484 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 76 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 76 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 865 +;865: ci->legsSkin = match->legsSkin; +ADDRLP4 80 +CNSTI4 488 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 866 +;866: ci->torsoModel = match->torsoModel; +ADDRLP4 84 +CNSTI4 492 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 84 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 84 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 867 +;867: ci->torsoSkin = match->torsoSkin; +ADDRLP4 88 +CNSTI4 496 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 88 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 88 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 868 +;868: ci->modelIcon = match->modelIcon; +ADDRLP4 92 +CNSTI4 508 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 870 +;869: +;870: ci->newAnims = match->newAnims; +ADDRLP4 96 +CNSTI4 452 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 96 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 96 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 872 +;871: +;872: ci->bolt_head = match->bolt_head; +ADDRLP4 100 +CNSTI4 520 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 100 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 100 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 873 +;873: ci->bolt_lhand = match->bolt_lhand; +ADDRLP4 104 +CNSTI4 516 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 104 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 104 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 874 +;874: ci->bolt_rhand = match->bolt_rhand; +ADDRLP4 108 +CNSTI4 512 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 108 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 108 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 875 +;875: ci->bolt_motion = match->bolt_motion; +ADDRLP4 112 +CNSTI4 524 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 112 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 112 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 876 +;876: ci->bolt_llumbar = match->bolt_llumbar; +ADDRLP4 116 +CNSTI4 528 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 116 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 116 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +line 878 +;877: +;878: memcpy( ci->sounds, match->sounds, sizeof( ci->sounds ) ); +ADDRLP4 120 +CNSTI4 652 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 120 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 120 +INDIRI4 +ADDP4 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 883 +;879: +;880: //We can share this pointer, because it already belongs to this client. +;881: //The pointer itself and the ghoul2 instance is never actually changed, just passed between +;882: //clientinfo structures. +;883: ci->ghoul2Model = match->ghoul2Model; +ADDRLP4 124 +CNSTI4 504 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 124 +INDIRI4 +ADDP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 124 +INDIRI4 +ADDP4 +INDIRP4 +ASGNP4 +line 884 +;884: } +line 885 +;885: } +ADDRGP4 $467 +JUMPV +LABELV $466 +line 887 +;886: else +;887: { +line 888 +;888: CG_CopyClientInfoModel( match, ci ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_CopyClientInfoModel +CALLV +pop +line 889 +;889: } +LABELV $467 +line 891 +;890: +;891: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $451 +JUMPV +LABELV $462 +line 893 +;892: } +;893: } +LABELV $453 +line 825 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $455 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cgs+32988 +INDIRI4 +LTI4 $452 +line 896 +;894: +;895: // nothing matches, so defer the load +;896: return qfalse; +CNSTI4 0 +RETI4 +LABELV $451 +endproc CG_ScanForExistingClientInfo 128 12 +proc CG_SetDeferredClientInfo 36 8 +line 907 +;897:} +;898: +;899:/* +;900:====================== +;901:CG_SetDeferredClientInfo +;902: +;903:We aren't going to load it now, so grab some other +;904:client's info to use until we have some spare time. +;905:====================== +;906:*/ +;907:static void CG_SetDeferredClientInfo( clientInfo_t *ci ) { +line 913 +;908: int i; +;909: clientInfo_t *match; +;910: +;911: // if someone else is already the same models and skins we +;912: // can just load the client info +;913: for ( i = 0 ; i < cgs.maxclients ; i++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $476 +JUMPV +LABELV $473 +line 914 +;914: match = &cgs.clientinfo[ i ]; +ADDRLP4 0 +CNSTI4 788 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 915 +;915: if ( !match->infoValid || match->deferred ) { +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $481 +ADDRLP4 0 +INDIRP4 +CNSTI4 448 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $479 +LABELV $481 +line 916 +;916: continue; +ADDRGP4 $474 +JUMPV +LABELV $479 +line 918 +;917: } +;918: if ( Q_stricmp( ci->skinName, match->skinName ) || +ADDRLP4 16 +CNSTI4 224 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $486 +ADDRLP4 24 +CNSTI4 160 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +NEI4 $486 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $482 +ADDRLP4 32 +CNSTI4 68 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $482 +LABELV $486 +line 922 +;919: Q_stricmp( ci->modelName, match->modelName ) || +;920:// Q_stricmp( ci->headModelName, match->headModelName ) || +;921:// Q_stricmp( ci->headSkinName, match->headSkinName ) || +;922: (cgs.gametype >= GT_TEAM && ci->team != match->team) ) { +line 923 +;923: continue; +ADDRGP4 $474 +JUMPV +LABELV $482 +line 926 +;924: } +;925: // just load the real info cause it uses the same models and skins +;926: CG_LoadClientInfo( ci ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_LoadClientInfo +CALLV +pop +line 927 +;927: return; +ADDRGP4 $472 +JUMPV +LABELV $474 +line 913 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $476 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cgs+32988 +INDIRI4 +LTI4 $473 +line 931 +;928: } +;929: +;930: // if we are in teamplay, only grab a model if the skin is correct +;931: if ( cgs.gametype >= GT_TEAM ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $487 +line 932 +;932: for ( i = 0 ; i < cgs.maxclients ; i++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $493 +JUMPV +LABELV $490 +line 933 +;933: match = &cgs.clientinfo[ i ]; +ADDRLP4 0 +CNSTI4 788 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 934 +;934: if ( !match->infoValid || match->deferred ) { +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $498 +ADDRLP4 0 +INDIRP4 +CNSTI4 448 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $496 +LABELV $498 +line 935 +;935: continue; +ADDRGP4 $491 +JUMPV +LABELV $496 +line 937 +;936: } +;937: if ( Q_stricmp( ci->skinName, match->skinName ) || +ADDRLP4 16 +CNSTI4 224 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $502 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $499 +ADDRLP4 24 +CNSTI4 68 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $499 +LABELV $502 +line 938 +;938: (cgs.gametype >= GT_TEAM && ci->team != match->team) ) { +line 939 +;939: continue; +ADDRGP4 $491 +JUMPV +LABELV $499 +line 941 +;940: } +;941: ci->deferred = qtrue; +ADDRFP4 0 +INDIRP4 +CNSTI4 448 +ADDP4 +CNSTI4 1 +ASGNI4 +line 942 +;942: CG_CopyClientInfoModel( match, ci ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_CopyClientInfoModel +CALLV +pop +line 943 +;943: return; +ADDRGP4 $472 +JUMPV +LABELV $491 +line 932 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $493 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cgs+32988 +INDIRI4 +LTI4 $490 +line 949 +;944: } +;945: // load the full model, because we don't ever want to show +;946: // an improper team skin. This will cause a hitch for the first +;947: // player, when the second enters. Combat shouldn't be going on +;948: // yet, so it shouldn't matter +;949: CG_LoadClientInfo( ci ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_LoadClientInfo +CALLV +pop +line 950 +;950: return; +ADDRGP4 $472 +JUMPV +LABELV $487 +line 954 +;951: } +;952: +;953: // find the first valid clientinfo and grab its stuff +;954: for ( i = 0 ; i < cgs.maxclients ; i++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $506 +JUMPV +LABELV $503 +line 955 +;955: match = &cgs.clientinfo[ i ]; +ADDRLP4 0 +CNSTI4 788 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 956 +;956: if ( !match->infoValid ) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $509 +line 957 +;957: continue; +ADDRGP4 $504 +JUMPV +LABELV $509 +line 960 +;958: } +;959: +;960: ci->deferred = qtrue; +ADDRFP4 0 +INDIRP4 +CNSTI4 448 +ADDP4 +CNSTI4 1 +ASGNI4 +line 961 +;961: CG_CopyClientInfoModel( match, ci ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_CopyClientInfoModel +CALLV +pop +line 962 +;962: return; +ADDRGP4 $472 +JUMPV +LABELV $504 +line 954 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $506 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cgs+32988 +INDIRI4 +LTI4 $503 +line 966 +;963: } +;964: +;965: // we should never get here... +;966: CG_Printf( "CG_SetDeferredClientInfo: no valid clients!\n" ); +ADDRGP4 $511 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 968 +;967: +;968: CG_LoadClientInfo( ci ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_LoadClientInfo +CALLV +pop +line 969 +;969:} +LABELV $472 +endproc CG_SetDeferredClientInfo 36 8 +export CG_NewClientInfo +proc CG_NewClientInfo 980 40 +line 976 +;970: +;971:/* +;972:====================== +;973:CG_NewClientInfo +;974:====================== +;975:*/ +;976:void CG_NewClientInfo( int clientNum, qboolean entitiesInitialized ) { +line 983 +;977: clientInfo_t *ci; +;978: clientInfo_t newInfo; +;979: const char *configstring; +;980: const char *v; +;981: char *slash; +;982: void *oldGhoul2; +;983: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 984 +;984: qboolean wasATST = qfalse; +ADDRLP4 804 +CNSTI4 0 +ASGNI4 +line 986 +;985: +;986: ci = &cgs.clientinfo[clientNum]; +ADDRLP4 800 +CNSTI4 788 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 988 +;987: +;988: oldGhoul2 = ci->ghoul2Model; +ADDRLP4 812 +ADDRLP4 800 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ASGNP4 +line 990 +;989: +;990: configstring = CG_ConfigString( clientNum + CS_PLAYERS ); +ADDRFP4 0 +INDIRI4 +CNSTI4 544 +ADDI4 +ARGI4 +ADDRLP4 816 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 796 +ADDRLP4 816 +INDIRP4 +ASGNP4 +line 991 +;991: if ( !configstring[0] ) { +ADDRLP4 796 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $514 +line 992 +;992: memset( ci, 0, sizeof( *ci ) ); +ADDRLP4 800 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 788 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 993 +;993: return; // player just left +ADDRGP4 $512 +JUMPV +LABELV $514 +line 996 +;994: } +;995: +;996: if (ci) +ADDRLP4 800 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $516 +line 997 +;997: { +line 998 +;998: wasATST = ci->ATST; +ADDRLP4 804 +ADDRLP4 800 +INDIRP4 +CNSTI4 500 +ADDP4 +INDIRI4 +ASGNI4 +line 999 +;999: } +LABELV $516 +line 1003 +;1000: +;1001: // build into a temp buffer so the defer checks can use +;1002: // the old value +;1003: memset( &newInfo, 0, sizeof( newInfo ) ); +ADDRLP4 4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 788 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 1006 +;1004: +;1005: // isolate the player's name +;1006: v = Info_ValueForKey(configstring, "n"); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $518 +ARGP4 +ADDRLP4 820 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 820 +INDIRP4 +ASGNP4 +line 1007 +;1007: Q_strncpyz( newInfo.name, v, sizeof( newInfo.name ) ); +ADDRLP4 4+4 +ARGP4 +ADDRLP4 792 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1010 +;1008: +;1009: // colors +;1010: v = Info_ValueForKey( configstring, "c1" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $521 +ARGP4 +ADDRLP4 824 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 824 +INDIRP4 +ASGNP4 +line 1011 +;1011: CG_ColorFromString( v, newInfo.color1 ); +ADDRLP4 792 +INDIRP4 +ARGP4 +ADDRLP4 4+80 +ARGP4 +ADDRGP4 CG_ColorFromString +CALLV +pop +line 1013 +;1012: +;1013: newInfo.icolor1 = atoi(v); +ADDRLP4 792 +INDIRP4 +ARGP4 +ADDRLP4 828 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4+104 +ADDRLP4 828 +INDIRI4 +ASGNI4 +line 1015 +;1014: +;1015: v = Info_ValueForKey( configstring, "c2" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $524 +ARGP4 +ADDRLP4 832 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 832 +INDIRP4 +ASGNP4 +line 1016 +;1016: CG_ColorFromString( v, newInfo.color2 ); +ADDRLP4 792 +INDIRP4 +ARGP4 +ADDRLP4 4+92 +ARGP4 +ADDRGP4 CG_ColorFromString +CALLV +pop +line 1019 +;1017: +;1018: // bot skill +;1019: v = Info_ValueForKey( configstring, "skill" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $526 +ARGP4 +ADDRLP4 836 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 836 +INDIRP4 +ASGNP4 +line 1020 +;1020: newInfo.botSkill = atoi( v ); +ADDRLP4 792 +INDIRP4 +ARGP4 +ADDRLP4 840 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4+72 +ADDRLP4 840 +INDIRI4 +ASGNI4 +line 1023 +;1021: +;1022: // handicap +;1023: v = Info_ValueForKey( configstring, "hc" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $528 +ARGP4 +ADDRLP4 844 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 844 +INDIRP4 +ASGNP4 +line 1024 +;1024: newInfo.handicap = atoi( v ); +ADDRLP4 792 +INDIRP4 +ARGP4 +ADDRLP4 848 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4+128 +ADDRLP4 848 +INDIRI4 +ASGNI4 +line 1027 +;1025: +;1026: // wins +;1027: v = Info_ValueForKey( configstring, "w" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $530 +ARGP4 +ADDRLP4 852 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 852 +INDIRP4 +ASGNP4 +line 1028 +;1028: newInfo.wins = atoi( v ); +ADDRLP4 792 +INDIRP4 +ARGP4 +ADDRLP4 856 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4+132 +ADDRLP4 856 +INDIRI4 +ASGNI4 +line 1031 +;1029: +;1030: // losses +;1031: v = Info_ValueForKey( configstring, "l" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $532 +ARGP4 +ADDRLP4 860 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 860 +INDIRP4 +ASGNP4 +line 1032 +;1032: newInfo.losses = atoi( v ); +ADDRLP4 792 +INDIRP4 +ARGP4 +ADDRLP4 864 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4+136 +ADDRLP4 864 +INDIRI4 +ASGNI4 +line 1035 +;1033: +;1034: // team +;1035: v = Info_ValueForKey( configstring, "t" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $534 +ARGP4 +ADDRLP4 868 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 868 +INDIRP4 +ASGNP4 +line 1036 +;1036: newInfo.team = atoi( v ); +ADDRLP4 792 +INDIRP4 +ARGP4 +ADDRLP4 872 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4+68 +ADDRLP4 872 +INDIRI4 +ASGNI4 +line 1039 +;1037: +;1038: // team task +;1039: v = Info_ValueForKey( configstring, "tt" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $536 +ARGP4 +ADDRLP4 876 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 876 +INDIRP4 +ASGNP4 +line 1040 +;1040: newInfo.teamTask = atoi(v); +ADDRLP4 792 +INDIRP4 +ARGP4 +ADDRLP4 880 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4+140 +ADDRLP4 880 +INDIRI4 +ASGNI4 +line 1043 +;1041: +;1042: // team leader +;1043: v = Info_ValueForKey( configstring, "tl" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $538 +ARGP4 +ADDRLP4 884 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 884 +INDIRP4 +ASGNP4 +line 1044 +;1044: newInfo.teamLeader = atoi(v); +ADDRLP4 792 +INDIRP4 +ARGP4 +ADDRLP4 888 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4+144 +ADDRLP4 888 +INDIRI4 +ASGNI4 +line 1046 +;1045: +;1046: v = Info_ValueForKey( configstring, "g_redteam" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $540 +ARGP4 +ADDRLP4 892 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 892 +INDIRP4 +ASGNP4 +line 1047 +;1047: Q_strncpyz(newInfo.redTeam, v, MAX_TEAMNAME); +ADDRLP4 4+352 +ARGP4 +ADDRLP4 792 +INDIRP4 +ARGP4 +CNSTI4 32 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1049 +;1048: +;1049: v = Info_ValueForKey( configstring, "g_blueteam" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $542 +ARGP4 +ADDRLP4 896 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 896 +INDIRP4 +ASGNP4 +line 1050 +;1050: Q_strncpyz(newInfo.blueTeam, v, MAX_TEAMNAME); +ADDRLP4 4+384 +ARGP4 +ADDRLP4 792 +INDIRP4 +ARGP4 +CNSTI4 32 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1053 +;1051: +;1052: // model +;1053: v = Info_ValueForKey( configstring, "model" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $544 +ARGP4 +ADDRLP4 900 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 900 +INDIRP4 +ASGNP4 +line 1054 +;1054: if ( cg_forceModel.integer ) { +ADDRGP4 cg_forceModel+12 +INDIRI4 +CNSTI4 0 +EQI4 $545 +line 1060 +;1055: // forcemodel makes everyone use a single model +;1056: // to prevent load hitches +;1057: char modelStr[MAX_QPATH]; +;1058: char *skin; +;1059: +;1060: if( cgs.gametype >= GT_TEAM ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $548 +line 1061 +;1061: Q_strncpyz( newInfo.modelName, DEFAULT_TEAM_MODEL, sizeof( newInfo.modelName ) ); +ADDRLP4 4+160 +ARGP4 +ADDRGP4 $160 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1062 +;1062: Q_strncpyz( newInfo.skinName, "default", sizeof( newInfo.skinName ) ); +ADDRLP4 4+224 +ARGP4 +ADDRGP4 $213 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1063 +;1063: } else { +ADDRGP4 $549 +JUMPV +LABELV $548 +line 1064 +;1064: trap_Cvar_VariableStringBuffer( "model", modelStr, sizeof( modelStr ) ); +ADDRGP4 $544 +ARGP4 +ADDRLP4 904 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 trap_Cvar_VariableStringBuffer +CALLV +pop +line 1065 +;1065: if ( ( skin = strchr( modelStr, '/' ) ) == NULL) { +ADDRLP4 904 +ARGP4 +CNSTI4 47 +ARGI4 +ADDRLP4 972 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 968 +ADDRLP4 972 +INDIRP4 +ASGNP4 +ADDRLP4 972 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $555 +line 1066 +;1066: skin = "default"; +ADDRLP4 968 +ADDRGP4 $213 +ASGNP4 +line 1067 +;1067: } else { +ADDRGP4 $556 +JUMPV +LABELV $555 +line 1068 +;1068: *skin++ = 0; +ADDRLP4 976 +ADDRLP4 968 +INDIRP4 +ASGNP4 +ADDRLP4 968 +ADDRLP4 976 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 976 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1069 +;1069: } +LABELV $556 +line 1071 +;1070: +;1071: Q_strncpyz( newInfo.skinName, skin, sizeof( newInfo.skinName ) ); +ADDRLP4 4+224 +ARGP4 +ADDRLP4 968 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1072 +;1072: Q_strncpyz( newInfo.modelName, modelStr, sizeof( newInfo.modelName ) ); +ADDRLP4 4+160 +ARGP4 +ADDRLP4 904 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1073 +;1073: } +LABELV $549 +line 1075 +;1074: +;1075: if ( cgs.gametype >= GT_TEAM ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $546 +line 1077 +;1076: // keep skin name +;1077: slash = strchr( v, '/' ); +ADDRLP4 792 +INDIRP4 +ARGP4 +CNSTI4 47 +ARGI4 +ADDRLP4 972 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 808 +ADDRLP4 972 +INDIRP4 +ASGNP4 +line 1078 +;1078: if ( slash ) { +ADDRLP4 808 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $546 +line 1079 +;1079: Q_strncpyz( newInfo.skinName, slash + 1, sizeof( newInfo.skinName ) ); +ADDRLP4 4+224 +ARGP4 +ADDRLP4 808 +INDIRP4 +CNSTI4 1 +ADDP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1080 +;1080: } +line 1081 +;1081: } +line 1082 +;1082: } else { +ADDRGP4 $546 +JUMPV +LABELV $545 +line 1083 +;1083: Q_strncpyz( newInfo.modelName, v, sizeof( newInfo.modelName ) ); +ADDRLP4 4+160 +ARGP4 +ADDRLP4 792 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1085 +;1084: +;1085: slash = strchr( newInfo.modelName, '/' ); +ADDRLP4 4+160 +ARGP4 +CNSTI4 47 +ARGI4 +ADDRLP4 904 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 808 +ADDRLP4 904 +INDIRP4 +ASGNP4 +line 1086 +;1086: if ( !slash ) { +ADDRLP4 808 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $571 +line 1088 +;1087: // modelName didn not include a skin name +;1088: Q_strncpyz( newInfo.skinName, "default", sizeof( newInfo.skinName ) ); +ADDRLP4 4+224 +ARGP4 +ADDRGP4 $213 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1089 +;1089: } else { +ADDRGP4 $572 +JUMPV +LABELV $571 +line 1090 +;1090: Q_strncpyz( newInfo.skinName, slash + 1, sizeof( newInfo.skinName ) ); +ADDRLP4 4+224 +ARGP4 +ADDRLP4 808 +INDIRP4 +CNSTI4 1 +ADDP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1092 +;1091: // truncate modelName +;1092: *slash = 0; +ADDRLP4 808 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1093 +;1093: } +LABELV $572 +line 1094 +;1094: } +LABELV $546 +line 1142 +;1095: +;1096: // head model +;1097:/* +;1098: v = Info_ValueForKey( configstring, "hmodel" ); +;1099: if ( cg_forceModel.integer ) { +;1100: // forcemodel makes everyone use a single model +;1101: // to prevent load hitches +;1102: char modelStr[MAX_QPATH]; +;1103: char *skin; +;1104: +;1105: if( cgs.gametype >= GT_TEAM ) { +;1106: Q_strncpyz( newInfo.headModelName, DEFAULT_TEAM_MODEL, sizeof( newInfo.headModelName ) ); +;1107: Q_strncpyz( newInfo.headSkinName, "default", sizeof( newInfo.headSkinName ) ); +;1108: } else { +;1109: trap_Cvar_VariableStringBuffer( "headmodel", modelStr, sizeof( modelStr ) ); +;1110: if ( ( skin = strchr( modelStr, '/' ) ) == NULL) { +;1111: skin = "default"; +;1112: } else { +;1113: *skin++ = 0; +;1114: } +;1115: +;1116: Q_strncpyz( newInfo.headSkinName, skin, sizeof( newInfo.headSkinName ) ); +;1117: Q_strncpyz( newInfo.headModelName, modelStr, sizeof( newInfo.headModelName ) ); +;1118: } +;1119: +;1120: if ( cgs.gametype >= GT_TEAM ) { +;1121: // keep skin name +;1122: slash = strchr( v, '/' ); +;1123: if ( slash ) { +;1124: Q_strncpyz( newInfo.headSkinName, slash + 1, sizeof( newInfo.headSkinName ) ); +;1125: } +;1126: } +;1127: } else { +;1128: Q_strncpyz( newInfo.headModelName, v, sizeof( newInfo.headModelName ) ); +;1129: +;1130: slash = strchr( newInfo.headModelName, '/' ); +;1131: if ( !slash ) { +;1132: // modelName didn not include a skin name +;1133: Q_strncpyz( newInfo.headSkinName, "default", sizeof( newInfo.headSkinName ) ); +;1134: } else { +;1135: Q_strncpyz( newInfo.headSkinName, slash + 1, sizeof( newInfo.headSkinName ) ); +;1136: // truncate modelName +;1137: *slash = 0; +;1138: } +;1139: } +;1140:*/ +;1141: // force powers +;1142: v = Info_ValueForKey( configstring, "forcepowers" ); +ADDRLP4 796 +INDIRP4 +ARGP4 +ADDRGP4 $577 +ARGP4 +ADDRLP4 904 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 792 +ADDRLP4 904 +INDIRP4 +ASGNP4 +line 1143 +;1143: Q_strncpyz( newInfo.forcePowers, v, sizeof( newInfo.forcePowers ) ); +ADDRLP4 4+288 +ARGP4 +ADDRLP4 792 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1145 +;1144: +;1145: newInfo.ATST = wasATST; +ADDRLP4 4+500 +ADDRLP4 804 +INDIRI4 +ASGNI4 +line 1147 +;1146: +;1147: if (cgs.gametype >= GT_TEAM && !cgs.jediVmerc ) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $581 +ADDRGP4 cgs+32996 +INDIRI4 +CNSTI4 0 +NEI4 $581 +line 1148 +;1148: { +line 1149 +;1149: if (newInfo.team == TEAM_RED) +ADDRLP4 4+68 +INDIRI4 +CNSTI4 1 +NEI4 $585 +line 1150 +;1150: { +line 1151 +;1151: strcpy(newInfo.skinName, "red"); +ADDRLP4 4+224 +ARGP4 +ADDRGP4 $176 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 1153 +;1152:// strcpy(newInfo.headSkinName, "red"); +;1153: } +LABELV $585 +line 1154 +;1154: if (newInfo.team == TEAM_BLUE) +ADDRLP4 4+68 +INDIRI4 +CNSTI4 2 +NEI4 $589 +line 1155 +;1155: { +line 1156 +;1156: strcpy(newInfo.skinName, "blue"); +ADDRLP4 4+224 +ARGP4 +ADDRGP4 $177 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 1158 +;1157:// strcpy(newInfo.headSkinName, "blue"); +;1158: } +LABELV $589 +line 1159 +;1159: } +LABELV $581 +line 1163 +;1160: +;1161: // scan for an existing clientinfo that matches this modelname +;1162: // so we can avoid loading checks if possible +;1163: if ( !CG_ScanForExistingClientInfo( &newInfo, clientNum ) ) { +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 908 +ADDRGP4 CG_ScanForExistingClientInfo +CALLI4 +ASGNI4 +ADDRLP4 908 +INDIRI4 +CNSTI4 0 +NEI4 $593 +line 1166 +;1164: qboolean forceDefer; +;1165: +;1166: forceDefer = trap_MemoryRemaining() < 4000000; +ADDRLP4 920 +ADDRGP4 trap_MemoryRemaining +CALLI4 +ASGNI4 +ADDRLP4 920 +INDIRI4 +CNSTI4 4000000 +GEI4 $596 +ADDRLP4 916 +CNSTI4 1 +ASGNI4 +ADDRGP4 $597 +JUMPV +LABELV $596 +ADDRLP4 916 +CNSTI4 0 +ASGNI4 +LABELV $597 +ADDRLP4 912 +ADDRLP4 916 +INDIRI4 +ASGNI4 +line 1169 +;1167: +;1168: // if we are defering loads, just have it pick the first valid +;1169: if (cg.snap && cg.snap->ps.clientNum == clientNum && !forceDefer) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $598 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +NEI4 $598 +ADDRLP4 912 +INDIRI4 +CNSTI4 0 +NEI4 $598 +line 1170 +;1170: { //rww - don't defer your own client info ever, unless really low on memory +line 1171 +;1171: CG_LoadClientInfo( &newInfo ); +ADDRLP4 4 +ARGP4 +ADDRGP4 CG_LoadClientInfo +CALLV +pop +line 1172 +;1172: } +ADDRGP4 $599 +JUMPV +LABELV $598 +line 1173 +;1173: else if ( forceDefer || ( cg_deferPlayers.integer && !cg_buildScript.integer && !cg.loading ) ) { +ADDRLP4 924 +CNSTI4 0 +ASGNI4 +ADDRLP4 912 +INDIRI4 +ADDRLP4 924 +INDIRI4 +NEI4 $607 +ADDRGP4 cg_deferPlayers+12 +INDIRI4 +ADDRLP4 924 +INDIRI4 +EQI4 $602 +ADDRGP4 cg_buildScript+12 +INDIRI4 +ADDRLP4 924 +INDIRI4 +NEI4 $602 +ADDRGP4 cg+20 +INDIRI4 +ADDRLP4 924 +INDIRI4 +NEI4 $602 +LABELV $607 +line 1175 +;1174: // keep whatever they had if it won't violate team skins +;1175: CG_SetDeferredClientInfo( &newInfo ); +ADDRLP4 4 +ARGP4 +ADDRGP4 CG_SetDeferredClientInfo +CALLV +pop +line 1177 +;1176: // if we are low on memory, leave them with this model +;1177: if ( forceDefer ) { +ADDRLP4 912 +INDIRI4 +CNSTI4 0 +EQI4 $603 +line 1178 +;1178: CG_Printf( "Memory is low. Using deferred model.\n" ); +ADDRGP4 $610 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 1179 +;1179: newInfo.deferred = qfalse; +ADDRLP4 4+448 +CNSTI4 0 +ASGNI4 +line 1180 +;1180: } +line 1181 +;1181: } else { +ADDRGP4 $603 +JUMPV +LABELV $602 +line 1182 +;1182: CG_LoadClientInfo( &newInfo ); +ADDRLP4 4 +ARGP4 +ADDRGP4 CG_LoadClientInfo +CALLV +pop +line 1183 +;1183: } +LABELV $603 +LABELV $599 +line 1184 +;1184: } +LABELV $593 +line 1187 +;1185: +;1186: // replace whatever was there with the new one +;1187: newInfo.infoValid = qtrue; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 1188 +;1188: if (ci->ghoul2Model && +ADDRLP4 912 +ADDRLP4 800 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 916 +ADDRLP4 912 +INDIRP4 +CVPU4 4 +ASGNU4 +ADDRLP4 916 +INDIRU4 +CNSTU4 0 +EQU4 $612 +ADDRLP4 916 +INDIRU4 +ADDRLP4 4+504 +INDIRP4 +CVPU4 4 +EQU4 $612 +ADDRLP4 912 +INDIRP4 +ARGP4 +ADDRLP4 920 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 920 +INDIRI4 +CNSTI4 0 +EQI4 $612 +line 1191 +;1189: ci->ghoul2Model != newInfo.ghoul2Model && +;1190: trap_G2_HaveWeGhoul2Models(ci->ghoul2Model)) +;1191: { //We must kill this instance before we remove our only pointer to it from the cgame. +line 1193 +;1192: //Otherwise we will end up with extra instances all over the place, I think. +;1193: trap_G2API_CleanGhoul2Models(&ci->ghoul2Model); +ADDRLP4 800 +INDIRP4 +CNSTI4 504 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 1194 +;1194: } +LABELV $612 +line 1195 +;1195: *ci = newInfo; +ADDRLP4 800 +INDIRP4 +ADDRLP4 4 +INDIRB +ASGNB 788 +ADDRGP4 $616 +JUMPV +LABELV $615 +line 1199 +;1196: +;1197: //force a weapon change anyway, for all clients being rendered to the current client +;1198: while (i < MAX_CLIENTS) +;1199: { +line 1200 +;1200: cg_entities[i].ghoul2weapon = NULL; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 1201 +;1201: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1202 +;1202: } +LABELV $616 +line 1198 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +LTI4 $615 +line 1205 +;1203: +;1204: // Check if the ghoul2 model changed in any way. This is safer than assuming we have a legal cent shile loading info. +;1205: if (entitiesInitialized && ci->ghoul2Model && (oldGhoul2 != ci->ghoul2Model)) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $619 +ADDRLP4 924 +ADDRLP4 800 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +CVPU4 4 +ASGNU4 +ADDRLP4 924 +INDIRU4 +CNSTU4 0 +EQU4 $619 +ADDRLP4 812 +INDIRP4 +CVPU4 4 +ADDRLP4 924 +INDIRU4 +EQU4 $619 +line 1206 +;1206: { // Copy the new ghoul2 model to the centity. +line 1208 +;1207: animation_t *anim; +;1208: centity_t *cent = &cg_entities[clientNum]; +ADDRLP4 932 +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 1210 +;1209: +;1210: anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.legsAnim & ~ANIM_TOGGLEBIT) ]; +ADDRLP4 928 +CNSTI4 28 +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ASGNP4 +line 1212 +;1211: +;1212: if (anim) +ADDRLP4 928 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $622 +line 1213 +;1213: { +line 1214 +;1214: int flags = BONE_ANIM_OVERRIDE_FREEZE; +ADDRLP4 936 +CNSTI4 72 +ASGNI4 +line 1215 +;1215: int firstFrame = anim->firstFrame; +ADDRLP4 944 +ADDRLP4 928 +INDIRP4 +INDIRI4 +ASGNI4 +line 1216 +;1216: int setFrame = -1; +ADDRLP4 940 +CNSTI4 -1 +ASGNI4 +line 1217 +;1217: float animSpeed = 50.0f / anim->frameLerp; +ADDRLP4 948 +CNSTF4 1112014848 +ADDRLP4 928 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 1219 +;1218: +;1219: if (anim->loopFrames != -1) +ADDRLP4 928 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $624 +line 1220 +;1220: { +line 1221 +;1221: flags |= BONE_ANIM_OVERRIDE_LOOP; +ADDRLP4 936 +ADDRLP4 936 +INDIRI4 +CNSTI4 16 +BORI4 +ASGNI4 +line 1222 +;1222: } +LABELV $624 +line 1224 +;1223: +;1224: if (cent->pe.legs.frame >= anim->firstFrame && cent->pe.legs.frame <= (anim->firstFrame + anim->numFrames)) +ADDRLP4 952 +ADDRLP4 932 +INDIRP4 +CNSTI4 652 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 960 +ADDRLP4 928 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 952 +INDIRI4 +ADDRLP4 960 +INDIRI4 +LTI4 $626 +ADDRLP4 952 +INDIRI4 +ADDRLP4 960 +INDIRI4 +ADDRLP4 928 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +GTI4 $626 +line 1225 +;1225: { +line 1226 +;1226: setFrame = cent->pe.legs.frame; +ADDRLP4 940 +ADDRLP4 932 +INDIRP4 +CNSTI4 652 +ADDP4 +INDIRI4 +ASGNI4 +line 1227 +;1227: } +LABELV $626 +line 1230 +;1228: +;1229: //rww - Set the animation again because it just got reset due to the model change +;1230: trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); +ADDRLP4 800 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 944 +INDIRI4 +ARGI4 +ADDRLP4 928 +INDIRP4 +INDIRI4 +ADDRLP4 928 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 936 +INDIRI4 +ARGI4 +ADDRLP4 948 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 940 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1232 +;1231: +;1232: cg_entities[clientNum].currentState.legsAnim = 0; +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+280 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1233 +;1233: } +LABELV $622 +line 1235 +;1234: +;1235: anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.torsoAnim & ~ANIM_TOGGLEBIT) ]; +ADDRLP4 928 +CNSTI4 28 +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ASGNP4 +line 1237 +;1236: +;1237: if (anim) +ADDRLP4 928 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $631 +line 1238 +;1238: { +line 1239 +;1239: int flags = BONE_ANIM_OVERRIDE_FREEZE; +ADDRLP4 936 +CNSTI4 72 +ASGNI4 +line 1240 +;1240: int firstFrame = anim->firstFrame; +ADDRLP4 944 +ADDRLP4 928 +INDIRP4 +INDIRI4 +ASGNI4 +line 1241 +;1241: int setFrame = -1; +ADDRLP4 940 +CNSTI4 -1 +ASGNI4 +line 1242 +;1242: float animSpeed = 50.0f / anim->frameLerp; +ADDRLP4 948 +CNSTF4 1112014848 +ADDRLP4 928 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 1244 +;1243: +;1244: if (anim->loopFrames != -1) +ADDRLP4 928 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $633 +line 1245 +;1245: { +line 1246 +;1246: flags |= BONE_ANIM_OVERRIDE_LOOP; +ADDRLP4 936 +ADDRLP4 936 +INDIRI4 +CNSTI4 16 +BORI4 +ASGNI4 +line 1247 +;1247: } +LABELV $633 +line 1249 +;1248: +;1249: if (cent->pe.torso.frame >= anim->firstFrame && cent->pe.torso.frame <= (anim->firstFrame + anim->numFrames)) +ADDRLP4 952 +ADDRLP4 932 +INDIRP4 +CNSTI4 716 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 960 +ADDRLP4 928 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 952 +INDIRI4 +ADDRLP4 960 +INDIRI4 +LTI4 $635 +ADDRLP4 952 +INDIRI4 +ADDRLP4 960 +INDIRI4 +ADDRLP4 928 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +GTI4 $635 +line 1250 +;1250: { +line 1251 +;1251: setFrame = cent->pe.torso.frame; +ADDRLP4 940 +ADDRLP4 932 +INDIRP4 +CNSTI4 716 +ADDP4 +INDIRI4 +ASGNI4 +line 1252 +;1252: } +LABELV $635 +line 1255 +;1253: +;1254: //rww - Set the animation again because it just got reset due to the model change +;1255: trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "lower_lumbar", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); +ADDRLP4 800 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 944 +INDIRI4 +ARGI4 +ADDRLP4 928 +INDIRP4 +INDIRI4 +ADDRLP4 928 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 936 +INDIRI4 +ARGI4 +ADDRLP4 948 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 940 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1257 +;1256: +;1257: cg_entities[clientNum].currentState.torsoAnim = 0; +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+284 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1258 +;1258: } +LABELV $631 +line 1260 +;1259: +;1260: if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2)) +ADDRLP4 936 +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 936 +INDIRI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $639 +ADDRLP4 936 +INDIRI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 940 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 940 +INDIRI4 +CNSTI4 0 +EQI4 $639 +line 1261 +;1261: { +line 1262 +;1262: trap_G2API_CleanGhoul2Models(&cg_entities[clientNum].ghoul2); +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 1263 +;1263: } +LABELV $639 +line 1264 +;1264: trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2); +ADDRLP4 800 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_DuplicateGhoul2Instance +CALLV +pop +line 1265 +;1265: } +LABELV $619 +line 1266 +;1266:} +LABELV $512 +endproc CG_NewClientInfo 980 40 +data +export cgQueueLoad +align 4 +LABELV cgQueueLoad +byte 4 0 +export CG_ActualLoadDeferredPlayers +code +proc CG_ActualLoadDeferredPlayers 20 4 +line 1278 +;1267: +;1268: +;1269:qboolean cgQueueLoad = qfalse; +;1270:/* +;1271:====================== +;1272:CG_ActualLoadDeferredPlayers +;1273: +;1274:Called at the beginning of CG_Player if cgQueueLoad is set. +;1275:====================== +;1276:*/ +;1277:void CG_ActualLoadDeferredPlayers( void ) +;1278:{ +line 1283 +;1279: int i; +;1280: clientInfo_t *ci; +;1281: +;1282: // scan for a deferred player to load +;1283: for ( i = 0, ci = cgs.clientinfo ; i < cgs.maxclients ; i++, ci++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +ADDRGP4 cgs+43024 +ASGNP4 +ADDRGP4 $649 +JUMPV +LABELV $646 +line 1284 +;1284: if ( ci->infoValid && ci->deferred ) { +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $652 +ADDRLP4 0 +INDIRP4 +CNSTI4 448 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $652 +line 1286 +;1285: // if we are low on memory, leave it deferred +;1286: if ( trap_MemoryRemaining() < 4000000 ) { +ADDRLP4 16 +ADDRGP4 trap_MemoryRemaining +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 4000000 +GEI4 $654 +line 1287 +;1287: CG_Printf( "Memory is low. Using deferred model.\n" ); +ADDRGP4 $610 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 1288 +;1288: ci->deferred = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 448 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1289 +;1289: continue; +ADDRGP4 $647 +JUMPV +LABELV $654 +line 1291 +;1290: } +;1291: CG_LoadClientInfo( ci ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_LoadClientInfo +CALLV +pop +line 1293 +;1292:// break; +;1293: } +LABELV $652 +line 1294 +;1294: } +LABELV $647 +line 1283 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 788 +ADDP4 +ASGNP4 +LABELV $649 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cgs+32988 +INDIRI4 +LTI4 $646 +line 1295 +;1295:} +LABELV $645 +endproc CG_ActualLoadDeferredPlayers 20 4 +export CG_LoadDeferredPlayers +proc CG_LoadDeferredPlayers 0 0 +line 1306 +;1296: +;1297:/* +;1298:====================== +;1299:CG_LoadDeferredPlayers +;1300: +;1301:Called each frame when a player is dead +;1302:and the scoreboard is up +;1303:so deferred players can be loaded +;1304:====================== +;1305:*/ +;1306:void CG_LoadDeferredPlayers( void ) { +line 1307 +;1307: cgQueueLoad = qtrue; +ADDRGP4 cgQueueLoad +CNSTI4 1 +ASGNI4 +line 1308 +;1308:} +LABELV $656 +endproc CG_LoadDeferredPlayers 0 0 +export CG_InRoll +proc CG_InRoll 8 0 +line 1321 +;1309: +;1310:/* +;1311:============================================================================= +;1312: +;1313:PLAYER ANIMATION +;1314: +;1315:============================================================================= +;1316:*/ +;1317: +;1318:static qboolean CG_FirstAnimFrame(lerpFrame_t *lf, qboolean torsoOnly, float speedScale); +;1319: +;1320:qboolean CG_InRoll( centity_t *cent ) +;1321:{ +line 1322 +;1322: switch ( (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 885 +LTI4 $658 +ADDRLP4 0 +INDIRI4 +CNSTI4 888 +GTI4 $658 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $665-3540 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $665 +address $661 +address $661 +address $661 +address $661 +code +line 1323 +;1323: { +LABELV $661 +line 1328 +;1324: case BOTH_ROLL_F: +;1325: case BOTH_ROLL_B: +;1326: case BOTH_ROLL_R: +;1327: case BOTH_ROLL_L: +;1328: if ( cent->pe.legs.animationTime > cg.time ) +ADDRFP4 0 +INDIRP4 +CNSTI4 692 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $659 +line 1329 +;1329: { +line 1330 +;1330: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $657 +JUMPV +line 1332 +;1331: } +;1332: break; +LABELV $658 +LABELV $659 +line 1334 +;1333: } +;1334: return qfalse; +CNSTI4 0 +RETI4 +LABELV $657 +endproc CG_InRoll 8 0 +export CG_InRollAnim +proc CG_InRollAnim 8 0 +line 1338 +;1335:} +;1336: +;1337:qboolean CG_InRollAnim( centity_t *cent ) +;1338:{ +line 1339 +;1339: switch ( (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 885 +LTI4 $668 +ADDRLP4 0 +INDIRI4 +CNSTI4 888 +GTI4 $668 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $672-3540 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $672 +address $671 +address $671 +address $671 +address $671 +code +line 1340 +;1340: { +LABELV $671 +line 1345 +;1341: case BOTH_ROLL_F: +;1342: case BOTH_ROLL_B: +;1343: case BOTH_ROLL_R: +;1344: case BOTH_ROLL_L: +;1345: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $667 +JUMPV +LABELV $668 +line 1347 +;1346: } +;1347: return qfalse; +CNSTI4 0 +RETI4 +LABELV $667 +endproc CG_InRollAnim 8 0 +proc CG_SetLerpFrameAnimation 76 40 +line 1357 +;1348:} +;1349: +;1350:/* +;1351:=============== +;1352:CG_SetLerpFrameAnimation +;1353: +;1354:may include ANIM_TOGGLEBIT +;1355:=============== +;1356:*/ +;1357:static void CG_SetLerpFrameAnimation( centity_t *cent, clientInfo_t *ci, lerpFrame_t *lf, int newAnimation, float animSpeedMult, qboolean torsoOnly) { +line 1360 +;1358: animation_t *anim; +;1359: float animSpeed; +;1360: int flags=BONE_ANIM_OVERRIDE_FREEZE; +ADDRLP4 4 +CNSTI4 72 +ASGNI4 +line 1361 +;1361: int oldAnim = -1; +ADDRLP4 12 +CNSTI4 -1 +ASGNI4 +line 1362 +;1362: int blendTime = 150; +ADDRLP4 16 +CNSTI4 150 +ASGNI4 +line 1364 +;1363: +;1364: if (cent->currentState.number < MAX_CLIENTS && +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 32 +GEI4 $675 +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +EQI4 $675 +ADDRLP4 20 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $675 +line 1367 +;1365: cent->currentState.teamowner && +;1366: !cent->isATST) +;1367: { +line 1368 +;1368: return; +ADDRGP4 $674 +JUMPV +LABELV $675 +line 1371 +;1369: } +;1370: +;1371: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $677 +line 1372 +;1372: { +line 1376 +;1373: vec3_t testVel; +;1374: float fVel; +;1375: +;1376: if (lf->animationNumber == BOTH_RUN1 || +ADDRLP4 44 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 833 +EQI4 $684 +ADDRLP4 44 +INDIRI4 +CNSTI4 822 +EQI4 $684 +ADDRLP4 44 +INDIRI4 +CNSTI4 852 +EQI4 $684 +ADDRLP4 44 +INDIRI4 +CNSTI4 842 +EQI4 $684 +ADDRLP4 44 +INDIRI4 +CNSTI4 843 +NEI4 $679 +LABELV $684 +line 1381 +;1377: lf->animationNumber == BOTH_WALK1 || +;1378: lf->animationNumber == BOTH_WALKBACK1 || +;1379: lf->animationNumber == BOTH_TURN_LEFT1 || +;1380: lf->animationNumber == BOTH_TURN_RIGHT1) +;1381: { +line 1382 +;1382: if (cent->atstFootClang < cg.time) +ADDRFP4 0 +INDIRP4 +CNSTI4 1032 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $685 +line 1383 +;1383: { +line 1384 +;1384: if (rand() & 1) +ADDRLP4 48 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $688 +line 1385 +;1385: { +line 1386 +;1386: trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/chars/atst/ATSTstep1.wav")); +ADDRGP4 $690 +ARGP4 +ADDRLP4 52 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 52 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1387 +;1387: } +ADDRGP4 $689 +JUMPV +LABELV $688 +line 1389 +;1388: else +;1389: { +line 1390 +;1390: trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/chars/atst/ATSTstep2.wav")); +ADDRGP4 $691 +ARGP4 +ADDRLP4 52 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 52 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1391 +;1391: } +LABELV $689 +line 1393 +;1392: +;1393: cent->atstFootClang = cg.time + 1300; +ADDRFP4 0 +INDIRP4 +CNSTI4 1032 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1300 +ADDI4 +ASGNI4 +line 1394 +;1394: } +LABELV $685 +line 1395 +;1395: } +LABELV $679 +line 1397 +;1396: +;1397: VectorCopy(cent->currentState.pos.trDelta, testVel); +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRB +ASGNB 12 +line 1399 +;1398: +;1399: fVel = VectorNormalize(testVel); +ADDRLP4 28 +ARGP4 +ADDRLP4 48 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 40 +ADDRLP4 48 +INDIRF4 +ASGNF4 +line 1401 +;1400: +;1401: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $693 +line 1402 +;1402: { +line 1403 +;1403: if (lf->animationNumber != BOTH_DEATH1 && +ADDRLP4 52 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +EQI4 $695 +ADDRLP4 52 +INDIRI4 +CNSTI4 47 +EQI4 $695 +line 1405 +;1404: lf->animationNumber != BOTH_DEAD1) +;1405: { +line 1406 +;1406: trap_S_StartSound(NULL, cent->currentState.number, CHAN_BODY, trap_S_RegisterSound("sound/chars/atst/ATSTcrash.wav")); +ADDRGP4 $697 +ARGP4 +ADDRLP4 56 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1407 +;1407: } +LABELV $695 +line 1408 +;1408: newAnimation = BOTH_DEATH1; +ADDRFP4 12 +CNSTI4 1 +ASGNI4 +line 1409 +;1409: } +ADDRGP4 $694 +JUMPV +LABELV $693 +line 1410 +;1410: else if (fVel > 0) +ADDRLP4 40 +INDIRF4 +CNSTF4 0 +LEF4 $698 +line 1411 +;1411: { +line 1412 +;1412: qboolean doNotSet = qfalse; +ADDRLP4 52 +CNSTI4 0 +ASGNI4 +line 1414 +;1413: +;1414: if (fVel > 250) +ADDRLP4 40 +INDIRF4 +CNSTF4 1132068864 +LEF4 $700 +line 1415 +;1415: { +line 1416 +;1416: animSpeedMult = 1.2; +ADDRFP4 16 +CNSTF4 1067030938 +ASGNF4 +line 1417 +;1417: } +ADDRGP4 $701 +JUMPV +LABELV $700 +line 1418 +;1418: else if (fVel > 200) +ADDRLP4 40 +INDIRF4 +CNSTF4 1128792064 +LEF4 $702 +line 1419 +;1419: { +line 1420 +;1420: animSpeedMult = 1; +ADDRFP4 16 +CNSTF4 1065353216 +ASGNF4 +line 1421 +;1421: } +ADDRGP4 $703 +JUMPV +LABELV $702 +line 1422 +;1422: else if (fVel > 100) +ADDRLP4 40 +INDIRF4 +CNSTF4 1120403456 +LEF4 $704 +line 1423 +;1423: { +line 1424 +;1424: animSpeedMult = 0.9; +ADDRFP4 16 +CNSTF4 1063675494 +ASGNF4 +line 1425 +;1425: } +ADDRGP4 $705 +JUMPV +LABELV $704 +line 1426 +;1426: else if (fVel > 0) +ADDRLP4 40 +INDIRF4 +CNSTF4 0 +LEF4 $706 +line 1427 +;1427: { +line 1428 +;1428: animSpeedMult = 0.8; +ADDRFP4 16 +CNSTF4 1061997773 +ASGNF4 +line 1429 +;1429: } +ADDRGP4 $707 +JUMPV +LABELV $706 +line 1431 +;1430: else +;1431: { +line 1432 +;1432: doNotSet = qtrue; +ADDRLP4 52 +CNSTI4 1 +ASGNI4 +line 1433 +;1433: } +LABELV $707 +LABELV $705 +LABELV $703 +LABELV $701 +line 1435 +;1434: +;1435: if (!doNotSet) +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +NEI4 $699 +line 1436 +;1436: { +line 1437 +;1437: if ((cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN1 || +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 833 +EQI4 $713 +ADDRLP4 56 +INDIRI4 +CNSTI4 852 +EQI4 $713 +ADDRLP4 56 +INDIRI4 +CNSTI4 822 +NEI4 $710 +LABELV $713 +line 1440 +;1438: (cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_WALKBACK1 || +;1439: (cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_WALK1) +;1440: { +line 1441 +;1441: newAnimation = (cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT); +ADDRFP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 1442 +;1442: } +ADDRGP4 $699 +JUMPV +LABELV $710 +line 1444 +;1443: else +;1444: { +line 1445 +;1445: newAnimation = BOTH_RUN1; +ADDRFP4 12 +CNSTI4 833 +ASGNI4 +line 1446 +;1446: } +line 1447 +;1447: } +line 1448 +;1448: } +ADDRGP4 $699 +JUMPV +LABELV $698 +line 1449 +;1449: else if ((cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN1START) +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +CNSTI4 834 +NEI4 $714 +line 1450 +;1450: { +line 1451 +;1451: if (lf->animationNumber != BOTH_RUN1START) +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 834 +EQI4 $716 +line 1452 +;1452: { +line 1453 +;1453: trap_S_StartSound(NULL, cent->currentState.number, CHAN_BODY, trap_S_RegisterSound("sound/chars/atst/ATSTstart.wav")); +ADDRGP4 $718 +ARGP4 +ADDRLP4 52 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 52 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1454 +;1454: cent->atstFootClang = cg.time + 650; +ADDRFP4 0 +INDIRP4 +CNSTI4 1032 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 650 +ADDI4 +ASGNI4 +line 1455 +;1455: } +LABELV $716 +line 1456 +;1456: newAnimation = BOTH_RUN1START; +ADDRFP4 12 +CNSTI4 834 +ASGNI4 +line 1457 +;1457: } +ADDRGP4 $715 +JUMPV +LABELV $714 +line 1458 +;1458: else if (cent->pe.legs.yawing && +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 668 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $720 +ADDRLP4 56 +ADDRLP4 52 +INDIRP4 +CNSTI4 680 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 56 +INDIRF4 +CNSTF4 3248488448 +LTF4 $722 +ADDRLP4 56 +INDIRF4 +CNSTF4 1101004800 +LEF4 $720 +LABELV $722 +line 1460 +;1459: (cent->pe.legs.yawSwingDif < -20 || cent->pe.legs.yawSwingDif > 20)) +;1460: { +line 1461 +;1461: if (cent->pe.legs.yawSwingDif > 0) +ADDRFP4 0 +INDIRP4 +CNSTI4 680 +ADDP4 +INDIRF4 +CNSTF4 0 +LEF4 $723 +line 1462 +;1462: { +line 1463 +;1463: newAnimation = BOTH_TURN_LEFT1;//BOTH_RUN1; +ADDRFP4 12 +CNSTI4 842 +ASGNI4 +line 1464 +;1464: if (lf->animationNumber != BOTH_TURN_LEFT1) +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 842 +EQI4 $724 +line 1465 +;1465: { +line 1466 +;1466: cent->atstFootClang = cg.time + 500; +ADDRFP4 0 +INDIRP4 +CNSTI4 1032 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 500 +ADDI4 +ASGNI4 +line 1467 +;1467: } +line 1468 +;1468: } +ADDRGP4 $724 +JUMPV +LABELV $723 +line 1470 +;1469: else +;1470: { +line 1471 +;1471: newAnimation = BOTH_TURN_RIGHT1;//BOTH_RUN1; +ADDRFP4 12 +CNSTI4 843 +ASGNI4 +line 1472 +;1472: if (lf->animationNumber != BOTH_TURN_RIGHT1) +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 843 +EQI4 $728 +line 1473 +;1473: { +line 1474 +;1474: cent->atstFootClang = cg.time + 500; +ADDRFP4 0 +INDIRP4 +CNSTI4 1032 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 500 +ADDI4 +ASGNI4 +line 1475 +;1475: } +LABELV $728 +line 1476 +;1476: } +LABELV $724 +line 1477 +;1477: animSpeedMult = 0.7; +ADDRFP4 16 +CNSTF4 1060320051 +ASGNF4 +line 1478 +;1478: } +ADDRGP4 $721 +JUMPV +LABELV $720 +line 1480 +;1479: else +;1480: { +line 1481 +;1481: newAnimation = BOTH_STAND1; +ADDRFP4 12 +CNSTI4 571 +ASGNI4 +line 1482 +;1482: } +LABELV $721 +LABELV $715 +LABELV $699 +LABELV $694 +line 1484 +;1483: +;1484: if (newAnimation != BOTH_STAND1 && newAnimation != BOTH_RUN1 && +ADDRLP4 60 +ADDRFP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 571 +EQI4 $731 +ADDRLP4 60 +INDIRI4 +CNSTI4 833 +EQI4 $731 +ADDRLP4 60 +INDIRI4 +CNSTI4 834 +EQI4 $731 +ADDRLP4 60 +INDIRI4 +CNSTI4 822 +EQI4 $731 +ADDRLP4 60 +INDIRI4 +CNSTI4 852 +EQI4 $731 +ADDRLP4 60 +INDIRI4 +CNSTI4 1 +EQI4 $731 +ADDRLP4 60 +INDIRI4 +CNSTI4 47 +EQI4 $731 +ADDRLP4 60 +INDIRI4 +CNSTI4 843 +EQI4 $731 +ADDRLP4 60 +INDIRI4 +CNSTI4 842 +EQI4 $731 +ADDRLP4 60 +INDIRI4 +CNSTI4 97 +EQI4 $731 +ADDRLP4 60 +INDIRI4 +CNSTI4 98 +EQI4 $731 +line 1490 +;1485: newAnimation != BOTH_RUN1START && newAnimation != BOTH_WALK1 && +;1486: newAnimation != BOTH_WALKBACK1 && newAnimation != BOTH_DEATH1 && +;1487: newAnimation != BOTH_DEAD1 && newAnimation != BOTH_TURN_RIGHT1 && +;1488: newAnimation != BOTH_TURN_LEFT1 && newAnimation != BOTH_PAIN1 && +;1489: newAnimation != BOTH_PAIN2) +;1490: { //not a valid anim for the ATST.. +line 1491 +;1491: newAnimation = BOTH_RUN1; +ADDRFP4 12 +CNSTI4 833 +ASGNI4 +line 1492 +;1492: } +LABELV $731 +line 1494 +;1493: +;1494: if (lf->animationNumber == newAnimation) +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ADDRFP4 12 +INDIRI4 +NEI4 $733 +line 1495 +;1495: { +line 1496 +;1496: return; +ADDRGP4 $674 +JUMPV +LABELV $733 +line 1498 +;1497: } +;1498: } +LABELV $677 +line 1500 +;1499: +;1500: oldAnim = lf->animationNumber; +ADDRLP4 12 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +line 1502 +;1501: +;1502: lf->animationNumber = newAnimation; +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRFP4 12 +INDIRI4 +ASGNI4 +line 1503 +;1503: newAnimation &= ~ANIM_TOGGLEBIT; +ADDRFP4 12 +ADDRFP4 12 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 1505 +;1504: +;1505: if ( newAnimation < 0 || newAnimation >= MAX_TOTALANIMATIONS ) { +ADDRLP4 28 +ADDRFP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +LTI4 $737 +ADDRLP4 28 +INDIRI4 +CNSTI4 1211 +LTI4 $735 +LABELV $737 +line 1506 +;1506: CG_Error( "Bad animation number: %i", newAnimation ); +ADDRGP4 $738 +ARGP4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRGP4 CG_Error +CALLV +pop +line 1507 +;1507: } +LABELV $735 +line 1509 +;1508: +;1509: anim = &bgGlobalAnimations[ newAnimation ]; +ADDRLP4 0 +CNSTI4 28 +ADDRFP4 12 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ASGNP4 +line 1511 +;1510: +;1511: lf->animation = anim; +ADDRFP4 8 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1512 +;1512: lf->animationTime = lf->frameTime + anim->initialLerp; +ADDRLP4 32 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 1514 +;1513: +;1514: if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRLP4 36 +INDIRI4 +EQI4 $739 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRLP4 36 +INDIRI4 +LTI4 $744 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +NEI4 $739 +LABELV $744 +line 1515 +;1515: CG_Printf( "%d: %d Anim: %i, '%s'\n", cg.time, cent->currentState.clientNum, newAnimation, GetStringForID(animTable, newAnimation)); +ADDRGP4 animTable +ARGP4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRLP4 40 +ADDRGP4 GetStringForID +CALLP4 +ASGNP4 +ADDRGP4 $745 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 1516 +;1516: } +LABELV $739 +line 1518 +;1517: +;1518: if (cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $747 +line 1519 +;1519: { +line 1520 +;1520: animSpeed = 50.0f / anim->frameLerp; +ADDRLP4 8 +CNSTF4 1112014848 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 1521 +;1521: if (lf->animation->loopFrames != -1) +ADDRFP4 8 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $749 +line 1522 +;1522: { +line 1523 +;1523: flags = BONE_ANIM_OVERRIDE_LOOP; +ADDRLP4 4 +CNSTI4 16 +ASGNI4 +line 1524 +;1524: } +LABELV $749 +line 1526 +;1525: +;1526: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $751 +line 1527 +;1527: { +line 1528 +;1528: if (animSpeed < 0.3) +ADDRLP4 8 +INDIRF4 +CNSTF4 1050253722 +GEF4 $753 +line 1529 +;1529: { +line 1530 +;1530: animSpeed = 0.3; +ADDRLP4 8 +CNSTF4 1050253722 +ASGNF4 +line 1531 +;1531: } +LABELV $753 +line 1533 +;1532: +;1533: if (newAnimation == BOTH_WALKBACK1) +ADDRFP4 12 +INDIRI4 +CNSTI4 852 +NEI4 $755 +line 1534 +;1534: { +line 1535 +;1535: animSpeed = 0.8; +ADDRLP4 8 +CNSTF4 1061997773 +ASGNF4 +line 1536 +;1536: } +LABELV $755 +line 1538 +;1537: +;1538: if (newAnimation != BOTH_DEATH1) +ADDRFP4 12 +INDIRI4 +CNSTI4 1 +EQI4 $757 +line 1539 +;1539: { +line 1540 +;1540: flags = BONE_ANIM_OVERRIDE_LOOP; +ADDRLP4 4 +CNSTI4 16 +ASGNI4 +line 1541 +;1541: } +LABELV $757 +line 1542 +;1542: } +LABELV $751 +line 1544 +;1543: +;1544: if (cg_animBlend.integer) +ADDRGP4 cg_animBlend+12 +INDIRI4 +CNSTI4 0 +EQI4 $759 +line 1545 +;1545: { +line 1546 +;1546: flags |= BONE_ANIM_BLEND; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 128 +BORI4 +ASGNI4 +line 1547 +;1547: } +LABELV $759 +line 1549 +;1548: +;1549: if (!cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $762 +line 1550 +;1550: { +line 1551 +;1551: if (/*BG_FlippingAnim(newAnimation) ||*/ BG_InDeathAnim(newAnimation)) +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRLP4 40 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $764 +line 1552 +;1552: { +line 1553 +;1553: flags &= ~BONE_ANIM_BLEND; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 -129 +BANDI4 +ASGNI4 +line 1554 +;1554: } +ADDRGP4 $765 +JUMPV +LABELV $764 +line 1555 +;1555: else if ( oldAnim != -1 && +ADDRLP4 44 +ADDRLP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 -1 +EQI4 $766 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 48 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +EQI4 $766 +line 1557 +;1556: (/*BG_FlippingAnim(oldAnim) ||*/ BG_InDeathAnim(oldAnim)) ) +;1557: { +line 1558 +;1558: flags &= ~BONE_ANIM_BLEND; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 -129 +BANDI4 +ASGNI4 +line 1559 +;1559: } +LABELV $766 +LABELV $765 +line 1561 +;1560: +;1561: if (flags & BONE_ANIM_BLEND) +ADDRLP4 4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $768 +line 1562 +;1562: { +line 1563 +;1563: if (BG_FlippingAnim(newAnimation)) +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRLP4 52 +ADDRGP4 BG_FlippingAnim +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +EQI4 $770 +line 1564 +;1564: { +line 1565 +;1565: blendTime = 200; +ADDRLP4 16 +CNSTI4 200 +ASGNI4 +line 1566 +;1566: } +ADDRGP4 $771 +JUMPV +LABELV $770 +line 1567 +;1567: else if ( oldAnim != -1 && +ADDRLP4 56 +ADDRLP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 -1 +EQI4 $772 +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRLP4 60 +ADDRGP4 BG_FlippingAnim +CALLI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 0 +EQI4 $772 +line 1569 +;1568: (BG_FlippingAnim(oldAnim)) ) +;1569: { +line 1570 +;1570: blendTime = 200; +ADDRLP4 16 +CNSTI4 200 +ASGNI4 +line 1571 +;1571: } +LABELV $772 +LABELV $771 +line 1572 +;1572: } +LABELV $768 +line 1573 +;1573: } +LABELV $762 +line 1575 +;1574: +;1575: animSpeed *= animSpeedMult; +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRFP4 16 +INDIRF4 +MULF4 +ASGNF4 +line 1577 +;1576: +;1577: BG_SaberStartTransAnim(cent->currentState.fireflag, newAnimation, &animSpeed); +ADDRFP4 0 +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRLP4 8 +ARGP4 +ADDRGP4 BG_SaberStartTransAnim +CALLV +pop +line 1579 +;1578: +;1579: if (torsoOnly) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $774 +line 1580 +;1580: { +line 1581 +;1581: lf->animationTorsoSpeed = animSpeedMult; +ADDRFP4 8 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDRFP4 16 +INDIRF4 +ASGNF4 +line 1582 +;1582: } +ADDRGP4 $775 +JUMPV +LABELV $774 +line 1584 +;1583: else +;1584: { +line 1585 +;1585: lf->animationSpeed = animSpeedMult; +ADDRFP4 8 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRFP4 16 +INDIRF4 +ASGNF4 +line 1586 +;1586: } +LABELV $775 +line 1588 +;1587: +;1588: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $776 +line 1589 +;1589: { +line 1590 +;1590: int atstBlend = 400; +ADDRLP4 40 +CNSTI4 400 +ASGNI4 +line 1592 +;1591: +;1592: if (torsoOnly) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $778 +line 1593 +;1593: { +line 1594 +;1594: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "pelvis", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $295 +ARGP4 +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1595 +;1595: } +ADDRGP4 $777 +JUMPV +LABELV $778 +line 1597 +;1596: else +;1597: { +line 1598 +;1598: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1599 +;1599: } +line 1600 +;1600: } +ADDRGP4 $777 +JUMPV +LABELV $776 +line 1602 +;1601: else +;1602: { +line 1603 +;1603: int beginFrame = anim->firstFrame; +ADDRLP4 40 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +line 1605 +;1604: +;1605: if (torsoOnly) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $782 +line 1606 +;1606: { +line 1607 +;1607: if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && cent->pe.legs.frame >= anim->firstFrame && cent->pe.legs.frame <= (anim->firstFrame + anim->numFrames)) +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 48 +CNSTI4 -2049 +ASGNI4 +ADDRLP4 44 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +BANDI4 +ADDRLP4 44 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +BANDI4 +NEI4 $784 +ADDRLP4 52 +ADDRLP4 44 +INDIRP4 +CNSTI4 652 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 60 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +ADDRLP4 60 +INDIRI4 +LTI4 $784 +ADDRLP4 52 +INDIRI4 +ADDRLP4 60 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +GTI4 $784 +line 1608 +;1608: { +line 1609 +;1609: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "lower_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed,cg.time, cent->pe.legs.frame, blendTime); +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 72 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +ARGI4 +ADDRLP4 72 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 652 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1610 +;1610: beginFrame = cent->pe.legs.frame; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +INDIRI4 +ASGNI4 +line 1611 +;1611: } +ADDRGP4 $785 +JUMPV +LABELV $784 +line 1613 +;1612: else +;1613: { +line 1614 +;1614: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "lower_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed,cg.time, -1, blendTime); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 68 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +ARGI4 +ADDRLP4 68 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1615 +;1615: } +LABELV $785 +line 1616 +;1616: cgs.clientinfo[cent->currentState.number].torsoAnim = newAnimation; +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+784 +ADDP4 +ADDRFP4 12 +INDIRI4 +ASGNI4 +line 1617 +;1617: } +ADDRGP4 $783 +JUMPV +LABELV $782 +line 1619 +;1618: else +;1619: { +line 1620 +;1620: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1622 +;1621: //cgs.clientinfo[cent->currentState.number].torsoAnim = newAnimation; +;1622: cgs.clientinfo[cent->currentState.number].legsAnim = newAnimation; +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +ADDRFP4 12 +INDIRI4 +ASGNI4 +line 1623 +;1623: } +LABELV $783 +line 1625 +;1624: +;1625: if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation) +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ADDRFP4 12 +INDIRI4 +NEI4 $793 +line 1626 +;1626: { +line 1627 +;1627: if (beginFrame != anim->firstFrame) +ADDRLP4 40 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +EQI4 $795 +line 1628 +;1628: { +line 1629 +;1629: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, beginFrame, blendTime); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $311 +ARGP4 +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1630 +;1630: } +ADDRGP4 $796 +JUMPV +LABELV $795 +line 1632 +;1631: else +;1632: { +line 1633 +;1633: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $311 +ARGP4 +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1634 +;1634: } +LABELV $796 +line 1635 +;1635: } +LABELV $793 +line 1636 +;1636: } +LABELV $777 +line 1637 +;1637: } +LABELV $747 +line 1638 +;1638:} +LABELV $674 +endproc CG_SetLerpFrameAnimation 76 40 +proc CG_FirstAnimFrame 4 0 +line 1654 +;1639: +;1640: +;1641:/* +;1642:=============== +;1643:CG_FirstAnimFrame +;1644: +;1645:Returns true if the lerpframe is on its first frame of animation. +;1646:Otherwise false. +;1647: +;1648:This is used to scale an animation into higher-speed without restarting +;1649:the animation before it completes at normal speed, in the case of a looping +;1650:animation (such as the leg running anim). +;1651:=============== +;1652:*/ +;1653:static qboolean CG_FirstAnimFrame(lerpFrame_t *lf, qboolean torsoOnly, float speedScale) +;1654:{ +line 1655 +;1655: if (torsoOnly) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $800 +line 1656 +;1656: { +line 1657 +;1657: if (lf->animationTorsoSpeed == speedScale) +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +NEF4 $801 +line 1658 +;1658: { +line 1659 +;1659: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $799 +JUMPV +line 1661 +;1660: } +;1661: } +LABELV $800 +line 1663 +;1662: else +;1663: { +line 1664 +;1664: if (lf->animationSpeed == speedScale) +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +NEF4 $804 +line 1665 +;1665: { +line 1666 +;1666: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $799 +JUMPV +LABELV $804 +line 1668 +;1667: } +;1668: } +LABELV $801 +line 1670 +;1669: +;1670: if (lf->animation->numFrames < 2) +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 2 +GEI4 $806 +line 1671 +;1671: { +line 1672 +;1672: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $799 +JUMPV +LABELV $806 +line 1675 +;1673: } +;1674: +;1675: if (lf->animation->firstFrame == lf->frame) +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +NEI4 $808 +line 1676 +;1676: { +line 1677 +;1677: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $799 +JUMPV +LABELV $808 +line 1680 +;1678: } +;1679: +;1680: return qfalse; +CNSTI4 0 +RETI4 +LABELV $799 +endproc CG_FirstAnimFrame 4 0 +export CG_InWalkingAnim +proc CG_InWalkingAnim 20 0 +line 1692 +;1681:} +;1682: +;1683:/* +;1684:=============== +;1685:CG_InWalkingAnim +;1686: +;1687:Returns last frame to step on if the animation on the frame is desired for playing footstep sounds, +;1688:otherwise 0 +;1689:=============== +;1690:*/ +;1691:int CG_InWalkingAnim(int animNum) +;1692:{ +line 1693 +;1693: int anim = animNum; +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1695 +;1694: +;1695: anim &= ~ANIM_TOGGLEBIT; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 1697 +;1696: +;1697: if (anim == BOTH_WALL_RUN_RIGHT || +ADDRLP4 0 +INDIRI4 +CNSTI4 915 +EQI4 $813 +ADDRLP4 0 +INDIRI4 +CNSTI4 918 +NEI4 $811 +LABELV $813 +line 1699 +;1698: anim == BOTH_WALL_RUN_LEFT) +;1699: { +line 1700 +;1700: return 8; +CNSTI4 8 +RETI4 +ADDRGP4 $810 +JUMPV +LABELV $811 +line 1703 +;1701: } +;1702: +;1703: if (anim >= BOTH_WALK1 && +ADDRLP4 0 +INDIRI4 +CNSTI4 822 +LTI4 $814 +ADDRLP4 0 +INDIRI4 +CNSTI4 850 +GTI4 $814 +line 1705 +;1704: anim <= BOTH_RUNAWAY1) +;1705: { +line 1706 +;1706: if (anim == BOTH_RUN1) +ADDRLP4 0 +INDIRI4 +CNSTI4 833 +NEI4 $816 +line 1707 +;1707: { +line 1708 +;1708: return 18;//12; +CNSTI4 18 +RETI4 +ADDRGP4 $810 +JUMPV +LABELV $816 +line 1711 +;1709: } +;1710: else +;1711: { +line 1713 +;1712: //return 9; +;1713: return 18; +CNSTI4 18 +RETI4 +ADDRGP4 $810 +JUMPV +LABELV $814 +line 1717 +;1714: } +;1715: } +;1716: +;1717: if (anim >= BOTH_WALKBACK1 && +ADDRLP4 0 +INDIRI4 +CNSTI4 852 +LTI4 $818 +ADDRLP4 0 +INDIRI4 +CNSTI4 855 +GTI4 $818 +line 1719 +;1718: anim <= BOTH_RUNBACK2) +;1719: { +line 1720 +;1720: if (anim == BOTH_WALKBACK1) +ADDRLP4 0 +INDIRI4 +CNSTI4 852 +NEI4 $820 +line 1721 +;1721: { +line 1722 +;1722: return 18; +CNSTI4 18 +RETI4 +ADDRGP4 $810 +JUMPV +LABELV $820 +line 1725 +;1723: } +;1724: else +;1725: { +line 1726 +;1726: return 9; +CNSTI4 9 +RETI4 +ADDRGP4 $810 +JUMPV +LABELV $818 +line 1730 +;1727: } +;1728: } +;1729: +;1730: if (anim >= LEGS_WALKBACK1 && +ADDRLP4 0 +INDIRI4 +CNSTI4 1139 +LTI4 $822 +ADDRLP4 0 +INDIRI4 +CNSTI4 1142 +GTI4 $822 +line 1732 +;1731: anim <= LEGS_RUNBACK2) +;1732: { +line 1733 +;1733: if (anim == LEGS_WALKBACK1) +ADDRLP4 0 +INDIRI4 +CNSTI4 1139 +NEI4 $824 +line 1734 +;1734: { +line 1735 +;1735: return 18; +CNSTI4 18 +RETI4 +ADDRGP4 $810 +JUMPV +LABELV $824 +line 1738 +;1736: } +;1737: else +;1738: { +line 1739 +;1739: return 9; +CNSTI4 9 +RETI4 +ADDRGP4 $810 +JUMPV +LABELV $822 +line 1743 +;1740: } +;1741: } +;1742: +;1743: return qfalse; +CNSTI4 0 +RETI4 +LABELV $810 +endproc CG_InWalkingAnim 20 0 +lit +align 4 +LABELV $827 +byte 4 3245342720 +byte 4 3245342720 +byte 4 3250585600 +align 4 +LABELV $828 +byte 4 1097859072 +byte 4 1097859072 +byte 4 1109393408 +code +proc CG_FootstepForSurface 1204 36 +line 1750 +;1744:} +;1745: +;1746:#define FOOTSTEP_GENERIC 1 +;1747:#define FOOTSTEP_METAL 2 +;1748: +;1749:static int CG_FootstepForSurface( centity_t *cent, int skip ) +;1750:{ +line 1753 +;1751: trace_t tr; +;1752: vec3_t org, dOrg, legDir, bAngles; +;1753: vec3_t playerMins = {-15, -15, DEFAULT_MINS_2}; +ADDRLP4 1176 +ADDRGP4 $827 +INDIRB +ASGNB 12 +line 1754 +;1754: vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; +ADDRLP4 1188 +ADDRGP4 $828 +INDIRB +ASGNB 12 +line 1764 +;1755: mdxaBone_t boltMatrix; +;1756: +;1757:// VectorCopy(ent->lerpOrigin, org); +;1758:// VectorCopy(org, dOrg); +;1759:// dOrg[2] -= 64; //should never have to go further than this because we're already onground +;1760: +;1761: //We are now tracing off of a bolt point for footsteps, so that if we happen to be walking sideways on a wall we will +;1762: //still play step sounds properly. +;1763: +;1764: VectorCopy(cent->lerpAngles, bAngles); +ADDRLP4 1116 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 1765 +;1765: bAngles[PITCH] = 0; +ADDRLP4 1116 +CNSTF4 0 +ASGNF4 +line 1767 +;1766: +;1767: trap_G2API_GetBoltMatrix_NoReconstruct( cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_llumbar, &boltMatrix, bAngles, cent->lerpOrigin, cg.time, /*cgs.gameModels*/0, cent->modelScale); +ADDRLP4 1200 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 788 +ADDRLP4 1200 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+528 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1128 +ARGP4 +ADDRLP4 1116 +ARGP4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTP4 0 +ARGP4 +ADDRLP4 1200 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix_NoReconstruct +CALLI4 +pop +line 1768 +;1768: trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, ORIGIN, org ); +ADDRLP4 1128 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 1769 +;1769: trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, legDir ); +ADDRLP4 1128 +ARGP4 +CNSTI4 6 +ARGI4 +ADDRLP4 1104 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 1771 +;1770: +;1771: dOrg[0] = org[0] + legDir[0]*64; +ADDRLP4 1092 +ADDRLP4 0 +INDIRF4 +CNSTF4 1115684864 +ADDRLP4 1104 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1772 +;1772: dOrg[1] = org[1] + legDir[1]*64; +ADDRLP4 1092+4 +ADDRLP4 0+4 +INDIRF4 +CNSTF4 1115684864 +ADDRLP4 1104+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1773 +;1773: dOrg[2] = org[2] + legDir[2]*64; +ADDRLP4 1092+8 +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1115684864 +ADDRLP4 1104+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1777 +;1774: +;1775: //CG_TestLine(org, dOrg, 100, 0x0000ff, 3); +;1776: +;1777: CG_Trace(&tr, org, playerMins, playerMaxs, dOrg, skip, MASK_PLAYERSOLID); +ADDRLP4 12 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1176 +ARGP4 +ADDRLP4 1188 +ARGP4 +ADDRLP4 1092 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +CNSTI4 273 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 1779 +;1778: +;1779: if (tr.fraction == 1) +ADDRLP4 12+8 +INDIRF4 +CNSTF4 1065353216 +NEF4 $838 +line 1780 +;1780: { +line 1781 +;1781: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $826 +JUMPV +LABELV $838 +line 1784 +;1782: } +;1783: +;1784: if ( tr.surfaceFlags & SURF_NOSTEPS ) +ADDRLP4 12+44 +INDIRI4 +CNSTI4 4194304 +BANDI4 +CNSTI4 0 +EQI4 $841 +line 1785 +;1785: { +line 1786 +;1786: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $826 +JUMPV +LABELV $841 +line 1789 +;1787: } +;1788: +;1789: if ( tr.surfaceFlags & SURF_METALSTEPS ) +ADDRLP4 12+44 +INDIRI4 +CNSTI4 32768 +BANDI4 +CNSTI4 0 +EQI4 $844 +line 1790 +;1790: { +line 1791 +;1791: return FOOTSTEP_METAL; +CNSTI4 2 +RETI4 +ADDRGP4 $826 +JUMPV +LABELV $844 +line 1794 +;1792: } +;1793: +;1794: return FOOTSTEP_GENERIC; +CNSTI4 1 +RETI4 +LABELV $826 +endproc CG_FootstepForSurface 1204 36 +export CG_FootStep +proc CG_FootStep 28 16 +line 1798 +;1795:} +;1796: +;1797:void CG_FootStep(centity_t *cent, clientInfo_t *ci, int anim) +;1798:{ +line 1801 +;1799: int groundType; +;1800: +;1801: if ((anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || +ADDRLP4 4 +ADDRFP4 8 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 915 +EQI4 $850 +ADDRLP4 4 +INDIRI4 +CNSTI4 918 +NEI4 $848 +LABELV $850 +line 1803 +;1802: (anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) +;1803: { +line 1804 +;1804: groundType = FOOTSTEP_GENERIC; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 1805 +;1805: goto skipCheck; +ADDRGP4 $851 +JUMPV +LABELV $848 +line 1808 +;1806: } +;1807: +;1808: if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) +ADDRFP4 0 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +CNSTI4 1023 +NEI4 $852 +line 1809 +;1809: { +line 1810 +;1810: return; +ADDRGP4 $847 +JUMPV +LABELV $852 +LABELV $851 +line 1814 +;1811: } +;1812: +;1813:skipCheck: +;1814: groundType = CG_FootstepForSurface(cent, cent->currentState.number); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 CG_FootstepForSurface +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 1818 +;1815: +;1816://skipCheck: +;1817: +;1818: if (!groundType) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $854 +line 1819 +;1819: { +line 1820 +;1820: return; +ADDRGP4 $847 +JUMPV +LABELV $854 +line 1823 +;1821: } +;1822: +;1823: switch (groundType) +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +EQI4 $858 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +EQI4 $861 +ADDRGP4 $857 +JUMPV +line 1824 +;1824: { +LABELV $858 +line 1826 +;1825: case FOOTSTEP_GENERIC: +;1826: trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, +ADDRLP4 20 +ADDRGP4 rand +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 476 +ADDP4 +INDIRI4 +CNSTI4 4 +LSHI4 +ADDRGP4 cgs+70296+604 +ADDP4 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1828 +;1827: cgs.media.footsteps[ ci->footsteps ][rand()&3] ); +;1828: break; +ADDRGP4 $857 +JUMPV +LABELV $861 +line 1830 +;1829: case FOOTSTEP_METAL: +;1830: trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, +ADDRLP4 24 +ADDRGP4 rand +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+604+32 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1832 +;1831: cgs.media.footsteps[ FOOTSTEP_METAL ][rand()&3] ); +;1832: break; +line 1834 +;1833: default: +;1834: break; +LABELV $857 +line 1836 +;1835: } +;1836:} +LABELV $847 +endproc CG_FootStep 28 16 +proc CG_RunLerpFrame 76 40 +line 1846 +;1837:/* +;1838:=============== +;1839:CG_RunLerpFrame +;1840: +;1841:Sets cg.snap, cg.oldFrame, and cg.backlerp +;1842:cg.time should be between oldFrameTime and frameTime after exit +;1843:=============== +;1844:*/ +;1845:static void CG_RunLerpFrame( centity_t *cent, clientInfo_t *ci, lerpFrame_t *lf, int newAnimation, float speedScale, qboolean torsoOnly) +;1846:{ +line 1851 +;1847: int f, numFrames; +;1848: animation_t *anim; +;1849: +;1850: // debugging tool to get no animations +;1851: if ( cg_animSpeed.integer == 0 ) { +ADDRGP4 cg_animSpeed+12 +INDIRI4 +CNSTI4 0 +NEI4 $866 +line 1852 +;1852: lf->oldFrame = lf->frame = lf->backlerp = 0; +ADDRLP4 12 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTF4 0 +ASGNF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 16 +INDIRF4 +CVFI4 4 +ASGNI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 1853 +;1853: return; +ADDRGP4 $865 +JUMPV +LABELV $866 +line 1857 +;1854: } +;1855: +;1856: // see if the animation sequence is switching +;1857: if (cent->currentState.forceFrame) +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $869 +line 1858 +;1858: { +line 1859 +;1859: int flags = BONE_ANIM_OVERRIDE_FREEZE; //|BONE_ANIM_BLEND; +ADDRLP4 12 +CNSTI4 72 +ASGNI4 +line 1860 +;1860: float animSpeed = 1.0f; +ADDRLP4 16 +CNSTF4 1065353216 +ASGNF4 +line 1861 +;1861: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "lower_lumbar", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 24 +ADDRLP4 20 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1862 +;1862: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 32 +ADDRLP4 28 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1863 +;1863: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $311 +ARGP4 +ADDRLP4 40 +ADDRLP4 36 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 1865 +;1864: +;1865: lf->animationNumber = 0; +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1866 +;1866: } +ADDRGP4 $870 +JUMPV +LABELV $869 +line 1867 +;1867: else if ( (newAnimation != lf->animationNumber || !lf->animation) || (CG_FirstAnimFrame(lf, torsoOnly, speedScale)) ) +ADDRLP4 12 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRFP4 12 +INDIRI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +NEI4 $876 +ADDRLP4 12 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $876 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRFP4 20 +INDIRI4 +ARGI4 +ADDRFP4 16 +INDIRF4 +ARGF4 +ADDRLP4 16 +ADDRGP4 CG_FirstAnimFrame +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $874 +LABELV $876 +line 1868 +;1868: { +line 1869 +;1869: CG_SetLerpFrameAnimation( cent, ci, lf, newAnimation, speedScale, torsoOnly); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRFP4 16 +INDIRF4 +ARGF4 +ADDRFP4 20 +INDIRI4 +ARGI4 +ADDRGP4 CG_SetLerpFrameAnimation +CALLV +pop +line 1870 +;1870: } +ADDRGP4 $875 +JUMPV +LABELV $874 +line 1871 +;1871: else if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $877 +line 1872 +;1872: { +line 1873 +;1873: if (cent->pe.legs.yawing != !lf->torsoYawing) +ADDRFP4 8 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $882 +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +ADDRGP4 $883 +JUMPV +LABELV $882 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +LABELV $883 +ADDRFP4 0 +INDIRP4 +CNSTI4 668 +ADDP4 +INDIRI4 +ADDRLP4 20 +INDIRI4 +EQI4 $879 +line 1874 +;1874: { +line 1875 +;1875: CG_SetLerpFrameAnimation( cent, ci, lf, newAnimation, speedScale, torsoOnly); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRFP4 16 +INDIRF4 +ARGF4 +ADDRFP4 20 +INDIRI4 +ARGI4 +ADDRGP4 CG_SetLerpFrameAnimation +CALLV +pop +line 1876 +;1876: lf->torsoYawing = cent->pe.legs.yawing; +ADDRFP4 8 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 668 +ADDP4 +INDIRI4 +ASGNI4 +line 1877 +;1877: } +LABELV $879 +line 1878 +;1878: } +LABELV $877 +LABELV $875 +LABELV $870 +line 1882 +;1879: +;1880: // if we have passed the current frame, move it to +;1881: // oldFrame and calculate a new frame +;1882: if ( cg.time >= lf->frameTime ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +LTI4 $884 +line 1883 +;1883: if (lf->oldFrame != lf->frame && +ADDRLP4 20 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +EQI4 $887 +ADDRLP4 20 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 644 +ADDP4 +CVPU4 4 +NEU4 $887 +line 1885 +;1884: lf == &(cent->pe.legs)) +;1885: { +line 1886 +;1886: int addFinalFrame = CG_InWalkingAnim(lf->animationNumber); //9; +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 CG_InWalkingAnim +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 1888 +;1887: +;1888: if (!cent->isATST && +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $889 +ADDRLP4 32 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 915 +EQI4 $891 +ADDRLP4 32 +INDIRI4 +CNSTI4 918 +NEI4 $889 +LABELV $891 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $889 +line 1891 +;1889: ((lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || (lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) && +;1890: addFinalFrame) +;1891: { +line 1892 +;1892: if ( lf->frame >= (lf->animation->firstFrame+2) && +ADDRLP4 36 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 36 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 2 +ADDI4 +ASGNI4 +ADDRLP4 36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 40 +INDIRI4 +LTI4 $892 +ADDRLP4 36 +INDIRP4 +INDIRI4 +ADDRLP4 40 +INDIRI4 +GEI4 $892 +line 1894 +;1893: lf->oldFrame < (lf->animation->firstFrame+2)) +;1894: { +line 1895 +;1895: CG_FootStep(cent, ci, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStep +CALLV +pop +line 1896 +;1896: } +ADDRGP4 $890 +JUMPV +LABELV $892 +line 1897 +;1897: else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && +ADDRLP4 44 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 48 +ADDRLP4 44 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +ADDI4 +ASGNI4 +ADDRLP4 44 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +LTI4 $894 +ADDRLP4 44 +INDIRP4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +GEI4 $894 +line 1899 +;1898: lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) +;1899: { +line 1900 +;1900: CG_FootStep(cent, ci, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStep +CALLV +pop +line 1901 +;1901: } +ADDRGP4 $890 +JUMPV +LABELV $894 +line 1902 +;1902: else if ( lf->frame >= (lf->animation->firstFrame+12) && +ADDRLP4 52 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 56 +ADDRLP4 52 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 12 +ADDI4 +ASGNI4 +ADDRLP4 52 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 56 +INDIRI4 +LTI4 $896 +ADDRLP4 52 +INDIRP4 +INDIRI4 +ADDRLP4 56 +INDIRI4 +GEI4 $896 +line 1904 +;1903: lf->oldFrame < (lf->animation->firstFrame+12)) +;1904: { +line 1905 +;1905: CG_FootStep(cent, ci, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStep +CALLV +pop +line 1906 +;1906: } +ADDRGP4 $890 +JUMPV +LABELV $896 +line 1907 +;1907: else if ( lf->frame >= (lf->animation->firstFrame+16) && +ADDRLP4 60 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 64 +ADDRLP4 60 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 16 +ADDI4 +ASGNI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 64 +INDIRI4 +LTI4 $898 +ADDRLP4 60 +INDIRP4 +INDIRI4 +ADDRLP4 64 +INDIRI4 +GEI4 $898 +line 1909 +;1908: lf->oldFrame < (lf->animation->firstFrame+16)) +;1909: { +line 1910 +;1910: CG_FootStep(cent, ci, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStep +CALLV +pop +line 1911 +;1911: } +ADDRGP4 $890 +JUMPV +LABELV $898 +line 1912 +;1912: else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) +ADDRLP4 68 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 72 +ADDRLP4 68 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 68 +INDIRP4 +INDIRI4 +ADDRLP4 72 +INDIRI4 +LEI4 $890 +ADDRLP4 72 +INDIRI4 +ADDRLP4 68 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +LEI4 $890 +line 1913 +;1913: { //missed one +line 1914 +;1914: CG_FootStep(cent, ci, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStep +CALLV +pop +line 1915 +;1915: } +line 1916 +;1916: } +ADDRGP4 $890 +JUMPV +LABELV $889 +line 1917 +;1917: else if (addFinalFrame && !cent->isATST) +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ADDRLP4 36 +INDIRI4 +EQI4 $902 +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ADDRLP4 36 +INDIRI4 +NEI4 $902 +line 1918 +;1918: { +line 1919 +;1919: if ( lf->frame >= (lf->animation->firstFrame+3) && +ADDRLP4 40 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 44 +ADDRLP4 40 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 3 +ADDI4 +ASGNI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 44 +INDIRI4 +LTI4 $904 +ADDRLP4 40 +INDIRP4 +INDIRI4 +ADDRLP4 44 +INDIRI4 +GEI4 $904 +line 1921 +;1920: lf->oldFrame < (lf->animation->firstFrame+3)) +;1921: { +line 1922 +;1922: CG_FootStep(cent, ci, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStep +CALLV +pop +line 1923 +;1923: } +ADDRGP4 $905 +JUMPV +LABELV $904 +line 1924 +;1924: else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && +ADDRLP4 48 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 52 +ADDRLP4 48 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +ADDI4 +ASGNI4 +ADDRLP4 48 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 52 +INDIRI4 +LTI4 $906 +ADDRLP4 48 +INDIRP4 +INDIRI4 +ADDRLP4 52 +INDIRI4 +GEI4 $906 +line 1926 +;1925: lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) +;1926: { +line 1927 +;1927: CG_FootStep(cent, ci, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStep +CALLV +pop +line 1928 +;1928: } +ADDRGP4 $907 +JUMPV +LABELV $906 +line 1929 +;1929: else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) +ADDRLP4 56 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 60 +ADDRLP4 56 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 56 +INDIRP4 +INDIRI4 +ADDRLP4 60 +INDIRI4 +LEI4 $908 +ADDRLP4 60 +INDIRI4 +ADDRLP4 56 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +LEI4 $908 +line 1930 +;1930: { //missed one +line 1931 +;1931: CG_FootStep(cent, ci, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStep +CALLV +pop +line 1932 +;1932: } +LABELV $908 +LABELV $907 +LABELV $905 +line 1933 +;1933: } +LABELV $902 +LABELV $890 +line 1934 +;1934: } +LABELV $887 +line 1936 +;1935: +;1936: lf->oldFrame = lf->frame; +ADDRLP4 24 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +line 1937 +;1937: lf->oldFrameTime = lf->frameTime; +ADDRLP4 28 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 1940 +;1938: +;1939: // get the next frame based on the animation +;1940: anim = lf->animation; +ADDRLP4 0 +ADDRFP4 8 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +ASGNP4 +line 1941 +;1941: if ( !anim->frameLerp ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $910 +line 1942 +;1942: return; // shouldn't happen +ADDRGP4 $865 +JUMPV +LABELV $910 +line 1945 +;1943: } +;1944: +;1945: if ( cg.time < lf->animationTime ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +GEI4 $912 +line 1946 +;1946: lf->frameTime = lf->animationTime; // initial lerp +ADDRLP4 32 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +ASGNI4 +line 1947 +;1947: } else { +ADDRGP4 $913 +JUMPV +LABELV $912 +line 1948 +;1948: lf->frameTime = lf->oldFrameTime + anim->frameLerp; +ADDRLP4 32 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 36 +CNSTI4 12 +ASGNI4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 1949 +;1949: } +LABELV $913 +line 1950 +;1950: f = ( lf->frameTime - lf->animationTime ) / anim->frameLerp; +ADDRLP4 32 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 36 +CNSTI4 12 +ASGNI4 +ADDRLP4 4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +SUBI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRI4 +DIVI4 +ASGNI4 +line 1951 +;1951: f *= speedScale; // adjust for haste, etc +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ADDRFP4 16 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1953 +;1952: +;1953: numFrames = anim->numFrames; +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 1954 +;1954: if (anim->flipflop) { +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $915 +line 1955 +;1955: numFrames *= 2; +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +LSHI4 +ASGNI4 +line 1956 +;1956: } +LABELV $915 +line 1957 +;1957: if ( f >= numFrames ) { +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $917 +line 1958 +;1958: f -= numFrames; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +SUBI4 +ASGNI4 +line 1959 +;1959: if ( anim->loopFrames != -1 ) //Before 0 meant no loop +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $919 +line 1960 +;1960: { +line 1961 +;1961: if(anim->numFrames - anim->loopFrames == 0) +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 0 +NEI4 $921 +line 1962 +;1962: { +line 1963 +;1963: f %= anim->numFrames; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +MODI4 +ASGNI4 +line 1964 +;1964: } +ADDRGP4 $922 +JUMPV +LABELV $921 +line 1966 +;1965: else +;1966: { +line 1967 +;1967: f %= (anim->numFrames - anim->loopFrames); +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +SUBI4 +MODI4 +ASGNI4 +line 1968 +;1968: } +LABELV $922 +line 1969 +;1969: f += anim->loopFrames; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 1970 +;1970: } +ADDRGP4 $920 +JUMPV +LABELV $919 +line 1972 +;1971: else +;1972: { +line 1973 +;1973: f = numFrames - 1; +ADDRLP4 4 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1976 +;1974: // the animation is stuck at the end, so it +;1975: // can immediately transition to another sequence +;1976: lf->frameTime = cg.time; +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1977 +;1977: } +LABELV $920 +line 1978 +;1978: } +LABELV $917 +line 1979 +;1979: if ( anim->reversed ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $924 +line 1980 +;1980: lf->frame = anim->firstFrame + anim->numFrames - 1 - f; +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +CNSTI4 1 +SUBI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ASGNI4 +line 1981 +;1981: } +ADDRGP4 $925 +JUMPV +LABELV $924 +line 1982 +;1982: else if (anim->flipflop && f>=anim->numFrames) { +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $926 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LTI4 $926 +line 1983 +;1983: lf->frame = anim->firstFrame + anim->numFrames - 1 - (f%anim->numFrames); +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +ADDI4 +CNSTI4 1 +SUBI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +MODI4 +SUBI4 +ASGNI4 +line 1984 +;1984: } +ADDRGP4 $927 +JUMPV +LABELV $926 +line 1985 +;1985: else { +line 1986 +;1986: lf->frame = anim->firstFrame + f; +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +ASGNI4 +line 1987 +;1987: } +LABELV $927 +LABELV $925 +line 1988 +;1988: if ( cg.time > lf->frameTime ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +LEI4 $928 +line 1989 +;1989: lf->frameTime = cg.time; +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1990 +;1990: if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRLP4 44 +INDIRI4 +EQI4 $932 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRLP4 44 +INDIRI4 +LTI4 $937 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +NEI4 $932 +LABELV $937 +line 1991 +;1991: CG_Printf( "Clamp lf->frameTime\n"); +ADDRGP4 $938 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 1992 +;1992: } +LABELV $932 +line 1993 +;1993: } +LABELV $928 +line 1994 +;1994: } +LABELV $884 +line 1996 +;1995: +;1996: if ( lf->frameTime > cg.time + 200 ) { +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 200 +ADDI4 +LEI4 $939 +line 1997 +;1997: lf->frameTime = cg.time; +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1998 +;1998: } +LABELV $939 +line 2000 +;1999: +;2000: if ( lf->oldFrameTime > cg.time ) { +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $943 +line 2001 +;2001: lf->oldFrameTime = cg.time; +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 2002 +;2002: } +LABELV $943 +line 2004 +;2003: // calculate current lerp value +;2004: if ( lf->frameTime == lf->oldFrameTime ) { +ADDRLP4 20 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +NEI4 $947 +line 2005 +;2005: lf->backlerp = 0; +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTF4 0 +ASGNF4 +line 2006 +;2006: } else { +ADDRGP4 $948 +JUMPV +LABELV $947 +line 2007 +;2007: lf->backlerp = 1.0 - (float)( cg.time - lf->oldFrameTime ) / ( lf->frameTime - lf->oldFrameTime ); +ADDRLP4 24 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 24 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTF4 1065353216 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 28 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 24 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +SUBF4 +ASGNF4 +line 2008 +;2008: } +LABELV $948 +line 2009 +;2009:} +LABELV $865 +endproc CG_RunLerpFrame 76 40 +proc CG_ClearLerpFrame 16 24 +line 2017 +;2010: +;2011: +;2012:/* +;2013:=============== +;2014:CG_ClearLerpFrame +;2015:=============== +;2016:*/ +;2017:static void CG_ClearLerpFrame( centity_t *cent, clientInfo_t *ci, lerpFrame_t *lf, int animationNumber, qboolean torsoOnly) { +line 2018 +;2018: lf->frameTime = lf->oldFrameTime = cg.time; +ADDRLP4 0 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 2019 +;2019: CG_SetLerpFrameAnimation( cent, ci, lf, animationNumber, 1, torsoOnly ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRI4 +ARGI4 +CNSTF4 1065353216 +ARGF4 +ADDRFP4 16 +INDIRI4 +ARGI4 +ADDRGP4 CG_SetLerpFrameAnimation +CALLV +pop +line 2020 +;2020: lf->oldFrame = lf->frame = lf->animation->firstFrame; +ADDRLP4 8 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2021 +;2021:} +LABELV $950 +endproc CG_ClearLerpFrame 16 24 +proc CG_PlayerAnimation 16 24 +line 2030 +;2022: +;2023: +;2024:/* +;2025:=============== +;2026:CG_PlayerAnimation +;2027:=============== +;2028:*/ +;2029:static void CG_PlayerAnimation( centity_t *cent, int *legsOld, int *legs, float *legsBackLerp, +;2030: int *torsoOld, int *torso, float *torsoBackLerp ) { +line 2035 +;2031: clientInfo_t *ci; +;2032: int clientNum; +;2033: float speedScale; +;2034: +;2035: clientNum = cent->currentState.clientNum; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ASGNI4 +line 2037 +;2036: +;2037: if ( cg_noPlayerAnims.integer ) { +ADDRGP4 cg_noPlayerAnims+12 +INDIRI4 +CNSTI4 0 +EQI4 $953 +line 2038 +;2038: *legsOld = *legs = *torsoOld = *torso = 0; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRFP4 20 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +ADDRFP4 16 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2039 +;2039: return; +ADDRGP4 $952 +JUMPV +LABELV $953 +line 2042 +;2040: } +;2041: +;2042: if (cent->currentState.forcePowersActive & (1 << FP_RAGE)) +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $956 +line 2043 +;2043: { +line 2044 +;2044: speedScale = 1.3; +ADDRLP4 0 +CNSTF4 1067869798 +ASGNF4 +line 2045 +;2045: } +ADDRGP4 $957 +JUMPV +LABELV $956 +line 2046 +;2046: else if (cent->currentState.forcePowersActive & (1 << FP_SPEED)) +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $958 +line 2047 +;2047: { +line 2048 +;2048: speedScale = 1.7; +ADDRLP4 0 +CNSTF4 1071225242 +ASGNF4 +line 2049 +;2049: } +ADDRGP4 $959 +JUMPV +LABELV $958 +line 2051 +;2050: else +;2051: { +line 2052 +;2052: speedScale = 1; +ADDRLP4 0 +CNSTF4 1065353216 +ASGNF4 +line 2053 +;2053: } +LABELV $959 +LABELV $957 +line 2055 +;2054: +;2055: ci = &cgs.clientinfo[ clientNum ]; +ADDRLP4 4 +CNSTI4 788 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 2058 +;2056: +;2057: // do the shuffle turn frames locally +;2058: if(0){// if ( cent->pe.legs.yawing && ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == TORSO_WEAPONREADY3) { +ADDRGP4 $961 +JUMPV +line 2059 +;2059: CG_RunLerpFrame( cent, ci, ¢->pe.legs, LEGS_TURN1, speedScale, qfalse); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 644 +ADDP4 +ARGP4 +CNSTI4 1143 +ARGI4 +ADDRLP4 0 +INDIRF4 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_RunLerpFrame +CALLV +pop +line 2060 +;2060: } else { +ADDRGP4 $962 +JUMPV +LABELV $961 +line 2061 +;2061: CG_RunLerpFrame( cent, ci, ¢->pe.legs, cent->currentState.legsAnim, speedScale, qfalse); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 644 +ADDP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRF4 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_RunLerpFrame +CALLV +pop +line 2062 +;2062: } +LABELV $962 +line 2064 +;2063: +;2064: if (!(cent->currentState.forcePowersActive & (1 << FP_RAGE))) +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +NEI4 $963 +line 2065 +;2065: { //don't affect torso anim speed unless raged +line 2066 +;2066: speedScale = 1; +ADDRLP4 0 +CNSTF4 1065353216 +ASGNF4 +line 2067 +;2067: } +ADDRGP4 $964 +JUMPV +LABELV $963 +line 2069 +;2068: else +;2069: { +line 2070 +;2070: speedScale = 1.7; +ADDRLP4 0 +CNSTF4 1071225242 +ASGNF4 +line 2071 +;2071: } +LABELV $964 +line 2073 +;2072: +;2073: *legsOld = cent->pe.legs.oldFrame; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 644 +ADDP4 +INDIRI4 +ASGNI4 +line 2074 +;2074: *legs = cent->pe.legs.frame; +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +INDIRI4 +ASGNI4 +line 2075 +;2075: *legsBackLerp = cent->pe.legs.backlerp; +ADDRFP4 12 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 660 +ADDP4 +INDIRF4 +ASGNF4 +line 2077 +;2076: +;2077: CG_RunLerpFrame( cent, ci, ¢->pe.torso, cent->currentState.torsoAnim, speedScale, qtrue ); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 708 +ADDP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRF4 +ARGF4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_RunLerpFrame +CALLV +pop +line 2079 +;2078: +;2079: *torsoOld = cent->pe.torso.oldFrame; +ADDRFP4 16 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 708 +ADDP4 +INDIRI4 +ASGNI4 +line 2080 +;2080: *torso = cent->pe.torso.frame; +ADDRFP4 20 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 716 +ADDP4 +INDIRI4 +ASGNI4 +line 2081 +;2081: *torsoBackLerp = cent->pe.torso.backlerp; +ADDRFP4 24 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 724 +ADDP4 +INDIRF4 +ASGNF4 +line 2082 +;2082:} +LABELV $952 +endproc CG_PlayerAnimation 16 24 +proc CG_SwingAngles 28 8 +line 2101 +;2083: +;2084: +;2085: +;2086: +;2087:/* +;2088:============================================================================= +;2089: +;2090:PLAYER ANGLES +;2091: +;2092:============================================================================= +;2093:*/ +;2094: +;2095:/* +;2096:================== +;2097:CG_SwingAngles +;2098:================== +;2099:*/ +;2100:static float CG_SwingAngles( float destination, float swingTolerance, float clampTolerance, +;2101: float speed, float *angle, qboolean *swinging ) { +line 2106 +;2102: float swing; +;2103: float move; +;2104: float scale; +;2105: +;2106: if ( !*swinging ) { +ADDRFP4 20 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $966 +line 2108 +;2107: // see if a swing should be started +;2108: swing = AngleSubtract( *angle, destination ); +ADDRFP4 16 +INDIRP4 +INDIRF4 +ARGF4 +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRLP4 12 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 2109 +;2109: if ( swing > swingTolerance || swing < -swingTolerance ) { +ADDRLP4 20 +ADDRFP4 4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ADDRLP4 20 +INDIRF4 +GTF4 $970 +ADDRLP4 0 +INDIRF4 +ADDRLP4 20 +INDIRF4 +NEGF4 +GEF4 $968 +LABELV $970 +line 2110 +;2110: *swinging = qtrue; +ADDRFP4 20 +INDIRP4 +CNSTI4 1 +ASGNI4 +line 2111 +;2111: } +LABELV $968 +line 2112 +;2112: } +LABELV $966 +line 2114 +;2113: +;2114: if ( !*swinging ) { +ADDRFP4 20 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $971 +line 2115 +;2115: return 0; +CNSTF4 0 +RETF4 +ADDRGP4 $965 +JUMPV +LABELV $971 +line 2120 +;2116: } +;2117: +;2118: // modify the speed depending on the delta +;2119: // so it doesn't seem so linear +;2120: swing = AngleSubtract( destination, *angle ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 12 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 2121 +;2121: scale = fabs( swing ); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 16 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 2122 +;2122: if ( scale < swingTolerance * 0.5 ) { +ADDRLP4 4 +INDIRF4 +CNSTF4 1056964608 +ADDRFP4 4 +INDIRF4 +MULF4 +GEF4 $973 +line 2123 +;2123: scale = 0.5; +ADDRLP4 4 +CNSTF4 1056964608 +ASGNF4 +line 2124 +;2124: } else if ( scale < swingTolerance ) { +ADDRGP4 $974 +JUMPV +LABELV $973 +ADDRLP4 4 +INDIRF4 +ADDRFP4 4 +INDIRF4 +GEF4 $975 +line 2125 +;2125: scale = 1.0; +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +line 2126 +;2126: } else { +ADDRGP4 $976 +JUMPV +LABELV $975 +line 2127 +;2127: scale = 2.0; +ADDRLP4 4 +CNSTF4 1073741824 +ASGNF4 +line 2128 +;2128: } +LABELV $976 +LABELV $974 +line 2131 +;2129: +;2130: // swing towards the destination angle +;2131: if ( swing >= 0 ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +LTF4 $977 +line 2132 +;2132: move = cg.frametime * scale * speed; +ADDRLP4 8 +ADDRGP4 cg+60 +INDIRI4 +CVIF4 4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDRFP4 12 +INDIRF4 +MULF4 +ASGNF4 +line 2133 +;2133: if ( move >= swing ) { +ADDRLP4 8 +INDIRF4 +ADDRLP4 0 +INDIRF4 +LTF4 $980 +line 2134 +;2134: move = swing; +ADDRLP4 8 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 2135 +;2135: *swinging = qfalse; +ADDRFP4 20 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 2136 +;2136: } +LABELV $980 +line 2137 +;2137: *angle = AngleMod( *angle + move ); +ADDRLP4 20 +ADDRFP4 16 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 AngleMod +CALLF4 +ASGNF4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 2138 +;2138: } else if ( swing < 0 ) { +ADDRGP4 $978 +JUMPV +LABELV $977 +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +GEF4 $982 +line 2139 +;2139: move = cg.frametime * scale * -speed; +ADDRLP4 8 +ADDRGP4 cg+60 +INDIRI4 +CVIF4 4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDRFP4 12 +INDIRF4 +NEGF4 +MULF4 +ASGNF4 +line 2140 +;2140: if ( move <= swing ) { +ADDRLP4 8 +INDIRF4 +ADDRLP4 0 +INDIRF4 +GTF4 $985 +line 2141 +;2141: move = swing; +ADDRLP4 8 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 2142 +;2142: *swinging = qfalse; +ADDRFP4 20 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 2143 +;2143: } +LABELV $985 +line 2144 +;2144: *angle = AngleMod( *angle + move ); +ADDRLP4 20 +ADDRFP4 16 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 AngleMod +CALLF4 +ASGNF4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 2145 +;2145: } +LABELV $982 +LABELV $978 +line 2148 +;2146: +;2147: // clamp to no more than tolerance +;2148: swing = AngleSubtract( destination, *angle ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 20 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 20 +INDIRF4 +ASGNF4 +line 2149 +;2149: if ( swing > clampTolerance ) { +ADDRLP4 0 +INDIRF4 +ADDRFP4 8 +INDIRF4 +LEF4 $987 +line 2150 +;2150: *angle = AngleMod( destination - (clampTolerance - 1) ); +ADDRFP4 0 +INDIRF4 +ADDRFP4 8 +INDIRF4 +CNSTF4 1065353216 +SUBF4 +SUBF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 AngleMod +CALLF4 +ASGNF4 +ADDRFP4 16 +INDIRP4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 2151 +;2151: } else if ( swing < -clampTolerance ) { +ADDRGP4 $988 +JUMPV +LABELV $987 +ADDRLP4 0 +INDIRF4 +ADDRFP4 8 +INDIRF4 +NEGF4 +GEF4 $989 +line 2152 +;2152: *angle = AngleMod( destination + (clampTolerance - 1) ); +ADDRFP4 0 +INDIRF4 +ADDRFP4 8 +INDIRF4 +CNSTF4 1065353216 +SUBF4 +ADDF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 AngleMod +CALLF4 +ASGNF4 +ADDRFP4 16 +INDIRP4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 2153 +;2153: } +LABELV $989 +LABELV $988 +line 2155 +;2154: +;2155: return swing; +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $965 +endproc CG_SwingAngles 28 8 +proc CG_SwingAnglesATST 36 8 +line 2164 +;2156:} +;2157: +;2158:/* +;2159:================== +;2160:CG_SwingAngles +;2161:================== +;2162:*/ +;2163:static float CG_SwingAnglesATST( centity_t *cent, float destination, float swingTolerance, float clampTolerance, +;2164: float speed, float *angle, qboolean *swinging ) { +line 2169 +;2165: float swing; +;2166: float move; +;2167: float scale; +;2168: +;2169: if ( !*swinging ) { +ADDRFP4 24 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $992 +line 2171 +;2170: // see if a swing should be started +;2171: swing = AngleSubtract( *angle, destination ); +ADDRFP4 20 +INDIRP4 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRLP4 12 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 2172 +;2172: if ( swing > swingTolerance || swing < -swingTolerance ) { +ADDRLP4 20 +ADDRFP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ADDRLP4 20 +INDIRF4 +GTF4 $996 +ADDRLP4 0 +INDIRF4 +ADDRLP4 20 +INDIRF4 +NEGF4 +GEF4 $994 +LABELV $996 +line 2173 +;2173: *swinging = qtrue; +ADDRFP4 24 +INDIRP4 +CNSTI4 1 +ASGNI4 +line 2174 +;2174: } +LABELV $994 +line 2175 +;2175: } +LABELV $992 +line 2177 +;2176: +;2177: if ( !*swinging ) { +ADDRFP4 24 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $997 +line 2178 +;2178: return 0; +CNSTF4 0 +RETF4 +ADDRGP4 $991 +JUMPV +LABELV $997 +line 2183 +;2179: } +;2180: +;2181: // modify the speed depending on the delta +;2182: // so it doesn't seem so linear +;2183: swing = AngleSubtract( destination, *angle ); +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 20 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 12 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 2184 +;2184: scale = fabs( swing ); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 16 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 2185 +;2185: if ( scale < swingTolerance * 0.5 ) { +ADDRLP4 4 +INDIRF4 +CNSTF4 1056964608 +ADDRFP4 8 +INDIRF4 +MULF4 +GEF4 $999 +line 2186 +;2186: scale = 0.5; +ADDRLP4 4 +CNSTF4 1056964608 +ASGNF4 +line 2187 +;2187: } else if ( scale < swingTolerance ) { +ADDRGP4 $1000 +JUMPV +LABELV $999 +ADDRLP4 4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +GEF4 $1001 +line 2188 +;2188: scale = 1.0; +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +line 2189 +;2189: } else { +ADDRGP4 $1002 +JUMPV +LABELV $1001 +line 2190 +;2190: scale = 2.0; +ADDRLP4 4 +CNSTF4 1073741824 +ASGNF4 +line 2191 +;2191: } +LABELV $1002 +LABELV $1000 +line 2193 +;2192: +;2193: if (swing < 10 && swing > -10) +ADDRLP4 0 +INDIRF4 +CNSTF4 1092616192 +GEF4 $1003 +ADDRLP4 0 +INDIRF4 +CNSTF4 3240099840 +LEF4 $1003 +line 2194 +;2194: { +line 2195 +;2195: cent->atstSwinging = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1036 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2196 +;2196: } +LABELV $1003 +line 2197 +;2197: if (swing < 60 && swing > -60 && !cent->atstSwinging) +ADDRLP4 0 +INDIRF4 +CNSTF4 1114636288 +GEF4 $1005 +ADDRLP4 0 +INDIRF4 +CNSTF4 3262119936 +LEF4 $1005 +ADDRFP4 0 +INDIRP4 +CNSTI4 1036 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1005 +line 2198 +;2198: { +line 2199 +;2199: return 0; +CNSTF4 0 +RETF4 +ADDRGP4 $991 +JUMPV +LABELV $1005 +line 2202 +;2200: } +;2201: +;2202: cent->atstSwinging = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 1036 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2205 +;2203: +;2204: // swing towards the destination angle +;2205: if ( swing >= 0 ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +LTF4 $1007 +line 2206 +;2206: move = cg.frametime * scale * speed; +ADDRLP4 8 +ADDRGP4 cg+60 +INDIRI4 +CVIF4 4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDRFP4 16 +INDIRF4 +MULF4 +ASGNF4 +line 2207 +;2207: if ( move >= swing ) { +ADDRLP4 8 +INDIRF4 +ADDRLP4 0 +INDIRF4 +LTF4 $1010 +line 2208 +;2208: move = swing; +ADDRLP4 8 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 2209 +;2209: *swinging = qfalse; +ADDRFP4 24 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 2210 +;2210: } +LABELV $1010 +line 2211 +;2211: *angle = AngleMod( *angle + move ); +ADDRLP4 28 +ADDRFP4 20 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 32 +ADDRGP4 AngleMod +CALLF4 +ASGNF4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 2212 +;2212: } else if ( swing < 0 ) { +ADDRGP4 $1008 +JUMPV +LABELV $1007 +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +GEF4 $1012 +line 2213 +;2213: move = cg.frametime * scale * -speed; +ADDRLP4 8 +ADDRGP4 cg+60 +INDIRI4 +CVIF4 4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDRFP4 16 +INDIRF4 +NEGF4 +MULF4 +ASGNF4 +line 2214 +;2214: if ( move <= swing ) { +ADDRLP4 8 +INDIRF4 +ADDRLP4 0 +INDIRF4 +GTF4 $1015 +line 2215 +;2215: move = swing; +ADDRLP4 8 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 2216 +;2216: *swinging = qfalse; +ADDRFP4 24 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 2217 +;2217: } +LABELV $1015 +line 2218 +;2218: *angle = AngleMod( *angle + move ); +ADDRLP4 28 +ADDRFP4 20 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 32 +ADDRGP4 AngleMod +CALLF4 +ASGNF4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 2219 +;2219: } +LABELV $1012 +LABELV $1008 +line 2222 +;2220: +;2221: // clamp to no more than tolerance +;2222: swing = AngleSubtract( destination, *angle ); +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 20 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 28 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 2223 +;2223: if ( swing > clampTolerance ) { +ADDRLP4 0 +INDIRF4 +ADDRFP4 12 +INDIRF4 +LEF4 $1017 +line 2224 +;2224: *angle = AngleMod( destination - (clampTolerance - 1) ); +ADDRFP4 4 +INDIRF4 +ADDRFP4 12 +INDIRF4 +CNSTF4 1065353216 +SUBF4 +SUBF4 +ARGF4 +ADDRLP4 32 +ADDRGP4 AngleMod +CALLF4 +ASGNF4 +ADDRFP4 20 +INDIRP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 2225 +;2225: } else if ( swing < -clampTolerance ) { +ADDRGP4 $1018 +JUMPV +LABELV $1017 +ADDRLP4 0 +INDIRF4 +ADDRFP4 12 +INDIRF4 +NEGF4 +GEF4 $1019 +line 2226 +;2226: *angle = AngleMod( destination + (clampTolerance - 1) ); +ADDRFP4 4 +INDIRF4 +ADDRFP4 12 +INDIRF4 +CNSTF4 1065353216 +SUBF4 +ADDF4 +ARGF4 +ADDRLP4 32 +ADDRGP4 AngleMod +CALLF4 +ASGNF4 +ADDRFP4 20 +INDIRP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 2227 +;2227: } +LABELV $1019 +LABELV $1018 +line 2229 +;2228: +;2229: return swing; +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $991 +endproc CG_SwingAnglesATST 36 8 +proc CG_AddPainTwitch 12 0 +line 2237 +;2230:} +;2231: +;2232:/* +;2233:================= +;2234:CG_AddPainTwitch +;2235:================= +;2236:*/ +;2237:static void CG_AddPainTwitch( centity_t *cent, vec3_t torsoAngles ) { +line 2241 +;2238: int t; +;2239: float f; +;2240: +;2241: t = cg.time - cent->pe.painTime; +ADDRLP4 0 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 836 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 2242 +;2242: if ( t >= PAIN_TWITCH_TIME ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 200 +LTI4 $1023 +line 2243 +;2243: return; +ADDRGP4 $1021 +JUMPV +LABELV $1023 +line 2246 +;2244: } +;2245: +;2246: f = 1.0 - (float)t / PAIN_TWITCH_TIME; +ADDRLP4 4 +CNSTF4 1065353216 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +CNSTF4 1128792064 +DIVF4 +SUBF4 +ASGNF4 +line 2248 +;2247: +;2248: if ( cent->pe.painDirection ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 840 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1025 +line 2249 +;2249: torsoAngles[ROLL] += 20 * f; +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +CNSTF4 1101004800 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2250 +;2250: } else { +ADDRGP4 $1026 +JUMPV +LABELV $1025 +line 2251 +;2251: torsoAngles[ROLL] -= 20 * f; +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +CNSTF4 1101004800 +ADDRLP4 4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 2252 +;2252: } +LABELV $1026 +line 2253 +;2253:} +LABELV $1021 +endproc CG_AddPainTwitch 12 0 +export CG_G2SetBoneAngles +proc CG_G2SetBoneAngles 0 44 +ADDRFP4 16 +ADDRFP4 16 +INDIRI4 +ASGNI4 +ADDRFP4 20 +ADDRFP4 20 +INDIRI4 +ASGNI4 +ADDRFP4 24 +ADDRFP4 24 +INDIRI4 +ASGNI4 +ADDRFP4 28 +ADDRFP4 28 +INDIRI4 +ASGNI4 +line 2277 +;2254: +;2255: +;2256:typedef struct boneAngleParms_s { +;2257: void *ghoul2; +;2258: int modelIndex; +;2259: char *boneName; +;2260: vec3_t angles; +;2261: int flags; +;2262: int up; +;2263: int right; +;2264: int forward; +;2265: qhandle_t *modelList; +;2266: int blendTime; +;2267: int currentTime; +;2268: +;2269: qboolean refreshSet; +;2270:} boneAngleParms_t; +;2271: +;2272:boneAngleParms_t cgBoneAnglePostSet; +;2273: +;2274:void CG_G2SetBoneAngles(void *ghoul2, int modelIndex, const char *boneName, const vec3_t angles, const int flags, +;2275: const int up, const int right, const int forward, qhandle_t *modelList, +;2276: int blendTime , int currentTime ) +;2277:{ //we want to hold off on setting the bone angles until the end of the frame, because every time we set +line 2302 +;2278: //them the entire skeleton has to be reconstructed. +;2279:#if 0 +;2280: //This function should ONLY be called from CG_Player() or a function that is called only within CG_Player(). +;2281: //At the end of the frame we will check to use this information to call SetBoneAngles +;2282: memset(&cgBoneAnglePostSet, 0, sizeof(cgBoneAnglePostSet)); +;2283: cgBoneAnglePostSet.ghoul2 = ghoul2; +;2284: cgBoneAnglePostSet.modelIndex = modelIndex; +;2285: cgBoneAnglePostSet.boneName = (char *)boneName; +;2286: +;2287: cgBoneAnglePostSet.angles[0] = angles[0]; +;2288: cgBoneAnglePostSet.angles[1] = angles[1]; +;2289: cgBoneAnglePostSet.angles[2] = angles[2]; +;2290: +;2291: cgBoneAnglePostSet.flags = flags; +;2292: cgBoneAnglePostSet.up = up; +;2293: cgBoneAnglePostSet.right = right; +;2294: cgBoneAnglePostSet.forward = forward; +;2295: cgBoneAnglePostSet.modelList = modelList; +;2296: cgBoneAnglePostSet.blendTime = blendTime; +;2297: cgBoneAnglePostSet.currentTime = currentTime; +;2298: +;2299: cgBoneAnglePostSet.refreshSet = qtrue; +;2300:#endif +;2301: //Unfortunately the above doesn't really work. +;2302: trap_G2API_SetBoneAngles(ghoul2, modelIndex, boneName, angles, flags, up, right, forward, modelList, +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRFP4 16 +INDIRI4 +ARGI4 +ADDRFP4 20 +INDIRI4 +ARGI4 +ADDRFP4 24 +INDIRI4 +ARGI4 +ADDRFP4 28 +INDIRI4 +ARGI4 +ADDRFP4 32 +INDIRP4 +ARGP4 +ADDRFP4 36 +INDIRI4 +ARGI4 +ADDRFP4 40 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 2304 +;2303: blendTime, currentTime); +;2304:} +LABELV $1027 +endproc CG_G2SetBoneAngles 0 44 +export CG_InKnockDown +proc CG_InKnockDown 8 0 +line 2307 +;2305: +;2306:qboolean CG_InKnockDown( int anim ) +;2307:{ +line 2308 +;2308: switch ( (anim&~ANIM_TOGGLEBIT) ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 924 +LTI4 $1029 +ADDRLP4 0 +INDIRI4 +CNSTI4 942 +GTI4 $1029 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1034-3696 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1034 +address $1032 +address $1032 +address $1032 +address $1032 +address $1032 +address $1033 +address $1033 +address $1033 +address $1033 +address $1033 +address $1029 +address $1029 +address $1033 +address $1033 +address $1033 +address $1033 +address $1033 +address $1033 +address $1033 +code +line 2309 +;2309: { +LABELV $1032 +line 2315 +;2310: case BOTH_KNOCKDOWN1: +;2311: case BOTH_KNOCKDOWN2: +;2312: case BOTH_KNOCKDOWN3: +;2313: case BOTH_KNOCKDOWN4: +;2314: case BOTH_KNOCKDOWN5: +;2315: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1028 +JUMPV +line 2316 +;2316: break; +LABELV $1033 +line 2329 +;2317: case BOTH_GETUP1: +;2318: case BOTH_GETUP2: +;2319: case BOTH_GETUP3: +;2320: case BOTH_GETUP4: +;2321: case BOTH_GETUP5: +;2322: case BOTH_FORCE_GETUP_F1: +;2323: case BOTH_FORCE_GETUP_F2: +;2324: case BOTH_FORCE_GETUP_B1: +;2325: case BOTH_FORCE_GETUP_B2: +;2326: case BOTH_FORCE_GETUP_B3: +;2327: case BOTH_FORCE_GETUP_B4: +;2328: case BOTH_FORCE_GETUP_B5: +;2329: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1028 +JUMPV +line 2330 +;2330: break; +LABELV $1029 +line 2332 +;2331: } +;2332: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1028 +endproc CG_InKnockDown 8 0 +export CG_G2ClientSpineAngles +proc CG_G2ClientSpineAngles 248 36 +line 2336 +;2333:} +;2334: +;2335:void CG_G2ClientSpineAngles( centity_t *cent, vec3_t viewAngles, const vec3_t angles, vec3_t thoracicAngles, vec3_t ulAngles, vec3_t llAngles ) +;2336:{ +line 2337 +;2337: float legDif = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 2339 +;2338:// cent->pe.torso.pitchAngle = viewAngles[PITCH]; +;2339: viewAngles[YAW] = AngleDelta( cent->lerpAngles[YAW], angles[YAW] ); +ADDRFP4 0 +INDIRP4 +CNSTI4 944 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 4 +CNSTI4 4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 AngleDelta +CALLF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 2340 +;2340: legDif = viewAngles[YAW]; +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 2350 +;2341:// cent->pe.torso.yawAngle = viewAngles[YAW]; +;2342: +;2343: /* +;2344: if ( !BG_FlippingAnim( cent->currentState.legsAnim ) +;2345: && !BG_SpinningSaberAnim( cent->currentState.legsAnim ) +;2346: && !BG_SpinningSaberAnim( cent->currentState.torsoAnim ) +;2347: && !BG_SaberInSpecial(cent->currentState.saberMove) +;2348: && cent->currentState.legsAnim != cent->currentState.torsoAnim )//NOTE: presumes your legs & torso are on the same frame, though they *should* be because PM_SetAnimFinal tries to keep them in synch +;2349: */ +;2350: if ( !BG_FlippingAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 BG_FlippingAnim +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 16 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 20 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 32 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 CG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 44 +ADDRGP4 CG_InRollAnim +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 48 +ADDRGP4 BG_SaberInSpecial +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 52 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 56 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +ADDRGP4 CG_InKnockDown +CALLI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 64 +ADDRGP4 CG_InKnockDown +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+784 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 68 +ADDRGP4 CG_InKnockDown +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 72 +ADDRGP4 CG_InKnockDown +CALLI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 BG_FlippingAnim +CALLI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 80 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+784 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 84 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 88 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+784 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 92 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 92 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 96 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 96 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+784 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 100 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 100 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+784 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 104 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 104 +INDIRI4 +CNSTI4 0 +NEI4 $1037 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 108 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 112 +CNSTI4 0 +ASGNI4 +ADDRLP4 108 +INDIRI4 +ADDRLP4 112 +INDIRI4 +NEI4 $1037 +ADDRLP4 116 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 116 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 112 +INDIRI4 +NEI4 $1037 +ADDRLP4 120 +CNSTI4 -2049 +ASGNI4 +ADDRLP4 116 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +ADDRLP4 120 +INDIRI4 +BANDI4 +ADDRLP4 116 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +ADDRLP4 120 +INDIRI4 +BANDI4 +EQI4 $1037 +ADDRLP4 124 +CNSTI4 788 +ADDRLP4 116 +INDIRP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 124 +INDIRI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +ADDRLP4 120 +INDIRI4 +BANDI4 +ADDRLP4 124 +INDIRI4 +ADDRGP4 cgs+43024+784 +ADDP4 +INDIRI4 +ADDRLP4 120 +INDIRI4 +BANDI4 +EQI4 $1037 +line 2381 +;2351: !BG_SpinningSaberAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && +;2352: !BG_SpinningSaberAnim( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && +;2353: !BG_InSpecialJump( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && +;2354: !BG_InSpecialJump( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && +;2355: !BG_InDeathAnim(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && +;2356: !BG_InDeathAnim(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && +;2357: !CG_InRoll(cent) && +;2358: !CG_InRollAnim(cent) && +;2359: !BG_SaberInSpecial(cent->currentState.saberMove) && +;2360: !BG_SaberInSpecialAttack(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && +;2361: !BG_SaberInSpecialAttack(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && +;2362: +;2363: !CG_InKnockDown(cent->currentState.torsoAnim) && +;2364: !CG_InKnockDown(cent->currentState.legsAnim) && +;2365: !CG_InKnockDown(cgs.clientinfo[cent->currentState.number].torsoAnim) && +;2366: !CG_InKnockDown(cgs.clientinfo[cent->currentState.number].legsAnim) && +;2367: +;2368: !BG_FlippingAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && +;2369: !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && +;2370: !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && +;2371: !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && +;2372: !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && +;2373: !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) && +;2374: !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && +;2375: !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && +;2376: !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) && +;2377: +;2378: !(cent->currentState.eFlags & EF_DEAD) && +;2379: (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) != (cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && +;2380: (cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) != (cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT)) +;2381: {//FIXME: no need to do this if legs and torso on are same frame +line 2388 +;2382: //adjust for motion offset +;2383: mdxaBone_t boltMatrix; +;2384: vec3_t motionFwd, motionAngles; +;2385: vec3_t motionRt, tempAng; +;2386: int ang; +;2387: +;2388: trap_G2API_GetBoltMatrix_NoRecNoRot( cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_motion, &boltMatrix, vec3_origin, cent->lerpOrigin, cg.time, /*cgs.gameModels*/0, cent->modelScale); +ADDRLP4 228 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 228 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 788 +ADDRLP4 228 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+524 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 144 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 228 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTP4 0 +ARGP4 +ADDRLP4 228 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix_NoRecNoRot +CALLI4 +pop +line 2389 +;2389: trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, motionFwd ); +ADDRLP4 144 +ARGP4 +CNSTI4 6 +ARGI4 +ADDRLP4 192 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 2391 +;2390: +;2391: vectoangles( motionFwd, motionAngles ); +ADDRLP4 192 +ARGP4 +ADDRLP4 132 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 2393 +;2392: +;2393: trap_G2API_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_X, motionRt ); +ADDRLP4 144 +ARGP4 +CNSTI4 4 +ARGI4 +ADDRLP4 204 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 2394 +;2394: vectoangles( motionRt, tempAng ); +ADDRLP4 204 +ARGP4 +ADDRLP4 216 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 2395 +;2395: motionAngles[ROLL] = -tempAng[PITCH]; +ADDRLP4 132+8 +ADDRLP4 216 +INDIRF4 +NEGF4 +ASGNF4 +line 2397 +;2396: +;2397: for ( ang = 0; ang < 3; ang++ ) +ADDRLP4 128 +CNSTI4 0 +ASGNI4 +LABELV $1069 +line 2398 +;2398: { +line 2399 +;2399: viewAngles[ang] = AngleNormalize180( viewAngles[ang] - AngleNormalize180( motionAngles[ang] ) ); +ADDRLP4 232 +ADDRLP4 128 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 232 +INDIRI4 +ADDRLP4 132 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 236 +ADDRGP4 AngleNormalize180 +CALLF4 +ASGNF4 +ADDRLP4 240 +ADDRLP4 232 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +ASGNP4 +ADDRLP4 240 +INDIRP4 +INDIRF4 +ADDRLP4 236 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 244 +ADDRGP4 AngleNormalize180 +CALLF4 +ASGNF4 +ADDRLP4 240 +INDIRP4 +ADDRLP4 244 +INDIRF4 +ASGNF4 +line 2400 +;2400: } +LABELV $1070 +line 2397 +ADDRLP4 128 +ADDRLP4 128 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 128 +INDIRI4 +CNSTI4 3 +LTI4 $1069 +line 2401 +;2401: } +LABELV $1037 +line 2426 +;2402: +;2403: //Keep it within 80 degrees of the leg angles, on either side. Will hopefully prevent spine twisting. +;2404: /* +;2405: if (legDif > 0) +;2406: { +;2407: legDif += 80; +;2408: } +;2409: else +;2410: { +;2411: legDif -= 80; +;2412: } +;2413: +;2414: if (legDif < 0 && viewAngles[YAW] < legDif) +;2415: { +;2416: viewAngles[YAW] = legDif; +;2417: } +;2418: if (legDif > 0 && viewAngles[YAW] > legDif) +;2419: { +;2420: viewAngles[YAW] = legDif; +;2421: } +;2422: */ +;2423: +;2424: //distribute the angles differently up the spine +;2425: //NOTE: each of these distributions must add up to 1.0f +;2426: thoracicAngles[PITCH] = viewAngles[PITCH]*0.20f; +ADDRFP4 12 +INDIRP4 +CNSTF4 1045220557 +ADDRFP4 4 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 2427 +;2427: llAngles[PITCH] = viewAngles[PITCH]*0.40f; +ADDRFP4 20 +INDIRP4 +CNSTF4 1053609165 +ADDRFP4 4 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 2428 +;2428: ulAngles[PITCH] = viewAngles[PITCH]*0.40f; +ADDRFP4 16 +INDIRP4 +CNSTF4 1053609165 +ADDRFP4 4 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 2430 +;2429: +;2430: thoracicAngles[YAW] = viewAngles[YAW]*0.20f; +ADDRLP4 128 +CNSTI4 4 +ASGNI4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 128 +INDIRI4 +ADDP4 +CNSTF4 1045220557 +ADDRFP4 4 +INDIRP4 +ADDRLP4 128 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 2431 +;2431: ulAngles[YAW] = viewAngles[YAW]*0.35f; +ADDRLP4 132 +CNSTI4 4 +ASGNI4 +ADDRFP4 16 +INDIRP4 +ADDRLP4 132 +INDIRI4 +ADDP4 +CNSTF4 1051931443 +ADDRFP4 4 +INDIRP4 +ADDRLP4 132 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 2432 +;2432: llAngles[YAW] = viewAngles[YAW]*0.45f; +ADDRLP4 136 +CNSTI4 4 +ASGNI4 +ADDRFP4 20 +INDIRP4 +ADDRLP4 136 +INDIRI4 +ADDP4 +CNSTF4 1055286886 +ADDRFP4 4 +INDIRP4 +ADDRLP4 136 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 2434 +;2433: +;2434: thoracicAngles[ROLL] = viewAngles[ROLL]*0.20f; +ADDRLP4 140 +CNSTI4 8 +ASGNI4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 140 +INDIRI4 +ADDP4 +CNSTF4 1045220557 +ADDRFP4 4 +INDIRP4 +ADDRLP4 140 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 2435 +;2435: ulAngles[ROLL] = viewAngles[ROLL]*0.35f; +ADDRLP4 144 +CNSTI4 8 +ASGNI4 +ADDRFP4 16 +INDIRP4 +ADDRLP4 144 +INDIRI4 +ADDP4 +CNSTF4 1051931443 +ADDRFP4 4 +INDIRP4 +ADDRLP4 144 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 2436 +;2436: llAngles[ROLL] = viewAngles[ROLL]*0.45f; +ADDRLP4 148 +CNSTI4 8 +ASGNI4 +ADDRFP4 20 +INDIRP4 +ADDRLP4 148 +INDIRI4 +ADDP4 +CNSTF4 1055286886 +ADDRFP4 4 +INDIRP4 +ADDRLP4 148 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 2437 +;2437:} +LABELV $1036 +endproc CG_G2ClientSpineAngles 248 36 +data +align 4 +LABELV $1074 +byte 4 0 +byte 4 22 +byte 4 45 +byte 4 -22 +byte 4 0 +byte 4 22 +byte 4 -45 +byte 4 -22 +lit +align 4 +LABELV $1075 +byte 4 0 +byte 4 0 +byte 4 0 +code +proc CG_G2PlayerAngles 1460 44 +line 2439 +;2438: +;2439:static void CG_G2PlayerAngles( centity_t *cent, vec3_t legs[3], vec3_t legsAngles){ +line 2447 +;2440: vec3_t torsoAngles, headAngles; +;2441: float dest; +;2442: static int movementOffsets[8] = { 0, 22, 45, -22, 0, 22, -45, -22 }; +;2443: vec3_t velocity; +;2444: float speed; //, speed_dif, speed_desired; +;2445: int dir; +;2446: vec3_t velPos, velAng; +;2447: int adddir = 0; +ADDRLP4 120 +CNSTI4 0 +ASGNI4 +line 2449 +;2448: float dif; +;2449: float degrees_negative = 0; +ADDRLP4 108 +CNSTF4 0 +ASGNF4 +line 2450 +;2450: float degrees_positive = 0; +ADDRLP4 112 +CNSTF4 0 +ASGNF4 +line 2451 +;2451: vec3_t ulAngles, llAngles, viewAngles, angles, thoracicAngles = {0,0,0}; +ADDRLP4 96 +ADDRGP4 $1075 +INDIRB +ASGNB 12 +line 2453 +;2452: +;2453: VectorCopy( cent->lerpAngles, headAngles ); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 2454 +;2454: headAngles[YAW] = AngleMod( headAngles[YAW] ); +ADDRLP4 12+4 +INDIRF4 +ARGF4 +ADDRLP4 148 +ADDRGP4 AngleMod +CALLF4 +ASGNF4 +ADDRLP4 12+4 +ADDRLP4 148 +INDIRF4 +ASGNF4 +line 2455 +;2455: VectorClear( legsAngles ); +ADDRLP4 152 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 156 +CNSTF4 0 +ASGNF4 +ADDRLP4 152 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 156 +INDIRF4 +ASGNF4 +ADDRLP4 152 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 156 +INDIRF4 +ASGNF4 +ADDRLP4 152 +INDIRP4 +ADDRLP4 156 +INDIRF4 +ASGNF4 +line 2456 +;2456: VectorClear( torsoAngles ); +ADDRLP4 160 +CNSTF4 0 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 160 +INDIRF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 160 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 160 +INDIRF4 +ASGNF4 +line 2461 +;2457: +;2458: // --------- yaw ------------- +;2459: +;2460: // allow yaw to drift a bit +;2461: if ((( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) != BOTH_STAND1) || +ADDRLP4 164 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 168 +CNSTI4 -2049 +ASGNI4 +ADDRLP4 164 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +ADDRLP4 168 +INDIRI4 +BANDI4 +CNSTI4 571 +NEI4 $1082 +ADDRLP4 164 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +ADDRLP4 168 +INDIRI4 +BANDI4 +ADDRLP4 164 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 WeaponReadyAnim +ADDP4 +INDIRI4 +EQI4 $1080 +LABELV $1082 +line 2463 +;2462: ( cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ) != WeaponReadyAnim[cent->currentState.weapon] ) +;2463: { +line 2465 +;2464: // if not standing still, always point all in the same direction +;2465: cent->pe.torso.yawing = qtrue; // always center +ADDRFP4 0 +INDIRP4 +CNSTI4 732 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2466 +;2466: cent->pe.torso.pitching = qtrue; // always center +ADDRFP4 0 +INDIRP4 +CNSTI4 740 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2467 +;2467: cent->pe.legs.yawing = qtrue; // always center +ADDRFP4 0 +INDIRP4 +CNSTI4 668 +ADDP4 +CNSTI4 1 +ASGNI4 +line 2468 +;2468: } +LABELV $1080 +line 2471 +;2469: +;2470: // adjust legs for movement dir +;2471: if ( cent->currentState.eFlags & EF_DEAD ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1083 +line 2473 +;2472: // don't let dead bodies twitch +;2473: dir = 0; +ADDRLP4 88 +CNSTI4 0 +ASGNI4 +line 2474 +;2474: } else { +ADDRGP4 $1084 +JUMPV +LABELV $1083 +line 2475 +;2475: dir = cent->currentState.angles2[YAW]; +ADDRLP4 88 +ADDRFP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 2476 +;2476: if ( dir < 0 || dir > 7 ) { +ADDRLP4 88 +INDIRI4 +CNSTI4 0 +LTI4 $1087 +ADDRLP4 88 +INDIRI4 +CNSTI4 7 +LEI4 $1085 +LABELV $1087 +line 2477 +;2477: CG_Error( "Bad player movement angle" ); +ADDRGP4 $1088 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 2478 +;2478: } +LABELV $1085 +line 2479 +;2479: } +LABELV $1084 +line 2480 +;2480: if (!cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1089 +line 2481 +;2481: { +line 2482 +;2482: torsoAngles[YAW] = headAngles[YAW] + 0.25 * movementOffsets[ dir ]; +ADDRLP4 0+4 +ADDRLP4 12+4 +INDIRF4 +CNSTF4 1048576000 +ADDRLP4 88 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1074 +ADDP4 +INDIRI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 2483 +;2483: } +ADDRGP4 $1090 +JUMPV +LABELV $1089 +line 2485 +;2484: else +;2485: { +line 2486 +;2486: torsoAngles[YAW] = headAngles[YAW]; +ADDRLP4 0+4 +ADDRLP4 12+4 +INDIRF4 +ASGNF4 +line 2487 +;2487: } +LABELV $1090 +line 2494 +;2488: +;2489: // torso +;2490:// CG_SwingAngles( torsoAngles[YAW], 25, 90, /*cg_swingSpeed.value*/ 0.3, ¢->pe.torso.yawAngle, ¢->pe.torso.yawing ); +;2491:// torsoAngles[YAW] = cent->pe.torso.yawAngle; +;2492: +;2493: //for now, turn torso instantly and let the legs swing to follow +;2494: cent->pe.torso.yawAngle = torsoAngles[YAW]; +ADDRFP4 0 +INDIRP4 +CNSTI4 728 +ADDP4 +ADDRLP4 0+4 +INDIRF4 +ASGNF4 +line 2498 +;2495: +;2496: // --------- pitch ------------- +;2497: +;2498: VectorCopy( cent->currentState.pos.trDelta, velocity ); +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRB +ASGNB 12 +line 2499 +;2499: speed = VectorNormalize( velocity ); +ADDRLP4 36 +ARGP4 +ADDRLP4 172 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 84 +ADDRLP4 172 +INDIRF4 +ASGNF4 +line 2501 +;2500: +;2501: if (!speed) +ADDRLP4 84 +INDIRF4 +CNSTF4 0 +NEF4 $1096 +line 2502 +;2502: { +line 2503 +;2503: torsoAngles[YAW] = headAngles[YAW]; +ADDRLP4 0+4 +ADDRLP4 12+4 +INDIRF4 +ASGNF4 +line 2504 +;2504: } +LABELV $1096 +line 2507 +;2505: +;2506: // only show a fraction of the pitch angle in the torso +;2507: if ( headAngles[PITCH] > 180 ) { +ADDRLP4 12 +INDIRF4 +CNSTF4 1127481344 +LEF4 $1100 +line 2508 +;2508: dest = (-360 + headAngles[PITCH]) * 0.75; +ADDRLP4 116 +CNSTF4 1061158912 +ADDRLP4 12 +INDIRF4 +CNSTF4 3283353600 +ADDF4 +MULF4 +ASGNF4 +line 2509 +;2509: } else { +ADDRGP4 $1101 +JUMPV +LABELV $1100 +line 2510 +;2510: dest = headAngles[PITCH] * 0.75; +ADDRLP4 116 +CNSTF4 1061158912 +ADDRLP4 12 +INDIRF4 +MULF4 +ASGNF4 +line 2511 +;2511: } +LABELV $1101 +line 2512 +;2512: CG_SwingAngles( dest, 15, 30, 0.1, ¢->pe.torso.pitchAngle, ¢->pe.torso.pitching ); +ADDRLP4 116 +INDIRF4 +ARGF4 +CNSTF4 1097859072 +ARGF4 +CNSTF4 1106247680 +ARGF4 +CNSTF4 1036831949 +ARGF4 +ADDRLP4 176 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 176 +INDIRP4 +CNSTI4 736 +ADDP4 +ARGP4 +ADDRLP4 176 +INDIRP4 +CNSTI4 740 +ADDP4 +ARGP4 +ADDRGP4 CG_SwingAngles +CALLF4 +pop +line 2513 +;2513: torsoAngles[PITCH] = cent->pe.torso.pitchAngle; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 736 +ADDP4 +INDIRF4 +ASGNF4 +line 2541 +;2514: +;2515: // --------- roll ------------- +;2516: +;2517: +;2518: // lean towards the direction of travel +;2519: +;2520: /* +;2521: speed_desired = cent->currentState.speed/4; +;2522: +;2523: if (!speed) +;2524: { +;2525: speed_dif = 0; +;2526: } +;2527: else +;2528: { +;2529: speed_dif = (speed/speed_desired); +;2530: } +;2531: +;2532: if (speed_dif > 1) +;2533: { +;2534: speed_dif = 1; +;2535: } +;2536: else if (speed_dif < 0) +;2537: { +;2538: speed_dif = 0; +;2539: } +;2540: */ +;2541: if ( speed ) { +ADDRLP4 84 +INDIRF4 +CNSTF4 0 +EQF4 $1102 +line 2545 +;2542: vec3_t axis[3]; +;2543: float side; +;2544: +;2545: speed *= 0.05; +ADDRLP4 84 +CNSTF4 1028443341 +ADDRLP4 84 +INDIRF4 +MULF4 +ASGNF4 +line 2547 +;2546: +;2547: AnglesToAxis( legsAngles, axis ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 180 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 2548 +;2548: side = speed * DotProduct( velocity, axis[1] ); +ADDRLP4 216 +ADDRLP4 84 +INDIRF4 +ADDRLP4 36 +INDIRF4 +ADDRLP4 180+12 +INDIRF4 +MULF4 +ADDRLP4 36+4 +INDIRF4 +ADDRLP4 180+12+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 36+8 +INDIRF4 +ADDRLP4 180+12+8 +INDIRF4 +MULF4 +ADDF4 +MULF4 +ASGNF4 +line 2549 +;2549: legsAngles[ROLL] -= side; +ADDRLP4 220 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 220 +INDIRP4 +ADDRLP4 220 +INDIRP4 +INDIRF4 +ADDRLP4 216 +INDIRF4 +SUBF4 +ASGNF4 +line 2551 +;2550: +;2551: side = speed * DotProduct( velocity, axis[0] ); +ADDRLP4 216 +ADDRLP4 84 +INDIRF4 +ADDRLP4 36 +INDIRF4 +ADDRLP4 180 +INDIRF4 +MULF4 +ADDRLP4 36+4 +INDIRF4 +ADDRLP4 180+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 36+8 +INDIRF4 +ADDRLP4 180+8 +INDIRF4 +MULF4 +ADDF4 +MULF4 +ASGNF4 +line 2552 +;2552: legsAngles[PITCH] += side; +ADDRLP4 224 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 224 +INDIRP4 +ADDRLP4 224 +INDIRP4 +INDIRF4 +ADDRLP4 216 +INDIRF4 +ADDF4 +ASGNF4 +line 2553 +;2553: } +LABELV $1102 +line 2558 +;2554: +;2555: //legsAngles[YAW] = headAngles[YAW] + (movementOffsets[ dir ]*speed_dif); +;2556: +;2557: //rww - crazy velocity-based leg angle calculation +;2558: legsAngles[YAW] = headAngles[YAW]; +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 12+4 +INDIRF4 +ASGNF4 +line 2559 +;2559: velPos[0] = cent->lerpOrigin[0] + velocity[0]; +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRF4 +ADDF4 +ASGNF4 +line 2560 +;2560: velPos[1] = cent->lerpOrigin[1] + velocity[1]; +ADDRLP4 48+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +ADDRLP4 36+4 +INDIRF4 +ADDF4 +ASGNF4 +line 2561 +;2561: velPos[2] = cent->lerpOrigin[2];// + velocity[2]; +ADDRLP4 48+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +ASGNF4 +line 2563 +;2562: +;2563: if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) +ADDRFP4 0 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +CNSTI4 1023 +NEI4 $1119 +line 2564 +;2564: { //off the ground, no direction-based leg angles +line 2565 +;2565: VectorCopy(cent->lerpOrigin, velPos); +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 2566 +;2566: } +LABELV $1119 +line 2568 +;2567: +;2568: VectorSubtract(cent->lerpOrigin, velPos, velAng); +ADDRLP4 180 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 60 +ADDRLP4 180 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +ADDRLP4 48 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 60+4 +ADDRLP4 180 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +ADDRLP4 48+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 60+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +ADDRLP4 48+8 +INDIRF4 +SUBF4 +ASGNF4 +line 2570 +;2569: +;2570: if (!VectorCompare(velAng, vec3_origin)) +ADDRLP4 60 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 184 +ADDRGP4 VectorCompare +CALLI4 +ASGNI4 +ADDRLP4 184 +INDIRI4 +CNSTI4 0 +NEI4 $1125 +line 2571 +;2571: { +line 2572 +;2572: vectoangles(velAng, velAng); +ADDRLP4 60 +ARGP4 +ADDRLP4 60 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 2574 +;2573: +;2574: if (velAng[YAW] <= legsAngles[YAW]) +ADDRLP4 60+4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +GTF4 $1127 +line 2575 +;2575: { +line 2576 +;2576: degrees_negative = (legsAngles[YAW] - velAng[YAW]); +ADDRLP4 108 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 60+4 +INDIRF4 +SUBF4 +ASGNF4 +line 2577 +;2577: degrees_positive = (360 - legsAngles[YAW]) + velAng[YAW]; +ADDRLP4 112 +CNSTF4 1135869952 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ADDRLP4 60+4 +INDIRF4 +ADDF4 +ASGNF4 +line 2578 +;2578: } +ADDRGP4 $1128 +JUMPV +LABELV $1127 +line 2580 +;2579: else +;2580: { +line 2581 +;2581: degrees_negative = legsAngles[YAW] + (360 - velAng[YAW]); +ADDRLP4 108 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1135869952 +ADDRLP4 60+4 +INDIRF4 +SUBF4 +ADDF4 +ASGNF4 +line 2582 +;2582: degrees_positive = (velAng[YAW] - legsAngles[YAW]); +ADDRLP4 112 +ADDRLP4 60+4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 2583 +;2583: } +LABELV $1128 +line 2585 +;2584: +;2585: if (degrees_negative < degrees_positive) +ADDRLP4 108 +INDIRF4 +ADDRLP4 112 +INDIRF4 +GEF4 $1134 +line 2586 +;2586: { +line 2587 +;2587: dif = degrees_negative; +ADDRLP4 92 +ADDRLP4 108 +INDIRF4 +ASGNF4 +line 2588 +;2588: adddir = 0; +ADDRLP4 120 +CNSTI4 0 +ASGNI4 +line 2589 +;2589: } +ADDRGP4 $1135 +JUMPV +LABELV $1134 +line 2591 +;2590: else +;2591: { +line 2592 +;2592: dif = degrees_positive; +ADDRLP4 92 +ADDRLP4 112 +INDIRF4 +ASGNF4 +line 2593 +;2593: adddir = 1; +ADDRLP4 120 +CNSTI4 1 +ASGNI4 +line 2594 +;2594: } +LABELV $1135 +line 2596 +;2595: +;2596: if (dif > 90) +ADDRLP4 92 +INDIRF4 +CNSTF4 1119092736 +LEF4 $1136 +line 2597 +;2597: { +line 2598 +;2598: dif = (180 - dif); +ADDRLP4 92 +CNSTF4 1127481344 +ADDRLP4 92 +INDIRF4 +SUBF4 +ASGNF4 +line 2599 +;2599: } +LABELV $1136 +line 2601 +;2600: +;2601: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1138 +line 2602 +;2602: { +line 2603 +;2603: if (dif > 360) +ADDRLP4 92 +INDIRF4 +CNSTF4 1135869952 +LEF4 $1139 +line 2604 +;2604: { +line 2605 +;2605: dif = 360; +ADDRLP4 92 +CNSTF4 1135869952 +ASGNF4 +line 2606 +;2606: } +line 2607 +;2607: } +ADDRGP4 $1139 +JUMPV +LABELV $1138 +line 2609 +;2608: else +;2609: { +line 2610 +;2610: if (dif > 60) +ADDRLP4 92 +INDIRF4 +CNSTF4 1114636288 +LEF4 $1142 +line 2611 +;2611: { +line 2612 +;2612: dif = 60; +ADDRLP4 92 +CNSTF4 1114636288 +ASGNF4 +line 2613 +;2613: } +LABELV $1142 +line 2614 +;2614: } +LABELV $1139 +line 2617 +;2615: +;2616: //Slight hack for when playing is running backward +;2617: if (dir == 3 || dir == 5) +ADDRLP4 88 +INDIRI4 +CNSTI4 3 +EQI4 $1146 +ADDRLP4 88 +INDIRI4 +CNSTI4 5 +NEI4 $1144 +LABELV $1146 +line 2618 +;2618: { +line 2619 +;2619: dif = -dif; +ADDRLP4 92 +ADDRLP4 92 +INDIRF4 +NEGF4 +ASGNF4 +line 2620 +;2620: } +LABELV $1144 +line 2622 +;2621: +;2622: if (adddir) +ADDRLP4 120 +INDIRI4 +CNSTI4 0 +EQI4 $1147 +line 2623 +;2623: { +line 2624 +;2624: legsAngles[YAW] -= dif; +ADDRLP4 192 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 192 +INDIRP4 +ADDRLP4 192 +INDIRP4 +INDIRF4 +ADDRLP4 92 +INDIRF4 +SUBF4 +ASGNF4 +line 2625 +;2625: } +ADDRGP4 $1148 +JUMPV +LABELV $1147 +line 2627 +;2626: else +;2627: { +line 2628 +;2628: legsAngles[YAW] += dif; +ADDRLP4 192 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 192 +INDIRP4 +ADDRLP4 192 +INDIRP4 +INDIRF4 +ADDRLP4 92 +INDIRF4 +ADDF4 +ASGNF4 +line 2629 +;2629: } +LABELV $1148 +line 2630 +;2630: } +LABELV $1125 +line 2632 +;2631: +;2632: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1149 +line 2633 +;2633: { +line 2634 +;2634: cent->pe.legs.yawSwingDif = CG_SwingAnglesATST( cent, legsAngles[YAW], 40, 360, /*cg_swingSpeed.value*/ 0.05, ¢->pe.legs.yawAngle, ¢->pe.legs.yawing ); +ADDRLP4 188 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 188 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +CNSTF4 1109393408 +ARGF4 +CNSTF4 1135869952 +ARGF4 +CNSTF4 1028443341 +ARGF4 +ADDRLP4 188 +INDIRP4 +CNSTI4 664 +ADDP4 +ARGP4 +ADDRLP4 188 +INDIRP4 +CNSTI4 668 +ADDP4 +ARGP4 +ADDRLP4 192 +ADDRGP4 CG_SwingAnglesATST +CALLF4 +ASGNF4 +ADDRLP4 188 +INDIRP4 +CNSTI4 680 +ADDP4 +ADDRLP4 192 +INDIRF4 +ASGNF4 +line 2635 +;2635: } +ADDRGP4 $1150 +JUMPV +LABELV $1149 +line 2637 +;2636: else +;2637: { +line 2638 +;2638: if (!cg_swingAngles.integer) +ADDRGP4 cg_swingAngles+12 +INDIRI4 +CNSTI4 0 +NEI4 $1151 +line 2639 +;2639: { +line 2640 +;2640: cent->pe.legs.yawAngle = legsAngles[YAW]; +ADDRFP4 0 +INDIRP4 +CNSTI4 664 +ADDP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 2641 +;2641: } +ADDRGP4 $1152 +JUMPV +LABELV $1151 +line 2643 +;2642: else +;2643: { +line 2644 +;2644: CG_SwingAngles( legsAngles[YAW], 40, 90, /*cg_swingSpeed.value*/ 0.3, ¢->pe.legs.yawAngle, ¢->pe.legs.yawing ); +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +CNSTF4 1109393408 +ARGF4 +CNSTF4 1119092736 +ARGF4 +CNSTF4 1050253722 +ARGF4 +ADDRLP4 188 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 188 +INDIRP4 +CNSTI4 664 +ADDP4 +ARGP4 +ADDRLP4 188 +INDIRP4 +CNSTI4 668 +ADDP4 +ARGP4 +ADDRGP4 CG_SwingAngles +CALLF4 +pop +line 2645 +;2645: } +LABELV $1152 +line 2646 +;2646: } +LABELV $1150 +line 2647 +;2647: legsAngles[YAW] = cent->pe.legs.yawAngle; +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 664 +ADDP4 +INDIRF4 +ASGNF4 +line 2650 +;2648: +;2649: // pain twitch +;2650: CG_AddPainTwitch( cent, torsoAngles ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_AddPainTwitch +CALLV +pop +line 2652 +;2651: +;2652: legsAngles[ROLL] = 0; +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 0 +ASGNF4 +line 2653 +;2653: torsoAngles[ROLL] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 2655 +;2654: +;2655: VectorCopy(legsAngles, cent->turAngles); +ADDRFP4 0 +INDIRP4 +CNSTI4 1016 +ADDP4 +ADDRFP4 8 +INDIRP4 +INDIRB +ASGNB 12 +line 2657 +;2656: +;2657: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1155 +line 2658 +;2658: { +line 2659 +;2659: legsAngles[ROLL] = 0; +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 0 +ASGNF4 +line 2660 +;2660: legsAngles[PITCH] = 0; +ADDRFP4 8 +INDIRP4 +CNSTF4 0 +ASGNF4 +line 2661 +;2661: } +LABELV $1155 +line 2664 +;2662: +;2663: // pull the angles back out of the hierarchial chain +;2664: AnglesSubtract( headAngles, torsoAngles, headAngles ); +ADDRLP4 12 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRGP4 AnglesSubtract +CALLV +pop +line 2665 +;2665: AnglesSubtract( torsoAngles, legsAngles, torsoAngles ); +ADDRLP4 0 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 AnglesSubtract +CALLV +pop +line 2667 +;2666: +;2667: legsAngles[PITCH] = 0; +ADDRFP4 8 +INDIRP4 +CNSTF4 0 +ASGNF4 +line 2669 +;2668: +;2669: AnglesToAxis( legsAngles, legs ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 2672 +;2670: // we assume that model 0 is the player model. +;2671: +;2672: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1157 +line 2673 +;2673: { +line 2676 +;2674: vec3_t flatYaw; +;2675: +;2676: flatYaw[YAW] = 0;//cent->lerpAngles[YAW]; +ADDRLP4 188+4 +CNSTF4 0 +ASGNF4 +line 2677 +;2677: flatYaw[ROLL] = 0; +ADDRLP4 188+8 +CNSTF4 0 +ASGNF4 +line 2678 +;2678: flatYaw[PITCH] = 0; +ADDRLP4 188 +CNSTF4 0 +ASGNF4 +line 2679 +;2679: CG_G2SetBoneAngles(cent->ghoul2, 0, "pelvis", flatYaw, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 200 +CNSTI4 0 +ASGNI4 +ADDRLP4 200 +INDIRI4 +ARGI4 +ADDRGP4 $295 +ARGP4 +ADDRLP4 188 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 200 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2681 +;2680: +;2681: CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", torsoAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 204 +CNSTI4 0 +ASGNI4 +ADDRLP4 204 +INDIRI4 +ARGI4 +ADDRGP4 $1163 +ARGP4 +ADDRLP4 0 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 204 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2683 +;2682: +;2683: return; +ADDRGP4 $1073 +JUMPV +LABELV $1157 +line 2688 +;2684: } +;2685: +;2686:// trap_G2API_SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", torsoAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +;2687: +;2688: VectorCopy( cent->lerpAngles, viewAngles ); +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 2689 +;2689: viewAngles[YAW] = viewAngles[ROLL] = 0; +ADDRLP4 188 +CNSTF4 0 +ASGNF4 +ADDRLP4 72+8 +ADDRLP4 188 +INDIRF4 +ASGNF4 +ADDRLP4 72+4 +ADDRLP4 188 +INDIRF4 +ASGNF4 +line 2690 +;2690: viewAngles[PITCH] *= 0.5; +ADDRLP4 72 +CNSTF4 1056964608 +ADDRLP4 72 +INDIRF4 +MULF4 +ASGNF4 +line 2692 +;2691: +;2692: VectorSet( angles, 0, legsAngles[1], 0 ); +ADDRLP4 24 +CNSTF4 0 +ASGNF4 +ADDRLP4 24+4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 24+8 +CNSTF4 0 +ASGNF4 +line 2694 +;2693: +;2694: angles[0] = legsAngles[0]; +ADDRLP4 24 +ADDRFP4 8 +INDIRP4 +INDIRF4 +ASGNF4 +line 2695 +;2695: if ( angles[0] > 30 ) +ADDRLP4 24 +INDIRF4 +CNSTF4 1106247680 +LEF4 $1170 +line 2696 +;2696: { +line 2697 +;2697: angles[0] = 30; +ADDRLP4 24 +CNSTF4 1106247680 +ASGNF4 +line 2698 +;2698: } +ADDRGP4 $1171 +JUMPV +LABELV $1170 +line 2699 +;2699: else if ( angles[0] < -30 ) +ADDRLP4 24 +INDIRF4 +CNSTF4 3253731328 +GEF4 $1172 +line 2700 +;2700: { +line 2701 +;2701: angles[0] = -30; +ADDRLP4 24 +CNSTF4 3253731328 +ASGNF4 +line 2702 +;2702: } +LABELV $1172 +LABELV $1171 +line 2706 +;2703: +;2704:// VectorCopy(legsAngles, angles); +;2705: +;2706: CG_G2ClientSpineAngles(cent, viewAngles, angles, thoracicAngles, ulAngles, llAngles); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 72 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 96 +ARGP4 +ADDRLP4 124 +ARGP4 +ADDRLP4 136 +ARGP4 +ADDRGP4 CG_G2ClientSpineAngles +CALLV +pop +line 2708 +;2707: +;2708: if ( cent->currentState.otherEntityNum2 && !(cent->currentState.eFlags & EF_DEAD) ) +ADDRLP4 192 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 196 +CNSTI4 0 +ASGNI4 +ADDRLP4 192 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRLP4 196 +INDIRI4 +EQI4 $1174 +ADDRLP4 192 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 196 +INDIRI4 +NEI4 $1174 +line 2709 +;2709: { //using an emplaced gun +line 2710 +;2710: centity_t *empEnt = &cg_entities[cent->currentState.otherEntityNum2]; +ADDRLP4 212 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 2713 +;2711: vec3_t headAng; +;2712: +;2713: VectorClear(headAng); +ADDRLP4 216 +CNSTF4 0 +ASGNF4 +ADDRLP4 200+8 +ADDRLP4 216 +INDIRF4 +ASGNF4 +ADDRLP4 200+4 +ADDRLP4 216 +INDIRF4 +ASGNF4 +ADDRLP4 200 +ADDRLP4 216 +INDIRF4 +ASGNF4 +line 2715 +;2714: +;2715: if (empEnt) +ADDRLP4 212 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1178 +line 2716 +;2716: { +line 2719 +;2717: vec3_t dif, empOrg, originalAngle; +;2718: +;2719: VectorCopy(cent->lerpAngles, originalAngle); +ADDRLP4 244 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 2721 +;2720: +;2721: VectorCopy(empEnt->lerpOrigin, empOrg); +ADDRLP4 232 +ADDRLP4 212 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 2723 +;2722: +;2723: empOrg[2] += 32; +ADDRLP4 232+8 +ADDRLP4 232+8 +INDIRF4 +CNSTF4 1107296256 +ADDF4 +ASGNF4 +line 2725 +;2724: +;2725: VectorSubtract(empOrg, cent->lerpOrigin, dif); +ADDRLP4 256 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 220 +ADDRLP4 232 +INDIRF4 +ADDRLP4 256 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 220+4 +ADDRLP4 232+4 +INDIRF4 +ADDRLP4 256 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 220+8 +ADDRLP4 232+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 2726 +;2726: VectorNormalize(dif); +ADDRLP4 220 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 2727 +;2727: vectoangles(dif, dif); +ADDRLP4 220 +ARGP4 +ADDRLP4 220 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 2729 +;2728: +;2729: VectorCopy(dif, cent->lerpAngles); +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRLP4 220 +INDIRB +ASGNB 12 +line 2731 +;2730: +;2731: VectorCopy(cent->lerpAngles, legsAngles); +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 2733 +;2732: +;2733: VectorSubtract(originalAngle, cent->lerpAngles, headAng); +ADDRLP4 260 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 200 +ADDRLP4 244 +INDIRF4 +ADDRLP4 260 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 200+4 +ADDRLP4 244+4 +INDIRF4 +ADDRLP4 260 +INDIRP4 +CNSTI4 944 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 200+8 +ADDRLP4 244+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 2735 +;2734: +;2735: headAng[PITCH] /= 3; //scale it down so that you can't bend your neck all the way back +ADDRLP4 200 +ADDRLP4 200 +INDIRF4 +CNSTF4 1077936128 +DIVF4 +ASGNF4 +line 2736 +;2736: } +ADDRGP4 $1179 +JUMPV +LABELV $1178 +line 2738 +;2737: else +;2738: { +line 2739 +;2739: VectorClear(cent->lerpAngles); +ADDRLP4 220 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 224 +CNSTF4 0 +ASGNF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 948 +ADDP4 +ADDRLP4 224 +INDIRF4 +ASGNF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 944 +ADDP4 +ADDRLP4 224 +INDIRF4 +ASGNF4 +ADDRLP4 220 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRLP4 224 +INDIRF4 +ASGNF4 +line 2740 +;2740: VectorClear(legsAngles); +ADDRLP4 228 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 232 +CNSTF4 0 +ASGNF4 +ADDRLP4 228 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 232 +INDIRF4 +ASGNF4 +ADDRLP4 228 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 232 +INDIRF4 +ASGNF4 +ADDRLP4 228 +INDIRP4 +ADDRLP4 232 +INDIRF4 +ASGNF4 +line 2741 +;2741: } +LABELV $1179 +line 2743 +;2742: +;2743: AnglesToAxis( legsAngles, legs ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 2745 +;2744: +;2745: CG_G2SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 220 +CNSTI4 0 +ASGNI4 +ADDRLP4 220 +INDIRI4 +ARGI4 +ADDRGP4 $303 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 220 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2746 +;2746: CG_G2SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 224 +CNSTI4 0 +ASGNI4 +ADDRLP4 224 +INDIRI4 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 224 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2747 +;2747: CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 228 +CNSTI4 0 +ASGNI4 +ADDRLP4 228 +INDIRI4 +ARGI4 +ADDRGP4 $1163 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 228 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2749 +;2748: +;2749: CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", headAng, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 232 +CNSTI4 0 +ASGNI4 +ADDRLP4 232 +INDIRI4 +ARGI4 +ADDRGP4 $1195 +ARGP4 +ADDRLP4 200 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 232 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2750 +;2750: } +ADDRGP4 $1175 +JUMPV +LABELV $1174 +line 2752 +;2751: else +;2752: { +line 2753 +;2753: CG_G2SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", ulAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 200 +CNSTI4 0 +ASGNI4 +ADDRLP4 200 +INDIRI4 +ARGI4 +ADDRGP4 $303 +ARGP4 +ADDRLP4 124 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 200 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2754 +;2754: CG_G2SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", llAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 204 +CNSTI4 0 +ASGNI4 +ADDRLP4 204 +INDIRI4 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 136 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 204 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2755 +;2755: CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", thoracicAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 208 +CNSTI4 0 +ASGNI4 +ADDRLP4 208 +INDIRI4 +ARGI4 +ADDRGP4 $1163 +ARGP4 +ADDRLP4 96 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 208 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2757 +;2756: +;2757: if (cg_duelHeadAngles.integer && !(cent->currentState.eFlags & EF_DEAD)) +ADDRLP4 212 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_duelHeadAngles+12 +INDIRI4 +ADDRLP4 212 +INDIRI4 +EQI4 $1204 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 212 +INDIRI4 +NEI4 $1204 +line 2758 +;2758: { +line 2759 +;2759: if ( !BG_FlippingAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 216 +ADDRGP4 BG_FlippingAnim +CALLI4 +ASGNI4 +ADDRLP4 216 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 220 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 220 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 224 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 224 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 228 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 228 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 232 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 232 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 236 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 236 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 240 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 240 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 244 +ADDRGP4 CG_InRoll +CALLI4 +ASGNI4 +ADDRLP4 244 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 248 +ADDRGP4 CG_InRollAnim +CALLI4 +ASGNI4 +ADDRLP4 248 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +ADDRFP4 0 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 252 +ADDRGP4 BG_SaberInSpecial +CALLI4 +ASGNI4 +ADDRLP4 252 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 256 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 256 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 260 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 260 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 264 +ADDRGP4 BG_FlippingAnim +CALLI4 +ASGNI4 +ADDRLP4 264 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 268 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 268 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+784 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 272 +ADDRGP4 BG_SpinningSaberAnim +CALLI4 +ASGNI4 +ADDRLP4 272 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 276 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 276 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+784 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 280 +ADDRGP4 BG_InSpecialJump +CALLI4 +ASGNI4 +ADDRLP4 280 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 284 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 284 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+784 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 288 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 288 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+784 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 292 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 292 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+780 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 296 +ADDRGP4 BG_SaberInSpecialAttack +CALLI4 +ASGNI4 +ADDRLP4 296 +INDIRI4 +CNSTI4 0 +NEI4 $1207 +line 2781 +;2760: !BG_SpinningSaberAnim( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && +;2761: !BG_SpinningSaberAnim( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && +;2762: !BG_InSpecialJump( cent->currentState.legsAnim&~ANIM_TOGGLEBIT ) && +;2763: !BG_InSpecialJump( cent->currentState.torsoAnim&~ANIM_TOGGLEBIT ) && +;2764: !BG_InDeathAnim(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && +;2765: !BG_InDeathAnim(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && +;2766: !CG_InRoll(cent) && +;2767: !CG_InRollAnim(cent) && +;2768: !BG_SaberInSpecial(cent->currentState.saberMove) && +;2769: !BG_SaberInSpecialAttack(cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) && +;2770: !BG_SaberInSpecialAttack(cent->currentState.legsAnim&~ANIM_TOGGLEBIT) && +;2771: +;2772: !BG_FlippingAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && +;2773: !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && +;2774: !BG_SpinningSaberAnim( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && +;2775: !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT ) && +;2776: !BG_InSpecialJump( cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT ) && +;2777: !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) && +;2778: !BG_InDeathAnim(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && +;2779: !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].torsoAnim&~ANIM_TOGGLEBIT) && +;2780: !BG_SaberInSpecialAttack(cgs.clientinfo[cent->currentState.number].legsAnim&~ANIM_TOGGLEBIT) ) +;2781: { //use similar check to spine correction, these are the "safe" anims to be in for twisting around +line 2783 +;2782: vec3_t headAngles; +;2783: int duelClient = -1; +ADDRLP4 300 +CNSTI4 -1 +ASGNI4 +line 2785 +;2784: +;2785: if (cgs.gametype == GT_TOURNAMENT && (cent->currentState.number == cgs.duelist1 || cent->currentState.number == cgs.duelist2)) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $1227 +ADDRLP4 316 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 316 +INDIRI4 +ADDRGP4 cgs+36340 +INDIRI4 +EQI4 $1232 +ADDRLP4 316 +INDIRI4 +ADDRGP4 cgs+36344 +INDIRI4 +NEI4 $1227 +LABELV $1232 +line 2786 +;2786: { +line 2787 +;2787: if (cgs.duelist1 >= 0 && cgs.duelist1 < MAX_CLIENTS && +ADDRLP4 320 +CNSTI4 0 +ASGNI4 +ADDRGP4 cgs+36340 +INDIRI4 +ADDRLP4 320 +INDIRI4 +LTI4 $1228 +ADDRLP4 324 +CNSTI4 32 +ASGNI4 +ADDRGP4 cgs+36340 +INDIRI4 +ADDRLP4 324 +INDIRI4 +GEI4 $1228 +ADDRGP4 cgs+36344 +INDIRI4 +ADDRLP4 320 +INDIRI4 +LTI4 $1228 +ADDRGP4 cgs+36344 +INDIRI4 +ADDRLP4 324 +INDIRI4 +GEI4 $1228 +line 2789 +;2788: cgs.duelist2 >= 0 && cgs.duelist2 < MAX_CLIENTS) +;2789: { +line 2790 +;2790: if (cent->currentState.number == cgs.duelist1) +ADDRFP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cgs+36340 +INDIRI4 +NEI4 $1239 +line 2791 +;2791: { +line 2792 +;2792: duelClient = cgs.duelist2; +ADDRLP4 300 +ADDRGP4 cgs+36344 +INDIRI4 +ASGNI4 +line 2793 +;2793: } +ADDRGP4 $1228 +JUMPV +LABELV $1239 +line 2795 +;2794: else +;2795: { +line 2796 +;2796: duelClient = cgs.duelist1; +ADDRLP4 300 +ADDRGP4 cgs+36340 +INDIRI4 +ASGNI4 +line 2797 +;2797: } +line 2798 +;2798: } +line 2799 +;2799: } +ADDRGP4 $1228 +JUMPV +LABELV $1227 +line 2800 +;2800: else if (cg.snap && cg.snap->ps.duelInProgress) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1244 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1348 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1244 +line 2801 +;2801: { +line 2802 +;2802: if (cent->currentState.number == cg.snap->ps.duelIndex) +ADDRFP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +NEI4 $1248 +line 2803 +;2803: { +line 2804 +;2804: duelClient = cg.snap->ps.clientNum; +ADDRLP4 300 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ASGNI4 +line 2805 +;2805: } +ADDRGP4 $1249 +JUMPV +LABELV $1248 +line 2806 +;2806: else if (cent->currentState.number == cg.snap->ps.clientNum) +ADDRFP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $1252 +line 2807 +;2807: { +line 2808 +;2808: duelClient = cg.snap->ps.duelIndex; +ADDRLP4 300 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +ASGNI4 +line 2809 +;2809: } +LABELV $1252 +LABELV $1249 +line 2810 +;2810: } +LABELV $1244 +LABELV $1228 +line 2812 +;2811: +;2812: if (duelClient != -1) +ADDRLP4 300 +INDIRI4 +CNSTI4 -1 +EQI4 $1256 +line 2813 +;2813: { +line 2816 +;2814: trace_t tr; +;2815: +;2816: CG_Trace( &tr, cent->lerpOrigin, NULL, NULL, cg_entities[duelClient].lerpOrigin, cent->currentState.number, MASK_PLAYERSOLID ); +ADDRLP4 320 +ARGP4 +ADDRLP4 1400 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1400 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 1404 +CNSTP4 0 +ASGNP4 +ADDRLP4 1404 +INDIRP4 +ARGP4 +ADDRLP4 1404 +INDIRP4 +ARGP4 +CNSTI4 1920 +ADDRLP4 300 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+928 +ADDP4 +ARGP4 +ADDRLP4 1400 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 273 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 2818 +;2817: +;2818: if (tr.fraction == 1.0 || +ADDRLP4 320+8 +INDIRF4 +CNSTF4 1065353216 +EQF4 $1263 +ADDRLP4 320+52 +INDIRI4 +ADDRLP4 300 +INDIRI4 +NEI4 $1259 +LABELV $1263 +line 2820 +;2819: tr.entityNum == duelClient) +;2820: { +line 2821 +;2821: centity_t *duelCEnt = &cg_entities[duelClient]; +ADDRLP4 1408 +CNSTI4 1920 +ADDRLP4 300 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 2824 +;2822: vec3_t headSub; +;2823: +;2824: VectorSubtract(duelCEnt->lerpOrigin, cent->lerpOrigin, headSub); +ADDRLP4 1424 +ADDRLP4 1408 +INDIRP4 +ASGNP4 +ADDRLP4 1428 +CNSTI4 928 +ASGNI4 +ADDRLP4 1432 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1412 +ADDRLP4 1424 +INDIRP4 +ADDRLP4 1428 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 1432 +INDIRP4 +ADDRLP4 1428 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1436 +CNSTI4 932 +ASGNI4 +ADDRLP4 1412+4 +ADDRLP4 1424 +INDIRP4 +ADDRLP4 1436 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 1432 +INDIRP4 +ADDRLP4 1436 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1440 +CNSTI4 936 +ASGNI4 +ADDRLP4 1412+8 +ADDRLP4 1408 +INDIRP4 +ADDRLP4 1440 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 1440 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 2825 +;2825: vectoangles(headSub, headSub); +ADDRLP4 1412 +ARGP4 +ADDRLP4 1412 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 2827 +;2826: +;2827: headAngles[ROLL] = AngleSubtract(headSub[ROLL], cent->lerpAngles[ROLL]); +ADDRLP4 1412+8 +INDIRF4 +ARGF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 948 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 1444 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRLP4 304+8 +ADDRLP4 1444 +INDIRF4 +ASGNF4 +line 2828 +;2828: headAngles[YAW] = AngleSubtract(headSub[YAW], cent->lerpAngles[YAW]); +ADDRLP4 1412+4 +INDIRF4 +ARGF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 944 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 1448 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRLP4 304+4 +ADDRLP4 1448 +INDIRF4 +ASGNF4 +line 2830 +;2829: +;2830: if (headAngles[YAW] > 55) +ADDRLP4 304+4 +INDIRF4 +CNSTF4 1113325568 +LEF4 $1270 +line 2831 +;2831: { +line 2832 +;2832: headAngles[YAW] = 55; +ADDRLP4 304+4 +CNSTF4 1113325568 +ASGNF4 +line 2833 +;2833: } +LABELV $1270 +line 2834 +;2834: if (headAngles[YAW] < -55) +ADDRLP4 304+4 +INDIRF4 +CNSTF4 3260809216 +GEF4 $1274 +line 2835 +;2835: { +line 2836 +;2836: headAngles[YAW] = -55; +ADDRLP4 304+4 +CNSTF4 3260809216 +ASGNF4 +line 2837 +;2837: } +LABELV $1274 +line 2839 +;2838: +;2839: VectorCopy( cent->lerpAngles, viewAngles ); +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 2840 +;2840: viewAngles[YAW] = viewAngles[ROLL] = 0; +ADDRLP4 1452 +CNSTF4 0 +ASGNF4 +ADDRLP4 72+8 +ADDRLP4 1452 +INDIRF4 +ASGNF4 +ADDRLP4 72+4 +ADDRLP4 1452 +INDIRF4 +ASGNF4 +line 2841 +;2841: viewAngles[PITCH] *= 0.5; +ADDRLP4 72 +CNSTF4 1056964608 +ADDRLP4 72 +INDIRF4 +MULF4 +ASGNF4 +line 2843 +;2842: +;2843: headAngles[PITCH] = AngleSubtract(headSub[PITCH], viewAngles[PITCH]); +ADDRLP4 1412 +INDIRF4 +ARGF4 +ADDRLP4 72 +INDIRF4 +ARGF4 +ADDRLP4 1456 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRLP4 304 +ADDRLP4 1456 +INDIRF4 +ASGNF4 +line 2844 +;2844: if (headAngles[PITCH] > 16) +ADDRLP4 304 +INDIRF4 +CNSTF4 1098907648 +LEF4 $1280 +line 2845 +;2845: { +line 2846 +;2846: headAngles[PITCH] = 16; +ADDRLP4 304 +CNSTF4 1098907648 +ASGNF4 +line 2847 +;2847: } +LABELV $1280 +line 2848 +;2848: if (headAngles[PITCH] < -16) +ADDRLP4 304 +INDIRF4 +CNSTF4 3246391296 +GEF4 $1282 +line 2849 +;2849: { +line 2850 +;2850: headAngles[PITCH] = -16; +ADDRLP4 304 +CNSTF4 3246391296 +ASGNF4 +line 2851 +;2851: } +LABELV $1282 +line 2852 +;2852: headAngles[PITCH] += 6; +ADDRLP4 304 +ADDRLP4 304 +INDIRF4 +CNSTF4 1086324736 +ADDF4 +ASGNF4 +line 2853 +;2853: } +ADDRGP4 $1257 +JUMPV +LABELV $1259 +line 2855 +;2854: else +;2855: { +line 2856 +;2856: VectorClear(headAngles); +ADDRLP4 1408 +CNSTF4 0 +ASGNF4 +ADDRLP4 304+8 +ADDRLP4 1408 +INDIRF4 +ASGNF4 +ADDRLP4 304+4 +ADDRLP4 1408 +INDIRF4 +ASGNF4 +ADDRLP4 304 +ADDRLP4 1408 +INDIRF4 +ASGNF4 +line 2857 +;2857: } +line 2858 +;2858: } +ADDRGP4 $1257 +JUMPV +LABELV $1256 +line 2860 +;2859: else +;2860: { +line 2861 +;2861: VectorClear(headAngles); +ADDRLP4 320 +CNSTF4 0 +ASGNF4 +ADDRLP4 304+8 +ADDRLP4 320 +INDIRF4 +ASGNF4 +ADDRLP4 304+4 +ADDRLP4 320 +INDIRF4 +ASGNF4 +ADDRLP4 304 +ADDRLP4 320 +INDIRF4 +ASGNF4 +line 2862 +;2862: } +LABELV $1257 +line 2864 +;2863: +;2864: CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", headAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 320 +CNSTI4 0 +ASGNI4 +ADDRLP4 320 +INDIRI4 +ARGI4 +ADDRGP4 $1195 +ARGP4 +ADDRLP4 304 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 320 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2865 +;2865: } +ADDRGP4 $1205 +JUMPV +LABELV $1207 +line 2867 +;2866: else +;2867: { +line 2868 +;2868: VectorClear(headAngles); +ADDRLP4 300 +CNSTF4 0 +ASGNF4 +ADDRLP4 12+8 +ADDRLP4 300 +INDIRF4 +ASGNF4 +ADDRLP4 12+4 +ADDRLP4 300 +INDIRF4 +ASGNF4 +ADDRLP4 12 +ADDRLP4 300 +INDIRF4 +ASGNF4 +line 2869 +;2869: CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", headAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 304 +CNSTI4 0 +ASGNI4 +ADDRLP4 304 +INDIRI4 +ARGI4 +ADDRGP4 $1195 +ARGP4 +ADDRLP4 12 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 304 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2870 +;2870: } +line 2871 +;2871: } +ADDRGP4 $1205 +JUMPV +LABELV $1204 +line 2873 +;2872: else +;2873: { +line 2874 +;2874: CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 216 +CNSTI4 0 +ASGNI4 +ADDRLP4 216 +INDIRI4 +ARGI4 +ADDRGP4 $1195 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 216 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 2875 +;2875: } +LABELV $1205 +line 2876 +;2876: } +LABELV $1175 +line 2879 +;2877: +;2878: //trap_G2API_SetBoneAngles(cent->ghoul2, 0, "cranium", headAngles, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, cgs.gameModels, 0, cg.time); +;2879:} +LABELV $1073 +endproc CG_G2PlayerAngles 1460 44 +proc CG_HasteTrail 40 48 +line 2887 +;2880://========================================================================== +;2881: +;2882:/* +;2883:=============== +;2884:CG_HasteTrail +;2885:=============== +;2886:*/ +;2887:static void CG_HasteTrail( centity_t *cent ) { +line 2892 +;2888: localEntity_t *smoke; +;2889: vec3_t origin; +;2890: int anim; +;2891: +;2892: if ( cent->trailTime > cg.time ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 612 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $1297 +line 2893 +;2893: return; +ADDRGP4 $1296 +JUMPV +LABELV $1297 +line 2895 +;2894: } +;2895: anim = cent->pe.legs.animationNumber & ~ANIM_TOGGLEBIT; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 684 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 2896 +;2896: if ( anim != BOTH_RUN1 && anim != BOTH_RUNBACK1 ) { +ADDRLP4 12 +INDIRI4 +CNSTI4 833 +EQI4 $1300 +ADDRLP4 12 +INDIRI4 +CNSTI4 854 +EQI4 $1300 +line 2897 +;2897: return; +ADDRGP4 $1296 +JUMPV +LABELV $1300 +line 2900 +;2898: } +;2899: +;2900: cent->trailTime += 100; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 612 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 100 +ADDI4 +ASGNI4 +line 2901 +;2901: if ( cent->trailTime < cg.time ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 612 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $1302 +line 2902 +;2902: cent->trailTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 612 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 2903 +;2903: } +LABELV $1302 +line 2905 +;2904: +;2905: VectorCopy( cent->lerpOrigin, origin ); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 2906 +;2906: origin[2] -= 16; +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 2908 +;2907: +;2908: smoke = CG_SmokePuff( origin, vec3_origin, +ADDRLP4 0 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTF4 1090519040 +ARGF4 +ADDRLP4 28 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +CNSTF4 1140457472 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 32 +CNSTI4 0 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRGP4 cgs+70296+476 +INDIRI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 CG_SmokePuff +CALLP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 36 +INDIRP4 +ASGNP4 +line 2918 +;2909: 8, +;2910: 1, 1, 1, 1, +;2911: 500, +;2912: cg.time, +;2913: 0, +;2914: 0, +;2915: cgs.media.hastePuffShader ); +;2916: +;2917: // use the optimized local entity add +;2918: smoke->leType = LE_SCALE_FADE; +ADDRLP4 16 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 9 +ASGNI4 +line 2919 +;2919:} +LABELV $1296 +endproc CG_HasteTrail 40 48 +proc CG_PlayerFlag 368 36 +line 3005 +;2920: +;2921:/* +;2922:=============== +;2923:CG_DustTrail +;2924:=============== +;2925:*/ +;2926:/* +;2927:static void CG_DustTrail( centity_t *cent ) { +;2928: int anim; +;2929: localEntity_t *dust; +;2930: vec3_t end, vel; +;2931: trace_t tr; +;2932: +;2933: if (!cg_enableDust.integer) +;2934: return; +;2935: +;2936: if ( cent->dustTrailTime > cg.time ) { +;2937: return; +;2938: } +;2939: +;2940: anim = cent->pe.legs.animationNumber & ~ANIM_TOGGLEBIT; +;2941: if ( anim != LEGS_LANDB && anim != LEGS_LAND ) { +;2942: return; +;2943: } +;2944: +;2945: cent->dustTrailTime += 40; +;2946: if ( cent->dustTrailTime < cg.time ) { +;2947: cent->dustTrailTime = cg.time; +;2948: } +;2949: +;2950: VectorCopy(cent->currentState.pos.trBase, end); +;2951: end[2] -= 64; +;2952: CG_Trace( &tr, cent->currentState.pos.trBase, NULL, NULL, end, cent->currentState.number, MASK_PLAYERSOLID ); +;2953: +;2954: if ( !(tr.surfaceFlags & SURF_DUST) ) +;2955: return; +;2956: +;2957: VectorCopy( cent->currentState.pos.trBase, end ); +;2958: end[2] -= 16; +;2959: +;2960: VectorSet(vel, 0, 0, -30); +;2961: dust = CG_SmokePuff( end, vel, +;2962: 24, +;2963: .8f, .8f, 0.7f, 0.33f, +;2964: 500, +;2965: cg.time, +;2966: 0, +;2967: 0, +;2968: cgs.media.dustPuffShader ); +;2969:} +;2970:*/ +;2971: +;2972:/* +;2973:=============== +;2974:CG_TrailItem +;2975:=============== +;2976:*/ +;2977:#if 0 +;2978:static void CG_TrailItem( centity_t *cent, qhandle_t hModel ) { +;2979: refEntity_t ent; +;2980: vec3_t angles; +;2981: vec3_t axis[3]; +;2982: +;2983: VectorCopy( cent->lerpAngles, angles ); +;2984: angles[PITCH] = 0; +;2985: angles[ROLL] = 0; +;2986: AnglesToAxis( angles, axis ); +;2987: +;2988: memset( &ent, 0, sizeof( ent ) ); +;2989: VectorMA( cent->lerpOrigin, -16, axis[0], ent.origin ); +;2990: ent.origin[2] += 16; +;2991: angles[YAW] += 90; +;2992: AnglesToAxis( angles, ent.axis ); +;2993: +;2994: ent.hModel = hModel; +;2995: trap_R_AddRefEntityToScene( &ent ); +;2996:} +;2997:#endif +;2998: +;2999: +;3000:/* +;3001:=============== +;3002:CG_PlayerFlag +;3003:=============== +;3004:*/ +;3005:static void CG_PlayerFlag( centity_t *cent, qhandle_t hModel ) { +line 3012 +;3006: refEntity_t ent; +;3007: vec3_t angles; +;3008: vec3_t axis[3]; +;3009: vec3_t boltOrg, tAng, getAng, right; +;3010: mdxaBone_t boltMatrix; +;3011: +;3012: if (cent->currentState.number == cg.snap->ps.clientNum && +ADDRFP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $1311 +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $1311 +line 3014 +;3013: !cg.renderingThirdPerson) +;3014: { +line 3015 +;3015: return; +ADDRGP4 $1310 +JUMPV +LABELV $1311 +line 3018 +;3016: } +;3017: +;3018: if (!cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1315 +line 3019 +;3019: { +line 3020 +;3020: return; +ADDRGP4 $1310 +JUMPV +LABELV $1315 +line 3023 +;3021: } +;3022: +;3023: VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); +ADDRLP4 356 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 224 +ADDRLP4 356 +INDIRP4 +CNSTI4 1016 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 224+4 +ADDRLP4 356 +INDIRP4 +CNSTI4 1020 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 224+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 1024 +ADDP4 +INDIRF4 +ASGNF4 +line 3025 +;3024: +;3025: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_llumbar, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 360 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 360 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 788 +ADDRLP4 360 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+528 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 308 +ARGP4 +ADDRLP4 224 +ARGP4 +ADDRLP4 360 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 360 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 3026 +;3026: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, boltOrg); +ADDRLP4 308 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 212 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 3028 +;3027: +;3028: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, tAng); +ADDRLP4 308 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 224 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 3029 +;3029: vectoangles(tAng, tAng); +ADDRLP4 224 +ARGP4 +ADDRLP4 224 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 3031 +;3030: +;3031: VectorCopy(cent->lerpAngles, angles); +ADDRLP4 236 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 3033 +;3032: +;3033: boltOrg[2] -= 12; +ADDRLP4 212+8 +ADDRLP4 212+8 +INDIRF4 +CNSTF4 1094713344 +SUBF4 +ASGNF4 +line 3034 +;3034: VectorSet(getAng, 0, cent->lerpAngles[1], 0); +ADDRLP4 284 +CNSTF4 0 +ASGNF4 +ADDRLP4 284+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 944 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 284+8 +CNSTF4 0 +ASGNF4 +line 3035 +;3035: AngleVectors(getAng, 0, right, 0); +ADDRLP4 284 +ARGP4 +ADDRLP4 364 +CNSTP4 0 +ASGNP4 +ADDRLP4 364 +INDIRP4 +ARGP4 +ADDRLP4 296 +ARGP4 +ADDRLP4 364 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 3036 +;3036: boltOrg[0] += right[0]*8; +ADDRLP4 212 +ADDRLP4 212 +INDIRF4 +CNSTF4 1090519040 +ADDRLP4 296 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3037 +;3037: boltOrg[1] += right[1]*8; +ADDRLP4 212+4 +ADDRLP4 212+4 +INDIRF4 +CNSTF4 1090519040 +ADDRLP4 296+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3038 +;3038: boltOrg[2] += right[2]*8; +ADDRLP4 212+8 +ADDRLP4 212+8 +INDIRF4 +CNSTF4 1090519040 +ADDRLP4 296+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3040 +;3039: +;3040: angles[PITCH] = -cent->lerpAngles[PITCH]/2-30; +ADDRLP4 236 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRF4 +NEGF4 +CNSTF4 1073741824 +DIVF4 +CNSTF4 1106247680 +SUBF4 +ASGNF4 +line 3041 +;3041: angles[YAW] = tAng[YAW]+270; +ADDRLP4 236+4 +ADDRLP4 224+4 +INDIRF4 +CNSTF4 1132920832 +ADDF4 +ASGNF4 +line 3043 +;3042: +;3043: AnglesToAxis(angles, axis); +ADDRLP4 236 +ARGP4 +ADDRLP4 248 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 3045 +;3044: +;3045: memset( &ent, 0, sizeof( ent ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 3046 +;3046: VectorMA( boltOrg, 24, axis[0], ent.origin ); +ADDRLP4 0+52 +ADDRLP4 212 +INDIRF4 +CNSTF4 1103101952 +ADDRLP4 248 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+4 +ADDRLP4 212+4 +INDIRF4 +CNSTF4 1103101952 +ADDRLP4 248+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+8 +ADDRLP4 212+8 +INDIRF4 +CNSTF4 1103101952 +ADDRLP4 248+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3048 +;3047: +;3048: angles[ROLL] += 20; +ADDRLP4 236+8 +ADDRLP4 236+8 +INDIRF4 +CNSTF4 1101004800 +ADDF4 +ASGNF4 +line 3049 +;3049: AnglesToAxis( angles, ent.axis ); +ADDRLP4 236 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 3051 +;3050: +;3051: ent.hModel = hModel; +ADDRLP4 0+8 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 3053 +;3052: +;3053: ent.modelScale[0] = 0.5; +ADDRLP4 0+196 +CNSTF4 1056964608 +ASGNF4 +line 3054 +;3054: ent.modelScale[1] = 0.5; +ADDRLP4 0+196+4 +CNSTF4 1056964608 +ASGNF4 +line 3055 +;3055: ent.modelScale[2] = 0.5; +ADDRLP4 0+196+8 +CNSTF4 1056964608 +ASGNF4 +line 3056 +;3056: ScaleModelAxis(&ent); +ADDRLP4 0 +ARGP4 +ADDRGP4 ScaleModelAxis +CALLV +pop +line 3067 +;3057: +;3058: /* +;3059: if (cent->currentState.number == cg.snap->ps.clientNum) +;3060: { //If we're the current client (in third person), render the flag on our back transparently +;3061: ent.renderfx |= RF_FORCE_ENT_ALPHA; +;3062: ent.shaderRGBA[3] = 100; +;3063: } +;3064: */ +;3065: //FIXME: Not doing this at the moment because sorting totally messes up +;3066: +;3067: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 3068 +;3068:} +LABELV $1310 +endproc CG_PlayerFlag 368 36 +proc CG_PlayerPowerups 16 20 +line 3076 +;3069: +;3070: +;3071:/* +;3072:=============== +;3073:CG_PlayerPowerups +;3074:=============== +;3075:*/ +;3076:static void CG_PlayerPowerups( centity_t *cent, refEntity_t *torso ) { +line 3080 +;3077: int powerups; +;3078: clientInfo_t *ci; +;3079: +;3080: powerups = cent->currentState.powerups; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +ASGNI4 +line 3081 +;3081: if ( !powerups ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1350 +line 3082 +;3082: return; +ADDRGP4 $1349 +JUMPV +LABELV $1350 +line 3086 +;3083: } +;3084: +;3085: // quad gives a dlight +;3086: if ( powerups & ( 1 << PW_QUAD ) ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1352 +line 3087 +;3087: trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 0.2f, 0.2f, 1 ); +ADDRLP4 8 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 8 +INDIRI4 +CNSTI4 31 +BANDI4 +CNSTI4 200 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +CNSTF4 1045220557 +ASGNF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 trap_R_AddLightToScene +CALLV +pop +line 3088 +;3088: } +LABELV $1352 +line 3090 +;3089: +;3090: ci = &cgs.clientinfo[ cent->currentState.clientNum ]; +ADDRLP4 4 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 3092 +;3091: // redflag +;3092: if ( powerups & ( 1 << PW_REDFLAG ) ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $1355 +line 3093 +;3093: CG_PlayerFlag( cent, cgs.media.redFlagModel ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 cgs+70296+36 +INDIRI4 +ARGI4 +ADDRGP4 CG_PlayerFlag +CALLV +pop +line 3094 +;3094: trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 1.0, 0.2f, 0.2f ); +ADDRLP4 8 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 8 +INDIRI4 +CNSTI4 31 +BANDI4 +CNSTI4 200 +ADDI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 12 +CNSTF4 1045220557 +ASGNF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRGP4 trap_R_AddLightToScene +CALLV +pop +line 3095 +;3095: } +LABELV $1355 +line 3098 +;3096: +;3097: // blueflag +;3098: if ( powerups & ( 1 << PW_BLUEFLAG ) ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +BANDI4 +CNSTI4 0 +EQI4 $1359 +line 3099 +;3099: CG_PlayerFlag( cent, cgs.media.blueFlagModel ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 cgs+70296+40 +INDIRI4 +ARGI4 +ADDRGP4 CG_PlayerFlag +CALLV +pop +line 3100 +;3100: trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 0.2f, 0.2f, 1.0 ); +ADDRLP4 8 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 8 +INDIRI4 +CNSTI4 31 +BANDI4 +CNSTI4 200 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +CNSTF4 1045220557 +ASGNF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 trap_R_AddLightToScene +CALLV +pop +line 3101 +;3101: } +LABELV $1359 +line 3104 +;3102: +;3103: // neutralflag +;3104: if ( powerups & ( 1 << PW_NEUTRALFLAG ) ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 64 +BANDI4 +CNSTI4 0 +EQI4 $1363 +line 3105 +;3105: trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 1.0, 1.0, 1.0 ); +ADDRLP4 8 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 8 +INDIRI4 +CNSTI4 31 +BANDI4 +CNSTI4 200 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRGP4 trap_R_AddLightToScene +CALLV +pop +line 3106 +;3106: } +LABELV $1363 +line 3109 +;3107: +;3108: // haste leaves smoke trails +;3109: if ( powerups & ( 1 << PW_HASTE ) ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 8 +BANDI4 +CNSTI4 0 +EQI4 $1365 +line 3110 +;3110: CG_HasteTrail( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_HasteTrail +CALLV +pop +line 3111 +;3111: } +LABELV $1365 +line 3112 +;3112:} +LABELV $1349 +endproc CG_PlayerPowerups 16 20 +proc CG_PlayerFloatSprite 216 12 +line 3122 +;3113: +;3114: +;3115:/* +;3116:=============== +;3117:CG_PlayerFloatSprite +;3118: +;3119:Float a sprite over the player's head +;3120:=============== +;3121:*/ +;3122:static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader ) { +line 3126 +;3123: int rf; +;3124: refEntity_t ent; +;3125: +;3126: if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson ) { +ADDRFP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $1368 +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $1368 +line 3127 +;3127: rf = RF_THIRD_PERSON; // only show in mirrors +ADDRLP4 212 +CNSTI4 2 +ASGNI4 +line 3128 +;3128: } else { +ADDRGP4 $1369 +JUMPV +LABELV $1368 +line 3129 +;3129: rf = 0; +ADDRLP4 212 +CNSTI4 0 +ASGNI4 +line 3130 +;3130: } +LABELV $1369 +line 3132 +;3131: +;3132: memset( &ent, 0, sizeof( ent ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 3133 +;3133: VectorCopy( cent->lerpOrigin, ent.origin ); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 3134 +;3134: ent.origin[2] += 48; +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +CNSTF4 1111490560 +ADDF4 +ASGNF4 +line 3135 +;3135: ent.reType = RT_SPRITE; +ADDRLP4 0 +CNSTI4 2 +ASGNI4 +line 3136 +;3136: ent.customShader = shader; +ADDRLP4 0+76 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 3137 +;3137: ent.radius = 10; +ADDRLP4 0+92 +CNSTF4 1092616192 +ASGNF4 +line 3138 +;3138: ent.renderfx = rf; +ADDRLP4 0+4 +ADDRLP4 212 +INDIRI4 +ASGNI4 +line 3139 +;3139: ent.shaderRGBA[0] = 255; +ADDRLP4 0+80 +CNSTU1 255 +ASGNU1 +line 3140 +;3140: ent.shaderRGBA[1] = 255; +ADDRLP4 0+80+1 +CNSTU1 255 +ASGNU1 +line 3141 +;3141: ent.shaderRGBA[2] = 255; +ADDRLP4 0+80+2 +CNSTU1 255 +ASGNU1 +line 3142 +;3142: ent.shaderRGBA[3] = 255; +ADDRLP4 0+80+3 +CNSTU1 255 +ASGNU1 +line 3143 +;3143: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 3144 +;3144:} +LABELV $1367 +endproc CG_PlayerFloatSprite 216 12 +proc CG_PlayerSprites 8 20 +line 3189 +;3145: +;3146: +;3147: +;3148:/* +;3149:=============== +;3150:CG_PlayerFloatSprite +;3151: +;3152:Same as above but allows custom RGBA values +;3153:=============== +;3154:*/ +;3155:#if 0 +;3156:static void CG_PlayerFloatSpriteRGBA( centity_t *cent, qhandle_t shader, vec4_t rgba ) { +;3157: int rf; +;3158: refEntity_t ent; +;3159: +;3160: if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson ) { +;3161: rf = RF_THIRD_PERSON; // only show in mirrors +;3162: } else { +;3163: rf = 0; +;3164: } +;3165: +;3166: memset( &ent, 0, sizeof( ent ) ); +;3167: VectorCopy( cent->lerpOrigin, ent.origin ); +;3168: ent.origin[2] += 48; +;3169: ent.reType = RT_SPRITE; +;3170: ent.customShader = shader; +;3171: ent.radius = 10; +;3172: ent.renderfx = rf; +;3173: ent.shaderRGBA[0] = rgba[0]; +;3174: ent.shaderRGBA[1] = rgba[1]; +;3175: ent.shaderRGBA[2] = rgba[2]; +;3176: ent.shaderRGBA[3] = rgba[3]; +;3177: trap_R_AddRefEntityToScene( &ent ); +;3178:} +;3179:#endif +;3180: +;3181: +;3182:/* +;3183:=============== +;3184:CG_PlayerSprites +;3185: +;3186:Float sprites over the player's head +;3187:=============== +;3188:*/ +;3189:static void CG_PlayerSprites( centity_t *cent ) { +line 3192 +;3190:// int team; +;3191: +;3192: if (cg.snap && +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1386 +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 CG_IsMindTricked +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $1386 +line 3198 +;3193: CG_IsMindTricked(cent->currentState.trickedentindex, +;3194: cent->currentState.trickedentindex2, +;3195: cent->currentState.trickedentindex3, +;3196: cent->currentState.trickedentindex4, +;3197: cg.snap->ps.clientNum)) +;3198: { +line 3199 +;3199: return; //this entity is mind-tricking the current client, so don't render it +ADDRGP4 $1385 +JUMPV +LABELV $1386 +line 3202 +;3200: } +;3201: +;3202: if ( cent->currentState.eFlags & EF_CONNECTION ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 8192 +BANDI4 +CNSTI4 0 +EQI4 $1390 +line 3203 +;3203: CG_PlayerFloatSprite( cent, cgs.media.connectionShader ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 cgs+70296+188 +INDIRI4 +ARGI4 +ADDRGP4 CG_PlayerFloatSprite +CALLV +pop +line 3204 +;3204: return; +ADDRGP4 $1385 +JUMPV +LABELV $1390 +line 3207 +;3205: } +;3206: +;3207: if ( cent->currentState.eFlags & EF_TALK ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $1394 +line 3208 +;3208: CG_PlayerFloatSprite( cent, cgs.media.balloonShader ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 cgs+70296+184 +INDIRI4 +ARGI4 +ADDRGP4 CG_PlayerFloatSprite +CALLV +pop +line 3209 +;3209: return; +LABELV $1394 +line 3252 +;3210: } +;3211:/* +;3212: if ( cent->currentState.eFlags & EF_AWARD_IMPRESSIVE ) { +;3213: CG_PlayerFloatSprite( cent, cgs.media.medalImpressive ); +;3214: return; +;3215: } +;3216: +;3217: if ( cent->currentState.eFlags & EF_AWARD_EXCELLENT ) { +;3218: CG_PlayerFloatSprite( cent, cgs.media.medalExcellent ); +;3219: return; +;3220: } +;3221: +;3222: if ( cent->currentState.eFlags & EF_AWARD_GAUNTLET ) { +;3223: CG_PlayerFloatSprite( cent, cgs.media.medalGauntlet ); +;3224: return; +;3225: } +;3226: +;3227: if ( cent->currentState.eFlags & EF_AWARD_DEFEND ) { +;3228: CG_PlayerFloatSprite( cent, cgs.media.medalDefend ); +;3229: return; +;3230: } +;3231: +;3232: if ( cent->currentState.eFlags & EF_AWARD_ASSIST ) { +;3233: CG_PlayerFloatSprite( cent, cgs.media.medalAssist ); +;3234: return; +;3235: } +;3236: +;3237: if ( cent->currentState.eFlags & EF_AWARD_CAP ) { +;3238: CG_PlayerFloatSprite( cent, cgs.media.medalCapture ); +;3239: return; +;3240: } +;3241: +;3242: team = cgs.clientinfo[ cent->currentState.clientNum ].team; +;3243: if ( !(cent->currentState.eFlags & EF_DEAD) && +;3244: cg.snap->ps.persistant[PERS_TEAM] == team && +;3245: cgs.gametype >= GT_TEAM) { +;3246: if (cg_drawFriend.integer) { +;3247: CG_PlayerFloatSprite( cent, cgs.media.friendShader ); +;3248: } +;3249: return; +;3250: } +;3251:*/ +;3252:} +LABELV $1385 +endproc CG_PlayerSprites 8 20 +lit +align 4 +LABELV $1399 +byte 4 3245342720 +byte 4 3245342720 +byte 4 0 +align 4 +LABELV $1400 +byte 4 1097859072 +byte 4 1097859072 +byte 4 1073741824 +code +proc CG_PlayerShadow 1136 44 +line 3264 +;3253: +;3254:/* +;3255:=============== +;3256:CG_PlayerShadow +;3257: +;3258:Returns the Z component of the surface being shadowed +;3259: +;3260: should it return a full plane instead of a Z? +;3261:=============== +;3262:*/ +;3263:#define SHADOW_DISTANCE 128 +;3264:static qboolean CG_PlayerShadow( centity_t *cent, float *shadowPlane ) { +line 3265 +;3265: vec3_t end, mins = {-15, -15, 0}, maxs = {15, 15, 2}; +ADDRLP4 1096 +ADDRGP4 $1399 +INDIRB +ASGNB 12 +ADDRLP4 1108 +ADDRGP4 $1400 +INDIRB +ASGNB 12 +line 3269 +;3266: trace_t trace; +;3267: float alpha; +;3268: +;3269: *shadowPlane = 0; +ADDRFP4 4 +INDIRP4 +CNSTF4 0 +ASGNF4 +line 3271 +;3270: +;3271: if ( cg_shadows.integer == 0 ) { +ADDRGP4 cg_shadows+12 +INDIRI4 +CNSTI4 0 +NEI4 $1401 +line 3272 +;3272: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1398 +JUMPV +LABELV $1401 +line 3275 +;3273: } +;3274: +;3275: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1404 +line 3276 +;3276: { +line 3277 +;3277: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1398 +JUMPV +LABELV $1404 +line 3280 +;3278: } +;3279: +;3280: if (CG_IsMindTricked(cent->currentState.trickedentindex, +ADDRLP4 1120 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1120 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1120 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1120 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1120 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1124 +ADDRGP4 CG_IsMindTricked +CALLI4 +ASGNI4 +ADDRLP4 1124 +INDIRI4 +CNSTI4 0 +EQI4 $1406 +line 3285 +;3281: cent->currentState.trickedentindex2, +;3282: cent->currentState.trickedentindex3, +;3283: cent->currentState.trickedentindex4, +;3284: cg.snap->ps.clientNum)) +;3285: { +line 3286 +;3286: return qfalse; //this entity is mind-tricking the current client, so don't render it +CNSTI4 0 +RETI4 +ADDRGP4 $1398 +JUMPV +LABELV $1406 +line 3290 +;3287: } +;3288: +;3289: // send a trace down from the player to the ground +;3290: VectorCopy( cent->lerpOrigin, end ); +ADDRLP4 1084 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 3291 +;3291: end[2] -= SHADOW_DISTANCE; +ADDRLP4 1084+8 +ADDRLP4 1084+8 +INDIRF4 +CNSTF4 1124073472 +SUBF4 +ASGNF4 +line 3293 +;3292: +;3293: trap_CM_BoxTrace( &trace, cent->lerpOrigin, end, mins, maxs, 0, MASK_PLAYERSOLID ); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 1084 +ARGP4 +ADDRLP4 1096 +ARGP4 +ADDRLP4 1108 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 273 +ARGI4 +ADDRGP4 trap_CM_BoxTrace +CALLV +pop +line 3296 +;3294: +;3295: // no shadow if too high +;3296: if ( trace.fraction == 1.0 || trace.startsolid || trace.allsolid ) { +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1065353216 +EQF4 $1415 +ADDRLP4 1128 +CNSTI4 0 +ASGNI4 +ADDRLP4 0+4 +INDIRI4 +ADDRLP4 1128 +INDIRI4 +NEI4 $1415 +ADDRLP4 0 +INDIRI4 +ADDRLP4 1128 +INDIRI4 +EQI4 $1410 +LABELV $1415 +line 3297 +;3297: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1398 +JUMPV +LABELV $1410 +line 3300 +;3298: } +;3299: +;3300: *shadowPlane = trace.endpos[2] + 1; +ADDRFP4 4 +INDIRP4 +ADDRLP4 0+12+8 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 3302 +;3301: +;3302: if ( cg_shadows.integer != 1 ) { // no mark for stencil or projection shadows +ADDRGP4 cg_shadows+12 +INDIRI4 +CNSTI4 1 +EQI4 $1418 +line 3303 +;3303: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1398 +JUMPV +LABELV $1418 +line 3307 +;3304: } +;3305: +;3306: // fade the shadow out with height +;3307: alpha = 1.0 - trace.fraction; +ADDRLP4 1080 +CNSTF4 1065353216 +ADDRLP4 0+8 +INDIRF4 +SUBF4 +ASGNF4 +line 3314 +;3308: +;3309: // bk0101022 - hack / FPE - bogus planes? +;3310: //assert( DotProduct( trace.plane.normal, trace.plane.normal ) != 0.0f ) +;3311: +;3312: // add the mark as a temporary, so it goes directly to the renderer +;3313: // without taking a spot in the cg_marks array +;3314: CG_ImpactMark( cgs.media.shadowMarkShader, trace.endpos, trace.plane.normal, +ADDRGP4 cgs+70296+404 +INDIRI4 +ARGI4 +ADDRLP4 0+12 +ARGP4 +ADDRLP4 0+24 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 664 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 1080 +INDIRF4 +ARGF4 +ADDRLP4 1080 +INDIRF4 +ARGF4 +ADDRLP4 1080 +INDIRF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTF4 1103101952 +ARGF4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_ImpactMark +CALLV +pop +line 3317 +;3315: cent->pe.legs.yawAngle, alpha,alpha,alpha,1, qfalse, 24, qtrue ); +;3316: +;3317: return qtrue; +CNSTI4 1 +RETI4 +LABELV $1398 +endproc CG_PlayerShadow 1136 44 +proc CG_PlayerSplash 1216 28 +line 3328 +;3318:} +;3319: +;3320: +;3321:/* +;3322:=============== +;3323:CG_PlayerSplash +;3324: +;3325:Draw a mark at the water surface +;3326:=============== +;3327:*/ +;3328:static void CG_PlayerSplash( centity_t *cent ) { +line 3334 +;3329: vec3_t start, end; +;3330: trace_t trace; +;3331: int contents; +;3332: polyVert_t verts[4]; +;3333: +;3334: if ( !cg_shadows.integer ) { +ADDRGP4 cg_shadows+12 +INDIRI4 +CNSTI4 0 +NEI4 $1427 +line 3335 +;3335: return; +ADDRGP4 $1426 +JUMPV +LABELV $1427 +line 3338 +;3336: } +;3337: +;3338: VectorCopy( cent->lerpOrigin, end ); +ADDRLP4 1188 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 3339 +;3339: end[2] -= 24; +ADDRLP4 1188+8 +ADDRLP4 1188+8 +INDIRF4 +CNSTF4 1103101952 +SUBF4 +ASGNF4 +line 3343 +;3340: +;3341: // if the feet aren't in liquid, don't make a mark +;3342: // this won't handle moving water brushes, but they wouldn't draw right anyway... +;3343: contents = trap_CM_PointContents( end, 0 ); +ADDRLP4 1188 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1204 +ADDRGP4 trap_CM_PointContents +CALLI4 +ASGNI4 +ADDRLP4 1200 +ADDRLP4 1204 +INDIRI4 +ASGNI4 +line 3344 +;3344: if ( !( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) ) { +ADDRLP4 1200 +INDIRI4 +CNSTI4 131078 +BANDI4 +CNSTI4 0 +NEI4 $1431 +line 3345 +;3345: return; +ADDRGP4 $1426 +JUMPV +LABELV $1431 +line 3348 +;3346: } +;3347: +;3348: VectorCopy( cent->lerpOrigin, start ); +ADDRLP4 1176 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 3349 +;3349: start[2] += 32; +ADDRLP4 1176+8 +ADDRLP4 1176+8 +INDIRF4 +CNSTF4 1107296256 +ADDF4 +ASGNF4 +line 3352 +;3350: +;3351: // if the head isn't out of liquid, don't make a mark +;3352: contents = trap_CM_PointContents( start, 0 ); +ADDRLP4 1176 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1208 +ADDRGP4 trap_CM_PointContents +CALLI4 +ASGNI4 +ADDRLP4 1200 +ADDRLP4 1208 +INDIRI4 +ASGNI4 +line 3353 +;3353: if ( contents & ( CONTENTS_SOLID | CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) { +ADDRLP4 1200 +INDIRI4 +CNSTI4 131079 +BANDI4 +CNSTI4 0 +EQI4 $1434 +line 3354 +;3354: return; +ADDRGP4 $1426 +JUMPV +LABELV $1434 +line 3358 +;3355: } +;3356: +;3357: // trace down to find the surface +;3358: trap_CM_BoxTrace( &trace, start, end, NULL, NULL, 0, ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ); +ADDRLP4 96 +ARGP4 +ADDRLP4 1176 +ARGP4 +ADDRLP4 1188 +ARGP4 +ADDRLP4 1212 +CNSTP4 0 +ASGNP4 +ADDRLP4 1212 +INDIRP4 +ARGP4 +ADDRLP4 1212 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 131078 +ARGI4 +ADDRGP4 trap_CM_BoxTrace +CALLV +pop +line 3360 +;3359: +;3360: if ( trace.fraction == 1.0 ) { +ADDRLP4 96+8 +INDIRF4 +CNSTF4 1065353216 +NEF4 $1436 +line 3361 +;3361: return; +ADDRGP4 $1426 +JUMPV +LABELV $1436 +line 3365 +;3362: } +;3363: +;3364: // create a mark polygon +;3365: VectorCopy( trace.endpos, verts[0].xyz ); +ADDRLP4 0 +ADDRLP4 96+12 +INDIRB +ASGNB 12 +line 3366 +;3366: verts[0].xyz[0] -= 32; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +ASGNF4 +line 3367 +;3367: verts[0].xyz[1] -= 32; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +ASGNF4 +line 3368 +;3368: verts[0].st[0] = 0; +ADDRLP4 0+12 +CNSTF4 0 +ASGNF4 +line 3369 +;3369: verts[0].st[1] = 0; +ADDRLP4 0+12+4 +CNSTF4 0 +ASGNF4 +line 3370 +;3370: verts[0].modulate[0] = 255; +ADDRLP4 0+20 +CNSTU1 255 +ASGNU1 +line 3371 +;3371: verts[0].modulate[1] = 255; +ADDRLP4 0+20+1 +CNSTU1 255 +ASGNU1 +line 3372 +;3372: verts[0].modulate[2] = 255; +ADDRLP4 0+20+2 +CNSTU1 255 +ASGNU1 +line 3373 +;3373: verts[0].modulate[3] = 255; +ADDRLP4 0+20+3 +CNSTU1 255 +ASGNU1 +line 3375 +;3374: +;3375: VectorCopy( trace.endpos, verts[1].xyz ); +ADDRLP4 0+24 +ADDRLP4 96+12 +INDIRB +ASGNB 12 +line 3376 +;3376: verts[1].xyz[0] -= 32; +ADDRLP4 0+24 +ADDRLP4 0+24 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +ASGNF4 +line 3377 +;3377: verts[1].xyz[1] += 32; +ADDRLP4 0+24+4 +ADDRLP4 0+24+4 +INDIRF4 +CNSTF4 1107296256 +ADDF4 +ASGNF4 +line 3378 +;3378: verts[1].st[0] = 0; +ADDRLP4 0+24+12 +CNSTF4 0 +ASGNF4 +line 3379 +;3379: verts[1].st[1] = 1; +ADDRLP4 0+24+12+4 +CNSTF4 1065353216 +ASGNF4 +line 3380 +;3380: verts[1].modulate[0] = 255; +ADDRLP4 0+24+20 +CNSTU1 255 +ASGNU1 +line 3381 +;3381: verts[1].modulate[1] = 255; +ADDRLP4 0+24+20+1 +CNSTU1 255 +ASGNU1 +line 3382 +;3382: verts[1].modulate[2] = 255; +ADDRLP4 0+24+20+2 +CNSTU1 255 +ASGNU1 +line 3383 +;3383: verts[1].modulate[3] = 255; +ADDRLP4 0+24+20+3 +CNSTU1 255 +ASGNU1 +line 3385 +;3384: +;3385: VectorCopy( trace.endpos, verts[2].xyz ); +ADDRLP4 0+48 +ADDRLP4 96+12 +INDIRB +ASGNB 12 +line 3386 +;3386: verts[2].xyz[0] += 32; +ADDRLP4 0+48 +ADDRLP4 0+48 +INDIRF4 +CNSTF4 1107296256 +ADDF4 +ASGNF4 +line 3387 +;3387: verts[2].xyz[1] += 32; +ADDRLP4 0+48+4 +ADDRLP4 0+48+4 +INDIRF4 +CNSTF4 1107296256 +ADDF4 +ASGNF4 +line 3388 +;3388: verts[2].st[0] = 1; +ADDRLP4 0+48+12 +CNSTF4 1065353216 +ASGNF4 +line 3389 +;3389: verts[2].st[1] = 1; +ADDRLP4 0+48+12+4 +CNSTF4 1065353216 +ASGNF4 +line 3390 +;3390: verts[2].modulate[0] = 255; +ADDRLP4 0+48+20 +CNSTU1 255 +ASGNU1 +line 3391 +;3391: verts[2].modulate[1] = 255; +ADDRLP4 0+48+20+1 +CNSTU1 255 +ASGNU1 +line 3392 +;3392: verts[2].modulate[2] = 255; +ADDRLP4 0+48+20+2 +CNSTU1 255 +ASGNU1 +line 3393 +;3393: verts[2].modulate[3] = 255; +ADDRLP4 0+48+20+3 +CNSTU1 255 +ASGNU1 +line 3395 +;3394: +;3395: VectorCopy( trace.endpos, verts[3].xyz ); +ADDRLP4 0+72 +ADDRLP4 96+12 +INDIRB +ASGNB 12 +line 3396 +;3396: verts[3].xyz[0] += 32; +ADDRLP4 0+72 +ADDRLP4 0+72 +INDIRF4 +CNSTF4 1107296256 +ADDF4 +ASGNF4 +line 3397 +;3397: verts[3].xyz[1] -= 32; +ADDRLP4 0+72+4 +ADDRLP4 0+72+4 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +ASGNF4 +line 3398 +;3398: verts[3].st[0] = 1; +ADDRLP4 0+72+12 +CNSTF4 1065353216 +ASGNF4 +line 3399 +;3399: verts[3].st[1] = 0; +ADDRLP4 0+72+12+4 +CNSTF4 0 +ASGNF4 +line 3400 +;3400: verts[3].modulate[0] = 255; +ADDRLP4 0+72+20 +CNSTU1 255 +ASGNU1 +line 3401 +;3401: verts[3].modulate[1] = 255; +ADDRLP4 0+72+20+1 +CNSTU1 255 +ASGNU1 +line 3402 +;3402: verts[3].modulate[2] = 255; +ADDRLP4 0+72+20+2 +CNSTU1 255 +ASGNU1 +line 3403 +;3403: verts[3].modulate[3] = 255; +ADDRLP4 0+72+20+3 +CNSTU1 255 +ASGNU1 +line 3405 +;3404: +;3405: trap_R_AddPolyToScene( cgs.media.wakeMarkShader, 4, verts ); +ADDRGP4 cgs+70296+412 +INDIRI4 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddPolyToScene +CALLV +pop +line 3406 +;3406:} +LABELV $1426 +endproc CG_PlayerSplash 1216 28 +export CG_ForcePushBlur +proc CG_ForcePushBlur 28 4 +line 3409 +;3407: +;3408:void CG_ForcePushBlur( vec3_t org ) +;3409:{ +line 3412 +;3410: localEntity_t *ex; +;3411: +;3412: ex = CG_AllocLocalEntity(); +ADDRLP4 4 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 3413 +;3413: ex->leType = LE_PUFF; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 5 +ASGNI4 +line 3414 +;3414: ex->refEntity.reType = RT_SPRITE; +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +CNSTI4 2 +ASGNI4 +line 3415 +;3415: ex->radius = 2.0f; +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +CNSTF4 1073741824 +ASGNF4 +line 3416 +;3416: ex->startTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3417 +;3417: ex->endTime = ex->startTime + 120; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 120 +ADDI4 +ASGNI4 +line 3418 +;3418: VectorCopy( org, ex->pos.trBase ); +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 3419 +;3419: ex->pos.trTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3420 +;3420: ex->pos.trType = TR_LINEAR; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTI4 2 +ASGNI4 +line 3421 +;3421: VectorScale( cg.refdef.viewaxis[1], 55, ex->pos.trDelta ); +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1113325568 +ADDRGP4 cg+3616+36+12 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 1113325568 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTF4 1113325568 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +MULF4 +ASGNF4 +line 3423 +;3422: +;3423: ex->color[0] = 24; +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +CNSTF4 1103101952 +ASGNF4 +line 3424 +;3424: ex->color[1] = 32; +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 3425 +;3425: ex->color[2] = 40; +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 3426 +;3426: ex->refEntity.customShader = trap_R_RegisterShader( "gfx/effects/forcePush" ); +ADDRGP4 $1530 +ARGP4 +ADDRLP4 12 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 324 +ADDP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 3428 +;3427: +;3428: ex = CG_AllocLocalEntity(); +ADDRLP4 16 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 3429 +;3429: ex->leType = LE_PUFF; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 5 +ASGNI4 +line 3430 +;3430: ex->refEntity.reType = RT_SPRITE; +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +CNSTI4 2 +ASGNI4 +line 3431 +;3431: ex->refEntity.rotation = 180.0f; +ADDRLP4 0 +INDIRP4 +CNSTI4 344 +ADDP4 +CNSTF4 1127481344 +ASGNF4 +line 3432 +;3432: ex->radius = 2.0f; +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +CNSTF4 1073741824 +ASGNF4 +line 3433 +;3433: ex->startTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3434 +;3434: ex->endTime = ex->startTime + 120; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 120 +ADDI4 +ASGNI4 +line 3435 +;3435: VectorCopy( org, ex->pos.trBase ); +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 3436 +;3436: ex->pos.trTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3437 +;3437: ex->pos.trType = TR_LINEAR; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTI4 2 +ASGNI4 +line 3438 +;3438: VectorScale( cg.refdef.viewaxis[1], -55, ex->pos.trDelta ); +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 3260809216 +ADDRGP4 cg+3616+36+12 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 3260809216 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTF4 3260809216 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +MULF4 +ASGNF4 +line 3440 +;3439: +;3440: ex->color[0] = 24; +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +CNSTF4 1103101952 +ASGNF4 +line 3441 +;3441: ex->color[1] = 32; +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTF4 1107296256 +ASGNF4 +line 3442 +;3442: ex->color[2] = 40; +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 3443 +;3443: ex->refEntity.customShader = trap_R_RegisterShader( "gfx/effects/forcePush" ); +ADDRGP4 $1530 +ARGP4 +ADDRLP4 24 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 324 +ADDP4 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 3444 +;3444:} +LABELV $1516 +endproc CG_ForcePushBlur 28 4 +export CG_ForceGripEffect +proc CG_ForceGripEffect 32 4 +line 3447 +;3445: +;3446:void CG_ForceGripEffect( vec3_t org ) +;3447:{ +line 3449 +;3448: localEntity_t *ex; +;3449: float wv = sin( cg.time * 0.004f ) * 0.08f + 0.1f; +CNSTF4 998445679 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 4 +CNSTF4 1034147594 +ADDRLP4 8 +INDIRF4 +MULF4 +CNSTF4 1036831949 +ADDF4 +ASGNF4 +line 3451 +;3450: +;3451: ex = CG_AllocLocalEntity(); +ADDRLP4 12 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +ASGNP4 +line 3452 +;3452: ex->leType = LE_PUFF; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 5 +ASGNI4 +line 3453 +;3453: ex->refEntity.reType = RT_SPRITE; +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +CNSTI4 2 +ASGNI4 +line 3454 +;3454: ex->radius = 2.0f; +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +CNSTF4 1073741824 +ASGNF4 +line 3455 +;3455: ex->startTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3456 +;3456: ex->endTime = ex->startTime + 120; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 120 +ADDI4 +ASGNI4 +line 3457 +;3457: VectorCopy( org, ex->pos.trBase ); +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 3458 +;3458: ex->pos.trTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3459 +;3459: ex->pos.trType = TR_LINEAR; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTI4 2 +ASGNI4 +line 3460 +;3460: VectorScale( cg.refdef.viewaxis[1], 55, ex->pos.trDelta ); +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 1113325568 +ADDRGP4 cg+3616+36+12 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 1113325568 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTF4 1113325568 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +MULF4 +ASGNF4 +line 3462 +;3461: +;3462: ex->color[0] = 200+((wv*255)); +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +CNSTF4 1132396544 +ADDRLP4 4 +INDIRF4 +MULF4 +CNSTF4 1128792064 +ADDF4 +ASGNF4 +line 3463 +;3463: if (ex->color[0] > 255) +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRF4 +CNSTF4 1132396544 +LEF4 $1559 +line 3464 +;3464: { +line 3465 +;3465: ex->color[0] = 255; +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +CNSTF4 1132396544 +ASGNF4 +line 3466 +;3466: } +LABELV $1559 +line 3467 +;3467: ex->color[1] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTF4 0 +ASGNF4 +line 3468 +;3468: ex->color[2] = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +CNSTF4 0 +ASGNF4 +line 3469 +;3469: ex->refEntity.customShader = trap_R_RegisterShader( "gfx/effects/forcePush" ); +ADDRGP4 $1530 +ARGP4 +ADDRLP4 20 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 324 +ADDP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 3471 +;3470: +;3471: ex = CG_AllocLocalEntity(); +ADDRLP4 24 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 24 +INDIRP4 +ASGNP4 +line 3472 +;3472: ex->leType = LE_PUFF; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 5 +ASGNI4 +line 3473 +;3473: ex->refEntity.reType = RT_SPRITE; +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +CNSTI4 2 +ASGNI4 +line 3474 +;3474: ex->refEntity.rotation = 180.0f; +ADDRLP4 0 +INDIRP4 +CNSTI4 344 +ADDP4 +CNSTF4 1127481344 +ASGNF4 +line 3475 +;3475: ex->radius = 2.0f; +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +CNSTF4 1073741824 +ASGNF4 +line 3476 +;3476: ex->startTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3477 +;3477: ex->endTime = ex->startTime + 120; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 120 +ADDI4 +ASGNI4 +line 3478 +;3478: VectorCopy( org, ex->pos.trBase ); +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 3479 +;3479: ex->pos.trTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3480 +;3480: ex->pos.trType = TR_LINEAR; +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTI4 2 +ASGNI4 +line 3481 +;3481: VectorScale( cg.refdef.viewaxis[1], -55, ex->pos.trDelta ); +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +CNSTF4 3260809216 +ADDRGP4 cg+3616+36+12 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +CNSTF4 3260809216 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTF4 3260809216 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +MULF4 +ASGNF4 +line 3490 +;3482: +;3483: /* +;3484: ex->color[0] = 200+((wv*255)); +;3485: if (ex->color[0] > 255) +;3486: { +;3487: ex->color[0] = 255; +;3488: } +;3489: */ +;3490: ex->color[0] = 255; +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +CNSTF4 1132396544 +ASGNF4 +line 3491 +;3491: ex->color[1] = 255; +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTF4 1132396544 +ASGNF4 +line 3492 +;3492: ex->color[2] = 255; +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +CNSTF4 1132396544 +ASGNF4 +line 3493 +;3493: ex->refEntity.customShader = cgs.media.redSaberGlowShader;//trap_R_RegisterShader( "gfx/effects/forcePush" ); +ADDRLP4 0 +INDIRP4 +CNSTI4 324 +ADDP4 +ADDRGP4 cgs+70296+116 +INDIRI4 +ASGNI4 +line 3494 +;3494:} +LABELV $1544 +endproc CG_ForceGripEffect 32 4 +export CG_AddRefEntityWithPowerups +proc CG_AddRefEntityWithPowerups 8 20 +line 3505 +;3495: +;3496: +;3497:/* +;3498:=============== +;3499:CG_AddRefEntityWithPowerups +;3500: +;3501:Adds a piece with modifications or duplications for powerups +;3502:Also called by CG_Missile for quad rockets, but nobody can tell... +;3503:=============== +;3504:*/ +;3505:void CG_AddRefEntityWithPowerups( refEntity_t *ent, entityState_t *state, int team ) { +line 3507 +;3506: +;3507: if (CG_IsMindTricked(state->trickedentindex, +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 CG_IsMindTricked +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $1577 +line 3512 +;3508: state->trickedentindex2, +;3509: state->trickedentindex3, +;3510: state->trickedentindex4, +;3511: cg.snap->ps.clientNum)) +;3512: { +line 3513 +;3513: return; //this entity is mind-tricking the current client, so don't render it +ADDRGP4 $1576 +JUMPV +LABELV $1577 +line 3516 +;3514: } +;3515: +;3516: trap_R_AddRefEntityToScene( ent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 3518 +;3517: +;3518: if ( state->powerups & ( 1 << PW_QUAD ) ) +ADDRFP4 4 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1580 +line 3519 +;3519: { +line 3520 +;3520: if (team == TEAM_RED) +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +NEI4 $1582 +line 3521 +;3521: ent->customShader = cgs.media.redQuadShader; +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRGP4 cgs+70296+452 +INDIRI4 +ASGNI4 +ADDRGP4 $1583 +JUMPV +LABELV $1582 +line 3523 +;3522: else +;3523: ent->customShader = cgs.media.quadShader; +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRGP4 cgs+70296+448 +INDIRI4 +ASGNI4 +LABELV $1583 +line 3524 +;3524: trap_R_AddRefEntityToScene( ent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 3525 +;3525: } +LABELV $1580 +line 3526 +;3526: if ( state->powerups & ( 1 << PW_BATTLESUIT ) ) { +ADDRFP4 4 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $1588 +line 3527 +;3527: ent->customShader = cgs.media.battleSuitShader; +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRGP4 cgs+70296+468 +INDIRI4 +ASGNI4 +line 3528 +;3528: trap_R_AddRefEntityToScene( ent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 3529 +;3529: } +LABELV $1588 +line 3530 +;3530:} +LABELV $1576 +endproc CG_AddRefEntityWithPowerups 8 20 +export CG_PlayerShieldHit +proc CG_PlayerShieldHit 24 8 +line 3537 +;3531: +;3532:#define MAX_SHIELD_TIME 2000.0 +;3533:#define MIN_SHIELD_TIME 2000.0 +;3534: +;3535: +;3536:void CG_PlayerShieldHit(int entitynum, vec3_t dir, int amount) +;3537:{ +line 3541 +;3538: centity_t *cent; +;3539: int time; +;3540: +;3541: if (entitynum<0 || entitynum >= MAX_CLIENTS) +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +LTI4 $1595 +ADDRLP4 8 +INDIRI4 +CNSTI4 32 +LTI4 $1593 +LABELV $1595 +line 3542 +;3542: { +line 3543 +;3543: return; +ADDRGP4 $1592 +JUMPV +LABELV $1593 +line 3546 +;3544: } +;3545: +;3546: cent = &cg_entities[entitynum]; +ADDRLP4 0 +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 3548 +;3547: +;3548: if (amount > 100) +ADDRFP4 8 +INDIRI4 +CNSTI4 100 +LEI4 $1596 +line 3549 +;3549: { +line 3550 +;3550: time = cg.time + MAX_SHIELD_TIME; // 2 sec. +ADDRLP4 4 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +CNSTF4 1157234688 +ADDF4 +CVFI4 4 +ASGNI4 +line 3551 +;3551: } +ADDRGP4 $1597 +JUMPV +LABELV $1596 +line 3553 +;3552: else +;3553: { +line 3554 +;3554: time = cg.time + 500 + amount*15; +ADDRLP4 4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 500 +ADDI4 +CNSTI4 15 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDI4 +ASGNI4 +line 3555 +;3555: } +LABELV $1597 +line 3557 +;3556: +;3557: if (time > cent->damageTime) +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 636 +ADDP4 +INDIRI4 +LEI4 $1600 +line 3558 +;3558: { +line 3559 +;3559: cent->damageTime = time; +ADDRLP4 0 +INDIRP4 +CNSTI4 636 +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 3560 +;3560: VectorScale(dir, -1, dir); +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTF4 3212836864 +ADDRLP4 12 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTF4 3212836864 +ADDRLP4 16 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 20 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTF4 3212836864 +ADDRLP4 20 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 3561 +;3561: vectoangles(dir, cent->damageAngles); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 624 +ADDP4 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 3562 +;3562: } +LABELV $1600 +line 3563 +;3563:} +LABELV $1592 +endproc CG_PlayerShieldHit 24 8 +export CG_DrawPlayerShield +proc CG_DrawPlayerShield 224 12 +line 3567 +;3564: +;3565: +;3566:void CG_DrawPlayerShield(centity_t *cent, vec3_t origin) +;3567:{ +line 3573 +;3568: refEntity_t ent; +;3569: int alpha; +;3570: float scale; +;3571: +;3572: // Don't draw the shield when the player is dead. +;3573: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1603 +line 3574 +;3574: { +line 3575 +;3575: return; +ADDRGP4 $1602 +JUMPV +LABELV $1603 +line 3578 +;3576: } +;3577: +;3578: memset( &ent, 0, sizeof( ent ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 3580 +;3579: +;3580: VectorCopy( origin, ent.origin ); +ADDRLP4 0+52 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 3581 +;3581: ent.origin[2] += 10.0; +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +CNSTF4 1092616192 +ADDF4 +ASGNF4 +line 3582 +;3582: AnglesToAxis( cent->damageAngles, ent.axis ); +ADDRFP4 0 +INDIRP4 +CNSTI4 624 +ADDP4 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 3584 +;3583: +;3584: alpha = 255.0 * ((cent->damageTime - cg.time) / MIN_SHIELD_TIME) + random()*16; +ADDRLP4 220 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 216 +CNSTF4 1132396544 +ADDRFP4 0 +INDIRP4 +CNSTI4 636 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIF4 4 +CNSTF4 1157234688 +DIVF4 +MULF4 +CNSTF4 1098907648 +ADDRLP4 220 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 3585 +;3585: if (alpha>255) +ADDRLP4 216 +INDIRI4 +CNSTI4 255 +LEI4 $1610 +line 3586 +;3586: alpha=255; +ADDRLP4 216 +CNSTI4 255 +ASGNI4 +LABELV $1610 +line 3589 +;3587: +;3588: // Make it bigger, but tighter if more solid +;3589: scale = 1.4 - ((float)alpha*(0.4/255.0)); // Range from 1.0 to 1.4 +ADDRLP4 212 +CNSTF4 1068708659 +CNSTF4 986552935 +ADDRLP4 216 +INDIRI4 +CVIF4 4 +MULF4 +SUBF4 +ASGNF4 +line 3590 +;3590: VectorScale( ent.axis[0], scale, ent.axis[0] ); +ADDRLP4 0+12 +ADDRLP4 0+12 +INDIRF4 +ADDRLP4 212 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+4 +ADDRLP4 0+12+4 +INDIRF4 +ADDRLP4 212 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+8 +ADDRLP4 0+12+8 +INDIRF4 +ADDRLP4 212 +INDIRF4 +MULF4 +ASGNF4 +line 3591 +;3591: VectorScale( ent.axis[1], scale, ent.axis[1] ); +ADDRLP4 0+12+12 +ADDRLP4 0+12+12 +INDIRF4 +ADDRLP4 212 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+12+4 +ADDRLP4 0+12+12+4 +INDIRF4 +ADDRLP4 212 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+12+8 +ADDRLP4 0+12+12+8 +INDIRF4 +ADDRLP4 212 +INDIRF4 +MULF4 +ASGNF4 +line 3592 +;3592: VectorScale( ent.axis[2], scale, ent.axis[2] ); +ADDRLP4 0+12+24 +ADDRLP4 0+12+24 +INDIRF4 +ADDRLP4 212 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+24+4 +ADDRLP4 0+12+24+4 +INDIRF4 +ADDRLP4 212 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+24+8 +ADDRLP4 0+12+24+8 +INDIRF4 +ADDRLP4 212 +INDIRF4 +MULF4 +ASGNF4 +line 3594 +;3593: +;3594: ent.hModel = cgs.media.halfShieldModel; +ADDRLP4 0+8 +ADDRGP4 cgs+70296+900 +INDIRI4 +ASGNI4 +line 3595 +;3595: ent.customShader = cgs.media.halfShieldShader; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+904 +INDIRI4 +ASGNI4 +line 3596 +;3596: ent.shaderRGBA[0] = alpha; +ADDRLP4 0+80 +ADDRLP4 216 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 3597 +;3597: ent.shaderRGBA[1] = alpha; +ADDRLP4 0+80+1 +ADDRLP4 216 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 3598 +;3598: ent.shaderRGBA[2] = alpha; +ADDRLP4 0+80+2 +ADDRLP4 216 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 3599 +;3599: ent.shaderRGBA[3] = 255; +ADDRLP4 0+80+3 +CNSTU1 255 +ASGNU1 +line 3600 +;3600: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 3601 +;3601:} +LABELV $1602 +endproc CG_DrawPlayerShield 224 12 +export CG_PlayerHitFX +proc CG_PlayerHitFX 4 8 +line 3605 +;3602: +;3603: +;3604:void CG_PlayerHitFX(centity_t *cent) +;3605:{ +line 3609 +;3606: centity_t *curent; +;3607: +;3608: // only do the below fx if the cent in question is...uh...me, and it's first person. +;3609: if (cent->currentState.clientNum != cg.predictedPlayerState.clientNum || cg.renderingThirdPerson) +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ADDRGP4 cg+96+144 +INDIRI4 +NEI4 $1673 +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +EQI4 $1668 +LABELV $1673 +line 3610 +;3610: { +line 3612 +;3611: // Get the NON-PREDICTED player entity, because the predicted one doesn't have the damage info on it. +;3612: curent = &cg_entities[cent->currentState.number]; +ADDRLP4 0 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 3614 +;3613: +;3614: if (curent->damageTime > cg.time) +ADDRLP4 0 +INDIRP4 +CNSTI4 636 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $1667 +line 3615 +;3615: { +line 3616 +;3616: CG_DrawPlayerShield(curent, cent->lerpOrigin); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 CG_DrawPlayerShield +CALLV +pop +line 3617 +;3617: } +line 3619 +;3618: +;3619: return; +LABELV $1668 +line 3621 +;3620: } +;3621:} +LABELV $1667 +endproc CG_PlayerHitFX 4 8 +export CG_LightVerts +proc CG_LightVerts 88 16 +line 3631 +;3622: +;3623: +;3624: +;3625:/* +;3626:================= +;3627:CG_LightVerts +;3628:================= +;3629:*/ +;3630:int CG_LightVerts( vec3_t normal, int numVerts, polyVert_t *verts ) +;3631:{ +line 3638 +;3632: int i, j; +;3633: float incoming; +;3634: vec3_t ambientLight; +;3635: vec3_t lightDir; +;3636: vec3_t directedLight; +;3637: +;3638: trap_R_LightForPoint( verts[0].xyz, ambientLight, directedLight, lightDir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 36 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRGP4 trap_R_LightForPoint +CALLI4 +pop +line 3640 +;3639: +;3640: for (i = 0; i < numVerts; i++) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1681 +JUMPV +LABELV $1678 +line 3641 +;3641: incoming = DotProduct (normal, lightDir); +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 48 +INDIRP4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +MULF4 +ADDRLP4 48 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 24+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 48 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 24+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3642 +;3642: if ( incoming <= 0 ) { +ADDRLP4 8 +INDIRF4 +CNSTF4 0 +GTF4 $1684 +line 3643 +;3643: verts[i].modulate[0] = ambientLight[0]; +ADDRLP4 56 +ADDRLP4 12 +INDIRF4 +ASGNF4 +ADDRLP4 60 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ADDRLP4 60 +INDIRF4 +LTF4 $1687 +ADDRLP4 52 +ADDRLP4 56 +INDIRF4 +ADDRLP4 60 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1688 +JUMPV +LABELV $1687 +ADDRLP4 52 +ADDRLP4 56 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1688 +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTI4 20 +ADDP4 +ADDRLP4 52 +INDIRU4 +CVUU1 4 +ASGNU1 +line 3644 +;3644: verts[i].modulate[1] = ambientLight[1]; +ADDRLP4 68 +ADDRLP4 12+4 +INDIRF4 +ASGNF4 +ADDRLP4 72 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 68 +INDIRF4 +ADDRLP4 72 +INDIRF4 +LTF4 $1691 +ADDRLP4 64 +ADDRLP4 68 +INDIRF4 +ADDRLP4 72 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1692 +JUMPV +LABELV $1691 +ADDRLP4 64 +ADDRLP4 68 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1692 +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTI4 21 +ADDP4 +ADDRLP4 64 +INDIRU4 +CVUU1 4 +ASGNU1 +line 3645 +;3645: verts[i].modulate[2] = ambientLight[2]; +ADDRLP4 80 +ADDRLP4 12+8 +INDIRF4 +ASGNF4 +ADDRLP4 84 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 80 +INDIRF4 +ADDRLP4 84 +INDIRF4 +LTF4 $1695 +ADDRLP4 76 +ADDRLP4 80 +INDIRF4 +ADDRLP4 84 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $1696 +JUMPV +LABELV $1695 +ADDRLP4 76 +ADDRLP4 80 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $1696 +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTI4 22 +ADDP4 +ADDRLP4 76 +INDIRU4 +CVUU1 4 +ASGNU1 +line 3646 +;3646: verts[i].modulate[3] = 255; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTI4 23 +ADDP4 +CNSTU1 255 +ASGNU1 +line 3647 +;3647: continue; +ADDRGP4 $1679 +JUMPV +LABELV $1684 +line 3649 +;3648: } +;3649: j = ( ambientLight[0] + incoming * directedLight[0] ); +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 36 +INDIRF4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 3650 +;3650: if ( j > 255 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 255 +LEI4 $1697 +line 3651 +;3651: j = 255; +ADDRLP4 0 +CNSTI4 255 +ASGNI4 +line 3652 +;3652: } +LABELV $1697 +line 3653 +;3653: verts[i].modulate[0] = j; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 3655 +;3654: +;3655: j = ( ambientLight[1] + incoming * directedLight[1] ); +ADDRLP4 0 +ADDRLP4 12+4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 36+4 +INDIRF4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 3656 +;3656: if ( j > 255 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 255 +LEI4 $1701 +line 3657 +;3657: j = 255; +ADDRLP4 0 +CNSTI4 255 +ASGNI4 +line 3658 +;3658: } +LABELV $1701 +line 3659 +;3659: verts[i].modulate[1] = j; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTI4 21 +ADDP4 +ADDRLP4 0 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 3661 +;3660: +;3661: j = ( ambientLight[2] + incoming * directedLight[2] ); +ADDRLP4 0 +ADDRLP4 12+8 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 36+8 +INDIRF4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 3662 +;3662: if ( j > 255 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 255 +LEI4 $1705 +line 3663 +;3663: j = 255; +ADDRLP4 0 +CNSTI4 255 +ASGNI4 +line 3664 +;3664: } +LABELV $1705 +line 3665 +;3665: verts[i].modulate[2] = j; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTI4 22 +ADDP4 +ADDRLP4 0 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 3667 +;3666: +;3667: verts[i].modulate[3] = 255; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTI4 23 +ADDP4 +CNSTU1 255 +ASGNU1 +line 3668 +;3668: } +LABELV $1679 +line 3640 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1681 +ADDRLP4 4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +LTI4 $1678 +line 3669 +;3669: return qtrue; +CNSTI4 1 +RETI4 +LABELV $1677 +endproc CG_LightVerts 88 16 +lit +align 4 +LABELV $1708 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +export CG_DoSaber +code +proc CG_DoSaber 313 20 +line 3673 +;3670:} +;3671: +;3672:void CG_DoSaber( vec3_t origin, vec3_t dir, float length, saber_colors_t color, int rfx ) +;3673:{ +line 3674 +;3674: vec3_t mid, rgb={1,1,1}; +ADDRLP4 212 +ADDRGP4 $1708 +INDIRB +ASGNB 12 +line 3675 +;3675: qhandle_t blade = 0, glow = 0; +ADDRLP4 240 +CNSTI4 0 +ASGNI4 +ADDRLP4 244 +CNSTI4 0 +ASGNI4 +line 3679 +;3676: refEntity_t saber; +;3677: float radiusmult; +;3678: +;3679: if ( length < 0.5f ) +ADDRFP4 8 +INDIRF4 +CNSTF4 1056964608 +GEF4 $1709 +line 3680 +;3680: { +line 3682 +;3681: // if the thing is so short, just forget even adding me. +;3682: return; +ADDRGP4 $1707 +JUMPV +LABELV $1709 +line 3686 +;3683: } +;3684: +;3685: // Find the midpoint of the saber for lighting purposes +;3686: VectorMA( origin, length * 0.5f, dir, mid ); +ADDRLP4 248 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 252 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 256 +CNSTF4 1056964608 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 224 +ADDRLP4 248 +INDIRP4 +INDIRF4 +ADDRLP4 252 +INDIRP4 +INDIRF4 +ADDRLP4 256 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 260 +CNSTI4 4 +ASGNI4 +ADDRLP4 224+4 +ADDRLP4 248 +INDIRP4 +ADDRLP4 260 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 252 +INDIRP4 +ADDRLP4 260 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 256 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 264 +CNSTI4 8 +ASGNI4 +ADDRLP4 224+8 +ADDRFP4 0 +INDIRP4 +ADDRLP4 264 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 264 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 1056964608 +ADDRFP4 8 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 3688 +;3687: +;3688: switch( color ) +ADDRLP4 268 +ADDRFP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 268 +INDIRI4 +CNSTI4 0 +LTI4 $1713 +ADDRLP4 268 +INDIRI4 +CNSTI4 5 +GTI4 $1713 +ADDRLP4 268 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1764 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1764 +address $1716 +address $1723 +address $1730 +address $1737 +address $1744 +address $1751 +code +line 3689 +;3689: { +LABELV $1716 +line 3691 +;3690: case SABER_RED: +;3691: glow = cgs.media.redSaberGlowShader; +ADDRLP4 244 +ADDRGP4 cgs+70296+116 +INDIRI4 +ASGNI4 +line 3692 +;3692: blade = cgs.media.redSaberCoreShader; +ADDRLP4 240 +ADDRGP4 cgs+70296+120 +INDIRI4 +ASGNI4 +line 3693 +;3693: VectorSet( rgb, 1.0f, 0.2f, 0.2f ); +ADDRLP4 212 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 212+4 +CNSTF4 1045220557 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1045220557 +ASGNF4 +line 3694 +;3694: break; +ADDRGP4 $1714 +JUMPV +LABELV $1723 +line 3696 +;3695: case SABER_ORANGE: +;3696: glow = cgs.media.orangeSaberGlowShader; +ADDRLP4 244 +ADDRGP4 cgs+70296+124 +INDIRI4 +ASGNI4 +line 3697 +;3697: blade = cgs.media.orangeSaberCoreShader; +ADDRLP4 240 +ADDRGP4 cgs+70296+128 +INDIRI4 +ASGNI4 +line 3698 +;3698: VectorSet( rgb, 1.0f, 0.5f, 0.1f ); +ADDRLP4 212 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 212+4 +CNSTF4 1056964608 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1036831949 +ASGNF4 +line 3699 +;3699: break; +ADDRGP4 $1714 +JUMPV +LABELV $1730 +line 3701 +;3700: case SABER_YELLOW: +;3701: glow = cgs.media.yellowSaberGlowShader; +ADDRLP4 244 +ADDRGP4 cgs+70296+132 +INDIRI4 +ASGNI4 +line 3702 +;3702: blade = cgs.media.yellowSaberCoreShader; +ADDRLP4 240 +ADDRGP4 cgs+70296+136 +INDIRI4 +ASGNI4 +line 3703 +;3703: VectorSet( rgb, 1.0f, 1.0f, 0.2f ); +ADDRLP4 276 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 212 +ADDRLP4 276 +INDIRF4 +ASGNF4 +ADDRLP4 212+4 +ADDRLP4 276 +INDIRF4 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1045220557 +ASGNF4 +line 3704 +;3704: break; +ADDRGP4 $1714 +JUMPV +LABELV $1737 +line 3706 +;3705: case SABER_GREEN: +;3706: glow = cgs.media.greenSaberGlowShader; +ADDRLP4 244 +ADDRGP4 cgs+70296+140 +INDIRI4 +ASGNI4 +line 3707 +;3707: blade = cgs.media.greenSaberCoreShader; +ADDRLP4 240 +ADDRGP4 cgs+70296+144 +INDIRI4 +ASGNI4 +line 3708 +;3708: VectorSet( rgb, 0.2f, 1.0f, 0.2f ); +ADDRLP4 212 +CNSTF4 1045220557 +ASGNF4 +ADDRLP4 212+4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1045220557 +ASGNF4 +line 3709 +;3709: break; +ADDRGP4 $1714 +JUMPV +LABELV $1744 +line 3711 +;3710: case SABER_BLUE: +;3711: glow = cgs.media.blueSaberGlowShader; +ADDRLP4 244 +ADDRGP4 cgs+70296+148 +INDIRI4 +ASGNI4 +line 3712 +;3712: blade = cgs.media.blueSaberCoreShader; +ADDRLP4 240 +ADDRGP4 cgs+70296+152 +INDIRI4 +ASGNI4 +line 3713 +;3713: VectorSet( rgb, 0.2f, 0.4f, 1.0f ); +ADDRLP4 212 +CNSTF4 1045220557 +ASGNF4 +ADDRLP4 212+4 +CNSTF4 1053609165 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1065353216 +ASGNF4 +line 3714 +;3714: break; +ADDRGP4 $1714 +JUMPV +LABELV $1751 +line 3716 +;3715: case SABER_PURPLE: +;3716: glow = cgs.media.purpleSaberGlowShader; +ADDRLP4 244 +ADDRGP4 cgs+70296+156 +INDIRI4 +ASGNI4 +line 3717 +;3717: blade = cgs.media.purpleSaberCoreShader; +ADDRLP4 240 +ADDRGP4 cgs+70296+160 +INDIRI4 +ASGNI4 +line 3718 +;3718: VectorSet( rgb, 0.9f, 0.2f, 1.0f ); +ADDRLP4 212 +CNSTF4 1063675494 +ASGNF4 +ADDRLP4 212+4 +CNSTF4 1045220557 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1065353216 +ASGNF4 +line 3719 +;3719: break; +ADDRGP4 $1714 +JUMPV +LABELV $1713 +line 3721 +;3720: default: +;3721: glow = cgs.media.blueSaberGlowShader; +ADDRLP4 244 +ADDRGP4 cgs+70296+148 +INDIRI4 +ASGNI4 +line 3722 +;3722: blade = cgs.media.blueSaberCoreShader; +ADDRLP4 240 +ADDRGP4 cgs+70296+152 +INDIRI4 +ASGNI4 +line 3723 +;3723: VectorSet( rgb, 0.2f, 0.4f, 1.0f ); +ADDRLP4 212 +CNSTF4 1045220557 +ASGNF4 +ADDRLP4 212+4 +CNSTF4 1053609165 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1065353216 +ASGNF4 +line 3724 +;3724: break; +LABELV $1714 +line 3728 +;3725: } +;3726: +;3727: // always add a light because sabers cast a nice glow before they slice you in half!! or something... +;3728: trap_R_AddLightToScene( mid, (length*2.0f) + (random()*8.0f), rgb[0], rgb[1], rgb[2] ); +ADDRLP4 276 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 224 +ARGP4 +CNSTF4 1073741824 +ADDRFP4 8 +INDIRF4 +MULF4 +CNSTF4 1090519040 +ADDRLP4 276 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ADDF4 +ARGF4 +ADDRLP4 212 +INDIRF4 +ARGF4 +ADDRLP4 212+4 +INDIRF4 +ARGF4 +ADDRLP4 212+8 +INDIRF4 +ARGF4 +ADDRGP4 trap_R_AddLightToScene +CALLV +pop +line 3730 +;3729: +;3730: memset( &saber, 0, sizeof( refEntity_t )); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 3734 +;3731: +;3732: // Saber glow is it's own ref type because it uses a ton of sprites, otherwise it would eat up too many +;3733: // refEnts to do each glow blob individually +;3734: saber.saberLength = length; +ADDRLP4 0+180 +ADDRFP4 8 +INDIRF4 +ASGNF4 +line 3738 +;3735: +;3736: // Jeff, I did this because I foolishly wished to have a bright halo as the saber is unleashed. +;3737: // It's not quite what I'd hoped tho. If you have any ideas, go for it! --Pat +;3738: if (length < SABER_LENGTH_MAX) +ADDRFP4 8 +INDIRF4 +CNSTF4 1109393408 +GEF4 $1768 +line 3739 +;3739: { +line 3740 +;3740: radiusmult = 1.0 + (2.0 / length); // Note this creates a curve, and length cannot be < 0.5. +ADDRLP4 236 +CNSTF4 1073741824 +ADDRFP4 8 +INDIRF4 +DIVF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 3741 +;3741: } +ADDRGP4 $1769 +JUMPV +LABELV $1768 +line 3743 +;3742: else +;3743: { +line 3744 +;3744: radiusmult = 1.0; +ADDRLP4 236 +CNSTF4 1065353216 +ASGNF4 +line 3745 +;3745: } +LABELV $1769 +line 3748 +;3746: +;3747: +;3748: saber.radius = (2.8 + crandom() * 0.2f)*radiusmult; +ADDRLP4 280 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0+92 +CNSTF4 1045220557 +CNSTF4 1073741824 +ADDRLP4 280 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1077097267 +ADDF4 +ADDRLP4 236 +INDIRF4 +MULF4 +ASGNF4 +line 3751 +;3749: +;3750: +;3751: VectorCopy( origin, saber.origin ); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 3752 +;3752: VectorCopy( dir, saber.axis[0] ); +ADDRLP4 0+12 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 3753 +;3753: saber.reType = RT_SABER_GLOW; +ADDRLP4 0 +CNSTI4 5 +ASGNI4 +line 3754 +;3754: saber.customShader = glow; +ADDRLP4 0+76 +ADDRLP4 244 +INDIRI4 +ASGNI4 +line 3755 +;3755: saber.shaderRGBA[0] = saber.shaderRGBA[1] = saber.shaderRGBA[2] = saber.shaderRGBA[3] = 0xff; +ADDRLP4 284 +CNSTU1 255 +ASGNU1 +ADDRLP4 0+80+3 +ADDRLP4 284 +INDIRU1 +ASGNU1 +ADDRLP4 0+80+2 +ADDRLP4 284 +INDIRU1 +ASGNU1 +ADDRLP4 0+80+1 +ADDRLP4 284 +INDIRU1 +ASGNU1 +ADDRLP4 0+80 +ADDRLP4 284 +INDIRU1 +ASGNU1 +line 3756 +;3756: saber.renderfx = rfx; +ADDRLP4 0+4 +ADDRFP4 16 +INDIRI4 +ASGNI4 +line 3758 +;3757: +;3758: trap_R_AddRefEntityToScene( &saber ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 3761 +;3759: +;3760: // Do the hot core +;3761: VectorMA( origin, length, dir, saber.origin ); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 288 +CNSTI4 4 +ASGNI4 +ADDRLP4 0+52+4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 288 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 288 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 292 +CNSTI4 8 +ASGNI4 +ADDRLP4 0+52+8 +ADDRFP4 0 +INDIRP4 +ADDRLP4 292 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 292 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3762 +;3762: VectorMA( origin, -1, dir, saber.oldorigin ); +ADDRLP4 0+64 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 3212836864 +ADDRFP4 4 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 296 +CNSTI4 4 +ASGNI4 +ADDRLP4 0+64+4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 296 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 3212836864 +ADDRFP4 4 +INDIRP4 +ADDRLP4 296 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 300 +CNSTI4 8 +ASGNI4 +ADDRLP4 0+64+8 +ADDRFP4 0 +INDIRP4 +ADDRLP4 300 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 3212836864 +ADDRFP4 4 +INDIRP4 +ADDRLP4 300 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3766 +;3763: +;3764: +;3765:// CG_TestLine(saber.origin, saber.oldorigin, 50, 0x000000ff, 3); +;3766: saber.customShader = blade; +ADDRLP4 0+76 +ADDRLP4 240 +INDIRI4 +ASGNI4 +line 3767 +;3767: saber.reType = RT_LINE; +ADDRLP4 0 +CNSTI4 8 +ASGNI4 +line 3768 +;3768: saber.radius = (1.0 + crandom() * 0.2f)*radiusmult; +ADDRLP4 304 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0+92 +CNSTF4 1045220557 +CNSTF4 1073741824 +ADDRLP4 304 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +CNSTF4 1065353216 +ADDF4 +ADDRLP4 236 +INDIRF4 +MULF4 +ASGNF4 +line 3770 +;3769: +;3770: saber.shaderTexCoord[0] = saber.shaderTexCoord[1] = 1.0f; +ADDRLP4 308 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0+84+4 +ADDRLP4 308 +INDIRF4 +ASGNF4 +ADDRLP4 0+84 +ADDRLP4 308 +INDIRF4 +ASGNF4 +line 3771 +;3771: saber.shaderRGBA[0] = saber.shaderRGBA[1] = saber.shaderRGBA[2] = saber.shaderRGBA[3] = 0xff; +ADDRLP4 312 +CNSTU1 255 +ASGNU1 +ADDRLP4 0+80+3 +ADDRLP4 312 +INDIRU1 +ASGNU1 +ADDRLP4 0+80+2 +ADDRLP4 312 +INDIRU1 +ASGNU1 +ADDRLP4 0+80+1 +ADDRLP4 312 +INDIRU1 +ASGNU1 +ADDRLP4 0+80 +ADDRLP4 312 +INDIRU1 +ASGNU1 +line 3773 +;3772: +;3773: trap_R_AddRefEntityToScene( &saber ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 3774 +;3774:} +LABELV $1707 +endproc CG_DoSaber 313 20 +export CG_GetTagWorldPosition +proc CG_GetTagWorldPosition 100 24 +line 3782 +;3775: +;3776://-------------------------------------------------------------- +;3777:// CG_GetTagWorldPosition +;3778:// +;3779:// Can pass in NULL for the axis +;3780://-------------------------------------------------------------- +;3781:void CG_GetTagWorldPosition( refEntity_t *model, char *tag, vec3_t pos, vec3_t axis[3] ) +;3782:{ +line 3784 +;3783: orientation_t orientation; +;3784: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 3787 +;3785: +;3786: // Get the requested tag +;3787: trap_R_LerpTag( &orientation, model->hModel, model->oldframe, model->frame, +ADDRLP4 4 +ARGP4 +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 52 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 52 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRI4 +ARGI4 +CNSTF4 1065353216 +ADDRLP4 52 +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRF4 +SUBF4 +ARGF4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_LerpTag +CALLI4 +pop +line 3790 +;3788: 1.0f - model->backlerp, tag ); +;3789: +;3790: VectorCopy( model->origin, pos ); +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRB +ASGNB 12 +line 3791 +;3791: for ( i = 0 ; i < 3 ; i++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $1805 +line 3792 +;3792: { +line 3793 +;3793: VectorMA( pos, orientation.origin[i], model->axis[i], pos ); +ADDRLP4 56 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 60 +CNSTI4 12 +ASGNI4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRF4 +ADDRLP4 60 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 68 +CNSTI4 4 +ASGNI4 +ADDRLP4 72 +ADDRFP4 8 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 76 +CNSTI4 12 +ASGNI4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRF4 +ADDRLP4 76 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 76 +INDIRI4 +ADDP4 +ADDP4 +ADDRLP4 68 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 84 +CNSTI4 8 +ASGNI4 +ADDRLP4 88 +ADDRFP4 8 +INDIRP4 +ADDRLP4 84 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 92 +CNSTI4 12 +ASGNI4 +ADDRLP4 88 +INDIRP4 +ADDRLP4 88 +INDIRP4 +INDIRF4 +ADDRLP4 92 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +ADDP4 +ADDRLP4 84 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3794 +;3794: } +LABELV $1806 +line 3791 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $1805 +line 3796 +;3795: +;3796: if ( axis ) +ADDRFP4 12 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1809 +line 3797 +;3797: { +line 3798 +;3798: MatrixMultiply( orientation.axis, model->axis, axis ); +ADDRLP4 4+12 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 MatrixMultiply +CALLV +pop +line 3799 +;3799: } +LABELV $1809 +line 3800 +;3800:} +LABELV $1804 +endproc CG_GetTagWorldPosition 100 24 +export CG_CreateSaberMarks +proc CG_CreateSaberMarks 6252 28 +line 3807 +;3801: +;3802:#define MAX_MARK_FRAGMENTS 128 +;3803:#define MAX_MARK_POINTS 384 +;3804:extern markPoly_t *CG_AllocMark(); +;3805: +;3806:void CG_CreateSaberMarks( vec3_t start, vec3_t end, vec3_t normal ) +;3807:{ +line 3817 +;3808:// byte colors[4]; +;3809: int i, j; +;3810: int numFragments; +;3811: vec3_t axis[3], originalPoints[4], mid; +;3812: vec3_t markPoints[MAX_MARK_POINTS], projection; +;3813: polyVert_t *v, verts[MAX_VERTS_ON_POLY]; +;3814: markPoly_t *mark; +;3815: markFragment_t markFragments[MAX_MARK_FRAGMENTS], *mf; +;3816: +;3817: float radius = 0.65f; +ADDRLP4 4916 +CNSTF4 1059481190 +ASGNF4 +line 3819 +;3818: +;3819: if ( !cg_addMarks.integer ) +ADDRGP4 cg_addMarks+12 +INDIRI4 +CNSTI4 0 +NEI4 $1813 +line 3820 +;3820: { +line 3821 +;3821: return; +ADDRGP4 $1812 +JUMPV +LABELV $1813 +line 3824 +;3822: } +;3823: +;3824: VectorSubtract( end, start, axis[1] ); +ADDRLP4 256+12 +ADDRFP4 4 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 6008 +CNSTI4 4 +ASGNI4 +ADDRLP4 256+12+4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 6008 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 6008 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 6012 +CNSTI4 8 +ASGNI4 +ADDRLP4 256+12+8 +ADDRFP4 4 +INDIRP4 +ADDRLP4 6012 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 6012 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 3825 +;3825: VectorNormalize( axis[1] ); +ADDRLP4 256+12 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 3828 +;3826: +;3827: // create the texture axis +;3828: VectorCopy( normal, axis[0] ); +ADDRLP4 256 +ADDRFP4 8 +INDIRP4 +INDIRB +ASGNB 12 +line 3829 +;3829: CrossProduct( axis[1], axis[0], axis[2] ); +ADDRLP4 256+12 +ARGP4 +ADDRLP4 256 +ARGP4 +ADDRLP4 256+24 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 3832 +;3830: +;3831: // create the full polygon that we'll project +;3832: for ( i = 0 ; i < 3 ; i++ ) +ADDRLP4 300 +CNSTI4 0 +ASGNI4 +LABELV $1824 +line 3833 +;3833: { // stretch a bit more in the direction that we are traveling in... debateable as to whether this makes things better or worse +line 3834 +;3834: originalPoints[0][i] = start[i] - radius * axis[1][i] - radius * axis[2][i]; +ADDRLP4 6016 +ADDRLP4 300 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 6016 +INDIRI4 +ADDRLP4 4920 +ADDP4 +ADDRLP4 6016 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 4916 +INDIRF4 +ADDRLP4 6016 +INDIRI4 +ADDRLP4 256+12 +ADDP4 +INDIRF4 +MULF4 +SUBF4 +ADDRLP4 4916 +INDIRF4 +ADDRLP4 6016 +INDIRI4 +ADDRLP4 256+24 +ADDP4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 3835 +;3835: originalPoints[1][i] = end[i] + radius * axis[1][i] - radius * axis[2][i]; +ADDRLP4 6024 +ADDRLP4 300 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 6024 +INDIRI4 +ADDRLP4 4920+12 +ADDP4 +ADDRLP4 6024 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 4916 +INDIRF4 +ADDRLP4 6024 +INDIRI4 +ADDRLP4 256+12 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 4916 +INDIRF4 +ADDRLP4 6024 +INDIRI4 +ADDRLP4 256+24 +ADDP4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 3836 +;3836: originalPoints[2][i] = end[i] + radius * axis[1][i] + radius * axis[2][i]; +ADDRLP4 6032 +ADDRLP4 300 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 6032 +INDIRI4 +ADDRLP4 4920+24 +ADDP4 +ADDRLP4 6032 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 4916 +INDIRF4 +ADDRLP4 6032 +INDIRI4 +ADDRLP4 256+12 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 4916 +INDIRF4 +ADDRLP4 6032 +INDIRI4 +ADDRLP4 256+24 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3837 +;3837: originalPoints[3][i] = start[i] - radius * axis[1][i] + radius * axis[2][i]; +ADDRLP4 6040 +ADDRLP4 300 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 6040 +INDIRI4 +ADDRLP4 4920+36 +ADDP4 +ADDRLP4 6040 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 4916 +INDIRF4 +ADDRLP4 6040 +INDIRI4 +ADDRLP4 256+12 +ADDP4 +INDIRF4 +MULF4 +SUBF4 +ADDRLP4 4916 +INDIRF4 +ADDRLP4 6040 +INDIRI4 +ADDRLP4 256+24 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 3838 +;3838: } +LABELV $1825 +line 3832 +ADDRLP4 300 +ADDRLP4 300 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 300 +INDIRI4 +CNSTI4 3 +LTI4 $1824 +line 3840 +;3839: +;3840: VectorScale( normal, -1, projection ); +ADDRLP4 6016 +CNSTF4 3212836864 +ASGNF4 +ADDRLP4 6020 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 4972 +ADDRLP4 6016 +INDIRF4 +ADDRLP4 6020 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 4972+4 +ADDRLP4 6016 +INDIRF4 +ADDRLP4 6020 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 4972+8 +CNSTF4 3212836864 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3843 +;3841: +;3842: // get the fragments +;3843: numFragments = trap_CM_MarkFragments( 4, (const float (*)[3])originalPoints, +CNSTI4 4 +ARGI4 +ADDRLP4 4920 +ARGP4 +ADDRLP4 4972 +ARGP4 +CNSTI4 384 +ARGI4 +ADDRLP4 304 +ARGP4 +CNSTI4 128 +ARGI4 +ADDRLP4 4984 +ARGP4 +ADDRLP4 6024 +ADDRGP4 trap_CM_MarkFragments +CALLI4 +ASGNI4 +ADDRLP4 4968 +ADDRLP4 6024 +INDIRI4 +ASGNI4 +line 3846 +;3844: projection, MAX_MARK_POINTS, markPoints[0], MAX_MARK_FRAGMENTS, markFragments ); +;3845: +;3846: for ( i = 0, mf = markFragments ; i < numFragments ; i++, mf++ ) +ADDRLP4 300 +CNSTI4 0 +ASGNI4 +ADDRLP4 296 +ADDRLP4 4984 +ASGNP4 +ADDRGP4 $1844 +JUMPV +LABELV $1841 +line 3847 +;3847: { +line 3849 +;3848: // we have an upper limit on the complexity of polygons that we store persistantly +;3849: if ( mf->numPoints > MAX_VERTS_ON_POLY ) +ADDRLP4 296 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 10 +LEI4 $1845 +line 3850 +;3850: { +line 3851 +;3851: mf->numPoints = MAX_VERTS_ON_POLY; +ADDRLP4 296 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 10 +ASGNI4 +line 3852 +;3852: } +LABELV $1845 +line 3854 +;3853: +;3854: for ( j = 0, v = verts ; j < mf->numPoints ; j++, v++ ) +ADDRLP4 292 +CNSTI4 0 +ASGNI4 +ADDRLP4 252 +ADDRLP4 12 +ASGNP4 +ADDRGP4 $1850 +JUMPV +LABELV $1847 +line 3855 +;3855: { +line 3859 +;3856: vec3_t delta; +;3857: +;3858: // Set up our texture coords, this may need some work +;3859: VectorCopy( markPoints[mf->firstPoint + j], v->xyz ); +ADDRLP4 252 +INDIRP4 +CNSTI4 12 +ADDRLP4 296 +INDIRP4 +INDIRI4 +ADDRLP4 292 +INDIRI4 +ADDI4 +MULI4 +ADDRLP4 304 +ADDP4 +INDIRB +ASGNB 12 +line 3860 +;3860: VectorAdd( end, start, mid ); +ADDRLP4 6040 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 6044 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 6040 +INDIRP4 +INDIRF4 +ADDRLP4 6044 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 6048 +CNSTI4 4 +ASGNI4 +ADDRLP4 0+4 +ADDRLP4 6040 +INDIRP4 +ADDRLP4 6048 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 6044 +INDIRP4 +ADDRLP4 6048 +INDIRI4 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 6052 +CNSTI4 8 +ASGNI4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +ADDRLP4 6052 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 6052 +INDIRI4 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 3861 +;3861: VectorScale( mid, 0.5f, mid ); +ADDRLP4 6056 +CNSTF4 1056964608 +ASGNF4 +ADDRLP4 0 +ADDRLP4 6056 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 6056 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+8 +CNSTF4 1056964608 +ADDRLP4 0+8 +INDIRF4 +MULF4 +ASGNF4 +line 3862 +;3862: VectorSubtract( v->xyz, mid, delta ); +ADDRLP4 6028 +ADDRLP4 252 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 6028+4 +ADDRLP4 252 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 6028+8 +ADDRLP4 252 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +SUBF4 +ASGNF4 +line 3864 +;3863: +;3864: v->st[0] = 0.5 + DotProduct( delta, axis[1] ) * (0.05f + random() * 0.03f); +ADDRLP4 6064 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 252 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 6028 +INDIRF4 +ADDRLP4 256+12 +INDIRF4 +MULF4 +ADDRLP4 6028+4 +INDIRF4 +ADDRLP4 256+12+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 6028+8 +INDIRF4 +ADDRLP4 256+12+8 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 1022739087 +ADDRLP4 6064 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +CNSTF4 1028443341 +ADDF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ASGNF4 +line 3865 +;3865: v->st[1] = 0.5 + DotProduct( delta, axis[2] ) * (0.15f + random() * 0.05f); +ADDRLP4 6068 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 252 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 6028 +INDIRF4 +ADDRLP4 256+24 +INDIRF4 +MULF4 +ADDRLP4 6028+4 +INDIRF4 +ADDRLP4 256+24+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 6028+8 +INDIRF4 +ADDRLP4 256+24+8 +INDIRF4 +MULF4 +ADDF4 +CNSTF4 1028443341 +ADDRLP4 6068 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +CNSTF4 1041865114 +ADDF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ASGNF4 +line 3866 +;3866: } +LABELV $1848 +line 3854 +ADDRLP4 292 +ADDRLP4 292 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 252 +ADDRLP4 252 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +LABELV $1850 +ADDRLP4 292 +INDIRI4 +ADDRLP4 296 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LTI4 $1847 +line 3868 +;3867: +;3868: if (cg_saberDynamicMarks.integer) +ADDRGP4 cg_saberDynamicMarks+12 +INDIRI4 +CNSTI4 0 +EQI4 $1875 +line 3869 +;3869: { +line 3870 +;3870: int i = 0; +ADDRLP4 6032 +CNSTI4 0 +ASGNI4 +line 3871 +;3871: int i_2 = 0; +ADDRLP4 6028 +CNSTI4 0 +ASGNI4 +line 3875 +;3872: addpolyArgStruct_t apArgs; +;3873: vec3_t x; +;3874: +;3875: memset (&apArgs, 0, sizeof(apArgs)); +ADDRLP4 6036 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 180 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +ADDRGP4 $1879 +JUMPV +line 3878 +;3876: +;3877: while (i < 4) +;3878: { +LABELV $1881 +line 3880 +;3879: while (i_2 < 3) +;3880: { +line 3881 +;3881: apArgs.p[i][i_2] = verts[i].xyz[i_2]; +ADDRLP4 6228 +ADDRLP4 6028 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 6228 +INDIRI4 +CNSTI4 12 +ADDRLP4 6032 +INDIRI4 +MULI4 +ADDRLP4 6036 +ADDP4 +ADDP4 +ADDRLP4 6228 +INDIRI4 +CNSTI4 24 +ADDRLP4 6032 +INDIRI4 +MULI4 +ADDRLP4 12 +ADDP4 +ADDP4 +INDIRF4 +ASGNF4 +line 3883 +;3882: +;3883: i_2++; +ADDRLP4 6028 +ADDRLP4 6028 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 3884 +;3884: } +LABELV $1882 +line 3879 +ADDRLP4 6028 +INDIRI4 +CNSTI4 3 +LTI4 $1881 +line 3886 +;3885: +;3886: i_2 = 0; +ADDRLP4 6028 +CNSTI4 0 +ASGNI4 +line 3887 +;3887: i++; +ADDRLP4 6032 +ADDRLP4 6032 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 3888 +;3888: } +LABELV $1879 +line 3877 +ADDRLP4 6032 +INDIRI4 +CNSTI4 4 +LTI4 $1882 +line 3890 +;3889: +;3890: i = 0; +ADDRLP4 6032 +CNSTI4 0 +ASGNI4 +line 3891 +;3891: i_2 = 0; +ADDRLP4 6028 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1885 +JUMPV +line 3894 +;3892: +;3893: while (i < 4) +;3894: { +LABELV $1887 +line 3896 +;3895: while (i_2 < 2) +;3896: { +line 3897 +;3897: apArgs.ev[i][i_2] = verts[i].st[i_2]; +ADDRLP4 6228 +ADDRLP4 6028 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 6228 +INDIRI4 +ADDRLP4 6032 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRLP4 6036+48 +ADDP4 +ADDP4 +ADDRLP4 6228 +INDIRI4 +CNSTI4 24 +ADDRLP4 6032 +INDIRI4 +MULI4 +ADDRLP4 12+12 +ADDP4 +ADDP4 +INDIRF4 +ASGNF4 +line 3899 +;3898: +;3899: i_2++; +ADDRLP4 6028 +ADDRLP4 6028 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 3900 +;3900: } +LABELV $1888 +line 3895 +ADDRLP4 6028 +INDIRI4 +CNSTI4 2 +LTI4 $1887 +line 3902 +;3901: +;3902: i_2 = 0; +ADDRLP4 6028 +CNSTI4 0 +ASGNI4 +line 3903 +;3903: i++; +ADDRLP4 6032 +ADDRLP4 6032 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 3904 +;3904: } +LABELV $1885 +line 3893 +ADDRLP4 6032 +INDIRI4 +CNSTI4 4 +LTI4 $1888 +line 3909 +;3905: +;3906: //When using addpoly, having a situation like this tends to cause bad results. +;3907: //(I assume it doesn't like trying to draw a polygon over two planes and extends +;3908: //the vertex out to some odd value) +;3909: VectorSubtract(apArgs.p[0], apArgs.p[3], x); +ADDRLP4 6216 +ADDRLP4 6036 +INDIRF4 +ADDRLP4 6036+36 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 6216+4 +ADDRLP4 6036+4 +INDIRF4 +ADDRLP4 6036+36+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 6216+8 +ADDRLP4 6036+8 +INDIRF4 +ADDRLP4 6036+36+8 +INDIRF4 +SUBF4 +ASGNF4 +line 3910 +;3910: if (VectorLength(x) > 3.0f) +ADDRLP4 6216 +ARGP4 +ADDRLP4 6228 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 6228 +INDIRF4 +CNSTF4 1077936128 +LEF4 $1901 +line 3911 +;3911: { +line 3912 +;3912: return; +ADDRGP4 $1812 +JUMPV +LABELV $1901 +line 3915 +;3913: } +;3914: +;3915: apArgs.numVerts = mf->numPoints; +ADDRLP4 6036+80 +ADDRLP4 296 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 3916 +;3916: VectorCopy(vec3_origin, apArgs.vel); +ADDRLP4 6036+84 +ADDRGP4 vec3_origin +INDIRB +ASGNB 12 +line 3917 +;3917: VectorCopy(vec3_origin, apArgs.accel); +ADDRLP4 6036+96 +ADDRGP4 vec3_origin +INDIRB +ASGNB 12 +line 3919 +;3918: +;3919: apArgs.alpha1 = 1.0f; +ADDRLP4 6036+108 +CNSTF4 1065353216 +ASGNF4 +line 3920 +;3920: apArgs.alpha2 = 0.0f; +ADDRLP4 6036+112 +CNSTF4 0 +ASGNF4 +line 3921 +;3921: apArgs.alphaParm = 255.0f; +ADDRLP4 6036+116 +CNSTF4 1132396544 +ASGNF4 +line 3923 +;3922: +;3923: VectorSet(apArgs.rgb1, 0.0f, 0.0f, 0.0f); +ADDRLP4 6036+120 +CNSTF4 0 +ASGNF4 +ADDRLP4 6036+120+4 +CNSTF4 0 +ASGNF4 +ADDRLP4 6036+120+8 +CNSTF4 0 +ASGNF4 +line 3924 +;3924: VectorSet(apArgs.rgb2, 0.0f, 0.0f, 0.0f); +ADDRLP4 6036+132 +CNSTF4 0 +ASGNF4 +ADDRLP4 6036+132+4 +CNSTF4 0 +ASGNF4 +ADDRLP4 6036+132+8 +CNSTF4 0 +ASGNF4 +line 3926 +;3925: +;3926: apArgs.rgbParm = 0.0f; +ADDRLP4 6036+144 +CNSTF4 0 +ASGNF4 +line 3928 +;3927: +;3928: apArgs.bounce = 0; +ADDRLP4 6036+160 +CNSTF4 0 +ASGNF4 +line 3929 +;3929: apArgs.motionDelay = 0; +ADDRLP4 6036+164 +CNSTI4 0 +ASGNI4 +line 3930 +;3930: apArgs.killTime = cg_saberDynamicMarkTime.integer; +ADDRLP4 6036+168 +ADDRGP4 cg_saberDynamicMarkTime+12 +INDIRI4 +ASGNI4 +line 3931 +;3931: apArgs.shader = cgs.media.rivetMarkShader; +ADDRLP4 6036+172 +ADDRGP4 cgs+70296+172 +INDIRI4 +ASGNI4 +line 3932 +;3932: apArgs.flags = 0x08000000|0x00000004; +ADDRLP4 6036+176 +CNSTI4 134217732 +ASGNI4 +line 3934 +;3933: +;3934: trap_FX_AddPoly(&apArgs); +ADDRLP4 6036 +ARGP4 +ADDRGP4 trap_FX_AddPoly +CALLV +pop +line 3936 +;3935: +;3936: apArgs.shader = trap_R_RegisterShader("gfx/effects/saberDamageGlow"); +ADDRGP4 $1929 +ARGP4 +ADDRLP4 6232 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 6036+172 +ADDRLP4 6232 +INDIRI4 +ASGNI4 +line 3937 +;3937: apArgs.rgb1[0] = 215 + random() * 40.0f; +ADDRLP4 6236 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 6036+120 +CNSTF4 1109393408 +ADDRLP4 6236 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +CNSTF4 1129775104 +ADDF4 +ASGNF4 +line 3938 +;3938: apArgs.rgb1[1] = 96 + random() * 32.0f; +ADDRLP4 6240 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 6036+120+4 +CNSTF4 1107296256 +ADDRLP4 6240 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +CNSTF4 1119879168 +ADDF4 +ASGNF4 +line 3939 +;3939: apArgs.rgb1[2] = apArgs.alphaParm = random()*15.0f; +ADDRLP4 6244 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 6248 +CNSTF4 1097859072 +ADDRLP4 6244 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ASGNF4 +ADDRLP4 6036+116 +ADDRLP4 6248 +INDIRF4 +ASGNF4 +ADDRLP4 6036+120+8 +ADDRLP4 6248 +INDIRF4 +ASGNF4 +line 3941 +;3940: +;3941: apArgs.rgb1[0] /= 255; +ADDRLP4 6036+120 +ADDRLP4 6036+120 +INDIRF4 +CNSTF4 1132396544 +DIVF4 +ASGNF4 +line 3942 +;3942: apArgs.rgb1[1] /= 255; +ADDRLP4 6036+120+4 +ADDRLP4 6036+120+4 +INDIRF4 +CNSTF4 1132396544 +DIVF4 +ASGNF4 +line 3943 +;3943: apArgs.rgb1[2] /= 255; +ADDRLP4 6036+120+8 +ADDRLP4 6036+120+8 +INDIRF4 +CNSTF4 1132396544 +DIVF4 +ASGNF4 +line 3944 +;3944: VectorCopy(apArgs.rgb1, apArgs.rgb2); +ADDRLP4 6036+132 +ADDRLP4 6036+120 +INDIRB +ASGNB 12 +line 3946 +;3945: +;3946: apArgs.killTime = 100; +ADDRLP4 6036+168 +CNSTI4 100 +ASGNI4 +line 3948 +;3947: +;3948: trap_FX_AddPoly(&apArgs); +ADDRLP4 6036 +ARGP4 +ADDRGP4 trap_FX_AddPoly +CALLV +pop +line 3949 +;3949: } +ADDRGP4 $1876 +JUMPV +LABELV $1875 +line 3951 +;3950: else +;3951: { +line 3953 +;3952: // save it persistantly, do burn first +;3953: mark = CG_AllocMark(); +ADDRLP4 6028 +ADDRGP4 CG_AllocMark +CALLP4 +ASGNP4 +ADDRLP4 4912 +ADDRLP4 6028 +INDIRP4 +ASGNP4 +line 3954 +;3954: mark->time = cg.time; +ADDRLP4 4912 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 3955 +;3955: mark->alphaFade = qtrue; +ADDRLP4 4912 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTI4 1 +ASGNI4 +line 3956 +;3956: mark->markShader = cgs.media.rivetMarkShader; +ADDRLP4 4912 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRGP4 cgs+70296+172 +INDIRI4 +ASGNI4 +line 3957 +;3957: mark->poly.numVerts = mf->numPoints; +ADDRLP4 4912 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 296 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 3958 +;3958: mark->color[0] = mark->color[1] = mark->color[2] = mark->color[3] = 255; +ADDRLP4 6036 +CNSTF4 1132396544 +ASGNF4 +ADDRLP4 4912 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 6036 +INDIRF4 +ASGNF4 +ADDRLP4 4912 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 6036 +INDIRF4 +ASGNF4 +ADDRLP4 4912 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 6036 +INDIRF4 +ASGNF4 +ADDRLP4 4912 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 6036 +INDIRF4 +ASGNF4 +line 3959 +;3959: memcpy( mark->verts, verts, mf->numPoints * sizeof( verts[0] ) ); +ADDRLP4 4912 +INDIRP4 +CNSTI4 48 +ADDP4 +ARGP4 +ADDRLP4 12 +ARGP4 +CNSTU4 24 +ADDRLP4 296 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CVIU4 4 +MULU4 +CVUI4 4 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 3963 +;3960: +;3961: // And now do a glow pass +;3962: // by moving the start time back, we can hack it to fade out way before the burn does +;3963: mark = CG_AllocMark(); +ADDRLP4 6040 +ADDRGP4 CG_AllocMark +CALLP4 +ASGNP4 +ADDRLP4 4912 +ADDRLP4 6040 +INDIRP4 +ASGNP4 +line 3964 +;3964: mark->time = cg.time - 8500; +ADDRLP4 4912 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 8500 +SUBI4 +ASGNI4 +line 3965 +;3965: mark->alphaFade = qfalse; +ADDRLP4 4912 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3966 +;3966: mark->markShader = trap_R_RegisterShader("gfx/effects/saberDamageGlow"); +ADDRGP4 $1929 +ARGP4 +ADDRLP4 6044 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 4912 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 6044 +INDIRI4 +ASGNI4 +line 3967 +;3967: mark->poly.numVerts = mf->numPoints; +ADDRLP4 4912 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRLP4 296 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 3968 +;3968: mark->color[0] = 215 + random() * 40.0f; +ADDRLP4 6048 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 4912 +INDIRP4 +CNSTI4 20 +ADDP4 +CNSTF4 1109393408 +ADDRLP4 6048 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +CNSTF4 1129775104 +ADDF4 +ASGNF4 +line 3969 +;3969: mark->color[1] = 96 + random() * 32.0f; +ADDRLP4 6052 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 4912 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 1107296256 +ADDRLP4 6052 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +CNSTF4 1119879168 +ADDF4 +ASGNF4 +line 3970 +;3970: mark->color[2] = mark->color[3] = random()*15.0f; +ADDRLP4 6056 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 6064 +CNSTF4 1097859072 +ADDRLP4 6056 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ASGNF4 +ADDRLP4 4912 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 6064 +INDIRF4 +ASGNF4 +ADDRLP4 4912 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 6064 +INDIRF4 +ASGNF4 +line 3971 +;3971: memcpy( mark->verts, verts, mf->numPoints * sizeof( verts[0] ) ); +ADDRLP4 4912 +INDIRP4 +CNSTI4 48 +ADDP4 +ARGP4 +ADDRLP4 12 +ARGP4 +CNSTU4 24 +ADDRLP4 296 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CVIU4 4 +MULU4 +CVUI4 4 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 3972 +;3972: } +LABELV $1876 +line 3973 +;3973: } +LABELV $1842 +line 3846 +ADDRLP4 300 +ADDRLP4 300 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 296 +ADDRLP4 296 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +LABELV $1844 +ADDRLP4 300 +INDIRI4 +ADDRLP4 4968 +INDIRI4 +LTI4 $1841 +line 3974 +;3974:} +LABELV $1812 +endproc CG_CreateSaberMarks 6252 28 +lit +align 4 +LABELV $1951 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +export CG_G2TraceCollide +code +proc CG_G2TraceCollide 1076 48 +line 3978 +;3975: +;3976:#ifdef G2_COLLISION_ENABLED +;3977:qboolean CG_G2TraceCollide(trace_t *tr, vec3_t lastValidStart, vec3_t lastValidEnd) +;3978:{ +line 3979 +;3979: if (tr->entityNum < MAX_CLIENTS) +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 32 +GEI4 $1949 +line 3980 +;3980: { //Hit a client with the normal trace, try the collision trace. +line 3983 +;3981: G2Trace_t G2Trace; +;3982: centity_t *g2Hit; +;3983: vec3_t vIdentity = {1.0f, 1.0f, 1.0f}; +ADDRLP4 1032 +ADDRGP4 $1951 +INDIRB +ASGNB 12 +line 3985 +;3984: vec3_t angles; +;3985: int tN = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 3986 +;3986: float fRadius = 0; +ADDRLP4 1044 +CNSTF4 0 +ASGNF4 +line 3988 +;3987: +;3988: memset (&G2Trace, 0, sizeof(G2Trace)); +ADDRLP4 4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 1024 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +ADDRGP4 $1953 +JUMPV +LABELV $1952 +line 3991 +;3989: +;3990: while (tN < MAX_G2_COLLISIONS) +;3991: { +line 3992 +;3992: G2Trace[tN].mEntityNum = -1; +ADDRLP4 0 +INDIRI4 +CNSTI4 6 +LSHI4 +ADDRLP4 4+4 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 3993 +;3993: tN++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 3994 +;3994: } +LABELV $1953 +line 3990 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LTI4 $1952 +line 3995 +;3995: g2Hit = &cg_entities[tr->entityNum]; +ADDRLP4 1028 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 3997 +;3996: +;3997: if (g2Hit && g2Hit->ghoul2) +ADDRLP4 1060 +ADDRLP4 1028 +INDIRP4 +ASGNP4 +ADDRLP4 1064 +CNSTU4 0 +ASGNU4 +ADDRLP4 1060 +INDIRP4 +CVPU4 4 +ADDRLP4 1064 +INDIRU4 +EQU4 $1956 +ADDRLP4 1060 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 1064 +INDIRU4 +EQU4 $1956 +line 3998 +;3998: { +line 3999 +;3999: angles[ROLL] = angles[PITCH] = 0; +ADDRLP4 1068 +CNSTF4 0 +ASGNF4 +ADDRLP4 1048 +ADDRLP4 1068 +INDIRF4 +ASGNF4 +ADDRLP4 1048+8 +ADDRLP4 1068 +INDIRF4 +ASGNF4 +line 4000 +;4000: angles[YAW] = g2Hit->lerpAngles[YAW]; +ADDRLP4 1048+4 +ADDRLP4 1028 +INDIRP4 +CNSTI4 944 +ADDP4 +INDIRF4 +ASGNF4 +line 4002 +;4001: +;4002: trap_G2API_CollisionDetect ( G2Trace, g2Hit->ghoul2, angles, g2Hit->lerpOrigin, cg.time, g2Hit->currentState.number, lastValidStart, lastValidEnd, vIdentity, 0, 2, fRadius ); +ADDRLP4 4 +ARGP4 +ADDRLP4 1072 +ADDRLP4 1028 +INDIRP4 +ASGNP4 +ADDRLP4 1072 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1048 +ARGP4 +ADDRLP4 1072 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 1072 +INDIRP4 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 1032 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 1044 +INDIRF4 +ARGF4 +ADDRGP4 trap_G2API_CollisionDetect +CALLV +pop +line 4004 +;4003: +;4004: if (G2Trace[0].mEntityNum != g2Hit->currentState.number) +ADDRLP4 4+4 +INDIRI4 +ADDRLP4 1028 +INDIRP4 +INDIRI4 +EQI4 $1961 +line 4005 +;4005: { +line 4006 +;4006: tr->fraction = 1.0f; +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 4007 +;4007: tr->entityNum = ENTITYNUM_NONE; +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +CNSTI4 1023 +ASGNI4 +line 4008 +;4008: tr->startsolid = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4009 +;4009: tr->allsolid = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 4010 +;4010: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1948 +JUMPV +LABELV $1961 +line 4013 +;4011: } +;4012: else +;4013: { //Yay! +line 4014 +;4014: VectorCopy(G2Trace[0].mCollisionPosition, tr->endpos); +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 4+20 +INDIRB +ASGNB 12 +line 4015 +;4015: VectorCopy(G2Trace[0].mCollisionNormal, tr->plane.normal); +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 4+32 +INDIRB +ASGNB 12 +line 4016 +;4016: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1948 +JUMPV +LABELV $1956 +line 4019 +;4017: } +;4018: } +;4019: } +LABELV $1949 +line 4021 +;4020: +;4021: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1948 +endproc CG_G2TraceCollide 1076 48 +export CG_G2SaberEffects +proc CG_G2SaberEffects 1120 28 +line 4025 +;4022:} +;4023: +;4024:void CG_G2SaberEffects(vec3_t start, vec3_t end, centity_t *owner) +;4025:{ +line 4029 +;4026: trace_t trace; +;4027: vec3_t startTr; +;4028: vec3_t endTr; +;4029: qboolean backWards = qfalse; +ADDRLP4 1080 +CNSTI4 0 +ASGNI4 +line 4030 +;4030: qboolean doneWithTraces = qfalse; +ADDRLP4 1108 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1968 +JUMPV +LABELV $1967 +line 4033 +;4031: +;4032: while (!doneWithTraces) +;4033: { +line 4034 +;4034: if (!backWards) +ADDRLP4 1080 +INDIRI4 +CNSTI4 0 +NEI4 $1970 +line 4035 +;4035: { +line 4036 +;4036: VectorCopy(start, startTr); +ADDRLP4 1084 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 4037 +;4037: VectorCopy(end, endTr); +ADDRLP4 1096 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 4038 +;4038: } +ADDRGP4 $1971 +JUMPV +LABELV $1970 +line 4040 +;4039: else +;4040: { +line 4041 +;4041: VectorCopy(end, startTr); +ADDRLP4 1084 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 4042 +;4042: VectorCopy(start, endTr); +ADDRLP4 1096 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 4043 +;4043: } +LABELV $1971 +line 4045 +;4044: +;4045: CG_Trace( &trace, startTr, NULL, NULL, endTr, owner->currentState.number, MASK_PLAYERSOLID ); +ADDRLP4 0 +ARGP4 +ADDRLP4 1084 +ARGP4 +ADDRLP4 1112 +CNSTP4 0 +ASGNP4 +ADDRLP4 1112 +INDIRP4 +ARGP4 +ADDRLP4 1112 +INDIRP4 +ARGP4 +ADDRLP4 1096 +ARGP4 +ADDRFP4 8 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 273 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 4047 +;4046: +;4047: if (trace.entityNum < MAX_CLIENTS) +ADDRLP4 0+52 +INDIRI4 +CNSTI4 32 +GEI4 $1972 +line 4048 +;4048: { //hit a client.. +line 4049 +;4049: CG_G2TraceCollide(&trace, startTr, endTr); +ADDRLP4 0 +ARGP4 +ADDRLP4 1084 +ARGP4 +ADDRLP4 1096 +ARGP4 +ADDRGP4 CG_G2TraceCollide +CALLI4 +pop +line 4051 +;4050: +;4051: if (trace.entityNum != ENTITYNUM_NONE) +ADDRLP4 0+52 +INDIRI4 +CNSTI4 1023 +EQI4 $1975 +line 4052 +;4052: { //it succeeded with the ghoul2 trace +line 4053 +;4053: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), trace.endpos, trace.plane.normal ); +ADDRGP4 $1978 +ARGP4 +ADDRLP4 1116 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 1116 +INDIRI4 +ARGI4 +ADDRLP4 0+12 +ARGP4 +ADDRLP4 0+24 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 4054 +;4054: } +LABELV $1975 +line 4055 +;4055: } +LABELV $1972 +line 4057 +;4056: +;4057: if (!backWards) +ADDRLP4 1080 +INDIRI4 +CNSTI4 0 +NEI4 $1981 +line 4058 +;4058: { +line 4059 +;4059: backWards = qtrue; +ADDRLP4 1080 +CNSTI4 1 +ASGNI4 +line 4060 +;4060: } +ADDRGP4 $1982 +JUMPV +LABELV $1981 +line 4062 +;4061: else +;4062: { +line 4063 +;4063: doneWithTraces = qtrue; +ADDRLP4 1108 +CNSTI4 1 +ASGNI4 +line 4064 +;4064: } +LABELV $1982 +line 4065 +;4065: } +LABELV $1968 +line 4032 +ADDRLP4 1108 +INDIRI4 +CNSTI4 0 +EQI4 $1967 +line 4066 +;4066:} +LABELV $1966 +endproc CG_G2SaberEffects 1120 28 +lit +align 4 +LABELV $1984 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +align 4 +LABELV $2168 +byte 4 1132396544 +byte 4 1132396544 +byte 4 1132396544 +export CG_AddSaberBlade +code +proc CG_AddSaberBlade 1672 36 +line 4073 +;4067:#endif +;4068: +;4069:#define SABER_TRAIL_TIME 40.0f +;4070:#define FX_USE_ALPHA 0x08000000 +;4071: +;4072:void CG_AddSaberBlade( centity_t *cent, centity_t *scent, refEntity_t *saber, int renderfx, int modelIndex, vec3_t origin, vec3_t angles, qboolean fromSaber) +;4073:{ +line 4075 +;4074: vec3_t org_, end, v, +;4075: axis_[3] = {0,0,0, 0,0,0, 0,0,0}; // shut the compiler up +ADDRLP4 1136 +ADDRGP4 $1984 +INDIRB +ASGNB 36 +line 4077 +;4076: trace_t trace; +;4077: int i = 0; +ADDRLP4 1080 +CNSTI4 0 +ASGNI4 +line 4086 +;4078: float saberLen, dualSaberLen; +;4079: float diff; +;4080: clientInfo_t *client; +;4081: centity_t *saberEnt; +;4082: saberTrail_t *saberTrail; +;4083: mdxaBone_t boltMatrix; +;4084: vec3_t futureAngles; +;4085: effectTrailArgStruct_t fx; +;4086: int scolor = 0; +ADDRLP4 1560 +CNSTI4 0 +ASGNI4 +line 4088 +;4087: vec3_t otherPos, otherDir, otherEnd; +;4088: float dualLen = 0.7; +ADDRLP4 1556 +CNSTF4 1060320051 +ASGNF4 +line 4090 +;4089: +;4090: saberEnt = &cg_entities[cent->currentState.saberEntityNum]; +ADDRLP4 1576 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 4093 +;4091: +;4092: if (/*cg.snap->ps.clientNum == cent->currentState.number && */ +;4093: cgs.clientinfo[ cent->currentState.clientNum ].team != TEAM_SPECTATOR && +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $1985 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +NEI4 $1985 +line 4095 +;4094: !(cg.snap->ps.pm_flags & PMF_FOLLOW)) +;4095: { +line 4096 +;4096: if (cent->saberLength < 1) +ADDRFP4 0 +INDIRP4 +CNSTI4 1000 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +GEF4 $1990 +line 4097 +;4097: { +line 4098 +;4098: cent->saberLength = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 1000 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 4099 +;4099: cent->saberExtendTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 1004 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 4100 +;4100: } +LABELV $1990 +line 4102 +;4101: +;4102: if (cent->saberLength < SABER_LENGTH_MAX) +ADDRFP4 0 +INDIRP4 +CNSTI4 1000 +ADDP4 +INDIRF4 +CNSTF4 1109393408 +GEF4 $1993 +line 4103 +;4103: { +line 4104 +;4104: cent->saberLength += (cg.time - cent->saberExtendTime)*0.05; +ADDRLP4 1632 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1636 +ADDRLP4 1632 +INDIRP4 +CNSTI4 1000 +ADDP4 +ASGNP4 +ADDRLP4 1636 +INDIRP4 +ADDRLP4 1636 +INDIRP4 +INDIRF4 +CNSTF4 1028443341 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 1632 +INDIRP4 +CNSTI4 1004 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 4105 +;4105: } +LABELV $1993 +line 4107 +;4106: +;4107: if (cent->saberLength > SABER_LENGTH_MAX) +ADDRFP4 0 +INDIRP4 +CNSTI4 1000 +ADDP4 +INDIRF4 +CNSTF4 1109393408 +LEF4 $1996 +line 4108 +;4108: { +line 4109 +;4109: cent->saberLength = SABER_LENGTH_MAX; +ADDRFP4 0 +INDIRP4 +CNSTI4 1000 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 4110 +;4110: } +LABELV $1996 +line 4112 +;4111: +;4112: cent->saberExtendTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 1004 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 4113 +;4113: saberLen = cent->saberLength; +ADDRLP4 1520 +ADDRFP4 0 +INDIRP4 +CNSTI4 1000 +ADDP4 +INDIRF4 +ASGNF4 +line 4114 +;4114: } +ADDRGP4 $1986 +JUMPV +LABELV $1985 +line 4116 +;4115: else +;4116: { +line 4117 +;4117: saberLen = SABER_LENGTH_MAX; +ADDRLP4 1520 +CNSTF4 1109393408 +ASGNF4 +line 4118 +;4118: } +LABELV $1986 +line 4124 +;4119: +;4120:/* +;4121:Ghoul2 Insert Start +;4122:*/ +;4123: +;4124: dualSaberLen = saberLen; +ADDRLP4 1552 +ADDRLP4 1520 +INDIRF4 +ASGNF4 +line 4126 +;4125: +;4126: if ((cent->currentState.eFlags & EF_DEAD) && !fromSaber) +ADDRLP4 1632 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 1632 +INDIRI4 +EQI4 $1999 +ADDRFP4 28 +INDIRI4 +ADDRLP4 1632 +INDIRI4 +NEI4 $1999 +line 4127 +;4127: { //trying to draw a saber on a corpse? That's bad. +line 4128 +;4128: return; +ADDRGP4 $1983 +JUMPV +LABELV $1999 +line 4131 +;4129: } +;4130: +;4131: futureAngles[YAW] = angles[YAW]; +ADDRLP4 1564+4 +ADDRFP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 4132 +;4132: futureAngles[PITCH] = angles[PITCH]; +ADDRLP4 1564 +ADDRFP4 24 +INDIRP4 +INDIRF4 +ASGNF4 +line 4133 +;4133: futureAngles[ROLL] = angles[ROLL]; +ADDRLP4 1564+8 +ADDRFP4 24 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 4136 +;4134: +;4135: // figure out where the actual model muzzle is +;4136: if (fromSaber) +ADDRFP4 28 +INDIRI4 +CNSTI4 0 +EQI4 $2003 +line 4137 +;4137: { +line 4138 +;4138: trap_G2API_GetBoltMatrix(scent->ghoul2, 0, 0, &boltMatrix, futureAngles, origin, cg.time, cgs.gameModels, scent->modelScale); +ADDRLP4 1636 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 1636 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1640 +CNSTI4 0 +ASGNI4 +ADDRLP4 1640 +INDIRI4 +ARGI4 +ADDRLP4 1640 +INDIRI4 +ARGI4 +ADDRLP4 1580 +ARGP4 +ADDRLP4 1564 +ARGP4 +ADDRFP4 20 +INDIRP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 1636 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 4139 +;4139: } +ADDRGP4 $2004 +JUMPV +LABELV $2003 +line 4141 +;4140: else +;4141: { +line 4142 +;4142: trap_G2API_GetBoltMatrix(scent->ghoul2, 1, 0, &boltMatrix, futureAngles, origin, cg.time, cgs.gameModels, scent->modelScale); +ADDRLP4 1636 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 1636 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 1580 +ARGP4 +ADDRLP4 1564 +ARGP4 +ADDRFP4 20 +INDIRP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 1636 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 4143 +;4143: } +LABELV $2004 +line 4145 +;4144: // work the matrix axis stuff into the original axis and origins used. +;4145: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, org_); +ADDRLP4 1580 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1088 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 4146 +;4146: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_Y, axis_[0]); +ADDRLP4 1580 +ARGP4 +CNSTI4 6 +ARGI4 +ADDRLP4 1136 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 4148 +;4147: +;4148: if (!fromSaber && saberEnt) +ADDRFP4 28 +INDIRI4 +CNSTI4 0 +NEI4 $2009 +ADDRLP4 1576 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2009 +line 4149 +;4149: { +line 4150 +;4150: VectorCopy(org_, saberEnt->currentState.pos.trBase); +ADDRLP4 1576 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 1088 +INDIRB +ASGNB 12 +line 4152 +;4151: +;4152: VectorCopy(axis_[0], saberEnt->currentState.apos.trBase); +ADDRLP4 1576 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRLP4 1136 +INDIRB +ASGNB 12 +line 4153 +;4153: } +LABELV $2009 +line 4155 +;4154: +;4155: client = &cgs.clientinfo[cent->currentState.number]; +ADDRLP4 1084 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 4157 +;4156: +;4157: if (!client) +ADDRLP4 1084 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2012 +line 4158 +;4158: { //something horrible has apparently happened +line 4159 +;4159: return; +ADDRGP4 $1983 +JUMPV +LABELV $2012 +line 4162 +;4160: } +;4161: +;4162: if (cent->currentState.bolt2) +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2014 +line 4163 +;4163: { +line 4164 +;4164: VectorMA( org_, saberLen*dualLen, axis_[0], end ); +ADDRLP4 1636 +ADDRLP4 1520 +INDIRF4 +ADDRLP4 1556 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 1112 +ADDRLP4 1088 +INDIRF4 +ADDRLP4 1136 +INDIRF4 +ADDRLP4 1636 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1112+4 +ADDRLP4 1088+4 +INDIRF4 +ADDRLP4 1136+4 +INDIRF4 +ADDRLP4 1636 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1112+8 +ADDRLP4 1088+8 +INDIRF4 +ADDRLP4 1136+8 +INDIRF4 +ADDRLP4 1520 +INDIRF4 +ADDRLP4 1556 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 4165 +;4165: } +ADDRGP4 $2015 +JUMPV +LABELV $2014 +line 4167 +;4166: else +;4167: { +line 4168 +;4168: VectorMA( org_, saberLen, axis_[0], end ); +ADDRLP4 1112 +ADDRLP4 1088 +INDIRF4 +ADDRLP4 1136 +INDIRF4 +ADDRLP4 1520 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1112+4 +ADDRLP4 1088+4 +INDIRF4 +ADDRLP4 1136+4 +INDIRF4 +ADDRLP4 1520 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1112+8 +ADDRLP4 1088+8 +INDIRF4 +ADDRLP4 1136+8 +INDIRF4 +ADDRLP4 1520 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 4169 +;4169: } +LABELV $2015 +line 4171 +;4170: +;4171: VectorAdd( end, axis_[0], end ); +ADDRLP4 1112 +ADDRLP4 1112 +INDIRF4 +ADDRLP4 1136 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1112+4 +ADDRLP4 1112+4 +INDIRF4 +ADDRLP4 1136+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1112+8 +ADDRLP4 1112+8 +INDIRF4 +ADDRLP4 1136+8 +INDIRF4 +ADDF4 +ASGNF4 +line 4173 +;4172: +;4173: if (cent->currentState.bolt2) +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2034 +line 4174 +;4174: { +line 4175 +;4175: otherPos[0] = org_[0] - axis_[0][0]*12; +ADDRLP4 1124 +ADDRLP4 1088 +INDIRF4 +CNSTF4 1094713344 +ADDRLP4 1136 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 4176 +;4176: otherPos[1] = org_[1] - axis_[0][1]*12; +ADDRLP4 1124+4 +ADDRLP4 1088+4 +INDIRF4 +CNSTF4 1094713344 +ADDRLP4 1136+4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 4177 +;4177: otherPos[2] = org_[2] - axis_[0][2]*12; +ADDRLP4 1124+8 +ADDRLP4 1088+8 +INDIRF4 +CNSTF4 1094713344 +ADDRLP4 1136+8 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 4179 +;4178: +;4179: otherDir[0] = -axis_[0][0]; +ADDRLP4 1540 +ADDRLP4 1136 +INDIRF4 +NEGF4 +ASGNF4 +line 4180 +;4180: otherDir[1] = -axis_[0][1]; +ADDRLP4 1540+4 +ADDRLP4 1136+4 +INDIRF4 +NEGF4 +ASGNF4 +line 4181 +;4181: otherDir[2] = -axis_[0][2]; +ADDRLP4 1540+8 +ADDRLP4 1136+8 +INDIRF4 +NEGF4 +ASGNF4 +line 4183 +;4182: +;4183: VectorMA( otherPos, dualSaberLen*dualLen, otherDir, otherEnd ); +ADDRLP4 1636 +ADDRLP4 1552 +INDIRF4 +ADDRLP4 1556 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 1524 +ADDRLP4 1124 +INDIRF4 +ADDRLP4 1540 +INDIRF4 +ADDRLP4 1636 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1524+4 +ADDRLP4 1124+4 +INDIRF4 +ADDRLP4 1540+4 +INDIRF4 +ADDRLP4 1636 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1524+8 +ADDRLP4 1124+8 +INDIRF4 +ADDRLP4 1540+8 +INDIRF4 +ADDRLP4 1552 +INDIRF4 +ADDRLP4 1556 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 4184 +;4184: VectorAdd( otherEnd, otherDir, otherEnd ); +ADDRLP4 1524 +ADDRLP4 1524 +INDIRF4 +ADDRLP4 1540 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1524+4 +ADDRLP4 1524+4 +INDIRF4 +ADDRLP4 1540+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1524+8 +ADDRLP4 1524+8 +INDIRF4 +ADDRLP4 1540+8 +INDIRF4 +ADDF4 +ASGNF4 +line 4185 +;4185: } +LABELV $2034 +line 4187 +;4186: +;4187: scolor = cgs.clientinfo[cent->currentState.number].icolor1; +ADDRLP4 1560 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+104 +ADDP4 +INDIRI4 +ASGNI4 +line 4189 +;4188: +;4189: if (cgs.gametype >= GT_TEAM && !cgs.jediVmerc ) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $2060 +ADDRGP4 cgs+32996 +INDIRI4 +CNSTI4 0 +NEI4 $2060 +line 4190 +;4190: { +line 4191 +;4191: if (cgs.clientinfo[cent->currentState.number].team == TEAM_RED) +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $2064 +line 4192 +;4192: { +line 4193 +;4193: scolor = SABER_RED; +ADDRLP4 1560 +CNSTI4 0 +ASGNI4 +line 4194 +;4194: } +ADDRGP4 $2065 +JUMPV +LABELV $2064 +line 4195 +;4195: else if (cgs.clientinfo[cent->currentState.number].team == TEAM_BLUE) +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $2068 +line 4196 +;4196: { +line 4197 +;4197: scolor = SABER_BLUE; +ADDRLP4 1560 +CNSTI4 4 +ASGNI4 +line 4198 +;4198: } +LABELV $2068 +LABELV $2065 +line 4199 +;4199: } +LABELV $2060 +line 4201 +;4200: +;4201: if (!cg_saberContact.integer) +ADDRGP4 cg_saberContact+12 +INDIRI4 +CNSTI4 0 +NEI4 $2072 +line 4202 +;4202: { //if we don't have saber contact enabled, just add the blade and don't care what it's touching +line 4203 +;4203: goto CheckTrail; +ADDRGP4 $2075 +JUMPV +LABELV $2072 +line 4207 +;4204: } +;4205: +;4206:#ifdef G2_COLLISION_ENABLED +;4207: if (cg_saberModelTraceEffect.integer) +ADDRGP4 cg_saberModelTraceEffect+12 +INDIRI4 +CNSTI4 0 +EQI4 $2076 +line 4208 +;4208: { +line 4209 +;4209: CG_G2SaberEffects(org_, end, cent); +ADDRLP4 1088 +ARGP4 +ADDRLP4 1112 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_G2SaberEffects +CALLV +pop +line 4210 +;4210: } +LABELV $2076 +line 4213 +;4211:#endif +;4212: +;4213: for ( i = 0; i < 1; i++ )//was 2 because it would go through architecture and leave saber trails on either side of the brush - but still looks bad if we hit a corner, blade is still 8 longer than hit +ADDRLP4 1080 +CNSTI4 0 +ASGNI4 +LABELV $2079 +line 4214 +;4214: { +line 4215 +;4215: if ( i ) +ADDRLP4 1080 +INDIRI4 +CNSTI4 0 +EQI4 $2083 +line 4216 +;4216: {//tracing from end to base +line 4217 +;4217: CG_Trace( &trace, end, NULL, NULL, org_, ENTITYNUM_NONE, MASK_SOLID ); +ADDRLP4 0 +ARGP4 +ADDRLP4 1112 +ARGP4 +ADDRLP4 1636 +CNSTP4 0 +ASGNP4 +ADDRLP4 1636 +INDIRP4 +ARGP4 +ADDRLP4 1636 +INDIRP4 +ARGP4 +ADDRLP4 1088 +ARGP4 +CNSTI4 1023 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 4218 +;4218: } +ADDRGP4 $2084 +JUMPV +LABELV $2083 +line 4220 +;4219: else +;4220: {//tracing from base to end +line 4221 +;4221: CG_Trace( &trace, org_, NULL, NULL, end, ENTITYNUM_NONE, MASK_SOLID ); +ADDRLP4 0 +ARGP4 +ADDRLP4 1088 +ARGP4 +ADDRLP4 1636 +CNSTP4 0 +ASGNP4 +ADDRLP4 1636 +INDIRP4 +ARGP4 +ADDRLP4 1636 +INDIRP4 +ARGP4 +ADDRLP4 1112 +ARGP4 +CNSTI4 1023 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 4222 +;4222: } +LABELV $2084 +line 4224 +;4223: +;4224: if ( trace.fraction < 1.0f ) +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1065353216 +GEF4 $2085 +line 4225 +;4225: { +line 4227 +;4226: vec3_t trDir; +;4227: VectorCopy(trace.plane.normal, trDir); +ADDRLP4 1636 +ADDRLP4 0+24 +INDIRB +ASGNB 12 +line 4228 +;4228: if (!trDir[0] && !trDir[1] && !trDir[2]) +ADDRLP4 1648 +CNSTF4 0 +ASGNF4 +ADDRLP4 1636 +INDIRF4 +ADDRLP4 1648 +INDIRF4 +NEF4 $2089 +ADDRLP4 1636+4 +INDIRF4 +ADDRLP4 1648 +INDIRF4 +NEF4 $2089 +ADDRLP4 1636+8 +INDIRF4 +ADDRLP4 1648 +INDIRF4 +NEF4 $2089 +line 4229 +;4229: { +line 4230 +;4230: trDir[1] = 1; +ADDRLP4 1636+4 +CNSTF4 1065353216 +ASGNF4 +line 4231 +;4231: } +LABELV $2089 +line 4232 +;4232: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), trace.endpos, trDir ); +ADDRGP4 $2094 +ARGP4 +ADDRLP4 1652 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 1652 +INDIRI4 +ARGI4 +ADDRLP4 0+12 +ARGP4 +ADDRLP4 1636 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 4235 +;4233: +;4234: //Stop saber? (it wouldn't look right if it was stuck through a thin wall and unable to hurt players on the other side) +;4235: VectorSubtract(org_, trace.endpos, v); +ADDRLP4 1100 +ADDRLP4 1088 +INDIRF4 +ADDRLP4 0+12 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1100+4 +ADDRLP4 1088+4 +INDIRF4 +ADDRLP4 0+12+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1100+8 +ADDRLP4 1088+8 +INDIRF4 +ADDRLP4 0+12+8 +INDIRF4 +SUBF4 +ASGNF4 +line 4236 +;4236: saberLen = VectorLength(v); +ADDRLP4 1100 +ARGP4 +ADDRLP4 1656 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 1520 +ADDRLP4 1656 +INDIRF4 +ASGNF4 +line 4238 +;4237: +;4238: VectorCopy(trace.endpos, end); +ADDRLP4 1112 +ADDRLP4 0+12 +INDIRB +ASGNB 12 +line 4240 +;4239: +;4240: if (cent->currentState.bolt2) +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2106 +line 4241 +;4241: { +line 4242 +;4242: break; +ADDRGP4 $2081 +JUMPV +LABELV $2106 +line 4246 +;4243: } +;4244: // All I need is a bool to mark whether I have a previous point to work with. +;4245: //....come up with something better.. +;4246: if ( client->saberTrail.haveOldPos[i] ) +ADDRLP4 1080 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 592 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2108 +line 4247 +;4247: { +line 4248 +;4248: if ( trace.entityNum == ENTITYNUM_WORLD ) +ADDRLP4 0+52 +INDIRI4 +CNSTI4 1022 +NEI4 $2109 +line 4249 +;4249: {//only put marks on architecture +line 4251 +;4250: // Let's do some cool burn/glowing mark bits!!! +;4251: CG_CreateSaberMarks( client->saberTrail.oldPos[i], trace.endpos, trace.plane.normal ); +CNSTI4 12 +ADDRLP4 1080 +INDIRI4 +MULI4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 600 +ADDP4 +ADDP4 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRLP4 0+24 +ARGP4 +ADDRGP4 CG_CreateSaberMarks +CALLV +pop +line 4254 +;4252: +;4253: //make a sound +;4254: if ( cg.time - client->saberHitWallSoundDebounceTime >= 100 ) +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 648 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 100 +LTI4 $2109 +line 4255 +;4255: {//ugh, need to have a real sound debouncer... or do this game-side +line 4256 +;4256: client->saberHitWallSoundDebounceTime = cg.time; +ADDRLP4 1084 +INDIRP4 +CNSTI4 648 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 4257 +;4257: trap_S_StartSound ( trace.endpos, -1, CHAN_WEAPON, trap_S_RegisterSound( va("sound/weapons/saber/saberhitwall%i", Q_irand(1, 3)) ) ); +CNSTI4 1 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 1660 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRGP4 $2120 +ARGP4 +ADDRLP4 1660 +INDIRI4 +ARGI4 +ADDRLP4 1664 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1664 +INDIRP4 +ARGP4 +ADDRLP4 1668 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0+12 +ARGP4 +CNSTI4 -1 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 1668 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 4258 +;4258: } +line 4259 +;4259: } +line 4260 +;4260: } +ADDRGP4 $2109 +JUMPV +LABELV $2108 +line 4262 +;4261: else +;4262: { +line 4264 +;4263: // if we impact next frame, we'll mark a slash mark +;4264: client->saberTrail.haveOldPos[i] = qtrue; +ADDRLP4 1080 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 592 +ADDP4 +ADDP4 +CNSTI4 1 +ASGNI4 +line 4267 +;4265:// CG_ImpactMark( cgs.media.rivetMarkShader, client->saberTrail.oldPos[i], client->saberTrail.oldNormal[i], +;4266:// 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, qfalse, 1.1f, qfalse ); +;4267: } +LABELV $2109 +line 4270 +;4268: +;4269: // stash point so we can connect-the-dots later +;4270: VectorCopy( trace.endpos, client->saberTrail.oldPos[i] ); +CNSTI4 12 +ADDRLP4 1080 +INDIRI4 +MULI4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 600 +ADDP4 +ADDP4 +ADDRLP4 0+12 +INDIRB +ASGNB 12 +line 4271 +;4271: VectorCopy( trace.plane.normal, client->saberTrail.oldNormal[i] ); +CNSTI4 12 +ADDRLP4 1080 +INDIRI4 +MULI4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 624 +ADDP4 +ADDP4 +ADDRLP4 0+24 +INDIRB +ASGNB 12 +line 4272 +;4272: } +ADDRGP4 $2086 +JUMPV +LABELV $2085 +line 4274 +;4273: else +;4274: { +line 4275 +;4275: if (cent->currentState.bolt2) +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2123 +line 4276 +;4276: { +line 4277 +;4277: break; +ADDRGP4 $2081 +JUMPV +LABELV $2123 +line 4280 +;4278: } +;4279: +;4280: if ( client->saberTrail.haveOldPos[i] ) +ADDRLP4 1080 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 592 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2125 +line 4281 +;4281: { +line 4287 +;4282: // Hmmm, no impact this frame, but we have an old point +;4283: // Let's put the mark there, we should use an endcap mark to close the line, but we +;4284: // can probably just get away with a round mark +;4285:// CG_ImpactMark( cgs.media.rivetMarkShader, client->saberTrail.oldPos[i], client->saberTrail.oldNormal[i], +;4286:// 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, qfalse, 1.1f, qfalse ); +;4287: } +LABELV $2125 +line 4290 +;4288: +;4289: // we aren't impacting, so turn off our mark tracking mechanism +;4290: client->saberTrail.haveOldPos[i] = qfalse; +ADDRLP4 1080 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 592 +ADDP4 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4291 +;4291: } +LABELV $2086 +line 4292 +;4292: } +LABELV $2080 +line 4213 +ADDRLP4 1080 +ADDRLP4 1080 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 1080 +INDIRI4 +CNSTI4 1 +LTI4 $2079 +LABELV $2081 +line 4294 +;4293: +;4294: if (cent->currentState.bolt2) +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2127 +line 4295 +;4295: { +line 4296 +;4296: for ( i = 0; i < 1; i++ )//was 2 because it would go through architecture and leave saber trails on either side of the brush - but still looks bad if we hit a corner, blade is still 8 longer than hit +ADDRLP4 1080 +CNSTI4 0 +ASGNI4 +LABELV $2129 +line 4297 +;4297: { +line 4298 +;4298: CG_Trace( &trace, otherPos, NULL, NULL, otherEnd, ENTITYNUM_NONE, MASK_SOLID ); +ADDRLP4 0 +ARGP4 +ADDRLP4 1124 +ARGP4 +ADDRLP4 1636 +CNSTP4 0 +ASGNP4 +ADDRLP4 1636 +INDIRP4 +ARGP4 +ADDRLP4 1636 +INDIRP4 +ARGP4 +ADDRLP4 1524 +ARGP4 +CNSTI4 1023 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 4300 +;4299: +;4300: if ( trace.fraction < 1.0f ) +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1065353216 +GEF4 $2133 +line 4301 +;4301: { +line 4303 +;4302: vec3_t trDir; +;4303: VectorCopy(trace.plane.normal, trDir); +ADDRLP4 1640 +ADDRLP4 0+24 +INDIRB +ASGNB 12 +line 4304 +;4304: if (!trDir[0] && !trDir[1] && !trDir[2]) +ADDRLP4 1652 +CNSTF4 0 +ASGNF4 +ADDRLP4 1640 +INDIRF4 +ADDRLP4 1652 +INDIRF4 +NEF4 $2137 +ADDRLP4 1640+4 +INDIRF4 +ADDRLP4 1652 +INDIRF4 +NEF4 $2137 +ADDRLP4 1640+8 +INDIRF4 +ADDRLP4 1652 +INDIRF4 +NEF4 $2137 +line 4305 +;4305: { +line 4306 +;4306: trDir[1] = 1; +ADDRLP4 1640+4 +CNSTF4 1065353216 +ASGNF4 +line 4307 +;4307: } +LABELV $2137 +line 4309 +;4308: +;4309: trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), trace.endpos, trDir ); +ADDRGP4 $2094 +ARGP4 +ADDRLP4 1656 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 1656 +INDIRI4 +ARGI4 +ADDRLP4 0+12 +ARGP4 +ADDRLP4 1640 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 4312 +;4310: +;4311: //Stop saber? (it wouldn't look right if it was stuck through a thin wall and unable to hurt players on the other side) +;4312: VectorSubtract(otherPos, trace.endpos, v); +ADDRLP4 1100 +ADDRLP4 1124 +INDIRF4 +ADDRLP4 0+12 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1100+4 +ADDRLP4 1124+4 +INDIRF4 +ADDRLP4 0+12+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1100+8 +ADDRLP4 1124+8 +INDIRF4 +ADDRLP4 0+12+8 +INDIRF4 +SUBF4 +ASGNF4 +line 4313 +;4313: dualSaberLen = VectorLength(v); +ADDRLP4 1100 +ARGP4 +ADDRLP4 1660 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 1552 +ADDRLP4 1660 +INDIRF4 +ASGNF4 +line 4315 +;4314: +;4315: VectorCopy(trace.endpos, end); +ADDRLP4 1112 +ADDRLP4 0+12 +INDIRB +ASGNB 12 +line 4316 +;4316: } +LABELV $2133 +line 4317 +;4317: } +LABELV $2130 +line 4296 +ADDRLP4 1080 +ADDRLP4 1080 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 1080 +INDIRI4 +CNSTI4 1 +LTI4 $2129 +line 4318 +;4318: } +LABELV $2127 +LABELV $2075 +line 4321 +;4319:CheckTrail: +;4320: +;4321: if (!cg_saberTrail.integer) +ADDRGP4 cg_saberTrail+12 +INDIRI4 +CNSTI4 0 +NEI4 $2153 +line 4322 +;4322: { //don't do the trail in this case +line 4323 +;4323: goto JustDoIt; +ADDRGP4 $2156 +JUMPV +LABELV $2153 +line 4326 +;4324: } +;4325: +;4326: saberTrail = &client->saberTrail; +ADDRLP4 1536 +ADDRLP4 1084 +INDIRP4 +CNSTI4 532 +ADDP4 +ASGNP4 +line 4330 +;4327: +;4328: // if we happen to be timescaled or running in a high framerate situation, we don't want to flood +;4329: // the system with very small trail slices...but perhaps doing it by distance would yield better results? +;4330: if ( cg.time > saberTrail->lastTime + 2 ) // 2ms +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 1536 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 2 +ADDI4 +LEI4 $2157 +line 4331 +;4331: { +line 4332 +;4332: if ( (saberMoveData[cent->currentState.saberMove].trailLength > 0 || ((cent->currentState.powerups & (1 << PW_SPEED) && cg_speedTrail.integer)) || cent->currentState.saberInFlight) && cg.time < saberTrail->lastTime + 2000 ) // if we have a stale segment, don't draw until we have a fresh one +ADDRLP4 1636 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1640 +CNSTI4 0 +ASGNI4 +CNSTI4 40 +ADDRLP4 1636 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 saberMoveData+36 +ADDP4 +INDIRI4 +ADDRLP4 1640 +INDIRI4 +GTI4 $2166 +ADDRLP4 1636 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +ADDRLP4 1640 +INDIRI4 +EQI4 $2167 +ADDRGP4 cg_speedTrail+12 +INDIRI4 +ADDRLP4 1640 +INDIRI4 +NEI4 $2166 +LABELV $2167 +ADDRFP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2160 +LABELV $2166 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 1536 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 2000 +ADDI4 +GEI4 $2160 +line 4333 +;4333: { +line 4334 +;4334: vec3_t rgb1={255.0f,255.0f,255.0f}; +ADDRLP4 1644 +ADDRGP4 $2168 +INDIRB +ASGNB 12 +line 4336 +;4335: +;4336: switch( scolor ) +ADDRLP4 1560 +INDIRI4 +CNSTI4 0 +LTI4 $2169 +ADDRLP4 1560 +INDIRI4 +CNSTI4 5 +GTI4 $2169 +ADDRLP4 1560 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $2191 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $2191 +address $2171 +address $2174 +address $2177 +address $2180 +address $2183 +address $2186 +code +line 4337 +;4337: { +LABELV $2171 +line 4339 +;4338: case SABER_RED: +;4339: VectorSet( rgb1, 255.0f, 0.0f, 0.0f ); +ADDRLP4 1644 +CNSTF4 1132396544 +ASGNF4 +ADDRLP4 1644+4 +CNSTF4 0 +ASGNF4 +ADDRLP4 1644+8 +CNSTF4 0 +ASGNF4 +line 4340 +;4340: break; +ADDRGP4 $2170 +JUMPV +LABELV $2174 +line 4342 +;4341: case SABER_ORANGE: +;4342: VectorSet( rgb1, 255.0f, 64.0f, 0.0f ); +ADDRLP4 1644 +CNSTF4 1132396544 +ASGNF4 +ADDRLP4 1644+4 +CNSTF4 1115684864 +ASGNF4 +ADDRLP4 1644+8 +CNSTF4 0 +ASGNF4 +line 4343 +;4343: break; +ADDRGP4 $2170 +JUMPV +LABELV $2177 +line 4345 +;4344: case SABER_YELLOW: +;4345: VectorSet( rgb1, 255.0f, 255.0f, 0.0f ); +ADDRLP4 1660 +CNSTF4 1132396544 +ASGNF4 +ADDRLP4 1644 +ADDRLP4 1660 +INDIRF4 +ASGNF4 +ADDRLP4 1644+4 +ADDRLP4 1660 +INDIRF4 +ASGNF4 +ADDRLP4 1644+8 +CNSTF4 0 +ASGNF4 +line 4346 +;4346: break; +ADDRGP4 $2170 +JUMPV +LABELV $2180 +line 4348 +;4347: case SABER_GREEN: +;4348: VectorSet( rgb1, 0.0f, 255.0f, 0.0f ); +ADDRLP4 1644 +CNSTF4 0 +ASGNF4 +ADDRLP4 1644+4 +CNSTF4 1132396544 +ASGNF4 +ADDRLP4 1644+8 +CNSTF4 0 +ASGNF4 +line 4349 +;4349: break; +ADDRGP4 $2170 +JUMPV +LABELV $2183 +line 4351 +;4350: case SABER_BLUE: +;4351: VectorSet( rgb1, 0.0f, 64.0f, 255.0f ); +ADDRLP4 1644 +CNSTF4 0 +ASGNF4 +ADDRLP4 1644+4 +CNSTF4 1115684864 +ASGNF4 +ADDRLP4 1644+8 +CNSTF4 1132396544 +ASGNF4 +line 4352 +;4352: break; +ADDRGP4 $2170 +JUMPV +LABELV $2186 +line 4354 +;4353: case SABER_PURPLE: +;4354: VectorSet( rgb1, 220.0f, 0.0f, 255.0f ); +ADDRLP4 1644 +CNSTF4 1130102784 +ASGNF4 +ADDRLP4 1644+4 +CNSTF4 0 +ASGNF4 +ADDRLP4 1644+8 +CNSTF4 1132396544 +ASGNF4 +line 4355 +;4355: break; +ADDRGP4 $2170 +JUMPV +LABELV $2169 +line 4357 +;4356: default: +;4357: VectorSet( rgb1, 0.0f, 64.0f, 255.0f ); +ADDRLP4 1644 +CNSTF4 0 +ASGNF4 +ADDRLP4 1644+4 +CNSTF4 1115684864 +ASGNF4 +ADDRLP4 1644+8 +CNSTF4 1132396544 +ASGNF4 +line 4358 +;4358: break; +LABELV $2170 +line 4367 +;4359: } +;4360: +;4361: //Here we will use the happy process of filling a struct in with arguments and passing it to a trap function +;4362: //so that we can take the struct and fill in an actual CTrail type using the data within it once we get it +;4363: //into the effects area +;4364: +;4365: // Go from new muzzle to new end...then to old end...back down to old muzzle...finally +;4366: // connect back to the new muzzle...this is our trail quad +;4367: VectorCopy( org_, fx.mVerts[0].origin ); +ADDRLP4 1172 +ADDRLP4 1088 +INDIRB +ASGNB 12 +line 4368 +;4368: VectorMA( end, 3.0f, axis_[0], fx.mVerts[1].origin ); +ADDRLP4 1172+84 +ADDRLP4 1112 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1136 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1172+84+4 +ADDRLP4 1112+4 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1136+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1172+84+8 +ADDRLP4 1112+8 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1136+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 4370 +;4369: +;4370: VectorCopy( saberTrail->tip, fx.mVerts[2].origin ); +ADDRLP4 1172+168 +ADDRLP4 1536 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRB +ASGNB 12 +line 4371 +;4371: VectorCopy( saberTrail->base, fx.mVerts[3].origin ); +ADDRLP4 1172+252 +ADDRLP4 1536 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRB +ASGNB 12 +line 4373 +;4372: +;4373: diff = cg.time - saberTrail->lastTime; +ADDRLP4 1628 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 1536 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 4378 +;4374: +;4375: // I'm not sure that clipping this is really the best idea +;4376: //This prevents the trail from showing at all in low framerate situations. +;4377: //if ( diff <= SABER_TRAIL_TIME * 2 ) +;4378: { +line 4379 +;4379: float oldAlpha = 1.0f - ( diff / SABER_TRAIL_TIME ); +ADDRLP4 1660 +CNSTF4 1065353216 +ADDRLP4 1628 +INDIRF4 +CNSTF4 1109393408 +DIVF4 +SUBF4 +ASGNF4 +line 4382 +;4380: +;4381: // New muzzle +;4382: VectorCopy( rgb1, fx.mVerts[0].rgb ); +ADDRLP4 1172+12 +ADDRLP4 1644 +INDIRB +ASGNB 12 +line 4383 +;4383: fx.mVerts[0].alpha = 255.0f; +ADDRLP4 1172+48 +CNSTF4 1132396544 +ASGNF4 +line 4385 +;4384: +;4385: fx.mVerts[0].ST[0] = 0.0f; +ADDRLP4 1172+60 +CNSTF4 0 +ASGNF4 +line 4386 +;4386: fx.mVerts[0].ST[1] = 1.0f; +ADDRLP4 1172+60+4 +CNSTF4 1065353216 +ASGNF4 +line 4387 +;4387: fx.mVerts[0].destST[0] = 1.0f; +ADDRLP4 1172+68 +CNSTF4 1065353216 +ASGNF4 +line 4388 +;4388: fx.mVerts[0].destST[1] = 1.0f; +ADDRLP4 1172+68+4 +CNSTF4 1065353216 +ASGNF4 +line 4391 +;4389: +;4390: // new tip +;4391: VectorCopy( rgb1, fx.mVerts[1].rgb ); +ADDRLP4 1172+84+12 +ADDRLP4 1644 +INDIRB +ASGNB 12 +line 4392 +;4392: fx.mVerts[1].alpha = 255.0f; +ADDRLP4 1172+84+48 +CNSTF4 1132396544 +ASGNF4 +line 4394 +;4393: +;4394: fx.mVerts[1].ST[0] = 0.0f; +ADDRLP4 1172+84+60 +CNSTF4 0 +ASGNF4 +line 4395 +;4395: fx.mVerts[1].ST[1] = 0.0f; +ADDRLP4 1172+84+60+4 +CNSTF4 0 +ASGNF4 +line 4396 +;4396: fx.mVerts[1].destST[0] = 1.0f; +ADDRLP4 1172+84+68 +CNSTF4 1065353216 +ASGNF4 +line 4397 +;4397: fx.mVerts[1].destST[1] = 0.0f; +ADDRLP4 1172+84+68+4 +CNSTF4 0 +ASGNF4 +line 4400 +;4398: +;4399: // old tip +;4400: VectorCopy( rgb1, fx.mVerts[2].rgb ); +ADDRLP4 1172+168+12 +ADDRLP4 1644 +INDIRB +ASGNB 12 +line 4401 +;4401: fx.mVerts[2].alpha = 255.0f; +ADDRLP4 1172+168+48 +CNSTF4 1132396544 +ASGNF4 +line 4403 +;4402: +;4403: fx.mVerts[2].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want +ADDRLP4 1172+168+60 +CNSTF4 1065353216 +ADDRLP4 1660 +INDIRF4 +SUBF4 +ASGNF4 +line 4404 +;4404: fx.mVerts[2].ST[1] = 0.0f; +ADDRLP4 1172+168+60+4 +CNSTF4 0 +ASGNF4 +line 4405 +;4405: fx.mVerts[2].destST[0] = 1.0f + fx.mVerts[2].ST[0]; +ADDRLP4 1172+168+68 +ADDRLP4 1172+168+60 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4406 +;4406: fx.mVerts[2].destST[1] = 0.0f; +ADDRLP4 1172+168+68+4 +CNSTF4 0 +ASGNF4 +line 4409 +;4407: +;4408: // old muzzle +;4409: VectorCopy( rgb1, fx.mVerts[3].rgb ); +ADDRLP4 1172+252+12 +ADDRLP4 1644 +INDIRB +ASGNB 12 +line 4410 +;4410: fx.mVerts[3].alpha = 255.0f; +ADDRLP4 1172+252+48 +CNSTF4 1132396544 +ASGNF4 +line 4412 +;4411: +;4412: fx.mVerts[3].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want +ADDRLP4 1172+252+60 +CNSTF4 1065353216 +ADDRLP4 1660 +INDIRF4 +SUBF4 +ASGNF4 +line 4413 +;4413: fx.mVerts[3].ST[1] = 1.0f; +ADDRLP4 1172+252+60+4 +CNSTF4 1065353216 +ASGNF4 +line 4414 +;4414: fx.mVerts[3].destST[0] = 1.0f + fx.mVerts[2].ST[0]; +ADDRLP4 1172+252+68 +ADDRLP4 1172+168+60 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4415 +;4415: fx.mVerts[3].destST[1] = 1.0f; +ADDRLP4 1172+252+68+4 +CNSTF4 1065353216 +ASGNF4 +line 4417 +;4416: +;4417: fx.mShader = cgs.media.saberBlurShader; +ADDRLP4 1172+336 +ADDRGP4 cgs+70296+164 +INDIRI4 +ASGNI4 +line 4418 +;4418: fx.mSetFlags = FX_USE_ALPHA; +ADDRLP4 1172+340 +CNSTI4 134217728 +ASGNI4 +line 4419 +;4419: fx.mKillTime = SABER_TRAIL_TIME; +ADDRLP4 1172+344 +CNSTI4 40 +ASGNI4 +line 4421 +;4420: +;4421: trap_FX_AddPrimitive(&fx); +ADDRLP4 1172 +ARGP4 +ADDRGP4 trap_FX_AddPrimitive +CALLV +pop +line 4422 +;4422: } +line 4424 +;4423: +;4424: if (cent->currentState.bolt2) +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2263 +line 4425 +;4425: { +line 4426 +;4426: float oldAlpha = 1.0f - ( diff / SABER_TRAIL_TIME ); +ADDRLP4 1660 +CNSTF4 1065353216 +ADDRLP4 1628 +INDIRF4 +CNSTF4 1109393408 +DIVF4 +SUBF4 +ASGNF4 +line 4428 +;4427: +;4428: VectorCopy( otherPos, fx.mVerts[0].origin ); +ADDRLP4 1172 +ADDRLP4 1124 +INDIRB +ASGNB 12 +line 4429 +;4429: VectorMA( otherEnd, 3.0f, otherDir, fx.mVerts[1].origin ); +ADDRLP4 1172+84 +ADDRLP4 1524 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1540 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1172+84+4 +ADDRLP4 1524+4 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1540+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1172+84+8 +ADDRLP4 1524+8 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1540+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 4431 +;4430: +;4431: VectorCopy( saberTrail->dualtip, fx.mVerts[2].origin ); +ADDRLP4 1172+168 +ADDRLP4 1536 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRB +ASGNB 12 +line 4432 +;4432: VectorCopy( saberTrail->dualbase, fx.mVerts[3].origin ); +ADDRLP4 1172+252 +ADDRLP4 1536 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRB +ASGNB 12 +line 4435 +;4433: +;4434: // New muzzle +;4435: VectorCopy( rgb1, fx.mVerts[0].rgb ); +ADDRLP4 1172+12 +ADDRLP4 1644 +INDIRB +ASGNB 12 +line 4436 +;4436: fx.mVerts[0].alpha = 255.0f; +ADDRLP4 1172+48 +CNSTF4 1132396544 +ASGNF4 +line 4438 +;4437: +;4438: fx.mVerts[0].ST[0] = 0.0f; +ADDRLP4 1172+60 +CNSTF4 0 +ASGNF4 +line 4439 +;4439: fx.mVerts[0].ST[1] = 1.0f; +ADDRLP4 1172+60+4 +CNSTF4 1065353216 +ASGNF4 +line 4440 +;4440: fx.mVerts[0].destST[0] = 1.0f; +ADDRLP4 1172+68 +CNSTF4 1065353216 +ASGNF4 +line 4441 +;4441: fx.mVerts[0].destST[1] = 1.0f; +ADDRLP4 1172+68+4 +CNSTF4 1065353216 +ASGNF4 +line 4444 +;4442: +;4443: // new tip +;4444: VectorCopy( rgb1, fx.mVerts[1].rgb ); +ADDRLP4 1172+84+12 +ADDRLP4 1644 +INDIRB +ASGNB 12 +line 4445 +;4445: fx.mVerts[1].alpha = 255.0f; +ADDRLP4 1172+84+48 +CNSTF4 1132396544 +ASGNF4 +line 4447 +;4446: +;4447: fx.mVerts[1].ST[0] = 0.0f; +ADDRLP4 1172+84+60 +CNSTF4 0 +ASGNF4 +line 4448 +;4448: fx.mVerts[1].ST[1] = 0.0f; +ADDRLP4 1172+84+60+4 +CNSTF4 0 +ASGNF4 +line 4449 +;4449: fx.mVerts[1].destST[0] = 1.0f; +ADDRLP4 1172+84+68 +CNSTF4 1065353216 +ASGNF4 +line 4450 +;4450: fx.mVerts[1].destST[1] = 0.0f; +ADDRLP4 1172+84+68+4 +CNSTF4 0 +ASGNF4 +line 4453 +;4451: +;4452: // old tip +;4453: VectorCopy( rgb1, fx.mVerts[2].rgb ); +ADDRLP4 1172+168+12 +ADDRLP4 1644 +INDIRB +ASGNB 12 +line 4454 +;4454: fx.mVerts[2].alpha = 255.0f; +ADDRLP4 1172+168+48 +CNSTF4 1132396544 +ASGNF4 +line 4456 +;4455: +;4456: fx.mVerts[2].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want +ADDRLP4 1172+168+60 +CNSTF4 1065353216 +ADDRLP4 1660 +INDIRF4 +SUBF4 +ASGNF4 +line 4457 +;4457: fx.mVerts[2].ST[1] = 0.0f; +ADDRLP4 1172+168+60+4 +CNSTF4 0 +ASGNF4 +line 4458 +;4458: fx.mVerts[2].destST[0] = 1.0f + fx.mVerts[2].ST[0]; +ADDRLP4 1172+168+68 +ADDRLP4 1172+168+60 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4459 +;4459: fx.mVerts[2].destST[1] = 0.0f; +ADDRLP4 1172+168+68+4 +CNSTF4 0 +ASGNF4 +line 4462 +;4460: +;4461: // old muzzle +;4462: VectorCopy( rgb1, fx.mVerts[3].rgb ); +ADDRLP4 1172+252+12 +ADDRLP4 1644 +INDIRB +ASGNB 12 +line 4463 +;4463: fx.mVerts[3].alpha = 255.0f; +ADDRLP4 1172+252+48 +CNSTF4 1132396544 +ASGNF4 +line 4465 +;4464: +;4465: fx.mVerts[3].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want +ADDRLP4 1172+252+60 +CNSTF4 1065353216 +ADDRLP4 1660 +INDIRF4 +SUBF4 +ASGNF4 +line 4466 +;4466: fx.mVerts[3].ST[1] = 1.0f; +ADDRLP4 1172+252+60+4 +CNSTF4 1065353216 +ASGNF4 +line 4467 +;4467: fx.mVerts[3].destST[0] = 1.0f + fx.mVerts[2].ST[0]; +ADDRLP4 1172+252+68 +ADDRLP4 1172+168+60 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4468 +;4468: fx.mVerts[3].destST[1] = 1.0f; +ADDRLP4 1172+252+68+4 +CNSTF4 1065353216 +ASGNF4 +line 4470 +;4469: +;4470: fx.mShader = cgs.media.saberBlurShader; +ADDRLP4 1172+336 +ADDRGP4 cgs+70296+164 +INDIRI4 +ASGNI4 +line 4471 +;4471: fx.mSetFlags = FX_USE_ALPHA; +ADDRLP4 1172+340 +CNSTI4 134217728 +ASGNI4 +line 4472 +;4472: fx.mKillTime = SABER_TRAIL_TIME; +ADDRLP4 1172+344 +CNSTI4 40 +ASGNI4 +line 4474 +;4473: +;4474: trap_FX_AddPrimitive(&fx); +ADDRLP4 1172 +ARGP4 +ADDRGP4 trap_FX_AddPrimitive +CALLV +pop +line 4475 +;4475: } +LABELV $2263 +line 4476 +;4476: } +LABELV $2160 +line 4479 +;4477: +;4478: // we must always do this, even if we aren't active..otherwise we won't know where to pick up from +;4479: VectorCopy( org_, saberTrail->base ); +ADDRLP4 1536 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 1088 +INDIRB +ASGNB 12 +line 4480 +;4480: VectorMA( end, 3.0f, axis_[0], saberTrail->tip ); +ADDRLP4 1536 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 1112 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1136 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1536 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 1112+4 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1136+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1536 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 1112+8 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1136+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 4481 +;4481: saberTrail->lastTime = cg.time; +ADDRLP4 1536 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 4483 +;4482: +;4483: if (cent->currentState.bolt2) +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2340 +line 4484 +;4484: { +line 4485 +;4485: VectorCopy( otherPos, saberTrail->dualbase ); +ADDRLP4 1536 +INDIRP4 +CNSTI4 36 +ADDP4 +ADDRLP4 1124 +INDIRB +ASGNB 12 +line 4486 +;4486: VectorMA( otherEnd, 3.0f, otherDir, saberTrail->dualtip ); +ADDRLP4 1536 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDRLP4 1524 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1540 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1536 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRLP4 1524+4 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1540+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 1536 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDRLP4 1524+8 +INDIRF4 +CNSTF4 1077936128 +ADDRLP4 1540+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 4487 +;4487: } +LABELV $2340 +line 4488 +;4488: } +LABELV $2157 +LABELV $2156 +line 4492 +;4489: +;4490:JustDoIt: +;4491: +;4492: if (client && cent->currentState.bolt2) +ADDRLP4 1084 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2346 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2346 +line 4493 +;4493: { +line 4494 +;4494: float sideOneLen = saberLen*dualLen; +ADDRLP4 1636 +ADDRLP4 1520 +INDIRF4 +ADDRLP4 1556 +INDIRF4 +MULF4 +ASGNF4 +line 4495 +;4495: float sideTwoLen = dualSaberLen*dualLen; +ADDRLP4 1640 +ADDRLP4 1552 +INDIRF4 +ADDRLP4 1556 +INDIRF4 +MULF4 +ASGNF4 +line 4497 +;4496: +;4497: if (sideOneLen < 1) +ADDRLP4 1636 +INDIRF4 +CNSTF4 1065353216 +GEF4 $2348 +line 4498 +;4498: { +line 4499 +;4499: sideOneLen = 1; +ADDRLP4 1636 +CNSTF4 1065353216 +ASGNF4 +line 4500 +;4500: } +LABELV $2348 +line 4502 +;4501: +;4502: CG_DoSaber( org_, axis_[0], sideOneLen, scolor, renderfx ); +ADDRLP4 1088 +ARGP4 +ADDRLP4 1136 +ARGP4 +ADDRLP4 1636 +INDIRF4 +ARGF4 +ADDRLP4 1560 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRGP4 CG_DoSaber +CALLV +pop +line 4504 +;4503: +;4504: CG_DoSaber( otherPos, otherDir, sideTwoLen, scolor, renderfx ); +ADDRLP4 1124 +ARGP4 +ADDRLP4 1540 +ARGP4 +ADDRLP4 1640 +INDIRF4 +ARGF4 +ADDRLP4 1560 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRGP4 CG_DoSaber +CALLV +pop +line 4505 +;4505: } +ADDRGP4 $2347 +JUMPV +LABELV $2346 +line 4507 +;4506: else +;4507: { +line 4510 +;4508: // Pass in the renderfx flags attached to the saber weapon model...this is done so that saber glows +;4509: // will get rendered properly in a mirror...not sure if this is necessary?? +;4510: CG_DoSaber( org_, axis_[0], saberLen, scolor, renderfx ); +ADDRLP4 1088 +ARGP4 +ADDRLP4 1136 +ARGP4 +ADDRLP4 1520 +INDIRF4 +ARGF4 +ADDRLP4 1560 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRGP4 CG_DoSaber +CALLV +pop +line 4511 +;4511: } +LABELV $2347 +line 4512 +;4512:} +LABELV $1983 +endproc CG_AddSaberBlade 1672 36 +export CG_IsMindTricked +proc CG_IsMindTricked 8 0 +line 4515 +;4513: +;4514:int CG_IsMindTricked(int trickIndex1, int trickIndex2, int trickIndex3, int trickIndex4, int client) +;4515:{ +line 4517 +;4516: int checkIn; +;4517: int sub = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 4519 +;4518: +;4519: if (cg_entities[client].currentState.forcePowersActive & (1 << FP_SEE)) +CNSTI4 1920 +ADDRFP4 16 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+240 +ADDP4 +INDIRI4 +CNSTI4 16384 +BANDI4 +CNSTI4 0 +EQI4 $2351 +line 4520 +;4520: { +line 4521 +;4521: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $2350 +JUMPV +LABELV $2351 +line 4524 +;4522: } +;4523: +;4524: if (client > 47) +ADDRFP4 16 +INDIRI4 +CNSTI4 47 +LEI4 $2354 +line 4525 +;4525: { +line 4526 +;4526: checkIn = trickIndex4; +ADDRLP4 4 +ADDRFP4 12 +INDIRI4 +ASGNI4 +line 4527 +;4527: sub = 48; +ADDRLP4 0 +CNSTI4 48 +ASGNI4 +line 4528 +;4528: } +ADDRGP4 $2355 +JUMPV +LABELV $2354 +line 4529 +;4529: else if (client > 31) +ADDRFP4 16 +INDIRI4 +CNSTI4 31 +LEI4 $2356 +line 4530 +;4530: { +line 4531 +;4531: checkIn = trickIndex3; +ADDRLP4 4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 4532 +;4532: sub = 32; +ADDRLP4 0 +CNSTI4 32 +ASGNI4 +line 4533 +;4533: } +ADDRGP4 $2357 +JUMPV +LABELV $2356 +line 4534 +;4534: else if (client > 15) +ADDRFP4 16 +INDIRI4 +CNSTI4 15 +LEI4 $2358 +line 4535 +;4535: { +line 4536 +;4536: checkIn = trickIndex2; +ADDRLP4 4 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 4537 +;4537: sub = 16; +ADDRLP4 0 +CNSTI4 16 +ASGNI4 +line 4538 +;4538: } +ADDRGP4 $2359 +JUMPV +LABELV $2358 +line 4540 +;4539: else +;4540: { +line 4541 +;4541: checkIn = trickIndex1; +ADDRLP4 4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 4542 +;4542: } +LABELV $2359 +LABELV $2357 +LABELV $2355 +line 4544 +;4543: +;4544: if (checkIn & (1 << (client-sub))) +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDRFP4 16 +INDIRI4 +ADDRLP4 0 +INDIRI4 +SUBI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $2360 +line 4545 +;4545: { +line 4546 +;4546: return 1; +CNSTI4 1 +RETI4 +ADDRGP4 $2350 +JUMPV +LABELV $2360 +line 4549 +;4547: } +;4548: +;4549: return 0; +CNSTI4 0 +RETI4 +LABELV $2350 +endproc CG_IsMindTricked 8 0 +export CG_DrawPlayerSphere +proc CG_DrawPlayerSphere 216 12 +line 4555 +;4550:} +;4551: +;4552:#define SPEED_TRAIL_DISTANCE 6 +;4553: +;4554:void CG_DrawPlayerSphere(centity_t *cent, vec3_t origin, float scale, int shader) +;4555:{ +line 4559 +;4556: refEntity_t ent; +;4557: +;4558: // Don't draw the shield when the player is dead. +;4559: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $2363 +line 4560 +;4560: { +line 4561 +;4561: return; +ADDRGP4 $2362 +JUMPV +LABELV $2363 +line 4564 +;4562: } +;4563: +;4564: memset( &ent, 0, sizeof( ent ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 4566 +;4565: +;4566: VectorCopy( origin, ent.origin ); +ADDRLP4 0+52 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 4567 +;4567: ent.origin[2] += 9.0; +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +CNSTF4 1091567616 +ADDF4 +ASGNF4 +line 4569 +;4568: +;4569: VectorSubtract(cg.refdef.vieworg, ent.origin, ent.axis[0]); +ADDRLP4 0+12 +ADDRGP4 cg+3616+24 +INDIRF4 +ADDRLP4 0+52 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+12+4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +ADDRLP4 0+52+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+12+8 +ADDRGP4 cg+3616+24+8 +INDIRF4 +ADDRLP4 0+52+8 +INDIRF4 +SUBF4 +ASGNF4 +line 4570 +;4570: if (VectorNormalize(ent.axis[0]) <= 0.1f) +ADDRLP4 0+12 +ARGP4 +ADDRLP4 212 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 212 +INDIRF4 +CNSTF4 1036831949 +GTF4 $2386 +line 4571 +;4571: { // Entity is right on vieworg. quit. +line 4572 +;4572: return; +ADDRGP4 $2362 +JUMPV +LABELV $2386 +line 4575 +;4573: } +;4574: +;4575: VectorCopy(cg.refdef.viewaxis[2], ent.axis[2]); +ADDRLP4 0+12+24 +ADDRGP4 cg+3616+36+24 +INDIRB +ASGNB 12 +line 4576 +;4576: CrossProduct(ent.axis[0], ent.axis[2], ent.axis[1]); +ADDRLP4 0+12 +ARGP4 +ADDRLP4 0+12+24 +ARGP4 +ADDRLP4 0+12+12 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 4578 +;4577: +;4578: VectorScale(ent.axis[0], scale, ent.axis[0]); +ADDRLP4 0+12 +ADDRLP4 0+12 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+4 +ADDRLP4 0+12+4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+8 +ADDRLP4 0+12+8 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +line 4579 +;4579: VectorScale(ent.axis[1], scale, ent.axis[1]); +ADDRLP4 0+12+12 +ADDRLP4 0+12+12 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+12+4 +ADDRLP4 0+12+12+4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+12+8 +ADDRLP4 0+12+12+8 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +line 4580 +;4580: VectorScale(ent.axis[2], -scale, ent.axis[2]); +ADDRLP4 0+12+24 +ADDRLP4 0+12+24 +INDIRF4 +ADDRFP4 8 +INDIRF4 +NEGF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+24+4 +ADDRLP4 0+12+24+4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +NEGF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+24+8 +ADDRLP4 0+12+24+8 +INDIRF4 +ADDRFP4 8 +INDIRF4 +NEGF4 +MULF4 +ASGNF4 +line 4582 +;4581: +;4582: ent.hModel = cgs.media.halfShieldModel; +ADDRLP4 0+8 +ADDRGP4 cgs+70296+900 +INDIRI4 +ASGNI4 +line 4583 +;4583: ent.customShader = shader; +ADDRLP4 0+76 +ADDRFP4 12 +INDIRI4 +ASGNI4 +line 4585 +;4584: +;4585: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 4586 +;4586:} +LABELV $2362 +endproc CG_DrawPlayerSphere 216 12 +export CG_AddLightningBeam +proc CG_AddLightningBeam 276 4 +line 4589 +;4587: +;4588:void CG_AddLightningBeam(vec3_t start, vec3_t end) +;4589:{ +line 4598 +;4590: vec3_t dir, chaos, +;4591: c1, c2, +;4592: v1, v2; +;4593: float len, +;4594: s1, s2, s3; +;4595: +;4596: addbezierArgStruct_t b; +;4597: +;4598: VectorCopy(start, b.start); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 4599 +;4599: VectorCopy(end, b.end); +ADDRLP4 0+12 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 4601 +;4600: +;4601: VectorSubtract( b.end, b.start, dir ); +ADDRLP4 152 +ADDRLP4 0+12 +INDIRF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 152+4 +ADDRLP4 0+12+4 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 152+8 +ADDRLP4 0+12+8 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +SUBF4 +ASGNF4 +line 4602 +;4602: len = VectorNormalize( dir ); +ADDRLP4 152 +ARGP4 +ADDRLP4 224 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 148 +ADDRLP4 224 +INDIRF4 +ASGNF4 +line 4605 +;4603: +;4604: // Get the base control points, we'll work from there +;4605: VectorMA( b.start, 0.3333f * len, dir, c1 ); +ADDRLP4 228 +CNSTF4 1051371084 +ADDRLP4 148 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 164 +ADDRLP4 0 +INDIRF4 +ADDRLP4 152 +INDIRF4 +ADDRLP4 228 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 164+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 152+4 +INDIRF4 +ADDRLP4 228 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 164+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 152+8 +INDIRF4 +CNSTF4 1051371084 +ADDRLP4 148 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 4606 +;4606: VectorMA( b.start, 0.6666f * len, dir, c2 ); +ADDRLP4 232 +CNSTF4 1059759692 +ADDRLP4 148 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 176 +ADDRLP4 0 +INDIRF4 +ADDRLP4 152 +INDIRF4 +ADDRLP4 232 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 176+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 152+4 +INDIRF4 +ADDRLP4 232 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 176+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 152+8 +INDIRF4 +CNSTF4 1059759692 +ADDRLP4 148 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 4609 +;4607: +;4608: // get some chaos values that really aren't very chaotic :) +;4609: s1 = sin( cg.time * 0.005f ) * 2 + crandom() * 0.2f; +CNSTF4 1000593162 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 236 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 240 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 188 +CNSTF4 1073741824 +ADDRLP4 236 +INDIRF4 +MULF4 +CNSTF4 1045220557 +CNSTF4 1073741824 +ADDRLP4 240 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 4610 +;4610: s2 = sin( cg.time * 0.001f ); +CNSTF4 981668463 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 244 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 192 +ADDRLP4 244 +INDIRF4 +ASGNF4 +line 4611 +;4611: s3 = sin( cg.time * 0.011f ); +CNSTF4 1010055512 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 248 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 196 +ADDRLP4 248 +INDIRF4 +ASGNF4 +line 4613 +;4612: +;4613: VectorSet( chaos, len * 0.01f * s1, +ADDRLP4 136 +CNSTF4 1008981770 +ADDRLP4 148 +INDIRF4 +MULF4 +ADDRLP4 188 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 136+4 +CNSTF4 1017370378 +ADDRLP4 148 +INDIRF4 +MULF4 +ADDRLP4 192 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 136+8 +CNSTF4 1025758986 +ADDRLP4 148 +INDIRF4 +MULF4 +ADDRLP4 188 +INDIRF4 +ADDRLP4 192 +INDIRF4 +ADDF4 +ADDRLP4 196 +INDIRF4 +ADDF4 +MULF4 +ASGNF4 +line 4617 +;4614: len * 0.02f * s2, +;4615: len * 0.04f * (s1 + s2 + s3)); +;4616: +;4617: VectorAdd( c1, chaos, c1 ); +ADDRLP4 164 +ADDRLP4 164 +INDIRF4 +ADDRLP4 136 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 164+4 +ADDRLP4 164+4 +INDIRF4 +ADDRLP4 136+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 164+8 +ADDRLP4 164+8 +INDIRF4 +ADDRLP4 136+8 +INDIRF4 +ADDF4 +ASGNF4 +line 4618 +;4618: VectorScale( chaos, 4.0f, v1 ); +ADDRLP4 256 +CNSTF4 1082130432 +ASGNF4 +ADDRLP4 200 +ADDRLP4 256 +INDIRF4 +ADDRLP4 136 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 200+4 +ADDRLP4 256 +INDIRF4 +ADDRLP4 136+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 200+8 +CNSTF4 1082130432 +ADDRLP4 136+8 +INDIRF4 +MULF4 +ASGNF4 +line 4620 +;4619: +;4620: VectorSet( chaos, -len * 0.02f * s3, +ADDRLP4 136 +CNSTF4 1017370378 +ADDRLP4 148 +INDIRF4 +NEGF4 +MULF4 +ADDRLP4 196 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 136+4 +CNSTF4 1008981770 +ADDRLP4 148 +INDIRF4 +MULF4 +ADDRLP4 188 +INDIRF4 +ADDRLP4 192 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +ADDRLP4 136+8 +CNSTF4 1017370378 +ADDRLP4 148 +INDIRF4 +NEGF4 +MULF4 +ADDRLP4 188 +INDIRF4 +ADDRLP4 192 +INDIRF4 +ADDRLP4 196 +INDIRF4 +MULF4 +ADDF4 +MULF4 +ASGNF4 +line 4624 +;4621: len * 0.01f * (s1 * s2), +;4622: -len * 0.02f * (s1 + s2 * s3)); +;4623: +;4624: VectorAdd( c2, chaos, c2 ); +ADDRLP4 176 +ADDRLP4 176 +INDIRF4 +ADDRLP4 136 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 176+4 +ADDRLP4 176+4 +INDIRF4 +ADDRLP4 136+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 176+8 +ADDRLP4 176+8 +INDIRF4 +ADDRLP4 136+8 +INDIRF4 +ADDF4 +ASGNF4 +line 4625 +;4625: VectorScale( chaos, 2.0f, v2 ); +ADDRLP4 264 +CNSTF4 1073741824 +ASGNF4 +ADDRLP4 212 +ADDRLP4 264 +INDIRF4 +ADDRLP4 136 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 212+4 +ADDRLP4 264 +INDIRF4 +ADDRLP4 136+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1073741824 +ADDRLP4 136+8 +INDIRF4 +MULF4 +ASGNF4 +line 4627 +;4626: +;4627: VectorSet( chaos, 1.0f, 1.0f, 1.0f ); +ADDRLP4 268 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 136 +ADDRLP4 268 +INDIRF4 +ASGNF4 +ADDRLP4 136+4 +ADDRLP4 268 +INDIRF4 +ASGNF4 +ADDRLP4 136+8 +CNSTF4 1065353216 +ASGNF4 +line 4629 +;4628: +;4629: VectorCopy(c1, b.control1); +ADDRLP4 0+24 +ADDRLP4 164 +INDIRB +ASGNB 12 +line 4630 +;4630: VectorCopy(vec3_origin, b.control1Vel); +ADDRLP4 0+36 +ADDRGP4 vec3_origin +INDIRB +ASGNB 12 +line 4631 +;4631: VectorCopy(c2, b.control2); +ADDRLP4 0+48 +ADDRLP4 176 +INDIRB +ASGNB 12 +line 4632 +;4632: VectorCopy(vec3_origin, b.control2Vel); +ADDRLP4 0+60 +ADDRGP4 vec3_origin +INDIRB +ASGNB 12 +line 4634 +;4633: +;4634: b.size1 = 6.0f; +ADDRLP4 0+72 +CNSTF4 1086324736 +ASGNF4 +line 4635 +;4635: b.size2 = 6.0f; +ADDRLP4 0+76 +CNSTF4 1086324736 +ASGNF4 +line 4636 +;4636: b.sizeParm = 0.0f; +ADDRLP4 0+80 +CNSTF4 0 +ASGNF4 +line 4637 +;4637: b.alpha1 = 0.0f; +ADDRLP4 0+84 +CNSTF4 0 +ASGNF4 +line 4638 +;4638: b.alpha2 = 0.2f; +ADDRLP4 0+88 +CNSTF4 1045220557 +ASGNF4 +line 4639 +;4639: b.alphaParm = 0.5f; +ADDRLP4 0+92 +CNSTF4 1056964608 +ASGNF4 +line 4646 +;4640: +;4641: /* +;4642: VectorCopy(WHITE, b.sRGB); +;4643: VectorCopy(WHITE, b.eRGB); +;4644: */ +;4645: +;4646: b.sRGB[0] = 255; +ADDRLP4 0+96 +CNSTF4 1132396544 +ASGNF4 +line 4647 +;4647: b.sRGB[1] = 255; +ADDRLP4 0+96+4 +CNSTF4 1132396544 +ASGNF4 +line 4648 +;4648: b.sRGB[2] = 255; +ADDRLP4 0+96+8 +CNSTF4 1132396544 +ASGNF4 +line 4649 +;4649: VectorCopy(b.sRGB, b.eRGB); +ADDRLP4 0+108 +ADDRLP4 0+96 +INDIRB +ASGNB 12 +line 4651 +;4650: +;4651: b.rgbParm = 0.0f; +ADDRLP4 0+120 +CNSTF4 0 +ASGNF4 +line 4652 +;4652: b.killTime = 50; +ADDRLP4 0+124 +CNSTI4 50 +ASGNI4 +line 4653 +;4653: b.shader = trap_R_RegisterShader( "gfx/misc/electric2" ); +ADDRGP4 $2517 +ARGP4 +ADDRLP4 272 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0+128 +ADDRLP4 272 +INDIRI4 +ASGNI4 +line 4654 +;4654: b.flags = 0x00000001; //FX_ALPHA_LINEAR +ADDRLP4 0+132 +CNSTI4 1 +ASGNI4 +line 4656 +;4655: +;4656: trap_FX_AddBezier(&b); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_AddBezier +CALLV +pop +line 4657 +;4657:} +LABELV $2445 +endproc CG_AddLightningBeam 276 4 +export CG_AddRandomLightning +proc CG_AddRandomLightning 44 8 +line 4660 +;4658: +;4659:void CG_AddRandomLightning(vec3_t start, vec3_t end) +;4660:{ +line 4663 +;4661: vec3_t inOrg, outOrg; +;4662: +;4663: VectorCopy(start, inOrg); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 4664 +;4664: VectorCopy(end, outOrg); +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 4666 +;4665: +;4666: if ( rand() & 1 ) +ADDRLP4 24 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $2520 +line 4667 +;4667: { +line 4668 +;4668: outOrg[0] += Q_irand(0, 24); +CNSTI4 0 +ARGI4 +CNSTI4 24 +ARGI4 +ADDRLP4 28 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 4669 +;4669: inOrg[0] += Q_irand(0, 8); +CNSTI4 0 +ARGI4 +CNSTI4 8 +ARGI4 +ADDRLP4 32 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 32 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 4670 +;4670: } +ADDRGP4 $2521 +JUMPV +LABELV $2520 +line 4672 +;4671: else +;4672: { +line 4673 +;4673: outOrg[0] -= Q_irand(0, 24); +CNSTI4 0 +ARGI4 +CNSTI4 24 +ARGI4 +ADDRLP4 28 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 4674 +;4674: inOrg[0] -= Q_irand(0, 8); +CNSTI4 0 +ARGI4 +CNSTI4 8 +ARGI4 +ADDRLP4 32 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 32 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 4675 +;4675: } +LABELV $2521 +line 4677 +;4676: +;4677: if ( rand() & 1 ) +ADDRLP4 28 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $2522 +line 4678 +;4678: { +line 4679 +;4679: outOrg[1] += Q_irand(0, 24); +CNSTI4 0 +ARGI4 +CNSTI4 24 +ARGI4 +ADDRLP4 32 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12+4 +ADDRLP4 12+4 +INDIRF4 +ADDRLP4 32 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 4680 +;4680: inOrg[1] += Q_irand(0, 8); +CNSTI4 0 +ARGI4 +CNSTI4 8 +ARGI4 +ADDRLP4 36 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 4681 +;4681: } +ADDRGP4 $2523 +JUMPV +LABELV $2522 +line 4683 +;4682: else +;4683: { +line 4684 +;4684: outOrg[1] -= Q_irand(0, 24); +CNSTI4 0 +ARGI4 +CNSTI4 24 +ARGI4 +ADDRLP4 32 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12+4 +ADDRLP4 12+4 +INDIRF4 +ADDRLP4 32 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 4685 +;4685: inOrg[1] -= Q_irand(0, 8); +CNSTI4 0 +ARGI4 +CNSTI4 8 +ARGI4 +ADDRLP4 36 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 4686 +;4686: } +LABELV $2523 +line 4688 +;4687: +;4688: if ( rand() & 1 ) +ADDRLP4 32 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $2528 +line 4689 +;4689: { +line 4690 +;4690: outOrg[2] += Q_irand(0, 50); +CNSTI4 0 +ARGI4 +CNSTI4 50 +ARGI4 +ADDRLP4 36 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12+8 +ADDRLP4 12+8 +INDIRF4 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 4691 +;4691: inOrg[2] += Q_irand(0, 40); +CNSTI4 0 +ARGI4 +CNSTI4 40 +ARGI4 +ADDRLP4 40 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 40 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 4692 +;4692: } +ADDRGP4 $2529 +JUMPV +LABELV $2528 +line 4694 +;4693: else +;4694: { +line 4695 +;4695: outOrg[2] -= Q_irand(0, 64); +CNSTI4 0 +ARGI4 +CNSTI4 64 +ARGI4 +ADDRLP4 36 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 12+8 +ADDRLP4 12+8 +INDIRF4 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 4696 +;4696: inOrg[2] -= Q_irand(0, 40); +CNSTI4 0 +ARGI4 +CNSTI4 40 +ARGI4 +ADDRLP4 40 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 40 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 4697 +;4697: } +LABELV $2529 +line 4699 +;4698: +;4699: CG_AddLightningBeam(inOrg, outOrg); +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRGP4 CG_AddLightningBeam +CALLV +pop +line 4700 +;4700:} +LABELV $2519 +endproc CG_AddRandomLightning 44 8 +export CG_ThereIsAMaster +proc CG_ThereIsAMaster 12 0 +line 4705 +;4701: +;4702:extern char *forceHolocronModels[]; +;4703: +;4704:qboolean CG_ThereIsAMaster(void) +;4705:{ +line 4706 +;4706: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2536 +JUMPV +LABELV $2535 +line 4710 +;4707: centity_t *cent; +;4708: +;4709: while (i < MAX_CLIENTS) +;4710: { +line 4711 +;4711: cent = &cg_entities[i]; +ADDRLP4 4 +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 4713 +;4712: +;4713: if (cent && cent->currentState.isJediMaster) +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2538 +ADDRLP4 4 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2538 +line 4714 +;4714: { +line 4715 +;4715: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2534 +JUMPV +LABELV $2538 +line 4718 +;4716: } +;4717: +;4718: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4719 +;4719: } +LABELV $2536 +line 4709 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +LTI4 $2535 +line 4721 +;4720: +;4721: return qfalse; +CNSTI4 0 +RETI4 +LABELV $2534 +endproc CG_ThereIsAMaster 12 0 +export CG_FootStepGeneric +proc CG_FootStepGeneric 20 16 +line 4726 +;4722:} +;4723: +;4724://rww - here begins the majority of my g2animent stuff. +;4725:void CG_FootStepGeneric(centity_t *cent, int anim) +;4726:{ +line 4729 +;4727: int groundType; +;4728: +;4729: if ((anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || +ADDRLP4 4 +ADDRFP4 4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 915 +EQI4 $2543 +ADDRLP4 4 +INDIRI4 +CNSTI4 918 +NEI4 $2541 +LABELV $2543 +line 4731 +;4730: (anim & ~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) +;4731: { +line 4732 +;4732: groundType = FOOTSTEP_GENERIC; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 4733 +;4733: goto skipCheck; +ADDRGP4 $2544 +JUMPV +LABELV $2541 +line 4736 +;4734: } +;4735: +;4736: if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) +ADDRFP4 0 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +CNSTI4 1023 +NEI4 $2545 +line 4737 +;4737: { +line 4738 +;4738: return; +ADDRGP4 $2540 +JUMPV +LABELV $2545 +LABELV $2544 +line 4742 +;4739: } +;4740: +;4741:skipCheck: +;4742: groundType = FOOTSTEP_GENERIC;//CG_FootstepForSurface(cent, cent->currentState.number); +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 4746 +;4743: +;4744://skipCheck: +;4745: +;4746: if (!groundType) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2547 +line 4747 +;4747: { +line 4748 +;4748: return; +ADDRGP4 $2540 +JUMPV +LABELV $2547 +line 4751 +;4749: } +;4750: +;4751: switch (groundType) +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +EQI4 $2551 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +EQI4 $2554 +ADDRGP4 $2550 +JUMPV +line 4752 +;4752: { +LABELV $2551 +line 4754 +;4753: case FOOTSTEP_GENERIC: +;4754: trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+604 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 4756 +;4755: cgs.media.footsteps[ FOOTSTEP_NORMAL ][rand()&3] ); +;4756: break; +ADDRGP4 $2550 +JUMPV +LABELV $2554 +line 4758 +;4757: case FOOTSTEP_METAL: +;4758: trap_S_StartSound (NULL, cent->currentState.number, CHAN_BODY, +ADDRLP4 16 +ADDRGP4 rand +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+604+32 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 4760 +;4759: cgs.media.footsteps[ FOOTSTEP_METAL ][rand()&3] ); +;4760: break; +line 4762 +;4761: default: +;4762: break; +LABELV $2550 +line 4764 +;4763: } +;4764:} +LABELV $2540 +endproc CG_FootStepGeneric 20 16 +proc CG_G2EntSetLerpFrameAnimation 64 40 +line 4766 +;4765: +;4766:static void CG_G2EntSetLerpFrameAnimation( centity_t *cent, lerpFrame_t *lf, int newAnimation, float animSpeedMult, qboolean torsoOnly) { +line 4769 +;4767: animation_t *anim; +;4768: float animSpeed; +;4769: int flags=BONE_ANIM_OVERRIDE_FREEZE; +ADDRLP4 4 +CNSTI4 72 +ASGNI4 +line 4770 +;4770: int oldAnim = -1; +ADDRLP4 8 +CNSTI4 -1 +ASGNI4 +line 4771 +;4771: int blendTime = 150; +ADDRLP4 16 +CNSTI4 150 +ASGNI4 +line 4773 +;4772: +;4773: if (cent->currentState.number < MAX_CLIENTS && +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 32 +GEI4 $2559 +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +EQI4 $2559 +ADDRLP4 20 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $2559 +line 4776 +;4774: cent->currentState.teamowner && +;4775: !cent->isATST) +;4776: { +line 4777 +;4777: return; +ADDRGP4 $2558 +JUMPV +LABELV $2559 +line 4780 +;4778: } +;4779: +;4780: oldAnim = lf->animationNumber; +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +line 4782 +;4781: +;4782: lf->animationNumber = newAnimation; +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 4783 +;4783: newAnimation &= ~ANIM_TOGGLEBIT; +ADDRFP4 8 +ADDRFP4 8 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 4785 +;4784: +;4785: if ( newAnimation < 0 || newAnimation >= MAX_TOTALANIMATIONS ) { +ADDRLP4 28 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +LTI4 $2563 +ADDRLP4 28 +INDIRI4 +CNSTI4 1211 +LTI4 $2561 +LABELV $2563 +line 4787 +;4786:// CG_Error( "Bad animation number: %i", newAnimation ); +;4787: return; +ADDRGP4 $2558 +JUMPV +LABELV $2561 +line 4790 +;4788: } +;4789: +;4790: anim = &bgGlobalAnimations[ newAnimation ]; +ADDRLP4 0 +CNSTI4 28 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ASGNP4 +line 4792 +;4791: +;4792: lf->animation = anim; +ADDRFP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 4793 +;4793: lf->animationTime = lf->frameTime + anim->initialLerp; +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 48 +ADDP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 4795 +;4794: +;4795: if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRLP4 36 +INDIRI4 +EQI4 $2564 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRLP4 36 +INDIRI4 +LTI4 $2569 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +NEI4 $2564 +LABELV $2569 +line 4796 +;4796: CG_Printf( "%d: %d Anim: %i, '%s'\n", cg.time, cent->currentState.clientNum, newAnimation, GetStringForID(animTable, newAnimation)); +ADDRGP4 animTable +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 40 +ADDRGP4 GetStringForID +CALLP4 +ASGNP4 +ADDRGP4 $745 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 4797 +;4797: } +LABELV $2564 +line 4799 +;4798: +;4799: if (cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2571 +line 4800 +;4800: { +line 4801 +;4801: animSpeed = 50.0f / anim->frameLerp; +ADDRLP4 12 +CNSTF4 1112014848 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 4802 +;4802: if (lf->animation->loopFrames != -1) +ADDRFP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $2573 +line 4803 +;4803: { +line 4804 +;4804: flags = BONE_ANIM_OVERRIDE_LOOP; +ADDRLP4 4 +CNSTI4 16 +ASGNI4 +line 4805 +;4805: } +LABELV $2573 +line 4807 +;4806: +;4807: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2575 +line 4808 +;4808: { +line 4809 +;4809: if (animSpeed < 0.3) +ADDRLP4 12 +INDIRF4 +CNSTF4 1050253722 +GEF4 $2577 +line 4810 +;4810: { +line 4811 +;4811: animSpeed = 0.3; +ADDRLP4 12 +CNSTF4 1050253722 +ASGNF4 +line 4812 +;4812: } +LABELV $2577 +line 4814 +;4813: +;4814: if (newAnimation == BOTH_WALKBACK1) +ADDRFP4 8 +INDIRI4 +CNSTI4 852 +NEI4 $2579 +line 4815 +;4815: { +line 4816 +;4816: animSpeed = 0.8; +ADDRLP4 12 +CNSTF4 1061997773 +ASGNF4 +line 4817 +;4817: } +LABELV $2579 +line 4819 +;4818: +;4819: if (newAnimation != BOTH_DEATH1) +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +EQI4 $2581 +line 4820 +;4820: { +line 4821 +;4821: flags = BONE_ANIM_OVERRIDE_LOOP; +ADDRLP4 4 +CNSTI4 16 +ASGNI4 +line 4822 +;4822: } +LABELV $2581 +line 4823 +;4823: } +LABELV $2575 +line 4825 +;4824: +;4825: if (cg_animBlend.integer) +ADDRGP4 cg_animBlend+12 +INDIRI4 +CNSTI4 0 +EQI4 $2583 +line 4826 +;4826: { +line 4827 +;4827: flags |= BONE_ANIM_BLEND; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 128 +BORI4 +ASGNI4 +line 4828 +;4828: } +LABELV $2583 +line 4830 +;4829: +;4830: if (!cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $2586 +line 4831 +;4831: { +line 4832 +;4832: if (/*BG_FlippingAnim(newAnimation) ||*/ BG_InDeathAnim(newAnimation)) +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 40 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $2588 +line 4833 +;4833: { +line 4834 +;4834: flags &= ~BONE_ANIM_BLEND; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 -129 +BANDI4 +ASGNI4 +line 4835 +;4835: } +ADDRGP4 $2589 +JUMPV +LABELV $2588 +line 4836 +;4836: else if ( oldAnim != -1 && +ADDRLP4 44 +ADDRLP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 -1 +EQI4 $2590 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 48 +ADDRGP4 BG_InDeathAnim +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +EQI4 $2590 +line 4838 +;4837: (/*BG_FlippingAnim(oldAnim) ||*/ BG_InDeathAnim(oldAnim)) ) +;4838: { +line 4839 +;4839: flags &= ~BONE_ANIM_BLEND; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 -129 +BANDI4 +ASGNI4 +line 4840 +;4840: } +LABELV $2590 +LABELV $2589 +line 4842 +;4841: +;4842: if (flags & BONE_ANIM_BLEND) +ADDRLP4 4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $2592 +line 4843 +;4843: { +line 4844 +;4844: if (BG_FlippingAnim(newAnimation)) +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 52 +ADDRGP4 BG_FlippingAnim +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +EQI4 $2594 +line 4845 +;4845: { +line 4846 +;4846: blendTime = 200; +ADDRLP4 16 +CNSTI4 200 +ASGNI4 +line 4847 +;4847: } +ADDRGP4 $2595 +JUMPV +LABELV $2594 +line 4848 +;4848: else if ( oldAnim != -1 && +ADDRLP4 56 +ADDRLP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 -1 +EQI4 $2596 +ADDRLP4 56 +INDIRI4 +ARGI4 +ADDRLP4 60 +ADDRGP4 BG_FlippingAnim +CALLI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 0 +EQI4 $2596 +line 4850 +;4849: (BG_FlippingAnim(oldAnim)) ) +;4850: { +line 4851 +;4851: blendTime = 200; +ADDRLP4 16 +CNSTI4 200 +ASGNI4 +line 4852 +;4852: } +LABELV $2596 +LABELV $2595 +line 4853 +;4853: } +LABELV $2592 +line 4854 +;4854: } +LABELV $2586 +line 4856 +;4855: +;4856: animSpeed *= animSpeedMult; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +ADDRFP4 12 +INDIRF4 +MULF4 +ASGNF4 +line 4858 +;4857: +;4858: if (torsoOnly) +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $2598 +line 4859 +;4859: { +line 4860 +;4860: lf->animationTorsoSpeed = animSpeedMult; +ADDRFP4 4 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDRFP4 12 +INDIRF4 +ASGNF4 +line 4861 +;4861: } +ADDRGP4 $2599 +JUMPV +LABELV $2598 +line 4863 +;4862: else +;4863: { +line 4864 +;4864: lf->animationSpeed = animSpeedMult; +ADDRFP4 4 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRFP4 12 +INDIRF4 +ASGNF4 +line 4865 +;4865: } +LABELV $2599 +line 4867 +;4866: +;4867: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2600 +line 4868 +;4868: { +line 4869 +;4869: int atstBlend = 400; +ADDRLP4 40 +CNSTI4 400 +ASGNI4 +line 4871 +;4870: +;4871: if (torsoOnly) +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $2602 +line 4872 +;4872: { +line 4873 +;4873: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "pelvis", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $295 +ARGP4 +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 4874 +;4874: } +ADDRGP4 $2601 +JUMPV +LABELV $2602 +line 4876 +;4875: else +;4876: { +line 4877 +;4877: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, atstBlend); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 4878 +;4878: } +line 4879 +;4879: } +ADDRGP4 $2601 +JUMPV +LABELV $2600 +line 4881 +;4880: else +;4881: { +line 4882 +;4882: if (torsoOnly) +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $2606 +line 4883 +;4883: { +line 4884 +;4884: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed,cg.time, -1, blendTime); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $303 +ARGP4 +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 4885 +;4885: } +ADDRGP4 $2607 +JUMPV +LABELV $2606 +line 4887 +;4886: else +;4887: { +line 4888 +;4888: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 4889 +;4889: } +LABELV $2607 +line 4905 +;4890: +;4891: /* +;4892: if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation && +;4893: !BG_FlippingAnim( cent->currentState.legsAnim ) && +;4894: !BG_SpinningSaberAnim( cent->currentState.legsAnim ) && +;4895: !BG_SpinningSaberAnim( cent->currentState.torsoAnim ) && +;4896: !BG_InSpecialJump( cent->currentState.legsAnim ) && +;4897: !BG_InSpecialJump( cent->currentState.torsoAnim ) && +;4898: !BG_InDeathAnim(cent->currentState.legsAnim) && +;4899: !BG_InDeathAnim(cent->currentState.torsoAnim) && +;4900: !CG_InRoll(cent) && +;4901: !BG_SaberInSpecial(cent->currentState.saberMove) && +;4902: !BG_SaberInSpecialAttack(cent->currentState.torsoAnim) && +;4903: !BG_SaberInSpecialAttack(cent->currentState.legsAnim) ) +;4904: */ +;4905: if (cg.snap && cg.snap->ps.clientNum == cent->currentState.number) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2610 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +NEI4 $2610 +line 4906 +;4906: { //go ahead and use the predicted state if you can. +line 4907 +;4907: if ((cg.predictedPlayerState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation) +ADDRGP4 cg+96+100 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ADDRFP4 8 +INDIRI4 +NEI4 $2611 +line 4908 +;4908: { +line 4909 +;4909: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $311 +ARGP4 +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 4910 +;4910: } +line 4911 +;4911: } +ADDRGP4 $2611 +JUMPV +LABELV $2610 +line 4913 +;4912: else +;4913: { +line 4914 +;4914: if ((cent->currentState.torsoAnim&~ANIM_TOGGLEBIT) == newAnimation) +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ADDRFP4 8 +INDIRI4 +NEI4 $2619 +line 4915 +;4915: { +line 4916 +;4916: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, blendTime); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $311 +ARGP4 +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 4917 +;4917: } +LABELV $2619 +line 4918 +;4918: } +LABELV $2611 +line 4919 +;4919: } +LABELV $2601 +line 4920 +;4920: } +LABELV $2571 +line 4921 +;4921:} +LABELV $2558 +endproc CG_G2EntSetLerpFrameAnimation 64 40 +proc CG_G2EntRunLerpFrame 76 40 +line 4924 +;4922: +;4923:static void CG_G2EntRunLerpFrame( centity_t *cent, lerpFrame_t *lf, int newAnimation, float speedScale, qboolean torsoOnly) +;4924:{ +line 4929 +;4925: int f, numFrames; +;4926: animation_t *anim; +;4927: +;4928: // debugging tool to get no animations +;4929: if ( cg_animSpeed.integer == 0 ) { +ADDRGP4 cg_animSpeed+12 +INDIRI4 +CNSTI4 0 +NEI4 $2623 +line 4930 +;4930: lf->oldFrame = lf->frame = lf->backlerp = 0; +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTF4 0 +ASGNF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 16 +INDIRF4 +CVFI4 4 +ASGNI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 4931 +;4931: return; +ADDRGP4 $2622 +JUMPV +LABELV $2623 +line 4935 +;4932: } +;4933: +;4934: // see if the animation sequence is switching +;4935: if (cent->currentState.forceFrame) +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2626 +line 4936 +;4936: { +line 4937 +;4937: int flags = BONE_ANIM_OVERRIDE_FREEZE; //|BONE_ANIM_BLEND; +ADDRLP4 12 +CNSTI4 72 +ASGNI4 +line 4938 +;4938: float animSpeed = 1.0f; +ADDRLP4 16 +CNSTF4 1065353216 +ASGNF4 +line 4939 +;4939: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "upper_lumbar", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $303 +ARGP4 +ADDRLP4 24 +ADDRLP4 20 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 4940 +;4940: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "model_root", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 32 +ADDRLP4 28 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 4941 +;4941: trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", cent->currentState.forceFrame, cent->currentState.forceFrame+1, flags, animSpeed, cg.time, -1, 150); +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $311 +ARGP4 +ADDRLP4 40 +ADDRLP4 36 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 4943 +;4942: +;4943: lf->animationNumber = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTI4 0 +ASGNI4 +line 4944 +;4944: } +ADDRGP4 $2627 +JUMPV +LABELV $2626 +line 4945 +;4945: else if ( (newAnimation != lf->animationNumber || !lf->animation) || (CG_FirstAnimFrame(lf, torsoOnly, speedScale)) ) +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +NEI4 $2633 +ADDRLP4 12 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2633 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRFP4 16 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRLP4 16 +ADDRGP4 CG_FirstAnimFrame +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $2631 +LABELV $2633 +line 4946 +;4946: { +line 4947 +;4947: CG_G2EntSetLerpFrameAnimation( cent, lf, newAnimation, speedScale, torsoOnly); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2EntSetLerpFrameAnimation +CALLV +pop +line 4948 +;4948: } +ADDRGP4 $2632 +JUMPV +LABELV $2631 +line 4949 +;4949: else if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2634 +line 4950 +;4950: { +line 4951 +;4951: if (cent->pe.legs.yawing != !lf->torsoYawing) +ADDRFP4 4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $2639 +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +ADDRGP4 $2640 +JUMPV +LABELV $2639 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +LABELV $2640 +ADDRFP4 0 +INDIRP4 +CNSTI4 668 +ADDP4 +INDIRI4 +ADDRLP4 20 +INDIRI4 +EQI4 $2636 +line 4952 +;4952: { +line 4953 +;4953: CG_G2EntSetLerpFrameAnimation( cent, lf, newAnimation, speedScale, torsoOnly); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRF4 +ARGF4 +ADDRFP4 16 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2EntSetLerpFrameAnimation +CALLV +pop +line 4954 +;4954: lf->torsoYawing = cent->pe.legs.yawing; +ADDRFP4 4 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 668 +ADDP4 +INDIRI4 +ASGNI4 +line 4955 +;4955: } +LABELV $2636 +line 4956 +;4956: } +LABELV $2634 +LABELV $2632 +LABELV $2627 +line 4960 +;4957: +;4958: // if we have passed the current frame, move it to +;4959: // oldFrame and calculate a new frame +;4960: if ( cg.time >= lf->frameTime ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +LTI4 $2641 +line 4961 +;4961: if (lf->oldFrame != lf->frame && +ADDRLP4 20 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +EQI4 $2644 +ADDRLP4 20 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 644 +ADDP4 +CVPU4 4 +NEU4 $2644 +line 4963 +;4962: lf == &(cent->pe.legs)) +;4963: { +line 4964 +;4964: int addFinalFrame = CG_InWalkingAnim(lf->animationNumber); //9; +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 CG_InWalkingAnim +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 4966 +;4965: +;4966: if (!cent->isATST && +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $2646 +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 915 +EQI4 $2648 +ADDRLP4 32 +INDIRI4 +CNSTI4 918 +NEI4 $2646 +LABELV $2648 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $2646 +line 4969 +;4967: ((lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || (lf->animationNumber&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT) && +;4968: addFinalFrame) +;4969: { +line 4970 +;4970: if ( lf->frame >= (lf->animation->firstFrame+2) && +ADDRLP4 36 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRLP4 36 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 2 +ADDI4 +ASGNI4 +ADDRLP4 36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 40 +INDIRI4 +LTI4 $2649 +ADDRLP4 36 +INDIRP4 +INDIRI4 +ADDRLP4 40 +INDIRI4 +GEI4 $2649 +line 4972 +;4971: lf->oldFrame < (lf->animation->firstFrame+2)) +;4972: { +line 4973 +;4973: CG_FootStepGeneric(cent, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStepGeneric +CALLV +pop +line 4974 +;4974: } +ADDRGP4 $2647 +JUMPV +LABELV $2649 +line 4975 +;4975: else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && +ADDRLP4 44 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 48 +ADDRLP4 44 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +ADDI4 +ASGNI4 +ADDRLP4 44 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +LTI4 $2651 +ADDRLP4 44 +INDIRP4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +GEI4 $2651 +line 4977 +;4976: lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) +;4977: { +line 4978 +;4978: CG_FootStepGeneric(cent, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStepGeneric +CALLV +pop +line 4979 +;4979: } +ADDRGP4 $2647 +JUMPV +LABELV $2651 +line 4980 +;4980: else if ( lf->frame >= (lf->animation->firstFrame+12) && +ADDRLP4 52 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 56 +ADDRLP4 52 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 12 +ADDI4 +ASGNI4 +ADDRLP4 52 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 56 +INDIRI4 +LTI4 $2653 +ADDRLP4 52 +INDIRP4 +INDIRI4 +ADDRLP4 56 +INDIRI4 +GEI4 $2653 +line 4982 +;4981: lf->oldFrame < (lf->animation->firstFrame+12)) +;4982: { +line 4983 +;4983: CG_FootStepGeneric(cent, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStepGeneric +CALLV +pop +line 4984 +;4984: } +ADDRGP4 $2647 +JUMPV +LABELV $2653 +line 4985 +;4985: else if ( lf->frame >= (lf->animation->firstFrame+16) && +ADDRLP4 60 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 64 +ADDRLP4 60 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 16 +ADDI4 +ASGNI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 64 +INDIRI4 +LTI4 $2655 +ADDRLP4 60 +INDIRP4 +INDIRI4 +ADDRLP4 64 +INDIRI4 +GEI4 $2655 +line 4987 +;4986: lf->oldFrame < (lf->animation->firstFrame+16)) +;4987: { +line 4988 +;4988: CG_FootStepGeneric(cent, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStepGeneric +CALLV +pop +line 4989 +;4989: } +ADDRGP4 $2647 +JUMPV +LABELV $2655 +line 4990 +;4990: else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) +ADDRLP4 68 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 72 +ADDRLP4 68 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 68 +INDIRP4 +INDIRI4 +ADDRLP4 72 +INDIRI4 +LEI4 $2647 +ADDRLP4 72 +INDIRI4 +ADDRLP4 68 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +LEI4 $2647 +line 4991 +;4991: { //missed one +line 4992 +;4992: CG_FootStepGeneric(cent, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStepGeneric +CALLV +pop +line 4993 +;4993: } +line 4994 +;4994: } +ADDRGP4 $2647 +JUMPV +LABELV $2646 +line 4995 +;4995: else if (addFinalFrame && !cent->isATST) +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ADDRLP4 36 +INDIRI4 +EQI4 $2659 +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ADDRLP4 36 +INDIRI4 +NEI4 $2659 +line 4996 +;4996: { +line 4997 +;4997: if ( lf->frame >= (lf->animation->firstFrame+3) && +ADDRLP4 40 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 44 +ADDRLP4 40 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 3 +ADDI4 +ASGNI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 44 +INDIRI4 +LTI4 $2661 +ADDRLP4 40 +INDIRP4 +INDIRI4 +ADDRLP4 44 +INDIRI4 +GEI4 $2661 +line 4999 +;4998: lf->oldFrame < (lf->animation->firstFrame+3)) +;4999: { +line 5000 +;5000: CG_FootStepGeneric(cent, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStepGeneric +CALLV +pop +line 5001 +;5001: } +ADDRGP4 $2662 +JUMPV +LABELV $2661 +line 5002 +;5002: else if ( lf->frame >= (lf->animation->firstFrame+addFinalFrame) && +ADDRLP4 48 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 52 +ADDRLP4 48 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +ADDI4 +ASGNI4 +ADDRLP4 48 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 52 +INDIRI4 +LTI4 $2663 +ADDRLP4 48 +INDIRP4 +INDIRI4 +ADDRLP4 52 +INDIRI4 +GEI4 $2663 +line 5004 +;5003: lf->oldFrame < (lf->animation->firstFrame+addFinalFrame)) +;5004: { +line 5005 +;5005: CG_FootStepGeneric(cent, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStepGeneric +CALLV +pop +line 5006 +;5006: } +ADDRGP4 $2664 +JUMPV +LABELV $2663 +line 5007 +;5007: else if (lf->oldFrame > lf->frame && lf->frame > (lf->animation->firstFrame+1)) +ADDRLP4 56 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 60 +ADDRLP4 56 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 56 +INDIRP4 +INDIRI4 +ADDRLP4 60 +INDIRI4 +LEI4 $2665 +ADDRLP4 60 +INDIRI4 +ADDRLP4 56 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +LEI4 $2665 +line 5008 +;5008: { //missed one +line 5009 +;5009: CG_FootStepGeneric(cent, lf->animationNumber); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FootStepGeneric +CALLV +pop +line 5010 +;5010: } +LABELV $2665 +LABELV $2664 +LABELV $2662 +line 5011 +;5011: } +LABELV $2659 +LABELV $2647 +line 5012 +;5012: } +LABELV $2644 +line 5014 +;5013: +;5014: lf->oldFrame = lf->frame; +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +line 5015 +;5015: lf->oldFrameTime = lf->frameTime; +ADDRLP4 28 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 5018 +;5016: +;5017: // get the next frame based on the animation +;5018: anim = lf->animation; +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +ASGNP4 +line 5019 +;5019: if ( !anim->frameLerp ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $2667 +line 5020 +;5020: return; // shouldn't happen +ADDRGP4 $2622 +JUMPV +LABELV $2667 +line 5023 +;5021: } +;5022: +;5023: if ( cg.time < lf->animationTime ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +GEI4 $2669 +line 5024 +;5024: lf->frameTime = lf->animationTime; // initial lerp +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +ASGNI4 +line 5025 +;5025: } else { +ADDRGP4 $2670 +JUMPV +LABELV $2669 +line 5026 +;5026: lf->frameTime = lf->oldFrameTime + anim->frameLerp; +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +CNSTI4 12 +ASGNI4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 5027 +;5027: } +LABELV $2670 +line 5028 +;5028: f = ( lf->frameTime - lf->animationTime ) / anim->frameLerp; +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +CNSTI4 12 +ASGNI4 +ADDRLP4 4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +SUBI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRI4 +DIVI4 +ASGNI4 +line 5029 +;5029: f *= speedScale; // adjust for haste, etc +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ADDRFP4 12 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 5031 +;5030: +;5031: numFrames = anim->numFrames; +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 5032 +;5032: if (anim->flipflop) { +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2672 +line 5033 +;5033: numFrames *= 2; +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +LSHI4 +ASGNI4 +line 5034 +;5034: } +LABELV $2672 +line 5035 +;5035: if ( f >= numFrames ) { +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $2674 +line 5036 +;5036: f -= numFrames; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +SUBI4 +ASGNI4 +line 5037 +;5037: if ( anim->loopFrames != -1 ) //Before 0 meant no loop +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $2676 +line 5038 +;5038: { +line 5039 +;5039: if(anim->numFrames - anim->loopFrames == 0) +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 0 +NEI4 $2678 +line 5040 +;5040: { +line 5041 +;5041: f %= anim->numFrames; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +MODI4 +ASGNI4 +line 5042 +;5042: } +ADDRGP4 $2679 +JUMPV +LABELV $2678 +line 5044 +;5043: else +;5044: { +line 5045 +;5045: f %= (anim->numFrames - anim->loopFrames); +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +SUBI4 +MODI4 +ASGNI4 +line 5046 +;5046: } +LABELV $2679 +line 5047 +;5047: f += anim->loopFrames; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 5048 +;5048: } +ADDRGP4 $2677 +JUMPV +LABELV $2676 +line 5050 +;5049: else +;5050: { +line 5051 +;5051: f = numFrames - 1; +ADDRLP4 4 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 5054 +;5052: // the animation is stuck at the end, so it +;5053: // can immediately transition to another sequence +;5054: lf->frameTime = cg.time; +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 5055 +;5055: } +LABELV $2677 +line 5056 +;5056: } +LABELV $2674 +line 5057 +;5057: if ( anim->reversed ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2681 +line 5058 +;5058: lf->frame = anim->firstFrame + anim->numFrames - 1 - f; +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +CNSTI4 1 +SUBI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ASGNI4 +line 5059 +;5059: } +ADDRGP4 $2682 +JUMPV +LABELV $2681 +line 5060 +;5060: else if (anim->flipflop && f>=anim->numFrames) { +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2683 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LTI4 $2683 +line 5061 +;5061: lf->frame = anim->firstFrame + anim->numFrames - 1 - (f%anim->numFrames); +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +ADDI4 +CNSTI4 1 +SUBI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +MODI4 +SUBI4 +ASGNI4 +line 5062 +;5062: } +ADDRGP4 $2684 +JUMPV +LABELV $2683 +line 5063 +;5063: else { +line 5064 +;5064: lf->frame = anim->firstFrame + f; +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +ASGNI4 +line 5065 +;5065: } +LABELV $2684 +LABELV $2682 +line 5066 +;5066: if ( cg.time > lf->frameTime ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +LEI4 $2685 +line 5067 +;5067: lf->frameTime = cg.time; +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 5068 +;5068: if ( cg_debugAnim.integer && (cg_debugAnim.integer < 0 || cg_debugAnim.integer == cent->currentState.clientNum) ) { +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRLP4 44 +INDIRI4 +EQI4 $2689 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRLP4 44 +INDIRI4 +LTI4 $2694 +ADDRGP4 cg_debugAnim+12 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +NEI4 $2689 +LABELV $2694 +line 5069 +;5069: CG_Printf( "Clamp lf->frameTime\n"); +ADDRGP4 $938 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 5070 +;5070: } +LABELV $2689 +line 5071 +;5071: } +LABELV $2685 +line 5072 +;5072: } +LABELV $2641 +line 5074 +;5073: +;5074: if ( lf->frameTime > cg.time + 200 ) { +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 200 +ADDI4 +LEI4 $2695 +line 5075 +;5075: lf->frameTime = cg.time; +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 5076 +;5076: } +LABELV $2695 +line 5078 +;5077: +;5078: if ( lf->oldFrameTime > cg.time ) { +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $2699 +line 5079 +;5079: lf->oldFrameTime = cg.time; +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 5080 +;5080: } +LABELV $2699 +line 5082 +;5081: // calculate current lerp value +;5082: if ( lf->frameTime == lf->oldFrameTime ) { +ADDRLP4 20 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +NEI4 $2703 +line 5083 +;5083: lf->backlerp = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTF4 0 +ASGNF4 +line 5084 +;5084: } else { +ADDRGP4 $2704 +JUMPV +LABELV $2703 +line 5085 +;5085: lf->backlerp = 1.0 - (float)( cg.time - lf->oldFrameTime ) / ( lf->frameTime - lf->oldFrameTime ); +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 24 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTF4 1065353216 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 28 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 24 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +SUBF4 +ASGNF4 +line 5086 +;5086: } +LABELV $2704 +line 5087 +;5087:} +LABELV $2622 +endproc CG_G2EntRunLerpFrame 76 40 +proc CG_G2EntAnimation 12 20 +line 5090 +;5088: +;5089:static void CG_G2EntAnimation( centity_t *cent, int *legsOld, int *legs, float *legsBackLerp, +;5090: int *torsoOld, int *torso, float *torsoBackLerp ) { +line 5093 +;5091: float speedScale; +;5092: +;5093: if ( cg_noPlayerAnims.integer ) { +ADDRGP4 cg_noPlayerAnims+12 +INDIRI4 +CNSTI4 0 +EQI4 $2707 +line 5094 +;5094: *legsOld = *legs = *torsoOld = *torso = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRFP4 20 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +ADDRFP4 16 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 5095 +;5095: return; +ADDRGP4 $2706 +JUMPV +LABELV $2707 +line 5098 +;5096: } +;5097: +;5098: if (cent->currentState.forcePowersActive & (1 << FP_RAGE)) +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $2710 +line 5099 +;5099: { +line 5100 +;5100: speedScale = 1.3; +ADDRLP4 0 +CNSTF4 1067869798 +ASGNF4 +line 5101 +;5101: } +ADDRGP4 $2711 +JUMPV +LABELV $2710 +line 5102 +;5102: else if (cent->currentState.forcePowersActive & (1 << FP_SPEED)) +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $2712 +line 5103 +;5103: { +line 5104 +;5104: speedScale = 1.7; +ADDRLP4 0 +CNSTF4 1071225242 +ASGNF4 +line 5105 +;5105: } +ADDRGP4 $2713 +JUMPV +LABELV $2712 +line 5107 +;5106: else +;5107: { +line 5108 +;5108: speedScale = 1; +ADDRLP4 0 +CNSTF4 1065353216 +ASGNF4 +line 5109 +;5109: } +LABELV $2713 +LABELV $2711 +line 5111 +;5110: +;5111: CG_G2EntRunLerpFrame( cent, ¢->pe.legs, cent->currentState.legsAnim, speedScale, qfalse); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 644 +ADDP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRF4 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_G2EntRunLerpFrame +CALLV +pop +line 5113 +;5112: +;5113: if (!(cent->currentState.forcePowersActive & (1 << FP_RAGE))) +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +NEI4 $2714 +line 5114 +;5114: { //don't affect torso anim speed unless raged +line 5115 +;5115: speedScale = 1; +ADDRLP4 0 +CNSTF4 1065353216 +ASGNF4 +line 5116 +;5116: } +ADDRGP4 $2715 +JUMPV +LABELV $2714 +line 5118 +;5117: else +;5118: { +line 5119 +;5119: speedScale = 1.7; +ADDRLP4 0 +CNSTF4 1071225242 +ASGNF4 +line 5120 +;5120: } +LABELV $2715 +line 5122 +;5121: +;5122: *legsOld = cent->pe.legs.oldFrame; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 644 +ADDP4 +INDIRI4 +ASGNI4 +line 5123 +;5123: *legs = cent->pe.legs.frame; +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +INDIRI4 +ASGNI4 +line 5124 +;5124: *legsBackLerp = cent->pe.legs.backlerp; +ADDRFP4 12 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 660 +ADDP4 +INDIRF4 +ASGNF4 +line 5126 +;5125: +;5126: CG_G2EntRunLerpFrame( cent, ¢->pe.torso, cent->currentState.torsoAnim, speedScale, qtrue ); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 708 +ADDP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRF4 +ARGF4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_G2EntRunLerpFrame +CALLV +pop +line 5128 +;5127: +;5128: *torsoOld = cent->pe.torso.oldFrame; +ADDRFP4 16 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 708 +ADDP4 +INDIRI4 +ASGNI4 +line 5129 +;5129: *torso = cent->pe.torso.frame; +ADDRFP4 20 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 716 +ADDP4 +INDIRI4 +ASGNI4 +line 5130 +;5130: *torsoBackLerp = cent->pe.torso.backlerp; +ADDRFP4 24 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 724 +ADDP4 +INDIRF4 +ASGNF4 +line 5131 +;5131:} +LABELV $2706 +endproc CG_G2EntAnimation 12 20 +export CG_G2AnimEntSpineAngles +proc CG_G2AnimEntSpineAngles 88 8 +line 5134 +;5132: +;5133:void CG_G2AnimEntSpineAngles( centity_t *cent, vec3_t viewAngles, const vec3_t angles, vec3_t thoracicAngles, vec3_t ulAngles, vec3_t llAngles ) +;5134:{ +line 5135 +;5135: int ang = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 5137 +;5136: +;5137: if (cent->isATST || cent->currentState.teamowner) +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $2719 +ADDRLP4 4 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $2717 +LABELV $2719 +line 5138 +;5138: { +line 5139 +;5139: return; +ADDRGP4 $2716 +JUMPV +LABELV $2717 +line 5142 +;5140: } +;5141: +;5142: VectorClear(ulAngles); +ADDRLP4 12 +ADDRFP4 16 +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTF4 0 +ASGNF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 5143 +;5143: VectorClear(llAngles); +ADDRLP4 20 +ADDRFP4 20 +INDIRP4 +ASGNP4 +ADDRLP4 24 +CNSTF4 0 +ASGNF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 5146 +;5144: +;5145: //cent->pe.torso.pitchAngle = viewAngles[PITCH]; +;5146: viewAngles[YAW] = AngleDelta( cent->lerpAngles[YAW], angles[YAW] ); +ADDRFP4 0 +INDIRP4 +CNSTI4 944 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 28 +CNSTI4 4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 32 +ADDRGP4 AngleDelta +CALLF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 5151 +;5147: //cent->pe.torso.yawAngle = viewAngles[YAW]; +;5148: +;5149: //distribute the angles differently up the spine +;5150: //NOTE: each of these distributions must add up to 1.0f +;5151: thoracicAngles[PITCH] = 0;//viewAngles[PITCH]*0.20f; +ADDRFP4 12 +INDIRP4 +CNSTF4 0 +ASGNF4 +line 5152 +;5152: llAngles[PITCH] = 0;//viewAngles[PITCH]*0.40f; +ADDRFP4 20 +INDIRP4 +CNSTF4 0 +ASGNF4 +line 5153 +;5153: ulAngles[PITCH] = 0;//viewAngles[PITCH]*0.40f; +ADDRFP4 16 +INDIRP4 +CNSTF4 0 +ASGNF4 +line 5155 +;5154: +;5155: thoracicAngles[YAW] = viewAngles[YAW]*0.20f - (viewAngles[PITCH]*(viewAngles[YAW]*.020f)); +ADDRLP4 36 +CNSTI4 4 +ASGNI4 +ADDRLP4 40 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 44 +ADDRLP4 40 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +CNSTF4 1045220557 +ADDRLP4 44 +INDIRF4 +MULF4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +CNSTF4 1017370378 +ADDRLP4 44 +INDIRF4 +MULF4 +MULF4 +SUBF4 +ASGNF4 +line 5156 +;5156: ulAngles[YAW] = viewAngles[YAW]*0.25f - (viewAngles[PITCH]*(viewAngles[YAW]*.0005f)); +ADDRLP4 48 +CNSTI4 4 +ASGNI4 +ADDRLP4 52 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 56 +ADDRLP4 52 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRFP4 16 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +CNSTF4 1048576000 +ADDRLP4 56 +INDIRF4 +MULF4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +CNSTF4 973279855 +ADDRLP4 56 +INDIRF4 +MULF4 +MULF4 +SUBF4 +ASGNF4 +line 5157 +;5157: llAngles[YAW] = viewAngles[YAW]*0.25f - (viewAngles[PITCH]*(viewAngles[YAW]*.0005f)); +ADDRLP4 60 +CNSTI4 4 +ASGNI4 +ADDRLP4 64 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 68 +ADDRLP4 64 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRFP4 20 +INDIRP4 +ADDRLP4 60 +INDIRI4 +ADDP4 +CNSTF4 1048576000 +ADDRLP4 68 +INDIRF4 +MULF4 +ADDRLP4 64 +INDIRP4 +INDIRF4 +CNSTF4 973279855 +ADDRLP4 68 +INDIRF4 +MULF4 +MULF4 +SUBF4 +ASGNF4 +line 5159 +;5158: +;5159: if (thoracicAngles[YAW] > 20) +ADDRFP4 12 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1101004800 +LEF4 $2720 +line 5160 +;5160: { +line 5161 +;5161: thoracicAngles[YAW] = 20; +ADDRFP4 12 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 1101004800 +ASGNF4 +line 5162 +;5162: } +LABELV $2720 +line 5163 +;5163: if (ulAngles[YAW] > 20) +ADDRFP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1101004800 +LEF4 $2722 +line 5164 +;5164: { +line 5165 +;5165: ulAngles[YAW] = 20; +ADDRFP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 1101004800 +ASGNF4 +line 5166 +;5166: } +LABELV $2722 +line 5167 +;5167: if (llAngles[YAW] > 20) +ADDRFP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1101004800 +LEF4 $2724 +line 5168 +;5168: { +line 5169 +;5169: llAngles[YAW] = 20; +ADDRFP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 1101004800 +ASGNF4 +line 5170 +;5170: } +LABELV $2724 +line 5172 +;5171: +;5172: thoracicAngles[ROLL] = viewAngles[ROLL]*0.20f; +ADDRLP4 72 +CNSTI4 8 +ASGNI4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +CNSTF4 1045220557 +ADDRFP4 4 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 5173 +;5173: ulAngles[ROLL] = viewAngles[ROLL]*0.35f; +ADDRLP4 76 +CNSTI4 8 +ASGNI4 +ADDRFP4 16 +INDIRP4 +ADDRLP4 76 +INDIRI4 +ADDP4 +CNSTF4 1051931443 +ADDRFP4 4 +INDIRP4 +ADDRLP4 76 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 5174 +;5174: llAngles[ROLL] = viewAngles[ROLL]*0.45f; +ADDRLP4 80 +CNSTI4 8 +ASGNI4 +ADDRFP4 20 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +CNSTF4 1055286886 +ADDRFP4 4 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 5176 +;5175: +;5176: for ( ang = 0; ang < 3; ang++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $2726 +line 5177 +;5177: { +line 5178 +;5178: if (ulAngles[ang] < 0) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 16 +INDIRP4 +ADDP4 +INDIRF4 +CNSTF4 0 +GEF4 $2730 +line 5179 +;5179: { +line 5180 +;5180: ulAngles[ang] += 360; +ADDRLP4 84 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 16 +INDIRP4 +ADDP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 5181 +;5181: } +LABELV $2730 +line 5182 +;5182: } +LABELV $2727 +line 5176 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $2726 +line 5183 +;5183:} +LABELV $2716 +endproc CG_G2AnimEntSpineAngles 88 8 +data +align 4 +LABELV $2733 +byte 4 0 +byte 4 22 +byte 4 45 +byte 4 -22 +byte 4 0 +byte 4 22 +byte 4 -45 +byte 4 -22 +lit +align 4 +LABELV $2734 +byte 4 0 +byte 4 0 +byte 4 0 +code +proc CG_G2AnimEntAngles 228 44 +line 5186 +;5184: +;5185:static void CG_G2AnimEntAngles( centity_t *cent, vec3_t legs[3], vec3_t legsAngles) +;5186:{ +line 5194 +;5187: vec3_t torsoAngles, headAngles; +;5188: float dest; +;5189: static int movementOffsets[8] = { 0, 22, 45, -22, 0, 22, -45, -22 }; +;5190: vec3_t velocity; +;5191: float speed; //, speed_dif, speed_desired; +;5192: int dir; +;5193: vec3_t velPos, velAng; +;5194: int adddir = 0; +ADDRLP4 144 +CNSTI4 0 +ASGNI4 +line 5196 +;5195: float dif; +;5196: float degrees_negative = 0; +ADDRLP4 132 +CNSTF4 0 +ASGNF4 +line 5197 +;5197: float degrees_positive = 0; +ADDRLP4 136 +CNSTF4 0 +ASGNF4 +line 5198 +;5198: vec3_t ulAngles, llAngles, viewAngles, angles, thoracicAngles = {0,0,0}; +ADDRLP4 60 +ADDRGP4 $2734 +INDIRB +ASGNB 12 +line 5200 +;5199: +;5200: VectorCopy( cent->lerpAngles, headAngles ); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 5201 +;5201: headAngles[YAW] = AngleMod( headAngles[YAW] ); +ADDRLP4 12+4 +INDIRF4 +ARGF4 +ADDRLP4 148 +ADDRGP4 AngleMod +CALLF4 +ASGNF4 +ADDRLP4 12+4 +ADDRLP4 148 +INDIRF4 +ASGNF4 +line 5202 +;5202: VectorClear( legsAngles ); +ADDRLP4 152 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 156 +CNSTF4 0 +ASGNF4 +ADDRLP4 152 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 156 +INDIRF4 +ASGNF4 +ADDRLP4 152 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 156 +INDIRF4 +ASGNF4 +ADDRLP4 152 +INDIRP4 +ADDRLP4 156 +INDIRF4 +ASGNF4 +line 5203 +;5203: VectorClear( torsoAngles ); +ADDRLP4 160 +CNSTF4 0 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 160 +INDIRF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 160 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 160 +INDIRF4 +ASGNF4 +line 5208 +;5204: +;5205: // --------- yaw ------------- +;5206: +;5207: // allow yaw to drift a bit +;5208: if ((( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) != BOTH_STAND1) || +ADDRLP4 164 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 168 +CNSTI4 -2049 +ASGNI4 +ADDRLP4 164 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +ADDRLP4 168 +INDIRI4 +BANDI4 +CNSTI4 571 +NEI4 $2741 +ADDRLP4 164 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +ADDRLP4 168 +INDIRI4 +BANDI4 +ADDRLP4 164 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 WeaponReadyAnim +ADDP4 +INDIRI4 +EQI4 $2739 +LABELV $2741 +line 5210 +;5209: ( cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ) != WeaponReadyAnim[cent->currentState.weapon] ) +;5210: { +line 5212 +;5211: // if not standing still, always point all in the same direction +;5212: cent->pe.torso.yawing = qtrue; // always center +ADDRFP4 0 +INDIRP4 +CNSTI4 732 +ADDP4 +CNSTI4 1 +ASGNI4 +line 5213 +;5213: cent->pe.torso.pitching = qtrue; // always center +ADDRFP4 0 +INDIRP4 +CNSTI4 740 +ADDP4 +CNSTI4 1 +ASGNI4 +line 5214 +;5214: cent->pe.legs.yawing = qtrue; // always center +ADDRFP4 0 +INDIRP4 +CNSTI4 668 +ADDP4 +CNSTI4 1 +ASGNI4 +line 5215 +;5215: } +LABELV $2739 +line 5217 +;5216: +;5217: dir = 0; +ADDRLP4 128 +CNSTI4 0 +ASGNI4 +line 5218 +;5218: if (!cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $2742 +line 5219 +;5219: { +line 5220 +;5220: torsoAngles[YAW] = headAngles[YAW] + 0.25 * movementOffsets[ dir ]; +ADDRLP4 0+4 +ADDRLP4 12+4 +INDIRF4 +CNSTF4 1048576000 +ADDRLP4 128 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $2733 +ADDP4 +INDIRI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 5221 +;5221: } +ADDRGP4 $2743 +JUMPV +LABELV $2742 +line 5223 +;5222: else +;5223: { +line 5224 +;5224: torsoAngles[YAW] = headAngles[YAW]; +ADDRLP4 0+4 +ADDRLP4 12+4 +INDIRF4 +ASGNF4 +line 5225 +;5225: } +LABELV $2743 +line 5228 +;5226: +;5227: //for now, turn torso instantly and let the legs swing to follow +;5228: cent->pe.torso.yawAngle = torsoAngles[YAW]; +ADDRFP4 0 +INDIRP4 +CNSTI4 728 +ADDP4 +ADDRLP4 0+4 +INDIRF4 +ASGNF4 +line 5232 +;5229: +;5230: // --------- pitch ------------- +;5231: +;5232: VectorCopy( cent->currentState.pos.trDelta, velocity ); +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRB +ASGNB 12 +line 5233 +;5233: speed = VectorNormalize( velocity ); +ADDRLP4 24 +ARGP4 +ADDRLP4 172 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 108 +ADDRLP4 172 +INDIRF4 +ASGNF4 +line 5235 +;5234: +;5235: if (!speed) +ADDRLP4 108 +INDIRF4 +CNSTF4 0 +NEF4 $2749 +line 5236 +;5236: { +line 5237 +;5237: torsoAngles[YAW] = headAngles[YAW]; +ADDRLP4 0+4 +ADDRLP4 12+4 +INDIRF4 +ASGNF4 +line 5238 +;5238: } +LABELV $2749 +line 5241 +;5239: +;5240: // only show a fraction of the pitch angle in the torso +;5241: if ( headAngles[PITCH] > 180 ) { +ADDRLP4 12 +INDIRF4 +CNSTF4 1127481344 +LEF4 $2753 +line 5242 +;5242: dest = (-360 + headAngles[PITCH]) * 0.75; +ADDRLP4 140 +CNSTF4 1061158912 +ADDRLP4 12 +INDIRF4 +CNSTF4 3283353600 +ADDF4 +MULF4 +ASGNF4 +line 5243 +;5243: } else { +ADDRGP4 $2754 +JUMPV +LABELV $2753 +line 5244 +;5244: dest = headAngles[PITCH] * 0.75; +ADDRLP4 140 +CNSTF4 1061158912 +ADDRLP4 12 +INDIRF4 +MULF4 +ASGNF4 +line 5245 +;5245: } +LABELV $2754 +line 5246 +;5246: CG_SwingAngles( dest, 15, 30, 0.1, ¢->pe.torso.pitchAngle, ¢->pe.torso.pitching ); +ADDRLP4 140 +INDIRF4 +ARGF4 +CNSTF4 1097859072 +ARGF4 +CNSTF4 1106247680 +ARGF4 +CNSTF4 1036831949 +ARGF4 +ADDRLP4 176 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 176 +INDIRP4 +CNSTI4 736 +ADDP4 +ARGP4 +ADDRLP4 176 +INDIRP4 +CNSTI4 740 +ADDP4 +ARGP4 +ADDRGP4 CG_SwingAngles +CALLF4 +pop +line 5247 +;5247: torsoAngles[PITCH] = cent->pe.torso.pitchAngle; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 736 +ADDP4 +INDIRF4 +ASGNF4 +line 5249 +;5248: +;5249: if ( speed ) { +ADDRLP4 108 +INDIRF4 +CNSTF4 0 +EQF4 $2755 +line 5253 +;5250: vec3_t axis[3]; +;5251: float side; +;5252: +;5253: speed *= 0.05; +ADDRLP4 108 +CNSTF4 1028443341 +ADDRLP4 108 +INDIRF4 +MULF4 +ASGNF4 +line 5255 +;5254: +;5255: AnglesToAxis( legsAngles, axis ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 180 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 5256 +;5256: side = speed * DotProduct( velocity, axis[1] ); +ADDRLP4 216 +ADDRLP4 108 +INDIRF4 +ADDRLP4 24 +INDIRF4 +ADDRLP4 180+12 +INDIRF4 +MULF4 +ADDRLP4 24+4 +INDIRF4 +ADDRLP4 180+12+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 24+8 +INDIRF4 +ADDRLP4 180+12+8 +INDIRF4 +MULF4 +ADDF4 +MULF4 +ASGNF4 +line 5257 +;5257: legsAngles[ROLL] -= side; +ADDRLP4 220 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 220 +INDIRP4 +ADDRLP4 220 +INDIRP4 +INDIRF4 +ADDRLP4 216 +INDIRF4 +SUBF4 +ASGNF4 +line 5259 +;5258: +;5259: side = speed * DotProduct( velocity, axis[0] ); +ADDRLP4 216 +ADDRLP4 108 +INDIRF4 +ADDRLP4 24 +INDIRF4 +ADDRLP4 180 +INDIRF4 +MULF4 +ADDRLP4 24+4 +INDIRF4 +ADDRLP4 180+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 24+8 +INDIRF4 +ADDRLP4 180+8 +INDIRF4 +MULF4 +ADDF4 +MULF4 +ASGNF4 +line 5260 +;5260: legsAngles[PITCH] += side; +ADDRLP4 224 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 224 +INDIRP4 +ADDRLP4 224 +INDIRP4 +INDIRF4 +ADDRLP4 216 +INDIRF4 +ADDF4 +ASGNF4 +line 5261 +;5261: } +LABELV $2755 +line 5264 +;5262: +;5263: //rww - crazy velocity-based leg angle calculation +;5264: legsAngles[YAW] = headAngles[YAW]; +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 12+4 +INDIRF4 +ASGNF4 +line 5265 +;5265: velPos[0] = cent->lerpOrigin[0] + velocity[0]; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +ADDF4 +ASGNF4 +line 5266 +;5266: velPos[1] = cent->lerpOrigin[1] + velocity[1]; +ADDRLP4 36+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +ADDRLP4 24+4 +INDIRF4 +ADDF4 +ASGNF4 +line 5267 +;5267: velPos[2] = cent->lerpOrigin[2];// + velocity[2]; +ADDRLP4 36+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +ASGNF4 +line 5269 +;5268: +;5269: if (cent->currentState.groundEntityNum == ENTITYNUM_NONE) +ADDRFP4 0 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +CNSTI4 1023 +NEI4 $2772 +line 5270 +;5270: { //off the ground, no direction-based leg angles +line 5271 +;5271: VectorCopy(cent->lerpOrigin, velPos); +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 5272 +;5272: } +LABELV $2772 +line 5274 +;5273: +;5274: VectorSubtract(cent->lerpOrigin, velPos, velAng); +ADDRLP4 180 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 48 +ADDRLP4 180 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 48+4 +ADDRLP4 180 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +ADDRLP4 36+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 48+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +ADDRLP4 36+8 +INDIRF4 +SUBF4 +ASGNF4 +line 5276 +;5275: +;5276: if (!VectorCompare(velAng, vec3_origin)) +ADDRLP4 48 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 184 +ADDRGP4 VectorCompare +CALLI4 +ASGNI4 +ADDRLP4 184 +INDIRI4 +CNSTI4 0 +NEI4 $2778 +line 5277 +;5277: { +line 5278 +;5278: vectoangles(velAng, velAng); +ADDRLP4 48 +ARGP4 +ADDRLP4 48 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 5280 +;5279: +;5280: if (velAng[YAW] <= legsAngles[YAW]) +ADDRLP4 48+4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +GTF4 $2780 +line 5281 +;5281: { +line 5282 +;5282: degrees_negative = (legsAngles[YAW] - velAng[YAW]); +ADDRLP4 132 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 48+4 +INDIRF4 +SUBF4 +ASGNF4 +line 5283 +;5283: degrees_positive = (360 - legsAngles[YAW]) + velAng[YAW]; +ADDRLP4 136 +CNSTF4 1135869952 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ADDRLP4 48+4 +INDIRF4 +ADDF4 +ASGNF4 +line 5284 +;5284: } +ADDRGP4 $2781 +JUMPV +LABELV $2780 +line 5286 +;5285: else +;5286: { +line 5287 +;5287: degrees_negative = legsAngles[YAW] + (360 - velAng[YAW]); +ADDRLP4 132 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1135869952 +ADDRLP4 48+4 +INDIRF4 +SUBF4 +ADDF4 +ASGNF4 +line 5288 +;5288: degrees_positive = (velAng[YAW] - legsAngles[YAW]); +ADDRLP4 136 +ADDRLP4 48+4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 5289 +;5289: } +LABELV $2781 +line 5291 +;5290: +;5291: if (degrees_negative < degrees_positive) +ADDRLP4 132 +INDIRF4 +ADDRLP4 136 +INDIRF4 +GEF4 $2787 +line 5292 +;5292: { +line 5293 +;5293: dif = degrees_negative; +ADDRLP4 112 +ADDRLP4 132 +INDIRF4 +ASGNF4 +line 5294 +;5294: adddir = 0; +ADDRLP4 144 +CNSTI4 0 +ASGNI4 +line 5295 +;5295: } +ADDRGP4 $2788 +JUMPV +LABELV $2787 +line 5297 +;5296: else +;5297: { +line 5298 +;5298: dif = degrees_positive; +ADDRLP4 112 +ADDRLP4 136 +INDIRF4 +ASGNF4 +line 5299 +;5299: adddir = 1; +ADDRLP4 144 +CNSTI4 1 +ASGNI4 +line 5300 +;5300: } +LABELV $2788 +line 5302 +;5301: +;5302: if (dif > 90) +ADDRLP4 112 +INDIRF4 +CNSTF4 1119092736 +LEF4 $2789 +line 5303 +;5303: { +line 5304 +;5304: dif = (180 - dif); +ADDRLP4 112 +CNSTF4 1127481344 +ADDRLP4 112 +INDIRF4 +SUBF4 +ASGNF4 +line 5305 +;5305: } +LABELV $2789 +line 5307 +;5306: +;5307: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2791 +line 5308 +;5308: { +line 5309 +;5309: if (dif > 360) +ADDRLP4 112 +INDIRF4 +CNSTF4 1135869952 +LEF4 $2792 +line 5310 +;5310: { +line 5311 +;5311: dif = 360; +ADDRLP4 112 +CNSTF4 1135869952 +ASGNF4 +line 5312 +;5312: } +line 5313 +;5313: } +ADDRGP4 $2792 +JUMPV +LABELV $2791 +line 5315 +;5314: else +;5315: { +line 5316 +;5316: if (dif > 60) +ADDRLP4 112 +INDIRF4 +CNSTF4 1114636288 +LEF4 $2795 +line 5317 +;5317: { +line 5318 +;5318: dif = 60; +ADDRLP4 112 +CNSTF4 1114636288 +ASGNF4 +line 5319 +;5319: } +LABELV $2795 +line 5320 +;5320: } +LABELV $2792 +line 5323 +;5321: +;5322: //Slight hack for when playing is running backward +;5323: if (dir == 3 || dir == 5) +ADDRLP4 188 +ADDRLP4 128 +INDIRI4 +ASGNI4 +ADDRLP4 188 +INDIRI4 +CNSTI4 3 +EQI4 $2799 +ADDRLP4 188 +INDIRI4 +CNSTI4 5 +NEI4 $2797 +LABELV $2799 +line 5324 +;5324: { +line 5325 +;5325: dif = -dif; +ADDRLP4 112 +ADDRLP4 112 +INDIRF4 +NEGF4 +ASGNF4 +line 5326 +;5326: } +LABELV $2797 +line 5328 +;5327: +;5328: if (adddir) +ADDRLP4 144 +INDIRI4 +CNSTI4 0 +EQI4 $2800 +line 5329 +;5329: { +line 5330 +;5330: legsAngles[YAW] -= dif; +ADDRLP4 192 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 192 +INDIRP4 +ADDRLP4 192 +INDIRP4 +INDIRF4 +ADDRLP4 112 +INDIRF4 +SUBF4 +ASGNF4 +line 5331 +;5331: } +ADDRGP4 $2801 +JUMPV +LABELV $2800 +line 5333 +;5332: else +;5333: { +line 5334 +;5334: legsAngles[YAW] += dif; +ADDRLP4 192 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 192 +INDIRP4 +ADDRLP4 192 +INDIRP4 +INDIRF4 +ADDRLP4 112 +INDIRF4 +ADDF4 +ASGNF4 +line 5335 +;5335: } +LABELV $2801 +line 5336 +;5336: } +LABELV $2778 +line 5338 +;5337: +;5338: cent->pe.legs.yawAngle = legsAngles[YAW]; +ADDRFP4 0 +INDIRP4 +CNSTI4 664 +ADDP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 5339 +;5339: legsAngles[YAW] = cent->pe.legs.yawAngle; +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 664 +ADDP4 +INDIRF4 +ASGNF4 +line 5342 +;5340: +;5341: // pain twitch +;5342: CG_AddPainTwitch( cent, torsoAngles ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_AddPainTwitch +CALLV +pop +line 5344 +;5343: +;5344: legsAngles[ROLL] = 0; +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 0 +ASGNF4 +line 5345 +;5345: torsoAngles[ROLL] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 5350 +;5346: +;5347: //VectorCopy(legsAngles, cent->turAngles); +;5348: //turAngles is used as a smoothing storage vector for g2animents. +;5349: +;5350: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2803 +line 5351 +;5351: { +line 5352 +;5352: legsAngles[ROLL] = 0; +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 0 +ASGNF4 +line 5353 +;5353: legsAngles[PITCH] = 0; +ADDRFP4 8 +INDIRP4 +CNSTF4 0 +ASGNF4 +line 5354 +;5354: } +LABELV $2803 +line 5357 +;5355: +;5356: // pull the angles back out of the hierarchial chain +;5357: AnglesSubtract( headAngles, torsoAngles, headAngles ); +ADDRLP4 12 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRGP4 AnglesSubtract +CALLV +pop +line 5358 +;5358: AnglesSubtract( torsoAngles, legsAngles, torsoAngles ); +ADDRLP4 0 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 AnglesSubtract +CALLV +pop +line 5359 +;5359: AnglesToAxis( legsAngles, legs ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 5362 +;5360: // we assume that model 0 is the player model. +;5361: +;5362: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2805 +line 5363 +;5363: { +line 5366 +;5364: vec3_t flatYaw; +;5365: +;5366: flatYaw[YAW] = 0;//cent->lerpAngles[YAW]; +ADDRLP4 188+4 +CNSTF4 0 +ASGNF4 +line 5367 +;5367: flatYaw[ROLL] = 0; +ADDRLP4 188+8 +CNSTF4 0 +ASGNF4 +line 5368 +;5368: flatYaw[PITCH] = 0; +ADDRLP4 188 +CNSTF4 0 +ASGNF4 +line 5369 +;5369: CG_G2SetBoneAngles(cent->ghoul2, 0, "pelvis", flatYaw, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 200 +CNSTI4 0 +ASGNI4 +ADDRLP4 200 +INDIRI4 +ARGI4 +ADDRGP4 $295 +ARGP4 +ADDRLP4 188 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 200 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 5371 +;5370: +;5371: CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", torsoAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 204 +CNSTI4 0 +ASGNI4 +ADDRLP4 204 +INDIRI4 +ARGI4 +ADDRGP4 $1163 +ARGP4 +ADDRLP4 0 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 204 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 5373 +;5372: +;5373: return; +ADDRGP4 $2732 +JUMPV +LABELV $2805 +line 5376 +;5374: } +;5375: +;5376: VectorCopy( cent->lerpAngles, viewAngles ); +ADDRLP4 96 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 5377 +;5377: viewAngles[YAW] = viewAngles[ROLL] = 0; +ADDRLP4 188 +CNSTF4 0 +ASGNF4 +ADDRLP4 96+8 +ADDRLP4 188 +INDIRF4 +ASGNF4 +ADDRLP4 96+4 +ADDRLP4 188 +INDIRF4 +ASGNF4 +line 5378 +;5378: viewAngles[PITCH] *= 0.5; +ADDRLP4 96 +CNSTF4 1056964608 +ADDRLP4 96 +INDIRF4 +MULF4 +ASGNF4 +line 5380 +;5379: +;5380: VectorCopy( cent->lerpAngles, angles ); +ADDRLP4 116 +ADDRFP4 0 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 5381 +;5381: angles[PITCH] = 0; +ADDRLP4 116 +CNSTF4 0 +ASGNF4 +line 5383 +;5382: +;5383: CG_G2AnimEntSpineAngles(cent, viewAngles, angles, thoracicAngles, ulAngles, llAngles); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 96 +ARGP4 +ADDRLP4 116 +ARGP4 +ADDRLP4 60 +ARGP4 +ADDRLP4 72 +ARGP4 +ADDRLP4 84 +ARGP4 +ADDRGP4 CG_G2AnimEntSpineAngles +CALLV +pop +line 5385 +;5384: +;5385: ulAngles[YAW] += torsoAngles[YAW]*0.3; +ADDRLP4 72+4 +ADDRLP4 72+4 +INDIRF4 +CNSTF4 1050253722 +ADDRLP4 0+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 5386 +;5386: llAngles[YAW] += torsoAngles[YAW]*0.3; +ADDRLP4 84+4 +ADDRLP4 84+4 +INDIRF4 +CNSTF4 1050253722 +ADDRLP4 0+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 5387 +;5387: thoracicAngles[YAW] += torsoAngles[YAW]*0.4; +ADDRLP4 60+4 +ADDRLP4 60+4 +INDIRF4 +CNSTF4 1053609165 +ADDRLP4 0+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 5389 +;5388: +;5389: ulAngles[PITCH] = torsoAngles[PITCH]*0.3; +ADDRLP4 72 +CNSTF4 1050253722 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 5390 +;5390: llAngles[PITCH] = torsoAngles[PITCH]*0.3; +ADDRLP4 84 +CNSTF4 1050253722 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 5391 +;5391: thoracicAngles[PITCH] = torsoAngles[PITCH]*0.4; +ADDRLP4 60 +CNSTF4 1053609165 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 5393 +;5392: +;5393: ulAngles[ROLL] += torsoAngles[ROLL]*0.3; +ADDRLP4 72+8 +ADDRLP4 72+8 +INDIRF4 +CNSTF4 1050253722 +ADDRLP4 0+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 5394 +;5394: llAngles[ROLL] += torsoAngles[ROLL]*0.3; +ADDRLP4 84+8 +ADDRLP4 84+8 +INDIRF4 +CNSTF4 1050253722 +ADDRLP4 0+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 5395 +;5395: thoracicAngles[ROLL] += torsoAngles[ROLL]*0.4; +ADDRLP4 60+8 +ADDRLP4 60+8 +INDIRF4 +CNSTF4 1053609165 +ADDRLP4 0+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 5397 +;5396: +;5397: CG_G2SetBoneAngles(cent->ghoul2, 0, "upper_lumbar", ulAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 192 +CNSTI4 0 +ASGNI4 +ADDRLP4 192 +INDIRI4 +ARGI4 +ADDRGP4 $303 +ARGP4 +ADDRLP4 72 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 192 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 5398 +;5398: CG_G2SetBoneAngles(cent->ghoul2, 0, "lower_lumbar", llAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 196 +CNSTI4 0 +ASGNI4 +ADDRLP4 196 +INDIRI4 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 84 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 196 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 5399 +;5399: CG_G2SetBoneAngles(cent->ghoul2, 0, "thoracic", thoracicAngles, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 200 +CNSTI4 0 +ASGNI4 +ADDRLP4 200 +INDIRI4 +ARGI4 +ADDRGP4 $1163 +ARGP4 +ADDRLP4 60 +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 200 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 5400 +;5400: CG_G2SetBoneAngles(cent->ghoul2, 0, "cervical", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, cgs.gameModels, 0, cg.time); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 204 +CNSTI4 0 +ASGNI4 +ADDRLP4 204 +INDIRI4 +ARGI4 +ADDRGP4 $1195 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 204 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_G2SetBoneAngles +CALLV +pop +line 5401 +;5401:} +LABELV $2732 +endproc CG_G2AnimEntAngles 228 44 +export CG_DrawNoForceSphere +proc CG_DrawNoForceSphere 217 12 +line 5406 +;5402: +;5403:#define SMOOTH_G2ANIM_LERPORIGIN +;5404: +;5405:void CG_DrawNoForceSphere(centity_t *cent, vec3_t origin, float scale, int shader) +;5406:{ +line 5410 +;5407: refEntity_t ent; +;5408: +;5409: // Don't draw the shield when the player is dead. +;5410: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $2836 +line 5411 +;5411: { +line 5412 +;5412: return; +ADDRGP4 $2835 +JUMPV +LABELV $2836 +line 5415 +;5413: } +;5414: +;5415: memset( &ent, 0, sizeof( ent ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 5417 +;5416: +;5417: VectorCopy( origin, ent.origin ); +ADDRLP4 0+52 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 12 +line 5418 +;5418: ent.origin[2] += 9.0; +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +CNSTF4 1091567616 +ADDF4 +ASGNF4 +line 5420 +;5419: +;5420: VectorSubtract(cg.refdef.vieworg, ent.origin, ent.axis[0]); +ADDRLP4 0+12 +ADDRGP4 cg+3616+24 +INDIRF4 +ADDRLP4 0+52 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+12+4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +ADDRLP4 0+52+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+12+8 +ADDRGP4 cg+3616+24+8 +INDIRF4 +ADDRLP4 0+52+8 +INDIRF4 +SUBF4 +ASGNF4 +line 5421 +;5421: if (VectorNormalize(ent.axis[0]) <= 0.1f) +ADDRLP4 0+12 +ARGP4 +ADDRLP4 212 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 212 +INDIRF4 +CNSTF4 1036831949 +GTF4 $2859 +line 5422 +;5422: { // Entity is right on vieworg. quit. +line 5423 +;5423: return; +ADDRGP4 $2835 +JUMPV +LABELV $2859 +line 5426 +;5424: } +;5425: +;5426: VectorCopy(cg.refdef.viewaxis[2], ent.axis[2]); +ADDRLP4 0+12+24 +ADDRGP4 cg+3616+36+24 +INDIRB +ASGNB 12 +line 5427 +;5427: CrossProduct(ent.axis[0], ent.axis[2], ent.axis[1]); +ADDRLP4 0+12 +ARGP4 +ADDRLP4 0+12+24 +ARGP4 +ADDRLP4 0+12+12 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 5429 +;5428: +;5429: VectorScale(ent.axis[0], scale, ent.axis[0]); +ADDRLP4 0+12 +ADDRLP4 0+12 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+4 +ADDRLP4 0+12+4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+8 +ADDRLP4 0+12+8 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +line 5430 +;5430: VectorScale(ent.axis[1], scale, ent.axis[1]); +ADDRLP4 0+12+12 +ADDRLP4 0+12+12 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+12+4 +ADDRLP4 0+12+12+4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+12+8 +ADDRLP4 0+12+12+8 +INDIRF4 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +line 5431 +;5431: VectorScale(ent.axis[2], -scale, ent.axis[2]); +ADDRLP4 0+12+24 +ADDRLP4 0+12+24 +INDIRF4 +ADDRFP4 8 +INDIRF4 +NEGF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+24+4 +ADDRLP4 0+12+24+4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +NEGF4 +MULF4 +ASGNF4 +ADDRLP4 0+12+24+8 +ADDRLP4 0+12+24+8 +INDIRF4 +ADDRFP4 8 +INDIRF4 +NEGF4 +MULF4 +ASGNF4 +line 5433 +;5432: +;5433: ent.shaderRGBA[3] = (cent->currentState.genericenemyindex - cg.time)/8; +ADDRLP4 0+80+3 +ADDRFP4 0 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CNSTI4 8 +DIVI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 5434 +;5434: ent.renderfx |= RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 5435 +;5435: if (ent.shaderRGBA[3] > 200) +ADDRLP4 0+80+3 +INDIRU1 +CVUI4 1 +CNSTI4 200 +LEI4 $2918 +line 5436 +;5436: { +line 5437 +;5437: ent.shaderRGBA[3] = 200; +ADDRLP4 0+80+3 +CNSTU1 200 +ASGNU1 +line 5438 +;5438: } +LABELV $2918 +line 5439 +;5439: if (ent.shaderRGBA[3] < 1) +ADDRLP4 0+80+3 +INDIRU1 +CVUI4 1 +CNSTI4 1 +GEI4 $2924 +line 5440 +;5440: { +line 5441 +;5441: ent.shaderRGBA[3] = 1; +ADDRLP4 0+80+3 +CNSTU1 1 +ASGNU1 +line 5442 +;5442: } +LABELV $2924 +line 5444 +;5443: +;5444: ent.shaderRGBA[2] = 0; +ADDRLP4 0+80+2 +CNSTU1 0 +ASGNU1 +line 5445 +;5445: ent.shaderRGBA[0] = ent.shaderRGBA[1] = ent.shaderRGBA[3]; +ADDRLP4 216 +ADDRLP4 0+80+3 +INDIRU1 +ASGNU1 +ADDRLP4 0+80+1 +ADDRLP4 216 +INDIRU1 +ASGNU1 +ADDRLP4 0+80 +ADDRLP4 216 +INDIRU1 +ASGNU1 +line 5447 +;5446: +;5447: ent.hModel = cgs.media.halfShieldModel; +ADDRLP4 0+8 +ADDRGP4 cgs+70296+900 +INDIRI4 +ASGNI4 +line 5448 +;5448: ent.customShader = shader; +ADDRLP4 0+76 +ADDRFP4 12 +INDIRI4 +ASGNI4 +line 5450 +;5449: +;5450: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 5451 +;5451:} +LABELV $2835 +endproc CG_DrawNoForceSphere 217 12 +export CG_G2Animated +proc CG_G2Animated 612 36 +line 5454 +;5452: +;5453:void CG_G2Animated( centity_t *cent ) +;5454:{ +line 5457 +;5455: refEntity_t legs; +;5456: refEntity_t torso; +;5457: int renderfx = 0; +ADDRLP4 444 +CNSTI4 0 +ASGNI4 +line 5458 +;5458: qboolean shadow = qfalse; +ADDRLP4 448 +CNSTI4 0 +ASGNI4 +line 5459 +;5459: float shadowPlane = 0; +ADDRLP4 452 +CNSTF4 0 +ASGNF4 +line 5460 +;5460: qboolean dead = qfalse; +ADDRLP4 456 +CNSTI4 0 +ASGNI4 +line 5464 +;5461: vec3_t rootAngles; +;5462:#ifdef SMOOTH_G2ANIM_LERPORIGIN +;5463: vec3_t posDif; +;5464: float smoothFactor = 0.4f; +ADDRLP4 228 +CNSTF4 1053609165 +ASGNF4 +line 5465 +;5465: int k = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 5468 +;5466:#endif +;5467: +;5468: cent->ghoul2 = cg_entities[cent->currentState.number].ghoul2; +ADDRLP4 472 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 472 +INDIRP4 +CNSTI4 952 +ADDP4 +CNSTI4 1920 +ADDRLP4 472 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +ASGNP4 +line 5470 +;5469: +;5470: if (!cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2943 +line 5471 +;5471: { //Initialize this g2 anim ent, then return (will start rendering next frame) +line 5472 +;5472: const char *modelName = CG_ConfigString( CS_MODELS+cent->currentState.modelindex ); +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 32 +ADDI4 +ARGI4 +ADDRLP4 480 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 476 +ADDRLP4 480 +INDIRP4 +ASGNP4 +line 5474 +;5473: +;5474: if (modelName && modelName[0]) +ADDRLP4 484 +ADDRLP4 476 +INDIRP4 +ASGNP4 +ADDRLP4 484 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2941 +ADDRLP4 484 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $2941 +line 5475 +;5475: { +line 5476 +;5476: trap_G2API_InitGhoul2Model(¢->ghoul2, modelName, 0, 0, 0, 0, 0); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRLP4 476 +INDIRP4 +ARGP4 +ADDRLP4 488 +CNSTI4 0 +ASGNI4 +ADDRLP4 488 +INDIRI4 +ARGI4 +ADDRLP4 488 +INDIRI4 +ARGI4 +ADDRLP4 488 +INDIRI4 +ARGI4 +ADDRLP4 488 +INDIRI4 +ARGI4 +ADDRLP4 488 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_InitGhoul2Model +CALLI4 +pop +line 5477 +;5477: if (cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2941 +line 5478 +;5478: { +line 5479 +;5479: trap_G2API_AddBolt(cent->ghoul2, 0, "*r_hand"); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $296 +ARGP4 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +pop +line 5480 +;5480: trap_G2API_AddBolt(cent->ghoul2, 0, "*l_hand"); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $309 +ARGP4 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +pop +line 5481 +;5481: trap_G2API_AddBolt(cent->ghoul2, 0, "*head_top"); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $310 +ARGP4 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +pop +line 5482 +;5482: trap_G2API_AddBolt(cent->ghoul2, 0, "Motion"); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $311 +ARGP4 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +pop +line 5483 +;5483: } +line 5484 +;5484: } +line 5485 +;5485: return; +ADDRGP4 $2941 +JUMPV +LABELV $2943 +line 5488 +;5486: } +;5487: +;5488: if (cent->currentState.weapon && +ADDRLP4 476 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 476 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2949 +ADDRLP4 476 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 480 +ADDRGP4 trap_G2API_HasGhoul2ModelOnIndex +CALLI4 +ASGNI4 +ADDRLP4 484 +CNSTI4 0 +ASGNI4 +ADDRLP4 480 +INDIRI4 +ADDRLP4 484 +INDIRI4 +NEI4 $2949 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 484 +INDIRI4 +NEI4 $2949 +line 5491 +;5489: !trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1) && +;5490: !(cent->currentState.eFlags & EF_DEAD)) +;5491: { //if the server says we have a weapon and we haven't copied one onto ourselves yet, then do so. +line 5492 +;5492: trap_G2API_CopySpecificGhoul2Model(g2WeaponInstances[cent->currentState.weapon], 0, cent->ghoul2, 1); +ADDRLP4 488 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 488 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 g2WeaponInstances +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 488 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_G2API_CopySpecificGhoul2Model +CALLV +pop +line 5493 +;5493: } +LABELV $2949 +line 5495 +;5494: +;5495: if (cent->torsoBolt && !(cent->currentState.eFlags & EF_DEAD)) +ADDRLP4 488 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 492 +CNSTI4 0 +ASGNI4 +ADDRLP4 488 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +ADDRLP4 492 +INDIRI4 +EQI4 $2951 +ADDRLP4 488 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 492 +INDIRI4 +NEI4 $2951 +line 5496 +;5496: { //he's alive and has a limb missing still, reattach it and reset the weapon +line 5497 +;5497: CG_ReattachLimb(cent); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_ReattachLimb +CALLV +pop +line 5498 +;5498: } +LABELV $2951 +line 5501 +;5499: +;5500:#ifdef SMOOTH_G2ANIM_LERPORIGIN +;5501: if (DistanceSquared(cent->turAngles,cent->lerpOrigin)>12000.0f) +ADDRLP4 496 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 496 +INDIRP4 +CNSTI4 1016 +ADDP4 +ARGP4 +ADDRLP4 496 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 500 +ADDRGP4 DistanceSquared +CALLF4 +ASGNF4 +ADDRLP4 500 +INDIRF4 +CNSTF4 1178304512 +LEF4 $2953 +line 5502 +;5502: { +line 5503 +;5503: VectorCopy(cent->lerpOrigin, cent->turAngles); +ADDRLP4 504 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 504 +INDIRP4 +CNSTI4 1016 +ADDP4 +ADDRLP4 504 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 5504 +;5504: } +LABELV $2953 +line 5506 +;5505: +;5506: VectorSubtract(cent->lerpOrigin, cent->turAngles, posDif); +ADDRLP4 504 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 216 +ADDRLP4 504 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +ADDRLP4 504 +INDIRP4 +CNSTI4 1016 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 216+4 +ADDRLP4 504 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +ADDRLP4 504 +INDIRP4 +CNSTI4 1020 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 508 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 216+8 +ADDRLP4 508 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +ADDRLP4 508 +INDIRP4 +CNSTI4 1024 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 5508 +;5507: +;5508: for (k=0;k<3;k++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $2957 +line 5509 +;5509: { +line 5510 +;5510: cent->turAngles[k]=(cent->turAngles[k]+posDif[k]*smoothFactor); +ADDRLP4 512 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 516 +ADDRLP4 512 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1016 +ADDP4 +ADDP4 +ASGNP4 +ADDRLP4 516 +INDIRP4 +ADDRLP4 516 +INDIRP4 +INDIRF4 +ADDRLP4 512 +INDIRI4 +ADDRLP4 216 +ADDP4 +INDIRF4 +ADDRLP4 228 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 5511 +;5511: cent->lerpOrigin[k]=cent->turAngles[k]; +ADDRLP4 520 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 524 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 520 +INDIRI4 +ADDRLP4 524 +INDIRP4 +CNSTI4 928 +ADDP4 +ADDP4 +ADDRLP4 520 +INDIRI4 +ADDRLP4 524 +INDIRP4 +CNSTI4 1016 +ADDP4 +ADDP4 +INDIRF4 +ASGNF4 +line 5512 +;5512: } +LABELV $2958 +line 5508 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $2957 +line 5515 +;5513:#endif +;5514: +;5515: if (cent->currentState.weapon) +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2961 +line 5516 +;5516: { +line 5517 +;5517: weaponInfo_t *weapon = NULL; +ADDRLP4 512 +CNSTP4 0 +ASGNP4 +line 5519 +;5518: +;5519: CG_RegisterWeapon(cent->currentState.weapon); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_RegisterWeapon +CALLV +pop +line 5521 +;5520: +;5521: weapon = &cg_weapons[cent->currentState.weapon]; +ADDRLP4 512 +CNSTI4 208 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons +ADDP4 +ASGNP4 +line 5522 +;5522: if (weapon) +ADDRLP4 512 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2963 +line 5523 +;5523: { +line 5524 +;5524: if ( cg.time - cent->muzzleFlashTime <= MUZZLE_FLASH_TIME + 10 ) +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 600 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 30 +GTI4 $2965 +line 5525 +;5525: { // Handle muzzle flashes +line 5529 +;5526: vec3_t flashorigin, flashdir; +;5527: mdxaBone_t boltMatrix; +;5528: +;5529: if (trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 588 +ADDRGP4 trap_G2API_HasGhoul2ModelOnIndex +CALLI4 +ASGNI4 +ADDRLP4 588 +INDIRI4 +CNSTI4 0 +EQI4 $2968 +line 5530 +;5530: { +line 5532 +;5531: vec3_t boltAngle; +;5532: VectorClear(boltAngle); +ADDRLP4 604 +CNSTF4 0 +ASGNF4 +ADDRLP4 592+8 +ADDRLP4 604 +INDIRF4 +ASGNF4 +ADDRLP4 592+4 +ADDRLP4 604 +INDIRF4 +ASGNF4 +ADDRLP4 592 +ADDRLP4 604 +INDIRF4 +ASGNF4 +line 5533 +;5533: boltAngle[YAW] = cent->lerpAngles[YAW]; +ADDRLP4 592+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 944 +ADDP4 +INDIRF4 +ASGNF4 +line 5534 +;5534: trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, boltAngle, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 608 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 608 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 516 +ARGP4 +ADDRLP4 592 +ARGP4 +ADDRLP4 608 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 608 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 5536 +;5535: +;5536: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); +ADDRLP4 516 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 564 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 5537 +;5537: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); +ADDRLP4 516 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 576 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 5539 +;5538: +;5539: if ( cent->currentState.eFlags & EF_ALT_FIRING ) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $2975 +line 5540 +;5540: { // Check the alt firing first. +line 5541 +;5541: if (weapon->altMuzzleEffect) +ADDRLP4 512 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2976 +line 5542 +;5542: { +line 5543 +;5543: trap_FX_PlayEffectID(weapon->altMuzzleEffect, flashorigin, flashdir); +ADDRLP4 512 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 564 +ARGP4 +ADDRLP4 576 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 5544 +;5544: } +line 5545 +;5545: } +ADDRGP4 $2976 +JUMPV +LABELV $2975 +line 5547 +;5546: else +;5547: { // Regular firing +line 5548 +;5548: if (weapon->muzzleEffect) +ADDRLP4 512 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2979 +line 5549 +;5549: { +line 5550 +;5550: trap_FX_PlayEffectID(weapon->muzzleEffect, flashorigin, flashdir); +ADDRLP4 512 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 564 +ARGP4 +ADDRLP4 576 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 5551 +;5551: } +LABELV $2979 +line 5552 +;5552: } +LABELV $2976 +line 5553 +;5553: } +LABELV $2968 +line 5554 +;5554: } +LABELV $2965 +line 5555 +;5555: } +LABELV $2963 +line 5556 +;5556: } +LABELV $2961 +line 5558 +;5557: +;5558: memset (&legs, 0, sizeof(legs)); +ADDRLP4 4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 5560 +;5559: +;5560: CG_SetGhoul2Info(&legs, cent); +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_SetGhoul2Info +CALLV +pop +line 5562 +;5561: +;5562: VectorSet(legs.modelScale, 1,1,1); +ADDRLP4 4+196 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 4+196+4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 4+196+8 +CNSTF4 1065353216 +ASGNF4 +line 5563 +;5563: legs.radius = cent->currentState.g2radius; +ADDRLP4 4+92 +ADDRFP4 0 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 5564 +;5564: VectorClear(legs.angles); +ADDRLP4 512 +CNSTF4 0 +ASGNF4 +ADDRLP4 4+184+8 +ADDRLP4 512 +INDIRF4 +ASGNF4 +ADDRLP4 4+184+4 +ADDRLP4 512 +INDIRF4 +ASGNF4 +ADDRLP4 4+184 +ADDRLP4 512 +INDIRF4 +ASGNF4 +line 5567 +;5565: +;5566: // add the shadow +;5567: shadow = CG_PlayerShadow( cent, &shadowPlane ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 452 +ARGP4 +ADDRLP4 516 +ADDRGP4 CG_PlayerShadow +CALLI4 +ASGNI4 +ADDRLP4 448 +ADDRLP4 516 +INDIRI4 +ASGNI4 +line 5569 +;5568: +;5569: if ( cg_shadows.integer == 3 && shadow ) { +ADDRGP4 cg_shadows+12 +INDIRI4 +CNSTI4 3 +NEI4 $2992 +ADDRLP4 448 +INDIRI4 +CNSTI4 0 +EQI4 $2992 +line 5570 +;5570: renderfx |= RF_SHADOW_PLANE; +ADDRLP4 444 +ADDRLP4 444 +INDIRI4 +CNSTI4 256 +BORI4 +ASGNI4 +line 5571 +;5571: } +LABELV $2992 +line 5572 +;5572: renderfx |= RF_LIGHTING_ORIGIN; // use the same origin for all +ADDRLP4 444 +ADDRLP4 444 +INDIRI4 +CNSTI4 128 +BORI4 +ASGNI4 +line 5574 +;5573: +;5574: VectorCopy( cent->lerpOrigin, legs.origin ); +ADDRLP4 4+52 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 5575 +;5575: VectorCopy( cent->lerpOrigin, legs.lightingOrigin ); +ADDRLP4 4+108 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 5576 +;5576: legs.shadowPlane = shadowPlane; +ADDRLP4 4+120 +ADDRLP4 452 +INDIRF4 +ASGNF4 +line 5577 +;5577: legs.renderfx = renderfx; +ADDRLP4 4+4 +ADDRLP4 444 +INDIRI4 +ASGNI4 +line 5578 +;5578: VectorCopy (legs.origin, legs.oldorigin); // don't positionally lerp at all +ADDRLP4 4+64 +ADDRLP4 4+52 +INDIRB +ASGNB 12 +line 5580 +;5579: +;5580: CG_G2AnimEntAngles( cent, legs.axis, rootAngles ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4+12 +ARGP4 +ADDRLP4 460 +ARGP4 +ADDRGP4 CG_G2AnimEntAngles +CALLV +pop +line 5582 +;5581: +;5582: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $3002 +line 5583 +;5583: { +line 5584 +;5584: dead = qtrue; +ADDRLP4 456 +CNSTI4 1 +ASGNI4 +line 5588 +;5585: //rww - since our angles are fixed when we're dead this shouldn't be an issue anyway +;5586: //we need to render the dying/dead player because we are now spawning the body on respawn instead of death +;5587: //return; +;5588: } +LABELV $3002 +line 5590 +;5589: +;5590: ScaleModelAxis(&legs); +ADDRLP4 4 +ARGP4 +ADDRGP4 ScaleModelAxis +CALLV +pop +line 5592 +;5591: +;5592: memset( &torso, 0, sizeof(torso) ); +ADDRLP4 232 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 5594 +;5593: +;5594: VectorCopy(cent->turAngles, cg_entities[cent->currentState.number].turAngles); +ADDRLP4 520 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 520 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1016 +ADDP4 +ADDRLP4 520 +INDIRP4 +CNSTI4 1016 +ADDP4 +INDIRB +ASGNB 12 +line 5595 +;5595: VectorCopy(legs.origin, cg_entities[cent->currentState.number].lerpOrigin); +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+928 +ADDP4 +ADDRLP4 4+52 +INDIRB +ASGNB 12 +line 5598 +;5596: +;5597: // get the animation state (after rotation, to allow feet shuffle) +;5598: CG_G2EntAnimation( cent, &legs.oldframe, &legs.frame, &legs.backlerp, +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4+124 +ARGP4 +ADDRLP4 4+104 +ARGP4 +ADDRLP4 4+128 +ARGP4 +ADDRLP4 232+124 +ARGP4 +ADDRLP4 232+104 +ARGP4 +ADDRLP4 232+128 +ARGP4 +ADDRGP4 CG_G2EntAnimation +CALLV +pop +line 5601 +;5599: &torso.oldframe, &torso.frame, &torso.backlerp ); +;5600: +;5601: trap_R_AddRefEntityToScene(&legs); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 5606 +;5602: +;5603: +;5604: // Electricity +;5605: //------------------------------------------------ +;5606: if ( cent->currentState.emplacedOwner > cg.time ) +ADDRFP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $3013 +line 5607 +;5607: { +line 5608 +;5608: int dif = cent->currentState.emplacedOwner - cg.time; +ADDRLP4 524 +ADDRFP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +ASGNI4 +line 5610 +;5609: +;5610: if ( dif > 0 && random() > 0.4f ) +ADDRLP4 524 +INDIRI4 +CNSTI4 0 +LEI4 $3017 +ADDRLP4 528 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 528 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1053609165 +LEF4 $3017 +line 5611 +;5611: { +line 5613 +;5612: // fade out over the last 500 ms +;5613: int brightness = 255; +ADDRLP4 532 +CNSTI4 255 +ASGNI4 +line 5615 +;5614: +;5615: if ( dif < 500 ) +ADDRLP4 524 +INDIRI4 +CNSTI4 500 +GEI4 $3019 +line 5616 +;5616: { +line 5617 +;5617: brightness = floor((dif - 500.0f) / 500.0f * 255.0f ); +ADDRLP4 536 +CNSTF4 1140457472 +ASGNF4 +CNSTF4 1132396544 +ADDRLP4 524 +INDIRI4 +CVIF4 4 +ADDRLP4 536 +INDIRF4 +SUBF4 +ADDRLP4 536 +INDIRF4 +DIVF4 +MULF4 +ARGF4 +ADDRLP4 540 +ADDRGP4 floor +CALLF4 +ASGNF4 +ADDRLP4 532 +ADDRLP4 540 +INDIRF4 +CVFI4 4 +ASGNI4 +line 5618 +;5618: } +LABELV $3019 +line 5620 +;5619: +;5620: legs.renderfx &= ~RF_FORCE_ENT_ALPHA; +ADDRLP4 4+4 +ADDRLP4 4+4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 5621 +;5621: legs.renderfx &= ~RF_MINLIGHT; +ADDRLP4 4+4 +ADDRLP4 4+4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 5623 +;5622: +;5623: legs.renderfx |= RF_RGB_TINT; +ADDRLP4 4+4 +ADDRLP4 4+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 5624 +;5624: legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = brightness; +ADDRLP4 536 +ADDRLP4 532 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +ADDRLP4 4+80+2 +ADDRLP4 536 +INDIRU1 +ASGNU1 +ADDRLP4 4+80+1 +ADDRLP4 536 +INDIRU1 +ASGNU1 +ADDRLP4 4+80 +ADDRLP4 536 +INDIRU1 +ASGNU1 +line 5625 +;5625: legs.shaderRGBA[3] = 255; +ADDRLP4 4+80+3 +CNSTU1 255 +ASGNU1 +line 5627 +;5626: +;5627: if ( rand() & 1 ) +ADDRLP4 540 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 540 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $3031 +line 5628 +;5628: { +line 5629 +;5629: legs.customShader = cgs.media.electricBodyShader; +ADDRLP4 4+76 +ADDRGP4 cgs+70296+396 +INDIRI4 +ASGNI4 +line 5630 +;5630: } +ADDRGP4 $3032 +JUMPV +LABELV $3031 +line 5632 +;5631: else +;5632: { +line 5633 +;5633: legs.customShader = cgs.media.electricBody2Shader; +ADDRLP4 4+76 +ADDRGP4 cgs+70296+400 +INDIRI4 +ASGNI4 +line 5634 +;5634: } +LABELV $3032 +line 5636 +;5635: +;5636: trap_R_AddRefEntityToScene( &legs ); +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 5638 +;5637: +;5638: if ( random() > 0.9f ) +ADDRLP4 544 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 544 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1063675494 +LEF4 $3039 +line 5639 +;5639: trap_S_StartSound ( NULL, cent->currentState.number, CHAN_AUTO, cgs.media.crackleSound ); +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+676 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +LABELV $3039 +line 5640 +;5640: } +LABELV $3017 +line 5641 +;5641: } +LABELV $3013 +line 5643 +;5642: +;5643: if (cent->currentState.genericenemyindex > cg.time) +ADDRFP4 0 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $3043 +line 5644 +;5644: { +line 5645 +;5645: CG_DrawNoForceSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysalimariShader ); +ADDRLP4 524 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 524 +INDIRP4 +ARGP4 +ADDRLP4 524 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +CNSTF4 1068708659 +ARGF4 +ADDRGP4 cgs+70296+580 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawNoForceSphere +CALLV +pop +line 5646 +;5646: } +LABELV $3043 +line 5647 +;5647:} +LABELV $2941 +endproc CG_G2Animated 612 36 +data +export cgFPLSState +align 4 +LABELV cgFPLSState +byte 4 0 +export CG_ForceFPLSPlayerModel +code +proc CG_ForceFPLSPlayerModel 84 44 +line 5653 +;5648://rww - here ends the majority of my g2animent stuff. +;5649: +;5650:int cgFPLSState = 0; +;5651: +;5652:void CG_ForceFPLSPlayerModel(centity_t *cent, clientInfo_t *ci) +;5653:{ +line 5654 +;5654: int clientNum = cent->currentState.number; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +line 5657 +;5655: animation_t *anim; +;5656: +;5657: if (cg_fpls.integer && !cg.renderingThirdPerson) +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_fpls+12 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $3049 +ADDRGP4 cg+88 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $3049 +line 5658 +;5658: { +line 5661 +;5659: int skinHandle; +;5660: +;5661: skinHandle = trap_R_RegisterSkin("models/players/kyle/model_fpls2.skin"); +ADDRGP4 $3053 +ARGP4 +ADDRLP4 16 +ADDRGP4 trap_R_RegisterSkin +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 5663 +;5662: +;5663: trap_G2API_CleanGhoul2Models(&(ci->ghoul2Model)); +ADDRFP4 4 +INDIRP4 +CNSTI4 504 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 5665 +;5664: +;5665: ci->torsoSkin = skinHandle; +ADDRFP4 4 +INDIRP4 +CNSTI4 496 +ADDP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 5666 +;5666: trap_G2API_InitGhoul2Model(&ci->ghoul2Model, "models/players/kyle/model.glm", 0, ci->torsoSkin, 0, 0, 0); +ADDRLP4 20 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 504 +ADDP4 +ARGP4 +ADDRGP4 $3054 +ARGP4 +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 496 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_InitGhoul2Model +CALLI4 +pop +line 5668 +;5667: +;5668: ci->bolt_rhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*r_hand"); +ADDRLP4 28 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $296 +ARGP4 +ADDRLP4 32 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRP4 +CNSTI4 512 +ADDP4 +ADDRLP4 32 +INDIRI4 +ASGNI4 +line 5670 +;5669: +;5670: trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", 0, 12, BONE_ANIM_OVERRIDE_LOOP, 1.0f, cg.time, -1, -1); +ADDRFP4 4 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRLP4 36 +INDIRI4 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 36 +INDIRI4 +ARGI4 +CNSTI4 12 +ARGI4 +CNSTI4 16 +ARGI4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 3212836864 +ARGF4 +CNSTI4 -1 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 5671 +;5671: trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "upper_lumbar", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, cg.time); +ADDRFP4 4 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 40 +CNSTI4 0 +ASGNI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRGP4 $303 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +CNSTI4 2 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +CNSTP4 0 +ARGP4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 5672 +;5672: trap_G2API_SetBoneAngles(ci->ghoul2Model, 0, "cranium", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, NULL, 0, cg.time); +ADDRFP4 4 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRGP4 $307 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 48 +CNSTI4 2 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRLP4 48 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTP4 0 +ARGP4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 5674 +;5673: +;5674: ci->bolt_lhand = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*l_hand"); +ADDRLP4 52 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $309 +ARGP4 +ADDRLP4 56 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRP4 +CNSTI4 516 +ADDP4 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 5675 +;5675: ci->bolt_head = trap_G2API_AddBolt(ci->ghoul2Model, 0, "*head_top"); +ADDRLP4 60 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $310 +ARGP4 +ADDRLP4 64 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 520 +ADDP4 +ADDRLP4 64 +INDIRI4 +ASGNI4 +line 5677 +;5676: +;5677: ci->bolt_motion = trap_G2API_AddBolt(ci->ghoul2Model, 0, "Motion"); +ADDRLP4 68 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $311 +ARGP4 +ADDRLP4 72 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRP4 +CNSTI4 524 +ADDP4 +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 5680 +;5678: +;5679: //We need a lower lumbar bolt for footsteps +;5680: ci->bolt_llumbar = trap_G2API_AddBolt(ci->ghoul2Model, 0, "lower_lumbar"); +ADDRLP4 76 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 80 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 76 +INDIRP4 +CNSTI4 528 +ADDP4 +ADDRLP4 80 +INDIRI4 +ASGNI4 +line 5681 +;5681: } +ADDRGP4 $3050 +JUMPV +LABELV $3049 +line 5683 +;5682: else +;5683: { +line 5684 +;5684: CG_RegisterClientModelname(ci, ci->modelName, ci->skinName, ci->teamName, cent->currentState.number); +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 160 +ADDP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 224 +ADDP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 416 +ADDP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_RegisterClientModelname +CALLI4 +pop +line 5685 +;5685: } +LABELV $3050 +line 5687 +;5686: +;5687: anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.legsAnim & ~ANIM_TOGGLEBIT) ]; +ADDRLP4 0 +CNSTI4 28 +CNSTI4 1920 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ASGNP4 +line 5689 +;5688: +;5689: if (anim) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3059 +line 5690 +;5690: { +line 5691 +;5691: int flags = BONE_ANIM_OVERRIDE_FREEZE; +ADDRLP4 12 +CNSTI4 72 +ASGNI4 +line 5692 +;5692: int firstFrame = anim->firstFrame; +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +line 5693 +;5693: int setFrame = -1; +ADDRLP4 16 +CNSTI4 -1 +ASGNI4 +line 5694 +;5694: float animSpeed = 50.0f / anim->frameLerp; +ADDRLP4 24 +CNSTF4 1112014848 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 5696 +;5695: +;5696: if (anim->loopFrames != -1) +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $3061 +line 5697 +;5697: { +line 5698 +;5698: flags |= BONE_ANIM_OVERRIDE_LOOP; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 16 +BORI4 +ASGNI4 +line 5699 +;5699: } +LABELV $3061 +line 5701 +;5700: +;5701: if (cent->pe.legs.frame >= anim->firstFrame && cent->pe.legs.frame <= (anim->firstFrame + anim->numFrames)) +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 36 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 36 +INDIRI4 +LTI4 $3063 +ADDRLP4 28 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +GTI4 $3063 +line 5702 +;5702: { +line 5703 +;5703: setFrame = cent->pe.legs.frame; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +CNSTI4 652 +ADDP4 +INDIRI4 +ASGNI4 +line 5704 +;5704: } +LABELV $3063 +line 5706 +;5705: +;5706: trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "model_root", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); +ADDRFP4 4 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 5708 +;5707: +;5708: cg_entities[clientNum].currentState.legsAnim = 0; +CNSTI4 1920 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+280 +ADDP4 +CNSTI4 0 +ASGNI4 +line 5709 +;5709: } +LABELV $3059 +line 5711 +;5710: +;5711: anim = &bgGlobalAnimations[ (cg_entities[clientNum].currentState.torsoAnim & ~ANIM_TOGGLEBIT) ]; +ADDRLP4 0 +CNSTI4 28 +CNSTI4 1920 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +MULI4 +ADDRGP4 bgGlobalAnimations +ADDP4 +ASGNP4 +line 5713 +;5712: +;5713: if (anim) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3068 +line 5714 +;5714: { +line 5715 +;5715: int flags = BONE_ANIM_OVERRIDE_FREEZE; +ADDRLP4 12 +CNSTI4 72 +ASGNI4 +line 5716 +;5716: int firstFrame = anim->firstFrame; +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +line 5717 +;5717: int setFrame = -1; +ADDRLP4 16 +CNSTI4 -1 +ASGNI4 +line 5718 +;5718: float animSpeed = 50.0f / anim->frameLerp; +ADDRLP4 24 +CNSTF4 1112014848 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 5720 +;5719: +;5720: if (anim->loopFrames != -1) +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $3070 +line 5721 +;5721: { +line 5722 +;5722: flags |= BONE_ANIM_OVERRIDE_LOOP; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 16 +BORI4 +ASGNI4 +line 5723 +;5723: } +LABELV $3070 +line 5725 +;5724: +;5725: if (cent->pe.torso.frame >= anim->firstFrame && cent->pe.torso.frame <= (anim->firstFrame + anim->numFrames)) +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 716 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 36 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 36 +INDIRI4 +LTI4 $3072 +ADDRLP4 28 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +GTI4 $3072 +line 5726 +;5726: { +line 5727 +;5727: setFrame = cent->pe.torso.frame; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +CNSTI4 716 +ADDP4 +INDIRI4 +ASGNI4 +line 5728 +;5728: } +LABELV $3072 +line 5730 +;5729: +;5730: trap_G2API_SetBoneAnim(ci->ghoul2Model, 0, "lower_lumbar", firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, setFrame, 150); +ADDRFP4 4 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 5732 +;5731: +;5732: cg_entities[clientNum].currentState.torsoAnim = 0; +CNSTI4 1920 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+284 +ADDP4 +CNSTI4 0 +ASGNI4 +line 5733 +;5733: } +LABELV $3068 +line 5735 +;5734: +;5735: trap_G2API_CleanGhoul2Models(&(cent->ghoul2)); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 5736 +;5736: trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, ¢->ghoul2); +ADDRFP4 4 +INDIRP4 +CNSTI4 504 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_DuplicateGhoul2Instance +CALLV +pop +line 5737 +;5737: cg_entities[clientNum].ghoul2 = cent->ghoul2; +CNSTI4 1920 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ASGNP4 +line 5738 +;5738:} +LABELV $3048 +endproc CG_ForceFPLSPlayerModel 84 44 +export CG_Player +proc CG_Player 1380 44 +line 5745 +;5739: +;5740:/* +;5741:=============== +;5742:CG_Player +;5743:=============== +;5744:*/ +;5745:void CG_Player( centity_t *cent ) { +line 5751 +;5746: clientInfo_t *ci; +;5747: refEntity_t legs; +;5748: refEntity_t torso; +;5749: int clientNum; +;5750: int renderfx; +;5751: qboolean shadow = qfalse; +ADDRLP4 836 +CNSTI4 0 +ASGNI4 +line 5752 +;5752: float shadowPlane = 0; +ADDRLP4 540 +CNSTF4 0 +ASGNF4 +line 5753 +;5753: qboolean dead = qfalse; +ADDRLP4 864 +CNSTI4 0 +ASGNI4 +line 5758 +;5754: vec3_t rootAngles; +;5755: refEntity_t seeker; +;5756: float angle; +;5757: vec3_t angles, dir, elevated, enang, seekorg; +;5758: int iwantout = 0, successchange = 0; +ADDRLP4 768 +CNSTI4 0 +ASGNI4 +ADDRLP4 860 +CNSTI4 0 +ASGNI4 +line 5760 +;5759: int team; +;5760: float prefig = 0; +ADDRLP4 856 +CNSTF4 0 +ASGNF4 +line 5766 +;5761: centity_t *enent; +;5762: mdxaBone_t boltMatrix, lHandMatrix; +;5763: vec3_t efOrg; +;5764: vec3_t tDir; +;5765: int distVelBase; +;5766: int doAlpha = 0; +ADDRLP4 832 +CNSTI4 0 +ASGNI4 +line 5767 +;5767: int effectTimeLayer = 0; +ADDRLP4 756 +CNSTI4 0 +ASGNI4 +line 5768 +;5768: qboolean gotLHandMatrix = qfalse; +ADDRLP4 772 +CNSTI4 0 +ASGNI4 +line 5769 +;5769: qboolean g2HasWeapon = qfalse; +ADDRLP4 536 +CNSTI4 0 +ASGNI4 +line 5771 +;5770: +;5771: if (cgQueueLoad) +ADDRGP4 cgQueueLoad +INDIRI4 +CNSTI4 0 +EQI4 $3078 +line 5772 +;5772: { +line 5773 +;5773: CG_ActualLoadDeferredPlayers(); +ADDRGP4 CG_ActualLoadDeferredPlayers +CALLV +pop +line 5774 +;5774: cgQueueLoad = qfalse; +ADDRGP4 cgQueueLoad +CNSTI4 0 +ASGNI4 +line 5775 +;5775: } +LABELV $3078 +line 5780 +;5776: +;5777: // the client number is stored in clientNum. It can't be derived +;5778: // from the entity number, because a single client may have +;5779: // multiple corpses on the level using the same clientinfo +;5780: clientNum = cent->currentState.clientNum; +ADDRLP4 760 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ASGNI4 +line 5781 +;5781: if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { +ADDRLP4 760 +INDIRI4 +CNSTI4 0 +LTI4 $3082 +ADDRLP4 760 +INDIRI4 +CNSTI4 32 +LTI4 $3080 +LABELV $3082 +line 5782 +;5782: CG_Error( "Bad clientNum on player entity"); +ADDRGP4 $3083 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 5783 +;5783: } +LABELV $3080 +line 5784 +;5784: ci = &cgs.clientinfo[ clientNum ]; +ADDRLP4 828 +CNSTI4 788 +ADDRLP4 760 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 5788 +;5785: +;5786: // it is possible to see corpses from disconnected players that may +;5787: // not have valid clientinfo +;5788: if ( !ci->infoValid ) { +ADDRLP4 828 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $3085 +line 5789 +;5789: return; +ADDRGP4 $3077 +JUMPV +LABELV $3085 +line 5792 +;5790: } +;5791: +;5792: cent->ghoul2 = cg_entities[cent->currentState.number].ghoul2; +ADDRLP4 900 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 900 +INDIRP4 +CNSTI4 952 +ADDP4 +CNSTI4 1920 +ADDRLP4 900 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +ASGNP4 +line 5794 +;5793: +;5794: if (!cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $3088 +line 5795 +;5795: { //not ready yet? +line 5799 +;5796:#ifdef _DEBUG +;5797: Com_Printf("WARNING: Client %i has a null ghoul2 instance\n", cent->currentState.number); +;5798:#endif +;5799: if (cgs.clientinfo[cent->currentState.number].ghoul2Model && +ADDRLP4 904 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 904 +INDIRI4 +ADDRGP4 cgs+43024+504 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3077 +ADDRLP4 904 +INDIRI4 +ADDRGP4 cgs+43024+504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 908 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 908 +INDIRI4 +CNSTI4 0 +EQI4 $3077 +line 5801 +;5800: trap_G2_HaveWeGhoul2Models(cgs.clientinfo[cent->currentState.number].ghoul2Model)) +;5801: { +line 5805 +;5802:#ifdef _DEBUG +;5803: Com_Printf("Clientinfo instance was valid, duplicating for cent\n"); +;5804:#endif +;5805: trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[cent->currentState.number].ghoul2Model, ¢->ghoul2); +ADDRLP4 912 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 788 +ADDRLP4 912 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 912 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_DuplicateGhoul2Instance +CALLV +pop +line 5806 +;5806: cg_entities[cent->currentState.number].ghoul2 = cent->ghoul2; +ADDRLP4 916 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 916 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +ADDRLP4 916 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ASGNP4 +line 5807 +;5807: } +line 5808 +;5808: return; +ADDRGP4 $3077 +JUMPV +LABELV $3088 +line 5811 +;5809: } +;5810: +;5811: g2HasWeapon = trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 904 +ADDRGP4 trap_G2API_HasGhoul2ModelOnIndex +CALLI4 +ASGNI4 +ADDRLP4 536 +ADDRLP4 904 +INDIRI4 +ASGNI4 +line 5813 +;5812: +;5813: if (!g2HasWeapon) +ADDRLP4 536 +INDIRI4 +CNSTI4 0 +NEI4 $3099 +line 5814 +;5814: { //force a redup of the weapon instance onto the client instance +line 5815 +;5815: cent->ghoul2weapon = NULL; +ADDRFP4 0 +INDIRP4 +CNSTI4 960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 5816 +;5816: } +LABELV $3099 +line 5818 +;5817: +;5818: if (cent->torsoBolt && !(cent->currentState.eFlags & EF_DEAD)) +ADDRLP4 908 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 912 +CNSTI4 0 +ASGNI4 +ADDRLP4 908 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +ADDRLP4 912 +INDIRI4 +EQI4 $3101 +ADDRLP4 908 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 912 +INDIRI4 +NEI4 $3101 +line 5819 +;5819: { //he's alive and has a limb missing still, reattach it and reset the weapon +line 5820 +;5820: CG_ReattachLimb(cent); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_ReattachLimb +CALLV +pop +line 5821 +;5821: } +ADDRGP4 $3102 +JUMPV +LABELV $3101 +line 5822 +;5822: else if (cg_entities[cent->currentState.number].torsoBolt && !(cent->currentState.eFlags & EF_DEAD)) +ADDRLP4 916 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 920 +CNSTI4 0 +ASGNI4 +CNSTI4 1920 +ADDRLP4 916 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1012 +ADDP4 +INDIRI4 +ADDRLP4 920 +INDIRI4 +EQI4 $3103 +ADDRLP4 916 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 920 +INDIRI4 +NEI4 $3103 +line 5823 +;5823: { //It happens. (usually between odd level change events) +line 5824 +;5824: cent->torsoBolt = cg_entities[cent->currentState.number].torsoBolt; +ADDRLP4 924 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 924 +INDIRP4 +CNSTI4 1012 +ADDP4 +CNSTI4 1920 +ADDRLP4 924 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1012 +ADDP4 +INDIRI4 +ASGNI4 +line 5825 +;5825: cg_entities[cent->currentState.number].torsoBolt = 0; +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1012 +ADDP4 +CNSTI4 0 +ASGNI4 +line 5826 +;5826: CG_ReattachLimb(cent); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_ReattachLimb +CALLV +pop +line 5827 +;5827: } +LABELV $3103 +LABELV $3102 +line 5829 +;5828: +;5829: if (cent->ghoul2 && cent->torsoBolt && (cent->torsoBolt == G2_MODELPART_RARM || cent->torsoBolt == G2_MODELPART_RHAND || cent->torsoBolt == G2_MODELPART_WAIST) && g2HasWeapon) +ADDRLP4 924 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 924 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3108 +ADDRLP4 928 +ADDRLP4 924 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 928 +INDIRI4 +CNSTI4 0 +EQI4 $3108 +ADDRLP4 928 +INDIRI4 +CNSTI4 13 +EQI4 $3111 +ADDRLP4 928 +INDIRI4 +CNSTI4 14 +EQI4 $3111 +ADDRLP4 928 +INDIRI4 +CNSTI4 11 +NEI4 $3108 +LABELV $3111 +ADDRLP4 536 +INDIRI4 +CNSTI4 0 +EQI4 $3108 +line 5830 +;5830: { //kill the weapon if the limb holding it is no longer on the model +line 5831 +;5831: trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_G2API_RemoveGhoul2Model +CALLI4 +pop +line 5832 +;5832: g2HasWeapon = qfalse; +ADDRLP4 536 +CNSTI4 0 +ASGNI4 +line 5833 +;5833: } +LABELV $3108 +line 5835 +;5834: +;5835: if (cent->currentState.teamowner && !cent->isATST) +ADDRLP4 932 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 936 +CNSTI4 0 +ASGNI4 +ADDRLP4 932 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +ADDRLP4 936 +INDIRI4 +EQI4 $3112 +ADDRLP4 932 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ADDRLP4 936 +INDIRI4 +NEI4 $3112 +line 5836 +;5836: { +line 5837 +;5837: cg_entities[cent->currentState.number].currentState.teamowner = cent->currentState.teamowner; +ADDRLP4 940 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 940 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+264 +ADDP4 +ADDRLP4 940 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +ASGNI4 +line 5838 +;5838: cg_entities[cent->currentState.number].isATST = cent->isATST; +ADDRLP4 944 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 944 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1028 +ADDP4 +ADDRLP4 944 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ASGNI4 +line 5840 +;5839: +;5840: if (CG_RegisterClientModelname(&cgs.clientinfo[cent->currentState.number], cgs.clientinfo[cent->currentState.number].modelName, cgs.clientinfo[cent->currentState.number].skinName, +ADDRLP4 948 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 952 +CNSTI4 788 +ADDRLP4 948 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 952 +INDIRI4 +ADDRGP4 cgs+43024 +ADDP4 +ARGP4 +ADDRLP4 952 +INDIRI4 +ADDRGP4 cgs+43024+160 +ADDP4 +ARGP4 +ADDRLP4 952 +INDIRI4 +ADDRGP4 cgs+43024+224 +ADDP4 +ARGP4 +ADDRLP4 952 +INDIRI4 +ADDRGP4 cgs+43024+416 +ADDP4 +ARGP4 +ADDRLP4 948 +INDIRI4 +ARGI4 +ADDRLP4 956 +ADDRGP4 CG_RegisterClientModelname +CALLI4 +ASGNI4 +ADDRLP4 956 +INDIRI4 +CNSTI4 0 +EQI4 $3113 +line 5842 +;5841: cgs.clientinfo[cent->currentState.number].teamName, cent->currentState.number)) +;5842: { +line 5843 +;5843: cent->isATST = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +CNSTI4 1 +ASGNI4 +line 5844 +;5844: cg_entities[cent->currentState.number].isATST = cent->isATST; +ADDRLP4 960 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 960 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1028 +ADDP4 +ADDRLP4 960 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ASGNI4 +line 5845 +;5845: return; +ADDRGP4 $3077 +JUMPV +line 5847 +;5846: } +;5847: } +LABELV $3112 +line 5848 +;5848: else if (!cent->currentState.teamowner && cent->isATST) +ADDRLP4 940 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 944 +CNSTI4 0 +ASGNI4 +ADDRLP4 940 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +ADDRLP4 944 +INDIRI4 +NEI4 $3126 +ADDRLP4 940 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ADDRLP4 944 +INDIRI4 +EQI4 $3126 +line 5849 +;5849: { +line 5850 +;5850: cg_entities[cent->currentState.number].currentState.teamowner = cent->currentState.teamowner; +ADDRLP4 948 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 948 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+264 +ADDP4 +ADDRLP4 948 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +ASGNI4 +line 5851 +;5851: cg_entities[cent->currentState.number].isATST = cent->isATST; +ADDRLP4 952 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 952 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1028 +ADDP4 +ADDRLP4 952 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ASGNI4 +line 5853 +;5852: +;5853: if (CG_RegisterClientModelname(&cgs.clientinfo[cent->currentState.number], cgs.clientinfo[cent->currentState.number].modelName, cgs.clientinfo[cent->currentState.number].skinName, +ADDRLP4 956 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 960 +CNSTI4 788 +ADDRLP4 956 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 960 +INDIRI4 +ADDRGP4 cgs+43024 +ADDP4 +ARGP4 +ADDRLP4 960 +INDIRI4 +ADDRGP4 cgs+43024+160 +ADDP4 +ARGP4 +ADDRLP4 960 +INDIRI4 +ADDRGP4 cgs+43024+224 +ADDP4 +ARGP4 +ADDRLP4 960 +INDIRI4 +ADDRGP4 cgs+43024+416 +ADDP4 +ARGP4 +ADDRLP4 956 +INDIRI4 +ARGI4 +ADDRLP4 964 +ADDRGP4 CG_RegisterClientModelname +CALLI4 +ASGNI4 +ADDRLP4 964 +INDIRI4 +CNSTI4 0 +EQI4 $3130 +line 5855 +;5854: cgs.clientinfo[cent->currentState.number].teamName, cent->currentState.number)) +;5855: { +line 5856 +;5856: cent->isATST = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +CNSTI4 0 +ASGNI4 +line 5857 +;5857: cg_entities[cent->currentState.number].isATST = cent->isATST; +ADDRLP4 968 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 968 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1028 +ADDP4 +ADDRLP4 968 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ASGNI4 +line 5858 +;5858: return; +ADDRGP4 $3077 +JUMPV +LABELV $3130 +line 5860 +;5859: } +;5860: } +LABELV $3126 +LABELV $3113 +line 5862 +;5861: +;5862: if (cent->currentState.number < MAX_CLIENTS && +ADDRLP4 948 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 948 +INDIRP4 +INDIRI4 +CNSTI4 32 +GEI4 $3140 +ADDRLP4 952 +CNSTI4 0 +ASGNI4 +ADDRLP4 948 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +ADDRLP4 952 +INDIRI4 +EQI4 $3140 +ADDRLP4 948 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ADDRLP4 952 +INDIRI4 +NEI4 $3140 +line 5865 +;5863: cent->currentState.teamowner && +;5864: !cent->isATST) +;5865: { +line 5866 +;5866: return; +ADDRGP4 $3077 +JUMPV +LABELV $3140 +line 5869 +;5867: } +;5868: +;5869: if (!cent->trickAlphaTime || (cg.time - cent->trickAlphaTime) > 1000) +ADDRLP4 956 +ADDRFP4 0 +INDIRP4 +CNSTI4 1908 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 956 +INDIRI4 +CNSTI4 0 +EQI4 $3145 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 956 +INDIRI4 +SUBI4 +CNSTI4 1000 +LEI4 $3142 +LABELV $3145 +line 5870 +;5870: { //things got out of sync, perhaps a new client is trying to fill in this slot +line 5871 +;5871: cent->trickAlpha = 255; +ADDRFP4 0 +INDIRP4 +CNSTI4 1904 +ADDP4 +CNSTI4 255 +ASGNI4 +line 5872 +;5872: cent->trickAlphaTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 1908 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 5873 +;5873: } +LABELV $3142 +line 5876 +;5874: +;5875: //If this client has tricked you. +;5876: if (CG_IsMindTricked(cent->currentState.trickedentindex, +ADDRLP4 960 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 960 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 960 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 960 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 960 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 964 +ADDRGP4 CG_IsMindTricked +CALLI4 +ASGNI4 +ADDRLP4 964 +INDIRI4 +CNSTI4 0 +EQI4 $3147 +line 5881 +;5877: cent->currentState.trickedentindex2, +;5878: cent->currentState.trickedentindex3, +;5879: cent->currentState.trickedentindex4, +;5880: cg.snap->ps.clientNum)) +;5881: { +line 5882 +;5882: if (cent->trickAlpha > 1) +ADDRFP4 0 +INDIRP4 +CNSTI4 1904 +ADDP4 +INDIRI4 +CNSTI4 1 +LEI4 $3150 +line 5883 +;5883: { +line 5884 +;5884: cent->trickAlpha -= (cg.time - cent->trickAlphaTime)*0.5; +ADDRLP4 968 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 972 +ADDRLP4 968 +INDIRP4 +CNSTI4 1904 +ADDP4 +ASGNP4 +ADDRLP4 972 +INDIRP4 +ADDRLP4 972 +INDIRP4 +INDIRI4 +CVIF4 4 +CNSTF4 1056964608 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 968 +INDIRP4 +CNSTI4 1908 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +SUBF4 +CVFI4 4 +ASGNI4 +line 5885 +;5885: cent->trickAlphaTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 1908 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 5887 +;5886: +;5887: if (cent->trickAlpha < 0) +ADDRFP4 0 +INDIRP4 +CNSTI4 1904 +ADDP4 +INDIRI4 +CNSTI4 0 +GEI4 $3154 +line 5888 +;5888: { +line 5889 +;5889: cent->trickAlpha = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1904 +ADDP4 +CNSTI4 0 +ASGNI4 +line 5890 +;5890: } +LABELV $3154 +line 5892 +;5891: +;5892: doAlpha = 1; +ADDRLP4 832 +CNSTI4 1 +ASGNI4 +line 5893 +;5893: } +ADDRGP4 $3148 +JUMPV +LABELV $3150 +line 5895 +;5894: else +;5895: { +line 5896 +;5896: doAlpha = 1; +ADDRLP4 832 +CNSTI4 1 +ASGNI4 +line 5897 +;5897: cent->trickAlpha = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 1904 +ADDP4 +CNSTI4 1 +ASGNI4 +line 5898 +;5898: cent->trickAlphaTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 1908 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 5899 +;5899: iwantout = 1; +ADDRLP4 768 +CNSTI4 1 +ASGNI4 +line 5900 +;5900: } +line 5901 +;5901: } +ADDRGP4 $3148 +JUMPV +LABELV $3147 +line 5903 +;5902: else +;5903: { +line 5904 +;5904: if (cent->trickAlpha < 255) +ADDRFP4 0 +INDIRP4 +CNSTI4 1904 +ADDP4 +INDIRI4 +CNSTI4 255 +GEI4 $3157 +line 5905 +;5905: { +line 5906 +;5906: cent->trickAlpha += (cg.time - cent->trickAlphaTime); +ADDRLP4 968 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 972 +ADDRLP4 968 +INDIRP4 +CNSTI4 1904 +ADDP4 +ASGNP4 +ADDRLP4 972 +INDIRP4 +ADDRLP4 972 +INDIRP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 968 +INDIRP4 +CNSTI4 1908 +ADDP4 +INDIRI4 +SUBI4 +ADDI4 +ASGNI4 +line 5907 +;5907: cent->trickAlphaTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 1908 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 5909 +;5908: +;5909: if (cent->trickAlpha > 255) +ADDRFP4 0 +INDIRP4 +CNSTI4 1904 +ADDP4 +INDIRI4 +CNSTI4 255 +LEI4 $3161 +line 5910 +;5910: { +line 5911 +;5911: cent->trickAlpha = 255; +ADDRFP4 0 +INDIRP4 +CNSTI4 1904 +ADDP4 +CNSTI4 255 +ASGNI4 +line 5912 +;5912: } +LABELV $3161 +line 5914 +;5913: +;5914: doAlpha = 1; +ADDRLP4 832 +CNSTI4 1 +ASGNI4 +line 5915 +;5915: } +ADDRGP4 $3158 +JUMPV +LABELV $3157 +line 5917 +;5916: else +;5917: { +line 5918 +;5918: cent->trickAlpha = 255; +ADDRFP4 0 +INDIRP4 +CNSTI4 1904 +ADDP4 +CNSTI4 255 +ASGNI4 +line 5919 +;5919: cent->trickAlphaTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 1908 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 5920 +;5920: } +LABELV $3158 +line 5921 +;5921: } +LABELV $3148 +line 5924 +;5922: +;5923: // get the player model information +;5924: renderfx = 0; +ADDRLP4 776 +CNSTI4 0 +ASGNI4 +line 5925 +;5925: if ( cent->currentState.number == cg.snap->ps.clientNum) { +ADDRFP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $3164 +line 5926 +;5926: if (!cg.renderingThirdPerson) { +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $3167 +line 5927 +;5927: if (!cg_fpls.integer || cent->currentState.weapon != WP_SABER) +ADDRGP4 cg_fpls+12 +INDIRI4 +CNSTI4 0 +EQI4 $3173 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +EQI4 $3168 +LABELV $3173 +line 5928 +;5928: { +line 5929 +;5929: renderfx = RF_THIRD_PERSON; // only draw in mirrors +ADDRLP4 776 +CNSTI4 2 +ASGNI4 +line 5930 +;5930: } +line 5931 +;5931: } else { +ADDRGP4 $3168 +JUMPV +LABELV $3167 +line 5932 +;5932: if (cg_cameraMode.integer) { +ADDRGP4 cg_cameraMode+12 +INDIRI4 +CNSTI4 0 +EQI4 $3174 +line 5933 +;5933: iwantout = 1; +ADDRLP4 768 +CNSTI4 1 +ASGNI4 +line 5939 +;5934: +;5935: +;5936: // goto minimal_add; +;5937: +;5938: // NOTENOTE Temporary +;5939: return; +ADDRGP4 $3077 +JUMPV +LABELV $3174 +line 5941 +;5940: } +;5941: } +LABELV $3168 +line 5942 +;5942: } +LABELV $3164 +line 5951 +;5943: +;5944: // Update the player's client entity information regarding weapons. +;5945: // Explanation: The entitystate has a weapond defined on it. The cliententity does as well. +;5946: // The cliententity's weapon tells us what the ghoul2 instance on the cliententity has bolted to it. +;5947: // If the entitystate and cliententity weapons differ, then the state's needs to be copied to the client. +;5948: // Save the old weapon, to verify that it is or is not the same as the new weapon. +;5949: // rww - Make sure weapons don't get set BEFORE cent->ghoul2 is initialized or else we'll have no +;5950: // weapon bolted on +;5951: if (cent->currentState.saberInFlight) +ADDRFP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $3177 +line 5952 +;5952: { +line 5953 +;5953: cent->ghoul2weapon = g2WeaponInstances[WP_SABER]; +ADDRFP4 0 +INDIRP4 +CNSTI4 960 +ADDP4 +ADDRGP4 g2WeaponInstances+8 +INDIRP4 +ASGNP4 +line 5954 +;5954: } +LABELV $3177 +line 5956 +;5955: +;5956: if (cent->ghoul2 && +ADDRLP4 968 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 968 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3180 +ADDRLP4 968 +INDIRP4 +CNSTI4 960 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 968 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 g2WeaponInstances +ADDP4 +INDIRP4 +CVPU4 4 +EQU4 $3180 +ADDRLP4 972 +CNSTI4 0 +ASGNI4 +ADDRLP4 968 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 972 +INDIRI4 +NEI4 $3180 +ADDRLP4 968 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +ADDRLP4 972 +INDIRI4 +NEI4 $3180 +ADDRLP4 968 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +ADDRLP4 972 +INDIRI4 +NEI4 $3180 +line 5959 +;5957: cent->ghoul2weapon != g2WeaponInstances[cent->currentState.weapon] && +;5958: !(cent->currentState.eFlags & EF_DEAD) && !cent->torsoBolt && !cent->isATST) +;5959: { +line 5960 +;5960: CG_CopyG2WeaponInstance(cent->currentState.weapon, cent->ghoul2); +ADDRLP4 976 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 976 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 976 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 CG_CopyG2WeaponInstance +CALLV +pop +line 5962 +;5961: +;5962: if (!(cg.snap->ps.pm_flags & PMF_FOLLOW)) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +NEI4 $3182 +line 5963 +;5963: { +line 5964 +;5964: if (cent->weapon == WP_SABER && cent->weapon != cent->currentState.weapon && !cent->currentState.shouldtarget) +ADDRLP4 980 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 984 +ADDRLP4 980 +INDIRP4 +CNSTI4 956 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 984 +INDIRI4 +CNSTI4 2 +NEI4 $3185 +ADDRLP4 984 +INDIRI4 +ADDRLP4 980 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +EQI4 $3185 +ADDRLP4 980 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $3185 +line 5965 +;5965: { //switching away from the saber +line 5966 +;5966: trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberoffquick.wav" )); +ADDRGP4 $3187 +ARGP4 +ADDRLP4 988 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 992 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 992 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 992 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 988 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 5967 +;5967: } +ADDRGP4 $3186 +JUMPV +LABELV $3185 +line 5968 +;5968: else if (cent->currentState.weapon == WP_SABER && cent->weapon != cent->currentState.weapon) +ADDRLP4 988 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 992 +ADDRLP4 988 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 992 +INDIRI4 +CNSTI4 2 +NEI4 $3188 +ADDRLP4 988 +INDIRP4 +CNSTI4 956 +ADDP4 +INDIRI4 +ADDRLP4 992 +INDIRI4 +EQI4 $3188 +line 5969 +;5969: { //switching to the saber +line 5970 +;5970: trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" )); +ADDRGP4 $3190 +ARGP4 +ADDRLP4 996 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 1000 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1000 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 1000 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 996 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 5971 +;5971: } +LABELV $3188 +LABELV $3186 +line 5972 +;5972: } +LABELV $3182 +line 5974 +;5973: +;5974: cent->weapon = cent->currentState.weapon; +ADDRLP4 980 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 980 +INDIRP4 +CNSTI4 956 +ADDP4 +ADDRLP4 980 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ASGNI4 +line 5975 +;5975: cent->ghoul2weapon = g2WeaponInstances[cent->currentState.weapon]; +ADDRLP4 984 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 984 +INDIRP4 +CNSTI4 960 +ADDP4 +ADDRLP4 984 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 g2WeaponInstances +ADDP4 +INDIRP4 +ASGNP4 +line 5976 +;5976: } +ADDRGP4 $3181 +JUMPV +LABELV $3180 +line 5977 +;5977: else if ((cent->currentState.eFlags & EF_DEAD) || cent->torsoBolt) +ADDRLP4 976 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 980 +CNSTI4 0 +ASGNI4 +ADDRLP4 976 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 980 +INDIRI4 +NEI4 $3193 +ADDRLP4 976 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +ADDRLP4 980 +INDIRI4 +EQI4 $3191 +LABELV $3193 +line 5978 +;5978: { +line 5979 +;5979: cent->ghoul2weapon = NULL; //be sure to update after respawning/getting limb regrown +ADDRFP4 0 +INDIRP4 +CNSTI4 960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 5980 +;5980: } +LABELV $3191 +LABELV $3181 +line 5983 +;5981: +;5982: +;5983: memset (&legs, 0, sizeof(legs)); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 5985 +;5984: +;5985: CG_SetGhoul2Info(&legs, cent); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_SetGhoul2Info +CALLV +pop +line 5987 +;5986: +;5987: VectorSet(legs.modelScale, 1,1,1); +ADDRLP4 0+196 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0+196+4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0+196+8 +CNSTF4 1065353216 +ASGNF4 +line 5988 +;5988: legs.radius = 64; +ADDRLP4 0+92 +CNSTF4 1115684864 +ASGNF4 +line 5989 +;5989: VectorClear(legs.angles); +ADDRLP4 984 +CNSTF4 0 +ASGNF4 +ADDRLP4 0+184+8 +ADDRLP4 984 +INDIRF4 +ASGNF4 +ADDRLP4 0+184+4 +ADDRLP4 984 +INDIRF4 +ASGNF4 +ADDRLP4 0+184 +ADDRLP4 984 +INDIRF4 +ASGNF4 +line 5991 +;5990: +;5991: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $3205 +line 5992 +;5992: { +line 5993 +;5993: legs.radius = 400; +ADDRLP4 0+92 +CNSTF4 1137180672 +ASGNF4 +line 5994 +;5994: } +LABELV $3205 +line 5998 +;5995: +;5996:// minimal_add: +;5997: +;5998: team = cgs.clientinfo[ cent->currentState.clientNum ].team; +ADDRLP4 852 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +ASGNI4 +line 6000 +;5999: +;6000: if (cgs.gametype >= GT_TEAM && cg_drawFriend.integer && +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $3210 +ADDRGP4 cg_drawFriend+12 +INDIRI4 +CNSTI4 0 +EQI4 $3210 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $3210 +line 6002 +;6001: cent->currentState.number != cg.snap->ps.clientNum) // Don't show a sprite above a player's own head in 3rd person. +;6002: { // If the view is either a spectator or on the same team as this character, show a symbol above their head. +line 6003 +;6003: if ((cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || cg.snap->ps.persistant[PERS_TEAM] == team) && +ADDRLP4 988 +CNSTI4 336 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 988 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $3219 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 988 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 852 +INDIRI4 +NEI4 $3215 +LABELV $3219 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $3215 +line 6005 +;6004: !(cent->currentState.eFlags & EF_DEAD)) +;6005: { +line 6006 +;6006: if (team == TEAM_RED) +ADDRLP4 852 +INDIRI4 +CNSTI4 1 +NEI4 $3220 +line 6007 +;6007: { +line 6008 +;6008: CG_PlayerFloatSprite( cent, cgs.media.teamRedShader); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 cgs+70296+176 +INDIRI4 +ARGI4 +ADDRGP4 CG_PlayerFloatSprite +CALLV +pop +line 6009 +;6009: } +ADDRGP4 $3221 +JUMPV +LABELV $3220 +line 6011 +;6010: else // if (team == TEAM_BLUE) +;6011: { +line 6012 +;6012: CG_PlayerFloatSprite( cent, cgs.media.teamBlueShader); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 cgs+70296+180 +INDIRI4 +ARGI4 +ADDRGP4 CG_PlayerFloatSprite +CALLV +pop +line 6013 +;6013: } +LABELV $3221 +line 6014 +;6014: } +LABELV $3215 +line 6015 +;6015: } +LABELV $3210 +line 6017 +;6016: +;6017: if (cgs.gametype == GT_JEDIMASTER && cg_drawFriend.integer && +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 2 +NEI4 $3226 +ADDRGP4 cg_drawFriend+12 +INDIRI4 +CNSTI4 0 +EQI4 $3226 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $3226 +line 6019 +;6018: cent->currentState.number != cg.snap->ps.clientNum) // Don't show a sprite above a player's own head in 3rd person. +;6019: { // If the view is either a spectator or on the same team as this character, show a symbol above their head. +line 6020 +;6020: if ((cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || cg.snap->ps.persistant[PERS_TEAM] == team) && +ADDRLP4 988 +CNSTI4 336 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 988 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $3235 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 988 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 852 +INDIRI4 +NEI4 $3231 +LABELV $3235 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $3231 +line 6022 +;6021: !(cent->currentState.eFlags & EF_DEAD)) +;6022: { +line 6023 +;6023: if (CG_ThereIsAMaster()) +ADDRLP4 992 +ADDRGP4 CG_ThereIsAMaster +CALLI4 +ASGNI4 +ADDRLP4 992 +INDIRI4 +CNSTI4 0 +EQI4 $3236 +line 6024 +;6024: { +line 6025 +;6025: if (!cg.snap->ps.isJediMaster) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 648 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $3238 +line 6026 +;6026: { +line 6027 +;6027: if (!cent->currentState.isJediMaster) +ADDRFP4 0 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $3241 +line 6028 +;6028: { +line 6029 +;6029: CG_PlayerFloatSprite( cent, cgs.media.teamRedShader); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 cgs+70296+176 +INDIRI4 +ARGI4 +ADDRGP4 CG_PlayerFloatSprite +CALLV +pop +line 6030 +;6030: } +LABELV $3241 +line 6031 +;6031: } +LABELV $3238 +line 6032 +;6032: } +LABELV $3236 +line 6033 +;6033: } +LABELV $3231 +line 6034 +;6034: } +LABELV $3226 +line 6036 +;6035: +;6036: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $3245 +line 6037 +;6037: { +line 6038 +;6038: goto doEssentialOne; +ADDRGP4 $3247 +JUMPV +LABELV $3245 +line 6042 +;6039: } +;6040: +;6041: // add the shadow +;6042: shadow = CG_PlayerShadow( cent, &shadowPlane ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 540 +ARGP4 +ADDRLP4 988 +ADDRGP4 CG_PlayerShadow +CALLI4 +ASGNI4 +ADDRLP4 836 +ADDRLP4 988 +INDIRI4 +ASGNI4 +line 6044 +;6043: +;6044: if ( (cent->currentState.eFlags & EF_SEEKERDRONE) || cent->currentState.genericenemyindex != -1 ) +ADDRLP4 992 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 992 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1048576 +BANDI4 +CNSTI4 0 +NEI4 $3250 +ADDRLP4 992 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $3248 +LABELV $3250 +line 6045 +;6045: { +line 6046 +;6046: memset( &seeker, 0, sizeof(seeker) ); +ADDRLP4 276 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 6048 +;6047: +;6048: VectorCopy(cent->lerpOrigin, elevated); +ADDRLP4 224 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 6049 +;6049: elevated[2] += 40; +ADDRLP4 224+8 +ADDRLP4 224+8 +INDIRF4 +CNSTF4 1109393408 +ADDF4 +ASGNF4 +line 6051 +;6050: +;6051: VectorCopy( elevated, seeker.lightingOrigin ); +ADDRLP4 276+108 +ADDRLP4 224 +INDIRB +ASGNB 12 +line 6052 +;6052: seeker.shadowPlane = shadowPlane; +ADDRLP4 276+120 +ADDRLP4 540 +INDIRF4 +ASGNF4 +line 6053 +;6053: seeker.renderfx = 0; //renderfx; +ADDRLP4 276+4 +CNSTI4 0 +ASGNI4 +line 6056 +;6054: //don't show in first person? +;6055: +;6056: angle = ((cg.time / 12) & 255) * (M_PI * 2) / 255; +ADDRLP4 236 +CNSTF4 1086918619 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 12 +DIVI4 +CNSTI4 255 +BANDI4 +CVIF4 4 +MULF4 +CNSTF4 1132396544 +DIVF4 +ASGNF4 +line 6057 +;6057: dir[0] = cos(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 996 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 212 +CNSTF4 1101004800 +ADDRLP4 996 +INDIRF4 +MULF4 +ASGNF4 +line 6058 +;6058: dir[1] = sin(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1000 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 212+4 +CNSTF4 1101004800 +ADDRLP4 1000 +INDIRF4 +MULF4 +ASGNF4 +line 6059 +;6059: dir[2] = cos(angle) * 5; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1004 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1084227584 +ADDRLP4 1004 +INDIRF4 +MULF4 +ASGNF4 +line 6060 +;6060: VectorAdd(elevated, dir, seeker.origin); +ADDRLP4 276+52 +ADDRLP4 224 +INDIRF4 +ADDRLP4 212 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 276+52+4 +ADDRLP4 224+4 +INDIRF4 +ADDRLP4 212+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 276+52+8 +ADDRLP4 224+8 +INDIRF4 +ADDRLP4 212+8 +INDIRF4 +ADDF4 +ASGNF4 +line 6062 +;6061: +;6062: VectorCopy(seeker.origin, seekorg); +ADDRLP4 868 +ADDRLP4 276+52 +INDIRB +ASGNB 12 +line 6064 +;6063: +;6064: if (cent->currentState.genericenemyindex > 1024) +ADDRFP4 0 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRI4 +CNSTI4 1024 +LEI4 $3268 +line 6065 +;6065: { +line 6066 +;6066: prefig = (cent->currentState.genericenemyindex-cg.time)/80; +ADDRLP4 856 +ADDRFP4 0 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CNSTI4 80 +DIVI4 +CVIF4 4 +ASGNF4 +line 6068 +;6067: +;6068: if (prefig > 55) +ADDRLP4 856 +INDIRF4 +CNSTF4 1113325568 +LEF4 $3271 +line 6069 +;6069: { +line 6070 +;6070: prefig = 55; +ADDRLP4 856 +CNSTF4 1113325568 +ASGNF4 +line 6071 +;6071: } +ADDRGP4 $3272 +JUMPV +LABELV $3271 +line 6072 +;6072: else if (prefig < 1) +ADDRLP4 856 +INDIRF4 +CNSTF4 1065353216 +GEF4 $3273 +line 6073 +;6073: { +line 6074 +;6074: prefig = 1; +ADDRLP4 856 +CNSTF4 1065353216 +ASGNF4 +line 6075 +;6075: } +LABELV $3273 +LABELV $3272 +line 6077 +;6076: +;6077: elevated[2] -= 55-prefig; +ADDRLP4 224+8 +ADDRLP4 224+8 +INDIRF4 +CNSTF4 1113325568 +ADDRLP4 856 +INDIRF4 +SUBF4 +SUBF4 +ASGNF4 +line 6079 +;6078: +;6079: angle = ((cg.time / 12) & 255) * (M_PI * 2) / 255; +ADDRLP4 236 +CNSTF4 1086918619 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 12 +DIVI4 +CNSTI4 255 +BANDI4 +CVIF4 4 +MULF4 +CNSTF4 1132396544 +DIVF4 +ASGNF4 +line 6080 +;6080: dir[0] = cos(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1008 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 212 +CNSTF4 1101004800 +ADDRLP4 1008 +INDIRF4 +MULF4 +ASGNF4 +line 6081 +;6081: dir[1] = sin(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1012 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 212+4 +CNSTF4 1101004800 +ADDRLP4 1012 +INDIRF4 +MULF4 +ASGNF4 +line 6082 +;6082: dir[2] = cos(angle) * 5; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1016 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1084227584 +ADDRLP4 1016 +INDIRF4 +MULF4 +ASGNF4 +line 6083 +;6083: VectorAdd(elevated, dir, seeker.origin); +ADDRLP4 276+52 +ADDRLP4 224 +INDIRF4 +ADDRLP4 212 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 276+52+4 +ADDRLP4 224+4 +INDIRF4 +ADDRLP4 212+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 276+52+8 +ADDRLP4 224+8 +INDIRF4 +ADDRLP4 212+8 +INDIRF4 +ADDF4 +ASGNF4 +line 6084 +;6084: } +ADDRGP4 $3269 +JUMPV +LABELV $3268 +line 6085 +;6085: else if (cent->currentState.genericenemyindex != ENTITYNUM_NONE && cent->currentState.genericenemyindex != -1) +ADDRLP4 1008 +ADDRFP4 0 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1008 +INDIRI4 +CNSTI4 1023 +EQI4 $3288 +ADDRLP4 1008 +INDIRI4 +CNSTI4 -1 +EQI4 $3288 +line 6086 +;6086: { +line 6087 +;6087: enent = &cg_entities[cent->currentState.genericenemyindex]; +ADDRLP4 880 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 6089 +;6088: +;6089: if (enent) +ADDRLP4 880 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3290 +line 6090 +;6090: { +line 6091 +;6091: VectorSubtract(enent->lerpOrigin, seekorg, enang); +ADDRLP4 1012 +ADDRLP4 880 +INDIRP4 +ASGNP4 +ADDRLP4 884 +ADDRLP4 1012 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +ADDRLP4 868 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 884+4 +ADDRLP4 1012 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +ADDRLP4 868+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 884+8 +ADDRLP4 880 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +ADDRLP4 868+8 +INDIRF4 +SUBF4 +ASGNF4 +line 6092 +;6092: VectorNormalize(enang); +ADDRLP4 884 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 6093 +;6093: vectoangles(enang, angles); +ADDRLP4 884 +ARGP4 +ADDRLP4 252 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 6094 +;6094: successchange = 1; +ADDRLP4 860 +CNSTI4 1 +ASGNI4 +line 6095 +;6095: } +LABELV $3290 +line 6096 +;6096: } +LABELV $3288 +LABELV $3269 +line 6098 +;6097: +;6098: if (!successchange) +ADDRLP4 860 +INDIRI4 +CNSTI4 0 +NEI4 $3296 +line 6099 +;6099: { +line 6100 +;6100: angles[0] = sin(angle) * 30; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1012 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 252 +CNSTF4 1106247680 +ADDRLP4 1012 +INDIRF4 +MULF4 +ASGNF4 +line 6101 +;6101: angles[1] = (angle * 180 / M_PI) + 90; +ADDRLP4 252+4 +CNSTF4 1127481344 +ADDRLP4 236 +INDIRF4 +MULF4 +CNSTF4 1078530011 +DIVF4 +CNSTF4 1119092736 +ADDF4 +ASGNF4 +line 6102 +;6102: if (angles[1] > 360) +ADDRLP4 252+4 +INDIRF4 +CNSTF4 1135869952 +LEF4 $3299 +line 6103 +;6103: angles[1] -= 360; +ADDRLP4 252+4 +ADDRLP4 252+4 +INDIRF4 +CNSTF4 1135869952 +SUBF4 +ASGNF4 +LABELV $3299 +line 6104 +;6104: angles[2] = 0; +ADDRLP4 252+8 +CNSTF4 0 +ASGNF4 +line 6105 +;6105: } +LABELV $3296 +line 6107 +;6106: +;6107: AnglesToAxis( angles, seeker.axis ); +ADDRLP4 252 +ARGP4 +ADDRLP4 276+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 6109 +;6108: +;6109: seeker.hModel = trap_R_RegisterModel("models/items/remote.md3"); +ADDRGP4 $3306 +ARGP4 +ADDRLP4 1012 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 276+8 +ADDRLP4 1012 +INDIRI4 +ASGNI4 +line 6110 +;6110: trap_R_AddRefEntityToScene( &seeker ); +ADDRLP4 276 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 6111 +;6111: } +LABELV $3248 +LABELV $3247 +line 6115 +;6112: +;6113:doEssentialOne: +;6114: // add a water splash if partially in and out of water +;6115: CG_PlayerSplash( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_PlayerSplash +CALLV +pop +line 6117 +;6116: +;6117: if ( cg_shadows.integer == 3 && shadow ) { +ADDRGP4 cg_shadows+12 +INDIRI4 +CNSTI4 3 +NEI4 $3307 +ADDRLP4 836 +INDIRI4 +CNSTI4 0 +EQI4 $3307 +line 6118 +;6118: renderfx |= RF_SHADOW_PLANE; +ADDRLP4 776 +ADDRLP4 776 +INDIRI4 +CNSTI4 256 +BORI4 +ASGNI4 +line 6119 +;6119: } +LABELV $3307 +line 6120 +;6120: renderfx |= RF_LIGHTING_ORIGIN; // use the same origin for all +ADDRLP4 776 +ADDRLP4 776 +INDIRI4 +CNSTI4 128 +BORI4 +ASGNI4 +line 6123 +;6121: +;6122: // if we've been hit, display proper fullscreen fx +;6123: CG_PlayerHitFX(cent); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_PlayerHitFX +CALLV +pop +line 6125 +;6124: +;6125: VectorCopy( cent->lerpOrigin, legs.origin ); +ADDRLP4 0+52 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 6127 +;6126: +;6127: VectorCopy( cent->lerpOrigin, legs.lightingOrigin ); +ADDRLP4 0+108 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 6128 +;6128: legs.shadowPlane = shadowPlane; +ADDRLP4 0+120 +ADDRLP4 540 +INDIRF4 +ASGNF4 +line 6129 +;6129: legs.renderfx = renderfx; +ADDRLP4 0+4 +ADDRLP4 776 +INDIRI4 +ASGNI4 +line 6130 +;6130: VectorCopy (legs.origin, legs.oldorigin); // don't positionally lerp at all +ADDRLP4 0+64 +ADDRLP4 0+52 +INDIRB +ASGNB 12 +line 6132 +;6131: +;6132: CG_G2PlayerAngles( cent, legs.axis, rootAngles ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRLP4 840 +ARGP4 +ADDRGP4 CG_G2PlayerAngles +CALLV +pop +line 6140 +;6133: +;6134: //This call is mainly just to reconstruct the skeleton. But we'll get the left hand matrix while we're at it. +;6135: //If we don't reconstruct the skeleton after setting the bone angles, we will get bad bolt points on the model +;6136: //(e.g. the weapon model bolt will look "lagged") if there's no other GetBoltMatrix call for the rest of the +;6137: //frame. Yes, this is stupid and needs to be fixed properly. +;6138: //The current solution is to force it not to reconstruct the skeleton for the first GBM call in G2PlayerAngles. +;6139: //It works and we end up only reconstructing it once, but it doesn't seem like the best solution. +;6140: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 996 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 996 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 788 +ADDRLP4 996 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+516 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 488 +ARGP4 +ADDRLP4 996 +INDIRP4 +CNSTI4 1016 +ADDP4 +ARGP4 +ADDRLP4 996 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 996 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 6141 +;6141: gotLHandMatrix = qtrue; +ADDRLP4 772 +CNSTI4 1 +ASGNI4 +line 6143 +;6142: +;6143: if (cg.renderingThirdPerson) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +EQI4 $3321 +line 6144 +;6144: { +line 6145 +;6145: if (cgFPLSState != 0) +ADDRGP4 cgFPLSState +INDIRI4 +CNSTI4 0 +EQI4 $3322 +line 6146 +;6146: { +line 6147 +;6147: CG_ForceFPLSPlayerModel(cent, ci); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 828 +INDIRP4 +ARGP4 +ADDRGP4 CG_ForceFPLSPlayerModel +CALLV +pop +line 6148 +;6148: cgFPLSState = 0; +ADDRGP4 cgFPLSState +CNSTI4 0 +ASGNI4 +line 6149 +;6149: return; +ADDRGP4 $3077 +JUMPV +line 6151 +;6150: } +;6151: } +LABELV $3321 +line 6152 +;6152: else if (ci->team == TEAM_SPECTATOR || (cg.snap && (cg.snap->ps.pm_flags & PMF_FOLLOW))) +ADDRLP4 828 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $3330 +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3326 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $3326 +LABELV $3330 +line 6153 +;6153: { //don't allow this when spectating +line 6154 +;6154: if (cgFPLSState != 0) +ADDRGP4 cgFPLSState +INDIRI4 +CNSTI4 0 +EQI4 $3331 +line 6155 +;6155: { +line 6156 +;6156: trap_Cvar_Set("cg_fpls", "0"); +ADDRGP4 $3333 +ARGP4 +ADDRGP4 $3334 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 6157 +;6157: cg_fpls.integer = 0; +ADDRGP4 cg_fpls+12 +CNSTI4 0 +ASGNI4 +line 6159 +;6158: +;6159: CG_ForceFPLSPlayerModel(cent, ci); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 828 +INDIRP4 +ARGP4 +ADDRGP4 CG_ForceFPLSPlayerModel +CALLV +pop +line 6160 +;6160: cgFPLSState = 0; +ADDRGP4 cgFPLSState +CNSTI4 0 +ASGNI4 +line 6161 +;6161: return; +ADDRGP4 $3077 +JUMPV +LABELV $3331 +line 6164 +;6162: } +;6163: +;6164: if (cg_fpls.integer) +ADDRGP4 cg_fpls+12 +INDIRI4 +CNSTI4 0 +EQI4 $3327 +line 6165 +;6165: { +line 6166 +;6166: trap_Cvar_Set("cg_fpls", "0"); +ADDRGP4 $3333 +ARGP4 +ADDRGP4 $3334 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 6167 +;6167: } +line 6168 +;6168: } +ADDRGP4 $3327 +JUMPV +LABELV $3326 +line 6170 +;6169: else +;6170: { +line 6171 +;6171: if (cg_fpls.integer && cent->currentState.weapon == WP_SABER && cg.snap && cent->currentState.number == cg.snap->ps.clientNum) +ADDRGP4 cg_fpls+12 +INDIRI4 +CNSTI4 0 +EQI4 $3339 +ADDRLP4 1000 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1000 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $3339 +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3339 +ADDRLP4 1000 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $3339 +line 6172 +;6172: { +line 6174 +;6173: +;6174: if (cgFPLSState != cg_fpls.integer) +ADDRGP4 cgFPLSState +INDIRI4 +ADDRGP4 cg_fpls+12 +INDIRI4 +EQI4 $3340 +line 6175 +;6175: { +line 6176 +;6176: CG_ForceFPLSPlayerModel(cent, ci); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 828 +INDIRP4 +ARGP4 +ADDRGP4 CG_ForceFPLSPlayerModel +CALLV +pop +line 6177 +;6177: cgFPLSState = cg_fpls.integer; +ADDRGP4 cgFPLSState +ADDRGP4 cg_fpls+12 +INDIRI4 +ASGNI4 +line 6178 +;6178: return; +ADDRGP4 $3077 +JUMPV +line 6186 +;6179: } +;6180: +;6181: /* +;6182: mdxaBone_t headMatrix; +;6183: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_head, &headMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +;6184: trap_G2API_GiveMeVectorFromMatrix(&headMatrix, ORIGIN, cg.refdef.vieworg); +;6185: */ +;6186: } +LABELV $3339 +line 6187 +;6187: else if (!cg_fpls.integer && cgFPLSState) +ADDRLP4 1004 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_fpls+12 +INDIRI4 +ADDRLP4 1004 +INDIRI4 +NEI4 $3348 +ADDRGP4 cgFPLSState +INDIRI4 +ADDRLP4 1004 +INDIRI4 +EQI4 $3348 +line 6188 +;6188: { +line 6189 +;6189: if (cgFPLSState != cg_fpls.integer) +ADDRGP4 cgFPLSState +INDIRI4 +ADDRGP4 cg_fpls+12 +INDIRI4 +EQI4 $3351 +line 6190 +;6190: { +line 6191 +;6191: CG_ForceFPLSPlayerModel(cent, ci); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 828 +INDIRP4 +ARGP4 +ADDRGP4 CG_ForceFPLSPlayerModel +CALLV +pop +line 6192 +;6192: cgFPLSState = cg_fpls.integer; +ADDRGP4 cgFPLSState +ADDRGP4 cg_fpls+12 +INDIRI4 +ASGNI4 +line 6193 +;6193: return; +ADDRGP4 $3077 +JUMPV +LABELV $3351 +line 6195 +;6194: } +;6195: } +LABELV $3348 +LABELV $3340 +line 6196 +;6196: } +LABELV $3327 +LABELV $3322 +line 6198 +;6197: +;6198: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $3355 +line 6199 +;6199: { +line 6200 +;6200: dead = qtrue; +ADDRLP4 864 +CNSTI4 1 +ASGNI4 +line 6204 +;6201: //rww - since our angles are fixed when we're dead this shouldn't be an issue anyway +;6202: //we need to render the dying/dead player because we are now spawning the body on respawn instead of death +;6203: //return; +;6204: } +LABELV $3355 +line 6206 +;6205: +;6206: ScaleModelAxis(&legs); +ADDRLP4 0 +ARGP4 +ADDRGP4 ScaleModelAxis +CALLV +pop +line 6208 +;6207: +;6208: memset( &torso, 0, sizeof(torso) ); +ADDRLP4 544 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 6210 +;6209: +;6210: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $3357 +line 6211 +;6211: { +line 6212 +;6212: goto doEssentialTwo; +ADDRGP4 $3359 +JUMPV +LABELV $3357 +line 6216 +;6213: } +;6214: +;6215: //rww - force speed "trail" effect +;6216: if (!(cent->currentState.powerups & (1 << PW_SPEED)) || doAlpha || !cg_speedTrail.integer) +ADDRLP4 1000 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +ADDRLP4 1000 +INDIRI4 +EQI4 $3364 +ADDRLP4 832 +INDIRI4 +ADDRLP4 1000 +INDIRI4 +NEI4 $3364 +ADDRGP4 cg_speedTrail+12 +INDIRI4 +ADDRLP4 1000 +INDIRI4 +NEI4 $3360 +LABELV $3364 +line 6217 +;6217: { +line 6218 +;6218: cent->frame_minus1_refreshed = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1464 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6219 +;6219: cent->frame_minus2_refreshed = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1468 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6220 +;6220: } +LABELV $3360 +line 6222 +;6221: +;6222: if (cent->frame_minus1.ghoul2 != cent->ghoul2) +ADDRLP4 1004 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1004 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 1004 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +EQU4 $3365 +line 6223 +;6223: { +line 6224 +;6224: cent->frame_minus1_refreshed = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1464 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6225 +;6225: } +LABELV $3365 +line 6226 +;6226: if (cent->frame_minus2.ghoul2 != cent->ghoul2) +ADDRLP4 1008 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1008 +INDIRP4 +CNSTI4 1460 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 1008 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +EQU4 $3367 +line 6227 +;6227: { +line 6228 +;6228: cent->frame_minus2_refreshed = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1468 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6229 +;6229: } +LABELV $3367 +line 6231 +;6230: +;6231: VectorCopy(cent->currentState.pos.trDelta, tDir); +ADDRLP4 264 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRB +ASGNB 12 +line 6233 +;6232: +;6233: distVelBase = SPEED_TRAIL_DISTANCE*(VectorNormalize(tDir)*0.004); +ADDRLP4 264 +ARGP4 +ADDRLP4 1012 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 764 +CNSTF4 1086324736 +CNSTF4 998445679 +ADDRLP4 1012 +INDIRF4 +MULF4 +MULF4 +CVFI4 4 +ASGNI4 +line 6235 +;6234: +;6235: if (cent->frame_minus1.ghoul2 && cent->frame_minus1_refreshed) +ADDRLP4 1016 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1016 +INDIRP4 +CNSTI4 1248 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3369 +ADDRLP4 1016 +INDIRP4 +CNSTI4 1464 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $3369 +line 6236 +;6236: { +line 6237 +;6237: cent->frame_minus1.renderfx |= RF_FORCE_ENT_ALPHA; +ADDRLP4 1020 +ADDRFP4 0 +INDIRP4 +CNSTI4 1044 +ADDP4 +ASGNP4 +ADDRLP4 1020 +INDIRP4 +ADDRLP4 1020 +INDIRP4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 6238 +;6238: cent->frame_minus1.shaderRGBA[3] = 100; +ADDRFP4 0 +INDIRP4 +CNSTI4 1123 +ADDP4 +CNSTU1 100 +ASGNU1 +line 6244 +;6239: +;6240: //rww - if the client gets a bad framerate we will only receive frame positions +;6241: //once per frame anyway, so we might end up with speed trails very spread out. +;6242: //in order to avoid that, we'll get the direction of the last trail from the player +;6243: //and place the trail refent a set distance from the player location this frame +;6244: VectorSubtract(cent->frame_minus1.origin, legs.origin, tDir); +ADDRLP4 1024 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 264 +ADDRLP4 1024 +INDIRP4 +CNSTI4 1092 +ADDP4 +INDIRF4 +ADDRLP4 0+52 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 264+4 +ADDRLP4 1024 +INDIRP4 +CNSTI4 1096 +ADDP4 +INDIRF4 +ADDRLP4 0+52+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 264+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 1100 +ADDP4 +INDIRF4 +ADDRLP4 0+52+8 +INDIRF4 +SUBF4 +ASGNF4 +line 6245 +;6245: VectorNormalize(tDir); +ADDRLP4 264 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 6247 +;6246: +;6247: cent->frame_minus1.origin[0] = legs.origin[0]+tDir[0]*distVelBase; +ADDRFP4 0 +INDIRP4 +CNSTI4 1092 +ADDP4 +ADDRLP4 0+52 +INDIRF4 +ADDRLP4 264 +INDIRF4 +ADDRLP4 764 +INDIRI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 6248 +;6248: cent->frame_minus1.origin[1] = legs.origin[1]+tDir[1]*distVelBase; +ADDRFP4 0 +INDIRP4 +CNSTI4 1096 +ADDP4 +ADDRLP4 0+52+4 +INDIRF4 +ADDRLP4 264+4 +INDIRF4 +ADDRLP4 764 +INDIRI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 6249 +;6249: cent->frame_minus1.origin[2] = legs.origin[2]+tDir[2]*distVelBase; +ADDRFP4 0 +INDIRP4 +CNSTI4 1100 +ADDP4 +ADDRLP4 0+52+8 +INDIRF4 +ADDRLP4 264+8 +INDIRF4 +ADDRLP4 764 +INDIRI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 6251 +;6250: +;6251: trap_R_AddRefEntityToScene(¢->frame_minus1); +ADDRFP4 0 +INDIRP4 +CNSTI4 1040 +ADDP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 6252 +;6252: } +LABELV $3369 +line 6254 +;6253: +;6254: if (cent->frame_minus2.ghoul2 && cent->frame_minus2_refreshed) +ADDRLP4 1020 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1020 +INDIRP4 +CNSTI4 1460 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3385 +ADDRLP4 1020 +INDIRP4 +CNSTI4 1468 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $3385 +line 6255 +;6255: { +line 6256 +;6256: cent->frame_minus2.renderfx |= RF_FORCE_ENT_ALPHA; +ADDRLP4 1024 +ADDRFP4 0 +INDIRP4 +CNSTI4 1256 +ADDP4 +ASGNP4 +ADDRLP4 1024 +INDIRP4 +ADDRLP4 1024 +INDIRP4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 6257 +;6257: cent->frame_minus2.shaderRGBA[3] = 50; +ADDRFP4 0 +INDIRP4 +CNSTI4 1335 +ADDP4 +CNSTU1 50 +ASGNU1 +line 6260 +;6258: +;6259: //Same as above but do it between trail points instead of the player and first trail entry +;6260: VectorSubtract(cent->frame_minus2.origin, cent->frame_minus1.origin, tDir); +ADDRLP4 1028 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 264 +ADDRLP4 1028 +INDIRP4 +CNSTI4 1304 +ADDP4 +INDIRF4 +ADDRLP4 1028 +INDIRP4 +CNSTI4 1092 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 264+4 +ADDRLP4 1028 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRF4 +ADDRLP4 1028 +INDIRP4 +CNSTI4 1096 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1032 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 264+8 +ADDRLP4 1032 +INDIRP4 +CNSTI4 1312 +ADDP4 +INDIRF4 +ADDRLP4 1032 +INDIRP4 +CNSTI4 1100 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 6261 +;6261: VectorNormalize(tDir); +ADDRLP4 264 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 6263 +;6262: +;6263: cent->frame_minus2.origin[0] = cent->frame_minus1.origin[0]+tDir[0]*distVelBase; +ADDRLP4 1036 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1036 +INDIRP4 +CNSTI4 1304 +ADDP4 +ADDRLP4 1036 +INDIRP4 +CNSTI4 1092 +ADDP4 +INDIRF4 +ADDRLP4 264 +INDIRF4 +ADDRLP4 764 +INDIRI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 6264 +;6264: cent->frame_minus2.origin[1] = cent->frame_minus1.origin[1]+tDir[1]*distVelBase; +ADDRLP4 1040 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1040 +INDIRP4 +CNSTI4 1308 +ADDP4 +ADDRLP4 1040 +INDIRP4 +CNSTI4 1096 +ADDP4 +INDIRF4 +ADDRLP4 264+4 +INDIRF4 +ADDRLP4 764 +INDIRI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 6265 +;6265: cent->frame_minus2.origin[2] = cent->frame_minus1.origin[2]+tDir[2]*distVelBase; +ADDRLP4 1044 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1044 +INDIRP4 +CNSTI4 1312 +ADDP4 +ADDRLP4 1044 +INDIRP4 +CNSTI4 1100 +ADDP4 +INDIRF4 +ADDRLP4 264+8 +INDIRF4 +ADDRLP4 764 +INDIRI4 +CVIF4 4 +MULF4 +ADDF4 +ASGNF4 +line 6267 +;6266: +;6267: trap_R_AddRefEntityToScene(¢->frame_minus2); +ADDRFP4 0 +INDIRP4 +CNSTI4 1252 +ADDP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 6268 +;6268: } +LABELV $3385 +LABELV $3359 +line 6271 +;6269: +;6270:doEssentialTwo: +;6271: VectorCopy(cent->turAngles, cg_entities[cent->currentState.number].turAngles); +ADDRLP4 1024 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 1024 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1016 +ADDP4 +ADDRLP4 1024 +INDIRP4 +CNSTI4 1016 +ADDP4 +INDIRB +ASGNB 12 +line 6272 +;6272: VectorCopy(legs.origin, cg_entities[cent->currentState.number].lerpOrigin); +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+928 +ADDP4 +ADDRLP4 0+52 +INDIRB +ASGNB 12 +line 6275 +;6273: +;6274: // get the animation state (after rotation, to allow feet shuffle) +;6275: CG_PlayerAnimation( cent, &legs.oldframe, &legs.frame, &legs.backlerp, +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0+124 +ARGP4 +ADDRLP4 0+104 +ARGP4 +ADDRLP4 0+128 +ARGP4 +ADDRLP4 544+124 +ARGP4 +ADDRLP4 544+104 +ARGP4 +ADDRLP4 544+128 +ARGP4 +ADDRGP4 CG_PlayerAnimation +CALLV +pop +line 6279 +;6276: &torso.oldframe, &torso.frame, &torso.backlerp ); +;6277: +;6278: //Need these set because we use them in other functions (cent pointer differs from cg_entities values) +;6279: cg_entities[cent->currentState.number].pe.torso.frame = cent->pe.torso.frame; +ADDRLP4 1028 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 1028 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+644+64+8 +ADDP4 +ADDRLP4 1028 +INDIRP4 +CNSTI4 716 +ADDP4 +INDIRI4 +ASGNI4 +line 6280 +;6280: cg_entities[cent->currentState.number].pe.legs.frame = cent->pe.legs.frame; +ADDRLP4 1032 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 1032 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+644+8 +ADDP4 +ADDRLP4 1032 +INDIRP4 +CNSTI4 652 +ADDP4 +INDIRI4 +ASGNI4 +line 6283 +;6281: +;6282: // add the talk baloon or disconnect icon +;6283: CG_PlayerSprites( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_PlayerSprites +CALLV +pop +line 6285 +;6284: +;6285: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $3405 +line 6286 +;6286: { //keep track of death anim frame for when we copy off the bodyqueue +line 6287 +;6287: cgs.clientinfo[cent->currentState.number].frame = cent->pe.torso.frame; +ADDRLP4 1036 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 788 +ADDRLP4 1036 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+76 +ADDP4 +ADDRLP4 1036 +INDIRP4 +CNSTI4 716 +ADDP4 +INDIRI4 +ASGNI4 +line 6288 +;6288: } +LABELV $3405 +line 6290 +;6289: +;6290: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $3409 +line 6291 +;6291: { +line 6292 +;6292: goto doEssentialThree; +ADDRGP4 $3411 +JUMPV +LABELV $3409 +line 6298 +;6293: } +;6294: +;6295: //rww - render effects multiple times to compensate for low framerate? This won't do much because +;6296: //the effect still gets rendered in this frame and expires, possibly before the next frame. So +;6297: //it is disabled for now (setting effectTimeLayer to 0 after one play) +;6298: if (cent->trailTime < cg.time) +ADDRFP4 0 +INDIRP4 +CNSTI4 612 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $3412 +line 6299 +;6299: { +line 6300 +;6300: cent->trailTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 612 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 6301 +;6301: } +LABELV $3412 +line 6304 +;6302: +;6303: //compensate for up to 300ms +;6304: effectTimeLayer = (300 - (cent->trailTime - cg.time)); +ADDRLP4 756 +CNSTI4 300 +ADDRFP4 0 +INDIRP4 +CNSTI4 612 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +SUBI4 +ASGNI4 +line 6306 +;6305: +;6306: if (effectTimeLayer < 50) +ADDRLP4 756 +INDIRI4 +CNSTI4 50 +GEI4 $3417 +line 6307 +;6307: { //play at least once +line 6308 +;6308: effectTimeLayer = 50; +ADDRLP4 756 +CNSTI4 50 +ASGNI4 +line 6309 +;6309: } +LABELV $3417 +line 6311 +;6310: +;6311: cent->trailTime = cg.time + 300; +ADDRFP4 0 +INDIRP4 +CNSTI4 612 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 300 +ADDI4 +ASGNI4 +line 6313 +;6312: +;6313: if (cent->currentState.activeForcePass > FORCE_LEVEL_3) +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +CNSTI4 3 +LEI4 $3420 +line 6314 +;6314: { +line 6315 +;6315: int effectTimeLayerL = effectTimeLayer; +ADDRLP4 1036 +ADDRLP4 756 +INDIRI4 +ASGNI4 +line 6319 +;6316: +;6317: vec3_t axis[3]; +;6318: vec3_t tAng, fAng, fxDir; +;6319: int realForceLev = (cent->currentState.activeForcePass - FORCE_LEVEL_3); +ADDRLP4 1040 +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +CNSTI4 3 +SUBI4 +ASGNI4 +line 6321 +;6320: +;6321: VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); +ADDRLP4 1116 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1092 +ADDRLP4 1116 +INDIRP4 +CNSTI4 1016 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1092+4 +ADDRLP4 1116 +INDIRP4 +CNSTI4 1020 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1092+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 1024 +ADDP4 +INDIRF4 +ASGNF4 +line 6323 +;6322: +;6323: VectorSet( fAng, cent->pe.torso.pitchAngle, cent->pe.torso.yawAngle, 0 ); +ADDRLP4 1120 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1080 +ADDRLP4 1120 +INDIRP4 +CNSTI4 736 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1080+4 +ADDRLP4 1120 +INDIRP4 +CNSTI4 728 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1080+8 +CNSTF4 0 +ASGNF4 +line 6325 +;6324: +;6325: AngleVectors( fAng, fxDir, NULL, NULL ); +ADDRLP4 1080 +ARGP4 +ADDRLP4 1104 +ARGP4 +ADDRLP4 1124 +CNSTP4 0 +ASGNP4 +ADDRLP4 1124 +INDIRP4 +ARGP4 +ADDRLP4 1124 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 6328 +;6326: +;6327: //trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +;6328: if (!gotLHandMatrix) +ADDRLP4 772 +INDIRI4 +CNSTI4 0 +NEI4 $3426 +line 6329 +;6329: { +line 6330 +;6330: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 1128 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1128 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 788 +ADDRLP4 1128 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+516 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 488 +ARGP4 +ADDRLP4 1128 +INDIRP4 +CNSTI4 1016 +ADDP4 +ARGP4 +ADDRLP4 1128 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 1128 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 6331 +;6331: gotLHandMatrix = qtrue; +ADDRLP4 772 +CNSTI4 1 +ASGNI4 +line 6332 +;6332: } +LABELV $3426 +line 6334 +;6333: +;6334: efOrg[0] = lHandMatrix.matrix[0][3]; +ADDRLP4 240 +ADDRLP4 488+12 +INDIRF4 +ASGNF4 +line 6335 +;6335: efOrg[1] = lHandMatrix.matrix[1][3]; +ADDRLP4 240+4 +ADDRLP4 488+16+12 +INDIRF4 +ASGNF4 +line 6336 +;6336: efOrg[2] = lHandMatrix.matrix[2][3]; +ADDRLP4 240+8 +ADDRLP4 488+32+12 +INDIRF4 +ASGNF4 +line 6338 +;6337: +;6338: AnglesToAxis( fAng, axis ); +ADDRLP4 1080 +ARGP4 +ADDRLP4 1044 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +ADDRGP4 $3440 +JUMPV +LABELV $3439 +line 6341 +;6339: +;6340: while (effectTimeLayerL > 0) +;6341: { +line 6342 +;6342: if ( realForceLev > FORCE_LEVEL_2 ) +ADDRLP4 1040 +INDIRI4 +CNSTI4 2 +LEI4 $3442 +line 6343 +;6343: {//arc +line 6345 +;6344: //trap_FX_PlayEffectID( cgs.effects.forceLightningWide, efOrg, fxDir ); +;6345: trap_FX_PlayEntityEffectID(cgs.effects.forceDrainWide, efOrg, axis, cent->boltInfo, cent->currentState.number); +ADDRGP4 cgs+71564+156 +INDIRI4 +ARGI4 +ADDRLP4 240 +ARGP4 +ADDRLP4 1044 +ARGP4 +ADDRLP4 1128 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1128 +INDIRP4 +CNSTI4 980 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1128 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_FX_PlayEntityEffectID +CALLV +pop +line 6346 +;6346: } +ADDRGP4 $3443 +JUMPV +LABELV $3442 +line 6348 +;6347: else +;6348: {//line +line 6350 +;6349: //trap_FX_PlayEffectID( cgs.effects.forceLightning, efOrg, fxDir ); +;6350: trap_FX_PlayEntityEffectID(cgs.effects.forceDrain, efOrg, axis, cent->boltInfo, cent->currentState.number); +ADDRGP4 cgs+71564+152 +INDIRI4 +ARGI4 +ADDRLP4 240 +ARGP4 +ADDRLP4 1044 +ARGP4 +ADDRLP4 1128 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1128 +INDIRP4 +CNSTI4 980 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1128 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_FX_PlayEntityEffectID +CALLV +pop +line 6351 +;6351: } +LABELV $3443 +line 6353 +;6352: +;6353: effectTimeLayerL = 0;//-= 50; +ADDRLP4 1036 +CNSTI4 0 +ASGNI4 +line 6354 +;6354: } +LABELV $3440 +line 6340 +ADDRLP4 1036 +INDIRI4 +CNSTI4 0 +GTI4 $3439 +line 6363 +;6355: +;6356: /* +;6357: if (cent->bolt4 < cg.time) +;6358: { +;6359: cent->bolt4 = cg.time + 100; +;6360: trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/force/drain.wav") ); +;6361: } +;6362: */ +;6363: } +ADDRGP4 $3421 +JUMPV +LABELV $3420 +line 6364 +;6364: else if ( cent->currentState.activeForcePass ) +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $3448 +line 6365 +;6365: {//doing the electrocuting +line 6366 +;6366: int effectTimeLayerL = effectTimeLayer; +ADDRLP4 1036 +ADDRLP4 756 +INDIRI4 +ASGNI4 +line 6370 +;6367: +;6368: vec3_t axis[3]; +;6369: vec3_t tAng, fAng, fxDir; +;6370: VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); +ADDRLP4 1112 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1088 +ADDRLP4 1112 +INDIRP4 +CNSTI4 1016 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1088+4 +ADDRLP4 1112 +INDIRP4 +CNSTI4 1020 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1088+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 1024 +ADDP4 +INDIRF4 +ASGNF4 +line 6372 +;6371: +;6372: VectorSet( fAng, cent->pe.torso.pitchAngle, cent->pe.torso.yawAngle, 0 ); +ADDRLP4 1116 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1076 +ADDRLP4 1116 +INDIRP4 +CNSTI4 736 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1076+4 +ADDRLP4 1116 +INDIRP4 +CNSTI4 728 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1076+8 +CNSTF4 0 +ASGNF4 +line 6374 +;6373: +;6374: AngleVectors( fAng, fxDir, NULL, NULL ); +ADDRLP4 1076 +ARGP4 +ADDRLP4 1100 +ARGP4 +ADDRLP4 1120 +CNSTP4 0 +ASGNP4 +ADDRLP4 1120 +INDIRP4 +ARGP4 +ADDRLP4 1120 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 6377 +;6375: +;6376: //trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +;6377: if (!gotLHandMatrix) +ADDRLP4 772 +INDIRI4 +CNSTI4 0 +NEI4 $3454 +line 6378 +;6378: { +line 6379 +;6379: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 1124 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1124 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 788 +ADDRLP4 1124 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+516 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 488 +ARGP4 +ADDRLP4 1124 +INDIRP4 +CNSTI4 1016 +ADDP4 +ARGP4 +ADDRLP4 1124 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 1124 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 6380 +;6380: gotLHandMatrix = qtrue; +ADDRLP4 772 +CNSTI4 1 +ASGNI4 +line 6381 +;6381: } +LABELV $3454 +line 6383 +;6382: +;6383: efOrg[0] = lHandMatrix.matrix[0][3]; +ADDRLP4 240 +ADDRLP4 488+12 +INDIRF4 +ASGNF4 +line 6384 +;6384: efOrg[1] = lHandMatrix.matrix[1][3]; +ADDRLP4 240+4 +ADDRLP4 488+16+12 +INDIRF4 +ASGNF4 +line 6385 +;6385: efOrg[2] = lHandMatrix.matrix[2][3]; +ADDRLP4 240+8 +ADDRLP4 488+32+12 +INDIRF4 +ASGNF4 +line 6387 +;6386: +;6387: AnglesToAxis( fAng, axis ); +ADDRLP4 1076 +ARGP4 +ADDRLP4 1040 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +ADDRGP4 $3468 +JUMPV +LABELV $3467 +line 6390 +;6388: +;6389: while (effectTimeLayerL > 0) +;6390: { +line 6391 +;6391: if ( cent->currentState.activeForcePass > FORCE_LEVEL_2 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +CNSTI4 2 +LEI4 $3470 +line 6392 +;6392: {//arc +line 6394 +;6393: //trap_FX_PlayEffectID( cgs.effects.forceLightningWide, efOrg, fxDir ); +;6394: trap_FX_PlayEntityEffectID(cgs.effects.forceLightningWide, efOrg, axis, cent->boltInfo, cent->currentState.number); +ADDRGP4 cgs+71564+148 +INDIRI4 +ARGI4 +ADDRLP4 240 +ARGP4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 1124 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1124 +INDIRP4 +CNSTI4 980 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1124 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_FX_PlayEntityEffectID +CALLV +pop +line 6395 +;6395: } +ADDRGP4 $3471 +JUMPV +LABELV $3470 +line 6397 +;6396: else +;6397: {//line +line 6399 +;6398: //trap_FX_PlayEffectID( cgs.effects.forceLightning, efOrg, fxDir ); +;6399: trap_FX_PlayEntityEffectID(cgs.effects.forceLightning, efOrg, axis, cent->boltInfo, cent->currentState.number); +ADDRGP4 cgs+71564+144 +INDIRI4 +ARGI4 +ADDRLP4 240 +ARGP4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 1124 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1124 +INDIRP4 +CNSTI4 980 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1124 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_FX_PlayEntityEffectID +CALLV +pop +line 6400 +;6400: } +LABELV $3471 +line 6402 +;6401: +;6402: effectTimeLayerL = 0;//-= 50; +ADDRLP4 1036 +CNSTI4 0 +ASGNI4 +line 6403 +;6403: } +LABELV $3468 +line 6389 +ADDRLP4 1036 +INDIRI4 +CNSTI4 0 +GTI4 $3467 +line 6412 +;6404: +;6405: /* +;6406: if (cent->bolt4 < cg.time) +;6407: { +;6408: cent->bolt4 = cg.time + 100; +;6409: trap_S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/force/lightning.wav") ); +;6410: } +;6411: */ +;6412: } +LABELV $3448 +LABELV $3421 +line 6414 +;6413: +;6414: if ( cent->currentState.powerups & (1 << PW_DISINT_4) ) +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $3476 +line 6415 +;6415: { +line 6418 +;6416: vec3_t tAng; +;6417: //VectorSet( tAng, 0, cent->pe.torso.yawAngle, 0 ); +;6418: VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); +ADDRLP4 1048 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1036 +ADDRLP4 1048 +INDIRP4 +CNSTI4 1016 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1036+4 +ADDRLP4 1048 +INDIRP4 +CNSTI4 1020 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1036+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 1024 +ADDP4 +INDIRF4 +ASGNF4 +line 6421 +;6419: +;6420: //trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +;6421: if (!gotLHandMatrix) +ADDRLP4 772 +INDIRI4 +CNSTI4 0 +NEI4 $3480 +line 6422 +;6422: { +line 6423 +;6423: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 1052 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1052 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 788 +ADDRLP4 1052 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+516 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 488 +ARGP4 +ADDRLP4 1052 +INDIRP4 +CNSTI4 1016 +ADDP4 +ARGP4 +ADDRLP4 1052 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 1052 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 6424 +;6424: gotLHandMatrix = qtrue; +ADDRLP4 772 +CNSTI4 1 +ASGNI4 +line 6425 +;6425: } +LABELV $3480 +line 6427 +;6426: +;6427: efOrg[0] = lHandMatrix.matrix[0][3]; +ADDRLP4 240 +ADDRLP4 488+12 +INDIRF4 +ASGNF4 +line 6428 +;6428: efOrg[1] = lHandMatrix.matrix[1][3]; +ADDRLP4 240+4 +ADDRLP4 488+16+12 +INDIRF4 +ASGNF4 +line 6429 +;6429: efOrg[2] = lHandMatrix.matrix[2][3]; +ADDRLP4 240+8 +ADDRLP4 488+32+12 +INDIRF4 +ASGNF4 +line 6431 +;6430: +;6431: if ( (cent->currentState.forcePowersActive & (1 << FP_GRIP)) && +ADDRLP4 1052 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1056 +CNSTI4 0 +ASGNI4 +ADDRLP4 1052 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 64 +BANDI4 +ADDRLP4 1056 +INDIRI4 +EQI4 $3493 +ADDRGP4 cg+88 +INDIRI4 +ADDRLP4 1056 +INDIRI4 +NEI4 $3497 +ADDRLP4 1052 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $3493 +LABELV $3497 +line 6433 +;6432: (cg.renderingThirdPerson || cent->currentState.number != cg.snap->ps.clientNum) ) +;6433: { +line 6436 +;6434: vec3_t boltDir; +;6435: vec3_t origBolt; +;6436: VectorCopy(efOrg, origBolt); +ADDRLP4 1072 +ADDRLP4 240 +INDIRB +ASGNB 12 +line 6437 +;6437: trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_Y, boltDir ); +ADDRLP4 488 +ARGP4 +CNSTI4 6 +ARGI4 +ADDRLP4 1060 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 6439 +;6438: +;6439: CG_ForceGripEffect( efOrg ); +ADDRLP4 240 +ARGP4 +ADDRGP4 CG_ForceGripEffect +CALLV +pop +line 6440 +;6440: CG_ForceGripEffect( efOrg ); +ADDRLP4 240 +ARGP4 +ADDRGP4 CG_ForceGripEffect +CALLV +pop +line 6443 +;6441: +;6442: //Render a scaled version of the model's hand with a n337 looking shader +;6443: { +line 6448 +;6444: const char *rotateBone; +;6445: char *limbName; +;6446: char *limbCapName; +;6447: vec3_t armAng; +;6448: float wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; +CNSTF4 994352038 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 1112 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 1096 +CNSTF4 1034147594 +ADDRLP4 1112 +INDIRF4 +MULF4 +CNSTF4 1036831949 +ADDF4 +ASGNF4 +line 6450 +;6449: +;6450: rotateBone = "lradius"; +ADDRLP4 1100 +ADDRGP4 $3499 +ASGNP4 +line 6451 +;6451: limbName = "l_arm"; +ADDRLP4 1104 +ADDRGP4 $3500 +ASGNP4 +line 6452 +;6452: limbCapName = "l_arm_cap_torso_off"; +ADDRLP4 1108 +ADDRGP4 $3501 +ASGNP4 +line 6454 +;6453: +;6454: if (cent->grip_arm.ghoul2 && trap_G2_HaveWeGhoul2Models(cent->grip_arm.ghoul2)) +ADDRLP4 1116 +ADDRFP4 0 +INDIRP4 +CNSTI4 1900 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 1116 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3502 +ADDRLP4 1116 +INDIRP4 +ARGP4 +ADDRLP4 1120 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 1120 +INDIRI4 +CNSTI4 0 +EQI4 $3502 +line 6455 +;6455: { +line 6456 +;6456: trap_G2API_CleanGhoul2Models(&(cent->grip_arm.ghoul2)); +ADDRFP4 0 +INDIRP4 +CNSTI4 1900 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 6457 +;6457: } +LABELV $3502 +line 6459 +;6458: +;6459: memset( ¢->grip_arm, 0, sizeof(cent->grip_arm) ); +ADDRFP4 0 +INDIRP4 +CNSTI4 1692 +ADDP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 6461 +;6460: +;6461: VectorCopy(origBolt, efOrg); +ADDRLP4 240 +ADDRLP4 1072 +INDIRB +ASGNB 12 +line 6462 +;6462: trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_Y, boltDir ); +ADDRLP4 488 +ARGP4 +CNSTI4 6 +ARGI4 +ADDRLP4 1060 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 6463 +;6463: efOrg[0] += boltDir[0]*8; +ADDRLP4 240 +ADDRLP4 240 +INDIRF4 +CNSTF4 1090519040 +ADDRLP4 1060 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 6464 +;6464: efOrg[1] += boltDir[1]*8; +ADDRLP4 240+4 +ADDRLP4 240+4 +INDIRF4 +CNSTF4 1090519040 +ADDRLP4 1060+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 6465 +;6465: efOrg[2] += boltDir[2]*8; +ADDRLP4 240+8 +ADDRLP4 240+8 +INDIRF4 +CNSTF4 1090519040 +ADDRLP4 1060+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 6466 +;6466: trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_X, boltDir ); +ADDRLP4 488 +ARGP4 +CNSTI4 4 +ARGI4 +ADDRLP4 1060 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 6467 +;6467: efOrg[0] -= boltDir[0]*4; +ADDRLP4 240 +ADDRLP4 240 +INDIRF4 +CNSTF4 1082130432 +ADDRLP4 1060 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 6468 +;6468: efOrg[1] -= boltDir[1]*4; +ADDRLP4 240+4 +ADDRLP4 240+4 +INDIRF4 +CNSTF4 1082130432 +ADDRLP4 1060+4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 6469 +;6469: efOrg[2] -= boltDir[2]*4; +ADDRLP4 240+8 +ADDRLP4 240+8 +INDIRF4 +CNSTF4 1082130432 +ADDRLP4 1060+8 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 6472 +;6470: +;6471: //efOrg[2] += 8; +;6472: efOrg[2] -= 4; +ADDRLP4 240+8 +ADDRLP4 240+8 +INDIRF4 +CNSTF4 1082130432 +SUBF4 +ASGNF4 +line 6474 +;6473: +;6474: VectorCopy(efOrg, cent->grip_arm.origin); +ADDRFP4 0 +INDIRP4 +CNSTI4 1744 +ADDP4 +ADDRLP4 240 +INDIRB +ASGNB 12 +line 6475 +;6475: VectorCopy(cent->grip_arm.origin, cent->grip_arm.lightingOrigin); +ADDRLP4 1124 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1124 +INDIRP4 +CNSTI4 1800 +ADDP4 +ADDRLP4 1124 +INDIRP4 +CNSTI4 1744 +ADDP4 +INDIRB +ASGNB 12 +line 6478 +;6476: +;6477: //VectorCopy(cent->lerpAngles, armAng); +;6478: VectorAdd(vec3_origin, rootAngles, armAng); +ADDRLP4 1084 +ADDRGP4 vec3_origin +INDIRF4 +ADDRLP4 840 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1084+4 +ADDRGP4 vec3_origin+4 +INDIRF4 +ADDRLP4 840+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1084+8 +ADDRGP4 vec3_origin+8 +INDIRF4 +ADDRLP4 840+8 +INDIRF4 +ADDF4 +ASGNF4 +line 6480 +;6479: //armAng[ROLL] = -90; +;6480: armAng[ROLL] = 0; +ADDRLP4 1084+8 +CNSTF4 0 +ASGNF4 +line 6481 +;6481: armAng[PITCH] = 0; +ADDRLP4 1084 +CNSTF4 0 +ASGNF4 +line 6482 +;6482: AnglesToAxis(armAng, cent->grip_arm.axis); +ADDRLP4 1084 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1704 +ADDP4 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 6484 +;6483: +;6484: trap_G2API_DuplicateGhoul2Instance(cent->ghoul2, ¢->grip_arm.ghoul2); +ADDRLP4 1128 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1128 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1128 +INDIRP4 +CNSTI4 1900 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_DuplicateGhoul2Instance +CALLV +pop +line 6486 +;6485: +;6486: trap_G2API_SetRootSurface(cent->grip_arm.ghoul2, 0, limbName); +ADDRFP4 0 +INDIRP4 +CNSTI4 1900 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1104 +INDIRP4 +ARGP4 +ADDRGP4 trap_G2API_SetRootSurface +CALLI4 +pop +line 6487 +;6487: trap_G2API_SetNewOrigin(cent->grip_arm.ghoul2, trap_G2API_AddBolt(cent->grip_arm.ghoul2, 0, rotateBone)); +ADDRFP4 0 +INDIRP4 +CNSTI4 1900 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1100 +INDIRP4 +ARGP4 +ADDRLP4 1132 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1900 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1132 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetNewOrigin +CALLI4 +pop +line 6488 +;6488: trap_G2API_SetSurfaceOnOff(cent->grip_arm.ghoul2, limbCapName, 0); +ADDRFP4 0 +INDIRP4 +CNSTI4 1900 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1108 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 trap_G2API_SetSurfaceOnOff +CALLI4 +pop +line 6490 +;6489: +;6490: cent->grip_arm.modelScale[0] = 1;//+(wv*6); +ADDRFP4 0 +INDIRP4 +CNSTI4 1888 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 6491 +;6491: cent->grip_arm.modelScale[1] = 1;//+(wv*6); +ADDRFP4 0 +INDIRP4 +CNSTI4 1892 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 6492 +;6492: cent->grip_arm.modelScale[2] = 1;//+(wv*6); +ADDRFP4 0 +INDIRP4 +CNSTI4 1896 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 6493 +;6493: ScaleModelAxis(¢->grip_arm); +ADDRFP4 0 +INDIRP4 +CNSTI4 1692 +ADDP4 +ARGP4 +ADDRGP4 ScaleModelAxis +CALLV +pop +line 6495 +;6494: +;6495: cent->grip_arm.radius = 64; +ADDRFP4 0 +INDIRP4 +CNSTI4 1784 +ADDP4 +CNSTF4 1115684864 +ASGNF4 +line 6497 +;6496: +;6497: cent->grip_arm.customShader = trap_R_RegisterShader( "gfx/misc/red_portashield" ); +ADDRGP4 $3520 +ARGP4 +ADDRLP4 1136 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1768 +ADDP4 +ADDRLP4 1136 +INDIRI4 +ASGNI4 +line 6499 +;6498: +;6499: cent->grip_arm.renderfx |= RF_RGB_TINT; +ADDRLP4 1140 +ADDRFP4 0 +INDIRP4 +CNSTI4 1696 +ADDP4 +ASGNP4 +ADDRLP4 1140 +INDIRP4 +ADDRLP4 1140 +INDIRP4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 6500 +;6500: cent->grip_arm.shaderRGBA[0] = 255 - (wv*900); +ADDRLP4 1148 +CNSTF4 1132396544 +CNSTF4 1147207680 +ADDRLP4 1096 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +ADDRLP4 1152 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1148 +INDIRF4 +ADDRLP4 1152 +INDIRF4 +LTF4 $3522 +ADDRLP4 1144 +ADDRLP4 1148 +INDIRF4 +ADDRLP4 1152 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $3523 +JUMPV +LABELV $3522 +ADDRLP4 1144 +ADDRLP4 1148 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $3523 +ADDRFP4 0 +INDIRP4 +CNSTI4 1772 +ADDP4 +ADDRLP4 1144 +INDIRU4 +CVUU1 4 +ASGNU1 +line 6501 +;6501: if (cent->grip_arm.shaderRGBA[0] < 30) +ADDRFP4 0 +INDIRP4 +CNSTI4 1772 +ADDP4 +INDIRU1 +CVUI4 1 +CNSTI4 30 +GEI4 $3524 +line 6502 +;6502: { +line 6503 +;6503: cent->grip_arm.shaderRGBA[0] = 30; +ADDRFP4 0 +INDIRP4 +CNSTI4 1772 +ADDP4 +CNSTU1 30 +ASGNU1 +line 6504 +;6504: } +LABELV $3524 +line 6505 +;6505: if (cent->grip_arm.shaderRGBA[0] > 255) +ADDRFP4 0 +INDIRP4 +CNSTI4 1772 +ADDP4 +INDIRU1 +CVUI4 1 +CNSTI4 255 +LEI4 $3526 +line 6506 +;6506: { +line 6507 +;6507: cent->grip_arm.shaderRGBA[0] = 255; +ADDRFP4 0 +INDIRP4 +CNSTI4 1772 +ADDP4 +CNSTU1 255 +ASGNU1 +line 6508 +;6508: } +LABELV $3526 +line 6509 +;6509: cent->grip_arm.shaderRGBA[1] = cent->grip_arm.shaderRGBA[2] = cent->grip_arm.shaderRGBA[0]; +ADDRLP4 1156 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1160 +ADDRLP4 1156 +INDIRP4 +CNSTI4 1772 +ADDP4 +INDIRU1 +ASGNU1 +ADDRLP4 1156 +INDIRP4 +CNSTI4 1774 +ADDP4 +ADDRLP4 1160 +INDIRU1 +ASGNU1 +ADDRLP4 1156 +INDIRP4 +CNSTI4 1773 +ADDP4 +ADDRLP4 1160 +INDIRU1 +ASGNU1 +line 6511 +;6510: +;6511: trap_R_AddRefEntityToScene( ¢->grip_arm ); +ADDRFP4 0 +INDIRP4 +CNSTI4 1692 +ADDP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 6512 +;6512: } +line 6513 +;6513: } +ADDRGP4 $3494 +JUMPV +LABELV $3493 +line 6514 +;6514: else if (!(cent->currentState.forcePowersActive & (1 << FP_GRIP))) +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 64 +BANDI4 +CNSTI4 0 +NEI4 $3528 +line 6515 +;6515: { +line 6516 +;6516: CG_ForcePushBlur( efOrg ); +ADDRLP4 240 +ARGP4 +ADDRGP4 CG_ForcePushBlur +CALLV +pop +line 6517 +;6517: } +LABELV $3528 +LABELV $3494 +line 6518 +;6518: } +LABELV $3476 +line 6520 +;6519: +;6520: if (cent->currentState.weapon == WP_STUN_BATON && cent->currentState.number == cg.snap->ps.clientNum) +ADDRLP4 1036 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1036 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $3530 +ADDRLP4 1036 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $3530 +line 6521 +;6521: { +line 6522 +;6522: trap_S_AddLoopingSound( cent->currentState.number, cg.refdef.vieworg, vec3_origin, +ADDRGP4 $3535 +ARGP4 +ADDRLP4 1040 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+3616+24 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 1040 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddLoopingSound +CALLV +pop +line 6524 +;6523: trap_S_RegisterSound( "sound/weapons/baton/idle.wav" ) ); +;6524: } +LABELV $3530 +line 6528 +;6525: +;6526: //NOTE: All effects that should be visible during mindtrick should go above here +;6527: +;6528: if (iwantout) +ADDRLP4 768 +INDIRI4 +CNSTI4 0 +EQI4 $3536 +line 6529 +;6529: { +line 6530 +;6530: goto stillDoSaber; +ADDRGP4 $3538 +JUMPV +LABELV $3536 +line 6533 +;6531: //return; +;6532: } +;6533: else if (doAlpha) +ADDRLP4 832 +INDIRI4 +CNSTI4 0 +EQI4 $3539 +line 6534 +;6534: { +line 6535 +;6535: legs.renderfx |= RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 6536 +;6536: legs.shaderRGBA[3] = cent->trickAlpha; +ADDRLP4 0+80+3 +ADDRFP4 0 +INDIRP4 +CNSTI4 1904 +ADDP4 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 6538 +;6537: +;6538: if (legs.shaderRGBA[3] < 1) +ADDRLP4 0+80+3 +INDIRU1 +CVUI4 1 +CNSTI4 1 +GEI4 $3544 +line 6539 +;6539: { //don't cancel it out even if it's < 1 +line 6540 +;6540: legs.shaderRGBA[3] = 1; +ADDRLP4 0+80+3 +CNSTU1 1 +ASGNU1 +line 6541 +;6541: } +LABELV $3544 +line 6542 +;6542: } +LABELV $3539 +line 6544 +;6543: +;6544: if (cg_entities[cent->currentState.number].teamPowerEffectTime > cg.time) +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1912 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $3550 +line 6545 +;6545: { +line 6546 +;6546: if (cg_entities[cent->currentState.number].teamPowerType == 3) +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1916 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $3554 +line 6547 +;6547: { //absorb is a somewhat different effect entirely +line 6549 +;6548: //Guess I'll take care of it where it's always been, just checking these values instead. +;6549: } +ADDRGP4 $3555 +JUMPV +LABELV $3554 +line 6551 +;6550: else +;6551: { +line 6555 +;6552: vec4_t preCol; +;6553: int preRFX; +;6554: +;6555: preRFX = legs.renderfx; +ADDRLP4 1056 +ADDRLP4 0+4 +INDIRI4 +ASGNI4 +line 6557 +;6556: +;6557: legs.renderfx |= RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 6558 +;6558: legs.renderfx |= RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 6560 +;6559: +;6560: preCol[0] = legs.shaderRGBA[0]; +ADDRLP4 1040 +ADDRLP4 0+80 +INDIRU1 +CVUI4 1 +CVIF4 4 +ASGNF4 +line 6561 +;6561: preCol[1] = legs.shaderRGBA[1]; +ADDRLP4 1040+4 +ADDRLP4 0+80+1 +INDIRU1 +CVUI4 1 +CVIF4 4 +ASGNF4 +line 6562 +;6562: preCol[2] = legs.shaderRGBA[2]; +ADDRLP4 1040+8 +ADDRLP4 0+80+2 +INDIRU1 +CVUI4 1 +CVIF4 4 +ASGNF4 +line 6563 +;6563: preCol[3] = legs.shaderRGBA[3]; +ADDRLP4 1040+12 +ADDRLP4 0+80+3 +INDIRU1 +CVUI4 1 +CVIF4 4 +ASGNF4 +line 6565 +;6564: +;6565: if (cg_entities[cent->currentState.number].teamPowerType == 1) +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1916 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $3570 +line 6566 +;6566: { //heal +line 6567 +;6567: legs.shaderRGBA[0] = 0; +ADDRLP4 0+80 +CNSTU1 0 +ASGNU1 +line 6568 +;6568: legs.shaderRGBA[1] = 255; +ADDRLP4 0+80+1 +CNSTU1 255 +ASGNU1 +line 6569 +;6569: legs.shaderRGBA[2] = 0; +ADDRLP4 0+80+2 +CNSTU1 0 +ASGNU1 +line 6570 +;6570: } +ADDRGP4 $3571 +JUMPV +LABELV $3570 +line 6571 +;6571: else if (cg_entities[cent->currentState.number].teamPowerType == 0) +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1916 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $3578 +line 6572 +;6572: { //regen +line 6573 +;6573: legs.shaderRGBA[0] = 0; +ADDRLP4 0+80 +CNSTU1 0 +ASGNU1 +line 6574 +;6574: legs.shaderRGBA[1] = 0; +ADDRLP4 0+80+1 +CNSTU1 0 +ASGNU1 +line 6575 +;6575: legs.shaderRGBA[2] = 255; +ADDRLP4 0+80+2 +CNSTU1 255 +ASGNU1 +line 6576 +;6576: } +ADDRGP4 $3579 +JUMPV +LABELV $3578 +line 6578 +;6577: else +;6578: { //drain +line 6579 +;6579: legs.shaderRGBA[0] = 255; +ADDRLP4 0+80 +CNSTU1 255 +ASGNU1 +line 6580 +;6580: legs.shaderRGBA[1] = 0; +ADDRLP4 0+80+1 +CNSTU1 0 +ASGNU1 +line 6581 +;6581: legs.shaderRGBA[2] = 0; +ADDRLP4 0+80+2 +CNSTU1 0 +ASGNU1 +line 6582 +;6582: } +LABELV $3579 +LABELV $3571 +line 6584 +;6583: +;6584: legs.shaderRGBA[3] = ((cg_entities[cent->currentState.number].teamPowerEffectTime - cg.time)/8); +ADDRLP4 0+80+3 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1912 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CNSTI4 8 +DIVI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 6586 +;6585: +;6586: legs.customShader = trap_R_RegisterShader( "powerups/ysalimarishell" ); +ADDRGP4 $3596 +ARGP4 +ADDRLP4 1060 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0+76 +ADDRLP4 1060 +INDIRI4 +ASGNI4 +line 6587 +;6587: trap_R_AddRefEntityToScene(&legs); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 6589 +;6588: +;6589: legs.customShader = 0; +ADDRLP4 0+76 +CNSTI4 0 +ASGNI4 +line 6590 +;6590: legs.renderfx = preRFX; +ADDRLP4 0+4 +ADDRLP4 1056 +INDIRI4 +ASGNI4 +line 6591 +;6591: legs.shaderRGBA[0] = preCol[0]; +ADDRLP4 1068 +ADDRLP4 1040 +INDIRF4 +ASGNF4 +ADDRLP4 1072 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1068 +INDIRF4 +ADDRLP4 1072 +INDIRF4 +LTF4 $3601 +ADDRLP4 1064 +ADDRLP4 1068 +INDIRF4 +ADDRLP4 1072 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $3602 +JUMPV +LABELV $3601 +ADDRLP4 1064 +ADDRLP4 1068 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $3602 +ADDRLP4 0+80 +ADDRLP4 1064 +INDIRU4 +CVUU1 4 +ASGNU1 +line 6592 +;6592: legs.shaderRGBA[1] = preCol[1]; +ADDRLP4 1080 +ADDRLP4 1040+4 +INDIRF4 +ASGNF4 +ADDRLP4 1084 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1080 +INDIRF4 +ADDRLP4 1084 +INDIRF4 +LTF4 $3607 +ADDRLP4 1076 +ADDRLP4 1080 +INDIRF4 +ADDRLP4 1084 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $3608 +JUMPV +LABELV $3607 +ADDRLP4 1076 +ADDRLP4 1080 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $3608 +ADDRLP4 0+80+1 +ADDRLP4 1076 +INDIRU4 +CVUU1 4 +ASGNU1 +line 6593 +;6593: legs.shaderRGBA[2] = preCol[2]; +ADDRLP4 1092 +ADDRLP4 1040+8 +INDIRF4 +ASGNF4 +ADDRLP4 1096 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1092 +INDIRF4 +ADDRLP4 1096 +INDIRF4 +LTF4 $3613 +ADDRLP4 1088 +ADDRLP4 1092 +INDIRF4 +ADDRLP4 1096 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $3614 +JUMPV +LABELV $3613 +ADDRLP4 1088 +ADDRLP4 1092 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $3614 +ADDRLP4 0+80+2 +ADDRLP4 1088 +INDIRU4 +CVUU1 4 +ASGNU1 +line 6594 +;6594: legs.shaderRGBA[3] = preCol[3]; +ADDRLP4 1104 +ADDRLP4 1040+12 +INDIRF4 +ASGNF4 +ADDRLP4 1108 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1104 +INDIRF4 +ADDRLP4 1108 +INDIRF4 +LTF4 $3619 +ADDRLP4 1100 +ADDRLP4 1104 +INDIRF4 +ADDRLP4 1108 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $3620 +JUMPV +LABELV $3619 +ADDRLP4 1100 +ADDRLP4 1104 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $3620 +ADDRLP4 0+80+3 +ADDRLP4 1100 +INDIRU4 +CVUU1 4 +ASGNU1 +line 6595 +;6595: } +LABELV $3555 +line 6596 +;6596: } +LABELV $3550 +line 6599 +;6597: +;6598: //If you've tricked this client. +;6599: if (CG_IsMindTricked(cg.snap->ps.fd.forceMindtrickTargetIndex, +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1200 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1204 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1208 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1212 +ADDP4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 1040 +ADDRGP4 CG_IsMindTricked +CALLI4 +ASGNI4 +ADDRLP4 1040 +INDIRI4 +CNSTI4 0 +EQI4 $3621 +line 6604 +;6600: cg.snap->ps.fd.forceMindtrickTargetIndex2, +;6601: cg.snap->ps.fd.forceMindtrickTargetIndex3, +;6602: cg.snap->ps.fd.forceMindtrickTargetIndex4, +;6603: cent->currentState.number)) +;6604: { +line 6605 +;6605: if (cent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3627 +line 6606 +;6606: { +line 6610 +;6607: vec3_t efOrg; +;6608: vec3_t tAng, fxAng; +;6609: vec3_t axis[3]; +;6610: int effectTimeLayerC = effectTimeLayer; +ADDRLP4 1044 +ADDRLP4 756 +INDIRI4 +ASGNI4 +line 6614 +;6611: sharedBoltInterface_t fxObj; +;6612: +;6613: //VectorSet( tAng, 0, cent->pe.torso.yawAngle, 0 ); +;6614: VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); +ADDRLP4 1176 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1152 +ADDRLP4 1176 +INDIRP4 +CNSTI4 1016 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1152+4 +ADDRLP4 1176 +INDIRP4 +CNSTI4 1020 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1152+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 1024 +ADDP4 +INDIRF4 +ASGNF4 +line 6616 +;6615: +;6616: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_head, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 1180 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1180 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 788 +ADDRLP4 1180 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+520 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 780 +ARGP4 +ADDRLP4 1152 +ARGP4 +ADDRLP4 1180 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 1180 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 6618 +;6617: +;6618: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, efOrg); +ADDRLP4 780 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1084 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 6619 +;6619: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_Y, fxAng); +ADDRLP4 780 +ARGP4 +CNSTI4 6 +ARGI4 +ADDRLP4 1164 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 6621 +;6620: +;6621: axis[0][0] = boltMatrix.matrix[0][0]; +ADDRLP4 1048 +ADDRLP4 780 +INDIRF4 +ASGNF4 +line 6622 +;6622: axis[0][1] = boltMatrix.matrix[1][0]; +ADDRLP4 1048+4 +ADDRLP4 780+16 +INDIRF4 +ASGNF4 +line 6623 +;6623: axis[0][2] = boltMatrix.matrix[2][0]; +ADDRLP4 1048+8 +ADDRLP4 780+32 +INDIRF4 +ASGNF4 +line 6625 +;6624: +;6625: axis[1][0] = boltMatrix.matrix[0][1]; +ADDRLP4 1048+12 +ADDRLP4 780+4 +INDIRF4 +ASGNF4 +line 6626 +;6626: axis[1][1] = boltMatrix.matrix[1][1]; +ADDRLP4 1048+12+4 +ADDRLP4 780+16+4 +INDIRF4 +ASGNF4 +line 6627 +;6627: axis[1][2] = boltMatrix.matrix[2][1]; +ADDRLP4 1048+12+8 +ADDRLP4 780+32+4 +INDIRF4 +ASGNF4 +line 6629 +;6628: +;6629: axis[2][0] = boltMatrix.matrix[0][2]; +ADDRLP4 1048+24 +ADDRLP4 780+8 +INDIRF4 +ASGNF4 +line 6630 +;6630: axis[2][1] = boltMatrix.matrix[1][2]; +ADDRLP4 1048+24+4 +ADDRLP4 780+16+8 +INDIRF4 +ASGNF4 +line 6631 +;6631: axis[2][2] = boltMatrix.matrix[2][2]; +ADDRLP4 1048+24+8 +ADDRLP4 780+32+8 +INDIRF4 +ASGNF4 +line 6633 +;6632: +;6633: VectorCopy(/*efOrg*/cent->lerpOrigin, fxObj.origin); +ADDRLP4 1096+28 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 6634 +;6634: VectorCopy(/*fxAng*/tAng, fxObj.angles); +ADDRLP4 1096+16 +ADDRLP4 1152 +INDIRB +ASGNB 12 +line 6635 +;6635: VectorCopy(cent->modelScale, fxObj.scale); +ADDRLP4 1096+40 +ADDRFP4 0 +INDIRP4 +CNSTI4 964 +ADDP4 +INDIRB +ASGNB 12 +line 6636 +;6636: fxObj.ghoul2 = cent->ghoul2; +ADDRLP4 1096+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ASGNP4 +line 6637 +;6637: fxObj.isValid = 1; +ADDRLP4 1096 +CNSTI4 1 +ASGNI4 +line 6638 +;6638: fxObj.modelNum = 0; +ADDRLP4 1096+8 +CNSTI4 0 +ASGNI4 +line 6639 +;6639: fxObj.boltNum = cgs.clientinfo[cent->currentState.number].bolt_head; +ADDRLP4 1096+12 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+520 +ADDP4 +INDIRI4 +ASGNI4 +line 6640 +;6640: fxObj.entNum = cent->currentState.number; +ADDRLP4 1096+52 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRGP4 $3669 +JUMPV +LABELV $3668 +line 6643 +;6641: +;6642: while (effectTimeLayerC > 0) +;6643: { +line 6644 +;6644: trap_FX_PlayEntityEffectID(trap_FX_RegisterEffect("force/confusion.efx"), efOrg, axis, cent->boltInfo, cent->currentState.number); +ADDRGP4 $3671 +ARGP4 +ADDRLP4 1184 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 1184 +INDIRI4 +ARGI4 +ADDRLP4 1084 +ARGP4 +ADDRLP4 1048 +ARGP4 +ADDRLP4 1188 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1188 +INDIRP4 +CNSTI4 980 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1188 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_FX_PlayEntityEffectID +CALLV +pop +line 6650 +;6645: +;6646: //FIXME: Due to the horrible inefficiency involved in the current effect bolt process an effect with as many particles as this won't +;6647: //work too happily. It also doesn't look a lot better due to the lag between origin updates with the effect bolt. If those issues +;6648: //are ever resolved it should be switched over to BoltedEffect. +;6649: //trap_FX_PlayBoltedEffectID(trap_FX_RegisterEffect("force/confusion.efx"), &fxObj); +;6650: effectTimeLayerC = 0;//-= 50; +ADDRLP4 1044 +CNSTI4 0 +ASGNI4 +line 6651 +;6651: } +LABELV $3669 +line 6642 +ADDRLP4 1044 +INDIRI4 +CNSTI4 0 +GTI4 $3668 +line 6652 +;6652: } +LABELV $3627 +line 6653 +;6653: } +LABELV $3621 +line 6655 +;6654: +;6655: if (cgs.gametype == GT_HOLOCRON && cent->currentState.time2 && (cg.renderingThirdPerson || cg.snap->ps.clientNum != cent->currentState.number)) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 1 +NEI4 $3672 +ADDRLP4 1044 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1048 +CNSTI4 0 +ASGNI4 +ADDRLP4 1044 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +ADDRLP4 1048 +INDIRI4 +EQI4 $3672 +ADDRGP4 cg+88 +INDIRI4 +ADDRLP4 1048 +INDIRI4 +NEI4 $3677 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRLP4 1044 +INDIRP4 +INDIRI4 +EQI4 $3672 +LABELV $3677 +line 6656 +;6656: { +line 6657 +;6657: int i = 0; +ADDRLP4 1264 +CNSTI4 0 +ASGNI4 +line 6658 +;6658: int renderedHolos = 0; +ADDRLP4 1268 +CNSTI4 0 +ASGNI4 +ADDRGP4 $3679 +JUMPV +LABELV $3678 +line 6662 +;6659: refEntity_t holoRef; +;6660: +;6661: while (i < NUM_FORCE_POWERS && renderedHolos < 3) +;6662: { +line 6663 +;6663: if (cent->currentState.time2 & (1 << i)) +ADDRFP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 1264 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $3681 +line 6664 +;6664: { +line 6665 +;6665: memset( &holoRef, 0, sizeof(holoRef) ); +ADDRLP4 1052 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 6667 +;6666: +;6667: VectorCopy(cent->lerpOrigin, elevated); +ADDRLP4 224 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 6668 +;6668: elevated[2] += 8; +ADDRLP4 224+8 +ADDRLP4 224+8 +INDIRF4 +CNSTF4 1090519040 +ADDF4 +ASGNF4 +line 6670 +;6669: +;6670: VectorCopy( elevated, holoRef.lightingOrigin ); +ADDRLP4 1052+108 +ADDRLP4 224 +INDIRB +ASGNB 12 +line 6671 +;6671: holoRef.shadowPlane = shadowPlane; +ADDRLP4 1052+120 +ADDRLP4 540 +INDIRF4 +ASGNF4 +line 6672 +;6672: holoRef.renderfx = 0;//RF_THIRD_PERSON; +ADDRLP4 1052+4 +CNSTI4 0 +ASGNI4 +line 6674 +;6673: +;6674: if (renderedHolos == 0) +ADDRLP4 1268 +INDIRI4 +CNSTI4 0 +NEI4 $3687 +line 6675 +;6675: { +line 6676 +;6676: angle = ((cg.time / 8) & 255) * (M_PI * 2) / 255; +ADDRLP4 236 +CNSTF4 1086918619 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 8 +DIVI4 +CNSTI4 255 +BANDI4 +CVIF4 4 +MULF4 +CNSTF4 1132396544 +DIVF4 +ASGNF4 +line 6677 +;6677: dir[0] = cos(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1272 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 212 +CNSTF4 1101004800 +ADDRLP4 1272 +INDIRF4 +MULF4 +ASGNF4 +line 6678 +;6678: dir[1] = sin(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1276 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 212+4 +CNSTF4 1101004800 +ADDRLP4 1276 +INDIRF4 +MULF4 +ASGNF4 +line 6679 +;6679: dir[2] = cos(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1280 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1101004800 +ADDRLP4 1280 +INDIRF4 +MULF4 +ASGNF4 +line 6680 +;6680: VectorAdd(elevated, dir, holoRef.origin); +ADDRLP4 1052+52 +ADDRLP4 224 +INDIRF4 +ADDRLP4 212 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1052+52+4 +ADDRLP4 224+4 +INDIRF4 +ADDRLP4 212+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1052+52+8 +ADDRLP4 224+8 +INDIRF4 +ADDRLP4 212+8 +INDIRF4 +ADDF4 +ASGNF4 +line 6682 +;6681: +;6682: angles[0] = sin(angle) * 30; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1284 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 252 +CNSTF4 1106247680 +ADDRLP4 1284 +INDIRF4 +MULF4 +ASGNF4 +line 6683 +;6683: angles[1] = (angle * 180 / M_PI) + 90; +ADDRLP4 252+4 +CNSTF4 1127481344 +ADDRLP4 236 +INDIRF4 +MULF4 +CNSTF4 1078530011 +DIVF4 +CNSTF4 1119092736 +ADDF4 +ASGNF4 +line 6684 +;6684: if (angles[1] > 360) +ADDRLP4 252+4 +INDIRF4 +CNSTF4 1135869952 +LEF4 $3702 +line 6685 +;6685: angles[1] -= 360; +ADDRLP4 252+4 +ADDRLP4 252+4 +INDIRF4 +CNSTF4 1135869952 +SUBF4 +ASGNF4 +LABELV $3702 +line 6686 +;6686: angles[2] = 0; +ADDRLP4 252+8 +CNSTF4 0 +ASGNF4 +line 6687 +;6687: AnglesToAxis( angles, holoRef.axis ); +ADDRLP4 252 +ARGP4 +ADDRLP4 1052+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 6688 +;6688: } +ADDRGP4 $3688 +JUMPV +LABELV $3687 +line 6689 +;6689: else if (renderedHolos == 1) +ADDRLP4 1268 +INDIRI4 +CNSTI4 1 +NEI4 $3708 +line 6690 +;6690: { +line 6691 +;6691: angle = ((cg.time / 8) & 255) * (M_PI * 2) / 255 + M_PI; +ADDRLP4 236 +CNSTF4 1086918619 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 8 +DIVI4 +CNSTI4 255 +BANDI4 +CVIF4 4 +MULF4 +CNSTF4 1132396544 +DIVF4 +CNSTF4 1078530011 +ADDF4 +ASGNF4 +line 6692 +;6692: if (angle > M_PI * 2) +ADDRLP4 236 +INDIRF4 +CNSTF4 1086918619 +LEF4 $3711 +line 6693 +;6693: angle -= (float)M_PI * 2; +ADDRLP4 236 +ADDRLP4 236 +INDIRF4 +CNSTF4 1086918619 +SUBF4 +ASGNF4 +LABELV $3711 +line 6694 +;6694: dir[0] = sin(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1272 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 212 +CNSTF4 1101004800 +ADDRLP4 1272 +INDIRF4 +MULF4 +ASGNF4 +line 6695 +;6695: dir[1] = cos(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1276 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 212+4 +CNSTF4 1101004800 +ADDRLP4 1276 +INDIRF4 +MULF4 +ASGNF4 +line 6696 +;6696: dir[2] = cos(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1280 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 212+8 +CNSTF4 1101004800 +ADDRLP4 1280 +INDIRF4 +MULF4 +ASGNF4 +line 6697 +;6697: VectorAdd(elevated, dir, holoRef.origin); +ADDRLP4 1052+52 +ADDRLP4 224 +INDIRF4 +ADDRLP4 212 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1052+52+4 +ADDRLP4 224+4 +INDIRF4 +ADDRLP4 212+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1052+52+8 +ADDRLP4 224+8 +INDIRF4 +ADDRLP4 212+8 +INDIRF4 +ADDF4 +ASGNF4 +line 6699 +;6698: +;6699: angles[0] = cos(angle - 0.5 * M_PI) * 30; +ADDRLP4 236 +INDIRF4 +CNSTF4 1070141403 +SUBF4 +ARGF4 +ADDRLP4 1284 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 252 +CNSTF4 1106247680 +ADDRLP4 1284 +INDIRF4 +MULF4 +ASGNF4 +line 6700 +;6700: angles[1] = 360 - (angle * 180 / M_PI); +ADDRLP4 252+4 +CNSTF4 1135869952 +CNSTF4 1127481344 +ADDRLP4 236 +INDIRF4 +MULF4 +CNSTF4 1078530011 +DIVF4 +SUBF4 +ASGNF4 +line 6701 +;6701: if (angles[1] > 360) +ADDRLP4 252+4 +INDIRF4 +CNSTF4 1135869952 +LEF4 $3725 +line 6702 +;6702: angles[1] -= 360; +ADDRLP4 252+4 +ADDRLP4 252+4 +INDIRF4 +CNSTF4 1135869952 +SUBF4 +ASGNF4 +LABELV $3725 +line 6703 +;6703: angles[2] = 0; +ADDRLP4 252+8 +CNSTF4 0 +ASGNF4 +line 6704 +;6704: AnglesToAxis( angles, holoRef.axis ); +ADDRLP4 252 +ARGP4 +ADDRLP4 1052+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 6705 +;6705: } +ADDRGP4 $3709 +JUMPV +LABELV $3708 +line 6707 +;6706: else +;6707: { +line 6708 +;6708: angle = ((cg.time / 6) & 255) * (M_PI * 2) / 255 + 0.5 * M_PI; +ADDRLP4 236 +CNSTF4 1086918619 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 6 +DIVI4 +CNSTI4 255 +BANDI4 +CVIF4 4 +MULF4 +CNSTF4 1132396544 +DIVF4 +CNSTF4 1070141403 +ADDF4 +ASGNF4 +line 6709 +;6709: if (angle > M_PI * 2) +ADDRLP4 236 +INDIRF4 +CNSTF4 1086918619 +LEF4 $3732 +line 6710 +;6710: angle -= (float)M_PI * 2; +ADDRLP4 236 +ADDRLP4 236 +INDIRF4 +CNSTF4 1086918619 +SUBF4 +ASGNF4 +LABELV $3732 +line 6711 +;6711: dir[0] = sin(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1272 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 212 +CNSTF4 1101004800 +ADDRLP4 1272 +INDIRF4 +MULF4 +ASGNF4 +line 6712 +;6712: dir[1] = cos(angle) * 20; +ADDRLP4 236 +INDIRF4 +ARGF4 +ADDRLP4 1276 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 212+4 +CNSTF4 1101004800 +ADDRLP4 1276 +INDIRF4 +MULF4 +ASGNF4 +line 6713 +;6713: dir[2] = 0; +ADDRLP4 212+8 +CNSTF4 0 +ASGNF4 +line 6714 +;6714: VectorAdd(elevated, dir, holoRef.origin); +ADDRLP4 1052+52 +ADDRLP4 224 +INDIRF4 +ADDRLP4 212 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1052+52+4 +ADDRLP4 224+4 +INDIRF4 +ADDRLP4 212+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 1052+52+8 +ADDRLP4 224+8 +INDIRF4 +ADDRLP4 212+8 +INDIRF4 +ADDF4 +ASGNF4 +line 6716 +;6715: +;6716: VectorCopy(dir, holoRef.axis[1]); +ADDRLP4 1052+12+12 +ADDRLP4 212 +INDIRB +ASGNB 12 +line 6717 +;6717: VectorNormalize(holoRef.axis[1]); +ADDRLP4 1052+12+12 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 6718 +;6718: VectorSet(holoRef.axis[2], 0, 0, 1); +ADDRLP4 1052+12+24 +CNSTF4 0 +ASGNF4 +ADDRLP4 1052+12+24+4 +CNSTF4 0 +ASGNF4 +ADDRLP4 1052+12+24+8 +CNSTF4 1065353216 +ASGNF4 +line 6719 +;6719: CrossProduct(holoRef.axis[1], holoRef.axis[2], holoRef.axis[0]); +ADDRLP4 1052+12+12 +ARGP4 +ADDRLP4 1052+12+24 +ARGP4 +ADDRLP4 1052+12 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 6720 +;6720: } +LABELV $3709 +LABELV $3688 +line 6722 +;6721: +;6722: holoRef.modelScale[0] = 0.5; +ADDRLP4 1052+196 +CNSTF4 1056964608 +ASGNF4 +line 6723 +;6723: holoRef.modelScale[1] = 0.5; +ADDRLP4 1052+196+4 +CNSTF4 1056964608 +ASGNF4 +line 6724 +;6724: holoRef.modelScale[2] = 0.5; +ADDRLP4 1052+196+8 +CNSTF4 1056964608 +ASGNF4 +line 6725 +;6725: ScaleModelAxis(&holoRef); +ADDRLP4 1052 +ARGP4 +ADDRGP4 ScaleModelAxis +CALLV +pop +line 6727 +;6726: +;6727: { +line 6732 +;6728: float wv; +;6729: addspriteArgStruct_t fxSArgs; +;6730: vec3_t holoCenter; +;6731: +;6732: holoCenter[0] = holoRef.origin[0] + holoRef.axis[2][0]*18; +ADDRLP4 1348 +ADDRLP4 1052+52 +INDIRF4 +CNSTF4 1099956224 +ADDRLP4 1052+12+24 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 6733 +;6733: holoCenter[1] = holoRef.origin[1] + holoRef.axis[2][1]*18; +ADDRLP4 1348+4 +ADDRLP4 1052+52+4 +INDIRF4 +CNSTF4 1099956224 +ADDRLP4 1052+12+24+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 6734 +;6734: holoCenter[2] = holoRef.origin[2] + holoRef.axis[2][2]*18; +ADDRLP4 1348+8 +ADDRLP4 1052+52+8 +INDIRF4 +CNSTF4 1099956224 +ADDRLP4 1052+12+24+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 6736 +;6735: +;6736: wv = sin( cg.time * 0.004f ) * 0.08f + 0.1f; +CNSTF4 998445679 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 1360 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 1344 +CNSTF4 1034147594 +ADDRLP4 1360 +INDIRF4 +MULF4 +CNSTF4 1036831949 +ADDF4 +ASGNF4 +line 6738 +;6737: +;6738: VectorCopy(holoCenter, fxSArgs.origin); +ADDRLP4 1272 +ADDRLP4 1348 +INDIRB +ASGNB 12 +line 6739 +;6739: VectorClear(fxSArgs.vel); +ADDRLP4 1364 +CNSTF4 0 +ASGNF4 +ADDRLP4 1272+12+8 +ADDRLP4 1364 +INDIRF4 +ASGNF4 +ADDRLP4 1272+12+4 +ADDRLP4 1364 +INDIRF4 +ASGNF4 +ADDRLP4 1272+12 +ADDRLP4 1364 +INDIRF4 +ASGNF4 +line 6740 +;6740: VectorClear(fxSArgs.accel); +ADDRLP4 1368 +CNSTF4 0 +ASGNF4 +ADDRLP4 1272+24+8 +ADDRLP4 1368 +INDIRF4 +ASGNF4 +ADDRLP4 1272+24+4 +ADDRLP4 1368 +INDIRF4 +ASGNF4 +ADDRLP4 1272+24 +ADDRLP4 1368 +INDIRF4 +ASGNF4 +line 6741 +;6741: fxSArgs.scale = wv*60; +ADDRLP4 1272+36 +CNSTF4 1114636288 +ADDRLP4 1344 +INDIRF4 +MULF4 +ASGNF4 +line 6742 +;6742: fxSArgs.dscale = wv*60; +ADDRLP4 1272+40 +CNSTF4 1114636288 +ADDRLP4 1344 +INDIRF4 +MULF4 +ASGNF4 +line 6743 +;6743: fxSArgs.sAlpha = wv*12; +ADDRLP4 1272+44 +CNSTF4 1094713344 +ADDRLP4 1344 +INDIRF4 +MULF4 +ASGNF4 +line 6744 +;6744: fxSArgs.eAlpha = wv*12; +ADDRLP4 1272+48 +CNSTF4 1094713344 +ADDRLP4 1344 +INDIRF4 +MULF4 +ASGNF4 +line 6745 +;6745: fxSArgs.rotation = 0.0f; +ADDRLP4 1272+52 +CNSTF4 0 +ASGNF4 +line 6746 +;6746: fxSArgs.bounce = 0.0f; +ADDRLP4 1272+56 +CNSTF4 0 +ASGNF4 +line 6747 +;6747: fxSArgs.life = 1.0f; +ADDRLP4 1272+60 +CNSTI4 1 +ASGNI4 +line 6749 +;6748: +;6749: fxSArgs.flags = 0x08000000|0x00000001; +ADDRLP4 1272+68 +CNSTI4 134217729 +ASGNI4 +line 6751 +;6750: +;6751: if (forcePowerDarkLight[i] == FORCE_DARKSIDE) +ADDRLP4 1372 +CNSTI4 2 +ASGNI4 +ADDRLP4 1264 +INDIRI4 +ADDRLP4 1372 +INDIRI4 +LSHI4 +ADDRGP4 forcePowerDarkLight +ADDP4 +INDIRI4 +ADDRLP4 1372 +INDIRI4 +NEI4 $3801 +line 6752 +;6752: { //dark +line 6753 +;6753: fxSArgs.sAlpha *= 3; +ADDRLP4 1272+44 +CNSTF4 1077936128 +ADDRLP4 1272+44 +INDIRF4 +MULF4 +ASGNF4 +line 6754 +;6754: fxSArgs.eAlpha *= 3; +ADDRLP4 1272+48 +CNSTF4 1077936128 +ADDRLP4 1272+48 +INDIRF4 +MULF4 +ASGNF4 +line 6755 +;6755: fxSArgs.shader = cgs.media.redSaberGlowShader; +ADDRLP4 1272+64 +ADDRGP4 cgs+70296+116 +INDIRI4 +ASGNI4 +line 6756 +;6756: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 1272 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 6757 +;6757: } +ADDRGP4 $3802 +JUMPV +LABELV $3801 +line 6758 +;6758: else if (forcePowerDarkLight[i] == FORCE_LIGHTSIDE) +ADDRLP4 1264 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forcePowerDarkLight +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $3808 +line 6759 +;6759: { //light +line 6760 +;6760: fxSArgs.sAlpha *= 1.5; +ADDRLP4 1272+44 +CNSTF4 1069547520 +ADDRLP4 1272+44 +INDIRF4 +MULF4 +ASGNF4 +line 6761 +;6761: fxSArgs.eAlpha *= 1.5; +ADDRLP4 1272+48 +CNSTF4 1069547520 +ADDRLP4 1272+48 +INDIRF4 +MULF4 +ASGNF4 +line 6762 +;6762: fxSArgs.shader = cgs.media.redSaberGlowShader; +ADDRLP4 1272+64 +ADDRGP4 cgs+70296+116 +INDIRI4 +ASGNI4 +line 6763 +;6763: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 1272 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 6764 +;6764: fxSArgs.shader = cgs.media.greenSaberGlowShader; +ADDRLP4 1272+64 +ADDRGP4 cgs+70296+140 +INDIRI4 +ASGNI4 +line 6765 +;6765: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 1272 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 6766 +;6766: fxSArgs.shader = cgs.media.blueSaberGlowShader; +ADDRLP4 1272+64 +ADDRGP4 cgs+70296+148 +INDIRI4 +ASGNI4 +line 6767 +;6767: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 1272 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 6768 +;6768: } +ADDRGP4 $3809 +JUMPV +LABELV $3808 +line 6770 +;6769: else +;6770: { //neutral +line 6771 +;6771: if (i == FP_SABERATTACK || +ADDRLP4 1264 +INDIRI4 +CNSTI4 15 +EQI4 $3824 +ADDRLP4 1264 +INDIRI4 +CNSTI4 16 +EQI4 $3824 +ADDRLP4 1264 +INDIRI4 +CNSTI4 17 +NEI4 $3821 +LABELV $3824 +line 6774 +;6772: i == FP_SABERDEFEND || +;6773: i == FP_SABERTHROW) +;6774: { //saber power +line 6775 +;6775: fxSArgs.sAlpha *= 1.5; +ADDRLP4 1272+44 +CNSTF4 1069547520 +ADDRLP4 1272+44 +INDIRF4 +MULF4 +ASGNF4 +line 6776 +;6776: fxSArgs.eAlpha *= 1.5; +ADDRLP4 1272+48 +CNSTF4 1069547520 +ADDRLP4 1272+48 +INDIRF4 +MULF4 +ASGNF4 +line 6777 +;6777: fxSArgs.shader = cgs.media.greenSaberGlowShader; +ADDRLP4 1272+64 +ADDRGP4 cgs+70296+140 +INDIRI4 +ASGNI4 +line 6778 +;6778: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 1272 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 6779 +;6779: } +ADDRGP4 $3822 +JUMPV +LABELV $3821 +line 6781 +;6780: else +;6781: { +line 6782 +;6782: fxSArgs.sAlpha *= 0.5; +ADDRLP4 1272+44 +CNSTF4 1056964608 +ADDRLP4 1272+44 +INDIRF4 +MULF4 +ASGNF4 +line 6783 +;6783: fxSArgs.eAlpha *= 0.5; +ADDRLP4 1272+48 +CNSTF4 1056964608 +ADDRLP4 1272+48 +INDIRF4 +MULF4 +ASGNF4 +line 6784 +;6784: fxSArgs.shader = cgs.media.greenSaberGlowShader; +ADDRLP4 1272+64 +ADDRGP4 cgs+70296+140 +INDIRI4 +ASGNI4 +line 6785 +;6785: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 1272 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 6786 +;6786: fxSArgs.shader = cgs.media.blueSaberGlowShader; +ADDRLP4 1272+64 +ADDRGP4 cgs+70296+148 +INDIRI4 +ASGNI4 +line 6787 +;6787: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 1272 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 6788 +;6788: } +LABELV $3822 +line 6789 +;6789: } +LABELV $3809 +LABELV $3802 +line 6790 +;6790: } +line 6792 +;6791: +;6792: holoRef.hModel = trap_R_RegisterModel(forceHolocronModels[i]); +ADDRLP4 1264 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 forceHolocronModels +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1272 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 1052+8 +ADDRLP4 1272 +INDIRI4 +ASGNI4 +line 6793 +;6793: trap_R_AddRefEntityToScene( &holoRef ); +ADDRLP4 1052 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 6795 +;6794: +;6795: renderedHolos++; +ADDRLP4 1268 +ADDRLP4 1268 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 6796 +;6796: } +LABELV $3681 +line 6797 +;6797: i++; +ADDRLP4 1264 +ADDRLP4 1264 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 6798 +;6798: } +LABELV $3679 +line 6661 +ADDRLP4 1264 +INDIRI4 +CNSTI4 18 +GEI4 $3839 +ADDRLP4 1268 +INDIRI4 +CNSTI4 3 +LTI4 $3678 +LABELV $3839 +line 6799 +;6799: } +LABELV $3672 +line 6801 +;6800: +;6801: if ((cent->currentState.powerups & (1 << PW_YSALAMIRI)) || +ADDRLP4 1052 +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1056 +CNSTI4 0 +ASGNI4 +ADDRLP4 1052 +INDIRI4 +CNSTI4 32768 +BANDI4 +ADDRLP4 1056 +INDIRI4 +NEI4 $3844 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $3840 +ADDRLP4 1052 +INDIRI4 +CNSTI4 16 +BANDI4 +ADDRLP4 1056 +INDIRI4 +NEI4 $3844 +ADDRLP4 1052 +INDIRI4 +CNSTI4 32 +BANDI4 +ADDRLP4 1056 +INDIRI4 +EQI4 $3840 +LABELV $3844 +line 6803 +;6802: (cgs.gametype == GT_CTY && ((cent->currentState.powerups & (1 << PW_REDFLAG)) || (cent->currentState.powerups & (1 << PW_BLUEFLAG)))) ) +;6803: { +line 6804 +;6804: if (cgs.gametype == GT_CTY && (cent->currentState.powerups & (1 << PW_REDFLAG))) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $3845 +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $3845 +line 6805 +;6805: { +line 6806 +;6806: CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysaliredShader ); +ADDRLP4 1060 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1060 +INDIRP4 +ARGP4 +ADDRLP4 1060 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +CNSTF4 1068708659 +ARGF4 +ADDRGP4 cgs+70296+572 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPlayerSphere +CALLV +pop +line 6807 +;6807: } +ADDRGP4 $3846 +JUMPV +LABELV $3845 +line 6808 +;6808: else if (cgs.gametype == GT_CTY && (cent->currentState.powerups & (1 << PW_BLUEFLAG))) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $3850 +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 32 +BANDI4 +CNSTI4 0 +EQI4 $3850 +line 6809 +;6809: { +line 6810 +;6810: CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysaliblueShader ); +ADDRLP4 1060 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1060 +INDIRP4 +ARGP4 +ADDRLP4 1060 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +CNSTF4 1068708659 +ARGF4 +ADDRGP4 cgs+70296+576 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPlayerSphere +CALLV +pop +line 6811 +;6811: } +ADDRGP4 $3851 +JUMPV +LABELV $3850 +line 6813 +;6812: else +;6813: { +line 6814 +;6814: CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.ysalimariShader ); +ADDRLP4 1060 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1060 +INDIRP4 +ARGP4 +ADDRLP4 1060 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +CNSTF4 1068708659 +ARGF4 +ADDRGP4 cgs+70296+580 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPlayerSphere +CALLV +pop +line 6815 +;6815: } +LABELV $3851 +LABELV $3846 +line 6816 +;6816: } +LABELV $3840 +line 6818 +;6817: +;6818: if (cent->currentState.powerups & (1 << PW_FORCE_BOON)) +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 16384 +BANDI4 +CNSTI4 0 +EQI4 $3857 +line 6819 +;6819: { +line 6820 +;6820: CG_DrawPlayerSphere(cent, cent->lerpOrigin, 2.0, cgs.media.boonShader ); +ADDRLP4 1060 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1060 +INDIRP4 +ARGP4 +ADDRLP4 1060 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +CNSTF4 1073741824 +ARGF4 +ADDRGP4 cgs+70296+584 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPlayerSphere +CALLV +pop +line 6821 +;6821: } +LABELV $3857 +line 6823 +;6822: +;6823: if (cent->currentState.powerups & (1 << PW_FORCE_ENLIGHTENED_DARK)) +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 8192 +BANDI4 +CNSTI4 0 +EQI4 $3861 +line 6824 +;6824: { +line 6825 +;6825: CG_DrawPlayerSphere(cent, cent->lerpOrigin, 2.0, cgs.media.endarkenmentShader ); +ADDRLP4 1060 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1060 +INDIRP4 +ARGP4 +ADDRLP4 1060 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +CNSTF4 1073741824 +ARGF4 +ADDRGP4 cgs+70296+588 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPlayerSphere +CALLV +pop +line 6826 +;6826: } +ADDRGP4 $3862 +JUMPV +LABELV $3861 +line 6827 +;6827: else if (cent->currentState.powerups & (1 << PW_FORCE_ENLIGHTENED_LIGHT)) +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $3865 +line 6828 +;6828: { +line 6829 +;6829: CG_DrawPlayerSphere(cent, cent->lerpOrigin, 2.0, cgs.media.enlightenmentShader ); +ADDRLP4 1060 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1060 +INDIRP4 +ARGP4 +ADDRLP4 1060 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +CNSTF4 1073741824 +ARGF4 +ADDRGP4 cgs+70296+592 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPlayerSphere +CALLV +pop +line 6830 +;6830: } +LABELV $3865 +LABELV $3862 +line 6832 +;6831: +;6832: if (cent->currentState.eFlags & EF_INVULNERABLE) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 67108864 +BANDI4 +CNSTI4 0 +EQI4 $3869 +line 6833 +;6833: { +line 6834 +;6834: CG_DrawPlayerSphere(cent, cent->lerpOrigin, 1.4, cgs.media.invulnerabilityShader ); +ADDRLP4 1060 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1060 +INDIRP4 +ARGP4 +ADDRLP4 1060 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +CNSTF4 1068708659 +ARGF4 +ADDRGP4 cgs+70296+596 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPlayerSphere +CALLV +pop +line 6835 +;6835: } +LABELV $3869 +LABELV $3538 +line 6837 +;6836:stillDoSaber: +;6837: if (cent->currentState.weapon == WP_SABER && !cent->currentState.shouldtarget) +ADDRLP4 1060 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1060 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $3873 +ADDRLP4 1060 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $3873 +line 6838 +;6838: { +line 6839 +;6839: if (!cent->currentState.saberInFlight && !(cent->currentState.eFlags & EF_DEAD)) +ADDRLP4 1064 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1068 +CNSTI4 0 +ASGNI4 +ADDRLP4 1064 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +ADDRLP4 1068 +INDIRI4 +NEI4 $3875 +ADDRLP4 1064 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 1068 +INDIRI4 +NEI4 $3875 +line 6840 +;6840: { +line 6841 +;6841: if (cg.snap->ps.clientNum == cent->currentState.number) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +NEI4 $3877 +line 6842 +;6842: { +line 6843 +;6843: trap_S_AddLoopingSound( cent->currentState.number, cg.refdef.vieworg, vec3_origin, +ADDRGP4 $3882 +ARGP4 +ADDRLP4 1072 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+3616+24 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 1072 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddLoopingSound +CALLV +pop +line 6845 +;6844: trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ) ); +;6845: } +ADDRGP4 $3878 +JUMPV +LABELV $3877 +line 6847 +;6846: else +;6847: { +line 6848 +;6848: trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, +ADDRGP4 $3882 +ARGP4 +ADDRLP4 1072 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 1076 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1076 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 1076 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 1072 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddLoopingSound +CALLV +pop +line 6850 +;6849: trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ) ); +;6850: } +LABELV $3878 +line 6851 +;6851: } +LABELV $3875 +line 6853 +;6852: +;6853: if (iwantout && !cent->currentState.saberInFlight) +ADDRLP4 1072 +CNSTI4 0 +ASGNI4 +ADDRLP4 768 +INDIRI4 +ADDRLP4 1072 +INDIRI4 +EQI4 $3883 +ADDRFP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +ADDRLP4 1072 +INDIRI4 +NEI4 $3883 +line 6854 +;6854: { +line 6855 +;6855: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $3889 +line 6856 +;6856: { +line 6857 +;6857: if (cent->ghoul2 && cent->currentState.saberInFlight && g2HasWeapon) +ADDRLP4 1076 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1076 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3889 +ADDRLP4 1080 +CNSTI4 0 +ASGNI4 +ADDRLP4 1076 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +ADDRLP4 1080 +INDIRI4 +EQI4 $3889 +ADDRLP4 536 +INDIRI4 +ADDRLP4 1080 +INDIRI4 +EQI4 $3889 +line 6858 +;6858: { //special case, kill the saber on a freshly dead player if another source says to. +line 6859 +;6859: trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_G2API_RemoveGhoul2Model +CALLI4 +pop +line 6860 +;6860: g2HasWeapon = qfalse; +ADDRLP4 536 +CNSTI4 0 +ASGNI4 +line 6861 +;6861: } +line 6862 +;6862: } +line 6864 +;6863: //return; +;6864: goto endOfCall; +ADDRGP4 $3889 +JUMPV +LABELV $3883 +line 6867 +;6865: } +;6866: +;6867: if (cent->currentState.saberInFlight && cent->currentState.saberEntityNum) +ADDRLP4 1076 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1080 +CNSTI4 0 +ASGNI4 +ADDRLP4 1076 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +ADDRLP4 1080 +INDIRI4 +EQI4 $3890 +ADDRLP4 1076 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +ADDRLP4 1080 +INDIRI4 +EQI4 $3890 +line 6868 +;6868: { +line 6871 +;6869: centity_t *saberEnt; +;6870: +;6871: saberEnt = &cg_entities[cent->currentState.saberEntityNum]; +ADDRLP4 1084 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 6873 +;6872: +;6873: if (/*!cent->bolt4 &&*/ g2HasWeapon) +ADDRLP4 536 +INDIRI4 +CNSTI4 0 +EQI4 $3892 +line 6874 +;6874: { //saber is in flight, do not have it as a standard weapon model +line 6875 +;6875: trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_G2API_RemoveGhoul2Model +CALLI4 +pop +line 6876 +;6876: g2HasWeapon = qfalse; +ADDRLP4 536 +CNSTI4 0 +ASGNI4 +line 6880 +;6877: +;6878: //cent->bolt4 = 1; +;6879: +;6880: saberEnt->currentState.pos.trTime = cg.time; +ADDRLP4 1084 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 6881 +;6881: saberEnt->currentState.apos.trTime = cg.time; +ADDRLP4 1084 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 6883 +;6882: +;6883: VectorCopy(saberEnt->currentState.pos.trBase, saberEnt->lerpOrigin); +ADDRLP4 1084 +INDIRP4 +CNSTI4 928 +ADDP4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRB +ASGNB 12 +line 6884 +;6884: VectorCopy(saberEnt->currentState.apos.trBase, saberEnt->lerpAngles); +ADDRLP4 1084 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRB +ASGNB 12 +line 6886 +;6885: +;6886: cent->bolt3 = saberEnt->currentState.apos.trBase[0]; +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 6887 +;6887: cent->bolt2 = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 988 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6889 +;6888: +;6889: saberEnt->currentState.bolt2 = 123; +ADDRLP4 1084 +INDIRP4 +CNSTI4 144 +ADDP4 +CNSTI4 123 +ASGNI4 +line 6891 +;6890: +;6891: if (saberEnt->ghoul2) +ADDRLP4 1084 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3896 +line 6892 +;6892: { +line 6894 +;6893: // now set up the gun bolt on it +;6894: trap_G2API_AddBolt(saberEnt->ghoul2, 0, "*flash"); +ADDRLP4 1084 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $3898 +ARGP4 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +pop +line 6895 +;6895: } +ADDRGP4 $3897 +JUMPV +LABELV $3896 +line 6897 +;6896: else +;6897: { +line 6898 +;6898: trap_G2API_InitGhoul2Model(&saberEnt->ghoul2, "models/weapons2/saber/saber_w.glm", 0, 0, 0, 0, 0); +ADDRLP4 1084 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRGP4 $3899 +ARGP4 +ADDRLP4 1096 +CNSTI4 0 +ASGNI4 +ADDRLP4 1096 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_InitGhoul2Model +CALLI4 +pop +line 6900 +;6899: +;6900: if (saberEnt->ghoul2) +ADDRLP4 1084 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3900 +line 6901 +;6901: { +line 6902 +;6902: trap_G2API_AddBolt(saberEnt->ghoul2, 0, "*flash"); +ADDRLP4 1084 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $3898 +ARGP4 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +pop +line 6905 +;6903: //cent->bolt4 = 2; +;6904: +;6905: VectorCopy(saberEnt->currentState.pos.trBase, saberEnt->lerpOrigin); +ADDRLP4 1084 +INDIRP4 +CNSTI4 928 +ADDP4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRB +ASGNB 12 +line 6906 +;6906: VectorCopy(saberEnt->currentState.apos.trBase, saberEnt->lerpAngles); +ADDRLP4 1084 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRB +ASGNB 12 +line 6907 +;6907: saberEnt->currentState.pos.trTime = cg.time; +ADDRLP4 1084 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 6908 +;6908: saberEnt->currentState.apos.trTime = cg.time; +ADDRLP4 1084 +INDIRP4 +CNSTI4 52 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 6909 +;6909: } +LABELV $3900 +line 6910 +;6910: } +LABELV $3897 +line 6911 +;6911: } +LABELV $3892 +line 6921 +;6912: /*else if (cent->bolt4 != 2) +;6913: { +;6914: if (saberEnt->ghoul2) +;6915: { +;6916: trap_G2API_AddBolt(saberEnt->ghoul2, 0, "*flash"); +;6917: cent->bolt4 = 2; +;6918: } +;6919: }*/ +;6920: +;6921: if (saberEnt && saberEnt->ghoul2 /*&& cent->bolt4 == 2*/) +ADDRLP4 1092 +CNSTU4 0 +ASGNU4 +ADDRLP4 1084 +INDIRP4 +CVPU4 4 +ADDRLP4 1092 +INDIRU4 +EQU4 $3874 +ADDRLP4 1084 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 1092 +INDIRU4 +EQU4 $3874 +line 6922 +;6922: { +line 6925 +;6923: vec3_t bladeAngles; +;6924: +;6925: if (!cent->bolt2) +ADDRFP4 0 +INDIRP4 +CNSTI4 988 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $3906 +line 6926 +;6926: { +line 6927 +;6927: cent->bolt2 = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 988 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 6928 +;6928: } +LABELV $3906 +line 6930 +;6929: +;6930: if (cent->bolt3 != 90) +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +INDIRI4 +CNSTI4 90 +EQI4 $3909 +line 6931 +;6931: { +line 6932 +;6932: if (cent->bolt3 < 90) +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +INDIRI4 +CNSTI4 90 +GEI4 $3911 +line 6933 +;6933: { +line 6934 +;6934: cent->bolt3 += (cg.time - cent->bolt2)*0.5; +ADDRLP4 1108 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1112 +ADDRLP4 1108 +INDIRP4 +CNSTI4 992 +ADDP4 +ASGNP4 +ADDRLP4 1112 +INDIRP4 +ADDRLP4 1112 +INDIRP4 +INDIRI4 +CVIF4 4 +CNSTF4 1056964608 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 1108 +INDIRP4 +CNSTI4 988 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 6936 +;6935: +;6936: if (cent->bolt3 > 90) +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +INDIRI4 +CNSTI4 90 +LEI4 $3912 +line 6937 +;6937: { +line 6938 +;6938: cent->bolt3 = 90; +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +CNSTI4 90 +ASGNI4 +line 6939 +;6939: } +line 6940 +;6940: } +ADDRGP4 $3912 +JUMPV +LABELV $3911 +line 6941 +;6941: else if (cent->bolt3 > 90) +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +INDIRI4 +CNSTI4 90 +LEI4 $3916 +line 6942 +;6942: { +line 6943 +;6943: cent->bolt3 -= (cg.time - cent->bolt2)*0.5; +ADDRLP4 1108 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1112 +ADDRLP4 1108 +INDIRP4 +CNSTI4 992 +ADDP4 +ASGNP4 +ADDRLP4 1112 +INDIRP4 +ADDRLP4 1112 +INDIRP4 +INDIRI4 +CVIF4 4 +CNSTF4 1056964608 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 1108 +INDIRP4 +CNSTI4 988 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +SUBF4 +CVFI4 4 +ASGNI4 +line 6945 +;6944: +;6945: if (cent->bolt3 < 90) +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +INDIRI4 +CNSTI4 90 +GEI4 $3919 +line 6946 +;6946: { +line 6947 +;6947: cent->bolt3 = 90; +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +CNSTI4 90 +ASGNI4 +line 6948 +;6948: } +LABELV $3919 +line 6949 +;6949: } +LABELV $3916 +LABELV $3912 +line 6950 +;6950: } +LABELV $3909 +line 6952 +;6951: +;6952: cent->bolt2 = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 988 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 6954 +;6953: +;6954: saberEnt->currentState.apos.trBase[0] = cent->bolt3; +ADDRLP4 1084 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 6955 +;6955: saberEnt->lerpAngles[0] = cent->bolt3; +ADDRLP4 1084 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 6957 +;6956: +;6957: if (!saberEnt->currentState.saberInFlight && saberEnt->currentState.bolt2 != 123) +ADDRLP4 1084 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $3922 +ADDRLP4 1084 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 123 +EQI4 $3922 +line 6958 +;6958: { //owner is pulling is back +line 6961 +;6959: vec3_t owndir; +;6960: +;6961: VectorSubtract(saberEnt->lerpOrigin, cent->lerpOrigin, owndir); +ADDRLP4 1128 +CNSTI4 928 +ASGNI4 +ADDRLP4 1132 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1112 +ADDRLP4 1084 +INDIRP4 +ADDRLP4 1128 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 1132 +INDIRP4 +ADDRLP4 1128 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1136 +CNSTI4 932 +ASGNI4 +ADDRLP4 1112+4 +ADDRLP4 1084 +INDIRP4 +ADDRLP4 1136 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 1132 +INDIRP4 +ADDRLP4 1136 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1140 +CNSTI4 936 +ASGNI4 +ADDRLP4 1112+8 +ADDRLP4 1084 +INDIRP4 +ADDRLP4 1140 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 1140 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 6962 +;6962: VectorNormalize(owndir); +ADDRLP4 1112 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 6964 +;6963: +;6964: vectoangles(owndir, owndir); +ADDRLP4 1112 +ARGP4 +ADDRLP4 1112 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 6966 +;6965: +;6966: owndir[0] += 90; +ADDRLP4 1112 +ADDRLP4 1112 +INDIRF4 +CNSTF4 1119092736 +ADDF4 +ASGNF4 +line 6968 +;6967: +;6968: VectorCopy(owndir, saberEnt->currentState.apos.trBase); +ADDRLP4 1084 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRLP4 1112 +INDIRB +ASGNB 12 +line 6969 +;6969: VectorCopy(owndir, saberEnt->lerpAngles); +ADDRLP4 1084 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRLP4 1112 +INDIRB +ASGNB 12 +line 6970 +;6970: VectorClear(saberEnt->currentState.apos.trDelta); +ADDRLP4 1148 +CNSTF4 0 +ASGNF4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 80 +ADDP4 +ADDRLP4 1148 +INDIRF4 +ASGNF4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRLP4 1148 +INDIRF4 +ASGNF4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDRLP4 1148 +INDIRF4 +ASGNF4 +line 6971 +;6971: } +LABELV $3922 +line 6976 +;6972: +;6973: //We don't actually want to rely entirely on server updates to render the position of the saber, because we actually know generally where +;6974: //it's going to be before the first position update even gets here, and it needs to start getting rendered the instant the saber model is +;6975: //removed from the player hand. So we'll just render it manually and let normal rendering for the entity be ignored. +;6976: if (!saberEnt->currentState.saberInFlight && saberEnt->currentState.bolt2 != 123) +ADDRLP4 1084 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $3926 +ADDRLP4 1084 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 123 +EQI4 $3926 +line 6977 +;6977: { //tell it that we're a saber and to render the glow around our handle because we're being pulled back +line 6978 +;6978: saberEnt->bolt3 = 999; +ADDRLP4 1084 +INDIRP4 +CNSTI4 992 +ADDP4 +CNSTI4 999 +ASGNI4 +line 6979 +;6979: } +LABELV $3926 +line 6981 +;6980: +;6981: saberEnt->currentState.modelGhoul2 = 1; +ADDRLP4 1084 +INDIRP4 +CNSTI4 204 +ADDP4 +CNSTI4 1 +ASGNI4 +line 6982 +;6982: CG_ManualEntityRender(saberEnt); +ADDRLP4 1084 +INDIRP4 +ARGP4 +ADDRGP4 CG_ManualEntityRender +CALLV +pop +line 6983 +;6983: saberEnt->bolt3 = 0; +ADDRLP4 1084 +INDIRP4 +CNSTI4 992 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6984 +;6984: saberEnt->currentState.modelGhoul2 = 127; +ADDRLP4 1084 +INDIRP4 +CNSTI4 204 +ADDP4 +CNSTI4 127 +ASGNI4 +line 6986 +;6985: +;6986: VectorCopy(saberEnt->lerpAngles, bladeAngles); +ADDRLP4 1096 +ADDRLP4 1084 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 6987 +;6987: bladeAngles[ROLL] = 0; +ADDRLP4 1096+8 +CNSTF4 0 +ASGNF4 +line 6988 +;6988: CG_AddSaberBlade(cent, saberEnt, NULL, 0, 0, saberEnt->lerpOrigin, bladeAngles, qtrue); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 1084 +INDIRP4 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRLP4 1120 +CNSTI4 0 +ASGNI4 +ADDRLP4 1120 +INDIRI4 +ARGI4 +ADDRLP4 1120 +INDIRI4 +ARGI4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 1096 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_AddSaberBlade +CALLV +pop +line 6991 +;6989: +;6990: //Make the player's hand glow while guiding the saber +;6991: { +line 6996 +;6992: vec3_t tAng; +;6993: float wv; +;6994: addspriteArgStruct_t fxSArgs; +;6995: +;6996: VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] ); +ADDRLP4 1212 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1196 +ADDRLP4 1212 +INDIRP4 +CNSTI4 1016 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1196+4 +ADDRLP4 1212 +INDIRP4 +CNSTI4 1020 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 1196+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 1024 +ADDP4 +INDIRF4 +ASGNF4 +line 6998 +;6997: +;6998: trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_rhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 1216 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1216 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 788 +ADDRLP4 1216 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+512 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 780 +ARGP4 +ADDRLP4 1196 +ARGP4 +ADDRLP4 1216 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 1216 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 7000 +;6999: +;7000: efOrg[0] = boltMatrix.matrix[0][3]; +ADDRLP4 240 +ADDRLP4 780+12 +INDIRF4 +ASGNF4 +line 7001 +;7001: efOrg[1] = boltMatrix.matrix[1][3]; +ADDRLP4 240+4 +ADDRLP4 780+16+12 +INDIRF4 +ASGNF4 +line 7002 +;7002: efOrg[2] = boltMatrix.matrix[2][3]; +ADDRLP4 240+8 +ADDRLP4 780+32+12 +INDIRF4 +ASGNF4 +line 7004 +;7003: +;7004: wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f; +CNSTF4 994352038 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 1220 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 1208 +CNSTF4 1034147594 +ADDRLP4 1220 +INDIRF4 +MULF4 +CNSTF4 1036831949 +ADDF4 +ASGNF4 +line 7007 +;7005: +;7006: //trap_FX_AddSprite( NULL, efOrg, NULL, NULL, 8.0f, 8.0f, wv, wv, 0.0f, 0.0f, 1.0f, cgs.media.yellowSaberGlowShader, 0x08000000 ); +;7007: VectorCopy(efOrg, fxSArgs.origin); +ADDRLP4 1124 +ADDRLP4 240 +INDIRB +ASGNB 12 +line 7008 +;7008: VectorClear(fxSArgs.vel); +ADDRLP4 1224 +CNSTF4 0 +ASGNF4 +ADDRLP4 1124+12+8 +ADDRLP4 1224 +INDIRF4 +ASGNF4 +ADDRLP4 1124+12+4 +ADDRLP4 1224 +INDIRF4 +ASGNF4 +ADDRLP4 1124+12 +ADDRLP4 1224 +INDIRF4 +ASGNF4 +line 7009 +;7009: VectorClear(fxSArgs.accel); +ADDRLP4 1228 +CNSTF4 0 +ASGNF4 +ADDRLP4 1124+24+8 +ADDRLP4 1228 +INDIRF4 +ASGNF4 +ADDRLP4 1124+24+4 +ADDRLP4 1228 +INDIRF4 +ASGNF4 +ADDRLP4 1124+24 +ADDRLP4 1228 +INDIRF4 +ASGNF4 +line 7010 +;7010: fxSArgs.scale = 8.0f; +ADDRLP4 1124+36 +CNSTF4 1090519040 +ASGNF4 +line 7011 +;7011: fxSArgs.dscale = 8.0f; +ADDRLP4 1124+40 +CNSTF4 1090519040 +ASGNF4 +line 7012 +;7012: fxSArgs.sAlpha = wv; +ADDRLP4 1124+44 +ADDRLP4 1208 +INDIRF4 +ASGNF4 +line 7013 +;7013: fxSArgs.eAlpha = wv; +ADDRLP4 1124+48 +ADDRLP4 1208 +INDIRF4 +ASGNF4 +line 7014 +;7014: fxSArgs.rotation = 0.0f; +ADDRLP4 1124+52 +CNSTF4 0 +ASGNF4 +line 7015 +;7015: fxSArgs.bounce = 0.0f; +ADDRLP4 1124+56 +CNSTF4 0 +ASGNF4 +line 7016 +;7016: fxSArgs.life = 1.0f; +ADDRLP4 1124+60 +CNSTI4 1 +ASGNI4 +line 7017 +;7017: fxSArgs.shader = cgs.media.yellowDroppedSaberShader; +ADDRLP4 1124+64 +ADDRGP4 cgs+70296+168 +INDIRI4 +ASGNI4 +line 7018 +;7018: fxSArgs.flags = 0x08000000; +ADDRLP4 1124+68 +CNSTI4 134217728 +ASGNI4 +line 7019 +;7019: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 1124 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 7020 +;7020: } +line 7021 +;7021: } +line 7022 +;7022: } +ADDRGP4 $3874 +JUMPV +LABELV $3890 +line 7024 +;7023: else +;7024: { +line 7027 +;7025: centity_t *saberEnt; +;7026: +;7027: saberEnt = &cg_entities[cent->currentState.saberEntityNum]; +ADDRLP4 1084 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 7029 +;7028: +;7029: if (/*cent->bolt4 && */!g2HasWeapon) +ADDRLP4 536 +INDIRI4 +CNSTI4 0 +NEI4 $3964 +line 7030 +;7030: { +line 7031 +;7031: trap_G2API_CopySpecificGhoul2Model(g2WeaponInstances[WP_SABER], 0, cent->ghoul2, 1); +ADDRGP4 g2WeaponInstances+8 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_G2API_CopySpecificGhoul2Model +CALLV +pop +line 7033 +;7032: +;7033: if (saberEnt && saberEnt->ghoul2) +ADDRLP4 1088 +ADDRLP4 1084 +INDIRP4 +ASGNP4 +ADDRLP4 1092 +CNSTU4 0 +ASGNU4 +ADDRLP4 1088 +INDIRP4 +CVPU4 4 +ADDRLP4 1092 +INDIRU4 +EQU4 $3967 +ADDRLP4 1088 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 1092 +INDIRU4 +EQU4 $3967 +line 7034 +;7034: { +line 7035 +;7035: trap_G2API_CleanGhoul2Models(&(saberEnt->ghoul2)); +ADDRLP4 1084 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 7036 +;7036: } +LABELV $3967 +line 7038 +;7037: +;7038: saberEnt->currentState.modelindex = 0; +ADDRLP4 1084 +INDIRP4 +CNSTI4 212 +ADDP4 +CNSTI4 0 +ASGNI4 +line 7039 +;7039: saberEnt->ghoul2 = NULL; +ADDRLP4 1084 +INDIRP4 +CNSTI4 952 +ADDP4 +CNSTP4 0 +ASGNP4 +line 7040 +;7040: VectorClear(saberEnt->currentState.pos.trBase); +ADDRLP4 1096 +ADDRLP4 1084 +INDIRP4 +ASGNP4 +ADDRLP4 1100 +CNSTF4 0 +ASGNF4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRLP4 1100 +INDIRF4 +ASGNF4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 1100 +INDIRF4 +ASGNF4 +ADDRLP4 1096 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 1100 +INDIRF4 +ASGNF4 +line 7041 +;7041: } +LABELV $3964 +line 7042 +;7042: CG_AddSaberBlade( cent, cent, NULL, 0, 0, legs.origin, rootAngles, qfalse); +ADDRLP4 1088 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1088 +INDIRP4 +ARGP4 +ADDRLP4 1088 +INDIRP4 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRLP4 1092 +CNSTI4 0 +ASGNI4 +ADDRLP4 1092 +INDIRI4 +ARGI4 +ADDRLP4 1092 +INDIRI4 +ARGI4 +ADDRLP4 0+52 +ARGP4 +ADDRLP4 840 +ARGP4 +ADDRLP4 1092 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddSaberBlade +CALLV +pop +line 7043 +;7043: cent->bolt3 = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 992 +ADDP4 +CNSTI4 0 +ASGNI4 +line 7044 +;7044: cent->bolt2 = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 988 +ADDP4 +CNSTI4 0 +ASGNI4 +line 7047 +;7045: +;7046: //cent->bolt4 = 0; +;7047: } +line 7048 +;7048: } +ADDRGP4 $3874 +JUMPV +LABELV $3873 +line 7050 +;7049: else +;7050: { +line 7051 +;7051: cent->saberLength = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1000 +ADDP4 +CNSTF4 0 +ASGNF4 +line 7052 +;7052: } +LABELV $3874 +line 7054 +;7053: +;7054: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $3970 +line 7055 +;7055: { +line 7056 +;7056: if (cent->ghoul2 && cent->currentState.saberInFlight && g2HasWeapon) +ADDRLP4 1064 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1064 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3972 +ADDRLP4 1068 +CNSTI4 0 +ASGNI4 +ADDRLP4 1064 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +ADDRLP4 1068 +INDIRI4 +EQI4 $3972 +ADDRLP4 536 +INDIRI4 +ADDRLP4 1068 +INDIRI4 +EQI4 $3972 +line 7057 +;7057: { //special case, kill the saber on a freshly dead player if another source says to. +line 7058 +;7058: trap_G2API_RemoveGhoul2Model(&(cent->ghoul2), 1); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 trap_G2API_RemoveGhoul2Model +CALLI4 +pop +line 7059 +;7059: g2HasWeapon = qfalse; +ADDRLP4 536 +CNSTI4 0 +ASGNI4 +line 7060 +;7060: } +LABELV $3972 +line 7061 +;7061: } +LABELV $3970 +line 7063 +;7062: +;7063: if (iwantout) +ADDRLP4 768 +INDIRI4 +CNSTI4 0 +EQI4 $3974 +line 7064 +;7064: { +line 7066 +;7065: //return; +;7066: goto endOfCall; +ADDRGP4 $3889 +JUMPV +LABELV $3974 +line 7069 +;7067: } +;7068: +;7069: if ((cg.snap->ps.fd.forcePowersActive & (1 << FP_SEE)) && cg.snap->ps.clientNum != cent->currentState.number) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 892 +ADDP4 +INDIRI4 +CNSTI4 16384 +BANDI4 +CNSTI4 0 +EQI4 $3976 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +EQI4 $3976 +line 7070 +;7070: { +line 7071 +;7071: legs.shaderRGBA[0] = 255; +ADDRLP4 0+80 +CNSTU1 255 +ASGNU1 +line 7072 +;7072: legs.shaderRGBA[1] = 255; +ADDRLP4 0+80+1 +CNSTU1 255 +ASGNU1 +line 7073 +;7073: legs.shaderRGBA[2] = 0; +ADDRLP4 0+80+2 +CNSTU1 0 +ASGNU1 +line 7074 +;7074: legs.renderfx |= RF_MINLIGHT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 7075 +;7075: } +LABELV $3976 +line 7077 +;7076: +;7077: if (cg.snap->ps.duelInProgress /*&& cent->currentState.number != cg.snap->ps.clientNum*/) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1348 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $3986 +line 7078 +;7078: { //I guess go ahead and glow your own client too in a duel +line 7079 +;7079: if (cent->currentState.number != cg.snap->ps.duelIndex && +ADDRLP4 1064 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 1064 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +EQI4 $3989 +ADDRLP4 1064 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $3989 +line 7081 +;7080: cent->currentState.number != cg.snap->ps.clientNum) +;7081: { //everyone not involved in the duel is drawn very dark +line 7082 +;7082: legs.shaderRGBA[0] = 50; +ADDRLP4 0+80 +CNSTU1 50 +ASGNU1 +line 7083 +;7083: legs.shaderRGBA[1] = 50; +ADDRLP4 0+80+1 +CNSTU1 50 +ASGNU1 +line 7084 +;7084: legs.shaderRGBA[2] = 50; +ADDRLP4 0+80+2 +CNSTU1 50 +ASGNU1 +line 7085 +;7085: legs.renderfx |= RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 7086 +;7086: } +ADDRGP4 $3987 +JUMPV +LABELV $3989 +line 7088 +;7087: else +;7088: { //adjust the glow by how far away you are from your dueling partner +line 7091 +;7089: centity_t *duelEnt; +;7090: +;7091: duelEnt = &cg_entities[cg.snap->ps.duelIndex]; +ADDRLP4 1068 +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 7093 +;7092: +;7093: if (duelEnt) +ADDRLP4 1068 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3987 +line 7094 +;7094: { +line 7096 +;7095: vec3_t vecSub; +;7096: float subLen = 0; +ADDRLP4 1072 +CNSTF4 0 +ASGNF4 +line 7098 +;7097: +;7098: VectorSubtract(duelEnt->lerpOrigin, cg.snap->ps.origin, vecSub); +ADDRLP4 1088 +ADDRLP4 1068 +INDIRP4 +ASGNP4 +ADDRLP4 1076 +ADDRLP4 1088 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1076+4 +ADDRLP4 1088 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1076+8 +ADDRLP4 1068 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 7099 +;7099: subLen = VectorLength(vecSub); +ADDRLP4 1076 +ARGP4 +ADDRLP4 1092 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 1072 +ADDRLP4 1092 +INDIRF4 +ASGNF4 +line 7101 +;7100: +;7101: if (subLen < 1) +ADDRLP4 1072 +INDIRF4 +CNSTF4 1065353216 +GEF4 $4007 +line 7102 +;7102: { +line 7103 +;7103: subLen = 1; +ADDRLP4 1072 +CNSTF4 1065353216 +ASGNF4 +line 7104 +;7104: } +LABELV $4007 +line 7106 +;7105: +;7106: if (subLen > 1020) +ADDRLP4 1072 +INDIRF4 +CNSTF4 1149173760 +LEF4 $4009 +line 7107 +;7107: { +line 7108 +;7108: subLen = 1020; +ADDRLP4 1072 +CNSTF4 1149173760 +ASGNF4 +line 7109 +;7109: } +LABELV $4009 +line 7111 +;7110: +;7111: legs.shaderRGBA[0] = 255 - subLen/4; +ADDRLP4 1100 +CNSTF4 1132396544 +ADDRLP4 1072 +INDIRF4 +CNSTF4 1082130432 +DIVF4 +SUBF4 +ASGNF4 +ADDRLP4 1104 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1100 +INDIRF4 +ADDRLP4 1104 +INDIRF4 +LTF4 $4013 +ADDRLP4 1096 +ADDRLP4 1100 +INDIRF4 +ADDRLP4 1104 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $4014 +JUMPV +LABELV $4013 +ADDRLP4 1096 +ADDRLP4 1100 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $4014 +ADDRLP4 0+80 +ADDRLP4 1096 +INDIRU4 +CVUU1 4 +ASGNU1 +line 7112 +;7112: legs.shaderRGBA[1] = 255 - subLen/4; +ADDRLP4 1112 +CNSTF4 1132396544 +ADDRLP4 1072 +INDIRF4 +CNSTF4 1082130432 +DIVF4 +SUBF4 +ASGNF4 +ADDRLP4 1116 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1112 +INDIRF4 +ADDRLP4 1116 +INDIRF4 +LTF4 $4018 +ADDRLP4 1108 +ADDRLP4 1112 +INDIRF4 +ADDRLP4 1116 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $4019 +JUMPV +LABELV $4018 +ADDRLP4 1108 +ADDRLP4 1112 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $4019 +ADDRLP4 0+80+1 +ADDRLP4 1108 +INDIRU4 +CVUU1 4 +ASGNU1 +line 7113 +;7113: legs.shaderRGBA[2] = 255 - subLen/4; +ADDRLP4 1124 +CNSTF4 1132396544 +ADDRLP4 1072 +INDIRF4 +CNSTF4 1082130432 +DIVF4 +SUBF4 +ASGNF4 +ADDRLP4 1128 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1124 +INDIRF4 +ADDRLP4 1128 +INDIRF4 +LTF4 $4023 +ADDRLP4 1120 +ADDRLP4 1124 +INDIRF4 +ADDRLP4 1128 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $4024 +JUMPV +LABELV $4023 +ADDRLP4 1120 +ADDRLP4 1124 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $4024 +ADDRLP4 0+80+2 +ADDRLP4 1120 +INDIRU4 +CVUU1 4 +ASGNU1 +line 7115 +;7114: +;7115: if (legs.shaderRGBA[2] < 1) legs.shaderRGBA[2] = 1; +ADDRLP4 0+80+2 +INDIRU1 +CVUI4 1 +CNSTI4 1 +GEI4 $4025 +ADDRLP4 0+80+2 +CNSTU1 1 +ASGNU1 +LABELV $4025 +line 7117 +;7116: +;7117: legs.renderfx &= ~RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 7118 +;7118: legs.renderfx &= ~RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 7119 +;7119: legs.customShader = cgs.media.forceShell; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+496 +INDIRI4 +ASGNI4 +line 7121 +;7120: +;7121: trap_R_AddRefEntityToScene( &legs ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7123 +;7122: +;7123: legs.customShader = 0; +ADDRLP4 0+76 +CNSTI4 0 +ASGNI4 +line 7125 +;7124: +;7125: legs.shaderRGBA[0] = 255 - subLen/8; +ADDRLP4 1136 +CNSTF4 1132396544 +ADDRLP4 1072 +INDIRF4 +CNSTF4 1090519040 +DIVF4 +SUBF4 +ASGNF4 +ADDRLP4 1140 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1136 +INDIRF4 +ADDRLP4 1140 +INDIRF4 +LTF4 $4039 +ADDRLP4 1132 +ADDRLP4 1136 +INDIRF4 +ADDRLP4 1140 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $4040 +JUMPV +LABELV $4039 +ADDRLP4 1132 +ADDRLP4 1136 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $4040 +ADDRLP4 0+80 +ADDRLP4 1132 +INDIRU4 +CVUU1 4 +ASGNU1 +line 7126 +;7126: legs.shaderRGBA[1] = 255 - subLen/8; +ADDRLP4 1148 +CNSTF4 1132396544 +ADDRLP4 1072 +INDIRF4 +CNSTF4 1090519040 +DIVF4 +SUBF4 +ASGNF4 +ADDRLP4 1152 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1148 +INDIRF4 +ADDRLP4 1152 +INDIRF4 +LTF4 $4044 +ADDRLP4 1144 +ADDRLP4 1148 +INDIRF4 +ADDRLP4 1152 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $4045 +JUMPV +LABELV $4044 +ADDRLP4 1144 +ADDRLP4 1148 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $4045 +ADDRLP4 0+80+1 +ADDRLP4 1144 +INDIRU4 +CVUU1 4 +ASGNU1 +line 7127 +;7127: legs.shaderRGBA[2] = 255 - subLen/8; +ADDRLP4 1160 +CNSTF4 1132396544 +ADDRLP4 1072 +INDIRF4 +CNSTF4 1090519040 +DIVF4 +SUBF4 +ASGNF4 +ADDRLP4 1164 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 1160 +INDIRF4 +ADDRLP4 1164 +INDIRF4 +LTF4 $4049 +ADDRLP4 1156 +ADDRLP4 1160 +INDIRF4 +ADDRLP4 1164 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $4050 +JUMPV +LABELV $4049 +ADDRLP4 1156 +ADDRLP4 1160 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $4050 +ADDRLP4 0+80+2 +ADDRLP4 1156 +INDIRU4 +CVUU1 4 +ASGNU1 +line 7129 +;7128: +;7129: if (legs.shaderRGBA[2] < 1) +ADDRLP4 0+80+2 +INDIRU1 +CVUI4 1 +CNSTI4 1 +GEI4 $4051 +line 7130 +;7130: { +line 7131 +;7131: legs.shaderRGBA[2] = 1; +ADDRLP4 0+80+2 +CNSTU1 1 +ASGNU1 +line 7132 +;7132: } +LABELV $4051 +line 7133 +;7133: if (legs.shaderRGBA[2] > 255) +ADDRLP4 0+80+2 +INDIRU1 +CVUI4 1 +CNSTI4 255 +LEI4 $4057 +line 7134 +;7134: { +line 7135 +;7135: legs.shaderRGBA[2] = 255; +ADDRLP4 0+80+2 +CNSTU1 255 +ASGNU1 +line 7136 +;7136: } +LABELV $4057 +line 7138 +;7137: +;7138: if (subLen <= 1024) +ADDRLP4 1072 +INDIRF4 +CNSTF4 1149239296 +GTF4 $3987 +line 7139 +;7139: { +line 7140 +;7140: legs.renderfx |= RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 7141 +;7141: } +line 7142 +;7142: } +line 7143 +;7143: } +line 7144 +;7144: } +ADDRGP4 $3987 +JUMPV +LABELV $3986 +line 7146 +;7145: else +;7146: { +line 7147 +;7147: if (cent->currentState.bolt1 && !(cent->currentState.eFlags & EF_DEAD) && cent->currentState.number != cg.snap->ps.clientNum && (!cg.snap->ps.duelInProgress || cg.snap->ps.duelIndex != cent->currentState.number)) +ADDRLP4 1064 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1068 +CNSTI4 0 +ASGNI4 +ADDRLP4 1064 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRI4 +ADDRLP4 1068 +INDIRI4 +EQI4 $4066 +ADDRLP4 1064 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 1068 +INDIRI4 +NEI4 $4066 +ADDRLP4 1072 +ADDRLP4 1064 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 1072 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $4066 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1348 +ADDP4 +INDIRI4 +ADDRLP4 1068 +INDIRI4 +EQI4 $4071 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +ADDRLP4 1072 +INDIRI4 +EQI4 $4066 +LABELV $4071 +line 7148 +;7148: { +line 7149 +;7149: legs.shaderRGBA[0] = 50; +ADDRLP4 0+80 +CNSTU1 50 +ASGNU1 +line 7150 +;7150: legs.shaderRGBA[1] = 50; +ADDRLP4 0+80+1 +CNSTU1 50 +ASGNU1 +line 7151 +;7151: legs.shaderRGBA[2] = 50; +ADDRLP4 0+80+2 +CNSTU1 50 +ASGNU1 +line 7152 +;7152: legs.renderfx |= RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 7153 +;7153: } +LABELV $4066 +line 7154 +;7154: } +LABELV $3987 +LABELV $3411 +line 7156 +;7155:doEssentialThree: +;7156: if (cent->currentState.eFlags & EF_DISINTEGRATION) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 33554432 +BANDI4 +CNSTI4 0 +EQI4 $4078 +line 7157 +;7157: { +line 7161 +;7158: vec3_t tempAng, hitLoc; +;7159: float tempLength; +;7160: +;7161: if (!cent->dustTrailTime) +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $4080 +line 7162 +;7162: { +line 7163 +;7163: cent->dustTrailTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 7164 +;7164: cent->miscTime = legs.frame; +ADDRFP4 0 +INDIRP4 +CNSTI4 620 +ADDP4 +ADDRLP4 0+104 +INDIRI4 +ASGNI4 +line 7165 +;7165: } +LABELV $4080 +line 7167 +;7166: +;7167: if ((cg.time - cent->dustTrailTime) > 1500) +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 1500 +LEI4 $4084 +line 7168 +;7168: { //avoid rendering the entity after disintegration has finished anyway +line 7169 +;7169: goto endOfCall; +ADDRGP4 $3889 +JUMPV +LABELV $4084 +line 7172 +;7170: } +;7171: +;7172: trap_G2API_SetBoneAnim(legs.ghoul2, 0, "model_root", cent->miscTime, cent->miscTime, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->miscTime, -1); +ADDRLP4 0+208 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 1092 +ADDRFP4 0 +INDIRP4 +CNSTI4 620 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1092 +INDIRI4 +ARGI4 +ADDRLP4 1092 +INDIRI4 +ARGI4 +CNSTI4 72 +ARGI4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 1092 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 -1 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 7173 +;7173: trap_G2API_SetBoneAnim(legs.ghoul2, 0, "lower_lumbar", cent->miscTime, cent->miscTime, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->miscTime, -1); +ADDRLP4 0+208 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 1096 +ADDRFP4 0 +INDIRP4 +CNSTI4 620 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1096 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRI4 +ARGI4 +CNSTI4 72 +ARGI4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 -1 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 7174 +;7174: trap_G2API_SetBoneAnim(legs.ghoul2, 0, "Motion", cent->miscTime, cent->miscTime, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->miscTime, -1); +ADDRLP4 0+208 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $311 +ARGP4 +ADDRLP4 1100 +ADDRFP4 0 +INDIRP4 +CNSTI4 620 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1100 +INDIRI4 +ARGI4 +ADDRLP4 1100 +INDIRI4 +ARGI4 +CNSTI4 72 +ARGI4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 1100 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 -1 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 7176 +;7175: +;7176: VectorCopy(cent->currentState.origin2, hitLoc); +ADDRLP4 1064 +ADDRFP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRB +ASGNB 12 +line 7178 +;7177: +;7178: VectorSubtract( hitLoc, legs.origin, legs.oldorigin ); +ADDRLP4 0+64 +ADDRLP4 1064 +INDIRF4 +ADDRLP4 0+52 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+64+4 +ADDRLP4 1064+4 +INDIRF4 +ADDRLP4 0+52+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+64+8 +ADDRLP4 1064+8 +INDIRF4 +ADDRLP4 0+52+8 +INDIRF4 +SUBF4 +ASGNF4 +line 7180 +;7179: +;7180: tempLength = VectorNormalize( legs.oldorigin ); +ADDRLP4 0+64 +ARGP4 +ADDRLP4 1104 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 1076 +ADDRLP4 1104 +INDIRF4 +ASGNF4 +line 7181 +;7181: vectoangles( legs.oldorigin, tempAng ); +ADDRLP4 0+64 +ARGP4 +ADDRLP4 1080 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 7182 +;7182: tempAng[YAW] -= cent->lerpAngles[YAW]; +ADDRLP4 1080+4 +ADDRLP4 1080+4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 944 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 7183 +;7183: AngleVectors( tempAng, legs.oldorigin, NULL, NULL ); +ADDRLP4 1080 +ARGP4 +ADDRLP4 0+64 +ARGP4 +ADDRLP4 1108 +CNSTP4 0 +ASGNP4 +ADDRLP4 1108 +INDIRP4 +ARGP4 +ADDRLP4 1108 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 7184 +;7184: VectorScale( legs.oldorigin, tempLength, legs.oldorigin ); +ADDRLP4 0+64 +ADDRLP4 0+64 +INDIRF4 +ADDRLP4 1076 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+64+4 +ADDRLP4 0+64+4 +INDIRF4 +ADDRLP4 1076 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 0+64+8 +ADDRLP4 0+64+8 +INDIRF4 +ADDRLP4 1076 +INDIRF4 +MULF4 +ASGNF4 +line 7185 +;7185: legs.endTime = cent->dustTrailTime; +ADDRLP4 0+176 +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 7194 +;7186: +;7187: //FIXME: Sorting is all wrong here, it can't decide if it should render this part or the outer body first +;7188: /* +;7189: legs.renderfx |= RF_DISINTEGRATE2; +;7190: legs.customShader = cgs.media.disruptorShader; +;7191: trap_R_AddRefEntityToScene( &legs ); +;7192: */ +;7193: +;7194: legs.renderfx &= ~(RF_DISINTEGRATE2); +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -262145 +BANDI4 +ASGNI4 +line 7195 +;7195: legs.renderfx |= (RF_DISINTEGRATE1); +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 131072 +BORI4 +ASGNI4 +line 7197 +;7196: +;7197: legs.customShader = 0; +ADDRLP4 0+76 +CNSTI4 0 +ASGNI4 +line 7198 +;7198: trap_R_AddRefEntityToScene( &legs ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7200 +;7199: +;7200: goto endOfCall; +ADDRGP4 $3889 +JUMPV +LABELV $4078 +line 7203 +;7201: } +;7202: else +;7203: { +line 7204 +;7204: cent->dustTrailTime = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +CNSTI4 0 +ASGNI4 +line 7205 +;7205: cent->miscTime = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 620 +ADDP4 +CNSTI4 0 +ASGNI4 +line 7206 +;7206: } +line 7208 +;7207: +;7208: trap_R_AddRefEntityToScene(&legs); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7210 +;7209: +;7210: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $4123 +line 7211 +;7211: { +line 7213 +;7212: //return; +;7213: goto endOfCall; +ADDRGP4 $3889 +JUMPV +LABELV $4123 +line 7216 +;7214: } +;7215: +;7216: cent->frame_minus2 = cent->frame_minus1; +ADDRLP4 1064 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1064 +INDIRP4 +CNSTI4 1252 +ADDP4 +ADDRLP4 1064 +INDIRP4 +CNSTI4 1040 +ADDP4 +INDIRB +ASGNB 212 +line 7217 +;7217: if (cent->frame_minus1_refreshed) +ADDRFP4 0 +INDIRP4 +CNSTI4 1464 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $4125 +line 7218 +;7218: { +line 7219 +;7219: cent->frame_minus2_refreshed = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 1468 +ADDP4 +CNSTI4 1 +ASGNI4 +line 7220 +;7220: } +LABELV $4125 +line 7221 +;7221: cent->frame_minus1 = legs; +ADDRFP4 0 +INDIRP4 +CNSTI4 1040 +ADDP4 +ADDRLP4 0 +INDIRB +ASGNB 212 +line 7222 +;7222: cent->frame_minus1_refreshed = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 1464 +ADDP4 +CNSTI4 1 +ASGNI4 +line 7224 +;7223: +;7224: if (!cent->frame_hold_refreshed && (cent->currentState.powerups & (1 << PW_SPEEDBURST))) +ADDRLP4 1068 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1072 +CNSTI4 0 +ASGNI4 +ADDRLP4 1068 +INDIRP4 +CNSTI4 1688 +ADDP4 +INDIRI4 +ADDRLP4 1072 +INDIRI4 +NEI4 $4127 +ADDRLP4 1068 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +ADDRLP4 1072 +INDIRI4 +EQI4 $4127 +line 7225 +;7225: { +line 7226 +;7226: cent->frame_hold_time = cg.time + 254; +ADDRFP4 0 +INDIRP4 +CNSTI4 1684 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 254 +ADDI4 +ASGNI4 +line 7227 +;7227: } +LABELV $4127 +line 7229 +;7228: +;7229: if (cent->frame_hold_time >= cg.time) +ADDRFP4 0 +INDIRP4 +CNSTI4 1684 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LTI4 $4130 +line 7230 +;7230: { +line 7231 +;7231: if (!cent->frame_hold_refreshed) +ADDRFP4 0 +INDIRP4 +CNSTI4 1688 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $4133 +line 7232 +;7232: { //We're taking the ghoul2 instance from the original refent and duplicating it onto our refent alias so that we can then freeze the frame and fade it for the effect +line 7233 +;7233: if (cent->frame_hold.ghoul2 && trap_G2_HaveWeGhoul2Models(cent->frame_hold.ghoul2) && +ADDRLP4 1076 +ADDRFP4 0 +INDIRP4 +CNSTI4 1680 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 1076 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $4135 +ADDRLP4 1076 +INDIRP4 +ARGP4 +ADDRLP4 1080 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 1080 +INDIRI4 +CNSTI4 0 +EQI4 $4135 +ADDRLP4 1084 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 1680 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 1084 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +EQU4 $4135 +line 7235 +;7234: cent->frame_hold.ghoul2 != cent->ghoul2) +;7235: { +line 7236 +;7236: trap_G2API_CleanGhoul2Models(&(cent->frame_hold.ghoul2)); +ADDRFP4 0 +INDIRP4 +CNSTI4 1680 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 7237 +;7237: } +LABELV $4135 +line 7238 +;7238: cent->frame_hold = legs; +ADDRFP4 0 +INDIRP4 +CNSTI4 1472 +ADDP4 +ADDRLP4 0 +INDIRB +ASGNB 212 +line 7239 +;7239: cent->frame_hold_refreshed = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 1688 +ADDP4 +CNSTI4 1 +ASGNI4 +line 7240 +;7240: cent->frame_hold.ghoul2 = NULL; +ADDRFP4 0 +INDIRP4 +CNSTI4 1680 +ADDP4 +CNSTP4 0 +ASGNP4 +line 7242 +;7241: +;7242: trap_G2API_DuplicateGhoul2Instance(cent->ghoul2, ¢->frame_hold.ghoul2); +ADDRLP4 1088 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1088 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1088 +INDIRP4 +CNSTI4 1680 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_DuplicateGhoul2Instance +CALLV +pop +line 7246 +;7243: +;7244: //Set the animation to the current frame and freeze on end +;7245: //trap_G2API_SetBoneAnim(cent->frame_hold.ghoul2, 0, "model_root", cent->frame_hold.frame, cent->frame_hold.frame, BONE_ANIM_OVERRIDE_FREEZE, 1.0f, cg.time, cent->frame_hold.frame, -1); +;7246: trap_G2API_SetBoneAnim(cent->frame_hold.ghoul2, 0, "model_root", cent->frame_hold.frame, cent->frame_hold.frame, 0, 1.0f, cg.time, cent->frame_hold.frame, -1); +ADDRLP4 1092 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 1680 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1096 +CNSTI4 0 +ASGNI4 +ADDRLP4 1096 +INDIRI4 +ARGI4 +ADDRGP4 $299 +ARGP4 +ADDRLP4 1100 +ADDRLP4 1092 +INDIRP4 +CNSTI4 1576 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1100 +INDIRI4 +ARGI4 +ADDRLP4 1100 +INDIRI4 +ARGI4 +ADDRLP4 1096 +INDIRI4 +ARGI4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 1100 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 -1 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 7247 +;7247: } +LABELV $4133 +line 7249 +;7248: +;7249: cent->frame_hold.renderfx |= RF_FORCE_ENT_ALPHA; +ADDRLP4 1076 +ADDRFP4 0 +INDIRP4 +CNSTI4 1476 +ADDP4 +ASGNP4 +ADDRLP4 1076 +INDIRP4 +ADDRLP4 1076 +INDIRP4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 7250 +;7250: cent->frame_hold.shaderRGBA[3] = (cent->frame_hold_time - cg.time); +ADDRLP4 1080 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1080 +INDIRP4 +CNSTI4 1555 +ADDP4 +ADDRLP4 1080 +INDIRP4 +CNSTI4 1684 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 7251 +;7251: if (cent->frame_hold.shaderRGBA[3] > 254) +ADDRFP4 0 +INDIRP4 +CNSTI4 1555 +ADDP4 +INDIRU1 +CVUI4 1 +CNSTI4 254 +LEI4 $4139 +line 7252 +;7252: { +line 7253 +;7253: cent->frame_hold.shaderRGBA[3] = 254; +ADDRFP4 0 +INDIRP4 +CNSTI4 1555 +ADDP4 +CNSTU1 254 +ASGNU1 +line 7254 +;7254: } +LABELV $4139 +line 7255 +;7255: if (cent->frame_hold.shaderRGBA[3] < 1) +ADDRFP4 0 +INDIRP4 +CNSTI4 1555 +ADDP4 +INDIRU1 +CVUI4 1 +CNSTI4 1 +GEI4 $4141 +line 7256 +;7256: { +line 7257 +;7257: cent->frame_hold.shaderRGBA[3] = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 1555 +ADDP4 +CNSTU1 1 +ASGNU1 +line 7258 +;7258: } +LABELV $4141 +line 7260 +;7259: +;7260: trap_R_AddRefEntityToScene(¢->frame_hold); +ADDRFP4 0 +INDIRP4 +CNSTI4 1472 +ADDP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7261 +;7261: } +ADDRGP4 $4131 +JUMPV +LABELV $4130 +line 7263 +;7262: else +;7263: { +line 7264 +;7264: cent->frame_hold_refreshed = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1688 +ADDP4 +CNSTI4 0 +ASGNI4 +line 7265 +;7265: } +LABELV $4131 +line 7270 +;7266: +;7267: // +;7268: // add the gun / barrel / flash +;7269: // +;7270: if (cent->currentState.weapon != WP_EMPLACED_GUN) +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 14 +EQI4 $4143 +line 7271 +;7271: { +line 7272 +;7272: CG_AddPlayerWeapon( &legs, NULL, cent, ci->team, rootAngles, qtrue ); +ADDRLP4 0 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 828 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 840 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_AddPlayerWeapon +CALLV +pop +line 7273 +;7273: } +LABELV $4143 +line 7275 +;7274: // add powerups floating behind the player +;7275: CG_PlayerPowerups( cent, &legs ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_PlayerPowerups +CALLV +pop +line 7277 +;7276: +;7277: if ((cent->currentState.forcePowersActive & (1 << FP_RAGE)) && +ADDRLP4 1076 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1080 +CNSTI4 0 +ASGNI4 +ADDRLP4 1076 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +ADDRLP4 1080 +INDIRI4 +EQI4 $4145 +ADDRGP4 cg+88 +INDIRI4 +ADDRLP4 1080 +INDIRI4 +NEI4 $4149 +ADDRLP4 1076 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $4145 +LABELV $4149 +line 7279 +;7278: (cg.renderingThirdPerson || cent->currentState.number != cg.snap->ps.clientNum)) +;7279: { +line 7281 +;7280: //legs.customShader = cgs.media.rageShader; +;7281: legs.renderfx &= ~RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 7282 +;7282: legs.renderfx &= ~RF_MINLIGHT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 7284 +;7283: +;7284: legs.renderfx |= RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 7285 +;7285: legs.shaderRGBA[0] = 255; +ADDRLP4 0+80 +CNSTU1 255 +ASGNU1 +line 7286 +;7286: legs.shaderRGBA[1] = legs.shaderRGBA[2] = 0; +ADDRLP4 1084 +CNSTU1 0 +ASGNU1 +ADDRLP4 0+80+2 +ADDRLP4 1084 +INDIRU1 +ASGNU1 +ADDRLP4 0+80+1 +ADDRLP4 1084 +INDIRU1 +ASGNU1 +line 7287 +;7287: legs.shaderRGBA[3] = 255; +ADDRLP4 0+80+3 +CNSTU1 255 +ASGNU1 +line 7289 +;7288: +;7289: if ( rand() & 1 ) +ADDRLP4 1088 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 1088 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $4160 +line 7290 +;7290: { +line 7291 +;7291: legs.customShader = cgs.media.electricBodyShader; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+396 +INDIRI4 +ASGNI4 +line 7292 +;7292: } +ADDRGP4 $4161 +JUMPV +LABELV $4160 +line 7294 +;7293: else +;7294: { +line 7295 +;7295: legs.customShader = cgs.media.electricBody2Shader; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+400 +INDIRI4 +ASGNI4 +line 7296 +;7296: } +LABELV $4161 +line 7298 +;7297: +;7298: trap_R_AddRefEntityToScene(&legs); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7299 +;7299: } +LABELV $4145 +line 7301 +;7300: +;7301: if (!cg.snap->ps.duelInProgress && cent->currentState.bolt1 && !(cent->currentState.eFlags & EF_DEAD) && cent->currentState.number != cg.snap->ps.clientNum && (!cg.snap->ps.duelInProgress || cg.snap->ps.duelIndex != cent->currentState.number)) +ADDRLP4 1084 +CNSTI4 1348 +ASGNI4 +ADDRLP4 1088 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 1084 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 1088 +INDIRI4 +NEI4 $4168 +ADDRLP4 1092 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRI4 +ADDRLP4 1088 +INDIRI4 +EQI4 $4168 +ADDRLP4 1092 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 1088 +INDIRI4 +NEI4 $4168 +ADDRLP4 1096 +ADDRLP4 1092 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 1096 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $4168 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 1084 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 1088 +INDIRI4 +EQI4 $4174 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1340 +ADDP4 +INDIRI4 +ADDRLP4 1096 +INDIRI4 +EQI4 $4168 +LABELV $4174 +line 7302 +;7302: { +line 7303 +;7303: legs.shaderRGBA[0] = 50; +ADDRLP4 0+80 +CNSTU1 50 +ASGNU1 +line 7304 +;7304: legs.shaderRGBA[1] = 50; +ADDRLP4 0+80+1 +CNSTU1 50 +ASGNU1 +line 7305 +;7305: legs.shaderRGBA[2] = 255; +ADDRLP4 0+80+2 +CNSTU1 255 +ASGNU1 +line 7307 +;7306: +;7307: legs.renderfx &= ~RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 7308 +;7308: legs.renderfx &= ~RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 7309 +;7309: legs.customShader = cgs.media.forceSightBubble; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+492 +INDIRI4 +ASGNI4 +line 7311 +;7310: +;7311: trap_R_AddRefEntityToScene( &legs ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7312 +;7312: } +LABELV $4168 +line 7316 +;7313: +;7314: //For now, these two are using the old shield shader. This is just so that you +;7315: //can tell it apart from the JM/duel shaders, but it's still very obvious. +;7316: if (cent->currentState.forcePowersActive & (1 << FP_PROTECT)) +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $4185 +line 7317 +;7317: { //aborb is represented by green.. +line 7318 +;7318: legs.shaderRGBA[0] = 0; +ADDRLP4 0+80 +CNSTU1 0 +ASGNU1 +line 7319 +;7319: legs.shaderRGBA[1] = 255; +ADDRLP4 0+80+1 +CNSTU1 255 +ASGNU1 +line 7320 +;7320: legs.shaderRGBA[2] = 0; +ADDRLP4 0+80+2 +CNSTU1 0 +ASGNU1 +line 7321 +;7321: legs.shaderRGBA[3] = 254; +ADDRLP4 0+80+3 +CNSTU1 254 +ASGNU1 +line 7323 +;7322: +;7323: legs.renderfx &= ~RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 7324 +;7324: legs.renderfx &= ~RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 7325 +;7325: legs.customShader = cgs.media.playerShieldDamage; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+488 +INDIRI4 +ASGNI4 +line 7327 +;7326: +;7327: trap_R_AddRefEntityToScene( &legs ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7328 +;7328: } +LABELV $4185 +line 7331 +;7329: //if (cent->currentState.forcePowersActive & (1 << FP_ABSORB)) +;7330: //Showing only when the power has been active (absorbed something) recently now, instead of always. +;7331: if (cg_entities[cent->currentState.number].teamPowerEffectTime > cg.time && cg_entities[cent->currentState.number].teamPowerType == 3) +ADDRLP4 1100 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 1100 +INDIRI4 +ADDRGP4 cg_entities+1912 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $4199 +ADDRLP4 1100 +INDIRI4 +ADDRGP4 cg_entities+1916 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $4199 +line 7332 +;7332: { //aborb is represented by blue.. +line 7333 +;7333: legs.shaderRGBA[0] = 0; +ADDRLP4 0+80 +CNSTU1 0 +ASGNU1 +line 7334 +;7334: legs.shaderRGBA[1] = 0; +ADDRLP4 0+80+1 +CNSTU1 0 +ASGNU1 +line 7335 +;7335: legs.shaderRGBA[2] = 255; +ADDRLP4 0+80+2 +CNSTU1 255 +ASGNU1 +line 7336 +;7336: legs.shaderRGBA[3] = 254; +ADDRLP4 0+80+3 +CNSTU1 254 +ASGNU1 +line 7338 +;7337: +;7338: legs.renderfx &= ~RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 7339 +;7339: legs.renderfx &= ~RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 7340 +;7340: legs.customShader = cgs.media.playerShieldDamage; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+488 +INDIRI4 +ASGNI4 +line 7342 +;7341: +;7342: trap_R_AddRefEntityToScene( &legs ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7343 +;7343: } +LABELV $4199 +line 7345 +;7344: +;7345: if (cent->currentState.isJediMaster && cg.snap->ps.clientNum != cent->currentState.number) +ADDRLP4 1104 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1104 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $4216 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRLP4 1104 +INDIRP4 +INDIRI4 +EQI4 $4216 +line 7346 +;7346: { +line 7347 +;7347: legs.shaderRGBA[0] = 100; +ADDRLP4 0+80 +CNSTU1 100 +ASGNU1 +line 7348 +;7348: legs.shaderRGBA[1] = 100; +ADDRLP4 0+80+1 +CNSTU1 100 +ASGNU1 +line 7349 +;7349: legs.shaderRGBA[2] = 255; +ADDRLP4 0+80+2 +CNSTU1 255 +ASGNU1 +line 7351 +;7350: +;7351: legs.renderfx &= ~RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 7352 +;7352: legs.renderfx &= ~RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 7353 +;7353: legs.renderfx |= RF_NODEPTH; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 16 +BORI4 +ASGNI4 +line 7354 +;7354: legs.customShader = cgs.media.forceShell; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+496 +INDIRI4 +ASGNI4 +line 7356 +;7355: +;7356: trap_R_AddRefEntityToScene( &legs ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7358 +;7357: +;7358: legs.renderfx &= ~RF_NODEPTH; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -17 +BANDI4 +ASGNI4 +line 7359 +;7359: } +LABELV $4216 +line 7361 +;7360: +;7361: if ((cg.snap->ps.fd.forcePowersActive & (1 << FP_SEE)) && cg.snap->ps.clientNum != cent->currentState.number && cg_auraShell.integer) +ADDRLP4 1108 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 892 +ADDP4 +INDIRI4 +CNSTI4 16384 +BANDI4 +ADDRLP4 1108 +INDIRI4 +EQI4 $4231 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +EQI4 $4231 +ADDRGP4 cg_auraShell+12 +INDIRI4 +ADDRLP4 1108 +INDIRI4 +EQI4 $4231 +line 7362 +;7362: { +line 7363 +;7363: if (cgs.gametype >= GT_TEAM) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $4236 +line 7364 +;7364: { // A team game +line 7365 +;7365: switch(cgs.clientinfo[ cent->currentState.clientNum ].team) +ADDRLP4 1112 +CNSTI4 788 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1112 +INDIRI4 +CNSTI4 1 +EQI4 $4244 +ADDRLP4 1112 +INDIRI4 +CNSTI4 2 +EQI4 $4250 +ADDRGP4 $4239 +JUMPV +line 7366 +;7366: { +LABELV $4244 +line 7368 +;7367: case TEAM_RED: +;7368: legs.shaderRGBA[0] = 255; +ADDRLP4 0+80 +CNSTU1 255 +ASGNU1 +line 7369 +;7369: legs.shaderRGBA[1] = 50; +ADDRLP4 0+80+1 +CNSTU1 50 +ASGNU1 +line 7370 +;7370: legs.shaderRGBA[2] = 50; +ADDRLP4 0+80+2 +CNSTU1 50 +ASGNU1 +line 7371 +;7371: break; +ADDRGP4 $4237 +JUMPV +LABELV $4250 +line 7373 +;7372: case TEAM_BLUE: +;7373: legs.shaderRGBA[0] = 75; +ADDRLP4 0+80 +CNSTU1 75 +ASGNU1 +line 7374 +;7374: legs.shaderRGBA[1] = 75; +ADDRLP4 0+80+1 +CNSTU1 75 +ASGNU1 +line 7375 +;7375: legs.shaderRGBA[2] = 255; +ADDRLP4 0+80+2 +CNSTU1 255 +ASGNU1 +line 7376 +;7376: break; +ADDRGP4 $4237 +JUMPV +LABELV $4239 +line 7379 +;7377: +;7378: default: +;7379: legs.shaderRGBA[0] = 255; +ADDRLP4 0+80 +CNSTU1 255 +ASGNU1 +line 7380 +;7380: legs.shaderRGBA[1] = 255; +ADDRLP4 0+80+1 +CNSTU1 255 +ASGNU1 +line 7381 +;7381: legs.shaderRGBA[2] = 0; +ADDRLP4 0+80+2 +CNSTU1 0 +ASGNU1 +line 7382 +;7382: break; +line 7384 +;7383: } +;7384: } +ADDRGP4 $4237 +JUMPV +LABELV $4236 +line 7386 +;7385: else +;7386: { // Not a team game +line 7387 +;7387: legs.shaderRGBA[0] = 255; +ADDRLP4 0+80 +CNSTU1 255 +ASGNU1 +line 7388 +;7388: legs.shaderRGBA[1] = 255; +ADDRLP4 0+80+1 +CNSTU1 255 +ASGNU1 +line 7389 +;7389: legs.shaderRGBA[2] = 0; +ADDRLP4 0+80+2 +CNSTU1 0 +ASGNU1 +line 7390 +;7390: } +LABELV $4237 +line 7392 +;7391: +;7392:/* if (cg.snap->ps.fd.forcePowerLevel[FP_SEE] <= FORCE_LEVEL_1) +line 7398 +;7393: { +;7394: legs.renderfx |= RF_MINLIGHT; +;7395: } +;7396: else +;7397:*/ { // See through walls. +;7398: legs.renderfx |= RF_MINLIGHT | RF_NODEPTH; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 17 +BORI4 +ASGNI4 +line 7400 +;7399: +;7400: if (cg.snap->ps.fd.forcePowerLevel[FP_SEE] < FORCE_LEVEL_2) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1044 +ADDP4 +INDIRI4 +CNSTI4 2 +GEI4 $4267 +line 7401 +;7401: { //only level 2+ can see players through walls +line 7402 +;7402: legs.renderfx &= ~RF_NODEPTH; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -17 +BANDI4 +ASGNI4 +line 7403 +;7403: } +LABELV $4267 +line 7404 +;7404: } +line 7406 +;7405: +;7406: legs.renderfx &= ~RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 7407 +;7407: legs.renderfx &= ~RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 7408 +;7408: legs.customShader = cgs.media.sightShell; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+500 +INDIRI4 +ASGNI4 +line 7410 +;7409: +;7410: trap_R_AddRefEntityToScene( &legs ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7411 +;7411: } +LABELV $4231 +line 7415 +;7412: +;7413: // Electricity +;7414: //------------------------------------------------ +;7415: if ( cent->currentState.emplacedOwner > cg.time ) +ADDRFP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $4276 +line 7416 +;7416: { +line 7417 +;7417: int dif = cent->currentState.emplacedOwner - cg.time; +ADDRLP4 1112 +ADDRFP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +ASGNI4 +line 7419 +;7418: +;7419: if ( dif > 0 && random() > 0.4f ) +ADDRLP4 1112 +INDIRI4 +CNSTI4 0 +LEI4 $4280 +ADDRLP4 1116 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 1116 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1053609165 +LEF4 $4280 +line 7420 +;7420: { +line 7422 +;7421: // fade out over the last 500 ms +;7422: int brightness = 255; +ADDRLP4 1120 +CNSTI4 255 +ASGNI4 +line 7424 +;7423: +;7424: if ( dif < 500 ) +ADDRLP4 1112 +INDIRI4 +CNSTI4 500 +GEI4 $4282 +line 7425 +;7425: { +line 7426 +;7426: brightness = floor((dif - 500.0f) / 500.0f * 255.0f ); +ADDRLP4 1124 +CNSTF4 1140457472 +ASGNF4 +CNSTF4 1132396544 +ADDRLP4 1112 +INDIRI4 +CVIF4 4 +ADDRLP4 1124 +INDIRF4 +SUBF4 +ADDRLP4 1124 +INDIRF4 +DIVF4 +MULF4 +ARGF4 +ADDRLP4 1128 +ADDRGP4 floor +CALLF4 +ASGNF4 +ADDRLP4 1120 +ADDRLP4 1128 +INDIRF4 +CVFI4 4 +ASGNI4 +line 7427 +;7427: } +LABELV $4282 +line 7429 +;7428: +;7429: legs.renderfx &= ~RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 7430 +;7430: legs.renderfx &= ~RF_MINLIGHT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 7432 +;7431: +;7432: legs.renderfx |= RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 2048 +BORI4 +ASGNI4 +line 7433 +;7433: legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = brightness; +ADDRLP4 1124 +ADDRLP4 1120 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +ADDRLP4 0+80+2 +ADDRLP4 1124 +INDIRU1 +ASGNU1 +ADDRLP4 0+80+1 +ADDRLP4 1124 +INDIRU1 +ASGNU1 +ADDRLP4 0+80 +ADDRLP4 1124 +INDIRU1 +ASGNU1 +line 7434 +;7434: legs.shaderRGBA[3] = 255; +ADDRLP4 0+80+3 +CNSTU1 255 +ASGNU1 +line 7436 +;7435: +;7436: if ( rand() & 1 ) +ADDRLP4 1128 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 1128 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $4294 +line 7437 +;7437: { +line 7438 +;7438: legs.customShader = cgs.media.electricBodyShader; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+396 +INDIRI4 +ASGNI4 +line 7439 +;7439: } +ADDRGP4 $4295 +JUMPV +LABELV $4294 +line 7441 +;7440: else +;7441: { +line 7442 +;7442: legs.customShader = cgs.media.electricBody2Shader; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+400 +INDIRI4 +ASGNI4 +line 7443 +;7443: } +LABELV $4295 +line 7445 +;7444: +;7445: trap_R_AddRefEntityToScene( &legs ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7447 +;7446: +;7447: if ( random() > 0.9f ) +ADDRLP4 1132 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 1132 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1063675494 +LEF4 $4302 +line 7448 +;7448: trap_S_StartSound ( NULL, cent->currentState.number, CHAN_AUTO, cgs.media.crackleSound ); +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 cgs+70296+676 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +LABELV $4302 +line 7449 +;7449: } +LABELV $4280 +line 7450 +;7450: } +LABELV $4276 +line 7452 +;7451: +;7452: if (cent->currentState.powerups & (1 << PW_SHIELDHIT)) +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $4306 +line 7453 +;7453: { +line 7461 +;7454: /* +;7455: legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = 255.0f * 0.5f;//t; +;7456: legs.shaderRGBA[3] = 255; +;7457: legs.renderfx &= ~RF_ALPHA_FADE; +;7458: legs.renderfx |= RF_RGB_TINT; +;7459: */ +;7460: +;7461: legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = Q_irand(1, 255); +CNSTI4 1 +ARGI4 +CNSTI4 255 +ARGI4 +ADDRLP4 1112 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 1116 +ADDRLP4 1112 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +ADDRLP4 0+80+2 +ADDRLP4 1116 +INDIRU1 +ASGNU1 +ADDRLP4 0+80+1 +ADDRLP4 1116 +INDIRU1 +ASGNU1 +ADDRLP4 0+80 +ADDRLP4 1116 +INDIRU1 +ASGNU1 +line 7463 +;7462: +;7463: legs.renderfx &= ~RF_FORCE_ENT_ALPHA; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 7464 +;7464: legs.renderfx &= ~RF_MINLIGHT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 7465 +;7465: legs.renderfx &= ~RF_RGB_TINT; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 7466 +;7466: legs.customShader = cgs.media.playerShieldDamage; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+488 +INDIRI4 +ASGNI4 +line 7468 +;7467: +;7468: trap_R_AddRefEntityToScene( &legs ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 7469 +;7469: } +LABELV $4306 +LABELV $3889 +line 7472 +;7470:endOfCall: +;7471: +;7472: if (cgBoneAnglePostSet.refreshSet) +ADDRGP4 cgBoneAnglePostSet+52 +INDIRI4 +CNSTI4 0 +EQI4 $4319 +line 7473 +;7473: { +line 7474 +;7474: trap_G2API_SetBoneAngles(cgBoneAnglePostSet.ghoul2, cgBoneAnglePostSet.modelIndex, cgBoneAnglePostSet.boneName, +ADDRGP4 cgBoneAnglePostSet +INDIRP4 +ARGP4 +ADDRGP4 cgBoneAnglePostSet+4 +INDIRI4 +ARGI4 +ADDRGP4 cgBoneAnglePostSet+8 +INDIRP4 +ARGP4 +ADDRGP4 cgBoneAnglePostSet+12 +ARGP4 +ADDRGP4 cgBoneAnglePostSet+24 +INDIRI4 +ARGI4 +ADDRGP4 cgBoneAnglePostSet+28 +INDIRI4 +ARGI4 +ADDRGP4 cgBoneAnglePostSet+32 +INDIRI4 +ARGI4 +ADDRGP4 cgBoneAnglePostSet+36 +INDIRI4 +ARGI4 +ADDRGP4 cgBoneAnglePostSet+40 +INDIRP4 +ARGP4 +ADDRGP4 cgBoneAnglePostSet+44 +INDIRI4 +ARGI4 +ADDRGP4 cgBoneAnglePostSet+48 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 7478 +;7475: cgBoneAnglePostSet.angles, cgBoneAnglePostSet.flags, cgBoneAnglePostSet.up, cgBoneAnglePostSet.right, +;7476: cgBoneAnglePostSet.forward, cgBoneAnglePostSet.modelList, cgBoneAnglePostSet.blendTime, cgBoneAnglePostSet.currentTime); +;7477: +;7478: cgBoneAnglePostSet.refreshSet = qfalse; +ADDRGP4 cgBoneAnglePostSet+52 +CNSTI4 0 +ASGNI4 +line 7479 +;7479: } +LABELV $4319 +line 7480 +;7480:} +LABELV $3077 +endproc CG_Player 1380 44 +export CG_ResetPlayerEntity +proc CG_ResetPlayerEntity 56 20 +line 7493 +;7481: +;7482: +;7483://===================================================================== +;7484: +;7485:/* +;7486:=============== +;7487:CG_ResetPlayerEntity +;7488: +;7489:A player just came into view or teleported, so reset all animation info +;7490:=============== +;7491:*/ +;7492:void CG_ResetPlayerEntity( centity_t *cent ) +;7493:{ +line 7494 +;7494: cent->errorTime = -99999; // guarantee no error decay added +ADDRFP4 0 +INDIRP4 +CNSTI4 860 +ADDP4 +CNSTI4 -99999 +ASGNI4 +line 7495 +;7495: cent->extrapolated = qfalse; +ADDRFP4 0 +INDIRP4 +CNSTI4 888 +ADDP4 +CNSTI4 0 +ASGNI4 +line 7497 +;7496: +;7497: CG_ClearLerpFrame( cent, &cgs.clientinfo[ cent->currentState.clientNum ], ¢->pe.legs, cent->currentState.legsAnim, qfalse); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 788 +ADDRLP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 644 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_ClearLerpFrame +CALLV +pop +line 7498 +;7498: CG_ClearLerpFrame( cent, &cgs.clientinfo[ cent->currentState.clientNum ], ¢->pe.torso, cent->currentState.torsoAnim, qtrue); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTI4 788 +ADDRLP4 4 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 708 +ADDP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_ClearLerpFrame +CALLV +pop +line 7500 +;7499: +;7500: BG_EvaluateTrajectory( ¢->currentState.pos, cg.time, cent->lerpOrigin ); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 7501 +;7501: BG_EvaluateTrajectory( ¢->currentState.apos, cg.time, cent->lerpAngles ); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 48 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 940 +ADDP4 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 7503 +;7502: +;7503: VectorCopy( cent->lerpOrigin, cent->rawOrigin ); +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 892 +ADDP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 7504 +;7504: VectorCopy( cent->lerpAngles, cent->rawAngles ); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 904 +ADDP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 7506 +;7505: +;7506: memset( ¢->pe.legs, 0, sizeof( cent->pe.legs ) ); +ADDRFP4 0 +INDIRP4 +CNSTI4 644 +ADDP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 64 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 7507 +;7507: cent->pe.legs.yawAngle = cent->rawAngles[YAW]; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 664 +ADDP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 908 +ADDP4 +INDIRF4 +ASGNF4 +line 7508 +;7508: cent->pe.legs.yawing = qfalse; +ADDRFP4 0 +INDIRP4 +CNSTI4 668 +ADDP4 +CNSTI4 0 +ASGNI4 +line 7509 +;7509: cent->pe.legs.pitchAngle = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 672 +ADDP4 +CNSTF4 0 +ASGNF4 +line 7510 +;7510: cent->pe.legs.pitching = qfalse; +ADDRFP4 0 +INDIRP4 +CNSTI4 676 +ADDP4 +CNSTI4 0 +ASGNI4 +line 7512 +;7511: +;7512: memset( ¢->pe.torso, 0, sizeof( cent->pe.legs ) ); +ADDRFP4 0 +INDIRP4 +CNSTI4 708 +ADDP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 64 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 7513 +;7513: cent->pe.torso.yawAngle = cent->rawAngles[YAW]; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 728 +ADDP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 908 +ADDP4 +INDIRF4 +ASGNF4 +line 7514 +;7514: cent->pe.torso.yawing = qfalse; +ADDRFP4 0 +INDIRP4 +CNSTI4 732 +ADDP4 +CNSTI4 0 +ASGNI4 +line 7515 +;7515: cent->pe.torso.pitchAngle = cent->rawAngles[PITCH]; +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 736 +ADDP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 904 +ADDP4 +INDIRF4 +ASGNF4 +line 7516 +;7516: cent->pe.torso.pitching = qfalse; +ADDRFP4 0 +INDIRP4 +CNSTI4 740 +ADDP4 +CNSTI4 0 +ASGNI4 +line 7518 +;7517: +;7518: if ((cent->ghoul2 == NULL) && trap_G2_HaveWeGhoul2Models(cgs.clientinfo[cent->currentState.clientNum].ghoul2Model)) +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $4338 +CNSTI4 788 +ADDRLP4 36 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $4338 +line 7519 +;7519: { +line 7520 +;7520: trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[cent->currentState.clientNum].ghoul2Model, ¢->ghoul2); +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 788 +ADDRLP4 44 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 44 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_DuplicateGhoul2Instance +CALLV +pop +line 7521 +;7521: CG_CopyG2WeaponInstance(cent->currentState.weapon, cgs.clientinfo[cent->currentState.clientNum].ghoul2Model); +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 788 +ADDRLP4 48 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+504 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 CG_CopyG2WeaponInstance +CALLV +pop +line 7522 +;7522: cent->weapon = cent->currentState.weapon; +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 956 +ADDP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ASGNI4 +line 7523 +;7523: } +LABELV $4338 +line 7525 +;7524: +;7525: if ( cg_debugPosition.integer ) { +ADDRGP4 cg_debugPosition+12 +INDIRI4 +CNSTI4 0 +EQI4 $4346 +line 7526 +;7526: CG_Printf("%i ResetPlayerEntity yaw=%i\n", cent->currentState.number, cent->pe.torso.yawAngle ); +ADDRGP4 $4349 +ARGP4 +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 44 +INDIRP4 +CNSTI4 728 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 CG_Printf +CALLV +pop +line 7527 +;7527: } +LABELV $4346 +line 7528 +;7528:} +LABELV $4333 +endproc CG_ResetPlayerEntity 56 20 +import forceHolocronModels +import CG_AllocMark +bss +export cgBoneAnglePostSet +align 4 +LABELV cgBoneAnglePostSet +skip 56 +import animTable +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $4349 +char 1 37 +char 1 105 +char 1 32 +char 1 82 +char 1 101 +char 1 115 +char 1 101 +char 1 116 +char 1 80 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 69 +char 1 110 +char 1 116 +char 1 105 +char 1 116 +char 1 121 +char 1 32 +char 1 121 +char 1 97 +char 1 119 +char 1 61 +char 1 37 +char 1 105 +char 1 10 +char 1 0 +align 1 +LABELV $3899 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $3898 +char 1 42 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $3882 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 104 +char 1 117 +char 1 109 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $3671 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 99 +char 1 111 +char 1 110 +char 1 102 +char 1 117 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $3596 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 117 +char 1 112 +char 1 115 +char 1 47 +char 1 121 +char 1 115 +char 1 97 +char 1 108 +char 1 105 +char 1 109 +char 1 97 +char 1 114 +char 1 105 +char 1 115 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $3535 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 105 +char 1 100 +char 1 108 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $3520 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 114 +char 1 101 +char 1 100 +char 1 95 +char 1 112 +char 1 111 +char 1 114 +char 1 116 +char 1 97 +char 1 115 +char 1 104 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $3501 +char 1 108 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 95 +char 1 99 +char 1 97 +char 1 112 +char 1 95 +char 1 116 +char 1 111 +char 1 114 +char 1 115 +char 1 111 +char 1 95 +char 1 111 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $3500 +char 1 108 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 0 +align 1 +LABELV $3499 +char 1 108 +char 1 114 +char 1 97 +char 1 100 +char 1 105 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $3334 +char 1 48 +char 1 0 +align 1 +LABELV $3333 +char 1 99 +char 1 103 +char 1 95 +char 1 102 +char 1 112 +char 1 108 +char 1 115 +char 1 0 +align 1 +LABELV $3306 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 109 +char 1 111 +char 1 116 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $3190 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 111 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $3187 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 111 +char 1 102 +char 1 102 +char 1 113 +char 1 117 +char 1 105 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $3083 +char 1 66 +char 1 97 +char 1 100 +char 1 32 +char 1 99 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 78 +char 1 117 +char 1 109 +char 1 32 +char 1 111 +char 1 110 +char 1 32 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 32 +char 1 101 +char 1 110 +char 1 116 +char 1 105 +char 1 116 +char 1 121 +char 1 0 +align 1 +LABELV $3054 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 107 +char 1 121 +char 1 108 +char 1 101 +char 1 47 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $3053 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 107 +char 1 121 +char 1 108 +char 1 101 +char 1 47 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 102 +char 1 112 +char 1 108 +char 1 115 +char 1 50 +char 1 46 +char 1 115 +char 1 107 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $2517 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 114 +char 1 105 +char 1 99 +char 1 50 +char 1 0 +align 1 +LABELV $2120 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 104 +char 1 105 +char 1 116 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $2094 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 112 +char 1 97 +char 1 114 +char 1 107 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1978 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 98 +char 1 108 +char 1 111 +char 1 111 +char 1 100 +char 1 95 +char 1 115 +char 1 112 +char 1 97 +char 1 114 +char 1 107 +char 1 115 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $1929 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 68 +char 1 97 +char 1 109 +char 1 97 +char 1 103 +char 1 101 +char 1 71 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $1530 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 80 +char 1 117 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $1195 +char 1 99 +char 1 101 +char 1 114 +char 1 118 +char 1 105 +char 1 99 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $1163 +char 1 116 +char 1 104 +char 1 111 +char 1 114 +char 1 97 +char 1 99 +char 1 105 +char 1 99 +char 1 0 +align 1 +LABELV $1088 +char 1 66 +char 1 97 +char 1 100 +char 1 32 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 32 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 32 +char 1 97 +char 1 110 +char 1 103 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $938 +char 1 67 +char 1 108 +char 1 97 +char 1 109 +char 1 112 +char 1 32 +char 1 108 +char 1 102 +char 1 45 +char 1 62 +char 1 102 +char 1 114 +char 1 97 +char 1 109 +char 1 101 +char 1 84 +char 1 105 +char 1 109 +char 1 101 +char 1 10 +char 1 0 +align 1 +LABELV $745 +char 1 37 +char 1 100 +char 1 58 +char 1 32 +char 1 37 +char 1 100 +char 1 32 +char 1 65 +char 1 110 +char 1 105 +char 1 109 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 44 +char 1 32 +char 1 39 +char 1 37 +char 1 115 +char 1 39 +char 1 10 +char 1 0 +align 1 +LABELV $738 +char 1 66 +char 1 97 +char 1 100 +char 1 32 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 110 +char 1 117 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $718 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 115 +char 1 116 +char 1 97 +char 1 114 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $697 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 99 +char 1 114 +char 1 97 +char 1 115 +char 1 104 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $691 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 50 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $690 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 115 +char 1 116 +char 1 101 +char 1 112 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $610 +char 1 77 +char 1 101 +char 1 109 +char 1 111 +char 1 114 +char 1 121 +char 1 32 +char 1 105 +char 1 115 +char 1 32 +char 1 108 +char 1 111 +char 1 119 +char 1 46 +char 1 32 +char 1 32 +char 1 85 +char 1 115 +char 1 105 +char 1 110 +char 1 103 +char 1 32 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 114 +char 1 114 +char 1 101 +char 1 100 +char 1 32 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 46 +char 1 10 +char 1 0 +align 1 +LABELV $577 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 115 +char 1 0 +align 1 +LABELV $544 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $542 +char 1 103 +char 1 95 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 0 +align 1 +LABELV $540 +char 1 103 +char 1 95 +char 1 114 +char 1 101 +char 1 100 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 0 +align 1 +LABELV $538 +char 1 116 +char 1 108 +char 1 0 +align 1 +LABELV $536 +char 1 116 +char 1 116 +char 1 0 +align 1 +LABELV $534 +char 1 116 +char 1 0 +align 1 +LABELV $532 +char 1 108 +char 1 0 +align 1 +LABELV $530 +char 1 119 +char 1 0 +align 1 +LABELV $528 +char 1 104 +char 1 99 +char 1 0 +align 1 +LABELV $526 +char 1 115 +char 1 107 +char 1 105 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $524 +char 1 99 +char 1 50 +char 1 0 +align 1 +LABELV $521 +char 1 99 +char 1 49 +char 1 0 +align 1 +LABELV $518 +char 1 110 +char 1 0 +align 1 +LABELV $511 +char 1 67 +char 1 71 +char 1 95 +char 1 83 +char 1 101 +char 1 116 +char 1 68 +char 1 101 +char 1 102 +char 1 101 +char 1 114 +char 1 114 +char 1 101 +char 1 100 +char 1 67 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 73 +char 1 110 +char 1 102 +char 1 111 +char 1 58 +char 1 32 +char 1 110 +char 1 111 +char 1 32 +char 1 118 +char 1 97 +char 1 108 +char 1 105 +char 1 100 +char 1 32 +char 1 99 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 115 +char 1 33 +char 1 10 +char 1 0 +align 1 +LABELV $434 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $431 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 95 +char 1 103 +char 1 101 +char 1 110 +char 1 101 +char 1 114 +char 1 105 +char 1 99 +char 1 95 +char 1 102 +char 1 101 +char 1 109 +char 1 97 +char 1 108 +char 1 101 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 0 +align 1 +LABELV $426 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 37 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $423 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $403 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 47 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 115 +char 1 95 +char 1 37 +char 1 115 +char 1 46 +char 1 99 +char 1 102 +char 1 103 +char 1 0 +align 1 +LABELV $402 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 47 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 115 +char 1 95 +char 1 100 +char 1 101 +char 1 102 +char 1 97 +char 1 117 +char 1 108 +char 1 116 +char 1 46 +char 1 99 +char 1 102 +char 1 103 +char 1 0 +align 1 +LABELV $399 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 47 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 115 +char 1 46 +char 1 99 +char 1 102 +char 1 103 +char 1 0 +align 1 +LABELV $395 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 95 +char 1 103 +char 1 101 +char 1 110 +char 1 101 +char 1 114 +char 1 105 +char 1 99 +char 1 95 +char 1 109 +char 1 97 +char 1 108 +char 1 101 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 0 +align 1 +LABELV $394 +char 1 116 +char 1 97 +char 1 103 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $381 +char 1 68 +char 1 69 +char 1 70 +char 1 65 +char 1 85 +char 1 76 +char 1 84 +char 1 95 +char 1 77 +char 1 79 +char 1 68 +char 1 69 +char 1 76 +char 1 32 +char 1 40 +char 1 37 +char 1 115 +char 1 41 +char 1 32 +char 1 102 +char 1 97 +char 1 105 +char 1 108 +char 1 101 +char 1 100 +char 1 32 +char 1 116 +char 1 111 +char 1 32 +char 1 114 +char 1 101 +char 1 103 +char 1 105 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $378 +char 1 68 +char 1 69 +char 1 70 +char 1 65 +char 1 85 +char 1 76 +char 1 84 +char 1 95 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 95 +char 1 77 +char 1 79 +char 1 68 +char 1 69 +char 1 76 +char 1 32 +char 1 47 +char 1 32 +char 1 115 +char 1 107 +char 1 105 +char 1 110 +char 1 32 +char 1 40 +char 1 37 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 41 +char 1 32 +char 1 102 +char 1 97 +char 1 105 +char 1 108 +char 1 101 +char 1 100 +char 1 32 +char 1 116 +char 1 111 +char 1 32 +char 1 114 +char 1 101 +char 1 103 +char 1 105 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $375 +char 1 69 +char 1 109 +char 1 112 +char 1 105 +char 1 114 +char 1 101 +char 1 0 +align 1 +LABELV $374 +char 1 82 +char 1 101 +char 1 98 +char 1 101 +char 1 108 +char 1 108 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $366 +char 1 47 +char 1 0 +align 1 +LABELV $341 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 47 +char 1 105 +char 1 99 +char 1 111 +char 1 110 +char 1 95 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $312 +char 1 108 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 95 +char 1 108 +char 1 117 +char 1 109 +char 1 98 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $311 +char 1 77 +char 1 111 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $310 +char 1 42 +char 1 104 +char 1 101 +char 1 97 +char 1 100 +char 1 95 +char 1 116 +char 1 111 +char 1 112 +char 1 0 +align 1 +LABELV $309 +char 1 42 +char 1 108 +char 1 95 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $307 +char 1 99 +char 1 114 +char 1 97 +char 1 110 +char 1 105 +char 1 117 +char 1 109 +char 1 0 +align 1 +LABELV $303 +char 1 117 +char 1 112 +char 1 112 +char 1 101 +char 1 114 +char 1 95 +char 1 108 +char 1 117 +char 1 109 +char 1 98 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $299 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 114 +char 1 111 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $296 +char 1 42 +char 1 114 +char 1 95 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $295 +char 1 112 +char 1 101 +char 1 108 +char 1 118 +char 1 105 +char 1 115 +char 1 0 +align 1 +LABELV $294 +char 1 42 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 50 +char 1 0 +align 1 +LABELV $292 +char 1 114 +char 1 95 +char 1 99 +char 1 108 +char 1 97 +char 1 118 +char 1 105 +char 1 99 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $290 +char 1 108 +char 1 95 +char 1 99 +char 1 108 +char 1 97 +char 1 118 +char 1 105 +char 1 99 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $288 +char 1 77 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 114 +char 1 111 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $287 +char 1 42 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 49 +char 1 0 +align 1 +LABELV $257 +char 1 70 +char 1 97 +char 1 105 +char 1 108 +char 1 101 +char 1 100 +char 1 32 +char 1 116 +char 1 111 +char 1 32 +char 1 108 +char 1 111 +char 1 97 +char 1 100 +char 1 32 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 102 +char 1 105 +char 1 108 +char 1 101 +char 1 32 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 95 +char 1 104 +char 1 117 +char 1 109 +char 1 97 +char 1 110 +char 1 111 +char 1 105 +char 1 100 +char 1 47 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 46 +char 1 99 +char 1 102 +char 1 103 +char 1 10 +char 1 0 +align 1 +LABELV $254 +char 1 77 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 32 +char 1 100 +char 1 111 +char 1 101 +char 1 115 +char 1 32 +char 1 110 +char 1 111 +char 1 116 +char 1 32 +char 1 117 +char 1 115 +char 1 101 +char 1 32 +char 1 115 +char 1 117 +char 1 112 +char 1 112 +char 1 111 +char 1 114 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 99 +char 1 111 +char 1 110 +char 1 102 +char 1 105 +char 1 103 +char 1 46 +char 1 10 +char 1 0 +align 1 +LABELV $251 +char 1 47 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 46 +char 1 99 +char 1 102 +char 1 103 +char 1 0 +align 1 +LABELV $248 +char 1 70 +char 1 97 +char 1 105 +char 1 108 +char 1 101 +char 1 100 +char 1 32 +char 1 116 +char 1 111 +char 1 32 +char 1 108 +char 1 111 +char 1 97 +char 1 100 +char 1 32 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 102 +char 1 105 +char 1 108 +char 1 101 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $247 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 95 +char 1 104 +char 1 117 +char 1 109 +char 1 97 +char 1 110 +char 1 111 +char 1 105 +char 1 100 +char 1 47 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 46 +char 1 99 +char 1 102 +char 1 103 +char 1 0 +align 1 +LABELV $240 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 95 +char 1 104 +char 1 117 +char 1 109 +char 1 97 +char 1 110 +char 1 111 +char 1 105 +char 1 100 +char 1 47 +char 1 0 +align 1 +LABELV $233 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $232 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 37 +char 1 115 +char 1 46 +char 1 115 +char 1 107 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $231 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $214 +char 1 87 +char 1 65 +char 1 82 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 58 +char 1 32 +char 1 65 +char 1 116 +char 1 116 +char 1 101 +char 1 109 +char 1 112 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 116 +char 1 111 +char 1 32 +char 1 108 +char 1 111 +char 1 97 +char 1 100 +char 1 32 +char 1 97 +char 1 110 +char 1 32 +char 1 117 +char 1 110 +char 1 115 +char 1 117 +char 1 112 +char 1 112 +char 1 111 +char 1 114 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 109 +char 1 117 +char 1 108 +char 1 116 +char 1 105 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 32 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 33 +char 1 32 +char 1 40 +char 1 98 +char 1 97 +char 1 100 +char 1 32 +char 1 111 +char 1 114 +char 1 32 +char 1 109 +char 1 105 +char 1 115 +char 1 115 +char 1 105 +char 1 110 +char 1 103 +char 1 32 +char 1 98 +char 1 111 +char 1 110 +char 1 101 +char 1 44 +char 1 32 +char 1 111 +char 1 114 +char 1 32 +char 1 109 +char 1 105 +char 1 115 +char 1 115 +char 1 105 +char 1 110 +char 1 103 +char 1 32 +char 1 97 +char 1 110 +char 1 105 +char 1 109 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 115 +char 1 101 +char 1 113 +char 1 117 +char 1 101 +char 1 110 +char 1 99 +char 1 101 +char 1 41 +char 1 10 +char 1 0 +align 1 +LABELV $213 +char 1 100 +char 1 101 +char 1 102 +char 1 97 +char 1 117 +char 1 108 +char 1 116 +char 1 0 +align 1 +LABELV $201 +char 1 115 +char 1 117 +char 1 114 +char 1 102 +char 1 79 +char 1 110 +char 1 0 +align 1 +LABELV $198 +char 1 44 +char 1 0 +align 1 +LABELV $193 +char 1 115 +char 1 117 +char 1 114 +char 1 102 +char 1 79 +char 1 102 +char 1 102 +char 1 0 +align 1 +LABELV $184 +char 1 70 +char 1 105 +char 1 108 +char 1 101 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 116 +char 1 111 +char 1 111 +char 1 32 +char 1 108 +char 1 111 +char 1 110 +char 1 103 +char 1 10 +char 1 0 +align 1 +LABELV $179 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 115 +char 1 47 +char 1 37 +char 1 115 +char 1 47 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 37 +char 1 115 +char 1 46 +char 1 115 +char 1 117 +char 1 114 +char 1 102 +char 1 0 +align 1 +LABELV $177 +char 1 98 +char 1 108 +char 1 117 +char 1 101 +char 1 0 +align 1 +LABELV $176 +char 1 114 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $175 +char 1 100 +char 1 101 +char 1 102 +char 1 97 +char 1 117 +char 1 108 +char 1 116 +char 1 95 +char 1 109 +char 1 112 +char 1 0 +align 1 +LABELV $172 +char 1 109 +char 1 111 +char 1 114 +char 1 103 +char 1 97 +char 1 110 +char 1 0 +align 1 +LABELV $169 +char 1 102 +char 1 112 +char 1 108 +char 1 115 +char 1 51 +char 1 0 +align 1 +LABELV $166 +char 1 102 +char 1 112 +char 1 108 +char 1 115 +char 1 50 +char 1 0 +align 1 +LABELV $163 +char 1 102 +char 1 112 +char 1 108 +char 1 115 +char 1 0 +align 1 +LABELV $160 +char 1 107 +char 1 121 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $149 +char 1 85 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 99 +char 1 117 +char 1 115 +char 1 116 +char 1 111 +char 1 109 +char 1 32 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $134 +char 1 42 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $133 +char 1 42 +char 1 108 +char 1 97 +char 1 110 +char 1 100 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $132 +char 1 42 +char 1 103 +char 1 97 +char 1 115 +char 1 112 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $131 +char 1 42 +char 1 99 +char 1 104 +char 1 111 +char 1 107 +char 1 101 +char 1 51 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $130 +char 1 42 +char 1 99 +char 1 104 +char 1 111 +char 1 107 +char 1 101 +char 1 50 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $129 +char 1 42 +char 1 99 +char 1 104 +char 1 111 +char 1 107 +char 1 101 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $128 +char 1 42 +char 1 102 +char 1 97 +char 1 108 +char 1 108 +char 1 105 +char 1 110 +char 1 103 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $127 +char 1 42 +char 1 112 +char 1 97 +char 1 105 +char 1 110 +char 1 49 +char 1 48 +char 1 48 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $126 +char 1 42 +char 1 112 +char 1 97 +char 1 105 +char 1 110 +char 1 55 +char 1 53 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $125 +char 1 42 +char 1 112 +char 1 97 +char 1 105 +char 1 110 +char 1 53 +char 1 48 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $124 +char 1 42 +char 1 112 +char 1 97 +char 1 105 +char 1 110 +char 1 50 +char 1 53 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $123 +char 1 42 +char 1 106 +char 1 117 +char 1 109 +char 1 112 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $122 +char 1 42 +char 1 100 +char 1 101 +char 1 97 +char 1 116 +char 1 104 +char 1 51 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $121 +char 1 42 +char 1 100 +char 1 101 +char 1 97 +char 1 116 +char 1 104 +char 1 50 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $120 +char 1 42 +char 1 100 +char 1 101 +char 1 97 +char 1 116 +char 1 104 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 diff --git a/code/cgame/vm/cg_playerstate.asm b/code/cgame/vm/cg_playerstate.asm new file mode 100644 index 0000000..015f34c --- /dev/null +++ b/code/cgame/vm/cg_playerstate.asm @@ -0,0 +1,2956 @@ +export CG_CheckAmmo +code +proc CG_CheckAmmo 0 0 +file "../cg_playerstate.c" +line 17 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_playerstate.c -- this file acts on changes in a new playerState_t +;4:// With normal play, this will be done after local prediction, but when +;5:// following another player or playing back a demo, it will be checked +;6:// when the snapshot transitions like all the other entities +;7: +;8:#include "cg_local.h" +;9: +;10:/* +;11:============== +;12:CG_CheckAmmo +;13: +;14:If the ammo has gone low enough to generate the warning, play a sound +;15:============== +;16:*/ +;17:void CG_CheckAmmo( void ) { +line 76 +;18:#if 0 +;19: int i; +;20: int total; +;21: int previous; +;22: int weapons; +;23: +;24: // see about how many seconds of ammo we have remaining +;25: weapons = cg.snap->ps.stats[ STAT_WEAPONS ]; +;26: total = 0; +;27: for ( i = WP_BRYAR_PISTOL; i < WP_NUM_WEAPONS ; i++ ) { +;28: if ( ! ( weapons & ( 1 << i ) ) ) { +;29: continue; +;30: } +;31: switch ( i ) +;32: { +;33: case WP_BRYAR_PISTOL: +;34: case WP_BLASTER: +;35: case WP_DISRUPTOR: +;36: case WP_BOWCASTER: +;37: case WP_REPEATER: +;38: case WP_DEMP2: +;39: case WP_FLECHETTE: +;40: case WP_ROCKET_LAUNCHER: +;41: case WP_THERMAL: +;42: case WP_TRIP_MINE: +;43: case WP_DET_PACK: +;44: case WP_EMPLACED_GUN: +;45: total += cg.snap->ps.ammo[weaponData[i].ammoIndex] * 1000; +;46: break; +;47: default: +;48: total += cg.snap->ps.ammo[weaponData[i].ammoIndex] * 200; +;49: break; +;50: } +;51: if ( total >= 5000 ) { +;52: cg.lowAmmoWarning = 0; +;53: return; +;54: } +;55: } +;56: +;57: previous = cg.lowAmmoWarning; +;58: +;59: if ( total == 0 ) { +;60: cg.lowAmmoWarning = 2; +;61: } else { +;62: cg.lowAmmoWarning = 1; +;63: } +;64: +;65: if (cg.snap->ps.weapon == WP_SABER) +;66: { +;67: cg.lowAmmoWarning = 0; +;68: } +;69: +;70: // play a sound on transitions +;71: if ( cg.lowAmmoWarning != previous ) { +;72: trap_S_StartLocalSound( cgs.media.noAmmoSound, CHAN_LOCAL_SOUND ); +;73: } +;74:#endif +;75: //disabled silly ammo warning stuff for now +;76:} +LABELV $120 +endproc CG_CheckAmmo 0 0 +export CG_DamageFeedback +proc CG_DamageFeedback 72 16 +line 83 +;77: +;78:/* +;79:============== +;80:CG_DamageFeedback +;81:============== +;82:*/ +;83:void CG_DamageFeedback( int yawByte, int pitchByte, int damage ) { +line 94 +;84: float left, front, up; +;85: float kick; +;86: int health; +;87: float scale; +;88: vec3_t dir; +;89: vec3_t angles; +;90: float dist; +;91: float yaw, pitch; +;92: +;93: // show the attacking player's head and name in corner +;94: cg.attackerTime = cg.time; +ADDRGP4 cg+13112 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 97 +;95: +;96: // the lower on health you are, the greater the view kick will be +;97: health = cg.snap->ps.stats[STAT_HEALTH]; +ADDRLP4 20 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +ASGNI4 +line 98 +;98: if ( health < 40 ) { +ADDRLP4 20 +INDIRI4 +CNSTI4 40 +GEI4 $125 +line 99 +;99: scale = 1; +ADDRLP4 28 +CNSTF4 1065353216 +ASGNF4 +line 100 +;100: } else { +ADDRGP4 $126 +JUMPV +LABELV $125 +line 101 +;101: scale = 40.0 / health; +ADDRLP4 28 +CNSTF4 1109393408 +ADDRLP4 20 +INDIRI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 102 +;102: } +LABELV $126 +line 103 +;103: kick = damage * scale; +ADDRLP4 12 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 105 +;104: +;105: if (kick < 5) +ADDRLP4 12 +INDIRF4 +CNSTF4 1084227584 +GEF4 $127 +line 106 +;106: kick = 5; +ADDRLP4 12 +CNSTF4 1084227584 +ASGNF4 +LABELV $127 +line 107 +;107: if (kick > 10) +ADDRLP4 12 +INDIRF4 +CNSTF4 1092616192 +LEF4 $129 +line 108 +;108: kick = 10; +ADDRLP4 12 +CNSTF4 1092616192 +ASGNF4 +LABELV $129 +line 111 +;109: +;110: // if yaw and pitch are both 255, make the damage always centered (falling, etc) +;111: if ( yawByte == 255 && pitchByte == 255 ) { +ADDRLP4 60 +CNSTI4 255 +ASGNI4 +ADDRFP4 0 +INDIRI4 +ADDRLP4 60 +INDIRI4 +NEI4 $131 +ADDRFP4 4 +INDIRI4 +ADDRLP4 60 +INDIRI4 +NEI4 $131 +line 112 +;112: cg.damageX = 0; +ADDRGP4 cg+13388 +CNSTF4 0 +ASGNF4 +line 113 +;113: cg.damageY = 0; +ADDRGP4 cg+13392 +CNSTF4 0 +ASGNF4 +line 114 +;114: cg.v_dmg_roll = 0; +ADDRGP4 cg+13436 +CNSTF4 0 +ASGNF4 +line 115 +;115: cg.v_dmg_pitch = -kick; +ADDRGP4 cg+13432 +ADDRLP4 12 +INDIRF4 +NEGF4 +ASGNF4 +line 116 +;116: } else { +ADDRGP4 $132 +JUMPV +LABELV $131 +line 118 +;117: // positional +;118: pitch = pitchByte / 255.0 * 360; +ADDRLP4 56 +CNSTF4 1135869952 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +CNSTF4 1132396544 +DIVF4 +MULF4 +ASGNF4 +line 119 +;119: yaw = yawByte / 255.0 * 360; +ADDRLP4 52 +CNSTF4 1135869952 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +CNSTF4 1132396544 +DIVF4 +MULF4 +ASGNF4 +line 121 +;120: +;121: angles[PITCH] = pitch; +ADDRLP4 32 +ADDRLP4 56 +INDIRF4 +ASGNF4 +line 122 +;122: angles[YAW] = yaw; +ADDRLP4 32+4 +ADDRLP4 52 +INDIRF4 +ASGNF4 +line 123 +;123: angles[ROLL] = 0; +ADDRLP4 32+8 +CNSTF4 0 +ASGNF4 +line 125 +;124: +;125: AngleVectors( angles, dir, NULL, NULL ); +ADDRLP4 32 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 64 +CNSTP4 0 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 126 +;126: VectorSubtract( vec3_origin, dir, dir ); +ADDRLP4 0 +ADDRGP4 vec3_origin +INDIRF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+4 +ADDRGP4 vec3_origin+4 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+8 +ADDRGP4 vec3_origin+8 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +SUBF4 +ASGNF4 +line 128 +;127: +;128: front = DotProduct (dir, cg.refdef.viewaxis[0] ); +ADDRLP4 16 +ADDRLP4 0 +INDIRF4 +ADDRGP4 cg+3616+36 +INDIRF4 +MULF4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 cg+3616+36+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 cg+3616+36+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 129 +;129: left = DotProduct (dir, cg.refdef.viewaxis[1] ); +ADDRLP4 24 +ADDRLP4 0 +INDIRF4 +ADDRGP4 cg+3616+36+12 +INDIRF4 +MULF4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 130 +;130: up = DotProduct (dir, cg.refdef.viewaxis[2] ); +ADDRLP4 48 +ADDRLP4 0 +INDIRF4 +ADDRGP4 cg+3616+36+24 +INDIRF4 +MULF4 +ADDRLP4 0+4 +INDIRF4 +ADDRGP4 cg+3616+36+24+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0+8 +INDIRF4 +ADDRGP4 cg+3616+36+24+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 132 +;131: +;132: dir[0] = front; +ADDRLP4 0 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 133 +;133: dir[1] = left; +ADDRLP4 0+4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 134 +;134: dir[2] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 135 +;135: dist = VectorLength( dir ); +ADDRLP4 0 +ARGP4 +ADDRLP4 68 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 44 +ADDRLP4 68 +INDIRF4 +ASGNF4 +line 136 +;136: if ( dist < 0.1 ) { +ADDRLP4 44 +INDIRF4 +CNSTF4 1036831949 +GEF4 $183 +line 137 +;137: dist = 0.1f; +ADDRLP4 44 +CNSTF4 1036831949 +ASGNF4 +line 138 +;138: } +LABELV $183 +line 140 +;139: +;140: cg.v_dmg_roll = kick * left; +ADDRGP4 cg+13436 +ADDRLP4 12 +INDIRF4 +ADDRLP4 24 +INDIRF4 +MULF4 +ASGNF4 +line 142 +;141: +;142: cg.v_dmg_pitch = -kick * front; +ADDRGP4 cg+13432 +ADDRLP4 12 +INDIRF4 +NEGF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ASGNF4 +line 144 +;143: +;144: if ( front <= 0.1 ) { +ADDRLP4 16 +INDIRF4 +CNSTF4 1036831949 +GTF4 $187 +line 145 +;145: front = 0.1f; +ADDRLP4 16 +CNSTF4 1036831949 +ASGNF4 +line 146 +;146: } +LABELV $187 +line 147 +;147: cg.damageX = -left / front; +ADDRGP4 cg+13388 +ADDRLP4 24 +INDIRF4 +NEGF4 +ADDRLP4 16 +INDIRF4 +DIVF4 +ASGNF4 +line 148 +;148: cg.damageY = up / dist; +ADDRGP4 cg+13392 +ADDRLP4 48 +INDIRF4 +ADDRLP4 44 +INDIRF4 +DIVF4 +ASGNF4 +line 149 +;149: } +LABELV $132 +line 152 +;150: +;151: // clamp the position +;152: if ( cg.damageX > 1.0 ) { +ADDRGP4 cg+13388 +INDIRF4 +CNSTF4 1065353216 +LEF4 $191 +line 153 +;153: cg.damageX = 1.0; +ADDRGP4 cg+13388 +CNSTF4 1065353216 +ASGNF4 +line 154 +;154: } +LABELV $191 +line 155 +;155: if ( cg.damageX < - 1.0 ) { +ADDRGP4 cg+13388 +INDIRF4 +CNSTF4 3212836864 +GEF4 $195 +line 156 +;156: cg.damageX = -1.0; +ADDRGP4 cg+13388 +CNSTF4 3212836864 +ASGNF4 +line 157 +;157: } +LABELV $195 +line 159 +;158: +;159: if ( cg.damageY > 1.0 ) { +ADDRGP4 cg+13392 +INDIRF4 +CNSTF4 1065353216 +LEF4 $199 +line 160 +;160: cg.damageY = 1.0; +ADDRGP4 cg+13392 +CNSTF4 1065353216 +ASGNF4 +line 161 +;161: } +LABELV $199 +line 162 +;162: if ( cg.damageY < - 1.0 ) { +ADDRGP4 cg+13392 +INDIRF4 +CNSTF4 3212836864 +GEF4 $203 +line 163 +;163: cg.damageY = -1.0; +ADDRGP4 cg+13392 +CNSTF4 3212836864 +ASGNF4 +line 164 +;164: } +LABELV $203 +line 167 +;165: +;166: // don't let the screen flashes vary as much +;167: if ( kick > 10 ) { +ADDRLP4 12 +INDIRF4 +CNSTF4 1092616192 +LEF4 $207 +line 168 +;168: kick = 10; +ADDRLP4 12 +CNSTF4 1092616192 +ASGNF4 +line 169 +;169: } +LABELV $207 +line 170 +;170: cg.damageValue = kick; +ADDRGP4 cg+13396 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 171 +;171: cg.v_dmg_time = cg.time + DAMAGE_TIME; +ADDRGP4 cg+13428 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 500 +ADDI4 +CVIF4 4 +ASGNF4 +line 172 +;172: cg.damageTime = cg.snap->serverTime; +ADDRGP4 cg+13384 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 173 +;173:} +LABELV $121 +endproc CG_DamageFeedback 72 16 +export CG_Respawn +proc CG_Respawn 0 0 +line 185 +;174: +;175: +;176: +;177: +;178:/* +;179:================ +;180:CG_Respawn +;181: +;182:A respawn happened this snapshot +;183:================ +;184:*/ +;185:void CG_Respawn( void ) { +line 187 +;186: // no error decay on player movement +;187: cg.thisFrameTeleport = qtrue; +ADDRGP4 cg+52 +CNSTI4 1 +ASGNI4 +line 190 +;188: +;189: // display weapons available +;190: cg.weaponSelectTime = cg.time; +ADDRGP4 cg+13372 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 193 +;191: +;192: // select the weapon the server says we are using +;193: cg.weaponSelect = cg.snap->ps.weapon; +ADDRGP4 cg+3508 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +ASGNI4 +line 194 +;194:} +LABELV $214 +endproc CG_Respawn 0 0 +export CG_CheckPlayerstateEvents +proc CG_CheckPlayerstateEvents 52 8 +line 203 +;195: +;196:extern char *eventnames[]; +;197: +;198:/* +;199:============== +;200:CG_CheckPlayerstateEvents +;201:============== +;202:*/ +;203:void CG_CheckPlayerstateEvents( playerState_t *ps, playerState_t *ops ) { +line 208 +;204: int i; +;205: int event; +;206: centity_t *cent; +;207: +;208: if ( ps->externalEvent && ps->externalEvent != ops->externalEvent ) { +ADDRLP4 12 +CNSTI4 132 +ASGNI4 +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $221 +ADDRLP4 16 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $221 +line 209 +;209: cent = &cg_entities[ ps->clientNum ]; +ADDRLP4 4 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 210 +;210: cent->currentState.event = ps->externalEvent; +ADDRLP4 4 +INDIRP4 +CNSTI4 252 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRI4 +ASGNI4 +line 211 +;211: cent->currentState.eventParm = ps->externalEventParm; +ADDRLP4 4 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRI4 +ASGNI4 +line 212 +;212: CG_EntityEvent( cent, cent->lerpOrigin ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 CG_EntityEvent +CALLV +pop +line 213 +;213: } +LABELV $221 +line 215 +;214: +;215: cent = &cg.predictedPlayerEntity; // cg_entities[ ps->clientNum ]; +ADDRLP4 4 +ADDRGP4 cg+1476 +ASGNP4 +line 217 +;216: // go through the predictable events buffer +;217: for ( i = ps->eventSequence - MAX_PS_EVENTS ; i < ps->eventSequence ; i++ ) { +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +CNSTI4 2 +SUBI4 +ASGNI4 +ADDRGP4 $227 +JUMPV +LABELV $224 +line 219 +;218: // if we have a new predictable event +;219: if ( i >= ops->eventSequence +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 24 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 28 +INDIRI4 +GEI4 $230 +ADDRLP4 32 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 32 +INDIRI4 +SUBI4 +LEI4 $228 +ADDRLP4 36 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 32 +INDIRI4 +LSHI4 +ASGNI4 +ADDRLP4 40 +CNSTI4 116 +ASGNI4 +ADDRLP4 36 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +ADDP4 +INDIRI4 +EQI4 $228 +LABELV $230 +line 222 +;220: // or the server told us to play another event instead of a predicted event we already issued +;221: // or something the server told us changed our prediction causing a different event +;222: || (i > ops->eventSequence - MAX_PS_EVENTS && ps->events[i & (MAX_PS_EVENTS-1)] != ops->events[i & (MAX_PS_EVENTS-1)]) ) { +line 224 +;223: +;224: event = ps->events[ i & (MAX_PS_EVENTS-1) ]; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 225 +;225: cent->currentState.event = event; +ADDRLP4 4 +INDIRP4 +CNSTI4 252 +ADDP4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 226 +;226: cent->currentState.eventParm = ps->eventParms[ i & (MAX_PS_EVENTS-1) ]; +ADDRLP4 4 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 227 +;227: CG_EntityEvent( cent, cent->lerpOrigin ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 CG_EntityEvent +CALLV +pop +line 229 +;228: +;229: cg.predictableEvents[ i & (MAX_PREDICTED_EVENTS-1) ] = event; +ADDRLP4 0 +INDIRI4 +CNSTI4 15 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+3420 +ADDP4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 231 +;230: +;231: cg.eventSequence++; +ADDRLP4 48 +ADDRGP4 cg+3416 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 232 +;232: } +LABELV $228 +line 233 +;233: } +LABELV $225 +line 217 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $227 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +LTI4 $224 +line 234 +;234:} +LABELV $220 +endproc CG_CheckPlayerstateEvents 52 8 +export CG_CheckChangedPredictableEvents +proc CG_CheckChangedPredictableEvents 24 8 +line 241 +;235: +;236:/* +;237:================== +;238:CG_CheckChangedPredictableEvents +;239:================== +;240:*/ +;241:void CG_CheckChangedPredictableEvents( playerState_t *ps ) { +line 246 +;242: int i; +;243: int event; +;244: centity_t *cent; +;245: +;246: cent = &cg.predictedPlayerEntity; +ADDRLP4 4 +ADDRGP4 cg+1476 +ASGNP4 +line 247 +;247: for ( i = ps->eventSequence - MAX_PS_EVENTS ; i < ps->eventSequence ; i++ ) { +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +CNSTI4 2 +SUBI4 +ASGNI4 +ADDRGP4 $238 +JUMPV +LABELV $235 +line 249 +;248: // +;249: if (i >= cg.eventSequence) { +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+3416 +INDIRI4 +LTI4 $239 +line 250 +;250: continue; +ADDRGP4 $236 +JUMPV +LABELV $239 +line 253 +;251: } +;252: // if this event is not further back in than the maximum predictable events we remember +;253: if (i > cg.eventSequence - MAX_PREDICTED_EVENTS) { +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+3416 +INDIRI4 +CNSTI4 16 +SUBI4 +LEI4 $242 +line 255 +;254: // if the new playerstate event is different from a previously predicted one +;255: if ( ps->events[i & (MAX_PS_EVENTS-1)] != cg.predictableEvents[i & (MAX_PREDICTED_EVENTS-1) ] ) { +ADDRLP4 16 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +BANDI4 +ADDRLP4 16 +INDIRI4 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 15 +BANDI4 +ADDRLP4 16 +INDIRI4 +LSHI4 +ADDRGP4 cg+3420 +ADDP4 +INDIRI4 +EQI4 $245 +line 257 +;256: +;257: event = ps->events[ i & (MAX_PS_EVENTS-1) ]; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 258 +;258: cent->currentState.event = event; +ADDRLP4 4 +INDIRP4 +CNSTI4 252 +ADDP4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 259 +;259: cent->currentState.eventParm = ps->eventParms[ i & (MAX_PS_EVENTS-1) ]; +ADDRLP4 4 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 260 +;260: CG_EntityEvent( cent, cent->lerpOrigin ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 CG_EntityEvent +CALLV +pop +line 262 +;261: +;262: cg.predictableEvents[ i & (MAX_PREDICTED_EVENTS-1) ] = event; +ADDRLP4 0 +INDIRI4 +CNSTI4 15 +BANDI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+3420 +ADDP4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 264 +;263: +;264: if ( cg_showmiss.integer ) { +ADDRGP4 cg_showmiss+12 +INDIRI4 +CNSTI4 0 +EQI4 $249 +line 265 +;265: CG_Printf("WARNING: changed predicted event\n"); +ADDRGP4 $252 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 266 +;266: } +LABELV $249 +line 267 +;267: } +LABELV $245 +line 268 +;268: } +LABELV $242 +line 269 +;269: } +LABELV $236 +line 247 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $238 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRI4 +LTI4 $235 +line 270 +;270:} +LABELV $233 +endproc CG_CheckChangedPredictableEvents 24 8 +data +export cgAnnouncerTime +align 4 +LABELV cgAnnouncerTime +byte 4 0 +export CG_CheckLocalSounds +code +proc CG_CheckLocalSounds 40 8 +line 295 +;271: +;272:/* +;273:================== +;274:pushReward +;275:================== +;276:*/ +;277:#ifdef JK2AWARDS +;278:static void pushReward(sfxHandle_t sfx, qhandle_t shader, int rewardCount) { +;279: if (cg.rewardStack < (MAX_REWARDSTACK-1)) { +;280: cg.rewardStack++; +;281: cg.rewardSound[cg.rewardStack] = sfx; +;282: cg.rewardShader[cg.rewardStack] = shader; +;283: cg.rewardCount[cg.rewardStack] = rewardCount; +;284: } +;285:} +;286:#endif +;287: +;288:int cgAnnouncerTime = 0; //to prevent announce sounds from playing on top of each other +;289: +;290:/* +;291:================== +;292:CG_CheckLocalSounds +;293:================== +;294:*/ +;295:void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) { +line 302 +;296: int highScore, health, armor, reward; +;297:#ifdef JK2AWARDS +;298: sfxHandle_t sfx; +;299:#endif +;300: +;301: // don't play the sounds if the player just changed teams +;302: if ( ps->persistant[PERS_TEAM] != ops->persistant[PERS_TEAM] ) { +ADDRLP4 16 +CNSTI4 292 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $254 +line 303 +;303: return; +ADDRGP4 $253 +JUMPV +LABELV $254 +line 307 +;304: } +;305: +;306: // hit changes +;307: if ( ps->persistant[PERS_HITS] > ops->persistant[PERS_HITS] ) { +ADDRLP4 20 +CNSTI4 284 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRI4 +LEI4 $256 +line 308 +;308: armor = ps->persistant[PERS_ATTACKEE_ARMOR] & 0xff; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 308 +ADDP4 +INDIRI4 +CNSTI4 255 +BANDI4 +ASGNI4 +line 309 +;309: health = ps->persistant[PERS_ATTACKEE_ARMOR] >> 8; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 308 +ADDP4 +INDIRI4 +CNSTI4 8 +RSHI4 +ASGNI4 +line 311 +;310: +;311: if (armor > health/2) +ADDRLP4 12 +INDIRI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +DIVI4 +LEI4 $257 +line 312 +;312: { // We also hit shields along the way, so consider them "pierced". +line 314 +;313:// trap_S_StartLocalSound( cgs.media.shieldPierceSound, CHAN_LOCAL_SOUND ); +;314: } +line 316 +;315: else +;316: { // Shields didn't really stand in our way. +line 318 +;317:// trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND ); +;318: } +line 330 +;319: +;320: //FIXME: Hit sounds? +;321: /* +;322: if (armor > 50 ) { +;323: trap_S_StartLocalSound( cgs.media.hitSoundHighArmor, CHAN_LOCAL_SOUND ); +;324: } else if (armor || health > 100) { +;325: trap_S_StartLocalSound( cgs.media.hitSoundLowArmor, CHAN_LOCAL_SOUND ); +;326: } else { +;327: trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND ); +;328: } +;329: */ +;330: } else if ( ps->persistant[PERS_HITS] < ops->persistant[PERS_HITS] ) { +ADDRGP4 $257 +JUMPV +LABELV $256 +ADDRLP4 24 +CNSTI4 284 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRI4 +GEI4 $260 +line 332 +;331: //trap_S_StartLocalSound( cgs.media.hitTeamSound, CHAN_LOCAL_SOUND ); +;332: } +LABELV $260 +LABELV $257 +line 335 +;333: +;334: // health changes of more than -3 should make pain sounds +;335: if (cg_oldPainSounds.integer) +ADDRGP4 cg_oldPainSounds+12 +INDIRI4 +CNSTI4 0 +EQI4 $262 +line 336 +;336: { +line 337 +;337: if ( ps->stats[STAT_HEALTH] < (ops->stats[STAT_HEALTH] - 3)) +ADDRLP4 28 +CNSTI4 216 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 3 +SUBI4 +GEI4 $265 +line 338 +;338: { +line 339 +;339: if ( ps->stats[STAT_HEALTH] > 0 ) +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $267 +line 340 +;340: { +line 341 +;341: CG_PainEvent( &cg.predictedPlayerEntity, ps->stats[STAT_HEALTH] ); +ADDRGP4 cg+1476 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_PainEvent +CALLV +pop +line 342 +;342: } +LABELV $267 +line 343 +;343: } +LABELV $265 +line 344 +;344: } +LABELV $262 +line 347 +;345: +;346: // if we are going into the intermission, don't start any voices +;347: if ( cg.intermissionStarted ) { +ADDRGP4 cg+24 +INDIRI4 +CNSTI4 0 +EQI4 $270 +line 348 +;348: return; +ADDRGP4 $253 +JUMPV +LABELV $270 +line 401 +;349: } +;350: +;351:#ifdef JK2AWARDS +;352: // reward sounds +;353: reward = qfalse; +;354: if (ps->persistant[PERS_CAPTURES] != ops->persistant[PERS_CAPTURES]) { +;355: pushReward(cgs.media.captureAwardSound, cgs.media.medalCapture, ps->persistant[PERS_CAPTURES]); +;356: reward = qtrue; +;357: //Com_Printf("capture\n"); +;358: } +;359: if (ps->persistant[PERS_IMPRESSIVE_COUNT] != ops->persistant[PERS_IMPRESSIVE_COUNT]) { +;360: sfx = cgs.media.impressiveSound; +;361: +;362: pushReward(sfx, cgs.media.medalImpressive, ps->persistant[PERS_IMPRESSIVE_COUNT]); +;363: reward = qtrue; +;364: //Com_Printf("impressive\n"); +;365: } +;366: if (ps->persistant[PERS_EXCELLENT_COUNT] != ops->persistant[PERS_EXCELLENT_COUNT]) { +;367: sfx = cgs.media.excellentSound; +;368: pushReward(sfx, cgs.media.medalExcellent, ps->persistant[PERS_EXCELLENT_COUNT]); +;369: reward = qtrue; +;370: //Com_Printf("excellent\n"); +;371: } +;372: if (ps->persistant[PERS_GAUNTLET_FRAG_COUNT] != ops->persistant[PERS_GAUNTLET_FRAG_COUNT]) { +;373: sfx = cgs.media.humiliationSound; +;374: pushReward(sfx, cgs.media.medalGauntlet, ps->persistant[PERS_GAUNTLET_FRAG_COUNT]); +;375: reward = qtrue; +;376: //Com_Printf("guantlet frag\n"); +;377: } +;378: if (ps->persistant[PERS_DEFEND_COUNT] != ops->persistant[PERS_DEFEND_COUNT]) { +;379: pushReward(cgs.media.defendSound, cgs.media.medalDefend, ps->persistant[PERS_DEFEND_COUNT]); +;380: reward = qtrue; +;381: //Com_Printf("defend\n"); +;382: } +;383: if (ps->persistant[PERS_ASSIST_COUNT] != ops->persistant[PERS_ASSIST_COUNT]) { +;384: //pushReward(cgs.media.assistSound, cgs.media.medalAssist, ps->persistant[PERS_ASSIST_COUNT]); +;385: //reward = qtrue; +;386: //Com_Printf("assist\n"); +;387: } +;388: // if any of the player event bits changed +;389: if (ps->persistant[PERS_PLAYEREVENTS] != ops->persistant[PERS_PLAYEREVENTS]) { +;390: if ((ps->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_DENIEDREWARD) != +;391: (ops->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_DENIEDREWARD)) { +;392: trap_S_StartLocalSound( cgs.media.deniedSound, CHAN_ANNOUNCER ); +;393: } +;394: else if ((ps->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_GAUNTLETREWARD) != +;395: (ops->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_GAUNTLETREWARD)) { +;396: trap_S_StartLocalSound( cgs.media.humiliationSound, CHAN_ANNOUNCER ); +;397: } +;398: reward = qtrue; +;399: } +;400:#else +;401: reward = qfalse; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 404 +;402:#endif +;403: // lead changes +;404: if (!reward && cgAnnouncerTime < cg.time) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $273 +ADDRGP4 cgAnnouncerTime +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $273 +line 406 +;405: // +;406: if ( !cg.warmup ) { +ADDRGP4 cg+13352 +INDIRI4 +CNSTI4 0 +NEI4 $276 +line 408 +;407: // never play lead changes during warmup +;408: if ( ps->persistant[PERS_RANK] != ops->persistant[PERS_RANK] ) { +ADDRLP4 28 +CNSTI4 288 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $279 +line 409 +;409: if ( cgs.gametype < GT_TEAM) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +GEI4 $281 +line 410 +;410: if ( ps->persistant[PERS_RANK] == 0 ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $284 +line 411 +;411: CG_AddBufferedSound(cgs.media.takenLeadSound); +ADDRGP4 cgs+70296+740 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 412 +;412: cgAnnouncerTime = cg.time + 3000; +ADDRGP4 cgAnnouncerTime +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 3000 +ADDI4 +ASGNI4 +line 413 +;413: } else if ( ps->persistant[PERS_RANK] == RANK_TIED_FLAG ) { +ADDRGP4 $285 +JUMPV +LABELV $284 +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 16384 +NEI4 $289 +line 415 +;414: //CG_AddBufferedSound(cgs.media.tiedLeadSound); +;415: } else if ( ( ops->persistant[PERS_RANK] & ~RANK_TIED_FLAG ) == 0 ) { +ADDRGP4 $290 +JUMPV +LABELV $289 +ADDRFP4 4 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 -16385 +BANDI4 +CNSTI4 0 +NEI4 $291 +line 418 +;416: //rww - only bother saying this if you have more than 1 kill already. +;417: //joining the server and hearing "the force is not with you" is silly. +;418: if (ps->persistant[PERS_SCORE] > 0) +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $293 +line 419 +;419: { +line 420 +;420: CG_AddBufferedSound(cgs.media.lostLeadSound); +ADDRGP4 cgs+70296+748 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 421 +;421: cgAnnouncerTime = cg.time + 3000; +ADDRGP4 cgAnnouncerTime +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 3000 +ADDI4 +ASGNI4 +line 422 +;422: } +LABELV $293 +line 423 +;423: } +LABELV $291 +LABELV $290 +LABELV $285 +line 424 +;424: } +LABELV $281 +line 425 +;425: } +LABELV $279 +line 426 +;426: } +LABELV $276 +line 427 +;427: } +LABELV $273 +line 430 +;428: +;429: // timelimit warnings +;430: if ( cgs.timelimit > 0 && cgAnnouncerTime < cg.time ) { +ADDRGP4 cgs+32984 +INDIRI4 +CNSTI4 0 +LEI4 $298 +ADDRGP4 cgAnnouncerTime +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $298 +line 433 +;431: int msec; +;432: +;433: msec = cg.time - cgs.levelStartTime; +ADDRLP4 28 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgs+36320 +INDIRI4 +SUBI4 +ASGNI4 +line 434 +;434: if ( !( cg.timelimitWarnings & 4 ) && msec > ( cgs.timelimit * 60 + 2 ) * 1000 ) { +ADDRGP4 cg+76 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +NEI4 $304 +ADDRLP4 28 +INDIRI4 +CNSTI4 1000 +CNSTI4 60 +ADDRGP4 cgs+32984 +INDIRI4 +MULI4 +MULI4 +CNSTI4 2000 +ADDI4 +LEI4 $304 +line 435 +;435: cg.timelimitWarnings |= 1 | 2 | 4; +ADDRLP4 32 +ADDRGP4 cg+76 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRI4 +CNSTI4 7 +BORI4 +ASGNI4 +line 437 +;436: //trap_S_StartLocalSound( cgs.media.suddenDeathSound, CHAN_ANNOUNCER ); +;437: } +ADDRGP4 $305 +JUMPV +LABELV $304 +line 438 +;438: else if ( !( cg.timelimitWarnings & 2 ) && msec > (cgs.timelimit - 1) * 60 * 1000 ) { +ADDRGP4 cg+76 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +NEI4 $309 +ADDRLP4 28 +INDIRI4 +CNSTI4 1000 +CNSTI4 60 +ADDRGP4 cgs+32984 +INDIRI4 +MULI4 +MULI4 +CNSTI4 60000 +SUBI4 +LEI4 $309 +line 439 +;439: cg.timelimitWarnings |= 1 | 2; +ADDRLP4 32 +ADDRGP4 cg+76 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRI4 +CNSTI4 3 +BORI4 +ASGNI4 +line 440 +;440: trap_S_StartLocalSound( cgs.media.oneMinuteSound, CHAN_ANNOUNCER ); +ADDRGP4 cgs+70296+720 +INDIRI4 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 441 +;441: cgAnnouncerTime = cg.time + 3000; +ADDRGP4 cgAnnouncerTime +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 3000 +ADDI4 +ASGNI4 +line 442 +;442: } +ADDRGP4 $310 +JUMPV +LABELV $309 +line 443 +;443: else if ( cgs.timelimit > 5 && !( cg.timelimitWarnings & 1 ) && msec > (cgs.timelimit - 5) * 60 * 1000 ) { +ADDRGP4 cgs+32984 +INDIRI4 +CNSTI4 5 +LEI4 $317 +ADDRGP4 cg+76 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $317 +ADDRLP4 28 +INDIRI4 +CNSTI4 1000 +CNSTI4 60 +ADDRGP4 cgs+32984 +INDIRI4 +MULI4 +MULI4 +CNSTI4 300000 +SUBI4 +LEI4 $317 +line 444 +;444: cg.timelimitWarnings |= 1; +ADDRLP4 32 +ADDRGP4 cg+76 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 445 +;445: trap_S_StartLocalSound( cgs.media.fiveMinuteSound, CHAN_ANNOUNCER ); +ADDRGP4 cgs+70296+724 +INDIRI4 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 446 +;446: cgAnnouncerTime = cg.time + 3000; +ADDRGP4 cgAnnouncerTime +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 3000 +ADDI4 +ASGNI4 +line 447 +;447: } +LABELV $317 +LABELV $310 +LABELV $305 +line 448 +;448: } +LABELV $298 +line 451 +;449: +;450: // fraglimit warnings +;451: if ( cgs.fraglimit > 0 && cgs.gametype < GT_CTF && cgs.gametype != GT_TOURNAMENT && cgAnnouncerTime < cg.time) { +ADDRGP4 cgs+32972 +INDIRI4 +CNSTI4 0 +LEI4 $326 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +GEI4 $326 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +EQI4 $326 +ADDRGP4 cgAnnouncerTime +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $326 +line 452 +;452: highScore = cgs.scores1; +ADDRLP4 4 +ADDRGP4 cgs+36324 +INDIRI4 +ASGNI4 +line 453 +;453: if ( !( cg.fraglimitWarnings & 4 ) && highScore == (cgs.fraglimit - 1) ) { +ADDRGP4 cg+80 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +NEI4 $333 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cgs+32972 +INDIRI4 +CNSTI4 1 +SUBI4 +NEI4 $333 +line 454 +;454: cg.fraglimitWarnings |= 1 | 2 | 4; +ADDRLP4 28 +ADDRGP4 cg+80 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRI4 +CNSTI4 7 +BORI4 +ASGNI4 +line 455 +;455: CG_AddBufferedSound(cgs.media.oneFragSound); +ADDRGP4 cgs+70296+736 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 456 +;456: cgAnnouncerTime = cg.time + 3000; +ADDRGP4 cgAnnouncerTime +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 3000 +ADDI4 +ASGNI4 +line 457 +;457: } +ADDRGP4 $334 +JUMPV +LABELV $333 +line 458 +;458: else if ( cgs.fraglimit > 2 && !( cg.fraglimitWarnings & 2 ) && highScore == (cgs.fraglimit - 2) ) { +ADDRLP4 28 +CNSTI4 2 +ASGNI4 +ADDRGP4 cgs+32972 +INDIRI4 +ADDRLP4 28 +INDIRI4 +LEI4 $341 +ADDRGP4 cg+80 +INDIRI4 +ADDRLP4 28 +INDIRI4 +BANDI4 +CNSTI4 0 +NEI4 $341 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cgs+32972 +INDIRI4 +ADDRLP4 28 +INDIRI4 +SUBI4 +NEI4 $341 +line 459 +;459: cg.fraglimitWarnings |= 1 | 2; +ADDRLP4 32 +ADDRGP4 cg+80 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRI4 +CNSTI4 3 +BORI4 +ASGNI4 +line 460 +;460: CG_AddBufferedSound(cgs.media.twoFragSound); +ADDRGP4 cgs+70296+732 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 461 +;461: cgAnnouncerTime = cg.time + 3000; +ADDRGP4 cgAnnouncerTime +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 3000 +ADDI4 +ASGNI4 +line 462 +;462: } +ADDRGP4 $342 +JUMPV +LABELV $341 +line 463 +;463: else if ( cgs.fraglimit > 3 && !( cg.fraglimitWarnings & 1 ) && highScore == (cgs.fraglimit - 3) ) { +ADDRLP4 32 +CNSTI4 3 +ASGNI4 +ADDRGP4 cgs+32972 +INDIRI4 +ADDRLP4 32 +INDIRI4 +LEI4 $350 +ADDRGP4 cg+80 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $350 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cgs+32972 +INDIRI4 +ADDRLP4 32 +INDIRI4 +SUBI4 +NEI4 $350 +line 464 +;464: cg.fraglimitWarnings |= 1; +ADDRLP4 36 +ADDRGP4 cg+80 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 465 +;465: CG_AddBufferedSound(cgs.media.threeFragSound); +ADDRGP4 cgs+70296+728 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddBufferedSound +CALLV +pop +line 466 +;466: cgAnnouncerTime = cg.time + 3000; +ADDRGP4 cgAnnouncerTime +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 3000 +ADDI4 +ASGNI4 +line 467 +;467: } +LABELV $350 +LABELV $342 +LABELV $334 +line 468 +;468: } +LABELV $326 +line 469 +;469:} +LABELV $253 +endproc CG_CheckLocalSounds 40 8 +export CG_TransitionPlayerState +proc CG_TransitionPlayerState 24 12 +line 477 +;470: +;471:/* +;472:=============== +;473:CG_TransitionPlayerState +;474: +;475:=============== +;476:*/ +;477:void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops ) { +line 479 +;478: // check for changing follow mode +;479: if ( ps->clientNum != ops->clientNum ) { +ADDRLP4 0 +CNSTI4 144 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $360 +line 480 +;480: cg.thisFrameTeleport = qtrue; +ADDRGP4 cg+52 +CNSTI4 1 +ASGNI4 +line 482 +;481: // make sure we don't get any unwanted transition effects +;482: *ops = *ps; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 1380 +line 483 +;483: } +LABELV $360 +line 486 +;484: +;485: // damage events (player is getting wounded) +;486: if ( ps->damageEvent != ops->damageEvent && ps->damageCount ) { +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTI4 172 +ASGNI4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $363 +ADDRLP4 4 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $363 +line 487 +;487: CG_DamageFeedback( ps->damageYaw, ps->damagePitch, ps->damageCount ); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DamageFeedback +CALLV +pop +line 488 +;488: } +LABELV $363 +line 491 +;489: +;490: // respawning +;491: if ( ps->persistant[PERS_SPAWN_COUNT] != ops->persistant[PERS_SPAWN_COUNT] ) { +ADDRLP4 12 +CNSTI4 296 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $365 +line 492 +;492: CG_Respawn(); +ADDRGP4 CG_Respawn +CALLV +pop +line 493 +;493: } +LABELV $365 +line 495 +;494: +;495: if ( cg.mapRestart ) { +ADDRGP4 cg+84 +INDIRI4 +CNSTI4 0 +EQI4 $367 +line 496 +;496: CG_Respawn(); +ADDRGP4 CG_Respawn +CALLV +pop +line 497 +;497: cg.mapRestart = qfalse; +ADDRGP4 cg+84 +CNSTI4 0 +ASGNI4 +line 498 +;498: } +LABELV $367 +line 500 +;499: +;500: if ( cg.snap->ps.pm_type != PM_INTERMISSION +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 6 +EQI4 $371 +ADDRFP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $371 +line 501 +;501: && ps->persistant[PERS_TEAM] != TEAM_SPECTATOR ) { +line 502 +;502: CG_CheckLocalSounds( ps, ops ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 CG_CheckLocalSounds +CALLV +pop +line 503 +;503: } +LABELV $371 +line 506 +;504: +;505: // check for going low on ammo +;506: CG_CheckAmmo(); +ADDRGP4 CG_CheckAmmo +CALLV +pop +line 509 +;507: +;508: // run events +;509: CG_CheckPlayerstateEvents( ps, ops ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 CG_CheckPlayerstateEvents +CALLV +pop +line 512 +;510: +;511: // smooth the ducking viewheight change +;512: if ( ps->viewheight != ops->viewheight ) { +ADDRLP4 16 +CNSTI4 168 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $374 +line 513 +;513: cg.duckChange = ps->viewheight - ops->viewheight; +ADDRLP4 20 +CNSTI4 168 +ASGNI4 +ADDRGP4 cg+3492 +ADDRFP4 0 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 514 +;514: cg.duckTime = cg.time; +ADDRGP4 cg+3496 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 515 +;515: } +LABELV $374 +line 516 +;516:} +LABELV $359 +endproc CG_TransitionPlayerState 24 12 +import eventnames +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $252 +char 1 87 +char 1 65 +char 1 82 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 58 +char 1 32 +char 1 99 +char 1 104 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 100 +char 1 32 +char 1 112 +char 1 114 +char 1 101 +char 1 100 +char 1 105 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 101 +char 1 118 +char 1 101 +char 1 110 +char 1 116 +char 1 10 +char 1 0 diff --git a/code/cgame/vm/cg_predict.asm b/code/cgame/vm/cg_predict.asm new file mode 100644 index 0000000..e12f0d9 --- /dev/null +++ b/code/cgame/vm/cg_predict.asm @@ -0,0 +1,4960 @@ +export CG_BuildSolidList +code +proc CG_BuildSolidList 28 0 +file "../cg_predict.c" +line 26 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_predict.c -- this file generates cg.predictedPlayerState by either +;4:// interpolating between snapshots from the server or locally predicting +;5:// ahead the client's movement. +;6:// It also handles local physics interaction, like fragments bouncing off walls +;7: +;8:#include "cg_local.h" +;9: +;10:static pmove_t cg_pmove; +;11: +;12:static int cg_numSolidEntities; +;13:static centity_t *cg_solidEntities[MAX_ENTITIES_IN_SNAPSHOT]; +;14:static int cg_numTriggerEntities; +;15:static centity_t *cg_triggerEntities[MAX_ENTITIES_IN_SNAPSHOT]; +;16: +;17:/* +;18:==================== +;19:CG_BuildSolidList +;20: +;21:When a new cg.snap has been set, this function builds a sublist +;22:of the entities that are actually solid, to make for more +;23:efficient collision detection +;24:==================== +;25:*/ +;26:void CG_BuildSolidList( void ) { +line 32 +;27: int i; +;28: centity_t *cent; +;29: snapshot_t *snap; +;30: entityState_t *ent; +;31: +;32: cg_numSolidEntities = 0; +ADDRGP4 cg_numSolidEntities +CNSTI4 0 +ASGNI4 +line 33 +;33: cg_numTriggerEntities = 0; +ADDRGP4 cg_numTriggerEntities +CNSTI4 0 +ASGNI4 +line 35 +;34: +;35: if ( cg.nextSnap && !cg.nextFrameTeleport && !cg.thisFrameTeleport ) { +ADDRGP4 cg+40 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $121 +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+56 +INDIRI4 +ADDRLP4 16 +INDIRI4 +NEI4 $121 +ADDRGP4 cg+52 +INDIRI4 +ADDRLP4 16 +INDIRI4 +NEI4 $121 +line 36 +;36: snap = cg.nextSnap; +ADDRLP4 12 +ADDRGP4 cg+40 +INDIRP4 +ASGNP4 +line 37 +;37: } else { +ADDRGP4 $122 +JUMPV +LABELV $121 +line 38 +;38: snap = cg.snap; +ADDRLP4 12 +ADDRGP4 cg+36 +INDIRP4 +ASGNP4 +line 39 +;39: } +LABELV $122 +line 41 +;40: +;41: for ( i = 0 ; i < snap->numEntities ; i++ ) { +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRGP4 $131 +JUMPV +LABELV $128 +line 42 +;42: cent = &cg_entities[ snap->entities[ i ].number ]; +ADDRLP4 0 +CNSTI4 1920 +CNSTI4 296 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 1428 +ADDP4 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 43 +;43: ent = ¢->currentState; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 45 +;44: +;45: if ( ent->eType == ET_ITEM || ent->eType == ET_PUSH_TRIGGER || ent->eType == ET_TELEPORT_TRIGGER ) { +ADDRLP4 20 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 2 +EQI4 $135 +ADDRLP4 20 +INDIRI4 +CNSTI4 10 +EQI4 $135 +ADDRLP4 20 +INDIRI4 +CNSTI4 11 +NEI4 $132 +LABELV $135 +line 46 +;46: cg_triggerEntities[cg_numTriggerEntities] = cent; +ADDRGP4 cg_numTriggerEntities +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg_triggerEntities +ADDP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 47 +;47: cg_numTriggerEntities++; +ADDRLP4 24 +ADDRGP4 cg_numTriggerEntities +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 48 +;48: continue; +ADDRGP4 $129 +JUMPV +LABELV $132 +line 51 +;49: } +;50: +;51: if ( cent->nextState.solid ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $136 +line 52 +;52: cg_solidEntities[cg_numSolidEntities] = cent; +ADDRGP4 cg_numSolidEntities +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg_solidEntities +ADDP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 53 +;53: cg_numSolidEntities++; +ADDRLP4 24 +ADDRGP4 cg_numSolidEntities +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 54 +;54: continue; +LABELV $136 +line 56 +;55: } +;56: } +LABELV $129 +line 41 +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $131 +ADDRLP4 8 +INDIRI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 1424 +ADDP4 +INDIRI4 +LTI4 $128 +line 57 +;57:} +LABELV $120 +endproc CG_BuildSolidList 28 0 +proc CG_ClipMoveToEntities 1176 36 +line 66 +;58: +;59:/* +;60:==================== +;61:CG_ClipMoveToEntities +;62: +;63:==================== +;64:*/ +;65:static void CG_ClipMoveToEntities ( const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, +;66: int skipNumber, int mask, trace_t *tr ) { +line 75 +;67: int i, x, zd, zu; +;68: trace_t trace; +;69: entityState_t *ent; +;70: clipHandle_t cmodel; +;71: vec3_t bmins, bmaxs; +;72: vec3_t origin, angles; +;73: centity_t *cent; +;74: +;75: for ( i = 0 ; i < cg_numSolidEntities ; i++ ) { +ADDRLP4 1088 +CNSTI4 0 +ASGNI4 +ADDRGP4 $142 +JUMPV +LABELV $139 +line 76 +;76: cent = cg_solidEntities[ i ]; +ADDRLP4 1084 +ADDRLP4 1088 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg_solidEntities +ADDP4 +INDIRP4 +ASGNP4 +line 77 +;77: ent = ¢->currentState; +ADDRLP4 0 +ADDRLP4 1084 +INDIRP4 +ASGNP4 +line 79 +;78: +;79: if ( ent->number == skipNumber ) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRFP4 16 +INDIRI4 +NEI4 $143 +line 80 +;80: continue; +ADDRGP4 $140 +JUMPV +LABELV $143 +line 83 +;81: } +;82: +;83: if (ent->number > MAX_CLIENTS && cg.snap && ent->genericenemyindex && (ent->genericenemyindex-1024) == cg.snap->ps.clientNum) +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 32 +LEI4 $145 +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $145 +ADDRLP4 1160 +ADDRLP4 0 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1160 +INDIRI4 +CNSTI4 0 +EQI4 $145 +ADDRLP4 1160 +INDIRI4 +CNSTI4 1024 +SUBI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $145 +line 84 +;84: { //rww - method of keeping objects from colliding in client-prediction (in case of ownership) +line 85 +;85: continue; +ADDRGP4 $140 +JUMPV +LABELV $145 +line 88 +;86: } +;87: +;88: if ( ent->solid == SOLID_BMODEL ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 16777215 +NEI4 $149 +line 90 +;89: // special value for bmodel +;90: cmodel = trap_CM_InlineModel( ent->modelindex ); +ADDRLP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1164 +ADDRGP4 trap_CM_InlineModel +CALLI4 +ASGNI4 +ADDRLP4 1092 +ADDRLP4 1164 +INDIRI4 +ASGNI4 +line 91 +;91: VectorCopy( cent->lerpAngles, angles ); +ADDRLP4 1132 +ADDRLP4 1084 +INDIRP4 +CNSTI4 940 +ADDP4 +INDIRB +ASGNB 12 +line 92 +;92: BG_EvaluateTrajectory( ¢->currentState.pos, cg.physicsTime, origin ); +ADDRLP4 1084 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRGP4 cg+72 +INDIRI4 +ARGI4 +ADDRLP4 1120 +ARGP4 +ADDRGP4 BG_EvaluateTrajectory +CALLV +pop +line 93 +;93: } else { +ADDRGP4 $150 +JUMPV +LABELV $149 +line 95 +;94: // encoded bbox +;95: x = (ent->solid & 255); +ADDRLP4 1144 +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 255 +BANDI4 +ASGNI4 +line 96 +;96: zd = ((ent->solid>>8) & 255); +ADDRLP4 1148 +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 8 +RSHI4 +CNSTI4 255 +BANDI4 +ASGNI4 +line 97 +;97: zu = ((ent->solid>>16) & 255) - 32; +ADDRLP4 1152 +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 16 +RSHI4 +CNSTI4 255 +BANDI4 +CNSTI4 32 +SUBI4 +ASGNI4 +line 99 +;98: +;99: bmins[0] = bmins[1] = -x; +ADDRLP4 1164 +ADDRLP4 1144 +INDIRI4 +NEGI4 +CVIF4 4 +ASGNF4 +ADDRLP4 1096+4 +ADDRLP4 1164 +INDIRF4 +ASGNF4 +ADDRLP4 1096 +ADDRLP4 1164 +INDIRF4 +ASGNF4 +line 100 +;100: bmaxs[0] = bmaxs[1] = x; +ADDRLP4 1168 +ADDRLP4 1144 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 1108+4 +ADDRLP4 1168 +INDIRF4 +ASGNF4 +ADDRLP4 1108 +ADDRLP4 1168 +INDIRF4 +ASGNF4 +line 101 +;101: bmins[2] = -zd; +ADDRLP4 1096+8 +ADDRLP4 1148 +INDIRI4 +NEGI4 +CVIF4 4 +ASGNF4 +line 102 +;102: bmaxs[2] = zu; +ADDRLP4 1108+8 +ADDRLP4 1152 +INDIRI4 +CVIF4 4 +ASGNF4 +line 104 +;103: +;104: cmodel = trap_CM_TempBoxModel( bmins, bmaxs ); +ADDRLP4 1096 +ARGP4 +ADDRLP4 1108 +ARGP4 +ADDRLP4 1172 +ADDRGP4 trap_CM_TempBoxModel +CALLI4 +ASGNI4 +ADDRLP4 1092 +ADDRLP4 1172 +INDIRI4 +ASGNI4 +line 105 +;105: VectorCopy( vec3_origin, angles ); +ADDRLP4 1132 +ADDRGP4 vec3_origin +INDIRB +ASGNB 12 +line 106 +;106: VectorCopy( cent->lerpOrigin, origin ); +ADDRLP4 1120 +ADDRLP4 1084 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 107 +;107: } +LABELV $150 +line 110 +;108: +;109: +;110: trap_CM_TransformedBoxTrace ( &trace, start, end, +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 1092 +INDIRI4 +ARGI4 +ADDRFP4 20 +INDIRI4 +ARGI4 +ADDRLP4 1120 +ARGP4 +ADDRLP4 1132 +ARGP4 +ADDRGP4 trap_CM_TransformedBoxTrace +CALLV +pop +line 113 +;111: mins, maxs, cmodel, mask, origin, angles); +;112: +;113: if (trace.allsolid || trace.fraction < tr->fraction) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $159 +ADDRLP4 4+8 +INDIRF4 +ADDRFP4 24 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +GEF4 $156 +LABELV $159 +line 114 +;114: trace.entityNum = ent->number; +ADDRLP4 4+52 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +line 115 +;115: *tr = trace; +ADDRFP4 24 +INDIRP4 +ADDRLP4 4 +INDIRB +ASGNB 1080 +line 116 +;116: } else if (trace.startsolid) { +ADDRGP4 $157 +JUMPV +LABELV $156 +ADDRLP4 4+4 +INDIRI4 +CNSTI4 0 +EQI4 $161 +line 117 +;117: tr->startsolid = qtrue; +ADDRFP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 1 +ASGNI4 +line 118 +;118: } +LABELV $161 +LABELV $157 +line 119 +;119: if ( tr->allsolid ) { +ADDRFP4 24 +INDIRP4 +INDIRI4 +CNSTI4 0 +EQI4 $164 +line 120 +;120: return; +ADDRGP4 $138 +JUMPV +LABELV $164 +line 122 +;121: } +;122: } +LABELV $140 +line 75 +ADDRLP4 1088 +ADDRLP4 1088 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $142 +ADDRLP4 1088 +INDIRI4 +ADDRGP4 cg_numSolidEntities +INDIRI4 +LTI4 $139 +line 123 +;123:} +LABELV $138 +endproc CG_ClipMoveToEntities 1176 36 +export CG_Trace +proc CG_Trace 1084 28 +line 131 +;124: +;125:/* +;126:================ +;127:CG_Trace +;128:================ +;129:*/ +;130:void CG_Trace( trace_t *result, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, +;131: int skipNumber, int mask ) { +line 134 +;132: trace_t t; +;133: +;134: trap_CM_BoxTrace ( &t, start, end, mins, maxs, 0, mask); +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRFP4 24 +INDIRI4 +ARGI4 +ADDRGP4 trap_CM_BoxTrace +CALLV +pop +line 135 +;135: t.entityNum = t.fraction != 1.0 ? ENTITYNUM_WORLD : ENTITYNUM_NONE; +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1065353216 +EQF4 $170 +ADDRLP4 1080 +CNSTI4 1022 +ASGNI4 +ADDRGP4 $171 +JUMPV +LABELV $170 +ADDRLP4 1080 +CNSTI4 1023 +ASGNI4 +LABELV $171 +ADDRLP4 0+52 +ADDRLP4 1080 +INDIRI4 +ASGNI4 +line 137 +;136: // check all other solid models +;137: CG_ClipMoveToEntities (start, mins, maxs, end, skipNumber, mask, &t); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRFP4 20 +INDIRI4 +ARGI4 +ADDRFP4 24 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRGP4 CG_ClipMoveToEntities +CALLV +pop +line 139 +;138: +;139: *result = t; +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRB +ASGNB 1080 +line 140 +;140:} +LABELV $166 +endproc CG_Trace 1084 28 +export CG_PointContents +proc CG_PointContents 36 16 +line 147 +;141: +;142:/* +;143:================ +;144:CG_PointContents +;145:================ +;146:*/ +;147:int CG_PointContents( const vec3_t point, int passEntityNum ) { +line 154 +;148: int i; +;149: entityState_t *ent; +;150: centity_t *cent; +;151: clipHandle_t cmodel; +;152: int contents; +;153: +;154: contents = trap_CM_PointContents (point, 0); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 20 +ADDRGP4 trap_CM_PointContents +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 156 +;155: +;156: for ( i = 0 ; i < cg_numSolidEntities ; i++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $176 +JUMPV +LABELV $173 +line 157 +;157: cent = cg_solidEntities[ i ]; +ADDRLP4 12 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg_solidEntities +ADDP4 +INDIRP4 +ASGNP4 +line 159 +;158: +;159: ent = ¢->currentState; +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +ASGNP4 +line 161 +;160: +;161: if ( ent->number == passEntityNum ) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +NEI4 $177 +line 162 +;162: continue; +ADDRGP4 $174 +JUMPV +LABELV $177 +line 165 +;163: } +;164: +;165: if (ent->solid != SOLID_BMODEL) { // special value for bmodel +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 16777215 +EQI4 $179 +line 166 +;166: continue; +ADDRGP4 $174 +JUMPV +LABELV $179 +line 169 +;167: } +;168: +;169: cmodel = trap_CM_InlineModel( ent->modelindex ); +ADDRLP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 trap_CM_InlineModel +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 170 +;170: if ( !cmodel ) { +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $181 +line 171 +;171: continue; +ADDRGP4 $174 +JUMPV +LABELV $181 +line 174 +;172: } +;173: +;174: contents |= trap_CM_TransformedPointContents( point, cmodel, ent->origin, ent->angles ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ARGP4 +ADDRLP4 32 +ADDRGP4 trap_CM_TransformedPointContents +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +ADDRLP4 32 +INDIRI4 +BORI4 +ASGNI4 +line 175 +;175: } +LABELV $174 +line 156 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $176 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg_numSolidEntities +INDIRI4 +LTI4 $173 +line 177 +;176: +;177: return contents; +ADDRLP4 16 +INDIRI4 +RETI4 +LABELV $172 +endproc CG_PointContents 36 16 +proc CG_InterpolatePlayerState 64 12 +line 189 +;178:} +;179: +;180: +;181:/* +;182:======================== +;183:CG_InterpolatePlayerState +;184: +;185:Generates cg.predictedPlayerState by interpolating between +;186:cg.snap->player_state and cg.nextFrame->player_state +;187:======================== +;188:*/ +;189:static void CG_InterpolatePlayerState( qboolean grabAngles ) { +line 195 +;190: float f; +;191: int i; +;192: playerState_t *out; +;193: snapshot_t *prev, *next; +;194: +;195: out = &cg.predictedPlayerState; +ADDRLP4 12 +ADDRGP4 cg+96 +ASGNP4 +line 196 +;196: prev = cg.snap; +ADDRLP4 4 +ADDRGP4 cg+36 +INDIRP4 +ASGNP4 +line 197 +;197: next = cg.nextSnap; +ADDRLP4 8 +ADDRGP4 cg+40 +INDIRP4 +ASGNP4 +line 199 +;198: +;199: *out = cg.snap->ps; +ADDRLP4 12 +INDIRP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRB +ASGNB 1380 +line 202 +;200: +;201: // if we are still allowing local input, short circuit the view angles +;202: if ( grabAngles ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $188 +line 206 +;203: usercmd_t cmd; +;204: int cmdNum; +;205: +;206: cmdNum = trap_GetCurrentCmdNumber(); +ADDRLP4 52 +ADDRGP4 trap_GetCurrentCmdNumber +CALLI4 +ASGNI4 +ADDRLP4 48 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 207 +;207: trap_GetUserCmd( cmdNum, &cmd ); +ADDRLP4 48 +INDIRI4 +ARGI4 +ADDRLP4 20 +ARGP4 +ADDRGP4 trap_GetUserCmd +CALLI4 +pop +line 209 +;208: +;209: PM_UpdateViewAngles( out, &cmd ); +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRGP4 PM_UpdateViewAngles +CALLV +pop +line 210 +;210: } +LABELV $188 +line 213 +;211: +;212: // if the next frame is a teleport, we can't lerp to it +;213: if ( cg.nextFrameTeleport ) { +ADDRGP4 cg+56 +INDIRI4 +CNSTI4 0 +EQI4 $190 +line 214 +;214: return; +ADDRGP4 $183 +JUMPV +LABELV $190 +line 217 +;215: } +;216: +;217: if ( !next || next->serverTime <= prev->serverTime ) { +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $195 +ADDRLP4 24 +CNSTI4 8 +ASGNI4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRI4 +GTI4 $193 +LABELV $195 +line 218 +;218: return; +ADDRGP4 $183 +JUMPV +LABELV $193 +line 221 +;219: } +;220: +;221: f = (float)( cg.time - prev->serverTime ) / ( next->serverTime - prev->serverTime ); +ADDRLP4 28 +CNSTI4 8 +ASGNI4 +ADDRLP4 32 +ADDRLP4 4 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 16 +ADDRGP4 cg+64 +INDIRI4 +ADDRLP4 32 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 32 +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 223 +;222: +;223: i = next->ps.bobCycle; +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +ASGNI4 +line 224 +;224: if ( i < prev->ps.bobCycle ) { +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +GEI4 $197 +line 225 +;225: i += 256; // handle wraparound +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 256 +ADDI4 +ASGNI4 +line 226 +;226: } +LABELV $197 +line 227 +;227: out->bobCycle = prev->ps.bobCycle + f * ( i - prev->ps.bobCycle ); +ADDRLP4 36 +ADDRLP4 4 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 36 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ADDF4 +CVFI4 4 +ASGNI4 +line 229 +;228: +;229: for ( i = 0 ; i < 3 ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $199 +line 230 +;230: out->origin[i] = prev->ps.origin[i] + f * (next->ps.origin[i] - prev->ps.origin[i] ); +ADDRLP4 40 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 44 +CNSTI4 64 +ASGNI4 +ADDRLP4 48 +ADDRLP4 40 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 40 +INDIRI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDP4 +ADDRLP4 48 +INDIRF4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 40 +INDIRI4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +ADDP4 +INDIRF4 +ADDRLP4 48 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 231 +;231: if ( !grabAngles ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $203 +line 232 +;232: out->viewangles[i] = LerpAngle( +ADDRLP4 52 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 56 +CNSTI4 200 +ASGNI4 +ADDRLP4 52 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 52 +INDIRI4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 60 +ADDRGP4 LerpAngle +CALLF4 +ASGNF4 +ADDRLP4 52 +INDIRI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDP4 +ADDRLP4 60 +INDIRF4 +ASGNF4 +line 234 +;233: prev->ps.viewangles[i], next->ps.viewangles[i], f ); +;234: } +LABELV $203 +line 235 +;235: out->velocity[i] = prev->ps.velocity[i] + +ADDRLP4 52 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 56 +CNSTI4 76 +ASGNI4 +ADDRLP4 60 +ADDRLP4 52 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 52 +INDIRI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDP4 +ADDRLP4 60 +INDIRF4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 52 +INDIRI4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 237 +;236: f * (next->ps.velocity[i] - prev->ps.velocity[i] ); +;237: } +LABELV $200 +line 229 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $199 +line 239 +;238: +;239:} +LABELV $183 +endproc CG_InterpolatePlayerState 64 12 +proc CG_TouchItem 28 12 +line 246 +;240: +;241:/* +;242:=================== +;243:CG_TouchItem +;244:=================== +;245:*/ +;246:static void CG_TouchItem( centity_t *cent ) { +line 249 +;247: gitem_t *item; +;248: +;249: if ( !cg_predictItems.integer ) { +ADDRGP4 cg_predictItems+12 +INDIRI4 +CNSTI4 0 +NEI4 $206 +line 250 +;250: return; +ADDRGP4 $205 +JUMPV +LABELV $206 +line 252 +;251: } +;252: if ( !BG_PlayerTouchesItem( &cg.predictedPlayerState, ¢->currentState, cg.time ) ) { +ADDRGP4 cg+96 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 BG_PlayerTouchesItem +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $209 +line 253 +;253: return; +ADDRGP4 $205 +JUMPV +LABELV $209 +line 256 +;254: } +;255: +;256: if (cent->currentState.eFlags & EF_ITEMPLACEHOLDER) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 4194304 +BANDI4 +CNSTI4 0 +EQI4 $213 +line 257 +;257: { +line 258 +;258: return; +ADDRGP4 $205 +JUMPV +LABELV $213 +line 261 +;259: } +;260: +;261: if (cent->currentState.eFlags & EF_NODRAW) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $215 +line 262 +;262: { +line 263 +;263: return; +ADDRGP4 $205 +JUMPV +LABELV $215 +line 267 +;264: } +;265: +;266: // never pick an item up twice in a prediction +;267: if ( cent->miscTime == cg.time ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 620 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +NEI4 $217 +line 268 +;268: return; +ADDRGP4 $205 +JUMPV +LABELV $217 +line 271 +;269: } +;270: +;271: if ( !BG_CanItemBeGrabbed( cgs.gametype, ¢->currentState, &cg.predictedPlayerState ) ) { +ADDRGP4 cgs+32960 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 cg+96 +ARGP4 +ADDRLP4 8 +ADDRGP4 BG_CanItemBeGrabbed +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $220 +line 272 +;272: return; // can't hold it +ADDRGP4 $205 +JUMPV +LABELV $220 +line 275 +;273: } +;274: +;275: item = &bg_itemlist[ cent->currentState.modelindex ]; +ADDRLP4 0 +CNSTI4 52 +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +ASGNP4 +line 312 +;276: +;277: //Currently there is no reliable way of knowing if the client has touched a certain item before another if they are next to each other, or rather +;278: //if the server has touched them in the same order. This results often in grabbing an item in the prediction and the server giving you the other +;279: //item. So for now prediction of armor, health, and ammo is disabled. +;280:/* +;281: if (item->giType == IT_ARMOR) +;282: { //rww - this will be stomped next update, but it's set so that we don't try to pick up two shields in one prediction and have the server cancel one +;283: // cg.predictedPlayerState.stats[STAT_ARMOR] += item->quantity; +;284: +;285: //FIXME: This can't be predicted properly at the moment +;286: return; +;287: } +;288: +;289: if (item->giType == IT_HEALTH) +;290: { //same as above, for health +;291: // cg.predictedPlayerState.stats[STAT_HEALTH] += item->quantity; +;292: +;293: //FIXME: This can't be predicted properly at the moment +;294: return; +;295: } +;296: +;297: if (item->giType == IT_AMMO) +;298: { //same as above, for ammo +;299: // cg.predictedPlayerState.ammo[item->giTag] += item->quantity; +;300: +;301: //FIXME: This can't be predicted properly at the moment +;302: return; +;303: } +;304: +;305: if (item->giType == IT_HOLDABLE) +;306: { //same as above, for holdables +;307: // cg.predictedPlayerState.stats[STAT_HOLDABLE_ITEMS] |= (1 << item->giTag); +;308: } +;309:*/ +;310: // Special case for flags. +;311: // We don't predict touching our own flag +;312: if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +EQI4 $228 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $224 +LABELV $228 +line 313 +;313: if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_RED && +ADDRGP4 cg+96+280+12 +INDIRI4 +CNSTI4 1 +NEI4 $229 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 4 +NEI4 $229 +line 315 +;314: item->giTag == PW_REDFLAG) +;315: return; +ADDRGP4 $205 +JUMPV +LABELV $229 +line 316 +;316: if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_BLUE && +ADDRGP4 cg+96+280+12 +INDIRI4 +CNSTI4 2 +NEI4 $234 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $234 +line 318 +;317: item->giTag == PW_BLUEFLAG) +;318: return; +ADDRGP4 $205 +JUMPV +LABELV $234 +line 319 +;319: } +LABELV $224 +line 321 +;320: +;321: if (item->giType == IT_POWERUP && +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $239 +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 12 +EQI4 $241 +ADDRLP4 16 +INDIRI4 +CNSTI4 13 +NEI4 $239 +LABELV $241 +line 323 +;322: (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT || item->giTag == PW_FORCE_ENLIGHTENED_DARK)) +;323: { +line 324 +;324: if (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT) +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 12 +NEI4 $242 +line 325 +;325: { +line 326 +;326: if (cg.predictedPlayerState.fd.forceSide != FORCE_LIGHTSIDE) +ADDRGP4 cg+96+772+416 +INDIRI4 +CNSTI4 1 +EQI4 $243 +line 327 +;327: { +line 328 +;328: return; +ADDRGP4 $205 +JUMPV +line 330 +;329: } +;330: } +LABELV $242 +line 332 +;331: else +;332: { +line 333 +;333: if (cg.predictedPlayerState.fd.forceSide != FORCE_DARKSIDE) +ADDRGP4 cg+96+772+416 +INDIRI4 +CNSTI4 2 +EQI4 $249 +line 334 +;334: { +line 335 +;335: return; +ADDRGP4 $205 +JUMPV +LABELV $249 +line 337 +;336: } +;337: } +LABELV $243 +line 338 +;338: } +LABELV $239 +line 342 +;339: +;340: +;341: // grab it +;342: BG_AddPredictableEventToPlayerstate( EV_ITEM_PICKUP, cent->currentState.number , &cg.predictedPlayerState); +CNSTI4 20 +ARGI4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+96 +ARGP4 +ADDRGP4 BG_AddPredictableEventToPlayerstate +CALLV +pop +line 345 +;343: +;344: // remove it from the frame so it won't be drawn +;345: cent->currentState.eFlags |= EF_NODRAW; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 128 +BORI4 +ASGNI4 +line 348 +;346: +;347: // don't touch it again this prediction +;348: cent->miscTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 620 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 351 +;349: +;350: // if its a weapon, give them some predicted ammo so the autoswitch will work +;351: if ( item->giType == IT_WEAPON ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $256 +line 352 +;352: cg.predictedPlayerState.stats[ STAT_WEAPONS ] |= 1 << item->giTag; +ADDRLP4 24 +ADDRGP4 cg+96+216+16 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +LSHI4 +BORI4 +ASGNI4 +line 353 +;353: if ( !cg.predictedPlayerState.ammo[ item->giTag ] ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+96+408 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $261 +line 354 +;354: cg.predictedPlayerState.ammo[ item->giTag ] = 1; +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+96+408 +ADDP4 +CNSTI4 1 +ASGNI4 +line 355 +;355: } +LABELV $261 +line 356 +;356: } +LABELV $256 +line 357 +;357:} +LABELV $205 +endproc CG_TouchItem 28 12 +proc CG_TouchTriggerPrediction 1112 28 +line 367 +;358: +;359: +;360:/* +;361:========================= +;362:CG_TouchTriggerPrediction +;363: +;364:Predict push triggers and items +;365:========================= +;366:*/ +;367:static void CG_TouchTriggerPrediction( void ) { +line 376 +;368: int i; +;369: trace_t trace; +;370: entityState_t *ent; +;371: clipHandle_t cmodel; +;372: centity_t *cent; +;373: qboolean spectator; +;374: +;375: // dead clients don't activate triggers +;376: if ( cg.predictedPlayerState.stats[STAT_HEALTH] <= 0 ) { +ADDRGP4 cg+96+216 +INDIRI4 +CNSTI4 0 +GTI4 $268 +line 377 +;377: return; +ADDRGP4 $267 +JUMPV +LABELV $268 +line 380 +;378: } +;379: +;380: spectator = ( cg.predictedPlayerState.pm_type == PM_SPECTATOR ); +ADDRGP4 cg+96+4 +INDIRI4 +CNSTI4 3 +NEI4 $275 +ADDRLP4 1100 +CNSTI4 1 +ASGNI4 +ADDRGP4 $276 +JUMPV +LABELV $275 +ADDRLP4 1100 +CNSTI4 0 +ASGNI4 +LABELV $276 +ADDRLP4 1096 +ADDRLP4 1100 +INDIRI4 +ASGNI4 +line 382 +;381: +;382: if ( cg.predictedPlayerState.pm_type != PM_NORMAL && cg.predictedPlayerState.pm_type != PM_FLOAT && !spectator ) { +ADDRLP4 1104 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+96+4 +INDIRI4 +ADDRLP4 1104 +INDIRI4 +EQI4 $277 +ADDRGP4 cg+96+4 +INDIRI4 +CNSTI4 1 +EQI4 $277 +ADDRLP4 1096 +INDIRI4 +ADDRLP4 1104 +INDIRI4 +NEI4 $277 +line 383 +;383: return; +ADDRGP4 $267 +JUMPV +LABELV $277 +line 386 +;384: } +;385: +;386: for ( i = 0 ; i < cg_numTriggerEntities ; i++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $286 +JUMPV +LABELV $283 +line 387 +;387: cent = cg_triggerEntities[ i ]; +ADDRLP4 12 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg_triggerEntities +ADDP4 +INDIRP4 +ASGNP4 +line 388 +;388: ent = ¢->currentState; +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +ASGNP4 +line 390 +;389: +;390: if ( ent->eType == ET_ITEM && !spectator ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $287 +ADDRLP4 1096 +INDIRI4 +CNSTI4 0 +NEI4 $287 +line 391 +;391: CG_TouchItem( cent ); +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRGP4 CG_TouchItem +CALLV +pop +line 392 +;392: continue; +ADDRGP4 $284 +JUMPV +LABELV $287 +line 395 +;393: } +;394: +;395: if ( ent->solid != SOLID_BMODEL ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CNSTI4 16777215 +EQI4 $289 +line 396 +;396: continue; +ADDRGP4 $284 +JUMPV +LABELV $289 +line 399 +;397: } +;398: +;399: cmodel = trap_CM_InlineModel( ent->modelindex ); +ADDRLP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1108 +ADDRGP4 trap_CM_InlineModel +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 1108 +INDIRI4 +ASGNI4 +line 400 +;400: if ( !cmodel ) { +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $291 +line 401 +;401: continue; +ADDRGP4 $284 +JUMPV +LABELV $291 +line 404 +;402: } +;403: +;404: trap_CM_BoxTrace( &trace, cg.predictedPlayerState.origin, cg.predictedPlayerState.origin, +ADDRLP4 16 +ARGP4 +ADDRGP4 cg+96+20 +ARGP4 +ADDRGP4 cg+96+20 +ARGP4 +ADDRGP4 cg_pmove+188 +ARGP4 +ADDRGP4 cg_pmove+200 +ARGP4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 -1 +ARGI4 +ADDRGP4 trap_CM_BoxTrace +CALLV +pop +line 407 +;405: cg_pmove.mins, cg_pmove.maxs, cmodel, -1 ); +;406: +;407: if ( !trace.startsolid ) { +ADDRLP4 16+4 +INDIRI4 +CNSTI4 0 +NEI4 $299 +line 408 +;408: continue; +ADDRGP4 $284 +JUMPV +LABELV $299 +line 411 +;409: } +;410: +;411: if ( ent->eType == ET_TELEPORT_TRIGGER ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 11 +NEI4 $302 +line 412 +;412: cg.hyperspace = qtrue; +ADDRGP4 cg+92 +CNSTI4 1 +ASGNI4 +line 413 +;413: } else if ( ent->eType == ET_PUSH_TRIGGER ) { +ADDRGP4 $303 +JUMPV +LABELV $302 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 10 +NEI4 $305 +line 414 +;414: BG_TouchJumpPad( &cg.predictedPlayerState, ent ); +ADDRGP4 cg+96 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 BG_TouchJumpPad +CALLV +pop +line 415 +;415: } +LABELV $305 +LABELV $303 +line 416 +;416: } +LABELV $284 +line 386 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $286 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg_numTriggerEntities +INDIRI4 +LTI4 $283 +line 419 +;417: +;418: // if we didn't touch a jump pad this pmove frame +;419: if ( cg.predictedPlayerState.jumppad_frame != cg.predictedPlayerState.pmove_framecount ) { +ADDRGP4 cg+96+492 +INDIRI4 +ADDRGP4 cg+96+488 +INDIRI4 +EQI4 $308 +line 420 +;420: cg.predictedPlayerState.jumppad_frame = 0; +ADDRGP4 cg+96+492 +CNSTI4 0 +ASGNI4 +line 421 +;421: cg.predictedPlayerState.jumppad_ent = 0; +ADDRGP4 cg+96+480 +CNSTI4 0 +ASGNI4 +line 422 +;422: } +LABELV $308 +line 423 +;423:} +LABELV $267 +endproc CG_TouchTriggerPrediction 1112 28 +export CG_EntityStateToPlayerState +proc CG_EntityStateToPlayerState 4 0 +line 425 +;424: +;425:void CG_EntityStateToPlayerState( entityState_t *s, playerState_t *ps ) { +line 428 +;426: int i; +;427: +;428: ps->clientNum = s->number; +ADDRFP4 4 +INDIRP4 +CNSTI4 144 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +line 430 +;429: +;430: VectorCopy( s->pos.trBase, ps->origin ); +ADDRFP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRB +ASGNB 12 +line 432 +;431: +;432: VectorCopy( s->pos.trDelta, ps->velocity ); +ADDRFP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRB +ASGNB 12 +line 434 +;433: +;434: VectorCopy( s->apos.trBase, ps->viewangles ); +ADDRFP4 4 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRB +ASGNB 12 +line 436 +;435: +;436: ps->fd.forceMindtrickTargetIndex = s->trickedentindex; +ADDRFP4 4 +INDIRP4 +CNSTI4 1156 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +line 437 +;437: ps->fd.forceMindtrickTargetIndex2 = s->trickedentindex2; +ADDRFP4 4 +INDIRP4 +CNSTI4 1160 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ASGNI4 +line 438 +;438: ps->fd.forceMindtrickTargetIndex3 = s->trickedentindex3; +ADDRFP4 4 +INDIRP4 +CNSTI4 1164 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +ASGNI4 +line 439 +;439: ps->fd.forceMindtrickTargetIndex4 = s->trickedentindex4; +ADDRFP4 4 +INDIRP4 +CNSTI4 1168 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRI4 +ASGNI4 +line 441 +;440: +;441: ps->saberLockFrame = s->forceFrame; +ADDRFP4 4 +INDIRP4 +CNSTI4 532 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +ASGNI4 +line 443 +;442: +;443: ps->electrifyTime = s->emplacedOwner; +ADDRFP4 4 +INDIRP4 +CNSTI4 740 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRI4 +ASGNI4 +line 445 +;444: +;445: ps->speed = s->speed; +ADDRFP4 4 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 447 +;446: +;447: ps->genericEnemyIndex = s->genericenemyindex; +ADDRFP4 4 +INDIRP4 +CNSTI4 624 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRI4 +ASGNI4 +line 449 +;448: +;449: ps->activeForcePass = s->activeForcePass; +ADDRFP4 4 +INDIRP4 +CNSTI4 636 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +ASGNI4 +line 451 +;450: +;451: ps->movementDir = s->angles2[YAW]; +ADDRFP4 4 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 452 +;452: ps->legsAnim = s->legsAnim; +ADDRFP4 4 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +ASGNI4 +line 453 +;453: ps->torsoAnim = s->torsoAnim; +ADDRFP4 4 +INDIRP4 +CNSTI4 100 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +ASGNI4 +line 454 +;454: ps->clientNum = s->clientNum; +ADDRFP4 4 +INDIRP4 +CNSTI4 144 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ASGNI4 +line 456 +;455: +;456: ps->eFlags = s->eFlags; +ADDRFP4 4 +INDIRP4 +CNSTI4 108 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +line 458 +;457: +;458: ps->saberInFlight = s->saberInFlight; +ADDRFP4 4 +INDIRP4 +CNSTI4 504 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +ASGNI4 +line 459 +;459: ps->saberEntityNum = s->saberEntityNum; +ADDRFP4 4 +INDIRP4 +CNSTI4 544 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +ASGNI4 +line 460 +;460: ps->saberMove = s->saberMove; +ADDRFP4 4 +INDIRP4 +CNSTI4 512 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRI4 +ASGNI4 +line 461 +;461: ps->fd.forcePowersActive = s->forcePowersActive; +ADDRFP4 4 +INDIRP4 +CNSTI4 848 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ASGNI4 +line 463 +;462: +;463: if (s->bolt1) +ADDRFP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $319 +line 464 +;464: { +line 465 +;465: ps->duelInProgress = qtrue; +ADDRFP4 4 +INDIRP4 +CNSTI4 1304 +ADDP4 +CNSTI4 1 +ASGNI4 +line 466 +;466: } +ADDRGP4 $320 +JUMPV +LABELV $319 +line 468 +;467: else +;468: { +line 469 +;469: ps->duelInProgress = qfalse; +ADDRFP4 4 +INDIRP4 +CNSTI4 1304 +ADDP4 +CNSTI4 0 +ASGNI4 +line 470 +;470: } +LABELV $320 +line 472 +;471: +;472: if (s->bolt2) +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $321 +line 473 +;473: { +line 474 +;474: ps->dualBlade = qtrue; +ADDRFP4 4 +INDIRP4 +CNSTI4 1364 +ADDP4 +CNSTI4 1 +ASGNI4 +line 475 +;475: } +ADDRGP4 $322 +JUMPV +LABELV $321 +line 477 +;476: else +;477: { +line 478 +;478: ps->dualBlade = qfalse; +ADDRFP4 4 +INDIRP4 +CNSTI4 1364 +ADDP4 +CNSTI4 0 +ASGNI4 +line 479 +;479: } +LABELV $322 +line 481 +;480: +;481: ps->emplacedIndex = s->otherEntityNum2; +ADDRFP4 4 +INDIRP4 +CNSTI4 596 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ASGNI4 +line 483 +;482: +;483: ps->saberHolstered = s->shouldtarget; //reuse bool in entitystate for players differently +ADDRFP4 4 +INDIRP4 +CNSTI4 1312 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRI4 +ASGNI4 +line 484 +;484: ps->usingATST = s->teamowner; +ADDRFP4 4 +INDIRP4 +CNSTI4 1316 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRI4 +ASGNI4 +line 492 +;485: +;486: /* +;487: if (ps->genericEnemyIndex != -1) +;488: { +;489: s->eFlags |= EF_SEEKERDRONE; +;490: } +;491: */ +;492: ps->genericEnemyIndex = -1; //no real option for this +ADDRFP4 4 +INDIRP4 +CNSTI4 624 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 495 +;493: +;494: //The client has no knowledge of health levels (except for the client entity) +;495: if (s->eFlags & EF_DEAD) +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $323 +line 496 +;496: { +line 497 +;497: ps->stats[STAT_HEALTH] = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 216 +ADDP4 +CNSTI4 0 +ASGNI4 +line 498 +;498: } +ADDRGP4 $324 +JUMPV +LABELV $323 +line 500 +;499: else +;500: { +line 501 +;501: ps->stats[STAT_HEALTH] = 100; +ADDRFP4 4 +INDIRP4 +CNSTI4 216 +ADDP4 +CNSTI4 100 +ASGNI4 +line 502 +;502: } +LABELV $324 +line 522 +;503: +;504: /* +;505: if ( ps->externalEvent ) { +;506: s->event = ps->externalEvent; +;507: s->eventParm = ps->externalEventParm; +;508: } else if ( ps->entityEventSequence < ps->eventSequence ) { +;509: int seq; +;510: +;511: if ( ps->entityEventSequence < ps->eventSequence - MAX_PS_EVENTS) { +;512: ps->entityEventSequence = ps->eventSequence - MAX_PS_EVENTS; +;513: } +;514: seq = ps->entityEventSequence & (MAX_PS_EVENTS-1); +;515: s->event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 ); +;516: s->eventParm = ps->eventParms[ seq ]; +;517: ps->entityEventSequence++; +;518: } +;519: */ +;520: //Eh. +;521: +;522: ps->weapon = s->weapon; +ADDRFP4 4 +INDIRP4 +CNSTI4 148 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ASGNI4 +line 523 +;523: ps->groundEntityNum = s->groundEntityNum; +ADDRFP4 4 +INDIRP4 +CNSTI4 84 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +ASGNI4 +line 525 +;524: +;525: for ( i = 0 ; i < MAX_POWERUPS ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $325 +line 526 +;526: if (s->powerups & (1 << i)) +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $329 +line 527 +;527: { +line 528 +;528: ps->powerups[i] = 30; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 344 +ADDP4 +ADDP4 +CNSTI4 30 +ASGNI4 +line 529 +;529: } +ADDRGP4 $330 +JUMPV +LABELV $329 +line 531 +;530: else +;531: { +line 532 +;532: ps->powerups[i] = 0; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 344 +ADDP4 +ADDP4 +CNSTI4 0 +ASGNI4 +line 533 +;533: } +LABELV $330 +line 534 +;534: } +LABELV $326 +line 525 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LTI4 $325 +line 536 +;535: +;536: ps->loopSound = s->loopSound; +ADDRFP4 4 +INDIRP4 +CNSTI4 476 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +ASGNI4 +line 537 +;537: ps->generic1 = s->generic1; +ADDRFP4 4 +INDIRP4 +CNSTI4 472 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +ASGNI4 +line 538 +;538:} +LABELV $318 +endproc CG_EntityStateToPlayerState 4 0 +export CG_PredictPlayerState +proc CG_PredictPlayerState 1520 20 +line 568 +;539: +;540:playerState_t cgSendPS[MAX_CLIENTS]; +;541: +;542:/* +;543:================= +;544:CG_PredictPlayerState +;545: +;546:Generates cg.predictedPlayerState for the current cg.time +;547:cg.predictedPlayerState is guaranteed to be valid after exiting. +;548: +;549:For demo playback, this will be an interpolation between two valid +;550:playerState_t. +;551: +;552:For normal gameplay, it will be the result of predicted usercmd_t on +;553:top of the most recent playerState_t received from the server. +;554: +;555:Each new snapshot will usually have one or more new usercmd over the last, +;556:but we simulate all unacknowledged commands each time, not just the new ones. +;557:This means that on an internet connection, quite a few pmoves may be issued +;558:each frame. +;559: +;560:OPTIMIZE: don't re-simulate unless the newly arrived snapshot playerState_t +;561:differs from the predicted one. Would require saving all intermediate +;562:playerState_t during prediction. +;563: +;564:We detect prediction errors and allow them to be decayed off over several frames +;565:to ease the jerk. +;566:================= +;567:*/ +;568:void CG_PredictPlayerState( void ) { +line 575 +;569: int cmdNum, current, i; +;570: playerState_t oldPlayerState; +;571: qboolean moved; +;572: usercmd_t oldestCmd; +;573: usercmd_t latestCmd; +;574: +;575: cg.hyperspace = qfalse; // will be set if touching a trigger_teleport +ADDRGP4 cg+92 +CNSTI4 0 +ASGNI4 +line 580 +;576: +;577: // if this is the first frame we must guarantee +;578: // predictedPlayerState is valid even if there is some +;579: // other error condition +;580: if ( !cg.validPPS ) { +ADDRGP4 cg+3396 +INDIRI4 +CNSTI4 0 +NEI4 $333 +line 581 +;581: cg.validPPS = qtrue; +ADDRGP4 cg+3396 +CNSTI4 1 +ASGNI4 +line 582 +;582: cg.predictedPlayerState = cg.snap->ps; +ADDRGP4 cg+96 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRB +ASGNB 1380 +line 583 +;583: } +LABELV $333 +line 586 +;584: +;585: // demo playback just copies the moves +;586: if ( cg.demoPlayback || (cg.snap->ps.pm_flags & PMF_FOLLOW) ) { +ADDRLP4 1452 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+8 +INDIRI4 +ADDRLP4 1452 +INDIRI4 +NEI4 $343 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +ADDRLP4 1452 +INDIRI4 +EQI4 $339 +LABELV $343 +line 587 +;587: CG_InterpolatePlayerState( qfalse ); +CNSTI4 0 +ARGI4 +ADDRGP4 CG_InterpolatePlayerState +CALLV +pop +line 588 +;588: return; +ADDRGP4 $331 +JUMPV +LABELV $339 +line 592 +;589: } +;590: +;591: // non-predicting local movement will grab the latest angles +;592: if ( cg_nopredict.integer || cg_synchronousClients.integer ) { +ADDRLP4 1456 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_nopredict+12 +INDIRI4 +ADDRLP4 1456 +INDIRI4 +NEI4 $348 +ADDRGP4 cg_synchronousClients+12 +INDIRI4 +ADDRLP4 1456 +INDIRI4 +EQI4 $344 +LABELV $348 +line 593 +;593: CG_InterpolatePlayerState( qtrue ); +CNSTI4 1 +ARGI4 +ADDRGP4 CG_InterpolatePlayerState +CALLV +pop +line 594 +;594: return; +ADDRGP4 $331 +JUMPV +LABELV $344 +line 598 +;595: } +;596: +;597: // prepare for pmove +;598: cg_pmove.ps = &cg.predictedPlayerState; +ADDRGP4 cg_pmove +ADDRGP4 cg+96 +ASGNP4 +line 599 +;599: cg_pmove.trace = CG_Trace; +ADDRGP4 cg_pmove+240 +ADDRGP4 CG_Trace +ASGNP4 +line 600 +;600: cg_pmove.pointcontents = CG_PointContents; +ADDRGP4 cg_pmove+244 +ADDRGP4 CG_PointContents +ASGNP4 +line 601 +;601: if ( cg_pmove.ps->pm_type == PM_DEAD ) { +ADDRLP4 1460 +CNSTI4 4 +ASGNI4 +ADDRGP4 cg_pmove +INDIRP4 +ADDRLP4 1460 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 1460 +INDIRI4 +NEI4 $352 +line 602 +;602: cg_pmove.tracemask = MASK_PLAYERSOLID & ~CONTENTS_BODY; +ADDRGP4 cg_pmove+32 +CNSTI4 17 +ASGNI4 +line 603 +;603: } +ADDRGP4 $353 +JUMPV +LABELV $352 +line 604 +;604: else { +line 605 +;605: cg_pmove.tracemask = MASK_PLAYERSOLID; +ADDRGP4 cg_pmove+32 +CNSTI4 273 +ASGNI4 +line 606 +;606: } +LABELV $353 +line 607 +;607: if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $356 +line 608 +;608: cg_pmove.tracemask &= ~CONTENTS_BODY; // spectators can fly through bodies +ADDRLP4 1464 +ADDRGP4 cg_pmove+32 +ASGNP4 +ADDRLP4 1464 +INDIRP4 +ADDRLP4 1464 +INDIRP4 +INDIRI4 +CNSTI4 -257 +BANDI4 +ASGNI4 +line 609 +;609: } +LABELV $356 +line 610 +;610: cg_pmove.noFootsteps = ( cgs.dmflags & DF_NO_FOOTSTEPS ) > 0; +ADDRGP4 cgs+32964 +INDIRI4 +CNSTI4 32 +BANDI4 +CNSTI4 0 +LEI4 $363 +ADDRLP4 1464 +CNSTI4 1 +ASGNI4 +ADDRGP4 $364 +JUMPV +LABELV $363 +ADDRLP4 1464 +CNSTI4 0 +ASGNI4 +LABELV $364 +ADDRGP4 cg_pmove+40 +ADDRLP4 1464 +INDIRI4 +ASGNI4 +line 613 +;611: +;612: // save the state before the pmove so we can detect transitions +;613: oldPlayerState = cg.predictedPlayerState; +ADDRLP4 8 +ADDRGP4 cg+96 +INDIRB +ASGNB 1380 +line 615 +;614: +;615: current = trap_GetCurrentCmdNumber(); +ADDRLP4 1468 +ADDRGP4 trap_GetCurrentCmdNumber +CALLI4 +ASGNI4 +ADDRLP4 1388 +ADDRLP4 1468 +INDIRI4 +ASGNI4 +line 620 +;616: +;617: // if we don't have the commands right after the snapshot, we +;618: // can't accurately predict a current position, so just freeze at +;619: // the last good position we had +;620: cmdNum = current - CMD_BACKUP + 1; +ADDRLP4 4 +ADDRLP4 1388 +INDIRI4 +CNSTI4 64 +SUBI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 621 +;621: trap_GetUserCmd( cmdNum, &oldestCmd ); +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 1424 +ARGP4 +ADDRGP4 trap_GetUserCmd +CALLI4 +pop +line 622 +;622: if ( oldestCmd.serverTime > cg.snap->ps.commandTime +ADDRLP4 1472 +ADDRLP4 1424 +INDIRI4 +ASGNI4 +ADDRLP4 1472 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +LEI4 $366 +ADDRLP4 1472 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $366 +line 623 +;623: && oldestCmd.serverTime < cg.time ) { // special check for map_restart +line 624 +;624: if ( cg_showmiss.integer ) { +ADDRGP4 cg_showmiss+12 +INDIRI4 +CNSTI4 0 +EQI4 $331 +line 625 +;625: CG_Printf ("exceeded PACKET_BACKUP on commands\n"); +ADDRGP4 $373 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 626 +;626: } +line 627 +;627: return; +ADDRGP4 $331 +JUMPV +LABELV $366 +line 631 +;628: } +;629: +;630: // get the latest command so we can know which commands are from previous map_restarts +;631: trap_GetUserCmd( current, &latestCmd ); +ADDRLP4 1388 +INDIRI4 +ARGI4 +ADDRLP4 1396 +ARGP4 +ADDRGP4 trap_GetUserCmd +CALLI4 +pop +line 637 +;632: +;633: // get the most recent information we have, even if +;634: // the server time is beyond our current cg.time, +;635: // because predicted player positions are going to +;636: // be ahead of everything else anyway +;637: if ( cg.nextSnap && !cg.nextFrameTeleport && !cg.thisFrameTeleport ) { +ADDRGP4 cg+40 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $374 +ADDRLP4 1476 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+56 +INDIRI4 +ADDRLP4 1476 +INDIRI4 +NEI4 $374 +ADDRGP4 cg+52 +INDIRI4 +ADDRLP4 1476 +INDIRI4 +NEI4 $374 +line 638 +;638: cg.predictedPlayerState = cg.nextSnap->ps; +ADDRGP4 cg+96 +ADDRGP4 cg+40 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRB +ASGNB 1380 +line 639 +;639: cg.physicsTime = cg.nextSnap->serverTime; +ADDRGP4 cg+72 +ADDRGP4 cg+40 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +line 640 +;640: } else { +ADDRGP4 $375 +JUMPV +LABELV $374 +line 641 +;641: cg.predictedPlayerState = cg.snap->ps; +ADDRGP4 cg+96 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRB +ASGNB 1380 +line 642 +;642: cg.physicsTime = cg.snap->serverTime; +ADDRGP4 cg+72 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +line 643 +;643: } +LABELV $375 +line 645 +;644: +;645: if ( pmove_msec.integer < 8 ) { +ADDRGP4 pmove_msec+12 +INDIRI4 +CNSTI4 8 +GEI4 $387 +line 646 +;646: trap_Cvar_Set("pmove_msec", "8"); +ADDRGP4 $390 +ARGP4 +ADDRGP4 $391 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 647 +;647: } +ADDRGP4 $388 +JUMPV +LABELV $387 +line 648 +;648: else if (pmove_msec.integer > 33) { +ADDRGP4 pmove_msec+12 +INDIRI4 +CNSTI4 33 +LEI4 $392 +line 649 +;649: trap_Cvar_Set("pmove_msec", "33"); +ADDRGP4 $390 +ARGP4 +ADDRGP4 $395 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 650 +;650: } +LABELV $392 +LABELV $388 +line 652 +;651: +;652: cg_pmove.pmove_fixed = pmove_fixed.integer;// | cg_pmove_fixed.integer; +ADDRGP4 cg_pmove+232 +ADDRGP4 pmove_fixed+12 +INDIRI4 +ASGNI4 +line 653 +;653: cg_pmove.pmove_msec = pmove_msec.integer; +ADDRGP4 cg_pmove+236 +ADDRGP4 pmove_msec+12 +INDIRI4 +ASGNI4 +line 656 +;654: +;655: // run cmds +;656: moved = qfalse; +ADDRLP4 1392 +CNSTI4 0 +ASGNI4 +line 657 +;657: for ( cmdNum = current - CMD_BACKUP + 1 ; cmdNum <= current ; cmdNum++ ) { +ADDRLP4 4 +ADDRLP4 1388 +INDIRI4 +CNSTI4 64 +SUBI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRGP4 $403 +JUMPV +LABELV $400 +line 659 +;658: // get the command +;659: trap_GetUserCmd( cmdNum, &cg_pmove.cmd ); +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 cg_pmove+4 +ARGP4 +ADDRGP4 trap_GetUserCmd +CALLI4 +pop +line 661 +;660: +;661: if ( cg_pmove.pmove_fixed ) { +ADDRGP4 cg_pmove+232 +INDIRI4 +CNSTI4 0 +EQI4 $405 +line 662 +;662: PM_UpdateViewAngles( cg_pmove.ps, &cg_pmove.cmd ); +ADDRGP4 cg_pmove +INDIRP4 +ARGP4 +ADDRGP4 cg_pmove+4 +ARGP4 +ADDRGP4 PM_UpdateViewAngles +CALLV +pop +line 663 +;663: } +LABELV $405 +line 666 +;664: +;665: // don't do anything if the time is before the snapshot player time +;666: if ( cg_pmove.cmd.serverTime <= cg.predictedPlayerState.commandTime ) { +ADDRGP4 cg_pmove+4 +INDIRI4 +ADDRGP4 cg+96 +INDIRI4 +GTI4 $409 +line 667 +;667: continue; +ADDRGP4 $401 +JUMPV +LABELV $409 +line 671 +;668: } +;669: +;670: // don't do anything if the command was from a previous map_restart +;671: if ( cg_pmove.cmd.serverTime > latestCmd.serverTime ) { +ADDRGP4 cg_pmove+4 +INDIRI4 +ADDRLP4 1396 +INDIRI4 +LEI4 $413 +line 672 +;672: continue; +ADDRGP4 $401 +JUMPV +LABELV $413 +line 680 +;673: } +;674: +;675: // check for a prediction error from last frame +;676: // on a lan, this will often be the exact value +;677: // from the snapshot, but on a wan we will have +;678: // to predict several commands to get to the point +;679: // we want to compare +;680: if ( cg.predictedPlayerState.commandTime == oldPlayerState.commandTime ) { +ADDRGP4 cg+96 +INDIRI4 +ADDRLP4 8 +INDIRI4 +NEI4 $416 +line 684 +;681: vec3_t delta; +;682: float len; +;683: +;684: if ( cg.thisFrameTeleport ) { +ADDRGP4 cg+52 +INDIRI4 +CNSTI4 0 +EQI4 $419 +line 686 +;685: // a teleport will not cause an error decay +;686: VectorClear( cg.predictedError ); +ADDRLP4 1496 +CNSTF4 0 +ASGNF4 +ADDRGP4 cg+3404+8 +ADDRLP4 1496 +INDIRF4 +ASGNF4 +ADDRGP4 cg+3404+4 +ADDRLP4 1496 +INDIRF4 +ASGNF4 +ADDRGP4 cg+3404 +ADDRLP4 1496 +INDIRF4 +ASGNF4 +line 687 +;687: if ( cg_showmiss.integer ) { +ADDRGP4 cg_showmiss+12 +INDIRI4 +CNSTI4 0 +EQI4 $427 +line 688 +;688: CG_Printf( "PredictionTeleport\n" ); +ADDRGP4 $430 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 689 +;689: } +LABELV $427 +line 690 +;690: cg.thisFrameTeleport = qfalse; +ADDRGP4 cg+52 +CNSTI4 0 +ASGNI4 +line 691 +;691: } else { +ADDRGP4 $420 +JUMPV +LABELV $419 +line 693 +;692: vec3_t adjusted; +;693: CG_AdjustPositionForMover( cg.predictedPlayerState.origin, +ADDRGP4 cg+96+20 +ARGP4 +ADDRGP4 cg+96+84 +INDIRI4 +ARGI4 +ADDRGP4 cg+72 +INDIRI4 +ARGI4 +ADDRGP4 cg+68 +INDIRI4 +ARGI4 +ADDRLP4 1496 +ARGP4 +ADDRGP4 CG_AdjustPositionForMover +CALLV +pop +line 696 +;694: cg.predictedPlayerState.groundEntityNum, cg.physicsTime, cg.oldTime, adjusted ); +;695: +;696: if ( cg_showmiss.integer ) { +ADDRGP4 cg_showmiss+12 +INDIRI4 +CNSTI4 0 +EQI4 $438 +line 697 +;697: if (!VectorCompare( oldPlayerState.origin, adjusted )) { +ADDRLP4 8+20 +ARGP4 +ADDRLP4 1496 +ARGP4 +ADDRLP4 1508 +ADDRGP4 VectorCompare +CALLI4 +ASGNI4 +ADDRLP4 1508 +INDIRI4 +CNSTI4 0 +NEI4 $441 +line 698 +;698: CG_Printf("prediction error\n"); +ADDRGP4 $444 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 699 +;699: } +LABELV $441 +line 700 +;700: } +LABELV $438 +line 701 +;701: VectorSubtract( oldPlayerState.origin, adjusted, delta ); +ADDRLP4 1480 +ADDRLP4 8+20 +INDIRF4 +ADDRLP4 1496 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1480+4 +ADDRLP4 8+20+4 +INDIRF4 +ADDRLP4 1496+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1480+8 +ADDRLP4 8+20+8 +INDIRF4 +ADDRLP4 1496+8 +INDIRF4 +SUBF4 +ASGNF4 +line 702 +;702: len = VectorLength( delta ); +ADDRLP4 1480 +ARGP4 +ADDRLP4 1508 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 1492 +ADDRLP4 1508 +INDIRF4 +ASGNF4 +line 703 +;703: if ( len > 0.1 ) { +ADDRLP4 1492 +INDIRF4 +CNSTF4 1036831949 +LEF4 $454 +line 704 +;704: if ( cg_showmiss.integer ) { +ADDRGP4 cg_showmiss+12 +INDIRI4 +CNSTI4 0 +EQI4 $456 +line 705 +;705: CG_Printf("Prediction miss: %f\n", len); +ADDRGP4 $459 +ARGP4 +ADDRLP4 1492 +INDIRF4 +ARGF4 +ADDRGP4 CG_Printf +CALLV +pop +line 706 +;706: } +LABELV $456 +line 707 +;707: if ( cg_errorDecay.integer ) { +ADDRGP4 cg_errorDecay+12 +INDIRI4 +CNSTI4 0 +EQI4 $460 +line 711 +;708: int t; +;709: float f; +;710: +;711: t = cg.time - cg.predictedErrorTime; +ADDRLP4 1516 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+3400 +INDIRI4 +SUBI4 +ASGNI4 +line 712 +;712: f = ( cg_errorDecay.value - t ) / cg_errorDecay.value; +ADDRLP4 1512 +ADDRGP4 cg_errorDecay+8 +INDIRF4 +ADDRLP4 1516 +INDIRI4 +CVIF4 4 +SUBF4 +ADDRGP4 cg_errorDecay+8 +INDIRF4 +DIVF4 +ASGNF4 +line 713 +;713: if ( f < 0 ) { +ADDRLP4 1512 +INDIRF4 +CNSTF4 0 +GEF4 $467 +line 714 +;714: f = 0; +ADDRLP4 1512 +CNSTF4 0 +ASGNF4 +line 715 +;715: } +LABELV $467 +line 716 +;716: if ( f > 0 && cg_showmiss.integer ) { +ADDRLP4 1512 +INDIRF4 +CNSTF4 0 +LEF4 $469 +ADDRGP4 cg_showmiss+12 +INDIRI4 +CNSTI4 0 +EQI4 $469 +line 717 +;717: CG_Printf("Double prediction decay: %f\n", f); +ADDRGP4 $472 +ARGP4 +ADDRLP4 1512 +INDIRF4 +ARGF4 +ADDRGP4 CG_Printf +CALLV +pop +line 718 +;718: } +LABELV $469 +line 719 +;719: VectorScale( cg.predictedError, f, cg.predictedError ); +ADDRGP4 cg+3404 +ADDRGP4 cg+3404 +INDIRF4 +ADDRLP4 1512 +INDIRF4 +MULF4 +ASGNF4 +ADDRGP4 cg+3404+4 +ADDRGP4 cg+3404+4 +INDIRF4 +ADDRLP4 1512 +INDIRF4 +MULF4 +ASGNF4 +ADDRGP4 cg+3404+8 +ADDRGP4 cg+3404+8 +INDIRF4 +ADDRLP4 1512 +INDIRF4 +MULF4 +ASGNF4 +line 720 +;720: } else { +ADDRGP4 $461 +JUMPV +LABELV $460 +line 721 +;721: VectorClear( cg.predictedError ); +ADDRLP4 1512 +CNSTF4 0 +ASGNF4 +ADDRGP4 cg+3404+8 +ADDRLP4 1512 +INDIRF4 +ASGNF4 +ADDRGP4 cg+3404+4 +ADDRLP4 1512 +INDIRF4 +ASGNF4 +ADDRGP4 cg+3404 +ADDRLP4 1512 +INDIRF4 +ASGNF4 +line 722 +;722: } +LABELV $461 +line 723 +;723: VectorAdd( delta, cg.predictedError, cg.predictedError ); +ADDRGP4 cg+3404 +ADDRLP4 1480 +INDIRF4 +ADDRGP4 cg+3404 +INDIRF4 +ADDF4 +ASGNF4 +ADDRGP4 cg+3404+4 +ADDRLP4 1480+4 +INDIRF4 +ADDRGP4 cg+3404+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRGP4 cg+3404+8 +ADDRLP4 1480+8 +INDIRF4 +ADDRGP4 cg+3404+8 +INDIRF4 +ADDF4 +ASGNF4 +line 724 +;724: cg.predictedErrorTime = cg.oldTime; +ADDRGP4 cg+3400 +ADDRGP4 cg+68 +INDIRI4 +ASGNI4 +line 725 +;725: } +LABELV $454 +line 726 +;726: } +LABELV $420 +line 727 +;727: } +LABELV $416 +line 729 +;728: +;729: if ( cg_pmove.pmove_fixed ) { +ADDRGP4 cg_pmove+232 +INDIRI4 +CNSTI4 0 +EQI4 $502 +line 730 +;730: cg_pmove.cmd.serverTime = ((cg_pmove.cmd.serverTime + pmove_msec.integer-1) / pmove_msec.integer) * pmove_msec.integer; +ADDRGP4 cg_pmove+4 +ADDRGP4 cg_pmove+4 +INDIRI4 +ADDRGP4 pmove_msec+12 +INDIRI4 +ADDI4 +CNSTI4 1 +SUBI4 +ADDRGP4 pmove_msec+12 +INDIRI4 +DIVI4 +ADDRGP4 pmove_msec+12 +INDIRI4 +MULI4 +ASGNI4 +line 731 +;731: } +LABELV $502 +line 733 +;732: +;733: cg_pmove.animations = bgGlobalAnimations; +ADDRGP4 cg_pmove+224 +ADDRGP4 bgGlobalAnimations +ASGNP4 +line 735 +;734: +;735: cg_pmove.gametype = cgs.gametype; +ADDRGP4 cg_pmove+220 +ADDRGP4 cgs+32960 +INDIRI4 +ASGNI4 +line 737 +;736: +;737: for ( i = 0 ; i < MAX_CLIENTS ; i++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $513 +line 738 +;738: { +line 739 +;739: memset(&cgSendPS[i], 0, sizeof(cgSendPS[i])); +ADDRLP4 1480 +CNSTI4 1380 +ASGNI4 +ADDRLP4 1480 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgSendPS +ADDP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 1480 +INDIRI4 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 740 +;740: CG_EntityStateToPlayerState(&cg_entities[i].currentState, &cgSendPS[i]); +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +CNSTI4 1380 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgSendPS +ADDP4 +ARGP4 +ADDRGP4 CG_EntityStateToPlayerState +CALLV +pop +line 741 +;741: cg_pmove.bgClients[i] = &cgSendPS[i]; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg_pmove+248 +ADDP4 +CNSTI4 1380 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgSendPS +ADDP4 +ASGNP4 +line 742 +;742: } +LABELV $514 +line 737 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +LTI4 $513 +line 744 +;743: +;744: if (cg.snap && cg.snap->ps.saberLockTime > cg.time) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $518 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 568 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $518 +line 745 +;745: { +line 746 +;746: centity_t *blockOpp = &cg_entities[cg.snap->ps.saberLockEnemy]; +ADDRLP4 1480 +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 572 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 748 +;747: +;748: if (blockOpp) +ADDRLP4 1480 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $524 +line 749 +;749: { +line 752 +;750: vec3_t lockDir, lockAng; +;751: +;752: VectorSubtract( blockOpp->lerpOrigin, cg.snap->ps.origin, lockDir ); +ADDRLP4 1484 +ADDRLP4 1480 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1484+4 +ADDRLP4 1480 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1484+8 +ADDRLP4 1480 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 754 +;753: //lockAng[YAW] = vectoyaw( defDir ); +;754: vectoangles(lockDir, lockAng); +ADDRLP4 1484 +ARGP4 +ADDRLP4 1496 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 756 +;755: +;756: VectorCopy(lockAng, cg_pmove.ps->viewangles); +ADDRGP4 cg_pmove +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRLP4 1496 +INDIRB +ASGNB 12 +line 757 +;757: } +LABELV $524 +line 758 +;758: } +LABELV $518 +line 760 +;759: +;760: Pmove (&cg_pmove); +ADDRGP4 cg_pmove +ARGP4 +ADDRGP4 Pmove +CALLV +pop +line 762 +;761: +;762: for ( i = 0 ; i < MAX_CLIENTS ; i++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $531 +line 763 +;763: { +line 764 +;764: cg_entities[i].currentState.torsoAnim = cgSendPS[i].torsoAnim; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+284 +ADDP4 +CNSTI4 1380 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgSendPS+100 +ADDP4 +INDIRI4 +ASGNI4 +line 765 +;765: cg_entities[i].currentState.legsAnim = cgSendPS[i].legsAnim; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+280 +ADDP4 +CNSTI4 1380 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgSendPS+92 +ADDP4 +INDIRI4 +ASGNI4 +line 766 +;766: cg_entities[i].currentState.forceFrame = cgSendPS[i].saberLockFrame; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+288 +ADDP4 +CNSTI4 1380 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgSendPS+532 +ADDP4 +INDIRI4 +ASGNI4 +line 767 +;767: cg_entities[i].currentState.saberMove = cgSendPS[i].saberMove; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+236 +ADDP4 +CNSTI4 1380 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgSendPS+512 +ADDP4 +INDIRI4 +ASGNI4 +line 768 +;768: } +LABELV $532 +line 762 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +LTI4 $531 +line 770 +;769: +;770: moved = qtrue; +ADDRLP4 1392 +CNSTI4 1 +ASGNI4 +line 773 +;771: +;772: // add push trigger movement effects +;773: CG_TouchTriggerPrediction(); +ADDRGP4 CG_TouchTriggerPrediction +CALLV +pop +line 777 +;774: +;775: // check for predictable events that changed from previous predictions +;776: //CG_CheckChangedPredictableEvents(&cg.predictedPlayerState); +;777: } +LABELV $401 +line 657 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $403 +ADDRLP4 4 +INDIRI4 +ADDRLP4 1388 +INDIRI4 +LEI4 $400 +line 779 +;778: +;779: if ( cg_showmiss.integer > 1 ) { +ADDRGP4 cg_showmiss+12 +INDIRI4 +CNSTI4 1 +LEI4 $543 +line 780 +;780: CG_Printf( "[%i : %i] ", cg_pmove.cmd.serverTime, cg.time ); +ADDRGP4 $546 +ARGP4 +ADDRGP4 cg_pmove+4 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 CG_Printf +CALLV +pop +line 781 +;781: } +LABELV $543 +line 783 +;782: +;783: if ( !moved ) { +ADDRLP4 1392 +INDIRI4 +CNSTI4 0 +NEI4 $549 +line 784 +;784: if ( cg_showmiss.integer ) { +ADDRGP4 cg_showmiss+12 +INDIRI4 +CNSTI4 0 +EQI4 $331 +line 785 +;785: CG_Printf( "not moved\n" ); +ADDRGP4 $554 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 786 +;786: } +line 787 +;787: return; +ADDRGP4 $331 +JUMPV +LABELV $549 +line 791 +;788: } +;789: +;790: // adjust for the movement of the groundentity +;791: CG_AdjustPositionForMover( cg.predictedPlayerState.origin, +ADDRGP4 cg+96+20 +ARGP4 +ADDRGP4 cg+96+84 +INDIRI4 +ARGI4 +ADDRGP4 cg+72 +INDIRI4 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cg+96+20 +ARGP4 +ADDRGP4 CG_AdjustPositionForMover +CALLV +pop +line 795 +;792: cg.predictedPlayerState.groundEntityNum, +;793: cg.physicsTime, cg.time, cg.predictedPlayerState.origin ); +;794: +;795: if ( cg_showmiss.integer ) { +ADDRGP4 cg_showmiss+12 +INDIRI4 +CNSTI4 0 +EQI4 $563 +line 796 +;796: if (cg.predictedPlayerState.eventSequence > oldPlayerState.eventSequence + MAX_PS_EVENTS) { +ADDRGP4 cg+96+112 +INDIRI4 +ADDRLP4 8+112 +INDIRI4 +CNSTI4 2 +ADDI4 +LEI4 $566 +line 797 +;797: CG_Printf("WARNING: dropped event\n"); +ADDRGP4 $571 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 798 +;798: } +LABELV $566 +line 799 +;799: } +LABELV $563 +line 802 +;800: +;801: // fire events and other transition triggered things +;802: CG_TransitionPlayerState( &cg.predictedPlayerState, &oldPlayerState ); +ADDRGP4 cg+96 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRGP4 CG_TransitionPlayerState +CALLV +pop +line 804 +;803: +;804: if ( cg_showmiss.integer ) { +ADDRGP4 cg_showmiss+12 +INDIRI4 +CNSTI4 0 +EQI4 $573 +line 805 +;805: if (cg.eventSequence > cg.predictedPlayerState.eventSequence) { +ADDRGP4 cg+3416 +INDIRI4 +ADDRGP4 cg+96+112 +INDIRI4 +LEI4 $576 +line 806 +;806: CG_Printf("WARNING: double event\n"); +ADDRGP4 $581 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 807 +;807: cg.eventSequence = cg.predictedPlayerState.eventSequence; +ADDRGP4 cg+3416 +ADDRGP4 cg+96+112 +INDIRI4 +ASGNI4 +line 808 +;808: } +LABELV $576 +line 809 +;809: } +LABELV $573 +line 810 +;810:} +LABELV $331 +endproc CG_PredictPlayerState 1520 20 +bss +export cgSendPS +align 4 +LABELV cgSendPS +skip 44160 +align 4 +LABELV cg_triggerEntities +skip 1024 +align 4 +LABELV cg_numTriggerEntities +skip 4 +align 4 +LABELV cg_solidEntities +skip 1024 +align 4 +LABELV cg_numSolidEntities +skip 4 +align 4 +LABELV cg_pmove +skip 380 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $581 +char 1 87 +char 1 65 +char 1 82 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 58 +char 1 32 +char 1 100 +char 1 111 +char 1 117 +char 1 98 +char 1 108 +char 1 101 +char 1 32 +char 1 101 +char 1 118 +char 1 101 +char 1 110 +char 1 116 +char 1 10 +char 1 0 +align 1 +LABELV $571 +char 1 87 +char 1 65 +char 1 82 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 58 +char 1 32 +char 1 100 +char 1 114 +char 1 111 +char 1 112 +char 1 112 +char 1 101 +char 1 100 +char 1 32 +char 1 101 +char 1 118 +char 1 101 +char 1 110 +char 1 116 +char 1 10 +char 1 0 +align 1 +LABELV $554 +char 1 110 +char 1 111 +char 1 116 +char 1 32 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 100 +char 1 10 +char 1 0 +align 1 +LABELV $546 +char 1 91 +char 1 37 +char 1 105 +char 1 32 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 93 +char 1 32 +char 1 0 +align 1 +LABELV $472 +char 1 68 +char 1 111 +char 1 117 +char 1 98 +char 1 108 +char 1 101 +char 1 32 +char 1 112 +char 1 114 +char 1 101 +char 1 100 +char 1 105 +char 1 99 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 100 +char 1 101 +char 1 99 +char 1 97 +char 1 121 +char 1 58 +char 1 32 +char 1 37 +char 1 102 +char 1 10 +char 1 0 +align 1 +LABELV $459 +char 1 80 +char 1 114 +char 1 101 +char 1 100 +char 1 105 +char 1 99 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 109 +char 1 105 +char 1 115 +char 1 115 +char 1 58 +char 1 32 +char 1 37 +char 1 102 +char 1 10 +char 1 0 +align 1 +LABELV $444 +char 1 112 +char 1 114 +char 1 101 +char 1 100 +char 1 105 +char 1 99 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 32 +char 1 101 +char 1 114 +char 1 114 +char 1 111 +char 1 114 +char 1 10 +char 1 0 +align 1 +LABELV $430 +char 1 80 +char 1 114 +char 1 101 +char 1 100 +char 1 105 +char 1 99 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 84 +char 1 101 +char 1 108 +char 1 101 +char 1 112 +char 1 111 +char 1 114 +char 1 116 +char 1 10 +char 1 0 +align 1 +LABELV $395 +char 1 51 +char 1 51 +char 1 0 +align 1 +LABELV $391 +char 1 56 +char 1 0 +align 1 +LABELV $390 +char 1 112 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 95 +char 1 109 +char 1 115 +char 1 101 +char 1 99 +char 1 0 +align 1 +LABELV $373 +char 1 101 +char 1 120 +char 1 99 +char 1 101 +char 1 101 +char 1 100 +char 1 101 +char 1 100 +char 1 32 +char 1 80 +char 1 65 +char 1 67 +char 1 75 +char 1 69 +char 1 84 +char 1 95 +char 1 66 +char 1 65 +char 1 67 +char 1 75 +char 1 85 +char 1 80 +char 1 32 +char 1 111 +char 1 110 +char 1 32 +char 1 99 +char 1 111 +char 1 109 +char 1 109 +char 1 97 +char 1 110 +char 1 100 +char 1 115 +char 1 10 +char 1 0 diff --git a/code/cgame/vm/cg_saga.asm b/code/cgame/vm/cg_saga.asm new file mode 100644 index 0000000..e3bfe96 --- /dev/null +++ b/code/cgame/vm/cg_saga.asm @@ -0,0 +1,3260 @@ +export CGSagaGetValueGroup +code +proc CGSagaGetValueGroup 44 8 +file "../cg_saga.c" +line 15 +;1:#include "cg_local.h" +;2:#include "bg_saga.h" +;3: +;4:#define DEFAULT_WIN_OBJECTIVE "sound/chars/kyle/prototype/personal.mp3" +;5:#define DEFAULT_LOSE_OBJECTIVE "sound/chars/kyle/prototype/isntworking.mp3" +;6: +;7:#define DEFAULT_WIN_ROUND "sound/chars/kyle/prototype/personal.mp3" +;8:#define DEFAULT_LOSE_ROUND "sound/chars/kyle/prototype/isntworking.mp3" +;9: +;10:char cg_saga_info[MAX_SAGA_INFO_SIZE]; +;11:int cg_saga_valid; +;12: +;13://The following two functions are very cheap parsing functions +;14:int CGSagaGetValueGroup(char *buf, char *group, char *outbuf) +;15:{ +line 21 +;16: char *place, *placesecond; +;17: int iplace; +;18: int failure; +;19: int i; +;20: int startpoint, startletter; +;21: int subg = 0; +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +line 23 +;22: +;23: i = 0; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 25 +;24: +;25: iplace = 0; +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +line 27 +;26: +;27: place = strstr(buf, group); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRGP4 strstr +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 32 +INDIRP4 +ASGNP4 +line 29 +;28: +;29: if (!place) +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $121 +line 30 +;30: { +line 31 +;31: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $120 +JUMPV +LABELV $121 +line 34 +;32: } +;33: +;34: startpoint = place - buf + strlen(group) + 1; +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDRLP4 36 +INDIRI4 +ADDI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 35 +;35: startletter = (place - buf) - 1; +ADDRLP4 20 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 37 +;36: +;37: failure = 0; +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRGP4 $124 +JUMPV +LABELV $123 +line 40 +;38: +;39: while (buf[startpoint+1] != '{' || buf[startletter] != '\n') +;40: { +line 41 +;41: placesecond = strstr(place+1, group); +ADDRLP4 8 +INDIRP4 +CNSTI4 1 +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 strstr +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 40 +INDIRP4 +ASGNP4 +line 43 +;42: +;43: if (placesecond) +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $126 +line 44 +;44: { +line 45 +;45: startpoint += (placesecond - place); +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDI4 +ASGNI4 +line 46 +;46: startletter += (placesecond - place); +ADDRLP4 20 +ADDRLP4 20 +INDIRI4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDI4 +ASGNI4 +line 47 +;47: place = placesecond; +ADDRLP4 8 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 48 +;48: } +ADDRGP4 $127 +JUMPV +LABELV $126 +line 50 +;49: else +;50: { +line 51 +;51: failure = 1; +ADDRLP4 24 +CNSTI4 1 +ASGNI4 +line 52 +;52: break; +ADDRGP4 $125 +JUMPV +LABELV $127 +line 54 +;53: } +;54: } +LABELV $124 +line 39 +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ADDRLP4 40 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 123 +NEI4 $123 +ADDRLP4 20 +INDIRI4 +ADDRLP4 40 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 10 +NEI4 $123 +LABELV $125 +line 56 +;55: +;56: if (failure) +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $131 +line 57 +;57: { +line 58 +;58: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $120 +JUMPV +LABELV $130 +line 65 +;59: } +;60: +;61: //we have found the proper group name if we made it here, so find the opening brace and read into the outbuf +;62: //until hitting the end brace +;63: +;64: while (buf[startpoint] != '{') +;65: { +line 66 +;66: startpoint++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 67 +;67: } +LABELV $131 +line 64 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 123 +NEI4 $130 +line 69 +;68: +;69: startpoint++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRGP4 $134 +JUMPV +LABELV $133 +line 72 +;70: +;71: while (buf[startpoint] != '}' || subg) +;72: { +line 73 +;73: if (buf[startpoint] == '{') +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 123 +NEI4 $136 +line 74 +;74: { +line 75 +;75: subg++; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 76 +;76: } +ADDRGP4 $137 +JUMPV +LABELV $136 +line 77 +;77: else if (buf[startpoint] == '}') +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 125 +NEI4 $138 +line 78 +;78: { +line 79 +;79: subg--; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 80 +;80: } +LABELV $138 +LABELV $137 +line 81 +;81: outbuf[i] = buf[startpoint]; +ADDRLP4 12 +INDIRI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 82 +;82: i++; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 83 +;83: startpoint++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 84 +;84: } +LABELV $134 +line 71 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 125 +NEI4 $133 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $133 +line 85 +;85: outbuf[i] = '\0'; +ADDRLP4 12 +INDIRI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 87 +;86: +;87: return 1; +CNSTI4 1 +RETI4 +LABELV $120 +endproc CGSagaGetValueGroup 44 8 +export CGSagaGetPairedValue +proc CGSagaGetPairedValue 64 8 +line 91 +;88:} +;89: +;90:int CGSagaGetPairedValue(char *buf, char *key, char *outbuf, int inquotes) +;91:{ +line 96 +;92: char *place, *placesecond; +;93: int startpoint, startletter; +;94: int i, found; +;95: +;96: if (!buf || !key || !outbuf) +ADDRLP4 24 +CNSTU4 0 +ASGNU4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 24 +INDIRU4 +EQU4 $144 +ADDRFP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 24 +INDIRU4 +EQU4 $144 +ADDRFP4 8 +INDIRP4 +CVPU4 4 +ADDRLP4 24 +INDIRU4 +NEU4 $141 +LABELV $144 +line 97 +;97: { +line 98 +;98: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $140 +JUMPV +LABELV $141 +line 101 +;99: } +;100: +;101: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $146 +JUMPV +LABELV $145 +line 104 +;102: +;103: while (buf[i] && buf[i] != '\0') +;104: { +line 105 +;105: if (buf[i] == '/') +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 47 +NEI4 $148 +line 106 +;106: { +line 107 +;107: if (buf[i+1] && buf[i+1] != '\0' && buf[i+1] == '/') +ADDRLP4 28 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 32 +CNSTI4 0 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 32 +INDIRI4 +EQI4 $150 +ADDRLP4 28 +INDIRI4 +ADDRLP4 32 +INDIRI4 +EQI4 $150 +ADDRLP4 28 +INDIRI4 +CNSTI4 47 +NEI4 $150 +line 108 +;108: { +ADDRGP4 $153 +JUMPV +LABELV $152 +line 110 +;109: while (buf[i] != '\n') +;110: { +line 111 +;111: buf[i] = '/'; +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +CNSTI1 47 +ASGNI1 +line 112 +;112: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 113 +;113: } +LABELV $153 +line 109 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 10 +NEI4 $152 +line 114 +;114: } +LABELV $150 +line 115 +;115: } +LABELV $148 +line 116 +;116: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 117 +;117: } +LABELV $146 +line 103 +ADDRLP4 28 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 32 +CNSTI4 0 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 32 +INDIRI4 +EQI4 $155 +ADDRLP4 28 +INDIRI4 +ADDRLP4 32 +INDIRI4 +NEI4 $145 +LABELV $155 +line 119 +;118: +;119: place = strstr(buf, key); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 strstr +CALLP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 36 +INDIRP4 +ASGNP4 +line 121 +;120: +;121: if (!place) +ADDRLP4 12 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $156 +line 122 +;122: { +line 123 +;123: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $140 +JUMPV +LABELV $156 +line 126 +;124: } +;125: //tab == 9 +;126: startpoint = place - buf + strlen(key); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDRLP4 40 +INDIRI4 +ADDI4 +ASGNI4 +line 127 +;127: startletter = (place - buf) - 1; +ADDRLP4 8 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 129 +;128: +;129: found = 0; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRGP4 $159 +JUMPV +LABELV $158 +line 132 +;130: +;131: while (!found) +;132: { +line 133 +;133: if (startletter == 0 || !buf[startletter] || buf[startletter] == '\0' || buf[startletter] == 9 || buf[startletter] == ' ' || buf[startletter] == '\n') +ADDRLP4 48 +CNSTI4 0 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 48 +INDIRI4 +EQI4 $167 +ADDRLP4 52 +ADDRLP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 52 +INDIRI4 +ADDRLP4 48 +INDIRI4 +EQI4 $167 +ADDRLP4 52 +INDIRI4 +ADDRLP4 48 +INDIRI4 +EQI4 $167 +ADDRLP4 52 +INDIRI4 +CNSTI4 9 +EQI4 $167 +ADDRLP4 52 +INDIRI4 +CNSTI4 32 +EQI4 $167 +ADDRLP4 52 +INDIRI4 +CNSTI4 10 +NEI4 $161 +LABELV $167 +line 134 +;134: { +line 135 +;135: if (buf[startpoint] == '\0' || buf[startpoint] == 9 || buf[startpoint] == ' ' || buf[startpoint] == '\n') +ADDRLP4 56 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $172 +ADDRLP4 56 +INDIRI4 +CNSTI4 9 +EQI4 $172 +ADDRLP4 56 +INDIRI4 +CNSTI4 32 +EQI4 $172 +ADDRLP4 56 +INDIRI4 +CNSTI4 10 +NEI4 $168 +LABELV $172 +line 136 +;136: { +line 137 +;137: found = 1; +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +line 138 +;138: break; +ADDRGP4 $160 +JUMPV +LABELV $168 +line 140 +;139: } +;140: } +LABELV $161 +line 142 +;141: +;142: placesecond = strstr(place+1, key); +ADDRLP4 12 +INDIRP4 +CNSTI4 1 +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 56 +ADDRGP4 strstr +CALLP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 56 +INDIRP4 +ASGNP4 +line 144 +;143: +;144: if (placesecond) +ADDRLP4 16 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $173 +line 145 +;145: { +line 146 +;146: startpoint += placesecond - place; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 16 +INDIRP4 +CVPU4 4 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDI4 +ASGNI4 +line 147 +;147: startletter += placesecond - place; +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +ADDRLP4 16 +INDIRP4 +CVPU4 4 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDI4 +ASGNI4 +line 148 +;148: place = placesecond; +ADDRLP4 12 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 149 +;149: } +ADDRGP4 $174 +JUMPV +LABELV $173 +line 151 +;150: else +;151: { +line 152 +;152: place = NULL; +ADDRLP4 12 +CNSTP4 0 +ASGNP4 +line 153 +;153: break; +ADDRGP4 $160 +JUMPV +LABELV $174 +line 156 +;154: } +;155: +;156: } +LABELV $159 +line 131 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $158 +LABELV $160 +line 158 +;157: +;158: if (!found || !place || !buf[startpoint] || buf[startpoint] == '\0') +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ADDRLP4 44 +INDIRI4 +EQI4 $179 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $179 +ADDRLP4 48 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 44 +INDIRI4 +EQI4 $179 +ADDRLP4 48 +INDIRI4 +ADDRLP4 44 +INDIRI4 +NEI4 $181 +LABELV $179 +line 159 +;159: { +line 160 +;160: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $140 +JUMPV +LABELV $180 +line 164 +;161: } +;162: +;163: while (buf[startpoint] == ' ' || buf[startpoint] == 9 || buf[startpoint] == '\n') +;164: { +line 165 +;165: startpoint++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 166 +;166: } +LABELV $181 +line 163 +ADDRLP4 52 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 32 +EQI4 $180 +ADDRLP4 52 +INDIRI4 +CNSTI4 9 +EQI4 $180 +ADDRLP4 52 +INDIRI4 +CNSTI4 10 +EQI4 $180 +line 168 +;167: +;168: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 170 +;169: +;170: if (inquotes) +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $190 +line 171 +;171: { +ADDRGP4 $186 +JUMPV +LABELV $185 +line 173 +;172: while (buf[startpoint] && buf[startpoint] != '\"') +;173: { +line 174 +;174: startpoint++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 175 +;175: } +LABELV $186 +line 172 +ADDRLP4 56 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $188 +ADDRLP4 56 +INDIRI4 +CNSTI4 34 +NEI4 $185 +LABELV $188 +line 177 +;176: +;177: startpoint++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 178 +;178: } +ADDRGP4 $190 +JUMPV +LABELV $189 +line 181 +;179: +;180: while (buf[startpoint] && buf[startpoint] != '\0' && buf[startpoint] != '\n') +;181: { +line 182 +;182: outbuf[i] = buf[startpoint]; +ADDRLP4 0 +INDIRI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 183 +;183: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 184 +;184: startpoint++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 186 +;185: +;186: if (inquotes && buf[startpoint] == '\"') +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $192 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 34 +NEI4 $192 +line 187 +;187: { +line 188 +;188: break; +ADDRGP4 $191 +JUMPV +LABELV $192 +line 190 +;189: } +;190: } +LABELV $190 +line 180 +ADDRLP4 56 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 60 +CNSTI4 0 +ASGNI4 +ADDRLP4 56 +INDIRI4 +ADDRLP4 60 +INDIRI4 +EQI4 $195 +ADDRLP4 56 +INDIRI4 +ADDRLP4 60 +INDIRI4 +EQI4 $195 +ADDRLP4 56 +INDIRI4 +CNSTI4 10 +NEI4 $189 +LABELV $195 +LABELV $191 +line 192 +;191: +;192: outbuf[i] = '\0'; +ADDRLP4 0 +INDIRI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 194 +;193: +;194: return 1; +CNSTI4 1 +RETI4 +LABELV $140 +endproc CGSagaGetPairedValue 64 8 +export CG_InitSagaMode +proc CG_InitSagaMode 544 16 +line 198 +;195:} +;196: +;197:void CG_InitSagaMode(void) +;198:{ +line 200 +;199: char levelname[512]; +;200: int len = 0; +ADDRLP4 516 +CNSTI4 0 +ASGNI4 +line 201 +;201: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 204 +;202: fileHandle_t f; +;203: +;204: if (cgs.gametype != GT_SAGA) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 6 +EQI4 $197 +line 205 +;205: { +line 206 +;206: goto failure; +ADDRGP4 $200 +JUMPV +LABELV $197 +line 209 +;207: } +;208: +;209: Com_sprintf(levelname, sizeof(levelname), "%s\0", cgs.mapname); +ADDRLP4 4 +ARGP4 +CNSTI4 512 +ARGI4 +ADDRGP4 $201 +ARGP4 +ADDRGP4 cgs+33008 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 211 +;210: +;211: i = strlen(levelname)-1; +ADDRLP4 4 +ARGP4 +ADDRLP4 524 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 524 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRGP4 $204 +JUMPV +LABELV $203 +line 214 +;212: +;213: while (i > 0 && levelname[i] && levelname[i] != '.') +;214: { +line 215 +;215: i--; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 216 +;216: } +LABELV $204 +line 213 +ADDRLP4 532 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 532 +INDIRI4 +LEI4 $207 +ADDRLP4 536 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 536 +INDIRI4 +ADDRLP4 532 +INDIRI4 +EQI4 $207 +ADDRLP4 536 +INDIRI4 +CNSTI4 46 +NEI4 $203 +LABELV $207 +line 218 +;217: +;218: if (!i) +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $208 +line 219 +;219: { +line 220 +;220: goto failure; +ADDRGP4 $200 +JUMPV +LABELV $208 +line 223 +;221: } +;222: +;223: levelname[i] = '\0'; //kill the ".bsp" +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 225 +;224: +;225: Com_sprintf(levelname, sizeof(levelname), "%s.saga\0", levelname); +ADDRLP4 4 +ARGP4 +CNSTI4 512 +ARGI4 +ADDRGP4 $210 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 227 +;226: +;227: if (!levelname || !levelname[0]) +ADDRLP4 4 +CVPU4 4 +CNSTU4 0 +EQU4 $213 +ADDRLP4 4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $211 +LABELV $213 +line 228 +;228: { +line 229 +;229: goto failure; +ADDRGP4 $200 +JUMPV +LABELV $211 +line 232 +;230: } +;231: +;232: len = trap_FS_FOpenFile(levelname, &f, FS_READ); +ADDRLP4 4 +ARGP4 +ADDRLP4 520 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 540 +ADDRGP4 trap_FS_FOpenFile +CALLI4 +ASGNI4 +ADDRLP4 516 +ADDRLP4 540 +INDIRI4 +ASGNI4 +line 234 +;233: +;234: if (!f || len >= MAX_SAGA_INFO_SIZE) +ADDRLP4 520 +INDIRI4 +CNSTI4 0 +EQI4 $216 +ADDRLP4 516 +INDIRI4 +CNSTI4 8192 +LTI4 $214 +LABELV $216 +line 235 +;235: { +line 236 +;236: goto failure; +ADDRGP4 $200 +JUMPV +LABELV $214 +line 239 +;237: } +;238: +;239: trap_FS_Read(cg_saga_info, len, f); +ADDRGP4 cg_saga_info +ARGP4 +ADDRLP4 516 +INDIRI4 +ARGI4 +ADDRLP4 520 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_Read +CALLV +pop +line 241 +;240: +;241: cg_saga_valid = 1; +ADDRGP4 cg_saga_valid +CNSTI4 1 +ASGNI4 +line 243 +;242: +;243: return; +ADDRGP4 $196 +JUMPV +LABELV $200 +line 246 +;244: +;245:failure: +;246: cg_saga_valid = 0; +ADDRGP4 cg_saga_valid +CNSTI4 0 +ASGNI4 +line 247 +;247:} +LABELV $196 +endproc CG_InitSagaMode 544 16 +export CG_SagaRoundOver +proc CG_SagaRoundOver 10324 16 +line 250 +;248: +;249:void CG_SagaRoundOver(centity_t *ent, int won) +;250:{ +line 256 +;251: int myTeam; +;252: char teamstr[64]; +;253: char objectives[MAX_SAGA_INFO_SIZE]; +;254: char appstring[1024]; +;255: char soundstr[1024]; +;256: int success = 0; +ADDRLP4 8260 +CNSTI4 0 +ASGNI4 +line 258 +;257: +;258: if (!cg_saga_valid) +ADDRGP4 cg_saga_valid +INDIRI4 +CNSTI4 0 +NEI4 $218 +line 259 +;259: { +line 260 +;260: Com_Printf("ERROR: Saga data does not exist on client!\n"); +ADDRGP4 $220 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 261 +;261: return; +ADDRGP4 $217 +JUMPV +LABELV $218 +line 264 +;262: } +;263: +;264: if (!cg.snap) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $221 +line 265 +;265: { +line 266 +;266: return; //yikes +ADDRGP4 $217 +JUMPV +LABELV $221 +line 269 +;267: } +;268: +;269: myTeam = cg.snap->ps.persistant[PERS_TEAM]; +ADDRLP4 64 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +ASGNI4 +line 271 +;270: +;271: if (myTeam == TEAM_SPECTATOR) +ADDRLP4 64 +INDIRI4 +CNSTI4 3 +NEI4 $225 +line 272 +;272: { +line 273 +;273: return; +ADDRGP4 $217 +JUMPV +LABELV $225 +line 276 +;274: } +;275: +;276: if (myTeam == SAGATEAM_IMPERIAL) +ADDRLP4 64 +INDIRI4 +CNSTI4 1 +NEI4 $227 +line 277 +;277: { +line 278 +;278: Com_sprintf(teamstr, sizeof(teamstr), "Imperial"); +ADDRLP4 0 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $229 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 279 +;279: } +ADDRGP4 $228 +JUMPV +LABELV $227 +line 281 +;280: else +;281: { +line 282 +;282: Com_sprintf(teamstr, sizeof(teamstr), "Rebel"); +ADDRLP4 0 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $230 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 283 +;283: } +LABELV $228 +line 285 +;284: +;285: if (CGSagaGetValueGroup(cg_saga_info, teamstr, objectives)) +ADDRGP4 cg_saga_info +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 68 +ARGP4 +ADDRLP4 10312 +ADDRGP4 CGSagaGetValueGroup +CALLI4 +ASGNI4 +ADDRLP4 10312 +INDIRI4 +CNSTI4 0 +EQI4 $231 +line 286 +;286: { +line 287 +;287: if (won == myTeam) +ADDRFP4 4 +INDIRI4 +ADDRLP4 64 +INDIRI4 +NEI4 $233 +line 288 +;288: { +line 289 +;289: success = CGSagaGetPairedValue(objectives, "wonround", appstring, 1); +ADDRLP4 68 +ARGP4 +ADDRGP4 $235 +ARGP4 +ADDRLP4 8264 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 10316 +ADDRGP4 CGSagaGetPairedValue +CALLI4 +ASGNI4 +ADDRLP4 8260 +ADDRLP4 10316 +INDIRI4 +ASGNI4 +line 290 +;290: } +ADDRGP4 $234 +JUMPV +LABELV $233 +line 292 +;291: else +;292: { +line 293 +;293: success = CGSagaGetPairedValue(objectives, "lostround", appstring, 1); +ADDRLP4 68 +ARGP4 +ADDRGP4 $236 +ARGP4 +ADDRLP4 8264 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 10316 +ADDRGP4 CGSagaGetPairedValue +CALLI4 +ASGNI4 +ADDRLP4 8260 +ADDRLP4 10316 +INDIRI4 +ASGNI4 +line 294 +;294: } +LABELV $234 +line 296 +;295: +;296: if (success) +ADDRLP4 8260 +INDIRI4 +CNSTI4 0 +EQI4 $237 +line 297 +;297: { +line 298 +;298: Com_Printf("%s\n", appstring); +ADDRGP4 $239 +ARGP4 +ADDRLP4 8264 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 299 +;299: } +LABELV $237 +line 301 +;300: +;301: if (myTeam == won) +ADDRLP4 64 +INDIRI4 +ADDRFP4 4 +INDIRI4 +NEI4 $240 +line 302 +;302: { +line 303 +;303: Com_sprintf(teamstr, sizeof(teamstr), "roundover_sound_wewon"); +ADDRLP4 0 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $242 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 304 +;304: } +ADDRGP4 $241 +JUMPV +LABELV $240 +line 306 +;305: else +;306: { +line 307 +;307: Com_sprintf(teamstr, sizeof(teamstr), "roundover_sound_welost"); +ADDRLP4 0 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $243 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 308 +;308: } +LABELV $241 +line 310 +;309: +;310: if (CGSagaGetPairedValue(objectives, teamstr, appstring, 1)) +ADDRLP4 68 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 8264 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 10316 +ADDRGP4 CGSagaGetPairedValue +CALLI4 +ASGNI4 +ADDRLP4 10316 +INDIRI4 +CNSTI4 0 +EQI4 $244 +line 311 +;311: { +line 312 +;312: Com_sprintf(soundstr, sizeof(soundstr), appstring); +ADDRLP4 9288 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRLP4 8264 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 313 +;313: } +ADDRGP4 $245 +JUMPV +LABELV $244 +line 315 +;314: else +;315: { +line 316 +;316: if (myTeam != won) +ADDRLP4 64 +INDIRI4 +ADDRFP4 4 +INDIRI4 +EQI4 $246 +line 317 +;317: { +line 318 +;318: Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_LOSE_ROUND); +ADDRLP4 9288 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $248 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 319 +;319: } +ADDRGP4 $247 +JUMPV +LABELV $246 +line 321 +;320: else +;321: { +line 322 +;322: Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_WIN_ROUND); +ADDRLP4 9288 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $249 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 323 +;323: } +LABELV $247 +line 324 +;324: } +LABELV $245 +line 326 +;325: +;326: trap_S_StartLocalSound(trap_S_RegisterSound(soundstr), CHAN_ANNOUNCER); +ADDRLP4 9288 +ARGP4 +ADDRLP4 10320 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 10320 +INDIRI4 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 328 +;327: //Com_Printf("Play sound: %s\n", soundstr); +;328: } +LABELV $231 +line 329 +;329:} +LABELV $217 +endproc CG_SagaRoundOver 10324 16 +export CG_SagaObjectiveCompleted +proc CG_SagaObjectiveCompleted 18784 16 +line 332 +;330: +;331:void CG_SagaObjectiveCompleted(centity_t *ent, int won, int objectivenum) +;332:{ +line 340 +;333: int myTeam; +;334: char teamstr[64]; +;335: char objstr[256]; +;336: char objectives[MAX_SAGA_INFO_SIZE]; +;337: char foundobjective[MAX_SAGA_INFO_SIZE]; +;338: char appstring[1024]; +;339: char soundstr[1024]; +;340: int success = 0; +ADDRLP4 8524 +CNSTI4 0 +ASGNI4 +line 341 +;341: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 342 +;342: int i_r = 0; +ADDRLP4 8196 +CNSTI4 0 +ASGNI4 +line 344 +;343: +;344: if (!cg_saga_valid) +ADDRGP4 cg_saga_valid +INDIRI4 +CNSTI4 0 +NEI4 $251 +line 345 +;345: { +line 346 +;346: Com_Printf("ERROR: Saga data does not exist on client!\n"); +ADDRGP4 $220 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 347 +;347: return; +ADDRGP4 $250 +JUMPV +LABELV $251 +line 350 +;348: } +;349: +;350: if (!cg.snap) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $253 +line 351 +;351: { +line 352 +;352: return; //yikes +ADDRGP4 $250 +JUMPV +LABELV $253 +line 355 +;353: } +;354: +;355: myTeam = cg.snap->ps.persistant[PERS_TEAM]; +ADDRLP4 8264 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +ASGNI4 +line 357 +;356: +;357: if (myTeam == TEAM_SPECTATOR) +ADDRLP4 8264 +INDIRI4 +CNSTI4 3 +NEI4 $257 +line 358 +;358: { +line 359 +;359: return; +ADDRGP4 $250 +JUMPV +LABELV $257 +line 362 +;360: } +;361: +;362: if (won == SAGATEAM_IMPERIAL) +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +NEI4 $259 +line 363 +;363: { +line 364 +;364: Com_sprintf(teamstr, sizeof(teamstr), "Imperial"); +ADDRLP4 8200 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $229 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 365 +;365: } +ADDRGP4 $260 +JUMPV +LABELV $259 +line 367 +;366: else +;367: { +line 368 +;368: Com_sprintf(teamstr, sizeof(teamstr), "Rebel"); +ADDRLP4 8200 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $230 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 369 +;369: } +LABELV $260 +line 371 +;370: +;371: if (CGSagaGetValueGroup(cg_saga_info, teamstr, objectives)) +ADDRGP4 cg_saga_info +ARGP4 +ADDRLP4 8200 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 18768 +ADDRGP4 CGSagaGetValueGroup +CALLI4 +ASGNI4 +ADDRLP4 18768 +INDIRI4 +CNSTI4 0 +EQI4 $261 +line 372 +;372: { +line 373 +;373: Com_sprintf(objstr, sizeof(objstr), "Objective%i", objectivenum); +ADDRLP4 8268 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 $263 +ARGP4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRGP4 Com_sprintf +CALLV +pop +ADDRGP4 $265 +JUMPV +LABELV $264 +line 376 +;374: +;375: while (objectives[i]) +;376: { +line 377 +;377: if (objectives[i] != 9) +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 9 +EQI4 $267 +line 378 +;378: { +line 379 +;379: objectives[i_r] = objectives[i]; +ADDRLP4 8196 +INDIRI4 +ADDRLP4 4 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRI1 +ASGNI1 +line 380 +;380: i_r++; +ADDRLP4 8196 +ADDRLP4 8196 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 381 +;381: } +LABELV $267 +line 383 +;382: +;383: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 384 +;384: } +LABELV $265 +line 375 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $264 +line 385 +;385: objectives[i_r] = '\0'; +ADDRLP4 8196 +INDIRI4 +ADDRLP4 4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 387 +;386: +;387: if (CGSagaGetValueGroup(objectives, objstr, foundobjective)) +ADDRLP4 4 +ARGP4 +ADDRLP4 8268 +ARGP4 +ADDRLP4 8528 +ARGP4 +ADDRLP4 18772 +ADDRGP4 CGSagaGetValueGroup +CALLI4 +ASGNI4 +ADDRLP4 18772 +INDIRI4 +CNSTI4 0 +EQI4 $269 +line 388 +;388: { +line 389 +;389: if (myTeam == SAGATEAM_IMPERIAL) +ADDRLP4 8264 +INDIRI4 +CNSTI4 1 +NEI4 $271 +line 390 +;390: { +line 391 +;391: success = CGSagaGetPairedValue(foundobjective, "message_imperial", appstring, 1); +ADDRLP4 8528 +ARGP4 +ADDRGP4 $273 +ARGP4 +ADDRLP4 16720 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 18776 +ADDRGP4 CGSagaGetPairedValue +CALLI4 +ASGNI4 +ADDRLP4 8524 +ADDRLP4 18776 +INDIRI4 +ASGNI4 +line 392 +;392: } +ADDRGP4 $272 +JUMPV +LABELV $271 +line 394 +;393: else +;394: { +line 395 +;395: success = CGSagaGetPairedValue(foundobjective, "message_rebel", appstring, 1); +ADDRLP4 8528 +ARGP4 +ADDRGP4 $274 +ARGP4 +ADDRLP4 16720 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 18776 +ADDRGP4 CGSagaGetPairedValue +CALLI4 +ASGNI4 +ADDRLP4 8524 +ADDRLP4 18776 +INDIRI4 +ASGNI4 +line 396 +;396: } +LABELV $272 +line 398 +;397: +;398: if (success) +ADDRLP4 8524 +INDIRI4 +CNSTI4 0 +EQI4 $275 +line 399 +;399: { +line 400 +;400: Com_Printf("%s\n", appstring); +ADDRGP4 $239 +ARGP4 +ADDRLP4 16720 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 401 +;401: } +LABELV $275 +line 403 +;402: +;403: if (myTeam == SAGATEAM_IMPERIAL) +ADDRLP4 8264 +INDIRI4 +CNSTI4 1 +NEI4 $277 +line 404 +;404: { +line 405 +;405: Com_sprintf(teamstr, sizeof(teamstr), "sound_imperial"); +ADDRLP4 8200 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $279 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 406 +;406: } +ADDRGP4 $278 +JUMPV +LABELV $277 +line 408 +;407: else +;408: { +line 409 +;409: Com_sprintf(teamstr, sizeof(teamstr), "sound_rebel"); +ADDRLP4 8200 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $280 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 410 +;410: } +LABELV $278 +line 412 +;411: +;412: if (CGSagaGetPairedValue(foundobjective, teamstr, appstring, 1)) +ADDRLP4 8528 +ARGP4 +ADDRLP4 8200 +ARGP4 +ADDRLP4 16720 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 18776 +ADDRGP4 CGSagaGetPairedValue +CALLI4 +ASGNI4 +ADDRLP4 18776 +INDIRI4 +CNSTI4 0 +EQI4 $281 +line 413 +;413: { +line 414 +;414: Com_sprintf(soundstr, sizeof(soundstr), appstring); +ADDRLP4 17744 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRLP4 16720 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 415 +;415: } +ADDRGP4 $282 +JUMPV +LABELV $281 +line 417 +;416: else +;417: { +line 418 +;418: if (myTeam != won) +ADDRLP4 8264 +INDIRI4 +ADDRFP4 4 +INDIRI4 +EQI4 $283 +line 419 +;419: { +line 420 +;420: Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_LOSE_OBJECTIVE); +ADDRLP4 17744 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $248 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 421 +;421: } +ADDRGP4 $284 +JUMPV +LABELV $283 +line 423 +;422: else +;423: { +line 424 +;424: Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_WIN_OBJECTIVE); +ADDRLP4 17744 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $249 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 425 +;425: } +LABELV $284 +line 426 +;426: } +LABELV $282 +line 428 +;427: +;428: trap_S_StartLocalSound(trap_S_RegisterSound(soundstr), CHAN_ANNOUNCER); +ADDRLP4 17744 +ARGP4 +ADDRLP4 18780 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 18780 +INDIRI4 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 430 +;429: //Com_Printf("Play sound: %s\n", soundstr); +;430: } +LABELV $269 +line 431 +;431: } +LABELV $261 +line 432 +;432:} +LABELV $250 +endproc CG_SagaObjectiveCompleted 18784 16 +bss +export cg_saga_valid +align 4 +LABELV cg_saga_valid +skip 4 +export cg_saga_info +align 1 +LABELV cg_saga_info +skip 8192 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $280 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 95 +char 1 114 +char 1 101 +char 1 98 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $279 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 101 +char 1 114 +char 1 105 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $274 +char 1 109 +char 1 101 +char 1 115 +char 1 115 +char 1 97 +char 1 103 +char 1 101 +char 1 95 +char 1 114 +char 1 101 +char 1 98 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $273 +char 1 109 +char 1 101 +char 1 115 +char 1 115 +char 1 97 +char 1 103 +char 1 101 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 101 +char 1 114 +char 1 105 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $263 +char 1 79 +char 1 98 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 105 +char 1 118 +char 1 101 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $249 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 107 +char 1 121 +char 1 108 +char 1 101 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 116 +char 1 111 +char 1 116 +char 1 121 +char 1 112 +char 1 101 +char 1 47 +char 1 112 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 97 +char 1 108 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $248 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 47 +char 1 107 +char 1 121 +char 1 108 +char 1 101 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 116 +char 1 111 +char 1 116 +char 1 121 +char 1 112 +char 1 101 +char 1 47 +char 1 105 +char 1 115 +char 1 110 +char 1 116 +char 1 119 +char 1 111 +char 1 114 +char 1 107 +char 1 105 +char 1 110 +char 1 103 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $243 +char 1 114 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 95 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 95 +char 1 119 +char 1 101 +char 1 108 +char 1 111 +char 1 115 +char 1 116 +char 1 0 +align 1 +LABELV $242 +char 1 114 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 95 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 95 +char 1 119 +char 1 101 +char 1 119 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $239 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $236 +char 1 108 +char 1 111 +char 1 115 +char 1 116 +char 1 114 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $235 +char 1 119 +char 1 111 +char 1 110 +char 1 114 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $230 +char 1 82 +char 1 101 +char 1 98 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $229 +char 1 73 +char 1 109 +char 1 112 +char 1 101 +char 1 114 +char 1 105 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $220 +char 1 69 +char 1 82 +char 1 82 +char 1 79 +char 1 82 +char 1 58 +char 1 32 +char 1 83 +char 1 97 +char 1 103 +char 1 97 +char 1 32 +char 1 100 +char 1 97 +char 1 116 +char 1 97 +char 1 32 +char 1 100 +char 1 111 +char 1 101 +char 1 115 +char 1 32 +char 1 110 +char 1 111 +char 1 116 +char 1 32 +char 1 101 +char 1 120 +char 1 105 +char 1 115 +char 1 116 +char 1 32 +char 1 111 +char 1 110 +char 1 32 +char 1 99 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 33 +char 1 10 +char 1 0 +align 1 +LABELV $210 +char 1 37 +char 1 115 +char 1 46 +char 1 115 +char 1 97 +char 1 103 +char 1 97 +char 1 0 +char 1 0 +align 1 +LABELV $201 +char 1 37 +char 1 115 +char 1 0 +char 1 0 diff --git a/code/cgame/vm/cg_scoreboard.asm b/code/cgame/vm/cg_scoreboard.asm new file mode 100644 index 0000000..15cf31f --- /dev/null +++ b/code/cgame/vm/cg_scoreboard.asm @@ -0,0 +1,4378 @@ +code +proc CG_DrawClientScore 44 36 +file "../cg_scoreboard.c" +line 62 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_scoreboard -- draw the scoreboard on top of the game screen +;4:#include "cg_local.h" +;5:#include "../ui/ui_shared.h" +;6: +;7:#define SCOREBOARD_X (0) +;8: +;9:#define SB_HEADER 86 +;10:#define SB_TOP (SB_HEADER+32) +;11: +;12:// Where the status bar starts, so we don't overwrite it +;13:#define SB_STATUSBAR 420 +;14: +;15:#define SB_NORMAL_HEIGHT 25 +;16:#define SB_INTER_HEIGHT 15 // interleaved height +;17: +;18:#define SB_MAXCLIENTS_NORMAL ((SB_STATUSBAR - SB_TOP) / SB_NORMAL_HEIGHT) +;19:#define SB_MAXCLIENTS_INTER ((SB_STATUSBAR - SB_TOP) / SB_INTER_HEIGHT - 1) +;20: +;21:// Used when interleaved +;22: +;23: +;24: +;25:#define SB_LEFT_BOTICON_X (SCOREBOARD_X+0) +;26:#define SB_LEFT_HEAD_X (SCOREBOARD_X+32) +;27:#define SB_RIGHT_BOTICON_X (SCOREBOARD_X+64) +;28:#define SB_RIGHT_HEAD_X (SCOREBOARD_X+96) +;29:// Normal +;30:#define SB_BOTICON_X (SCOREBOARD_X+32) +;31:#define SB_HEAD_X (SCOREBOARD_X+64) +;32: +;33:#define SB_SCORELINE_X 100 +;34:#define SB_SCORELINE_WIDTH (640 - SB_SCORELINE_X * 2) +;35: +;36:#define SB_RATING_WIDTH 0 // (6 * BIGCHAR_WIDTH) +;37:#define SB_NAME_X (SB_SCORELINE_X) +;38:#define SB_SCORE_X (SB_SCORELINE_X + .55 * SB_SCORELINE_WIDTH) +;39:#define SB_PING_X (SB_SCORELINE_X + .70 * SB_SCORELINE_WIDTH) +;40:#define SB_TIME_X (SB_SCORELINE_X + .85 * SB_SCORELINE_WIDTH) +;41: +;42:// The new and improved score board +;43:// +;44:// In cases where the number of clients is high, the score board heads are interleaved +;45:// here's the layout +;46: +;47:// +;48:// 0 32 80 112 144 240 320 400 <-- pixel position +;49:// bot head bot head score ping time name +;50:// +;51:// wins/losses are drawn on bot icon now +;52: +;53:static qboolean localClient; // true if local client has been displayed +;54: +;55: +;56: /* +;57:================= +;58:CG_DrawScoreboard +;59:================= +;60:*/ +;61:static void CG_DrawClientScore( int y, score_t *score, float *color, float fade, qboolean largeFormat ) +;62:{ +line 68 +;63: //vec3_t headAngles; +;64: clientInfo_t *ci; +;65: int iconx, headx; +;66: float scale; +;67: +;68: if ( largeFormat ) +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $130 +line 69 +;69: { +line 70 +;70: scale = 1.0f; +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +line 71 +;71: } +ADDRGP4 $131 +JUMPV +LABELV $130 +line 73 +;72: else +;73: { +line 74 +;74: scale = 0.75f; +ADDRLP4 4 +CNSTF4 1061158912 +ASGNF4 +line 75 +;75: } +LABELV $131 +line 77 +;76: +;77: if ( score->client < 0 || score->client >= cgs.maxclients ) { +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +LTI4 $135 +ADDRLP4 16 +INDIRI4 +ADDRGP4 cgs+32988 +INDIRI4 +LTI4 $132 +LABELV $135 +line 78 +;78: Com_Printf( "Bad score->client: %i\n", score->client ); +ADDRGP4 $136 +ARGP4 +ADDRFP4 4 +INDIRP4 +INDIRI4 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 79 +;79: return; +ADDRGP4 $129 +JUMPV +LABELV $132 +line 82 +;80: } +;81: +;82: ci = &cgs.clientinfo[score->client]; +ADDRLP4 0 +CNSTI4 788 +ADDRFP4 4 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 84 +;83: +;84: iconx = SB_BOTICON_X + (SB_RATING_WIDTH / 2); +ADDRLP4 8 +CNSTI4 32 +ASGNI4 +line 85 +;85: headx = SB_HEAD_X + (SB_RATING_WIDTH / 2); +ADDRLP4 12 +CNSTI4 64 +ASGNI4 +line 88 +;86: +;87: // draw the handicap or bot skill marker (unless player has flag) +;88: if ( ci->powerups & ( 1 << PW_NEUTRALFLAG ) ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 64 +BANDI4 +CNSTI4 0 +EQI4 $138 +line 89 +;89: if( largeFormat ) { +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $140 +line 90 +;90: CG_DrawFlagModel( iconx, y - ( 32 - BIGCHAR_HEIGHT ) / 2, 32, 32, TEAM_FREE, qfalse ); +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 0 +INDIRI4 +CNSTI4 8 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +CNSTF4 1107296256 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ARGF4 +ADDRLP4 20 +INDIRF4 +ARGF4 +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawFlagModel +CALLV +pop +line 91 +;91: } +ADDRGP4 $139 +JUMPV +LABELV $140 +line 92 +;92: else { +line 93 +;93: CG_DrawFlagModel( iconx, y, 16, 16, TEAM_FREE, qfalse ); +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ARGF4 +ADDRLP4 20 +INDIRF4 +ARGF4 +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawFlagModel +CALLV +pop +line 94 +;94: } +line 95 +;95: } else if ( ci->powerups & ( 1 << PW_REDFLAG ) ) { +ADDRGP4 $139 +JUMPV +LABELV $138 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $142 +line 96 +;96: if( largeFormat ) { +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $144 +line 97 +;97: CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_RED, qfalse ); +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDRGP4 cgs+32936 +INDIRF4 +MULF4 +ARGF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ADDRGP4 cgs+32940 +INDIRF4 +MULF4 +ARGF4 +ADDRLP4 20 +CNSTF4 1107296256 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ADDRGP4 cgs+32936 +INDIRF4 +MULF4 +ARGF4 +ADDRLP4 20 +INDIRF4 +ADDRGP4 cgs+32940 +INDIRF4 +MULF4 +ARGF4 +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawFlagModel +CALLV +pop +line 98 +;98: } +ADDRGP4 $143 +JUMPV +LABELV $144 +line 99 +;99: else { +line 100 +;100: CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_RED, qfalse ); +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDRGP4 cgs+32936 +INDIRF4 +MULF4 +ARGF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ADDRGP4 cgs+32940 +INDIRF4 +MULF4 +ARGF4 +ADDRLP4 20 +CNSTF4 1107296256 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ADDRGP4 cgs+32936 +INDIRF4 +MULF4 +ARGF4 +ADDRLP4 20 +INDIRF4 +ADDRGP4 cgs+32940 +INDIRF4 +MULF4 +ARGF4 +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawFlagModel +CALLV +pop +line 101 +;101: } +line 102 +;102: } else if ( ci->powerups & ( 1 << PW_BLUEFLAG ) ) { +ADDRGP4 $143 +JUMPV +LABELV $142 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 32 +BANDI4 +CNSTI4 0 +EQI4 $154 +line 103 +;103: if( largeFormat ) { +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $156 +line 104 +;104: CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_BLUE, qfalse ); +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDRGP4 cgs+32936 +INDIRF4 +MULF4 +ARGF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ADDRGP4 cgs+32940 +INDIRF4 +MULF4 +ARGF4 +ADDRLP4 20 +CNSTF4 1107296256 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ADDRGP4 cgs+32936 +INDIRF4 +MULF4 +ARGF4 +ADDRLP4 20 +INDIRF4 +ADDRGP4 cgs+32940 +INDIRF4 +MULF4 +ARGF4 +CNSTI4 2 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawFlagModel +CALLV +pop +line 105 +;105: } +ADDRGP4 $155 +JUMPV +LABELV $156 +line 106 +;106: else { +line 107 +;107: CG_DrawFlagModel( iconx*cgs.screenXScale, y*cgs.screenYScale, 32*cgs.screenXScale, 32*cgs.screenYScale, TEAM_BLUE, qfalse ); +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDRGP4 cgs+32936 +INDIRF4 +MULF4 +ARGF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ADDRGP4 cgs+32940 +INDIRF4 +MULF4 +ARGF4 +ADDRLP4 20 +CNSTF4 1107296256 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ADDRGP4 cgs+32936 +INDIRF4 +MULF4 +ARGF4 +ADDRLP4 20 +INDIRF4 +ADDRGP4 cgs+32940 +INDIRF4 +MULF4 +ARGF4 +CNSTI4 2 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_DrawFlagModel +CALLV +pop +line 108 +;108: } +line 109 +;109: } else { +LABELV $154 +line 118 +;110: // draw the wins / losses +;111: /* +;112: if ( cgs.gametype == GT_TOURNAMENT ) +;113: { +;114: CG_DrawSmallStringColor( iconx, y + SMALLCHAR_HEIGHT/2, va("%i/%i", ci->wins, ci->losses ), color ); +;115: } +;116: */ +;117: //rww - in duel, we now show wins/losses in place of "frags". This is because duel now defaults to 1 kill per round. +;118: } +LABELV $155 +LABELV $143 +LABELV $139 +line 121 +;119: +;120: // highlight your position +;121: if ( score->client == cg.snap->ps.clientNum ) +ADDRFP4 4 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $166 +line 122 +;122: { +line 126 +;123: float hcolor[4]; +;124: int rank; +;125: +;126: localClient = qtrue; +ADDRGP4 localClient +CNSTI4 1 +ASGNI4 +line 128 +;127: +;128: if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $173 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $169 +LABELV $173 +line 129 +;129: || cgs.gametype >= GT_TEAM ) { +line 130 +;130: rank = -1; +ADDRLP4 36 +CNSTI4 -1 +ASGNI4 +line 131 +;131: } else { +ADDRGP4 $170 +JUMPV +LABELV $169 +line 132 +;132: rank = cg.snap->ps.persistant[PERS_RANK] & ~RANK_TIED_FLAG; +ADDRLP4 36 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 332 +ADDP4 +INDIRI4 +CNSTI4 -16385 +BANDI4 +ASGNI4 +line 133 +;133: } +LABELV $170 +line 134 +;134: if ( rank == 0 ) { +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +NEI4 $175 +line 135 +;135: hcolor[0] = 0; +ADDRLP4 20 +CNSTF4 0 +ASGNF4 +line 136 +;136: hcolor[1] = 0; +ADDRLP4 20+4 +CNSTF4 0 +ASGNF4 +line 137 +;137: hcolor[2] = 0.7f; +ADDRLP4 20+8 +CNSTF4 1060320051 +ASGNF4 +line 138 +;138: } else if ( rank == 1 ) { +ADDRGP4 $176 +JUMPV +LABELV $175 +ADDRLP4 36 +INDIRI4 +CNSTI4 1 +NEI4 $179 +line 139 +;139: hcolor[0] = 0.7f; +ADDRLP4 20 +CNSTF4 1060320051 +ASGNF4 +line 140 +;140: hcolor[1] = 0; +ADDRLP4 20+4 +CNSTF4 0 +ASGNF4 +line 141 +;141: hcolor[2] = 0; +ADDRLP4 20+8 +CNSTF4 0 +ASGNF4 +line 142 +;142: } else if ( rank == 2 ) { +ADDRGP4 $180 +JUMPV +LABELV $179 +ADDRLP4 36 +INDIRI4 +CNSTI4 2 +NEI4 $183 +line 143 +;143: hcolor[0] = 0.7f; +ADDRLP4 20 +CNSTF4 1060320051 +ASGNF4 +line 144 +;144: hcolor[1] = 0.7f; +ADDRLP4 20+4 +CNSTF4 1060320051 +ASGNF4 +line 145 +;145: hcolor[2] = 0; +ADDRLP4 20+8 +CNSTF4 0 +ASGNF4 +line 146 +;146: } else { +ADDRGP4 $184 +JUMPV +LABELV $183 +line 147 +;147: hcolor[0] = 0.7f; +ADDRLP4 20 +CNSTF4 1060320051 +ASGNF4 +line 148 +;148: hcolor[1] = 0.7f; +ADDRLP4 20+4 +CNSTF4 1060320051 +ASGNF4 +line 149 +;149: hcolor[2] = 0.7f; +ADDRLP4 20+8 +CNSTF4 1060320051 +ASGNF4 +line 150 +;150: } +LABELV $184 +LABELV $180 +LABELV $176 +line 152 +;151: +;152: hcolor[3] = fade * 0.7; +ADDRLP4 20+12 +CNSTF4 1060320051 +ADDRFP4 12 +INDIRF4 +MULF4 +ASGNF4 +line 153 +;153: CG_FillRect( SB_SCORELINE_X - 5, y + 2, 640 - SB_SCORELINE_X * 2 + 10, largeFormat?SB_NORMAL_HEIGHT:SB_INTER_HEIGHT, hcolor ); +CNSTF4 1119748096 +ARGF4 +ADDRFP4 0 +INDIRI4 +CNSTI4 2 +ADDI4 +CVIF4 4 +ARGF4 +CNSTF4 1138819072 +ARGF4 +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $191 +ADDRLP4 40 +CNSTI4 25 +ASGNI4 +ADDRGP4 $192 +JUMPV +LABELV $191 +ADDRLP4 40 +CNSTI4 15 +ASGNI4 +LABELV $192 +ADDRLP4 40 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +ARGP4 +ADDRGP4 CG_FillRect +CALLV +pop +line 154 +;154: } +LABELV $166 +line 156 +;155: +;156: CG_Text_Paint (SB_NAME_X, y, 0.9f * scale, colorWhite, ci->name,0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); +CNSTF4 1120403456 +ARGF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1063675494 +ADDRLP4 4 +INDIRF4 +MULF4 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 20 +CNSTI4 4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 158 +;157: +;158: if ( ci->team != TEAM_SPECTATOR || cgs.gametype == GT_TOURNAMENT ) +ADDRLP4 24 +CNSTI4 3 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $196 +ADDRGP4 cgs+32960 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $193 +LABELV $196 +line 159 +;159: { +line 160 +;160: if (cgs.gametype == GT_TOURNAMENT) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $197 +line 161 +;161: { +line 162 +;162: CG_Text_Paint (SB_SCORE_X, y, 1.0f * scale, colorWhite, va("%i/%i", ci->wins, ci->losses),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); +ADDRGP4 $200 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 32 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTF4 1135280128 +ARGF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ADDRLP4 4 +INDIRF4 +MULF4 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 163 +;163: } +ADDRGP4 $198 +JUMPV +LABELV $197 +line 165 +;164: else +;165: { +line 166 +;166: CG_Text_Paint (SB_SCORE_X, y, 1.0f * scale, colorWhite, va("%i", score->score),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); +ADDRGP4 $201 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTF4 1135280128 +ARGF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ADDRLP4 4 +INDIRF4 +MULF4 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 167 +;167: } +LABELV $198 +line 168 +;168: } +LABELV $193 +line 170 +;169: +;170: CG_Text_Paint (SB_PING_X, y, 1.0f * scale, colorWhite, va("%i", score->ping),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); +ADDRGP4 $201 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTF4 1137442816 +ARGF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ADDRLP4 4 +INDIRF4 +MULF4 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 171 +;171: CG_Text_Paint (SB_TIME_X, y, 1.0f * scale, colorWhite, va("%i", score->time),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_SMALL ); +ADDRGP4 $201 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 32 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTF4 1139605504 +ARGF4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ADDRLP4 4 +INDIRF4 +MULF4 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 174 +;172: +;173: // add the "ready" marker for intermission exiting +;174: if ( cg.snap->ps.stats[ STAT_CLIENTS_READY ] & ( 1 << score->client ) ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRFP4 4 +INDIRP4 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +EQI4 $202 +line 175 +;175: { +line 176 +;176: CG_Text_Paint (SB_NAME_X - 64, y + 2, 0.7f * scale, colorWhite, CG_GetStripEdString("INGAMETEXT", "READY"),0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); +ADDRGP4 $205 +ARGP4 +ADDRGP4 $206 +ARGP4 +ADDRLP4 36 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +CNSTF4 1108344832 +ARGF4 +ADDRLP4 40 +CNSTI4 2 +ASGNI4 +ADDRFP4 0 +INDIRI4 +ADDRLP4 40 +INDIRI4 +ADDI4 +CVIF4 4 +ARGF4 +CNSTF4 1060320051 +ADDRLP4 4 +INDIRF4 +MULF4 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 36 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 177 +;177: } +LABELV $202 +line 178 +;178:} +LABELV $129 +endproc CG_DrawClientScore 44 36 +proc CG_TeamScoreboard 44 20 +line 186 +;179: +;180:/* +;181:================= +;182:CG_TeamScoreboard +;183:================= +;184:*/ +;185:static int CG_TeamScoreboard( int y, team_t team, float fade, int maxClients, int lineHeight, qboolean countOnly ) +;186:{ +line 193 +;187: int i; +;188: score_t *score; +;189: float color[4]; +;190: int count; +;191: clientInfo_t *ci; +;192: +;193: color[0] = color[1] = color[2] = 1.0; +ADDRLP4 32 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 16+8 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 16+4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 194 +;194: color[3] = fade; +ADDRLP4 16+12 +ADDRFP4 8 +INDIRF4 +ASGNF4 +line 196 +;195: +;196: count = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 197 +;197: for ( i = 0 ; i < cg.numScores && count < maxClients ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $214 +JUMPV +LABELV $211 +line 198 +;198: score = &cg.scores[i]; +ADDRLP4 8 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +ASGNP4 +line 199 +;199: ci = &cgs.clientinfo[ score->client ]; +ADDRLP4 12 +CNSTI4 788 +ADDRLP4 8 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 201 +;200: +;201: if ( team != ci->team ) { +ADDRFP4 4 +INDIRI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +EQI4 $218 +line 202 +;202: continue; +ADDRGP4 $212 +JUMPV +LABELV $218 +line 205 +;203: } +;204: +;205: if ( !countOnly ) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $220 +line 206 +;206: { +line 207 +;207: CG_DrawClientScore( y + lineHeight * count, score, color, fade, lineHeight == SB_NORMAL_HEIGHT ); +ADDRLP4 40 +ADDRFP4 16 +INDIRI4 +ASGNI4 +ADDRFP4 0 +INDIRI4 +ADDRLP4 40 +INDIRI4 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDI4 +ARGI4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRI4 +CNSTI4 25 +NEI4 $223 +ADDRLP4 36 +CNSTI4 1 +ASGNI4 +ADDRGP4 $224 +JUMPV +LABELV $223 +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +LABELV $224 +ADDRLP4 36 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawClientScore +CALLV +pop +line 208 +;208: } +LABELV $220 +line 210 +;209: +;210: count++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 211 +;211: } +LABELV $212 +line 197 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $214 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+5048 +INDIRI4 +GEI4 $225 +ADDRLP4 4 +INDIRI4 +ADDRFP4 12 +INDIRI4 +LTI4 $211 +LABELV $225 +line 213 +;212: +;213: return count; +ADDRLP4 4 +INDIRI4 +RETI4 +LABELV $207 +endproc CG_TeamScoreboard 44 20 +export CG_GetTeamCount +proc CG_GetTeamCount 16 0 +line 217 +;214:} +;215: +;216:int CG_GetTeamCount(team_t team, int maxClients) +;217:{ +line 218 +;218: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 219 +;219: int count = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 223 +;220: clientInfo_t *ci; +;221: score_t *score; +;222: +;223: for ( i = 0 ; i < cg.numScores && count < maxClients ; i++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $230 +JUMPV +LABELV $227 +line 224 +;224: { +line 225 +;225: score = &cg.scores[i]; +ADDRLP4 12 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +ASGNP4 +line 226 +;226: ci = &cgs.clientinfo[ score->client ]; +ADDRLP4 8 +CNSTI4 788 +ADDRLP4 12 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 228 +;227: +;228: if ( team != ci->team ) +ADDRFP4 0 +INDIRI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +EQI4 $234 +line 229 +;229: { +line 230 +;230: continue; +ADDRGP4 $228 +JUMPV +LABELV $234 +line 233 +;231: } +;232: +;233: count++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 234 +;234: } +LABELV $228 +line 223 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $230 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+5048 +INDIRI4 +GEI4 $236 +ADDRLP4 4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +LTI4 $227 +LABELV $236 +line 236 +;235: +;236: return count; +ADDRLP4 4 +INDIRI4 +RETI4 +LABELV $226 +endproc CG_GetTeamCount 16 0 +export CG_DrawOldScoreboard +proc CG_DrawOldScoreboard 840 36 +line 245 +;237:} +;238:/* +;239:================= +;240:CG_DrawScoreboard +;241: +;242:Draw the normal in-game scoreboard +;243:================= +;244:*/ +;245:qboolean CG_DrawOldScoreboard( void ) { +line 255 +;246: int x, y, w, i, n1, n2; +;247: float fade; +;248: float *fadeColor; +;249: char *s; +;250: int maxClients; +;251: int lineHeight; +;252: int topBorderSize, bottomBorderSize; +;253: +;254: // don't draw amuthing if the menu or console is up +;255: if ( cg_paused.integer ) { +ADDRGP4 cg_paused+12 +INDIRI4 +CNSTI4 0 +EQI4 $238 +line 256 +;256: cg.deferredPlayerLoading = 0; +ADDRGP4 cg+16 +CNSTI4 0 +ASGNI4 +line 257 +;257: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $237 +JUMPV +LABELV $238 +line 261 +;258: } +;259: +;260: // don't draw scoreboard during death while warmup up +;261: if ( cg.warmup && !cg.showScores ) { +ADDRLP4 52 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+13352 +INDIRI4 +ADDRLP4 52 +INDIRI4 +EQI4 $242 +ADDRGP4 cg+6984 +INDIRI4 +ADDRLP4 52 +INDIRI4 +NEI4 $242 +line 262 +;262: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $237 +JUMPV +LABELV $242 +line 265 +;263: } +;264: +;265: if ( cg.showScores || cg.predictedPlayerState.pm_type == PM_DEAD || +ADDRGP4 cg+6984 +INDIRI4 +CNSTI4 0 +NEI4 $254 +ADDRGP4 cg+96+4 +INDIRI4 +CNSTI4 4 +EQI4 $254 +ADDRGP4 cg+96+4 +INDIRI4 +CNSTI4 6 +NEI4 $246 +LABELV $254 +line 266 +;266: cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { +line 267 +;267: fade = 1.0; +ADDRLP4 12 +CNSTF4 1065353216 +ASGNF4 +line 268 +;268: fadeColor = colorWhite; +ADDRLP4 24 +ADDRGP4 colorWhite +ASGNP4 +line 269 +;269: } else { +ADDRGP4 $247 +JUMPV +LABELV $246 +line 270 +;270: fadeColor = CG_FadeColor( cg.scoreFadeTime, FADE_TIME ); +ADDRGP4 cg+6992 +INDIRI4 +ARGI4 +CNSTI4 200 +ARGI4 +ADDRLP4 56 +ADDRGP4 CG_FadeColor +CALLP4 +ASGNP4 +ADDRLP4 24 +ADDRLP4 56 +INDIRP4 +ASGNP4 +line 272 +;271: +;272: if ( !fadeColor ) { +ADDRLP4 24 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $256 +line 274 +;273: // next time scoreboard comes up, don't print killer +;274: cg.deferredPlayerLoading = 0; +ADDRGP4 cg+16 +CNSTI4 0 +ASGNI4 +line 275 +;275: cg.killerName[0] = 0; +ADDRGP4 cg+6996 +CNSTI1 0 +ASGNI1 +line 276 +;276: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $237 +JUMPV +LABELV $256 +line 278 +;277: } +;278: fade = *fadeColor; +ADDRLP4 12 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ASGNF4 +line 279 +;279: } +LABELV $247 +line 283 +;280: +;281: // fragged by ... line +;282: // or if in intermission and duel, prints the winner of the duel round +;283: if (cgs.gametype == GT_TOURNAMENT && cgs.duelWinner != -1 && +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $260 +ADDRGP4 cgs+36336 +INDIRI4 +CNSTI4 -1 +EQI4 $260 +ADDRGP4 cg+96+4 +INDIRI4 +CNSTI4 6 +NEI4 $260 +line 285 +;284: cg.predictedPlayerState.pm_type == PM_INTERMISSION) +;285: { +line 286 +;286: s = va("%s %s", cgs.clientinfo[cgs.duelWinner].name, CG_GetStripEdString("INGAMETEXT", "DUEL_WINS") ); +ADDRGP4 $205 +ARGP4 +ADDRGP4 $270 +ARGP4 +ADDRLP4 56 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $266 +ARGP4 +CNSTI4 788 +ADDRGP4 cgs+36336 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+4 +ADDP4 +ARGP4 +ADDRLP4 56 +INDIRP4 +ARGP4 +ADDRLP4 60 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 60 +INDIRP4 +ASGNP4 +line 292 +;287: /*w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +;288: x = ( SCREEN_WIDTH - w ) / 2; +;289: y = 40; +;290: CG_DrawBigString( x, y, s, fade ); +;291: */ +;292: x = ( SCREEN_WIDTH ) / 2; +ADDRLP4 32 +CNSTI4 320 +ASGNI4 +line 293 +;293: y = 40; +ADDRLP4 0 +CNSTI4 40 +ASGNI4 +line 294 +;294: CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); +ADDRLP4 20 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 64 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 68 +CNSTI4 2 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ADDRLP4 64 +INDIRI4 +ADDRLP4 68 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRLP4 68 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 295 +;295: } +ADDRGP4 $261 +JUMPV +LABELV $260 +line 296 +;296: else if (cgs.gametype == GT_TOURNAMENT && cgs.duelist1 != -1 && cgs.duelist2 != -1 && +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $271 +ADDRLP4 56 +CNSTI4 -1 +ASGNI4 +ADDRGP4 cgs+36340 +INDIRI4 +ADDRLP4 56 +INDIRI4 +EQI4 $271 +ADDRGP4 cgs+36344 +INDIRI4 +ADDRLP4 56 +INDIRI4 +EQI4 $271 +ADDRGP4 cg+96+4 +INDIRI4 +CNSTI4 6 +NEI4 $271 +line 298 +;297: cg.predictedPlayerState.pm_type == PM_INTERMISSION) +;298: { +line 299 +;299: s = va("%s %s %s", cgs.clientinfo[cgs.duelist1].name, CG_GetStripEdString("INGAMETEXT", "SPECHUD_VERSUS"), cgs.clientinfo[cgs.duelist2].name ); +ADDRGP4 $205 +ARGP4 +ADDRGP4 $282 +ARGP4 +ADDRLP4 60 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $278 +ARGP4 +ADDRLP4 64 +CNSTI4 788 +ASGNI4 +ADDRLP4 64 +INDIRI4 +ADDRGP4 cgs+36340 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+4 +ADDP4 +ARGP4 +ADDRLP4 60 +INDIRP4 +ARGP4 +ADDRLP4 64 +INDIRI4 +ADDRGP4 cgs+36344 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+4 +ADDP4 +ARGP4 +ADDRLP4 68 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 68 +INDIRP4 +ASGNP4 +line 305 +;300: /*w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +;301: x = ( SCREEN_WIDTH - w ) / 2; +;302: y = 40; +;303: CG_DrawBigString( x, y, s, fade ); +;304: */ +;305: x = ( SCREEN_WIDTH ) / 2; +ADDRLP4 32 +CNSTI4 320 +ASGNI4 +line 306 +;306: y = 40; +ADDRLP4 0 +CNSTI4 40 +ASGNI4 +line 307 +;307: CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); +ADDRLP4 20 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 72 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 76 +CNSTI4 2 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ADDRLP4 72 +INDIRI4 +ADDRLP4 76 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRLP4 76 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 308 +;308: } +ADDRGP4 $272 +JUMPV +LABELV $271 +line 309 +;309: else if ( cg.killerName[0] ) { +ADDRGP4 cg+6996 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $286 +line 310 +;310: s = va("%s %s", CG_GetStripEdString("INGAMETEXT", "KILLEDBY"), cg.killerName ); +ADDRGP4 $205 +ARGP4 +ADDRGP4 $289 +ARGP4 +ADDRLP4 60 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRGP4 $266 +ARGP4 +ADDRLP4 60 +INDIRP4 +ARGP4 +ADDRGP4 cg+6996 +ARGP4 +ADDRLP4 64 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 64 +INDIRP4 +ASGNP4 +line 316 +;311: /*w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +;312: x = ( SCREEN_WIDTH - w ) / 2; +;313: y = 40; +;314: CG_DrawBigString( x, y, s, fade ); +;315: */ +;316: x = ( SCREEN_WIDTH ) / 2; +ADDRLP4 32 +CNSTI4 320 +ASGNI4 +line 317 +;317: y = 40; +ADDRLP4 0 +CNSTI4 40 +ASGNI4 +line 318 +;318: CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); +ADDRLP4 20 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 68 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 72 +CNSTI4 2 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ADDRLP4 68 +INDIRI4 +ADDRLP4 72 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRLP4 72 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 319 +;319: } +LABELV $286 +LABELV $272 +LABELV $261 +line 322 +;320: +;321: // current rank +;322: if ( cgs.gametype < GT_TEAM) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +GEI4 $291 +line 323 +;323: if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $292 +line 324 +;324: { +line 329 +;325: char sPlace[256]; +;326: char sOf[256]; +;327: char sWith[256]; +;328: +;329: trap_SP_GetStringTextString("INGAMETEXT_PLACE", sPlace, sizeof(sPlace)); +ADDRGP4 $297 +ARGP4 +ADDRLP4 60 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 330 +;330: trap_SP_GetStringTextString("INGAMETEXT_OF", sOf, sizeof(sOf)); +ADDRGP4 $298 +ARGP4 +ADDRLP4 316 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 331 +;331: trap_SP_GetStringTextString("INGAMETEXT_WITH", sWith, sizeof(sWith)); +ADDRGP4 $299 +ARGP4 +ADDRLP4 572 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 333 +;332: +;333: s = va("%s %s (%s %i) %s %i", +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 332 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRLP4 828 +ADDRGP4 CG_PlaceString +CALLP4 +ASGNP4 +ADDRGP4 $300 +ARGP4 +ADDRLP4 828 +INDIRP4 +ARGP4 +ADDRLP4 60 +ARGP4 +ADDRLP4 316 +ARGP4 +ADDRGP4 cg+5048 +INDIRI4 +ARGI4 +ADDRLP4 572 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 324 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 832 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 832 +INDIRP4 +ASGNP4 +line 340 +;334: CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), +;335: sPlace, +;336: sOf, +;337: cg.numScores, +;338: sWith, +;339: cg.snap->ps.persistant[PERS_SCORE] ); +;340: w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRLP4 836 +ADDRGP4 CG_DrawStrlen +CALLI4 +ASGNI4 +ADDRLP4 48 +ADDRLP4 836 +INDIRI4 +CNSTI4 4 +LSHI4 +ASGNI4 +line 341 +;341: x = ( SCREEN_WIDTH ) / 2; +ADDRLP4 32 +CNSTI4 320 +ASGNI4 +line 342 +;342: y = 60; +ADDRLP4 0 +CNSTI4 60 +ASGNI4 +line 344 +;343: //CG_DrawBigString( x, y, s, fade ); +;344: UI_DrawProportionalString(x, y, s, UI_CENTER|UI_DROPSHADOW, colorTable[CT_WHITE]); +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRP4 +ARGP4 +CNSTI4 2049 +ARGI4 +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 345 +;345: } +line 346 +;346: } else { +ADDRGP4 $292 +JUMPV +LABELV $291 +line 347 +;347: if ( cg.teamScores[0] == cg.teamScores[1] ) { +ADDRGP4 cg+5056 +INDIRI4 +ADDRGP4 cg+5056+4 +INDIRI4 +NEI4 $305 +line 348 +;348: s = va("Teams are tied at %i", cg.teamScores[0] ); +ADDRGP4 $310 +ARGP4 +ADDRGP4 cg+5056 +INDIRI4 +ARGI4 +ADDRLP4 60 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 60 +INDIRP4 +ASGNP4 +line 349 +;349: } else if ( cg.teamScores[0] >= cg.teamScores[1] ) { +ADDRGP4 $306 +JUMPV +LABELV $305 +ADDRGP4 cg+5056 +INDIRI4 +ADDRGP4 cg+5056+4 +INDIRI4 +LTI4 $312 +line 350 +;350: s = va("Red leads %i to %i",cg.teamScores[0], cg.teamScores[1] ); +ADDRGP4 $317 +ARGP4 +ADDRGP4 cg+5056 +INDIRI4 +ARGI4 +ADDRGP4 cg+5056+4 +INDIRI4 +ARGI4 +ADDRLP4 60 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 60 +INDIRP4 +ASGNP4 +line 351 +;351: } else { +ADDRGP4 $313 +JUMPV +LABELV $312 +line 352 +;352: s = va("Blue leads %i to %i",cg.teamScores[1], cg.teamScores[0] ); +ADDRGP4 $321 +ARGP4 +ADDRGP4 cg+5056+4 +INDIRI4 +ARGI4 +ADDRGP4 cg+5056 +INDIRI4 +ARGI4 +ADDRLP4 60 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 20 +ADDRLP4 60 +INDIRP4 +ASGNP4 +line 353 +;353: } +LABELV $313 +LABELV $306 +line 355 +;354: +;355: x = ( SCREEN_WIDTH ) / 2; +ADDRLP4 32 +CNSTI4 320 +ASGNI4 +line 356 +;356: y = 60; +ADDRLP4 0 +CNSTI4 60 +ASGNI4 +line 358 +;357: +;358: CG_Text_Paint ( x - CG_Text_Width ( s, 1.0f, FONT_MEDIUM ) / 2, y, 1.0f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); +ADDRLP4 20 +INDIRP4 +ARGP4 +CNSTF4 1065353216 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 60 +ADDRGP4 CG_Text_Width +CALLI4 +ASGNI4 +ADDRLP4 64 +CNSTI4 2 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ADDRLP4 60 +INDIRI4 +ADDRLP4 64 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 359 +;359: } +LABELV $292 +line 362 +;360: +;361: // scoreboard +;362: y = SB_HEADER; +ADDRLP4 0 +CNSTI4 86 +ASGNI4 +line 364 +;363: +;364: CG_DrawPic ( SB_SCORELINE_X - 40, y - 5, SB_SCORELINE_WIDTH + 80, 40, trap_R_RegisterShaderNoMip ( "gfx/menus/menu_buttonback.tga" ) ); +ADDRGP4 $325 +ARGP4 +ADDRLP4 60 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +CNSTF4 1114636288 +ARGF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 5 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1140981760 +ARGF4 +CNSTF4 1109393408 +ARGF4 +ADDRLP4 60 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 366 +;365: +;366: CG_Text_Paint ( SB_NAME_X, y, 1.0f, colorWhite, "Name", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); +CNSTF4 1120403456 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 $326 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 367 +;367: if (cgs.gametype == GT_TOURNAMENT) +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 3 +NEI4 $327 +line 368 +;368: { +line 370 +;369: char sWL[100]; +;370: trap_SP_GetStringTextString("INGAMETEXT_W_L", sWL, sizeof(sWL)); +ADDRGP4 $330 +ARGP4 +ADDRLP4 64 +ARGP4 +CNSTI4 100 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 372 +;371: +;372: CG_Text_Paint ( SB_SCORE_X, y, 1.0f, colorWhite, sWL, 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); +CNSTF4 1135280128 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRLP4 64 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 373 +;373: } +ADDRGP4 $328 +JUMPV +LABELV $327 +line 375 +;374: else +;375: { +line 376 +;376: CG_Text_Paint ( SB_SCORE_X, y, 1.0f, colorWhite, "Score", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); +CNSTF4 1135280128 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 $331 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 377 +;377: } +LABELV $328 +line 378 +;378: CG_Text_Paint ( SB_PING_X, y, 1.0f, colorWhite, "Ping", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); +CNSTF4 1137442816 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 $332 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 379 +;379: CG_Text_Paint ( SB_TIME_X, y, 1.0f, colorWhite, "Time", 0, 0, ITEM_TEXTSTYLE_OUTLINED, FONT_MEDIUM ); +CNSTF4 1139605504 +ARGF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRGP4 colorWhite +ARGP4 +ADDRGP4 $333 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_Text_Paint +CALLV +pop +line 381 +;380: +;381: y = SB_TOP; +ADDRLP4 0 +CNSTI4 118 +ASGNI4 +line 384 +;382: +;383: // If there are more than SB_MAXCLIENTS_NORMAL, use the interleaved scores +;384: if ( cg.numScores > SB_MAXCLIENTS_NORMAL ) { +ADDRGP4 cg+5048 +INDIRI4 +CNSTI4 12 +LEI4 $334 +line 385 +;385: maxClients = SB_MAXCLIENTS_INTER; +ADDRLP4 16 +CNSTI4 19 +ASGNI4 +line 386 +;386: lineHeight = SB_INTER_HEIGHT; +ADDRLP4 8 +CNSTI4 15 +ASGNI4 +line 387 +;387: topBorderSize = 8; +ADDRLP4 40 +CNSTI4 8 +ASGNI4 +line 388 +;388: bottomBorderSize = 16; +ADDRLP4 44 +CNSTI4 16 +ASGNI4 +line 389 +;389: } else { +ADDRGP4 $335 +JUMPV +LABELV $334 +line 390 +;390: maxClients = SB_MAXCLIENTS_NORMAL; +ADDRLP4 16 +CNSTI4 12 +ASGNI4 +line 391 +;391: lineHeight = SB_NORMAL_HEIGHT; +ADDRLP4 8 +CNSTI4 25 +ASGNI4 +line 392 +;392: topBorderSize = 8; +ADDRLP4 40 +CNSTI4 8 +ASGNI4 +line 393 +;393: bottomBorderSize = 8; +ADDRLP4 44 +CNSTI4 8 +ASGNI4 +line 394 +;394: } +LABELV $335 +line 396 +;395: +;396: localClient = qfalse; +ADDRGP4 localClient +CNSTI4 0 +ASGNI4 +line 406 +;397: +;398: +;399: //I guess this should end up being able to display 19 clients at once. +;400: //In a team game, if there are 9 or more clients on the team not in the lead, +;401: //we only want to show 10 of the clients on the team in the lead, so that we +;402: //have room to display the clients in the lead on the losing team. +;403: +;404: //I guess this can be accomplished simply by printing the first teams score with a maxClients +;405: //value passed in related to how many players are on both teams. +;406: if ( cgs.gametype >= GT_TEAM ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 5 +LTI4 $337 +line 410 +;407: // +;408: // teamplay scoreboard +;409: // +;410: y += lineHeight/2; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +DIVI4 +ADDI4 +ASGNI4 +line 412 +;411: +;412: if ( cg.teamScores[0] >= cg.teamScores[1] ) { +ADDRGP4 cg+5056 +INDIRI4 +ADDRGP4 cg+5056+4 +INDIRI4 +LTI4 $340 +line 413 +;413: int team1MaxCl = CG_GetTeamCount(TEAM_RED, maxClients); +CNSTI4 1 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 72 +ADDRGP4 CG_GetTeamCount +CALLI4 +ASGNI4 +ADDRLP4 64 +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 414 +;414: int team2MaxCl = CG_GetTeamCount(TEAM_BLUE, maxClients); +CNSTI4 2 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 CG_GetTeamCount +CALLI4 +ASGNI4 +ADDRLP4 68 +ADDRLP4 76 +INDIRI4 +ASGNI4 +line 416 +;415: +;416: if (team1MaxCl > 10 && (team1MaxCl+team2MaxCl) > maxClients) +ADDRLP4 80 +ADDRLP4 64 +INDIRI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 10 +LEI4 $345 +ADDRLP4 80 +INDIRI4 +ADDRLP4 68 +INDIRI4 +ADDI4 +ADDRLP4 16 +INDIRI4 +LEI4 $345 +line 417 +;417: { +line 418 +;418: team1MaxCl -= team2MaxCl; +ADDRLP4 64 +ADDRLP4 64 +INDIRI4 +ADDRLP4 68 +INDIRI4 +SUBI4 +ASGNI4 +line 422 +;419: //subtract as many as you have to down to 10, once we get there +;420: //we just set it to 10 +;421: +;422: if (team1MaxCl < 10) +ADDRLP4 64 +INDIRI4 +CNSTI4 10 +GEI4 $347 +line 423 +;423: { +line 424 +;424: team1MaxCl = 10; +ADDRLP4 64 +CNSTI4 10 +ASGNI4 +line 425 +;425: } +LABELV $347 +line 426 +;426: } +LABELV $345 +line 428 +;427: +;428: team2MaxCl = (maxClients-team1MaxCl); //team2 can display however many is left over after team1's display +ADDRLP4 68 +ADDRLP4 16 +INDIRI4 +ADDRLP4 64 +INDIRI4 +SUBI4 +ASGNI4 +line 430 +;429: +;430: n1 = CG_TeamScoreboard( y, TEAM_RED, fade, team1MaxCl, lineHeight, qtrue ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 84 +CNSTI4 1 +ASGNI4 +ADDRLP4 84 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 84 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 CG_TeamScoreboard +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 88 +INDIRI4 +ASGNI4 +line 431 +;431: CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n1 * lineHeight + bottomBorderSize, 0.33f, TEAM_RED ); +CNSTI4 95 +ARGI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 40 +INDIRI4 +SUBI4 +ARGI4 +CNSTI4 450 +ARGI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRLP4 44 +INDIRI4 +ADDI4 +ARGI4 +CNSTF4 1051260355 +ARGF4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_DrawTeamBackground +CALLV +pop +line 432 +;432: CG_TeamScoreboard( y, TEAM_RED, fade, team1MaxCl, lineHeight, qfalse ); +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_TeamScoreboard +CALLI4 +pop +line 433 +;433: y += (n1 * lineHeight) + BIGCHAR_HEIGHT; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +CNSTI4 16 +ADDI4 +ADDI4 +ASGNI4 +line 437 +;434: +;435: //maxClients -= n1; +;436: +;437: n2 = CG_TeamScoreboard( y, TEAM_BLUE, fade, team2MaxCl, lineHeight, qtrue ); +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 68 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 92 +ADDRGP4 CG_TeamScoreboard +CALLI4 +ASGNI4 +ADDRLP4 36 +ADDRLP4 92 +INDIRI4 +ASGNI4 +line 438 +;438: CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n2 * lineHeight + bottomBorderSize, 0.33f, TEAM_BLUE ); +CNSTI4 95 +ARGI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 40 +INDIRI4 +SUBI4 +ARGI4 +CNSTI4 450 +ARGI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRLP4 44 +INDIRI4 +ADDI4 +ARGI4 +CNSTF4 1051260355 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_DrawTeamBackground +CALLV +pop +line 439 +;439: CG_TeamScoreboard( y, TEAM_BLUE, fade, team2MaxCl, lineHeight, qfalse ); +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 68 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_TeamScoreboard +CALLI4 +pop +line 440 +;440: y += (n2 * lineHeight) + BIGCHAR_HEIGHT; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +CNSTI4 16 +ADDI4 +ADDI4 +ASGNI4 +line 444 +;441: +;442: //maxClients -= n2; +;443: +;444: maxClients -= (team1MaxCl+team2MaxCl); +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +ADDRLP4 64 +INDIRI4 +ADDRLP4 68 +INDIRI4 +ADDI4 +SUBI4 +ASGNI4 +line 445 +;445: } else { +ADDRGP4 $341 +JUMPV +LABELV $340 +line 446 +;446: int team1MaxCl = CG_GetTeamCount(TEAM_BLUE, maxClients); +CNSTI4 2 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 72 +ADDRGP4 CG_GetTeamCount +CALLI4 +ASGNI4 +ADDRLP4 64 +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 447 +;447: int team2MaxCl = CG_GetTeamCount(TEAM_RED, maxClients); +CNSTI4 1 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 CG_GetTeamCount +CALLI4 +ASGNI4 +ADDRLP4 68 +ADDRLP4 76 +INDIRI4 +ASGNI4 +line 449 +;448: +;449: if (team1MaxCl > 10 && (team1MaxCl+team2MaxCl) > maxClients) +ADDRLP4 80 +ADDRLP4 64 +INDIRI4 +ASGNI4 +ADDRLP4 80 +INDIRI4 +CNSTI4 10 +LEI4 $349 +ADDRLP4 80 +INDIRI4 +ADDRLP4 68 +INDIRI4 +ADDI4 +ADDRLP4 16 +INDIRI4 +LEI4 $349 +line 450 +;450: { +line 451 +;451: team1MaxCl -= team2MaxCl; +ADDRLP4 64 +ADDRLP4 64 +INDIRI4 +ADDRLP4 68 +INDIRI4 +SUBI4 +ASGNI4 +line 455 +;452: //subtract as many as you have to down to 10, once we get there +;453: //we just set it to 10 +;454: +;455: if (team1MaxCl < 10) +ADDRLP4 64 +INDIRI4 +CNSTI4 10 +GEI4 $351 +line 456 +;456: { +line 457 +;457: team1MaxCl = 10; +ADDRLP4 64 +CNSTI4 10 +ASGNI4 +line 458 +;458: } +LABELV $351 +line 459 +;459: } +LABELV $349 +line 461 +;460: +;461: team2MaxCl = (maxClients-team1MaxCl); //team2 can display however many is left over after team1's display +ADDRLP4 68 +ADDRLP4 16 +INDIRI4 +ADDRLP4 64 +INDIRI4 +SUBI4 +ASGNI4 +line 463 +;462: +;463: n1 = CG_TeamScoreboard( y, TEAM_BLUE, fade, team1MaxCl, lineHeight, qtrue ); +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 84 +ADDRGP4 CG_TeamScoreboard +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 84 +INDIRI4 +ASGNI4 +line 464 +;464: CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n1 * lineHeight + bottomBorderSize, 0.33f, TEAM_BLUE ); +CNSTI4 95 +ARGI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 40 +INDIRI4 +SUBI4 +ARGI4 +CNSTI4 450 +ARGI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRLP4 44 +INDIRI4 +ADDI4 +ARGI4 +CNSTF4 1051260355 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRGP4 CG_DrawTeamBackground +CALLV +pop +line 465 +;465: CG_TeamScoreboard( y, TEAM_BLUE, fade, team1MaxCl, lineHeight, qfalse ); +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_TeamScoreboard +CALLI4 +pop +line 466 +;466: y += (n1 * lineHeight) + BIGCHAR_HEIGHT; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +CNSTI4 16 +ADDI4 +ADDI4 +ASGNI4 +line 470 +;467: +;468: //maxClients -= n1; +;469: +;470: n2 = CG_TeamScoreboard( y, TEAM_RED, fade, team2MaxCl, lineHeight, qtrue ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 88 +CNSTI4 1 +ASGNI4 +ADDRLP4 88 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 68 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 88 +INDIRI4 +ARGI4 +ADDRLP4 92 +ADDRGP4 CG_TeamScoreboard +CALLI4 +ASGNI4 +ADDRLP4 36 +ADDRLP4 92 +INDIRI4 +ASGNI4 +line 471 +;471: CG_DrawTeamBackground( SB_SCORELINE_X - 5, y - topBorderSize, 640 - SB_SCORELINE_X * 2 + 10, n2 * lineHeight + bottomBorderSize, 0.33f, TEAM_RED ); +CNSTI4 95 +ARGI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 40 +INDIRI4 +SUBI4 +ARGI4 +CNSTI4 450 +ARGI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRLP4 44 +INDIRI4 +ADDI4 +ARGI4 +CNSTF4 1051260355 +ARGF4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_DrawTeamBackground +CALLV +pop +line 472 +;472: CG_TeamScoreboard( y, TEAM_RED, fade, team2MaxCl, lineHeight, qfalse ); +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 68 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_TeamScoreboard +CALLI4 +pop +line 473 +;473: y += (n2 * lineHeight) + BIGCHAR_HEIGHT; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +CNSTI4 16 +ADDI4 +ADDI4 +ASGNI4 +line 477 +;474: +;475: //maxClients -= n2; +;476: +;477: maxClients -= (team1MaxCl+team2MaxCl); +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +ADDRLP4 64 +INDIRI4 +ADDRLP4 68 +INDIRI4 +ADDI4 +SUBI4 +ASGNI4 +line 478 +;478: } +LABELV $341 +line 479 +;479: n1 = CG_TeamScoreboard( y, TEAM_SPECTATOR, fade, maxClients, lineHeight, qfalse ); +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 64 +ADDRGP4 CG_TeamScoreboard +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 64 +INDIRI4 +ASGNI4 +line 480 +;480: y += (n1 * lineHeight) + BIGCHAR_HEIGHT; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +CNSTI4 16 +ADDI4 +ADDI4 +ASGNI4 +line 482 +;481: +;482: } else { +ADDRGP4 $338 +JUMPV +LABELV $337 +line 486 +;483: // +;484: // free for all scoreboard +;485: // +;486: n1 = CG_TeamScoreboard( y, TEAM_FREE, fade, maxClients, lineHeight, qfalse ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 64 +CNSTI4 0 +ASGNI4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRLP4 68 +ADDRGP4 CG_TeamScoreboard +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 68 +INDIRI4 +ASGNI4 +line 487 +;487: y += (n1 * lineHeight) + BIGCHAR_HEIGHT; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 28 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +CNSTI4 16 +ADDI4 +ADDI4 +ASGNI4 +line 488 +;488: n2 = CG_TeamScoreboard( y, TEAM_SPECTATOR, fade, maxClients - n1, lineHeight, qfalse ); +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRI4 +ADDRLP4 28 +INDIRI4 +SUBI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 72 +ADDRGP4 CG_TeamScoreboard +CALLI4 +ASGNI4 +ADDRLP4 36 +ADDRLP4 72 +INDIRI4 +ASGNI4 +line 489 +;489: y += (n2 * lineHeight) + BIGCHAR_HEIGHT; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +CNSTI4 16 +ADDI4 +ADDI4 +ASGNI4 +line 490 +;490: } +LABELV $338 +line 492 +;491: +;492: if (!localClient) { +ADDRGP4 localClient +INDIRI4 +CNSTI4 0 +NEI4 $353 +line 494 +;493: // draw local client at the bottom +;494: for ( i = 0 ; i < cg.numScores ; i++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $358 +JUMPV +LABELV $355 +line 495 +;495: if ( cg.scores[i].client == cg.snap->ps.clientNum ) { +CNSTI4 60 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $360 +line 496 +;496: CG_DrawClientScore( y, &cg.scores[i], fadeColor, fade, lineHeight == SB_NORMAL_HEIGHT ); +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 60 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +ARGP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRI4 +CNSTI4 25 +NEI4 $366 +ADDRLP4 64 +CNSTI4 1 +ASGNI4 +ADDRGP4 $367 +JUMPV +LABELV $366 +ADDRLP4 64 +CNSTI4 0 +ASGNI4 +LABELV $367 +ADDRLP4 64 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawClientScore +CALLV +pop +line 497 +;497: break; +ADDRGP4 $357 +JUMPV +LABELV $360 +line 499 +;498: } +;499: } +LABELV $356 +line 494 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $358 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+5048 +INDIRI4 +LTI4 $355 +LABELV $357 +line 500 +;500: } +LABELV $353 +line 503 +;501: +;502: // load any models that have been deferred +;503: if ( ++cg.deferredPlayerLoading > 10 ) { +ADDRLP4 64 +ADDRGP4 cg+16 +ASGNP4 +ADDRLP4 68 +ADDRLP4 64 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 10 +LEI4 $368 +line 504 +;504: CG_LoadDeferredPlayers(); +ADDRGP4 CG_LoadDeferredPlayers +CALLV +pop +line 505 +;505: } +LABELV $368 +line 507 +;506: +;507: return qtrue; +CNSTI4 1 +RETI4 +LABELV $237 +endproc CG_DrawOldScoreboard 840 36 +bss +align 4 +LABELV localClient +skip 4 +import trap_SP_Register +import trap_SP_RegisterServer +import trap_PC_RemoveAllGlobalDefines +import trap_PC_LoadGlobalDefines +import trap_PC_SourceFileAndLine +import trap_PC_ReadToken +import trap_PC_FreeSource +import trap_PC_LoadSource +import trap_PC_AddGlobalDefine +import Controls_SetConfig +import Controls_GetConfig +import UI_OutOfMemory +import UI_InitMemory +import UI_Alloc +import Display_CacheAll +import Menu_SetFeederSelection +import Menu_Paint +import Menus_CloseAll +import LerpColor +import Display_HandleKey +import Menus_CloseByName +import Menus_ShowByName +import Menus_FindByName +import Menus_OpenByName +import Display_KeyBindPending +import Display_CursorType +import Display_MouseMove +import Display_CaptureItem +import Display_GetContext +import Menus_Activate +import Menus_AnyFullScreenVisible +import Menu_Reset +import Menus_ActivateByName +import Menu_PaintAll +import Menu_New +import Menu_Count +import PC_Script_Parse +import PC_String_Parse +import PC_Rect_Parse +import PC_Int_Parse +import PC_Color_Parse +import PC_Float_Parse +import Script_Parse +import String_Parse +import Rect_Parse +import Int_Parse +import Color_Parse +import Float_Parse +import Menu_ScrollFeeder +import Menu_HandleMouseMove +import Menu_HandleKey +import Menu_GetFocused +import Menu_PostParse +import Item_Init +import Menu_Init +import Display_ExpandMacros +import Init_Display +import String_Report +import String_Init +import String_Alloc +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $333 +char 1 84 +char 1 105 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $332 +char 1 80 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $331 +char 1 83 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 0 +align 1 +LABELV $330 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 87 +char 1 95 +char 1 76 +char 1 0 +align 1 +LABELV $326 +char 1 78 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $325 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 95 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 98 +char 1 97 +char 1 99 +char 1 107 +char 1 46 +char 1 116 +char 1 103 +char 1 97 +char 1 0 +align 1 +LABELV $321 +char 1 66 +char 1 108 +char 1 117 +char 1 101 +char 1 32 +char 1 108 +char 1 101 +char 1 97 +char 1 100 +char 1 115 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 116 +char 1 111 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $317 +char 1 82 +char 1 101 +char 1 100 +char 1 32 +char 1 108 +char 1 101 +char 1 97 +char 1 100 +char 1 115 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 116 +char 1 111 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $310 +char 1 84 +char 1 101 +char 1 97 +char 1 109 +char 1 115 +char 1 32 +char 1 97 +char 1 114 +char 1 101 +char 1 32 +char 1 116 +char 1 105 +char 1 101 +char 1 100 +char 1 32 +char 1 97 +char 1 116 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $300 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 40 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 105 +char 1 41 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $299 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 87 +char 1 73 +char 1 84 +char 1 72 +char 1 0 +align 1 +LABELV $298 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 79 +char 1 70 +char 1 0 +align 1 +LABELV $297 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 95 +char 1 80 +char 1 76 +char 1 65 +char 1 67 +char 1 69 +char 1 0 +align 1 +LABELV $289 +char 1 75 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 66 +char 1 89 +char 1 0 +align 1 +LABELV $282 +char 1 83 +char 1 80 +char 1 69 +char 1 67 +char 1 72 +char 1 85 +char 1 68 +char 1 95 +char 1 86 +char 1 69 +char 1 82 +char 1 83 +char 1 85 +char 1 83 +char 1 0 +align 1 +LABELV $278 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $270 +char 1 68 +char 1 85 +char 1 69 +char 1 76 +char 1 95 +char 1 87 +char 1 73 +char 1 78 +char 1 83 +char 1 0 +align 1 +LABELV $266 +char 1 37 +char 1 115 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $206 +char 1 82 +char 1 69 +char 1 65 +char 1 68 +char 1 89 +char 1 0 +align 1 +LABELV $205 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 0 +align 1 +LABELV $201 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $200 +char 1 37 +char 1 105 +char 1 47 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $136 +char 1 66 +char 1 97 +char 1 100 +char 1 32 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 45 +char 1 62 +char 1 99 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 58 +char 1 32 +char 1 37 +char 1 105 +char 1 10 +char 1 0 diff --git a/code/cgame/vm/cg_servercmds.asm b/code/cgame/vm/cg_servercmds.asm new file mode 100644 index 0000000..18866c2 --- /dev/null +++ b/code/cgame/vm/cg_servercmds.asm @@ -0,0 +1,10770 @@ +lit +align 4 +LABELV validOrders +address $122 +byte 4 1 +address $123 +byte 4 1 +address $124 +byte 4 2 +address $125 +byte 4 2 +address $126 +byte 4 3 +address $127 +byte 4 7 +address $128 +byte 4 4 +address $129 +byte 4 5 +address $130 +byte 4 6 +align 4 +LABELV numValidOrders +byte 4 9 +code +proc CG_ValidOrder 8 8 +file "../cg_servercmds.c" +line 32 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_servercmds.c -- reliably sequenced text commands sent by the server +;4:// these are processed at snapshot transition time, so there will definately +;5:// be a valid snapshot this frame +;6: +;7:#include "cg_local.h" +;8:#include "../../ui/menudef.h" +;9:#if !defined(CL_LIGHT_H_INC) +;10: #include "cg_lights.h" +;11:#endif +;12: +;13:typedef struct { +;14: const char *order; +;15: int taskNum; +;16:} orderTask_t; +;17: +;18:static const orderTask_t validOrders[] = { +;19: { VOICECHAT_GETFLAG, TEAMTASK_OFFENSE }, +;20: { VOICECHAT_OFFENSE, TEAMTASK_OFFENSE }, +;21: { VOICECHAT_DEFEND, TEAMTASK_DEFENSE }, +;22: { VOICECHAT_DEFENDFLAG, TEAMTASK_DEFENSE }, +;23: { VOICECHAT_PATROL, TEAMTASK_PATROL }, +;24: { VOICECHAT_CAMP, TEAMTASK_CAMP }, +;25: { VOICECHAT_FOLLOWME, TEAMTASK_FOLLOW }, +;26: { VOICECHAT_RETURNFLAG, TEAMTASK_RETRIEVE }, +;27: { VOICECHAT_FOLLOWFLAGCARRIER, TEAMTASK_ESCORT } +;28:}; +;29: +;30:static const int numValidOrders = sizeof(validOrders) / sizeof(orderTask_t); +;31: +;32:static int CG_ValidOrder(const char *p) { +line 34 +;33: int i; +;34: for (i = 0; i < numValidOrders; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $135 +JUMPV +LABELV $132 +line 35 +;35: if (Q_stricmp(p, validOrders[i].order) == 0) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 validOrders +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $136 +line 36 +;36: return validOrders[i].taskNum; +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 validOrders+4 +ADDP4 +INDIRI4 +RETI4 +ADDRGP4 $131 +JUMPV +LABELV $136 +line 38 +;37: } +;38: } +LABELV $133 +line 34 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $135 +ADDRLP4 0 +INDIRI4 +ADDRGP4 numValidOrders +INDIRI4 +LTI4 $132 +line 39 +;39: return -1; +CNSTI4 -1 +RETI4 +LABELV $131 +endproc CG_ValidOrder 8 8 +proc CG_ParseScores 216 12 +line 48 +;40:} +;41: +;42:/* +;43:================= +;44:CG_ParseScores +;45: +;46:================= +;47:*/ +;48:static void CG_ParseScores( void ) { +line 51 +;49: int i, powerups, readScores; +;50: +;51: cg.numScores = atoi( CG_Argv( 1 ) ); +CNSTI4 1 +ARGI4 +ADDRLP4 12 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cg+5048 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 53 +;52: +;53: readScores = cg.numScores; +ADDRLP4 8 +ADDRGP4 cg+5048 +INDIRI4 +ASGNI4 +line 55 +;54: +;55: if (readScores > MAX_CLIENT_SCORE_SEND) +ADDRLP4 8 +INDIRI4 +CNSTI4 20 +LEI4 $142 +line 56 +;56: { +line 57 +;57: readScores = MAX_CLIENT_SCORE_SEND; +ADDRLP4 8 +CNSTI4 20 +ASGNI4 +line 58 +;58: } +LABELV $142 +line 60 +;59: +;60: if ( cg.numScores > MAX_CLIENTS ) { +ADDRGP4 cg+5048 +INDIRI4 +CNSTI4 32 +LEI4 $144 +line 61 +;61: cg.numScores = MAX_CLIENTS; +ADDRGP4 cg+5048 +CNSTI4 32 +ASGNI4 +line 62 +;62: } +LABELV $144 +line 64 +;63: +;64: cg.numScores = readScores; +ADDRGP4 cg+5048 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 66 +;65: +;66: cg.teamScores[0] = atoi( CG_Argv( 2 ) ); +CNSTI4 2 +ARGI4 +ADDRLP4 20 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRLP4 24 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cg+5056 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 67 +;67: cg.teamScores[1] = atoi( CG_Argv( 3 ) ); +CNSTI4 3 +ARGI4 +ADDRLP4 28 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cg+5056+4 +ADDRLP4 32 +INDIRI4 +ASGNI4 +line 69 +;68: +;69: memset( cg.scores, 0, sizeof( cg.scores ) ); +ADDRGP4 cg+5064 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 1920 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 70 +;70: for ( i = 0 ; i < readScores ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $157 +JUMPV +LABELV $154 +line 72 +;71: // +;72: cg.scores[i].client = atoi( CG_Argv( i * 14 + 4 ) ); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 4 +ADDI4 +ARGI4 +ADDRLP4 40 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRLP4 44 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 73 +;73: cg.scores[i].score = atoi( CG_Argv( i * 14 + 5 ) ); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 5 +ADDI4 +ARGI4 +ADDRLP4 52 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ARGP4 +ADDRLP4 56 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+4 +ADDP4 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 74 +;74: cg.scores[i].ping = atoi( CG_Argv( i * 14 + 6 ) ); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 6 +ADDI4 +ARGI4 +ADDRLP4 64 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRLP4 68 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+8 +ADDP4 +ADDRLP4 68 +INDIRI4 +ASGNI4 +line 75 +;75: cg.scores[i].time = atoi( CG_Argv( i * 14 + 7 ) ); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 7 +ADDI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ARGP4 +ADDRLP4 80 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+12 +ADDP4 +ADDRLP4 80 +INDIRI4 +ASGNI4 +line 76 +;76: cg.scores[i].scoreFlags = atoi( CG_Argv( i * 14 + 8 ) ); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 8 +ADDI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +ARGP4 +ADDRLP4 92 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+16 +ADDP4 +ADDRLP4 92 +INDIRI4 +ASGNI4 +line 77 +;77: powerups = atoi( CG_Argv( i * 14 + 9 ) ); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 9 +ADDI4 +ARGI4 +ADDRLP4 96 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +ARGP4 +ADDRLP4 100 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 100 +INDIRI4 +ASGNI4 +line 78 +;78: cg.scores[i].accuracy = atoi(CG_Argv(i * 14 + 10)); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 10 +ADDI4 +ARGI4 +ADDRLP4 108 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 108 +INDIRP4 +ARGP4 +ADDRLP4 112 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+24 +ADDP4 +ADDRLP4 112 +INDIRI4 +ASGNI4 +line 79 +;79: cg.scores[i].impressiveCount = atoi(CG_Argv(i * 14 + 11)); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 11 +ADDI4 +ARGI4 +ADDRLP4 120 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 120 +INDIRP4 +ARGP4 +ADDRLP4 124 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+28 +ADDP4 +ADDRLP4 124 +INDIRI4 +ASGNI4 +line 80 +;80: cg.scores[i].excellentCount = atoi(CG_Argv(i * 14 + 12)); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 12 +ADDI4 +ARGI4 +ADDRLP4 132 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 132 +INDIRP4 +ARGP4 +ADDRLP4 136 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+32 +ADDP4 +ADDRLP4 136 +INDIRI4 +ASGNI4 +line 81 +;81: cg.scores[i].guantletCount = atoi(CG_Argv(i * 14 + 13)); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 13 +ADDI4 +ARGI4 +ADDRLP4 144 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 144 +INDIRP4 +ARGP4 +ADDRLP4 148 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+36 +ADDP4 +ADDRLP4 148 +INDIRI4 +ASGNI4 +line 82 +;82: cg.scores[i].defendCount = atoi(CG_Argv(i * 14 + 14)); +ADDRLP4 152 +CNSTI4 14 +ASGNI4 +ADDRLP4 152 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRLP4 152 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 160 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 160 +INDIRP4 +ARGP4 +ADDRLP4 164 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+40 +ADDP4 +ADDRLP4 164 +INDIRI4 +ASGNI4 +line 83 +;83: cg.scores[i].assistCount = atoi(CG_Argv(i * 14 + 15)); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 15 +ADDI4 +ARGI4 +ADDRLP4 172 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 172 +INDIRP4 +ARGP4 +ADDRLP4 176 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+44 +ADDP4 +ADDRLP4 176 +INDIRI4 +ASGNI4 +line 84 +;84: cg.scores[i].perfect = atoi(CG_Argv(i * 14 + 16)); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 16 +ADDI4 +ARGI4 +ADDRLP4 184 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 184 +INDIRP4 +ARGP4 +ADDRLP4 188 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+52 +ADDP4 +ADDRLP4 188 +INDIRI4 +ASGNI4 +line 85 +;85: cg.scores[i].captures = atoi(CG_Argv(i * 14 + 17)); +CNSTI4 14 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 17 +ADDI4 +ARGI4 +ADDRLP4 196 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 196 +INDIRP4 +ARGP4 +ADDRLP4 200 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064+48 +ADDP4 +ADDRLP4 200 +INDIRI4 +ASGNI4 +line 87 +;86: +;87: if ( cg.scores[i].client < 0 || cg.scores[i].client >= MAX_CLIENTS ) { +ADDRLP4 204 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 204 +INDIRI4 +ADDRGP4 cg+5064 +ADDP4 +INDIRI4 +CNSTI4 0 +LTI4 $187 +ADDRLP4 204 +INDIRI4 +ADDRGP4 cg+5064 +ADDP4 +INDIRI4 +CNSTI4 32 +LTI4 $183 +LABELV $187 +line 88 +;88: cg.scores[i].client = 0; +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +CNSTI4 0 +ASGNI4 +line 89 +;89: } +LABELV $183 +line 90 +;90: cgs.clientinfo[ cg.scores[i].client ].score = cg.scores[i].score; +ADDRLP4 208 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +CNSTI4 788 +ADDRLP4 208 +INDIRI4 +ADDRGP4 cg+5064 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+108 +ADDP4 +ADDRLP4 208 +INDIRI4 +ADDRGP4 cg+5064+4 +ADDP4 +INDIRI4 +ASGNI4 +line 91 +;91: cgs.clientinfo[ cg.scores[i].client ].powerups = powerups; +CNSTI4 788 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+5064 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+148 +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 93 +;92: +;93: cg.scores[i].team = cgs.clientinfo[cg.scores[i].client].team; +ADDRLP4 212 +CNSTI4 60 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 212 +INDIRI4 +ADDRGP4 cg+5064+56 +ADDP4 +CNSTI4 788 +ADDRLP4 212 +INDIRI4 +ADDRGP4 cg+5064 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+68 +ADDP4 +INDIRI4 +ASGNI4 +line 94 +;94: } +LABELV $155 +line 70 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $157 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $154 +line 95 +;95: CG_SetScoreSelection(NULL); +CNSTP4 0 +ARGP4 +ADDRGP4 CG_SetScoreSelection +CALLV +pop +line 96 +;96:} +LABELV $139 +endproc CG_ParseScores 216 12 +proc CG_ParseTeamInfo 68 4 +line 104 +;97: +;98:/* +;99:================= +;100:CG_ParseTeamInfo +;101: +;102:================= +;103:*/ +;104:static void CG_ParseTeamInfo( void ) { +line 108 +;105: int i; +;106: int client; +;107: +;108: numSortedTeamPlayers = atoi( CG_Argv( 1 ) ); +CNSTI4 1 +ARGI4 +ADDRLP4 8 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 numSortedTeamPlayers +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 110 +;109: +;110: for ( i = 0 ; i < numSortedTeamPlayers ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $206 +JUMPV +LABELV $203 +line 111 +;111: client = atoi( CG_Argv( i * 6 + 2 ) ); +CNSTI4 6 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 2 +ADDI4 +ARGI4 +ADDRLP4 16 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 113 +;112: +;113: sortedTeamPlayers[i] = client; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 sortedTeamPlayers +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 115 +;114: +;115: cgs.clientinfo[ client ].location = atoi( CG_Argv( i * 6 + 3 ) ); +CNSTI4 6 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 3 +ADDI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 788 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+112 +ADDP4 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 116 +;116: cgs.clientinfo[ client ].health = atoi( CG_Argv( i * 6 + 4 ) ); +CNSTI4 6 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 4 +ADDI4 +ARGI4 +ADDRLP4 32 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 788 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+116 +ADDP4 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 117 +;117: cgs.clientinfo[ client ].armor = atoi( CG_Argv( i * 6 + 5 ) ); +CNSTI4 6 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 5 +ADDI4 +ARGI4 +ADDRLP4 40 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRLP4 44 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 788 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+120 +ADDP4 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 118 +;118: cgs.clientinfo[ client ].curWeapon = atoi( CG_Argv( i * 6 + 6 ) ); +ADDRLP4 48 +CNSTI4 6 +ASGNI4 +ADDRLP4 48 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRLP4 48 +INDIRI4 +ADDI4 +ARGI4 +ADDRLP4 52 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ARGP4 +ADDRLP4 56 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 788 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+124 +ADDP4 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 119 +;119: cgs.clientinfo[ client ].powerups = atoi( CG_Argv( i * 6 + 7 ) ); +CNSTI4 6 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 7 +ADDI4 +ARGI4 +ADDRLP4 60 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ARGP4 +ADDRLP4 64 +ADDRGP4 atoi +CALLI4 +ASGNI4 +CNSTI4 788 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+148 +ADDP4 +ADDRLP4 64 +INDIRI4 +ASGNI4 +line 120 +;120: } +LABELV $204 +line 110 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $206 +ADDRLP4 0 +INDIRI4 +ADDRGP4 numSortedTeamPlayers +INDIRI4 +LTI4 $203 +line 121 +;121:} +LABELV $202 +endproc CG_ParseTeamInfo 68 4 +export CG_ParseServerinfo +proc CG_ParseServerinfo 164 16 +line 132 +;122: +;123: +;124:/* +;125:================ +;126:CG_ParseServerinfo +;127: +;128:This is called explicitly when the gamestate is first received, +;129:and whenever the server updates any serverinfo flagged cvars +;130:================ +;131:*/ +;132:void CG_ParseServerinfo( void ) { +line 136 +;133: const char *info; +;134: char *mapname; +;135: +;136: info = CG_ConfigString( CS_SERVERINFO ); +CNSTI4 0 +ARGI4 +ADDRLP4 8 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 137 +;137: cgs.gametype = atoi( Info_ValueForKey( info, "g_gametype" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $219 +ARGP4 +ADDRLP4 12 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+32960 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 138 +;138: trap_Cvar_Set("g_gametype", va("%i", cgs.gametype)); +ADDRGP4 $220 +ARGP4 +ADDRGP4 cgs+32960 +INDIRI4 +ARGI4 +ADDRLP4 20 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $219 +ARGP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 139 +;139: cgs.needpass = atoi( Info_ValueForKey( info, "needpass" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $223 +ARGP4 +ADDRLP4 24 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+32992 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 140 +;140: cgs.jediVmerc = atoi( Info_ValueForKey( info, "g_jediVmerc" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $225 +ARGP4 +ADDRLP4 32 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+32996 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 141 +;141: cgs.wDisable = atoi( Info_ValueForKey( info, "wdisable" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $227 +ARGP4 +ADDRLP4 40 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRLP4 44 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+33000 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 142 +;142: cgs.fDisable = atoi( Info_ValueForKey( info, "fdisable" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $229 +ARGP4 +ADDRLP4 48 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ARGP4 +ADDRLP4 52 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+33004 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 143 +;143: cgs.dmflags = atoi( Info_ValueForKey( info, "dmflags" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $231 +ARGP4 +ADDRLP4 56 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ARGP4 +ADDRLP4 60 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+32964 +ADDRLP4 60 +INDIRI4 +ASGNI4 +line 144 +;144: cgs.teamflags = atoi( Info_ValueForKey( info, "teamflags" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $233 +ARGP4 +ADDRLP4 64 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRLP4 68 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+32968 +ADDRLP4 68 +INDIRI4 +ASGNI4 +line 145 +;145: cgs.fraglimit = atoi( Info_ValueForKey( info, "fraglimit" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $235 +ARGP4 +ADDRLP4 72 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ARGP4 +ADDRLP4 76 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+32972 +ADDRLP4 76 +INDIRI4 +ASGNI4 +line 146 +;146: cgs.duel_fraglimit = atoi( Info_ValueForKey( info, "duel_fraglimit" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $237 +ARGP4 +ADDRLP4 80 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +ARGP4 +ADDRLP4 84 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+32976 +ADDRLP4 84 +INDIRI4 +ASGNI4 +line 147 +;147: cgs.capturelimit = atoi( Info_ValueForKey( info, "capturelimit" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $239 +ARGP4 +ADDRLP4 88 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +ARGP4 +ADDRLP4 92 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+32980 +ADDRLP4 92 +INDIRI4 +ASGNI4 +line 148 +;148: cgs.timelimit = atoi( Info_ValueForKey( info, "timelimit" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $241 +ARGP4 +ADDRLP4 96 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +ARGP4 +ADDRLP4 100 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+32984 +ADDRLP4 100 +INDIRI4 +ASGNI4 +line 149 +;149: cgs.maxclients = atoi( Info_ValueForKey( info, "sv_maxclients" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $243 +ARGP4 +ADDRLP4 104 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 104 +INDIRP4 +ARGP4 +ADDRLP4 108 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+32988 +ADDRLP4 108 +INDIRI4 +ASGNI4 +line 150 +;150: mapname = Info_ValueForKey( info, "mapname" ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $244 +ARGP4 +ADDRLP4 112 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 112 +INDIRP4 +ASGNP4 +line 154 +;151: +;152: +;153: //rww - You must do this one here, Info_ValueForKey always uses the same memory pointer. +;154: trap_Cvar_Set ( "ui_about_mapname", mapname ); +ADDRGP4 $245 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 156 +;155: +;156: Com_sprintf( cgs.mapname, sizeof( cgs.mapname ), "maps/%s.bsp", mapname ); +ADDRGP4 cgs+33008 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $248 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 157 +;157: Q_strncpyz( cgs.redTeam, Info_ValueForKey( info, "g_redTeam" ), sizeof(cgs.redTeam) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $250 +ARGP4 +ADDRLP4 116 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRGP4 cgs+33072 +ARGP4 +ADDRLP4 116 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 158 +;158: trap_Cvar_Set("g_redTeam", cgs.redTeam); +ADDRGP4 $250 +ARGP4 +ADDRGP4 cgs+33072 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 159 +;159: Q_strncpyz( cgs.blueTeam, Info_ValueForKey( info, "g_blueTeam" ), sizeof(cgs.blueTeam) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $254 +ARGP4 +ADDRLP4 120 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRGP4 cgs+33136 +ARGP4 +ADDRLP4 120 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 160 +;160: trap_Cvar_Set("g_blueTeam", cgs.blueTeam); +ADDRGP4 $254 +ARGP4 +ADDRGP4 cgs+33136 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 162 +;161: +;162: trap_Cvar_Set ( "ui_about_gametype", va("%i", cgs.gametype ) ); +ADDRGP4 $220 +ARGP4 +ADDRGP4 cgs+32960 +INDIRI4 +ARGI4 +ADDRLP4 124 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $257 +ARGP4 +ADDRLP4 124 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 163 +;163: trap_Cvar_Set ( "ui_about_fraglimit", va("%i", cgs.fraglimit ) ); +ADDRGP4 $220 +ARGP4 +ADDRGP4 cgs+32972 +INDIRI4 +ARGI4 +ADDRLP4 128 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $259 +ARGP4 +ADDRLP4 128 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 164 +;164: trap_Cvar_Set ( "ui_about_duellimit", va("%i", cgs.duel_fraglimit ) ); +ADDRGP4 $220 +ARGP4 +ADDRGP4 cgs+32976 +INDIRI4 +ARGI4 +ADDRLP4 132 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $261 +ARGP4 +ADDRLP4 132 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 165 +;165: trap_Cvar_Set ( "ui_about_capturelimit", va("%i", cgs.capturelimit ) ); +ADDRGP4 $220 +ARGP4 +ADDRGP4 cgs+32980 +INDIRI4 +ARGI4 +ADDRLP4 136 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $263 +ARGP4 +ADDRLP4 136 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 166 +;166: trap_Cvar_Set ( "ui_about_timelimit", va("%i", cgs.timelimit ) ); +ADDRGP4 $220 +ARGP4 +ADDRGP4 cgs+32984 +INDIRI4 +ARGI4 +ADDRLP4 140 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $265 +ARGP4 +ADDRLP4 140 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 167 +;167: trap_Cvar_Set ( "ui_about_maxclients", va("%i", cgs.maxclients ) ); +ADDRGP4 $220 +ARGP4 +ADDRGP4 cgs+32988 +INDIRI4 +ARGI4 +ADDRLP4 144 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $267 +ARGP4 +ADDRLP4 144 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 168 +;168: trap_Cvar_Set ( "ui_about_dmflags", va("%i", cgs.dmflags ) ); +ADDRGP4 $220 +ARGP4 +ADDRGP4 cgs+32964 +INDIRI4 +ARGI4 +ADDRLP4 148 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $269 +ARGP4 +ADDRLP4 148 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 169 +;169: trap_Cvar_Set ( "ui_about_hostname", Info_ValueForKey( info, "sv_hostname" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $272 +ARGP4 +ADDRLP4 152 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRGP4 $271 +ARGP4 +ADDRLP4 152 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 170 +;170: trap_Cvar_Set ( "ui_about_needpass", Info_ValueForKey( info, "g_needpass" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $274 +ARGP4 +ADDRLP4 156 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRGP4 $273 +ARGP4 +ADDRLP4 156 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 171 +;171: trap_Cvar_Set ( "ui_about_botminplayers", Info_ValueForKey ( info, "bot_minplayers" ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $276 +ARGP4 +ADDRLP4 160 +ADDRGP4 Info_ValueForKey +CALLP4 +ASGNP4 +ADDRGP4 $275 +ARGP4 +ADDRLP4 160 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 172 +;172:} +LABELV $217 +endproc CG_ParseServerinfo 164 16 +proc CG_ParseWarmup 16 4 +line 179 +;173: +;174:/* +;175:================== +;176:CG_ParseWarmup +;177:================== +;178:*/ +;179:static void CG_ParseWarmup( void ) { +line 183 +;180: const char *info; +;181: int warmup; +;182: +;183: info = CG_ConfigString( CS_WARMUP ); +CNSTI4 5 +ARGI4 +ADDRLP4 8 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 185 +;184: +;185: warmup = atoi( info ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 186 +;186: cg.warmupCount = -1; +ADDRGP4 cg+13356 +CNSTI4 -1 +ASGNI4 +line 188 +;187: +;188: cg.warmup = warmup; +ADDRGP4 cg+13352 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 189 +;189:} +LABELV $277 +endproc CG_ParseWarmup 16 4 +export CG_SetConfigValues +proc CG_SetConfigValues 148 4 +line 199 +;190: +;191:/* +;192:================ +;193:CG_SetConfigValues +;194: +;195:Called on load to set the initial values from configure strings +;196:================ +;197:*/ +;198:void CG_SetConfigValues( void ) +;199:{ +line 203 +;200: const char *s; +;201: const char *str; +;202: +;203: cgs.scores1 = atoi( CG_ConfigString( CS_SCORES1 ) ); +CNSTI4 6 +ARGI4 +ADDRLP4 8 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36324 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 204 +;204: cgs.scores2 = atoi( CG_ConfigString( CS_SCORES2 ) ); +CNSTI4 7 +ARGI4 +ADDRLP4 16 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36328 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 205 +;205: cgs.levelStartTime = atoi( CG_ConfigString( CS_LEVEL_START_TIME ) ); +CNSTI4 21 +ARGI4 +ADDRLP4 24 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36320 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 206 +;206: if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +EQI4 $288 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $284 +LABELV $288 +line 207 +;207: s = CG_ConfigString( CS_FLAGSTATUS ); +CNSTI4 23 +ARGI4 +ADDRLP4 32 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 32 +INDIRP4 +ASGNP4 +line 208 +;208: cgs.redflag = s[0] - '0'; +ADDRGP4 cgs+36348 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 48 +SUBI4 +ASGNI4 +line 209 +;209: cgs.blueflag = s[1] - '0'; +ADDRGP4 cgs+36352 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 48 +SUBI4 +ASGNI4 +line 210 +;210: } +LABELV $284 +line 211 +;211: cg.warmup = atoi( CG_ConfigString( CS_WARMUP ) ); +CNSTI4 5 +ARGI4 +ADDRLP4 32 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cg+13352 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 214 +;212: +;213: // Track who the jedi master is +;214: cgs.jediMaster = atoi ( CG_ConfigString ( CS_CLIENT_JEDIMASTER ) ); +CNSTI4 28 +ARGI4 +ADDRLP4 40 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ARGP4 +ADDRLP4 44 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36332 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 215 +;215: cgs.duelWinner = atoi ( CG_ConfigString ( CS_CLIENT_DUELWINNER ) ); +CNSTI4 29 +ARGI4 +ADDRLP4 48 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ARGP4 +ADDRLP4 52 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36336 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 217 +;216: +;217: str = CG_ConfigString(CS_CLIENT_DUELISTS); +CNSTI4 30 +ARGI4 +ADDRLP4 56 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 56 +INDIRP4 +ASGNP4 +line 219 +;218: +;219: if (str && str[0]) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $294 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $294 +line 220 +;220: { +line 222 +;221: char buf[64]; +;222: int c = 0; +ADDRLP4 68 +CNSTI4 0 +ASGNI4 +line 223 +;223: int i = 0; +ADDRLP4 64 +CNSTI4 0 +ASGNI4 +ADDRGP4 $297 +JUMPV +LABELV $296 +line 226 +;224: +;225: while (str[i] && str[i] != '|') +;226: { +line 227 +;227: buf[c] = str[i]; +ADDRLP4 68 +INDIRI4 +ADDRLP4 72 +ADDP4 +ADDRLP4 64 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 228 +;228: c++; +ADDRLP4 68 +ADDRLP4 68 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 229 +;229: i++; +ADDRLP4 64 +ADDRLP4 64 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 230 +;230: } +LABELV $297 +line 225 +ADDRLP4 136 +ADDRLP4 64 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 136 +INDIRI4 +CNSTI4 0 +EQI4 $299 +ADDRLP4 136 +INDIRI4 +CNSTI4 124 +NEI4 $296 +LABELV $299 +line 231 +;231: buf[c] = 0; +ADDRLP4 68 +INDIRI4 +ADDRLP4 72 +ADDP4 +CNSTI1 0 +ASGNI1 +line 233 +;232: +;233: cgs.duelist1 = atoi ( buf ); +ADDRLP4 72 +ARGP4 +ADDRLP4 140 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36340 +ADDRLP4 140 +INDIRI4 +ASGNI4 +line 234 +;234: c = 0; +ADDRLP4 68 +CNSTI4 0 +ASGNI4 +line 236 +;235: +;236: i++; +ADDRLP4 64 +ADDRLP4 64 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRGP4 $302 +JUMPV +LABELV $301 +line 238 +;237: while (str[i]) +;238: { +line 239 +;239: buf[c] = str[i]; +ADDRLP4 68 +INDIRI4 +ADDRLP4 72 +ADDP4 +ADDRLP4 64 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 240 +;240: c++; +ADDRLP4 68 +ADDRLP4 68 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 241 +;241: i++; +ADDRLP4 64 +ADDRLP4 64 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 242 +;242: } +LABELV $302 +line 237 +ADDRLP4 64 +INDIRI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $301 +line 243 +;243: buf[c] = 0; +ADDRLP4 68 +INDIRI4 +ADDRLP4 72 +ADDP4 +CNSTI1 0 +ASGNI1 +line 245 +;244: +;245: cgs.duelist2 = atoi ( buf ); +ADDRLP4 72 +ARGP4 +ADDRLP4 144 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36344 +ADDRLP4 144 +INDIRI4 +ASGNI4 +line 246 +;246: } +LABELV $294 +line 247 +;247:} +LABELV $280 +endproc CG_SetConfigValues 148 4 +export CG_ShaderStateChanged +proc CG_ShaderStateChanged 188 12 +line 254 +;248: +;249:/* +;250:===================== +;251:CG_ShaderStateChanged +;252:===================== +;253:*/ +;254:void CG_ShaderStateChanged(void) { +line 261 +;255: char originalShader[MAX_QPATH]; +;256: char newShader[MAX_QPATH]; +;257: char timeOffset[16]; +;258: const char *o; +;259: char *n,*t; +;260: +;261: o = CG_ConfigString( CS_SHADERSTATE ); +CNSTI4 24 +ARGI4 +ADDRLP4 156 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 156 +INDIRP4 +ASGNP4 +ADDRGP4 $307 +JUMPV +LABELV $306 +line 262 +;262: while (o && *o) { +line 263 +;263: n = strstr(o, "="); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $309 +ARGP4 +ADDRLP4 160 +ADDRGP4 strstr +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 160 +INDIRP4 +ASGNP4 +line 264 +;264: if (n && *n) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $308 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $308 +line 265 +;265: strncpy(originalShader, o, n-o); +ADDRLP4 12 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ARGI4 +ADDRGP4 strncpy +CALLP4 +pop +line 266 +;266: originalShader[n-o] = 0; +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDRLP4 12 +ADDP4 +CNSTI1 0 +ASGNI1 +line 267 +;267: n++; +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 268 +;268: t = strstr(n, ":"); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 $312 +ARGP4 +ADDRLP4 172 +ADDRGP4 strstr +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 172 +INDIRP4 +ASGNP4 +line 269 +;269: if (t && *t) { +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $308 +ADDRLP4 8 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $308 +line 270 +;270: strncpy(newShader, n, t-n); +ADDRLP4 76 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ARGI4 +ADDRGP4 strncpy +CALLP4 +pop +line 271 +;271: newShader[t-n] = 0; +ADDRLP4 8 +INDIRP4 +CVPU4 4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDRLP4 76 +ADDP4 +CNSTI1 0 +ASGNI1 +line 272 +;272: } else { +line 273 +;273: break; +LABELV $314 +line 275 +;274: } +;275: t++; +ADDRLP4 8 +ADDRLP4 8 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 276 +;276: o = strstr(t, "@"); +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRGP4 $315 +ARGP4 +ADDRLP4 180 +ADDRGP4 strstr +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 180 +INDIRP4 +ASGNP4 +line 277 +;277: if (o) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $311 +line 278 +;278: strncpy(timeOffset, t, o-t); +ADDRLP4 140 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ARGI4 +ADDRGP4 strncpy +CALLP4 +pop +line 279 +;279: timeOffset[o-t] = 0; +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDRLP4 140 +ADDP4 +CNSTI1 0 +ASGNI1 +line 280 +;280: o++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 281 +;281: trap_R_RemapShader( originalShader, newShader, timeOffset ); +ADDRLP4 12 +ARGP4 +ADDRLP4 76 +ARGP4 +ADDRLP4 140 +ARGP4 +ADDRGP4 trap_R_RemapShader +CALLV +pop +line 282 +;282: } +line 283 +;283: } else { +line 284 +;284: break; +LABELV $311 +line 286 +;285: } +;286: } +LABELV $307 +line 262 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $318 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $306 +LABELV $318 +LABELV $308 +line 287 +;287:} +LABELV $305 +endproc CG_ShaderStateChanged 188 12 +proc CG_ConfigStringModified 104 12 +line 295 +;288: +;289:/* +;290:================ +;291:CG_ConfigStringModified +;292: +;293:================ +;294:*/ +;295:static void CG_ConfigStringModified( void ) { +line 299 +;296: const char *str; +;297: int num; +;298: +;299: num = atoi( CG_Argv( 1 ) ); +CNSTI4 1 +ARGI4 +ADDRLP4 8 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 303 +;300: +;301: // get the gamestate from the client system, which will have the +;302: // new configstring already integrated +;303: trap_GetGameState( &cgs.gameState ); +ADDRGP4 cgs +ARGP4 +ADDRGP4 trap_GetGameState +CALLV +pop +line 306 +;304: +;305: // look up the individual string that was modified +;306: str = CG_ConfigString( num ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 16 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 309 +;307: +;308: // do something with it if necessary +;309: if ( num == CS_MUSIC ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +NEI4 $320 +line 310 +;310: CG_StartMusic( qtrue ); +CNSTI4 1 +ARGI4 +ADDRGP4 CG_StartMusic +CALLV +pop +line 311 +;311: } else if ( num == CS_SERVERINFO ) { +ADDRGP4 $321 +JUMPV +LABELV $320 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $322 +line 312 +;312: CG_ParseServerinfo(); +ADDRGP4 CG_ParseServerinfo +CALLV +pop +line 313 +;313: } else if ( num == CS_WARMUP ) { +ADDRGP4 $323 +JUMPV +LABELV $322 +ADDRLP4 0 +INDIRI4 +CNSTI4 5 +NEI4 $324 +line 314 +;314: CG_ParseWarmup(); +ADDRGP4 CG_ParseWarmup +CALLV +pop +line 315 +;315: } else if ( num == CS_SCORES1 ) { +ADDRGP4 $325 +JUMPV +LABELV $324 +ADDRLP4 0 +INDIRI4 +CNSTI4 6 +NEI4 $326 +line 316 +;316: cgs.scores1 = atoi( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36324 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 317 +;317: } else if ( num == CS_SCORES2 ) { +ADDRGP4 $327 +JUMPV +LABELV $326 +ADDRLP4 0 +INDIRI4 +CNSTI4 7 +NEI4 $329 +line 318 +;318: cgs.scores2 = atoi( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36328 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 319 +;319: } else if ( num == CS_CLIENT_JEDIMASTER ) { +ADDRGP4 $330 +JUMPV +LABELV $329 +ADDRLP4 0 +INDIRI4 +CNSTI4 28 +NEI4 $332 +line 320 +;320: cgs.jediMaster = atoi ( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36332 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 321 +;321: } else if ( num == CS_CLIENT_DUELWINNER ) { +ADDRGP4 $333 +JUMPV +LABELV $332 +ADDRLP4 0 +INDIRI4 +CNSTI4 29 +NEI4 $335 +line 322 +;322: cgs.duelWinner = atoi ( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36336 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 323 +;323: } else if ( num == CS_CLIENT_DUELISTS ) { +ADDRGP4 $336 +JUMPV +LABELV $335 +ADDRLP4 0 +INDIRI4 +CNSTI4 30 +NEI4 $338 +line 325 +;324: char buf[64]; +;325: int c = 0; +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +line 326 +;326: int i = 0; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRGP4 $341 +JUMPV +LABELV $340 +line 329 +;327: +;328: while (str[i] && str[i] != '|') +;329: { +line 330 +;330: buf[c] = str[i]; +ADDRLP4 24 +INDIRI4 +ADDRLP4 28 +ADDP4 +ADDRLP4 20 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 331 +;331: c++; +ADDRLP4 24 +ADDRLP4 24 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 332 +;332: i++; +ADDRLP4 20 +ADDRLP4 20 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 333 +;333: } +LABELV $341 +line 328 +ADDRLP4 92 +ADDRLP4 20 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 92 +INDIRI4 +CNSTI4 0 +EQI4 $343 +ADDRLP4 92 +INDIRI4 +CNSTI4 124 +NEI4 $340 +LABELV $343 +line 334 +;334: buf[c] = 0; +ADDRLP4 24 +INDIRI4 +ADDRLP4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 336 +;335: +;336: cgs.duelist1 = atoi ( buf ); +ADDRLP4 28 +ARGP4 +ADDRLP4 96 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36340 +ADDRLP4 96 +INDIRI4 +ASGNI4 +line 337 +;337: c = 0; +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +line 339 +;338: +;339: i++; +ADDRLP4 20 +ADDRLP4 20 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRGP4 $346 +JUMPV +LABELV $345 +line 341 +;340: while (str[i]) +;341: { +line 342 +;342: buf[c] = str[i]; +ADDRLP4 24 +INDIRI4 +ADDRLP4 28 +ADDP4 +ADDRLP4 20 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 343 +;343: c++; +ADDRLP4 24 +ADDRLP4 24 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 344 +;344: i++; +ADDRLP4 20 +ADDRLP4 20 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 345 +;345: } +LABELV $346 +line 340 +ADDRLP4 20 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $345 +line 346 +;346: buf[c] = 0; +ADDRLP4 24 +INDIRI4 +ADDRLP4 28 +ADDP4 +CNSTI1 0 +ASGNI1 +line 348 +;347: +;348: cgs.duelist2 = atoi ( buf ); +ADDRLP4 28 +ARGP4 +ADDRLP4 100 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36344 +ADDRLP4 100 +INDIRI4 +ASGNI4 +line 349 +;349: } else if ( num == CS_LEVEL_START_TIME ) { +ADDRGP4 $339 +JUMPV +LABELV $338 +ADDRLP4 0 +INDIRI4 +CNSTI4 21 +NEI4 $349 +line 350 +;350: cgs.levelStartTime = atoi( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+36320 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 351 +;351: } else if ( num == CS_VOTE_TIME ) { +ADDRGP4 $350 +JUMPV +LABELV $349 +ADDRLP4 0 +INDIRI4 +CNSTI4 8 +NEI4 $352 +line 352 +;352: cgs.voteTime = atoi( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+33200 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 353 +;353: cgs.voteModified = qtrue; +ADDRGP4 cgs+33212 +CNSTI4 1 +ASGNI4 +line 354 +;354: } else if ( num == CS_VOTE_YES ) { +ADDRGP4 $353 +JUMPV +LABELV $352 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +NEI4 $356 +line 355 +;355: cgs.voteYes = atoi( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+33204 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 356 +;356: cgs.voteModified = qtrue; +ADDRGP4 cgs+33212 +CNSTI4 1 +ASGNI4 +line 357 +;357: } else if ( num == CS_VOTE_NO ) { +ADDRGP4 $357 +JUMPV +LABELV $356 +ADDRLP4 0 +INDIRI4 +CNSTI4 11 +NEI4 $360 +line 358 +;358: cgs.voteNo = atoi( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cgs+33208 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 359 +;359: cgs.voteModified = qtrue; +ADDRGP4 cgs+33212 +CNSTI4 1 +ASGNI4 +line 360 +;360: } else if ( num == CS_VOTE_STRING ) { +ADDRGP4 $361 +JUMPV +LABELV $360 +ADDRLP4 0 +INDIRI4 +CNSTI4 9 +NEI4 $364 +line 361 +;361: Q_strncpyz( cgs.voteString, str, sizeof( cgs.voteString ) ); +ADDRGP4 cgs+33216 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 362 +;362: } else if ( num >= CS_TEAMVOTE_TIME && num <= CS_TEAMVOTE_TIME + 1) { +ADDRGP4 $365 +JUMPV +LABELV $364 +ADDRLP4 0 +INDIRI4 +CNSTI4 12 +LTI4 $368 +ADDRLP4 0 +INDIRI4 +CNSTI4 13 +GTI4 $368 +line 363 +;363: cgs.teamVoteTime[num-CS_TEAMVOTE_TIME] = atoi( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 24 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+34240-48 +ADDP4 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 364 +;364: cgs.teamVoteModified[num-CS_TEAMVOTE_TIME] = qtrue; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+34264-48 +ADDP4 +CNSTI4 1 +ASGNI4 +line 365 +;365: } else if ( num >= CS_TEAMVOTE_YES && num <= CS_TEAMVOTE_YES + 1) { +ADDRGP4 $369 +JUMPV +LABELV $368 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LTI4 $374 +ADDRLP4 0 +INDIRI4 +CNSTI4 17 +GTI4 $374 +line 366 +;366: cgs.teamVoteYes[num-CS_TEAMVOTE_YES] = atoi( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+34248-64 +ADDP4 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 367 +;367: cgs.teamVoteModified[num-CS_TEAMVOTE_YES] = qtrue; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+34264-64 +ADDP4 +CNSTI4 1 +ASGNI4 +line 368 +;368: } else if ( num >= CS_TEAMVOTE_NO && num <= CS_TEAMVOTE_NO + 1) { +ADDRGP4 $375 +JUMPV +LABELV $374 +ADDRLP4 0 +INDIRI4 +CNSTI4 18 +LTI4 $380 +ADDRLP4 0 +INDIRI4 +CNSTI4 19 +GTI4 $380 +line 369 +;369: cgs.teamVoteNo[num-CS_TEAMVOTE_NO] = atoi( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+34256-72 +ADDP4 +ADDRLP4 32 +INDIRI4 +ASGNI4 +line 370 +;370: cgs.teamVoteModified[num-CS_TEAMVOTE_NO] = qtrue; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+34264-72 +ADDP4 +CNSTI4 1 +ASGNI4 +line 371 +;371: } else if ( num >= CS_TEAMVOTE_STRING && num <= CS_TEAMVOTE_STRING + 1) { +ADDRGP4 $381 +JUMPV +LABELV $380 +ADDRLP4 0 +INDIRI4 +CNSTI4 14 +LTI4 $386 +ADDRLP4 0 +INDIRI4 +CNSTI4 15 +GTI4 $386 +line 372 +;372: Q_strncpyz( cgs.teamVoteString[num-CS_TEAMVOTE_STRING], str, sizeof( cgs.teamVoteString ) ); +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +LSHI4 +ADDRGP4 cgs+34272-14336 +ADDP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 373 +;373: } else if ( num == CS_INTERMISSION ) { +ADDRGP4 $387 +JUMPV +LABELV $386 +ADDRLP4 0 +INDIRI4 +CNSTI4 22 +NEI4 $391 +line 374 +;374: cg.intermissionStarted = atoi( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRGP4 cg+24 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 375 +;375: } else if ( num >= CS_MODELS && num < CS_MODELS+MAX_MODELS ) { +ADDRGP4 $392 +JUMPV +LABELV $391 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +LTI4 $394 +ADDRLP4 0 +INDIRI4 +CNSTI4 288 +GEI4 $394 +line 376 +;376: cgs.gameModels[ num-CS_MODELS ] = trap_R_RegisterModel( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+36364-128 +ADDP4 +ADDRLP4 40 +INDIRI4 +ASGNI4 +line 378 +;377:// GHOUL2 Insert start +;378: } else if ( num >= CS_CHARSKINS && num < CS_CHARSKINS+MAX_CHARSKINS ) { +ADDRGP4 $395 +JUMPV +LABELV $394 +ADDRLP4 0 +INDIRI4 +CNSTI4 576 +LTI4 $398 +ADDRLP4 0 +INDIRI4 +CNSTI4 640 +GEI4 $398 +line 379 +;379: cgs.skins[ num-CS_CHARSKINS ] = trap_R_RegisterSkin( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 44 +ADDRGP4 trap_R_RegisterSkin +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+38668-2304 +ADDP4 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 381 +;380:// Ghoul2 Insert end +;381: } else if ( num >= CS_SOUNDS && num < CS_SOUNDS+MAX_SOUNDS ) { +ADDRGP4 $399 +JUMPV +LABELV $398 +ADDRLP4 0 +INDIRI4 +CNSTI4 288 +LTI4 $402 +ADDRLP4 0 +INDIRI4 +CNSTI4 544 +GEI4 $402 +line 382 +;382: if ( str[0] != '*' ) { // player specific sounds don't register here +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 42 +EQI4 $403 +line 383 +;383: cgs.gameSounds[ num-CS_SOUNDS] = trap_S_RegisterSound( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 48 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+37388-1152 +ADDP4 +ADDRLP4 48 +INDIRI4 +ASGNI4 +line 384 +;384: } +line 385 +;385: } else if ( num >= CS_EFFECTS && num < CS_SOUNDS+MAX_SOUNDS ) { +ADDRGP4 $403 +JUMPV +LABELV $402 +ADDRLP4 0 +INDIRI4 +CNSTI4 768 +LTI4 $408 +ADDRLP4 0 +INDIRI4 +CNSTI4 544 +GEI4 $408 +line 386 +;386: if ( str[0] != '*' ) { // player specific sounds don't register here +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 42 +EQI4 $409 +line 387 +;387: cgs.gameEffects[ num-CS_EFFECTS] = trap_FX_RegisterEffect( str ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 52 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+38412-3072 +ADDP4 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 388 +;388: } +line 389 +;389: } else if ( num >= CS_PLAYERS && num < CS_PLAYERS+MAX_CLIENTS ) { +ADDRGP4 $409 +JUMPV +LABELV $408 +ADDRLP4 0 +INDIRI4 +CNSTI4 544 +LTI4 $414 +ADDRLP4 0 +INDIRI4 +CNSTI4 576 +GEI4 $414 +line 390 +;390: CG_NewClientInfo( num - CS_PLAYERS, qtrue); +ADDRLP4 0 +INDIRI4 +CNSTI4 544 +SUBI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 CG_NewClientInfo +CALLV +pop +line 391 +;391: CG_BuildSpectatorString(); +ADDRGP4 CG_BuildSpectatorString +CALLV +pop +line 392 +;392: } else if ( num == CS_FLAGSTATUS ) { +ADDRGP4 $415 +JUMPV +LABELV $414 +ADDRLP4 0 +INDIRI4 +CNSTI4 23 +NEI4 $416 +line 393 +;393: if( cgs.gametype == GT_CTF || cgs.gametype == GT_CTY ) { +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 7 +EQI4 $422 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $417 +LABELV $422 +line 395 +;394: // format is rb where its red/blue, 0 is at base, 1 is taken, 2 is dropped +;395: cgs.redflag = str[0] - '0'; +ADDRGP4 cgs+36348 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 48 +SUBI4 +ASGNI4 +line 396 +;396: cgs.blueflag = str[1] - '0'; +ADDRGP4 cgs+36352 +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 48 +SUBI4 +ASGNI4 +line 397 +;397: } +line 398 +;398: } +ADDRGP4 $417 +JUMPV +LABELV $416 +line 399 +;399: else if ( num == CS_SHADERSTATE ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 24 +NEI4 $425 +line 400 +;400: CG_ShaderStateChanged(); +ADDRGP4 CG_ShaderStateChanged +CALLV +pop +line 401 +;401: } +ADDRGP4 $426 +JUMPV +LABELV $425 +line 402 +;402: else if ( num >= CS_LIGHT_STYLES && num < CS_LIGHT_STYLES + (MAX_LIGHT_STYLES * 3)) +ADDRLP4 0 +INDIRI4 +CNSTI4 832 +LTI4 $427 +ADDRLP4 0 +INDIRI4 +CNSTI4 1024 +GEI4 $427 +line 403 +;403: { +line 404 +;404: CG_SetLightstyle(num - CS_LIGHT_STYLES); +ADDRLP4 0 +INDIRI4 +CNSTI4 832 +SUBI4 +ARGI4 +ADDRGP4 CG_SetLightstyle +CALLV +pop +line 405 +;405: } +LABELV $427 +LABELV $426 +LABELV $417 +LABELV $415 +LABELV $409 +LABELV $403 +LABELV $399 +LABELV $395 +LABELV $392 +LABELV $387 +LABELV $381 +LABELV $375 +LABELV $369 +LABELV $365 +LABELV $361 +LABELV $357 +LABELV $353 +LABELV $350 +LABELV $339 +LABELV $336 +LABELV $333 +LABELV $330 +LABELV $327 +LABELV $325 +LABELV $323 +LABELV $321 +line 407 +;406: +;407:} +LABELV $319 +endproc CG_ConfigStringModified 104 12 +proc CG_AddToTeamChat 60 0 +line 416 +;408: +;409: +;410:/* +;411:======================= +;412:CG_AddToTeamChat +;413: +;414:======================= +;415:*/ +;416:static void CG_AddToTeamChat( const char *str ) { +line 422 +;417: int len; +;418: char *p, *ls; +;419: int lastcolor; +;420: int chatHeight; +;421: +;422: if (cg_teamChatHeight.integer < TEAMCHAT_HEIGHT) { +ADDRGP4 cg_teamChatHeight+12 +INDIRI4 +CNSTI4 8 +GEI4 $430 +line 423 +;423: chatHeight = cg_teamChatHeight.integer; +ADDRLP4 12 +ADDRGP4 cg_teamChatHeight+12 +INDIRI4 +ASGNI4 +line 424 +;424: } else { +ADDRGP4 $431 +JUMPV +LABELV $430 +line 425 +;425: chatHeight = TEAMCHAT_HEIGHT; +ADDRLP4 12 +CNSTI4 8 +ASGNI4 +line 426 +;426: } +LABELV $431 +line 428 +;427: +;428: if (chatHeight <= 0 || cg_teamChatTime.integer <= 0) { +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 20 +INDIRI4 +LEI4 $437 +ADDRGP4 cg_teamChatTime+12 +INDIRI4 +ADDRLP4 20 +INDIRI4 +GTI4 $434 +LABELV $437 +line 430 +;429: // team chat disabled, dump into normal chat +;430: cgs.teamChatPos = cgs.teamLastChatPos = 0; +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRGP4 cgs+70204 +ADDRLP4 24 +INDIRI4 +ASGNI4 +ADDRGP4 cgs+70200 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 431 +;431: return; +ADDRGP4 $429 +JUMPV +LABELV $434 +line 434 +;432: } +;433: +;434: len = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 436 +;435: +;436: p = cgs.teamChatMsgs[cgs.teamChatPos % chatHeight]; +ADDRLP4 0 +CNSTI4 241 +ADDRGP4 cgs+70200 +INDIRI4 +ADDRLP4 12 +INDIRI4 +MODI4 +MULI4 +ADDRGP4 cgs+68240 +ADDP4 +ASGNP4 +line 437 +;437: *p = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 439 +;438: +;439: lastcolor = '7'; +ADDRLP4 16 +CNSTI4 55 +ASGNI4 +line 441 +;440: +;441: ls = NULL; +ADDRLP4 8 +CNSTP4 0 +ASGNP4 +ADDRGP4 $443 +JUMPV +LABELV $442 +line 442 +;442: while (*str) { +line 443 +;443: if (len > TEAMCHAT_WIDTH - 1) { +ADDRLP4 4 +INDIRI4 +CNSTI4 79 +LEI4 $445 +line 444 +;444: if (ls) { +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $447 +line 445 +;445: str -= (p - ls); +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +SUBP4 +ASGNP4 +line 446 +;446: str++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 447 +;447: p -= (p - ls); +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +SUBP4 +ASGNP4 +line 448 +;448: } +LABELV $447 +line 449 +;449: *p = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 451 +;450: +;451: cgs.teamChatMsgTimes[cgs.teamChatPos % chatHeight] = cg.time; +ADDRGP4 cgs+70200 +INDIRI4 +ADDRLP4 12 +INDIRI4 +MODI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70168 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 453 +;452: +;453: cgs.teamChatPos++; +ADDRLP4 24 +ADDRGP4 cgs+70200 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 454 +;454: p = cgs.teamChatMsgs[cgs.teamChatPos % chatHeight]; +ADDRLP4 0 +CNSTI4 241 +ADDRGP4 cgs+70200 +INDIRI4 +ADDRLP4 12 +INDIRI4 +MODI4 +MULI4 +ADDRGP4 cgs+68240 +ADDP4 +ASGNP4 +line 455 +;455: *p = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 456 +;456: *p++ = Q_COLOR_ESCAPE; +ADDRLP4 28 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 28 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI1 94 +ASGNI1 +line 457 +;457: *p++ = lastcolor; +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 32 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 16 +INDIRI4 +CVII1 4 +ASGNI1 +line 458 +;458: len = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 459 +;459: ls = NULL; +ADDRLP4 8 +CNSTP4 0 +ASGNP4 +line 460 +;460: } +LABELV $445 +line 462 +;461: +;462: if ( Q_IsColorString( str ) ) { +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $455 +ADDRLP4 28 +CNSTI4 94 +ASGNI4 +ADDRLP4 24 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 28 +INDIRI4 +NEI4 $455 +ADDRLP4 32 +ADDRLP4 24 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $455 +ADDRLP4 32 +INDIRI4 +ADDRLP4 28 +INDIRI4 +EQI4 $455 +ADDRLP4 32 +INDIRI4 +CNSTI4 55 +GTI4 $455 +ADDRLP4 32 +INDIRI4 +CNSTI4 48 +LTI4 $455 +line 463 +;463: *p++ = *str++; +ADDRLP4 36 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 36 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 40 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRI1 +ASGNI1 +line 464 +;464: lastcolor = *str; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 465 +;465: *p++ = *str++; +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 56 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 48 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 52 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRI1 +ASGNI1 +line 466 +;466: continue; +ADDRGP4 $443 +JUMPV +LABELV $455 +line 468 +;467: } +;468: if (*str == ' ') { +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 32 +NEI4 $457 +line 469 +;469: ls = p; +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 470 +;470: } +LABELV $457 +line 471 +;471: *p++ = *str++; +ADDRLP4 36 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 36 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 40 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRI1 +ASGNI1 +line 472 +;472: len++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 473 +;473: } +LABELV $443 +line 442 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $442 +line 474 +;474: *p = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 476 +;475: +;476: cgs.teamChatMsgTimes[cgs.teamChatPos % chatHeight] = cg.time; +ADDRGP4 cgs+70200 +INDIRI4 +ADDRLP4 12 +INDIRI4 +MODI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70168 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 477 +;477: cgs.teamChatPos++; +ADDRLP4 24 +ADDRGP4 cgs+70200 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 479 +;478: +;479: if (cgs.teamChatPos - cgs.teamLastChatPos > chatHeight) +ADDRGP4 cgs+70200 +INDIRI4 +ADDRGP4 cgs+70204 +INDIRI4 +SUBI4 +ADDRLP4 12 +INDIRI4 +LEI4 $463 +line 480 +;480: cgs.teamLastChatPos = cgs.teamChatPos - chatHeight; +ADDRGP4 cgs+70204 +ADDRGP4 cgs+70200 +INDIRI4 +ADDRLP4 12 +INDIRI4 +SUBI4 +ASGNI4 +LABELV $463 +line 481 +;481:} +LABELV $429 +endproc CG_AddToTeamChat 60 0 +export CG_KillCEntityInstances +proc CG_KillCEntityInstances 12 4 +line 486 +;482: +;483:void CG_LoadClientInfo( clientInfo_t *ci ); +;484: +;485:void CG_KillCEntityInstances() +;486:{ +line 487 +;487: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $471 +JUMPV +LABELV $470 +line 490 +;488: +;489: while (i < MAX_GENTITIES) +;490: { +line 491 +;491: if (i >= MAX_CLIENTS) +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +LTI4 $473 +line 492 +;492: { //do not clear G2 instances on client ents, they are constant +line 493 +;493: if (cg_entities[i].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[i].ghoul2)) +ADDRLP4 4 +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $475 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $475 +line 494 +;494: { +line 495 +;495: trap_G2API_CleanGhoul2Models(&(cg_entities[i].ghoul2)); +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_CleanGhoul2Models +CALLV +pop +line 496 +;496: } +LABELV $475 +line 497 +;497: } +LABELV $473 +line 518 +;498: /* +;499: else +;500: { //we must do this, because otherwise after a map_restart it seems to return bad angles in matrices produced by GetBoltMatrix +;501: if (cgs.clientinfo[i].ghoul2Model || cg_entities[i].ghoul2) +;502: { +;503: CG_LoadClientInfo(&cgs.clientinfo[i]); +;504: +;505: if (cg_entities[i].ghoul2 != cgs.clientinfo[i].ghoul2Model) +;506: { +;507: if (cg_entities[i].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[i].ghoul2)) +;508: { +;509: trap_G2API_CleanGhoul2Models(&(cg_entities[i].ghoul2)); +;510: } +;511: +;512: trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[i].ghoul2Model, &cg_entities[i].ghoul2); +;513: } +;514: } +;515: } +;516: */ +;517: +;518: cg_entities[i].isATST = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1028 +ADDP4 +CNSTI4 0 +ASGNI4 +line 519 +;519: cg_entities[i].atstFootClang = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1032 +ADDP4 +CNSTI4 0 +ASGNI4 +line 520 +;520: cg_entities[i].atstSwinging = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1036 +ADDP4 +CNSTI4 0 +ASGNI4 +line 521 +;521: cg_entities[i].bolt1 = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+984 +ADDP4 +CNSTI4 0 +ASGNI4 +line 522 +;522: cg_entities[i].bolt2 = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+988 +ADDP4 +CNSTI4 0 +ASGNI4 +line 523 +;523: cg_entities[i].bolt3 = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+992 +ADDP4 +CNSTI4 0 +ASGNI4 +line 524 +;524: cg_entities[i].bolt4 = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+996 +ADDP4 +CNSTI4 0 +ASGNI4 +line 526 +;525: +;526: cg_entities[i].saberLength = SABER_LENGTH_MAX; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1000 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 527 +;527: cg_entities[i].saberExtendTime = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1004 +ADDP4 +CNSTI4 0 +ASGNI4 +line 529 +;528: +;529: cg_entities[i].boltInfo = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+980 +ADDP4 +CNSTI4 0 +ASGNI4 +line 531 +;530: +;531: cg_entities[i].frame_minus1_refreshed = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1464 +ADDP4 +CNSTI4 0 +ASGNI4 +line 532 +;532: cg_entities[i].frame_minus2_refreshed = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1468 +ADDP4 +CNSTI4 0 +ASGNI4 +line 533 +;533: cg_entities[i].dustTrailTime = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+616 +ADDP4 +CNSTI4 0 +ASGNI4 +line 534 +;534: cg_entities[i].ghoul2weapon = NULL; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 536 +;535:// cg_entities[i].torsoBolt = 0; +;536: cg_entities[i].trailTime = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+612 +ADDP4 +CNSTI4 0 +ASGNI4 +line 537 +;537: cg_entities[i].frame_hold_time = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1684 +ADDP4 +CNSTI4 0 +ASGNI4 +line 538 +;538: cg_entities[i].frame_hold_refreshed = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1688 +ADDP4 +CNSTI4 0 +ASGNI4 +line 539 +;539: cg_entities[i].trickAlpha = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1904 +ADDP4 +CNSTI4 0 +ASGNI4 +line 540 +;540: cg_entities[i].trickAlphaTime = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1908 +ADDP4 +CNSTI4 0 +ASGNI4 +line 541 +;541: VectorClear(cg_entities[i].turAngles); +ADDRLP4 4 +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg_entities+1016+8 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg_entities+1016+4 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg_entities+1016 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 542 +;542: cg_entities[i].weapon = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+956 +ADDP4 +CNSTI4 0 +ASGNI4 +line 543 +;543: cg_entities[i].teamPowerEffectTime = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1912 +ADDP4 +CNSTI4 0 +ASGNI4 +line 544 +;544: cg_entities[i].teamPowerType = 0; +CNSTI4 1920 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+1916 +ADDP4 +CNSTI4 0 +ASGNI4 +line 546 +;545: +;546: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 547 +;547: } +LABELV $471 +line 489 +ADDRLP4 0 +INDIRI4 +CNSTI4 1024 +LTI4 $470 +line 548 +;548:} +LABELV $469 +endproc CG_KillCEntityInstances 12 4 +proc CG_MapRestart 12 12 +line 561 +;549: +;550:/* +;551:=============== +;552:CG_MapRestart +;553: +;554:The server has issued a map_restart, so the next snapshot +;555:is completely new and should not be interpolated to. +;556: +;557:A tournement restart will clear everything, but doesn't +;558:require a reload of all the media +;559:=============== +;560:*/ +;561:static void CG_MapRestart( void ) { +line 562 +;562: if ( cg_showmiss.integer ) { +ADDRGP4 cg_showmiss+12 +INDIRI4 +CNSTI4 0 +EQI4 $508 +line 563 +;563: CG_Printf( "CG_MapRestart\n" ); +ADDRGP4 $511 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 564 +;564: } +LABELV $508 +line 566 +;565: +;566: CG_InitLocalEntities(); +ADDRGP4 CG_InitLocalEntities +CALLV +pop +line 567 +;567: CG_InitMarkPolys(); +ADDRGP4 CG_InitMarkPolys +CALLV +pop +line 568 +;568: CG_ClearParticles (); +ADDRGP4 CG_ClearParticles +CALLV +pop +line 569 +;569: CG_KillCEntityInstances(); +ADDRGP4 CG_KillCEntityInstances +CALLV +pop +line 572 +;570: +;571: // make sure the "3 frags left" warnings play again +;572: cg.fraglimitWarnings = 0; +ADDRGP4 cg+80 +CNSTI4 0 +ASGNI4 +line 574 +;573: +;574: cg.timelimitWarnings = 0; +ADDRGP4 cg+76 +CNSTI4 0 +ASGNI4 +line 576 +;575: +;576: cg.intermissionStarted = qfalse; +ADDRGP4 cg+24 +CNSTI4 0 +ASGNI4 +line 578 +;577: +;578: cgs.voteTime = 0; +ADDRGP4 cgs+33200 +CNSTI4 0 +ASGNI4 +line 580 +;579: +;580: cg.mapRestart = qtrue; +ADDRGP4 cg+84 +CNSTI4 1 +ASGNI4 +line 582 +;581: +;582: CG_StartMusic(qtrue); +CNSTI4 1 +ARGI4 +ADDRGP4 CG_StartMusic +CALLV +pop +line 584 +;583: +;584: trap_S_ClearLoopingSounds(qtrue); +CNSTI4 1 +ARGI4 +ADDRGP4 trap_S_ClearLoopingSounds +CALLV +pop +line 589 +;585: +;586: // we really should clear more parts of cg here and stop sounds +;587: +;588: // play the "fight" sound if this is a restart without warmup +;589: if ( cg.warmup == 0 /* && cgs.gametype == GT_TOURNAMENT */) { +ADDRGP4 cg+13352 +INDIRI4 +CNSTI4 0 +NEI4 $517 +line 590 +;590: trap_S_StartLocalSound( cgs.media.countFightSound, CHAN_ANNOUNCER ); +ADDRGP4 cgs+70296+852 +INDIRI4 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 591 +;591: CG_CenterPrint( CG_GetStripEdString("SVINGAME", "BEGIN_DUEL"), 120, GIANTCHAR_WIDTH*2 ); +ADDRGP4 $522 +ARGP4 +ADDRGP4 $523 +ARGP4 +ADDRLP4 0 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 120 +ARGI4 +CNSTI4 64 +ARGI4 +ADDRGP4 CG_CenterPrint +CALLV +pop +line 592 +;592: } +LABELV $517 +line 593 +;593: if (cg_singlePlayerActive.integer) { +ADDRGP4 cg_singlePlayerActive+12 +INDIRI4 +CNSTI4 0 +EQI4 $524 +line 594 +;594: trap_Cvar_Set("ui_matchStartTime", va("%i", cg.time)); +ADDRGP4 $220 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $527 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 595 +;595: if (cg_recordSPDemo.integer && cg_recordSPDemoName.string && *cg_recordSPDemoName.string) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_recordSPDemo+12 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $529 +ADDRGP4 cg_recordSPDemoName+16 +CVPU4 4 +CNSTU4 0 +EQU4 $529 +ADDRGP4 cg_recordSPDemoName+16 +INDIRI1 +CVII4 1 +ADDRLP4 4 +INDIRI4 +EQI4 $529 +line 596 +;596: trap_SendConsoleCommand(va("set g_synchronousclients 1 ; record %s \n", cg_recordSPDemoName.string)); +ADDRGP4 $534 +ARGP4 +ADDRGP4 cg_recordSPDemoName+16 +ARGP4 +ADDRLP4 8 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 597 +;597: } +LABELV $529 +line 598 +;598: } +LABELV $524 +line 599 +;599: trap_Cvar_Set("cg_thirdPerson", "0"); +ADDRGP4 $536 +ARGP4 +ADDRGP4 $537 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 600 +;600:} +LABELV $507 +endproc CG_MapRestart 12 12 +export CG_ParseVoiceChats +proc CG_ParseVoiceChats 16504 16 +line 639 +;601: +;602:#define MAX_VOICEFILESIZE 16384 +;603:#define MAX_VOICEFILES 8 +;604:#define MAX_VOICECHATS 64 +;605:#define MAX_VOICESOUNDS 64 +;606:#define MAX_CHATSIZE 64 +;607:#define MAX_HEADMODELS 64 +;608: +;609:typedef struct voiceChat_s +;610:{ +;611: char id[64]; +;612: int numSounds; +;613: sfxHandle_t sounds[MAX_VOICESOUNDS]; +;614: char chats[MAX_VOICESOUNDS][MAX_CHATSIZE]; +;615:} voiceChat_t; +;616: +;617:typedef struct voiceChatList_s +;618:{ +;619: char name[64]; +;620: int gender; +;621: int numVoiceChats; +;622: voiceChat_t voiceChats[MAX_VOICECHATS]; +;623:} voiceChatList_t; +;624: +;625:typedef struct headModelVoiceChat_s +;626:{ +;627: char headmodel[64]; +;628: int voiceChatNum; +;629:} headModelVoiceChat_t; +;630: +;631:voiceChatList_t voiceChatLists[MAX_VOICEFILES]; +;632://headModelVoiceChat_t headModelVoiceChat[MAX_HEADMODELS]; +;633: +;634:/* +;635:================= +;636:CG_ParseVoiceChats +;637:================= +;638:*/ +;639:int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChatList, int maxVoiceChats ) { +line 648 +;640: int len, i; +;641: fileHandle_t f; +;642: char buf[MAX_VOICEFILESIZE]; +;643: char **p, *ptr; +;644: char *token; +;645: voiceChat_t *voiceChats; +;646: qboolean compress; +;647: +;648: compress = qtrue; +ADDRLP4 16412 +CNSTI4 1 +ASGNI4 +line 649 +;649: if (cg_buildScript.integer) { +ADDRGP4 cg_buildScript+12 +INDIRI4 +CNSTI4 0 +EQI4 $539 +line 650 +;650: compress = qfalse; +ADDRLP4 16412 +CNSTI4 0 +ASGNI4 +line 651 +;651: } +LABELV $539 +line 653 +;652: +;653: len = trap_FS_FOpenFile( filename, &f, FS_READ ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 20 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 16416 +ADDRGP4 trap_FS_FOpenFile +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 16416 +INDIRI4 +ASGNI4 +line 654 +;654: if ( !f ) { +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $542 +line 655 +;655: trap_Print( va( S_COLOR_RED "voice chat file not found: %s\n", filename ) ); +ADDRGP4 $544 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16420 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 16420 +INDIRP4 +ARGP4 +ADDRGP4 trap_Print +CALLV +pop +line 656 +;656: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $538 +JUMPV +LABELV $542 +line 658 +;657: } +;658: if ( len >= MAX_VOICEFILESIZE ) { +ADDRLP4 16 +INDIRI4 +CNSTI4 16384 +LTI4 $545 +line 659 +;659: trap_Print( va( S_COLOR_RED "voice chat file too large: %s is %i, max allowed is %i", filename, len, MAX_VOICEFILESIZE ) ); +ADDRGP4 $547 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16 +INDIRI4 +ARGI4 +CNSTI4 16384 +ARGI4 +ADDRLP4 16420 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 16420 +INDIRP4 +ARGP4 +ADDRGP4 trap_Print +CALLV +pop +line 660 +;660: trap_FS_FCloseFile( f ); +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_FCloseFile +CALLV +pop +line 661 +;661: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $538 +JUMPV +LABELV $545 +line 664 +;662: } +;663: +;664: trap_FS_Read( buf, len, f ); +ADDRLP4 24 +ARGP4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_Read +CALLV +pop +line 665 +;665: buf[len] = 0; +ADDRLP4 16 +INDIRI4 +ADDRLP4 24 +ADDP4 +CNSTI1 0 +ASGNI1 +line 666 +;666: trap_FS_FCloseFile( f ); +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_FCloseFile +CALLV +pop +line 668 +;667: +;668: ptr = buf; +ADDRLP4 16408 +ADDRLP4 24 +ASGNP4 +line 669 +;669: p = &ptr; +ADDRLP4 8 +ADDRLP4 16408 +ASGNP4 +line 671 +;670: +;671: Com_sprintf(voiceChatList->name, sizeof(voiceChatList->name), "%s", filename); +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $548 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 672 +;672: voiceChats = voiceChatList->voiceChats; +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +CNSTI4 72 +ADDP4 +ASGNP4 +line 673 +;673: for ( i = 0; i < maxVoiceChats; i++ ) { +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRGP4 $552 +JUMPV +LABELV $549 +line 674 +;674: voiceChats[i].id[0] = 0; +CNSTI4 4420 +ADDRLP4 12 +INDIRI4 +MULI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 675 +;675: } +LABELV $550 +line 673 +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $552 +ADDRLP4 12 +INDIRI4 +ADDRFP4 8 +INDIRI4 +LTI4 $549 +line 676 +;676: token = COM_ParseExt((const char **)p, qtrue); +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 16420 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16420 +INDIRP4 +ASGNP4 +line 677 +;677: if (!token || token[0] == 0) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $555 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $553 +LABELV $555 +line 678 +;678: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $538 +JUMPV +LABELV $553 +line 680 +;679: } +;680: if (!Q_stricmp(token, "female")) { +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $558 +ARGP4 +ADDRLP4 16428 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 16428 +INDIRI4 +CNSTI4 0 +NEI4 $556 +line 681 +;681: voiceChatList->gender = GENDER_FEMALE; +ADDRFP4 4 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 1 +ASGNI4 +line 682 +;682: } +ADDRGP4 $557 +JUMPV +LABELV $556 +line 683 +;683: else if (!Q_stricmp(token, "male")) { +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $561 +ARGP4 +ADDRLP4 16432 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 16432 +INDIRI4 +CNSTI4 0 +NEI4 $559 +line 684 +;684: voiceChatList->gender = GENDER_MALE; +ADDRFP4 4 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 0 +ASGNI4 +line 685 +;685: } +ADDRGP4 $560 +JUMPV +LABELV $559 +line 686 +;686: else if (!Q_stricmp(token, "neuter")) { +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $564 +ARGP4 +ADDRLP4 16436 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 16436 +INDIRI4 +CNSTI4 0 +NEI4 $562 +line 687 +;687: voiceChatList->gender = GENDER_NEUTER; +ADDRFP4 4 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTI4 2 +ASGNI4 +line 688 +;688: } +ADDRGP4 $563 +JUMPV +LABELV $562 +line 689 +;689: else { +line 690 +;690: trap_Print( va( S_COLOR_RED "expected gender not found in voice chat file: %s\n", filename ) ); +ADDRGP4 $565 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16440 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 16440 +INDIRP4 +ARGP4 +ADDRGP4 trap_Print +CALLV +pop +line 691 +;691: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $538 +JUMPV +LABELV $563 +LABELV $560 +LABELV $557 +line 694 +;692: } +;693: +;694: voiceChatList->numVoiceChats = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $567 +JUMPV +LABELV $566 +line 695 +;695: while ( 1 ) { +line 696 +;696: token = COM_ParseExt((const char **)p, qtrue); +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 16440 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16440 +INDIRP4 +ASGNP4 +line 697 +;697: if (!token || token[0] == 0) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $571 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $569 +LABELV $571 +line 698 +;698: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $538 +JUMPV +LABELV $569 +line 700 +;699: } +;700: Com_sprintf(voiceChats[voiceChatList->numVoiceChats].id, sizeof( voiceChats[voiceChatList->numVoiceChats].id ), "%s", token); +CNSTI4 4420 +ADDRFP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +MULI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 $548 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 701 +;701: token = COM_ParseExt((const char **)p, qtrue); +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 16448 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16448 +INDIRP4 +ASGNP4 +line 702 +;702: if (Q_stricmp(token, "{")) { +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $574 +ARGP4 +ADDRLP4 16452 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 16452 +INDIRI4 +CNSTI4 0 +EQI4 $572 +line 703 +;703: trap_Print( va( S_COLOR_RED "expected { found %s in voice chat file: %s\n", token, filename ) ); +ADDRGP4 $575 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16456 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 16456 +INDIRP4 +ARGP4 +ADDRGP4 trap_Print +CALLV +pop +line 704 +;704: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $538 +JUMPV +LABELV $572 +line 706 +;705: } +;706: voiceChats[voiceChatList->numVoiceChats].numSounds = 0; +CNSTI4 4420 +ADDRFP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +MULI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +CNSTI4 64 +ADDP4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $577 +JUMPV +LABELV $576 +line 707 +;707: while(1) { +line 708 +;708: token = COM_ParseExt((const char **)p, qtrue); +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 16456 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16456 +INDIRP4 +ASGNP4 +line 709 +;709: if (!token || token[0] == 0) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $581 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $579 +LABELV $581 +line 710 +;710: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $538 +JUMPV +LABELV $579 +line 712 +;711: } +;712: if (!Q_stricmp(token, "}")) +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $584 +ARGP4 +ADDRLP4 16464 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 16464 +INDIRI4 +CNSTI4 0 +NEI4 $582 +line 713 +;713: break; +ADDRGP4 $578 +JUMPV +LABELV $582 +line 714 +;714: voiceChats[voiceChatList->numVoiceChats].sounds[voiceChats[voiceChatList->numVoiceChats].numSounds] = +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16468 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 16472 +CNSTI4 68 +ASGNI4 +ADDRLP4 16476 +CNSTI4 4420 +ADDRFP4 4 +INDIRP4 +ADDRLP4 16472 +INDIRI4 +ADDP4 +INDIRI4 +MULI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +ASGNP4 +ADDRLP4 16476 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 16476 +INDIRP4 +ADDRLP4 16472 +INDIRI4 +ADDP4 +ADDP4 +ADDRLP4 16468 +INDIRI4 +ASGNI4 +line 716 +;715: trap_S_RegisterSound( token ); +;716: token = COM_ParseExt((const char **)p, qtrue); +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 16480 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16480 +INDIRP4 +ASGNP4 +line 717 +;717: if (!token || token[0] == 0) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $587 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $585 +LABELV $587 +line 718 +;718: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $538 +JUMPV +LABELV $585 +line 720 +;719: } +;720: Com_sprintf(voiceChats[voiceChatList->numVoiceChats].chats[ +ADDRLP4 16488 +CNSTI4 4420 +ADDRFP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +MULI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +ASGNP4 +ADDRLP4 16492 +CNSTI4 64 +ASGNI4 +ADDRLP4 16488 +INDIRP4 +ADDRLP4 16492 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 6 +LSHI4 +ADDRLP4 16488 +INDIRP4 +CNSTI4 324 +ADDP4 +ADDP4 +ARGP4 +ADDRLP4 16492 +INDIRI4 +ARGI4 +ADDRGP4 $548 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 722 +;721: voiceChats[voiceChatList->numVoiceChats].numSounds], MAX_CHATSIZE, "%s", token); +;722: voiceChats[voiceChatList->numVoiceChats].numSounds++; +ADDRLP4 16496 +CNSTI4 4420 +ADDRFP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +MULI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +CNSTI4 64 +ADDP4 +ASGNP4 +ADDRLP4 16496 +INDIRP4 +ADDRLP4 16496 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 723 +;723: if (voiceChats[voiceChatList->numVoiceChats].numSounds >= MAX_VOICESOUNDS) +ADDRLP4 16500 +CNSTI4 64 +ASGNI4 +CNSTI4 4420 +ADDRFP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +MULI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +ADDRLP4 16500 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 16500 +INDIRI4 +LTI4 $588 +line 724 +;724: break; +ADDRGP4 $578 +JUMPV +LABELV $588 +line 725 +;725: } +LABELV $577 +line 707 +ADDRGP4 $576 +JUMPV +LABELV $578 +line 726 +;726: voiceChatList->numVoiceChats++; +ADDRLP4 16456 +ADDRFP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 16456 +INDIRP4 +ADDRLP4 16456 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 727 +;727: if (voiceChatList->numVoiceChats >= maxVoiceChats) +ADDRFP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ADDRFP4 8 +INDIRI4 +LTI4 $590 +line 728 +;728: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $538 +JUMPV +LABELV $590 +line 729 +;729: } +LABELV $567 +line 695 +ADDRGP4 $566 +JUMPV +line 730 +;730: return qtrue; +CNSTI4 1 +RETI4 +LABELV $538 +endproc CG_ParseVoiceChats 16504 16 +export CG_LoadVoiceChats +proc CG_LoadVoiceChats 12 12 +line 738 +;731:} +;732: +;733:/* +;734:================= +;735:CG_LoadVoiceChats +;736:================= +;737:*/ +;738:void CG_LoadVoiceChats( void ) { +line 741 +;739: int size; +;740: +;741: size = trap_MemoryRemaining(); +ADDRLP4 4 +ADDRGP4 trap_MemoryRemaining +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 742 +;742: CG_ParseVoiceChats( "scripts/female1.voice", &voiceChatLists[0], MAX_VOICECHATS ); +ADDRGP4 $593 +ARGP4 +ADDRGP4 voiceChatLists +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 CG_ParseVoiceChats +CALLI4 +pop +line 743 +;743: CG_ParseVoiceChats( "scripts/female2.voice", &voiceChatLists[1], MAX_VOICECHATS ); +ADDRGP4 $594 +ARGP4 +ADDRGP4 voiceChatLists+282952 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 CG_ParseVoiceChats +CALLI4 +pop +line 744 +;744: CG_ParseVoiceChats( "scripts/female3.voice", &voiceChatLists[2], MAX_VOICECHATS ); +ADDRGP4 $596 +ARGP4 +ADDRGP4 voiceChatLists+565904 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 CG_ParseVoiceChats +CALLI4 +pop +line 745 +;745: CG_ParseVoiceChats( "scripts/male1.voice", &voiceChatLists[3], MAX_VOICECHATS ); +ADDRGP4 $598 +ARGP4 +ADDRGP4 voiceChatLists+848856 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 CG_ParseVoiceChats +CALLI4 +pop +line 746 +;746: CG_ParseVoiceChats( "scripts/male2.voice", &voiceChatLists[4], MAX_VOICECHATS ); +ADDRGP4 $600 +ARGP4 +ADDRGP4 voiceChatLists+1131808 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 CG_ParseVoiceChats +CALLI4 +pop +line 747 +;747: CG_ParseVoiceChats( "scripts/male3.voice", &voiceChatLists[5], MAX_VOICECHATS ); +ADDRGP4 $602 +ARGP4 +ADDRGP4 voiceChatLists+1414760 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 CG_ParseVoiceChats +CALLI4 +pop +line 748 +;748: CG_ParseVoiceChats( "scripts/male4.voice", &voiceChatLists[6], MAX_VOICECHATS ); +ADDRGP4 $604 +ARGP4 +ADDRGP4 voiceChatLists+1697712 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 CG_ParseVoiceChats +CALLI4 +pop +line 749 +;749: CG_ParseVoiceChats( "scripts/male5.voice", &voiceChatLists[7], MAX_VOICECHATS ); +ADDRGP4 $606 +ARGP4 +ADDRGP4 voiceChatLists+1980664 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 CG_ParseVoiceChats +CALLI4 +pop +line 750 +;750: CG_Printf("voice chat memory size = %d\n", size - trap_MemoryRemaining()); +ADDRLP4 8 +ADDRGP4 trap_MemoryRemaining +CALLI4 +ASGNI4 +ADDRGP4 $608 +ARGP4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +SUBI4 +ARGI4 +ADDRGP4 CG_Printf +CALLV +pop +line 751 +;751:} +LABELV $592 +endproc CG_LoadVoiceChats 12 12 +export CG_HeadModelVoiceChats +proc CG_HeadModelVoiceChats 16424 16 +line 758 +;752: +;753:/* +;754:================= +;755:CG_HeadModelVoiceChats +;756:================= +;757:*/ +;758:int CG_HeadModelVoiceChats( char *filename ) { +line 765 +;759: int len, i; +;760: fileHandle_t f; +;761: char buf[MAX_VOICEFILESIZE]; +;762: char **p, *ptr; +;763: char *token; +;764: +;765: len = trap_FS_FOpenFile( filename, &f, FS_READ ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 16408 +ADDRGP4 trap_FS_FOpenFile +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 16408 +INDIRI4 +ASGNI4 +line 766 +;766: if ( !f ) { +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $610 +line 768 +;767: //trap_Print( va( "voice chat file not found: %s\n", filename ) ); +;768: return -1; +CNSTI4 -1 +RETI4 +ADDRGP4 $609 +JUMPV +LABELV $610 +line 770 +;769: } +;770: if ( len >= MAX_VOICEFILESIZE ) { +ADDRLP4 8 +INDIRI4 +CNSTI4 16384 +LTI4 $612 +line 771 +;771: trap_Print( va( S_COLOR_RED "voice chat file too large: %s is %i, max allowed is %i", filename, len, MAX_VOICEFILESIZE ) ); +ADDRGP4 $547 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 16384 +ARGI4 +ADDRLP4 16412 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 16412 +INDIRP4 +ARGP4 +ADDRGP4 trap_Print +CALLV +pop +line 772 +;772: trap_FS_FCloseFile( f ); +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_FCloseFile +CALLV +pop +line 773 +;773: return -1; +CNSTI4 -1 +RETI4 +ADDRGP4 $609 +JUMPV +LABELV $612 +line 776 +;774: } +;775: +;776: trap_FS_Read( buf, len, f ); +ADDRLP4 16 +ARGP4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_Read +CALLV +pop +line 777 +;777: buf[len] = 0; +ADDRLP4 8 +INDIRI4 +ADDRLP4 16 +ADDP4 +CNSTI1 0 +ASGNI1 +line 778 +;778: trap_FS_FCloseFile( f ); +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRGP4 trap_FS_FCloseFile +CALLV +pop +line 780 +;779: +;780: ptr = buf; +ADDRLP4 16404 +ADDRLP4 16 +ASGNP4 +line 781 +;781: p = &ptr; +ADDRLP4 16400 +ADDRLP4 16404 +ASGNP4 +line 783 +;782: +;783: token = COM_ParseExt((const char **)p, qtrue); +ADDRLP4 16400 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 16412 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 16412 +INDIRP4 +ASGNP4 +line 784 +;784: if (!token || token[0] == 0) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $616 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $614 +LABELV $616 +line 785 +;785: return -1; +CNSTI4 -1 +RETI4 +ADDRGP4 $609 +JUMPV +LABELV $614 +line 788 +;786: } +;787: +;788: for ( i = 0; i < MAX_VOICEFILES; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $617 +line 789 +;789: if ( !Q_stricmp(token, voiceChatLists[i].name) ) { +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTI4 282952 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 voiceChatLists +ADDP4 +ARGP4 +ADDRLP4 16420 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 16420 +INDIRI4 +CNSTI4 0 +NEI4 $621 +line 790 +;790: return i; +ADDRLP4 0 +INDIRI4 +RETI4 +ADDRGP4 $609 +JUMPV +LABELV $621 +line 792 +;791: } +;792: } +LABELV $618 +line 788 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 8 +LTI4 $617 +line 796 +;793: +;794: //FIXME: maybe try to load the .voice file which name is stored in token? +;795: +;796: return -1; +CNSTI4 -1 +RETI4 +LABELV $609 +endproc CG_HeadModelVoiceChats 16424 16 +export CG_GetVoiceChat +proc CG_GetVoiceChat 16 8 +line 805 +;797:} +;798: +;799: +;800:/* +;801:================= +;802:CG_GetVoiceChat +;803:================= +;804:*/ +;805:int CG_GetVoiceChat( voiceChatList_t *voiceChatList, const char *id, sfxHandle_t *snd, char **chat) { +line 808 +;806: int i, rnd; +;807: +;808: for ( i = 0; i < voiceChatList->numVoiceChats; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $627 +JUMPV +LABELV $624 +line 809 +;809: if ( !Q_stricmp( id, voiceChatList->voiceChats[i].id ) ) { +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTI4 4420 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $628 +line 810 +;810: rnd = random() * voiceChatList->voiceChats[i].numSounds; +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 12 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTI4 4420 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDP4 +CNSTI4 64 +ADDP4 +INDIRI4 +CVIF4 4 +MULF4 +CVFI4 4 +ASGNI4 +line 811 +;811: *snd = voiceChatList->voiceChats[i].sounds[rnd]; +ADDRFP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +CNSTI4 4420 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDP4 +CNSTI4 68 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 812 +;812: *chat = voiceChatList->voiceChats[i].chats[rnd]; +ADDRFP4 12 +INDIRP4 +ADDRLP4 4 +INDIRI4 +CNSTI4 6 +LSHI4 +CNSTI4 4420 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDP4 +CNSTI4 324 +ADDP4 +ADDP4 +ASGNP4 +line 813 +;813: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $623 +JUMPV +LABELV $628 +line 815 +;814: } +;815: } +LABELV $625 +line 808 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $627 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +LTI4 $624 +line 816 +;816: return qfalse; +CNSTI4 0 +RETI4 +LABELV $623 +endproc CG_GetVoiceChat 16 8 +export CG_VoiceChatListForClient +proc CG_VoiceChatListForClient 8 0 +line 824 +;817:} +;818: +;819:/* +;820:================= +;821:CG_VoiceChatListForClient +;822:================= +;823:*/ +;824:voiceChatList_t *CG_VoiceChatListForClient( int clientNum ) { +line 827 +;825: clientInfo_t *ci; +;826: +;827: if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { +ADDRLP4 4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +LTI4 $633 +ADDRLP4 4 +INDIRI4 +CNSTI4 32 +LTI4 $631 +LABELV $633 +line 828 +;828: clientNum = 0; +ADDRFP4 0 +CNSTI4 0 +ASGNI4 +line 829 +;829: } +LABELV $631 +line 830 +;830: ci = &cgs.clientinfo[ clientNum ]; +ADDRLP4 0 +CNSTI4 788 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 910 +;831:/* +;832: int voiceChatNum, i, j, k, gender; +;833: char filename[MAX_QPATH], headModelName[MAX_QPATH]; +;834: +;835: for ( k = 0; k < 2; k++ ) { +;836: if ( k == 0 ) { +;837: if (ci->headModelName[0] == '*') { +;838: Com_sprintf( headModelName, sizeof(headModelName), "%s/%s", ci->headModelName+1, ci->headSkinName ); +;839: } +;840: else { +;841: Com_sprintf( headModelName, sizeof(headModelName), "%s/%s", ci->headModelName, ci->headSkinName ); +;842: } +;843: } +;844: else { +;845: if (ci->headModelName[0] == '*') { +;846: Com_sprintf( headModelName, sizeof(headModelName), "%s", ci->headModelName+1 ); +;847: } +;848: else { +;849: Com_sprintf( headModelName, sizeof(headModelName), "%s", ci->headModelName ); +;850: } +;851: } +;852: // find the voice file for the head model the client uses +;853: for ( i = 0; i < MAX_HEADMODELS; i++ ) { +;854: if (!Q_stricmp(headModelVoiceChat[i].headmodel, headModelName)) { +;855: break; +;856: } +;857: } +;858: if (i < MAX_HEADMODELS) { +;859: return &voiceChatLists[headModelVoiceChat[i].voiceChatNum]; +;860: } +;861: // find a .vc file +;862: for ( i = 0; i < MAX_HEADMODELS; i++ ) { +;863: if (!strlen(headModelVoiceChat[i].headmodel)) { +;864: Com_sprintf(filename, sizeof(filename), "scripts/%s.vc", headModelName); +;865: voiceChatNum = CG_HeadModelVoiceChats(filename); +;866: if (voiceChatNum == -1) +;867: break; +;868: Com_sprintf(headModelVoiceChat[i].headmodel, sizeof ( headModelVoiceChat[i].headmodel ), +;869: "%s", headModelName); +;870: headModelVoiceChat[i].voiceChatNum = voiceChatNum; +;871: return &voiceChatLists[headModelVoiceChat[i].voiceChatNum]; +;872: } +;873: } +;874: } +;875: gender = ci->gender; +;876: for (k = 0; k < 2; k++) { +;877: // just pick the first with the right gender +;878: for ( i = 0; i < MAX_VOICEFILES; i++ ) { +;879: if (strlen(voiceChatLists[i].name)) { +;880: if (voiceChatLists[i].gender == gender) { +;881: // store this head model with voice chat for future reference +;882: for ( j = 0; j < MAX_HEADMODELS; j++ ) { +;883: if (!strlen(headModelVoiceChat[j].headmodel)) { +;884: Com_sprintf(headModelVoiceChat[j].headmodel, sizeof ( headModelVoiceChat[j].headmodel ), +;885: "%s", headModelName); +;886: headModelVoiceChat[j].voiceChatNum = i; +;887: break; +;888: } +;889: } +;890: return &voiceChatLists[i]; +;891: } +;892: } +;893: } +;894: // fall back to male gender because we don't have neuter in the mission pack +;895: if (gender == GENDER_MALE) +;896: break; +;897: gender = GENDER_MALE; +;898: } +;899: // store this head model with voice chat for future reference +;900: for ( j = 0; j < MAX_HEADMODELS; j++ ) { +;901: if (!strlen(headModelVoiceChat[j].headmodel)) { +;902: Com_sprintf(headModelVoiceChat[j].headmodel, sizeof ( headModelVoiceChat[j].headmodel ), +;903: "%s", headModelName); +;904: headModelVoiceChat[j].voiceChatNum = 0; +;905: break; +;906: } +;907: } +;908: */ +;909: // just return the first voice chat list +;910: return &voiceChatLists[0]; +ADDRGP4 voiceChatLists +RETP4 +LABELV $630 +endproc CG_VoiceChatListForClient 8 0 +export CG_PlayVoiceChat +proc CG_PlayVoiceChat 8 12 +line 931 +;911:} +;912: +;913:#define MAX_VOICECHATBUFFER 32 +;914: +;915:typedef struct bufferedVoiceChat_s +;916:{ +;917: int clientNum; +;918: sfxHandle_t snd; +;919: int voiceOnly; +;920: char cmd[MAX_SAY_TEXT]; +;921: char message[MAX_SAY_TEXT]; +;922:} bufferedVoiceChat_t; +;923: +;924:bufferedVoiceChat_t voiceChatBuffer[MAX_VOICECHATBUFFER]; +;925: +;926:/* +;927:================= +;928:CG_PlayVoiceChat +;929:================= +;930:*/ +;931:void CG_PlayVoiceChat( bufferedVoiceChat_t *vchat ) { +line 933 +;932: // if we are going into the intermission, don't start any voices +;933: if ( cg.intermissionStarted ) { +ADDRGP4 cg+24 +INDIRI4 +CNSTI4 0 +EQI4 $636 +line 934 +;934: return; +ADDRGP4 $635 +JUMPV +LABELV $636 +line 937 +;935: } +;936: +;937: if ( !cg_noVoiceChats.integer ) { +ADDRGP4 cg_noVoiceChats+12 +INDIRI4 +CNSTI4 0 +NEI4 $639 +line 938 +;938: trap_S_StartLocalSound( vchat->snd, CHAN_VOICE); +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 939 +;939: if (vchat->clientNum != cg.snap->ps.clientNum) { +ADDRFP4 0 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +EQI4 $642 +line 940 +;940: int orderTask = CG_ValidOrder(vchat->cmd); +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 CG_ValidOrder +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 941 +;941: if (orderTask > 0) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LEI4 $645 +line 942 +;942: cgs.acceptOrderTime = cg.time + 5000; +ADDRGP4 cgs+70252 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 5000 +ADDI4 +ASGNI4 +line 943 +;943: Q_strncpyz(cgs.acceptVoice, vchat->cmd, sizeof(cgs.acceptVoice)); +ADDRGP4 cgs+70264 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +CNSTI4 32 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 944 +;944: cgs.acceptTask = orderTask; +ADDRGP4 cgs+70256 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 945 +;945: cgs.acceptLeader = vchat->clientNum; +ADDRGP4 cgs+70260 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +line 946 +;946: } +LABELV $645 +line 948 +;947: // see if this was an order +;948: CG_ShowResponseHead(); +ADDRGP4 CG_ShowResponseHead +CALLV +pop +line 949 +;949: } +LABELV $642 +line 950 +;950: } +LABELV $639 +line 951 +;951: if (!vchat->voiceOnly && !cg_noVoiceText.integer) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +NEI4 $653 +ADDRGP4 cg_noVoiceText+12 +INDIRI4 +ADDRLP4 0 +INDIRI4 +NEI4 $653 +line 952 +;952: CG_AddToTeamChat( vchat->message ); +ADDRFP4 0 +INDIRP4 +CNSTI4 162 +ADDP4 +ARGP4 +ADDRGP4 CG_AddToTeamChat +CALLV +pop +line 953 +;953: CG_Printf( "%s\n", vchat->message ); +ADDRGP4 $656 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 162 +ADDP4 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 954 +;954: } +LABELV $653 +line 955 +;955: voiceChatBuffer[cg.voiceChatBufferOut].snd = 0; +CNSTI4 312 +ADDRGP4 cg+13348 +INDIRI4 +MULI4 +ADDRGP4 voiceChatBuffer+4 +ADDP4 +CNSTI4 0 +ASGNI4 +line 956 +;956:} +LABELV $635 +endproc CG_PlayVoiceChat 8 12 +export CG_PlayBufferedVoiceChats +proc CG_PlayBufferedVoiceChats 0 4 +line 963 +;957: +;958:/* +;959:===================== +;960:CG_PlayBufferedVoieChats +;961:===================== +;962:*/ +;963:void CG_PlayBufferedVoiceChats( void ) { +line 964 +;964: if ( cg.voiceChatTime < cg.time ) { +ADDRGP4 cg+13340 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $660 +line 965 +;965: if (cg.voiceChatBufferOut != cg.voiceChatBufferIn && voiceChatBuffer[cg.voiceChatBufferOut].snd) { +ADDRGP4 cg+13348 +INDIRI4 +ADDRGP4 cg+13344 +INDIRI4 +EQI4 $664 +CNSTI4 312 +ADDRGP4 cg+13348 +INDIRI4 +MULI4 +ADDRGP4 voiceChatBuffer+4 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $664 +line 967 +;966: // +;967: CG_PlayVoiceChat(&voiceChatBuffer[cg.voiceChatBufferOut]); +CNSTI4 312 +ADDRGP4 cg+13348 +INDIRI4 +MULI4 +ADDRGP4 voiceChatBuffer +ADDP4 +ARGP4 +ADDRGP4 CG_PlayVoiceChat +CALLV +pop +line 969 +;968: // +;969: cg.voiceChatBufferOut = (cg.voiceChatBufferOut + 1) % MAX_VOICECHATBUFFER; +ADDRGP4 cg+13348 +ADDRGP4 cg+13348 +INDIRI4 +CNSTI4 1 +ADDI4 +CNSTI4 32 +MODI4 +ASGNI4 +line 970 +;970: cg.voiceChatTime = cg.time + 1000; +ADDRGP4 cg+13340 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 1000 +ADDI4 +ASGNI4 +line 971 +;971: } +LABELV $664 +line 972 +;972: } +LABELV $660 +line 973 +;973:} +LABELV $659 +endproc CG_PlayBufferedVoiceChats 0 4 +export CG_AddBufferedVoiceChat +proc CG_AddBufferedVoiceChat 8 12 +line 980 +;974: +;975:/* +;976:===================== +;977:CG_AddBufferedVoiceChat +;978:===================== +;979:*/ +;980:void CG_AddBufferedVoiceChat( bufferedVoiceChat_t *vchat ) { +line 982 +;981: // if we are going into the intermission, don't start any voices +;982: if ( cg.intermissionStarted ) { +ADDRGP4 cg+24 +INDIRI4 +CNSTI4 0 +EQI4 $676 +line 983 +;983: return; +ADDRGP4 $675 +JUMPV +LABELV $676 +line 986 +;984: } +;985: +;986: memcpy(&voiceChatBuffer[cg.voiceChatBufferIn], vchat, sizeof(bufferedVoiceChat_t)); +ADDRLP4 0 +CNSTI4 312 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+13344 +INDIRI4 +MULI4 +ADDRGP4 voiceChatBuffer +ADDP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 987 +;987: cg.voiceChatBufferIn = (cg.voiceChatBufferIn + 1) % MAX_VOICECHATBUFFER; +ADDRGP4 cg+13344 +ADDRGP4 cg+13344 +INDIRI4 +CNSTI4 1 +ADDI4 +CNSTI4 32 +MODI4 +ASGNI4 +line 988 +;988: if (cg.voiceChatBufferIn == cg.voiceChatBufferOut) { +ADDRGP4 cg+13344 +INDIRI4 +ADDRGP4 cg+13348 +INDIRI4 +NEI4 $682 +line 989 +;989: CG_PlayVoiceChat( &voiceChatBuffer[cg.voiceChatBufferOut] ); +CNSTI4 312 +ADDRGP4 cg+13348 +INDIRI4 +MULI4 +ADDRGP4 voiceChatBuffer +ADDP4 +ARGP4 +ADDRGP4 CG_PlayVoiceChat +CALLV +pop +line 990 +;990: cg.voiceChatBufferOut++; +ADDRLP4 4 +ADDRGP4 cg+13348 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 991 +;991: } +LABELV $682 +line 992 +;992:} +LABELV $675 +endproc CG_AddBufferedVoiceChat 8 12 +export CG_VoiceChatLocal +proc CG_VoiceChatLocal 340 28 +line 999 +;993: +;994:/* +;995:================= +;996:CG_VoiceChatLocal +;997:================= +;998:*/ +;999:void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color, const char *cmd ) { +line 1007 +;1000: char *chat; +;1001: voiceChatList_t *voiceChatList; +;1002: clientInfo_t *ci; +;1003: sfxHandle_t snd; +;1004: bufferedVoiceChat_t vchat; +;1005: +;1006: // if we are going into the intermission, don't start any voices +;1007: if ( cg.intermissionStarted ) { +ADDRGP4 cg+24 +INDIRI4 +CNSTI4 0 +EQI4 $689 +line 1008 +;1008: return; +ADDRGP4 $688 +JUMPV +LABELV $689 +line 1011 +;1009: } +;1010: +;1011: if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) { +ADDRLP4 328 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 328 +INDIRI4 +CNSTI4 0 +LTI4 $694 +ADDRLP4 328 +INDIRI4 +CNSTI4 32 +LTI4 $692 +LABELV $694 +line 1012 +;1012: clientNum = 0; +ADDRFP4 8 +CNSTI4 0 +ASGNI4 +line 1013 +;1013: } +LABELV $692 +line 1014 +;1014: ci = &cgs.clientinfo[ clientNum ]; +ADDRLP4 320 +CNSTI4 788 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 1016 +;1015: +;1016: cgs.currentVoiceClient = clientNum; +ADDRGP4 cgs+70248 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 1018 +;1017: +;1018: voiceChatList = CG_VoiceChatListForClient( clientNum ); +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 332 +ADDRGP4 CG_VoiceChatListForClient +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 332 +INDIRP4 +ASGNP4 +line 1020 +;1019: +;1020: if ( CG_GetVoiceChat( voiceChatList, cmd, &snd, &chat ) ) { +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRLP4 324 +ARGP4 +ADDRLP4 316 +ARGP4 +ADDRLP4 336 +ADDRGP4 CG_GetVoiceChat +CALLI4 +ASGNI4 +ADDRLP4 336 +INDIRI4 +CNSTI4 0 +EQI4 $697 +line 1022 +;1021: // +;1022: if ( mode == SAY_TEAM || !cg_teamChatsOnly.integer ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +EQI4 $702 +ADDRGP4 cg_teamChatsOnly+12 +INDIRI4 +CNSTI4 0 +NEI4 $699 +LABELV $702 +line 1023 +;1023: vchat.clientNum = clientNum; +ADDRLP4 4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 1024 +;1024: vchat.snd = snd; +ADDRLP4 4+4 +ADDRLP4 324 +INDIRI4 +ASGNI4 +line 1025 +;1025: vchat.voiceOnly = voiceOnly; +ADDRLP4 4+8 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 1026 +;1026: Q_strncpyz(vchat.cmd, cmd, sizeof(vchat.cmd)); +ADDRLP4 4+12 +ARGP4 +ADDRFP4 16 +INDIRP4 +ARGP4 +CNSTI4 150 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1027 +;1027: if ( mode == SAY_TELL ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 2 +NEI4 $707 +line 1028 +;1028: Com_sprintf(vchat.message, sizeof(vchat.message), "[%s]: %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat); +ADDRLP4 4+162 +ARGP4 +CNSTI4 150 +ARGI4 +ADDRGP4 $711 +ARGP4 +ADDRLP4 320 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +CNSTI4 94 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRLP4 316 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1029 +;1029: } +ADDRGP4 $708 +JUMPV +LABELV $707 +line 1030 +;1030: else if ( mode == SAY_TEAM ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +NEI4 $712 +line 1031 +;1031: Com_sprintf(vchat.message, sizeof(vchat.message), "(%s): %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat); +ADDRLP4 4+162 +ARGP4 +CNSTI4 150 +ARGI4 +ADDRGP4 $716 +ARGP4 +ADDRLP4 320 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +CNSTI4 94 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRLP4 316 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1032 +;1032: } +ADDRGP4 $713 +JUMPV +LABELV $712 +line 1033 +;1033: else { +line 1034 +;1034: Com_sprintf(vchat.message, sizeof(vchat.message), "%s: %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat); +ADDRLP4 4+162 +ARGP4 +CNSTI4 150 +ARGI4 +ADDRGP4 $719 +ARGP4 +ADDRLP4 320 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +CNSTI4 94 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRLP4 316 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1035 +;1035: } +LABELV $713 +LABELV $708 +line 1036 +;1036: CG_AddBufferedVoiceChat(&vchat); +ADDRLP4 4 +ARGP4 +ADDRGP4 CG_AddBufferedVoiceChat +CALLV +pop +line 1037 +;1037: } +LABELV $699 +line 1038 +;1038: } +LABELV $697 +line 1039 +;1039:} +LABELV $688 +endproc CG_VoiceChatLocal 340 28 +export CG_VoiceChat +proc CG_VoiceChat 64 20 +line 1046 +;1040: +;1041:/* +;1042:================= +;1043:CG_VoiceChat +;1044:================= +;1045:*/ +;1046:void CG_VoiceChat( int mode ) { +line 1051 +;1047: const char *cmd; +;1048: int clientNum, color; +;1049: qboolean voiceOnly; +;1050: +;1051: voiceOnly = atoi(CG_Argv(1)); +CNSTI4 1 +ARGI4 +ADDRLP4 16 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 1052 +;1052: clientNum = atoi(CG_Argv(2)); +CNSTI4 2 +ARGI4 +ADDRLP4 24 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 1053 +;1053: color = atoi(CG_Argv(3)); +CNSTI4 3 +ARGI4 +ADDRLP4 32 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 1054 +;1054: cmd = CG_Argv(4); +CNSTI4 4 +ARGI4 +ADDRLP4 40 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 40 +INDIRP4 +ASGNP4 +line 1056 +;1055: +;1056: if (cg_noTaunt.integer != 0) { +ADDRGP4 cg_noTaunt+12 +INDIRI4 +CNSTI4 0 +EQI4 $721 +line 1057 +;1057: if (!strcmp(cmd, VOICECHAT_KILLINSULT) || !strcmp(cmd, VOICECHAT_TAUNT) || \ +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $726 +ARGP4 +ADDRLP4 44 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +EQI4 $734 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $727 +ARGP4 +ADDRLP4 48 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +EQI4 $734 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $728 +ARGP4 +ADDRLP4 52 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +EQI4 $734 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $729 +ARGP4 +ADDRLP4 56 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $734 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $730 +ARGP4 +ADDRLP4 60 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 0 +NEI4 $724 +LABELV $734 +line 1060 +;1058: !strcmp(cmd, VOICECHAT_DEATHINSULT) || !strcmp(cmd, VOICECHAT_KILLGAUNTLET) || \ +;1059: !strcmp(cmd, VOICECHAT_PRAISE)) { +;1060: return; +ADDRGP4 $720 +JUMPV +LABELV $724 +line 1062 +;1061: } +;1062: } +LABELV $721 +line 1064 +;1063: +;1064: CG_VoiceChatLocal( mode, voiceOnly, clientNum, color, cmd ); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_VoiceChatLocal +CALLV +pop +line 1065 +;1065:} +LABELV $720 +endproc CG_VoiceChat 64 20 +proc CG_RemoveChatEscapeChar 16 0 +line 1072 +;1066: +;1067:/* +;1068:================= +;1069:CG_RemoveChatEscapeChar +;1070:================= +;1071:*/ +;1072:static void CG_RemoveChatEscapeChar( char *text ) { +line 1075 +;1073: int i, l; +;1074: +;1075: l = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 1076 +;1076: for ( i = 0; text[i]; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $739 +JUMPV +LABELV $736 +line 1077 +;1077: if (text[i] == '\x19') +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 25 +NEI4 $740 +line 1078 +;1078: continue; +ADDRGP4 $737 +JUMPV +LABELV $740 +line 1079 +;1079: text[l++] = text[i]; +ADDRLP4 8 +ADDRLP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 12 +INDIRP4 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 1080 +;1080: } +LABELV $737 +line 1076 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $739 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $736 +line 1081 +;1081: text[l] = '\0'; +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 1082 +;1082:} +LABELV $735 +endproc CG_RemoveChatEscapeChar 16 0 +export CG_CheckSVStripEdRef +proc CG_CheckSVStripEdRef 1084 12 +line 1087 +;1083: +;1084:#define MAX_STRIPED_SV_STRING 1024 +;1085: +;1086:void CG_CheckSVStripEdRef(char *buf, const char *str) +;1087:{ //I don't really like doing this. But it utilizes the system that was already in place. +line 1088 +;1088: int i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 1089 +;1089: int b = 0; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 1090 +;1090: int strLen = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 1091 +;1091: qboolean gotStrip = qfalse; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 1093 +;1092: +;1093: if (!str || !str[0]) +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $745 +ADDRLP4 16 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $743 +LABELV $745 +line 1094 +;1094: { +line 1095 +;1095: if (str) +ADDRFP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $742 +line 1096 +;1096: { +line 1097 +;1097: strcpy(buf, str); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 1098 +;1098: } +line 1099 +;1099: return; +ADDRGP4 $742 +JUMPV +LABELV $743 +line 1102 +;1100: } +;1101: +;1102: strcpy(buf, str); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 1104 +;1103: +;1104: strLen = strlen(str); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 1106 +;1105: +;1106: if (strLen >= MAX_STRIPED_SV_STRING) +ADDRLP4 4 +INDIRI4 +CNSTI4 1024 +LTI4 $751 +line 1107 +;1107: { +line 1108 +;1108: return; +ADDRGP4 $742 +JUMPV +LABELV $750 +line 1112 +;1109: } +;1110: +;1111: while (i < strLen && str[i]) +;1112: { +line 1113 +;1113: gotStrip = qfalse; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 1115 +;1114: +;1115: if (str[i] == '@' && (i+1) < strLen) +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 64 +NEI4 $753 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ADDRLP4 4 +INDIRI4 +GEI4 $753 +line 1116 +;1116: { +line 1117 +;1117: if (str[i+1] == '@' && (i+2) < strLen) +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 64 +NEI4 $755 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +ADDI4 +ADDRLP4 4 +INDIRI4 +GEI4 $755 +line 1118 +;1118: { +line 1119 +;1119: if (str[i+2] == '@' && (i+3) < strLen) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +ADDI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 64 +NEI4 $757 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +ADDI4 +ADDRLP4 4 +INDIRI4 +GEI4 $757 +line 1120 +;1120: { //@@@ should mean to insert a striped reference here, so insert it into buf at the current place +line 1122 +;1121: char stripRef[MAX_STRIPED_SV_STRING]; +;1122: int r = 0; +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRGP4 $760 +JUMPV +LABELV $759 +line 1125 +;1123: +;1124: while (i < strLen && str[i] == '@') +;1125: { +line 1126 +;1126: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1127 +;1127: } +LABELV $760 +line 1124 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +GEI4 $762 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 64 +EQI4 $759 +LABELV $762 +ADDRGP4 $764 +JUMPV +LABELV $763 +line 1130 +;1128: +;1129: while (i < strLen && str[i] && str[i] != ' ' && str[i] != ':' && str[i] != '.' && str[i] != '\n') +;1130: { +line 1131 +;1131: stripRef[r] = str[i]; +ADDRLP4 36 +INDIRI4 +ADDRLP4 40 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 1132 +;1132: r++; +ADDRLP4 36 +ADDRLP4 36 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1133 +;1133: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1134 +;1134: } +LABELV $764 +line 1129 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +GEI4 $770 +ADDRLP4 1072 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 1072 +INDIRI4 +CNSTI4 0 +EQI4 $770 +ADDRLP4 1072 +INDIRI4 +CNSTI4 32 +EQI4 $770 +ADDRLP4 1072 +INDIRI4 +CNSTI4 58 +EQI4 $770 +ADDRLP4 1072 +INDIRI4 +CNSTI4 46 +EQI4 $770 +ADDRLP4 1072 +INDIRI4 +CNSTI4 10 +NEI4 $763 +LABELV $770 +line 1135 +;1135: stripRef[r] = 0; +ADDRLP4 36 +INDIRI4 +ADDRLP4 40 +ADDP4 +CNSTI1 0 +ASGNI1 +line 1137 +;1136: +;1137: buf[b] = 0; +ADDRLP4 12 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 1138 +;1138: Q_strcat(buf, MAX_STRIPED_SV_STRING, CG_GetStripEdString("SVINGAME", stripRef)); +ADDRGP4 $522 +ARGP4 +ADDRLP4 40 +ARGP4 +ADDRLP4 1076 +ADDRGP4 CG_GetStripEdString +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRLP4 1076 +INDIRP4 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 1139 +;1139: b = strlen(buf); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 1080 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 1080 +INDIRI4 +ASGNI4 +line 1140 +;1140: } +LABELV $757 +line 1141 +;1141: } +LABELV $755 +line 1142 +;1142: } +LABELV $753 +line 1144 +;1143: +;1144: if (!gotStrip) +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $771 +line 1145 +;1145: { +line 1146 +;1146: buf[b] = str[i]; +ADDRLP4 12 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +ASGNI1 +line 1147 +;1147: b++; +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1148 +;1148: } +LABELV $771 +line 1149 +;1149: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1150 +;1150: } +LABELV $751 +line 1111 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +GEI4 $773 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $750 +LABELV $773 +line 1152 +;1151: +;1152: buf[b] = 0; +ADDRLP4 12 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 1153 +;1153:} +LABELV $742 +endproc CG_CheckSVStripEdRef 1084 12 +proc CG_ServerCommand 1404 20 +line 1163 +;1154: +;1155:/* +;1156:================= +;1157:CG_ServerCommand +;1158: +;1159:The string has been tokenized and can be retrieved with +;1160:Cmd_Argc() / Cmd_Argv() +;1161:================= +;1162:*/ +;1163:static void CG_ServerCommand( void ) { +line 1167 +;1164: const char *cmd; +;1165: char text[MAX_SAY_TEXT]; +;1166: +;1167: cmd = CG_Argv(0); +CNSTI4 0 +ARGI4 +ADDRLP4 156 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 156 +INDIRP4 +ASGNP4 +line 1169 +;1168: +;1169: if ( !cmd[0] ) { +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $775 +line 1171 +;1170: // server claimed the command +;1171: return; +ADDRGP4 $774 +JUMPV +LABELV $775 +line 1174 +;1172: } +;1173: +;1174: if ( !strcmp( cmd, "spd" ) ) +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $779 +ARGP4 +ADDRLP4 160 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 160 +INDIRI4 +CNSTI4 0 +NEI4 $777 +line 1175 +;1175: { +line 1180 +;1176: const char *ID; +;1177: int holdInt,count,i; +;1178: char string[1204]; +;1179: +;1180: count = trap_Argc(); +ADDRLP4 1384 +ADDRGP4 trap_Argc +CALLI4 +ASGNI4 +ADDRLP4 1372 +ADDRLP4 1384 +INDIRI4 +ASGNI4 +line 1182 +;1181: +;1182: ID = CG_Argv(1); +CNSTI4 1 +ARGI4 +ADDRLP4 1388 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 1376 +ADDRLP4 1388 +INDIRP4 +ASGNP4 +line 1183 +;1183: holdInt = atoi(ID); +ADDRLP4 1376 +INDIRP4 +ARGP4 +ADDRLP4 1392 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 1380 +ADDRLP4 1392 +INDIRI4 +ASGNI4 +line 1185 +;1184: +;1185: memset( &string, 0, sizeof( string ) ); +ADDRLP4 164 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 1204 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 1187 +;1186: +;1187: Com_sprintf( string,sizeof(string)," \"%s\"", (const char *) CG_Argv(2)); +CNSTI4 2 +ARGI4 +ADDRLP4 1396 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 164 +ARGP4 +CNSTI4 1204 +ARGI4 +ADDRGP4 $780 +ARGP4 +ADDRLP4 1396 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1189 +;1188: +;1189: for (i=3;isnapShotTime < cg.time - EVENT_VALID_MSEC ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 300 +SUBI4 +GEI4 $121 +line 19 +;19: cent->previousEvent = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 604 +ADDP4 +CNSTI4 0 +ASGNI4 +line 20 +;20: } +LABELV $121 +line 22 +;21: +;22: cent->trailTime = cg.snap->serverTime; +ADDRFP4 0 +INDIRP4 +CNSTI4 612 +ADDP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +line 24 +;23: +;24: VectorCopy (cent->currentState.origin, cent->lerpOrigin); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRB +ASGNB 12 +line 25 +;25: VectorCopy (cent->currentState.angles, cent->lerpAngles); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 940 +ADDP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRB +ASGNB 12 +line 26 +;26: if ( cent->currentState.eType == ET_PLAYER ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $125 +line 27 +;27: CG_ResetPlayerEntity( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_ResetPlayerEntity +CALLV +pop +line 28 +;28: } +LABELV $125 +line 29 +;29:} +LABELV $120 +endproc CG_ResetEntity 8 4 +proc CG_TransitionEntity 4 4 +line 38 +;30: +;31:/* +;32:=============== +;33:CG_TransitionEntity +;34: +;35:cent->nextState is moved to cent->currentState and events are fired +;36:=============== +;37:*/ +;38:static void CG_TransitionEntity( centity_t *cent ) { +line 39 +;39: cent->currentState = cent->nextState; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 296 +ADDP4 +INDIRB +ASGNB 296 +line 40 +;40: cent->currentValid = qtrue; +ADDRFP4 0 +INDIRP4 +CNSTI4 596 +ADDP4 +CNSTI4 1 +ASGNI4 +line 43 +;41: +;42: // reset if the entity wasn't in the last frame or was teleported +;43: if ( !cent->interpolate ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 592 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $128 +line 44 +;44: CG_ResetEntity( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_ResetEntity +CALLV +pop +line 45 +;45: } +LABELV $128 +line 48 +;46: +;47: // clear the next state. if will be set by the next CG_SetNextSnap +;48: cent->interpolate = qfalse; +ADDRFP4 0 +INDIRP4 +CNSTI4 592 +ADDP4 +CNSTI4 0 +ASGNI4 +line 51 +;49: +;50: // check for events +;51: CG_CheckEvents( cent ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_CheckEvents +CALLV +pop +line 52 +;52:} +LABELV $127 +endproc CG_TransitionEntity 4 4 +export CG_SetInitialSnapshot +proc CG_SetInitialSnapshot 24 12 +line 66 +;53: +;54: +;55:/* +;56:================== +;57:CG_SetInitialSnapshot +;58: +;59:This will only happen on the very first snapshot, or +;60:on tourney restarts. All other times will use +;61:CG_TransitionSnapshot instead. +;62: +;63:FIXME: Also called by map_restart? +;64:================== +;65:*/ +;66:void CG_SetInitialSnapshot( snapshot_t *snap ) { +line 71 +;67: int i; +;68: centity_t *cent; +;69: entityState_t *state; +;70: +;71: cg.snap = snap; +ADDRGP4 cg+36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 73 +;72: +;73: if ((cg_entities[snap->ps.clientNum].ghoul2 == NULL) && trap_G2_HaveWeGhoul2Models(cgs.clientinfo[snap->ps.clientNum].ghoul2Model)) +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ASGNI4 +CNSTI4 1920 +ADDRLP4 12 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $132 +CNSTI4 788 +ADDRLP4 12 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+504 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $132 +line 74 +;74: { +line 75 +;75: trap_G2API_DuplicateGhoul2Instance(cgs.clientinfo[snap->ps.clientNum].ghoul2Model, &cg_entities[snap->ps.clientNum].ghoul2); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ASGNI4 +CNSTI4 788 +ADDRLP4 20 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024+504 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 1920 +ADDRLP4 20 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_DuplicateGhoul2Instance +CALLV +pop +line 76 +;76: CG_CopyG2WeaponInstance(FIRST_WEAPON, cg_entities[snap->ps.clientNum].ghoul2); +CNSTI4 3 +ARGI4 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+952 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 CG_CopyG2WeaponInstance +CALLV +pop +line 77 +;77: } +LABELV $132 +line 78 +;78: BG_PlayerStateToEntityState( &snap->ps, &cg_entities[ snap->ps.clientNum ].currentState, qfalse ); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +CNSTI4 1920 +ADDRLP4 20 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 BG_PlayerStateToEntityState +CALLV +pop +line 81 +;79: +;80: // sort out solid entities +;81: CG_BuildSolidList(); +ADDRGP4 CG_BuildSolidList +CALLV +pop +line 83 +;82: +;83: CG_ExecuteNewServerCommands( snap->serverCommandSequence ); +ADDRFP4 0 +INDIRP4 +CNSTI4 77208 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_ExecuteNewServerCommands +CALLV +pop +line 87 +;84: +;85: // set our local weapon selection pointer to +;86: // what the server has indicated the current weapon is +;87: CG_Respawn(); +ADDRGP4 CG_Respawn +CALLV +pop +line 89 +;88: +;89: for ( i = 0 ; i < cg.snap->numEntities ; i++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $144 +JUMPV +LABELV $141 +line 90 +;90: state = &cg.snap->entities[ i ]; +ADDRLP4 8 +CNSTI4 296 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1428 +ADDP4 +ADDP4 +ASGNP4 +line 91 +;91: cent = &cg_entities[ state->number ]; +ADDRLP4 0 +CNSTI4 1920 +ADDRLP4 8 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 93 +;92: +;93: memcpy(¢->currentState, state, sizeof(entityState_t)); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 296 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 95 +;94: //cent->currentState = *state; +;95: cent->interpolate = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 592 +ADDP4 +CNSTI4 0 +ASGNI4 +line 96 +;96: cent->currentValid = qtrue; +ADDRLP4 0 +INDIRP4 +CNSTI4 596 +ADDP4 +CNSTI4 1 +ASGNI4 +line 98 +;97: +;98: CG_ResetEntity( cent ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_ResetEntity +CALLV +pop +line 101 +;99: +;100: // check for events +;101: CG_CheckEvents( cent ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_CheckEvents +CALLV +pop +line 102 +;102: } +LABELV $142 +line 89 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $144 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1424 +ADDP4 +INDIRI4 +LTI4 $141 +line 103 +;103:} +LABELV $130 +endproc CG_SetInitialSnapshot 24 12 +proc CG_TransitionSnapshot 28 12 +line 113 +;104: +;105: +;106:/* +;107:=================== +;108:CG_TransitionSnapshot +;109: +;110:The transition point from snap to nextSnap has passed +;111:=================== +;112:*/ +;113:static void CG_TransitionSnapshot( void ) { +line 118 +;114: centity_t *cent; +;115: snapshot_t *oldFrame; +;116: int i; +;117: +;118: if ( !cg.snap ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $148 +line 119 +;119: CG_Error( "CG_TransitionSnapshot: NULL cg.snap" ); +ADDRGP4 $151 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 120 +;120: } +LABELV $148 +line 121 +;121: if ( !cg.nextSnap ) { +ADDRGP4 cg+40 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $152 +line 122 +;122: CG_Error( "CG_TransitionSnapshot: NULL cg.nextSnap" ); +ADDRGP4 $155 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 123 +;123: } +LABELV $152 +line 126 +;124: +;125: // execute any server string commands before transitioning entities +;126: CG_ExecuteNewServerCommands( cg.nextSnap->serverCommandSequence ); +ADDRGP4 cg+40 +INDIRP4 +CNSTI4 77208 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_ExecuteNewServerCommands +CALLV +pop +line 129 +;127: +;128: // if we had a map_restart, set everthing with initial +;129: if ( !cg.snap ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $157 +line 130 +;130: } +LABELV $157 +line 133 +;131: +;132: // clear the currentValid flag for all entities in the existing snapshot +;133: for ( i = 0 ; i < cg.snap->numEntities ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $163 +JUMPV +LABELV $160 +line 134 +;134: cent = &cg_entities[ cg.snap->entities[ i ].number ]; +ADDRLP4 4 +CNSTI4 1920 +CNSTI4 296 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1428 +ADDP4 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 135 +;135: cent->currentValid = qfalse; +ADDRLP4 4 +INDIRP4 +CNSTI4 596 +ADDP4 +CNSTI4 0 +ASGNI4 +line 136 +;136: } +LABELV $161 +line 133 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $163 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1424 +ADDP4 +INDIRI4 +LTI4 $160 +line 139 +;137: +;138: // move nextSnap to snap and do the transitions +;139: oldFrame = cg.snap; +ADDRLP4 8 +ADDRGP4 cg+36 +INDIRP4 +ASGNP4 +line 140 +;140: cg.snap = cg.nextSnap; +ADDRGP4 cg+36 +ADDRGP4 cg+40 +INDIRP4 +ASGNP4 +line 142 +;141: +;142: CG_CheckPlayerG2Weapons(&cg.snap->ps, &cg_entities[cg.snap->ps.clientNum]); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +ADDRGP4 CG_CheckPlayerG2Weapons +CALLV +pop +line 143 +;143: BG_PlayerStateToEntityState( &cg.snap->ps, &cg_entities[ cg.snap->ps.clientNum ].currentState, qfalse ); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 BG_PlayerStateToEntityState +CALLV +pop +line 144 +;144: cg_entities[ cg.snap->ps.clientNum ].interpolate = qfalse; +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+592 +ADDP4 +CNSTI4 0 +ASGNI4 +line 146 +;145: +;146: for ( i = 0 ; i < cg.snap->numEntities ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $178 +JUMPV +LABELV $175 +line 147 +;147: cent = &cg_entities[ cg.snap->entities[ i ].number ]; +ADDRLP4 4 +CNSTI4 1920 +CNSTI4 296 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1428 +ADDP4 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 148 +;148: CG_TransitionEntity( cent ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 CG_TransitionEntity +CALLV +pop +line 151 +;149: +;150: // remember time of snapshot this entity was last updated in +;151: cent->snapShotTime = cg.snap->serverTime; +ADDRLP4 4 +INDIRP4 +CNSTI4 640 +ADDP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +line 152 +;152: } +LABELV $176 +line 146 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $178 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1424 +ADDP4 +INDIRI4 +LTI4 $175 +line 154 +;153: +;154: cg.nextSnap = NULL; +ADDRGP4 cg+40 +CNSTP4 0 +ASGNP4 +line 157 +;155: +;156: // check for playerstate transition events +;157: if ( oldFrame ) { +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $183 +line 160 +;158: playerState_t *ops, *ps; +;159: +;160: ops = &oldFrame->ps; +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +line 161 +;161: ps = &cg.snap->ps; +ADDRLP4 16 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ASGNP4 +line 163 +;162: // teleporting checks are irrespective of prediction +;163: if ( ( ps->eFlags ^ ops->eFlags ) & EF_TELEPORT_BIT ) { +ADDRLP4 20 +CNSTI4 108 +ASGNI4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRI4 +BXORI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $186 +line 164 +;164: cg.thisFrameTeleport = qtrue; // will be cleared by prediction code +ADDRGP4 cg+52 +CNSTI4 1 +ASGNI4 +line 165 +;165: } +LABELV $186 +line 169 +;166: +;167: // if we are not doing client side movement prediction for any +;168: // reason, then the client events and view changes will be issued now +;169: if ( cg.demoPlayback || (cg.snap->ps.pm_flags & PMF_FOLLOW) +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+8 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $197 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +ADDRLP4 24 +INDIRI4 +NEI4 $197 +ADDRGP4 cg_nopredict+12 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $197 +ADDRGP4 cg_synchronousClients+12 +INDIRI4 +ADDRLP4 24 +INDIRI4 +EQI4 $189 +LABELV $197 +line 170 +;170: || cg_nopredict.integer || cg_synchronousClients.integer ) { +line 171 +;171: CG_TransitionPlayerState( ps, ops ); +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRGP4 CG_TransitionPlayerState +CALLV +pop +line 172 +;172: } +LABELV $189 +line 173 +;173: } +LABELV $183 +line 175 +;174: +;175:} +LABELV $147 +endproc CG_TransitionSnapshot 28 12 +proc CG_SetNextSnap 32 12 +line 185 +;176: +;177: +;178:/* +;179:=================== +;180:CG_SetNextSnap +;181: +;182:A new snapshot has just been read in from the client system. +;183:=================== +;184:*/ +;185:static void CG_SetNextSnap( snapshot_t *snap ) { +line 190 +;186: int num; +;187: entityState_t *es; +;188: centity_t *cent; +;189: +;190: cg.nextSnap = snap; +ADDRGP4 cg+40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 192 +;191: +;192: CG_CheckPlayerG2Weapons(&cg.snap->ps, &cg_entities[cg.snap->ps.clientNum]); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +ADDRGP4 CG_CheckPlayerG2Weapons +CALLV +pop +line 193 +;193: BG_PlayerStateToEntityState( &snap->ps, &cg_entities[ snap->ps.clientNum ].nextState, qfalse ); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 44 +ADDP4 +ARGP4 +CNSTI4 1920 +ADDRLP4 12 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+296 +ADDP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 BG_PlayerStateToEntityState +CALLV +pop +line 194 +;194: cg_entities[ cg.snap->ps.clientNum ].interpolate = qtrue; +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+592 +ADDP4 +CNSTI4 1 +ASGNI4 +line 197 +;195: +;196: // check for extrapolation errors +;197: for ( num = 0 ; num < snap->numEntities ; num++ ) +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRGP4 $208 +JUMPV +LABELV $205 +line 198 +;198: { +line 199 +;199: es = &snap->entities[num]; +ADDRLP4 4 +CNSTI4 296 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1428 +ADDP4 +ADDP4 +ASGNP4 +line 200 +;200: cent = &cg_entities[ es->number ]; +ADDRLP4 0 +CNSTI4 1920 +ADDRLP4 4 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 202 +;201: +;202: memcpy(¢->nextState, es, sizeof(entityState_t)); +ADDRLP4 16 +CNSTI4 296 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 207 +;203: //cent->nextState = *es; +;204: +;205: // if this frame is a teleport, or the entity wasn't in the +;206: // previous frame, don't interpolate +;207: if ( !cent->currentValid || ( ( cent->currentState.eFlags ^ es->eFlags ) & EF_TELEPORT_BIT ) ) { +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 596 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +EQI4 $211 +ADDRLP4 28 +CNSTI4 8 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRI4 +BXORI4 +CNSTI4 4 +BANDI4 +ADDRLP4 24 +INDIRI4 +EQI4 $209 +LABELV $211 +line 208 +;208: cent->interpolate = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 592 +ADDP4 +CNSTI4 0 +ASGNI4 +line 209 +;209: } else { +ADDRGP4 $210 +JUMPV +LABELV $209 +line 210 +;210: cent->interpolate = qtrue; +ADDRLP4 0 +INDIRP4 +CNSTI4 592 +ADDP4 +CNSTI4 1 +ASGNI4 +line 211 +;211: } +LABELV $210 +line 212 +;212: } +LABELV $206 +line 197 +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $208 +ADDRLP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1424 +ADDP4 +INDIRI4 +LTI4 $205 +line 216 +;213: +;214: // if the next frame is a teleport for the playerstate, we +;215: // can't interpolate during demos +;216: if ( cg.snap && ( ( snap->ps.eFlags ^ cg.snap->ps.eFlags ) & EF_TELEPORT_BIT ) ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $212 +ADDRLP4 16 +CNSTI4 152 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRI4 +BXORI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $212 +line 217 +;217: cg.nextFrameTeleport = qtrue; +ADDRGP4 cg+56 +CNSTI4 1 +ASGNI4 +line 218 +;218: } else { +ADDRGP4 $213 +JUMPV +LABELV $212 +line 219 +;219: cg.nextFrameTeleport = qfalse; +ADDRGP4 cg+56 +CNSTI4 0 +ASGNI4 +line 220 +;220: } +LABELV $213 +line 223 +;221: +;222: // if changing follow mode, don't interpolate +;223: if ( cg.nextSnap->ps.clientNum != cg.snap->ps.clientNum ) { +ADDRLP4 20 +CNSTI4 188 +ASGNI4 +ADDRGP4 cg+40 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRI4 +EQI4 $218 +line 224 +;224: cg.nextFrameTeleport = qtrue; +ADDRGP4 cg+56 +CNSTI4 1 +ASGNI4 +line 225 +;225: } +LABELV $218 +line 228 +;226: +;227: // if changing server restarts, don't interpolate +;228: if ( ( cg.nextSnap->snapFlags ^ cg.snap->snapFlags ) & SNAPFLAG_SERVERCOUNT ) { +ADDRGP4 cg+40 +INDIRP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +INDIRI4 +BXORI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $223 +line 229 +;229: cg.nextFrameTeleport = qtrue; +ADDRGP4 cg+56 +CNSTI4 1 +ASGNI4 +line 230 +;230: } +LABELV $223 +line 233 +;231: +;232: // sort out solid entities +;233: CG_BuildSolidList(); +ADDRGP4 CG_BuildSolidList +CALLV +pop +line 234 +;234:} +LABELV $198 +endproc CG_SetNextSnap 32 12 +proc CG_ReadNextSnapshot 20 12 +line 247 +;235: +;236: +;237:/* +;238:======================== +;239:CG_ReadNextSnapshot +;240: +;241:This is the only place new snapshots are requested +;242:This may increment cgs.processedSnapshotNum multiple +;243:times if the client system fails to return a +;244:valid snapshot. +;245:======================== +;246:*/ +;247:static snapshot_t *CG_ReadNextSnapshot( void ) { +line 251 +;248: qboolean r; +;249: snapshot_t *dest; +;250: +;251: if ( cg.latestSnapshotNum > cgs.processedSnapshotNum + 1000 ) { +ADDRGP4 cg+28 +INDIRI4 +ADDRGP4 cgs+32952 +INDIRI4 +CNSTI4 1000 +ADDI4 +LEI4 $237 +line 252 +;252: CG_Printf( "WARNING: CG_ReadNextSnapshot: way out of range, %i > %i", +ADDRGP4 $233 +ARGP4 +ADDRGP4 cg+28 +INDIRI4 +ARGI4 +ADDRGP4 cgs+32952 +INDIRI4 +ARGI4 +ADDRGP4 CG_Printf +CALLV +pop +line 254 +;253: cg.latestSnapshotNum, cgs.processedSnapshotNum ); +;254: } +ADDRGP4 $237 +JUMPV +LABELV $236 +line 256 +;255: +;256: while ( cgs.processedSnapshotNum < cg.latestSnapshotNum ) { +line 258 +;257: // decide which of the two slots to load it into +;258: if ( cg.snap == &cg.activeSnapshots[0] ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +ADDRGP4 cg+13812 +CVPU4 4 +NEU4 $241 +line 259 +;259: dest = &cg.activeSnapshots[1]; +ADDRLP4 0 +ADDRGP4 cg+13812+77212 +ASGNP4 +line 260 +;260: } else { +ADDRGP4 $242 +JUMPV +LABELV $241 +line 261 +;261: dest = &cg.activeSnapshots[0]; +ADDRLP4 0 +ADDRGP4 cg+13812 +ASGNP4 +line 262 +;262: } +LABELV $242 +line 265 +;263: +;264: // try to read the snapshot from the client system +;265: cgs.processedSnapshotNum++; +ADDRLP4 8 +ADDRGP4 cgs+32952 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 266 +;266: r = trap_GetSnapshot( cgs.processedSnapshotNum, dest ); +ADDRGP4 cgs+32952 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 trap_GetSnapshot +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 269 +;267: +;268: // FIXME: why would trap_GetSnapshot return a snapshot with the same server time +;269: if ( cg.snap && r && dest->serverTime == cg.snap->serverTime ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $250 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $250 +ADDRLP4 16 +CNSTI4 8 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRI4 +NEI4 $250 +line 271 +;270: //continue; +;271: } +LABELV $250 +line 274 +;272: +;273: // if it succeeded, return +;274: if ( r ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $254 +line 275 +;275: CG_AddLagometerSnapshotInfo( dest ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_AddLagometerSnapshotInfo +CALLV +pop +line 276 +;276: return dest; +ADDRLP4 0 +INDIRP4 +RETP4 +ADDRGP4 $228 +JUMPV +LABELV $254 +line 285 +;277: } +;278: +;279: // a GetSnapshot will return failure if the snapshot +;280: // never arrived, or is so old that its entities +;281: // have been shoved off the end of the circular +;282: // buffer in the client system. +;283: +;284: // record as a dropped packet +;285: CG_AddLagometerSnapshotInfo( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 CG_AddLagometerSnapshotInfo +CALLV +pop +line 289 +;286: +;287: // If there are additional snapshots, continue trying to +;288: // read them. +;289: } +LABELV $237 +line 256 +ADDRGP4 cgs+32952 +INDIRI4 +ADDRGP4 cg+28 +INDIRI4 +LTI4 $236 +line 292 +;290: +;291: // nothing left to read +;292: return NULL; +CNSTP4 0 +RETP4 +LABELV $228 +endproc CG_ReadNextSnapshot 20 12 +export CG_ProcessSnapshots +proc CG_ProcessSnapshots 16 8 +line 315 +;293:} +;294: +;295: +;296:/* +;297:============ +;298:CG_ProcessSnapshots +;299: +;300:We are trying to set up a renderable view, so determine +;301:what the simulated time is, and try to get snapshots +;302:both before and after that time if available. +;303: +;304:If we don't have a valid cg.snap after exiting this function, +;305:then a 3D game view cannot be rendered. This should only happen +;306:right after the initial connection. After cg.snap has been valid +;307:once, it will never turn invalid. +;308: +;309:Even if cg.snap is valid, cg.nextSnap may not be, if the snapshot +;310:hasn't arrived yet (it becomes an extrapolating situation instead +;311:of an interpolating one) +;312: +;313:============ +;314:*/ +;315:void CG_ProcessSnapshots( void ) { +line 320 +;316: snapshot_t *snap; +;317: int n; +;318: +;319: // see what the latest snapshot the client system has is +;320: trap_GetCurrentSnapshotNumber( &n, &cg.latestSnapshotTime ); +ADDRLP4 4 +ARGP4 +ADDRGP4 cg+32 +ARGP4 +ADDRGP4 trap_GetCurrentSnapshotNumber +CALLV +pop +line 321 +;321: if ( n != cg.latestSnapshotNum ) { +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+28 +INDIRI4 +EQI4 $267 +line 322 +;322: if ( n < cg.latestSnapshotNum ) { +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+28 +INDIRI4 +GEI4 $261 +line 324 +;323: // this should never happen +;324: CG_Error( "CG_ProcessSnapshots: n < cg.latestSnapshotNum" ); +ADDRGP4 $264 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 325 +;325: } +LABELV $261 +line 326 +;326: cg.latestSnapshotNum = n; +ADDRGP4 cg+28 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 327 +;327: } +ADDRGP4 $267 +JUMPV +LABELV $266 +line 332 +;328: +;329: // If we have yet to receive a snapshot, check for it. +;330: // Once we have gotten the first snapshot, cg.snap will +;331: // always have valid data for the rest of the game +;332: while ( !cg.snap ) { +line 333 +;333: snap = CG_ReadNextSnapshot(); +ADDRLP4 8 +ADDRGP4 CG_ReadNextSnapshot +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 334 +;334: if ( !snap ) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $270 +line 336 +;335: // we can't continue until we get a snapshot +;336: return; +ADDRGP4 $256 +JUMPV +LABELV $270 +line 341 +;337: } +;338: +;339: // set our weapon selection to what +;340: // the playerstate is currently using +;341: if ( !( snap->snapFlags & SNAPFLAG_NOT_ACTIVE ) ) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +NEI4 $272 +line 342 +;342: CG_SetInitialSnapshot( snap ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_SetInitialSnapshot +CALLV +pop +line 343 +;343: } +LABELV $272 +line 344 +;344: } +LABELV $267 +line 332 +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $266 +LABELV $274 +line 349 +;345: +;346: // loop until we either have a valid nextSnap with a serverTime +;347: // greater than cg.time to interpolate towards, or we run +;348: // out of available snapshots +;349: do { +line 351 +;350: // if we don't have a nextframe, try and read a new one in +;351: if ( !cg.nextSnap ) { +ADDRGP4 cg+40 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $277 +line 352 +;352: snap = CG_ReadNextSnapshot(); +ADDRLP4 8 +ADDRGP4 CG_ReadNextSnapshot +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 356 +;353: +;354: // if we still don't have a nextframe, we will just have to +;355: // extrapolate +;356: if ( !snap ) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $280 +line 357 +;357: break; +ADDRGP4 $276 +JUMPV +LABELV $280 +line 360 +;358: } +;359: +;360: CG_SetNextSnap( snap ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CG_SetNextSnap +CALLV +pop +line 364 +;361: +;362: +;363: // if time went backwards, we have a level restart +;364: if ( cg.nextSnap->serverTime < cg.snap->serverTime ) { +ADDRLP4 12 +CNSTI4 8 +ASGNI4 +ADDRGP4 cg+40 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRI4 +GEI4 $282 +line 365 +;365: CG_Error( "CG_ProcessSnapshots: Server time went backwards" ); +ADDRGP4 $286 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 366 +;366: } +LABELV $282 +line 367 +;367: } +LABELV $277 +line 370 +;368: +;369: // if our time is < nextFrame's, we have a nice interpolating state +;370: if ( cg.time >= cg.snap->serverTime && cg.time < cg.nextSnap->serverTime ) { +ADDRLP4 8 +CNSTI4 8 +ASGNI4 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRI4 +LTI4 $287 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+40 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRI4 +GEI4 $287 +line 371 +;371: break; +ADDRGP4 $276 +JUMPV +LABELV $287 +line 375 +;372: } +;373: +;374: // we have passed the transition from nextFrame to frame +;375: CG_TransitionSnapshot(); +ADDRGP4 CG_TransitionSnapshot +CALLV +pop +line 376 +;376: } while ( 1 ); +LABELV $275 +ADDRGP4 $274 +JUMPV +LABELV $276 +line 379 +;377: +;378: // assert our valid conditions upon exiting +;379: if ( cg.snap == NULL ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $293 +line 380 +;380: CG_Error( "CG_ProcessSnapshots: cg.snap == NULL" ); +ADDRGP4 $296 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 381 +;381: } +LABELV $293 +line 382 +;382: if ( cg.time < cg.snap->serverTime ) { +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +GEI4 $297 +line 384 +;383: // this can happen right after a vid_restart +;384: cg.time = cg.snap->serverTime; +ADDRGP4 cg+64 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +line 385 +;385: } +LABELV $297 +line 386 +;386: if ( cg.nextSnap != NULL && cg.nextSnap->serverTime <= cg.time ) { +ADDRGP4 cg+40 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $303 +ADDRGP4 cg+40 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GTI4 $303 +line 387 +;387: CG_Error( "CG_ProcessSnapshots: cg.nextSnap->serverTime <= cg.time" ); +ADDRGP4 $308 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 388 +;388: } +LABELV $303 +line 390 +;389: +;390:} +LABELV $256 +endproc CG_ProcessSnapshots 16 8 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $308 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 114 +char 1 111 +char 1 99 +char 1 101 +char 1 115 +char 1 115 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 115 +char 1 58 +char 1 32 +char 1 99 +char 1 103 +char 1 46 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 45 +char 1 62 +char 1 115 +char 1 101 +char 1 114 +char 1 118 +char 1 101 +char 1 114 +char 1 84 +char 1 105 +char 1 109 +char 1 101 +char 1 32 +char 1 60 +char 1 61 +char 1 32 +char 1 99 +char 1 103 +char 1 46 +char 1 116 +char 1 105 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $296 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 114 +char 1 111 +char 1 99 +char 1 101 +char 1 115 +char 1 115 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 115 +char 1 58 +char 1 32 +char 1 99 +char 1 103 +char 1 46 +char 1 115 +char 1 110 +char 1 97 +char 1 112 +char 1 32 +char 1 61 +char 1 61 +char 1 32 +char 1 78 +char 1 85 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $286 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 114 +char 1 111 +char 1 99 +char 1 101 +char 1 115 +char 1 115 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 115 +char 1 58 +char 1 32 +char 1 83 +char 1 101 +char 1 114 +char 1 118 +char 1 101 +char 1 114 +char 1 32 +char 1 116 +char 1 105 +char 1 109 +char 1 101 +char 1 32 +char 1 119 +char 1 101 +char 1 110 +char 1 116 +char 1 32 +char 1 98 +char 1 97 +char 1 99 +char 1 107 +char 1 119 +char 1 97 +char 1 114 +char 1 100 +char 1 115 +char 1 0 +align 1 +LABELV $264 +char 1 67 +char 1 71 +char 1 95 +char 1 80 +char 1 114 +char 1 111 +char 1 99 +char 1 101 +char 1 115 +char 1 115 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 115 +char 1 58 +char 1 32 +char 1 110 +char 1 32 +char 1 60 +char 1 32 +char 1 99 +char 1 103 +char 1 46 +char 1 108 +char 1 97 +char 1 116 +char 1 101 +char 1 115 +char 1 116 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 78 +char 1 117 +char 1 109 +char 1 0 +align 1 +LABELV $233 +char 1 87 +char 1 65 +char 1 82 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 58 +char 1 32 +char 1 67 +char 1 71 +char 1 95 +char 1 82 +char 1 101 +char 1 97 +char 1 100 +char 1 78 +char 1 101 +char 1 120 +char 1 116 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 58 +char 1 32 +char 1 119 +char 1 97 +char 1 121 +char 1 32 +char 1 111 +char 1 117 +char 1 116 +char 1 32 +char 1 111 +char 1 102 +char 1 32 +char 1 114 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 44 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 62 +char 1 32 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $155 +char 1 67 +char 1 71 +char 1 95 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 105 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 58 +char 1 32 +char 1 78 +char 1 85 +char 1 76 +char 1 76 +char 1 32 +char 1 99 +char 1 103 +char 1 46 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 0 +align 1 +LABELV $151 +char 1 67 +char 1 71 +char 1 95 +char 1 84 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 105 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 83 +char 1 110 +char 1 97 +char 1 112 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 58 +char 1 32 +char 1 78 +char 1 85 +char 1 76 +char 1 76 +char 1 32 +char 1 99 +char 1 103 +char 1 46 +char 1 115 +char 1 110 +char 1 97 +char 1 112 +char 1 0 diff --git a/code/cgame/vm/cg_turret.asm b/code/cgame/vm/cg_turret.asm new file mode 100644 index 0000000..a255adb --- /dev/null +++ b/code/cgame/vm/cg_turret.asm @@ -0,0 +1,2600 @@ +export CreepToPosition +code +proc CreepToPosition 44 0 +file "../cg_turret.c" +line 8 +;1:#include "cg_local.h" +;2:#include "..\game\q_shared.h" +;3:#include "..\ghoul2\g2.h" +;4: +;5://rww - The turret is heavily dependant on bone angles. We can't happily set that on the server, so it is done client-only. +;6: +;7:void CreepToPosition(vec3_t ideal, vec3_t current) +;8:{ +line 9 +;9: float max_degree_switch = 90; +ADDRLP4 8 +CNSTF4 1119092736 +ASGNF4 +line 10 +;10: int degrees_negative = 0; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 11 +;11: int degrees_positive = 0; +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +line 12 +;12: int doNegative = 0; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +line 17 +;13: +;14: int angle_ideal; +;15: int angle_current; +;16: +;17: angle_ideal = (int)ideal[YAW]; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 18 +;18: angle_current = (int)current[YAW]; +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 20 +;19: +;20: if (angle_ideal <= angle_current) +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +GTI4 $121 +line 21 +;21: { +line 22 +;22: degrees_negative = (angle_current - angle_ideal); +ADDRLP4 12 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +SUBI4 +ASGNI4 +line 24 +;23: +;24: degrees_positive = (360 - angle_current) + angle_ideal; +ADDRLP4 16 +CNSTI4 360 +ADDRLP4 4 +INDIRI4 +SUBI4 +ADDRLP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 25 +;25: } +ADDRGP4 $122 +JUMPV +LABELV $121 +line 27 +;26: else +;27: { +line 28 +;28: degrees_negative = angle_current + (360 - angle_ideal); +ADDRLP4 12 +ADDRLP4 4 +INDIRI4 +CNSTI4 360 +ADDRLP4 0 +INDIRI4 +SUBI4 +ADDI4 +ASGNI4 +line 30 +;29: +;30: degrees_positive = (angle_ideal - angle_current); +ADDRLP4 16 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ASGNI4 +line 31 +;31: } +LABELV $122 +line 33 +;32: +;33: if (degrees_negative < degrees_positive) +ADDRLP4 12 +INDIRI4 +ADDRLP4 16 +INDIRI4 +GEI4 $123 +line 34 +;34: { +line 35 +;35: doNegative = 1; +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +line 36 +;36: } +LABELV $123 +line 38 +;37: +;38: if (doNegative) +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $125 +line 39 +;39: { +line 40 +;40: current[YAW] -= max_degree_switch; +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +SUBF4 +ASGNF4 +line 42 +;41: +;42: if (current[YAW] < ideal[YAW] && (current[YAW]+(max_degree_switch*2)) >= ideal[YAW]) +ADDRLP4 28 +CNSTI4 4 +ASGNI4 +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +GEF4 $127 +ADDRLP4 32 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 8 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 36 +INDIRF4 +LTF4 $127 +line 43 +;43: { +line 44 +;44: current[YAW] = ideal[YAW]; +ADDRLP4 40 +CNSTI4 4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +line 45 +;45: } +LABELV $127 +line 47 +;46: +;47: if (current[YAW] < 0) +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 0 +GEF4 $126 +line 48 +;48: { +line 49 +;49: current[YAW] += 361; +ADDRLP4 40 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +CNSTF4 1135902720 +ADDF4 +ASGNF4 +line 50 +;50: } +line 51 +;51: } +ADDRGP4 $126 +JUMPV +LABELV $125 +line 53 +;52: else +;53: { +line 54 +;54: current[YAW] += max_degree_switch; +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDF4 +ASGNF4 +line 56 +;55: +;56: if (current[YAW] > ideal[YAW] && (current[YAW]-(max_degree_switch*2)) <= ideal[YAW]) +ADDRLP4 28 +CNSTI4 4 +ASGNI4 +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LEF4 $131 +ADDRLP4 32 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 8 +INDIRF4 +MULF4 +SUBF4 +ADDRLP4 36 +INDIRF4 +GTF4 $131 +line 57 +;57: { +line 58 +;58: current[YAW] = ideal[YAW]; +ADDRLP4 40 +CNSTI4 4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +line 59 +;59: } +LABELV $131 +line 61 +;60: +;61: if (current[YAW] > 360) +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1135869952 +LEF4 $133 +line 62 +;62: { +line 63 +;63: current[YAW] -= 361; +ADDRLP4 40 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +CNSTF4 1135902720 +SUBF4 +ASGNF4 +line 64 +;64: } +LABELV $133 +line 65 +;65: } +LABELV $126 +line 67 +;66: +;67: if (ideal[PITCH] < 0) +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 0 +GEF4 $135 +line 68 +;68: { +line 69 +;69: ideal[PITCH] += 360; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 70 +;70: } +LABELV $135 +line 72 +;71: +;72: angle_ideal = (int)ideal[PITCH]; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 73 +;73: angle_current = (int)current[PITCH]; +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 75 +;74: +;75: doNegative = 0; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +line 77 +;76: +;77: if (angle_ideal <= angle_current) +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +GTI4 $137 +line 78 +;78: { +line 79 +;79: degrees_negative = (angle_current - angle_ideal); +ADDRLP4 12 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +SUBI4 +ASGNI4 +line 81 +;80: +;81: degrees_positive = (360 - angle_current) + angle_ideal; +ADDRLP4 16 +CNSTI4 360 +ADDRLP4 4 +INDIRI4 +SUBI4 +ADDRLP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 82 +;82: } +ADDRGP4 $138 +JUMPV +LABELV $137 +line 84 +;83: else +;84: { +line 85 +;85: degrees_negative = angle_current + (360 - angle_ideal); +ADDRLP4 12 +ADDRLP4 4 +INDIRI4 +CNSTI4 360 +ADDRLP4 0 +INDIRI4 +SUBI4 +ADDI4 +ASGNI4 +line 87 +;86: +;87: degrees_positive = (angle_ideal - angle_current); +ADDRLP4 16 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ASGNI4 +line 88 +;88: } +LABELV $138 +line 90 +;89: +;90: if (degrees_negative < degrees_positive) +ADDRLP4 12 +INDIRI4 +ADDRLP4 16 +INDIRI4 +GEI4 $139 +line 91 +;91: { +line 92 +;92: doNegative = 1; +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +line 93 +;93: } +LABELV $139 +line 95 +;94: +;95: if (doNegative) +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $141 +line 96 +;96: { +line 97 +;97: current[PITCH] -= max_degree_switch; +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +SUBF4 +ASGNF4 +line 99 +;98: +;99: if (current[PITCH] < ideal[PITCH] && (current[PITCH]+(max_degree_switch*2)) >= ideal[PITCH]) +ADDRLP4 28 +ADDRFP4 4 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 32 +INDIRF4 +GEF4 $143 +ADDRLP4 28 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 8 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 32 +INDIRF4 +LTF4 $143 +line 100 +;100: { +line 101 +;101: current[PITCH] = ideal[PITCH]; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 102 +;102: } +LABELV $143 +line 104 +;103: +;104: if (current[PITCH] < 0) +ADDRFP4 4 +INDIRP4 +INDIRF4 +CNSTF4 0 +GEF4 $142 +line 105 +;105: { +line 106 +;106: current[PITCH] += 361; +ADDRLP4 36 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +CNSTF4 1135902720 +ADDF4 +ASGNF4 +line 107 +;107: } +line 108 +;108: } +ADDRGP4 $142 +JUMPV +LABELV $141 +line 110 +;109: else +;110: { +line 111 +;111: current[PITCH] += max_degree_switch; +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDF4 +ASGNF4 +line 113 +;112: +;113: if (current[PITCH] > ideal[PITCH] && (current[PITCH]-(max_degree_switch*2)) <= ideal[PITCH]) +ADDRLP4 28 +ADDRFP4 4 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 32 +INDIRF4 +LEF4 $147 +ADDRLP4 28 +INDIRF4 +CNSTF4 1073741824 +ADDRLP4 8 +INDIRF4 +MULF4 +SUBF4 +ADDRLP4 32 +INDIRF4 +GTF4 $147 +line 114 +;114: { +line 115 +;115: current[PITCH] = ideal[PITCH]; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 116 +;116: } +LABELV $147 +line 118 +;117: +;118: if (current[PITCH] > 360) +ADDRFP4 4 +INDIRP4 +INDIRF4 +CNSTF4 1135869952 +LEF4 $149 +line 119 +;119: { +line 120 +;120: current[PITCH] -= 361; +ADDRLP4 36 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +CNSTF4 1135902720 +SUBF4 +ASGNF4 +line 121 +;121: } +LABELV $149 +line 122 +;122: } +LABELV $142 +line 123 +;123:} +LABELV $120 +endproc CreepToPosition 44 0 +export TurretClientRun +proc TurretClientRun 92 44 +line 126 +;124: +;125:void TurretClientRun(centity_t *ent) +;126:{ +line 127 +;127: if (!ent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $152 +line 128 +;128: { +line 131 +;129: weaponInfo_t *weaponInfo; +;130: +;131: trap_G2API_InitGhoul2Model(&ent->ghoul2, CG_ConfigString( CS_MODELS+ent->currentState.modelindex ), 0, 0, 0, 0, 0); +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CNSTI4 32 +ADDI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 CG_ConfigString +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_InitGhoul2Model +CALLI4 +pop +line 133 +;132: +;133: if (!ent->ghoul2) +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $154 +line 134 +;134: { //bad +line 135 +;135: return; +ADDRGP4 $151 +JUMPV +LABELV $154 +line 138 +;136: } +;137: +;138: ent->torsoBolt = trap_G2API_AddBolt( ent->ghoul2, 0, "*flash02" ); +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $156 +ARGP4 +ADDRLP4 16 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 1012 +ADDP4 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 140 +;139: +;140: trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $157 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 20 +CNSTI4 2 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTP4 0 +ARGP4 +CNSTI4 100 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 141 +;141: trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_gback", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $159 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 24 +CNSTI4 2 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTP4 0 +ARGP4 +CNSTI4 100 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 142 +;142: trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_barrel", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $161 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 28 +CNSTI4 2 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTP4 0 +ARGP4 +CNSTI4 100 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 144 +;143: +;144: trap_G2API_SetBoneAnim( ent->ghoul2, 0, "model_root", 0, 11, BONE_ANIM_OVERRIDE_FREEZE, 0.8f, cg.time, 0, 0 ); +ADDRFP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 32 +CNSTI4 0 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRGP4 $163 +ARGP4 +ADDRLP4 32 +INDIRI4 +ARGI4 +CNSTI4 11 +ARGI4 +CNSTI4 72 +ARGI4 +CNSTF4 1061997773 +ARGF4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +CNSTF4 0 +ARGF4 +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAnim +CALLI4 +pop +line 146 +;145: +;146: ent->turAngles[ROLL] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1024 +ADDP4 +CNSTF4 0 +ASGNF4 +line 147 +;147: ent->turAngles[PITCH] = 90; +ADDRFP4 0 +INDIRP4 +CNSTI4 1016 +ADDP4 +CNSTF4 1119092736 +ASGNF4 +line 148 +;148: ent->turAngles[YAW] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1020 +ADDP4 +CNSTF4 0 +ASGNF4 +line 150 +;149: +;150: weaponInfo = &cg_weapons[WP_TURRET]; +ADDRLP4 0 +ADDRGP4 cg_weapons+3120 +ASGNP4 +line 152 +;151: +;152: if ( !weaponInfo->registered ) +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +NEI4 $166 +line 153 +;153: { +line 154 +;154: memset( weaponInfo, 0, sizeof( *weaponInfo ) ); +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 208 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 156 +;155: +;156: weaponInfo->flashSound[0] = NULL_SOUND; +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +CNSTI4 0 +ASGNI4 +line 157 +;157: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 0 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 158 +;158: weaponInfo->chargeSound = NULL_SOUND; +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 159 +;159: weaponInfo->muzzleEffect = NULL_HANDLE; +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTI4 0 +ASGNI4 +line 160 +;160: weaponInfo->missileModel = NULL_HANDLE; +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 161 +;161: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 162 +;162: weaponInfo->missileDlight = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 163 +;163: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 164 +;164: weaponInfo->missileTrailFunc = FX_TurretProjectileThink; +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRGP4 FX_TurretProjectileThink +ASGNP4 +line 166 +;165: +;166: cgs.effects.turretShotEffect = trap_FX_RegisterEffect( "turret/shot" ); +ADDRGP4 $170 +ARGP4 +ADDRLP4 36 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+164 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 167 +;167: trap_FX_RegisterEffect("effects/blaster/wall_impact.efx"); +ADDRGP4 $171 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 168 +;168: trap_FX_RegisterEffect("effects/blaster/flesh_impact.efx"); +ADDRGP4 $172 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 170 +;169: +;170: weaponInfo->registered = qtrue; +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ASGNI4 +line 171 +;171: } +LABELV $166 +line 172 +;172: } +LABELV $152 +line 174 +;173: +;174: if (ent->currentState.fireflag == 2) +ADDRFP4 0 +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $173 +line 175 +;175: { //I'm about to blow +line 176 +;176: if (ent->turAngles) +ADDRFP4 0 +INDIRP4 +CNSTI4 1016 +ADDP4 +CVPU4 4 +CNSTU4 0 +EQU4 $151 +line 177 +;177: { +line 178 +;178: trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", ent->turAngles, BONE_ANGLES_REPLACE, NEGATIVE_Y, NEGATIVE_Z, NEGATIVE_X, NULL, 100, cg.time ); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $157 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1016 +ADDP4 +ARGP4 +ADDRLP4 4 +CNSTI4 4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +CNSTP4 0 +ARGP4 +CNSTI4 100 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 179 +;179: } +line 180 +;180: return; +ADDRGP4 $151 +JUMPV +LABELV $173 +line 182 +;181: } +;182: else if (ent->currentState.fireflag && ent->bolt4 != ent->currentState.fireflag) +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $178 +ADDRLP4 0 +INDIRP4 +CNSTI4 996 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $178 +line 183 +;183: { +line 187 +;184: vec3_t muzzleOrg, muzzleDir; +;185: mdxaBone_t boltMatrix; +;186: +;187: trap_G2API_GetBoltMatrix(ent->ghoul2, 0, ent->torsoBolt, &boltMatrix, /*ent->lerpAngles*/vec3_origin, ent->lerpOrigin, cg.time, cgs.gameModels, ent->modelScale); +ADDRLP4 80 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 80 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 188 +;188: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, muzzleOrg); +ADDRLP4 8 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 56 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 189 +;189: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_X, muzzleDir); +ADDRLP4 8 +ARGP4 +CNSTI4 4 +ARGI4 +ADDRLP4 68 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 191 +;190: +;191: trap_FX_PlayEffectID(trap_FX_RegisterEffect("effects/turret/muzzle_flash.efx"), muzzleOrg, muzzleDir); +ADDRGP4 $182 +ARGP4 +ADDRLP4 84 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 84 +INDIRI4 +ARGI4 +ADDRLP4 56 +ARGP4 +ADDRLP4 68 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 193 +;192: +;193: ent->bolt4 = ent->currentState.fireflag; +ADDRLP4 88 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 996 +ADDP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRI4 +ASGNI4 +line 194 +;194: } +ADDRGP4 $179 +JUMPV +LABELV $178 +line 195 +;195: else if (!ent->currentState.fireflag) +ADDRFP4 0 +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $183 +line 196 +;196: { +line 197 +;197: ent->bolt4 = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 996 +ADDP4 +CNSTI4 0 +ASGNI4 +line 198 +;198: } +LABELV $183 +LABELV $179 +line 200 +;199: +;200: if (ent->currentState.bolt2 != ENTITYNUM_NONE) +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +CNSTI4 1023 +EQI4 $185 +line 201 +;201: { //turn toward the enemy +line 202 +;202: centity_t *enemy = &cg_entities[ent->currentState.bolt2]; +ADDRLP4 8 +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 204 +;203: +;204: if (enemy) +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $186 +line 205 +;205: { +line 209 +;206: vec3_t enAng; +;207: vec3_t enPos; +;208: +;209: VectorCopy(enemy->currentState.pos.trBase, enPos); +ADDRLP4 24 +ADDRLP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRB +ASGNB 12 +line 211 +;210: +;211: VectorSubtract(enPos, ent->lerpOrigin, enAng); +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 24 +INDIRF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 12+4 +ADDRLP4 24+4 +INDIRF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 932 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 12+8 +ADDRLP4 24+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 936 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 212 +;212: VectorNormalize(enAng); +ADDRLP4 12 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 213 +;213: vectoangles(enAng, enAng); +ADDRLP4 12 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 214 +;214: enAng[ROLL] = 0; +ADDRLP4 12+8 +CNSTF4 0 +ASGNF4 +line 215 +;215: enAng[PITCH] += 90; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +CNSTF4 1119092736 +ADDF4 +ASGNF4 +line 217 +;216: +;217: CreepToPosition(enAng, ent->turAngles); +ADDRLP4 12 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1016 +ADDP4 +ARGP4 +ADDRGP4 CreepToPosition +CALLV +pop +line 218 +;218: } +line 219 +;219: } +ADDRGP4 $186 +JUMPV +LABELV $185 +line 221 +;220: else +;221: { +line 225 +;222: vec3_t idleAng; +;223: float turnAmount; +;224: +;225: if (ent->turAngles[YAW] > 360) +ADDRFP4 0 +INDIRP4 +CNSTI4 1020 +ADDP4 +INDIRF4 +CNSTF4 1135869952 +LEF4 $194 +line 226 +;226: { +line 227 +;227: ent->turAngles[YAW] -= 361; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 1020 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +CNSTF4 1135902720 +SUBF4 +ASGNF4 +line 228 +;228: } +LABELV $194 +line 230 +;229: +;230: if (!ent->dustTrailTime) +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $196 +line 231 +;231: { +line 232 +;232: ent->dustTrailTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 233 +;233: } +LABELV $196 +line 235 +;234: +;235: turnAmount = (cg.time-ent->dustTrailTime)*0.03; +ADDRLP4 20 +CNSTF4 1022739087 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 237 +;236: +;237: if (turnAmount > 360) +ADDRLP4 20 +INDIRF4 +CNSTF4 1135869952 +LEF4 $200 +line 238 +;238: { +line 239 +;239: turnAmount = 360; +ADDRLP4 20 +CNSTF4 1135869952 +ASGNF4 +line 240 +;240: } +LABELV $200 +line 242 +;241: +;242: idleAng[PITCH] = 90; +ADDRLP4 8 +CNSTF4 1119092736 +ASGNF4 +line 243 +;243: idleAng[ROLL] = 0; +ADDRLP4 8+8 +CNSTF4 0 +ASGNF4 +line 244 +;244: idleAng[YAW] = ent->turAngles[YAW] + turnAmount; +ADDRLP4 8+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1020 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRF4 +ADDF4 +ASGNF4 +line 245 +;245: ent->dustTrailTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 616 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 247 +;246: +;247: CreepToPosition(idleAng, ent->turAngles); +ADDRLP4 8 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1016 +ADDP4 +ARGP4 +ADDRGP4 CreepToPosition +CALLV +pop +line 248 +;248: } +LABELV $186 +line 250 +;249: +;250: if (cg.time < ent->frame_minus1_refreshed) +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 1464 +ADDP4 +INDIRI4 +GEI4 $205 +line 251 +;251: { +line 252 +;252: ent->frame_minus1_refreshed = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 1464 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 253 +;253: return; +ADDRGP4 $151 +JUMPV +LABELV $205 +line 256 +;254: } +;255: +;256: ent->frame_minus1_refreshed = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 1464 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 257 +;257: trap_G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", ent->turAngles, BONE_ANGLES_REPLACE, NEGATIVE_Y, NEGATIVE_Z, NEGATIVE_X, NULL, 100, cg.time ); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $157 +ARGP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 1016 +ADDP4 +ARGP4 +ADDRLP4 12 +CNSTI4 4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +CNSTI4 5 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +CNSTP4 0 +ARGP4 +CNSTI4 100 +ARGI4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoneAngles +CALLI4 +pop +line 258 +;258:} +LABELV $151 +endproc TurretClientRun 92 44 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $182 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 47 +char 1 109 +char 1 117 +char 1 122 +char 1 122 +char 1 108 +char 1 101 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $172 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 115 +char 1 104 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $171 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $170 +char 1 116 +char 1 117 +char 1 114 +char 1 114 +char 1 101 +char 1 116 +char 1 47 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $163 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 114 +char 1 111 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $161 +char 1 98 +char 1 111 +char 1 110 +char 1 101 +char 1 95 +char 1 98 +char 1 97 +char 1 114 +char 1 114 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $159 +char 1 98 +char 1 111 +char 1 110 +char 1 101 +char 1 95 +char 1 103 +char 1 98 +char 1 97 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $157 +char 1 98 +char 1 111 +char 1 110 +char 1 101 +char 1 95 +char 1 104 +char 1 105 +char 1 110 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $156 +char 1 42 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 48 +char 1 50 +char 1 0 diff --git a/code/cgame/vm/cg_view.asm b/code/cgame/vm/cg_view.asm new file mode 100644 index 0000000..c889368 --- /dev/null +++ b/code/cgame/vm/cg_view.asm @@ -0,0 +1,8293 @@ +export CG_TestModel_f +code +proc CG_TestModel_f 36 12 +file "../cg_view.c" +line 58 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_view.c -- setup all the parameters (position, angle, etc) +;4:// for a 3D rendering +;5:#include "cg_local.h" +;6: +;7:#if !defined(CL_LIGHT_H_INC) +;8: #include "cg_lights.h" +;9:#endif +;10: +;11:#define MASK_CAMERACLIP (MASK_SOLID|CONTENTS_PLAYERCLIP) +;12:#define CAMERA_SIZE 4 +;13: +;14: +;15:/* +;16:============================================================================= +;17: +;18: MODEL TESTING +;19: +;20:The viewthing and gun positioning tools from Q2 have been integrated and +;21:enhanced into a single model testing facility. +;22: +;23:Model viewing can begin with either "testmodel " or "testgun ". +;24: +;25:The names must be the full pathname after the basedir, like +;26:"models/weapons/v_launch/tris.md3" or "players/male/tris.md3" +;27: +;28:Testmodel will create a fake entity 100 units in front of the current view +;29:position, directly facing the viewer. It will remain immobile, so you can +;30:move around it to view it from different angles. +;31: +;32:Testgun will cause the model to follow the player around and supress the real +;33:view weapon model. The default frame 0 of most guns is completely off screen, +;34:so you will probably have to cycle a couple frames to see it. +;35: +;36:"nextframe", "prevframe", "nextskin", and "prevskin" commands will change the +;37:frame or skin of the testmodel. These are bound to F5, F6, F7, and F8 in +;38:q3default.cfg. +;39: +;40:If a gun is being tested, the "gun_x", "gun_y", and "gun_z" variables will let +;41:you adjust the positioning. +;42: +;43:Note that none of the model testing features update while the game is paused, so +;44:it may be convenient to test with deathmatch set to 1 so that bringing down the +;45:console doesn't pause the game. +;46: +;47:============================================================================= +;48:*/ +;49: +;50:/* +;51:================= +;52:CG_TestModel_f +;53: +;54:Creates an entity in front of the current position, which +;55:can then be moved around +;56:================= +;57:*/ +;58:void CG_TestModel_f (void) { +line 61 +;59: vec3_t angles; +;60: +;61: memset( &cg.testModelEntity, 0, sizeof(cg.testModelEntity) ); +ADDRGP4 cg+13484 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 62 +;62: if ( trap_Argc() < 2 ) { +ADDRLP4 12 +ADDRGP4 trap_Argc +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +GEI4 $124 +line 63 +;63: return; +ADDRGP4 $121 +JUMPV +LABELV $124 +line 66 +;64: } +;65: +;66: Q_strncpyz (cg.testModelName, CG_Argv( 1 ), MAX_QPATH ); +CNSTI4 1 +ARGI4 +ADDRLP4 16 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRGP4 cg+13696 +ARGP4 +ADDRLP4 16 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 67 +;67: cg.testModelEntity.hModel = trap_R_RegisterModel( cg.testModelName ); +ADDRGP4 cg+13696 +ARGP4 +ADDRLP4 20 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cg+13484+8 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 69 +;68: +;69: if ( trap_Argc() == 3 ) { +ADDRLP4 24 +ADDRGP4 trap_Argc +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 3 +NEI4 $130 +line 70 +;70: cg.testModelEntity.backlerp = atof( CG_Argv( 2 ) ); +CNSTI4 2 +ARGI4 +ADDRLP4 28 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRGP4 atof +CALLF4 +ASGNF4 +ADDRGP4 cg+13484+128 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 71 +;71: cg.testModelEntity.frame = 1; +ADDRGP4 cg+13484+104 +CNSTI4 1 +ASGNI4 +line 72 +;72: cg.testModelEntity.oldframe = 0; +ADDRGP4 cg+13484+124 +CNSTI4 0 +ASGNI4 +line 73 +;73: } +LABELV $130 +line 74 +;74: if (! cg.testModelEntity.hModel ) { +ADDRGP4 cg+13484+8 +INDIRI4 +CNSTI4 0 +NEI4 $138 +line 75 +;75: CG_Printf( "Can't register model\n" ); +ADDRGP4 $142 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 76 +;76: return; +ADDRGP4 $121 +JUMPV +LABELV $138 +line 79 +;77: } +;78: +;79: VectorMA( cg.refdef.vieworg, 100, cg.refdef.viewaxis[0], cg.testModelEntity.origin ); +ADDRGP4 cg+13484+52 +ADDRGP4 cg+3616+24 +INDIRF4 +CNSTF4 1120403456 +ADDRGP4 cg+3616+36 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cg+13484+52+4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +CNSTF4 1120403456 +ADDRGP4 cg+3616+36+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cg+13484+52+8 +ADDRGP4 cg+3616+24+8 +INDIRF4 +CNSTF4 1120403456 +ADDRGP4 cg+3616+36+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 81 +;80: +;81: angles[PITCH] = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 82 +;82: angles[YAW] = 180 + cg.refdefViewAngles[1]; +ADDRLP4 0+4 +ADDRGP4 cg+3984+4 +INDIRF4 +CNSTF4 1127481344 +ADDF4 +ASGNF4 +line 83 +;83: angles[ROLL] = 0; +ADDRLP4 0+8 +CNSTF4 0 +ASGNF4 +line 85 +;84: +;85: AnglesToAxis( angles, cg.testModelEntity.axis ); +ADDRLP4 0 +ARGP4 +ADDRGP4 cg+13484+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 86 +;86: cg.testGun = qfalse; +ADDRGP4 cg+13760 +CNSTI4 0 +ASGNI4 +line 87 +;87:} +LABELV $121 +endproc CG_TestModel_f 36 12 +export CG_TestGun_f +proc CG_TestGun_f 0 0 +line 96 +;88: +;89:/* +;90:================= +;91:CG_TestGun_f +;92: +;93:Replaces the current view weapon with the given model +;94:================= +;95:*/ +;96:void CG_TestGun_f (void) { +line 97 +;97: CG_TestModel_f(); +ADDRGP4 CG_TestModel_f +CALLV +pop +line 98 +;98: cg.testGun = qtrue; +ADDRGP4 cg+13760 +CNSTI4 1 +ASGNI4 +line 102 +;99: //cg.testModelEntity.renderfx = RF_MINLIGHT | RF_DEPTHHACK | RF_FIRST_PERSON; +;100: +;101: // rww - 9-13-01 [1-26-01-sof2] +;102: cg.testModelEntity.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON; +ADDRGP4 cg+13484+4 +CNSTI4 12 +ASGNI4 +line 103 +;103:} +LABELV $174 +endproc CG_TestGun_f 0 0 +export CG_TestModelNextFrame_f +proc CG_TestModelNextFrame_f 4 8 +line 106 +;104: +;105: +;106:void CG_TestModelNextFrame_f (void) { +line 107 +;107: cg.testModelEntity.frame++; +ADDRLP4 0 +ADDRGP4 cg+13484+104 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 108 +;108: CG_Printf( "frame %i\n", cg.testModelEntity.frame ); +ADDRGP4 $181 +ARGP4 +ADDRGP4 cg+13484+104 +INDIRI4 +ARGI4 +ADDRGP4 CG_Printf +CALLV +pop +line 109 +;109:} +LABELV $178 +endproc CG_TestModelNextFrame_f 4 8 +export CG_TestModelPrevFrame_f +proc CG_TestModelPrevFrame_f 4 8 +line 111 +;110: +;111:void CG_TestModelPrevFrame_f (void) { +line 112 +;112: cg.testModelEntity.frame--; +ADDRLP4 0 +ADDRGP4 cg+13484+104 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 113 +;113: if ( cg.testModelEntity.frame < 0 ) { +ADDRGP4 cg+13484+104 +INDIRI4 +CNSTI4 0 +GEI4 $187 +line 114 +;114: cg.testModelEntity.frame = 0; +ADDRGP4 cg+13484+104 +CNSTI4 0 +ASGNI4 +line 115 +;115: } +LABELV $187 +line 116 +;116: CG_Printf( "frame %i\n", cg.testModelEntity.frame ); +ADDRGP4 $181 +ARGP4 +ADDRGP4 cg+13484+104 +INDIRI4 +ARGI4 +ADDRGP4 CG_Printf +CALLV +pop +line 117 +;117:} +LABELV $184 +endproc CG_TestModelPrevFrame_f 4 8 +export CG_TestModelNextSkin_f +proc CG_TestModelNextSkin_f 4 8 +line 119 +;118: +;119:void CG_TestModelNextSkin_f (void) { +line 120 +;120: cg.testModelEntity.skinNum++; +ADDRLP4 0 +ADDRGP4 cg+13484+132 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 121 +;121: CG_Printf( "skin %i\n", cg.testModelEntity.skinNum ); +ADDRGP4 $198 +ARGP4 +ADDRGP4 cg+13484+132 +INDIRI4 +ARGI4 +ADDRGP4 CG_Printf +CALLV +pop +line 122 +;122:} +LABELV $195 +endproc CG_TestModelNextSkin_f 4 8 +export CG_TestModelPrevSkin_f +proc CG_TestModelPrevSkin_f 4 8 +line 124 +;123: +;124:void CG_TestModelPrevSkin_f (void) { +line 125 +;125: cg.testModelEntity.skinNum--; +ADDRLP4 0 +ADDRGP4 cg+13484+132 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 126 +;126: if ( cg.testModelEntity.skinNum < 0 ) { +ADDRGP4 cg+13484+132 +INDIRI4 +CNSTI4 0 +GEI4 $204 +line 127 +;127: cg.testModelEntity.skinNum = 0; +ADDRGP4 cg+13484+132 +CNSTI4 0 +ASGNI4 +line 128 +;128: } +LABELV $204 +line 129 +;129: CG_Printf( "skin %i\n", cg.testModelEntity.skinNum ); +ADDRGP4 $198 +ARGP4 +ADDRGP4 cg+13484+132 +INDIRI4 +ARGI4 +ADDRGP4 CG_Printf +CALLV +pop +line 130 +;130:} +LABELV $201 +endproc CG_TestModelPrevSkin_f 4 8 +proc CG_AddTestModel 32 4 +line 132 +;131: +;132:static void CG_AddTestModel (void) { +line 136 +;133: int i; +;134: +;135: // re-register the model, because the level may have changed +;136: cg.testModelEntity.hModel = trap_R_RegisterModel( cg.testModelName ); +ADDRGP4 cg+13696 +ARGP4 +ADDRLP4 4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cg+13484+8 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 137 +;137: if (! cg.testModelEntity.hModel ) { +ADDRGP4 cg+13484+8 +INDIRI4 +CNSTI4 0 +NEI4 $216 +line 138 +;138: CG_Printf ("Can't register model\n"); +ADDRGP4 $142 +ARGP4 +ADDRGP4 CG_Printf +CALLV +pop +line 139 +;139: return; +ADDRGP4 $212 +JUMPV +LABELV $216 +line 143 +;140: } +;141: +;142: // if testing a gun, set the origin reletive to the view origin +;143: if ( cg.testGun ) { +ADDRGP4 cg+13760 +INDIRI4 +CNSTI4 0 +EQI4 $220 +line 144 +;144: VectorCopy( cg.refdef.vieworg, cg.testModelEntity.origin ); +ADDRGP4 cg+13484+52 +ADDRGP4 cg+3616+24 +INDIRB +ASGNB 12 +line 145 +;145: VectorCopy( cg.refdef.viewaxis[0], cg.testModelEntity.axis[0] ); +ADDRGP4 cg+13484+12 +ADDRGP4 cg+3616+36 +INDIRB +ASGNB 12 +line 146 +;146: VectorCopy( cg.refdef.viewaxis[1], cg.testModelEntity.axis[1] ); +ADDRGP4 cg+13484+12+12 +ADDRGP4 cg+3616+36+12 +INDIRB +ASGNB 12 +line 147 +;147: VectorCopy( cg.refdef.viewaxis[2], cg.testModelEntity.axis[2] ); +ADDRGP4 cg+13484+12+24 +ADDRGP4 cg+3616+36+24 +INDIRB +ASGNB 12 +line 150 +;148: +;149: // allow the position to be adjusted +;150: for (i=0 ; i<3 ; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $243 +line 151 +;151: cg.testModelEntity.origin[i] += cg.refdef.viewaxis[0][i] * cg_gun_x.value; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 8 +INDIRI4 +ADDRGP4 cg+13484+52 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRI4 +ADDRGP4 cg+3616+36 +ADDP4 +INDIRF4 +ADDRGP4 cg_gun_x+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 152 +;152: cg.testModelEntity.origin[i] += cg.refdef.viewaxis[1][i] * cg_gun_y.value; +ADDRLP4 16 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 20 +ADDRLP4 16 +INDIRI4 +ADDRGP4 cg+13484+52 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDRLP4 16 +INDIRI4 +ADDRGP4 cg+3616+36+12 +ADDP4 +INDIRF4 +ADDRGP4 cg_gun_y+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 153 +;153: cg.testModelEntity.origin[i] += cg.refdef.viewaxis[2][i] * cg_gun_z.value; +ADDRLP4 24 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 24 +INDIRI4 +ADDRGP4 cg+13484+52 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 24 +INDIRI4 +ADDRGP4 cg+3616+36+24 +ADDP4 +INDIRF4 +ADDRGP4 cg_gun_z+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 154 +;154: } +LABELV $244 +line 150 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $243 +line 155 +;155: } +LABELV $220 +line 157 +;156: +;157: trap_R_AddRefEntityToScene( &cg.testModelEntity ); +ADDRGP4 cg+13484 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 158 +;158:} +LABELV $212 +endproc CG_AddTestModel 32 4 +proc CG_CalcVrect 12 8 +line 172 +;159: +;160: +;161: +;162://============================================================================ +;163: +;164: +;165:/* +;166:================= +;167:CG_CalcVrect +;168: +;169:Sets the coordinates of the rendered window +;170:================= +;171:*/ +;172:static void CG_CalcVrect (void) { +line 176 +;173: int size; +;174: +;175: // the intermission should allways be full screen +;176: if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $266 +line 177 +;177: size = 100; +ADDRLP4 0 +CNSTI4 100 +ASGNI4 +line 178 +;178: } else { +ADDRGP4 $267 +JUMPV +LABELV $266 +line 180 +;179: // bound normal viewsize +;180: if (cg_viewsize.integer < 30) { +ADDRGP4 cg_viewsize+12 +INDIRI4 +CNSTI4 30 +GEI4 $269 +line 181 +;181: trap_Cvar_Set ("cg_viewsize","30"); +ADDRGP4 $272 +ARGP4 +ADDRGP4 $273 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 182 +;182: size = 30; +ADDRLP4 0 +CNSTI4 30 +ASGNI4 +line 183 +;183: } else if (cg_viewsize.integer > 100) { +ADDRGP4 $270 +JUMPV +LABELV $269 +ADDRGP4 cg_viewsize+12 +INDIRI4 +CNSTI4 100 +LEI4 $274 +line 184 +;184: trap_Cvar_Set ("cg_viewsize","100"); +ADDRGP4 $272 +ARGP4 +ADDRGP4 $277 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 185 +;185: size = 100; +ADDRLP4 0 +CNSTI4 100 +ASGNI4 +line 186 +;186: } else { +ADDRGP4 $275 +JUMPV +LABELV $274 +line 187 +;187: size = cg_viewsize.integer; +ADDRLP4 0 +ADDRGP4 cg_viewsize+12 +INDIRI4 +ASGNI4 +line 188 +;188: } +LABELV $275 +LABELV $270 +line 190 +;189: +;190: } +LABELV $267 +line 191 +;191: cg.refdef.width = cgs.glconfig.vidWidth*size/100; +ADDRGP4 cg+3616+8 +ADDRGP4 cgs+21604+11304 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 100 +DIVI4 +ASGNI4 +line 192 +;192: cg.refdef.width &= ~1; +ADDRLP4 4 +ADDRGP4 cg+3616+8 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 194 +;193: +;194: cg.refdef.height = cgs.glconfig.vidHeight*size/100; +ADDRGP4 cg+3616+12 +ADDRGP4 cgs+21604+11308 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MULI4 +CNSTI4 100 +DIVI4 +ASGNI4 +line 195 +;195: cg.refdef.height &= ~1; +ADDRLP4 8 +ADDRGP4 cg+3616+12 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 197 +;196: +;197: cg.refdef.x = (cgs.glconfig.vidWidth - cg.refdef.width)/2; +ADDRGP4 cg+3616 +ADDRGP4 cgs+21604+11304 +INDIRI4 +ADDRGP4 cg+3616+8 +INDIRI4 +SUBI4 +CNSTI4 2 +DIVI4 +ASGNI4 +line 198 +;198: cg.refdef.y = (cgs.glconfig.vidHeight - cg.refdef.height)/2; +ADDRGP4 cg+3616+4 +ADDRGP4 cgs+21604+11308 +INDIRI4 +ADDRGP4 cg+3616+12 +INDIRI4 +SUBI4 +CNSTI4 2 +DIVI4 +ASGNI4 +line 199 +;199:} +LABELV $265 +endproc CG_CalcVrect 12 8 +proc CG_StepOffset 8 0 +line 206 +;200: +;201://============================================================================== +;202: +;203://============================================================================== +;204://============================================================================== +;205:// this causes a compiler bug on mac MrC compiler +;206:static void CG_StepOffset( void ) { +line 210 +;207: int timeDelta; +;208: +;209: // smooth out stair climbing +;210: timeDelta = cg.time - cg.stepTime; +ADDRLP4 0 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+3488 +INDIRI4 +SUBI4 +ASGNI4 +line 211 +;211: if ( timeDelta < STEP_TIME ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 200 +GEI4 $305 +line 212 +;212: cg.refdef.vieworg[2] -= cg.stepChange +ADDRLP4 4 +ADDRGP4 cg+3616+24+8 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRGP4 cg+3484 +INDIRF4 +CNSTI4 200 +ADDRLP4 0 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +CNSTF4 1128792064 +DIVF4 +SUBF4 +ASGNF4 +line 214 +;213: * (STEP_TIME - timeDelta) / STEP_TIME; +;214: } +LABELV $305 +line 215 +;215:} +LABELV $302 +endproc CG_StepOffset 8 0 +data +align 4 +LABELV cameramins +byte 4 3229614080 +byte 4 3229614080 +byte 4 3229614080 +align 4 +LABELV cameramaxs +byte 4 1082130432 +byte 4 1082130432 +byte 4 1082130432 +export cameraCurTarget +align 4 +LABELV cameraCurTarget +byte 4 0 +byte 4 0 +byte 4 0 +export cameraCurLoc +align 4 +LABELV cameraCurLoc +byte 4 0 +byte 4 0 +byte 4 0 +export cameraOldLoc +align 4 +LABELV cameraOldLoc +byte 4 0 +byte 4 0 +byte 4 0 +export cameraNewLoc +align 4 +LABELV cameraNewLoc +byte 4 0 +byte 4 0 +byte 4 0 +export cameraLastFrame +align 4 +LABELV cameraLastFrame +byte 4 0 +export cameraLastYaw +align 4 +LABELV cameraLastYaw +byte 4 0 +export cameraStiffFactor +align 4 +LABELV cameraStiffFactor +byte 4 0 +code +proc CG_CalcIdealThirdPersonViewTarget 12 0 +line 256 +;216: +;217:#define CAMERA_DAMP_INTERVAL 50 +;218: +;219:static vec3_t cameramins = { -CAMERA_SIZE, -CAMERA_SIZE, -CAMERA_SIZE }; +;220:static vec3_t cameramaxs = { CAMERA_SIZE, CAMERA_SIZE, CAMERA_SIZE }; +;221:vec3_t camerafwd, cameraup; +;222: +;223:vec3_t cameraFocusAngles, cameraFocusLoc; +;224:vec3_t cameraIdealTarget, cameraIdealLoc; +;225:vec3_t cameraCurTarget={0,0,0}, cameraCurLoc={0,0,0}; +;226:vec3_t cameraOldLoc={0,0,0}, cameraNewLoc={0,0,0}; +;227:int cameraLastFrame=0; +;228: +;229:float cameraLastYaw=0; +;230:float cameraStiffFactor=0.0f; +;231: +;232:/* +;233:=============== +;234:Notes on the camera viewpoint in and out... +;235: +;236:cg.refdef.vieworg +;237:--at the start of the function holds the player actor's origin (center of player model). +;238:--it is set to the final view location of the camera at the end of the camera code. +;239:cg.refdefViewAngles +;240:--at the start holds the client's view angles +;241:--it is set to the final view angle of the camera at the end of the camera code. +;242: +;243:=============== +;244:*/ +;245: +;246:extern qboolean gCGHasFallVector; +;247:extern vec3_t gCGFallVector; +;248: +;249:/* +;250:=============== +;251:CG_CalcTargetThirdPersonViewLocation +;252: +;253:=============== +;254:*/ +;255:static void CG_CalcIdealThirdPersonViewTarget(void) +;256:{ +line 257 +;257: float thirdPersonVertOffset = cg_thirdPersonVertOffset.value; +ADDRLP4 0 +ADDRGP4 cg_thirdPersonVertOffset+8 +INDIRF4 +ASGNF4 +line 259 +;258: +;259: if (cg.snap && cg.snap->ps.usingATST) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $313 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1360 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $313 +line 260 +;260: { +line 261 +;261: thirdPersonVertOffset = 200; +ADDRLP4 0 +CNSTF4 1128792064 +ASGNF4 +line 262 +;262: } +LABELV $313 +line 265 +;263: +;264: // Initialize IdealTarget +;265: if (gCGHasFallVector) +ADDRGP4 gCGHasFallVector +INDIRI4 +CNSTI4 0 +EQI4 $317 +line 266 +;266: { +line 267 +;267: VectorCopy(gCGFallVector, cameraFocusLoc); +ADDRGP4 cameraFocusLoc +ADDRGP4 gCGFallVector +INDIRB +ASGNB 12 +line 268 +;268: } +ADDRGP4 $318 +JUMPV +LABELV $317 +line 270 +;269: else +;270: { +line 271 +;271: VectorCopy(cg.refdef.vieworg, cameraFocusLoc); +ADDRGP4 cameraFocusLoc +ADDRGP4 cg+3616+24 +INDIRB +ASGNB 12 +line 272 +;272: } +LABELV $318 +line 275 +;273: +;274: // Add in the new viewheight +;275: cameraFocusLoc[2] += cg.snap->ps.viewheight; +ADDRLP4 4 +ADDRGP4 cameraFocusLoc+8 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 281 +;276: +;277: // Add in a vertical offset from the viewpoint, which puts the actual target above the head, regardless of angle. +;278:// VectorMA(cameraFocusLoc, thirdPersonVertOffset, cameraup, cameraIdealTarget); +;279: +;280: // Add in a vertical offset from the viewpoint, which puts the actual target above the head, regardless of angle. +;281: VectorCopy( cameraFocusLoc, cameraIdealTarget ); +ADDRGP4 cameraIdealTarget +ADDRGP4 cameraFocusLoc +INDIRB +ASGNB 12 +line 282 +;282: cameraIdealTarget[2] += cg_thirdPersonVertOffset.value; +ADDRLP4 8 +ADDRGP4 cameraIdealTarget+8 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +ADDRGP4 cg_thirdPersonVertOffset+8 +INDIRF4 +ADDF4 +ASGNF4 +line 284 +;283: //VectorMA(cameraFocusLoc, cg_thirdPersonVertOffset.value, cameraup, cameraIdealTarget); +;284:} +LABELV $311 +endproc CG_CalcIdealThirdPersonViewTarget 12 0 +proc CG_CalcIdealThirdPersonViewLocation 8 0 +line 295 +;285: +;286: +;287: +;288:/* +;289:=============== +;290:CG_CalcTargetThirdPersonViewLocation +;291: +;292:=============== +;293:*/ +;294:static void CG_CalcIdealThirdPersonViewLocation(void) +;295:{ +line 296 +;296: float thirdPersonRange = cg_thirdPersonRange.value; +ADDRLP4 0 +ADDRGP4 cg_thirdPersonRange+8 +INDIRF4 +ASGNF4 +line 298 +;297: +;298: if (cg.snap && cg.snap->ps.usingATST) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $327 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1360 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $327 +line 299 +;299: { +line 300 +;300: thirdPersonRange = 300; +ADDRLP4 0 +CNSTF4 1133903872 +ASGNF4 +line 301 +;301: } +LABELV $327 +line 303 +;302: +;303: VectorMA(cameraIdealTarget, -(thirdPersonRange), camerafwd, cameraIdealLoc); +ADDRLP4 4 +ADDRLP4 0 +INDIRF4 +NEGF4 +ASGNF4 +ADDRGP4 cameraIdealLoc +ADDRGP4 cameraIdealTarget +INDIRF4 +ADDRGP4 camerafwd +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cameraIdealLoc+4 +ADDRGP4 cameraIdealTarget+4 +INDIRF4 +ADDRGP4 camerafwd+4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cameraIdealLoc+8 +ADDRGP4 cameraIdealTarget+8 +INDIRF4 +ADDRGP4 camerafwd+8 +INDIRF4 +ADDRLP4 0 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 304 +;304:} +LABELV $325 +endproc CG_CalcIdealThirdPersonViewLocation 8 0 +proc CG_ResetThirdPersonViewDamp 1080 28 +line 309 +;305: +;306: +;307: +;308:static void CG_ResetThirdPersonViewDamp(void) +;309:{ +line 313 +;310: trace_t trace; +;311: +;312: // Cap the pitch within reasonable limits +;313: if (cameraFocusAngles[PITCH] > 89.0) +ADDRGP4 cameraFocusAngles +INDIRF4 +CNSTF4 1118961664 +LEF4 $338 +line 314 +;314: { +line 315 +;315: cameraFocusAngles[PITCH] = 89.0; +ADDRGP4 cameraFocusAngles +CNSTF4 1118961664 +ASGNF4 +line 316 +;316: } +ADDRGP4 $339 +JUMPV +LABELV $338 +line 317 +;317: else if (cameraFocusAngles[PITCH] < -89.0) +ADDRGP4 cameraFocusAngles +INDIRF4 +CNSTF4 3266445312 +GEF4 $340 +line 318 +;318: { +line 319 +;319: cameraFocusAngles[PITCH] = -89.0; +ADDRGP4 cameraFocusAngles +CNSTF4 3266445312 +ASGNF4 +line 320 +;320: } +LABELV $340 +LABELV $339 +line 322 +;321: +;322: AngleVectors(cameraFocusAngles, camerafwd, NULL, cameraup); +ADDRGP4 cameraFocusAngles +ARGP4 +ADDRGP4 camerafwd +ARGP4 +CNSTP4 0 +ARGP4 +ADDRGP4 cameraup +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 325 +;323: +;324: // Set the cameraIdealTarget +;325: CG_CalcIdealThirdPersonViewTarget(); +ADDRGP4 CG_CalcIdealThirdPersonViewTarget +CALLV +pop +line 328 +;326: +;327: // Set the cameraIdealLoc +;328: CG_CalcIdealThirdPersonViewLocation(); +ADDRGP4 CG_CalcIdealThirdPersonViewLocation +CALLV +pop +line 331 +;329: +;330: // Now, we just set everything to the new positions. +;331: VectorCopy(cameraIdealLoc, cameraCurLoc); +ADDRGP4 cameraCurLoc +ADDRGP4 cameraIdealLoc +INDIRB +ASGNB 12 +line 332 +;332: VectorCopy(cameraIdealTarget, cameraCurTarget); +ADDRGP4 cameraCurTarget +ADDRGP4 cameraIdealTarget +INDIRB +ASGNB 12 +line 335 +;333: +;334: // First thing we do is trace from the first person viewpoint out to the new target location. +;335: CG_Trace(&trace, cameraFocusLoc, cameramins, cameramaxs, cameraCurTarget, cg.snap->ps.clientNum, MASK_CAMERACLIP); +ADDRLP4 0 +ARGP4 +ADDRGP4 cameraFocusLoc +ARGP4 +ADDRGP4 cameramins +ARGP4 +ADDRGP4 cameramaxs +ARGP4 +ADDRGP4 cameraCurTarget +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 17 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 336 +;336: if (trace.fraction <= 1.0) +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1065353216 +GTF4 $343 +line 337 +;337: { +line 338 +;338: VectorCopy(trace.endpos, cameraCurTarget); +ADDRGP4 cameraCurTarget +ADDRLP4 0+12 +INDIRB +ASGNB 12 +line 339 +;339: } +LABELV $343 +line 342 +;340: +;341: // Now we trace from the new target location to the new view location, to make sure there is nothing in the way. +;342: CG_Trace(&trace, cameraCurTarget, cameramins, cameramaxs, cameraCurLoc, cg.snap->ps.clientNum, MASK_CAMERACLIP); +ADDRLP4 0 +ARGP4 +ADDRGP4 cameraCurTarget +ARGP4 +ADDRGP4 cameramins +ARGP4 +ADDRGP4 cameramaxs +ARGP4 +ADDRGP4 cameraCurLoc +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 17 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 343 +;343: if (trace.fraction <= 1.0) +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1065353216 +GTF4 $348 +line 344 +;344: { +line 345 +;345: VectorCopy(trace.endpos, cameraCurLoc); +ADDRGP4 cameraCurLoc +ADDRLP4 0+12 +INDIRB +ASGNB 12 +line 346 +;346: } +LABELV $348 +line 348 +;347: +;348: cameraLastFrame = cg.time; +ADDRGP4 cameraLastFrame +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 349 +;349: cameraLastYaw = cameraFocusAngles[YAW]; +ADDRGP4 cameraLastYaw +ADDRGP4 cameraFocusAngles+4 +INDIRF4 +ASGNF4 +line 350 +;350: cameraStiffFactor = 0.0f; +ADDRGP4 cameraStiffFactor +CNSTF4 0 +ASGNF4 +line 351 +;351:} +LABELV $337 +endproc CG_ResetThirdPersonViewDamp 1080 28 +proc CG_UpdateThirdPersonTargetDamp 1112 28 +line 355 +;352: +;353:// This is called every frame. +;354:static void CG_UpdateThirdPersonTargetDamp(void) +;355:{ +line 362 +;356: trace_t trace; +;357: vec3_t targetdiff; +;358: float dampfactor, dtime, ratio; +;359: +;360: // Set the cameraIdealTarget +;361: // Automatically get the ideal target, to avoid jittering. +;362: CG_CalcIdealThirdPersonViewTarget(); +ADDRGP4 CG_CalcIdealThirdPersonViewTarget +CALLV +pop +line 364 +;363: +;364: if (cg_thirdPersonTargetDamp.value>=1.0) +ADDRGP4 cg_thirdPersonTargetDamp+8 +INDIRF4 +CNSTF4 1065353216 +LTF4 $355 +line 365 +;365: { // No damping. +line 366 +;366: VectorCopy(cameraIdealTarget, cameraCurTarget); +ADDRGP4 cameraCurTarget +ADDRGP4 cameraIdealTarget +INDIRB +ASGNB 12 +line 367 +;367: } +ADDRGP4 $356 +JUMPV +LABELV $355 +line 368 +;368: else if (cg_thirdPersonTargetDamp.value>=0.0) +ADDRGP4 cg_thirdPersonTargetDamp+8 +INDIRF4 +CNSTF4 0 +LTF4 $358 +line 369 +;369: { +line 371 +;370: // Calculate the difference from the current position to the new one. +;371: VectorSubtract(cameraIdealTarget, cameraCurTarget, targetdiff); +ADDRLP4 1080 +ADDRGP4 cameraIdealTarget +INDIRF4 +ADDRGP4 cameraCurTarget +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1080+4 +ADDRGP4 cameraIdealTarget+4 +INDIRF4 +ADDRGP4 cameraCurTarget+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1080+8 +ADDRGP4 cameraIdealTarget+8 +INDIRF4 +ADDRGP4 cameraCurTarget+8 +INDIRF4 +SUBF4 +ASGNF4 +line 375 +;372: +;373: // Now we calculate how much of the difference we cover in the time allotted. +;374: // The equation is (Damp)^(time) +;375: dampfactor = 1.0-cg_thirdPersonTargetDamp.value; // We must exponent the amount LEFT rather than the amount bled off +ADDRLP4 1096 +CNSTF4 1065353216 +ADDRGP4 cg_thirdPersonTargetDamp+8 +INDIRF4 +SUBF4 +ASGNF4 +line 376 +;376: dtime = (float)(cg.time-cameraLastFrame) * (1.0/(float)CAMERA_DAMP_INTERVAL); // Our dampfactor is geared towards a time interval equal to "1". +ADDRLP4 1100 +CNSTF4 1017370378 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cameraLastFrame +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 380 +;377: +;378: // Note that since there are a finite number of "practical" delta millisecond values possible, +;379: // the ratio should be initialized into a chart ultimately. +;380: ratio = powf(dampfactor, dtime); +ADDRLP4 1096 +INDIRF4 +ARGF4 +ADDRLP4 1100 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 1104 +ADDRGP4 powf +CALLF4 +ASGNF4 +ADDRLP4 1092 +ADDRLP4 1104 +INDIRF4 +ASGNF4 +line 383 +;381: +;382: // This value is how much distance is "left" from the ideal. +;383: VectorMA(cameraIdealTarget, -ratio, targetdiff, cameraCurTarget); +ADDRLP4 1108 +ADDRLP4 1092 +INDIRF4 +NEGF4 +ASGNF4 +ADDRGP4 cameraCurTarget +ADDRGP4 cameraIdealTarget +INDIRF4 +ADDRLP4 1080 +INDIRF4 +ADDRLP4 1108 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cameraCurTarget+4 +ADDRGP4 cameraIdealTarget+4 +INDIRF4 +ADDRLP4 1080+4 +INDIRF4 +ADDRLP4 1108 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cameraCurTarget+8 +ADDRGP4 cameraIdealTarget+8 +INDIRF4 +ADDRLP4 1080+8 +INDIRF4 +ADDRLP4 1092 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 385 +;384: ///////////////////////////////////////////////////////////////////////////////////////////////////////// +;385: } +LABELV $358 +LABELV $356 +line 390 +;386: +;387: // Now we trace to see if the new location is cool or not. +;388: +;389: // First thing we do is trace from the first person viewpoint out to the new target location. +;390: CG_Trace(&trace, cameraFocusLoc, cameramins, cameramaxs, cameraCurTarget, cg.snap->ps.clientNum, MASK_CAMERACLIP); +ADDRLP4 0 +ARGP4 +ADDRGP4 cameraFocusLoc +ARGP4 +ADDRGP4 cameramins +ARGP4 +ADDRGP4 cameramaxs +ARGP4 +ADDRGP4 cameraCurTarget +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 17 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 391 +;391: if (trace.fraction < 1.0) +ADDRLP4 0+8 +INDIRF4 +CNSTF4 1065353216 +GEF4 $376 +line 392 +;392: { +line 393 +;393: VectorCopy(trace.endpos, cameraCurTarget); +ADDRGP4 cameraCurTarget +ADDRLP4 0+12 +INDIRB +ASGNB 12 +line 394 +;394: } +LABELV $376 +line 400 +;395: +;396: // Note that previously there was an upper limit to the number of physics traces that are done through the world +;397: // for the sake of camera collision, since it wasn't calced per frame. Now it is calculated every frame. +;398: // This has the benefit that the camera is a lot smoother now (before it lerped between tested points), +;399: // however two full volume traces each frame is a bit scary to think about. +;400:} +LABELV $354 +endproc CG_UpdateThirdPersonTargetDamp 1112 28 +proc CG_UpdateThirdPersonCameraDamp 1120 28 +line 404 +;401: +;402:// This can be called every interval, at the user's discretion. +;403:static void CG_UpdateThirdPersonCameraDamp(void) +;404:{ +line 410 +;405: trace_t trace; +;406: vec3_t locdiff; +;407: float dampfactor, dtime, ratio; +;408: +;409: // Set the cameraIdealLoc +;410: CG_CalcIdealThirdPersonViewLocation(); +ADDRGP4 CG_CalcIdealThirdPersonViewLocation +CALLV +pop +line 414 +;411: +;412: +;413: // First thing we do is calculate the appropriate damping factor for the camera. +;414: dampfactor=0.0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 415 +;415: if (cg_thirdPersonCameraDamp.value != 0.0) +ADDRGP4 cg_thirdPersonCameraDamp+8 +INDIRF4 +CNSTF4 0 +EQF4 $381 +line 416 +;416: { +line 420 +;417: double pitch; +;418: +;419: // Note that the camera pitch has already been capped off to 89. +;420: pitch = Q_fabs(cameraFocusAngles[PITCH]); +ADDRGP4 cameraFocusAngles +INDIRF4 +ARGF4 +ADDRLP4 1108 +ADDRGP4 Q_fabs +CALLF4 +ASGNF4 +ADDRLP4 1104 +ADDRLP4 1108 +INDIRF4 +ASGNF4 +line 423 +;421: +;422: // The higher the pitch, the larger the factor, so as you look up, it damps a lot less. +;423: pitch /= 89.0; +ADDRLP4 1104 +ADDRLP4 1104 +INDIRF4 +CNSTF4 1118961664 +DIVF4 +ASGNF4 +line 424 +;424: dampfactor = (1.0-cg_thirdPersonCameraDamp.value)*(pitch*pitch); +ADDRLP4 1112 +ADDRLP4 1104 +INDIRF4 +ASGNF4 +ADDRLP4 0 +CNSTF4 1065353216 +ADDRGP4 cg_thirdPersonCameraDamp+8 +INDIRF4 +SUBF4 +ADDRLP4 1112 +INDIRF4 +ADDRLP4 1112 +INDIRF4 +MULF4 +MULF4 +ASGNF4 +line 426 +;425: +;426: dampfactor += cg_thirdPersonCameraDamp.value; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRGP4 cg_thirdPersonCameraDamp+8 +INDIRF4 +ADDF4 +ASGNF4 +line 429 +;427: +;428: // Now we also multiply in the stiff factor, so that faster yaw changes are stiffer. +;429: if (cameraStiffFactor > 0.0f) +ADDRGP4 cameraStiffFactor +INDIRF4 +CNSTF4 0 +LEF4 $386 +line 430 +;430: { // The cameraStiffFactor is how much of the remaining damp below 1 should be shaved off, i.e. approach 1 as stiffening increases. +line 431 +;431: dampfactor += (1.0-dampfactor)*cameraStiffFactor; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1065353216 +ADDRLP4 0 +INDIRF4 +SUBF4 +ADDRGP4 cameraStiffFactor +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 432 +;432: } +LABELV $386 +line 433 +;433: } +LABELV $381 +line 435 +;434: +;435: if (dampfactor>=1.0) +ADDRLP4 0 +INDIRF4 +CNSTF4 1065353216 +LTF4 $388 +line 436 +;436: { // No damping. +line 437 +;437: VectorCopy(cameraIdealLoc, cameraCurLoc); +ADDRGP4 cameraCurLoc +ADDRGP4 cameraIdealLoc +INDIRB +ASGNB 12 +line 438 +;438: } +ADDRGP4 $389 +JUMPV +LABELV $388 +line 439 +;439: else if (dampfactor>=0.0) +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +LTF4 $390 +line 440 +;440: { +line 442 +;441: // Calculate the difference from the current position to the new one. +;442: VectorSubtract(cameraIdealLoc, cameraCurLoc, locdiff); +ADDRLP4 1084 +ADDRGP4 cameraIdealLoc +INDIRF4 +ADDRGP4 cameraCurLoc +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1084+4 +ADDRGP4 cameraIdealLoc+4 +INDIRF4 +ADDRGP4 cameraCurLoc+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 1084+8 +ADDRGP4 cameraIdealLoc+8 +INDIRF4 +ADDRGP4 cameraCurLoc+8 +INDIRF4 +SUBF4 +ASGNF4 +line 446 +;443: +;444: // Now we calculate how much of the difference we cover in the time allotted. +;445: // The equation is (Damp)^(time) +;446: dampfactor = 1.0-dampfactor; // We must exponent the amount LEFT rather than the amount bled off +ADDRLP4 0 +CNSTF4 1065353216 +ADDRLP4 0 +INDIRF4 +SUBF4 +ASGNF4 +line 447 +;447: dtime = (float)(cg.time-cameraLastFrame) * (1.0/(float)CAMERA_DAMP_INTERVAL); // Our dampfactor is geared towards a time interval equal to "1". +ADDRLP4 1100 +CNSTF4 1017370378 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cameraLastFrame +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 451 +;448: +;449: // Note that since there are a finite number of "practical" delta millisecond values possible, +;450: // the ratio should be initialized into a chart ultimately. +;451: ratio = powf(dampfactor, dtime); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 1100 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 1104 +ADDRGP4 powf +CALLF4 +ASGNF4 +ADDRLP4 1096 +ADDRLP4 1104 +INDIRF4 +ASGNF4 +line 454 +;452: +;453: // This value is how much distance is "left" from the ideal. +;454: VectorMA(cameraIdealLoc, -ratio, locdiff, cameraCurLoc); +ADDRLP4 1108 +ADDRLP4 1096 +INDIRF4 +NEGF4 +ASGNF4 +ADDRGP4 cameraCurLoc +ADDRGP4 cameraIdealLoc +INDIRF4 +ADDRLP4 1084 +INDIRF4 +ADDRLP4 1108 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cameraCurLoc+4 +ADDRGP4 cameraIdealLoc+4 +INDIRF4 +ADDRLP4 1084+4 +INDIRF4 +ADDRLP4 1108 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cameraCurLoc+8 +ADDRGP4 cameraIdealLoc+8 +INDIRF4 +ADDRLP4 1084+8 +INDIRF4 +ADDRLP4 1096 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 456 +;455: ///////////////////////////////////////////////////////////////////////////////////////////////////////// +;456: } +LABELV $390 +LABELV $389 +line 459 +;457: +;458: // Now we trace from the new target location to the new view location, to make sure there is nothing in the way. +;459: CG_Trace(&trace, cameraCurTarget, cameramins, cameramaxs, cameraCurLoc, cg.snap->ps.clientNum, MASK_CAMERACLIP); +ADDRLP4 4 +ARGP4 +ADDRGP4 cameraCurTarget +ARGP4 +ADDRGP4 cameramins +ARGP4 +ADDRGP4 cameramaxs +ARGP4 +ADDRGP4 cameraCurLoc +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 17 +ARGI4 +ADDRGP4 CG_Trace +CALLV +pop +line 461 +;460: +;461: if (trace.fraction < 1.0) +ADDRLP4 4+8 +INDIRF4 +CNSTF4 1065353216 +GEF4 $406 +line 462 +;462: { +line 463 +;463: VectorCopy( trace.endpos, cameraCurLoc ); +ADDRGP4 cameraCurLoc +ADDRLP4 4+12 +INDIRB +ASGNB 12 +line 483 +;464: +;465: //FIXME: when the trace hits movers, it gets very very jaggy... ? +;466: /* +;467: //this doesn't actually help any +;468: if ( trace.entityNum != ENTITYNUM_WORLD ) +;469: { +;470: centity_t *cent = &cg_entities[trace.entityNum]; +;471: gentity_t *gent = &g_entities[trace.entityNum]; +;472: if ( cent != NULL && gent != NULL ) +;473: { +;474: if ( cent->currentState.pos.trType == TR_LINEAR || cent->currentState.pos.trType == TR_LINEAR_STOP ) +;475: { +;476: vec3_t diff; +;477: VectorSubtract( cent->lerpOrigin, gent->currentOrigin, diff ); +;478: VectorAdd( cameraCurLoc, diff, cameraCurLoc ); +;479: } +;480: } +;481: } +;482: */ +;483: } +LABELV $406 +line 489 +;484: +;485: // Note that previously there was an upper limit to the number of physics traces that are done through the world +;486: // for the sake of camera collision, since it wasn't calced per frame. Now it is calculated every frame. +;487: // This has the benefit that the camera is a lot smoother now (before it lerped between tested points), +;488: // however two full volume traces each frame is a bit scary to think about. +;489:} +LABELV $380 +endproc CG_UpdateThirdPersonCameraDamp 1120 28 +proc CG_OffsetThirdPersonView 36 16 +line 502 +;490: +;491: +;492: +;493: +;494:/* +;495:===============` +;496:CG_OffsetThirdPersonView +;497: +;498:=============== +;499:*/ +;500:extern vmCvar_t cg_thirdPersonHorzOffset; +;501:static void CG_OffsetThirdPersonView( void ) +;502:{ +line 504 +;503: vec3_t diff; +;504: float thirdPersonHorzOffset = cg_thirdPersonHorzOffset.value; +ADDRLP4 12 +ADDRGP4 cg_thirdPersonHorzOffset+8 +INDIRF4 +ASGNF4 +line 507 +;505: float deltayaw; +;506: +;507: cameraStiffFactor = 0.0; +ADDRGP4 cameraStiffFactor +CNSTF4 0 +ASGNF4 +line 510 +;508: +;509: // Set camera viewing direction. +;510: VectorCopy( cg.refdefViewAngles, cameraFocusAngles ); +ADDRGP4 cameraFocusAngles +ADDRGP4 cg+3984 +INDIRB +ASGNB 12 +line 513 +;511: +;512: // if dead, look at killer +;513: if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $413 +line 514 +;514: { +line 515 +;515: cameraFocusAngles[YAW] = cg.snap->ps.stats[STAT_DEAD_YAW]; +ADDRGP4 cameraFocusAngles+4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 516 +;516: } +ADDRGP4 $414 +JUMPV +LABELV $413 +line 518 +;517: else +;518: { // Add in the third Person Angle. +line 519 +;519: cameraFocusAngles[YAW] += cg_thirdPersonAngle.value; +ADDRLP4 20 +ADDRGP4 cameraFocusAngles+4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDRGP4 cg_thirdPersonAngle+8 +INDIRF4 +ADDF4 +ASGNF4 +line 520 +;520: cameraFocusAngles[PITCH] += cg_thirdPersonPitchOffset.value; +ADDRLP4 24 +ADDRGP4 cameraFocusAngles +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRGP4 cg_thirdPersonPitchOffset+8 +INDIRF4 +ADDF4 +ASGNF4 +line 521 +;521: } +LABELV $414 +line 526 +;522: +;523: // The next thing to do is to see if we need to calculate a new camera target location. +;524: +;525: // If we went back in time for some reason, or if we just started, reset the sample. +;526: if (cameraLastFrame == 0 || cameraLastFrame > cg.time) +ADDRLP4 20 +ADDRGP4 cameraLastFrame +INDIRI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $424 +ADDRLP4 20 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $421 +LABELV $424 +line 527 +;527: { +line 528 +;528: CG_ResetThirdPersonViewDamp(); +ADDRGP4 CG_ResetThirdPersonViewDamp +CALLV +pop +line 529 +;529: } +ADDRGP4 $422 +JUMPV +LABELV $421 +line 531 +;530: else +;531: { +line 533 +;532: // Cap the pitch within reasonable limits +;533: if (cameraFocusAngles[PITCH] > 80.0) +ADDRGP4 cameraFocusAngles +INDIRF4 +CNSTF4 1117782016 +LEF4 $425 +line 534 +;534: { +line 535 +;535: cameraFocusAngles[PITCH] = 80.0; +ADDRGP4 cameraFocusAngles +CNSTF4 1117782016 +ASGNF4 +line 536 +;536: } +ADDRGP4 $426 +JUMPV +LABELV $425 +line 537 +;537: else if (cameraFocusAngles[PITCH] < -80.0) +ADDRGP4 cameraFocusAngles +INDIRF4 +CNSTF4 3265265664 +GEF4 $427 +line 538 +;538: { +line 539 +;539: cameraFocusAngles[PITCH] = -80.0; +ADDRGP4 cameraFocusAngles +CNSTF4 3265265664 +ASGNF4 +line 540 +;540: } +LABELV $427 +LABELV $426 +line 542 +;541: +;542: AngleVectors(cameraFocusAngles, camerafwd, NULL, cameraup); +ADDRGP4 cameraFocusAngles +ARGP4 +ADDRGP4 camerafwd +ARGP4 +CNSTP4 0 +ARGP4 +ADDRGP4 cameraup +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 544 +;543: +;544: deltayaw = fabs(cameraFocusAngles[YAW] - cameraLastYaw); +ADDRGP4 cameraFocusAngles+4 +INDIRF4 +ADDRGP4 cameraLastYaw +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 545 +;545: if (deltayaw > 180.0f) +ADDRLP4 16 +INDIRF4 +CNSTF4 1127481344 +LEF4 $430 +line 546 +;546: { // Normalize this angle so that it is between 0 and 180. +line 547 +;547: deltayaw = fabs(deltayaw - 360.0f); +ADDRLP4 16 +INDIRF4 +CNSTF4 1135869952 +SUBF4 +ARGF4 +ADDRLP4 28 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 548 +;548: } +LABELV $430 +line 549 +;549: cameraStiffFactor = deltayaw / (float)(cg.time-cameraLastFrame); +ADDRGP4 cameraStiffFactor +ADDRLP4 16 +INDIRF4 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cameraLastFrame +INDIRI4 +SUBI4 +CVIF4 4 +DIVF4 +ASGNF4 +line 550 +;550: if (cameraStiffFactor < 1.0) +ADDRGP4 cameraStiffFactor +INDIRF4 +CNSTF4 1065353216 +GEF4 $433 +line 551 +;551: { +line 552 +;552: cameraStiffFactor = 0.0; +ADDRGP4 cameraStiffFactor +CNSTF4 0 +ASGNF4 +line 553 +;553: } +ADDRGP4 $434 +JUMPV +LABELV $433 +line 554 +;554: else if (cameraStiffFactor > 2.5) +ADDRGP4 cameraStiffFactor +INDIRF4 +CNSTF4 1075838976 +LEF4 $435 +line 555 +;555: { +line 556 +;556: cameraStiffFactor = 0.75; +ADDRGP4 cameraStiffFactor +CNSTF4 1061158912 +ASGNF4 +line 557 +;557: } +ADDRGP4 $436 +JUMPV +LABELV $435 +line 559 +;558: else +;559: { // 1 to 2 scales from 0.0 to 0.5 +line 560 +;560: cameraStiffFactor = (cameraStiffFactor-1.0f)*0.5f; +ADDRLP4 28 +ADDRGP4 cameraStiffFactor +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTF4 1056964608 +ADDRLP4 28 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +SUBF4 +MULF4 +ASGNF4 +line 561 +;561: } +LABELV $436 +LABELV $434 +line 562 +;562: cameraLastYaw = cameraFocusAngles[YAW]; +ADDRGP4 cameraLastYaw +ADDRGP4 cameraFocusAngles+4 +INDIRF4 +ASGNF4 +line 565 +;563: +;564: // Move the target to the new location. +;565: CG_UpdateThirdPersonTargetDamp(); +ADDRGP4 CG_UpdateThirdPersonTargetDamp +CALLV +pop +line 566 +;566: CG_UpdateThirdPersonCameraDamp(); +ADDRGP4 CG_UpdateThirdPersonCameraDamp +CALLV +pop +line 567 +;567: } +LABELV $422 +line 576 +;568: +;569: // Now interestingly, the Quake method is to calculate a target focus point above the player, and point the camera at it. +;570: // We won't do that for now. +;571: +;572: // We must now take the angle taken from the camera target and location. +;573: /*VectorSubtract(cameraCurTarget, cameraCurLoc, diff); +;574: VectorNormalize(diff); +;575: vectoangles(diff, cg.refdefViewAngles);*/ +;576: VectorSubtract(cameraCurTarget, cameraCurLoc, diff); +ADDRLP4 0 +ADDRGP4 cameraCurTarget +INDIRF4 +ADDRGP4 cameraCurLoc +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+4 +ADDRGP4 cameraCurTarget+4 +INDIRF4 +ADDRGP4 cameraCurLoc+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 0+8 +ADDRGP4 cameraCurTarget+8 +INDIRF4 +ADDRGP4 cameraCurLoc+8 +INDIRF4 +SUBF4 +ASGNF4 +line 577 +;577: { +line 578 +;578: float dist = VectorNormalize(diff); +ADDRLP4 0 +ARGP4 +ADDRLP4 28 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 24 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 580 +;579: //under normal circumstances, should never be 0.00000 and so on. +;580: if ( !dist || (diff[0] == 0 || diff[1] == 0) ) +ADDRLP4 32 +CNSTF4 0 +ASGNF4 +ADDRLP4 24 +INDIRF4 +ADDRLP4 32 +INDIRF4 +EQF4 $448 +ADDRLP4 0 +INDIRF4 +ADDRLP4 32 +INDIRF4 +EQF4 $448 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 32 +INDIRF4 +NEF4 $444 +LABELV $448 +line 581 +;581: {//must be hitting something, need some value to calc angles, so use cam forward +line 582 +;582: VectorCopy( camerafwd, diff ); +ADDRLP4 0 +ADDRGP4 camerafwd +INDIRB +ASGNB 12 +line 583 +;583: } +LABELV $444 +line 584 +;584: } +line 585 +;585: vectoangles(diff, cg.refdefViewAngles); +ADDRLP4 0 +ARGP4 +ADDRGP4 cg+3984 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 588 +;586: +;587: // Temp: just move the camera to the side a bit +;588: if ( thirdPersonHorzOffset != 0.0f ) +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +EQF4 $450 +line 589 +;589: { +line 590 +;590: AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); +ADDRGP4 cg+3984 +ARGP4 +ADDRGP4 cg+3616+36 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 591 +;591: VectorMA( cameraCurLoc, thirdPersonHorzOffset, cg.refdef.viewaxis[1], cameraCurLoc ); +ADDRLP4 24 +ADDRGP4 cameraCurLoc +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRGP4 cg+3616+36+12 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cameraCurLoc+4 +ADDRGP4 cameraCurLoc+4 +INDIRF4 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cameraCurLoc+8 +ADDRGP4 cameraCurLoc+8 +INDIRF4 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 592 +;592: } +LABELV $450 +line 595 +;593: +;594: // ...and of course we should copy the new view location to the proper spot too. +;595: VectorCopy(cameraCurLoc, cg.refdef.vieworg); +ADDRGP4 cg+3616+24 +ADDRGP4 cameraCurLoc +INDIRB +ASGNB 12 +line 597 +;596: +;597: cameraLastFrame=cg.time; +ADDRGP4 cameraLastFrame +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 598 +;598:} +LABELV $410 +endproc CG_OffsetThirdPersonView 36 16 +proc CG_OffsetFirstPersonView 96 0 +line 699 +;599: +;600: +;601: +;602:/* +;603:=============== +;604:CG_OffsetThirdPersonView +;605: +;606:=============== +;607:*//* +;608:#define FOCUS_DISTANCE 512 +;609:static void CG_OffsetThirdPersonView( void ) { +;610: vec3_t forward, right, up; +;611: vec3_t view; +;612: vec3_t focusAngles; +;613: trace_t trace; +;614: static vec3_t mins = { -4, -4, -4 }; +;615: static vec3_t maxs = { 4, 4, 4 }; +;616: vec3_t focusPoint; +;617: float focusDist; +;618: float forwardScale, sideScale; +;619: +;620: cg.refdef.vieworg[2] += cg.predictedPlayerState.viewheight; +;621: +;622: VectorCopy( cg.refdefViewAngles, focusAngles ); +;623: +;624: // if dead, look at killer +;625: if ( cg.predictedPlayerState.stats[STAT_HEALTH] <= 0 ) { +;626: focusAngles[YAW] = cg.predictedPlayerState.stats[STAT_DEAD_YAW]; +;627: cg.refdefViewAngles[YAW] = cg.predictedPlayerState.stats[STAT_DEAD_YAW]; +;628: } +;629: +;630: if ( focusAngles[PITCH] > 45 ) { +;631: focusAngles[PITCH] = 45; // don't go too far overhead +;632: } +;633: AngleVectors( focusAngles, forward, NULL, NULL ); +;634: +;635: VectorMA( cg.refdef.vieworg, FOCUS_DISTANCE, forward, focusPoint ); +;636: +;637: VectorCopy( cg.refdef.vieworg, view ); +;638: +;639: view[2] += 8; +;640: +;641: cg.refdefViewAngles[PITCH] *= 0.5; +;642: +;643: AngleVectors( cg.refdefViewAngles, forward, right, up ); +;644: +;645: forwardScale = cos( cg_thirdPersonAngle.value / 180 * M_PI ); +;646: sideScale = sin( cg_thirdPersonAngle.value / 180 * M_PI ); +;647: VectorMA( view, -cg_thirdPersonRange.value * forwardScale, forward, view ); +;648: VectorMA( view, -cg_thirdPersonRange.value * sideScale, right, view ); +;649: +;650: // trace a ray from the origin to the viewpoint to make sure the view isn't +;651: // in a solid block. Use an 8 by 8 block to prevent the view from near clipping anything +;652: +;653: if (!cg_cameraMode.integer) { +;654: CG_Trace( &trace, cg.refdef.vieworg, mins, maxs, view, cg.predictedPlayerState.clientNum, MASK_CAMERACLIP); +;655: +;656: if ( trace.fraction != 1.0 ) { +;657: VectorCopy( trace.endpos, view ); +;658: view[2] += (1.0 - trace.fraction) * 32; +;659: // try another trace to this position, because a tunnel may have the ceiling +;660: // close enogh that this is poking out +;661: +;662: CG_Trace( &trace, cg.refdef.vieworg, mins, maxs, view, cg.predictedPlayerState.clientNum, MASK_CAMERACLIP); +;663: VectorCopy( trace.endpos, view ); +;664: } +;665: } +;666: +;667: +;668: VectorCopy( view, cg.refdef.vieworg ); +;669: +;670: // select pitch to look at focus point from vieword +;671: VectorSubtract( focusPoint, cg.refdef.vieworg, focusPoint ); +;672: focusDist = sqrt( focusPoint[0] * focusPoint[0] + focusPoint[1] * focusPoint[1] ); +;673: if ( focusDist < 1 ) { +;674: focusDist = 1; // should never happen +;675: } +;676: cg.refdefViewAngles[PITCH] = -180 / M_PI * atan2( focusPoint[2], focusDist ); +;677: cg.refdefViewAngles[YAW] -= cg_thirdPersonAngle.value; +;678:} +;679: +;680: +;681:// this causes a compiler bug on mac MrC compiler +;682:static void CG_StepOffset( void ) { +;683: int timeDelta; +;684: +;685: // smooth out stair climbing +;686: timeDelta = cg.time - cg.stepTime; +;687: if ( timeDelta < STEP_TIME ) { +;688: cg.refdef.vieworg[2] -= cg.stepChange +;689: * (STEP_TIME - timeDelta) / STEP_TIME; +;690: } +;691:}*/ +;692: +;693:/* +;694:=============== +;695:CG_OffsetFirstPersonView +;696: +;697:=============== +;698:*/ +;699:static void CG_OffsetFirstPersonView( void ) { +line 710 +;700: float *origin; +;701: float *angles; +;702: float bob; +;703: float ratio; +;704: float delta; +;705: float speed; +;706: float f; +;707: vec3_t predictedVelocity; +;708: int timeDelta; +;709: +;710: if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $474 +line 711 +;711: return; +ADDRGP4 $473 +JUMPV +LABELV $474 +line 714 +;712: } +;713: +;714: origin = cg.refdef.vieworg; +ADDRLP4 8 +ADDRGP4 cg+3616+24 +ASGNP4 +line 715 +;715: angles = cg.refdefViewAngles; +ADDRLP4 4 +ADDRGP4 cg+3984 +ASGNP4 +line 718 +;716: +;717: // if dead, fix the angle and don't add any kick +;718: if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $480 +line 719 +;719: angles[ROLL] = 40; +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 1109393408 +ASGNF4 +line 720 +;720: angles[PITCH] = -15; +ADDRLP4 4 +INDIRP4 +CNSTF4 3245342720 +ASGNF4 +line 721 +;721: angles[YAW] = cg.snap->ps.stats[STAT_DEAD_YAW]; +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 722 +;722: origin[2] += cg.predictedPlayerState.viewheight; +ADDRLP4 44 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +ADDRGP4 cg+96+168 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 723 +;723: return; +ADDRGP4 $473 +JUMPV +LABELV $480 +line 727 +;724: } +;725: +;726: // add angles based on weapon kick +;727: VectorAdd (angles, cg.kick_angles, angles); +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRGP4 cg+13440 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 48 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRF4 +ADDRGP4 cg+13440+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 52 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +ADDRGP4 cg+13440+8 +INDIRF4 +ADDF4 +ASGNF4 +line 730 +;728: +;729: // add angles based on damage kick +;730: if ( cg.damageTime ) { +ADDRGP4 cg+13384 +INDIRF4 +CNSTF4 0 +EQF4 $491 +line 731 +;731: ratio = cg.time - cg.damageTime; +ADDRLP4 32 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRGP4 cg+13384 +INDIRF4 +SUBF4 +ASGNF4 +line 732 +;732: if ( ratio < DAMAGE_DEFLECT_TIME ) { +ADDRLP4 32 +INDIRF4 +CNSTF4 1120403456 +GEF4 $496 +line 733 +;733: ratio /= DAMAGE_DEFLECT_TIME; +ADDRLP4 32 +ADDRLP4 32 +INDIRF4 +CNSTF4 1120403456 +DIVF4 +ASGNF4 +line 734 +;734: angles[PITCH] += ratio * cg.v_dmg_pitch; +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRLP4 32 +INDIRF4 +ADDRGP4 cg+13432 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 735 +;735: angles[ROLL] += ratio * cg.v_dmg_roll; +ADDRLP4 60 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +ADDRLP4 32 +INDIRF4 +ADDRGP4 cg+13436 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 736 +;736: } else { +ADDRGP4 $497 +JUMPV +LABELV $496 +line 737 +;737: ratio = 1.0 - ( ratio - DAMAGE_DEFLECT_TIME ) / DAMAGE_RETURN_TIME; +ADDRLP4 32 +CNSTF4 1065353216 +ADDRLP4 32 +INDIRF4 +CNSTF4 1120403456 +SUBF4 +CNSTF4 1137180672 +DIVF4 +SUBF4 +ASGNF4 +line 738 +;738: if ( ratio > 0 ) { +ADDRLP4 32 +INDIRF4 +CNSTF4 0 +LEF4 $500 +line 739 +;739: angles[PITCH] += ratio * cg.v_dmg_pitch; +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRLP4 32 +INDIRF4 +ADDRGP4 cg+13432 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 740 +;740: angles[ROLL] += ratio * cg.v_dmg_roll; +ADDRLP4 60 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +ADDRLP4 32 +INDIRF4 +ADDRGP4 cg+13436 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 741 +;741: } +LABELV $500 +line 742 +;742: } +LABELV $497 +line 743 +;743: } +LABELV $491 +line 754 +;744: +;745: // add pitch based on fall kick +;746:#if 0 +;747: ratio = ( cg.time - cg.landTime) / FALL_TIME; +;748: if (ratio < 0) +;749: ratio = 0; +;750: angles[PITCH] += ratio * cg.fall_value; +;751:#endif +;752: +;753: // add angles based on velocity +;754: VectorCopy( cg.predictedPlayerState.velocity, predictedVelocity ); +ADDRLP4 12 +ADDRGP4 cg+96+32 +INDIRB +ASGNB 12 +line 756 +;755: +;756: delta = DotProduct ( predictedVelocity, cg.refdef.viewaxis[0]); +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +ADDRGP4 cg+3616+36 +INDIRF4 +MULF4 +ADDRLP4 12+4 +INDIRF4 +ADDRGP4 cg+3616+36+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 12+8 +INDIRF4 +ADDRGP4 cg+3616+36+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 757 +;757: angles[PITCH] += delta * cg_runpitch.value; +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +ADDRGP4 cg_runpitch+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 759 +;758: +;759: delta = DotProduct ( predictedVelocity, cg.refdef.viewaxis[1]); +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +ADDRGP4 cg+3616+36+12 +INDIRF4 +MULF4 +ADDRLP4 12+4 +INDIRF4 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 12+8 +INDIRF4 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 760 +;760: angles[ROLL] -= delta * cg_runroll.value; +ADDRLP4 60 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +ADDRGP4 cg_runroll+8 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 765 +;761: +;762: // add angles based on bob +;763: +;764: // make sure the bob is visible even at low speeds +;765: speed = cg.xyspeed > 200 ? cg.xyspeed : 200; +ADDRGP4 cg+13472 +INDIRF4 +CNSTF4 1128792064 +LEF4 $534 +ADDRLP4 64 +ADDRGP4 cg+13472 +INDIRF4 +ASGNF4 +ADDRGP4 $535 +JUMPV +LABELV $534 +ADDRLP4 64 +CNSTF4 1128792064 +ASGNF4 +LABELV $535 +ADDRLP4 28 +ADDRLP4 64 +INDIRF4 +ASGNF4 +line 767 +;766: +;767: delta = cg.bobfracsin * cg_bobpitch.value * speed; +ADDRLP4 0 +ADDRGP4 cg+13464 +INDIRF4 +ADDRGP4 cg_bobpitch+8 +INDIRF4 +MULF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 768 +;768: if (cg.predictedPlayerState.pm_flags & PMF_DUCKED) +ADDRGP4 cg+96+12 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $538 +line 769 +;769: delta *= 3; // crouching +ADDRLP4 0 +CNSTF4 1077936128 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +LABELV $538 +line 770 +;770: angles[PITCH] += delta; +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +ADDF4 +ASGNF4 +line 771 +;771: delta = cg.bobfracsin * cg_bobroll.value * speed; +ADDRLP4 0 +ADDRGP4 cg+13464 +INDIRF4 +ADDRGP4 cg_bobroll+8 +INDIRF4 +MULF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ASGNF4 +line 772 +;772: if (cg.predictedPlayerState.pm_flags & PMF_DUCKED) +ADDRGP4 cg+96+12 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $544 +line 773 +;773: delta *= 3; // crouching accentuates roll +ADDRLP4 0 +CNSTF4 1077936128 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +LABELV $544 +line 774 +;774: if (cg.bobcycle & 1) +ADDRGP4 cg+13468 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $548 +line 775 +;775: delta = -delta; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +NEGF4 +ASGNF4 +LABELV $548 +line 776 +;776: angles[ROLL] += delta; +ADDRLP4 72 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +ADDF4 +ASGNF4 +line 781 +;777: +;778://=================================== +;779: +;780: // add view height +;781: origin[2] += cg.predictedPlayerState.viewheight; +ADDRLP4 76 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 76 +INDIRP4 +INDIRF4 +ADDRGP4 cg+96+168 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 784 +;782: +;783: // smooth out duck height changes +;784: timeDelta = cg.time - cg.duckTime; +ADDRLP4 36 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+3496 +INDIRI4 +SUBI4 +ASGNI4 +line 785 +;785: if ( timeDelta < DUCK_TIME) { +ADDRLP4 36 +INDIRI4 +CNSTI4 100 +GEI4 $555 +line 786 +;786: cg.refdef.vieworg[2] -= cg.duckChange +ADDRLP4 80 +ADDRGP4 cg+3616+24+8 +ASGNP4 +ADDRLP4 80 +INDIRP4 +ADDRLP4 80 +INDIRP4 +INDIRF4 +ADDRGP4 cg+3492 +INDIRF4 +CNSTI4 100 +ADDRLP4 36 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +CNSTF4 1120403456 +DIVF4 +SUBF4 +ASGNF4 +line 788 +;787: * (DUCK_TIME - timeDelta) / DUCK_TIME; +;788: } +LABELV $555 +line 791 +;789: +;790: // add bob height +;791: bob = cg.bobfracsin * cg.xyspeed * cg_bobup.value; +ADDRLP4 24 +ADDRGP4 cg+13464 +INDIRF4 +ADDRGP4 cg+13472 +INDIRF4 +MULF4 +ADDRGP4 cg_bobup+8 +INDIRF4 +MULF4 +ASGNF4 +line 792 +;792: if (bob > 6) { +ADDRLP4 24 +INDIRF4 +CNSTF4 1086324736 +LEF4 $564 +line 793 +;793: bob = 6; +ADDRLP4 24 +CNSTF4 1086324736 +ASGNF4 +line 794 +;794: } +LABELV $564 +line 796 +;795: +;796: origin[2] += bob; +ADDRLP4 80 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +ADDRLP4 80 +INDIRP4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +ADDF4 +ASGNF4 +line 800 +;797: +;798: +;799: // add fall height +;800: delta = cg.time - cg.landTime; +ADDRLP4 0 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+3504 +INDIRI4 +SUBI4 +CVIF4 4 +ASGNF4 +line 801 +;801: if ( delta < LAND_DEFLECT_TIME ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 1125515264 +GEF4 $568 +line 802 +;802: f = delta / LAND_DEFLECT_TIME; +ADDRLP4 40 +ADDRLP4 0 +INDIRF4 +CNSTF4 1125515264 +DIVF4 +ASGNF4 +line 803 +;803: cg.refdef.vieworg[2] += cg.landChange * f; +ADDRLP4 84 +ADDRGP4 cg+3616+24+8 +ASGNP4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +ADDRGP4 cg+3500 +INDIRF4 +ADDRLP4 40 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 804 +;804: } else if ( delta < LAND_DEFLECT_TIME + LAND_RETURN_TIME ) { +ADDRGP4 $569 +JUMPV +LABELV $568 +ADDRLP4 0 +INDIRF4 +CNSTF4 1138819072 +GEF4 $574 +line 805 +;805: delta -= LAND_DEFLECT_TIME; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1125515264 +SUBF4 +ASGNF4 +line 806 +;806: f = 1.0 - ( delta / LAND_RETURN_TIME ); +ADDRLP4 40 +CNSTF4 1065353216 +ADDRLP4 0 +INDIRF4 +CNSTF4 1133903872 +DIVF4 +SUBF4 +ASGNF4 +line 807 +;807: cg.refdef.vieworg[2] += cg.landChange * f; +ADDRLP4 84 +ADDRGP4 cg+3616+24+8 +ASGNP4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +ADDRGP4 cg+3500 +INDIRF4 +ADDRLP4 40 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 808 +;808: } +LABELV $574 +LABELV $569 +line 811 +;809: +;810: // add step offset +;811: CG_StepOffset(); +ADDRGP4 CG_StepOffset +CALLV +pop +line 815 +;812: +;813: // add kick offset +;814: +;815: VectorAdd (origin, cg.kick_origin, origin); +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +ADDRGP4 cg+13452 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 88 +ADDRLP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +ADDRLP4 88 +INDIRP4 +INDIRF4 +ADDRGP4 cg+13452+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 92 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +ADDRLP4 92 +INDIRP4 +INDIRF4 +ADDRGP4 cg+13452+8 +INDIRF4 +ADDF4 +ASGNF4 +line 829 +;816: +;817: // pivot the eye based on a neck length +;818:#if 0 +;819: { +;820:#define NECK_LENGTH 8 +;821: vec3_t forward, up; +;822: +;823: cg.refdef.vieworg[2] -= NECK_LENGTH; +;824: AngleVectors( cg.refdefViewAngles, forward, NULL, up ); +;825: VectorMA( cg.refdef.vieworg, 3, forward, cg.refdef.vieworg ); +;826: VectorMA( cg.refdef.vieworg, NECK_LENGTH, up, cg.refdef.vieworg ); +;827: } +;828:#endif +;829:} +LABELV $473 +endproc CG_OffsetFirstPersonView 96 0 +export CG_ZoomDown_f +proc CG_ZoomDown_f 0 0 +line 833 +;830: +;831://====================================================================== +;832: +;833:void CG_ZoomDown_f( void ) { +line 834 +;834: if ( cg.zoomed ) { +ADDRGP4 cg+4008 +INDIRI4 +CNSTI4 0 +EQI4 $586 +line 835 +;835: return; +ADDRGP4 $585 +JUMPV +LABELV $586 +line 837 +;836: } +;837: cg.zoomed = qtrue; +ADDRGP4 cg+4008 +CNSTI4 1 +ASGNI4 +line 838 +;838: cg.zoomTime = cg.time; +ADDRGP4 cg+4012 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 839 +;839:} +LABELV $585 +endproc CG_ZoomDown_f 0 0 +export CG_ZoomUp_f +proc CG_ZoomUp_f 0 0 +line 841 +;840: +;841:void CG_ZoomUp_f( void ) { +line 842 +;842: if ( !cg.zoomed ) { +ADDRGP4 cg+4008 +INDIRI4 +CNSTI4 0 +NEI4 $593 +line 843 +;843: return; +ADDRGP4 $592 +JUMPV +LABELV $593 +line 845 +;844: } +;845: cg.zoomed = qfalse; +ADDRGP4 cg+4008 +CNSTI4 0 +ASGNI4 +line 846 +;846: cg.zoomTime = cg.time; +ADDRGP4 cg+4012 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 847 +;847:} +LABELV $592 +endproc CG_ZoomUp_f 0 0 +export CG_CalcFOVFromX +proc CG_CalcFOVFromX 20 8 +line 862 +;848: +;849: +;850: +;851:/* +;852:==================== +;853:CG_CalcFovFromX +;854: +;855:Calcs Y FOV from given X FOV +;856:==================== +;857:*/ +;858:#define WAVE_AMPLITUDE 1 +;859:#define WAVE_FREQUENCY 0.4 +;860: +;861:qboolean CG_CalcFOVFromX( float fov_x ) +;862:{ +line 870 +;863: float x; +;864:// float phase; +;865:// float v; +;866:// int contents; +;867: float fov_y; +;868: qboolean inwater; +;869: +;870: x = cg.refdef.width / tan( fov_x / 360 * M_PI ); +CNSTF4 1078530011 +ADDRFP4 0 +INDIRF4 +CNSTF4 1135869952 +DIVF4 +MULF4 +ARGF4 +ADDRLP4 12 +ADDRGP4 tan +CALLF4 +ASGNF4 +ADDRLP4 4 +ADDRGP4 cg+3616+8 +INDIRI4 +CVIF4 4 +ADDRLP4 12 +INDIRF4 +DIVF4 +ASGNF4 +line 871 +;871: fov_y = atan2( cg.refdef.height, x ); +ADDRGP4 cg+3616+12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 16 +ADDRGP4 atan2 +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 872 +;872: fov_y = fov_y * 360 / M_PI; +ADDRLP4 0 +CNSTF4 1135869952 +ADDRLP4 0 +INDIRF4 +MULF4 +CNSTF4 1078530011 +DIVF4 +ASGNF4 +line 895 +;873: +;874: // there's a problem with this, it only takes the leafbrushes into account, not the entity brushes, +;875: // so if you give slime/water etc properties to a func_door area brush in order to move the whole water +;876: // level up/down this doesn't take into account the door position, so warps the view the whole time +;877: // whether the water is up or not. Fortunately there's only one slime area in Trek that you can be under, +;878: // so lose it... +;879:#if 0 +;880:/* +;881: // warp if underwater +;882: contents = CG_PointContents( cg.refdef.vieworg, -1 ); +;883: if ( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ){ +;884: phase = cg.time / 1000.0 * WAVE_FREQUENCY * M_PI * 2; +;885: v = WAVE_AMPLITUDE * sin( phase ); +;886: fov_x += v; +;887: fov_y -= v; +;888: inwater = qtrue; +;889: } +;890: else { +;891: inwater = qfalse; +;892: } +;893:*/ +;894:#else +;895: inwater = qfalse; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 900 +;896:#endif +;897: +;898: +;899: // set it +;900: cg.refdef.fov_x = fov_x; +ADDRGP4 cg+3616+16 +ADDRFP4 0 +INDIRF4 +ASGNF4 +line 901 +;901: cg.refdef.fov_y = fov_y; +ADDRGP4 cg+3616+20 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 903 +;902: +;903: return (inwater); +ADDRLP4 8 +INDIRI4 +RETI4 +LABELV $599 +endproc CG_CalcFOVFromX 20 8 +data +align 4 +LABELV $651 +byte 4 0 +code +proc CG_CalcFov 52 16 +line 917 +;904:} +;905: +;906:/* +;907:==================== +;908:CG_CalcFov +;909: +;910:Fixed fov at intermissions, otherwise account for fov variable and zooms. +;911:==================== +;912:*/ +;913:#define WAVE_AMPLITUDE 1 +;914:#define WAVE_FREQUENCY 0.4 +;915:float zoomFov; //this has to be global client-side +;916: +;917:static int CG_CalcFov( void ) { +line 925 +;918: float x; +;919: float phase; +;920: float v; +;921: int contents; +;922: float fov_x, fov_y; +;923: float f; +;924: int inwater; +;925: float cgFov = cg_fov.value; +ADDRLP4 0 +ADDRGP4 cg_fov+8 +INDIRF4 +ASGNF4 +line 927 +;926: +;927: if (cgFov < 1) +ADDRLP4 0 +INDIRF4 +CNSTF4 1065353216 +GEF4 $610 +line 928 +;928: { +line 929 +;929: cgFov = 1; +ADDRLP4 0 +CNSTF4 1065353216 +ASGNF4 +line 930 +;930: } +LABELV $610 +line 931 +;931: if (cgFov > 97) +ADDRLP4 0 +INDIRF4 +CNSTF4 1120010240 +LEF4 $612 +line 932 +;932: { +line 933 +;933: cgFov = 97; +ADDRLP4 0 +CNSTF4 1120010240 +ASGNF4 +line 934 +;934: } +LABELV $612 +line 936 +;935: +;936: if ( cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { +ADDRGP4 cg+96+4 +INDIRI4 +CNSTI4 6 +NEI4 $614 +line 938 +;937: // if in intermission, use a fixed value +;938: fov_x = 80;//90; +ADDRLP4 4 +CNSTF4 1117782016 +ASGNF4 +line 939 +;939: } else { +ADDRGP4 $615 +JUMPV +LABELV $614 +line 941 +;940: // user selectable +;941: if ( cgs.dmflags & DF_FIXED_FOV ) { +ADDRGP4 cgs+32964 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $618 +line 943 +;942: // dmflag to prevent wide fov for all clients +;943: fov_x = 80;//90; +ADDRLP4 4 +CNSTF4 1117782016 +ASGNF4 +line 944 +;944: } else { +ADDRGP4 $619 +JUMPV +LABELV $618 +line 945 +;945: fov_x = cgFov; +ADDRLP4 4 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 946 +;946: if ( fov_x < 1 ) { +ADDRLP4 4 +INDIRF4 +CNSTF4 1065353216 +GEF4 $621 +line 947 +;947: fov_x = 1; +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +line 948 +;948: } else if ( fov_x > 160 ) { +ADDRGP4 $622 +JUMPV +LABELV $621 +ADDRLP4 4 +INDIRF4 +CNSTF4 1126170624 +LEF4 $623 +line 949 +;949: fov_x = 160; +ADDRLP4 4 +CNSTF4 1126170624 +ASGNF4 +line 950 +;950: } +LABELV $623 +LABELV $622 +line 951 +;951: } +LABELV $619 +line 953 +;952: +;953: if (cg.predictedPlayerState.zoomMode == 2) +ADDRGP4 cg+96+1332 +INDIRI4 +CNSTI4 2 +NEI4 $625 +line 954 +;954: { //binoculars +line 955 +;955: if (zoomFov > 40.0f) +ADDRGP4 zoomFov +INDIRF4 +CNSTF4 1109393408 +LEF4 $629 +line 956 +;956: { +line 957 +;957: zoomFov -= cg.frametime * 0.075f; +ADDRLP4 36 +ADDRGP4 zoomFov +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +CNSTF4 1033476506 +ADDRGP4 cg+60 +INDIRI4 +CVIF4 4 +MULF4 +SUBF4 +ASGNF4 +line 959 +;958: +;959: if (zoomFov < 40.0f) +ADDRGP4 zoomFov +INDIRF4 +CNSTF4 1109393408 +GEF4 $632 +line 960 +;960: { +line 961 +;961: zoomFov = 40.0f; +ADDRGP4 zoomFov +CNSTF4 1109393408 +ASGNF4 +line 962 +;962: } +ADDRGP4 $633 +JUMPV +LABELV $632 +line 963 +;963: else if (zoomFov > cgFov) +ADDRGP4 zoomFov +INDIRF4 +ADDRLP4 0 +INDIRF4 +LEF4 $634 +line 964 +;964: { +line 965 +;965: zoomFov = cgFov; +ADDRGP4 zoomFov +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 966 +;966: } +LABELV $634 +LABELV $633 +line 967 +;967: } +LABELV $629 +line 969 +;968: +;969: fov_x = zoomFov; +ADDRLP4 4 +ADDRGP4 zoomFov +INDIRF4 +ASGNF4 +line 970 +;970: } +ADDRGP4 $626 +JUMPV +LABELV $625 +line 971 +;971: else if (cg.predictedPlayerState.zoomMode) +ADDRGP4 cg+96+1332 +INDIRI4 +CNSTI4 0 +EQI4 $636 +line 972 +;972: { +line 973 +;973: if (!cg.predictedPlayerState.zoomLocked) +ADDRGP4 cg+96+1340 +INDIRI4 +CNSTI4 0 +NEI4 $640 +line 974 +;974: { +line 975 +;975: if (zoomFov > 50) +ADDRGP4 zoomFov +INDIRF4 +CNSTF4 1112014848 +LEF4 $644 +line 976 +;976: { //Now starting out at nearly half zoomed in +line 977 +;977: zoomFov = 50; +ADDRGP4 zoomFov +CNSTF4 1112014848 +ASGNF4 +line 978 +;978: } +LABELV $644 +line 979 +;979: zoomFov -= cg.frametime * 0.035f;//0.075f; +ADDRLP4 36 +ADDRGP4 zoomFov +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +CNSTF4 1024416809 +ADDRGP4 cg+60 +INDIRI4 +CVIF4 4 +MULF4 +SUBF4 +ASGNF4 +line 981 +;980: +;981: if (zoomFov < MAX_ZOOM_FOV) +ADDRGP4 zoomFov +INDIRF4 +CNSTF4 1077936128 +GEF4 $647 +line 982 +;982: { +line 983 +;983: zoomFov = MAX_ZOOM_FOV; +ADDRGP4 zoomFov +CNSTF4 1077936128 +ASGNF4 +line 984 +;984: } +ADDRGP4 $648 +JUMPV +LABELV $647 +line 985 +;985: else if (zoomFov > cgFov) +ADDRGP4 zoomFov +INDIRF4 +ADDRLP4 0 +INDIRF4 +LEF4 $649 +line 986 +;986: { +line 987 +;987: zoomFov = cgFov; +ADDRGP4 zoomFov +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 988 +;988: } +ADDRGP4 $650 +JUMPV +LABELV $649 +line 990 +;989: else +;990: { // Still zooming +line 993 +;991: static zoomSoundTime = 0; +;992: +;993: if (zoomSoundTime < cg.time || zoomSoundTime > cg.time + 10000) +ADDRLP4 40 +ADDRGP4 $651 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LTI4 $656 +ADDRLP4 40 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 10000 +ADDI4 +LEI4 $652 +LABELV $656 +line 994 +;994: { +line 995 +;995: trap_S_StartSound(cg.refdef.vieworg, ENTITYNUM_WORLD, CHAN_LOCAL, cgs.media.disruptorZoomLoop); +ADDRGP4 cg+3616+24 +ARGP4 +CNSTI4 1022 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRGP4 cgs+70296+1264 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 996 +;996: zoomSoundTime = cg.time + 300; +ADDRGP4 $651 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 300 +ADDI4 +ASGNI4 +line 997 +;997: } +LABELV $652 +line 998 +;998: } +LABELV $650 +LABELV $648 +line 999 +;999: } +LABELV $640 +line 1001 +;1000: +;1001: fov_x = zoomFov; +ADDRLP4 4 +ADDRGP4 zoomFov +INDIRF4 +ASGNF4 +line 1002 +;1002: } +ADDRGP4 $637 +JUMPV +LABELV $636 +line 1004 +;1003: else +;1004: { +line 1005 +;1005: zoomFov = 80; +ADDRGP4 zoomFov +CNSTF4 1117782016 +ASGNF4 +line 1007 +;1006: +;1007: f = ( cg.time - cg.predictedPlayerState.zoomTime ) / ZOOM_OUT_TIME; +ADDRLP4 32 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+96+1336 +INDIRI4 +SUBI4 +CVIF4 4 +CNSTF4 1120403456 +DIVF4 +ASGNF4 +line 1008 +;1008: if ( f > 1.0 ) +ADDRLP4 32 +INDIRF4 +CNSTF4 1065353216 +LEF4 $665 +line 1009 +;1009: { +line 1010 +;1010: fov_x = fov_x; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 1011 +;1011: } +ADDRGP4 $666 +JUMPV +LABELV $665 +line 1013 +;1012: else +;1013: { +line 1014 +;1014: fov_x = cg.predictedPlayerState.zoomFov + f * ( fov_x - cg.predictedPlayerState.zoomFov ); +ADDRLP4 4 +ADDRGP4 cg+96+1344 +INDIRF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDRGP4 cg+96+1344 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 1015 +;1015: } +LABELV $666 +line 1016 +;1016: } +LABELV $637 +LABELV $626 +line 1017 +;1017: } +LABELV $615 +line 1019 +;1018: +;1019: x = cg.refdef.width / tan( fov_x / 360 * M_PI ); +CNSTF4 1078530011 +ADDRLP4 4 +INDIRF4 +CNSTF4 1135869952 +DIVF4 +MULF4 +ARGF4 +ADDRLP4 36 +ADDRGP4 tan +CALLF4 +ASGNF4 +ADDRLP4 12 +ADDRGP4 cg+3616+8 +INDIRI4 +CVIF4 4 +ADDRLP4 36 +INDIRF4 +DIVF4 +ASGNF4 +line 1020 +;1020: fov_y = atan2( cg.refdef.height, x ); +ADDRGP4 cg+3616+12 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 40 +ADDRGP4 atan2 +CALLF4 +ASGNF4 +ADDRLP4 8 +ADDRLP4 40 +INDIRF4 +ASGNF4 +line 1021 +;1021: fov_y = fov_y * 360 / M_PI; +ADDRLP4 8 +CNSTF4 1135869952 +ADDRLP4 8 +INDIRF4 +MULF4 +CNSTF4 1078530011 +DIVF4 +ASGNF4 +line 1024 +;1022: +;1023: // warp if underwater +;1024: contents = CG_PointContents( cg.refdef.vieworg, -1 ); +ADDRGP4 cg+3616+24 +ARGP4 +CNSTI4 -1 +ARGI4 +ADDRLP4 44 +ADDRGP4 CG_PointContents +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 1025 +;1025: if ( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ){ +ADDRLP4 16 +INDIRI4 +CNSTI4 131078 +BANDI4 +CNSTI4 0 +EQI4 $677 +line 1026 +;1026: phase = cg.time / 1000.0 * WAVE_FREQUENCY * M_PI * 2; +ADDRLP4 28 +CNSTF4 1073741824 +CNSTF4 1078530011 +CNSTF4 1053609165 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +CNSTF4 1148846080 +DIVF4 +MULF4 +MULF4 +MULF4 +ASGNF4 +line 1027 +;1027: v = WAVE_AMPLITUDE * sin( phase ); +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 48 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 24 +CNSTF4 1065353216 +ADDRLP4 48 +INDIRF4 +MULF4 +ASGNF4 +line 1028 +;1028: fov_x += v; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +ADDF4 +ASGNF4 +line 1029 +;1029: fov_y -= v; +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRLP4 24 +INDIRF4 +SUBF4 +ASGNF4 +line 1030 +;1030: inwater = qtrue; +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +line 1031 +;1031: } +ADDRGP4 $678 +JUMPV +LABELV $677 +line 1032 +;1032: else { +line 1033 +;1033: inwater = qfalse; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +line 1034 +;1034: } +LABELV $678 +line 1038 +;1035: +;1036: +;1037: // set it +;1038: cg.refdef.fov_x = fov_x; +ADDRGP4 cg+3616+16 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 1039 +;1039: cg.refdef.fov_y = fov_y; +ADDRGP4 cg+3616+20 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 1041 +;1040: +;1041: if (cg.predictedPlayerState.zoomMode) +ADDRGP4 cg+96+1332 +INDIRI4 +CNSTI4 0 +EQI4 $684 +line 1042 +;1042: { +line 1043 +;1043: cg.zoomSensitivity = zoomFov/cgFov; +ADDRGP4 cg+4016 +ADDRGP4 zoomFov +INDIRF4 +ADDRLP4 0 +INDIRF4 +DIVF4 +ASGNF4 +line 1044 +;1044: } +ADDRGP4 $685 +JUMPV +LABELV $684 +line 1045 +;1045: else if ( !cg.zoomed ) { +ADDRGP4 cg+4008 +INDIRI4 +CNSTI4 0 +NEI4 $689 +line 1046 +;1046: cg.zoomSensitivity = 1; +ADDRGP4 cg+4016 +CNSTF4 1065353216 +ASGNF4 +line 1047 +;1047: } else { +ADDRGP4 $690 +JUMPV +LABELV $689 +line 1048 +;1048: cg.zoomSensitivity = cg.refdef.fov_y / 75.0; +ADDRGP4 cg+4016 +ADDRGP4 cg+3616+20 +INDIRF4 +CNSTF4 1117126656 +DIVF4 +ASGNF4 +line 1049 +;1049: } +LABELV $690 +LABELV $685 +line 1051 +;1050: +;1051: return inwater; +ADDRLP4 20 +INDIRI4 +RETI4 +LABELV $608 +endproc CG_CalcFov 52 16 +proc CG_DamageBlendBlob 260 12 +line 1062 +;1052:} +;1053: +;1054: +;1055:/* +;1056:=============== +;1057:CG_DamageBlendBlob +;1058: +;1059:=============== +;1060:*/ +;1061:static void CG_DamageBlendBlob( void ) +;1062:{ +line 1067 +;1063: int t; +;1064: int maxTime; +;1065: refEntity_t ent; +;1066: +;1067: if ( !cg.damageValue ) { +ADDRGP4 cg+13396 +INDIRF4 +CNSTF4 0 +NEF4 $697 +line 1068 +;1068: return; +ADDRGP4 $696 +JUMPV +LABELV $697 +line 1071 +;1069: } +;1070: +;1071: maxTime = DAMAGE_TIME; +ADDRLP4 216 +CNSTI4 500 +ASGNI4 +line 1072 +;1072: t = cg.time - cg.damageTime; +ADDRLP4 212 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +ADDRGP4 cg+13384 +INDIRF4 +SUBF4 +CVFI4 4 +ASGNI4 +line 1073 +;1073: if ( t <= 0 || t >= maxTime ) { +ADDRLP4 212 +INDIRI4 +CNSTI4 0 +LEI4 $704 +ADDRLP4 212 +INDIRI4 +ADDRLP4 216 +INDIRI4 +LTI4 $702 +LABELV $704 +line 1074 +;1074: return; +ADDRGP4 $696 +JUMPV +LABELV $702 +line 1077 +;1075: } +;1076: +;1077: memset( &ent, 0, sizeof( ent ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 1078 +;1078: ent.reType = RT_SPRITE; +ADDRLP4 0 +CNSTI4 2 +ASGNI4 +line 1079 +;1079: ent.renderfx = RF_FIRST_PERSON; +ADDRLP4 0+4 +CNSTI4 4 +ASGNI4 +line 1081 +;1080: +;1081: VectorMA( cg.refdef.vieworg, 8, cg.refdef.viewaxis[0], ent.origin ); +ADDRLP4 0+52 +ADDRGP4 cg+3616+24 +INDIRF4 +CNSTF4 1090519040 +ADDRGP4 cg+3616+36 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +CNSTF4 1090519040 +ADDRGP4 cg+3616+36+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+8 +ADDRGP4 cg+3616+24+8 +INDIRF4 +CNSTF4 1090519040 +ADDRGP4 cg+3616+36+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1082 +;1082: VectorMA( ent.origin, cg.damageX * -8, cg.refdef.viewaxis[1], ent.origin ); +ADDRLP4 0+52 +ADDRLP4 0+52 +INDIRF4 +ADDRGP4 cg+3616+36+12 +INDIRF4 +CNSTF4 3238002688 +ADDRGP4 cg+13388 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+4 +ADDRLP4 0+52+4 +INDIRF4 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +CNSTF4 3238002688 +ADDRGP4 cg+13388 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +CNSTF4 3238002688 +ADDRGP4 cg+13388 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 1083 +;1083: VectorMA( ent.origin, cg.damageY * 8, cg.refdef.viewaxis[2], ent.origin ); +ADDRLP4 0+52 +ADDRLP4 0+52 +INDIRF4 +ADDRGP4 cg+3616+36+24 +INDIRF4 +CNSTF4 1090519040 +ADDRGP4 cg+13392 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+4 +ADDRLP4 0+52+4 +INDIRF4 +ADDRGP4 cg+3616+36+24+4 +INDIRF4 +CNSTF4 1090519040 +ADDRGP4 cg+13392 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +ADDRGP4 cg+3616+36+24+8 +INDIRF4 +CNSTF4 1090519040 +ADDRGP4 cg+13392 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 1085 +;1084: +;1085: ent.radius = cg.damageValue * 3 * ( 1.0 - ((float)t / maxTime) ); +ADDRLP4 0+92 +CNSTF4 1077936128 +ADDRGP4 cg+13396 +INDIRF4 +MULF4 +CNSTF4 1065353216 +ADDRLP4 212 +INDIRI4 +CVIF4 4 +ADDRLP4 216 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +MULF4 +ASGNF4 +line 1087 +;1086: +;1087: if (cg.snap->ps.damageType == 0) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $777 +line 1088 +;1088: { //pure health +line 1089 +;1089: ent.customShader = cgs.media.viewPainShader; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+436 +INDIRI4 +ASGNI4 +line 1090 +;1090: ent.shaderRGBA[0] = 180 * ( 1.0 - ((float)t / maxTime) ); +ADDRLP4 228 +CNSTF4 1127481344 +CNSTF4 1065353216 +ADDRLP4 212 +INDIRI4 +CVIF4 4 +ADDRLP4 216 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 232 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 228 +INDIRF4 +ADDRLP4 232 +INDIRF4 +LTF4 $785 +ADDRLP4 224 +ADDRLP4 228 +INDIRF4 +ADDRLP4 232 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $786 +JUMPV +LABELV $785 +ADDRLP4 224 +ADDRLP4 228 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $786 +ADDRLP4 0+80 +ADDRLP4 224 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1091 +;1091: ent.shaderRGBA[1] = 50 * ( 1.0 - ((float)t / maxTime) ); +ADDRLP4 240 +CNSTF4 1112014848 +CNSTF4 1065353216 +ADDRLP4 212 +INDIRI4 +CVIF4 4 +ADDRLP4 216 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 244 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 240 +INDIRF4 +ADDRLP4 244 +INDIRF4 +LTF4 $790 +ADDRLP4 236 +ADDRLP4 240 +INDIRF4 +ADDRLP4 244 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $791 +JUMPV +LABELV $790 +ADDRLP4 236 +ADDRLP4 240 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $791 +ADDRLP4 0+80+1 +ADDRLP4 236 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1092 +;1092: ent.shaderRGBA[2] = 50 * ( 1.0 - ((float)t / maxTime) ); +ADDRLP4 252 +CNSTF4 1112014848 +CNSTF4 1065353216 +ADDRLP4 212 +INDIRI4 +CVIF4 4 +ADDRLP4 216 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 256 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 252 +INDIRF4 +ADDRLP4 256 +INDIRF4 +LTF4 $795 +ADDRLP4 248 +ADDRLP4 252 +INDIRF4 +ADDRLP4 256 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $796 +JUMPV +LABELV $795 +ADDRLP4 248 +ADDRLP4 252 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $796 +ADDRLP4 0+80+2 +ADDRLP4 248 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1093 +;1093: ent.shaderRGBA[3] = 255; +ADDRLP4 0+80+3 +CNSTU1 255 +ASGNU1 +line 1094 +;1094: } +ADDRGP4 $778 +JUMPV +LABELV $777 +line 1095 +;1095: else if (cg.snap->ps.damageType == 1) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $799 +line 1096 +;1096: { //pure shields +line 1097 +;1097: ent.customShader = cgs.media.viewPainShader_Shields; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+440 +INDIRI4 +ASGNI4 +line 1098 +;1098: ent.shaderRGBA[0] = 50 * ( 1.0 - ((float)t / maxTime) ); +ADDRLP4 228 +CNSTF4 1112014848 +CNSTF4 1065353216 +ADDRLP4 212 +INDIRI4 +CVIF4 4 +ADDRLP4 216 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 232 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 228 +INDIRF4 +ADDRLP4 232 +INDIRF4 +LTF4 $807 +ADDRLP4 224 +ADDRLP4 228 +INDIRF4 +ADDRLP4 232 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $808 +JUMPV +LABELV $807 +ADDRLP4 224 +ADDRLP4 228 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $808 +ADDRLP4 0+80 +ADDRLP4 224 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1099 +;1099: ent.shaderRGBA[1] = 180 * ( 1.0 - ((float)t / maxTime) ); +ADDRLP4 240 +CNSTF4 1127481344 +CNSTF4 1065353216 +ADDRLP4 212 +INDIRI4 +CVIF4 4 +ADDRLP4 216 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 244 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 240 +INDIRF4 +ADDRLP4 244 +INDIRF4 +LTF4 $812 +ADDRLP4 236 +ADDRLP4 240 +INDIRF4 +ADDRLP4 244 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $813 +JUMPV +LABELV $812 +ADDRLP4 236 +ADDRLP4 240 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $813 +ADDRLP4 0+80+1 +ADDRLP4 236 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1100 +;1100: ent.shaderRGBA[2] = 50 * ( 1.0 - ((float)t / maxTime) ); +ADDRLP4 252 +CNSTF4 1112014848 +CNSTF4 1065353216 +ADDRLP4 212 +INDIRI4 +CVIF4 4 +ADDRLP4 216 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 256 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 252 +INDIRF4 +ADDRLP4 256 +INDIRF4 +LTF4 $817 +ADDRLP4 248 +ADDRLP4 252 +INDIRF4 +ADDRLP4 256 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $818 +JUMPV +LABELV $817 +ADDRLP4 248 +ADDRLP4 252 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $818 +ADDRLP4 0+80+2 +ADDRLP4 248 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1101 +;1101: ent.shaderRGBA[3] = 255; +ADDRLP4 0+80+3 +CNSTU1 255 +ASGNU1 +line 1102 +;1102: } +ADDRGP4 $800 +JUMPV +LABELV $799 +line 1104 +;1103: else +;1104: { //shields and health +line 1105 +;1105: ent.customShader = cgs.media.viewPainShader_ShieldsAndHealth; +ADDRLP4 0+76 +ADDRGP4 cgs+70296+444 +INDIRI4 +ASGNI4 +line 1106 +;1106: ent.shaderRGBA[0] = 180 * ( 1.0 - ((float)t / maxTime) ); +ADDRLP4 228 +CNSTF4 1127481344 +CNSTF4 1065353216 +ADDRLP4 212 +INDIRI4 +CVIF4 4 +ADDRLP4 216 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 232 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 228 +INDIRF4 +ADDRLP4 232 +INDIRF4 +LTF4 $826 +ADDRLP4 224 +ADDRLP4 228 +INDIRF4 +ADDRLP4 232 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $827 +JUMPV +LABELV $826 +ADDRLP4 224 +ADDRLP4 228 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $827 +ADDRLP4 0+80 +ADDRLP4 224 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1107 +;1107: ent.shaderRGBA[1] = 180 * ( 1.0 - ((float)t / maxTime) ); +ADDRLP4 240 +CNSTF4 1127481344 +CNSTF4 1065353216 +ADDRLP4 212 +INDIRI4 +CVIF4 4 +ADDRLP4 216 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 244 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 240 +INDIRF4 +ADDRLP4 244 +INDIRF4 +LTF4 $831 +ADDRLP4 236 +ADDRLP4 240 +INDIRF4 +ADDRLP4 244 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $832 +JUMPV +LABELV $831 +ADDRLP4 236 +ADDRLP4 240 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $832 +ADDRLP4 0+80+1 +ADDRLP4 236 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1108 +;1108: ent.shaderRGBA[2] = 50 * ( 1.0 - ((float)t / maxTime) ); +ADDRLP4 252 +CNSTF4 1112014848 +CNSTF4 1065353216 +ADDRLP4 212 +INDIRI4 +CVIF4 4 +ADDRLP4 216 +INDIRI4 +CVIF4 4 +DIVF4 +SUBF4 +MULF4 +ASGNF4 +ADDRLP4 256 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 252 +INDIRF4 +ADDRLP4 256 +INDIRF4 +LTF4 $836 +ADDRLP4 248 +ADDRLP4 252 +INDIRF4 +ADDRLP4 256 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $837 +JUMPV +LABELV $836 +ADDRLP4 248 +ADDRLP4 252 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $837 +ADDRLP4 0+80+2 +ADDRLP4 248 +INDIRU4 +CVUU1 4 +ASGNU1 +line 1109 +;1109: ent.shaderRGBA[3] = 255; +ADDRLP4 0+80+3 +CNSTU1 255 +ASGNU1 +line 1110 +;1110: } +LABELV $800 +LABELV $778 +line 1111 +;1111: trap_R_AddRefEntityToScene( &ent ); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 1112 +;1112:} +LABELV $696 +endproc CG_DamageBlendBlob 260 12 +export CheckOutOfConstrict +proc CheckOutOfConstrict 20 0 +line 1115 +;1113: +;1114:qboolean CheckOutOfConstrict(float curAng) +;1115:{ +line 1118 +;1116: float degrees_negative, degrees_positive; +;1117: +;1118: float angle_ideal = cg.constrictValue; +ADDRLP4 4 +ADDRGP4 cg+3996 +INDIRF4 +ASGNF4 +line 1119 +;1119: float angle_current = curAng; +ADDRLP4 0 +ADDRFP4 0 +INDIRF4 +ASGNF4 +line 1121 +;1120: +;1121: float angle_dif = 0; +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +line 1123 +;1122: +;1123: if (angle_current < 0) +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +GEF4 $842 +line 1124 +;1124: { +line 1125 +;1125: angle_current += 360; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 1126 +;1126: } +LABELV $842 +line 1127 +;1127: if (angle_current > 360) +ADDRLP4 0 +INDIRF4 +CNSTF4 1135869952 +LEF4 $844 +line 1128 +;1128: { +line 1129 +;1129: angle_current -= 360; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1135869952 +SUBF4 +ASGNF4 +line 1130 +;1130: } +LABELV $844 +line 1132 +;1131: +;1132: if (cg.doConstrict <= cg.time) +ADDRGP4 cg+4004 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GTI4 $846 +line 1133 +;1133: { +line 1134 +;1134: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $840 +JUMPV +LABELV $846 +line 1137 +;1135: } +;1136: +;1137: if (angle_ideal <= angle_current) +ADDRLP4 4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +GTF4 $850 +line 1138 +;1138: { +line 1139 +;1139: degrees_negative = (angle_current - angle_ideal); +ADDRLP4 12 +ADDRLP4 0 +INDIRF4 +ADDRLP4 4 +INDIRF4 +SUBF4 +ASGNF4 +line 1141 +;1140: +;1141: degrees_positive = (360 - angle_current) + angle_ideal; +ADDRLP4 16 +CNSTF4 1135869952 +ADDRLP4 0 +INDIRF4 +SUBF4 +ADDRLP4 4 +INDIRF4 +ADDF4 +ASGNF4 +line 1142 +;1142: } +ADDRGP4 $851 +JUMPV +LABELV $850 +line 1144 +;1143: else +;1144: { +line 1145 +;1145: degrees_negative = angle_current + (360 - angle_ideal); +ADDRLP4 12 +ADDRLP4 0 +INDIRF4 +CNSTF4 1135869952 +ADDRLP4 4 +INDIRF4 +SUBF4 +ADDF4 +ASGNF4 +line 1147 +;1146: +;1147: degrees_positive = (angle_ideal - angle_current); +ADDRLP4 16 +ADDRLP4 4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ASGNF4 +line 1148 +;1148: } +LABELV $851 +line 1150 +;1149: +;1150: if (degrees_negative < degrees_positive) +ADDRLP4 12 +INDIRF4 +ADDRLP4 16 +INDIRF4 +GEF4 $852 +line 1151 +;1151: { +line 1152 +;1152: angle_dif = degrees_negative; +ADDRLP4 8 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 1153 +;1153: } +ADDRGP4 $853 +JUMPV +LABELV $852 +line 1155 +;1154: else +;1155: { +line 1156 +;1156: angle_dif = degrees_positive; +ADDRLP4 8 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 1157 +;1157: } +LABELV $853 +line 1159 +;1158: +;1159: if (angle_dif > 60) +ADDRLP4 8 +INDIRF4 +CNSTF4 1114636288 +LEF4 $854 +line 1160 +;1160: { +line 1161 +;1161: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $840 +JUMPV +LABELV $854 +line 1164 +;1162: } +;1163: +;1164: return qfalse; +CNSTI4 0 +RETI4 +LABELV $840 +endproc CheckOutOfConstrict 20 0 +proc CG_CalcViewValues 40 12 +line 1174 +;1165:} +;1166: +;1167:/* +;1168:=============== +;1169:CG_CalcViewValues +;1170: +;1171:Sets cg.refdef view values +;1172:=============== +;1173:*/ +;1174:static int CG_CalcViewValues( void ) { +line 1177 +;1175: playerState_t *ps; +;1176: +;1177: memset( &cg.refdef, 0, sizeof( cg.refdef ) ); +ADDRGP4 cg+3616 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 368 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 1184 +;1178: +;1179: // strings for in game rendering +;1180: // Q_strncpyz( cg.refdef.text[0], "Park Ranger", sizeof(cg.refdef.text[0]) ); +;1181: // Q_strncpyz( cg.refdef.text[1], "19", sizeof(cg.refdef.text[1]) ); +;1182: +;1183: // calculate size of 3D view +;1184: CG_CalcVrect(); +ADDRGP4 CG_CalcVrect +CALLV +pop +line 1186 +;1185: +;1186: ps = &cg.predictedPlayerState; +ADDRLP4 0 +ADDRGP4 cg+96 +ASGNP4 +line 1202 +;1187:/* +;1188: if (cg.cameraMode) { +;1189: vec3_t origin, angles; +;1190: if (trap_getCameraInfo(cg.time, &origin, &angles)) { +;1191: VectorCopy(origin, cg.refdef.vieworg); +;1192: angles[ROLL] = 0; +;1193: VectorCopy(angles, cg.refdefViewAngles); +;1194: AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); +;1195: return CG_CalcFov(); +;1196: } else { +;1197: cg.cameraMode = qfalse; +;1198: } +;1199: } +;1200:*/ +;1201: // intermission view +;1202: if ( ps->pm_type == PM_INTERMISSION ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $860 +line 1203 +;1203: VectorCopy( ps->origin, cg.refdef.vieworg ); +ADDRGP4 cg+3616+24 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 1204 +;1204: VectorCopy( ps->viewangles, cg.refdefViewAngles ); +ADDRGP4 cg+3984 +ADDRLP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRB +ASGNB 12 +line 1205 +;1205: AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); +ADDRGP4 cg+3984 +ARGP4 +ADDRGP4 cg+3616+36 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 1206 +;1206: return CG_CalcFov(); +ADDRLP4 4 +ADDRGP4 CG_CalcFov +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +RETI4 +ADDRGP4 $856 +JUMPV +LABELV $860 +line 1209 +;1207: } +;1208: +;1209: cg.bobcycle = ( ps->bobCycle & 128 ) >> 7; +ADDRGP4 cg+13468 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 7 +RSHI4 +ASGNI4 +line 1210 +;1210: cg.bobfracsin = fabs( sin( ( ps->bobCycle & 127 ) / 127.0 * M_PI ) ); +CNSTF4 1078530011 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 127 +BANDI4 +CVIF4 4 +CNSTF4 1123942400 +DIVF4 +MULF4 +ARGF4 +ADDRLP4 4 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRGP4 cg+13464 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 1211 +;1211: cg.xyspeed = sqrt( ps->velocity[0] * ps->velocity[0] + +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDRLP4 20 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ADDF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 sqrt +CALLF4 +ASGNF4 +ADDRGP4 cg+13472 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 1214 +;1212: ps->velocity[1] * ps->velocity[1] ); +;1213: +;1214: if (cg.xyspeed > 270) +ADDRGP4 cg+13472 +INDIRF4 +CNSTF4 1132920832 +LEF4 $871 +line 1215 +;1215: { +line 1216 +;1216: cg.xyspeed = 270; +ADDRGP4 cg+13472 +CNSTF4 1132920832 +ASGNF4 +line 1217 +;1217: } +LABELV $871 +line 1219 +;1218: +;1219: VectorCopy( ps->origin, cg.refdef.vieworg ); +ADDRGP4 cg+3616+24 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRB +ASGNB 12 +line 1220 +;1220: VectorCopy( ps->viewangles, cg.refdefViewAngles ); +ADDRGP4 cg+3984 +ADDRLP4 0 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRB +ASGNB 12 +line 1222 +;1221: +;1222: if (cg_cameraOrbit.integer) { +ADDRGP4 cg_cameraOrbit+12 +INDIRI4 +CNSTI4 0 +EQI4 $878 +line 1223 +;1223: if (cg.time > cg.nextOrbitTime) { +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+13476 +INDIRI4 +LEI4 $881 +line 1224 +;1224: cg.nextOrbitTime = cg.time + cg_cameraOrbitDelay.integer; +ADDRGP4 cg+13476 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg_cameraOrbitDelay+12 +INDIRI4 +ADDI4 +ASGNI4 +line 1225 +;1225: cg_thirdPersonAngle.value += cg_cameraOrbit.value; +ADDRLP4 28 +ADDRGP4 cg_thirdPersonAngle+8 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRGP4 cg_cameraOrbit+8 +INDIRF4 +ADDF4 +ASGNF4 +line 1226 +;1226: } +LABELV $881 +line 1227 +;1227: } +LABELV $878 +line 1229 +;1228: // add error decay +;1229: if ( cg_errorDecay.value > 0 ) { +ADDRGP4 cg_errorDecay+8 +INDIRF4 +CNSTF4 0 +LEF4 $890 +line 1233 +;1230: int t; +;1231: float f; +;1232: +;1233: t = cg.time - cg.predictedErrorTime; +ADDRLP4 32 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+3400 +INDIRI4 +SUBI4 +ASGNI4 +line 1234 +;1234: f = ( cg_errorDecay.value - t ) / cg_errorDecay.value; +ADDRLP4 28 +ADDRGP4 cg_errorDecay+8 +INDIRF4 +ADDRLP4 32 +INDIRI4 +CVIF4 4 +SUBF4 +ADDRGP4 cg_errorDecay+8 +INDIRF4 +DIVF4 +ASGNF4 +line 1235 +;1235: if ( f > 0 && f < 1 ) { +ADDRLP4 36 +ADDRLP4 28 +INDIRF4 +ASGNF4 +ADDRLP4 36 +INDIRF4 +CNSTF4 0 +LEF4 $897 +ADDRLP4 36 +INDIRF4 +CNSTF4 1065353216 +GEF4 $897 +line 1236 +;1236: VectorMA( cg.refdef.vieworg, f, cg.predictedError, cg.refdef.vieworg ); +ADDRGP4 cg+3616+24 +ADDRGP4 cg+3616+24 +INDIRF4 +ADDRGP4 cg+3404 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cg+3616+24+4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +ADDRGP4 cg+3404+4 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRGP4 cg+3616+24+8 +ADDRGP4 cg+3616+24+8 +INDIRF4 +ADDRGP4 cg+3404+8 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1237 +;1237: } else { +ADDRGP4 $898 +JUMPV +LABELV $897 +line 1238 +;1238: cg.predictedErrorTime = 0; +ADDRGP4 cg+3400 +CNSTI4 0 +ASGNI4 +line 1239 +;1239: } +LABELV $898 +line 1240 +;1240: } +LABELV $890 +line 1242 +;1241: +;1242: if ( cg.renderingThirdPerson && !cg.snap->ps.zoomMode) { +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+88 +INDIRI4 +ADDRLP4 28 +INDIRI4 +EQI4 $921 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1376 +ADDP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +NEI4 $921 +line 1244 +;1243: // back away from character +;1244: CG_OffsetThirdPersonView(); +ADDRGP4 CG_OffsetThirdPersonView +CALLV +pop +line 1245 +;1245: } else { +ADDRGP4 $922 +JUMPV +LABELV $921 +line 1247 +;1246: // offset for local bobbing and kicks +;1247: CG_OffsetFirstPersonView(); +ADDRGP4 CG_OffsetFirstPersonView +CALLV +pop +line 1248 +;1248: } +LABELV $922 +line 1251 +;1249: +;1250: // position eye reletive to origin +;1251: AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis ); +ADDRGP4 cg+3984 +ARGP4 +ADDRGP4 cg+3616+36 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 1253 +;1252: +;1253: if ( cg.hyperspace ) { +ADDRGP4 cg+92 +INDIRI4 +CNSTI4 0 +EQI4 $928 +line 1254 +;1254: cg.refdef.rdflags |= RDF_NOWORLDMODEL | RDF_HYPERSPACE; +ADDRLP4 32 +ADDRGP4 cg+3616+76 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRI4 +CNSTI4 5 +BORI4 +ASGNI4 +line 1255 +;1255: } +LABELV $928 +line 1258 +;1256: +;1257: // field of view +;1258: return CG_CalcFov(); +ADDRLP4 32 +ADDRGP4 CG_CalcFov +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +RETI4 +LABELV $856 +endproc CG_CalcViewValues 40 12 +proc CG_PowerupTimerSounds 16 0 +line 1267 +;1259:} +;1260: +;1261: +;1262:/* +;1263:===================== +;1264:CG_PowerupTimerSounds +;1265:===================== +;1266:*/ +;1267:static void CG_PowerupTimerSounds( void ) { +line 1272 +;1268: int i; +;1269: int t; +;1270: +;1271: // powerup timers going away +;1272: for ( i = 0 ; i < MAX_POWERUPS ; i++ ) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +LABELV $934 +line 1273 +;1273: t = cg.snap->ps.powerups[i]; +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 388 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 1274 +;1274: if ( t <= cg.time ) { +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GTI4 $939 +line 1275 +;1275: continue; +ADDRGP4 $935 +JUMPV +LABELV $939 +line 1277 +;1276: } +;1277: if ( t - cg.time >= POWERUP_BLINKS * POWERUP_BLINK_TIME ) { +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +CNSTI4 5000 +LTI4 $942 +line 1278 +;1278: continue; +ADDRGP4 $935 +JUMPV +LABELV $942 +line 1280 +;1279: } +;1280: if ( ( t - cg.time ) / POWERUP_BLINK_TIME != ( t - cg.oldTime ) / POWERUP_BLINK_TIME ) { +ADDRLP4 12 +CNSTI4 1000 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +SUBI4 +ADDRLP4 12 +INDIRI4 +DIVI4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 cg+68 +INDIRI4 +SUBI4 +ADDRLP4 12 +INDIRI4 +DIVI4 +EQI4 $945 +line 1282 +;1281: //trap_S_StartSound( NULL, cg.snap->ps.clientNum, CHAN_ITEM, cgs.media.wearOffSound ); +;1282: } +LABELV $945 +line 1283 +;1283: } +LABELV $935 +line 1272 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 16 +LTI4 $934 +line 1284 +;1284:} +LABELV $933 +endproc CG_PowerupTimerSounds 16 0 +export CG_AddBufferedSound +proc CG_AddBufferedSound 4 0 +line 1291 +;1285: +;1286:/* +;1287:===================== +;1288:CG_AddBufferedSound +;1289:===================== +;1290:*/ +;1291:void CG_AddBufferedSound( sfxHandle_t sfx ) { +line 1292 +;1292: if ( !sfx ) +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $950 +line 1293 +;1293: return; +ADDRGP4 $949 +JUMPV +LABELV $950 +line 1294 +;1294: cg.soundBuffer[cg.soundBufferIn] = sfx; +ADDRGP4 cg+13248 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+13260 +ADDP4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1295 +;1295: cg.soundBufferIn = (cg.soundBufferIn + 1) % MAX_SOUNDBUFFER; +ADDRGP4 cg+13248 +ADDRGP4 cg+13248 +INDIRI4 +CNSTI4 1 +ADDI4 +CNSTI4 20 +MODI4 +ASGNI4 +line 1296 +;1296: if (cg.soundBufferIn == cg.soundBufferOut) { +ADDRGP4 cg+13248 +INDIRI4 +ADDRGP4 cg+13252 +INDIRI4 +NEI4 $956 +line 1297 +;1297: cg.soundBufferOut++; +ADDRLP4 0 +ADDRGP4 cg+13252 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1298 +;1298: } +LABELV $956 +line 1299 +;1299:} +LABELV $949 +endproc CG_AddBufferedSound 4 0 +proc CG_PlayBufferedSounds 0 8 +line 1306 +;1300: +;1301:/* +;1302:===================== +;1303:CG_PlayBufferedSounds +;1304:===================== +;1305:*/ +;1306:static void CG_PlayBufferedSounds( void ) { +line 1307 +;1307: if ( cg.soundTime < cg.time ) { +ADDRGP4 cg+13256 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $962 +line 1308 +;1308: if (cg.soundBufferOut != cg.soundBufferIn && cg.soundBuffer[cg.soundBufferOut]) { +ADDRGP4 cg+13252 +INDIRI4 +ADDRGP4 cg+13248 +INDIRI4 +EQI4 $966 +ADDRGP4 cg+13252 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+13260 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $966 +line 1309 +;1309: trap_S_StartLocalSound(cg.soundBuffer[cg.soundBufferOut], CHAN_ANNOUNCER); +ADDRGP4 cg+13252 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+13260 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 7 +ARGI4 +ADDRGP4 trap_S_StartLocalSound +CALLV +pop +line 1310 +;1310: cg.soundBuffer[cg.soundBufferOut] = 0; +ADDRGP4 cg+13252 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+13260 +ADDP4 +CNSTI4 0 +ASGNI4 +line 1311 +;1311: cg.soundBufferOut = (cg.soundBufferOut + 1) % MAX_SOUNDBUFFER; +ADDRGP4 cg+13252 +ADDRGP4 cg+13252 +INDIRI4 +CNSTI4 1 +ADDI4 +CNSTI4 20 +MODI4 +ASGNI4 +line 1312 +;1312: cg.soundTime = cg.time + 750; +ADDRGP4 cg+13256 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 750 +ADDI4 +ASGNI4 +line 1313 +;1313: } +LABELV $966 +line 1314 +;1314: } +LABELV $962 +line 1315 +;1315:} +LABELV $961 +endproc CG_PlayBufferedSounds 0 8 +export CG_UpdateSoundTrackers +proc CG_UpdateSoundTrackers 16 8 +line 1318 +;1316: +;1317:void CG_UpdateSoundTrackers() +;1318:{ +line 1322 +;1319: int num; +;1320: centity_t *cent; +;1321: +;1322: for ( num = 0 ; num < ENTITYNUM_NONE ; num++ ) +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +LABELV $981 +line 1323 +;1323: { +line 1324 +;1324: cent = &cg_entities[num]; +ADDRLP4 0 +CNSTI4 1920 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 1326 +;1325: +;1326: if (cent && cent->currentState.eFlags & EF_SOUNDTRACKER) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $985 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 8388608 +BANDI4 +CNSTI4 0 +EQI4 $985 +line 1327 +;1327: { //keep sound for this entity updated in accordance with its attached entity at all times +line 1328 +;1328: if (cg.snap && cent->currentState.trickedentindex == cg.snap->ps.clientNum) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $987 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $987 +line 1329 +;1329: { //this is actually the player, so center the sound origin right on top of us +line 1330 +;1330: VectorCopy(cg.refdef.vieworg, cent->lerpOrigin); +ADDRLP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ADDRGP4 cg+3616+24 +INDIRB +ASGNB 12 +line 1331 +;1331: trap_S_UpdateEntityPosition( cent->currentState.number, cent->lerpOrigin ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 trap_S_UpdateEntityPosition +CALLV +pop +line 1332 +;1332: } +ADDRGP4 $988 +JUMPV +LABELV $987 +line 1334 +;1333: else +;1334: { +line 1335 +;1335: trap_S_UpdateEntityPosition( cent->currentState.number, cg_entities[cent->currentState.trickedentindex].lerpOrigin ); +ADDRLP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 1920 +ADDRLP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+928 +ADDP4 +ARGP4 +ADDRGP4 trap_S_UpdateEntityPosition +CALLV +pop +line 1336 +;1336: } +LABELV $988 +line 1337 +;1337: } +LABELV $985 +line 1338 +;1338: } +LABELV $982 +line 1322 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1023 +LTI4 $981 +line 1339 +;1339:} +LABELV $980 +endproc CG_UpdateSoundTrackers 16 8 +export CG_SE_UpdateShake +proc CG_SE_UpdateShake 52 0 +line 1354 +;1340: +;1341://========================================================================= +;1342: +;1343:/* +;1344:================================ +;1345:Screen Effect stuff starts here +;1346:================================ +;1347:*/ +;1348:#define CAMERA_DEFAULT_FOV 90.0f +;1349:#define MAX_SHAKE_INTENSITY 16.0f +;1350: +;1351:cgscreffects_t cgScreenEffects; +;1352: +;1353:void CG_SE_UpdateShake( vec3_t origin, vec3_t angles ) +;1354:{ +line 1359 +;1355: vec3_t moveDir; +;1356: float intensity_scale, intensity; +;1357: int i; +;1358: +;1359: if ( cgScreenEffects.shake_duration <= 0 ) +ADDRGP4 cgScreenEffects+12 +INDIRI4 +CNSTI4 0 +GTI4 $995 +line 1360 +;1360: return; +ADDRGP4 $994 +JUMPV +LABELV $995 +line 1362 +;1361: +;1362: if ( cg.time > ( cgScreenEffects.shake_start + cgScreenEffects.shake_duration ) ) +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgScreenEffects+16 +INDIRI4 +ADDRGP4 cgScreenEffects+12 +INDIRI4 +ADDI4 +LEI4 $998 +line 1363 +;1363: { +line 1364 +;1364: cgScreenEffects.shake_intensity = 0; +ADDRGP4 cgScreenEffects+8 +CNSTF4 0 +ASGNF4 +line 1365 +;1365: cgScreenEffects.shake_duration = 0; +ADDRGP4 cgScreenEffects+12 +CNSTI4 0 +ASGNI4 +line 1366 +;1366: cgScreenEffects.shake_start = 0; +ADDRGP4 cgScreenEffects+16 +CNSTI4 0 +ASGNI4 +line 1367 +;1367: return; +ADDRGP4 $994 +JUMPV +LABELV $998 +line 1370 +;1368: } +;1369: +;1370: cgScreenEffects.FOV = CAMERA_DEFAULT_FOV; +ADDRGP4 cgScreenEffects +CNSTF4 1119092736 +ASGNF4 +line 1371 +;1371: cgScreenEffects.FOV2 = CAMERA_DEFAULT_FOV; +ADDRGP4 cgScreenEffects+4 +CNSTF4 1119092736 +ASGNF4 +line 1374 +;1372: +;1373: //intensity_scale now also takes into account FOV with 90.0 as normal +;1374: intensity_scale = 1.0f - ( (float) ( cg.time - cgScreenEffects.shake_start ) / (float) cgScreenEffects.shake_duration ) * (((cgScreenEffects.FOV+cgScreenEffects.FOV2)/2.0f)/90.0f); +ADDRLP4 20 +CNSTF4 1065353216 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cgScreenEffects+16 +INDIRI4 +SUBI4 +CVIF4 4 +ADDRGP4 cgScreenEffects+12 +INDIRI4 +CVIF4 4 +DIVF4 +ADDRGP4 cgScreenEffects +INDIRF4 +ADDRGP4 cgScreenEffects+4 +INDIRF4 +ADDF4 +CNSTF4 1073741824 +DIVF4 +CNSTF4 1119092736 +DIVF4 +MULF4 +SUBF4 +ASGNF4 +line 1376 +;1375: +;1376: intensity = cgScreenEffects.shake_intensity * intensity_scale; +ADDRLP4 16 +ADDRGP4 cgScreenEffects+8 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ASGNF4 +line 1378 +;1377: +;1378: for ( i = 0; i < 3; i++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $1012 +line 1379 +;1379: { +line 1380 +;1380: moveDir[i] = ( crandom() * intensity ); +ADDRLP4 24 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +CNSTF4 1073741824 +ADDRLP4 24 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ASGNF4 +line 1381 +;1381: } +LABELV $1013 +line 1378 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $1012 +line 1384 +;1382: +;1383: //Move the camera +;1384: VectorAdd( origin, moveDir, origin ); +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 4+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 4+8 +INDIRF4 +ADDF4 +ASGNF4 +line 1386 +;1385: +;1386: for ( i=0; i < 2; i++ ) // Don't do ROLL +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $1018 +line 1387 +;1387: moveDir[i] = ( crandom() * intensity ); +ADDRLP4 36 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +ADDP4 +CNSTF4 1073741824 +ADDRLP4 36 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ASGNF4 +LABELV $1019 +line 1386 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LTI4 $1018 +line 1390 +;1388: +;1389: //Move the angles +;1390: VectorAdd( angles, moveDir, angles ); +ADDRLP4 40 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 44 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +ADDRLP4 4+4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 48 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 48 +INDIRP4 +INDIRF4 +ADDRLP4 4+8 +INDIRF4 +ADDF4 +ASGNF4 +line 1391 +;1391:} +LABELV $994 +endproc CG_SE_UpdateShake 52 0 +export CG_SE_UpdateMusic +proc CG_SE_UpdateMusic 516 16 +line 1394 +;1392: +;1393:void CG_SE_UpdateMusic(void) +;1394:{ +line 1395 +;1395: if (cgScreenEffects.music_volume_multiplier < 0.1) +ADDRGP4 cgScreenEffects+20 +INDIRF4 +CNSTF4 1036831949 +GEF4 $1025 +line 1396 +;1396: { +line 1397 +;1397: cgScreenEffects.music_volume_multiplier = 1.0; +ADDRGP4 cgScreenEffects+20 +CNSTF4 1065353216 +ASGNF4 +line 1398 +;1398: return; +ADDRGP4 $1024 +JUMPV +LABELV $1025 +line 1401 +;1399: } +;1400: +;1401: if (cgScreenEffects.music_volume_time < cg.time) +ADDRGP4 cgScreenEffects+24 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $1029 +line 1402 +;1402: { +line 1403 +;1403: if (cgScreenEffects.music_volume_multiplier != 1.0 || cgScreenEffects.music_volume_set) +ADDRGP4 cgScreenEffects+20 +INDIRF4 +CNSTF4 1065353216 +NEF4 $1037 +ADDRGP4 cgScreenEffects+28 +INDIRI4 +CNSTI4 0 +EQI4 $1024 +LABELV $1037 +line 1404 +;1404: { +line 1407 +;1405: char musMultStr[512]; +;1406: +;1407: cgScreenEffects.music_volume_multiplier += 0.1; +ADDRLP4 512 +ADDRGP4 cgScreenEffects+20 +ASGNP4 +ADDRLP4 512 +INDIRP4 +ADDRLP4 512 +INDIRP4 +INDIRF4 +CNSTF4 1036831949 +ADDF4 +ASGNF4 +line 1408 +;1408: if (cgScreenEffects.music_volume_multiplier > 1.0) +ADDRGP4 cgScreenEffects+20 +INDIRF4 +CNSTF4 1065353216 +LEF4 $1039 +line 1409 +;1409: { +line 1410 +;1410: cgScreenEffects.music_volume_multiplier = 1.0; +ADDRGP4 cgScreenEffects+20 +CNSTF4 1065353216 +ASGNF4 +line 1411 +;1411: } +LABELV $1039 +line 1413 +;1412: +;1413: Com_sprintf(musMultStr, sizeof(musMultStr), "%f", cgScreenEffects.music_volume_multiplier); +ADDRLP4 0 +ARGP4 +CNSTI4 512 +ARGI4 +ADDRGP4 $1043 +ARGP4 +ADDRGP4 cgScreenEffects+20 +INDIRF4 +ARGF4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1414 +;1414: trap_Cvar_Set("s_musicMult", musMultStr); +ADDRGP4 $1045 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 1416 +;1415: +;1416: if (cgScreenEffects.music_volume_multiplier == 1.0) +ADDRGP4 cgScreenEffects+20 +INDIRF4 +CNSTF4 1065353216 +NEF4 $1046 +line 1417 +;1417: { +line 1418 +;1418: cgScreenEffects.music_volume_set = qfalse; +ADDRGP4 cgScreenEffects+28 +CNSTI4 0 +ASGNI4 +line 1419 +;1419: } +ADDRGP4 $1024 +JUMPV +LABELV $1046 +line 1421 +;1420: else +;1421: { +line 1422 +;1422: cgScreenEffects.music_volume_time = cg.time + 200; +ADDRGP4 cgScreenEffects+24 +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 200 +ADDI4 +ASGNI4 +line 1423 +;1423: } +line 1424 +;1424: } +line 1426 +;1425: +;1426: return; +ADDRGP4 $1024 +JUMPV +LABELV $1029 +line 1429 +;1427: } +;1428: +;1429: if (!cgScreenEffects.music_volume_set) +ADDRGP4 cgScreenEffects+28 +INDIRI4 +CNSTI4 0 +NEI4 $1052 +line 1430 +;1430: { //if the volume_time is >= cg.time, we should have a volume multiplier set +line 1433 +;1431: char musMultStr[512]; +;1432: +;1433: Com_sprintf(musMultStr, sizeof(musMultStr), "%f", cgScreenEffects.music_volume_multiplier); +ADDRLP4 0 +ARGP4 +CNSTI4 512 +ARGI4 +ADDRGP4 $1043 +ARGP4 +ADDRGP4 cgScreenEffects+20 +INDIRF4 +ARGF4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1434 +;1434: trap_Cvar_Set("s_musicMult", musMultStr); +ADDRGP4 $1045 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 1435 +;1435: cgScreenEffects.music_volume_set = qtrue; +ADDRGP4 cgScreenEffects+28 +CNSTI4 1 +ASGNI4 +line 1436 +;1436: } +LABELV $1052 +line 1437 +;1437:} +LABELV $1024 +endproc CG_SE_UpdateMusic 516 16 +export CG_CalcScreenEffects +proc CG_CalcScreenEffects 0 8 +line 1447 +;1438: +;1439:/* +;1440:================= +;1441:CG_CalcScreenEffects +;1442: +;1443:Currently just for screen shaking (and music volume management) +;1444:================= +;1445:*/ +;1446:void CG_CalcScreenEffects(void) +;1447:{ +line 1448 +;1448: CG_SE_UpdateShake(cg.refdef.vieworg, cg.refdefViewAngles); +ADDRGP4 cg+3616+24 +ARGP4 +ADDRGP4 cg+3984 +ARGP4 +ADDRGP4 CG_SE_UpdateShake +CALLV +pop +line 1449 +;1449: CG_SE_UpdateMusic(); +ADDRGP4 CG_SE_UpdateMusic +CALLV +pop +line 1450 +;1450:} +LABELV $1057 +endproc CG_CalcScreenEffects 0 8 +export CGCam_Shake +proc CGCam_Shake 0 0 +line 1453 +;1451: +;1452:void CGCam_Shake( float intensity, int duration ) +;1453:{ +line 1454 +;1454: if ( intensity > MAX_SHAKE_INTENSITY ) +ADDRFP4 0 +INDIRF4 +CNSTF4 1098907648 +LEF4 $1062 +line 1455 +;1455: intensity = MAX_SHAKE_INTENSITY; +ADDRFP4 0 +CNSTF4 1098907648 +ASGNF4 +LABELV $1062 +line 1457 +;1456: +;1457: cgScreenEffects.shake_intensity = intensity; +ADDRGP4 cgScreenEffects+8 +ADDRFP4 0 +INDIRF4 +ASGNF4 +line 1458 +;1458: cgScreenEffects.shake_duration = duration; +ADDRGP4 cgScreenEffects+12 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 1459 +;1459: cgScreenEffects.shake_start = cg.time; +ADDRGP4 cgScreenEffects+16 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1460 +;1460:} +LABELV $1061 +endproc CGCam_Shake 0 0 +export CGCam_SetMusicMult +proc CGCam_SetMusicMult 0 0 +line 1463 +;1461: +;1462:void CGCam_SetMusicMult( float multiplier, int duration ) +;1463:{ +line 1464 +;1464: if (multiplier < 0.1f) +ADDRFP4 0 +INDIRF4 +CNSTF4 1036831949 +GEF4 $1069 +line 1465 +;1465: { +line 1466 +;1466: multiplier = 0.1f; +ADDRFP4 0 +CNSTF4 1036831949 +ASGNF4 +line 1467 +;1467: } +LABELV $1069 +line 1469 +;1468: +;1469: if (multiplier > 1.0f) +ADDRFP4 0 +INDIRF4 +CNSTF4 1065353216 +LEF4 $1071 +line 1470 +;1470: { +line 1471 +;1471: multiplier = 1.0f; +ADDRFP4 0 +CNSTF4 1065353216 +ASGNF4 +line 1472 +;1472: } +LABELV $1071 +line 1474 +;1473: +;1474: cgScreenEffects.music_volume_multiplier = multiplier; +ADDRGP4 cgScreenEffects+20 +ADDRFP4 0 +INDIRF4 +ASGNF4 +line 1475 +;1475: cgScreenEffects.music_volume_time = cg.time + duration; +ADDRGP4 cgScreenEffects+24 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 4 +INDIRI4 +ADDI4 +ASGNI4 +line 1476 +;1476: cgScreenEffects.music_volume_set = qfalse; +ADDRGP4 cgScreenEffects+28 +CNSTI4 0 +ASGNI4 +line 1477 +;1477:} +LABELV $1068 +endproc CGCam_SetMusicMult 0 0 +export CG_DrawActiveFrame +proc CG_DrawActiveFrame 36 16 +line 1492 +;1478: +;1479:/* +;1480:================================ +;1481:Screen Effect stuff ends here +;1482:================================ +;1483:*/ +;1484: +;1485:/* +;1486:================= +;1487:CG_DrawActiveFrame +;1488: +;1489:Generates and draws a game scene and status information at the given time. +;1490:================= +;1491:*/ +;1492:void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ) { +line 1495 +;1493: int inwater; +;1494: +;1495: cg.time = serverTime; +ADDRGP4 cg+64 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 1496 +;1496: cg.demoPlayback = demoPlayback; +ADDRGP4 cg+8 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 1498 +;1497: +;1498: if (cg.snap && ui_myteam.integer != cg.snap->ps.persistant[PERS_TEAM]) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1080 +ADDRGP4 ui_myteam+12 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +EQI4 $1080 +line 1499 +;1499: { +line 1500 +;1500: trap_Cvar_Set ( "ui_myteam", va("%i", cg.snap->ps.persistant[PERS_TEAM]) ); +ADDRGP4 $1086 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 336 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $1085 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 1501 +;1501: } +LABELV $1080 +line 1504 +;1502: +;1503: // update cvars +;1504: CG_UpdateCvars(); +ADDRGP4 CG_UpdateCvars +CALLV +pop +line 1508 +;1505: +;1506: // if we are only updating the screen as a loading +;1507: // pacifier, don't even try to read snapshots +;1508: if ( cg.infoScreenText[0] != 0 ) { +ADDRGP4 cg+4020 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $1088 +line 1509 +;1509: CG_DrawInformation(); +ADDRGP4 CG_DrawInformation +CALLV +pop +line 1510 +;1510: return; +ADDRGP4 $1077 +JUMPV +LABELV $1088 +line 1513 +;1511: } +;1512: +;1513: trap_FX_AdjustTime( cg.time, cg.refdef.vieworg, cg.refdef.viewaxis ); +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cg+3616+24 +ARGP4 +ADDRGP4 cg+3616+36 +ARGP4 +ADDRGP4 trap_FX_AdjustTime +CALLV +pop +line 1515 +;1514: +;1515: CG_RunLightStyles(); +ADDRGP4 CG_RunLightStyles +CALLV +pop +line 1519 +;1516: +;1517: // any looped sounds will be respecified as entities +;1518: // are added to the render list +;1519: trap_S_ClearLoopingSounds(qfalse); +CNSTI4 0 +ARGI4 +ADDRGP4 trap_S_ClearLoopingSounds +CALLV +pop +line 1522 +;1520: +;1521: // clear all the render lists +;1522: trap_R_ClearScene(); +ADDRGP4 trap_R_ClearScene +CALLV +pop +line 1525 +;1523: +;1524: // set up cg.snap and possibly cg.nextSnap +;1525: CG_ProcessSnapshots(); +ADDRGP4 CG_ProcessSnapshots +CALLV +pop +line 1527 +;1526: +;1527: trap_ROFF_UpdateEntities(); +ADDRGP4 trap_ROFF_UpdateEntities +CALLV +pop +line 1531 +;1528: +;1529: // if we haven't received any snapshots yet, all +;1530: // we can draw is the information screen +;1531: if ( !cg.snap || ( cg.snap->snapFlags & SNAPFLAG_NOT_ACTIVE ) ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1100 +ADDRGP4 cg+36 +INDIRP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1096 +LABELV $1100 +line 1532 +;1532: CG_DrawInformation(); +ADDRGP4 CG_DrawInformation +CALLV +pop +line 1533 +;1533: return; +ADDRGP4 $1077 +JUMPV +LABELV $1096 +line 1537 +;1534: } +;1535: +;1536: // let the client system know what our weapon and zoom settings are +;1537: if (cg.snap && cg.snap->ps.saberLockTime > cg.time) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1101 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 568 +ADDP4 +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $1101 +line 1538 +;1538: { +line 1539 +;1539: trap_SetUserCmdValue( cg.weaponSelect, 0.01, cg.forceSelect, cg.itemSelect ); +ADDRGP4 cg+3508 +INDIRI4 +ARGI4 +CNSTF4 1008981770 +ARGF4 +ADDRGP4 cg+3512 +INDIRI4 +ARGI4 +ADDRGP4 cg+3516 +INDIRI4 +ARGI4 +ADDRGP4 trap_SetUserCmdValue +CALLV +pop +line 1540 +;1540: } +ADDRGP4 $1102 +JUMPV +LABELV $1101 +line 1541 +;1541: else if (cg.snap && cg.snap->ps.usingATST) +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1109 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1360 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1109 +line 1542 +;1542: { +line 1543 +;1543: trap_SetUserCmdValue( cg.weaponSelect, 0.2, cg.forceSelect, cg.itemSelect ); +ADDRGP4 cg+3508 +INDIRI4 +ARGI4 +CNSTF4 1045220557 +ARGF4 +ADDRGP4 cg+3512 +INDIRI4 +ARGI4 +ADDRGP4 cg+3516 +INDIRI4 +ARGI4 +ADDRGP4 trap_SetUserCmdValue +CALLV +pop +line 1544 +;1544: } +ADDRGP4 $1110 +JUMPV +LABELV $1109 +line 1546 +;1545: else +;1546: { +line 1547 +;1547: trap_SetUserCmdValue( cg.weaponSelect, cg.zoomSensitivity, cg.forceSelect, cg.itemSelect ); +ADDRGP4 cg+3508 +INDIRI4 +ARGI4 +ADDRGP4 cg+4016 +INDIRF4 +ARGF4 +ADDRGP4 cg+3512 +INDIRI4 +ARGI4 +ADDRGP4 cg+3516 +INDIRI4 +ARGI4 +ADDRGP4 trap_SetUserCmdValue +CALLV +pop +line 1548 +;1548: } +LABELV $1110 +LABELV $1102 +line 1551 +;1549: +;1550: // this counter will be bumped for every valid scene we generate +;1551: cg.clientFrame++; +ADDRLP4 4 +ADDRGP4 cg +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1554 +;1552: +;1553: // update cg.predictedPlayerState +;1554: CG_PredictPlayerState(); +ADDRGP4 CG_PredictPlayerState +CALLV +pop +line 1557 +;1555: +;1556: // decide on third person view +;1557: cg.renderingThirdPerson = cg_thirdPerson.integer || (cg.snap->ps.stats[STAT_HEALTH] <= 0); +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_thirdPerson+12 +INDIRI4 +ADDRLP4 12 +INDIRI4 +NEI4 $1126 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +GTI4 $1124 +LABELV $1126 +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +ADDRGP4 $1125 +JUMPV +LABELV $1124 +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +LABELV $1125 +ADDRGP4 cg+88 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 1559 +;1558: +;1559: if (cg.snap->ps.stats[STAT_HEALTH] > 0 && (cg.predictedPlayerState.weapon == WP_SABER || cg.predictedPlayerState.usingATST || +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRI4 +LEI4 $1127 +ADDRGP4 cg+96+148 +INDIRI4 +CNSTI4 2 +EQI4 $1140 +ADDRGP4 cg+96+1316 +INDIRI4 +ADDRLP4 16 +INDIRI4 +NEI4 $1140 +ADDRGP4 cg+96+1248 +INDIRI4 +CNSTI4 8 +EQI4 $1140 +ADDRGP4 cg+96+1352 +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $1127 +LABELV $1140 +line 1561 +;1560: cg.predictedPlayerState.forceHandExtend == HANDEXTEND_KNOCKDOWN || cg.predictedPlayerState.fallingToDeath)) +;1561: { +line 1562 +;1562: if (cg_fpls.integer && cg.predictedPlayerState.weapon == WP_SABER) +ADDRGP4 cg_fpls+12 +INDIRI4 +CNSTI4 0 +EQI4 $1141 +ADDRGP4 cg+96+148 +INDIRI4 +CNSTI4 2 +NEI4 $1141 +line 1563 +;1563: { //force to first person for fpls +line 1564 +;1564: cg.renderingThirdPerson = 0; +ADDRGP4 cg+88 +CNSTI4 0 +ASGNI4 +line 1565 +;1565: } +ADDRGP4 $1128 +JUMPV +LABELV $1141 +line 1567 +;1566: else +;1567: { +line 1568 +;1568: cg.renderingThirdPerson = 1; +ADDRGP4 cg+88 +CNSTI4 1 +ASGNI4 +line 1569 +;1569: } +line 1570 +;1570: } +ADDRGP4 $1128 +JUMPV +LABELV $1127 +line 1571 +;1571: else if (cg.snap->ps.zoomMode) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1376 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1148 +line 1572 +;1572: { //always force first person when zoomed +line 1573 +;1573: cg.renderingThirdPerson = 0; +ADDRGP4 cg+88 +CNSTI4 0 +ASGNI4 +line 1574 +;1574: } +LABELV $1148 +LABELV $1128 +line 1577 +;1575: +;1576: // build cg.refdef +;1577: inwater = CG_CalcViewValues(); +ADDRLP4 20 +ADDRGP4 CG_CalcViewValues +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 1579 +;1578: +;1579: CG_CalcScreenEffects(); +ADDRGP4 CG_CalcScreenEffects +CALLV +pop +line 1582 +;1580: +;1581: // first person blend blobs, done after AnglesToAxis +;1582: if ( !cg.renderingThirdPerson ) { +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $1152 +line 1583 +;1583: CG_DamageBlendBlob(); +ADDRGP4 CG_DamageBlendBlob +CALLV +pop +line 1584 +;1584: } +LABELV $1152 +line 1587 +;1585: +;1586: // build the render lists +;1587: if ( !cg.hyperspace ) { +ADDRGP4 cg+92 +INDIRI4 +CNSTI4 0 +NEI4 $1155 +line 1588 +;1588: CG_AddPacketEntities(); // adter calcViewValues, so predicted player state is correct +ADDRGP4 CG_AddPacketEntities +CALLV +pop +line 1589 +;1589: CG_AddMarks(); +ADDRGP4 CG_AddMarks +CALLV +pop +line 1590 +;1590: CG_AddParticles (); +ADDRGP4 CG_AddParticles +CALLV +pop +line 1591 +;1591: CG_AddLocalEntities(); +ADDRGP4 CG_AddLocalEntities +CALLV +pop +line 1592 +;1592: } +LABELV $1155 +line 1593 +;1593: CG_AddViewWeapon( &cg.predictedPlayerState ); +ADDRGP4 cg+96 +ARGP4 +ADDRGP4 CG_AddViewWeapon +CALLV +pop +line 1595 +;1594: +;1595: if ( !cg.hyperspace) +ADDRGP4 cg+92 +INDIRI4 +CNSTI4 0 +NEI4 $1159 +line 1596 +;1596: { +line 1597 +;1597: trap_FX_AddScheduledEffects(); +ADDRGP4 trap_FX_AddScheduledEffects +CALLV +pop +line 1598 +;1598: } +LABELV $1159 +line 1601 +;1599: +;1600: // add buffered sounds +;1601: CG_PlayBufferedSounds(); +ADDRGP4 CG_PlayBufferedSounds +CALLV +pop +line 1604 +;1602: +;1603: // play buffered voice chats +;1604: CG_PlayBufferedVoiceChats(); +ADDRGP4 CG_PlayBufferedVoiceChats +CALLV +pop +line 1607 +;1605: +;1606: // finish up the rest of the refdef +;1607: if ( cg.testModelEntity.hModel ) { +ADDRGP4 cg+13484+8 +INDIRI4 +CNSTI4 0 +EQI4 $1162 +line 1608 +;1608: CG_AddTestModel(); +ADDRGP4 CG_AddTestModel +CALLV +pop +line 1609 +;1609: } +LABELV $1162 +line 1610 +;1610: cg.refdef.time = cg.time; +ADDRGP4 cg+3616+72 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1611 +;1611: memcpy( cg.refdef.areamask, cg.snap->areamask, sizeof( cg.refdef.areamask ) ); +ADDRGP4 cg+3616+80 +ARGP4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +CNSTI4 32 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 1614 +;1612: +;1613: // warning sounds when powerup is wearing off +;1614: CG_PowerupTimerSounds(); +ADDRGP4 CG_PowerupTimerSounds +CALLV +pop +line 1617 +;1615: +;1616: // if there are any entities flagged as sound trackers and attached to other entities, update their sound pos +;1617: CG_UpdateSoundTrackers(); +ADDRGP4 CG_UpdateSoundTrackers +CALLV +pop +line 1619 +;1618: +;1619: if (gCGHasFallVector) +ADDRGP4 gCGHasFallVector +INDIRI4 +CNSTI4 0 +EQI4 $1174 +line 1620 +;1620: { +line 1623 +;1621: vec3_t lookAng; +;1622: +;1623: VectorSubtract(cg.snap->ps.origin, cg.refdef.vieworg, lookAng); +ADDRLP4 24 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 24+4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 24+8 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +ADDRGP4 cg+3616+24+8 +INDIRF4 +SUBF4 +ASGNF4 +line 1624 +;1624: VectorNormalize(lookAng); +ADDRLP4 24 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1625 +;1625: vectoangles(lookAng, lookAng); +ADDRLP4 24 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRGP4 vectoangles +CALLV +pop +line 1627 +;1626: +;1627: VectorCopy(gCGFallVector, cg.refdef.vieworg); +ADDRGP4 cg+3616+24 +ADDRGP4 gCGFallVector +INDIRB +ASGNB 12 +line 1628 +;1628: AnglesToAxis(lookAng, cg.refdef.viewaxis); +ADDRLP4 24 +ARGP4 +ADDRGP4 cg+3616+36 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 1629 +;1629: } +LABELV $1174 +line 1632 +;1630: +;1631: // update audio positions +;1632: trap_S_Respatialize( cg.snap->ps.clientNum, cg.refdef.vieworg, cg.refdef.viewaxis, inwater ); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+3616+24 +ARGP4 +ADDRGP4 cg+3616+36 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_Respatialize +CALLV +pop +line 1635 +;1633: +;1634: // make sure the lagometerSample and frame timing isn't done twice when in stereo +;1635: if ( stereoView != STEREO_RIGHT ) { +ADDRFP4 4 +INDIRI4 +CNSTI4 2 +EQI4 $1198 +line 1636 +;1636: cg.frametime = cg.time - cg.oldTime; +ADDRGP4 cg+60 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+68 +INDIRI4 +SUBI4 +ASGNI4 +line 1637 +;1637: if ( cg.frametime < 0 ) { +ADDRGP4 cg+60 +INDIRI4 +CNSTI4 0 +GEI4 $1203 +line 1638 +;1638: cg.frametime = 0; +ADDRGP4 cg+60 +CNSTI4 0 +ASGNI4 +line 1639 +;1639: } +LABELV $1203 +line 1640 +;1640: cg.oldTime = cg.time; +ADDRGP4 cg+68 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1641 +;1641: CG_AddLagometerFrameInfo(); +ADDRGP4 CG_AddLagometerFrameInfo +CALLV +pop +line 1642 +;1642: } +LABELV $1198 +line 1643 +;1643: if (cg_timescale.value != cg_timescaleFadeEnd.value) { +ADDRGP4 cg_timescale+8 +INDIRF4 +ADDRGP4 cg_timescaleFadeEnd+8 +INDIRF4 +EQF4 $1209 +line 1644 +;1644: if (cg_timescale.value < cg_timescaleFadeEnd.value) { +ADDRGP4 cg_timescale+8 +INDIRF4 +ADDRGP4 cg_timescaleFadeEnd+8 +INDIRF4 +GEF4 $1213 +line 1645 +;1645: cg_timescale.value += cg_timescaleFadeSpeed.value * ((float)cg.frametime) / 1000; +ADDRLP4 24 +ADDRGP4 cg_timescale+8 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRGP4 cg_timescaleFadeSpeed+8 +INDIRF4 +ADDRGP4 cg+60 +INDIRI4 +CVIF4 4 +MULF4 +CNSTF4 1148846080 +DIVF4 +ADDF4 +ASGNF4 +line 1646 +;1646: if (cg_timescale.value > cg_timescaleFadeEnd.value) +ADDRGP4 cg_timescale+8 +INDIRF4 +ADDRGP4 cg_timescaleFadeEnd+8 +INDIRF4 +LEF4 $1214 +line 1647 +;1647: cg_timescale.value = cg_timescaleFadeEnd.value; +ADDRGP4 cg_timescale+8 +ADDRGP4 cg_timescaleFadeEnd+8 +INDIRF4 +ASGNF4 +line 1648 +;1648: } +ADDRGP4 $1214 +JUMPV +LABELV $1213 +line 1649 +;1649: else { +line 1650 +;1650: cg_timescale.value -= cg_timescaleFadeSpeed.value * ((float)cg.frametime) / 1000; +ADDRLP4 24 +ADDRGP4 cg_timescale+8 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRGP4 cg_timescaleFadeSpeed+8 +INDIRF4 +ADDRGP4 cg+60 +INDIRI4 +CVIF4 4 +MULF4 +CNSTF4 1148846080 +DIVF4 +SUBF4 +ASGNF4 +line 1651 +;1651: if (cg_timescale.value < cg_timescaleFadeEnd.value) +ADDRGP4 cg_timescale+8 +INDIRF4 +ADDRGP4 cg_timescaleFadeEnd+8 +INDIRF4 +GEF4 $1229 +line 1652 +;1652: cg_timescale.value = cg_timescaleFadeEnd.value; +ADDRGP4 cg_timescale+8 +ADDRGP4 cg_timescaleFadeEnd+8 +INDIRF4 +ASGNF4 +LABELV $1229 +line 1653 +;1653: } +LABELV $1214 +line 1654 +;1654: if (cg_timescaleFadeSpeed.value) { +ADDRGP4 cg_timescaleFadeSpeed+8 +INDIRF4 +CNSTF4 0 +EQF4 $1235 +line 1655 +;1655: trap_Cvar_Set("timescale", va("%f", cg_timescale.value)); +ADDRGP4 $1043 +ARGP4 +ADDRGP4 cg_timescale+8 +INDIRF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 $1238 +ARGP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRGP4 trap_Cvar_Set +CALLV +pop +line 1656 +;1656: } +LABELV $1235 +line 1657 +;1657: } +LABELV $1209 +line 1660 +;1658: +;1659: // actually issue the rendering calls +;1660: CG_DrawActive( stereoView ); +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawActive +CALLV +pop +line 1662 +;1661: +;1662: if ( cg_stats.integer ) { +ADDRGP4 cg_stats+12 +INDIRI4 +CNSTI4 0 +EQI4 $1240 +line 1663 +;1663: CG_Printf( "cg.clientFrame:%i\n", cg.clientFrame ); +ADDRGP4 $1243 +ARGP4 +ADDRGP4 cg +INDIRI4 +ARGI4 +ADDRGP4 CG_Printf +CALLV +pop +line 1664 +;1664: } +LABELV $1240 +line 1665 +;1665:} +LABELV $1077 +endproc CG_DrawActiveFrame 36 16 +bss +export zoomFov +align 4 +LABELV zoomFov +skip 4 +import gCGFallVector +import gCGHasFallVector +export cameraIdealLoc +align 4 +LABELV cameraIdealLoc +skip 12 +export cameraIdealTarget +align 4 +LABELV cameraIdealTarget +skip 12 +export cameraFocusLoc +align 4 +LABELV cameraFocusLoc +skip 12 +export cameraFocusAngles +align 4 +LABELV cameraFocusAngles +skip 12 +export cameraup +align 4 +LABELV cameraup +skip 12 +export camerafwd +align 4 +LABELV camerafwd +skip 12 +import CG_SetLightstyle +import CG_RunLightStyles +import CG_ClearLightStyles +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +export cgScreenEffects +align 4 +LABELV cgScreenEffects +skip 32 +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $1243 +char 1 99 +char 1 103 +char 1 46 +char 1 99 +char 1 108 +char 1 105 +char 1 101 +char 1 110 +char 1 116 +char 1 70 +char 1 114 +char 1 97 +char 1 109 +char 1 101 +char 1 58 +char 1 37 +char 1 105 +char 1 10 +char 1 0 +align 1 +LABELV $1238 +char 1 116 +char 1 105 +char 1 109 +char 1 101 +char 1 115 +char 1 99 +char 1 97 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $1086 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $1085 +char 1 117 +char 1 105 +char 1 95 +char 1 109 +char 1 121 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 0 +align 1 +LABELV $1045 +char 1 115 +char 1 95 +char 1 109 +char 1 117 +char 1 115 +char 1 105 +char 1 99 +char 1 77 +char 1 117 +char 1 108 +char 1 116 +char 1 0 +align 1 +LABELV $1043 +char 1 37 +char 1 102 +char 1 0 +align 1 +LABELV $277 +char 1 49 +char 1 48 +char 1 48 +char 1 0 +align 1 +LABELV $273 +char 1 51 +char 1 48 +char 1 0 +align 1 +LABELV $272 +char 1 99 +char 1 103 +char 1 95 +char 1 118 +char 1 105 +char 1 101 +char 1 119 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 0 +align 1 +LABELV $198 +char 1 115 +char 1 107 +char 1 105 +char 1 110 +char 1 32 +char 1 37 +char 1 105 +char 1 10 +char 1 0 +align 1 +LABELV $181 +char 1 102 +char 1 114 +char 1 97 +char 1 109 +char 1 101 +char 1 32 +char 1 37 +char 1 105 +char 1 10 +char 1 0 +align 1 +LABELV $142 +char 1 67 +char 1 97 +char 1 110 +char 1 39 +char 1 116 +char 1 32 +char 1 114 +char 1 101 +char 1 103 +char 1 105 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 32 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 10 +char 1 0 diff --git a/code/cgame/vm/cg_weaponinit.asm b/code/cgame/vm/cg_weaponinit.asm new file mode 100644 index 0000000..42de75b --- /dev/null +++ b/code/cgame/vm/cg_weaponinit.asm @@ -0,0 +1,8380 @@ +export CG_RegisterWeapon +code +proc CG_RegisterWeapon 588 12 +file "../cg_weaponinit.c" +line 14 +;1:// +;2:// cg_weaponinit.c -- events and effects dealing with weapons +;3:#include "cg_local.h" +;4:#include "fx_local.h" +;5: +;6: +;7:/* +;8:================= +;9:CG_RegisterWeapon +;10: +;11:The server says this item is used on this level +;12:================= +;13:*/ +;14:void CG_RegisterWeapon( int weaponNum) { +line 21 +;15: weaponInfo_t *weaponInfo; +;16: gitem_t *item, *ammo; +;17: char path[MAX_QPATH]; +;18: vec3_t mins, maxs; +;19: int i; +;20: +;21: weaponInfo = &cg_weapons[weaponNum]; +ADDRLP4 8 +CNSTI4 208 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons +ADDP4 +ASGNP4 +line 23 +;22: +;23: if ( weaponNum == 0 ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $121 +line 24 +;24: return; +ADDRGP4 $120 +JUMPV +LABELV $121 +line 27 +;25: } +;26: +;27: if ( weaponInfo->registered ) { +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 0 +EQI4 $123 +line 28 +;28: return; +ADDRGP4 $120 +JUMPV +LABELV $123 +line 31 +;29: } +;30: +;31: memset( weaponInfo, 0, sizeof( *weaponInfo ) ); +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 208 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 32 +;32: weaponInfo->registered = qtrue; +ADDRLP4 8 +INDIRP4 +CNSTI4 1 +ASGNI4 +line 34 +;33: +;34: for ( item = bg_itemlist + 1 ; item->classname ; item++ ) { +ADDRLP4 4 +ADDRGP4 bg_itemlist+52 +ASGNP4 +ADDRGP4 $128 +JUMPV +LABELV $125 +line 35 +;35: if ( item->giType == IT_WEAPON && item->giTag == weaponNum ) { +ADDRLP4 4 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $130 +ADDRLP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +NEI4 $130 +line 36 +;36: weaponInfo->item = item; +ADDRLP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 37 +;37: break; +ADDRGP4 $127 +JUMPV +LABELV $130 +line 39 +;38: } +;39: } +LABELV $126 +line 34 +ADDRLP4 4 +ADDRLP4 4 +INDIRP4 +CNSTI4 52 +ADDP4 +ASGNP4 +LABELV $128 +ADDRLP4 4 +INDIRP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $125 +LABELV $127 +line 40 +;40: if ( !item->classname ) { +ADDRLP4 4 +INDIRP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $132 +line 41 +;41: CG_Error( "Couldn't find weapon %i", weaponNum ); +ADDRGP4 $134 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 CG_Error +CALLV +pop +line 42 +;42: } +LABELV $132 +line 43 +;43: CG_RegisterItemVisuals( item - bg_itemlist ); +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRGP4 bg_itemlist +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 52 +DIVI4 +ARGI4 +ADDRGP4 CG_RegisterItemVisuals +CALLV +pop +line 46 +;44: +;45: // load cmodel before model so filecache works +;46: weaponInfo->weaponModel = trap_R_RegisterModel( item->world_model[0] ); +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 104 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 104 +INDIRI4 +ASGNI4 +line 48 +;47: // load in-view model also +;48: weaponInfo->viewModel = trap_R_RegisterModel(item->view_model); +ADDRLP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 108 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 108 +INDIRI4 +ASGNI4 +line 51 +;49: +;50: // calc midpoint for rotation +;51: trap_R_ModelBounds( weaponInfo->weaponModel, mins, maxs ); +ADDRLP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ARGP4 +ADDRLP4 28 +ARGP4 +ADDRGP4 trap_R_ModelBounds +CALLV +pop +line 52 +;52: for ( i = 0 ; i < 3 ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $135 +line 53 +;53: weaponInfo->weaponMidpoint[i] = mins[i] + 0.5 * ( maxs[i] - mins[i] ); +ADDRLP4 112 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 116 +ADDRLP4 112 +INDIRI4 +ADDRLP4 16 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 112 +INDIRI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDP4 +ADDRLP4 116 +INDIRF4 +CNSTF4 1056964608 +ADDRLP4 112 +INDIRI4 +ADDRLP4 28 +ADDP4 +INDIRF4 +ADDRLP4 116 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 54 +;54: } +LABELV $136 +line 52 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $135 +line 56 +;55: +;56: weaponInfo->weaponIcon = trap_R_RegisterShader( item->icon ); +ADDRLP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 112 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 56 +ADDP4 +ADDRLP4 112 +INDIRI4 +ASGNI4 +line 57 +;57: weaponInfo->ammoIcon = trap_R_RegisterShader( item->icon ); +ADDRLP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 116 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 60 +ADDP4 +ADDRLP4 116 +INDIRI4 +ASGNI4 +line 59 +;58: +;59: for ( ammo = bg_itemlist + 1 ; ammo->classname ; ammo++ ) { +ADDRLP4 12 +ADDRGP4 bg_itemlist+52 +ASGNP4 +ADDRGP4 $142 +JUMPV +LABELV $139 +line 60 +;60: if ( ammo->giType == IT_AMMO && ammo->giTag == weaponNum ) { +ADDRLP4 12 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $144 +ADDRLP4 12 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +NEI4 $144 +line 61 +;61: break; +ADDRGP4 $141 +JUMPV +LABELV $144 +line 63 +;62: } +;63: } +LABELV $140 +line 59 +ADDRLP4 12 +ADDRLP4 12 +INDIRP4 +CNSTI4 52 +ADDP4 +ASGNP4 +LABELV $142 +ADDRLP4 12 +INDIRP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $139 +LABELV $141 +line 64 +;64: if ( ammo->classname && ammo->world_model[0] ) { +ADDRLP4 124 +CNSTU4 0 +ASGNU4 +ADDRLP4 12 +INDIRP4 +INDIRP4 +CVPU4 4 +ADDRLP4 124 +INDIRU4 +EQU4 $146 +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 124 +INDIRU4 +EQU4 $146 +line 65 +;65: weaponInfo->ammoModel = trap_R_RegisterModel( ammo->world_model[0] ); +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 128 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 64 +ADDP4 +ADDRLP4 128 +INDIRI4 +ASGNI4 +line 66 +;66: } +LABELV $146 +line 71 +;67: +;68:// strcpy( path, item->view_model ); +;69:// COM_StripExtension( path, path ); +;70:// strcat( path, "_flash.md3" ); +;71: weaponInfo->flashModel = 0;//trap_R_RegisterModel( path ); +ADDRLP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTI4 0 +ASGNI4 +line 73 +;72: +;73: if (weaponNum == WP_DISRUPTOR || +ADDRLP4 128 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 128 +INDIRI4 +CNSTI4 5 +EQI4 $152 +ADDRLP4 128 +INDIRI4 +CNSTI4 9 +EQI4 $152 +ADDRLP4 128 +INDIRI4 +CNSTI4 7 +EQI4 $152 +ADDRLP4 128 +INDIRI4 +CNSTI4 10 +NEI4 $148 +LABELV $152 +line 77 +;74: weaponNum == WP_FLECHETTE || +;75: weaponNum == WP_REPEATER || +;76: weaponNum == WP_ROCKET_LAUNCHER) +;77: { +line 78 +;78: strcpy( path, item->view_model ); +ADDRLP4 40 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 79 +;79: COM_StripExtension( path, path ); +ADDRLP4 40 +ARGP4 +ADDRLP4 40 +ARGP4 +ADDRGP4 COM_StripExtension +CALLV +pop +line 80 +;80: strcat( path, "_barrel.md3" ); +ADDRLP4 40 +ARGP4 +ADDRGP4 $153 +ARGP4 +ADDRGP4 strcat +CALLP4 +pop +line 81 +;81: weaponInfo->barrelModel = trap_R_RegisterModel( path ); +ADDRLP4 40 +ARGP4 +ADDRLP4 132 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 132 +INDIRI4 +ASGNI4 +line 82 +;82: } +ADDRGP4 $149 +JUMPV +LABELV $148 +line 83 +;83: else if (weaponNum == WP_STUN_BATON) +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +NEI4 $154 +line 84 +;84: { //only weapon with more than 1 barrel.. +line 85 +;85: trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel.md3"); +ADDRGP4 $156 +ARGP4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +pop +line 86 +;86: trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel2.md3"); +ADDRGP4 $157 +ARGP4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +pop +line 87 +;87: trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel3.md3"); +ADDRGP4 $158 +ARGP4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +pop +line 88 +;88: } +ADDRGP4 $155 +JUMPV +LABELV $154 +line 90 +;89: else +;90: { +line 91 +;91: weaponInfo->barrelModel = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 20 +ADDP4 +CNSTI4 0 +ASGNI4 +line 92 +;92: } +LABELV $155 +LABELV $149 +line 94 +;93: +;94: if (weaponNum != WP_SABER) +ADDRFP4 0 +INDIRI4 +CNSTI4 2 +EQI4 $159 +line 95 +;95: { +line 96 +;96: strcpy( path, item->view_model ); +ADDRLP4 40 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 97 +;97: COM_StripExtension( path, path ); +ADDRLP4 40 +ARGP4 +ADDRLP4 40 +ARGP4 +ADDRGP4 COM_StripExtension +CALLV +pop +line 98 +;98: strcat( path, "_hand.md3" ); +ADDRLP4 40 +ARGP4 +ADDRGP4 $161 +ARGP4 +ADDRGP4 strcat +CALLP4 +pop +line 99 +;99: weaponInfo->handsModel = trap_R_RegisterModel( path ); +ADDRLP4 40 +ARGP4 +ADDRLP4 132 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 132 +INDIRI4 +ASGNI4 +line 100 +;100: } +ADDRGP4 $160 +JUMPV +LABELV $159 +line 102 +;101: else +;102: { +line 103 +;103: weaponInfo->handsModel = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 0 +ASGNI4 +line 104 +;104: } +LABELV $160 +line 110 +;105: +;106:// if ( !weaponInfo->handsModel ) { +;107:// weaponInfo->handsModel = trap_R_RegisterModel( "models/weapons2/shotgun/shotgun_hand.md3" ); +;108:// } +;109: +;110: cgs.effects.forceLightning = trap_FX_RegisterEffect( "effects/force/lightning.efx" ); +ADDRGP4 $164 +ARGP4 +ADDRLP4 132 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+144 +ADDRLP4 132 +INDIRI4 +ASGNI4 +line 111 +;111: cgs.effects.forceLightningWide = trap_FX_RegisterEffect( "effects/force/lightningwide.efx" ); +ADDRGP4 $167 +ARGP4 +ADDRLP4 136 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+148 +ADDRLP4 136 +INDIRI4 +ASGNI4 +line 113 +;112: +;113: cgs.effects.forceDrain = trap_FX_RegisterEffect( "effects/mp/drain.efx" ); +ADDRGP4 $170 +ARGP4 +ADDRLP4 140 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+152 +ADDRLP4 140 +INDIRI4 +ASGNI4 +line 114 +;114: cgs.effects.forceDrainWide = trap_FX_RegisterEffect( "effects/mp/drainwide.efx" ); +ADDRGP4 $173 +ARGP4 +ADDRLP4 144 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+156 +ADDRLP4 144 +INDIRI4 +ASGNI4 +line 115 +;115: cgs.effects.forceDrained = trap_FX_RegisterEffect( "effects/mp/drainhit.efx"); +ADDRGP4 $176 +ARGP4 +ADDRLP4 148 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+160 +ADDRLP4 148 +INDIRI4 +ASGNI4 +line 117 +;116: +;117: switch ( weaponNum ) { +ADDRLP4 152 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 152 +INDIRI4 +CNSTI4 1 +LTI4 $177 +ADDRLP4 152 +INDIRI4 +CNSTI4 14 +GTI4 $177 +ADDRLP4 152 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $411-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $411 +address $179 +address $187 +address $190 +address $222 +address $240 +address $286 +address $299 +address $318 +address $342 +address $361 +address $377 +address $395 +address $403 +address $222 +code +LABELV $179 +line 124 +;118: case WP_STUN_BATON: +;119:/* MAKERGB( weaponInfo->flashDlightColor, 0.6f, 0.6f, 1.0f ); +;120: weaponInfo->firingSound = trap_S_RegisterSound( "sound/weapons/saber/saberhum.wav" ); +;121:// weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/melee/fstatck.wav" ); +;122:*/ +;123: //trap_R_RegisterShader( "gfx/effects/stunPass" ); +;124: trap_FX_RegisterEffect( "stunBaton/flesh_impact" ); +ADDRGP4 $180 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 126 +;125: //TEMP +;126: trap_S_RegisterSound( "sound/weapons/melee/punch1.mp3" ); +ADDRGP4 $181 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 127 +;127: trap_S_RegisterSound( "sound/weapons/melee/punch2.mp3" ); +ADDRGP4 $182 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 128 +;128: trap_S_RegisterSound( "sound/weapons/melee/punch3.mp3" ); +ADDRGP4 $183 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 129 +;129: trap_S_RegisterSound( "sound/weapons/melee/punch4.mp3" ); +ADDRGP4 $184 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 131 +;130: +;131: trap_S_RegisterSound( "sound/weapons/baton/idle.wav" ); +ADDRGP4 $185 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 132 +;132: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/baton/fire.mp3" ); +ADDRGP4 $186 +ARGP4 +ADDRLP4 156 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 156 +INDIRI4 +ASGNI4 +line 133 +;133: weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/baton/fire.mp3" ); +ADDRGP4 $186 +ARGP4 +ADDRLP4 160 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 160 +INDIRI4 +ASGNI4 +line 135 +;134: +;135: break; +ADDRGP4 $178 +JUMPV +LABELV $187 +line 137 +;136: case WP_SABER: +;137: MAKERGB( weaponInfo->flashDlightColor, 0.6f, 0.6f, 1.0f ); +ADDRLP4 8 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTF4 1058642330 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTF4 1058642330 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 52 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 138 +;138: weaponInfo->firingSound = trap_S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ); +ADDRGP4 $188 +ARGP4 +ADDRLP4 164 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +ADDRLP4 164 +INDIRI4 +ASGNI4 +line 139 +;139: weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/saber/saber_w.glm" ); +ADDRGP4 $189 +ARGP4 +ADDRLP4 168 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 168 +INDIRI4 +ASGNI4 +line 140 +;140: break; +ADDRGP4 $178 +JUMPV +LABELV $190 +line 143 +;141: +;142: case WP_BRYAR_PISTOL: +;143: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/bryar/fire.wav"); +ADDRGP4 $191 +ARGP4 +ADDRLP4 172 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 172 +INDIRI4 +ASGNI4 +line 144 +;144: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 145 +;145: weaponInfo->chargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 146 +;146: weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "bryar/muzzle_flash" ); +ADDRGP4 $192 +ARGP4 +ADDRLP4 176 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRLP4 176 +INDIRI4 +ASGNI4 +line 147 +;147: weaponInfo->missileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 148 +;148: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 149 +;149: weaponInfo->missileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 151 +;150: //weaponInfo->missileDlightColor= {0,0,0}; +;151: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 152 +;152: weaponInfo->missileTrailFunc = FX_BryarProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRGP4 FX_BryarProjectileThink +ASGNP4 +line 154 +;153: +;154: weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/bryar/alt_fire.wav"); +ADDRGP4 $193 +ARGP4 +ADDRLP4 180 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 180 +INDIRI4 +ASGNI4 +line 155 +;155: weaponInfo->altFiringSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 156 +;156: weaponInfo->altChargeSound = trap_S_RegisterSound( "sound/weapons/bryar/altcharge.wav"); +ADDRGP4 $194 +ARGP4 +ADDRLP4 184 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 152 +ADDP4 +ADDRLP4 184 +INDIRI4 +ASGNI4 +line 157 +;157: weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "bryar/muzzle_flash" ); +ADDRGP4 $192 +ARGP4 +ADDRLP4 188 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRLP4 188 +INDIRI4 +ASGNI4 +line 158 +;158: weaponInfo->altMissileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 160 +ADDP4 +CNSTI4 0 +ASGNI4 +line 159 +;159: weaponInfo->altMissileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 0 +ASGNI4 +line 160 +;160: weaponInfo->altMissileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 172 +ADDP4 +CNSTF4 0 +ASGNF4 +line 162 +;161: //weaponInfo->altMissileDlightColor= {0,0,0}; +;162: weaponInfo->altMissileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTI4 0 +ASGNI4 +line 163 +;163: weaponInfo->altMissileTrailFunc = FX_BryarAltProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 168 +ADDP4 +ADDRGP4 FX_BryarAltProjectileThink +ASGNP4 +line 165 +;164: +;165: cgs.effects.bryarShotEffect = trap_FX_RegisterEffect( "bryar/shot" ); +ADDRGP4 $196 +ARGP4 +ADDRLP4 192 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564 +ADDRLP4 192 +INDIRI4 +ASGNI4 +line 166 +;166: cgs.effects.bryarPowerupShotEffect = trap_FX_RegisterEffect( "bryar/crackleShot" ); +ADDRGP4 $199 +ARGP4 +ADDRLP4 196 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+4 +ADDRLP4 196 +INDIRI4 +ASGNI4 +line 167 +;167: cgs.effects.bryarWallImpactEffect = trap_FX_RegisterEffect( "bryar/wall_impact" ); +ADDRGP4 $202 +ARGP4 +ADDRLP4 200 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+8 +ADDRLP4 200 +INDIRI4 +ASGNI4 +line 168 +;168: cgs.effects.bryarWallImpactEffect2 = trap_FX_RegisterEffect( "bryar/wall_impact2" ); +ADDRGP4 $205 +ARGP4 +ADDRLP4 204 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+12 +ADDRLP4 204 +INDIRI4 +ASGNI4 +line 169 +;169: cgs.effects.bryarWallImpactEffect3 = trap_FX_RegisterEffect( "bryar/wall_impact3" ); +ADDRGP4 $208 +ARGP4 +ADDRLP4 208 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+16 +ADDRLP4 208 +INDIRI4 +ASGNI4 +line 170 +;170: cgs.effects.bryarFleshImpactEffect = trap_FX_RegisterEffect( "bryar/flesh_impact" ); +ADDRGP4 $211 +ARGP4 +ADDRLP4 212 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+20 +ADDRLP4 212 +INDIRI4 +ASGNI4 +line 171 +;171: cgs.effects.bryarDroidImpactEffect = trap_FX_RegisterEffect( "bryar/droid_impact" ); +ADDRGP4 $214 +ARGP4 +ADDRLP4 216 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+24 +ADDRLP4 216 +INDIRI4 +ASGNI4 +line 173 +;172: +;173: cgs.media.bryarFrontFlash = trap_R_RegisterShader( "gfx/effects/bryarFrontFlash" ); +ADDRGP4 $217 +ARGP4 +ADDRLP4 220 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+20 +ADDRLP4 220 +INDIRI4 +ASGNI4 +line 176 +;174: +;175: // Note these are temp shared effects +;176: trap_FX_RegisterEffect("effects/blaster/deflect.efx"); +ADDRGP4 $218 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 177 +;177: trap_FX_RegisterEffect("effects/blaster/wall_impact.efx"); +ADDRGP4 $219 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 178 +;178: trap_FX_RegisterEffect("effects/blaster/flesh_impact.efx"); +ADDRGP4 $220 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 179 +;179: trap_FX_RegisterEffect("effects/blaster/smoke_bolton.efx"); +ADDRGP4 $221 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 181 +;180: +;181: break; +ADDRGP4 $178 +JUMPV +LABELV $222 +line 185 +;182: +;183: case WP_BLASTER: +;184: case WP_EMPLACED_GUN: //rww - just use the same as this for now.. +;185: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/blaster/fire.wav"); +ADDRGP4 $223 +ARGP4 +ADDRLP4 224 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 224 +INDIRI4 +ASGNI4 +line 186 +;186: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 187 +;187: weaponInfo->chargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 188 +;188: weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "blaster/muzzle_flash" ); +ADDRGP4 $224 +ARGP4 +ADDRLP4 228 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRLP4 228 +INDIRI4 +ASGNI4 +line 189 +;189: weaponInfo->missileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 190 +;190: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 191 +;191: weaponInfo->missileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 193 +;192:// weaponInfo->missileDlightColor = {0,0,0}; +;193: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 194 +;194: weaponInfo->missileTrailFunc = FX_BlasterProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRGP4 FX_BlasterProjectileThink +ASGNP4 +line 196 +;195: +;196: weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/blaster/alt_fire.wav"); +ADDRGP4 $225 +ARGP4 +ADDRLP4 232 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 232 +INDIRI4 +ASGNI4 +line 197 +;197: weaponInfo->altFiringSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 198 +;198: weaponInfo->altChargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 199 +;199: weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "blaster/muzzle_flash" ); +ADDRGP4 $224 +ARGP4 +ADDRLP4 236 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRLP4 236 +INDIRI4 +ASGNI4 +line 200 +;200: weaponInfo->altMissileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 160 +ADDP4 +CNSTI4 0 +ASGNI4 +line 201 +;201: weaponInfo->altMissileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 0 +ASGNI4 +line 202 +;202: weaponInfo->altMissileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 172 +ADDP4 +CNSTF4 0 +ASGNF4 +line 204 +;203:// weaponInfo->altMissileDlightColor= {0,0,0}; +;204: weaponInfo->altMissileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTI4 0 +ASGNI4 +line 205 +;205: weaponInfo->altMissileTrailFunc = FX_BlasterProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 168 +ADDP4 +ADDRGP4 FX_BlasterProjectileThink +ASGNP4 +line 207 +;206: +;207: trap_FX_RegisterEffect( "blaster/deflect" ); +ADDRGP4 $226 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 208 +;208: cgs.effects.blasterShotEffect = trap_FX_RegisterEffect( "blaster/shot" ); +ADDRGP4 $229 +ARGP4 +ADDRLP4 240 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+28 +ADDRLP4 240 +INDIRI4 +ASGNI4 +line 209 +;209: cgs.effects.blasterWallImpactEffect = trap_FX_RegisterEffect( "blaster/wall_impact" ); +ADDRGP4 $232 +ARGP4 +ADDRLP4 244 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+32 +ADDRLP4 244 +INDIRI4 +ASGNI4 +line 210 +;210: cgs.effects.blasterFleshImpactEffect = trap_FX_RegisterEffect( "blaster/flesh_impact" ); +ADDRGP4 $235 +ARGP4 +ADDRLP4 248 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+36 +ADDRLP4 248 +INDIRI4 +ASGNI4 +line 211 +;211: cgs.effects.blasterDroidImpactEffect = trap_FX_RegisterEffect( "blaster/droid_impact" ); +ADDRGP4 $238 +ARGP4 +ADDRLP4 252 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+40 +ADDRLP4 252 +INDIRI4 +ASGNI4 +line 212 +;212: trap_FX_RegisterEffect( "blaster/smoke_bolton" ); // note: this will be called game side +ADDRGP4 $239 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 213 +;213: break; +ADDRGP4 $178 +JUMPV +LABELV $240 +line 216 +;214: +;215: case WP_DISRUPTOR: +;216: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/disruptor/fire.wav"); +ADDRGP4 $241 +ARGP4 +ADDRLP4 256 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 256 +INDIRI4 +ASGNI4 +line 217 +;217: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 218 +;218: weaponInfo->chargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 219 +;219: weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "disruptor/muzzle_flash" ); +ADDRGP4 $242 +ARGP4 +ADDRLP4 260 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRLP4 260 +INDIRI4 +ASGNI4 +line 220 +;220: weaponInfo->missileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 221 +;221: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 222 +;222: weaponInfo->missileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 224 +;223:// weaponInfo->missileDlightColor = {0,0,0}; +;224: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 225 +;225: weaponInfo->missileTrailFunc = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTP4 0 +ASGNP4 +line 227 +;226: +;227: weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/disruptor/alt_fire.wav"); +ADDRGP4 $243 +ARGP4 +ADDRLP4 264 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 264 +INDIRI4 +ASGNI4 +line 228 +;228: weaponInfo->altFiringSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 229 +;229: weaponInfo->altChargeSound = trap_S_RegisterSound("sound/weapons/disruptor/altCharge.wav"); +ADDRGP4 $244 +ARGP4 +ADDRLP4 268 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 152 +ADDP4 +ADDRLP4 268 +INDIRI4 +ASGNI4 +line 230 +;230: weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "disruptor/muzzle_flash" ); +ADDRGP4 $242 +ARGP4 +ADDRLP4 272 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRLP4 272 +INDIRI4 +ASGNI4 +line 231 +;231: weaponInfo->altMissileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 160 +ADDP4 +CNSTI4 0 +ASGNI4 +line 232 +;232: weaponInfo->altMissileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 0 +ASGNI4 +line 233 +;233: weaponInfo->altMissileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 172 +ADDP4 +CNSTF4 0 +ASGNF4 +line 235 +;234:// weaponInfo->altMissileDlightColor= {0,0,0}; +;235: weaponInfo->altMissileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTI4 0 +ASGNI4 +line 236 +;236: weaponInfo->altMissileTrailFunc = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTP4 0 +ASGNP4 +line 238 +;237: +;238: cgs.effects.disruptorRingsEffect = trap_FX_RegisterEffect( "disruptor/rings" ); +ADDRGP4 $247 +ARGP4 +ADDRLP4 276 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+44 +ADDRLP4 276 +INDIRI4 +ASGNI4 +line 239 +;239: cgs.effects.disruptorProjectileEffect = trap_FX_RegisterEffect( "disruptor/projectile" ); +ADDRGP4 $250 +ARGP4 +ADDRLP4 280 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+48 +ADDRLP4 280 +INDIRI4 +ASGNI4 +line 240 +;240: cgs.effects.disruptorWallImpactEffect = trap_FX_RegisterEffect( "disruptor/wall_impact" ); +ADDRGP4 $253 +ARGP4 +ADDRLP4 284 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+52 +ADDRLP4 284 +INDIRI4 +ASGNI4 +line 241 +;241: cgs.effects.disruptorFleshImpactEffect = trap_FX_RegisterEffect( "disruptor/flesh_impact" ); +ADDRGP4 $256 +ARGP4 +ADDRLP4 288 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+56 +ADDRLP4 288 +INDIRI4 +ASGNI4 +line 242 +;242: cgs.effects.disruptorAltMissEffect = trap_FX_RegisterEffect( "disruptor/alt_miss" ); +ADDRGP4 $259 +ARGP4 +ADDRLP4 292 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+60 +ADDRLP4 292 +INDIRI4 +ASGNI4 +line 243 +;243: cgs.effects.disruptorAltHitEffect = trap_FX_RegisterEffect( "disruptor/alt_hit" ); +ADDRGP4 $262 +ARGP4 +ADDRLP4 296 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+64 +ADDRLP4 296 +INDIRI4 +ASGNI4 +line 245 +;244: +;245: trap_R_RegisterShader( "gfx/effects/redLine" ); +ADDRGP4 $263 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 246 +;246: trap_R_RegisterShader( "gfx/misc/whiteline2" ); +ADDRGP4 $264 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 247 +;247: trap_R_RegisterShader( "gfx/effects/smokeTrail" ); +ADDRGP4 $265 +ARGP4 +ADDRGP4 trap_R_RegisterShader +CALLI4 +pop +line 249 +;248: +;249: trap_S_RegisterSound("sound/weapons/disruptor/zoomstart.wav"); +ADDRGP4 $266 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 250 +;250: trap_S_RegisterSound("sound/weapons/disruptor/zoomend.wav"); +ADDRGP4 $267 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 253 +;251: +;252: // Disruptor gun zoom interface +;253: cgs.media.disruptorMask = trap_R_RegisterShader( "gfx/2d/cropCircle2"); +ADDRGP4 $270 +ARGP4 +ADDRLP4 300 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+504 +ADDRLP4 300 +INDIRI4 +ASGNI4 +line 254 +;254: cgs.media.disruptorInsert = trap_R_RegisterShader( "gfx/2d/cropCircle"); +ADDRGP4 $273 +ARGP4 +ADDRLP4 304 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+508 +ADDRLP4 304 +INDIRI4 +ASGNI4 +line 255 +;255: cgs.media.disruptorLight = trap_R_RegisterShader( "gfx/2d/cropCircleGlow" ); +ADDRGP4 $276 +ARGP4 +ADDRLP4 308 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+512 +ADDRLP4 308 +INDIRI4 +ASGNI4 +line 256 +;256: cgs.media.disruptorInsertTick = trap_R_RegisterShader( "gfx/2d/insertTick" ); +ADDRGP4 $279 +ARGP4 +ADDRLP4 312 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+516 +ADDRLP4 312 +INDIRI4 +ASGNI4 +line 257 +;257: cgs.media.disruptorChargeShader = trap_R_RegisterShaderNoMip("gfx/2d/crop_charge"); +ADDRGP4 $282 +ARGP4 +ADDRLP4 316 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+520 +ADDRLP4 316 +INDIRI4 +ASGNI4 +line 259 +;258: +;259: cgs.media.disruptorZoomLoop = trap_S_RegisterSound( "sound/weapons/disruptor/zoomloop.wav" ); +ADDRGP4 $285 +ARGP4 +ADDRLP4 320 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+1264 +ADDRLP4 320 +INDIRI4 +ASGNI4 +line 260 +;260: break; +ADDRGP4 $178 +JUMPV +LABELV $286 +line 263 +;261: +;262: case WP_BOWCASTER: +;263: weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/bowcaster/fire.wav"); +ADDRGP4 $287 +ARGP4 +ADDRLP4 324 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 324 +INDIRI4 +ASGNI4 +line 264 +;264: weaponInfo->altFiringSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 265 +;265: weaponInfo->altChargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 266 +;266: weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "bowcaster/muzzle_flash" ); +ADDRGP4 $288 +ARGP4 +ADDRLP4 328 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRLP4 328 +INDIRI4 +ASGNI4 +line 267 +;267: weaponInfo->altMissileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 160 +ADDP4 +CNSTI4 0 +ASGNI4 +line 268 +;268: weaponInfo->altMissileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 0 +ASGNI4 +line 269 +;269: weaponInfo->altMissileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 172 +ADDP4 +CNSTF4 0 +ASGNF4 +line 271 +;270:// weaponInfo->altMissileDlightColor = {0,0,0}; +;271: weaponInfo->altMissileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTI4 0 +ASGNI4 +line 272 +;272: weaponInfo->altMissileTrailFunc = FX_BowcasterProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 168 +ADDP4 +ADDRGP4 FX_BowcasterProjectileThink +ASGNP4 +line 274 +;273: +;274: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/bowcaster/fire.wav"); +ADDRGP4 $287 +ARGP4 +ADDRLP4 332 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 332 +INDIRI4 +ASGNI4 +line 275 +;275: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 276 +;276: weaponInfo->chargeSound = trap_S_RegisterSound( "sound/weapons/bowcaster/altcharge.wav"); +ADDRGP4 $289 +ARGP4 +ADDRLP4 336 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRLP4 336 +INDIRI4 +ASGNI4 +line 277 +;277: weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "bowcaster/muzzle_flash" ); +ADDRGP4 $288 +ARGP4 +ADDRLP4 340 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRLP4 340 +INDIRI4 +ASGNI4 +line 278 +;278: weaponInfo->missileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 279 +;279: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 280 +;280: weaponInfo->missileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 282 +;281:// weaponInfo->missileDlightColor= {0,0,0}; +;282: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 283 +;283: weaponInfo->missileTrailFunc = FX_BowcasterAltProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRGP4 FX_BowcasterAltProjectileThink +ASGNP4 +line 285 +;284: +;285: cgs.effects.bowcasterShotEffect = trap_FX_RegisterEffect( "bowcaster/shot" ); +ADDRGP4 $292 +ARGP4 +ADDRLP4 344 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+68 +ADDRLP4 344 +INDIRI4 +ASGNI4 +line 286 +;286: cgs.effects.bowcasterImpactEffect = trap_FX_RegisterEffect( "bowcaster/explosion" ); +ADDRGP4 $295 +ARGP4 +ADDRLP4 348 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+72 +ADDRLP4 348 +INDIRI4 +ASGNI4 +line 288 +;287: +;288: cgs.media.greenFrontFlash = trap_R_RegisterShader( "gfx/effects/greenFrontFlash" ); +ADDRGP4 $298 +ARGP4 +ADDRLP4 352 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+24 +ADDRLP4 352 +INDIRI4 +ASGNI4 +line 289 +;289: break; +ADDRGP4 $178 +JUMPV +LABELV $299 +line 292 +;290: +;291: case WP_REPEATER: +;292: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/repeater/fire.wav"); +ADDRGP4 $300 +ARGP4 +ADDRLP4 356 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 356 +INDIRI4 +ASGNI4 +line 293 +;293: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 294 +;294: weaponInfo->chargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 295 +;295: weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "repeater/muzzle_flash" ); +ADDRGP4 $301 +ARGP4 +ADDRLP4 360 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRLP4 360 +INDIRI4 +ASGNI4 +line 296 +;296: weaponInfo->missileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 297 +;297: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 298 +;298: weaponInfo->missileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 300 +;299:// weaponInfo->missileDlightColor = {0,0,0}; +;300: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 301 +;301: weaponInfo->missileTrailFunc = FX_RepeaterProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRGP4 FX_RepeaterProjectileThink +ASGNP4 +line 303 +;302: +;303: weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/repeater/alt_fire.wav"); +ADDRGP4 $302 +ARGP4 +ADDRLP4 364 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 364 +INDIRI4 +ASGNI4 +line 304 +;304: weaponInfo->altFiringSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 305 +;305: weaponInfo->altChargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 306 +;306: weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "repeater/muzzle_flash" ); +ADDRGP4 $301 +ARGP4 +ADDRLP4 368 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRLP4 368 +INDIRI4 +ASGNI4 +line 307 +;307: weaponInfo->altMissileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 160 +ADDP4 +CNSTI4 0 +ASGNI4 +line 308 +;308: weaponInfo->altMissileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 0 +ASGNI4 +line 309 +;309: weaponInfo->altMissileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 172 +ADDP4 +CNSTF4 0 +ASGNF4 +line 311 +;310:// weaponInfo->altMissileDlightColor= {0,0,0}; +;311: weaponInfo->altMissileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTI4 0 +ASGNI4 +line 312 +;312: weaponInfo->altMissileTrailFunc = FX_RepeaterAltProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 168 +ADDP4 +ADDRGP4 FX_RepeaterAltProjectileThink +ASGNP4 +line 314 +;313: +;314: cgs.effects.repeaterProjectileEffect = trap_FX_RegisterEffect( "repeater/projectile" ); +ADDRGP4 $305 +ARGP4 +ADDRLP4 372 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+76 +ADDRLP4 372 +INDIRI4 +ASGNI4 +line 315 +;315: cgs.effects.repeaterAltProjectileEffect = trap_FX_RegisterEffect( "repeater/alt_projectile" ); +ADDRGP4 $308 +ARGP4 +ADDRLP4 376 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+80 +ADDRLP4 376 +INDIRI4 +ASGNI4 +line 316 +;316: cgs.effects.repeaterWallImpactEffect = trap_FX_RegisterEffect( "repeater/wall_impact" ); +ADDRGP4 $311 +ARGP4 +ADDRLP4 380 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+84 +ADDRLP4 380 +INDIRI4 +ASGNI4 +line 317 +;317: cgs.effects.repeaterFleshImpactEffect = trap_FX_RegisterEffect( "repeater/flesh_impact" ); +ADDRGP4 $314 +ARGP4 +ADDRLP4 384 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+88 +ADDRLP4 384 +INDIRI4 +ASGNI4 +line 319 +;318: //cgs.effects.repeaterAltWallImpactEffect = trap_FX_RegisterEffect( "repeater/alt_wall_impact" ); +;319: cgs.effects.repeaterAltWallImpactEffect = trap_FX_RegisterEffect( "repeater/concussion" ); +ADDRGP4 $317 +ARGP4 +ADDRLP4 388 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+92 +ADDRLP4 388 +INDIRI4 +ASGNI4 +line 320 +;320: break; +ADDRGP4 $178 +JUMPV +LABELV $318 +line 323 +;321: +;322: case WP_DEMP2: +;323: weaponInfo->flashSound[0] = trap_S_RegisterSound("sound/weapons/demp2/fire.wav"); +ADDRGP4 $319 +ARGP4 +ADDRLP4 392 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 392 +INDIRI4 +ASGNI4 +line 324 +;324: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 325 +;325: weaponInfo->chargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 326 +;326: weaponInfo->muzzleEffect = trap_FX_RegisterEffect("demp2/muzzle_flash"); +ADDRGP4 $320 +ARGP4 +ADDRLP4 396 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRLP4 396 +INDIRI4 +ASGNI4 +line 327 +;327: weaponInfo->missileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 328 +;328: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 329 +;329: weaponInfo->missileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 331 +;330:// weaponInfo->missileDlightColor = {0,0,0}; +;331: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 332 +;332: weaponInfo->missileTrailFunc = FX_DEMP2_ProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRGP4 FX_DEMP2_ProjectileThink +ASGNP4 +line 334 +;333: +;334: weaponInfo->altFlashSound[0] = trap_S_RegisterSound("sound/weapons/demp2/altfire.wav"); +ADDRGP4 $321 +ARGP4 +ADDRLP4 400 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 400 +INDIRI4 +ASGNI4 +line 335 +;335: weaponInfo->altFiringSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 336 +;336: weaponInfo->altChargeSound = trap_S_RegisterSound("sound/weapons/demp2/altCharge.wav"); +ADDRGP4 $322 +ARGP4 +ADDRLP4 404 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 152 +ADDP4 +ADDRLP4 404 +INDIRI4 +ASGNI4 +line 337 +;337: weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect("demp2/muzzle_flash"); +ADDRGP4 $320 +ARGP4 +ADDRLP4 408 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRLP4 408 +INDIRI4 +ASGNI4 +line 338 +;338: weaponInfo->altMissileModel = NULL_HANDLE; +ADDRLP4 8 +INDIRP4 +CNSTI4 160 +ADDP4 +CNSTI4 0 +ASGNI4 +line 339 +;339: weaponInfo->altMissileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 0 +ASGNI4 +line 340 +;340: weaponInfo->altMissileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 172 +ADDP4 +CNSTF4 0 +ASGNF4 +line 342 +;341:// weaponInfo->altMissileDlightColor= {0,0,0}; +;342: weaponInfo->altMissileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTI4 0 +ASGNI4 +line 343 +;343: weaponInfo->altMissileTrailFunc = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTP4 0 +ASGNP4 +line 345 +;344: +;345: cgs.effects.demp2ProjectileEffect = trap_FX_RegisterEffect( "demp2/projectile" ); +ADDRGP4 $325 +ARGP4 +ADDRLP4 412 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+96 +ADDRLP4 412 +INDIRI4 +ASGNI4 +line 346 +;346: cgs.effects.demp2WallImpactEffect = trap_FX_RegisterEffect( "demp2/wall_impact" ); +ADDRGP4 $328 +ARGP4 +ADDRLP4 416 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+100 +ADDRLP4 416 +INDIRI4 +ASGNI4 +line 347 +;347: cgs.effects.demp2FleshImpactEffect = trap_FX_RegisterEffect( "demp2/flesh_impact" ); +ADDRGP4 $331 +ARGP4 +ADDRLP4 420 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+104 +ADDRLP4 420 +INDIRI4 +ASGNI4 +line 349 +;348: +;349: trap_FX_RegisterEffect("demp2/altDetonate.efx"); +ADDRGP4 $332 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 350 +;350: cgs.media.demp2Shell = trap_R_RegisterModel( "models/items/sphere.md3" ); +ADDRGP4 $335 +ARGP4 +ADDRLP4 424 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+908 +ADDRLP4 424 +INDIRI4 +ASGNI4 +line 351 +;351: cgs.media.demp2ShellShader = trap_R_RegisterShader( "gfx/effects/demp2shell" ); +ADDRGP4 $338 +ARGP4 +ADDRLP4 428 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+912 +ADDRLP4 428 +INDIRI4 +ASGNI4 +line 353 +;352: +;353: cgs.media.lightningFlash = trap_R_RegisterShader("gfx/misc/lightningFlash"); +ADDRGP4 $341 +ARGP4 +ADDRLP4 432 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+28 +ADDRLP4 432 +INDIRI4 +ASGNI4 +line 354 +;354: break; +ADDRGP4 $178 +JUMPV +LABELV $342 +line 357 +;355: +;356: case WP_FLECHETTE: +;357: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/flechette/fire.wav"); +ADDRGP4 $343 +ARGP4 +ADDRLP4 436 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 436 +INDIRI4 +ASGNI4 +line 358 +;358: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 359 +;359: weaponInfo->chargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 360 +;360: weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "flechette/muzzle_flash" ); +ADDRGP4 $344 +ARGP4 +ADDRLP4 440 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRLP4 440 +INDIRI4 +ASGNI4 +line 361 +;361: weaponInfo->missileModel = trap_R_RegisterModel("models/weapons2/golan_arms/projectileMain.md3"); +ADDRGP4 $345 +ARGP4 +ADDRLP4 444 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 444 +INDIRI4 +ASGNI4 +line 362 +;362: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 363 +;363: weaponInfo->missileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 365 +;364:// weaponInfo->missileDlightColor = {0,0,0}; +;365: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 366 +;366: weaponInfo->missileTrailFunc = FX_FlechetteProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRGP4 FX_FlechetteProjectileThink +ASGNP4 +line 368 +;367: +;368: weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/flechette/alt_fire.wav"); +ADDRGP4 $346 +ARGP4 +ADDRLP4 448 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 448 +INDIRI4 +ASGNI4 +line 369 +;369: weaponInfo->altFiringSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 370 +;370: weaponInfo->altChargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 371 +;371: weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "flechette/muzzle_flash" ); +ADDRGP4 $344 +ARGP4 +ADDRLP4 452 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRLP4 452 +INDIRI4 +ASGNI4 +line 372 +;372: weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/golan_arms/projectile.md3" ); +ADDRGP4 $347 +ARGP4 +ADDRLP4 456 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 160 +ADDP4 +ADDRLP4 456 +INDIRI4 +ASGNI4 +line 373 +;373: weaponInfo->altMissileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 0 +ASGNI4 +line 374 +;374: weaponInfo->altMissileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 172 +ADDP4 +CNSTF4 0 +ASGNF4 +line 376 +;375:// weaponInfo->altMissileDlightColor= {0,0,0}; +;376: weaponInfo->altMissileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTI4 0 +ASGNI4 +line 377 +;377: weaponInfo->altMissileTrailFunc = FX_FlechetteAltProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 168 +ADDP4 +ADDRGP4 FX_FlechetteAltProjectileThink +ASGNP4 +line 379 +;378: +;379: cgs.effects.flechetteShotEffect = trap_FX_RegisterEffect( "flechette/shot" ); +ADDRGP4 $350 +ARGP4 +ADDRLP4 460 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+108 +ADDRLP4 460 +INDIRI4 +ASGNI4 +line 380 +;380: cgs.effects.flechetteAltShotEffect = trap_FX_RegisterEffect( "flechette/alt_shot" ); +ADDRGP4 $353 +ARGP4 +ADDRLP4 464 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+112 +ADDRLP4 464 +INDIRI4 +ASGNI4 +line 381 +;381: cgs.effects.flechetteWallImpactEffect = trap_FX_RegisterEffect( "flechette/wall_impact" ); +ADDRGP4 $356 +ARGP4 +ADDRLP4 468 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+116 +ADDRLP4 468 +INDIRI4 +ASGNI4 +line 382 +;382: cgs.effects.flechetteFleshImpactEffect = trap_FX_RegisterEffect( "flechette/flesh_impact" ); +ADDRGP4 $359 +ARGP4 +ADDRLP4 472 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+120 +ADDRLP4 472 +INDIRI4 +ASGNI4 +line 384 +;383: +;384: trap_FX_RegisterEffect("flechette/alt_blow.efx"); +ADDRGP4 $360 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 385 +;385: break; +ADDRGP4 $178 +JUMPV +LABELV $361 +line 388 +;386: +;387: case WP_ROCKET_LAUNCHER: +;388: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/rocket/fire.wav"); +ADDRGP4 $362 +ARGP4 +ADDRLP4 476 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 476 +INDIRI4 +ASGNI4 +line 389 +;389: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 390 +;390: weaponInfo->chargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 391 +;391: weaponInfo->muzzleEffect = trap_FX_RegisterEffect( "rocket/muzzle_flash" ); +ADDRGP4 $363 +ARGP4 +ADDRLP4 480 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRLP4 480 +INDIRI4 +ASGNI4 +line 392 +;392: weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/merr_sonn/projectile.md3" ); +ADDRGP4 $364 +ARGP4 +ADDRLP4 484 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 484 +INDIRI4 +ASGNI4 +line 393 +;393: weaponInfo->missileSound = trap_S_RegisterSound( "sound/weapons/rocket/missileloop.wav"); +ADDRGP4 $365 +ARGP4 +ADDRLP4 488 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 100 +ADDP4 +ADDRLP4 488 +INDIRI4 +ASGNI4 +line 394 +;394: weaponInfo->missileDlight = 125; +ADDRLP4 8 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 1123680256 +ASGNF4 +line 395 +;395: VectorSet(weaponInfo->missileDlightColor, 1.0, 1.0, 0.5); +ADDRLP4 8 +INDIRP4 +CNSTI4 112 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 116 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 120 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 396 +;396: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 397 +;397: weaponInfo->missileTrailFunc = FX_RocketProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRGP4 FX_RocketProjectileThink +ASGNP4 +line 399 +;398: +;399: weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/rocket/alt_fire.wav"); +ADDRGP4 $366 +ARGP4 +ADDRLP4 492 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 492 +INDIRI4 +ASGNI4 +line 400 +;400: weaponInfo->altFiringSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 401 +;401: weaponInfo->altChargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 402 +;402: weaponInfo->altMuzzleEffect = trap_FX_RegisterEffect( "rocket/muzzle_flash" ); +ADDRGP4 $363 +ARGP4 +ADDRLP4 496 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 156 +ADDP4 +ADDRLP4 496 +INDIRI4 +ASGNI4 +line 403 +;403: weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/merr_sonn/projectile.md3" ); +ADDRGP4 $364 +ARGP4 +ADDRLP4 500 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 160 +ADDP4 +ADDRLP4 500 +INDIRI4 +ASGNI4 +line 404 +;404: weaponInfo->altMissileSound = trap_S_RegisterSound( "sound/weapons/rocket/missileloop.wav"); +ADDRGP4 $365 +ARGP4 +ADDRLP4 504 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 164 +ADDP4 +ADDRLP4 504 +INDIRI4 +ASGNI4 +line 405 +;405: weaponInfo->altMissileDlight = 125; +ADDRLP4 8 +INDIRP4 +CNSTI4 172 +ADDP4 +CNSTF4 1123680256 +ASGNF4 +line 406 +;406: VectorSet(weaponInfo->altMissileDlightColor, 1.0, 1.0, 0.5); +ADDRLP4 8 +INDIRP4 +CNSTI4 176 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 180 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 184 +ADDP4 +CNSTF4 1056964608 +ASGNF4 +line 407 +;407: weaponInfo->altMissileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTI4 0 +ASGNI4 +line 408 +;408: weaponInfo->altMissileTrailFunc = FX_RocketAltProjectileThink; +ADDRLP4 8 +INDIRP4 +CNSTI4 168 +ADDP4 +ADDRGP4 FX_RocketAltProjectileThink +ASGNP4 +line 410 +;409: +;410: cgs.effects.rocketShotEffect = trap_FX_RegisterEffect( "rocket/shot" ); +ADDRGP4 $369 +ARGP4 +ADDRLP4 508 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+124 +ADDRLP4 508 +INDIRI4 +ASGNI4 +line 411 +;411: cgs.effects.rocketExplosionEffect = trap_FX_RegisterEffect( "rocket/explosion" ); +ADDRGP4 $372 +ARGP4 +ADDRLP4 512 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+128 +ADDRLP4 512 +INDIRI4 +ASGNI4 +line 413 +;412: +;413: trap_R_RegisterShaderNoMip( "gfx/2d/wedge" ); +ADDRGP4 $373 +ARGP4 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +pop +line 414 +;414: trap_R_RegisterShaderNoMip( "gfx/2d/lock" ); +ADDRGP4 $374 +ARGP4 +ADDRGP4 trap_R_RegisterShaderNoMip +CALLI4 +pop +line 416 +;415: +;416: trap_S_RegisterSound( "sound/weapons/rocket/lock.wav" ); +ADDRGP4 $375 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 417 +;417: trap_S_RegisterSound( "sound/weapons/rocket/tick.wav" ); +ADDRGP4 $376 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 418 +;418: break; +ADDRGP4 $178 +JUMPV +LABELV $377 +line 421 +;419: +;420: case WP_THERMAL: +;421: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/thermal/fire.wav"); +ADDRGP4 $378 +ARGP4 +ADDRLP4 516 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 516 +INDIRI4 +ASGNI4 +line 422 +;422: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 423 +;423: weaponInfo->chargeSound = trap_S_RegisterSound( "sound/weapons/thermal/charge.wav"); +ADDRGP4 $379 +ARGP4 +ADDRLP4 520 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRLP4 520 +INDIRI4 +ASGNI4 +line 424 +;424: weaponInfo->muzzleEffect = NULL_FX; +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTI4 0 +ASGNI4 +line 425 +;425: weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/thermal/thermal_proj.md3" ); +ADDRGP4 $380 +ARGP4 +ADDRLP4 524 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 524 +INDIRI4 +ASGNI4 +line 426 +;426: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 427 +;427: weaponInfo->missileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 429 +;428:// weaponInfo->missileDlightColor = {0,0,0}; +;429: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 430 +;430: weaponInfo->missileTrailFunc = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTP4 0 +ASGNP4 +line 432 +;431: +;432: weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/thermal/fire.wav"); +ADDRGP4 $378 +ARGP4 +ADDRLP4 528 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 528 +INDIRI4 +ASGNI4 +line 433 +;433: weaponInfo->altFiringSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 434 +;434: weaponInfo->altChargeSound = trap_S_RegisterSound( "sound/weapons/thermal/charge.wav"); +ADDRGP4 $379 +ARGP4 +ADDRLP4 532 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 152 +ADDP4 +ADDRLP4 532 +INDIRI4 +ASGNI4 +line 435 +;435: weaponInfo->altMuzzleEffect = NULL_FX; +ADDRLP4 8 +INDIRP4 +CNSTI4 156 +ADDP4 +CNSTI4 0 +ASGNI4 +line 436 +;436: weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/thermal/thermal_proj.md3" ); +ADDRGP4 $380 +ARGP4 +ADDRLP4 536 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 160 +ADDP4 +ADDRLP4 536 +INDIRI4 +ASGNI4 +line 437 +;437: weaponInfo->altMissileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 0 +ASGNI4 +line 438 +;438: weaponInfo->altMissileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 172 +ADDP4 +CNSTF4 0 +ASGNF4 +line 440 +;439:// weaponInfo->altMissileDlightColor= {0,0,0}; +;440: weaponInfo->altMissileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTI4 0 +ASGNI4 +line 441 +;441: weaponInfo->altMissileTrailFunc = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTP4 0 +ASGNP4 +line 443 +;442: +;443: cgs.effects.thermalExplosionEffect = trap_FX_RegisterEffect( "thermal/explosion" ); +ADDRGP4 $383 +ARGP4 +ADDRLP4 540 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+132 +ADDRLP4 540 +INDIRI4 +ASGNI4 +line 444 +;444: cgs.effects.thermalShockwaveEffect = trap_FX_RegisterEffect( "thermal/shockwave" ); +ADDRGP4 $386 +ARGP4 +ADDRLP4 544 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+136 +ADDRLP4 544 +INDIRI4 +ASGNI4 +line 446 +;445: +;446: cgs.media.grenadeBounce1 = trap_S_RegisterSound( "sound/weapons/thermal/bounce1.wav" ); +ADDRGP4 $389 +ARGP4 +ADDRLP4 548 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+680 +ADDRLP4 548 +INDIRI4 +ASGNI4 +line 447 +;447: cgs.media.grenadeBounce2 = trap_S_RegisterSound( "sound/weapons/thermal/bounce2.wav" ); +ADDRGP4 $392 +ARGP4 +ADDRLP4 552 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRGP4 cgs+70296+684 +ADDRLP4 552 +INDIRI4 +ASGNI4 +line 449 +;448: +;449: trap_S_RegisterSound( "sound/weapons/thermal/thermloop.wav" ); +ADDRGP4 $393 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 450 +;450: trap_S_RegisterSound( "sound/weapons/thermal/warning.wav" ); +ADDRGP4 $394 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 452 +;451: +;452: break; +ADDRGP4 $178 +JUMPV +LABELV $395 +line 455 +;453: +;454: case WP_TRIP_MINE: +;455: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/laser_trap/fire.wav"); +ADDRGP4 $396 +ARGP4 +ADDRLP4 556 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 556 +INDIRI4 +ASGNI4 +line 456 +;456: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 457 +;457: weaponInfo->chargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 458 +;458: weaponInfo->muzzleEffect = NULL_FX; +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTI4 0 +ASGNI4 +line 459 +;459: weaponInfo->missileModel = 0;//trap_R_RegisterModel( "models/weapons2/laser_trap/laser_trap_w.md3" ); +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +CNSTI4 0 +ASGNI4 +line 460 +;460: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 461 +;461: weaponInfo->missileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 463 +;462:// weaponInfo->missileDlightColor = {0,0,0}; +;463: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 464 +;464: weaponInfo->missileTrailFunc = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTP4 0 +ASGNP4 +line 466 +;465: +;466: weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/laser_trap/fire.wav"); +ADDRGP4 $396 +ARGP4 +ADDRLP4 560 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 560 +INDIRI4 +ASGNI4 +line 467 +;467: weaponInfo->altFiringSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 468 +;468: weaponInfo->altChargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 469 +;469: weaponInfo->altMuzzleEffect = NULL_FX; +ADDRLP4 8 +INDIRP4 +CNSTI4 156 +ADDP4 +CNSTI4 0 +ASGNI4 +line 470 +;470: weaponInfo->altMissileModel = 0;//trap_R_RegisterModel( "models/weapons2/laser_trap/laser_trap_w.md3" ); +ADDRLP4 8 +INDIRP4 +CNSTI4 160 +ADDP4 +CNSTI4 0 +ASGNI4 +line 471 +;471: weaponInfo->altMissileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 0 +ASGNI4 +line 472 +;472: weaponInfo->altMissileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 172 +ADDP4 +CNSTF4 0 +ASGNF4 +line 474 +;473:// weaponInfo->altMissileDlightColor= {0,0,0}; +;474: weaponInfo->altMissileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTI4 0 +ASGNI4 +line 475 +;475: weaponInfo->altMissileTrailFunc = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTP4 0 +ASGNP4 +line 477 +;476: +;477: cgs.effects.tripmineLaserFX = trap_FX_RegisterEffect("tripMine/laserMP.efx"); +ADDRGP4 $399 +ARGP4 +ADDRLP4 564 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRGP4 cgs+71564+140 +ADDRLP4 564 +INDIRI4 +ASGNI4 +line 479 +;478: +;479: trap_FX_RegisterEffect( "tripMine/explosion" ); +ADDRGP4 $400 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 481 +;480: // NOTENOTE temp stuff +;481: trap_S_RegisterSound( "sound/weapons/laser_trap/stick.wav" ); +ADDRGP4 $401 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 482 +;482: trap_S_RegisterSound( "sound/weapons/laser_trap/warning.wav" ); +ADDRGP4 $402 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 483 +;483: break; +ADDRGP4 $178 +JUMPV +LABELV $403 +line 486 +;484: +;485: case WP_DET_PACK: +;486: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/detpack/fire.wav"); +ADDRGP4 $404 +ARGP4 +ADDRLP4 568 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 568 +INDIRI4 +ASGNI4 +line 487 +;487: weaponInfo->firingSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 84 +ADDP4 +CNSTI4 0 +ASGNI4 +line 488 +;488: weaponInfo->chargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 88 +ADDP4 +CNSTI4 0 +ASGNI4 +line 489 +;489: weaponInfo->muzzleEffect = NULL_FX; +ADDRLP4 8 +INDIRP4 +CNSTI4 92 +ADDP4 +CNSTI4 0 +ASGNI4 +line 490 +;490: weaponInfo->missileModel = trap_R_RegisterModel( "models/weapons2/detpack/det_pack.md3" ); +ADDRGP4 $405 +ARGP4 +ADDRLP4 572 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 572 +INDIRI4 +ASGNI4 +line 491 +;491: weaponInfo->missileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 100 +ADDP4 +CNSTI4 0 +ASGNI4 +line 492 +;492: weaponInfo->missileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 108 +ADDP4 +CNSTF4 0 +ASGNF4 +line 494 +;493:// weaponInfo->missileDlightColor = {0,0,0}; +;494: weaponInfo->missileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +CNSTI4 0 +ASGNI4 +line 495 +;495: weaponInfo->missileTrailFunc = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 104 +ADDP4 +CNSTP4 0 +ASGNP4 +line 497 +;496: +;497: weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/detpack/fire.wav"); +ADDRGP4 $404 +ARGP4 +ADDRLP4 576 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 576 +INDIRI4 +ASGNI4 +line 498 +;498: weaponInfo->altFiringSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +CNSTI4 0 +ASGNI4 +line 499 +;499: weaponInfo->altChargeSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 152 +ADDP4 +CNSTI4 0 +ASGNI4 +line 500 +;500: weaponInfo->altMuzzleEffect = NULL_FX; +ADDRLP4 8 +INDIRP4 +CNSTI4 156 +ADDP4 +CNSTI4 0 +ASGNI4 +line 501 +;501: weaponInfo->altMissileModel = trap_R_RegisterModel( "models/weapons2/detpack/det_pack.md3" ); +ADDRGP4 $405 +ARGP4 +ADDRLP4 580 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 160 +ADDP4 +ADDRLP4 580 +INDIRI4 +ASGNI4 +line 502 +;502: weaponInfo->altMissileSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 164 +ADDP4 +CNSTI4 0 +ASGNI4 +line 503 +;503: weaponInfo->altMissileDlight = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 172 +ADDP4 +CNSTF4 0 +ASGNF4 +line 505 +;504:// weaponInfo->altMissileDlightColor= {0,0,0}; +;505: weaponInfo->altMissileHitSound = NULL_SOUND; +ADDRLP4 8 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTI4 0 +ASGNI4 +line 506 +;506: weaponInfo->altMissileTrailFunc = 0; +ADDRLP4 8 +INDIRP4 +CNSTI4 168 +ADDP4 +CNSTP4 0 +ASGNP4 +line 508 +;507: +;508: trap_FX_RegisterEffect( "detpack/explosion.efx" ); +ADDRGP4 $406 +ARGP4 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +pop +line 510 +;509: +;510: trap_R_RegisterModel( "models/weapons2/detpack/det_pack.md3" ); +ADDRGP4 $405 +ARGP4 +ADDRGP4 trap_R_RegisterModel +CALLI4 +pop +line 511 +;511: trap_S_RegisterSound( "sound/weapons/detpack/stick.wav" ); +ADDRGP4 $407 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 512 +;512: trap_S_RegisterSound( "sound/weapons/detpack/warning.wav" ); +ADDRGP4 $408 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 513 +;513: trap_S_RegisterSound( "sound/weapons/explosions/explode5.wav" ); +ADDRGP4 $409 +ARGP4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +pop +line 514 +;514: break; +ADDRGP4 $178 +JUMPV +LABELV $177 +line 517 +;515: +;516: default: +;517: MAKERGB( weaponInfo->flashDlightColor, 1, 1, 1 ); +ADDRLP4 8 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 48 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 52 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 518 +;518: weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/rocket/rocklf1a.wav" ); +ADDRGP4 $410 +ARGP4 +ADDRLP4 584 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDRLP4 584 +INDIRI4 +ASGNI4 +line 519 +;519: break; +LABELV $178 +line 521 +;520: } +;521:} +LABELV $120 +endproc CG_RegisterWeapon 588 12 +import FX_RocketHitPlayer +import FX_RocketHitWall +import FX_RocketAltProjectileThink +import FX_RocketProjectileThink +import FX_FlechetteAltProjectileThink +import FX_FlechetteWeaponHitPlayer +import FX_FlechetteWeaponHitWall +import FX_FlechetteProjectileThink +import FX_DEMP2_AltDetonate +import FX_DEMP2_HitPlayer +import FX_DEMP2_HitWall +import FX_DEMP2_ProjectileThink +import FX_RepeaterAltHitPlayer +import FX_RepeaterHitPlayer +import FX_RepeaterAltHitWall +import FX_RepeaterHitWall +import FX_RepeaterAltProjectileThink +import FX_RepeaterProjectileThink +import FX_BowcasterHitPlayer +import FX_BowcasterHitWall +import FX_BowcasterAltProjectileThink +import FX_BowcasterProjectileThink +import FX_DisruptorHitPlayer +import FX_DisruptorHitWall +import FX_DisruptorAltHit +import FX_DisruptorAltMiss +import FX_DisruptorAltShot +import FX_DisruptorMainShot +import FX_BryarAltProjectileThink +import FX_BryarProjectileThink +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $410 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 108 +char 1 102 +char 1 49 +char 1 97 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $409 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 100 +char 1 101 +char 1 53 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $408 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 47 +char 1 119 +char 1 97 +char 1 114 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $407 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 47 +char 1 115 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $406 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $405 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 95 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $404 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 101 +char 1 116 +char 1 112 +char 1 97 +char 1 99 +char 1 107 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $402 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 108 +char 1 97 +char 1 115 +char 1 101 +char 1 114 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 112 +char 1 47 +char 1 119 +char 1 97 +char 1 114 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $401 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 108 +char 1 97 +char 1 115 +char 1 101 +char 1 114 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 112 +char 1 47 +char 1 115 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $400 +char 1 116 +char 1 114 +char 1 105 +char 1 112 +char 1 77 +char 1 105 +char 1 110 +char 1 101 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $399 +char 1 116 +char 1 114 +char 1 105 +char 1 112 +char 1 77 +char 1 105 +char 1 110 +char 1 101 +char 1 47 +char 1 108 +char 1 97 +char 1 115 +char 1 101 +char 1 114 +char 1 77 +char 1 80 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $396 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 108 +char 1 97 +char 1 115 +char 1 101 +char 1 114 +char 1 95 +char 1 116 +char 1 114 +char 1 97 +char 1 112 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $394 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 119 +char 1 97 +char 1 114 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $393 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 108 +char 1 111 +char 1 111 +char 1 112 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $392 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 98 +char 1 111 +char 1 117 +char 1 110 +char 1 99 +char 1 101 +char 1 50 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $389 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 98 +char 1 111 +char 1 117 +char 1 110 +char 1 99 +char 1 101 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $386 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 115 +char 1 104 +char 1 111 +char 1 99 +char 1 107 +char 1 119 +char 1 97 +char 1 118 +char 1 101 +char 1 0 +align 1 +LABELV $383 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $380 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 95 +char 1 112 +char 1 114 +char 1 111 +char 1 106 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $379 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $378 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 109 +char 1 97 +char 1 108 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $376 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 116 +char 1 105 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $375 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 108 +char 1 111 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $374 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 108 +char 1 111 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $373 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 100 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $372 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $369 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $366 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $365 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 115 +char 1 105 +char 1 108 +char 1 101 +char 1 108 +char 1 111 +char 1 111 +char 1 112 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $364 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 109 +char 1 101 +char 1 114 +char 1 114 +char 1 95 +char 1 115 +char 1 111 +char 1 110 +char 1 110 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 105 +char 1 108 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $363 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 109 +char 1 117 +char 1 122 +char 1 122 +char 1 108 +char 1 101 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $362 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 111 +char 1 99 +char 1 107 +char 1 101 +char 1 116 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $360 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 98 +char 1 108 +char 1 111 +char 1 119 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $359 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 115 +char 1 104 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $356 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 47 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $353 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $350 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 47 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $347 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 103 +char 1 111 +char 1 108 +char 1 97 +char 1 110 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 115 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 105 +char 1 108 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $346 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $345 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 103 +char 1 111 +char 1 108 +char 1 97 +char 1 110 +char 1 95 +char 1 97 +char 1 114 +char 1 109 +char 1 115 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 105 +char 1 108 +char 1 101 +char 1 77 +char 1 97 +char 1 105 +char 1 110 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $344 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 47 +char 1 109 +char 1 117 +char 1 122 +char 1 122 +char 1 108 +char 1 101 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $343 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 104 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $341 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 70 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $338 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 115 +char 1 104 +char 1 101 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $335 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 115 +char 1 47 +char 1 115 +char 1 112 +char 1 104 +char 1 101 +char 1 114 +char 1 101 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $332 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 68 +char 1 101 +char 1 116 +char 1 111 +char 1 110 +char 1 97 +char 1 116 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $331 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 115 +char 1 104 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $328 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $325 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 105 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $322 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 67 +char 1 104 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $321 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $320 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 109 +char 1 117 +char 1 122 +char 1 122 +char 1 108 +char 1 101 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $319 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $317 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 99 +char 1 111 +char 1 110 +char 1 99 +char 1 117 +char 1 115 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $314 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 115 +char 1 104 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $311 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $308 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 112 +char 1 114 +char 1 111 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 105 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $305 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 105 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $302 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $301 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 109 +char 1 117 +char 1 122 +char 1 122 +char 1 108 +char 1 101 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $300 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 112 +char 1 101 +char 1 97 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $298 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 103 +char 1 114 +char 1 101 +char 1 101 +char 1 110 +char 1 70 +char 1 114 +char 1 111 +char 1 110 +char 1 116 +char 1 70 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $295 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 101 +char 1 120 +char 1 112 +char 1 108 +char 1 111 +char 1 115 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $292 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $289 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $288 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 109 +char 1 117 +char 1 122 +char 1 122 +char 1 108 +char 1 101 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $287 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 98 +char 1 111 +char 1 119 +char 1 99 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $285 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 122 +char 1 111 +char 1 111 +char 1 109 +char 1 108 +char 1 111 +char 1 111 +char 1 112 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $282 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 99 +char 1 114 +char 1 111 +char 1 112 +char 1 95 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $279 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 105 +char 1 110 +char 1 115 +char 1 101 +char 1 114 +char 1 116 +char 1 84 +char 1 105 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $276 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 99 +char 1 114 +char 1 111 +char 1 112 +char 1 67 +char 1 105 +char 1 114 +char 1 99 +char 1 108 +char 1 101 +char 1 71 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $273 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 99 +char 1 114 +char 1 111 +char 1 112 +char 1 67 +char 1 105 +char 1 114 +char 1 99 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $270 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 50 +char 1 100 +char 1 47 +char 1 99 +char 1 114 +char 1 111 +char 1 112 +char 1 67 +char 1 105 +char 1 114 +char 1 99 +char 1 108 +char 1 101 +char 1 50 +char 1 0 +align 1 +LABELV $267 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 122 +char 1 111 +char 1 111 +char 1 109 +char 1 101 +char 1 110 +char 1 100 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $266 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 122 +char 1 111 +char 1 111 +char 1 109 +char 1 115 +char 1 116 +char 1 97 +char 1 114 +char 1 116 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $265 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 84 +char 1 114 +char 1 97 +char 1 105 +char 1 108 +char 1 0 +align 1 +LABELV $264 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 119 +char 1 104 +char 1 105 +char 1 116 +char 1 101 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 50 +char 1 0 +align 1 +LABELV $263 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 100 +char 1 76 +char 1 105 +char 1 110 +char 1 101 +char 1 0 +align 1 +LABELV $262 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 104 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $259 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 109 +char 1 105 +char 1 115 +char 1 115 +char 1 0 +align 1 +LABELV $256 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 115 +char 1 104 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $253 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $250 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 112 +char 1 114 +char 1 111 +char 1 106 +char 1 101 +char 1 99 +char 1 116 +char 1 105 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $247 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 115 +char 1 0 +align 1 +LABELV $244 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 67 +char 1 104 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $243 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $242 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 109 +char 1 117 +char 1 122 +char 1 122 +char 1 108 +char 1 101 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $241 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 100 +char 1 105 +char 1 115 +char 1 114 +char 1 117 +char 1 112 +char 1 116 +char 1 111 +char 1 114 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $239 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 95 +char 1 98 +char 1 111 +char 1 108 +char 1 116 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $238 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 100 +char 1 114 +char 1 111 +char 1 105 +char 1 100 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $235 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 115 +char 1 104 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $232 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $229 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $226 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 100 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $225 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $224 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 109 +char 1 117 +char 1 122 +char 1 122 +char 1 108 +char 1 101 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $223 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $221 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 95 +char 1 98 +char 1 111 +char 1 108 +char 1 116 +char 1 111 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $220 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 115 +char 1 104 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $219 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $218 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 108 +char 1 97 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 47 +char 1 100 +char 1 101 +char 1 102 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $217 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 70 +char 1 114 +char 1 111 +char 1 110 +char 1 116 +char 1 70 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $214 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 47 +char 1 100 +char 1 114 +char 1 111 +char 1 105 +char 1 100 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $211 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 115 +char 1 104 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $208 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 51 +char 1 0 +align 1 +LABELV $205 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 50 +char 1 0 +align 1 +LABELV $202 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 47 +char 1 119 +char 1 97 +char 1 108 +char 1 108 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $199 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 47 +char 1 99 +char 1 114 +char 1 97 +char 1 99 +char 1 107 +char 1 108 +char 1 101 +char 1 83 +char 1 104 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $196 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 47 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $194 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 99 +char 1 104 +char 1 97 +char 1 114 +char 1 103 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $193 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 95 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $192 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 47 +char 1 109 +char 1 117 +char 1 122 +char 1 122 +char 1 108 +char 1 101 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $191 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 98 +char 1 114 +char 1 121 +char 1 97 +char 1 114 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $189 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 95 +char 1 119 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $188 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 104 +char 1 117 +char 1 109 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $186 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $185 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 105 +char 1 100 +char 1 108 +char 1 101 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $184 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 108 +char 1 101 +char 1 101 +char 1 47 +char 1 112 +char 1 117 +char 1 110 +char 1 99 +char 1 104 +char 1 52 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $183 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 108 +char 1 101 +char 1 101 +char 1 47 +char 1 112 +char 1 117 +char 1 110 +char 1 99 +char 1 104 +char 1 51 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $182 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 108 +char 1 101 +char 1 101 +char 1 47 +char 1 112 +char 1 117 +char 1 110 +char 1 99 +char 1 104 +char 1 50 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $181 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 109 +char 1 101 +char 1 108 +char 1 101 +char 1 101 +char 1 47 +char 1 112 +char 1 117 +char 1 110 +char 1 99 +char 1 104 +char 1 49 +char 1 46 +char 1 109 +char 1 112 +char 1 51 +char 1 0 +align 1 +LABELV $180 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 66 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 102 +char 1 108 +char 1 101 +char 1 115 +char 1 104 +char 1 95 +char 1 105 +char 1 109 +char 1 112 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $176 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 114 +char 1 97 +char 1 105 +char 1 110 +char 1 104 +char 1 105 +char 1 116 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $173 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 114 +char 1 97 +char 1 105 +char 1 110 +char 1 119 +char 1 105 +char 1 100 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $170 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 109 +char 1 112 +char 1 47 +char 1 100 +char 1 114 +char 1 97 +char 1 105 +char 1 110 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $167 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 119 +char 1 105 +char 1 100 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $164 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 47 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $161 +char 1 95 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $158 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 114 +char 1 114 +char 1 101 +char 1 108 +char 1 51 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $157 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 114 +char 1 114 +char 1 101 +char 1 108 +char 1 50 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $156 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 114 +char 1 114 +char 1 101 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $153 +char 1 95 +char 1 98 +char 1 97 +char 1 114 +char 1 114 +char 1 101 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $134 +char 1 67 +char 1 111 +char 1 117 +char 1 108 +char 1 100 +char 1 110 +char 1 39 +char 1 116 +char 1 32 +char 1 102 +char 1 105 +char 1 110 +char 1 100 +char 1 32 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 37 +char 1 105 +char 1 0 diff --git a/code/cgame/vm/cg_weapons.asm b/code/cgame/vm/cg_weapons.asm new file mode 100644 index 0000000..035e6d1 --- /dev/null +++ b/code/cgame/vm/cg_weapons.asm @@ -0,0 +1,12505 @@ +export CG_SetGhoul2InfoRef +code +proc CG_SetGhoul2InfoRef 16 0 +file "../cg_weapons.c" +line 16 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// cg_weapons.c -- events and effects dealing with weapons +;4:#include "cg_local.h" +;5:#include "fx_local.h" +;6: +;7:extern vec4_t bluehudtint; +;8:extern vec4_t redhudtint; +;9:extern float *hudTintColor; +;10: +;11:/* +;12:Ghoul2 Insert Start +;13:*/ +;14:// set up the appropriate ghoul2 info to a refent +;15:void CG_SetGhoul2InfoRef( refEntity_t *ent, refEntity_t *s1) +;16:{ +line 17 +;17: ent->ghoul2 = s1->ghoul2; +ADDRLP4 0 +CNSTI4 208 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRP4 +ASGNP4 +line 18 +;18: VectorCopy( s1->modelScale, ent->modelScale); +ADDRLP4 4 +CNSTI4 196 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRB +ASGNB 12 +line 19 +;19: ent->radius = s1->radius; +ADDRLP4 8 +CNSTI4 92 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +line 20 +;20: VectorCopy( s1->angles, ent->angles); +ADDRLP4 12 +CNSTI4 184 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRB +ASGNB 12 +line 21 +;21:} +LABELV $120 +endproc CG_SetGhoul2InfoRef 16 0 +export CG_RegisterItemVisuals +proc CG_RegisterItemVisuals 48 28 +line 34 +;22: +;23:/* +;24:Ghoul2 Insert End +;25:*/ +;26: +;27:/* +;28:================= +;29:CG_RegisterItemVisuals +;30: +;31:The server says this item is used on this level +;32:================= +;33:*/ +;34:void CG_RegisterItemVisuals( int itemNum ) { +line 39 +;35: itemInfo_t *itemInfo; +;36: gitem_t *item; +;37: int handle; +;38: +;39: if ( itemNum < 0 || itemNum >= bg_numItems ) { +ADDRLP4 12 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +LTI4 $124 +ADDRLP4 12 +INDIRI4 +ADDRGP4 bg_numItems +INDIRI4 +LTI4 $122 +LABELV $124 +line 40 +;40: CG_Error( "CG_RegisterItemVisuals: itemNum %d out of range [0-%d]", itemNum, bg_numItems-1 ); +ADDRGP4 $125 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 bg_numItems +INDIRI4 +CNSTI4 1 +SUBI4 +ARGI4 +ADDRGP4 CG_Error +CALLV +pop +line 41 +;41: } +LABELV $122 +line 43 +;42: +;43: itemInfo = &cg_items[ itemNum ]; +ADDRLP4 4 +CNSTI4 56 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_items +ADDP4 +ASGNP4 +line 44 +;44: if ( itemInfo->registered ) { +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 0 +EQI4 $126 +line 45 +;45: return; +ADDRGP4 $121 +JUMPV +LABELV $126 +line 48 +;46: } +;47: +;48: item = &bg_itemlist[ itemNum ]; +ADDRLP4 0 +CNSTI4 52 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 bg_itemlist +ADDP4 +ASGNP4 +line 50 +;49: +;50: memset( itemInfo, 0, sizeof( &itemInfo ) ); +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 51 +;51: itemInfo->registered = qtrue; +ADDRLP4 4 +INDIRP4 +CNSTI4 1 +ASGNI4 +line 53 +;52: +;53: if (item->giType == IT_TEAM && +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $128 +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 4 +EQI4 $131 +ADDRLP4 20 +INDIRI4 +CNSTI4 5 +NEI4 $128 +LABELV $131 +ADDRGP4 cgs+32960 +INDIRI4 +CNSTI4 8 +NEI4 $128 +line 56 +;54: (item->giTag == PW_REDFLAG || item->giTag == PW_BLUEFLAG) && +;55: cgs.gametype == GT_CTY) +;56: { //in CTY the flag model is different +line 57 +;57: itemInfo->models[0] = trap_R_RegisterModel( item->world_model[1] ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 24 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 58 +;58: } +ADDRGP4 $129 +JUMPV +LABELV $128 +line 59 +;59: else if (item->giType == IT_WEAPON && +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $132 +ADDRLP4 28 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 11 +EQI4 $135 +ADDRLP4 28 +INDIRI4 +CNSTI4 12 +EQI4 $135 +ADDRLP4 28 +INDIRI4 +CNSTI4 13 +NEI4 $132 +LABELV $135 +line 61 +;60: (item->giTag == WP_THERMAL || item->giTag == WP_TRIP_MINE || item->giTag == WP_DET_PACK)) +;61: { +line 62 +;62: itemInfo->models[0] = trap_R_RegisterModel( item->world_model[1] ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 32 +INDIRI4 +ASGNI4 +line 63 +;63: } +ADDRGP4 $133 +JUMPV +LABELV $132 +line 65 +;64: else +;65: { +line 66 +;66: itemInfo->models[0] = trap_R_RegisterModel( item->world_model[0] ); +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 32 +INDIRI4 +ASGNI4 +line 67 +;67: } +LABELV $133 +LABELV $129 +line 71 +;68:/* +;69:Ghoul2 Insert Start +;70:*/ +;71: if (!Q_stricmp(&item->world_model[0][strlen(item->world_model[0]) - 4], ".glm")) +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 4 +SUBI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +ADDP4 +ARGP4 +ADDRGP4 $138 +ARGP4 +ADDRLP4 36 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +NEI4 $136 +line 72 +;72: { +line 73 +;73: handle = trap_G2API_InitGhoul2Model(&itemInfo->g2Models[0], item->world_model[0], 0 , 0, 0, 0, 0); +ADDRLP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 40 +CNSTI4 0 +ASGNI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRLP4 44 +ADDRGP4 trap_G2API_InitGhoul2Model +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 74 +;74: if (handle<0) +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +GEI4 $139 +line 75 +;75: { +line 76 +;76: itemInfo->g2Models[0] = NULL; +ADDRLP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTP4 0 +ASGNP4 +line 77 +;77: } +ADDRGP4 $140 +JUMPV +LABELV $139 +line 79 +;78: else +;79: { +line 80 +;80: itemInfo->radius[0] = 60; +ADDRLP4 4 +INDIRP4 +CNSTI4 40 +ADDP4 +CNSTF4 1114636288 +ASGNF4 +line 81 +;81: } +LABELV $140 +line 82 +;82: } +LABELV $136 +line 86 +;83:/* +;84:Ghoul2 Insert End +;85:*/ +;86: if (item->icon) +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $141 +line 87 +;87: { +line 88 +;88: itemInfo->icon = trap_R_RegisterShader( item->icon ); +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 40 +INDIRI4 +ASGNI4 +line 89 +;89: } +ADDRGP4 $142 +JUMPV +LABELV $141 +line 91 +;90: else +;91: { +line 92 +;92: itemInfo->icon = 0; +ADDRLP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +CNSTI4 0 +ASGNI4 +line 93 +;93: } +LABELV $142 +line 95 +;94: +;95: if ( item->giType == IT_WEAPON ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $143 +line 96 +;96: CG_RegisterWeapon( item->giTag ); +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_RegisterWeapon +CALLV +pop +line 97 +;97: } +LABELV $143 +line 102 +;98: +;99: // +;100: // powerups have an accompanying ring or sphere +;101: // +;102: if ( item->giType == IT_POWERUP || item->giType == IT_HEALTH || +ADDRLP4 40 +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 5 +EQI4 $149 +ADDRLP4 40 +INDIRI4 +CNSTI4 4 +EQI4 $149 +ADDRLP4 40 +INDIRI4 +CNSTI4 3 +EQI4 $149 +ADDRLP4 40 +INDIRI4 +CNSTI4 6 +NEI4 $145 +LABELV $149 +line 103 +;103: item->giType == IT_ARMOR || item->giType == IT_HOLDABLE ) { +line 104 +;104: if ( item->world_model[1] ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $150 +line 105 +;105: itemInfo->models[1] = trap_R_RegisterModel( item->world_model[1] ); +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 44 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 106 +;106: } +LABELV $150 +line 107 +;107: } +LABELV $145 +line 108 +;108:} +LABELV $121 +endproc CG_RegisterItemVisuals 48 28 +data +align 4 +LABELV cgWeapFrame +byte 4 0 +align 4 +LABELV cgWeapFrameTime +byte 4 0 +code +proc CG_MapTorsoToWeaponFrame 40 0 +line 133 +;109: +;110: +;111:/* +;112:======================================================================================== +;113: +;114:VIEW WEAPON +;115: +;116:======================================================================================== +;117:*/ +;118: +;119:#define WEAPON_FORCE_BUSY_HOLSTER +;120: +;121:#ifdef WEAPON_FORCE_BUSY_HOLSTER +;122://rww - this was done as a last resort. Forgive me. +;123:static int cgWeapFrame = 0; +;124:static int cgWeapFrameTime = 0; +;125:#endif +;126: +;127:/* +;128:================= +;129:CG_MapTorsoToWeaponFrame +;130: +;131:================= +;132:*/ +;133:static int CG_MapTorsoToWeaponFrame( clientInfo_t *ci, int frame, int animNum ) { +line 134 +;134: animation_t *animations = bgGlobalAnimations; +ADDRLP4 0 +ADDRGP4 bgGlobalAnimations +ASGNP4 +line 136 +;135:#ifdef WEAPON_FORCE_BUSY_HOLSTER +;136: if (cg.snap->ps.forceHandExtend != HANDEXTEND_NONE || cgWeapFrameTime > cg.time) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1292 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $157 +ADDRGP4 cgWeapFrameTime +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +LEI4 $153 +LABELV $157 +line 137 +;137: { //the reason for the after delay is so that it doesn't snap the weapon frame to the "idle" (0) frame +line 139 +;138: //for a very quick moment +;139: if (cgWeapFrame < 6) +ADDRGP4 cgWeapFrame +INDIRI4 +CNSTI4 6 +GEI4 $158 +line 140 +;140: { +line 141 +;141: cgWeapFrame = 6; +ADDRGP4 cgWeapFrame +CNSTI4 6 +ASGNI4 +line 142 +;142: cgWeapFrameTime = cg.time + 10; +ADDRGP4 cgWeapFrameTime +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 10 +ADDI4 +ASGNI4 +line 143 +;143: } +LABELV $158 +line 145 +;144: +;145: if (cgWeapFrameTime < cg.time && cgWeapFrame < 10) +ADDRGP4 cgWeapFrameTime +INDIRI4 +ADDRGP4 cg+64 +INDIRI4 +GEI4 $161 +ADDRGP4 cgWeapFrame +INDIRI4 +CNSTI4 10 +GEI4 $161 +line 146 +;146: { +line 147 +;147: cgWeapFrame++; +ADDRLP4 4 +ADDRGP4 cgWeapFrame +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 148 +;148: cgWeapFrameTime = cg.time + 10; +ADDRGP4 cgWeapFrameTime +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 10 +ADDI4 +ASGNI4 +line 149 +;149: } +LABELV $161 +line 151 +;150: +;151: if (cg.snap->ps.forceHandExtend != HANDEXTEND_NONE && +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1292 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $165 +ADDRGP4 cgWeapFrame +INDIRI4 +CNSTI4 10 +NEI4 $165 +line 153 +;152: cgWeapFrame == 10) +;153: { +line 154 +;154: cgWeapFrameTime = cg.time + 100; +ADDRGP4 cgWeapFrameTime +ADDRGP4 cg+64 +INDIRI4 +CNSTI4 100 +ADDI4 +ASGNI4 +line 155 +;155: } +LABELV $165 +line 157 +;156: +;157: return cgWeapFrame; +ADDRGP4 cgWeapFrame +INDIRI4 +RETI4 +ADDRGP4 $152 +JUMPV +LABELV $153 +line 160 +;158: } +;159: else +;160: { +line 161 +;161: cgWeapFrame = 0; +ADDRGP4 cgWeapFrame +CNSTI4 0 +ASGNI4 +line 162 +;162: cgWeapFrameTime = 0; +ADDRGP4 cgWeapFrameTime +CNSTI4 0 +ASGNI4 +line 163 +;163: } +line 166 +;164:#endif +;165: +;166: switch( animNum ) +ADDRLP4 4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 8 +CNSTI4 1091 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $171 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +GTI4 $181 +LABELV $180 +ADDRLP4 12 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 117 +LTI4 $169 +ADDRLP4 12 +INDIRI4 +CNSTI4 137 +GTI4 $169 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $182-468 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $182 +address $177 +address $177 +address $169 +address $177 +address $177 +address $177 +address $177 +address $177 +address $177 +address $177 +address $177 +address $177 +address $177 +address $169 +address $169 +address $169 +address $169 +address $169 +address $169 +address $169 +address $177 +code +LABELV $181 +ADDRFP4 8 +INDIRI4 +CNSTI4 1095 +EQI4 $174 +ADDRGP4 $169 +JUMPV +line 167 +;167: { +LABELV $171 +line 169 +;168: case TORSO_DROPWEAP1: +;169: if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 5 ) +ADDRLP4 16 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 20 +CNSTI4 28 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +ADDRLP4 20 +INDIRI4 +LTI4 $170 +ADDRLP4 16 +INDIRI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 5 +ADDI4 +GEI4 $170 +line 170 +;170: { +line 171 +;171: return frame - animations[animNum].firstFrame + 6; +ADDRFP4 4 +INDIRI4 +CNSTI4 28 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 6 +ADDI4 +RETI4 +ADDRGP4 $152 +JUMPV +line 173 +;172: } +;173: break; +LABELV $174 +line 176 +;174: +;175: case TORSO_RAISEWEAP1: +;176: if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 4 ) +ADDRLP4 24 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 28 +CNSTI4 28 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ADDRLP4 28 +INDIRI4 +LTI4 $170 +ADDRLP4 24 +INDIRI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 4 +ADDI4 +GEI4 $170 +line 177 +;177: { +line 178 +;178: return frame - animations[animNum].firstFrame + 6 + 4; +ADDRFP4 4 +INDIRI4 +CNSTI4 28 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 6 +ADDI4 +CNSTI4 4 +ADDI4 +RETI4 +ADDRGP4 $152 +JUMPV +line 180 +;179: } +;180: break; +LABELV $177 +line 194 +;181: case BOTH_ATTACK1: +;182: case BOTH_ATTACK2: +;183: case BOTH_ATTACK3: +;184: case BOTH_ATTACK4: +;185: case BOTH_ATTACK5: +;186: case BOTH_ATTACK6: +;187: case BOTH_ATTACK7: +;188: case BOTH_ATTACK8: +;189: case BOTH_ATTACK9: +;190: case BOTH_ATTACK10: +;191: case BOTH_ATTACK11: +;192: case BOTH_ATTACK12: +;193: case BOTH_THERMAL_THROW: +;194: if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 6 ) +ADDRLP4 32 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 36 +CNSTI4 28 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +ADDRLP4 36 +INDIRI4 +LTI4 $170 +ADDRLP4 32 +INDIRI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 6 +ADDI4 +GEI4 $170 +line 195 +;195: { +line 196 +;196: return 1 + ( frame - animations[animNum].firstFrame ); +ADDRFP4 4 +INDIRI4 +CNSTI4 28 +ADDRFP4 8 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 1 +ADDI4 +RETI4 +ADDRGP4 $152 +JUMPV +line 199 +;197: } +;198: +;199: break; +LABELV $169 +LABELV $170 +line 201 +;200: } +;201: return -1; +CNSTI4 -1 +RETI4 +LABELV $152 +endproc CG_MapTorsoToWeaponFrame 40 0 +proc CG_CalculateWeaponPosition 40 4 +line 210 +;202:} +;203: +;204: +;205:/* +;206:============== +;207:CG_CalculateWeaponPosition +;208:============== +;209:*/ +;210:static void CG_CalculateWeaponPosition( vec3_t origin, vec3_t angles ) { +line 215 +;211: float scale; +;212: int delta; +;213: float fracsin; +;214: +;215: VectorCopy( cg.refdef.vieworg, origin ); +ADDRFP4 0 +INDIRP4 +ADDRGP4 cg+3616+24 +INDIRB +ASGNB 12 +line 216 +;216: VectorCopy( cg.refdefViewAngles, angles ); +ADDRFP4 4 +INDIRP4 +ADDRGP4 cg+3984 +INDIRB +ASGNB 12 +line 219 +;217: +;218: // on odd legs, invert some angles +;219: if ( cg.bobcycle & 1 ) { +ADDRGP4 cg+13468 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $188 +line 220 +;220: scale = -cg.xyspeed; +ADDRLP4 0 +ADDRGP4 cg+13472 +INDIRF4 +NEGF4 +ASGNF4 +line 221 +;221: } else { +ADDRGP4 $189 +JUMPV +LABELV $188 +line 222 +;222: scale = cg.xyspeed; +ADDRLP4 0 +ADDRGP4 cg+13472 +INDIRF4 +ASGNF4 +line 223 +;223: } +LABELV $189 +line 226 +;224: +;225: // gun angles from bobbing +;226: angles[ROLL] += scale * cg.bobfracsin * 0.005; +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +CNSTF4 1000593162 +ADDRLP4 0 +INDIRF4 +ADDRGP4 cg+13464 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 227 +;227: angles[YAW] += scale * cg.bobfracsin * 0.01; +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +CNSTF4 1008981770 +ADDRLP4 0 +INDIRF4 +ADDRGP4 cg+13464 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 228 +;228: angles[PITCH] += cg.xyspeed * cg.bobfracsin * 0.005; +ADDRLP4 20 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +CNSTF4 1000593162 +ADDRGP4 cg+13472 +INDIRF4 +ADDRGP4 cg+13464 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 231 +;229: +;230: // drop the weapon when landing +;231: delta = cg.time - cg.landTime; +ADDRLP4 8 +ADDRGP4 cg+64 +INDIRI4 +ADDRGP4 cg+3504 +INDIRI4 +SUBI4 +ASGNI4 +line 232 +;232: if ( delta < LAND_DEFLECT_TIME ) { +ADDRLP4 8 +INDIRI4 +CNSTI4 150 +GEI4 $199 +line 233 +;233: origin[2] += cg.landChange*0.25 * delta / LAND_DEFLECT_TIME; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +CNSTF4 1048576000 +ADDRGP4 cg+3500 +INDIRF4 +MULF4 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +MULF4 +CNSTF4 1125515264 +DIVF4 +ADDF4 +ASGNF4 +line 234 +;234: } else if ( delta < LAND_DEFLECT_TIME + LAND_RETURN_TIME ) { +ADDRGP4 $200 +JUMPV +LABELV $199 +ADDRLP4 8 +INDIRI4 +CNSTI4 450 +GEI4 $202 +line 235 +;235: origin[2] += cg.landChange*0.25 * +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +CNSTF4 1048576000 +ADDRGP4 cg+3500 +INDIRF4 +MULF4 +CNSTI4 450 +ADDRLP4 8 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +CNSTF4 1133903872 +DIVF4 +ADDF4 +ASGNF4 +line 237 +;236: (LAND_DEFLECT_TIME + LAND_RETURN_TIME - delta) / LAND_RETURN_TIME; +;237: } +LABELV $202 +LABELV $200 +line 250 +;238: +;239:#if 0 +;240: // drop the weapon when stair climbing +;241: delta = cg.time - cg.stepTime; +;242: if ( delta < STEP_TIME/2 ) { +;243: origin[2] -= cg.stepChange*0.25 * delta / (STEP_TIME/2); +;244: } else if ( delta < STEP_TIME ) { +;245: origin[2] -= cg.stepChange*0.25 * (STEP_TIME - delta) / (STEP_TIME/2); +;246: } +;247:#endif +;248: +;249: // idle drift +;250: scale = cg.xyspeed + 40; +ADDRLP4 0 +ADDRGP4 cg+13472 +INDIRF4 +CNSTF4 1109393408 +ADDF4 +ASGNF4 +line 251 +;251: fracsin = sin( cg.time * 0.001 ); +CNSTF4 981668463 +ADDRGP4 cg+64 +INDIRI4 +CVIF4 4 +MULF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 252 +;252: angles[ROLL] += scale * fracsin * 0.01; +ADDRLP4 28 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +CNSTF4 1008981770 +ADDRLP4 0 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 253 +;253: angles[YAW] += scale * fracsin * 0.01; +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +CNSTF4 1008981770 +ADDRLP4 0 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 254 +;254: angles[PITCH] += scale * fracsin * 0.01; +ADDRLP4 36 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +CNSTF4 1008981770 +ADDRLP4 0 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +MULF4 +ADDF4 +ASGNF4 +line 255 +;255:} +LABELV $184 +endproc CG_CalculateWeaponPosition 40 4 +proc CG_LightningBolt 220 12 +line 269 +;256: +;257: +;258:/* +;259:=============== +;260:CG_LightningBolt +;261: +;262:Origin will be the exact tag point, which is slightly +;263:different than the muzzle point used for determining hits. +;264:The cent should be the non-predicted cent if it is from the player, +;265:so the endpoint will reflect the simulated strike (lagging the predicted +;266:angle) +;267:=============== +;268:*/ +;269:static void CG_LightningBolt( centity_t *cent, vec3_t origin ) { +line 276 +;270:// trace_t trace; +;271: refEntity_t beam; +;272:// vec3_t forward; +;273:// vec3_t muzzlePoint, endPoint; +;274: +;275: //Must be a durational weapon that continuously generates an effect. +;276: if ( cent->currentState.weapon == WP_DEMP2 && cent->currentState.eFlags & EF_ALT_FIRING ) +ADDRLP4 212 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 216 +CNSTI4 8 +ASGNI4 +ADDRLP4 212 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ADDRLP4 216 +INDIRI4 +NEI4 $207 +ADDRLP4 212 +INDIRP4 +ADDRLP4 216 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $207 +line 277 +;277: { /*nothing*/ } +line 279 +;278: else +;279: { +line 280 +;280: return; +LABELV $209 +line 283 +;281: } +;282: +;283: memset( &beam, 0, sizeof( beam ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 366 +;284: +;285: // NOTENOTE No lightning gun-ish stuff yet. +;286:/* +;287: // CPMA "true" lightning +;288: if ((cent->currentState.number == cg.predictedPlayerState.clientNum) && (cg_trueLightning.value != 0)) { +;289: vec3_t angle; +;290: int i; +;291: +;292: for (i = 0; i < 3; i++) { +;293: float a = cent->lerpAngles[i] - cg.refdefViewAngles[i]; +;294: if (a > 180) { +;295: a -= 360; +;296: } +;297: if (a < -180) { +;298: a += 360; +;299: } +;300: +;301: angle[i] = cg.refdefViewAngles[i] + a * (1.0 - cg_trueLightning.value); +;302: if (angle[i] < 0) { +;303: angle[i] += 360; +;304: } +;305: if (angle[i] > 360) { +;306: angle[i] -= 360; +;307: } +;308: } +;309: +;310: AngleVectors(angle, forward, NULL, NULL ); +;311: VectorCopy(cent->lerpOrigin, muzzlePoint ); +;312:// VectorCopy(cg.refdef.vieworg, muzzlePoint ); +;313: } else { +;314: // !CPMA +;315: AngleVectors( cent->lerpAngles, forward, NULL, NULL ); +;316: VectorCopy(cent->lerpOrigin, muzzlePoint ); +;317: } +;318: +;319: // FIXME: crouch +;320: muzzlePoint[2] += DEFAULT_VIEWHEIGHT; +;321: +;322: VectorMA( muzzlePoint, 14, forward, muzzlePoint ); +;323: +;324: // project forward by the lightning range +;325: VectorMA( muzzlePoint, LIGHTNING_RANGE, forward, endPoint ); +;326: +;327: // see if it hit a wall +;328: CG_Trace( &trace, muzzlePoint, vec3_origin, vec3_origin, endPoint, +;329: cent->currentState.number, MASK_SHOT ); +;330: +;331: // this is the endpoint +;332: VectorCopy( trace.endpos, beam.oldorigin ); +;333: +;334: // use the provided origin, even though it may be slightly +;335: // different than the muzzle origin +;336: VectorCopy( origin, beam.origin ); +;337: +;338: beam.reType = RT_LIGHTNING; +;339: beam.customShader = cgs.media.lightningShader; +;340: trap_R_AddRefEntityToScene( &beam ); +;341:*/ +;342: +;343: // NOTENOTE No lightning gun-ish stuff yet. +;344:/* +;345: // add the impact flare if it hit something +;346: if ( trace.fraction < 1.0 ) { +;347: vec3_t angles; +;348: vec3_t dir; +;349: +;350: VectorSubtract( beam.oldorigin, beam.origin, dir ); +;351: VectorNormalize( dir ); +;352: +;353: memset( &beam, 0, sizeof( beam ) ); +;354: beam.hModel = cgs.media.lightningExplosionModel; +;355: +;356: VectorMA( trace.endpos, -16, dir, beam.origin ); +;357: +;358: // make a random orientation +;359: angles[0] = rand() % 360; +;360: angles[1] = rand() % 360; +;361: angles[2] = rand() % 360; +;362: AnglesToAxis( angles, beam.axis ); +;363: trap_R_AddRefEntityToScene( &beam ); +;364: } +;365:*/ +;366:} +LABELV $207 +endproc CG_LightningBolt 220 12 +proc CG_AddWeaponWithPowerups 0 4 +line 374 +;367: +;368: +;369:/* +;370:======================== +;371:CG_AddWeaponWithPowerups +;372:======================== +;373:*/ +;374:static void CG_AddWeaponWithPowerups( refEntity_t *gun, int powerups ) { +line 376 +;375: // add powerup effects +;376: trap_R_AddRefEntityToScene( gun ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 378 +;377: +;378: if ( powerups & ( 1 << PW_BATTLESUIT ) ) { +ADDRFP4 4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $211 +line 379 +;379: gun->customShader = cgs.media.battleWeaponShader; +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRGP4 cgs+70296+472 +INDIRI4 +ASGNI4 +line 380 +;380: trap_R_AddRefEntityToScene( gun ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 381 +;381: } +LABELV $211 +line 382 +;382: if ( powerups & ( 1 << PW_QUAD ) ) { +ADDRFP4 4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $215 +line 383 +;383: gun->customShader = cgs.media.quadWeaponShader; +ADDRFP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRGP4 cgs+70296+456 +INDIRI4 +ASGNI4 +line 384 +;384: trap_R_AddRefEntityToScene( gun ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 trap_R_AddRefEntityToScene +CALLV +pop +line 385 +;385: } +LABELV $215 +line 386 +;386:} +LABELV $210 +endproc CG_AddWeaponWithPowerups 0 4 +export CG_AddPlayerWeapon +proc CG_AddPlayerWeapon 972 36 +line 398 +;387: +;388: +;389:/* +;390:============= +;391:CG_AddPlayerWeapon +;392: +;393:Used for both the view weapon (ps is valid) and the world modelother character models (ps is NULL) +;394:The main player will have this called for BOTH cases, so effects like light and +;395:sound should only be done on the world model case. +;396:============= +;397:*/ +;398:void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent, int team, vec3_t newAngles, qboolean thirdPerson ) { +line 407 +;399: refEntity_t gun; +;400: refEntity_t barrel; +;401: vec3_t angles; +;402: weapon_t weaponNum; +;403: weaponInfo_t *weapon; +;404: centity_t *nonPredictedCent; +;405: refEntity_t flash; +;406: +;407: weaponNum = cent->currentState.weapon; +ADDRLP4 440 +ADDRFP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ASGNI4 +line 409 +;408: +;409: if (cent->currentState.weapon == WP_EMPLACED_GUN) +ADDRFP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $220 +line 410 +;410: { +line 411 +;411: return; +ADDRGP4 $219 +JUMPV +LABELV $220 +line 414 +;412: } +;413: +;414: CG_RegisterWeapon( weaponNum ); +ADDRLP4 440 +INDIRI4 +ARGI4 +ADDRGP4 CG_RegisterWeapon +CALLV +pop +line 415 +;415: weapon = &cg_weapons[weaponNum]; +ADDRLP4 436 +CNSTI4 208 +ADDRLP4 440 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons +ADDP4 +ASGNP4 +line 420 +;416:/* +;417:Ghoul2 Insert Start +;418:*/ +;419: +;420: memset( &gun, 0, sizeof( gun ) ); +ADDRLP4 224 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 423 +;421: +;422: // only do this if we are in first person, since world weapons are now handled on the server by Ghoul2 +;423: if (!thirdPerson) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $222 +line 424 +;424: { +line 427 +;425: +;426: // add the weapon +;427: VectorCopy( parent->lightingOrigin, gun.lightingOrigin ); +ADDRLP4 224+108 +ADDRFP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRB +ASGNB 12 +line 428 +;428: gun.shadowPlane = parent->shadowPlane; +ADDRLP4 224+120 +ADDRFP4 0 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRF4 +ASGNF4 +line 429 +;429: gun.renderfx = parent->renderfx; +ADDRLP4 224+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 431 +;430: +;431: if (ps) +ADDRFP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $227 +line 432 +;432: { // this player, in first person view +line 433 +;433: gun.hModel = weapon->viewModel; +ADDRLP4 224+8 +ADDRLP4 436 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ASGNI4 +line 434 +;434: } +ADDRGP4 $228 +JUMPV +LABELV $227 +line 436 +;435: else +;436: { +line 437 +;437: gun.hModel = weapon->weaponModel; +ADDRLP4 224+8 +ADDRLP4 436 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 438 +;438: } +LABELV $228 +line 439 +;439: if (!gun.hModel) { +ADDRLP4 224+8 +INDIRI4 +CNSTI4 0 +NEI4 $231 +line 440 +;440: return; +ADDRGP4 $219 +JUMPV +LABELV $231 +line 443 +;441: } +;442: +;443: if ( !ps ) { +ADDRFP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $234 +line 445 +;444: // add weapon ready sound +;445: cent->pe.lightningFiring = qfalse; +ADDRFP4 8 +INDIRP4 +CNSTI4 844 +ADDP4 +CNSTI4 0 +ASGNI4 +line 446 +;446: if ( ( cent->currentState.eFlags & EF_FIRING ) && weapon->firingSound ) { +ADDRLP4 660 +CNSTI4 0 +ASGNI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +ADDRLP4 660 +INDIRI4 +EQI4 $236 +ADDRLP4 436 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +ADDRLP4 660 +INDIRI4 +EQI4 $236 +line 448 +;447: // lightning gun and guantlet make a different sound when fire is held down +;448: trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, weapon->firingSound ); +ADDRLP4 664 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 664 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 664 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 436 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddLoopingSound +CALLV +pop +line 449 +;449: cent->pe.lightningFiring = qtrue; +ADDRFP4 8 +INDIRP4 +CNSTI4 844 +ADDP4 +CNSTI4 1 +ASGNI4 +line 450 +;450: } else if ( weapon->readySound ) { +ADDRGP4 $237 +JUMPV +LABELV $236 +ADDRLP4 436 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $238 +line 451 +;451: trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, weapon->readySound ); +ADDRLP4 664 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 664 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 664 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 vec3_origin +ARGP4 +ADDRLP4 436 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_AddLoopingSound +CALLV +pop +line 452 +;452: } +LABELV $238 +LABELV $237 +line 453 +;453: } +LABELV $234 +line 455 +;454: +;455: CG_PositionEntityOnTag( &gun, parent, parent->hModel, "tag_weapon"); +ADDRLP4 224 +ARGP4 +ADDRLP4 660 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 660 +INDIRP4 +ARGP4 +ADDRLP4 660 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 $240 +ARGP4 +ADDRGP4 CG_PositionEntityOnTag +CALLV +pop +line 457 +;456: +;457: if (!CG_IsMindTricked(cent->currentState.trickedentindex, +ADDRLP4 664 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 664 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 664 +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 664 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 664 +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 668 +ADDRGP4 CG_IsMindTricked +CALLI4 +ASGNI4 +ADDRLP4 668 +INDIRI4 +CNSTI4 0 +NEI4 $241 +line 462 +;458: cent->currentState.trickedentindex2, +;459: cent->currentState.trickedentindex3, +;460: cent->currentState.trickedentindex4, +;461: cg.snap->ps.clientNum)) +;462: { +line 463 +;463: CG_AddWeaponWithPowerups( &gun, cent->currentState.powerups ); //don't draw the weapon if the player is invisible +ADDRLP4 224 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddWeaponWithPowerups +CALLV +pop +line 474 +;464: /* +;465: if ( weaponNum == WP_STUN_BATON ) +;466: { +;467: gun.shaderRGBA[0] = gun.shaderRGBA[1] = gun.shaderRGBA[2] = 25; +;468: +;469: gun.customShader = trap_R_RegisterShader( "gfx/effects/stunPass" ); +;470: gun.renderfx = RF_RGB_TINT | RF_FIRST_PERSON | RF_DEPTHHACK; +;471: trap_R_AddRefEntityToScene( &gun ); +;472: } +;473: */ +;474: } +LABELV $241 +line 476 +;475: +;476: if (weaponNum == WP_STUN_BATON) +ADDRLP4 440 +INDIRI4 +CNSTI4 1 +NEI4 $244 +line 477 +;477: { +line 478 +;478: int i = 0; +ADDRLP4 672 +CNSTI4 0 +ASGNI4 +ADDRGP4 $247 +JUMPV +LABELV $246 +line 481 +;479: +;480: while (i < 3) +;481: { +line 482 +;482: memset( &barrel, 0, sizeof( barrel ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 483 +;483: VectorCopy( parent->lightingOrigin, barrel.lightingOrigin ); +ADDRLP4 0+108 +ADDRFP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRB +ASGNB 12 +line 484 +;484: barrel.shadowPlane = parent->shadowPlane; +ADDRLP4 0+120 +ADDRFP4 0 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRF4 +ASGNF4 +line 485 +;485: barrel.renderfx = parent->renderfx; +ADDRLP4 0+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 487 +;486: +;487: if (i == 0) +ADDRLP4 672 +INDIRI4 +CNSTI4 0 +NEI4 $252 +line 488 +;488: { +line 489 +;489: barrel.hModel = trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel.md3"); +ADDRGP4 $255 +ARGP4 +ADDRLP4 676 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 0+8 +ADDRLP4 676 +INDIRI4 +ASGNI4 +line 490 +;490: } +ADDRGP4 $253 +JUMPV +LABELV $252 +line 491 +;491: else if (i == 1) +ADDRLP4 672 +INDIRI4 +CNSTI4 1 +NEI4 $256 +line 492 +;492: { +line 493 +;493: barrel.hModel = trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel2.md3"); +ADDRGP4 $259 +ARGP4 +ADDRLP4 676 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 0+8 +ADDRLP4 676 +INDIRI4 +ASGNI4 +line 494 +;494: } +ADDRGP4 $257 +JUMPV +LABELV $256 +line 496 +;495: else +;496: { +line 497 +;497: barrel.hModel = trap_R_RegisterModel("models/weapons2/stun_baton/baton_barrel3.md3"); +ADDRGP4 $261 +ARGP4 +ADDRLP4 676 +ADDRGP4 trap_R_RegisterModel +CALLI4 +ASGNI4 +ADDRLP4 0+8 +ADDRLP4 676 +INDIRI4 +ASGNI4 +line 498 +;498: } +LABELV $257 +LABELV $253 +line 499 +;499: angles[YAW] = 0; +ADDRLP4 212+4 +CNSTF4 0 +ASGNF4 +line 500 +;500: angles[PITCH] = 0; +ADDRLP4 212 +CNSTF4 0 +ASGNF4 +line 501 +;501: angles[ROLL] = 0; +ADDRLP4 212+8 +CNSTF4 0 +ASGNF4 +line 503 +;502: +;503: AnglesToAxis( angles, barrel.axis ); +ADDRLP4 212 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 505 +;504: +;505: if (i == 0) +ADDRLP4 672 +INDIRI4 +CNSTI4 0 +NEI4 $265 +line 506 +;506: { +line 507 +;507: CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel" ); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 436 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 $267 +ARGP4 +ADDRGP4 CG_PositionRotatedEntityOnTag +CALLV +pop +line 508 +;508: } +ADDRGP4 $266 +JUMPV +LABELV $265 +line 509 +;509: else if (i == 1) +ADDRLP4 672 +INDIRI4 +CNSTI4 1 +NEI4 $268 +line 510 +;510: { +line 511 +;511: CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel2" ); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 436 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 $270 +ARGP4 +ADDRGP4 CG_PositionRotatedEntityOnTag +CALLV +pop +line 512 +;512: } +ADDRGP4 $269 +JUMPV +LABELV $268 +line 514 +;513: else +;514: { +line 515 +;515: CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel3" ); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 436 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 $271 +ARGP4 +ADDRGP4 CG_PositionRotatedEntityOnTag +CALLV +pop +line 516 +;516: } +LABELV $269 +LABELV $266 +line 517 +;517: CG_AddWeaponWithPowerups( &barrel, cent->currentState.powerups ); +ADDRLP4 0 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddWeaponWithPowerups +CALLV +pop +line 519 +;518: +;519: i++; +ADDRLP4 672 +ADDRLP4 672 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 520 +;520: } +LABELV $247 +line 480 +ADDRLP4 672 +INDIRI4 +CNSTI4 3 +LTI4 $246 +line 521 +;521: } +ADDRGP4 $245 +JUMPV +LABELV $244 +line 523 +;522: else +;523: { +line 525 +;524: // add the spinning barrel +;525: if ( weapon->barrelModel ) { +ADDRLP4 436 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $272 +line 526 +;526: memset( &barrel, 0, sizeof( barrel ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 527 +;527: VectorCopy( parent->lightingOrigin, barrel.lightingOrigin ); +ADDRLP4 0+108 +ADDRFP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRB +ASGNB 12 +line 528 +;528: barrel.shadowPlane = parent->shadowPlane; +ADDRLP4 0+120 +ADDRFP4 0 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRF4 +ASGNF4 +line 529 +;529: barrel.renderfx = parent->renderfx; +ADDRLP4 0+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 531 +;530: +;531: barrel.hModel = weapon->barrelModel; +ADDRLP4 0+8 +ADDRLP4 436 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ASGNI4 +line 532 +;532: angles[YAW] = 0; +ADDRLP4 212+4 +CNSTF4 0 +ASGNF4 +line 533 +;533: angles[PITCH] = 0; +ADDRLP4 212 +CNSTF4 0 +ASGNF4 +line 534 +;534: angles[ROLL] = 0; +ADDRLP4 212+8 +CNSTF4 0 +ASGNF4 +line 536 +;535: +;536: AnglesToAxis( angles, barrel.axis ); +ADDRLP4 212 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 538 +;537: +;538: CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel" ); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 436 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 $267 +ARGP4 +ADDRGP4 CG_PositionRotatedEntityOnTag +CALLV +pop +line 540 +;539: +;540: CG_AddWeaponWithPowerups( &barrel, cent->currentState.powerups ); +ADDRLP4 0 +ARGP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_AddWeaponWithPowerups +CALLV +pop +line 541 +;541: } +LABELV $272 +line 542 +;542: } +LABELV $245 +line 543 +;543: } +LABELV $222 +line 548 +;544:/* +;545:Ghoul2 Insert End +;546:*/ +;547: +;548: memset (&flash, 0, sizeof(flash)); +ADDRLP4 444 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 549 +;549: CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash"); +ADDRLP4 444 +ARGP4 +ADDRLP4 224 +ARGP4 +ADDRLP4 224+8 +INDIRI4 +ARGI4 +ADDRGP4 $282 +ARGP4 +ADDRGP4 CG_PositionEntityOnTag +CALLV +pop +line 551 +;550: +;551: VectorCopy(flash.origin, cg.lastFPFlashPoint); +ADDRGP4 cg+13796 +ADDRLP4 444+52 +INDIRB +ASGNB 12 +line 555 +;552: +;553: // Do special charge bits +;554: //----------------------- +;555: if ( (ps || cg.renderingThirdPerson || cg.predictedPlayerState.clientNum != cent->currentState.number) && +ADDRFP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $291 +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $291 +ADDRGP4 cg+96+144 +INDIRI4 +ADDRFP4 8 +INDIRP4 +INDIRI4 +EQI4 $285 +LABELV $291 +ADDRLP4 660 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 660 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $293 +ADDRLP4 660 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 3 +EQI4 $294 +LABELV $293 +ADDRLP4 664 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 664 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $295 +ADDRLP4 664 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 4 +EQI4 $294 +LABELV $295 +ADDRLP4 668 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 668 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $285 +ADDRLP4 668 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $285 +LABELV $294 +line 559 +;556: ( ( cent->currentState.modelindex2 == WEAPON_CHARGING_ALT && cent->currentState.weapon == WP_BRYAR_PISTOL ) || +;557: ( cent->currentState.weapon == WP_BOWCASTER && cent->currentState.modelindex2 == WEAPON_CHARGING ) || +;558: ( cent->currentState.weapon == WP_DEMP2 && cent->currentState.modelindex2 == WEAPON_CHARGING_ALT) ) ) +;559: { +line 560 +;560: int shader = 0; +ADDRLP4 748 +CNSTI4 0 +ASGNI4 +line 561 +;561: float val = 0.0f; +ADDRLP4 744 +CNSTF4 0 +ASGNF4 +line 562 +;562: float scale = 1.0f; +ADDRLP4 752 +CNSTF4 1065353216 +ASGNF4 +line 566 +;563: addspriteArgStruct_t fxSArgs; +;564: vec3_t flashorigin, flashdir; +;565: +;566: if (!thirdPerson) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $296 +line 567 +;567: { +line 568 +;568: VectorCopy(flash.origin, flashorigin); +ADDRLP4 756 +ADDRLP4 444+52 +INDIRB +ASGNB 12 +line 569 +;569: VectorCopy(flash.axis[0], flashdir); +ADDRLP4 768 +ADDRLP4 444+12 +INDIRB +ASGNB 12 +line 570 +;570: } +ADDRGP4 $297 +JUMPV +LABELV $296 +line 572 +;571: else +;572: { +line 575 +;573: mdxaBone_t boltMatrix; +;574: +;575: if (!trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) +ADDRFP4 8 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 828 +ADDRGP4 trap_G2API_HasGhoul2ModelOnIndex +CALLI4 +ASGNI4 +ADDRLP4 828 +INDIRI4 +CNSTI4 0 +NEI4 $300 +line 576 +;576: { //it's quite possible that we may have have no weapon model and be in a valid state, so return here if this is the case +line 577 +;577: return; +ADDRGP4 $219 +JUMPV +LABELV $300 +line 581 +;578: } +;579: +;580: // go away and get me the bolt position for this frame please +;581: if (!(trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, newAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale))) +ADDRLP4 832 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 832 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 780 +ARGP4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRLP4 832 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 832 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRLP4 836 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +ASGNI4 +ADDRLP4 836 +INDIRI4 +CNSTI4 0 +NEI4 $302 +line 582 +;582: { // Couldn't find bolt point. +line 583 +;583: return; +ADDRGP4 $219 +JUMPV +LABELV $302 +line 586 +;584: } +;585: +;586: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); +ADDRLP4 780 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 756 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 587 +;587: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); +ADDRLP4 780 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 768 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 588 +;588: } +LABELV $297 +line 590 +;589: +;590: if ( cent->currentState.weapon == WP_BRYAR_PISTOL ) +ADDRFP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $306 +line 591 +;591: { +line 593 +;592: // Hardcoded max charge time of 1 second +;593: val = ( cg.time - cent->currentState.constantLight ) * 0.001f; +ADDRLP4 744 +CNSTF4 981668463 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 594 +;594: shader = cgs.media.bryarFrontFlash; +ADDRLP4 748 +ADDRGP4 cgs+70296+20 +INDIRI4 +ASGNI4 +line 595 +;595: } +ADDRGP4 $307 +JUMPV +LABELV $306 +line 596 +;596: else if ( cent->currentState.weapon == WP_BOWCASTER ) +ADDRFP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $311 +line 597 +;597: { +line 599 +;598: // Hardcoded max charge time of 1 second +;599: val = ( cg.time - cent->currentState.constantLight ) * 0.001f; +ADDRLP4 744 +CNSTF4 981668463 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 600 +;600: shader = cgs.media.greenFrontFlash; +ADDRLP4 748 +ADDRGP4 cgs+70296+24 +INDIRI4 +ASGNI4 +line 601 +;601: } +ADDRGP4 $312 +JUMPV +LABELV $311 +line 602 +;602: else if ( cent->currentState.weapon == WP_DEMP2 ) +ADDRFP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $316 +line 603 +;603: { +line 604 +;604: val = ( cg.time - cent->currentState.constantLight ) * 0.001f; +ADDRLP4 744 +CNSTF4 981668463 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 605 +;605: shader = cgs.media.lightningFlash; +ADDRLP4 748 +ADDRGP4 cgs+70296+28 +INDIRI4 +ASGNI4 +line 606 +;606: scale = 1.75f; +ADDRLP4 752 +CNSTF4 1071644672 +ASGNF4 +line 607 +;607: } +LABELV $316 +LABELV $312 +LABELV $307 +line 609 +;608: +;609: if ( val < 0.0f ) +ADDRLP4 744 +INDIRF4 +CNSTF4 0 +GEF4 $321 +line 610 +;610: { +line 611 +;611: val = 0.0f; +ADDRLP4 744 +CNSTF4 0 +ASGNF4 +line 612 +;612: } +ADDRGP4 $322 +JUMPV +LABELV $321 +line 613 +;613: else if ( val > 1.0f ) +ADDRLP4 744 +INDIRF4 +CNSTF4 1065353216 +LEF4 $323 +line 614 +;614: { +line 615 +;615: val = 1.0f; +ADDRLP4 744 +CNSTF4 1065353216 +ASGNF4 +line 616 +;616: if (ps && cent->currentState.number == ps->clientNum) +ADDRLP4 780 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 780 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $324 +ADDRFP4 8 +INDIRP4 +INDIRI4 +ADDRLP4 780 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +NEI4 $324 +line 617 +;617: { +line 618 +;618: CGCam_Shake( /*0.1f*/0.2f, 100 ); +CNSTF4 1045220557 +ARGF4 +CNSTI4 100 +ARGI4 +ADDRGP4 CGCam_Shake +CALLV +pop +line 619 +;619: } +line 620 +;620: } +ADDRGP4 $324 +JUMPV +LABELV $323 +line 622 +;621: else +;622: { +line 623 +;623: if (ps && cent->currentState.number == ps->clientNum) +ADDRLP4 780 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 780 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $327 +ADDRFP4 8 +INDIRP4 +INDIRI4 +ADDRLP4 780 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +NEI4 $327 +line 624 +;624: { +line 625 +;625: CGCam_Shake( val * val * /*0.3f*/0.6f, 100 ); +CNSTF4 1058642330 +ADDRLP4 744 +INDIRF4 +ADDRLP4 744 +INDIRF4 +MULF4 +MULF4 +ARGF4 +CNSTI4 100 +ARGI4 +ADDRGP4 CGCam_Shake +CALLV +pop +line 626 +;626: } +LABELV $327 +line 627 +;627: } +LABELV $324 +LABELV $322 +line 629 +;628: +;629: val += random() * 0.5f; +ADDRLP4 780 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 744 +ADDRLP4 744 +INDIRF4 +CNSTF4 1056964608 +ADDRLP4 780 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ADDF4 +ASGNF4 +line 631 +;630: +;631: VectorCopy(flashorigin, fxSArgs.origin); +ADDRLP4 672 +ADDRLP4 756 +INDIRB +ASGNB 12 +line 632 +;632: VectorClear(fxSArgs.vel); +ADDRLP4 784 +CNSTF4 0 +ASGNF4 +ADDRLP4 672+12+8 +ADDRLP4 784 +INDIRF4 +ASGNF4 +ADDRLP4 672+12+4 +ADDRLP4 784 +INDIRF4 +ASGNF4 +ADDRLP4 672+12 +ADDRLP4 784 +INDIRF4 +ASGNF4 +line 633 +;633: VectorClear(fxSArgs.accel); +ADDRLP4 788 +CNSTF4 0 +ASGNF4 +ADDRLP4 672+24+8 +ADDRLP4 788 +INDIRF4 +ASGNF4 +ADDRLP4 672+24+4 +ADDRLP4 788 +INDIRF4 +ASGNF4 +ADDRLP4 672+24 +ADDRLP4 788 +INDIRF4 +ASGNF4 +line 634 +;634: fxSArgs.scale = 3.0f*val*scale; +ADDRLP4 672+36 +CNSTF4 1077936128 +ADDRLP4 744 +INDIRF4 +MULF4 +ADDRLP4 752 +INDIRF4 +MULF4 +ASGNF4 +line 635 +;635: fxSArgs.dscale = 0.0f; +ADDRLP4 672+40 +CNSTF4 0 +ASGNF4 +line 636 +;636: fxSArgs.sAlpha = 0.7f; +ADDRLP4 672+44 +CNSTF4 1060320051 +ASGNF4 +line 637 +;637: fxSArgs.eAlpha = 0.7f; +ADDRLP4 672+48 +CNSTF4 1060320051 +ASGNF4 +line 638 +;638: fxSArgs.rotation = random()*360; +ADDRLP4 792 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 672+52 +CNSTF4 1135869952 +ADDRLP4 792 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +MULF4 +ASGNF4 +line 639 +;639: fxSArgs.bounce = 0.0f; +ADDRLP4 672+56 +CNSTF4 0 +ASGNF4 +line 640 +;640: fxSArgs.life = 1.0f; +ADDRLP4 672+60 +CNSTI4 1 +ASGNI4 +line 641 +;641: fxSArgs.shader = shader; +ADDRLP4 672+64 +ADDRLP4 748 +INDIRI4 +ASGNI4 +line 642 +;642: fxSArgs.flags = 0x08000000; +ADDRLP4 672+68 +CNSTI4 134217728 +ASGNI4 +line 645 +;643: +;644: //FX_AddSprite( flash.origin, NULL, NULL, 3.0f * val, 0.0f, 0.7f, 0.7f, WHITE, WHITE, random() * 360, 0.0f, 1.0f, shader, FX_USE_ALPHA ); +;645: trap_FX_AddSprite(&fxSArgs); +ADDRLP4 672 +ARGP4 +ADDRGP4 trap_FX_AddSprite +CALLV +pop +line 646 +;646: } +LABELV $285 +line 649 +;647: +;648: // make sure we aren't looking at cg.predictedPlayerEntity for LG +;649: nonPredictedCent = &cg_entities[cent->currentState.clientNum]; +ADDRLP4 656 +CNSTI4 1920 +ADDRFP4 8 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 654 +;650: +;651: // if the index of the nonPredictedCent is not the same as the clientNum +;652: // then this is a fake player (like on teh single player podiums), so +;653: // go ahead and use the cent +;654: if( ( nonPredictedCent - cg_entities ) != cent->currentState.clientNum ) { +ADDRLP4 656 +INDIRP4 +CVPU4 4 +ADDRGP4 cg_entities +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 1920 +DIVI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +EQI4 $348 +line 655 +;655: nonPredictedCent = cent; +ADDRLP4 656 +ADDRFP4 8 +INDIRP4 +ASGNP4 +line 656 +;656: } +LABELV $348 +line 659 +;657: +;658: // add the flash +;659: if ( ( weaponNum == WP_DEMP2) +ADDRLP4 672 +CNSTI4 8 +ASGNI4 +ADDRLP4 440 +INDIRI4 +ADDRLP4 672 +INDIRI4 +NEI4 $350 +ADDRLP4 656 +INDIRP4 +ADDRLP4 672 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $350 +line 661 +;660: && ( nonPredictedCent->currentState.eFlags & EF_FIRING ) ) +;661: { +line 663 +;662: // continuous flash +;663: } else { +ADDRGP4 $351 +JUMPV +LABELV $350 +line 665 +;664: // impulse flash +;665: if ( cg.time - cent->muzzleFlashTime > MUZZLE_FLASH_TIME) { +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 600 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 20 +LEI4 $352 +line 666 +;666: return; +ADDRGP4 $219 +JUMPV +LABELV $352 +line 668 +;667: } +;668: } +LABELV $351 +line 670 +;669: +;670: if ( ps || cg.renderingThirdPerson || +ADDRFP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $361 +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +NEI4 $361 +ADDRFP4 8 +INDIRP4 +INDIRI4 +ADDRGP4 cg+96+144 +INDIRI4 +EQI4 $355 +LABELV $361 +line 672 +;671: cent->currentState.number != cg.predictedPlayerState.clientNum ) +;672: { // Make sure we don't do the thirdperson model effects for the local player if we're in first person +line 676 +;673: vec3_t flashorigin, flashdir; +;674: refEntity_t flash; +;675: +;676: memset (&flash, 0, sizeof(flash)); +ADDRLP4 676 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 678 +;677: +;678: if (!thirdPerson) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $362 +line 679 +;679: { +line 680 +;680: CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash"); +ADDRLP4 676 +ARGP4 +ADDRLP4 224 +ARGP4 +ADDRLP4 224+8 +INDIRI4 +ARGI4 +ADDRGP4 $282 +ARGP4 +ADDRGP4 CG_PositionEntityOnTag +CALLV +pop +line 681 +;681: VectorCopy(flash.origin, flashorigin); +ADDRLP4 888 +ADDRLP4 676+52 +INDIRB +ASGNB 12 +line 682 +;682: VectorCopy(flash.axis[0], flashdir); +ADDRLP4 900 +ADDRLP4 676+12 +INDIRB +ASGNB 12 +line 683 +;683: } +ADDRGP4 $363 +JUMPV +LABELV $362 +line 685 +;684: else +;685: { +line 688 +;686: mdxaBone_t boltMatrix; +;687: +;688: if (!trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) +ADDRFP4 8 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 960 +ADDRGP4 trap_G2API_HasGhoul2ModelOnIndex +CALLI4 +ASGNI4 +ADDRLP4 960 +INDIRI4 +CNSTI4 0 +NEI4 $367 +line 689 +;689: { //it's quite possible that we may have have no weapon model and be in a valid state, so return here if this is the case +line 690 +;690: return; +ADDRGP4 $219 +JUMPV +LABELV $367 +line 694 +;691: } +;692: +;693: // go away and get me the bolt position for this frame please +;694: if (!(trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, newAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale))) +ADDRLP4 964 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 964 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 912 +ARGP4 +ADDRFP4 16 +INDIRP4 +ARGP4 +ADDRLP4 964 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 964 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRLP4 968 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +ASGNI4 +ADDRLP4 968 +INDIRI4 +CNSTI4 0 +NEI4 $369 +line 695 +;695: { // Couldn't find bolt point. +line 696 +;696: return; +ADDRGP4 $219 +JUMPV +LABELV $369 +line 699 +;697: } +;698: +;699: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); +ADDRLP4 912 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 888 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 700 +;700: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); +ADDRLP4 912 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 900 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 701 +;701: } +LABELV $363 +line 703 +;702: +;703: if ( cg.time - cent->muzzleFlashTime <= MUZZLE_FLASH_TIME + 10 ) +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 600 +ADDP4 +INDIRI4 +SUBI4 +CNSTI4 30 +GTI4 $373 +line 704 +;704: { // Handle muzzle flashes +line 705 +;705: if ( cent->currentState.eFlags & EF_ALT_FIRING ) +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $376 +line 706 +;706: { // Check the alt firing first. +line 707 +;707: if (weapon->altMuzzleEffect) +ADDRLP4 436 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $377 +line 708 +;708: { +line 709 +;709: trap_FX_PlayEffectID(weapon->altMuzzleEffect, flashorigin, flashdir); +ADDRLP4 436 +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 888 +ARGP4 +ADDRLP4 900 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 710 +;710: } +line 711 +;711: } +ADDRGP4 $377 +JUMPV +LABELV $376 +line 713 +;712: else +;713: { // Regular firing +line 714 +;714: if (weapon->muzzleEffect) +ADDRLP4 436 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $380 +line 715 +;715: { +line 716 +;716: trap_FX_PlayEffectID(weapon->muzzleEffect, flashorigin, flashdir); +ADDRLP4 436 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 888 +ARGP4 +ADDRLP4 900 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 717 +;717: } +LABELV $380 +line 718 +;718: } +LABELV $377 +line 719 +;719: } +LABELV $373 +line 722 +;720: +;721: // add lightning bolt +;722: CG_LightningBolt( nonPredictedCent, flashorigin ); +ADDRLP4 656 +INDIRP4 +ARGP4 +ADDRLP4 888 +ARGP4 +ADDRGP4 CG_LightningBolt +CALLV +pop +line 724 +;723: +;724: if ( weapon->flashDlightColor[0] || weapon->flashDlightColor[1] || weapon->flashDlightColor[2] ) { +ADDRLP4 916 +CNSTF4 0 +ASGNF4 +ADDRLP4 436 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRF4 +ADDRLP4 916 +INDIRF4 +NEF4 $385 +ADDRLP4 436 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRF4 +ADDRLP4 916 +INDIRF4 +NEF4 $385 +ADDRLP4 436 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRF4 +ADDRLP4 916 +INDIRF4 +EQF4 $382 +LABELV $385 +line 725 +;725: trap_R_AddLightToScene( flashorigin, 300 + (rand()&31), weapon->flashDlightColor[0], +ADDRLP4 920 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 888 +ARGP4 +ADDRLP4 920 +INDIRI4 +CNSTI4 31 +BANDI4 +CNSTI4 300 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 436 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 436 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 436 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 trap_R_AddLightToScene +CALLV +pop +line 727 +;726: weapon->flashDlightColor[1], weapon->flashDlightColor[2] ); +;727: } +LABELV $382 +line 728 +;728: } +LABELV $355 +line 729 +;729:} +LABELV $219 +endproc CG_AddPlayerWeapon 972 36 +export CG_AddViewWeapon +proc CG_AddViewWeapon 264 24 +line 738 +;730: +;731:/* +;732:============== +;733:CG_AddViewWeapon +;734: +;735:Add the weapon, and flash for the player's view +;736:============== +;737:*/ +;738:void CG_AddViewWeapon( playerState_t *ps ) { +line 745 +;739: refEntity_t hand; +;740: centity_t *cent; +;741: clientInfo_t *ci; +;742: float fovOffset; +;743: vec3_t angles; +;744: weaponInfo_t *weapon; +;745: float cgFov = cg_fov.value; +ADDRLP4 212 +ADDRGP4 cg_fov+8 +INDIRF4 +ASGNF4 +line 747 +;746: +;747: if (cgFov < 1) +ADDRLP4 212 +INDIRF4 +CNSTF4 1065353216 +GEF4 $388 +line 748 +;748: { +line 749 +;749: cgFov = 1; +ADDRLP4 212 +CNSTF4 1065353216 +ASGNF4 +line 750 +;750: } +LABELV $388 +line 751 +;751: if (cgFov > 97) +ADDRLP4 212 +INDIRF4 +CNSTF4 1120010240 +LEF4 $390 +line 752 +;752: { +line 753 +;753: cgFov = 97; +ADDRLP4 212 +CNSTF4 1120010240 +ASGNF4 +line 754 +;754: } +LABELV $390 +line 756 +;755: +;756: if ( ps->persistant[PERS_TEAM] == TEAM_SPECTATOR ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $392 +line 757 +;757: return; +ADDRGP4 $386 +JUMPV +LABELV $392 +line 760 +;758: } +;759: +;760: if ( ps->pm_type == PM_INTERMISSION ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $394 +line 761 +;761: return; +ADDRGP4 $386 +JUMPV +LABELV $394 +line 766 +;762: } +;763: +;764: // no gun if in third person view or a camera is active +;765: //if ( cg.renderingThirdPerson || cg.cameraMode) { +;766: if ( cg.renderingThirdPerson ) { +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +EQI4 $396 +line 767 +;767: return; +ADDRGP4 $386 +JUMPV +LABELV $396 +line 771 +;768: } +;769: +;770: // allow the gun to be completely removed +;771: if ( !cg_drawGun.integer || cg.predictedPlayerState.zoomMode) { +ADDRLP4 244 +CNSTI4 0 +ASGNI4 +ADDRGP4 cg_drawGun+12 +INDIRI4 +ADDRLP4 244 +INDIRI4 +EQI4 $404 +ADDRGP4 cg+96+1332 +INDIRI4 +ADDRLP4 244 +INDIRI4 +EQI4 $399 +LABELV $404 +line 774 +;772: vec3_t origin; +;773: +;774: if ( cg.predictedPlayerState.eFlags & EF_FIRING ) { +ADDRGP4 cg+96+108 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $386 +line 776 +;775: // special hack for lightning gun... +;776: VectorCopy( cg.refdef.vieworg, origin ); +ADDRLP4 248 +ADDRGP4 cg+3616+24 +INDIRB +ASGNB 12 +line 777 +;777: VectorMA( origin, -8, cg.refdef.viewaxis[2], origin ); +ADDRLP4 260 +CNSTF4 3238002688 +ASGNF4 +ADDRLP4 248 +ADDRLP4 248 +INDIRF4 +ADDRLP4 260 +INDIRF4 +ADDRGP4 cg+3616+36+24 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 248+4 +ADDRLP4 248+4 +INDIRF4 +ADDRLP4 260 +INDIRF4 +ADDRGP4 cg+3616+36+24+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 248+8 +ADDRLP4 248+8 +INDIRF4 +CNSTF4 3238002688 +ADDRGP4 cg+3616+36+24+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 778 +;778: CG_LightningBolt( &cg_entities[ps->clientNum], origin ); +CNSTI4 1920 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ARGP4 +ADDRLP4 248 +ARGP4 +ADDRGP4 CG_LightningBolt +CALLV +pop +line 779 +;779: } +line 780 +;780: return; +ADDRGP4 $386 +JUMPV +LABELV $399 +line 784 +;781: } +;782: +;783: // don't draw if testing a gun model +;784: if ( cg.testGun ) { +ADDRGP4 cg+13760 +INDIRI4 +CNSTI4 0 +EQI4 $426 +line 785 +;785: return; +ADDRGP4 $386 +JUMPV +LABELV $426 +line 789 +;786: } +;787: +;788: // drop gun lower at higher fov +;789: if ( cgFov > 90 ) { +ADDRLP4 212 +INDIRF4 +CNSTF4 1119092736 +LEF4 $429 +line 790 +;790: fovOffset = -0.2 * ( cgFov - 90 ); +ADDRLP4 220 +CNSTF4 3192704205 +ADDRLP4 212 +INDIRF4 +CNSTF4 1119092736 +SUBF4 +MULF4 +ASGNF4 +line 791 +;791: } else { +ADDRGP4 $430 +JUMPV +LABELV $429 +line 792 +;792: fovOffset = 0; +ADDRLP4 220 +CNSTF4 0 +ASGNF4 +line 793 +;793: } +LABELV $430 +line 795 +;794: +;795: cent = &cg.predictedPlayerEntity; // &cg_entities[cg.snap->ps.clientNum]; +ADDRLP4 216 +ADDRGP4 cg+1476 +ASGNP4 +line 796 +;796: CG_RegisterWeapon( ps->weapon ); +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_RegisterWeapon +CALLV +pop +line 797 +;797: weapon = &cg_weapons[ ps->weapon ]; +ADDRLP4 236 +CNSTI4 208 +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons +ADDP4 +ASGNP4 +line 799 +;798: +;799: memset (&hand, 0, sizeof(hand)); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 802 +;800: +;801: // set up gun position +;802: CG_CalculateWeaponPosition( hand.origin, angles ); +ADDRLP4 0+52 +ARGP4 +ADDRLP4 224 +ARGP4 +ADDRGP4 CG_CalculateWeaponPosition +CALLV +pop +line 804 +;803: +;804: VectorMA( hand.origin, cg_gun_x.value, cg.refdef.viewaxis[0], hand.origin ); +ADDRLP4 0+52 +ADDRLP4 0+52 +INDIRF4 +ADDRGP4 cg+3616+36 +INDIRF4 +ADDRGP4 cg_gun_x+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+4 +ADDRLP4 0+52+4 +INDIRF4 +ADDRGP4 cg+3616+36+4 +INDIRF4 +ADDRGP4 cg_gun_x+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +ADDRGP4 cg+3616+36+8 +INDIRF4 +ADDRGP4 cg_gun_x+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 805 +;805: VectorMA( hand.origin, cg_gun_y.value, cg.refdef.viewaxis[1], hand.origin ); +ADDRLP4 0+52 +ADDRLP4 0+52 +INDIRF4 +ADDRGP4 cg+3616+36+12 +INDIRF4 +ADDRGP4 cg_gun_y+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+4 +ADDRLP4 0+52+4 +INDIRF4 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +ADDRGP4 cg_gun_y+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +ADDRGP4 cg_gun_y+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 806 +;806: VectorMA( hand.origin, (cg_gun_z.value+fovOffset), cg.refdef.viewaxis[2], hand.origin ); +ADDRLP4 0+52 +ADDRLP4 0+52 +INDIRF4 +ADDRGP4 cg+3616+36+24 +INDIRF4 +ADDRGP4 cg_gun_z+8 +INDIRF4 +ADDRLP4 220 +INDIRF4 +ADDF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+4 +ADDRLP4 0+52+4 +INDIRF4 +ADDRGP4 cg+3616+36+24+4 +INDIRF4 +ADDRGP4 cg_gun_z+8 +INDIRF4 +ADDRLP4 220 +INDIRF4 +ADDF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+52+8 +ADDRLP4 0+52+8 +INDIRF4 +ADDRGP4 cg+3616+36+24+8 +INDIRF4 +ADDRGP4 cg_gun_z+8 +INDIRF4 +ADDRLP4 220 +INDIRF4 +ADDF4 +MULF4 +ADDF4 +ASGNF4 +line 808 +;807: +;808: AnglesToAxis( angles, hand.axis ); +ADDRLP4 224 +ARGP4 +ADDRLP4 0+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 811 +;809: +;810: // map torso animations to weapon animations +;811: if ( cg_gun_frame.integer ) { +ADDRGP4 cg_gun_frame+12 +INDIRI4 +CNSTI4 0 +EQI4 $503 +line 813 +;812: // development tool +;813: hand.frame = hand.oldframe = cg_gun_frame.integer; +ADDRLP4 248 +ADDRGP4 cg_gun_frame+12 +INDIRI4 +ASGNI4 +ADDRLP4 0+124 +ADDRLP4 248 +INDIRI4 +ASGNI4 +ADDRLP4 0+104 +ADDRLP4 248 +INDIRI4 +ASGNI4 +line 814 +;814: hand.backlerp = 0; +ADDRLP4 0+128 +CNSTF4 0 +ASGNF4 +line 815 +;815: } else { +ADDRGP4 $504 +JUMPV +LABELV $503 +line 817 +;816: // get clientinfo for animation map +;817: ci = &cgs.clientinfo[ cent->currentState.clientNum ]; +ADDRLP4 240 +CNSTI4 788 +ADDRLP4 216 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cgs+43024 +ADDP4 +ASGNP4 +line 818 +;818: hand.frame = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.frame, cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ); +ADDRLP4 240 +INDIRP4 +ARGP4 +ADDRLP4 216 +INDIRP4 +CNSTI4 716 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 216 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 252 +ADDRGP4 CG_MapTorsoToWeaponFrame +CALLI4 +ASGNI4 +ADDRLP4 0+104 +ADDRLP4 252 +INDIRI4 +ASGNI4 +line 819 +;819: hand.oldframe = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.oldFrame, cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT ); +ADDRLP4 240 +INDIRP4 +ARGP4 +ADDRLP4 216 +INDIRP4 +CNSTI4 708 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 216 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ARGI4 +ADDRLP4 260 +ADDRGP4 CG_MapTorsoToWeaponFrame +CALLI4 +ASGNI4 +ADDRLP4 0+124 +ADDRLP4 260 +INDIRI4 +ASGNI4 +line 820 +;820: hand.backlerp = cent->pe.torso.backlerp; +ADDRLP4 0+128 +ADDRLP4 216 +INDIRP4 +CNSTI4 724 +ADDP4 +INDIRF4 +ASGNF4 +line 823 +;821: +;822: // Handle the fringe situation where oldframe is invalid +;823: if ( hand.frame == -1 ) +ADDRLP4 0+104 +INDIRI4 +CNSTI4 -1 +NEI4 $514 +line 824 +;824: { +line 825 +;825: hand.frame = 0; +ADDRLP4 0+104 +CNSTI4 0 +ASGNI4 +line 826 +;826: hand.oldframe = 0; +ADDRLP4 0+124 +CNSTI4 0 +ASGNI4 +line 827 +;827: hand.backlerp = 0; +ADDRLP4 0+128 +CNSTF4 0 +ASGNF4 +line 828 +;828: } +ADDRGP4 $515 +JUMPV +LABELV $514 +line 829 +;829: else if ( hand.oldframe == -1 ) +ADDRLP4 0+124 +INDIRI4 +CNSTI4 -1 +NEI4 $520 +line 830 +;830: { +line 831 +;831: hand.oldframe = hand.frame; +ADDRLP4 0+124 +ADDRLP4 0+104 +INDIRI4 +ASGNI4 +line 832 +;832: hand.backlerp = 0; +ADDRLP4 0+128 +CNSTF4 0 +ASGNF4 +line 833 +;833: } +LABELV $520 +LABELV $515 +line 834 +;834: } +LABELV $504 +line 836 +;835: +;836: hand.hModel = weapon->handsModel; +ADDRLP4 0+8 +ADDRLP4 236 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ASGNI4 +line 837 +;837: hand.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON;// | RF_MINLIGHT; +ADDRLP4 0+4 +CNSTI4 12 +ASGNI4 +line 840 +;838: +;839: // add everything onto the hand +;840: CG_AddPlayerWeapon( &hand, ps, &cg.predictedPlayerEntity, ps->persistant[PERS_TEAM], angles, qfalse ); +ADDRLP4 0 +ARGP4 +ADDRLP4 248 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 248 +INDIRP4 +ARGP4 +ADDRGP4 cg+1476 +ARGP4 +ADDRLP4 248 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 224 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 CG_AddPlayerWeapon +CALLV +pop +line 841 +;841:} +LABELV $386 +endproc CG_AddViewWeapon 264 24 +export CG_DrawIconBackground +proc CG_DrawIconBackground 56 20 +line 856 +;842: +;843:/* +;844:============================================================================== +;845: +;846:WEAPON SELECTION +;847: +;848:============================================================================== +;849:*/ +;850:#define ICON_WEAPONS 0 +;851:#define ICON_FORCE 1 +;852:#define ICON_INVENTORY 2 +;853: +;854: +;855:void CG_DrawIconBackground(void) +;856:{ +line 859 +;857: int height,xAdd,x2,y2,t; +;858: int prongLeftX,prongRightX; +;859: float inTime = cg.invenSelectTime+WEAPON_SELECT_TIME; +ADDRLP4 32 +ADDRGP4 cg+13788 +INDIRF4 +CNSTF4 1152319488 +ADDF4 +ASGNF4 +line 860 +;860: float wpTime = cg.weaponSelectTime+WEAPON_SELECT_TIME; +ADDRLP4 36 +ADDRGP4 cg+13372 +INDIRI4 +CNSTI4 1400 +ADDI4 +CVIF4 4 +ASGNF4 +line 861 +;861: float fpTime = cg.forceSelectTime+WEAPON_SELECT_TIME; +ADDRLP4 40 +ADDRGP4 cg+13792 +INDIRF4 +CNSTF4 1152319488 +ADDF4 +ASGNF4 +line 863 +;862: qhandle_t background; +;863: int drawType = cgs.media.weaponIconBackground; +ADDRLP4 8 +ADDRGP4 cgs+70296+1216 +INDIRI4 +ASGNI4 +line 864 +;864: int prongsOn = cgs.media.weaponProngsOn; +ADDRLP4 28 +ADDRGP4 cgs+70296+1224 +INDIRI4 +ASGNI4 +line 867 +;865: +;866: // don't display if dead +;867: if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRI4 +CNSTI4 0 +GTI4 $537 +line 868 +;868: { +line 869 +;869: return; +ADDRGP4 $529 +JUMPV +LABELV $537 +line 872 +;870: } +;871: +;872: if (cg_hudFiles.integer) +ADDRGP4 cg_hudFiles+12 +INDIRI4 +CNSTI4 0 +EQI4 $540 +line 873 +;873: { //simple hud +line 874 +;874: return; +ADDRGP4 $529 +JUMPV +LABELV $540 +line 877 +;875: } +;876: +;877: x2 = 30; +ADDRLP4 0 +CNSTI4 30 +ASGNI4 +line 878 +;878: y2 = SCREEN_HEIGHT-70; +ADDRLP4 4 +CNSTI4 410 +ASGNI4 +line 880 +;879: +;880: prongLeftX =x2+37; +ADDRLP4 20 +ADDRLP4 0 +INDIRI4 +CNSTI4 37 +ADDI4 +ASGNI4 +line 881 +;881: prongRightX =x2+544; +ADDRLP4 24 +ADDRLP4 0 +INDIRI4 +CNSTI4 544 +ADDI4 +ASGNI4 +line 883 +;882: +;883: if (inTime > wpTime) +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LEF4 $543 +line 884 +;884: { +line 885 +;885: drawType = cgs.media.inventoryIconBackground; +ADDRLP4 8 +ADDRGP4 cgs+70296+1236 +INDIRI4 +ASGNI4 +line 886 +;886: prongsOn = cgs.media.inventoryProngsOn; +ADDRLP4 28 +ADDRGP4 cgs+70296+1240 +INDIRI4 +ASGNI4 +line 887 +;887: cg.iconSelectTime = cg.invenSelectTime; +ADDRGP4 cg+13784 +ADDRGP4 cg+13788 +INDIRF4 +ASGNF4 +line 888 +;888: } +ADDRGP4 $544 +JUMPV +LABELV $543 +line 890 +;889: else +;890: { +line 891 +;891: drawType = cgs.media.weaponIconBackground; +ADDRLP4 8 +ADDRGP4 cgs+70296+1216 +INDIRI4 +ASGNI4 +line 892 +;892: prongsOn = cgs.media.weaponProngsOn; +ADDRLP4 28 +ADDRGP4 cgs+70296+1224 +INDIRI4 +ASGNI4 +line 893 +;893: cg.iconSelectTime = cg.weaponSelectTime; +ADDRGP4 cg+13784 +ADDRGP4 cg+13372 +INDIRI4 +CVIF4 4 +ASGNF4 +line 894 +;894: } +LABELV $544 +line 896 +;895: +;896: if (fpTime > inTime && fpTime > wpTime) +ADDRLP4 40 +INDIRF4 +ADDRLP4 32 +INDIRF4 +LEF4 $557 +ADDRLP4 40 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LEF4 $557 +line 897 +;897: { +line 898 +;898: drawType = cgs.media.forceIconBackground; +ADDRLP4 8 +ADDRGP4 cgs+70296+1228 +INDIRI4 +ASGNI4 +line 899 +;899: prongsOn = cgs.media.forceProngsOn; +ADDRLP4 28 +ADDRGP4 cgs+70296+1232 +INDIRI4 +ASGNI4 +line 900 +;900: cg.iconSelectTime = cg.forceSelectTime; +ADDRGP4 cg+13784 +ADDRGP4 cg+13792 +INDIRF4 +ASGNF4 +line 901 +;901: } +LABELV $557 +line 903 +;902: +;903: if ((cg.iconSelectTime+WEAPON_SELECT_TIME)1) +ADDRGP4 cg+13780 +INDIRF4 +CNSTF4 1065353216 +LEF4 $594 +line 945 +;945: { +line 946 +;946: cg.iconHUDActive = qtrue; +ADDRGP4 cg+13776 +CNSTI4 1 +ASGNI4 +line 947 +;947: cg.iconHUDPercent=1; +ADDRGP4 cg+13780 +CNSTF4 1065353216 +ASGNF4 +line 948 +;948: } +ADDRGP4 $589 +JUMPV +LABELV $594 +line 949 +;949: else if (cg.iconHUDPercent<0) +ADDRGP4 cg+13780 +INDIRF4 +CNSTF4 0 +GEF4 $589 +line 950 +;950: { +line 951 +;951: cg.iconHUDPercent=0; +ADDRGP4 cg+13780 +CNSTF4 0 +ASGNF4 +line 952 +;952: } +line 953 +;953: } +ADDRGP4 $589 +JUMPV +LABELV $588 +line 955 +;954: else +;955: { +line 956 +;956: cg.iconHUDPercent=1; +ADDRGP4 cg+13780 +CNSTF4 1065353216 +ASGNF4 +line 957 +;957: } +LABELV $589 +line 959 +;958: +;959: trap_R_SetColor( colorTable[CT_WHITE] ); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 960 +;960: height = (int) (60.0f*cg.iconHUDPercent); +ADDRLP4 16 +CNSTF4 1114636288 +ADDRGP4 cg+13780 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 961 +;961: CG_DrawPic( x2+60, y2+30, 460, -height, drawType); // Top half +ADDRLP4 0 +INDIRI4 +CNSTI4 60 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +INDIRI4 +CNSTI4 30 +ADDI4 +CVIF4 4 +ARGF4 +CNSTF4 1139146752 +ARGF4 +ADDRLP4 16 +INDIRI4 +NEGI4 +CVIF4 4 +ARGF4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 962 +;962: CG_DrawPic( x2+60, y2+30-2,460, height, drawType); // Bottom half +ADDRLP4 0 +INDIRI4 +CNSTI4 60 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +INDIRI4 +CNSTI4 30 +ADDI4 +CNSTI4 2 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1139146752 +ARGF4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 972 +;963: +;964: // And now for the prongs +;965:/* if ((cg.inventorySelectTime+WEAPON_SELECT_TIME)>cg.time) +;966: { +;967: cgs.media.currentBackground = ICON_INVENTORY; +;968: background = &cgs.media.inventoryProngsOn; +;969: } +;970: else if ((cg.weaponSelectTime+WEAPON_SELECT_TIME)>cg.time) +;971: {*/ +;972: cgs.media.currentBackground = ICON_WEAPONS; +ADDRGP4 cgs+70296+1212 +CNSTI4 0 +ASGNI4 +line 973 +;973: background = prongsOn; +ADDRLP4 44 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 982 +;974:/* } +;975: else +;976: { +;977: cgs.media.currentBackground = ICON_FORCE; +;978: background = &cgs.media.forceProngsOn; +;979: } +;980:*/ +;981: // Side Prongs +;982: trap_R_SetColor( colorTable[CT_WHITE]); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 983 +;983: xAdd = (int) 8*cg.iconHUDPercent; +ADDRLP4 12 +CNSTF4 1090519040 +ADDRGP4 cg+13780 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 984 +;984: CG_DrawPic( prongLeftX+xAdd, y2-10, 40, 80, background); +ADDRLP4 20 +INDIRI4 +ADDRLP4 12 +INDIRI4 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +INDIRI4 +CNSTI4 10 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 1109393408 +ARGF4 +CNSTF4 1117782016 +ARGF4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 985 +;985: CG_DrawPic( prongRightX-xAdd, y2-10, -40, 80, background); +ADDRLP4 24 +INDIRI4 +ADDRLP4 12 +INDIRI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +INDIRI4 +CNSTI4 10 +SUBI4 +CVIF4 4 +ARGF4 +CNSTF4 3256877056 +ARGF4 +CNSTF4 1117782016 +ARGF4 +ADDRLP4 44 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 987 +;986: +;987:} +LABELV $529 +endproc CG_DrawIconBackground 56 20 +export CG_WeaponCheck +proc CG_WeaponCheck 12 0 +line 990 +;988: +;989:qboolean CG_WeaponCheck(int weap) +;990:{ +line 991 +;991: if (cg.snap->ps.ammo[weaponData[weap].ammoIndex] < weaponData[weap].energyPerShot && +ADDRLP4 0 +CNSTI4 56 +ADDRFP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 8 +CNSTI4 452 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 weaponData+8 +ADDP4 +INDIRI4 +GEI4 $611 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 weaponData+20 +ADDP4 +INDIRI4 +GEI4 $611 +line 993 +;992: cg.snap->ps.ammo[weaponData[weap].ammoIndex] < weaponData[weap].altEnergyPerShot) +;993: { +line 994 +;994: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $610 +JUMPV +LABELV $611 +line 997 +;995: } +;996: +;997: return qtrue; +CNSTI4 1 +RETI4 +LABELV $610 +endproc CG_WeaponCheck 12 0 +proc CG_WeaponSelectable 12 0 +line 1005 +;998:} +;999: +;1000:/* +;1001:=============== +;1002:CG_WeaponSelectable +;1003:=============== +;1004:*/ +;1005:static qboolean CG_WeaponSelectable( int i ) { +line 1009 +;1006: /*if ( !cg.snap->ps.ammo[weaponData[i].ammoIndex] ) { +;1007: return qfalse; +;1008: }*/ +;1009: if (!i) +ADDRFP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $618 +line 1010 +;1010: { +line 1011 +;1011: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $617 +JUMPV +LABELV $618 +line 1014 +;1012: } +;1013: +;1014: if (cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < weaponData[i].energyPerShot && +ADDRLP4 0 +CNSTI4 56 +ADDRFP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+96+408 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 weaponData+8 +ADDP4 +INDIRI4 +GEI4 $620 +ADDRLP4 4 +INDIRI4 +ADDRGP4 cg+96+408 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +ADDRGP4 weaponData+20 +ADDP4 +INDIRI4 +GEI4 $620 +line 1016 +;1015: cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < weaponData[i].altEnergyPerShot) +;1016: { +line 1017 +;1017: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $617 +JUMPV +LABELV $620 +line 1020 +;1018: } +;1019: +;1020: if (i == WP_DET_PACK && cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < 1 && +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 13 +NEI4 $628 +CNSTI4 56 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRGP4 weaponData +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cg+96+408 +ADDP4 +INDIRI4 +CNSTI4 1 +GEI4 $628 +ADDRGP4 cg+96+640 +INDIRI4 +CNSTI4 0 +NEI4 $628 +line 1022 +;1021: !cg.predictedPlayerState.hasDetPackPlanted) +;1022: { +line 1023 +;1023: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $617 +JUMPV +LABELV $628 +line 1026 +;1024: } +;1025: +;1026: if ( ! (cg.predictedPlayerState.stats[ STAT_WEAPONS ] & ( 1 << i ) ) ) { +ADDRGP4 cg+96+216+16 +INDIRI4 +CNSTI4 1 +ADDRFP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +NEI4 $634 +line 1027 +;1027: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $617 +JUMPV +LABELV $634 +line 1030 +;1028: } +;1029: +;1030: return qtrue; +CNSTI4 1 +RETI4 +LABELV $617 +endproc CG_WeaponSelectable 12 0 +lit +align 4 +LABELV $752 +byte 4 1063256064 +byte 4 1060622041 +byte 4 1039650521 +byte 4 1065353216 +export CG_DrawWeaponSelect +code +proc CG_DrawWeaponSelect 1112 20 +line 1038 +;1031:} +;1032: +;1033:/* +;1034:=================== +;1035:CG_DrawWeaponSelect +;1036:=================== +;1037:*/ +;1038:void CG_DrawWeaponSelect( void ) { +line 1048 +;1039: int i; +;1040: int bits; +;1041: int count; +;1042: int smallIconSize,bigIconSize; +;1043: int holdX,x,y,pad; +;1044: int sideLeftIconCnt,sideRightIconCnt; +;1045: int sideMax,holdCount,iconCnt; +;1046: int height; +;1047: +;1048: if (cg.predictedPlayerState.emplacedIndex) +ADDRGP4 cg+96+596 +INDIRI4 +CNSTI4 0 +EQI4 $640 +line 1049 +;1049: { //can't cycle when on a weapon +line 1050 +;1050: cg.weaponSelectTime = 0; +ADDRGP4 cg+13372 +CNSTI4 0 +ASGNI4 +line 1051 +;1051: } +LABELV $640 +line 1053 +;1052: +;1053: if ((cg.weaponSelectTime+WEAPON_SELECT_TIME) (2*sideMax)) // Go to the max on each side +ADDRLP4 36 +INDIRI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 1 +LSHI4 +LEI4 $676 +line 1106 +;1106: { +line 1107 +;1107: sideLeftIconCnt = sideMax; +ADDRLP4 28 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 1108 +;1108: sideRightIconCnt = sideMax; +ADDRLP4 32 +ADDRLP4 56 +INDIRI4 +ASGNI4 +line 1109 +;1109: } +ADDRGP4 $677 +JUMPV +LABELV $676 +line 1111 +;1110: else // Less than max, so do the calc +;1111: { +line 1112 +;1112: sideLeftIconCnt = holdCount/2; +ADDRLP4 28 +ADDRLP4 52 +INDIRI4 +CNSTI4 2 +DIVI4 +ASGNI4 +line 1113 +;1113: sideRightIconCnt = holdCount - sideLeftIconCnt; +ADDRLP4 32 +ADDRLP4 52 +INDIRI4 +ADDRLP4 28 +INDIRI4 +SUBI4 +ASGNI4 +line 1114 +;1114: } +LABELV $677 +LABELV $675 +line 1116 +;1115: +;1116: i = cg.weaponSelect - 1; +ADDRLP4 0 +ADDRGP4 cg+3508 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1117 +;1117: if (i<1) +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +GEI4 $679 +line 1118 +;1118: { +line 1119 +;1119: i = 13; +ADDRLP4 0 +CNSTI4 13 +ASGNI4 +line 1120 +;1120: } +LABELV $679 +line 1122 +;1121: +;1122: smallIconSize = 40; +ADDRLP4 8 +CNSTI4 40 +ASGNI4 +line 1123 +;1123: bigIconSize = 80; +ADDRLP4 40 +CNSTI4 80 +ASGNI4 +line 1124 +;1124: pad = 12; +ADDRLP4 20 +CNSTI4 12 +ASGNI4 +line 1126 +;1125: +;1126: x = 320; +ADDRLP4 44 +CNSTI4 320 +ASGNI4 +line 1127 +;1127: y = 410; +ADDRLP4 24 +CNSTI4 410 +ASGNI4 +line 1135 +;1128: +;1129: // Background +;1130:// memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t)); +;1131:// calcColor[3] = .35f; +;1132:// trap_R_SetColor( calcColor); +;1133: +;1134: // Left side ICONS +;1135: trap_R_SetColor(colorTable[CT_WHITE]); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1137 +;1136: // Work backwards from current icon +;1137: holdX = x - ((bigIconSize/2) + pad + smallIconSize); +ADDRLP4 16 +ADDRLP4 44 +INDIRI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 2 +DIVI4 +ADDRLP4 20 +INDIRI4 +ADDI4 +ADDRLP4 8 +INDIRI4 +ADDI4 +SUBI4 +ASGNI4 +line 1138 +;1138: height = smallIconSize * 1;//cg.iconHUDPercent; +ADDRLP4 48 +CNSTI4 1 +ADDRLP4 8 +INDIRI4 +MULI4 +ASGNI4 +line 1140 +;1139: +;1140: for (iconCnt=1;iconCnt<(sideLeftIconCnt+1);i--) +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +ADDRGP4 $685 +JUMPV +LABELV $682 +line 1141 +;1141: { +line 1142 +;1142: if (i<1) +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +GEI4 $686 +line 1143 +;1143: { +line 1144 +;1144: i = 13; +ADDRLP4 0 +CNSTI4 13 +ASGNI4 +line 1145 +;1145: } +LABELV $686 +line 1147 +;1146: +;1147: if ( !(bits & ( 1 << i ))) // Does he have this weapon? +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +NEI4 $688 +line 1148 +;1148: { +line 1149 +;1149: continue; +ADDRGP4 $683 +JUMPV +LABELV $688 +line 1152 +;1150: } +;1151: +;1152: if ( !CG_WeaponSelectable(i) && +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 64 +ADDRGP4 CG_WeaponSelectable +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 0 +NEI4 $690 +ADDRLP4 0 +INDIRI4 +CNSTI4 11 +EQI4 $692 +ADDRLP4 0 +INDIRI4 +CNSTI4 12 +NEI4 $690 +LABELV $692 +line 1154 +;1153: (i == WP_THERMAL || i == WP_TRIP_MINE) ) +;1154: { //Don't show thermal and tripmine when out of them +line 1155 +;1155: continue; +ADDRGP4 $683 +JUMPV +LABELV $690 +line 1158 +;1156: } +;1157: +;1158: ++iconCnt; // Good icon +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1160 +;1159: +;1160: if (cgs.media.weaponIcons[i]) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+928 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $693 +line 1161 +;1161: { +line 1163 +;1162: weaponInfo_t *weaponInfo; +;1163: CG_RegisterWeapon( i ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 CG_RegisterWeapon +CALLV +pop +line 1164 +;1164: weaponInfo = &cg_weapons[i]; +ADDRLP4 72 +CNSTI4 208 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons +ADDP4 +ASGNP4 +line 1166 +;1165: +;1166: trap_R_SetColor(colorTable[CT_WHITE]); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1167 +;1167: if (!CG_WeaponCheck(i)) +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 CG_WeaponCheck +CALLI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +NEI4 $698 +line 1168 +;1168: { +line 1169 +;1169: CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, /*weaponInfo->weaponIconNoAmmo*/cgs.media.weaponIcons_NA[i] ); +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +INDIRI4 +CNSTI4 10 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 80 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+992 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1170 +;1170: } +ADDRGP4 $699 +JUMPV +LABELV $698 +line 1172 +;1171: else +;1172: { +line 1173 +;1173: CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, /*weaponInfo->weaponIcon*/cgs.media.weaponIcons[i] ); +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +INDIRI4 +CNSTI4 10 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 80 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+928 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1174 +;1174: } +LABELV $699 +line 1176 +;1175: +;1176: holdX -= (smallIconSize+pad); +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 20 +INDIRI4 +ADDI4 +SUBI4 +ASGNI4 +line 1177 +;1177: } +LABELV $693 +line 1178 +;1178: } +LABELV $683 +line 1140 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +LABELV $685 +ADDRLP4 4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 1 +ADDI4 +LTI4 $682 +line 1181 +;1179: +;1180: // Current Center Icon +;1181: height = bigIconSize * cg.iconHUDPercent; +ADDRLP4 48 +ADDRLP4 40 +INDIRI4 +CVIF4 4 +ADDRGP4 cg+13780 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1182 +;1182: if (cgs.media.weaponIcons[cg.weaponSelect]) +ADDRGP4 cg+3508 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+928 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $705 +line 1183 +;1183: { +line 1185 +;1184: weaponInfo_t *weaponInfo; +;1185: CG_RegisterWeapon( cg.weaponSelect ); +ADDRGP4 cg+3508 +INDIRI4 +ARGI4 +ADDRGP4 CG_RegisterWeapon +CALLV +pop +line 1186 +;1186: weaponInfo = &cg_weapons[cg.weaponSelect]; +ADDRLP4 64 +CNSTI4 208 +ADDRGP4 cg+3508 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons +ADDP4 +ASGNP4 +line 1188 +;1187: +;1188: trap_R_SetColor( colorTable[CT_WHITE]); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1189 +;1189: if (!CG_WeaponCheck(cg.weaponSelect)) +ADDRGP4 cg+3508 +INDIRI4 +ARGI4 +ADDRLP4 68 +ADDRGP4 CG_WeaponCheck +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +NEI4 $713 +line 1190 +;1190: { +line 1191 +;1191: CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2))+10, bigIconSize, bigIconSize, cgs.media.weaponIcons_NA[cg.weaponSelect] ); +ADDRLP4 76 +CNSTI4 2 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 40 +INDIRI4 +ADDRLP4 76 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +INDIRI4 +ADDRLP4 40 +INDIRI4 +ADDRLP4 8 +INDIRI4 +SUBI4 +ADDRLP4 76 +INDIRI4 +DIVI4 +SUBI4 +CNSTI4 10 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 80 +ADDRLP4 40 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRGP4 cg+3508 +INDIRI4 +ADDRLP4 76 +INDIRI4 +LSHI4 +ADDRGP4 cgs+70296+992 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1192 +;1192: } +ADDRGP4 $714 +JUMPV +LABELV $713 +line 1194 +;1193: else +;1194: { +line 1195 +;1195: CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2))+10, bigIconSize, bigIconSize, cgs.media.weaponIcons[cg.weaponSelect] ); +ADDRLP4 76 +CNSTI4 2 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 40 +INDIRI4 +ADDRLP4 76 +INDIRI4 +DIVI4 +SUBI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +INDIRI4 +ADDRLP4 40 +INDIRI4 +ADDRLP4 8 +INDIRI4 +SUBI4 +ADDRLP4 76 +INDIRI4 +DIVI4 +SUBI4 +CNSTI4 10 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 80 +ADDRLP4 40 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRGP4 cg+3508 +INDIRI4 +ADDRLP4 76 +INDIRI4 +LSHI4 +ADDRGP4 cgs+70296+928 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1196 +;1196: } +LABELV $714 +line 1197 +;1197: } +LABELV $705 +line 1199 +;1198: +;1199: i = cg.weaponSelect + 1; +ADDRLP4 0 +ADDRGP4 cg+3508 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1200 +;1200: if (i> 13) +ADDRLP4 0 +INDIRI4 +CNSTI4 13 +LEI4 $723 +line 1201 +;1201: { +line 1202 +;1202: i = 1; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 1203 +;1203: } +LABELV $723 +line 1207 +;1204: +;1205: // Right side ICONS +;1206: // Work forwards from current icon +;1207: holdX = x + (bigIconSize/2) + pad; +ADDRLP4 16 +ADDRLP4 44 +INDIRI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 2 +DIVI4 +ADDI4 +ADDRLP4 20 +INDIRI4 +ADDI4 +ASGNI4 +line 1208 +;1208: height = smallIconSize * cg.iconHUDPercent; +ADDRLP4 48 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDRGP4 cg+13780 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 1209 +;1209: for (iconCnt=1;iconCnt<(sideRightIconCnt+1);i++) +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +ADDRGP4 $729 +JUMPV +LABELV $726 +line 1210 +;1210: { +line 1211 +;1211: if (i>13) +ADDRLP4 0 +INDIRI4 +CNSTI4 13 +LEI4 $730 +line 1212 +;1212: { +line 1213 +;1213: i = 1; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 1214 +;1214: } +LABELV $730 +line 1216 +;1215: +;1216: if ( !(bits & ( 1 << i ))) // Does he have this weapon? +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +NEI4 $732 +line 1217 +;1217: { +line 1218 +;1218: continue; +ADDRGP4 $727 +JUMPV +LABELV $732 +line 1221 +;1219: } +;1220: +;1221: if ( !CG_WeaponSelectable(i) && +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 64 +ADDRGP4 CG_WeaponSelectable +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 0 +NEI4 $734 +ADDRLP4 0 +INDIRI4 +CNSTI4 11 +EQI4 $736 +ADDRLP4 0 +INDIRI4 +CNSTI4 12 +NEI4 $734 +LABELV $736 +line 1223 +;1222: (i == WP_THERMAL || i == WP_TRIP_MINE) ) +;1223: { //Don't show thermal and tripmine when out of them +line 1224 +;1224: continue; +ADDRGP4 $727 +JUMPV +LABELV $734 +line 1227 +;1225: } +;1226: +;1227: ++iconCnt; // Good icon +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1229 +;1228: +;1229: if (/*weaponData[i].weaponIcon[0]*/cgs.media.weaponIcons[i]) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+928 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $737 +line 1230 +;1230: { +line 1232 +;1231: weaponInfo_t *weaponInfo; +;1232: CG_RegisterWeapon( i ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 CG_RegisterWeapon +CALLV +pop +line 1233 +;1233: weaponInfo = &cg_weapons[i]; +ADDRLP4 72 +CNSTI4 208 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons +ADDP4 +ASGNP4 +line 1235 +;1234: // No ammo for this weapon? +;1235: trap_R_SetColor( colorTable[CT_WHITE]); +ADDRGP4 colorTable+128 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1236 +;1236: if (!CG_WeaponCheck(i)) +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 CG_WeaponCheck +CALLI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 0 +NEI4 $742 +line 1237 +;1237: { +line 1238 +;1238: CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.weaponIcons_NA[i] ); +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +INDIRI4 +CNSTI4 10 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 80 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+992 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1239 +;1239: } +ADDRGP4 $743 +JUMPV +LABELV $742 +line 1241 +;1240: else +;1241: { +line 1242 +;1242: CG_DrawPic( holdX, y+10, smallIconSize, smallIconSize, cgs.media.weaponIcons[i] ); +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +INDIRI4 +CNSTI4 10 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 80 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 cgs+70296+928 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 CG_DrawPic +CALLV +pop +line 1243 +;1243: } +LABELV $743 +line 1246 +;1244: +;1245: +;1246: holdX += (smallIconSize+pad); +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 20 +INDIRI4 +ADDI4 +ADDI4 +ASGNI4 +line 1247 +;1247: } +LABELV $737 +line 1248 +;1248: } +LABELV $727 +line 1209 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $729 +ADDRLP4 4 +INDIRI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 1 +ADDI4 +LTI4 $726 +line 1251 +;1249: +;1250: // draw the selected name +;1251: if ( cg_weapons[ cg.weaponSelect ].item ) +CNSTI4 208 +ADDRGP4 cg+3508 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons+4 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $748 +line 1252 +;1252: { +line 1253 +;1253: vec4_t textColor = { .875f, .718f, .121f, 1.0f }; +ADDRLP4 64 +ADDRGP4 $752 +INDIRB +ASGNB 16 +line 1256 +;1254: char text[1024]; +;1255: +;1256: if ( trap_SP_GetStringTextString( va("INGAME_%s",cg_weapons[ cg.weaponSelect ].item->classname), text, sizeof( text ))) +ADDRGP4 $755 +ARGP4 +CNSTI4 208 +ADDRGP4 cg+3508 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons+4 +ADDP4 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 1104 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1104 +INDIRP4 +ARGP4 +ADDRLP4 80 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRLP4 1108 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +ASGNI4 +ADDRLP4 1108 +INDIRI4 +CNSTI4 0 +EQI4 $753 +line 1257 +;1257: { +line 1258 +;1258: UI_DrawProportionalString(320, y+45, text, UI_CENTER|UI_SMALLFONT, textColor); +CNSTI4 320 +ARGI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 45 +ADDI4 +ARGI4 +ADDRLP4 80 +ARGP4 +CNSTI4 17 +ARGI4 +ADDRLP4 64 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 1259 +;1259: } +ADDRGP4 $754 +JUMPV +LABELV $753 +line 1261 +;1260: else +;1261: { +line 1262 +;1262: UI_DrawProportionalString(320, y+45, cg_weapons[ cg.weaponSelect ].item->classname, UI_CENTER|UI_SMALLFONT, textColor); +CNSTI4 320 +ARGI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 45 +ADDI4 +ARGI4 +CNSTI4 208 +ADDRGP4 cg+3508 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons+4 +ADDP4 +INDIRP4 +INDIRP4 +ARGP4 +CNSTI4 17 +ARGI4 +ADDRLP4 64 +ARGP4 +ADDRGP4 UI_DrawProportionalString +CALLV +pop +line 1263 +;1263: } +LABELV $754 +line 1264 +;1264: } +LABELV $748 +line 1266 +;1265: +;1266: trap_R_SetColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 trap_R_SetColor +CALLV +pop +line 1267 +;1267:} +LABELV $639 +endproc CG_DrawWeaponSelect 1112 20 +export CG_NextWeapon_f +proc CG_NextWeapon_f 16 8 +line 1275 +;1268: +;1269: +;1270:/* +;1271:=============== +;1272:CG_NextWeapon_f +;1273:=============== +;1274:*/ +;1275:void CG_NextWeapon_f( void ) { +line 1279 +;1276: int i; +;1277: int original; +;1278: +;1279: if ( !cg.snap ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $761 +line 1280 +;1280: return; +ADDRGP4 $760 +JUMPV +LABELV $761 +line 1282 +;1281: } +;1282: if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $764 +line 1283 +;1283: return; +ADDRGP4 $760 +JUMPV +LABELV $764 +line 1286 +;1284: } +;1285: +;1286: if (cg.snap->ps.emplacedIndex) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $767 +line 1287 +;1287: { +line 1288 +;1288: return; +ADDRGP4 $760 +JUMPV +LABELV $767 +line 1291 +;1289: } +;1290: +;1291: cg.weaponSelectTime = cg.time; +ADDRGP4 cg+13372 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1292 +;1292: original = cg.weaponSelect; +ADDRLP4 4 +ADDRGP4 cg+3508 +INDIRI4 +ASGNI4 +line 1294 +;1293: +;1294: for ( i = 0 ; i < 16 ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $773 +line 1295 +;1295: cg.weaponSelect++; +ADDRLP4 8 +ADDRGP4 cg+3508 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1296 +;1296: if ( cg.weaponSelect == 16 ) { +ADDRGP4 cg+3508 +INDIRI4 +CNSTI4 16 +NEI4 $778 +line 1297 +;1297: cg.weaponSelect = 0; +ADDRGP4 cg+3508 +CNSTI4 0 +ASGNI4 +line 1298 +;1298: } +LABELV $778 +line 1302 +;1299: // if ( cg.weaponSelect == WP_STUN_BATON ) { +;1300: // continue; // never cycle to gauntlet +;1301: // } +;1302: if ( CG_WeaponSelectable( cg.weaponSelect ) ) { +ADDRGP4 cg+3508 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 CG_WeaponSelectable +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $782 +line 1303 +;1303: break; +ADDRGP4 $775 +JUMPV +LABELV $782 +line 1305 +;1304: } +;1305: } +LABELV $774 +line 1294 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LTI4 $773 +LABELV $775 +line 1306 +;1306: if ( i == 16 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +NEI4 $785 +line 1307 +;1307: cg.weaponSelect = original; +ADDRGP4 cg+3508 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 1308 +;1308: } +ADDRGP4 $786 +JUMPV +LABELV $785 +line 1310 +;1309: else +;1310: { +line 1311 +;1311: trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 trap_S_MuteSound +CALLV +pop +line 1312 +;1312: } +LABELV $786 +line 1313 +;1313:} +LABELV $760 +endproc CG_NextWeapon_f 16 8 +export CG_PrevWeapon_f +proc CG_PrevWeapon_f 16 8 +line 1320 +;1314: +;1315:/* +;1316:=============== +;1317:CG_PrevWeapon_f +;1318:=============== +;1319:*/ +;1320:void CG_PrevWeapon_f( void ) { +line 1324 +;1321: int i; +;1322: int original; +;1323: +;1324: if ( !cg.snap ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $790 +line 1325 +;1325: return; +ADDRGP4 $789 +JUMPV +LABELV $790 +line 1327 +;1326: } +;1327: if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $793 +line 1328 +;1328: return; +ADDRGP4 $789 +JUMPV +LABELV $793 +line 1331 +;1329: } +;1330: +;1331: if (cg.snap->ps.emplacedIndex) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $796 +line 1332 +;1332: { +line 1333 +;1333: return; +ADDRGP4 $789 +JUMPV +LABELV $796 +line 1336 +;1334: } +;1335: +;1336: cg.weaponSelectTime = cg.time; +ADDRGP4 cg+13372 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1337 +;1337: original = cg.weaponSelect; +ADDRLP4 4 +ADDRGP4 cg+3508 +INDIRI4 +ASGNI4 +line 1339 +;1338: +;1339: for ( i = 0 ; i < 16 ; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $802 +line 1340 +;1340: cg.weaponSelect--; +ADDRLP4 8 +ADDRGP4 cg+3508 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1341 +;1341: if ( cg.weaponSelect == -1 ) { +ADDRGP4 cg+3508 +INDIRI4 +CNSTI4 -1 +NEI4 $807 +line 1342 +;1342: cg.weaponSelect = 15; +ADDRGP4 cg+3508 +CNSTI4 15 +ASGNI4 +line 1343 +;1343: } +LABELV $807 +line 1347 +;1344: // if ( cg.weaponSelect == WP_STUN_BATON ) { +;1345: // continue; // never cycle to gauntlet +;1346: // } +;1347: if ( CG_WeaponSelectable( cg.weaponSelect ) ) { +ADDRGP4 cg+3508 +INDIRI4 +ARGI4 +ADDRLP4 12 +ADDRGP4 CG_WeaponSelectable +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $811 +line 1348 +;1348: break; +ADDRGP4 $804 +JUMPV +LABELV $811 +line 1350 +;1349: } +;1350: } +LABELV $803 +line 1339 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +LTI4 $802 +LABELV $804 +line 1351 +;1351: if ( i == 16 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 16 +NEI4 $814 +line 1352 +;1352: cg.weaponSelect = original; +ADDRGP4 cg+3508 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 1353 +;1353: } +ADDRGP4 $815 +JUMPV +LABELV $814 +line 1355 +;1354: else +;1355: { +line 1356 +;1356: trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 trap_S_MuteSound +CALLV +pop +line 1357 +;1357: } +LABELV $815 +line 1358 +;1358:} +LABELV $789 +endproc CG_PrevWeapon_f 16 8 +export CG_Weapon_f +proc CG_Weapon_f 32 8 +line 1365 +;1359: +;1360:/* +;1361:=============== +;1362:CG_Weapon_f +;1363:=============== +;1364:*/ +;1365:void CG_Weapon_f( void ) { +line 1368 +;1366: int num; +;1367: +;1368: if ( !cg.snap ) { +ADDRGP4 cg+36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $819 +line 1369 +;1369: return; +ADDRGP4 $818 +JUMPV +LABELV $819 +line 1371 +;1370: } +;1371: if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) { +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $822 +line 1372 +;1372: return; +ADDRGP4 $818 +JUMPV +LABELV $822 +line 1375 +;1373: } +;1374: +;1375: if (cg.snap->ps.emplacedIndex) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $825 +line 1376 +;1376: { +line 1377 +;1377: return; +ADDRGP4 $818 +JUMPV +LABELV $825 +line 1380 +;1378: } +;1379: +;1380: num = atoi( CG_Argv( 1 ) ); +CNSTI4 1 +ARGI4 +ADDRLP4 4 +ADDRGP4 CG_Argv +CALLP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 1382 +;1381: +;1382: if ( num < 1 || num > 15 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +LTI4 $830 +ADDRLP4 0 +INDIRI4 +CNSTI4 15 +LEI4 $828 +LABELV $830 +line 1383 +;1383: return; +ADDRGP4 $818 +JUMPV +LABELV $828 +line 1386 +;1384: } +;1385: +;1386: if (num == 1 && cg.snap->ps.weapon == WP_SABER) +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +NEI4 $831 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $831 +line 1387 +;1387: { +line 1388 +;1388: if (cg.snap->ps.weaponTime < 1) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRI4 +CNSTI4 1 +GEI4 $818 +line 1389 +;1389: { +line 1390 +;1390: trap_SendConsoleCommand("sv_saberswitch"); +ADDRGP4 $837 +ARGP4 +ADDRGP4 trap_SendConsoleCommand +CALLV +pop +line 1391 +;1391: } +line 1392 +;1392: return; +ADDRGP4 $818 +JUMPV +LABELV $831 +line 1396 +;1393: } +;1394: +;1395: //rww - hack to make weapon numbers same as single player +;1396: if (num > WP_STUN_BATON) +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +LEI4 $838 +line 1397 +;1397: { +line 1398 +;1398: num++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1399 +;1399: } +ADDRGP4 $839 +JUMPV +LABELV $838 +line 1401 +;1400: else +;1401: { +line 1402 +;1402: if (cg.snap->ps.stats[STAT_WEAPONS] & (1 << WP_SABER)) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $840 +line 1403 +;1403: { +line 1404 +;1404: num = WP_SABER; +ADDRLP4 0 +CNSTI4 2 +ASGNI4 +line 1405 +;1405: } +ADDRGP4 $841 +JUMPV +LABELV $840 +line 1407 +;1406: else +;1407: { +line 1408 +;1408: num = WP_STUN_BATON; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 1409 +;1409: } +LABELV $841 +line 1410 +;1410: } +LABELV $839 +line 1412 +;1411: +;1412: if (num > WP_DET_PACK+1) +ADDRLP4 0 +INDIRI4 +CNSTI4 14 +LEI4 $843 +line 1413 +;1413: { //other weapons are off limits due to not actually being weapon weapons +line 1414 +;1414: return; +ADDRGP4 $818 +JUMPV +LABELV $843 +line 1417 +;1415: } +;1416: +;1417: if (num >= WP_THERMAL) +ADDRLP4 0 +INDIRI4 +CNSTI4 11 +LTI4 $845 +line 1418 +;1418: { +line 1419 +;1419: int weap, i = 0; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +line 1421 +;1420: +;1421: if (cg.snap->ps.weapon >= WP_THERMAL && +ADDRLP4 24 +CNSTI4 192 +ASGNI4 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 11 +LTI4 $847 +ADDRGP4 cg+36 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRI4 +CNSTI4 13 +GTI4 $847 +line 1423 +;1422: cg.snap->ps.weapon <= WP_DET_PACK) +;1423: { +line 1425 +;1424: // already in cycle range so start with next cycle item +;1425: weap = cg.snap->ps.weapon + 1; +ADDRLP4 16 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1426 +;1426: } +ADDRGP4 $853 +JUMPV +LABELV $847 +line 1428 +;1427: else +;1428: { +line 1430 +;1429: // not in cycle range, so start with thermal detonator +;1430: weap = WP_THERMAL; +ADDRLP4 16 +CNSTI4 11 +ASGNI4 +line 1431 +;1431: } +ADDRGP4 $853 +JUMPV +LABELV $852 +line 1435 +;1432: +;1433: // prevent an endless loop +;1434: while ( i <= 4 ) +;1435: { +line 1436 +;1436: if (weap > WP_DET_PACK) +ADDRLP4 16 +INDIRI4 +CNSTI4 13 +LEI4 $855 +line 1437 +;1437: { +line 1438 +;1438: weap = WP_THERMAL; +ADDRLP4 16 +CNSTI4 11 +ASGNI4 +line 1439 +;1439: } +LABELV $855 +line 1441 +;1440: +;1441: if (CG_WeaponSelectable(weap)) +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 CG_WeaponSelectable +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +EQI4 $857 +line 1442 +;1442: { +line 1443 +;1443: num = weap; +ADDRLP4 0 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 1444 +;1444: break; +ADDRGP4 $854 +JUMPV +LABELV $857 +line 1447 +;1445: } +;1446: +;1447: weap++; +ADDRLP4 16 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1448 +;1448: i++; +ADDRLP4 20 +ADDRLP4 20 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1449 +;1449: } +LABELV $853 +line 1434 +ADDRLP4 20 +INDIRI4 +CNSTI4 4 +LEI4 $852 +LABELV $854 +line 1450 +;1450: } +LABELV $845 +line 1452 +;1451: +;1452: if (!CG_WeaponSelectable(num)) +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 16 +ADDRGP4 CG_WeaponSelectable +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $859 +line 1453 +;1453: { +line 1454 +;1454: return; +ADDRGP4 $818 +JUMPV +LABELV $859 +line 1457 +;1455: } +;1456: +;1457: cg.weaponSelectTime = cg.time; +ADDRGP4 cg+13372 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1459 +;1458: +;1459: if ( ! ( cg.snap->ps.stats[STAT_WEAPONS] & ( 1 << num ) ) ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +NEI4 $863 +line 1460 +;1460: { +line 1461 +;1461: if (num == WP_SABER) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +NEI4 $818 +line 1462 +;1462: { //don't have saber, try the stun baton on the same slot +line 1463 +;1463: num = WP_STUN_BATON; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 1465 +;1464: +;1465: if ( ! ( cg.snap->ps.stats[STAT_WEAPONS] & ( 1 << num ) ) ) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDRLP4 0 +INDIRI4 +LSHI4 +BANDI4 +CNSTI4 0 +NEI4 $867 +line 1466 +;1466: { +line 1467 +;1467: return; +ADDRGP4 $818 +JUMPV +line 1469 +;1468: } +;1469: } +line 1471 +;1470: else +;1471: { +line 1472 +;1472: return; // don't have the weapon +LABELV $867 +line 1474 +;1473: } +;1474: } +LABELV $863 +line 1476 +;1475: +;1476: if (cg.weaponSelect != num) +ADDRGP4 cg+3508 +INDIRI4 +ADDRLP4 0 +INDIRI4 +EQI4 $871 +line 1477 +;1477: { +line 1478 +;1478: trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 trap_S_MuteSound +CALLV +pop +line 1479 +;1479: } +LABELV $871 +line 1481 +;1480: +;1481: cg.weaponSelect = num; +ADDRGP4 cg+3508 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 1482 +;1482:} +LABELV $818 +endproc CG_Weapon_f 32 8 +export CG_OutOfAmmoChange +proc CG_OutOfAmmoChange 12 8 +line 1492 +;1483: +;1484:/* +;1485:=================== +;1486:CG_OutOfAmmoChange +;1487: +;1488:The current weapon has just run out of ammo +;1489:=================== +;1490:*/ +;1491:void CG_OutOfAmmoChange( int oldWeapon ) +;1492:{ +line 1495 +;1493: int i; +;1494: +;1495: cg.weaponSelectTime = cg.time; +ADDRGP4 cg+13372 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1497 +;1496: +;1497: for ( i = WP_DET_PACK ; i > 0 ; i-- ) //We don't want the emplaced or turret +ADDRLP4 0 +CNSTI4 13 +ASGNI4 +LABELV $879 +line 1498 +;1498: { +line 1499 +;1499: if ( CG_WeaponSelectable( i ) ) +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 CG_WeaponSelectable +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $883 +line 1500 +;1500: { +line 1506 +;1501: /* +;1502: if ( 1 == cg_autoswitch.integer && +;1503: ( i == WP_TRIP_MINE || i == WP_DET_PACK || i == WP_THERMAL || i == WP_ROCKET_LAUNCHER) ) // safe weapon switch +;1504: */ +;1505: //rww - Don't we want to make sure i != one of these if autoswitch is 1 (safe)? +;1506: if (cg_autoswitch.integer != 1 || (i != WP_TRIP_MINE && i != WP_DET_PACK && i != WP_THERMAL && i != WP_ROCKET_LAUNCHER)) +ADDRGP4 cg_autoswitch+12 +INDIRI4 +CNSTI4 1 +NEI4 $888 +ADDRLP4 0 +INDIRI4 +CNSTI4 12 +EQI4 $885 +ADDRLP4 0 +INDIRI4 +CNSTI4 13 +EQI4 $885 +ADDRLP4 0 +INDIRI4 +CNSTI4 11 +EQI4 $885 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +EQI4 $885 +LABELV $888 +line 1507 +;1507: { +line 1508 +;1508: if (i != oldWeapon) +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRI4 +EQI4 $889 +line 1509 +;1509: { //don't even do anything if we're just selecting the weapon we already have/had +line 1510 +;1510: cg.weaponSelect = i; +ADDRGP4 cg+3508 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 1511 +;1511: break; +ADDRGP4 $881 +JUMPV +LABELV $889 +line 1513 +;1512: } +;1513: } +LABELV $885 +line 1514 +;1514: } +LABELV $883 +line 1515 +;1515: } +LABELV $880 +line 1497 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GTI4 $879 +LABELV $881 +line 1517 +;1516: +;1517: trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON); +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 trap_S_MuteSound +CALLV +pop +line 1518 +;1518:} +LABELV $876 +endproc CG_OutOfAmmoChange 12 8 +export CG_FireATST +proc CG_FireATST 8 16 +line 1531 +;1519: +;1520: +;1521: +;1522:/* +;1523:=================================================================================================== +;1524: +;1525:WEAPON EVENTS +;1526: +;1527:=================================================================================================== +;1528:*/ +;1529: +;1530:void CG_FireATST(centity_t *cent, qboolean altFire) +;1531:{ +line 1563 +;1532://No muzzle flash for now? +;1533:#if 0 +;1534: int getMeBolt = 0; +;1535: mdxaBone_t boltMatrix; +;1536: vec3_t flashorigin, flashdir; +;1537: +;1538: if (!cgs.clientinfo[cent->currentState.number].bolt_lhand) +;1539: { +;1540: return; +;1541: } +;1542: +;1543: if (altFire) +;1544: { +;1545: getMeBolt = cgs.clientinfo[cent->currentState.number].bolt_lhand; +;1546: } +;1547: else +;1548: { +;1549: getMeBolt = cgs.clientinfo[cent->currentState.number].bolt_rhand; +;1550: } +;1551: +;1552: if (!(trap_G2API_GetBoltMatrix(cent->ghoul2, 0, getMeBolt, &boltMatrix, cent->lerpAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale))) +;1553: { +;1554: return; +;1555: } +;1556: +;1557: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin); +;1558: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir); +;1559: +;1560: trap_FX_PlayEffectID(trap_FX_RegisterEffect("turret/muzzle_flash.efx"), flashorigin, flashdir); +;1561:#endif +;1562: +;1563: trap_S_StartSound(NULL, cent->currentState.number, CHAN_WEAPON, trap_S_RegisterSound(va("sound/weapons/atst/ATSTfire1.wav"/*, Q_irand(1,4)*/))); +ADDRGP4 $894 +ARGP4 +ADDRLP4 0 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +CNSTP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1564 +;1564:} +LABELV $893 +endproc CG_FireATST 8 16 +export CG_GetClientWeaponMuzzleBoltPoint +proc CG_GetClientWeaponMuzzleBoltPoint 80 36 +line 1567 +;1565: +;1566:void CG_GetClientWeaponMuzzleBoltPoint(int clIndex, vec3_t to) +;1567:{ +line 1571 +;1568: centity_t *cent; +;1569: mdxaBone_t boltMatrix; +;1570: +;1571: if (clIndex < 0 || clIndex >= MAX_CLIENTS) +ADDRLP4 52 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +LTI4 $898 +ADDRLP4 52 +INDIRI4 +CNSTI4 32 +LTI4 $896 +LABELV $898 +line 1572 +;1572: { +line 1573 +;1573: return; +ADDRGP4 $895 +JUMPV +LABELV $896 +line 1576 +;1574: } +;1575: +;1576: cent = &cg_entities[clIndex]; +ADDRLP4 0 +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 1578 +;1577: +;1578: if (!cent || !cent->ghoul2 || !trap_G2_HaveWeGhoul2Models(cent->ghoul2) || +ADDRLP4 60 +CNSTU4 0 +ASGNU4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 60 +INDIRU4 +EQU4 $903 +ADDRLP4 64 +ADDRLP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CVPU4 4 +ADDRLP4 60 +INDIRU4 +EQU4 $903 +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRLP4 68 +ADDRGP4 trap_G2_HaveWeGhoul2Models +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +EQI4 $903 +ADDRLP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 72 +ADDRGP4 trap_G2API_HasGhoul2ModelOnIndex +CALLI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +NEI4 $899 +LABELV $903 +line 1580 +;1579: !trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), 1)) +;1580: { +line 1581 +;1581: return; +ADDRGP4 $895 +JUMPV +LABELV $899 +line 1584 +;1582: } +;1583: +;1584: trap_G2API_GetBoltMatrix(cent->ghoul2, 1, 0, &boltMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); +ADDRLP4 0 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1016 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRGP4 cg+64 +INDIRI4 +ARGI4 +ADDRGP4 cgs+36364 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 964 +ADDP4 +ARGP4 +ADDRGP4 trap_G2API_GetBoltMatrix +CALLI4 +pop +line 1585 +;1585: trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, to); +ADDRLP4 4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_G2API_GiveMeVectorFromMatrix +CALLV +pop +line 1586 +;1586:} +LABELV $895 +endproc CG_GetClientWeaponMuzzleBoltPoint 80 36 +export CG_FireWeapon +proc CG_FireWeapon 20 16 +line 1595 +;1587: +;1588:/* +;1589:================ +;1590:CG_FireWeapon +;1591: +;1592:Caused by an EV_FIRE_WEAPON event +;1593:================ +;1594:*/ +;1595:void CG_FireWeapon( centity_t *cent, qboolean altFire ) { +line 1600 +;1596: entityState_t *ent; +;1597: int c; +;1598: weaponInfo_t *weap; +;1599: +;1600: if (cent->isATST) +ADDRFP4 0 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $907 +line 1601 +;1601: { +line 1602 +;1602: CG_FireATST(cent, altFire); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 CG_FireATST +CALLV +pop +line 1603 +;1603: return; +ADDRGP4 $906 +JUMPV +LABELV $907 +line 1606 +;1604: } +;1605: +;1606: ent = ¢->currentState; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 1607 +;1607: if ( ent->weapon == WP_NONE ) { +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $909 +line 1608 +;1608: return; +ADDRGP4 $906 +JUMPV +LABELV $909 +line 1610 +;1609: } +;1610: if ( ent->weapon >= WP_NUM_WEAPONS ) { +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 16 +LTI4 $911 +line 1611 +;1611: CG_Error( "CG_FireWeapon: ent->weapon >= WP_NUM_WEAPONS" ); +ADDRGP4 $913 +ARGP4 +ADDRGP4 CG_Error +CALLV +pop +line 1612 +;1612: return; +ADDRGP4 $906 +JUMPV +LABELV $911 +line 1614 +;1613: } +;1614: weap = &cg_weapons[ ent->weapon ]; +ADDRLP4 4 +CNSTI4 208 +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_weapons +ADDP4 +ASGNP4 +line 1618 +;1615: +;1616: // mark the entity as muzzle flashing, so when it is added it will +;1617: // append the flash to the weapon model +;1618: cent->muzzleFlashTime = cg.time; +ADDRFP4 0 +INDIRP4 +CNSTI4 600 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 1620 +;1619: +;1620: if (cg.predictedPlayerState.clientNum == cent->currentState.number) +ADDRGP4 cg+96+144 +INDIRI4 +ADDRFP4 0 +INDIRP4 +INDIRI4 +NEI4 $915 +line 1621 +;1621: { +line 1622 +;1622: if ((ent->weapon == WP_BRYAR_PISTOL && altFire) || +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $922 +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $923 +LABELV $922 +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $924 +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $923 +LABELV $924 +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $919 +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $919 +LABELV $923 +line 1625 +;1623: (ent->weapon == WP_BOWCASTER && !altFire) || +;1624: (ent->weapon == WP_DEMP2 && altFire)) +;1625: { +line 1626 +;1626: float val = ( cg.time - cent->currentState.constantLight ) * 0.001f; +ADDRLP4 12 +CNSTF4 981668463 +ADDRGP4 cg+64 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +SUBI4 +CVIF4 4 +MULF4 +ASGNF4 +line 1628 +;1627: +;1628: if (val > 3) +ADDRLP4 12 +INDIRF4 +CNSTF4 1077936128 +LEF4 $926 +line 1629 +;1629: { +line 1630 +;1630: val = 3; +ADDRLP4 12 +CNSTF4 1077936128 +ASGNF4 +line 1631 +;1631: } +LABELV $926 +line 1632 +;1632: if (val < 0.2) +ADDRLP4 12 +INDIRF4 +CNSTF4 1045220557 +GEF4 $928 +line 1633 +;1633: { +line 1634 +;1634: val = 0.2; +ADDRLP4 12 +CNSTF4 1045220557 +ASGNF4 +line 1635 +;1635: } +LABELV $928 +line 1637 +;1636: +;1637: val *= 2; +ADDRLP4 12 +CNSTF4 1073741824 +ADDRLP4 12 +INDIRF4 +MULF4 +ASGNF4 +line 1639 +;1638: +;1639: CGCam_Shake( val, 250 ); +ADDRLP4 12 +INDIRF4 +ARGF4 +CNSTI4 250 +ARGI4 +ADDRGP4 CGCam_Shake +CALLV +pop +line 1640 +;1640: } +ADDRGP4 $920 +JUMPV +LABELV $919 +line 1641 +;1641: else if (ent->weapon == WP_ROCKET_LAUNCHER || +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 10 +EQI4 $933 +ADDRLP4 12 +INDIRI4 +CNSTI4 7 +NEI4 $934 +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $933 +LABELV $934 +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 9 +NEI4 $930 +LABELV $933 +line 1644 +;1642: (ent->weapon == WP_REPEATER && altFire) || +;1643: ent->weapon == WP_FLECHETTE) +;1644: { +line 1645 +;1645: if (ent->weapon == WP_ROCKET_LAUNCHER) +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 10 +NEI4 $935 +line 1646 +;1646: { +line 1647 +;1647: CGCam_Shake(Q_irand(2, 3), 350); +CNSTI4 2 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 16 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 350 +ARGI4 +ADDRGP4 CGCam_Shake +CALLV +pop +line 1648 +;1648: } +ADDRGP4 $936 +JUMPV +LABELV $935 +line 1649 +;1649: else if (ent->weapon == WP_REPEATER) +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 7 +NEI4 $937 +line 1650 +;1650: { +line 1651 +;1651: CGCam_Shake(Q_irand(2, 3), 350); +CNSTI4 2 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 16 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 350 +ARGI4 +ADDRGP4 CGCam_Shake +CALLV +pop +line 1652 +;1652: } +ADDRGP4 $938 +JUMPV +LABELV $937 +line 1653 +;1653: else if (ent->weapon == WP_FLECHETTE) +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 9 +NEI4 $939 +line 1654 +;1654: { +line 1655 +;1655: if (altFire) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $941 +line 1656 +;1656: { +line 1657 +;1657: CGCam_Shake(Q_irand(2, 3), 350); +CNSTI4 2 +ARGI4 +CNSTI4 3 +ARGI4 +ADDRLP4 16 +ADDRGP4 Q_irand +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ARGF4 +CNSTI4 350 +ARGI4 +ADDRGP4 CGCam_Shake +CALLV +pop +line 1658 +;1658: } +ADDRGP4 $942 +JUMPV +LABELV $941 +line 1660 +;1659: else +;1660: { +line 1661 +;1661: CGCam_Shake(1.5, 250); +CNSTF4 1069547520 +ARGF4 +CNSTI4 250 +ARGI4 +ADDRGP4 CGCam_Shake +CALLV +pop +line 1662 +;1662: } +LABELV $942 +line 1663 +;1663: } +LABELV $939 +LABELV $938 +LABELV $936 +line 1664 +;1664: } +LABELV $930 +LABELV $920 +line 1665 +;1665: } +LABELV $915 +line 1667 +;1666: // lightning gun only does this this on initial press +;1667: if ( ent->weapon == WP_DEMP2 ) { +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $943 +line 1668 +;1668: if ( cent->pe.lightningFiring ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 844 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $945 +line 1669 +;1669: return; +ADDRGP4 $906 +JUMPV +LABELV $945 +line 1671 +;1670: } +;1671: } +LABELV $943 +line 1674 +;1672: +;1673: // play quad sound if needed +;1674: if ( cent->currentState.powerups & ( 1 << PW_QUAD ) ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $947 +line 1676 +;1675: //trap_S_StartSound (NULL, cent->currentState.number, CHAN_ITEM, cgs.media.quadSound ); +;1676: } +LABELV $947 +line 1680 +;1677: +;1678: +;1679: // play a sound +;1680: if (altFire) +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $949 +line 1681 +;1681: { +line 1683 +;1682: // play a sound +;1683: for ( c = 0 ; c < 4 ; c++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $951 +line 1684 +;1684: if ( !weap->altFlashSound[c] ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $955 +line 1685 +;1685: break; +ADDRGP4 $953 +JUMPV +LABELV $955 +line 1687 +;1686: } +;1687: } +LABELV $952 +line 1683 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $951 +LABELV $953 +line 1688 +;1688: if ( c > 0 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LEI4 $950 +line 1689 +;1689: c = rand() % c; +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 12 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MODI4 +ASGNI4 +line 1690 +;1690: if ( weap->altFlashSound[c] ) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $950 +line 1691 +;1691: { +line 1692 +;1692: trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->altFlashSound[c] ); +CNSTP4 0 +ARGP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +CNSTI4 2 +ASGNI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 16 +INDIRI4 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1693 +;1693: } +line 1694 +;1694: } +line 1699 +;1695:// if ( weap->altFlashSnd ) +;1696:// { +;1697:// trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->altFlashSnd ); +;1698:// } +;1699: } +ADDRGP4 $950 +JUMPV +LABELV $949 +line 1701 +;1700: else +;1701: { +line 1703 +;1702: // play a sound +;1703: for ( c = 0 ; c < 4 ; c++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $961 +line 1704 +;1704: if ( !weap->flashSound[c] ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $965 +line 1705 +;1705: break; +ADDRGP4 $963 +JUMPV +LABELV $965 +line 1707 +;1706: } +;1707: } +LABELV $962 +line 1703 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $961 +LABELV $963 +line 1708 +;1708: if ( c > 0 ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LEI4 $967 +line 1709 +;1709: c = rand() % c; +ADDRLP4 12 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 12 +INDIRI4 +ADDRLP4 0 +INDIRI4 +MODI4 +ASGNI4 +line 1710 +;1710: if ( weap->flashSound[c] ) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $969 +line 1711 +;1711: { +line 1712 +;1712: trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->flashSound[c] ); +CNSTP4 0 +ARGP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +ARGI4 +ADDRLP4 16 +CNSTI4 2 +ASGNI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 16 +INDIRI4 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 1713 +;1713: } +LABELV $969 +line 1714 +;1714: } +LABELV $967 +line 1715 +;1715: } +LABELV $950 +line 1716 +;1716:} +LABELV $906 +endproc CG_FireWeapon 20 16 +lit +align 4 +LABELV $972 +byte 4 0 +byte 4 0 +byte 4 1065353216 +export CG_MissileHitWall +code +proc CG_MissileHitWall 24 12 +line 1727 +;1717: +;1718: +;1719:/* +;1720:================= +;1721:CG_MissileHitWall +;1722: +;1723:Caused by an EV_MISSILE_MISS event, or directly by local bullet tracing +;1724:================= +;1725:*/ +;1726:void CG_MissileHitWall(int weapon, int clientNum, vec3_t origin, vec3_t dir, impactSound_t soundType, qboolean altFire, int charge) +;1727:{ +line 1729 +;1728: int parm; +;1729: vec3_t up={0,0,1}; +ADDRLP4 0 +ADDRGP4 $972 +INDIRB +ASGNB 12 +line 1731 +;1730: +;1731: switch( weapon ) +ADDRLP4 16 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 3 +LTI4 $973 +ADDRLP4 16 +INDIRI4 +CNSTI4 15 +GTI4 $973 +ADDRLP4 16 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $999-12 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $999 +address $975 +address $979 +address $980 +address $981 +address $982 +address $985 +address $989 +address $992 +address $993 +address $973 +address $973 +address $998 +address $978 +code +line 1732 +;1732: { +LABELV $975 +line 1734 +;1733: case WP_BRYAR_PISTOL: +;1734: if ( altFire ) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $976 +line 1735 +;1735: { +line 1736 +;1736: parm = charge; +ADDRLP4 12 +ADDRFP4 24 +INDIRI4 +ASGNI4 +line 1737 +;1737: FX_BryarAltHitWall( origin, dir, parm ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRGP4 FX_BryarAltHitWall +CALLV +pop +line 1738 +;1738: } +ADDRGP4 $974 +JUMPV +LABELV $976 +line 1740 +;1739: else +;1740: { +line 1741 +;1741: FX_BryarHitWall( origin, dir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 FX_BryarHitWall +CALLV +pop +line 1742 +;1742: } +line 1743 +;1743: break; +ADDRGP4 $974 +JUMPV +LABELV $978 +line 1746 +;1744: +;1745: case WP_TURRET: +;1746: FX_TurretHitWall( origin, dir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 FX_TurretHitWall +CALLV +pop +line 1747 +;1747: break; +ADDRGP4 $974 +JUMPV +LABELV $979 +line 1750 +;1748: +;1749: case WP_BLASTER: +;1750: FX_BlasterWeaponHitWall( origin, dir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 FX_BlasterWeaponHitWall +CALLV +pop +line 1751 +;1751: break; +ADDRGP4 $974 +JUMPV +LABELV $980 +line 1754 +;1752: +;1753: case WP_DISRUPTOR: +;1754: FX_DisruptorAltMiss( origin, dir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 FX_DisruptorAltMiss +CALLV +pop +line 1755 +;1755: break; +ADDRGP4 $974 +JUMPV +LABELV $981 +line 1758 +;1756: +;1757: case WP_BOWCASTER: +;1758: FX_BowcasterHitWall( origin, dir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 FX_BowcasterHitWall +CALLV +pop +line 1759 +;1759: break; +ADDRGP4 $974 +JUMPV +LABELV $982 +line 1762 +;1760: +;1761: case WP_REPEATER: +;1762: if ( altFire ) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $983 +line 1763 +;1763: { +line 1764 +;1764: FX_RepeaterAltHitWall( origin, dir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 FX_RepeaterAltHitWall +CALLV +pop +line 1765 +;1765: } +ADDRGP4 $974 +JUMPV +LABELV $983 +line 1767 +;1766: else +;1767: { +line 1768 +;1768: FX_RepeaterHitWall( origin, dir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 FX_RepeaterHitWall +CALLV +pop +line 1769 +;1769: } +line 1770 +;1770: break; +ADDRGP4 $974 +JUMPV +LABELV $985 +line 1773 +;1771: +;1772: case WP_DEMP2: +;1773: if (altFire) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $986 +line 1774 +;1774: { +line 1775 +;1775: trap_FX_PlayEffectID(trap_FX_RegisterEffect("demp2/altDetonate.efx"), origin, dir); +ADDRGP4 $988 +ARGP4 +ADDRLP4 20 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1776 +;1776: } +ADDRGP4 $974 +JUMPV +LABELV $986 +line 1778 +;1777: else +;1778: { +line 1779 +;1779: FX_DEMP2_HitWall( origin, dir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 FX_DEMP2_HitWall +CALLV +pop +line 1780 +;1780: } +line 1781 +;1781: break; +ADDRGP4 $974 +JUMPV +LABELV $989 +line 1790 +;1782: +;1783: case WP_FLECHETTE: +;1784: /*if (altFire) +;1785: { +;1786: CG_SurfaceExplosion(origin, dir, 20.0f, 12.0f, qtrue); +;1787: } +;1788: else +;1789: */ +;1790: if (!altFire) +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $974 +line 1791 +;1791: { +line 1792 +;1792: FX_FlechetteWeaponHitWall( origin, dir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 FX_FlechetteWeaponHitWall +CALLV +pop +line 1793 +;1793: } +line 1794 +;1794: break; +ADDRGP4 $974 +JUMPV +LABELV $992 +line 1797 +;1795: +;1796: case WP_ROCKET_LAUNCHER: +;1797: FX_RocketHitWall( origin, dir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 FX_RocketHitWall +CALLV +pop +line 1798 +;1798: break; +ADDRGP4 $974 +JUMPV +LABELV $993 +line 1801 +;1799: +;1800: case WP_THERMAL: +;1801: trap_FX_PlayEffectID( cgs.effects.thermalExplosionEffect, origin, dir ); +ADDRGP4 cgs+71564+132 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1802 +;1802: trap_FX_PlayEffectID( cgs.effects.thermalShockwaveEffect, origin, up ); +ADDRGP4 cgs+71564+136 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1803 +;1803: break; +ADDRGP4 $974 +JUMPV +LABELV $998 +line 1806 +;1804: +;1805: case WP_EMPLACED_GUN: +;1806: FX_BlasterWeaponHitWall( origin, dir ); +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRGP4 FX_BlasterWeaponHitWall +CALLV +pop +line 1808 +;1807: //FIXME: Give it its own hit wall effect +;1808: break; +LABELV $973 +LABELV $974 +line 1810 +;1809: } +;1810:} +LABELV $971 +endproc CG_MissileHitWall 24 12 +lit +align 4 +LABELV $1002 +byte 4 0 +byte 4 0 +byte 4 1065353216 +export CG_MissileHitPlayer +code +proc CG_MissileHitPlayer 24 12 +line 1819 +;1811: +;1812: +;1813:/* +;1814:================= +;1815:CG_MissileHitPlayer +;1816:================= +;1817:*/ +;1818:void CG_MissileHitPlayer(int weapon, vec3_t origin, vec3_t dir, int entityNum, qboolean altFire) +;1819:{ +line 1820 +;1820: qboolean humanoid = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 1821 +;1821: vec3_t up={0,0,1}; +ADDRLP4 4 +ADDRGP4 $1002 +INDIRB +ASGNB 12 +line 1841 +;1822: +;1823: /* +;1824: // NOTENOTE Non-portable code from single player +;1825: if ( cent->gent ) +;1826: { +;1827: other = &g_entities[cent->gent->s.otherEntityNum]; +;1828: +;1829: if ( other->client && other->client->playerTeam == TEAM_BOTS ) +;1830: { +;1831: humanoid = qfalse; +;1832: } +;1833: } +;1834: */ +;1835: +;1836: // NOTENOTE No bleeding in this game +;1837:// CG_Bleed( origin, entityNum ); +;1838: +;1839: // some weapons will make an explosion with the blood, while +;1840: // others will just make the blood +;1841: switch ( weapon ) { +ADDRLP4 16 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 3 +LTI4 $1004 +ADDRLP4 16 +INDIRI4 +CNSTI4 15 +GTI4 $1004 +ADDRLP4 16 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1026-12 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1026 +address $1005 +address $1009 +address $1010 +address $1011 +address $1012 +address $1015 +address $1018 +address $1019 +address $1020 +address $1004 +address $1004 +address $1025 +address $1008 +code +LABELV $1005 +line 1843 +;1842: case WP_BRYAR_PISTOL: +;1843: if ( altFire ) +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $1006 +line 1844 +;1844: { +line 1845 +;1845: FX_BryarAltHitPlayer( origin, dir, humanoid ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 FX_BryarAltHitPlayer +CALLV +pop +line 1846 +;1846: } +ADDRGP4 $1004 +JUMPV +LABELV $1006 +line 1848 +;1847: else +;1848: { +line 1849 +;1849: FX_BryarHitPlayer( origin, dir, humanoid ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 FX_BryarHitPlayer +CALLV +pop +line 1850 +;1850: } +line 1851 +;1851: break; +ADDRGP4 $1004 +JUMPV +LABELV $1008 +line 1854 +;1852: +;1853: case WP_TURRET: +;1854: FX_TurretHitPlayer( origin, dir, humanoid ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 FX_TurretHitPlayer +CALLV +pop +line 1855 +;1855: break; +ADDRGP4 $1004 +JUMPV +LABELV $1009 +line 1858 +;1856: +;1857: case WP_BLASTER: +;1858: FX_BlasterWeaponHitPlayer( origin, dir, humanoid ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 FX_BlasterWeaponHitPlayer +CALLV +pop +line 1859 +;1859: break; +ADDRGP4 $1004 +JUMPV +LABELV $1010 +line 1862 +;1860: +;1861: case WP_DISRUPTOR: +;1862: FX_DisruptorAltHit( origin, dir); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRGP4 FX_DisruptorAltHit +CALLV +pop +line 1863 +;1863: break; +ADDRGP4 $1004 +JUMPV +LABELV $1011 +line 1866 +;1864: +;1865: case WP_BOWCASTER: +;1866: FX_BowcasterHitPlayer( origin, dir, humanoid ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 FX_BowcasterHitPlayer +CALLV +pop +line 1867 +;1867: break; +ADDRGP4 $1004 +JUMPV +LABELV $1012 +line 1870 +;1868: +;1869: case WP_REPEATER: +;1870: if ( altFire ) +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $1013 +line 1871 +;1871: { +line 1872 +;1872: FX_RepeaterAltHitPlayer( origin, dir, humanoid ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 FX_RepeaterAltHitPlayer +CALLV +pop +line 1873 +;1873: } +ADDRGP4 $1004 +JUMPV +LABELV $1013 +line 1875 +;1874: else +;1875: { +line 1876 +;1876: FX_RepeaterHitPlayer( origin, dir, humanoid ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 FX_RepeaterHitPlayer +CALLV +pop +line 1877 +;1877: } +line 1878 +;1878: break; +ADDRGP4 $1004 +JUMPV +LABELV $1015 +line 1890 +;1879: +;1880: case WP_DEMP2: +;1881: // Do a full body effect here for some more feedback +;1882: // NOTENOTE The chaining of the demp2 is not yet implemented. +;1883: /* +;1884: if ( other ) +;1885: { +;1886: other->s.powerups |= ( 1 << PW_DISINT_1 ); +;1887: other->client->ps.powerups[PW_DISINT_1] = cg.time + 650; +;1888: } +;1889: */ +;1890: if (altFire) +ADDRFP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $1016 +line 1891 +;1891: { +line 1892 +;1892: trap_FX_PlayEffectID(trap_FX_RegisterEffect("demp2/altDetonate.efx"), origin, dir); +ADDRGP4 $988 +ARGP4 +ADDRLP4 20 +ADDRGP4 trap_FX_RegisterEffect +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1893 +;1893: } +ADDRGP4 $1004 +JUMPV +LABELV $1016 +line 1895 +;1894: else +;1895: { +line 1896 +;1896: FX_DEMP2_HitPlayer( origin, dir, humanoid ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 FX_DEMP2_HitPlayer +CALLV +pop +line 1897 +;1897: } +line 1898 +;1898: break; +ADDRGP4 $1004 +JUMPV +LABELV $1018 +line 1901 +;1899: +;1900: case WP_FLECHETTE: +;1901: FX_FlechetteWeaponHitPlayer( origin, dir, humanoid ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 FX_FlechetteWeaponHitPlayer +CALLV +pop +line 1902 +;1902: break; +ADDRGP4 $1004 +JUMPV +LABELV $1019 +line 1905 +;1903: +;1904: case WP_ROCKET_LAUNCHER: +;1905: FX_RocketHitPlayer( origin, dir, humanoid ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 FX_RocketHitPlayer +CALLV +pop +line 1906 +;1906: break; +ADDRGP4 $1004 +JUMPV +LABELV $1020 +line 1909 +;1907: +;1908: case WP_THERMAL: +;1909: trap_FX_PlayEffectID( cgs.effects.thermalExplosionEffect, origin, dir ); +ADDRGP4 cgs+71564+132 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1910 +;1910: trap_FX_PlayEffectID( cgs.effects.thermalShockwaveEffect, origin, up ); +ADDRGP4 cgs+71564+136 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 1911 +;1911: break; +ADDRGP4 $1004 +JUMPV +LABELV $1025 +line 1914 +;1912: case WP_EMPLACED_GUN: +;1913: //FIXME: Its own effect? +;1914: FX_BlasterWeaponHitPlayer( origin, dir, humanoid ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 FX_BlasterWeaponHitPlayer +CALLV +pop +line 1915 +;1915: break; +line 1918 +;1916: +;1917: default: +;1918: break; +LABELV $1004 +line 1920 +;1919: } +;1920:} +LABELV $1001 +endproc CG_MissileHitPlayer 24 12 +export CG_Tracer +proc CG_Tracer 224 12 +line 1937 +;1921: +;1922: +;1923:/* +;1924:============================================================================ +;1925: +;1926:BULLETS +;1927: +;1928:============================================================================ +;1929:*/ +;1930: +;1931: +;1932:/* +;1933:=============== +;1934:CG_Tracer +;1935:=============== +;1936:*/ +;1937:void CG_Tracer( vec3_t source, vec3_t dest ) { +line 1946 +;1938: vec3_t forward, right; +;1939: polyVert_t verts[4]; +;1940: vec3_t line; +;1941: float len, begin, end; +;1942: vec3_t start, finish; +;1943: vec3_t midpoint; +;1944: +;1945: // tracer +;1946: VectorSubtract( dest, source, forward ); +ADDRLP4 180 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 184 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 108 +ADDRLP4 180 +INDIRP4 +INDIRF4 +ADDRLP4 184 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 188 +CNSTI4 4 +ASGNI4 +ADDRLP4 108+4 +ADDRLP4 180 +INDIRP4 +ADDRLP4 188 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 184 +INDIRP4 +ADDRLP4 188 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 192 +CNSTI4 8 +ASGNI4 +ADDRLP4 108+8 +ADDRFP4 4 +INDIRP4 +ADDRLP4 192 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 192 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 1947 +;1947: len = VectorNormalize( forward ); +ADDRLP4 108 +ARGP4 +ADDRLP4 196 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 164 +ADDRLP4 196 +INDIRF4 +ASGNF4 +line 1950 +;1948: +;1949: // start at least a little ways from the muzzle +;1950: if ( len < 100 ) { +ADDRLP4 164 +INDIRF4 +CNSTF4 1120403456 +GEF4 $1031 +line 1951 +;1951: return; +ADDRGP4 $1028 +JUMPV +LABELV $1031 +line 1953 +;1952: } +;1953: begin = 50 + random() * (len - 60); +ADDRLP4 200 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 160 +ADDRLP4 200 +INDIRI4 +CNSTI4 32767 +BANDI4 +CVIF4 4 +CNSTF4 1191181824 +DIVF4 +ADDRLP4 164 +INDIRF4 +CNSTF4 1114636288 +SUBF4 +MULF4 +CNSTF4 1112014848 +ADDF4 +ASGNF4 +line 1954 +;1954: end = begin + cg_tracerLength.value; +ADDRLP4 156 +ADDRLP4 160 +INDIRF4 +ADDRGP4 cg_tracerLength+8 +INDIRF4 +ADDF4 +ASGNF4 +line 1955 +;1955: if ( end > len ) { +ADDRLP4 156 +INDIRF4 +ADDRLP4 164 +INDIRF4 +LEF4 $1034 +line 1956 +;1956: end = len; +ADDRLP4 156 +ADDRLP4 164 +INDIRF4 +ASGNF4 +line 1957 +;1957: } +LABELV $1034 +line 1958 +;1958: VectorMA( source, begin, forward, start ); +ADDRLP4 204 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 120 +ADDRLP4 204 +INDIRP4 +INDIRF4 +ADDRLP4 108 +INDIRF4 +ADDRLP4 160 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 120+4 +ADDRLP4 204 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 108+4 +INDIRF4 +ADDRLP4 160 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 120+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 108+8 +INDIRF4 +ADDRLP4 160 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1959 +;1959: VectorMA( source, end, forward, finish ); +ADDRLP4 212 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 132 +ADDRLP4 212 +INDIRP4 +INDIRF4 +ADDRLP4 108 +INDIRF4 +ADDRLP4 156 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 132+4 +ADDRLP4 212 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 108+4 +INDIRF4 +ADDRLP4 156 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 132+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 108+8 +INDIRF4 +ADDRLP4 156 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1961 +;1960: +;1961: line[0] = DotProduct( forward, cg.refdef.viewaxis[1] ); +ADDRLP4 144 +ADDRLP4 108 +INDIRF4 +ADDRGP4 cg+3616+36+12 +INDIRF4 +MULF4 +ADDRLP4 108+4 +INDIRF4 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 108+8 +INDIRF4 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1962 +;1962: line[1] = DotProduct( forward, cg.refdef.viewaxis[2] ); +ADDRLP4 144+4 +ADDRLP4 108 +INDIRF4 +ADDRGP4 cg+3616+36+24 +INDIRF4 +MULF4 +ADDRLP4 108+4 +INDIRF4 +ADDRGP4 cg+3616+36+24+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 108+8 +INDIRF4 +ADDRGP4 cg+3616+36+24+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1964 +;1963: +;1964: VectorScale( cg.refdef.viewaxis[1], line[1], right ); +ADDRLP4 96 +ADDRGP4 cg+3616+36+12 +INDIRF4 +ADDRLP4 144+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 96+4 +ADDRGP4 cg+3616+36+12+4 +INDIRF4 +ADDRLP4 144+4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 96+8 +ADDRGP4 cg+3616+36+12+8 +INDIRF4 +ADDRLP4 144+4 +INDIRF4 +MULF4 +ASGNF4 +line 1965 +;1965: VectorMA( right, -line[0], cg.refdef.viewaxis[2], right ); +ADDRLP4 220 +ADDRLP4 144 +INDIRF4 +NEGF4 +ASGNF4 +ADDRLP4 96 +ADDRLP4 96 +INDIRF4 +ADDRGP4 cg+3616+36+24 +INDIRF4 +ADDRLP4 220 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 96+4 +ADDRLP4 96+4 +INDIRF4 +ADDRGP4 cg+3616+36+24+4 +INDIRF4 +ADDRLP4 220 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 96+8 +ADDRLP4 96+8 +INDIRF4 +ADDRGP4 cg+3616+36+24+8 +INDIRF4 +ADDRLP4 144 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 1966 +;1966: VectorNormalize( right ); +ADDRLP4 96 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1968 +;1967: +;1968: VectorMA( finish, cg_tracerWidth.value, right, verts[0].xyz ); +ADDRLP4 0 +ADDRLP4 132 +INDIRF4 +ADDRLP4 96 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+4 +ADDRLP4 132+4 +INDIRF4 +ADDRLP4 96+4 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 132+8 +INDIRF4 +ADDRLP4 96+8 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1969 +;1969: verts[0].st[0] = 0; +ADDRLP4 0+12 +CNSTF4 0 +ASGNF4 +line 1970 +;1970: verts[0].st[1] = 1; +ADDRLP4 0+12+4 +CNSTF4 1065353216 +ASGNF4 +line 1971 +;1971: verts[0].modulate[0] = 255; +ADDRLP4 0+20 +CNSTU1 255 +ASGNU1 +line 1972 +;1972: verts[0].modulate[1] = 255; +ADDRLP4 0+20+1 +CNSTU1 255 +ASGNU1 +line 1973 +;1973: verts[0].modulate[2] = 255; +ADDRLP4 0+20+2 +CNSTU1 255 +ASGNU1 +line 1974 +;1974: verts[0].modulate[3] = 255; +ADDRLP4 0+20+3 +CNSTU1 255 +ASGNU1 +line 1976 +;1975: +;1976: VectorMA( finish, -cg_tracerWidth.value, right, verts[1].xyz ); +ADDRLP4 0+24 +ADDRLP4 132 +INDIRF4 +ADDRLP4 96 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+24+4 +ADDRLP4 132+4 +INDIRF4 +ADDRLP4 96+4 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+24+8 +ADDRLP4 132+8 +INDIRF4 +ADDRLP4 96+8 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 1977 +;1977: verts[1].st[0] = 1; +ADDRLP4 0+24+12 +CNSTF4 1065353216 +ASGNF4 +line 1978 +;1978: verts[1].st[1] = 0; +ADDRLP4 0+24+12+4 +CNSTF4 0 +ASGNF4 +line 1979 +;1979: verts[1].modulate[0] = 255; +ADDRLP4 0+24+20 +CNSTU1 255 +ASGNU1 +line 1980 +;1980: verts[1].modulate[1] = 255; +ADDRLP4 0+24+20+1 +CNSTU1 255 +ASGNU1 +line 1981 +;1981: verts[1].modulate[2] = 255; +ADDRLP4 0+24+20+2 +CNSTU1 255 +ASGNU1 +line 1982 +;1982: verts[1].modulate[3] = 255; +ADDRLP4 0+24+20+3 +CNSTU1 255 +ASGNU1 +line 1984 +;1983: +;1984: VectorMA( start, -cg_tracerWidth.value, right, verts[2].xyz ); +ADDRLP4 0+48 +ADDRLP4 120 +INDIRF4 +ADDRLP4 96 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+48+4 +ADDRLP4 120+4 +INDIRF4 +ADDRLP4 96+4 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+48+8 +ADDRLP4 120+8 +INDIRF4 +ADDRLP4 96+8 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 1985 +;1985: verts[2].st[0] = 1; +ADDRLP4 0+48+12 +CNSTF4 1065353216 +ASGNF4 +line 1986 +;1986: verts[2].st[1] = 1; +ADDRLP4 0+48+12+4 +CNSTF4 1065353216 +ASGNF4 +line 1987 +;1987: verts[2].modulate[0] = 255; +ADDRLP4 0+48+20 +CNSTU1 255 +ASGNU1 +line 1988 +;1988: verts[2].modulate[1] = 255; +ADDRLP4 0+48+20+1 +CNSTU1 255 +ASGNU1 +line 1989 +;1989: verts[2].modulate[2] = 255; +ADDRLP4 0+48+20+2 +CNSTU1 255 +ASGNU1 +line 1990 +;1990: verts[2].modulate[3] = 255; +ADDRLP4 0+48+20+3 +CNSTU1 255 +ASGNU1 +line 1992 +;1991: +;1992: VectorMA( start, cg_tracerWidth.value, right, verts[3].xyz ); +ADDRLP4 0+72 +ADDRLP4 120 +INDIRF4 +ADDRLP4 96 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+72+4 +ADDRLP4 120+4 +INDIRF4 +ADDRLP4 96+4 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 0+72+8 +ADDRLP4 120+8 +INDIRF4 +ADDRLP4 96+8 +INDIRF4 +ADDRGP4 cg_tracerWidth+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1993 +;1993: verts[3].st[0] = 0; +ADDRLP4 0+72+12 +CNSTF4 0 +ASGNF4 +line 1994 +;1994: verts[3].st[1] = 0; +ADDRLP4 0+72+12+4 +CNSTF4 0 +ASGNF4 +line 1995 +;1995: verts[3].modulate[0] = 255; +ADDRLP4 0+72+20 +CNSTU1 255 +ASGNU1 +line 1996 +;1996: verts[3].modulate[1] = 255; +ADDRLP4 0+72+20+1 +CNSTU1 255 +ASGNU1 +line 1997 +;1997: verts[3].modulate[2] = 255; +ADDRLP4 0+72+20+2 +CNSTU1 255 +ASGNU1 +line 1998 +;1998: verts[3].modulate[3] = 255; +ADDRLP4 0+72+20+3 +CNSTU1 255 +ASGNU1 +line 2000 +;1999: +;2000: trap_R_AddPolyToScene( cgs.media.tracerShader, 4, verts ); +ADDRGP4 cgs+70296+196 +INDIRI4 +ARGI4 +CNSTI4 4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_R_AddPolyToScene +CALLV +pop +line 2002 +;2001: +;2002: midpoint[0] = ( start[0] + finish[0] ) * 0.5; +ADDRLP4 168 +CNSTF4 1056964608 +ADDRLP4 120 +INDIRF4 +ADDRLP4 132 +INDIRF4 +ADDF4 +MULF4 +ASGNF4 +line 2003 +;2003: midpoint[1] = ( start[1] + finish[1] ) * 0.5; +ADDRLP4 168+4 +CNSTF4 1056964608 +ADDRLP4 120+4 +INDIRF4 +ADDRLP4 132+4 +INDIRF4 +ADDF4 +MULF4 +ASGNF4 +line 2004 +;2004: midpoint[2] = ( start[2] + finish[2] ) * 0.5; +ADDRLP4 168+8 +CNSTF4 1056964608 +ADDRLP4 120+8 +INDIRF4 +ADDRLP4 132+8 +INDIRF4 +ADDF4 +MULF4 +ASGNF4 +line 2009 +;2005: +;2006: // add the tracer sound +;2007: //trap_S_StartSound( midpoint, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.tracerSound ); +;2008: +;2009:} +LABELV $1028 +endproc CG_Tracer 224 12 +export CG_CalcMuzzlePoint +proc CG_CalcMuzzlePoint 92 16 +line 2016 +;2010: +;2011:/* +;2012:====================== +;2013:CG_CalcMuzzlePoint +;2014:====================== +;2015:*/ +;2016:qboolean CG_CalcMuzzlePoint( int entityNum, vec3_t muzzle ) { +line 2022 +;2017: vec3_t forward, right; +;2018: vec3_t gunpoint; +;2019: centity_t *cent; +;2020: int anim; +;2021: +;2022: if ( entityNum == cg.snap->ps.clientNum ) +ADDRFP4 0 +INDIRI4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +NEI4 $1214 +line 2023 +;2023: { //I'm not exactly sure why we'd be rendering someone else's crosshair, but hey. +line 2024 +;2024: int weapontype = cg.snap->ps.weapon; +ADDRLP4 56 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRI4 +ASGNI4 +line 2027 +;2025: vec3_t weaponMuzzle; +;2026: +;2027: VectorCopy(WP_MuzzlePoint[weapontype], weaponMuzzle); +ADDRLP4 44 +CNSTI4 12 +ADDRLP4 56 +INDIRI4 +MULI4 +ADDRGP4 WP_MuzzlePoint +ADDP4 +INDIRB +ASGNB 12 +line 2029 +;2028: +;2029: if (weapontype == WP_DISRUPTOR || weapontype == WP_STUN_BATON || weapontype == WP_SABER) +ADDRLP4 56 +INDIRI4 +CNSTI4 5 +EQI4 $1221 +ADDRLP4 56 +INDIRI4 +CNSTI4 1 +EQI4 $1221 +ADDRLP4 56 +INDIRI4 +CNSTI4 2 +NEI4 $1218 +LABELV $1221 +line 2030 +;2030: { +line 2031 +;2031: VectorClear(weaponMuzzle); +ADDRLP4 64 +CNSTF4 0 +ASGNF4 +ADDRLP4 44+8 +ADDRLP4 64 +INDIRF4 +ASGNF4 +ADDRLP4 44+4 +ADDRLP4 64 +INDIRF4 +ASGNF4 +ADDRLP4 44 +ADDRLP4 64 +INDIRF4 +ASGNF4 +line 2032 +;2032: } +LABELV $1218 +line 2034 +;2033: +;2034: if (cg.snap->ps.usingATST) +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 1360 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1224 +line 2035 +;2035: { +line 2036 +;2036: VectorClear(weaponMuzzle); +ADDRLP4 64 +CNSTF4 0 +ASGNF4 +ADDRLP4 44+8 +ADDRLP4 64 +INDIRF4 +ASGNF4 +ADDRLP4 44+4 +ADDRLP4 64 +INDIRF4 +ASGNF4 +ADDRLP4 44 +ADDRLP4 64 +INDIRF4 +ASGNF4 +line 2037 +;2037: weaponMuzzle[0] = 16; +ADDRLP4 44 +CNSTF4 1098907648 +ASGNF4 +line 2038 +;2038: weaponMuzzle[2] = 128; +ADDRLP4 44+8 +CNSTF4 1124073472 +ASGNF4 +line 2039 +;2039: } +LABELV $1224 +line 2041 +;2040: +;2041: if (cg.renderingThirdPerson) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +EQI4 $1230 +line 2042 +;2042: { +line 2043 +;2043: VectorCopy( cg.predictedPlayerEntity.lerpOrigin, gunpoint ); +ADDRLP4 32 +ADDRGP4 cg+1476+928 +INDIRB +ASGNB 12 +line 2044 +;2044: AngleVectors( cg.predictedPlayerEntity.lerpAngles, forward, right, NULL ); +ADDRGP4 cg+1476+940 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 20 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 2045 +;2045: } +ADDRGP4 $1231 +JUMPV +LABELV $1230 +line 2047 +;2046: else +;2047: { +line 2048 +;2048: VectorCopy( cg.refdef.vieworg, gunpoint ); +ADDRLP4 32 +ADDRGP4 cg+3616+24 +INDIRB +ASGNB 12 +line 2049 +;2049: AngleVectors( cg.refdefViewAngles, forward, right, NULL ); +ADDRGP4 cg+3984 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 20 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 2050 +;2050: } +LABELV $1231 +line 2052 +;2051: +;2052: if (weapontype == WP_EMPLACED_GUN && cg.snap->ps.emplacedIndex) +ADDRLP4 56 +INDIRI4 +CNSTI4 14 +NEI4 $1240 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1240 +line 2053 +;2053: { +line 2054 +;2054: centity_t *gunEnt = &cg_entities[cg.snap->ps.emplacedIndex]; +ADDRLP4 64 +CNSTI4 1920 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 2056 +;2055: +;2056: if (gunEnt) +ADDRLP4 64 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1244 +line 2057 +;2057: { +line 2060 +;2058: vec3_t pitchConstraint; +;2059: +;2060: VectorCopy(gunEnt->lerpOrigin, gunpoint); +ADDRLP4 32 +ADDRLP4 64 +INDIRP4 +CNSTI4 928 +ADDP4 +INDIRB +ASGNB 12 +line 2061 +;2061: gunpoint[2] += 46; +ADDRLP4 32+8 +ADDRLP4 32+8 +INDIRF4 +CNSTF4 1110966272 +ADDF4 +ASGNF4 +line 2063 +;2062: +;2063: if (cg.renderingThirdPerson) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +EQI4 $1247 +line 2064 +;2064: { +line 2065 +;2065: VectorCopy(cg.predictedPlayerEntity.lerpAngles, pitchConstraint); +ADDRLP4 68 +ADDRGP4 cg+1476+940 +INDIRB +ASGNB 12 +line 2066 +;2066: } +ADDRGP4 $1248 +JUMPV +LABELV $1247 +line 2068 +;2067: else +;2068: { +line 2069 +;2069: VectorCopy(cg.refdefViewAngles, pitchConstraint); +ADDRLP4 68 +ADDRGP4 cg+3984 +INDIRB +ASGNB 12 +line 2070 +;2070: } +LABELV $1248 +line 2072 +;2071: +;2072: if (pitchConstraint[PITCH] > 40) +ADDRLP4 68 +INDIRF4 +CNSTF4 1109393408 +LEF4 $1253 +line 2073 +;2073: { +line 2074 +;2074: pitchConstraint[PITCH] = 40; +ADDRLP4 68 +CNSTF4 1109393408 +ASGNF4 +line 2075 +;2075: } +LABELV $1253 +line 2076 +;2076: AngleVectors( pitchConstraint, forward, right, NULL ); +ADDRLP4 68 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 20 +ARGP4 +CNSTP4 0 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 2077 +;2077: } +LABELV $1244 +line 2078 +;2078: } +LABELV $1240 +line 2080 +;2079: +;2080: VectorCopy(gunpoint, muzzle); +ADDRFP4 4 +INDIRP4 +ADDRLP4 32 +INDIRB +ASGNB 12 +line 2082 +;2081: +;2082: VectorMA(muzzle, weaponMuzzle[0], forward, muzzle); +ADDRLP4 64 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 64 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +ADDRLP4 44 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 68 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +ADDRLP4 68 +INDIRP4 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 44 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 72 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 44 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2083 +;2083: VectorMA(muzzle, weaponMuzzle[1], right, muzzle); +ADDRLP4 76 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 76 +INDIRP4 +INDIRF4 +ADDRLP4 20 +INDIRF4 +ADDRLP4 44+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 80 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +ADDRLP4 80 +INDIRP4 +INDIRF4 +ADDRLP4 20+4 +INDIRF4 +ADDRLP4 44+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 84 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +ADDRLP4 20+8 +INDIRF4 +ADDRLP4 44+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2085 +;2084: +;2085: if (weapontype == WP_EMPLACED_GUN && cg.snap->ps.emplacedIndex) +ADDRLP4 56 +INDIRI4 +CNSTI4 14 +NEI4 $1262 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 640 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1262 +line 2086 +;2086: { +line 2088 +;2087: //Do nothing +;2088: } +ADDRGP4 $1263 +JUMPV +LABELV $1262 +line 2089 +;2089: else if (cg.renderingThirdPerson) +ADDRGP4 cg+88 +INDIRI4 +CNSTI4 0 +EQI4 $1265 +line 2090 +;2090: { +line 2091 +;2091: muzzle[2] += cg.snap->ps.viewheight + weaponMuzzle[2]; +ADDRLP4 88 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +ADDRLP4 88 +INDIRP4 +INDIRF4 +ADDRGP4 cg+36 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 44+8 +INDIRF4 +ADDF4 +ADDF4 +ASGNF4 +line 2092 +;2092: } +ADDRGP4 $1266 +JUMPV +LABELV $1265 +line 2094 +;2093: else +;2094: { +line 2095 +;2095: muzzle[2] += weaponMuzzle[2]; +ADDRLP4 88 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +ADDRLP4 88 +INDIRP4 +INDIRF4 +ADDRLP4 44+8 +INDIRF4 +ADDF4 +ASGNF4 +line 2096 +;2096: } +LABELV $1266 +LABELV $1263 +line 2098 +;2097: +;2098: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1213 +JUMPV +LABELV $1214 +line 2101 +;2099: } +;2100: +;2101: cent = &cg_entities[entityNum]; +ADDRLP4 12 +CNSTI4 1920 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 cg_entities +ADDP4 +ASGNP4 +line 2102 +;2102: if ( !cent->currentValid ) { +ADDRLP4 12 +INDIRP4 +CNSTI4 596 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1271 +line 2103 +;2103: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1213 +JUMPV +LABELV $1271 +line 2106 +;2104: } +;2105: +;2106: VectorCopy( cent->currentState.pos.trBase, muzzle ); +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRB +ASGNB 12 +line 2108 +;2107: +;2108: AngleVectors( cent->currentState.apos.trBase, forward, NULL, NULL ); +ADDRLP4 12 +INDIRP4 +CNSTI4 60 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 44 +CNSTP4 0 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ARGP4 +ADDRLP4 44 +INDIRP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 2109 +;2109: anim = cent->currentState.legsAnim & ~ANIM_TOGGLEBIT; +ADDRLP4 16 +ADDRLP4 12 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRI4 +CNSTI4 -2049 +BANDI4 +ASGNI4 +line 2110 +;2110: if ( anim == BOTH_CROUCH1WALK || anim == BOTH_CROUCH1IDLE ) { +ADDRLP4 16 +INDIRI4 +CNSTI4 798 +EQI4 $1275 +ADDRLP4 16 +INDIRI4 +CNSTI4 797 +NEI4 $1273 +LABELV $1275 +line 2111 +;2111: muzzle[2] += CROUCH_VIEWHEIGHT; +ADDRLP4 52 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +CNSTF4 1094713344 +ADDF4 +ASGNF4 +line 2112 +;2112: } else { +ADDRGP4 $1274 +JUMPV +LABELV $1273 +line 2113 +;2113: muzzle[2] += DEFAULT_VIEWHEIGHT; +ADDRLP4 52 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +CNSTF4 1108344832 +ADDF4 +ASGNF4 +line 2114 +;2114: } +LABELV $1274 +line 2116 +;2115: +;2116: VectorMA( muzzle, 14, forward, muzzle ); +ADDRLP4 52 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +CNSTF4 1096810496 +ADDRLP4 0 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 56 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRF4 +CNSTF4 1096810496 +ADDRLP4 0+4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 60 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +CNSTF4 1096810496 +ADDRLP4 0+8 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 2118 +;2117: +;2118: return qtrue; +CNSTI4 1 +RETI4 +LABELV $1213 +endproc CG_CalcMuzzlePoint 92 16 +export CG_InitG2Weapons +proc CG_InitG2Weapons 20 28 +line 2131 +;2119: +;2120:} +;2121: +;2122: +;2123: +;2124:/* +;2125:Ghoul2 Insert Start +;2126:*/ +;2127: +;2128:// create one instance of all the weapons we are going to use so we can just copy this info into each clients gun ghoul2 object in fast way +;2129:void *g2WeaponInstances[MAX_WEAPONS]; +;2130:void CG_InitG2Weapons(void) +;2131:{ +line 2132 +;2132: int i = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 2134 +;2133: gitem_t *item; +;2134: memset(g2WeaponInstances, 0, sizeof(g2WeaponInstances)); +ADDRGP4 g2WeaponInstances +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 64 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 2135 +;2135: for ( item = bg_itemlist + 1 ; item->classname ; item++ ) +ADDRLP4 0 +ADDRGP4 bg_itemlist+52 +ASGNP4 +ADDRGP4 $1282 +JUMPV +LABELV $1279 +line 2136 +;2136: { +line 2137 +;2137: if ( item->giType == IT_WEAPON ) +ADDRLP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1284 +line 2138 +;2138: { +line 2140 +;2139: // initialise model +;2140: trap_G2API_InitGhoul2Model(&g2WeaponInstances[/*i*/item->giTag], item->world_model[0], 0, 0, 0, 0, 0); +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 g2WeaponInstances +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_InitGhoul2Model +CALLI4 +pop +line 2142 +;2141:// trap_G2API_InitGhoul2Model(&g2WeaponInstances[i], item->world_model[0],G_ModelIndex( item->world_model[0] ) , 0, 0, 0, 0); +;2142: if (g2WeaponInstances[/*i*/item->giTag]) +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 g2WeaponInstances +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1286 +line 2143 +;2143: { +line 2145 +;2144: // indicate we will be bolted to model 0 (ie the player) on bolt 0 (always the right hand) when we get copied +;2145: trap_G2API_SetBoltInfo(g2WeaponInstances[/*i*/item->giTag], 0, 0); +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 g2WeaponInstances +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 trap_G2API_SetBoltInfo +CALLV +pop +line 2147 +;2146: // now set up the gun bolt on it +;2147: trap_G2API_AddBolt(g2WeaponInstances[/*i*/item->giTag], 0, "*flash"); +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 g2WeaponInstances +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 $1288 +ARGP4 +ADDRGP4 trap_G2API_AddBolt +CALLI4 +pop +line 2148 +;2148: i++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2149 +;2149: } +LABELV $1286 +line 2150 +;2150: if (i == MAX_WEAPONS) +ADDRLP4 4 +INDIRI4 +CNSTI4 16 +NEI4 $1289 +line 2151 +;2151: { +line 2152 +;2152: assert(0); +line 2153 +;2153: break; +ADDRGP4 $1281 +JUMPV +LABELV $1289 +line 2156 +;2154: } +;2155: +;2156: } +LABELV $1284 +line 2157 +;2157: } +LABELV $1280 +line 2135 +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ASGNP4 +LABELV $1282 +ADDRLP4 0 +INDIRP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1279 +LABELV $1281 +line 2158 +;2158:} +LABELV $1278 +endproc CG_InitG2Weapons 20 28 +export CG_ShutDownG2Weapons +proc CG_ShutDownG2Weapons 4 4 +line 2162 +;2159: +;2160:// clean out any g2 models we instanciated for copying purposes +;2161:void CG_ShutDownG2Weapons(void) +;2162:{ +line 2164 +;2163: int i; +;2164: for (i=0; icurrentState.saberInFlight) +ADDRFP4 4 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1304 +line 2195 +;2195: { +line 2196 +;2196: cent->ghoul2weapon = g2WeaponInstances[WP_SABER]; +ADDRFP4 4 +INDIRP4 +CNSTI4 960 +ADDP4 +ADDRGP4 g2WeaponInstances+8 +INDIRP4 +ASGNP4 +line 2197 +;2197: } +LABELV $1304 +line 2199 +;2198: +;2199: if (cent->currentState.eFlags & EF_DEAD) +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $1307 +line 2200 +;2200: { //no updating weapons when dead +line 2201 +;2201: cent->ghoul2weapon = NULL; +ADDRFP4 4 +INDIRP4 +CNSTI4 960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 2202 +;2202: return; +ADDRGP4 $1303 +JUMPV +LABELV $1307 +line 2205 +;2203: } +;2204: +;2205: if (cent->torsoBolt) +ADDRFP4 4 +INDIRP4 +CNSTI4 1012 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1309 +line 2206 +;2206: { //got our limb cut off, no updating weapons until it's restored +line 2207 +;2207: cent->ghoul2weapon = NULL; +ADDRFP4 4 +INDIRP4 +CNSTI4 960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 2208 +;2208: return; +ADDRGP4 $1303 +JUMPV +LABELV $1309 +line 2211 +;2209: } +;2210: +;2211: if (ps && ps->usingATST) +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1311 +ADDRLP4 0 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1311 +line 2212 +;2212: { +line 2213 +;2213: cent->ghoul2weapon = NULL; +ADDRFP4 4 +INDIRP4 +CNSTI4 960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 2214 +;2214: } +LABELV $1311 +line 2216 +;2215: +;2216: if (cent->isATST) +ADDRFP4 4 +INDIRP4 +CNSTI4 1028 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1313 +line 2217 +;2217: { +line 2218 +;2218: cent->ghoul2weapon = NULL; +ADDRFP4 4 +INDIRP4 +CNSTI4 960 +ADDP4 +CNSTP4 0 +ASGNP4 +line 2219 +;2219: return; +ADDRGP4 $1303 +JUMPV +LABELV $1313 +line 2222 +;2220: } +;2221: +;2222: if (cent->ghoul2 && cent->ghoul2weapon != g2WeaponInstances[ps->weapon] && +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1315 +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 960 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 g2WeaponInstances +ADDP4 +INDIRP4 +CVPU4 4 +EQU4 $1315 +ADDRLP4 8 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +NEI4 $1315 +line 2224 +;2223: ps->clientNum == cent->currentState.number) //don't want spectator mode forcing one client's weapon instance over another's +;2224: { +line 2225 +;2225: CG_CopyG2WeaponInstance(ps->weapon, cent->ghoul2); +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 952 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 CG_CopyG2WeaponInstance +CALLV +pop +line 2226 +;2226: cent->ghoul2weapon = g2WeaponInstances[ps->weapon]; +ADDRFP4 4 +INDIRP4 +CNSTI4 960 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 g2WeaponInstances +ADDP4 +INDIRP4 +ASGNP4 +line 2227 +;2227: if (cent->weapon == WP_SABER && cg_entities[cent->currentState.number].weapon != ps->weapon && !ps->saberHolstered) +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 956 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1317 +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +CNSTI4 1920 +ADDRLP4 12 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+956 +ADDP4 +INDIRI4 +ADDRLP4 16 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +EQI4 $1317 +ADDRLP4 16 +INDIRP4 +CNSTI4 1312 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1317 +line 2228 +;2228: { //switching away from the saber +line 2229 +;2229: trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberoffquick.wav" )); +ADDRGP4 $1320 +ARGP4 +ADDRLP4 20 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2230 +;2230: } +ADDRGP4 $1318 +JUMPV +LABELV $1317 +line 2231 +;2231: else if (ps->weapon == WP_SABER && cg_entities[cent->currentState.number].weapon != ps->weapon) +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 2 +NEI4 $1321 +CNSTI4 1920 +ADDRFP4 4 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+956 +ADDP4 +INDIRI4 +ADDRLP4 20 +INDIRI4 +EQI4 $1321 +line 2232 +;2232: { //switching to the saber +line 2233 +;2233: trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" )); +ADDRGP4 $1324 +ARGP4 +ADDRLP4 24 +ADDRGP4 trap_S_RegisterSound +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 28 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRGP4 trap_S_StartSound +CALLV +pop +line 2234 +;2234: } +LABELV $1321 +LABELV $1318 +line 2235 +;2235: cent->weapon = ps->weapon; +ADDRFP4 4 +INDIRP4 +CNSTI4 956 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +line 2236 +;2236: cg_entities[cent->currentState.number].weapon = ps->weapon; +CNSTI4 1920 +ADDRFP4 4 +INDIRP4 +INDIRI4 +MULI4 +ADDRGP4 cg_entities+956 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRI4 +ASGNI4 +line 2237 +;2237: } +LABELV $1315 +line 2238 +;2238:} +LABELV $1303 +endproc CG_CheckPlayerG2Weapons 32 16 +import hudTintColor +import redhudtint +import bluehudtint +import FX_RocketHitPlayer +import FX_RocketHitWall +import FX_RocketAltProjectileThink +import FX_RocketProjectileThink +import FX_FlechetteAltProjectileThink +import FX_FlechetteWeaponHitPlayer +import FX_FlechetteWeaponHitWall +import FX_FlechetteProjectileThink +import FX_DEMP2_AltDetonate +import FX_DEMP2_HitPlayer +import FX_DEMP2_HitWall +import FX_DEMP2_ProjectileThink +import FX_RepeaterAltHitPlayer +import FX_RepeaterHitPlayer +import FX_RepeaterAltHitWall +import FX_RepeaterHitWall +import FX_RepeaterAltProjectileThink +import FX_RepeaterProjectileThink +import FX_BowcasterHitPlayer +import FX_BowcasterHitWall +import FX_BowcasterAltProjectileThink +import FX_BowcasterProjectileThink +import FX_DisruptorHitPlayer +import FX_DisruptorHitWall +import FX_DisruptorAltHit +import FX_DisruptorAltMiss +import FX_DisruptorAltShot +import FX_DisruptorMainShot +import FX_BryarAltProjectileThink +import FX_BryarProjectileThink +bss +export g2WeaponInstances +align 4 +LABELV g2WeaponInstances +skip 64 +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_RegisterWeapon +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $1324 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 111 +char 1 110 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $1320 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 47 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 111 +char 1 102 +char 1 102 +char 1 113 +char 1 117 +char 1 105 +char 1 99 +char 1 107 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $1288 +char 1 42 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $988 +char 1 100 +char 1 101 +char 1 109 +char 1 112 +char 1 50 +char 1 47 +char 1 97 +char 1 108 +char 1 116 +char 1 68 +char 1 101 +char 1 116 +char 1 111 +char 1 110 +char 1 97 +char 1 116 +char 1 101 +char 1 46 +char 1 101 +char 1 102 +char 1 120 +char 1 0 +align 1 +LABELV $913 +char 1 67 +char 1 71 +char 1 95 +char 1 70 +char 1 105 +char 1 114 +char 1 101 +char 1 87 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 58 +char 1 32 +char 1 101 +char 1 110 +char 1 116 +char 1 45 +char 1 62 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 62 +char 1 61 +char 1 32 +char 1 87 +char 1 80 +char 1 95 +char 1 78 +char 1 85 +char 1 77 +char 1 95 +char 1 87 +char 1 69 +char 1 65 +char 1 80 +char 1 79 +char 1 78 +char 1 83 +char 1 0 +align 1 +LABELV $894 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 47 +char 1 97 +char 1 116 +char 1 115 +char 1 116 +char 1 47 +char 1 65 +char 1 84 +char 1 83 +char 1 84 +char 1 102 +char 1 105 +char 1 114 +char 1 101 +char 1 49 +char 1 46 +char 1 119 +char 1 97 +char 1 118 +char 1 0 +align 1 +LABELV $837 +char 1 115 +char 1 118 +char 1 95 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 115 +char 1 119 +char 1 105 +char 1 116 +char 1 99 +char 1 104 +char 1 0 +align 1 +LABELV $755 +char 1 73 +char 1 78 +char 1 71 +char 1 65 +char 1 77 +char 1 69 +char 1 95 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $282 +char 1 116 +char 1 97 +char 1 103 +char 1 95 +char 1 102 +char 1 108 +char 1 97 +char 1 115 +char 1 104 +char 1 0 +align 1 +LABELV $271 +char 1 116 +char 1 97 +char 1 103 +char 1 95 +char 1 98 +char 1 97 +char 1 114 +char 1 114 +char 1 101 +char 1 108 +char 1 51 +char 1 0 +align 1 +LABELV $270 +char 1 116 +char 1 97 +char 1 103 +char 1 95 +char 1 98 +char 1 97 +char 1 114 +char 1 114 +char 1 101 +char 1 108 +char 1 50 +char 1 0 +align 1 +LABELV $267 +char 1 116 +char 1 97 +char 1 103 +char 1 95 +char 1 98 +char 1 97 +char 1 114 +char 1 114 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $261 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 114 +char 1 114 +char 1 101 +char 1 108 +char 1 51 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $259 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 114 +char 1 114 +char 1 101 +char 1 108 +char 1 50 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $255 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 115 +char 1 47 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 115 +char 1 50 +char 1 47 +char 1 115 +char 1 116 +char 1 117 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 47 +char 1 98 +char 1 97 +char 1 116 +char 1 111 +char 1 110 +char 1 95 +char 1 98 +char 1 97 +char 1 114 +char 1 114 +char 1 101 +char 1 108 +char 1 46 +char 1 109 +char 1 100 +char 1 51 +char 1 0 +align 1 +LABELV $240 +char 1 116 +char 1 97 +char 1 103 +char 1 95 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $138 +char 1 46 +char 1 103 +char 1 108 +char 1 109 +char 1 0 +align 1 +LABELV $125 +char 1 67 +char 1 71 +char 1 95 +char 1 82 +char 1 101 +char 1 103 +char 1 105 +char 1 115 +char 1 116 +char 1 101 +char 1 114 +char 1 73 +char 1 116 +char 1 101 +char 1 109 +char 1 86 +char 1 105 +char 1 115 +char 1 117 +char 1 97 +char 1 108 +char 1 115 +char 1 58 +char 1 32 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 78 +char 1 117 +char 1 109 +char 1 32 +char 1 37 +char 1 100 +char 1 32 +char 1 111 +char 1 117 +char 1 116 +char 1 32 +char 1 111 +char 1 102 +char 1 32 +char 1 114 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 32 +char 1 91 +char 1 48 +char 1 45 +char 1 37 +char 1 100 +char 1 93 +char 1 0 diff --git a/code/cgame/vm/fx_blaster.asm b/code/cgame/vm/fx_blaster.asm new file mode 100644 index 0000000..5d7f1df --- /dev/null +++ b/code/cgame/vm/fx_blaster.asm @@ -0,0 +1,923 @@ +export FX_BlasterProjectileThink +code +proc FX_BlasterProjectileThink 16 12 +file "../fx_blaster.c" +line 12 +;1:// Blaster Weapon +;2: +;3:#include "cg_local.h" +;4: +;5:/* +;6:------------------------- +;7:FX_BlasterProjectileThink +;8:------------------------- +;9:*/ +;10: +;11:void FX_BlasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;12:{ +line 15 +;13: vec3_t forward; +;14: +;15: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $121 +line 16 +;16: { +line 17 +;17: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 18 +;18: } +LABELV $121 +line 20 +;19: +;20: trap_FX_PlayEffectID( cgs.effects.blasterShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+28 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 21 +;21:} +LABELV $120 +endproc FX_BlasterProjectileThink 16 12 +export FX_BlasterAltFireThink +proc FX_BlasterAltFireThink 16 12 +line 29 +;22: +;23:/* +;24:------------------------- +;25:FX_BlasterAltFireThink +;26:------------------------- +;27:*/ +;28:void FX_BlasterAltFireThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;29:{ +line 32 +;30: vec3_t forward; +;31: +;32: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $127 +line 33 +;33: { +line 34 +;34: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 35 +;35: } +LABELV $127 +line 37 +;36: +;37: trap_FX_PlayEffectID( cgs.effects.blasterShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+28 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 38 +;38:} +LABELV $126 +endproc FX_BlasterAltFireThink 16 12 +export FX_BlasterWeaponHitWall +proc FX_BlasterWeaponHitWall 0 12 +line 46 +;39: +;40:/* +;41:------------------------- +;42:FX_BlasterWeaponHitWall +;43:------------------------- +;44:*/ +;45:void FX_BlasterWeaponHitWall( vec3_t origin, vec3_t normal ) +;46:{ +line 47 +;47: trap_FX_PlayEffectID( cgs.effects.blasterWallImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+32 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 48 +;48:} +LABELV $132 +endproc FX_BlasterWeaponHitWall 0 12 +export FX_BlasterWeaponHitPlayer +proc FX_BlasterWeaponHitPlayer 0 12 +line 56 +;49: +;50:/* +;51:------------------------- +;52:FX_BlasterWeaponHitPlayer +;53:------------------------- +;54:*/ +;55:void FX_BlasterWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +;56:{ +line 57 +;57: if ( humanoid ) +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $136 +line 58 +;58: { +line 59 +;59: trap_FX_PlayEffectID( cgs.effects.blasterFleshImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+36 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 60 +;60: } +ADDRGP4 $137 +JUMPV +LABELV $136 +line 62 +;61: else +;62: { +line 63 +;63: trap_FX_PlayEffectID( cgs.effects.blasterDroidImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+40 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 64 +;64: } +LABELV $137 +line 65 +;65:} +LABELV $135 +endproc FX_BlasterWeaponHitPlayer 0 12 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort diff --git a/code/cgame/vm/fx_bowcaster.asm b/code/cgame/vm/fx_bowcaster.asm new file mode 100644 index 0000000..387b49f --- /dev/null +++ b/code/cgame/vm/fx_bowcaster.asm @@ -0,0 +1,897 @@ +export FX_BowcasterProjectileThink +code +proc FX_BowcasterProjectileThink 16 12 +file "../fx_bowcaster.c" +line 12 +;1:// Bowcaster Weapon +;2: +;3:#include "cg_local.h" +;4: +;5:/* +;6:--------------------------- +;7:FX_BowcasterProjectileThink +;8:--------------------------- +;9:*/ +;10: +;11:void FX_BowcasterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;12:{ +line 15 +;13: vec3_t forward; +;14: +;15: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $121 +line 16 +;16: { +line 17 +;17: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 18 +;18: } +LABELV $121 +line 20 +;19: +;20: trap_FX_PlayEffectID( cgs.effects.bowcasterShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+68 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 21 +;21:} +LABELV $120 +endproc FX_BowcasterProjectileThink 16 12 +export FX_BowcasterHitWall +proc FX_BowcasterHitWall 0 12 +line 30 +;22: +;23:/* +;24:--------------------------- +;25:FX_BowcasterHitWall +;26:--------------------------- +;27:*/ +;28: +;29:void FX_BowcasterHitWall( vec3_t origin, vec3_t normal ) +;30:{ +line 31 +;31: trap_FX_PlayEffectID( cgs.effects.bowcasterImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+72 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 32 +;32:} +LABELV $126 +endproc FX_BowcasterHitWall 0 12 +export FX_BowcasterHitPlayer +proc FX_BowcasterHitPlayer 0 12 +line 41 +;33: +;34:/* +;35:--------------------------- +;36:FX_BowcasterHitPlayer +;37:--------------------------- +;38:*/ +;39: +;40:void FX_BowcasterHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +;41:{ +line 42 +;42: trap_FX_PlayEffectID( cgs.effects.bowcasterImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+72 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 43 +;43:} +LABELV $129 +endproc FX_BowcasterHitPlayer 0 12 +export FX_BowcasterAltProjectileThink +proc FX_BowcasterAltProjectileThink 16 12 +line 52 +;44: +;45:/* +;46:------------------------------ +;47:FX_BowcasterAltProjectileThink +;48:------------------------------ +;49:*/ +;50: +;51:void FX_BowcasterAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;52:{ +line 55 +;53: vec3_t forward; +;54: +;55: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $133 +line 56 +;56: { +line 57 +;57: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 58 +;58: } +LABELV $133 +line 60 +;59: +;60: trap_FX_PlayEffectID( cgs.effects.bowcasterShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+68 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 61 +;61:} +LABELV $132 +endproc FX_BowcasterAltProjectileThink 16 12 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort diff --git a/code/cgame/vm/fx_bryarpistol.asm b/code/cgame/vm/fx_bryarpistol.asm new file mode 100644 index 0000000..1c42210 --- /dev/null +++ b/code/cgame/vm/fx_bryarpistol.asm @@ -0,0 +1,1309 @@ +export FX_BryarProjectileThink +code +proc FX_BryarProjectileThink 16 12 +file "../fx_bryarpistol.c" +line 15 +;1:// Bryar Pistol Weapon Effects +;2: +;3:#include "cg_local.h" +;4: +;5:/* +;6:------------------------- +;7: +;8: MAIN FIRE +;9: +;10:------------------------- +;11:FX_BryarProjectileThink +;12:------------------------- +;13:*/ +;14:void FX_BryarProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;15:{ +line 18 +;16: vec3_t forward; +;17: +;18: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $121 +line 19 +;19: { +line 20 +;20: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 21 +;21: } +LABELV $121 +line 23 +;22: +;23: trap_FX_PlayEffectID( cgs.effects.bryarShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 24 +;24:} +LABELV $120 +endproc FX_BryarProjectileThink 16 12 +export FX_BryarHitWall +proc FX_BryarHitWall 0 12 +line 32 +;25: +;26:/* +;27:------------------------- +;28:FX_BryarHitWall +;29:------------------------- +;30:*/ +;31:void FX_BryarHitWall( vec3_t origin, vec3_t normal ) +;32:{ +line 33 +;33: trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+8 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 34 +;34:} +LABELV $125 +endproc FX_BryarHitWall 0 12 +export FX_BryarHitPlayer +proc FX_BryarHitPlayer 0 12 +line 42 +;35: +;36:/* +;37:------------------------- +;38:FX_BryarHitPlayer +;39:------------------------- +;40:*/ +;41:void FX_BryarHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +;42:{ +line 43 +;43: if ( humanoid ) +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $129 +line 44 +;44: { +line 45 +;45: trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+20 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 46 +;46: } +ADDRGP4 $130 +JUMPV +LABELV $129 +line 48 +;47: else +;48: { +line 49 +;49: trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+24 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 50 +;50: } +LABELV $130 +line 51 +;51:} +LABELV $128 +endproc FX_BryarHitPlayer 0 12 +export FX_BryarAltProjectileThink +proc FX_BryarAltProjectileThink 20 12 +line 64 +;52: +;53: +;54:/* +;55:------------------------- +;56: +;57: ALT FIRE +;58: +;59:------------------------- +;60:FX_BryarAltProjectileThink +;61:------------------------- +;62:*/ +;63:void FX_BryarAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;64:{ +line 68 +;65: vec3_t forward; +;66: int t; +;67: +;68: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 16 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 16 +INDIRF4 +CNSTF4 0 +NEF4 $136 +line 69 +;69: { +line 70 +;70: forward[2] = 1.0f; +ADDRLP4 4+8 +CNSTF4 1065353216 +ASGNF4 +line 71 +;71: } +LABELV $136 +line 74 +;72: +;73: // see if we have some sort of extra charge going on +;74: for (t = 1; t < cent->currentState.generic1; t++ ) +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +ADDRGP4 $142 +JUMPV +LABELV $139 +line 75 +;75: { +line 77 +;76: // just add ourselves over, and over, and over when we are charged +;77: trap_FX_PlayEffectID( cgs.effects.bryarPowerupShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 78 +;78: } +LABELV $140 +line 74 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $142 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +LTI4 $139 +line 82 +;79: +;80: // for ( int t = 1; t < cent->gent->count; t++ ) // The single player stores the charge in count, which isn't accessible on the client +;81: +;82: trap_FX_PlayEffectID( cgs.effects.bryarShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 83 +;83:} +LABELV $135 +endproc FX_BryarAltProjectileThink 20 12 +export FX_BryarAltHitWall +proc FX_BryarAltHitWall 8 12 +line 91 +;84: +;85:/* +;86:------------------------- +;87:FX_BryarAltHitWall +;88:------------------------- +;89:*/ +;90:void FX_BryarAltHitWall( vec3_t origin, vec3_t normal, int power ) +;91:{ +line 92 +;92: switch( power ) +ADDRLP4 0 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 4 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LTI4 $147 +ADDRLP4 0 +INDIRI4 +CNSTI4 5 +GTI4 $147 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LSHI4 +ADDRGP4 $157-8 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $157 +address $152 +address $152 +address $149 +address $149 +code +line 93 +;93: { +LABELV $149 +line 96 +;94: case 4: +;95: case 5: +;96: trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect3, origin, normal ); +ADDRGP4 cgs+71564+16 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 97 +;97: break; +ADDRGP4 $148 +JUMPV +LABELV $152 +line 101 +;98: +;99: case 2: +;100: case 3: +;101: trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect2, origin, normal ); +ADDRGP4 cgs+71564+12 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 102 +;102: break; +ADDRGP4 $148 +JUMPV +LABELV $147 +line 105 +;103: +;104: default: +;105: trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+8 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 106 +;106: break; +LABELV $148 +line 108 +;107: } +;108:} +LABELV $146 +endproc FX_BryarAltHitWall 8 12 +export FX_BryarAltHitPlayer +proc FX_BryarAltHitPlayer 0 12 +line 116 +;109: +;110:/* +;111:------------------------- +;112:FX_BryarAltHitPlayer +;113:------------------------- +;114:*/ +;115:void FX_BryarAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +;116:{ +line 117 +;117: if ( humanoid ) +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $160 +line 118 +;118: { +line 119 +;119: trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+20 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 120 +;120: } +ADDRGP4 $161 +JUMPV +LABELV $160 +line 122 +;121: else +;122: { +line 123 +;123: trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+24 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 124 +;124: } +LABELV $161 +line 125 +;125:} +LABELV $159 +endproc FX_BryarAltHitPlayer 0 12 +export FX_TurretProjectileThink +proc FX_TurretProjectileThink 16 12 +line 135 +;126: +;127: +;128://TURRET +;129:/* +;130:------------------------- +;131:FX_TurretProjectileThink +;132:------------------------- +;133:*/ +;134:void FX_TurretProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;135:{ +line 138 +;136: vec3_t forward; +;137: +;138: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $167 +line 139 +;139: { +line 140 +;140: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 141 +;141: } +LABELV $167 +line 143 +;142: +;143: trap_FX_PlayEffectID( cgs.effects.turretShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+164 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 144 +;144:} +LABELV $166 +endproc FX_TurretProjectileThink 16 12 +export FX_TurretHitWall +proc FX_TurretHitWall 0 12 +line 152 +;145: +;146:/* +;147:------------------------- +;148:FX_TurretHitWall +;149:------------------------- +;150:*/ +;151:void FX_TurretHitWall( vec3_t origin, vec3_t normal ) +;152:{ +line 153 +;153: trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+8 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 154 +;154:} +LABELV $172 +endproc FX_TurretHitWall 0 12 +export FX_TurretHitPlayer +proc FX_TurretHitPlayer 0 12 +line 162 +;155: +;156:/* +;157:------------------------- +;158:FX_TurretHitPlayer +;159:------------------------- +;160:*/ +;161:void FX_TurretHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +;162:{ +line 163 +;163: if ( humanoid ) +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $176 +line 164 +;164: { +line 165 +;165: trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+20 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 166 +;166: } +ADDRGP4 $177 +JUMPV +LABELV $176 +line 168 +;167: else +;168: { +line 169 +;169: trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+24 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 170 +;170: } +LABELV $177 +line 171 +;171:} +LABELV $175 +endproc FX_TurretHitPlayer 0 12 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import CG_Spark +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort diff --git a/code/cgame/vm/fx_demp2.asm b/code/cgame/vm/fx_demp2.asm new file mode 100644 index 0000000..4a1b3d2 --- /dev/null +++ b/code/cgame/vm/fx_demp2.asm @@ -0,0 +1,1187 @@ +export FX_DEMP2_ProjectileThink +code +proc FX_DEMP2_ProjectileThink 16 12 +file "../fx_demp2.c" +line 12 +;1:// DEMP2 Weapon +;2: +;3:#include "cg_local.h" +;4: +;5:/* +;6:--------------------------- +;7:FX_DEMP2_ProjectileThink +;8:--------------------------- +;9:*/ +;10: +;11:void FX_DEMP2_ProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;12:{ +line 15 +;13: vec3_t forward; +;14: +;15: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $121 +line 16 +;16: { +line 17 +;17: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 18 +;18: } +LABELV $121 +line 20 +;19: +;20: trap_FX_PlayEffectID( cgs.effects.demp2ProjectileEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+96 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 21 +;21:} +LABELV $120 +endproc FX_DEMP2_ProjectileThink 16 12 +export FX_DEMP2_HitWall +proc FX_DEMP2_HitWall 0 12 +line 30 +;22: +;23:/* +;24:--------------------------- +;25:FX_DEMP2_HitWall +;26:--------------------------- +;27:*/ +;28: +;29:void FX_DEMP2_HitWall( vec3_t origin, vec3_t normal ) +;30:{ +line 31 +;31: trap_FX_PlayEffectID( cgs.effects.demp2WallImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+100 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 32 +;32:} +LABELV $126 +endproc FX_DEMP2_HitWall 0 12 +export FX_DEMP2_HitPlayer +proc FX_DEMP2_HitPlayer 0 12 +line 41 +;33: +;34:/* +;35:--------------------------- +;36:FX_DEMP2_HitPlayer +;37:--------------------------- +;38:*/ +;39: +;40:void FX_DEMP2_HitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +;41:{ +line 42 +;42: trap_FX_PlayEffectID( cgs.effects.demp2FleshImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+104 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 43 +;43:} +LABELV $129 +endproc FX_DEMP2_HitPlayer 0 12 +export FX_DEMP2_AltBeam +proc FX_DEMP2_AltBeam 0 0 +line 52 +;44: +;45:/* +;46:--------------------------- +;47:FX_DEMP2_AltBeam +;48:--------------------------- +;49:*/ +;50:void FX_DEMP2_AltBeam( vec3_t start, vec3_t end, vec3_t normal, //qboolean spark, +;51: vec3_t targ1, vec3_t targ2 ) +;52:{ +line 237 +;53://NOTENOTE Fix this after trap calls for all primitives are created. +;54:/* +;55: vec3_t dir, chaos, +;56: c1, c2, +;57: v1, v2; +;58: float len, +;59: s1, s2, s3; +;60: +;61: VectorSubtract( end, start, dir ); +;62: len = VectorNormalize( dir ); +;63: +;64: // Get the base control points, we'll work from there +;65: VectorMA( start, 0.3333f * len, dir, c1 ); +;66: VectorMA( start, 0.6666f * len, dir, c2 ); +;67: +;68: // get some chaos values that really aren't very chaotic :) +;69: s1 = sin( cg.time * 0.005f ) * 2 + crandom() * 0.2f; +;70: s2 = sin( cg.time * 0.001f ); +;71: s3 = sin( cg.time * 0.011f ); +;72: +;73: VectorSet( chaos, len * 0.01f * s1, +;74: len * 0.02f * s2, +;75: len * 0.04f * (s1 + s2 + s3)); +;76: +;77: VectorAdd( c1, chaos, c1 ); +;78: VectorScale( chaos, 4.0f, v1 ); +;79: +;80: VectorSet( chaos, -len * 0.02f * s3, +;81: len * 0.01f * (s1 * s2), +;82: -len * 0.02f * (s1 + s2 * s3)); +;83: +;84: VectorAdd( c2, chaos, c2 ); +;85: VectorScale( chaos, 2.0f, v2 ); +;86: +;87: VectorSet( chaos, 1.0f, 1.0f, 1.0f ); +;88: +;89: FX_AddBezier( start, targ1, +;90: c1, v1, c2, v2, +;91: 5.0f + s1 * 2, 8.0f, 0.0f, +;92: 1.0f, 0.0f, 0.0f, +;93: chaos, chaos, 0.0f, +;94: 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); +;95: +;96: FX_AddBezier( start, targ1, +;97: c2, v2, c1, v1, +;98: 3.0f + s3, 3.0f, 0.0f, +;99: 1.0f, 0.0f, 0.0f, +;100: chaos, chaos, 0.0f, +;101: 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); +;102: +;103: s1 = sin( cg.time * 0.0005f ) + crandom() * 0.1f; +;104: s2 = sin( cg.time * 0.0025f ); +;105: float cc2 = cos( cg.time * 0.0025f ); +;106: s3 = sin( cg.time * 0.01f ) + crandom() * 0.1f; +;107: +;108: VectorSet( chaos, len * 0.08f * s2, +;109: len * 0.04f * cc2,//s1 * -s3, +;110: len * 0.06f * s3 ); +;111: +;112: VectorAdd( c1, chaos, c1 ); +;113: VectorScale( chaos, 4.0f, v1 ); +;114: +;115: VectorSet( chaos, len * 0.02f * s1 * s3, +;116: len * 0.04f * s2, +;117: len * 0.03f * s1 * s2 ); +;118: +;119: VectorAdd( c2, chaos, c2 ); +;120: VectorScale( chaos, 3.0f, v2 ); +;121: +;122: VectorSet( chaos, 1.0f, 1.0f, 1.0f ); +;123: +;124: FX_AddBezier( start, targ1, +;125: c1, v1, c2, v2, +;126: 4.0f + s3, 8.0f, 0.0f, +;127: 1.0f, 0.0f, 0.0f, +;128: chaos, chaos, 0.0f, +;129: 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); +;130: +;131: FX_AddBezier( start, targ1, +;132: c2, v1, c1, v2, +;133: 5.0f + s1 * 2, 8.0f, 0.0f, +;134: 1.0f, 0.0f, 0.0f, +;135: chaos, chaos, 0.0f, +;136: 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); +;137: +;138: +;139: VectorMA( start, 14.0f, dir, c1 ); +;140: +;141: FX_AddSprite( c1, NULL, NULL, 12.0f + crandom() * 4, 0.0f, 1.0f, 1.0f, random() * 360, 0.0f, 1.0f, +;142: trap_R_RegisterShader( "gfx/misc/lightningFlash" )); +;143: FX_AddSprite( c1, NULL, NULL, 6.0f + crandom() * 2, 0.0f, 1.0f, 1.0f, random() * 360, 0.0f, 1.0f, +;144: trap_R_RegisterShader( "gfx/misc/lightningFlash" )); +;145: +;146: FX_AddSprite( targ1, NULL, NULL, 4.0f + crandom(), 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, +;147: trap_R_RegisterShader( "gfx/misc/lightningFlash" )); +;148: FX_AddSprite( targ1, NULL, NULL, 8.0f + crandom() * 2, 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, +;149: trap_R_RegisterShader( "gfx/misc/lightningFlash" )); +;150: +;151: +;152: //-------------------------------------------- +;153: +;154: VectorSubtract( targ2, targ1, dir ); +;155: len = VectorNormalize( dir ); +;156: +;157: // Get the base control points, we'll work from there +;158: VectorMA( targ1, 0.3333f * len, dir, c1 ); +;159: VectorMA( targ1, 0.6666f * len, dir, c2 ); +;160: +;161: // get some chaos values that really aren't very chaotic :) +;162: s1 = sin( cg.time * 0.005f ) * 2 + crandom() * 0.2f; +;163: s2 = sin( cg.time * 0.001f ); +;164: s3 = sin( cg.time * 0.011f ); +;165: +;166: VectorSet( chaos, len * 0.01f * s1, +;167: len * 0.02f * s2, +;168: len * 0.04f * (s1 + s2 + s3)); +;169: +;170: VectorAdd( c1, chaos, c1 ); +;171: VectorScale( chaos, 4.0f, v1 ); +;172: +;173: VectorSet( chaos, -len * 0.02f * s3, +;174: len * 0.01f * (s1 * s2), +;175: -len * 0.02f * (s1 + s2 * s3)); +;176: +;177: VectorAdd( c2, chaos, c2 ); +;178: VectorScale( chaos, 2.0f, v2 ); +;179: +;180: VectorSet( chaos, 1.0f, 1.0f, 1.0f ); +;181: +;182: FX_AddBezier( targ1, targ2, +;183: c1, v1, c2, v2, +;184: 5.0f + s1 * 2, 8.0f, 0.0f, +;185: 1.0f, 0.0f, 0.0f, +;186: chaos, chaos, 0.0f, +;187: 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); +;188: +;189: FX_AddBezier( targ1, targ2, +;190: c2, v2, c1, v1, +;191: 3.0f + s3, 3.0f, 0.0f, +;192: 1.0f, 0.0f, 0.0f, +;193: chaos, chaos, 0.0f, +;194: 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); +;195: +;196: s1 = sin( cg.time * 0.0005f ) + crandom() * 0.1f; +;197: s2 = sin( cg.time * 0.0025f ); +;198: cc2 = cos( cg.time * 0.0025f ); +;199: s3 = sin( cg.time * 0.01f ) + crandom() * 0.1f; +;200: +;201: VectorSet( chaos, len * 0.08f * s2, +;202: len * 0.04f * cc2,//s1 * -s3, +;203: len * 0.06f * s3 ); +;204: +;205: VectorAdd( c1, chaos, c1 ); +;206: VectorScale( chaos, 4.0f, v1 ); +;207: +;208: VectorSet( chaos, len * 0.02f * s1 * s3, +;209: len * 0.04f * s2, +;210: len * 0.03f * s1 * s2 ); +;211: +;212: VectorAdd( c2, chaos, c2 ); +;213: VectorScale( chaos, 3.0f, v2 ); +;214: +;215: VectorSet( chaos, 1.0f, 1.0f, 1.0f ); +;216: +;217: FX_AddBezier( targ1, targ2, +;218: c1, v1, c2, v2, +;219: 4.0f + s3, 8.0f, 0.0f, +;220: 1.0f, 0.0f, 0.0f, +;221: chaos, chaos, 0.0f, +;222: 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); +;223: +;224: FX_AddBezier( targ1, targ2, +;225: c2, v1, c1, v2, +;226: 5.0f + s1 * 2, 8.0f, 0.0f, +;227: 1.0f, 0.0f, 0.0f, +;228: chaos, chaos, 0.0f, +;229: 1.0f, trap_R_RegisterShader( "gfx/misc/electric2" ), FX_ALPHA_LINEAR ); +;230: +;231: +;232: FX_AddSprite( targ2, NULL, NULL, 4.0f + crandom(), 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, +;233: trap_R_RegisterShader( "gfx/misc/lightningFlash" )); +;234: FX_AddSprite( targ2, NULL, NULL, 8.0f + crandom() * 2, 0.0f, 1.0f, 0.0f, chaos, chaos, random() * 360, 0.0f, 10, +;235: trap_R_RegisterShader( "gfx/misc/lightningFlash" )); +;236:*/ +;237:} +LABELV $132 +endproc FX_DEMP2_AltBeam 0 0 +export FX_DEMP2_AltDetonate +proc FX_DEMP2_AltDetonate 24 12 +line 241 +;238: +;239://--------------------------------------------- +;240:void FX_DEMP2_AltDetonate( vec3_t org, float size ) +;241:{ +line 244 +;242: localEntity_t *ex; +;243: +;244: ex = CG_AllocLocalEntity(); +ADDRLP4 4 +ADDRGP4 CG_AllocLocalEntity +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 245 +;245: ex->leType = LE_FADE_SCALE_MODEL; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTI4 3 +ASGNI4 +line 246 +;246: memset( &ex->refEntity, 0, sizeof( refEntity_t )); +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 248 +;247: +;248: ex->refEntity.renderfx |= RF_VOLUMETRIC; +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 252 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 32 +BORI4 +ASGNI4 +line 250 +;249: +;250: ex->startTime = cg.time; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 cg+64 +INDIRI4 +ASGNI4 +line 251 +;251: ex->endTime = ex->startTime + 800;//1600; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +CNSTI4 800 +ADDI4 +ASGNI4 +line 253 +;252: +;253: ex->radius = size; +ADDRLP4 0 +INDIRP4 +CNSTI4 140 +ADDP4 +ADDRFP4 4 +INDIRF4 +ASGNF4 +line 254 +;254: ex->refEntity.customShader = cgs.media.demp2ShellShader; +ADDRLP4 0 +INDIRP4 +CNSTI4 324 +ADDP4 +ADDRGP4 cgs+70296+912 +INDIRI4 +ASGNI4 +line 255 +;255: ex->refEntity.hModel = cgs.media.demp2Shell; +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDRGP4 cgs+70296+908 +INDIRI4 +ASGNI4 +line 256 +;256: VectorCopy( org, ex->refEntity.origin ); +ADDRLP4 0 +INDIRP4 +CNSTI4 300 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 258 +;257: +;258: ex->color[0] = ex->color[1] = ex->color[2] = 255.0f; +ADDRLP4 20 +CNSTF4 1132396544 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 132 +ADDP4 +ADDRLP4 20 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ADDRLP4 20 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +ADDRLP4 20 +INDIRF4 +ASGNF4 +line 259 +;259:} +LABELV $133 +endproc FX_DEMP2_AltDetonate 24 12 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort diff --git a/code/cgame/vm/fx_disruptor.asm b/code/cgame/vm/fx_disruptor.asm new file mode 100644 index 0000000..8b7dcdb --- /dev/null +++ b/code/cgame/vm/fx_disruptor.asm @@ -0,0 +1,1461 @@ +data +align 4 +LABELV WHITE +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +export FX_DisruptorMainShot +code +proc FX_DisruptorMainShot 12 56 +file "../fx_disruptor.c" +line 14 +;1:// Disruptor Weapon +;2: +;3:#include "cg_local.h" +;4:#include "fx_local.h" +;5: +;6:/* +;7:--------------------------- +;8:FX_DisruptorMainShot +;9:--------------------------- +;10:*/ +;11:static vec3_t WHITE={1.0f,1.0f,1.0f}; +;12: +;13:void FX_DisruptorMainShot( vec3_t start, vec3_t end ) +;14:{ +line 18 +;15:// vec3_t dir; +;16:// float len; +;17: +;18: trap_FX_AddLine( start, end, 0.1f, 6.0f, 0.0f, +ADDRGP4 $121 +ARGP4 +ADDRLP4 0 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTF4 1036831949 +ARGF4 +CNSTF4 1086324736 +ARGF4 +ADDRLP4 4 +CNSTF4 0 +ASGNF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 WHITE +ASGNP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRF4 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 257 +ARGI4 +ADDRGP4 trap_FX_AddLine +CALLV +pop +line 33 +;19: 1.0f, 0.0f, 0.0f, +;20: WHITE, WHITE, 0.0f, +;21: 150, trap_R_RegisterShader( "gfx/effects/redLine" ), +;22: FX_SIZE_LINEAR | FX_ALPHA_LINEAR ); +;23: +;24:// VectorSubtract( end, start, dir ); +;25:// len = VectorNormalize( dir ); +;26: +;27:// FX_AddCylinder( start, dir, 5.0f, 5.0f, 0.0f, +;28:// 5.0f, 5.0f, 0.0f, +;29:// len, len, 0.0f, +;30:// 1.0f, 1.0f, 0.0f, +;31:// WHITE, WHITE, 0.0f, +;32:// 400, cgi_R_RegisterShader( "gfx/effects/spiral" ), 0 ); +;33:} +LABELV $120 +endproc FX_DisruptorMainShot 12 56 +lit +align 4 +LABELV $125 +byte 4 1061997773 +byte 4 1060320051 +byte 4 0 +export FX_DisruptorAltShot +code +proc FX_DisruptorAltShot 32 56 +line 42 +;34: +;35: +;36:/* +;37:--------------------------- +;38:FX_DisruptorAltShot +;39:--------------------------- +;40:*/ +;41:void FX_DisruptorAltShot( vec3_t start, vec3_t end, qboolean fullCharge ) +;42:{ +line 43 +;43: trap_FX_AddLine( start, end, 0.1f, 10.0f, 0.0f, +ADDRGP4 $121 +ARGP4 +ADDRLP4 0 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTF4 1036831949 +ARGF4 +CNSTF4 1092616192 +ARGF4 +ADDRLP4 4 +CNSTF4 0 +ASGNF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 WHITE +ASGNP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRF4 +ARGF4 +CNSTI4 175 +ARGI4 +ADDRLP4 0 +INDIRI4 +ARGI4 +CNSTI4 257 +ARGI4 +ADDRGP4 trap_FX_AddLine +CALLV +pop +line 49 +;44: 1.0f, 0.0f, 0.0f, +;45: WHITE, WHITE, 0.0f, +;46: 175, trap_R_RegisterShader( "gfx/effects/redLine" ), +;47: FX_SIZE_LINEAR | FX_ALPHA_LINEAR ); +;48: +;49: if ( fullCharge ) +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $123 +line 50 +;50: { +line 51 +;51: vec3_t YELLER={0.8f,0.7f,0.0f}; +ADDRLP4 12 +ADDRGP4 $125 +INDIRB +ASGNB 12 +line 54 +;52: +;53: // add some beef +;54: trap_FX_AddLine( start, end, 0.1f, 7.0f, 0.0f, +ADDRGP4 $126 +ARGP4 +ADDRLP4 24 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTF4 1036831949 +ARGF4 +CNSTF4 1088421888 +ARGF4 +ADDRLP4 28 +CNSTF4 0 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 12 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 28 +INDIRF4 +ARGF4 +CNSTI4 150 +ARGI4 +ADDRLP4 24 +INDIRI4 +ARGI4 +CNSTI4 257 +ARGI4 +ADDRGP4 trap_FX_AddLine +CALLV +pop +line 59 +;55: 1.0f, 0.0f, 0.0f, +;56: YELLER, YELLER, 0.0f, +;57: 150, trap_R_RegisterShader( "gfx/misc/whiteline2" ), +;58: FX_SIZE_LINEAR | FX_ALPHA_LINEAR ); +;59: } +LABELV $123 +line 60 +;60:} +LABELV $122 +endproc FX_DisruptorAltShot 32 56 +export FX_DisruptorAltMiss +proc FX_DisruptorAltMiss 212 12 +line 71 +;61: +;62: +;63:/* +;64:--------------------------- +;65:FX_DisruptorAltMiss +;66:--------------------------- +;67:*/ +;68:#define FX_ALPHA_WAVE 0x00000008 +;69: +;70:void FX_DisruptorAltMiss( vec3_t origin, vec3_t normal ) +;71:{ +line 75 +;72: vec3_t pos, c1, c2; +;73: addbezierArgStruct_t b; +;74: +;75: VectorMA( origin, 4.0f, normal, c1 ); +ADDRLP4 172 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 176 +CNSTF4 1082130432 +ASGNF4 +ADDRLP4 180 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 136 +ADDRLP4 172 +INDIRP4 +INDIRF4 +ADDRLP4 176 +INDIRF4 +ADDRLP4 180 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 184 +CNSTI4 4 +ASGNI4 +ADDRLP4 136+4 +ADDRLP4 172 +INDIRP4 +ADDRLP4 184 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 176 +INDIRF4 +ADDRLP4 180 +INDIRP4 +ADDRLP4 184 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 188 +CNSTI4 8 +ASGNI4 +ADDRLP4 136+8 +ADDRFP4 0 +INDIRP4 +ADDRLP4 188 +INDIRI4 +ADDP4 +INDIRF4 +CNSTF4 1082130432 +ADDRFP4 4 +INDIRP4 +ADDRLP4 188 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 76 +;76: VectorCopy( c1, c2 ); +ADDRLP4 160 +ADDRLP4 136 +INDIRB +ASGNB 12 +line 77 +;77: c1[2] += 4; +ADDRLP4 136+8 +ADDRLP4 136+8 +INDIRF4 +CNSTF4 1082130432 +ADDF4 +ASGNF4 +line 78 +;78: c2[2] += 12; +ADDRLP4 160+8 +ADDRLP4 160+8 +INDIRF4 +CNSTF4 1094713344 +ADDF4 +ASGNF4 +line 80 +;79: +;80: VectorAdd( origin, normal, pos ); +ADDRLP4 192 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 196 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 148 +ADDRLP4 192 +INDIRP4 +INDIRF4 +ADDRLP4 196 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 200 +CNSTI4 4 +ASGNI4 +ADDRLP4 148+4 +ADDRLP4 192 +INDIRP4 +ADDRLP4 200 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 196 +INDIRP4 +ADDRLP4 200 +INDIRI4 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +ADDRLP4 204 +CNSTI4 8 +ASGNI4 +ADDRLP4 148+8 +ADDRFP4 0 +INDIRP4 +ADDRLP4 204 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 204 +INDIRI4 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 81 +;81: pos[2] += 28; +ADDRLP4 148+8 +ADDRLP4 148+8 +INDIRF4 +CNSTF4 1105199104 +ADDF4 +ASGNF4 +line 88 +;82: +;83: /* +;84: FX_AddBezier( origin, pos, c1, vec3_origin, c2, vec3_origin, 6.0f, 6.0f, 0.0f, 0.0f, 0.2f, 0.5f, +;85: WHITE, WHITE, 0.0f, 4000, trap_R_RegisterShader( "gfx/effects/smokeTrail" ), FX_ALPHA_WAVE ); +;86: */ +;87: +;88: VectorCopy(origin, b.start); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 89 +;89: VectorCopy(pos, b.end); +ADDRLP4 0+12 +ADDRLP4 148 +INDIRB +ASGNB 12 +line 90 +;90: VectorCopy(c1, b.control1); +ADDRLP4 0+24 +ADDRLP4 136 +INDIRB +ASGNB 12 +line 91 +;91: VectorCopy(vec3_origin, b.control1Vel); +ADDRLP4 0+36 +ADDRGP4 vec3_origin +INDIRB +ASGNB 12 +line 92 +;92: VectorCopy(c2, b.control2); +ADDRLP4 0+48 +ADDRLP4 160 +INDIRB +ASGNB 12 +line 93 +;93: VectorCopy(vec3_origin, b.control2Vel); +ADDRLP4 0+60 +ADDRGP4 vec3_origin +INDIRB +ASGNB 12 +line 95 +;94: +;95: b.size1 = 6.0f; +ADDRLP4 0+72 +CNSTF4 1086324736 +ASGNF4 +line 96 +;96: b.size2 = 6.0f; +ADDRLP4 0+76 +CNSTF4 1086324736 +ASGNF4 +line 97 +;97: b.sizeParm = 0.0f; +ADDRLP4 0+80 +CNSTF4 0 +ASGNF4 +line 98 +;98: b.alpha1 = 0.0f; +ADDRLP4 0+84 +CNSTF4 0 +ASGNF4 +line 99 +;99: b.alpha2 = 0.2f; +ADDRLP4 0+88 +CNSTF4 1045220557 +ASGNF4 +line 100 +;100: b.alphaParm = 0.5f; +ADDRLP4 0+92 +CNSTF4 1056964608 +ASGNF4 +line 102 +;101: +;102: VectorCopy(WHITE, b.sRGB); +ADDRLP4 0+96 +ADDRGP4 WHITE +INDIRB +ASGNB 12 +line 103 +;103: VectorCopy(WHITE, b.eRGB); +ADDRLP4 0+108 +ADDRGP4 WHITE +INDIRB +ASGNB 12 +line 105 +;104: +;105: b.rgbParm = 0.0f; +ADDRLP4 0+120 +CNSTF4 0 +ASGNF4 +line 106 +;106: b.killTime = 4000; +ADDRLP4 0+124 +CNSTI4 4000 +ASGNI4 +line 107 +;107: b.shader = trap_R_RegisterShader( "gfx/effects/smokeTrail" ); +ADDRGP4 $151 +ARGP4 +ADDRLP4 208 +ADDRGP4 trap_R_RegisterShader +CALLI4 +ASGNI4 +ADDRLP4 0+128 +ADDRLP4 208 +INDIRI4 +ASGNI4 +line 108 +;108: b.flags = FX_ALPHA_WAVE; +ADDRLP4 0+132 +CNSTI4 8 +ASGNI4 +line 110 +;109: +;110: trap_FX_AddBezier(&b); +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_AddBezier +CALLV +pop +line 112 +;111: +;112: trap_FX_PlayEffectID( cgs.effects.disruptorAltMissEffect, origin, normal ); +ADDRGP4 cgs+71564+60 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 113 +;113:} +LABELV $127 +endproc FX_DisruptorAltMiss 212 12 +export FX_DisruptorAltHit +proc FX_DisruptorAltHit 0 12 +line 122 +;114: +;115:/* +;116:--------------------------- +;117:FX_DisruptorAltHit +;118:--------------------------- +;119:*/ +;120: +;121:void FX_DisruptorAltHit( vec3_t origin, vec3_t normal ) +;122:{ +line 123 +;123: trap_FX_PlayEffectID( cgs.effects.disruptorAltHitEffect, origin, normal ); +ADDRGP4 cgs+71564+64 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 124 +;124:} +LABELV $155 +endproc FX_DisruptorAltHit 0 12 +export FX_DisruptorHitWall +proc FX_DisruptorHitWall 0 12 +line 135 +;125: +;126: +;127: +;128:/* +;129:--------------------------- +;130:FX_DisruptorHitWall +;131:--------------------------- +;132:*/ +;133: +;134:void FX_DisruptorHitWall( vec3_t origin, vec3_t normal ) +;135:{ +line 136 +;136: trap_FX_PlayEffectID( cgs.effects.disruptorWallImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+52 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 137 +;137:} +LABELV $158 +endproc FX_DisruptorHitWall 0 12 +export FX_DisruptorHitPlayer +proc FX_DisruptorHitPlayer 0 12 +line 146 +;138: +;139:/* +;140:--------------------------- +;141:FX_DisruptorHitPlayer +;142:--------------------------- +;143:*/ +;144: +;145:void FX_DisruptorHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +;146:{ +line 147 +;147: trap_FX_PlayEffectID( cgs.effects.disruptorFleshImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+56 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 148 +;148:} +LABELV $161 +endproc FX_DisruptorHitPlayer 0 12 +import FX_RocketHitPlayer +import FX_RocketHitWall +import FX_RocketAltProjectileThink +import FX_RocketProjectileThink +import FX_FlechetteAltProjectileThink +import FX_FlechetteWeaponHitPlayer +import FX_FlechetteWeaponHitWall +import FX_FlechetteProjectileThink +import FX_DEMP2_AltDetonate +import FX_DEMP2_HitPlayer +import FX_DEMP2_HitWall +import FX_DEMP2_ProjectileThink +import FX_RepeaterAltHitPlayer +import FX_RepeaterHitPlayer +import FX_RepeaterAltHitWall +import FX_RepeaterHitWall +import FX_RepeaterAltProjectileThink +import FX_RepeaterProjectileThink +import FX_BowcasterHitPlayer +import FX_BowcasterHitWall +import FX_BowcasterAltProjectileThink +import FX_BowcasterProjectileThink +import FX_BryarAltProjectileThink +import FX_BryarProjectileThink +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $151 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 115 +char 1 109 +char 1 111 +char 1 107 +char 1 101 +char 1 84 +char 1 114 +char 1 97 +char 1 105 +char 1 108 +char 1 0 +align 1 +LABELV $126 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 109 +char 1 105 +char 1 115 +char 1 99 +char 1 47 +char 1 119 +char 1 104 +char 1 105 +char 1 116 +char 1 101 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 50 +char 1 0 +align 1 +LABELV $121 +char 1 103 +char 1 102 +char 1 120 +char 1 47 +char 1 101 +char 1 102 +char 1 102 +char 1 101 +char 1 99 +char 1 116 +char 1 115 +char 1 47 +char 1 114 +char 1 101 +char 1 100 +char 1 76 +char 1 105 +char 1 110 +char 1 101 +char 1 0 diff --git a/code/cgame/vm/fx_flechette.asm b/code/cgame/vm/fx_flechette.asm new file mode 100644 index 0000000..dbb935d --- /dev/null +++ b/code/cgame/vm/fx_flechette.asm @@ -0,0 +1,903 @@ +export FX_FlechetteProjectileThink +code +proc FX_FlechetteProjectileThink 16 12 +file "../fx_flechette.c" +line 12 +;1:// Golan Arms Flechette Weapon +;2: +;3:#include "cg_local.h" +;4: +;5:/* +;6:------------------------- +;7:FX_FlechetteProjectileThink +;8:------------------------- +;9:*/ +;10: +;11:void FX_FlechetteProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;12:{ +line 15 +;13: vec3_t forward; +;14: +;15: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $121 +line 16 +;16: { +line 17 +;17: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 18 +;18: } +LABELV $121 +line 20 +;19: +;20: trap_FX_PlayEffectID( cgs.effects.flechetteShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+108 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 21 +;21:} +LABELV $120 +endproc FX_FlechetteProjectileThink 16 12 +export FX_FlechetteWeaponHitWall +proc FX_FlechetteWeaponHitWall 0 12 +line 29 +;22: +;23:/* +;24:------------------------- +;25:FX_FlechetteWeaponHitWall +;26:------------------------- +;27:*/ +;28:void FX_FlechetteWeaponHitWall( vec3_t origin, vec3_t normal ) +;29:{ +line 30 +;30: trap_FX_PlayEffectID( cgs.effects.flechetteWallImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+116 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 31 +;31:} +LABELV $126 +endproc FX_FlechetteWeaponHitWall 0 12 +export FX_FlechetteWeaponHitPlayer +proc FX_FlechetteWeaponHitPlayer 0 12 +line 39 +;32: +;33:/* +;34:------------------------- +;35:FX_FlechetteWeaponHitPlayer +;36:------------------------- +;37:*/ +;38:void FX_FlechetteWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +;39:{ +line 42 +;40:// if ( humanoid ) +;41:// { +;42: trap_FX_PlayEffectID( cgs.effects.flechetteFleshImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+120 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 48 +;43:// } +;44:// else +;45:// { +;46:// trap_FX_PlayEffect( "blaster/droid_impact", origin, normal ); +;47:// } +;48:} +LABELV $129 +endproc FX_FlechetteWeaponHitPlayer 0 12 +export FX_FlechetteAltProjectileThink +proc FX_FlechetteAltProjectileThink 16 12 +line 58 +;49: +;50: +;51:/* +;52:------------------------- +;53:FX_FlechetteProjectileThink +;54:------------------------- +;55:*/ +;56: +;57:void FX_FlechetteAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;58:{ +line 61 +;59: vec3_t forward; +;60: +;61: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $133 +line 62 +;62: { +line 63 +;63: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 64 +;64: } +LABELV $133 +line 66 +;65: +;66: trap_FX_PlayEffectID( cgs.effects.flechetteAltShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+112 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 67 +;67:} +LABELV $132 +endproc FX_FlechetteAltProjectileThink 16 12 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort diff --git a/code/cgame/vm/fx_force.asm b/code/cgame/vm/fx_force.asm new file mode 100644 index 0000000..e44cab0 --- /dev/null +++ b/code/cgame/vm/fx_force.asm @@ -0,0 +1,786 @@ +export FX_ForceDrained +code +proc FX_ForceDrained 12 12 +file "../fx_force.c" +line 12 +;1:// Any dedicated force oriented effects +;2: +;3:#include "cg_local.h" +;4: +;5:/* +;6:------------------------- +;7:FX_ForceDrained +;8:------------------------- +;9:*/ +;10:// This effect is not generic because of possible enhancements +;11:void FX_ForceDrained(vec3_t origin, vec3_t dir) +;12:{ +line 13 +;13: VectorScale(dir, -1.0, dir); +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTF4 3212836864 +ADDRLP4 0 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTF4 3212836864 +ADDRLP4 4 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTF4 3212836864 +ADDRLP4 8 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 14 +;14: trap_FX_PlayEffectID(cgs.effects.forceDrained, origin, dir); +ADDRGP4 cgs+71564+160 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 15 +;15:} +LABELV $120 +endproc FX_ForceDrained 12 12 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort diff --git a/code/cgame/vm/fx_heavyrepeater.asm b/code/cgame/vm/fx_heavyrepeater.asm new file mode 100644 index 0000000..5600ff5 --- /dev/null +++ b/code/cgame/vm/fx_heavyrepeater.asm @@ -0,0 +1,957 @@ +export FX_RepeaterProjectileThink +code +proc FX_RepeaterProjectileThink 16 12 +file "../fx_heavyrepeater.c" +line 12 +;1:// Heavy Repeater Weapon +;2: +;3:#include "cg_local.h" +;4: +;5:/* +;6:--------------------------- +;7:FX_RepeaterProjectileThink +;8:--------------------------- +;9:*/ +;10: +;11:void FX_RepeaterProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;12:{ +line 15 +;13: vec3_t forward; +;14: +;15: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $121 +line 16 +;16: { +line 17 +;17: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 18 +;18: } +LABELV $121 +line 20 +;19: +;20: trap_FX_PlayEffectID( cgs.effects.repeaterProjectileEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+76 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 21 +;21:} +LABELV $120 +endproc FX_RepeaterProjectileThink 16 12 +export FX_RepeaterHitWall +proc FX_RepeaterHitWall 0 12 +line 30 +;22: +;23:/* +;24:------------------------ +;25:FX_RepeaterHitWall +;26:------------------------ +;27:*/ +;28: +;29:void FX_RepeaterHitWall( vec3_t origin, vec3_t normal ) +;30:{ +line 31 +;31: trap_FX_PlayEffectID( cgs.effects.repeaterWallImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+84 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 32 +;32:} +LABELV $126 +endproc FX_RepeaterHitWall 0 12 +export FX_RepeaterHitPlayer +proc FX_RepeaterHitPlayer 0 12 +line 41 +;33: +;34:/* +;35:------------------------ +;36:FX_RepeaterHitPlayer +;37:------------------------ +;38:*/ +;39: +;40:void FX_RepeaterHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +;41:{ +line 42 +;42: trap_FX_PlayEffectID( cgs.effects.repeaterFleshImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+88 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 43 +;43:} +LABELV $129 +endproc FX_RepeaterHitPlayer 0 12 +export FX_RepeaterAltProjectileThink +proc FX_RepeaterAltProjectileThink 16 12 +line 52 +;44: +;45:/* +;46:------------------------------ +;47:FX_RepeaterAltProjectileThink +;48:----------------------------- +;49:*/ +;50: +;51:void FX_RepeaterAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;52:{ +line 55 +;53: vec3_t forward; +;54: +;55: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $133 +line 56 +;56: { +line 57 +;57: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 58 +;58: } +LABELV $133 +line 60 +;59: +;60: trap_FX_PlayEffectID( cgs.effects.repeaterAltProjectileEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+80 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 61 +;61:} +LABELV $132 +endproc FX_RepeaterAltProjectileThink 16 12 +export FX_RepeaterAltHitWall +proc FX_RepeaterAltHitWall 0 12 +line 70 +;62: +;63:/* +;64:------------------------ +;65:FX_RepeaterAltHitWall +;66:------------------------ +;67:*/ +;68: +;69:void FX_RepeaterAltHitWall( vec3_t origin, vec3_t normal ) +;70:{ +line 71 +;71: trap_FX_PlayEffectID( cgs.effects.repeaterAltWallImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+92 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 72 +;72:} +LABELV $138 +endproc FX_RepeaterAltHitWall 0 12 +export FX_RepeaterAltHitPlayer +proc FX_RepeaterAltHitPlayer 0 12 +line 81 +;73: +;74:/* +;75:------------------------ +;76:FX_RepeaterAltHitPlayer +;77:------------------------ +;78:*/ +;79: +;80:void FX_RepeaterAltHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +;81:{ +line 82 +;82: trap_FX_PlayEffectID( cgs.effects.repeaterAltWallImpactEffect, origin, normal ); +ADDRGP4 cgs+71564+92 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 83 +;83:} +LABELV $141 +endproc FX_RepeaterAltHitPlayer 0 12 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort diff --git a/code/cgame/vm/fx_rocketlauncher.asm b/code/cgame/vm/fx_rocketlauncher.asm new file mode 100644 index 0000000..d9fbcfe --- /dev/null +++ b/code/cgame/vm/fx_rocketlauncher.asm @@ -0,0 +1,897 @@ +export FX_RocketProjectileThink +code +proc FX_RocketProjectileThink 16 12 +file "../fx_rocketlauncher.c" +line 12 +;1:// Rocket Launcher Weapon +;2: +;3:#include "cg_local.h" +;4: +;5:/* +;6:--------------------------- +;7:FX_RocketProjectileThink +;8:--------------------------- +;9:*/ +;10: +;11:void FX_RocketProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;12:{ +line 15 +;13: vec3_t forward; +;14: +;15: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $121 +line 16 +;16: { +line 17 +;17: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 18 +;18: } +LABELV $121 +line 20 +;19: +;20: trap_FX_PlayEffectID( cgs.effects.rocketShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+124 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 21 +;21:} +LABELV $120 +endproc FX_RocketProjectileThink 16 12 +export FX_RocketHitWall +proc FX_RocketHitWall 0 12 +line 30 +;22: +;23:/* +;24:--------------------------- +;25:FX_RocketHitWall +;26:--------------------------- +;27:*/ +;28: +;29:void FX_RocketHitWall( vec3_t origin, vec3_t normal ) +;30:{ +line 31 +;31: trap_FX_PlayEffectID( cgs.effects.rocketExplosionEffect, origin, normal ); +ADDRGP4 cgs+71564+128 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 32 +;32:} +LABELV $126 +endproc FX_RocketHitWall 0 12 +export FX_RocketHitPlayer +proc FX_RocketHitPlayer 0 12 +line 41 +;33: +;34:/* +;35:--------------------------- +;36:FX_RocketHitPlayer +;37:--------------------------- +;38:*/ +;39: +;40:void FX_RocketHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) +;41:{ +line 42 +;42: trap_FX_PlayEffectID( cgs.effects.rocketExplosionEffect, origin, normal ); +ADDRGP4 cgs+71564+128 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 43 +;43:} +LABELV $129 +endproc FX_RocketHitPlayer 0 12 +export FX_RocketAltProjectileThink +proc FX_RocketAltProjectileThink 16 12 +line 52 +;44: +;45:/* +;46:--------------------------- +;47:FX_RocketAltProjectileThink +;48:--------------------------- +;49:*/ +;50: +;51:void FX_RocketAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) +;52:{ +line 55 +;53: vec3_t forward; +;54: +;55: if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +ADDRGP4 VectorNormalize2 +CALLF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 0 +NEF4 $133 +line 56 +;56: { +line 57 +;57: forward[2] = 1.0f; +ADDRLP4 0+8 +CNSTF4 1065353216 +ASGNF4 +line 58 +;58: } +LABELV $133 +line 60 +;59: +;60: trap_FX_PlayEffectID( cgs.effects.rocketShotEffect, cent->lerpOrigin, forward ); +ADDRGP4 cgs+71564+124 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 928 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_FX_PlayEffectID +CALLV +pop +line 61 +;61:} +LABELV $132 +endproc FX_RocketAltProjectileThink 16 12 +import g2WeaponInstances +import CG_CheckPlayerG2Weapons +import CG_CopyG2WeaponInstance +import CG_ShutDownG2Weapons +import CG_InitG2Weapons +import CG_CreateBBRefEnts +import CG_SetGhoul2Info +import CG_Init_CGents +import CG_Init_CG +import trap_G2API_SetNewOrigin +import trap_G2API_SetSurfaceOnOff +import trap_G2API_SetRootSurface +import trap_G2API_SetBoneAnim +import trap_G2API_GetGLAName +import trap_G2API_SetBoneAngles +import trap_G2API_CleanGhoul2Models +import trap_G2API_SetBoltInfo +import trap_G2API_AddBolt +import trap_G2API_RemoveGhoul2Model +import trap_G2API_HasGhoul2ModelOnIndex +import trap_G2API_DuplicateGhoul2Instance +import trap_G2API_CopySpecificGhoul2Model +import trap_G2API_CopyGhoul2Instance +import trap_G2API_GiveMeVectorFromMatrix +import trap_G2API_InitGhoul2Model +import trap_G2API_GetBoltMatrix_NoRecNoRot +import trap_G2API_GetBoltMatrix_NoReconstruct +import trap_G2API_GetBoltMatrix +import trap_G2_HaveWeGhoul2Models +import trap_G2_SetGhoul2ModelIndexes +import trap_G2_ListModelBones +import trap_G2_ListModelSurfaces +import trap_G2API_CollisionDetect +import FX_ForceDrained +import FX_BlasterWeaponHitPlayer +import FX_BlasterWeaponHitWall +import FX_BlasterAltFireThink +import FX_BlasterProjectileThink +import FX_BryarAltHitPlayer +import FX_BryarHitPlayer +import FX_BryarAltHitWall +import FX_BryarHitWall +import CG_Spark +import FX_TurretHitPlayer +import FX_TurretHitWall +import FX_TurretProjectileThink +import CG_NewParticleArea +import initparticles +import CG_GetStripEdString +import CG_ParticleExplosion +import CG_ParticleMisc +import CG_ParticleDust +import CG_ParticleSparks +import CG_ParticleBulletDebris +import CG_ParticleSnowFlurry +import CG_AddParticleShrapnel +import CG_ParticleSmoke +import CG_ParticleSnow +import CG_AddParticles +import CG_ClearParticles +import trap_ROFF_Purge_Ent +import trap_ROFF_Play +import trap_ROFF_Cache +import trap_ROFF_UpdateEntities +import trap_ROFF_Clean +import trap_CG_RegisterSharedMemory +import trap_SP_GetStringTextString +import trap_SP_Print +import trap_FX_AddSprite +import trap_FX_AddPrimitive +import trap_FX_AddBezier +import trap_FX_AddPoly +import trap_FX_AdjustTime +import trap_FX_FreeSystem +import trap_FX_InitSystem +import trap_FX_AddScheduledEffects +import trap_FX_PlayBoltedEffectID +import trap_FX_PlayEntityEffectID +import trap_FX_PlayEffectID +import trap_FX_PlaySimpleEffectID +import trap_FX_PlayEntityEffect +import trap_FX_PlayEffect +import trap_FX_PlaySimpleEffect +import trap_FX_RegisterEffect +import trap_R_inPVS +import trap_GetEntityToken +import trap_getCameraInfo +import trap_startCamera +import trap_loadCamera +import trap_SnapVector +import trap_CIN_SetExtents +import trap_CIN_DrawCinematic +import trap_CIN_RunCinematic +import trap_CIN_StopCinematic +import trap_CIN_PlayCinematic +import BG_CycleForce +import BG_ProperForceIndex +import BG_CycleInven +import trap_Key_GetKey +import trap_Key_SetCatcher +import trap_Key_GetCatcher +import trap_Key_IsDown +import trap_MemoryRemaining +import testPrintFloat +import testPrintInt +import trap_OpenUIMenu +import trap_SetClientTurnExtent +import trap_SetClientForceAngle +import trap_SetUserCmdValue +import trap_GetUserCmd +import trap_GetCurrentCmdNumber +import trap_GetServerCommand +import trap_GetSnapshot +import trap_GetCurrentSnapshotNumber +import trap_GetGameState +import trap_GetGlconfig +import trap_FX_AddLine +import trap_R_GetBModelVerts +import trap_R_SetLightStyle +import trap_R_GetLightStyle +import trap_R_RemapShader +import trap_R_DrawRotatePic2 +import trap_R_DrawRotatePic +import trap_R_LerpTag +import trap_R_ModelBounds +import trap_R_DrawStretchPic +import trap_R_SetColor +import trap_R_RenderScene +import trap_R_LightForPoint +import trap_R_AddLightToScene +import trap_R_AddPolysToScene +import trap_R_AddPolyToScene +import trap_R_AddRefEntityToScene +import trap_R_ClearScene +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_R_RegisterFont +import trap_R_RegisterShaderNoMip +import trap_R_RegisterShader +import trap_R_RegisterSkin +import trap_R_RegisterModel +import trap_R_LoadWorldMap +import trap_S_StopBackgroundTrack +import trap_S_StartBackgroundTrack +import trap_S_RegisterSound +import trap_S_Respatialize +import trap_S_UpdateEntityPosition +import trap_S_AddRealLoopingSound +import trap_S_AddLoopingSound +import trap_S_ClearLoopingSounds +import trap_S_StartLocalSound +import trap_S_StopLoopingSound +import trap_S_StartSound +import trap_S_MuteSound +import trap_CM_MarkFragments +import trap_CM_TransformedBoxTrace +import trap_CM_BoxTrace +import trap_CM_TransformedPointContents +import trap_CM_PointContents +import trap_CM_TempBoxModel +import trap_CM_InlineModel +import trap_CM_NumInlineModels +import trap_CM_LoadMap +import trap_UpdateScreen +import trap_SendClientCommand +import trap_AddCommand +import trap_SendConsoleCommand +import trap_FS_FCloseFile +import trap_FS_Write +import trap_FS_Read +import trap_FS_FOpenFile +import trap_Args +import trap_Argv +import trap_Argc +import trap_Cvar_VariableStringBuffer +import trap_Cvar_Set +import trap_Cvar_Update +import trap_Cvar_Register +import trap_Milliseconds +import trap_Error +import trap_Print +import CG_SagaObjectiveCompleted +import CG_SagaRoundOver +import CG_InitSagaMode +import CG_CheckChangedPredictableEvents +import CG_TransitionPlayerState +import CG_Respawn +import CG_IsMindTricked +import CG_PlayBufferedVoiceChats +import CG_VoiceChatLocal +import CG_ShaderStateChanged +import CG_LoadVoiceChats +import CG_SetConfigValues +import CG_ParseServerinfo +import CG_ExecuteNewServerCommands +import CG_InitConsoleCommands +import CG_ConsoleCommand +import CG_DrawOldTourneyScoreboard +import CG_DrawOldScoreboard +import CG_DrawInformation +import CG_LoadingClient +import CG_LoadingItem +import CG_LoadingString +import CG_ProcessSnapshots +import CG_InitGlass +import CG_TestLine +import CG_SurfaceExplosion +import CG_MakeExplosion +import CG_Bleed +import CG_ScorePlum +import CG_CreateDebris +import CG_GlassShatter +import CG_BubbleTrail +import CG_SmokePuff +import CG_AddLocalEntities +import CG_AllocLocalEntity +import CG_InitLocalEntities +import CG_ImpactMark +import CG_AddMarks +import CG_InitMarkPolys +import CG_OutOfAmmoChange +import CG_DrawIconBackground +import CG_DrawWeaponSelect +import CG_AddPlayerWeapon +import CG_AddViewWeapon +import CG_MissileHitPlayer +import CG_MissileHitWall +import CG_FireWeapon +import CG_RegisterItemVisuals +import CG_RegisterWeapon +import CG_Weapon_f +import CG_PrevWeapon_f +import CG_NextWeapon_f +import CG_GetClientWeaponMuzzleBoltPoint +import TurretClientRun +import ScaleModelAxis +import CG_PositionRotatedEntityOnTag +import CG_PositionEntityOnTag +import CG_AdjustPositionForMover +import CG_Beam +import CG_ManualEntityRender +import CG_AddPacketEntities +import CG_SetEntitySoundPosition +import CG_ReattachLimb +import CG_PainEvent +import CG_EntityEvent +import CG_PlaceString +import CG_CheckEvents +import CG_LoadDeferredPlayers +import CG_PredictPlayerState +import CG_Trace +import CG_PointContents +import CG_BuildSolidList +import CG_PlayerShieldHit +import CG_CustomSound +import CG_NewClientInfo +import CG_AddRefEntityWithPowerups +import CG_ResetPlayerEntity +import CG_Player +import CG_StatusHandle +import CG_OtherTeamHasFlag +import CG_YourTeamHasFlag +import CG_GameTypeString +import CG_CheckOrderPending +import CG_Text_PaintChar +import CG_Draw3DModel +import CG_GetKillerText +import CG_GetGameStatusText +import CG_GetTeamColor +import CG_InitTeamChat +import CG_SetPrintString +import CG_ShowResponseHead +import CG_DeferMenuScript +import CG_RunMenuScript +import CG_OwnerDrawVisible +import CG_GetValue +import CG_SelectNextPlayer +import CG_SelectPrevPlayer +import CG_Text_Height +import CG_Text_Width +import CG_Text_Paint +import CG_OwnerDraw +import CG_DrawTeamBackground +import CG_DrawFlagModel +import CG_DrawActive +import CG_DrawHead +import CG_CenterPrint +import CG_AddLagometerSnapshotInfo +import CG_AddLagometerFrameInfo +import teamChat2 +import teamChat1 +import systemChat +import drawTeamOverlayModificationCount +import numSortedTeamPlayers +import sortedTeamPlayers +import CG_DrawTopBottom +import CG_DrawSides +import CG_DrawRect +import UI_DrawScaledProportionalString +import UI_DrawProportionalString +import CG_GetColorForHealth +import CG_ColorForHealth +import CG_TileClear +import CG_TeamColor +import CG_FadeColor +import CG_DrawStrlen +import CG_DrawSmallStringColor +import CG_DrawSmallString +import CG_DrawBigStringColor +import CG_DrawBigString +import CG_DrawStringExt +import CG_DrawNumField +import CG_DrawString +import CG_DrawRotatePic2 +import CG_DrawRotatePic +import CG_DrawPic +import CG_FillRect +import CG_TestModelAnimate_f +import CG_TestModelSetAnglespost_f +import CG_TestModelSetAnglespre_f +import CG_ListModelBones_f +import CG_ListModelSurfaces_f +import CG_TestModelSurfaceOnOff_f +import CG_TestG2Model_f +import CG_DrawActiveFrame +import CG_AddBufferedSound +import CG_ZoomUp_f +import CG_ZoomDown_f +import CG_TestModelPrevSkin_f +import CG_TestModelNextSkin_f +import CG_TestModelPrevFrame_f +import CG_TestModelNextFrame_f +import CG_TestGun_f +import CG_TestModel_f +import CG_PrevForcePower_f +import CG_NextForcePower_f +import CG_PrevInventory_f +import CG_NextInventory_f +import CG_BuildSpectatorString +import CG_SetScoreSelection +import CG_RankRunFrame +import CG_EventHandling +import CG_MouseEvent +import CG_KeyEvent +import CG_LoadMenus +import CG_LastAttacker +import CG_CrosshairPlayer +import CG_UpdateCvars +import CG_StartMusic +import CG_Error +import CG_Printf +import CG_Argv +import CG_ConfigString +import cg_debugBB +import ui_myteam +import cg_recordSPDemoName +import cg_recordSPDemo +import cg_singlePlayerActive +import cg_enableBreath +import cg_enableDust +import cg_singlePlayer +import cg_currentSelectedPlayerName +import cg_currentSelectedPlayer +import cg_blueTeamName +import cg_redTeamName +import cg_trueLightning +import cg_noProjectileTrail +import cg_noTaunt +import cg_bigFont +import cg_smallFont +import cg_cameraMode +import cg_timescale +import cg_timescaleFadeSpeed +import cg_timescaleFadeEnd +import cg_cameraOrbitDelay +import cg_cameraOrbit +import pmove_msec +import pmove_fixed +import cg_smoothClients +import cg_hudFiles +import cg_scorePlum +import cg_noVoiceText +import cg_noVoiceChats +import cg_teamChatsOnly +import cg_drawFriend +import cg_deferPlayers +import cg_predictItems +import cg_blood +import cg_paused +import cg_buildScript +import cg_forceModel +import cg_stats +import cg_teamChatHeight +import cg_teamChatTime +import cg_synchronousClients +import cg_drawEnemyInfo +import cg_lagometer +import cg_stereoSeparation +import cg_thirdPersonHorzOffset +import cg_thirdPersonAlpha +import cg_thirdPersonTargetDamp +import cg_thirdPersonCameraDamp +import cg_thirdPersonVertOffset +import cg_thirdPersonPitchOffset +import cg_thirdPersonAngle +import cg_thirdPersonRange +import cg_thirdPerson +import cg_dismember +import cg_animBlend +import cg_auraShell +import cg_speedTrail +import cg_duelHeadAngles +import cg_saberTrail +import cg_saberContact +import cg_saberDynamicMarkTime +import cg_saberDynamicMarks +import cg_fpls +import cg_saberModelTraceEffect +import cg_oldPainSounds +import cg_swingAngles +import cg_zoomFov +import cg_fov +import cg_simpleItems +import cg_ignore +import cg_autoswitch +import cg_tracerLength +import cg_tracerWidth +import cg_tracerChance +import cg_viewsize +import cg_drawGun +import cg_gun_z +import cg_gun_y +import cg_gun_x +import cg_gun_frame +import cg_addMarks +import cg_footsteps +import cg_showmiss +import cg_noPlayerAnims +import cg_nopredict +import cg_errorDecay +import cg_debugEvents +import cg_debugPosition +import cg_debugAnim +import cg_animSpeed +import cg_draw2D +import cg_drawStatus +import cg_crosshairHealth +import cg_crosshairSize +import cg_crosshairY +import cg_crosshairX +import cg_teamOverlayUserinfo +import cg_drawTeamOverlay +import cg_drawRewards +import cg_dynamicCrosshair +import cg_drawScores +import cg_drawCrosshairNames +import cg_drawCrosshair +import cg_drawAmmoWarning +import cg_drawIcons +import cg_draw3dIcons +import cg_drawSnapshot +import cg_drawFPS +import cg_drawTimer +import cg_shadows +import cg_bobroll +import cg_bobpitch +import cg_bobup +import cg_runroll +import cg_runpitch +import cg_centertime +import cg_markPolys +import cg_items +import cg_weapons +import cg_entities +import cg +import cgs +import CGCam_SetMusicMult +import CGCam_Shake +import cgScreenEffects +import ammoTicPos +import forceTicPos +import forcePowerDarkLight +import WeaponAttackAnim +import WeaponReadyAnim +import BG_OutOfMemory +import BG_StringAlloc +import BG_TempFree +import BG_TempAlloc +import BG_AllocUnaligned +import BG_Alloc +import BG_CanUseFPNow +import BG_HasYsalamiri +import BG_GetItemIndexByTag +import BG_ParseAnimationFile +import BG_PlayerTouchesItem +import BG_PlayerStateToEntityStateExtraPolate +import BG_PlayerStateToEntityState +import BG_TouchJumpPad +import BG_AddPredictableEventToPlayerstate +import BG_EvaluateTrajectoryDelta +import BG_EvaluateTrajectory +import BG_ForcePowerDrain +import BG_SaberStartTransAnim +import BG_InDeathAnim +import BG_InRoll +import BG_KnockawayForParry +import BG_BrokenParryForParry +import BG_BrokenParryForAttack +import BG_SaberInSpecialAttack +import BG_SpinningSaberAnim +import BG_FlippingAnim +import BG_SaberInIdle +import BG_SaberInSpecial +import BG_SaberInAttack +import BG_DirectFlippingAnim +import BG_InSaberStandAnim +import BG_InSpecialJump +import BG_LegalizedForcePowers +import saberMoveData +import BG_CanItemBeGrabbed +import BG_FindItemForHoldable +import BG_FindItemForPowerup +import BG_FindItemForWeapon +import BG_FindItem +import vectoyaw +import bg_numItems +import bg_itemlist +import Pmove +import PM_UpdateViewAngles +import pm +import bgForcePowerCost +import forceMasteryPoints +import forceMasteryLevels +import bgGlobalAnimations +import BGPAFtextLoaded +import forcePowerSorted +import WP_MuzzlePoint +import ammoData +import weaponData +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort diff --git a/code/cgame/vm/q_math.asm b/code/cgame/vm/q_math.asm new file mode 100644 index 0000000..60efb51 --- /dev/null +++ b/code/cgame/vm/q_math.asm @@ -0,0 +1,8576 @@ +data +export vec3_origin +align 4 +LABELV vec3_origin +byte 4 0 +byte 4 0 +byte 4 0 +export axisDefault +align 4 +LABELV axisDefault +byte 4 1065353216 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 1065353216 +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 1065353216 +export colorBlack +align 4 +LABELV colorBlack +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 1065353216 +export colorRed +align 4 +LABELV colorRed +byte 4 1065353216 +byte 4 0 +byte 4 0 +byte 4 1065353216 +export colorGreen +align 4 +LABELV colorGreen +byte 4 0 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +export colorBlue +align 4 +LABELV colorBlue +byte 4 0 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +export colorYellow +align 4 +LABELV colorYellow +byte 4 1065353216 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +export colorMagenta +align 4 +LABELV colorMagenta +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +export colorCyan +align 4 +LABELV colorCyan +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +export colorWhite +align 4 +LABELV colorWhite +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +export colorLtGrey +align 4 +LABELV colorLtGrey +byte 4 1061158912 +byte 4 1061158912 +byte 4 1061158912 +byte 4 1065353216 +export colorMdGrey +align 4 +LABELV colorMdGrey +byte 4 1056964608 +byte 4 1056964608 +byte 4 1056964608 +byte 4 1065353216 +export colorDkGrey +align 4 +LABELV colorDkGrey +byte 4 1048576000 +byte 4 1048576000 +byte 4 1048576000 +byte 4 1065353216 +export colorLtBlue +align 4 +LABELV colorLtBlue +byte 4 1052501869 +byte 4 1048945099 +byte 4 1060689150 +byte 4 1065353216 +export colorDkBlue +align 4 +LABELV colorDkBlue +byte 4 1045153448 +byte 4 0 +byte 4 1053542056 +byte 4 1065353216 +export g_color_table +align 4 +LABELV g_color_table +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +byte 4 0 +byte 4 0 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +byte 4 0 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 0 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +export bytedirs +align 4 +LABELV bytedirs +byte 4 3204879951 +byte 4 0 +byte 4 1062847556 +byte 4 3202531056 +byte 4 1047828139 +byte 4 1063074669 +byte 4 3197577718 +byte 4 0 +byte 4 1064605338 +byte 4 3198039930 +byte 4 1056964608 +byte 4 1062149053 +byte 4 3190184938 +byte 4 1049007711 +byte 4 1064532072 +byte 4 0 +byte 4 0 +byte 4 1065353216 +byte 4 0 +byte 4 1062847556 +byte 4 1057396303 +byte 4 3189189110 +byte 4 1060597999 +byte 4 1060013330 +byte 4 1041705462 +byte 4 1060597999 +byte 4 1060013330 +byte 4 0 +byte 4 1057396303 +byte 4 1062847556 +byte 4 1050556282 +byte 4 1056964608 +byte 4 1062149053 +byte 4 1057396303 +byte 4 0 +byte 4 1062847556 +byte 4 1050094070 +byte 4 0 +byte 4 1064605338 +byte 4 1055047408 +byte 4 1047828139 +byte 4 1063074669 +byte 4 1042701290 +byte 4 1049007711 +byte 4 1064532072 +byte 4 3207496978 +byte 4 1041705462 +byte 4 1060597999 +byte 4 3209632701 +byte 4 1050556282 +byte 4 1056964608 +byte 4 3205921044 +byte 4 1054458931 +byte 4 1060121929 +byte 4 3210331204 +byte 4 1057396303 +byte 4 0 +byte 4 3210558317 +byte 4 1055047408 +byte 4 1047828139 +byte 4 3208081647 +byte 4 1060013330 +byte 4 1041705462 +byte 4 3207605577 +byte 4 1058437396 +byte 4 1054458931 +byte 4 3204448256 +byte 4 1062149053 +byte 4 1050556282 +byte 4 3195311787 +byte 4 1063074669 +byte 4 1055047408 +byte 4 3201942579 +byte 4 1060121929 +byte 4 1058437396 +byte 4 3208081647 +byte 4 1060013330 +byte 4 3189189110 +byte 4 3204448256 +byte 4 1062149053 +byte 4 3198039930 +byte 4 3204879951 +byte 4 1062847556 +byte 4 0 +byte 4 0 +byte 4 1062847556 +byte 4 3204879951 +byte 4 3195311787 +byte 4 1063074669 +byte 4 3202531056 +byte 4 0 +byte 4 1064605338 +byte 4 3197577718 +byte 4 3196491359 +byte 4 1064532072 +byte 4 3190184938 +byte 4 0 +byte 4 1065353216 +byte 4 0 +byte 4 0 +byte 4 1064605338 +byte 4 1050094070 +byte 4 3196491359 +byte 4 1064532072 +byte 4 1042701290 +byte 4 1047828139 +byte 4 1063074669 +byte 4 1055047408 +byte 4 1049007711 +byte 4 1064532072 +byte 4 1042701290 +byte 4 1056964608 +byte 4 1062149053 +byte 4 1050556282 +byte 4 1047828139 +byte 4 1063074669 +byte 4 3202531056 +byte 4 1049007711 +byte 4 1064532072 +byte 4 3190184938 +byte 4 1056964608 +byte 4 1062149053 +byte 4 3198039930 +byte 4 1062847556 +byte 4 1057396303 +byte 4 0 +byte 4 1060597999 +byte 4 1060013330 +byte 4 1041705462 +byte 4 1060597999 +byte 4 1060013330 +byte 4 3189189110 +byte 4 1057396303 +byte 4 1062847556 +byte 4 0 +byte 4 1054458931 +byte 4 1060121929 +byte 4 1058437396 +byte 4 1063074669 +byte 4 1055047408 +byte 4 1047828139 +byte 4 1060121929 +byte 4 1058437396 +byte 4 1054458931 +byte 4 1062149053 +byte 4 1050556282 +byte 4 1056964608 +byte 4 1060013330 +byte 4 1041705462 +byte 4 1060597999 +byte 4 1058437396 +byte 4 1054458931 +byte 4 1060121929 +byte 4 1064605338 +byte 4 1050094070 +byte 4 0 +byte 4 1065353216 +byte 4 0 +byte 4 0 +byte 4 1064532072 +byte 4 1042701290 +byte 4 1049007711 +byte 4 1062847556 +byte 4 3204879951 +byte 4 0 +byte 4 1064605338 +byte 4 3197577718 +byte 4 0 +byte 4 1063074669 +byte 4 3202531056 +byte 4 1047828139 +byte 4 1064532072 +byte 4 3190184938 +byte 4 1049007711 +byte 4 1062149053 +byte 4 3198039930 +byte 4 1056964608 +byte 4 1060013330 +byte 4 3189189110 +byte 4 1060597999 +byte 4 1062847556 +byte 4 0 +byte 4 1057396303 +byte 4 1063074669 +byte 4 1055047408 +byte 4 3195311787 +byte 4 1062149053 +byte 4 1050556282 +byte 4 3204448256 +byte 4 1064532072 +byte 4 1042701290 +byte 4 3196491359 +byte 4 1057396303 +byte 4 0 +byte 4 3210331204 +byte 4 1060013330 +byte 4 1041705462 +byte 4 3208081647 +byte 4 1060013330 +byte 4 3189189110 +byte 4 3208081647 +byte 4 1062847556 +byte 4 0 +byte 4 3204879951 +byte 4 1062149053 +byte 4 3198039930 +byte 4 3204448256 +byte 4 1063074669 +byte 4 3202531056 +byte 4 3195311787 +byte 4 1064532072 +byte 4 3190184938 +byte 4 3196491359 +byte 4 1041705462 +byte 4 1060597999 +byte 4 3207496978 +byte 4 1050556282 +byte 4 1056964608 +byte 4 3209632701 +byte 4 1054458931 +byte 4 1060121929 +byte 4 3205921044 +byte 4 1055047408 +byte 4 1047828139 +byte 4 3210558317 +byte 4 1058437396 +byte 4 1054458931 +byte 4 3207605577 +byte 4 1060121929 +byte 4 1058437396 +byte 4 3201942579 +byte 4 3189189110 +byte 4 1060597999 +byte 4 3207496978 +byte 4 3198039930 +byte 4 1056964608 +byte 4 3209632701 +byte 4 0 +byte 4 1057396303 +byte 4 3210331204 +byte 4 3204879951 +byte 4 0 +byte 4 3210331204 +byte 4 3202531056 +byte 4 1047828139 +byte 4 3210558317 +byte 4 3197577718 +byte 4 0 +byte 4 3212088986 +byte 4 3190184938 +byte 4 1049007711 +byte 4 3212015720 +byte 4 0 +byte 4 0 +byte 4 3212836864 +byte 4 1050094070 +byte 4 0 +byte 4 3212088986 +byte 4 1042701290 +byte 4 1049007711 +byte 4 3212015720 +byte 4 3202531056 +byte 4 3195311787 +byte 4 3210558317 +byte 4 3198039930 +byte 4 3204448256 +byte 4 3209632701 +byte 4 3190184938 +byte 4 3196491359 +byte 4 3212015720 +byte 4 0 +byte 4 3210331204 +byte 4 3204879951 +byte 4 3189189110 +byte 4 3208081647 +byte 4 3207496978 +byte 4 1041705462 +byte 4 3208081647 +byte 4 3207496978 +byte 4 0 +byte 4 3204879951 +byte 4 3210331204 +byte 4 1050556282 +byte 4 3204448256 +byte 4 3209632701 +byte 4 1055047408 +byte 4 3195311787 +byte 4 3210558317 +byte 4 1042701290 +byte 4 3196491359 +byte 4 3212015720 +byte 4 1047828139 +byte 4 3210558317 +byte 4 3202531056 +byte 4 1056964608 +byte 4 3209632701 +byte 4 3198039930 +byte 4 1054458931 +byte 4 3207605577 +byte 4 3205921044 +byte 4 1060597999 +byte 4 3207496978 +byte 4 3189189110 +byte 4 1060121929 +byte 4 3205921044 +byte 4 3201942579 +byte 4 1058437396 +byte 4 3201942579 +byte 4 3207605577 +byte 4 0 +byte 4 3212088986 +byte 4 3197577718 +byte 4 0 +byte 4 3212836864 +byte 4 0 +byte 4 1049007711 +byte 4 3212015720 +byte 4 3190184938 +byte 4 0 +byte 4 3210331204 +byte 4 1057396303 +byte 4 0 +byte 4 3212088986 +byte 4 1050094070 +byte 4 1047828139 +byte 4 3210558317 +byte 4 1055047408 +byte 4 1049007711 +byte 4 3212015720 +byte 4 1042701290 +byte 4 1056964608 +byte 4 3209632701 +byte 4 1050556282 +byte 4 1060597999 +byte 4 3207496978 +byte 4 1041705462 +byte 4 1057396303 +byte 4 3210331204 +byte 4 0 +byte 4 3195311787 +byte 4 3210558317 +byte 4 3202531056 +byte 4 3204448256 +byte 4 3209632701 +byte 4 3198039930 +byte 4 3196491359 +byte 4 3212015720 +byte 4 3190184938 +byte 4 3210331204 +byte 4 3204879951 +byte 4 0 +byte 4 3208081647 +byte 4 3207496978 +byte 4 3189189110 +byte 4 3208081647 +byte 4 3207496978 +byte 4 1041705462 +byte 4 3204879951 +byte 4 3210331204 +byte 4 0 +byte 4 3204448256 +byte 4 3209632701 +byte 4 1050556282 +byte 4 3195311787 +byte 4 3210558317 +byte 4 1055047408 +byte 4 3196491359 +byte 4 3212015720 +byte 4 1042701290 +byte 4 3210558317 +byte 4 3202531056 +byte 4 1047828139 +byte 4 3209632701 +byte 4 3198039930 +byte 4 1056964608 +byte 4 3207605577 +byte 4 3205921044 +byte 4 1054458931 +byte 4 3207496978 +byte 4 3189189110 +byte 4 1060597999 +byte 4 3202531056 +byte 4 3195311787 +byte 4 1063074669 +byte 4 3205921044 +byte 4 3201942579 +byte 4 1060121929 +byte 4 3198039930 +byte 4 3204448256 +byte 4 1062149053 +byte 4 3189189110 +byte 4 3208081647 +byte 4 1060013330 +byte 4 3201942579 +byte 4 3207605577 +byte 4 1058437396 +byte 4 3190184938 +byte 4 3196491359 +byte 4 1064532072 +byte 4 1055047408 +byte 4 3195311787 +byte 4 1063074669 +byte 4 1042701290 +byte 4 3196491359 +byte 4 1064532072 +byte 4 1050556282 +byte 4 3204448256 +byte 4 1062149053 +byte 4 1041705462 +byte 4 3208081647 +byte 4 1060013330 +byte 4 0 +byte 4 3204879951 +byte 4 1062847556 +byte 4 1054458931 +byte 4 3207605577 +byte 4 1058437396 +byte 4 1058437396 +byte 4 3201942579 +byte 4 1060121929 +byte 4 1060121929 +byte 4 3205921044 +byte 4 1054458931 +byte 4 3212088986 +byte 4 1050094070 +byte 4 0 +byte 4 3212015720 +byte 4 1042701290 +byte 4 1049007711 +byte 4 3212836864 +byte 4 0 +byte 4 0 +byte 4 3210331204 +byte 4 0 +byte 4 1057396303 +byte 4 3212088986 +byte 4 3197577718 +byte 4 0 +byte 4 3212015720 +byte 4 3190184938 +byte 4 1049007711 +byte 4 3210558317 +byte 4 1055047408 +byte 4 3195311787 +byte 4 3212015720 +byte 4 1042701290 +byte 4 3196491359 +byte 4 3209632701 +byte 4 1050556282 +byte 4 3204448256 +byte 4 3210558317 +byte 4 3202531056 +byte 4 3195311787 +byte 4 3212015720 +byte 4 3190184938 +byte 4 3196491359 +byte 4 3209632701 +byte 4 3198039930 +byte 4 3204448256 +byte 4 3207496978 +byte 4 1041705462 +byte 4 3208081647 +byte 4 3207496978 +byte 4 3189189110 +byte 4 3208081647 +byte 4 3210331204 +byte 4 0 +byte 4 3204879951 +byte 4 3207605577 +byte 4 1058437396 +byte 4 3201942579 +byte 4 3205921044 +byte 4 1054458931 +byte 4 3207605577 +byte 4 3201942579 +byte 4 1060121929 +byte 4 3205921044 +byte 4 3201942579 +byte 4 3207605577 +byte 4 3205921044 +byte 4 3205921044 +byte 4 3201942579 +byte 4 3207605577 +byte 4 3207605577 +byte 4 3205921044 +byte 4 3201942579 +export Q_rand +code +proc Q_rand 4 0 +file "../../game/q_math.c" +line 126 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// q_math.c -- stateless support routines that are included in each code module +;4:#include "q_shared.h" +;5: +;6: +;7:vec3_t vec3_origin = {0,0,0}; +;8:vec3_t axisDefault[3] = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 } }; +;9: +;10: +;11:vec4_t colorBlack = {0, 0, 0, 1}; +;12:vec4_t colorRed = {1, 0, 0, 1}; +;13:vec4_t colorGreen = {0, 1, 0, 1}; +;14:vec4_t colorBlue = {0, 0, 1, 1}; +;15:vec4_t colorYellow = {1, 1, 0, 1}; +;16:vec4_t colorMagenta= {1, 0, 1, 1}; +;17:vec4_t colorCyan = {0, 1, 1, 1}; +;18:vec4_t colorWhite = {1, 1, 1, 1}; +;19:vec4_t colorLtGrey = {0.75, 0.75, 0.75, 1}; +;20:vec4_t colorMdGrey = {0.5, 0.5, 0.5, 1}; +;21:vec4_t colorDkGrey = {0.25, 0.25, 0.25, 1}; +;22: +;23:vec4_t colorLtBlue = {0.367f, 0.261f, 0.722f, 1}; +;24:vec4_t colorDkBlue = {0.199f, 0.0f, 0.398f, 1}; +;25: +;26:vec4_t g_color_table[8] = +;27: { +;28: {0.0, 0.0, 0.0, 1.0}, +;29: {1.0, 0.0, 0.0, 1.0}, +;30: {0.0, 1.0, 0.0, 1.0}, +;31: {1.0, 1.0, 0.0, 1.0}, +;32: {0.0, 0.0, 1.0, 1.0}, +;33: {0.0, 1.0, 1.0, 1.0}, +;34: {1.0, 0.0, 1.0, 1.0}, +;35: {1.0, 1.0, 1.0, 1.0}, +;36: }; +;37: +;38: +;39:vec3_t bytedirs[NUMVERTEXNORMALS] = +;40:{ +;41:{-0.525731f, 0.000000f, 0.850651f}, {-0.442863f, 0.238856f, 0.864188f}, +;42:{-0.295242f, 0.000000f, 0.955423f}, {-0.309017f, 0.500000f, 0.809017f}, +;43:{-0.162460f, 0.262866f, 0.951056f}, {0.000000f, 0.000000f, 1.000000f}, +;44:{0.000000f, 0.850651f, 0.525731f}, {-0.147621f, 0.716567f, 0.681718f}, +;45:{0.147621f, 0.716567f, 0.681718f}, {0.000000f, 0.525731f, 0.850651f}, +;46:{0.309017f, 0.500000f, 0.809017f}, {0.525731f, 0.000000f, 0.850651f}, +;47:{0.295242f, 0.000000f, 0.955423f}, {0.442863f, 0.238856f, 0.864188f}, +;48:{0.162460f, 0.262866f, 0.951056f}, {-0.681718f, 0.147621f, 0.716567f}, +;49:{-0.809017f, 0.309017f, 0.500000f},{-0.587785f, 0.425325f, 0.688191f}, +;50:{-0.850651f, 0.525731f, 0.000000f},{-0.864188f, 0.442863f, 0.238856f}, +;51:{-0.716567f, 0.681718f, 0.147621f},{-0.688191f, 0.587785f, 0.425325f}, +;52:{-0.500000f, 0.809017f, 0.309017f}, {-0.238856f, 0.864188f, 0.442863f}, +;53:{-0.425325f, 0.688191f, 0.587785f}, {-0.716567f, 0.681718f, -0.147621f}, +;54:{-0.500000f, 0.809017f, -0.309017f}, {-0.525731f, 0.850651f, 0.000000f}, +;55:{0.000000f, 0.850651f, -0.525731f}, {-0.238856f, 0.864188f, -0.442863f}, +;56:{0.000000f, 0.955423f, -0.295242f}, {-0.262866f, 0.951056f, -0.162460f}, +;57:{0.000000f, 1.000000f, 0.000000f}, {0.000000f, 0.955423f, 0.295242f}, +;58:{-0.262866f, 0.951056f, 0.162460f}, {0.238856f, 0.864188f, 0.442863f}, +;59:{0.262866f, 0.951056f, 0.162460f}, {0.500000f, 0.809017f, 0.309017f}, +;60:{0.238856f, 0.864188f, -0.442863f},{0.262866f, 0.951056f, -0.162460f}, +;61:{0.500000f, 0.809017f, -0.309017f},{0.850651f, 0.525731f, 0.000000f}, +;62:{0.716567f, 0.681718f, 0.147621f}, {0.716567f, 0.681718f, -0.147621f}, +;63:{0.525731f, 0.850651f, 0.000000f}, {0.425325f, 0.688191f, 0.587785f}, +;64:{0.864188f, 0.442863f, 0.238856f}, {0.688191f, 0.587785f, 0.425325f}, +;65:{0.809017f, 0.309017f, 0.500000f}, {0.681718f, 0.147621f, 0.716567f}, +;66:{0.587785f, 0.425325f, 0.688191f}, {0.955423f, 0.295242f, 0.000000f}, +;67:{1.000000f, 0.000000f, 0.000000f}, {0.951056f, 0.162460f, 0.262866f}, +;68:{0.850651f, -0.525731f, 0.000000f},{0.955423f, -0.295242f, 0.000000f}, +;69:{0.864188f, -0.442863f, 0.238856f}, {0.951056f, -0.162460f, 0.262866f}, +;70:{0.809017f, -0.309017f, 0.500000f}, {0.681718f, -0.147621f, 0.716567f}, +;71:{0.850651f, 0.000000f, 0.525731f}, {0.864188f, 0.442863f, -0.238856f}, +;72:{0.809017f, 0.309017f, -0.500000f}, {0.951056f, 0.162460f, -0.262866f}, +;73:{0.525731f, 0.000000f, -0.850651f}, {0.681718f, 0.147621f, -0.716567f}, +;74:{0.681718f, -0.147621f, -0.716567f},{0.850651f, 0.000000f, -0.525731f}, +;75:{0.809017f, -0.309017f, -0.500000f}, {0.864188f, -0.442863f, -0.238856f}, +;76:{0.951056f, -0.162460f, -0.262866f}, {0.147621f, 0.716567f, -0.681718f}, +;77:{0.309017f, 0.500000f, -0.809017f}, {0.425325f, 0.688191f, -0.587785f}, +;78:{0.442863f, 0.238856f, -0.864188f}, {0.587785f, 0.425325f, -0.688191f}, +;79:{0.688191f, 0.587785f, -0.425325f}, {-0.147621f, 0.716567f, -0.681718f}, +;80:{-0.309017f, 0.500000f, -0.809017f}, {0.000000f, 0.525731f, -0.850651f}, +;81:{-0.525731f, 0.000000f, -0.850651f}, {-0.442863f, 0.238856f, -0.864188f}, +;82:{-0.295242f, 0.000000f, -0.955423f}, {-0.162460f, 0.262866f, -0.951056f}, +;83:{0.000000f, 0.000000f, -1.000000f}, {0.295242f, 0.000000f, -0.955423f}, +;84:{0.162460f, 0.262866f, -0.951056f}, {-0.442863f, -0.238856f, -0.864188f}, +;85:{-0.309017f, -0.500000f, -0.809017f}, {-0.162460f, -0.262866f, -0.951056f}, +;86:{0.000000f, -0.850651f, -0.525731f}, {-0.147621f, -0.716567f, -0.681718f}, +;87:{0.147621f, -0.716567f, -0.681718f}, {0.000000f, -0.525731f, -0.850651f}, +;88:{0.309017f, -0.500000f, -0.809017f}, {0.442863f, -0.238856f, -0.864188f}, +;89:{0.162460f, -0.262866f, -0.951056f}, {0.238856f, -0.864188f, -0.442863f}, +;90:{0.500000f, -0.809017f, -0.309017f}, {0.425325f, -0.688191f, -0.587785f}, +;91:{0.716567f, -0.681718f, -0.147621f}, {0.688191f, -0.587785f, -0.425325f}, +;92:{0.587785f, -0.425325f, -0.688191f}, {0.000000f, -0.955423f, -0.295242f}, +;93:{0.000000f, -1.000000f, 0.000000f}, {0.262866f, -0.951056f, -0.162460f}, +;94:{0.000000f, -0.850651f, 0.525731f}, {0.000000f, -0.955423f, 0.295242f}, +;95:{0.238856f, -0.864188f, 0.442863f}, {0.262866f, -0.951056f, 0.162460f}, +;96:{0.500000f, -0.809017f, 0.309017f}, {0.716567f, -0.681718f, 0.147621f}, +;97:{0.525731f, -0.850651f, 0.000000f}, {-0.238856f, -0.864188f, -0.442863f}, +;98:{-0.500000f, -0.809017f, -0.309017f}, {-0.262866f, -0.951056f, -0.162460f}, +;99:{-0.850651f, -0.525731f, 0.000000f}, {-0.716567f, -0.681718f, -0.147621f}, +;100:{-0.716567f, -0.681718f, 0.147621f}, {-0.525731f, -0.850651f, 0.000000f}, +;101:{-0.500000f, -0.809017f, 0.309017f}, {-0.238856f, -0.864188f, 0.442863f}, +;102:{-0.262866f, -0.951056f, 0.162460f}, {-0.864188f, -0.442863f, 0.238856f}, +;103:{-0.809017f, -0.309017f, 0.500000f}, {-0.688191f, -0.587785f, 0.425325f}, +;104:{-0.681718f, -0.147621f, 0.716567f}, {-0.442863f, -0.238856f, 0.864188f}, +;105:{-0.587785f, -0.425325f, 0.688191f}, {-0.309017f, -0.500000f, 0.809017f}, +;106:{-0.147621f, -0.716567f, 0.681718f}, {-0.425325f, -0.688191f, 0.587785f}, +;107:{-0.162460f, -0.262866f, 0.951056f}, {0.442863f, -0.238856f, 0.864188f}, +;108:{0.162460f, -0.262866f, 0.951056f}, {0.309017f, -0.500000f, 0.809017f}, +;109:{0.147621f, -0.716567f, 0.681718f}, {0.000000f, -0.525731f, 0.850651f}, +;110:{0.425325f, -0.688191f, 0.587785f}, {0.587785f, -0.425325f, 0.688191f}, +;111:{0.688191f, -0.587785f, 0.425325f}, {-0.955423f, 0.295242f, 0.000000f}, +;112:{-0.951056f, 0.162460f, 0.262866f}, {-1.000000f, 0.000000f, 0.000000f}, +;113:{-0.850651f, 0.000000f, 0.525731f}, {-0.955423f, -0.295242f, 0.000000f}, +;114:{-0.951056f, -0.162460f, 0.262866f}, {-0.864188f, 0.442863f, -0.238856f}, +;115:{-0.951056f, 0.162460f, -0.262866f}, {-0.809017f, 0.309017f, -0.500000f}, +;116:{-0.864188f, -0.442863f, -0.238856f}, {-0.951056f, -0.162460f, -0.262866f}, +;117:{-0.809017f, -0.309017f, -0.500000f}, {-0.681718f, 0.147621f, -0.716567f}, +;118:{-0.681718f, -0.147621f, -0.716567f}, {-0.850651f, 0.000000f, -0.525731f}, +;119:{-0.688191f, 0.587785f, -0.425325f}, {-0.587785f, 0.425325f, -0.688191f}, +;120:{-0.425325f, 0.688191f, -0.587785f}, {-0.425325f, -0.688191f, -0.587785f}, +;121:{-0.587785f, -0.425325f, -0.688191f}, {-0.688191f, -0.587785f, -0.425325f} +;122:}; +;123: +;124://============================================================== +;125: +;126:int Q_rand( int *seed ) { +line 127 +;127: *seed = (69069 * *seed + 1); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 69069 +ADDRLP4 0 +INDIRP4 +INDIRI4 +MULI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 128 +;128: return *seed; +ADDRFP4 0 +INDIRP4 +INDIRI4 +RETI4 +LABELV $36 +endproc Q_rand 4 0 +export Q_random +proc Q_random 4 4 +line 131 +;129:} +;130: +;131:float Q_random( int *seed ) { +line 132 +;132: return ( Q_rand( seed ) & 0xffff ) / (float)0x10000; +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 Q_rand +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 65535 +BANDI4 +CVIF4 4 +CNSTF4 1199570944 +DIVF4 +RETF4 +LABELV $37 +endproc Q_random 4 4 +export Q_crandom +proc Q_crandom 4 4 +line 135 +;133:} +;134: +;135:float Q_crandom( int *seed ) { +line 136 +;136: return 2.0 * ( Q_random( seed ) - 0.5 ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 Q_random +CALLF4 +ASGNF4 +CNSTF4 1073741824 +ADDRLP4 0 +INDIRF4 +CNSTF4 1056964608 +SUBF4 +MULF4 +RETF4 +LABELV $38 +endproc Q_crandom 4 4 +export VectorCompare +proc VectorCompare 16 0 +line 141 +;137:} +;138: +;139:#ifdef __LCC__ +;140: +;141:int VectorCompare( const vec3_t v1, const vec3_t v2 ) { +line 142 +;142: if (v1[0] != v2[0] || v1[1] != v2[1] || v1[2] != v2[2]) { +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +NEF4 $43 +ADDRLP4 8 +CNSTI4 4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +NEF4 $43 +ADDRLP4 12 +CNSTI4 8 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +EQF4 $40 +LABELV $43 +line 143 +;143: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $39 +JUMPV +LABELV $40 +line 145 +;144: } +;145: return 1; +CNSTI4 1 +RETI4 +LABELV $39 +endproc VectorCompare 16 0 +export VectorLength +proc VectorLength 20 4 +line 148 +;146:} +;147: +;148:vec_t VectorLength( const vec3_t v ) { +line 149 +;149: return (vec_t)sqrt (v[0]*v[0] + v[1]*v[1] + v[2]*v[2]); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 8 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +ARGF4 +ADDRLP4 16 +ADDRGP4 sqrt +CALLF4 +ASGNF4 +ADDRLP4 16 +INDIRF4 +RETF4 +LABELV $44 +endproc VectorLength 20 4 +export VectorLengthSquared +proc VectorLengthSquared 16 0 +line 152 +;150:} +;151: +;152:vec_t VectorLengthSquared( const vec3_t v ) { +line 153 +;153: return (v[0]*v[0] + v[1]*v[1] + v[2]*v[2]); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 8 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +RETF4 +LABELV $45 +endproc VectorLengthSquared 16 0 +export Distance +proc Distance 32 4 +line 156 +;154:} +;155: +;156:vec_t Distance( const vec3_t p1, const vec3_t p2 ) { +line 159 +;157: vec3_t v; +;158: +;159: VectorSubtract (p2, p1, v); +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 20 +CNSTI4 4 +ASGNI4 +ADDRLP4 0+4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 24 +CNSTI4 8 +ASGNI4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 160 +;160: return VectorLength( v ); +ADDRLP4 0 +ARGP4 +ADDRLP4 28 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 28 +INDIRF4 +RETF4 +LABELV $46 +endproc Distance 32 4 +export DistanceSquared +proc DistanceSquared 32 0 +line 163 +;161:} +;162: +;163:vec_t DistanceSquared( const vec3_t p1, const vec3_t p2 ) { +line 166 +;164: vec3_t v; +;165: +;166: VectorSubtract (p2, p1, v); +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 20 +CNSTI4 4 +ASGNI4 +ADDRLP4 0+4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 24 +CNSTI4 8 +ASGNI4 +ADDRLP4 0+8 +ADDRFP4 4 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 167 +;167: return v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; +ADDRLP4 28 +ADDRLP4 0 +INDIRF4 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0+8 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +MULF4 +ADDF4 +RETF4 +LABELV $49 +endproc DistanceSquared 32 0 +export VectorNormalizeFast +proc VectorNormalizeFast 36 4 +line 173 +;168:} +;169: +;170:// fast vector normalize routine that does not check to make sure +;171:// that length != 0, nor does it return length, uses rsqrt approximation +;172:void VectorNormalizeFast( vec3_t v ) +;173:{ +line 176 +;174: float ilength; +;175: +;176: ilength = Q_rsqrt( DotProduct( v, v ) ); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 12 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 8 +INDIRF4 +MULF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDF4 +ARGF4 +ADDRLP4 20 +ADDRGP4 Q_rsqrt +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 20 +INDIRF4 +ASGNF4 +line 178 +;177: +;178: v[0] *= ilength; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 179 +;179: v[1] *= ilength; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 180 +;180: v[2] *= ilength; +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 181 +;181:} +LABELV $56 +endproc VectorNormalizeFast 36 4 +export VectorInverse +proc VectorInverse 12 0 +line 183 +;182: +;183:void VectorInverse( vec3_t v ){ +line 184 +;184: v[0] = -v[0]; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +NEGF4 +ASGNF4 +line 185 +;185: v[1] = -v[1]; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +NEGF4 +ASGNF4 +line 186 +;186: v[2] = -v[2]; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +NEGF4 +ASGNF4 +line 187 +;187:} +LABELV $57 +endproc VectorInverse 12 0 +export CrossProduct +proc CrossProduct 40 0 +line 189 +;188: +;189:void CrossProduct( const vec3_t v1, const vec3_t v2, vec3_t cross ) { +line 190 +;190: cross[0] = v1[1]*v2[2] - v1[2]*v2[1]; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTI4 4 +ASGNI4 +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTI4 8 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 191 +;191: cross[1] = v1[2]*v2[0] - v1[0]*v2[2]; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +CNSTI4 8 +ASGNI4 +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 192 +;192: cross[2] = v1[0]*v2[1] - v1[1]*v2[0]; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +CNSTI4 4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 193 +;193:} +LABELV $58 +endproc CrossProduct 40 0 +export ClampChar +proc ClampChar 0 0 +line 198 +;194:#endif +;195: +;196://======================================================= +;197: +;198:signed char ClampChar( int i ) { +line 199 +;199: if ( i < -128 ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 -128 +GEI4 $60 +line 200 +;200: return -128; +CNSTI4 -128 +RETI4 +ADDRGP4 $59 +JUMPV +LABELV $60 +line 202 +;201: } +;202: if ( i > 127 ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 127 +LEI4 $62 +line 203 +;203: return 127; +CNSTI4 127 +RETI4 +ADDRGP4 $59 +JUMPV +LABELV $62 +line 205 +;204: } +;205: return i; +ADDRFP4 0 +INDIRI4 +CVII1 4 +CVII4 1 +RETI4 +LABELV $59 +endproc ClampChar 0 0 +export ClampShort +proc ClampShort 0 0 +line 208 +;206:} +;207: +;208:signed short ClampShort( int i ) { +line 209 +;209: if ( i < -32768 ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 -32768 +GEI4 $65 +line 210 +;210: return -32768; +CNSTI4 -32768 +RETI4 +ADDRGP4 $64 +JUMPV +LABELV $65 +line 212 +;211: } +;212: if ( i > 0x7fff ) { +ADDRFP4 0 +INDIRI4 +CNSTI4 32767 +LEI4 $67 +line 213 +;213: return 0x7fff; +CNSTI4 32767 +RETI4 +ADDRGP4 $64 +JUMPV +LABELV $67 +line 215 +;214: } +;215: return i; +ADDRFP4 0 +INDIRI4 +CVII2 4 +CVII4 2 +RETI4 +LABELV $64 +endproc ClampShort 0 0 +export DirToByte +proc DirToByte 24 0 +line 220 +;216:} +;217: +;218: +;219:// this isn't a real cheap function to call! +;220:int DirToByte( vec3_t dir ) { +line 224 +;221: int i, best; +;222: float d, bestd; +;223: +;224: if ( !dir ) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $70 +line 225 +;225: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $69 +JUMPV +LABELV $70 +line 228 +;226: } +;227: +;228: bestd = 0; +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +line 229 +;229: best = 0; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 230 +;230: for (i=0 ; i bestd) +ADDRLP4 4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +LEF4 $78 +line 234 +;234: { +line 235 +;235: bestd = d; +ADDRLP4 8 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 236 +;236: best = i; +ADDRLP4 12 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 237 +;237: } +LABELV $78 +line 238 +;238: } +LABELV $73 +line 230 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 162 +LTI4 $72 +line 240 +;239: +;240: return best; +ADDRLP4 12 +INDIRI4 +RETI4 +LABELV $69 +endproc DirToByte 24 0 +export ByteToDir +proc ByteToDir 4 0 +line 243 +;241:} +;242: +;243:void ByteToDir( int b, vec3_t dir ) { +line 244 +;244: if ( b < 0 || b >= NUMVERTEXNORMALS ) { +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +LTI4 $83 +ADDRLP4 0 +INDIRI4 +CNSTI4 162 +LTI4 $81 +LABELV $83 +line 245 +;245: VectorCopy( vec3_origin, dir ); +ADDRFP4 4 +INDIRP4 +ADDRGP4 vec3_origin +INDIRB +ASGNB 12 +line 246 +;246: return; +ADDRGP4 $80 +JUMPV +LABELV $81 +line 248 +;247: } +;248: VectorCopy (bytedirs[b], dir); +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDRFP4 0 +INDIRI4 +MULI4 +ADDRGP4 bytedirs +ADDP4 +INDIRB +ASGNB 12 +line 249 +;249:} +LABELV $80 +endproc ByteToDir 4 0 +export ColorBytes3 +proc ColorBytes3 40 0 +line 252 +;250: +;251: +;252:unsigned ColorBytes3 (float r, float g, float b) { +line 255 +;253: unsigned i; +;254: +;255: ( (byte *)&i )[0] = r * 255; +ADDRLP4 8 +CNSTF4 1132396544 +ADDRFP4 0 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 12 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 12 +INDIRF4 +LTF4 $86 +ADDRLP4 4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 12 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $87 +JUMPV +LABELV $86 +ADDRLP4 4 +ADDRLP4 8 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $87 +ADDRLP4 0 +ADDRLP4 4 +INDIRU4 +CVUU1 4 +ASGNU1 +line 256 +;256: ( (byte *)&i )[1] = g * 255; +ADDRLP4 20 +CNSTF4 1132396544 +ADDRFP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 24 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ADDRLP4 24 +INDIRF4 +LTF4 $90 +ADDRLP4 16 +ADDRLP4 20 +INDIRF4 +ADDRLP4 24 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $91 +JUMPV +LABELV $90 +ADDRLP4 16 +ADDRLP4 20 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $91 +ADDRLP4 0+1 +ADDRLP4 16 +INDIRU4 +CVUU1 4 +ASGNU1 +line 257 +;257: ( (byte *)&i )[2] = b * 255; +ADDRLP4 32 +CNSTF4 1132396544 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 36 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LTF4 $94 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $95 +JUMPV +LABELV $94 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $95 +ADDRLP4 0+2 +ADDRLP4 28 +INDIRU4 +CVUU1 4 +ASGNU1 +line 259 +;258: +;259: return i; +ADDRLP4 0 +INDIRU4 +RETU4 +LABELV $84 +endproc ColorBytes3 40 0 +export ColorBytes4 +proc ColorBytes4 52 0 +line 262 +;260:} +;261: +;262:unsigned ColorBytes4 (float r, float g, float b, float a) { +line 265 +;263: unsigned i; +;264: +;265: ( (byte *)&i )[0] = r * 255; +ADDRLP4 8 +CNSTF4 1132396544 +ADDRFP4 0 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 12 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 12 +INDIRF4 +LTF4 $98 +ADDRLP4 4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 12 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $99 +JUMPV +LABELV $98 +ADDRLP4 4 +ADDRLP4 8 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $99 +ADDRLP4 0 +ADDRLP4 4 +INDIRU4 +CVUU1 4 +ASGNU1 +line 266 +;266: ( (byte *)&i )[1] = g * 255; +ADDRLP4 20 +CNSTF4 1132396544 +ADDRFP4 4 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 24 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ADDRLP4 24 +INDIRF4 +LTF4 $102 +ADDRLP4 16 +ADDRLP4 20 +INDIRF4 +ADDRLP4 24 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $103 +JUMPV +LABELV $102 +ADDRLP4 16 +ADDRLP4 20 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $103 +ADDRLP4 0+1 +ADDRLP4 16 +INDIRU4 +CVUU1 4 +ASGNU1 +line 267 +;267: ( (byte *)&i )[2] = b * 255; +ADDRLP4 32 +CNSTF4 1132396544 +ADDRFP4 8 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 36 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LTF4 $106 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +ADDRLP4 36 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $107 +JUMPV +LABELV $106 +ADDRLP4 28 +ADDRLP4 32 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $107 +ADDRLP4 0+2 +ADDRLP4 28 +INDIRU4 +CVUU1 4 +ASGNU1 +line 268 +;268: ( (byte *)&i )[3] = a * 255; +ADDRLP4 44 +CNSTF4 1132396544 +ADDRFP4 12 +INDIRF4 +MULF4 +ASGNF4 +ADDRLP4 48 +CNSTF4 1325400064 +ASGNF4 +ADDRLP4 44 +INDIRF4 +ADDRLP4 48 +INDIRF4 +LTF4 $110 +ADDRLP4 40 +ADDRLP4 44 +INDIRF4 +ADDRLP4 48 +INDIRF4 +SUBF4 +CVFI4 4 +CVIU4 4 +CNSTU4 2147483648 +ADDU4 +ASGNU4 +ADDRGP4 $111 +JUMPV +LABELV $110 +ADDRLP4 40 +ADDRLP4 44 +INDIRF4 +CVFI4 4 +CVIU4 4 +ASGNU4 +LABELV $111 +ADDRLP4 0+3 +ADDRLP4 40 +INDIRU4 +CVUU1 4 +ASGNU1 +line 270 +;269: +;270: return i; +ADDRLP4 0 +INDIRU4 +RETU4 +LABELV $96 +endproc ColorBytes4 52 0 +export NormalizeColor +proc NormalizeColor 12 0 +line 273 +;271:} +;272: +;273:float NormalizeColor( const vec3_t in, vec3_t out ) { +line 276 +;274: float max; +;275: +;276: max = in[0]; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 277 +;277: if ( in[1] > max ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +LEF4 $113 +line 278 +;278: max = in[1]; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 279 +;279: } +LABELV $113 +line 280 +;280: if ( in[2] > max ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +LEF4 $115 +line 281 +;281: max = in[2]; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 282 +;282: } +LABELV $115 +line 284 +;283: +;284: if ( !max ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +NEF4 $117 +line 285 +;285: VectorClear( out ); +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 286 +;286: } else { +ADDRGP4 $118 +JUMPV +LABELV $117 +line 287 +;287: out[0] = in[0] / max; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +DIVF4 +ASGNF4 +line 288 +;288: out[1] = in[1] / max; +ADDRLP4 4 +CNSTI4 4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +DIVF4 +ASGNF4 +line 289 +;289: out[2] = in[2] / max; +ADDRLP4 8 +CNSTI4 8 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +DIVF4 +ASGNF4 +line 290 +;290: } +LABELV $118 +line 291 +;291: return max; +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $112 +endproc NormalizeColor 12 0 +export PlaneFromPoints +proc PlaneFromPoints 76 12 +line 303 +;292:} +;293: +;294: +;295:/* +;296:===================== +;297:PlaneFromPoints +;298: +;299:Returns false if the triangle is degenrate. +;300:The normal will point out of the clock for clockwise ordered points +;301:===================== +;302:*/ +;303:qboolean PlaneFromPoints( vec4_t plane, const vec3_t a, const vec3_t b, const vec3_t c ) { +line 306 +;304: vec3_t d1, d2; +;305: +;306: VectorSubtract( b, a, d1 ); +ADDRLP4 24 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 32 +CNSTI4 4 +ASGNI4 +ADDRLP4 0+4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 36 +CNSTI4 8 +ASGNI4 +ADDRLP4 0+8 +ADDRFP4 8 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 307 +;307: VectorSubtract( c, a, d2 ); +ADDRLP4 40 +ADDRFP4 12 +INDIRP4 +ASGNP4 +ADDRLP4 44 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 40 +INDIRP4 +INDIRF4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 48 +CNSTI4 4 +ASGNI4 +ADDRLP4 12+4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRLP4 52 +CNSTI4 8 +ASGNI4 +ADDRLP4 12+8 +ADDRFP4 12 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 308 +;308: CrossProduct( d2, d1, plane ); +ADDRLP4 12 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 309 +;309: if ( VectorNormalize( plane ) == 0 ) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 56 +ADDRGP4 VectorNormalize +CALLF4 +ASGNF4 +ADDRLP4 56 +INDIRF4 +CNSTF4 0 +NEF4 $124 +line 310 +;310: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $119 +JUMPV +LABELV $124 +line 313 +;311: } +;312: +;313: plane[3] = DotProduct( a, plane ); +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 64 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 68 +CNSTI4 4 +ASGNI4 +ADDRLP4 72 +CNSTI4 8 +ASGNI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 64 +INDIRP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 314 +;314: return qtrue; +CNSTI4 1 +RETI4 +LABELV $119 +endproc PlaneFromPoints 76 12 +export RotatePointAroundVector +proc RotatePointAroundVector 256 12 +line 325 +;315:} +;316: +;317:/* +;318:=============== +;319:RotatePointAroundVector +;320: +;321:This is not implemented very well... +;322:=============== +;323:*/ +;324:void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, +;325: float degrees ) { +line 335 +;326: float m[3][3]; +;327: float im[3][3]; +;328: float zrot[3][3]; +;329: float tmpmat[3][3]; +;330: float rot[3][3]; +;331: int i; +;332: vec3_t vr, vup, vf; +;333: float rad; +;334: +;335: vf[0] = dir[0]; +ADDRLP4 148 +ADDRFP4 4 +INDIRP4 +INDIRF4 +ASGNF4 +line 336 +;336: vf[1] = dir[1]; +ADDRLP4 148+4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 337 +;337: vf[2] = dir[2]; +ADDRLP4 148+8 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 339 +;338: +;339: PerpendicularVector( vr, dir ); +ADDRLP4 160 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 PerpendicularVector +CALLV +pop +line 340 +;340: CrossProduct( vr, vf, vup ); +ADDRLP4 160 +ARGP4 +ADDRLP4 148 +ARGP4 +ADDRLP4 176 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 342 +;341: +;342: m[0][0] = vr[0]; +ADDRLP4 40 +ADDRLP4 160 +INDIRF4 +ASGNF4 +line 343 +;343: m[1][0] = vr[1]; +ADDRLP4 40+12 +ADDRLP4 160+4 +INDIRF4 +ASGNF4 +line 344 +;344: m[2][0] = vr[2]; +ADDRLP4 40+24 +ADDRLP4 160+8 +INDIRF4 +ASGNF4 +line 346 +;345: +;346: m[0][1] = vup[0]; +ADDRLP4 40+4 +ADDRLP4 176 +INDIRF4 +ASGNF4 +line 347 +;347: m[1][1] = vup[1]; +ADDRLP4 40+12+4 +ADDRLP4 176+4 +INDIRF4 +ASGNF4 +line 348 +;348: m[2][1] = vup[2]; +ADDRLP4 40+24+4 +ADDRLP4 176+8 +INDIRF4 +ASGNF4 +line 350 +;349: +;350: m[0][2] = vf[0]; +ADDRLP4 40+8 +ADDRLP4 148 +INDIRF4 +ASGNF4 +line 351 +;351: m[1][2] = vf[1]; +ADDRLP4 40+12+8 +ADDRLP4 148+4 +INDIRF4 +ASGNF4 +line 352 +;352: m[2][2] = vf[2]; +ADDRLP4 40+24+8 +ADDRLP4 148+8 +INDIRF4 +ASGNF4 +line 354 +;353: +;354: memcpy( im, m, sizeof( im ) ); +ADDRLP4 112 +ARGP4 +ADDRLP4 40 +ARGP4 +CNSTI4 36 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 356 +;355: +;356: im[0][1] = m[1][0]; +ADDRLP4 112+4 +ADDRLP4 40+12 +INDIRF4 +ASGNF4 +line 357 +;357: im[0][2] = m[2][0]; +ADDRLP4 112+8 +ADDRLP4 40+24 +INDIRF4 +ASGNF4 +line 358 +;358: im[1][0] = m[0][1]; +ADDRLP4 112+12 +ADDRLP4 40+4 +INDIRF4 +ASGNF4 +line 359 +;359: im[1][2] = m[2][1]; +ADDRLP4 112+12+8 +ADDRLP4 40+24+4 +INDIRF4 +ASGNF4 +line 360 +;360: im[2][0] = m[0][2]; +ADDRLP4 112+24 +ADDRLP4 40+8 +INDIRF4 +ASGNF4 +line 361 +;361: im[2][1] = m[1][2]; +ADDRLP4 112+24+4 +ADDRLP4 40+12+8 +INDIRF4 +ASGNF4 +line 363 +;362: +;363: memset( zrot, 0, sizeof( zrot ) ); +ADDRLP4 76 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 36 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 364 +;364: zrot[0][0] = zrot[1][1] = zrot[2][2] = 1.0F; +ADDRLP4 224 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 76+24+8 +ADDRLP4 224 +INDIRF4 +ASGNF4 +ADDRLP4 76+12+4 +ADDRLP4 224 +INDIRF4 +ASGNF4 +ADDRLP4 76 +ADDRLP4 224 +INDIRF4 +ASGNF4 +line 366 +;365: +;366: rad = DEG2RAD( degrees ); +ADDRLP4 172 +CNSTF4 1078530011 +ADDRFP4 12 +INDIRF4 +MULF4 +CNSTF4 1127481344 +DIVF4 +ASGNF4 +line 367 +;367: zrot[0][0] = cos( rad ); +ADDRLP4 172 +INDIRF4 +ARGF4 +ADDRLP4 228 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 76 +ADDRLP4 228 +INDIRF4 +ASGNF4 +line 368 +;368: zrot[0][1] = sin( rad ); +ADDRLP4 172 +INDIRF4 +ARGF4 +ADDRLP4 232 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 76+4 +ADDRLP4 232 +INDIRF4 +ASGNF4 +line 369 +;369: zrot[1][0] = -sin( rad ); +ADDRLP4 172 +INDIRF4 +ARGF4 +ADDRLP4 236 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 76+12 +ADDRLP4 236 +INDIRF4 +NEGF4 +ASGNF4 +line 370 +;370: zrot[1][1] = cos( rad ); +ADDRLP4 172 +INDIRF4 +ARGF4 +ADDRLP4 240 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 76+12+4 +ADDRLP4 240 +INDIRF4 +ASGNF4 +line 372 +;371: +;372: MatrixMultiply( m, zrot, tmpmat ); +ADDRLP4 40 +ARGP4 +ADDRLP4 76 +ARGP4 +ADDRLP4 188 +ARGP4 +ADDRGP4 MatrixMultiply +CALLV +pop +line 373 +;373: MatrixMultiply( tmpmat, im, rot ); +ADDRLP4 188 +ARGP4 +ADDRLP4 112 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 MatrixMultiply +CALLV +pop +line 375 +;374: +;375: for ( i = 0; i < 3; i++ ) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $171 +line 376 +;376: dst[i] = rot[i][0] * point[0] + rot[i][1] * point[1] + rot[i][2] * point[2]; +ADDRLP4 248 +CNSTI4 12 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 252 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ADDRLP4 248 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +ADDRLP4 252 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 248 +INDIRI4 +ADDRLP4 4+4 +ADDP4 +INDIRF4 +ADDRLP4 252 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 248 +INDIRI4 +ADDRLP4 4+8 +ADDP4 +INDIRF4 +ADDRLP4 252 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 377 +;377: } +LABELV $172 +line 375 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $171 +line 378 +;378:} +LABELV $126 +endproc RotatePointAroundVector 256 12 +export RotateAroundDirection +proc RotateAroundDirection 20 16 +line 385 +;379: +;380:/* +;381:=============== +;382:RotateAroundDirection +;383:=============== +;384:*/ +;385:void RotateAroundDirection( vec3_t axis[3], float yaw ) { +line 388 +;386: +;387: // create an arbitrary axis[1] +;388: PerpendicularVector( axis[1], axis[0] ); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 PerpendicularVector +CALLV +pop +line 391 +;389: +;390: // rotate it around axis[0] by yaw +;391: if ( yaw ) { +ADDRFP4 4 +INDIRF4 +CNSTF4 0 +EQF4 $178 +line 394 +;392: vec3_t temp; +;393: +;394: VectorCopy( axis[1], temp ); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRB +ASGNB 12 +line 395 +;395: RotatePointAroundVector( axis[1], axis[0], temp, yaw ); +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRGP4 RotatePointAroundVector +CALLV +pop +line 396 +;396: } +LABELV $178 +line 399 +;397: +;398: // cross to get axis[2] +;399: CrossProduct( axis[0], axis[1], axis[2] ); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 400 +;400:} +LABELV $177 +endproc RotateAroundDirection 20 16 +export vectoangles +proc vectoangles 40 8 +line 404 +;401: +;402: +;403: +;404:void vectoangles( const vec3_t value1, vec3_t angles ) { +line 408 +;405: float forward; +;406: float yaw, pitch; +;407: +;408: if ( value1[1] == 0 && value1[0] == 0 ) { +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTF4 0 +ASGNF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +NEF4 $181 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +NEF4 $181 +line 409 +;409: yaw = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 410 +;410: if ( value1[2] > 0 ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 0 +LEF4 $183 +line 411 +;411: pitch = 90; +ADDRLP4 4 +CNSTF4 1119092736 +ASGNF4 +line 412 +;412: } +ADDRGP4 $182 +JUMPV +LABELV $183 +line 413 +;413: else { +line 414 +;414: pitch = 270; +ADDRLP4 4 +CNSTF4 1132920832 +ASGNF4 +line 415 +;415: } +line 416 +;416: } +ADDRGP4 $182 +JUMPV +LABELV $181 +line 417 +;417: else { +line 418 +;418: if ( value1[0] ) { +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 0 +EQF4 $185 +line 419 +;419: yaw = ( atan2 ( value1[1], value1[0] ) * 180 / M_PI ); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 atan2 +CALLF4 +ASGNF4 +ADDRLP4 0 +CNSTF4 1127481344 +ADDRLP4 24 +INDIRF4 +MULF4 +CNSTF4 1078530011 +DIVF4 +ASGNF4 +line 420 +;420: } +ADDRGP4 $186 +JUMPV +LABELV $185 +line 421 +;421: else if ( value1[1] > 0 ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 0 +LEF4 $187 +line 422 +;422: yaw = 90; +ADDRLP4 0 +CNSTF4 1119092736 +ASGNF4 +line 423 +;423: } +ADDRGP4 $188 +JUMPV +LABELV $187 +line 424 +;424: else { +line 425 +;425: yaw = 270; +ADDRLP4 0 +CNSTF4 1132920832 +ASGNF4 +line 426 +;426: } +LABELV $188 +LABELV $186 +line 427 +;427: if ( yaw < 0 ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +GEF4 $189 +line 428 +;428: yaw += 360; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 429 +;429: } +LABELV $189 +line 431 +;430: +;431: forward = sqrt ( value1[0]*value1[0] + value1[1]*value1[1] ); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 28 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 24 +INDIRF4 +ADDRLP4 24 +INDIRF4 +MULF4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ADDF4 +ARGF4 +ADDRLP4 32 +ADDRGP4 sqrt +CALLF4 +ASGNF4 +ADDRLP4 8 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 432 +;432: pitch = ( atan2(value1[2], forward) * 180 / M_PI ); +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 36 +ADDRGP4 atan2 +CALLF4 +ASGNF4 +ADDRLP4 4 +CNSTF4 1127481344 +ADDRLP4 36 +INDIRF4 +MULF4 +CNSTF4 1078530011 +DIVF4 +ASGNF4 +line 433 +;433: if ( pitch < 0 ) { +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +GEF4 $191 +line 434 +;434: pitch += 360; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 435 +;435: } +LABELV $191 +line 436 +;436: } +LABELV $182 +line 438 +;437: +;438: angles[PITCH] = -pitch; +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRF4 +NEGF4 +ASGNF4 +line 439 +;439: angles[YAW] = yaw; +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 440 +;440: angles[ROLL] = 0; +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 0 +ASGNF4 +line 441 +;441:} +LABELV $180 +endproc vectoangles 40 8 +export AnglesToAxis +proc AnglesToAxis 16 16 +line 449 +;442: +;443: +;444:/* +;445:================= +;446:AnglesToAxis +;447:================= +;448:*/ +;449:void AnglesToAxis( const vec3_t angles, vec3_t axis[3] ) { +line 453 +;450: vec3_t right; +;451: +;452: // angle vectors returns "right" instead of "y axis" +;453: AngleVectors( angles, axis[0], right, axis[2] ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +ADDRGP4 AngleVectors +CALLV +pop +line 454 +;454: VectorSubtract( vec3_origin, right, axis[1] ); +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRGP4 vec3_origin +INDIRF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 vec3_origin+4 +INDIRF4 +ADDRLP4 0+4 +INDIRF4 +SUBF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRGP4 vec3_origin+8 +INDIRF4 +ADDRLP4 0+8 +INDIRF4 +SUBF4 +ASGNF4 +line 455 +;455:} +LABELV $193 +endproc AnglesToAxis 16 16 +export AxisClear +proc AxisClear 0 0 +line 457 +;456: +;457:void AxisClear( vec3_t axis[3] ) { +line 458 +;458: axis[0][0] = 1; +ADDRFP4 0 +INDIRP4 +CNSTF4 1065353216 +ASGNF4 +line 459 +;459: axis[0][1] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 0 +ASGNF4 +line 460 +;460: axis[0][2] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 0 +ASGNF4 +line 461 +;461: axis[1][0] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 0 +ASGNF4 +line 462 +;462: axis[1][1] = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 463 +;463: axis[1][2] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +CNSTF4 0 +ASGNF4 +line 464 +;464: axis[2][0] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTF4 0 +ASGNF4 +line 465 +;465: axis[2][1] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +CNSTF4 0 +ASGNF4 +line 466 +;466: axis[2][2] = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 467 +;467:} +LABELV $198 +endproc AxisClear 0 0 +export AxisCopy +proc AxisCopy 8 0 +line 469 +;468: +;469:void AxisCopy( vec3_t in[3], vec3_t out[3] ) { +line 470 +;470: VectorCopy( in[0], out[0] ); +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 12 +line 471 +;471: VectorCopy( in[1], out[1] ); +ADDRLP4 0 +CNSTI4 12 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRB +ASGNB 12 +line 472 +;472: VectorCopy( in[2], out[2] ); +ADDRLP4 4 +CNSTI4 24 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRB +ASGNB 12 +line 473 +;473:} +LABELV $199 +endproc AxisCopy 8 0 +export ProjectPointOnPlane +proc ProjectPointOnPlane 60 0 +line 476 +;474: +;475:void ProjectPointOnPlane( vec3_t dst, const vec3_t p, const vec3_t normal ) +;476:{ +line 481 +;477: float d; +;478: vec3_t n; +;479: float inv_denom; +;480: +;481: inv_denom = DotProduct( normal, normal ); +ADDRLP4 20 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 24 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 28 +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 32 +ADDRLP4 20 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 24 +INDIRF4 +ADDRLP4 24 +INDIRF4 +MULF4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 28 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 32 +INDIRF4 +ADDRLP4 32 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 485 +;482:#ifndef Q3_VM +;483: assert( Q_fabs(inv_denom) != 0.0f ); // bk010122 - zero vectors get here +;484:#endif +;485: inv_denom = 1.0f / inv_denom; +ADDRLP4 0 +CNSTF4 1065353216 +ADDRLP4 0 +INDIRF4 +DIVF4 +ASGNF4 +line 487 +;486: +;487: d = DotProduct( normal, p ) * inv_denom; +ADDRLP4 36 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 44 +CNSTI4 4 +ASGNI4 +ADDRLP4 48 +CNSTI4 8 +ASGNI4 +ADDRLP4 16 +ADDRLP4 36 +INDIRP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 489 +;488: +;489: n[0] = normal[0] * inv_denom; +ADDRLP4 4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 490 +;490: n[1] = normal[1] * inv_denom; +ADDRLP4 4+4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 491 +;491: n[2] = normal[2] * inv_denom; +ADDRLP4 4+8 +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 493 +;492: +;493: dst[0] = p[0] - d * n[0]; +ADDRFP4 0 +INDIRP4 +ADDRFP4 4 +INDIRP4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 494 +;494: dst[1] = p[1] - d * n[1]; +ADDRLP4 52 +CNSTI4 4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 52 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 4+4 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 495 +;495: dst[2] = p[2] - d * n[2]; +ADDRLP4 56 +CNSTI4 8 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 4+8 +INDIRF4 +MULF4 +SUBF4 +ASGNF4 +line 496 +;496:} +LABELV $200 +endproc ProjectPointOnPlane 60 0 +export MakeNormalVectors +proc MakeNormalVectors 40 12 +line 506 +;497: +;498:/* +;499:================ +;500:MakeNormalVectors +;501: +;502:Given a normalized forward vector, create two +;503:other perpendicular vectors +;504:================ +;505:*/ +;506:void MakeNormalVectors( const vec3_t forward, vec3_t right, vec3_t up) { +line 511 +;507: float d; +;508: +;509: // this rotate and negate guarantees a vector +;510: // not colinear with the original +;511: right[1] = -forward[0]; +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +NEGF4 +ASGNF4 +line 512 +;512: right[2] = forward[1]; +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 513 +;513: right[0] = forward[2]; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 515 +;514: +;515: d = DotProduct (right, forward); +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTI4 4 +ASGNI4 +ADDRLP4 16 +CNSTI4 8 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 516 +;516: VectorMA (right, -d, forward, right); +ADDRLP4 20 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 24 +CNSTI4 4 +ASGNI4 +ADDRLP4 28 +ADDRFP4 4 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +ADDRLP4 32 +CNSTI4 8 +ASGNI4 +ADDRLP4 36 +ADDRFP4 4 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 517 +;517: VectorNormalize (right); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 518 +;518: CrossProduct (right, forward, up); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRGP4 CrossProduct +CALLV +pop +line 519 +;519:} +LABELV $205 +endproc MakeNormalVectors 40 12 +export VectorRotate +proc VectorRotate 40 0 +line 523 +;520: +;521: +;522:void VectorRotate( vec3_t in, vec3_t matrix[3], vec3_t out ) +;523:{ +line 524 +;524: out[0] = DotProduct( in, matrix[0] ); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTI4 4 +ASGNI4 +ADDRLP4 12 +CNSTI4 8 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 525 +;525: out[1] = DotProduct( in, matrix[1] ); +ADDRLP4 16 +CNSTI4 4 +ASGNI4 +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 526 +;526: out[2] = DotProduct( in, matrix[2] ); +ADDRLP4 28 +CNSTI4 8 +ASGNI4 +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 32 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 527 +;527:} +LABELV $206 +endproc VectorRotate 40 0 +export Q_rsqrt +proc Q_rsqrt 20 0 +line 536 +;528: +;529://============================================================================ +;530: +;531:#if !idppc +;532:/* +;533:** float q_rsqrt( float number ) +;534:*/ +;535:float Q_rsqrt( float number ) +;536:{ +line 539 +;537: long i; +;538: float x2, y; +;539: const float threehalfs = 1.5F; +ADDRLP4 12 +CNSTF4 1069547520 +ASGNF4 +line 541 +;540: +;541: x2 = number * 0.5F; +ADDRLP4 8 +CNSTF4 1056964608 +ADDRFP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 542 +;542: y = number; +ADDRLP4 0 +ADDRFP4 0 +INDIRF4 +ASGNF4 +line 543 +;543: i = * ( long * ) &y; // evil floating point bit level hacking +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 544 +;544: i = 0x5f3759df - ( i >> 1 ); // what the fuck? +ADDRLP4 4 +CNSTI4 1597463007 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +RSHI4 +SUBI4 +ASGNI4 +line 545 +;545: y = * ( float * ) &i; +ADDRLP4 0 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 546 +;546: y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration +ADDRLP4 16 +ADDRLP4 0 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 16 +INDIRF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDRLP4 16 +INDIRF4 +MULF4 +SUBF4 +MULF4 +ASGNF4 +line 554 +;547:// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed +;548: +;549:#ifndef Q3_VM +;550:#ifdef __linux__ +;551: assert( !isnan(y) ); // bk010122 - FPE? +;552:#endif +;553:#endif +;554: return y; +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $207 +endproc Q_rsqrt 20 0 +export Q_fabs +proc Q_fabs 4 0 +line 557 +;555:} +;556: +;557:float Q_fabs( float f ) { +line 558 +;558: int tmp = * ( int * ) &f; +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +line 559 +;559: tmp &= 0x7FFFFFFF; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 2147483647 +BANDI4 +ASGNI4 +line 560 +;560: return * ( float * ) &tmp; +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $208 +endproc Q_fabs 4 0 +export LerpAngle +proc LerpAngle 8 0 +line 572 +;561:} +;562:#endif +;563: +;564://============================================================ +;565: +;566:/* +;567:=============== +;568:LerpAngle +;569: +;570:=============== +;571:*/ +;572:float LerpAngle (float from, float to, float frac) { +line 575 +;573: float a; +;574: +;575: if ( to - from > 180 ) { +ADDRFP4 4 +INDIRF4 +ADDRFP4 0 +INDIRF4 +SUBF4 +CNSTF4 1127481344 +LEF4 $210 +line 576 +;576: to -= 360; +ADDRFP4 4 +ADDRFP4 4 +INDIRF4 +CNSTF4 1135869952 +SUBF4 +ASGNF4 +line 577 +;577: } +LABELV $210 +line 578 +;578: if ( to - from < -180 ) { +ADDRFP4 4 +INDIRF4 +ADDRFP4 0 +INDIRF4 +SUBF4 +CNSTF4 3274964992 +GEF4 $212 +line 579 +;579: to += 360; +ADDRFP4 4 +ADDRFP4 4 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 580 +;580: } +LABELV $212 +line 581 +;581: a = from + frac * (to - from); +ADDRLP4 4 +ADDRFP4 0 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +ADDRFP4 4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 583 +;582: +;583: return a; +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $209 +endproc LerpAngle 8 0 +export AngleSubtract +proc AngleSubtract 4 0 +line 594 +;584:} +;585: +;586: +;587:/* +;588:================= +;589:AngleSubtract +;590: +;591:Always returns a value from -180 to 180 +;592:================= +;593:*/ +;594:float AngleSubtract( float a1, float a2 ) { +line 597 +;595: float a; +;596: +;597: a = a1 - a2; +ADDRLP4 0 +ADDRFP4 0 +INDIRF4 +ADDRFP4 4 +INDIRF4 +SUBF4 +ASGNF4 +line 598 +;598: assert(fabs(a) < 3600); +ADDRGP4 $216 +JUMPV +LABELV $215 +line 599 +;599: while ( a > 180 ) { +line 600 +;600: a -= 360; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1135869952 +SUBF4 +ASGNF4 +line 601 +;601: } +LABELV $216 +line 599 +ADDRLP4 0 +INDIRF4 +CNSTF4 1127481344 +GTF4 $215 +ADDRGP4 $219 +JUMPV +LABELV $218 +line 602 +;602: while ( a < -180 ) { +line 603 +;603: a += 360; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1135869952 +ADDF4 +ASGNF4 +line 604 +;604: } +LABELV $219 +line 602 +ADDRLP4 0 +INDIRF4 +CNSTF4 3274964992 +LTF4 $218 +line 605 +;605: return a; +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $214 +endproc AngleSubtract 4 0 +export AnglesSubtract +proc AnglesSubtract 20 8 +line 609 +;606:} +;607: +;608: +;609:void AnglesSubtract( vec3_t v1, vec3_t v2, vec3_t v3 ) { +line 610 +;610: v3[0] = AngleSubtract( v1[0], v2[0] ); +ADDRFP4 0 +INDIRP4 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 0 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 611 +;611: v3[1] = AngleSubtract( v1[1], v2[1] ); +ADDRLP4 4 +CNSTI4 4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 612 +;612: v3[2] = AngleSubtract( v1[2], v2[2] ); +ADDRLP4 12 +CNSTI4 8 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +ARGF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 16 +ADDRGP4 AngleSubtract +CALLF4 +ASGNF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 613 +;613:} +LABELV $221 +endproc AnglesSubtract 20 8 +export AngleMod +proc AngleMod 0 0 +line 616 +;614: +;615: +;616:float AngleMod(float a) { +line 617 +;617: a = (360.0/65536) * ((int)(a*(65536/360.0)) & 65535); +ADDRFP4 0 +CNSTF4 1001652224 +CNSTF4 1127615329 +ADDRFP4 0 +INDIRF4 +MULF4 +CVFI4 4 +CNSTI4 65535 +BANDI4 +CVIF4 4 +MULF4 +ASGNF4 +line 618 +;618: return a; +ADDRFP4 0 +INDIRF4 +RETF4 +LABELV $222 +endproc AngleMod 0 0 +export AngleNormalize360 +proc AngleNormalize360 0 0 +line 629 +;619:} +;620: +;621: +;622:/* +;623:================= +;624:AngleNormalize360 +;625: +;626:returns angle normalized to the range [0 <= angle < 360] +;627:================= +;628:*/ +;629:float AngleNormalize360 ( float angle ) { +line 630 +;630: return (360.0 / 65536) * ((int)(angle * (65536 / 360.0)) & 65535); +CNSTF4 1001652224 +CNSTF4 1127615329 +ADDRFP4 0 +INDIRF4 +MULF4 +CVFI4 4 +CNSTI4 65535 +BANDI4 +CVIF4 4 +MULF4 +RETF4 +LABELV $223 +endproc AngleNormalize360 0 0 +export AngleNormalize180 +proc AngleNormalize180 4 4 +line 641 +;631:} +;632: +;633: +;634:/* +;635:================= +;636:AngleNormalize180 +;637: +;638:returns angle normalized to the range [-180 < angle <= 180] +;639:================= +;640:*/ +;641:float AngleNormalize180 ( float angle ) { +line 642 +;642: angle = AngleNormalize360( angle ); +ADDRFP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0 +ADDRGP4 AngleNormalize360 +CALLF4 +ASGNF4 +ADDRFP4 0 +ADDRLP4 0 +INDIRF4 +ASGNF4 +line 643 +;643: if ( angle > 180.0 ) { +ADDRFP4 0 +INDIRF4 +CNSTF4 1127481344 +LEF4 $225 +line 644 +;644: angle -= 360.0; +ADDRFP4 0 +ADDRFP4 0 +INDIRF4 +CNSTF4 1135869952 +SUBF4 +ASGNF4 +line 645 +;645: } +LABELV $225 +line 646 +;646: return angle; +ADDRFP4 0 +INDIRF4 +RETF4 +LABELV $224 +endproc AngleNormalize180 4 4 +export AngleDelta +proc AngleDelta 4 4 +line 657 +;647:} +;648: +;649: +;650:/* +;651:================= +;652:AngleDelta +;653: +;654:returns the normalized delta from angle1 to angle2 +;655:================= +;656:*/ +;657:float AngleDelta ( float angle1, float angle2 ) { +line 658 +;658: return AngleNormalize180( angle1 - angle2 ); +ADDRFP4 0 +INDIRF4 +ADDRFP4 4 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 0 +ADDRGP4 AngleNormalize180 +CALLF4 +ASGNF4 +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $227 +endproc AngleDelta 4 4 +export SetPlaneSignbits +proc SetPlaneSignbits 8 0 +line 670 +;659:} +;660: +;661: +;662://============================================================ +;663: +;664: +;665:/* +;666:================= +;667:SetPlaneSignbits +;668:================= +;669:*/ +;670:void SetPlaneSignbits (cplane_t *out) { +line 674 +;671: int bits, j; +;672: +;673: // for fast box on planeside test +;674: bits = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 675 +;675: for (j=0 ; j<3 ; j++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $229 +line 676 +;676: if (out->normal[j] < 0) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRF4 +CNSTF4 0 +GEF4 $233 +line 677 +;677: bits |= 1<signbits = bits; +ADDRFP4 0 +INDIRP4 +CNSTI4 17 +ADDP4 +ADDRLP4 4 +INDIRI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 681 +;681:} +LABELV $228 +endproc SetPlaneSignbits 8 0 +export BoxOnPlaneSide +proc BoxOnPlaneSide 280 0 +line 729 +;682: +;683: +;684:/* +;685:================== +;686:BoxOnPlaneSide +;687: +;688:Returns 1, 2, or 1 + 2 +;689: +;690:// this is the slow, general version +;691:int BoxOnPlaneSide2 (vec3_t emins, vec3_t emaxs, struct cplane_s *p) +;692:{ +;693: int i; +;694: float dist1, dist2; +;695: int sides; +;696: vec3_t corners[2]; +;697: +;698: for (i=0 ; i<3 ; i++) +;699: { +;700: if (p->normal[i] < 0) +;701: { +;702: corners[0][i] = emins[i]; +;703: corners[1][i] = emaxs[i]; +;704: } +;705: else +;706: { +;707: corners[1][i] = emins[i]; +;708: corners[0][i] = emaxs[i]; +;709: } +;710: } +;711: dist1 = DotProduct (p->normal, corners[0]) - p->dist; +;712: dist2 = DotProduct (p->normal, corners[1]) - p->dist; +;713: sides = 0; +;714: if (dist1 >= 0) +;715: sides = 1; +;716: if (dist2 < 0) +;717: sides |= 2; +;718: +;719: return sides; +;720:} +;721: +;722:================== +;723:*/ +;724:#if !( (defined __linux__ || __FreeBSD__) && (defined __i386__) && (!defined C_ONLY)) // rb010123 +;725: +;726:#if defined __LCC__ || defined C_ONLY || !id386 +;727: +;728:int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p) +;729:{ +line 734 +;730: float dist1, dist2; +;731: int sides; +;732: +;733:// fast axial cases +;734: if (p->type < 3) +ADDRFP4 8 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRU1 +CVUI4 1 +CNSTI4 3 +GEI4 $236 +line 735 +;735: { +line 736 +;736: if (p->dist <= emins[p->type]) +ADDRLP4 12 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRU1 +CVUI4 1 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRF4 +GTF4 $238 +line 737 +;737: return 1; +CNSTI4 1 +RETI4 +ADDRGP4 $235 +JUMPV +LABELV $238 +line 738 +;738: if (p->dist >= emaxs[p->type]) +ADDRLP4 16 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRU1 +CVUI4 1 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +LTF4 $240 +line 739 +;739: return 2; +CNSTI4 2 +RETI4 +ADDRGP4 $235 +JUMPV +LABELV $240 +line 740 +;740: return 3; +CNSTI4 3 +RETI4 +ADDRGP4 $235 +JUMPV +LABELV $236 +line 744 +;741: } +;742: +;743:// general case +;744: switch (p->signbits) +ADDRLP4 12 +ADDRFP4 8 +INDIRP4 +CNSTI4 17 +ADDP4 +INDIRU1 +CVUI4 1 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +LTI4 $242 +ADDRLP4 12 +INDIRI4 +CNSTI4 7 +GTI4 $242 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $253 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $253 +address $245 +address $246 +address $247 +address $248 +address $249 +address $250 +address $251 +address $252 +code +line 745 +;745: { +LABELV $245 +line 747 +;746: case 0: +;747: dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2]; +ADDRLP4 20 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 24 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 28 +CNSTI4 4 +ASGNI4 +ADDRLP4 32 +CNSTI4 8 +ASGNI4 +ADDRLP4 4 +ADDRLP4 20 +INDIRP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 748 +;748: dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2]; +ADDRLP4 36 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +CNSTI4 4 +ASGNI4 +ADDRLP4 48 +CNSTI4 8 +ASGNI4 +ADDRLP4 8 +ADDRLP4 36 +INDIRP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 749 +;749: break; +ADDRGP4 $243 +JUMPV +LABELV $246 +line 751 +;750: case 1: +;751: dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2]; +ADDRLP4 52 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 56 +CNSTI4 4 +ASGNI4 +ADDRLP4 60 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 64 +CNSTI4 8 +ASGNI4 +ADDRLP4 4 +ADDRLP4 52 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 64 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 752 +;752: dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2]; +ADDRLP4 68 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 72 +CNSTI4 4 +ASGNI4 +ADDRLP4 76 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 80 +CNSTI4 8 +ASGNI4 +ADDRLP4 8 +ADDRLP4 68 +INDIRP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 68 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 72 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 68 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 753 +;753: break; +ADDRGP4 $243 +JUMPV +LABELV $247 +line 755 +;754: case 2: +;755: dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2]; +ADDRLP4 84 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 88 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 92 +CNSTI4 4 +ASGNI4 +ADDRLP4 96 +CNSTI4 8 +ASGNI4 +ADDRLP4 4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +ADDRLP4 88 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 96 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 88 +INDIRP4 +ADDRLP4 96 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 756 +;756: dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2]; +ADDRLP4 100 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 104 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 108 +CNSTI4 4 +ASGNI4 +ADDRLP4 112 +CNSTI4 8 +ASGNI4 +ADDRLP4 8 +ADDRLP4 100 +INDIRP4 +INDIRF4 +ADDRLP4 104 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 100 +INDIRP4 +ADDRLP4 108 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 108 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 100 +INDIRP4 +ADDRLP4 112 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 104 +INDIRP4 +ADDRLP4 112 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 757 +;757: break; +ADDRGP4 $243 +JUMPV +LABELV $248 +line 759 +;758: case 3: +;759: dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2]; +ADDRLP4 116 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 120 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 124 +CNSTI4 4 +ASGNI4 +ADDRLP4 128 +CNSTI4 8 +ASGNI4 +ADDRLP4 4 +ADDRLP4 116 +INDIRP4 +INDIRF4 +ADDRLP4 120 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 116 +INDIRP4 +ADDRLP4 124 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 120 +INDIRP4 +ADDRLP4 124 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 116 +INDIRP4 +ADDRLP4 128 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 128 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 760 +;760: dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2]; +ADDRLP4 132 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 136 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 140 +CNSTI4 4 +ASGNI4 +ADDRLP4 144 +CNSTI4 8 +ASGNI4 +ADDRLP4 8 +ADDRLP4 132 +INDIRP4 +INDIRF4 +ADDRLP4 136 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 132 +INDIRP4 +ADDRLP4 140 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 136 +INDIRP4 +ADDRLP4 140 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 132 +INDIRP4 +ADDRLP4 144 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 144 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 761 +;761: break; +ADDRGP4 $243 +JUMPV +LABELV $249 +line 763 +;762: case 4: +;763: dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2]; +ADDRLP4 148 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 152 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 156 +CNSTI4 4 +ASGNI4 +ADDRLP4 160 +CNSTI4 8 +ASGNI4 +ADDRLP4 4 +ADDRLP4 148 +INDIRP4 +INDIRF4 +ADDRLP4 152 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 148 +INDIRP4 +ADDRLP4 156 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 152 +INDIRP4 +ADDRLP4 156 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 148 +INDIRP4 +ADDRLP4 160 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 160 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 764 +;764: dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2]; +ADDRLP4 164 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 168 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 172 +CNSTI4 4 +ASGNI4 +ADDRLP4 176 +CNSTI4 8 +ASGNI4 +ADDRLP4 8 +ADDRLP4 164 +INDIRP4 +INDIRF4 +ADDRLP4 168 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 164 +INDIRP4 +ADDRLP4 172 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 168 +INDIRP4 +ADDRLP4 172 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 164 +INDIRP4 +ADDRLP4 176 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 176 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 765 +;765: break; +ADDRGP4 $243 +JUMPV +LABELV $250 +line 767 +;766: case 5: +;767: dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2]; +ADDRLP4 180 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 184 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 188 +CNSTI4 4 +ASGNI4 +ADDRLP4 192 +CNSTI4 8 +ASGNI4 +ADDRLP4 4 +ADDRLP4 180 +INDIRP4 +INDIRF4 +ADDRLP4 184 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 180 +INDIRP4 +ADDRLP4 188 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 188 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 180 +INDIRP4 +ADDRLP4 192 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 184 +INDIRP4 +ADDRLP4 192 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 768 +;768: dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2]; +ADDRLP4 196 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 200 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 204 +CNSTI4 4 +ASGNI4 +ADDRLP4 208 +CNSTI4 8 +ASGNI4 +ADDRLP4 8 +ADDRLP4 196 +INDIRP4 +INDIRF4 +ADDRLP4 200 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 196 +INDIRP4 +ADDRLP4 204 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 204 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 196 +INDIRP4 +ADDRLP4 208 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 200 +INDIRP4 +ADDRLP4 208 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 769 +;769: break; +ADDRGP4 $243 +JUMPV +LABELV $251 +line 771 +;770: case 6: +;771: dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2]; +ADDRLP4 212 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 216 +CNSTI4 4 +ASGNI4 +ADDRLP4 220 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 224 +CNSTI4 8 +ASGNI4 +ADDRLP4 4 +ADDRLP4 212 +INDIRP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 212 +INDIRP4 +ADDRLP4 216 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 220 +INDIRP4 +ADDRLP4 216 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 212 +INDIRP4 +ADDRLP4 224 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 220 +INDIRP4 +ADDRLP4 224 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 772 +;772: dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2]; +ADDRLP4 228 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 232 +CNSTI4 4 +ASGNI4 +ADDRLP4 236 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 240 +CNSTI4 8 +ASGNI4 +ADDRLP4 8 +ADDRLP4 228 +INDIRP4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 228 +INDIRP4 +ADDRLP4 232 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 236 +INDIRP4 +ADDRLP4 232 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 228 +INDIRP4 +ADDRLP4 240 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 236 +INDIRP4 +ADDRLP4 240 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 773 +;773: break; +ADDRGP4 $243 +JUMPV +LABELV $252 +line 775 +;774: case 7: +;775: dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2]; +ADDRLP4 244 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 248 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 252 +CNSTI4 4 +ASGNI4 +ADDRLP4 256 +CNSTI4 8 +ASGNI4 +ADDRLP4 4 +ADDRLP4 244 +INDIRP4 +INDIRF4 +ADDRLP4 248 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 244 +INDIRP4 +ADDRLP4 252 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 248 +INDIRP4 +ADDRLP4 252 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 244 +INDIRP4 +ADDRLP4 256 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 248 +INDIRP4 +ADDRLP4 256 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 776 +;776: dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2]; +ADDRLP4 260 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 264 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 268 +CNSTI4 4 +ASGNI4 +ADDRLP4 272 +CNSTI4 8 +ASGNI4 +ADDRLP4 8 +ADDRLP4 260 +INDIRP4 +INDIRF4 +ADDRLP4 264 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 260 +INDIRP4 +ADDRLP4 268 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 264 +INDIRP4 +ADDRLP4 268 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 260 +INDIRP4 +ADDRLP4 272 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 264 +INDIRP4 +ADDRLP4 272 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 777 +;777: break; +ADDRGP4 $243 +JUMPV +LABELV $242 +line 779 +;778: default: +;779: dist1 = dist2 = 0; // shut up compiler +ADDRLP4 276 +CNSTF4 0 +ASGNF4 +ADDRLP4 8 +ADDRLP4 276 +INDIRF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 276 +INDIRF4 +ASGNF4 +line 780 +;780: break; +LABELV $243 +line 783 +;781: } +;782: +;783: sides = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 784 +;784: if (dist1 >= p->dist) +ADDRLP4 4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +LTF4 $254 +line 785 +;785: sides = 1; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +LABELV $254 +line 786 +;786: if (dist2 < p->dist) +ADDRLP4 8 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +GEF4 $256 +line 787 +;787: sides |= 2; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +LABELV $256 +line 789 +;788: +;789: return sides; +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $235 +endproc BoxOnPlaneSide 280 0 +export RadiusFromBounds +proc RadiusFromBounds 36 4 +line 1033 +;790:} +;791:#else +;792:#pragma warning( disable: 4035 ) +;793: +;794:__declspec( naked ) int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p) +;795:{ +;796: static int bops_initialized; +;797: static int Ljmptab[8]; +;798: +;799: __asm { +;800: +;801: push ebx +;802: +;803: cmp bops_initialized, 1 +;804: je initialized +;805: mov bops_initialized, 1 +;806: +;807: mov Ljmptab[0*4], offset Lcase0 +;808: mov Ljmptab[1*4], offset Lcase1 +;809: mov Ljmptab[2*4], offset Lcase2 +;810: mov Ljmptab[3*4], offset Lcase3 +;811: mov Ljmptab[4*4], offset Lcase4 +;812: mov Ljmptab[5*4], offset Lcase5 +;813: mov Ljmptab[6*4], offset Lcase6 +;814: mov Ljmptab[7*4], offset Lcase7 +;815: +;816:initialized: +;817: +;818: mov edx,dword ptr[4+12+esp] +;819: mov ecx,dword ptr[4+4+esp] +;820: xor eax,eax +;821: mov ebx,dword ptr[4+8+esp] +;822: mov al,byte ptr[17+edx] +;823: cmp al,8 +;824: jge Lerror +;825: fld dword ptr[0+edx] +;826: fld st(0) +;827: jmp dword ptr[Ljmptab+eax*4] +;828:Lcase0: +;829: fmul dword ptr[ebx] +;830: fld dword ptr[0+4+edx] +;831: fxch st(2) +;832: fmul dword ptr[ecx] +;833: fxch st(2) +;834: fld st(0) +;835: fmul dword ptr[4+ebx] +;836: fld dword ptr[0+8+edx] +;837: fxch st(2) +;838: fmul dword ptr[4+ecx] +;839: fxch st(2) +;840: fld st(0) +;841: fmul dword ptr[8+ebx] +;842: fxch st(5) +;843: faddp st(3),st(0) +;844: fmul dword ptr[8+ecx] +;845: fxch st(1) +;846: faddp st(3),st(0) +;847: fxch st(3) +;848: faddp st(2),st(0) +;849: jmp LSetSides +;850:Lcase1: +;851: fmul dword ptr[ecx] +;852: fld dword ptr[0+4+edx] +;853: fxch st(2) +;854: fmul dword ptr[ebx] +;855: fxch st(2) +;856: fld st(0) +;857: fmul dword ptr[4+ebx] +;858: fld dword ptr[0+8+edx] +;859: fxch st(2) +;860: fmul dword ptr[4+ecx] +;861: fxch st(2) +;862: fld st(0) +;863: fmul dword ptr[8+ebx] +;864: fxch st(5) +;865: faddp st(3),st(0) +;866: fmul dword ptr[8+ecx] +;867: fxch st(1) +;868: faddp st(3),st(0) +;869: fxch st(3) +;870: faddp st(2),st(0) +;871: jmp LSetSides +;872:Lcase2: +;873: fmul dword ptr[ebx] +;874: fld dword ptr[0+4+edx] +;875: fxch st(2) +;876: fmul dword ptr[ecx] +;877: fxch st(2) +;878: fld st(0) +;879: fmul dword ptr[4+ecx] +;880: fld dword ptr[0+8+edx] +;881: fxch st(2) +;882: fmul dword ptr[4+ebx] +;883: fxch st(2) +;884: fld st(0) +;885: fmul dword ptr[8+ebx] +;886: fxch st(5) +;887: faddp st(3),st(0) +;888: fmul dword ptr[8+ecx] +;889: fxch st(1) +;890: faddp st(3),st(0) +;891: fxch st(3) +;892: faddp st(2),st(0) +;893: jmp LSetSides +;894:Lcase3: +;895: fmul dword ptr[ecx] +;896: fld dword ptr[0+4+edx] +;897: fxch st(2) +;898: fmul dword ptr[ebx] +;899: fxch st(2) +;900: fld st(0) +;901: fmul dword ptr[4+ecx] +;902: fld dword ptr[0+8+edx] +;903: fxch st(2) +;904: fmul dword ptr[4+ebx] +;905: fxch st(2) +;906: fld st(0) +;907: fmul dword ptr[8+ebx] +;908: fxch st(5) +;909: faddp st(3),st(0) +;910: fmul dword ptr[8+ecx] +;911: fxch st(1) +;912: faddp st(3),st(0) +;913: fxch st(3) +;914: faddp st(2),st(0) +;915: jmp LSetSides +;916:Lcase4: +;917: fmul dword ptr[ebx] +;918: fld dword ptr[0+4+edx] +;919: fxch st(2) +;920: fmul dword ptr[ecx] +;921: fxch st(2) +;922: fld st(0) +;923: fmul dword ptr[4+ebx] +;924: fld dword ptr[0+8+edx] +;925: fxch st(2) +;926: fmul dword ptr[4+ecx] +;927: fxch st(2) +;928: fld st(0) +;929: fmul dword ptr[8+ecx] +;930: fxch st(5) +;931: faddp st(3),st(0) +;932: fmul dword ptr[8+ebx] +;933: fxch st(1) +;934: faddp st(3),st(0) +;935: fxch st(3) +;936: faddp st(2),st(0) +;937: jmp LSetSides +;938:Lcase5: +;939: fmul dword ptr[ecx] +;940: fld dword ptr[0+4+edx] +;941: fxch st(2) +;942: fmul dword ptr[ebx] +;943: fxch st(2) +;944: fld st(0) +;945: fmul dword ptr[4+ebx] +;946: fld dword ptr[0+8+edx] +;947: fxch st(2) +;948: fmul dword ptr[4+ecx] +;949: fxch st(2) +;950: fld st(0) +;951: fmul dword ptr[8+ecx] +;952: fxch st(5) +;953: faddp st(3),st(0) +;954: fmul dword ptr[8+ebx] +;955: fxch st(1) +;956: faddp st(3),st(0) +;957: fxch st(3) +;958: faddp st(2),st(0) +;959: jmp LSetSides +;960:Lcase6: +;961: fmul dword ptr[ebx] +;962: fld dword ptr[0+4+edx] +;963: fxch st(2) +;964: fmul dword ptr[ecx] +;965: fxch st(2) +;966: fld st(0) +;967: fmul dword ptr[4+ecx] +;968: fld dword ptr[0+8+edx] +;969: fxch st(2) +;970: fmul dword ptr[4+ebx] +;971: fxch st(2) +;972: fld st(0) +;973: fmul dword ptr[8+ecx] +;974: fxch st(5) +;975: faddp st(3),st(0) +;976: fmul dword ptr[8+ebx] +;977: fxch st(1) +;978: faddp st(3),st(0) +;979: fxch st(3) +;980: faddp st(2),st(0) +;981: jmp LSetSides +;982:Lcase7: +;983: fmul dword ptr[ecx] +;984: fld dword ptr[0+4+edx] +;985: fxch st(2) +;986: fmul dword ptr[ebx] +;987: fxch st(2) +;988: fld st(0) +;989: fmul dword ptr[4+ecx] +;990: fld dword ptr[0+8+edx] +;991: fxch st(2) +;992: fmul dword ptr[4+ebx] +;993: fxch st(2) +;994: fld st(0) +;995: fmul dword ptr[8+ecx] +;996: fxch st(5) +;997: faddp st(3),st(0) +;998: fmul dword ptr[8+ebx] +;999: fxch st(1) +;1000: faddp st(3),st(0) +;1001: fxch st(3) +;1002: faddp st(2),st(0) +;1003:LSetSides: +;1004: faddp st(2),st(0) +;1005: fcomp dword ptr[12+edx] +;1006: xor ecx,ecx +;1007: fnstsw ax +;1008: fcomp dword ptr[12+edx] +;1009: and ah,1 +;1010: xor ah,1 +;1011: add cl,ah +;1012: fnstsw ax +;1013: and ah,1 +;1014: add ah,ah +;1015: add cl,ah +;1016: pop ebx +;1017: mov eax,ecx +;1018: ret +;1019:Lerror: +;1020: int 3 +;1021: } +;1022:} +;1023:#pragma warning( default: 4035 ) +;1024: +;1025:#endif +;1026:#endif +;1027: +;1028:/* +;1029:================= +;1030:RadiusFromBounds +;1031:================= +;1032:*/ +;1033:float RadiusFromBounds( const vec3_t mins, const vec3_t maxs ) { +line 1038 +;1034: int i; +;1035: vec3_t corner; +;1036: float a, b; +;1037: +;1038: for (i=0 ; i<3 ; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $259 +line 1039 +;1039: a = fabs( mins[i] ); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 1040 +;1040: b = fabs( maxs[i] ); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 28 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 8 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 1041 +;1041: corner[i] = a > b ? a : b; +ADDRLP4 4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +LEF4 $264 +ADDRLP4 32 +ADDRLP4 4 +INDIRF4 +ASGNF4 +ADDRGP4 $265 +JUMPV +LABELV $264 +ADDRLP4 32 +ADDRLP4 8 +INDIRF4 +ASGNF4 +LABELV $265 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 12 +ADDP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 1042 +;1042: } +LABELV $260 +line 1038 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $259 +line 1044 +;1043: +;1044: return VectorLength (corner); +ADDRLP4 12 +ARGP4 +ADDRLP4 24 +ADDRGP4 VectorLength +CALLF4 +ASGNF4 +ADDRLP4 24 +INDIRF4 +RETF4 +LABELV $258 +endproc RadiusFromBounds 36 4 +export ClearBounds +proc ClearBounds 16 0 +line 1048 +;1045:} +;1046: +;1047: +;1048:void ClearBounds( vec3_t mins, vec3_t maxs ) { +line 1049 +;1049: mins[0] = mins[1] = mins[2] = 99999; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTF4 1203982208 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 1050 +;1050: maxs[0] = maxs[1] = maxs[2] = -99999; +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +CNSTF4 3351465856 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 1051 +;1051:} +LABELV $266 +endproc ClearBounds 16 0 +export AddPointToBounds +proc AddPointToBounds 20 0 +line 1053 +;1052: +;1053:void AddPointToBounds( const vec3_t v, vec3_t mins, vec3_t maxs ) { +line 1054 +;1054: if ( v[0] < mins[0] ) { +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +INDIRF4 +GEF4 $268 +line 1055 +;1055: mins[0] = v[0]; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 1056 +;1056: } +LABELV $268 +line 1057 +;1057: if ( v[0] > maxs[0]) { +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +LEF4 $270 +line 1058 +;1058: maxs[0] = v[0]; +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 1059 +;1059: } +LABELV $270 +line 1061 +;1060: +;1061: if ( v[1] < mins[1] ) { +ADDRLP4 0 +CNSTI4 4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRF4 +GEF4 $272 +line 1062 +;1062: mins[1] = v[1]; +ADDRLP4 4 +CNSTI4 4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +line 1063 +;1063: } +LABELV $272 +line 1064 +;1064: if ( v[1] > maxs[1]) { +ADDRLP4 4 +CNSTI4 4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +LEF4 $274 +line 1065 +;1065: maxs[1] = v[1]; +ADDRLP4 8 +CNSTI4 4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +line 1066 +;1066: } +LABELV $274 +line 1068 +;1067: +;1068: if ( v[2] < mins[2] ) { +ADDRLP4 8 +CNSTI4 8 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +GEF4 $276 +line 1069 +;1069: mins[2] = v[2]; +ADDRLP4 12 +CNSTI4 8 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +line 1070 +;1070: } +LABELV $276 +line 1071 +;1071: if ( v[2] > maxs[2]) { +ADDRLP4 12 +CNSTI4 8 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +LEF4 $278 +line 1072 +;1072: maxs[2] = v[2]; +ADDRLP4 16 +CNSTI4 8 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +line 1073 +;1073: } +LABELV $278 +line 1074 +;1074:} +LABELV $267 +endproc AddPointToBounds 20 0 +export VectorNormalize +proc VectorNormalize 40 4 +line 1077 +;1075: +;1076: +;1077:vec_t VectorNormalize( vec3_t v ) { +line 1080 +;1078: float length, ilength; +;1079: +;1080: length = v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 20 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1081 +;1081: length = sqrt (length); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 sqrt +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 1083 +;1082: +;1083: if ( length ) { +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +EQF4 $281 +line 1084 +;1084: ilength = 1/length; +ADDRLP4 4 +CNSTF4 1065353216 +ADDRLP4 0 +INDIRF4 +DIVF4 +ASGNF4 +line 1085 +;1085: v[0] *= ilength; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1086 +;1086: v[1] *= ilength; +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1087 +;1087: v[2] *= ilength; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1088 +;1088: } +LABELV $281 +line 1090 +;1089: +;1090: return length; +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $280 +endproc VectorNormalize 40 4 +export VectorNormalize2 +proc VectorNormalize2 36 4 +line 1093 +;1091:} +;1092: +;1093:vec_t VectorNormalize2( const vec3_t v, vec3_t out) { +line 1096 +;1094: float length, ilength; +;1095: +;1096: length = v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 20 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +ADDRLP4 12 +INDIRF4 +MULF4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 16 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 20 +INDIRF4 +ADDRLP4 20 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1097 +;1097: length = sqrt (length); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 sqrt +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 1099 +;1098: +;1099: if (length) +ADDRLP4 0 +INDIRF4 +CNSTF4 0 +EQF4 $284 +line 1100 +;1100: { +line 1104 +;1101:#ifndef Q3_VM // bk0101022 - FPE related +;1102:// assert( ((Q_fabs(v[0])!=0.0f) || (Q_fabs(v[1])!=0.0f) || (Q_fabs(v[2])!=0.0f)) ); +;1103:#endif +;1104: ilength = 1/length; +ADDRLP4 4 +CNSTF4 1065353216 +ADDRLP4 0 +INDIRF4 +DIVF4 +ASGNF4 +line 1105 +;1105: out[0] = v[0]*ilength; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1106 +;1106: out[1] = v[1]*ilength; +ADDRLP4 28 +CNSTI4 4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 28 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1107 +;1107: out[2] = v[2]*ilength; +ADDRLP4 32 +CNSTI4 8 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1108 +;1108: } else { +ADDRGP4 $285 +JUMPV +LABELV $284 +line 1112 +;1109:#ifndef Q3_VM // bk0101022 - FPE related +;1110:// assert( ((Q_fabs(v[0])==0.0f) && (Q_fabs(v[1])==0.0f) && (Q_fabs(v[2])==0.0f)) ); +;1111:#endif +;1112: VectorClear( out ); +ADDRLP4 28 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 32 +CNSTF4 0 +ASGNF4 +ADDRLP4 28 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 28 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 1113 +;1113: } +LABELV $285 +line 1115 +;1114: +;1115: return length; +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $283 +endproc VectorNormalize2 36 4 +export _VectorMA +proc _VectorMA 8 0 +line 1119 +;1116: +;1117:} +;1118: +;1119:void _VectorMA( const vec3_t veca, float scale, const vec3_t vecb, vec3_t vecc) { +line 1120 +;1120: vecc[0] = veca[0] + scale*vecb[0]; +ADDRFP4 12 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1121 +;1121: vecc[1] = veca[1] + scale*vecb[1]; +ADDRLP4 0 +CNSTI4 4 +ASGNI4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1122 +;1122: vecc[2] = veca[2] + scale*vecb[2]; +ADDRLP4 4 +CNSTI4 8 +ASGNI4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1123 +;1123:} +LABELV $286 +endproc _VectorMA 8 0 +export _DotProduct +proc _DotProduct 16 0 +line 1126 +;1124: +;1125: +;1126:vec_t _DotProduct( const vec3_t v1, const vec3_t v2 ) { +line 1127 +;1127: return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2]; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTI4 4 +ASGNI4 +ADDRLP4 12 +CNSTI4 8 +ASGNI4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +RETF4 +LABELV $287 +endproc _DotProduct 16 0 +export _VectorSubtract +proc _VectorSubtract 8 0 +line 1130 +;1128:} +;1129: +;1130:void _VectorSubtract( const vec3_t veca, const vec3_t vecb, vec3_t out ) { +line 1131 +;1131: out[0] = veca[0]-vecb[0]; +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +line 1132 +;1132: out[1] = veca[1]-vecb[1]; +ADDRLP4 0 +CNSTI4 4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 1133 +;1133: out[2] = veca[2]-vecb[2]; +ADDRLP4 4 +CNSTI4 8 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 1134 +;1134:} +LABELV $288 +endproc _VectorSubtract 8 0 +export _VectorAdd +proc _VectorAdd 8 0 +line 1136 +;1135: +;1136:void _VectorAdd( const vec3_t veca, const vec3_t vecb, vec3_t out ) { +line 1137 +;1137: out[0] = veca[0]+vecb[0]; +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +line 1138 +;1138: out[1] = veca[1]+vecb[1]; +ADDRLP4 0 +CNSTI4 4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 1139 +;1139: out[2] = veca[2]+vecb[2]; +ADDRLP4 4 +CNSTI4 8 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 1140 +;1140:} +LABELV $289 +endproc _VectorAdd 8 0 +export _VectorCopy +proc _VectorCopy 8 0 +line 1142 +;1141: +;1142:void _VectorCopy( const vec3_t in, vec3_t out ) { +line 1143 +;1143: out[0] = in[0]; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 1144 +;1144: out[1] = in[1]; +ADDRLP4 0 +CNSTI4 4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +line 1145 +;1145: out[2] = in[2]; +ADDRLP4 4 +CNSTI4 8 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ASGNF4 +line 1146 +;1146:} +LABELV $290 +endproc _VectorCopy 8 0 +export _VectorScale +proc _VectorScale 8 0 +line 1148 +;1147: +;1148:void _VectorScale( const vec3_t in, vec_t scale, vec3_t out ) { +line 1149 +;1149: out[0] = in[0]*scale; +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1150 +;1150: out[1] = in[1]*scale; +ADDRLP4 0 +CNSTI4 4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1151 +;1151: out[2] = in[2]*scale; +ADDRLP4 4 +CNSTI4 8 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1152 +;1152:} +LABELV $291 +endproc _VectorScale 8 0 +export Vector4Scale +proc Vector4Scale 12 0 +line 1154 +;1153: +;1154:void Vector4Scale( const vec4_t in, vec_t scale, vec4_t out ) { +line 1155 +;1155: out[0] = in[0]*scale; +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1156 +;1156: out[1] = in[1]*scale; +ADDRLP4 0 +CNSTI4 4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1157 +;1157: out[2] = in[2]*scale; +ADDRLP4 4 +CNSTI4 8 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1158 +;1158: out[3] = in[3]*scale; +ADDRLP4 8 +CNSTI4 12 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ADDRFP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRF4 +MULF4 +ASGNF4 +line 1159 +;1159:} +LABELV $292 +endproc Vector4Scale 12 0 +export Q_log2 +proc Q_log2 8 0 +line 1162 +;1160: +;1161: +;1162:int Q_log2( int val ) { +line 1165 +;1163: int answer; +;1164: +;1165: answer = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $295 +JUMPV +LABELV $294 +line 1166 +;1166: while ( ( val>>=1 ) != 0 ) { +line 1167 +;1167: answer++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1168 +;1168: } +LABELV $295 +line 1166 +ADDRLP4 4 +ADDRFP4 0 +INDIRI4 +CNSTI4 1 +RSHI4 +ASGNI4 +ADDRFP4 0 +ADDRLP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $294 +line 1169 +;1169: return answer; +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $293 +endproc Q_log2 8 0 +export MatrixMultiply +proc MatrixMultiply 104 0 +line 1198 +;1170:} +;1171: +;1172: +;1173: +;1174:/* +;1175:================= +;1176:PlaneTypeForNormal +;1177:================= +;1178:*/ +;1179:/* +;1180:int PlaneTypeForNormal (vec3_t normal) { +;1181: if ( normal[0] == 1.0 ) +;1182: return PLANE_X; +;1183: if ( normal[1] == 1.0 ) +;1184: return PLANE_Y; +;1185: if ( normal[2] == 1.0 ) +;1186: return PLANE_Z; +;1187: +;1188: return PLANE_NON_AXIAL; +;1189:} +;1190:*/ +;1191: +;1192: +;1193:/* +;1194:================ +;1195:MatrixMultiply +;1196:================ +;1197:*/ +;1198:void MatrixMultiply(float in1[3][3], float in2[3][3], float out[3][3]) { +line 1199 +;1199: out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] + +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1201 +;1200: in1[0][2] * in2[2][0]; +;1201: out[0][1] = in1[0][0] * in2[0][1] + in1[0][1] * in2[1][1] + +ADDRLP4 8 +CNSTI4 4 +ASGNI4 +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1203 +;1202: in1[0][2] * in2[2][1]; +;1203: out[0][2] = in1[0][0] * in2[0][2] + in1[0][1] * in2[1][2] + +ADDRLP4 20 +CNSTI4 8 +ASGNI4 +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +ADDRLP4 24 +INDIRP4 +INDIRF4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 24 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 28 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 28 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1205 +;1204: in1[0][2] * in2[2][2]; +;1205: out[1][0] = in1[1][0] * in2[0][0] + in1[1][1] * in2[1][0] + +ADDRLP4 32 +CNSTI4 12 +ASGNI4 +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1207 +;1206: in1[1][2] * in2[2][0]; +;1207: out[1][1] = in1[1][0] * in2[0][1] + in1[1][1] * in2[1][1] + +ADDRLP4 44 +CNSTI4 16 +ASGNI4 +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +ADDRLP4 48 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 48 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 48 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1209 +;1208: in1[1][2] * in2[2][1]; +;1209: out[1][2] = in1[1][0] * in2[0][2] + in1[1][1] * in2[1][2] + +ADDRLP4 56 +CNSTI4 20 +ASGNI4 +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 64 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 64 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 60 +INDIRP4 +ADDRLP4 56 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 64 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1211 +;1210: in1[1][2] * in2[2][2]; +;1211: out[2][0] = in1[2][0] * in2[0][0] + in1[2][1] * in2[1][0] + +ADDRLP4 68 +CNSTI4 24 +ASGNI4 +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 76 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ADDP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +INDIRF4 +MULF4 +ADDRLP4 72 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 72 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 68 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1213 +;1212: in1[2][2] * in2[2][0]; +;1213: out[2][1] = in1[2][0] * in2[0][1] + in1[2][1] * in2[1][1] + +ADDRLP4 80 +CNSTI4 28 +ASGNI4 +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 88 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 88 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 88 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 84 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRF4 +ADDRLP4 88 +INDIRP4 +ADDRLP4 80 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1215 +;1214: in1[2][2] * in2[2][1]; +;1215: out[2][2] = in1[2][0] * in2[0][2] + in1[2][1] * in2[1][2] + +ADDRLP4 92 +CNSTI4 32 +ASGNI4 +ADDRLP4 96 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 100 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ADDRLP4 96 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 96 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 100 +INDIRP4 +ADDRLP4 92 +INDIRI4 +ADDP4 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1217 +;1216: in1[2][2] * in2[2][2]; +;1217:} +LABELV $297 +endproc MatrixMultiply 104 0 +bss +align 4 +LABELV $299 +skip 4 +align 4 +LABELV $300 +skip 4 +align 4 +LABELV $301 +skip 4 +align 4 +LABELV $302 +skip 4 +align 4 +LABELV $303 +skip 4 +align 4 +LABELV $304 +skip 4 +export AngleVectors +code +proc AngleVectors 36 4 +line 1220 +;1218: +;1219: +;1220:void AngleVectors( const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up) { +line 1225 +;1221: float angle; +;1222: static float sr, sp, sy, cr, cp, cy; +;1223: // static to help MS compiler fp bugs +;1224: +;1225: angle = angles[YAW] * (M_PI*2 / 360); +ADDRLP4 0 +CNSTF4 1016003125 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 1226 +;1226: sy = sin(angle); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 4 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRGP4 $301 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 1227 +;1227: cy = cos(angle); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRGP4 $304 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 1228 +;1228: angle = angles[PITCH] * (M_PI*2 / 360); +ADDRLP4 0 +CNSTF4 1016003125 +ADDRFP4 0 +INDIRP4 +INDIRF4 +MULF4 +ASGNF4 +line 1229 +;1229: sp = sin(angle); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 12 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRGP4 $300 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 1230 +;1230: cp = cos(angle); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 16 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRGP4 $303 +ADDRLP4 16 +INDIRF4 +ASGNF4 +line 1231 +;1231: angle = angles[ROLL] * (M_PI*2 / 360); +ADDRLP4 0 +CNSTF4 1016003125 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 1232 +;1232: sr = sin(angle); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 20 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRGP4 $299 +ADDRLP4 20 +INDIRF4 +ASGNF4 +line 1233 +;1233: cr = cos(angle); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRGP4 $302 +ADDRLP4 24 +INDIRF4 +ASGNF4 +line 1235 +;1234: +;1235: if (forward) +ADDRFP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $305 +line 1236 +;1236: { +line 1237 +;1237: forward[0] = cp*cy; +ADDRFP4 4 +INDIRP4 +ADDRGP4 $303 +INDIRF4 +ADDRGP4 $304 +INDIRF4 +MULF4 +ASGNF4 +line 1238 +;1238: forward[1] = cp*sy; +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 $303 +INDIRF4 +ADDRGP4 $301 +INDIRF4 +MULF4 +ASGNF4 +line 1239 +;1239: forward[2] = -sp; +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 $300 +INDIRF4 +NEGF4 +ASGNF4 +line 1240 +;1240: } +LABELV $305 +line 1241 +;1241: if (right) +ADDRFP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $307 +line 1242 +;1242: { +line 1243 +;1243: right[0] = (-1*sr*sp*cy+-1*cr*-sy); +ADDRLP4 28 +CNSTF4 3212836864 +ASGNF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 28 +INDIRF4 +ADDRGP4 $299 +INDIRF4 +MULF4 +ADDRGP4 $300 +INDIRF4 +MULF4 +ADDRGP4 $304 +INDIRF4 +MULF4 +ADDRLP4 28 +INDIRF4 +ADDRGP4 $302 +INDIRF4 +MULF4 +ADDRGP4 $301 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 1244 +;1244: right[1] = (-1*sr*sp*sy+-1*cr*cy); +ADDRLP4 32 +CNSTF4 3212836864 +ASGNF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 32 +INDIRF4 +ADDRGP4 $299 +INDIRF4 +MULF4 +ADDRGP4 $300 +INDIRF4 +MULF4 +ADDRGP4 $301 +INDIRF4 +MULF4 +ADDRLP4 32 +INDIRF4 +ADDRGP4 $302 +INDIRF4 +MULF4 +ADDRGP4 $304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1245 +;1245: right[2] = -1*sr*cp; +ADDRFP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 3212836864 +ADDRGP4 $299 +INDIRF4 +MULF4 +ADDRGP4 $303 +INDIRF4 +MULF4 +ASGNF4 +line 1246 +;1246: } +LABELV $307 +line 1247 +;1247: if (up) +ADDRFP4 12 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $309 +line 1248 +;1248: { +line 1249 +;1249: up[0] = (cr*sp*cy+-sr*-sy); +ADDRFP4 12 +INDIRP4 +ADDRGP4 $302 +INDIRF4 +ADDRGP4 $300 +INDIRF4 +MULF4 +ADDRGP4 $304 +INDIRF4 +MULF4 +ADDRGP4 $299 +INDIRF4 +NEGF4 +ADDRGP4 $301 +INDIRF4 +NEGF4 +MULF4 +ADDF4 +ASGNF4 +line 1250 +;1250: up[1] = (cr*sp*sy+-sr*cy); +ADDRFP4 12 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 $302 +INDIRF4 +ADDRGP4 $300 +INDIRF4 +MULF4 +ADDRGP4 $301 +INDIRF4 +MULF4 +ADDRGP4 $299 +INDIRF4 +NEGF4 +ADDRGP4 $304 +INDIRF4 +MULF4 +ADDF4 +ASGNF4 +line 1251 +;1251: up[2] = cr*cp; +ADDRFP4 12 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRGP4 $302 +INDIRF4 +ADDRGP4 $303 +INDIRF4 +MULF4 +ASGNF4 +line 1252 +;1252: } +LABELV $309 +line 1253 +;1253:} +LABELV $298 +endproc AngleVectors 36 4 +export PerpendicularVector +proc PerpendicularVector 36 12 +line 1259 +;1254: +;1255:/* +;1256:** assumes "src" is normalized +;1257:*/ +;1258:void PerpendicularVector( vec3_t dst, const vec3_t src ) +;1259:{ +line 1262 +;1260: int pos; +;1261: int i; +;1262: float minelem = 1.0F; +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +line 1268 +;1263: vec3_t tempvec; +;1264: +;1265: /* +;1266: ** find the smallest magnitude axially aligned vector +;1267: */ +;1268: for ( pos = 0, i = 0; i < 3; i++ ) +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 8 +ADDRLP4 24 +INDIRI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 24 +INDIRI4 +ASGNI4 +ADDRGP4 $315 +JUMPV +LABELV $312 +line 1269 +;1269: { +line 1270 +;1270: if ( fabs( src[i] ) < minelem ) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 28 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 4 +INDIRF4 +GEF4 $316 +line 1271 +;1271: { +line 1272 +;1272: pos = i; +ADDRLP4 8 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 1273 +;1273: minelem = fabs( src[i] ); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 32 +ADDRGP4 fabs +CALLF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 1274 +;1274: } +LABELV $316 +line 1275 +;1275: } +LABELV $313 +line 1268 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $315 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LTI4 $312 +line 1276 +;1276: tempvec[0] = tempvec[1] = tempvec[2] = 0.0F; +ADDRLP4 28 +CNSTF4 0 +ASGNF4 +ADDRLP4 12+8 +ADDRLP4 28 +INDIRF4 +ASGNF4 +ADDRLP4 12+4 +ADDRLP4 28 +INDIRF4 +ASGNF4 +ADDRLP4 12 +ADDRLP4 28 +INDIRF4 +ASGNF4 +line 1277 +;1277: tempvec[pos] = 1.0F; +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 12 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 1282 +;1278: +;1279: /* +;1280: ** project the point onto the plane defined by src +;1281: */ +;1282: ProjectPointOnPlane( dst, tempvec, src ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 ProjectPointOnPlane +CALLV +pop +line 1287 +;1283: +;1284: /* +;1285: ** normalize the result +;1286: */ +;1287: VectorNormalize( dst ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 VectorNormalize +CALLF4 +pop +line 1288 +;1288:} +LABELV $311 +endproc PerpendicularVector 36 12 +data +align 4 +LABELV holdrand +byte 4 2309737967 +export Rand_Init +code +proc Rand_Init 0 0 +line 1300 +;1289: +;1290:// This is the VC libc version of rand() without multiple seeds per thread or 12 levels +;1291:// of subroutine calls. +;1292:// Both calls have been designed to minimise the inherent number of float <--> int +;1293:// conversions and the additional math required to get the desired value. +;1294:// eg the typical tint = (rand() * 255) / 32768 +;1295:// becomes tint = irand(0, 255) +;1296: +;1297:static unsigned long holdrand = 0x89abcdef; +;1298: +;1299:void Rand_Init(int seed) +;1300:{ +line 1301 +;1301: holdrand = seed; +ADDRGP4 holdrand +ADDRFP4 0 +INDIRI4 +CVIU4 4 +ASGNU4 +line 1302 +;1302:} +LABELV $320 +endproc Rand_Init 0 0 +export flrand +proc flrand 16 0 +line 1307 +;1303: +;1304:// Returns a float min <= x < max (exclusive; will get max - 0.00001; but never max) +;1305: +;1306:float flrand(float min, float max) +;1307:{ +line 1310 +;1308: float result; +;1309: +;1310: assert((max - min) < 32768); +line 1312 +;1311: +;1312: holdrand = (holdrand * 214013L) + 2531011L; +ADDRLP4 4 +ADDRGP4 holdrand +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTU4 214013 +ADDRLP4 4 +INDIRP4 +INDIRU4 +MULU4 +CNSTU4 2531011 +ADDU4 +ASGNU4 +line 1313 +;1313: result = (float)(holdrand >> 17); // 0 - 32767 range +ADDRLP4 8 +ADDRGP4 holdrand +INDIRU4 +CNSTI4 17 +RSHU4 +ASGNU4 +ADDRLP4 0 +CNSTF4 1073741824 +ADDRLP4 8 +INDIRU4 +CNSTI4 1 +RSHU4 +CVUI4 4 +CVIF4 4 +MULF4 +ADDRLP4 8 +INDIRU4 +CNSTU4 1 +BANDU4 +CVUI4 4 +CVIF4 4 +ADDF4 +ASGNF4 +line 1314 +;1314: result = ((result * (max - min)) / 32768.0F) + min; +ADDRLP4 12 +ADDRFP4 0 +INDIRF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRFP4 4 +INDIRF4 +ADDRLP4 12 +INDIRF4 +SUBF4 +MULF4 +CNSTF4 1191182336 +DIVF4 +ADDRLP4 12 +INDIRF4 +ADDF4 +ASGNF4 +line 1316 +;1315: +;1316: return(result); +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $321 +endproc flrand 16 0 +export irand +proc irand 12 0 +line 1322 +;1317:} +;1318: +;1319:// Returns an integer min <= x <= max (ie inclusive) +;1320: +;1321:int irand(int min, int max) +;1322:{ +line 1325 +;1323: int result; +;1324: +;1325: assert((max - min) < 32768); +line 1327 +;1326: +;1327: max++; +ADDRFP4 4 +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1328 +;1328: holdrand = (holdrand * 214013L) + 2531011L; +ADDRLP4 4 +ADDRGP4 holdrand +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTU4 214013 +ADDRLP4 4 +INDIRP4 +INDIRU4 +MULU4 +CNSTU4 2531011 +ADDU4 +ASGNU4 +line 1329 +;1329: result = holdrand >> 17; +ADDRLP4 0 +ADDRGP4 holdrand +INDIRU4 +CNSTI4 17 +RSHU4 +CVUI4 4 +ASGNI4 +line 1330 +;1330: result = ((result * (max - min)) >> 15) + min; +ADDRLP4 8 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +SUBI4 +MULI4 +CNSTI4 15 +RSHI4 +ADDRLP4 8 +INDIRI4 +ADDI4 +ASGNI4 +line 1331 +;1331: return(result); +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $322 +endproc irand 12 0 +export powf +proc powf 8 0 +line 1335 +;1332:} +;1333: +;1334:float powf ( float x, int y ) +;1335:{ +line 1336 +;1336: float r = x; +ADDRLP4 0 +ADDRFP4 0 +INDIRF4 +ASGNF4 +line 1337 +;1337: for ( y--; y>0; y-- ) +ADDRFP4 4 +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRGP4 $327 +JUMPV +LABELV $324 +line 1338 +;1338: r = r * r; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +LABELV $325 +line 1337 +ADDRFP4 4 +ADDRFP4 4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +LABELV $327 +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +GTI4 $324 +line 1339 +;1339: return r; +ADDRLP4 0 +INDIRF4 +RETF4 +LABELV $323 +endproc powf 8 0 +import GetStringForID +import GetIDForString +import Q_irand +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import Q_acos +import colorTable +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort diff --git a/code/cgame/vm/q_shared.asm b/code/cgame/vm/q_shared.asm new file mode 100644 index 0000000..d021c56 --- /dev/null +++ b/code/cgame/vm/q_shared.asm @@ -0,0 +1,7439 @@ +export GetIDForString +code +proc GetIDForString 8 8 +file "../../game/q_shared.c" +line 14 +;1:// Copyright (C) 1999-2000 Id Software, Inc. +;2:// +;3:// q_shared.c -- stateless support routines that are included in each code dll +;4:#include "q_shared.h" +;5: +;6:/* +;7:------------------------- +;8:GetIDForString +;9:------------------------- +;10:*/ +;11: +;12: +;13:int GetIDForString ( stringID_table_t *table, const char *string ) +;14:{ +line 15 +;15: int index = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $38 +JUMPV +LABELV $37 +line 19 +;16: +;17: while ( ( table[index].name != NULL ) && +;18: ( table[index].name[0] != 0 ) ) +;19: { +line 20 +;20: if ( !Q_stricmp( table[index].name, string ) ) +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $40 +line 21 +;21: return table[index].id; +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +CNSTI4 4 +ADDP4 +INDIRI4 +RETI4 +ADDRGP4 $36 +JUMPV +LABELV $40 +line 23 +;22: +;23: index++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 24 +;24: } +LABELV $38 +line 17 +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $42 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $37 +LABELV $42 +line 26 +;25: +;26: return -1; +CNSTI4 -1 +RETI4 +LABELV $36 +endproc GetIDForString 8 8 +export GetStringForID +proc GetStringForID 8 0 +line 36 +;27:} +;28: +;29:/* +;30:------------------------- +;31:GetStringForID +;32:------------------------- +;33:*/ +;34: +;35:const char *GetStringForID( stringID_table_t *table, int id ) +;36:{ +line 37 +;37: int index = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $45 +JUMPV +LABELV $44 +line 41 +;38: +;39: while ( ( table[index].name != NULL ) && +;40: ( table[index].name[0] != 0 ) ) +;41: { +line 42 +;42: if ( table[index].id == id ) +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +NEI4 $47 +line 43 +;43: return table[index].name; +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRP4 +RETP4 +ADDRGP4 $43 +JUMPV +LABELV $47 +line 45 +;44: +;45: index++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 46 +;46: } +LABELV $45 +line 39 +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $49 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $44 +LABELV $49 +line 48 +;47: +;48: return NULL; +CNSTP4 0 +RETP4 +LABELV $43 +endproc GetStringForID 8 0 +export Com_Clamp +proc Com_Clamp 0 0 +line 52 +;49:} +;50: +;51: +;52:float Com_Clamp( float min, float max, float value ) { +line 53 +;53: if ( value < min ) { +ADDRFP4 8 +INDIRF4 +ADDRFP4 0 +INDIRF4 +GEF4 $51 +line 54 +;54: return min; +ADDRFP4 0 +INDIRF4 +RETF4 +ADDRGP4 $50 +JUMPV +LABELV $51 +line 56 +;55: } +;56: if ( value > max ) { +ADDRFP4 8 +INDIRF4 +ADDRFP4 4 +INDIRF4 +LEF4 $53 +line 57 +;57: return max; +ADDRFP4 4 +INDIRF4 +RETF4 +ADDRGP4 $50 +JUMPV +LABELV $53 +line 59 +;58: } +;59: return value; +ADDRFP4 8 +INDIRF4 +RETF4 +LABELV $50 +endproc Com_Clamp 0 0 +export Q_stristr +proc Q_stristr 36 12 +line 63 +;60:} +;61: +;62://cm ClanTag Check +;63:char *Q_stristr(const char *s, const char *find) { +line 67 +;64: char c, sc; +;65: size_t len; +;66: +;67: if ((c = *find++) != 0) +ADDRLP4 8 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 4 +ADDRLP4 8 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +INDIRI1 +ASGNI1 +ADDRLP4 1 +ADDRLP4 12 +INDIRI1 +ASGNI1 +ADDRLP4 12 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $56 +line 68 +;68: { +line 69 +;69: if (c >= 'a' && c <= 'z') +ADDRLP4 16 +ADDRLP4 1 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 97 +LTI4 $58 +ADDRLP4 16 +INDIRI4 +CNSTI4 122 +GTI4 $58 +line 70 +;70: { +line 71 +;71: c -= ('a' - 'A'); +ADDRLP4 1 +ADDRLP4 1 +INDIRI1 +CVII4 1 +CNSTI4 32 +SUBI4 +CVII1 4 +ASGNI1 +line 72 +;72: } +LABELV $58 +line 73 +;73: len = strlen(find); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +LABELV $60 +line 75 +;74: do +;75: { +LABELV $63 +line 77 +;76: do +;77: { +line 78 +;78: if ((sc = *s++) == 0) +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 24 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 24 +INDIRP4 +INDIRI1 +ASGNI1 +ADDRLP4 0 +ADDRLP4 28 +INDIRI1 +ASGNI1 +ADDRLP4 28 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $66 +line 79 +;79: return NULL; +CNSTP4 0 +RETP4 +ADDRGP4 $55 +JUMPV +LABELV $66 +line 80 +;80: if (sc >= 'a' && sc <= 'z') +ADDRLP4 32 +ADDRLP4 0 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 97 +LTI4 $68 +ADDRLP4 32 +INDIRI4 +CNSTI4 122 +GTI4 $68 +line 81 +;81: { +line 82 +;82: sc -= ('a' - 'A'); +ADDRLP4 0 +ADDRLP4 0 +INDIRI1 +CVII4 1 +CNSTI4 32 +SUBI4 +CVII1 4 +ASGNI1 +line 83 +;83: } +LABELV $68 +line 84 +;84: } while (sc != c); +LABELV $64 +ADDRLP4 0 +INDIRI1 +CVII4 1 +ADDRLP4 1 +INDIRI1 +CVII4 1 +NEI4 $63 +line 85 +;85: } while (Q_stricmpn(s, find, len) != 0); +LABELV $61 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 Q_stricmpn +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +NEI4 $60 +line 86 +;86: s--; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 -1 +ADDP4 +ASGNP4 +line 87 +;87: } +LABELV $56 +line 88 +;88: return (char *)s; +ADDRFP4 0 +INDIRP4 +RETP4 +LABELV $55 +endproc Q_stristr 36 12 +export COM_SkipPath +proc COM_SkipPath 4 0 +line 98 +;89:} +;90: +;91: +;92:/* +;93:============ +;94:COM_SkipPath +;95:============ +;96:*/ +;97:char *COM_SkipPath (char *pathname) +;98:{ +line 101 +;99: char *last; +;100: +;101: last = pathname; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $72 +JUMPV +LABELV $71 +line 103 +;102: while (*pathname) +;103: { +line 104 +;104: if (*pathname=='/') +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 47 +NEI4 $74 +line 105 +;105: last = pathname+1; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +LABELV $74 +line 106 +;106: pathname++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 107 +;107: } +LABELV $72 +line 102 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $71 +line 108 +;108: return last; +ADDRLP4 0 +INDIRP4 +RETP4 +LABELV $70 +endproc COM_SkipPath 4 0 +export COM_StripExtension +proc COM_StripExtension 12 0 +line 116 +;109:} +;110: +;111:/* +;112:============ +;113:COM_StripExtension +;114:============ +;115:*/ +;116:void COM_StripExtension( const char *in, char *out ) { +ADDRGP4 $78 +JUMPV +LABELV $77 +line 117 +;117: while ( *in && *in != '.' ) { +line 118 +;118: *out++ = *in++; +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +ADDRFP4 4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 4 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI1 +ASGNI1 +line 119 +;119: } +LABELV $78 +line 117 +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $80 +ADDRLP4 0 +INDIRI4 +CNSTI4 46 +NEI4 $77 +LABELV $80 +line 120 +;120: *out = 0; +ADDRFP4 4 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 121 +;121:} +LABELV $76 +endproc COM_StripExtension 12 0 +export COM_DefaultExtension +proc COM_DefaultExtension 76 20 +line 129 +;122: +;123: +;124:/* +;125:================== +;126:COM_DefaultExtension +;127:================== +;128:*/ +;129:void COM_DefaultExtension (char *path, int maxSize, const char *extension ) { +line 137 +;130: char oldPath[MAX_QPATH]; +;131: char *src; +;132: +;133:// +;134:// if path doesn't have a .EXT, append extension +;135:// (extension should include the .) +;136:// +;137: src = path + strlen(path) - 1; +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 68 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 68 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +CNSTI4 -1 +ADDP4 +ASGNP4 +ADDRGP4 $83 +JUMPV +LABELV $82 +line 139 +;138: +;139: while (*src != '/' && src != path) { +line 140 +;140: if ( *src == '.' ) { +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 46 +NEI4 $85 +line 141 +;141: return; // it has an extension +ADDRGP4 $81 +JUMPV +LABELV $85 +line 143 +;142: } +;143: src--; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 -1 +ADDP4 +ASGNP4 +line 144 +;144: } +LABELV $83 +line 139 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 47 +EQI4 $87 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +NEU4 $82 +LABELV $87 +line 146 +;145: +;146: Q_strncpyz( oldPath, path, sizeof( oldPath ) ); +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 64 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 147 +;147: Com_sprintf( path, maxSize, "%s%s", oldPath, extension ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 $88 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 148 +;148:} +LABELV $81 +endproc COM_DefaultExtension 76 20 +export ShortSwap +proc ShortSwap 2 0 +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +CVII2 4 +ASGNI2 +line 180 +;149: +;150:/* +;151:============================================================================ +;152: +;153: BYTE ORDER FUNCTIONS +;154: +;155:============================================================================ +;156:*/ +;157:/* +;158:// can't just use function pointers, or dll linkage can +;159:// mess up when qcommon is included in multiple places +;160:static short (*_BigShort) (short l); +;161:static short (*_LittleShort) (short l); +;162:static int (*_BigLong) (int l); +;163:static int (*_LittleLong) (int l); +;164:static qint64 (*_BigLong64) (qint64 l); +;165:static qint64 (*_LittleLong64) (qint64 l); +;166:static float (*_BigFloat) (const float *l); +;167:static float (*_LittleFloat) (const float *l); +;168: +;169:short BigShort(short l){return _BigShort(l);} +;170:short LittleShort(short l) {return _LittleShort(l);} +;171:int BigLong (int l) {return _BigLong(l);} +;172:int LittleLong (int l) {return _LittleLong(l);} +;173:qint64 BigLong64 (qint64 l) {return _BigLong64(l);} +;174:qint64 LittleLong64 (qint64 l) {return _LittleLong64(l);} +;175:float BigFloat (const float *l) {return _BigFloat(l);} +;176:float LittleFloat (const float *l) {return _LittleFloat(l);} +;177:*/ +;178: +;179:short ShortSwap (short l) +;180:{ +line 183 +;181: byte b1,b2; +;182: +;183: b1 = l&255; +ADDRLP4 0 +ADDRFP4 0 +INDIRI2 +CVII4 2 +CNSTI4 255 +BANDI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 184 +;184: b2 = (l>>8)&255; +ADDRLP4 1 +ADDRFP4 0 +INDIRI2 +CVII4 2 +CNSTI4 8 +RSHI4 +CNSTI4 255 +BANDI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 186 +;185: +;186: return (b1<<8) + b2; +ADDRLP4 0 +INDIRU1 +CVUI4 1 +CNSTI4 8 +LSHI4 +ADDRLP4 1 +INDIRU1 +CVUI4 1 +ADDI4 +CVII2 4 +CVII4 2 +RETI4 +LABELV $89 +endproc ShortSwap 2 0 +export ShortNoSwap +proc ShortNoSwap 0 0 +ADDRFP4 0 +ADDRFP4 0 +INDIRI4 +CVII2 4 +ASGNI2 +line 190 +;187:} +;188: +;189:short ShortNoSwap (short l) +;190:{ +line 191 +;191: return l; +ADDRFP4 0 +INDIRI2 +CVII4 2 +RETI4 +LABELV $90 +endproc ShortNoSwap 0 0 +export LongSwap +proc LongSwap 4 0 +line 195 +;192:} +;193: +;194:int LongSwap (int l) +;195:{ +line 198 +;196: byte b1,b2,b3,b4; +;197: +;198: b1 = l&255; +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +CNSTI4 255 +BANDI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 199 +;199: b2 = (l>>8)&255; +ADDRLP4 1 +ADDRFP4 0 +INDIRI4 +CNSTI4 8 +RSHI4 +CNSTI4 255 +BANDI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 200 +;200: b3 = (l>>16)&255; +ADDRLP4 2 +ADDRFP4 0 +INDIRI4 +CNSTI4 16 +RSHI4 +CNSTI4 255 +BANDI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 201 +;201: b4 = (l>>24)&255; +ADDRLP4 3 +ADDRFP4 0 +INDIRI4 +CNSTI4 24 +RSHI4 +CNSTI4 255 +BANDI4 +CVIU4 4 +CVUU1 4 +ASGNU1 +line 203 +;202: +;203: return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4; +ADDRLP4 0 +INDIRU1 +CVUI4 1 +CNSTI4 24 +LSHI4 +ADDRLP4 1 +INDIRU1 +CVUI4 1 +CNSTI4 16 +LSHI4 +ADDI4 +ADDRLP4 2 +INDIRU1 +CVUI4 1 +CNSTI4 8 +LSHI4 +ADDI4 +ADDRLP4 3 +INDIRU1 +CVUI4 1 +ADDI4 +RETI4 +LABELV $91 +endproc LongSwap 4 0 +export LongNoSwap +proc LongNoSwap 0 0 +line 207 +;204:} +;205: +;206:int LongNoSwap (int l) +;207:{ +line 208 +;208: return l; +ADDRFP4 0 +INDIRI4 +RETI4 +LABELV $92 +endproc LongNoSwap 0 0 +export Long64Swap +proc Long64Swap 8 0 +line 212 +;209:} +;210: +;211:qint64 Long64Swap (qint64 ll) +;212:{ +line 215 +;213: qint64 result; +;214: +;215: result.b0 = ll.b7; +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +CNSTI4 7 +ADDP4 +INDIRU1 +ASGNU1 +line 216 +;216: result.b1 = ll.b6; +ADDRLP4 0+1 +ADDRFP4 4 +INDIRP4 +CNSTI4 6 +ADDP4 +INDIRU1 +ASGNU1 +line 217 +;217: result.b2 = ll.b5; +ADDRLP4 0+2 +ADDRFP4 4 +INDIRP4 +CNSTI4 5 +ADDP4 +INDIRU1 +ASGNU1 +line 218 +;218: result.b3 = ll.b4; +ADDRLP4 0+3 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRU1 +ASGNU1 +line 219 +;219: result.b4 = ll.b3; +ADDRLP4 0+4 +ADDRFP4 4 +INDIRP4 +CNSTI4 3 +ADDP4 +INDIRU1 +ASGNU1 +line 220 +;220: result.b5 = ll.b2; +ADDRLP4 0+5 +ADDRFP4 4 +INDIRP4 +CNSTI4 2 +ADDP4 +INDIRU1 +ASGNU1 +line 221 +;221: result.b6 = ll.b1; +ADDRLP4 0+6 +ADDRFP4 4 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRU1 +ASGNU1 +line 222 +;222: result.b7 = ll.b0; +ADDRLP4 0+7 +ADDRFP4 4 +INDIRP4 +INDIRU1 +ASGNU1 +line 224 +;223: +;224: return result; +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRB +ASGNB 8 +LABELV $93 +endproc Long64Swap 8 0 +export Long64NoSwap +proc Long64NoSwap 0 0 +line 228 +;225:} +;226: +;227:qint64 Long64NoSwap (qint64 ll) +;228:{ +line 229 +;229: return ll; +ADDRFP4 0 +INDIRP4 +ADDRFP4 4 +INDIRP4 +INDIRB +ASGNB 8 +LABELV $102 +endproc Long64NoSwap 0 0 +export FloatSwap +proc FloatSwap 12 4 +line 237 +;230:} +;231: +;232:typedef union { +;233: float f; +;234: unsigned int i; +;235:} _FloatByteUnion; +;236: +;237:float FloatSwap (const float *f) { +line 241 +;238: const _FloatByteUnion *in; +;239: _FloatByteUnion out; +;240: +;241: in = (_FloatByteUnion *)f; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 242 +;242: out.i = LongSwap(in->i); +ADDRLP4 0 +INDIRP4 +INDIRU4 +CVUI4 4 +ARGI4 +ADDRLP4 8 +ADDRGP4 LongSwap +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 8 +INDIRI4 +CVIU4 4 +ASGNU4 +line 244 +;243: +;244: return out.f; +ADDRLP4 4 +INDIRF4 +RETF4 +LABELV $105 +endproc FloatSwap 12 4 +export FloatNoSwap +proc FloatNoSwap 0 0 +line 248 +;245:} +;246: +;247:float FloatNoSwap (const float *f) +;248:{ +line 249 +;249: return *f; +ADDRFP4 0 +INDIRP4 +INDIRF4 +RETF4 +LABELV $106 +endproc FloatNoSwap 0 0 +export COM_BeginParseSession +proc COM_BeginParseSession 0 16 +line 302 +;250:} +;251: +;252:/* +;253:================ +;254:Swap_Init +;255:================ +;256:*/ +;257:/* +;258:void Swap_Init (void) +;259:{ +;260: byte swaptest[2] = {1,0}; +;261: +;262:// set the byte swapping variables in a portable manner +;263: if ( *(short *)swaptest == 1) +;264: { +;265: _BigShort = ShortSwap; +;266: _LittleShort = ShortNoSwap; +;267: _BigLong = LongSwap; +;268: _LittleLong = LongNoSwap; +;269: _BigLong64 = Long64Swap; +;270: _LittleLong64 = Long64NoSwap; +;271: _BigFloat = FloatSwap; +;272: _LittleFloat = FloatNoSwap; +;273: } +;274: else +;275: { +;276: _BigShort = ShortNoSwap; +;277: _LittleShort = ShortSwap; +;278: _BigLong = LongNoSwap; +;279: _LittleLong = LongSwap; +;280: _BigLong64 = Long64NoSwap; +;281: _LittleLong64 = Long64Swap; +;282: _BigFloat = FloatNoSwap; +;283: _LittleFloat = FloatSwap; +;284: } +;285: +;286:} +;287:*/ +;288: +;289:/* +;290:============================================================================ +;291: +;292:PARSING +;293: +;294:============================================================================ +;295:*/ +;296: +;297:static char com_token[MAX_TOKEN_CHARS]; +;298:static char com_parsename[MAX_TOKEN_CHARS]; +;299:static int com_lines; +;300: +;301:void COM_BeginParseSession( const char *name ) +;302:{ +line 303 +;303: com_lines = 0; +ADDRGP4 com_lines +CNSTI4 0 +ASGNI4 +line 304 +;304: Com_sprintf(com_parsename, sizeof(com_parsename), "%s", name); +ADDRGP4 com_parsename +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $108 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 305 +;305:} +LABELV $107 +endproc COM_BeginParseSession 0 16 +export COM_GetCurrentParseLine +proc COM_GetCurrentParseLine 0 0 +line 308 +;306: +;307:int COM_GetCurrentParseLine( void ) +;308:{ +line 309 +;309: return com_lines; +ADDRGP4 com_lines +INDIRI4 +RETI4 +LABELV $109 +endproc COM_GetCurrentParseLine 0 0 +export COM_Parse +proc COM_Parse 4 8 +line 313 +;310:} +;311: +;312:char *COM_Parse( const char **data_p ) +;313:{ +line 314 +;314: return COM_ParseExt( data_p, qtrue ); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 0 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +RETP4 +LABELV $110 +endproc COM_Parse 4 8 +bss +align 1 +LABELV $112 +skip 4096 +export COM_ParseError +code +proc COM_ParseError 4 16 +line 318 +;315:} +;316: +;317:void COM_ParseError( char *format, ... ) +;318:{ +line 322 +;319: va_list argptr; +;320: static char string[4096]; +;321: +;322: va_start (argptr, format); +ADDRLP4 0 +ADDRFP4 0+4 +ASGNP4 +line 323 +;323: vsprintf (string, format, argptr); +ADDRGP4 $112 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 vsprintf +CALLI4 +pop +line 324 +;324: va_end (argptr); +ADDRLP4 0 +CNSTP4 0 +ASGNP4 +line 326 +;325: +;326: Com_Printf("ERROR: %s, line %d: %s\n", com_parsename, com_lines, string); +ADDRGP4 $114 +ARGP4 +ADDRGP4 com_parsename +ARGP4 +ADDRGP4 com_lines +INDIRI4 +ARGI4 +ADDRGP4 $112 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 327 +;327:} +LABELV $111 +endproc COM_ParseError 4 16 +bss +align 1 +LABELV $116 +skip 4096 +export COM_ParseWarning +code +proc COM_ParseWarning 4 16 +line 330 +;328: +;329:void COM_ParseWarning( char *format, ... ) +;330:{ +line 334 +;331: va_list argptr; +;332: static char string[4096]; +;333: +;334: va_start (argptr, format); +ADDRLP4 0 +ADDRFP4 0+4 +ASGNP4 +line 335 +;335: vsprintf (string, format, argptr); +ADDRGP4 $116 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 vsprintf +CALLI4 +pop +line 336 +;336: va_end (argptr); +ADDRLP4 0 +CNSTP4 0 +ASGNP4 +line 338 +;337: +;338: Com_Printf("WARNING: %s, line %d: %s\n", com_parsename, com_lines, string); +ADDRGP4 $118 +ARGP4 +ADDRGP4 com_parsename +ARGP4 +ADDRGP4 com_lines +INDIRI4 +ARGI4 +ADDRGP4 $116 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 339 +;339:} +LABELV $115 +endproc COM_ParseWarning 4 16 +export SkipWhitespace +proc SkipWhitespace 8 0 +line 353 +;340: +;341:/* +;342:============== +;343:COM_Parse +;344: +;345:Parse a token out of a string +;346:Will never return NULL, just empty strings +;347: +;348:If "allowLineBreaks" is qtrue then an empty +;349:string will be returned if the next token is +;350:a newline. +;351:============== +;352:*/ +;353:const char *SkipWhitespace( const char *data, qboolean *hasNewLines ) { +ADDRGP4 $121 +JUMPV +LABELV $120 +line 356 +;354: int c; +;355: +;356: while( (c = *data) <= ' ') { +line 357 +;357: if( !c ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $123 +line 358 +;358: return NULL; +CNSTP4 0 +RETP4 +ADDRGP4 $119 +JUMPV +LABELV $123 +line 360 +;359: } +;360: if( c == '\n' ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +NEI4 $125 +line 361 +;361: com_lines++; +ADDRLP4 4 +ADDRGP4 com_lines +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 362 +;362: *hasNewLines = qtrue; +ADDRFP4 4 +INDIRP4 +CNSTI4 1 +ASGNI4 +line 363 +;363: } +LABELV $125 +line 364 +;364: data++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 365 +;365: } +LABELV $121 +line 356 +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 32 +LEI4 $120 +line 367 +;366: +;367: return data; +ADDRFP4 0 +INDIRP4 +RETP4 +LABELV $119 +endproc SkipWhitespace 8 0 +export COM_Compress +proc COM_Compress 48 0 +line 370 +;368:} +;369: +;370:int COM_Compress( char *data_p ) { +line 373 +;371: char *in, *out; +;372: int c; +;373: qboolean newline = qfalse, whitespace = qfalse; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +line 375 +;374: +;375: in = out = data_p; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 20 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 20 +INDIRP4 +ASGNP4 +line 376 +;376: if (in) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $128 +ADDRGP4 $131 +JUMPV +LABELV $130 +line 377 +;377: while ((c = *in) != 0) { +line 379 +;378: // skip double slash comments +;379: if ( c == '/' && in[1] == '/' ) { +ADDRLP4 24 +CNSTI4 47 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $133 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 24 +INDIRI4 +NEI4 $133 +ADDRGP4 $136 +JUMPV +LABELV $135 +line 380 +;380: while (*in && *in != '\n') { +line 381 +;381: in++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 382 +;382: } +LABELV $136 +line 380 +ADDRLP4 28 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +EQI4 $138 +ADDRLP4 28 +INDIRI4 +CNSTI4 10 +NEI4 $135 +LABELV $138 +line 384 +;383: // skip /* */ comments +;384: } else if ( c == '/' && in[1] == '*' ) { +ADDRGP4 $134 +JUMPV +LABELV $133 +ADDRLP4 4 +INDIRI4 +CNSTI4 47 +NEI4 $139 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 42 +NEI4 $139 +ADDRGP4 $142 +JUMPV +LABELV $141 +line 386 +;385: while ( *in && ( *in != '*' || in[1] != '/' ) ) +;386: in++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +LABELV $142 +line 385 +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $144 +ADDRLP4 32 +INDIRI4 +CNSTI4 42 +NEI4 $141 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 47 +NEI4 $141 +LABELV $144 +line 387 +;387: if ( *in ) +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $140 +line 388 +;388: in += 2; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 2 +ADDP4 +ASGNP4 +line 390 +;389: // record when we hit a newline +;390: } else if ( c == '\n' || c == '\r' ) { +ADDRGP4 $140 +JUMPV +LABELV $139 +ADDRLP4 4 +INDIRI4 +CNSTI4 10 +EQI4 $149 +ADDRLP4 4 +INDIRI4 +CNSTI4 13 +NEI4 $147 +LABELV $149 +line 391 +;391: newline = qtrue; +ADDRLP4 12 +CNSTI4 1 +ASGNI4 +line 392 +;392: in++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 394 +;393: // record when we hit whitespace +;394: } else if ( c == ' ' || c == '\t') { +ADDRGP4 $148 +JUMPV +LABELV $147 +ADDRLP4 4 +INDIRI4 +CNSTI4 32 +EQI4 $152 +ADDRLP4 4 +INDIRI4 +CNSTI4 9 +NEI4 $150 +LABELV $152 +line 395 +;395: whitespace = qtrue; +ADDRLP4 16 +CNSTI4 1 +ASGNI4 +line 396 +;396: in++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 398 +;397: // an actual token +;398: } else { +ADDRGP4 $151 +JUMPV +LABELV $150 +line 400 +;399: // if we have a pending newline, emit it (and it counts as whitespace) +;400: if (newline) { +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $153 +line 401 +;401: *out++ = '\n'; +ADDRLP4 36 +ADDRLP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 36 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTI1 10 +ASGNI1 +line 402 +;402: newline = qfalse; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 403 +;403: whitespace = qfalse; +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +line 404 +;404: } if (whitespace) { +LABELV $153 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $155 +line 405 +;405: *out++ = ' '; +ADDRLP4 36 +ADDRLP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 36 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTI1 32 +ASGNI1 +line 406 +;406: whitespace = qfalse; +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +line 407 +;407: } +LABELV $155 +line 410 +;408: +;409: // copy quoted strings unmolested +;410: if (c == '"') { +ADDRLP4 4 +INDIRI4 +CNSTI4 34 +NEI4 $157 +line 411 +;411: *out++ = c; +ADDRLP4 36 +ADDRLP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 36 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ADDRLP4 4 +INDIRI4 +CVII1 4 +ASGNI1 +line 412 +;412: in++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRGP4 $160 +JUMPV +LABELV $159 +line 413 +;413: while (1) { +line 414 +;414: c = *in; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 415 +;415: if (c && c != '"') { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $161 +ADDRLP4 4 +INDIRI4 +CNSTI4 34 +EQI4 $161 +line 416 +;416: *out++ = c; +ADDRLP4 44 +ADDRLP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 44 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 4 +INDIRI4 +CVII1 4 +ASGNI1 +line 417 +;417: in++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 418 +;418: } else { +line 419 +;419: break; +LABELV $163 +line 421 +;420: } +;421: } +LABELV $160 +line 413 +ADDRGP4 $159 +JUMPV +LABELV $161 +line 422 +;422: if (c == '"') { +ADDRLP4 4 +INDIRI4 +CNSTI4 34 +NEI4 $158 +line 423 +;423: *out++ = c; +ADDRLP4 40 +ADDRLP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 40 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 4 +INDIRI4 +CVII1 4 +ASGNI1 +line 424 +;424: in++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 425 +;425: } +line 426 +;426: } else { +ADDRGP4 $158 +JUMPV +LABELV $157 +line 427 +;427: *out = c; +ADDRLP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +CVII1 4 +ASGNI1 +line 428 +;428: out++; +ADDRLP4 8 +ADDRLP4 8 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 429 +;429: in++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 430 +;430: } +LABELV $158 +line 431 +;431: } +LABELV $151 +LABELV $148 +LABELV $140 +LABELV $134 +line 432 +;432: } +LABELV $131 +line 377 +ADDRLP4 24 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 4 +ADDRLP4 24 +INDIRI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +NEI4 $130 +line 433 +;433: } +LABELV $128 +line 434 +;434: *out = 0; +ADDRLP4 8 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 435 +;435: return out - data_p; +ADDRLP4 8 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +RETI4 +LABELV $127 +endproc COM_Compress 48 0 +export COM_ParseExt +proc COM_ParseExt 36 8 +line 439 +;436:} +;437: +;438:char *COM_ParseExt( const char **data_p, qboolean allowLineBreaks ) +;439:{ +line 440 +;440: int c = 0, len; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 441 +;441: qboolean hasNewLines = qfalse; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 444 +;442: const char *data; +;443: +;444: data = *data_p; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 445 +;445: len = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 446 +;446: com_token[0] = 0; +ADDRGP4 com_token +CNSTI1 0 +ASGNI1 +line 449 +;447: +;448: // make sure incoming data is valid +;449: if ( !data ) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $170 +line 450 +;450: { +line 451 +;451: *data_p = NULL; +ADDRFP4 0 +INDIRP4 +CNSTP4 0 +ASGNP4 +line 452 +;452: return com_token; +ADDRGP4 com_token +RETP4 +ADDRGP4 $166 +JUMPV +LABELV $169 +line 456 +;453: } +;454: +;455: while ( 1 ) +;456: { +line 458 +;457: // skip whitespace +;458: data = SkipWhitespace( data, &hasNewLines ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 16 +ADDRGP4 SkipWhitespace +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 459 +;459: if ( !data ) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $172 +line 460 +;460: { +line 461 +;461: *data_p = NULL; +ADDRFP4 0 +INDIRP4 +CNSTP4 0 +ASGNP4 +line 462 +;462: return com_token; +ADDRGP4 com_token +RETP4 +ADDRGP4 $166 +JUMPV +LABELV $172 +line 464 +;463: } +;464: if ( hasNewLines && !allowLineBreaks ) +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 20 +INDIRI4 +EQI4 $174 +ADDRFP4 4 +INDIRI4 +ADDRLP4 20 +INDIRI4 +NEI4 $174 +line 465 +;465: { +line 466 +;466: *data_p = data; +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 467 +;467: return com_token; +ADDRGP4 com_token +RETP4 +ADDRGP4 $166 +JUMPV +LABELV $174 +line 470 +;468: } +;469: +;470: c = *data; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 473 +;471: +;472: // skip double slash comments +;473: if ( c == '/' && data[1] == '/' ) +ADDRLP4 24 +CNSTI4 47 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +NEI4 $176 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 24 +INDIRI4 +NEI4 $176 +line 474 +;474: { +line 475 +;475: data += 2; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 2 +ADDP4 +ASGNP4 +ADDRGP4 $179 +JUMPV +LABELV $178 +line 476 +;476: while (*data && *data != '\n') { +line 477 +;477: data++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 478 +;478: } +LABELV $179 +line 476 +ADDRLP4 28 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +EQI4 $181 +ADDRLP4 28 +INDIRI4 +CNSTI4 10 +NEI4 $178 +LABELV $181 +line 479 +;479: } +ADDRGP4 $177 +JUMPV +LABELV $176 +line 481 +;480: // skip /* */ comments +;481: else if ( c=='/' && data[1] == '*' ) +ADDRLP4 4 +INDIRI4 +CNSTI4 47 +NEI4 $171 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 42 +NEI4 $171 +line 482 +;482: { +line 483 +;483: data += 2; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 2 +ADDP4 +ASGNP4 +ADDRGP4 $185 +JUMPV +LABELV $184 +line 485 +;484: while ( *data && ( *data != '*' || data[1] != '/' ) ) +;485: { +line 486 +;486: data++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 487 +;487: } +LABELV $185 +line 484 +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $187 +ADDRLP4 32 +INDIRI4 +CNSTI4 42 +NEI4 $184 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 47 +NEI4 $184 +LABELV $187 +line 488 +;488: if ( *data ) +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $183 +line 489 +;489: { +line 490 +;490: data += 2; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 2 +ADDP4 +ASGNP4 +line 491 +;491: } +line 492 +;492: } +line 494 +;493: else +;494: { +line 495 +;495: break; +LABELV $183 +LABELV $177 +line 497 +;496: } +;497: } +LABELV $170 +line 455 +ADDRGP4 $169 +JUMPV +LABELV $171 +line 500 +;498: +;499: // handle quoted strings +;500: if (c == '\"') +ADDRLP4 4 +INDIRI4 +CNSTI4 34 +NEI4 $190 +line 501 +;501: { +line 502 +;502: data++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRGP4 $193 +JUMPV +LABELV $192 +line 504 +;503: while (1) +;504: { +line 505 +;505: c = *data++; +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 16 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 506 +;506: if (c=='\"' || !c) +ADDRLP4 4 +INDIRI4 +CNSTI4 34 +EQI4 $197 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $195 +LABELV $197 +line 507 +;507: { +line 508 +;508: com_token[len] = 0; +ADDRLP4 8 +INDIRI4 +ADDRGP4 com_token +ADDP4 +CNSTI1 0 +ASGNI1 +line 509 +;509: *data_p = ( char * ) data; +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 510 +;510: return com_token; +ADDRGP4 com_token +RETP4 +ADDRGP4 $166 +JUMPV +LABELV $195 +line 512 +;511: } +;512: if (len < MAX_TOKEN_CHARS) +ADDRLP4 8 +INDIRI4 +CNSTI4 1024 +GEI4 $198 +line 513 +;513: { +line 514 +;514: com_token[len] = c; +ADDRLP4 8 +INDIRI4 +ADDRGP4 com_token +ADDP4 +ADDRLP4 4 +INDIRI4 +CVII1 4 +ASGNI1 +line 515 +;515: len++; +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 516 +;516: } +LABELV $198 +line 517 +;517: } +LABELV $193 +line 503 +ADDRGP4 $192 +JUMPV +line 518 +;518: } +LABELV $190 +LABELV $200 +line 522 +;519: +;520: // parse a regular word +;521: do +;522: { +line 523 +;523: if (len < MAX_TOKEN_CHARS) +ADDRLP4 8 +INDIRI4 +CNSTI4 1024 +GEI4 $203 +line 524 +;524: { +line 525 +;525: com_token[len] = c; +ADDRLP4 8 +INDIRI4 +ADDRGP4 com_token +ADDP4 +ADDRLP4 4 +INDIRI4 +CVII1 4 +ASGNI1 +line 526 +;526: len++; +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 527 +;527: } +LABELV $203 +line 528 +;528: data++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 529 +;529: c = *data; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 530 +;530: if ( c == '\n' ) +ADDRLP4 4 +INDIRI4 +CNSTI4 10 +NEI4 $205 +line 531 +;531: com_lines++; +ADDRLP4 16 +ADDRGP4 com_lines +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $205 +line 532 +;532: } while (c>32); +LABELV $201 +ADDRLP4 4 +INDIRI4 +CNSTI4 32 +GTI4 $200 +line 534 +;533: +;534: if (len == MAX_TOKEN_CHARS) +ADDRLP4 8 +INDIRI4 +CNSTI4 1024 +NEI4 $207 +line 535 +;535: { +line 537 +;536:// Com_Printf ("Token exceeded %i chars, discarded.\n", MAX_TOKEN_CHARS); +;537: len = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 538 +;538: } +LABELV $207 +line 539 +;539: com_token[len] = 0; +ADDRLP4 8 +INDIRI4 +ADDRGP4 com_token +ADDP4 +CNSTI1 0 +ASGNI1 +line 541 +;540: +;541: *data_p = ( char * ) data; +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 542 +;542: return com_token; +ADDRGP4 com_token +RETP4 +LABELV $166 +endproc COM_ParseExt 36 8 +export COM_ParseString +proc COM_ParseString 4 8 +line 606 +;543:} +;544: +;545: +;546:#if 0 +;547:// no longer used +;548:/* +;549:=============== +;550:COM_ParseInfos +;551:=============== +;552:*/ +;553:int COM_ParseInfos( char *buf, int max, char infos[][MAX_INFO_STRING] ) { +;554: char *token; +;555: int count; +;556: char key[MAX_TOKEN_CHARS]; +;557: +;558: count = 0; +;559: +;560: while ( 1 ) { +;561: token = COM_Parse( &buf ); +;562: if ( !token[0] ) { +;563: break; +;564: } +;565: if ( strcmp( token, "{" ) ) { +;566: Com_Printf( "Missing { in info file\n" ); +;567: break; +;568: } +;569: +;570: if ( count == max ) { +;571: Com_Printf( "Max infos exceeded\n" ); +;572: break; +;573: } +;574: +;575: infos[count][0] = 0; +;576: while ( 1 ) { +;577: token = COM_ParseExt( &buf, qtrue ); +;578: if ( !token[0] ) { +;579: Com_Printf( "Unexpected end of info file\n" ); +;580: break; +;581: } +;582: if ( !strcmp( token, "}" ) ) { +;583: break; +;584: } +;585: Q_strncpyz( key, token, sizeof( key ) ); +;586: +;587: token = COM_ParseExt( &buf, qfalse ); +;588: if ( !token[0] ) { +;589: strcpy( token, "" ); +;590: } +;591: Info_SetValueForKey( infos[count], key, token ); +;592: } +;593: count++; +;594: } +;595: +;596: return count; +;597:} +;598:#endif +;599: +;600:/* +;601:=============== +;602:COM_ParseString +;603:=============== +;604:*/ +;605:qboolean COM_ParseString( const char **data, const char **s ) +;606:{ +line 608 +;607:// *s = COM_ParseExt( data, qtrue ); +;608: *s = COM_ParseExt( data, qfalse ); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 0 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 609 +;609: if ( s[0] == 0 ) +ADDRFP4 4 +INDIRP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $210 +line 610 +;610: { +line 611 +;611: Com_Printf("unexpected EOF\n"); +ADDRGP4 $212 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 612 +;612: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $209 +JUMPV +LABELV $210 +line 614 +;613: } +;614: return qfalse; +CNSTI4 0 +RETI4 +LABELV $209 +endproc COM_ParseString 4 8 +export COM_ParseInt +proc COM_ParseInt 12 8 +line 623 +;615:} +;616: +;617:/* +;618:=============== +;619:COM_ParseInt +;620:=============== +;621:*/ +;622:qboolean COM_ParseInt( const char **data, int *i ) +;623:{ +line 626 +;624: const char *token; +;625: +;626: token = COM_ParseExt( data, qfalse ); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 4 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 627 +;627: if ( token[0] == 0 ) +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $214 +line 628 +;628: { +line 629 +;629: Com_Printf( "unexpected EOF\n" ); +ADDRGP4 $212 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 630 +;630: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $213 +JUMPV +LABELV $214 +line 633 +;631: } +;632: +;633: *i = atoi( token ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 634 +;634: return qfalse; +CNSTI4 0 +RETI4 +LABELV $213 +endproc COM_ParseInt 12 8 +export COM_ParseFloat +proc COM_ParseFloat 12 8 +line 643 +;635:} +;636: +;637:/* +;638:=============== +;639:COM_ParseFloat +;640:=============== +;641:*/ +;642:qboolean COM_ParseFloat( const char **data, float *f ) +;643:{ +line 646 +;644: const char *token; +;645: +;646: token = COM_ParseExt( data, qfalse ); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 4 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 647 +;647: if ( token[0] == 0 ) +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $217 +line 648 +;648: { +line 649 +;649: Com_Printf( "unexpected EOF\n" ); +ADDRGP4 $212 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 650 +;650: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $216 +JUMPV +LABELV $217 +line 653 +;651: } +;652: +;653: *f = atof( token ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 atof +CALLF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 654 +;654: return qfalse; +CNSTI4 0 +RETI4 +LABELV $216 +endproc COM_ParseFloat 12 8 +export COM_ParseVec4 +proc COM_ParseVec4 12 8 +line 663 +;655:} +;656: +;657:/* +;658:=============== +;659:COM_ParseVec4 +;660:=============== +;661:*/ +;662:qboolean COM_ParseVec4( const char **buffer, vec4_t *c) +;663:{ +line 667 +;664: int i; +;665: float f; +;666: +;667: for (i = 0; i < 4; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $220 +line 668 +;668: { +line 669 +;669: if (COM_ParseFloat(buffer, &f)) +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 COM_ParseFloat +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $224 +line 670 +;670: { +line 671 +;671: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $219 +JUMPV +LABELV $224 +line 673 +;672: } +;673: (*c)[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 674 +;674: } +LABELV $221 +line 667 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $220 +line 675 +;675: return qfalse; +CNSTI4 0 +RETI4 +LABELV $219 +endproc COM_ParseVec4 12 8 +export COM_MatchToken +proc COM_MatchToken 12 16 +line 683 +;676:} +;677: +;678:/* +;679:================== +;680:COM_MatchToken +;681:================== +;682:*/ +;683:void COM_MatchToken( const char **buf_p, char *match ) { +line 686 +;684: char *token; +;685: +;686: token = COM_Parse( buf_p ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 687 +;687: if ( strcmp( token, match ) ) { +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $227 +line 688 +;688: Com_Error( ERR_DROP, "MatchToken: %s != %s", token, match ); +CNSTI4 1 +ARGI4 +ADDRGP4 $229 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 689 +;689: } +LABELV $227 +line 690 +;690:} +LABELV $226 +endproc COM_MatchToken 12 16 +export SkipBracedSection +proc SkipBracedSection 12 8 +line 702 +;691: +;692: +;693:/* +;694:================= +;695:SkipBracedSection +;696: +;697:The next token should be an open brace. +;698:Skips until a matching close brace is found. +;699:Internal brace depths are properly skipped. +;700:================= +;701:*/ +;702:void SkipBracedSection (const char **program) { +line 706 +;703: char *token; +;704: int depth; +;705: +;706: depth = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +LABELV $231 +line 707 +;707: do { +line 708 +;708: token = COM_ParseExt( program, qtrue ); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 8 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 709 +;709: if( token[1] == 0 ) { +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $234 +line 710 +;710: if( token[0] == '{' ) { +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 123 +NEI4 $236 +line 711 +;711: depth++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 712 +;712: } +ADDRGP4 $237 +JUMPV +LABELV $236 +line 713 +;713: else if( token[0] == '}' ) { +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 125 +NEI4 $238 +line 714 +;714: depth--; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 715 +;715: } +LABELV $238 +LABELV $237 +line 716 +;716: } +LABELV $234 +line 717 +;717: } while( depth && *program ); +LABELV $232 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $240 +ADDRFP4 0 +INDIRP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $231 +LABELV $240 +line 718 +;718:} +LABELV $230 +endproc SkipBracedSection 12 8 +export SkipRestOfLine +proc SkipRestOfLine 16 0 +line 725 +;719: +;720:/* +;721:================= +;722:SkipRestOfLine +;723:================= +;724:*/ +;725:void SkipRestOfLine ( const char **data ) { +line 729 +;726: const char *p; +;727: int c; +;728: +;729: p = *data; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +ADDRGP4 $243 +JUMPV +LABELV $242 +line 730 +;730: while ( (c = *p++) != 0 ) { +line 731 +;731: if ( c == '\n' ) { +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +NEI4 $245 +line 732 +;732: com_lines++; +ADDRLP4 8 +ADDRGP4 com_lines +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 733 +;733: break; +ADDRGP4 $244 +JUMPV +LABELV $245 +line 735 +;734: } +;735: } +LABELV $243 +line 730 +ADDRLP4 8 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $242 +LABELV $244 +line 737 +;736: +;737: *data = p; +ADDRFP4 0 +INDIRP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 738 +;738:} +LABELV $241 +endproc SkipRestOfLine 16 0 +export Parse1DMatrix +proc Parse1DMatrix 16 8 +line 741 +;739: +;740: +;741:void Parse1DMatrix (const char **buf_p, int x, float *m) { +line 745 +;742: char *token; +;743: int i; +;744: +;745: COM_MatchToken( buf_p, "(" ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $248 +ARGP4 +ADDRGP4 COM_MatchToken +CALLV +pop +line 747 +;746: +;747: for (i = 0 ; i < x ; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $252 +JUMPV +LABELV $249 +line 748 +;748: token = COM_Parse(buf_p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 COM_Parse +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 749 +;749: m[i] = atof(token); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 atof +CALLF4 +ASGNF4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 750 +;750: } +LABELV $250 +line 747 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $252 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRI4 +LTI4 $249 +line 752 +;751: +;752: COM_MatchToken( buf_p, ")" ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $253 +ARGP4 +ADDRGP4 COM_MatchToken +CALLV +pop +line 753 +;753:} +LABELV $247 +endproc Parse1DMatrix 16 8 +export Parse2DMatrix +proc Parse2DMatrix 8 12 +line 755 +;754: +;755:void Parse2DMatrix (const char **buf_p, int y, int x, float *m) { +line 758 +;756: int i; +;757: +;758: COM_MatchToken( buf_p, "(" ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $248 +ARGP4 +ADDRGP4 COM_MatchToken +CALLV +pop +line 760 +;759: +;760: for (i = 0 ; i < y ; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $258 +JUMPV +LABELV $255 +line 761 +;761: Parse1DMatrix (buf_p, x, m + i * x); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +MULI4 +CNSTI4 2 +LSHI4 +ADDRFP4 12 +INDIRP4 +ADDP4 +ARGP4 +ADDRGP4 Parse1DMatrix +CALLV +pop +line 762 +;762: } +LABELV $256 +line 760 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $258 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRI4 +LTI4 $255 +line 764 +;763: +;764: COM_MatchToken( buf_p, ")" ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $253 +ARGP4 +ADDRGP4 COM_MatchToken +CALLV +pop +line 765 +;765:} +LABELV $254 +endproc Parse2DMatrix 8 12 +export Parse3DMatrix +proc Parse3DMatrix 12 16 +line 767 +;766: +;767:void Parse3DMatrix (const char **buf_p, int z, int y, int x, float *m) { +line 770 +;768: int i; +;769: +;770: COM_MatchToken( buf_p, "(" ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $248 +ARGP4 +ADDRGP4 COM_MatchToken +CALLV +pop +line 772 +;771: +;772: for (i = 0 ; i < z ; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $263 +JUMPV +LABELV $260 +line 773 +;773: Parse2DMatrix (buf_p, y, x, m + i * x*y); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRFP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +MULI4 +ADDRLP4 4 +INDIRI4 +MULI4 +CNSTI4 2 +LSHI4 +ADDRFP4 16 +INDIRP4 +ADDP4 +ARGP4 +ADDRGP4 Parse2DMatrix +CALLV +pop +line 774 +;774: } +LABELV $261 +line 772 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $263 +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRI4 +LTI4 $260 +line 776 +;775: +;776: COM_MatchToken( buf_p, ")" ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $253 +ARGP4 +ADDRGP4 COM_MatchToken +CALLV +pop +line 777 +;777:} +LABELV $259 +endproc Parse3DMatrix 12 16 +export Q_isprint +proc Q_isprint 4 0 +line 789 +;778: +;779: +;780:/* +;781:============================================================================ +;782: +;783: LIBRARY REPLACEMENT FUNCTIONS +;784: +;785:============================================================================ +;786:*/ +;787: +;788:int Q_isprint( int c ) +;789:{ +line 790 +;790: if ( c >= 0x20 && c <= 0x7E ) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +LTI4 $265 +ADDRLP4 0 +INDIRI4 +CNSTI4 126 +GTI4 $265 +line 791 +;791: return ( 1 ); +CNSTI4 1 +RETI4 +ADDRGP4 $264 +JUMPV +LABELV $265 +line 792 +;792: return ( 0 ); +CNSTI4 0 +RETI4 +LABELV $264 +endproc Q_isprint 4 0 +export Q_islower +proc Q_islower 4 0 +line 796 +;793:} +;794: +;795:int Q_islower( int c ) +;796:{ +line 797 +;797: if (c >= 'a' && c <= 'z') +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 97 +LTI4 $268 +ADDRLP4 0 +INDIRI4 +CNSTI4 122 +GTI4 $268 +line 798 +;798: return ( 1 ); +CNSTI4 1 +RETI4 +ADDRGP4 $267 +JUMPV +LABELV $268 +line 799 +;799: return ( 0 ); +CNSTI4 0 +RETI4 +LABELV $267 +endproc Q_islower 4 0 +export Q_isupper +proc Q_isupper 4 0 +line 803 +;800:} +;801: +;802:int Q_isupper( int c ) +;803:{ +line 804 +;804: if (c >= 'A' && c <= 'Z') +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 65 +LTI4 $271 +ADDRLP4 0 +INDIRI4 +CNSTI4 90 +GTI4 $271 +line 805 +;805: return ( 1 ); +CNSTI4 1 +RETI4 +ADDRGP4 $270 +JUMPV +LABELV $271 +line 806 +;806: return ( 0 ); +CNSTI4 0 +RETI4 +LABELV $270 +endproc Q_isupper 4 0 +export Q_isalpha +proc Q_isalpha 8 0 +line 810 +;807:} +;808: +;809:int Q_isalpha( int c ) +;810:{ +line 811 +;811: if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) +ADDRLP4 0 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 97 +LTI4 $277 +ADDRLP4 0 +INDIRI4 +CNSTI4 122 +LEI4 $276 +LABELV $277 +ADDRLP4 4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 65 +LTI4 $274 +ADDRLP4 4 +INDIRI4 +CNSTI4 90 +GTI4 $274 +LABELV $276 +line 812 +;812: return ( 1 ); +CNSTI4 1 +RETI4 +ADDRGP4 $273 +JUMPV +LABELV $274 +line 813 +;813: return ( 0 ); +CNSTI4 0 +RETI4 +LABELV $273 +endproc Q_isalpha 8 0 +export Q_strrchr +proc Q_strrchr 12 0 +line 817 +;814:} +;815: +;816:char* Q_strrchr( const char* string, int c ) +;817:{ +line 818 +;818: char cc = c; +ADDRLP4 4 +ADDRFP4 4 +INDIRI4 +CVII1 4 +ASGNI1 +line 820 +;819: char *s; +;820: char *sp=(char *)0; +ADDRLP4 8 +CNSTP4 0 +ASGNP4 +line 822 +;821: +;822: s = (char*)string; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $280 +JUMPV +LABELV $279 +line 825 +;823: +;824: while (*s) +;825: { +line 826 +;826: if (*s == cc) +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 4 +INDIRI1 +CVII4 1 +NEI4 $282 +line 827 +;827: sp = s; +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +ASGNP4 +LABELV $282 +line 828 +;828: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 829 +;829: } +LABELV $280 +line 824 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $279 +line 830 +;830: if (cc == 0) +ADDRLP4 4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $284 +line 831 +;831: sp = s; +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +ASGNP4 +LABELV $284 +line 833 +;832: +;833: return sp; +ADDRLP4 8 +INDIRP4 +RETP4 +LABELV $278 +endproc Q_strrchr 12 0 +export Q_strncpyz +proc Q_strncpyz 0 12 +line 843 +;834:} +;835: +;836:/* +;837:============= +;838:Q_strncpyz +;839: +;840:Safe strncpy that ensures a trailing zero +;841:============= +;842:*/ +;843:void Q_strncpyz( char *dest, const char *src, int destsize ) { +line 845 +;844: // bk001129 - also NULL dest +;845: if ( !dest ) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $287 +line 846 +;846: Com_Error( ERR_FATAL, "Q_strncpyz: NULL dest" ); +CNSTI4 0 +ARGI4 +ADDRGP4 $289 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 847 +;847: } +LABELV $287 +line 848 +;848: if ( !src ) { +ADDRFP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $290 +line 849 +;849: Com_Error( ERR_FATAL, "Q_strncpyz: NULL src" ); +CNSTI4 0 +ARGI4 +ADDRGP4 $292 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 850 +;850: } +LABELV $290 +line 851 +;851: if ( destsize < 1 ) { +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +GEI4 $293 +line 852 +;852: Com_Error(ERR_FATAL,"Q_strncpyz: destsize < 1" ); +CNSTI4 0 +ARGI4 +ADDRGP4 $295 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 853 +;853: } +LABELV $293 +line 855 +;854: +;855: strncpy( dest, src, destsize-1 ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ARGI4 +ADDRGP4 strncpy +CALLP4 +pop +line 856 +;856: dest[destsize-1] = 0; +ADDRFP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 857 +;857:} +LABELV $286 +endproc Q_strncpyz 0 12 +export Q_stricmpn +proc Q_stricmpn 32 0 +line 859 +;858: +;859:int Q_stricmpn (const char *s1, const char *s2, int n) { +line 863 +;860: int c1, c2; +;861: +;862: // bk001129 - moved in 1.17 fix not in id codebase +;863: if ( s1 == NULL ) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $297 +line 864 +;864: if ( s2 == NULL ) +ADDRFP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $299 +line 865 +;865: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $296 +JUMPV +LABELV $299 +line 867 +;866: else +;867: return -1; +CNSTI4 -1 +RETI4 +ADDRGP4 $296 +JUMPV +LABELV $297 +line 869 +;868: } +;869: else if ( s2==NULL ) +ADDRFP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $301 +line 870 +;870: return 1; +CNSTI4 1 +RETI4 +ADDRGP4 $296 +JUMPV +LABELV $301 +LABELV $303 +line 874 +;871: +;872: +;873: +;874: do { +line 875 +;875: c1 = *s1++; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 8 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 876 +;876: c2 = *s2++; +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 4 +ADDRLP4 12 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 12 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 878 +;877: +;878: if (!n--) { +ADDRLP4 16 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRFP4 8 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $306 +line 879 +;879: return 0; // strings are equal until end point +CNSTI4 0 +RETI4 +ADDRGP4 $296 +JUMPV +LABELV $306 +line 882 +;880: } +;881: +;882: if (c1 != c2) { +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $308 +line 883 +;883: if (c1 >= 'a' && c1 <= 'z') { +ADDRLP4 0 +INDIRI4 +CNSTI4 97 +LTI4 $310 +ADDRLP4 0 +INDIRI4 +CNSTI4 122 +GTI4 $310 +line 884 +;884: c1 -= ('a' - 'A'); +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 32 +SUBI4 +ASGNI4 +line 885 +;885: } +LABELV $310 +line 886 +;886: if (c2 >= 'a' && c2 <= 'z') { +ADDRLP4 4 +INDIRI4 +CNSTI4 97 +LTI4 $312 +ADDRLP4 4 +INDIRI4 +CNSTI4 122 +GTI4 $312 +line 887 +;887: c2 -= ('a' - 'A'); +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 32 +SUBI4 +ASGNI4 +line 888 +;888: } +LABELV $312 +line 889 +;889: if (c1 != c2) { +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $314 +line 890 +;890: return c1 < c2 ? -1 : 1; +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +GEI4 $317 +ADDRLP4 28 +CNSTI4 -1 +ASGNI4 +ADDRGP4 $318 +JUMPV +LABELV $317 +ADDRLP4 28 +CNSTI4 1 +ASGNI4 +LABELV $318 +ADDRLP4 28 +INDIRI4 +RETI4 +ADDRGP4 $296 +JUMPV +LABELV $314 +line 892 +;891: } +;892: } +LABELV $308 +line 893 +;893: } while (c1); +LABELV $304 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $303 +line 895 +;894: +;895: return 0; // strings are equal +CNSTI4 0 +RETI4 +LABELV $296 +endproc Q_stricmpn 32 0 +export Q_strncmp +proc Q_strncmp 24 0 +line 898 +;896:} +;897: +;898:int Q_strncmp (const char *s1, const char *s2, int n) { +LABELV $320 +line 901 +;899: int c1, c2; +;900: +;901: do { +line 902 +;902: c1 = *s1++; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 8 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 903 +;903: c2 = *s2++; +ADDRLP4 12 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRFP4 4 +ADDRLP4 12 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 12 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +line 905 +;904: +;905: if (!n--) { +ADDRLP4 16 +ADDRFP4 8 +INDIRI4 +ASGNI4 +ADDRFP4 8 +ADDRLP4 16 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $323 +line 906 +;906: return 0; // strings are equal until end point +CNSTI4 0 +RETI4 +ADDRGP4 $319 +JUMPV +LABELV $323 +line 909 +;907: } +;908: +;909: if (c1 != c2) { +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $325 +line 910 +;910: return c1 < c2 ? -1 : 1; +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +GEI4 $328 +ADDRLP4 20 +CNSTI4 -1 +ASGNI4 +ADDRGP4 $329 +JUMPV +LABELV $328 +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +LABELV $329 +ADDRLP4 20 +INDIRI4 +RETI4 +ADDRGP4 $319 +JUMPV +LABELV $325 +line 912 +;911: } +;912: } while (c1); +LABELV $321 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $320 +line 914 +;913: +;914: return 0; // strings are equal +CNSTI4 0 +RETI4 +LABELV $319 +endproc Q_strncmp 24 0 +export Q_stricmp +proc Q_stricmp 12 12 +line 917 +;915:} +;916: +;917:int Q_stricmp (const char *s1, const char *s2) { +line 918 +;918: return (s1 && s2) ? Q_stricmpn (s1, s2, 99999) : -1; +ADDRLP4 4 +CNSTU4 0 +ASGNU4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 4 +INDIRU4 +EQU4 $332 +ADDRFP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 4 +INDIRU4 +EQU4 $332 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTI4 99999 +ARGI4 +ADDRLP4 8 +ADDRGP4 Q_stricmpn +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +ASGNI4 +ADDRGP4 $333 +JUMPV +LABELV $332 +ADDRLP4 0 +CNSTI4 -1 +ASGNI4 +LABELV $333 +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $330 +endproc Q_stricmp 12 12 +export Q_strlwr +proc Q_strlwr 12 4 +line 922 +;919:} +;920: +;921: +;922:char *Q_strlwr( char *s1 ) { +line 925 +;923: char *s; +;924: +;925: s = s1; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $336 +JUMPV +LABELV $335 +line 926 +;926: while ( *s ) { +line 927 +;927: *s = tolower(*s); +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ARGI4 +ADDRLP4 8 +ADDRGP4 tolower +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +CVII1 4 +ASGNI1 +line 928 +;928: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 929 +;929: } +LABELV $336 +line 926 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $335 +line 930 +;930: return s1; +ADDRFP4 0 +INDIRP4 +RETP4 +LABELV $334 +endproc Q_strlwr 12 4 +export Q_strupr +proc Q_strupr 12 4 +line 933 +;931:} +;932: +;933:char *Q_strupr( char *s1 ) { +line 936 +;934: char *s; +;935: +;936: s = s1; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $340 +JUMPV +LABELV $339 +line 937 +;937: while ( *s ) { +line 938 +;938: *s = toupper(*s); +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ARGI4 +ADDRLP4 8 +ADDRGP4 toupper +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +CVII1 4 +ASGNI1 +line 939 +;939: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 940 +;940: } +LABELV $340 +line 937 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $339 +line 941 +;941: return s1; +ADDRFP4 0 +INDIRP4 +RETP4 +LABELV $338 +endproc Q_strupr 12 4 +export Q_strcat +proc Q_strcat 12 12 +line 946 +;942:} +;943: +;944: +;945:// never goes past bounds or leaves without a terminating 0 +;946:void Q_strcat( char *dest, int size, const char *src ) { +line 949 +;947: int l1; +;948: +;949: l1 = strlen( dest ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 950 +;950: if ( l1 >= size ) { +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRI4 +LTI4 $343 +line 951 +;951: Com_Error( ERR_FATAL, "Q_strcat: already overflowed" ); +CNSTI4 0 +ARGI4 +ADDRGP4 $345 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 952 +;952: } +LABELV $343 +line 953 +;953: Q_strncpyz( dest + l1, src, size - l1 ); +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +SUBI4 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 954 +;954:} +LABELV $342 +endproc Q_strcat 12 12 +export Q_PrintStrlen +proc Q_PrintStrlen 20 0 +line 957 +;955: +;956: +;957:int Q_PrintStrlen( const char *string ) { +line 961 +;958: int len; +;959: const char *p; +;960: +;961: if( !string ) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $347 +line 962 +;962: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $346 +JUMPV +LABELV $347 +line 965 +;963: } +;964: +;965: len = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 966 +;966: p = string; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $350 +JUMPV +LABELV $349 +line 967 +;967: while( *p ) { +line 968 +;968: if( Q_IsColorString( p ) ) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $352 +ADDRLP4 12 +CNSTI4 94 +ASGNI4 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 12 +INDIRI4 +NEI4 $352 +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $352 +ADDRLP4 16 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $352 +ADDRLP4 16 +INDIRI4 +CNSTI4 55 +GTI4 $352 +ADDRLP4 16 +INDIRI4 +CNSTI4 48 +LTI4 $352 +line 969 +;969: p += 2; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 2 +ADDP4 +ASGNP4 +line 970 +;970: continue; +ADDRGP4 $350 +JUMPV +LABELV $352 +line 972 +;971: } +;972: p++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 973 +;973: len++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 974 +;974: } +LABELV $350 +line 967 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $349 +line 976 +;975: +;976: return len; +ADDRLP4 4 +INDIRI4 +RETI4 +LABELV $346 +endproc Q_PrintStrlen 20 0 +export Q_CleanStr +proc Q_CleanStr 32 0 +line 980 +;977:} +;978: +;979: +;980:char *Q_CleanStr( char *string ) { +line 985 +;981: char* d; +;982: char* s; +;983: int c; +;984: +;985: s = string; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 986 +;986: d = string; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $356 +JUMPV +LABELV $355 +line 987 +;987: while ((c = *s) != 0 ) { +line 988 +;988: if ( Q_IsColorString( s ) ) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $358 +ADDRLP4 16 +CNSTI4 94 +ASGNI4 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 16 +INDIRI4 +NEI4 $358 +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $358 +ADDRLP4 20 +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $358 +ADDRLP4 20 +INDIRI4 +CNSTI4 55 +GTI4 $358 +ADDRLP4 20 +INDIRI4 +CNSTI4 48 +LTI4 $358 +line 989 +;989: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 990 +;990: } +ADDRGP4 $359 +JUMPV +LABELV $358 +line 991 +;991: else if ( c >= 0x20 && c <= 0x7E ) { +ADDRLP4 4 +INDIRI4 +CNSTI4 32 +LTI4 $360 +ADDRLP4 4 +INDIRI4 +CNSTI4 126 +GTI4 $360 +line 992 +;992: *d++ = c; +ADDRLP4 28 +ADDRLP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 28 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 4 +INDIRI4 +CVII1 4 +ASGNI1 +line 993 +;993: } +LABELV $360 +LABELV $359 +line 994 +;994: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 995 +;995: } +LABELV $356 +line 987 +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $355 +line 996 +;996: *d = '\0'; +ADDRLP4 8 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 998 +;997: +;998: return string; +ADDRFP4 0 +INDIRP4 +RETP4 +LABELV $354 +endproc Q_CleanStr 32 0 +export Com_sprintf +proc Com_sprintf 32012 12 +line 1002 +;999:} +;1000: +;1001: +;1002:void QDECL Com_sprintf( char *dest, int size, const char *fmt, ...) { +line 1007 +;1003: int len; +;1004: va_list argptr; +;1005: char bigbuffer[32000]; // big, but small enough to fit in PPC stack +;1006: +;1007: va_start (argptr,fmt); +ADDRLP4 4 +ADDRFP4 8+4 +ASGNP4 +line 1008 +;1008: len = vsprintf (bigbuffer,fmt,argptr); +ADDRLP4 8 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 32008 +ADDRGP4 vsprintf +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 32008 +INDIRI4 +ASGNI4 +line 1009 +;1009: va_end (argptr); +ADDRLP4 4 +CNSTP4 0 +ASGNP4 +line 1010 +;1010: if ( len >= sizeof( bigbuffer ) ) { +ADDRLP4 0 +INDIRI4 +CVIU4 4 +CNSTU4 32000 +LTU4 $364 +line 1011 +;1011: Com_Error( ERR_FATAL, "Com_sprintf: overflowed bigbuffer" ); +CNSTI4 0 +ARGI4 +ADDRGP4 $366 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 1012 +;1012: } +LABELV $364 +line 1013 +;1013: if (len >= size) { +ADDRLP4 0 +INDIRI4 +ADDRFP4 4 +INDIRI4 +LTI4 $367 +line 1014 +;1014: Com_Printf ("Com_sprintf: overflow of %i in %i\n", len, size); +ADDRGP4 $369 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 1020 +;1015:#ifdef _DEBUG +;1016: __asm { +;1017: int 3; +;1018: } +;1019:#endif +;1020: } +LABELV $367 +line 1021 +;1021: Q_strncpyz (dest, bigbuffer, size ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1022 +;1022:} +LABELV $362 +endproc Com_sprintf 32012 12 +bss +align 1 +LABELV $371 +skip 64000 +data +align 4 +LABELV $372 +byte 4 0 +export va +code +proc va 12 12 +line 1034 +;1023: +;1024: +;1025:/* +;1026:============ +;1027:va +;1028: +;1029:does a varargs printf into a temp buffer, so I don't need to have +;1030:varargs versions of all text functions. +;1031:FIXME: make this buffer size safe someday +;1032:============ +;1033:*/ +;1034:char * QDECL va( const char *format, ... ) { +line 1040 +;1035: va_list argptr; +;1036: static char string[2][32000]; // in case va is called by nested functions +;1037: static int index = 0; +;1038: char *buf; +;1039: +;1040: buf = string[index & 1]; +ADDRLP4 4 +CNSTI4 32000 +ADDRGP4 $372 +INDIRI4 +CNSTI4 1 +BANDI4 +MULI4 +ADDRGP4 $371 +ADDP4 +ASGNP4 +line 1041 +;1041: index++; +ADDRLP4 8 +ADDRGP4 $372 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1043 +;1042: +;1043: va_start (argptr, format); +ADDRLP4 0 +ADDRFP4 0+4 +ASGNP4 +line 1044 +;1044: vsprintf (buf, format,argptr); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 vsprintf +CALLI4 +pop +line 1045 +;1045: va_end (argptr); +ADDRLP4 0 +CNSTP4 0 +ASGNP4 +line 1047 +;1046: +;1047: return buf; +ADDRLP4 4 +INDIRP4 +RETP4 +LABELV $370 +endproc va 12 12 +bss +align 1 +LABELV $375 +skip 16384 +data +align 4 +LABELV $376 +byte 4 0 +export Info_ValueForKey +code +proc Info_ValueForKey 8220 8 +line 1068 +;1048:} +;1049: +;1050: +;1051:/* +;1052:===================================================================== +;1053: +;1054: INFO STRINGS +;1055: +;1056:===================================================================== +;1057:*/ +;1058: +;1059:/* +;1060:=============== +;1061:Info_ValueForKey +;1062: +;1063:Searches the string for the given +;1064:key and returns the associated value, or an empty string. +;1065:FIXME: overflow check? +;1066:=============== +;1067:*/ +;1068:char *Info_ValueForKey( const char *s, const char *key ) { +line 1075 +;1069: char pkey[BIG_INFO_KEY]; +;1070: static char value[2][BIG_INFO_VALUE]; // use two buffers so compares +;1071: // work without stomping on each other +;1072: static int valueindex = 0; +;1073: char *o; +;1074: +;1075: if ( !s || !key ) { +ADDRLP4 8196 +CNSTU4 0 +ASGNU4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 8196 +INDIRU4 +EQU4 $379 +ADDRFP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 8196 +INDIRU4 +NEU4 $377 +LABELV $379 +line 1076 +;1076: return ""; +ADDRGP4 $380 +RETP4 +ADDRGP4 $374 +JUMPV +LABELV $377 +line 1079 +;1077: } +;1078: +;1079: if ( strlen( s ) >= BIG_INFO_STRING ) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8200 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 8200 +INDIRI4 +CNSTI4 8192 +LTI4 $381 +line 1080 +;1080: Com_Error( ERR_DROP, "Info_ValueForKey: oversize infostring" ); +CNSTI4 1 +ARGI4 +ADDRGP4 $383 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 1081 +;1081: } +LABELV $381 +line 1083 +;1082: +;1083: valueindex ^= 1; +ADDRLP4 8204 +ADDRGP4 $376 +ASGNP4 +ADDRLP4 8204 +INDIRP4 +ADDRLP4 8204 +INDIRP4 +INDIRI4 +CNSTI4 1 +BXORI4 +ASGNI4 +line 1084 +;1084: if (*s == '\\') +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 92 +NEI4 $387 +line 1085 +;1085: s++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +ADDRGP4 $387 +JUMPV +LABELV $386 +line 1087 +;1086: while (1) +;1087: { +line 1088 +;1088: o = pkey; +ADDRLP4 0 +ADDRLP4 4 +ASGNP4 +ADDRGP4 $390 +JUMPV +LABELV $389 +line 1090 +;1089: while (*s != '\\') +;1090: { +line 1091 +;1091: if (!*s) +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $392 +line 1092 +;1092: return ""; +ADDRGP4 $380 +RETP4 +ADDRGP4 $374 +JUMPV +LABELV $392 +line 1093 +;1093: *o++ = *s++; +ADDRLP4 8208 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8216 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8208 +INDIRP4 +ADDRLP4 8216 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 8212 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 8212 +INDIRP4 +ADDRLP4 8216 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 8208 +INDIRP4 +ADDRLP4 8212 +INDIRP4 +INDIRI1 +ASGNI1 +line 1094 +;1094: } +LABELV $390 +line 1089 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 92 +NEI4 $389 +line 1095 +;1095: *o = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1096 +;1096: s++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 1098 +;1097: +;1098: o = value[valueindex]; +ADDRLP4 0 +ADDRGP4 $376 +INDIRI4 +CNSTI4 13 +LSHI4 +ADDRGP4 $375 +ADDP4 +ASGNP4 +ADDRGP4 $395 +JUMPV +LABELV $394 +line 1101 +;1099: +;1100: while (*s != '\\' && *s) +;1101: { +line 1102 +;1102: *o++ = *s++; +ADDRLP4 8208 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8216 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8208 +INDIRP4 +ADDRLP4 8216 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 8212 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 8212 +INDIRP4 +ADDRLP4 8216 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 8208 +INDIRP4 +ADDRLP4 8212 +INDIRP4 +INDIRI1 +ASGNI1 +line 1103 +;1103: } +LABELV $395 +line 1100 +ADDRLP4 8208 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 8208 +INDIRI4 +CNSTI4 92 +EQI4 $397 +ADDRLP4 8208 +INDIRI4 +CNSTI4 0 +NEI4 $394 +LABELV $397 +line 1104 +;1104: *o = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1106 +;1105: +;1106: if (!Q_stricmp (key, pkey) ) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8212 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 8212 +INDIRI4 +CNSTI4 0 +NEI4 $398 +line 1107 +;1107: return value[valueindex]; +ADDRGP4 $376 +INDIRI4 +CNSTI4 13 +LSHI4 +ADDRGP4 $375 +ADDP4 +RETP4 +ADDRGP4 $374 +JUMPV +LABELV $398 +line 1109 +;1108: +;1109: if (!*s) +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $400 +line 1110 +;1110: break; +ADDRGP4 $388 +JUMPV +LABELV $400 +line 1111 +;1111: s++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 1112 +;1112: } +LABELV $387 +line 1086 +ADDRGP4 $386 +JUMPV +LABELV $388 +line 1114 +;1113: +;1114: return ""; +ADDRGP4 $380 +RETP4 +LABELV $374 +endproc Info_ValueForKey 8220 8 +export Info_NextPair +proc Info_NextPair 20 0 +line 1125 +;1115:} +;1116: +;1117: +;1118:/* +;1119:=================== +;1120:Info_NextPair +;1121: +;1122:Used to itterate through all the key/value pairs in an info string +;1123:=================== +;1124:*/ +;1125:void Info_NextPair( const char **head, char *key, char *value ) { +line 1129 +;1126: char *o; +;1127: const char *s; +;1128: +;1129: s = *head; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 1131 +;1130: +;1131: if ( *s == '\\' ) { +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 92 +NEI4 $403 +line 1132 +;1132: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 1133 +;1133: } +LABELV $403 +line 1134 +;1134: key[0] = 0; +ADDRFP4 4 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1135 +;1135: value[0] = 0; +ADDRFP4 8 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1137 +;1136: +;1137: o = key; +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRGP4 $406 +JUMPV +LABELV $405 +line 1138 +;1138: while ( *s != '\\' ) { +line 1139 +;1139: if ( !*s ) { +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $408 +line 1140 +;1140: *o = 0; +ADDRLP4 4 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1141 +;1141: *head = s; +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1142 +;1142: return; +ADDRGP4 $402 +JUMPV +LABELV $408 +line 1144 +;1143: } +;1144: *o++ = *s++; +ADDRLP4 8 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTI4 1 +ASGNI4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI1 +ASGNI1 +line 1145 +;1145: } +LABELV $406 +line 1138 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 92 +NEI4 $405 +line 1146 +;1146: *o = 0; +ADDRLP4 4 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1147 +;1147: s++; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 1149 +;1148: +;1149: o = value; +ADDRLP4 4 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRGP4 $411 +JUMPV +LABELV $410 +line 1150 +;1150: while ( *s != '\\' && *s ) { +line 1151 +;1151: *o++ = *s++; +ADDRLP4 8 +ADDRLP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTI4 1 +ASGNI4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +ADDRLP4 16 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI1 +ASGNI1 +line 1152 +;1152: } +LABELV $411 +line 1150 +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 92 +EQI4 $413 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $410 +LABELV $413 +line 1153 +;1153: *o = 0; +ADDRLP4 4 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1155 +;1154: +;1155: *head = s; +ADDRFP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 1156 +;1156:} +LABELV $402 +endproc Info_NextPair 20 0 +export Info_RemoveKey +proc Info_RemoveKey 2076 8 +line 1164 +;1157: +;1158: +;1159:/* +;1160:=================== +;1161:Info_RemoveKey +;1162:=================== +;1163:*/ +;1164:void Info_RemoveKey( char *s, const char *key ) { +line 1170 +;1165: char *start; +;1166: char pkey[MAX_INFO_KEY]; +;1167: char value[MAX_INFO_VALUE]; +;1168: char *o; +;1169: +;1170: if ( strlen( s ) >= MAX_INFO_STRING ) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 2056 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 2056 +INDIRI4 +CNSTI4 1024 +LTI4 $415 +line 1171 +;1171: Com_Error( ERR_DROP, "Info_RemoveKey: oversize infostring" ); +CNSTI4 1 +ARGI4 +ADDRGP4 $417 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 1172 +;1172: } +LABELV $415 +line 1174 +;1173: +;1174: if (strchr (key, '\\')) { +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTI4 92 +ARGI4 +ADDRLP4 2060 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 2060 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $421 +line 1175 +;1175: return; +ADDRGP4 $414 +JUMPV +LABELV $420 +line 1179 +;1176: } +;1177: +;1178: while (1) +;1179: { +line 1180 +;1180: start = s; +ADDRLP4 1028 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 1181 +;1181: if (*s == '\\') +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 92 +NEI4 $423 +line 1182 +;1182: s++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +LABELV $423 +line 1183 +;1183: o = pkey; +ADDRLP4 0 +ADDRLP4 4 +ASGNP4 +ADDRGP4 $426 +JUMPV +LABELV $425 +line 1185 +;1184: while (*s != '\\') +;1185: { +line 1186 +;1186: if (!*s) +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $428 +line 1187 +;1187: return; +ADDRGP4 $414 +JUMPV +LABELV $428 +line 1188 +;1188: *o++ = *s++; +ADDRLP4 2064 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2072 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 2064 +INDIRP4 +ADDRLP4 2072 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 2068 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 2068 +INDIRP4 +ADDRLP4 2072 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 2064 +INDIRP4 +ADDRLP4 2068 +INDIRP4 +INDIRI1 +ASGNI1 +line 1189 +;1189: } +LABELV $426 +line 1184 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 92 +NEI4 $425 +line 1190 +;1190: *o = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1191 +;1191: s++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 1193 +;1192: +;1193: o = value; +ADDRLP4 0 +ADDRLP4 1032 +ASGNP4 +ADDRGP4 $431 +JUMPV +LABELV $430 +line 1195 +;1194: while (*s != '\\' && *s) +;1195: { +line 1196 +;1196: if (!*s) +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $433 +line 1197 +;1197: return; +ADDRGP4 $414 +JUMPV +LABELV $433 +line 1198 +;1198: *o++ = *s++; +ADDRLP4 2064 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2072 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 2064 +INDIRP4 +ADDRLP4 2072 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 2068 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 2068 +INDIRP4 +ADDRLP4 2072 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 2064 +INDIRP4 +ADDRLP4 2068 +INDIRP4 +INDIRI1 +ASGNI1 +line 1199 +;1199: } +LABELV $431 +line 1194 +ADDRLP4 2064 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 2064 +INDIRI4 +CNSTI4 92 +EQI4 $435 +ADDRLP4 2064 +INDIRI4 +CNSTI4 0 +NEI4 $430 +LABELV $435 +line 1200 +;1200: *o = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1202 +;1201: +;1202: if (!strcmp (key, pkey) ) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 2068 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 2068 +INDIRI4 +CNSTI4 0 +NEI4 $436 +line 1203 +;1203: { +line 1204 +;1204: strcpy (start, s); // remove this part +ADDRLP4 1028 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 1205 +;1205: return; +ADDRGP4 $414 +JUMPV +LABELV $436 +line 1208 +;1206: } +;1207: +;1208: if (!*s) +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $438 +line 1209 +;1209: return; +ADDRGP4 $414 +JUMPV +LABELV $438 +line 1210 +;1210: } +LABELV $421 +line 1178 +ADDRGP4 $420 +JUMPV +line 1212 +;1211: +;1212:} +LABELV $414 +endproc Info_RemoveKey 2076 8 +export Info_RemoveKey_Big +proc Info_RemoveKey_Big 16412 8 +line 1219 +;1213: +;1214:/* +;1215:=================== +;1216:Info_RemoveKey_Big +;1217:=================== +;1218:*/ +;1219:void Info_RemoveKey_Big( char *s, const char *key ) { +line 1225 +;1220: char *start; +;1221: char pkey[BIG_INFO_KEY]; +;1222: char value[BIG_INFO_VALUE]; +;1223: char *o; +;1224: +;1225: if ( strlen( s ) >= BIG_INFO_STRING ) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16392 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 16392 +INDIRI4 +CNSTI4 8192 +LTI4 $441 +line 1226 +;1226: Com_Error( ERR_DROP, "Info_RemoveKey_Big: oversize infostring" ); +CNSTI4 1 +ARGI4 +ADDRGP4 $443 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 1227 +;1227: } +LABELV $441 +line 1229 +;1228: +;1229: if (strchr (key, '\\')) { +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTI4 92 +ARGI4 +ADDRLP4 16396 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 16396 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $447 +line 1230 +;1230: return; +ADDRGP4 $440 +JUMPV +LABELV $446 +line 1234 +;1231: } +;1232: +;1233: while (1) +;1234: { +line 1235 +;1235: start = s; +ADDRLP4 8196 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 1236 +;1236: if (*s == '\\') +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 92 +NEI4 $449 +line 1237 +;1237: s++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +LABELV $449 +line 1238 +;1238: o = pkey; +ADDRLP4 0 +ADDRLP4 4 +ASGNP4 +ADDRGP4 $452 +JUMPV +LABELV $451 +line 1240 +;1239: while (*s != '\\') +;1240: { +line 1241 +;1241: if (!*s) +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $454 +line 1242 +;1242: return; +ADDRGP4 $440 +JUMPV +LABELV $454 +line 1243 +;1243: *o++ = *s++; +ADDRLP4 16400 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16408 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 16400 +INDIRP4 +ADDRLP4 16408 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 16404 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 16404 +INDIRP4 +ADDRLP4 16408 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 16400 +INDIRP4 +ADDRLP4 16404 +INDIRP4 +INDIRI1 +ASGNI1 +line 1244 +;1244: } +LABELV $452 +line 1239 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 92 +NEI4 $451 +line 1245 +;1245: *o = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1246 +;1246: s++; +ADDRFP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 1248 +;1247: +;1248: o = value; +ADDRLP4 0 +ADDRLP4 8200 +ASGNP4 +ADDRGP4 $457 +JUMPV +LABELV $456 +line 1250 +;1249: while (*s != '\\' && *s) +;1250: { +line 1251 +;1251: if (!*s) +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $459 +line 1252 +;1252: return; +ADDRGP4 $440 +JUMPV +LABELV $459 +line 1253 +;1253: *o++ = *s++; +ADDRLP4 16400 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16408 +CNSTI4 1 +ASGNI4 +ADDRLP4 0 +ADDRLP4 16400 +INDIRP4 +ADDRLP4 16408 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 16404 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 16404 +INDIRP4 +ADDRLP4 16408 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 16400 +INDIRP4 +ADDRLP4 16404 +INDIRP4 +INDIRI1 +ASGNI1 +line 1254 +;1254: } +LABELV $457 +line 1249 +ADDRLP4 16400 +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 16400 +INDIRI4 +CNSTI4 92 +EQI4 $461 +ADDRLP4 16400 +INDIRI4 +CNSTI4 0 +NEI4 $456 +LABELV $461 +line 1255 +;1255: *o = 0; +ADDRLP4 0 +INDIRP4 +CNSTI1 0 +ASGNI1 +line 1257 +;1256: +;1257: if (!strcmp (key, pkey) ) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 16404 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 16404 +INDIRI4 +CNSTI4 0 +NEI4 $462 +line 1258 +;1258: { +line 1259 +;1259: strcpy (start, s); // remove this part +ADDRLP4 8196 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 1260 +;1260: return; +ADDRGP4 $440 +JUMPV +LABELV $462 +line 1263 +;1261: } +;1262: +;1263: if (!*s) +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $464 +line 1264 +;1264: return; +ADDRGP4 $440 +JUMPV +LABELV $464 +line 1265 +;1265: } +LABELV $447 +line 1233 +ADDRGP4 $446 +JUMPV +line 1267 +;1266: +;1267:} +LABELV $440 +endproc Info_RemoveKey_Big 16412 8 +export Info_Validate +proc Info_Validate 8 8 +line 1280 +;1268: +;1269: +;1270: +;1271: +;1272:/* +;1273:================== +;1274:Info_Validate +;1275: +;1276:Some characters are illegal in info strings because they +;1277:can mess up the server's parsing +;1278:================== +;1279:*/ +;1280:qboolean Info_Validate( const char *s ) { +line 1281 +;1281: if ( strchr( s, '\"' ) ) { +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 34 +ARGI4 +ADDRLP4 0 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $467 +line 1282 +;1282: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $466 +JUMPV +LABELV $467 +line 1284 +;1283: } +;1284: if ( strchr( s, ';' ) ) { +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 59 +ARGI4 +ADDRLP4 4 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $469 +line 1285 +;1285: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $466 +JUMPV +LABELV $469 +line 1287 +;1286: } +;1287: return qtrue; +CNSTI4 1 +RETI4 +LABELV $466 +endproc Info_Validate 8 8 +export Info_SetValueForKey +proc Info_SetValueForKey 1068 20 +line 1297 +;1288:} +;1289: +;1290:/* +;1291:================== +;1292:Info_SetValueForKey +;1293: +;1294:Changes or adds a key/value pair +;1295:================== +;1296:*/ +;1297:void Info_SetValueForKey( char *s, const char *key, const char *value ) { +line 1300 +;1298: char newi[MAX_INFO_STRING]; +;1299: +;1300: if ( strlen( s ) >= MAX_INFO_STRING ) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 1024 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 1024 +INDIRI4 +CNSTI4 1024 +LTI4 $472 +line 1301 +;1301: Com_Error( ERR_DROP, "Info_SetValueForKey: oversize infostring" ); +CNSTI4 1 +ARGI4 +ADDRGP4 $474 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 1302 +;1302: } +LABELV $472 +line 1304 +;1303: +;1304: if (strchr (key, '\\') || strchr (value, '\\')) +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTI4 92 +ARGI4 +ADDRLP4 1028 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 1028 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $477 +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTI4 92 +ARGI4 +ADDRLP4 1032 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 1032 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $475 +LABELV $477 +line 1305 +;1305: { +line 1306 +;1306: Com_Printf ("Can't use keys or values with a \\\n"); +ADDRGP4 $478 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 1307 +;1307: return; +ADDRGP4 $471 +JUMPV +LABELV $475 +line 1310 +;1308: } +;1309: +;1310: if (strchr (key, ';') || strchr (value, ';')) +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTI4 59 +ARGI4 +ADDRLP4 1036 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 1036 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $481 +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTI4 59 +ARGI4 +ADDRLP4 1040 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 1040 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $479 +LABELV $481 +line 1311 +;1311: { +line 1312 +;1312: Com_Printf ("Can't use keys or values with a semicolon\n"); +ADDRGP4 $482 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 1313 +;1313: return; +ADDRGP4 $471 +JUMPV +LABELV $479 +line 1316 +;1314: } +;1315: +;1316: if (strchr (key, '\"') || strchr (value, '\"')) +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTI4 34 +ARGI4 +ADDRLP4 1044 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 1044 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $485 +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTI4 34 +ARGI4 +ADDRLP4 1048 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 1048 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $483 +LABELV $485 +line 1317 +;1317: { +line 1318 +;1318: Com_Printf ("Can't use keys or values with a \"\n"); +ADDRGP4 $486 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 1319 +;1319: return; +ADDRGP4 $471 +JUMPV +LABELV $483 +line 1322 +;1320: } +;1321: +;1322: Info_RemoveKey (s, key); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Info_RemoveKey +CALLV +pop +line 1323 +;1323: if (!value || !strlen(value)) +ADDRLP4 1052 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 1052 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $489 +ADDRLP4 1052 +INDIRP4 +ARGP4 +ADDRLP4 1056 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 1056 +INDIRI4 +CNSTI4 0 +NEI4 $487 +LABELV $489 +line 1324 +;1324: return; +ADDRGP4 $471 +JUMPV +LABELV $487 +line 1326 +;1325: +;1326: Com_sprintf (newi, sizeof(newi), "\\%s\\%s", key, value); +ADDRLP4 0 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 $490 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1328 +;1327: +;1328: if (strlen(newi) + strlen(s) > MAX_INFO_STRING) +ADDRLP4 0 +ARGP4 +ADDRLP4 1060 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 1064 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 1060 +INDIRI4 +ADDRLP4 1064 +INDIRI4 +ADDI4 +CNSTI4 1024 +LEI4 $491 +line 1329 +;1329: { +line 1330 +;1330: Com_Printf ("Info string length exceeded\n"); +ADDRGP4 $493 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 1331 +;1331: return; +ADDRGP4 $471 +JUMPV +LABELV $491 +line 1334 +;1332: } +;1333: +;1334: strcat (newi, s); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 strcat +CALLP4 +pop +line 1335 +;1335: strcpy (s, newi); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 1336 +;1336:} +LABELV $471 +endproc Info_SetValueForKey 1068 20 +export Info_SetValueForKey_Big +proc Info_SetValueForKey_Big 8236 20 +line 1345 +;1337: +;1338:/* +;1339:================== +;1340:Info_SetValueForKey_Big +;1341: +;1342:Changes or adds a key/value pair +;1343:================== +;1344:*/ +;1345:void Info_SetValueForKey_Big( char *s, const char *key, const char *value ) { +line 1348 +;1346: char newi[BIG_INFO_STRING]; +;1347: +;1348: if ( strlen( s ) >= BIG_INFO_STRING ) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8192 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 8192 +INDIRI4 +CNSTI4 8192 +LTI4 $495 +line 1349 +;1349: Com_Error( ERR_DROP, "Info_SetValueForKey: oversize infostring" ); +CNSTI4 1 +ARGI4 +ADDRGP4 $474 +ARGP4 +ADDRGP4 Com_Error +CALLV +pop +line 1350 +;1350: } +LABELV $495 +line 1352 +;1351: +;1352: if (strchr (key, '\\') || strchr (value, '\\')) +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTI4 92 +ARGI4 +ADDRLP4 8196 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 8196 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $499 +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTI4 92 +ARGI4 +ADDRLP4 8200 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 8200 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $497 +LABELV $499 +line 1353 +;1353: { +line 1354 +;1354: Com_Printf ("Can't use keys or values with a \\\n"); +ADDRGP4 $478 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 1355 +;1355: return; +ADDRGP4 $494 +JUMPV +LABELV $497 +line 1358 +;1356: } +;1357: +;1358: if (strchr (key, ';') || strchr (value, ';')) +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTI4 59 +ARGI4 +ADDRLP4 8204 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 8204 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $502 +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTI4 59 +ARGI4 +ADDRLP4 8208 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 8208 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $500 +LABELV $502 +line 1359 +;1359: { +line 1360 +;1360: Com_Printf ("Can't use keys or values with a semicolon\n"); +ADDRGP4 $482 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 1361 +;1361: return; +ADDRGP4 $494 +JUMPV +LABELV $500 +line 1364 +;1362: } +;1363: +;1364: if (strchr (key, '\"') || strchr (value, '\"')) +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTI4 34 +ARGI4 +ADDRLP4 8212 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 8212 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $505 +ADDRFP4 8 +INDIRP4 +ARGP4 +CNSTI4 34 +ARGI4 +ADDRLP4 8216 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 8216 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $503 +LABELV $505 +line 1365 +;1365: { +line 1366 +;1366: Com_Printf ("Can't use keys or values with a \"\n"); +ADDRGP4 $486 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 1367 +;1367: return; +ADDRGP4 $494 +JUMPV +LABELV $503 +line 1370 +;1368: } +;1369: +;1370: Info_RemoveKey_Big (s, key); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Info_RemoveKey_Big +CALLV +pop +line 1371 +;1371: if (!value || !strlen(value)) +ADDRLP4 8220 +ADDRFP4 8 +INDIRP4 +ASGNP4 +ADDRLP4 8220 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $508 +ADDRLP4 8220 +INDIRP4 +ARGP4 +ADDRLP4 8224 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 8224 +INDIRI4 +CNSTI4 0 +NEI4 $506 +LABELV $508 +line 1372 +;1372: return; +ADDRGP4 $494 +JUMPV +LABELV $506 +line 1374 +;1373: +;1374: Com_sprintf (newi, sizeof(newi), "\\%s\\%s", key, value); +ADDRLP4 0 +ARGP4 +CNSTI4 8192 +ARGI4 +ADDRGP4 $490 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRGP4 Com_sprintf +CALLV +pop +line 1376 +;1375: +;1376: if (strlen(newi) + strlen(s) > BIG_INFO_STRING) +ADDRLP4 0 +ARGP4 +ADDRLP4 8228 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8232 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 8228 +INDIRI4 +ADDRLP4 8232 +INDIRI4 +ADDI4 +CNSTI4 8192 +LEI4 $509 +line 1377 +;1377: { +line 1378 +;1378: Com_Printf ("BIG Info string length exceeded\n"); +ADDRGP4 $511 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 1379 +;1379: return; +ADDRGP4 $494 +JUMPV +LABELV $509 +line 1382 +;1380: } +;1381: +;1382: strcat (s, newi); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 strcat +CALLP4 +pop +line 1383 +;1383:} +LABELV $494 +endproc Info_SetValueForKey_Big 8236 20 +export Q_irand +proc Q_irand 8 0 +line 1388 +;1384: +;1385: +;1386://rww - convience function.. +;1387:int Q_irand(int value1, int value2) +;1388:{ +line 1391 +;1389: int r; +;1390: +;1391: r = rand()%value2; +ADDRLP4 4 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +MODI4 +ASGNI4 +line 1392 +;1392: r += value1; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +ASGNI4 +line 1394 +;1393: +;1394: return r; +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $512 +endproc Q_irand 8 0 +bss +align 4 +LABELV com_lines +skip 4 +align 1 +LABELV com_parsename +skip 1024 +align 1 +LABELV com_token +skip 1024 +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_RemoveKey_big +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $511 +char 1 66 +char 1 73 +char 1 71 +char 1 32 +char 1 73 +char 1 110 +char 1 102 +char 1 111 +char 1 32 +char 1 115 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 32 +char 1 108 +char 1 101 +char 1 110 +char 1 103 +char 1 116 +char 1 104 +char 1 32 +char 1 101 +char 1 120 +char 1 99 +char 1 101 +char 1 101 +char 1 100 +char 1 101 +char 1 100 +char 1 10 +char 1 0 +align 1 +LABELV $493 +char 1 73 +char 1 110 +char 1 102 +char 1 111 +char 1 32 +char 1 115 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 32 +char 1 108 +char 1 101 +char 1 110 +char 1 103 +char 1 116 +char 1 104 +char 1 32 +char 1 101 +char 1 120 +char 1 99 +char 1 101 +char 1 101 +char 1 100 +char 1 101 +char 1 100 +char 1 10 +char 1 0 +align 1 +LABELV $490 +char 1 92 +char 1 37 +char 1 115 +char 1 92 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $486 +char 1 67 +char 1 97 +char 1 110 +char 1 39 +char 1 116 +char 1 32 +char 1 117 +char 1 115 +char 1 101 +char 1 32 +char 1 107 +char 1 101 +char 1 121 +char 1 115 +char 1 32 +char 1 111 +char 1 114 +char 1 32 +char 1 118 +char 1 97 +char 1 108 +char 1 117 +char 1 101 +char 1 115 +char 1 32 +char 1 119 +char 1 105 +char 1 116 +char 1 104 +char 1 32 +char 1 97 +char 1 32 +char 1 34 +char 1 10 +char 1 0 +align 1 +LABELV $482 +char 1 67 +char 1 97 +char 1 110 +char 1 39 +char 1 116 +char 1 32 +char 1 117 +char 1 115 +char 1 101 +char 1 32 +char 1 107 +char 1 101 +char 1 121 +char 1 115 +char 1 32 +char 1 111 +char 1 114 +char 1 32 +char 1 118 +char 1 97 +char 1 108 +char 1 117 +char 1 101 +char 1 115 +char 1 32 +char 1 119 +char 1 105 +char 1 116 +char 1 104 +char 1 32 +char 1 97 +char 1 32 +char 1 115 +char 1 101 +char 1 109 +char 1 105 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 110 +char 1 10 +char 1 0 +align 1 +LABELV $478 +char 1 67 +char 1 97 +char 1 110 +char 1 39 +char 1 116 +char 1 32 +char 1 117 +char 1 115 +char 1 101 +char 1 32 +char 1 107 +char 1 101 +char 1 121 +char 1 115 +char 1 32 +char 1 111 +char 1 114 +char 1 32 +char 1 118 +char 1 97 +char 1 108 +char 1 117 +char 1 101 +char 1 115 +char 1 32 +char 1 119 +char 1 105 +char 1 116 +char 1 104 +char 1 32 +char 1 97 +char 1 32 +char 1 92 +char 1 10 +char 1 0 +align 1 +LABELV $474 +char 1 73 +char 1 110 +char 1 102 +char 1 111 +char 1 95 +char 1 83 +char 1 101 +char 1 116 +char 1 86 +char 1 97 +char 1 108 +char 1 117 +char 1 101 +char 1 70 +char 1 111 +char 1 114 +char 1 75 +char 1 101 +char 1 121 +char 1 58 +char 1 32 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 32 +char 1 105 +char 1 110 +char 1 102 +char 1 111 +char 1 115 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $443 +char 1 73 +char 1 110 +char 1 102 +char 1 111 +char 1 95 +char 1 82 +char 1 101 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 75 +char 1 101 +char 1 121 +char 1 95 +char 1 66 +char 1 105 +char 1 103 +char 1 58 +char 1 32 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 32 +char 1 105 +char 1 110 +char 1 102 +char 1 111 +char 1 115 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $417 +char 1 73 +char 1 110 +char 1 102 +char 1 111 +char 1 95 +char 1 82 +char 1 101 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 75 +char 1 101 +char 1 121 +char 1 58 +char 1 32 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 32 +char 1 105 +char 1 110 +char 1 102 +char 1 111 +char 1 115 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $383 +char 1 73 +char 1 110 +char 1 102 +char 1 111 +char 1 95 +char 1 86 +char 1 97 +char 1 108 +char 1 117 +char 1 101 +char 1 70 +char 1 111 +char 1 114 +char 1 75 +char 1 101 +char 1 121 +char 1 58 +char 1 32 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 32 +char 1 105 +char 1 110 +char 1 102 +char 1 111 +char 1 115 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $380 +char 1 0 +align 1 +LABELV $369 +char 1 67 +char 1 111 +char 1 109 +char 1 95 +char 1 115 +char 1 112 +char 1 114 +char 1 105 +char 1 110 +char 1 116 +char 1 102 +char 1 58 +char 1 32 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 102 +char 1 108 +char 1 111 +char 1 119 +char 1 32 +char 1 111 +char 1 102 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 105 +char 1 110 +char 1 32 +char 1 37 +char 1 105 +char 1 10 +char 1 0 +align 1 +LABELV $366 +char 1 67 +char 1 111 +char 1 109 +char 1 95 +char 1 115 +char 1 112 +char 1 114 +char 1 105 +char 1 110 +char 1 116 +char 1 102 +char 1 58 +char 1 32 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 102 +char 1 108 +char 1 111 +char 1 119 +char 1 101 +char 1 100 +char 1 32 +char 1 98 +char 1 105 +char 1 103 +char 1 98 +char 1 117 +char 1 102 +char 1 102 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $345 +char 1 81 +char 1 95 +char 1 115 +char 1 116 +char 1 114 +char 1 99 +char 1 97 +char 1 116 +char 1 58 +char 1 32 +char 1 97 +char 1 108 +char 1 114 +char 1 101 +char 1 97 +char 1 100 +char 1 121 +char 1 32 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 102 +char 1 108 +char 1 111 +char 1 119 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $295 +char 1 81 +char 1 95 +char 1 115 +char 1 116 +char 1 114 +char 1 110 +char 1 99 +char 1 112 +char 1 121 +char 1 122 +char 1 58 +char 1 32 +char 1 100 +char 1 101 +char 1 115 +char 1 116 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 32 +char 1 60 +char 1 32 +char 1 49 +char 1 0 +align 1 +LABELV $292 +char 1 81 +char 1 95 +char 1 115 +char 1 116 +char 1 114 +char 1 110 +char 1 99 +char 1 112 +char 1 121 +char 1 122 +char 1 58 +char 1 32 +char 1 78 +char 1 85 +char 1 76 +char 1 76 +char 1 32 +char 1 115 +char 1 114 +char 1 99 +char 1 0 +align 1 +LABELV $289 +char 1 81 +char 1 95 +char 1 115 +char 1 116 +char 1 114 +char 1 110 +char 1 99 +char 1 112 +char 1 121 +char 1 122 +char 1 58 +char 1 32 +char 1 78 +char 1 85 +char 1 76 +char 1 76 +char 1 32 +char 1 100 +char 1 101 +char 1 115 +char 1 116 +char 1 0 +align 1 +LABELV $253 +char 1 41 +char 1 0 +align 1 +LABELV $248 +char 1 40 +char 1 0 +align 1 +LABELV $229 +char 1 77 +char 1 97 +char 1 116 +char 1 99 +char 1 104 +char 1 84 +char 1 111 +char 1 107 +char 1 101 +char 1 110 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 33 +char 1 61 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $212 +char 1 117 +char 1 110 +char 1 101 +char 1 120 +char 1 112 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 69 +char 1 79 +char 1 70 +char 1 10 +char 1 0 +align 1 +LABELV $118 +char 1 87 +char 1 65 +char 1 82 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 44 +char 1 32 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 32 +char 1 37 +char 1 100 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $114 +char 1 69 +char 1 82 +char 1 82 +char 1 79 +char 1 82 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 44 +char 1 32 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 32 +char 1 37 +char 1 100 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $108 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $88 +char 1 37 +char 1 115 +char 1 37 +char 1 115 +char 1 0 diff --git a/code/cgame/vm/ui_shared.asm b/code/cgame/vm/ui_shared.asm new file mode 100644 index 0000000..3967f39 --- /dev/null +++ b/code/cgame/vm/ui_shared.asm @@ -0,0 +1,51553 @@ +data +align 4 +LABELV captureFunc +byte 4 0 +align 4 +LABELV captureData +byte 4 0 +align 4 +LABELV itemCapture +byte 4 0 +export DC +align 4 +LABELV DC +byte 4 0 +align 4 +LABELV g_waitingForKey +byte 4 0 +align 4 +LABELV g_editingField +byte 4 0 +align 4 +LABELV g_bindItem +byte 4 0 +align 4 +LABELV g_editItem +byte 4 0 +export menuCount +align 4 +LABELV menuCount +byte 4 0 +export openMenuCount +align 4 +LABELV openMenuCount +byte 4 0 +align 4 +LABELV debugMode +byte 4 0 +align 4 +LABELV lastListBoxClickTime +byte 4 0 +export itemFlags +align 4 +LABELV itemFlags +address $60 +byte 4 8 +byte 4 0 +byte 4 0 +export styles +align 4 +LABELV styles +address $61 +address $62 +address $63 +address $64 +address $65 +address $66 +byte 4 0 +export alignment +align 4 +LABELV alignment +address $67 +address $68 +address $69 +byte 4 0 +export types +align 4 +LABELV types +address $70 +address $71 +address $72 +address $73 +address $74 +address $75 +address $76 +address $77 +address $78 +address $79 +address $80 +address $81 +address $82 +address $83 +address $84 +byte 4 0 +export UI_Alloc +code +proc UI_Alloc 8 4 +file "../../ui/ui_shared.c" +line 125 +;1:// +;2:// string allocation/managment +;3: +;4:#include "ui_shared.h" +;5: +;6:#define SCROLL_TIME_START 500 +;7:#define SCROLL_TIME_ADJUST 150 +;8:#define SCROLL_TIME_ADJUSTOFFSET 40 +;9:#define SCROLL_TIME_FLOOR 20 +;10: +;11:typedef struct scrollInfo_s { +;12: int nextScrollTime; +;13: int nextAdjustTime; +;14: int adjustValue; +;15: int scrollKey; +;16: float xStart; +;17: float yStart; +;18: itemDef_t *item; +;19: qboolean scrollDir; +;20:} scrollInfo_t; +;21: +;22:static scrollInfo_t scrollInfo; +;23: +;24:static void (*captureFunc) (void *p) = 0; +;25:static void *captureData = NULL; +;26:static itemDef_t *itemCapture = NULL; // item that has the mouse captured ( if any ) +;27: +;28:displayContextDef_t *DC = NULL; +;29: +;30:static qboolean g_waitingForKey = qfalse; +;31:static qboolean g_editingField = qfalse; +;32: +;33:static itemDef_t *g_bindItem = NULL; +;34:static itemDef_t *g_editItem = NULL; +;35: +;36:menuDef_t Menus[MAX_MENUS]; // defined menus +;37:int menuCount = 0; // how many +;38: +;39:menuDef_t *menuStack[MAX_OPEN_MENUS]; +;40:int openMenuCount = 0; +;41: +;42:static qboolean debugMode = qfalse; +;43: +;44:#define DOUBLE_CLICK_DELAY 300 +;45:static int lastListBoxClickTime = 0; +;46: +;47:void Item_RunScript(itemDef_t *item, const char *s); +;48:void Item_SetupKeywordHash(void); +;49:void Menu_SetupKeywordHash(void); +;50:int BindingIDFromName(const char *name); +;51:qboolean Item_Bind_HandleKey(itemDef_t *item, int key, qboolean down); +;52:itemDef_t *Menu_SetPrevCursorItem(menuDef_t *menu); +;53:itemDef_t *Menu_SetNextCursorItem(menuDef_t *menu); +;54:static qboolean Menu_OverActiveItem(menuDef_t *menu, float x, float y); +;55:static void Item_TextScroll_BuildLines ( itemDef_t* item ); +;56: +;57:#ifdef CGAME +;58:#define MEM_POOL_SIZE 128 * 1024 +;59:#else +;60://#define MEM_POOL_SIZE 1024 * 1024 +;61:#define MEM_POOL_SIZE 2048 * 1024 +;62:#endif +;63: +;64:static char memoryPool[MEM_POOL_SIZE]; +;65:static int allocPoint, outOfMemory; +;66: +;67: +;68:typedef struct itemFlagsDef_s { +;69: char *string; +;70: int value; +;71:} itemFlagsDef_t; +;72: +;73:itemFlagsDef_t itemFlags [] = { +;74:"WINDOW_INACTIVE", WINDOW_INACTIVE, +;75:NULL, (int) NULL +;76:}; +;77: +;78:char *styles [] = { +;79:"WINDOW_STYLE_EMPTY", +;80:"WINDOW_STYLE_FILLED", +;81:"WINDOW_STYLE_GRADIENT", +;82:"WINDOW_STYLE_SHADER", +;83:"WINDOW_STYLE_TEAMCOLOR", +;84:"WINDOW_STYLE_CINEMATIC", +;85:NULL +;86:}; +;87: +;88:char *alignment [] = { +;89:"ITEM_ALIGN_LEFT", +;90:"ITEM_ALIGN_CENTER", +;91:"ITEM_ALIGN_RIGHT", +;92:NULL +;93:}; +;94: +;95:char *types [] = { +;96:"ITEM_TYPE_TEXT", +;97:"ITEM_TYPE_BUTTON", +;98:"ITEM_TYPE_RADIOBUTTON", +;99:"ITEM_TYPE_CHECKBOX", +;100:"ITEM_TYPE_EDITFIELD", +;101:"ITEM_TYPE_COMBO", +;102:"ITEM_TYPE_LISTBOX", +;103:"ITEM_TYPE_MODEL", +;104:"ITEM_TYPE_OWNERDRAW", +;105:"ITEM_TYPE_NUMERICFIELD", +;106:"ITEM_TYPE_SLIDER", +;107:"ITEM_TYPE_YESNO", +;108:"ITEM_TYPE_MULTI", +;109:"ITEM_TYPE_BIND", +;110:"ITEM_TYPE_TEXTSCROLL", +;111:NULL +;112:}; +;113: +;114: +;115:extern int MenuFontToHandle(int iMenuFont); +;116: +;117: +;118: +;119: +;120:/* +;121:=============== +;122:UI_Alloc +;123:=============== +;124:*/ +;125:void *UI_Alloc( int size ) { +line 128 +;126: char *p; +;127: +;128: if ( allocPoint + size > MEM_POOL_SIZE ) { +ADDRGP4 allocPoint +INDIRI4 +ADDRFP4 0 +INDIRI4 +ADDI4 +CNSTI4 131072 +LEI4 $86 +line 129 +;129: outOfMemory = qtrue; +ADDRGP4 outOfMemory +CNSTI4 1 +ASGNI4 +line 130 +;130: if (DC->Print) { +ADDRGP4 DC +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $88 +line 131 +;131: DC->Print("UI_Alloc: Failure. Out of memory!\n"); +ADDRGP4 $90 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRP4 +CALLV +pop +line 132 +;132: } +LABELV $88 +line 134 +;133: //DC->trap_Print(S_COLOR_YELLOW"WARNING: UI Out of Memory!\n"); +;134: return NULL; +CNSTP4 0 +RETP4 +ADDRGP4 $85 +JUMPV +LABELV $86 +line 137 +;135: } +;136: +;137: p = &memoryPool[allocPoint]; +ADDRLP4 0 +ADDRGP4 allocPoint +INDIRI4 +ADDRGP4 memoryPool +ADDP4 +ASGNP4 +line 139 +;138: +;139: allocPoint += ( size + 15 ) & ~15; +ADDRLP4 4 +ADDRGP4 allocPoint +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +ADDRFP4 0 +INDIRI4 +CNSTI4 15 +ADDI4 +CNSTI4 -16 +BANDI4 +ADDI4 +ASGNI4 +line 141 +;140: +;141: return p; +ADDRLP4 0 +INDIRP4 +RETP4 +LABELV $85 +endproc UI_Alloc 8 4 +export UI_InitMemory +proc UI_InitMemory 0 0 +line 149 +;142:} +;143: +;144:/* +;145:=============== +;146:UI_InitMemory +;147:=============== +;148:*/ +;149:void UI_InitMemory( void ) { +line 150 +;150: allocPoint = 0; +ADDRGP4 allocPoint +CNSTI4 0 +ASGNI4 +line 151 +;151: outOfMemory = qfalse; +ADDRGP4 outOfMemory +CNSTI4 0 +ASGNI4 +line 152 +;152:} +LABELV $91 +endproc UI_InitMemory 0 0 +export UI_OutOfMemory +proc UI_OutOfMemory 0 0 +line 154 +;153: +;154:qboolean UI_OutOfMemory() { +line 155 +;155: return outOfMemory; +ADDRGP4 outOfMemory +INDIRI4 +RETI4 +LABELV $92 +endproc UI_OutOfMemory 0 0 +proc hashForString 16 4 +line 168 +;156:} +;157: +;158: +;159: +;160: +;161: +;162:#define HASH_TABLE_SIZE 2048 +;163:/* +;164:================ +;165:return a hash value for the string +;166:================ +;167:*/ +;168:static long hashForString(const char *str) { +line 173 +;169: int i; +;170: long hash; +;171: char letter; +;172: +;173: hash = 0; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 174 +;174: i = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $95 +JUMPV +LABELV $94 +line 175 +;175: while (str[i] != '\0') { +line 176 +;176: letter = tolower(str[i]); +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ARGI4 +ADDRLP4 12 +ADDRGP4 tolower +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 12 +INDIRI4 +CVII1 4 +ASGNI1 +line 177 +;177: hash+=(long)(letter)*(i+119); +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +ADDRLP4 4 +INDIRI1 +CVII4 1 +ADDRLP4 0 +INDIRI4 +CNSTI4 119 +ADDI4 +MULI4 +ADDI4 +ASGNI4 +line 178 +;178: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 179 +;179: } +LABELV $95 +line 175 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $94 +line 180 +;180: hash &= (HASH_TABLE_SIZE-1); +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 2047 +BANDI4 +ASGNI4 +line 181 +;181: return hash; +ADDRLP4 8 +INDIRI4 +RETI4 +LABELV $93 +endproc hashForString 16 4 +data +align 4 +LABELV strPoolIndex +byte 4 0 +align 4 +LABELV strHandleCount +byte 4 0 +align 4 +LABELV $98 +address $99 +export String_Alloc +code +proc String_Alloc 44 8 +line 196 +;182:} +;183: +;184:typedef struct stringDef_s { +;185: struct stringDef_s *next; +;186: const char *str; +;187:} stringDef_t; +;188: +;189:static int strPoolIndex = 0; +;190:static char strPool[STRING_POOL_SIZE]; +;191: +;192:static int strHandleCount = 0; +;193:static stringDef_t *strHandle[HASH_TABLE_SIZE]; +;194: +;195: +;196:const char *String_Alloc(const char *p) { +line 202 +;197: int len; +;198: long hash; +;199: stringDef_t *str, *last; +;200: static const char *staticNULL = ""; +;201: +;202: if (p == NULL) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $100 +line 203 +;203: return NULL; +CNSTP4 0 +RETP4 +ADDRGP4 $97 +JUMPV +LABELV $100 +line 206 +;204: } +;205: +;206: if (*p == 0) { +ADDRFP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $102 +line 207 +;207: return staticNULL; +ADDRGP4 $98 +INDIRP4 +RETP4 +ADDRGP4 $97 +JUMPV +LABELV $102 +line 210 +;208: } +;209: +;210: hash = hashForString(p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 hashForString +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 212 +;211: +;212: str = strHandle[hash]; +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 strHandle +ADDP4 +INDIRP4 +ASGNP4 +ADDRGP4 $105 +JUMPV +LABELV $104 +line 213 +;213: while (str) { +line 214 +;214: if (strcmp(p, str->str) == 0) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 strcmp +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $107 +line 215 +;215: return str->str; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +RETP4 +ADDRGP4 $97 +JUMPV +LABELV $107 +line 217 +;216: } +;217: str = str->next; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 218 +;218: } +LABELV $105 +line 213 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $104 +line 220 +;219: +;220: len = strlen(p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 221 +;221: if (len + strPoolIndex + 1 < STRING_POOL_SIZE) { +ADDRLP4 12 +INDIRI4 +ADDRGP4 strPoolIndex +INDIRI4 +ADDI4 +CNSTI4 1 +ADDI4 +CNSTI4 131072 +GEI4 $109 +line 222 +;222: int ph = strPoolIndex; +ADDRLP4 24 +ADDRGP4 strPoolIndex +INDIRI4 +ASGNI4 +line 223 +;223: strcpy(&strPool[strPoolIndex], p); +ADDRGP4 strPoolIndex +INDIRI4 +ADDRGP4 strPool +ADDP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 224 +;224: strPoolIndex += len + 1; +ADDRLP4 28 +ADDRGP4 strPoolIndex +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 1 +ADDI4 +ADDI4 +ASGNI4 +line 226 +;225: +;226: str = strHandle[hash]; +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 strHandle +ADDP4 +INDIRP4 +ASGNP4 +line 227 +;227: last = str; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRGP4 $112 +JUMPV +LABELV $111 +line 228 +;228: while (str && str->next) { +line 229 +;229: last = str; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 230 +;230: str = str->next; +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +INDIRP4 +ASGNP4 +line 231 +;231: } +LABELV $112 +line 228 +ADDRLP4 36 +CNSTU4 0 +ASGNU4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 36 +INDIRU4 +EQU4 $114 +ADDRLP4 0 +INDIRP4 +INDIRP4 +CVPU4 4 +ADDRLP4 36 +INDIRU4 +NEU4 $111 +LABELV $114 +line 233 +;232: +;233: str = UI_Alloc(sizeof(stringDef_t)); +CNSTI4 8 +ARGI4 +ADDRLP4 40 +ADDRGP4 UI_Alloc +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 40 +INDIRP4 +ASGNP4 +line 234 +;234: str->next = NULL; +ADDRLP4 0 +INDIRP4 +CNSTP4 0 +ASGNP4 +line 235 +;235: str->str = &strPool[ph]; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 24 +INDIRI4 +ADDRGP4 strPool +ADDP4 +ASGNP4 +line 236 +;236: if (last) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $115 +line 237 +;237: last->next = str; +ADDRLP4 4 +INDIRP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 238 +;238: } else { +ADDRGP4 $116 +JUMPV +LABELV $115 +line 239 +;239: strHandle[hash] = str; +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 strHandle +ADDP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 240 +;240: } +LABELV $116 +line 241 +;241: return &strPool[ph]; +ADDRLP4 24 +INDIRI4 +ADDRGP4 strPool +ADDP4 +RETP4 +ADDRGP4 $97 +JUMPV +LABELV $109 +line 243 +;242: } +;243: return NULL; +CNSTP4 0 +RETP4 +LABELV $97 +endproc String_Alloc 44 8 +export String_Report +proc String_Report 4 16 +line 246 +;244:} +;245: +;246:void String_Report() { +line 248 +;247: float f; +;248: Com_Printf("Memory/String Pool Info\n"); +ADDRGP4 $118 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 249 +;249: Com_Printf("----------------\n"); +ADDRGP4 $119 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 250 +;250: f = strPoolIndex; +ADDRLP4 0 +ADDRGP4 strPoolIndex +INDIRI4 +CVIF4 4 +ASGNF4 +line 251 +;251: f /= STRING_POOL_SIZE; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1207959552 +DIVF4 +ASGNF4 +line 252 +;252: f *= 100; +ADDRLP4 0 +CNSTF4 1120403456 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 253 +;253: Com_Printf("String Pool is %.1f%% full, %i bytes out of %i used.\n", f, strPoolIndex, STRING_POOL_SIZE); +ADDRGP4 $120 +ARGP4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRGP4 strPoolIndex +INDIRI4 +ARGI4 +CNSTI4 131072 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 254 +;254: f = allocPoint; +ADDRLP4 0 +ADDRGP4 allocPoint +INDIRI4 +CVIF4 4 +ASGNF4 +line 255 +;255: f /= MEM_POOL_SIZE; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1207959552 +DIVF4 +ASGNF4 +line 256 +;256: f *= 100; +ADDRLP4 0 +CNSTF4 1120403456 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 257 +;257: Com_Printf("Memory Pool is %.1f%% full, %i bytes out of %i used.\n", f, allocPoint, MEM_POOL_SIZE); +ADDRGP4 $121 +ARGP4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRGP4 allocPoint +INDIRI4 +ARGI4 +CNSTI4 131072 +ARGI4 +ADDRGP4 Com_Printf +CALLV +pop +line 258 +;258:} +LABELV $117 +endproc String_Report 4 16 +export String_Init +proc String_Init 12 0 +line 265 +;259: +;260:/* +;261:================= +;262:String_Init +;263:================= +;264:*/ +;265:void String_Init() { +line 267 +;266: int i; +;267: for (i = 0; i < HASH_TABLE_SIZE; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $123 +line 268 +;268: strHandle[i] = 0; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 strHandle +ADDP4 +CNSTP4 0 +ASGNP4 +line 269 +;269: } +LABELV $124 +line 267 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2048 +LTI4 $123 +line 270 +;270: strHandleCount = 0; +ADDRGP4 strHandleCount +CNSTI4 0 +ASGNI4 +line 271 +;271: strPoolIndex = 0; +ADDRGP4 strPoolIndex +CNSTI4 0 +ASGNI4 +line 272 +;272: menuCount = 0; +ADDRGP4 menuCount +CNSTI4 0 +ASGNI4 +line 273 +;273: openMenuCount = 0; +ADDRGP4 openMenuCount +CNSTI4 0 +ASGNI4 +line 274 +;274: UI_InitMemory(); +ADDRGP4 UI_InitMemory +CALLV +pop +line 275 +;275: Item_SetupKeywordHash(); +ADDRGP4 Item_SetupKeywordHash +CALLV +pop +line 276 +;276: Menu_SetupKeywordHash(); +ADDRGP4 Menu_SetupKeywordHash +CALLV +pop +line 277 +;277: if (DC && DC->getBindingBuf) { +ADDRLP4 4 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 8 +CNSTU4 0 +ASGNU4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRU4 +EQU4 $127 +ADDRLP4 4 +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 8 +INDIRU4 +EQU4 $127 +line 278 +;278: Controls_GetConfig(); +ADDRGP4 Controls_GetConfig +CALLV +pop +line 279 +;279: } +LABELV $127 +line 280 +;280:} +LABELV $122 +endproc String_Init 12 0 +bss +align 1 +LABELV $130 +skip 4096 +export PC_SourceWarning +code +proc PC_SourceWarning 136 16 +line 287 +;281: +;282:/* +;283:================= +;284:PC_SourceWarning +;285:================= +;286:*/ +;287:void PC_SourceWarning(int handle, char *format, ...) { +line 293 +;288: int line; +;289: char filename[128]; +;290: va_list argptr; +;291: static char string[4096]; +;292: +;293: va_start (argptr, format); +ADDRLP4 132 +ADDRFP4 4+4 +ASGNP4 +line 294 +;294: vsprintf (string, format, argptr); +ADDRGP4 $130 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 132 +INDIRP4 +ARGP4 +ADDRGP4 vsprintf +CALLI4 +pop +line 295 +;295: va_end (argptr); +ADDRLP4 132 +CNSTP4 0 +ASGNP4 +line 297 +;296: +;297: filename[0] = '\0'; +ADDRLP4 4 +CNSTI1 0 +ASGNI1 +line 298 +;298: line = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 299 +;299: trap_PC_SourceFileAndLine(handle, filename, &line); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_PC_SourceFileAndLine +CALLI4 +pop +line 301 +;300: +;301: Com_Printf(S_COLOR_YELLOW "WARNING: %s, line %d: %s\n", filename, line, string); +ADDRGP4 $132 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 $130 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 302 +;302:} +LABELV $129 +endproc PC_SourceWarning 136 16 +bss +align 1 +LABELV $134 +skip 4096 +export PC_SourceError +code +proc PC_SourceError 136 16 +line 309 +;303: +;304:/* +;305:================= +;306:PC_SourceError +;307:================= +;308:*/ +;309:void PC_SourceError(int handle, char *format, ...) { +line 315 +;310: int line; +;311: char filename[128]; +;312: va_list argptr; +;313: static char string[4096]; +;314: +;315: va_start (argptr, format); +ADDRLP4 132 +ADDRFP4 4+4 +ASGNP4 +line 316 +;316: vsprintf (string, format, argptr); +ADDRGP4 $134 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 132 +INDIRP4 +ARGP4 +ADDRGP4 vsprintf +CALLI4 +pop +line 317 +;317: va_end (argptr); +ADDRLP4 132 +CNSTP4 0 +ASGNP4 +line 319 +;318: +;319: filename[0] = '\0'; +ADDRLP4 4 +CNSTI1 0 +ASGNI1 +line 320 +;320: line = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 321 +;321: trap_PC_SourceFileAndLine(handle, filename, &line); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRGP4 trap_PC_SourceFileAndLine +CALLI4 +pop +line 323 +;322: +;323: Com_Printf(S_COLOR_RED "ERROR: %s, line %d: %s\n", filename, line, string); +ADDRGP4 $136 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 $134 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 324 +;324:} +LABELV $133 +endproc PC_SourceError 136 16 +export LerpColor +proc LerpColor 12 0 +line 332 +;325: +;326:/* +;327:================= +;328:LerpColor +;329:================= +;330:*/ +;331:void LerpColor(vec4_t a, vec4_t b, vec4_t c, float t) +;332:{ +line 336 +;333: int i; +;334: +;335: // lerp and clamp each component +;336: for (i=0; i<4; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $138 +line 337 +;337: { +line 338 +;338: c[i] = a[i] + t*(b[i]-a[i]); +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 4 +INDIRI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +ADDRLP4 8 +INDIRF4 +ADDRFP4 12 +INDIRF4 +ADDRLP4 4 +INDIRI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +SUBF4 +MULF4 +ADDF4 +ASGNF4 +line 339 +;339: if (c[i] < 0) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +INDIRF4 +CNSTF4 0 +GEF4 $142 +line 340 +;340: c[i] = 0; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTF4 0 +ASGNF4 +ADDRGP4 $143 +JUMPV +LABELV $142 +line 341 +;341: else if (c[i] > 1.0) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +LEF4 $144 +line 342 +;342: c[i] = 1.0; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 8 +INDIRP4 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +LABELV $144 +LABELV $143 +line 343 +;343: } +LABELV $139 +line 336 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $138 +line 344 +;344:} +LABELV $137 +endproc LerpColor 12 0 +export Float_Parse +proc Float_Parse 16 8 +line 351 +;345: +;346:/* +;347:================= +;348:Float_Parse +;349:================= +;350:*/ +;351:qboolean Float_Parse(char **p, float *f) { +line 353 +;352: char *token; +;353: token = COM_ParseExt((const char **)p, qfalse); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 4 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 354 +;354: if (token && token[0] != 0) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $147 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $147 +line 355 +;355: *f = atof(token); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 atof +CALLF4 +ASGNF4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRF4 +ASGNF4 +line 356 +;356: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $146 +JUMPV +LABELV $147 +line 357 +;357: } else { +line 358 +;358: return qfalse; +CNSTI4 0 +RETI4 +LABELV $146 +endproc Float_Parse 16 8 +export PC_Float_Parse +proc PC_Float_Parse 1052 12 +line 367 +;359: } +;360:} +;361: +;362:/* +;363:================= +;364:PC_Float_Parse +;365:================= +;366:*/ +;367:qboolean PC_Float_Parse(int handle, float *f) { +line 369 +;368: pc_token_t token; +;369: int negative = qfalse; +ADDRLP4 1040 +CNSTI4 0 +ASGNI4 +line 371 +;370: +;371: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1044 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1044 +INDIRI4 +CNSTI4 0 +NEI4 $150 +line 372 +;372: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $149 +JUMPV +LABELV $150 +line 373 +;373: if (token.string[0] == '-') { +ADDRLP4 0+16 +INDIRI1 +CVII4 1 +CNSTI4 45 +NEI4 $152 +line 374 +;374: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1048 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1048 +INDIRI4 +CNSTI4 0 +NEI4 $155 +line 375 +;375: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $149 +JUMPV +LABELV $155 +line 376 +;376: negative = qtrue; +ADDRLP4 1040 +CNSTI4 1 +ASGNI4 +line 377 +;377: } +LABELV $152 +line 378 +;378: if (token.type != TT_NUMBER) { +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +EQI4 $157 +line 379 +;379: PC_SourceError(handle, "expected float but found %s\n", token.string); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 $159 +ARGP4 +ADDRLP4 0+16 +ARGP4 +ADDRGP4 PC_SourceError +CALLV +pop +line 380 +;380: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $149 +JUMPV +LABELV $157 +line 382 +;381: } +;382: if (negative) +ADDRLP4 1040 +INDIRI4 +CNSTI4 0 +EQI4 $161 +line 383 +;383: *f = -token.floatvalue; +ADDRFP4 4 +INDIRP4 +ADDRLP4 0+12 +INDIRF4 +NEGF4 +ASGNF4 +ADDRGP4 $162 +JUMPV +LABELV $161 +line 385 +;384: else +;385: *f = token.floatvalue; +ADDRFP4 4 +INDIRP4 +ADDRLP4 0+12 +INDIRF4 +ASGNF4 +LABELV $162 +line 386 +;386: return qtrue; +CNSTI4 1 +RETI4 +LABELV $149 +endproc PC_Float_Parse 1052 12 +export Color_Parse +proc Color_Parse 12 8 +line 394 +;387:} +;388: +;389:/* +;390:================= +;391:Color_Parse +;392:================= +;393:*/ +;394:qboolean Color_Parse(char **p, vec4_t *c) { +line 398 +;395: int i; +;396: float f; +;397: +;398: for (i = 0; i < 4; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $166 +line 399 +;399: if (!Float_Parse(p, &f)) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $170 +line 400 +;400: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $165 +JUMPV +LABELV $170 +line 402 +;401: } +;402: (*c)[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 403 +;403: } +LABELV $167 +line 398 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $166 +line 404 +;404: return qtrue; +CNSTI4 1 +RETI4 +LABELV $165 +endproc Color_Parse 12 8 +export PC_Color_Parse +proc PC_Color_Parse 12 8 +line 412 +;405:} +;406: +;407:/* +;408:================= +;409:PC_Color_Parse +;410:================= +;411:*/ +;412:qboolean PC_Color_Parse(int handle, vec4_t *c) { +line 416 +;413: int i; +;414: float f; +;415: +;416: for (i = 0; i < 4; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $173 +line 417 +;417: if (!PC_Float_Parse(handle, &f)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $177 +line 418 +;418: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $172 +JUMPV +LABELV $177 +line 420 +;419: } +;420: (*c)[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 421 +;421: } +LABELV $174 +line 416 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $173 +line 422 +;422: return qtrue; +CNSTI4 1 +RETI4 +LABELV $172 +endproc PC_Color_Parse 12 8 +export Int_Parse +proc Int_Parse 16 8 +line 430 +;423:} +;424: +;425:/* +;426:================= +;427:Int_Parse +;428:================= +;429:*/ +;430:qboolean Int_Parse(char **p, int *i) { +line 432 +;431: char *token; +;432: token = COM_ParseExt((const char **)p, qfalse); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 4 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 434 +;433: +;434: if (token && token[0] != 0) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $180 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $180 +line 435 +;435: *i = atoi(token); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 atoi +CALLI4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 436 +;436: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $179 +JUMPV +LABELV $180 +line 437 +;437: } else { +line 438 +;438: return qfalse; +CNSTI4 0 +RETI4 +LABELV $179 +endproc Int_Parse 16 8 +export PC_Int_Parse +proc PC_Int_Parse 1052 12 +line 447 +;439: } +;440:} +;441: +;442:/* +;443:================= +;444:PC_Int_Parse +;445:================= +;446:*/ +;447:qboolean PC_Int_Parse(int handle, int *i) { +line 449 +;448: pc_token_t token; +;449: int negative = qfalse; +ADDRLP4 1040 +CNSTI4 0 +ASGNI4 +line 451 +;450: +;451: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1044 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1044 +INDIRI4 +CNSTI4 0 +NEI4 $183 +line 452 +;452: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $182 +JUMPV +LABELV $183 +line 453 +;453: if (token.string[0] == '-') { +ADDRLP4 0+16 +INDIRI1 +CVII4 1 +CNSTI4 45 +NEI4 $185 +line 454 +;454: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1048 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1048 +INDIRI4 +CNSTI4 0 +NEI4 $188 +line 455 +;455: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $182 +JUMPV +LABELV $188 +line 456 +;456: negative = qtrue; +ADDRLP4 1040 +CNSTI4 1 +ASGNI4 +line 457 +;457: } +LABELV $185 +line 458 +;458: if (token.type != TT_NUMBER) { +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +EQI4 $190 +line 459 +;459: PC_SourceError(handle, "expected integer but found %s\n", token.string); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 $192 +ARGP4 +ADDRLP4 0+16 +ARGP4 +ADDRGP4 PC_SourceError +CALLV +pop +line 460 +;460: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $182 +JUMPV +LABELV $190 +line 462 +;461: } +;462: *i = token.intvalue; +ADDRFP4 4 +INDIRP4 +ADDRLP4 0+8 +INDIRI4 +ASGNI4 +line 463 +;463: if (negative) +ADDRLP4 1040 +INDIRI4 +CNSTI4 0 +EQI4 $195 +line 464 +;464: *i = - *i; +ADDRLP4 1048 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 1048 +INDIRP4 +ADDRLP4 1048 +INDIRP4 +INDIRI4 +NEGI4 +ASGNI4 +LABELV $195 +line 465 +;465: return qtrue; +CNSTI4 1 +RETI4 +LABELV $182 +endproc PC_Int_Parse 1052 12 +export Rect_Parse +proc Rect_Parse 16 8 +line 473 +;466:} +;467: +;468:/* +;469:================= +;470:Rect_Parse +;471:================= +;472:*/ +;473:qboolean Rect_Parse(char **p, rectDef_t *r) { +line 474 +;474: if (Float_Parse(p, &r->x)) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $198 +line 475 +;475: if (Float_Parse(p, &r->y)) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $200 +line 476 +;476: if (Float_Parse(p, &r->w)) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $202 +line 477 +;477: if (Float_Parse(p, &r->h)) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $204 +line 478 +;478: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $197 +JUMPV +LABELV $204 +line 480 +;479: } +;480: } +LABELV $202 +line 481 +;481: } +LABELV $200 +line 482 +;482: } +LABELV $198 +line 483 +;483: return qfalse; +CNSTI4 0 +RETI4 +LABELV $197 +endproc Rect_Parse 16 8 +export PC_Rect_Parse +proc PC_Rect_Parse 16 8 +line 491 +;484:} +;485: +;486:/* +;487:================= +;488:PC_Rect_Parse +;489:================= +;490:*/ +;491:qboolean PC_Rect_Parse(int handle, rectDef_t *r) { +line 492 +;492: if (PC_Float_Parse(handle, &r->x)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $207 +line 493 +;493: if (PC_Float_Parse(handle, &r->y)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $209 +line 494 +;494: if (PC_Float_Parse(handle, &r->w)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $211 +line 495 +;495: if (PC_Float_Parse(handle, &r->h)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $213 +line 496 +;496: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $206 +JUMPV +LABELV $213 +line 498 +;497: } +;498: } +LABELV $211 +line 499 +;499: } +LABELV $209 +line 500 +;500: } +LABELV $207 +line 501 +;501: return qfalse; +CNSTI4 0 +RETI4 +LABELV $206 +endproc PC_Rect_Parse 16 8 +export String_Parse +proc String_Parse 16 8 +line 509 +;502:} +;503: +;504:/* +;505:================= +;506:String_Parse +;507:================= +;508:*/ +;509:qboolean String_Parse(char **p, const char **out) { +line 512 +;510: char *token; +;511: +;512: token = COM_ParseExt((const char **)p, qfalse); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRLP4 4 +ADDRGP4 COM_ParseExt +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 513 +;513: if (token && token[0] != 0) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $216 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $216 +line 514 +;514: *(out) = String_Alloc(token); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 String_Alloc +CALLP4 +ASGNP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 12 +INDIRP4 +ASGNP4 +line 515 +;515: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $215 +JUMPV +LABELV $216 +line 517 +;516: } +;517: return qfalse; +CNSTI4 0 +RETI4 +LABELV $215 +endproc String_Parse 16 8 +data +align 4 +LABELV $219 +address $220 +export PC_String_Parse +code +proc PC_String_Parse 5152 12 +line 526 +;518:} +;519: +;520:/* +;521:================= +;522:PC_String_Parse +;523:================= +;524:*/ +;525:qboolean PC_String_Parse(int handle, const char **out) +;526:{ +line 530 +;527: static char* squiggy = "}"; +;528: pc_token_t token; +;529: +;530: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1040 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1040 +INDIRI4 +CNSTI4 0 +NEI4 $221 +line 531 +;531: { +line 532 +;532: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $218 +JUMPV +LABELV $221 +line 535 +;533: } +;534: +;535: if (token.string[0] == '@') // Is it a localized text? +ADDRLP4 0+16 +INDIRI1 +CVII4 1 +CNSTI4 64 +NEI4 $223 +line 536 +;536: { +line 539 +;537: char *temp; +;538: char text[MAX_STRING_CHARS*4]; +;539: temp = &token.string[0]; +ADDRLP4 5140 +ADDRLP4 0+16 +ASGNP4 +line 543 +;540: +;541: // The +1 is to offset the @ at the beginning of the text +;542:// trap_SP_GetStringTextString(va("%s_%s",stripedFile,(temp+1)), text, sizeof(text)); +;543: trap_SP_GetStringTextString( temp+1 , text, sizeof(text)); // findmeste +ADDRLP4 5140 +INDIRP4 +CNSTI4 1 +ADDP4 +ARGP4 +ADDRLP4 1044 +ARGP4 +CNSTI4 4096 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 545 +;544: +;545: if (text[0] == 0) // Couldn't find it +ADDRLP4 1044 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $227 +line 546 +;546: { +line 547 +;547: Com_Printf(va(S_COLOR_YELLOW "Unable to locate StripEd text '%s'\n", token.string)); +ADDRGP4 $229 +ARGP4 +ADDRLP4 0+16 +ARGP4 +ADDRLP4 5144 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 5144 +INDIRP4 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 548 +;548: *(out) = String_Alloc( token.string ); +ADDRLP4 0+16 +ARGP4 +ADDRLP4 5148 +ADDRGP4 String_Alloc +CALLP4 +ASGNP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 5148 +INDIRP4 +ASGNP4 +line 549 +;549: } +ADDRGP4 $224 +JUMPV +LABELV $227 +line 551 +;550: else +;551: { +line 552 +;552: *(out) = String_Alloc(text); +ADDRLP4 1044 +ARGP4 +ADDRLP4 5144 +ADDRGP4 String_Alloc +CALLP4 +ASGNP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 5144 +INDIRP4 +ASGNP4 +line 553 +;553: } +line 554 +;554: } +ADDRGP4 $224 +JUMPV +LABELV $223 +line 556 +;555: else +;556: { +line 558 +;557: // Save some memory by not return the end squiggy as an allocated string +;558: if ( !Q_stricmp ( token.string, "}" ) ) +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $220 +ARGP4 +ADDRLP4 1044 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 1044 +INDIRI4 +CNSTI4 0 +NEI4 $232 +line 559 +;559: { +line 560 +;560: *(out) = squiggy; +ADDRFP4 4 +INDIRP4 +ADDRGP4 $219 +INDIRP4 +ASGNP4 +line 561 +;561: } +ADDRGP4 $233 +JUMPV +LABELV $232 +line 563 +;562: else +;563: { +line 564 +;564: *(out) = String_Alloc(token.string); +ADDRLP4 0+16 +ARGP4 +ADDRLP4 1048 +ADDRGP4 String_Alloc +CALLP4 +ASGNP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 1048 +INDIRP4 +ASGNP4 +line 565 +;565: } +LABELV $233 +line 566 +;566: } +LABELV $224 +line 568 +;567: +;568: return qtrue; +CNSTI4 1 +RETI4 +LABELV $218 +endproc PC_String_Parse 5152 12 +export PC_Script_Parse +proc PC_Script_Parse 3108 12 +line 576 +;569:} +;570: +;571:/* +;572:================= +;573:PC_Script_Parse +;574:================= +;575:*/ +;576:qboolean PC_Script_Parse(int handle, const char **out) { +line 580 +;577: char script[2048]; +;578: pc_token_t token; +;579: +;580: script[0] = 0; +ADDRLP4 1040 +CNSTI1 0 +ASGNI1 +line 584 +;581: // scripts start with { and have ; separated command lists.. commands are command, arg.. +;582: // basically we want everything between the { } as it will be interpreted at run time +;583: +;584: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 3088 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 3088 +INDIRI4 +CNSTI4 0 +NEI4 $237 +line 585 +;585: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $236 +JUMPV +LABELV $237 +line 586 +;586: if (Q_stricmp(token.string, "{") != 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $242 +ARGP4 +ADDRLP4 3092 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 3092 +INDIRI4 +CNSTI4 0 +EQI4 $244 +line 587 +;587: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $236 +JUMPV +LABELV $243 +line 590 +;588: } +;589: +;590: while ( 1 ) { +line 591 +;591: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 3096 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 3096 +INDIRI4 +CNSTI4 0 +NEI4 $246 +line 592 +;592: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $236 +JUMPV +LABELV $246 +line 594 +;593: +;594: if (Q_stricmp(token.string, "}") == 0) { +ADDRLP4 0+16 +ARGP4 +ADDRGP4 $220 +ARGP4 +ADDRLP4 3100 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 3100 +INDIRI4 +CNSTI4 0 +NEI4 $248 +line 595 +;595: *out = String_Alloc(script); +ADDRLP4 1040 +ARGP4 +ADDRLP4 3104 +ADDRGP4 String_Alloc +CALLP4 +ASGNP4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 3104 +INDIRP4 +ASGNP4 +line 596 +;596: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $236 +JUMPV +LABELV $248 +line 599 +;597: } +;598: +;599: if (token.string[1] != '\0') { +ADDRLP4 0+16+1 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $251 +line 600 +;600: Q_strcat(script, 2048, va("\"%s\"", token.string)); +ADDRGP4 $255 +ARGP4 +ADDRLP4 0+16 +ARGP4 +ADDRLP4 3104 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 1040 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRLP4 3104 +INDIRP4 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 601 +;601: } else { +ADDRGP4 $252 +JUMPV +LABELV $251 +line 602 +;602: Q_strcat(script, 2048, token.string); +ADDRLP4 1040 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRLP4 0+16 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 603 +;603: } +LABELV $252 +line 604 +;604: Q_strcat(script, 2048, " "); +ADDRLP4 1040 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRGP4 $258 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 605 +;605: } +LABELV $244 +line 590 +ADDRGP4 $243 +JUMPV +line 606 +;606: return qfalse; // bk001105 - LCC missing return value +CNSTI4 0 +RETI4 +LABELV $236 +endproc PC_Script_Parse 3108 12 +export Init_Display +proc Init_Display 0 0 +line 619 +;607:} +;608: +;609:// display, window, menu, item code +;610:// +;611: +;612:/* +;613:================== +;614:Init_Display +;615: +;616:Initializes the display with a structure to all the drawing routines +;617: ================== +;618:*/ +;619:void Init_Display(displayContextDef_t *dc) { +line 620 +;620: DC = dc; +ADDRGP4 DC +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 621 +;621:} +LABELV $259 +endproc Init_Display 0 0 +export GradientBar_Paint +proc GradientBar_Paint 12 20 +line 627 +;622: +;623: +;624: +;625:// type and style painting +;626: +;627:void GradientBar_Paint(rectDef_t *rect, vec4_t color) { +line 629 +;628: // gradient bar takes two paints +;629: DC->setColor( color ); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 630 +;630: DC->drawHandlePic(rect->x, rect->y, rect->w, rect->h, DC->Assets.gradientBar); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 4 +CNSTI4 8 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ADDP4 +INDIRP4 +CALLV +pop +line 631 +;631: DC->setColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 632 +;632:} +LABELV $260 +endproc GradientBar_Paint 12 20 +export Window_Init +proc Window_Init 8 12 +line 643 +;633: +;634: +;635:/* +;636:================== +;637:Window_Init +;638: +;639:Initializes a window structure ( windowDef_t ) with defaults +;640: +;641:================== +;642:*/ +;643:void Window_Init(Window *w) { +line 644 +;644: memset(w, 0, sizeof(windowDef_t)); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 180 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 645 +;645: w->borderSize = 1; +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +CNSTF4 1065353216 +ASGNF4 +line 646 +;646: w->foreColor[0] = w->foreColor[1] = w->foreColor[2] = w->foreColor[3] = 1.0; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 120 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 647 +;647: w->cinematic = -1; +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 648 +;648:} +LABELV $261 +endproc Window_Init 8 12 +export Fade +proc Fade 8 0 +line 650 +;649: +;650:void Fade(int *flags, float *f, float clamp, int *nextTime, int offsetTime, qboolean bFlags, float fadeAmount) { +line 651 +;651: if (*flags & (WINDOW_FADINGOUT | WINDOW_FADINGIN)) { +ADDRFP4 0 +INDIRP4 +INDIRI4 +CNSTI4 96 +BANDI4 +CNSTI4 0 +EQI4 $263 +line 652 +;652: if (DC->realTime > *nextTime) { +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRFP4 12 +INDIRP4 +INDIRI4 +LEI4 $265 +line 653 +;653: *nextTime = DC->realTime + offsetTime; +ADDRFP4 12 +INDIRP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRFP4 16 +INDIRI4 +ADDI4 +ASGNI4 +line 654 +;654: if (*flags & WINDOW_FADINGOUT) { +ADDRFP4 0 +INDIRP4 +INDIRI4 +CNSTI4 32 +BANDI4 +CNSTI4 0 +EQI4 $267 +line 655 +;655: *f -= fadeAmount; +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 24 +INDIRF4 +SUBF4 +ASGNF4 +line 656 +;656: if (bFlags && *f <= 0.0) { +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $268 +ADDRFP4 4 +INDIRP4 +INDIRF4 +CNSTF4 0 +GTF4 $268 +line 657 +;657: *flags &= ~(WINDOW_FADINGOUT | WINDOW_VISIBLE); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 -37 +BANDI4 +ASGNI4 +line 658 +;658: } +line 659 +;659: } else { +ADDRGP4 $268 +JUMPV +LABELV $267 +line 660 +;660: *f += fadeAmount; +ADDRLP4 0 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 24 +INDIRF4 +ADDF4 +ASGNF4 +line 661 +;661: if (*f >= clamp) { +ADDRFP4 4 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRF4 +LTF4 $271 +line 662 +;662: *f = clamp; +ADDRFP4 4 +INDIRP4 +ADDRFP4 8 +INDIRF4 +ASGNF4 +line 663 +;663: if (bFlags) { +ADDRFP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $273 +line 664 +;664: *flags &= ~WINDOW_FADINGIN; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 -65 +BANDI4 +ASGNI4 +line 665 +;665: } +LABELV $273 +line 666 +;666: } +LABELV $271 +line 667 +;667: } +LABELV $268 +line 668 +;668: } +LABELV $265 +line 669 +;669: } +LABELV $263 +line 670 +;670:} +LABELV $262 +endproc Fade 8 0 +export Window_Paint +proc Window_Paint 60 28 +line 675 +;671: +;672: +;673: +;674:void Window_Paint(Window *w, float fadeAmount, float fadeClamp, float fadeCycle) +;675:{ +line 678 +;676: //float bordersize = 0; +;677: vec4_t color; +;678: rectDef_t fillRect = w->rect; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 16 +line 681 +;679: +;680: +;681: if (debugMode) +ADDRGP4 debugMode +INDIRI4 +CNSTI4 0 +EQI4 $276 +line 682 +;682: { +line 683 +;683: color[0] = color[1] = color[2] = color[3] = 1; +ADDRLP4 32 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 16+12 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 16+8 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 16+4 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 684 +;684: DC->drawRect(w->rect.x, w->rect.y, w->rect.w, w->rect.h, 1, color); +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 16 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRP4 +CALLV +pop +line 685 +;685: } +LABELV $276 +line 687 +;686: +;687: if (w == NULL || (w->style == 0 && w->border == 0)) +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $283 +ADDRLP4 36 +CNSTI4 0 +ASGNI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +ADDRLP4 36 +INDIRI4 +NEI4 $281 +ADDRLP4 32 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +ADDRLP4 36 +INDIRI4 +NEI4 $281 +LABELV $283 +line 688 +;688: { +line 689 +;689: return; +ADDRGP4 $275 +JUMPV +LABELV $281 +line 692 +;690: } +;691: +;692: if (w->border != 0) +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $284 +line 693 +;693: { +line 694 +;694: fillRect.x += w->borderSize; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 695 +;695: fillRect.y += w->borderSize; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 696 +;696: fillRect.w -= w->borderSize + 1; +ADDRLP4 0+8 +ADDRLP4 0+8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +SUBF4 +ASGNF4 +line 697 +;697: fillRect.h -= w->borderSize + 1; +ADDRLP4 0+12 +ADDRLP4 0+12 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +SUBF4 +ASGNF4 +line 698 +;698: } +LABELV $284 +line 700 +;699: +;700: if (w->style == WINDOW_STYLE_FILLED) +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $289 +line 701 +;701: { +line 703 +;702: // box, but possible a shader that needs filled +;703: if (w->background) +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $291 +line 704 +;704: { +line 705 +;705: Fade(&w->flags, &w->backColor[3], fadeClamp, &w->nextTime, fadeCycle, qtrue, fadeAmount); +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 68 +ADDP4 +ARGP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 140 +ADDP4 +ARGP4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 108 +ADDP4 +ARGP4 +ADDRFP4 12 +INDIRF4 +CVFI4 4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRGP4 Fade +CALLV +pop +line 706 +;706: DC->setColor(w->backColor); +ADDRFP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 707 +;707: DC->drawHandlePic(fillRect.x, fillRect.y, fillRect.w, fillRect.h, w->background); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0+4 +INDIRF4 +ARGF4 +ADDRLP4 0+8 +INDIRF4 +ARGF4 +ADDRLP4 0+12 +INDIRF4 +ARGF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 708 +;708: DC->setColor(NULL); +CNSTP4 0 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 709 +;709: } +ADDRGP4 $290 +JUMPV +LABELV $291 +line 711 +;710: else +;711: { +line 712 +;712: DC->fillRect(fillRect.x, fillRect.y, fillRect.w, fillRect.h, w->backColor); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0+4 +INDIRF4 +ARGF4 +ADDRLP4 0+8 +INDIRF4 +ARGF4 +ADDRLP4 0+12 +INDIRF4 +ARGF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRP4 +CALLV +pop +line 713 +;713: } +line 714 +;714: } +ADDRGP4 $290 +JUMPV +LABELV $289 +line 715 +;715: else if (w->style == WINDOW_STYLE_GRADIENT) +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $299 +line 716 +;716: { +line 717 +;717: GradientBar_Paint(&fillRect, w->backColor); +ADDRLP4 0 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ARGP4 +ADDRGP4 GradientBar_Paint +CALLV +pop +line 719 +;718: // gradient bar +;719: } +ADDRGP4 $300 +JUMPV +LABELV $299 +line 720 +;720: else if (w->style == WINDOW_STYLE_SHADER) +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $301 +line 721 +;721: { +line 722 +;722: if (w->flags & WINDOW_FORECOLORSET) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 512 +BANDI4 +CNSTI4 0 +EQI4 $303 +line 723 +;723: { +line 724 +;724: DC->setColor(w->foreColor); +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 725 +;725: } +LABELV $303 +line 726 +;726: DC->drawHandlePic(fillRect.x, fillRect.y, fillRect.w, fillRect.h, w->background); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0+4 +INDIRF4 +ARGF4 +ADDRLP4 0+8 +INDIRF4 +ARGF4 +ADDRLP4 0+12 +INDIRF4 +ARGF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 727 +;727: DC->setColor(NULL); +CNSTP4 0 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 728 +;728: } +ADDRGP4 $302 +JUMPV +LABELV $301 +line 729 +;729: else if (w->style == WINDOW_STYLE_TEAMCOLOR) +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 4 +NEI4 $308 +line 730 +;730: { +line 731 +;731: if (DC->getTeamColor) +ADDRGP4 DC +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $309 +line 732 +;732: { +line 733 +;733: DC->getTeamColor(&color); +ADDRLP4 16 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRP4 +CALLV +pop +line 734 +;734: DC->fillRect(fillRect.x, fillRect.y, fillRect.w, fillRect.h, color); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0+4 +INDIRF4 +ARGF4 +ADDRLP4 0+8 +INDIRF4 +ARGF4 +ADDRLP4 0+12 +INDIRF4 +ARGF4 +ADDRLP4 16 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRP4 +CALLV +pop +line 735 +;735: } +line 736 +;736: } +ADDRGP4 $309 +JUMPV +LABELV $308 +line 737 +;737: else if (w->style == WINDOW_STYLE_CINEMATIC) +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $315 +line 738 +;738: { +line 739 +;739: if (w->cinematic == -1) +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 -1 +NEI4 $317 +line 740 +;740: { +line 741 +;741: w->cinematic = DC->playCinematic(w->cinematicName, fillRect.x, fillRect.y, fillRect.w, fillRect.h); +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0+4 +INDIRF4 +ARGF4 +ADDRLP4 0+8 +INDIRF4 +ARGF4 +ADDRLP4 0+12 +INDIRF4 +ARGF4 +ADDRLP4 44 +ADDRGP4 DC +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDRLP4 44 +INDIRI4 +ASGNI4 +line 742 +;742: if (w->cinematic == -1) +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 -1 +NEI4 $322 +line 743 +;743: { +line 744 +;744: w->cinematic = -2; +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTI4 -2 +ASGNI4 +line 745 +;745: } +LABELV $322 +line 746 +;746: } +LABELV $317 +line 747 +;747: if (w->cinematic >= 0) +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LTI4 $324 +line 748 +;748: { +line 749 +;749: DC->runCinematicFrame(w->cinematic); +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CALLV +pop +line 750 +;750: DC->drawCinematic(w->cinematic, fillRect.x, fillRect.y, fillRect.w, fillRect.h); +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 0+4 +INDIRF4 +ARGF4 +ADDRLP4 0+8 +INDIRF4 +ARGF4 +ADDRLP4 0+12 +INDIRF4 +ARGF4 +ADDRGP4 DC +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRP4 +CALLV +pop +line 751 +;751: } +LABELV $324 +line 752 +;752: } +LABELV $315 +LABELV $309 +LABELV $302 +LABELV $300 +LABELV $290 +line 754 +;753: +;754: if (w->border == WINDOW_BORDER_FULL) +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $329 +line 755 +;755: { +line 758 +;756: // full +;757: // HACK HACK HACK +;758: if (w->style == WINDOW_STYLE_TEAMCOLOR) +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 4 +NEI4 $331 +line 759 +;759: { +line 760 +;760: if (color[0] > 0) +ADDRLP4 16 +INDIRF4 +CNSTF4 0 +LEF4 $333 +line 761 +;761: { +line 763 +;762: // red +;763: color[0] = 1; +ADDRLP4 16 +CNSTF4 1065353216 +ASGNF4 +line 764 +;764: color[1] = color[2] = .5; +ADDRLP4 40 +CNSTF4 1056964608 +ASGNF4 +ADDRLP4 16+8 +ADDRLP4 40 +INDIRF4 +ASGNF4 +ADDRLP4 16+4 +ADDRLP4 40 +INDIRF4 +ASGNF4 +line 765 +;765: } +ADDRGP4 $334 +JUMPV +LABELV $333 +line 767 +;766: else +;767: { +line 768 +;768: color[2] = 1; +ADDRLP4 16+8 +CNSTF4 1065353216 +ASGNF4 +line 769 +;769: color[0] = color[1] = .5; +ADDRLP4 40 +CNSTF4 1056964608 +ASGNF4 +ADDRLP4 16+4 +ADDRLP4 40 +INDIRF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 40 +INDIRF4 +ASGNF4 +line 770 +;770: } +LABELV $334 +line 771 +;771: color[3] = 1; +ADDRLP4 16+12 +CNSTF4 1065353216 +ASGNF4 +line 772 +;772: DC->drawRect(w->rect.x, w->rect.y, w->rect.w, w->rect.h, w->borderSize, color); +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 16 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRP4 +CALLV +pop +line 773 +;773: } +ADDRGP4 $330 +JUMPV +LABELV $331 +line 775 +;774: else +;775: { +line 776 +;776: DC->drawRect(w->rect.x, w->rect.y, w->rect.w, w->rect.h, w->borderSize, w->borderColor); +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 144 +ADDP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRP4 +CALLV +pop +line 777 +;777: } +line 778 +;778: } +ADDRGP4 $330 +JUMPV +LABELV $329 +line 779 +;779: else if (w->border == WINDOW_BORDER_HORZ) +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $340 +line 780 +;780: { +line 782 +;781: // top/bottom +;782: DC->setColor(w->borderColor); +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 783 +;783: DC->drawTopBottom(w->rect.x, w->rect.y, w->rect.w, w->rect.h, w->borderSize); +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 DC +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRP4 +CALLV +pop +line 784 +;784: DC->setColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 785 +;785: } +ADDRGP4 $341 +JUMPV +LABELV $340 +line 786 +;786: else if (w->border == WINDOW_BORDER_VERT) +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 3 +NEI4 $342 +line 787 +;787: { +line 789 +;788: // left right +;789: DC->setColor(w->borderColor); +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 790 +;790: DC->drawSides(w->rect.x, w->rect.y, w->rect.w, w->rect.h, w->borderSize); +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 DC +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRP4 +CALLV +pop +line 791 +;791: DC->setColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 792 +;792: } +ADDRGP4 $343 +JUMPV +LABELV $342 +line 793 +;793: else if (w->border == WINDOW_BORDER_KCGRADIENT) +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 4 +NEI4 $344 +line 794 +;794: { +line 796 +;795: // this is just two gradient bars along each horz edge +;796: rectDef_t r = w->rect; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 16 +line 797 +;797: r.h = w->borderSize; +ADDRLP4 40+12 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ASGNF4 +line 798 +;798: GradientBar_Paint(&r, w->borderColor); +ADDRLP4 40 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +ARGP4 +ADDRGP4 GradientBar_Paint +CALLV +pop +line 799 +;799: r.y = w->rect.y + w->rect.h - 1; +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40+4 +ADDRLP4 56 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1065353216 +SUBF4 +ASGNF4 +line 800 +;800: GradientBar_Paint(&r, w->borderColor); +ADDRLP4 40 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +ARGP4 +ADDRGP4 GradientBar_Paint +CALLV +pop +line 801 +;801: } +LABELV $344 +LABELV $343 +LABELV $341 +LABELV $330 +line 802 +;802:} +LABELV $275 +endproc Window_Paint 60 28 +export Item_SetScreenCoords +proc Item_SetScreenCoords 24 4 +line 806 +;803: +;804: +;805:void Item_SetScreenCoords(itemDef_t *item, float x, float y) +;806:{ +line 807 +;807: if (item == NULL) +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $349 +line 808 +;808: { +line 809 +;809: return; +ADDRGP4 $348 +JUMPV +LABELV $349 +line 812 +;810: } +;811: +;812: if (item->window.border != 0) +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $351 +line 813 +;813: { +line 814 +;814: x += item->window.borderSize; +ADDRFP4 4 +ADDRFP4 4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 815 +;815: y += item->window.borderSize; +ADDRFP4 8 +ADDRFP4 8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 816 +;816: } +LABELV $351 +line 818 +;817: +;818: item->window.rect.x = x + item->window.rectClient.x; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRFP4 4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 819 +;819: item->window.rect.y = y + item->window.rectClient.y; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRFP4 8 +INDIRF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 820 +;820: item->window.rect.w = item->window.rectClient.w; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ASGNF4 +line 821 +;821: item->window.rect.h = item->window.rectClient.h; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ASGNF4 +line 824 +;822: +;823: // force the text rects to recompute +;824: item->textRect.w = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +CNSTF4 0 +ASGNF4 +line 825 +;825: item->textRect.h = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 192 +ADDP4 +CNSTF4 0 +ASGNF4 +line 827 +;826: +;827: switch ( item->type) +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 14 +EQI4 $356 +ADDRGP4 $353 +JUMPV +line 828 +;828: { +LABELV $356 +line 830 +;829: case ITEM_TYPE_TEXTSCROLL: +;830: { +line 831 +;831: textScrollDef_t *scrollPtr = (textScrollDef_t*)item->typeData; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 832 +;832: if ( scrollPtr ) +ADDRLP4 20 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $357 +line 833 +;833: { +line 834 +;834: scrollPtr->startPos = 0; +ADDRLP4 20 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 835 +;835: scrollPtr->endPos = 0; +ADDRLP4 20 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 0 +ASGNI4 +line 836 +;836: } +LABELV $357 +line 838 +;837: +;838: Item_TextScroll_BuildLines ( item ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_TextScroll_BuildLines +CALLV +pop +line 840 +;839: +;840: break; +LABELV $353 +LABELV $354 +line 843 +;841: } +;842: } +;843:} +LABELV $348 +endproc Item_SetScreenCoords 24 4 +export Item_UpdatePosition +proc Item_UpdatePosition 20 12 +line 846 +;844: +;845:// FIXME: consolidate this with nearby stuff +;846:void Item_UpdatePosition(itemDef_t *item) { +line 850 +;847: float x, y; +;848: menuDef_t *menu; +;849: +;850: if (item == NULL || item->parent == NULL) { +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +CNSTU4 0 +ASGNU4 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +ADDRLP4 16 +INDIRU4 +EQU4 $362 +ADDRLP4 12 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 16 +INDIRU4 +NEU4 $360 +LABELV $362 +line 851 +;851: return; +ADDRGP4 $359 +JUMPV +LABELV $360 +line 854 +;852: } +;853: +;854: menu = item->parent; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 856 +;855: +;856: x = menu->window.rect.x; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 857 +;857: y = menu->window.rect.y; +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 859 +;858: +;859: if (menu->window.border != 0) { +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $363 +line 860 +;860: x += menu->window.borderSize; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 861 +;861: y += menu->window.borderSize; +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 862 +;862: } +LABELV $363 +line 864 +;863: +;864: Item_SetScreenCoords(item, x, y); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 Item_SetScreenCoords +CALLV +pop +line 866 +;865: +;866:} +LABELV $359 +endproc Item_UpdatePosition 20 12 +export Menu_UpdatePosition +proc Menu_UpdatePosition 12 12 +line 869 +;867: +;868:// menus +;869:void Menu_UpdatePosition(menuDef_t *menu) { +line 873 +;870: int i; +;871: float x, y; +;872: +;873: if (menu == NULL) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $366 +line 874 +;874: return; +ADDRGP4 $365 +JUMPV +LABELV $366 +line 877 +;875: } +;876: +;877: x = menu->window.rect.x; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 878 +;878: y = menu->window.rect.y; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 879 +;879: if (menu->window.border != 0) { +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $368 +line 880 +;880: x += menu->window.borderSize; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 881 +;881: y += menu->window.borderSize; +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 882 +;882: } +LABELV $368 +line 884 +;883: +;884: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $373 +JUMPV +LABELV $370 +line 885 +;885: Item_SetScreenCoords(menu->items[i], x, y); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRGP4 Item_SetScreenCoords +CALLV +pop +line 886 +;886: } +LABELV $371 +line 884 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $373 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $370 +line 887 +;887:} +LABELV $365 +endproc Menu_UpdatePosition 12 12 +export Menu_PostParse +proc Menu_PostParse 0 4 +line 889 +;888: +;889:void Menu_PostParse(menuDef_t *menu) { +line 890 +;890: if (menu == NULL) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $375 +line 891 +;891: return; +ADDRGP4 $374 +JUMPV +LABELV $375 +line 893 +;892: } +;893: if (menu->fullScreen) { +ADDRFP4 0 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $377 +line 894 +;894: menu->window.rect.x = 0; +ADDRFP4 0 +INDIRP4 +CNSTF4 0 +ASGNF4 +line 895 +;895: menu->window.rect.y = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 0 +ASGNF4 +line 896 +;896: menu->window.rect.w = 640; +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 1142947840 +ASGNF4 +line 897 +;897: menu->window.rect.h = 480; +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTF4 1139802112 +ASGNF4 +line 898 +;898: } +LABELV $377 +line 899 +;899: Menu_UpdatePosition(menu); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menu_UpdatePosition +CALLV +pop +line 900 +;900:} +LABELV $374 +endproc Menu_PostParse 0 4 +export Menu_ClearFocus +proc Menu_ClearFocus 20 8 +line 902 +;901: +;902:itemDef_t *Menu_ClearFocus(menuDef_t *menu) { +line 904 +;903: int i; +;904: itemDef_t *ret = NULL; +ADDRLP4 4 +CNSTP4 0 +ASGNP4 +line 906 +;905: +;906: if (menu == NULL) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $380 +line 907 +;907: return NULL; +CNSTP4 0 +RETP4 +ADDRGP4 $379 +JUMPV +LABELV $380 +line 910 +;908: } +;909: +;910: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $385 +JUMPV +LABELV $382 +line 911 +;911: if (menu->items[i]->window.flags & WINDOW_HASFOCUS) { +ADDRLP4 8 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +BANDI4 +CNSTI4 0 +EQI4 $386 +line 912 +;912: ret = menu->items[i]; +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +line 913 +;913: } +LABELV $386 +line 914 +;914: menu->items[i]->window.flags &= ~WINDOW_HASFOCUS; +ADDRLP4 12 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +CNSTI4 -3 +BANDI4 +ASGNI4 +line 915 +;915: if (menu->items[i]->leaveFocus) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $388 +line 916 +;916: Item_RunScript(menu->items[i], menu->items[i]->leaveFocus); +ADDRLP4 16 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 272 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 917 +;917: } +LABELV $388 +line 918 +;918: } +LABELV $383 +line 910 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $385 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $382 +line 920 +;919: +;920: return ret; +ADDRLP4 4 +INDIRP4 +RETP4 +LABELV $379 +endproc Menu_ClearFocus 20 8 +export IsVisible +proc IsVisible 12 0 +line 923 +;921:} +;922: +;923:qboolean IsVisible(int flags) { +line 924 +;924: return (flags & WINDOW_VISIBLE && !(flags & WINDOW_FADINGOUT)); +ADDRLP4 4 +ADDRFP4 0 +INDIRI4 +ASGNI4 +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 4 +BANDI4 +ADDRLP4 8 +INDIRI4 +EQI4 $392 +ADDRLP4 4 +INDIRI4 +CNSTI4 32 +BANDI4 +ADDRLP4 8 +INDIRI4 +NEI4 $392 +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +ADDRGP4 $393 +JUMPV +LABELV $392 +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $393 +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $390 +endproc IsVisible 12 0 +export Rect_ContainsPoint +proc Rect_ContainsPoint 20 0 +line 927 +;925:} +;926: +;927:qboolean Rect_ContainsPoint(rectDef_t *rect, float x, float y) { +line 928 +;928: if (rect) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $395 +line 929 +;929: if (x > rect->x && x < rect->x + rect->w && y > rect->y && y < rect->y + rect->h) { +ADDRLP4 0 +ADDRFP4 4 +INDIRF4 +ASGNF4 +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ASGNF4 +ADDRLP4 0 +INDIRF4 +ADDRLP4 8 +INDIRF4 +LEF4 $397 +ADDRLP4 0 +INDIRF4 +ADDRLP4 8 +INDIRF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +GEF4 $397 +ADDRLP4 12 +ADDRFP4 8 +INDIRF4 +ASGNF4 +ADDRLP4 16 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 16 +INDIRF4 +LEF4 $397 +ADDRLP4 12 +INDIRF4 +ADDRLP4 16 +INDIRF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +GEF4 $397 +line 930 +;930: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $394 +JUMPV +LABELV $397 +line 932 +;931: } +;932: } +LABELV $395 +line 933 +;933: return qfalse; +CNSTI4 0 +RETI4 +LABELV $394 +endproc Rect_ContainsPoint 20 0 +export Menu_ItemsMatchingGroup +proc Menu_ItemsMatchingGroup 20 8 +line 936 +;934:} +;935: +;936:int Menu_ItemsMatchingGroup(menuDef_t *menu, const char *name) { +line 938 +;937: int i; +;938: int count = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 939 +;939: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $403 +JUMPV +LABELV $400 +line 940 +;940: if (Q_stricmp(menu->items[i]->window.name, name) == 0 || (menu->items[i]->window.group && Q_stricmp(menu->items[i]->window.group, name) == 0)) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $406 +ADDRLP4 12 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $404 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $404 +LABELV $406 +line 941 +;941: count++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 942 +;942: } +LABELV $404 +line 943 +;943: } +LABELV $401 +line 939 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $403 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $400 +line 944 +;944: return count; +ADDRLP4 4 +INDIRI4 +RETI4 +LABELV $399 +endproc Menu_ItemsMatchingGroup 20 8 +export Menu_GetMatchingItemByNumber +proc Menu_GetMatchingItemByNumber 20 8 +line 947 +;945:} +;946: +;947:itemDef_t *Menu_GetMatchingItemByNumber(menuDef_t *menu, int index, const char *name) { +line 949 +;948: int i; +;949: int count = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 950 +;950: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $411 +JUMPV +LABELV $408 +line 951 +;951: if (Q_stricmp(menu->items[i]->window.name, name) == 0 || (menu->items[i]->window.group && Q_stricmp(menu->items[i]->window.group, name) == 0)) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $414 +ADDRLP4 12 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $412 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $412 +LABELV $414 +line 952 +;952: if (count == index) { +ADDRLP4 4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +NEI4 $415 +line 953 +;953: return menu->items[i]; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +RETP4 +ADDRGP4 $407 +JUMPV +LABELV $415 +line 955 +;954: } +;955: count++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 956 +;956: } +LABELV $412 +line 957 +;957: } +LABELV $409 +line 950 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $411 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $408 +line 958 +;958: return NULL; +CNSTP4 0 +RETP4 +LABELV $407 +endproc Menu_GetMatchingItemByNumber 20 8 +export Script_SetColor +proc Script_SetColor 36 8 +line 962 +;959:} +;960: +;961:qboolean Script_SetColor ( itemDef_t *item, char **args ) +;962:{ +line 969 +;963: const char *name; +;964: int i; +;965: float f; +;966: vec4_t *out; +;967: +;968: // expecting type of color to set and 4 args for the color +;969: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 16 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $418 +line 970 +;970: { +line 971 +;971: out = NULL; +ADDRLP4 8 +CNSTP4 0 +ASGNP4 +line 972 +;972: if (Q_stricmp(name, "backcolor") == 0) +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRGP4 $422 +ARGP4 +ADDRLP4 20 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $420 +line 973 +;973: { +line 974 +;974: out = &item->window.backColor; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ASGNP4 +line 975 +;975: item->window.flags |= WINDOW_BACKCOLORSET; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 4194304 +BORI4 +ASGNI4 +line 976 +;976: } +ADDRGP4 $421 +JUMPV +LABELV $420 +line 977 +;977: else if (Q_stricmp(name, "forecolor") == 0) +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRGP4 $425 +ARGP4 +ADDRLP4 24 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +NEI4 $423 +line 978 +;978: { +line 979 +;979: out = &item->window.foreColor; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ASGNP4 +line 980 +;980: item->window.flags |= WINDOW_FORECOLORSET; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRI4 +CNSTI4 512 +BORI4 +ASGNI4 +line 981 +;981: } +ADDRGP4 $424 +JUMPV +LABELV $423 +line 982 +;982: else if (Q_stricmp(name, "bordercolor") == 0) +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRGP4 $428 +ARGP4 +ADDRLP4 28 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +NEI4 $426 +line 983 +;983: { +line 984 +;984: out = &item->window.borderColor; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +ASGNP4 +line 985 +;985: } +LABELV $426 +LABELV $424 +LABELV $421 +line 987 +;986: +;987: if (out) +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $429 +line 988 +;988: { +line 989 +;989: for (i = 0; i < 4; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $431 +line 990 +;990: { +line 991 +;991: if (!Float_Parse(args, &f)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 32 +ADDRGP4 Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +NEI4 $435 +line 992 +;992: { +line 993 +;993: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $417 +JUMPV +LABELV $435 +line 995 +;994: } +;995: (*out)[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 8 +INDIRP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 996 +;996: } +LABELV $432 +line 989 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $431 +line 997 +;997: } +LABELV $429 +line 998 +;998: } +LABELV $418 +line 1000 +;999: +;1000: return qtrue; +CNSTI4 1 +RETI4 +LABELV $417 +endproc Script_SetColor 36 8 +export Script_SetAsset +proc Script_SetAsset 8 8 +line 1004 +;1001:} +;1002: +;1003:qboolean Script_SetAsset(itemDef_t *item, char **args) +;1004:{ +line 1007 +;1005: const char *name; +;1006: // expecting name to set asset to +;1007: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $438 +line 1008 +;1008: { +line 1010 +;1009: // check for a model +;1010: if (item->type == ITEM_TYPE_MODEL) +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 7 +NEI4 $440 +line 1011 +;1011: { +line 1012 +;1012: } +LABELV $440 +line 1013 +;1013: } +LABELV $438 +line 1014 +;1014: return qtrue; +CNSTI4 1 +RETI4 +LABELV $437 +endproc Script_SetAsset 8 8 +export Script_SetBackground +proc Script_SetBackground 12 8 +line 1018 +;1015:} +;1016: +;1017:qboolean Script_SetBackground(itemDef_t *item, char **args) +;1018:{ +line 1021 +;1019: const char *name; +;1020: // expecting name to set asset to +;1021: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $443 +line 1022 +;1022: { +line 1023 +;1023: item->window.background = DC->registerShaderNoMip(name); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 1024 +;1024: } +LABELV $443 +line 1025 +;1025: return qtrue; +CNSTI4 1 +RETI4 +LABELV $442 +endproc Script_SetBackground 12 8 +export Menu_FindItemByName +proc Menu_FindItemByName 12 8 +line 1029 +;1026:} +;1027: +;1028: +;1029:itemDef_t *Menu_FindItemByName(menuDef_t *menu, const char *p) { +line 1031 +;1030: int i; +;1031: if (menu == NULL || p == NULL) { +ADDRLP4 4 +CNSTU4 0 +ASGNU4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 4 +INDIRU4 +EQU4 $448 +ADDRFP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 4 +INDIRU4 +NEU4 $446 +LABELV $448 +line 1032 +;1032: return NULL; +CNSTP4 0 +RETP4 +ADDRGP4 $445 +JUMPV +LABELV $446 +line 1035 +;1033: } +;1034: +;1035: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $452 +JUMPV +LABELV $449 +line 1036 +;1036: if (Q_stricmp(p, menu->items[i]->window.name) == 0) { +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $453 +line 1037 +;1037: return menu->items[i]; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +RETP4 +ADDRGP4 $445 +JUMPV +LABELV $453 +line 1039 +;1038: } +;1039: } +LABELV $450 +line 1035 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $452 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $449 +line 1041 +;1040: +;1041: return NULL; +CNSTP4 0 +RETP4 +LABELV $445 +endproc Menu_FindItemByName 12 8 +export Script_SetTeamColor +proc Script_SetTeamColor 24 4 +line 1045 +;1042:} +;1043: +;1044:qboolean Script_SetTeamColor(itemDef_t *item, char **args) +;1045:{ +line 1046 +;1046: if (DC->getTeamColor) +ADDRGP4 DC +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $456 +line 1047 +;1047: { +line 1050 +;1048: int i; +;1049: vec4_t color; +;1050: DC->getTeamColor(&color); +ADDRLP4 4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRP4 +CALLV +pop +line 1051 +;1051: for (i = 0; i < 4; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $458 +line 1052 +;1052: { +line 1053 +;1053: item->window.backColor[i] = color[i]; +ADDRLP4 20 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ADDP4 +ADDRLP4 20 +INDIRI4 +ADDRLP4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 1054 +;1054: } +LABELV $459 +line 1051 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $458 +line 1055 +;1055: } +LABELV $456 +line 1056 +;1056: return qtrue; +CNSTI4 1 +RETI4 +LABELV $455 +endproc Script_SetTeamColor 24 4 +export Script_SetItemColor +proc Script_SetItemColor 80 12 +line 1060 +;1057:} +;1058: +;1059:qboolean Script_SetItemColor(itemDef_t *item, char **args) +;1060:{ +line 1068 +;1061: const char *itemname; +;1062: const char *name; +;1063: vec4_t color; +;1064: int i; +;1065: vec4_t *out; +;1066: +;1067: // expecting type of color to set and 4 args for the color +;1068: if (String_Parse(args, &itemname) && String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 32 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $463 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 28 +ARGP4 +ADDRLP4 36 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +EQI4 $463 +line 1069 +;1069: { +line 1072 +;1070: itemDef_t *item2; +;1071: int j; +;1072: int count = Menu_ItemsMatchingGroup(item->parent, itemname); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRLP4 52 +ADDRGP4 Menu_ItemsMatchingGroup +CALLI4 +ASGNI4 +ADDRLP4 48 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 1074 +;1073: +;1074: if (!Color_Parse(args, &color)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRLP4 56 +ADDRGP4 Color_Parse +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +NEI4 $465 +line 1075 +;1075: { +line 1076 +;1076: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $462 +JUMPV +LABELV $465 +line 1079 +;1077: } +;1078: +;1079: for (j = 0; j < count; j++) +ADDRLP4 40 +CNSTI4 0 +ASGNI4 +ADDRGP4 $470 +JUMPV +LABELV $467 +line 1080 +;1080: { +line 1081 +;1081: item2 = Menu_GetMatchingItemByNumber(item->parent, j, itemname); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRLP4 60 +ADDRGP4 Menu_GetMatchingItemByNumber +CALLP4 +ASGNP4 +ADDRLP4 44 +ADDRLP4 60 +INDIRP4 +ASGNP4 +line 1082 +;1082: if (item2 != NULL) +ADDRLP4 44 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $471 +line 1083 +;1083: { +line 1084 +;1084: out = NULL; +ADDRLP4 4 +CNSTP4 0 +ASGNP4 +line 1085 +;1085: if (Q_stricmp(name, "backcolor") == 0) +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRGP4 $422 +ARGP4 +ADDRLP4 64 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 0 +NEI4 $473 +line 1086 +;1086: { +line 1087 +;1087: out = &item2->window.backColor; +ADDRLP4 4 +ADDRLP4 44 +INDIRP4 +CNSTI4 128 +ADDP4 +ASGNP4 +line 1088 +;1088: } +ADDRGP4 $474 +JUMPV +LABELV $473 +line 1089 +;1089: else if (Q_stricmp(name, "forecolor") == 0) +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRGP4 $425 +ARGP4 +ADDRLP4 68 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +NEI4 $475 +line 1090 +;1090: { +line 1091 +;1091: out = &item2->window.foreColor; +ADDRLP4 4 +ADDRLP4 44 +INDIRP4 +CNSTI4 112 +ADDP4 +ASGNP4 +line 1092 +;1092: item2->window.flags |= WINDOW_FORECOLORSET; +ADDRLP4 72 +ADDRLP4 44 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRI4 +CNSTI4 512 +BORI4 +ASGNI4 +line 1093 +;1093: } +ADDRGP4 $476 +JUMPV +LABELV $475 +line 1094 +;1094: else if (Q_stricmp(name, "bordercolor") == 0) +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRGP4 $428 +ARGP4 +ADDRLP4 72 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 0 +NEI4 $477 +line 1095 +;1095: { +line 1096 +;1096: out = &item2->window.borderColor; +ADDRLP4 4 +ADDRLP4 44 +INDIRP4 +CNSTI4 144 +ADDP4 +ASGNP4 +line 1097 +;1097: } +LABELV $477 +LABELV $476 +LABELV $474 +line 1099 +;1098: +;1099: if (out) +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $479 +line 1100 +;1100: { +line 1101 +;1101: for (i = 0; i < 4; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $481 +line 1102 +;1102: { +line 1103 +;1103: (*out)[i] = color[i]; +ADDRLP4 76 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +ADDRLP4 76 +INDIRI4 +ADDRLP4 8 +ADDP4 +INDIRF4 +ASGNF4 +line 1104 +;1104: } +LABELV $482 +line 1101 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $481 +line 1105 +;1105: } +LABELV $479 +line 1106 +;1106: } +LABELV $471 +line 1107 +;1107: } +LABELV $468 +line 1079 +ADDRLP4 40 +ADDRLP4 40 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $470 +ADDRLP4 40 +INDIRI4 +ADDRLP4 48 +INDIRI4 +LTI4 $467 +line 1108 +;1108: } +LABELV $463 +line 1110 +;1109: +;1110: return qtrue; +CNSTI4 1 +RETI4 +LABELV $462 +endproc Script_SetItemColor 80 12 +export Script_SetItemRect +proc Script_SetItemRect 52 12 +line 1114 +;1111:} +;1112: +;1113:qboolean Script_SetItemRect(itemDef_t *item, char **args) +;1114:{ +line 1120 +;1115: const char *itemname; +;1116: rectDef_t *out; +;1117: rectDef_t rect; +;1118: +;1119: // expecting type of color to set and 4 args for the color +;1120: if (String_Parse(args, &itemname)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 24 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $486 +line 1121 +;1121: { +line 1124 +;1122: itemDef_t *item2; +;1123: int j; +;1124: int count = Menu_ItemsMatchingGroup(item->parent, itemname); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 Menu_ItemsMatchingGroup +CALLI4 +ASGNI4 +ADDRLP4 36 +ADDRLP4 40 +INDIRI4 +ASGNI4 +line 1126 +;1125: +;1126: if (!Rect_Parse(args, &rect)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 44 +ADDRGP4 Rect_Parse +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +NEI4 $488 +line 1127 +;1127: { +line 1128 +;1128: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $485 +JUMPV +LABELV $488 +line 1131 +;1129: } +;1130: +;1131: for (j = 0; j < count; j++) +ADDRLP4 32 +CNSTI4 0 +ASGNI4 +ADDRGP4 $493 +JUMPV +LABELV $490 +line 1132 +;1132: { +line 1133 +;1133: item2 = Menu_GetMatchingItemByNumber(item->parent, j, itemname); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 48 +ADDRGP4 Menu_GetMatchingItemByNumber +CALLP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 48 +INDIRP4 +ASGNP4 +line 1134 +;1134: if (item2 != NULL) +ADDRLP4 28 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $494 +line 1135 +;1135: { +line 1136 +;1136: out = &item2->window.rect; +ADDRLP4 20 +ADDRLP4 28 +INDIRP4 +ASGNP4 +line 1138 +;1137: +;1138: if (out) +ADDRLP4 20 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $496 +line 1139 +;1139: { +line 1140 +;1140: item2->window.rect.x = rect.x; +ADDRLP4 28 +INDIRP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 1141 +;1141: item2->window.rect.y = rect.y; +ADDRLP4 28 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 4+4 +INDIRF4 +ASGNF4 +line 1142 +;1142: item2->window.rect.w = rect.w; +ADDRLP4 28 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 4+8 +INDIRF4 +ASGNF4 +line 1143 +;1143: item2->window.rect.h = rect.h; +ADDRLP4 28 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 4+12 +INDIRF4 +ASGNF4 +line 1144 +;1144: } +LABELV $496 +line 1145 +;1145: } +LABELV $494 +line 1146 +;1146: } +LABELV $491 +line 1131 +ADDRLP4 32 +ADDRLP4 32 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $493 +ADDRLP4 32 +INDIRI4 +ADDRLP4 36 +INDIRI4 +LTI4 $490 +line 1147 +;1147: } +LABELV $486 +line 1148 +;1148: return qtrue; +CNSTI4 1 +RETI4 +LABELV $485 +endproc Script_SetItemRect 52 12 +export Menu_ShowItemByName +proc Menu_ShowItemByName 24 12 +line 1152 +;1149:} +;1150: +;1151: +;1152:void Menu_ShowItemByName(menuDef_t *menu, const char *p, qboolean bShow) { +line 1155 +;1153: itemDef_t *item; +;1154: int i; +;1155: int count = Menu_ItemsMatchingGroup(menu, p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 Menu_ItemsMatchingGroup +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 1156 +;1156: for (i = 0; i < count; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $505 +JUMPV +LABELV $502 +line 1157 +;1157: item = Menu_GetMatchingItemByNumber(menu, i, p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 Menu_GetMatchingItemByNumber +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 1158 +;1158: if (item != NULL) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $506 +line 1159 +;1159: if (bShow) { +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $508 +line 1160 +;1160: item->window.flags |= WINDOW_VISIBLE; +ADDRLP4 20 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 4 +BORI4 +ASGNI4 +line 1161 +;1161: } else { +ADDRGP4 $509 +JUMPV +LABELV $508 +line 1162 +;1162: item->window.flags &= ~WINDOW_VISIBLE; +ADDRLP4 20 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 -5 +BANDI4 +ASGNI4 +line 1164 +;1163: // stop cinematics playing in the window +;1164: if (item->window.cinematic >= 0) { +ADDRLP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LTI4 $510 +line 1165 +;1165: DC->stopCinematic(item->window.cinematic); +ADDRLP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRP4 +CALLV +pop +line 1166 +;1166: item->window.cinematic = -1; +ADDRLP4 4 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 1167 +;1167: } +LABELV $510 +line 1168 +;1168: } +LABELV $509 +line 1169 +;1169: } +LABELV $506 +line 1170 +;1170: } +LABELV $503 +line 1156 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $505 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $502 +line 1171 +;1171:} +LABELV $501 +endproc Menu_ShowItemByName 24 12 +export Menu_FadeItemByName +proc Menu_FadeItemByName 32 12 +line 1173 +;1172: +;1173:void Menu_FadeItemByName(menuDef_t *menu, const char *p, qboolean fadeOut) { +line 1176 +;1174: itemDef_t *item; +;1175: int i; +;1176: int count = Menu_ItemsMatchingGroup(menu, p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 Menu_ItemsMatchingGroup +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 1177 +;1177: for (i = 0; i < count; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $516 +JUMPV +LABELV $513 +line 1178 +;1178: item = Menu_GetMatchingItemByNumber(menu, i, p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 Menu_GetMatchingItemByNumber +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 1179 +;1179: if (item != NULL) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $517 +line 1180 +;1180: if (fadeOut) { +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $519 +line 1181 +;1181: item->window.flags |= (WINDOW_FADINGOUT | WINDOW_VISIBLE); +ADDRLP4 20 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 36 +BORI4 +ASGNI4 +line 1182 +;1182: item->window.flags &= ~WINDOW_FADINGIN; +ADDRLP4 24 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +CNSTI4 -65 +BANDI4 +ASGNI4 +line 1183 +;1183: } else { +ADDRGP4 $520 +JUMPV +LABELV $519 +line 1184 +;1184: item->window.flags |= (WINDOW_VISIBLE | WINDOW_FADINGIN); +ADDRLP4 20 +CNSTI4 68 +ASGNI4 +ADDRLP4 24 +ADDRLP4 4 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 24 +INDIRP4 +INDIRI4 +ADDRLP4 20 +INDIRI4 +BORI4 +ASGNI4 +line 1185 +;1185: item->window.flags &= ~WINDOW_FADINGOUT; +ADDRLP4 28 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRI4 +CNSTI4 -33 +BANDI4 +ASGNI4 +line 1186 +;1186: } +LABELV $520 +line 1187 +;1187: } +LABELV $517 +line 1188 +;1188: } +LABELV $514 +line 1177 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $516 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $513 +line 1189 +;1189:} +LABELV $512 +endproc Menu_FadeItemByName 32 12 +export Menus_FindByName +proc Menus_FindByName 8 8 +line 1191 +;1190: +;1191:menuDef_t *Menus_FindByName(const char *p) { +line 1193 +;1192: int i; +;1193: for (i = 0; i < menuCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $525 +JUMPV +LABELV $522 +line 1194 +;1194: if (Q_stricmp(Menus[i].window.name, p) == 0) { +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus+32 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $526 +line 1195 +;1195: return &Menus[i]; +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +RETP4 +ADDRGP4 $521 +JUMPV +LABELV $526 +line 1197 +;1196: } +;1197: } +LABELV $523 +line 1193 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $525 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $522 +line 1198 +;1198: return NULL; +CNSTP4 0 +RETP4 +LABELV $521 +endproc Menus_FindByName 8 8 +export Menus_ShowByName +proc Menus_ShowByName 8 4 +line 1201 +;1199:} +;1200: +;1201:void Menus_ShowByName(const char *p) { +line 1202 +;1202: menuDef_t *menu = Menus_FindByName(p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 Menus_FindByName +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 1203 +;1203: if (menu) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $530 +line 1204 +;1204: Menus_Activate(menu); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menus_Activate +CALLV +pop +line 1205 +;1205: } +LABELV $530 +line 1206 +;1206:} +LABELV $529 +endproc Menus_ShowByName 8 4 +export Menus_OpenByName +proc Menus_OpenByName 0 4 +line 1208 +;1207: +;1208:void Menus_OpenByName(const char *p) { +line 1209 +;1209: Menus_ActivateByName(p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menus_ActivateByName +CALLP4 +pop +line 1210 +;1210:} +LABELV $532 +endproc Menus_OpenByName 0 4 +proc Menu_RunCloseScript 572 8 +line 1212 +;1211: +;1212:static void Menu_RunCloseScript(menuDef_t *menu) { +line 1213 +;1213: if (menu && menu->window.flags & WINDOW_VISIBLE && menu->onClose) { +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTU4 0 +ASGNU4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 4 +INDIRU4 +EQU4 $534 +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +EQI4 $534 +ADDRLP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 4 +INDIRU4 +EQU4 $534 +line 1215 +;1214: itemDef_t item; +;1215: item.parent = menu; +ADDRLP4 8+240 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 1216 +;1216: Item_RunScript(&item, menu->onClose); +ADDRLP4 8 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 1217 +;1217: } +LABELV $534 +line 1218 +;1218:} +LABELV $533 +endproc Menu_RunCloseScript 572 8 +export Menus_CloseByName +proc Menus_CloseByName 20 4 +line 1221 +;1219: +;1220:void Menus_CloseByName ( const char *p ) +;1221:{ +line 1222 +;1222: menuDef_t *menu = Menus_FindByName(p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 Menus_FindByName +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 1225 +;1223: +;1224: // If the menu wasnt found just exit +;1225: if (menu == NULL) +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $538 +line 1226 +;1226: { +line 1227 +;1227: return; +ADDRGP4 $537 +JUMPV +LABELV $538 +line 1231 +;1228: } +;1229: +;1230: // Run the close script for the menu +;1231: Menu_RunCloseScript(menu); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menu_RunCloseScript +CALLV +pop +line 1234 +;1232: +;1233: // If this window had the focus then take it away +;1234: if ( menu->window.flags & WINDOW_HASFOCUS ) +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $540 +line 1235 +;1235: { +line 1238 +;1236: // If there is something still in the open menu list then +;1237: // set it to have focus now +;1238: if ( openMenuCount ) +ADDRGP4 openMenuCount +INDIRI4 +CNSTI4 0 +EQI4 $542 +line 1239 +;1239: { +line 1242 +;1240: // Subtract one from the open menu count to prepare to +;1241: // remove the top menu from the list +;1242: openMenuCount -= 1; +ADDRLP4 8 +ADDRGP4 openMenuCount +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1245 +;1243: +;1244: // Set the top menu to have focus now +;1245: menuStack[openMenuCount]->window.flags |= WINDOW_HASFOCUS; +ADDRLP4 12 +CNSTI4 2 +ASGNI4 +ADDRLP4 16 +ADDRGP4 openMenuCount +INDIRI4 +ADDRLP4 12 +INDIRI4 +LSHI4 +ADDRGP4 menuStack +ADDP4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +BORI4 +ASGNI4 +line 1248 +;1246: +;1247: // Remove the top menu from the list +;1248: menuStack[openMenuCount] = NULL; +ADDRGP4 openMenuCount +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 menuStack +ADDP4 +CNSTP4 0 +ASGNP4 +line 1249 +;1249: } +LABELV $542 +line 1250 +;1250: } +LABELV $540 +line 1253 +;1251: +;1252: // Window is now invisible and doenst have focus +;1253: menu->window.flags &= ~(WINDOW_VISIBLE | WINDOW_HASFOCUS); +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 -7 +BANDI4 +ASGNI4 +line 1254 +;1254:} +LABELV $537 +endproc Menus_CloseByName 20 4 +data +export FPMessageTime +align 4 +LABELV FPMessageTime +byte 4 0 +export Menus_CloseAll +code +proc Menus_CloseAll 8 4 +line 1259 +;1255: +;1256:int FPMessageTime = 0; +;1257: +;1258:void Menus_CloseAll() +;1259:{ +line 1262 +;1260: int i; +;1261: +;1262: g_waitingForKey = qfalse; +ADDRGP4 g_waitingForKey +CNSTI4 0 +ASGNI4 +line 1264 +;1263: +;1264: for (i = 0; i < menuCount; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $548 +JUMPV +LABELV $545 +line 1265 +;1265: { +line 1266 +;1266: Menu_RunCloseScript ( &Menus[i] ); +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ARGP4 +ADDRGP4 Menu_RunCloseScript +CALLV +pop +line 1267 +;1267: Menus[i].window.flags &= ~(WINDOW_HASFOCUS | WINDOW_VISIBLE); +ADDRLP4 4 +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus+68 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 -7 +BANDI4 +ASGNI4 +line 1268 +;1268: } +LABELV $546 +line 1264 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $548 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $545 +line 1271 +;1269: +;1270: // Clear the menu stack +;1271: openMenuCount = 0; +ADDRGP4 openMenuCount +CNSTI4 0 +ASGNI4 +line 1273 +;1272: +;1273: FPMessageTime = 0; +ADDRGP4 FPMessageTime +CNSTI4 0 +ASGNI4 +line 1274 +;1274:} +LABELV $544 +endproc Menus_CloseAll 8 4 +export Script_Show +proc Script_Show 8 12 +line 1277 +;1275: +;1276:qboolean Script_Show(itemDef_t *item, char **args) +;1277:{ +line 1279 +;1278: const char *name; +;1279: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $551 +line 1280 +;1280: { +line 1281 +;1281: Menu_ShowItemByName(item->parent, name, qtrue); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 Menu_ShowItemByName +CALLV +pop +line 1282 +;1282: } +LABELV $551 +line 1283 +;1283: return qtrue; +CNSTI4 1 +RETI4 +LABELV $550 +endproc Script_Show 8 12 +export Script_Hide +proc Script_Hide 8 12 +line 1287 +;1284:} +;1285: +;1286:qboolean Script_Hide(itemDef_t *item, char **args) +;1287:{ +line 1289 +;1288: const char *name; +;1289: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $554 +line 1290 +;1290: { +line 1291 +;1291: Menu_ShowItemByName(item->parent, name, qfalse); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 Menu_ShowItemByName +CALLV +pop +line 1292 +;1292: } +LABELV $554 +line 1293 +;1293: return qtrue; +CNSTI4 1 +RETI4 +LABELV $553 +endproc Script_Hide 8 12 +export Script_FadeIn +proc Script_FadeIn 8 12 +line 1297 +;1294:} +;1295: +;1296:qboolean Script_FadeIn(itemDef_t *item, char **args) +;1297:{ +line 1299 +;1298: const char *name; +;1299: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $557 +line 1300 +;1300: { +line 1301 +;1301: Menu_FadeItemByName(item->parent, name, qfalse); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 Menu_FadeItemByName +CALLV +pop +line 1302 +;1302: } +LABELV $557 +line 1304 +;1303: +;1304: return qtrue; +CNSTI4 1 +RETI4 +LABELV $556 +endproc Script_FadeIn 8 12 +export Script_FadeOut +proc Script_FadeOut 8 12 +line 1308 +;1305:} +;1306: +;1307:qboolean Script_FadeOut(itemDef_t *item, char **args) +;1308:{ +line 1310 +;1309: const char *name; +;1310: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $560 +line 1311 +;1311: { +line 1312 +;1312: Menu_FadeItemByName(item->parent, name, qtrue); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRGP4 Menu_FadeItemByName +CALLV +pop +line 1313 +;1313: } +LABELV $560 +line 1314 +;1314: return qtrue; +CNSTI4 1 +RETI4 +LABELV $559 +endproc Script_FadeOut 8 12 +export Script_Open +proc Script_Open 8 8 +line 1318 +;1315:} +;1316: +;1317:qboolean Script_Open(itemDef_t *item, char **args) +;1318:{ +line 1320 +;1319: const char *name; +;1320: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $563 +line 1321 +;1321: { +line 1322 +;1322: Menus_OpenByName(name); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menus_OpenByName +CALLV +pop +line 1323 +;1323: } +LABELV $563 +line 1324 +;1324: return qtrue; +CNSTI4 1 +RETI4 +LABELV $562 +endproc Script_Open 8 8 +export Script_Close +proc Script_Close 12 8 +line 1328 +;1325:} +;1326: +;1327:qboolean Script_Close(itemDef_t *item, char **args) +;1328:{ +line 1330 +;1329: const char *name; +;1330: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $566 +line 1331 +;1331: { +line 1332 +;1332: if (Q_stricmp(name, "all") == 0) +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 $570 +ARGP4 +ADDRLP4 8 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $568 +line 1333 +;1333: { +line 1334 +;1334: Menus_CloseAll(); +ADDRGP4 Menus_CloseAll +CALLV +pop +line 1335 +;1335: } +ADDRGP4 $569 +JUMPV +LABELV $568 +line 1337 +;1336: else +;1337: { +line 1338 +;1338: Menus_CloseByName(name); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menus_CloseByName +CALLV +pop +line 1339 +;1339: } +LABELV $569 +line 1340 +;1340: } +LABELV $566 +line 1341 +;1341: return qtrue; +CNSTI4 1 +RETI4 +LABELV $565 +endproc Script_Close 12 8 +export Menu_TransitionItemByName +proc Menu_TransitionItemByName 56 12 +line 1344 +;1342:} +;1343: +;1344:void Menu_TransitionItemByName(menuDef_t *menu, const char *p, rectDef_t rectFrom, rectDef_t rectTo, int time, float amt) { +line 1347 +;1345: itemDef_t *item; +;1346: int i; +;1347: int count = Menu_ItemsMatchingGroup(menu, p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 Menu_ItemsMatchingGroup +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 1348 +;1348: for (i = 0; i < count; i++) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $575 +JUMPV +LABELV $572 +line 1349 +;1349: item = Menu_GetMatchingItemByNumber(menu, i, p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 Menu_GetMatchingItemByNumber +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 1350 +;1350: if (item != NULL) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $576 +line 1351 +;1351: item->window.flags |= (WINDOW_INTRANSITION | WINDOW_VISIBLE); +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 260 +BORI4 +ASGNI4 +line 1352 +;1352: item->window.offsetTime = time; +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRFP4 16 +INDIRI4 +ASGNI4 +line 1353 +;1353: memcpy(&item->window.rectClient, &rectFrom, sizeof(rectDef_t)); +ADDRLP4 24 +CNSTI4 16 +ASGNI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 24 +INDIRI4 +ADDP4 +ARGP4 +ADDRFP4 8 +INDIRP4 +ARGP4 +ADDRLP4 24 +INDIRI4 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 1354 +;1354: memcpy(&item->window.rectEffects, &rectTo, sizeof(rectDef_t)); +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ARGP4 +ADDRFP4 12 +INDIRP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 1355 +;1355: item->window.rectEffects2.x = abs(rectTo.x - rectFrom.x) / amt; +ADDRFP4 12 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +SUBF4 +CVFI4 4 +ARGI4 +ADDRLP4 28 +ADDRGP4 abs +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 88 +ADDP4 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +ADDRFP4 20 +INDIRF4 +DIVF4 +ASGNF4 +line 1356 +;1356: item->window.rectEffects2.y = abs(rectTo.y - rectFrom.y) / amt; +ADDRLP4 32 +CNSTI4 4 +ASGNI4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 32 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +CVFI4 4 +ARGI4 +ADDRLP4 36 +ADDRGP4 abs +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 92 +ADDP4 +ADDRLP4 36 +INDIRI4 +CVIF4 4 +ADDRFP4 20 +INDIRF4 +DIVF4 +ASGNF4 +line 1357 +;1357: item->window.rectEffects2.w = abs(rectTo.w - rectFrom.w) / amt; +ADDRLP4 40 +CNSTI4 8 +ASGNI4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +CVFI4 4 +ARGI4 +ADDRLP4 44 +ADDRGP4 abs +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 96 +ADDP4 +ADDRLP4 44 +INDIRI4 +CVIF4 4 +ADDRFP4 20 +INDIRF4 +DIVF4 +ASGNF4 +line 1358 +;1358: item->window.rectEffects2.h = abs(rectTo.h - rectFrom.h) / amt; +ADDRLP4 48 +CNSTI4 12 +ASGNI4 +ADDRFP4 12 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ADDP4 +INDIRF4 +SUBF4 +CVFI4 4 +ARGI4 +ADDRLP4 52 +ADDRGP4 abs +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 100 +ADDP4 +ADDRLP4 52 +INDIRI4 +CVIF4 4 +ADDRFP4 20 +INDIRF4 +DIVF4 +ASGNF4 +line 1359 +;1359: Item_UpdatePosition(item); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_UpdatePosition +CALLV +pop +line 1360 +;1360: } +LABELV $576 +line 1361 +;1361: } +LABELV $573 +line 1348 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $575 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $572 +line 1362 +;1362:} +LABELV $571 +endproc Menu_TransitionItemByName 56 12 +data +export ui_deferredScriptItem +align 4 +LABELV ui_deferredScriptItem +byte 4 0 +export Script_Defer +code +proc Script_Defer 4 12 +line 1378 +;1363: +;1364:#define MAX_DEFERRED_SCRIPT 2048 +;1365: +;1366:char ui_deferredScript [ MAX_DEFERRED_SCRIPT ]; +;1367:itemDef_t* ui_deferredScriptItem = NULL; +;1368: +;1369:/* +;1370:================= +;1371:Script_Defer +;1372: +;1373:Defers the rest of the script based on the defer condition. The deferred +;1374:portion of the script can later be run with the "rundeferred" +;1375:================= +;1376:*/ +;1377:qboolean Script_Defer ( itemDef_t* item, char **args ) +;1378:{ +line 1380 +;1379: // Should the script be deferred? +;1380: if ( DC->deferScript ( (char**)args ) ) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 DC +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $579 +line 1381 +;1381: { +line 1383 +;1382: // Need the item the script was being run on +;1383: ui_deferredScriptItem = item; +ADDRGP4 ui_deferredScriptItem +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 1386 +;1384: +;1385: // Save the rest of the script +;1386: Q_strncpyz ( ui_deferredScript, *args, MAX_DEFERRED_SCRIPT ); +ADDRGP4 ui_deferredScript +ARGP4 +ADDRFP4 4 +INDIRP4 +INDIRP4 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1389 +;1387: +;1388: // No more running +;1389: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $578 +JUMPV +LABELV $579 +line 1393 +;1390: } +;1391: +;1392: // Keep running the script, its ok +;1393: return qtrue; +CNSTI4 1 +RETI4 +LABELV $578 +endproc Script_Defer 4 12 +export Script_RunDeferred +proc Script_RunDeferred 0 8 +line 1405 +;1394:} +;1395: +;1396:/* +;1397:================= +;1398:Script_RunDeferred +;1399: +;1400:Runs the last deferred script, there can only be one script deferred at a +;1401:time so be careful of recursion +;1402:================= +;1403:*/ +;1404:qboolean Script_RunDeferred ( itemDef_t* item, char **args ) +;1405:{ +line 1407 +;1406: // Make sure there is something to run. +;1407: if ( !ui_deferredScript[0] || !ui_deferredScriptItem ) +ADDRGP4 ui_deferredScript +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $584 +ADDRGP4 ui_deferredScriptItem +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $582 +LABELV $584 +line 1408 +;1408: { +line 1409 +;1409: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $581 +JUMPV +LABELV $582 +line 1413 +;1410: } +;1411: +;1412: // Run the deferred script now +;1413: Item_RunScript ( ui_deferredScriptItem, ui_deferredScript ); +ADDRGP4 ui_deferredScriptItem +INDIRP4 +ARGP4 +ADDRGP4 ui_deferredScript +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 1415 +;1414: +;1415: return qtrue; +CNSTI4 1 +RETI4 +LABELV $581 +endproc Script_RunDeferred 0 8 +export Script_Transition +proc Script_Transition 96 24 +line 1419 +;1416:} +;1417: +;1418:qboolean Script_Transition(itemDef_t *item, char **args) +;1419:{ +line 1425 +;1420: const char *name; +;1421: rectDef_t rectFrom, rectTo; +;1422: int time; +;1423: float amt; +;1424: +;1425: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 44 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +EQI4 $586 +line 1426 +;1426: { +line 1427 +;1427: if ( Rect_Parse(args, &rectFrom) && Rect_Parse(args, &rectTo) && Int_Parse(args, &time) && Float_Parse(args, &amt)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 48 +ADDRGP4 Rect_Parse +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +EQI4 $588 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRLP4 52 +ADDRGP4 Rect_Parse +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +EQI4 $588 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 36 +ARGP4 +ADDRLP4 56 +ADDRGP4 Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $588 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 40 +ARGP4 +ADDRLP4 60 +ADDRGP4 Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 0 +EQI4 $588 +line 1428 +;1428: { +line 1429 +;1429: Menu_TransitionItemByName(item->parent, name, rectFrom, rectTo, time, amt); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 64 +ADDRLP4 4 +INDIRB +ASGNB 16 +ADDRLP4 64 +ARGP4 +ADDRLP4 80 +ADDRLP4 20 +INDIRB +ASGNB 16 +ADDRLP4 80 +ARGP4 +ADDRLP4 36 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRF4 +ARGF4 +ADDRGP4 Menu_TransitionItemByName +CALLV +pop +line 1430 +;1430: } +LABELV $588 +line 1431 +;1431: } +LABELV $586 +line 1433 +;1432: +;1433: return qtrue; +CNSTI4 1 +RETI4 +LABELV $585 +endproc Script_Transition 96 24 +export Menu_OrbitItemByName +proc Menu_OrbitItemByName 24 12 +line 1437 +;1434:} +;1435: +;1436:void Menu_OrbitItemByName(menuDef_t *menu, const char *p, float x, float y, float cx, float cy, int time) +;1437:{ +line 1440 +;1438: itemDef_t *item; +;1439: int i; +;1440: int count = Menu_ItemsMatchingGroup(menu, p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 Menu_ItemsMatchingGroup +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 1441 +;1441: for (i = 0; i < count; i++) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $594 +JUMPV +LABELV $591 +line 1442 +;1442: item = Menu_GetMatchingItemByNumber(menu, i, p); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 Menu_GetMatchingItemByNumber +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 1443 +;1443: if (item != NULL) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $595 +line 1444 +;1444: item->window.flags |= (WINDOW_ORBITING | WINDOW_VISIBLE); +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 65540 +BORI4 +ASGNI4 +line 1445 +;1445: item->window.offsetTime = time; +ADDRLP4 0 +INDIRP4 +CNSTI4 104 +ADDP4 +ADDRFP4 24 +INDIRI4 +ASGNI4 +line 1446 +;1446: item->window.rectEffects.x = cx; +ADDRLP4 0 +INDIRP4 +CNSTI4 72 +ADDP4 +ADDRFP4 16 +INDIRF4 +ASGNF4 +line 1447 +;1447: item->window.rectEffects.y = cy; +ADDRLP4 0 +INDIRP4 +CNSTI4 76 +ADDP4 +ADDRFP4 20 +INDIRF4 +ASGNF4 +line 1448 +;1448: item->window.rectClient.x = x; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRFP4 8 +INDIRF4 +ASGNF4 +line 1449 +;1449: item->window.rectClient.y = y; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRFP4 12 +INDIRF4 +ASGNF4 +line 1450 +;1450: Item_UpdatePosition(item); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_UpdatePosition +CALLV +pop +line 1451 +;1451: } +LABELV $595 +line 1452 +;1452: } +LABELV $592 +line 1441 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $594 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $591 +line 1453 +;1453:} +LABELV $590 +endproc Menu_OrbitItemByName 24 12 +export Script_Orbit +proc Script_Orbit 48 28 +line 1456 +;1454: +;1455:qboolean Script_Orbit(itemDef_t *item, char **args) +;1456:{ +line 1461 +;1457: const char *name; +;1458: float cx, cy, x, y; +;1459: int time; +;1460: +;1461: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 24 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $598 +line 1462 +;1462: { +line 1463 +;1463: if ( Float_Parse(args, &x) && Float_Parse(args, &y) && Float_Parse(args, &cx) && Float_Parse(args, &cy) && Int_Parse(args, &time) ) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 28 +ADDRGP4 Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +EQI4 $600 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRLP4 32 +ADDRGP4 Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $600 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 36 +ADDRGP4 Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +EQI4 $600 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRLP4 40 +ADDRGP4 Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $600 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRLP4 44 +ADDRGP4 Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +EQI4 $600 +line 1464 +;1464: { +line 1465 +;1465: Menu_OrbitItemByName(item->parent, name, x, y, cx, cy, time); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 Menu_OrbitItemByName +CALLV +pop +line 1466 +;1466: } +LABELV $600 +line 1467 +;1467: } +LABELV $598 +line 1469 +;1468: +;1469: return qtrue; +CNSTI4 1 +RETI4 +LABELV $597 +endproc Script_Orbit 48 28 +export Script_SetFocus +proc Script_SetFocus 36 8 +line 1473 +;1470:} +;1471: +;1472:qboolean Script_SetFocus(itemDef_t *item, char **args) +;1473:{ +line 1477 +;1474: const char *name; +;1475: itemDef_t *focusItem; +;1476: +;1477: if (String_Parse(args, &name)) { +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $603 +line 1478 +;1478: focusItem = Menu_FindItemByName(item->parent, name); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 Menu_FindItemByName +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 12 +INDIRP4 +ASGNP4 +line 1479 +;1479: if (focusItem && !(focusItem->window.flags & WINDOW_DECORATION) && !(focusItem->window.flags & WINDOW_HASFOCUS)) { +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $605 +ADDRLP4 20 +ADDRLP4 16 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 16 +BANDI4 +ADDRLP4 24 +INDIRI4 +NEI4 $605 +ADDRLP4 20 +INDIRI4 +CNSTI4 2 +BANDI4 +ADDRLP4 24 +INDIRI4 +NEI4 $605 +line 1480 +;1480: Menu_ClearFocus(item->parent); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Menu_ClearFocus +CALLP4 +pop +line 1481 +;1481: focusItem->window.flags |= WINDOW_HASFOCUS; +ADDRLP4 28 +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1482 +;1482: if (focusItem->onFocus) { +ADDRLP4 0 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $607 +line 1483 +;1483: Item_RunScript(focusItem, focusItem->onFocus); +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ARGP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 1484 +;1484: } +LABELV $607 +line 1485 +;1485: if (DC->Assets.itemFocusSound) { +ADDRGP4 DC +INDIRP4 +CNSTI4 348 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $609 +line 1486 +;1486: DC->startLocalSound( DC->Assets.itemFocusSound, CHAN_LOCAL_SOUND ); +ADDRLP4 32 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 348 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRP4 +CALLV +pop +line 1487 +;1487: } +LABELV $609 +line 1488 +;1488: } +LABELV $605 +line 1489 +;1489: } +LABELV $603 +line 1491 +;1490: +;1491: return qtrue; +CNSTI4 1 +RETI4 +LABELV $602 +endproc Script_SetFocus 36 8 +export Script_SetPlayerModel +proc Script_SetPlayerModel 8 8 +line 1495 +;1492:} +;1493: +;1494:qboolean Script_SetPlayerModel(itemDef_t *item, char **args) +;1495:{ +line 1497 +;1496: const char *name; +;1497: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $612 +line 1498 +;1498: { +line 1499 +;1499: DC->setCVar("team_model", name); +ADDRGP4 $614 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 1500 +;1500: } +LABELV $612 +line 1502 +;1501: +;1502: return qtrue; +CNSTI4 1 +RETI4 +LABELV $611 +endproc Script_SetPlayerModel 8 8 +export Script_SetPlayerHead +proc Script_SetPlayerHead 8 8 +line 1506 +;1503:} +;1504: +;1505:qboolean Script_SetPlayerHead(itemDef_t *item, char **args) +;1506:{ +line 1508 +;1507: const char *name; +;1508: if (String_Parse(args, &name)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $616 +line 1509 +;1509: { +line 1510 +;1510: DC->setCVar("team_headmodel", name); +ADDRGP4 $618 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 1511 +;1511: } +LABELV $616 +line 1512 +;1512: return qtrue; +CNSTI4 1 +RETI4 +LABELV $615 +endproc Script_SetPlayerHead 8 8 +export Script_SetCvar +proc Script_SetCvar 16 8 +line 1516 +;1513:} +;1514: +;1515:qboolean Script_SetCvar(itemDef_t *item, char **args) +;1516:{ +line 1518 +;1517: const char *cvar, *val; +;1518: if (String_Parse(args, &cvar) && String_Parse(args, &val)) +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 8 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $620 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 12 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $620 +line 1519 +;1519: { +line 1520 +;1520: DC->setCVar(cvar, val); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 1521 +;1521: } +LABELV $620 +line 1522 +;1522: return qtrue; +CNSTI4 1 +RETI4 +LABELV $619 +endproc Script_SetCvar 16 8 +export Script_SetCvarToCvar +proc Script_SetCvarToCvar 1040 12 +line 1525 +;1523:} +;1524: +;1525:qboolean Script_SetCvarToCvar(itemDef_t *item, char **args) { +line 1527 +;1526: const char *cvar, *val; +;1527: if (String_Parse(args, &cvar) && String_Parse(args, &val)) { +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 8 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $623 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRLP4 12 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $623 +line 1529 +;1528: char cvarBuf[1024]; +;1529: DC->getCVarString(val, cvarBuf, sizeof(cvarBuf)); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRP4 +CALLV +pop +line 1530 +;1530: DC->setCVar(cvar, cvarBuf); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 1531 +;1531: } +LABELV $623 +line 1532 +;1532: return qtrue; +CNSTI4 1 +RETI4 +LABELV $622 +endproc Script_SetCvarToCvar 1040 12 +export Script_Exec +proc Script_Exec 12 8 +line 1535 +;1533:} +;1534: +;1535:qboolean Script_Exec(itemDef_t *item, char **args) { +line 1537 +;1536: const char *val; +;1537: if (String_Parse(args, &val)) { +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $626 +line 1538 +;1538: DC->executeText(EXEC_APPEND, va("%s ; ", val)); +ADDRGP4 $628 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTI4 2 +ARGI4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRP4 +CALLV +pop +line 1539 +;1539: } +LABELV $626 +line 1540 +;1540: return qtrue; +CNSTI4 1 +RETI4 +LABELV $625 +endproc Script_Exec 12 8 +export Script_Play +proc Script_Play 12 8 +line 1543 +;1541:} +;1542: +;1543:qboolean Script_Play(itemDef_t *item, char **args) { +line 1545 +;1544: const char *val; +;1545: if (String_Parse(args, &val)) { +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $630 +line 1546 +;1546: DC->startLocalSound(DC->registerSound(val), CHAN_AUTO); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRP4 +CALLV +pop +line 1547 +;1547: } +LABELV $630 +line 1548 +;1548: return qtrue; +CNSTI4 1 +RETI4 +LABELV $629 +endproc Script_Play 12 8 +export Script_playLooped +proc Script_playLooped 12 12 +line 1551 +;1549:} +;1550: +;1551:qboolean Script_playLooped(itemDef_t *item, char **args) { +line 1553 +;1552: const char *val; +;1553: if (String_Parse(args, &val)) { +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $633 +line 1554 +;1554: DC->stopBackgroundTrack(); +ADDRGP4 DC +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRP4 +CALLV +pop +line 1555 +;1555: DC->startBackgroundTrack(val, val, qfalse); +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRP4 +CALLV +pop +line 1556 +;1556: } +LABELV $633 +line 1557 +;1557: return qtrue; +CNSTI4 1 +RETI4 +LABELV $632 +endproc Script_playLooped 12 12 +data +export commandList +align 4 +LABELV commandList +address $635 +address Script_FadeIn +address $636 +address Script_FadeOut +address $637 +address Script_Show +address $638 +address Script_Hide +address $639 +address Script_SetColor +address $640 +address Script_Open +address $641 +address Script_Close +address $642 +address Script_SetAsset +address $643 +address Script_SetBackground +address $644 +address Script_SetItemColor +address $645 +address Script_SetItemRect +address $646 +address Script_SetTeamColor +address $647 +address Script_SetFocus +address $648 +address Script_SetPlayerModel +address $649 +address Script_SetPlayerHead +address $650 +address Script_Transition +address $651 +address Script_SetCvar +address $652 +address Script_SetCvarToCvar +address $653 +address Script_Exec +address $654 +address Script_Play +address $655 +address Script_playLooped +address $656 +address Script_Orbit +address $657 +address Script_Defer +address $658 +address Script_RunDeferred +export scriptCommandCount +align 4 +LABELV scriptCommandCount +byte 4 24 +export Item_RunScript +code +proc Item_RunScript 2088 12 +line 1593 +;1558:} +;1559: +;1560: +;1561:commandDef_t commandList[] = +;1562:{ +;1563: {"fadein", &Script_FadeIn}, // group/name +;1564: {"fadeout", &Script_FadeOut}, // group/name +;1565: {"show", &Script_Show}, // group/name +;1566: {"hide", &Script_Hide}, // group/name +;1567: {"setcolor", &Script_SetColor}, // works on this +;1568: {"open", &Script_Open}, // nenu +;1569: {"close", &Script_Close}, // menu +;1570: {"setasset", &Script_SetAsset}, // works on this +;1571: {"setbackground", &Script_SetBackground}, // works on this +;1572: {"setitemcolor", &Script_SetItemColor}, // group/name +;1573: {"setitemrect", &Script_SetItemRect}, // group/name +;1574: {"setteamcolor", &Script_SetTeamColor}, // sets this background color to team color +;1575: {"setfocus", &Script_SetFocus}, // sets focus +;1576: {"setplayermodel", &Script_SetPlayerModel}, // sets model +;1577: {"setplayerhead", &Script_SetPlayerHead}, // sets head +;1578: {"transition", &Script_Transition}, // group/name +;1579: {"setcvar", &Script_SetCvar}, // name +;1580: {"setcvartocvar", &Script_SetCvarToCvar}, // name +;1581: {"exec", &Script_Exec}, // group/name +;1582: {"play", &Script_Play}, // group/name +;1583: {"playlooped", &Script_playLooped}, // group/name +;1584: {"orbit", &Script_Orbit}, // group/name +;1585: {"defer", &Script_Defer}, // +;1586: {"rundeferred", &Script_RunDeferred}, // +;1587:}; +;1588: +;1589:int scriptCommandCount = sizeof(commandList) / sizeof(commandDef_t); +;1590: +;1591: +;1592:void Item_RunScript(itemDef_t *item, const char *s) +;1593:{ +line 1598 +;1594: char script[2048], *p; +;1595: int i; +;1596: qboolean bRan; +;1597: +;1598: script[0] = 0; +ADDRLP4 12 +CNSTI1 0 +ASGNI1 +line 1600 +;1599: +;1600: if (item && s && s[0]) +ADDRLP4 2060 +CNSTU4 0 +ASGNU4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 2060 +INDIRU4 +EQU4 $660 +ADDRLP4 2064 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 2064 +INDIRP4 +CVPU4 4 +ADDRLP4 2060 +INDIRU4 +EQU4 $660 +ADDRLP4 2064 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $660 +line 1601 +;1601: { +line 1602 +;1602: Q_strcat(script, 2048, s); +ADDRLP4 12 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 1603 +;1603: p = script; +ADDRLP4 8 +ADDRLP4 12 +ASGNP4 +ADDRGP4 $663 +JUMPV +LABELV $662 +line 1606 +;1604: +;1605: while (1) +;1606: { +line 1610 +;1607: const char *command; +;1608: +;1609: // expect command then arguments, ; ends command, NULL ends script +;1610: if (!String_Parse(&p, &command)) +ADDRLP4 8 +ARGP4 +ADDRLP4 2068 +ARGP4 +ADDRLP4 2072 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 2072 +INDIRI4 +CNSTI4 0 +NEI4 $665 +line 1611 +;1611: { +line 1612 +;1612: return; +ADDRGP4 $659 +JUMPV +LABELV $665 +line 1615 +;1613: } +;1614: +;1615: if (command[0] == ';' && command[1] == '\0') +ADDRLP4 2076 +ADDRLP4 2068 +INDIRP4 +ASGNP4 +ADDRLP4 2076 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 59 +NEI4 $667 +ADDRLP4 2076 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $667 +line 1616 +;1616: { +line 1617 +;1617: continue; +ADDRGP4 $663 +JUMPV +LABELV $667 +line 1620 +;1618: } +;1619: +;1620: bRan = qfalse; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 1621 +;1621: for (i = 0; i < scriptCommandCount; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $672 +JUMPV +LABELV $669 +line 1622 +;1622: { +line 1623 +;1623: if (Q_stricmp(command, commandList[i].name) == 0) +ADDRLP4 2068 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 commandList +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2080 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 2080 +INDIRI4 +CNSTI4 0 +NEI4 $673 +line 1624 +;1624: { +line 1626 +;1625: // Allow a script command to stop processing the script +;1626: if ( !commandList[i].handler(item, &p) ) +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRLP4 2084 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 commandList+4 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 2084 +INDIRI4 +CNSTI4 0 +NEI4 $675 +line 1627 +;1627: { +line 1628 +;1628: return; +ADDRGP4 $659 +JUMPV +LABELV $675 +line 1631 +;1629: } +;1630: +;1631: bRan = qtrue; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 1632 +;1632: break; +ADDRGP4 $671 +JUMPV +LABELV $673 +line 1634 +;1633: } +;1634: } +LABELV $670 +line 1621 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $672 +ADDRLP4 0 +INDIRI4 +ADDRGP4 scriptCommandCount +INDIRI4 +LTI4 $669 +LABELV $671 +line 1637 +;1635: +;1636: // not in our auto list, pass to handler +;1637: if (!bRan) +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $678 +line 1638 +;1638: { +line 1639 +;1639: DC->runScript(&p); +ADDRLP4 8 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRP4 +CALLV +pop +line 1640 +;1640: } +LABELV $678 +line 1641 +;1641: } +LABELV $663 +line 1605 +ADDRGP4 $662 +JUMPV +line 1642 +;1642: } +LABELV $660 +line 1643 +;1643:} +LABELV $659 +endproc Item_RunScript 2088 12 +export Item_EnableShowViaCvar +proc Item_EnableShowViaCvar 4136 12 +line 1646 +;1644: +;1645: +;1646:qboolean Item_EnableShowViaCvar(itemDef_t *item, int flag) { +line 1648 +;1647: char script[2048], *p; +;1648: if (item && item->enableCvar && *item->enableCvar && item->cvarTest && *item->cvarTest) { +ADDRLP4 2052 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2056 +CNSTU4 0 +ASGNU4 +ADDRLP4 2052 +INDIRP4 +CVPU4 4 +ADDRLP4 2056 +INDIRU4 +EQU4 $681 +ADDRLP4 2060 +ADDRLP4 2052 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 2060 +INDIRP4 +CVPU4 4 +ADDRLP4 2056 +INDIRU4 +EQU4 $681 +ADDRLP4 2064 +CNSTI4 0 +ASGNI4 +ADDRLP4 2060 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 2064 +INDIRI4 +EQI4 $681 +ADDRLP4 2068 +ADDRLP4 2052 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 2068 +INDIRP4 +CVPU4 4 +ADDRLP4 2056 +INDIRU4 +EQU4 $681 +ADDRLP4 2068 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 2064 +INDIRI4 +EQI4 $681 +line 1650 +;1649: char buff[2048]; +;1650: DC->getCVarString(item->cvarTest, buff, sizeof(buff)); +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2072 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRP4 +CALLV +pop +line 1652 +;1651: +;1652: Q_strncpyz(script, item->enableCvar, 2048); +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRGP4 Q_strncpyz +CALLV +pop +line 1653 +;1653: p = script; +ADDRLP4 0 +ADDRLP4 4 +ASGNP4 +ADDRGP4 $684 +JUMPV +LABELV $683 +line 1654 +;1654: while (1) { +line 1657 +;1655: const char *val; +;1656: // expect value then ; or NULL, NULL ends list +;1657: if (!String_Parse(&p, &val)) { +ADDRLP4 0 +ARGP4 +ADDRLP4 4120 +ARGP4 +ADDRLP4 4124 +ADDRGP4 String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4124 +INDIRI4 +CNSTI4 0 +NEI4 $686 +line 1658 +;1658: return (item->cvarFlags & flag) ? qfalse : qtrue; +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +BANDI4 +CNSTI4 0 +EQI4 $689 +ADDRLP4 4128 +CNSTI4 0 +ASGNI4 +ADDRGP4 $690 +JUMPV +LABELV $689 +ADDRLP4 4128 +CNSTI4 1 +ASGNI4 +LABELV $690 +ADDRLP4 4128 +INDIRI4 +RETI4 +ADDRGP4 $680 +JUMPV +LABELV $686 +line 1661 +;1659: } +;1660: +;1661: if (val[0] == ';' && val[1] == '\0') { +ADDRLP4 4128 +ADDRLP4 4120 +INDIRP4 +ASGNP4 +ADDRLP4 4128 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 59 +NEI4 $691 +ADDRLP4 4128 +INDIRP4 +CNSTI4 1 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $691 +line 1662 +;1662: continue; +ADDRGP4 $684 +JUMPV +LABELV $691 +line 1666 +;1663: } +;1664: +;1665: // enable it if any of the values are true +;1666: if (item->cvarFlags & flag) { +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +BANDI4 +CNSTI4 0 +EQI4 $693 +line 1667 +;1667: if (Q_stricmp(buff, val) == 0) { +ADDRLP4 2072 +ARGP4 +ADDRLP4 4120 +INDIRP4 +ARGP4 +ADDRLP4 4132 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 4132 +INDIRI4 +CNSTI4 0 +NEI4 $694 +line 1668 +;1668: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $680 +JUMPV +line 1670 +;1669: } +;1670: } else { +LABELV $693 +line 1672 +;1671: // disable it if any of the values are true +;1672: if (Q_stricmp(buff, val) == 0) { +ADDRLP4 2072 +ARGP4 +ADDRLP4 4120 +INDIRP4 +ARGP4 +ADDRLP4 4132 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 4132 +INDIRI4 +CNSTI4 0 +NEI4 $697 +line 1673 +;1673: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $680 +JUMPV +LABELV $697 +line 1675 +;1674: } +;1675: } +LABELV $694 +line 1677 +;1676: +;1677: } +LABELV $684 +line 1654 +ADDRGP4 $683 +JUMPV +line 1678 +;1678: return (item->cvarFlags & flag) ? qfalse : qtrue; +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +BANDI4 +CNSTI4 0 +EQI4 $700 +ADDRLP4 4120 +CNSTI4 0 +ASGNI4 +ADDRGP4 $701 +JUMPV +LABELV $700 +ADDRLP4 4120 +CNSTI4 1 +ASGNI4 +LABELV $701 +ADDRLP4 4120 +INDIRI4 +RETI4 +ADDRGP4 $680 +JUMPV +LABELV $681 +line 1680 +;1679: } +;1680: return qtrue; +CNSTI4 1 +RETI4 +LABELV $680 +endproc Item_EnableShowViaCvar 4136 12 +export Item_SetFocus +proc Item_SetFocus 80 12 +line 1685 +;1681:} +;1682: +;1683: +;1684:// will optionaly set focus to this item +;1685:qboolean Item_SetFocus(itemDef_t *item, float x, float y) { +line 1688 +;1686: int i; +;1687: itemDef_t *oldFocus; +;1688: sfxHandle_t *sfx = &DC->Assets.itemFocusSound; +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +CNSTI4 348 +ADDP4 +ASGNP4 +line 1689 +;1689: qboolean playSound = qfalse; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 1692 +;1690: menuDef_t *parent; // bk001206: = (menuDef_t*)item->parent; +;1691: // sanity check, non-null, not a decoration and does not already have the focus +;1692: if (item == NULL || item->window.flags & WINDOW_DECORATION || item->window.flags & WINDOW_HASFOCUS || !(item->window.flags & WINDOW_VISIBLE)) { +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $707 +ADDRLP4 24 +ADDRLP4 20 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 16 +BANDI4 +ADDRLP4 28 +INDIRI4 +NEI4 $707 +ADDRLP4 24 +INDIRI4 +CNSTI4 2 +BANDI4 +ADDRLP4 28 +INDIRI4 +NEI4 $707 +ADDRLP4 24 +INDIRI4 +CNSTI4 4 +BANDI4 +ADDRLP4 28 +INDIRI4 +NEI4 $703 +LABELV $707 +line 1693 +;1693: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $702 +JUMPV +LABELV $703 +line 1697 +;1694: } +;1695: +;1696: // bk001206 - this can be NULL. +;1697: parent = (menuDef_t*)item->parent; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 1700 +;1698: +;1699: // items can be enabled and disabled based on cvars +;1700: if (item->cvarFlags & (CVAR_ENABLE | CVAR_DISABLE) && !Item_EnableShowViaCvar(item, CVAR_ENABLE)) { +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 0 +EQI4 $708 +ADDRLP4 32 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 36 +ADDRGP4 Item_EnableShowViaCvar +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +NEI4 $708 +line 1701 +;1701: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $702 +JUMPV +LABELV $708 +line 1704 +;1702: } +;1703: +;1704: if (item->cvarFlags & (CVAR_SHOW | CVAR_HIDE) && !Item_EnableShowViaCvar(item, CVAR_SHOW)) { +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 12 +BANDI4 +CNSTI4 0 +EQI4 $710 +ADDRLP4 40 +INDIRP4 +ARGP4 +CNSTI4 4 +ARGI4 +ADDRLP4 44 +ADDRGP4 Item_EnableShowViaCvar +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +NEI4 $710 +line 1705 +;1705: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $702 +JUMPV +LABELV $710 +line 1708 +;1706: } +;1707: +;1708: oldFocus = Menu_ClearFocus(item->parent); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 48 +ADDRGP4 Menu_ClearFocus +CALLP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 48 +INDIRP4 +ASGNP4 +line 1710 +;1709: +;1710: if (item->type == ITEM_TYPE_TEXT) { +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $712 +line 1712 +;1711: rectDef_t r; +;1712: r = item->textRect; +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRB +ASGNB 16 +line 1713 +;1713: r.y -= r.h; +ADDRLP4 52+4 +ADDRLP4 52+4 +INDIRF4 +ADDRLP4 52+12 +INDIRF4 +SUBF4 +ASGNF4 +line 1714 +;1714: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 52 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 68 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +EQI4 $716 +line 1715 +;1715: item->window.flags |= WINDOW_HASFOCUS; +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1716 +;1716: if (item->focusSound) { +ADDRFP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $718 +line 1717 +;1717: sfx = &item->focusSound; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +ASGNP4 +line 1718 +;1718: } +LABELV $718 +line 1719 +;1719: playSound = qtrue; +ADDRLP4 12 +CNSTI4 1 +ASGNI4 +line 1720 +;1720: } else { +ADDRGP4 $713 +JUMPV +LABELV $716 +line 1721 +;1721: if (oldFocus) { +ADDRLP4 16 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $713 +line 1722 +;1722: oldFocus->window.flags |= WINDOW_HASFOCUS; +ADDRLP4 72 +ADDRLP4 16 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1723 +;1723: if (oldFocus->onFocus) { +ADDRLP4 16 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $713 +line 1724 +;1724: Item_RunScript(oldFocus, oldFocus->onFocus); +ADDRLP4 76 +ADDRLP4 16 +INDIRP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ARGP4 +ADDRLP4 76 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 1725 +;1725: } +line 1726 +;1726: } +line 1727 +;1727: } +line 1728 +;1728: } else { +ADDRGP4 $713 +JUMPV +LABELV $712 +line 1729 +;1729: item->window.flags |= WINDOW_HASFOCUS; +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRI4 +CNSTI4 2 +BORI4 +ASGNI4 +line 1730 +;1730: if (item->onFocus) { +ADDRFP4 0 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $724 +line 1731 +;1731: Item_RunScript(item, item->onFocus); +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ARGP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 268 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 1732 +;1732: } +LABELV $724 +line 1733 +;1733: if (item->focusSound) { +ADDRFP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $726 +line 1734 +;1734: sfx = &item->focusSound; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +ASGNP4 +line 1735 +;1735: } +LABELV $726 +line 1736 +;1736: playSound = qtrue; +ADDRLP4 12 +CNSTI4 1 +ASGNI4 +line 1737 +;1737: } +LABELV $713 +line 1739 +;1738: +;1739: if (playSound && sfx) { +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $728 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $728 +line 1740 +;1740: DC->startLocalSound( *sfx, CHAN_LOCAL_SOUND ); +ADDRLP4 8 +INDIRP4 +INDIRI4 +ARGI4 +CNSTI4 6 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 144 +ADDP4 +INDIRP4 +CALLV +pop +line 1741 +;1741: } +LABELV $728 +line 1743 +;1742: +;1743: for (i = 0; i < parent->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $733 +JUMPV +LABELV $730 +line 1744 +;1744: if (parent->items[i] == item) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +NEU4 $734 +line 1745 +;1745: parent->cursorItem = i; +ADDRLP4 4 +INDIRP4 +CNSTI4 196 +ADDP4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 1746 +;1746: break; +ADDRGP4 $732 +JUMPV +LABELV $734 +line 1748 +;1747: } +;1748: } +LABELV $731 +line 1743 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $733 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $730 +LABELV $732 +line 1750 +;1749: +;1750: return qtrue; +CNSTI4 1 +RETI4 +LABELV $702 +endproc Item_SetFocus 80 12 +export Item_TextScroll_MaxScroll +proc Item_TextScroll_MaxScroll 12 0 +line 1754 +;1751:} +;1752: +;1753:int Item_TextScroll_MaxScroll ( itemDef_t *item ) +;1754:{ +line 1755 +;1755: textScrollDef_t *scrollPtr = (textScrollDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 1757 +;1756: +;1757: int count = scrollPtr->iLineCount; +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ASGNI4 +line 1758 +;1758: int max = count - (int)(item->window.rect.h / scrollPtr->lineHeight) + 1; +ADDRLP4 4 +ADDRLP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +DIVF4 +CVFI4 4 +SUBI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1760 +;1759: +;1760: if (max < 0) +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +GEI4 $737 +line 1761 +;1761: { +line 1762 +;1762: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $736 +JUMPV +LABELV $737 +line 1765 +;1763: } +;1764: +;1765: return max; +ADDRLP4 4 +INDIRI4 +RETI4 +LABELV $736 +endproc Item_TextScroll_MaxScroll 12 0 +export Item_TextScroll_ThumbPosition +proc Item_TextScroll_ThumbPosition 20 4 +line 1769 +;1766:} +;1767: +;1768:int Item_TextScroll_ThumbPosition ( itemDef_t *item ) +;1769:{ +line 1771 +;1770: float max, pos, size; +;1771: textScrollDef_t *scrollPtr = (textScrollDef_t*)item->typeData; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 1773 +;1772: +;1773: max = Item_TextScroll_MaxScroll ( item ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 Item_TextScroll_MaxScroll +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1774 +;1774: size = item->window.rect.h - (SCROLLBAR_SIZE * 2) - 2; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 1776 +;1775: +;1776: if (max > 0) +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +LEF4 $740 +line 1777 +;1777: { +line 1778 +;1778: pos = (size-SCROLLBAR_SIZE) / (float) max; +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +ADDRLP4 4 +INDIRF4 +DIVF4 +ASGNF4 +line 1779 +;1779: } +ADDRGP4 $741 +JUMPV +LABELV $740 +line 1781 +;1780: else +;1781: { +line 1782 +;1782: pos = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 1783 +;1783: } +LABELV $741 +line 1785 +;1784: +;1785: pos *= scrollPtr->startPos; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +line 1787 +;1786: +;1787: return item->window.rect.y + 1 + SCROLLBAR_SIZE + pos; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +CNSTF4 1098907648 +ADDF4 +ADDRLP4 0 +INDIRF4 +ADDF4 +CVFI4 4 +RETI4 +LABELV $739 +endproc Item_TextScroll_ThumbPosition 20 4 +export Item_TextScroll_ThumbDrawPosition +proc Item_TextScroll_ThumbDrawPosition 24 4 +line 1791 +;1788:} +;1789: +;1790:int Item_TextScroll_ThumbDrawPosition ( itemDef_t *item ) +;1791:{ +line 1794 +;1792: int min, max; +;1793: +;1794: if (itemCapture == item) +ADDRGP4 itemCapture +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +NEU4 $743 +line 1795 +;1795: { +line 1796 +;1796: min = item->window.rect.y + SCROLLBAR_SIZE + 1; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1065353216 +ADDF4 +CVFI4 4 +ASGNI4 +line 1797 +;1797: max = item->window.rect.y + item->window.rect.h - 2*SCROLLBAR_SIZE - 1; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1107296256 +SUBF4 +CNSTF4 1065353216 +SUBF4 +CVFI4 4 +ASGNI4 +line 1799 +;1798: +;1799: if (DC->cursory >= min + SCROLLBAR_SIZE/2 && DC->cursory <= max + SCROLLBAR_SIZE/2) +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 16 +CNSTF4 1090519040 +ASGNF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ADDRLP4 16 +INDIRF4 +ADDF4 +LTF4 $745 +ADDRLP4 12 +INDIRF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ADDRLP4 16 +INDIRF4 +ADDF4 +GTF4 $745 +line 1800 +;1800: { +line 1801 +;1801: return DC->cursory - SCROLLBAR_SIZE/2; +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +CNSTF4 1090519040 +SUBF4 +CVFI4 4 +RETI4 +ADDRGP4 $742 +JUMPV +LABELV $745 +line 1804 +;1802: } +;1803: +;1804: return Item_TextScroll_ThumbPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 Item_TextScroll_ThumbPosition +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +RETI4 +ADDRGP4 $742 +JUMPV +LABELV $743 +line 1807 +;1805: } +;1806: +;1807: return Item_TextScroll_ThumbPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 Item_TextScroll_ThumbPosition +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +RETI4 +LABELV $742 +endproc Item_TextScroll_ThumbDrawPosition 24 4 +export Item_TextScroll_OverLB +proc Item_TextScroll_OverLB 68 12 +line 1811 +;1808:} +;1809: +;1810:int Item_TextScroll_OverLB ( itemDef_t *item, float x, float y ) +;1811:{ +line 1817 +;1812: rectDef_t r; +;1813: textScrollDef_t *scrollPtr; +;1814: int thumbstart; +;1815: int count; +;1816: +;1817: scrollPtr = (textScrollDef_t*)item->typeData; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 1818 +;1818: count = scrollPtr->iLineCount; +ADDRLP4 24 +ADDRLP4 20 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ASGNI4 +line 1820 +;1819: +;1820: r.x = item->window.rect.x + item->window.rect.w - SCROLLBAR_SIZE; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 28 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 1821 +;1821: r.y = item->window.rect.y; +ADDRLP4 0+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 1822 +;1822: r.h = r.w = SCROLLBAR_SIZE; +ADDRLP4 32 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 32 +INDIRF4 +ASGNF4 +ADDRLP4 0+12 +ADDRLP4 32 +INDIRF4 +ASGNF4 +line 1823 +;1823: if (Rect_ContainsPoint(&r, x, y)) +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 36 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +EQI4 $751 +line 1824 +;1824: { +line 1825 +;1825: return WINDOW_LB_LEFTARROW; +CNSTI4 2048 +RETI4 +ADDRGP4 $747 +JUMPV +LABELV $751 +line 1828 +;1826: } +;1827: +;1828: r.y = item->window.rect.y + item->window.rect.h - SCROLLBAR_SIZE; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0+4 +ADDRLP4 40 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 1829 +;1829: if (Rect_ContainsPoint(&r, x, y)) +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 44 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +EQI4 $754 +line 1830 +;1830: { +line 1831 +;1831: return WINDOW_LB_RIGHTARROW; +CNSTI4 4096 +RETI4 +ADDRGP4 $747 +JUMPV +LABELV $754 +line 1834 +;1832: } +;1833: +;1834: thumbstart = Item_TextScroll_ThumbPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 48 +ADDRGP4 Item_TextScroll_ThumbPosition +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 48 +INDIRI4 +ASGNI4 +line 1835 +;1835: r.y = thumbstart; +ADDRLP4 0+4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ASGNF4 +line 1836 +;1836: if (Rect_ContainsPoint(&r, x, y)) +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 52 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +EQI4 $757 +line 1837 +;1837: { +line 1838 +;1838: return WINDOW_LB_THUMB; +CNSTI4 8192 +RETI4 +ADDRGP4 $747 +JUMPV +LABELV $757 +line 1841 +;1839: } +;1840: +;1841: r.y = item->window.rect.y + SCROLLBAR_SIZE; +ADDRLP4 0+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +ASGNF4 +line 1842 +;1842: r.h = thumbstart - r.y; +ADDRLP4 0+12 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ADDRLP4 0+4 +INDIRF4 +SUBF4 +ASGNF4 +line 1843 +;1843: if (Rect_ContainsPoint(&r, x, y)) +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 56 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $762 +line 1844 +;1844: { +line 1845 +;1845: return WINDOW_LB_PGUP; +CNSTI4 16384 +RETI4 +ADDRGP4 $747 +JUMPV +LABELV $762 +line 1848 +;1846: } +;1847: +;1848: r.y = thumbstart + SCROLLBAR_SIZE; +ADDRLP4 0+4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +CNSTF4 1098907648 +ADDF4 +ASGNF4 +line 1849 +;1849: r.h = item->window.rect.y + item->window.rect.h - SCROLLBAR_SIZE; +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0+12 +ADDRLP4 60 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 1850 +;1850: if (Rect_ContainsPoint(&r, x, y)) +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 64 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 64 +INDIRI4 +CNSTI4 0 +EQI4 $766 +line 1851 +;1851: { +line 1852 +;1852: return WINDOW_LB_PGDN; +CNSTI4 32768 +RETI4 +ADDRGP4 $747 +JUMPV +LABELV $766 +line 1855 +;1853: } +;1854: +;1855: return 0; +CNSTI4 0 +RETI4 +LABELV $747 +endproc Item_TextScroll_OverLB 68 12 +export Item_TextScroll_MouseEnter +proc Item_TextScroll_MouseEnter 16 12 +line 1859 +;1856:} +;1857: +;1858:void Item_TextScroll_MouseEnter (itemDef_t *item, float x, float y) +;1859:{ +line 1860 +;1860: item->window.flags &= ~(WINDOW_LB_LEFTARROW | WINDOW_LB_RIGHTARROW | WINDOW_LB_THUMB | WINDOW_LB_PGUP | WINDOW_LB_PGDN); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 -63489 +BANDI4 +ASGNI4 +line 1861 +;1861: item->window.flags |= Item_TextScroll_OverLB(item, x, y); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 Item_TextScroll_OverLB +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +BORI4 +ASGNI4 +line 1862 +;1862:} +LABELV $768 +endproc Item_TextScroll_MouseEnter 16 12 +export Item_TextScroll_HandleKey +proc Item_TextScroll_HandleKey 60 12 +line 1865 +;1863: +;1864:qboolean Item_TextScroll_HandleKey ( itemDef_t *item, int key, qboolean down, qboolean force) +;1865:{ +line 1866 +;1866: textScrollDef_t *scrollPtr = (textScrollDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 1870 +;1867: int max; +;1868: int viewmax; +;1869: +;1870: if (force || (Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory) && item->window.flags & WINDOW_HASFOCUS)) +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $772 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRLP4 16 +INDIRI4 +ADDRLP4 20 +INDIRI4 +EQI4 $770 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +ADDRLP4 20 +INDIRI4 +EQI4 $770 +LABELV $772 +line 1871 +;1871: { +line 1872 +;1872: max = Item_TextScroll_MaxScroll(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 24 +ADDRGP4 Item_TextScroll_MaxScroll +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 1874 +;1873: +;1874: viewmax = (item->window.rect.h / scrollPtr->lineHeight); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +DIVF4 +CVFI4 4 +ASGNI4 +line 1875 +;1875: if ( key == A_CURSOR_UP || key == A_KP_8 ) +ADDRLP4 28 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 170 +EQI4 $775 +ADDRLP4 28 +INDIRI4 +CNSTI4 24 +NEI4 $773 +LABELV $775 +line 1876 +;1876: { +line 1877 +;1877: scrollPtr->startPos--; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1878 +;1878: if (scrollPtr->startPos < 0) +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +GEI4 $776 +line 1879 +;1879: { +line 1880 +;1880: scrollPtr->startPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 1881 +;1881: } +LABELV $776 +line 1882 +;1882: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $769 +JUMPV +LABELV $773 +line 1885 +;1883: } +;1884: +;1885: if ( key == A_CURSOR_DOWN || key == A_KP_2 ) +ADDRLP4 32 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 171 +EQI4 $780 +ADDRLP4 32 +INDIRI4 +CNSTI4 18 +NEI4 $778 +LABELV $780 +line 1886 +;1886: { +line 1887 +;1887: scrollPtr->startPos++; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1888 +;1888: if (scrollPtr->startPos > max) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LEI4 $781 +line 1889 +;1889: { +line 1890 +;1890: scrollPtr->startPos = max; +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 1891 +;1891: } +LABELV $781 +line 1893 +;1892: +;1893: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $769 +JUMPV +LABELV $778 +line 1897 +;1894: } +;1895: +;1896: // mouse hit +;1897: if (key == A_MOUSE1 || key == A_MOUSE2) +ADDRLP4 36 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 141 +EQI4 $785 +ADDRLP4 36 +INDIRI4 +CNSTI4 142 +NEI4 $783 +LABELV $785 +line 1898 +;1898: { +line 1899 +;1899: if (item->window.flags & WINDOW_LB_LEFTARROW) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2048 +BANDI4 +CNSTI4 0 +EQI4 $786 +line 1900 +;1900: { +line 1901 +;1901: scrollPtr->startPos--; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 1902 +;1902: if (scrollPtr->startPos < 0) +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +GEI4 $787 +line 1903 +;1903: { +line 1904 +;1904: scrollPtr->startPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 1905 +;1905: } +line 1906 +;1906: } +ADDRGP4 $787 +JUMPV +LABELV $786 +line 1907 +;1907: else if (item->window.flags & WINDOW_LB_RIGHTARROW) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $790 +line 1908 +;1908: { +line 1910 +;1909: // one down +;1910: scrollPtr->startPos++; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 1911 +;1911: if (scrollPtr->startPos > max) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LEI4 $791 +line 1912 +;1912: { +line 1913 +;1913: scrollPtr->startPos = max; +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 1914 +;1914: } +line 1915 +;1915: } +ADDRGP4 $791 +JUMPV +LABELV $790 +line 1916 +;1916: else if (item->window.flags & WINDOW_LB_PGUP) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 16384 +BANDI4 +CNSTI4 0 +EQI4 $794 +line 1917 +;1917: { +line 1919 +;1918: // page up +;1919: scrollPtr->startPos -= viewmax; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +SUBI4 +ASGNI4 +line 1920 +;1920: if (scrollPtr->startPos < 0) +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +GEI4 $795 +line 1921 +;1921: { +line 1922 +;1922: scrollPtr->startPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 1923 +;1923: } +line 1924 +;1924: } +ADDRGP4 $795 +JUMPV +LABELV $794 +line 1925 +;1925: else if (item->window.flags & WINDOW_LB_PGDN) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 32768 +BANDI4 +CNSTI4 0 +EQI4 $798 +line 1926 +;1926: { +line 1928 +;1927: // page down +;1928: scrollPtr->startPos += viewmax; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDI4 +ASGNI4 +line 1929 +;1929: if (scrollPtr->startPos > max) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LEI4 $799 +line 1930 +;1930: { +line 1931 +;1931: scrollPtr->startPos = max; +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 1932 +;1932: } +line 1933 +;1933: } +ADDRGP4 $799 +JUMPV +LABELV $798 +line 1934 +;1934: else if (item->window.flags & WINDOW_LB_THUMB) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 8192 +BANDI4 +CNSTI4 0 +EQI4 $802 +line 1935 +;1935: { +line 1937 +;1936: // Display_SetCaptureItem(item); +;1937: } +LABELV $802 +LABELV $799 +LABELV $795 +LABELV $791 +LABELV $787 +line 1939 +;1938: +;1939: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $769 +JUMPV +LABELV $783 +line 1942 +;1940: } +;1941: +;1942: if ( key == A_HOME || key == A_KP_7) +ADDRLP4 40 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 144 +EQI4 $806 +ADDRLP4 40 +INDIRI4 +CNSTI4 23 +NEI4 $804 +LABELV $806 +line 1943 +;1943: { +line 1945 +;1944: // home +;1945: scrollPtr->startPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 1946 +;1946: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $769 +JUMPV +LABELV $804 +line 1948 +;1947: } +;1948: if ( key == A_END || key == A_KP_1) +ADDRLP4 44 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 157 +EQI4 $809 +ADDRLP4 44 +INDIRI4 +CNSTI4 17 +NEI4 $807 +LABELV $809 +line 1949 +;1949: { +line 1951 +;1950: // end +;1951: scrollPtr->startPos = max; +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 1952 +;1952: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $769 +JUMPV +LABELV $807 +line 1954 +;1953: } +;1954: if (key == A_PAGE_UP || key == A_KP_9 ) +ADDRLP4 48 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 145 +EQI4 $812 +ADDRLP4 48 +INDIRI4 +CNSTI4 25 +NEI4 $810 +LABELV $812 +line 1955 +;1955: { +line 1956 +;1956: scrollPtr->startPos -= viewmax; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +SUBI4 +ASGNI4 +line 1957 +;1957: if (scrollPtr->startPos < 0) +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +GEI4 $813 +line 1958 +;1958: { +line 1959 +;1959: scrollPtr->startPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 1960 +;1960: } +LABELV $813 +line 1962 +;1961: +;1962: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $769 +JUMPV +LABELV $810 +line 1964 +;1963: } +;1964: if ( key == A_PAGE_DOWN || key == A_KP_3 ) +ADDRLP4 52 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 158 +EQI4 $817 +ADDRLP4 52 +INDIRI4 +CNSTI4 19 +NEI4 $815 +LABELV $817 +line 1965 +;1965: { +line 1966 +;1966: scrollPtr->startPos += viewmax; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +ADDI4 +ASGNI4 +line 1967 +;1967: if (scrollPtr->startPos > max) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LEI4 $818 +line 1968 +;1968: { +line 1969 +;1969: scrollPtr->startPos = max; +ADDRLP4 0 +INDIRP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 1970 +;1970: } +LABELV $818 +line 1971 +;1971: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $769 +JUMPV +LABELV $815 +line 1973 +;1972: } +;1973: } +LABELV $770 +line 1975 +;1974: +;1975: return qfalse; +CNSTI4 0 +RETI4 +LABELV $769 +endproc Item_TextScroll_HandleKey 60 12 +export Item_ListBox_MaxScroll +proc Item_ListBox_MaxScroll 16 4 +line 1978 +;1976:} +;1977: +;1978:int Item_ListBox_MaxScroll(itemDef_t *item) { +line 1979 +;1979: listBoxDef_t *listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 1980 +;1980: int count = DC->feederCount(item->special); +ADDRFP4 0 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 1983 +;1981: int max; +;1982: +;1983: if (item->window.flags & WINDOW_HORIZONTAL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $821 +line 1984 +;1984: max = count - (item->window.rect.w / listPtr->elementWidth) + 1; +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +DIVF4 +SUBF4 +CNSTF4 1065353216 +ADDF4 +CVFI4 4 +ASGNI4 +line 1985 +;1985: } +ADDRGP4 $822 +JUMPV +LABELV $821 +line 1986 +;1986: else { +line 1987 +;1987: max = count - (item->window.rect.h / listPtr->elementHeight) + 1; +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +DIVF4 +SUBF4 +CNSTF4 1065353216 +ADDF4 +CVFI4 4 +ASGNI4 +line 1988 +;1988: } +LABELV $822 +line 1989 +;1989: if (max < 0) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +GEI4 $823 +line 1990 +;1990: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $820 +JUMPV +LABELV $823 +line 1992 +;1991: } +;1992: return max; +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $820 +endproc Item_ListBox_MaxScroll 16 4 +export Item_ListBox_ThumbPosition +proc Item_ListBox_ThumbPosition 20 4 +line 1995 +;1993:} +;1994: +;1995:int Item_ListBox_ThumbPosition(itemDef_t *item) { +line 1997 +;1996: float max, pos, size; +;1997: listBoxDef_t *listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 1999 +;1998: +;1999: max = Item_ListBox_MaxScroll(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 Item_ListBox_MaxScroll +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2000 +;2000: if (item->window.flags & WINDOW_HORIZONTAL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $826 +line 2001 +;2001: size = item->window.rect.w - (SCROLLBAR_SIZE * 2) - 2; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 2002 +;2002: if (max > 0) { +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +LEF4 $828 +line 2003 +;2003: pos = (size-SCROLLBAR_SIZE) / (float) max; +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +ADDRLP4 4 +INDIRF4 +DIVF4 +ASGNF4 +line 2004 +;2004: } else { +ADDRGP4 $829 +JUMPV +LABELV $828 +line 2005 +;2005: pos = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 2006 +;2006: } +LABELV $829 +line 2007 +;2007: pos *= listPtr->startPos; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +line 2008 +;2008: return item->window.rect.x + 1 + SCROLLBAR_SIZE + pos; +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +CNSTF4 1098907648 +ADDF4 +ADDRLP4 0 +INDIRF4 +ADDF4 +CVFI4 4 +RETI4 +ADDRGP4 $825 +JUMPV +LABELV $826 +line 2010 +;2009: } +;2010: else { +line 2011 +;2011: size = item->window.rect.h - (SCROLLBAR_SIZE * 2) - 2; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 2012 +;2012: if (max > 0) { +ADDRLP4 4 +INDIRF4 +CNSTF4 0 +LEF4 $830 +line 2013 +;2013: pos = (size-SCROLLBAR_SIZE) / (float) max; +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +ADDRLP4 4 +INDIRF4 +DIVF4 +ASGNF4 +line 2014 +;2014: } else { +ADDRGP4 $831 +JUMPV +LABELV $830 +line 2015 +;2015: pos = 0; +ADDRLP4 0 +CNSTF4 0 +ASGNF4 +line 2016 +;2016: } +LABELV $831 +line 2017 +;2017: pos *= listPtr->startPos; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CVIF4 4 +MULF4 +ASGNF4 +line 2018 +;2018: return item->window.rect.y + 1 + SCROLLBAR_SIZE + pos; +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +CNSTF4 1098907648 +ADDF4 +ADDRLP4 0 +INDIRF4 +ADDF4 +CVFI4 4 +RETI4 +LABELV $825 +endproc Item_ListBox_ThumbPosition 20 4 +export Item_ListBox_ThumbDrawPosition +proc Item_ListBox_ThumbDrawPosition 24 4 +line 2022 +;2019: } +;2020:} +;2021: +;2022:int Item_ListBox_ThumbDrawPosition(itemDef_t *item) { +line 2025 +;2023: int min, max; +;2024: +;2025: if (itemCapture == item) { +ADDRGP4 itemCapture +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +NEU4 $833 +line 2026 +;2026: if (item->window.flags & WINDOW_HORIZONTAL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $835 +line 2027 +;2027: min = item->window.rect.x + SCROLLBAR_SIZE + 1; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1065353216 +ADDF4 +CVFI4 4 +ASGNI4 +line 2028 +;2028: max = item->window.rect.x + item->window.rect.w - 2*SCROLLBAR_SIZE - 1; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +INDIRF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1107296256 +SUBF4 +CNSTF4 1065353216 +SUBF4 +CVFI4 4 +ASGNI4 +line 2029 +;2029: if (DC->cursorx >= min + SCROLLBAR_SIZE/2 && DC->cursorx <= max + SCROLLBAR_SIZE/2) { +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 16 +CNSTF4 1090519040 +ASGNF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ADDRLP4 16 +INDIRF4 +ADDF4 +LTF4 $837 +ADDRLP4 12 +INDIRF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ADDRLP4 16 +INDIRF4 +ADDF4 +GTF4 $837 +line 2030 +;2030: return DC->cursorx - SCROLLBAR_SIZE/2; +ADDRGP4 DC +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +CNSTF4 1090519040 +SUBF4 +CVFI4 4 +RETI4 +ADDRGP4 $832 +JUMPV +LABELV $837 +line 2032 +;2031: } +;2032: else { +line 2033 +;2033: return Item_ListBox_ThumbPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 Item_ListBox_ThumbPosition +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +RETI4 +ADDRGP4 $832 +JUMPV +LABELV $835 +line 2036 +;2034: } +;2035: } +;2036: else { +line 2037 +;2037: min = item->window.rect.y + SCROLLBAR_SIZE + 1; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1065353216 +ADDF4 +CVFI4 4 +ASGNI4 +line 2038 +;2038: max = item->window.rect.y + item->window.rect.h - 2*SCROLLBAR_SIZE - 1; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1107296256 +SUBF4 +CNSTF4 1065353216 +SUBF4 +CVFI4 4 +ASGNI4 +line 2039 +;2039: if (DC->cursory >= min + SCROLLBAR_SIZE/2 && DC->cursory <= max + SCROLLBAR_SIZE/2) { +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRLP4 16 +CNSTF4 1090519040 +ASGNF4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 0 +INDIRI4 +CVIF4 4 +ADDRLP4 16 +INDIRF4 +ADDF4 +LTF4 $839 +ADDRLP4 12 +INDIRF4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ADDRLP4 16 +INDIRF4 +ADDF4 +GTF4 $839 +line 2040 +;2040: return DC->cursory - SCROLLBAR_SIZE/2; +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +CNSTF4 1090519040 +SUBF4 +CVFI4 4 +RETI4 +ADDRGP4 $832 +JUMPV +LABELV $839 +line 2042 +;2041: } +;2042: else { +line 2043 +;2043: return Item_ListBox_ThumbPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 Item_ListBox_ThumbPosition +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +RETI4 +ADDRGP4 $832 +JUMPV +LABELV $833 +line 2047 +;2044: } +;2045: } +;2046: } +;2047: else { +line 2048 +;2048: return Item_ListBox_ThumbPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 Item_ListBox_ThumbPosition +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +RETI4 +LABELV $832 +endproc Item_ListBox_ThumbDrawPosition 24 4 +export Item_Slider_ThumbPosition +proc Item_Slider_ThumbPosition 28 4 +line 2052 +;2049: } +;2050:} +;2051: +;2052:float Item_Slider_ThumbPosition(itemDef_t *item) { +line 2054 +;2053: float value, range, x; +;2054: editFieldDef_t *editDef = item->typeData; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2056 +;2055: +;2056: if (item->text) { +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $842 +line 2057 +;2057: x = item->textRect.x + item->textRect.w + 8; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 16 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1090519040 +ADDF4 +ASGNF4 +line 2058 +;2058: } else { +ADDRGP4 $843 +JUMPV +LABELV $842 +line 2059 +;2059: x = item->window.rect.x; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 2060 +;2060: } +LABELV $843 +line 2062 +;2061: +;2062: if (editDef == NULL && item->cvar) { +ADDRLP4 16 +CNSTU4 0 +ASGNU4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +ADDRLP4 16 +INDIRU4 +NEU4 $844 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 16 +INDIRU4 +EQU4 $844 +line 2063 +;2063: return x; +ADDRLP4 8 +INDIRF4 +RETF4 +ADDRGP4 $841 +JUMPV +LABELV $844 +line 2066 +;2064: } +;2065: +;2066: value = DC->getCVarValue(item->cvar); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 DC +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRP4 +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 20 +INDIRF4 +ASGNF4 +line 2068 +;2067: +;2068: if (value < editDef->minVal) { +ADDRLP4 0 +INDIRF4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +GEF4 $846 +line 2069 +;2069: value = editDef->minVal; +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ASGNF4 +line 2070 +;2070: } else if (value > editDef->maxVal) { +ADDRGP4 $847 +JUMPV +LABELV $846 +ADDRLP4 0 +INDIRF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +LEF4 $848 +line 2071 +;2071: value = editDef->maxVal; +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 2072 +;2072: } +LABELV $848 +LABELV $847 +line 2074 +;2073: +;2074: range = editDef->maxVal - editDef->minVal; +ADDRLP4 12 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +line 2075 +;2075: value -= editDef->minVal; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +SUBF4 +ASGNF4 +line 2076 +;2076: value /= range; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 12 +INDIRF4 +DIVF4 +ASGNF4 +line 2078 +;2077: //value /= (editDef->maxVal - editDef->minVal); +;2078: value *= SLIDER_WIDTH; +ADDRLP4 0 +CNSTF4 1119879168 +ADDRLP4 0 +INDIRF4 +MULF4 +ASGNF4 +line 2079 +;2079: x += value; +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRLP4 0 +INDIRF4 +ADDF4 +ASGNF4 +line 2082 +;2080: // vm fuckage +;2081: //x = x + (((float)value / editDef->maxVal) * SLIDER_WIDTH); +;2082: return x; +ADDRLP4 8 +INDIRF4 +RETF4 +LABELV $841 +endproc Item_Slider_ThumbPosition 28 4 +export Item_Slider_OverSlider +proc Item_Slider_OverSlider 24 12 +line 2085 +;2083:} +;2084: +;2085:int Item_Slider_OverSlider(itemDef_t *item, float x, float y) { +line 2088 +;2086: rectDef_t r; +;2087: +;2088: r.x = Item_Slider_ThumbPosition(item) - (SLIDER_THUMB_WIDTH / 2); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 Item_Slider_ThumbPosition +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 16 +INDIRF4 +CNSTF4 1086324736 +SUBF4 +ASGNF4 +line 2089 +;2089: r.y = item->window.rect.y - 2; +ADDRLP4 0+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 2090 +;2090: r.w = SLIDER_THUMB_WIDTH; +ADDRLP4 0+8 +CNSTF4 1094713344 +ASGNF4 +line 2091 +;2091: r.h = SLIDER_THUMB_HEIGHT; +ADDRLP4 0+12 +CNSTF4 1101004800 +ASGNF4 +line 2093 +;2092: +;2093: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 20 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +EQI4 $854 +line 2094 +;2094: return WINDOW_LB_THUMB; +CNSTI4 8192 +RETI4 +ADDRGP4 $850 +JUMPV +LABELV $854 +line 2096 +;2095: } +;2096: return 0; +CNSTI4 0 +RETI4 +LABELV $850 +endproc Item_Slider_OverSlider 24 12 +export Item_ListBox_OverLB +proc Item_ListBox_OverLB 72 12 +line 2099 +;2097:} +;2098: +;2099:int Item_ListBox_OverLB(itemDef_t *item, float x, float y) { +line 2105 +;2100: rectDef_t r; +;2101: listBoxDef_t *listPtr; +;2102: int thumbstart; +;2103: int count; +;2104: +;2105: count = DC->feederCount(item->special); +ADDRFP4 0 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 28 +ADDRGP4 DC +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 2106 +;2106: listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2107 +;2107: if (item->window.flags & WINDOW_HORIZONTAL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $857 +line 2109 +;2108: // check if on left arrow +;2109: r.x = item->window.rect.x; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 2110 +;2110: r.y = item->window.rect.y + item->window.rect.h - SCROLLBAR_SIZE; +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0+4 +ADDRLP4 32 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 32 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 2111 +;2111: r.h = r.w = SCROLLBAR_SIZE; +ADDRLP4 36 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 36 +INDIRF4 +ASGNF4 +ADDRLP4 0+12 +ADDRLP4 36 +INDIRF4 +ASGNF4 +line 2112 +;2112: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 40 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $862 +line 2113 +;2113: return WINDOW_LB_LEFTARROW; +CNSTI4 2048 +RETI4 +ADDRGP4 $856 +JUMPV +LABELV $862 +line 2116 +;2114: } +;2115: // check if on right arrow +;2116: r.x = item->window.rect.x + item->window.rect.w - SCROLLBAR_SIZE; +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 44 +INDIRP4 +INDIRF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 2117 +;2117: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 48 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +EQI4 $864 +line 2118 +;2118: return WINDOW_LB_RIGHTARROW; +CNSTI4 4096 +RETI4 +ADDRGP4 $856 +JUMPV +LABELV $864 +line 2121 +;2119: } +;2120: // check if on thumb +;2121: thumbstart = Item_ListBox_ThumbPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 52 +ADDRGP4 Item_ListBox_ThumbPosition +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 2122 +;2122: r.x = thumbstart; +ADDRLP4 0 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2123 +;2123: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 56 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $866 +line 2124 +;2124: return WINDOW_LB_THUMB; +CNSTI4 8192 +RETI4 +ADDRGP4 $856 +JUMPV +LABELV $866 +line 2126 +;2125: } +;2126: r.x = item->window.rect.x + SCROLLBAR_SIZE; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +ASGNF4 +line 2127 +;2127: r.w = thumbstart - r.x; +ADDRLP4 0+8 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ASGNF4 +line 2128 +;2128: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 60 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 0 +EQI4 $869 +line 2129 +;2129: return WINDOW_LB_PGUP; +CNSTI4 16384 +RETI4 +ADDRGP4 $856 +JUMPV +LABELV $869 +line 2131 +;2130: } +;2131: r.x = thumbstart + SCROLLBAR_SIZE; +ADDRLP4 0 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +CNSTF4 1098907648 +ADDF4 +ASGNF4 +line 2132 +;2132: r.w = item->window.rect.x + item->window.rect.w - SCROLLBAR_SIZE; +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0+8 +ADDRLP4 64 +INDIRP4 +INDIRF4 +ADDRLP4 64 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 2133 +;2133: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 68 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +EQI4 $858 +line 2134 +;2134: return WINDOW_LB_PGDN; +CNSTI4 32768 +RETI4 +ADDRGP4 $856 +JUMPV +line 2136 +;2135: } +;2136: } else { +LABELV $857 +line 2137 +;2137: r.x = item->window.rect.x + item->window.rect.w - SCROLLBAR_SIZE; +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 32 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 2138 +;2138: r.y = item->window.rect.y; +ADDRLP4 0+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 2139 +;2139: r.h = r.w = SCROLLBAR_SIZE; +ADDRLP4 36 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 0+8 +ADDRLP4 36 +INDIRF4 +ASGNF4 +ADDRLP4 0+12 +ADDRLP4 36 +INDIRF4 +ASGNF4 +line 2140 +;2140: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 40 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $877 +line 2141 +;2141: return WINDOW_LB_LEFTARROW; +CNSTI4 2048 +RETI4 +ADDRGP4 $856 +JUMPV +LABELV $877 +line 2143 +;2142: } +;2143: r.y = item->window.rect.y + item->window.rect.h - SCROLLBAR_SIZE; +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0+4 +ADDRLP4 44 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 2144 +;2144: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 48 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +EQI4 $880 +line 2145 +;2145: return WINDOW_LB_RIGHTARROW; +CNSTI4 4096 +RETI4 +ADDRGP4 $856 +JUMPV +LABELV $880 +line 2147 +;2146: } +;2147: thumbstart = Item_ListBox_ThumbPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 52 +ADDRGP4 Item_ListBox_ThumbPosition +CALLI4 +ASGNI4 +ADDRLP4 16 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 2148 +;2148: r.y = thumbstart; +ADDRLP4 0+4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2149 +;2149: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 56 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $883 +line 2150 +;2150: return WINDOW_LB_THUMB; +CNSTI4 8192 +RETI4 +ADDRGP4 $856 +JUMPV +LABELV $883 +line 2152 +;2151: } +;2152: r.y = item->window.rect.y + SCROLLBAR_SIZE; +ADDRLP4 0+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +ASGNF4 +line 2153 +;2153: r.h = thumbstart - r.y; +ADDRLP4 0+12 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +ADDRLP4 0+4 +INDIRF4 +SUBF4 +ASGNF4 +line 2154 +;2154: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 60 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 0 +EQI4 $888 +line 2155 +;2155: return WINDOW_LB_PGUP; +CNSTI4 16384 +RETI4 +ADDRGP4 $856 +JUMPV +LABELV $888 +line 2157 +;2156: } +;2157: r.y = thumbstart + SCROLLBAR_SIZE; +ADDRLP4 0+4 +ADDRLP4 16 +INDIRI4 +CVIF4 4 +CNSTF4 1098907648 +ADDF4 +ASGNF4 +line 2158 +;2158: r.h = item->window.rect.y + item->window.rect.h - SCROLLBAR_SIZE; +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0+12 +ADDRLP4 64 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 64 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 2159 +;2159: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 68 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 0 +EQI4 $892 +line 2160 +;2160: return WINDOW_LB_PGDN; +CNSTI4 32768 +RETI4 +ADDRGP4 $856 +JUMPV +LABELV $892 +line 2162 +;2161: } +;2162: } +LABELV $858 +line 2163 +;2163: return 0; +CNSTI4 0 +RETI4 +LABELV $856 +endproc Item_ListBox_OverLB 72 12 +export Item_ListBox_MouseEnter +proc Item_ListBox_MouseEnter 56 12 +line 2168 +;2164:} +;2165: +;2166: +;2167:void Item_ListBox_MouseEnter(itemDef_t *item, float x, float y) +;2168:{ +line 2170 +;2169: rectDef_t r; +;2170: listBoxDef_t *listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2172 +;2171: +;2172: item->window.flags &= ~(WINDOW_LB_LEFTARROW | WINDOW_LB_RIGHTARROW | WINDOW_LB_THUMB | WINDOW_LB_PGUP | WINDOW_LB_PGDN); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 -63489 +BANDI4 +ASGNI4 +line 2173 +;2173: item->window.flags |= Item_ListBox_OverLB(item, x, y); +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 28 +ADDRGP4 Item_ListBox_OverLB +CALLI4 +ASGNI4 +ADDRLP4 32 +ADDRLP4 24 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +BORI4 +ASGNI4 +line 2175 +;2174: +;2175: if (item->window.flags & WINDOW_HORIZONTAL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $895 +line 2176 +;2176: if (!(item->window.flags & (WINDOW_LB_LEFTARROW | WINDOW_LB_RIGHTARROW | WINDOW_LB_THUMB | WINDOW_LB_PGUP | WINDOW_LB_PGDN))) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 63488 +BANDI4 +CNSTI4 0 +NEI4 $896 +line 2178 +;2177: // check for selection hit as we have exausted buttons and thumb +;2178: if (listPtr->elementStyle == LISTBOX_IMAGE) { +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $896 +line 2179 +;2179: r.x = item->window.rect.x; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 2180 +;2180: r.y = item->window.rect.y; +ADDRLP4 4+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 2181 +;2181: r.h = item->window.rect.h - SCROLLBAR_SIZE; +ADDRLP4 4+12 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 2182 +;2182: r.w = item->window.rect.w - listPtr->drawPadding; +ADDRLP4 36 +CNSTI4 8 +ASGNI4 +ADDRLP4 4+8 +ADDRFP4 0 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 36 +INDIRI4 +ADDP4 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 2183 +;2183: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 40 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +EQI4 $896 +line 2184 +;2184: listPtr->cursorPos = (int)((x - r.x) / listPtr->elementWidth) + listPtr->startPos; +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +SUBF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +DIVF4 +CVFI4 4 +ADDRLP4 44 +INDIRP4 +INDIRI4 +ADDI4 +ASGNI4 +line 2185 +;2185: if (listPtr->cursorPos >= listPtr->endPos) { +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 48 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LTI4 $896 +line 2186 +;2186: listPtr->cursorPos = listPtr->endPos; +ADDRLP4 52 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 2187 +;2187: } +line 2188 +;2188: } +line 2189 +;2189: } else { +line 2191 +;2190: // text hit.. +;2191: } +line 2192 +;2192: } +line 2193 +;2193: } else if (!(item->window.flags & (WINDOW_LB_LEFTARROW | WINDOW_LB_RIGHTARROW | WINDOW_LB_THUMB | WINDOW_LB_PGUP | WINDOW_LB_PGDN))) { +ADDRGP4 $896 +JUMPV +LABELV $895 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 63488 +BANDI4 +CNSTI4 0 +NEI4 $908 +line 2194 +;2194: r.x = item->window.rect.x; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 2195 +;2195: r.y = item->window.rect.y; +ADDRLP4 4+4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 2196 +;2196: r.w = item->window.rect.w - SCROLLBAR_SIZE; +ADDRLP4 4+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +ASGNF4 +line 2197 +;2197: r.h = item->window.rect.h - listPtr->drawPadding; +ADDRLP4 4+12 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 2198 +;2198: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 36 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +EQI4 $913 +line 2199 +;2199: listPtr->cursorPos = (int)((y - 2 - r.y) / listPtr->elementHeight) + listPtr->startPos; +ADDRLP4 40 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRFP4 8 +INDIRF4 +CNSTF4 1073741824 +SUBF4 +ADDRLP4 4+4 +INDIRF4 +SUBF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +DIVF4 +CVFI4 4 +ADDRLP4 40 +INDIRP4 +INDIRI4 +ADDI4 +ASGNI4 +line 2200 +;2200: if (listPtr->cursorPos > listPtr->endPos) { +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 44 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LEI4 $916 +line 2201 +;2201: listPtr->cursorPos = listPtr->endPos; +ADDRLP4 48 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 48 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +ASGNI4 +line 2202 +;2202: } +LABELV $916 +line 2203 +;2203: } +LABELV $913 +line 2204 +;2204: } +LABELV $908 +LABELV $896 +line 2205 +;2205:} +LABELV $894 +endproc Item_ListBox_MouseEnter 56 12 +export Item_MouseEnter +proc Item_MouseEnter 44 12 +line 2207 +;2206: +;2207:void Item_MouseEnter(itemDef_t *item, float x, float y) { +line 2209 +;2208: rectDef_t r; +;2209: if (item) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $919 +line 2210 +;2210: r = item->textRect; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRB +ASGNB 16 +line 2211 +;2211: r.y -= r.h; +ADDRLP4 0+4 +ADDRLP4 0+4 +INDIRF4 +ADDRLP4 0+12 +INDIRF4 +SUBF4 +ASGNF4 +line 2215 +;2212: // in the text rect? +;2213: +;2214: // items can be enabled and disabled based on cvars +;2215: if (item->cvarFlags & (CVAR_ENABLE | CVAR_DISABLE) && !Item_EnableShowViaCvar(item, CVAR_ENABLE)) { +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 0 +EQI4 $923 +ADDRLP4 16 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 20 +ADDRGP4 Item_EnableShowViaCvar +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $923 +line 2216 +;2216: return; +ADDRGP4 $918 +JUMPV +LABELV $923 +line 2219 +;2217: } +;2218: +;2219: if (item->cvarFlags & (CVAR_SHOW | CVAR_HIDE) && !Item_EnableShowViaCvar(item, CVAR_SHOW)) { +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 12 +BANDI4 +CNSTI4 0 +EQI4 $925 +ADDRLP4 24 +INDIRP4 +ARGP4 +CNSTI4 4 +ARGI4 +ADDRLP4 28 +ADDRGP4 Item_EnableShowViaCvar +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +NEI4 $925 +line 2220 +;2220: return; +ADDRGP4 $918 +JUMPV +LABELV $925 +line 2223 +;2221: } +;2222: +;2223: if (Rect_ContainsPoint(&r, x, y)) { +ADDRLP4 0 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 32 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $927 +line 2224 +;2224: if (!(item->window.flags & WINDOW_MOUSEOVERTEXT)) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +NEI4 $929 +line 2225 +;2225: Item_RunScript(item, item->mouseEnterText); +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ARGP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 2226 +;2226: item->window.flags |= WINDOW_MOUSEOVERTEXT; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRI4 +CNSTI4 128 +BORI4 +ASGNI4 +line 2227 +;2227: } +LABELV $929 +line 2228 +;2228: if (!(item->window.flags & WINDOW_MOUSEOVER)) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $928 +line 2229 +;2229: Item_RunScript(item, item->mouseEnter); +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ARGP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 2230 +;2230: item->window.flags |= WINDOW_MOUSEOVER; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 2231 +;2231: } +line 2233 +;2232: +;2233: } else { +ADDRGP4 $928 +JUMPV +LABELV $927 +line 2235 +;2234: // not in the text rect +;2235: if (item->window.flags & WINDOW_MOUSEOVERTEXT) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $933 +line 2237 +;2236: // if we were +;2237: Item_RunScript(item, item->mouseExitText); +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ARGP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 2238 +;2238: item->window.flags &= ~WINDOW_MOUSEOVERTEXT; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRI4 +CNSTI4 -129 +BANDI4 +ASGNI4 +line 2239 +;2239: } +LABELV $933 +line 2240 +;2240: if (!(item->window.flags & WINDOW_MOUSEOVER)) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +NEI4 $935 +line 2241 +;2241: Item_RunScript(item, item->mouseEnter); +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +ARGP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 256 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 2242 +;2242: item->window.flags |= WINDOW_MOUSEOVER; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 2243 +;2243: } +LABELV $935 +line 2245 +;2244: +;2245: if (item->type == ITEM_TYPE_LISTBOX) { +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $937 +line 2246 +;2246: Item_ListBox_MouseEnter(item, x, y); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRGP4 Item_ListBox_MouseEnter +CALLV +pop +line 2247 +;2247: } +ADDRGP4 $938 +JUMPV +LABELV $937 +line 2248 +;2248: else if ( item->type == ITEM_TYPE_TEXTSCROLL ) +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $939 +line 2249 +;2249: { +line 2250 +;2250: Item_TextScroll_MouseEnter ( item, x, y ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRGP4 Item_TextScroll_MouseEnter +CALLV +pop +line 2251 +;2251: } +LABELV $939 +LABELV $938 +line 2252 +;2252: } +LABELV $928 +line 2253 +;2253: } +LABELV $919 +line 2254 +;2254:} +LABELV $918 +endproc Item_MouseEnter 44 12 +export Item_MouseLeave +proc Item_MouseLeave 8 8 +line 2256 +;2255: +;2256:void Item_MouseLeave(itemDef_t *item) { +line 2257 +;2257: if (item) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $942 +line 2258 +;2258: if (item->window.flags & WINDOW_MOUSEOVERTEXT) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 128 +BANDI4 +CNSTI4 0 +EQI4 $944 +line 2259 +;2259: Item_RunScript(item, item->mouseExitText); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 2260 +;2260: item->window.flags &= ~WINDOW_MOUSEOVERTEXT; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 -129 +BANDI4 +ASGNI4 +line 2261 +;2261: } +LABELV $944 +line 2262 +;2262: Item_RunScript(item, item->mouseExit); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 2263 +;2263: item->window.flags &= ~(WINDOW_LB_RIGHTARROW | WINDOW_LB_LEFTARROW); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 -6145 +BANDI4 +ASGNI4 +line 2264 +;2264: } +LABELV $942 +line 2265 +;2265:} +LABELV $941 +endproc Item_MouseLeave 8 8 +export Menu_HitTest +proc Menu_HitTest 8 12 +line 2267 +;2266: +;2267:itemDef_t *Menu_HitTest(menuDef_t *menu, float x, float y) { +line 2269 +;2268: int i; +;2269: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $950 +JUMPV +LABELV $947 +line 2270 +;2270: if (Rect_ContainsPoint(&menu->items[i]->window.rect, x, y)) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 4 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $951 +line 2271 +;2271: return menu->items[i]; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +RETP4 +ADDRGP4 $946 +JUMPV +LABELV $951 +line 2273 +;2272: } +;2273: } +LABELV $948 +line 2269 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $950 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $947 +line 2274 +;2274: return NULL; +CNSTP4 0 +RETP4 +LABELV $946 +endproc Menu_HitTest 8 12 +export Item_SetMouseOver +proc Item_SetMouseOver 4 0 +line 2277 +;2275:} +;2276: +;2277:void Item_SetMouseOver(itemDef_t *item, qboolean focus) { +line 2278 +;2278: if (item) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $954 +line 2279 +;2279: if (focus) { +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $956 +line 2280 +;2280: item->window.flags |= WINDOW_MOUSEOVER; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +BORI4 +ASGNI4 +line 2281 +;2281: } else { +ADDRGP4 $957 +JUMPV +LABELV $956 +line 2282 +;2282: item->window.flags &= ~WINDOW_MOUSEOVER; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 2283 +;2283: } +LABELV $957 +line 2284 +;2284: } +LABELV $954 +line 2285 +;2285:} +LABELV $953 +endproc Item_SetMouseOver 4 0 +export Item_OwnerDraw_HandleKey +proc Item_OwnerDraw_HandleKey 12 16 +line 2288 +;2286: +;2287: +;2288:qboolean Item_OwnerDraw_HandleKey(itemDef_t *item, int key) { +line 2289 +;2289: if (item && DC->ownerDrawHandleKey) { +ADDRLP4 0 +CNSTU4 0 +ASGNU4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 0 +INDIRU4 +EQU4 $959 +ADDRGP4 DC +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 0 +INDIRU4 +EQU4 $959 +line 2290 +;2290: return DC->ownerDrawHandleKey(item->window.ownerDraw, item->window.ownerDrawFlags, &item->special, key); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 540 +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +CNSTI4 148 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +RETI4 +ADDRGP4 $958 +JUMPV +LABELV $959 +line 2292 +;2291: } +;2292: return qfalse; +CNSTI4 0 +RETI4 +LABELV $958 +endproc Item_OwnerDraw_HandleKey 12 16 +export Item_ListBox_HandleKey +proc Item_ListBox_HandleKey 72 12 +line 2295 +;2293:} +;2294: +;2295:qboolean Item_ListBox_HandleKey(itemDef_t *item, int key, qboolean down, qboolean force) { +line 2296 +;2296: listBoxDef_t *listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2297 +;2297: int count = DC->feederCount(item->special); +ADDRFP4 0 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 16 +ADDRGP4 DC +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 8 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 2300 +;2298: int max, viewmax; +;2299: +;2300: if (force || (Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory) && item->window.flags & WINDOW_HASFOCUS)) { +ADDRFP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $964 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ADDRLP4 28 +INDIRI4 +EQI4 $962 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +ADDRLP4 28 +INDIRI4 +EQI4 $962 +LABELV $964 +line 2301 +;2301: max = Item_ListBox_MaxScroll(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRGP4 Item_ListBox_MaxScroll +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 32 +INDIRI4 +ASGNI4 +line 2302 +;2302: if (item->window.flags & WINDOW_HORIZONTAL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $965 +line 2303 +;2303: viewmax = (item->window.rect.w / listPtr->elementWidth); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +DIVF4 +CVFI4 4 +ASGNI4 +line 2304 +;2304: if ( key == A_CURSOR_LEFT || key == A_KP_4 ) +ADDRLP4 36 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 172 +EQI4 $969 +ADDRLP4 36 +INDIRI4 +CNSTI4 20 +NEI4 $967 +LABELV $969 +line 2305 +;2305: { +line 2306 +;2306: if (!listPtr->notselectable) { +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $970 +line 2307 +;2307: listPtr->cursorPos--; +ADDRLP4 40 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2308 +;2308: if (listPtr->cursorPos < 0) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 0 +GEI4 $972 +line 2309 +;2309: listPtr->cursorPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2310 +;2310: } +LABELV $972 +line 2311 +;2311: if (listPtr->cursorPos < listPtr->startPos) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +GEI4 $974 +line 2312 +;2312: listPtr->startPos = listPtr->cursorPos; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2313 +;2313: } +LABELV $974 +line 2314 +;2314: if (listPtr->cursorPos >= listPtr->startPos + viewmax) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +LTI4 $976 +line 2315 +;2315: listPtr->startPos = listPtr->cursorPos - viewmax + 1; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2316 +;2316: } +LABELV $976 +line 2317 +;2317: item->cursorPos = listPtr->cursorPos; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2318 +;2318: DC->feederSelection(item->special, item->cursorPos); +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRP4 +CALLI4 +pop +line 2319 +;2319: } +ADDRGP4 $971 +JUMPV +LABELV $970 +line 2320 +;2320: else { +line 2321 +;2321: listPtr->startPos--; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2322 +;2322: if (listPtr->startPos < 0) +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +GEI4 $978 +line 2323 +;2323: listPtr->startPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +LABELV $978 +line 2324 +;2324: } +LABELV $971 +line 2325 +;2325: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $961 +JUMPV +LABELV $967 +line 2327 +;2326: } +;2327: if ( key == A_CURSOR_RIGHT || key == A_KP_6 ) +ADDRLP4 40 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 173 +EQI4 $982 +ADDRLP4 40 +INDIRI4 +CNSTI4 22 +NEI4 $966 +LABELV $982 +line 2328 +;2328: { +line 2329 +;2329: if (!listPtr->notselectable) { +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $983 +line 2330 +;2330: listPtr->cursorPos++; +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2331 +;2331: if (listPtr->cursorPos < listPtr->startPos) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +GEI4 $985 +line 2332 +;2332: listPtr->startPos = listPtr->cursorPos; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2333 +;2333: } +LABELV $985 +line 2334 +;2334: if (listPtr->cursorPos >= count) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $987 +line 2335 +;2335: listPtr->cursorPos = count-1; +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2336 +;2336: } +LABELV $987 +line 2337 +;2337: if (listPtr->cursorPos >= listPtr->startPos + viewmax) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +LTI4 $989 +line 2338 +;2338: listPtr->startPos = listPtr->cursorPos - viewmax + 1; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2339 +;2339: } +LABELV $989 +line 2340 +;2340: item->cursorPos = listPtr->cursorPos; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2341 +;2341: DC->feederSelection(item->special, item->cursorPos); +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRP4 +CALLI4 +pop +line 2342 +;2342: } +ADDRGP4 $984 +JUMPV +LABELV $983 +line 2343 +;2343: else { +line 2344 +;2344: listPtr->startPos++; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2345 +;2345: if (listPtr->startPos >= count) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $991 +line 2346 +;2346: listPtr->startPos = count-1; +ADDRLP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +LABELV $991 +line 2347 +;2347: } +LABELV $984 +line 2348 +;2348: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $961 +JUMPV +line 2350 +;2349: } +;2350: } +LABELV $965 +line 2351 +;2351: else { +line 2352 +;2352: viewmax = (item->window.rect.h / listPtr->elementHeight); +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +DIVF4 +CVFI4 4 +ASGNI4 +line 2353 +;2353: if ( key == A_CURSOR_UP || key == A_KP_8 ) +ADDRLP4 36 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 170 +EQI4 $995 +ADDRLP4 36 +INDIRI4 +CNSTI4 24 +NEI4 $993 +LABELV $995 +line 2354 +;2354: { +line 2355 +;2355: if (!listPtr->notselectable) { +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $996 +line 2356 +;2356: listPtr->cursorPos--; +ADDRLP4 40 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +ADDRLP4 40 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2357 +;2357: if (listPtr->cursorPos < 0) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 0 +GEI4 $998 +line 2358 +;2358: listPtr->cursorPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2359 +;2359: } +LABELV $998 +line 2360 +;2360: if (listPtr->cursorPos < listPtr->startPos) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +GEI4 $1000 +line 2361 +;2361: listPtr->startPos = listPtr->cursorPos; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2362 +;2362: } +LABELV $1000 +line 2363 +;2363: if (listPtr->cursorPos >= listPtr->startPos + viewmax) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +LTI4 $1002 +line 2364 +;2364: listPtr->startPos = listPtr->cursorPos - viewmax + 1; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2365 +;2365: } +LABELV $1002 +line 2366 +;2366: item->cursorPos = listPtr->cursorPos; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2367 +;2367: DC->feederSelection(item->special, item->cursorPos); +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRP4 +CALLI4 +pop +line 2368 +;2368: } +ADDRGP4 $997 +JUMPV +LABELV $996 +line 2369 +;2369: else { +line 2370 +;2370: listPtr->startPos--; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2371 +;2371: if (listPtr->startPos < 0) +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +GEI4 $1004 +line 2372 +;2372: listPtr->startPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +LABELV $1004 +line 2373 +;2373: } +LABELV $997 +line 2374 +;2374: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $961 +JUMPV +LABELV $993 +line 2376 +;2375: } +;2376: if ( key == A_CURSOR_DOWN || key == A_KP_2 ) +ADDRLP4 40 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 171 +EQI4 $1008 +ADDRLP4 40 +INDIRI4 +CNSTI4 18 +NEI4 $1006 +LABELV $1008 +line 2377 +;2377: { +line 2378 +;2378: if (!listPtr->notselectable) { +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1009 +line 2379 +;2379: listPtr->cursorPos++; +ADDRLP4 44 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2380 +;2380: if (listPtr->cursorPos < listPtr->startPos) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +GEI4 $1011 +line 2381 +;2381: listPtr->startPos = listPtr->cursorPos; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2382 +;2382: } +LABELV $1011 +line 2383 +;2383: if (listPtr->cursorPos >= count) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $1013 +line 2384 +;2384: listPtr->cursorPos = count-1; +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2385 +;2385: } +LABELV $1013 +line 2386 +;2386: if (listPtr->cursorPos >= listPtr->startPos + viewmax) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +LTI4 $1015 +line 2387 +;2387: listPtr->startPos = listPtr->cursorPos - viewmax + 1; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2388 +;2388: } +LABELV $1015 +line 2389 +;2389: item->cursorPos = listPtr->cursorPos; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2390 +;2390: DC->feederSelection(item->special, item->cursorPos); +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRP4 +CALLI4 +pop +line 2391 +;2391: } +ADDRGP4 $1010 +JUMPV +LABELV $1009 +line 2392 +;2392: else { +line 2393 +;2393: listPtr->startPos++; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2394 +;2394: if (listPtr->startPos > max) +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +LEI4 $1017 +line 2395 +;2395: listPtr->startPos = max; +ADDRLP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +LABELV $1017 +line 2396 +;2396: } +LABELV $1010 +line 2397 +;2397: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $961 +JUMPV +LABELV $1006 +line 2399 +;2398: } +;2399: } +LABELV $966 +line 2401 +;2400: // mouse hit +;2401: if (key == A_MOUSE1 || key == A_MOUSE2) { +ADDRLP4 36 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 141 +EQI4 $1021 +ADDRLP4 36 +INDIRI4 +CNSTI4 142 +NEI4 $1019 +LABELV $1021 +line 2402 +;2402: if (item->window.flags & WINDOW_LB_LEFTARROW) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2048 +BANDI4 +CNSTI4 0 +EQI4 $1022 +line 2403 +;2403: listPtr->startPos--; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2404 +;2404: if (listPtr->startPos < 0) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +GEI4 $1023 +line 2405 +;2405: listPtr->startPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 2406 +;2406: } +line 2407 +;2407: } else if (item->window.flags & WINDOW_LB_RIGHTARROW) { +ADDRGP4 $1023 +JUMPV +LABELV $1022 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 4096 +BANDI4 +CNSTI4 0 +EQI4 $1026 +line 2409 +;2408: // one down +;2409: listPtr->startPos++; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2410 +;2410: if (listPtr->startPos > max) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +LEI4 $1027 +line 2411 +;2411: listPtr->startPos = max; +ADDRLP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2412 +;2412: } +line 2413 +;2413: } else if (item->window.flags & WINDOW_LB_PGUP) { +ADDRGP4 $1027 +JUMPV +LABELV $1026 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 16384 +BANDI4 +CNSTI4 0 +EQI4 $1030 +line 2415 +;2414: // page up +;2415: listPtr->startPos -= viewmax; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ASGNI4 +line 2416 +;2416: if (listPtr->startPos < 0) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +GEI4 $1031 +line 2417 +;2417: listPtr->startPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 2418 +;2418: } +line 2419 +;2419: } else if (item->window.flags & WINDOW_LB_PGDN) { +ADDRGP4 $1031 +JUMPV +LABELV $1030 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 32768 +BANDI4 +CNSTI4 0 +EQI4 $1034 +line 2421 +;2420: // page down +;2421: listPtr->startPos += viewmax; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +ASGNI4 +line 2422 +;2422: if (listPtr->startPos > max) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +LEI4 $1035 +line 2423 +;2423: listPtr->startPos = max; +ADDRLP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2424 +;2424: } +line 2425 +;2425: } else if (item->window.flags & WINDOW_LB_THUMB) { +ADDRGP4 $1035 +JUMPV +LABELV $1034 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 8192 +BANDI4 +CNSTI4 0 +EQI4 $1038 +line 2427 +;2426: // Display_SetCaptureItem(item); +;2427: } else { +ADDRGP4 $1039 +JUMPV +LABELV $1038 +line 2429 +;2428: // select an item +;2429: if (DC->realTime < lastListBoxClickTime && listPtr->doubleClick) { +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRGP4 lastListBoxClickTime +INDIRI4 +GEI4 $1040 +ADDRLP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1040 +line 2430 +;2430: Item_RunScript(item, listPtr->doubleClick); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 2431 +;2431: } +LABELV $1040 +line 2432 +;2432: lastListBoxClickTime = DC->realTime + DOUBLE_CLICK_DELAY; +ADDRGP4 lastListBoxClickTime +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 300 +ADDI4 +ASGNI4 +line 2433 +;2433: if (item->cursorPos != listPtr->cursorPos) { +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +EQI4 $1042 +line 2434 +;2434: int prePos = item->cursorPos; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ASGNI4 +line 2436 +;2435: +;2436: item->cursorPos = listPtr->cursorPos; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2438 +;2437: +;2438: if (!DC->feederSelection(item->special, item->cursorPos)) +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 48 +ADDRGP4 DC +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +NEI4 $1044 +line 2439 +;2439: { +line 2440 +;2440: item->cursorPos = listPtr->cursorPos = prePos; +ADDRLP4 52 +ADDRLP4 40 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 52 +INDIRI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ADDRLP4 52 +INDIRI4 +ASGNI4 +line 2441 +;2441: } +LABELV $1044 +line 2442 +;2442: } +LABELV $1042 +line 2443 +;2443: } +LABELV $1039 +LABELV $1035 +LABELV $1031 +LABELV $1027 +LABELV $1023 +line 2444 +;2444: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $961 +JUMPV +LABELV $1019 +line 2446 +;2445: } +;2446: if ( key == A_HOME || key == A_KP_7) { +ADDRLP4 40 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 144 +EQI4 $1048 +ADDRLP4 40 +INDIRI4 +CNSTI4 23 +NEI4 $1046 +LABELV $1048 +line 2448 +;2447: // home +;2448: listPtr->startPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 2449 +;2449: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $961 +JUMPV +LABELV $1046 +line 2451 +;2450: } +;2451: if ( key == A_END || key == A_KP_1) { +ADDRLP4 44 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 157 +EQI4 $1051 +ADDRLP4 44 +INDIRI4 +CNSTI4 17 +NEI4 $1049 +LABELV $1051 +line 2453 +;2452: // end +;2453: listPtr->startPos = max; +ADDRLP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2454 +;2454: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $961 +JUMPV +LABELV $1049 +line 2456 +;2455: } +;2456: if (key == A_PAGE_UP || key == A_KP_9 ) { +ADDRLP4 48 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 145 +EQI4 $1054 +ADDRLP4 48 +INDIRI4 +CNSTI4 25 +NEI4 $1052 +LABELV $1054 +line 2458 +;2457: // page up +;2458: if (!listPtr->notselectable) { +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1055 +line 2459 +;2459: listPtr->cursorPos -= viewmax; +ADDRLP4 52 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +ADDRLP4 52 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ASGNI4 +line 2460 +;2460: if (listPtr->cursorPos < 0) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +CNSTI4 0 +GEI4 $1057 +line 2461 +;2461: listPtr->cursorPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2462 +;2462: } +LABELV $1057 +line 2463 +;2463: if (listPtr->cursorPos < listPtr->startPos) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +GEI4 $1059 +line 2464 +;2464: listPtr->startPos = listPtr->cursorPos; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2465 +;2465: } +LABELV $1059 +line 2466 +;2466: if (listPtr->cursorPos >= listPtr->startPos + viewmax) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +LTI4 $1061 +line 2467 +;2467: listPtr->startPos = listPtr->cursorPos - viewmax + 1; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2468 +;2468: } +LABELV $1061 +line 2469 +;2469: item->cursorPos = listPtr->cursorPos; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2470 +;2470: DC->feederSelection(item->special, item->cursorPos); +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 64 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRP4 +CALLI4 +pop +line 2471 +;2471: } +ADDRGP4 $1056 +JUMPV +LABELV $1055 +line 2472 +;2472: else { +line 2473 +;2473: listPtr->startPos -= viewmax; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +ASGNI4 +line 2474 +;2474: if (listPtr->startPos < 0) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 0 +GEI4 $1063 +line 2475 +;2475: listPtr->startPos = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 2476 +;2476: } +LABELV $1063 +line 2477 +;2477: } +LABELV $1056 +line 2478 +;2478: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $961 +JUMPV +LABELV $1052 +line 2480 +;2479: } +;2480: if ( key == A_PAGE_DOWN || key == A_KP_3 ) { +ADDRLP4 52 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 158 +EQI4 $1067 +ADDRLP4 52 +INDIRI4 +CNSTI4 19 +NEI4 $1065 +LABELV $1067 +line 2482 +;2481: // page down +;2482: if (!listPtr->notselectable) { +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1068 +line 2483 +;2483: listPtr->cursorPos += viewmax; +ADDRLP4 56 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +ASGNI4 +line 2484 +;2484: if (listPtr->cursorPos < listPtr->startPos) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +GEI4 $1070 +line 2485 +;2485: listPtr->startPos = listPtr->cursorPos; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2486 +;2486: } +LABELV $1070 +line 2487 +;2487: if (listPtr->cursorPos >= count) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $1072 +line 2488 +;2488: listPtr->cursorPos = count-1; +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2489 +;2489: } +LABELV $1072 +line 2490 +;2490: if (listPtr->cursorPos >= listPtr->startPos + viewmax) { +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +LTI4 $1074 +line 2491 +;2491: listPtr->startPos = listPtr->cursorPos - viewmax + 1; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +SUBI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2492 +;2492: } +LABELV $1074 +line 2493 +;2493: item->cursorPos = listPtr->cursorPos; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ASGNI4 +line 2494 +;2494: DC->feederSelection(item->special, item->cursorPos); +ADDRLP4 68 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 68 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRP4 +CALLI4 +pop +line 2495 +;2495: } +ADDRGP4 $1069 +JUMPV +LABELV $1068 +line 2496 +;2496: else { +line 2497 +;2497: listPtr->startPos += viewmax; +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDI4 +ASGNI4 +line 2498 +;2498: if (listPtr->startPos > max) { +ADDRLP4 0 +INDIRP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +LEI4 $1076 +line 2499 +;2499: listPtr->startPos = max; +ADDRLP4 0 +INDIRP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 2500 +;2500: } +LABELV $1076 +line 2501 +;2501: } +LABELV $1069 +line 2502 +;2502: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $961 +JUMPV +LABELV $1065 +line 2504 +;2503: } +;2504: } +LABELV $962 +line 2505 +;2505: return qfalse; +CNSTI4 0 +RETI4 +LABELV $961 +endproc Item_ListBox_HandleKey 72 12 +export Item_YesNo_HandleKey +proc Item_YesNo_HandleKey 32 12 +line 2508 +;2506:} +;2507: +;2508:qboolean Item_YesNo_HandleKey(itemDef_t *item, int key) { +line 2510 +;2509: +;2510: if (Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory) && item->window.flags & WINDOW_HASFOCUS && item->cvar) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1079 +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +ADDRLP4 8 +INDIRI4 +EQI4 $1079 +ADDRLP4 12 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1079 +line 2511 +;2511: if (key == A_MOUSE1 || key == A_ENTER || key == A_MOUSE2 || key == A_MOUSE3) { +ADDRLP4 16 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 141 +EQI4 $1085 +ADDRLP4 16 +INDIRI4 +CNSTI4 10 +EQI4 $1085 +ADDRLP4 16 +INDIRI4 +CNSTI4 142 +EQI4 $1085 +ADDRLP4 16 +INDIRI4 +CNSTI4 166 +NEI4 $1081 +LABELV $1085 +line 2512 +;2512: DC->setCVar(item->cvar, va("%i", !DC->getCVarValue(item->cvar))); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 24 +ADDRGP4 DC +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRP4 +CALLF4 +ASGNF4 +ADDRLP4 24 +INDIRF4 +CNSTF4 0 +NEF4 $1088 +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +ADDRGP4 $1089 +JUMPV +LABELV $1088 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +LABELV $1089 +ADDRGP4 $1086 +ARGP4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 2513 +;2513: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1078 +JUMPV +LABELV $1081 +line 2515 +;2514: } +;2515: } +LABELV $1079 +line 2517 +;2516: +;2517: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1078 +endproc Item_YesNo_HandleKey 32 12 +export Item_Multi_CountSettings +proc Item_Multi_CountSettings 4 0 +line 2521 +;2518: +;2519:} +;2520: +;2521:int Item_Multi_CountSettings(itemDef_t *item) { +line 2522 +;2522: multiDef_t *multiPtr = (multiDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2523 +;2523: if (multiPtr == NULL) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1091 +line 2524 +;2524: return 0; +CNSTI4 0 +RETI4 +ADDRGP4 $1090 +JUMPV +LABELV $1091 +line 2526 +;2525: } +;2526: return multiPtr->count; +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +INDIRI4 +RETI4 +LABELV $1090 +endproc Item_Multi_CountSettings 4 0 +export Item_Multi_FindCvarByValue +proc Item_Multi_FindCvarByValue 2064 12 +line 2529 +;2527:} +;2528: +;2529:int Item_Multi_FindCvarByValue(itemDef_t *item) { +line 2531 +;2530: char buff[2048]; +;2531: float value = 0; +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +line 2533 +;2532: int i; +;2533: multiDef_t *multiPtr = (multiDef_t*)item->typeData; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2534 +;2534: if (multiPtr) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1094 +line 2535 +;2535: if (multiPtr->strDef) { +ADDRLP4 4 +INDIRP4 +CNSTI4 388 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1096 +line 2536 +;2536: DC->getCVarString(item->cvar, buff, sizeof(buff)); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRP4 +CALLV +pop +line 2537 +;2537: } else { +ADDRGP4 $1097 +JUMPV +LABELV $1096 +line 2538 +;2538: value = DC->getCVarValue(item->cvar); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2060 +ADDRGP4 DC +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRP4 +CALLF4 +ASGNF4 +ADDRLP4 8 +ADDRLP4 2060 +INDIRF4 +ASGNF4 +line 2539 +;2539: } +LABELV $1097 +line 2540 +;2540: for (i = 0; i < multiPtr->count; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1101 +JUMPV +LABELV $1098 +line 2541 +;2541: if (multiPtr->strDef) { +ADDRLP4 4 +INDIRP4 +CNSTI4 388 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1102 +line 2542 +;2542: if (Q_stricmp(buff, multiPtr->cvarStr[i]) == 0) { +ADDRLP4 12 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 128 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2060 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 2060 +INDIRI4 +CNSTI4 0 +NEI4 $1103 +line 2543 +;2543: return i; +ADDRLP4 0 +INDIRI4 +RETI4 +ADDRGP4 $1093 +JUMPV +line 2545 +;2544: } +;2545: } else { +LABELV $1102 +line 2546 +;2546: if (multiPtr->cvarValue[i] == value) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +NEF4 $1106 +line 2547 +;2547: return i; +ADDRLP4 0 +INDIRI4 +RETI4 +ADDRGP4 $1093 +JUMPV +LABELV $1106 +line 2549 +;2548: } +;2549: } +LABELV $1103 +line 2550 +;2550: } +LABELV $1099 +line 2540 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1101 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 384 +ADDP4 +INDIRI4 +LTI4 $1098 +line 2551 +;2551: } +LABELV $1094 +line 2552 +;2552: return 0; +CNSTI4 0 +RETI4 +LABELV $1093 +endproc Item_Multi_FindCvarByValue 2064 12 +export Item_Multi_Setting +proc Item_Multi_Setting 2064 12 +line 2555 +;2553:} +;2554: +;2555:const char *Item_Multi_Setting(itemDef_t *item) { +line 2557 +;2556: char buff[2048]; +;2557: float value = 0; +ADDRLP4 8 +CNSTF4 0 +ASGNF4 +line 2559 +;2558: int i; +;2559: multiDef_t *multiPtr = (multiDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2560 +;2560: if (multiPtr) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1109 +line 2561 +;2561: if (multiPtr->strDef) { +ADDRLP4 0 +INDIRP4 +CNSTI4 388 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1111 +line 2562 +;2562: DC->getCVarString(item->cvar, buff, sizeof(buff)); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRP4 +CALLV +pop +line 2563 +;2563: } else { +ADDRGP4 $1112 +JUMPV +LABELV $1111 +line 2564 +;2564: value = DC->getCVarValue(item->cvar); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2060 +ADDRGP4 DC +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRP4 +CALLF4 +ASGNF4 +ADDRLP4 8 +ADDRLP4 2060 +INDIRF4 +ASGNF4 +line 2565 +;2565: } +LABELV $1112 +line 2566 +;2566: for (i = 0; i < multiPtr->count; i++) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1116 +JUMPV +LABELV $1113 +line 2567 +;2567: if (multiPtr->strDef) { +ADDRLP4 0 +INDIRP4 +CNSTI4 388 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1117 +line 2568 +;2568: if (Q_stricmp(buff, multiPtr->cvarStr[i]) == 0) { +ADDRLP4 12 +ARGP4 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2060 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 2060 +INDIRI4 +CNSTI4 0 +NEI4 $1118 +line 2569 +;2569: return multiPtr->cvarList[i]; +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRP4 +RETP4 +ADDRGP4 $1108 +JUMPV +line 2571 +;2570: } +;2571: } else { +LABELV $1117 +line 2572 +;2572: if (multiPtr->cvarValue[i] == value) { +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +NEF4 $1121 +line 2573 +;2573: return multiPtr->cvarList[i]; +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +INDIRP4 +RETP4 +ADDRGP4 $1108 +JUMPV +LABELV $1121 +line 2575 +;2574: } +;2575: } +LABELV $1118 +line 2576 +;2576: } +LABELV $1114 +line 2566 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1116 +ADDRLP4 4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +INDIRI4 +LTI4 $1113 +line 2577 +;2577: } +LABELV $1109 +line 2578 +;2578: return ""; +ADDRGP4 $99 +RETP4 +LABELV $1108 +endproc Item_Multi_Setting 2064 12 +export Item_Multi_HandleKey +proc Item_Multi_HandleKey 56 12 +line 2581 +;2579:} +;2580: +;2581:qboolean Item_Multi_HandleKey(itemDef_t *item, int key) { +line 2582 +;2582: multiDef_t *multiPtr = (multiDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2583 +;2583: if (multiPtr) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1124 +line 2584 +;2584: if (Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory) && item->window.flags & WINDOW_HASFOCUS && item->cvar) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 8 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $1126 +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +ADDRLP4 12 +INDIRI4 +EQI4 $1126 +ADDRLP4 16 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1126 +line 2585 +;2585: if (key == A_MOUSE1 || key == A_ENTER || key == A_MOUSE2 || key == A_MOUSE3) { +ADDRLP4 20 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 141 +EQI4 $1132 +ADDRLP4 20 +INDIRI4 +CNSTI4 10 +EQI4 $1132 +ADDRLP4 20 +INDIRI4 +CNSTI4 142 +EQI4 $1132 +ADDRLP4 20 +INDIRI4 +CNSTI4 166 +NEI4 $1128 +LABELV $1132 +line 2586 +;2586: int current = Item_Multi_FindCvarByValue(item) + 1; +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRGP4 Item_Multi_FindCvarByValue +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 32 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2587 +;2587: int max = Item_Multi_CountSettings(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 Item_Multi_CountSettings +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 2588 +;2588: if ( current < 0 || current >= max ) { +ADDRLP4 40 +ADDRLP4 24 +INDIRI4 +ASGNI4 +ADDRLP4 40 +INDIRI4 +CNSTI4 0 +LTI4 $1135 +ADDRLP4 40 +INDIRI4 +ADDRLP4 28 +INDIRI4 +LTI4 $1133 +LABELV $1135 +line 2589 +;2589: current = 0; +ADDRLP4 24 +CNSTI4 0 +ASGNI4 +line 2590 +;2590: } +LABELV $1133 +line 2591 +;2591: if (multiPtr->strDef) { +ADDRLP4 0 +INDIRP4 +CNSTI4 388 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1136 +line 2592 +;2592: DC->setCVar(item->cvar, multiPtr->cvarStr[current]); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 44 +CNSTI4 128 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +ADDRLP4 44 +INDIRI4 +ADDP4 +INDIRP4 +CALLV +pop +line 2593 +;2593: } else { +ADDRGP4 $1137 +JUMPV +LABELV $1136 +line 2594 +;2594: float value = multiPtr->cvarValue[current]; +ADDRLP4 44 +ADDRLP4 24 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDP4 +INDIRF4 +ASGNF4 +line 2595 +;2595: if (((float)((int) value)) == value) { +ADDRLP4 48 +ADDRLP4 44 +INDIRF4 +ASGNF4 +ADDRLP4 48 +INDIRF4 +CVFI4 4 +CVIF4 4 +ADDRLP4 48 +INDIRF4 +NEF4 $1138 +line 2596 +;2596: DC->setCVar(item->cvar, va("%i", (int) value )); +ADDRGP4 $1086 +ARGP4 +ADDRLP4 44 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 52 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 52 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 2597 +;2597: } +ADDRGP4 $1139 +JUMPV +LABELV $1138 +line 2598 +;2598: else { +line 2599 +;2599: DC->setCVar(item->cvar, va("%f", value )); +ADDRGP4 $1140 +ARGP4 +ADDRLP4 44 +INDIRF4 +ARGF4 +ADDRLP4 52 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 52 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 2600 +;2600: } +LABELV $1139 +line 2601 +;2601: } +LABELV $1137 +line 2602 +;2602: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1123 +JUMPV +LABELV $1128 +line 2604 +;2603: } +;2604: } +LABELV $1126 +line 2605 +;2605: } +LABELV $1124 +line 2606 +;2606: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1123 +endproc Item_Multi_HandleKey 56 12 +export Item_TextField_HandleKey +proc Item_TextField_HandleKey 2100 12 +line 2609 +;2607:} +;2608: +;2609:qboolean Item_TextField_HandleKey(itemDef_t *item, int key) { +line 2612 +;2610: char buff[2048]; +;2611: int len; +;2612: itemDef_t *newItem = NULL; +ADDRLP4 2052 +CNSTP4 0 +ASGNP4 +line 2613 +;2613: editFieldDef_t *editPtr = (editFieldDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2615 +;2614: +;2615: if (item->cvar) { +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1142 +line 2617 +;2616: +;2617: buff[0] = 0; +ADDRLP4 4 +CNSTI1 0 +ASGNI1 +line 2618 +;2618: DC->getCVarString(item->cvar, buff, sizeof(buff)); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRP4 +CALLV +pop +line 2619 +;2619: len = strlen(buff); +ADDRLP4 4 +ARGP4 +ADDRLP4 2060 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 2056 +ADDRLP4 2060 +INDIRI4 +ASGNI4 +line 2620 +;2620: if (editPtr->maxChars && len > editPtr->maxChars) { +ADDRLP4 2064 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 2064 +INDIRI4 +CNSTI4 0 +EQI4 $1144 +ADDRLP4 2056 +INDIRI4 +ADDRLP4 2064 +INDIRI4 +LEI4 $1144 +line 2621 +;2621: len = editPtr->maxChars; +ADDRLP4 2056 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ASGNI4 +line 2622 +;2622: } +LABELV $1144 +line 2623 +;2623: if ( key & K_CHAR_FLAG ) { +ADDRFP4 4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $1146 +line 2624 +;2624: key &= ~K_CHAR_FLAG; +ADDRFP4 4 +ADDRFP4 4 +INDIRI4 +CNSTI4 -1025 +BANDI4 +ASGNI4 +line 2627 +;2625: +;2626: +;2627: if (key == 'h' - 'a' + 1 ) { // ctrl-h is backspace +ADDRFP4 4 +INDIRI4 +CNSTI4 8 +NEI4 $1148 +line 2628 +;2628: if ( item->cursorPos > 0 ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1150 +line 2629 +;2629: memmove( &buff[item->cursorPos - 1], &buff[item->cursorPos], len + 1 - item->cursorPos); +ADDRLP4 2068 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 2068 +INDIRI4 +ADDRLP4 4-1 +ADDP4 +ARGP4 +ADDRLP4 2068 +INDIRI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRLP4 2056 +INDIRI4 +CNSTI4 1 +ADDI4 +ADDRLP4 2068 +INDIRI4 +SUBI4 +ARGI4 +ADDRGP4 memmove +CALLP4 +pop +line 2630 +;2630: item->cursorPos--; +ADDRLP4 2072 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ASGNP4 +ADDRLP4 2072 +INDIRP4 +ADDRLP4 2072 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2631 +;2631: if (item->cursorPos < editPtr->paintOffset) { +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +GEI4 $1153 +line 2632 +;2632: editPtr->paintOffset--; +ADDRLP4 2076 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 2076 +INDIRP4 +ADDRLP4 2076 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2633 +;2633: } +LABELV $1153 +line 2634 +;2634: } +LABELV $1150 +line 2635 +;2635: DC->setCVar(item->cvar, buff); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 2636 +;2636: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1148 +line 2643 +;2637: } +;2638: +;2639: +;2640: // +;2641: // ignore any non printable chars +;2642: // +;2643: if ( key < 32 || !item->cvar) { +ADDRFP4 4 +INDIRI4 +CNSTI4 32 +LTI4 $1157 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1155 +LABELV $1157 +line 2644 +;2644: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1155 +line 2647 +;2645: } +;2646: +;2647: if (item->type == ITEM_TYPE_NUMERICFIELD) { +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 9 +NEI4 $1158 +line 2648 +;2648: if (key < '0' || key > '9') { +ADDRLP4 2068 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 2068 +INDIRI4 +CNSTI4 48 +LTI4 $1162 +ADDRLP4 2068 +INDIRI4 +CNSTI4 57 +LEI4 $1160 +LABELV $1162 +line 2649 +;2649: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1160 +line 2651 +;2650: } +;2651: } +LABELV $1158 +line 2653 +;2652: +;2653: if (!DC->getOverstrikeMode()) { +ADDRLP4 2068 +ADDRGP4 DC +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 2068 +INDIRI4 +CNSTI4 0 +NEI4 $1163 +line 2654 +;2654: if (( len == MAX_EDITFIELD - 1 ) || (editPtr->maxChars && len >= editPtr->maxChars)) { +ADDRLP4 2072 +ADDRLP4 2056 +INDIRI4 +ASGNI4 +ADDRLP4 2072 +INDIRI4 +CNSTI4 255 +EQI4 $1167 +ADDRLP4 2076 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 2076 +INDIRI4 +CNSTI4 0 +EQI4 $1165 +ADDRLP4 2072 +INDIRI4 +ADDRLP4 2076 +INDIRI4 +LTI4 $1165 +LABELV $1167 +line 2655 +;2655: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1165 +line 2657 +;2656: } +;2657: memmove( &buff[item->cursorPos + 1], &buff[item->cursorPos], len + 1 - item->cursorPos ); +ADDRLP4 2080 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 2080 +INDIRI4 +ADDRLP4 4+1 +ADDP4 +ARGP4 +ADDRLP4 2080 +INDIRI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRLP4 2056 +INDIRI4 +CNSTI4 1 +ADDI4 +ADDRLP4 2080 +INDIRI4 +SUBI4 +ARGI4 +ADDRGP4 memmove +CALLP4 +pop +line 2658 +;2658: } else { +ADDRGP4 $1164 +JUMPV +LABELV $1163 +line 2659 +;2659: if (editPtr->maxChars && item->cursorPos >= editPtr->maxChars) { +ADDRLP4 2072 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 2072 +INDIRI4 +CNSTI4 0 +EQI4 $1169 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 2072 +INDIRI4 +LTI4 $1169 +line 2660 +;2660: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1169 +line 2662 +;2661: } +;2662: } +LABELV $1164 +line 2664 +;2663: +;2664: buff[item->cursorPos] = key; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 4 +ADDP4 +ADDRFP4 4 +INDIRI4 +CVII1 4 +ASGNI1 +line 2667 +;2665: +;2666: //rww - nul-terminate! +;2667: if (item->cursorPos+1 < 2048) +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +CNSTI4 1 +ADDI4 +CNSTI4 2048 +GEI4 $1171 +line 2668 +;2668: { +line 2669 +;2669: buff[item->cursorPos+1] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 4+1 +ADDP4 +CNSTI1 0 +ASGNI1 +line 2670 +;2670: } +ADDRGP4 $1172 +JUMPV +LABELV $1171 +line 2672 +;2671: else +;2672: { +line 2673 +;2673: buff[item->cursorPos] = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 2674 +;2674: } +LABELV $1172 +line 2676 +;2675: +;2676: DC->setCVar(item->cvar, buff); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 2678 +;2677: +;2678: if (item->cursorPos < len + 1) { +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 2056 +INDIRI4 +CNSTI4 1 +ADDI4 +GEI4 $1147 +line 2679 +;2679: item->cursorPos++; +ADDRLP4 2072 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ASGNP4 +ADDRLP4 2072 +INDIRP4 +ADDRLP4 2072 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2680 +;2680: if (editPtr->maxPaintChars && item->cursorPos > editPtr->maxPaintChars) { +ADDRLP4 2076 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 2076 +INDIRI4 +CNSTI4 0 +EQI4 $1147 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 2076 +INDIRI4 +LEI4 $1147 +line 2681 +;2681: editPtr->paintOffset++; +ADDRLP4 2080 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 2080 +INDIRP4 +ADDRLP4 2080 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2682 +;2682: } +line 2683 +;2683: } +line 2685 +;2684: +;2685: } else { +ADDRGP4 $1147 +JUMPV +LABELV $1146 +line 2687 +;2686: +;2687: if ( key == A_DELETE || key == A_KP_PERIOD ) { +ADDRLP4 2068 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 2068 +INDIRI4 +CNSTI4 127 +EQI4 $1180 +ADDRLP4 2068 +INDIRI4 +CNSTI4 14 +NEI4 $1178 +LABELV $1180 +line 2688 +;2688: if ( item->cursorPos < len ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 2056 +INDIRI4 +GEI4 $1181 +line 2689 +;2689: memmove( buff + item->cursorPos, buff + item->cursorPos + 1, len - item->cursorPos); +ADDRLP4 2072 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 2072 +INDIRI4 +ADDRLP4 4 +ADDP4 +ARGP4 +ADDRLP4 2072 +INDIRI4 +ADDRLP4 4+1 +ADDP4 +ARGP4 +ADDRLP4 2056 +INDIRI4 +ADDRLP4 2072 +INDIRI4 +SUBI4 +ARGI4 +ADDRGP4 memmove +CALLP4 +pop +line 2690 +;2690: DC->setCVar(item->cvar, buff); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 2691 +;2691: } +LABELV $1181 +line 2692 +;2692: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1178 +line 2695 +;2693: } +;2694: +;2695: if ( key == A_CURSOR_RIGHT || key == A_KP_6 ) +ADDRLP4 2072 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 2072 +INDIRI4 +CNSTI4 173 +EQI4 $1186 +ADDRLP4 2072 +INDIRI4 +CNSTI4 22 +NEI4 $1184 +LABELV $1186 +line 2696 +;2696: { +line 2697 +;2697: if (editPtr->maxPaintChars && item->cursorPos >= editPtr->maxPaintChars && item->cursorPos < len) { +ADDRLP4 2076 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 2076 +INDIRI4 +CNSTI4 0 +EQI4 $1187 +ADDRLP4 2080 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 2080 +INDIRI4 +ADDRLP4 2076 +INDIRI4 +LTI4 $1187 +ADDRLP4 2080 +INDIRI4 +ADDRLP4 2056 +INDIRI4 +GEI4 $1187 +line 2698 +;2698: item->cursorPos++; +ADDRLP4 2084 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ASGNP4 +ADDRLP4 2084 +INDIRP4 +ADDRLP4 2084 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2699 +;2699: editPtr->paintOffset++; +ADDRLP4 2088 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 2088 +INDIRP4 +ADDRLP4 2088 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2700 +;2700: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1187 +line 2702 +;2701: } +;2702: if (item->cursorPos < len) { +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 2056 +INDIRI4 +GEI4 $1189 +line 2703 +;2703: item->cursorPos++; +ADDRLP4 2084 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ASGNP4 +ADDRLP4 2084 +INDIRP4 +ADDRLP4 2084 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 2704 +;2704: } +LABELV $1189 +line 2705 +;2705: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1184 +line 2708 +;2706: } +;2707: +;2708: if ( key == A_CURSOR_LEFT || key == A_KP_4 ) +ADDRLP4 2076 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 2076 +INDIRI4 +CNSTI4 172 +EQI4 $1193 +ADDRLP4 2076 +INDIRI4 +CNSTI4 20 +NEI4 $1191 +LABELV $1193 +line 2709 +;2709: { +line 2710 +;2710: if ( item->cursorPos > 0 ) { +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $1194 +line 2711 +;2711: item->cursorPos--; +ADDRLP4 2080 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ASGNP4 +ADDRLP4 2080 +INDIRP4 +ADDRLP4 2080 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2712 +;2712: } +LABELV $1194 +line 2713 +;2713: if (item->cursorPos < editPtr->paintOffset) { +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +GEI4 $1196 +line 2714 +;2714: editPtr->paintOffset--; +ADDRLP4 2080 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 2080 +INDIRP4 +ADDRLP4 2080 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 2715 +;2715: } +LABELV $1196 +line 2716 +;2716: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1191 +line 2719 +;2717: } +;2718: +;2719: if ( key == A_HOME || key == A_KP_7) {// || ( tolower(key) == 'a' && trap_Key_IsDown( K_CTRL ) ) ) { +ADDRLP4 2080 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 2080 +INDIRI4 +CNSTI4 144 +EQI4 $1200 +ADDRLP4 2080 +INDIRI4 +CNSTI4 23 +NEI4 $1198 +LABELV $1200 +line 2720 +;2720: item->cursorPos = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2721 +;2721: editPtr->paintOffset = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTI4 0 +ASGNI4 +line 2722 +;2722: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1198 +line 2725 +;2723: } +;2724: +;2725: if ( key == A_END || key == A_KP_1) {// ( tolower(key) == 'e' && trap_Key_IsDown( K_CTRL ) ) ) { +ADDRLP4 2084 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 2084 +INDIRI4 +CNSTI4 157 +EQI4 $1203 +ADDRLP4 2084 +INDIRI4 +CNSTI4 17 +NEI4 $1201 +LABELV $1203 +line 2726 +;2726: item->cursorPos = len; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +ADDRLP4 2056 +INDIRI4 +ASGNI4 +line 2727 +;2727: if(item->cursorPos > editPtr->maxPaintChars) { +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +LEI4 $1204 +line 2728 +;2728: editPtr->paintOffset = len - editPtr->maxPaintChars; +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 2056 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +SUBI4 +ASGNI4 +line 2729 +;2729: } +LABELV $1204 +line 2730 +;2730: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1201 +line 2733 +;2731: } +;2732: +;2733: if ( key == A_INSERT || key == A_KP_0 ) { +ADDRLP4 2088 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 2088 +INDIRI4 +CNSTI4 143 +EQI4 $1208 +ADDRLP4 2088 +INDIRI4 +CNSTI4 16 +NEI4 $1206 +LABELV $1208 +line 2734 +;2734: DC->setOverstrikeMode(!DC->getOverstrikeMode()); +ADDRLP4 2096 +ADDRGP4 DC +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 2096 +INDIRI4 +CNSTI4 0 +NEI4 $1210 +ADDRLP4 2092 +CNSTI4 1 +ASGNI4 +ADDRGP4 $1211 +JUMPV +LABELV $1210 +ADDRLP4 2092 +CNSTI4 0 +ASGNI4 +LABELV $1211 +ADDRLP4 2092 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRP4 +CALLV +pop +line 2735 +;2735: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1206 +line 2737 +;2736: } +;2737: } +LABELV $1147 +line 2739 +;2738: +;2739: if (key == A_TAB || key == A_CURSOR_DOWN || key == A_KP_2) { +ADDRLP4 2068 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 2068 +INDIRI4 +CNSTI4 9 +EQI4 $1215 +ADDRLP4 2068 +INDIRI4 +CNSTI4 171 +EQI4 $1215 +ADDRLP4 2068 +INDIRI4 +CNSTI4 18 +NEI4 $1212 +LABELV $1215 +line 2740 +;2740: newItem = Menu_SetNextCursorItem(item->parent); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2072 +ADDRGP4 Menu_SetNextCursorItem +CALLP4 +ASGNP4 +ADDRLP4 2052 +ADDRLP4 2072 +INDIRP4 +ASGNP4 +line 2741 +;2741: if (newItem && (newItem->type == ITEM_TYPE_EDITFIELD || newItem->type == ITEM_TYPE_NUMERICFIELD)) { +ADDRLP4 2052 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1216 +ADDRLP4 2080 +ADDRLP4 2052 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 2080 +INDIRI4 +CNSTI4 4 +EQI4 $1218 +ADDRLP4 2080 +INDIRI4 +CNSTI4 9 +NEI4 $1216 +LABELV $1218 +line 2742 +;2742: g_editItem = newItem; +ADDRGP4 g_editItem +ADDRLP4 2052 +INDIRP4 +ASGNP4 +line 2743 +;2743: } +LABELV $1216 +line 2744 +;2744: } +LABELV $1212 +line 2746 +;2745: +;2746: if (key == A_CURSOR_UP || key == A_KP_8) { +ADDRLP4 2072 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 2072 +INDIRI4 +CNSTI4 170 +EQI4 $1221 +ADDRLP4 2072 +INDIRI4 +CNSTI4 24 +NEI4 $1219 +LABELV $1221 +line 2747 +;2747: newItem = Menu_SetPrevCursorItem(item->parent); +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2076 +ADDRGP4 Menu_SetPrevCursorItem +CALLP4 +ASGNP4 +ADDRLP4 2052 +ADDRLP4 2076 +INDIRP4 +ASGNP4 +line 2748 +;2748: if (newItem && (newItem->type == ITEM_TYPE_EDITFIELD || newItem->type == ITEM_TYPE_NUMERICFIELD)) { +ADDRLP4 2052 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1222 +ADDRLP4 2084 +ADDRLP4 2052 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 2084 +INDIRI4 +CNSTI4 4 +EQI4 $1224 +ADDRLP4 2084 +INDIRI4 +CNSTI4 9 +NEI4 $1222 +LABELV $1224 +line 2749 +;2749: g_editItem = newItem; +ADDRGP4 g_editItem +ADDRLP4 2052 +INDIRP4 +ASGNP4 +line 2750 +;2750: } +LABELV $1222 +line 2751 +;2751: } +LABELV $1219 +line 2753 +;2752: +;2753: if ( key == A_ENTER || key == A_KP_ENTER || key == A_ESCAPE) { +ADDRLP4 2076 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 2076 +INDIRI4 +CNSTI4 10 +EQI4 $1228 +ADDRLP4 2076 +INDIRI4 +CNSTI4 13 +EQI4 $1228 +ADDRLP4 2076 +INDIRI4 +CNSTI4 27 +NEI4 $1225 +LABELV $1228 +line 2754 +;2754: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1225 +line 2757 +;2755: } +;2756: +;2757: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1141 +JUMPV +LABELV $1142 +line 2759 +;2758: } +;2759: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1141 +endproc Item_TextField_HandleKey 2100 12 +proc Scroll_TextScroll_AutoFunc 12 16 +line 2764 +;2760: +;2761:} +;2762: +;2763:static void Scroll_TextScroll_AutoFunc (void *p) +;2764:{ +line 2765 +;2765: scrollInfo_t *si = (scrollInfo_t*)p; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2767 +;2766: +;2767: if (DC->realTime > si->nextScrollTime) +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +LEI4 $1230 +line 2768 +;2768: { +line 2772 +;2769: // need to scroll which is done by simulating a click to the item +;2770: // this is done a bit sideways as the autoscroll "knows" that the item is a listbox +;2771: // so it calls it directly +;2772: Item_TextScroll_HandleKey(si->item, si->scrollKey, qtrue, qfalse); +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 Item_TextScroll_HandleKey +CALLI4 +pop +line 2773 +;2773: si->nextScrollTime = DC->realTime + si->adjustValue; +ADDRLP4 0 +INDIRP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 2774 +;2774: } +LABELV $1230 +line 2776 +;2775: +;2776: if (DC->realTime > si->nextAdjustTime) +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LEI4 $1232 +line 2777 +;2777: { +line 2778 +;2778: si->nextAdjustTime = DC->realTime + SCROLL_TIME_ADJUST; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 150 +ADDI4 +ASGNI4 +line 2779 +;2779: if (si->adjustValue > SCROLL_TIME_FLOOR) +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 20 +LEI4 $1234 +line 2780 +;2780: { +line 2781 +;2781: si->adjustValue -= SCROLL_TIME_ADJUSTOFFSET; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 40 +SUBI4 +ASGNI4 +line 2782 +;2782: } +LABELV $1234 +line 2783 +;2783: } +LABELV $1232 +line 2784 +;2784:} +LABELV $1229 +endproc Scroll_TextScroll_AutoFunc 12 16 +proc Scroll_TextScroll_ThumbFunc 40 16 +line 2787 +;2785: +;2786:static void Scroll_TextScroll_ThumbFunc(void *p) +;2787:{ +line 2788 +;2788: scrollInfo_t *si = (scrollInfo_t*)p; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2793 +;2789: rectDef_t r; +;2790: int pos; +;2791: int max; +;2792: +;2793: textScrollDef_t *scrollPtr = (textScrollDef_t*)si->item->typeData; +ADDRLP4 24 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2795 +;2794: +;2795: if (DC->cursory != si->yStart) +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +EQF4 $1237 +line 2796 +;2796: { +line 2797 +;2797: r.x = si->item->window.rect.x + si->item->window.rect.w - SCROLLBAR_SIZE - 1; +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 32 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +ASGNF4 +line 2798 +;2798: r.y = si->item->window.rect.y + SCROLLBAR_SIZE + 1; +ADDRLP4 4+4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 2799 +;2799: r.h = si->item->window.rect.h - (SCROLLBAR_SIZE*2) - 2; +ADDRLP4 4+12 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 2800 +;2800: r.w = SCROLLBAR_SIZE; +ADDRLP4 4+8 +CNSTF4 1098907648 +ASGNF4 +line 2801 +;2801: max = Item_TextScroll_MaxScroll(si->item); +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 Item_TextScroll_MaxScroll +CALLI4 +ASGNI4 +ADDRLP4 28 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 2803 +;2802: // +;2803: pos = (DC->cursory - r.y - SCROLLBAR_SIZE/2) * max / (r.h - SCROLLBAR_SIZE); +ADDRLP4 20 +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 4+4 +INDIRF4 +SUBF4 +CNSTF4 1090519040 +SUBF4 +ADDRLP4 28 +INDIRI4 +CVIF4 4 +MULF4 +ADDRLP4 4+12 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +DIVF4 +CVFI4 4 +ASGNI4 +line 2804 +;2804: if (pos < 0) +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +GEI4 $1244 +line 2805 +;2805: { +line 2806 +;2806: pos = 0; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +line 2807 +;2807: } +ADDRGP4 $1245 +JUMPV +LABELV $1244 +line 2808 +;2808: else if (pos > max) +ADDRLP4 20 +INDIRI4 +ADDRLP4 28 +INDIRI4 +LEI4 $1246 +line 2809 +;2809: { +line 2810 +;2810: pos = max; +ADDRLP4 20 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 2811 +;2811: } +LABELV $1246 +LABELV $1245 +line 2813 +;2812: +;2813: scrollPtr->startPos = pos; +ADDRLP4 24 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 2814 +;2814: si->yStart = DC->cursory; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2815 +;2815: } +LABELV $1237 +line 2817 +;2816: +;2817: if (DC->realTime > si->nextScrollTime) +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +LEI4 $1248 +line 2818 +;2818: { +line 2822 +;2819: // need to scroll which is done by simulating a click to the item +;2820: // this is done a bit sideways as the autoscroll "knows" that the item is a listbox +;2821: // so it calls it directly +;2822: Item_TextScroll_HandleKey(si->item, si->scrollKey, qtrue, qfalse); +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 Item_TextScroll_HandleKey +CALLI4 +pop +line 2823 +;2823: si->nextScrollTime = DC->realTime + si->adjustValue; +ADDRLP4 0 +INDIRP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 2824 +;2824: } +LABELV $1248 +line 2826 +;2825: +;2826: if (DC->realTime > si->nextAdjustTime) +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LEI4 $1250 +line 2827 +;2827: { +line 2828 +;2828: si->nextAdjustTime = DC->realTime + SCROLL_TIME_ADJUST; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 150 +ADDI4 +ASGNI4 +line 2829 +;2829: if (si->adjustValue > SCROLL_TIME_FLOOR) +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 20 +LEI4 $1252 +line 2830 +;2830: { +line 2831 +;2831: si->adjustValue -= SCROLL_TIME_ADJUSTOFFSET; +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRI4 +CNSTI4 40 +SUBI4 +ASGNI4 +line 2832 +;2832: } +LABELV $1252 +line 2833 +;2833: } +LABELV $1250 +line 2834 +;2834:} +LABELV $1236 +endproc Scroll_TextScroll_ThumbFunc 40 16 +proc Scroll_ListBox_AutoFunc 12 16 +line 2836 +;2835: +;2836:static void Scroll_ListBox_AutoFunc(void *p) { +line 2837 +;2837: scrollInfo_t *si = (scrollInfo_t*)p; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2838 +;2838: if (DC->realTime > si->nextScrollTime) { +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +LEI4 $1255 +line 2842 +;2839: // need to scroll which is done by simulating a click to the item +;2840: // this is done a bit sideways as the autoscroll "knows" that the item is a listbox +;2841: // so it calls it directly +;2842: Item_ListBox_HandleKey(si->item, si->scrollKey, qtrue, qfalse); +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 Item_ListBox_HandleKey +CALLI4 +pop +line 2843 +;2843: si->nextScrollTime = DC->realTime + si->adjustValue; +ADDRLP4 0 +INDIRP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 2844 +;2844: } +LABELV $1255 +line 2846 +;2845: +;2846: if (DC->realTime > si->nextAdjustTime) { +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LEI4 $1257 +line 2847 +;2847: si->nextAdjustTime = DC->realTime + SCROLL_TIME_ADJUST; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 150 +ADDI4 +ASGNI4 +line 2848 +;2848: if (si->adjustValue > SCROLL_TIME_FLOOR) { +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 20 +LEI4 $1259 +line 2849 +;2849: si->adjustValue -= SCROLL_TIME_ADJUSTOFFSET; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 40 +SUBI4 +ASGNI4 +line 2850 +;2850: } +LABELV $1259 +line 2851 +;2851: } +LABELV $1257 +line 2852 +;2852:} +LABELV $1254 +endproc Scroll_ListBox_AutoFunc 12 16 +proc Scroll_ListBox_ThumbFunc 40 16 +line 2854 +;2853: +;2854:static void Scroll_ListBox_ThumbFunc(void *p) { +line 2855 +;2855: scrollInfo_t *si = (scrollInfo_t*)p; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2859 +;2856: rectDef_t r; +;2857: int pos, max; +;2858: +;2859: listBoxDef_t *listPtr = (listBoxDef_t*)si->item->typeData; +ADDRLP4 28 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2860 +;2860: if (si->item->window.flags & WINDOW_HORIZONTAL) { +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $1262 +line 2861 +;2861: if (DC->cursorx == si->xStart) { +ADDRGP4 DC +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +NEF4 $1264 +line 2862 +;2862: return; +ADDRGP4 $1261 +JUMPV +LABELV $1264 +line 2864 +;2863: } +;2864: r.x = si->item->window.rect.x + SCROLLBAR_SIZE + 1; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 2865 +;2865: r.y = si->item->window.rect.y + si->item->window.rect.h - SCROLLBAR_SIZE - 1; +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 4+4 +ADDRLP4 32 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 32 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +ASGNF4 +line 2866 +;2866: r.h = SCROLLBAR_SIZE; +ADDRLP4 4+12 +CNSTF4 1098907648 +ASGNF4 +line 2867 +;2867: r.w = si->item->window.rect.w - (SCROLLBAR_SIZE*2) - 2; +ADDRLP4 4+8 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 2868 +;2868: max = Item_ListBox_MaxScroll(si->item); +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 Item_ListBox_MaxScroll +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 2870 +;2869: // +;2870: pos = (DC->cursorx - r.x - SCROLLBAR_SIZE/2) * max / (r.w - SCROLLBAR_SIZE); +ADDRLP4 20 +ADDRGP4 DC +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 4 +INDIRF4 +SUBF4 +CNSTF4 1090519040 +SUBF4 +ADDRLP4 24 +INDIRI4 +CVIF4 4 +MULF4 +ADDRLP4 4+8 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +DIVF4 +CVFI4 4 +ASGNI4 +line 2871 +;2871: if (pos < 0) { +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +GEI4 $1270 +line 2872 +;2872: pos = 0; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +line 2873 +;2873: } +ADDRGP4 $1271 +JUMPV +LABELV $1270 +line 2874 +;2874: else if (pos > max) { +ADDRLP4 20 +INDIRI4 +ADDRLP4 24 +INDIRI4 +LEI4 $1272 +line 2875 +;2875: pos = max; +ADDRLP4 20 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 2876 +;2876: } +LABELV $1272 +LABELV $1271 +line 2877 +;2877: listPtr->startPos = pos; +ADDRLP4 28 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 2878 +;2878: si->xStart = DC->cursorx; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2879 +;2879: } +ADDRGP4 $1263 +JUMPV +LABELV $1262 +line 2880 +;2880: else if (DC->cursory != si->yStart) { +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +EQF4 $1274 +line 2882 +;2881: +;2882: r.x = si->item->window.rect.x + si->item->window.rect.w - SCROLLBAR_SIZE - 1; +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 32 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +ASGNF4 +line 2883 +;2883: r.y = si->item->window.rect.y + SCROLLBAR_SIZE + 1; +ADDRLP4 4+4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +ADDF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 2884 +;2884: r.h = si->item->window.rect.h - (SCROLLBAR_SIZE*2) - 2; +ADDRLP4 4+12 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 2885 +;2885: r.w = SCROLLBAR_SIZE; +ADDRLP4 4+8 +CNSTF4 1098907648 +ASGNF4 +line 2886 +;2886: max = Item_ListBox_MaxScroll(si->item); +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRGP4 Item_ListBox_MaxScroll +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 36 +INDIRI4 +ASGNI4 +line 2888 +;2887: // +;2888: pos = (DC->cursory - r.y - SCROLLBAR_SIZE/2) * max / (r.h - SCROLLBAR_SIZE); +ADDRLP4 20 +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 4+4 +INDIRF4 +SUBF4 +CNSTF4 1090519040 +SUBF4 +ADDRLP4 24 +INDIRI4 +CVIF4 4 +MULF4 +ADDRLP4 4+12 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +DIVF4 +CVFI4 4 +ASGNI4 +line 2889 +;2889: if (pos < 0) { +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +GEI4 $1281 +line 2890 +;2890: pos = 0; +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +line 2891 +;2891: } +ADDRGP4 $1282 +JUMPV +LABELV $1281 +line 2892 +;2892: else if (pos > max) { +ADDRLP4 20 +INDIRI4 +ADDRLP4 24 +INDIRI4 +LEI4 $1283 +line 2893 +;2893: pos = max; +ADDRLP4 20 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 2894 +;2894: } +LABELV $1283 +LABELV $1282 +line 2895 +;2895: listPtr->startPos = pos; +ADDRLP4 28 +INDIRP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 2896 +;2896: si->yStart = DC->cursory; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2897 +;2897: } +LABELV $1274 +LABELV $1263 +line 2899 +;2898: +;2899: if (DC->realTime > si->nextScrollTime) { +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +LEI4 $1285 +line 2903 +;2900: // need to scroll which is done by simulating a click to the item +;2901: // this is done a bit sideways as the autoscroll "knows" that the item is a listbox +;2902: // so it calls it directly +;2903: Item_ListBox_HandleKey(si->item, si->scrollKey, qtrue, qfalse); +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRGP4 Item_ListBox_HandleKey +CALLI4 +pop +line 2904 +;2904: si->nextScrollTime = DC->realTime + si->adjustValue; +ADDRLP4 0 +INDIRP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 2905 +;2905: } +LABELV $1285 +line 2907 +;2906: +;2907: if (DC->realTime > si->nextAdjustTime) { +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRI4 +LEI4 $1287 +line 2908 +;2908: si->nextAdjustTime = DC->realTime + SCROLL_TIME_ADJUST; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 150 +ADDI4 +ASGNI4 +line 2909 +;2909: if (si->adjustValue > SCROLL_TIME_FLOOR) { +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +CNSTI4 20 +LEI4 $1289 +line 2910 +;2910: si->adjustValue -= SCROLL_TIME_ADJUSTOFFSET; +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 32 +INDIRP4 +INDIRI4 +CNSTI4 40 +SUBI4 +ASGNI4 +line 2911 +;2911: } +LABELV $1289 +line 2912 +;2912: } +LABELV $1287 +line 2913 +;2913:} +LABELV $1261 +endproc Scroll_ListBox_ThumbFunc 40 16 +proc Scroll_Slider_ThumbFunc 28 8 +line 2915 +;2914: +;2915:static void Scroll_Slider_ThumbFunc(void *p) { +line 2917 +;2916: float x, value, cursorx; +;2917: scrollInfo_t *si = (scrollInfo_t*)p; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2918 +;2918: editFieldDef_t *editDef = si->item->typeData; +ADDRLP4 16 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 2920 +;2919: +;2920: if (si->item->text) { +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1292 +line 2921 +;2921: x = si->item->textRect.x + si->item->textRect.w + 8; +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 20 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1090519040 +ADDF4 +ASGNF4 +line 2922 +;2922: } else { +ADDRGP4 $1293 +JUMPV +LABELV $1292 +line 2923 +;2923: x = si->item->window.rect.x; +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +INDIRF4 +ASGNF4 +line 2924 +;2924: } +LABELV $1293 +line 2926 +;2925: +;2926: cursorx = DC->cursorx; +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2928 +;2927: +;2928: if (cursorx < x) { +ADDRLP4 12 +INDIRF4 +ADDRLP4 8 +INDIRF4 +GEF4 $1294 +line 2929 +;2929: cursorx = x; +ADDRLP4 12 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 2930 +;2930: } else if (cursorx > x + SLIDER_WIDTH) { +ADDRGP4 $1295 +JUMPV +LABELV $1294 +ADDRLP4 12 +INDIRF4 +ADDRLP4 8 +INDIRF4 +CNSTF4 1119879168 +ADDF4 +LEF4 $1296 +line 2931 +;2931: cursorx = x + SLIDER_WIDTH; +ADDRLP4 12 +ADDRLP4 8 +INDIRF4 +CNSTF4 1119879168 +ADDF4 +ASGNF4 +line 2932 +;2932: } +LABELV $1296 +LABELV $1295 +line 2933 +;2933: value = cursorx - x; +ADDRLP4 4 +ADDRLP4 12 +INDIRF4 +ADDRLP4 8 +INDIRF4 +SUBF4 +ASGNF4 +line 2934 +;2934: value /= SLIDER_WIDTH; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +CNSTF4 1119879168 +DIVF4 +ASGNF4 +line 2935 +;2935: value *= (editDef->maxVal - editDef->minVal); +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 2936 +;2936: value += editDef->minVal; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 16 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +line 2937 +;2937: DC->setCVar(si->item->cvar, va("%f", value)); +ADDRGP4 $1140 +ARGP4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 2938 +;2938:} +LABELV $1291 +endproc Scroll_Slider_ThumbFunc 28 8 +export Item_StartCapture +proc Item_StartCapture 28 12 +line 2941 +;2939: +;2940:void Item_StartCapture(itemDef_t *item, int key) +;2941:{ +line 2943 +;2942: int flags; +;2943: switch (item->type) +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 4 +LTI4 $1299 +ADDRLP4 4 +INDIRI4 +CNSTI4 10 +GTI4 $1343 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1344-16 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1344 +address $1302 +address $1299 +address $1302 +address $1299 +address $1299 +address $1302 +address $1336 +code +LABELV $1343 +ADDRLP4 4 +INDIRI4 +CNSTI4 14 +EQI4 $1319 +ADDRGP4 $1299 +JUMPV +line 2944 +;2944: { +LABELV $1302 +line 2948 +;2945: case ITEM_TYPE_EDITFIELD: +;2946: case ITEM_TYPE_NUMERICFIELD: +;2947: case ITEM_TYPE_LISTBOX: +;2948: { +line 2949 +;2949: flags = Item_ListBox_OverLB(item, DC->cursorx, DC->cursory); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +ADDRGP4 Item_ListBox_OverLB +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 2950 +;2950: if (flags & (WINDOW_LB_LEFTARROW | WINDOW_LB_RIGHTARROW)) { +ADDRLP4 0 +INDIRI4 +CNSTI4 6144 +BANDI4 +CNSTI4 0 +EQI4 $1303 +line 2951 +;2951: scrollInfo.nextScrollTime = DC->realTime + SCROLL_TIME_START; +ADDRGP4 scrollInfo +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 500 +ADDI4 +ASGNI4 +line 2952 +;2952: scrollInfo.nextAdjustTime = DC->realTime + SCROLL_TIME_ADJUST; +ADDRGP4 scrollInfo+4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 150 +ADDI4 +ASGNI4 +line 2953 +;2953: scrollInfo.adjustValue = SCROLL_TIME_START; +ADDRGP4 scrollInfo+8 +CNSTI4 500 +ASGNI4 +line 2954 +;2954: scrollInfo.scrollKey = key; +ADDRGP4 scrollInfo+12 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 2955 +;2955: scrollInfo.scrollDir = (flags & WINDOW_LB_LEFTARROW) ? qtrue : qfalse; +ADDRLP4 0 +INDIRI4 +CNSTI4 2048 +BANDI4 +CNSTI4 0 +EQI4 $1310 +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +ADDRGP4 $1311 +JUMPV +LABELV $1310 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +LABELV $1311 +ADDRGP4 scrollInfo+28 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 2956 +;2956: scrollInfo.item = item; +ADDRGP4 scrollInfo+24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2957 +;2957: captureData = &scrollInfo; +ADDRGP4 captureData +ADDRGP4 scrollInfo +ASGNP4 +line 2958 +;2958: captureFunc = &Scroll_ListBox_AutoFunc; +ADDRGP4 captureFunc +ADDRGP4 Scroll_ListBox_AutoFunc +ASGNP4 +line 2959 +;2959: itemCapture = item; +ADDRGP4 itemCapture +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2960 +;2960: } else if (flags & WINDOW_LB_THUMB) { +ADDRGP4 $1300 +JUMPV +LABELV $1303 +ADDRLP4 0 +INDIRI4 +CNSTI4 8192 +BANDI4 +CNSTI4 0 +EQI4 $1300 +line 2961 +;2961: scrollInfo.scrollKey = key; +ADDRGP4 scrollInfo+12 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 2962 +;2962: scrollInfo.item = item; +ADDRGP4 scrollInfo+24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2963 +;2963: scrollInfo.xStart = DC->cursorx; +ADDRGP4 scrollInfo+16 +ADDRGP4 DC +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2964 +;2964: scrollInfo.yStart = DC->cursory; +ADDRGP4 scrollInfo+20 +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2965 +;2965: captureData = &scrollInfo; +ADDRGP4 captureData +ADDRGP4 scrollInfo +ASGNP4 +line 2966 +;2966: captureFunc = &Scroll_ListBox_ThumbFunc; +ADDRGP4 captureFunc +ADDRGP4 Scroll_ListBox_ThumbFunc +ASGNP4 +line 2967 +;2967: itemCapture = item; +ADDRGP4 itemCapture +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2968 +;2968: } +line 2969 +;2969: break; +ADDRGP4 $1300 +JUMPV +LABELV $1319 +line 2973 +;2970: } +;2971: +;2972: case ITEM_TYPE_TEXTSCROLL: +;2973: flags = Item_TextScroll_OverLB (item, DC->cursorx, DC->cursory); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +ADDRGP4 Item_TextScroll_OverLB +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 2974 +;2974: if (flags & (WINDOW_LB_LEFTARROW | WINDOW_LB_RIGHTARROW)) +ADDRLP4 0 +INDIRI4 +CNSTI4 6144 +BANDI4 +CNSTI4 0 +EQI4 $1320 +line 2975 +;2975: { +line 2976 +;2976: scrollInfo.nextScrollTime = DC->realTime + SCROLL_TIME_START; +ADDRGP4 scrollInfo +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 500 +ADDI4 +ASGNI4 +line 2977 +;2977: scrollInfo.nextAdjustTime = DC->realTime + SCROLL_TIME_ADJUST; +ADDRGP4 scrollInfo+4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 150 +ADDI4 +ASGNI4 +line 2978 +;2978: scrollInfo.adjustValue = SCROLL_TIME_START; +ADDRGP4 scrollInfo+8 +CNSTI4 500 +ASGNI4 +line 2979 +;2979: scrollInfo.scrollKey = key; +ADDRGP4 scrollInfo+12 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 2980 +;2980: scrollInfo.scrollDir = (flags & WINDOW_LB_LEFTARROW) ? qtrue : qfalse; +ADDRLP4 0 +INDIRI4 +CNSTI4 2048 +BANDI4 +CNSTI4 0 +EQI4 $1327 +ADDRLP4 20 +CNSTI4 1 +ASGNI4 +ADDRGP4 $1328 +JUMPV +LABELV $1327 +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +LABELV $1328 +ADDRGP4 scrollInfo+28 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 2981 +;2981: scrollInfo.item = item; +ADDRGP4 scrollInfo+24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2982 +;2982: captureData = &scrollInfo; +ADDRGP4 captureData +ADDRGP4 scrollInfo +ASGNP4 +line 2983 +;2983: captureFunc = &Scroll_TextScroll_AutoFunc; +ADDRGP4 captureFunc +ADDRGP4 Scroll_TextScroll_AutoFunc +ASGNP4 +line 2984 +;2984: itemCapture = item; +ADDRGP4 itemCapture +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2985 +;2985: } +ADDRGP4 $1300 +JUMPV +LABELV $1320 +line 2986 +;2986: else if (flags & WINDOW_LB_THUMB) +ADDRLP4 0 +INDIRI4 +CNSTI4 8192 +BANDI4 +CNSTI4 0 +EQI4 $1300 +line 2987 +;2987: { +line 2988 +;2988: scrollInfo.scrollKey = key; +ADDRGP4 scrollInfo+12 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 2989 +;2989: scrollInfo.item = item; +ADDRGP4 scrollInfo+24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2990 +;2990: scrollInfo.xStart = DC->cursorx; +ADDRGP4 scrollInfo+16 +ADDRGP4 DC +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2991 +;2991: scrollInfo.yStart = DC->cursory; +ADDRGP4 scrollInfo+20 +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 2992 +;2992: captureData = &scrollInfo; +ADDRGP4 captureData +ADDRGP4 scrollInfo +ASGNP4 +line 2993 +;2993: captureFunc = &Scroll_TextScroll_ThumbFunc; +ADDRGP4 captureFunc +ADDRGP4 Scroll_TextScroll_ThumbFunc +ASGNP4 +line 2994 +;2994: itemCapture = item; +ADDRGP4 itemCapture +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 2995 +;2995: } +line 2996 +;2996: break; +ADDRGP4 $1300 +JUMPV +LABELV $1336 +line 2999 +;2997: +;2998: case ITEM_TYPE_SLIDER: +;2999: { +line 3000 +;3000: flags = Item_Slider_OverSlider(item, DC->cursorx, DC->cursory); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +ADDRGP4 Item_Slider_OverSlider +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 3001 +;3001: if (flags & WINDOW_LB_THUMB) { +ADDRLP4 0 +INDIRI4 +CNSTI4 8192 +BANDI4 +CNSTI4 0 +EQI4 $1300 +line 3002 +;3002: scrollInfo.scrollKey = key; +ADDRGP4 scrollInfo+12 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 3003 +;3003: scrollInfo.item = item; +ADDRGP4 scrollInfo+24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 3004 +;3004: scrollInfo.xStart = DC->cursorx; +ADDRGP4 scrollInfo+16 +ADDRGP4 DC +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 3005 +;3005: scrollInfo.yStart = DC->cursory; +ADDRGP4 scrollInfo+20 +ADDRGP4 DC +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 3006 +;3006: captureData = &scrollInfo; +ADDRGP4 captureData +ADDRGP4 scrollInfo +ASGNP4 +line 3007 +;3007: captureFunc = &Scroll_Slider_ThumbFunc; +ADDRGP4 captureFunc +ADDRGP4 Scroll_Slider_ThumbFunc +ASGNP4 +line 3008 +;3008: itemCapture = item; +ADDRGP4 itemCapture +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 3009 +;3009: } +line 3010 +;3010: break; +LABELV $1299 +LABELV $1300 +line 3013 +;3011: } +;3012: } +;3013:} +LABELV $1298 +endproc Item_StartCapture 28 12 +export Item_StopCapture +proc Item_StopCapture 0 0 +line 3015 +;3014: +;3015:void Item_StopCapture(itemDef_t *item) { +line 3017 +;3016: +;3017:} +LABELV $1346 +endproc Item_StopCapture 0 0 +export Item_Slider_HandleKey +proc Item_Slider_HandleKey 68 12 +line 3019 +;3018: +;3019:qboolean Item_Slider_HandleKey(itemDef_t *item, int key, qboolean down) { +line 3023 +;3020: float x, value, width, work; +;3021: +;3022: //DC->Print("slider handle key\n"); +;3023: if (item->window.flags & WINDOW_HASFOCUS && item->cvar && Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory)) { +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1348 +ADDRLP4 16 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1348 +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $1348 +line 3024 +;3024: if (key == A_MOUSE1 || key == A_ENTER || key == A_MOUSE2 || key == A_MOUSE3) { +ADDRLP4 28 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 141 +EQI4 $1354 +ADDRLP4 28 +INDIRI4 +CNSTI4 10 +EQI4 $1354 +ADDRLP4 28 +INDIRI4 +CNSTI4 142 +EQI4 $1354 +ADDRLP4 28 +INDIRI4 +CNSTI4 166 +NEI4 $1350 +LABELV $1354 +line 3025 +;3025: editFieldDef_t *editDef = item->typeData; +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 3026 +;3026: if (editDef) { +ADDRLP4 32 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1355 +line 3028 +;3027: rectDef_t testRect; +;3028: width = SLIDER_WIDTH; +ADDRLP4 8 +CNSTF4 1119879168 +ASGNF4 +line 3029 +;3029: if (item->text) { +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1357 +line 3030 +;3030: x = item->textRect.x + item->textRect.w + 8; +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 52 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1090519040 +ADDF4 +ASGNF4 +line 3031 +;3031: } else { +ADDRGP4 $1358 +JUMPV +LABELV $1357 +line 3032 +;3032: x = item->window.rect.x; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 3033 +;3033: } +LABELV $1358 +line 3035 +;3034: +;3035: testRect = item->window.rect; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +INDIRB +ASGNB 16 +line 3036 +;3036: testRect.x = x; +ADDRLP4 36 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 3037 +;3037: value = (float)SLIDER_THUMB_WIDTH / 2; +ADDRLP4 0 +CNSTF4 1086324736 +ASGNF4 +line 3038 +;3038: testRect.x -= value; +ADDRLP4 36 +ADDRLP4 36 +INDIRF4 +ADDRLP4 0 +INDIRF4 +SUBF4 +ASGNF4 +line 3040 +;3039: //DC->Print("slider x: %f\n", testRect.x); +;3040: testRect.w = (SLIDER_WIDTH + (float)SLIDER_THUMB_WIDTH / 2); +ADDRLP4 36+8 +CNSTF4 1120665600 +ASGNF4 +line 3042 +;3041: //DC->Print("slider w: %f\n", testRect.w); +;3042: if (Rect_ContainsPoint(&testRect, DC->cursorx, DC->cursory)) { +ADDRLP4 36 +ARGP4 +ADDRLP4 52 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 56 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +EQI4 $1360 +line 3043 +;3043: work = DC->cursorx - x; +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 4 +INDIRF4 +SUBF4 +ASGNF4 +line 3044 +;3044: value = work / width; +ADDRLP4 0 +ADDRLP4 12 +INDIRF4 +ADDRLP4 8 +INDIRF4 +DIVF4 +ASGNF4 +line 3045 +;3045: value *= (editDef->maxVal - editDef->minVal); +ADDRLP4 60 +ADDRLP4 32 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 3048 +;3046: // vm fuckage +;3047: // value = (((float)(DC->cursorx - x)/ SLIDER_WIDTH) * (editDef->maxVal - editDef->minVal)); +;3048: value += editDef->minVal; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +line 3049 +;3049: DC->setCVar(item->cvar, va("%f", value)); +ADDRGP4 $1140 +ARGP4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 64 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 128 +ADDP4 +INDIRP4 +CALLV +pop +line 3050 +;3050: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1347 +JUMPV +LABELV $1360 +line 3052 +;3051: } +;3052: } +LABELV $1355 +line 3053 +;3053: } +LABELV $1350 +line 3054 +;3054: } +LABELV $1348 +line 3055 +;3055: DC->Print("slider handle key exit\n"); +ADDRGP4 $1362 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRP4 +CALLV +pop +line 3056 +;3056: return qfalse; +CNSTI4 0 +RETI4 +LABELV $1347 +endproc Item_Slider_HandleKey 68 12 +export Item_HandleKey +proc Item_HandleKey 40 16 +line 3060 +;3057:} +;3058: +;3059: +;3060:qboolean Item_HandleKey(itemDef_t *item, int key, qboolean down) { +line 3062 +;3061: +;3062: if (itemCapture) { +ADDRGP4 itemCapture +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1364 +line 3063 +;3063: Item_StopCapture(itemCapture); +ADDRGP4 itemCapture +INDIRP4 +ARGP4 +ADDRGP4 Item_StopCapture +CALLV +pop +line 3064 +;3064: itemCapture = NULL; +ADDRGP4 itemCapture +CNSTP4 0 +ASGNP4 +line 3065 +;3065: captureFunc = 0; +ADDRGP4 captureFunc +CNSTP4 0 +ASGNP4 +line 3066 +;3066: captureData = NULL; +ADDRGP4 captureData +CNSTP4 0 +ASGNP4 +line 3067 +;3067: } else { +ADDRGP4 $1365 +JUMPV +LABELV $1364 +line 3069 +;3068: // bk001206 - parentheses +;3069: if ( down && ( key == A_MOUSE1 || key == A_MOUSE2 || key == A_MOUSE3 ) ) { +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $1366 +ADDRLP4 0 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 141 +EQI4 $1369 +ADDRLP4 0 +INDIRI4 +CNSTI4 142 +EQI4 $1369 +ADDRLP4 0 +INDIRI4 +CNSTI4 166 +NEI4 $1366 +LABELV $1369 +line 3070 +;3070: Item_StartCapture(item, key); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 Item_StartCapture +CALLV +pop +line 3071 +;3071: } +LABELV $1366 +line 3072 +;3072: } +LABELV $1365 +line 3074 +;3073: +;3074: if (!down) { +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $1370 +line 3075 +;3075: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1363 +JUMPV +LABELV $1370 +line 3078 +;3076: } +;3077: +;3078: switch (item->type) { +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +LTI4 $1372 +ADDRLP4 0 +INDIRI4 +CNSTI4 14 +GTI4 $1372 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1393-4 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1393 +address $1375 +address $1376 +address $1377 +address $1378 +address $1385 +address $1386 +address $1372 +address $1390 +address $1378 +address $1392 +address $1388 +address $1389 +address $1391 +address $1387 +code +LABELV $1375 +line 3080 +;3079: case ITEM_TYPE_BUTTON: +;3080: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3081 +;3081: break; +LABELV $1376 +line 3083 +;3082: case ITEM_TYPE_RADIOBUTTON: +;3083: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3084 +;3084: break; +LABELV $1377 +line 3086 +;3085: case ITEM_TYPE_CHECKBOX: +;3086: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3087 +;3087: break; +LABELV $1378 +line 3090 +;3088: case ITEM_TYPE_EDITFIELD: +;3089: case ITEM_TYPE_NUMERICFIELD: +;3090: if (key == A_MOUSE1 || key == A_MOUSE2 || key == A_ENTER) +ADDRLP4 8 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 141 +EQI4 $1382 +ADDRLP4 8 +INDIRI4 +CNSTI4 142 +EQI4 $1382 +ADDRLP4 8 +INDIRI4 +CNSTI4 10 +NEI4 $1379 +LABELV $1382 +line 3091 +;3091: { +line 3092 +;3092: editFieldDef_t *editPtr = (editFieldDef_t*)item->typeData; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 3094 +;3093: +;3094: if (item->cvar && editPtr) +ADDRLP4 16 +CNSTU4 0 +ASGNU4 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +ADDRLP4 16 +INDIRU4 +EQU4 $1383 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +ADDRLP4 16 +INDIRU4 +EQU4 $1383 +line 3095 +;3095: { +line 3096 +;3096: editPtr->paintOffset = 0; +ADDRLP4 12 +INDIRP4 +CNSTI4 24 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3097 +;3097: } +LABELV $1383 +line 3100 +;3098: +;3099: //return Item_TextField_HandleKey(item, key); +;3100: } +LABELV $1379 +line 3101 +;3101: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3102 +;3102: break; +LABELV $1385 +line 3104 +;3103: case ITEM_TYPE_COMBO: +;3104: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3105 +;3105: break; +LABELV $1386 +line 3107 +;3106: case ITEM_TYPE_LISTBOX: +;3107: return Item_ListBox_HandleKey(item, key, down, qfalse); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 12 +ADDRGP4 Item_ListBox_HandleKey +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3108 +;3108: break; +LABELV $1387 +line 3110 +;3109: case ITEM_TYPE_TEXTSCROLL: +;3110: return Item_TextScroll_HandleKey(item, key, down, qfalse); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 16 +ADDRGP4 Item_TextScroll_HandleKey +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3111 +;3111: break; +LABELV $1388 +line 3113 +;3112: case ITEM_TYPE_YESNO: +;3113: return Item_YesNo_HandleKey(item, key); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 20 +ADDRGP4 Item_YesNo_HandleKey +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3114 +;3114: break; +LABELV $1389 +line 3116 +;3115: case ITEM_TYPE_MULTI: +;3116: return Item_Multi_HandleKey(item, key); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 24 +ADDRGP4 Item_Multi_HandleKey +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3117 +;3117: break; +LABELV $1390 +line 3119 +;3118: case ITEM_TYPE_OWNERDRAW: +;3119: return Item_OwnerDraw_HandleKey(item, key); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 28 +ADDRGP4 Item_OwnerDraw_HandleKey +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3120 +;3120: break; +LABELV $1391 +line 3122 +;3121: case ITEM_TYPE_BIND: +;3122: return Item_Bind_HandleKey(item, key, down); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 32 +ADDRGP4 Item_Bind_HandleKey +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3123 +;3123: break; +LABELV $1392 +line 3125 +;3124: case ITEM_TYPE_SLIDER: +;3125: return Item_Slider_HandleKey(item, key, down); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 Item_Slider_HandleKey +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +RETI4 +ADDRGP4 $1363 +JUMPV +line 3126 +;3126: break; +LABELV $1372 +line 3131 +;3127: //case ITEM_TYPE_IMAGE: +;3128: // Item_Image_Paint(item); +;3129: // break; +;3130: default: +;3131: return qfalse; +CNSTI4 0 +RETI4 +line 3132 +;3132: break; +LABELV $1363 +endproc Item_HandleKey 40 16 +export Item_Action +proc Item_Action 4 8 +line 3138 +;3133: } +;3134: +;3135: //return qfalse; +;3136:} +;3137: +;3138:void Item_Action(itemDef_t *item) { +line 3139 +;3139: if (item) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1396 +line 3140 +;3140: Item_RunScript(item, item->action); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 264 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 3141 +;3141: } +LABELV $1396 +line 3142 +;3142:} +LABELV $1395 +endproc Item_Action 4 8 +export Menu_SetPrevCursorItem +proc Menu_SetPrevCursorItem 44 12 +line 3144 +;3143: +;3144:itemDef_t *Menu_SetPrevCursorItem(menuDef_t *menu) { +line 3145 +;3145: qboolean wrapped = qfalse; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 3146 +;3146: int oldCursor = menu->cursorItem; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +line 3148 +;3147: +;3148: if (menu->cursorItem < 0) { +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 0 +GEI4 $1402 +line 3149 +;3149: menu->cursorItem = menu->itemCount-1; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 196 +ADDP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 3150 +;3150: wrapped = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 3151 +;3151: } +ADDRGP4 $1402 +JUMPV +LABELV $1401 +line 3153 +;3152: +;3153: while (menu->cursorItem > -1) { +line 3155 +;3154: +;3155: menu->cursorItem--; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 3156 +;3156: if (menu->cursorItem < 0 && !wrapped) { +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRI4 +GEI4 $1404 +ADDRLP4 0 +INDIRI4 +ADDRLP4 12 +INDIRI4 +NEI4 $1404 +line 3157 +;3157: wrapped = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 3158 +;3158: menu->cursorItem = menu->itemCount -1; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 196 +ADDP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +CNSTI4 1 +SUBI4 +ASGNI4 +line 3159 +;3159: } +LABELV $1404 +line 3161 +;3160: +;3161: if (Item_SetFocus(menu->items[menu->cursorItem], DC->cursorx, DC->cursory)) { +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 16 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +ADDRGP4 Item_SetFocus +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $1406 +line 3162 +;3162: Menu_HandleMouseMove(menu, menu->items[menu->cursorItem]->window.rect.x + 1, menu->items[menu->cursorItem]->window.rect.y + 1); +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRLP4 28 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 28 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 36 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 32 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRF4 +ADDF4 +ARGF4 +ADDRGP4 Menu_HandleMouseMove +CALLV +pop +line 3163 +;3163: return menu->items[menu->cursorItem]; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +RETP4 +ADDRGP4 $1398 +JUMPV +LABELV $1406 +line 3165 +;3164: } +;3165: } +LABELV $1402 +line 3153 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 -1 +GTI4 $1401 +line 3166 +;3166: menu->cursorItem = oldCursor; +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 3167 +;3167: return NULL; +CNSTP4 0 +RETP4 +LABELV $1398 +endproc Menu_SetPrevCursorItem 44 12 +export Menu_SetNextCursorItem +proc Menu_SetNextCursorItem 44 12 +line 3171 +;3168: +;3169:} +;3170: +;3171:itemDef_t *Menu_SetNextCursorItem(menuDef_t *menu) { +line 3173 +;3172: +;3173: qboolean wrapped = qfalse; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 3174 +;3174: int oldCursor = menu->cursorItem; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +line 3177 +;3175: +;3176: +;3177: if (menu->cursorItem == -1) { +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 -1 +NEI4 $1412 +line 3178 +;3178: menu->cursorItem = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3179 +;3179: wrapped = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 3180 +;3180: } +ADDRGP4 $1412 +JUMPV +LABELV $1411 +line 3182 +;3181: +;3182: while (menu->cursorItem < menu->itemCount) { +line 3184 +;3183: +;3184: menu->cursorItem++; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 3185 +;3185: if (menu->cursorItem >= menu->itemCount && !wrapped) { +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $1414 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $1414 +line 3186 +;3186: wrapped = qtrue; +ADDRLP4 0 +CNSTI4 1 +ASGNI4 +line 3187 +;3187: menu->cursorItem = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3188 +;3188: } +LABELV $1414 +line 3189 +;3189: if (Item_SetFocus(menu->items[menu->cursorItem], DC->cursorx, DC->cursory)) { +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 16 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +ADDRGP4 Item_SetFocus +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $1416 +line 3190 +;3190: Menu_HandleMouseMove(menu, menu->items[menu->cursorItem]->window.rect.x + 1, menu->items[menu->cursorItem]->window.rect.y + 1); +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ARGP4 +ADDRLP4 32 +ADDRLP4 28 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 28 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 36 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 32 +INDIRP4 +INDIRF4 +ADDRLP4 36 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 32 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 36 +INDIRF4 +ADDF4 +ARGF4 +ADDRGP4 Menu_HandleMouseMove +CALLV +pop +line 3191 +;3191: return menu->items[menu->cursorItem]; +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +RETP4 +ADDRGP4 $1408 +JUMPV +LABELV $1416 +line 3194 +;3192: } +;3193: +;3194: } +LABELV $1412 +line 3182 +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $1411 +line 3196 +;3195: +;3196: menu->cursorItem = oldCursor; +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 3197 +;3197: return NULL; +CNSTP4 0 +RETP4 +LABELV $1408 +endproc Menu_SetNextCursorItem 44 12 +proc Window_CloseCinematic 4 4 +line 3200 +;3198:} +;3199: +;3200:static void Window_CloseCinematic(windowDef_t *window) { +line 3201 +;3201: if (window->style == WINDOW_STYLE_CINEMATIC && window->cinematic >= 0) { +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +INDIRI4 +CNSTI4 5 +NEI4 $1419 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +CNSTI4 0 +LTI4 $1419 +line 3202 +;3202: DC->stopCinematic(window->cinematic); +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRP4 +CALLV +pop +line 3203 +;3203: window->cinematic = -1; +ADDRFP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 3204 +;3204: } +LABELV $1419 +line 3205 +;3205:} +LABELV $1418 +endproc Window_CloseCinematic 4 4 +proc Menu_CloseCinematics 4 4 +line 3207 +;3206: +;3207:static void Menu_CloseCinematics(menuDef_t *menu) { +line 3208 +;3208: if (menu) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1422 +line 3210 +;3209: int i; +;3210: Window_CloseCinematic(&menu->window); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Window_CloseCinematic +CALLV +pop +line 3211 +;3211: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1427 +JUMPV +LABELV $1424 +line 3212 +;3212: Window_CloseCinematic(&menu->items[i]->window); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Window_CloseCinematic +CALLV +pop +line 3213 +;3213: if (menu->items[i]->type == ITEM_TYPE_OWNERDRAW) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $1428 +line 3214 +;3214: DC->stopCinematic(0-menu->items[i]->window.ownerDraw); +CNSTI4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +SUBI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRP4 +CALLV +pop +line 3215 +;3215: } +LABELV $1428 +line 3216 +;3216: } +LABELV $1425 +line 3211 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1427 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $1424 +line 3217 +;3217: } +LABELV $1422 +line 3218 +;3218:} +LABELV $1421 +endproc Menu_CloseCinematics 4 4 +proc Display_CloseCinematics 4 4 +line 3220 +;3219: +;3220:static void Display_CloseCinematics() { +line 3222 +;3221: int i; +;3222: for (i = 0; i < menuCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1434 +JUMPV +LABELV $1431 +line 3223 +;3223: Menu_CloseCinematics(&Menus[i]); +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ARGP4 +ADDRGP4 Menu_CloseCinematics +CALLV +pop +line 3224 +;3224: } +LABELV $1432 +line 3222 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1434 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $1431 +line 3225 +;3225:} +LABELV $1430 +endproc Display_CloseCinematics 4 4 +export Menus_Activate +proc Menus_Activate 568 12 +line 3227 +;3226: +;3227:void Menus_Activate(menuDef_t *menu) { +line 3228 +;3228: menu->window.flags |= (WINDOW_HASFOCUS | WINDOW_VISIBLE); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 6 +BORI4 +ASGNI4 +line 3229 +;3229: if (menu->onOpen) { +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1436 +line 3231 +;3230: itemDef_t item; +;3231: item.parent = menu; +ADDRLP4 4+240 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 3232 +;3232: Item_RunScript(&item, menu->onOpen); +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 3233 +;3233: } +LABELV $1436 +line 3235 +;3234: +;3235: if (menu->soundName && *menu->soundName) { +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1439 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $1439 +line 3237 +;3236:// DC->stopBackgroundTrack(); // you don't want to do this since it will reset s_rawend +;3237: DC->startBackgroundTrack(menu->soundName, menu->soundName, qfalse); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +ADDRLP4 8 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRP4 +CALLV +pop +line 3238 +;3238: } +LABELV $1439 +line 3240 +;3239: +;3240: menu->appearanceTime = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 1316 +ADDP4 +CNSTF4 0 +ASGNF4 +line 3241 +;3241: Display_CloseCinematics(); +ADDRGP4 Display_CloseCinematics +CALLV +pop +line 3243 +;3242: +;3243:} +LABELV $1435 +endproc Menus_Activate 568 12 +export Display_VisibleMenuCount +proc Display_VisibleMenuCount 8 0 +line 3245 +;3244: +;3245:int Display_VisibleMenuCount() { +line 3247 +;3246: int i, count; +;3247: count = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 3248 +;3248: for (i = 0; i < menuCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1445 +JUMPV +LABELV $1442 +line 3249 +;3249: if (Menus[i].window.flags & (WINDOW_FORCED | WINDOW_VISIBLE)) { +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus+68 +ADDP4 +INDIRI4 +CNSTI4 1048580 +BANDI4 +CNSTI4 0 +EQI4 $1446 +line 3250 +;3250: count++; +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 3251 +;3251: } +LABELV $1446 +line 3252 +;3252: } +LABELV $1443 +line 3248 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1445 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $1442 +line 3253 +;3253: return count; +ADDRLP4 4 +INDIRI4 +RETI4 +LABELV $1441 +endproc Display_VisibleMenuCount 8 0 +export Menus_HandleOOBClick +proc Menus_HandleOOBClick 24 12 +line 3256 +;3254:} +;3255: +;3256:void Menus_HandleOOBClick(menuDef_t *menu, int key, qboolean down) { +line 3257 +;3257: if (menu) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1450 +line 3262 +;3258: int i; +;3259: // basically the behaviour we are looking for is if there are windows in the stack.. see if +;3260: // the cursor is within any of them.. if not close them otherwise activate them and pass the +;3261: // key on.. force a mouse move to activate focus and script stuff +;3262: if (down && menu->window.flags & WINDOW_OOB_CLICK) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRFP4 8 +INDIRI4 +ADDRLP4 4 +INDIRI4 +EQI4 $1452 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 131072 +BANDI4 +ADDRLP4 4 +INDIRI4 +EQI4 $1452 +line 3263 +;3263: Menu_RunCloseScript(menu); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menu_RunCloseScript +CALLV +pop +line 3264 +;3264: menu->window.flags &= ~(WINDOW_HASFOCUS | WINDOW_VISIBLE); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 -7 +BANDI4 +ASGNI4 +line 3265 +;3265: } +LABELV $1452 +line 3267 +;3266: +;3267: for (i = 0; i < menuCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1457 +JUMPV +LABELV $1454 +line 3268 +;3268: if (Menu_OverActiveItem(&Menus[i], DC->cursorx, DC->cursory)) { +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +ADDRGP4 Menu_OverActiveItem +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $1458 +line 3269 +;3269: Menu_RunCloseScript(menu); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menu_RunCloseScript +CALLV +pop +line 3270 +;3270: menu->window.flags &= ~(WINDOW_HASFOCUS | WINDOW_VISIBLE); +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +CNSTI4 -7 +BANDI4 +ASGNI4 +line 3271 +;3271: Menus_Activate(&Menus[i]); +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ARGP4 +ADDRGP4 Menus_Activate +CALLV +pop +line 3272 +;3272: Menu_HandleMouseMove(&Menus[i], DC->cursorx, DC->cursory); +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 Menu_HandleMouseMove +CALLV +pop +line 3273 +;3273: Menu_HandleKey(&Menus[i], key, down); +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRGP4 Menu_HandleKey +CALLV +pop +line 3274 +;3274: } +LABELV $1458 +line 3275 +;3275: } +LABELV $1455 +line 3267 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1457 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $1454 +line 3277 +;3276: +;3277: if (Display_VisibleMenuCount() == 0) { +ADDRLP4 8 +ADDRGP4 Display_VisibleMenuCount +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $1460 +line 3278 +;3278: if (DC->Pause) { +ADDRGP4 DC +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1462 +line 3279 +;3279: DC->Pause(qfalse); +CNSTI4 0 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRP4 +CALLV +pop +line 3280 +;3280: } +LABELV $1462 +line 3281 +;3281: } +LABELV $1460 +line 3282 +;3282: Display_CloseCinematics(); +ADDRGP4 Display_CloseCinematics +CALLV +pop +line 3283 +;3283: } +LABELV $1450 +line 3284 +;3284:} +LABELV $1449 +endproc Menus_HandleOOBClick 24 12 +bss +align 4 +LABELV $1465 +skip 16 +code +proc Item_CorrectedTextRect 4 12 +line 3286 +;3285: +;3286:static rectDef_t *Item_CorrectedTextRect(itemDef_t *item) { +line 3288 +;3287: static rectDef_t rect; +;3288: memset(&rect, 0, sizeof(rectDef_t)); +ADDRGP4 $1465 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 16 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 3289 +;3289: if (item) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1466 +line 3290 +;3290: rect = item->textRect; +ADDRGP4 $1465 +ADDRFP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRB +ASGNB 16 +line 3291 +;3291: if (rect.w) { +ADDRGP4 $1465+8 +INDIRF4 +CNSTF4 0 +EQF4 $1468 +line 3292 +;3292: rect.y -= rect.h; +ADDRLP4 0 +ADDRGP4 $1465+4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ADDRGP4 $1465+12 +INDIRF4 +SUBF4 +ASGNF4 +line 3293 +;3293: } +LABELV $1468 +line 3294 +;3294: } +LABELV $1466 +line 3295 +;3295: return ▭ +ADDRGP4 $1465 +RETP4 +LABELV $1464 +endproc Item_CorrectedTextRect 4 12 +data +align 4 +LABELV $1494 +byte 4 0 +export Menu_HandleKey +code +proc Menu_HandleKey 652 12 +line 3298 +;3296:} +;3297: +;3298:void Menu_HandleKey(menuDef_t *menu, int key, qboolean down) { +line 3300 +;3299: int i; +;3300: itemDef_t *item = NULL; +ADDRLP4 4 +CNSTP4 0 +ASGNP4 +line 3301 +;3301: qboolean inHandler = qfalse; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 3303 +;3302: +;3303: if (inHandler) { +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $1474 +line 3304 +;3304: return; +ADDRGP4 $1473 +JUMPV +LABELV $1474 +line 3307 +;3305: } +;3306: +;3307: inHandler = qtrue; +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +line 3308 +;3308: if (g_waitingForKey && down) { +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +ADDRGP4 g_waitingForKey +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $1476 +ADDRFP4 8 +INDIRI4 +ADDRLP4 12 +INDIRI4 +EQI4 $1476 +line 3309 +;3309: Item_Bind_HandleKey(g_bindItem, key, down); +ADDRGP4 g_bindItem +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRGP4 Item_Bind_HandleKey +CALLI4 +pop +line 3310 +;3310: inHandler = qfalse; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 3311 +;3311: return; +ADDRGP4 $1473 +JUMPV +LABELV $1476 +line 3314 +;3312: } +;3313: +;3314: if (g_editingField && down) { +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRGP4 g_editingField +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $1478 +ADDRFP4 8 +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $1478 +line 3315 +;3315: if (!Item_TextField_HandleKey(g_editItem, key)) { +ADDRGP4 g_editItem +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 20 +ADDRGP4 Item_TextField_HandleKey +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $1480 +line 3316 +;3316: g_editingField = qfalse; +ADDRGP4 g_editingField +CNSTI4 0 +ASGNI4 +line 3317 +;3317: g_editItem = NULL; +ADDRGP4 g_editItem +CNSTP4 0 +ASGNP4 +line 3318 +;3318: inHandler = qfalse; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 3319 +;3319: return; +ADDRGP4 $1473 +JUMPV +LABELV $1480 +line 3320 +;3320: } else if (key == A_MOUSE1 || key == A_MOUSE2 || key == A_MOUSE3) { +ADDRLP4 24 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 141 +EQI4 $1485 +ADDRLP4 24 +INDIRI4 +CNSTI4 142 +EQI4 $1485 +ADDRLP4 24 +INDIRI4 +CNSTI4 166 +NEI4 $1482 +LABELV $1485 +line 3321 +;3321: g_editingField = qfalse; +ADDRGP4 g_editingField +CNSTI4 0 +ASGNI4 +line 3322 +;3322: g_editItem = NULL; +ADDRGP4 g_editItem +CNSTP4 0 +ASGNP4 +line 3323 +;3323: Display_MouseMove(NULL, DC->cursorx, DC->cursory); +CNSTP4 0 +ARGP4 +ADDRLP4 28 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 28 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 Display_MouseMove +CALLI4 +pop +line 3324 +;3324: } else if (key == A_TAB || key == A_CURSOR_UP || key == A_CURSOR_DOWN) { +ADDRGP4 $1483 +JUMPV +LABELV $1482 +ADDRLP4 28 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 9 +EQI4 $1489 +ADDRLP4 28 +INDIRI4 +CNSTI4 170 +EQI4 $1489 +ADDRLP4 28 +INDIRI4 +CNSTI4 171 +NEI4 $1486 +LABELV $1489 +line 3325 +;3325: return; +ADDRGP4 $1473 +JUMPV +LABELV $1486 +LABELV $1483 +line 3327 +;3326: } +;3327: } +LABELV $1478 +line 3329 +;3328: +;3329: if (menu == NULL) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1490 +line 3330 +;3330: inHandler = qfalse; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 3331 +;3331: return; +ADDRGP4 $1473 +JUMPV +LABELV $1490 +line 3335 +;3332: } +;3333: +;3334: // see if the mouse is within the window bounds and if so is this a mouse click +;3335: if (down && !(menu->window.flags & WINDOW_POPUP) && !Rect_ContainsPoint(&menu->window.rect, DC->cursorx, DC->cursory)) { +ADDRLP4 20 +CNSTI4 0 +ASGNI4 +ADDRFP4 8 +INDIRI4 +ADDRLP4 20 +INDIRI4 +EQI4 $1492 +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2097152 +BANDI4 +ADDRLP4 20 +INDIRI4 +NEI4 $1492 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 28 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 32 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +NEI4 $1492 +line 3338 +;3336: static qboolean inHandleKey = qfalse; +;3337: // bk001206 - parentheses +;3338: if (!inHandleKey && ( key == A_MOUSE1 || key == A_MOUSE2 || key == A_MOUSE3 ) ) { +ADDRGP4 $1494 +INDIRI4 +CNSTI4 0 +NEI4 $1495 +ADDRLP4 36 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 141 +EQI4 $1498 +ADDRLP4 36 +INDIRI4 +CNSTI4 142 +EQI4 $1498 +ADDRLP4 36 +INDIRI4 +CNSTI4 166 +NEI4 $1495 +LABELV $1498 +line 3339 +;3339: inHandleKey = qtrue; +ADDRGP4 $1494 +CNSTI4 1 +ASGNI4 +line 3340 +;3340: Menus_HandleOOBClick(menu, key, down); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRGP4 Menus_HandleOOBClick +CALLV +pop +line 3341 +;3341: inHandleKey = qfalse; +ADDRGP4 $1494 +CNSTI4 0 +ASGNI4 +line 3342 +;3342: inHandler = qfalse; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 3343 +;3343: return; +ADDRGP4 $1473 +JUMPV +LABELV $1495 +line 3345 +;3344: } +;3345: } +LABELV $1492 +line 3348 +;3346: +;3347: // get the item with focus +;3348: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1502 +JUMPV +LABELV $1499 +line 3349 +;3349: if (menu->items[i]->window.flags & WINDOW_HASFOCUS) { +ADDRLP4 36 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 36 +INDIRI4 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ADDRLP4 36 +INDIRI4 +BANDI4 +CNSTI4 0 +EQI4 $1503 +line 3350 +;3350: item = menu->items[i]; +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +line 3351 +;3351: } +LABELV $1503 +line 3352 +;3352: } +LABELV $1500 +line 3348 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1502 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $1499 +line 3354 +;3353: +;3354: if (item != NULL) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1505 +line 3355 +;3355: if (Item_HandleKey(item, key, down)) { +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 Item_HandleKey +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +EQI4 $1507 +line 3356 +;3356: Item_Action(item); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Item_Action +CALLV +pop +line 3357 +;3357: inHandler = qfalse; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 3358 +;3358: return; +ADDRGP4 $1473 +JUMPV +LABELV $1507 +line 3360 +;3359: } +;3360: } +LABELV $1505 +line 3362 +;3361: +;3362: if (!down) { +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $1509 +line 3363 +;3363: inHandler = qfalse; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 3364 +;3364: return; +ADDRGP4 $1473 +JUMPV +LABELV $1509 +line 3368 +;3365: } +;3366: +;3367: // default handling +;3368: switch ( key ) { +ADDRLP4 36 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 141 +EQI4 $1527 +ADDRLP4 40 +CNSTI4 142 +ASGNI4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 40 +INDIRI4 +EQI4 $1527 +ADDRLP4 36 +INDIRI4 +ADDRLP4 40 +INDIRI4 +GTI4 $1549 +LABELV $1548 +ADDRLP4 44 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 48 +CNSTI4 18 +ASGNI4 +ADDRLP4 44 +INDIRI4 +ADDRLP4 48 +INDIRI4 +EQI4 $1526 +ADDRLP4 44 +INDIRI4 +ADDRLP4 48 +INDIRI4 +GTI4 $1551 +LABELV $1550 +ADDRLP4 52 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 9 +EQI4 $1526 +ADDRLP4 52 +INDIRI4 +CNSTI4 10 +EQI4 $1542 +ADDRLP4 52 +INDIRI4 +CNSTI4 13 +EQI4 $1542 +ADDRGP4 $1511 +JUMPV +LABELV $1551 +ADDRLP4 56 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 24 +EQI4 $1521 +ADDRLP4 56 +INDIRI4 +CNSTI4 27 +EQI4 $1522 +ADDRGP4 $1511 +JUMPV +LABELV $1549 +ADDRLP4 60 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 170 +EQI4 $1521 +ADDRLP4 64 +CNSTI4 171 +ASGNI4 +ADDRLP4 60 +INDIRI4 +ADDRLP4 64 +INDIRI4 +EQI4 $1526 +ADDRLP4 60 +INDIRI4 +ADDRLP4 64 +INDIRI4 +GTI4 $1553 +LABELV $1552 +ADDRLP4 68 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 68 +INDIRI4 +CNSTI4 151 +EQI4 $1513 +ADDRLP4 68 +INDIRI4 +CNSTI4 152 +EQI4 $1517 +ADDRGP4 $1511 +JUMPV +LABELV $1553 +ADDRLP4 72 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 72 +INDIRI4 +CNSTI4 256 +LTI4 $1511 +ADDRLP4 72 +INDIRI4 +CNSTI4 260 +GTI4 $1554 +ADDRLP4 72 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1555-1024 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1555 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +code +LABELV $1554 +ADDRLP4 76 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 76 +INDIRI4 +CNSTI4 288 +LTI4 $1511 +ADDRLP4 76 +INDIRI4 +CNSTI4 304 +GTI4 $1511 +ADDRLP4 76 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $1557-1152 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $1557 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +address $1512 +code +LABELV $1513 +line 3371 +;3369: +;3370: case A_F11: +;3371: if (DC->getCVarValue("developer")) { +ADDRGP4 $1516 +ARGP4 +ADDRLP4 80 +ADDRGP4 DC +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRP4 +CALLF4 +ASGNF4 +ADDRLP4 80 +INDIRF4 +CNSTF4 0 +EQF4 $1512 +line 3372 +;3372: debugMode ^= 1; +ADDRLP4 84 +ADDRGP4 debugMode +ASGNP4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRI4 +CNSTI4 1 +BXORI4 +ASGNI4 +line 3373 +;3373: } +line 3374 +;3374: break; +ADDRGP4 $1512 +JUMPV +LABELV $1517 +line 3377 +;3375: +;3376: case A_F12: +;3377: if (DC->getCVarValue("developer")) { +ADDRGP4 $1516 +ARGP4 +ADDRLP4 84 +ADDRGP4 DC +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRP4 +CALLF4 +ASGNF4 +ADDRLP4 84 +INDIRF4 +CNSTF4 0 +EQF4 $1512 +line 3378 +;3378: DC->executeText(EXEC_APPEND, "screenshot\n"); +CNSTI4 2 +ARGI4 +ADDRGP4 $1520 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRP4 +CALLV +pop +line 3379 +;3379: } +line 3380 +;3380: break; +ADDRGP4 $1512 +JUMPV +LABELV $1521 +line 3383 +;3381: case A_KP_8: +;3382: case A_CURSOR_UP: +;3383: Menu_SetPrevCursorItem(menu); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menu_SetPrevCursorItem +CALLP4 +pop +line 3384 +;3384: break; +ADDRGP4 $1512 +JUMPV +LABELV $1522 +line 3387 +;3385: +;3386: case A_ESCAPE: +;3387: if (!g_waitingForKey && menu->onESC) { +ADDRGP4 g_waitingForKey +INDIRI4 +CNSTI4 0 +NEI4 $1523 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1523 +line 3389 +;3388: itemDef_t it; +;3389: it.parent = menu; +ADDRLP4 88+240 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 3390 +;3390: Item_RunScript(&it, menu->onESC); +ADDRLP4 88 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_RunScript +CALLV +pop +line 3391 +;3391: } +LABELV $1523 +line 3392 +;3392: g_waitingForKey = qfalse; +ADDRGP4 g_waitingForKey +CNSTI4 0 +ASGNI4 +line 3393 +;3393: break; +ADDRGP4 $1512 +JUMPV +LABELV $1526 +line 3397 +;3394: case A_TAB: +;3395: case A_KP_2: +;3396: case A_CURSOR_DOWN: +;3397: Menu_SetNextCursorItem(menu); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menu_SetNextCursorItem +CALLP4 +pop +line 3398 +;3398: break; +ADDRGP4 $1512 +JUMPV +LABELV $1527 +line 3402 +;3399: +;3400: case A_MOUSE1: +;3401: case A_MOUSE2: +;3402: if (item) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1512 +line 3403 +;3403: if (item->type == ITEM_TYPE_TEXT) { +ADDRLP4 4 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1530 +line 3404 +;3404: if (Rect_ContainsPoint(Item_CorrectedTextRect(item), DC->cursorx, DC->cursory)) { +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 88 +ADDRGP4 Item_CorrectedTextRect +CALLP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +ARGP4 +ADDRLP4 92 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 92 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 96 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 96 +INDIRI4 +CNSTI4 0 +EQI4 $1512 +line 3405 +;3405: Item_Action(item); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Item_Action +CALLV +pop +line 3406 +;3406: } +line 3407 +;3407: } else if (item->type == ITEM_TYPE_EDITFIELD || item->type == ITEM_TYPE_NUMERICFIELD) { +ADDRGP4 $1512 +JUMPV +LABELV $1530 +ADDRLP4 88 +ADDRLP4 4 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 88 +INDIRI4 +CNSTI4 4 +EQI4 $1536 +ADDRLP4 88 +INDIRI4 +CNSTI4 9 +NEI4 $1534 +LABELV $1536 +line 3408 +;3408: if (Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory)) { +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 92 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 92 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 96 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 96 +INDIRI4 +CNSTI4 0 +EQI4 $1512 +line 3409 +;3409: item->cursorPos = 0; +ADDRLP4 4 +INDIRP4 +CNSTI4 544 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3410 +;3410: g_editingField = qtrue; +ADDRGP4 g_editingField +CNSTI4 1 +ASGNI4 +line 3411 +;3411: g_editItem = item; +ADDRGP4 g_editItem +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 3412 +;3412: DC->setOverstrikeMode(qtrue); +CNSTI4 1 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRP4 +CALLV +pop +line 3413 +;3413: } +line 3414 +;3414: } else { +ADDRGP4 $1512 +JUMPV +LABELV $1534 +line 3415 +;3415: if (Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory)) { +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 92 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 92 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 96 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 96 +INDIRI4 +CNSTI4 0 +EQI4 $1512 +line 3416 +;3416: Item_Action(item); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Item_Action +CALLV +pop +line 3417 +;3417: } +line 3418 +;3418: } +line 3419 +;3419: } +line 3420 +;3420: break; +ADDRGP4 $1512 +JUMPV +line 3444 +;3421: +;3422: case A_JOY0: +;3423: case A_JOY1: +;3424: case A_JOY2: +;3425: case A_JOY3: +;3426: case A_JOY4: +;3427: case A_AUX0: +;3428: case A_AUX1: +;3429: case A_AUX2: +;3430: case A_AUX3: +;3431: case A_AUX4: +;3432: case A_AUX5: +;3433: case A_AUX6: +;3434: case A_AUX7: +;3435: case A_AUX8: +;3436: case A_AUX9: +;3437: case A_AUX10: +;3438: case A_AUX11: +;3439: case A_AUX12: +;3440: case A_AUX13: +;3441: case A_AUX14: +;3442: case A_AUX15: +;3443: case A_AUX16: +;3444: break; +LABELV $1542 +line 3447 +;3445: case A_KP_ENTER: +;3446: case A_ENTER: +;3447: if (item) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1512 +line 3448 +;3448: if (item->type == ITEM_TYPE_EDITFIELD || item->type == ITEM_TYPE_NUMERICFIELD) { +ADDRLP4 88 +ADDRLP4 4 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 88 +INDIRI4 +CNSTI4 4 +EQI4 $1547 +ADDRLP4 88 +INDIRI4 +CNSTI4 9 +NEI4 $1545 +LABELV $1547 +line 3449 +;3449: item->cursorPos = 0; +ADDRLP4 4 +INDIRP4 +CNSTI4 544 +ADDP4 +CNSTI4 0 +ASGNI4 +line 3450 +;3450: g_editingField = qtrue; +ADDRGP4 g_editingField +CNSTI4 1 +ASGNI4 +line 3451 +;3451: g_editItem = item; +ADDRGP4 g_editItem +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 3452 +;3452: DC->setOverstrikeMode(qtrue); +CNSTI4 1 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 136 +ADDP4 +INDIRP4 +CALLV +pop +line 3453 +;3453: } else { +ADDRGP4 $1512 +JUMPV +LABELV $1545 +line 3454 +;3454: Item_Action(item); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Item_Action +CALLV +pop +line 3455 +;3455: } +line 3456 +;3456: } +line 3457 +;3457: break; +LABELV $1511 +LABELV $1512 +line 3459 +;3458: } +;3459: inHandler = qfalse; +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +line 3460 +;3460:} +LABELV $1473 +endproc Menu_HandleKey 652 12 +export ToWindowCoords +proc ToWindowCoords 8 0 +line 3462 +;3461: +;3462:void ToWindowCoords(float *x, float *y, windowDef_t *window) { +line 3463 +;3463: if (window->border != 0) { +ADDRFP4 8 +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $1560 +line 3464 +;3464: *x += window->borderSize; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 3465 +;3465: *y += window->borderSize; +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 3466 +;3466: } +LABELV $1560 +line 3467 +;3467: *x += window->rect.x; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +INDIRF4 +ADDF4 +ASGNF4 +line 3468 +;3468: *y += window->rect.y; +ADDRLP4 4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 3469 +;3469:} +LABELV $1559 +endproc ToWindowCoords 8 0 +export Rect_ToWindowCoords +proc Rect_ToWindowCoords 4 12 +line 3471 +;3470: +;3471:void Rect_ToWindowCoords(rectDef_t *rect, windowDef_t *window) { +line 3472 +;3472: ToWindowCoords(&rect->x, &rect->y, window); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRGP4 ToWindowCoords +CALLV +pop +line 3473 +;3473:} +LABELV $1562 +endproc Rect_ToWindowCoords 4 12 +export Item_SetTextExtents +proc Item_SetTextExtents 300 12 +line 3475 +;3474: +;3475:void Item_SetTextExtents(itemDef_t *item, int *width, int *height, const char *text) { +line 3476 +;3476: const char *textPtr = (text) ? text : item->text; +ADDRFP4 12 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1565 +ADDRLP4 4 +ADDRFP4 12 +INDIRP4 +ASGNP4 +ADDRGP4 $1566 +JUMPV +LABELV $1565 +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ASGNP4 +LABELV $1566 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 3478 +;3477: +;3478: if (textPtr == NULL ) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1567 +line 3479 +;3479: return; +ADDRGP4 $1563 +JUMPV +LABELV $1567 +line 3482 +;3480: } +;3481: +;3482: *width = item->textRect.w; +ADDRFP4 4 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 3483 +;3483: *height = item->textRect.h; +ADDRFP4 8 +INDIRP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 192 +ADDP4 +INDIRF4 +CVFI4 4 +ASGNI4 +line 3486 +;3484: +;3485: // keeps us from computing the widths and heights more than once +;3486: if (*width == 0 || (item->type == ITEM_TYPE_OWNERDRAW && item->textalignment == ITEM_ALIGN_CENTER)) { +ADDRFP4 4 +INDIRP4 +INDIRI4 +CNSTI4 0 +EQI4 $1571 +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $1569 +ADDRLP4 8 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1569 +LABELV $1571 +line 3487 +;3487: int originalWidth = DC->textWidth(/*item->text*/textPtr, item->textscale, item->iMenuFont); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 20 +ADDRGP4 DC +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 3489 +;3488: +;3489: if (item->type == ITEM_TYPE_OWNERDRAW && (item->textalignment == ITEM_ALIGN_CENTER || item->textalignment == ITEM_ALIGN_RIGHT)) +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 8 +NEI4 $1572 +ADDRLP4 28 +ADDRLP4 24 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 1 +EQI4 $1574 +ADDRLP4 28 +INDIRI4 +CNSTI4 2 +NEI4 $1572 +LABELV $1574 +line 3490 +;3490: { +line 3491 +;3491: originalWidth += DC->ownerDrawWidth(item->window.ownerDraw, item->textscale); +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 36 +ADDRGP4 DC +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +ADDRLP4 36 +INDIRI4 +ADDI4 +ASGNI4 +line 3492 +;3492: } +ADDRGP4 $1573 +JUMPV +LABELV $1572 +line 3493 +;3493: else if (item->type == ITEM_TYPE_EDITFIELD && item->textalignment == ITEM_ALIGN_CENTER && item->cvar) +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 4 +NEI4 $1575 +ADDRLP4 32 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1575 +ADDRLP4 32 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1575 +line 3494 +;3494: { +line 3496 +;3495: char buff[256]; +;3496: DC->getCVarString(item->cvar, buff, 256); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 36 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRP4 +CALLV +pop +line 3497 +;3497: originalWidth += DC->textWidth(buff, item->textscale, item->iMenuFont); +ADDRLP4 36 +ARGP4 +ADDRLP4 292 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 292 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 292 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 296 +ADDRGP4 DC +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 12 +INDIRI4 +ADDRLP4 296 +INDIRI4 +ADDI4 +ASGNI4 +line 3498 +;3498: } +LABELV $1575 +LABELV $1573 +line 3500 +;3499: +;3500: *width = DC->textWidth(textPtr, item->textscale, item->iMenuFont); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 36 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 40 +ADDRGP4 DC +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRFP4 4 +INDIRP4 +ADDRLP4 40 +INDIRI4 +ASGNI4 +line 3501 +;3501: *height = DC->textHeight(textPtr, item->textscale, item->iMenuFont); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 48 +ADDRGP4 DC +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRFP4 8 +INDIRP4 +ADDRLP4 48 +INDIRI4 +ASGNI4 +line 3502 +;3502: item->textRect.w = *width; +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +ADDRFP4 4 +INDIRP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 3503 +;3503: item->textRect.h = *height; +ADDRFP4 0 +INDIRP4 +CNSTI4 192 +ADDP4 +ADDRFP4 8 +INDIRP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 3504 +;3504: item->textRect.x = item->textalignx; +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 180 +ADDP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ASGNF4 +line 3505 +;3505: item->textRect.y = item->textaligny; +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 184 +ADDP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRF4 +ASGNF4 +line 3506 +;3506: if (item->textalignment == ITEM_ALIGN_RIGHT) { +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1577 +line 3507 +;3507: item->textRect.x = item->textalignx - originalWidth; +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 180 +ADDP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 3508 +;3508: } else if (item->textalignment == ITEM_ALIGN_CENTER) { +ADDRGP4 $1578 +JUMPV +LABELV $1577 +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1579 +line 3509 +;3509: item->textRect.x = item->textalignx - originalWidth / 2; +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 180 +ADDP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRI4 +CNSTI4 2 +DIVI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 3510 +;3510: } +LABELV $1579 +LABELV $1578 +line 3512 +;3511: +;3512: ToWindowCoords(&item->textRect.x, &item->textRect.y, &item->window); +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 180 +ADDP4 +ARGP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 184 +ADDP4 +ARGP4 +ADDRLP4 60 +INDIRP4 +ARGP4 +ADDRGP4 ToWindowCoords +CALLV +pop +line 3513 +;3513: } +LABELV $1569 +line 3514 +;3514:} +LABELV $1563 +endproc Item_SetTextExtents 300 12 +export Item_TextColor +proc Item_TextColor 60 28 +line 3516 +;3515: +;3516:void Item_TextColor(itemDef_t *item, vec4_t *newColor) { +line 3518 +;3517: vec4_t lowLight; +;3518: menuDef_t *parent = (menuDef_t*)item->parent; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 3520 +;3519: +;3520: Fade(&item->window.flags, &item->window.foreColor[3], parent->fadeClamp, &item->window.nextTime, parent->fadeCycle, qtrue, parent->fadeAmount); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 68 +ADDP4 +ARGP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 124 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 108 +ADDP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 Fade +CALLV +pop +line 3522 +;3521: +;3522: if (item->window.flags & WINDOW_HASFOCUS) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1582 +line 3523 +;3523: lowLight[0] = 0.8 * parent->focusColor[0]; +ADDRLP4 4 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3524 +;3524: lowLight[1] = 0.8 * parent->focusColor[1]; +ADDRLP4 4+4 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3525 +;3525: lowLight[2] = 0.8 * parent->focusColor[2]; +ADDRLP4 4+8 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3526 +;3526: lowLight[3] = 0.8 * parent->focusColor[3]; +ADDRLP4 4+12 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3527 +;3527: LerpColor(parent->focusColor,lowLight,*newColor,0.5+0.5*sin(DC->realTime / PULSE_DIVISOR)); +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 75 +DIVI4 +CVIF4 4 +ARGF4 +ADDRLP4 28 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTF4 1056964608 +ADDRLP4 28 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ARGF4 +ADDRGP4 LerpColor +CALLV +pop +line 3528 +;3528: } else if (item->textStyle == ITEM_TEXTSTYLE_BLINK && !((DC->realTime/BLINK_DIVISOR) & 1)) { +ADDRGP4 $1583 +JUMPV +LABELV $1582 +ADDRLP4 28 +CNSTI4 1 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ADDRLP4 28 +INDIRI4 +NEI4 $1587 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 200 +DIVI4 +ADDRLP4 28 +INDIRI4 +BANDI4 +CNSTI4 0 +NEI4 $1587 +line 3529 +;3529: lowLight[0] = 0.8 * item->window.foreColor[0]; +ADDRLP4 4 +CNSTF4 1061997773 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3530 +;3530: lowLight[1] = 0.8 * item->window.foreColor[1]; +ADDRLP4 4+4 +CNSTF4 1061997773 +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3531 +;3531: lowLight[2] = 0.8 * item->window.foreColor[2]; +ADDRLP4 4+8 +CNSTF4 1061997773 +ADDRFP4 0 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3532 +;3532: lowLight[3] = 0.8 * item->window.foreColor[3]; +ADDRLP4 4+12 +CNSTF4 1061997773 +ADDRFP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3533 +;3533: LerpColor(item->window.foreColor,lowLight,*newColor,0.5+0.5*sin(DC->realTime / PULSE_DIVISOR)); +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 75 +DIVI4 +CVIF4 4 +ARGF4 +ADDRLP4 32 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +CNSTF4 1056964608 +ADDRLP4 32 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ARGF4 +ADDRGP4 LerpColor +CALLV +pop +line 3534 +;3534: } else { +ADDRGP4 $1588 +JUMPV +LABELV $1587 +line 3535 +;3535: memcpy(newColor, &item->window.foreColor, sizeof(vec4_t)); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 3537 +;3536: // items can be enabled and disabled based on cvars +;3537: } +LABELV $1588 +LABELV $1583 +line 3539 +;3538: +;3539: if (item->enableCvar && *item->enableCvar && item->cvarTest && *item->cvarTest) { +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +ADDRLP4 32 +INDIRP4 +CNSTI4 284 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 40 +CNSTU4 0 +ASGNU4 +ADDRLP4 36 +INDIRP4 +CVPU4 4 +ADDRLP4 40 +INDIRU4 +EQU4 $1592 +ADDRLP4 44 +CNSTI4 0 +ASGNI4 +ADDRLP4 36 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 44 +INDIRI4 +EQI4 $1592 +ADDRLP4 48 +ADDRLP4 32 +INDIRP4 +CNSTI4 280 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 48 +INDIRP4 +CVPU4 4 +ADDRLP4 40 +INDIRU4 +EQU4 $1592 +ADDRLP4 48 +INDIRP4 +INDIRI1 +CVII4 1 +ADDRLP4 44 +INDIRI4 +EQI4 $1592 +line 3540 +;3540: if (item->cvarFlags & (CVAR_ENABLE | CVAR_DISABLE) && !Item_EnableShowViaCvar(item, CVAR_ENABLE)) { +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 0 +EQI4 $1594 +ADDRLP4 52 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 56 +ADDRGP4 Item_EnableShowViaCvar +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +NEI4 $1594 +line 3541 +;3541: memcpy(newColor, &parent->disableColor, sizeof(vec4_t)); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 244 +ADDP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 3542 +;3542: } +LABELV $1594 +line 3543 +;3543: } +LABELV $1592 +line 3544 +;3544:} +LABELV $1581 +endproc Item_TextColor 60 28 +export Item_Text_AutoWrapped_Paint +proc Item_Text_AutoWrapped_Paint 4176 36 +line 3546 +;3545: +;3546:void Item_Text_AutoWrapped_Paint(itemDef_t *item) { +line 3554 +;3547: char text[2048]; +;3548: const char *p, *textPtr, *newLinePtr; +;3549: char buff[2048]; +;3550: int width, height, len, textWidth, newLine, newLineWidth; +;3551: float y; +;3552: vec4_t color; +;3553: +;3554: textWidth = 0; +ADDRLP4 2056 +CNSTI4 0 +ASGNI4 +line 3555 +;3555: newLinePtr = NULL; +ADDRLP4 2068 +CNSTP4 0 +ASGNP4 +line 3557 +;3556: +;3557: if (item->text == NULL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1597 +line 3558 +;3558: if (item->cvar == NULL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1599 +line 3559 +;3559: return; +ADDRGP4 $1596 +JUMPV +LABELV $1599 +line 3561 +;3560: } +;3561: else { +line 3562 +;3562: DC->getCVarString(item->cvar, text, sizeof(text)); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 2104 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRP4 +CALLV +pop +line 3563 +;3563: textPtr = text; +ADDRLP4 2080 +ADDRLP4 2104 +ASGNP4 +line 3564 +;3564: } +line 3565 +;3565: } +ADDRGP4 $1598 +JUMPV +LABELV $1597 +line 3566 +;3566: else { +line 3567 +;3567: textPtr = item->text; +ADDRLP4 2080 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ASGNP4 +line 3568 +;3568: } +LABELV $1598 +line 3569 +;3569: if (*textPtr == '\0') { +ADDRLP4 2080 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1601 +line 3570 +;3570: return; +ADDRGP4 $1596 +JUMPV +LABELV $1601 +line 3572 +;3571: } +;3572: Item_TextColor(item, &color); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 2084 +ARGP4 +ADDRGP4 Item_TextColor +CALLV +pop +line 3573 +;3573: Item_SetTextExtents(item, &width, &height, textPtr); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 2100 +ARGP4 +ADDRLP4 2076 +ARGP4 +ADDRLP4 2080 +INDIRP4 +ARGP4 +ADDRGP4 Item_SetTextExtents +CALLV +pop +line 3575 +;3574: +;3575: y = item->textaligny; +ADDRLP4 2072 +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRF4 +ASGNF4 +line 3576 +;3576: len = 0; +ADDRLP4 2052 +CNSTI4 0 +ASGNI4 +line 3577 +;3577: buff[0] = '\0'; +ADDRLP4 4 +CNSTI1 0 +ASGNI1 +line 3578 +;3578: newLine = 0; +ADDRLP4 2060 +CNSTI4 0 +ASGNI4 +line 3579 +;3579: newLineWidth = 0; +ADDRLP4 2064 +CNSTI4 0 +ASGNI4 +line 3580 +;3580: p = textPtr; +ADDRLP4 0 +ADDRLP4 2080 +INDIRP4 +ASGNP4 +ADDRGP4 $1604 +JUMPV +LABELV $1603 +line 3581 +;3581: while (p) { +line 3582 +;3582: if (*p == ' ' || *p == '\t' || *p == '\n' || *p == '\0') { +ADDRLP4 4152 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 4152 +INDIRI4 +CNSTI4 32 +EQI4 $1610 +ADDRLP4 4152 +INDIRI4 +CNSTI4 9 +EQI4 $1610 +ADDRLP4 4152 +INDIRI4 +CNSTI4 10 +EQI4 $1610 +ADDRLP4 4152 +INDIRI4 +CNSTI4 0 +NEI4 $1606 +LABELV $1610 +line 3583 +;3583: newLine = len; +ADDRLP4 2060 +ADDRLP4 2052 +INDIRI4 +ASGNI4 +line 3584 +;3584: newLinePtr = p+1; +ADDRLP4 2068 +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 3585 +;3585: newLineWidth = textWidth; +ADDRLP4 2064 +ADDRLP4 2056 +INDIRI4 +ASGNI4 +line 3586 +;3586: } +LABELV $1606 +line 3587 +;3587: textWidth = DC->textWidth(buff, item->textscale, 0); +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 4156 +ADDRGP4 DC +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 2056 +ADDRLP4 4156 +INDIRI4 +ASGNI4 +line 3588 +;3588: if ( (newLine && textWidth > item->window.rect.w) || *p == '\n' || *p == '\0') { +ADDRLP4 2060 +INDIRI4 +CNSTI4 0 +EQI4 $1614 +ADDRLP4 2056 +INDIRI4 +CVIF4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +GTF4 $1615 +LABELV $1614 +ADDRLP4 4160 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 4160 +INDIRI4 +CNSTI4 10 +EQI4 $1615 +ADDRLP4 4160 +INDIRI4 +CNSTI4 0 +NEI4 $1611 +LABELV $1615 +line 3589 +;3589: if (len) { +ADDRLP4 2052 +INDIRI4 +CNSTI4 0 +EQI4 $1616 +line 3590 +;3590: if (item->textalignment == ITEM_ALIGN_LEFT) { +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $1618 +line 3591 +;3591: item->textRect.x = item->textalignx; +ADDRLP4 4164 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4164 +INDIRP4 +CNSTI4 180 +ADDP4 +ADDRLP4 4164 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ASGNF4 +line 3592 +;3592: } else if (item->textalignment == ITEM_ALIGN_RIGHT) { +ADDRGP4 $1619 +JUMPV +LABELV $1618 +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $1620 +line 3593 +;3593: item->textRect.x = item->textalignx - newLineWidth; +ADDRLP4 4164 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4164 +INDIRP4 +CNSTI4 180 +ADDP4 +ADDRLP4 4164 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ADDRLP4 2064 +INDIRI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 3594 +;3594: } else if (item->textalignment == ITEM_ALIGN_CENTER) { +ADDRGP4 $1621 +JUMPV +LABELV $1620 +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $1622 +line 3595 +;3595: item->textRect.x = item->textalignx - newLineWidth / 2; +ADDRLP4 4164 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4164 +INDIRP4 +CNSTI4 180 +ADDP4 +ADDRLP4 4164 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ADDRLP4 2064 +INDIRI4 +CNSTI4 2 +DIVI4 +CVIF4 4 +SUBF4 +ASGNF4 +line 3596 +;3596: } +LABELV $1622 +LABELV $1621 +LABELV $1619 +line 3597 +;3597: item->textRect.y = y; +ADDRFP4 0 +INDIRP4 +CNSTI4 184 +ADDP4 +ADDRLP4 2072 +INDIRF4 +ASGNF4 +line 3598 +;3598: ToWindowCoords(&item->textRect.x, &item->textRect.y, &item->window); +ADDRLP4 4164 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4164 +INDIRP4 +CNSTI4 180 +ADDP4 +ARGP4 +ADDRLP4 4164 +INDIRP4 +CNSTI4 184 +ADDP4 +ARGP4 +ADDRLP4 4164 +INDIRP4 +ARGP4 +ADDRGP4 ToWindowCoords +CALLV +pop +line 3600 +;3599: // +;3600: buff[newLine] = '\0'; +ADDRLP4 2060 +INDIRI4 +ADDRLP4 4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 3601 +;3601: DC->drawText(item->textRect.x, item->textRect.y, item->textscale, color, buff, 0, 0, item->textStyle, item->iMenuFont); +ADDRLP4 4168 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4168 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 4168 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 4168 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 2084 +ARGP4 +ADDRLP4 4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 4168 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4168 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 3602 +;3602: } +LABELV $1616 +line 3603 +;3603: if (*p == '\0') { +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1624 +line 3604 +;3604: break; +ADDRGP4 $1605 +JUMPV +LABELV $1624 +line 3607 +;3605: } +;3606: // +;3607: y += height + 5; +ADDRLP4 2072 +ADDRLP4 2072 +INDIRF4 +ADDRLP4 2076 +INDIRI4 +CNSTI4 5 +ADDI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 3608 +;3608: p = newLinePtr; +ADDRLP4 0 +ADDRLP4 2068 +INDIRP4 +ASGNP4 +line 3609 +;3609: len = 0; +ADDRLP4 2052 +CNSTI4 0 +ASGNI4 +line 3610 +;3610: newLine = 0; +ADDRLP4 2060 +CNSTI4 0 +ASGNI4 +line 3611 +;3611: newLineWidth = 0; +ADDRLP4 2064 +CNSTI4 0 +ASGNI4 +line 3612 +;3612: continue; +ADDRGP4 $1604 +JUMPV +LABELV $1611 +line 3614 +;3613: } +;3614: buff[len++] = *p++; +ADDRLP4 4164 +ADDRLP4 2052 +INDIRI4 +ASGNI4 +ADDRLP4 4172 +CNSTI4 1 +ASGNI4 +ADDRLP4 2052 +ADDRLP4 4164 +INDIRI4 +ADDRLP4 4172 +INDIRI4 +ADDI4 +ASGNI4 +ADDRLP4 4168 +ADDRLP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4168 +INDIRP4 +ADDRLP4 4172 +INDIRI4 +ADDP4 +ASGNP4 +ADDRLP4 4164 +INDIRI4 +ADDRLP4 4 +ADDP4 +ADDRLP4 4168 +INDIRP4 +INDIRI1 +ASGNI1 +line 3615 +;3615: buff[len] = '\0'; +ADDRLP4 2052 +INDIRI4 +ADDRLP4 4 +ADDP4 +CNSTI1 0 +ASGNI1 +line 3616 +;3616: } +LABELV $1604 +line 3581 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1603 +LABELV $1605 +line 3617 +;3617:} +LABELV $1596 +endproc Item_Text_AutoWrapped_Paint 4176 36 +export Item_Text_Wrapped_Paint +proc Item_Text_Wrapped_Paint 2112 36 +line 3619 +;3618: +;3619:void Item_Text_Wrapped_Paint(itemDef_t *item) { +line 3630 +;3620: char text[1024]; +;3621: const char *p, *start, *textPtr; +;3622: char buff[1024]; +;3623: int width, height; +;3624: float x, y; +;3625: vec4_t color; +;3626: +;3627: // now paint the text and/or any optional images +;3628: // default to left +;3629: +;3630: if (item->text == NULL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1627 +line 3631 +;3631: if (item->cvar == NULL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1629 +line 3632 +;3632: return; +ADDRGP4 $1626 +JUMPV +LABELV $1629 +line 3634 +;3633: } +;3634: else { +line 3635 +;3635: DC->getCVarString(item->cvar, text, sizeof(text)); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 1068 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRP4 +CALLV +pop +line 3636 +;3636: textPtr = text; +ADDRLP4 1060 +ADDRLP4 1068 +ASGNP4 +line 3637 +;3637: } +line 3638 +;3638: } +ADDRGP4 $1628 +JUMPV +LABELV $1627 +line 3639 +;3639: else { +line 3640 +;3640: textPtr = item->text; +ADDRLP4 1060 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ASGNP4 +line 3641 +;3641: } +LABELV $1628 +line 3642 +;3642: if (*textPtr == '\0') { +ADDRLP4 1060 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1631 +line 3643 +;3643: return; +ADDRGP4 $1626 +JUMPV +LABELV $1631 +line 3646 +;3644: } +;3645: +;3646: Item_TextColor(item, &color); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 1040 +ARGP4 +ADDRGP4 Item_TextColor +CALLV +pop +line 3647 +;3647: Item_SetTextExtents(item, &width, &height, textPtr); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 1064 +ARGP4 +ADDRLP4 1056 +ARGP4 +ADDRLP4 1060 +INDIRP4 +ARGP4 +ADDRGP4 Item_SetTextExtents +CALLV +pop +line 3649 +;3648: +;3649: x = item->textRect.x; +ADDRLP4 1036 +ADDRFP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ASGNF4 +line 3650 +;3650: y = item->textRect.y; +ADDRLP4 1032 +ADDRFP4 0 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ASGNF4 +line 3651 +;3651: start = textPtr; +ADDRLP4 4 +ADDRLP4 1060 +INDIRP4 +ASGNP4 +line 3652 +;3652: p = strchr(textPtr, '\r'); +ADDRLP4 1060 +INDIRP4 +ARGP4 +CNSTI4 13 +ARGI4 +ADDRLP4 2092 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 2092 +INDIRP4 +ASGNP4 +ADDRGP4 $1634 +JUMPV +LABELV $1633 +line 3653 +;3653: while (p && *p) { +line 3654 +;3654: strncpy(buff, start, p-start+1); +ADDRLP4 8 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 1 +ADDI4 +ARGI4 +ADDRGP4 strncpy +CALLP4 +pop +line 3655 +;3655: buff[p-start] = '\0'; +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDRLP4 8 +ADDP4 +CNSTI1 0 +ASGNI1 +line 3656 +;3656: DC->drawText(x, y, item->textscale, color, buff, 0, 0, item->textStyle, item->iMenuFont); +ADDRLP4 1036 +INDIRF4 +ARGF4 +ADDRLP4 1032 +INDIRF4 +ARGF4 +ADDRLP4 2100 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2100 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 8 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 2100 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 2100 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 3657 +;3657: y += height + 2; +ADDRLP4 1032 +ADDRLP4 1032 +INDIRF4 +ADDRLP4 1056 +INDIRI4 +CNSTI4 2 +ADDI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 3658 +;3658: start += p - start + 1; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +CNSTI4 1 +ADDI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +ASGNP4 +line 3659 +;3659: p = strchr(p+1, '\r'); +ADDRLP4 0 +INDIRP4 +CNSTI4 1 +ADDP4 +ARGP4 +CNSTI4 13 +ARGI4 +ADDRLP4 2108 +ADDRGP4 strchr +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 2108 +INDIRP4 +ASGNP4 +line 3660 +;3660: } +LABELV $1634 +line 3653 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1636 +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1633 +LABELV $1636 +line 3661 +;3661: DC->drawText(x, y, item->textscale, color, start, 0, 0, item->textStyle, item->iMenuFont); +ADDRLP4 1036 +INDIRF4 +ARGF4 +ADDRLP4 1032 +INDIRF4 +ARGF4 +ADDRLP4 2100 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2100 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 1040 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 2100 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 2100 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 3662 +;3662:} +LABELV $1626 +endproc Item_Text_Wrapped_Paint 2112 36 +export Item_Text_Paint +proc Item_Text_Paint 1060 36 +line 3664 +;3663: +;3664:void Item_Text_Paint(itemDef_t *item) { +line 3670 +;3665: char text[1024]; +;3666: const char *textPtr; +;3667: int height, width; +;3668: vec4_t color; +;3669: +;3670: if (item->window.flags & WINDOW_WRAPPED) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 262144 +BANDI4 +CNSTI4 0 +EQI4 $1638 +line 3671 +;3671: Item_Text_Wrapped_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Text_Wrapped_Paint +CALLV +pop +line 3672 +;3672: return; +ADDRGP4 $1637 +JUMPV +LABELV $1638 +line 3674 +;3673: } +;3674: if (item->window.flags & WINDOW_AUTOWRAPPED) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 524288 +BANDI4 +CNSTI4 0 +EQI4 $1640 +line 3675 +;3675: Item_Text_AutoWrapped_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Text_AutoWrapped_Paint +CALLV +pop +line 3676 +;3676: return; +ADDRGP4 $1637 +JUMPV +LABELV $1640 +line 3679 +;3677: } +;3678: +;3679: if (item->text == NULL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1642 +line 3680 +;3680: if (item->cvar == NULL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1644 +line 3681 +;3681: return; +ADDRGP4 $1637 +JUMPV +LABELV $1644 +line 3683 +;3682: } +;3683: else { +line 3684 +;3684: DC->getCVarString(item->cvar, text, sizeof(text)); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 28 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRP4 +CALLV +pop +line 3685 +;3685: textPtr = text; +ADDRLP4 0 +ADDRLP4 28 +ASGNP4 +line 3686 +;3686: } +line 3687 +;3687: } +ADDRGP4 $1643 +JUMPV +LABELV $1642 +line 3688 +;3688: else { +line 3689 +;3689: textPtr = item->text; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ASGNP4 +line 3690 +;3690: } +LABELV $1643 +line 3693 +;3691: +;3692: // this needs to go here as it sets extents for cvar types as well +;3693: Item_SetTextExtents(item, &width, &height, textPtr); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_SetTextExtents +CALLV +pop +line 3695 +;3694: +;3695: if (*textPtr == '\0') { +ADDRLP4 0 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1646 +line 3696 +;3696: return; +ADDRGP4 $1637 +JUMPV +LABELV $1646 +line 3700 +;3697: } +;3698: +;3699: +;3700: Item_TextColor(item, &color); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 Item_TextColor +CALLV +pop +line 3732 +;3701: +;3702: //FIXME: this is a fucking mess +;3703:/* +;3704: adjust = 0; +;3705: if (item->textStyle == ITEM_TEXTSTYLE_OUTLINED || item->textStyle == ITEM_TEXTSTYLE_OUTLINESHADOWED) { +;3706: adjust = 0.5; +;3707: } +;3708: +;3709: if (item->textStyle == ITEM_TEXTSTYLE_SHADOWED || item->textStyle == ITEM_TEXTSTYLE_OUTLINESHADOWED) { +;3710: Fade(&item->window.flags, &DC->Assets.shadowColor[3], DC->Assets.fadeClamp, &item->window.nextTime, DC->Assets.fadeCycle, qfalse); +;3711: DC->drawText(item->textRect.x + DC->Assets.shadowX, item->textRect.y + DC->Assets.shadowY, item->textscale, DC->Assets.shadowColor, textPtr, adjust); +;3712: } +;3713:*/ +;3714: +;3715: +;3716:// if (item->textStyle == ITEM_TEXTSTYLE_OUTLINED || item->textStyle == ITEM_TEXTSTYLE_OUTLINESHADOWED) { +;3717:// Fade(&item->window.flags, &item->window.outlineColor[3], DC->Assets.fadeClamp, &item->window.nextTime, DC->Assets.fadeCycle, qfalse); +;3718:// /* +;3719:// Text_Paint(item->textRect.x-1, item->textRect.y-1, item->textscale, item->window.foreColor, textPtr, adjust); +;3720:// Text_Paint(item->textRect.x, item->textRect.y-1, item->textscale, item->window.foreColor, textPtr, adjust); +;3721:// Text_Paint(item->textRect.x+1, item->textRect.y-1, item->textscale, item->window.foreColor, textPtr, adjust); +;3722:// Text_Paint(item->textRect.x-1, item->textRect.y, item->textscale, item->window.foreColor, textPtr, adjust); +;3723:// Text_Paint(item->textRect.x+1, item->textRect.y, item->textscale, item->window.foreColor, textPtr, adjust); +;3724:// Text_Paint(item->textRect.x-1, item->textRect.y+1, item->textscale, item->window.foreColor, textPtr, adjust); +;3725:// Text_Paint(item->textRect.x, item->textRect.y+1, item->textscale, item->window.foreColor, textPtr, adjust); +;3726:// Text_Paint(item->textRect.x+1, item->textRect.y+1, item->textscale, item->window.foreColor, textPtr, adjust); +;3727:// */ +;3728:// DC->drawText(item->textRect.x - 1, item->textRect.y + 1, item->textscale * 1.02, item->window.outlineColor, textPtr, adjust); +;3729:// } +;3730: +;3731://DC->drawText(item->textRect.x, item->textRect.y, item->textscale, color, textPtr, 0, 0, item->textStyle); +;3732: DC->drawText(item->textRect.x, item->textRect.y, item->textscale, color, textPtr, 0, 0, item->textStyle, item->iMenuFont); +ADDRLP4 1052 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1052 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 1052 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 1052 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 4 +ARGP4 +ADDRLP4 0 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 1052 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1052 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 3734 +;3733: +;3734: if (item->text2) // Is there a second line of text? +ADDRFP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1648 +line 3735 +;3735: { +line 3736 +;3736: Item_TextColor(item, &color); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 Item_TextColor +CALLV +pop +line 3738 +;3737:// DC->drawText(item->textRect.x + item->text2alignx, item->textRect.y + item->text2aligny, item->textscale, color, item->text2, 0, 0, item->textStyle); +;3738: DC->drawText(item->textRect.x + item->text2alignx, item->textRect.y + item->text2aligny, item->textscale, color, item->text2, 0, 0, item->textStyle,item->iMenuFont); +ADDRLP4 1056 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1056 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 1056 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 1056 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ADDRLP4 1056 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 1056 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 4 +ARGP4 +ADDRLP4 1056 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 1056 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1056 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 3739 +;3739: } +LABELV $1648 +line 3741 +;3740: +;3741:} +LABELV $1637 +endproc Item_Text_Paint 1060 36 +export Item_TextField_Paint +proc Item_TextField_Paint 1104 40 +line 3748 +;3742: +;3743: +;3744: +;3745://float trap_Cvar_VariableValue( const char *var_name ); +;3746://void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int bufsize ); +;3747: +;3748:void Item_TextField_Paint(itemDef_t *item) { +line 3752 +;3749: char buff[1024]; +;3750: vec4_t newColor, lowLight; +;3751: int offset; +;3752: menuDef_t *parent = (menuDef_t*)item->parent; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 3753 +;3753: editFieldDef_t *editPtr = (editFieldDef_t*)item->typeData; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 3755 +;3754: +;3755: Item_Text_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Text_Paint +CALLV +pop +line 3757 +;3756: +;3757: buff[0] = '\0'; +ADDRLP4 8 +CNSTI1 0 +ASGNI1 +line 3759 +;3758: +;3759: if (item->cvar) { +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1651 +line 3760 +;3760: DC->getCVarString(item->cvar, buff, sizeof(buff)); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ARGP4 +CNSTI4 1024 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRP4 +CALLV +pop +line 3761 +;3761: } +LABELV $1651 +line 3763 +;3762: +;3763: parent = (menuDef_t*)item->parent; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 3765 +;3764: +;3765: if (item->window.flags & WINDOW_HASFOCUS) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1653 +line 3766 +;3766: lowLight[0] = 0.8 * parent->focusColor[0]; +ADDRLP4 1032 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3767 +;3767: lowLight[1] = 0.8 * parent->focusColor[1]; +ADDRLP4 1032+4 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3768 +;3768: lowLight[2] = 0.8 * parent->focusColor[2]; +ADDRLP4 1032+8 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3769 +;3769: lowLight[3] = 0.8 * parent->focusColor[3]; +ADDRLP4 1032+12 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3770 +;3770: LerpColor(parent->focusColor,lowLight,newColor,0.5+0.5*sin(DC->realTime / PULSE_DIVISOR)); +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 75 +DIVI4 +CVIF4 4 +ARGF4 +ADDRLP4 1068 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +ARGP4 +ADDRLP4 1032 +ARGP4 +ADDRLP4 1048 +ARGP4 +CNSTF4 1056964608 +ADDRLP4 1068 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ARGF4 +ADDRGP4 LerpColor +CALLV +pop +line 3771 +;3771: } else { +ADDRGP4 $1654 +JUMPV +LABELV $1653 +line 3772 +;3772: memcpy(&newColor, &item->window.foreColor, sizeof(vec4_t)); +ADDRLP4 1048 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 3773 +;3773: } +LABELV $1654 +line 3775 +;3774: +;3775: offset = (item->text && *item->text) ? 8 : 0; +ADDRLP4 1072 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 1072 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1659 +ADDRLP4 1072 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $1659 +ADDRLP4 1068 +CNSTI4 8 +ASGNI4 +ADDRGP4 $1660 +JUMPV +LABELV $1659 +ADDRLP4 1068 +CNSTI4 0 +ASGNI4 +LABELV $1660 +ADDRLP4 1064 +ADDRLP4 1068 +INDIRI4 +ASGNI4 +line 3776 +;3776: if (item->window.flags & WINDOW_HASFOCUS && g_editingField) { +ADDRLP4 1076 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +ADDRLP4 1076 +INDIRI4 +EQI4 $1661 +ADDRGP4 g_editingField +INDIRI4 +ADDRLP4 1076 +INDIRI4 +EQI4 $1661 +line 3777 +;3777: char cursor = DC->getOverstrikeMode() ? '_' : '|'; +ADDRLP4 1088 +ADDRGP4 DC +INDIRP4 +CNSTI4 140 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 1088 +INDIRI4 +CNSTI4 0 +EQI4 $1664 +ADDRLP4 1084 +CNSTI4 95 +ASGNI4 +ADDRGP4 $1665 +JUMPV +LABELV $1664 +ADDRLP4 1084 +CNSTI4 124 +ASGNI4 +LABELV $1665 +ADDRLP4 1080 +ADDRLP4 1084 +INDIRI4 +CVII1 4 +ASGNI1 +line 3778 +;3778: DC->drawTextWithCursor(item->textRect.x + item->textRect.w + offset, item->textRect.y, item->textscale, newColor, buff + editPtr->paintOffset, item->cursorPos - editPtr->paintOffset , cursor, editPtr->maxPaintChars, item->textStyle, item->iMenuFont); +ADDRLP4 1092 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ADDF4 +ADDRLP4 1064 +INDIRI4 +CVIF4 4 +ADDF4 +ARGF4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 1048 +ARGP4 +ADDRLP4 1100 +ADDRLP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 1100 +INDIRI4 +ADDRLP4 8 +ADDP4 +ARGP4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ADDRLP4 1100 +INDIRI4 +SUBI4 +ARGI4 +ADDRLP4 1080 +INDIRI1 +CVII4 1 +ARGI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1092 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 132 +ADDP4 +INDIRP4 +CALLV +pop +line 3779 +;3779: } else { +ADDRGP4 $1662 +JUMPV +LABELV $1661 +line 3781 +;3780:// DC->drawText(item->textRect.x + item->textRect.w + offset, item->textRect.y, item->textscale, newColor, buff + editPtr->paintOffset, 0, editPtr->maxPaintChars, item->textStyle); +;3781: DC->drawText(item->textRect.x + item->textRect.w + offset, item->textRect.y, item->textscale, newColor, buff + editPtr->paintOffset, 0, editPtr->maxPaintChars, item->textStyle,item->iMenuFont); +ADDRLP4 1080 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 1080 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 1080 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ADDF4 +ADDRLP4 1064 +INDIRI4 +CVIF4 4 +ADDF4 +ARGF4 +ADDRLP4 1080 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 1080 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 1048 +ARGP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +ADDRLP4 8 +ADDP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1080 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 1080 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 3782 +;3782: } +LABELV $1662 +line 3783 +;3783:} +LABELV $1650 +endproc Item_TextField_Paint 1104 40 +export Item_YesNo_Paint +proc Item_YesNo_Paint 100 36 +line 3785 +;3784: +;3785:void Item_YesNo_Paint(itemDef_t *item) { +line 3790 +;3786: char sYES[20]; +;3787: char sNO[20]; +;3788: vec4_t newColor, lowLight; +;3789: float value; +;3790: menuDef_t *parent = (menuDef_t*)item->parent; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 3792 +;3791: +;3792: value = (item->cvar) ? DC->getCVarValue(item->cvar) : 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1668 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 84 +ADDRGP4 DC +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRP4 +CALLF4 +ASGNF4 +ADDRLP4 80 +ADDRLP4 84 +INDIRF4 +ASGNF4 +ADDRGP4 $1669 +JUMPV +LABELV $1668 +ADDRLP4 80 +CNSTF4 0 +ASGNF4 +LABELV $1669 +ADDRLP4 76 +ADDRLP4 80 +INDIRF4 +ASGNF4 +line 3794 +;3793: +;3794: if (item->window.flags & WINDOW_HASFOCUS) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1670 +line 3795 +;3795: lowLight[0] = 0.8 * parent->focusColor[0]; +ADDRLP4 44 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3796 +;3796: lowLight[1] = 0.8 * parent->focusColor[1]; +ADDRLP4 44+4 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3797 +;3797: lowLight[2] = 0.8 * parent->focusColor[2]; +ADDRLP4 44+8 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3798 +;3798: lowLight[3] = 0.8 * parent->focusColor[3]; +ADDRLP4 44+12 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3799 +;3799: LerpColor(parent->focusColor,lowLight,newColor,0.5+0.5*sin(DC->realTime / PULSE_DIVISOR)); +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 75 +DIVI4 +CVIF4 4 +ARGF4 +ADDRLP4 88 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +ARGP4 +ADDRLP4 44 +ARGP4 +ADDRLP4 60 +ARGP4 +CNSTF4 1056964608 +ADDRLP4 88 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ARGF4 +ADDRGP4 LerpColor +CALLV +pop +line 3800 +;3800: } else { +ADDRGP4 $1671 +JUMPV +LABELV $1670 +line 3801 +;3801: memcpy(&newColor, &item->window.foreColor, sizeof(vec4_t)); +ADDRLP4 60 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 3802 +;3802: } +LABELV $1671 +line 3805 +;3803: +;3804: +;3805: trap_SP_GetStringTextString("MENUS0_YES",sYES, sizeof(sYES)); +ADDRGP4 $1675 +ARGP4 +ADDRLP4 4 +ARGP4 +CNSTI4 20 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 3806 +;3806: trap_SP_GetStringTextString("MENUS0_NO", sNO, sizeof(sNO)); +ADDRGP4 $1676 +ARGP4 +ADDRLP4 24 +ARGP4 +CNSTI4 20 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 3808 +;3807: +;3808: if (item->text) { +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1677 +line 3809 +;3809: Item_Text_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Text_Paint +CALLV +pop +line 3811 +;3810:// DC->drawText(item->textRect.x + item->textRect.w + 8, item->textRect.y, item->textscale, newColor, (value != 0) ? sYES : sNO, 0, 0, item->textStyle); +;3811: DC->drawText(item->textRect.x + item->textRect.w + 8, item->textRect.y, item->textscale, newColor, (value != 0) ? sYES : sNO, 0, 0, item->textStyle,item->iMenuFont); +ADDRLP4 92 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 92 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1090519040 +ADDF4 +ARGF4 +ADDRLP4 92 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 92 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +ARGP4 +ADDRLP4 76 +INDIRF4 +CNSTF4 0 +EQF4 $1680 +ADDRLP4 88 +ADDRLP4 4 +ASGNP4 +ADDRGP4 $1681 +JUMPV +LABELV $1680 +ADDRLP4 88 +ADDRLP4 24 +ASGNP4 +LABELV $1681 +ADDRLP4 88 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 96 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 96 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 3812 +;3812: } else { +ADDRGP4 $1678 +JUMPV +LABELV $1677 +line 3814 +;3813:// DC->drawText(item->textRect.x, item->textRect.y, item->textscale, newColor, (value != 0) ? sYES : sNO, 0, 0, item->textStyle); +;3814: DC->drawText(item->textRect.x, item->textRect.y, item->textscale, newColor, (value != 0) ? sYES : sNO, 0, 0, item->textStyle,item->iMenuFont); +ADDRLP4 92 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 92 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 92 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +ARGP4 +ADDRLP4 76 +INDIRF4 +CNSTF4 0 +EQF4 $1683 +ADDRLP4 88 +ADDRLP4 4 +ASGNP4 +ADDRGP4 $1684 +JUMPV +LABELV $1683 +ADDRLP4 88 +ADDRLP4 24 +ASGNP4 +LABELV $1684 +ADDRLP4 88 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 96 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 96 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 3815 +;3815: } +LABELV $1678 +line 3816 +;3816:} +LABELV $1666 +endproc Item_YesNo_Paint 100 36 +export Item_Multi_Paint +proc Item_Multi_Paint 48 36 +line 3818 +;3817: +;3818:void Item_Multi_Paint(itemDef_t *item) { +line 3820 +;3819: vec4_t newColor, lowLight; +;3820: const char *text = ""; +ADDRLP4 4 +ADDRGP4 $99 +ASGNP4 +line 3821 +;3821: menuDef_t *parent = (menuDef_t*)item->parent; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 3823 +;3822: +;3823: if (item->window.flags & WINDOW_HASFOCUS) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1686 +line 3824 +;3824: lowLight[0] = 0.8 * parent->focusColor[0]; +ADDRLP4 8 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3825 +;3825: lowLight[1] = 0.8 * parent->focusColor[1]; +ADDRLP4 8+4 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3826 +;3826: lowLight[2] = 0.8 * parent->focusColor[2]; +ADDRLP4 8+8 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3827 +;3827: lowLight[3] = 0.8 * parent->focusColor[3]; +ADDRLP4 8+12 +CNSTF4 1061997773 +ADDRLP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 3828 +;3828: LerpColor(parent->focusColor,lowLight,newColor,0.5+0.5*sin(DC->realTime / PULSE_DIVISOR)); +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 75 +DIVI4 +CVIF4 4 +ARGF4 +ADDRLP4 40 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRLP4 24 +ARGP4 +CNSTF4 1056964608 +ADDRLP4 40 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ARGF4 +ADDRGP4 LerpColor +CALLV +pop +line 3829 +;3829: } else { +ADDRGP4 $1687 +JUMPV +LABELV $1686 +line 3830 +;3830: memcpy(&newColor, &item->window.foreColor, sizeof(vec4_t)); +ADDRLP4 24 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 3831 +;3831: } +LABELV $1687 +line 3833 +;3832: +;3833: text = Item_Multi_Setting(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 40 +ADDRGP4 Item_Multi_Setting +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 40 +INDIRP4 +ASGNP4 +line 3835 +;3834: +;3835: if (item->text) { +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1691 +line 3836 +;3836: Item_Text_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Text_Paint +CALLV +pop +line 3838 +;3837:// DC->drawText(item->textRect.x + item->textRect.w + 8, item->textRect.y, item->textscale, newColor, text, 0, 0, item->textStyle); +;3838: DC->drawText(item->textRect.x + item->textRect.w + 8, item->textRect.y, item->textscale, newColor, text, 0, 0, item->textStyle,item->iMenuFont); +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1090519040 +ADDF4 +ARGF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 24 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 44 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 44 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 3839 +;3839: } else { +ADDRGP4 $1692 +JUMPV +LABELV $1691 +line 3841 +;3840:// DC->drawText(item->textRect.x, item->textRect.y, item->textscale, newColor, text, 0, 0, item->textStyle); +;3841: DC->drawText(item->textRect.x, item->textRect.y, item->textscale, newColor, text, 0, 0, item->textStyle,item->iMenuFont); +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 24 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 44 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 44 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 3842 +;3842: } +LABELV $1692 +line 3843 +;3843:} +LABELV $1685 +endproc Item_Multi_Paint 48 36 +data +align 4 +LABELV g_bindings +address $1695 +byte 4 9 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1696 +byte 4 10 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1697 +byte 4 1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1698 +byte 4 170 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1699 +byte 4 171 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1700 +byte 4 44 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1701 +byte 4 46 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1702 +byte 4 32 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1703 +byte 4 99 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1704 +byte 4 172 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1705 +byte 4 173 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1706 +byte 4 3 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1707 +byte 4 158 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1708 +byte 4 127 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1709 +byte 4 47 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1710 +byte 4 157 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1711 +byte 4 49 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1712 +byte 4 50 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1713 +byte 4 51 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1714 +byte 4 52 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1715 +byte 4 53 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1716 +byte 4 54 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1717 +byte 4 55 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1718 +byte 4 56 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1719 +byte 4 57 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1720 +byte 4 48 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1721 +byte 4 108 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1722 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1723 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1724 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1725 +byte 4 2 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1726 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1727 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1728 +byte 4 104 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1729 +byte 4 117 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1730 +byte 4 91 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1731 +byte 4 93 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1732 +byte 4 119 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1733 +byte 4 114 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1734 +byte 4 116 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1735 +byte 4 121 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1736 +byte 4 110 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1737 +byte 4 111 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1738 +byte 4 100 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1739 +byte 4 112 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1740 +byte 4 99 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1741 +byte 4 102 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1742 +byte 4 118 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1743 +byte 4 101 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1744 +byte 4 105 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1745 +byte 4 107 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1746 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1747 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1748 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1749 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1750 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1751 +byte 4 143 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1752 +byte 4 127 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1753 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1754 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1755 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1756 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1727 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1757 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1758 +byte 4 28 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1759 +byte 4 29 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1760 +byte 4 30 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1761 +byte 4 31 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1762 +byte 4 132 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1763 +byte 4 133 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1764 +byte 4 134 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1765 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1766 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1767 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1768 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1769 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1770 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1771 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1772 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1773 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1774 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1775 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1776 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1777 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1778 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1779 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1780 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1781 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +address $1782 +byte 4 -1 +byte 4 -1 +byte 4 -1 +byte 4 -1 +skip 4 +lit +align 4 +LABELV g_bindCount +byte 4 89 +code +proc Controls_GetKeyAssignment 276 12 +line 3969 +;3844: +;3845: +;3846:typedef struct { +;3847: char *command; +;3848: int id; +;3849: int defaultbind1; +;3850: int defaultbind2; +;3851: int bind1; +;3852: int bind2; +;3853:} bind_t; +;3854: +;3855:typedef struct +;3856:{ +;3857: char* name; +;3858: float defaultvalue; +;3859: float value; +;3860:} configcvar_t; +;3861: +;3862: +;3863:static bind_t g_bindings[] = +;3864:{ +;3865: {"+scores", A_TAB, -1, -1, -1}, +;3866: {"+button2", A_ENTER, -1, -1, -1}, +;3867: {"+speed", A_SHIFT, -1, -1, -1}, +;3868: {"+forward", A_CURSOR_UP, -1, -1, -1}, +;3869: {"+back", A_CURSOR_DOWN, -1, -1, -1}, +;3870: {"+moveleft", ',', -1, -1, -1}, +;3871: {"+moveright", '.', -1, -1, -1}, +;3872: {"+moveup", A_SPACE, -1, -1, -1}, +;3873: {"+movedown", 'c', -1, -1, -1}, +;3874: {"+left", A_CURSOR_LEFT, -1, -1, -1}, +;3875: {"+right", A_CURSOR_RIGHT, -1, -1, -1}, +;3876: {"+strafe", A_ALT, -1, -1, -1}, +;3877: {"+lookup", A_PAGE_DOWN, -1, -1, -1}, +;3878: {"+lookdown", A_DELETE, -1, -1, -1}, +;3879: {"+mlook", '/', -1, -1, -1}, +;3880: {"centerview", A_END, -1, -1, -1}, +;3881:// {"+zoom", -1, -1, -1, -1}, +;3882: {"weapon 1", '1', -1, -1, -1}, +;3883: {"weapon 2", '2', -1, -1, -1}, +;3884: {"weapon 3", '3', -1, -1, -1}, +;3885: {"weapon 4", '4', -1, -1, -1}, +;3886: {"weapon 5", '5', -1, -1, -1}, +;3887: {"weapon 6", '6', -1, -1, -1}, +;3888: {"weapon 7", '7', -1, -1, -1}, +;3889: {"weapon 8", '8', -1, -1, -1}, +;3890: {"weapon 9", '9', -1, -1, -1}, +;3891: {"weapon 10", '0', -1, -1, -1}, +;3892: {"saberAttackCycle", 'l', -1, -1, -1}, +;3893: {"weapon 11", -1, -1, -1, -1}, +;3894: {"weapon 12", -1, -1, -1, -1}, +;3895: {"weapon 13", -1, -1, -1, -1}, +;3896: {"+attack", A_CTRL, -1, -1, -1}, +;3897: {"+altattack", -1, -1, -1, -1}, +;3898: {"+use", -1, -1, -1, -1}, +;3899: {"engage_duel", 'h', -1, -1, -1}, +;3900: {"+taunt", 'u', -1, -1, -1}, +;3901: {"weapprev", '[', -1, -1, -1}, +;3902: {"weapnext", ']', -1, -1, -1}, +;3903: {"prevTeamMember", 'w', -1, -1, -1}, +;3904: {"nextTeamMember", 'r', -1, -1, -1}, +;3905: {"nextOrder", 't', -1, -1, -1}, +;3906: {"confirmOrder", 'y', -1, -1, -1}, +;3907: {"denyOrder", 'n', -1, -1, -1}, +;3908: {"taskOffense", 'o', -1, -1, -1}, +;3909: {"taskDefense", 'd', -1, -1, -1}, +;3910: {"taskPatrol", 'p', -1, -1, -1}, +;3911: {"taskCamp", 'c', -1, -1, -1}, +;3912: {"taskFollow", 'f', -1, -1, -1}, +;3913: {"taskRetrieve", 'v', -1, -1, -1}, +;3914: {"taskEscort", 'e', -1, -1, -1}, +;3915: {"taskOwnFlag", 'i', -1, -1, -1}, +;3916: {"taskSuicide", 'k', -1, -1, -1}, +;3917: {"tauntKillInsult", -1, -1, -1, -1}, +;3918: {"tauntPraise", -1, -1, -1, -1}, +;3919: {"tauntTaunt", -1, -1, -1, -1}, +;3920: {"tauntDeathInsult",-1, -1, -1, -1}, +;3921: {"tauntGauntlet", -1, -1, -1, -1}, +;3922: {"scoresUp", A_INSERT, -1, -1, -1}, +;3923: {"scoresDown", A_DELETE, -1, -1, -1}, +;3924: {"messagemode", -1, -1, -1, -1}, +;3925: {"messagemode2", -1, -1, -1, -1}, +;3926: {"messagemode3", -1, -1, -1, -1}, +;3927: {"messagemode4", -1, -1, -1, -1}, +;3928: {"+use", -1, -1, -1, -1}, +;3929: {"+force_jump", -1, -1, -1, -1}, +;3930: {"force_throw", A_F1, -1, -1, -1}, +;3931: {"force_pull", A_F2, -1, -1, -1}, +;3932: {"force_speed", A_F3, -1, -1, -1}, +;3933: {"force_distract", A_F4, -1, -1, -1}, +;3934: {"force_heal", A_F5, -1, -1, -1}, +;3935: {"+force_grip", A_F6, -1, -1, -1}, +;3936: {"+force_lightning",A_F7, -1, -1, -1}, +;3937://mp only +;3938: {"+force_drain", -1, -1, -1, -1}, +;3939: {"force_rage", -1, -1, -1, -1}, +;3940: {"force_protect", -1, -1, -1, -1}, +;3941: {"force_absorb", -1, -1, -1, -1}, +;3942: {"force_healother", -1, -1, -1, -1}, +;3943: {"force_forcepowerother", -1, -1, -1, -1}, +;3944: {"force_seeing", -1, -1, -1, -1}, +;3945: +;3946: {"+useforce", -1, -1, -1, -1}, +;3947: {"forcenext", -1, -1, -1, -1}, +;3948: {"forceprev", -1, -1, -1, -1}, +;3949: {"invnext", -1, -1, -1, -1}, +;3950: {"invprev", -1, -1, -1, -1}, +;3951: {"use_seeker", -1, -1, -1, -1}, +;3952: {"use_field", -1, -1, -1, -1}, +;3953: {"use_bacta", -1, -1, -1, -1}, +;3954: {"use_electrobinoculars", -1, -1, -1, -1}, +;3955: {"use_sentry", -1, -1, -1, -1}, +;3956: {"cg_thirdperson !",-1, -1, -1, -1}, +;3957: +;3958:}; +;3959: +;3960: +;3961:static const int g_bindCount = sizeof(g_bindings) / sizeof(bind_t); +;3962: +;3963:/* +;3964:================= +;3965:Controls_GetKeyAssignment +;3966:================= +;3967:*/ +;3968:static void Controls_GetKeyAssignment (char *command, int *twokeys) +;3969:{ +line 3974 +;3970: int count; +;3971: int j; +;3972: char b[256]; +;3973: +;3974: twokeys[0] = twokeys[1] = -1; +ADDRLP4 264 +ADDRFP4 4 +INDIRP4 +ASGNP4 +ADDRLP4 268 +CNSTI4 -1 +ASGNI4 +ADDRLP4 264 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 268 +INDIRI4 +ASGNI4 +ADDRLP4 264 +INDIRP4 +ADDRLP4 268 +INDIRI4 +ASGNI4 +line 3975 +;3975: count = 0; +ADDRLP4 260 +CNSTI4 0 +ASGNI4 +line 3977 +;3976: +;3977: for ( j = 0; j < MAX_KEYS; j++ ) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $1784 +line 3978 +;3978: { +line 3979 +;3979: DC->getBindingBuf( j, b, 256 ); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +CNSTI4 256 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 172 +ADDP4 +INDIRP4 +CALLV +pop +line 3980 +;3980: if ( *b == 0 ) { +ADDRLP4 4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $1788 +line 3981 +;3981: continue; +ADDRGP4 $1785 +JUMPV +LABELV $1788 +line 3983 +;3982: } +;3983: if ( !Q_stricmp( b, command ) ) { +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 272 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 272 +INDIRI4 +CNSTI4 0 +NEI4 $1790 +line 3984 +;3984: twokeys[count] = j; +ADDRLP4 260 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 4 +INDIRP4 +ADDP4 +ADDRLP4 0 +INDIRI4 +ASGNI4 +line 3985 +;3985: count++; +ADDRLP4 260 +ADDRLP4 260 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 3986 +;3986: if (count == 2) { +ADDRLP4 260 +INDIRI4 +CNSTI4 2 +NEI4 $1792 +line 3987 +;3987: break; +ADDRGP4 $1786 +JUMPV +LABELV $1792 +line 3989 +;3988: } +;3989: } +LABELV $1790 +line 3990 +;3990: } +LABELV $1785 +line 3977 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 320 +LTI4 $1784 +LABELV $1786 +line 3991 +;3991:} +LABELV $1783 +endproc Controls_GetKeyAssignment 276 12 +export Controls_GetConfig +proc Controls_GetConfig 12 8 +line 3999 +;3992: +;3993:/* +;3994:================= +;3995:Controls_GetConfig +;3996:================= +;3997:*/ +;3998:void Controls_GetConfig( void ) +;3999:{ +line 4004 +;4000: int i; +;4001: int twokeys[2]; +;4002: +;4003: // iterate each command, get its numeric binding +;4004: for (i=0; i < g_bindCount; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1798 +JUMPV +LABELV $1795 +line 4005 +;4005: { +line 4007 +;4006: +;4007: Controls_GetKeyAssignment(g_bindings[i].command, twokeys); +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ARGP4 +ADDRGP4 Controls_GetKeyAssignment +CALLV +pop +line 4009 +;4008: +;4009: g_bindings[i].bind1 = twokeys[0]; +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 4010 +;4010: g_bindings[i].bind2 = twokeys[1]; +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +ADDRLP4 4+4 +INDIRI4 +ASGNI4 +line 4011 +;4011: } +LABELV $1796 +line 4004 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1798 +ADDRLP4 0 +INDIRI4 +ADDRGP4 g_bindCount +INDIRI4 +LTI4 $1795 +line 4021 +;4012: +;4013: //s_controls.invertmouse.curvalue = DC->getCVarValue( "m_pitch" ) < 0; +;4014: //s_controls.smoothmouse.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "m_filter" ) ); +;4015: //s_controls.alwaysrun.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "cl_run" ) ); +;4016: //s_controls.autoswitch.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "cg_autoswitch" ) ); +;4017: //s_controls.sensitivity.curvalue = UI_ClampCvar( 2, 30, Controls_GetCvarValue( "sensitivity" ) ); +;4018: //s_controls.joyenable.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "in_joystick" ) ); +;4019: //s_controls.joythreshold.curvalue = UI_ClampCvar( 0.05, 0.75, Controls_GetCvarValue( "joy_threshold" ) ); +;4020: //s_controls.freelook.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "cl_freelook" ) ); +;4021:} +LABELV $1794 +endproc Controls_GetConfig 12 8 +export Controls_SetConfig +proc Controls_SetConfig 12 8 +line 4029 +;4022: +;4023:/* +;4024:================= +;4025:Controls_SetConfig +;4026:================= +;4027:*/ +;4028:void Controls_SetConfig(qboolean restart) +;4029:{ +line 4033 +;4030: int i; +;4031: +;4032: // iterate each command, get its numeric binding +;4033: for (i=0; i < g_bindCount; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1806 +JUMPV +LABELV $1803 +line 4034 +;4034: { +line 4035 +;4035: if (g_bindings[i].bind1 != -1) +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $1807 +line 4036 +;4036: { +line 4037 +;4037: DC->setBinding( g_bindings[i].bind1, g_bindings[i].command ); +ADDRLP4 4 +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 g_bindings+16 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 g_bindings +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRP4 +CALLV +pop +line 4039 +;4038: +;4039: if (g_bindings[i].bind2 != -1) +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $1811 +line 4040 +;4040: DC->setBinding( g_bindings[i].bind2, g_bindings[i].command ); +ADDRLP4 8 +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ADDRGP4 g_bindings+20 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ADDRGP4 g_bindings +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRP4 +CALLV +pop +LABELV $1811 +line 4041 +;4041: } +LABELV $1807 +line 4042 +;4042: } +LABELV $1804 +line 4033 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1806 +ADDRLP4 0 +INDIRI4 +ADDRGP4 g_bindCount +INDIRI4 +LTI4 $1803 +line 4059 +;4043: +;4044: //if ( s_controls.invertmouse.curvalue ) +;4045: // DC->setCVar("m_pitch", va("%f),-fabs( DC->getCVarValue( "m_pitch" ) ) ); +;4046: //else +;4047: // trap_Cvar_SetValue( "m_pitch", fabs( trap_Cvar_VariableValue( "m_pitch" ) ) ); +;4048: +;4049: //trap_Cvar_SetValue( "m_filter", s_controls.smoothmouse.curvalue ); +;4050: //trap_Cvar_SetValue( "cl_run", s_controls.alwaysrun.curvalue ); +;4051: //trap_Cvar_SetValue( "cg_autoswitch", s_controls.autoswitch.curvalue ); +;4052: //trap_Cvar_SetValue( "sensitivity", s_controls.sensitivity.curvalue ); +;4053: //trap_Cvar_SetValue( "in_joystick", s_controls.joyenable.curvalue ); +;4054: //trap_Cvar_SetValue( "joy_threshold", s_controls.joythreshold.curvalue ); +;4055: //trap_Cvar_SetValue( "cl_freelook", s_controls.freelook.curvalue ); +;4056:// +;4057:// DC->executeText(EXEC_APPEND, "in_restart\n"); +;4058:// ^--this is bad, it shows the cursor during map load, if you need to, add it as an exec cmd to use_joy or something. +;4059:} +LABELV $1802 +endproc Controls_SetConfig 12 8 +export BindingIDFromName +proc BindingIDFromName 8 8 +line 4062 +;4060: +;4061: +;4062:int BindingIDFromName(const char *name) { +line 4064 +;4063: int i; +;4064: for (i=0; i < g_bindCount; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1819 +JUMPV +LABELV $1816 +line 4065 +;4065: { +line 4066 +;4066: if (Q_stricmp(name, g_bindings[i].command) == 0) { +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $1820 +line 4067 +;4067: return i; +ADDRLP4 0 +INDIRI4 +RETI4 +ADDRGP4 $1815 +JUMPV +LABELV $1820 +line 4069 +;4068: } +;4069: } +LABELV $1817 +line 4064 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1819 +ADDRLP4 0 +INDIRI4 +ADDRGP4 g_bindCount +INDIRI4 +LTI4 $1816 +line 4070 +;4070: return -1; +CNSTI4 -1 +RETI4 +LABELV $1815 +endproc BindingIDFromName 8 8 +export BindingFromName +proc BindingFromName 52 12 +line 4076 +;4071:} +;4072: +;4073:char g_nameBind1[32]; +;4074:char g_nameBind2[32]; +;4075: +;4076:void BindingFromName(const char *cvar) { +line 4082 +;4077: int i, b1, b2; +;4078: char sOR[32]; +;4079: +;4080: +;4081: // iterate each command, set its default binding +;4082: for (i=0; i < g_bindCount; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1826 +JUMPV +LABELV $1823 +line 4083 +;4083: { +line 4084 +;4084: if (Q_stricmp(cvar, g_bindings[i].command) == 0) { +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 44 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +NEI4 $1827 +line 4085 +;4085: b1 = g_bindings[i].bind1; +ADDRLP4 4 +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +INDIRI4 +ASGNI4 +line 4086 +;4086: if (b1 == -1) { +ADDRLP4 4 +INDIRI4 +CNSTI4 -1 +NEI4 $1830 +line 4087 +;4087: break; +ADDRGP4 $1825 +JUMPV +LABELV $1830 +line 4089 +;4088: } +;4089: DC->keynumToStringBuf( b1, g_nameBind1, 32 ); +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRGP4 g_nameBind1 +ARGP4 +CNSTI4 32 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRP4 +CALLV +pop +line 4090 +;4090: Q_strupr(g_nameBind1); +ADDRGP4 g_nameBind1 +ARGP4 +ADDRGP4 Q_strupr +CALLP4 +pop +line 4092 +;4091: +;4092: b2 = g_bindings[i].bind2; +ADDRLP4 8 +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +INDIRI4 +ASGNI4 +line 4093 +;4093: if (b2 != -1) +ADDRLP4 8 +INDIRI4 +CNSTI4 -1 +EQI4 $1822 +line 4094 +;4094: { +line 4095 +;4095: DC->keynumToStringBuf( b2, g_nameBind2, 32 ); +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRGP4 g_nameBind2 +ARGP4 +CNSTI4 32 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 168 +ADDP4 +INDIRP4 +CALLV +pop +line 4096 +;4096: Q_strupr(g_nameBind2); +ADDRGP4 g_nameBind2 +ARGP4 +ADDRGP4 Q_strupr +CALLP4 +pop +line 4098 +;4097: +;4098: trap_SP_GetStringTextString("MENUS3_KEYBIND_OR",sOR, sizeof(sOR)); +ADDRGP4 $1835 +ARGP4 +ADDRLP4 12 +ARGP4 +CNSTI4 32 +ARGI4 +ADDRGP4 trap_SP_GetStringTextString +CALLI4 +pop +line 4100 +;4099: +;4100: strcat( g_nameBind1, va(" %s ",sOR)); +ADDRGP4 $1836 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 48 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRGP4 g_nameBind1 +ARGP4 +ADDRLP4 48 +INDIRP4 +ARGP4 +ADDRGP4 strcat +CALLP4 +pop +line 4101 +;4101: strcat( g_nameBind1, g_nameBind2 ); +ADDRGP4 g_nameBind1 +ARGP4 +ADDRGP4 g_nameBind2 +ARGP4 +ADDRGP4 strcat +CALLP4 +pop +line 4102 +;4102: } +line 4103 +;4103: return; +ADDRGP4 $1822 +JUMPV +LABELV $1827 +line 4105 +;4104: } +;4105: } +LABELV $1824 +line 4082 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1826 +ADDRLP4 0 +INDIRI4 +ADDRGP4 g_bindCount +INDIRI4 +LTI4 $1823 +LABELV $1825 +line 4106 +;4106: strcpy(g_nameBind1, "???"); +ADDRGP4 g_nameBind1 +ARGP4 +ADDRGP4 $1837 +ARGP4 +ADDRGP4 strcpy +CALLP4 +pop +line 4107 +;4107:} +LABELV $1822 +endproc BindingFromName 52 12 +export Item_Slider_Paint +proc Item_Slider_Paint 68 20 +line 4109 +;4108: +;4109:void Item_Slider_Paint(itemDef_t *item) { +line 4112 +;4110: vec4_t newColor, lowLight; +;4111: float x, y, value; +;4112: menuDef_t *parent = (menuDef_t*)item->parent; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 4114 +;4113: +;4114: value = (item->cvar) ? DC->getCVarValue(item->cvar) : 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1840 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 52 +ADDRGP4 DC +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRP4 +CALLF4 +ASGNF4 +ADDRLP4 48 +ADDRLP4 52 +INDIRF4 +ASGNF4 +ADDRGP4 $1841 +JUMPV +LABELV $1840 +ADDRLP4 48 +CNSTF4 0 +ASGNF4 +LABELV $1841 +ADDRLP4 44 +ADDRLP4 48 +INDIRF4 +ASGNF4 +line 4116 +;4115: +;4116: if (item->window.flags & WINDOW_HASFOCUS) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1842 +line 4117 +;4117: lowLight[0] = 0.8 * parent->focusColor[0]; +ADDRLP4 12 +CNSTF4 1061997773 +ADDRLP4 4 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4118 +;4118: lowLight[1] = 0.8 * parent->focusColor[1]; +ADDRLP4 12+4 +CNSTF4 1061997773 +ADDRLP4 4 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4119 +;4119: lowLight[2] = 0.8 * parent->focusColor[2]; +ADDRLP4 12+8 +CNSTF4 1061997773 +ADDRLP4 4 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4120 +;4120: lowLight[3] = 0.8 * parent->focusColor[3]; +ADDRLP4 12+12 +CNSTF4 1061997773 +ADDRLP4 4 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4121 +;4121: LerpColor(parent->focusColor,lowLight,newColor,0.5+0.5*sin(DC->realTime / PULSE_DIVISOR)); +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 75 +DIVI4 +CVIF4 4 +ARGF4 +ADDRLP4 56 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 228 +ADDP4 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 28 +ARGP4 +CNSTF4 1056964608 +ADDRLP4 56 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ARGF4 +ADDRGP4 LerpColor +CALLV +pop +line 4122 +;4122: } else { +ADDRGP4 $1843 +JUMPV +LABELV $1842 +line 4123 +;4123: memcpy(&newColor, &item->window.foreColor, sizeof(vec4_t)); +ADDRLP4 28 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 4124 +;4124: } +LABELV $1843 +line 4126 +;4125: +;4126: y = item->window.rect.y; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ASGNF4 +line 4127 +;4127: if (item->text) { +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1847 +line 4128 +;4128: Item_Text_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Text_Paint +CALLV +pop +line 4129 +;4129: x = item->textRect.x + item->textRect.w + 8; +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 56 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1090519040 +ADDF4 +ASGNF4 +line 4130 +;4130: } else { +ADDRGP4 $1848 +JUMPV +LABELV $1847 +line 4131 +;4131: x = item->window.rect.x; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +INDIRF4 +ASGNF4 +line 4132 +;4132: } +LABELV $1848 +line 4133 +;4133: DC->setColor(newColor); +ADDRLP4 28 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 4134 +;4134: DC->drawHandlePic( x, y, SLIDER_WIDTH, SLIDER_HEIGHT, DC->Assets.sliderBar ); +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +ARGF4 +CNSTF4 1119879168 +ARGF4 +CNSTF4 1098907648 +ARGF4 +ADDRLP4 56 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 328 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 56 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4136 +;4135: +;4136: x = Item_Slider_ThumbPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 60 +ADDRGP4 Item_Slider_ThumbPosition +CALLF4 +ASGNF4 +ADDRLP4 0 +ADDRLP4 60 +INDIRF4 +ASGNF4 +line 4137 +;4137: DC->drawHandlePic( x - (SLIDER_THUMB_WIDTH / 2), y - 2, SLIDER_THUMB_WIDTH, SLIDER_THUMB_HEIGHT, DC->Assets.sliderThumb ); +ADDRLP4 0 +INDIRF4 +CNSTF4 1086324736 +SUBF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +CNSTF4 1073741824 +SUBF4 +ARGF4 +CNSTF4 1094713344 +ARGF4 +CNSTF4 1101004800 +ARGF4 +ADDRLP4 64 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 332 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4139 +;4138: +;4139:} +LABELV $1838 +endproc Item_Slider_Paint 68 20 +export Item_Bind_Paint +proc Item_Bind_Paint 96 36 +line 4142 +;4140: +;4141:void Item_Bind_Paint(itemDef_t *item) +;4142:{ +line 4145 +;4143: vec4_t newColor, lowLight; +;4144: float value; +;4145: int maxChars = 0; +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +line 4150 +;4146: float textScale,textWidth; +;4147: int textHeight,yAdj,startingXPos; +;4148: +;4149: +;4150: menuDef_t *parent = (menuDef_t*)item->parent; +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 4151 +;4151: editFieldDef_t *editPtr = (editFieldDef_t*)item->typeData; +ADDRLP4 36 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 4152 +;4152: if (editPtr) +ADDRLP4 36 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1850 +line 4153 +;4153: { +line 4154 +;4154: maxChars = editPtr->maxPaintChars; +ADDRLP4 28 +ADDRLP4 36 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +ASGNI4 +line 4155 +;4155: } +LABELV $1850 +line 4157 +;4156: +;4157: value = (item->cvar) ? DC->getCVarValue(item->cvar) : 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1853 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 72 +ADDRGP4 DC +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRP4 +CALLF4 +ASGNF4 +ADDRLP4 68 +ADDRLP4 72 +INDIRF4 +ASGNF4 +ADDRGP4 $1854 +JUMPV +LABELV $1853 +ADDRLP4 68 +CNSTF4 0 +ASGNF4 +LABELV $1854 +ADDRLP4 56 +ADDRLP4 68 +INDIRF4 +ASGNF4 +line 4159 +;4158: +;4159: if (item->window.flags & WINDOW_HASFOCUS) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $1855 +line 4160 +;4160: { +line 4161 +;4161: if (g_bindItem == item) +ADDRGP4 g_bindItem +INDIRP4 +CVPU4 4 +ADDRFP4 0 +INDIRP4 +CVPU4 4 +NEU4 $1857 +line 4162 +;4162: { +line 4163 +;4163: lowLight[0] = 0.8f * 1.0f; +ADDRLP4 12 +CNSTF4 1061997773 +ASGNF4 +line 4164 +;4164: lowLight[1] = 0.8f * 0.0f; +ADDRLP4 12+4 +CNSTF4 0 +ASGNF4 +line 4165 +;4165: lowLight[2] = 0.8f * 0.0f; +ADDRLP4 12+8 +CNSTF4 0 +ASGNF4 +line 4166 +;4166: lowLight[3] = 0.8f * 1.0f; +ADDRLP4 12+12 +CNSTF4 1061997773 +ASGNF4 +line 4167 +;4167: } +ADDRGP4 $1858 +JUMPV +LABELV $1857 +line 4169 +;4168: else +;4169: { +line 4170 +;4170: lowLight[0] = 0.8f * parent->focusColor[0]; +ADDRLP4 12 +CNSTF4 1061997773 +ADDRLP4 32 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4171 +;4171: lowLight[1] = 0.8f * parent->focusColor[1]; +ADDRLP4 12+4 +CNSTF4 1061997773 +ADDRLP4 32 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4172 +;4172: lowLight[2] = 0.8f * parent->focusColor[2]; +ADDRLP4 12+8 +CNSTF4 1061997773 +ADDRLP4 32 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4173 +;4173: lowLight[3] = 0.8f * parent->focusColor[3]; +ADDRLP4 12+12 +CNSTF4 1061997773 +ADDRLP4 32 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4174 +;4174: } +LABELV $1858 +line 4175 +;4175: LerpColor(parent->focusColor,lowLight,newColor,0.5+0.5*sin(DC->realTime / PULSE_DIVISOR)); +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 75 +DIVI4 +CVIF4 4 +ARGF4 +ADDRLP4 76 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 32 +INDIRP4 +CNSTI4 228 +ADDP4 +ARGP4 +ADDRLP4 12 +ARGP4 +ADDRLP4 40 +ARGP4 +CNSTF4 1056964608 +ADDRLP4 76 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ARGF4 +ADDRGP4 LerpColor +CALLV +pop +line 4176 +;4176: } +ADDRGP4 $1856 +JUMPV +LABELV $1855 +line 4178 +;4177: else +;4178: { +line 4179 +;4179: memcpy(&newColor, &item->window.foreColor, sizeof(vec4_t)); +ADDRLP4 40 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 4180 +;4180: } +LABELV $1856 +line 4182 +;4181: +;4182: if (item->text) +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $1865 +line 4183 +;4183: { +line 4184 +;4184: Item_Text_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Text_Paint +CALLV +pop +line 4185 +;4185: BindingFromName(item->cvar); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 BindingFromName +CALLV +pop +line 4188 +;4186: +;4187: // If the text runs past the limit bring the scale down until it fits. +;4188: textScale = item->textscale; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ASGNF4 +line 4189 +;4189: textWidth = DC->textWidth(g_nameBind1,(float) textScale, item->iMenuFont); +ADDRGP4 g_nameBind1 +ARGP4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 76 +ADDRGP4 DC +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 76 +INDIRI4 +CVIF4 4 +ASGNF4 +line 4190 +;4190: startingXPos = (item->textRect.x + item->textRect.w + 8); +ADDRLP4 80 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 80 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 80 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1090519040 +ADDF4 +CVFI4 4 +ASGNI4 +ADDRGP4 $1868 +JUMPV +LABELV $1867 +line 4193 +;4191: +;4192: while ((startingXPos + textWidth) >= SCREEN_WIDTH) +;4193: { +line 4194 +;4194: textScale -= .05f; +ADDRLP4 0 +ADDRLP4 0 +INDIRF4 +CNSTF4 1028443341 +SUBF4 +ASGNF4 +line 4195 +;4195: textWidth = DC->textWidth(g_nameBind1,(float) textScale, item->iMenuFont); +ADDRGP4 g_nameBind1 +ARGP4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 84 +ADDRGP4 DC +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 84 +INDIRI4 +CVIF4 4 +ASGNF4 +line 4196 +;4196: } +LABELV $1868 +line 4192 +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ADDRLP4 4 +INDIRF4 +ADDF4 +CNSTF4 1142947840 +GEF4 $1867 +line 4199 +;4197: +;4198: // Try to adjust it's y placement if the scale has changed. +;4199: yAdj = 0; +ADDRLP4 60 +CNSTI4 0 +ASGNI4 +line 4200 +;4200: if (textScale != item->textscale) +ADDRLP4 0 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +EQF4 $1870 +line 4201 +;4201: { +line 4202 +;4202: textHeight = DC->textHeight(g_nameBind1, item->textscale, item->iMenuFont); +ADDRGP4 g_nameBind1 +ARGP4 +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 84 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 88 +ADDRGP4 DC +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 64 +ADDRLP4 88 +INDIRI4 +ASGNI4 +line 4203 +;4203: yAdj = textHeight - DC->textHeight(g_nameBind1, textScale, item->iMenuFont); +ADDRGP4 g_nameBind1 +ARGP4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 92 +ADDRGP4 DC +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 60 +ADDRLP4 64 +INDIRI4 +ADDRLP4 92 +INDIRI4 +SUBI4 +ASGNI4 +line 4204 +;4204: } +LABELV $1870 +line 4206 +;4205: +;4206: DC->drawText(startingXPos, item->textRect.y + yAdj, textScale, newColor, g_nameBind1, 0, maxChars, item->textStyle,item->iMenuFont); +ADDRLP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRI4 +CVIF4 4 +ADDF4 +ARGF4 +ADDRLP4 0 +INDIRF4 +ARGF4 +ADDRLP4 40 +ARGP4 +ADDRGP4 g_nameBind1 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRLP4 84 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 84 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 4207 +;4207: } +ADDRGP4 $1866 +JUMPV +LABELV $1865 +line 4209 +;4208: else +;4209: { +line 4210 +;4210: DC->drawText(item->textRect.x, item->textRect.y, item->textscale, newColor, (value != 0) ? "FIXME" : "FIXME", 0, maxChars, item->textStyle,item->iMenuFont); +ADDRLP4 80 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +ARGP4 +ADDRLP4 56 +INDIRF4 +CNSTF4 0 +EQF4 $1874 +ADDRLP4 76 +ADDRGP4 $1872 +ASGNP4 +ADDRGP4 $1875 +JUMPV +LABELV $1874 +ADDRLP4 76 +ADDRGP4 $1872 +ASGNP4 +LABELV $1875 +ADDRLP4 76 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 84 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 4211 +;4211: } +LABELV $1866 +line 4212 +;4212:} +LABELV $1849 +endproc Item_Bind_Paint 96 36 +export Display_KeyBindPending +proc Display_KeyBindPending 0 0 +line 4214 +;4213: +;4214:qboolean Display_KeyBindPending() { +line 4215 +;4215: return g_waitingForKey; +ADDRGP4 g_waitingForKey +INDIRI4 +RETI4 +LABELV $1876 +endproc Display_KeyBindPending 0 0 +export Item_Bind_HandleKey +proc Item_Bind_HandleKey 32 12 +line 4218 +;4216:} +;4217: +;4218:qboolean Item_Bind_HandleKey(itemDef_t *item, int key, qboolean down) { +line 4222 +;4219: int id; +;4220: int i; +;4221: +;4222: if (key == A_MOUSE1 && Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory) && !g_waitingForKey) +ADDRFP4 4 +INDIRI4 +CNSTI4 141 +NEI4 $1878 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 8 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 12 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $1878 +ADDRGP4 g_waitingForKey +INDIRI4 +ADDRLP4 16 +INDIRI4 +NEI4 $1878 +line 4223 +;4223: { +line 4224 +;4224: if (down) { +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $1880 +line 4225 +;4225: g_waitingForKey = qtrue; +ADDRGP4 g_waitingForKey +CNSTI4 1 +ASGNI4 +line 4226 +;4226: g_bindItem = item; +ADDRGP4 g_bindItem +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 4227 +;4227: } +LABELV $1880 +line 4228 +;4228: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1877 +JUMPV +LABELV $1878 +line 4230 +;4229: } +;4230: else if (key == A_ENTER && !g_waitingForKey) +ADDRFP4 4 +INDIRI4 +CNSTI4 10 +NEI4 $1882 +ADDRGP4 g_waitingForKey +INDIRI4 +CNSTI4 0 +NEI4 $1882 +line 4231 +;4231: { +line 4232 +;4232: if (down) +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $1884 +line 4233 +;4233: { +line 4234 +;4234: g_waitingForKey = qtrue; +ADDRGP4 g_waitingForKey +CNSTI4 1 +ASGNI4 +line 4235 +;4235: g_bindItem = item; +ADDRGP4 g_bindItem +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 4236 +;4236: } +LABELV $1884 +line 4237 +;4237: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1877 +JUMPV +LABELV $1882 +line 4240 +;4238: } +;4239: else +;4240: { +line 4241 +;4241: if (!g_waitingForKey || g_bindItem == NULL) { +ADDRGP4 g_waitingForKey +INDIRI4 +CNSTI4 0 +EQI4 $1888 +ADDRGP4 g_bindItem +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1886 +LABELV $1888 +line 4242 +;4242: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $1877 +JUMPV +LABELV $1886 +line 4245 +;4243: } +;4244: +;4245: if (key & K_CHAR_FLAG) { +ADDRFP4 4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $1889 +line 4246 +;4246: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1877 +JUMPV +LABELV $1889 +line 4249 +;4247: } +;4248: +;4249: switch (key) +ADDRLP4 20 +ADDRFP4 4 +INDIRI4 +ASGNI4 +ADDRLP4 24 +CNSTI4 27 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ADDRLP4 24 +INDIRI4 +EQI4 $1893 +ADDRLP4 20 +INDIRI4 +ADDRLP4 24 +INDIRI4 +GTI4 $1909 +LABELV $1908 +ADDRFP4 4 +INDIRI4 +CNSTI4 8 +EQI4 $1894 +ADDRGP4 $1891 +JUMPV +LABELV $1909 +ADDRFP4 4 +INDIRI4 +CNSTI4 96 +EQI4 $1907 +ADDRGP4 $1891 +JUMPV +line 4250 +;4250: { +LABELV $1893 +line 4252 +;4251: case A_ESCAPE: +;4252: g_waitingForKey = qfalse; +ADDRGP4 g_waitingForKey +CNSTI4 0 +ASGNI4 +line 4253 +;4253: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1877 +JUMPV +LABELV $1894 +line 4256 +;4254: +;4255: case A_BACKSPACE: +;4256: id = BindingIDFromName(item->cvar); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 28 +ADDRGP4 BindingIDFromName +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 28 +INDIRI4 +ASGNI4 +line 4257 +;4257: if (id != -1) +ADDRLP4 4 +INDIRI4 +CNSTI4 -1 +EQI4 $1895 +line 4258 +;4258: { +line 4259 +;4259: if ( g_bindings[id].bind1 != -1 ) +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $1897 +line 4260 +;4260: { +line 4261 +;4261: DC->setBinding ( g_bindings[id].bind1, "" ); +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 $99 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRP4 +CALLV +pop +line 4262 +;4262: } +LABELV $1897 +line 4264 +;4263: +;4264: if ( g_bindings[id].bind2 != -1 ) +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $1901 +line 4265 +;4265: { +line 4266 +;4266: DC->setBinding ( g_bindings[id].bind2, "" ); +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 $99 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRP4 +CALLV +pop +line 4267 +;4267: } +LABELV $1901 +line 4269 +;4268: +;4269: g_bindings[id].bind1 = -1; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 4270 +;4270: g_bindings[id].bind2 = -1; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 4271 +;4271: } +LABELV $1895 +line 4272 +;4272: Controls_SetConfig(qtrue); +CNSTI4 1 +ARGI4 +ADDRGP4 Controls_SetConfig +CALLV +pop +line 4273 +;4273: g_waitingForKey = qfalse; +ADDRGP4 g_waitingForKey +CNSTI4 0 +ASGNI4 +line 4274 +;4274: g_bindItem = NULL; +ADDRGP4 g_bindItem +CNSTP4 0 +ASGNP4 +line 4275 +;4275: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1877 +JUMPV +LABELV $1907 +line 4278 +;4276: +;4277: case '`': +;4278: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $1877 +JUMPV +LABELV $1891 +line 4280 +;4279: } +;4280: } +line 4282 +;4281: +;4282: if (key != -1) +ADDRFP4 4 +INDIRI4 +CNSTI4 -1 +EQI4 $1910 +line 4283 +;4283: { +line 4285 +;4284: +;4285: for (i=0; i < g_bindCount; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $1915 +JUMPV +LABELV $1912 +line 4286 +;4286: { +line 4288 +;4287: +;4288: if (g_bindings[i].bind2 == key) { +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +NEI4 $1916 +line 4289 +;4289: g_bindings[i].bind2 = -1; +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 4290 +;4290: } +LABELV $1916 +line 4292 +;4291: +;4292: if (g_bindings[i].bind1 == key) +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +NEI4 $1920 +line 4293 +;4293: { +line 4294 +;4294: g_bindings[i].bind1 = g_bindings[i].bind2; +ADDRLP4 20 +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +ADDRGP4 g_bindings+16 +ADDP4 +ADDRLP4 20 +INDIRI4 +ADDRGP4 g_bindings+20 +ADDP4 +INDIRI4 +ASGNI4 +line 4295 +;4295: g_bindings[i].bind2 = -1; +CNSTI4 24 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 4296 +;4296: } +LABELV $1920 +line 4297 +;4297: } +LABELV $1913 +line 4285 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $1915 +ADDRLP4 0 +INDIRI4 +ADDRGP4 g_bindCount +INDIRI4 +LTI4 $1912 +line 4298 +;4298: } +LABELV $1910 +line 4301 +;4299: +;4300: +;4301: id = BindingIDFromName(item->cvar); +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 BindingIDFromName +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 4303 +;4302: +;4303: if (id != -1) { +ADDRLP4 4 +INDIRI4 +CNSTI4 -1 +EQI4 $1926 +line 4304 +;4304: if (key == -1) { +ADDRFP4 4 +INDIRI4 +CNSTI4 -1 +NEI4 $1928 +line 4305 +;4305: if( g_bindings[id].bind1 != -1 ) { +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $1930 +line 4306 +;4306: DC->setBinding( g_bindings[id].bind1, "" ); +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 $99 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRP4 +CALLV +pop +line 4307 +;4307: g_bindings[id].bind1 = -1; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 4308 +;4308: } +LABELV $1930 +line 4309 +;4309: if( g_bindings[id].bind2 != -1 ) { +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +INDIRI4 +CNSTI4 -1 +EQI4 $1929 +line 4310 +;4310: DC->setBinding( g_bindings[id].bind2, "" ); +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 $99 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRP4 +CALLV +pop +line 4311 +;4311: g_bindings[id].bind2 = -1; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 4312 +;4312: } +line 4313 +;4313: } +ADDRGP4 $1929 +JUMPV +LABELV $1928 +line 4314 +;4314: else if (g_bindings[id].bind1 == -1) { +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +INDIRI4 +CNSTI4 -1 +NEI4 $1940 +line 4315 +;4315: g_bindings[id].bind1 = key; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 4316 +;4316: } +ADDRGP4 $1941 +JUMPV +LABELV $1940 +line 4317 +;4317: else if (g_bindings[id].bind1 != key && g_bindings[id].bind2 == -1) { +ADDRLP4 24 +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +ADDRGP4 g_bindings+16 +ADDP4 +INDIRI4 +ADDRFP4 4 +INDIRI4 +EQI4 $1944 +ADDRLP4 24 +INDIRI4 +ADDRGP4 g_bindings+20 +ADDP4 +INDIRI4 +CNSTI4 -1 +NEI4 $1944 +line 4318 +;4318: g_bindings[id].bind2 = key; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 4319 +;4319: } +ADDRGP4 $1945 +JUMPV +LABELV $1944 +line 4320 +;4320: else { +line 4321 +;4321: DC->setBinding( g_bindings[id].bind1, "" ); +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 $99 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRP4 +CALLV +pop +line 4322 +;4322: DC->setBinding( g_bindings[id].bind2, "" ); +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 $99 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRP4 +CALLV +pop +line 4323 +;4323: g_bindings[id].bind1 = key; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+16 +ADDP4 +ADDRFP4 4 +INDIRI4 +ASGNI4 +line 4324 +;4324: g_bindings[id].bind2 = -1; +CNSTI4 24 +ADDRLP4 4 +INDIRI4 +MULI4 +ADDRGP4 g_bindings+20 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 4325 +;4325: } +LABELV $1945 +LABELV $1941 +LABELV $1929 +line 4326 +;4326: } +LABELV $1926 +line 4328 +;4327: +;4328: Controls_SetConfig(qtrue); +CNSTI4 1 +ARGI4 +ADDRGP4 Controls_SetConfig +CALLV +pop +line 4329 +;4329: g_waitingForKey = qfalse; +ADDRGP4 g_waitingForKey +CNSTI4 0 +ASGNI4 +line 4331 +;4330: +;4331: return qtrue; +CNSTI4 1 +RETI4 +LABELV $1877 +endproc Item_Bind_HandleKey 32 12 +export Item_Model_Paint +proc Item_Model_Paint 656 12 +line 4335 +;4332:} +;4333: +;4334:void Item_Model_Paint(itemDef_t *item) +;4335:{ +line 4341 +;4336: float x, y, w, h; +;4337: refdef_t refdef; +;4338: refEntity_t ent; +;4339: vec3_t mins, maxs, origin; +;4340: vec3_t angles; +;4341: modelDef_t *modelPtr = (modelDef_t*)item->typeData; +ADDRLP4 580 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 4343 +;4342: +;4343: if (modelPtr == NULL) +ADDRLP4 580 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1954 +line 4344 +;4344: { +line 4345 +;4345: return; +ADDRGP4 $1953 +JUMPV +LABELV $1954 +line 4349 +;4346: } +;4347: +;4348: // setup the refdef +;4349: memset( &refdef, 0, sizeof( refdef ) ); +ADDRLP4 0 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 368 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 4350 +;4350: refdef.rdflags = RDF_NOWORLDMODEL; +ADDRLP4 0+76 +CNSTI4 1 +ASGNI4 +line 4351 +;4351: AxisClear( refdef.viewaxis ); +ADDRLP4 0+36 +ARGP4 +ADDRGP4 AxisClear +CALLV +pop +line 4352 +;4352: x = item->window.rect.x+1; +ADDRLP4 640 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4353 +;4353: y = item->window.rect.y+1; +ADDRLP4 644 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4354 +;4354: w = item->window.rect.w-2; +ADDRLP4 632 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 4355 +;4355: h = item->window.rect.h-2; +ADDRLP4 636 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 4357 +;4356: +;4357: refdef.x = x * DC->xscale; +ADDRLP4 0 +ADDRLP4 640 +INDIRF4 +ADDRGP4 DC +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 4358 +;4358: refdef.y = y * DC->yscale; +ADDRLP4 0+4 +ADDRLP4 644 +INDIRF4 +ADDRGP4 DC +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 4359 +;4359: refdef.width = w * DC->xscale; +ADDRLP4 0+8 +ADDRLP4 632 +INDIRF4 +ADDRGP4 DC +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 4360 +;4360: refdef.height = h * DC->yscale; +ADDRLP4 0+12 +ADDRLP4 636 +INDIRF4 +ADDRGP4 DC +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRF4 +MULF4 +CVFI4 4 +ASGNI4 +line 4362 +;4361: +;4362: DC->modelBounds( item->asset, mins, maxs ); +ADDRFP4 0 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 608 +ARGP4 +ADDRLP4 620 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRP4 +CALLV +pop +line 4364 +;4363: +;4364: origin[2] = -0.5 * ( mins[2] + maxs[2] ); +ADDRLP4 584+8 +CNSTF4 3204448256 +ADDRLP4 608+8 +INDIRF4 +ADDRLP4 620+8 +INDIRF4 +ADDF4 +MULF4 +ASGNF4 +line 4365 +;4365: origin[1] = 0.5 * ( mins[1] + maxs[1] ); +ADDRLP4 584+4 +CNSTF4 1056964608 +ADDRLP4 608+4 +INDIRF4 +ADDRLP4 620+4 +INDIRF4 +ADDF4 +MULF4 +ASGNF4 +line 4368 +;4366: +;4367: // calculate distance so the model nearly fills the box +;4368: if (qtrue) +line 4369 +;4369: { +line 4370 +;4370: float len = 0.5 * ( maxs[2] - mins[2] ); +ADDRLP4 648 +CNSTF4 1056964608 +ADDRLP4 620+8 +INDIRF4 +ADDRLP4 608+8 +INDIRF4 +SUBF4 +MULF4 +ASGNF4 +line 4371 +;4371: origin[0] = len / 0.268; // len / tan( fov/2 ) +ADDRLP4 584 +ADDRLP4 648 +INDIRF4 +CNSTF4 1049179980 +DIVF4 +ASGNF4 +line 4373 +;4372: //origin[0] = len / tan(w/2); +;4373: } +ADDRGP4 $1968 +JUMPV +LABELV $1967 +line 4375 +;4374: else +;4375: { +line 4376 +;4376: origin[0] = item->textscale; +ADDRLP4 584 +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ASGNF4 +line 4377 +;4377: } +LABELV $1968 +line 4378 +;4378: refdef.fov_x = (modelPtr->fov_x) ? modelPtr->fov_x : w; +ADDRLP4 580 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $1973 +ADDRLP4 648 +ADDRLP4 580 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ASGNF4 +ADDRGP4 $1974 +JUMPV +LABELV $1973 +ADDRLP4 648 +ADDRLP4 632 +INDIRF4 +ASGNF4 +LABELV $1974 +ADDRLP4 0+16 +ADDRLP4 648 +INDIRF4 +ASGNF4 +line 4379 +;4379: refdef.fov_y = (modelPtr->fov_y) ? modelPtr->fov_y : h; +ADDRLP4 580 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $1977 +ADDRLP4 652 +ADDRLP4 580 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ASGNF4 +ADDRGP4 $1978 +JUMPV +LABELV $1977 +ADDRLP4 652 +ADDRLP4 636 +INDIRF4 +ASGNF4 +LABELV $1978 +ADDRLP4 0+20 +ADDRLP4 652 +INDIRF4 +ASGNF4 +line 4381 +;4380: +;4381: refdef.fov_x = 45; +ADDRLP4 0+16 +CNSTF4 1110704128 +ASGNF4 +line 4382 +;4382: refdef.fov_y = 45; +ADDRLP4 0+20 +CNSTF4 1110704128 +ASGNF4 +line 4389 +;4383: +;4384: //refdef.fov_x = (int)((float)refdef.width / 640.0f * 90.0f); +;4385: //xx = refdef.width / tan( refdef.fov_x / 360 * M_PI ); +;4386: //refdef.fov_y = atan2( refdef.height, xx ); +;4387: //refdef.fov_y *= ( 360 / M_PI ); +;4388: +;4389: DC->clearScene(); +ADDRGP4 DC +INDIRP4 +CNSTI4 52 +ADDP4 +INDIRP4 +CALLV +pop +line 4391 +;4390: +;4391: refdef.time = DC->realTime; +ADDRLP4 0+72 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ASGNI4 +line 4395 +;4392: +;4393: // add the model +;4394: +;4395: memset( &ent, 0, sizeof(ent) ); +ADDRLP4 368 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 212 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 4412 +;4396: +;4397: //adjust = 5.0 * sin( (float)uis.realtime / 500 ); +;4398: //adjust = 360 % (int)((float)uis.realtime / 1000); +;4399: //VectorSet( angles, 0, 0, 1 ); +;4400: +;4401: // use item storage to track +;4402:/* if (modelPtr->rotationSpeed) +;4403: { +;4404: if (DC->realTime > item->window.nextTime) +;4405: { +;4406: item->window.nextTime = DC->realTime + modelPtr->rotationSpeed; +;4407: modelPtr->angle = (int)(modelPtr->angle + 1) % 360; +;4408: } +;4409: } +;4410: VectorSet( angles, 0, modelPtr->angle, 0 ); +;4411:*/ +;4412: VectorSet( angles, 0, (float)(refdef.time/20.0f), 0); +ADDRLP4 596 +CNSTF4 0 +ASGNF4 +ADDRLP4 596+4 +ADDRLP4 0+72 +INDIRI4 +CVIF4 4 +CNSTF4 1101004800 +DIVF4 +ASGNF4 +ADDRLP4 596+8 +CNSTF4 0 +ASGNF4 +line 4414 +;4413: +;4414: AnglesToAxis( angles, ent.axis ); +ADDRLP4 596 +ARGP4 +ADDRLP4 368+12 +ARGP4 +ADDRGP4 AnglesToAxis +CALLV +pop +line 4416 +;4415: +;4416: ent.hModel = item->asset; +ADDRLP4 368+8 +ADDRFP4 0 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRI4 +ASGNI4 +line 4417 +;4417: VectorCopy( origin, ent.origin ); +ADDRLP4 368+52 +ADDRLP4 584 +INDIRB +ASGNB 12 +line 4418 +;4418: VectorCopy( origin, ent.lightingOrigin ); +ADDRLP4 368+108 +ADDRLP4 584 +INDIRB +ASGNB 12 +line 4419 +;4419: ent.renderfx = RF_LIGHTING_ORIGIN | RF_NOSHADOW; +ADDRLP4 368+4 +CNSTI4 192 +ASGNI4 +line 4420 +;4420: VectorCopy( ent.origin, ent.oldorigin ); +ADDRLP4 368+64 +ADDRLP4 368+52 +INDIRB +ASGNB 12 +line 4422 +;4421: +;4422: DC->addRefEntityToScene( &ent ); +ADDRLP4 368 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRP4 +CALLV +pop +line 4423 +;4423: DC->renderScene( &refdef ); +ADDRLP4 0 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRP4 +CALLV +pop +line 4425 +;4424: +;4425:} +LABELV $1953 +endproc Item_Model_Paint 656 12 +export Item_Image_Paint +proc Item_Image_Paint 16 20 +line 4428 +;4426: +;4427: +;4428:void Item_Image_Paint(itemDef_t *item) { +line 4429 +;4429: if (item == NULL) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $1993 +line 4430 +;4430: return; +ADDRGP4 $1992 +JUMPV +LABELV $1993 +line 4432 +;4431: } +;4432: DC->drawHandlePic(item->window.rect.x+1, item->window.rect.y+1, item->window.rect.w-2, item->window.rect.h-2, item->asset); +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0 +INDIRP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 4 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 8 +CNSTI4 8 +ASGNI4 +ADDRLP4 12 +CNSTF4 1073741824 +ASGNF4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDRLP4 12 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 244 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +ADDRLP4 8 +INDIRI4 +ADDP4 +INDIRP4 +CALLV +pop +line 4433 +;4433:} +LABELV $1992 +endproc Item_Image_Paint 16 20 +export Item_TextScroll_Paint +proc Item_TextScroll_Paint 80 36 +line 4436 +;4434: +;4435:void Item_TextScroll_Paint(itemDef_t *item) +;4436:{ +line 4439 +;4437: float x, y, size, count, thumb; +;4438: int i; +;4439: textScrollDef_t *scrollPtr = (textScrollDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 4441 +;4440: +;4441: count = scrollPtr->iLineCount; +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 4444 +;4442: +;4443: // draw scrollbar to right side of the window +;4444: x = item->window.rect.x + item->window.rect.w - SCROLLBAR_SIZE - 1; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 28 +INDIRP4 +INDIRF4 +ADDRLP4 28 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +ASGNF4 +line 4445 +;4445: y = item->window.rect.y + 1; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4446 +;4446: DC->drawHandlePic(x, y, SCROLLBAR_SIZE, SCROLLBAR_SIZE, DC->Assets.scrollBarArrowUp); +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 32 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 32 +INDIRF4 +ARGF4 +ADDRLP4 32 +INDIRF4 +ARGF4 +ADDRLP4 36 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 36 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4447 +;4447: y += SCROLLBAR_SIZE - 1; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +CNSTF4 1097859072 +ADDF4 +ASGNF4 +line 4449 +;4448: +;4449: scrollPtr->endPos = scrollPtr->startPos; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +line 4450 +;4450: size = item->window.rect.h - (SCROLLBAR_SIZE * 2); +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +ASGNF4 +line 4451 +;4451: DC->drawHandlePic(x, y, SCROLLBAR_SIZE, size+1, DC->Assets.scrollBar); +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +CNSTF4 1098907648 +ARGF4 +ADDRLP4 8 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ARGF4 +ADDRLP4 44 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +CNSTI4 308 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 44 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4452 +;4452: y += size - 1; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +ADDRLP4 8 +INDIRF4 +CNSTF4 1065353216 +SUBF4 +ADDF4 +ASGNF4 +line 4453 +;4453: DC->drawHandlePic(x, y, SCROLLBAR_SIZE, SCROLLBAR_SIZE, DC->Assets.scrollBarArrowDown); +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 48 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 48 +INDIRF4 +ARGF4 +ADDRLP4 48 +INDIRF4 +ARGF4 +ADDRLP4 52 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 296 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 52 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4456 +;4454: +;4455: // thumb +;4456: thumb = Item_TextScroll_ThumbDrawPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 56 +ADDRGP4 Item_TextScroll_ThumbDrawPosition +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 56 +INDIRI4 +CVIF4 4 +ASGNF4 +line 4457 +;4457: if (thumb > y - SCROLLBAR_SIZE - 1) +ADDRLP4 24 +INDIRF4 +ADDRLP4 12 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +LEF4 $1996 +line 4458 +;4458: { +line 4459 +;4459: thumb = y - SCROLLBAR_SIZE - 1; +ADDRLP4 24 +ADDRLP4 12 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +ASGNF4 +line 4460 +;4460: } +LABELV $1996 +line 4461 +;4461: DC->drawHandlePic(x, thumb, SCROLLBAR_SIZE, SCROLLBAR_SIZE, DC->Assets.scrollBarThumb); +ADDRLP4 16 +INDIRF4 +ARGF4 +ADDRLP4 24 +INDIRF4 +ARGF4 +ADDRLP4 60 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 64 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 312 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4464 +;4462: +;4463: // adjust size for item painting +;4464: size = item->window.rect.h - 2; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 4465 +;4465: x = item->window.rect.x + 1; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4466 +;4466: y = item->window.rect.y + 1; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4468 +;4467: +;4468: for (i = scrollPtr->startPos; i < count; i++) +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRGP4 $2001 +JUMPV +LABELV $1998 +line 4469 +;4469: { +line 4472 +;4470: const char *text; +;4471: +;4472: text = scrollPtr->pLines[i]; +ADDRLP4 68 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +line 4473 +;4473: if (!text) +ADDRLP4 68 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2002 +line 4474 +;4474: { +line 4475 +;4475: continue; +ADDRGP4 $1999 +JUMPV +LABELV $2002 +line 4478 +;4476: } +;4477: +;4478: DC->drawText(x + 4, y, item->textscale, item->window.foreColor, text, 0, 0, item->textStyle, item->iMenuFont); +ADDRLP4 16 +INDIRF4 +CNSTF4 1082130432 +ADDF4 +ARGF4 +ADDRLP4 12 +INDIRF4 +ARGF4 +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 72 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +ADDRLP4 68 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 72 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 72 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 4480 +;4479: +;4480: size -= scrollPtr->lineHeight; +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 4481 +;4481: if (size < scrollPtr->lineHeight) +ADDRLP4 8 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +GEF4 $2004 +line 4482 +;4482: { +line 4483 +;4483: scrollPtr->drawPadding = scrollPtr->lineHeight - size; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDRLP4 8 +INDIRF4 +SUBF4 +CVFI4 4 +ASGNI4 +line 4484 +;4484: break; +ADDRGP4 $2000 +JUMPV +LABELV $2004 +line 4487 +;4485: } +;4486: +;4487: scrollPtr->endPos++; +ADDRLP4 76 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 76 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4488 +;4488: y += scrollPtr->lineHeight; +ADDRLP4 12 +ADDRLP4 12 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 4489 +;4489: } +LABELV $1999 +line 4468 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2001 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ADDRLP4 20 +INDIRF4 +LTF4 $1998 +LABELV $2000 +line 4490 +;4490:} +LABELV $1995 +endproc Item_TextScroll_Paint 80 36 +export Item_ListBox_Paint +proc Item_ListBox_Paint 112 36 +line 4492 +;4491: +;4492:void Item_ListBox_Paint(itemDef_t *item) { +line 4496 +;4493: float x, y, size, count, i, thumb; +;4494: qhandle_t image; +;4495: qhandle_t optionalImage1, optionalImage2, optionalImage3; +;4496: listBoxDef_t *listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 4502 +;4497: +;4498: // the listbox is horizontal or vertical and has a fixed size scroll bar going either direction +;4499: // elements are enumerated from the DC and either text or image handles are acquired from the DC as well +;4500: // textscale is used to size the text, textalignx and textaligny are used to size image elements +;4501: // there is no clipping available so only the last completely visible item is painted +;4502: count = DC->feederCount(item->special); +ADDRFP4 0 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 44 +ADDRGP4 DC +INDIRP4 +CNSTI4 152 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 36 +ADDRLP4 44 +INDIRI4 +CVIF4 4 +ASGNF4 +line 4504 +;4503: // default is vertical if horizontal flag is not here +;4504: if (item->window.flags & WINDOW_HORIZONTAL) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1024 +BANDI4 +CNSTI4 0 +EQI4 $2007 +line 4509 +;4505: const char *text; +;4506: +;4507: // draw scrollbar in bottom of the window +;4508: // bar +;4509: x = item->window.rect.x + 1; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4510 +;4510: y = item->window.rect.y + item->window.rect.h - SCROLLBAR_SIZE - 1; +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 52 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 52 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +ASGNF4 +line 4511 +;4511: DC->drawHandlePic(x, y, SCROLLBAR_SIZE, SCROLLBAR_SIZE, DC->Assets.scrollBarArrowLeft); +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 56 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRF4 +ARGF4 +ADDRLP4 60 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 300 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4512 +;4512: x += SCROLLBAR_SIZE - 1; +ADDRLP4 28 +ADDRLP4 28 +INDIRF4 +CNSTF4 1097859072 +ADDF4 +ASGNF4 +line 4513 +;4513: size = item->window.rect.w - (SCROLLBAR_SIZE * 2); +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +ASGNF4 +line 4514 +;4514: DC->drawHandlePic(x, y, size+1, SCROLLBAR_SIZE, DC->Assets.scrollBar); +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 24 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ARGF4 +CNSTF4 1098907648 +ARGF4 +ADDRLP4 64 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 308 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4515 +;4515: x += size - 1; +ADDRLP4 28 +ADDRLP4 28 +INDIRF4 +ADDRLP4 24 +INDIRF4 +CNSTF4 1065353216 +SUBF4 +ADDF4 +ASGNF4 +line 4516 +;4516: DC->drawHandlePic(x, y, SCROLLBAR_SIZE, SCROLLBAR_SIZE, DC->Assets.scrollBarArrowRight); +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 68 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 68 +INDIRF4 +ARGF4 +ADDRLP4 68 +INDIRF4 +ARGF4 +ADDRLP4 72 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 304 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 72 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4518 +;4517: // thumb +;4518: thumb = Item_ListBox_ThumbDrawPosition(item);//Item_ListBox_ThumbPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 76 +ADDRGP4 Item_ListBox_ThumbDrawPosition +CALLI4 +ASGNI4 +ADDRLP4 40 +ADDRLP4 76 +INDIRI4 +CVIF4 4 +ASGNF4 +line 4519 +;4519: if (thumb > x - SCROLLBAR_SIZE - 1) { +ADDRLP4 40 +INDIRF4 +ADDRLP4 28 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +LEF4 $2009 +line 4520 +;4520: thumb = x - SCROLLBAR_SIZE - 1; +ADDRLP4 40 +ADDRLP4 28 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +ASGNF4 +line 4521 +;4521: } +LABELV $2009 +line 4522 +;4522: DC->drawHandlePic(thumb, y, SCROLLBAR_SIZE, SCROLLBAR_SIZE, DC->Assets.scrollBarThumb); +ADDRLP4 40 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 80 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 84 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 312 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 84 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4524 +;4523: // +;4524: listPtr->endPos = listPtr->startPos; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +line 4525 +;4525: size = item->window.rect.w - 2; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 4528 +;4526: // items +;4527: // size contains max available space +;4528: if (listPtr->elementStyle == LISTBOX_IMAGE) { +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $2011 +line 4530 +;4529: // fit = 0; +;4530: x = item->window.rect.x + 1; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4531 +;4531: y = item->window.rect.y + 1; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4532 +;4532: for (i = listPtr->startPos; i < count; i++) { +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRGP4 $2016 +JUMPV +LABELV $2013 +line 4535 +;4533: // always draw at least one +;4534: // which may overdraw the box if it is too small for the element +;4535: image = DC->feederItemImage(item->special, i); +ADDRFP4 0 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 92 +ADDRGP4 DC +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 32 +ADDRLP4 92 +INDIRI4 +ASGNI4 +line 4536 +;4536: if (image) { +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $2017 +line 4537 +;4537: DC->drawHandlePic(x+1, y+1, listPtr->elementWidth - 2, listPtr->elementHeight - 2, image); +ADDRLP4 96 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 96 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 96 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 104 +CNSTF4 1073741824 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 104 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 104 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4538 +;4538: } +LABELV $2017 +line 4540 +;4539: +;4540: if (i == item->cursorPos) { +ADDRLP4 8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +CVIF4 4 +NEF4 $2019 +line 4541 +;4541: DC->drawRect(x, y, listPtr->elementWidth-1, listPtr->elementHeight-1, item->window.borderSize, item->window.borderColor); +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 100 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 100 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 100 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 104 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 104 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 104 +INDIRP4 +CNSTI4 144 +ADDP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRP4 +CALLV +pop +line 4542 +;4542: } +LABELV $2019 +line 4544 +;4543: +;4544: size -= listPtr->elementWidth; +ADDRLP4 24 +ADDRLP4 24 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 4545 +;4545: if (size < listPtr->elementWidth) { +ADDRLP4 24 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +GEF4 $2021 +line 4546 +;4546: listPtr->drawPadding = size; //listPtr->elementWidth - size; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 24 +INDIRF4 +CVFI4 4 +ASGNI4 +line 4547 +;4547: break; +ADDRGP4 $2012 +JUMPV +LABELV $2021 +line 4549 +;4548: } +;4549: x += listPtr->elementWidth; +ADDRLP4 28 +ADDRLP4 28 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 4550 +;4550: listPtr->endPos++; +ADDRLP4 96 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +ADDRLP4 96 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4552 +;4551: // fit++; +;4552: } +LABELV $2014 +line 4532 +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +LABELV $2016 +ADDRLP4 8 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LTF4 $2013 +line 4553 +;4553: } else { +LABELV $2011 +line 4555 +;4554: // +;4555: } +LABELV $2012 +line 4557 +;4556: +;4557: text = DC->feederItemText(item->special, item->cursorPos, 0, &optionalImage1, &optionalImage2, &optionalImage3); +ADDRLP4 92 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 92 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 12 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRLP4 96 +ADDRGP4 DC +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRP4 +CALLP4 +ASGNP4 +ADDRLP4 48 +ADDRLP4 96 +INDIRP4 +ASGNP4 +line 4558 +;4558: if (text) +ADDRLP4 48 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2008 +line 4559 +;4559: { +line 4560 +;4560: DC->drawText(item->window.rect.x, item->window.rect.y+item->window.rect.h, item->textscale, item->window.foreColor, text, 0, 0, item->textStyle, item->iMenuFont); +ADDRLP4 100 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 100 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +ADDRLP4 48 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 100 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 100 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 4561 +;4561: } +line 4562 +;4562: } else { +ADDRGP4 $2008 +JUMPV +LABELV $2007 +line 4564 +;4563: // draw scrollbar to right side of the window +;4564: x = item->window.rect.x + item->window.rect.w - SCROLLBAR_SIZE - 1; +ADDRLP4 48 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 48 +INDIRP4 +INDIRF4 +ADDRLP4 48 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +ASGNF4 +line 4565 +;4565: y = item->window.rect.y + 1; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4566 +;4566: DC->drawHandlePic(x, y, SCROLLBAR_SIZE, SCROLLBAR_SIZE, DC->Assets.scrollBarArrowUp); +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 52 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 52 +INDIRF4 +ARGF4 +ADDRLP4 52 +INDIRF4 +ARGF4 +ADDRLP4 56 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 292 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 56 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4567 +;4567: y += SCROLLBAR_SIZE - 1; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +CNSTF4 1097859072 +ADDF4 +ASGNF4 +line 4569 +;4568: +;4569: listPtr->endPos = listPtr->startPos; +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +ASGNI4 +line 4570 +;4570: size = item->window.rect.h - (SCROLLBAR_SIZE * 2); +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +CNSTF4 1107296256 +SUBF4 +ASGNF4 +line 4571 +;4571: DC->drawHandlePic(x, y, SCROLLBAR_SIZE, size+1, DC->Assets.scrollBar); +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +CNSTF4 1098907648 +ARGF4 +ADDRLP4 24 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ARGF4 +ADDRLP4 64 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 308 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 64 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4572 +;4572: y += size - 1; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +CNSTF4 1065353216 +SUBF4 +ADDF4 +ASGNF4 +line 4573 +;4573: DC->drawHandlePic(x, y, SCROLLBAR_SIZE, SCROLLBAR_SIZE, DC->Assets.scrollBarArrowDown); +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 68 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 68 +INDIRF4 +ARGF4 +ADDRLP4 68 +INDIRF4 +ARGF4 +ADDRLP4 72 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 296 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 72 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4575 +;4574: // thumb +;4575: thumb = Item_ListBox_ThumbDrawPosition(item);//Item_ListBox_ThumbPosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 76 +ADDRGP4 Item_ListBox_ThumbDrawPosition +CALLI4 +ASGNI4 +ADDRLP4 40 +ADDRLP4 76 +INDIRI4 +CVIF4 4 +ASGNF4 +line 4576 +;4576: if (thumb > y - SCROLLBAR_SIZE - 1) { +ADDRLP4 40 +INDIRF4 +ADDRLP4 4 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +LEF4 $2025 +line 4577 +;4577: thumb = y - SCROLLBAR_SIZE - 1; +ADDRLP4 40 +ADDRLP4 4 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1065353216 +SUBF4 +ASGNF4 +line 4578 +;4578: } +LABELV $2025 +line 4579 +;4579: DC->drawHandlePic(x, thumb, SCROLLBAR_SIZE, SCROLLBAR_SIZE, DC->Assets.scrollBarThumb); +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRF4 +ARGF4 +ADDRLP4 80 +CNSTF4 1098907648 +ASGNF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 80 +INDIRF4 +ARGF4 +ADDRLP4 84 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 312 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 84 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4582 +;4580: +;4581: // adjust size for item painting +;4582: size = item->window.rect.h - 2; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +CNSTF4 1073741824 +SUBF4 +ASGNF4 +line 4583 +;4583: if (listPtr->elementStyle == LISTBOX_IMAGE) { +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $2027 +line 4585 +;4584: // fit = 0; +;4585: x = item->window.rect.x + 1; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4586 +;4586: y = item->window.rect.y + 1; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4587 +;4587: for (i = listPtr->startPos; i < count; i++) { +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRGP4 $2032 +JUMPV +LABELV $2029 +line 4590 +;4588: // always draw at least one +;4589: // which may overdraw the box if it is too small for the element +;4590: image = DC->feederItemImage(item->special, i); +ADDRFP4 0 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 88 +ADDRGP4 DC +INDIRP4 +CNSTI4 160 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 32 +ADDRLP4 88 +INDIRI4 +ASGNI4 +line 4591 +;4591: if (image) { +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $2033 +line 4592 +;4592: DC->drawHandlePic(x+1, y+1, listPtr->elementWidth - 2, listPtr->elementHeight - 2, image); +ADDRLP4 92 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 92 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 92 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 100 +CNSTF4 1073741824 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 100 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 100 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 32 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4593 +;4593: } +LABELV $2033 +line 4595 +;4594: +;4595: if (i == item->cursorPos) { +ADDRLP4 8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +CVIF4 4 +NEF4 $2035 +line 4596 +;4596: DC->drawRect(x, y, listPtr->elementWidth - 1, listPtr->elementHeight - 1, item->window.borderSize, item->window.borderColor); +ADDRLP4 28 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 96 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 96 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 96 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 100 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 100 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 144 +ADDP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRP4 +CALLV +pop +line 4597 +;4597: } +LABELV $2035 +line 4599 +;4598: +;4599: listPtr->endPos++; +ADDRLP4 92 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +ADDRLP4 92 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4600 +;4600: size -= listPtr->elementWidth; +ADDRLP4 24 +ADDRLP4 24 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 4601 +;4601: if (size < listPtr->elementHeight) { +ADDRLP4 24 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +GEF4 $2037 +line 4602 +;4602: listPtr->drawPadding = listPtr->elementHeight - size; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +SUBF4 +CVFI4 4 +ASGNI4 +line 4603 +;4603: break; +ADDRGP4 $2028 +JUMPV +LABELV $2037 +line 4605 +;4604: } +;4605: y += listPtr->elementHeight; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 4607 +;4606: // fit++; +;4607: } +LABELV $2030 +line 4587 +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +LABELV $2032 +ADDRLP4 8 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LTF4 $2029 +line 4608 +;4608: } else { +ADDRGP4 $2028 +JUMPV +LABELV $2027 +line 4609 +;4609: x = item->window.rect.x + 1; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4610 +;4610: y = item->window.rect.y + 1; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +line 4611 +;4611: for (i = listPtr->startPos; i < count; i++) { +ADDRLP4 8 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CVIF4 4 +ASGNF4 +ADDRGP4 $2042 +JUMPV +LABELV $2039 +line 4616 +;4612: const char *text; +;4613: // always draw at least one +;4614: // which may overdraw the box if it is too small for the element +;4615: +;4616: if (listPtr->numColumns > 0) { +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $2043 +line 4619 +;4617: int j;//, subX = listPtr->elementHeight; +;4618: +;4619: for (j = 0; j < listPtr->numColumns; j++) +ADDRLP4 92 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2048 +JUMPV +LABELV $2045 +line 4620 +;4620: { +line 4621 +;4621: int imageStartX = listPtr->columnInfo[j].pos; +ADDRLP4 96 +CNSTI4 12 +ADDRLP4 92 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 4622 +;4622: text = DC->feederItemText(item->special, i, j, &optionalImage1, &optionalImage2, &optionalImage3); +ADDRFP4 0 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +CVFI4 4 +ARGI4 +ADDRLP4 92 +INDIRI4 +ARGI4 +ADDRLP4 12 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRLP4 100 +ADDRGP4 DC +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRP4 +CALLP4 +ASGNP4 +ADDRLP4 88 +ADDRLP4 100 +INDIRP4 +ASGNP4 +line 4623 +;4623: /* +ADDRLP4 88 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2049 +line 4629 +;4624: if (optionalImage >= 0) { +;4625: DC->drawHandlePic(x + 4 + listPtr->columnInfo[j].pos, y - 1 + listPtr->elementHeight / 2, listPtr->columnInfo[j].width, listPtr->columnInfo[j].width, optionalImage); +;4626: } +;4627: else +;4628: */if ( text ) +;4629: { +line 4631 +;4630:// DC->drawText(x + 4 + listPtr->columnInfo[j].pos, y + listPtr->elementHeight, item->textscale, item->window.foreColor, text, 0, listPtr->columnInfo[j].maxChars, item->textStyle); +;4631: DC->drawText(x + 4 + listPtr->columnInfo[j].pos, y, item->textscale, item->window.foreColor, text, 0, listPtr->columnInfo[j].maxChars, item->textStyle, item->iMenuFont); +ADDRLP4 104 +CNSTI4 12 +ADDRLP4 92 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRF4 +CNSTF4 1082130432 +ADDF4 +ADDRLP4 104 +INDIRP4 +INDIRI4 +CVIF4 4 +ADDF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 108 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 108 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 108 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +ADDRLP4 88 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 104 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 108 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 108 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 4632 +;4632: } +LABELV $2049 +line 4633 +;4633: if ( j < listPtr->numColumns - 1 ) +ADDRLP4 92 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI4 +CNSTI4 1 +SUBI4 +GEI4 $2051 +line 4634 +;4634: { +line 4635 +;4635: imageStartX = listPtr->columnInfo[j+1].pos; +ADDRLP4 96 +CNSTI4 12 +ADDRLP4 92 +INDIRI4 +MULI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 44 +ADDP4 +ADDP4 +INDIRI4 +ASGNI4 +line 4636 +;4636: } +LABELV $2051 +line 4637 +;4637: DC->setColor( NULL ); +CNSTP4 0 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLV +pop +line 4638 +;4638: if (optionalImage3 >= 0) { +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +LTI4 $2053 +line 4639 +;4639: DC->drawHandlePic(imageStartX - listPtr->elementHeight*3, y+2, listPtr->elementHeight, listPtr->elementHeight, optionalImage3); +ADDRLP4 104 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 96 +INDIRI4 +CVIF4 4 +CNSTF4 1077936128 +ADDRLP4 104 +INDIRF4 +MULF4 +SUBF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +CNSTF4 1073741824 +ADDF4 +ARGF4 +ADDRLP4 104 +INDIRF4 +ARGF4 +ADDRLP4 104 +INDIRF4 +ARGF4 +ADDRLP4 20 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4640 +;4640: } +LABELV $2053 +line 4641 +;4641: if (optionalImage2 >= 0) { +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +LTI4 $2055 +line 4642 +;4642: DC->drawHandlePic(imageStartX - listPtr->elementHeight*2, y+2, listPtr->elementHeight, listPtr->elementHeight, optionalImage2); +ADDRLP4 104 +CNSTF4 1073741824 +ASGNF4 +ADDRLP4 108 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 96 +INDIRI4 +CVIF4 4 +ADDRLP4 104 +INDIRF4 +ADDRLP4 108 +INDIRF4 +MULF4 +SUBF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 104 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 108 +INDIRF4 +ARGF4 +ADDRLP4 108 +INDIRF4 +ARGF4 +ADDRLP4 16 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4643 +;4643: } +LABELV $2055 +line 4644 +;4644: if (optionalImage1 >= 0) { +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +LTI4 $2057 +line 4645 +;4645: DC->drawHandlePic(imageStartX - listPtr->elementHeight, y+2, listPtr->elementHeight, listPtr->elementHeight, optionalImage1); +ADDRLP4 104 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ASGNF4 +ADDRLP4 96 +INDIRI4 +CVIF4 4 +ADDRLP4 104 +INDIRF4 +SUBF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +CNSTF4 1073741824 +ADDF4 +ARGF4 +ADDRLP4 104 +INDIRF4 +ARGF4 +ADDRLP4 104 +INDIRF4 +ARGF4 +ADDRLP4 12 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 4646 +;4646: } +LABELV $2057 +line 4647 +;4647: } +LABELV $2046 +line 4619 +ADDRLP4 92 +ADDRLP4 92 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2048 +ADDRLP4 92 +INDIRI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRI4 +LTI4 $2045 +line 4648 +;4648: } +ADDRGP4 $2044 +JUMPV +LABELV $2043 +line 4650 +;4649: else +;4650: { +line 4651 +;4651: text = DC->feederItemText(item->special, i, 0, &optionalImage1, &optionalImage2, &optionalImage3 ); +ADDRFP4 0 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 8 +INDIRF4 +CVFI4 4 +ARGI4 +CNSTI4 0 +ARGI4 +ADDRLP4 12 +ARGP4 +ADDRLP4 16 +ARGP4 +ADDRLP4 20 +ARGP4 +ADDRLP4 92 +ADDRGP4 DC +INDIRP4 +CNSTI4 156 +ADDP4 +INDIRP4 +CALLP4 +ASGNP4 +ADDRLP4 88 +ADDRLP4 92 +INDIRP4 +ASGNP4 +line 4652 +;4652: if ( optionalImage1 >= 0 || optionalImage2 >= 0 || optionalImage3 >= 0) +ADDRLP4 96 +CNSTI4 0 +ASGNI4 +ADDRLP4 12 +INDIRI4 +ADDRLP4 96 +INDIRI4 +GEI4 $2062 +ADDRLP4 16 +INDIRI4 +ADDRLP4 96 +INDIRI4 +GEI4 $2062 +ADDRLP4 20 +INDIRI4 +ADDRLP4 96 +INDIRI4 +LTI4 $2059 +LABELV $2062 +line 4653 +;4653: { +line 4655 +;4654: //DC->drawHandlePic(x + 4 + listPtr->elementHeight, y, listPtr->columnInfo[j].width, listPtr->columnInfo[j].width, optionalImage); +;4655: } +ADDRGP4 $2060 +JUMPV +LABELV $2059 +line 4656 +;4656: else if (text) +ADDRLP4 88 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2063 +line 4657 +;4657: { +line 4659 +;4658:// DC->drawText(x + 4, y + listPtr->elementHeight, item->textscale, item->window.foreColor, text, 0, 0, item->textStyle); +;4659: DC->drawText(x + 4, y, item->textscale, item->window.foreColor, text, 0, 0, item->textStyle, item->iMenuFont); +ADDRLP4 28 +INDIRF4 +CNSTF4 1082130432 +ADDF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 100 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 100 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +ADDRLP4 88 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRLP4 100 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 100 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 4660 +;4660: } +LABELV $2063 +LABELV $2060 +line 4661 +;4661: } +LABELV $2044 +line 4663 +;4662: +;4663: if (i == item->cursorPos) { +ADDRLP4 8 +INDIRF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +CVIF4 4 +NEF4 $2065 +line 4664 +;4664: DC->fillRect(x + 2, y + 2, item->window.rect.w - SCROLLBAR_SIZE - 4, listPtr->elementHeight, item->window.outlineColor); +ADDRLP4 92 +CNSTF4 1073741824 +ASGNF4 +ADDRLP4 28 +INDIRF4 +ADDRLP4 92 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 92 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 96 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 96 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1082130432 +SUBF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 96 +INDIRP4 +CNSTI4 160 +ADDP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 36 +ADDP4 +INDIRP4 +CALLV +pop +line 4665 +;4665: } +LABELV $2065 +line 4667 +;4666: +;4667: size -= listPtr->elementHeight; +ADDRLP4 24 +ADDRLP4 24 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 4668 +;4668: if (size < listPtr->elementHeight) { +ADDRLP4 24 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +GEF4 $2067 +line 4669 +;4669: listPtr->drawPadding = listPtr->elementHeight - size; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 24 +INDIRF4 +SUBF4 +CVFI4 4 +ASGNI4 +line 4670 +;4670: break; +ADDRGP4 $2041 +JUMPV +LABELV $2067 +line 4672 +;4671: } +;4672: listPtr->endPos++; +ADDRLP4 92 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +ADDRLP4 92 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4673 +;4673: y += listPtr->elementHeight; +ADDRLP4 4 +ADDRLP4 4 +INDIRF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 4675 +;4674: // fit++; +;4675: } +LABELV $2040 +line 4611 +ADDRLP4 8 +ADDRLP4 8 +INDIRF4 +CNSTF4 1065353216 +ADDF4 +ASGNF4 +LABELV $2042 +ADDRLP4 8 +INDIRF4 +ADDRLP4 36 +INDIRF4 +LTF4 $2039 +LABELV $2041 +line 4676 +;4676: } +LABELV $2028 +line 4677 +;4677: } +LABELV $2008 +line 4678 +;4678:} +LABELV $2006 +endproc Item_ListBox_Paint 112 36 +export Item_OwnerDraw_Paint +proc Item_OwnerDraw_Paint 68 60 +line 4681 +;4679: +;4680: +;4681:void Item_OwnerDraw_Paint(itemDef_t *item) { +line 4684 +;4682: menuDef_t *parent; +;4683: +;4684: if (item == NULL) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2070 +line 4685 +;4685: return; +ADDRGP4 $2069 +JUMPV +LABELV $2070 +line 4687 +;4686: } +;4687: parent = (menuDef_t*)item->parent; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 4689 +;4688: +;4689: if (DC->ownerDrawItem) { +ADDRGP4 DC +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2072 +line 4691 +;4690: vec4_t color, lowLight; +;4691: menuDef_t *parent = (menuDef_t*)item->parent; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 4692 +;4692: Fade(&item->window.flags, &item->window.foreColor[3], parent->fadeClamp, &item->window.nextTime, parent->fadeCycle, qtrue, parent->fadeAmount); +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 68 +ADDP4 +ARGP4 +ADDRLP4 40 +INDIRP4 +CNSTI4 124 +ADDP4 +ARGP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 40 +INDIRP4 +CNSTI4 108 +ADDP4 +ARGP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 1 +ARGI4 +ADDRLP4 20 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ARGF4 +ADDRGP4 Fade +CALLV +pop +line 4693 +;4693: memcpy(&color, &item->window.foreColor, sizeof(color)); +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 4694 +;4694: if (item->numColors > 0 && DC->getValue) { +ADDRFP4 0 +INDIRP4 +CNSTI4 296 +ADDP4 +INDIRI4 +CNSTI4 0 +LEI4 $2074 +ADDRGP4 DC +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2074 +line 4697 +;4695: // if the value is within one of the ranges then set color to that, otherwise leave at default +;4696: int i; +;4697: float f = DC->getValue(item->window.ownerDraw); +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 56 +ADDRGP4 DC +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRP4 +CALLF4 +ASGNF4 +ADDRLP4 52 +ADDRLP4 56 +INDIRF4 +ASGNF4 +line 4698 +;4698: for (i = 0; i < item->numColors; i++) { +ADDRLP4 48 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2079 +JUMPV +LABELV $2076 +line 4699 +;4699: if (f >= item->colorRanges[i].low && f <= item->colorRanges[i].high) { +ADDRLP4 64 +CNSTI4 24 +ADDRLP4 48 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 300 +ADDP4 +ADDP4 +ASGNP4 +ADDRLP4 52 +INDIRF4 +ADDRLP4 64 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +LTF4 $2080 +ADDRLP4 52 +INDIRF4 +ADDRLP4 64 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +GTF4 $2080 +line 4700 +;4700: memcpy(&color, &item->colorRanges[i].color, sizeof(color)); +ADDRLP4 4 +ARGP4 +CNSTI4 24 +ADDRLP4 48 +INDIRI4 +MULI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 300 +ADDP4 +ADDP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 4701 +;4701: break; +ADDRGP4 $2078 +JUMPV +LABELV $2080 +line 4703 +;4702: } +;4703: } +LABELV $2077 +line 4698 +ADDRLP4 48 +ADDRLP4 48 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2079 +ADDRLP4 48 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 296 +ADDP4 +INDIRI4 +LTI4 $2076 +LABELV $2078 +line 4704 +;4704: } +LABELV $2074 +line 4706 +;4705: +;4706: if (item->window.flags & WINDOW_HASFOCUS) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +CNSTI4 0 +EQI4 $2082 +line 4707 +;4707: lowLight[0] = 0.8 * parent->focusColor[0]; +ADDRLP4 24 +CNSTF4 1061997773 +ADDRLP4 20 +INDIRP4 +CNSTI4 228 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4708 +;4708: lowLight[1] = 0.8 * parent->focusColor[1]; +ADDRLP4 24+4 +CNSTF4 1061997773 +ADDRLP4 20 +INDIRP4 +CNSTI4 232 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4709 +;4709: lowLight[2] = 0.8 * parent->focusColor[2]; +ADDRLP4 24+8 +CNSTF4 1061997773 +ADDRLP4 20 +INDIRP4 +CNSTI4 236 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4710 +;4710: lowLight[3] = 0.8 * parent->focusColor[3]; +ADDRLP4 24+12 +CNSTF4 1061997773 +ADDRLP4 20 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4711 +;4711: LerpColor(parent->focusColor,lowLight,color,0.5+0.5*sin(DC->realTime / PULSE_DIVISOR)); +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 75 +DIVI4 +CVIF4 4 +ARGF4 +ADDRLP4 48 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 228 +ADDP4 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 4 +ARGP4 +CNSTF4 1056964608 +ADDRLP4 48 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ARGF4 +ADDRGP4 LerpColor +CALLV +pop +line 4712 +;4712: } else if (item->textStyle == ITEM_TEXTSTYLE_BLINK && !((DC->realTime/BLINK_DIVISOR) & 1)) { +ADDRGP4 $2083 +JUMPV +LABELV $2082 +ADDRLP4 48 +CNSTI4 1 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ADDRLP4 48 +INDIRI4 +NEI4 $2087 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 200 +DIVI4 +ADDRLP4 48 +INDIRI4 +BANDI4 +CNSTI4 0 +NEI4 $2087 +line 4713 +;4713: lowLight[0] = 0.8 * item->window.foreColor[0]; +ADDRLP4 24 +CNSTF4 1061997773 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4714 +;4714: lowLight[1] = 0.8 * item->window.foreColor[1]; +ADDRLP4 24+4 +CNSTF4 1061997773 +ADDRFP4 0 +INDIRP4 +CNSTI4 116 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4715 +;4715: lowLight[2] = 0.8 * item->window.foreColor[2]; +ADDRLP4 24+8 +CNSTF4 1061997773 +ADDRFP4 0 +INDIRP4 +CNSTI4 120 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4716 +;4716: lowLight[3] = 0.8 * item->window.foreColor[3]; +ADDRLP4 24+12 +CNSTF4 1061997773 +ADDRFP4 0 +INDIRP4 +CNSTI4 124 +ADDP4 +INDIRF4 +MULF4 +ASGNF4 +line 4717 +;4717: LerpColor(item->window.foreColor,lowLight,color,0.5+0.5*sin(DC->realTime / PULSE_DIVISOR)); +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CNSTI4 75 +DIVI4 +CVIF4 4 +ARGF4 +ADDRLP4 52 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ARGP4 +ADDRLP4 24 +ARGP4 +ADDRLP4 4 +ARGP4 +CNSTF4 1056964608 +ADDRLP4 52 +INDIRF4 +MULF4 +CNSTF4 1056964608 +ADDF4 +ARGF4 +ADDRGP4 LerpColor +CALLV +pop +line 4718 +;4718: } +LABELV $2087 +LABELV $2083 +line 4720 +;4719: +;4720: if (item->cvarFlags & (CVAR_ENABLE | CVAR_DISABLE) && !Item_EnableShowViaCvar(item, CVAR_ENABLE)) { +ADDRLP4 52 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 0 +EQI4 $2092 +ADDRLP4 52 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 56 +ADDRGP4 Item_EnableShowViaCvar +CALLI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +NEI4 $2092 +line 4721 +;4721: memcpy(color, parent->disableColor, sizeof(vec4_t)); // bk001207 - FIXME: Com_Memcpy +ADDRLP4 4 +ARGP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 244 +ADDP4 +ARGP4 +CNSTI4 16 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 4722 +;4722: } +LABELV $2092 +line 4724 +;4723: +;4724: if (item->text) { +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2094 +line 4725 +;4725: Item_Text_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Text_Paint +CALLV +pop +line 4726 +;4726: if (item->text[0]) { +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $2096 +line 4728 +;4727: // +8 is an offset kludge to properly align owner draw items that have text combined with them +;4728: DC->ownerDrawItem(item->textRect.x + item->textRect.w + 8, item->window.rect.y, item->window.rect.w, item->window.rect.h, 0, item->textaligny, item->window.ownerDraw, item->window.ownerDrawFlags, item->alignment, item->special, item->textscale, color, item->window.background, item->textStyle,item->iMenuFont); +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ADDF4 +CNSTF4 1090519040 +ADDF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +CNSTF4 0 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 4 +ARGP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRP4 +CALLV +pop +line 4729 +;4729: } else { +ADDRGP4 $2095 +JUMPV +LABELV $2096 +line 4730 +;4730: DC->ownerDrawItem(item->textRect.x + item->textRect.w, item->window.rect.y, item->window.rect.w, item->window.rect.h, 0, item->textaligny, item->window.ownerDraw, item->window.ownerDrawFlags, item->alignment, item->special, item->textscale, color, item->window.background, item->textStyle,item->iMenuFont); +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRF4 +ADDF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +CNSTF4 0 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 4 +ARGP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRP4 +CALLV +pop +line 4731 +;4731: } +line 4732 +;4732: } else { +ADDRGP4 $2095 +JUMPV +LABELV $2094 +line 4733 +;4733: DC->ownerDrawItem(item->window.rect.x, item->window.rect.y, item->window.rect.w, item->window.rect.h, item->textalignx, item->textaligny, item->window.ownerDraw, item->window.ownerDrawFlags, item->alignment, item->special, item->textscale, color, item->window.background, item->textStyle,item->iMenuFont); +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 56 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 4 +ARGP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 60 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRP4 +CALLV +pop +line 4734 +;4734: } +LABELV $2095 +line 4735 +;4735: } +LABELV $2072 +line 4736 +;4736:} +LABELV $2069 +endproc Item_OwnerDraw_Paint 68 60 +lit +align 4 +LABELV $2099 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +export Item_Paint +code +proc Item_Paint 108 36 +line 4740 +;4737: +;4738: +;4739:void Item_Paint(itemDef_t *item) +;4740:{ +line 4742 +;4741: vec4_t red; +;4742: menuDef_t *parent = (menuDef_t*)item->parent; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRP4 +ASGNP4 +line 4744 +;4743: int xPos,textWidth; +;4744: vec4_t color = {1, 1, 1, 1}; +ADDRLP4 28 +ADDRGP4 $2099 +INDIRB +ASGNB 16 +line 4746 +;4745: +;4746: red[0] = red[3] = 1; +ADDRLP4 44 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 4+12 +ADDRLP4 44 +INDIRF4 +ASGNF4 +ADDRLP4 4 +ADDRLP4 44 +INDIRF4 +ASGNF4 +line 4747 +;4747: red[1] = red[2] = 0; +ADDRLP4 48 +CNSTF4 0 +ASGNF4 +ADDRLP4 4+8 +ADDRLP4 48 +INDIRF4 +ASGNF4 +ADDRLP4 4+4 +ADDRLP4 48 +INDIRF4 +ASGNF4 +line 4749 +;4748: +;4749: if (item == NULL) +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2103 +line 4750 +;4750: { +line 4751 +;4751: return; +ADDRGP4 $2098 +JUMPV +LABELV $2103 +line 4754 +;4752: } +;4753: +;4754: if (item->window.flags & WINDOW_ORBITING) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 65536 +BANDI4 +CNSTI4 0 +EQI4 $2105 +line 4755 +;4755: { +line 4756 +;4756: if (DC->realTime > item->window.nextTime) +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +LEI4 $2107 +line 4757 +;4757: { +line 4760 +;4758: float rx, ry, a, c, s, w, h; +;4759: +;4760: item->window.nextTime = DC->realTime + item->window.offsetTime; +ADDRLP4 80 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 108 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 80 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 4762 +;4761: // translate +;4762: w = item->window.rectClient.w / 2; +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 4763 +;4763: h = item->window.rectClient.h / 2; +ADDRLP4 76 +ADDRFP4 0 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +CNSTF4 1073741824 +DIVF4 +ASGNF4 +line 4764 +;4764: rx = item->window.rectClient.x + w - item->window.rectEffects.x; +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 52 +ADDRLP4 84 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 72 +INDIRF4 +ADDF4 +ADDRLP4 84 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 4765 +;4765: ry = item->window.rectClient.y + h - item->window.rectEffects.y; +ADDRLP4 88 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 56 +ADDRLP4 88 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRF4 +ADDF4 +ADDRLP4 88 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 4766 +;4766: a = 3 * M_PI / 180; +ADDRLP4 60 +CNSTF4 1029076816 +ASGNF4 +line 4767 +;4767: c = cos(a); +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 92 +ADDRGP4 cos +CALLF4 +ASGNF4 +ADDRLP4 64 +ADDRLP4 92 +INDIRF4 +ASGNF4 +line 4768 +;4768: s = sin(a); +ADDRLP4 60 +INDIRF4 +ARGF4 +ADDRLP4 96 +ADDRGP4 sin +CALLF4 +ASGNF4 +ADDRLP4 68 +ADDRLP4 96 +INDIRF4 +ASGNF4 +line 4769 +;4769: item->window.rectClient.x = (rx * c - ry * s) + item->window.rectEffects.x - w; +ADDRLP4 100 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 100 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 52 +INDIRF4 +ADDRLP4 64 +INDIRF4 +MULF4 +ADDRLP4 56 +INDIRF4 +ADDRLP4 68 +INDIRF4 +MULF4 +SUBF4 +ADDRLP4 100 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +ADDF4 +ADDRLP4 72 +INDIRF4 +SUBF4 +ASGNF4 +line 4770 +;4770: item->window.rectClient.y = (rx * s + ry * c) + item->window.rectEffects.y - h; +ADDRLP4 104 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 104 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 52 +INDIRF4 +ADDRLP4 68 +INDIRF4 +MULF4 +ADDRLP4 56 +INDIRF4 +ADDRLP4 64 +INDIRF4 +MULF4 +ADDF4 +ADDRLP4 104 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +ADDF4 +ADDRLP4 76 +INDIRF4 +SUBF4 +ASGNF4 +line 4771 +;4771: Item_UpdatePosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_UpdatePosition +CALLV +pop +line 4772 +;4772: } +LABELV $2107 +line 4773 +;4773: } +LABELV $2105 +line 4776 +;4774: +;4775: +;4776: if (item->window.flags & WINDOW_INTRANSITION) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 256 +BANDI4 +CNSTI4 0 +EQI4 $2109 +line 4777 +;4777: if (DC->realTime > item->window.nextTime) { +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 108 +ADDP4 +INDIRI4 +LEI4 $2111 +line 4778 +;4778: int done = 0; +ADDRLP4 52 +CNSTI4 0 +ASGNI4 +line 4779 +;4779: item->window.nextTime = DC->realTime + item->window.offsetTime; +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 108 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +ADDRLP4 56 +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRI4 +ADDI4 +ASGNI4 +line 4781 +;4780: // transition the x,y +;4781: if (item->window.rectClient.x == item->window.rectEffects.x) { +ADDRLP4 60 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 60 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 60 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +NEF4 $2113 +line 4782 +;4782: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4783 +;4783: } else { +ADDRGP4 $2114 +JUMPV +LABELV $2113 +line 4784 +;4784: if (item->window.rectClient.x < item->window.rectEffects.x) { +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 64 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +GEF4 $2115 +line 4785 +;4785: item->window.rectClient.x += item->window.rectEffects2.x; +ADDRLP4 68 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 72 +ADDRLP4 68 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRF4 +ADDRLP4 68 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 4786 +;4786: if (item->window.rectClient.x > item->window.rectEffects.x) { +ADDRLP4 76 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +LEF4 $2116 +line 4787 +;4787: item->window.rectClient.x = item->window.rectEffects.x; +ADDRLP4 80 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +ASGNF4 +line 4788 +;4788: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4789 +;4789: } +line 4790 +;4790: } else { +ADDRGP4 $2116 +JUMPV +LABELV $2115 +line 4791 +;4791: item->window.rectClient.x -= item->window.rectEffects2.x; +ADDRLP4 68 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 72 +ADDRLP4 68 +INDIRP4 +CNSTI4 16 +ADDP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +ADDRLP4 72 +INDIRP4 +INDIRF4 +ADDRLP4 68 +INDIRP4 +CNSTI4 88 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 4792 +;4792: if (item->window.rectClient.x < item->window.rectEffects.x) { +ADDRLP4 76 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +GEF4 $2119 +line 4793 +;4793: item->window.rectClient.x = item->window.rectEffects.x; +ADDRLP4 80 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 72 +ADDP4 +INDIRF4 +ASGNF4 +line 4794 +;4794: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4795 +;4795: } +LABELV $2119 +line 4796 +;4796: } +LABELV $2116 +line 4797 +;4797: } +LABELV $2114 +line 4798 +;4798: if (item->window.rectClient.y == item->window.rectEffects.y) { +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 64 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +NEF4 $2121 +line 4799 +;4799: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4800 +;4800: } else { +ADDRGP4 $2122 +JUMPV +LABELV $2121 +line 4801 +;4801: if (item->window.rectClient.y < item->window.rectEffects.y) { +ADDRLP4 68 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 68 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +GEF4 $2123 +line 4802 +;4802: item->window.rectClient.y += item->window.rectEffects2.y; +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 76 +ADDRLP4 72 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 76 +INDIRP4 +INDIRF4 +ADDRLP4 72 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 4803 +;4803: if (item->window.rectClient.y > item->window.rectEffects.y) { +ADDRLP4 80 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 80 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +LEF4 $2124 +line 4804 +;4804: item->window.rectClient.y = item->window.rectEffects.y; +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +ASGNF4 +line 4805 +;4805: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4806 +;4806: } +line 4807 +;4807: } else { +ADDRGP4 $2124 +JUMPV +LABELV $2123 +line 4808 +;4808: item->window.rectClient.y -= item->window.rectEffects2.y; +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 76 +ADDRLP4 72 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 76 +INDIRP4 +INDIRF4 +ADDRLP4 72 +INDIRP4 +CNSTI4 92 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 4809 +;4809: if (item->window.rectClient.y < item->window.rectEffects.y) { +ADDRLP4 80 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRF4 +ADDRLP4 80 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +GEF4 $2127 +line 4810 +;4810: item->window.rectClient.y = item->window.rectEffects.y; +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 76 +ADDP4 +INDIRF4 +ASGNF4 +line 4811 +;4811: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4812 +;4812: } +LABELV $2127 +line 4813 +;4813: } +LABELV $2124 +line 4814 +;4814: } +LABELV $2122 +line 4815 +;4815: if (item->window.rectClient.w == item->window.rectEffects.w) { +ADDRLP4 68 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 68 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 68 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +NEF4 $2129 +line 4816 +;4816: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4817 +;4817: } else { +ADDRGP4 $2130 +JUMPV +LABELV $2129 +line 4818 +;4818: if (item->window.rectClient.w < item->window.rectEffects.w) { +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 72 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +GEF4 $2131 +line 4819 +;4819: item->window.rectClient.w += item->window.rectEffects2.w; +ADDRLP4 76 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 80 +ADDRLP4 76 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +ADDRLP4 80 +INDIRP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 4820 +;4820: if (item->window.rectClient.w > item->window.rectEffects.w) { +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 84 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +LEF4 $2132 +line 4821 +;4821: item->window.rectClient.w = item->window.rectEffects.w; +ADDRLP4 88 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +ASGNF4 +line 4822 +;4822: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4823 +;4823: } +line 4824 +;4824: } else { +ADDRGP4 $2132 +JUMPV +LABELV $2131 +line 4825 +;4825: item->window.rectClient.w -= item->window.rectEffects2.w; +ADDRLP4 76 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 80 +ADDRLP4 76 +INDIRP4 +CNSTI4 24 +ADDP4 +ASGNP4 +ADDRLP4 80 +INDIRP4 +ADDRLP4 80 +INDIRP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +CNSTI4 96 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 4826 +;4826: if (item->window.rectClient.w < item->window.rectEffects.w) { +ADDRLP4 84 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRF4 +ADDRLP4 84 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +GEF4 $2135 +line 4827 +;4827: item->window.rectClient.w = item->window.rectEffects.w; +ADDRLP4 88 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 80 +ADDP4 +INDIRF4 +ASGNF4 +line 4828 +;4828: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4829 +;4829: } +LABELV $2135 +line 4830 +;4830: } +LABELV $2132 +line 4831 +;4831: } +LABELV $2130 +line 4832 +;4832: if (item->window.rectClient.h == item->window.rectEffects.h) { +ADDRLP4 72 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 72 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 72 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +NEF4 $2137 +line 4833 +;4833: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4834 +;4834: } else { +ADDRGP4 $2138 +JUMPV +LABELV $2137 +line 4835 +;4835: if (item->window.rectClient.h < item->window.rectEffects.h) { +ADDRLP4 76 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 76 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +GEF4 $2139 +line 4836 +;4836: item->window.rectClient.h += item->window.rectEffects2.h; +ADDRLP4 80 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 84 +ADDRLP4 80 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +ADDRLP4 80 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 4837 +;4837: if (item->window.rectClient.h > item->window.rectEffects.h) { +ADDRLP4 88 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 88 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +LEF4 $2140 +line 4838 +;4838: item->window.rectClient.h = item->window.rectEffects.h; +ADDRLP4 92 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +ASGNF4 +line 4839 +;4839: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4840 +;4840: } +line 4841 +;4841: } else { +ADDRGP4 $2140 +JUMPV +LABELV $2139 +line 4842 +;4842: item->window.rectClient.h -= item->window.rectEffects2.h; +ADDRLP4 80 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 84 +ADDRLP4 80 +INDIRP4 +CNSTI4 28 +ADDP4 +ASGNP4 +ADDRLP4 84 +INDIRP4 +ADDRLP4 84 +INDIRP4 +INDIRF4 +ADDRLP4 80 +INDIRP4 +CNSTI4 100 +ADDP4 +INDIRF4 +SUBF4 +ASGNF4 +line 4843 +;4843: if (item->window.rectClient.h < item->window.rectEffects.h) { +ADDRLP4 88 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 88 +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRF4 +ADDRLP4 88 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +GEF4 $2143 +line 4844 +;4844: item->window.rectClient.h = item->window.rectEffects.h; +ADDRLP4 92 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 92 +INDIRP4 +CNSTI4 84 +ADDP4 +INDIRF4 +ASGNF4 +line 4845 +;4845: done++; +ADDRLP4 52 +ADDRLP4 52 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 4846 +;4846: } +LABELV $2143 +line 4847 +;4847: } +LABELV $2140 +line 4848 +;4848: } +LABELV $2138 +line 4850 +;4849: +;4850: Item_UpdatePosition(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_UpdatePosition +CALLV +pop +line 4852 +;4851: +;4852: if (done == 4) { +ADDRLP4 52 +INDIRI4 +CNSTI4 4 +NEI4 $2145 +line 4853 +;4853: item->window.flags &= ~WINDOW_INTRANSITION; +ADDRLP4 76 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 76 +INDIRP4 +ADDRLP4 76 +INDIRP4 +INDIRI4 +CNSTI4 -257 +BANDI4 +ASGNI4 +line 4854 +;4854: } +LABELV $2145 +line 4856 +;4855: +;4856: } +LABELV $2111 +line 4857 +;4857: } +LABELV $2109 +line 4859 +;4858: +;4859: if (item->window.ownerDrawFlags && DC->ownerDrawVisible) { +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2147 +ADDRGP4 DC +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2147 +line 4860 +;4860: if (!DC->ownerDrawVisible(item->window.ownerDrawFlags)) { +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 52 +ADDRGP4 DC +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +NEI4 $2149 +line 4861 +;4861: item->window.flags &= ~WINDOW_VISIBLE; +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRI4 +CNSTI4 -5 +BANDI4 +ASGNI4 +line 4862 +;4862: } else { +ADDRGP4 $2150 +JUMPV +LABELV $2149 +line 4863 +;4863: item->window.flags |= WINDOW_VISIBLE; +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +ADDRLP4 56 +INDIRP4 +INDIRI4 +CNSTI4 4 +BORI4 +ASGNI4 +line 4864 +;4864: } +LABELV $2150 +line 4865 +;4865: } +LABELV $2147 +line 4867 +;4866: +;4867: if (item->cvarFlags & (CVAR_SHOW | CVAR_HIDE)) { +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 12 +BANDI4 +CNSTI4 0 +EQI4 $2151 +line 4868 +;4868: if (!Item_EnableShowViaCvar(item, CVAR_SHOW)) { +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 4 +ARGI4 +ADDRLP4 52 +ADDRGP4 Item_EnableShowViaCvar +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +NEI4 $2153 +line 4869 +;4869: return; +ADDRGP4 $2098 +JUMPV +LABELV $2153 +line 4871 +;4870: } +;4871: } +LABELV $2151 +line 4873 +;4872: +;4873: if (item->window.flags & WINDOW_TIMEDVISIBLE) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 8388608 +BANDI4 +CNSTI4 0 +EQI4 $2155 +line 4875 +;4874: +;4875: } +LABELV $2155 +line 4877 +;4876: +;4877: if (!(item->window.flags & WINDOW_VISIBLE)) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +CNSTI4 0 +NEI4 $2157 +line 4878 +;4878: { +line 4879 +;4879: return; +ADDRGP4 $2098 +JUMPV +LABELV $2157 +line 4882 +;4880: } +;4881: +;4882: if ((item->window.flags & WINDOW_MOUSEOVER)) +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $2159 +line 4883 +;4883: { +line 4884 +;4884: if (item->descText && !Display_KeyBindPending()) +ADDRFP4 0 +INDIRP4 +CNSTI4 552 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2161 +ADDRLP4 52 +ADDRGP4 Display_KeyBindPending +CALLI4 +ASGNI4 +ADDRLP4 52 +INDIRI4 +CNSTI4 0 +NEI4 $2161 +line 4885 +;4885: { +line 4887 +;4886: // Make DOUBLY sure that this item should have desctext. +;4887: if (!Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory)) +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 56 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 56 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 60 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 60 +INDIRI4 +CNSTI4 0 +NEI4 $2163 +line 4888 +;4888: { // It isn't something that should, because it isn't live anymore. +line 4889 +;4889: item->window.flags &= ~WINDOW_MOUSEOVER; +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 64 +INDIRP4 +ADDRLP4 64 +INDIRP4 +INDIRI4 +CNSTI4 -2 +BANDI4 +ASGNI4 +line 4890 +;4890: } +ADDRGP4 $2164 +JUMPV +LABELV $2163 +line 4892 +;4891: else +;4892: { // Draw the desctext +line 4893 +;4893: const char *textPtr = item->descText; +ADDRLP4 64 +ADDRFP4 0 +INDIRP4 +CNSTI4 552 +ADDP4 +INDIRP4 +ASGNP4 +line 4895 +;4894: +;4895: Item_TextColor(item, &color); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 28 +ARGP4 +ADDRGP4 Item_TextColor +CALLV +pop +line 4897 +;4896: +;4897: {// stupid C language +line 4898 +;4898: float fDescScale = parent->descScale ? parent->descScale : 1; +ADDRLP4 0 +INDIRP4 +CNSTI4 1312 +ADDP4 +INDIRF4 +CNSTF4 0 +EQF4 $2166 +ADDRLP4 80 +ADDRLP4 0 +INDIRP4 +CNSTI4 1312 +ADDP4 +INDIRF4 +ASGNF4 +ADDRGP4 $2167 +JUMPV +LABELV $2166 +ADDRLP4 80 +CNSTF4 1065353216 +ASGNF4 +LABELV $2167 +ADDRLP4 68 +ADDRLP4 80 +INDIRF4 +ASGNF4 +line 4899 +;4899: float fDescScaleCopy = fDescScale; +ADDRLP4 72 +ADDRLP4 68 +INDIRF4 +ASGNF4 +line 4900 +;4900: int iYadj = 0; +ADDRLP4 76 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2169 +JUMPV +LABELV $2168 +line 4902 +;4901: while (1) +;4902: { +line 4903 +;4903: textWidth = DC->textWidth(textPtr,fDescScale, FONT_MEDIUM); +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRLP4 68 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 84 +ADDRGP4 DC +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 24 +ADDRLP4 84 +INDIRI4 +ASGNI4 +line 4905 +;4904: +;4905: if (parent->descAlignment == ITEM_ALIGN_RIGHT) +ADDRLP4 0 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRI4 +CNSTI4 2 +NEI4 $2171 +line 4906 +;4906: { +line 4907 +;4907: xPos = parent->descX - textWidth; // Right justify +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 1284 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +SUBI4 +ASGNI4 +line 4908 +;4908: } +ADDRGP4 $2172 +JUMPV +LABELV $2171 +line 4909 +;4909: else if (parent->descAlignment == ITEM_ALIGN_CENTER) +ADDRLP4 0 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $2173 +line 4910 +;4910: { +line 4911 +;4911: xPos = parent->descX - (textWidth/2); // Center justify +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 1284 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 2 +DIVI4 +SUBI4 +ASGNI4 +line 4912 +;4912: } +ADDRGP4 $2174 +JUMPV +LABELV $2173 +line 4914 +;4913: else // Left justify +;4914: { +line 4915 +;4915: xPos = parent->descX; +ADDRLP4 20 +ADDRLP4 0 +INDIRP4 +CNSTI4 1284 +ADDP4 +INDIRI4 +ASGNI4 +line 4916 +;4916: } +LABELV $2174 +LABELV $2172 +line 4918 +;4917: +;4918: if (parent->descAlignment == ITEM_ALIGN_CENTER) +ADDRLP4 0 +INDIRP4 +CNSTI4 1308 +ADDP4 +INDIRI4 +CNSTI4 1 +NEI4 $2175 +line 4919 +;4919: { +line 4922 +;4920: // only this one will auto-shrink the scale until we eventually fit... +;4921: // +;4922: if (xPos + textWidth > (SCREEN_WIDTH-4)) { +ADDRLP4 20 +INDIRI4 +ADDRLP4 24 +INDIRI4 +ADDI4 +CNSTI4 636 +LEI4 $2177 +line 4923 +;4923: fDescScale -= 0.001f; +ADDRLP4 68 +ADDRLP4 68 +INDIRF4 +CNSTF4 981668463 +SUBF4 +ASGNF4 +line 4924 +;4924: continue; +ADDRGP4 $2169 +JUMPV +LABELV $2177 +line 4926 +;4925: } +;4926: } +LABELV $2175 +line 4930 +;4927: +;4928: // Try to adjust it's y placement if the scale has changed... +;4929: // +;4930: if (fDescScale != fDescScaleCopy) +ADDRLP4 68 +INDIRF4 +ADDRLP4 72 +INDIRF4 +EQF4 $2179 +line 4931 +;4931: { +line 4932 +;4932: int iOriginalTextHeight = DC->textHeight(textPtr, fDescScaleCopy, FONT_MEDIUM); +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRLP4 72 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 92 +ADDRGP4 DC +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 88 +ADDRLP4 92 +INDIRI4 +ASGNI4 +line 4933 +;4933: iYadj = iOriginalTextHeight - DC->textHeight(textPtr, fDescScale, FONT_MEDIUM); +ADDRLP4 64 +INDIRP4 +ARGP4 +ADDRLP4 68 +INDIRF4 +ARGF4 +CNSTI4 2 +ARGI4 +ADDRLP4 96 +ADDRGP4 DC +INDIRP4 +CNSTI4 24 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 76 +ADDRLP4 88 +INDIRI4 +ADDRLP4 96 +INDIRI4 +SUBI4 +ASGNI4 +line 4934 +;4934: } +LABELV $2179 +line 4936 +;4935: +;4936: DC->drawText(xPos, parent->descY + iYadj, fDescScale, parent->descColor, textPtr, 0, 0, item->textStyle, FONT_MEDIUM); +ADDRLP4 20 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1288 +ADDP4 +INDIRI4 +ADDRLP4 76 +INDIRI4 +ADDI4 +CVIF4 4 +ARGF4 +ADDRLP4 68 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1292 +ADDP4 +ARGP4 +ADDRLP4 64 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +CNSTI4 0 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +INDIRI4 +ARGI4 +CNSTI4 2 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 4937 +;4937: break; +ADDRGP4 $2170 +JUMPV +LABELV $2169 +line 4901 +ADDRGP4 $2168 +JUMPV +LABELV $2170 +line 4939 +;4938: } +;4939: } +line 4940 +;4940: } +LABELV $2164 +line 4941 +;4941: } +LABELV $2161 +line 4942 +;4942: } +LABELV $2159 +line 4945 +;4943: +;4944: // paint the rect first.. +;4945: Window_Paint(&item->window, parent->fadeAmount , parent->fadeClamp, parent->fadeCycle); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 Window_Paint +CALLV +pop +line 4947 +;4946: +;4947: if (debugMode) { +ADDRGP4 debugMode +INDIRI4 +CNSTI4 0 +EQI4 $2181 +line 4949 +;4948: vec4_t color; +;4949: rectDef_t *r = Item_CorrectedTextRect(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 76 +ADDRGP4 Item_CorrectedTextRect +CALLP4 +ASGNP4 +ADDRLP4 56 +ADDRLP4 76 +INDIRP4 +ASGNP4 +line 4950 +;4950: color[1] = color[3] = 1; +ADDRLP4 80 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 60+12 +ADDRLP4 80 +INDIRF4 +ASGNF4 +ADDRLP4 60+4 +ADDRLP4 80 +INDIRF4 +ASGNF4 +line 4951 +;4951: color[0] = color[2] = 0; +ADDRLP4 84 +CNSTF4 0 +ASGNF4 +ADDRLP4 60+8 +ADDRLP4 84 +INDIRF4 +ASGNF4 +ADDRLP4 60 +ADDRLP4 84 +INDIRF4 +ASGNF4 +line 4952 +;4952: DC->drawRect(r->x, r->y, r->w, r->h, 1, color); +ADDRLP4 56 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 56 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 60 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRP4 +CALLV +pop +line 4953 +;4953: } +LABELV $2181 +line 4957 +;4954: +;4955: //DC->drawRect(item->window.rect.x, item->window.rect.y, item->window.rect.w, item->window.rect.h, 1, red); +;4956: +;4957: switch (item->type) { +ADDRLP4 56 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 56 +INDIRI4 +CNSTI4 0 +LTI4 $2187 +ADDRLP4 56 +INDIRI4 +CNSTI4 14 +GTI4 $2187 +ADDRLP4 56 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $2202 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $2202 +address $2190 +address $2190 +address $2187 +address $2187 +address $2193 +address $2187 +address $2195 +address $2197 +address $2189 +address $2193 +address $2201 +address $2198 +address $2199 +address $2200 +address $2196 +code +LABELV $2189 +line 4959 +;4958: case ITEM_TYPE_OWNERDRAW: +;4959: Item_OwnerDraw_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_OwnerDraw_Paint +CALLV +pop +line 4960 +;4960: break; +ADDRGP4 $2187 +JUMPV +LABELV $2190 +line 4963 +;4961: case ITEM_TYPE_TEXT: +;4962: case ITEM_TYPE_BUTTON: +;4963: Item_Text_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Text_Paint +CALLV +pop +line 4964 +;4964: break; +ADDRGP4 $2187 +JUMPV +line 4966 +;4965: case ITEM_TYPE_RADIOBUTTON: +;4966: break; +line 4968 +;4967: case ITEM_TYPE_CHECKBOX: +;4968: break; +LABELV $2193 +line 4971 +;4969: case ITEM_TYPE_EDITFIELD: +;4970: case ITEM_TYPE_NUMERICFIELD: +;4971: Item_TextField_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_TextField_Paint +CALLV +pop +line 4972 +;4972: break; +ADDRGP4 $2187 +JUMPV +line 4974 +;4973: case ITEM_TYPE_COMBO: +;4974: break; +LABELV $2195 +line 4976 +;4975: case ITEM_TYPE_LISTBOX: +;4976: Item_ListBox_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ListBox_Paint +CALLV +pop +line 4977 +;4977: break; +ADDRGP4 $2187 +JUMPV +LABELV $2196 +line 4979 +;4978: case ITEM_TYPE_TEXTSCROLL: +;4979: Item_TextScroll_Paint ( item ); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_TextScroll_Paint +CALLV +pop +line 4980 +;4980: break; +ADDRGP4 $2187 +JUMPV +LABELV $2197 +line 4985 +;4981: //case ITEM_TYPE_IMAGE: +;4982: // Item_Image_Paint(item); +;4983: // break; +;4984: case ITEM_TYPE_MODEL: +;4985: Item_Model_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Model_Paint +CALLV +pop +line 4986 +;4986: break; +ADDRGP4 $2187 +JUMPV +LABELV $2198 +line 4988 +;4987: case ITEM_TYPE_YESNO: +;4988: Item_YesNo_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_YesNo_Paint +CALLV +pop +line 4989 +;4989: break; +ADDRGP4 $2187 +JUMPV +LABELV $2199 +line 4991 +;4990: case ITEM_TYPE_MULTI: +;4991: Item_Multi_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Multi_Paint +CALLV +pop +line 4992 +;4992: break; +ADDRGP4 $2187 +JUMPV +LABELV $2200 +line 4994 +;4993: case ITEM_TYPE_BIND: +;4994: Item_Bind_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Bind_Paint +CALLV +pop +line 4995 +;4995: break; +ADDRGP4 $2187 +JUMPV +LABELV $2201 +line 4997 +;4996: case ITEM_TYPE_SLIDER: +;4997: Item_Slider_Paint(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_Slider_Paint +CALLV +pop +line 4998 +;4998: break; +line 5000 +;4999: default: +;5000: break; +LABELV $2187 +line 5003 +;5001: } +;5002: +;5003:} +LABELV $2098 +endproc Item_Paint 108 36 +export Menu_Init +proc Menu_Init 0 12 +line 5005 +;5004: +;5005:void Menu_Init(menuDef_t *menu) { +line 5006 +;5006: memset(menu, 0, sizeof(menuDef_t)); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 1328 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 5007 +;5007: menu->cursorItem = -1; +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +CNSTI4 -1 +ASGNI4 +line 5008 +;5008: menu->fadeAmount = DC->Assets.fadeAmount; +ADDRFP4 0 +INDIRP4 +CNSTI4 208 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 360 +ADDP4 +INDIRF4 +ASGNF4 +line 5009 +;5009: menu->fadeClamp = DC->Assets.fadeClamp; +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 352 +ADDP4 +INDIRF4 +ASGNF4 +line 5010 +;5010: menu->fadeCycle = DC->Assets.fadeCycle; +ADDRFP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 356 +ADDP4 +INDIRI4 +ASGNI4 +line 5011 +;5011: Window_Init(&menu->window); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Window_Init +CALLV +pop +line 5012 +;5012:} +LABELV $2203 +endproc Menu_Init 0 12 +export Menu_GetFocusedItem +proc Menu_GetFocusedItem 8 0 +line 5014 +;5013: +;5014:itemDef_t *Menu_GetFocusedItem(menuDef_t *menu) { +line 5016 +;5015: int i; +;5016: if (menu) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2205 +line 5017 +;5017: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2210 +JUMPV +LABELV $2207 +line 5018 +;5018: if (menu->items[i]->window.flags & WINDOW_HASFOCUS) { +ADDRLP4 4 +CNSTI4 2 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +BANDI4 +CNSTI4 0 +EQI4 $2211 +line 5019 +;5019: return menu->items[i]; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +RETP4 +ADDRGP4 $2204 +JUMPV +LABELV $2211 +line 5021 +;5020: } +;5021: } +LABELV $2208 +line 5017 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2210 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $2207 +line 5022 +;5022: } +LABELV $2205 +line 5023 +;5023: return NULL; +CNSTP4 0 +RETP4 +LABELV $2204 +endproc Menu_GetFocusedItem 8 0 +export Menu_GetFocused +proc Menu_GetFocused 12 0 +line 5026 +;5024:} +;5025: +;5026:menuDef_t *Menu_GetFocused() { +line 5028 +;5027: int i; +;5028: for (i = 0; i < menuCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2217 +JUMPV +LABELV $2214 +line 5029 +;5029: if (Menus[i].window.flags & WINDOW_HASFOCUS && Menus[i].window.flags & WINDOW_VISIBLE) { +ADDRLP4 4 +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 Menus+68 +ADDP4 +INDIRI4 +CNSTI4 2 +BANDI4 +ADDRLP4 8 +INDIRI4 +EQI4 $2218 +ADDRLP4 4 +INDIRI4 +ADDRGP4 Menus+68 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +ADDRLP4 8 +INDIRI4 +EQI4 $2218 +line 5030 +;5030: return &Menus[i]; +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +RETP4 +ADDRGP4 $2213 +JUMPV +LABELV $2218 +line 5032 +;5031: } +;5032: } +LABELV $2215 +line 5028 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2217 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $2214 +line 5033 +;5033: return NULL; +CNSTP4 0 +RETP4 +LABELV $2213 +endproc Menu_GetFocused 12 0 +export Menu_ScrollFeeder +proc Menu_ScrollFeeder 12 16 +line 5036 +;5034:} +;5035: +;5036:void Menu_ScrollFeeder(menuDef_t *menu, int feeder, qboolean down) { +line 5037 +;5037: if (menu) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2223 +line 5039 +;5038: int i; +;5039: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2228 +JUMPV +LABELV $2225 +line 5040 +;5040: if (menu->items[i]->special == feeder) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +NEF4 $2229 +line 5041 +;5041: Item_ListBox_HandleKey(menu->items[i], (down) ? A_CURSOR_DOWN : A_CURSOR_UP, qtrue, qtrue); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $2232 +ADDRLP4 4 +CNSTI4 171 +ASGNI4 +ADDRGP4 $2233 +JUMPV +LABELV $2232 +ADDRLP4 4 +CNSTI4 170 +ASGNI4 +LABELV $2233 +ADDRLP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +CNSTI4 1 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRGP4 Item_ListBox_HandleKey +CALLI4 +pop +line 5042 +;5042: return; +ADDRGP4 $2222 +JUMPV +LABELV $2229 +line 5044 +;5043: } +;5044: } +LABELV $2226 +line 5039 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2228 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $2225 +line 5045 +;5045: } +LABELV $2223 +line 5046 +;5046:} +LABELV $2222 +endproc Menu_ScrollFeeder 12 16 +export Menu_SetFeederSelection +proc Menu_SetFeederSelection 8 8 +line 5050 +;5047: +;5048: +;5049: +;5050:void Menu_SetFeederSelection(menuDef_t *menu, int feeder, int index, const char *name) { +line 5051 +;5051: if (menu == NULL) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2235 +line 5052 +;5052: if (name == NULL) { +ADDRFP4 12 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2237 +line 5053 +;5053: menu = Menu_GetFocused(); +ADDRLP4 0 +ADDRGP4 Menu_GetFocused +CALLP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 5054 +;5054: } else { +ADDRGP4 $2238 +JUMPV +LABELV $2237 +line 5055 +;5055: menu = Menus_FindByName(name); +ADDRFP4 12 +INDIRP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 Menus_FindByName +CALLP4 +ASGNP4 +ADDRFP4 0 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 5056 +;5056: } +LABELV $2238 +line 5057 +;5057: } +LABELV $2235 +line 5059 +;5058: +;5059: if (menu) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2239 +line 5061 +;5060: int i; +;5061: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2244 +JUMPV +LABELV $2241 +line 5062 +;5062: if (menu->items[i]->special == feeder) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +NEF4 $2245 +line 5063 +;5063: if (index == 0) { +ADDRFP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2247 +line 5064 +;5064: listBoxDef_t *listPtr = (listBoxDef_t*)menu->items[i]->typeData; +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5065 +;5065: listPtr->cursorPos = 0; +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 0 +ASGNI4 +line 5066 +;5066: listPtr->startPos = 0; +ADDRLP4 4 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 5067 +;5067: } +LABELV $2247 +line 5068 +;5068: menu->items[i]->cursorPos = index; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 544 +ADDP4 +ADDRFP4 8 +INDIRI4 +ASGNI4 +line 5069 +;5069: DC->feederSelection(menu->items[i]->special, menu->items[i]->cursorPos); +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CNSTI4 540 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRP4 +CNSTI4 544 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 164 +ADDP4 +INDIRP4 +CALLI4 +pop +line 5070 +;5070: return; +ADDRGP4 $2234 +JUMPV +LABELV $2245 +line 5072 +;5071: } +;5072: } +LABELV $2242 +line 5061 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2244 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $2241 +line 5073 +;5073: } +LABELV $2239 +line 5074 +;5074:} +LABELV $2234 +endproc Menu_SetFeederSelection 8 8 +export Menus_AnyFullScreenVisible +proc Menus_AnyFullScreenVisible 12 0 +line 5076 +;5075: +;5076:qboolean Menus_AnyFullScreenVisible() { +line 5078 +;5077: int i; +;5078: for (i = 0; i < menuCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2253 +JUMPV +LABELV $2250 +line 5079 +;5079: if (Menus[i].window.flags & WINDOW_VISIBLE && Menus[i].fullScreen) { +ADDRLP4 4 +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ASGNI4 +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRLP4 4 +INDIRI4 +ADDRGP4 Menus+68 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +ADDRLP4 8 +INDIRI4 +EQI4 $2254 +ADDRLP4 4 +INDIRI4 +ADDRGP4 Menus+184 +ADDP4 +INDIRI4 +ADDRLP4 8 +INDIRI4 +EQI4 $2254 +line 5080 +;5080: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2249 +JUMPV +LABELV $2254 +line 5082 +;5081: } +;5082: } +LABELV $2251 +line 5078 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2253 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $2250 +line 5083 +;5083: return qfalse; +CNSTI4 0 +RETI4 +LABELV $2249 +endproc Menus_AnyFullScreenVisible 12 0 +export Menus_ActivateByName +proc Menus_ActivateByName 28 12 +line 5086 +;5084:} +;5085: +;5086:menuDef_t *Menus_ActivateByName(const char *p) { +line 5088 +;5087: int i; +;5088: menuDef_t *m = NULL; +ADDRLP4 4 +CNSTP4 0 +ASGNP4 +line 5089 +;5089: menuDef_t *focus = Menu_GetFocused(); +ADDRLP4 12 +ADDRGP4 Menu_GetFocused +CALLP4 +ASGNP4 +ADDRLP4 8 +ADDRLP4 12 +INDIRP4 +ASGNP4 +line 5090 +;5090: for (i = 0; i < menuCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2262 +JUMPV +LABELV $2259 +line 5091 +;5091: if (Q_stricmp(Menus[i].window.name, p) == 0) { +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus+32 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $2263 +line 5092 +;5092: m = &Menus[i]; +ADDRLP4 4 +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ASGNP4 +line 5093 +;5093: Menus_Activate(m); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Menus_Activate +CALLV +pop +line 5094 +;5094: if (openMenuCount < MAX_OPEN_MENUS && focus != NULL) { +ADDRGP4 openMenuCount +INDIRI4 +CNSTI4 16 +GEI4 $2264 +ADDRLP4 8 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2264 +line 5095 +;5095: menuStack[openMenuCount++] = focus; +ADDRLP4 24 +ADDRGP4 openMenuCount +ASGNP4 +ADDRLP4 20 +ADDRLP4 24 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 24 +INDIRP4 +ADDRLP4 20 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 menuStack +ADDP4 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 5096 +;5096: } +line 5097 +;5097: } else { +ADDRGP4 $2264 +JUMPV +LABELV $2263 +line 5098 +;5098: Menus[i].window.flags &= ~WINDOW_HASFOCUS; +ADDRLP4 20 +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus+68 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 -3 +BANDI4 +ASGNI4 +line 5099 +;5099: } +LABELV $2264 +line 5100 +;5100: } +LABELV $2260 +line 5090 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2262 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $2259 +line 5101 +;5101: Display_CloseCinematics(); +ADDRGP4 Display_CloseCinematics +CALLV +pop +line 5104 +;5102: +;5103: // Want to handle a mouse move on the new menu in case your already over an item +;5104: Menu_HandleMouseMove ( m, DC->cursorx, DC->cursory ); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 16 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 Menu_HandleMouseMove +CALLV +pop +line 5106 +;5105: +;5106: return m; +ADDRLP4 4 +INDIRP4 +RETP4 +LABELV $2258 +endproc Menus_ActivateByName 28 12 +export Item_Init +proc Item_Init 0 12 +line 5110 +;5107:} +;5108: +;5109: +;5110:void Item_Init(itemDef_t *item) { +line 5111 +;5111: memset(item, 0, sizeof(itemDef_t)); +ADDRFP4 0 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 564 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 5112 +;5112: item->textscale = 0.55f; +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +CNSTF4 1057803469 +ASGNF4 +line 5113 +;5113: Window_Init(&item->window); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Window_Init +CALLV +pop +line 5114 +;5114:} +LABELV $2269 +endproc Item_Init 0 12 +export Menu_HandleMouseMove +proc Menu_HandleMouseMove 52 12 +line 5116 +;5115: +;5116:void Menu_HandleMouseMove(menuDef_t *menu, float x, float y) { +line 5118 +;5117: int i, pass; +;5118: qboolean focusSet = qfalse; +ADDRLP4 12 +CNSTI4 0 +ASGNI4 +line 5121 +;5119: +;5120: itemDef_t *overItem; +;5121: if (menu == NULL) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2271 +line 5122 +;5122: return; +ADDRGP4 $2270 +JUMPV +LABELV $2271 +line 5125 +;5123: } +;5124: +;5125: if (!(menu->window.flags & (WINDOW_VISIBLE | WINDOW_FORCED))) { +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1048580 +BANDI4 +CNSTI4 0 +NEI4 $2273 +line 5126 +;5126: return; +ADDRGP4 $2270 +JUMPV +LABELV $2273 +line 5129 +;5127: } +;5128: +;5129: if (itemCapture) { +ADDRGP4 itemCapture +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2275 +line 5131 +;5130: //Item_MouseMove(itemCapture, x, y); +;5131: return; +ADDRGP4 $2270 +JUMPV +LABELV $2275 +line 5134 +;5132: } +;5133: +;5134: if (g_waitingForKey || g_editingField) { +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRGP4 g_waitingForKey +INDIRI4 +ADDRLP4 16 +INDIRI4 +NEI4 $2279 +ADDRGP4 g_editingField +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $2277 +LABELV $2279 +line 5135 +;5135: return; +ADDRGP4 $2270 +JUMPV +LABELV $2277 +line 5140 +;5136: } +;5137: +;5138: // FIXME: this is the whole issue of focus vs. mouse over.. +;5139: // need a better overall solution as i don't like going through everything twice +;5140: for (pass = 0; pass < 2; pass++) { +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +LABELV $2280 +line 5141 +;5141: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2287 +JUMPV +LABELV $2284 +line 5145 +;5142: // turn off focus each item +;5143: // menu->items[i].window.flags &= ~WINDOW_HASFOCUS; +;5144: +;5145: if (!(menu->items[i]->window.flags & (WINDOW_VISIBLE | WINDOW_FORCED))) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1048580 +BANDI4 +CNSTI4 0 +NEI4 $2288 +line 5146 +;5146: continue; +ADDRGP4 $2285 +JUMPV +LABELV $2288 +line 5150 +;5147: } +;5148: +;5149: // items can be enabled and disabled based on cvars +;5150: if (menu->items[i]->cvarFlags & (CVAR_ENABLE | CVAR_DISABLE) && !Item_EnableShowViaCvar(menu->items[i], CVAR_ENABLE)) { +ADDRLP4 20 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 3 +BANDI4 +CNSTI4 0 +EQI4 $2290 +ADDRLP4 20 +INDIRP4 +ARGP4 +CNSTI4 1 +ARGI4 +ADDRLP4 24 +ADDRGP4 Item_EnableShowViaCvar +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +NEI4 $2290 +line 5151 +;5151: continue; +ADDRGP4 $2285 +JUMPV +LABELV $2290 +line 5154 +;5152: } +;5153: +;5154: if (menu->items[i]->cvarFlags & (CVAR_SHOW | CVAR_HIDE) && !Item_EnableShowViaCvar(menu->items[i], CVAR_SHOW)) { +ADDRLP4 28 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +CNSTI4 288 +ADDP4 +INDIRI4 +CNSTI4 12 +BANDI4 +CNSTI4 0 +EQI4 $2292 +ADDRLP4 28 +INDIRP4 +ARGP4 +CNSTI4 4 +ARGI4 +ADDRLP4 32 +ADDRGP4 Item_EnableShowViaCvar +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +NEI4 $2292 +line 5155 +;5155: continue; +ADDRGP4 $2285 +JUMPV +LABELV $2292 +line 5160 +;5156: } +;5157: +;5158: +;5159: +;5160: if (Rect_ContainsPoint(&menu->items[i]->window.rect, x, y)) { +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 36 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +EQI4 $2294 +line 5161 +;5161: if (pass == 1) { +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +NEI4 $2295 +line 5162 +;5162: overItem = menu->items[i]; +ADDRLP4 4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +line 5163 +;5163: if (overItem->type == ITEM_TYPE_TEXT && overItem->text) { +ADDRLP4 4 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $2298 +ADDRLP4 4 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2298 +line 5164 +;5164: if (!Rect_ContainsPoint(Item_CorrectedTextRect(overItem), x, y)) { +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 44 +ADDRGP4 Item_CorrectedTextRect +CALLP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 48 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 48 +INDIRI4 +CNSTI4 0 +NEI4 $2300 +line 5165 +;5165: continue; +ADDRGP4 $2285 +JUMPV +LABELV $2300 +line 5167 +;5166: } +;5167: } +LABELV $2298 +line 5169 +;5168: // if we are over an item +;5169: if (IsVisible(overItem->window.flags)) { +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 44 +ADDRGP4 IsVisible +CALLI4 +ASGNI4 +ADDRLP4 44 +INDIRI4 +CNSTI4 0 +EQI4 $2295 +line 5171 +;5170: // different one +;5171: Item_MouseEnter(overItem, x, y); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRGP4 Item_MouseEnter +CALLV +pop +line 5175 +;5172: // Item_SetMouseOver(overItem, qtrue); +;5173: +;5174: // if item is not a decoration see if it can take focus +;5175: if (!focusSet) { +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $2295 +line 5176 +;5176: focusSet = Item_SetFocus(overItem, x, y); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 48 +ADDRGP4 Item_SetFocus +CALLI4 +ASGNI4 +ADDRLP4 12 +ADDRLP4 48 +INDIRI4 +ASGNI4 +line 5177 +;5177: } +line 5178 +;5178: } +line 5179 +;5179: } +line 5180 +;5180: } else if (menu->items[i]->window.flags & WINDOW_MOUSEOVER) { +ADDRGP4 $2295 +JUMPV +LABELV $2294 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1 +BANDI4 +CNSTI4 0 +EQI4 $2306 +line 5181 +;5181: Item_MouseLeave(menu->items[i]); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_MouseLeave +CALLV +pop +line 5182 +;5182: Item_SetMouseOver(menu->items[i], qfalse); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 Item_SetMouseOver +CALLV +pop +line 5183 +;5183: } +LABELV $2306 +LABELV $2295 +line 5184 +;5184: } +LABELV $2285 +line 5141 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2287 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $2284 +line 5185 +;5185: } +LABELV $2281 +line 5140 +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LTI4 $2280 +line 5187 +;5186: +;5187:} +LABELV $2270 +endproc Menu_HandleMouseMove 52 12 +export Menu_Paint +proc Menu_Paint 48 24 +line 5189 +;5188: +;5189:void Menu_Paint(menuDef_t *menu, qboolean forcePaint) { +line 5192 +;5190: int i; +;5191: +;5192: if (menu == NULL) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2309 +line 5193 +;5193: return; +ADDRGP4 $2308 +JUMPV +LABELV $2309 +line 5196 +;5194: } +;5195: +;5196: if (!(menu->window.flags & WINDOW_VISIBLE) && !forcePaint) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 4 +BANDI4 +ADDRLP4 4 +INDIRI4 +NEI4 $2311 +ADDRFP4 4 +INDIRI4 +ADDRLP4 4 +INDIRI4 +NEI4 $2311 +line 5197 +;5197: return; +ADDRGP4 $2308 +JUMPV +LABELV $2311 +line 5200 +;5198: } +;5199: +;5200: if (menu->window.ownerDrawFlags && DC->ownerDrawVisible && !DC->ownerDrawVisible(menu->window.ownerDrawFlags)) { +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $2313 +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +CNSTI4 104 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2313 +ADDRLP4 8 +INDIRI4 +ARGI4 +ADDRLP4 16 +ADDRLP4 12 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +NEI4 $2313 +line 5201 +;5201: return; +ADDRGP4 $2308 +JUMPV +LABELV $2313 +line 5204 +;5202: } +;5203: +;5204: if (forcePaint) { +ADDRFP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $2315 +line 5205 +;5205: menu->window.flags |= WINDOW_FORCED; +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ADDRLP4 20 +INDIRP4 +INDIRI4 +CNSTI4 1048576 +BORI4 +ASGNI4 +line 5206 +;5206: } +LABELV $2315 +line 5209 +;5207: +;5208: // draw the background if necessary +;5209: if (menu->fullScreen) { +ADDRFP4 0 +INDIRP4 +CNSTI4 184 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2317 +line 5212 +;5210: // implies a background shader +;5211: // FIXME: make sure we have a default shader if fullscreen is set with no background +;5212: DC->drawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, menu->window.background ); +ADDRLP4 20 +CNSTF4 0 +ASGNF4 +ADDRLP4 20 +INDIRF4 +ARGF4 +ADDRLP4 20 +INDIRF4 +ARGF4 +CNSTF4 1142947840 +ARGF4 +CNSTF4 1139802112 +ARGF4 +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +CALLV +pop +line 5213 +;5213: } else if (menu->window.background) { +ADDRGP4 $2318 +JUMPV +LABELV $2317 +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +INDIRI4 +CNSTI4 0 +EQI4 $2319 +line 5216 +;5214: // this allows a background shader without being full screen +;5215: //UI_DrawHandlePic(menu->window.rect.x, menu->window.rect.y, menu->window.rect.w, menu->window.rect.h, menu->backgroundShader); +;5216: } +LABELV $2319 +LABELV $2318 +line 5219 +;5217: +;5218: // paint the background and or border +;5219: Window_Paint(&menu->window, menu->fadeAmount, menu->fadeClamp, menu->fadeCycle ); +ADDRLP4 20 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 20 +INDIRP4 +ARGP4 +ADDRLP4 20 +INDIRP4 +CNSTI4 208 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 204 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 20 +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 Window_Paint +CALLV +pop +line 5222 +;5220: +;5221: // Loop through all items for the menu and paint them +;5222: for (i = 0; i < menu->itemCount; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2324 +JUMPV +LABELV $2321 +line 5223 +;5223: { +line 5224 +;5224: if (!menu->items[i]->appearanceSlot) +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 556 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $2325 +line 5225 +;5225: { +line 5226 +;5226: Item_Paint(menu->items[i]); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_Paint +CALLV +pop +line 5227 +;5227: } +ADDRGP4 $2326 +JUMPV +LABELV $2325 +line 5229 +;5228: else // Timed order of appearance +;5229: { +line 5230 +;5230: if (menu->appearanceTime < DC->realTime) // Time to show another item +ADDRFP4 0 +INDIRP4 +CNSTI4 1316 +ADDP4 +INDIRF4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CVIF4 4 +GEF4 $2327 +line 5231 +;5231: { +line 5232 +;5232: menu->appearanceTime = DC->realTime + menu->appearanceIncrement; +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +CNSTI4 1316 +ADDP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 240 +ADDP4 +INDIRI4 +CVIF4 4 +ADDRLP4 24 +INDIRP4 +CNSTI4 1324 +ADDP4 +INDIRF4 +ADDF4 +ASGNF4 +line 5233 +;5233: menu->appearanceCnt++; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 1320 +ADDP4 +ASGNP4 +ADDRLP4 28 +INDIRP4 +ADDRLP4 28 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 5234 +;5234: } +LABELV $2327 +line 5236 +;5235: +;5236: if (menu->items[i]->appearanceSlot<=menu->appearanceCnt) +ADDRLP4 24 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 24 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 556 +ADDP4 +INDIRI4 +ADDRLP4 24 +INDIRP4 +CNSTI4 1320 +ADDP4 +INDIRI4 +GTI4 $2329 +line 5237 +;5237: { +line 5238 +;5238: Item_Paint(menu->items[i]); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_Paint +CALLV +pop +line 5239 +;5239: } +LABELV $2329 +line 5240 +;5240: } +LABELV $2326 +line 5241 +;5241: } +LABELV $2322 +line 5222 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2324 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $2321 +line 5243 +;5242: +;5243: if (debugMode) { +ADDRGP4 debugMode +INDIRI4 +CNSTI4 0 +EQI4 $2331 +line 5245 +;5244: vec4_t color; +;5245: color[0] = color[2] = color[3] = 1; +ADDRLP4 40 +CNSTF4 1065353216 +ASGNF4 +ADDRLP4 24+12 +ADDRLP4 40 +INDIRF4 +ASGNF4 +ADDRLP4 24+8 +ADDRLP4 40 +INDIRF4 +ASGNF4 +ADDRLP4 24 +ADDRLP4 40 +INDIRF4 +ASGNF4 +line 5246 +;5246: color[1] = 0; +ADDRLP4 24+4 +CNSTF4 0 +ASGNF4 +line 5247 +;5247: DC->drawRect(menu->window.rect.x, menu->window.rect.y, menu->window.rect.w, menu->window.rect.h, 1, color); +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +INDIRF4 +ARGF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 44 +INDIRP4 +CNSTI4 12 +ADDP4 +INDIRF4 +ARGF4 +CNSTF4 1065353216 +ARGF4 +ADDRLP4 24 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRP4 +CALLV +pop +line 5248 +;5248: } +LABELV $2331 +line 5249 +;5249:} +LABELV $2308 +endproc Menu_Paint 48 24 +export Item_ValidateTypeData +proc Item_ValidateTypeData 8 12 +line 5257 +;5250: +;5251:/* +;5252:=============== +;5253:Item_ValidateTypeData +;5254:=============== +;5255:*/ +;5256:void Item_ValidateTypeData(itemDef_t *item) +;5257:{ +line 5258 +;5258: if (item->typeData) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2337 +line 5259 +;5259: { +line 5260 +;5260: return; +ADDRGP4 $2336 +JUMPV +LABELV $2337 +line 5263 +;5261: } +;5262: +;5263: if (item->type == ITEM_TYPE_LISTBOX) +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $2339 +line 5264 +;5264: { +line 5265 +;5265: item->typeData = UI_Alloc(sizeof(listBoxDef_t)); +CNSTI4 232 +ARGI4 +ADDRLP4 0 +ADDRGP4 UI_Alloc +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 5266 +;5266: memset(item->typeData, 0, sizeof(listBoxDef_t)); +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 232 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 5267 +;5267: } +ADDRGP4 $2340 +JUMPV +LABELV $2339 +line 5268 +;5268: else if (item->type == ITEM_TYPE_EDITFIELD || item->type == ITEM_TYPE_NUMERICFIELD || item->type == ITEM_TYPE_YESNO || item->type == ITEM_TYPE_BIND || item->type == ITEM_TYPE_SLIDER || item->type == ITEM_TYPE_TEXT) +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +EQI4 $2347 +ADDRLP4 0 +INDIRI4 +CNSTI4 9 +EQI4 $2347 +ADDRLP4 0 +INDIRI4 +CNSTI4 11 +EQI4 $2347 +ADDRLP4 0 +INDIRI4 +CNSTI4 13 +EQI4 $2347 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +EQI4 $2347 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2341 +LABELV $2347 +line 5269 +;5269: { +line 5270 +;5270: item->typeData = UI_Alloc(sizeof(editFieldDef_t)); +CNSTI4 28 +ARGI4 +ADDRLP4 4 +ADDRGP4 UI_Alloc +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 5271 +;5271: memset(item->typeData, 0, sizeof(editFieldDef_t)); +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 28 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 5272 +;5272: if (item->type == ITEM_TYPE_EDITFIELD) +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 4 +NEI4 $2342 +line 5273 +;5273: { +line 5274 +;5274: if (!((editFieldDef_t *) item->typeData)->maxPaintChars) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $2342 +line 5275 +;5275: { +line 5276 +;5276: ((editFieldDef_t *) item->typeData)->maxPaintChars = MAX_EDITFIELD; +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CNSTI4 20 +ADDP4 +CNSTI4 256 +ASGNI4 +line 5277 +;5277: } +line 5278 +;5278: } +line 5279 +;5279: } +ADDRGP4 $2342 +JUMPV +LABELV $2341 +line 5280 +;5280: else if (item->type == ITEM_TYPE_MULTI) +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 12 +NEI4 $2352 +line 5281 +;5281: { +line 5282 +;5282: item->typeData = UI_Alloc(sizeof(multiDef_t)); +CNSTI4 392 +ARGI4 +ADDRLP4 4 +ADDRGP4 UI_Alloc +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 5283 +;5283: } +ADDRGP4 $2353 +JUMPV +LABELV $2352 +line 5284 +;5284: else if (item->type == ITEM_TYPE_MODEL) +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 7 +NEI4 $2354 +line 5285 +;5285: { +line 5286 +;5286: item->typeData = UI_Alloc(sizeof(modelDef_t)); +CNSTI4 28 +ARGI4 +ADDRLP4 4 +ADDRGP4 UI_Alloc +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 5287 +;5287: } +ADDRGP4 $2355 +JUMPV +LABELV $2354 +line 5288 +;5288: else if (item->type == ITEM_TYPE_TEXTSCROLL ) +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 14 +NEI4 $2356 +line 5289 +;5289: { +line 5290 +;5290: item->typeData = UI_Alloc(sizeof(textScrollDef_t)); +CNSTI4 1048 +ARGI4 +ADDRLP4 4 +ADDRGP4 UI_Alloc +CALLP4 +ASGNP4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 5291 +;5291: } +LABELV $2356 +LABELV $2355 +LABELV $2353 +LABELV $2342 +LABELV $2340 +line 5292 +;5292:} +LABELV $2336 +endproc Item_ValidateTypeData 8 12 +export KeywordHash_Key +proc KeywordHash_Key 20 0 +line 5309 +;5293: +;5294:/* +;5295:=============== +;5296:Keyword Hash +;5297:=============== +;5298:*/ +;5299: +;5300:#define KEYWORDHASH_SIZE 512 +;5301: +;5302:typedef struct keywordHash_s +;5303:{ +;5304: char *keyword; +;5305: qboolean (*func)(itemDef_t *item, int handle); +;5306: struct keywordHash_s *next; +;5307:} keywordHash_t; +;5308: +;5309:int KeywordHash_Key(char *keyword) { +line 5312 +;5310: int register hash, i; +;5311: +;5312: hash = 0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +line 5313 +;5313: for (i = 0; keyword[i] != '\0'; i++) { +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2362 +JUMPV +LABELV $2359 +line 5314 +;5314: if (keyword[i] >= 'A' && keyword[i] <= 'Z') +ADDRLP4 8 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 65 +LTI4 $2363 +ADDRLP4 8 +INDIRI4 +CNSTI4 90 +GTI4 $2363 +line 5315 +;5315: hash += (keyword[i] + ('a' - 'A')) * (119 + i); +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 32 +ADDI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 119 +ADDI4 +MULI4 +ADDI4 +ASGNI4 +ADDRGP4 $2364 +JUMPV +LABELV $2363 +line 5317 +;5316: else +;5317: hash += keyword[i] * (119 + i); +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +ADDRLP4 4 +INDIRI4 +CNSTI4 119 +ADDI4 +MULI4 +ADDI4 +ASGNI4 +LABELV $2364 +line 5318 +;5318: } +LABELV $2360 +line 5313 +ADDRLP4 4 +ADDRLP4 4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2362 +ADDRLP4 4 +INDIRI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $2359 +line 5319 +;5319: hash = (hash ^ (hash >> 10) ^ (hash >> 20)) & (KEYWORDHASH_SIZE-1); +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 10 +RSHI4 +BXORI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 20 +RSHI4 +BXORI4 +CNSTI4 511 +BANDI4 +ASGNI4 +line 5320 +;5320: return hash; +ADDRLP4 0 +INDIRI4 +RETI4 +LABELV $2358 +endproc KeywordHash_Key 20 0 +export KeywordHash_Add +proc KeywordHash_Add 8 4 +line 5323 +;5321:} +;5322: +;5323:void KeywordHash_Add(keywordHash_t *table[], keywordHash_t *key) { +line 5326 +;5324: int hash; +;5325: +;5326: hash = KeywordHash_Key(key->keyword); +ADDRFP4 4 +INDIRP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 KeywordHash_Key +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 5332 +;5327:/* +;5328: if (table[hash]) { +;5329: int collision = qtrue; +;5330: } +;5331:*/ +;5332: key->next = table[hash]; +ADDRFP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRP4 +ASGNP4 +line 5333 +;5333: table[hash] = key; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +ADDRFP4 4 +INDIRP4 +ASGNP4 +line 5334 +;5334:} +LABELV $2365 +endproc KeywordHash_Add 8 4 +export KeywordHash_Find +proc KeywordHash_Find 16 8 +line 5337 +;5335: +;5336:keywordHash_t *KeywordHash_Find(keywordHash_t *table[], char *keyword) +;5337:{ +line 5341 +;5338: keywordHash_t *key; +;5339: int hash; +;5340: +;5341: hash = KeywordHash_Key(keyword); +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 KeywordHash_Key +CALLI4 +ASGNI4 +ADDRLP4 4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 5342 +;5342: for (key = table[hash]; key; key = key->next) { +ADDRLP4 0 +ADDRLP4 4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +ADDP4 +INDIRP4 +ASGNP4 +ADDRGP4 $2370 +JUMPV +LABELV $2367 +line 5343 +;5343: if (!Q_stricmp(key->keyword, keyword)) +ADDRLP4 0 +INDIRP4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $2371 +line 5344 +;5344: return key; +ADDRLP4 0 +INDIRP4 +RETP4 +ADDRGP4 $2366 +JUMPV +LABELV $2371 +line 5345 +;5345: } +LABELV $2368 +line 5342 +ADDRLP4 0 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRP4 +ASGNP4 +LABELV $2370 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2367 +line 5346 +;5346: return NULL; +CNSTP4 0 +RETP4 +LABELV $2366 +endproc KeywordHash_Find 16 8 +export ItemParse_name +proc ItemParse_name 4 8 +line 5356 +;5347:} +;5348: +;5349:/* +;5350:=============== +;5351:Item Keyword Parse functions +;5352:=============== +;5353:*/ +;5354: +;5355:// name +;5356:qboolean ItemParse_name( itemDef_t *item, int handle ) { +line 5357 +;5357: if (!PC_String_Parse(handle, &item->window.name)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2374 +line 5358 +;5358: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2373 +JUMPV +LABELV $2374 +line 5360 +;5359: } +;5360: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2373 +endproc ItemParse_name 4 8 +export ItemParse_focusSound +proc ItemParse_focusSound 12 8 +line 5364 +;5361:} +;5362: +;5363:// name +;5364:qboolean ItemParse_focusSound( itemDef_t *item, int handle ) { +line 5366 +;5365: const char *temp; +;5366: if (!PC_String_Parse(handle, &temp)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2377 +line 5367 +;5367: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2376 +JUMPV +LABELV $2377 +line 5369 +;5368: } +;5369: item->focusSound = DC->registerSound(temp); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 292 +ADDP4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 5370 +;5370: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2376 +endproc ItemParse_focusSound 12 8 +export ItemParse_text +proc ItemParse_text 4 8 +line 5375 +;5371:} +;5372: +;5373: +;5374:// text +;5375:qboolean ItemParse_text( itemDef_t *item, int handle ) { +line 5376 +;5376: if (!PC_String_Parse(handle, &item->text)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2380 +line 5377 +;5377: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2379 +JUMPV +LABELV $2380 +line 5379 +;5378: } +;5379: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2379 +endproc ItemParse_text 4 8 +export ItemParse_descText +proc ItemParse_descText 4 8 +line 5389 +;5380:} +;5381: +;5382:/* +;5383:=============== +;5384:ItemParse_descText +;5385: text +;5386:=============== +;5387:*/ +;5388:qboolean ItemParse_descText( itemDef_t *item, int handle) +;5389:{ +line 5391 +;5390: +;5391: if (!PC_String_Parse(handle, &item->descText)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 552 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2383 +line 5392 +;5392: { +line 5393 +;5393: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2382 +JUMPV +LABELV $2383 +line 5396 +;5394: } +;5395: +;5396: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2382 +endproc ItemParse_descText 4 8 +export ItemParse_text2 +proc ItemParse_text2 4 8 +line 5408 +;5397: +;5398:} +;5399: +;5400: +;5401:/* +;5402:=============== +;5403:ItemParse_text +;5404: text +;5405:=============== +;5406:*/ +;5407:qboolean ItemParse_text2( itemDef_t *item, int handle) +;5408:{ +line 5410 +;5409: +;5410: if (!PC_String_Parse(handle, &item->text2)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2386 +line 5411 +;5411: { +line 5412 +;5412: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2385 +JUMPV +LABELV $2386 +line 5415 +;5413: } +;5414: +;5415: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2385 +endproc ItemParse_text2 4 8 +export ItemParse_text2alignx +proc ItemParse_text2alignx 4 8 +line 5425 +;5416: +;5417:} +;5418: +;5419:/* +;5420:=============== +;5421:ItemParse_text2alignx +;5422:=============== +;5423:*/ +;5424:qboolean ItemParse_text2alignx( itemDef_t *item, int handle) +;5425:{ +line 5426 +;5426: if (!PC_Float_Parse(handle, &item->text2alignx)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 232 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2389 +line 5427 +;5427: { +line 5428 +;5428: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2388 +JUMPV +LABELV $2389 +line 5430 +;5429: } +;5430: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2388 +endproc ItemParse_text2alignx 4 8 +export ItemParse_text2aligny +proc ItemParse_text2aligny 4 8 +line 5439 +;5431:} +;5432: +;5433:/* +;5434:=============== +;5435:ItemParse_text2aligny +;5436:=============== +;5437:*/ +;5438:qboolean ItemParse_text2aligny( itemDef_t *item, int handle) +;5439:{ +line 5440 +;5440: if (!PC_Float_Parse(handle, &item->text2aligny)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 236 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2392 +line 5441 +;5441: { +line 5442 +;5442: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2391 +JUMPV +LABELV $2392 +line 5444 +;5443: } +;5444: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2391 +endproc ItemParse_text2aligny 4 8 +export ItemParse_group +proc ItemParse_group 4 8 +line 5448 +;5445:} +;5446: +;5447:// group +;5448:qboolean ItemParse_group( itemDef_t *item, int handle ) { +line 5449 +;5449: if (!PC_String_Parse(handle, &item->window.group)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 36 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2395 +line 5450 +;5450: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2394 +JUMPV +LABELV $2395 +line 5452 +;5451: } +;5452: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2394 +endproc ItemParse_group 4 8 +export ItemParse_asset_model +proc ItemParse_asset_model 20 8 +line 5456 +;5453:} +;5454: +;5455:// asset_model +;5456:qboolean ItemParse_asset_model( itemDef_t *item, int handle ) { +line 5459 +;5457: const char *temp; +;5458: modelDef_t *modelPtr; +;5459: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5460 +;5460: modelPtr = (modelDef_t*)item->typeData; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5462 +;5461: +;5462: if (!PC_String_Parse(handle, &temp)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2398 +line 5463 +;5463: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2397 +JUMPV +LABELV $2398 +line 5465 +;5464: } +;5465: item->asset = DC->registerModel(temp); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +CNSTI4 28 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 244 +ADDP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 5466 +;5466: modelPtr->angle = rand() % 360; +ADDRLP4 16 +ADDRGP4 rand +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 16 +INDIRI4 +CNSTI4 360 +MODI4 +ASGNI4 +line 5467 +;5467: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2397 +endproc ItemParse_asset_model 20 8 +export ItemParse_asset_shader +proc ItemParse_asset_shader 12 8 +line 5471 +;5468:} +;5469: +;5470:// asset_shader +;5471:qboolean ItemParse_asset_shader( itemDef_t *item, int handle ) { +line 5474 +;5472: const char *temp; +;5473: +;5474: if (!PC_String_Parse(handle, &temp)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2401 +line 5475 +;5475: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2400 +JUMPV +LABELV $2401 +line 5477 +;5476: } +;5477: item->asset = DC->registerShaderNoMip(temp); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 244 +ADDP4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 5478 +;5478: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2400 +endproc ItemParse_asset_shader 12 8 +export ItemParse_model_origin +proc ItemParse_model_origin 16 8 +line 5482 +;5479:} +;5480: +;5481:// model_origin +;5482:qboolean ItemParse_model_origin( itemDef_t *item, int handle ) { +line 5484 +;5483: modelDef_t *modelPtr; +;5484: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5485 +;5485: modelPtr = (modelDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5487 +;5486: +;5487: if (PC_Float_Parse(handle, &modelPtr->origin[0])) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $2404 +line 5488 +;5488: if (PC_Float_Parse(handle, &modelPtr->origin[1])) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $2406 +line 5489 +;5489: if (PC_Float_Parse(handle, &modelPtr->origin[2])) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $2408 +line 5490 +;5490: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2403 +JUMPV +LABELV $2408 +line 5492 +;5491: } +;5492: } +LABELV $2406 +line 5493 +;5493: } +LABELV $2404 +line 5494 +;5494: return qfalse; +CNSTI4 0 +RETI4 +LABELV $2403 +endproc ItemParse_model_origin 16 8 +export ItemParse_model_fovx +proc ItemParse_model_fovx 8 8 +line 5498 +;5495:} +;5496: +;5497:// model_fovx +;5498:qboolean ItemParse_model_fovx( itemDef_t *item, int handle ) { +line 5500 +;5499: modelDef_t *modelPtr; +;5500: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5501 +;5501: modelPtr = (modelDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5503 +;5502: +;5503: if (!PC_Float_Parse(handle, &modelPtr->fov_x)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2411 +line 5504 +;5504: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2410 +JUMPV +LABELV $2411 +line 5506 +;5505: } +;5506: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2410 +endproc ItemParse_model_fovx 8 8 +export ItemParse_model_fovy +proc ItemParse_model_fovy 8 8 +line 5510 +;5507:} +;5508: +;5509:// model_fovy +;5510:qboolean ItemParse_model_fovy( itemDef_t *item, int handle ) { +line 5512 +;5511: modelDef_t *modelPtr; +;5512: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5513 +;5513: modelPtr = (modelDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5515 +;5514: +;5515: if (!PC_Float_Parse(handle, &modelPtr->fov_y)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2414 +line 5516 +;5516: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2413 +JUMPV +LABELV $2414 +line 5518 +;5517: } +;5518: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2413 +endproc ItemParse_model_fovy 8 8 +export ItemParse_model_rotation +proc ItemParse_model_rotation 8 8 +line 5522 +;5519:} +;5520: +;5521:// model_rotation +;5522:qboolean ItemParse_model_rotation( itemDef_t *item, int handle ) { +line 5524 +;5523: modelDef_t *modelPtr; +;5524: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5525 +;5525: modelPtr = (modelDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5527 +;5526: +;5527: if (!PC_Int_Parse(handle, &modelPtr->rotationSpeed)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2417 +line 5528 +;5528: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2416 +JUMPV +LABELV $2417 +line 5530 +;5529: } +;5530: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2416 +endproc ItemParse_model_rotation 8 8 +export ItemParse_model_angle +proc ItemParse_model_angle 8 8 +line 5534 +;5531:} +;5532: +;5533:// model_angle +;5534:qboolean ItemParse_model_angle( itemDef_t *item, int handle ) { +line 5536 +;5535: modelDef_t *modelPtr; +;5536: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5537 +;5537: modelPtr = (modelDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5539 +;5538: +;5539: if (!PC_Int_Parse(handle, &modelPtr->angle)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2420 +line 5540 +;5540: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2419 +JUMPV +LABELV $2420 +line 5542 +;5541: } +;5542: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2419 +endproc ItemParse_model_angle 8 8 +export ItemParse_rect +proc ItemParse_rect 4 8 +line 5546 +;5543:} +;5544: +;5545:// rect +;5546:qboolean ItemParse_rect( itemDef_t *item, int handle ) { +line 5547 +;5547: if (!PC_Rect_Parse(handle, &item->window.rectClient)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Rect_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2423 +line 5548 +;5548: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2422 +JUMPV +LABELV $2423 +line 5550 +;5549: } +;5550: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2422 +endproc ItemParse_rect 4 8 +export ItemParse_flag +proc ItemParse_flag 20 8 +line 5560 +;5551:} +;5552: +;5553:/* +;5554:=============== +;5555:ItemParse_flag +;5556: style +;5557:=============== +;5558:*/ +;5559:qboolean ItemParse_flag( itemDef_t *item, int handle) +;5560:{ +line 5564 +;5561: int i; +;5562: char *tempStr; +;5563: +;5564: if (!PC_String_Parse(handle, (const char **)&tempStr)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2426 +line 5565 +;5565: { +line 5566 +;5566: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2425 +JUMPV +LABELV $2426 +line 5569 +;5567: } +;5568: +;5569: i=0; +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2429 +JUMPV +LABELV $2428 +line 5571 +;5570: while (styles[i]) +;5571: { +line 5572 +;5572: if (Q_stricmp(tempStr,itemFlags[i].string)==0) +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 itemFlags +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $2431 +line 5573 +;5573: { +line 5574 +;5574: item->window.flags |= itemFlags[i].value; +ADDRLP4 16 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 itemFlags+4 +ADDP4 +INDIRI4 +BORI4 +ASGNI4 +line 5575 +;5575: break; +ADDRGP4 $2430 +JUMPV +LABELV $2431 +line 5577 +;5576: } +;5577: i++; +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 5578 +;5578: } +LABELV $2429 +line 5570 +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 styles +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2428 +LABELV $2430 +line 5580 +;5579: +;5580: if (itemFlags[i].string == NULL) +ADDRLP4 0 +INDIRI4 +CNSTI4 3 +LSHI4 +ADDRGP4 itemFlags +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2434 +line 5581 +;5581: { +line 5582 +;5582: Com_Printf(va( S_COLOR_YELLOW "Unknown item style value '%s'",tempStr)); +ADDRGP4 $2436 +ARGP4 +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 5583 +;5583: } +LABELV $2434 +line 5585 +;5584: +;5585: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2425 +endproc ItemParse_flag 20 8 +export ItemParse_style +proc ItemParse_style 4 8 +line 5595 +;5586:} +;5587: +;5588:/* +;5589:=============== +;5590:ItemParse_style +;5591: style +;5592:=============== +;5593:*/ +;5594:qboolean ItemParse_style( itemDef_t *item, int handle) +;5595:{ +line 5596 +;5596: if (!PC_Int_Parse(handle, &item->window.style)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2438 +line 5597 +;5597: { +line 5598 +;5598: Com_Printf(S_COLOR_YELLOW "Unknown item style value"); +ADDRGP4 $2440 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 5599 +;5599: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2437 +JUMPV +LABELV $2438 +line 5602 +;5600: } +;5601: +;5602: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2437 +endproc ItemParse_style 4 8 +export ItemParse_decoration +proc ItemParse_decoration 4 0 +line 5607 +;5603:} +;5604: +;5605: +;5606:// decoration +;5607:qboolean ItemParse_decoration( itemDef_t *item, int handle ) { +line 5608 +;5608: item->window.flags |= WINDOW_DECORATION; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 16 +BORI4 +ASGNI4 +line 5609 +;5609: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2441 +endproc ItemParse_decoration 4 0 +export ItemParse_notselectable +proc ItemParse_notselectable 4 4 +line 5613 +;5610:} +;5611: +;5612:// notselectable +;5613:qboolean ItemParse_notselectable( itemDef_t *item, int handle ) { +line 5615 +;5614: listBoxDef_t *listPtr; +;5615: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5616 +;5616: listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5617 +;5617: if (item->type == ITEM_TYPE_LISTBOX && listPtr) { +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 6 +NEI4 $2443 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2443 +line 5618 +;5618: listPtr->notselectable = qtrue; +ADDRLP4 0 +INDIRP4 +CNSTI4 228 +ADDP4 +CNSTI4 1 +ASGNI4 +line 5619 +;5619: } +LABELV $2443 +line 5620 +;5620: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2442 +endproc ItemParse_notselectable 4 4 +export ItemParse_wrapped +proc ItemParse_wrapped 4 0 +line 5624 +;5621:} +;5622: +;5623:// manually wrapped +;5624:qboolean ItemParse_wrapped( itemDef_t *item, int handle ) { +line 5625 +;5625: item->window.flags |= WINDOW_WRAPPED; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 262144 +BORI4 +ASGNI4 +line 5626 +;5626: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2445 +endproc ItemParse_wrapped 4 0 +export ItemParse_autowrapped +proc ItemParse_autowrapped 4 0 +line 5630 +;5627:} +;5628: +;5629:// auto wrapped +;5630:qboolean ItemParse_autowrapped( itemDef_t *item, int handle ) { +line 5631 +;5631: item->window.flags |= WINDOW_AUTOWRAPPED; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 524288 +BORI4 +ASGNI4 +line 5632 +;5632: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2446 +endproc ItemParse_autowrapped 4 0 +export ItemParse_horizontalscroll +proc ItemParse_horizontalscroll 4 0 +line 5637 +;5633:} +;5634: +;5635: +;5636:// horizontalscroll +;5637:qboolean ItemParse_horizontalscroll( itemDef_t *item, int handle ) { +line 5638 +;5638: item->window.flags |= WINDOW_HORIZONTAL; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +ADDRLP4 0 +INDIRP4 +INDIRI4 +CNSTI4 1024 +BORI4 +ASGNI4 +line 5639 +;5639: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2447 +endproc ItemParse_horizontalscroll 4 0 +export ItemParse_type +proc ItemParse_type 4 8 +line 5649 +;5640:} +;5641: +;5642:/* +;5643:=============== +;5644:ItemParse_type +;5645: type +;5646:=============== +;5647:*/ +;5648:qboolean ItemParse_type( itemDef_t *item, int handle ) +;5649:{ +line 5652 +;5650:// int i,holdInt; +;5651: +;5652: if (!PC_Int_Parse(handle, &item->type)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2449 +line 5653 +;5653: { +line 5654 +;5654: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2448 +JUMPV +LABELV $2449 +line 5656 +;5655: } +;5656: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5657 +;5657: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2448 +endproc ItemParse_type 4 8 +export ItemParse_elementwidth +proc ItemParse_elementwidth 8 8 +line 5662 +;5658:} +;5659: +;5660:// elementwidth, used for listbox image elements +;5661:// uses textalignx for storage +;5662:qboolean ItemParse_elementwidth( itemDef_t *item, int handle ) { +line 5665 +;5663: listBoxDef_t *listPtr; +;5664: +;5665: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5666 +;5666: listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5667 +;5667: if (!PC_Float_Parse(handle, &listPtr->elementWidth)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2452 +line 5668 +;5668: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2451 +JUMPV +LABELV $2452 +line 5670 +;5669: } +;5670: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2451 +endproc ItemParse_elementwidth 8 8 +export ItemParse_elementheight +proc ItemParse_elementheight 8 8 +line 5675 +;5671:} +;5672: +;5673:// elementheight, used for listbox image elements +;5674:// uses textaligny for storage +;5675:qboolean ItemParse_elementheight( itemDef_t *item, int handle ) { +line 5678 +;5676: listBoxDef_t *listPtr; +;5677: +;5678: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5679 +;5679: listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5680 +;5680: if (!PC_Float_Parse(handle, &listPtr->elementHeight)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2455 +line 5681 +;5681: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2454 +JUMPV +LABELV $2455 +line 5683 +;5682: } +;5683: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2454 +endproc ItemParse_elementheight 8 8 +export ItemParse_feeder +proc ItemParse_feeder 4 8 +line 5687 +;5684:} +;5685: +;5686:// feeder +;5687:qboolean ItemParse_feeder( itemDef_t *item, int handle ) { +line 5688 +;5688: if (!PC_Float_Parse(handle, &item->special)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 540 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2458 +line 5689 +;5689: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2457 +JUMPV +LABELV $2458 +line 5691 +;5690: } +;5691: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2457 +endproc ItemParse_feeder 4 8 +export ItemParse_elementtype +proc ItemParse_elementtype 8 8 +line 5696 +;5692:} +;5693: +;5694:// elementtype, used to specify what type of elements a listbox contains +;5695:// uses textstyle for storage +;5696:qboolean ItemParse_elementtype( itemDef_t *item, int handle ) { +line 5699 +;5697: listBoxDef_t *listPtr; +;5698: +;5699: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5700 +;5700: if (!item->typeData) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2461 +line 5701 +;5701: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2460 +JUMPV +LABELV $2461 +line 5702 +;5702: listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5703 +;5703: if (!PC_Int_Parse(handle, &listPtr->elementStyle)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2463 +line 5704 +;5704: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2460 +JUMPV +LABELV $2463 +line 5706 +;5705: } +;5706: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2460 +endproc ItemParse_elementtype 8 8 +export ItemParse_columns +proc ItemParse_columns 40 8 +line 5710 +;5707:} +;5708: +;5709:// columns sets a number of columns and an x pos and width per.. +;5710:qboolean ItemParse_columns( itemDef_t *item, int handle ) { +line 5714 +;5711: int num, i; +;5712: listBoxDef_t *listPtr; +;5713: +;5714: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5715 +;5715: if (!item->typeData) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2466 +line 5716 +;5716: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2465 +JUMPV +LABELV $2466 +line 5717 +;5717: listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5718 +;5718: if (PC_Int_Parse(handle, &num)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ARGP4 +ADDRLP4 12 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $2468 +line 5719 +;5719: if (num > MAX_LB_COLUMNS) { +ADDRLP4 8 +INDIRI4 +CNSTI4 16 +LEI4 $2470 +line 5720 +;5720: num = MAX_LB_COLUMNS; +ADDRLP4 8 +CNSTI4 16 +ASGNI4 +line 5721 +;5721: } +LABELV $2470 +line 5722 +;5722: listPtr->numColumns = num; +ADDRLP4 4 +INDIRP4 +CNSTI4 28 +ADDP4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 5723 +;5723: for (i = 0; i < num; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2475 +JUMPV +LABELV $2472 +line 5726 +;5724: int pos, width, maxChars; +;5725: +;5726: if (PC_Int_Parse(handle, &pos) && PC_Int_Parse(handle, &width) && PC_Int_Parse(handle, &maxChars)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 16 +ARGP4 +ADDRLP4 28 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +EQI4 $2476 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 20 +ARGP4 +ADDRLP4 32 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $2476 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 24 +ARGP4 +ADDRLP4 36 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 36 +INDIRI4 +CNSTI4 0 +EQI4 $2476 +line 5727 +;5727: listPtr->columnInfo[i].pos = pos; +CNSTI4 12 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDP4 +ADDRLP4 16 +INDIRI4 +ASGNI4 +line 5728 +;5728: listPtr->columnInfo[i].width = width; +CNSTI4 12 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDP4 +CNSTI4 4 +ADDP4 +ADDRLP4 20 +INDIRI4 +ASGNI4 +line 5729 +;5729: listPtr->columnInfo[i].maxChars = maxChars; +CNSTI4 12 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 32 +ADDP4 +ADDP4 +CNSTI4 8 +ADDP4 +ADDRLP4 24 +INDIRI4 +ASGNI4 +line 5730 +;5730: } else { +ADDRGP4 $2477 +JUMPV +LABELV $2476 +line 5731 +;5731: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2465 +JUMPV +LABELV $2477 +line 5733 +;5732: } +;5733: } +LABELV $2473 +line 5723 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2475 +ADDRLP4 0 +INDIRI4 +ADDRLP4 8 +INDIRI4 +LTI4 $2472 +line 5734 +;5734: } else { +ADDRGP4 $2469 +JUMPV +LABELV $2468 +line 5735 +;5735: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2465 +JUMPV +LABELV $2469 +line 5737 +;5736: } +;5737: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2465 +endproc ItemParse_columns 40 8 +export ItemParse_border +proc ItemParse_border 4 8 +line 5740 +;5738:} +;5739: +;5740:qboolean ItemParse_border( itemDef_t *item, int handle ) { +line 5741 +;5741: if (!PC_Int_Parse(handle, &item->window.border)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2479 +line 5742 +;5742: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2478 +JUMPV +LABELV $2479 +line 5744 +;5743: } +;5744: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2478 +endproc ItemParse_border 4 8 +export ItemParse_bordersize +proc ItemParse_bordersize 4 8 +line 5747 +;5745:} +;5746: +;5747:qboolean ItemParse_bordersize( itemDef_t *item, int handle ) { +line 5748 +;5748: if (!PC_Float_Parse(handle, &item->window.borderSize)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2482 +line 5749 +;5749: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2481 +JUMPV +LABELV $2482 +line 5751 +;5750: } +;5751: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2481 +endproc ItemParse_bordersize 4 8 +export ItemParse_visible +proc ItemParse_visible 12 8 +line 5754 +;5752:} +;5753: +;5754:qboolean ItemParse_visible( itemDef_t *item, int handle ) { +line 5757 +;5755: int i; +;5756: +;5757: if (!PC_Int_Parse(handle, &i)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2485 +line 5758 +;5758: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2484 +JUMPV +LABELV $2485 +line 5760 +;5759: } +;5760: if (i) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $2487 +line 5761 +;5761: item->window.flags |= WINDOW_VISIBLE; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 4 +BORI4 +ASGNI4 +line 5762 +;5762: } +LABELV $2487 +line 5763 +;5763: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2484 +endproc ItemParse_visible 12 8 +export ItemParse_ownerdraw +proc ItemParse_ownerdraw 4 8 +line 5766 +;5764:} +;5765: +;5766:qboolean ItemParse_ownerdraw( itemDef_t *item, int handle ) { +line 5767 +;5767: if (!PC_Int_Parse(handle, &item->window.ownerDraw)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2490 +line 5768 +;5768: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2489 +JUMPV +LABELV $2490 +line 5770 +;5769: } +;5770: item->type = ITEM_TYPE_OWNERDRAW; +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +CNSTI4 8 +ASGNI4 +line 5771 +;5771: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2489 +endproc ItemParse_ownerdraw 4 8 +export ItemParse_align +proc ItemParse_align 4 8 +line 5774 +;5772:} +;5773: +;5774:qboolean ItemParse_align( itemDef_t *item, int handle ) { +line 5775 +;5775: if (!PC_Int_Parse(handle, &item->alignment)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2493 +line 5776 +;5776: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2492 +JUMPV +LABELV $2493 +line 5778 +;5777: } +;5778: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2492 +endproc ItemParse_align 4 8 +export ItemParse_textalign +proc ItemParse_textalign 4 8 +line 5787 +;5779:} +;5780: +;5781:/* +;5782:=============== +;5783:ItemParse_textalign +;5784:=============== +;5785:*/ +;5786:qboolean ItemParse_textalign( itemDef_t *item, int handle ) +;5787:{ +line 5788 +;5788: if (!PC_Int_Parse(handle, &item->textalignment)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2496 +line 5789 +;5789: { +line 5790 +;5790: Com_Printf(S_COLOR_YELLOW "Unknown text alignment value"); +ADDRGP4 $2498 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 5792 +;5791: +;5792: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2495 +JUMPV +LABELV $2496 +line 5795 +;5793: } +;5794: +;5795: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2495 +endproc ItemParse_textalign 4 8 +export ItemParse_textalignx +proc ItemParse_textalignx 4 8 +line 5798 +;5796:} +;5797: +;5798:qboolean ItemParse_textalignx( itemDef_t *item, int handle ) { +line 5799 +;5799: if (!PC_Float_Parse(handle, &item->textalignx)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 208 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2500 +line 5800 +;5800: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2499 +JUMPV +LABELV $2500 +line 5802 +;5801: } +;5802: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2499 +endproc ItemParse_textalignx 4 8 +export ItemParse_textaligny +proc ItemParse_textaligny 4 8 +line 5805 +;5803:} +;5804: +;5805:qboolean ItemParse_textaligny( itemDef_t *item, int handle ) { +line 5806 +;5806: if (!PC_Float_Parse(handle, &item->textaligny)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2503 +line 5807 +;5807: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2502 +JUMPV +LABELV $2503 +line 5809 +;5808: } +;5809: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2502 +endproc ItemParse_textaligny 4 8 +export ItemParse_textscale +proc ItemParse_textscale 4 8 +line 5812 +;5810:} +;5811: +;5812:qboolean ItemParse_textscale( itemDef_t *item, int handle ) { +line 5813 +;5813: if (!PC_Float_Parse(handle, &item->textscale)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2506 +line 5814 +;5814: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2505 +JUMPV +LABELV $2506 +line 5816 +;5815: } +;5816: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2505 +endproc ItemParse_textscale 4 8 +export ItemParse_textstyle +proc ItemParse_textstyle 4 8 +line 5819 +;5817:} +;5818: +;5819:qboolean ItemParse_textstyle( itemDef_t *item, int handle ) { +line 5820 +;5820: if (!PC_Int_Parse(handle, &item->textStyle)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2509 +line 5821 +;5821: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2508 +JUMPV +LABELV $2509 +line 5823 +;5822: } +;5823: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2508 +endproc ItemParse_textstyle 4 8 +export ItemParse_backcolor +proc ItemParse_backcolor 12 8 +line 5826 +;5824:} +;5825: +;5826:qboolean ItemParse_backcolor( itemDef_t *item, int handle ) { +line 5830 +;5827: int i; +;5828: float f; +;5829: +;5830: for (i = 0; i < 4; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $2512 +line 5831 +;5831: if (!PC_Float_Parse(handle, &f)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2516 +line 5832 +;5832: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2511 +JUMPV +LABELV $2516 +line 5834 +;5833: } +;5834: item->window.backColor[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 5835 +;5835: } +LABELV $2513 +line 5830 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $2512 +line 5836 +;5836: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2511 +endproc ItemParse_backcolor 12 8 +export ItemParse_forecolor +proc ItemParse_forecolor 16 8 +line 5839 +;5837:} +;5838: +;5839:qboolean ItemParse_forecolor( itemDef_t *item, int handle ) { +line 5843 +;5840: int i; +;5841: float f; +;5842: +;5843: for (i = 0; i < 4; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $2519 +line 5844 +;5844: if (!PC_Float_Parse(handle, &f)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2523 +line 5845 +;5845: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2518 +JUMPV +LABELV $2523 +line 5847 +;5846: } +;5847: item->window.foreColor[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 112 +ADDP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 5848 +;5848: item->window.flags |= WINDOW_FORECOLORSET; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +CNSTI4 512 +BORI4 +ASGNI4 +line 5849 +;5849: } +LABELV $2520 +line 5843 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $2519 +line 5850 +;5850: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2518 +endproc ItemParse_forecolor 16 8 +export ItemParse_bordercolor +proc ItemParse_bordercolor 12 8 +line 5853 +;5851:} +;5852: +;5853:qboolean ItemParse_bordercolor( itemDef_t *item, int handle ) { +line 5857 +;5854: int i; +;5855: float f; +;5856: +;5857: for (i = 0; i < 4; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $2526 +line 5858 +;5858: if (!PC_Float_Parse(handle, &f)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2530 +line 5859 +;5859: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2525 +JUMPV +LABELV $2530 +line 5861 +;5860: } +;5861: item->window.borderColor[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 144 +ADDP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 5862 +;5862: } +LABELV $2527 +line 5857 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $2526 +line 5863 +;5863: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2525 +endproc ItemParse_bordercolor 12 8 +export ItemParse_outlinecolor +proc ItemParse_outlinecolor 4 8 +line 5866 +;5864:} +;5865: +;5866:qboolean ItemParse_outlinecolor( itemDef_t *item, int handle ) { +line 5867 +;5867: if (!PC_Color_Parse(handle, &item->window.outlineColor)){ +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Color_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2533 +line 5868 +;5868: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2532 +JUMPV +LABELV $2533 +line 5870 +;5869: } +;5870: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2532 +endproc ItemParse_outlinecolor 4 8 +export ItemParse_background +proc ItemParse_background 12 8 +line 5873 +;5871:} +;5872: +;5873:qboolean ItemParse_background( itemDef_t *item, int handle ) { +line 5876 +;5874: const char *temp; +;5875: +;5876: if (!PC_String_Parse(handle, &temp)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2536 +line 5877 +;5877: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2535 +JUMPV +LABELV $2536 +line 5879 +;5878: } +;5879: item->window.background = DC->registerShaderNoMip(temp); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 176 +ADDP4 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 5880 +;5880: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2535 +endproc ItemParse_background 12 8 +export ItemParse_cinematic +proc ItemParse_cinematic 4 8 +line 5883 +;5881:} +;5882: +;5883:qboolean ItemParse_cinematic( itemDef_t *item, int handle ) { +line 5884 +;5884: if (!PC_String_Parse(handle, &item->window.cinematicName)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2539 +line 5885 +;5885: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2538 +JUMPV +LABELV $2539 +line 5887 +;5886: } +;5887: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2538 +endproc ItemParse_cinematic 4 8 +export ItemParse_doubleClick +proc ItemParse_doubleClick 8 8 +line 5890 +;5888:} +;5889: +;5890:qboolean ItemParse_doubleClick( itemDef_t *item, int handle ) { +line 5893 +;5891: listBoxDef_t *listPtr; +;5892: +;5893: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5894 +;5894: if (!item->typeData) { +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2542 +line 5895 +;5895: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2541 +JUMPV +LABELV $2542 +line 5898 +;5896: } +;5897: +;5898: listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5900 +;5899: +;5900: if (!PC_Script_Parse(handle, &listPtr->doubleClick)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2544 +line 5901 +;5901: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2541 +JUMPV +LABELV $2544 +line 5903 +;5902: } +;5903: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2541 +endproc ItemParse_doubleClick 8 8 +export ItemParse_onFocus +proc ItemParse_onFocus 4 8 +line 5906 +;5904:} +;5905: +;5906:qboolean ItemParse_onFocus( itemDef_t *item, int handle ) { +line 5907 +;5907: if (!PC_Script_Parse(handle, &item->onFocus)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 268 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2547 +line 5908 +;5908: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2546 +JUMPV +LABELV $2547 +line 5910 +;5909: } +;5910: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2546 +endproc ItemParse_onFocus 4 8 +export ItemParse_leaveFocus +proc ItemParse_leaveFocus 4 8 +line 5913 +;5911:} +;5912: +;5913:qboolean ItemParse_leaveFocus( itemDef_t *item, int handle ) { +line 5914 +;5914: if (!PC_Script_Parse(handle, &item->leaveFocus)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 272 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2550 +line 5915 +;5915: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2549 +JUMPV +LABELV $2550 +line 5917 +;5916: } +;5917: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2549 +endproc ItemParse_leaveFocus 4 8 +export ItemParse_mouseEnter +proc ItemParse_mouseEnter 4 8 +line 5920 +;5918:} +;5919: +;5920:qboolean ItemParse_mouseEnter( itemDef_t *item, int handle ) { +line 5921 +;5921: if (!PC_Script_Parse(handle, &item->mouseEnter)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2553 +line 5922 +;5922: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2552 +JUMPV +LABELV $2553 +line 5924 +;5923: } +;5924: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2552 +endproc ItemParse_mouseEnter 4 8 +export ItemParse_mouseExit +proc ItemParse_mouseExit 4 8 +line 5927 +;5925:} +;5926: +;5927:qboolean ItemParse_mouseExit( itemDef_t *item, int handle ) { +line 5928 +;5928: if (!PC_Script_Parse(handle, &item->mouseExit)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2556 +line 5929 +;5929: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2555 +JUMPV +LABELV $2556 +line 5931 +;5930: } +;5931: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2555 +endproc ItemParse_mouseExit 4 8 +export ItemParse_mouseEnterText +proc ItemParse_mouseEnterText 4 8 +line 5934 +;5932:} +;5933: +;5934:qboolean ItemParse_mouseEnterText( itemDef_t *item, int handle ) { +line 5935 +;5935: if (!PC_Script_Parse(handle, &item->mouseEnterText)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 248 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2559 +line 5936 +;5936: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2558 +JUMPV +LABELV $2559 +line 5938 +;5937: } +;5938: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2558 +endproc ItemParse_mouseEnterText 4 8 +export ItemParse_mouseExitText +proc ItemParse_mouseExitText 4 8 +line 5941 +;5939:} +;5940: +;5941:qboolean ItemParse_mouseExitText( itemDef_t *item, int handle ) { +line 5942 +;5942: if (!PC_Script_Parse(handle, &item->mouseExitText)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 252 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2562 +line 5943 +;5943: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2561 +JUMPV +LABELV $2562 +line 5945 +;5944: } +;5945: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2561 +endproc ItemParse_mouseExitText 4 8 +export ItemParse_action +proc ItemParse_action 4 8 +line 5948 +;5946:} +;5947: +;5948:qboolean ItemParse_action( itemDef_t *item, int handle ) { +line 5949 +;5949: if (!PC_Script_Parse(handle, &item->action)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 264 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2565 +line 5950 +;5950: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2564 +JUMPV +LABELV $2565 +line 5952 +;5951: } +;5952: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2564 +endproc ItemParse_action 4 8 +export ItemParse_special +proc ItemParse_special 4 8 +line 5955 +;5953:} +;5954: +;5955:qboolean ItemParse_special( itemDef_t *item, int handle ) { +line 5956 +;5956: if (!PC_Float_Parse(handle, &item->special)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 540 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2568 +line 5957 +;5957: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2567 +JUMPV +LABELV $2568 +line 5959 +;5958: } +;5959: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2567 +endproc ItemParse_special 4 8 +export ItemParse_cvarTest +proc ItemParse_cvarTest 4 8 +line 5962 +;5960:} +;5961: +;5962:qboolean ItemParse_cvarTest( itemDef_t *item, int handle ) { +line 5963 +;5963: if (!PC_String_Parse(handle, &item->cvarTest)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 280 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2571 +line 5964 +;5964: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2570 +JUMPV +LABELV $2571 +line 5966 +;5965: } +;5966: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2570 +endproc ItemParse_cvarTest 4 8 +export ItemParse_cvar +proc ItemParse_cvar 24 8 +line 5970 +;5967:} +;5968: +;5969:qboolean ItemParse_cvar( itemDef_t *item, int handle ) +;5970:{ +line 5971 +;5971: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 5972 +;5972: if (!PC_String_Parse(handle, &item->cvar)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2574 +line 5973 +;5973: { +line 5974 +;5974: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2573 +JUMPV +LABELV $2574 +line 5977 +;5975: } +;5976: +;5977: if ( item->typeData) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2576 +line 5978 +;5978: { +line 5981 +;5979: editFieldDef_t *editPtr; +;5980: +;5981: switch ( item->type ) +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 16 +CNSTI4 0 +ASGNI4 +ADDRLP4 8 +INDIRI4 +ADDRLP4 16 +INDIRI4 +EQI4 $2581 +ADDRLP4 8 +INDIRI4 +ADDRLP4 16 +INDIRI4 +LTI4 $2578 +LABELV $2582 +ADDRLP4 8 +INDIRI4 +CNSTI4 4 +LTI4 $2578 +ADDRLP4 8 +INDIRI4 +CNSTI4 13 +GTI4 $2578 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRGP4 $2583-16 +ADDP4 +INDIRP4 +JUMPV +lit +align 4 +LABELV $2583 +address $2581 +address $2578 +address $2578 +address $2578 +address $2578 +address $2581 +address $2581 +address $2581 +address $2578 +address $2581 +code +line 5982 +;5982: { +LABELV $2581 +line 5989 +;5983: case ITEM_TYPE_EDITFIELD: +;5984: case ITEM_TYPE_NUMERICFIELD: +;5985: case ITEM_TYPE_YESNO: +;5986: case ITEM_TYPE_BIND: +;5987: case ITEM_TYPE_SLIDER: +;5988: case ITEM_TYPE_TEXT: +;5989: editPtr = (editFieldDef_t*)item->typeData; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 5990 +;5990: editPtr->minVal = -1; +ADDRLP4 4 +INDIRP4 +CNSTF4 3212836864 +ASGNF4 +line 5991 +;5991: editPtr->maxVal = -1; +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTF4 3212836864 +ASGNF4 +line 5992 +;5992: editPtr->defVal = -1; +ADDRLP4 4 +INDIRP4 +CNSTI4 8 +ADDP4 +CNSTF4 3212836864 +ASGNF4 +line 5993 +;5993: break; +LABELV $2578 +LABELV $2579 +line 5995 +;5994: } +;5995: } +LABELV $2576 +line 5996 +;5996: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2573 +endproc ItemParse_cvar 24 8 +export ItemParse_font +proc ItemParse_font 4 8 +line 6000 +;5997:} +;5998: +;5999:qboolean ItemParse_font( itemDef_t *item, int handle ) +;6000:{ +line 6001 +;6001: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 6002 +;6002: if (!PC_Int_Parse(handle, &item->iMenuFont)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 560 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2586 +line 6003 +;6003: { +line 6004 +;6004: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2585 +JUMPV +LABELV $2586 +line 6006 +;6005: } +;6006: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2585 +endproc ItemParse_font 4 8 +export ItemParse_maxChars +proc ItemParse_maxChars 12 8 +line 6010 +;6007:} +;6008: +;6009: +;6010:qboolean ItemParse_maxChars( itemDef_t *item, int handle ) { +line 6014 +;6011: editFieldDef_t *editPtr; +;6012: int maxChars; +;6013: +;6014: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 6015 +;6015: if (!item->typeData) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2589 +line 6016 +;6016: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2588 +JUMPV +LABELV $2589 +line 6018 +;6017: +;6018: if (!PC_Int_Parse(handle, &maxChars)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2591 +line 6019 +;6019: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2588 +JUMPV +LABELV $2591 +line 6021 +;6020: } +;6021: editPtr = (editFieldDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 6022 +;6022: editPtr->maxChars = maxChars; +ADDRLP4 0 +INDIRP4 +CNSTI4 16 +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 6023 +;6023: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2588 +endproc ItemParse_maxChars 12 8 +export ItemParse_maxPaintChars +proc ItemParse_maxPaintChars 12 8 +line 6026 +;6024:} +;6025: +;6026:qboolean ItemParse_maxPaintChars( itemDef_t *item, int handle ) { +line 6030 +;6027: editFieldDef_t *editPtr; +;6028: int maxChars; +;6029: +;6030: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 6031 +;6031: if (!item->typeData) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2594 +line 6032 +;6032: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2593 +JUMPV +LABELV $2594 +line 6034 +;6033: +;6034: if (!PC_Int_Parse(handle, &maxChars)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2596 +line 6035 +;6035: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2593 +JUMPV +LABELV $2596 +line 6037 +;6036: } +;6037: editPtr = (editFieldDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 6038 +;6038: editPtr->maxPaintChars = maxChars; +ADDRLP4 0 +INDIRP4 +CNSTI4 20 +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 6039 +;6039: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2593 +endproc ItemParse_maxPaintChars 12 8 +export ItemParse_maxLineChars +proc ItemParse_maxLineChars 12 8 +line 6043 +;6040:} +;6041: +;6042:qboolean ItemParse_maxLineChars( itemDef_t *item, int handle ) +;6043:{ +line 6047 +;6044: textScrollDef_t *scrollPtr; +;6045: int maxChars; +;6046: +;6047: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 6048 +;6048: if (!item->typeData) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2599 +line 6049 +;6049: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2598 +JUMPV +LABELV $2599 +line 6051 +;6050: +;6051: if (!PC_Int_Parse(handle, &maxChars)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2601 +line 6052 +;6052: { +line 6053 +;6053: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2598 +JUMPV +LABELV $2601 +line 6056 +;6054: } +;6055: +;6056: scrollPtr = (textScrollDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 6057 +;6057: scrollPtr->maxLineChars = maxChars; +ADDRLP4 0 +INDIRP4 +CNSTI4 12 +ADDP4 +ADDRLP4 4 +INDIRI4 +ASGNI4 +line 6059 +;6058: +;6059: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2598 +endproc ItemParse_maxLineChars 12 8 +export ItemParse_lineHeight +proc ItemParse_lineHeight 12 8 +line 6063 +;6060:} +;6061: +;6062:qboolean ItemParse_lineHeight( itemDef_t *item, int handle ) +;6063:{ +line 6067 +;6064: textScrollDef_t *scrollPtr; +;6065: int height; +;6066: +;6067: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 6068 +;6068: if (!item->typeData) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2604 +line 6069 +;6069: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2603 +JUMPV +LABELV $2604 +line 6071 +;6070: +;6071: if (!PC_Int_Parse(handle, &height)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2606 +line 6072 +;6072: { +line 6073 +;6073: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2603 +JUMPV +LABELV $2606 +line 6076 +;6074: } +;6075: +;6076: scrollPtr = (textScrollDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 6077 +;6077: scrollPtr->lineHeight = height; +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ADDRLP4 4 +INDIRI4 +CVIF4 4 +ASGNF4 +line 6079 +;6078: +;6079: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2603 +endproc ItemParse_lineHeight 12 8 +export ItemParse_cvarFloat +proc ItemParse_cvarFloat 20 8 +line 6082 +;6080:} +;6081: +;6082:qboolean ItemParse_cvarFloat( itemDef_t *item, int handle ) { +line 6085 +;6083: editFieldDef_t *editPtr; +;6084: +;6085: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 6086 +;6086: if (!item->typeData) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2609 +line 6087 +;6087: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2608 +JUMPV +LABELV $2609 +line 6088 +;6088: editPtr = (editFieldDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 6089 +;6089: if (PC_String_Parse(handle, &item->cvar) && +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 276 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $2611 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $2611 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $2611 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 4 +ADDP4 +ARGP4 +ADDRLP4 16 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 16 +INDIRI4 +CNSTI4 0 +EQI4 $2611 +line 6092 +;6090: PC_Float_Parse(handle, &editPtr->defVal) && +;6091: PC_Float_Parse(handle, &editPtr->minVal) && +;6092: PC_Float_Parse(handle, &editPtr->maxVal)) { +line 6093 +;6093: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2608 +JUMPV +LABELV $2611 +line 6095 +;6094: } +;6095: return qfalse; +CNSTI4 0 +RETI4 +LABELV $2608 +endproc ItemParse_cvarFloat 20 8 +export ItemParse_cvarStrList +proc ItemParse_cvarStrList 1068 8 +line 6098 +;6096:} +;6097: +;6098:qboolean ItemParse_cvarStrList( itemDef_t *item, int handle ) { +line 6103 +;6099: pc_token_t token; +;6100: multiDef_t *multiPtr; +;6101: int pass; +;6102: +;6103: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 6104 +;6104: if (!item->typeData) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2614 +line 6105 +;6105: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2613 +JUMPV +LABELV $2614 +line 6106 +;6106: multiPtr = (multiDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 6107 +;6107: multiPtr->count = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6108 +;6108: multiPtr->strDef = qtrue; +ADDRLP4 0 +INDIRP4 +CNSTI4 388 +ADDP4 +CNSTI4 1 +ASGNI4 +line 6110 +;6109: +;6110: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ARGP4 +ADDRLP4 1048 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1048 +INDIRI4 +CNSTI4 0 +NEI4 $2616 +line 6111 +;6111: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2613 +JUMPV +LABELV $2616 +line 6112 +;6112: if (*token.string != '{') { +ADDRLP4 8+16 +INDIRI1 +CVII4 1 +CNSTI4 123 +EQI4 $2618 +line 6113 +;6113: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2613 +JUMPV +LABELV $2618 +line 6116 +;6114: } +;6115: +;6116: pass = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2622 +JUMPV +LABELV $2621 +line 6117 +;6117: while ( 1 ) { +line 6124 +;6118: char* psString; +;6119: +;6120:// if (!trap_PC_ReadToken(handle, &token)) { +;6121:// PC_SourceError(handle, "end of file inside menu item\n"); +;6122:// return qfalse; +;6123:// } +;6124: if (!PC_String_Parse(handle, (const char **)&psString)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 1052 +ARGP4 +ADDRLP4 1056 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 1056 +INDIRI4 +CNSTI4 0 +NEI4 $2624 +line 6125 +;6125: PC_SourceError(handle, "end of file inside menu item\n"); +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 $2626 +ARGP4 +ADDRGP4 PC_SourceError +CALLV +pop +line 6126 +;6126: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2613 +JUMPV +LABELV $2624 +line 6130 +;6127: } +;6128: +;6129: //a normal StringAlloc ptr +;6130: if ((int)psString > 0) +ADDRLP4 1052 +INDIRP4 +CVPU4 4 +CVUI4 4 +CNSTI4 0 +LEI4 $2627 +line 6131 +;6131: { +line 6132 +;6132: if (*psString == '}') { +ADDRLP4 1052 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 125 +NEI4 $2629 +line 6133 +;6133: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2613 +JUMPV +LABELV $2629 +line 6136 +;6134: } +;6135: +;6136: if (*psString == ',' || *psString == ';') { +ADDRLP4 1060 +ADDRLP4 1052 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 1060 +INDIRI4 +CNSTI4 44 +EQI4 $2633 +ADDRLP4 1060 +INDIRI4 +CNSTI4 59 +NEI4 $2631 +LABELV $2633 +line 6137 +;6137: continue; +ADDRGP4 $2622 +JUMPV +LABELV $2631 +line 6139 +;6138: } +;6139: } +LABELV $2627 +line 6141 +;6140: +;6141: if (pass == 0) { +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2634 +line 6142 +;6142: multiPtr->cvarList[multiPtr->count] = psString; +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +ADDRLP4 1052 +INDIRP4 +ASGNP4 +line 6143 +;6143: pass = 1; +ADDRLP4 4 +CNSTI4 1 +ASGNI4 +line 6144 +;6144: } else { +ADDRGP4 $2635 +JUMPV +LABELV $2634 +line 6145 +;6145: multiPtr->cvarStr[multiPtr->count] = psString; +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 128 +ADDP4 +ADDP4 +ADDRLP4 1052 +INDIRP4 +ASGNP4 +line 6146 +;6146: pass = 0; +ADDRLP4 4 +CNSTI4 0 +ASGNI4 +line 6147 +;6147: multiPtr->count++; +ADDRLP4 1064 +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +ASGNP4 +ADDRLP4 1064 +INDIRP4 +ADDRLP4 1064 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 6148 +;6148: if (multiPtr->count >= MAX_MULTI_CVARS) { +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +INDIRI4 +CNSTI4 32 +LTI4 $2636 +line 6149 +;6149: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2613 +JUMPV +LABELV $2636 +line 6151 +;6150: } +;6151: } +LABELV $2635 +line 6153 +;6152: +;6153: } +LABELV $2622 +line 6117 +ADDRGP4 $2621 +JUMPV +line 6154 +;6154: return qfalse; // bk001205 - LCC missing return value +CNSTI4 0 +RETI4 +LABELV $2613 +endproc ItemParse_cvarStrList 1068 8 +export ItemParse_cvarFloatList +proc ItemParse_cvarFloatList 1072 8 +line 6158 +;6155:} +;6156: +;6157:qboolean ItemParse_cvarFloatList( itemDef_t *item, int handle ) +;6158:{ +line 6162 +;6159: pc_token_t token; +;6160: multiDef_t *multiPtr; +;6161: +;6162: Item_ValidateTypeData(item); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Item_ValidateTypeData +CALLV +pop +line 6163 +;6163: if (!item->typeData) +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2639 +line 6164 +;6164: { +line 6165 +;6165: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2638 +JUMPV +LABELV $2639 +line 6168 +;6166: } +;6167: +;6168: multiPtr = (multiDef_t*)item->typeData; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 6169 +;6169: multiPtr->count = 0; +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6170 +;6170: multiPtr->strDef = qfalse; +ADDRLP4 0 +INDIRP4 +CNSTI4 388 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6172 +;6171: +;6172: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 1044 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1044 +INDIRI4 +CNSTI4 0 +NEI4 $2641 +line 6173 +;6173: { +line 6174 +;6174: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2638 +JUMPV +LABELV $2641 +line 6177 +;6175: } +;6176: +;6177: if (*token.string != '{') +ADDRLP4 4+16 +INDIRI1 +CVII4 1 +CNSTI4 123 +EQI4 $2647 +line 6178 +;6178: { +line 6179 +;6179: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2638 +JUMPV +LABELV $2646 +line 6183 +;6180: } +;6181: +;6182: while ( 1 ) +;6183: { +line 6186 +;6184: char* string; +;6185: +;6186: if ( !PC_String_Parse ( handle, (const char **)&string ) ) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 1048 +ARGP4 +ADDRLP4 1052 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 1052 +INDIRI4 +CNSTI4 0 +NEI4 $2649 +line 6187 +;6187: { +line 6188 +;6188: PC_SourceError(handle, "end of file inside menu item\n"); +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 $2626 +ARGP4 +ADDRGP4 PC_SourceError +CALLV +pop +line 6189 +;6189: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2638 +JUMPV +LABELV $2649 +line 6193 +;6190: } +;6191: +;6192: //a normal StringAlloc ptr +;6193: if ((int)string > 0) +ADDRLP4 1048 +INDIRP4 +CVPU4 4 +CVUI4 4 +CNSTI4 0 +LEI4 $2651 +line 6194 +;6194: { +line 6195 +;6195: if (*string == '}') +ADDRLP4 1048 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 125 +NEI4 $2653 +line 6196 +;6196: { +line 6197 +;6197: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2638 +JUMPV +LABELV $2653 +line 6200 +;6198: } +;6199: +;6200: if (*string == ',' || *string == ';') +ADDRLP4 1056 +ADDRLP4 1048 +INDIRP4 +INDIRI1 +CVII4 1 +ASGNI4 +ADDRLP4 1056 +INDIRI4 +CNSTI4 44 +EQI4 $2657 +ADDRLP4 1056 +INDIRI4 +CNSTI4 59 +NEI4 $2655 +LABELV $2657 +line 6201 +;6201: { +line 6202 +;6202: continue; +ADDRGP4 $2647 +JUMPV +LABELV $2655 +line 6204 +;6203: } +;6204: } +LABELV $2651 +line 6206 +;6205: +;6206: multiPtr->cvarList[multiPtr->count] = string; +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +ADDP4 +ADDRLP4 1048 +INDIRP4 +ASGNP4 +line 6207 +;6207: if (!PC_Float_Parse(handle, &multiPtr->cvarValue[multiPtr->count])) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 256 +ADDP4 +ADDP4 +ARGP4 +ADDRLP4 1064 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 1064 +INDIRI4 +CNSTI4 0 +NEI4 $2658 +line 6208 +;6208: { +line 6209 +;6209: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2638 +JUMPV +LABELV $2658 +line 6212 +;6210: } +;6211: +;6212: multiPtr->count++; +ADDRLP4 1068 +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +ASGNP4 +ADDRLP4 1068 +INDIRP4 +ADDRLP4 1068 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 6213 +;6213: if (multiPtr->count >= MAX_MULTI_CVARS) +ADDRLP4 0 +INDIRP4 +CNSTI4 384 +ADDP4 +INDIRI4 +CNSTI4 32 +LTI4 $2660 +line 6214 +;6214: { +line 6215 +;6215: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2638 +JUMPV +LABELV $2660 +line 6218 +;6216: } +;6217: +;6218: } +LABELV $2647 +line 6182 +ADDRGP4 $2646 +JUMPV +line 6219 +;6219: return qfalse; // bk001205 - LCC missing return value +CNSTI4 0 +RETI4 +LABELV $2638 +endproc ItemParse_cvarFloatList 1072 8 +export ItemParse_addColorRange +proc ItemParse_addColorRange 48 12 +line 6224 +;6220:} +;6221: +;6222: +;6223: +;6224:qboolean ItemParse_addColorRange( itemDef_t *item, int handle ) { +line 6227 +;6225: colorRangeDef_t color; +;6226: +;6227: if (PC_Float_Parse(handle, &color.low) && +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0+16 +ARGP4 +ADDRLP4 24 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $2663 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0+20 +ARGP4 +ADDRLP4 28 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +EQI4 $2663 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 32 +ADDRGP4 PC_Color_Parse +CALLI4 +ASGNI4 +ADDRLP4 32 +INDIRI4 +CNSTI4 0 +EQI4 $2663 +line 6229 +;6228: PC_Float_Parse(handle, &color.high) && +;6229: PC_Color_Parse(handle, &color.color) ) { +line 6230 +;6230: if (item->numColors < MAX_COLOR_RANGES) { +ADDRFP4 0 +INDIRP4 +CNSTI4 296 +ADDP4 +INDIRI4 +CNSTI4 10 +GEI4 $2667 +line 6231 +;6231: memcpy(&item->colorRanges[item->numColors], &color, sizeof(color)); +ADDRLP4 36 +CNSTI4 24 +ASGNI4 +ADDRLP4 40 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 36 +INDIRI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 296 +ADDP4 +INDIRI4 +MULI4 +ADDRLP4 40 +INDIRP4 +CNSTI4 300 +ADDP4 +ADDP4 +ARGP4 +ADDRLP4 0 +ARGP4 +ADDRLP4 36 +INDIRI4 +ARGI4 +ADDRGP4 memcpy +CALLP4 +pop +line 6232 +;6232: item->numColors++; +ADDRLP4 44 +ADDRFP4 0 +INDIRP4 +CNSTI4 296 +ADDP4 +ASGNP4 +ADDRLP4 44 +INDIRP4 +ADDRLP4 44 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 6233 +;6233: } +LABELV $2667 +line 6234 +;6234: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2662 +JUMPV +LABELV $2663 +line 6236 +;6235: } +;6236: return qfalse; +CNSTI4 0 +RETI4 +LABELV $2662 +endproc ItemParse_addColorRange 48 12 +export ItemParse_ownerdrawFlag +proc ItemParse_ownerdrawFlag 12 8 +line 6239 +;6237:} +;6238: +;6239:qboolean ItemParse_ownerdrawFlag( itemDef_t *item, int handle ) { +line 6241 +;6240: int i; +;6241: if (!PC_Int_Parse(handle, &i)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2670 +line 6242 +;6242: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2669 +JUMPV +LABELV $2670 +line 6244 +;6243: } +;6244: item->window.ownerDrawFlags |= i; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +BORI4 +ASGNI4 +line 6245 +;6245: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2669 +endproc ItemParse_ownerdrawFlag 12 8 +export ItemParse_enableCvar +proc ItemParse_enableCvar 4 8 +line 6248 +;6246:} +;6247: +;6248:qboolean ItemParse_enableCvar( itemDef_t *item, int handle ) { +line 6249 +;6249: if (PC_Script_Parse(handle, &item->enableCvar)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $2673 +line 6250 +;6250: item->cvarFlags = CVAR_ENABLE; +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +CNSTI4 1 +ASGNI4 +line 6251 +;6251: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2672 +JUMPV +LABELV $2673 +line 6253 +;6252: } +;6253: return qfalse; +CNSTI4 0 +RETI4 +LABELV $2672 +endproc ItemParse_enableCvar 4 8 +export ItemParse_disableCvar +proc ItemParse_disableCvar 4 8 +line 6256 +;6254:} +;6255: +;6256:qboolean ItemParse_disableCvar( itemDef_t *item, int handle ) { +line 6257 +;6257: if (PC_Script_Parse(handle, &item->enableCvar)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $2676 +line 6258 +;6258: item->cvarFlags = CVAR_DISABLE; +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +CNSTI4 2 +ASGNI4 +line 6259 +;6259: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2675 +JUMPV +LABELV $2676 +line 6261 +;6260: } +;6261: return qfalse; +CNSTI4 0 +RETI4 +LABELV $2675 +endproc ItemParse_disableCvar 4 8 +export ItemParse_showCvar +proc ItemParse_showCvar 4 8 +line 6264 +;6262:} +;6263: +;6264:qboolean ItemParse_showCvar( itemDef_t *item, int handle ) { +line 6265 +;6265: if (PC_Script_Parse(handle, &item->enableCvar)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $2679 +line 6266 +;6266: item->cvarFlags = CVAR_SHOW; +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +CNSTI4 4 +ASGNI4 +line 6267 +;6267: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2678 +JUMPV +LABELV $2679 +line 6269 +;6268: } +;6269: return qfalse; +CNSTI4 0 +RETI4 +LABELV $2678 +endproc ItemParse_showCvar 4 8 +export ItemParse_hideCvar +proc ItemParse_hideCvar 4 8 +line 6272 +;6270:} +;6271: +;6272:qboolean ItemParse_hideCvar( itemDef_t *item, int handle ) { +line 6273 +;6273: if (PC_Script_Parse(handle, &item->enableCvar)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 284 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $2682 +line 6274 +;6274: item->cvarFlags = CVAR_HIDE; +ADDRFP4 0 +INDIRP4 +CNSTI4 288 +ADDP4 +CNSTI4 8 +ASGNI4 +line 6275 +;6275: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2681 +JUMPV +LABELV $2682 +line 6277 +;6276: } +;6277: return qfalse; +CNSTI4 0 +RETI4 +LABELV $2681 +endproc ItemParse_hideCvar 4 8 +export ItemParse_Appearance_slot +proc ItemParse_Appearance_slot 4 8 +line 6286 +;6278:} +;6279: +;6280:/* +;6281:=============== +;6282:ItemParse_align +;6283:=============== +;6284:*/ +;6285:qboolean ItemParse_Appearance_slot( itemDef_t *item, int handle ) +;6286:{ +line 6287 +;6287: if (!PC_Int_Parse(handle, &item->appearanceSlot)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 556 +ADDP4 +ARGP4 +ADDRLP4 0 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +NEI4 $2685 +line 6288 +;6288: { +line 6289 +;6289: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2684 +JUMPV +LABELV $2685 +line 6291 +;6290: } +;6291: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2684 +endproc ItemParse_Appearance_slot 4 8 +data +export itemParseKeywords +align 4 +LABELV itemParseKeywords +address $2687 +address ItemParse_action +byte 4 0 +address $2688 +address ItemParse_addColorRange +byte 4 0 +address $2689 +address ItemParse_align +byte 4 0 +address $2690 +address ItemParse_autowrapped +byte 4 0 +address $2691 +address ItemParse_Appearance_slot +byte 4 0 +address $2692 +address ItemParse_asset_model +byte 4 0 +address $2693 +address ItemParse_asset_shader +byte 4 0 +address $422 +address ItemParse_backcolor +byte 4 0 +address $2694 +address ItemParse_background +byte 4 0 +address $2695 +address ItemParse_border +byte 4 0 +address $428 +address ItemParse_bordercolor +byte 4 0 +address $2696 +address ItemParse_bordersize +byte 4 0 +address $2697 +address ItemParse_cinematic +byte 4 0 +address $2698 +address ItemParse_columns +byte 4 0 +address $2699 +address ItemParse_cvar +byte 4 0 +address $2700 +address ItemParse_cvarFloat +byte 4 0 +address $2701 +address ItemParse_cvarFloatList +byte 4 0 +address $2702 +address ItemParse_cvarStrList +byte 4 0 +address $2703 +address ItemParse_cvarTest +byte 4 0 +address $2704 +address ItemParse_descText +byte 4 0 +address $2705 +address ItemParse_decoration +byte 4 0 +address $2706 +address ItemParse_disableCvar +byte 4 0 +address $2707 +address ItemParse_doubleClick +byte 4 0 +address $2708 +address ItemParse_elementheight +byte 4 0 +address $2709 +address ItemParse_elementtype +byte 4 0 +address $2710 +address ItemParse_elementwidth +byte 4 0 +address $2711 +address ItemParse_enableCvar +byte 4 0 +address $2712 +address ItemParse_feeder +byte 4 0 +address $2713 +address ItemParse_flag +byte 4 0 +address $2714 +address ItemParse_focusSound +byte 4 0 +address $2715 +address ItemParse_font +byte 4 0 +address $425 +address ItemParse_forecolor +byte 4 0 +address $2716 +address ItemParse_group +byte 4 0 +address $2717 +address ItemParse_hideCvar +byte 4 0 +address $2718 +address ItemParse_horizontalscroll +byte 4 0 +address $2719 +address ItemParse_leaveFocus +byte 4 0 +address $2720 +address ItemParse_maxChars +byte 4 0 +address $2721 +address ItemParse_maxPaintChars +byte 4 0 +address $2722 +address ItemParse_model_angle +byte 4 0 +address $2723 +address ItemParse_model_fovx +byte 4 0 +address $2724 +address ItemParse_model_fovy +byte 4 0 +address $2725 +address ItemParse_model_origin +byte 4 0 +address $2726 +address ItemParse_model_rotation +byte 4 0 +address $2727 +address ItemParse_mouseEnter +byte 4 0 +address $2728 +address ItemParse_mouseEnterText +byte 4 0 +address $2729 +address ItemParse_mouseExit +byte 4 0 +address $2730 +address ItemParse_mouseExitText +byte 4 0 +address $2731 +address ItemParse_name +byte 4 0 +address $2732 +address ItemParse_notselectable +byte 4 0 +address $2733 +address ItemParse_onFocus +byte 4 0 +address $2734 +address ItemParse_outlinecolor +byte 4 0 +address $2735 +address ItemParse_ownerdraw +byte 4 0 +address $2736 +address ItemParse_ownerdrawFlag +byte 4 0 +address $2737 +address ItemParse_rect +byte 4 0 +address $2738 +address ItemParse_showCvar +byte 4 0 +address $2739 +address ItemParse_special +byte 4 0 +address $2740 +address ItemParse_style +byte 4 0 +address $2741 +address ItemParse_text +byte 4 0 +address $2742 +address ItemParse_textalign +byte 4 0 +address $2743 +address ItemParse_textalignx +byte 4 0 +address $2744 +address ItemParse_textaligny +byte 4 0 +address $2745 +address ItemParse_textscale +byte 4 0 +address $2746 +address ItemParse_textstyle +byte 4 0 +address $2747 +address ItemParse_text2 +byte 4 0 +address $2748 +address ItemParse_text2alignx +byte 4 0 +address $2749 +address ItemParse_text2aligny +byte 4 0 +address $2750 +address ItemParse_type +byte 4 0 +address $2751 +address ItemParse_visible +byte 4 0 +address $2752 +address ItemParse_wrapped +byte 4 0 +address $2753 +address ItemParse_maxLineChars +byte 4 0 +address $2754 +address ItemParse_lineHeight +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +export Item_SetupKeywordHash +code +proc Item_SetupKeywordHash 4 12 +line 6380 +;6292:} +;6293: +;6294: +;6295:keywordHash_t itemParseKeywords[] = { +;6296: {"action", ItemParse_action, NULL }, +;6297: {"addColorRange", ItemParse_addColorRange, NULL }, +;6298: {"align", ItemParse_align, NULL }, +;6299: {"autowrapped", ItemParse_autowrapped, NULL }, +;6300: {"appearance_slot", ItemParse_Appearance_slot, NULL }, +;6301: {"asset_model", ItemParse_asset_model, NULL }, +;6302: {"asset_shader", ItemParse_asset_shader, NULL }, +;6303: {"backcolor", ItemParse_backcolor, NULL }, +;6304: {"background", ItemParse_background, NULL }, +;6305: {"border", ItemParse_border, NULL }, +;6306: {"bordercolor", ItemParse_bordercolor, NULL }, +;6307: {"bordersize", ItemParse_bordersize, NULL }, +;6308: {"cinematic", ItemParse_cinematic, NULL }, +;6309: {"columns", ItemParse_columns, NULL }, +;6310: {"cvar", ItemParse_cvar, NULL }, +;6311: {"cvarFloat", ItemParse_cvarFloat, NULL }, +;6312: {"cvarFloatList", ItemParse_cvarFloatList, NULL }, +;6313: {"cvarStrList", ItemParse_cvarStrList, NULL }, +;6314: {"cvarTest", ItemParse_cvarTest, NULL }, +;6315: {"desctext", ItemParse_descText, NULL }, +;6316: {"decoration", ItemParse_decoration, NULL }, +;6317: {"disableCvar", ItemParse_disableCvar, NULL }, +;6318: {"doubleclick", ItemParse_doubleClick, NULL }, +;6319: {"elementheight", ItemParse_elementheight, NULL }, +;6320: {"elementtype", ItemParse_elementtype, NULL }, +;6321: {"elementwidth", ItemParse_elementwidth, NULL }, +;6322: {"enableCvar", ItemParse_enableCvar, NULL }, +;6323: {"feeder", ItemParse_feeder, NULL }, +;6324: {"flag", ItemParse_flag, NULL }, +;6325: {"focusSound", ItemParse_focusSound, NULL }, +;6326: {"font", ItemParse_font, NULL }, +;6327: {"forecolor", ItemParse_forecolor, NULL }, +;6328: {"group", ItemParse_group, NULL }, +;6329: {"hideCvar", ItemParse_hideCvar, NULL }, +;6330: {"horizontalscroll", ItemParse_horizontalscroll, NULL }, +;6331: {"leaveFocus", ItemParse_leaveFocus, NULL }, +;6332: {"maxChars", ItemParse_maxChars, NULL }, +;6333: {"maxPaintChars", ItemParse_maxPaintChars, NULL }, +;6334: {"model_angle", ItemParse_model_angle, NULL }, +;6335: {"model_fovx", ItemParse_model_fovx, NULL }, +;6336: {"model_fovy", ItemParse_model_fovy, NULL }, +;6337: {"model_origin", ItemParse_model_origin, NULL }, +;6338: {"model_rotation", ItemParse_model_rotation, NULL }, +;6339: {"mouseEnter", ItemParse_mouseEnter, NULL }, +;6340: {"mouseEnterText", ItemParse_mouseEnterText, NULL }, +;6341: {"mouseExit", ItemParse_mouseExit, NULL }, +;6342: {"mouseExitText", ItemParse_mouseExitText, NULL }, +;6343: {"name", ItemParse_name, NULL }, +;6344: {"notselectable", ItemParse_notselectable, NULL }, +;6345: {"onFocus", ItemParse_onFocus, NULL }, +;6346: {"outlinecolor", ItemParse_outlinecolor, NULL }, +;6347: {"ownerdraw", ItemParse_ownerdraw, NULL }, +;6348: {"ownerdrawFlag", ItemParse_ownerdrawFlag, NULL }, +;6349: {"rect", ItemParse_rect, NULL }, +;6350: {"showCvar", ItemParse_showCvar, NULL }, +;6351: {"special", ItemParse_special, NULL }, +;6352: {"style", ItemParse_style, NULL }, +;6353: {"text", ItemParse_text, NULL }, +;6354: {"textalign", ItemParse_textalign, NULL }, +;6355: {"textalignx", ItemParse_textalignx, NULL }, +;6356: {"textaligny", ItemParse_textaligny, NULL }, +;6357: {"textscale", ItemParse_textscale, NULL }, +;6358: {"textstyle", ItemParse_textstyle, NULL }, +;6359: {"text2", ItemParse_text2, NULL }, +;6360: {"text2alignx", ItemParse_text2alignx, NULL }, +;6361: {"text2aligny", ItemParse_text2aligny, NULL }, +;6362: {"type", ItemParse_type, NULL }, +;6363: {"visible", ItemParse_visible, NULL }, +;6364: {"wrapped", ItemParse_wrapped, NULL }, +;6365: +;6366: // Text scroll specific +;6367: {"maxLineChars", ItemParse_maxLineChars, NULL }, +;6368: {"lineHeight", ItemParse_lineHeight, NULL }, +;6369: +;6370: {0, 0, 0 } +;6371:}; +;6372: +;6373:keywordHash_t *itemParseKeywordHash[KEYWORDHASH_SIZE]; +;6374: +;6375:/* +;6376:=============== +;6377:Item_SetupKeywordHash +;6378:=============== +;6379:*/ +;6380:void Item_SetupKeywordHash(void) { +line 6383 +;6381: int i; +;6382: +;6383: memset(itemParseKeywordHash, 0, sizeof(itemParseKeywordHash)); +ADDRGP4 itemParseKeywordHash +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 2048 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 6384 +;6384: for (i = 0; itemParseKeywords[i].keyword; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2759 +JUMPV +LABELV $2756 +line 6385 +;6385: KeywordHash_Add(itemParseKeywordHash, &itemParseKeywords[i]); +ADDRGP4 itemParseKeywordHash +ARGP4 +CNSTI4 12 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 itemParseKeywords +ADDP4 +ARGP4 +ADDRGP4 KeywordHash_Add +CALLV +pop +line 6386 +;6386: } +LABELV $2757 +line 6384 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2759 +CNSTI4 12 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 itemParseKeywords +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2756 +line 6387 +;6387:} +LABELV $2755 +endproc Item_SetupKeywordHash 4 12 +export Item_Parse +proc Item_Parse 1060 12 +line 6394 +;6388: +;6389:/* +;6390:=============== +;6391:Item_Parse +;6392:=============== +;6393:*/ +;6394:qboolean Item_Parse(int handle, itemDef_t *item) { +line 6399 +;6395: pc_token_t token; +;6396: keywordHash_t *key; +;6397: +;6398: +;6399: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1044 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1044 +INDIRI4 +CNSTI4 0 +NEI4 $2761 +line 6400 +;6400: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2760 +JUMPV +LABELV $2761 +line 6401 +;6401: if (*token.string != '{') { +ADDRLP4 0+16 +INDIRI1 +CVII4 1 +CNSTI4 123 +EQI4 $2767 +line 6402 +;6402: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2760 +JUMPV +LABELV $2766 +line 6404 +;6403: } +;6404: while ( 1 ) { +line 6405 +;6405: if (!trap_PC_ReadToken(handle, &token)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1048 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1048 +INDIRI4 +CNSTI4 0 +NEI4 $2769 +line 6406 +;6406: PC_SourceError(handle, "end of file inside menu item\n"); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 $2626 +ARGP4 +ADDRGP4 PC_SourceError +CALLV +pop +line 6407 +;6407: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2760 +JUMPV +LABELV $2769 +line 6410 +;6408: } +;6409: +;6410: if (*token.string == '}') { +ADDRLP4 0+16 +INDIRI1 +CVII4 1 +CNSTI4 125 +NEI4 $2771 +line 6411 +;6411: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2760 +JUMPV +LABELV $2771 +line 6414 +;6412: } +;6413: +;6414: key = KeywordHash_Find(itemParseKeywordHash, token.string); +ADDRGP4 itemParseKeywordHash +ARGP4 +ADDRLP4 0+16 +ARGP4 +ADDRLP4 1052 +ADDRGP4 KeywordHash_Find +CALLP4 +ASGNP4 +ADDRLP4 1040 +ADDRLP4 1052 +INDIRP4 +ASGNP4 +line 6415 +;6415: if (!key) { +ADDRLP4 1040 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2775 +line 6416 +;6416: PC_SourceError(handle, "unknown menu item keyword %s", token.string); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 $2777 +ARGP4 +ADDRLP4 0+16 +ARGP4 +ADDRGP4 PC_SourceError +CALLV +pop +line 6417 +;6417: continue; +ADDRGP4 $2767 +JUMPV +LABELV $2775 +line 6419 +;6418: } +;6419: if ( !key->func(item, handle) ) { +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1056 +ADDRLP4 1040 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 1056 +INDIRI4 +CNSTI4 0 +NEI4 $2779 +line 6420 +;6420: PC_SourceError(handle, "couldn't parse menu item keyword %s", token.string); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 $2781 +ARGP4 +ADDRLP4 0+16 +ARGP4 +ADDRGP4 PC_SourceError +CALLV +pop +line 6421 +;6421: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2760 +JUMPV +LABELV $2779 +line 6423 +;6422: } +;6423: } +LABELV $2767 +line 6404 +ADDRGP4 $2766 +JUMPV +line 6424 +;6424: return qfalse; // bk001205 - LCC missing return value +CNSTI4 0 +RETI4 +LABELV $2760 +endproc Item_Parse 1060 12 +proc Item_TextScroll_BuildLines 2116 12 +line 6428 +;6425:} +;6426: +;6427:static void Item_TextScroll_BuildLines ( itemDef_t* item ) +;6428:{ +line 6432 +;6429:#if 1 +;6430: // new asian-aware line breaker... (pasted from elsewhere late @ night, hence aliasing-vars ;-) +;6431: // +;6432: textScrollDef_t* scrollPtr = (textScrollDef_t*) item->typeData; +ADDRLP4 12 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 6433 +;6433: const char *psText = item->text; // for copy/paste ease +ADDRLP4 32 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ASGNP4 +line 6434 +;6434: int iBoxWidth = item->window.rect.w - SCROLLBAR_SIZE - 10; +ADDRLP4 28 +ADDRFP4 0 +INDIRP4 +CNSTI4 8 +ADDP4 +INDIRF4 +CNSTF4 1098907648 +SUBF4 +CNSTF4 1092616192 +SUBF4 +CVFI4 4 +ASGNI4 +line 6439 +;6435: +;6436: // this could probably be simplified now, but it was converted from something else I didn't originally write, +;6437: // and it works anyway so wtf... +;6438: // +;6439: const char *psCurrentTextReadPos = psText; +ADDRLP4 4 +ADDRLP4 32 +INDIRP4 +ASGNP4 +line 6440 +;6440: const char *psReadPosAtLineStart = psCurrentTextReadPos; +ADDRLP4 16 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 6441 +;6441: const char *psBestLineBreakSrcPos = psCurrentTextReadPos; +ADDRLP4 20 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 6446 +;6442: const char *psLastGood_s; // needed if we get a full screen of chars with no punctuation or space (see usage notes) +;6443: qboolean bIsTrailingPunctuation; +;6444: unsigned int uiLetter; +;6445: +;6446: scrollPtr->iLineCount = 0; +ADDRLP4 12 +INDIRP4 +CNSTI4 20 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6447 +;6447: memset((char*)scrollPtr->pLines,0,sizeof(scrollPtr->pLines)); +ADDRLP4 12 +INDIRP4 +CNSTI4 24 +ADDP4 +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 1024 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +ADDRGP4 $2785 +JUMPV +LABELV $2784 +line 6450 +;6448: +;6449: while (*psCurrentTextReadPos && (scrollPtr->iLineCount < MAX_TEXTSCROLL_LINES) ) +;6450: { +line 6455 +;6451: char sLineForDisplay[2048]; // ott +;6452: +;6453: // construct a line... +;6454: // +;6455: psCurrentTextReadPos = psReadPosAtLineStart; +ADDRLP4 4 +ADDRLP4 16 +INDIRP4 +ASGNP4 +line 6456 +;6456: sLineForDisplay[0] = '\0'; +ADDRLP4 36 +CNSTI1 0 +ASGNI1 +ADDRGP4 $2788 +JUMPV +LABELV $2787 +line 6458 +;6457: while ( *psCurrentTextReadPos ) +;6458: { +line 6460 +;6459: int iAdvanceCount; +;6460: psLastGood_s = psCurrentTextReadPos; +ADDRLP4 24 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 6464 +;6461: +;6462: // read letter... +;6463: // +;6464: uiLetter = trap_AnyLanguage_ReadCharFromString(psCurrentTextReadPos, &iAdvanceCount, &bIsTrailingPunctuation); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRLP4 2084 +ARGP4 +ADDRLP4 8 +ARGP4 +ADDRLP4 2088 +ADDRGP4 trap_AnyLanguage_ReadCharFromString +CALLU4 +ASGNU4 +ADDRLP4 0 +ADDRLP4 2088 +INDIRU4 +ASGNU4 +line 6465 +;6465: psCurrentTextReadPos += iAdvanceCount; +ADDRLP4 4 +ADDRLP4 2084 +INDIRI4 +ADDRLP4 4 +INDIRP4 +ADDP4 +ASGNP4 +line 6469 +;6466: +;6467: // concat onto string so far... +;6468: // +;6469: if (uiLetter == 32 && sLineForDisplay[0] == '\0') +ADDRLP4 0 +INDIRU4 +CNSTU4 32 +NEU4 $2790 +ADDRLP4 36 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $2790 +line 6470 +;6470: { +line 6471 +;6471: psReadPosAtLineStart++; +ADDRLP4 16 +ADDRLP4 16 +INDIRP4 +CNSTI4 1 +ADDP4 +ASGNP4 +line 6472 +;6472: continue; // unless it's a space at the start of a line, in which case ignore it. +ADDRGP4 $2788 +JUMPV +LABELV $2790 +line 6475 +;6473: } +;6474: +;6475: if (uiLetter > 255) +ADDRLP4 0 +INDIRU4 +CNSTU4 255 +LEU4 $2792 +line 6476 +;6476: { +line 6477 +;6477: Q_strcat(sLineForDisplay, sizeof(sLineForDisplay),va("%c%c",uiLetter >> 8, uiLetter & 0xFF)); +ADDRGP4 $2794 +ARGP4 +ADDRLP4 0 +INDIRU4 +CNSTI4 8 +RSHU4 +ARGU4 +ADDRLP4 0 +INDIRU4 +CNSTU4 255 +BANDU4 +ARGU4 +ADDRLP4 2096 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 36 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRLP4 2096 +INDIRP4 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 6478 +;6478: } +ADDRGP4 $2793 +JUMPV +LABELV $2792 +line 6480 +;6479: else +;6480: { +line 6481 +;6481: Q_strcat(sLineForDisplay, sizeof(sLineForDisplay),va("%c",uiLetter & 0xFF)); +ADDRGP4 $2795 +ARGP4 +ADDRLP4 0 +INDIRU4 +CNSTU4 255 +BANDU4 +ARGU4 +ADDRLP4 2092 +ADDRGP4 va +CALLP4 +ASGNP4 +ADDRLP4 36 +ARGP4 +CNSTI4 2048 +ARGI4 +ADDRLP4 2092 +INDIRP4 +ARGP4 +ADDRGP4 Q_strcat +CALLV +pop +line 6482 +;6482: } +LABELV $2793 +line 6484 +;6483: +;6484: if (uiLetter == '\n') +ADDRLP4 0 +INDIRU4 +CNSTU4 10 +NEU4 $2796 +line 6485 +;6485: { +line 6488 +;6486: // explicit new line... +;6487: // +;6488: sLineForDisplay[ strlen(sLineForDisplay)-1 ] = '\0'; // kill the CR +ADDRLP4 36 +ARGP4 +ADDRLP4 2092 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 2092 +INDIRI4 +ADDRLP4 36-1 +ADDP4 +CNSTI1 0 +ASGNI1 +line 6489 +;6489: psReadPosAtLineStart = psCurrentTextReadPos; +ADDRLP4 16 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 6490 +;6490: psBestLineBreakSrcPos = psCurrentTextReadPos; +ADDRLP4 20 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 6494 +;6491: +;6492: // hack it to fit in with this code... +;6493: // +;6494: scrollPtr->pLines[ scrollPtr->iLineCount ] = String_Alloc ( sLineForDisplay ); +ADDRLP4 36 +ARGP4 +ADDRLP4 2096 +ADDRGP4 String_Alloc +CALLP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDP4 +ADDRLP4 2096 +INDIRP4 +ASGNP4 +line 6495 +;6495: break; // print this line +ADDRGP4 $2789 +JUMPV +LABELV $2796 +line 6498 +;6496: } +;6497: else +;6498: if ( DC->textWidth( sLineForDisplay, item->textscale, item->iMenuFont ) >= iBoxWidth ) +ADDRLP4 36 +ARGP4 +ADDRLP4 2092 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 2092 +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 2092 +INDIRP4 +CNSTI4 560 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 2096 +ADDRGP4 DC +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 2096 +INDIRI4 +ADDRLP4 28 +INDIRI4 +LTI4 $2799 +line 6499 +;6499: { +line 6502 +;6500: // reached screen edge, so cap off string at bytepos after last good position... +;6501: // +;6502: if (uiLetter > 255 && bIsTrailingPunctuation && !trap_Language_UsesSpaces()) +ADDRLP4 0 +INDIRU4 +CNSTU4 255 +LEU4 $2801 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +EQI4 $2801 +ADDRLP4 2100 +ADDRGP4 trap_Language_UsesSpaces +CALLI4 +ASGNI4 +ADDRLP4 2100 +INDIRI4 +CNSTI4 0 +NEI4 $2801 +line 6503 +;6503: { +line 6507 +;6504: // Special case, don't consider line breaking if you're on an asian punctuation char of +;6505: // a language that doesn't use spaces... +;6506: // +;6507: uiLetter = uiLetter; // breakpoint line only +ADDRLP4 0 +ADDRLP4 0 +INDIRU4 +ASGNU4 +line 6508 +;6508: } +ADDRGP4 $2802 +JUMPV +LABELV $2801 +line 6510 +;6509: else +;6510: { +line 6511 +;6511: if (psBestLineBreakSrcPos == psReadPosAtLineStart) +ADDRLP4 20 +INDIRP4 +CVPU4 4 +ADDRLP4 16 +INDIRP4 +CVPU4 4 +NEU4 $2803 +line 6512 +;6512: { +line 6520 +;6513: // aarrrggh!!!!! we'll only get here is someone has fed in a (probably) garbage string, +;6514: // since it doesn't have a single space or punctuation mark right the way across one line +;6515: // of the screen. So far, this has only happened in testing when I hardwired a taiwanese +;6516: // string into this function while the game was running in english (which should NEVER happen +;6517: // normally). On the other hand I suppose it's entirely possible that some taiwanese string +;6518: // might have no punctuation at all, so... +;6519: // +;6520: psBestLineBreakSrcPos = psLastGood_s; // force a break after last good letter +ADDRLP4 20 +ADDRLP4 24 +INDIRP4 +ASGNP4 +line 6521 +;6521: } +LABELV $2803 +line 6523 +;6522: +;6523: sLineForDisplay[ psBestLineBreakSrcPos - psReadPosAtLineStart ] = '\0'; +ADDRLP4 20 +INDIRP4 +CVPU4 4 +ADDRLP4 16 +INDIRP4 +CVPU4 4 +SUBU4 +CVUI4 4 +ADDRLP4 36 +ADDP4 +CNSTI1 0 +ASGNI1 +line 6524 +;6524: psReadPosAtLineStart = psCurrentTextReadPos = psBestLineBreakSrcPos; +ADDRLP4 4 +ADDRLP4 20 +INDIRP4 +ASGNP4 +ADDRLP4 16 +ADDRLP4 20 +INDIRP4 +ASGNP4 +line 6528 +;6525: +;6526: // hack it to fit in with this code... +;6527: // +;6528: scrollPtr->pLines[ scrollPtr->iLineCount ] = String_Alloc( sLineForDisplay ); +ADDRLP4 36 +ARGP4 +ADDRLP4 2108 +ADDRGP4 String_Alloc +CALLP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDP4 +ADDRLP4 2108 +INDIRP4 +ASGNP4 +line 6529 +;6529: break; // print this line +ADDRGP4 $2789 +JUMPV +LABELV $2802 +line 6531 +;6530: } +;6531: } +LABELV $2799 +line 6535 +;6532: +;6533: // record last-good linebreak pos... (ie if we've just concat'd a punctuation point (western or asian) or space) +;6534: // +;6535: if (bIsTrailingPunctuation || uiLetter == ' ' || (uiLetter > 255 && !trap_Language_UsesSpaces())) +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2808 +ADDRLP4 0 +INDIRU4 +CNSTU4 32 +EQU4 $2808 +ADDRLP4 0 +INDIRU4 +CNSTU4 255 +LEU4 $2805 +ADDRLP4 2104 +ADDRGP4 trap_Language_UsesSpaces +CALLI4 +ASGNI4 +ADDRLP4 2104 +INDIRI4 +CNSTI4 0 +NEI4 $2805 +LABELV $2808 +line 6536 +;6536: { +line 6537 +;6537: psBestLineBreakSrcPos = psCurrentTextReadPos; +ADDRLP4 20 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 6538 +;6538: } +LABELV $2805 +line 6539 +;6539: } +LABELV $2788 +line 6457 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +NEI4 $2787 +LABELV $2789 +line 6543 +;6540: +;6541: /// arrgghh, this is gettng horrible now... +;6542: // +;6543: if (scrollPtr->pLines[ scrollPtr->iLineCount ] == NULL && strlen(sLineForDisplay)) +ADDRLP4 12 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2809 +ADDRLP4 36 +ARGP4 +ADDRLP4 2088 +ADDRGP4 strlen +CALLI4 +ASGNI4 +ADDRLP4 2088 +INDIRI4 +CNSTI4 0 +EQI4 $2809 +line 6544 +;6544: { +line 6547 +;6545: // then this is the last line and we've just run out of text, no CR, no overflow etc... +;6546: // +;6547: scrollPtr->pLines[ scrollPtr->iLineCount ] = String_Alloc( sLineForDisplay ); +ADDRLP4 36 +ARGP4 +ADDRLP4 2092 +ADDRGP4 String_Alloc +CALLP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 12 +INDIRP4 +CNSTI4 24 +ADDP4 +ADDP4 +ADDRLP4 2092 +INDIRP4 +ASGNP4 +line 6548 +;6548: } +LABELV $2809 +line 6550 +;6549: +;6550: scrollPtr->iLineCount++; +ADDRLP4 2092 +ADDRLP4 12 +INDIRP4 +CNSTI4 20 +ADDP4 +ASGNP4 +ADDRLP4 2092 +INDIRP4 +ADDRLP4 2092 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 6551 +;6551: } +LABELV $2785 +line 6449 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $2811 +ADDRLP4 12 +INDIRP4 +CNSTI4 20 +ADDP4 +INDIRI4 +CNSTI4 256 +LTI4 $2784 +LABELV $2811 +line 6627 +;6552: +;6553:#else +;6554: // old version... +;6555: // +;6556: int width; +;6557: char* lineStart; +;6558: char* lineEnd; +;6559: float w; +;6560: float cw; +;6561: +;6562: textScrollDef_t* scrollPtr = (textScrollDef_t*) item->typeData; +;6563: +;6564: scrollPtr->iLineCount = 0; +;6565: width = scrollPtr->maxLineChars; +;6566: lineStart = (char*)item->text; +;6567: lineEnd = lineStart; +;6568: w = 0; +;6569: +;6570: // Keep going as long as there are more lines +;6571: while ( scrollPtr->iLineCount < MAX_TEXTSCROLL_LINES ) +;6572: { +;6573: // End of the road +;6574: if ( *lineEnd == '\0') +;6575: { +;6576: if ( lineStart < lineEnd ) +;6577: { +;6578: scrollPtr->pLines[ scrollPtr->iLineCount++ ] = lineStart; +;6579: } +;6580: +;6581: break; +;6582: } +;6583: +;6584: // Force a line end if its a '\n' +;6585: else if ( *lineEnd == '\n' ) +;6586: { +;6587: *lineEnd = '\0'; +;6588: scrollPtr->pLines[ scrollPtr->iLineCount++ ] = lineStart; +;6589: lineStart = lineEnd + 1; +;6590: lineEnd = lineStart; +;6591: w = 0; +;6592: continue; +;6593: } +;6594: +;6595: // Get the current character width +;6596: cw = DC->textWidth ( va("%c", *lineEnd), item->textscale, item->iMenuFont ); +;6597: +;6598: // Past the end of the boundary? +;6599: if ( w + cw > (item->window.rect.w - SCROLLBAR_SIZE - 10) ) +;6600: { +;6601: // Past the end so backtrack to the word boundary +;6602: while ( *lineEnd != ' ' && *lineEnd != '\t' && lineEnd > lineStart ) +;6603: { +;6604: lineEnd--; +;6605: } +;6606: +;6607: *lineEnd = '\0'; +;6608: scrollPtr->pLines[ scrollPtr->iLineCount++ ] = lineStart; +;6609: +;6610: // Skip any whitespaces +;6611: lineEnd++; +;6612: while ( (*lineEnd == ' ' || *lineEnd == '\t') && *lineEnd ) +;6613: { +;6614: lineEnd++; +;6615: } +;6616: +;6617: lineStart = lineEnd; +;6618: w = 0; +;6619: } +;6620: else +;6621: { +;6622: w += cw; +;6623: lineEnd++; +;6624: } +;6625: } +;6626:#endif +;6627:} +LABELV $2783 +endproc Item_TextScroll_BuildLines 2116 12 +export Item_InitControls +proc Item_InitControls 8 0 +line 6632 +;6628: +;6629:// Item_InitControls +;6630:// init's special control types +;6631:void Item_InitControls(itemDef_t *item) +;6632:{ +line 6633 +;6633: if (item == NULL) +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2813 +line 6634 +;6634: { +line 6635 +;6635: return; +ADDRGP4 $2812 +JUMPV +LABELV $2813 +line 6638 +;6636: } +;6637: +;6638: switch ( item->type ) +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 6 +EQI4 $2818 +ADDRGP4 $2815 +JUMPV +line 6639 +;6639: { +LABELV $2818 +line 6641 +;6640: case ITEM_TYPE_LISTBOX: +;6641: { +line 6642 +;6642: listBoxDef_t *listPtr = (listBoxDef_t*)item->typeData; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 548 +ADDP4 +INDIRP4 +ASGNP4 +line 6643 +;6643: item->cursorPos = 0; +ADDRFP4 0 +INDIRP4 +CNSTI4 544 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6644 +;6644: if (listPtr) +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $2816 +line 6645 +;6645: { +line 6646 +;6646: listPtr->cursorPos = 0; +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6647 +;6647: listPtr->startPos = 0; +ADDRLP4 4 +INDIRP4 +CNSTI4 0 +ASGNI4 +line 6648 +;6648: listPtr->endPos = 0; +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6649 +;6649: listPtr->cursorPos = 0; +ADDRLP4 4 +INDIRP4 +CNSTI4 12 +ADDP4 +CNSTI4 0 +ASGNI4 +line 6650 +;6650: } +line 6652 +;6651: +;6652: break; +LABELV $2815 +LABELV $2816 +line 6655 +;6653: } +;6654: } +;6655:} +LABELV $2812 +endproc Item_InitControls 8 0 +export MenuParse_font +proc MenuParse_font 16 8 +line 6663 +;6656: +;6657:/* +;6658:=============== +;6659:Menu Keyword Parse functions +;6660:=============== +;6661:*/ +;6662: +;6663:qboolean MenuParse_font( itemDef_t *item, int handle ) { +line 6664 +;6664: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6665 +;6665: if (!PC_String_Parse(handle, &menu->font)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2822 +line 6666 +;6666: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2821 +JUMPV +LABELV $2822 +line 6668 +;6667: } +;6668: if (!DC->Assets.fontRegistered) { +ADDRGP4 DC +INDIRP4 +CNSTI4 392 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $2824 +line 6670 +;6669: //DC->registerFont(menu->font, 48, &DC->Assets.textFont); +;6670: DC->Assets.qhMediumFont = DC->RegisterFont(menu->font); +ADDRLP4 0 +INDIRP4 +CNSTI4 180 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 12 +ADDRLP4 8 +INDIRP4 +CNSTI4 64 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 276 +ADDP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 6671 +;6671: DC->Assets.fontRegistered = qtrue; +ADDRGP4 DC +INDIRP4 +CNSTI4 392 +ADDP4 +CNSTI4 1 +ASGNI4 +line 6672 +;6672: } +LABELV $2824 +line 6673 +;6673: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2821 +endproc MenuParse_font 16 8 +export MenuParse_name +proc MenuParse_name 12 8 +line 6676 +;6674:} +;6675: +;6676:qboolean MenuParse_name( itemDef_t *item, int handle ) { +line 6677 +;6677: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6678 +;6678: if (!PC_String_Parse(handle, &menu->window.name)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2827 +line 6679 +;6679: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2826 +JUMPV +LABELV $2827 +line 6681 +;6680: } +;6681: if (Q_stricmp(menu->window.name, "main") == 0) { +ADDRLP4 0 +INDIRP4 +CNSTI4 32 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 $2831 +ARGP4 +ADDRLP4 8 +ADDRGP4 Q_stricmp +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2829 +line 6684 +;6682: // default main as having focus +;6683: //menu->window.flags |= WINDOW_HASFOCUS; +;6684: } +LABELV $2829 +line 6685 +;6685: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2826 +endproc MenuParse_name 12 8 +export MenuParse_fullscreen +proc MenuParse_fullscreen 8 8 +line 6688 +;6686:} +;6687: +;6688:qboolean MenuParse_fullscreen( itemDef_t *item, int handle ) { +line 6689 +;6689: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6690 +;6690: if (!PC_Int_Parse(handle, (int*) &menu->fullScreen)) { // bk001206 - cast qboolean +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 184 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2833 +line 6691 +;6691: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2832 +JUMPV +LABELV $2833 +line 6693 +;6692: } +;6693: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2832 +endproc MenuParse_fullscreen 8 8 +export MenuParse_rect +proc MenuParse_rect 8 8 +line 6696 +;6694:} +;6695: +;6696:qboolean MenuParse_rect( itemDef_t *item, int handle ) { +line 6697 +;6697: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6698 +;6698: if (!PC_Rect_Parse(handle, &menu->window.rect)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Rect_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2836 +line 6699 +;6699: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2835 +JUMPV +LABELV $2836 +line 6701 +;6700: } +;6701: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2835 +endproc MenuParse_rect 8 8 +export MenuParse_style +proc MenuParse_style 8 8 +line 6710 +;6702:} +;6703: +;6704:/* +;6705:================= +;6706:MenuParse_style +;6707:================= +;6708:*/ +;6709:qboolean MenuParse_style( itemDef_t *item, int handle) +;6710:{ +line 6711 +;6711: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6713 +;6712: +;6713: if (!PC_Int_Parse(handle, &menu->window.style)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 48 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2839 +line 6714 +;6714: { +line 6715 +;6715: Com_Printf(S_COLOR_YELLOW "Unknown menu style value"); +ADDRGP4 $2841 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 6716 +;6716: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2838 +JUMPV +LABELV $2839 +line 6719 +;6717: } +;6718: +;6719: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2838 +endproc MenuParse_style 8 8 +export MenuParse_visible +proc MenuParse_visible 16 8 +line 6722 +;6720:} +;6721: +;6722:qboolean MenuParse_visible( itemDef_t *item, int handle ) { +line 6724 +;6723: int i; +;6724: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6726 +;6725: +;6726: if (!PC_Int_Parse(handle, &i)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2843 +line 6727 +;6727: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2842 +JUMPV +LABELV $2843 +line 6729 +;6728: } +;6729: if (i) { +ADDRLP4 0 +INDIRI4 +CNSTI4 0 +EQI4 $2845 +line 6730 +;6730: menu->window.flags |= WINDOW_VISIBLE; +ADDRLP4 12 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +CNSTI4 4 +BORI4 +ASGNI4 +line 6731 +;6731: } +LABELV $2845 +line 6732 +;6732: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2842 +endproc MenuParse_visible 16 8 +export MenuParse_onOpen +proc MenuParse_onOpen 8 8 +line 6735 +;6733:} +;6734: +;6735:qboolean MenuParse_onOpen( itemDef_t *item, int handle ) { +line 6736 +;6736: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6737 +;6737: if (!PC_Script_Parse(handle, &menu->onOpen)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 212 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2848 +line 6738 +;6738: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2847 +JUMPV +LABELV $2848 +line 6740 +;6739: } +;6740: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2847 +endproc MenuParse_onOpen 8 8 +export MenuParse_onClose +proc MenuParse_onClose 8 8 +line 6743 +;6741:} +;6742: +;6743:qboolean MenuParse_onClose( itemDef_t *item, int handle ) { +line 6744 +;6744: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6745 +;6745: if (!PC_Script_Parse(handle, &menu->onClose)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 216 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2851 +line 6746 +;6746: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2850 +JUMPV +LABELV $2851 +line 6748 +;6747: } +;6748: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2850 +endproc MenuParse_onClose 8 8 +export MenuParse_onESC +proc MenuParse_onESC 8 8 +line 6751 +;6749:} +;6750: +;6751:qboolean MenuParse_onESC( itemDef_t *item, int handle ) { +line 6752 +;6752: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6753 +;6753: if (!PC_Script_Parse(handle, &menu->onESC)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 220 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Script_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2854 +line 6754 +;6754: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2853 +JUMPV +LABELV $2854 +line 6756 +;6755: } +;6756: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2853 +endproc MenuParse_onESC 8 8 +export MenuParse_border +proc MenuParse_border 8 8 +line 6761 +;6757:} +;6758: +;6759: +;6760: +;6761:qboolean MenuParse_border( itemDef_t *item, int handle ) { +line 6762 +;6762: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6763 +;6763: if (!PC_Int_Parse(handle, &menu->window.border)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 52 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2857 +line 6764 +;6764: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2856 +JUMPV +LABELV $2857 +line 6766 +;6765: } +;6766: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2856 +endproc MenuParse_border 8 8 +export MenuParse_borderSize +proc MenuParse_borderSize 8 8 +line 6769 +;6767:} +;6768: +;6769:qboolean MenuParse_borderSize( itemDef_t *item, int handle ) { +line 6770 +;6770: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6771 +;6771: if (!PC_Float_Parse(handle, &menu->window.borderSize)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 64 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2860 +line 6772 +;6772: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2859 +JUMPV +LABELV $2860 +line 6774 +;6773: } +;6774: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2859 +endproc MenuParse_borderSize 8 8 +export MenuParse_backcolor +proc MenuParse_backcolor 16 8 +line 6777 +;6775:} +;6776: +;6777:qboolean MenuParse_backcolor( itemDef_t *item, int handle ) { +line 6780 +;6778: int i; +;6779: float f; +;6780: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6782 +;6781: +;6782: for (i = 0; i < 4; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $2863 +line 6783 +;6783: if (!PC_Float_Parse(handle, &f)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 12 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $2867 +line 6784 +;6784: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2862 +JUMPV +LABELV $2867 +line 6786 +;6785: } +;6786: menu->window.backColor[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 128 +ADDP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 6787 +;6787: } +LABELV $2864 +line 6782 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $2863 +line 6788 +;6788: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2862 +endproc MenuParse_backcolor 16 8 +export MenuParse_descAlignment +proc MenuParse_descAlignment 8 8 +line 6797 +;6789:} +;6790: +;6791:/* +;6792:================= +;6793:MenuParse_descAlignment +;6794:================= +;6795:*/ +;6796:qboolean MenuParse_descAlignment( itemDef_t *item, int handle ) +;6797:{ +line 6798 +;6798: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6800 +;6799: +;6800: if (!PC_Int_Parse(handle, &menu->descAlignment)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1308 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2870 +line 6801 +;6801: { +line 6802 +;6802: Com_Printf(S_COLOR_YELLOW "Unknown desc alignment value"); +ADDRGP4 $2872 +ARGP4 +ADDRGP4 Com_Printf +CALLV +pop +line 6803 +;6803: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2869 +JUMPV +LABELV $2870 +line 6806 +;6804: } +;6805: +;6806: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2869 +endproc MenuParse_descAlignment 8 8 +export MenuParse_descX +proc MenuParse_descX 8 8 +line 6815 +;6807:} +;6808: +;6809:/* +;6810:================= +;6811:MenuParse_descX +;6812:================= +;6813:*/ +;6814:qboolean MenuParse_descX( itemDef_t *item, int handle ) +;6815:{ +line 6816 +;6816: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6818 +;6817: +;6818: if (!PC_Int_Parse(handle, &menu->descX)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1284 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2874 +line 6819 +;6819: { +line 6820 +;6820: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2873 +JUMPV +LABELV $2874 +line 6822 +;6821: } +;6822: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2873 +endproc MenuParse_descX 8 8 +export MenuParse_descY +proc MenuParse_descY 8 8 +line 6831 +;6823:} +;6824: +;6825:/* +;6826:================= +;6827:MenuParse_descY +;6828:================= +;6829:*/ +;6830:qboolean MenuParse_descY( itemDef_t *item, int handle ) +;6831:{ +line 6832 +;6832: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6834 +;6833: +;6834: if (!PC_Int_Parse(handle, &menu->descY)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1288 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2877 +line 6835 +;6835: { +line 6836 +;6836: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2876 +JUMPV +LABELV $2877 +line 6838 +;6837: } +;6838: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2876 +endproc MenuParse_descY 8 8 +export MenuParse_descScale +proc MenuParse_descScale 8 8 +line 6847 +;6839:} +;6840: +;6841:/* +;6842:================= +;6843:MenuParse_descScale +;6844:================= +;6845:*/ +;6846:qboolean MenuParse_descScale( itemDef_t *item, int handle) +;6847:{ +line 6848 +;6848: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6850 +;6849: +;6850: if (!PC_Float_Parse(handle, &menu->descScale)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1312 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2880 +line 6851 +;6851: { +line 6852 +;6852: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2879 +JUMPV +LABELV $2880 +line 6854 +;6853: } +;6854: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2879 +endproc MenuParse_descScale 8 8 +export MenuParse_descColor +proc MenuParse_descColor 16 8 +line 6863 +;6855:} +;6856: +;6857:/* +;6858:================= +;6859:MenuParse_descColor +;6860:================= +;6861:*/ +;6862:qboolean MenuParse_descColor( itemDef_t *item, int handle) +;6863:{ +line 6866 +;6864: int i; +;6865: float f; +;6866: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6868 +;6867: +;6868: for (i = 0; i < 4; i++) +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $2883 +line 6869 +;6869: { +line 6870 +;6870: if (!PC_Float_Parse(handle, &f)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 12 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $2887 +line 6871 +;6871: { +line 6872 +;6872: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2882 +JUMPV +LABELV $2887 +line 6874 +;6873: } +;6874: menu->descColor[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 1292 +ADDP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 6875 +;6875: } +LABELV $2884 +line 6868 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $2883 +line 6876 +;6876: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2882 +endproc MenuParse_descColor 16 8 +export MenuParse_forecolor +proc MenuParse_forecolor 20 8 +line 6879 +;6877:} +;6878: +;6879:qboolean MenuParse_forecolor( itemDef_t *item, int handle ) { +line 6882 +;6880: int i; +;6881: float f; +;6882: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6884 +;6883: +;6884: for (i = 0; i < 4; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $2890 +line 6885 +;6885: if (!PC_Float_Parse(handle, &f)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 8 +ARGP4 +ADDRLP4 12 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $2894 +line 6886 +;6886: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2889 +JUMPV +LABELV $2894 +line 6888 +;6887: } +;6888: menu->window.foreColor[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 112 +ADDP4 +ADDP4 +ADDRLP4 8 +INDIRF4 +ASGNF4 +line 6889 +;6889: menu->window.flags |= WINDOW_FORECOLORSET; +ADDRLP4 16 +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 16 +INDIRP4 +ADDRLP4 16 +INDIRP4 +INDIRI4 +CNSTI4 512 +BORI4 +ASGNI4 +line 6890 +;6890: } +LABELV $2891 +line 6884 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $2890 +line 6891 +;6891: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2889 +endproc MenuParse_forecolor 20 8 +export MenuParse_bordercolor +proc MenuParse_bordercolor 16 8 +line 6894 +;6892:} +;6893: +;6894:qboolean MenuParse_bordercolor( itemDef_t *item, int handle ) { +line 6897 +;6895: int i; +;6896: float f; +;6897: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6899 +;6898: +;6899: for (i = 0; i < 4; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $2897 +line 6900 +;6900: if (!PC_Float_Parse(handle, &f)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 12 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $2901 +line 6901 +;6901: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2896 +JUMPV +LABELV $2901 +line 6903 +;6902: } +;6903: menu->window.borderColor[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 144 +ADDP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 6904 +;6904: } +LABELV $2898 +line 6899 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $2897 +line 6905 +;6905: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2896 +endproc MenuParse_bordercolor 16 8 +export MenuParse_focuscolor +proc MenuParse_focuscolor 16 8 +line 6908 +;6906:} +;6907: +;6908:qboolean MenuParse_focuscolor( itemDef_t *item, int handle ) { +line 6911 +;6909: int i; +;6910: float f; +;6911: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6913 +;6912: +;6913: for (i = 0; i < 4; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $2904 +line 6914 +;6914: if (!PC_Float_Parse(handle, &f)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 12 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $2908 +line 6915 +;6915: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2903 +JUMPV +LABELV $2908 +line 6917 +;6916: } +;6917: menu->focusColor[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 228 +ADDP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 6918 +;6918: } +LABELV $2905 +line 6913 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $2904 +line 6919 +;6919: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2903 +endproc MenuParse_focuscolor 16 8 +export MenuParse_disablecolor +proc MenuParse_disablecolor 16 8 +line 6922 +;6920:} +;6921: +;6922:qboolean MenuParse_disablecolor( itemDef_t *item, int handle ) { +line 6925 +;6923: int i; +;6924: float f; +;6925: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 8 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6926 +;6926: for (i = 0; i < 4; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +LABELV $2911 +line 6927 +;6927: if (!PC_Float_Parse(handle, &f)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 4 +ARGP4 +ADDRLP4 12 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +NEI4 $2915 +line 6928 +;6928: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2910 +JUMPV +LABELV $2915 +line 6930 +;6929: } +;6930: menu->disableColor[i] = f; +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 8 +INDIRP4 +CNSTI4 244 +ADDP4 +ADDP4 +ADDRLP4 4 +INDIRF4 +ASGNF4 +line 6931 +;6931: } +LABELV $2912 +line 6926 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +CNSTI4 4 +LTI4 $2911 +line 6932 +;6932: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2910 +endproc MenuParse_disablecolor 16 8 +export MenuParse_outlinecolor +proc MenuParse_outlinecolor 8 8 +line 6936 +;6933:} +;6934: +;6935: +;6936:qboolean MenuParse_outlinecolor( itemDef_t *item, int handle ) { +line 6937 +;6937: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6938 +;6938: if (!PC_Color_Parse(handle, &menu->window.outlineColor)){ +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 160 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Color_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2918 +line 6939 +;6939: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2917 +JUMPV +LABELV $2918 +line 6941 +;6940: } +;6941: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2917 +endproc MenuParse_outlinecolor 8 8 +export MenuParse_background +proc MenuParse_background 16 8 +line 6944 +;6942:} +;6943: +;6944:qboolean MenuParse_background( itemDef_t *item, int handle ) { +line 6946 +;6945: const char *buff; +;6946: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6948 +;6947: +;6948: if (!PC_String_Parse(handle, &buff)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2921 +line 6949 +;6949: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2920 +JUMPV +LABELV $2921 +line 6951 +;6950: } +;6951: menu->window.background = DC->registerShaderNoMip(buff); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 12 +ADDRGP4 DC +INDIRP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRP4 +CNSTI4 176 +ADDP4 +ADDRLP4 12 +INDIRI4 +ASGNI4 +line 6952 +;6952: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2920 +endproc MenuParse_background 16 8 +export MenuParse_cinematic +proc MenuParse_cinematic 8 8 +line 6955 +;6953:} +;6954: +;6955:qboolean MenuParse_cinematic( itemDef_t *item, int handle ) { +line 6956 +;6956: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6958 +;6957: +;6958: if (!PC_String_Parse(handle, &menu->window.cinematicName)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2924 +line 6959 +;6959: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2923 +JUMPV +LABELV $2924 +line 6961 +;6960: } +;6961: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2923 +endproc MenuParse_cinematic 8 8 +export MenuParse_ownerdrawFlag +proc MenuParse_ownerdrawFlag 16 8 +line 6964 +;6962:} +;6963: +;6964:qboolean MenuParse_ownerdrawFlag( itemDef_t *item, int handle ) { +line 6966 +;6965: int i; +;6966: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6968 +;6967: +;6968: if (!PC_Int_Parse(handle, &i)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 8 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 8 +INDIRI4 +CNSTI4 0 +NEI4 $2927 +line 6969 +;6969: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2926 +JUMPV +LABELV $2927 +line 6971 +;6970: } +;6971: menu->window.ownerDrawFlags |= i; +ADDRLP4 12 +ADDRLP4 4 +INDIRP4 +CNSTI4 60 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRI4 +ADDRLP4 0 +INDIRI4 +BORI4 +ASGNI4 +line 6972 +;6972: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2926 +endproc MenuParse_ownerdrawFlag 16 8 +export MenuParse_ownerdraw +proc MenuParse_ownerdraw 8 8 +line 6975 +;6973:} +;6974: +;6975:qboolean MenuParse_ownerdraw( itemDef_t *item, int handle ) { +line 6976 +;6976: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6978 +;6977: +;6978: if (!PC_Int_Parse(handle, &menu->window.ownerDraw)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 56 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2930 +line 6979 +;6979: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2929 +JUMPV +LABELV $2930 +line 6981 +;6980: } +;6981: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2929 +endproc MenuParse_ownerdraw 8 8 +export MenuParse_popup +proc MenuParse_popup 8 0 +line 6986 +;6982:} +;6983: +;6984: +;6985:// decoration +;6986:qboolean MenuParse_popup( itemDef_t *item, int handle ) { +line 6987 +;6987: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6988 +;6988: menu->window.flags |= WINDOW_POPUP; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 2097152 +BORI4 +ASGNI4 +line 6989 +;6989: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2932 +endproc MenuParse_popup 8 0 +export MenuParse_outOfBounds +proc MenuParse_outOfBounds 8 0 +line 6993 +;6990:} +;6991: +;6992: +;6993:qboolean MenuParse_outOfBounds( itemDef_t *item, int handle ) { +line 6994 +;6994: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 6996 +;6995: +;6996: menu->window.flags |= WINDOW_OOB_CLICK; +ADDRLP4 4 +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRI4 +CNSTI4 131072 +BORI4 +ASGNI4 +line 6997 +;6997: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2933 +endproc MenuParse_outOfBounds 8 0 +export MenuParse_soundLoop +proc MenuParse_soundLoop 8 8 +line 7000 +;6998:} +;6999: +;7000:qboolean MenuParse_soundLoop( itemDef_t *item, int handle ) { +line 7001 +;7001: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 7003 +;7002: +;7003: if (!PC_String_Parse(handle, &menu->soundName)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_String_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2935 +line 7004 +;7004: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2934 +JUMPV +LABELV $2935 +line 7006 +;7005: } +;7006: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2934 +endproc MenuParse_soundLoop 8 8 +export MenuParse_fadeClamp +proc MenuParse_fadeClamp 8 8 +line 7009 +;7007:} +;7008: +;7009:qboolean MenuParse_fadeClamp( itemDef_t *item, int handle ) { +line 7010 +;7010: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 7012 +;7011: +;7012: if (!PC_Float_Parse(handle, &menu->fadeClamp)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 204 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2938 +line 7013 +;7013: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2937 +JUMPV +LABELV $2938 +line 7015 +;7014: } +;7015: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2937 +endproc MenuParse_fadeClamp 8 8 +export MenuParse_fadeAmount +proc MenuParse_fadeAmount 8 8 +line 7018 +;7016:} +;7017: +;7018:qboolean MenuParse_fadeAmount( itemDef_t *item, int handle ) { +line 7019 +;7019: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 7021 +;7020: +;7021: if (!PC_Float_Parse(handle, &menu->fadeAmount)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 208 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2941 +line 7022 +;7022: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2940 +JUMPV +LABELV $2941 +line 7024 +;7023: } +;7024: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2940 +endproc MenuParse_fadeAmount 8 8 +export MenuParse_fadeCycle +proc MenuParse_fadeCycle 8 8 +line 7028 +;7025:} +;7026: +;7027: +;7028:qboolean MenuParse_fadeCycle( itemDef_t *item, int handle ) { +line 7029 +;7029: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 7031 +;7030: +;7031: if (!PC_Int_Parse(handle, &menu->fadeCycle)) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 200 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Int_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2944 +line 7032 +;7032: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2943 +JUMPV +LABELV $2944 +line 7034 +;7033: } +;7034: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2943 +endproc MenuParse_fadeCycle 8 8 +export MenuParse_itemDef +proc MenuParse_itemDef 40 8 +line 7038 +;7035:} +;7036: +;7037: +;7038:qboolean MenuParse_itemDef( itemDef_t *item, int handle ) { +line 7039 +;7039: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 7040 +;7040: if (menu->itemCount < MAX_MENUITEMS) { +ADDRLP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +CNSTI4 256 +GEI4 $2947 +line 7041 +;7041: menu->items[menu->itemCount] = UI_Alloc(sizeof(itemDef_t)); +CNSTI4 564 +ARGI4 +ADDRLP4 4 +ADDRGP4 UI_Alloc +CALLP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 7042 +;7042: Item_Init(menu->items[menu->itemCount]); +ADDRLP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_Init +CALLV +pop +line 7043 +;7043: if (!Item_Parse(handle, menu->items[menu->itemCount])) { +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 20 +ADDRGP4 Item_Parse +CALLI4 +ASGNI4 +ADDRLP4 20 +INDIRI4 +CNSTI4 0 +NEI4 $2949 +line 7044 +;7044: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2946 +JUMPV +LABELV $2949 +line 7046 +;7045: } +;7046: Item_InitControls(menu->items[menu->itemCount]); +ADDRLP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_InitControls +CALLV +pop +line 7047 +;7047: menu->items[menu->itemCount++]->parent = menu; +ADDRLP4 32 +ADDRLP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +ASGNP4 +ADDRLP4 28 +ADDRLP4 32 +INDIRP4 +INDIRI4 +ASGNI4 +ADDRLP4 32 +INDIRP4 +ADDRLP4 28 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 240 +ADDP4 +ADDRLP4 0 +INDIRP4 +ASGNP4 +line 7048 +;7048: } +LABELV $2947 +line 7049 +;7049: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2946 +endproc MenuParse_itemDef 40 8 +export MenuParse_appearanceIncrement +proc MenuParse_appearanceIncrement 8 8 +line 7057 +;7050:} +;7051:/* +;7052:================= +;7053:MenuParse_focuscolor +;7054:================= +;7055:*/ +;7056:qboolean MenuParse_appearanceIncrement( itemDef_t *item, int handle ) +;7057:{ +line 7058 +;7058: menuDef_t *menu = (menuDef_t*)item; +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 7060 +;7059: +;7060: if (!PC_Float_Parse(handle, &menu->appearanceIncrement)) +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +CNSTI4 1324 +ADDP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 PC_Float_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +NEI4 $2952 +line 7061 +;7061: { +line 7062 +;7062: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2951 +JUMPV +LABELV $2952 +line 7064 +;7063: } +;7064: return qtrue; +CNSTI4 1 +RETI4 +LABELV $2951 +endproc MenuParse_appearanceIncrement 8 8 +data +export menuParseKeywords +align 4 +LABELV menuParseKeywords +address $2954 +address MenuParse_appearanceIncrement +byte 4 0 +address $422 +address MenuParse_backcolor +byte 4 0 +address $2694 +address MenuParse_background +byte 4 0 +address $2695 +address MenuParse_border +byte 4 0 +address $428 +address MenuParse_bordercolor +byte 4 0 +address $2955 +address MenuParse_borderSize +byte 4 0 +address $2697 +address MenuParse_cinematic +byte 4 0 +address $2956 +address MenuParse_descAlignment +byte 4 0 +address $2957 +address MenuParse_descColor +byte 4 0 +address $2958 +address MenuParse_descX +byte 4 0 +address $2959 +address MenuParse_descY +byte 4 0 +address $2960 +address MenuParse_descScale +byte 4 0 +address $2961 +address MenuParse_disablecolor +byte 4 0 +address $2962 +address MenuParse_fadeAmount +byte 4 0 +address $2963 +address MenuParse_fadeClamp +byte 4 0 +address $2964 +address MenuParse_fadeCycle +byte 4 0 +address $2965 +address MenuParse_focuscolor +byte 4 0 +address $2715 +address MenuParse_font +byte 4 0 +address $425 +address MenuParse_forecolor +byte 4 0 +address $2966 +address MenuParse_fullscreen +byte 4 0 +address $2967 +address MenuParse_itemDef +byte 4 0 +address $2731 +address MenuParse_name +byte 4 0 +address $2968 +address MenuParse_onClose +byte 4 0 +address $2969 +address MenuParse_onESC +byte 4 0 +address $2970 +address MenuParse_outOfBounds +byte 4 0 +address $2971 +address MenuParse_onOpen +byte 4 0 +address $2734 +address MenuParse_outlinecolor +byte 4 0 +address $2735 +address MenuParse_ownerdraw +byte 4 0 +address $2736 +address MenuParse_ownerdrawFlag +byte 4 0 +address $2972 +address MenuParse_popup +byte 4 0 +address $2737 +address MenuParse_rect +byte 4 0 +address $2973 +address MenuParse_soundLoop +byte 4 0 +address $2740 +address MenuParse_style +byte 4 0 +address $2751 +address MenuParse_visible +byte 4 0 +byte 4 0 +byte 4 0 +byte 4 0 +export Menu_SetupKeywordHash +code +proc Menu_SetupKeywordHash 4 12 +line 7112 +;7065:} +;7066: +;7067:keywordHash_t menuParseKeywords[] = { +;7068: {"appearanceIncrement", MenuParse_appearanceIncrement, NULL }, +;7069: {"backcolor", MenuParse_backcolor, NULL }, +;7070: {"background", MenuParse_background, NULL }, +;7071: {"border", MenuParse_border, NULL }, +;7072: {"bordercolor", MenuParse_bordercolor, NULL }, +;7073: {"borderSize", MenuParse_borderSize, NULL }, +;7074: {"cinematic", MenuParse_cinematic, NULL }, +;7075: {"descAlignment", MenuParse_descAlignment,NULL }, +;7076: {"desccolor", MenuParse_descColor, NULL }, +;7077: {"descX", MenuParse_descX, NULL }, +;7078: {"descY", MenuParse_descY, NULL }, +;7079: {"descScale", MenuParse_descScale, NULL }, +;7080: {"disablecolor", MenuParse_disablecolor, NULL }, +;7081: {"fadeAmount", MenuParse_fadeAmount, NULL }, +;7082: {"fadeClamp", MenuParse_fadeClamp, NULL }, +;7083: {"fadeCycle", MenuParse_fadeCycle, NULL }, +;7084: {"focuscolor", MenuParse_focuscolor, NULL }, +;7085: {"font", MenuParse_font, NULL }, +;7086: {"forecolor", MenuParse_forecolor, NULL }, +;7087: {"fullscreen", MenuParse_fullscreen, NULL }, +;7088: {"itemDef", MenuParse_itemDef, NULL }, +;7089: {"name", MenuParse_name, NULL }, +;7090: {"onClose", MenuParse_onClose, NULL }, +;7091: {"onESC", MenuParse_onESC, NULL }, +;7092: {"outOfBoundsClick", MenuParse_outOfBounds, NULL }, +;7093: {"onOpen", MenuParse_onOpen, NULL }, +;7094: {"outlinecolor", MenuParse_outlinecolor, NULL }, +;7095: {"ownerdraw", MenuParse_ownerdraw, NULL }, +;7096: {"ownerdrawFlag", MenuParse_ownerdrawFlag,NULL }, +;7097: {"popup", MenuParse_popup, NULL }, +;7098: {"rect", MenuParse_rect, NULL }, +;7099: {"soundLoop", MenuParse_soundLoop, NULL }, +;7100: {"style", MenuParse_style, NULL }, +;7101: {"visible", MenuParse_visible, NULL }, +;7102: {0, 0, 0 } +;7103:}; +;7104: +;7105:keywordHash_t *menuParseKeywordHash[KEYWORDHASH_SIZE]; +;7106: +;7107:/* +;7108:=============== +;7109:Menu_SetupKeywordHash +;7110:=============== +;7111:*/ +;7112:void Menu_SetupKeywordHash(void) { +line 7115 +;7113: int i; +;7114: +;7115: memset(menuParseKeywordHash, 0, sizeof(menuParseKeywordHash)); +ADDRGP4 menuParseKeywordHash +ARGP4 +CNSTI4 0 +ARGI4 +CNSTI4 2048 +ARGI4 +ADDRGP4 memset +CALLP4 +pop +line 7116 +;7116: for (i = 0; menuParseKeywords[i].keyword; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $2978 +JUMPV +LABELV $2975 +line 7117 +;7117: KeywordHash_Add(menuParseKeywordHash, &menuParseKeywords[i]); +ADDRGP4 menuParseKeywordHash +ARGP4 +CNSTI4 12 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 menuParseKeywords +ADDP4 +ARGP4 +ADDRGP4 KeywordHash_Add +CALLV +pop +line 7118 +;7118: } +LABELV $2976 +line 7116 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $2978 +CNSTI4 12 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 menuParseKeywords +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2975 +line 7119 +;7119:} +LABELV $2974 +endproc Menu_SetupKeywordHash 4 12 +export Menu_Parse +proc Menu_Parse 1060 12 +line 7126 +;7120: +;7121:/* +;7122:=============== +;7123:Menu_Parse +;7124:=============== +;7125:*/ +;7126:qboolean Menu_Parse(int handle, menuDef_t *menu) { +line 7130 +;7127: pc_token_t token; +;7128: keywordHash_t *key; +;7129: +;7130: if (!trap_PC_ReadToken(handle, &token)) +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1044 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1044 +INDIRI4 +CNSTI4 0 +NEI4 $2980 +line 7131 +;7131: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2979 +JUMPV +LABELV $2980 +line 7132 +;7132: if (*token.string != '{') { +ADDRLP4 0+16 +INDIRI1 +CVII4 1 +CNSTI4 123 +EQI4 $2986 +line 7133 +;7133: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2979 +JUMPV +LABELV $2985 +line 7136 +;7134: } +;7135: +;7136: while ( 1 ) { +line 7137 +;7137: if (!trap_PC_ReadToken(handle, &token)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +ARGP4 +ADDRLP4 1048 +ADDRGP4 trap_PC_ReadToken +CALLI4 +ASGNI4 +ADDRLP4 1048 +INDIRI4 +CNSTI4 0 +NEI4 $2988 +line 7138 +;7138: PC_SourceError(handle, "end of file inside menu\n"); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 $2990 +ARGP4 +ADDRGP4 PC_SourceError +CALLV +pop +line 7139 +;7139: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2979 +JUMPV +LABELV $2988 +line 7142 +;7140: } +;7141: +;7142: if (*token.string == '}') { +ADDRLP4 0+16 +INDIRI1 +CVII4 1 +CNSTI4 125 +NEI4 $2991 +line 7143 +;7143: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $2979 +JUMPV +LABELV $2991 +line 7146 +;7144: } +;7145: +;7146: key = KeywordHash_Find(menuParseKeywordHash, token.string); +ADDRGP4 menuParseKeywordHash +ARGP4 +ADDRLP4 0+16 +ARGP4 +ADDRLP4 1052 +ADDRGP4 KeywordHash_Find +CALLP4 +ASGNP4 +ADDRLP4 1040 +ADDRLP4 1052 +INDIRP4 +ASGNP4 +line 7147 +;7147: if (!key) { +ADDRLP4 1040 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $2995 +line 7148 +;7148: PC_SourceError(handle, "unknown menu keyword %s", token.string); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 $2997 +ARGP4 +ADDRLP4 0+16 +ARGP4 +ADDRGP4 PC_SourceError +CALLV +pop +line 7149 +;7149: continue; +ADDRGP4 $2986 +JUMPV +LABELV $2995 +line 7151 +;7150: } +;7151: if ( !key->func((itemDef_t*)menu, handle) ) { +ADDRFP4 4 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 1056 +ADDRLP4 1040 +INDIRP4 +CNSTI4 4 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 1056 +INDIRI4 +CNSTI4 0 +NEI4 $2999 +line 7152 +;7152: PC_SourceError(handle, "couldn't parse menu keyword %s", token.string); +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRGP4 $3001 +ARGP4 +ADDRLP4 0+16 +ARGP4 +ADDRGP4 PC_SourceError +CALLV +pop +line 7153 +;7153: return qfalse; +CNSTI4 0 +RETI4 +ADDRGP4 $2979 +JUMPV +LABELV $2999 +line 7155 +;7154: } +;7155: } +LABELV $2986 +line 7136 +ADDRGP4 $2985 +JUMPV +line 7156 +;7156: return qfalse; // bk001205 - LCC missing return value +CNSTI4 0 +RETI4 +LABELV $2979 +endproc Menu_Parse 1060 12 +export Menu_New +proc Menu_New 12 8 +line 7164 +;7157:} +;7158: +;7159:/* +;7160:=============== +;7161:Menu_New +;7162:=============== +;7163:*/ +;7164:void Menu_New(int handle) { +line 7165 +;7165: menuDef_t *menu = &Menus[menuCount]; +ADDRLP4 0 +CNSTI4 1328 +ADDRGP4 menuCount +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ASGNP4 +line 7167 +;7166: +;7167: if (menuCount < MAX_MENUS) { +ADDRGP4 menuCount +INDIRI4 +CNSTI4 64 +GEI4 $3004 +line 7168 +;7168: Menu_Init(menu); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menu_Init +CALLV +pop +line 7169 +;7169: if (Menu_Parse(handle, menu)) { +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRLP4 4 +ADDRGP4 Menu_Parse +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $3006 +line 7170 +;7170: Menu_PostParse(menu); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Menu_PostParse +CALLV +pop +line 7171 +;7171: menuCount++; +ADDRLP4 8 +ADDRGP4 menuCount +ASGNP4 +ADDRLP4 8 +INDIRP4 +ADDRLP4 8 +INDIRP4 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +line 7172 +;7172: } +LABELV $3006 +line 7173 +;7173: } +LABELV $3004 +line 7174 +;7174:} +LABELV $3003 +endproc Menu_New 12 8 +export Menu_Count +proc Menu_Count 0 0 +line 7176 +;7175: +;7176:int Menu_Count() { +line 7177 +;7177: return menuCount; +ADDRGP4 menuCount +INDIRI4 +RETI4 +LABELV $3008 +endproc Menu_Count 0 0 +lit +align 4 +LABELV $3018 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +byte 4 1065353216 +export Menu_PaintAll +code +proc Menu_PaintAll 44 36 +line 7180 +;7178:} +;7179: +;7180:void Menu_PaintAll() { +line 7182 +;7181: int i; +;7182: if (captureFunc) { +ADDRGP4 captureFunc +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3010 +line 7183 +;7183: captureFunc(captureData); +ADDRGP4 captureData +INDIRP4 +ARGP4 +ADDRGP4 captureFunc +INDIRP4 +CALLV +pop +line 7184 +;7184: } +LABELV $3010 +line 7186 +;7185: +;7186: for (i = 0; i < Menu_Count(); i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $3015 +JUMPV +LABELV $3012 +line 7187 +;7187: Menu_Paint(&Menus[i], qfalse); +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ARGP4 +CNSTI4 0 +ARGI4 +ADDRGP4 Menu_Paint +CALLV +pop +line 7188 +;7188: } +LABELV $3013 +line 7186 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $3015 +ADDRLP4 4 +ADDRGP4 Menu_Count +CALLI4 +ASGNI4 +ADDRLP4 0 +INDIRI4 +ADDRLP4 4 +INDIRI4 +LTI4 $3012 +line 7190 +;7189: +;7190: if (debugMode) { +ADDRGP4 debugMode +INDIRI4 +CNSTI4 0 +EQI4 $3016 +line 7191 +;7191: vec4_t v = {1, 1, 1, 1}; +ADDRLP4 8 +ADDRGP4 $3018 +INDIRB +ASGNB 16 +line 7192 +;7192: DC->drawText(5, 25, .5, v, va("fps: %f", DC->FPS), 0, 0, 0, 0); +ADDRGP4 $3019 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 11812 +ADDP4 +INDIRF4 +ARGF4 +ADDRLP4 24 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTF4 1084227584 +ARGF4 +CNSTF4 1103626240 +ARGF4 +CNSTF4 1056964608 +ARGF4 +ADDRLP4 8 +ARGP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 28 +CNSTI4 0 +ASGNI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRLP4 28 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 7193 +;7193: DC->drawText(5, 45, .5, v, va("x: %d y:%d", DC->cursorx,DC->cursory), 0, 0, 0, 0); +ADDRGP4 $3020 +ARGP4 +ADDRLP4 32 +ADDRGP4 DC +INDIRP4 +ASGNP4 +ADDRLP4 32 +INDIRP4 +CNSTI4 248 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 32 +INDIRP4 +CNSTI4 252 +ADDP4 +INDIRI4 +ARGI4 +ADDRLP4 36 +ADDRGP4 va +CALLP4 +ASGNP4 +CNSTF4 1084227584 +ARGF4 +CNSTF4 1110704128 +ARGF4 +CNSTF4 1056964608 +ARGF4 +ADDRLP4 8 +ARGP4 +ADDRLP4 36 +INDIRP4 +ARGP4 +CNSTF4 0 +ARGF4 +ADDRLP4 40 +CNSTI4 0 +ASGNI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRLP4 40 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 16 +ADDP4 +INDIRP4 +CALLV +pop +line 7194 +;7194: } +LABELV $3016 +line 7195 +;7195:} +LABELV $3009 +endproc Menu_PaintAll 44 36 +export Menu_Reset +proc Menu_Reset 0 0 +line 7197 +;7196: +;7197:void Menu_Reset() { +line 7198 +;7198: menuCount = 0; +ADDRGP4 menuCount +CNSTI4 0 +ASGNI4 +line 7199 +;7199:} +LABELV $3021 +endproc Menu_Reset 0 0 +export Display_GetContext +proc Display_GetContext 0 0 +line 7201 +;7200: +;7201:displayContextDef_t *Display_GetContext() { +line 7202 +;7202: return DC; +ADDRGP4 DC +INDIRP4 +RETP4 +LABELV $3022 +endproc Display_GetContext 0 0 +export Display_CaptureItem +proc Display_CaptureItem 8 12 +line 7205 +;7203:} +;7204: +;7205:void *Display_CaptureItem(int x, int y) { +line 7208 +;7206: int i; +;7207: +;7208: for (i = 0; i < menuCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $3027 +JUMPV +LABELV $3024 +line 7211 +;7209: // turn off focus each item +;7210: // menu->items[i].window.flags &= ~WINDOW_HASFOCUS; +;7211: if (Rect_ContainsPoint(&Menus[i].window.rect, x, y)) { +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ARGP4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 4 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $3028 +line 7212 +;7212: return &Menus[i]; +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +RETP4 +ADDRGP4 $3023 +JUMPV +LABELV $3028 +line 7214 +;7213: } +;7214: } +LABELV $3025 +line 7208 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $3027 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $3024 +line 7215 +;7215: return NULL; +CNSTP4 0 +RETP4 +LABELV $3023 +endproc Display_CaptureItem 8 12 +export Display_MouseMove +proc Display_MouseMove 16 12 +line 7220 +;7216:} +;7217: +;7218: +;7219:// FIXME: +;7220:qboolean Display_MouseMove(void *p, int x, int y) { +line 7222 +;7221: int i; +;7222: menuDef_t *menu = p; +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +ASGNP4 +line 7224 +;7223: +;7224: if (menu == NULL) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $3031 +line 7225 +;7225: menu = Menu_GetFocused(); +ADDRLP4 8 +ADDRGP4 Menu_GetFocused +CALLP4 +ASGNP4 +ADDRLP4 4 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 7226 +;7226: if (menu) { +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3033 +line 7227 +;7227: if (menu->window.flags & WINDOW_POPUP) { +ADDRLP4 4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 2097152 +BANDI4 +CNSTI4 0 +EQI4 $3035 +line 7228 +;7228: Menu_HandleMouseMove(menu, x, y); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 Menu_HandleMouseMove +CALLV +pop +line 7229 +;7229: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $3030 +JUMPV +LABELV $3035 +line 7231 +;7230: } +;7231: } +LABELV $3033 +line 7232 +;7232: for (i = 0; i < menuCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $3040 +JUMPV +LABELV $3037 +line 7233 +;7233: Menu_HandleMouseMove(&Menus[i], x, y); +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ARGP4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRGP4 Menu_HandleMouseMove +CALLV +pop +line 7234 +;7234: } +LABELV $3038 +line 7232 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $3040 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $3037 +line 7235 +;7235: } else { +ADDRGP4 $3032 +JUMPV +LABELV $3031 +line 7236 +;7236: menu->window.rect.x += x; +ADDRLP4 4 +INDIRP4 +ADDRLP4 4 +INDIRP4 +INDIRF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 7237 +;7237: menu->window.rect.y += y; +ADDRLP4 12 +ADDRLP4 4 +INDIRP4 +CNSTI4 4 +ADDP4 +ASGNP4 +ADDRLP4 12 +INDIRP4 +ADDRLP4 12 +INDIRP4 +INDIRF4 +ADDRFP4 8 +INDIRI4 +CVIF4 4 +ADDF4 +ASGNF4 +line 7238 +;7238: Menu_UpdatePosition(menu); +ADDRLP4 4 +INDIRP4 +ARGP4 +ADDRGP4 Menu_UpdatePosition +CALLV +pop +line 7239 +;7239: } +LABELV $3032 +line 7240 +;7240: return qtrue; +CNSTI4 1 +RETI4 +LABELV $3030 +endproc Display_MouseMove 16 12 +export Display_CursorType +proc Display_CursorType 28 12 +line 7244 +;7241: +;7242:} +;7243: +;7244:int Display_CursorType(int x, int y) { +line 7246 +;7245: int i; +;7246: for (i = 0; i < menuCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $3045 +JUMPV +LABELV $3042 +line 7248 +;7247: rectDef_t r2; +;7248: r2.x = Menus[i].window.rect.x - 3; +ADDRLP4 4 +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +INDIRF4 +CNSTF4 1077936128 +SUBF4 +ASGNF4 +line 7249 +;7249: r2.y = Menus[i].window.rect.y - 3; +ADDRLP4 4+4 +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus+4 +ADDP4 +INDIRF4 +CNSTF4 1077936128 +SUBF4 +ASGNF4 +line 7250 +;7250: r2.w = r2.h = 7; +ADDRLP4 20 +CNSTF4 1088421888 +ASGNF4 +ADDRLP4 4+12 +ADDRLP4 20 +INDIRF4 +ASGNF4 +ADDRLP4 4+8 +ADDRLP4 20 +INDIRF4 +ASGNF4 +line 7251 +;7251: if (Rect_ContainsPoint(&r2, x, y)) { +ADDRLP4 4 +ARGP4 +ADDRFP4 0 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRFP4 4 +INDIRI4 +CVIF4 4 +ARGF4 +ADDRLP4 24 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 24 +INDIRI4 +CNSTI4 0 +EQI4 $3050 +line 7252 +;7252: return CURSOR_SIZER; +CNSTI4 4 +RETI4 +ADDRGP4 $3041 +JUMPV +LABELV $3050 +line 7254 +;7253: } +;7254: } +LABELV $3043 +line 7246 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $3045 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $3042 +line 7255 +;7255: return CURSOR_ARROW; +CNSTI4 2 +RETI4 +LABELV $3041 +endproc Display_CursorType 28 12 +export Display_HandleKey +proc Display_HandleKey 12 12 +line 7259 +;7256:} +;7257: +;7258: +;7259:void Display_HandleKey(int key, qboolean down, int x, int y) { +line 7260 +;7260: menuDef_t *menu = Display_CaptureItem(x, y); +ADDRFP4 8 +INDIRI4 +ARGI4 +ADDRFP4 12 +INDIRI4 +ARGI4 +ADDRLP4 4 +ADDRGP4 Display_CaptureItem +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 4 +INDIRP4 +ASGNP4 +line 7261 +;7261: if (menu == NULL) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +NEU4 $3053 +line 7262 +;7262: menu = Menu_GetFocused(); +ADDRLP4 8 +ADDRGP4 Menu_GetFocused +CALLP4 +ASGNP4 +ADDRLP4 0 +ADDRLP4 8 +INDIRP4 +ASGNP4 +line 7263 +;7263: } +LABELV $3053 +line 7264 +;7264: if (menu) { +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3055 +line 7265 +;7265: Menu_HandleKey(menu, key, down ); +ADDRLP4 0 +INDIRP4 +ARGP4 +ADDRFP4 0 +INDIRI4 +ARGI4 +ADDRFP4 4 +INDIRI4 +ARGI4 +ADDRGP4 Menu_HandleKey +CALLV +pop +line 7266 +;7266: } +LABELV $3055 +line 7267 +;7267:} +LABELV $3052 +endproc Display_HandleKey 12 12 +proc Window_CacheContents 12 20 +line 7269 +;7268: +;7269:static void Window_CacheContents(windowDef_t *window) { +line 7270 +;7270: if (window) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3058 +line 7271 +;7271: if (window->cinematicName) { +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3060 +line 7272 +;7272: int cin = DC->playCinematic(window->cinematicName, 0, 0, 0, 0); +ADDRFP4 0 +INDIRP4 +CNSTI4 40 +ADDP4 +INDIRP4 +ARGP4 +ADDRLP4 4 +CNSTF4 0 +ASGNF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 4 +INDIRF4 +ARGF4 +ADDRLP4 8 +ADDRGP4 DC +INDIRP4 +CNSTI4 212 +ADDP4 +INDIRP4 +CALLI4 +ASGNI4 +ADDRLP4 0 +ADDRLP4 8 +INDIRI4 +ASGNI4 +line 7273 +;7273: DC->stopCinematic(cin); +ADDRLP4 0 +INDIRI4 +ARGI4 +ADDRGP4 DC +INDIRP4 +CNSTI4 216 +ADDP4 +INDIRP4 +CALLV +pop +line 7274 +;7274: } +LABELV $3060 +line 7275 +;7275: } +LABELV $3058 +line 7276 +;7276:} +LABELV $3057 +endproc Window_CacheContents 12 20 +proc Item_CacheContents 0 4 +line 7279 +;7277: +;7278: +;7279:static void Item_CacheContents(itemDef_t *item) { +line 7280 +;7280: if (item) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3063 +line 7281 +;7281: Window_CacheContents(&item->window); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Window_CacheContents +CALLV +pop +line 7282 +;7282: } +LABELV $3063 +line 7284 +;7283: +;7284:} +LABELV $3062 +endproc Item_CacheContents 0 4 +proc Menu_CacheContents 8 4 +line 7286 +;7285: +;7286:static void Menu_CacheContents(menuDef_t *menu) { +line 7287 +;7287: if (menu) { +ADDRFP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3066 +line 7289 +;7288: int i; +;7289: Window_CacheContents(&menu->window); +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRGP4 Window_CacheContents +CALLV +pop +line 7290 +;7290: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $3071 +JUMPV +LABELV $3068 +line 7291 +;7291: Item_CacheContents(menu->items[i]); +ADDRLP4 0 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 Item_CacheContents +CALLV +pop +line 7292 +;7292: } +LABELV $3069 +line 7290 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $3071 +ADDRLP4 0 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $3068 +line 7294 +;7293: +;7294: if (menu->soundName && *menu->soundName) { +ADDRLP4 4 +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ASGNP4 +ADDRLP4 4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3072 +ADDRLP4 4 +INDIRP4 +INDIRI1 +CVII4 1 +CNSTI4 0 +EQI4 $3072 +line 7295 +;7295: DC->registerSound(menu->soundName); +ADDRFP4 0 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +ARGP4 +ADDRGP4 DC +INDIRP4 +CNSTI4 200 +ADDP4 +INDIRP4 +CALLI4 +pop +line 7296 +;7296: } +LABELV $3072 +line 7297 +;7297: } +LABELV $3066 +line 7299 +;7298: +;7299:} +LABELV $3065 +endproc Menu_CacheContents 8 4 +export Display_CacheAll +proc Display_CacheAll 4 4 +line 7301 +;7300: +;7301:void Display_CacheAll() { +line 7303 +;7302: int i; +;7303: for (i = 0; i < menuCount; i++) { +ADDRLP4 0 +CNSTI4 0 +ASGNI4 +ADDRGP4 $3078 +JUMPV +LABELV $3075 +line 7304 +;7304: Menu_CacheContents(&Menus[i]); +CNSTI4 1328 +ADDRLP4 0 +INDIRI4 +MULI4 +ADDRGP4 Menus +ADDP4 +ARGP4 +ADDRGP4 Menu_CacheContents +CALLV +pop +line 7305 +;7305: } +LABELV $3076 +line 7303 +ADDRLP4 0 +ADDRLP4 0 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $3078 +ADDRLP4 0 +INDIRI4 +ADDRGP4 menuCount +INDIRI4 +LTI4 $3075 +line 7306 +;7306:} +LABELV $3074 +endproc Display_CacheAll 4 4 +proc Menu_OverActiveItem 32 12 +line 7309 +;7307: +;7308: +;7309:static qboolean Menu_OverActiveItem(menuDef_t *menu, float x, float y) { +line 7310 +;7310: if (menu && menu->window.flags & (WINDOW_VISIBLE | WINDOW_FORCED)) { +ADDRLP4 0 +ADDRFP4 0 +INDIRP4 +ASGNP4 +ADDRLP4 0 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3080 +ADDRLP4 0 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1048580 +BANDI4 +CNSTI4 0 +EQI4 $3080 +line 7311 +;7311: if (Rect_ContainsPoint(&menu->window.rect, x, y)) { +ADDRFP4 0 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 4 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 4 +INDIRI4 +CNSTI4 0 +EQI4 $3082 +line 7313 +;7312: int i; +;7313: for (i = 0; i < menu->itemCount; i++) { +ADDRLP4 8 +CNSTI4 0 +ASGNI4 +ADDRGP4 $3087 +JUMPV +LABELV $3084 +line 7317 +;7314: // turn off focus each item +;7315: // menu->items[i].window.flags &= ~WINDOW_HASFOCUS; +;7316: +;7317: if (!(menu->items[i]->window.flags & (WINDOW_VISIBLE | WINDOW_FORCED))) { +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 1048580 +BANDI4 +CNSTI4 0 +NEI4 $3088 +line 7318 +;7318: continue; +ADDRGP4 $3085 +JUMPV +LABELV $3088 +line 7321 +;7319: } +;7320: +;7321: if (menu->items[i]->window.flags & WINDOW_DECORATION) { +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +CNSTI4 68 +ADDP4 +INDIRI4 +CNSTI4 16 +BANDI4 +CNSTI4 0 +EQI4 $3090 +line 7322 +;7322: continue; +ADDRGP4 $3085 +JUMPV +LABELV $3090 +line 7325 +;7323: } +;7324: +;7325: if (Rect_ContainsPoint(&menu->items[i]->window.rect, x, y)) { +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 12 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 12 +INDIRI4 +CNSTI4 0 +EQI4 $3092 +line 7326 +;7326: itemDef_t *overItem = menu->items[i]; +ADDRLP4 16 +ADDRLP4 8 +INDIRI4 +CNSTI4 2 +LSHI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 260 +ADDP4 +ADDP4 +INDIRP4 +ASGNP4 +line 7327 +;7327: if (overItem->type == ITEM_TYPE_TEXT && overItem->text) { +ADDRLP4 16 +INDIRP4 +CNSTI4 196 +ADDP4 +INDIRI4 +CNSTI4 0 +NEI4 $3094 +ADDRLP4 16 +INDIRP4 +CNSTI4 224 +ADDP4 +INDIRP4 +CVPU4 4 +CNSTU4 0 +EQU4 $3094 +line 7328 +;7328: if (Rect_ContainsPoint(Item_CorrectedTextRect(overItem), x, y)) { +ADDRLP4 16 +INDIRP4 +ARGP4 +ADDRLP4 24 +ADDRGP4 Item_CorrectedTextRect +CALLP4 +ASGNP4 +ADDRLP4 24 +INDIRP4 +ARGP4 +ADDRFP4 4 +INDIRF4 +ARGF4 +ADDRFP4 8 +INDIRF4 +ARGF4 +ADDRLP4 28 +ADDRGP4 Rect_ContainsPoint +CALLI4 +ASGNI4 +ADDRLP4 28 +INDIRI4 +CNSTI4 0 +EQI4 $3085 +line 7329 +;7329: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $3079 +JUMPV +line 7330 +;7330: } else { +line 7331 +;7331: continue; +LABELV $3094 +line 7333 +;7332: } +;7333: } else { +line 7334 +;7334: return qtrue; +CNSTI4 1 +RETI4 +ADDRGP4 $3079 +JUMPV +LABELV $3092 +line 7337 +;7335: } +;7336: } +;7337: } +LABELV $3085 +line 7313 +ADDRLP4 8 +ADDRLP4 8 +INDIRI4 +CNSTI4 1 +ADDI4 +ASGNI4 +LABELV $3087 +ADDRLP4 8 +INDIRI4 +ADDRFP4 0 +INDIRP4 +CNSTI4 188 +ADDP4 +INDIRI4 +LTI4 $3084 +line 7339 +;7338: +;7339: } +LABELV $3082 +line 7340 +;7340: } +LABELV $3080 +line 7341 +;7341: return qfalse; +CNSTI4 0 +RETI4 +LABELV $3079 +endproc Menu_OverActiveItem 32 12 +bss +export menuParseKeywordHash +align 4 +LABELV menuParseKeywordHash +skip 2048 +export itemParseKeywordHash +align 4 +LABELV itemParseKeywordHash +skip 2048 +export g_nameBind2 +align 1 +LABELV g_nameBind2 +skip 32 +export g_nameBind1 +align 1 +LABELV g_nameBind1 +skip 32 +export ui_deferredScript +align 1 +LABELV ui_deferredScript +skip 2048 +align 4 +LABELV strHandle +skip 8192 +align 1 +LABELV strPool +skip 131072 +import MenuFontToHandle +align 4 +LABELV outOfMemory +skip 4 +align 4 +LABELV allocPoint +skip 4 +align 1 +LABELV memoryPool +skip 131072 +export menuStack +align 4 +LABELV menuStack +skip 64 +export Menus +align 4 +LABELV Menus +skip 84992 +align 4 +LABELV scrollInfo +skip 32 +import trap_SP_GetStringTextString +import trap_SP_Register +import trap_SP_RegisterServer +import trap_AnyLanguage_ReadCharFromString +import trap_Language_UsesSpaces +import trap_Language_IsAsian +import trap_R_Font_DrawString +import trap_R_Font_HeightPixels +import trap_R_Font_StrLenChars +import trap_R_Font_StrLenPixels +import trap_PC_RemoveAllGlobalDefines +import trap_PC_LoadGlobalDefines +import trap_PC_SourceFileAndLine +import trap_PC_ReadToken +import trap_PC_FreeSource +import trap_PC_LoadSource +import trap_PC_AddGlobalDefine +import Script_Parse +import Display_ExpandMacros +import GetStringForID +import GetIDForString +import Q_irand +import irand +import flrand +import Rand_Init +import Com_Printf +import Com_Error +import Info_NextPair +import Info_Validate +import Info_SetValueForKey_Big +import Info_SetValueForKey +import Info_RemoveKey_big +import Info_RemoveKey +import Info_ValueForKey +import va +import Q_CleanStr +import Q_PrintStrlen +import Q_strcat +import Q_strncpyz +import Q_strrchr +import Q_strupr +import Q_strlwr +import Q_stricmpn +import Q_strncmp +import Q_stricmp +import Q_isalpha +import Q_isupper +import Q_islower +import Q_isprint +import Com_sprintf +import Parse3DMatrix +import Parse2DMatrix +import Parse1DMatrix +import SkipRestOfLine +import SkipBracedSection +import COM_MatchToken +import COM_ParseVec4 +import COM_ParseFloat +import COM_ParseInt +import COM_ParseString +import COM_ParseWarning +import COM_ParseError +import COM_Compress +import COM_ParseExt +import COM_Parse +import SkipWhitespace +import COM_GetCurrentParseLine +import COM_BeginParseSession +import COM_DefaultExtension +import COM_StripExtension +import COM_SkipPath +import Com_Clamp +import PerpendicularVector +import AngleVectors +import MatrixMultiply +import MakeNormalVectors +import RotateAroundDirection +import RotatePointAroundVector +import ProjectPointOnPlane +import PlaneFromPoints +import AngleDelta +import AngleNormalize180 +import AngleNormalize360 +import AnglesSubtract +import AngleSubtract +import LerpAngle +import AngleMod +import BoxOnPlaneSide +import SetPlaneSignbits +import AxisCopy +import AxisClear +import AnglesToAxis +import vectoangles +import Q_crandom +import Q_random +import Q_rand +import Q_acos +import Q_log2 +import VectorRotate +import Vector4Scale +import VectorNormalize2 +import VectorNormalize +import CrossProduct +import VectorInverse +import VectorNormalizeFast +import DistanceSquared +import Distance +import VectorLengthSquared +import VectorLength +import VectorCompare +import AddPointToBounds +import ClearBounds +import RadiusFromBounds +import NormalizeColor +import ColorBytes4 +import ColorBytes3 +import _VectorMA +import _VectorScale +import _VectorCopy +import _VectorAdd +import _VectorSubtract +import _DotProduct +import ByteToDir +import DirToByte +import powf +import ClampShort +import ClampChar +import Q_rsqrt +import Q_fabs +import axisDefault +import vec3_origin +import g_color_table +import colorDkBlue +import colorLtBlue +import colorDkGrey +import colorMdGrey +import colorLtGrey +import colorWhite +import colorCyan +import colorMagenta +import colorYellow +import colorBlue +import colorGreen +import colorRed +import colorBlack +import colorTable +import bytedirs +import Com_Memcpy +import Com_Memset +import Hunk_Alloc +import forceSpeedLevels +import FloatSwap +import LongSwap +import ShortSwap +import acos +import fabs +import abs +import tan +import atan2 +import cos +import sin +import sqrt +import floor +import ceil +import memcpy +import memset +import memmove +import sscanf +import vsprintf +import _atoi +import atoi +import _atof +import atof +import toupper +import tolower +import strncpy +import strstr +import strchr +import strcmp +import strcpy +import strcat +import strlen +import rand +import srand +import qsort +lit +align 1 +LABELV $3020 +char 1 120 +char 1 58 +char 1 32 +char 1 37 +char 1 100 +char 1 32 +char 1 32 +char 1 121 +char 1 58 +char 1 37 +char 1 100 +char 1 0 +align 1 +LABELV $3019 +char 1 102 +char 1 112 +char 1 115 +char 1 58 +char 1 32 +char 1 37 +char 1 102 +char 1 0 +align 1 +LABELV $3001 +char 1 99 +char 1 111 +char 1 117 +char 1 108 +char 1 100 +char 1 110 +char 1 39 +char 1 116 +char 1 32 +char 1 112 +char 1 97 +char 1 114 +char 1 115 +char 1 101 +char 1 32 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 32 +char 1 107 +char 1 101 +char 1 121 +char 1 119 +char 1 111 +char 1 114 +char 1 100 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $2997 +char 1 117 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 32 +char 1 107 +char 1 101 +char 1 121 +char 1 119 +char 1 111 +char 1 114 +char 1 100 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $2990 +char 1 101 +char 1 110 +char 1 100 +char 1 32 +char 1 111 +char 1 102 +char 1 32 +char 1 102 +char 1 105 +char 1 108 +char 1 101 +char 1 32 +char 1 105 +char 1 110 +char 1 115 +char 1 105 +char 1 100 +char 1 101 +char 1 32 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 10 +char 1 0 +align 1 +LABELV $2973 +char 1 115 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 76 +char 1 111 +char 1 111 +char 1 112 +char 1 0 +align 1 +LABELV $2972 +char 1 112 +char 1 111 +char 1 112 +char 1 117 +char 1 112 +char 1 0 +align 1 +LABELV $2971 +char 1 111 +char 1 110 +char 1 79 +char 1 112 +char 1 101 +char 1 110 +char 1 0 +align 1 +LABELV $2970 +char 1 111 +char 1 117 +char 1 116 +char 1 79 +char 1 102 +char 1 66 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 115 +char 1 67 +char 1 108 +char 1 105 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $2969 +char 1 111 +char 1 110 +char 1 69 +char 1 83 +char 1 67 +char 1 0 +align 1 +LABELV $2968 +char 1 111 +char 1 110 +char 1 67 +char 1 108 +char 1 111 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $2967 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 68 +char 1 101 +char 1 102 +char 1 0 +align 1 +LABELV $2966 +char 1 102 +char 1 117 +char 1 108 +char 1 108 +char 1 115 +char 1 99 +char 1 114 +char 1 101 +char 1 101 +char 1 110 +char 1 0 +align 1 +LABELV $2965 +char 1 102 +char 1 111 +char 1 99 +char 1 117 +char 1 115 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $2964 +char 1 102 +char 1 97 +char 1 100 +char 1 101 +char 1 67 +char 1 121 +char 1 99 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $2963 +char 1 102 +char 1 97 +char 1 100 +char 1 101 +char 1 67 +char 1 108 +char 1 97 +char 1 109 +char 1 112 +char 1 0 +align 1 +LABELV $2962 +char 1 102 +char 1 97 +char 1 100 +char 1 101 +char 1 65 +char 1 109 +char 1 111 +char 1 117 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $2961 +char 1 100 +char 1 105 +char 1 115 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $2960 +char 1 100 +char 1 101 +char 1 115 +char 1 99 +char 1 83 +char 1 99 +char 1 97 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $2959 +char 1 100 +char 1 101 +char 1 115 +char 1 99 +char 1 89 +char 1 0 +align 1 +LABELV $2958 +char 1 100 +char 1 101 +char 1 115 +char 1 99 +char 1 88 +char 1 0 +align 1 +LABELV $2957 +char 1 100 +char 1 101 +char 1 115 +char 1 99 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $2956 +char 1 100 +char 1 101 +char 1 115 +char 1 99 +char 1 65 +char 1 108 +char 1 105 +char 1 103 +char 1 110 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $2955 +char 1 98 +char 1 111 +char 1 114 +char 1 100 +char 1 101 +char 1 114 +char 1 83 +char 1 105 +char 1 122 +char 1 101 +char 1 0 +align 1 +LABELV $2954 +char 1 97 +char 1 112 +char 1 112 +char 1 101 +char 1 97 +char 1 114 +char 1 97 +char 1 110 +char 1 99 +char 1 101 +char 1 73 +char 1 110 +char 1 99 +char 1 114 +char 1 101 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $2872 +char 1 94 +char 1 51 +char 1 85 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 100 +char 1 101 +char 1 115 +char 1 99 +char 1 32 +char 1 97 +char 1 108 +char 1 105 +char 1 103 +char 1 110 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 32 +char 1 118 +char 1 97 +char 1 108 +char 1 117 +char 1 101 +char 1 0 +align 1 +LABELV $2841 +char 1 94 +char 1 51 +char 1 85 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 32 +char 1 115 +char 1 116 +char 1 121 +char 1 108 +char 1 101 +char 1 32 +char 1 118 +char 1 97 +char 1 108 +char 1 117 +char 1 101 +char 1 0 +align 1 +LABELV $2831 +char 1 109 +char 1 97 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $2795 +char 1 37 +char 1 99 +char 1 0 +align 1 +LABELV $2794 +char 1 37 +char 1 99 +char 1 37 +char 1 99 +char 1 0 +align 1 +LABELV $2781 +char 1 99 +char 1 111 +char 1 117 +char 1 108 +char 1 100 +char 1 110 +char 1 39 +char 1 116 +char 1 32 +char 1 112 +char 1 97 +char 1 114 +char 1 115 +char 1 101 +char 1 32 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 32 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 32 +char 1 107 +char 1 101 +char 1 121 +char 1 119 +char 1 111 +char 1 114 +char 1 100 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $2777 +char 1 117 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 32 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 32 +char 1 107 +char 1 101 +char 1 121 +char 1 119 +char 1 111 +char 1 114 +char 1 100 +char 1 32 +char 1 37 +char 1 115 +char 1 0 +align 1 +LABELV $2754 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 72 +char 1 101 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $2753 +char 1 109 +char 1 97 +char 1 120 +char 1 76 +char 1 105 +char 1 110 +char 1 101 +char 1 67 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 0 +align 1 +LABELV $2752 +char 1 119 +char 1 114 +char 1 97 +char 1 112 +char 1 112 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $2751 +char 1 118 +char 1 105 +char 1 115 +char 1 105 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $2750 +char 1 116 +char 1 121 +char 1 112 +char 1 101 +char 1 0 +align 1 +LABELV $2749 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 50 +char 1 97 +char 1 108 +char 1 105 +char 1 103 +char 1 110 +char 1 121 +char 1 0 +align 1 +LABELV $2748 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 50 +char 1 97 +char 1 108 +char 1 105 +char 1 103 +char 1 110 +char 1 120 +char 1 0 +align 1 +LABELV $2747 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 50 +char 1 0 +align 1 +LABELV $2746 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 115 +char 1 116 +char 1 121 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $2745 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 115 +char 1 99 +char 1 97 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $2744 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 97 +char 1 108 +char 1 105 +char 1 103 +char 1 110 +char 1 121 +char 1 0 +align 1 +LABELV $2743 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 97 +char 1 108 +char 1 105 +char 1 103 +char 1 110 +char 1 120 +char 1 0 +align 1 +LABELV $2742 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 97 +char 1 108 +char 1 105 +char 1 103 +char 1 110 +char 1 0 +align 1 +LABELV $2741 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $2740 +char 1 115 +char 1 116 +char 1 121 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $2739 +char 1 115 +char 1 112 +char 1 101 +char 1 99 +char 1 105 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $2738 +char 1 115 +char 1 104 +char 1 111 +char 1 119 +char 1 67 +char 1 118 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $2737 +char 1 114 +char 1 101 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $2736 +char 1 111 +char 1 119 +char 1 110 +char 1 101 +char 1 114 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 70 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $2735 +char 1 111 +char 1 119 +char 1 110 +char 1 101 +char 1 114 +char 1 100 +char 1 114 +char 1 97 +char 1 119 +char 1 0 +align 1 +LABELV $2734 +char 1 111 +char 1 117 +char 1 116 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $2733 +char 1 111 +char 1 110 +char 1 70 +char 1 111 +char 1 99 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $2732 +char 1 110 +char 1 111 +char 1 116 +char 1 115 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $2731 +char 1 110 +char 1 97 +char 1 109 +char 1 101 +char 1 0 +align 1 +LABELV $2730 +char 1 109 +char 1 111 +char 1 117 +char 1 115 +char 1 101 +char 1 69 +char 1 120 +char 1 105 +char 1 116 +char 1 84 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $2729 +char 1 109 +char 1 111 +char 1 117 +char 1 115 +char 1 101 +char 1 69 +char 1 120 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $2728 +char 1 109 +char 1 111 +char 1 117 +char 1 115 +char 1 101 +char 1 69 +char 1 110 +char 1 116 +char 1 101 +char 1 114 +char 1 84 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $2727 +char 1 109 +char 1 111 +char 1 117 +char 1 115 +char 1 101 +char 1 69 +char 1 110 +char 1 116 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $2726 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 114 +char 1 111 +char 1 116 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $2725 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 111 +char 1 114 +char 1 105 +char 1 103 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $2724 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 102 +char 1 111 +char 1 118 +char 1 121 +char 1 0 +align 1 +LABELV $2723 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 102 +char 1 111 +char 1 118 +char 1 120 +char 1 0 +align 1 +LABELV $2722 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 95 +char 1 97 +char 1 110 +char 1 103 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $2721 +char 1 109 +char 1 97 +char 1 120 +char 1 80 +char 1 97 +char 1 105 +char 1 110 +char 1 116 +char 1 67 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 0 +align 1 +LABELV $2720 +char 1 109 +char 1 97 +char 1 120 +char 1 67 +char 1 104 +char 1 97 +char 1 114 +char 1 115 +char 1 0 +align 1 +LABELV $2719 +char 1 108 +char 1 101 +char 1 97 +char 1 118 +char 1 101 +char 1 70 +char 1 111 +char 1 99 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $2718 +char 1 104 +char 1 111 +char 1 114 +char 1 105 +char 1 122 +char 1 111 +char 1 110 +char 1 116 +char 1 97 +char 1 108 +char 1 115 +char 1 99 +char 1 114 +char 1 111 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $2717 +char 1 104 +char 1 105 +char 1 100 +char 1 101 +char 1 67 +char 1 118 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $2716 +char 1 103 +char 1 114 +char 1 111 +char 1 117 +char 1 112 +char 1 0 +align 1 +LABELV $2715 +char 1 102 +char 1 111 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $2714 +char 1 102 +char 1 111 +char 1 99 +char 1 117 +char 1 115 +char 1 83 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $2713 +char 1 102 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $2712 +char 1 102 +char 1 101 +char 1 101 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $2711 +char 1 101 +char 1 110 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 67 +char 1 118 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $2710 +char 1 101 +char 1 108 +char 1 101 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 119 +char 1 105 +char 1 100 +char 1 116 +char 1 104 +char 1 0 +align 1 +LABELV $2709 +char 1 101 +char 1 108 +char 1 101 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 116 +char 1 121 +char 1 112 +char 1 101 +char 1 0 +align 1 +LABELV $2708 +char 1 101 +char 1 108 +char 1 101 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 104 +char 1 101 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $2707 +char 1 100 +char 1 111 +char 1 117 +char 1 98 +char 1 108 +char 1 101 +char 1 99 +char 1 108 +char 1 105 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $2706 +char 1 100 +char 1 105 +char 1 115 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 67 +char 1 118 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $2705 +char 1 100 +char 1 101 +char 1 99 +char 1 111 +char 1 114 +char 1 97 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $2704 +char 1 100 +char 1 101 +char 1 115 +char 1 99 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $2703 +char 1 99 +char 1 118 +char 1 97 +char 1 114 +char 1 84 +char 1 101 +char 1 115 +char 1 116 +char 1 0 +align 1 +LABELV $2702 +char 1 99 +char 1 118 +char 1 97 +char 1 114 +char 1 83 +char 1 116 +char 1 114 +char 1 76 +char 1 105 +char 1 115 +char 1 116 +char 1 0 +align 1 +LABELV $2701 +char 1 99 +char 1 118 +char 1 97 +char 1 114 +char 1 70 +char 1 108 +char 1 111 +char 1 97 +char 1 116 +char 1 76 +char 1 105 +char 1 115 +char 1 116 +char 1 0 +align 1 +LABELV $2700 +char 1 99 +char 1 118 +char 1 97 +char 1 114 +char 1 70 +char 1 108 +char 1 111 +char 1 97 +char 1 116 +char 1 0 +align 1 +LABELV $2699 +char 1 99 +char 1 118 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $2698 +char 1 99 +char 1 111 +char 1 108 +char 1 117 +char 1 109 +char 1 110 +char 1 115 +char 1 0 +align 1 +LABELV $2697 +char 1 99 +char 1 105 +char 1 110 +char 1 101 +char 1 109 +char 1 97 +char 1 116 +char 1 105 +char 1 99 +char 1 0 +align 1 +LABELV $2696 +char 1 98 +char 1 111 +char 1 114 +char 1 100 +char 1 101 +char 1 114 +char 1 115 +char 1 105 +char 1 122 +char 1 101 +char 1 0 +align 1 +LABELV $2695 +char 1 98 +char 1 111 +char 1 114 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $2694 +char 1 98 +char 1 97 +char 1 99 +char 1 107 +char 1 103 +char 1 114 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $2693 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 95 +char 1 115 +char 1 104 +char 1 97 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $2692 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 95 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $2691 +char 1 97 +char 1 112 +char 1 112 +char 1 101 +char 1 97 +char 1 114 +char 1 97 +char 1 110 +char 1 99 +char 1 101 +char 1 95 +char 1 115 +char 1 108 +char 1 111 +char 1 116 +char 1 0 +align 1 +LABELV $2690 +char 1 97 +char 1 117 +char 1 116 +char 1 111 +char 1 119 +char 1 114 +char 1 97 +char 1 112 +char 1 112 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $2689 +char 1 97 +char 1 108 +char 1 105 +char 1 103 +char 1 110 +char 1 0 +align 1 +LABELV $2688 +char 1 97 +char 1 100 +char 1 100 +char 1 67 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 82 +char 1 97 +char 1 110 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $2687 +char 1 97 +char 1 99 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $2626 +char 1 101 +char 1 110 +char 1 100 +char 1 32 +char 1 111 +char 1 102 +char 1 32 +char 1 102 +char 1 105 +char 1 108 +char 1 101 +char 1 32 +char 1 105 +char 1 110 +char 1 115 +char 1 105 +char 1 100 +char 1 101 +char 1 32 +char 1 109 +char 1 101 +char 1 110 +char 1 117 +char 1 32 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 10 +char 1 0 +align 1 +LABELV $2498 +char 1 94 +char 1 51 +char 1 85 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 32 +char 1 97 +char 1 108 +char 1 105 +char 1 103 +char 1 110 +char 1 109 +char 1 101 +char 1 110 +char 1 116 +char 1 32 +char 1 118 +char 1 97 +char 1 108 +char 1 117 +char 1 101 +char 1 0 +align 1 +LABELV $2440 +char 1 94 +char 1 51 +char 1 85 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 32 +char 1 115 +char 1 116 +char 1 121 +char 1 108 +char 1 101 +char 1 32 +char 1 118 +char 1 97 +char 1 108 +char 1 117 +char 1 101 +char 1 0 +align 1 +LABELV $2436 +char 1 94 +char 1 51 +char 1 85 +char 1 110 +char 1 107 +char 1 110 +char 1 111 +char 1 119 +char 1 110 +char 1 32 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 32 +char 1 115 +char 1 116 +char 1 121 +char 1 108 +char 1 101 +char 1 32 +char 1 118 +char 1 97 +char 1 108 +char 1 117 +char 1 101 +char 1 32 +char 1 39 +char 1 37 +char 1 115 +char 1 39 +char 1 0 +align 1 +LABELV $1872 +char 1 70 +char 1 73 +char 1 88 +char 1 77 +char 1 69 +char 1 0 +align 1 +LABELV $1837 +char 1 63 +char 1 63 +char 1 63 +char 1 0 +align 1 +LABELV $1836 +char 1 32 +char 1 37 +char 1 115 +char 1 32 +char 1 0 +align 1 +LABELV $1835 +char 1 77 +char 1 69 +char 1 78 +char 1 85 +char 1 83 +char 1 51 +char 1 95 +char 1 75 +char 1 69 +char 1 89 +char 1 66 +char 1 73 +char 1 78 +char 1 68 +char 1 95 +char 1 79 +char 1 82 +char 1 0 +align 1 +LABELV $1782 +char 1 99 +char 1 103 +char 1 95 +char 1 116 +char 1 104 +char 1 105 +char 1 114 +char 1 100 +char 1 112 +char 1 101 +char 1 114 +char 1 115 +char 1 111 +char 1 110 +char 1 32 +char 1 33 +char 1 0 +align 1 +LABELV $1781 +char 1 117 +char 1 115 +char 1 101 +char 1 95 +char 1 115 +char 1 101 +char 1 110 +char 1 116 +char 1 114 +char 1 121 +char 1 0 +align 1 +LABELV $1780 +char 1 117 +char 1 115 +char 1 101 +char 1 95 +char 1 101 +char 1 108 +char 1 101 +char 1 99 +char 1 116 +char 1 114 +char 1 111 +char 1 98 +char 1 105 +char 1 110 +char 1 111 +char 1 99 +char 1 117 +char 1 108 +char 1 97 +char 1 114 +char 1 115 +char 1 0 +align 1 +LABELV $1779 +char 1 117 +char 1 115 +char 1 101 +char 1 95 +char 1 98 +char 1 97 +char 1 99 +char 1 116 +char 1 97 +char 1 0 +align 1 +LABELV $1778 +char 1 117 +char 1 115 +char 1 101 +char 1 95 +char 1 102 +char 1 105 +char 1 101 +char 1 108 +char 1 100 +char 1 0 +align 1 +LABELV $1777 +char 1 117 +char 1 115 +char 1 101 +char 1 95 +char 1 115 +char 1 101 +char 1 101 +char 1 107 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1776 +char 1 105 +char 1 110 +char 1 118 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 0 +align 1 +LABELV $1775 +char 1 105 +char 1 110 +char 1 118 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $1774 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 0 +align 1 +LABELV $1773 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $1772 +char 1 43 +char 1 117 +char 1 115 +char 1 101 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 0 +align 1 +LABELV $1771 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 115 +char 1 101 +char 1 101 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $1770 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 112 +char 1 111 +char 1 119 +char 1 101 +char 1 114 +char 1 111 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1769 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 111 +char 1 116 +char 1 104 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1768 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 97 +char 1 98 +char 1 115 +char 1 111 +char 1 114 +char 1 98 +char 1 0 +align 1 +LABELV $1767 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 112 +char 1 114 +char 1 111 +char 1 116 +char 1 101 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $1766 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 114 +char 1 97 +char 1 103 +char 1 101 +char 1 0 +align 1 +LABELV $1765 +char 1 43 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 100 +char 1 114 +char 1 97 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $1764 +char 1 43 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 108 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 110 +char 1 105 +char 1 110 +char 1 103 +char 1 0 +align 1 +LABELV $1763 +char 1 43 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 103 +char 1 114 +char 1 105 +char 1 112 +char 1 0 +align 1 +LABELV $1762 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 108 +char 1 0 +align 1 +LABELV $1761 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 100 +char 1 105 +char 1 115 +char 1 116 +char 1 114 +char 1 97 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $1760 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 115 +char 1 112 +char 1 101 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $1759 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 112 +char 1 117 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $1758 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 116 +char 1 104 +char 1 114 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $1757 +char 1 43 +char 1 102 +char 1 111 +char 1 114 +char 1 99 +char 1 101 +char 1 95 +char 1 106 +char 1 117 +char 1 109 +char 1 112 +char 1 0 +align 1 +LABELV $1756 +char 1 109 +char 1 101 +char 1 115 +char 1 115 +char 1 97 +char 1 103 +char 1 101 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 52 +char 1 0 +align 1 +LABELV $1755 +char 1 109 +char 1 101 +char 1 115 +char 1 115 +char 1 97 +char 1 103 +char 1 101 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 51 +char 1 0 +align 1 +LABELV $1754 +char 1 109 +char 1 101 +char 1 115 +char 1 115 +char 1 97 +char 1 103 +char 1 101 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 50 +char 1 0 +align 1 +LABELV $1753 +char 1 109 +char 1 101 +char 1 115 +char 1 115 +char 1 97 +char 1 103 +char 1 101 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 0 +align 1 +LABELV $1752 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 115 +char 1 68 +char 1 111 +char 1 119 +char 1 110 +char 1 0 +align 1 +LABELV $1751 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 115 +char 1 85 +char 1 112 +char 1 0 +align 1 +LABELV $1750 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 71 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 108 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $1749 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 68 +char 1 101 +char 1 97 +char 1 116 +char 1 104 +char 1 73 +char 1 110 +char 1 115 +char 1 117 +char 1 108 +char 1 116 +char 1 0 +align 1 +LABELV $1748 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 84 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $1747 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 80 +char 1 114 +char 1 97 +char 1 105 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $1746 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 75 +char 1 105 +char 1 108 +char 1 108 +char 1 73 +char 1 110 +char 1 115 +char 1 117 +char 1 108 +char 1 116 +char 1 0 +align 1 +LABELV $1745 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 83 +char 1 117 +char 1 105 +char 1 99 +char 1 105 +char 1 100 +char 1 101 +char 1 0 +align 1 +LABELV $1744 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 79 +char 1 119 +char 1 110 +char 1 70 +char 1 108 +char 1 97 +char 1 103 +char 1 0 +align 1 +LABELV $1743 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 69 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 116 +char 1 0 +align 1 +LABELV $1742 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 82 +char 1 101 +char 1 116 +char 1 114 +char 1 105 +char 1 101 +char 1 118 +char 1 101 +char 1 0 +align 1 +LABELV $1741 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 70 +char 1 111 +char 1 108 +char 1 108 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $1740 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 67 +char 1 97 +char 1 109 +char 1 112 +char 1 0 +align 1 +LABELV $1739 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 80 +char 1 97 +char 1 116 +char 1 114 +char 1 111 +char 1 108 +char 1 0 +align 1 +LABELV $1738 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 68 +char 1 101 +char 1 102 +char 1 101 +char 1 110 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $1737 +char 1 116 +char 1 97 +char 1 115 +char 1 107 +char 1 79 +char 1 102 +char 1 102 +char 1 101 +char 1 110 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $1736 +char 1 100 +char 1 101 +char 1 110 +char 1 121 +char 1 79 +char 1 114 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1735 +char 1 99 +char 1 111 +char 1 110 +char 1 102 +char 1 105 +char 1 114 +char 1 109 +char 1 79 +char 1 114 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1734 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 79 +char 1 114 +char 1 100 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1733 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 84 +char 1 101 +char 1 97 +char 1 109 +char 1 77 +char 1 101 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1732 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 84 +char 1 101 +char 1 97 +char 1 109 +char 1 77 +char 1 101 +char 1 109 +char 1 98 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1731 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 110 +char 1 101 +char 1 120 +char 1 116 +char 1 0 +align 1 +LABELV $1730 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 112 +char 1 114 +char 1 101 +char 1 118 +char 1 0 +align 1 +LABELV $1729 +char 1 43 +char 1 116 +char 1 97 +char 1 117 +char 1 110 +char 1 116 +char 1 0 +align 1 +LABELV $1728 +char 1 101 +char 1 110 +char 1 103 +char 1 97 +char 1 103 +char 1 101 +char 1 95 +char 1 100 +char 1 117 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $1727 +char 1 43 +char 1 117 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $1726 +char 1 43 +char 1 97 +char 1 108 +char 1 116 +char 1 97 +char 1 116 +char 1 116 +char 1 97 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $1725 +char 1 43 +char 1 97 +char 1 116 +char 1 116 +char 1 97 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $1724 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 49 +char 1 51 +char 1 0 +align 1 +LABELV $1723 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 49 +char 1 50 +char 1 0 +align 1 +LABELV $1722 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 49 +char 1 49 +char 1 0 +align 1 +LABELV $1721 +char 1 115 +char 1 97 +char 1 98 +char 1 101 +char 1 114 +char 1 65 +char 1 116 +char 1 116 +char 1 97 +char 1 99 +char 1 107 +char 1 67 +char 1 121 +char 1 99 +char 1 108 +char 1 101 +char 1 0 +align 1 +LABELV $1720 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 49 +char 1 48 +char 1 0 +align 1 +LABELV $1719 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 57 +char 1 0 +align 1 +LABELV $1718 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 56 +char 1 0 +align 1 +LABELV $1717 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 55 +char 1 0 +align 1 +LABELV $1716 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 54 +char 1 0 +align 1 +LABELV $1715 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 53 +char 1 0 +align 1 +LABELV $1714 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 52 +char 1 0 +align 1 +LABELV $1713 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 51 +char 1 0 +align 1 +LABELV $1712 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 50 +char 1 0 +align 1 +LABELV $1711 +char 1 119 +char 1 101 +char 1 97 +char 1 112 +char 1 111 +char 1 110 +char 1 32 +char 1 49 +char 1 0 +align 1 +LABELV $1710 +char 1 99 +char 1 101 +char 1 110 +char 1 116 +char 1 101 +char 1 114 +char 1 118 +char 1 105 +char 1 101 +char 1 119 +char 1 0 +align 1 +LABELV $1709 +char 1 43 +char 1 109 +char 1 108 +char 1 111 +char 1 111 +char 1 107 +char 1 0 +align 1 +LABELV $1708 +char 1 43 +char 1 108 +char 1 111 +char 1 111 +char 1 107 +char 1 100 +char 1 111 +char 1 119 +char 1 110 +char 1 0 +align 1 +LABELV $1707 +char 1 43 +char 1 108 +char 1 111 +char 1 111 +char 1 107 +char 1 117 +char 1 112 +char 1 0 +align 1 +LABELV $1706 +char 1 43 +char 1 115 +char 1 116 +char 1 114 +char 1 97 +char 1 102 +char 1 101 +char 1 0 +align 1 +LABELV $1705 +char 1 43 +char 1 114 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $1704 +char 1 43 +char 1 108 +char 1 101 +char 1 102 +char 1 116 +char 1 0 +align 1 +LABELV $1703 +char 1 43 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 100 +char 1 111 +char 1 119 +char 1 110 +char 1 0 +align 1 +LABELV $1702 +char 1 43 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 117 +char 1 112 +char 1 0 +align 1 +LABELV $1701 +char 1 43 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 114 +char 1 105 +char 1 103 +char 1 104 +char 1 116 +char 1 0 +align 1 +LABELV $1700 +char 1 43 +char 1 109 +char 1 111 +char 1 118 +char 1 101 +char 1 108 +char 1 101 +char 1 102 +char 1 116 +char 1 0 +align 1 +LABELV $1699 +char 1 43 +char 1 98 +char 1 97 +char 1 99 +char 1 107 +char 1 0 +align 1 +LABELV $1698 +char 1 43 +char 1 102 +char 1 111 +char 1 114 +char 1 119 +char 1 97 +char 1 114 +char 1 100 +char 1 0 +align 1 +LABELV $1697 +char 1 43 +char 1 115 +char 1 112 +char 1 101 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $1696 +char 1 43 +char 1 98 +char 1 117 +char 1 116 +char 1 116 +char 1 111 +char 1 110 +char 1 50 +char 1 0 +align 1 +LABELV $1695 +char 1 43 +char 1 115 +char 1 99 +char 1 111 +char 1 114 +char 1 101 +char 1 115 +char 1 0 +align 1 +LABELV $1676 +char 1 77 +char 1 69 +char 1 78 +char 1 85 +char 1 83 +char 1 48 +char 1 95 +char 1 78 +char 1 79 +char 1 0 +align 1 +LABELV $1675 +char 1 77 +char 1 69 +char 1 78 +char 1 85 +char 1 83 +char 1 48 +char 1 95 +char 1 89 +char 1 69 +char 1 83 +char 1 0 +align 1 +LABELV $1520 +char 1 115 +char 1 99 +char 1 114 +char 1 101 +char 1 101 +char 1 110 +char 1 115 +char 1 104 +char 1 111 +char 1 116 +char 1 10 +char 1 0 +align 1 +LABELV $1516 +char 1 100 +char 1 101 +char 1 118 +char 1 101 +char 1 108 +char 1 111 +char 1 112 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $1362 +char 1 115 +char 1 108 +char 1 105 +char 1 100 +char 1 101 +char 1 114 +char 1 32 +char 1 104 +char 1 97 +char 1 110 +char 1 100 +char 1 108 +char 1 101 +char 1 32 +char 1 107 +char 1 101 +char 1 121 +char 1 32 +char 1 101 +char 1 120 +char 1 105 +char 1 116 +char 1 10 +char 1 0 +align 1 +LABELV $1140 +char 1 37 +char 1 102 +char 1 0 +align 1 +LABELV $1086 +char 1 37 +char 1 105 +char 1 0 +align 1 +LABELV $658 +char 1 114 +char 1 117 +char 1 110 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 114 +char 1 114 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $657 +char 1 100 +char 1 101 +char 1 102 +char 1 101 +char 1 114 +char 1 0 +align 1 +LABELV $656 +char 1 111 +char 1 114 +char 1 98 +char 1 105 +char 1 116 +char 1 0 +align 1 +LABELV $655 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 108 +char 1 111 +char 1 111 +char 1 112 +char 1 101 +char 1 100 +char 1 0 +align 1 +LABELV $654 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 0 +align 1 +LABELV $653 +char 1 101 +char 1 120 +char 1 101 +char 1 99 +char 1 0 +align 1 +LABELV $652 +char 1 115 +char 1 101 +char 1 116 +char 1 99 +char 1 118 +char 1 97 +char 1 114 +char 1 116 +char 1 111 +char 1 99 +char 1 118 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $651 +char 1 115 +char 1 101 +char 1 116 +char 1 99 +char 1 118 +char 1 97 +char 1 114 +char 1 0 +align 1 +LABELV $650 +char 1 116 +char 1 114 +char 1 97 +char 1 110 +char 1 115 +char 1 105 +char 1 116 +char 1 105 +char 1 111 +char 1 110 +char 1 0 +align 1 +LABELV $649 +char 1 115 +char 1 101 +char 1 116 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 104 +char 1 101 +char 1 97 +char 1 100 +char 1 0 +align 1 +LABELV $648 +char 1 115 +char 1 101 +char 1 116 +char 1 112 +char 1 108 +char 1 97 +char 1 121 +char 1 101 +char 1 114 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $647 +char 1 115 +char 1 101 +char 1 116 +char 1 102 +char 1 111 +char 1 99 +char 1 117 +char 1 115 +char 1 0 +align 1 +LABELV $646 +char 1 115 +char 1 101 +char 1 116 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $645 +char 1 115 +char 1 101 +char 1 116 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 114 +char 1 101 +char 1 99 +char 1 116 +char 1 0 +align 1 +LABELV $644 +char 1 115 +char 1 101 +char 1 116 +char 1 105 +char 1 116 +char 1 101 +char 1 109 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $643 +char 1 115 +char 1 101 +char 1 116 +char 1 98 +char 1 97 +char 1 99 +char 1 107 +char 1 103 +char 1 114 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 0 +align 1 +LABELV $642 +char 1 115 +char 1 101 +char 1 116 +char 1 97 +char 1 115 +char 1 115 +char 1 101 +char 1 116 +char 1 0 +align 1 +LABELV $641 +char 1 99 +char 1 108 +char 1 111 +char 1 115 +char 1 101 +char 1 0 +align 1 +LABELV $640 +char 1 111 +char 1 112 +char 1 101 +char 1 110 +char 1 0 +align 1 +LABELV $639 +char 1 115 +char 1 101 +char 1 116 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $638 +char 1 104 +char 1 105 +char 1 100 +char 1 101 +char 1 0 +align 1 +LABELV $637 +char 1 115 +char 1 104 +char 1 111 +char 1 119 +char 1 0 +align 1 +LABELV $636 +char 1 102 +char 1 97 +char 1 100 +char 1 101 +char 1 111 +char 1 117 +char 1 116 +char 1 0 +align 1 +LABELV $635 +char 1 102 +char 1 97 +char 1 100 +char 1 101 +char 1 105 +char 1 110 +char 1 0 +align 1 +LABELV $628 +char 1 37 +char 1 115 +char 1 32 +char 1 59 +char 1 32 +char 1 0 +align 1 +LABELV $618 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 95 +char 1 104 +char 1 101 +char 1 97 +char 1 100 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $614 +char 1 116 +char 1 101 +char 1 97 +char 1 109 +char 1 95 +char 1 109 +char 1 111 +char 1 100 +char 1 101 +char 1 108 +char 1 0 +align 1 +LABELV $570 +char 1 97 +char 1 108 +char 1 108 +char 1 0 +align 1 +LABELV $428 +char 1 98 +char 1 111 +char 1 114 +char 1 100 +char 1 101 +char 1 114 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $425 +char 1 102 +char 1 111 +char 1 114 +char 1 101 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $422 +char 1 98 +char 1 97 +char 1 99 +char 1 107 +char 1 99 +char 1 111 +char 1 108 +char 1 111 +char 1 114 +char 1 0 +align 1 +LABELV $258 +char 1 32 +char 1 0 +align 1 +LABELV $255 +char 1 34 +char 1 37 +char 1 115 +char 1 34 +char 1 0 +align 1 +LABELV $242 +char 1 123 +char 1 0 +align 1 +LABELV $229 +char 1 94 +char 1 51 +char 1 85 +char 1 110 +char 1 97 +char 1 98 +char 1 108 +char 1 101 +char 1 32 +char 1 116 +char 1 111 +char 1 32 +char 1 108 +char 1 111 +char 1 99 +char 1 97 +char 1 116 +char 1 101 +char 1 32 +char 1 83 +char 1 116 +char 1 114 +char 1 105 +char 1 112 +char 1 69 +char 1 100 +char 1 32 +char 1 116 +char 1 101 +char 1 120 +char 1 116 +char 1 32 +char 1 39 +char 1 37 +char 1 115 +char 1 39 +char 1 10 +char 1 0 +align 1 +LABELV $220 +char 1 125 +char 1 0 +align 1 +LABELV $192 +char 1 101 +char 1 120 +char 1 112 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 105 +char 1 110 +char 1 116 +char 1 101 +char 1 103 +char 1 101 +char 1 114 +char 1 32 +char 1 98 +char 1 117 +char 1 116 +char 1 32 +char 1 102 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $159 +char 1 101 +char 1 120 +char 1 112 +char 1 101 +char 1 99 +char 1 116 +char 1 101 +char 1 100 +char 1 32 +char 1 102 +char 1 108 +char 1 111 +char 1 97 +char 1 116 +char 1 32 +char 1 98 +char 1 117 +char 1 116 +char 1 32 +char 1 102 +char 1 111 +char 1 117 +char 1 110 +char 1 100 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $136 +char 1 94 +char 1 49 +char 1 69 +char 1 82 +char 1 82 +char 1 79 +char 1 82 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 44 +char 1 32 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 32 +char 1 37 +char 1 100 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $132 +char 1 94 +char 1 51 +char 1 87 +char 1 65 +char 1 82 +char 1 78 +char 1 73 +char 1 78 +char 1 71 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 44 +char 1 32 +char 1 108 +char 1 105 +char 1 110 +char 1 101 +char 1 32 +char 1 37 +char 1 100 +char 1 58 +char 1 32 +char 1 37 +char 1 115 +char 1 10 +char 1 0 +align 1 +LABELV $121 +char 1 77 +char 1 101 +char 1 109 +char 1 111 +char 1 114 +char 1 121 +char 1 32 +char 1 80 +char 1 111 +char 1 111 +char 1 108 +char 1 32 +char 1 105 +char 1 115 +char 1 32 +char 1 37 +char 1 46 +char 1 49 +char 1 102 +char 1 37 +char 1 37 +char 1 32 +char 1 102 +char 1 117 +char 1 108 +char 1 108 +char 1 44 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 98 +char 1 121 +char 1 116 +char 1 101 +char 1 115 +char 1 32 +char 1 111 +char 1 117 +char 1 116 +char 1 32 +char 1 111 +char 1 102 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 117 +char 1 115 +char 1 101 +char 1 100 +char 1 46 +char 1 10 +char 1 0 +align 1 +LABELV $120 +char 1 83 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 32 +char 1 80 +char 1 111 +char 1 111 +char 1 108 +char 1 32 +char 1 105 +char 1 115 +char 1 32 +char 1 37 +char 1 46 +char 1 49 +char 1 102 +char 1 37 +char 1 37 +char 1 32 +char 1 102 +char 1 117 +char 1 108 +char 1 108 +char 1 44 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 98 +char 1 121 +char 1 116 +char 1 101 +char 1 115 +char 1 32 +char 1 111 +char 1 117 +char 1 116 +char 1 32 +char 1 111 +char 1 102 +char 1 32 +char 1 37 +char 1 105 +char 1 32 +char 1 117 +char 1 115 +char 1 101 +char 1 100 +char 1 46 +char 1 10 +char 1 0 +align 1 +LABELV $119 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 45 +char 1 10 +char 1 0 +align 1 +LABELV $118 +char 1 77 +char 1 101 +char 1 109 +char 1 111 +char 1 114 +char 1 121 +char 1 47 +char 1 83 +char 1 116 +char 1 114 +char 1 105 +char 1 110 +char 1 103 +char 1 32 +char 1 80 +char 1 111 +char 1 111 +char 1 108 +char 1 32 +char 1 73 +char 1 110 +char 1 102 +char 1 111 +char 1 10 +char 1 0 +align 1 +LABELV $99 +char 1 0 +align 1 +LABELV $90 +char 1 85 +char 1 73 +char 1 95 +char 1 65 +char 1 108 +char 1 108 +char 1 111 +char 1 99 +char 1 58 +char 1 32 +char 1 70 +char 1 97 +char 1 105 +char 1 108 +char 1 117 +char 1 114 +char 1 101 +char 1 46 +char 1 32 +char 1 79 +char 1 117 +char 1 116 +char 1 32 +char 1 111 +char 1 102 +char 1 32 +char 1 109 +char 1 101 +char 1 109 +char 1 111 +char 1 114 +char 1 121 +char 1 33 +char 1 10 +char 1 0 +align 1 +LABELV $84 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 83 +char 1 67 +char 1 82 +char 1 79 +char 1 76 +char 1 76 +char 1 0 +align 1 +LABELV $83 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 66 +char 1 73 +char 1 78 +char 1 68 +char 1 0 +align 1 +LABELV $82 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 77 +char 1 85 +char 1 76 +char 1 84 +char 1 73 +char 1 0 +align 1 +LABELV $81 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 89 +char 1 69 +char 1 83 +char 1 78 +char 1 79 +char 1 0 +align 1 +LABELV $80 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 83 +char 1 76 +char 1 73 +char 1 68 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $79 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 78 +char 1 85 +char 1 77 +char 1 69 +char 1 82 +char 1 73 +char 1 67 +char 1 70 +char 1 73 +char 1 69 +char 1 76 +char 1 68 +char 1 0 +align 1 +LABELV $78 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 79 +char 1 87 +char 1 78 +char 1 69 +char 1 82 +char 1 68 +char 1 82 +char 1 65 +char 1 87 +char 1 0 +align 1 +LABELV $77 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 77 +char 1 79 +char 1 68 +char 1 69 +char 1 76 +char 1 0 +align 1 +LABELV $76 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 76 +char 1 73 +char 1 83 +char 1 84 +char 1 66 +char 1 79 +char 1 88 +char 1 0 +align 1 +LABELV $75 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 67 +char 1 79 +char 1 77 +char 1 66 +char 1 79 +char 1 0 +align 1 +LABELV $74 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 69 +char 1 68 +char 1 73 +char 1 84 +char 1 70 +char 1 73 +char 1 69 +char 1 76 +char 1 68 +char 1 0 +align 1 +LABELV $73 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 67 +char 1 72 +char 1 69 +char 1 67 +char 1 75 +char 1 66 +char 1 79 +char 1 88 +char 1 0 +align 1 +LABELV $72 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 82 +char 1 65 +char 1 68 +char 1 73 +char 1 79 +char 1 66 +char 1 85 +char 1 84 +char 1 84 +char 1 79 +char 1 78 +char 1 0 +align 1 +LABELV $71 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 66 +char 1 85 +char 1 84 +char 1 84 +char 1 79 +char 1 78 +char 1 0 +align 1 +LABELV $70 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 84 +char 1 89 +char 1 80 +char 1 69 +char 1 95 +char 1 84 +char 1 69 +char 1 88 +char 1 84 +char 1 0 +align 1 +LABELV $69 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 65 +char 1 76 +char 1 73 +char 1 71 +char 1 78 +char 1 95 +char 1 82 +char 1 73 +char 1 71 +char 1 72 +char 1 84 +char 1 0 +align 1 +LABELV $68 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 65 +char 1 76 +char 1 73 +char 1 71 +char 1 78 +char 1 95 +char 1 67 +char 1 69 +char 1 78 +char 1 84 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $67 +char 1 73 +char 1 84 +char 1 69 +char 1 77 +char 1 95 +char 1 65 +char 1 76 +char 1 73 +char 1 71 +char 1 78 +char 1 95 +char 1 76 +char 1 69 +char 1 70 +char 1 84 +char 1 0 +align 1 +LABELV $66 +char 1 87 +char 1 73 +char 1 78 +char 1 68 +char 1 79 +char 1 87 +char 1 95 +char 1 83 +char 1 84 +char 1 89 +char 1 76 +char 1 69 +char 1 95 +char 1 67 +char 1 73 +char 1 78 +char 1 69 +char 1 77 +char 1 65 +char 1 84 +char 1 73 +char 1 67 +char 1 0 +align 1 +LABELV $65 +char 1 87 +char 1 73 +char 1 78 +char 1 68 +char 1 79 +char 1 87 +char 1 95 +char 1 83 +char 1 84 +char 1 89 +char 1 76 +char 1 69 +char 1 95 +char 1 84 +char 1 69 +char 1 65 +char 1 77 +char 1 67 +char 1 79 +char 1 76 +char 1 79 +char 1 82 +char 1 0 +align 1 +LABELV $64 +char 1 87 +char 1 73 +char 1 78 +char 1 68 +char 1 79 +char 1 87 +char 1 95 +char 1 83 +char 1 84 +char 1 89 +char 1 76 +char 1 69 +char 1 95 +char 1 83 +char 1 72 +char 1 65 +char 1 68 +char 1 69 +char 1 82 +char 1 0 +align 1 +LABELV $63 +char 1 87 +char 1 73 +char 1 78 +char 1 68 +char 1 79 +char 1 87 +char 1 95 +char 1 83 +char 1 84 +char 1 89 +char 1 76 +char 1 69 +char 1 95 +char 1 71 +char 1 82 +char 1 65 +char 1 68 +char 1 73 +char 1 69 +char 1 78 +char 1 84 +char 1 0 +align 1 +LABELV $62 +char 1 87 +char 1 73 +char 1 78 +char 1 68 +char 1 79 +char 1 87 +char 1 95 +char 1 83 +char 1 84 +char 1 89 +char 1 76 +char 1 69 +char 1 95 +char 1 70 +char 1 73 +char 1 76 +char 1 76 +char 1 69 +char 1 68 +char 1 0 +align 1 +LABELV $61 +char 1 87 +char 1 73 +char 1 78 +char 1 68 +char 1 79 +char 1 87 +char 1 95 +char 1 83 +char 1 84 +char 1 89 +char 1 76 +char 1 69 +char 1 95 +char 1 69 +char 1 77 +char 1 80 +char 1 84 +char 1 89 +char 1 0 +align 1 +LABELV $60 +char 1 87 +char 1 73 +char 1 78 +char 1 68 +char 1 79 +char 1 87 +char 1 95 +char 1 73 +char 1 78 +char 1 65 +char 1 67 +char 1 84 +char 1 73 +char 1 86 +char 1 69 +char 1 0 diff --git a/code/game/JK2_game.def b/code/game/JK2_game.def new file mode 100644 index 0000000..290f891 --- /dev/null +++ b/code/game/JK2_game.def @@ -0,0 +1,3 @@ +EXPORTS + dllEntry + vmMain diff --git a/code/game/JK2_game.dsp b/code/game/JK2_game.dsp new file mode 100644 index 0000000..3a43005 --- /dev/null +++ b/code/game/JK2_game.dsp @@ -0,0 +1,452 @@ +# Microsoft Developer Studio Project File - Name="JK2game" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=JK2game - Win32 Release JK2 +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "JK2_game.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "JK2_game.mak" CFG="JK2game - Win32 Release JK2" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "JK2game - Win32 Release JK2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "JK2game - Win32 Debug JK2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "JK2game - Win32 Final JK2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "JK2game - Win32 Release JK2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "JK2game___Win32_Release_TA" +# PROP BASE Intermediate_Dir "JK2game___Win32_Release_TA" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../Release" +# PROP Intermediate_Dir "../Release/JK2game" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /W4 /GX /O2 /D "WIN32" /D "NDebug" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /G6 /W4 /GX /Zi /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "QAGAME" /D "_JK2" /YX /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDebug" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDebug" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDebug" +# ADD RSC /l 0x409 /d "NDebug" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /map /machine:I386 /out:"..\Release/qaJK2gamex86.dll" +# SUBTRACT BASE LINK32 /incremental:yes /debug +# ADD LINK32 kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /map /debug /machine:I386 /def:".\JK2_game.def" /out:"../Release/jk2mpgamex86.dll" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "JK2game - Win32 Debug JK2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "JK2game___Win32_Debug_TA" +# PROP BASE Intermediate_Dir "JK2game___Win32_Debug_TA" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../Debug" +# PROP Intermediate_Dir "../Debug/JK2game" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_WINDOWS" /D "BUILDING_REF_GL" /D "Debug" /FR /YX /FD /c +# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "BUILDING_REF_GL" /D "Debug" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "QAGAME" /D "_JK2" /D "JK2AWARDS" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_Debug" /mktyplib203 /win32 +# ADD MTL /nologo /D "_Debug" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_Debug" +# ADD RSC /l 0x409 /d "_Debug" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /map /debug /machine:I386 /out:"..\Debug/qaJK2gamex86.dll" +# SUBTRACT BASE LINK32 /incremental:no +# ADD LINK32 kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /map /debug /machine:I386 /def:".\JK2_game.def" /out:"..\Debug\jk2mpgamex86.dll" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "JK2game - Win32 Final JK2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "../Final" +# PROP BASE Intermediate_Dir "../Final/JK2game" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../Final" +# PROP Intermediate_Dir "../Final/JK2game" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /W4 /GX /Zi /O2 /I ".." /I "../../jk2/game" /D "NDebug2" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "QAGAME" /D "_JK2" /YX /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /G6 /W4 /GX /O2 /D "NDEBUG" /D "_WINDOWS" /D "MISSIONPACK" /D "QAGAME" /D "WIN32" /D "_JK2" /D "FINAL_BUILD" /YX /FD /c +# ADD BASE MTL /nologo /D "NDebug" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDebug" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDebug" +# ADD RSC /l 0x409 /d "NDebug" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /map /debug /machine:I386 /def:".\JK2_game.def" /out:"../../Release/jk2mpgamex86.dll" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /map /machine:I386 /def:".\JK2_game.def" /out:"../Final/jk2mpgamex86.dll" +# SUBTRACT LINK32 /pdb:none /debug + +!ENDIF + +# Begin Target + +# Name "JK2game - Win32 Release JK2" +# Name "JK2game - Win32 Debug JK2" +# Name "JK2game - Win32 Final JK2" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Source File + +SOURCE=.\ai_main.c +# End Source File +# Begin Source File + +SOURCE=.\ai_util.c +# End Source File +# Begin Source File + +SOURCE=.\ai_wpnav.c +# End Source File +# Begin Source File + +SOURCE=.\bg_lib.c +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\bg_misc.c +# End Source File +# Begin Source File + +SOURCE=.\bg_panimate.c +# End Source File +# Begin Source File + +SOURCE=.\bg_pmove.c +# End Source File +# Begin Source File + +SOURCE=.\bg_saber.c +# End Source File +# Begin Source File + +SOURCE=.\bg_slidemove.c +# End Source File +# Begin Source File + +SOURCE=.\bg_weapons.c +# End Source File +# Begin Source File + +SOURCE=.\g_active.c +# End Source File +# Begin Source File + +SOURCE=.\g_arenas.c +# End Source File +# Begin Source File + +SOURCE=.\g_bot.c +# End Source File +# Begin Source File + +SOURCE=.\g_client.c +# End Source File +# Begin Source File + +SOURCE=.\g_cmds.c +# End Source File +# Begin Source File + +SOURCE=.\g_combat.c +# End Source File +# Begin Source File + +SOURCE=.\g_items.c +# End Source File +# Begin Source File + +SOURCE=.\g_log.c +# End Source File +# Begin Source File + +SOURCE=.\g_main.c +# End Source File +# Begin Source File + +SOURCE=.\g_mem.c +# End Source File +# Begin Source File + +SOURCE=.\g_misc.c +# End Source File +# Begin Source File + +SOURCE=.\g_missile.c +# End Source File +# Begin Source File + +SOURCE=.\g_mover.c +# End Source File +# Begin Source File + +SOURCE=.\g_object.c +# End Source File +# Begin Source File + +SOURCE=.\g_saga.c +# End Source File +# Begin Source File + +SOURCE=.\g_session.c +# End Source File +# Begin Source File + +SOURCE=.\g_spawn.c +# End Source File +# Begin Source File + +SOURCE=.\g_svcmds.c +# End Source File +# Begin Source File + +SOURCE=.\g_syscalls.c +# End Source File +# Begin Source File + +SOURCE=.\g_target.c +# End Source File +# Begin Source File + +SOURCE=.\g_team.c +# End Source File +# Begin Source File + +SOURCE=.\g_trigger.c +# End Source File +# Begin Source File + +SOURCE=.\g_utils.c +# End Source File +# Begin Source File + +SOURCE=.\g_weapon.c +# End Source File +# Begin Source File + +SOURCE=.\q_math.c +# End Source File +# Begin Source File + +SOURCE=.\q_shared.c +# End Source File +# Begin Source File + +SOURCE=.\w_force.c +# End Source File +# Begin Source File + +SOURCE=.\w_saber.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ai_main.h +# End Source File +# Begin Source File + +SOURCE=.\anims.h +# End Source File +# Begin Source File + +SOURCE=..\cgame\animtable.h +# End Source File +# Begin Source File + +SOURCE=.\be_aas.h +# End Source File +# Begin Source File + +SOURCE=.\be_ai_char.h +# End Source File +# Begin Source File + +SOURCE=.\be_ai_chat.h +# End Source File +# Begin Source File + +SOURCE=.\be_ai_gen.h +# End Source File +# Begin Source File + +SOURCE=.\be_ai_goal.h +# End Source File +# Begin Source File + +SOURCE=.\be_ai_move.h +# End Source File +# Begin Source File + +SOURCE=.\be_ai_weap.h +# End Source File +# Begin Source File + +SOURCE=.\be_ea.h +# End Source File +# Begin Source File + +SOURCE=.\bg_local.h +# End Source File +# Begin Source File + +SOURCE=.\bg_public.h +# End Source File +# Begin Source File + +SOURCE=.\bg_saga.h +# End Source File +# Begin Source File + +SOURCE=.\bg_weapons.h +# End Source File +# Begin Source File + +SOURCE=.\botlib.h +# End Source File +# Begin Source File + +SOURCE=..\cgame\cg_local.h +# End Source File +# Begin Source File + +SOURCE=..\cgame\cg_public.h +# End Source File +# Begin Source File + +SOURCE=.\chars.h +# End Source File +# Begin Source File + +SOURCE=..\qcommon\disablewarnings.h +# End Source File +# Begin Source File + +SOURCE=..\ghoul2\G2.h +# End Source File +# Begin Source File + +SOURCE=.\g_local.h +# End Source File +# Begin Source File + +SOURCE=.\g_public.h +# End Source File +# Begin Source File + +SOURCE=.\g_team.h +# End Source File +# Begin Source File + +SOURCE=.\inv.h +# End Source File +# Begin Source File + +SOURCE=.\JK2_game.def + +!IF "$(CFG)" == "JK2game - Win32 Release JK2" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "JK2game - Win32 Debug JK2" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "JK2game - Win32 Final JK2" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\match.h +# End Source File +# Begin Source File + +SOURCE=..\..\ui\menudef.h +# End Source File +# Begin Source File + +SOURCE=.\q_shared.h +# End Source File +# Begin Source File + +SOURCE=.\surfaceflags.h +# End Source File +# Begin Source File + +SOURCE=.\syn.h +# End Source File +# Begin Source File + +SOURCE=..\qcommon\tags.h +# End Source File +# Begin Source File + +SOURCE=..\cgame\tr_types.h +# End Source File +# Begin Source File + +SOURCE=.\w_saber.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\game.bat +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\game.q3asm +# PROP Exclude_From_Build 1 +# End Source File +# End Target +# End Project diff --git a/code/game/JK2_game.vcproj b/code/game/JK2_game.vcproj new file mode 100644 index 0000000..1a91c1a --- /dev/null +++ b/code/game/JK2_game.vcproj @@ -0,0 +1,1388 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/game/ai_main.c b/code/game/ai_main.c new file mode 100644 index 0000000..1c45254 --- /dev/null +++ b/code/game/ai_main.c @@ -0,0 +1,7127 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + +/***************************************************************************** + * name: ai_main.c + * + * desc: Quake3 bot AI + * + * $Archive: /MissionPack/code/game/ai_main.c $ + * $Author: Mrelusive $ + * $Revision: 35 $ + * $Modtime: 6/06/01 1:11p $ + * $Date: 6/06/01 12:06p $ + * + *****************************************************************************/ + + +#include "g_local.h" +#include "q_shared.h" +#include "botlib.h" //bot lib interface +#include "be_aas.h" +#include "be_ea.h" +#include "be_ai_char.h" +#include "be_ai_chat.h" +#include "be_ai_gen.h" +#include "be_ai_goal.h" +#include "be_ai_move.h" +#include "be_ai_weap.h" +// +#include "ai_main.h" +#include "w_saber.h" +// +#include "chars.h" +#include "inv.h" +#include "syn.h" + +/* +#define BOT_CTF_DEBUG 1 +*/ + +#define MAX_PATH 144 + +#define BOT_THINK_TIME 0 + +//bot states +bot_state_t *botstates[MAX_CLIENTS]; +//number of bots +int numbots; +//floating point time +float floattime; +//time to do a regular update +float regularupdate_time; +// + +//for saga: +extern int rebel_attackers; +extern int imperial_attackers; + +boteventtracker_t gBotEventTracker[MAX_CLIENTS]; + +//rww - new bot cvars.. +vmCvar_t bot_forcepowers; +vmCvar_t bot_forgimmick; +vmCvar_t bot_honorableduelacceptance; +#ifdef _DEBUG +vmCvar_t bot_nogoals; +vmCvar_t bot_debugmessages; +#endif + +vmCvar_t bot_attachments; +vmCvar_t bot_camp; + +vmCvar_t bot_wp_info; +vmCvar_t bot_wp_edit; +vmCvar_t bot_wp_clearweight; +vmCvar_t bot_wp_distconnect; +vmCvar_t bot_wp_visconnect; +//end rww + +wpobject_t *flagRed; +wpobject_t *oFlagRed; +wpobject_t *flagBlue; +wpobject_t *oFlagBlue; + +gentity_t *eFlagRed; +gentity_t *droppedRedFlag; +gentity_t *eFlagBlue; +gentity_t *droppedBlueFlag; + +char *ctfStateNames[] = { + "CTFSTATE_NONE", + "CTFSTATE_ATTACKER", + "CTFSTATE_DEFENDER", + "CTFSTATE_RETRIEVAL", + "CTFSTATE_GUARDCARRIER", + "CTFSTATE_GETFLAGHOME", + "CTFSTATE_MAXCTFSTATES" +}; + +char *ctfStateDescriptions[] = { + "I'm not occupied", + "I'm attacking the enemy's base", + "I'm defending our base", + "I'm getting our flag back", + "I'm escorting our flag carrier", + "I've got the enemy's flag" +}; + +char *sagaStateDescriptions[] = { + "I'm not occupied", + "I'm attemtping to complete the current objective", + "I'm preventing the enemy from completing their objective" +}; + +char *teamplayStateDescriptions[] = { + "I'm not occupied", + "I'm following my squad commander", + "I'm assisting my commanding", + "I'm attempting to regroup and form a new squad" +}; + +void BotStraightTPOrderCheck(gentity_t *ent, int ordernum, bot_state_t *bs) +{ + switch (ordernum) + { + case 0: + if (bs->squadLeader == ent) + { + bs->teamplayState = 0; + bs->squadLeader = NULL; + } + break; + case TEAMPLAYSTATE_FOLLOWING: + bs->teamplayState = ordernum; + bs->isSquadLeader = 0; + bs->squadLeader = ent; + bs->wpDestSwitchTime = 0; + break; + case TEAMPLAYSTATE_ASSISTING: + bs->teamplayState = ordernum; + bs->isSquadLeader = 0; + bs->squadLeader = ent; + bs->wpDestSwitchTime = 0; + break; + default: + bs->teamplayState = ordernum; + break; + } +} + +void BotSelectWeapon(int client, int weapon) +{ + if (weapon <= WP_NONE) + { + return; + } + trap_EA_SelectWeapon(client, weapon); +} + +void BotReportStatus(bot_state_t *bs) +{ + if (g_gametype.integer == GT_TEAM) + { + trap_EA_SayTeam(bs->client, teamplayStateDescriptions[bs->teamplayState]); + } + else if (g_gametype.integer == GT_SAGA) + { + trap_EA_SayTeam(bs->client, sagaStateDescriptions[bs->sagaState]); + } + else if (g_gametype.integer == GT_CTF || g_gametype.integer == GT_CTY) + { + trap_EA_SayTeam(bs->client, ctfStateDescriptions[bs->ctfState]); + } +} + +void BotOrder(gentity_t *ent, int clientnum, int ordernum) +{ + int stateMin = 0; + int stateMax = 0; + int i = 0; + + if (!ent || !ent->client || !ent->client->sess.teamLeader) + { + return; + } + + if (clientnum != -1 && !botstates[clientnum]) + { + return; + } + + if (clientnum != -1 && !OnSameTeam(ent, &g_entities[clientnum])) + { + return; + } + + if (g_gametype.integer != GT_CTF && g_gametype.integer != GT_CTY && g_gametype.integer != GT_SAGA && + g_gametype.integer != GT_TEAM) + { + return; + } + + if (g_gametype.integer == GT_CTF || g_gametype.integer == GT_CTY) + { + stateMin = CTFSTATE_NONE; + stateMax = CTFSTATE_MAXCTFSTATES; + } + else if (g_gametype.integer == GT_SAGA) + { + stateMin = SAGASTATE_NONE; + stateMax = SAGASTATE_MAXSAGASTATES; + } + else if (g_gametype.integer == GT_TEAM) + { + stateMin = TEAMPLAYSTATE_NONE; + stateMax = TEAMPLAYSTATE_MAXTPSTATES; + } + + if ((ordernum < stateMin && ordernum != -1) || ordernum >= stateMax) + { + return; + } + + if (clientnum != -1) + { + if (ordernum == -1) + { + BotReportStatus(botstates[clientnum]); + } + else + { + BotStraightTPOrderCheck(ent, ordernum, botstates[clientnum]); + botstates[clientnum]->state_Forced = ordernum; + botstates[clientnum]->chatObject = ent; + botstates[clientnum]->chatAltObject = NULL; + if (BotDoChat(botstates[clientnum], "OrderAccepted", 1)) + { + botstates[clientnum]->chatTeam = 1; + } + } + } + else + { + while (i < MAX_CLIENTS) + { + if (botstates[i] && OnSameTeam(ent, &g_entities[i])) + { + if (ordernum == -1) + { + BotReportStatus(botstates[i]); + } + else + { + BotStraightTPOrderCheck(ent, ordernum, botstates[i]); + botstates[i]->state_Forced = ordernum; + botstates[i]->chatObject = ent; + botstates[i]->chatAltObject = NULL; + if (BotDoChat(botstates[i], "OrderAccepted", 0)) + { + botstates[i]->chatTeam = 1; + } + } + } + + i++; + } + } +} + +int BotMindTricked(int botClient, int enemyClient) +{ + forcedata_t *fd; + + if (!g_entities[enemyClient].client) + { + return 0; + } + + fd = &g_entities[enemyClient].client->ps.fd; + + if (!fd) + { + return 0; + } + + if (botClient > 47) + { + if (fd->forceMindtrickTargetIndex4 & (1 << (botClient-48))) + { + return 1; + } + } + else if (botClient > 31) + { + if (fd->forceMindtrickTargetIndex3 & (1 << (botClient-32))) + { + return 1; + } + } + else if (botClient > 15) + { + if (fd->forceMindtrickTargetIndex2 & (1 << (botClient-16))) + { + return 1; + } + } + else + { + if (fd->forceMindtrickTargetIndex & (1 << botClient)) + { + return 1; + } + } + + return 0; +} + +int BotGetWeaponRange(bot_state_t *bs); +int PassLovedOneCheck(bot_state_t *bs, gentity_t *ent); + +void ExitLevel( void ); + +void QDECL BotAI_Print(int type, char *fmt, ...) { return; } + +qboolean WP_ForcePowerUsable( gentity_t *self, forcePowers_t forcePower ); + +int IsTeamplay(void) +{ + if ( g_gametype.integer < GT_TEAM ) + { + return 0; + } + + return 1; +} + +/* +================== +BotAI_GetClientState +================== +*/ +int BotAI_GetClientState( int clientNum, playerState_t *state ) { + gentity_t *ent; + + ent = &g_entities[clientNum]; + if ( !ent->inuse ) { + return qfalse; + } + if ( !ent->client ) { + return qfalse; + } + + memcpy( state, &ent->client->ps, sizeof(playerState_t) ); + return qtrue; +} + +/* +================== +BotAI_GetEntityState +================== +*/ +int BotAI_GetEntityState( int entityNum, entityState_t *state ) { + gentity_t *ent; + + ent = &g_entities[entityNum]; + memset( state, 0, sizeof(entityState_t) ); + if (!ent->inuse) return qfalse; + if (!ent->r.linked) return qfalse; + if (ent->r.svFlags & SVF_NOCLIENT) return qfalse; + memcpy( state, &ent->s, sizeof(entityState_t) ); + return qtrue; +} + +/* +================== +BotAI_GetSnapshotEntity +================== +*/ +int BotAI_GetSnapshotEntity( int clientNum, int sequence, entityState_t *state ) { + int entNum; + + entNum = trap_BotGetSnapshotEntity( clientNum, sequence ); + if ( entNum == -1 ) { + memset(state, 0, sizeof(entityState_t)); + return -1; + } + + BotAI_GetEntityState( entNum, state ); + + return sequence + 1; +} + +/* +============== +BotEntityInfo +============== +*/ +void BotEntityInfo(int entnum, aas_entityinfo_t *info) { + trap_AAS_EntityInfo(entnum, info); +} + +/* +============== +NumBots +============== +*/ +int NumBots(void) { + return numbots; +} + +/* +============== +AngleDifference +============== +*/ +float AngleDifference(float ang1, float ang2) { + float diff; + + diff = ang1 - ang2; + if (ang1 > ang2) { + if (diff > 180.0) diff -= 360.0; + } + else { + if (diff < -180.0) diff += 360.0; + } + return diff; +} + +/* +============== +BotChangeViewAngle +============== +*/ +float BotChangeViewAngle(float angle, float ideal_angle, float speed) { + float move; + + angle = AngleMod(angle); + ideal_angle = AngleMod(ideal_angle); + if (angle == ideal_angle) return angle; + move = ideal_angle - angle; + if (ideal_angle > angle) { + if (move > 180.0) move -= 360.0; + } + else { + if (move < -180.0) move += 360.0; + } + if (move > 0) { + if (move > speed) move = speed; + } + else { + if (move < -speed) move = -speed; + } + return AngleMod(angle + move); +} + +/* +============== +BotChangeViewAngles +============== +*/ +void BotChangeViewAngles(bot_state_t *bs, float thinktime) { + float diff, factor, maxchange, anglespeed, disired_speed; + int i; + + if (bs->ideal_viewangles[PITCH] > 180) bs->ideal_viewangles[PITCH] -= 360; + + if (bs->currentEnemy && bs->frame_Enemy_Vis) + { + factor = bs->skills.turnspeed_combat*bs->settings.skill; + } + else + { + factor = bs->skills.turnspeed; + } + + if (factor > 1) + { + factor = 1; + } + if (factor < 0.001) + { + factor = 0.001f; + } + + maxchange = bs->skills.maxturn; + + //if (maxchange < 240) maxchange = 240; + maxchange *= thinktime; + for (i = 0; i < 2; i++) { + bs->viewangles[i] = AngleMod(bs->viewangles[i]); + bs->ideal_viewangles[i] = AngleMod(bs->ideal_viewangles[i]); + diff = AngleDifference(bs->viewangles[i], bs->ideal_viewangles[i]); + disired_speed = diff * factor; + bs->viewanglespeed[i] += (bs->viewanglespeed[i] - disired_speed); + if (bs->viewanglespeed[i] > 180) bs->viewanglespeed[i] = maxchange; + if (bs->viewanglespeed[i] < -180) bs->viewanglespeed[i] = -maxchange; + anglespeed = bs->viewanglespeed[i]; + if (anglespeed > maxchange) anglespeed = maxchange; + if (anglespeed < -maxchange) anglespeed = -maxchange; + bs->viewangles[i] += anglespeed; + bs->viewangles[i] = AngleMod(bs->viewangles[i]); + bs->viewanglespeed[i] *= 0.45 * (1 - factor); + } + if (bs->viewangles[PITCH] > 180) bs->viewangles[PITCH] -= 360; + trap_EA_View(bs->client, bs->viewangles); +} + +/* +============== +BotInputToUserCommand +============== +*/ +void BotInputToUserCommand(bot_input_t *bi, usercmd_t *ucmd, int delta_angles[3], int time, int useTime) { + vec3_t angles, forward, right; + short temp; + int j; + + //clear the whole structure + memset(ucmd, 0, sizeof(usercmd_t)); + // + //Com_Printf("dir = %f %f %f speed = %f\n", bi->dir[0], bi->dir[1], bi->dir[2], bi->speed); + //the duration for the user command in milli seconds + ucmd->serverTime = time; + // + if (bi->actionflags & ACTION_DELAYEDJUMP) { + bi->actionflags |= ACTION_JUMP; + bi->actionflags &= ~ACTION_DELAYEDJUMP; + } + //set the buttons + if (bi->actionflags & ACTION_RESPAWN) ucmd->buttons = BUTTON_ATTACK; + if (bi->actionflags & ACTION_ATTACK) ucmd->buttons |= BUTTON_ATTACK; + if (bi->actionflags & ACTION_ALT_ATTACK) ucmd->buttons |= BUTTON_ALT_ATTACK; +// if (bi->actionflags & ACTION_TALK) ucmd->buttons |= BUTTON_TALK; + if (bi->actionflags & ACTION_GESTURE) ucmd->buttons |= BUTTON_GESTURE; + if (bi->actionflags & ACTION_USE) ucmd->buttons |= BUTTON_USE_HOLDABLE; + if (bi->actionflags & ACTION_WALK) ucmd->buttons |= BUTTON_WALKING; + + if (bi->actionflags & ACTION_FORCEPOWER) ucmd->buttons |= BUTTON_FORCEPOWER; + + if (useTime < level.time && Q_irand(1, 10) < 5) + { //for now just hit use randomly in case there's something useable around + ucmd->buttons |= BUTTON_USE; + } +#if 0 +// Here's an interesting bit. The bots in TA used buttons to do additional gestures. +// I ripped them out because I didn't want too many buttons given the fact that I was already adding some for JK2. +// We can always add some back in if we want though. + if (bi->actionflags & ACTION_AFFIRMATIVE) ucmd->buttons |= BUTTON_AFFIRMATIVE; + if (bi->actionflags & ACTION_NEGATIVE) ucmd->buttons |= BUTTON_NEGATIVE; + if (bi->actionflags & ACTION_GETFLAG) ucmd->buttons |= BUTTON_GETFLAG; + if (bi->actionflags & ACTION_GUARDBASE) ucmd->buttons |= BUTTON_GUARDBASE; + if (bi->actionflags & ACTION_PATROL) ucmd->buttons |= BUTTON_PATROL; + if (bi->actionflags & ACTION_FOLLOWME) ucmd->buttons |= BUTTON_FOLLOWME; +#endif //0 + + if (bi->weapon == WP_NONE) + { +#ifdef _DEBUG +// Com_Printf("WARNING: Bot tried to use WP_NONE!\n"); +#endif + bi->weapon = WP_BRYAR_PISTOL; + } + + // + ucmd->weapon = bi->weapon; + //set the view angles + //NOTE: the ucmd->angles are the angles WITHOUT the delta angles + ucmd->angles[PITCH] = ANGLE2SHORT(bi->viewangles[PITCH]); + ucmd->angles[YAW] = ANGLE2SHORT(bi->viewangles[YAW]); + ucmd->angles[ROLL] = ANGLE2SHORT(bi->viewangles[ROLL]); + //subtract the delta angles + for (j = 0; j < 3; j++) { + temp = ucmd->angles[j] - delta_angles[j]; + ucmd->angles[j] = temp; + } + //NOTE: movement is relative to the REAL view angles + //get the horizontal forward and right vector + //get the pitch in the range [-180, 180] + if (bi->dir[2]) angles[PITCH] = bi->viewangles[PITCH]; + else angles[PITCH] = 0; + angles[YAW] = bi->viewangles[YAW]; + angles[ROLL] = 0; + AngleVectors(angles, forward, right, NULL); + //bot input speed is in the range [0, 400] + bi->speed = bi->speed * 127 / 400; + //set the view independent movement + ucmd->forwardmove = DotProduct(forward, bi->dir) * bi->speed; + ucmd->rightmove = DotProduct(right, bi->dir) * bi->speed; + ucmd->upmove = abs(forward[2]) * bi->dir[2] * bi->speed; + //normal keyboard movement + if (bi->actionflags & ACTION_MOVEFORWARD) ucmd->forwardmove += 127; + if (bi->actionflags & ACTION_MOVEBACK) ucmd->forwardmove -= 127; + if (bi->actionflags & ACTION_MOVELEFT) ucmd->rightmove -= 127; + if (bi->actionflags & ACTION_MOVERIGHT) ucmd->rightmove += 127; + //jump/moveup + if (bi->actionflags & ACTION_JUMP) ucmd->upmove += 127; + //crouch/movedown + if (bi->actionflags & ACTION_CROUCH) ucmd->upmove -= 127; + // + //Com_Printf("forward = %d right = %d up = %d\n", ucmd.forwardmove, ucmd.rightmove, ucmd.upmove); + //Com_Printf("ucmd->serverTime = %d\n", ucmd->serverTime); +} + +/* +============== +BotUpdateInput +============== +*/ +void BotUpdateInput(bot_state_t *bs, int time, int elapsed_time) { + bot_input_t bi; + int j; + + //add the delta angles to the bot's current view angles + for (j = 0; j < 3; j++) { + bs->viewangles[j] = AngleMod(bs->viewangles[j] + SHORT2ANGLE(bs->cur_ps.delta_angles[j])); + } + //change the bot view angles + BotChangeViewAngles(bs, (float) elapsed_time / 1000); + //retrieve the bot input + trap_EA_GetInput(bs->client, (float) time / 1000, &bi); + //respawn hack + if (bi.actionflags & ACTION_RESPAWN) { + if (bs->lastucmd.buttons & BUTTON_ATTACK) bi.actionflags &= ~(ACTION_RESPAWN|ACTION_ATTACK); + } + //convert the bot input to a usercmd + BotInputToUserCommand(&bi, &bs->lastucmd, bs->cur_ps.delta_angles, time, bs->noUseTime); + //subtract the delta angles + for (j = 0; j < 3; j++) { + bs->viewangles[j] = AngleMod(bs->viewangles[j] - SHORT2ANGLE(bs->cur_ps.delta_angles[j])); + } +} + +/* +============== +BotAIRegularUpdate +============== +*/ +void BotAIRegularUpdate(void) { + if (regularupdate_time < FloatTime()) { + trap_BotUpdateEntityItems(); + regularupdate_time = FloatTime() + 0.3; + } +} + +/* +============== +RemoveColorEscapeSequences +============== +*/ +void RemoveColorEscapeSequences( char *text ) { + int i, l; + + l = 0; + for ( i = 0; text[i]; i++ ) { + if (Q_IsColorString(&text[i])) { + i++; + continue; + } + if (text[i] > 0x7E) + continue; + text[l++] = text[i]; + } + text[l] = '\0'; +} + + +/* +============== +BotAI +============== +*/ +int BotAI(int client, float thinktime) { + bot_state_t *bs; + char buf[1024], *args; + int j; +#ifdef _DEBUG + int start = 0; + int end = 0; +#endif + + trap_EA_ResetInput(client); + // + bs = botstates[client]; + if (!bs || !bs->inuse) { + BotAI_Print(PRT_FATAL, "BotAI: client %d is not setup\n", client); + return qfalse; + } + + //retrieve the current client state + BotAI_GetClientState( client, &bs->cur_ps ); + + //retrieve any waiting server commands + while( trap_BotGetServerCommand(client, buf, sizeof(buf)) ) { + //have buf point to the command and args to the command arguments + args = strchr( buf, ' '); + if (!args) continue; + *args++ = '\0'; + + //remove color espace sequences from the arguments + RemoveColorEscapeSequences( args ); + + if (!Q_stricmp(buf, "cp ")) + { /*CenterPrintf*/ } + else if (!Q_stricmp(buf, "cs")) + { /*ConfigStringModified*/ } + else if (!Q_stricmp(buf, "scores")) + { /*FIXME: parse scores?*/ } + else if (!Q_stricmp(buf, "clientLevelShot")) + { /*ignore*/ } + } + //add the delta angles to the bot's current view angles + for (j = 0; j < 3; j++) { + bs->viewangles[j] = AngleMod(bs->viewangles[j] + SHORT2ANGLE(bs->cur_ps.delta_angles[j])); + } + //increase the local time of the bot + bs->ltime += thinktime; + // + bs->thinktime = thinktime; + //origin of the bot + VectorCopy(bs->cur_ps.origin, bs->origin); + //eye coordinates of the bot + VectorCopy(bs->cur_ps.origin, bs->eye); + bs->eye[2] += bs->cur_ps.viewheight; + //get the area the bot is in + +#ifdef _DEBUG + start = trap_Milliseconds(); +#endif + StandardBotAI(bs, thinktime); +#ifdef _DEBUG + end = trap_Milliseconds(); + + trap_Cvar_Update(&bot_debugmessages); + + if (bot_debugmessages.integer) + { + Com_Printf("Single AI frametime: %i\n", (end - start)); + } +#endif + + //subtract the delta angles + for (j = 0; j < 3; j++) { + bs->viewangles[j] = AngleMod(bs->viewangles[j] - SHORT2ANGLE(bs->cur_ps.delta_angles[j])); + } + //everything was ok + return qtrue; +} + +/* +================== +BotScheduleBotThink +================== +*/ +void BotScheduleBotThink(void) { + int i, botnum; + + botnum = 0; + + for( i = 0; i < MAX_CLIENTS; i++ ) { + if( !botstates[i] || !botstates[i]->inuse ) { + continue; + } + //initialize the bot think residual time + botstates[i]->botthink_residual = BOT_THINK_TIME * botnum / numbots; + botnum++; + } +} + +int PlayersInGame(void) +{ + int i = 0; + gentity_t *ent; + int pl = 0; + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + + if (ent && ent->client && ent->client->pers.connected == CON_CONNECTED) + { + pl++; + } + + i++; + } + + return pl; +} + +/* +============== +BotAISetupClient +============== +*/ +int BotAISetupClient(int client, struct bot_settings_s *settings, qboolean restart) { + bot_state_t *bs; + + if (!botstates[client]) botstates[client] = B_Alloc(sizeof(bot_state_t)); //G_Alloc(sizeof(bot_state_t)); + //rww - G_Alloc bad! B_Alloc good. + + memset(botstates[client], 0, sizeof(bot_state_t)); + + bs = botstates[client]; + + if (bs && bs->inuse) { + BotAI_Print(PRT_FATAL, "BotAISetupClient: client %d already setup\n", client); + return qfalse; + } + + memcpy(&bs->settings, settings, sizeof(bot_settings_t)); + + bs->client = client; //need to know the client number before doing personality stuff + + //initialize weapon weight defaults.. + bs->botWeaponWeights[WP_NONE] = 0; + bs->botWeaponWeights[WP_STUN_BATON] = 1; + bs->botWeaponWeights[WP_SABER] = 10; + bs->botWeaponWeights[WP_BRYAR_PISTOL] = 11; + bs->botWeaponWeights[WP_BLASTER] = 12; + bs->botWeaponWeights[WP_DISRUPTOR] = 13; + bs->botWeaponWeights[WP_BOWCASTER] = 14; + bs->botWeaponWeights[WP_REPEATER] = 15; + bs->botWeaponWeights[WP_DEMP2] = 16; + bs->botWeaponWeights[WP_FLECHETTE] = 17; + bs->botWeaponWeights[WP_ROCKET_LAUNCHER] = 18; + bs->botWeaponWeights[WP_THERMAL] = 14; + bs->botWeaponWeights[WP_TRIP_MINE] = 0; + bs->botWeaponWeights[WP_DET_PACK] = 0; + + BotUtilizePersonality(bs); + + if (g_gametype.integer == GT_TOURNAMENT) + { + bs->botWeaponWeights[WP_SABER] = 13; + } + + //allocate a goal state + bs->gs = trap_BotAllocGoalState(client); + + //allocate a weapon state + bs->ws = trap_BotAllocWeaponState(); + + bs->inuse = qtrue; + bs->entitynum = client; + bs->setupcount = 4; + bs->entergame_time = FloatTime(); + bs->ms = trap_BotAllocMoveState(); + numbots++; + + //NOTE: reschedule the bot thinking + BotScheduleBotThink(); + + if (PlayersInGame()) + { //don't talk to yourself + BotDoChat(bs, "GeneralGreetings", 0); + } + + return qtrue; +} + +/* +============== +BotAIShutdownClient +============== +*/ +int BotAIShutdownClient(int client, qboolean restart) { + bot_state_t *bs; + + bs = botstates[client]; + if (!bs || !bs->inuse) { + //BotAI_Print(PRT_ERROR, "BotAIShutdownClient: client %d already shutdown\n", client); + return qfalse; + } + + trap_BotFreeMoveState(bs->ms); + //free the goal state` + trap_BotFreeGoalState(bs->gs); + //free the weapon weights + trap_BotFreeWeaponState(bs->ws); + // + //clear the bot state + memset(bs, 0, sizeof(bot_state_t)); + //set the inuse flag to qfalse + bs->inuse = qfalse; + //there's one bot less + numbots--; + //everything went ok + return qtrue; +} + +/* +============== +BotResetState + +called when a bot enters the intermission or observer mode and +when the level is changed +============== +*/ +void BotResetState(bot_state_t *bs) { + int client, entitynum, inuse; + int movestate, goalstate, weaponstate; + bot_settings_t settings; + playerState_t ps; //current player state + float entergame_time; + + //save some things that should not be reset here + memcpy(&settings, &bs->settings, sizeof(bot_settings_t)); + memcpy(&ps, &bs->cur_ps, sizeof(playerState_t)); + inuse = bs->inuse; + client = bs->client; + entitynum = bs->entitynum; + movestate = bs->ms; + goalstate = bs->gs; + weaponstate = bs->ws; + entergame_time = bs->entergame_time; + //reset the whole state + memset(bs, 0, sizeof(bot_state_t)); + //copy back some state stuff that should not be reset + bs->ms = movestate; + bs->gs = goalstate; + bs->ws = weaponstate; + memcpy(&bs->cur_ps, &ps, sizeof(playerState_t)); + memcpy(&bs->settings, &settings, sizeof(bot_settings_t)); + bs->inuse = inuse; + bs->client = client; + bs->entitynum = entitynum; + bs->entergame_time = entergame_time; + //reset several states + if (bs->ms) trap_BotResetMoveState(bs->ms); + if (bs->gs) trap_BotResetGoalState(bs->gs); + if (bs->ws) trap_BotResetWeaponState(bs->ws); + if (bs->gs) trap_BotResetAvoidGoals(bs->gs); + if (bs->ms) trap_BotResetAvoidReach(bs->ms); +} + +/* +============== +BotAILoadMap +============== +*/ +int BotAILoadMap( int restart ) { + int i; + + for (i = 0; i < MAX_CLIENTS; i++) { + if (botstates[i] && botstates[i]->inuse) { + BotResetState( botstates[i] ); + botstates[i]->setupcount = 4; + } + } + + return qtrue; +} + +//rww - bot ai +int OrgVisible(vec3_t org1, vec3_t org2, int ignore) +{ + trace_t tr; + + trap_Trace(&tr, org1, NULL, NULL, org2, ignore, MASK_SOLID); + + if (tr.fraction == 1) + { + return 1; + } + + return 0; +} + +int WPOrgVisible(gentity_t *bot, vec3_t org1, vec3_t org2, int ignore) +{ + trace_t tr; + gentity_t *ownent; + + trap_Trace(&tr, org1, NULL, NULL, org2, ignore, MASK_SOLID); + + if (tr.fraction == 1) + { + trap_Trace(&tr, org1, NULL, NULL, org2, ignore, MASK_PLAYERSOLID); + + if (tr.fraction != 1 && tr.entityNum != ENTITYNUM_NONE && g_entities[tr.entityNum].s.eType == ET_SPECIAL) + { + if (g_entities[tr.entityNum].parent && g_entities[tr.entityNum].parent->client) + { + ownent = g_entities[tr.entityNum].parent; + + if (OnSameTeam(bot, ownent) || bot->s.number == ownent->s.number) + { + return 1; + } + } + return 2; + } + + return 1; + } + + return 0; +} + +int OrgVisibleBox(vec3_t org1, vec3_t mins, vec3_t maxs, vec3_t org2, int ignore) +{ + trace_t tr; + + trap_Trace(&tr, org1, mins, maxs, org2, ignore, MASK_SOLID); + + if (tr.fraction == 1 && !tr.startsolid && !tr.allsolid) + { + return 1; + } + + return 0; +} + +int CheckForFunc(vec3_t org, int ignore) +{ + gentity_t *fent; + vec3_t under; + trace_t tr; + + VectorCopy(org, under); + + under[2] -= 64; + + trap_Trace(&tr, org, NULL, NULL, under, ignore, MASK_SOLID); + + if (tr.fraction == 1) + { + return 0; + } + + fent = &g_entities[tr.entityNum]; + + if (!fent) + { + return 0; + } + + if (strstr(fent->classname, "func_")) + { + return 1; //there's a func brush here + } + + return 0; +} + +int GetNearestVisibleWP(vec3_t org, int ignore) +{ + int i; + float bestdist; + float flLen; + int bestindex; + vec3_t a, mins, maxs; + + i = 0; + bestdist = 800;//99999; + //don't trace over 800 units away to avoid GIANT HORRIBLE SPEED HITS ^_^ + bestindex = -1; + + mins[0] = -15; + mins[1] = -15; + mins[2] = -1; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 1; + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse) + { + VectorSubtract(org, gWPArray[i]->origin, a); + flLen = VectorLength(a); + + if (flLen < bestdist && trap_InPVS(org, gWPArray[i]->origin) && OrgVisibleBox(org, mins, maxs, gWPArray[i]->origin, ignore)) + { + bestdist = flLen; + bestindex = i; + } + } + + i++; + } + + return bestindex; +} + +//wpDirection +//0 == FORWARD +//1 == BACKWARD + +int PassWayCheck(bot_state_t *bs, int windex) +{ + if (!gWPArray[windex] || !gWPArray[windex]->inuse) + { + return 0; + } + + if (bs->wpDirection && (gWPArray[windex]->flags & WPFLAG_ONEWAY_FWD)) + { + return 0; + } + else if (!bs->wpDirection && (gWPArray[windex]->flags & WPFLAG_ONEWAY_BACK)) + { + return 0; + } + + if (bs->wpCurrent && gWPArray[windex]->forceJumpTo && + gWPArray[windex]->origin[2] > (bs->wpCurrent->origin[2]+64) && + bs->cur_ps.fd.forcePowerLevel[FP_LEVITATION] < gWPArray[windex]->forceJumpTo) + { + return 0; + } + + return 1; +} + +float TotalTrailDistance(int start, int end, bot_state_t *bs) +{ + int beginat; + int endat; + float distancetotal; + float gdif = 0; + + distancetotal = 0; + + if (start > end) + { + beginat = end; + endat = start; + } + else + { + beginat = start; + endat = end; + } + + while (beginat < endat) + { + if (beginat >= gWPNum || !gWPArray[beginat] || !gWPArray[beginat]->inuse) + { + return -1; //error + } + + if ((end > start && gWPArray[beginat]->flags & WPFLAG_ONEWAY_BACK) || + (start > end && gWPArray[beginat]->flags & WPFLAG_ONEWAY_FWD)) + { + return -1; + } + + if (gWPArray[beginat]->forceJumpTo) + { + if (gWPArray[beginat-1] && gWPArray[beginat-1]->origin[2]+64 < gWPArray[beginat]->origin[2]) + { + gdif = gWPArray[beginat]->origin[2] - gWPArray[beginat-1]->origin[2]; + } + + if (gdif) + { + // if (bs && bs->cur_ps.fd.forcePowerLevel[FP_LEVITATION] < gWPArray[beginat]->forceJumpTo) + // { + // return -1; + // } + } + } + + /* if (bs->wpCurrent && gWPArray[windex]->forceJumpTo && + gWPArray[windex]->origin[2] > (bs->wpCurrent->origin[2]+64) && + bs->cur_ps.fd.forcePowerLevel[FP_LEVITATION] < gWPArray[windex]->forceJumpTo) + { + return -1; + }*/ + + distancetotal += gWPArray[beginat]->disttonext; + + beginat++; + } + + return distancetotal; +} + +void CheckForShorterRoutes(bot_state_t *bs, int newwpindex) +{ + float bestlen; + float checklen; + int bestindex; + int i; + int fj; + + i = 0; + fj = 0; + + if (!bs->wpDestination) + { + return; + } + + if (newwpindex < bs->wpDestination->index) + { + bs->wpDirection = 0; + } + else if (newwpindex > bs->wpDestination->index) + { + bs->wpDirection = 1; + } + + if (bs->wpSwitchTime > level.time) + { + return; + } + + if (!gWPArray[newwpindex]->neighbornum) + { + return; + } + + bestindex = newwpindex; + bestlen = TotalTrailDistance(newwpindex, bs->wpDestination->index, bs); + + while (i < gWPArray[newwpindex]->neighbornum) + { + checklen = TotalTrailDistance(gWPArray[newwpindex]->neighbors[i].num, bs->wpDestination->index, bs); + + if (checklen < bestlen-64 || bestlen == -1) + { + if (bs->cur_ps.fd.forcePowerLevel[FP_LEVITATION] >= gWPArray[newwpindex]->neighbors[i].forceJumpTo) + { + bestlen = checklen; + bestindex = gWPArray[newwpindex]->neighbors[i].num; + + if (gWPArray[newwpindex]->neighbors[i].forceJumpTo) + { + fj = gWPArray[newwpindex]->neighbors[i].forceJumpTo; + } + else + { + fj = 0; + } + } + } + + i++; + } + + if (bestindex != newwpindex && bestindex != -1) + { + bs->wpCurrent = gWPArray[bestindex]; + bs->wpSwitchTime = level.time + 3000; + + if (fj) + { +#ifndef FORCEJUMP_INSTANTMETHOD + bs->forceJumpChargeTime = level.time + 1000; + bs->beStill = level.time + 1000; + bs->forceJumping = bs->forceJumpChargeTime; +#else + bs->beStill = level.time + 500; + bs->jumpTime = level.time + fj*1200; + bs->jDelay = level.time + 200; + bs->forceJumping = bs->jumpTime; +#endif + } + } +} + +void WPConstantRoutine(bot_state_t *bs) +{ + if (!bs->wpCurrent) + { + return; + } + + if (bs->wpCurrent->flags & WPFLAG_DUCK) + { + bs->duckTime = level.time + 100; + } + +#ifndef FORCEJUMP_INSTANTMETHOD + if (bs->wpCurrent->flags & WPFLAG_JUMP) + { + float heightDif = (bs->wpCurrent->origin[2] - bs->origin[2]+16); + + if (bs->origin[2]+16 >= bs->wpCurrent->origin[2]) + { //then why exactly would we be force jumping? + heightDif = 0; + } + + if (heightDif > 40 && (bs->cur_ps.fd.forcePowersKnown & (1 << FP_LEVITATION)) && (bs->cur_ps.fd.forceJumpCharge < (forceJumpStrength[bs->cur_ps.fd.forcePowerLevel[FP_LEVITATION]]-100) || bs->cur_ps.groundEntityNum == ENTITYNUM_NONE)) + { + bs->forceJumpChargeTime = level.time + 1000; + if (bs->cur_ps.groundEntityNum != ENTITYNUM_NONE && bs->jumpPrep < (level.time-300)) + { + bs->jumpPrep = level.time + 700; + } + bs->beStill = level.time + 300; + bs->jumpTime = 0; + + if (bs->wpSeenTime < (level.time + 600)) + { + bs->wpSeenTime = level.time + 600; + } + } + else if (heightDif > 64 && !(bs->cur_ps.fd.forcePowersKnown & (1 << FP_LEVITATION))) + { //this point needs force jump to reach and we don't have it + //Kill the current point and turn around + bs->wpCurrent = NULL; + if (bs->wpDirection) + { + bs->wpDirection = 0; + } + else + { + bs->wpDirection = 1; + } + + return; + } + } +#endif + + if (bs->wpCurrent->forceJumpTo) + { +#ifdef FORCEJUMP_INSTANTMETHOD + if (bs->origin[2]+16 < bs->wpCurrent->origin[2]) + { + bs->jumpTime = level.time + 100; + } +#else + float heightDif = (bs->wpCurrent->origin[2] - bs->origin[2]+16); + + if (bs->origin[2]+16 >= bs->wpCurrent->origin[2]) + { //then why exactly would we be force jumping? + heightDif = 0; + } + + if (bs->cur_ps.fd.forceJumpCharge < (forceJumpStrength[bs->cur_ps.fd.forcePowerLevel[FP_LEVITATION]]-100)) + { + bs->forceJumpChargeTime = level.time + 200; + } +#endif + } +} + +qboolean BotCTFGuardDuty(bot_state_t *bs) +{ + if (g_gametype.integer != GT_CTF && + g_gametype.integer != GT_CTY) + { + return qfalse; + } + + if (bs->ctfState == CTFSTATE_DEFENDER) + { + return qtrue; + } + + return qfalse; +} + +void WPTouchRoutine(bot_state_t *bs) +{ + int lastNum; + + if (!bs->wpCurrent) + { + return; + } + + bs->wpTravelTime = level.time + 10000; + + if (bs->wpCurrent->flags & WPFLAG_NOMOVEFUNC) + { + bs->noUseTime = level.time + 4000; + } + +#ifdef FORCEJUMP_INSTANTMETHOD + if ((bs->wpCurrent->flags & WPFLAG_JUMP) && bs->wpCurrent->forceJumpTo) + { //jump if we're flagged to but not if this indicates a force jump point. Force jumping is + //handled elsewhere. + bs->jumpTime = level.time + 100; + } +#else + if ((bs->wpCurrent->flags & WPFLAG_JUMP) && !bs->wpCurrent->forceJumpTo) + { //jump if we're flagged to but not if this indicates a force jump point. Force jumping is + //handled elsewhere. + bs->jumpTime = level.time + 100; + } +#endif + + trap_Cvar_Update(&bot_camp); + + if (bs->isCamper && bot_camp.integer && (BotIsAChickenWuss(bs) || BotCTFGuardDuty(bs) || bs->isCamper == 2) && ((bs->wpCurrent->flags & WPFLAG_SNIPEORCAMP) || (bs->wpCurrent->flags & WPFLAG_SNIPEORCAMPSTAND)) && + bs->cur_ps.weapon != WP_SABER && bs->cur_ps.weapon != WP_STUN_BATON) + { //if we're a camper and a chicken then camp + if (bs->wpDirection) + { + lastNum = bs->wpCurrent->index+1; + } + else + { + lastNum = bs->wpCurrent->index-1; + } + + if (gWPArray[lastNum] && gWPArray[lastNum]->inuse && gWPArray[lastNum]->index && bs->isCamping < level.time) + { + bs->isCamping = level.time + rand()%15000 + 30000; + bs->wpCamping = bs->wpCurrent; + bs->wpCampingTo = gWPArray[lastNum]; + + if (bs->wpCurrent->flags & WPFLAG_SNIPEORCAMPSTAND) + { + bs->campStanding = qtrue; + } + else + { + bs->campStanding = qfalse; + } + } + + } + else if ((bs->cur_ps.weapon == WP_SABER || bs->cur_ps.weapon == WP_STUN_BATON) && + bs->isCamping > level.time) + { + bs->isCamping = 0; + bs->wpCampingTo = NULL; + bs->wpCamping = NULL; + } + + if (bs->wpDestination) + { + if (bs->wpCurrent->index == bs->wpDestination->index) + { + bs->wpDestination = NULL; + + if (bs->runningLikeASissy) + { //this obviously means we're scared and running, so we'll want to keep our navigational priorities less delayed + bs->destinationGrabTime = level.time + 500; + } + else + { + bs->destinationGrabTime = level.time + 3500; + } + } + else + { + CheckForShorterRoutes(bs, bs->wpCurrent->index); + } + } +} + +void MoveTowardIdealAngles(bot_state_t *bs) +{ + VectorCopy(bs->goalAngles, bs->ideal_viewangles); +} + +#define BOT_STRAFE_AVOIDANCE + +#ifdef BOT_STRAFE_AVOIDANCE +#define STRAFEAROUND_RIGHT 1 +#define STRAFEAROUND_LEFT 2 + +int BotTrace_Strafe(bot_state_t *bs, vec3_t traceto) +{ + vec3_t playerMins = {-15, -15, /*DEFAULT_MINS_2*/-8}; + vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; + vec3_t from, to; + vec3_t dirAng, dirDif; + vec3_t forward, right; + trace_t tr; + + if (bs->cur_ps.groundEntityNum == ENTITYNUM_NONE) + { //don't do this in the air, it can be.. dangerous. + return 0; + } + + VectorSubtract(traceto, bs->origin, dirAng); + VectorNormalize(dirAng); + vectoangles(dirAng, dirAng); + + if (AngleDifference(bs->viewangles[YAW], dirAng[YAW]) > 60 || + AngleDifference(bs->viewangles[YAW], dirAng[YAW]) < -60) + { //If we aren't facing the direction we're going here, then we've got enough excuse to be too stupid to strafe around anyway + return 0; + } + + VectorCopy(bs->origin, from); + VectorCopy(traceto, to); + + VectorSubtract(to, from, dirDif); + VectorNormalize(dirDif); + vectoangles(dirDif, dirDif); + + AngleVectors(dirDif, forward, 0, 0); + + to[0] = from[0] + forward[0]*32; + to[1] = from[1] + forward[1]*32; + to[2] = from[2] + forward[2]*32; + + trap_Trace(&tr, from, playerMins, playerMaxs, to, bs->client, MASK_PLAYERSOLID); + + if (tr.fraction == 1) + { + return 0; + } + + AngleVectors(dirAng, 0, right, 0); + + from[0] += right[0]*32; + from[1] += right[1]*32; + from[2] += right[2]*16; + + to[0] += right[0]*32; + to[1] += right[1]*32; + to[2] += right[2]*32; + + trap_Trace(&tr, from, playerMins, playerMaxs, to, bs->client, MASK_PLAYERSOLID); + + if (tr.fraction == 1) + { + return STRAFEAROUND_RIGHT; + } + + from[0] -= right[0]*64; + from[1] -= right[1]*64; + from[2] -= right[2]*64; + + to[0] -= right[0]*64; + to[1] -= right[1]*64; + to[2] -= right[2]*64; + + trap_Trace(&tr, from, playerMins, playerMaxs, to, bs->client, MASK_PLAYERSOLID); + + if (tr.fraction == 1) + { + return STRAFEAROUND_LEFT; + } + + return 0; +} +#endif + +int BotTrace_Jump(bot_state_t *bs, vec3_t traceto) +{ + vec3_t mins, maxs, a, fwd, traceto_mod, tracefrom_mod; + trace_t tr; + int orTr; + + VectorSubtract(traceto, bs->origin, a); + vectoangles(a, a); + + AngleVectors(a, fwd, NULL, NULL); + + traceto_mod[0] = bs->origin[0] + fwd[0]*4; + traceto_mod[1] = bs->origin[1] + fwd[1]*4; + traceto_mod[2] = bs->origin[2] + fwd[2]*4; + + mins[0] = -15; + mins[1] = -15; + mins[2] = -18; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 32; + + trap_Trace(&tr, bs->origin, mins, maxs, traceto_mod, bs->client, MASK_PLAYERSOLID); + + if (tr.fraction == 1) + { + return 0; + } + + orTr = tr.entityNum; + + VectorCopy(bs->origin, tracefrom_mod); + + tracefrom_mod[2] += 41; + traceto_mod[2] += 41; + + mins[0] = -15; + mins[1] = -15; + mins[2] = 0; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 8; + + trap_Trace(&tr, tracefrom_mod, mins, maxs, traceto_mod, bs->client, MASK_PLAYERSOLID); + + if (tr.fraction == 1) + { + if (orTr >= 0 && orTr < MAX_CLIENTS && botstates[orTr] && botstates[orTr]->jumpTime > level.time) + { + return 0; //so bots don't try to jump over each other at the same time + } + + if (bs->currentEnemy && bs->currentEnemy->s.number == orTr && (BotGetWeaponRange(bs) == BWEAPONRANGE_SABER || BotGetWeaponRange(bs) == BWEAPONRANGE_MELEE)) + { + return 0; + } + + return 1; + } + + return 0; +} + +int BotTrace_Duck(bot_state_t *bs, vec3_t traceto) +{ + vec3_t mins, maxs, a, fwd, traceto_mod, tracefrom_mod; + trace_t tr; + + VectorSubtract(traceto, bs->origin, a); + vectoangles(a, a); + + AngleVectors(a, fwd, NULL, NULL); + + traceto_mod[0] = bs->origin[0] + fwd[0]*4; + traceto_mod[1] = bs->origin[1] + fwd[1]*4; + traceto_mod[2] = bs->origin[2] + fwd[2]*4; + + mins[0] = -15; + mins[1] = -15; + mins[2] = -23; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 8; + + trap_Trace(&tr, bs->origin, mins, maxs, traceto_mod, bs->client, MASK_PLAYERSOLID); + + if (tr.fraction != 1) + { + return 0; + } + + VectorCopy(bs->origin, tracefrom_mod); + + tracefrom_mod[2] += 31;//33; + traceto_mod[2] += 31;//33; + + mins[0] = -15; + mins[1] = -15; + mins[2] = 0; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 32; + + trap_Trace(&tr, tracefrom_mod, mins, maxs, traceto_mod, bs->client, MASK_PLAYERSOLID); + + if (tr.fraction != 1) + { + return 1; + } + + return 0; +} + +int PassStandardEnemyChecks(bot_state_t *bs, gentity_t *en) +{ + if (!bs || !en) + { + return 0; + } + + if (!en->client) + { + return 0; + } + + if (en->health < 1) + { + return 0; + } + + if (!en->takedamage) + { + return 0; + } + + if (botstates[en->s.number] && cm_botsattackhumans.integer == 1) + { + return 0; + } + + if (bs->doingFallback && + (gLevelFlags & LEVELFLAG_IGNOREINFALLBACK)) + { + return 0; + } + + if (en->client) + { + if (en->client->ps.pm_type == PM_INTERMISSION || + en->client->ps.pm_type == PM_SPECTATOR) + { + return 0; + } + + if (en->client->sess.sessionTeam == TEAM_SPECTATOR) + { + return 0; + } + + if (!en->client->pers.connected) + { + return 0; + } + } + + if (!en->s.solid) + { + return 0; + } + + if (bs->client == en->s.number) + { + return 0; + } + + if (OnSameTeam(&g_entities[bs->client], en)) + { + return 0; + } + + if (BotMindTricked(bs->client, en->s.number)) + { + if (bs->currentEnemy && bs->currentEnemy->s.number == en->s.number) + { + vec3_t vs; + float vLen = 0; + + VectorSubtract(bs->origin, en->client->ps.origin, vs); + vLen = VectorLength(vs); + + if (vLen > 256 && (level.time - en->client->dangerTime) > 150) + { + return 0; + } + } + } + + if (en->client->ps.duelInProgress && en->client->ps.duelIndex != bs->client) + { + return 0; + } + + if (bs->cur_ps.duelInProgress && en->s.number != bs->cur_ps.duelIndex) + { + return 0; + } + + if (g_gametype.integer == GT_JEDIMASTER && !en->client->ps.isJediMaster && !bs->cur_ps.isJediMaster) + { //rules for attacking non-JM in JM mode + vec3_t vs; + float vLen = 0; + + if (!g_friendlyFire.integer) + { //can't harm non-JM in JM mode if FF is off + return 0; + } + + VectorSubtract(bs->origin, en->client->ps.origin, vs); + vLen = VectorLength(vs); + + if (vLen > 350) + { + return 0; + } + } + + /* + if (en->client && en->client->pers.connected != CON_CONNECTED) + { + return 0; + } + */ + + return 1; +} + +void BotDamageNotification(gclient_t *bot, gentity_t *attacker) +{ + bot_state_t *bs; + bot_state_t *bs_a; + int i; + + if (!bot || !attacker || !attacker->client) + { + return; + } + + bs_a = botstates[attacker->s.number]; + + if (bs_a) + { + bs_a->lastAttacked = &g_entities[bot->ps.clientNum]; + i = 0; + + if (cm_botsattackhumans.integer == 1){ + return; + } + + while (i < MAX_CLIENTS) + { + if (botstates[i] && + i != bs_a->client && + botstates[i]->lastAttacked == &g_entities[bot->ps.clientNum]) + { + botstates[i]->lastAttacked = NULL; + } + + i++; + } + } + else //got attacked by a real client, so no one gets rights to lastAttacked + { + i = 0; + + while (i < MAX_CLIENTS) + { + if (botstates[i] && + botstates[i]->lastAttacked == &g_entities[bot->ps.clientNum]) + { + botstates[i]->lastAttacked = NULL; + } + + i++; + } + } + + bs = botstates[bot->ps.clientNum]; + + if (!bs) + { + return; + } + + bs->lastHurt = attacker; + + if (bs->currentEnemy) + { + return; + } + + if (!PassStandardEnemyChecks(bs, attacker)) + { + return; + } + + if (PassLovedOneCheck(bs, attacker)) + { + if (cm_botsattackhumans.integer == 1){ + return; + } + bs->currentEnemy = attacker; + bs->enemySeenTime = level.time + ENEMY_FORGET_MS; + } +} + +int BotCanHear(bot_state_t *bs, gentity_t *en, float endist) +{ + float minlen; + + if (!en || !en->client) + { + return 0; + } + + if (en && en->client && en->client->ps.otherSoundTime > level.time) + { + minlen = en->client->ps.otherSoundLen; + goto checkStep; + } + + if (en && en->client && en->client->ps.footstepTime > level.time) + { + minlen = 256; + goto checkStep; + } + + if (gBotEventTracker[en->s.number].eventTime < level.time) + { + return 0; + } + + switch(gBotEventTracker[en->s.number].events[gBotEventTracker[en->s.number].eventSequence & (MAX_PS_EVENTS-1)]) + { + case EV_GLOBAL_SOUND: + minlen = 256; + break; + case EV_FIRE_WEAPON: + case EV_ALT_FIRE: + case EV_SABER_ATTACK: + minlen = 512; + break; + case EV_STEP_4: + case EV_STEP_8: + case EV_STEP_12: + case EV_STEP_16: + case EV_FOOTSTEP: + case EV_FOOTSTEP_METAL: + case EV_FOOTWADE: + minlen = 256; + break; + case EV_JUMP: + case EV_ROLL: + minlen = 256; + break; + default: + minlen = 999999; + break; + } +checkStep: + if (BotMindTricked(bs->client, en->s.number)) + { //if mindtricked by this person, cut down on the minlen + minlen /= 4; + } + + if (endist <= minlen) + { + return 1; + } + + return 0; +} + +void UpdateEventTracker(void) +{ + int i; + + i = 0; + + while (i < MAX_CLIENTS) + { + if (gBotEventTracker[i].eventSequence != level.clients[i].ps.eventSequence) + { //updated event + gBotEventTracker[i].eventSequence = level.clients[i].ps.eventSequence; + gBotEventTracker[i].events[0] = level.clients[i].ps.events[0]; + gBotEventTracker[i].events[1] = level.clients[i].ps.events[1]; + gBotEventTracker[i].eventTime = level.time + 0.5; + } + + i++; + } +} + +int InFieldOfVision(vec3_t viewangles, float fov, vec3_t angles) +{ + int i; + float diff, angle; + + for (i = 0; i < 2; i++) + { + angle = AngleMod(viewangles[i]); + angles[i] = AngleMod(angles[i]); + diff = angles[i] - angle; + if (angles[i] > angle) + { + if (diff > 180.0) + { + diff -= 360.0; + } + } + else + { + if (diff < -180.0) + { + diff += 360.0; + } + } + if (diff > 0) + { + if (diff > fov * 0.5) + { + return 0; + } + } + else + { + if (diff < -fov * 0.5) + { + return 0; + } + } + } + return 1; +} + +//NOTE: This is base for cm_botsattackhumans +int PassLovedOneCheck(bot_state_t *bs, gentity_t *ent) +{ + int i; + bot_state_t *loved; + + if (!bs->lovednum) + { + return 1; + } + + if (g_gametype.integer == GT_TOURNAMENT) + { //There is no love in 1-on-1 + return 1; + } + + i = 0; + + if (!botstates[ent->s.number]) + { //not a bot + return 1; + } + + trap_Cvar_Update(&bot_attachments); + + if (!bot_attachments.integer) + { + return 1; + } + + loved = botstates[ent->s.number]; + + while (i < bs->lovednum) + { + if (strcmp(level.clients[loved->client].pers.netname, bs->loved[i].name) == 0) + { + if (!IsTeamplay() && bs->loved[i].level < 2) + { //if FFA and level of love is not greater than 1, just don't care + return 1; + } + else if (IsTeamplay() && !OnSameTeam(&g_entities[bs->client], &g_entities[loved->client]) && bs->loved[i].level < 2) + { //is teamplay, but not on same team and level < 2 + return 1; + } + else + { + return 0; + } + } + + i++; + } + + return 1; +} + +qboolean G_ThereIsAMaster(void); + +int ScanForEnemies(bot_state_t *bs) +{ + vec3_t a; + float distcheck; + float closest; + int bestindex; + int i; + float hasEnemyDist = 0; + qboolean noAttackNonJM = qfalse; + + closest = 999999; + i = 0; + bestindex = -1; + + if (bs->currentEnemy) + { + hasEnemyDist = bs->frame_Enemy_Len; + } + + if (bs->currentEnemy && bs->currentEnemy->client && + bs->currentEnemy->client->ps.isJediMaster) + { //The Jedi Master must die. + return -1; + } + + if (bs->currentEnemy && bs->currentEnemy->client && + !botstates[bs->currentEnemy->s.number] && cm_botsattackhumans.integer == 1) + { //dont attack other bots + return -1; + } + + if (g_gametype.integer == GT_JEDIMASTER) + { + if (G_ThereIsAMaster() && !bs->cur_ps.isJediMaster) + { + if (!g_friendlyFire.integer) + { + noAttackNonJM = qtrue; + } + else + { + closest = 128; //only get mad at people if they get close enough to you to anger you, or hurt you + } + } + } + + while (i <= MAX_CLIENTS) + { + if (i != bs->client && g_entities[i].client && !OnSameTeam(&g_entities[bs->client], &g_entities[i]) && PassStandardEnemyChecks(bs, &g_entities[i]) && trap_InPVS(g_entities[i].client->ps.origin, bs->eye) && PassLovedOneCheck(bs, &g_entities[i])) + { + VectorSubtract(g_entities[i].client->ps.origin, bs->eye, a); + distcheck = VectorLength(a); + vectoangles(a, a); + + if (g_entities[i].client->ps.isJediMaster) + { //make us think the Jedi Master is close so we'll attack him above all + distcheck = 1; + } + + if (distcheck < closest && ((InFieldOfVision(bs->viewangles, 90, a) && !BotMindTricked(bs->client, i)) || BotCanHear(bs, &g_entities[i], distcheck)) && OrgVisible(bs->eye, g_entities[i].client->ps.origin, -1)) + { + if (BotMindTricked(bs->client, i)) + { + if (distcheck < 256 || (level.time - g_entities[i].client->dangerTime) < 100) + { + if (!hasEnemyDist || distcheck < (hasEnemyDist - 128)) + { //if we have an enemy, only switch to closer if he is 128+ closer to avoid flipping out + if (!noAttackNonJM || g_entities[i].client->ps.isJediMaster) + { + closest = distcheck; + bestindex = i; + } + } + } + } + else + { + if (!hasEnemyDist || distcheck < (hasEnemyDist - 128)) + { //if we have an enemy, only switch to closer if he is 128+ closer to avoid flipping out + if (!noAttackNonJM || g_entities[i].client->ps.isJediMaster) + { + closest = distcheck; + bestindex = i; + } + } + } + } + } + i++; + } + + return bestindex; +} + +int WaitingForNow(bot_state_t *bs, vec3_t goalpos) +{ //checks if the bot is doing something along the lines of waiting for an elevator to raise up + vec3_t xybot, xywp, a; + + if (!bs->wpCurrent) + { + return 0; + } + + if ((int)goalpos[0] != (int)bs->wpCurrent->origin[0] || + (int)goalpos[1] != (int)bs->wpCurrent->origin[1] || + (int)goalpos[2] != (int)bs->wpCurrent->origin[2]) + { + return 0; + } + + VectorCopy(bs->origin, xybot); + VectorCopy(bs->wpCurrent->origin, xywp); + + xybot[2] = 0; + xywp[2] = 0; + + VectorSubtract(xybot, xywp, a); + + if (VectorLength(a) < 16 && bs->frame_Waypoint_Len > 100) + { + if (CheckForFunc(bs->origin, bs->client)) + { + return 1; //we're probably standing on an elevator and riding up/down. Or at least we hope so. + } + } + else if (VectorLength(a) < 64 && bs->frame_Waypoint_Len > 64 && + CheckForFunc(bs->origin, bs->client)) + { + bs->noUseTime = level.time + 2000; + } + + return 0; +} + +int BotGetWeaponRange(bot_state_t *bs) +{ + switch (bs->cur_ps.weapon) + { + case WP_STUN_BATON: + return BWEAPONRANGE_MELEE; + case WP_SABER: + return BWEAPONRANGE_SABER; + case WP_BRYAR_PISTOL: + return BWEAPONRANGE_MID; + case WP_BLASTER: + return BWEAPONRANGE_MID; + case WP_DISRUPTOR: + return BWEAPONRANGE_MID; + case WP_BOWCASTER: + return BWEAPONRANGE_LONG; + case WP_REPEATER: + return BWEAPONRANGE_MID; + case WP_DEMP2: + return BWEAPONRANGE_LONG; + case WP_FLECHETTE: + return BWEAPONRANGE_LONG; + case WP_ROCKET_LAUNCHER: + return BWEAPONRANGE_LONG; + case WP_THERMAL: + return BWEAPONRANGE_LONG; + case WP_TRIP_MINE: + return BWEAPONRANGE_LONG; + case WP_DET_PACK: + return BWEAPONRANGE_LONG; + default: + return BWEAPONRANGE_MID; + } +} + +int BotIsAChickenWuss(bot_state_t *bs) +{ + int bWRange; + + if (gLevelFlags & LEVELFLAG_IMUSTNTRUNAWAY) + { + return 0; + } + + if (g_gametype.integer == GT_SINGLE_PLAYER) + { + return 0; + } + + if (g_gametype.integer == GT_JEDIMASTER && !bs->cur_ps.isJediMaster) + { //Then you may know no fear. + //Well, unless he's strong. + if (bs->currentEnemy && bs->currentEnemy->client && + bs->currentEnemy->client->ps.isJediMaster && + bs->currentEnemy->health > 40 && + bs->cur_ps.weapon < WP_ROCKET_LAUNCHER) + { //explosive weapons are most effective against the Jedi Master + goto jmPass; + } + return 0; + } +jmPass: + if (bs->chickenWussCalculationTime > level.time) + { + return 2; //don't want to keep going between two points... + } + + if (g_gametype.integer == GT_JEDIMASTER && !bs->cur_ps.isJediMaster) + { + return 1; + } + + bs->chickenWussCalculationTime = level.time + MAX_CHICKENWUSS_TIME; + + if (g_entities[bs->client].health < BOT_RUN_HEALTH) + { + return 1; + } + + bWRange = BotGetWeaponRange(bs); + + if (bWRange == BWEAPONRANGE_MELEE || bWRange == BWEAPONRANGE_SABER) + { + if (bWRange != BWEAPONRANGE_SABER || !bs->saberSpecialist) + { + return 1; + } + } + + if (bs->cur_ps.weapon == WP_BRYAR_PISTOL) + { //the bryar is a weak weapon, so just try to find a new one if it's what you're having to use + return 1; + } + + if (bs->currentEnemy && bs->currentEnemy->client && + bs->currentEnemy->client->ps.weapon == WP_SABER && + bs->frame_Enemy_Len < 512 && bs->cur_ps.weapon != WP_SABER) + { //if close to an enemy with a saber and not using a saber, then try to back off + return 1; + } + + //didn't run, reset the timer + bs->chickenWussCalculationTime = 0; + + return 0; +} + +gentity_t *GetNearestBadThing(bot_state_t *bs) +{ + int i = 0; + float glen; + vec3_t hold; + int bestindex = 0; + float bestdist = 800; //if not within a radius of 800, it's no threat anyway + int foundindex = 0; + float factor = 0; + gentity_t *ent; + trace_t tr; + + while (i < MAX_GENTITIES) + { + ent = &g_entities[i]; + + if ( (ent && + !ent->client && + ent->inuse && + ent->damage && + /*(ent->s.weapon == WP_THERMAL || ent->s.weapon == WP_FLECHETTE)*/ + ent->s.weapon && + ent->splashDamage) || + (ent && + ent->bolt_Head == 1000 && + ent->inuse && + ent->health > 0 && + ent->boltpoint3 != bs->client && + g_entities[ent->boltpoint3].client && !OnSameTeam(&g_entities[bs->client], &g_entities[ent->boltpoint3])) ) + { //try to escape from anything with a non-0 s.weapon and non-0 damage. This hopefully only means dangerous projectiles. + //Or a sentry gun if bolt_Head == 1000. This is a terrible hack, yes. + VectorSubtract(bs->origin, ent->r.currentOrigin, hold); + glen = VectorLength(hold); + + if (ent->s.weapon != WP_THERMAL && ent->s.weapon != WP_FLECHETTE && + ent->s.weapon != WP_DET_PACK && ent->s.weapon != WP_TRIP_MINE) + { + factor = 0.5; + + if (ent->s.weapon && glen <= 256 && bs->settings.skill > 2) + { //it's a projectile so push it away + bs->doForcePush = level.time + 700; + //G_Printf("PUSH PROJECTILE\n"); + } + } + else + { + factor = 1; + } + + if (ent->s.weapon == WP_ROCKET_LAUNCHER && + (ent->r.ownerNum == bs->client || + (ent->r.ownerNum > 0 && ent->r.ownerNum < MAX_CLIENTS && + g_entities[ent->r.ownerNum].client && OnSameTeam(&g_entities[bs->client], &g_entities[ent->r.ownerNum]))) ) + { //don't be afraid of your own rockets or your teammates' rockets + factor = 0; + } + + if (glen < bestdist*factor && trap_InPVS(bs->origin, ent->s.pos.trBase)) + { + trap_Trace(&tr, bs->origin, NULL, NULL, ent->s.pos.trBase, bs->client, MASK_SOLID); + + if (tr.fraction == 1 || tr.entityNum == ent->s.number) + { + bestindex = i; + bestdist = glen; + foundindex = 1; + } + } + } + + if (ent && !ent->client && ent->inuse && ent->damage && ent->s.weapon && ent->r.ownerNum < MAX_CLIENTS && ent->r.ownerNum >= 0) + { //if we're in danger of a projectile belonging to someone and don't have an enemy, set the enemy to them + gentity_t *projOwner = &g_entities[ent->r.ownerNum]; + + if (projOwner && projOwner->inuse && projOwner->client) + { + if (!bs->currentEnemy) + { + if (PassStandardEnemyChecks(bs, projOwner)) + { + if (PassLovedOneCheck(bs, projOwner)) + { + VectorSubtract(bs->origin, ent->r.currentOrigin, hold); + glen = VectorLength(hold); + + if (glen < 512) + { + bs->currentEnemy = projOwner; + bs->enemySeenTime = level.time + ENEMY_FORGET_MS; + } + } + } + } + } + } + + i++; + } + + if (foundindex) + { + bs->dontGoBack = level.time + 1500; + return &g_entities[bestindex]; + } + else + { + return NULL; + } +} + +int BotDefendFlag(bot_state_t *bs) +{ + wpobject_t *flagPoint; + vec3_t a; + + if (level.clients[bs->client].sess.sessionTeam == TEAM_RED) + { + flagPoint = flagRed; + } + else if (level.clients[bs->client].sess.sessionTeam == TEAM_BLUE) + { + flagPoint = flagBlue; + } + else + { + return 0; + } + + if (!flagPoint) + { + return 0; + } + + VectorSubtract(bs->origin, flagPoint->origin, a); + + if (VectorLength(a) > BASE_GUARD_DISTANCE) + { + bs->wpDestination = flagPoint; + } + + return 1; +} + +int BotGetEnemyFlag(bot_state_t *bs) +{ + wpobject_t *flagPoint; + vec3_t a; + + if (level.clients[bs->client].sess.sessionTeam == TEAM_RED) + { + flagPoint = flagBlue; + } + else if (level.clients[bs->client].sess.sessionTeam == TEAM_BLUE) + { + flagPoint = flagRed; + } + else + { + return 0; + } + + if (!flagPoint) + { + return 0; + } + + VectorSubtract(bs->origin, flagPoint->origin, a); + + if (VectorLength(a) > BASE_GETENEMYFLAG_DISTANCE) + { + bs->wpDestination = flagPoint; + } + + return 1; +} + +int BotGetFlagBack(bot_state_t *bs) +{ + int i = 0; + int myFlag = 0; + int foundCarrier = 0; + int tempInt = 0; + gentity_t *ent = NULL; + vec3_t usethisvec; + + if (level.clients[bs->client].sess.sessionTeam == TEAM_RED) + { + myFlag = PW_REDFLAG; + } + else + { + myFlag = PW_BLUEFLAG; + } + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + + if (ent && ent->client && ent->client->ps.powerups[myFlag] && !OnSameTeam(&g_entities[bs->client], ent)) + { + foundCarrier = 1; + break; + } + + i++; + } + + if (!foundCarrier) + { + return 0; + } + + if (!ent) + { + return 0; + } + + if (bs->wpDestSwitchTime < level.time) + { + if (ent->client) + { + VectorCopy(ent->client->ps.origin, usethisvec); + } + else + { + VectorCopy(ent->s.origin, usethisvec); + } + + tempInt = GetNearestVisibleWP(usethisvec, 0); + + if (tempInt != -1 && TotalTrailDistance(bs->wpCurrent->index, tempInt, bs) != -1) + { + bs->wpDestination = gWPArray[tempInt]; + bs->wpDestSwitchTime = level.time + Q_irand(1000, 5000); + } + } + + return 1; +} + +int BotGuardFlagCarrier(bot_state_t *bs) +{ + int i = 0; + int enemyFlag = 0; + int foundCarrier = 0; + int tempInt = 0; + gentity_t *ent = NULL; + vec3_t usethisvec; + + if (level.clients[bs->client].sess.sessionTeam == TEAM_RED) + { + enemyFlag = PW_BLUEFLAG; + } + else + { + enemyFlag = PW_REDFLAG; + } + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + + if (ent && ent->client && ent->client->ps.powerups[enemyFlag] && OnSameTeam(&g_entities[bs->client], ent)) + { + foundCarrier = 1; + break; + } + + i++; + } + + if (!foundCarrier) + { + return 0; + } + + if (!ent) + { + return 0; + } + + if (bs->wpDestSwitchTime < level.time) + { + if (ent->client) + { + VectorCopy(ent->client->ps.origin, usethisvec); + } + else + { + VectorCopy(ent->s.origin, usethisvec); + } + + tempInt = GetNearestVisibleWP(usethisvec, 0); + + if (tempInt != -1 && TotalTrailDistance(bs->wpCurrent->index, tempInt, bs) != -1) + { + bs->wpDestination = gWPArray[tempInt]; + bs->wpDestSwitchTime = level.time + Q_irand(1000, 5000); + } + } + + return 1; +} + +int BotGetFlagHome(bot_state_t *bs) +{ + wpobject_t *flagPoint; + vec3_t a; + + if (level.clients[bs->client].sess.sessionTeam == TEAM_RED) + { + flagPoint = flagRed; + } + else if (level.clients[bs->client].sess.sessionTeam == TEAM_BLUE) + { + flagPoint = flagBlue; + } + else + { + return 0; + } + + if (!flagPoint) + { + return 0; + } + + VectorSubtract(bs->origin, flagPoint->origin, a); + + if (VectorLength(a) > BASE_FLAGWAIT_DISTANCE) + { + bs->wpDestination = flagPoint; + } + + return 1; +} + +void GetNewFlagPoint(wpobject_t *wp, gentity_t *flagEnt, int team) +{ //get the nearest possible waypoint to the flag since it's not in its original position + int i = 0; + vec3_t a, mins, maxs; + float bestdist; + float testdist; + int bestindex = 0; + int foundindex = 0; + trace_t tr; + + mins[0] = -15; + mins[1] = -15; + mins[2] = -5; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 5; + + VectorSubtract(wp->origin, flagEnt->s.pos.trBase, a); + + bestdist = VectorLength(a); + + if (bestdist <= WP_KEEP_FLAG_DIST) + { + trap_Trace(&tr, wp->origin, mins, maxs, flagEnt->s.pos.trBase, flagEnt->s.number, MASK_SOLID); + + if (tr.fraction == 1) + { //this point is good + return; + } + } + + while (i < gWPNum) + { + VectorSubtract(gWPArray[i]->origin, flagEnt->s.pos.trBase, a); + testdist = VectorLength(a); + + if (testdist < bestdist) + { + trap_Trace(&tr, gWPArray[i]->origin, mins, maxs, flagEnt->s.pos.trBase, flagEnt->s.number, MASK_SOLID); + + if (tr.fraction == 1) + { + foundindex = 1; + bestindex = i; + bestdist = testdist; + } + } + + i++; + } + + if (foundindex) + { + if (team == TEAM_RED) + { + flagRed = gWPArray[bestindex]; + } + else + { + flagBlue = gWPArray[bestindex]; + } + } +} + +int CTFTakesPriority(bot_state_t *bs) +{ + gentity_t *ent = NULL; + int enemyFlag = 0; + int myFlag = 0; + int enemyHasOurFlag = 0; + int weHaveEnemyFlag = 0; + int numOnMyTeam = 0; + int numOnEnemyTeam = 0; + int numAttackers = 0; + int numDefenders = 0; + int i = 0; + int idleWP; + int dosw = 0; + wpobject_t *dest_sw = NULL; +#ifdef BOT_CTF_DEBUG + vec3_t t; + + G_Printf("CTFSTATE: %s\n", ctfStateNames[bs->ctfState]); +#endif + + if (g_gametype.integer != GT_CTF && g_gametype.integer != GT_CTY) + { + return 0; + } + + if (bs->cur_ps.weapon == WP_BRYAR_PISTOL && + (level.time - bs->lastDeadTime) < BOT_MAX_WEAPON_GATHER_TIME) + { //get the nearest weapon laying around base before heading off for battle + idleWP = GetBestIdleGoal(bs); + + if (idleWP != -1 && gWPArray[idleWP] && gWPArray[idleWP]->inuse) + { + if (bs->wpDestSwitchTime < level.time) + { + bs->wpDestination = gWPArray[idleWP]; + } + return 1; + } + } + else if (bs->cur_ps.weapon == WP_BRYAR_PISTOL && + (level.time - bs->lastDeadTime) < BOT_MAX_WEAPON_CHASE_CTF && + bs->wpDestination && bs->wpDestination->weight) + { + dest_sw = bs->wpDestination; + dosw = 1; + } + + if (level.clients[bs->client].sess.sessionTeam == TEAM_RED) + { + myFlag = PW_REDFLAG; + } + else + { + myFlag = PW_BLUEFLAG; + } + + if (level.clients[bs->client].sess.sessionTeam == TEAM_RED) + { + enemyFlag = PW_BLUEFLAG; + } + else + { + enemyFlag = PW_REDFLAG; + } + + if (!flagRed || !flagBlue || + !flagRed->inuse || !flagBlue->inuse || + !eFlagRed || !eFlagBlue) + { + return 0; + } + +#ifdef BOT_CTF_DEBUG + VectorCopy(flagRed->origin, t); + t[2] += 128; + G_TestLine(flagRed->origin, t, 0x0000ff, 500); + + VectorCopy(flagBlue->origin, t); + t[2] += 128; + G_TestLine(flagBlue->origin, t, 0x0000ff, 500); +#endif + + if (droppedRedFlag && (droppedRedFlag->flags & FL_DROPPED_ITEM)) + { + GetNewFlagPoint(flagRed, droppedRedFlag, TEAM_RED); + } + else + { + flagRed = oFlagRed; + } + + if (droppedBlueFlag && (droppedBlueFlag->flags & FL_DROPPED_ITEM)) + { + GetNewFlagPoint(flagBlue, droppedBlueFlag, TEAM_BLUE); + } + else + { + flagBlue = oFlagBlue; + } + + if (!bs->ctfState) + { + return 0; + } + + i = 0; + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + + if (ent && ent->client) + { + if (ent->client->ps.powerups[enemyFlag] && OnSameTeam(&g_entities[bs->client], ent)) + { + weHaveEnemyFlag = 1; + } + else if (ent->client->ps.powerups[myFlag] && !OnSameTeam(&g_entities[bs->client], ent)) + { + enemyHasOurFlag = 1; + } + + if (OnSameTeam(&g_entities[bs->client], ent)) + { + numOnMyTeam++; + } + else + { + numOnEnemyTeam++; + } + + if (botstates[ent->s.number]) + { + if (botstates[ent->s.number]->ctfState == CTFSTATE_ATTACKER || + botstates[ent->s.number]->ctfState == CTFSTATE_RETRIEVAL) + { + numAttackers++; + } + else + { + numDefenders++; + } + } + else + { //assume real players to be attackers in our logic + numAttackers++; + } + } + i++; + } + + if (bs->cur_ps.powerups[enemyFlag]) + { + if ((numOnMyTeam < 2 || !numAttackers) && enemyHasOurFlag) + { + bs->ctfState = CTFSTATE_RETRIEVAL; + } + else + { + bs->ctfState = CTFSTATE_GETFLAGHOME; + } + } + else if (bs->ctfState == CTFSTATE_GETFLAGHOME) + { + bs->ctfState = 0; + } + + if (bs->state_Forced) + { + bs->ctfState = bs->state_Forced; + } + + if (bs->ctfState == CTFSTATE_DEFENDER) + { + if (BotDefendFlag(bs)) + { + goto success; + } + } + + if (bs->ctfState == CTFSTATE_ATTACKER) + { + if (BotGetEnemyFlag(bs)) + { + goto success; + } + } + + if (bs->ctfState == CTFSTATE_RETRIEVAL) + { + if (BotGetFlagBack(bs)) + { + goto success; + } + else + { //can't find anyone on another team being a carrier, so ignore this priority + bs->ctfState = 0; + } + } + + if (bs->ctfState == CTFSTATE_GUARDCARRIER) + { + if (BotGuardFlagCarrier(bs)) + { + goto success; + } + else + { //can't find anyone on our team being a carrier, so ignore this priority + bs->ctfState = 0; + } + } + + if (bs->ctfState == CTFSTATE_GETFLAGHOME) + { + if (BotGetFlagHome(bs)) + { + goto success; + } + } + + return 0; + +success: + if (dosw) + { //allow ctf code to run, but if after a particular item then keep going after it + bs->wpDestination = dest_sw; + } + + return 1; +} + +int EntityVisibleBox(vec3_t org1, vec3_t mins, vec3_t maxs, vec3_t org2, int ignore, int ignore2) +{ + trace_t tr; + + trap_Trace(&tr, org1, mins, maxs, org2, ignore, MASK_SOLID); + + if (tr.fraction == 1 && !tr.startsolid && !tr.allsolid) + { + return 1; + } + else if (tr.entityNum != ENTITYNUM_NONE && tr.entityNum == ignore2) + { + return 1; + } + + return 0; +} + +int Saga_TargetClosestObjective(bot_state_t *bs, int flag) +{ + int i = 0; + int bestindex = -1; + float testdistance = 0; + float bestdistance = 999999999; + gentity_t *goalent; + vec3_t a, dif; + vec3_t mins, maxs; + + mins[0] = -1; + mins[1] = -1; + mins[2] = -1; + + maxs[0] = 1; + maxs[1] = 1; + maxs[2] = 1; + + if ( bs->wpDestination && (bs->wpDestination->flags & flag) && bs->wpDestination->associated_entity != ENTITYNUM_NONE && + &g_entities[bs->wpDestination->associated_entity] && g_entities[bs->wpDestination->associated_entity].use ) + { + goto hasPoint; + } + + while (i < gWPNum) + { + if ( gWPArray[i] && gWPArray[i]->inuse && (gWPArray[i]->flags & flag) && gWPArray[i]->associated_entity != ENTITYNUM_NONE && + &g_entities[gWPArray[i]->associated_entity] && g_entities[gWPArray[i]->associated_entity].use ) + { + VectorSubtract(gWPArray[i]->origin, bs->origin, a); + testdistance = VectorLength(a); + + if (testdistance < bestdistance) + { + bestdistance = testdistance; + bestindex = i; + } + } + + i++; + } + + if (bestindex != -1) + { + bs->wpDestination = gWPArray[bestindex]; + } + else + { + return 0; + } +hasPoint: + goalent = &g_entities[bs->wpDestination->associated_entity]; + + if (!goalent) + { + return 0; + } + + VectorSubtract(bs->origin, bs->wpDestination->origin, a); + + testdistance = VectorLength(a); + + dif[0] = (goalent->r.absmax[0]+goalent->r.absmin[0])/2; + dif[1] = (goalent->r.absmax[1]+goalent->r.absmin[1])/2; + dif[2] = (goalent->r.absmax[2]+goalent->r.absmin[2])/2; + //brush models can have tricky origins, so this is our hacky method of getting the center point + + if (goalent->takedamage && testdistance < BOT_MIN_SAGA_GOAL_SHOOT && + EntityVisibleBox(bs->origin, mins, maxs, dif, bs->client, goalent->s.number)) + { + bs->shootGoal = goalent; + bs->touchGoal = NULL; + } + else if (goalent->use && testdistance < BOT_MIN_SAGA_GOAL_TRAVEL) + { + bs->shootGoal = NULL; + bs->touchGoal = goalent; + } + else + { //don't know how to handle this goal object! + bs->shootGoal = NULL; + bs->touchGoal = NULL; + } + + if (BotGetWeaponRange(bs) == BWEAPONRANGE_MELEE || + BotGetWeaponRange(bs) == BWEAPONRANGE_SABER) + { + bs->shootGoal = NULL; //too risky + } + + if (bs->touchGoal) + { + //G_Printf("Please, master, let me touch it!\n"); + VectorCopy(dif, bs->goalPosition); + } + + return 1; +} + +void Saga_DefendFromAttackers(bot_state_t *bs) +{ //this may be a little cheap, but the best way to find our defending point is probably + //to just find the nearest person on the opposing team since they'll most likely + //be on offense in this situation + int wpClose = -1; + int i = 0; + float testdist = 999999; + int bestindex = -1; + float bestdist = 999999; + gentity_t *ent; + vec3_t a; + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + + if (ent && ent->client && ent->client->sess.sessionTeam != g_entities[bs->client].client->sess.sessionTeam && + ent->health > 0 && ent->client->sess.sessionTeam != TEAM_SPECTATOR) + { + VectorSubtract(ent->client->ps.origin, bs->origin, a); + + testdist = VectorLength(a); + + if (testdist < bestdist) + { + bestindex = i; + bestdist = testdist; + } + } + + i++; + } + + if (bestindex == -1) + { + return; + } + + wpClose = GetNearestVisibleWP(g_entities[bestindex].client->ps.origin, -1); + + if (wpClose != -1 && gWPArray[wpClose] && gWPArray[wpClose]->inuse) + { + bs->wpDestination = gWPArray[wpClose]; + bs->destinationGrabTime = level.time + 10000; + } +} + +int Saga_CountDefenders(bot_state_t *bs) +{ + int i = 0; + int num = 0; + gentity_t *ent; + bot_state_t *bot; + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + bot = botstates[i]; + + if (ent && ent->client && bot) + { + if (bot->sagaState == SAGASTATE_DEFENDER && + ent->client->sess.sessionTeam == g_entities[bs->client].client->sess.sessionTeam) + { + num++; + } + } + + i++; + } + + return num; +} + +int Saga_CountTeammates(bot_state_t *bs) +{ + int i = 0; + int num = 0; + gentity_t *ent; + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + + if (ent && ent->client) + { + if (ent->client->sess.sessionTeam == g_entities[bs->client].client->sess.sessionTeam) + { + num++; + } + } + + i++; + } + + return num; +} + +int SagaTakesPriority(bot_state_t *bs) +{ + int attacker; + int flagForDefendableObjective; + int flagForAttackableObjective; + int defenders, teammates; + int idleWP; + wpobject_t *dest_sw = NULL; + int dosw = 0; + gclient_t *bcl; + vec3_t dif; + trace_t tr; + + if (g_gametype.integer != GT_SAGA) + { + return 0; + } + + bcl = g_entities[bs->client].client; + + if (!bcl) + { + return 0; + } + + if (bs->cur_ps.weapon == WP_BRYAR_PISTOL && + (level.time - bs->lastDeadTime) < BOT_MAX_WEAPON_GATHER_TIME) + { //get the nearest weapon laying around base before heading off for battle + idleWP = GetBestIdleGoal(bs); + + if (idleWP != -1 && gWPArray[idleWP] && gWPArray[idleWP]->inuse) + { + if (bs->wpDestSwitchTime < level.time) + { + bs->wpDestination = gWPArray[idleWP]; + } + return 1; + } + } + else if (bs->cur_ps.weapon == WP_BRYAR_PISTOL && + (level.time - bs->lastDeadTime) < BOT_MAX_WEAPON_CHASE_TIME && + bs->wpDestination && bs->wpDestination->weight) + { + dest_sw = bs->wpDestination; + dosw = 1; + } + + if (bcl->sess.sessionTeam == SAGATEAM_IMPERIAL) + { + attacker = imperial_attackers; + flagForDefendableObjective = WPFLAG_SAGA_REBELOBJ; + flagForAttackableObjective = WPFLAG_SAGA_IMPERIALOBJ; + } + else + { + attacker = rebel_attackers; + flagForDefendableObjective = WPFLAG_SAGA_IMPERIALOBJ; + flagForAttackableObjective = WPFLAG_SAGA_REBELOBJ; + } + + if (attacker) + { + bs->sagaState = SAGASTATE_ATTACKER; + } + else + { + bs->sagaState = SAGASTATE_DEFENDER; + defenders = Saga_CountDefenders(bs); + teammates = Saga_CountTeammates(bs); + + if (defenders > teammates/3 && teammates > 1) + { //devote around 1/4 of our team to completing our own side goals even if we're a defender. + //If we have no side goals we will realize that later on and join the defenders + bs->sagaState = SAGASTATE_ATTACKER; + } + } + + if (bs->state_Forced) + { + bs->sagaState = bs->state_Forced; + } + + if (bs->sagaState == SAGASTATE_ATTACKER) + { + if (!Saga_TargetClosestObjective(bs, flagForAttackableObjective)) + { //looks like we have no goals other than to keep the other team from completing objectives + Saga_DefendFromAttackers(bs); + if (bs->shootGoal) + { + dif[0] = (bs->shootGoal->r.absmax[0]+bs->shootGoal->r.absmin[0])/2; + dif[1] = (bs->shootGoal->r.absmax[1]+bs->shootGoal->r.absmin[1])/2; + dif[2] = (bs->shootGoal->r.absmax[2]+bs->shootGoal->r.absmin[2])/2; + + if (!trap_InPVS(bs->origin, dif)) + { + bs->shootGoal = NULL; + } + else + { + trap_Trace(&tr, bs->origin, NULL, NULL, dif, bs->client, MASK_SOLID); + + if (tr.fraction != 1 && tr.entityNum != bs->shootGoal->s.number) + { + bs->shootGoal = NULL; + } + } + } + } + } + else if (bs->sagaState == SAGASTATE_DEFENDER) + { + Saga_DefendFromAttackers(bs); + if (bs->shootGoal) + { + dif[0] = (bs->shootGoal->r.absmax[0]+bs->shootGoal->r.absmin[0])/2; + dif[1] = (bs->shootGoal->r.absmax[1]+bs->shootGoal->r.absmin[1])/2; + dif[2] = (bs->shootGoal->r.absmax[2]+bs->shootGoal->r.absmin[2])/2; + + if (!trap_InPVS(bs->origin, dif)) + { + bs->shootGoal = NULL; + } + else + { + trap_Trace(&tr, bs->origin, NULL, NULL, dif, bs->client, MASK_SOLID); + + if (tr.fraction != 1 && tr.entityNum != bs->shootGoal->s.number) + { + bs->shootGoal = NULL; + } + } + } + } + else + { //get busy! + Saga_TargetClosestObjective(bs, flagForAttackableObjective); + if (bs->shootGoal) + { + dif[0] = (bs->shootGoal->r.absmax[0]+bs->shootGoal->r.absmin[0])/2; + dif[1] = (bs->shootGoal->r.absmax[1]+bs->shootGoal->r.absmin[1])/2; + dif[2] = (bs->shootGoal->r.absmax[2]+bs->shootGoal->r.absmin[2])/2; + + if (!trap_InPVS(bs->origin, dif)) + { + bs->shootGoal = NULL; + } + else + { + trap_Trace(&tr, bs->origin, NULL, NULL, dif, bs->client, MASK_SOLID); + + if (tr.fraction != 1 && tr.entityNum != bs->shootGoal->s.number) + { + bs->shootGoal = NULL; + } + } + } + } + + if (dosw) + { //allow saga objective code to run, but if after a particular item then keep going after it + bs->wpDestination = dest_sw; + } + + return 1; +} + +int JMTakesPriority(bot_state_t *bs) +{ + int i = 0; + int wpClose = -1; + gentity_t *theImportantEntity = NULL; + + if (g_gametype.integer != GT_JEDIMASTER) + { + return 0; + } + + if (bs->cur_ps.isJediMaster) + { + return 0; + } + + //jmState becomes the index for the one who carries the saber. If jmState is -1 then the saber is currently + //without an owner + bs->jmState = -1; + + while (i < MAX_CLIENTS) + { + if (g_entities[i].client && g_entities[i].inuse && + g_entities[i].client->ps.isJediMaster) + { + bs->jmState = i; + break; + } + + i++; + } + + if (bs->jmState != -1) + { + theImportantEntity = &g_entities[bs->jmState]; + } + else + { + theImportantEntity = gJMSaberEnt; + } + + if (theImportantEntity && theImportantEntity->inuse && bs->destinationGrabTime < level.time) + { + if (theImportantEntity->client) + { + wpClose = GetNearestVisibleWP(theImportantEntity->client->ps.origin, theImportantEntity->s.number); + } + else + { + wpClose = GetNearestVisibleWP(theImportantEntity->r.currentOrigin, theImportantEntity->s.number); + } + + if (wpClose != -1 && gWPArray[wpClose] && gWPArray[wpClose]->inuse) + { + /* + Com_Printf("BOT GRABBED IDEAL JM LOCATION\n"); + if (bs->wpDestination != gWPArray[wpClose]) + { + Com_Printf("IDEAL WAS NOT ALREADY IDEAL\n"); + + if (!bs->wpDestination) + { + Com_Printf("IDEAL WAS NULL\n"); + } + } + */ + bs->wpDestination = gWPArray[wpClose]; + bs->destinationGrabTime = level.time + 4000; + } + } + + return 1; +} + +int BotHasAssociated(bot_state_t *bs, wpobject_t *wp) +{ + gentity_t *as; + + if (wp->associated_entity == ENTITYNUM_NONE) + { //make it think this is an item we have so we don't go after nothing + return 1; + } + + as = &g_entities[wp->associated_entity]; + + if (!as || !as->item) + { + return 0; + } + + if (as->item->giType == IT_WEAPON) + { + if (bs->cur_ps.stats[STAT_WEAPONS] & (1 << as->item->giTag)) + { + return 1; + } + + return 0; + } + else if (as->item->giType == IT_HOLDABLE) + { + if (bs->cur_ps.stats[STAT_HOLDABLE_ITEMS] & (1 << as->item->giTag)) + { + return 1; + } + + return 0; + } + else if (as->item->giType == IT_POWERUP) + { + if (bs->cur_ps.powerups[as->item->giTag]) + { + return 1; + } + + return 0; + } + else if (as->item->giType == IT_AMMO) + { + if (bs->cur_ps.ammo[as->item->giTag] > 10) //hack + { + return 1; + } + + return 0; + } + + return 0; +} + +int GetBestIdleGoal(bot_state_t *bs) +{ + int i = 0; + int highestweight = 0; + int desiredindex = -1; + int dist_to_weight = 0; + int traildist; + + if (!bs->wpCurrent) + { + return -1; + } + + if (bs->isCamper != 2) + { + if (bs->randomNavTime < level.time) + { + if (Q_irand(1, 10) < 5) + { + bs->randomNav = 1; + } + else + { + bs->randomNav = 0; + } + + bs->randomNavTime = level.time + Q_irand(5000, 15000); + } + } + + if (bs->randomNav) + { //stop looking for items and/or camping on them + return -1; + } + + while (i < gWPNum) + { + if (gWPArray[i] && + gWPArray[i]->inuse && + (gWPArray[i]->flags & WPFLAG_GOALPOINT) && + gWPArray[i]->weight > highestweight && + !BotHasAssociated(bs, gWPArray[i])) + { + traildist = TotalTrailDistance(bs->wpCurrent->index, i, bs); + + if (traildist != -1) + { + dist_to_weight = (int)traildist/10000; + dist_to_weight = (gWPArray[i]->weight)-dist_to_weight; + + if (dist_to_weight > highestweight) + { + highestweight = dist_to_weight; + desiredindex = i; + } + } + } + + i++; + } + + return desiredindex; +} + +void GetIdealDestination(bot_state_t *bs) +{ + int tempInt, cWPIndex, bChicken, idleWP; + float distChange, plusLen, minusLen; + vec3_t usethisvec, a; + gentity_t *badthing; + +#ifdef _DEBUG + trap_Cvar_Update(&bot_nogoals); + + if (bot_nogoals.integer) + { + return; + } +#endif + + if (!bs->wpCurrent) + { + return; + } + + if ((level.time - bs->escapeDirTime) > 4000) + { + badthing = GetNearestBadThing(bs); + } + else + { + badthing = NULL; + } + + if (badthing && badthing->inuse && + badthing->health > 0 && badthing->takedamage) + { + bs->dangerousObject = badthing; + } + else + { + bs->dangerousObject = NULL; + } + + if (!badthing && bs->wpDestIgnoreTime > level.time) + { + return; + } + + if (!badthing && bs->dontGoBack > level.time) + { + if (bs->wpDestination) + { + bs->wpStoreDest = bs->wpDestination; + } + bs->wpDestination = NULL; + return; + } + else if (!badthing && bs->wpStoreDest) + { //after we finish running away, switch back to our original destination + bs->wpDestination = bs->wpStoreDest; + bs->wpStoreDest = NULL; + } + + if (badthing && bs->wpCamping) + { + bs->wpCamping = NULL; + } + + if (bs->wpCamping) + { + bs->wpDestination = bs->wpCamping; + return; + } + + if (!badthing && CTFTakesPriority(bs)) + { + if (bs->ctfState) + { + bs->runningToEscapeThreat = 1; + } + return; + } + else if (!badthing && SagaTakesPriority(bs)) + { + if (bs->sagaState) + { + bs->runningToEscapeThreat = 1; + } + return; + } + else if (!badthing && JMTakesPriority(bs)) + { + bs->runningToEscapeThreat = 1; + } + + if (badthing) + { + bs->runningLikeASissy = level.time + 100; + + if (bs->wpDestination) + { + bs->wpStoreDest = bs->wpDestination; + } + bs->wpDestination = NULL; + + if (bs->wpDirection) + { + tempInt = bs->wpCurrent->index+1; + } + else + { + tempInt = bs->wpCurrent->index-1; + } + + if (gWPArray[tempInt] && gWPArray[tempInt]->inuse && bs->escapeDirTime < level.time) + { + VectorSubtract(badthing->s.pos.trBase, bs->wpCurrent->origin, a); + plusLen = VectorLength(a); + VectorSubtract(badthing->s.pos.trBase, gWPArray[tempInt]->origin, a); + minusLen = VectorLength(a); + + if (plusLen < minusLen) + { + if (bs->wpDirection) + { + bs->wpDirection = 0; + } + else + { + bs->wpDirection = 1; + } + + bs->wpCurrent = gWPArray[tempInt]; + + bs->escapeDirTime = level.time + Q_irand(500, 1000);//Q_irand(1000, 1400); + + //G_Printf("Escaping from scary bad thing [%s]\n", badthing->classname); + } + } + //G_Printf("Run away run away run away!\n"); + return; + } + + distChange = 0; //keep the compiler from complaining + + tempInt = BotGetWeaponRange(bs); + + if (tempInt == BWEAPONRANGE_MELEE) + { + distChange = 1; + } + else if (tempInt == BWEAPONRANGE_SABER) + { + distChange = 1; + } + else if (tempInt == BWEAPONRANGE_MID) + { + distChange = 128; + } + else if (tempInt == BWEAPONRANGE_LONG) + { + distChange = 300; + } + + if (bs->revengeEnemy && bs->revengeEnemy->health > 0 && + bs->revengeEnemy->client && (bs->revengeEnemy->client->pers.connected == CA_ACTIVE || bs->revengeEnemy->client->pers.connected == CA_AUTHORIZING)) + { //if we hate someone, always try to get to them + if (bs->wpDestSwitchTime < level.time) + { + if (bs->revengeEnemy->client) + { + VectorCopy(bs->revengeEnemy->client->ps.origin, usethisvec); + } + else + { + VectorCopy(bs->revengeEnemy->s.origin, usethisvec); + } + + tempInt = GetNearestVisibleWP(usethisvec, 0); + + if (tempInt != -1 && TotalTrailDistance(bs->wpCurrent->index, tempInt, bs) != -1) + { + bs->wpDestination = gWPArray[tempInt]; + bs->wpDestSwitchTime = level.time + Q_irand(5000, 10000); + } + } + } + else if (bs->squadLeader && bs->squadLeader->health > 0 && + bs->squadLeader->client && (bs->squadLeader->client->pers.connected == CA_ACTIVE || bs->squadLeader->client->pers.connected == CA_AUTHORIZING)) + { + if (bs->wpDestSwitchTime < level.time) + { + if (bs->squadLeader->client) + { + VectorCopy(bs->squadLeader->client->ps.origin, usethisvec); + } + else + { + VectorCopy(bs->squadLeader->s.origin, usethisvec); + } + + tempInt = GetNearestVisibleWP(usethisvec, 0); + + if (tempInt != -1 && TotalTrailDistance(bs->wpCurrent->index, tempInt, bs) != -1) + { + bs->wpDestination = gWPArray[tempInt]; + bs->wpDestSwitchTime = level.time + Q_irand(5000, 10000); + } + } + } + else if (bs->currentEnemy) + { + if (bs->currentEnemy->client) + { + VectorCopy(bs->currentEnemy->client->ps.origin, usethisvec); + } + else + { + VectorCopy(bs->currentEnemy->s.origin, usethisvec); + } + + bChicken = BotIsAChickenWuss(bs); + bs->runningToEscapeThreat = bChicken; + + if (bs->frame_Enemy_Len < distChange || (bChicken && bChicken != 2)) + { + cWPIndex = bs->wpCurrent->index; + + if (bs->frame_Enemy_Len > 400) + { //good distance away, start running toward a good place for an item or powerup or whatever + idleWP = GetBestIdleGoal(bs); + + if (idleWP != -1 && gWPArray[idleWP] && gWPArray[idleWP]->inuse) + { + bs->wpDestination = gWPArray[idleWP]; + } + } + else if (gWPArray[cWPIndex-1] && gWPArray[cWPIndex-1]->inuse && + gWPArray[cWPIndex+1] && gWPArray[cWPIndex+1]->inuse) + { + VectorSubtract(gWPArray[cWPIndex+1]->origin, usethisvec, a); + plusLen = VectorLength(a); + VectorSubtract(gWPArray[cWPIndex-1]->origin, usethisvec, a); + minusLen = VectorLength(a); + + if (minusLen > plusLen) + { + bs->wpDestination = gWPArray[cWPIndex-1]; + } + else + { + bs->wpDestination = gWPArray[cWPIndex+1]; + } + } + } + else if (bChicken != 2 && bs->wpDestSwitchTime < level.time) + { + tempInt = GetNearestVisibleWP(usethisvec, 0); + + if (tempInt != -1 && TotalTrailDistance(bs->wpCurrent->index, tempInt, bs) != -1) + { + bs->wpDestination = gWPArray[tempInt]; + + if (g_gametype.integer == GT_SINGLE_PLAYER) + { //be more aggressive + bs->wpDestSwitchTime = level.time + Q_irand(300, 1000); + } + else + { + bs->wpDestSwitchTime = level.time + Q_irand(1000, 5000); + } + } + } + } + + if (!bs->wpDestination && bs->wpDestSwitchTime < level.time) + { + //G_Printf("I need something to do\n"); + idleWP = GetBestIdleGoal(bs); + + if (idleWP != -1 && gWPArray[idleWP] && gWPArray[idleWP]->inuse) + { + bs->wpDestination = gWPArray[idleWP]; + } + } +} + +void CommanderBotCTFAI(bot_state_t *bs) +{ + int i = 0; + gentity_t *ent; + int squadmates = 0; + gentity_t *squad[MAX_CLIENTS]; + int defendAttackPriority = 0; //0 == attack, 1 == defend + int guardDefendPriority = 0; //0 == defend, 1 == guard + int attackRetrievePriority = 0; //0 == retrieve, 1 == attack + int myFlag = 0; + int enemyFlag = 0; + int enemyHasOurFlag = 0; + int weHaveEnemyFlag = 0; + int numOnMyTeam = 0; + int numOnEnemyTeam = 0; + int numAttackers = 0; + int numDefenders = 0; + + if (level.clients[bs->client].sess.sessionTeam == TEAM_RED) + { + myFlag = PW_REDFLAG; + } + else + { + myFlag = PW_BLUEFLAG; + } + + if (level.clients[bs->client].sess.sessionTeam == TEAM_RED) + { + enemyFlag = PW_BLUEFLAG; + } + else + { + enemyFlag = PW_REDFLAG; + } + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + + if (ent && ent->client) + { + if (ent->client->ps.powerups[enemyFlag] && OnSameTeam(&g_entities[bs->client], ent)) + { + weHaveEnemyFlag = 1; + } + else if (ent->client->ps.powerups[myFlag] && !OnSameTeam(&g_entities[bs->client], ent)) + { + enemyHasOurFlag = 1; + } + + if (OnSameTeam(&g_entities[bs->client], ent)) + { + numOnMyTeam++; + } + else + { + numOnEnemyTeam++; + } + + if (botstates[ent->s.number]) + { + if (botstates[ent->s.number]->ctfState == CTFSTATE_ATTACKER || + botstates[ent->s.number]->ctfState == CTFSTATE_RETRIEVAL) + { + numAttackers++; + } + else + { + numDefenders++; + } + } + else + { //assume real players to be attackers in our logic + numAttackers++; + } + } + i++; + } + + i = 0; + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + + if (ent && ent->client && botstates[i] && botstates[i]->squadLeader && botstates[i]->squadLeader->s.number == bs->client && i != bs->client) + { + squad[squadmates] = ent; + squadmates++; + } + + i++; + } + + squad[squadmates] = &g_entities[bs->client]; + squadmates++; + + i = 0; + + if (enemyHasOurFlag && !weHaveEnemyFlag) + { //start off with an attacker instead of a retriever if we don't have the enemy flag yet so that they can't capture it first. + //after that we focus on getting our flag back. + attackRetrievePriority = 1; + } + + while (i < squadmates) + { + if (squad[i] && squad[i]->client && botstates[squad[i]->s.number]) + { + if (botstates[squad[i]->s.number]->ctfState != CTFSTATE_GETFLAGHOME) + { //never tell a bot to stop trying to bring the flag to the base + if (defendAttackPriority) + { + if (weHaveEnemyFlag) + { + if (guardDefendPriority) + { + botstates[squad[i]->s.number]->ctfState = CTFSTATE_GUARDCARRIER; + guardDefendPriority = 0; + } + else + { + botstates[squad[i]->s.number]->ctfState = CTFSTATE_DEFENDER; + guardDefendPriority = 1; + } + } + else + { + botstates[squad[i]->s.number]->ctfState = CTFSTATE_DEFENDER; + } + defendAttackPriority = 0; + } + else + { + if (enemyHasOurFlag) + { + if (attackRetrievePriority) + { + botstates[squad[i]->s.number]->ctfState = CTFSTATE_ATTACKER; + attackRetrievePriority = 0; + } + else + { + botstates[squad[i]->s.number]->ctfState = CTFSTATE_RETRIEVAL; + attackRetrievePriority = 1; + } + } + else + { + botstates[squad[i]->s.number]->ctfState = CTFSTATE_ATTACKER; + } + defendAttackPriority = 1; + } + } + else if ((numOnMyTeam < 2 || !numAttackers) && enemyHasOurFlag) + { //I'm the only one on my team who will attack and the enemy has my flag, I have to go after him + botstates[squad[i]->s.number]->ctfState = CTFSTATE_RETRIEVAL; + } + } + + i++; + } +} + +void CommanderBotSagaAI(bot_state_t *bs) +{ + int i = 0; + int squadmates = 0; + int commanded = 0; + int teammates = 0; + gentity_t *squad[MAX_CLIENTS]; + gentity_t *ent; + bot_state_t *bst; + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + + if (ent && ent->client && OnSameTeam(&g_entities[bs->client], ent) && botstates[ent->s.number]) + { + bst = botstates[ent->s.number]; + + if (bst && !bst->isSquadLeader && !bst->state_Forced) + { + squad[squadmates] = ent; + squadmates++; + } + else if (bst && !bst->isSquadLeader && bst->state_Forced) + { //count them as commanded + commanded++; + } + } + + if (ent && ent->client && OnSameTeam(&g_entities[bs->client], ent)) + { + teammates++; + } + + i++; + } + + if (!squadmates) + { + return; + } + + //tell squad mates to do what I'm doing, up to half of team, let the other half make their own decisions + i = 0; + + while (i < squadmates && squad[i]) + { + bst = botstates[squad[i]->s.number]; + + if (commanded > teammates/2) + { + break; + } + + if (bst) + { + bst->state_Forced = bs->sagaState; + bst->sagaState = bs->sagaState; + commanded++; + } + + i++; + } +} + +void BotDoTeamplayAI(bot_state_t *bs) +{ + if (bs->state_Forced) + { + bs->teamplayState = bs->state_Forced; + } + + if (bs->teamplayState == TEAMPLAYSTATE_REGROUP) + { //force to find a new leader + bs->squadLeader = NULL; + bs->isSquadLeader = 0; + } +} + +void CommanderBotTeamplayAI(bot_state_t *bs) +{ + int i = 0; + int squadmates = 0; + int teammates = 0; + int teammate_indanger = -1; + int teammate_helped = 0; + int foundsquadleader = 0; + int worsthealth = 50; + gentity_t *squad[MAX_CLIENTS]; + gentity_t *ent; + bot_state_t *bst; + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + + if (ent && ent->client && OnSameTeam(&g_entities[bs->client], ent) && botstates[ent->s.number]) + { + bst = botstates[ent->s.number]; + + if (foundsquadleader && bst && bst->isSquadLeader) + { //never more than one squad leader + bst->isSquadLeader = 0; + } + + if (bst && !bst->isSquadLeader) + { + squad[squadmates] = ent; + squadmates++; + } + else if (bst) + { + foundsquadleader = 1; + } + } + + if (ent && ent->client && OnSameTeam(&g_entities[bs->client], ent)) + { + teammates++; + + if (ent->health < worsthealth) + { + teammate_indanger = ent->s.number; + worsthealth = ent->health; + } + } + + i++; + } + + if (!squadmates) + { + return; + } + + i = 0; + + while (i < squadmates && squad[i]) + { + bst = botstates[squad[i]->s.number]; + + if (bst && !bst->state_Forced) + { //only order if this guy is not being ordered directly by the real player team leader + if (teammate_indanger >= 0 && !teammate_helped) + { //send someone out to help whoever needs help most at the moment + bst->teamplayState = TEAMPLAYSTATE_ASSISTING; + bst->squadLeader = &g_entities[teammate_indanger]; + teammate_helped = 1; + } + else if ((teammate_indanger == -1 || teammate_helped) && bst->teamplayState == TEAMPLAYSTATE_ASSISTING) + { //no teammates need help badly, but this guy is trying to help them anyway, so stop + bst->teamplayState = TEAMPLAYSTATE_FOLLOWING; + bst->squadLeader = &g_entities[bs->client]; + } + + if (bs->squadRegroupInterval < level.time && Q_irand(1, 10) < 5) + { //every so often tell the squad to regroup for the sake of variation + if (bst->teamplayState == TEAMPLAYSTATE_FOLLOWING) + { + bst->teamplayState = TEAMPLAYSTATE_REGROUP; + } + + bs->isSquadLeader = 0; + bs->squadCannotLead = level.time + 500; + bs->squadRegroupInterval = level.time + Q_irand(45000, 65000); + } + } + + i++; + } +} + +void CommanderBotAI(bot_state_t *bs) +{ + if (g_gametype.integer == GT_CTF || g_gametype.integer == GT_CTY) + { + CommanderBotCTFAI(bs); + } + else if (g_gametype.integer == GT_SAGA) + { + CommanderBotSagaAI(bs); + } + else if (g_gametype.integer == GT_TEAM) + { + CommanderBotTeamplayAI(bs); + } +} + +void MeleeCombatHandling(bot_state_t *bs) +{ + vec3_t usethisvec; + vec3_t downvec; + vec3_t midorg; + vec3_t a; + vec3_t fwd; + vec3_t mins, maxs; + trace_t tr; + int en_down; + int me_down; + int mid_down; + + if (!bs->currentEnemy) + { + return; + } + + if (bs->currentEnemy->client) + { + VectorCopy(bs->currentEnemy->client->ps.origin, usethisvec); + } + else + { + VectorCopy(bs->currentEnemy->s.origin, usethisvec); + } + + if (bs->meleeStrafeTime < level.time) + { + if (bs->meleeStrafeDir) + { + bs->meleeStrafeDir = 0; + } + else + { + bs->meleeStrafeDir = 1; + } + + bs->meleeStrafeTime = level.time + Q_irand(500, 1800); + } + + mins[0] = -15; + mins[1] = -15; + mins[2] = -24; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 32; + + VectorCopy(usethisvec, downvec); + downvec[2] -= 4096; + + trap_Trace(&tr, usethisvec, mins, maxs, downvec, -1, MASK_SOLID); + + en_down = (int)tr.endpos[2]; + + VectorCopy(bs->origin, downvec); + downvec[2] -= 4096; + + trap_Trace(&tr, bs->origin, mins, maxs, downvec, -1, MASK_SOLID); + + me_down = (int)tr.endpos[2]; + + VectorSubtract(usethisvec, bs->origin, a); + vectoangles(a, a); + AngleVectors(a, fwd, NULL, NULL); + + midorg[0] = bs->origin[0] + fwd[0]*bs->frame_Enemy_Len/2; + midorg[1] = bs->origin[1] + fwd[1]*bs->frame_Enemy_Len/2; + midorg[2] = bs->origin[2] + fwd[2]*bs->frame_Enemy_Len/2; + + VectorCopy(midorg, downvec); + downvec[2] -= 4096; + + trap_Trace(&tr, midorg, mins, maxs, downvec, -1, MASK_SOLID); + + mid_down = (int)tr.endpos[2]; + + if (me_down == en_down && + en_down == mid_down) + { + VectorCopy(usethisvec, bs->goalPosition); + } +} + +void SaberCombatHandling(bot_state_t *bs) +{ + vec3_t usethisvec; + vec3_t downvec; + vec3_t midorg; + vec3_t a; + vec3_t fwd; + vec3_t mins, maxs; + trace_t tr; + int en_down; + int me_down; + int mid_down; + + if (!bs->currentEnemy) + { + return; + } + + if (bs->currentEnemy->client) + { + VectorCopy(bs->currentEnemy->client->ps.origin, usethisvec); + } + else + { + VectorCopy(bs->currentEnemy->s.origin, usethisvec); + } + + if (bs->meleeStrafeTime < level.time) + { + if (bs->meleeStrafeDir) + { + bs->meleeStrafeDir = 0; + } + else + { + bs->meleeStrafeDir = 1; + } + + bs->meleeStrafeTime = level.time + Q_irand(500, 1800); + } + + mins[0] = -15; + mins[1] = -15; + mins[2] = -24; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 32; + + VectorCopy(usethisvec, downvec); + downvec[2] -= 4096; + + trap_Trace(&tr, usethisvec, mins, maxs, downvec, -1, MASK_SOLID); + + en_down = (int)tr.endpos[2]; + + if (tr.startsolid || tr.allsolid) + { + en_down = 1; + me_down = 2; + } + else + { + VectorCopy(bs->origin, downvec); + downvec[2] -= 4096; + + trap_Trace(&tr, bs->origin, mins, maxs, downvec, -1, MASK_SOLID); + + me_down = (int)tr.endpos[2]; + + if (tr.startsolid || tr.allsolid) + { + en_down = 1; + me_down = 2; + } + } + + VectorSubtract(usethisvec, bs->origin, a); + vectoangles(a, a); + AngleVectors(a, fwd, NULL, NULL); + + midorg[0] = bs->origin[0] + fwd[0]*bs->frame_Enemy_Len/2; + midorg[1] = bs->origin[1] + fwd[1]*bs->frame_Enemy_Len/2; + midorg[2] = bs->origin[2] + fwd[2]*bs->frame_Enemy_Len/2; + + VectorCopy(midorg, downvec); + downvec[2] -= 4096; + + trap_Trace(&tr, midorg, mins, maxs, downvec, -1, MASK_SOLID); + + mid_down = (int)tr.endpos[2]; + + if (me_down == en_down && + en_down == mid_down) + { + if (usethisvec[2] > (bs->origin[2]+32) && + bs->currentEnemy->client && + bs->currentEnemy->client->ps.groundEntityNum == ENTITYNUM_NONE) + { + bs->jumpTime = level.time + 100; + } + + if (bs->frame_Enemy_Len > 128) + { //be ready to attack + bs->saberDefending = 0; + bs->saberDefendDecideTime = level.time + Q_irand(1000, 2000); + } + else + { + if (bs->saberDefendDecideTime < level.time) + { + if (bs->saberDefending) + { + bs->saberDefending = 0; + } + else + { + bs->saberDefending = 1; + } + + bs->saberDefendDecideTime = level.time + Q_irand(500, 2000); + } + } + + if (bs->frame_Enemy_Len < 54) + { + VectorCopy(bs->origin, bs->goalPosition); + bs->saberBFTime = 0; + } + else + { + VectorCopy(usethisvec, bs->goalPosition); + } + + if (bs->frame_Enemy_Len > 90 && bs->saberBFTime > level.time && bs->saberBTime > level.time && bs->beStill < level.time && bs->saberSTime < level.time) + { + bs->beStill = level.time + Q_irand(500, 1000); + bs->saberSTime = level.time + Q_irand(1200, 1800); + } + else if (bs->currentEnemy->client->ps.weapon == WP_SABER && bs->frame_Enemy_Len < 80 && (Q_irand(1, 10) < 8 && bs->saberBFTime < level.time) || bs->saberBTime > level.time) + { + vec3_t vs; + vec3_t groundcheck; + + VectorSubtract(bs->origin, usethisvec, vs); + VectorNormalize(vs); + + bs->goalPosition[0] = bs->origin[0] + vs[0]*64; + bs->goalPosition[1] = bs->origin[1] + vs[1]*64; + bs->goalPosition[2] = bs->origin[2] + vs[2]*64; + + if (bs->saberBTime < level.time) + { + bs->saberBFTime = level.time + Q_irand(900, 1300); + bs->saberBTime = level.time + Q_irand(300, 700); + } + + VectorCopy(bs->goalPosition, groundcheck); + + groundcheck[2] -= 64; + + trap_Trace(&tr, bs->goalPosition, NULL, NULL, groundcheck, bs->client, MASK_SOLID); + + if (tr.fraction == 1.0) + { //don't back off of a ledge + VectorCopy(usethisvec, bs->goalPosition); + } + } + else if (bs->currentEnemy->client->ps.weapon == WP_SABER && bs->frame_Enemy_Len >= 75) + { + bs->saberBFTime = level.time + Q_irand(700, 1300); + bs->saberBTime = 0; + } + + /*AngleVectors(bs->viewangles, NULL, fwd, NULL); + + if (bs->meleeStrafeDir) + { + bs->goalPosition[0] += fwd[0]*16; + bs->goalPosition[1] += fwd[1]*16; + bs->goalPosition[2] += fwd[2]*16; + } + else + { + bs->goalPosition[0] -= fwd[0]*16; + bs->goalPosition[1] -= fwd[1]*16; + bs->goalPosition[2] -= fwd[2]*16; + }*/ + } + else if (bs->frame_Enemy_Len <= 56) + { + bs->doAttack = 1; + bs->saberDefending = 0; + } +} + +float BotWeaponCanLead(bot_state_t *bs) +{ + int weap = bs->cur_ps.weapon; + + if (weap == WP_BRYAR_PISTOL) + { + return 0.5; + } + if (weap == WP_BLASTER) + { + return 0.35; + } + if (weap == WP_BOWCASTER) + { + return 0.5; + } + if (weap == WP_REPEATER) + { + return 0.45; + } + if (weap == WP_THERMAL) + { + return 0.5; + } + if (weap == WP_DEMP2) + { + return 0.35; + } + if (weap == WP_ROCKET_LAUNCHER) + { + return 0.7; + } + + return 0; +} + +void BotAimLeading(bot_state_t *bs, vec3_t headlevel, float leadAmount) +{ + int x; + vec3_t predictedSpot; + vec3_t movementVector; + vec3_t a, ang; + float vtotal; + + if (!bs->currentEnemy || + !bs->currentEnemy->client) + { + return; + } + + if (!bs->frame_Enemy_Len) + { + return; + } + + vtotal = 0; + + if (bs->currentEnemy->client->ps.velocity[0] < 0) + { + vtotal += -bs->currentEnemy->client->ps.velocity[0]; + } + else + { + vtotal += bs->currentEnemy->client->ps.velocity[0]; + } + + if (bs->currentEnemy->client->ps.velocity[1] < 0) + { + vtotal += -bs->currentEnemy->client->ps.velocity[1]; + } + else + { + vtotal += bs->currentEnemy->client->ps.velocity[1]; + } + + if (bs->currentEnemy->client->ps.velocity[2] < 0) + { + vtotal += -bs->currentEnemy->client->ps.velocity[2]; + } + else + { + vtotal += bs->currentEnemy->client->ps.velocity[2]; + } + + //G_Printf("Leadin target with a velocity total of %f\n", vtotal); + + VectorCopy(bs->currentEnemy->client->ps.velocity, movementVector); + + VectorNormalize(movementVector); + + x = bs->frame_Enemy_Len*leadAmount; //hardly calculated with an exact science, but it works + + if (vtotal > 400) + { + vtotal = 400; + } + + if (vtotal) + { + x = (bs->frame_Enemy_Len*0.9)*leadAmount*(vtotal*0.0012); //hardly calculated with an exact science, but it works + } + else + { + x = (bs->frame_Enemy_Len*0.9)*leadAmount; //hardly calculated with an exact science, but it works + } + + predictedSpot[0] = headlevel[0] + (movementVector[0]*x); + predictedSpot[1] = headlevel[1] + (movementVector[1]*x); + predictedSpot[2] = headlevel[2] + (movementVector[2]*x); + + VectorSubtract(predictedSpot, bs->eye, a); + vectoangles(a, ang); + VectorCopy(ang, bs->goalAngles); +} + +void BotAimOffsetGoalAngles(bot_state_t *bs) +{ + int i; + float accVal; + i = 0; + + if (bs->skills.perfectaim) + { + return; + } + + if (bs->aimOffsetTime > level.time) + { + if (bs->aimOffsetAmtYaw) + { + bs->goalAngles[YAW] += bs->aimOffsetAmtYaw; + } + + if (bs->aimOffsetAmtPitch) + { + bs->goalAngles[PITCH] += bs->aimOffsetAmtPitch; + } + + while (i <= 2) + { + if (bs->goalAngles[i] > 360) + { + bs->goalAngles[i] -= 360; + } + + if (bs->goalAngles[i] < 0) + { + bs->goalAngles[i] += 360; + } + + i++; + } + return; + } + + accVal = bs->skills.accuracy/bs->settings.skill; + + if (bs->currentEnemy && BotMindTricked(bs->client, bs->currentEnemy->s.number)) + { //having to judge where they are by hearing them, so we should be quite inaccurate here + accVal *= 7; + + if (accVal < 30) + { + accVal = 30; + } + } + + if (bs->revengeEnemy && bs->revengeHateLevel && + bs->currentEnemy == bs->revengeEnemy) + { //bot becomes more skilled as anger level raises + accVal = accVal/bs->revengeHateLevel; + } + + if (bs->currentEnemy && bs->frame_Enemy_Vis) + { //assume our goal is aiming at the enemy, seeing as he's visible and all + if (!bs->currentEnemy->s.pos.trDelta[0] && + !bs->currentEnemy->s.pos.trDelta[1] && + !bs->currentEnemy->s.pos.trDelta[2]) + { + accVal = 0; //he's not even moving, so he shouldn't really be hard to hit. + } + else + { + accVal += accVal*0.25; //if he's moving he's this much harder to hit + } + + if (g_entities[bs->client].s.pos.trDelta[0] || + g_entities[bs->client].s.pos.trDelta[1] || + g_entities[bs->client].s.pos.trDelta[2]) + { + accVal += accVal*0.15; //make it somewhat harder to aim if we're moving also + } + } + + if (accVal > 90) + { + accVal = 90; + } + if (accVal < 1) + { + accVal = 0; + } + + if (!accVal) + { + bs->aimOffsetAmtYaw = 0; + bs->aimOffsetAmtPitch = 0; + return; + } + + if (rand()%10 <= 5) + { + bs->aimOffsetAmtYaw = rand()%(int)accVal; + } + else + { + bs->aimOffsetAmtYaw = -(rand()%(int)accVal); + } + + if (rand()%10 <= 5) + { + bs->aimOffsetAmtPitch = rand()%(int)accVal; + } + else + { + bs->aimOffsetAmtPitch = -(rand()%(int)accVal); + } + + bs->aimOffsetTime = level.time + rand()%500 + 200; +} + +int ShouldSecondaryFire(bot_state_t *bs) +{ + int weap; + int dif; + float rTime; + + weap = bs->cur_ps.weapon; + + if (bs->cur_ps.ammo[weaponData[weap].ammoIndex] < weaponData[weap].altEnergyPerShot) + { + return 0; + } + + if (bs->cur_ps.weaponstate == WEAPON_CHARGING_ALT && bs->cur_ps.weapon == WP_ROCKET_LAUNCHER) + { + float heldTime = (level.time - bs->cur_ps.weaponChargeTime); + + rTime = bs->cur_ps.rocketLockTime; + + if (rTime < 1) + { + rTime = bs->cur_ps.rocketLastValidTime; + } + + if (heldTime > 5000) + { //just give up and release it if we can't manage a lock in 5 seconds + return 2; + } + + if (rTime > 0) + { + dif = ( level.time - rTime ) / ( 1200.0f / 16.0f ); + + if (dif >= 10) + { + return 2; + } + else if (bs->frame_Enemy_Len > 250) + { + return 1; + } + } + else if (bs->frame_Enemy_Len > 250) + { + return 1; + } + } + else if ((bs->cur_ps.weaponstate == WEAPON_CHARGING_ALT) && (level.time - bs->cur_ps.weaponChargeTime) > bs->altChargeTime) + { + return 2; + } + else if (bs->cur_ps.weaponstate == WEAPON_CHARGING_ALT) + { + return 1; + } + + if (weap == WP_BRYAR_PISTOL && bs->frame_Enemy_Len < 300) + { + return 1; + } + else if (weap == WP_BOWCASTER && bs->frame_Enemy_Len > 300) + { + return 1; + } + else if (weap == WP_REPEATER && bs->frame_Enemy_Len < 600 && bs->frame_Enemy_Len > 250) + { + return 1; + } + else if (weap == WP_BLASTER && bs->frame_Enemy_Len < 300) + { + return 1; + } + else if (weap == WP_ROCKET_LAUNCHER && bs->frame_Enemy_Len > 250) + { + return 1; + } + + return 0; +} + +int CombatBotAI(bot_state_t *bs, float thinktime) +{ + vec3_t eorg, a; + int secFire; + float fovcheck; + + if (!bs->currentEnemy) + { + return 0; + } + + if (bs->currentEnemy->client) + { + VectorCopy(bs->currentEnemy->client->ps.origin, eorg); + } + else + { + VectorCopy(bs->currentEnemy->s.origin, eorg); + } + + VectorSubtract(eorg, bs->eye, a); + vectoangles(a, a); + + if (BotGetWeaponRange(bs) == BWEAPONRANGE_SABER) + { + if (bs->frame_Enemy_Len <= SABER_ATTACK_RANGE) + { + bs->doAttack = 1; + } + } + else if (BotGetWeaponRange(bs) == BWEAPONRANGE_MELEE) + { + if (bs->frame_Enemy_Len <= MELEE_ATTACK_RANGE) + { + bs->doAttack = 1; + } + } + else + { + if (bs->cur_ps.weapon == WP_THERMAL || bs->cur_ps.weapon == WP_ROCKET_LAUNCHER) + { //be careful with the hurty weapons + fovcheck = 40; + + if (bs->cur_ps.weaponstate == WEAPON_CHARGING_ALT && + bs->cur_ps.weapon == WP_ROCKET_LAUNCHER) + { //if we're charging the weapon up then we can hold fire down within a normal fov + fovcheck = 60; + } + } + else + { + fovcheck = 60; + } + + if (bs->cur_ps.weaponstate == WEAPON_CHARGING || + bs->cur_ps.weaponstate == WEAPON_CHARGING_ALT) + { + fovcheck = 160; + } + + if (bs->frame_Enemy_Len < 128) + { + fovcheck *= 2; + } + + if (InFieldOfVision(bs->viewangles, fovcheck, a)) + { + if (bs->cur_ps.weapon == WP_THERMAL) + { + if (((level.time - bs->cur_ps.weaponChargeTime) < (bs->frame_Enemy_Len*2) && + (level.time - bs->cur_ps.weaponChargeTime) < 4000 && + bs->frame_Enemy_Len > 64) || + (bs->cur_ps.weaponstate != WEAPON_CHARGING && + bs->cur_ps.weaponstate != WEAPON_CHARGING_ALT)) + { + if (bs->cur_ps.weaponstate != WEAPON_CHARGING && bs->cur_ps.weaponstate != WEAPON_CHARGING_ALT) + { + if (bs->frame_Enemy_Len > 512 && bs->frame_Enemy_Len < 800) + { + bs->doAltAttack = 1; + //bs->doAttack = 1; + } + else + { + bs->doAttack = 1; + //bs->doAltAttack = 1; + } + } + + if (bs->cur_ps.weaponstate == WEAPON_CHARGING) + { + bs->doAttack = 1; + } + else if (bs->cur_ps.weaponstate == WEAPON_CHARGING_ALT) + { + bs->doAltAttack = 1; + } + } + } + else + { + secFire = ShouldSecondaryFire(bs); + + if (bs->cur_ps.weaponstate != WEAPON_CHARGING_ALT && + bs->cur_ps.weaponstate != WEAPON_CHARGING) + { + bs->altChargeTime = Q_irand(500, 1000); + } + + if (secFire == 1) + { + bs->doAltAttack = 1; + } + else if (!secFire) + { + if (bs->cur_ps.weapon != WP_THERMAL) + { + if (bs->cur_ps.weaponstate != WEAPON_CHARGING || + bs->altChargeTime > (level.time - bs->cur_ps.weaponChargeTime)) + { + bs->doAttack = 1; + } + } + else + { + bs->doAttack = 1; + } + } + + if (secFire == 2) + { //released a charge + return 1; + } + } + } + } + + return 0; +} + +int BotFallbackNavigation(bot_state_t *bs) +{ + vec3_t b_angle, fwd, trto, mins, maxs; + trace_t tr; + + if (bs->currentEnemy && bs->frame_Enemy_Vis) + { + return 2; //we're busy + } + + mins[0] = -15; + mins[1] = -15; + mins[2] = 0; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 32; + + bs->goalAngles[PITCH] = 0; + bs->goalAngles[ROLL] = 0; + + VectorCopy(bs->goalAngles, b_angle); + + AngleVectors(b_angle, fwd, NULL, NULL); + + trto[0] = bs->origin[0] + fwd[0]*16; + trto[1] = bs->origin[1] + fwd[1]*16; + trto[2] = bs->origin[2] + fwd[2]*16; + + trap_Trace(&tr, bs->origin, mins, maxs, trto, -1, MASK_SOLID); + + if (tr.fraction == 1) + { + VectorCopy(trto, bs->goalPosition); + return 1; //success! + } + else + { + bs->goalAngles[YAW] = rand()%360; + } + + return 0; +} + +int BotTryAnotherWeapon(bot_state_t *bs) +{ //out of ammo, resort to the first weapon we come across that has ammo + int i; + + i = 0; + + while (i < WP_NUM_WEAPONS) + { + if (bs->cur_ps.ammo[weaponData[i].ammoIndex] > weaponData[i].energyPerShot && + (bs->cur_ps.stats[STAT_WEAPONS] & (1 << i))) + { + bs->virtualWeapon = i; + BotSelectWeapon(bs->client, i); + //bs->cur_ps.weapon = i; + //level.clients[bs->client].ps.weapon = i; + return 1; + } + + i++; + } + + if (bs->cur_ps.weapon != 1 && bs->virtualWeapon != 1) + { //should always have this.. shouldn't we? + bs->virtualWeapon = 1; + BotSelectWeapon(bs->client, 1); + //bs->cur_ps.weapon = 1; + //level.clients[bs->client].ps.weapon = 1; + return 1; + } + + return 0; +} + +qboolean BotWeaponSelectable(bot_state_t *bs, int weapon) +{ + if (bs->cur_ps.ammo[weaponData[weapon].ammoIndex] >= weaponData[weapon].energyPerShot && + (bs->cur_ps.stats[STAT_WEAPONS] & (1 << weapon))) + { + return qtrue; + } + + return qfalse; +} + +int BotSelectIdealWeapon(bot_state_t *bs) +{ + int i; + int bestweight = -1; + int bestweapon = 0; + + i = 0; + + while (i < WP_NUM_WEAPONS) + { + if (bs->cur_ps.ammo[weaponData[i].ammoIndex] >= weaponData[i].energyPerShot && + bs->botWeaponWeights[i] > bestweight && + (bs->cur_ps.stats[STAT_WEAPONS] & (1 << i))) + { + if (i == WP_THERMAL) + { //special case.. + if (bs->currentEnemy && bs->frame_Enemy_Len < 700) + { + bestweight = bs->botWeaponWeights[i]; + bestweapon = i; + } + } + else + { + bestweight = bs->botWeaponWeights[i]; + bestweapon = i; + } + } + + i++; + } + + if ( bs->currentEnemy && bs->frame_Enemy_Len < 300 && + (bestweapon == WP_BRYAR_PISTOL || bestweapon == WP_BLASTER || bestweapon == WP_BOWCASTER) && + (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_SABER)) ) + { + bestweapon = WP_SABER; + bestweight = 1; + } + + if ( bs->currentEnemy && bs->frame_Enemy_Len > 300 && + bs->currentEnemy->client && bs->currentEnemy->client->ps.weapon != WP_SABER && + (bestweapon == WP_SABER) ) + { //if the enemy is far away, and we have our saber selected, see if we have any good distance weapons instead + if (BotWeaponSelectable(bs, WP_DISRUPTOR)) + { + bestweapon = WP_DISRUPTOR; + bestweight = 1; + } + else if (BotWeaponSelectable(bs, WP_ROCKET_LAUNCHER)) + { + bestweapon = WP_ROCKET_LAUNCHER; + bestweight = 1; + } + else if (BotWeaponSelectable(bs, WP_BOWCASTER)) + { + bestweapon = WP_BOWCASTER; + bestweight = 1; + } + else if (BotWeaponSelectable(bs, WP_BLASTER)) + { + bestweapon = WP_BLASTER; + bestweight = 1; + } + else if (BotWeaponSelectable(bs, WP_REPEATER)) + { + bestweapon = WP_REPEATER; + bestweight = 1; + } + else if (BotWeaponSelectable(bs, WP_DEMP2)) + { + bestweapon = WP_DEMP2; + bestweight = 1; + } + } + + if (bestweight != -1 && bs->cur_ps.weapon != bestweapon && bs->virtualWeapon != bestweapon) + { + bs->virtualWeapon = bestweapon; + BotSelectWeapon(bs->client, bestweapon); + //bs->cur_ps.weapon = bestweapon; + //level.clients[bs->client].ps.weapon = bestweapon; + return 1; + } + + return 0; +} + +int BotSelectChoiceWeapon(bot_state_t *bs, int weapon, int doselection) +{ //if !doselection then bot will only check if he has the specified weapon and return 1 (yes) or 0 (no) + int i; + int hasit = 0; + + i = 0; + + while (i < WP_NUM_WEAPONS) + { + if (bs->cur_ps.ammo[weaponData[i].ammoIndex] > weaponData[i].energyPerShot && + i == weapon && + (bs->cur_ps.stats[STAT_WEAPONS] & (1 << i))) + { + hasit = 1; + break; + } + + i++; + } + + if (hasit && bs->cur_ps.weapon != weapon && doselection && bs->virtualWeapon != weapon) + { + bs->virtualWeapon = weapon; + BotSelectWeapon(bs->client, weapon); + //bs->cur_ps.weapon = weapon; + //level.clients[bs->client].ps.weapon = weapon; + return 2; + } + + if (hasit) + { + return 1; + } + + return 0; +} + +int BotSelectMelee(bot_state_t *bs) +{ + if (bs->cur_ps.weapon != 1 && bs->virtualWeapon != 1) + { + bs->virtualWeapon = 1; + BotSelectWeapon(bs->client, 1); + //bs->cur_ps.weapon = 1; + //level.clients[bs->client].ps.weapon = 1; + return 1; + } + + return 0; +} + +int GetLoveLevel(bot_state_t *bs, bot_state_t *love) +{ + int i = 0; + const char *lname = NULL; + + if (g_gametype.integer == GT_TOURNAMENT) + { //There is no love in 1-on-1 + return 0; + } + + if (!bs || !love || !g_entities[love->client].client) + { + return 0; + } + + if (!bs->lovednum) + { + return 0; + } + + trap_Cvar_Update(&bot_attachments); + + if (!bot_attachments.integer) + { + return 1; + } + + lname = g_entities[love->client].client->pers.netname; + + if (!lname) + { + return 0; + } + + while (i < bs->lovednum) + { + if (strcmp(bs->loved[i].name, lname) == 0) + { + return bs->loved[i].level; + } + + i++; + } + + return 0; +} + +void BotLovedOneDied(bot_state_t *bs, bot_state_t *loved, int lovelevel) +{ + if (!loved->lastHurt || !loved->lastHurt->client || + loved->lastHurt->s.number == loved->client) + { + return; + } + + if (g_gametype.integer == GT_TOURNAMENT) + { //There is no love in 1-on-1 + return; + } + + if (!IsTeamplay()) + { + if (lovelevel < 2) + { + return; + } + } + else if (OnSameTeam(&g_entities[bs->client], loved->lastHurt)) + { //don't hate teammates no matter what + return; + } + + if (loved->client == loved->lastHurt->s.number) + { + return; + } + + if (bs->client == loved->lastHurt->s.number) + { //oops! + return; + } + + trap_Cvar_Update(&bot_attachments); + + if (!bot_attachments.integer) + { + return; + } + + if (!PassLovedOneCheck(bs, loved->lastHurt)) + { //a loved one killed a loved one.. you cannot hate them + bs->chatObject = loved->lastHurt; + bs->chatAltObject = &g_entities[loved->client]; + BotDoChat(bs, "LovedOneKilledLovedOne", 0); + return; + } + + if (bs->revengeEnemy == loved->lastHurt) + { + if (bs->revengeHateLevel < bs->loved_death_thresh) + { + bs->revengeHateLevel++; + + if (bs->revengeHateLevel == bs->loved_death_thresh) + { + //broke into the highest anger level + //CHAT: Hatred section + bs->chatObject = loved->lastHurt; + bs->chatAltObject = NULL; + BotDoChat(bs, "Hatred", 1); + } + } + } + else if (bs->revengeHateLevel < bs->loved_death_thresh-1) + { //only switch hatred if we don't hate the existing revenge-enemy too much + //CHAT: BelovedKilled section + bs->chatObject = &g_entities[loved->client]; + bs->chatAltObject = loved->lastHurt; + BotDoChat(bs, "BelovedKilled", 0); + bs->revengeHateLevel = 0; + bs->revengeEnemy = loved->lastHurt; + } +} + +void BotDeathNotify(bot_state_t *bs) +{ //in case someone has an emotional attachment to us, we'll notify them + int i = 0; + int ltest = 0; + + while (i < MAX_CLIENTS) + { + if (botstates[i] && botstates[i]->lovednum) + { + ltest = 0; + while (ltest < botstates[i]->lovednum) + { + if (strcmp(level.clients[bs->client].pers.netname, botstates[i]->loved[ltest].name) == 0) + { + BotLovedOneDied(botstates[i], bs, botstates[i]->loved[ltest].level); + break; + } + + ltest++; + } + } + + i++; + } +} + +void StrafeTracing(bot_state_t *bs) +{ + vec3_t mins, maxs; + vec3_t right, rorg, drorg; + trace_t tr; + + mins[0] = -15; + mins[1] = -15; + //mins[2] = -24; + mins[2] = -22; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 32; + + AngleVectors(bs->viewangles, NULL, right, NULL); + + if (bs->meleeStrafeDir) + { + rorg[0] = bs->origin[0] - right[0]*32; + rorg[1] = bs->origin[1] - right[1]*32; + rorg[2] = bs->origin[2] - right[2]*32; + } + else + { + rorg[0] = bs->origin[0] + right[0]*32; + rorg[1] = bs->origin[1] + right[1]*32; + rorg[2] = bs->origin[2] + right[2]*32; + } + + trap_Trace(&tr, bs->origin, mins, maxs, rorg, bs->client, MASK_SOLID); + + if (tr.fraction != 1) + { + bs->meleeStrafeDisable = level.time + Q_irand(500, 1500); + } + + VectorCopy(rorg, drorg); + + drorg[2] -= 32; + + trap_Trace(&tr, rorg, NULL, NULL, drorg, bs->client, MASK_SOLID); + + if (tr.fraction == 1) + { //this may be a dangerous ledge, so don't strafe over it just in case + bs->meleeStrafeDisable = level.time + Q_irand(500, 1500); + } +} + +int PrimFiring(bot_state_t *bs) +{ + if (bs->cur_ps.weaponstate != WEAPON_CHARGING && + bs->doAttack) + { + return 1; + } + + if (bs->cur_ps.weaponstate == WEAPON_CHARGING && + !bs->doAttack) + { + return 1; + } + + return 0; +} + +int KeepPrimFromFiring(bot_state_t *bs) +{ + if (bs->cur_ps.weaponstate != WEAPON_CHARGING && + bs->doAttack) + { + bs->doAttack = 0; + } + + if (bs->cur_ps.weaponstate == WEAPON_CHARGING && + !bs->doAttack) + { + bs->doAttack = 1; + } + + return 0; +} + +int AltFiring(bot_state_t *bs) +{ + if (bs->cur_ps.weaponstate != WEAPON_CHARGING_ALT && + bs->doAltAttack) + { + return 1; + } + + if (bs->cur_ps.weaponstate == WEAPON_CHARGING_ALT && + !bs->doAltAttack) + { + return 1; + } + + return 0; +} + +int KeepAltFromFiring(bot_state_t *bs) +{ + if (bs->cur_ps.weaponstate != WEAPON_CHARGING_ALT && + bs->doAltAttack) + { + bs->doAltAttack = 0; + } + + if (bs->cur_ps.weaponstate == WEAPON_CHARGING_ALT && + !bs->doAltAttack) + { + bs->doAltAttack = 1; + } + + return 0; +} + +gentity_t *CheckForFriendInLOF(bot_state_t *bs) +{ + vec3_t fwd; + vec3_t trfrom, trto; + vec3_t mins, maxs; + gentity_t *trent; + trace_t tr; + + mins[0] = -3; + mins[1] = -3; + mins[2] = -3; + + maxs[0] = 3; + maxs[1] = 3; + maxs[2] = 3; + + AngleVectors(bs->viewangles, fwd, NULL, NULL); + + VectorCopy(bs->eye, trfrom); + + trto[0] = trfrom[0] + fwd[0]*2048; + trto[1] = trfrom[1] + fwd[1]*2048; + trto[2] = trfrom[2] + fwd[2]*2048; + + trap_Trace(&tr, trfrom, mins, maxs, trto, bs->client, MASK_PLAYERSOLID); + + if (tr.fraction != 1 && tr.entityNum <= MAX_CLIENTS) + { + trent = &g_entities[tr.entityNum]; + + if (trent && trent->client) + { + if (IsTeamplay() && OnSameTeam(&g_entities[bs->client], trent)) + { + return trent; + } + + if (botstates[trent->s.number] && GetLoveLevel(bs, botstates[trent->s.number]) > 1) + { + return trent; + } + } + } + + return NULL; +} + +void BotScanForLeader(bot_state_t *bs) +{ //bots will only automatically obtain a leader if it's another bot using this method. + int i = 0; + gentity_t *ent; + + if (bs->isSquadLeader) + { + return; + } + + while (i < MAX_CLIENTS) + { + ent = &g_entities[i]; + + if (ent && ent->client && botstates[i] && botstates[i]->isSquadLeader && bs->client != i) + { + if (OnSameTeam(&g_entities[bs->client], ent)) + { + bs->squadLeader = ent; + break; + } + if (GetLoveLevel(bs, botstates[i]) > 1 && !IsTeamplay()) + { //ignore love status regarding squad leaders if we're in teamplay + bs->squadLeader = ent; + break; + } + } + + i++; + } +} + +void BotReplyGreetings(bot_state_t *bs) +{ + int i = 0; + int numhello = 0; + + while (i < MAX_CLIENTS) + { + if (botstates[i] && + botstates[i]->canChat && + i != bs->client) + { + botstates[i]->chatObject = &g_entities[bs->client]; + botstates[i]->chatAltObject = NULL; + if (BotDoChat(botstates[i], "ResponseGreetings", 0)) + { + numhello++; + } + } + + if (numhello > 3) + { //don't let more than 4 bots say hello at once + return; + } + + i++; + } +} + +void CTFFlagMovement(bot_state_t *bs) +{ + int diddrop = 0; + gentity_t *desiredDrop = NULL; + vec3_t a, mins, maxs; + trace_t tr; + + mins[0] = -15; + mins[1] = -15; + mins[2] = -7; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 7; + + if (bs->wantFlag && (bs->wantFlag->flags & FL_DROPPED_ITEM)) + { + if (bs->staticFlagSpot[0] == bs->wantFlag->s.pos.trBase[0] && + bs->staticFlagSpot[1] == bs->wantFlag->s.pos.trBase[1] && + bs->staticFlagSpot[2] == bs->wantFlag->s.pos.trBase[2]) + { + VectorSubtract(bs->origin, bs->wantFlag->s.pos.trBase, a); + + if (VectorLength(a) <= BOT_FLAG_GET_DISTANCE) + { + VectorCopy(bs->wantFlag->s.pos.trBase, bs->goalPosition); + return; + } + else + { + bs->wantFlag = NULL; + } + } + else + { + bs->wantFlag = NULL; + } + } + else if (bs->wantFlag) + { + bs->wantFlag = NULL; + } + + if (flagRed && flagBlue) + { + if (bs->wpDestination == flagRed || + bs->wpDestination == flagBlue) + { + if (bs->wpDestination == flagRed && droppedRedFlag && (droppedRedFlag->flags & FL_DROPPED_ITEM) && droppedRedFlag->classname && strcmp(droppedRedFlag->classname, "freed") != 0) + { + desiredDrop = droppedRedFlag; + diddrop = 1; + } + if (bs->wpDestination == flagBlue && droppedBlueFlag && (droppedBlueFlag->flags & FL_DROPPED_ITEM) && droppedBlueFlag->classname && strcmp(droppedBlueFlag->classname, "freed") != 0) + { + desiredDrop = droppedBlueFlag; + diddrop = 1; + } + + if (diddrop && desiredDrop) + { + VectorSubtract(bs->origin, desiredDrop->s.pos.trBase, a); + + if (VectorLength(a) <= BOT_FLAG_GET_DISTANCE) + { + trap_Trace(&tr, bs->origin, mins, maxs, desiredDrop->s.pos.trBase, bs->client, MASK_SOLID); + + if (tr.fraction == 1 || tr.entityNum == desiredDrop->s.number) + { + VectorCopy(desiredDrop->s.pos.trBase, bs->goalPosition); + VectorCopy(desiredDrop->s.pos.trBase, bs->staticFlagSpot); + return; + } + } + } + } + } +} + +void BotCheckDetPacks(bot_state_t *bs) +{ + gentity_t *dp = NULL; + gentity_t *myDet = NULL; + vec3_t a; + float enLen; + float myLen; + + while ( (dp = G_Find( dp, FOFS(classname), "detpack") ) != NULL ) + { + if (dp && dp->parent && dp->parent->s.number == bs->client) + { + myDet = dp; + break; + } + } + + if (!myDet) + { + return; + } + + if (!bs->currentEnemy || !bs->currentEnemy->client || !bs->frame_Enemy_Vis) + { //require the enemy to be visilbe just to be fair.. + + //unless.. + if (bs->currentEnemy && bs->currentEnemy->client && + (level.time - bs->plantContinue) < 5000) + { //it's a fresh plant (within 5 seconds) so we should be able to guess + goto stillmadeit; + } + return; + } + +stillmadeit: + + VectorSubtract(bs->currentEnemy->client->ps.origin, myDet->s.pos.trBase, a); + enLen = VectorLength(a); + + VectorSubtract(bs->origin, myDet->s.pos.trBase, a); + myLen = VectorLength(a); + + if (enLen > myLen) + { + return; + } + + if (enLen < BOT_PLANT_BLOW_DISTANCE && OrgVisible(bs->currentEnemy->client->ps.origin, myDet->s.pos.trBase, bs->currentEnemy->s.number)) + { //we could just call the "blow all my detpacks" function here, but I guess that's cheating. + bs->plantKillEmAll = level.time + 500; + } +} + +int BotUseInventoryItem(bot_state_t *bs) +{ + if (bs->cur_ps.stats[STAT_HOLDABLE_ITEMS] & (1 << HI_MEDPAC)) + { + if (g_entities[bs->client].health <= 50) + { + bs->cur_ps.stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(HI_MEDPAC, IT_HOLDABLE); + goto wantuseitem; + } + } + if (bs->cur_ps.stats[STAT_HOLDABLE_ITEMS] & (1 << HI_SEEKER)) + { + if (bs->currentEnemy && bs->frame_Enemy_Vis) + { + bs->cur_ps.stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(HI_SEEKER, IT_HOLDABLE); + goto wantuseitem; + } + } + if (bs->cur_ps.stats[STAT_HOLDABLE_ITEMS] & (1 << HI_SENTRY_GUN)) + { + if (bs->currentEnemy && bs->frame_Enemy_Vis) + { + bs->cur_ps.stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(HI_SENTRY_GUN, IT_HOLDABLE); + goto wantuseitem; + } + } + if (bs->cur_ps.stats[STAT_HOLDABLE_ITEMS] & (1 << HI_SHIELD)) + { + if (bs->currentEnemy && bs->frame_Enemy_Vis && bs->runningToEscapeThreat) + { //this will (hopefully) result in the bot placing the shield down while facing + //the enemy and running away + bs->cur_ps.stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(HI_SHIELD, IT_HOLDABLE); + goto wantuseitem; + } + } + + return 0; + +wantuseitem: + level.clients[bs->client].ps.stats[STAT_HOLDABLE_ITEM] = bs->cur_ps.stats[STAT_HOLDABLE_ITEM]; + + return 1; +} + +int BotSurfaceNear(bot_state_t *bs) +{ + trace_t tr; + vec3_t fwd; + + AngleVectors(bs->viewangles, fwd, NULL, NULL); + + fwd[0] = bs->origin[0]+(fwd[0]*64); + fwd[1] = bs->origin[1]+(fwd[1]*64); + fwd[2] = bs->origin[2]+(fwd[2]*64); + + trap_Trace(&tr, bs->origin, NULL, NULL, fwd, bs->client, MASK_SOLID); + + if (tr.fraction != 1) + { + return 1; + } + + return 0; +} + +int BotWeaponBlockable(int weapon) +{ + switch (weapon) + { + case WP_STUN_BATON: + return 0; + case WP_DISRUPTOR: + return 0; + case WP_DEMP2: + return 0; + case WP_ROCKET_LAUNCHER: + return 0; + case WP_THERMAL: + return 0; + case WP_TRIP_MINE: + return 0; + case WP_DET_PACK: + return 0; + default: + return 1; + } +} + +void Cmd_EngageDuel_f(gentity_t *ent); +void Cmd_ToggleSaber_f(gentity_t *ent); + +void StandardBotAI(bot_state_t *bs, float thinktime) +{ + int wp, enemy; + int desiredIndex; + int goalWPIndex; + int doingFallback = 0; + int fjHalt; + vec3_t a, ang, headlevel, eorg, noz_x, noz_y, dif, a_fo; + float reaction; + float bLeadAmount; + int meleestrafe = 0; + int useTheForce = 0; + int forceHostile = 0; + int cBAI = 0; + gentity_t *friendInLOF = 0; + float mLen; + int visResult = 0; + int selResult = 0; + int mineSelect = 0; + int detSelect = 0; + + if (gDeactivated) + { + bs->wpCurrent = NULL; + bs->currentEnemy = NULL; + bs->wpDestination = NULL; + bs->wpDirection = 0; + return; + } + + if (g_entities[bs->client].inuse && + g_entities[bs->client].client && + g_entities[bs->client].client->sess.sessionTeam == TEAM_SPECTATOR) + { + bs->wpCurrent = NULL; + bs->currentEnemy = NULL; + bs->wpDestination = NULL; + bs->wpDirection = 0; + return; + } + + trap_Cvar_Update(&bot_forgimmick); + trap_Cvar_Update(&bot_honorableduelacceptance); + + if (bot_forgimmick.integer) + { + bs->wpCurrent = NULL; + bs->currentEnemy = NULL; + bs->wpDestination = NULL; + bs->wpDirection = 0; + + if (bot_forgimmick.integer == 2) + { //for debugging saber stuff, this is handy + trap_EA_Attack(bs->client); + } + return; + } + + if (!bs->lastDeadTime) + { //just spawned in? + bs->lastDeadTime = level.time; + } + + if (g_entities[bs->client].health < 1) + { + bs->lastDeadTime = level.time; + + if (!bs->deathActivitiesDone && bs->lastHurt && bs->lastHurt->client && bs->lastHurt->s.number != bs->client) + { + BotDeathNotify(bs); + if (PassLovedOneCheck(bs, bs->lastHurt)) + { + //CHAT: Died + bs->chatObject = bs->lastHurt; + bs->chatAltObject = NULL; + BotDoChat(bs, "Died", 0); + } + else if (!PassLovedOneCheck(bs, bs->lastHurt) && + botstates[bs->lastHurt->s.number] && + PassLovedOneCheck(botstates[bs->lastHurt->s.number], &g_entities[bs->client])) + { //killed by a bot that I love, but that does not love me + bs->chatObject = bs->lastHurt; + bs->chatAltObject = NULL; + BotDoChat(bs, "KilledOnPurposeByLove", 0); + } + + bs->deathActivitiesDone = 1; + } + + bs->wpCurrent = NULL; + bs->currentEnemy = NULL; + bs->wpDestination = NULL; + bs->wpCamping = NULL; + bs->wpCampingTo = NULL; + bs->wpStoreDest = NULL; + bs->wpDestIgnoreTime = 0; + bs->wpDestSwitchTime = 0; + bs->wpSeenTime = 0; + bs->wpDirection = 0; + + if (rand()%10 < 5 && + (!bs->doChat || bs->chatTime < level.time)) + { + trap_EA_Attack(bs->client); + } + + return; + } + + bs->doAttack = 0; + bs->doAltAttack = 0; + //reset the attack states + + if (bs->isSquadLeader) + { + CommanderBotAI(bs); + } + else + { + BotDoTeamplayAI(bs); + } + + if (!bs->currentEnemy) + { + bs->frame_Enemy_Vis = 0; + } + + if (bs->revengeEnemy && bs->revengeEnemy->client && + bs->revengeEnemy->client->pers.connected != CA_ACTIVE && bs->revengeEnemy->client->pers.connected != CA_AUTHORIZING) + { + bs->revengeEnemy = NULL; + bs->revengeHateLevel = 0; + } + + if (bs->currentEnemy && bs->currentEnemy->client && + bs->currentEnemy->client->pers.connected != CA_ACTIVE && bs->currentEnemy->client->pers.connected != CA_AUTHORIZING) + { + bs->currentEnemy = NULL; + } + + fjHalt = 0; + +#ifndef FORCEJUMP_INSTANTMETHOD + if (bs->forceJumpChargeTime > level.time) + { + useTheForce = 1; + forceHostile = 0; + } + + if (bs->currentEnemy && bs->currentEnemy->client && bs->frame_Enemy_Vis && bs->forceJumpChargeTime < level.time) +#else + if (bs->currentEnemy && bs->currentEnemy->client && bs->frame_Enemy_Vis) +#endif + { + VectorSubtract(bs->currentEnemy->client->ps.origin, bs->eye, a_fo); + vectoangles(a_fo, a_fo); + + //do this above all things + if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_PUSH)) && bs->doForcePush > level.time && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_PUSH]][FP_PUSH] && InFieldOfVision(bs->viewangles, 50, a_fo)) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_PUSH; + useTheForce = 1; + forceHostile = 1; + } + else if (bs->cur_ps.fd.forceSide == FORCE_DARKSIDE) + { //try dark side powers + //in order of priority top to bottom + if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_GRIP)) && (bs->cur_ps.fd.forcePowersActive & (1 << FP_GRIP)) && InFieldOfVision(bs->viewangles, 50, a_fo)) + { //already gripping someone, so hold it + level.clients[bs->client].ps.fd.forcePowerSelected = FP_GRIP; + useTheForce = 1; + forceHostile = 1; + } + else if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_LIGHTNING)) && bs->frame_Enemy_Len < FORCE_LIGHTNING_RADIUS && level.clients[bs->client].ps.fd.forcePower > 50 && InFieldOfVision(bs->viewangles, 50, a_fo)) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_LIGHTNING; + useTheForce = 1; + forceHostile = 1; + } + else if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_GRIP)) && bs->frame_Enemy_Len < MAX_GRIP_DISTANCE && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_GRIP]][FP_GRIP] && InFieldOfVision(bs->viewangles, 50, a_fo)) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_GRIP; + useTheForce = 1; + forceHostile = 1; + } + else if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_RAGE)) && g_entities[bs->client].health < 25 && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_RAGE]][FP_RAGE]) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_RAGE; + useTheForce = 1; + forceHostile = 0; + } + else if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_DRAIN)) && bs->frame_Enemy_Len < MAX_DRAIN_DISTANCE && level.clients[bs->client].ps.fd.forcePower > 50 && InFieldOfVision(bs->viewangles, 50, a_fo) && bs->currentEnemy->client->ps.fd.forcePower > 10 && bs->currentEnemy->client->ps.fd.forceSide == FORCE_LIGHTSIDE) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_DRAIN; + useTheForce = 1; + forceHostile = 1; + } + } + else if (bs->cur_ps.fd.forceSide == FORCE_LIGHTSIDE) + { //try light side powers + if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_TELEPATHY)) && bs->frame_Enemy_Len < MAX_TRICK_DISTANCE && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_TELEPATHY]][FP_TELEPATHY] && InFieldOfVision(bs->viewangles, 50, a_fo) && !(bs->currentEnemy->client->ps.fd.forcePowersActive & (1 << FP_SEE))) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_TELEPATHY; + useTheForce = 1; + forceHostile = 1; + } + else if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_ABSORB)) && g_entities[bs->client].health < 75 && bs->currentEnemy->client->ps.fd.forceSide == FORCE_DARKSIDE && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_ABSORB]][FP_ABSORB]) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_ABSORB; + useTheForce = 1; + forceHostile = 0; + } + else if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_PROTECT)) && g_entities[bs->client].health < 35 && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_PROTECT]][FP_PROTECT]) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_PROTECT; + useTheForce = 1; + forceHostile = 0; + } + } + + if (!useTheForce) + { //try neutral powers + if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_PUSH)) && bs->cur_ps.fd.forceGripBeingGripped > level.time && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_PUSH]][FP_PUSH] && InFieldOfVision(bs->viewangles, 50, a_fo)) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_PUSH; + useTheForce = 1; + forceHostile = 1; + } + else if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_SPEED)) && g_entities[bs->client].health < 25 && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_SPEED]][FP_SPEED]) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_SPEED; + useTheForce = 1; + forceHostile = 0; + } + else if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_SEE)) && BotMindTricked(bs->client, bs->currentEnemy->s.number) && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_SEE]][FP_SEE]) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_SEE; + useTheForce = 1; + forceHostile = 0; + } + else if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_PULL)) && bs->frame_Enemy_Len < 256 && level.clients[bs->client].ps.fd.forcePower > 75 && InFieldOfVision(bs->viewangles, 50, a_fo)) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_PULL; + useTheForce = 1; + forceHostile = 1; + } + } + } + + if (!useTheForce) + { //try powers that we don't care if we have an enemy for + if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_HEAL)) && g_entities[bs->client].health < 50 && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_HEAL]][FP_HEAL] && bs->cur_ps.fd.forcePowerLevel[FP_HEAL] > FORCE_LEVEL_1) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_HEAL; + useTheForce = 1; + forceHostile = 0; + } + else if ((bs->cur_ps.fd.forcePowersKnown & (1 << FP_HEAL)) && g_entities[bs->client].health < 50 && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_HEAL]][FP_HEAL] && !bs->currentEnemy && bs->isCamping > level.time) + { //only meditate and heal if we're camping + level.clients[bs->client].ps.fd.forcePowerSelected = FP_HEAL; + useTheForce = 1; + forceHostile = 0; + } + } + + //cm - dont use force on bots + if (useTheForce && forceHostile) + { + if (bs->currentEnemy && bs->currentEnemy->client && + botstates[bs->currentEnemy->s.number] && cm_botsattackhumans.integer == 1) + { + useTheForce = 0; + forceHostile = 0; + } + } + + if (useTheForce && forceHostile) + { + if (bs->currentEnemy && bs->currentEnemy->client && + !ForcePowerUsableOn(&g_entities[bs->client], bs->currentEnemy, level.clients[bs->client].ps.fd.forcePowerSelected)) + { + useTheForce = 0; + forceHostile = 0; + } + } + + doingFallback = 0; + + bs->deathActivitiesDone = 0; + + if (BotUseInventoryItem(bs)) + { + if (rand()%10 < 5) + { + trap_EA_Use(bs->client); + } + } + + if (bs->cur_ps.ammo[weaponData[bs->cur_ps.weapon].ammoIndex] < weaponData[bs->cur_ps.weapon].energyPerShot) + { + if (BotTryAnotherWeapon(bs)) + { + return; + } + } + else + { + if (bs->currentEnemy && bs->lastVisibleEnemyIndex == bs->currentEnemy->s.number && + bs->frame_Enemy_Vis && bs->forceWeaponSelect /*&& bs->plantContinue < level.time*/) + { + bs->forceWeaponSelect = 0; + } + + if (bs->plantContinue > level.time) + { + bs->doAttack = 1; + bs->destinationGrabTime = 0; + } + + if (!bs->forceWeaponSelect && bs->cur_ps.hasDetPackPlanted && bs->plantKillEmAll > level.time) + { + bs->forceWeaponSelect = WP_DET_PACK; + } + + if (bs->forceWeaponSelect) + { + selResult = BotSelectChoiceWeapon(bs, bs->forceWeaponSelect, 1); + } + + if (selResult) + { + if (selResult == 2) + { //newly selected + return; + } + } + else if (BotSelectIdealWeapon(bs)) + { + return; + } + } + /*if (BotSelectMelee(bs)) + { + return; + }*/ + + reaction = bs->skills.reflex/bs->settings.skill; + + if (reaction < 0) + { + reaction = 0; + } + if (reaction > 2000) + { + reaction = 2000; + } + + if (!bs->currentEnemy) + { + bs->timeToReact = level.time + reaction; + } + + if (bs->cur_ps.weapon == WP_DET_PACK && bs->cur_ps.hasDetPackPlanted && bs->plantKillEmAll > level.time) + { + bs->doAltAttack = 1; + } + + if (bs->wpCamping) + { + if (bs->isCamping < level.time) + { + bs->wpCamping = NULL; + bs->isCamping = 0; + } + + if (bs->currentEnemy && bs->frame_Enemy_Vis) + { + bs->wpCamping = NULL; + bs->isCamping = 0; + } + } + + if (bs->wpCurrent && + (bs->wpSeenTime < level.time || bs->wpTravelTime < level.time)) + { + bs->wpCurrent = NULL; + } + + if (bs->currentEnemy) + { + if (bs->enemySeenTime < level.time || + !PassStandardEnemyChecks(bs, bs->currentEnemy)) + { + if (bs->revengeEnemy == bs->currentEnemy && + bs->currentEnemy->health < 1 && + bs->lastAttacked && bs->lastAttacked == bs->currentEnemy) + { + //CHAT: Destroyed hated one [KilledHatedOne section] + bs->chatObject = bs->revengeEnemy; + bs->chatAltObject = NULL; + BotDoChat(bs, "KilledHatedOne", 1); + bs->revengeEnemy = NULL; + bs->revengeHateLevel = 0; + } + else if (bs->currentEnemy->health < 1 && PassLovedOneCheck(bs, bs->currentEnemy) && + bs->lastAttacked && bs->lastAttacked == bs->currentEnemy) + { + //CHAT: Killed + bs->chatObject = bs->currentEnemy; + bs->chatAltObject = NULL; + BotDoChat(bs, "Killed", 0); + } + + bs->currentEnemy = NULL; + } + } + + if (bot_honorableduelacceptance.integer) + { + if (bs->currentEnemy && bs->currentEnemy->client && + bs->cur_ps.weapon == WP_SABER && + g_privateDuel.integer && + bs->frame_Enemy_Vis && + bs->frame_Enemy_Len < 400 && + bs->currentEnemy->client->ps.weapon == WP_SABER && + bs->currentEnemy->client->ps.saberHolstered) + { + vec3_t e_ang_vec; + + VectorSubtract(bs->currentEnemy->client->ps.origin, bs->eye, e_ang_vec); + + if (InFieldOfVision(bs->viewangles, 100, e_ang_vec)) + { //Our enemy has his saber holstered and has challenged us to a duel, so challenge him back + if (!bs->cur_ps.saberHolstered) + { + Cmd_ToggleSaber_f(&g_entities[bs->client]); + } + else + { + if (bs->currentEnemy->client->ps.duelIndex == bs->client && + bs->currentEnemy->client->ps.duelTime > level.time && + !bs->cur_ps.duelInProgress) + { + Cmd_EngageDuel_f(&g_entities[bs->client]); + } + } + + bs->doAttack = 0; + bs->doAltAttack = 0; + bs->botChallengingTime = level.time + 100; + bs->beStill = level.time + 100; + } + } + } + //Apparently this "allows you to cheese" when fighting against bots. I'm not sure why you'd want to con bots + //into an easy kill, since they're bots and all. But whatever. + + if (!bs->wpCurrent) + { + wp = GetNearestVisibleWP(bs->origin, bs->client); + + if (wp != -1) + { + bs->wpCurrent = gWPArray[wp]; + bs->wpSeenTime = level.time + 1500; + bs->wpTravelTime = level.time + 10000; //never take more than 10 seconds to travel to a waypoint + } + } + + if (bs->enemySeenTime < level.time || !bs->frame_Enemy_Vis || !bs->currentEnemy || + (bs->currentEnemy /*&& bs->cur_ps.weapon == WP_SABER && bs->frame_Enemy_Len > 300*/)) + { + enemy = ScanForEnemies(bs); + + if (enemy != -1) + { + bs->currentEnemy = &g_entities[enemy]; + bs->enemySeenTime = level.time + ENEMY_FORGET_MS; + } + } + + if (!bs->squadLeader && !bs->isSquadLeader) + { + BotScanForLeader(bs); + } + + if (!bs->squadLeader && bs->squadCannotLead < level.time) + { //if still no leader after scanning, then become a squad leader + bs->isSquadLeader = 1; + } + + if (bs->isSquadLeader && bs->squadLeader) + { //we don't follow anyone if we are a leader + bs->squadLeader = NULL; + } + + //ESTABLISH VISIBILITIES AND DISTANCES FOR THE WHOLE FRAME HERE + if (bs->wpCurrent) + { + VectorSubtract(bs->wpCurrent->origin, bs->origin, a); + bs->frame_Waypoint_Len = VectorLength(a); + + visResult = WPOrgVisible(&g_entities[bs->client], bs->origin, bs->wpCurrent->origin, bs->client); + + if (visResult == 2) + { + bs->frame_Waypoint_Vis = 0; + bs->wpSeenTime = 0; + bs->wpDestination = NULL; + bs->wpDestIgnoreTime = level.time + 5000; + + if (bs->wpDirection) + { + bs->wpDirection = 0; + } + else + { + bs->wpDirection = 1; + } + } + else if (visResult) + { + bs->frame_Waypoint_Vis = 1; + } + else + { + bs->frame_Waypoint_Vis = 0; + } + } + + if (bs->currentEnemy) + { + if (bs->currentEnemy->client) + { + VectorCopy(bs->currentEnemy->client->ps.origin, eorg); + eorg[2] += bs->currentEnemy->client->ps.viewheight; + } + else + { + VectorCopy(bs->currentEnemy->s.origin, eorg); + } + + VectorSubtract(eorg, bs->eye, a); + bs->frame_Enemy_Len = VectorLength(a); + + if (OrgVisible(bs->eye, eorg, bs->client)) + { + bs->frame_Enemy_Vis = 1; + VectorCopy(eorg, bs->lastEnemySpotted); + VectorCopy(bs->origin, bs->hereWhenSpotted); + bs->lastVisibleEnemyIndex = bs->currentEnemy->s.number; + //VectorCopy(bs->eye, bs->lastEnemySpotted); + bs->hitSpotted = 0; + } + else + { + bs->frame_Enemy_Vis = 0; + } + } + else + { + bs->lastVisibleEnemyIndex = ENTITYNUM_NONE; + } + //END + + if (bs->frame_Enemy_Vis) + { + bs->enemySeenTime = level.time + ENEMY_FORGET_MS; + } + + if (bs->wpCurrent) + { + WPConstantRoutine(bs); + + if (!bs->wpCurrent) + { //WPConstantRoutine has the ability to nullify the waypoint if it fails certain checks, so.. + return; + } + + if (bs->wpCurrent->flags & WPFLAG_WAITFORFUNC) + { + if (!CheckForFunc(bs->wpCurrent->origin, -1)) + { + bs->beStill = level.time + 500; //no func brush under.. wait + } + } + if (bs->wpCurrent->flags & WPFLAG_NOMOVEFUNC) + { + if (CheckForFunc(bs->wpCurrent->origin, -1)) + { + bs->beStill = level.time + 500; //func brush under.. wait + } + } + + if (bs->frame_Waypoint_Vis || (bs->wpCurrent->flags & WPFLAG_NOVIS)) + { + bs->wpSeenTime = level.time + 1500; //if we lose sight of the point, we have 1.5 seconds to regain it before we drop it + } + VectorCopy(bs->wpCurrent->origin, bs->goalPosition); + if (bs->wpDirection) + { + goalWPIndex = bs->wpCurrent->index-1; + } + else + { + goalWPIndex = bs->wpCurrent->index+1; + } + + if (bs->wpCamping) + { + VectorSubtract(bs->wpCampingTo->origin, bs->origin, a); + vectoangles(a, ang); + VectorCopy(ang, bs->goalAngles); + + VectorSubtract(bs->origin, bs->wpCamping->origin, a); + if (VectorLength(a) < 64) + { + VectorCopy(bs->wpCamping->origin, bs->goalPosition); + bs->beStill = level.time + 1000; + + if (!bs->campStanding) + { + bs->duckTime = level.time + 1000; + } + } + } + else if (gWPArray[goalWPIndex] && gWPArray[goalWPIndex]->inuse && + !(gLevelFlags & LEVELFLAG_NOPOINTPREDICTION)) + { + VectorSubtract(gWPArray[goalWPIndex]->origin, bs->origin, a); + vectoangles(a, ang); + VectorCopy(ang, bs->goalAngles); + } + else + { + VectorSubtract(bs->wpCurrent->origin, bs->origin, a); + vectoangles(a, ang); + VectorCopy(ang, bs->goalAngles); + } + + if (bs->destinationGrabTime < level.time /*&& (!bs->wpDestination || (bs->currentEnemy && bs->frame_Enemy_Vis))*/) + { + GetIdealDestination(bs); + } + + if (bs->wpCurrent && bs->wpDestination) + { + if (TotalTrailDistance(bs->wpCurrent->index, bs->wpDestination->index, bs) == -1) + { + bs->wpDestination = NULL; + bs->destinationGrabTime = level.time + 10000; + } + } + + if (bs->frame_Waypoint_Len < BOT_WPTOUCH_DISTANCE) + { + WPTouchRoutine(bs); + + if (!bs->wpDirection) + { + desiredIndex = bs->wpCurrent->index+1; + } + else + { + desiredIndex = bs->wpCurrent->index-1; + } + + if (gWPArray[desiredIndex] && + gWPArray[desiredIndex]->inuse && + desiredIndex < gWPNum && + desiredIndex >= 0 && + PassWayCheck(bs, desiredIndex)) + { + bs->wpCurrent = gWPArray[desiredIndex]; + } + else + { + if (bs->wpDestination) + { + bs->wpDestination = NULL; + bs->destinationGrabTime = level.time + 10000; + } + + if (bs->wpDirection) + { + bs->wpDirection = 0; + } + else + { + bs->wpDirection = 1; + } + } + } + } + else //We can't find a waypoint, going to need a fallback routine. + { + /*if (g_gametype.integer == GT_TOURNAMENT)*/ + { //helps them get out of messy situations + /*if ((level.time - bs->forceJumpChargeTime) > 3500) + { + bs->forceJumpChargeTime = level.time + 2000; + trap_EA_MoveForward(bs->client); + } + */ + bs->jumpTime = level.time + 1500; + bs->jumpHoldTime = level.time + 1500; + bs->jDelay = 0; + } + doingFallback = BotFallbackNavigation(bs); + } + + if (doingFallback) + { + bs->doingFallback = qtrue; + } + else + { + bs->doingFallback = qfalse; + } + + if (bs->timeToReact < level.time && bs->currentEnemy && bs->enemySeenTime > level.time + (ENEMY_FORGET_MS - (ENEMY_FORGET_MS*0.2))) + { + if (bs->frame_Enemy_Vis) + { + cBAI = CombatBotAI(bs, thinktime); + } + else if (bs->cur_ps.weaponstate == WEAPON_CHARGING_ALT) + { //keep charging in case we see him again before we lose track of him + bs->doAltAttack = 1; + } + else if (bs->cur_ps.weaponstate == WEAPON_CHARGING) + { //keep charging in case we see him again before we lose track of him + bs->doAttack = 1; + } + + if (bs->destinationGrabTime > level.time + 100) + { + bs->destinationGrabTime = level.time + 100; //assures that we will continue staying within a general area of where we want to be in a combat situation + } + + if (bs->currentEnemy->client) + { + VectorCopy(bs->currentEnemy->client->ps.origin, headlevel); + headlevel[2] += bs->currentEnemy->client->ps.viewheight; + } + else + { + VectorCopy(bs->currentEnemy->client->ps.origin, headlevel); + } + + if (!bs->frame_Enemy_Vis) + { + //if (!bs->hitSpotted && VectorLength(a) > 256) + if (OrgVisible(bs->eye, bs->lastEnemySpotted, -1)) + { + VectorCopy(bs->lastEnemySpotted, headlevel); + VectorSubtract(headlevel, bs->eye, a); + vectoangles(a, ang); + VectorCopy(ang, bs->goalAngles); + + if (bs->cur_ps.weapon == WP_FLECHETTE && + bs->cur_ps.weaponstate == WEAPON_READY && + bs->currentEnemy && bs->currentEnemy->client) + { + mLen = VectorLength(a) > 128; + if (mLen > 128 && mLen < 1024) + { + VectorSubtract(bs->currentEnemy->client->ps.origin, bs->lastEnemySpotted, a); + + if (VectorLength(a) < 300) + { + bs->doAltAttack = 1; + } + } + } + } + } + else + { + bLeadAmount = BotWeaponCanLead(bs); + if ((bs->skills.accuracy/bs->settings.skill) <= 8 && + bLeadAmount) + { + BotAimLeading(bs, headlevel, bLeadAmount); + } + else + { + VectorSubtract(headlevel, bs->eye, a); + vectoangles(a, ang); + VectorCopy(ang, bs->goalAngles); + } + + BotAimOffsetGoalAngles(bs); + } + } + + if (bs->cur_ps.saberInFlight) + { + bs->saberThrowTime = level.time + Q_irand(4000, 10000); + } + + if (bs->currentEnemy) + { + if (BotGetWeaponRange(bs) == BWEAPONRANGE_SABER) + { + int saberRange = SABER_ATTACK_RANGE; + + VectorSubtract(bs->currentEnemy->client->ps.origin, bs->eye, a_fo); + vectoangles(a_fo, a_fo); + + if (bs->saberPowerTime < level.time) + { //Don't just use strong attacks constantly, switch around a bit + if (Q_irand(1, 10) <= 5) + { + bs->saberPower = qtrue; + } + else + { + bs->saberPower = qfalse; + } + + bs->saberPowerTime = level.time + Q_irand(3000, 15000); + } + + if (bs->currentEnemy->health > 75 && g_entities[bs->client].client->ps.fd.forcePowerLevel[FP_SABERATTACK] > 2) + { + if (g_entities[bs->client].client->ps.fd.saberAnimLevel != FORCE_LEVEL_3 && bs->saberPower) + { //if we are up against someone with a lot of health and we have a strong attack available, then h4q them + Cmd_SaberAttackCycle_f(&g_entities[bs->client]); + } + } + else if (bs->currentEnemy->health > 40 && g_entities[bs->client].client->ps.fd.forcePowerLevel[FP_SABERATTACK] > 1) + { + if (g_entities[bs->client].client->ps.fd.saberAnimLevel != FORCE_LEVEL_2) + { //they're down on health a little, use level 2 if we can + Cmd_SaberAttackCycle_f(&g_entities[bs->client]); + } + } + else + { + if (g_entities[bs->client].client->ps.fd.saberAnimLevel != FORCE_LEVEL_1) + { //they've gone below 40 health, go at them with quick attacks + Cmd_SaberAttackCycle_f(&g_entities[bs->client]); + } + } + + if (g_gametype.integer == GT_SINGLE_PLAYER) + { + saberRange *= 3; + } + + if (bs->frame_Enemy_Len <= saberRange) + { + SaberCombatHandling(bs); + + if (bs->frame_Enemy_Len < 80) + { + meleestrafe = 1; + } + } + else if (bs->saberThrowTime < level.time && !bs->cur_ps.saberInFlight && + (bs->cur_ps.fd.forcePowersKnown & (1 << FP_SABERTHROW)) && + InFieldOfVision(bs->viewangles, 30, a_fo) && + bs->frame_Enemy_Len < BOT_SABER_THROW_RANGE) + { + bs->doAltAttack = 1; + bs->doAttack = 0; + } + else if (bs->cur_ps.saberInFlight && bs->frame_Enemy_Len > 300 && bs->frame_Enemy_Len < BOT_SABER_THROW_RANGE) + { + bs->doAltAttack = 1; + bs->doAttack = 0; + } + } + else if (BotGetWeaponRange(bs) == BWEAPONRANGE_MELEE) + { + if (bs->frame_Enemy_Len <= MELEE_ATTACK_RANGE) + { + MeleeCombatHandling(bs); + meleestrafe = 1; + } + } + } + + if (doingFallback && bs->currentEnemy) //just stand and fire if we have no idea where we are + { + VectorCopy(bs->origin, bs->goalPosition); + } + + if (bs->forceJumping > level.time) + { + VectorCopy(bs->origin, noz_x); + VectorCopy(bs->goalPosition, noz_y); + + noz_x[2] = noz_y[2]; + + VectorSubtract(noz_x, noz_y, noz_x); + + if (VectorLength(noz_x) < 32) + { + fjHalt = 1; + } + } + + if (bs->doChat && bs->chatTime > level.time && (!bs->currentEnemy || !bs->frame_Enemy_Vis)) + { + return; + } + else if (bs->doChat && bs->currentEnemy && bs->frame_Enemy_Vis) + { + //bs->chatTime = level.time + bs->chatTime_stored; + bs->doChat = 0; //do we want to keep the bot waiting to chat until after the enemy is gone? + bs->chatTeam = 0; + } + else if (bs->doChat && bs->chatTime <= level.time) + { + if (bs->chatTeam) + { + trap_EA_SayTeam(bs->client, bs->currentChat); + bs->chatTeam = 0; + } + else + { + trap_EA_Say(bs->client, bs->currentChat); + } + if (bs->doChat == 2) + { + BotReplyGreetings(bs); + } + bs->doChat = 0; + } + + CTFFlagMovement(bs); + + if (/*bs->wpDestination &&*/ bs->shootGoal && + /*bs->wpDestination->associated_entity == bs->shootGoal->s.number &&*/ + bs->shootGoal->health > 0 && bs->shootGoal->takedamage) + { + dif[0] = (bs->shootGoal->r.absmax[0]+bs->shootGoal->r.absmin[0])/2; + dif[1] = (bs->shootGoal->r.absmax[1]+bs->shootGoal->r.absmin[1])/2; + dif[2] = (bs->shootGoal->r.absmax[2]+bs->shootGoal->r.absmin[2])/2; + + if (!bs->currentEnemy || bs->frame_Enemy_Len > 256) + { //if someone is close then don't stop shooting them for this + VectorSubtract(dif, bs->eye, a); + vectoangles(a, a); + VectorCopy(a, bs->goalAngles); + + if (InFieldOfVision(bs->viewangles, 30, a) && + EntityVisibleBox(bs->origin, NULL, NULL, dif, bs->client, bs->shootGoal->s.number)) + { + bs->doAttack = 1; + } + } + } + + if (bs->cur_ps.hasDetPackPlanted) + { //check if our enemy gets near it and detonate if he does + BotCheckDetPacks(bs); + } + else if (bs->currentEnemy && bs->lastVisibleEnemyIndex == bs->currentEnemy->s.number && !bs->frame_Enemy_Vis && bs->plantTime < level.time && + !bs->doAttack && !bs->doAltAttack) + { + VectorSubtract(bs->origin, bs->hereWhenSpotted, a); + + if (bs->plantDecided > level.time || (bs->frame_Enemy_Len < BOT_PLANT_DISTANCE*2 && VectorLength(a) < BOT_PLANT_DISTANCE)) + { + mineSelect = BotSelectChoiceWeapon(bs, WP_TRIP_MINE, 0); + detSelect = BotSelectChoiceWeapon(bs, WP_DET_PACK, 0); + if (bs->cur_ps.hasDetPackPlanted) + { + detSelect = 0; + } + + if (bs->plantDecided > level.time && bs->forceWeaponSelect && + bs->cur_ps.weapon == bs->forceWeaponSelect) + { + bs->doAttack = 1; + bs->plantDecided = 0; + bs->plantTime = level.time + BOT_PLANT_INTERVAL; + bs->plantContinue = level.time + 500; + bs->beStill = level.time + 500; + } + else if (mineSelect || detSelect) + { + if (BotSurfaceNear(bs)) + { + if (!mineSelect) + { //if no mines use detpacks, otherwise use mines + mineSelect = WP_DET_PACK; + } + else + { + mineSelect = WP_TRIP_MINE; + } + + detSelect = BotSelectChoiceWeapon(bs, mineSelect, 1); + + if (detSelect && detSelect != 2) + { //We have it and it is now our weapon + bs->plantDecided = level.time + 1000; + bs->forceWeaponSelect = mineSelect; + return; + } + else if (detSelect == 2) + { + bs->forceWeaponSelect = mineSelect; + return; + } + } + } + } + } + else if (bs->plantContinue < level.time) + { + bs->forceWeaponSelect = 0; + } + + if (g_gametype.integer == GT_JEDIMASTER && !bs->cur_ps.isJediMaster && bs->jmState == -1 && gJMSaberEnt && gJMSaberEnt->inuse) + { + vec3_t saberLen; + float fSaberLen = 0; + + VectorSubtract(bs->origin, gJMSaberEnt->r.currentOrigin, saberLen); + fSaberLen = VectorLength(saberLen); + + if (fSaberLen < 256) + { + if (OrgVisible(bs->origin, gJMSaberEnt->r.currentOrigin, bs->client)) + { + VectorCopy(gJMSaberEnt->r.currentOrigin, bs->goalPosition); + } + } + } + + if (bs->beStill < level.time && !WaitingForNow(bs, bs->goalPosition) && !fjHalt) + { + VectorSubtract(bs->goalPosition, bs->origin, bs->goalMovedir); + VectorNormalize(bs->goalMovedir); + + if (bs->jumpTime > level.time && bs->jDelay < level.time && + level.clients[bs->client].pers.cmd.upmove > 0) + { + // trap_EA_Move(bs->client, bs->origin, 5000); + bs->beStill = level.time + 200; + } + else + { + trap_EA_Move(bs->client, bs->goalMovedir, 5000); + } + + if (meleestrafe) + { + StrafeTracing(bs); + } + + if (bs->meleeStrafeDir && meleestrafe && bs->meleeStrafeDisable < level.time) + { + trap_EA_MoveRight(bs->client); + } + else if (meleestrafe && bs->meleeStrafeDisable < level.time) + { + trap_EA_MoveLeft(bs->client); + } + + if (BotTrace_Jump(bs, bs->goalPosition)) + { + bs->jumpTime = level.time + 100; + } + else if (BotTrace_Duck(bs, bs->goalPosition)) + { + bs->duckTime = level.time + 100; + } +#ifdef BOT_STRAFE_AVOIDANCE + else + { + int strafeAround = BotTrace_Strafe(bs, bs->goalPosition); + + if (strafeAround == STRAFEAROUND_RIGHT) + { + trap_EA_MoveRight(bs->client); + } + else if (strafeAround == STRAFEAROUND_LEFT) + { + trap_EA_MoveLeft(bs->client); + } + } +#endif + } + +#ifndef FORCEJUMP_INSTANTMETHOD + if (bs->forceJumpChargeTime > level.time) + { + bs->jumpTime = 0; + } +#endif + + if (bs->jumpPrep > level.time) + { + bs->forceJumpChargeTime = 0; + } + + if (bs->forceJumpChargeTime > level.time) + { + bs->jumpHoldTime = ((bs->forceJumpChargeTime - level.time)/2) + level.time; + bs->forceJumpChargeTime = 0; + } + + if (bs->jumpHoldTime > level.time) + { + bs->jumpTime = bs->jumpHoldTime; + } + + if (bs->jumpTime > level.time && bs->jDelay < level.time) + { + if (bs->jumpHoldTime > level.time) + { + trap_EA_Jump(bs->client); + if (bs->wpCurrent) + { + if ((bs->wpCurrent->origin[2] - bs->origin[2]) < 64) + { + trap_EA_MoveForward(bs->client); + } + } + else + { + trap_EA_MoveForward(bs->client); + } + if (g_entities[bs->client].client->ps.groundEntityNum == ENTITYNUM_NONE) + { + g_entities[bs->client].client->ps.pm_flags |= PMF_JUMP_HELD; + } + } + else if (!(bs->cur_ps.pm_flags & PMF_JUMP_HELD)) + { + trap_EA_Jump(bs->client); + } + } + + if (bs->duckTime > level.time) + { + trap_EA_Crouch(bs->client); + } + + if ( bs->dangerousObject && bs->dangerousObject->inuse && bs->dangerousObject->health > 0 && + bs->dangerousObject->takedamage && (!bs->frame_Enemy_Vis || !bs->currentEnemy) && + (BotGetWeaponRange(bs) == BWEAPONRANGE_MID || BotGetWeaponRange(bs) == BWEAPONRANGE_LONG) && + bs->cur_ps.weapon != WP_DET_PACK && bs->cur_ps.weapon != WP_TRIP_MINE && + !bs->shootGoal ) + { + float danLen; + + VectorSubtract(bs->dangerousObject->r.currentOrigin, bs->eye, a); + + danLen = VectorLength(a); + + if (danLen > 256) + { + vectoangles(a, a); + VectorCopy(a, bs->goalAngles); + + if (Q_irand(1, 10) < 5) + { + bs->goalAngles[YAW] += Q_irand(0, 3); + bs->goalAngles[PITCH] += Q_irand(0, 3); + } + else + { + bs->goalAngles[YAW] -= Q_irand(0, 3); + bs->goalAngles[PITCH] -= Q_irand(0, 3); + } + + if (InFieldOfVision(bs->viewangles, 30, a) && + EntityVisibleBox(bs->origin, NULL, NULL, bs->dangerousObject->r.currentOrigin, bs->client, bs->dangerousObject->s.number)) + { + bs->doAttack = 1; + } + } + } + + if (PrimFiring(bs) || + AltFiring(bs)) + { + friendInLOF = CheckForFriendInLOF(bs); + + if (friendInLOF) + { + if (PrimFiring(bs)) + { + KeepPrimFromFiring(bs); + } + if (AltFiring(bs)) + { + KeepAltFromFiring(bs); + } + if (useTheForce && forceHostile) + { + useTheForce = 0; + } + + if (!useTheForce && friendInLOF->client) + { //we have a friend here and are not currently using force powers, see if we can help them out + if (friendInLOF->health <= 50 && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_TEAM_HEAL]][FP_TEAM_HEAL]) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_TEAM_HEAL; + useTheForce = 1; + forceHostile = 0; + } + else if (friendInLOF->client->ps.fd.forcePower <= 50 && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_TEAM_FORCE]][FP_TEAM_FORCE]) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_TEAM_FORCE; + useTheForce = 1; + forceHostile = 0; + } + } + } + } + else if (g_gametype.integer >= GT_TEAM) + { //still check for anyone to help.. + friendInLOF = CheckForFriendInLOF(bs); + + if (!useTheForce && friendInLOF) + { + if (friendInLOF->health <= 50 && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_TEAM_HEAL]][FP_TEAM_HEAL]) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_TEAM_HEAL; + useTheForce = 1; + forceHostile = 0; + } + else if (friendInLOF->client->ps.fd.forcePower <= 50 && level.clients[bs->client].ps.fd.forcePower > forcePowerNeeded[level.clients[bs->client].ps.fd.forcePowerLevel[FP_TEAM_FORCE]][FP_TEAM_FORCE]) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_TEAM_FORCE; + useTheForce = 1; + forceHostile = 0; + } + } + } + + if (bs->doAttack && bs->cur_ps.weapon == WP_DET_PACK && + bs->cur_ps.hasDetPackPlanted) + { //maybe a bit hackish, but bots only want to plant one of these at any given time to avoid complications + bs->doAttack = 0; + } + + if (bs->doAttack && bs->cur_ps.weapon == WP_SABER && + bs->saberDefending && bs->currentEnemy && bs->currentEnemy->client && + BotWeaponBlockable(bs->currentEnemy->client->ps.weapon) ) + { + bs->doAttack = 0; + } + + if (bs->cur_ps.saberLockTime > level.time) + { + if (rand()%10 < 5) + { + bs->doAttack = 1; + } + else + { + bs->doAttack = 0; + } + } + + if (bs->botChallengingTime > level.time) + { + bs->doAttack = 0; + bs->doAltAttack = 0; + } + + if (bs->doAttack) + { + trap_EA_Attack(bs->client); + } + else if (bs->doAltAttack) + { + trap_EA_Alt_Attack(bs->client); + } + + if (useTheForce && forceHostile && bs->botChallengingTime > level.time) + { + useTheForce = qfalse; + } + + if (useTheForce) + { +#ifndef FORCEJUMP_INSTANTMETHOD + if (bs->forceJumpChargeTime > level.time) + { + level.clients[bs->client].ps.fd.forcePowerSelected = FP_LEVITATION; + trap_EA_ForcePower(bs->client); + } + else + { +#endif + if (bot_forcepowers.integer && !g_forcePowerDisable.integer) + { + trap_EA_ForcePower(bs->client); + } +#ifndef FORCEJUMP_INSTANTMETHOD + } +#endif + } + + MoveTowardIdealAngles(bs); +} +//end rww + +/* +================== +BotAIStartFrame +================== +*/ +int BotAIStartFrame(int time) { + int i; + int elapsed_time, thinktime; + static int local_time; + static int botlib_residual; + static int lastbotthink_time; + + G_CheckBotSpawn(); + + //rww - addl bot frame functions + if (gBotEdit) + { + trap_Cvar_Update(&bot_wp_info); + BotWaypointRender(); + } + + UpdateEventTracker(); + //end rww + + //cap the bot think time + //if the bot think time changed we should reschedule the bots + if (BOT_THINK_TIME != lastbotthink_time) { + lastbotthink_time = BOT_THINK_TIME; + BotScheduleBotThink(); + } + + elapsed_time = time - local_time; + local_time = time; + + if (elapsed_time > BOT_THINK_TIME) thinktime = elapsed_time; + else thinktime = BOT_THINK_TIME; + + // execute scheduled bot AI + for( i = 0; i < MAX_CLIENTS; i++ ) { + if( !botstates[i] || !botstates[i]->inuse ) { + continue; + } + // + botstates[i]->botthink_residual += elapsed_time; + // + if ( botstates[i]->botthink_residual >= thinktime ) { + botstates[i]->botthink_residual -= thinktime; + + if (g_entities[i].client->pers.connected == CON_CONNECTED) { + BotAI(i, (float) thinktime / 1000); + } + } + } + + // execute bot user commands every frame + for( i = 0; i < MAX_CLIENTS; i++ ) { + if( !botstates[i] || !botstates[i]->inuse ) { + continue; + } + if( g_entities[i].client->pers.connected != CON_CONNECTED ) { + continue; + } + + BotUpdateInput(botstates[i], time, elapsed_time); + trap_BotUserCommand(botstates[i]->client, &botstates[i]->lastucmd); + } + + return qtrue; +} + +/* +============== +BotAISetup +============== +*/ +int BotAISetup( int restart ) { + //rww - new bot cvars.. + trap_Cvar_Register(&bot_forcepowers, "bot_forcepowers", "1", CVAR_CHEAT); + trap_Cvar_Register(&bot_forgimmick, "bot_forgimmick", "0", CVAR_CHEAT); + //cm NOTE: I changed this for beta purposes + //trap_Cvar_Register(&bot_honorableduelacceptance, "bot_honorableduelacceptance", "0", CVAR_CHEAT); + trap_Cvar_Register(&bot_honorableduelacceptance, "bot_honorableduelacceptance", "0", 0); +#ifdef _DEBUG + trap_Cvar_Register(&bot_nogoals, "bot_nogoals", "0", CVAR_CHEAT); + trap_Cvar_Register(&bot_debugmessages, "bot_debugmessages", "0", CVAR_CHEAT); +#endif + + trap_Cvar_Register(&bot_attachments, "bot_attachments", "1", 0); + trap_Cvar_Register(&bot_camp, "bot_camp", "1", 0); + + trap_Cvar_Register(&bot_wp_info, "bot_wp_info", "1", 0); + trap_Cvar_Register(&bot_wp_edit, "bot_wp_edit", "0", CVAR_CHEAT); + trap_Cvar_Register(&bot_wp_clearweight, "bot_wp_clearweight", "1", 0); + trap_Cvar_Register(&bot_wp_distconnect, "bot_wp_distconnect", "1", 0); + trap_Cvar_Register(&bot_wp_visconnect, "bot_wp_visconnect", "1", 0); + + trap_Cvar_Update(&bot_forcepowers); + //end rww + + //if the game is restarted for a tournament + if (restart) { + return qtrue; + } + + //initialize the bot states + memset( botstates, 0, sizeof(botstates) ); + + if (!trap_BotLibSetup()) + { + return qfalse; //wts?! + } + + return qtrue; +} + +/* +============== +BotAIShutdown +============== +*/ +int BotAIShutdown( int restart ) { + + int i; + + //if the game is restarted for a tournament + if ( restart ) { + //shutdown all the bots in the botlib + for (i = 0; i < MAX_CLIENTS; i++) { + if (botstates[i] && botstates[i]->inuse) { + BotAIShutdownClient(botstates[i]->client, restart); + } + } + //don't shutdown the bot library + } + else { + trap_BotLibShutdown(); + } + return qtrue; +} + diff --git a/code/game/ai_main.h b/code/game/ai_main.h new file mode 100644 index 0000000..4de62d7 --- /dev/null +++ b/code/game/ai_main.h @@ -0,0 +1,414 @@ +#include "bg_saga.h" + +#define DEFAULT_FORCEPOWERS "5-1-000000000000000000" + +//#define FORCEJUMP_INSTANTMETHOD 1 + +#define MAX_CHAT_BUFFER_SIZE 8192 +#define MAX_CHAT_LINE_SIZE 128 + +#define MAX_WPARRAY_SIZE 4096 +#define MAX_NEIGHBOR_SIZE 32 + +#define MAX_NEIGHBOR_LINK_DISTANCE 128 +#define MAX_NEIGHBOR_FORCEJUMP_LINK_DISTANCE 400 + +#define TABLE_BRANCH_DISTANCE 32 +#define MAX_NODETABLE_SIZE 4096 + +#define MAX_LOVED_ONES 4 +#define MAX_ATTACHMENT_NAME 64 + +#define MAX_FORCE_INFO_SIZE 2048 + +#define WPFLAG_JUMP 0x00000010 //jump when we hit this +#define WPFLAG_DUCK 0x00000020 //duck while moving around here +#define WPFLAG_NOVIS 0x00000400 //go here for a bit even with no visibility +#define WPFLAG_SNIPEORCAMPSTAND 0x00000800 //a good position to snipe or camp - stand +#define WPFLAG_WAITFORFUNC 0x00001000 //wait for a func brushent under this point before moving here +#define WPFLAG_SNIPEORCAMP 0x00002000 //a good position to snipe or camp - crouch +#define WPFLAG_ONEWAY_FWD 0x00004000 //can only go forward on the trial from here (e.g. went over a ledge) +#define WPFLAG_ONEWAY_BACK 0x00008000 //can only go backward on the trail from here +#define WPFLAG_GOALPOINT 0x00010000 //make it a goal to get here.. goal points will be decided by setting "weight" values +#define WPFLAG_RED_FLAG 0x00020000 //red flag +#define WPFLAG_BLUE_FLAG 0x00040000 //blue flag +#define WPFLAG_SAGA_REBELOBJ 0x00080000 //rebel saga objective +#define WPFLAG_SAGA_IMPERIALOBJ 0x00100000 //imperial saga objective +#define WPFLAG_NOMOVEFUNC 0x00200000 //don't move over if a func is under + +#define LEVELFLAG_NOPOINTPREDICTION 1 //don't take waypoint beyond current into account when adjusting path view angles +#define LEVELFLAG_IGNOREINFALLBACK 2 //ignore enemies when in a fallback navigation routine +#define LEVELFLAG_IMUSTNTRUNAWAY 4 //don't be scared + +#define WP_KEEP_FLAG_DIST 128 + +#define BWEAPONRANGE_MELEE 1 +#define BWEAPONRANGE_MID 2 +#define BWEAPONRANGE_LONG 3 +#define BWEAPONRANGE_SABER 4 + +#define MELEE_ATTACK_RANGE 256 +#define SABER_ATTACK_RANGE 128 +#define MAX_CHICKENWUSS_TIME 10000 //wait 10 secs between checking which run-away path to take + +#define BOT_RUN_HEALTH 40 +#define BOT_WPTOUCH_DISTANCE 32 +#define ENEMY_FORGET_MS 10000 +//if our enemy isn't visible within 10000ms (aprx 10sec) then "forget" about him and treat him like every other threat, but still look for +//more immediate threats while main enemy is not visible + +#define BOT_PLANT_DISTANCE 256 //plant if within this radius from the last spotted enemy position +#define BOT_PLANT_INTERVAL 15000 //only plant once per 15 seconds at max +#define BOT_PLANT_BLOW_DISTANCE 256 //blow det packs if enemy is within this radius and I am further away than the enemy + +#define BOT_MAX_WEAPON_GATHER_TIME 1000 //spend a max of 1 second after spawn issuing orders to gather weapons before attacking enemy base +#define BOT_MAX_WEAPON_CHASE_TIME 15000 //time to spend gathering the weapon before persuing the enemy base (in case it takes longer than expected) + +#define BOT_MAX_WEAPON_CHASE_CTF 5000 //time to spend gathering the weapon before persuing the enemy base (in case it takes longer than expected) [ctf-only] + +#define BOT_MIN_SAGA_GOAL_SHOOT 1024 +#define BOT_MIN_SAGA_GOAL_TRAVEL 128 + +#define BASE_GUARD_DISTANCE 256 //guarding the flag +#define BASE_FLAGWAIT_DISTANCE 256 //has the enemy flag and is waiting in his own base for his flag to be returned +#define BASE_GETENEMYFLAG_DISTANCE 256 //waiting around to get the enemy's flag + +#define BOT_FLAG_GET_DISTANCE 256 + +#define BOT_SABER_THROW_RANGE 800 + +typedef enum +{ + CTFSTATE_NONE, + CTFSTATE_ATTACKER, + CTFSTATE_DEFENDER, + CTFSTATE_RETRIEVAL, + CTFSTATE_GUARDCARRIER, + CTFSTATE_GETFLAGHOME, + CTFSTATE_MAXCTFSTATES +} bot_ctf_state_t; + +typedef enum +{ + SAGASTATE_NONE, + SAGASTATE_ATTACKER, + SAGASTATE_DEFENDER, + SAGASTATE_MAXSAGASTATES +} bot_saga_state_t; + +typedef enum +{ + TEAMPLAYSTATE_NONE, + TEAMPLAYSTATE_FOLLOWING, + TEAMPLAYSTATE_ASSISTING, + TEAMPLAYSTATE_REGROUP, + TEAMPLAYSTATE_MAXTPSTATES +} bot_teamplay_state_t; + +typedef struct wpneighbor_s +{ + int num; + int forceJumpTo; +} wpneighbor_t; + +typedef struct wpobject_s +{ + vec3_t origin; + int inuse; + int index; + float weight; + float disttonext; + int flags; + int associated_entity; + + int forceJumpTo; + + int neighbornum; + //int neighbors[MAX_NEIGHBOR_SIZE]; + wpneighbor_t neighbors[MAX_NEIGHBOR_SIZE]; +} wpobject_t; + +typedef struct botattachment_s +{ + int level; + char name[MAX_ATTACHMENT_NAME]; +} botattachment_t; + +typedef struct nodeobject_s +{ + vec3_t origin; + int inuse; + int index; + float weight; + int flags; + int neighbornum; +} nodeobject_t; + +typedef struct boteventtracker_s +{ + int eventSequence; + int events[MAX_PS_EVENTS]; + float eventTime; +} boteventtracker_t; + +typedef struct botskills_s +{ + int reflex; + float accuracy; + float turnspeed; + float turnspeed_combat; + float maxturn; + int perfectaim; +} botskills_t; + +//bot state +typedef struct bot_state_s +{ + int inuse; //true if this state is used by a bot client + int botthink_residual; //residual for the bot thinks + int client; //client number of the bot + int entitynum; //entity number of the bot + playerState_t cur_ps; //current player state + usercmd_t lastucmd; //usercmd from last frame + bot_settings_t settings; //several bot settings + float thinktime; //time the bot thinks this frame + vec3_t origin; //origin of the bot + vec3_t velocity; //velocity of the bot + vec3_t eye; //eye coordinates of the bot + int setupcount; //true when the bot has just been setup + float ltime; //local bot time + float entergame_time; //time the bot entered the game + int ms; //move state of the bot + int gs; //goal state of the bot + int ws; //weapon state of the bot + vec3_t viewangles; //current view angles + vec3_t ideal_viewangles; //ideal view angles + vec3_t viewanglespeed; + + //rww - new AI values + gentity_t *currentEnemy; + gentity_t *revengeEnemy; + + gentity_t *squadLeader; + + gentity_t *lastHurt; + gentity_t *lastAttacked; + + gentity_t *wantFlag; + + gentity_t *touchGoal; + gentity_t *shootGoal; + + gentity_t *dangerousObject; + + vec3_t staticFlagSpot; + + int revengeHateLevel; + int isSquadLeader; + + int squadRegroupInterval; + int squadCannotLead; + + int lastDeadTime; + + wpobject_t *wpCurrent; + wpobject_t *wpDestination; + wpobject_t *wpStoreDest; + vec3_t goalAngles; + vec3_t goalMovedir; + vec3_t goalPosition; + + vec3_t lastEnemySpotted; + vec3_t hereWhenSpotted; + int lastVisibleEnemyIndex; + int hitSpotted; + + int wpDirection; + + float destinationGrabTime; + float wpSeenTime; + float wpTravelTime; + float wpDestSwitchTime; + float wpSwitchTime; + float wpDestIgnoreTime; + + float timeToReact; + + float enemySeenTime; + + float chickenWussCalculationTime; + + float beStill; + float duckTime; + float jumpTime; + float jumpHoldTime; + float jumpPrep; + float forceJumping; + float jDelay; + + float aimOffsetTime; + float aimOffsetAmtYaw; + float aimOffsetAmtPitch; + + float frame_Waypoint_Len; + int frame_Waypoint_Vis; + float frame_Enemy_Len; + int frame_Enemy_Vis; + + int isCamper; + float isCamping; + wpobject_t *wpCamping; + wpobject_t *wpCampingTo; + qboolean campStanding; + + int randomNavTime; + int randomNav; + + int saberSpecialist; + + int canChat; + int chatFrequency; + char currentChat[MAX_CHAT_LINE_SIZE]; + float chatTime; + float chatTime_stored; + int doChat; + int chatTeam; + gentity_t *chatObject; + gentity_t *chatAltObject; + + float meleeStrafeTime; + int meleeStrafeDir; + float meleeStrafeDisable; + + int altChargeTime; + + float escapeDirTime; + + float dontGoBack; + + int doAttack; + int doAltAttack; + + int forceWeaponSelect; + int virtualWeapon; + + int plantTime; + int plantDecided; + int plantContinue; + int plantKillEmAll; + + int runningLikeASissy; + int runningToEscapeThreat; + + //char chatBuffer[MAX_CHAT_BUFFER_SIZE]; + //Since we're once again not allocating bot structs dynamically, + //shoving a 64k chat buffer into one is a bad thing. + + botskills_t skills; + + botattachment_t loved[MAX_LOVED_ONES]; + int lovednum; + + int loved_death_thresh; + + int deathActivitiesDone; + + float botWeaponWeights[WP_NUM_WEAPONS]; + + int ctfState; + + int sagaState; + + int teamplayState; + + int jmState; + + int state_Forced; //set by player ordering menu + + int saberDefending; + int saberDefendDecideTime; + int saberBFTime; + int saberBTime; + int saberSTime; + int saberThrowTime; + + qboolean saberPower; + int saberPowerTime; + + int botChallengingTime; + + char forceinfo[MAX_FORCE_INFO_SIZE]; + +#ifndef FORCEJUMP_INSTANTMETHOD + int forceJumpChargeTime; +#endif + + int doForcePush; + + int noUseTime; + qboolean doingFallback; + //end rww +} bot_state_t; + +void *B_TempAlloc(int size); +void B_TempFree(int size); + +void *B_Alloc(int size); +void B_Free(void *ptr); + +//resets the whole bot state +void BotResetState(bot_state_t *bs); +//returns the number of bots in the game +int NumBots(void); + +void BotUtilizePersonality(bot_state_t *bs); +int BotDoChat(bot_state_t *bs, char *section, int always); +void StandardBotAI(bot_state_t *bs, float thinktime); +void BotWaypointRender(void); +int OrgVisibleBox(vec3_t org1, vec3_t mins, vec3_t maxs, vec3_t org2, int ignore); +int BotIsAChickenWuss(bot_state_t *bs); +int GetNearestVisibleWP(vec3_t org, int ignore); +int GetBestIdleGoal(bot_state_t *bs); + +char *ConcatArgs( int start ); + +extern vmCvar_t bot_forcepowers; +extern vmCvar_t bot_forgimmick; +extern vmCvar_t bot_honorableduelacceptance; +#ifdef _DEBUG +extern vmCvar_t bot_nogoals; +extern vmCvar_t bot_debugmessages; +#endif + +extern vmCvar_t bot_attachments; +extern vmCvar_t bot_camp; + +extern vmCvar_t bot_wp_info; +extern vmCvar_t bot_wp_edit; +extern vmCvar_t bot_wp_clearweight; +extern vmCvar_t bot_wp_distconnect; +extern vmCvar_t bot_wp_visconnect; + +extern wpobject_t *flagRed; +extern wpobject_t *oFlagRed; +extern wpobject_t *flagBlue; +extern wpobject_t *oFlagBlue; + +extern gentity_t *eFlagRed; +extern gentity_t *eFlagBlue; + +extern char gBotChatBuffer[MAX_CLIENTS][MAX_CHAT_BUFFER_SIZE]; +extern float gWPRenderTime; +extern float gDeactivated; +extern float gBotEdit; +extern int gWPRenderedFrame; +extern wpobject_t *gWPArray[MAX_WPARRAY_SIZE]; +extern int gWPNum; +extern int gLastPrintedIndex; +extern nodeobject_t nodetable[MAX_NODETABLE_SIZE]; +extern int nodenum; + +extern int gLevelFlags; + +extern float floattime; +#define FloatTime() floattime diff --git a/code/game/ai_util.c b/code/game/ai_util.c new file mode 100644 index 0000000..4884f56 --- /dev/null +++ b/code/game/ai_util.c @@ -0,0 +1,866 @@ +#include "g_local.h" +#include "q_shared.h" +#include "botlib.h" +#include "ai_main.h" + +#ifdef BOT_ZMALLOC +#define MAX_BALLOC 8192 + +void *BAllocList[MAX_BALLOC]; +#endif + +char gBotChatBuffer[MAX_CLIENTS][MAX_CHAT_BUFFER_SIZE]; + +void *B_TempAlloc(int size) +{ + return BG_TempAlloc(size); +} + +void B_TempFree(int size) +{ + BG_TempFree(size); +} + + +void *B_Alloc(int size) +{ +#ifdef BOT_ZMALLOC + void *ptr = NULL; + int i = 0; + +#ifdef BOTMEMTRACK + int free = 0; + int used = 0; + + while (i < MAX_BALLOC) + { + if (!BAllocList[i]) + { + free++; + } + else + { + used++; + } + + i++; + } + + G_Printf("Allocations used: %i\nFree allocation slots: %i\n", used, free); + + i = 0; +#endif + + ptr = trap_BotGetMemoryGame(size); + + while (i < MAX_BALLOC) + { + if (!BAllocList[i]) + { + BAllocList[i] = ptr; + break; + } + i++; + } + + if (i == MAX_BALLOC) + { + //If this happens we'll have to rely on this chunk being freed manually with B_Free, which it hopefully will be +#ifdef DEBUG + G_Printf("WARNING: MAXIMUM B_ALLOC ALLOCATIONS EXCEEDED\n"); +#endif + } + + return ptr; +#else + + return BG_Alloc(size); + +#endif +} + +void B_Free(void *ptr) +{ +#ifdef BOT_ZMALLOC + int i = 0; + +#ifdef BOTMEMTRACK + int free = 0; + int used = 0; + + while (i < MAX_BALLOC) + { + if (!BAllocList[i]) + { + free++; + } + else + { + used++; + } + + i++; + } + + G_Printf("Allocations used: %i\nFree allocation slots: %i\n", used, free); + + i = 0; +#endif + + while (i < MAX_BALLOC) + { + if (BAllocList[i] == ptr) + { + BAllocList[i] = NULL; + break; + } + + i++; + } + + if (i == MAX_BALLOC) + { + //Likely because the limit was exceeded and we're now freeing the chunk manually as we hoped would happen +#ifdef DEBUG + G_Printf("WARNING: Freeing allocation which is not in the allocation structure\n"); +#endif + } + + trap_BotFreeMemoryGame(ptr); +#endif +} + +void B_InitAlloc(void) +{ +#ifdef BOT_ZMALLOC + memset(BAllocList, 0, sizeof(BAllocList)); +#endif + + memset(gWPArray, 0, sizeof(gWPArray)); +} + +void B_CleanupAlloc(void) +{ +#ifdef BOT_ZMALLOC + int i = 0; + + while (i < MAX_BALLOC) + { + if (BAllocList[i]) + { + trap_BotFreeMemoryGame(BAllocList[i]); + BAllocList[i] = NULL; + } + + i++; + } +#endif +} + +int GetValueGroup(char *buf, char *group, char *outbuf) +{ + char *place, *placesecond; + int iplace; + int failure; + int i; + int startpoint, startletter; + int subg = 0; + + i = 0; + + iplace = 0; + + place = strstr(buf, group); + + if (!place) + { + return 0; + } + + startpoint = place - buf + strlen(group) + 1; + startletter = (place - buf) - 1; + + failure = 0; + + while (buf[startpoint+1] != '{' || buf[startletter] != '\n') + { + placesecond = strstr(place+1, group); + + if (placesecond) + { + startpoint += (placesecond - place); + startletter += (placesecond - place); + place = placesecond; + } + else + { + failure = 1; + break; + } + } + + if (failure) + { + return 0; + } + + //we have found the proper group name if we made it here, so find the opening brace and read into the outbuf + //until hitting the end brace + + while (buf[startpoint] != '{') + { + startpoint++; + } + + startpoint++; + + while (buf[startpoint] != '}' || subg) + { + if (buf[startpoint] == '{') + { + subg++; + } + else if (buf[startpoint] == '}') + { + subg--; + } + outbuf[i] = buf[startpoint]; + i++; + startpoint++; + } + outbuf[i] = '\0'; + + return 1; +} + +int GetPairedValue(char *buf, char *key, char *outbuf) +{ + char *place, *placesecond; + int startpoint, startletter; + int i, found; + + if (!buf || !key || !outbuf) + { + return 0; + } + + i = 0; + + while (buf[i] && buf[i] != '\0') + { + if (buf[i] == '/') + { + if (buf[i+1] && buf[i+1] != '\0' && buf[i+1] == '/') + { + while (buf[i] != '\n') + { + buf[i] = '/'; + i++; + } + } + } + i++; + } + + place = strstr(buf, key); + + if (!place) + { + return 0; + } + //tab == 9 + startpoint = place - buf + strlen(key); + startletter = (place - buf) - 1; + + found = 0; + + while (!found) + { + if (startletter == 0 || !buf[startletter] || buf[startletter] == '\0' || buf[startletter] == 9 || buf[startletter] == ' ' || buf[startletter] == '\n') + { + if (buf[startpoint] == '\0' || buf[startpoint] == 9 || buf[startpoint] == ' ' || buf[startpoint] == '\n') + { + found = 1; + break; + } + } + + placesecond = strstr(place+1, key); + + if (placesecond) + { + startpoint += placesecond - place; + startletter += placesecond - place; + place = placesecond; + } + else + { + place = NULL; + break; + } + + } + + if (!found || !place || !buf[startpoint] || buf[startpoint] == '\0') + { + return 0; + } + + while (buf[startpoint] == ' ' || buf[startpoint] == 9 || buf[startpoint] == '\n') + { + startpoint++; + } + + i = 0; + + while (buf[startpoint] && buf[startpoint] != '\0' && buf[startpoint] != '\n') + { + outbuf[i] = buf[startpoint]; + i++; + startpoint++; + } + + outbuf[i] = '\0'; + + return 1; +} + +int BotDoChat(bot_state_t *bs, char *section, int always) +{ + char *chatgroup; + int rVal; + int inc_1; + int inc_2; + int inc_n; + int lines; + int checkedline; + int getthisline; + gentity_t *cobject; + + if (!bs->canChat) + { + return 0; + } + + if (bs->doChat) + { //already have a chat scheduled + return 0; + } + + if (trap_Cvar_VariableIntegerValue("sp_language")) + { //no chatting unless English. + return 0; + } + + if (Q_irand(1, 10) > bs->chatFrequency && !always) + { + return 0; + } + + bs->chatTeam = 0; + + chatgroup = (char *)B_TempAlloc(MAX_CHAT_BUFFER_SIZE); + + rVal = GetValueGroup(gBotChatBuffer[bs->client], section, chatgroup); + + if (!rVal) //the bot has no group defined for the specified chat event + { + B_TempFree(MAX_CHAT_BUFFER_SIZE); //chatgroup + return 0; + } + + inc_1 = 0; + inc_2 = 2; + + while (chatgroup[inc_2] && chatgroup[inc_2] != '\0') + { + if (chatgroup[inc_2] != 13 && chatgroup[inc_2] != 9) + { + chatgroup[inc_1] = chatgroup[inc_2]; + inc_1++; + } + inc_2++; + } + chatgroup[inc_1] = '\0'; + + inc_1 = 0; + + lines = 0; + + while (chatgroup[inc_1] && chatgroup[inc_1] != '\0') + { + if (chatgroup[inc_1] == '\n') + { + lines++; + } + inc_1++; + } + + if (!lines) + { + B_TempFree(MAX_CHAT_BUFFER_SIZE); //chatgroup + return 0; + } + + getthisline = Q_irand(0, (lines+1)); + + if (getthisline < 1) + { + getthisline = 1; + } + if (getthisline > lines) + { + getthisline = lines; + } + + checkedline = 1; + + inc_1 = 0; + + while (checkedline != getthisline) + { + if (chatgroup[inc_1] && chatgroup[inc_1] != '\0') + { + if (chatgroup[inc_1] == '\n') + { + inc_1++; + checkedline++; + } + } + + if (checkedline == getthisline) + { + break; + } + + inc_1++; + } + + //we're at the starting position of the desired line here + inc_2 = 0; + + while (chatgroup[inc_1] != '\n') + { + chatgroup[inc_2] = chatgroup[inc_1]; + inc_2++; + inc_1++; + } + chatgroup[inc_2] = '\0'; + + //trap_EA_Say(bs->client, chatgroup); + inc_1 = 0; + inc_2 = 0; + + if (strlen(chatgroup) > MAX_CHAT_LINE_SIZE) + { + B_TempFree(MAX_CHAT_BUFFER_SIZE); //chatgroup + return 0; + } + + while (chatgroup[inc_1]) + { + if (chatgroup[inc_1] == '%' && chatgroup[inc_1+1] != '%') + { + inc_1++; + + if (chatgroup[inc_1] == 's' && bs->chatObject) + { + cobject = bs->chatObject; + } + else if (chatgroup[inc_1] == 'a' && bs->chatAltObject) + { + cobject = bs->chatAltObject; + } + else + { + cobject = NULL; + } + + if (cobject && cobject->client) + { + inc_n = 0; + + while (cobject->client->pers.netname[inc_n]) + { + bs->currentChat[inc_2] = cobject->client->pers.netname[inc_n]; + inc_2++; + inc_n++; + } + inc_2--; //to make up for the auto-increment below + } + } + else + { + bs->currentChat[inc_2] = chatgroup[inc_1]; + } + inc_2++; + inc_1++; + } + bs->currentChat[inc_2] = '\0'; + + if (strcmp(section, "GeneralGreetings") == 0) + { + bs->doChat = 2; + } + else + { + bs->doChat = 1; + } + bs->chatTime_stored = (strlen(bs->currentChat)*45)+Q_irand(1300, 1500); + bs->chatTime = level.time + bs->chatTime_stored; + + B_TempFree(MAX_CHAT_BUFFER_SIZE); //chatgroup + + return 1; +} + +void ParseEmotionalAttachments(bot_state_t *bs, char *buf) +{ + int i = 0; + int i_c = 0; + char tbuf[16]; + + while (buf[i] && buf[i] != '}') + { + while (buf[i] == ' ' || buf[i] == '{' || buf[i] == 9 || buf[i] == 13 || buf[i] == '\n') + { + i++; + } + + if (buf[i] && buf[i] != '}') + { + i_c = 0; + while (buf[i] != '{' && buf[i] != 9 && buf[i] != 13 && buf[i] != '\n') + { + bs->loved[bs->lovednum].name[i_c] = buf[i]; + i_c++; + i++; + } + bs->loved[bs->lovednum].name[i_c] = '\0'; + + while (buf[i] == ' ' || buf[i] == '{' || buf[i] == 9 || buf[i] == 13 || buf[i] == '\n') + { + i++; + } + + i_c = 0; + + while (buf[i] != '{' && buf[i] != 9 && buf[i] != 13 && buf[i] != '\n') + { + tbuf[i_c] = buf[i]; + i_c++; + i++; + } + tbuf[i_c] = '\0'; + + bs->loved[bs->lovednum].level = atoi(tbuf); + + bs->lovednum++; + } + else + { + break; + } + + if (bs->lovednum >= MAX_LOVED_ONES) + { + return; + } + + i++; + } +} + +int ReadChatGroups(bot_state_t *bs, char *buf) +{ + char *cgroupbegin; + int cgbplace; + int i; + + cgroupbegin = strstr(buf, "BEGIN_CHAT_GROUPS"); + + if (!cgroupbegin) + { + return 0; + } + + if (strlen(cgroupbegin) >= MAX_CHAT_BUFFER_SIZE) + { + G_Printf(S_COLOR_RED "Error: Personality chat section exceeds max size\n"); + return 0; + } + + cgbplace = cgroupbegin - buf+1; + + while (buf[cgbplace] != '\n') + { + cgbplace++; + } + + i = 0; + + while (buf[cgbplace] && buf[cgbplace] != '\0') + { + gBotChatBuffer[bs->client][i] = buf[cgbplace]; + i++; + cgbplace++; + } + + gBotChatBuffer[bs->client][i] = '\0'; + + return 1; +} + +void BotUtilizePersonality(bot_state_t *bs) +{ + fileHandle_t f; + int len, rlen; + int failed; + int i; + //char buf[131072]; + char *buf = (char *)B_TempAlloc(131072); + char *readbuf, *group; + + len = trap_FS_FOpenFile(bs->settings.personalityfile, &f, FS_READ); + + failed = 0; + + if (!f) + { + G_Printf(S_COLOR_RED "Error: Specified personality not found\n"); + B_TempFree(131072); //buf + return; + } + + if (len >= 131072) + { + G_Printf(S_COLOR_RED "Personality file exceeds maximum length\n"); + B_TempFree(131072); //buf + return; + } + + trap_FS_Read(buf, len, f); + + rlen = len; + + while (len < 131072) + { //kill all characters after the file length, since sometimes FS_Read doesn't do that entirely (or so it seems) + buf[len] = '\0'; + len++; + } + + len = rlen; + + readbuf = (char *)B_TempAlloc(1024); + group = (char *)B_TempAlloc(65536); + + if (!GetValueGroup(buf, "GeneralBotInfo", group)) + { + G_Printf(S_COLOR_RED "Personality file contains no GeneralBotInfo group\n"); + failed = 1; //set failed so we know to set everything to default values + } + + if (!failed && GetPairedValue(group, "reflex", readbuf)) + { + bs->skills.reflex = atoi(readbuf); + } + else + { + bs->skills.reflex = 100; //default + } + + if (!failed && GetPairedValue(group, "accuracy", readbuf)) + { + bs->skills.accuracy = atof(readbuf); + } + else + { + bs->skills.accuracy = 10; //default + } + + if (!failed && GetPairedValue(group, "turnspeed", readbuf)) + { + bs->skills.turnspeed = atof(readbuf); + } + else + { + bs->skills.turnspeed = 0.01f; //default + } + + if (!failed && GetPairedValue(group, "turnspeed_combat", readbuf)) + { + bs->skills.turnspeed_combat = atof(readbuf); + } + else + { + bs->skills.turnspeed_combat = 0.05f; //default + } + + if (!failed && GetPairedValue(group, "maxturn", readbuf)) + { + bs->skills.maxturn = atof(readbuf); + } + else + { + bs->skills.maxturn = 360; //default + } + + if (!failed && GetPairedValue(group, "perfectaim", readbuf)) + { + bs->skills.perfectaim = atoi(readbuf); + } + else + { + bs->skills.perfectaim = 0; //default + } + + if (!failed && GetPairedValue(group, "chatability", readbuf)) + { + bs->canChat = atoi(readbuf); + } + else + { + bs->canChat = 0; //default + } + + if (!failed && GetPairedValue(group, "chatfrequency", readbuf)) + { + bs->chatFrequency = atoi(readbuf); + } + else + { + bs->chatFrequency = 5; //default + } + + if (!failed && GetPairedValue(group, "hatelevel", readbuf)) + { + bs->loved_death_thresh = atoi(readbuf); + } + else + { + bs->loved_death_thresh = 3; //default + } + + if (!failed && GetPairedValue(group, "camper", readbuf)) + { + bs->isCamper = atoi(readbuf); + } + else + { + bs->isCamper = 0; //default + } + + if (!failed && GetPairedValue(group, "saberspecialist", readbuf)) + { + bs->saberSpecialist = atoi(readbuf); + } + else + { + bs->saberSpecialist = 0; //default + } + + if (!failed && GetPairedValue(group, "forceinfo", readbuf)) + { + Com_sprintf(bs->forceinfo, sizeof(bs->forceinfo), "%s\0", readbuf); + } + else + { + Com_sprintf(bs->forceinfo, sizeof(bs->forceinfo), "%s\0", DEFAULT_FORCEPOWERS); + } + + i = 0; + + while (i < MAX_CHAT_BUFFER_SIZE) + { //clear out the chat buffer for this bot + gBotChatBuffer[bs->client][i] = '\0'; + i++; + } + + if (bs->canChat) + { + if (!ReadChatGroups(bs, buf)) + { + bs->canChat = 0; + } + } + + if (GetValueGroup(buf, "BotWeaponWeights", group)) + { + if (GetPairedValue(group, "WP_STUN_BATON", readbuf)) + { + bs->botWeaponWeights[WP_STUN_BATON] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_SABER", readbuf)) + { + bs->botWeaponWeights[WP_SABER] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_BRYAR_PISTOL", readbuf)) + { + bs->botWeaponWeights[WP_BRYAR_PISTOL] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_BLASTER", readbuf)) + { + bs->botWeaponWeights[WP_BLASTER] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_DISRUPTOR", readbuf)) + { + bs->botWeaponWeights[WP_DISRUPTOR] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_BOWCASTER", readbuf)) + { + bs->botWeaponWeights[WP_BOWCASTER] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_REPEATER", readbuf)) + { + bs->botWeaponWeights[WP_REPEATER] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_DEMP2", readbuf)) + { + bs->botWeaponWeights[WP_DEMP2] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_FLECHETTE", readbuf)) + { + bs->botWeaponWeights[WP_FLECHETTE] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_ROCKET_LAUNCHER", readbuf)) + { + bs->botWeaponWeights[WP_ROCKET_LAUNCHER] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_THERMAL", readbuf)) + { + bs->botWeaponWeights[WP_THERMAL] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_TRIP_MINE", readbuf)) + { + bs->botWeaponWeights[WP_TRIP_MINE] = atoi(readbuf); + } + + if (GetPairedValue(group, "WP_DET_PACK", readbuf)) + { + bs->botWeaponWeights[WP_DET_PACK] = atoi(readbuf); + } + } + + bs->lovednum = 0; + + if (GetValueGroup(buf, "EmotionalAttachments", group)) + { + ParseEmotionalAttachments(bs, group); + } + + B_TempFree(131072); //buf + B_TempFree(1024); //readbuf + B_TempFree(65536); //group + trap_FS_FCloseFile(f); +} diff --git a/code/game/ai_wpnav.c b/code/game/ai_wpnav.c new file mode 100644 index 0000000..8d224e7 --- /dev/null +++ b/code/game/ai_wpnav.c @@ -0,0 +1,2566 @@ +#include "g_local.h" +#include "q_shared.h" +#include "botlib.h" +#include "ai_main.h" + +float gWPRenderTime = 0; +float gDeactivated = 0; +float gBotEdit = 0; +int gWPRenderedFrame = 0; +wpobject_t *gWPArray[MAX_WPARRAY_SIZE]; +int gWPNum = 0; +int gLastPrintedIndex = -1; + +nodeobject_t nodetable[MAX_NODETABLE_SIZE]; +int nodenum; //so we can connect broken trails + +int gLevelFlags = 0; + +char *GetFlagStr( int flags ) +{ + char *flagstr; + int i; + + flagstr = (char *)B_TempAlloc(128); + i = 0; + + if (!flags) + { + strcpy(flagstr, "none\0"); + goto fend; + } + + if (flags & WPFLAG_JUMP) + { + flagstr[i] = 'j'; + i++; + } + + if (flags & WPFLAG_DUCK) + { + flagstr[i] = 'd'; + i++; + } + + if (flags & WPFLAG_SNIPEORCAMPSTAND) + { + flagstr[i] = 'c'; + i++; + } + + if (flags & WPFLAG_WAITFORFUNC) + { + flagstr[i] = 'f'; + i++; + } + + if (flags & WPFLAG_SNIPEORCAMP) + { + flagstr[i] = 's'; + i++; + } + + if (flags & WPFLAG_ONEWAY_FWD) + { + flagstr[i] = 'x'; + i++; + } + + if (flags & WPFLAG_ONEWAY_BACK) + { + flagstr[i] = 'y'; + i++; + } + + if (flags & WPFLAG_GOALPOINT) + { + flagstr[i] = 'g'; + i++; + } + + if (flags & WPFLAG_NOVIS) + { + flagstr[i] = 'n'; + i++; + } + + if (flags & WPFLAG_NOMOVEFUNC) + { + flagstr[i] = 'm'; + i++; + } + + if (flags & WPFLAG_RED_FLAG) + { + if (i) + { + flagstr[i] = ' '; + i++; + } + flagstr[i] = 'r'; + i++; + flagstr[i] = 'e'; + i++; + flagstr[i] = 'd'; + i++; + flagstr[i] = ' '; + i++; + flagstr[i] = 'f'; + i++; + flagstr[i] = 'l'; + i++; + flagstr[i] = 'a'; + i++; + flagstr[i] = 'g'; + i++; + } + + if (flags & WPFLAG_BLUE_FLAG) + { + if (i) + { + flagstr[i] = ' '; + i++; + } + flagstr[i] = 'b'; + i++; + flagstr[i] = 'l'; + i++; + flagstr[i] = 'u'; + i++; + flagstr[i] = 'e'; + i++; + flagstr[i] = ' '; + i++; + flagstr[i] = 'f'; + i++; + flagstr[i] = 'l'; + i++; + flagstr[i] = 'a'; + i++; + flagstr[i] = 'g'; + i++; + } + + if (flags & WPFLAG_SAGA_IMPERIALOBJ) + { + if (i) + { + flagstr[i] = ' '; + i++; + } + flagstr[i] = 's'; + i++; + flagstr[i] = 'a'; + i++; + flagstr[i] = 'g'; + i++; + flagstr[i] = 'a'; + i++; + flagstr[i] = '_'; + i++; + flagstr[i] = 'i'; + i++; + flagstr[i] = 'm'; + i++; + flagstr[i] = 'p'; + i++; + } + + if (flags & WPFLAG_SAGA_REBELOBJ) + { + if (i) + { + flagstr[i] = ' '; + i++; + } + flagstr[i] = 's'; + i++; + flagstr[i] = 'a'; + i++; + flagstr[i] = 'g'; + i++; + flagstr[i] = 'a'; + i++; + flagstr[i] = '_'; + i++; + flagstr[i] = 'r'; + i++; + flagstr[i] = 'e'; + i++; + flagstr[i] = 'b'; + i++; + } + + flagstr[i] = '\0'; + + if (i == 0) + { + strcpy(flagstr, "unknown\0"); + } + +fend: + return flagstr; +} + +void G_TestLine(vec3_t start, vec3_t end, int color, int time) +{ + gentity_t *te; + + te = G_TempEntity( start, EV_TESTLINE ); + VectorCopy(start, te->s.origin); + VectorCopy(end, te->s.origin2); + te->s.time2 = time; + te->s.weapon = color; + te->r.svFlags |= SVF_BROADCAST; +} + +void BotWaypointRender(void) +{ + int i, n; + int inc_checker; + int bestindex; + int gotbestindex; + float bestdist; + float checkdist; + gentity_t *plum; + gentity_t *viewent; + char *flagstr; + vec3_t a; + + if (!gBotEdit) + { + return; + } + + bestindex = 0; + + if (gWPRenderTime > level.time) + { + goto checkprint; + } + + gWPRenderTime = level.time + 100; + + i = gWPRenderedFrame; + inc_checker = gWPRenderedFrame; + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse) + { + plum = G_TempEntity( gWPArray[i]->origin, EV_SCOREPLUM ); + plum->r.svFlags |= SVF_BROADCAST; + plum->s.time = i; + + n = 0; + + while (n < gWPArray[i]->neighbornum) + { + if (gWPArray[i]->neighbors[n].forceJumpTo && gWPArray[gWPArray[i]->neighbors[n].num]) + { + G_TestLine(gWPArray[i]->origin, gWPArray[gWPArray[i]->neighbors[n].num]->origin, 0x0000ff, 5000); + } + n++; + } + + gWPRenderedFrame++; + } + else + { + gWPRenderedFrame = 0; + break; + } + + if ((i - inc_checker) > 4) + { + break; //don't render too many at once + } + i++; + } + + if (i >= gWPNum) + { + gWPRenderTime = level.time + 1500; //wait a bit after we finish doing the whole trail + gWPRenderedFrame = 0; + } + +checkprint: + + if (!bot_wp_info.value) + { + return; + } + + viewent = &g_entities[0]; //only show info to the first client + + if (!viewent || !viewent->client) + { //client isn't in the game yet? + return; + } + + bestdist = 256; //max distance for showing point info + gotbestindex = 0; + + i = 0; + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse) + { + VectorSubtract(viewent->client->ps.origin, gWPArray[i]->origin, a); + + checkdist = VectorLength(a); + + if (checkdist < bestdist) + { + bestdist = checkdist; + bestindex = i; + gotbestindex = 1; + } + } + i++; + } + + if (gotbestindex && bestindex != gLastPrintedIndex) + { + flagstr = GetFlagStr(gWPArray[bestindex]->flags); + gLastPrintedIndex = bestindex; + G_Printf(S_COLOR_YELLOW "Waypoint %i\nFlags - %i (%s) (w%f)\nOrigin - (%i %i %i)\n", (int)(gWPArray[bestindex]->index), (int)(gWPArray[bestindex]->flags), flagstr, gWPArray[bestindex]->weight, (int)(gWPArray[bestindex]->origin[0]), (int)(gWPArray[bestindex]->origin[1]), (int)(gWPArray[bestindex]->origin[2])); + //GetFlagStr allocates 128 bytes for this, if it's changed then obviously this must be as well + B_TempFree(128); //flagstr + + plum = G_TempEntity( gWPArray[bestindex]->origin, EV_SCOREPLUM ); + plum->r.svFlags |= SVF_BROADCAST; + plum->s.time = bestindex; //render it once + } + else if (!gotbestindex) + { + gLastPrintedIndex = -1; + } +} + +void TransferWPData(int from, int to) +{ + if (!gWPArray[to]) + { + gWPArray[to] = (wpobject_t *)B_Alloc(sizeof(wpobject_t)); + } + + if (!gWPArray[to]) + { + G_Printf(S_COLOR_RED "FATAL ERROR: Could not allocated memory for waypoint\n"); + } + + gWPArray[to]->flags = gWPArray[from]->flags; + gWPArray[to]->weight = gWPArray[from]->weight; + gWPArray[to]->associated_entity = gWPArray[from]->associated_entity; + gWPArray[to]->disttonext = gWPArray[from]->disttonext; + gWPArray[to]->forceJumpTo = gWPArray[from]->forceJumpTo; + gWPArray[to]->index = to; + gWPArray[to]->inuse = gWPArray[from]->inuse; + VectorCopy(gWPArray[from]->origin, gWPArray[to]->origin); +} + +void CreateNewWP(vec3_t origin, int flags) +{ + if (gWPNum >= MAX_WPARRAY_SIZE) + { + G_Printf(S_COLOR_YELLOW "Warning: Waypoint limit hit (%i)\n", MAX_WPARRAY_SIZE); + return; + } + + if (!gWPArray[gWPNum]) + { + gWPArray[gWPNum] = (wpobject_t *)B_Alloc(sizeof(wpobject_t)); + } + + if (!gWPArray[gWPNum]) + { + G_Printf(S_COLOR_RED "ERROR: Could not allocated memory for waypoint\n"); + } + + gWPArray[gWPNum]->flags = flags; + gWPArray[gWPNum]->weight = 0; //calculated elsewhere + gWPArray[gWPNum]->associated_entity = ENTITYNUM_NONE; //set elsewhere + gWPArray[gWPNum]->forceJumpTo = 0; + gWPArray[gWPNum]->disttonext = 0; //calculated elsewhere + gWPArray[gWPNum]->index = gWPNum; + gWPArray[gWPNum]->inuse = 1; + VectorCopy(origin, gWPArray[gWPNum]->origin); + gWPNum++; +} + +void CreateNewWP_FromObject(wpobject_t *wp) +{ + int i; + + if (gWPNum >= MAX_WPARRAY_SIZE) + { + return; + } + + if (!gWPArray[gWPNum]) + { + gWPArray[gWPNum] = (wpobject_t *)B_Alloc(sizeof(wpobject_t)); + } + + if (!gWPArray[gWPNum]) + { + G_Printf(S_COLOR_RED "ERROR: Could not allocated memory for waypoint\n"); + } + + gWPArray[gWPNum]->flags = wp->flags; + gWPArray[gWPNum]->weight = wp->weight; + gWPArray[gWPNum]->associated_entity = wp->associated_entity; + gWPArray[gWPNum]->disttonext = wp->disttonext; + gWPArray[gWPNum]->forceJumpTo = wp->forceJumpTo; + gWPArray[gWPNum]->index = gWPNum; + gWPArray[gWPNum]->inuse = 1; + VectorCopy(wp->origin, gWPArray[gWPNum]->origin); + gWPArray[gWPNum]->neighbornum = wp->neighbornum; + + i = wp->neighbornum; + + while (i >= 0) + { + gWPArray[gWPNum]->neighbors[i].num = wp->neighbors[i].num; + gWPArray[gWPNum]->neighbors[i].forceJumpTo = wp->neighbors[i].forceJumpTo; + + i--; + } + + if (gWPArray[gWPNum]->flags & WPFLAG_RED_FLAG) + { + flagRed = gWPArray[gWPNum]; + oFlagRed = flagRed; + } + else if (gWPArray[gWPNum]->flags & WPFLAG_BLUE_FLAG) + { + flagBlue = gWPArray[gWPNum]; + oFlagBlue = flagBlue; + } + + gWPNum++; +} + +void RemoveWP(void) +{ + if (gWPNum <= 0) + { + return; + } + + gWPNum--; + + if (!gWPArray[gWPNum] || !gWPArray[gWPNum]->inuse) + { + return; + } + + //B_Free((wpobject_t *)gWPArray[gWPNum]); + if (gWPArray[gWPNum]) + { + memset( gWPArray[gWPNum], 0, sizeof(gWPArray[gWPNum]) ); + } + + //gWPArray[gWPNum] = NULL; + + if (gWPArray[gWPNum]) + { + gWPArray[gWPNum]->inuse = 0; + } +} + +void RemoveWP_InTrail(int afterindex) +{ + int foundindex; + int foundanindex; + int didchange; + int i; + + foundindex = 0; + foundanindex = 0; + didchange = 0; + i = 0; + + if (afterindex < 0 || afterindex >= gWPNum) + { + G_Printf(S_COLOR_YELLOW "Waypoint number %i does not exist\n", afterindex); + return; + } + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse && gWPArray[i]->index == afterindex) + { + foundindex = i; + foundanindex = 1; + break; + } + + i++; + } + + if (!foundanindex) + { + G_Printf(S_COLOR_YELLOW "Waypoint index %i should exist, but does not (?)\n", afterindex); + return; + } + + i = 0; + + while (i <= gWPNum) + { + if (gWPArray[i] && gWPArray[i]->index == foundindex) + { + //B_Free(gWPArray[i]); + + //Keep reusing the memory + memset( gWPArray[i], 0, sizeof(gWPArray[i]) ); + + //gWPArray[i] = NULL; + gWPArray[i]->inuse = 0; + didchange = 1; + } + else if (gWPArray[i] && didchange) + { + TransferWPData(i, i-1); + //B_Free(gWPArray[i]); + + //Keep reusing the memory + memset( gWPArray[i], 0, sizeof(gWPArray[i]) ); + + //gWPArray[i] = NULL; + gWPArray[i]->inuse = 0; + } + + i++; + } + gWPNum--; +} + +int CreateNewWP_InTrail(vec3_t origin, int flags, int afterindex) +{ + int foundindex; + int foundanindex; + int i; + + foundindex = 0; + foundanindex = 0; + i = 0; + + if (gWPNum >= MAX_WPARRAY_SIZE) + { + G_Printf(S_COLOR_YELLOW "Warning: Waypoint limit hit (%i)\n", MAX_WPARRAY_SIZE); + return 0; + } + + if (afterindex < 0 || afterindex >= gWPNum) + { + G_Printf(S_COLOR_YELLOW "Waypoint number %i does not exist\n", afterindex); + return 0; + } + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse && gWPArray[i]->index == afterindex) + { + foundindex = i; + foundanindex = 1; + break; + } + + i++; + } + + if (!foundanindex) + { + G_Printf(S_COLOR_YELLOW "Waypoint index %i should exist, but does not (?)\n", afterindex); + return 0; + } + + i = gWPNum; + + while (i >= 0) + { + if (gWPArray[i] && gWPArray[i]->inuse && gWPArray[i]->index != foundindex) + { + TransferWPData(i, i+1); + } + else if (gWPArray[i] && gWPArray[i]->inuse && gWPArray[i]->index == foundindex) + { + i++; + + if (!gWPArray[i]) + { + gWPArray[i] = (wpobject_t *)B_Alloc(sizeof(wpobject_t)); + } + + gWPArray[i]->flags = flags; + gWPArray[i]->weight = 0; //calculated elsewhere + gWPArray[i]->associated_entity = ENTITYNUM_NONE; //set elsewhere + gWPArray[i]->disttonext = 0; //calculated elsewhere + gWPArray[i]->forceJumpTo = 0; + gWPArray[i]->index = i; + gWPArray[i]->inuse = 1; + VectorCopy(origin, gWPArray[i]->origin); + gWPNum++; + break; + } + + i--; + } + + return 1; +} + +void TeleportToWP(gentity_t *pl, int afterindex) +{ + int foundindex; + int foundanindex; + int i; + + if (!pl || !pl->client) + { + return; + } + + foundindex = 0; + foundanindex = 0; + i = 0; + + if (afterindex < 0 || afterindex >= gWPNum) + { + G_Printf(S_COLOR_YELLOW "Waypoint number %i does not exist\n", afterindex); + return; + } + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse && gWPArray[i]->index == afterindex) + { + foundindex = i; + foundanindex = 1; + break; + } + + i++; + } + + if (!foundanindex) + { + G_Printf(S_COLOR_YELLOW "Waypoint index %i should exist, but does not (?)\n", afterindex); + return; + } + + VectorCopy(gWPArray[foundindex]->origin, pl->client->ps.origin); + + return; +} + +void WPFlagsModify(int wpnum, int flags) +{ + if (wpnum < 0 || wpnum >= gWPNum || !gWPArray[wpnum] || !gWPArray[wpnum]->inuse) + { + G_Printf(S_COLOR_YELLOW "WPFlagsModify: Waypoint %i does not exist\n", wpnum); + return; + } + + gWPArray[wpnum]->flags = flags; +} + +int NotWithinRange(int base, int extent) +{ + if (extent > base && base+5 >= extent) + { + return 0; + } + + if (extent < base && base-5 <= extent) + { + return 0; + } + + return 1; +} + +int NodeHere(vec3_t spot) +{ + int i; + + i = 0; + + while (i < nodenum) + { + if ((int)nodetable[i].origin[0] == (int)spot[0] && + (int)nodetable[i].origin[1] == (int)spot[1]) + { + if ((int)nodetable[i].origin[2] == (int)spot[2] || + ((int)nodetable[i].origin[2] < (int)spot[2] && (int)nodetable[i].origin[2]+5 > (int)spot[2]) || + ((int)nodetable[i].origin[2] > (int)spot[2] && (int)nodetable[i].origin[2]-5 < (int)spot[2])) + { + return 1; + } + } + i++; + } + + return 0; +} + +int CanGetToVector(vec3_t org1, vec3_t org2, vec3_t mins, vec3_t maxs) +{ + trace_t tr; + + trap_Trace(&tr, org1, mins, maxs, org2, -1, MASK_SOLID); + + if (tr.fraction == 1 && !tr.startsolid && !tr.allsolid) + { + return 1; + } + + return 0; +} + +int CanGetToVectorTravel(vec3_t org1, vec3_t org2, vec3_t mins, vec3_t maxs) +{ + trace_t tr; + vec3_t a, ang, fwd; + vec3_t midpos, dmid; + float startheight, midheight, fLen; + + mins[2] = -13; + maxs[2] = 13; + + trap_Trace(&tr, org1, mins, maxs, org2, -1, MASK_SOLID); + + if (tr.fraction != 1 || tr.startsolid || tr.allsolid) + { + return 0; + } + + VectorSubtract(org2, org1, a); + + vectoangles(a, ang); + + AngleVectors(ang, fwd, NULL, NULL); + + fLen = VectorLength(a)/2; + + midpos[0] = org1[0] + fwd[0]*fLen; + midpos[1] = org1[1] + fwd[1]*fLen; + midpos[2] = org1[2] + fwd[2]*fLen; + + VectorCopy(org1, dmid); + dmid[2] -= 1024; + + trap_Trace(&tr, midpos, NULL, NULL, dmid, -1, MASK_SOLID); + + startheight = org1[2] - tr.endpos[2]; + + VectorCopy(midpos, dmid); + dmid[2] -= 1024; + + trap_Trace(&tr, midpos, NULL, NULL, dmid, -1, MASK_SOLID); + + if (tr.startsolid || tr.allsolid) + { + return 1; + } + + midheight = midpos[2] - tr.endpos[2]; + + if (midheight > startheight*2) + { + return 0; //too steep of a drop.. can't go on + } + + return 1; +} + +int ConnectTrail(int startindex, int endindex) +{ + int foundit; + int cancontinue; + int i; + int failsafe; + int successnodeindex; + int insertindex; + int prenodestart; + int extendednodes[MAX_NODETABLE_SIZE]; //for storing checked nodes and not trying to extend them each a bazillion times + float fvecmeas; + float baseheight; + vec3_t a; + vec3_t startplace, starttrace; + vec3_t mins, maxs; + vec3_t testspot; + vec3_t validspotpos; + trace_t tr; + + mins[0] = -15; + mins[1] = -15; + mins[2] = 0; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 0; + + nodenum = 0; + foundit = 0; + + i = 0; + + successnodeindex = 0; + + while (i < MAX_NODETABLE_SIZE) //clear it out before using it + { + nodetable[i].flags = 0; + nodetable[i].index = 0; + nodetable[i].inuse = 0; + nodetable[i].neighbornum = 0; + nodetable[i].origin[0] = 0; + nodetable[i].origin[1] = 0; + nodetable[i].origin[2] = 0; + nodetable[i].weight = 0; + + extendednodes[i] = 0; + + i++; + } + + i = 0; + + G_Printf(S_COLOR_YELLOW "Point %i is not connected to %i - Repairing...\n", startindex, endindex); + + VectorCopy(gWPArray[startindex]->origin, startplace); + + VectorCopy(startplace, starttrace); + + starttrace[2] -= 4096; + + trap_Trace(&tr, startplace, NULL, NULL, starttrace, -1, MASK_SOLID); + + baseheight = startplace[2] - tr.endpos[2]; + + cancontinue = 1; + + VectorCopy(startplace, nodetable[nodenum].origin); + nodetable[nodenum].weight = 1; + nodetable[nodenum].inuse = 1; + nodetable[nodenum].index = nodenum; + nodenum++; + + while (nodenum < MAX_NODETABLE_SIZE && !foundit && cancontinue) + { + cancontinue = 0; + i = 0; + prenodestart = nodenum; + + while (i < prenodestart) + { + if (extendednodes[i] != 1) + { + VectorSubtract(gWPArray[endindex]->origin, nodetable[i].origin, a); + fvecmeas = VectorLength(a); + + if (fvecmeas < 128 && CanGetToVector(gWPArray[endindex]->origin, nodetable[i].origin, mins, maxs)) + { + foundit = 1; + successnodeindex = i; + break; + } + + VectorCopy(nodetable[i].origin, testspot); + testspot[0] += TABLE_BRANCH_DISTANCE; + + VectorCopy(testspot, starttrace); + + starttrace[2] -= 4096; + + trap_Trace(&tr, testspot, NULL, NULL, starttrace, -1, MASK_SOLID); + + testspot[2] = tr.endpos[2]+baseheight; + + if (!NodeHere(testspot) && !tr.startsolid && !tr.allsolid && CanGetToVector(nodetable[i].origin, testspot, mins, maxs)) + { + VectorCopy(testspot, nodetable[nodenum].origin); + nodetable[nodenum].inuse = 1; + nodetable[nodenum].index = nodenum; + nodetable[nodenum].weight = nodetable[i].weight+1; + nodetable[nodenum].neighbornum = i; + if ((nodetable[i].origin[2] - nodetable[nodenum].origin[2]) > 50) + { //if there's a big drop, make sure we know we can't just magically fly back up + nodetable[nodenum].flags = WPFLAG_ONEWAY_FWD; + } + nodenum++; + cancontinue = 1; + } + + if (nodenum >= MAX_NODETABLE_SIZE) + { + break; //failure + } + + VectorCopy(nodetable[i].origin, testspot); + testspot[0] -= TABLE_BRANCH_DISTANCE; + + VectorCopy(testspot, starttrace); + + starttrace[2] -= 4096; + + trap_Trace(&tr, testspot, NULL, NULL, starttrace, -1, MASK_SOLID); + + testspot[2] = tr.endpos[2]+baseheight; + + if (!NodeHere(testspot) && !tr.startsolid && !tr.allsolid && CanGetToVector(nodetable[i].origin, testspot, mins, maxs)) + { + VectorCopy(testspot, nodetable[nodenum].origin); + nodetable[nodenum].inuse = 1; + nodetable[nodenum].index = nodenum; + nodetable[nodenum].weight = nodetable[i].weight+1; + nodetable[nodenum].neighbornum = i; + if ((nodetable[i].origin[2] - nodetable[nodenum].origin[2]) > 50) + { //if there's a big drop, make sure we know we can't just magically fly back up + nodetable[nodenum].flags = WPFLAG_ONEWAY_FWD; + } + nodenum++; + cancontinue = 1; + } + + if (nodenum >= MAX_NODETABLE_SIZE) + { + break; //failure + } + + VectorCopy(nodetable[i].origin, testspot); + testspot[1] += TABLE_BRANCH_DISTANCE; + + VectorCopy(testspot, starttrace); + + starttrace[2] -= 4096; + + trap_Trace(&tr, testspot, NULL, NULL, starttrace, -1, MASK_SOLID); + + testspot[2] = tr.endpos[2]+baseheight; + + if (!NodeHere(testspot) && !tr.startsolid && !tr.allsolid && CanGetToVector(nodetable[i].origin, testspot, mins, maxs)) + { + VectorCopy(testspot, nodetable[nodenum].origin); + nodetable[nodenum].inuse = 1; + nodetable[nodenum].index = nodenum; + nodetable[nodenum].weight = nodetable[i].weight+1; + nodetable[nodenum].neighbornum = i; + if ((nodetable[i].origin[2] - nodetable[nodenum].origin[2]) > 50) + { //if there's a big drop, make sure we know we can't just magically fly back up + nodetable[nodenum].flags = WPFLAG_ONEWAY_FWD; + } + nodenum++; + cancontinue = 1; + } + + if (nodenum >= MAX_NODETABLE_SIZE) + { + break; //failure + } + + VectorCopy(nodetable[i].origin, testspot); + testspot[1] -= TABLE_BRANCH_DISTANCE; + + VectorCopy(testspot, starttrace); + + starttrace[2] -= 4096; + + trap_Trace(&tr, testspot, NULL, NULL, starttrace, -1, MASK_SOLID); + + testspot[2] = tr.endpos[2]+baseheight; + + if (!NodeHere(testspot) && !tr.startsolid && !tr.allsolid && CanGetToVector(nodetable[i].origin, testspot, mins, maxs)) + { + VectorCopy(testspot, nodetable[nodenum].origin); + nodetable[nodenum].inuse = 1; + nodetable[nodenum].index = nodenum; + nodetable[nodenum].weight = nodetable[i].weight+1; + nodetable[nodenum].neighbornum = i; + if ((nodetable[i].origin[2] - nodetable[nodenum].origin[2]) > 50) + { //if there's a big drop, make sure we know we can't just magically fly back up + nodetable[nodenum].flags = WPFLAG_ONEWAY_FWD; + } + nodenum++; + cancontinue = 1; + } + + if (nodenum >= MAX_NODETABLE_SIZE) + { + break; //failure + } + + extendednodes[i] = 1; + } + + i++; + } + } + + if (!foundit) + { + G_Printf(S_COLOR_RED "Could not link %i to %i, unreachable by node branching.\n", startindex, endindex); + gWPArray[startindex]->flags |= WPFLAG_ONEWAY_FWD; + gWPArray[endindex]->flags |= WPFLAG_ONEWAY_BACK; + G_Printf(S_COLOR_YELLOW "Since points cannot be connected, point %i has been flagged as only-forward and point %i has been flagged as only-backward.\n", startindex, endindex); + + /*while (nodenum >= 0) + { + if (nodetable[nodenum].origin[0] || nodetable[nodenum].origin[1] || nodetable[nodenum].origin[2]) + { + CreateNewWP(nodetable[nodenum].origin, nodetable[nodenum].flags); + } + + nodenum--; + }*/ + //The above code transfers nodes into the "rendered" waypoint array. Strictly for debugging. + + return 0; + } + + i = successnodeindex; + insertindex = startindex; + failsafe = 0; + VectorCopy(gWPArray[startindex]->origin, validspotpos); + + while (failsafe < MAX_NODETABLE_SIZE && i < MAX_NODETABLE_SIZE && i >= 0) + { + VectorSubtract(validspotpos, nodetable[i].origin, a); + if (!nodetable[nodetable[i].neighbornum].inuse || !CanGetToVectorTravel(validspotpos, /*nodetable[nodetable[i].neighbornum].origin*/nodetable[i].origin, mins, maxs) || VectorLength(a) > 256 || (!CanGetToVectorTravel(validspotpos, gWPArray[endindex]->origin, mins, maxs) && CanGetToVectorTravel(nodetable[i].origin, gWPArray[endindex]->origin, mins, maxs)) ) + { + if (!CreateNewWP_InTrail(nodetable[i].origin, nodetable[i].flags, insertindex)) + { + G_Printf(S_COLOR_RED "Could not link %i to %i, waypoint limit hit.\n", startindex, endindex); + return 0; + } + + VectorCopy(nodetable[i].origin, validspotpos); + } + + if (i == 0) + { + break; + } + + i = nodetable[i].neighbornum; + + failsafe++; + } + + G_Printf(S_COLOR_YELLOW "Finished connecting %i to %i.\n", startindex, endindex); + + return 1; +} + +int OpposingEnds(int start, int end) +{ + if (!gWPArray[start] || !gWPArray[start]->inuse || !gWPArray[end] || !gWPArray[end]->inuse) + { + return 0; + } + + if ((gWPArray[start]->flags & WPFLAG_ONEWAY_FWD) && + (gWPArray[end]->flags & WPFLAG_ONEWAY_BACK)) + { + return 1; + } + + return 0; +} + +int DoorBlockingSection(int start, int end) +{ //if a door blocks the trail, we'll just have to assume the points on each side are in visibility when it's open + trace_t tr; + gentity_t *testdoor; + int start_trace_index; + + if (!gWPArray[start] || !gWPArray[start]->inuse || !gWPArray[end] || !gWPArray[end]->inuse) + { + return 0; + } + + trap_Trace(&tr, gWPArray[start]->origin, NULL, NULL, gWPArray[end]->origin, -1, MASK_SOLID); + + if (tr.fraction == 1) + { + return 0; + } + + testdoor = &g_entities[tr.entityNum]; + + if (!testdoor) + { + return 0; + } + + if (!strstr(testdoor->classname, "func_")) + { + return 0; + } + + start_trace_index = tr.entityNum; + + trap_Trace(&tr, gWPArray[end]->origin, NULL, NULL, gWPArray[start]->origin, -1, MASK_SOLID); + + if (tr.fraction == 1) + { + return 0; + } + + if (start_trace_index == tr.entityNum) + { + return 1; + } + + return 0; +} + +int RepairPaths(void) +{ + int i; + int ctRet; + vec3_t a; + + if (!gWPNum) + { + return 0; + } + + i = 0; + + trap_Cvar_Update(&bot_wp_distconnect); + trap_Cvar_Update(&bot_wp_visconnect); + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse && gWPArray[i+1] && gWPArray[i+1]->inuse) + { + VectorSubtract(gWPArray[i]->origin, gWPArray[i+1]->origin, a); + + if (!(gWPArray[i+1]->flags & WPFLAG_NOVIS) && + !(gWPArray[i+1]->flags & WPFLAG_JUMP) && //don't calculate on jump points because they might not always want to be visible (in cases of force jumping) + !OpposingEnds(i, i+1) && + ((VectorLength(a) > 400 && bot_wp_distconnect.value) || (!OrgVisible(gWPArray[i]->origin, gWPArray[i+1]->origin, -1) && bot_wp_visconnect.value) ) && + !DoorBlockingSection(i, i+1)) + { + ctRet = ConnectTrail(i, i+1); + /*if (!ctRet) + { + return 0; + }*/ //we still want to write it.. + } + } + + i++; + } + + return 1; +} + +int OrgVisibleCurve(vec3_t org1, vec3_t mins, vec3_t maxs, vec3_t org2, int ignore) +{ + trace_t tr; + vec3_t evenorg1; + + VectorCopy(org1, evenorg1); + evenorg1[2] = org2[2]; + + trap_Trace(&tr, evenorg1, mins, maxs, org2, ignore, MASK_SOLID); + + if (tr.fraction == 1 && !tr.startsolid && !tr.allsolid) + { + trap_Trace(&tr, evenorg1, mins, maxs, org1, ignore, MASK_SOLID); + + if (tr.fraction == 1 && !tr.startsolid && !tr.allsolid) + { + return 1; + } + } + + return 0; +} + +int CanForceJumpTo(int baseindex, int testingindex, float distance) +{ + float heightdif; + vec3_t xy_base, xy_test, v, mins, maxs; + wpobject_t *wpBase = gWPArray[baseindex]; + wpobject_t *wpTest = gWPArray[testingindex]; + + mins[0] = -15; + mins[1] = -15; + mins[2] = -15; //-1 + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 15; //1 + + if (!wpBase || !wpBase->inuse || !wpTest || !wpTest->inuse) + { + return 0; + } + + if (distance > 400) + { + return 0; + } + + VectorCopy(wpBase->origin, xy_base); + VectorCopy(wpTest->origin, xy_test); + + xy_base[2] = xy_test[2]; + + VectorSubtract(xy_base, xy_test, v); + + if (VectorLength(v) > MAX_NEIGHBOR_LINK_DISTANCE) + { + return 0; + } + + if ((int)wpBase->origin[2] < (int)wpTest->origin[2]) + { + heightdif = wpTest->origin[2] - wpBase->origin[2]; + } + else + { + return 0; //err.. + } + + if (heightdif < 128) + { //don't bother.. + return 0; + } + + if (heightdif > 512) + { //too high + return 0; + } + + if (!OrgVisibleCurve(wpBase->origin, mins, maxs, wpTest->origin, -1)) + { + return 0; + } + + if (heightdif > 400) + { + return 3; + } + else if (heightdif > 256) + { + return 2; + } + else + { + return 1; + } +} + +void CalculatePaths(void) +{ + int i; + int c; + int forceJumpable; + float nLDist; + vec3_t a; + vec3_t mins, maxs; + + if (!gWPNum) + { + return; + } + + mins[0] = -15; + mins[1] = -15; + mins[2] = -15; //-1 + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 15; //1 + + //now clear out all the neighbor data before we recalculate + i = 0; + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse && gWPArray[i]->neighbornum) + { + while (gWPArray[i]->neighbornum >= 0) + { + gWPArray[i]->neighbors[gWPArray[i]->neighbornum].num = 0; + gWPArray[i]->neighbors[gWPArray[i]->neighbornum].forceJumpTo = 0; + gWPArray[i]->neighbornum--; + } + gWPArray[i]->neighbornum = 0; + } + + i++; + } + + i = 0; + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse) + { + c = 0; + + while (c < gWPNum) + { + if (gWPArray[c] && gWPArray[c]->inuse && i != c && + NotWithinRange(i, c)) + { + VectorSubtract(gWPArray[i]->origin, gWPArray[c]->origin, a); + + nLDist = VectorLength(a); + forceJumpable = CanForceJumpTo(i, c, nLDist); + + if ((nLDist < MAX_NEIGHBOR_LINK_DISTANCE || forceJumpable) && + ((int)gWPArray[i]->origin[2] == (int)gWPArray[c]->origin[2] || forceJumpable) && + (OrgVisibleBox(gWPArray[i]->origin, mins, maxs, gWPArray[c]->origin, -1) || forceJumpable)) + { + gWPArray[i]->neighbors[gWPArray[i]->neighbornum].num = c; + if (forceJumpable && ((int)gWPArray[i]->origin[2] != (int)gWPArray[c]->origin[2] || nLDist < MAX_NEIGHBOR_LINK_DISTANCE)) + { + gWPArray[i]->neighbors[gWPArray[i]->neighbornum].forceJumpTo = 999;//forceJumpable; //FJSR + } + else + { + gWPArray[i]->neighbors[gWPArray[i]->neighbornum].forceJumpTo = 0; + } + gWPArray[i]->neighbornum++; + } + + if (gWPArray[i]->neighbornum >= MAX_NEIGHBOR_SIZE) + { + break; + } + } + c++; + } + } + i++; + } +} + +gentity_t *GetObjectThatTargets(gentity_t *ent) +{ + gentity_t *next = NULL; + + if (!ent->targetname) + { + return NULL; + } + + next = G_Find( next, FOFS(target), ent->targetname ); + + if (next) + { + return next; + } + + return NULL; +} + +void CalculateSagaGoals(void) +{ + int i = 0; + int looptracker = 0; + int wpindex = 0; + vec3_t dif; + gentity_t *ent; + gentity_t *tent = NULL, *t2ent = NULL; + + while (i < MAX_GENTITIES) + { + ent = &g_entities[i]; + + tent = NULL; + + if (ent && ent->classname && strcmp(ent->classname, "info_saga_objective") == 0) + { + tent = ent; + t2ent = GetObjectThatTargets(tent); + looptracker = 0; + + while (t2ent && looptracker < 2048) + { //looptracker keeps us from getting stuck in case something is set up weird on this map + tent = t2ent; + t2ent = GetObjectThatTargets(tent); + looptracker++; + } + + if (looptracker >= 2048) + { //something unpleasent has happened + tent = NULL; + break; + } + } + + if (tent && ent && tent != ent) + { //tent should now be the object attached to the mission objective + dif[0] = (tent->r.absmax[0]+tent->r.absmin[0])/2; + dif[1] = (tent->r.absmax[1]+tent->r.absmin[1])/2; + dif[2] = (tent->r.absmax[2]+tent->r.absmin[2])/2; + + wpindex = GetNearestVisibleWP(dif, tent->s.number); + + if (wpindex != -1 && gWPArray[wpindex] && gWPArray[wpindex]->inuse) + { //found the waypoint nearest the center of this objective-related object + if (ent->side == SAGATEAM_IMPERIAL) + { + gWPArray[wpindex]->flags |= WPFLAG_SAGA_IMPERIALOBJ; + } + else + { + gWPArray[wpindex]->flags |= WPFLAG_SAGA_REBELOBJ; + } + + gWPArray[wpindex]->associated_entity = tent->s.number; + } + } + + i++; + } +} + +float botGlobalNavWeaponWeights[WP_NUM_WEAPONS] = +{ + 0,//WP_NONE, + + 0,//WP_STUN_BATON, + 0,//WP_SABER, // NOTE: lots of code assumes this is the first weapon (... which is crap) so be careful -Ste. + 0,//WP_BRYAR_PISTOL, + 3,//WP_BLASTER, + 5,//WP_DISRUPTOR, + 4,//WP_BOWCASTER, + 6,//WP_REPEATER, + 7,//WP_DEMP2, + 8,//WP_FLECHETTE, + 9,//WP_ROCKET_LAUNCHER, + 3,//WP_THERMAL, + 3,//WP_TRIP_MINE, + 3,//WP_DET_PACK, + 0//WP_EMPLACED_GUN, +}; + +int GetNearestVisibleWPToItem(vec3_t org, int ignore) +{ + int i; + float bestdist; + float flLen; + int bestindex; + vec3_t a, mins, maxs; + + i = 0; + bestdist = 64; //has to be less than 64 units to the item or it isn't safe enough + bestindex = -1; + + mins[0] = -15; + mins[1] = -15; + mins[2] = 0; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 0; + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse && + gWPArray[i]->origin[2]-15 < org[2] && + gWPArray[i]->origin[2]+15 > org[2]) + { + VectorSubtract(org, gWPArray[i]->origin, a); + flLen = VectorLength(a); + + if (flLen < bestdist && trap_InPVS(org, gWPArray[i]->origin) && OrgVisibleBox(org, mins, maxs, gWPArray[i]->origin, ignore)) + { + bestdist = flLen; + bestindex = i; + } + } + + i++; + } + + return bestindex; +} + +void CalculateWeightGoals(void) +{ //set waypoint weights depending on weapon and item placement + int i = 0; + int wpindex = 0; + gentity_t *ent; + float weight; + + trap_Cvar_Update(&bot_wp_clearweight); + + if (bot_wp_clearweight.integer) + { //if set then flush out all weight/goal values before calculating them again + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse) + { + gWPArray[i]->weight = 0; + + if (gWPArray[i]->flags & WPFLAG_GOALPOINT) + { + gWPArray[i]->flags -= WPFLAG_GOALPOINT; + } + } + + i++; + } + } + + i = 0; + + while (i < MAX_GENTITIES) + { + ent = &g_entities[i]; + + weight = 0; + + if (ent && ent->classname) + { + if (strcmp(ent->classname, "item_seeker") == 0) + { + weight = 2; + } + else if (strcmp(ent->classname, "item_shield") == 0) + { + weight = 2; + } + else if (strcmp(ent->classname, "item_medpac") == 0) + { + weight = 2; + } + else if (strcmp(ent->classname, "item_sentry_gun") == 0) + { + weight = 2; + } + else if (strcmp(ent->classname, "item_force_enlighten_dark") == 0) + { + weight = 5; + } + else if (strcmp(ent->classname, "item_force_enlighten_light") == 0) + { + weight = 5; + } + else if (strcmp(ent->classname, "item_force_boon") == 0) + { + weight = 5; + } + else if (strcmp(ent->classname, "item_ysalimari") == 0) + { + weight = 2; + } + else if (strstr(ent->classname, "weapon_") && ent->item) + { + weight = botGlobalNavWeaponWeights[ent->item->giTag]; + } + else if (ent->item && ent->item->giType == IT_AMMO) + { + weight = 3; + } + } + + if (ent && weight) + { + wpindex = GetNearestVisibleWPToItem(ent->s.pos.trBase, ent->s.number); + + if (wpindex != -1 && gWPArray[wpindex] && gWPArray[wpindex]->inuse) + { //found the waypoint nearest the center of this object + gWPArray[wpindex]->weight = weight; + gWPArray[wpindex]->flags |= WPFLAG_GOALPOINT; + gWPArray[wpindex]->associated_entity = ent->s.number; + } + } + + i++; + } +} + +void CalculateJumpRoutes(void) +{ + int i = 0; + float nheightdif = 0; + float pheightdif = 0; + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse) + { + if (gWPArray[i]->flags & WPFLAG_JUMP) + { + nheightdif = 0; + pheightdif = 0; + + gWPArray[i]->forceJumpTo = 0; + + if (gWPArray[i-1] && gWPArray[i-1]->inuse && (gWPArray[i-1]->origin[2]+16) < gWPArray[i]->origin[2]) + { + nheightdif = (gWPArray[i]->origin[2] - gWPArray[i-1]->origin[2]); + } + + if (gWPArray[i+1] && gWPArray[i+1]->inuse && (gWPArray[i+1]->origin[2]+16) < gWPArray[i]->origin[2]) + { + pheightdif = (gWPArray[i]->origin[2] - gWPArray[i+1]->origin[2]); + } + + if (nheightdif > pheightdif) + { + pheightdif = nheightdif; + } + + if (pheightdif) + { + if (pheightdif > 500) + { + gWPArray[i]->forceJumpTo = 999; //FORCE_LEVEL_3; //FJSR + } + else if (pheightdif > 256) + { + gWPArray[i]->forceJumpTo = 999; //FORCE_LEVEL_2; //FJSR + } + else if (pheightdif > 128) + { + gWPArray[i]->forceJumpTo = 999; //FORCE_LEVEL_1; //FJSR + } + } + } + } + + i++; + } +} + +int LoadPathData(const char *filename) +{ + fileHandle_t f; + char *fileString; + char *currentVar; + char *routePath; + wpobject_t thiswp; + int len; + int i, i_cv; + int nei_num; + + i = 0; + i_cv = 0; + + routePath = (char *)B_TempAlloc(1024); + + Com_sprintf(routePath, 1024, "botroutes/%s.wnt\0", filename); + + len = trap_FS_FOpenFile(routePath, &f, FS_READ); + + B_TempFree(1024); //routePath + + if (!f) + { + G_Printf(S_COLOR_YELLOW "Bot route data not found\n"); + return 2; + } + + if (len >= 524288) + { + G_Printf(S_COLOR_RED "Route file exceeds maximum length\n"); + return 0; + } + + fileString = (char *)B_TempAlloc(524288); + currentVar = (char *)B_TempAlloc(2048); + + trap_FS_Read(fileString, len, f); + + if (fileString[i] == 'l') + { //contains a "levelflags" entry.. + char readLFlags[64]; + i_cv = 0; + + while (fileString[i] != ' ') + { + i++; + } + i++; + while (fileString[i] != '\n') + { + readLFlags[i_cv] = fileString[i]; + i_cv++; + i++; + } + readLFlags[i_cv] = 0; + i++; + + gLevelFlags = atoi(readLFlags); + } + else + { + gLevelFlags = 0; + } + + while (i < len) + { + i_cv = 0; + + thiswp.index = 0; + thiswp.flags = 0; + thiswp.inuse = 0; + thiswp.neighbornum = 0; + thiswp.origin[0] = 0; + thiswp.origin[1] = 0; + thiswp.origin[2] = 0; + thiswp.weight = 0; + thiswp.associated_entity = ENTITYNUM_NONE; + thiswp.forceJumpTo = 0; + thiswp.disttonext = 0; + nei_num = 0; + + while (nei_num < MAX_NEIGHBOR_SIZE) + { + thiswp.neighbors[nei_num].num = 0; + thiswp.neighbors[nei_num].forceJumpTo = 0; + + nei_num++; + } + + while (fileString[i] != ' ') + { + currentVar[i_cv] = fileString[i]; + i_cv++; + i++; + } + currentVar[i_cv] = '\0'; + + thiswp.index = atoi(currentVar); + + i_cv = 0; + i++; + + while (fileString[i] != ' ') + { + currentVar[i_cv] = fileString[i]; + i_cv++; + i++; + } + currentVar[i_cv] = '\0'; + + thiswp.flags = atoi(currentVar); + + i_cv = 0; + i++; + + while (fileString[i] != ' ') + { + currentVar[i_cv] = fileString[i]; + i_cv++; + i++; + } + currentVar[i_cv] = '\0'; + + thiswp.weight = atof(currentVar); + + i_cv = 0; + i++; + i++; + + while (fileString[i] != ' ') + { + currentVar[i_cv] = fileString[i]; + i_cv++; + i++; + } + currentVar[i_cv] = '\0'; + + thiswp.origin[0] = atof(currentVar); + + i_cv = 0; + i++; + + while (fileString[i] != ' ') + { + currentVar[i_cv] = fileString[i]; + i_cv++; + i++; + } + currentVar[i_cv] = '\0'; + + thiswp.origin[1] = atof(currentVar); + + i_cv = 0; + i++; + + while (fileString[i] != ')') + { + currentVar[i_cv] = fileString[i]; + i_cv++; + i++; + } + currentVar[i_cv] = '\0'; + + thiswp.origin[2] = atof(currentVar); + + i += 4; + + while (fileString[i] != '}') + { + i_cv = 0; + while (fileString[i] != ' ' && fileString[i] != '-') + { + currentVar[i_cv] = fileString[i]; + i_cv++; + i++; + } + currentVar[i_cv] = '\0'; + + thiswp.neighbors[thiswp.neighbornum].num = atoi(currentVar); + + if (fileString[i] == '-') + { + i_cv = 0; + i++; + + while (fileString[i] != ' ') + { + currentVar[i_cv] = fileString[i]; + i_cv++; + i++; + } + currentVar[i_cv] = '\0'; + + thiswp.neighbors[thiswp.neighbornum].forceJumpTo = 999; //atoi(currentVar); //FJSR + } + else + { + thiswp.neighbors[thiswp.neighbornum].forceJumpTo = 0; + } + + thiswp.neighbornum++; + + i++; + } + + i_cv = 0; + i++; + i++; + + while (fileString[i] != '\n') + { + currentVar[i_cv] = fileString[i]; + i_cv++; + i++; + } + currentVar[i_cv] = '\0'; + + thiswp.disttonext = atof(currentVar); + + CreateNewWP_FromObject(&thiswp); + i++; + } + + B_TempFree(524288); //fileString + B_TempFree(2048); //currentVar + + trap_FS_FCloseFile(f); + + if (g_gametype.integer == GT_SAGA) + { + CalculateSagaGoals(); + } + + CalculateWeightGoals(); + //calculate weights for idle activity goals when + //the bot has absolutely nothing else to do + + CalculateJumpRoutes(); + //Look at jump points and mark them as requiring + //force jumping as needed + + return 1; +} + +void FlagObjects(void) +{ + int i = 0, bestindex = 0, found = 0; + float bestdist = 999999, tlen = 0; + gentity_t *flag_red, *flag_blue, *ent; + vec3_t a, mins, maxs; + trace_t tr; + + flag_red = NULL; + flag_blue = NULL; + + mins[0] = -15; + mins[1] = -15; + mins[2] = -5; + maxs[0] = 15; + maxs[1] = 15; + maxs[2] = 5; + + while (i < MAX_GENTITIES) + { + ent = &g_entities[i]; + + if (ent && ent->inuse && ent->classname) + { + if (!flag_red && strcmp(ent->classname, "team_CTF_redflag") == 0) + { + flag_red = ent; + } + else if (!flag_blue && strcmp(ent->classname, "team_CTF_blueflag") == 0) + { + flag_blue = ent; + } + + if (flag_red && flag_blue) + { + break; + } + } + + i++; + } + + i = 0; + + if (!flag_red || !flag_blue) + { + return; + } + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse) + { + VectorSubtract(flag_red->s.pos.trBase, gWPArray[i]->origin, a); + tlen = VectorLength(a); + + if (tlen < bestdist) + { + trap_Trace(&tr, flag_red->s.pos.trBase, mins, maxs, gWPArray[i]->origin, flag_red->s.number, MASK_SOLID); + + if (tr.fraction == 1 || tr.entityNum == flag_red->s.number) + { + bestdist = tlen; + bestindex = i; + found = 1; + } + } + + } + + i++; + } + + if (found) + { + gWPArray[bestindex]->flags |= WPFLAG_RED_FLAG; + flagRed = gWPArray[bestindex]; + oFlagRed = flagRed; + eFlagRed = flag_red; + } + + bestdist = 999999; + bestindex = 0; + found = 0; + i = 0; + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse) + { + VectorSubtract(flag_blue->s.pos.trBase, gWPArray[i]->origin, a); + tlen = VectorLength(a); + + if (tlen < bestdist) + { + trap_Trace(&tr, flag_blue->s.pos.trBase, mins, maxs, gWPArray[i]->origin, flag_blue->s.number, MASK_SOLID); + + if (tr.fraction == 1 || tr.entityNum == flag_blue->s.number) + { + bestdist = tlen; + bestindex = i; + found = 1; + } + } + + } + + i++; + } + + if (found) + { + gWPArray[bestindex]->flags |= WPFLAG_BLUE_FLAG; + flagBlue = gWPArray[bestindex]; + oFlagBlue = flagBlue; + eFlagBlue = flag_blue; + } +} + +int SavePathData(const char *filename) +{ + fileHandle_t f; + char *fileString; + char *storeString; + char *routePath; + vec3_t a; + float flLen; + int i, s, n; + + fileString = NULL; + i = 0; + s = 0; + + if (!gWPNum) + { + return 0; + } + + routePath = (char *)B_TempAlloc(1024); + + Com_sprintf(routePath, 1024, "botroutes/%s.wnt\0", filename); + + trap_FS_FOpenFile(routePath, &f, FS_WRITE); + + B_TempFree(1024); //routePath + + if (!f) + { + G_Printf(S_COLOR_RED "ERROR: Could not open file to write path data\n"); + return 0; + } + + if (!RepairPaths()) //check if we can see all waypoints from the last. If not, try to branch over. + { + trap_FS_FCloseFile(f); + return 0; + } + + CalculatePaths(); //make everything nice and connected before saving + + FlagObjects(); //currently only used for flagging waypoints nearest CTF flags + + fileString = (char *)B_TempAlloc(524288); + storeString = (char *)B_TempAlloc(4096); + + Com_sprintf(fileString, 524288, "%i %i %f (%f %f %f) { ", gWPArray[i]->index, gWPArray[i]->flags, gWPArray[i]->weight, gWPArray[i]->origin[0], gWPArray[i]->origin[1], gWPArray[i]->origin[2]); + + n = 0; + + while (n < gWPArray[i]->neighbornum) + { + if (gWPArray[i]->neighbors[n].forceJumpTo) + { + Com_sprintf(storeString, 4096, "%s%i-%i ", storeString, gWPArray[i]->neighbors[n].num, gWPArray[i]->neighbors[n].forceJumpTo); + } + else + { + Com_sprintf(storeString, 4096, "%s%i ", storeString, gWPArray[i]->neighbors[n].num); + } + n++; + } + + if (gWPArray[i+1] && gWPArray[i+1]->inuse && gWPArray[i+1]->index) + { + VectorSubtract(gWPArray[i]->origin, gWPArray[i+1]->origin, a); + flLen = VectorLength(a); + } + else + { + flLen = 0; + } + + gWPArray[i]->disttonext = flLen; + + Com_sprintf(fileString, 524288, "%s} %f\n", fileString, flLen); + + i++; + + while (i < gWPNum) + { + //sprintf(fileString, "%s%i %i %f (%f %f %f) { ", fileString, gWPArray[i]->index, gWPArray[i]->flags, gWPArray[i]->weight, gWPArray[i]->origin[0], gWPArray[i]->origin[1], gWPArray[i]->origin[2]); + Com_sprintf(storeString, 4096, "%i %i %f (%f %f %f) { ", gWPArray[i]->index, gWPArray[i]->flags, gWPArray[i]->weight, gWPArray[i]->origin[0], gWPArray[i]->origin[1], gWPArray[i]->origin[2]); + + n = 0; + + while (n < gWPArray[i]->neighbornum) + { + if (gWPArray[i]->neighbors[n].forceJumpTo) + { + Com_sprintf(storeString, 4096, "%s%i-%i ", storeString, gWPArray[i]->neighbors[n].num, gWPArray[i]->neighbors[n].forceJumpTo); + } + else + { + Com_sprintf(storeString, 4096, "%s%i ", storeString, gWPArray[i]->neighbors[n].num); + } + n++; + } + + if (gWPArray[i+1] && gWPArray[i+1]->inuse && gWPArray[i+1]->index) + { + VectorSubtract(gWPArray[i]->origin, gWPArray[i+1]->origin, a); + flLen = VectorLength(a); + } + else + { + flLen = 0; + } + + gWPArray[i]->disttonext = flLen; + + Com_sprintf(storeString, 4096, "%s} %f\n", storeString, flLen); + + strcat(fileString, storeString); + + i++; + } + + trap_FS_Write(fileString, strlen(fileString), f); + + B_TempFree(524288); //fileString + B_TempFree(4096); //storeString + + trap_FS_FCloseFile(f); + + G_Printf("Path data has been saved and updated. You may need to restart the level for some things to be properly calculated.\n"); + + return 1; +} + +void LoadPath_ThisLevel(void) +{ + vmCvar_t mapname; + int i = 0; + gentity_t *ent = NULL; + + trap_Cvar_Register( &mapname, "mapname", "", CVAR_SERVERINFO | CVAR_ROM ); + + if (LoadPathData(mapname.string) == 2) + { + //enter "edit" mode if cheats enabled? + } + + trap_Cvar_Update(&bot_wp_edit); + + if (bot_wp_edit.value) + { + gBotEdit = 1; + } + else + { + gBotEdit = 0; + } + + //set the flag entities + while (i < MAX_GENTITIES) + { + ent = &g_entities[i]; + + if (ent && ent->inuse && ent->classname) + { + if (!eFlagRed && strcmp(ent->classname, "team_CTF_redflag") == 0) + { + eFlagRed = ent; + } + else if (!eFlagBlue && strcmp(ent->classname, "team_CTF_blueflag") == 0) + { + eFlagBlue = ent; + } + + if (eFlagRed && eFlagBlue) + { + break; + } + } + + i++; + } +} + +gentity_t *GetClosestSpawn(gentity_t *ent) +{ + gentity_t *spawn; + gentity_t *closestSpawn = NULL; + float closestDist = -1; + int i = MAX_CLIENTS; + + spawn = NULL; + + while (i < MAX_GENTITIES) + { + spawn = &g_entities[i]; + + if (spawn && spawn->inuse && (!Q_stricmp(spawn->classname, "info_player_start") || !Q_stricmp(spawn->classname, "info_player_deathmatch")) ) + { + float checkDist; + vec3_t vSub; + + VectorSubtract(ent->client->ps.origin, spawn->r.currentOrigin, vSub); + checkDist = VectorLength(vSub); + + if (closestDist == -1 || checkDist < closestDist) + { + closestSpawn = spawn; + closestDist = checkDist; + } + } + + i++; + } + + return closestSpawn; +} + +gentity_t *GetNextSpawnInIndex(gentity_t *currentSpawn) +{ + gentity_t *spawn; + gentity_t *nextSpawn = NULL; + int i = currentSpawn->s.number+1; + + spawn = NULL; + + while (i < MAX_GENTITIES) + { + spawn = &g_entities[i]; + + if (spawn && spawn->inuse && (!Q_stricmp(spawn->classname, "info_player_start") || !Q_stricmp(spawn->classname, "info_player_deathmatch")) ) + { + nextSpawn = spawn; + break; + } + + i++; + } + + if (!nextSpawn) + { //loop back around to 0 + i = MAX_CLIENTS; + + while (i < MAX_GENTITIES) + { + spawn = &g_entities[i]; + + if (spawn && spawn->inuse && (!Q_stricmp(spawn->classname, "info_player_start") || !Q_stricmp(spawn->classname, "info_player_deathmatch")) ) + { + nextSpawn = spawn; + break; + } + + i++; + } + } + + return nextSpawn; +} + +int AcceptBotCommand(char *cmd, gentity_t *pl) +{ + int OptionalArgument, i; + int FlagsFromArgument; + char *OptionalSArgument, *RequiredSArgument; + vmCvar_t mapname; + + if (!gBotEdit) + { + return 0; + } + + OptionalArgument = 0; + i = 0; + FlagsFromArgument = 0; + OptionalSArgument = NULL; + RequiredSArgument = NULL; + + //if a waypoint editing related command is issued, bots will deactivate. + //once bot_wp_save is issued and the trail is recalculated, bots will activate again. + + if (!pl || !pl->client) + { + return 0; + } + + if (Q_stricmp (cmd, "bot_wp_cmdlist") == 0) //lists all the bot waypoint commands. + { + G_Printf(S_COLOR_YELLOW "bot_wp_add" S_COLOR_WHITE " - Add a waypoint (optional int parameter will insert the point after the specified waypoint index in a trail)\n\n"); + G_Printf(S_COLOR_YELLOW "bot_wp_rem" S_COLOR_WHITE " - Remove a waypoint (removes last unless waypoint index is specified as a parameter)\n\n"); + G_Printf(S_COLOR_YELLOW "bot_wp_addflagged" S_COLOR_WHITE " - Same as wp_add, but adds a flagged point (type bot_wp_addflagged for help)\n\n"); + G_Printf(S_COLOR_YELLOW "bot_wp_switchflags" S_COLOR_WHITE " - Switches flags on an existing waypoint (type bot_wp_switchflags for help)\n\n"); + G_Printf(S_COLOR_YELLOW "bot_wp_tele" S_COLOR_WHITE " - Teleport yourself to the specified waypoint's location\n"); + G_Printf(S_COLOR_YELLOW "bot_wp_killoneways" S_COLOR_WHITE " - Removes oneway (backward and forward) flags on all waypoints in the level\n\n"); + G_Printf(S_COLOR_YELLOW "bot_wp_save" S_COLOR_WHITE " - Saves all waypoint data into a file for later use\n"); + + return 1; + } + + if (Q_stricmp (cmd, "bot_wp_add") == 0) + { + gDeactivated = 1; + OptionalSArgument = ConcatArgs( 1 ); + + if (OptionalSArgument) + { + OptionalArgument = atoi(OptionalSArgument); + } + + if (OptionalSArgument && OptionalSArgument[0]) + { + CreateNewWP_InTrail(pl->client->ps.origin, 0, OptionalArgument); + } + else + { + CreateNewWP(pl->client->ps.origin, 0); + } + return 1; + } + + if (Q_stricmp (cmd, "bot_wp_rem") == 0) + { + gDeactivated = 1; + + OptionalSArgument = ConcatArgs( 1 ); + + if (OptionalSArgument) + { + OptionalArgument = atoi(OptionalSArgument); + } + + if (OptionalSArgument && OptionalSArgument[0]) + { + RemoveWP_InTrail(OptionalArgument); + } + else + { + RemoveWP(); + } + + return 1; + } + + if (Q_stricmp (cmd, "bot_wp_tele") == 0) + { + gDeactivated = 1; + OptionalSArgument = ConcatArgs( 1 ); + + if (OptionalSArgument) + { + OptionalArgument = atoi(OptionalSArgument); + } + + if (OptionalSArgument && OptionalSArgument[0]) + { + TeleportToWP(pl, OptionalArgument); + } + else + { + G_Printf(S_COLOR_YELLOW "You didn't specify an index. Assuming last.\n"); + TeleportToWP(pl, gWPNum-1); + } + return 1; + } + + if (Q_stricmp (cmd, "bot_wp_spawntele") == 0) + { + gentity_t *closestSpawn = GetClosestSpawn(pl); + + if (!closestSpawn) + { //There should always be a spawn point.. + return 1; + } + + closestSpawn = GetNextSpawnInIndex(closestSpawn); + + if (closestSpawn) + { + VectorCopy(closestSpawn->r.currentOrigin, pl->client->ps.origin); + } + return 1; + } + + if (Q_stricmp (cmd, "bot_wp_addflagged") == 0) + { + gDeactivated = 1; + + RequiredSArgument = ConcatArgs( 1 ); + + if (!RequiredSArgument || !RequiredSArgument[0]) + { + G_Printf(S_COLOR_YELLOW "Flag string needed for bot_wp_addflagged\nj - Jump point\nd - Duck point\nc - Snipe or camp standing\nf - Wait for func\nm - Do not move to when func is under\ns - Snipe or camp\nx - Oneway, forward\ny - Oneway, back\ng - Mission goal\nn - No visibility\nExample (for a point the bot would jump at, and reverse on when traveling a trail backwards):\nbot_wp_addflagged jx\n"); + return 1; + } + + while (RequiredSArgument[i]) + { + if (RequiredSArgument[i] == 'j') + { + FlagsFromArgument |= WPFLAG_JUMP; + } + else if (RequiredSArgument[i] == 'd') + { + FlagsFromArgument |= WPFLAG_DUCK; + } + else if (RequiredSArgument[i] == 'c') + { + FlagsFromArgument |= WPFLAG_SNIPEORCAMPSTAND; + } + else if (RequiredSArgument[i] == 'f') + { + FlagsFromArgument |= WPFLAG_WAITFORFUNC; + } + else if (RequiredSArgument[i] == 's') + { + FlagsFromArgument |= WPFLAG_SNIPEORCAMP; + } + else if (RequiredSArgument[i] == 'x') + { + FlagsFromArgument |= WPFLAG_ONEWAY_FWD; + } + else if (RequiredSArgument[i] == 'y') + { + FlagsFromArgument |= WPFLAG_ONEWAY_BACK; + } + else if (RequiredSArgument[i] == 'g') + { + FlagsFromArgument |= WPFLAG_GOALPOINT; + } + else if (RequiredSArgument[i] == 'n') + { + FlagsFromArgument |= WPFLAG_NOVIS; + } + else if (RequiredSArgument[i] == 'm') + { + FlagsFromArgument |= WPFLAG_NOMOVEFUNC; + } + + i++; + } + + OptionalSArgument = ConcatArgs( 2 ); + + if (OptionalSArgument) + { + OptionalArgument = atoi(OptionalSArgument); + } + + if (OptionalSArgument && OptionalSArgument[0]) + { + CreateNewWP_InTrail(pl->client->ps.origin, FlagsFromArgument, OptionalArgument); + } + else + { + CreateNewWP(pl->client->ps.origin, FlagsFromArgument); + } + return 1; + } + + if (Q_stricmp (cmd, "bot_wp_switchflags") == 0) + { + gDeactivated = 1; + + RequiredSArgument = ConcatArgs( 1 ); + + if (!RequiredSArgument || !RequiredSArgument[0]) + { + G_Printf(S_COLOR_YELLOW "Flag string needed for bot_wp_switchflags\nType bot_wp_addflagged for a list of flags and their corresponding characters, or use 0 for no flags.\nSyntax: bot_wp_switchflags \n"); + return 1; + } + + while (RequiredSArgument[i]) + { + if (RequiredSArgument[i] == 'j') + { + FlagsFromArgument |= WPFLAG_JUMP; + } + else if (RequiredSArgument[i] == 'd') + { + FlagsFromArgument |= WPFLAG_DUCK; + } + else if (RequiredSArgument[i] == 'c') + { + FlagsFromArgument |= WPFLAG_SNIPEORCAMPSTAND; + } + else if (RequiredSArgument[i] == 'f') + { + FlagsFromArgument |= WPFLAG_WAITFORFUNC; + } + else if (RequiredSArgument[i] == 's') + { + FlagsFromArgument |= WPFLAG_SNIPEORCAMP; + } + else if (RequiredSArgument[i] == 'x') + { + FlagsFromArgument |= WPFLAG_ONEWAY_FWD; + } + else if (RequiredSArgument[i] == 'y') + { + FlagsFromArgument |= WPFLAG_ONEWAY_BACK; + } + else if (RequiredSArgument[i] == 'g') + { + FlagsFromArgument |= WPFLAG_GOALPOINT; + } + else if (RequiredSArgument[i] == 'n') + { + FlagsFromArgument |= WPFLAG_NOVIS; + } + else if (RequiredSArgument[i] == 'm') + { + FlagsFromArgument |= WPFLAG_NOMOVEFUNC; + } + + i++; + } + + OptionalSArgument = ConcatArgs( 2 ); + + if (OptionalSArgument) + { + OptionalArgument = atoi(OptionalSArgument); + } + + if (OptionalSArgument && OptionalSArgument[0]) + { + WPFlagsModify(OptionalArgument, FlagsFromArgument); + } + else + { + G_Printf(S_COLOR_YELLOW "Waypoint number (to modify) needed for bot_wp_switchflags\nSyntax: bot_wp_switchflags \n"); + } + return 1; + } + + if (Q_stricmp (cmd, "bot_wp_killoneways") == 0) + { + i = 0; + + while (i < gWPNum) + { + if (gWPArray[i] && gWPArray[i]->inuse) + { + if (gWPArray[i]->flags & WPFLAG_ONEWAY_FWD) + { + gWPArray[i]->flags -= WPFLAG_ONEWAY_FWD; + } + if (gWPArray[i]->flags & WPFLAG_ONEWAY_BACK) + { + gWPArray[i]->flags -= WPFLAG_ONEWAY_BACK; + } + } + + i++; + } + + return 1; + } + + if (Q_stricmp (cmd, "bot_wp_save") == 0) + { + gDeactivated = 0; + trap_Cvar_Register( &mapname, "mapname", "", CVAR_SERVERINFO | CVAR_ROM ); + SavePathData(mapname.string); + return 1; + } + + return 0; +} diff --git a/code/game/anims.h b/code/game/anims.h new file mode 100644 index 0000000..ce276f1 --- /dev/null +++ b/code/game/anims.h @@ -0,0 +1,1369 @@ +#ifndef __ANIMS_H__ +#define __ANIMS_H__ +// playerAnimations + + +typedef enum //# animNumber_e +{ + //================================================= + //ANIMS IN WHICH UPPER AND LOWER OBJECTS ARE IN MD3 + //================================================= + BOTH_1CRUFTFORGIL = 0, //# G2 cannot have a reverse anim at beginning of file + //# #sep BOTH_ DEATHS + BOTH_DEATH1, //# First Death anim + BOTH_DEATH2, //# Second Death anim + BOTH_DEATH3, //# Third Death anim + BOTH_DEATH4, //# Fourth Death anim + BOTH_DEATH5, //# Fifth Death anim + BOTH_DEATH6, //# Sixth Death anim + BOTH_DEATH7, //# Seventh Death anim + BOTH_DEATH8, //# + BOTH_DEATH9, //# + BOTH_DEATH10, //# + BOTH_DEATH11, //# + BOTH_DEATH12, //# + BOTH_DEATH13, //# + BOTH_DEATH14, //# + BOTH_DEATH15, //# + BOTH_DEATH16, //# + BOTH_DEATH17, //# + BOTH_DEATH18, //# + BOTH_DEATH19, //# + BOTH_DEATH20, //# + BOTH_DEATH21, //# + BOTH_DEATH22, //# + BOTH_DEATH23, //# + BOTH_DEATH24, //# + BOTH_DEATH25, //# + + BOTH_DEATHFORWARD1, //# First Death in which they get thrown forward + BOTH_DEATHFORWARD2, //# Second Death in which they get thrown forward + BOTH_DEATHFORWARD3, //# Tavion's falling in cin# 23 + BOTH_DEATHBACKWARD1, //# First Death in which they get thrown backward + BOTH_DEATHBACKWARD2, //# Second Death in which they get thrown backward + + BOTH_DEATH1IDLE, //# Idle while close to death + BOTH_LYINGDEATH1, //# Death to play when killed lying down + BOTH_STUMBLEDEATH1, //# Stumble forward and fall face first death + BOTH_FALLDEATH1, //# Fall forward off a high cliff and splat death - start + BOTH_FALLDEATH1INAIR, //# Fall forward off a high cliff and splat death - loop + BOTH_FALLDEATH1LAND, //# Fall forward off a high cliff and splat death - hit bottom + BOTH_DEATH_ROLL, //# Death anim from a roll + BOTH_DEATH_FLIP, //# Death anim from a flip + BOTH_DEATH_SPIN_90_R, //# Death anim when facing 90 degrees right + BOTH_DEATH_SPIN_90_L, //# Death anim when facing 90 degrees left + BOTH_DEATH_SPIN_180, //# Death anim when facing backwards + BOTH_DEATH_LYING_UP, //# Death anim when lying on back + BOTH_DEATH_LYING_DN, //# Death anim when lying on front + BOTH_DEATH_FALLING_DN, //# Death anim when falling on face + BOTH_DEATH_FALLING_UP, //# Death anim when falling on back + BOTH_DEATH_CROUCHED, //# Death anim when crouched + //# #sep BOTH_ DEAD POSES # Should be last frame of corresponding previous anims + BOTH_DEAD1, //# First Death finished pose + BOTH_DEAD2, //# Second Death finished pose + BOTH_DEAD3, //# Third Death finished pose + BOTH_DEAD4, //# Fourth Death finished pose + BOTH_DEAD5, //# Fifth Death finished pose + BOTH_DEAD6, //# Sixth Death finished pose + BOTH_DEAD7, //# Seventh Death finished pose + BOTH_DEAD8, //# + BOTH_DEAD9, //# + BOTH_DEAD10, //# + BOTH_DEAD11, //# + BOTH_DEAD12, //# + BOTH_DEAD13, //# + BOTH_DEAD14, //# + BOTH_DEAD15, //# + BOTH_DEAD16, //# + BOTH_DEAD17, //# + BOTH_DEAD18, //# + BOTH_DEAD19, //# + BOTH_DEAD20, //# + BOTH_DEAD21, //# + BOTH_DEAD22, //# + BOTH_DEAD23, //# + BOTH_DEAD24, //# + BOTH_DEAD25, //# + BOTH_DEADFORWARD1, //# First thrown forward death finished pose + BOTH_DEADFORWARD2, //# Second thrown forward death finished pose + BOTH_DEADBACKWARD1, //# First thrown backward death finished pose + BOTH_DEADBACKWARD2, //# Second thrown backward death finished pose + BOTH_LYINGDEAD1, //# Killed lying down death finished pose + BOTH_STUMBLEDEAD1, //# Stumble forward death finished pose + BOTH_FALLDEAD1LAND, //# Fall forward and splat death finished pose + //# #sep BOTH_ DEAD TWITCH/FLOP # React to being shot from death poses + BOTH_DEADFLOP1, //# React to being shot from First Death finished pose + BOTH_DEADFLOP2, //# React to being shot from Second Death finished pose + BOTH_DEADFLOP3, //# React to being shot from Third Death finished pose + BOTH_DEADFLOP4, //# React to being shot from Fourth Death finished pose + BOTH_DEADFLOP5, //# React to being shot from Fifth Death finished pose + BOTH_DEADFORWARD1_FLOP, //# React to being shot First thrown forward death finished pose + BOTH_DEADFORWARD2_FLOP, //# React to being shot Second thrown forward death finished pose + BOTH_DEADBACKWARD1_FLOP, //# React to being shot First thrown backward death finished pose + BOTH_DEADBACKWARD2_FLOP, //# React to being shot Second thrown backward death finished pose + BOTH_LYINGDEAD1_FLOP, //# React to being shot Killed lying down death finished pose + BOTH_STUMBLEDEAD1_FLOP, //# React to being shot Stumble forward death finished pose + BOTH_FALLDEAD1_FLOP, //# React to being shot Fall forward and splat death finished pose + BOTH_DISMEMBER_HEAD1, //# + BOTH_DISMEMBER_TORSO1, //# + BOTH_DISMEMBER_LLEG, //# + BOTH_DISMEMBER_RLEG, //# + BOTH_DISMEMBER_RARM, //# + BOTH_DISMEMBER_LARM, //# + //# #sep BOTH_ PAINS + BOTH_PAIN1, //# First take pain anim + BOTH_PAIN2, //# Second take pain anim + BOTH_PAIN3, //# Third take pain anim + BOTH_PAIN4, //# Fourth take pain anim + BOTH_PAIN5, //# Fifth take pain anim - from behind + BOTH_PAIN6, //# Sixth take pain anim - from behind + BOTH_PAIN7, //# Seventh take pain anim - from behind + BOTH_PAIN8, //# Eigth take pain anim - from behind + BOTH_PAIN9, //# + BOTH_PAIN10, //# + BOTH_PAIN11, //# + BOTH_PAIN12, //# + BOTH_PAIN13, //# + BOTH_PAIN14, //# + BOTH_PAIN15, //# + BOTH_PAIN16, //# + BOTH_PAIN17, //# + BOTH_PAIN18, //# + BOTH_PAIN19, //# + BOTH_PAIN20, //# GETTING SHOCKED + + //# #sep BOTH_ ATTACKS + BOTH_ATTACK1, //# Attack with stun baton + BOTH_ATTACK2, //# Attack with one-handed pistol + BOTH_ATTACK2IDLE1, //# Idle with one-handed pistol + BOTH_ATTACK3, //# Attack with blaster rifle + BOTH_ATTACK4, //# Attack with disruptor + BOTH_ATTACK5, //# Attack with bow caster + BOTH_ATTACK6, //# Attack with ??? + BOTH_ATTACK7, //# Attack with ??? + BOTH_ATTACK8, //# Attack with ??? + BOTH_ATTACK9, //# Attack with rocket launcher + BOTH_ATTACK10, //# Attack with thermal det + BOTH_ATTACK11, //# Attack with laser trap + BOTH_ATTACK12, //# Attack with detpack + BOTH_MELEE1, //# First melee attack + BOTH_MELEE2, //# Second melee attack + BOTH_MELEE3, //# Third melee attack + BOTH_MELEE4, //# Fourth melee attack + BOTH_MELEE5, //# Fifth melee attack + BOTH_MELEE6, //# Sixth melee attack + BOTH_THERMAL_READY, //# pull back with thermal + BOTH_THERMAL_THROW, //# throw thermal + //* #sep BOTH_ SABER ANIMS + //Saber attack anims - power level 2 + BOTH_A1_T__B_, //# Fast weak vertical attack top to bottom + BOTH_A1__L__R, //# Fast weak horizontal attack left to right + BOTH_A1__R__L, //# Fast weak horizontal attack right to left + BOTH_A1_TL_BR, //# Fast weak diagonal attack top left to botom right + BOTH_A1_BR_TL, //# Fast weak diagonal attack top left to botom right + BOTH_A1_BL_TR, //# Fast weak diagonal attack bottom left to top right + BOTH_A1_TR_BL, //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + BOTH_T1_BR__R, //# Fast arc bottom right to right + BOTH_T1_BR_TL, //# Fast weak spin bottom right to top left + BOTH_T1_BR__L, //# Fast weak spin bottom right to left + BOTH_T1_BR_BL, //# Fast weak spin bottom right to bottom left + BOTH_T1__R_TR, //# Fast arc right to top right + BOTH_T1__R_TL, //# Fast arc right to top left + BOTH_T1__R__L, //# Fast weak spin right to left + BOTH_T1__R_BL, //# Fast weak spin right to bottom left + BOTH_T1_TR_BR, //# Fast arc top right to bottom right + BOTH_T1_TR_TL, //# Fast arc top right to top left + BOTH_T1_TR__L, //# Fast arc top right to left + BOTH_T1_TR_BL, //# Fast weak spin top right to bottom left + BOTH_T1_T__BR, //# Fast arc top to bottom right + BOTH_T1_T___R, //# Fast arc top to right + BOTH_T1_T__TR, //# Fast arc top to top right + BOTH_T1_T__TL, //# Fast arc top to top left + BOTH_T1_T___L, //# Fast arc top to left + BOTH_T1_T__BL, //# Fast arc top to bottom left + BOTH_T1_TL_BR, //# Fast weak spin top left to bottom right + BOTH_T1_TL_BL, //# Fast arc top left to bottom left + BOTH_T1__L_BR, //# Fast weak spin left to bottom right + BOTH_T1__L__R, //# Fast weak spin left to right + BOTH_T1__L_TL, //# Fast arc left to top left + BOTH_T1_BL_BR, //# Fast weak spin bottom left to bottom right + BOTH_T1_BL__R, //# Fast weak spin bottom left to right + BOTH_T1_BL_TR, //# Fast weak spin bottom left to top right + BOTH_T1_BL__L, //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + BOTH_T1_BR_TR, //# Fast arc bottom right to top right (use: BOTH_T1_TR_BR) + BOTH_T1_BR_T_, //# Fast arc bottom right to top (use: BOTH_T1_T__BR) + BOTH_T1__R_BR, //# Fast arc right to bottom right (use: BOTH_T1_BR__R) + BOTH_T1__R_T_, //# Fast ar right to top (use: BOTH_T1_T___R) + BOTH_T1_TR__R, //# Fast arc top right to right (use: BOTH_T1__R_TR) + BOTH_T1_TR_T_, //# Fast arc top right to top (use: BOTH_T1_T__TR) + BOTH_T1_TL__R, //# Fast arc top left to right (use: BOTH_T1__R_TL) + BOTH_T1_TL_TR, //# Fast arc top left to top right (use: BOTH_T1_TR_TL) + BOTH_T1_TL_T_, //# Fast arc top left to top (use: BOTH_T1_T__TL) + BOTH_T1_TL__L, //# Fast arc top left to left (use: BOTH_T1__L_TL) + BOTH_T1__L_TR, //# Fast arc left to top right (use: BOTH_T1_TR__L) + BOTH_T1__L_T_, //# Fast arc left to top (use: BOTH_T1_T___L) + BOTH_T1__L_BL, //# Fast arc left to bottom left (use: BOTH_T1_BL__L) + BOTH_T1_BL_T_, //# Fast arc bottom left to top (use: BOTH_T1_T__BL) + BOTH_T1_BL_TL, //# Fast arc bottom left to top left (use: BOTH_T1_TL_BL) + //Saber Attack Start Transitions + BOTH_S1_S1_T_, //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + BOTH_S1_S1__L, //# Fast plain transition from stance1 to left-to-right Fast weak attack + BOTH_S1_S1__R, //# Fast plain transition from stance1 to right-to-left Fast weak attack + BOTH_S1_S1_TL, //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + BOTH_S1_S1_BR, //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + BOTH_S1_S1_BL, //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + BOTH_S1_S1_TR, //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + BOTH_R1_B__S1, //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + BOTH_R1__L_S1, //# Fast plain transition from left-to-right Fast weak attack to stance1 + BOTH_R1__R_S1, //# Fast plain transition from right-to-left Fast weak attack to stance1 + BOTH_R1_TL_S1, //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + BOTH_R1_BR_S1, //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + BOTH_R1_BL_S1, //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + BOTH_R1_TR_S1, //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack, played backwards) + BOTH_B1_BR___, //# Bounce-back if attack from BR is blocked + BOTH_B1__R___, //# Bounce-back if attack from R is blocked + BOTH_B1_TR___, //# Bounce-back if attack from TR is blocked + BOTH_B1_T____, //# Bounce-back if attack from T is blocked + BOTH_B1_TL___, //# Bounce-back if attack from TL is blocked + BOTH_B1__L___, //# Bounce-back if attack from L is blocked + BOTH_B1_BL___, //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + BOTH_D1_BR___, //# Deflection toward BR + BOTH_D1__R___, //# Deflection toward R + BOTH_D1_TR___, //# Deflection toward TR + BOTH_D1_TL___, //# Deflection toward TL + BOTH_D1__L___, //# Deflection toward L + BOTH_D1_BL___, //# Deflection toward BL + BOTH_D1_B____, //# Deflection toward B + //Saber attack anims - power level 2 + BOTH_A2_T__B_, //# Fast weak vertical attack top to bottom + BOTH_A2__L__R, //# Fast weak horizontal attack left to right + BOTH_A2__R__L, //# Fast weak horizontal attack right to left + BOTH_A2_TL_BR, //# Fast weak diagonal attack top left to botom right + BOTH_A2_BR_TL, //# Fast weak diagonal attack top left to botom right + BOTH_A2_BL_TR, //# Fast weak diagonal attack bottom left to top right + BOTH_A2_TR_BL, //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + BOTH_T2_BR__R, //# Fast arc bottom right to right + BOTH_T2_BR_TL, //# Fast weak spin bottom right to top left + BOTH_T2_BR__L, //# Fast weak spin bottom right to left + BOTH_T2_BR_BL, //# Fast weak spin bottom right to bottom left + BOTH_T2__R_TR, //# Fast arc right to top right + BOTH_T2__R_TL, //# Fast arc right to top left + BOTH_T2__R__L, //# Fast weak spin right to left + BOTH_T2__R_BL, //# Fast weak spin right to bottom left + BOTH_T2_TR_BR, //# Fast arc top right to bottom right + BOTH_T2_TR_TL, //# Fast arc top right to top left + BOTH_T2_TR__L, //# Fast arc top right to left + BOTH_T2_TR_BL, //# Fast weak spin top right to bottom left + BOTH_T2_T__BR, //# Fast arc top to bottom right + BOTH_T2_T___R, //# Fast arc top to right + BOTH_T2_T__TR, //# Fast arc top to top right + BOTH_T2_T__TL, //# Fast arc top to top left + BOTH_T2_T___L, //# Fast arc top to left + BOTH_T2_T__BL, //# Fast arc top to bottom left + BOTH_T2_TL_BR, //# Fast weak spin top left to bottom right + BOTH_T2_TL_BL, //# Fast arc top left to bottom left + BOTH_T2__L_BR, //# Fast weak spin left to bottom right + BOTH_T2__L__R, //# Fast weak spin left to right + BOTH_T2__L_TL, //# Fast arc left to top left + BOTH_T2_BL_BR, //# Fast weak spin bottom left to bottom right + BOTH_T2_BL__R, //# Fast weak spin bottom left to right + BOTH_T2_BL_TR, //# Fast weak spin bottom left to top right + BOTH_T2_BL__L, //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + BOTH_T2_BR_TR, //# Fast arc bottom right to top right (use: BOTH_T2_TR_BR) + BOTH_T2_BR_T_, //# Fast arc bottom right to top (use: BOTH_T2_T__BR) + BOTH_T2__R_BR, //# Fast arc right to bottom right (use: BOTH_T2_BR__R) + BOTH_T2__R_T_, //# Fast ar right to top (use: BOTH_T2_T___R) + BOTH_T2_TR__R, //# Fast arc top right to right (use: BOTH_T2__R_TR) + BOTH_T2_TR_T_, //# Fast arc top right to top (use: BOTH_T2_T__TR) + BOTH_T2_TL__R, //# Fast arc top left to right (use: BOTH_T2__R_TL) + BOTH_T2_TL_TR, //# Fast arc top left to top right (use: BOTH_T2_TR_TL) + BOTH_T2_TL_T_, //# Fast arc top left to top (use: BOTH_T2_T__TL) + BOTH_T2_TL__L, //# Fast arc top left to left (use: BOTH_T2__L_TL) + BOTH_T2__L_TR, //# Fast arc left to top right (use: BOTH_T2_TR__L) + BOTH_T2__L_T_, //# Fast arc left to top (use: BOTH_T2_T___L) + BOTH_T2__L_BL, //# Fast arc left to bottom left (use: BOTH_T2_BL__L) + BOTH_T2_BL_T_, //# Fast arc bottom left to top (use: BOTH_T2_T__BL) + BOTH_T2_BL_TL, //# Fast arc bottom left to top left (use: BOTH_T2_TL_BL) + //Saber Attack Start Transitions + BOTH_S2_S1_T_, //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + BOTH_S2_S1__L, //# Fast plain transition from stance1 to left-to-right Fast weak attack + BOTH_S2_S1__R, //# Fast plain transition from stance1 to right-to-left Fast weak attack + BOTH_S2_S1_TL, //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + BOTH_S2_S1_BR, //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + BOTH_S2_S1_BL, //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + BOTH_S2_S1_TR, //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + BOTH_R2_B__S1, //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + BOTH_R2__L_S1, //# Fast plain transition from left-to-right Fast weak attack to stance1 + BOTH_R2__R_S1, //# Fast plain transition from right-to-left Fast weak attack to stance1 + BOTH_R2_TL_S1, //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + BOTH_R2_BR_S1, //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + BOTH_R2_BL_S1, //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + BOTH_R2_TR_S1, //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack, played backwards) + BOTH_B2_BR___, //# Bounce-back if attack from BR is blocked + BOTH_B2__R___, //# Bounce-back if attack from R is blocked + BOTH_B2_TR___, //# Bounce-back if attack from TR is blocked + BOTH_B2_T____, //# Bounce-back if attack from T is blocked + BOTH_B2_TL___, //# Bounce-back if attack from TL is blocked + BOTH_B2__L___, //# Bounce-back if attack from L is blocked + BOTH_B2_BL___, //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + BOTH_D2_BR___, //# Deflection toward BR + BOTH_D2__R___, //# Deflection toward R + BOTH_D2_TR___, //# Deflection toward TR + BOTH_D2_TL___, //# Deflection toward TL + BOTH_D2__L___, //# Deflection toward L + BOTH_D2_BL___, //# Deflection toward BL + BOTH_D2_B____, //# Deflection toward B + //Saber attack anims - power level 3 + BOTH_A3_T__B_, //# Fast weak vertical attack top to bottom + BOTH_A3__L__R, //# Fast weak horizontal attack left to right + BOTH_A3__R__L, //# Fast weak horizontal attack right to left + BOTH_A3_TL_BR, //# Fast weak diagonal attack top left to botom right + BOTH_A3_BR_TL, //# Fast weak diagonal attack top left to botom right + BOTH_A3_BL_TR, //# Fast weak diagonal attack bottom left to top right + BOTH_A3_TR_BL, //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + BOTH_T3_BR__R, //# Fast arc bottom right to right + BOTH_T3_BR_TL, //# Fast weak spin bottom right to top left + BOTH_T3_BR__L, //# Fast weak spin bottom right to left + BOTH_T3_BR_BL, //# Fast weak spin bottom right to bottom left + BOTH_T3__R_TR, //# Fast arc right to top right + BOTH_T3__R_TL, //# Fast arc right to top left + BOTH_T3__R__L, //# Fast weak spin right to left + BOTH_T3__R_BL, //# Fast weak spin right to bottom left + BOTH_T3_TR_BR, //# Fast arc top right to bottom right + BOTH_T3_TR_TL, //# Fast arc top right to top left + BOTH_T3_TR__L, //# Fast arc top right to left + BOTH_T3_TR_BL, //# Fast weak spin top right to bottom left + BOTH_T3_T__BR, //# Fast arc top to bottom right + BOTH_T3_T___R, //# Fast arc top to right + BOTH_T3_T__TR, //# Fast arc top to top right + BOTH_T3_T__TL, //# Fast arc top to top left + BOTH_T3_T___L, //# Fast arc top to left + BOTH_T3_T__BL, //# Fast arc top to bottom left + BOTH_T3_TL_BR, //# Fast weak spin top left to bottom right + BOTH_T3_TL_BL, //# Fast arc top left to bottom left + BOTH_T3__L_BR, //# Fast weak spin left to bottom right + BOTH_T3__L__R, //# Fast weak spin left to right + BOTH_T3__L_TL, //# Fast arc left to top left + BOTH_T3_BL_BR, //# Fast weak spin bottom left to bottom right + BOTH_T3_BL__R, //# Fast weak spin bottom left to right + BOTH_T3_BL_TR, //# Fast weak spin bottom left to top right + BOTH_T3_BL__L, //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + BOTH_T3_BR_TR, //# Fast arc bottom right to top right (use: BOTH_T3_TR_BR) + BOTH_T3_BR_T_, //# Fast arc bottom right to top (use: BOTH_T3_T__BR) + BOTH_T3__R_BR, //# Fast arc right to bottom right (use: BOTH_T3_BR__R) + BOTH_T3__R_T_, //# Fast ar right to top (use: BOTH_T3_T___R) + BOTH_T3_TR__R, //# Fast arc top right to right (use: BOTH_T3__R_TR) + BOTH_T3_TR_T_, //# Fast arc top right to top (use: BOTH_T3_T__TR) + BOTH_T3_TL__R, //# Fast arc top left to right (use: BOTH_T3__R_TL) + BOTH_T3_TL_TR, //# Fast arc top left to top right (use: BOTH_T3_TR_TL) + BOTH_T3_TL_T_, //# Fast arc top left to top (use: BOTH_T3_T__TL) + BOTH_T3_TL__L, //# Fast arc top left to left (use: BOTH_T3__L_TL) + BOTH_T3__L_TR, //# Fast arc left to top right (use: BOTH_T3_TR__L) + BOTH_T3__L_T_, //# Fast arc left to top (use: BOTH_T3_T___L) + BOTH_T3__L_BL, //# Fast arc left to bottom left (use: BOTH_T3_BL__L) + BOTH_T3_BL_T_, //# Fast arc bottom left to top (use: BOTH_T3_T__BL) + BOTH_T3_BL_TL, //# Fast arc bottom left to top left (use: BOTH_T3_TL_BL) + //Saber Attack Start Transitions + BOTH_S3_S1_T_, //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + BOTH_S3_S1__L, //# Fast plain transition from stance1 to left-to-right Fast weak attack + BOTH_S3_S1__R, //# Fast plain transition from stance1 to right-to-left Fast weak attack + BOTH_S3_S1_TL, //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + BOTH_S3_S1_BR, //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + BOTH_S3_S1_BL, //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + BOTH_S3_S1_TR, //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + BOTH_R3_B__S1, //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + BOTH_R3__L_S1, //# Fast plain transition from left-to-right Fast weak attack to stance1 + BOTH_R3__R_S1, //# Fast plain transition from right-to-left Fast weak attack to stance1 + BOTH_R3_TL_S1, //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + BOTH_R3_BR_S1, //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + BOTH_R3_BL_S1, //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + BOTH_R3_TR_S1, //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack, played backwards) + BOTH_B3_BR___, //# Bounce-back if attack from BR is blocked + BOTH_B3__R___, //# Bounce-back if attack from R is blocked + BOTH_B3_TR___, //# Bounce-back if attack from TR is blocked + BOTH_B3_T____, //# Bounce-back if attack from T is blocked + BOTH_B3_TL___, //# Bounce-back if attack from TL is blocked + BOTH_B3__L___, //# Bounce-back if attack from L is blocked + BOTH_B3_BL___, //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + BOTH_D3_BR___, //# Deflection toward BR + BOTH_D3__R___, //# Deflection toward R + BOTH_D3_TR___, //# Deflection toward TR + BOTH_D3_TL___, //# Deflection toward TL + BOTH_D3__L___, //# Deflection toward L + BOTH_D3_BL___, //# Deflection toward BL + BOTH_D3_B____, //# Deflection toward B + //Saber attack anims - power level 4 - Desann's + BOTH_A4_T__B_, //# Fast weak vertical attack top to bottom + BOTH_A4__L__R, //# Fast weak horizontal attack left to right + BOTH_A4__R__L, //# Fast weak horizontal attack right to left + BOTH_A4_TL_BR, //# Fast weak diagonal attack top left to botom right + BOTH_A4_BR_TL, //# Fast weak diagonal attack top left to botom right + BOTH_A4_BL_TR, //# Fast weak diagonal attack bottom left to top right + BOTH_A4_TR_BL, //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + BOTH_T4_BR__R, //# Fast arc bottom right to right + BOTH_T4_BR_TL, //# Fast weak spin bottom right to top left + BOTH_T4_BR__L, //# Fast weak spin bottom right to left + BOTH_T4_BR_BL, //# Fast weak spin bottom right to bottom left + BOTH_T4__R_TR, //# Fast arc right to top right + BOTH_T4__R_TL, //# Fast arc right to top left + BOTH_T4__R__L, //# Fast weak spin right to left + BOTH_T4__R_BL, //# Fast weak spin right to bottom left + BOTH_T4_TR_BR, //# Fast arc top right to bottom right + BOTH_T4_TR_TL, //# Fast arc top right to top left + BOTH_T4_TR__L, //# Fast arc top right to left + BOTH_T4_TR_BL, //# Fast weak spin top right to bottom left + BOTH_T4_T__BR, //# Fast arc top to bottom right + BOTH_T4_T___R, //# Fast arc top to right + BOTH_T4_T__TR, //# Fast arc top to top right + BOTH_T4_T__TL, //# Fast arc top to top left + BOTH_T4_T___L, //# Fast arc top to left + BOTH_T4_T__BL, //# Fast arc top to bottom left + BOTH_T4_TL_BR, //# Fast weak spin top left to bottom right + BOTH_T4_TL_BL, //# Fast arc top left to bottom left + BOTH_T4__L_BR, //# Fast weak spin left to bottom right + BOTH_T4__L__R, //# Fast weak spin left to right + BOTH_T4__L_TL, //# Fast arc left to top left + BOTH_T4_BL_BR, //# Fast weak spin bottom left to bottom right + BOTH_T4_BL__R, //# Fast weak spin bottom left to right + BOTH_T4_BL_TR, //# Fast weak spin bottom left to top right + BOTH_T4_BL__L, //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + BOTH_T4_BR_TR, //# Fast arc bottom right to top right (use: BOTH_T4_TR_BR) + BOTH_T4_BR_T_, //# Fast arc bottom right to top (use: BOTH_T4_T__BR) + BOTH_T4__R_BR, //# Fast arc right to bottom right (use: BOTH_T4_BR__R) + BOTH_T4__R_T_, //# Fast ar right to top (use: BOTH_T4_T___R) + BOTH_T4_TR__R, //# Fast arc top right to right (use: BOTH_T4__R_TR) + BOTH_T4_TR_T_, //# Fast arc top right to top (use: BOTH_T4_T__TR) + BOTH_T4_TL__R, //# Fast arc top left to right (use: BOTH_T4__R_TL) + BOTH_T4_TL_TR, //# Fast arc top left to top right (use: BOTH_T4_TR_TL) + BOTH_T4_TL_T_, //# Fast arc top left to top (use: BOTH_T4_T__TL) + BOTH_T4_TL__L, //# Fast arc top left to left (use: BOTH_T4__L_TL) + BOTH_T4__L_TR, //# Fast arc left to top right (use: BOTH_T4_TR__L) + BOTH_T4__L_T_, //# Fast arc left to top (use: BOTH_T4_T___L) + BOTH_T4__L_BL, //# Fast arc left to bottom left (use: BOTH_T4_BL__L) + BOTH_T4_BL_T_, //# Fast arc bottom left to top (use: BOTH_T4_T__BL) + BOTH_T4_BL_TL, //# Fast arc bottom left to top left (use: BOTH_T4_TL_BL) + //Saber Attack Start Transitions + BOTH_S4_S1_T_, //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + BOTH_S4_S1__L, //# Fast plain transition from stance1 to left-to-right Fast weak attack + BOTH_S4_S1__R, //# Fast plain transition from stance1 to right-to-left Fast weak attack + BOTH_S4_S1_TL, //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + BOTH_S4_S1_BR, //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + BOTH_S4_S1_BL, //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + BOTH_S4_S1_TR, //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + BOTH_R4_B__S1, //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + BOTH_R4__L_S1, //# Fast plain transition from left-to-right Fast weak attack to stance1 + BOTH_R4__R_S1, //# Fast plain transition from right-to-left Fast weak attack to stance1 + BOTH_R4_TL_S1, //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + BOTH_R4_BR_S1, //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + BOTH_R4_BL_S1, //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + BOTH_R4_TR_S1, //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack, played backwards) + BOTH_B4_BR___, //# Bounce-back if attack from BR is blocked + BOTH_B4__R___, //# Bounce-back if attack from R is blocked + BOTH_B4_TR___, //# Bounce-back if attack from TR is blocked + BOTH_B4_T____, //# Bounce-back if attack from T is blocked + BOTH_B4_TL___, //# Bounce-back if attack from TL is blocked + BOTH_B4__L___, //# Bounce-back if attack from L is blocked + BOTH_B4_BL___, //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + BOTH_D4_BR___, //# Deflection toward BR + BOTH_D4__R___, //# Deflection toward R + BOTH_D4_TR___, //# Deflection toward TR + BOTH_D4_TL___, //# Deflection toward TL + BOTH_D4__L___, //# Deflection toward L + BOTH_D4_BL___, //# Deflection toward BL + BOTH_D4_B____, //# Deflection toward B + //Saber attack anims - power level 5 - Tavion's + BOTH_A5_T__B_, //# Fast weak vertical attack top to bottom + BOTH_A5__L__R, //# Fast weak horizontal attack left to right + BOTH_A5__R__L, //# Fast weak horizontal attack right to left + BOTH_A5_TL_BR, //# Fast weak diagonal attack top left to botom right + BOTH_A5_BR_TL, //# Fast weak diagonal attack top left to botom right + BOTH_A5_BL_TR, //# Fast weak diagonal attack bottom left to top right + BOTH_A5_TR_BL, //# Fast weak diagonal attack bottom left to right + //Saber Arc and Spin Transitions + BOTH_T5_BR__R, //# Fast arc bottom right to right + BOTH_T5_BR_TL, //# Fast weak spin bottom right to top left + BOTH_T5_BR__L, //# Fast weak spin bottom right to left + BOTH_T5_BR_BL, //# Fast weak spin bottom right to bottom left + BOTH_T5__R_TR, //# Fast arc right to top right + BOTH_T5__R_TL, //# Fast arc right to top left + BOTH_T5__R__L, //# Fast weak spin right to left + BOTH_T5__R_BL, //# Fast weak spin right to bottom left + BOTH_T5_TR_BR, //# Fast arc top right to bottom right + BOTH_T5_TR_TL, //# Fast arc top right to top left + BOTH_T5_TR__L, //# Fast arc top right to left + BOTH_T5_TR_BL, //# Fast weak spin top right to bottom left + BOTH_T5_T__BR, //# Fast arc top to bottom right + BOTH_T5_T___R, //# Fast arc top to right + BOTH_T5_T__TR, //# Fast arc top to top right + BOTH_T5_T__TL, //# Fast arc top to top left + BOTH_T5_T___L, //# Fast arc top to left + BOTH_T5_T__BL, //# Fast arc top to bottom left + BOTH_T5_TL_BR, //# Fast weak spin top left to bottom right + BOTH_T5_TL_BL, //# Fast arc top left to bottom left + BOTH_T5__L_BR, //# Fast weak spin left to bottom right + BOTH_T5__L__R, //# Fast weak spin left to right + BOTH_T5__L_TL, //# Fast arc left to top left + BOTH_T5_BL_BR, //# Fast weak spin bottom left to bottom right + BOTH_T5_BL__R, //# Fast weak spin bottom left to right + BOTH_T5_BL_TR, //# Fast weak spin bottom left to top right + BOTH_T5_BL__L, //# Fast arc bottom left to left + //Saber Arc Transitions that use existing animations played backwards + BOTH_T5_BR_TR, //# Fast arc bottom right to top right (use: BOTH_T5_TR_BR) + BOTH_T5_BR_T_, //# Fast arc bottom right to top (use: BOTH_T5_T__BR) + BOTH_T5__R_BR, //# Fast arc right to bottom right (use: BOTH_T5_BR__R) + BOTH_T5__R_T_, //# Fast ar right to top (use: BOTH_T5_T___R) + BOTH_T5_TR__R, //# Fast arc top right to right (use: BOTH_T5__R_TR) + BOTH_T5_TR_T_, //# Fast arc top right to top (use: BOTH_T5_T__TR) + BOTH_T5_TL__R, //# Fast arc top left to right (use: BOTH_T5__R_TL) + BOTH_T5_TL_TR, //# Fast arc top left to top right (use: BOTH_T5_TR_TL) + BOTH_T5_TL_T_, //# Fast arc top left to top (use: BOTH_T5_T__TL) + BOTH_T5_TL__L, //# Fast arc top left to left (use: BOTH_T5__L_TL) + BOTH_T5__L_TR, //# Fast arc left to top right (use: BOTH_T5_TR__L) + BOTH_T5__L_T_, //# Fast arc left to top (use: BOTH_T5_T___L) + BOTH_T5__L_BL, //# Fast arc left to bottom left (use: BOTH_T5_BL__L) + BOTH_T5_BL_T_, //# Fast arc bottom left to top (use: BOTH_T5_T__BL) + BOTH_T5_BL_TL, //# Fast arc bottom left to top left (use: BOTH_T5_TL_BL) + //Saber Attack Start Transitions + BOTH_S5_S1_T_, //# Fast plain transition from stance1 to top-to-bottom Fast weak attack + BOTH_S5_S1__L, //# Fast plain transition from stance1 to left-to-right Fast weak attack + BOTH_S5_S1__R, //# Fast plain transition from stance1 to right-to-left Fast weak attack + BOTH_S5_S1_TL, //# Fast plain transition from stance1 to top-left-to-bottom-right Fast weak attack + BOTH_S5_S1_BR, //# Fast plain transition from stance1 to bottom-right-to-top-left Fast weak attack + BOTH_S5_S1_BL, //# Fast plain transition from stance1 to bottom-left-to-top-right Fast weak attack + BOTH_S5_S1_TR, //# Fast plain transition from stance1 to top-right-to-bottom-left Fast weak attack + //Saber Attack Return Transitions + BOTH_R5_B__S1, //# Fast plain transition from top-to-bottom Fast weak attack to stance1 + BOTH_R5__L_S1, //# Fast plain transition from left-to-right Fast weak attack to stance1 + BOTH_R5__R_S1, //# Fast plain transition from right-to-left Fast weak attack to stance1 + BOTH_R5_TL_S1, //# Fast plain transition from top-left-to-bottom-right Fast weak attack to stance1 + BOTH_R5_BR_S1, //# Fast plain transition from bottom-right-to-top-left Fast weak attack to stance1 + BOTH_R5_BL_S1, //# Fast plain transition from bottom-left-to-top-right Fast weak attack to stance1 + BOTH_R5_TR_S1, //# Fast plain transition from top-right-to-bottom-left Fast weak attack + //Saber Attack Bounces (first 4 frames of an attack, played backwards) + BOTH_B5_BR___, //# Bounce-back if attack from BR is blocked + BOTH_B5__R___, //# Bounce-back if attack from R is blocked + BOTH_B5_TR___, //# Bounce-back if attack from TR is blocked + BOTH_B5_T____, //# Bounce-back if attack from T is blocked + BOTH_B5_TL___, //# Bounce-back if attack from TL is blocked + BOTH_B5__L___, //# Bounce-back if attack from L is blocked + BOTH_B5_BL___, //# Bounce-back if attack from BL is blocked + //Saber Attack Deflections (last 4 frames of an attack) + BOTH_D5_BR___, //# Deflection toward BR + BOTH_D5__R___, //# Deflection toward R + BOTH_D5_TR___, //# Deflection toward TR + BOTH_D5_TL___, //# Deflection toward TL + BOTH_D5__L___, //# Deflection toward L + BOTH_D5_BL___, //# Deflection toward BL + BOTH_D5_B____, //# Deflection toward B + //Saber parry anims + BOTH_P1_S1_T_, //# Block shot/saber top + BOTH_P1_S1_TR, //# Block shot/saber top right + BOTH_P1_S1_TL, //# Block shot/saber top left + BOTH_P1_S1_BL, //# Block shot/saber bottom left + BOTH_P1_S1_BR, //# Block shot/saber bottom right + //Saber knockaway + BOTH_K1_S1_T_, //# knockaway saber top + BOTH_K1_S1_TR, //# knockaway saber top right + BOTH_K1_S1_TL, //# knockaway saber top left + BOTH_K1_S1_BL, //# knockaway saber bottom left + BOTH_K1_S1_B_, //# knockaway saber bottom + BOTH_K1_S1_BR, //# knockaway saber bottom right + //Saber attack knocked away + BOTH_V1_BR_S1, //# BR attack knocked away + BOTH_V1__R_S1, //# R attack knocked away + BOTH_V1_TR_S1, //# TR attack knocked away + BOTH_V1_T__S1, //# T attack knocked away + BOTH_V1_TL_S1, //# TL attack knocked away + BOTH_V1__L_S1, //# L attack knocked away + BOTH_V1_BL_S1, //# BL attack knocked away + BOTH_V1_B__S1, //# B attack knocked away + //Saber parry broken + BOTH_H1_S1_T_, //# saber knocked down from top parry + BOTH_H1_S1_TR, //# saber knocked down-left from TR parry + BOTH_H1_S1_TL, //# saber knocked down-right from TL parry + BOTH_H1_S1_BL, //# saber knocked up-right from BL parry + BOTH_H1_S1_B_, //# saber knocked up over head from ready? + BOTH_H1_S1_BR, //# saber knocked up-left from BR parry + //Sabers locked anims + BOTH_BF2RETURN, //# + BOTH_BF2BREAK, //# + BOTH_BF2LOCK, //# + BOTH_BF1RETURN, //# + BOTH_BF1BREAK, //# + BOTH_BF1LOCK, //# + BOTH_CWCIRCLE_R2__R_S1, //# + BOTH_CCWCIRCLE_R2__L_S1, //# + BOTH_CWCIRCLE_A2__L__R, //# + BOTH_CCWCIRCLE_A2__R__L, //# + BOTH_CWCIRCLEBREAK, //# + BOTH_CCWCIRCLEBREAK, //# + BOTH_CWCIRCLELOCK, //# + BOTH_CCWCIRCLELOCK, //# + + BOTH_SABERFAST_STANCE, + BOTH_SABERSLOW_STANCE, + BOTH_A2_STABBACK1, //# Stab saber backward + BOTH_ATTACK_BACK, //# Swing around backwards and attack + BOTH_JUMPFLIPSLASHDOWN1,//# + BOTH_JUMPFLIPSTABDOWN,//# + BOTH_FORCELEAP2_T__B_,//# + BOTH_LUNGE2_B__T_,//# + BOTH_CROUCHATTACKBACK1,//# + + //# #sep BOTH_ STANDING + BOTH_STAND1, //# Standing idle, no weapon, hands down + BOTH_STAND1IDLE1, //# Random standing idle + BOTH_STAND2, //# Standing idle with a saber + BOTH_STAND2IDLE1, //# Random standing idle + BOTH_STAND2IDLE2, //# Random standing idle + BOTH_STAND3, //# Standing idle with 2-handed weapon + BOTH_STAND3IDLE1, //# Random standing idle + BOTH_STAND4, //# hands clasp behind back + BOTH_STAND4IDLE1, //# Random standing idle + BOTH_STAND5, //# standing idle, no weapon, hand down, back straight + BOTH_STAND5IDLE1, //# Random standing idle + BOTH_STAND6, //# one handed, gun at side, relaxed stand + BOTH_STAND7, //# both hands on hips (female) + BOTH_STAND8, //# both hands on hips (male) + BOTH_STAND1TO3, //# Transition from stand1 to stand3 + BOTH_STAND3TO1, //# Transition from stand3 to stand1 + BOTH_STAND1TO2, //# Transition from stand1 to stand2 + BOTH_STAND2TO1, //# Transition from stand2 to stand1 + BOTH_STAND2TO4, //# Transition from stand2 to stand4 + BOTH_STAND4TO2, //# Transition from stand4 to stand2 + BOTH_STANDTOWALK1, //# Transition from stand1 to walk1 + BOTH_STAND4TOATTACK2, //# relaxed stand to 1-handed pistol ready + BOTH_STANDUP1, //# standing up and stumbling + BOTH_STANDUP2, //# Luke standing up from his meditation platform (cin # 37) + BOTH_STAND5TOSIT3, //# transition from stand 5 to sit 3 + BOTH_STAND1_REELO, //# Reelo in his stand1 position (cin #18) + BOTH_STAND5_REELO, //# Reelo in his stand5 position (cin #18) + BOTH_STAND1TOSTAND5, //# Transition from stand1 to stand5 + BOTH_STAND5TOSTAND1, //# Transition from stand5 to stand1 + BOTH_STAND5TOAIM, //# Transition of Kye aiming his gun at Desann (cin #9) + BOTH_STAND5STARTLEDLOOKLEFT, //# Kyle turning to watch the bridge drop (cin #9) + BOTH_STARTLEDLOOKLEFTTOSTAND5, //# Kyle returning to stand 5 from watching the bridge drop (cin #9) + BOTH_STAND5TOSTAND8, //# Transition from stand5 to stand8 + BOTH_STAND7TOSTAND8, //# Tavion putting hands on back of chair (cin #11) + BOTH_STAND8TOSTAND5, //# Transition from stand8 to stand5 + BOTH_STAND5SHIFTWEIGHT, //# Weightshift from stand5 to side and back to stand5 + BOTH_STAND5SHIFTWEIGHTSTART, //# From stand5 to side + BOTH_STAND5SHIFTWEIGHTSTOP, //# From side to stand5 + BOTH_STAND5TURNLEFTSTART, //# Start turning left from stand5 + BOTH_STAND5TURNLEFTSTOP, //# Stop turning left from stand5 + BOTH_STAND5TURNRIGHTSTART, //# Start turning right from stand5 + BOTH_STAND5TURNRIGHTSTOP, //# Stop turning right from stand5 + BOTH_STAND5LOOK180LEFTSTART, //# Start looking over left shoulder (cin #17) + BOTH_STAND5LOOK180LEFTSTOP, //# Stop looking over left shoulder (cin #17) + + BOTH_CONSOLE1START, //# typing at a console + BOTH_CONSOLE1, //# typing at a console + BOTH_CONSOLE1STOP, //# typing at a console + BOTH_CONSOLE2START, //# typing at a console with comm link in hand (cin #5) + BOTH_CONSOLE2, //# typing at a console with comm link in hand (cin #5) + BOTH_CONSOLE2STOP, //# typing at a console with comm link in hand (cin #5) + BOTH_CONSOLE2HOLDCOMSTART, //# lean in to type at console while holding comm link in hand (cin #5) + BOTH_CONSOLE2HOLDCOMSTOP, //# lean away after typing at console while holding comm link in hand (cin #5) + + BOTH_GUARD_LOOKAROUND1, //# Cradling weapon and looking around + BOTH_GUARD_IDLE1, //# Cradling weapon and standing + BOTH_ALERT1, //# Startled by something while on guard + BOTH_GESTURE1, //# Generic gesture, non-specific + BOTH_GESTURE2, //# Generic gesture, non-specific + BOTH_GESTURE3, //# Generic gesture, non-specific + BOTH_WALK1TALKCOMM1, //# Talking into coom link while walking + BOTH_TALK1, //# Generic talk anim + BOTH_TALK2, //# Generic talk anim + BOTH_TALKCOMM1START, //# Start talking into a comm link + BOTH_TALKCOMM1, //# Talking into a comm link + BOTH_TALKCOMM1STOP, //# Stop talking into a comm link + BOTH_TALKGESTURE1, //# Generic talk anim + BOTH_TALKGESTURE2, //# Generic talk anim + BOTH_TALKGESTURE3, //# Generic talk anim + BOTH_TALKGESTURE4START, //# Beginning talk anim 4 + BOTH_TALKGESTURE4, //# Talk gesture 4 + BOTH_TALKGESTURE4STOP, //# Ending talk anim 4 + BOTH_TALKGESTURE5START, //# Start hand on chin + BOTH_TALKGESTURE5, //# Hand on chin + BOTH_TALKGESTURE5STOP, //# Stop hand on chin + BOTH_TALKGESTURE6START, //# Starting Motions to self + BOTH_TALKGESTURE6, //# Pointing at self + BOTH_TALKGESTURE6STOP, //# Ending Motions to self + BOTH_TALKGESTURE7START, //# Start touches Kyle on shoulder + BOTH_TALKGESTURE7, //# Hold touches Kyle on shoulder + BOTH_TALKGESTURE7STOP, //# Ending touches Kyle on shoulder + BOTH_TALKGESTURE8START, //# Lando's chin hold + BOTH_TALKGESTURE8, //# Lando's chin hold + BOTH_TALKGESTURE8STOP, //# Lando's chin hold + BOTH_TALKGESTURE9, //# Same as gesture 2 but with the right hand + BOTH_TALKGESTURE10, //# Shoulder shrug + BOTH_TALKGESTURE11START, //# Arms folded across chest + BOTH_TALKGESTURE11STOP, //# Arms folded across chest + BOTH_TALKGESTURE12, //# Tavion taunting Kyle + BOTH_TALKGESTURE13START, //# Luke warning Kyle + BOTH_TALKGESTURE13, //# Luke warning Kyle + BOTH_TALKGESTURE13STOP, //# Luke warning Kyle + BOTH_TALKGESTURE14, //# Luke gesturing to Kyle + BOTH_TALKGESTURE15START, //# Desann taunting Kyle + BOTH_TALKGESTURE15, //# Desann taunting Kyle + BOTH_TALKGESTURE15STOP, //# Desann taunting Kyle + BOTH_TALKGESTURE16, //# Bartender gesture cin #15 + BOTH_TALKGESTURE17, //# Bartender gesture cin #15 + BOTH_TALKGESTURE18, //# Bartender gesture cin #15 + BOTH_TALKGESTURE19START, //# Desann lifting his arm "Join me" (cin #34) + BOTH_TALKGESTURE19STOP, //# Desann lifting his arm "Join me" (cin #34) + BOTH_TALKGESTURE20START, //# Kyle lifting his arm "Join us" (cin #34) + BOTH_TALKGESTURE21, //# generic talk gesture from stand3 + BOTH_TALKGESTURE22, //# generic talk gesture from stand3 + BOTH_TALKGESTURE23, //# generic talk gesture from stand3 + BOTH_PAUSE1START, //# Luke pauses to warn Kyle (cin #24) start + BOTH_PAUSE1STOP, //# Luke pauses to warn Kyle (cin #24) stop + + BOTH_HEADTILTLSTART, //# Head tilt to left + BOTH_HEADTILTLSTOP, //# Head tilt to left + BOTH_HEADTILTRSTART, //# Head tilt to right + BOTH_HEADTILTRSTOP, //# Head tilt to right + BOTH_HEADNOD, //# Head shake YES + BOTH_HEADSHAKE, //# Head shake NO + BOTH_HEADSHAKE1_REELO, //# Head shake NO for Reelo + BOTH_SITHEADTILTLSTART, //# Head tilt to left from seated position + BOTH_SITHEADTILTLSTOP, //# Head tilt to left from seated position + BOTH_SITHEADTILTRSTART, //# Head tilt to right from seated position + BOTH_SITHEADTILTRSTOP, //# Head tilt to right from seated position + BOTH_SITHEADNOD, //# Head shake YES from seated position + BOTH_SITHEADSHAKE, //# Head shake NO from seated position + BOTH_SIT2HEADTILTLSTART, //# Head tilt to left from seated position 2 + BOTH_SIT2HEADTILTLSTOP, //# Head tilt to left from seated position 2 + + BOTH_REACH1START, //# Monmothma reaching for crystal + BOTH_REACH1STOP, //# Monmothma reaching for crystal + + BOTH_EXAMINE1START, //# Start Mon Mothma examining crystal + BOTH_EXAMINE1, //# Mon Mothma examining crystal + BOTH_EXAMINE1STOP, //# Stop Mon Mothma examining crystal + BOTH_EXAMINE2START, //# Start Kyle tossing crystal + BOTH_EXAMINE2, //# Hold Kyle tossing crystal + BOTH_EXAMINE2STOP, //# End Kyle tossing crystal + BOTH_EXAMINE3START, //# Start Lando looking around corner + BOTH_EXAMINE3, //# Hold Lando looking around corner + BOTH_EXAMINE3STOP, //# End Lando looking around corner + + BOTH_LEANLEFT2START, //# Start leaning left in chair + BOTH_LEANLEFT2STOP, //# Stop leaning left in chair + BOTH_LEANRIGHT3START, //# Start Lando leaning on wall + BOTH_LEANRIGHT3, //# Lando leaning on wall + BOTH_LEANRIGHT3STOP, //# Stop Lando leaning on wall + + BOTH_FORCEFOUNTAIN1_START, //# Kyle being lifted into the Force Fountain (cin #10) + BOTH_FORCEFOUNTAIN1_MIDDLE, //# Kyle changing to looping position in the Force Fountain (cin #10) + BOTH_FORCEFOUNTAIN1_LOOP, //# Kyle being spun in the Force Fountain (cin #10) + BOTH_FORCEFOUNTAIN1_STOP, //# Kyle being set down out of the Force Fountain (cin #10) + BOTH_THUMBING1, //# Lando gesturing with thumb over his shoulder (cin #19) + BOTH_COME_ON1, //# Jan gesturing to Kyle (cin #32a) + BOTH_STEADYSELF1, //# Jan trying to keep footing (cin #32a) + BOTH_STEADYSELF1END, //# Return hands to side from STEADSELF1 Kyle (cin#5) + BOTH_SILENCEGESTURE1, //# Luke silencing Kyle with a raised hand (cin #37) + BOTH_REACHFORSABER1, //# Luke holding hand out for Kyle's saber (cin #37) + BOTH_PUNCHER1, //# Jan punching Kyle in the shoulder (cin #37) + BOTH_CONSTRAINER1HOLD, //# Static pose of starting Tavion constraining Jan (cin #9) + BOTH_CONSTRAINEE1HOLD, //# Static pose of starting Jan being constrained by Tavion (cin #9) + BOTH_CONSTRAINER1STAND, //# Tavion constraining Jan in a stand pose (cin #9) + BOTH_CONSTRAINEE1STAND, //# Jan being constrained in a stand pose (cin #9) + BOTH_CONSTRAINER1WALK, //# Tavion shoving jan forward (cin #9) + BOTH_CONSTRAINEE1WALK, //# Jan being shoved forward by Tavion (cin #9) + BOTH_CONSTRAINER1LOOP, //# Tavion walking with Jan in a loop (cin #9) + BOTH_CONSTRAINEE1LOOP, //# Jan walking with Tavion in a loop (cin #9) + BOTH_SABERKILLER1, //# Tavion about to strike Jan with saber (cin #9) + BOTH_SABERKILLEE1, //# Jan about to be struck by Tavion with saber (cin #9) + BOTH_HANDSHAKER1START, //# Luke shaking Kyle's hand (cin #37) + BOTH_HANDSHAKER1LOOP, //# Luke shaking Kyle's hand (cin #37) + BOTH_HANDSHAKEE1START, //# Kyle shaking Luke's hand (cin #37) + BOTH_HANDSHAKEE1LOOP, //# Kyle shaking Luke's hand (cin #37) + BOTH_LAUGH1START, //# Reelo leaning forward before laughing (cin #18) + BOTH_LAUGH1STOP, //# Reelo laughing (cin #18) + BOTH_ESCAPEPOD_LEAVE1, //# Kyle leaving escape pod (cin #33) + BOTH_ESCAPEPOD_LEAVE2, //# Jan leaving escape pod (cin #33) + BOTH_HUGGER1, //# Kyle hugging Jan (cin #29) + BOTH_HUGGERSTOP1, //# Kyle stop hugging Jan but don't let her go (cin #29) + BOTH_HUGGERSTOP2, //# Kyle let go of Jan and step back (cin #29) + BOTH_HUGGEE1, //# Jan being hugged (cin #29) + BOTH_HUGGEESTOP1, //# Jan stop being hugged but don't let go (cin #29) + BOTH_HUGGEESTOP2, //# Jan released from hug (cin #29) + BOTH_KISSER1, //# Temp until the Kiss anim gets split up + BOTH_KISSER1START1, //# Kyle start kissing Jan + BOTH_KISSER1START2, //# Kyle start kissing Jan + BOTH_KISSER1LOOP, //# Kyle loop kissing Jan + BOTH_KISSER1STOP, //# Temp until the Kiss anim gets split up + BOTH_KISSER1STOP1, //# Kyle stop kissing but don't let go + BOTH_KISSER1STOP2, //# Kyle step back from Jan + BOTH_KISSEE1, //# Temp until the Kiss anim gets split up + BOTH_KISSEE1START1, //# Jan start being kissed + BOTH_KISSEE1START2, //# Jan start being kissed + BOTH_KISSEE1LOOP, //# Jan loop being kissed + BOTH_KISSEE1STOP, //# Temp until the Kiss anim gets split up + BOTH_KISSEE1STOP1, //# Jan stop being kissed but don't let go + BOTH_KISSEE1STOP2, //# Jan wait for Kyle to step back + BOTH_BARTENDER_IDLE1, //# Bartender idle in cin #15 + BOTH_BARTENDER_THROW1, //# Bartender throws glass in cin #15 + BOTH_BARTENDER_COWERSTART, //# Start of Bartender raising both hands up in surrender (cin #16) + BOTH_BARTENDER_COWERLOOP, //# Loop of Bartender waving both hands in surrender (cin #16) + BOTH_BARTENDER_COWER, //# Single frame of Bartender waving both hands in surrender (cin #16) + BOTH_THREATEN1_START, //# First frame of Kyle threatening Bartender with lightsaber (cin #16) + BOTH_THREATEN1, //# Kyle threatening Bartender with lightsaber (cin #16) + BOTH_RADIO_ONOFF, //# Mech Galak turning on his suit radio (cin #32) + BOTH_TRIUMPHANT1START, //# Mech Galak raising his arms in victory (cin #32) + BOTH_TRIUMPHANT1STARTGESTURE, //# Mech Galak raising his arms in victory (cin #32) + BOTH_TRIUMPHANT1STOP, //# Mech Galak lowering his arms in victory (cin #32) + + BOTH_SABERTHROW1START, //# Desann throwing his light saber (cin #26) + BOTH_SABERTHROW1STOP, //# Desann throwing his light saber (cin #26) + BOTH_SABERTHROW2START, //# Kyle throwing his light saber (cin #32) + BOTH_SABERTHROW2STOP, //# Kyle throwing his light saber (cin #32) + + BOTH_COVERUP1_LOOP, //# animation of getting in line of friendly fire + BOTH_COVERUP1_START, //# transitions from stand to coverup1_loop + BOTH_COVERUP1_END, //# transitions from coverup1_loop to stand + + BOTH_INJURED4, //# Injured pose 4 + BOTH_INJURED4TO5, //# Transition from INJURED4 to INJURED5 + BOTH_INJURED5, //# Injured pose 5 + + //# #sep BOTH_ SITTING/CROUCHING + BOTH_SIT1STAND, //# Stand up from First sitting anim + BOTH_SIT1, //# Normal chair sit. + BOTH_SIT2, //# Lotus position. + BOTH_SIT3, //# Sitting in tired position, elbows on knees + + BOTH_SIT2TO3, //# Trans from sit2 to sit3? + BOTH_SIT2TOSTAND5, //# Transition from sit 2 to stand 5 + BOTH_STAND5TOSIT2, //# Transition from stand 5 to sit 2 + BOTH_SIT2TOSIT4, //# Trans from sit2 to sit4 (cin #12) Luke leaning back from lotus position. + BOTH_SIT3TO1, //# Trans from sit3 to sit1? + BOTH_SIT3TO2, //# Trans from sit3 to sit2? + BOTH_SIT3TOSTAND5, //# transition from sit 3 to stand 5 + + BOTH_SIT4TO5, //# Trans from sit4 to sit5 + BOTH_SIT4TO6, //# Trans from sit4 to sit6 + BOTH_SIT5TO4, //# Trans from sit5 to sit4 + BOTH_SIT5TO6, //# Trans from sit5 to sit6 + BOTH_SIT6TO4, //# Trans from sit6 to sit4 + BOTH_SIT6TO5, //# Trans from sit6 to sit5 + BOTH_SIT7, //# sitting with arms over knees, no weapon + BOTH_SIT7TOSTAND1, //# getting up from sit7 into stand1 + + BOTH_CROUCH1, //# Transition from standing to crouch + BOTH_CROUCH1IDLE, //# Crouching idle + BOTH_CROUCH1WALK, //# Walking while crouched + BOTH_CROUCH1WALKBACK, //# Walking while crouched + BOTH_UNCROUCH1, //# Transition from crouch to standing + BOTH_CROUCH2IDLE, //# crouch and resting on back righ heel, no weapon + BOTH_CROUCH2TOSTAND1, //# going from crouch2 to stand1 + BOTH_CROUCH3, //# Desann crouching down to Kyle (cin 9) + BOTH_UNCROUCH3, //# Desann uncrouching down to Kyle (cin 9) + BOTH_CROUCH4, //# Slower version of crouch1 for cinematics + BOTH_UNCROUCH4, //# Slower version of uncrouch1 for cinematics + BOTH_GET_UP1, //# Get up from the ground, face down + BOTH_GET_UP2, //# Get up from the ground, face up + + BOTH_COCKPIT_SIT, //# sit in a cockpit. + + BOTH_GUNSIT1, //# sitting on an emplaced gun. + + BOTH_DEATH14_UNGRIP, //# Desann's end death (cin #35) + BOTH_DEATH14_SITUP, //# Tavion sitting up after having been thrown (cin #23) + BOTH_KNEES1, //# Tavion on her knees + BOTH_KNEES2, //# Tavion on her knees looking down + BOTH_KNEES2TO1, //# Transition of KNEES2 to KNEES1 + BOTH_RUMMAGE1START, //# Kyle rummaging for crystal (cin 2) + BOTH_RUMMAGE1, //# Kyle rummaging for crystal (cin 2) + BOTH_RUMMAGE1STOP, //# Kyle rummaging for crystal (cin 2) + BOTH_HOLDGLASS1, //# Bartender holds glass (cin# 14) + BOTH_SLIDEGLASS1, //# Bartender slides glass (cin# 14) + BOTH_SLAMSABERDOWN, //# Kyle slamming his saber on the bar top (cin# 14) + + //# #sep BOTH_ MOVING + BOTH_WALK1, //# Normal walk + BOTH_WALK2, //# Normal walk + BOTH_WALK3, //# Goes with stand3 + BOTH_WALK4, //# Walk cycle goes to a stand4 + BOTH_WALK5, //# Tavion taunting Kyle (cin 22) + BOTH_WALK6, //# Slow walk for Luke (cin 12) + BOTH_WALK7, //# Fast walk + BOTH_WALK8, //# Normal walk with hands behind back (Luke in cin#12) + BOTH_WALK9, //# Lando walk (cin #17) + BOTH_WALK10, //# Lando walk (cin #17) + BOTH_WALKTORUN1, //# transition from walk to run + BOTH_RUN1, //# Full run + BOTH_RUN1START, //# Start into full run1 + BOTH_RUN1STOP, //# Stop from full run1 + BOTH_RUN2, //# Full run + BOTH_RUNINJURED1, //# Run with injured left leg + BOTH_STRAFE_LEFT1, //# Sidestep left, should loop + BOTH_STRAFE_RIGHT1, //# Sidestep right, should loop + BOTH_RUNSTRAFE_LEFT1, //# Sidestep left, should loop + BOTH_RUNSTRAFE_RIGHT1, //# Sidestep right, should loop + BOTH_TURN_LEFT1, //# Turn left, should loop + BOTH_TURN_RIGHT1, //# Turn right, should loop + BOTH_TURNSTAND1, //# Turn from STAND1 position + BOTH_TURNSTAND2, //# Turn from STAND2 position + BOTH_TURNSTAND3, //# Turn from STAND3 position + BOTH_TURNSTAND4, //# Turn from STAND4 position + BOTH_TURNSTAND5, //# Turn from STAND5 position + BOTH_TURNCROUCH1, //# Turn from CROUCH1 position + BOTH_RUNAWAY1, //# Running scared + BOTH_SWIM1, //# Swimming + + BOTH_WALKBACK1, //# Walk1 backwards + BOTH_WALKBACK2, //# Walk2 backwards + BOTH_RUNBACK1, //# Run1 backwards + BOTH_RUNBACK2, //# Run1 backwards + + //# #sep BOTH_ JUMPING + BOTH_JUMP1, //# Jump - wind-up and leave ground + BOTH_INAIR1, //# In air loop (from jump) + BOTH_LAND1, //# Landing (from in air loop) + BOTH_LAND2, //# Landing Hard (from a great height) + + BOTH_JUMPBACK1, //# Jump backwards - wind-up and leave ground + BOTH_INAIRBACK1, //# In air loop (from jump back) + BOTH_LANDBACK1, //# Landing backwards(from in air loop) + + BOTH_JUMPLEFT1, //# Jump left - wind-up and leave ground + BOTH_INAIRLEFT1, //# In air loop (from jump left) + BOTH_LANDLEFT1, //# Landing left(from in air loop) + + BOTH_JUMPRIGHT1, //# Jump right - wind-up and leave ground + BOTH_INAIRRIGHT1, //# In air loop (from jump right) + BOTH_LANDRIGHT1, //# Landing right(from in air loop) + + BOTH_FORCEJUMP1, //# Jump - wind-up and leave ground + BOTH_FORCEINAIR1, //# In air loop (from jump) + BOTH_FORCELAND1, //# Landing (from in air loop) + + BOTH_FORCEJUMPBACK1, //# Jump backwards - wind-up and leave ground + BOTH_FORCEINAIRBACK1, //# In air loop (from jump back) + BOTH_FORCELANDBACK1, //# Landing backwards(from in air loop) + + BOTH_FORCEJUMPLEFT1, //# Jump left - wind-up and leave ground + BOTH_FORCEINAIRLEFT1, //# In air loop (from jump left) + BOTH_FORCELANDLEFT1, //# Landing left(from in air loop) + + BOTH_FORCEJUMPRIGHT1, //# Jump right - wind-up and leave ground + BOTH_FORCEINAIRRIGHT1, //# In air loop (from jump right) + BOTH_FORCELANDRIGHT1, //# Landing right(from in air loop) + //# #sep BOTH_ ACROBATICS + BOTH_FLIP_F, //# Flip forward + BOTH_FLIP_B, //# Flip backwards + BOTH_FLIP_L, //# Flip left + BOTH_FLIP_R, //# Flip right + + BOTH_ROLL_F, //# Roll forward + BOTH_ROLL_B, //# Roll backward + BOTH_ROLL_L, //# Roll left + BOTH_ROLL_R, //# Roll right + BOTH_ROLL_FR, //# Roll forward right + BOTH_ROLL_FL, //# Roll forward left + BOTH_ROLL_BR, //# Roll back right + BOTH_ROLL_BL, //# Roll back left + + BOTH_HOP_F, //# quickstep forward + BOTH_HOP_B, //# quickstep backwards + BOTH_HOP_L, //# quickstep left + BOTH_HOP_R, //# quickstep right + + BOTH_DODGE_FL, //# lean-dodge forward left + BOTH_DODGE_FR, //# lean-dodge forward right + BOTH_DODGE_BL, //# lean-dodge backwards left + BOTH_DODGE_BR, //# lean-dodge backwards right + BOTH_DODGE_L, //# lean-dodge left + BOTH_DODGE_R, //# lean-dodge right + + BOTH_DIVE1, //# Dive! + + BOTH_ENGAGETAUNT, + BOTH_ARIAL_LEFT, //# + BOTH_ARIAL_RIGHT, //# + BOTH_CARTWHEEL_LEFT, //# + BOTH_CARTWHEEL_RIGHT, //# + BOTH_FLIP_LEFT, //# + BOTH_FLIP_BACK1, //# + BOTH_FLIP_BACK2, //# + BOTH_FLIP_BACK3, //# + BOTH_BUTTERFLY_LEFT, //# + BOTH_BUTTERFLY_RIGHT, //# + BOTH_WALL_RUN_RIGHT, //# + BOTH_WALL_RUN_RIGHT_FLIP,//# + BOTH_WALL_RUN_RIGHT_STOP,//# + BOTH_WALL_RUN_LEFT, //# + BOTH_WALL_RUN_LEFT_FLIP,//# + BOTH_WALL_RUN_LEFT_STOP,//# + BOTH_WALL_FLIP_RIGHT, //# + BOTH_WALL_FLIP_LEFT, //# + BOTH_WALL_FLIP_FWD, //# + BOTH_KNOCKDOWN1, //# knocked backwards + BOTH_KNOCKDOWN2, //# knocked backwards hard + BOTH_KNOCKDOWN3, //# knocked forwards + BOTH_KNOCKDOWN4, //# knocked backwards from crouch + BOTH_KNOCKDOWN5, //# dupe of 3 - will be removed + BOTH_GETUP1, //# + BOTH_GETUP2, //# + BOTH_GETUP3, //# + BOTH_GETUP4, //# + BOTH_GETUP5, //# + BOTH_GETUP_CROUCH_F1, //# + BOTH_GETUP_CROUCH_B1, //# + BOTH_FORCE_GETUP_F1, //# + BOTH_FORCE_GETUP_F2, //# + BOTH_FORCE_GETUP_B1, //# + BOTH_FORCE_GETUP_B2, //# + BOTH_FORCE_GETUP_B3, //# + BOTH_FORCE_GETUP_B4, //# + BOTH_FORCE_GETUP_B5, //# + BOTH_FORCE_GETUP_B6, //# + BOTH_WALL_FLIP_BACK1, //# + BOTH_WALL_FLIP_BACK2, //# + BOTH_SPIN1, //# + BOTH_CEILING_CLING, //# clinging to ceiling + BOTH_CEILING_DROP, //# dropping from ceiling cling + + //TESTING + BOTH_FJSS_TR_BL, //# jump spin slash tr to bl + BOTH_FJSS_TL_BR, //# jump spin slash bl to tr + BOTH_DEATHFROMBACKSLASH,//# + BOTH_RIGHTHANDCHOPPEDOFF,//# + BOTH_DEFLECTSLASH__R__L_FIN,//# + BOTH_BASHED1,//# + BOTH_ARIAL_F1,//# + BOTH_BUTTERFLY_FR1,//# + BOTH_BUTTERFLY_FL1,//# + + //# #sep BOTH_ MISC MOVEMENT + BOTH_HIT1, //# Kyle hit by crate in cin #9 + BOTH_LADDER_UP1, //# Climbing up a ladder with rungs at 16 unit intervals + BOTH_LADDER_DWN1, //# Climbing down a ladder with rungs at 16 unit intervals + BOTH_LADDER_IDLE, //# Just sitting on the ladder + BOTH_ONLADDER_BOT1, //# Getting on the ladder at the bottom + BOTH_OFFLADDER_BOT1, //# Getting off the ladder at the bottom + BOTH_ONLADDER_TOP1, //# Getting on the ladder at the top + BOTH_OFFLADDER_TOP1, //# Getting off the ladder at the top + BOTH_LIFT1, //# Lifting someone/thing over their shoulder + BOTH_STEP1, //# telsia checking out lake cinematic9.2 + BOTH_HITWALL1, //# cin.18, Kenn hit by borg into wall 56 units away + BOTH_AMBUSHLAND1, //# landing from fall on victim + BOTH_BIRTH1, //# birth from jumping through walls + + //# #sep BOTH_ FLYING IDLE + BOTH_FLY_IDLE1, //# Flying Idle 1 + BOTH_FLY_IDLE2, //# Flying Idle 2 + BOTH_FLY_SHIELDED, //# For sentry droid, shields in + + + //# #sep BOTH_ FLYING MOVING + BOTH_FLY_START1, //# Start flying + BOTH_FLY_STOP1, //# Stop flying + BOTH_FLY_LOOP1, //# Normal flying, should loop + BOTH_FLOAT1, //# Crew floating through space 1 + BOTH_FLOAT2, //# Crew floating through space 2 + BOTH_FLOATCONSOLE1, //# Crew floating and working on console + + //# #sep BOTH_ SWIMMING + BOTH_SWIM_IDLE1, //# Swimming Idle 1 + BOTH_SWIMFORWARD, //# Swim forward loop + + //# #sep BOTH_ LYING + BOTH_LIE_DOWN1, //# From a stand position, get down on ground, face down + BOTH_LIE_DOWN2, //# From a stand position, get down on ground, face up + BOTH_LIE_DOWN3, //# reaction to local disnode being destroyed + BOTH_PAIN2WRITHE1, //# Transition from upright position to writhing on ground anim + BOTH_PRONE2RLEG, //# Lying on ground reach to grab right leg + BOTH_PRONE2LLEG, //# Lying on ground reach to grab left leg + BOTH_WRITHING1, //# Lying on ground on back writhing in pain + BOTH_WRITHING1RLEG, //# Lying on ground writhing in pain, holding right leg + BOTH_WRITHING1LLEG, //# Lying on ground writhing in pain, holding left leg + BOTH_WRITHING2, //# Lying on ground on front writhing in pain + BOTH_INJURED1, //# Lying down, against wall - can also be sleeping against wall + BOTH_INJURED2, //# Injured pose 2 + BOTH_INJURED3, //# Injured pose 3 + BOTH_INJURED6, //# Injured pose 6 + BOTH_INJURED6ATTACKSTART, //# Start attack while in injured 6 pose + BOTH_INJURED6ATTACKSTOP, //# End attack while in injured 6 pose + BOTH_INJURED6COMBADGE, //# Hit combadge while in injured 6 pose + BOTH_INJURED6POINT, //# Chang points to door while in injured state + BOTH_INJUREDTOSTAND1, //# Runinjured to stand1 + + BOTH_PROPUP1, //# Kyle getting up from having been knocked down (cin #9 end) + BOTH_CRAWLBACK1, //# Lying on back, crawling backwards with elbows + BOTH_SITWALL1, //# Sitting against a wall + BOTH_SLEEP1, //# laying on back-rknee up-rhand on torso + BOTH_SLEEP2, //# on floor-back against wall-arms crossed + BOTH_SLEEP3, //# Sleeping in a chair + BOTH_SLEEP4, //# Sleeping slumped over table + BOTH_SLEEP5, //# Laying on side sleeping on flat sufrace + BOTH_SLEEP6START, //# Kyle leaning back to sleep (cin 20) + BOTH_SLEEP6STOP, //# Kyle waking up and shaking his head (cin 21) + BOTH_SLEEP1GETUP, //# alarmed and getting up out of sleep1 pose to stand + BOTH_SLEEP1GETUP2, //# + BOTH_SLEEP2GETUP, //# alarmed and getting up out of sleep2 pose to stand + BOTH_SLEEP3GETUP, //# alarmed and getting up out of sleep3 pose to stand + BOTH_SLEEP3DEATH, //# death in chair, from sleep3 idle + BOTH_SLEEP3DEAD, //# death in chair, from sleep3 idle + + BOTH_SLEEP_IDLE1, //# rub face and nose while asleep from sleep pose 1 + BOTH_SLEEP_IDLE2, //# shift position while asleep - stays in sleep2 + BOTH_SLEEP_IDLE3, //# Idle anim from sleep pose 3 + BOTH_SLEEP_IDLE4, //# Idle anim from sleep pose 4 + BOTH_SLEEP1_NOSE, //# Scratch nose from SLEEP1 pose + BOTH_SLEEP2_SHIFT, //# Shift in sleep from SLEEP2 pose + BOTH_RESTRAINED1, //# Telsia tied to medical table + BOTH_RESTRAINED1POINT, //# Telsia tied to medical table pointing at Munro + BOTH_LIFTED1, //# Fits with BOTH_LIFT1, lifted on shoulder + BOTH_CARRIED1, //# Fits with TORSO_CARRY1, carried over shoulder + BOTH_CARRIED2, //# Laying over object + + BOTH_CHOKE1START, //# tavion in force grip choke + BOTH_CHOKE1STARTHOLD, //# loop of tavion in force grip choke + BOTH_CHOKE1, //# tavion in force grip choke + + BOTH_CHOKE2, //# tavion recovering from force grip choke + BOTH_CHOKE3, //# left-handed choke (for people still holding a weapon) + + //# #sep BOTH_ HUNTER-SEEKER BOT-SPECIFIC + BOTH_POWERUP1, //# Wakes up + + BOTH_TURNON, //# Protocol Droid wakes up + BOTH_TURNOFF, //# Protocol Droid shuts off + + BOTH_BUTTON1, //# Single button push with right hand + BOTH_BUTTON2, //# Single button push with left finger + BOTH_BUTTON_HOLD, //# Single button hold with left hand + BOTH_BUTTON_RELEASE, //# Single button release with left hand + + //# JEDI-SPECIFIC + BOTH_RESISTPUSH, //# plant yourself to resist force push/pulls. + BOTH_FORCEPUSH, //# Use off-hand to do force power. + BOTH_FORCEPULL, //# Use off-hand to do force power. + BOTH_MINDTRICK1, //# Use off-hand to do mind trick + BOTH_MINDTRICK2, //# Use off-hand to do distraction + BOTH_FORCELIGHTNING, //# Use off-hand to do lightning + BOTH_FORCELIGHTNING_START, //# Use off-hand to do lightning - start + BOTH_FORCELIGHTNING_HOLD, //# Use off-hand to do lightning - hold + BOTH_FORCELIGHTNING_RELEASE,//# Use off-hand to do lightning - release + BOTH_FORCEHEAL_START, //# Healing meditation pose start + BOTH_FORCEHEAL_STOP, //# Healing meditation pose end + BOTH_FORCEHEAL_QUICK, //# Healing meditation gesture + BOTH_SABERPULL, //# Use off-hand to do force power. + BOTH_FORCEGRIP1, //# force-gripping (no anim?) + BOTH_FORCEGRIP3, //# force-gripping (right hand) + BOTH_FORCEGRIP3THROW, //# throwing while force-gripping (right hand) + BOTH_FORCEGRIP_HOLD, //# Use off-hand to do grip - hold + BOTH_FORCEGRIP_RELEASE,//# Use off-hand to do grip - release + BOTH_TOSS1, //# throwing to left after force gripping + BOTH_TOSS2, //# throwing to right after force gripping + + BOTH_COCKPIT_TALKR1START, //# turn head from straight forward to looking full right + BOTH_COCKPIT_TALKR1STARTTOMID, //# from TALKR1START to looking at hologram (cin #1) + BOTH_COCKPIT_TALKR1MIDTOSTART, //# from looking at hologram to TALKR1START (cin #1) + BOTH_COCKPIT_TALKR1STOP, //# return head to straight forward from BOTH_COCKPIT_TALKR1 + BOTH_COCKPIT_TALKR1STOPTOMID, //# from TALKR1STOP to TALKR1MID + BOTH_COCKPIT_TALKR1MIDTOSTOP, //# from looking at hologram to TALKR1STOP (cin #1) + BOTH_COCKPIT_TALKR1, //# talk to right side + + BOTH_COCKPIT_TALKL1START, //# turn head from straight forward to looking full left + BOTH_COCKPIT_TALKL1STARTTOMID, //# from TALKL1START to looking at hologram (cin #1) + BOTH_COCKPIT_TALKL1MIDTOSTART, //# from looking at hologram to TALKL1START (cin #1) + BOTH_COCKPIT_TALKL1STOP, //# return head to straight forward from BOTH_COCKPIT_TALKL1 + BOTH_COCKPIT_TALKL1STOPTOMID, //# from TALKL1STOP to TALKL1MID + BOTH_COCKPIT_TALKL1MIDTOSTOP, //# from looking at hologram to TALKL1STOP (cin #1) + BOTH_COCKPIT_TALKL1, //# talk to left side + + BOTH_COCKPIT_CONSOLE1, //# type at controls + BOTH_COCKPIT_CONSOLE2, //# type at controls + BOTH_COCKPIT_CONSOLE2_PARTIAL, //# last part of console2 anim (cin #1) used by Jan + + BOTH_COCKPIT_HEADNOD, //# nod head yes while sitting + BOTH_COCKPIT_HEADSHAKE, //# shake head no while sitting + + BOTH_COCKPIT_HEADTILTLSTART, //# start tilt head left while sitting + BOTH_COCKPIT_HEADTILTLSTOP, //# stop tilt head left while sitting + BOTH_COCKPIT_HEADTILTRSTART, //# start tilt head right while sitting + BOTH_COCKPIT_HEADTILTRSTOP, //# stop tilt head right while sitting + + BOTH_COCKPIT_TALKGESTURE7START, //# Lando's supporting hand to Kyle (cin #21) + BOTH_COCKPIT_TALKGESTURE7STOP, //# Lando's supporting hand away from Kyle (cin #21) + BOTH_COCKPIT_TALKGESTURE8START, //# Hand to Lando's chin (cin #21) + BOTH_COCKPIT_TALKGESTURE8STOP, //# hand away from Lando's chin *cin #21) + BOTH_COCKPIT_TALKGESTURE11START, //# + BOTH_COCKPIT_TALKGESTURE11STOP, //# + + BOTH_COCKPIT_SLEEP6START, //# + BOTH_COCKPIT_SLEEP6STOP, //# + + //================================================= + //ANIMS IN WHICH ONLY THE UPPER OBJECTS ARE IN MD3 + //================================================= + //# #sep TORSO_ WEAPON-RELATED + TORSO_DROPWEAP1, //# Put weapon away + TORSO_DROPWEAP2, //# Put weapon away + TORSO_DROPWEAP3, //# Put weapon away + TORSO_DROPWEAP4, //# Put weapon away + TORSO_RAISEWEAP1, //# Draw Weapon + TORSO_RAISEWEAP2, //# Draw Weapon + TORSO_RAISEWEAP3, //# Draw Weapon + TORSO_RAISEWEAP4, //# Draw Weapon + TORSO_WEAPONREADY1, //# Ready to fire stun baton + TORSO_WEAPONREADY2, //# Ready to fire one-handed blaster pistol + TORSO_WEAPONREADY3, //# Ready to fire blaster rifle + TORSO_WEAPONREADY4, //# Ready to fire sniper rifle + TORSO_WEAPONREADY5, //# Ready to fire bowcaster + TORSO_WEAPONREADY6, //# Ready to fire ??? + TORSO_WEAPONREADY7, //# Ready to fire ??? + TORSO_WEAPONREADY8, //# Ready to fire ??? + TORSO_WEAPONREADY9, //# Ready to fire rocket launcher + TORSO_WEAPONREADY10, //# Ready to fire thermal det + TORSO_WEAPONREADY11, //# Ready to fire laser trap + TORSO_WEAPONREADY12, //# Ready to fire detpack + TORSO_WEAPONIDLE1, //# Holding stun baton + TORSO_WEAPONIDLE2, //# Holding one-handed blaster + TORSO_WEAPONIDLE3, //# Holding blaster rifle + TORSO_WEAPONIDLE4, //# Holding sniper rifle + TORSO_WEAPONIDLE5, //# Holding bowcaster + TORSO_WEAPONIDLE6, //# Holding ??? + TORSO_WEAPONIDLE7, //# Holding ??? + TORSO_WEAPONIDLE8, //# Holding ??? + TORSO_WEAPONIDLE9, //# Holding rocket launcher + TORSO_WEAPONIDLE10, //# Holding thermal det + TORSO_WEAPONIDLE11, //# Holding laser trap + TORSO_WEAPONIDLE12, //# Holding detpack + + //# #sep TORSO_ MISC + TORSO_HANDGESTURE1, //# gestures to left one hand + TORSO_HANDGESTURE2, //# gestures to right one hand + TORSO_HANDGESTURE3, //# gestures to the left both hands + TORSO_HANDGESTURE4, //# gestures to the right both hands + + TORSO_HANDEXTEND1, //# doctor reaching for hypospray in scav5 + TORSO_HANDRETRACT1, //# doctor taking hypospray from player in scav5 + + TORSO_DROPHELMET1, //# Drop the helmet to the waist + TORSO_RAISEHELMET1, //# Bring the helmet to the head + TORSO_REACHHELMET1, //# reaching for helmet off of 60 tall cabinet + TORSO_GRABLBACKL, //# reach to lower back with left hand + TORSO_GRABUBACKL, //# reach to upper back with left hand + TORSO_GRABLBACKR, //# reach to lower back with right hand + TORSO_GRABUBACKR, //# reach to upper back with right hand + + TORSO_SURRENDER_START, //# arms up + TORSO_SURRENDER_STOP, //# arms back down + + TORSO_CHOKING1, //# TEMP + + + //================================================= + //ANIMS IN WHICH ONLY THE LOWER OBJECTS ARE IN MD3 + //================================================= + //# #sep Legs-only anims + LEGS_WALKBACK1, //# Walk1 backwards + LEGS_WALKBACK2, //# Walk2 backwards + LEGS_RUNBACK1, //# Run1 backwards + LEGS_RUNBACK2, //# Run2 backwards + LEGS_TURN1, //# What legs do when you turn your lower body to match your upper body facing + LEGS_TURN2, //# Leg turning from stand2 + LEGS_LEAN_LEFT1, //# Lean left + LEGS_LEAN_RIGHT1, //# Lean Right + LEGS_KNEELDOWN1, //# Get down on one knee? + LEGS_KNEELUP1, //# Get up from one knee? + LEGS_CRLEAN_LEFT1, //# Crouch Lean left + LEGS_CRLEAN_RIGHT1, //# Crouch Lean Right + LEGS_CHOKING1, //# TEMP + LEGS_LEFTUP1, //# On a slope with left foot 4 higher than right + LEGS_LEFTUP2, //# On a slope with left foot 8 higher than right + LEGS_LEFTUP3, //# On a slope with left foot 12 higher than right + LEGS_LEFTUP4, //# On a slope with left foot 16 higher than right + LEGS_LEFTUP5, //# On a slope with left foot 20 higher than right + LEGS_RIGHTUP1, //# On a slope with RIGHT foot 4 higher than left + LEGS_RIGHTUP2, //# On a slope with RIGHT foot 8 higher than left + LEGS_RIGHTUP3, //# On a slope with RIGHT foot 12 higher than left + LEGS_RIGHTUP4, //# On a slope with RIGHT foot 16 higher than left + LEGS_RIGHTUP5, //# On a slope with RIGHT foot 20 higher than left + LEGS_S1_LUP1, + LEGS_S1_LUP2, + LEGS_S1_LUP3, + LEGS_S1_LUP4, + LEGS_S1_LUP5, + LEGS_S1_RUP1, + LEGS_S1_RUP2, + LEGS_S1_RUP3, + LEGS_S1_RUP4, + LEGS_S1_RUP5, + LEGS_S3_LUP1, + LEGS_S3_LUP2, + LEGS_S3_LUP3, + LEGS_S3_LUP4, + LEGS_S3_LUP5, + LEGS_S3_RUP1, + LEGS_S3_RUP2, + LEGS_S3_RUP3, + LEGS_S3_RUP4, + LEGS_S3_RUP5, + LEGS_S4_LUP1, + LEGS_S4_LUP2, + LEGS_S4_LUP3, + LEGS_S4_LUP4, + LEGS_S4_LUP5, + LEGS_S4_RUP1, + LEGS_S4_RUP2, + LEGS_S4_RUP3, + LEGS_S4_RUP4, + LEGS_S4_RUP5, + LEGS_S5_LUP1, + LEGS_S5_LUP2, + LEGS_S5_LUP3, + LEGS_S5_LUP4, + LEGS_S5_LUP5, + LEGS_S5_RUP1, + LEGS_S5_RUP2, + LEGS_S5_RUP3, + LEGS_S5_RUP4, + LEGS_S5_RUP5, + //================================================= + //HEAD ANIMS + //================================================= + //# #sep Head-only anims + FACE_TALK1, //# quiet + FACE_TALK2, //# semi-quiet + FACE_TALK3, //# semi-loud + FACE_TALK4, //# loud + FACE_ALERT, //# + FACE_SMILE, //# + FACE_FROWN, //# + FACE_DEAD, //# + + //# #eol + MAX_ANIMATIONS, + MAX_TOTALANIMATIONS +} animNumber_t; + +#define SABER_ANIM_GROUP_SIZE (BOTH_A2_T__B_ - BOTH_A1_T__B_) + +#endif// #ifndef __ANIMS_H__ + diff --git a/code/game/be_aas.h b/code/game/be_aas.h new file mode 100644 index 0000000..9a22ca6 --- /dev/null +++ b/code/game/be_aas.h @@ -0,0 +1,205 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + +/***************************************************************************** + * name: be_aas.h + * + * desc: Area Awareness System, stuff exported to the AI + * + * $Archive: /source/code/botlib/be_aas.h $ + * $Author: Mrelusive $ + * $Revision: 2 $ + * $Modtime: 10/05/99 3:32p $ + * $Date: 10/05/99 3:42p $ + * + *****************************************************************************/ + +#ifndef MAX_STRINGFIELD +#define MAX_STRINGFIELD 80 +#endif + +//travel flags +#define TFL_INVALID 0x00000001 //traveling temporary not possible +#define TFL_WALK 0x00000002 //walking +#define TFL_CROUCH 0x00000004 //crouching +#define TFL_BARRIERJUMP 0x00000008 //jumping onto a barrier +#define TFL_JUMP 0x00000010 //jumping +#define TFL_LADDER 0x00000020 //climbing a ladder +#define TFL_WALKOFFLEDGE 0x00000080 //walking of a ledge +#define TFL_SWIM 0x00000100 //swimming +#define TFL_WATERJUMP 0x00000200 //jumping out of the water +#define TFL_TELEPORT 0x00000400 //teleporting +#define TFL_ELEVATOR 0x00000800 //elevator +#define TFL_ROCKETJUMP 0x00001000 //rocket jumping +#define TFL_BFGJUMP 0x00002000 //bfg jumping +#define TFL_GRAPPLEHOOK 0x00004000 //grappling hook +#define TFL_DOUBLEJUMP 0x00008000 //double jump +#define TFL_RAMPJUMP 0x00010000 //ramp jump +#define TFL_STRAFEJUMP 0x00020000 //strafe jump +#define TFL_JUMPPAD 0x00040000 //jump pad +#define TFL_AIR 0x00080000 //travel through air +#define TFL_WATER 0x00100000 //travel through water +#define TFL_SLIME 0x00200000 //travel through slime +#define TFL_LAVA 0x00400000 //travel through lava +#define TFL_DONOTENTER 0x00800000 //travel through donotenter area +#define TFL_FUNCBOB 0x01000000 //func bobbing +#define TFL_FLIGHT 0x02000000 //flight +#define TFL_BRIDGE 0x04000000 //move over a bridge +// +#define TFL_NOTTEAM1 0x08000000 //not team 1 +#define TFL_NOTTEAM2 0x10000000 //not team 2 + +//default travel flags +#define TFL_DEFAULT TFL_WALK|TFL_CROUCH|TFL_BARRIERJUMP|\ + TFL_JUMP|TFL_LADDER|\ + TFL_WALKOFFLEDGE|TFL_SWIM|TFL_WATERJUMP|\ + TFL_TELEPORT|TFL_ELEVATOR|\ + TFL_AIR|TFL_WATER|TFL_JUMPPAD|TFL_FUNCBOB + +typedef enum +{ + SOLID_NOT, // no interaction with other objects + SOLID_TRIGGER, // only touch when inside, after moving + SOLID_BBOX, // touch on edge + SOLID_BSP // bsp clip, touch on edge +} solid_t; + +//a trace is returned when a box is swept through the AAS world +typedef struct aas_trace_s +{ + qboolean startsolid; // if true, the initial point was in a solid area + float fraction; // time completed, 1.0 = didn't hit anything + vec3_t endpos; // final position + int ent; // entity blocking the trace + int lastarea; // last area the trace was in (zero if none) + int area; // area blocking the trace (zero if none) + int planenum; // number of the plane that was hit +} aas_trace_t; + +/* Defined in botlib.h + +//bsp_trace_t hit surface +typedef struct bsp_surface_s +{ + char name[16]; + int flags; + int value; +} bsp_surface_t; + +//a trace is returned when a box is swept through the BSP world +typedef struct bsp_trace_s +{ + qboolean allsolid; // if true, plane is not valid + qboolean startsolid; // if true, the initial point was in a solid area + float fraction; // time completed, 1.0 = didn't hit anything + vec3_t endpos; // final position + cplane_t plane; // surface normal at impact + float exp_dist; // expanded plane distance + int sidenum; // number of the brush side hit + bsp_surface_t surface; // hit surface + int contents; // contents on other side of surface hit + int ent; // number of entity hit +} bsp_trace_t; +// +*/ + +//entity info +typedef struct aas_entityinfo_s +{ + int valid; // true if updated this frame + int type; // entity type + int flags; // entity flags + float ltime; // local time + float update_time; // time between last and current update + int number; // number of the entity + vec3_t origin; // origin of the entity + vec3_t angles; // angles of the model + vec3_t old_origin; // for lerping + vec3_t lastvisorigin; // last visible origin + vec3_t mins; // bounding box minimums + vec3_t maxs; // bounding box maximums + int groundent; // ground entity + int solid; // solid type + int modelindex; // model used + int modelindex2; // weapons, CTF flags, etc + int frame; // model frame number + int event; // impulse events -- muzzle flashes, footsteps, etc + int eventParm; // even parameter + int powerups; // bit flags + int weapon; // determines weapon and flash model, etc + int legsAnim; // mask off ANIM_TOGGLEBIT + int torsoAnim; // mask off ANIM_TOGGLEBIT +} aas_entityinfo_t; + +// area info +typedef struct aas_areainfo_s +{ + int contents; + int flags; + int presencetype; + int cluster; + vec3_t mins; + vec3_t maxs; + vec3_t center; +} aas_areainfo_t; + +// client movement prediction stop events, stop as soon as: +#define SE_NONE 0 +#define SE_HITGROUND 1 // the ground is hit +#define SE_LEAVEGROUND 2 // there's no ground +#define SE_ENTERWATER 4 // water is entered +#define SE_ENTERSLIME 8 // slime is entered +#define SE_ENTERLAVA 16 // lava is entered +#define SE_HITGROUNDDAMAGE 32 // the ground is hit with damage +#define SE_GAP 64 // there's a gap +#define SE_TOUCHJUMPPAD 128 // touching a jump pad area +#define SE_TOUCHTELEPORTER 256 // touching teleporter +#define SE_ENTERAREA 512 // the given stoparea is entered +#define SE_HITGROUNDAREA 1024 // a ground face in the area is hit +#define SE_HITBOUNDINGBOX 2048 // hit the specified bounding box +#define SE_TOUCHCLUSTERPORTAL 4096 // touching a cluster portal + +typedef struct aas_clientmove_s +{ + vec3_t endpos; //position at the end of movement prediction + int endarea; //area at end of movement prediction + vec3_t velocity; //velocity at the end of movement prediction + aas_trace_t trace; //last trace + int presencetype; //presence type at end of movement prediction + int stopevent; //event that made the prediction stop + int endcontents; //contents at the end of movement prediction + float time; //time predicted ahead + int frames; //number of frames predicted ahead +} aas_clientmove_t; + +// alternate route goals +#define ALTROUTEGOAL_ALL 1 +#define ALTROUTEGOAL_CLUSTERPORTALS 2 +#define ALTROUTEGOAL_VIEWPORTALS 4 + +typedef struct aas_altroutegoal_s +{ + vec3_t origin; + int areanum; + unsigned short starttraveltime; + unsigned short goaltraveltime; + unsigned short extratraveltime; +} aas_altroutegoal_t; + +// route prediction stop events +#define RSE_NONE 0 +#define RSE_NOROUTE 1 //no route to goal +#define RSE_USETRAVELTYPE 2 //stop as soon as on of the given travel types is used +#define RSE_ENTERCONTENTS 4 //stop when entering the given contents +#define RSE_ENTERAREA 8 //stop when entering the given area + +typedef struct aas_predictroute_s +{ + vec3_t endpos; //position at the end of movement prediction + int endarea; //area at end of movement prediction + int stopevent; //event that made the prediction stop + int endcontents; //contents at the end of movement prediction + int endtravelflags; //end travel flags + int numareas; //number of areas predicted ahead + int time; //time predicted ahead (in hundreth of a sec) +} aas_predictroute_t; diff --git a/code/game/be_ai_char.h b/code/game/be_ai_char.h new file mode 100644 index 0000000..04b209d --- /dev/null +++ b/code/game/be_ai_char.h @@ -0,0 +1,32 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + +/***************************************************************************** + * name: be_ai_char.h + * + * desc: bot characters + * + * $Archive: /source/code/botlib/be_ai_char.h $ + * $Author: Mrelusive $ + * $Revision: 2 $ + * $Modtime: 10/05/99 3:32p $ + * $Date: 10/05/99 3:42p $ + * + *****************************************************************************/ + +//loads a bot character from a file +int BotLoadCharacter(char *charfile, float skill); +//frees a bot character +void BotFreeCharacter(int character); +//returns a float characteristic +float Characteristic_Float(int character, int index); +//returns a bounded float characteristic +float Characteristic_BFloat(int character, int index, float min, float max); +//returns an integer characteristic +int Characteristic_Integer(int character, int index); +//returns a bounded integer characteristic +int Characteristic_BInteger(int character, int index, int min, int max); +//returns a string characteristic +void Characteristic_String(int character, int index, char *buf, int size); +//free cached bot characters +void BotShutdownCharacters(void); diff --git a/code/game/be_ai_chat.h b/code/game/be_ai_chat.h new file mode 100644 index 0000000..cb4ee0a --- /dev/null +++ b/code/game/be_ai_chat.h @@ -0,0 +1,97 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +/***************************************************************************** + * name: be_ai_chat.h + * + * desc: char AI + * + * $Archive: /source/code/botlib/be_ai_chat.h $ + * $Author: Mrelusive $ + * $Revision: 2 $ + * $Modtime: 10/05/99 3:32p $ + * $Date: 10/05/99 3:42p $ + * + *****************************************************************************/ + +#define MAX_MESSAGE_SIZE 256 +#define MAX_CHATTYPE_NAME 32 +#define MAX_MATCHVARIABLES 8 + +#define CHAT_GENDERLESS 0 +#define CHAT_GENDERFEMALE 1 +#define CHAT_GENDERMALE 2 + +#define CHAT_ALL 0 +#define CHAT_TEAM 1 +#define CHAT_TELL 2 + +//a console message +typedef struct bot_consolemessage_s +{ + int handle; + float time; //message time + int type; //message type + char message[MAX_MESSAGE_SIZE]; //message + struct bot_consolemessage_s *prev, *next; //prev and next in list +} bot_consolemessage_t; + +//match variable +typedef struct bot_matchvariable_s +{ + char offset; + int length; +} bot_matchvariable_t; +//returned to AI when a match is found +typedef struct bot_match_s +{ + char string[MAX_MESSAGE_SIZE]; + int type; + int subtype; + bot_matchvariable_t variables[MAX_MATCHVARIABLES]; +} bot_match_t; + +//setup the chat AI +int BotSetupChatAI(void); +//shutdown the chat AI +void BotShutdownChatAI(void); +//returns the handle to a newly allocated chat state +int BotAllocChatState(void); +//frees the chatstate +void BotFreeChatState(int handle); +//adds a console message to the chat state +void BotQueueConsoleMessage(int chatstate, int type, char *message); +//removes the console message from the chat state +void BotRemoveConsoleMessage(int chatstate, int handle); +//returns the next console message from the state +int BotNextConsoleMessage(int chatstate, bot_consolemessage_t *cm); +//returns the number of console messages currently stored in the state +int BotNumConsoleMessages(int chatstate); +//selects a chat message of the given type +void BotInitialChat(int chatstate, char *type, int mcontext, char *var0, char *var1, char *var2, char *var3, char *var4, char *var5, char *var6, char *var7); +//returns the number of initial chat messages of the given type +int BotNumInitialChats(int chatstate, char *type); +//find and select a reply for the given message +int BotReplyChat(int chatstate, char *message, int mcontext, int vcontext, char *var0, char *var1, char *var2, char *var3, char *var4, char *var5, char *var6, char *var7); +//returns the length of the currently selected chat message +int BotChatLength(int chatstate); +//enters the selected chat message +void BotEnterChat(int chatstate, int clientto, int sendto); +//get the chat message ready to be output +void BotGetChatMessage(int chatstate, char *buf, int size); +//checks if the first string contains the second one, returns index into first string or -1 if not found +int StringContains(char *str1, char *str2, int casesensitive); +//finds a match for the given string using the match templates +int BotFindMatch(char *str, bot_match_t *match, unsigned long int context); +//returns a variable from a match +void BotMatchVariable(bot_match_t *match, int variable, char *buf, int size); +//unify all the white spaces in the string +void UnifyWhiteSpaces(char *string); +//replace all the context related synonyms in the string +void BotReplaceSynonyms(char *string, unsigned long int context); +//loads a chat file for the chat state +int BotLoadChatFile(int chatstate, char *chatfile, char *chatname); +//store the gender of the bot in the chat state +void BotSetChatGender(int chatstate, int gender); +//store the bot name in the chat state +void BotSetChatName(int chatstate, char *name, int client); + diff --git a/code/game/be_ai_gen.h b/code/game/be_ai_gen.h new file mode 100644 index 0000000..2a9047d --- /dev/null +++ b/code/game/be_ai_gen.h @@ -0,0 +1,17 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + +/***************************************************************************** + * name: be_ai_gen.h + * + * desc: genetic selection + * + * $Archive: /source/code/botlib/be_ai_gen.h $ + * $Author: Mrelusive $ + * $Revision: 2 $ + * $Modtime: 10/05/99 3:32p $ + * $Date: 10/05/99 3:42p $ + * + *****************************************************************************/ + +int GeneticParentsAndChildSelection(int numranks, float *ranks, int *parent1, int *parent2, int *child); diff --git a/code/game/be_ai_goal.h b/code/game/be_ai_goal.h new file mode 100644 index 0000000..990c61e --- /dev/null +++ b/code/game/be_ai_goal.h @@ -0,0 +1,102 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +/***************************************************************************** + * name: be_ai_goal.h + * + * desc: goal AI + * + * $Archive: /source/code/botlib/be_ai_goal.h $ + * $Author: Mrelusive $ + * $Revision: 2 $ + * $Modtime: 10/05/99 3:32p $ + * $Date: 10/05/99 3:42p $ + * + *****************************************************************************/ + +#define MAX_AVOIDGOALS 256 +#define MAX_GOALSTACK 8 + +#define GFL_NONE 0 +#define GFL_ITEM 1 +#define GFL_ROAM 2 +#define GFL_DROPPED 4 + +//a bot goal +typedef struct bot_goal_s +{ + vec3_t origin; //origin of the goal + int areanum; //area number of the goal + vec3_t mins, maxs; //mins and maxs of the goal + int entitynum; //number of the goal entity + int number; //goal number + int flags; //goal flags + int iteminfo; //item information +} bot_goal_t; + +//reset the whole goal state, but keep the item weights +void BotResetGoalState(int goalstate); +//reset avoid goals +void BotResetAvoidGoals(int goalstate); +//remove the goal with the given number from the avoid goals +void BotRemoveFromAvoidGoals(int goalstate, int number); +//push a goal onto the goal stack +void BotPushGoal(int goalstate, bot_goal_t *goal); +//pop a goal from the goal stack +void BotPopGoal(int goalstate); +//empty the bot's goal stack +void BotEmptyGoalStack(int goalstate); +//dump the avoid goals +void BotDumpAvoidGoals(int goalstate); +//dump the goal stack +void BotDumpGoalStack(int goalstate); +//get the name name of the goal with the given number +void BotGoalName(int number, char *name, int size); +//get the top goal from the stack +int BotGetTopGoal(int goalstate, bot_goal_t *goal); +//get the second goal on the stack +int BotGetSecondGoal(int goalstate, bot_goal_t *goal); +//choose the best long term goal item for the bot +int BotChooseLTGItem(int goalstate, vec3_t origin, int *inventory, int travelflags); +//choose the best nearby goal item for the bot +//the item may not be further away from the current bot position than maxtime +//also the travel time from the nearby goal towards the long term goal may not +//be larger than the travel time towards the long term goal from the current bot position +int BotChooseNBGItem(int goalstate, vec3_t origin, int *inventory, int travelflags, + bot_goal_t *ltg, float maxtime); +//returns true if the bot touches the goal +int BotTouchingGoal(vec3_t origin, bot_goal_t *goal); +//returns true if the goal should be visible but isn't +int BotItemGoalInVisButNotVisible(int viewer, vec3_t eye, vec3_t viewangles, bot_goal_t *goal); +//search for a goal for the given classname, the index can be used +//as a start point for the search when multiple goals are available with that same classname +int BotGetLevelItemGoal(int index, char *classname, bot_goal_t *goal); +//get the next camp spot in the map +int BotGetNextCampSpotGoal(int num, bot_goal_t *goal); +//get the map location with the given name +int BotGetMapLocationGoal(char *name, bot_goal_t *goal); +//returns the avoid goal time +float BotAvoidGoalTime(int goalstate, int number); +//set the avoid goal time +void BotSetAvoidGoalTime(int goalstate, int number, float avoidtime); +//initializes the items in the level +void BotInitLevelItems(void); +//regularly update dynamic entity items (dropped weapons, flags etc.) +void BotUpdateEntityItems(void); +//interbreed the goal fuzzy logic +void BotInterbreedGoalFuzzyLogic(int parent1, int parent2, int child); +//save the goal fuzzy logic to disk +void BotSaveGoalFuzzyLogic(int goalstate, char *filename); +//mutate the goal fuzzy logic +void BotMutateGoalFuzzyLogic(int goalstate, float range); +//loads item weights for the bot +int BotLoadItemWeights(int goalstate, char *filename); +//frees the item weights of the bot +void BotFreeItemWeights(int goalstate); +//returns the handle of a newly allocated goal state +int BotAllocGoalState(int client); +//free the given goal state +void BotFreeGoalState(int handle); +//setup the goal AI +int BotSetupGoalAI(void); +//shut down the goal AI +void BotShutdownGoalAI(void); diff --git a/code/game/be_ai_move.h b/code/game/be_ai_move.h new file mode 100644 index 0000000..449d425 --- /dev/null +++ b/code/game/be_ai_move.h @@ -0,0 +1,126 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + +/***************************************************************************** + * name: be_ai_move.h + * + * desc: movement AI + * + * $Archive: /source/code/botlib/be_ai_move.h $ + * $Author: Mrelusive $ + * $Revision: 2 $ + * $Modtime: 10/05/99 3:32p $ + * $Date: 10/05/99 3:42p $ + * + *****************************************************************************/ + +//movement types +#define MOVE_WALK 1 +#define MOVE_CROUCH 2 +#define MOVE_JUMP 4 +#define MOVE_GRAPPLE 8 +#define MOVE_ROCKETJUMP 16 +#define MOVE_BFGJUMP 32 +//move flags +#define MFL_BARRIERJUMP 1 //bot is performing a barrier jump +#define MFL_ONGROUND 2 //bot is in the ground +#define MFL_SWIMMING 4 //bot is swimming +#define MFL_AGAINSTLADDER 8 //bot is against a ladder +#define MFL_WATERJUMP 16 //bot is waterjumping +#define MFL_TELEPORTED 32 //bot is being teleported +#define MFL_GRAPPLEPULL 64 //bot is being pulled by the grapple +#define MFL_ACTIVEGRAPPLE 128 //bot is using the grapple hook +#define MFL_GRAPPLERESET 256 //bot has reset the grapple +#define MFL_WALK 512 //bot should walk slowly +// move result flags +#define MOVERESULT_MOVEMENTVIEW 1 //bot uses view for movement +#define MOVERESULT_SWIMVIEW 2 //bot uses view for swimming +#define MOVERESULT_WAITING 4 //bot is waiting for something +#define MOVERESULT_MOVEMENTVIEWSET 8 //bot has set the view in movement code +#define MOVERESULT_MOVEMENTWEAPON 16 //bot uses weapon for movement +#define MOVERESULT_ONTOPOFOBSTACLE 32 //bot is ontop of obstacle +#define MOVERESULT_ONTOPOF_FUNCBOB 64 //bot is ontop of a func_bobbing +#define MOVERESULT_ONTOPOF_ELEVATOR 128 //bot is ontop of an elevator (func_plat) +#define MOVERESULT_BLOCKEDBYAVOIDSPOT 256 //bot is blocked by an avoid spot +// +#define MAX_AVOIDREACH 1 +#define MAX_AVOIDSPOTS 32 +// avoid spot types +#define AVOID_CLEAR 0 //clear all avoid spots +#define AVOID_ALWAYS 1 //avoid always +#define AVOID_DONTBLOCK 2 //never totally block +// restult types +#define RESULTTYPE_ELEVATORUP 1 //elevator is up +#define RESULTTYPE_WAITFORFUNCBOBBING 2 //waiting for func bobbing to arrive +#define RESULTTYPE_BADGRAPPLEPATH 4 //grapple path is obstructed +#define RESULTTYPE_INSOLIDAREA 8 //stuck in solid area, this is bad + +//structure used to initialize the movement state +//the or_moveflags MFL_ONGROUND, MFL_TELEPORTED and MFL_WATERJUMP come from the playerstate +typedef struct bot_initmove_s +{ + vec3_t origin; //origin of the bot + vec3_t velocity; //velocity of the bot + vec3_t viewoffset; //view offset + int entitynum; //entity number of the bot + int client; //client number of the bot + float thinktime; //time the bot thinks + int presencetype; //presencetype of the bot + vec3_t viewangles; //view angles of the bot + int or_moveflags; //values ored to the movement flags +} bot_initmove_t; + +//NOTE: the ideal_viewangles are only valid if MFL_MOVEMENTVIEW is set +typedef struct bot_moveresult_s +{ + int failure; //true if movement failed all together + int type; //failure or blocked type + int blocked; //true if blocked by an entity + int blockentity; //entity blocking the bot + int traveltype; //last executed travel type + int flags; //result flags + int weapon; //weapon used for movement + vec3_t movedir; //movement direction + vec3_t ideal_viewangles; //ideal viewangles for the movement +} bot_moveresult_t; + +// bk001204: from code/botlib/be_ai_move.c +// TTimo 04/12/2001 was moved here to avoid dup defines +typedef struct bot_avoidspot_s +{ + vec3_t origin; + float radius; + int type; +} bot_avoidspot_t; + +//resets the whole move state +void BotResetMoveState(int movestate); +//moves the bot to the given goal +void BotMoveToGoal(bot_moveresult_t *result, int movestate, bot_goal_t *goal, int travelflags); +//moves the bot in the specified direction using the specified type of movement +int BotMoveInDirection(int movestate, vec3_t dir, float speed, int type); +//reset avoid reachability +void BotResetAvoidReach(int movestate); +//resets the last avoid reachability +void BotResetLastAvoidReach(int movestate); +//returns a reachability area if the origin is in one +int BotReachabilityArea(vec3_t origin, int client); +//view target based on movement +int BotMovementViewTarget(int movestate, bot_goal_t *goal, int travelflags, float lookahead, vec3_t target); +//predict the position of a player based on movement towards a goal +int BotPredictVisiblePosition(vec3_t origin, int areanum, bot_goal_t *goal, int travelflags, vec3_t target); +//returns the handle of a newly allocated movestate +int BotAllocMoveState(void); +//frees the movestate with the given handle +void BotFreeMoveState(int handle); +//initialize movement state before performing any movement +void BotInitMoveState(int handle, bot_initmove_t *initmove); +//add a spot to avoid (if type == AVOID_CLEAR all spots are removed) +void BotAddAvoidSpot(int movestate, vec3_t origin, float radius, int type); +//must be called every map change +void BotSetBrushModelTypes(void); +//setup movement AI +int BotSetupMoveAI(void); +//shutdown movement AI +void BotShutdownMoveAI(void); + diff --git a/code/game/be_ai_weap.h b/code/game/be_ai_weap.h new file mode 100644 index 0000000..a790983 --- /dev/null +++ b/code/game/be_ai_weap.h @@ -0,0 +1,88 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + +/***************************************************************************** + * name: be_ai_weap.h + * + * desc: weapon AI + * + * $Archive: /source/code/botlib/be_ai_weap.h $ + * $Author: Mrelusive $ + * $Revision: 2 $ + * $Modtime: 10/05/99 3:32p $ + * $Date: 10/05/99 3:42p $ + * + *****************************************************************************/ + +//projectile flags +#define PFL_WINDOWDAMAGE 1 //projectile damages through window +#define PFL_RETURN 2 //set when projectile returns to owner +//weapon flags +#define WFL_FIRERELEASED 1 //set when projectile is fired with key-up event +//damage types +#define DAMAGETYPE_IMPACT 1 //damage on impact +#define DAMAGETYPE_RADIAL 2 //radial damage +#define DAMAGETYPE_VISIBLE 4 //damage to all entities visible to the projectile + +typedef struct projectileinfo_s +{ + char name[MAX_STRINGFIELD]; + char model[MAX_STRINGFIELD]; + int flags; + float gravity; + int damage; + float radius; + int visdamage; + int damagetype; + int healthinc; + float push; + float detonation; + float bounce; + float bouncefric; + float bouncestop; +} projectileinfo_t; + +typedef struct weaponinfo_s +{ + int valid; //true if the weapon info is valid + int number; //number of the weapon + char name[MAX_STRINGFIELD]; + char model[MAX_STRINGFIELD]; + int level; + int weaponindex; + int flags; + char projectile[MAX_STRINGFIELD]; + int numprojectiles; + float hspread; + float vspread; + float speed; + float acceleration; + vec3_t recoil; + vec3_t offset; + vec3_t angleoffset; + float extrazvelocity; + int ammoamount; + int ammoindex; + float activate; + float reload; + float spinup; + float spindown; + projectileinfo_t proj; //pointer to the used projectile +} weaponinfo_t; + +//setup the weapon AI +int BotSetupWeaponAI(void); +//shut down the weapon AI +void BotShutdownWeaponAI(void); +//returns the best weapon to fight with +int BotChooseBestFightWeapon(int weaponstate, int *inventory); +//returns the information of the current weapon +void BotGetWeaponInfo(int weaponstate, int weapon, weaponinfo_t *weaponinfo); +//loads the weapon weights +int BotLoadWeaponWeights(int weaponstate, char *filename); +//returns a handle to a newly allocated weapon state +int BotAllocWeaponState(void); +//frees the weapon state +void BotFreeWeaponState(int weaponstate); +//resets the whole weapon state +void BotResetWeaponState(int weaponstate); diff --git a/code/game/be_ea.h b/code/game/be_ea.h new file mode 100644 index 0000000..e125457 --- /dev/null +++ b/code/game/be_ea.h @@ -0,0 +1,52 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + +/***************************************************************************** + * name: be_ea.h + * + * desc: elementary actions + * + * $Archive: /source/code/botlib/be_ea.h $ + * $Author: Mrelusive $ + * $Revision: 2 $ + * $Modtime: 10/05/99 3:32p $ + * $Date: 10/05/99 3:42p $ + * + *****************************************************************************/ + +//ClientCommand elementary actions +void EA_Say(int client, char *str); +void EA_SayTeam(int client, char *str); +void EA_Command(int client, char *command ); + +void EA_Action(int client, int action); +void EA_Crouch(int client); +void EA_Walk(int client); +void EA_MoveUp(int client); +void EA_MoveDown(int client); +void EA_MoveForward(int client); +void EA_MoveBack(int client); +void EA_MoveLeft(int client); +void EA_MoveRight(int client); +void EA_Attack(int client); +void EA_Alt_Attack(int client); +void EA_ForcePower(int client); +void EA_Respawn(int client); +void EA_Talk(int client); +void EA_Gesture(int client); +void EA_Use(int client); + +//regular elementary actions +void EA_SelectWeapon(int client, int weapon); +void EA_Jump(int client); +void EA_DelayedJump(int client); +void EA_Move(int client, vec3_t dir, float speed); +void EA_View(int client, vec3_t viewangles); + +//send regular input to the server +void EA_EndRegular(int client, float thinktime); +void EA_GetInput(int client, float thinktime, bot_input_t *input); +void EA_ResetInput(int client); +//setup and shutdown routines +int EA_Setup(void); +void EA_Shutdown(void); diff --git a/code/game/bg_lib.c b/code/game/bg_lib.c new file mode 100644 index 0000000..14f905f --- /dev/null +++ b/code/game/bg_lib.c @@ -0,0 +1,1318 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// Copyright (C) 1999-2000 Id Software, Inc. +// +// bg_lib,c -- standard C library replacement routines used by code +// compiled for the virtual machine + +#include "q_shared.h" + +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 +static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93"; +#endif +static const char rcsid[] = + "$Id: bg_lib.c,v 1.23 2000/02/04 06:46:50 zoid Exp $"; +#endif /* LIBC_SCCS and not lint */ + +// bk001127 - needed for DLL's +#if !defined( Q3_VM ) +typedef int cmp_t(const void *, const void *); +#endif + +static char* med3(char *, char *, char *, cmp_t *); +static void swapfunc(char *, char *, int, int); + +#ifndef min +#define min(a, b) (a) < (b) ? a : b +#endif + +/* + * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". + */ +#define swapcode(TYPE, parmi, parmj, n) { \ + long i = (n) / sizeof (TYPE); \ + register TYPE *pi = (TYPE *) (parmi); \ + register TYPE *pj = (TYPE *) (parmj); \ + do { \ + register TYPE t = *pi; \ + *pi++ = *pj; \ + *pj++ = t; \ + } while (--i > 0); \ +} + +#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ + es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; + +static void swapfunc( char* a, char* b, int n, int swaptype) +{ + if(swaptype <= 1) + swapcode(long, a, b, n) + else + swapcode(char, a, b, n) +} + +#define swap(a, b) \ + if (swaptype == 0) { \ + long t = *(long *)(a); \ + *(long *)(a) = *(long *)(b); \ + *(long *)(b) = t; \ + } else \ + swapfunc(a, b, es, swaptype) + +#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) + +static char *med3(char* a, char* b, char* c, cmp_t* cmp) +{ + return cmp(a, b) < 0 ? + (cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a )) + :(cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c )); +} + +void qsort( void* a, size_t n, size_t es, cmp_t* cmp) +{ + char *pa, *pb, *pc, *pd, *pl, *pm, *pn; + int d, r, swaptype, swap_cnt; + +loop: SWAPINIT(a, es); + swap_cnt = 0; + if (n < 7) { + for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) + for (pl = pm; pl > (char *)a && cmp(pl - es, pl) > 0; + pl -= es) + swap(pl, pl - es); + return; + } + pm = (char *)a + (n / 2) * es; + if (n > 7) { + pl = a; + pn = (char *)a + (n - 1) * es; + if (n > 40) { + d = (n / 8) * es; + pl = med3(pl, pl + d, pl + 2 * d, cmp); + pm = med3(pm - d, pm, pm + d, cmp); + pn = med3(pn - 2 * d, pn - d, pn, cmp); + } + pm = med3(pl, pm, pn, cmp); + } + swap(a, pm); + pa = pb = (char *)a + es; + + pc = pd = (char *)a + (n - 1) * es; + for (;;) { + while (pb <= pc && (r = cmp(pb, a)) <= 0) { + if (r == 0) { + swap_cnt = 1; + swap(pa, pb); + pa += es; + } + pb += es; + } + while (pb <= pc && (r = cmp(pc, a)) >= 0) { + if (r == 0) { + swap_cnt = 1; + swap(pc, pd); + pd -= es; + } + pc -= es; + } + if (pb > pc) + break; + swap(pb, pc); + swap_cnt = 1; + pb += es; + pc -= es; + } + if (swap_cnt == 0) { /* Switch to insertion sort */ + for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) + for (pl = pm; pl > (char *)a && cmp(pl - es, pl) > 0; + pl -= es) + swap(pl, pl - es); + return; + } + + pn = (char *)a + n * es; + r = min(pa - (char *)a, pb - pa); + vecswap(a, pb - r, r); + r = min(pd - pc, pn - pd - es); + vecswap(pb, pn - r, r); + if ((r = pb - pa) > es) + qsort(a, r / es, es, cmp); + if ((r = pd - pc) > es) { + /* Iterate rather than recurse to save stack space */ + a = pn - r; + n = r / es; + goto loop; + } +/* qsort(pn - r, r / es, es, cmp);*/ +} + +//================================================================================== + + +// this file is excluded from release builds because of intrinsics + +// bk001211 - gcc errors on compiling strcpy: parse error before `__extension__' +#if defined ( Q3_VM ) + +size_t strlen( const char *string ) { + const char *s; + + s = string; + while ( *s ) { + s++; + } + return s - string; +} + + +char *strcat( char *strDestination, const char *strSource ) { + char *s; + + s = strDestination; + while ( *s ) { + s++; + } + while ( *strSource ) { + *s++ = *strSource++; + } + *s = 0; + return strDestination; +} + +char *strcpy( char *strDestination, const char *strSource ) { + char *s; + + s = strDestination; + while ( *strSource ) { + *s++ = *strSource++; + } + *s = 0; + return strDestination; +} + + +int strcmp( const char *string1, const char *string2 ) { + while ( *string1 == *string2 && *string1 && *string2 ) { + string1++; + string2++; + } + return *string1 - *string2; +} + + +char *strchr( const char *string, int c ) { + while ( *string ) { + if ( *string == c ) { + return ( char * )string; + } + string++; + } + return (char *)0; +} + +char *strstr( const char *string, const char *strCharSet ) { + while ( *string ) { + int i; + + for ( i = 0 ; strCharSet[i] ; i++ ) { + if ( string[i] != strCharSet[i] ) { + break; + } + } + if ( !strCharSet[i] ) { + return (char *)string; + } + string++; + } + return (char *)0; +} +#endif // bk001211 + +// bk001120 - presumably needed for Mac +//#if !defined(_MSC_VER) && !defined(__linux__) +// bk001127 - undid undo +#if defined ( Q3_VM ) +int tolower( int c ) { + if ( c >= 'A' && c <= 'Z' ) { + c += 'a' - 'A'; + } + return c; +} + + +int toupper( int c ) { + if ( c >= 'a' && c <= 'z' ) { + c += 'A' - 'a'; + } + return c; +} + +#endif +//#ifndef _MSC_VER + +void *memmove( void *dest, const void *src, size_t count ) { + int i; + + if ( dest > src ) { + for ( i = count-1 ; i >= 0 ; i-- ) { + ((char *)dest)[i] = ((char *)src)[i]; + } + } else { + for ( i = 0 ; i < count ; i++ ) { + ((char *)dest)[i] = ((char *)src)[i]; + } + } + return dest; +} + + +#if 0 + +double floor( double x ) { + return (int)(x + 0x40000000) - 0x40000000; +} + +void *memset( void *dest, int c, size_t count ) { + while ( count-- ) { + ((char *)dest)[count] = c; + } + return dest; +} + +void *memcpy( void *dest, const void *src, size_t count ) { + while ( count-- ) { + ((char *)dest)[count] = ((char *)src)[count]; + } + return dest; +} + +char *strncpy( char *strDest, const char *strSource, size_t count ) { + char *s; + + s = strDest; + while ( *strSource && count ) { + *s++ = *strSource++; + count--; + } + while ( count-- ) { + *s++ = 0; + } + return strDest; +} + +double sqrt( double x ) { + float y; + float delta; + float maxError; + + if ( x <= 0 ) { + return 0; + } + + // initial guess + y = x / 2; + + // refine + maxError = x * 0.001; + + do { + delta = ( y * y ) - x; + y -= delta / ( 2 * y ); + } while ( delta > maxError || delta < -maxError ); + + return y; +} + + +float sintable[1024] = { +0.000000,0.001534,0.003068,0.004602,0.006136,0.007670,0.009204,0.010738, +0.012272,0.013805,0.015339,0.016873,0.018407,0.019940,0.021474,0.023008, +0.024541,0.026075,0.027608,0.029142,0.030675,0.032208,0.033741,0.035274, +0.036807,0.038340,0.039873,0.041406,0.042938,0.044471,0.046003,0.047535, +0.049068,0.050600,0.052132,0.053664,0.055195,0.056727,0.058258,0.059790, +0.061321,0.062852,0.064383,0.065913,0.067444,0.068974,0.070505,0.072035, +0.073565,0.075094,0.076624,0.078153,0.079682,0.081211,0.082740,0.084269, +0.085797,0.087326,0.088854,0.090381,0.091909,0.093436,0.094963,0.096490, +0.098017,0.099544,0.101070,0.102596,0.104122,0.105647,0.107172,0.108697, +0.110222,0.111747,0.113271,0.114795,0.116319,0.117842,0.119365,0.120888, +0.122411,0.123933,0.125455,0.126977,0.128498,0.130019,0.131540,0.133061, +0.134581,0.136101,0.137620,0.139139,0.140658,0.142177,0.143695,0.145213, +0.146730,0.148248,0.149765,0.151281,0.152797,0.154313,0.155828,0.157343, +0.158858,0.160372,0.161886,0.163400,0.164913,0.166426,0.167938,0.169450, +0.170962,0.172473,0.173984,0.175494,0.177004,0.178514,0.180023,0.181532, +0.183040,0.184548,0.186055,0.187562,0.189069,0.190575,0.192080,0.193586, +0.195090,0.196595,0.198098,0.199602,0.201105,0.202607,0.204109,0.205610, +0.207111,0.208612,0.210112,0.211611,0.213110,0.214609,0.216107,0.217604, +0.219101,0.220598,0.222094,0.223589,0.225084,0.226578,0.228072,0.229565, +0.231058,0.232550,0.234042,0.235533,0.237024,0.238514,0.240003,0.241492, +0.242980,0.244468,0.245955,0.247442,0.248928,0.250413,0.251898,0.253382, +0.254866,0.256349,0.257831,0.259313,0.260794,0.262275,0.263755,0.265234, +0.266713,0.268191,0.269668,0.271145,0.272621,0.274097,0.275572,0.277046, +0.278520,0.279993,0.281465,0.282937,0.284408,0.285878,0.287347,0.288816, +0.290285,0.291752,0.293219,0.294685,0.296151,0.297616,0.299080,0.300543, +0.302006,0.303468,0.304929,0.306390,0.307850,0.309309,0.310767,0.312225, +0.313682,0.315138,0.316593,0.318048,0.319502,0.320955,0.322408,0.323859, +0.325310,0.326760,0.328210,0.329658,0.331106,0.332553,0.334000,0.335445, +0.336890,0.338334,0.339777,0.341219,0.342661,0.344101,0.345541,0.346980, +0.348419,0.349856,0.351293,0.352729,0.354164,0.355598,0.357031,0.358463, +0.359895,0.361326,0.362756,0.364185,0.365613,0.367040,0.368467,0.369892, +0.371317,0.372741,0.374164,0.375586,0.377007,0.378428,0.379847,0.381266, +0.382683,0.384100,0.385516,0.386931,0.388345,0.389758,0.391170,0.392582, +0.393992,0.395401,0.396810,0.398218,0.399624,0.401030,0.402435,0.403838, +0.405241,0.406643,0.408044,0.409444,0.410843,0.412241,0.413638,0.415034, +0.416430,0.417824,0.419217,0.420609,0.422000,0.423390,0.424780,0.426168, +0.427555,0.428941,0.430326,0.431711,0.433094,0.434476,0.435857,0.437237, +0.438616,0.439994,0.441371,0.442747,0.444122,0.445496,0.446869,0.448241, +0.449611,0.450981,0.452350,0.453717,0.455084,0.456449,0.457813,0.459177, +0.460539,0.461900,0.463260,0.464619,0.465976,0.467333,0.468689,0.470043, +0.471397,0.472749,0.474100,0.475450,0.476799,0.478147,0.479494,0.480839, +0.482184,0.483527,0.484869,0.486210,0.487550,0.488889,0.490226,0.491563, +0.492898,0.494232,0.495565,0.496897,0.498228,0.499557,0.500885,0.502212, +0.503538,0.504863,0.506187,0.507509,0.508830,0.510150,0.511469,0.512786, +0.514103,0.515418,0.516732,0.518045,0.519356,0.520666,0.521975,0.523283, +0.524590,0.525895,0.527199,0.528502,0.529804,0.531104,0.532403,0.533701, +0.534998,0.536293,0.537587,0.538880,0.540171,0.541462,0.542751,0.544039, +0.545325,0.546610,0.547894,0.549177,0.550458,0.551738,0.553017,0.554294, +0.555570,0.556845,0.558119,0.559391,0.560662,0.561931,0.563199,0.564466, +0.565732,0.566996,0.568259,0.569521,0.570781,0.572040,0.573297,0.574553, +0.575808,0.577062,0.578314,0.579565,0.580814,0.582062,0.583309,0.584554, +0.585798,0.587040,0.588282,0.589521,0.590760,0.591997,0.593232,0.594466, +0.595699,0.596931,0.598161,0.599389,0.600616,0.601842,0.603067,0.604290, +0.605511,0.606731,0.607950,0.609167,0.610383,0.611597,0.612810,0.614022, +0.615232,0.616440,0.617647,0.618853,0.620057,0.621260,0.622461,0.623661, +0.624859,0.626056,0.627252,0.628446,0.629638,0.630829,0.632019,0.633207, +0.634393,0.635578,0.636762,0.637944,0.639124,0.640303,0.641481,0.642657, +0.643832,0.645005,0.646176,0.647346,0.648514,0.649681,0.650847,0.652011, +0.653173,0.654334,0.655493,0.656651,0.657807,0.658961,0.660114,0.661266, +0.662416,0.663564,0.664711,0.665856,0.667000,0.668142,0.669283,0.670422, +0.671559,0.672695,0.673829,0.674962,0.676093,0.677222,0.678350,0.679476, +0.680601,0.681724,0.682846,0.683965,0.685084,0.686200,0.687315,0.688429, +0.689541,0.690651,0.691759,0.692866,0.693971,0.695075,0.696177,0.697278, +0.698376,0.699473,0.700569,0.701663,0.702755,0.703845,0.704934,0.706021, +0.707107,0.708191,0.709273,0.710353,0.711432,0.712509,0.713585,0.714659, +0.715731,0.716801,0.717870,0.718937,0.720003,0.721066,0.722128,0.723188, +0.724247,0.725304,0.726359,0.727413,0.728464,0.729514,0.730563,0.731609, +0.732654,0.733697,0.734739,0.735779,0.736817,0.737853,0.738887,0.739920, +0.740951,0.741980,0.743008,0.744034,0.745058,0.746080,0.747101,0.748119, +0.749136,0.750152,0.751165,0.752177,0.753187,0.754195,0.755201,0.756206, +0.757209,0.758210,0.759209,0.760207,0.761202,0.762196,0.763188,0.764179, +0.765167,0.766154,0.767139,0.768122,0.769103,0.770083,0.771061,0.772036, +0.773010,0.773983,0.774953,0.775922,0.776888,0.777853,0.778817,0.779778, +0.780737,0.781695,0.782651,0.783605,0.784557,0.785507,0.786455,0.787402, +0.788346,0.789289,0.790230,0.791169,0.792107,0.793042,0.793975,0.794907, +0.795837,0.796765,0.797691,0.798615,0.799537,0.800458,0.801376,0.802293, +0.803208,0.804120,0.805031,0.805940,0.806848,0.807753,0.808656,0.809558, +0.810457,0.811355,0.812251,0.813144,0.814036,0.814926,0.815814,0.816701, +0.817585,0.818467,0.819348,0.820226,0.821103,0.821977,0.822850,0.823721, +0.824589,0.825456,0.826321,0.827184,0.828045,0.828904,0.829761,0.830616, +0.831470,0.832321,0.833170,0.834018,0.834863,0.835706,0.836548,0.837387, +0.838225,0.839060,0.839894,0.840725,0.841555,0.842383,0.843208,0.844032, +0.844854,0.845673,0.846491,0.847307,0.848120,0.848932,0.849742,0.850549, +0.851355,0.852159,0.852961,0.853760,0.854558,0.855354,0.856147,0.856939, +0.857729,0.858516,0.859302,0.860085,0.860867,0.861646,0.862424,0.863199, +0.863973,0.864744,0.865514,0.866281,0.867046,0.867809,0.868571,0.869330, +0.870087,0.870842,0.871595,0.872346,0.873095,0.873842,0.874587,0.875329, +0.876070,0.876809,0.877545,0.878280,0.879012,0.879743,0.880471,0.881197, +0.881921,0.882643,0.883363,0.884081,0.884797,0.885511,0.886223,0.886932, +0.887640,0.888345,0.889048,0.889750,0.890449,0.891146,0.891841,0.892534, +0.893224,0.893913,0.894599,0.895284,0.895966,0.896646,0.897325,0.898001, +0.898674,0.899346,0.900016,0.900683,0.901349,0.902012,0.902673,0.903332, +0.903989,0.904644,0.905297,0.905947,0.906596,0.907242,0.907886,0.908528, +0.909168,0.909806,0.910441,0.911075,0.911706,0.912335,0.912962,0.913587, +0.914210,0.914830,0.915449,0.916065,0.916679,0.917291,0.917901,0.918508, +0.919114,0.919717,0.920318,0.920917,0.921514,0.922109,0.922701,0.923291, +0.923880,0.924465,0.925049,0.925631,0.926210,0.926787,0.927363,0.927935, +0.928506,0.929075,0.929641,0.930205,0.930767,0.931327,0.931884,0.932440, +0.932993,0.933544,0.934093,0.934639,0.935184,0.935726,0.936266,0.936803, +0.937339,0.937872,0.938404,0.938932,0.939459,0.939984,0.940506,0.941026, +0.941544,0.942060,0.942573,0.943084,0.943593,0.944100,0.944605,0.945107, +0.945607,0.946105,0.946601,0.947094,0.947586,0.948075,0.948561,0.949046, +0.949528,0.950008,0.950486,0.950962,0.951435,0.951906,0.952375,0.952842, +0.953306,0.953768,0.954228,0.954686,0.955141,0.955594,0.956045,0.956494, +0.956940,0.957385,0.957826,0.958266,0.958703,0.959139,0.959572,0.960002, +0.960431,0.960857,0.961280,0.961702,0.962121,0.962538,0.962953,0.963366, +0.963776,0.964184,0.964590,0.964993,0.965394,0.965793,0.966190,0.966584, +0.966976,0.967366,0.967754,0.968139,0.968522,0.968903,0.969281,0.969657, +0.970031,0.970403,0.970772,0.971139,0.971504,0.971866,0.972226,0.972584, +0.972940,0.973293,0.973644,0.973993,0.974339,0.974684,0.975025,0.975365, +0.975702,0.976037,0.976370,0.976700,0.977028,0.977354,0.977677,0.977999, +0.978317,0.978634,0.978948,0.979260,0.979570,0.979877,0.980182,0.980485, +0.980785,0.981083,0.981379,0.981673,0.981964,0.982253,0.982539,0.982824, +0.983105,0.983385,0.983662,0.983937,0.984210,0.984480,0.984749,0.985014, +0.985278,0.985539,0.985798,0.986054,0.986308,0.986560,0.986809,0.987057, +0.987301,0.987544,0.987784,0.988022,0.988258,0.988491,0.988722,0.988950, +0.989177,0.989400,0.989622,0.989841,0.990058,0.990273,0.990485,0.990695, +0.990903,0.991108,0.991311,0.991511,0.991710,0.991906,0.992099,0.992291, +0.992480,0.992666,0.992850,0.993032,0.993212,0.993389,0.993564,0.993737, +0.993907,0.994075,0.994240,0.994404,0.994565,0.994723,0.994879,0.995033, +0.995185,0.995334,0.995481,0.995625,0.995767,0.995907,0.996045,0.996180, +0.996313,0.996443,0.996571,0.996697,0.996820,0.996941,0.997060,0.997176, +0.997290,0.997402,0.997511,0.997618,0.997723,0.997825,0.997925,0.998023, +0.998118,0.998211,0.998302,0.998390,0.998476,0.998559,0.998640,0.998719, +0.998795,0.998870,0.998941,0.999011,0.999078,0.999142,0.999205,0.999265, +0.999322,0.999378,0.999431,0.999481,0.999529,0.999575,0.999619,0.999660, +0.999699,0.999735,0.999769,0.999801,0.999831,0.999858,0.999882,0.999905, +0.999925,0.999942,0.999958,0.999971,0.999981,0.999989,0.999995,0.999999 +}; + +double sin( double x ) { + int index; + int quad; + + index = 1024 * x / (M_PI * 0.5); + quad = ( index >> 10 ) & 3; + index &= 1023; + switch ( quad ) { + case 0: + return sintable[index]; + case 1: + return sintable[1023-index]; + case 2: + return -sintable[index]; + case 3: + return -sintable[1023-index]; + } + return 0; +} + + +double cos( double x ) { + int index; + int quad; + + index = 1024 * x / (M_PI * 0.5); + quad = ( index >> 10 ) & 3; + index &= 1023; + switch ( quad ) { + case 3: + return sintable[index]; + case 0: + return sintable[1023-index]; + case 1: + return -sintable[index]; + case 2: + return -sintable[1023-index]; + } + return 0; +} + + +/* +void create_acostable( void ) { + int i; + FILE *fp; + float a; + + fp = fopen("c:\\acostable.txt", "w"); + fprintf(fp, "float acostable[] = {"); + for (i = 0; i < 1024; i++) { + if (!(i & 7)) + fprintf(fp, "\n"); + a = acos( (float) -1 + i / 512 ); + fprintf(fp, "%1.8f,", a); + } + fprintf(fp, "\n}\n"); + fclose(fp); +} +*/ + +float acostable[] = { +3.14159265,3.07908248,3.05317551,3.03328655,3.01651113,3.00172442,2.98834964,2.97604422, +2.96458497,2.95381690,2.94362719,2.93393068,2.92466119,2.91576615,2.90720289,2.89893629, +2.89093699,2.88318015,2.87564455,2.86831188,2.86116621,2.85419358,2.84738169,2.84071962, +2.83419760,2.82780691,2.82153967,2.81538876,2.80934770,2.80341062,2.79757211,2.79182724, +2.78617145,2.78060056,2.77511069,2.76969824,2.76435988,2.75909250,2.75389319,2.74875926, +2.74368816,2.73867752,2.73372510,2.72882880,2.72398665,2.71919677,2.71445741,2.70976688, +2.70512362,2.70052613,2.69597298,2.69146283,2.68699438,2.68256642,2.67817778,2.67382735, +2.66951407,2.66523692,2.66099493,2.65678719,2.65261279,2.64847088,2.64436066,2.64028133, +2.63623214,2.63221238,2.62822133,2.62425835,2.62032277,2.61641398,2.61253138,2.60867440, +2.60484248,2.60103507,2.59725167,2.59349176,2.58975488,2.58604053,2.58234828,2.57867769, +2.57502832,2.57139977,2.56779164,2.56420354,2.56063509,2.55708594,2.55355572,2.55004409, +2.54655073,2.54307530,2.53961750,2.53617701,2.53275354,2.52934680,2.52595650,2.52258238, +2.51922417,2.51588159,2.51255441,2.50924238,2.50594525,2.50266278,2.49939476,2.49614096, +2.49290115,2.48967513,2.48646269,2.48326362,2.48007773,2.47690482,2.47374472,2.47059722, +2.46746215,2.46433933,2.46122860,2.45812977,2.45504269,2.45196720,2.44890314,2.44585034, +2.44280867,2.43977797,2.43675809,2.43374890,2.43075025,2.42776201,2.42478404,2.42181622, +2.41885841,2.41591048,2.41297232,2.41004380,2.40712480,2.40421521,2.40131491,2.39842379, +2.39554173,2.39266863,2.38980439,2.38694889,2.38410204,2.38126374,2.37843388,2.37561237, +2.37279910,2.36999400,2.36719697,2.36440790,2.36162673,2.35885335,2.35608768,2.35332964, +2.35057914,2.34783610,2.34510044,2.34237208,2.33965094,2.33693695,2.33423003,2.33153010, +2.32883709,2.32615093,2.32347155,2.32079888,2.31813284,2.31547337,2.31282041,2.31017388, +2.30753373,2.30489988,2.30227228,2.29965086,2.29703556,2.29442632,2.29182309,2.28922580, +2.28663439,2.28404881,2.28146900,2.27889490,2.27632647,2.27376364,2.27120637,2.26865460, +2.26610827,2.26356735,2.26103177,2.25850149,2.25597646,2.25345663,2.25094195,2.24843238, +2.24592786,2.24342836,2.24093382,2.23844420,2.23595946,2.23347956,2.23100444,2.22853408, +2.22606842,2.22360742,2.22115104,2.21869925,2.21625199,2.21380924,2.21137096,2.20893709, +2.20650761,2.20408248,2.20166166,2.19924511,2.19683280,2.19442469,2.19202074,2.18962092, +2.18722520,2.18483354,2.18244590,2.18006225,2.17768257,2.17530680,2.17293493,2.17056692, +2.16820274,2.16584236,2.16348574,2.16113285,2.15878367,2.15643816,2.15409630,2.15175805, +2.14942338,2.14709226,2.14476468,2.14244059,2.14011997,2.13780279,2.13548903,2.13317865, +2.13087163,2.12856795,2.12626757,2.12397047,2.12167662,2.11938600,2.11709859,2.11481435, +2.11253326,2.11025530,2.10798044,2.10570867,2.10343994,2.10117424,2.09891156,2.09665185, +2.09439510,2.09214129,2.08989040,2.08764239,2.08539725,2.08315496,2.08091550,2.07867884, +2.07644495,2.07421383,2.07198545,2.06975978,2.06753681,2.06531651,2.06309887,2.06088387, +2.05867147,2.05646168,2.05425445,2.05204979,2.04984765,2.04764804,2.04545092,2.04325628, +2.04106409,2.03887435,2.03668703,2.03450211,2.03231957,2.03013941,2.02796159,2.02578610, +2.02361292,2.02144204,2.01927344,2.01710710,2.01494300,2.01278113,2.01062146,2.00846399, +2.00630870,2.00415556,2.00200457,1.99985570,1.99770895,1.99556429,1.99342171,1.99128119, +1.98914271,1.98700627,1.98487185,1.98273942,1.98060898,1.97848051,1.97635399,1.97422942, +1.97210676,1.96998602,1.96786718,1.96575021,1.96363511,1.96152187,1.95941046,1.95730088, +1.95519310,1.95308712,1.95098292,1.94888050,1.94677982,1.94468089,1.94258368,1.94048818, +1.93839439,1.93630228,1.93421185,1.93212308,1.93003595,1.92795046,1.92586659,1.92378433, +1.92170367,1.91962459,1.91754708,1.91547113,1.91339673,1.91132385,1.90925250,1.90718266, +1.90511432,1.90304746,1.90098208,1.89891815,1.89685568,1.89479464,1.89273503,1.89067683, +1.88862003,1.88656463,1.88451060,1.88245794,1.88040664,1.87835668,1.87630806,1.87426076, +1.87221477,1.87017008,1.86812668,1.86608457,1.86404371,1.86200412,1.85996577,1.85792866, +1.85589277,1.85385809,1.85182462,1.84979234,1.84776125,1.84573132,1.84370256,1.84167495, +1.83964848,1.83762314,1.83559892,1.83357582,1.83155381,1.82953289,1.82751305,1.82549429, +1.82347658,1.82145993,1.81944431,1.81742973,1.81541617,1.81340362,1.81139207,1.80938151, +1.80737194,1.80536334,1.80335570,1.80134902,1.79934328,1.79733848,1.79533460,1.79333164, +1.79132959,1.78932843,1.78732817,1.78532878,1.78333027,1.78133261,1.77933581,1.77733985, +1.77534473,1.77335043,1.77135695,1.76936428,1.76737240,1.76538132,1.76339101,1.76140148, +1.75941271,1.75742470,1.75543743,1.75345090,1.75146510,1.74948002,1.74749565,1.74551198, +1.74352900,1.74154672,1.73956511,1.73758417,1.73560389,1.73362426,1.73164527,1.72966692, +1.72768920,1.72571209,1.72373560,1.72175971,1.71978441,1.71780969,1.71583556,1.71386199, +1.71188899,1.70991653,1.70794462,1.70597325,1.70400241,1.70203209,1.70006228,1.69809297, +1.69612416,1.69415584,1.69218799,1.69022062,1.68825372,1.68628727,1.68432127,1.68235571, +1.68039058,1.67842588,1.67646160,1.67449772,1.67253424,1.67057116,1.66860847,1.66664615, +1.66468420,1.66272262,1.66076139,1.65880050,1.65683996,1.65487975,1.65291986,1.65096028, +1.64900102,1.64704205,1.64508338,1.64312500,1.64116689,1.63920905,1.63725148,1.63529416, +1.63333709,1.63138026,1.62942366,1.62746728,1.62551112,1.62355517,1.62159943,1.61964388, +1.61768851,1.61573332,1.61377831,1.61182346,1.60986877,1.60791422,1.60595982,1.60400556, +1.60205142,1.60009739,1.59814349,1.59618968,1.59423597,1.59228235,1.59032882,1.58837536, +1.58642196,1.58446863,1.58251535,1.58056211,1.57860891,1.57665574,1.57470259,1.57274945, +1.57079633,1.56884320,1.56689007,1.56493692,1.56298375,1.56103055,1.55907731,1.55712403, +1.55517069,1.55321730,1.55126383,1.54931030,1.54735668,1.54540297,1.54344917,1.54149526, +1.53954124,1.53758710,1.53563283,1.53367843,1.53172389,1.52976919,1.52781434,1.52585933, +1.52390414,1.52194878,1.51999323,1.51803748,1.51608153,1.51412537,1.51216900,1.51021240, +1.50825556,1.50629849,1.50434117,1.50238360,1.50042576,1.49846765,1.49650927,1.49455060, +1.49259163,1.49063237,1.48867280,1.48671291,1.48475270,1.48279215,1.48083127,1.47887004, +1.47690845,1.47494650,1.47298419,1.47102149,1.46905841,1.46709493,1.46513106,1.46316677, +1.46120207,1.45923694,1.45727138,1.45530538,1.45333893,1.45137203,1.44940466,1.44743682, +1.44546850,1.44349969,1.44153038,1.43956057,1.43759024,1.43561940,1.43364803,1.43167612, +1.42970367,1.42773066,1.42575709,1.42378296,1.42180825,1.41983295,1.41785705,1.41588056, +1.41390346,1.41192573,1.40994738,1.40796840,1.40598877,1.40400849,1.40202755,1.40004594, +1.39806365,1.39608068,1.39409701,1.39211264,1.39012756,1.38814175,1.38615522,1.38416795, +1.38217994,1.38019117,1.37820164,1.37621134,1.37422025,1.37222837,1.37023570,1.36824222, +1.36624792,1.36425280,1.36225684,1.36026004,1.35826239,1.35626387,1.35426449,1.35226422, +1.35026307,1.34826101,1.34625805,1.34425418,1.34224937,1.34024364,1.33823695,1.33622932, +1.33422072,1.33221114,1.33020059,1.32818904,1.32617649,1.32416292,1.32214834,1.32013273, +1.31811607,1.31609837,1.31407960,1.31205976,1.31003885,1.30801684,1.30599373,1.30396951, +1.30194417,1.29991770,1.29789009,1.29586133,1.29383141,1.29180031,1.28976803,1.28773456, +1.28569989,1.28366400,1.28162688,1.27958854,1.27754894,1.27550809,1.27346597,1.27142257, +1.26937788,1.26733189,1.26528459,1.26323597,1.26118602,1.25913471,1.25708205,1.25502803, +1.25297262,1.25091583,1.24885763,1.24679802,1.24473698,1.24267450,1.24061058,1.23854519, +1.23647833,1.23440999,1.23234015,1.23026880,1.22819593,1.22612152,1.22404557,1.22196806, +1.21988898,1.21780832,1.21572606,1.21364219,1.21155670,1.20946958,1.20738080,1.20529037, +1.20319826,1.20110447,1.19900898,1.19691177,1.19481283,1.19271216,1.19060973,1.18850553, +1.18639955,1.18429178,1.18218219,1.18007079,1.17795754,1.17584244,1.17372548,1.17160663, +1.16948589,1.16736324,1.16523866,1.16311215,1.16098368,1.15885323,1.15672081,1.15458638, +1.15244994,1.15031147,1.14817095,1.14602836,1.14388370,1.14173695,1.13958808,1.13743709, +1.13528396,1.13312866,1.13097119,1.12881153,1.12664966,1.12448556,1.12231921,1.12015061, +1.11797973,1.11580656,1.11363107,1.11145325,1.10927308,1.10709055,1.10490563,1.10271831, +1.10052856,1.09833638,1.09614174,1.09394462,1.09174500,1.08954287,1.08733820,1.08513098, +1.08292118,1.08070879,1.07849378,1.07627614,1.07405585,1.07183287,1.06960721,1.06737882, +1.06514770,1.06291382,1.06067715,1.05843769,1.05619540,1.05395026,1.05170226,1.04945136, +1.04719755,1.04494080,1.04268110,1.04041841,1.03815271,1.03588399,1.03361221,1.03133735, +1.02905939,1.02677830,1.02449407,1.02220665,1.01991603,1.01762219,1.01532509,1.01302471, +1.01072102,1.00841400,1.00610363,1.00378986,1.00147268,0.99915206,0.99682798,0.99450039, +0.99216928,0.98983461,0.98749636,0.98515449,0.98280898,0.98045980,0.97810691,0.97575030, +0.97338991,0.97102573,0.96865772,0.96628585,0.96391009,0.96153040,0.95914675,0.95675912, +0.95436745,0.95197173,0.94957191,0.94716796,0.94475985,0.94234754,0.93993099,0.93751017, +0.93508504,0.93265556,0.93022170,0.92778341,0.92534066,0.92289341,0.92044161,0.91798524, +0.91552424,0.91305858,0.91058821,0.90811309,0.90563319,0.90314845,0.90065884,0.89816430, +0.89566479,0.89316028,0.89065070,0.88813602,0.88561619,0.88309116,0.88056088,0.87802531, +0.87548438,0.87293806,0.87038629,0.86782901,0.86526619,0.86269775,0.86012366,0.85754385, +0.85495827,0.85236686,0.84976956,0.84716633,0.84455709,0.84194179,0.83932037,0.83669277, +0.83405893,0.83141877,0.82877225,0.82611928,0.82345981,0.82079378,0.81812110,0.81544172, +0.81275556,0.81006255,0.80736262,0.80465570,0.80194171,0.79922057,0.79649221,0.79375655, +0.79101352,0.78826302,0.78550497,0.78273931,0.77996593,0.77718475,0.77439569,0.77159865, +0.76879355,0.76598029,0.76315878,0.76032891,0.75749061,0.75464376,0.75178826,0.74892402, +0.74605092,0.74316887,0.74027775,0.73737744,0.73446785,0.73154885,0.72862033,0.72568217, +0.72273425,0.71977644,0.71680861,0.71383064,0.71084240,0.70784376,0.70483456,0.70181469, +0.69878398,0.69574231,0.69268952,0.68962545,0.68654996,0.68346288,0.68036406,0.67725332, +0.67413051,0.67099544,0.66784794,0.66468783,0.66151492,0.65832903,0.65512997,0.65191753, +0.64869151,0.64545170,0.64219789,0.63892987,0.63564741,0.63235028,0.62903824,0.62571106, +0.62236849,0.61901027,0.61563615,0.61224585,0.60883911,0.60541564,0.60197515,0.59851735, +0.59504192,0.59154856,0.58803694,0.58450672,0.58095756,0.57738911,0.57380101,0.57019288, +0.56656433,0.56291496,0.55924437,0.55555212,0.55183778,0.54810089,0.54434099,0.54055758, +0.53675018,0.53291825,0.52906127,0.52517867,0.52126988,0.51733431,0.51337132,0.50938028, +0.50536051,0.50131132,0.49723200,0.49312177,0.48897987,0.48480547,0.48059772,0.47635573, +0.47207859,0.46776530,0.46341487,0.45902623,0.45459827,0.45012983,0.44561967,0.44106652, +0.43646903,0.43182577,0.42713525,0.42239588,0.41760600,0.41276385,0.40786755,0.40291513, +0.39790449,0.39283339,0.38769946,0.38250016,0.37723277,0.37189441,0.36648196,0.36099209, +0.35542120,0.34976542,0.34402054,0.33818204,0.33224495,0.32620390,0.32005298,0.31378574, +0.30739505,0.30087304,0.29421096,0.28739907,0.28042645,0.27328078,0.26594810,0.25841250, +0.25065566,0.24265636,0.23438976,0.22582651,0.21693146,0.20766198,0.19796546,0.18777575, +0.17700769,0.16554844,0.15324301,0.13986823,0.12508152,0.10830610,0.08841715,0.06251018, +} + +double acos( double x ) { + int index; + + if (x < -1) + x = -1; + if (x > 1) + x = 1; + index = (float) (1.0 + x) * 511.9; + return acostable[index]; +} + +double atan2( double y, double x ) { + float base; + float temp; + float dir; + float test; + int i; + + if ( x < 0 ) { + if ( y >= 0 ) { + // quad 1 + base = M_PI / 2; + temp = x; + x = y; + y = -temp; + } else { + // quad 2 + base = M_PI; + x = -x; + y = -y; + } + } else { + if ( y < 0 ) { + // quad 3 + base = 3 * M_PI / 2; + temp = x; + x = -y; + y = temp; + } + } + + if ( y > x ) { + base += M_PI/2; + temp = x; + x = y; + y = temp; + dir = -1; + } else { + dir = 1; + } + + // calcualte angle in octant 0 + if ( x == 0 ) { + return base; + } + y /= x; + + for ( i = 0 ; i < 512 ; i++ ) { + test = sintable[i] / sintable[1023-i]; + if ( test > y ) { + break; + } + } + + return base + dir * i * ( M_PI/2048); +} + + +#endif + +#ifdef Q3_VM +// bk001127 - guarded this tan replacement +// ld: undefined versioned symbol name tan@@GLIBC_2.0 +double tan( double x ) { + return sin(x) / cos(x); +} +#endif + + +static int randSeed = 0; + +void srand( unsigned seed ) { + randSeed = seed; +} + +int rand( void ) { + randSeed = (69069 * randSeed + 1); + return randSeed & 0x7fff; +} + +double atof( const char *string ) { + float sign; + float value; + int c; + + + // skip whitespace + while ( *string <= ' ' ) { + if ( !*string ) { + return 0; + } + string++; + } + + // check sign + switch ( *string ) { + case '+': + string++; + sign = 1; + break; + case '-': + string++; + sign = -1; + break; + default: + sign = 1; + break; + } + + // read digits + value = 0; + c = string[0]; + if ( c != '.' ) { + do { + c = *string++; + if ( c < '0' || c > '9' ) { + break; + } + c -= '0'; + value = value * 10 + c; + } while ( 1 ); + } else { + string++; + } + + // check for decimal point + if ( c == '.' ) { + double fraction; + + fraction = 0.1; + do { + c = *string++; + if ( c < '0' || c > '9' ) { + break; + } + c -= '0'; + value += c * fraction; + fraction *= 0.1; + } while ( 1 ); + + } + + // not handling 10e10 notation... + + return value * sign; +} + +double _atof( const char **stringPtr ) { + const char *string; + float sign; + float value; + int c = '0'; // bk001211 - uninitialized use possible + + string = *stringPtr; + + // skip whitespace + while ( *string <= ' ' ) { + if ( !*string ) { + *stringPtr = string; + return 0; + } + string++; + } + + // check sign + switch ( *string ) { + case '+': + string++; + sign = 1; + break; + case '-': + string++; + sign = -1; + break; + default: + sign = 1; + break; + } + + // read digits + value = 0; + if ( string[0] != '.' ) { + do { + c = *string++; + if ( c < '0' || c > '9' ) { + break; + } + c -= '0'; + value = value * 10 + c; + } while ( 1 ); + } + + // check for decimal point + if ( c == '.' ) { + double fraction; + + fraction = 0.1; + do { + c = *string++; + if ( c < '0' || c > '9' ) { + break; + } + c -= '0'; + value += c * fraction; + fraction *= 0.1; + } while ( 1 ); + + } + + // not handling 10e10 notation... + *stringPtr = string; + + return value * sign; +} + + +// bk001120 - presumably needed for Mac +//#if !defined ( _MSC_VER ) && ! defined ( __linux__ ) + +// bk001127 - undid undo +#if defined ( Q3_VM ) +int atoi( const char *string ) { + int sign; + int value; + int c; + + + // skip whitespace + while ( *string <= ' ' ) { + if ( !*string ) { + return 0; + } + string++; + } + + // check sign + switch ( *string ) { + case '+': + string++; + sign = 1; + break; + case '-': + string++; + sign = -1; + break; + default: + sign = 1; + break; + } + + // read digits + value = 0; + do { + c = *string++; + if ( c < '0' || c > '9' ) { + break; + } + c -= '0'; + value = value * 10 + c; + } while ( 1 ); + + // not handling 10e10 notation... + + return value * sign; +} + + +int _atoi( const char **stringPtr ) { + int sign; + int value; + int c; + const char *string; + + string = *stringPtr; + + // skip whitespace + while ( *string <= ' ' ) { + if ( !*string ) { + return 0; + } + string++; + } + + // check sign + switch ( *string ) { + case '+': + string++; + sign = 1; + break; + case '-': + string++; + sign = -1; + break; + default: + sign = 1; + break; + } + + // read digits + value = 0; + do { + c = *string++; + if ( c < '0' || c > '9' ) { + break; + } + c -= '0'; + value = value * 10 + c; + } while ( 1 ); + + // not handling 10e10 notation... + + *stringPtr = string; + + return value * sign; +} + +int abs( int n ) { + return n < 0 ? -n : n; +} + +double fabs( double x ) { + return x < 0 ? -x : x; +} + + + +//========================================================= + + +#define ALT 0x00000001 /* alternate form */ +#define HEXPREFIX 0x00000002 /* add 0x or 0X prefix */ +#define LADJUST 0x00000004 /* left adjustment */ +#define LONGDBL 0x00000008 /* long double */ +#define LONGINT 0x00000010 /* long integer */ +#define QUADINT 0x00000020 /* quad integer */ +#define SHORTINT 0x00000040 /* short integer */ +#define ZEROPAD 0x00000080 /* zero (as opposed to blank) pad */ +#define FPT 0x00000100 /* floating point number */ + +#define to_digit(c) ((c) - '0') +#define is_digit(c) ((unsigned)to_digit(c) <= 9) +#define to_char(n) ((n) + '0') + +void AddInt( char **buf_p, int val, int width, int flags ) { + char text[32]; + int digits; + int signedVal; + char *buf; + + digits = 0; + signedVal = val; + if ( val < 0 ) { + val = -val; + } + do { + text[digits++] = '0' + val % 10; + val /= 10; + } while ( val ); + + if ( signedVal < 0 ) { + text[digits++] = '-'; + } + + buf = *buf_p; + + if( !( flags & LADJUST ) ) { + while ( digits < width ) { + *buf++ = ( flags & ZEROPAD ) ? '0' : ' '; + width--; + } + } + + while ( digits-- ) { + *buf++ = text[digits]; + width--; + } + + if( flags & LADJUST ) { + while ( width-- ) { + *buf++ = ( flags & ZEROPAD ) ? '0' : ' '; + } + } + + *buf_p = buf; +} + +void AddFloat( char **buf_p, float fval, int width, int prec ) { + char text[32]; + int digits; + float signedVal; + char *buf; + int val; + + // get the sign + signedVal = fval; + if ( fval < 0 ) { + fval = -fval; + } + + // write the float number + digits = 0; + val = (int)fval; + do { + text[digits++] = '0' + val % 10; + val /= 10; + } while ( val ); + + if ( signedVal < 0 ) { + text[digits++] = '-'; + } + + buf = *buf_p; + + while ( digits < width ) { + *buf++ = ' '; + width--; + } + + while ( digits-- ) { + *buf++ = text[digits]; + } + + *buf_p = buf; + + if (prec < 0) + prec = 6; + // write the fraction + digits = 0; + while (digits < prec) { + fval -= (int) fval; + fval *= 10.0; + val = (int) fval; + text[digits++] = '0' + val % 10; + } + + if (digits > 0) { + buf = *buf_p; + *buf++ = '.'; + for (prec = 0; prec < digits; prec++) { + *buf++ = text[prec]; + } + *buf_p = buf; + } +} + + +void AddString( char **buf_p, char *string, int width, int prec ) { + int size; + char *buf; + + buf = *buf_p; + + if ( string == NULL ) { + string = "(null)"; + prec = -1; + } + + if ( prec >= 0 ) { + for( size = 0; size < prec; size++ ) { + if( string[size] == '\0' ) { + break; + } + } + } + else { + size = strlen( string ); + } + + width -= size; + + while( size-- ) { + *buf++ = *string++; + } + + while( width-- > 0 ) { + *buf++ = ' '; + } + + *buf_p = buf; +} + +/* +vsprintf + +I'm not going to support a bunch of the more arcane stuff in here +just to keep it simpler. For example, the '*' and '$' are not +currently supported. I've tried to make it so that it will just +parse and ignore formats we don't support. +*/ +int vsprintf( char *buffer, const char *fmt, va_list argptr ) { + int *arg; + char *buf_p; + char ch; + int flags; + int width; + int prec; + int n; + char sign; + + buf_p = buffer; + arg = (int *)argptr; + + while( qtrue ) { + // run through the format string until we hit a '%' or '\0' + for ( ch = *fmt; (ch = *fmt) != '\0' && ch != '%'; fmt++ ) { + *buf_p++ = ch; + } + if ( ch == '\0' ) { + goto done; + } + + // skip over the '%' + fmt++; + + // reset formatting state + flags = 0; + width = 0; + prec = -1; + sign = '\0'; + +rflag: + ch = *fmt++; +reswitch: + switch( ch ) { + case '-': + flags |= LADJUST; + goto rflag; + case '.': + n = 0; + while( is_digit( ( ch = *fmt++ ) ) ) { + n = 10 * n + ( ch - '0' ); + } + prec = n < 0 ? -1 : n; + goto reswitch; + case '0': + flags |= ZEROPAD; + goto rflag; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + n = 0; + do { + n = 10 * n + ( ch - '0' ); + ch = *fmt++; + } while( is_digit( ch ) ); + width = n; + goto reswitch; + case 'c': + *buf_p++ = (char)*arg; + arg++; + break; + case 'd': + case 'i': + AddInt( &buf_p, *arg, width, flags ); + arg++; + break; + case 'f': + AddFloat( &buf_p, *(double *)arg, width, prec ); +#ifdef __LCC__ + arg += 1; // everything is 32 bit in my compiler +#else + arg += 2; +#endif + break; + case 's': + AddString( &buf_p, (char *)*arg, width, prec ); + arg++; + break; + case '%': + *buf_p++ = ch; + break; + default: + *buf_p++ = (char)*arg; + arg++; + break; + } + } + +done: + *buf_p = 0; + return buf_p - buffer; +} + + +/* this is really crappy */ +int sscanf( const char *buffer, const char *fmt, ... ) { + int cmd; + int **arg; + int count; + + arg = (int **)&fmt + 1; + count = 0; + + while ( *fmt ) { + if ( fmt[0] != '%' ) { + fmt++; + continue; + } + + cmd = fmt[1]; + fmt += 2; + + switch ( cmd ) { + case 'i': + case 'd': + case 'u': + **arg = _atoi( &buffer ); + break; + case 'f': + *(float *)*arg = _atof( &buffer ); + break; + } + arg++; + } + + return count; +} + +#endif diff --git a/code/game/bg_lib.h b/code/game/bg_lib.h new file mode 100644 index 0000000..7e1d089 --- /dev/null +++ b/code/game/bg_lib.h @@ -0,0 +1,70 @@ +// bg_lib.h -- standard C library replacement routines used by code +// compiled for the virtual machine + +// This file is NOT included on native builds + +typedef int size_t; + +typedef char * va_list; +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) +#define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) ) +#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) +#define va_end(ap) ( ap = (va_list)0 ) + +#define CHAR_BIT 8 /* number of bits in a char */ +#define SCHAR_MIN (-128) /* minimum signed char value */ +#define SCHAR_MAX 127 /* maximum signed char value */ +#define UCHAR_MAX 0xff /* maximum unsigned char value */ + +#define SHRT_MIN (-32768) /* minimum (signed) short value */ +#define SHRT_MAX 32767 /* maximum (signed) short value */ +#define USHRT_MAX 0xffff /* maximum unsigned short value */ +#define INT_MIN (-2147483647 - 1) /* minimum (signed) int value */ +#define INT_MAX 2147483647 /* maximum (signed) int value */ +#define UINT_MAX 0xffffffff /* maximum unsigned int value */ +#define LONG_MIN (-2147483647L - 1) /* minimum (signed) long value */ +#define LONG_MAX 2147483647L /* maximum (signed) long value */ +#define ULONG_MAX 0xffffffffUL /* maximum unsigned long value */ + +// Misc functions +typedef int cmp_t(const void *, const void *); +void qsort(void *a, size_t n, size_t es, cmp_t *cmp); +void srand( unsigned seed ); +int rand( void ); + +// String functions +size_t strlen( const char *string ); +char *strcat( char *strDestination, const char *strSource ); +char *strcpy( char *strDestination, const char *strSource ); +int strcmp( const char *string1, const char *string2 ); +char *strchr( const char *string, int c ); +char *strstr( const char *string, const char *strCharSet ); +char *strncpy( char *strDest, const char *strSource, size_t count ); +int tolower( int c ); +int toupper( int c ); + +double atof( const char *string ); +double _atof( const char **stringPtr ); +int atoi( const char *string ); +int _atoi( const char **stringPtr ); + +int vsprintf( char *buffer, const char *fmt, va_list argptr ); +int sscanf( const char *buffer, const char *fmt, ... ); + +// Memory functions +void *memmove( void *dest, const void *src, size_t count ); +void *memset( void *dest, int c, size_t count ); +void *memcpy( void *dest, const void *src, size_t count ); + +// Math functions +double ceil( double x ); +double floor( double x ); +double sqrt( double x ); +double sin( double x ); +double cos( double x ); +double atan2( double y, double x ); +double tan( double x ); +int abs( int n ); +double fabs( double x ); +double acos( double x ); + diff --git a/code/game/bg_local.h b/code/game/bg_local.h new file mode 100644 index 0000000..3c50ad0 --- /dev/null +++ b/code/game/bg_local.h @@ -0,0 +1,104 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// bg_local.h -- local definitions for the bg (both games) files + +#define MIN_WALK_NORMAL 0.7f // can't walk on very steep slopes + +#define STEPSIZE 18 + +#define TIMER_LAND 130 +#define TIMER_GESTURE (34*66+50) + +#define OVERCLIP 1.001f + +// all of the locals will be zeroed before each +// pmove, just to make damn sure we don't have +// any differences when running on client or server +typedef struct +{ + vec3_t forward, right, up; + float frametime; + + int msec; + + qboolean walking; + qboolean groundPlane; + trace_t groundTrace; + + float impactSpeed; + + vec3_t previous_origin; + vec3_t previous_velocity; + int previous_waterlevel; +} pml_t; + +extern pml_t pml; + +// movement parameters +extern float pm_stopspeed; +extern float pm_duckScale; +extern float pm_swimScale; +extern float pm_wadeScale; + +extern float pm_accelerate; +extern float pm_airaccelerate; +extern float pm_wateraccelerate; +extern float pm_flyaccelerate; + +extern float pm_friction; +extern float pm_waterfriction; +extern float pm_flightfriction; + +extern int c_pmove; + +extern int forcePowerNeeded[NUM_FORCE_POWER_LEVELS][NUM_FORCE_POWERS]; + +// Had to add these here because there was no file access within the BG right now. +int trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode ); +void trap_FS_Read( void *buffer, int len, fileHandle_t f ); +void trap_FS_Write( const void *buffer, int len, fileHandle_t f ); +void trap_FS_FCloseFile( fileHandle_t f ); + +//PM anim utility functions: +qboolean PM_SaberInParry( int move ); +qboolean PM_SaberInKnockaway( int move ); +qboolean PM_SaberInReflect( int move ); +qboolean PM_SaberInStart( int move ); +qboolean PM_InSaberAnim( int anim ); +qboolean PM_InKnockDown( playerState_t *ps ); +qboolean PM_PainAnim( int anim ); +qboolean PM_JumpingAnim( int anim ); +qboolean PM_LandingAnim( int anim ); +qboolean PM_SpinningAnim( int anim ); +qboolean PM_InOnGroundAnim ( int anim ); +qboolean PM_InRollComplete( playerState_t *ps, int anim ); +int PM_AnimLength( int index, animNumber_t anim ); + +int PM_GetSaberStance(void); +float PM_GroundDistance(void); +qboolean PM_SomeoneInFront(trace_t *tr); +saberMoveName_t PM_SaberFlipOverAttackMove(trace_t *tr); +saberMoveName_t PM_SaberJumpAttackMove( void ); + +void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, float overbounce ); +void PM_AddTouchEnt( int entityNum ); +void PM_AddEvent( int newEvent ); + +qboolean PM_SlideMove( qboolean gravity ); +void PM_StepSlideMove( qboolean gravity ); + +void BG_CycleInven(playerState_t *ps, int direction); + +void PM_StartTorsoAnim( int anim ); +void PM_ContinueLegsAnim( int anim ); +void PM_ForceLegsAnim( int anim ); + +void PM_BeginWeaponChange( int weapon ); +void PM_FinishWeaponChange( void ); + +void PM_SetAnim(int setAnimParts,int anim,int setAnimFlags, int blendTime); + +void PM_WeaponLightsaber(void); +void PM_SetSaberMove(short newMove); + +void PM_SetForceJumpZStart(float value); diff --git a/code/game/bg_misc.c b/code/game/bg_misc.c new file mode 100644 index 0000000..833fc22 --- /dev/null +++ b/code/game/bg_misc.c @@ -0,0 +1,2403 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// bg_misc.c -- both games misc functions, all completely stateless + +#include "q_shared.h" +#include "bg_public.h" + +#ifdef QAGAME +#include "g_local.h" +#endif + +#ifdef UI_EXPORTS +#include "../ui/ui_local.h" +#endif + +#ifndef UI_EXPORTS +#ifndef QAGAME +#include "../cgame/cg_local.h" +#endif +#endif + +//rww - not putting @ in front of these because +//we don't need them in a cgame striped lookup. +//Let me know if this causes problems, pat. +char *forceMasteryLevels[NUM_FORCE_MASTERY_LEVELS] = +{ + "MASTERY0", //"Uninitiated", // FORCE_MASTERY_UNINITIATED, + "MASTERY1", //"Initiate", // FORCE_MASTERY_INITIATE, + "MASTERY2", //"Padawan", // FORCE_MASTERY_PADAWAN, + "MASTERY3", //"Jedi", // FORCE_MASTERY_JEDI, + "MASTERY4", //"Jedi Adept", // FORCE_MASTERY_JEDI_GUARDIAN, + "MASTERY5", //"Jedi Guardian", // FORCE_MASTERY_JEDI_ADEPT, + "MASTERY6", //"Jedi Knight", // FORCE_MASTERY_JEDI_KNIGHT, + "MASTERY7", //"Jedi Master" // FORCE_MASTERY_JEDI_MASTER, +}; + +int forceMasteryPoints[NUM_FORCE_MASTERY_LEVELS] = +{ + 0, // FORCE_MASTERY_UNINITIATED, + 5, // FORCE_MASTERY_INITIATE, + 10, // FORCE_MASTERY_PADAWAN, + 20, // FORCE_MASTERY_JEDI, + 30, // FORCE_MASTERY_JEDI_GUARDIAN, + 50, // FORCE_MASTERY_JEDI_ADEPT, + 75, // FORCE_MASTERY_JEDI_KNIGHT, + 100 // FORCE_MASTERY_JEDI_MASTER, +}; + +int bgForcePowerCost[NUM_FORCE_POWERS][NUM_FORCE_POWER_LEVELS] = //0 == neutral +{ + { 0, 2, 4, 6 }, // Heal // FP_HEAL + { 0, 0, 2, 6 }, // Jump //FP_LEVITATION,//hold/duration + { 0, 2, 4, 6 }, // Speed //FP_SPEED,//duration + { 0, 1, 3, 6 }, // Push //FP_PUSH,//hold/duration + { 0, 1, 3, 6 }, // Pull //FP_PULL,//hold/duration + { 0, 4, 6, 8 }, // Mind Trick //FP_TELEPATHY,//instant + { 0, 1, 3, 6 }, // Grip //FP_GRIP,//hold/duration + { 0, 2, 5, 8 }, // Lightning //FP_LIGHTNING,//hold/duration + { 0, 4, 6, 8 }, // Dark Rage //FP_RAGE,//duration + { 0, 2, 5, 8 }, // Protection //FP_PROTECT,//duration + { 0, 1, 3, 6 }, // Absorb //FP_ABSORB,//duration + { 0, 1, 3, 6 }, // Team Heal //FP_TEAM_HEAL,//instant + { 0, 1, 3, 6 }, // Team Force //FP_TEAM_FORCE,//instant + { 0, 2, 4, 6 }, // Drain //FP_DRAIN,//hold/duration + { 0, 2, 5, 8 }, // Sight //FP_SEE,//duration + { 0, 1, 5, 8 }, // Saber Attack //FP_SABERATTACK, + { 0, 1, 5, 8 }, // Saber Defend //FP_SABERDEFEND, + { 0, 4, 6, 8 } // Saber Throw //FP_SABERTHROW, + //NUM_FORCE_POWERS +}; + +int forcePowerSorted[NUM_FORCE_POWERS] = +{ //rww - always use this order when drawing force powers for any reason + FP_TELEPATHY, + FP_HEAL, + FP_ABSORB, + FP_PROTECT, + FP_TEAM_HEAL, + FP_LEVITATION, + FP_SPEED, + FP_PUSH, + FP_PULL, + FP_SEE, + FP_LIGHTNING, + FP_DRAIN, + FP_RAGE, + FP_GRIP, + FP_TEAM_FORCE, + FP_SABERATTACK, + FP_SABERDEFEND, + FP_SABERTHROW +}; + +int forcePowerDarkLight[NUM_FORCE_POWERS] = //0 == neutral +{ //nothing should be usable at rank 0.. + FORCE_LIGHTSIDE,//FP_HEAL,//instant + 0,//FP_LEVITATION,//hold/duration + 0,//FP_SPEED,//duration + 0,//FP_PUSH,//hold/duration + 0,//FP_PULL,//hold/duration + FORCE_LIGHTSIDE,//FP_TELEPATHY,//instant + FORCE_DARKSIDE,//FP_GRIP,//hold/duration + FORCE_DARKSIDE,//FP_LIGHTNING,//hold/duration + FORCE_DARKSIDE,//FP_RAGE,//duration + FORCE_LIGHTSIDE,//FP_PROTECT,//duration + FORCE_LIGHTSIDE,//FP_ABSORB,//duration + FORCE_LIGHTSIDE,//FP_TEAM_HEAL,//instant + FORCE_DARKSIDE,//FP_TEAM_FORCE,//instant + FORCE_DARKSIDE,//FP_DRAIN,//hold/duration + 0,//FP_SEE,//duration + 0,//FP_SABERATTACK, + 0,//FP_SABERDEFEND, + 0//FP_SABERTHROW, + //NUM_FORCE_POWERS +}; + +int WeaponReadyAnim[WP_NUM_WEAPONS] = +{ + TORSO_DROPWEAP1,//WP_NONE, + + TORSO_WEAPONREADY3,//WP_STUN_BATON, + BOTH_STAND2,//WP_SABER, + TORSO_WEAPONREADY2,//WP_BRYAR_PISTOL, + TORSO_WEAPONREADY3,//WP_BLASTER, + TORSO_WEAPONREADY3,//TORSO_WEAPONREADY4,//WP_DISRUPTOR, + TORSO_WEAPONREADY3,//TORSO_WEAPONREADY5,//WP_BOWCASTER, + TORSO_WEAPONREADY3,//TORSO_WEAPONREADY6,//WP_REPEATER, + TORSO_WEAPONREADY3,//TORSO_WEAPONREADY7,//WP_DEMP2, + TORSO_WEAPONREADY3,//TORSO_WEAPONREADY8,//WP_FLECHETTE, + TORSO_WEAPONREADY3,//TORSO_WEAPONREADY9,//WP_ROCKET_LAUNCHER, + TORSO_WEAPONREADY10,//WP_THERMAL, + TORSO_WEAPONREADY10,//TORSO_WEAPONREADY11,//WP_TRIP_MINE, + TORSO_WEAPONREADY10,//TORSO_WEAPONREADY12,//WP_DET_PACK, + + //NOT VALID (e.g. should never really be used): + BOTH_STAND1,//WP_EMPLACED_GUN, + TORSO_WEAPONREADY1//WP_TURRET, +}; + +int WeaponAttackAnim[WP_NUM_WEAPONS] = +{ + BOTH_ATTACK1,//WP_NONE, //(shouldn't happen) + + BOTH_ATTACK3,//WP_STUN_BATON, + BOTH_STAND2,//WP_SABER, //(has its own handling) + BOTH_ATTACK2,//WP_BRYAR_PISTOL, + BOTH_ATTACK3,//WP_BLASTER, + BOTH_ATTACK3,//BOTH_ATTACK4,//WP_DISRUPTOR, + BOTH_ATTACK3,//BOTH_ATTACK5,//WP_BOWCASTER, + BOTH_ATTACK3,//BOTH_ATTACK6,//WP_REPEATER, + BOTH_ATTACK3,//BOTH_ATTACK7,//WP_DEMP2, + BOTH_ATTACK3,//BOTH_ATTACK8,//WP_FLECHETTE, + BOTH_ATTACK3,//BOTH_ATTACK9,//WP_ROCKET_LAUNCHER, + BOTH_THERMAL_THROW,//WP_THERMAL, + BOTH_ATTACK3,//BOTH_ATTACK11,//WP_TRIP_MINE, + BOTH_ATTACK3,//BOTH_ATTACK12,//WP_DET_PACK, + + //NOT VALID (e.g. should never really be used): + BOTH_STAND1,//WP_EMPLACED_GUN, + BOTH_ATTACK1//WP_TURRET, +}; + + +/* +================ +BG_LegalizedForcePowers + +The magical function to end all functions. +This will take the force power string in powerOut and parse through it, then legalize +it based on the supposed rank and spit it into powerOut, returning true if it was legal +to begin with and false if not. +fpDisabled is actually only expected (needed) from the server, because the ui disables +force power selection anyway when force powers are disabled on the server. +================ +*/ +qboolean BG_LegalizedForcePowers(char *powerOut, int maxRank, qboolean freeSaber, int teamForce, int gametype, int fpDisabled) +{ + char powerBuf[128]; + char readBuf[128]; + qboolean maintainsValidity = qtrue; + int powerLen = strlen(powerOut); + int i = 0; + int c = 0; + int allowedPoints = 0; + int usedPoints = 0; + int countDown = 0; + + int final_Side; + int final_Powers[NUM_FORCE_POWERS]; + + if (powerLen >= 128) + { //This should not happen. If it does, this is obviously a bogus string. + //They can have this string. Because I said so. + strcpy(powerBuf, "7-1-032330000000001333"); + maintainsValidity = qfalse; + } + else + { + strcpy(powerBuf, powerOut); //copy it as the original + } + + //first of all, print the max rank into the string as the rank + strcpy(powerOut, va("%i-", maxRank)); + + while (i < 128 && powerBuf[i] && powerBuf[i] != '-') + { + i++; + } + i++; + while (i < 128 && powerBuf[i] && powerBuf[i] != '-') + { + readBuf[c] = powerBuf[i]; + c++; + i++; + } + readBuf[c] = 0; + i++; + //at this point, readBuf contains the intended side + final_Side = atoi(readBuf); + + if (final_Side != FORCE_LIGHTSIDE && + final_Side != FORCE_DARKSIDE) + { //Not a valid side. You will be dark. Because I said so. (this is something that should never actually happen unless you purposely feed in an invalid config) + final_Side = FORCE_DARKSIDE; + maintainsValidity = qfalse; + } + + if (teamForce) + { //If we are under force-aligned teams, make sure we're on the right side. + if (final_Side != teamForce) + { + final_Side = teamForce; + //maintainsValidity = qfalse; + //Not doing this, for now. Let them join the team with their filtered powers. + } + } + + //Now we have established a valid rank, and a valid side. + //Read the force powers in, and cut them down based on the various rules supplied. + c = 0; + while (i < 128 && powerBuf[i] && powerBuf[i] != '\n' && c < NUM_FORCE_POWERS) + { + readBuf[0] = powerBuf[i]; + readBuf[1] = 0; + final_Powers[c] = atoi(readBuf); + c++; + i++; + } + + //final_Powers now contains all the stuff from the string + //Set the maximum allowed points used based on the max rank level, and count the points actually used. + allowedPoints = forceMasteryPoints[maxRank]; + + i = 0; + while (i < NUM_FORCE_POWERS) + { //if this power doesn't match the side we're on, then 0 it now. + if (final_Powers[i] && + forcePowerDarkLight[i] && + forcePowerDarkLight[i] != final_Side) + { + final_Powers[i] = 0; + //This is only likely to happen with g_forceBasedTeams. Let it slide. + } + + if ( final_Powers[i] && + (fpDisabled & (1 << i)) ) + { //if this power is disabled on the server via said server option, then we don't get it. + final_Powers[i] = 0; + } + + i++; + } + + if (gametype < GT_TEAM) + { //don't bother with team powers then + final_Powers[FP_TEAM_HEAL] = 0; + final_Powers[FP_TEAM_FORCE] = 0; + } + + usedPoints = 0; + i = 0; + while (i < NUM_FORCE_POWERS) + { + countDown = 0; + + countDown = final_Powers[i]; + + while (countDown > 0) + { + usedPoints += bgForcePowerCost[i][countDown]; //[fp index][fp level] + //if this is jump, or we have a free saber and it's offense or defense, take the level back down on level 1 + if ( countDown == 1 && + ((i == FP_LEVITATION) || + (i == FP_SABERATTACK && freeSaber) || + (i == FP_SABERDEFEND && freeSaber)) ) + { + usedPoints -= bgForcePowerCost[i][countDown]; + } + countDown--; + } + + i++; + } + + if (usedPoints > allowedPoints) + { //Time to do the fancy stuff. (meaning, slowly cut parts off while taking a guess at what is most or least important in the config) + int attemptedCycles = 0; + int powerCycle = 2; + int minPow = 0; + + if (freeSaber) + { + minPow = 1; + } + + maintainsValidity = qfalse; + + while (usedPoints > allowedPoints) + { + c = 0; + + while (c < NUM_FORCE_POWERS && usedPoints > allowedPoints) + { + if (final_Powers[c] && final_Powers[c] < powerCycle) + { //kill in order of lowest powers, because the higher powers are probably more important + if (c == FP_SABERATTACK && + (final_Powers[FP_SABERDEFEND] > minPow || final_Powers[FP_SABERTHROW] > 0)) + { //if we're on saber attack, only suck it down if we have no def or throw either + int whichOne = FP_SABERTHROW; //first try throw + + if (!final_Powers[whichOne]) + { + whichOne = FP_SABERDEFEND; //if no throw, drain defense + } + + while (final_Powers[whichOne] > 0 && usedPoints > allowedPoints) + { + if ( final_Powers[whichOne] > 1 || + ( (whichOne != FP_SABERATTACK || !freeSaber) && + (whichOne != FP_SABERDEFEND || !freeSaber) ) ) + { //don't take attack or defend down on level 1 still, if it's free + usedPoints -= bgForcePowerCost[whichOne][final_Powers[whichOne]]; + final_Powers[whichOne]--; + } + else + { + break; + } + } + } + else + { + while (final_Powers[c] > 0 && usedPoints > allowedPoints) + { + if ( final_Powers[c] > 1 || + ((c != FP_LEVITATION) && + (c != FP_SABERATTACK || !freeSaber) && + (c != FP_SABERDEFEND || !freeSaber)) ) + { + usedPoints -= bgForcePowerCost[c][final_Powers[c]]; + final_Powers[c]--; + } + else + { + break; + } + } + } + } + + c++; + } + + powerCycle++; + attemptedCycles++; + + if (attemptedCycles > NUM_FORCE_POWERS) + { //I think this should be impossible. But just in case. + break; + } + } + + if (usedPoints > allowedPoints) + { //Still? Fine then.. we will kill all of your powers, except the freebies. + i = 0; + + while (i < NUM_FORCE_POWERS) + { + final_Powers[i] = 0; + if (i == FP_LEVITATION || + (i == FP_SABERATTACK && freeSaber) || + (i == FP_SABERDEFEND && freeSaber)) + { + final_Powers[i] = 1; + } + i++; + } + usedPoints = 0; + } + } + + if (freeSaber) + { + if (final_Powers[FP_SABERATTACK] < 1) + { + final_Powers[FP_SABERATTACK] = 1; + } + if (final_Powers[FP_SABERDEFEND] < 1) + { + final_Powers[FP_SABERDEFEND] = 1; + } + } + if (final_Powers[FP_LEVITATION] < 1) + { + final_Powers[FP_LEVITATION] = 1; + } + + if (fpDisabled) + { //If we specifically have attack or def disabled, force them up to level 3. It's the way + //things work for the case of all powers disabled. + //If jump is disabled, down-cap it to level 1. Otherwise don't do a thing. + if (fpDisabled & (1 << FP_LEVITATION)) + { + final_Powers[FP_LEVITATION] = 1; + } + if (fpDisabled & (1 << FP_SABERATTACK)) + { + final_Powers[FP_SABERATTACK] = 3; + } + if (fpDisabled & (1 << FP_SABERDEFEND)) + { + final_Powers[FP_SABERDEFEND] = 3; + } + } + + if (final_Powers[FP_SABERATTACK] < 1) + { + final_Powers[FP_SABERDEFEND] = 0; + final_Powers[FP_SABERTHROW] = 0; + } + + //We finally have all the force powers legalized and stored locally. + //Put them all into the string and return the result. We already have + //the rank there, so print the side and the powers now. + Q_strcat(powerOut, 128, va("%i-", final_Side)); + + i = strlen(powerOut); + c = 0; + while (c < NUM_FORCE_POWERS) + { + strcpy(readBuf, va("%i", final_Powers[c])); + powerOut[i] = readBuf[0]; + c++; + i++; + } + powerOut[i] = 0; + + return maintainsValidity; +} + +/*QUAKED item_***** ( 0 0 0 ) (-16 -16 -16) (16 16 16) suspended +DO NOT USE THIS CLASS, IT JUST HOLDS GENERAL INFORMATION. +The suspended flag will allow items to hang in the air, otherwise they are dropped to the next surface. + +If an item is the target of another entity, it will not spawn in until fired. + +An item fires all of its targets when it is picked up. If the toucher can't carry it, the targets won't be fired. + +"notfree" if set to 1, don't spawn in free for all games +"notteam" if set to 1, don't spawn in team games +"notsingle" if set to 1, don't spawn in single player games +"wait" override the default wait before respawning. -1 = never respawn automatically, which can be used with targeted spawning. +"random" random number of plus or minus seconds varied from the respawn time +"count" override quantity or duration on most items. +*/ + +/*QUAKED misc_shield_floor_unit (1 0 0) (-16 -16 0) (16 16 40) +#MODELNAME="/models/items/a_shield_converter.md3" +Gives shield energy when used. + +"count" - max charge value (default 50) +"chargerate" - rechage 1 point every this many milliseconds (default 3000) +*/ + +gitem_t bg_itemlist[] = +{ + { + NULL, // classname + NULL, // pickup_sound + { NULL, // world_model[0] + NULL, // world_model[1] + 0, 0} , // world_model[2],[3] + NULL, // view_model +/* icon */ NULL, // icon +/* pickup */ //NULL, // pickup_name + 0, // quantity + 0, // giType (IT_*) + 0, // giTag +/* precache */ "", // precaches +/* sounds */ "" // sounds + }, // leave index 0 alone + + // + // Pickups + // + +/*QUAKED item_shield_sm_instant (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Instant shield pickup, restores 25 +*/ + { + "item_shield_sm_instant", + "sound/player/pickupshield.wav", + { "models/map_objects/mp/psd_sm.md3", + 0, 0, 0}, +/* view */ NULL, +/* icon */ "gfx/mp/small_shield", +/* pickup */// "Shield Small", + 25, + IT_ARMOR, + 1, //special for shield - max on pickup is maxhealth*tag, thus small shield goes up to 100 shield +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED item_shield_lrg_instant (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Instant shield pickup, restores 100 +*/ + { + "item_shield_lrg_instant", + "sound/player/pickupshield.wav", + { "models/map_objects/mp/psd.md3", + 0, 0, 0}, +/* view */ NULL, +/* icon */ "gfx/mp/large_shield", +/* pickup */// "Shield Large", + 100, + IT_ARMOR, + 2, //special for shield - max on pickup is maxhealth*tag, thus large shield goes up to 200 shield +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED item_medpak_instant (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Instant medpack pickup, heals 25 +*/ + { + "item_medpak_instant", + "sound/player/pickuphealth.wav", + { "models/map_objects/mp/medpac.md3", + 0, 0, 0 }, +/* view */ NULL, +/* icon */ "gfx/hud/i_icon_medkit", +/* pickup */// "Medpack", + 25, + IT_HEALTH, + 0, +/* precache */ "", +/* sounds */ "" + }, + + + // + // ITEMS + // + +/*QUAKED item_seeker (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +30 seconds of seeker drone +*/ + { + "item_seeker", + "sound/weapons/w_pkup.wav", + { "models/items/remote.md3", + 0, 0, 0} , +/* view */ NULL, +/* icon */ "gfx/hud/i_icon_seeker", +/* pickup */// "Seeker Drone", + 120, + IT_HOLDABLE, + HI_SEEKER, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED item_shield (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +Portable shield +*/ + { + "item_shield", + "sound/weapons/w_pkup.wav", + { "models/map_objects/mp/shield.md3", + 0, 0, 0} , +/* view */ NULL, +/* icon */ "gfx/hud/i_icon_shieldwall", +/* pickup */// "Forcefield", + 120, + IT_HOLDABLE, + HI_SHIELD, +/* precache */ "", +/* sounds */ "sound/weapons/detpack/stick.wav sound/movers/doors/forcefield_on.wav sound/movers/doors/forcefield_off.wav sound/movers/doors/forcefield_lp.wav sound/effects/bumpfield.wav", + }, + +/*QUAKED item_medpac (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +Bacta canister pickup, heals 25 on use +*/ + { + "item_medpac", //should be item_bacta + "sound/weapons/w_pkup.wav", + { "models/map_objects/mp/bacta.md3", + 0, 0, 0} , +/* view */ NULL, +/* icon */ "gfx/hud/i_icon_bacta", +/* pickup */// "Bacta Canister", + 25, + IT_HOLDABLE, + HI_MEDPAC, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED item_datapad (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +Do not place this. +*/ + { + "item_datapad", + "sound/weapons/w_pkup.wav", + { "models/items/datapad.md3", + 0, 0, 0} , +/* view */ NULL, +/* icon */ NULL, +/* pickup */// "Datapad", + 1, + IT_HOLDABLE, + HI_DATAPAD, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED item_binoculars (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +These will be standard equipment on the player - DO NOT PLACE +*/ + { + "item_binoculars", + "sound/weapons/w_pkup.wav", + { "models/items/binoculars.md3", + 0, 0, 0} , +/* view */ NULL, +/* icon */ "gfx/hud/i_icon_zoom", +/* pickup */// "Binoculars", + 60, + IT_HOLDABLE, + HI_BINOCULARS, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED item_sentry_gun (.3 .3 1) (-8 -8 -0) (8 8 16) suspended +Sentry gun inventory pickup. +*/ + { + "item_sentry_gun", + "sound/weapons/w_pkup.wav", + { "models/items/psgun.glm", + 0, 0, 0} , +/* view */ NULL, +/* icon */ "gfx/hud/i_icon_sentrygun", +/* pickup */// "Sentry Gun", + 120, + IT_HOLDABLE, + HI_SENTRY_GUN, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED item_force_enlighten_light (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Adds one rank to all Force powers temporarily. Only light jedi can use. +*/ + { + "item_force_enlighten_light", + "sound/player/enlightenment.wav", + { "models/map_objects/mp/jedi_enlightenment.md3", + 0, 0, 0} , +/* view */ NULL, +/* icon */ "gfx/hud/mpi_jlight", +/* pickup */// "Light Force Enlightenment", + 25, + IT_POWERUP, + PW_FORCE_ENLIGHTENED_LIGHT, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED item_force_enlighten_dark (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Adds one rank to all Force powers temporarily. Only dark jedi can use. +*/ + { + "item_force_enlighten_dark", + "sound/player/enlightenment.wav", + { "models/map_objects/mp/dk_enlightenment.md3", + 0, 0, 0} , +/* view */ NULL, +/* icon */ "gfx/hud/mpi_dklight", +/* pickup */// "Dark Force Enlightenment", + 25, + IT_POWERUP, + PW_FORCE_ENLIGHTENED_DARK, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED item_force_boon (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Unlimited Force Pool for a short time. +*/ + { + "item_force_boon", + "sound/player/boon.wav", + { "models/map_objects/mp/force_boon.md3", + 0, 0, 0} , +/* view */ NULL, +/* icon */ "gfx/hud/mpi_fboon", +/* pickup */// "Force Boon", + 25, + IT_POWERUP, + PW_FORCE_BOON, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED item_ysalimari (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +A small lizard carried on the player, which prevents the possessor from using any Force power. However, he is unaffected by any Force power. +*/ + { + "item_ysalimari", + "sound/player/ysalimari.wav", + { "models/map_objects/mp/ysalimari.md3", + 0, 0, 0} , +/* view */ NULL, +/* icon */ "gfx/hud/mpi_ysamari", +/* pickup */// "Ysalamiri", + 25, + IT_POWERUP, + PW_YSALAMIRI, +/* precache */ "", +/* sounds */ "" + }, + + // + // WEAPONS + // + +/*QUAKED weapon_stun_baton (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Don't place this +*/ + { + "weapon_stun_baton", + "sound/weapons/w_pkup.wav", + { "models/weapons2/stun_baton/baton_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/stun_baton/baton.md3", +/* icon */ "gfx/hud/w_icon_stunbaton", +/* pickup */// "Stun Baton", + 100, + IT_WEAPON, + WP_STUN_BATON, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_saber (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Don't place this +*/ + { + "weapon_saber", + "sound/weapons/w_pkup.wav", + { "models/weapons2/saber/saber_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/saber/saber_w.md3", +/* icon */ "gfx/hud/w_icon_lightsaber", +/* pickup */// "Lightsaber", + 100, + IT_WEAPON, + WP_SABER, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_bryar_pistol (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Don't place this +*/ + { + "weapon_bryar_pistol", + "sound/weapons/w_pkup.wav", + { "models/weapons2/briar_pistol/briar_pistol_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/briar_pistol/briar_pistol.md3", +/* icon */ "gfx/hud/w_icon_rifle", +/* pickup */// "Bryar Pistol", + 100, + IT_WEAPON, + WP_BRYAR_PISTOL, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_blaster (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "weapon_blaster", + "sound/weapons/w_pkup.wav", + { "models/weapons2/blaster_r/blaster_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/blaster_r/blaster.md3", +/* icon */ "gfx/hud/w_icon_blaster", +/* pickup */// "E11 Blaster Rifle", + 100, + IT_WEAPON, + WP_BLASTER, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_disruptor (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "weapon_disruptor", + "sound/weapons/w_pkup.wav", + { "models/weapons2/disruptor/disruptor_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/disruptor/disruptor.md3", +/* icon */ "gfx/hud/w_icon_disruptor", +/* pickup */// "Tenloss Disruptor Rifle", + 100, + IT_WEAPON, + WP_DISRUPTOR, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_bowcaster (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "weapon_bowcaster", + "sound/weapons/w_pkup.wav", + { "models/weapons2/bowcaster/bowcaster_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/bowcaster/bowcaster.md3", +/* icon */ "gfx/hud/w_icon_bowcaster", +/* pickup */// "Wookiee Bowcaster", + 100, + IT_WEAPON, + WP_BOWCASTER, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_repeater (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "weapon_repeater", + "sound/weapons/w_pkup.wav", + { "models/weapons2/heavy_repeater/heavy_repeater_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/heavy_repeater/heavy_repeater.md3", +/* icon */ "gfx/hud/w_icon_repeater", +/* pickup */// "Imperial Heavy Repeater", + 100, + IT_WEAPON, + WP_REPEATER, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_demp2 (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +NOTENOTE This weapon is not yet complete. Don't place it. +*/ + { + "weapon_demp2", + "sound/weapons/w_pkup.wav", + { "models/weapons2/demp2/demp2_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/demp2/demp2.md3", +/* icon */ "gfx/hud/w_icon_demp2", +/* pickup */// "DEMP2", + 100, + IT_WEAPON, + WP_DEMP2, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_flechette (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "weapon_flechette", + "sound/weapons/w_pkup.wav", + { "models/weapons2/golan_arms/golan_arms_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/golan_arms/golan_arms.md3", +/* icon */ "gfx/hud/w_icon_flechette", +/* pickup */// "Golan Arms Flechette", + 100, + IT_WEAPON, + WP_FLECHETTE, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_rocket_launcher (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "weapon_rocket_launcher", + "sound/weapons/w_pkup.wav", + { "models/weapons2/merr_sonn/merr_sonn_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/merr_sonn/merr_sonn.md3", +/* icon */ "gfx/hud/w_icon_merrsonn", +/* pickup */// "Merr-Sonn Missile System", + 3, + IT_WEAPON, + WP_ROCKET_LAUNCHER, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED ammo_thermal (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "ammo_thermal", + "sound/weapons/w_pkup.wav", + { "models/weapons2/thermal/thermal_pu.md3", + "models/weapons2/thermal/thermal_w.glm", 0, 0}, +/* view */ "models/weapons2/thermal/thermal.md3", +/* icon */ "gfx/hud/w_icon_thermal", +/* pickup */// "Thermal Detonators", + 4, + IT_AMMO, + AMMO_THERMAL, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED ammo_tripmine (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "ammo_tripmine", + "sound/weapons/w_pkup.wav", + { "models/weapons2/laser_trap/laser_trap_pu.md3", + "models/weapons2/laser_trap/laser_trap_w.glm", 0, 0}, +/* view */ "models/weapons2/laser_trap/laser_trap.md3", +/* icon */ "gfx/hud/w_icon_tripmine", +/* pickup */// "Trip Mines", + 3, + IT_AMMO, + AMMO_TRIPMINE, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED ammo_detpack (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "ammo_detpack", + "sound/weapons/w_pkup.wav", + { "models/weapons2/detpack/det_pack_pu.md3", "models/weapons2/detpack/det_pack_proj.glm", "models/weapons2/detpack/det_pack_w.glm", 0}, +/* view */ "models/weapons2/detpack/det_pack.md3", +/* icon */ "gfx/hud/w_icon_detpack", +/* pickup */// "Det Packs", + 3, + IT_AMMO, + AMMO_DETPACK, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_thermal (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "weapon_thermal", + "sound/weapons/w_pkup.wav", + { "models/weapons2/thermal/thermal_w.glm", "models/weapons2/thermal/thermal_pu.md3", + 0, 0 }, +/* view */ "models/weapons2/thermal/thermal.md3", +/* icon */ "gfx/hud/w_icon_thermal", +/* pickup */// "Thermal Detonator", + 4, + IT_WEAPON, + WP_THERMAL, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_trip_mine (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "weapon_trip_mine", + "sound/weapons/w_pkup.wav", + { "models/weapons2/laser_trap/laser_trap_w.glm", "models/weapons2/laser_trap/laser_trap_pu.md3", + 0, 0}, +/* view */ "models/weapons2/laser_trap/laser_trap.md3", +/* icon */ "gfx/hud/w_icon_tripmine", +/* pickup */// "Trip Mine", + 3, + IT_WEAPON, + WP_TRIP_MINE, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_det_pack (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "weapon_det_pack", + "sound/weapons/w_pkup.wav", + { "models/weapons2/detpack/det_pack_proj.glm", "models/weapons2/detpack/det_pack_pu.md3", "models/weapons2/detpack/det_pack_w.glm", 0}, +/* view */ "models/weapons2/detpack/det_pack.md3", +/* icon */ "gfx/hud/w_icon_detpack", +/* pickup */// "Det Pack", + 3, + IT_WEAPON, + WP_DET_PACK, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED weapon_emplaced (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +*/ + { + "weapon_emplaced", + "sound/weapons/w_pkup.wav", + { "models/weapons2/blaster_r/blaster_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/blaster_r/blaster.md3", +/* icon */ "gfx/hud/w_icon_blaster", +/* pickup */// "Emplaced Gun", + 50, + IT_WEAPON, + WP_EMPLACED_GUN, +/* precache */ "", +/* sounds */ "" + }, + + +//NOTE: This is to keep things from messing up because the turret weapon type isn't real + { + "weapon_turretwp", + "sound/weapons/w_pkup.wav", + { "models/weapons2/blaster_r/blaster_w.glm", + 0, 0, 0}, +/* view */ "models/weapons2/blaster_r/blaster.md3", +/* icon */ "gfx/hud/w_icon_blaster", +/* pickup */// "Turret Gun", + 50, + IT_WEAPON, + WP_TURRET, +/* precache */ "", +/* sounds */ "" + }, + + // + // AMMO ITEMS + // + +/*QUAKED ammo_force (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Don't place this +*/ + { + "ammo_force", + "sound/player/pickupenergy.wav", + { "models/items/energy_cell.md3", + 0, 0, 0}, +/* view */ NULL, +/* icon */ "gfx/hud/w_icon_blaster", +/* pickup */// "Force??", + 100, + IT_AMMO, + AMMO_FORCE, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED ammo_blaster (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Ammo for the Bryar and Blaster pistols. +*/ + { + "ammo_blaster", + "sound/player/pickupenergy.wav", + { "models/items/energy_cell.md3", + 0, 0, 0}, +/* view */ NULL, +/* icon */ "gfx/hud/i_icon_battery", +/* pickup */// "Blaster Pack", + 100, + IT_AMMO, + AMMO_BLASTER, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED ammo_powercell (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Ammo for Tenloss Disruptor, Wookie Bowcaster, and the Destructive Electro Magnetic Pulse (demp2 ) guns +*/ + { + "ammo_powercell", + "sound/player/pickupenergy.wav", + { "models/items/power_cell.md3", + 0, 0, 0}, +/* view */ NULL, +/* icon */ "gfx/mp/ammo_power_cell", +/* pickup */// "Power Cell", + 100, + IT_AMMO, + AMMO_POWERCELL, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED ammo_metallic_bolts (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Ammo for Imperial Heavy Repeater and the Golan Arms Flechette +*/ + { + "ammo_metallic_bolts", + "sound/player/pickupenergy.wav", + { "models/items/metallic_bolts.md3", + 0, 0, 0}, +/* view */ NULL, +/* icon */ "gfx/mp/ammo_metallic_bolts", +/* pickup */// "Metallic Bolts", + 100, + IT_AMMO, + AMMO_METAL_BOLTS, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED ammo_rockets (.3 .3 1) (-16 -16 -16) (16 16 16) suspended +Ammo for Merr-Sonn portable missile launcher +*/ + { + "ammo_rockets", + "sound/player/pickupenergy.wav", + { "models/items/rockets.md3", + 0, 0, 0}, +/* view */ NULL, +/* icon */ "gfx/mp/ammo_rockets", +/* pickup */// "Rockets", + 3, + IT_AMMO, + AMMO_ROCKETS, +/* precache */ "", +/* sounds */ "" + }, + + + // + // POWERUP ITEMS + // +/*QUAKED team_CTF_redflag (1 0 0) (-16 -16 -16) (16 16 16) +Only in CTF games +*/ + { + "team_CTF_redflag", + NULL, + { "models/flags/r_flag.md3", + "models/flags/r_flag_ysal.md3", 0, 0 }, +/* view */ NULL, +/* icon */ "gfx/hud/mpi_rflag", +/* pickup */// "Red Flag", + 0, + IT_TEAM, + PW_REDFLAG, +/* precache */ "", +/* sounds */ "" + }, + +/*QUAKED team_CTF_blueflag (0 0 1) (-16 -16 -16) (16 16 16) +Only in CTF games +*/ + { + "team_CTF_blueflag", + NULL, + { "models/flags/b_flag.md3", + "models/flags/b_flag_ysal.md3", 0, 0 }, +/* view */ NULL, +/* icon */ "gfx/hud/mpi_bflag", +/* pickup */// "Blue Flag", + 0, + IT_TEAM, + PW_BLUEFLAG, +/* precache */ "", +/* sounds */ "" + }, + + // + // PERSISTANT POWERUP ITEMS + // + + /*QUAKED team_CTF_neutralflag (0 0 1) (-16 -16 -16) (16 16 16) +Only in One Flag CTF games +*/ + { + "team_CTF_neutralflag", + NULL, + { "models/flags/n_flag.md3", + 0, 0, 0 }, +/* view */ NULL, +/* icon */ "icons/iconf_neutral1", +/* pickup */// "Neutral Flag", + 0, + IT_TEAM, + PW_NEUTRALFLAG, +/* precache */ "", +/* sounds */ "" + }, + + { + "item_redcube", + "sound/player/pickupenergy.wav", + { "models/powerups/orb/r_orb.md3", + 0, 0, 0 }, +/* view */ NULL, +/* icon */ "icons/iconh_rorb", +/* pickup */// "Red Cube", + 0, + IT_TEAM, + 0, +/* precache */ "", +/* sounds */ "" + }, + + { + "item_bluecube", + "sound/player/pickupenergy.wav", + { "models/powerups/orb/b_orb.md3", + 0, 0, 0 }, +/* view */ NULL, +/* icon */ "icons/iconh_borb", +/* pickup */// "Blue Cube", + 0, + IT_TEAM, + 0, +/* precache */ "", +/* sounds */ "" + }, + + // end of list marker + {NULL} +}; + +int bg_numItems = sizeof(bg_itemlist) / sizeof(bg_itemlist[0]) - 1; + +float vectoyaw( const vec3_t vec ) { + float yaw; + + if (vec[YAW] == 0 && vec[PITCH] == 0) { + yaw = 0; + } else { + if (vec[PITCH]) { + yaw = ( atan2( vec[YAW], vec[PITCH]) * 180 / M_PI ); + } else if (vec[YAW] > 0) { + yaw = 90; + } else { + yaw = 270; + } + if (yaw < 0) { + yaw += 360; + } + } + + return yaw; +} + +qboolean BG_HasYsalamiri(int gametype, playerState_t *ps) +{ + if (gametype == GT_CTY && + (ps->powerups[PW_REDFLAG] || ps->powerups[PW_BLUEFLAG])) + { + return qtrue; + } + + if (ps->powerups[PW_YSALAMIRI]) + { + return qtrue; + } + + return qfalse; +} + +qboolean BG_CanUseFPNow(int gametype, playerState_t *ps, int time, forcePowers_t power) +{ + if (BG_HasYsalamiri(gametype, ps)) + { + return qfalse; + } + + if ( ps->forceRestricted || ps->trueNonJedi ) + { + return qfalse; + } + + if (ps->duelInProgress) + { + if (power != FP_SABERATTACK && power != FP_SABERDEFEND && /*power != FP_SABERTHROW &&*/ + power != FP_LEVITATION) + { + if (!ps->saberLockFrame || power != FP_PUSH) + { + return qfalse; + } + } + } + + if (ps->saberLockFrame || ps->saberLockTime > time) + { + if (power != FP_PUSH) + { + return qfalse; + } + } + + if (ps->fallingToDeath) + { + return qfalse; + } + + return qtrue; +} + +/* +============== +BG_FindItemForPowerup +============== +*/ +gitem_t *BG_FindItemForPowerup( powerup_t pw ) { + int i; + + for ( i = 0 ; i < bg_numItems ; i++ ) { + if ( (bg_itemlist[i].giType == IT_POWERUP || + bg_itemlist[i].giType == IT_TEAM) && + bg_itemlist[i].giTag == pw ) { + return &bg_itemlist[i]; + } + } + + return NULL; +} + + +/* +============== +BG_FindItemForHoldable +============== +*/ +gitem_t *BG_FindItemForHoldable( holdable_t pw ) { + int i; + + for ( i = 0 ; i < bg_numItems ; i++ ) { + if ( bg_itemlist[i].giType == IT_HOLDABLE && bg_itemlist[i].giTag == pw ) { + return &bg_itemlist[i]; + } + } + + Com_Error( ERR_DROP, "HoldableItem not found" ); + + return NULL; +} + + +/* +=============== +BG_FindItemForWeapon + +=============== +*/ +gitem_t *BG_FindItemForWeapon( weapon_t weapon ) { + gitem_t *it; + + for ( it = bg_itemlist + 1 ; it->classname ; it++) { + if ( it->giType == IT_WEAPON && it->giTag == weapon ) { + return it; + } + } + + Com_Error( ERR_DROP, "Couldn't find item for weapon %i", weapon); + return NULL; +} + +/* +=============== +BG_FindItem + +=============== +*/ +gitem_t *BG_FindItem( const char *classname ) { + gitem_t *it; + + for ( it = bg_itemlist + 1 ; it->classname ; it++ ) { + if ( !Q_stricmp( it->classname, classname) ) + return it; + } + + return NULL; +} + +/* +============ +BG_PlayerTouchesItem + +Items can be picked up without actually touching their physical bounds to make +grabbing them easier +============ +*/ +qboolean BG_PlayerTouchesItem( playerState_t *ps, entityState_t *item, int atTime ) { + vec3_t origin; + + BG_EvaluateTrajectory( &item->pos, atTime, origin ); + + // we are ignoring ducked differences here + if ( ps->origin[0] - origin[0] > 44 + || ps->origin[0] - origin[0] < -50 + || ps->origin[1] - origin[1] > 36 + || ps->origin[1] - origin[1] < -36 + || ps->origin[2] - origin[2] > 36 + || ps->origin[2] - origin[2] < -36 ) { + return qfalse; + } + + return qtrue; +} + +int BG_ProperForceIndex(int power) +{ + int i = 0; + + while (i < NUM_FORCE_POWERS) + { + if (forcePowerSorted[i] == power) + { + return i; + } + + i++; + } + + return -1; +} + +void BG_CycleForce(playerState_t *ps, int direction) +{ + int i = ps->fd.forcePowerSelected; + int x = i; + int presel = i; + int foundnext = -1; + + if (!ps->fd.forcePowersKnown & (1 << x) || + x >= NUM_FORCE_POWERS || + x == -1) + { //apparently we have no valid force powers + return; + } + + x = BG_ProperForceIndex(x); + presel = x; + + if (direction == 1) + { //get the next power + x++; + } + else + { //get the previous power + x--; + } + + if (x >= NUM_FORCE_POWERS) + { //cycled off the end.. cycle around to the first + x = 0; + } + if (x < 0) + { //cycled off the beginning.. cycle around to the last + x = NUM_FORCE_POWERS-1; + } + + i = forcePowerSorted[x]; //the "sorted" value of this power + + while (x != presel) + { //loop around to the current force power + if (ps->fd.forcePowersKnown & (1 << i) && i != ps->fd.forcePowerSelected) + { //we have the force power + if (i != FP_LEVITATION && + i != FP_SABERATTACK && + i != FP_SABERDEFEND && + i != FP_SABERTHROW) + { //it's selectable + foundnext = i; + break; + } + } + + if (direction == 1) + { //next + x++; + } + else + { //previous + x--; + } + + if (x >= NUM_FORCE_POWERS) + { //loop around + x = 0; + } + if (x < 0) + { //loop around + x = NUM_FORCE_POWERS-1; + } + + i = forcePowerSorted[x]; //set to the sorted value again + } + + if (foundnext != -1) + { //found one, select it + ps->fd.forcePowerSelected = foundnext; + } +} + +int BG_GetItemIndexByTag(int tag, int type) +{ //Get the itemlist index from the tag and type + int i = 0; + + while (i < bg_numItems) + { + if (bg_itemlist[i].giTag == tag && + bg_itemlist[i].giType == type) + { + return i; + } + + i++; + } + + return 0; +} + +void BG_CycleInven(playerState_t *ps, int direction) +{ + int i; + int original; + + i = bg_itemlist[ps->stats[STAT_HOLDABLE_ITEM]].giTag; + original = i; + + if (direction == 1) + { //next + i++; + } + else + { //previous + i--; + } + + while (i != original) + { //go in a full loop until hitting something, if hit nothing then select nothing + if (ps->stats[STAT_HOLDABLE_ITEMS] & (1 << i)) + { //we have it, select it. + ps->stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(i, IT_HOLDABLE); + break; + } + + if (direction == 1) + { //next + i++; + } + else + { //previous + i--; + } + + if (i < 0) + { //wrap around to the last + i = HI_NUM_HOLDABLE; + } + else if (i >= HI_NUM_HOLDABLE) + { //wrap around to the first + i = 0; + } + } +} + +/* +================ +BG_CanItemBeGrabbed + +Returns false if the item should not be picked up. +This needs to be the same for client side prediction and server use. +================ +*/ +qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const playerState_t *ps ) { + gitem_t *item; + + if ( ent->modelindex < 1 || ent->modelindex >= bg_numItems ) { + Com_Error( ERR_DROP, "BG_CanItemBeGrabbed: index out of range" ); + } + + item = &bg_itemlist[ent->modelindex]; + + if ( ps ) + { + if ( ps->trueJedi ) + {//force powers and saber only + if ( item->giType != IT_TEAM //not a flag + && item->giType != IT_ARMOR//not shields + && (item->giType != IT_WEAPON || item->giTag != WP_SABER)//not a saber + && (item->giType != IT_HOLDABLE || item->giTag != HI_SEEKER)//not a seeker + && (item->giType != IT_POWERUP || item->giTag == PW_YSALAMIRI) )//not a force pick-up + { + return qfalse; + } + } + else if ( ps->trueNonJedi ) + {//can't pick up force powerups + if ( (item->giType == IT_POWERUP && item->giTag != PW_YSALAMIRI) //if a powerup, can only can pick up ysalamiri + || (item->giType == IT_HOLDABLE && item->giTag == HI_SEEKER)//if holdable, cannot pick up seeker + || (item->giType == IT_WEAPON && item->giTag == WP_SABER ) )//or if it's a saber + { + return qfalse; + } + } + if ( ps->isJediMaster && item && (item->giType == IT_WEAPON || item->giType == IT_AMMO)) + {//jedi master cannot pick up weapons + return qfalse; + } + if ( ps->duelInProgress ) + { //no picking stuff up while in a duel, no matter what the type is + return qfalse; + } + } + else + {//safety return since below code assumes a non-null ps + return qfalse; + } + + switch( item->giType ) { + case IT_WEAPON: + if (ent->generic1 == ps->clientNum && ent->powerups) + { + return qfalse; + } + if (!(ent->eFlags & EF_DROPPEDWEAPON) && (ps->stats[STAT_WEAPONS] & (1 << item->giTag)) && + item->giTag != WP_THERMAL && item->giTag != WP_TRIP_MINE && item->giTag != WP_DET_PACK) + { //weaponstay stuff.. if this isn't dropped, and you already have it, you don't get it. + return qfalse; + } + return qtrue; // weapons are always picked up + + case IT_AMMO: + if ( ps->ammo[item->giTag] >= ammoData[item->giTag].max) { + return qfalse; // can't hold any more + } + return qtrue; + + case IT_ARMOR: + if ( ps->stats[STAT_ARMOR] >= ps->stats[STAT_MAX_HEALTH] * item->giTag ) { + return qfalse; + } + return qtrue; + + case IT_HEALTH: + // small and mega healths will go over the max, otherwise + // don't pick up if already at max + if ((ps->fd.forcePowersActive & (1 << FP_RAGE))) + { + return qfalse; + } + + if ( item->quantity == 5 || item->quantity == 100 ) { + if ( ps->stats[STAT_HEALTH] >= ps->stats[STAT_MAX_HEALTH] * 2 ) { + return qfalse; + } + return qtrue; + } + + if ( ps->stats[STAT_HEALTH] >= ps->stats[STAT_MAX_HEALTH] ) { + return qfalse; + } + return qtrue; + + case IT_POWERUP: + if (ps && (ps->powerups[PW_YSALAMIRI])) + { + if (item->giTag != PW_YSALAMIRI) + { + return qfalse; + } + } + return qtrue; // powerups are always picked up + + case IT_TEAM: // team items, such as flags + if( gametype == GT_CTF || gametype == GT_CTY ) { + // ent->modelindex2 is non-zero on items if they are dropped + // we need to know this because we can pick up our dropped flag (and return it) + // but we can't pick up our flag at base + if (ps->persistant[PERS_TEAM] == TEAM_RED) { + if (item->giTag == PW_BLUEFLAG || + (item->giTag == PW_REDFLAG && ent->modelindex2) || + (item->giTag == PW_REDFLAG && ps->powerups[PW_BLUEFLAG]) ) + return qtrue; + } else if (ps->persistant[PERS_TEAM] == TEAM_BLUE) { + if (item->giTag == PW_REDFLAG || + (item->giTag == PW_BLUEFLAG && ent->modelindex2) || + (item->giTag == PW_BLUEFLAG && ps->powerups[PW_REDFLAG]) ) + return qtrue; + } + } + + return qfalse; + + case IT_HOLDABLE: + if ( ps->stats[STAT_HOLDABLE_ITEMS] & (1 << item->giTag)) + { + return qfalse; + } + return qtrue; + + case IT_BAD: + Com_Error( ERR_DROP, "BG_CanItemBeGrabbed: IT_BAD" ); + default: +#ifndef Q3_VM +#ifndef NDEBUG // bk0001204 + Com_Printf("BG_CanItemBeGrabbed: unknown enum %d\n", item->giType ); +#endif +#endif + break; + } + + return qfalse; +} + +//====================================================================== + +/* +================ +BG_EvaluateTrajectory + +================ +*/ +void BG_EvaluateTrajectory( const trajectory_t *tr, int atTime, vec3_t result ) { + float deltaTime; + float phase; + + switch( tr->trType ) { + case TR_STATIONARY: + case TR_INTERPOLATE: + VectorCopy( tr->trBase, result ); + break; + case TR_LINEAR: + deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds + VectorMA( tr->trBase, deltaTime, tr->trDelta, result ); + break; + case TR_SINE: + deltaTime = ( atTime - tr->trTime ) / (float) tr->trDuration; + phase = sin( deltaTime * M_PI * 2 ); + VectorMA( tr->trBase, phase, tr->trDelta, result ); + break; + case TR_LINEAR_STOP: + if ( atTime > tr->trTime + tr->trDuration ) { + atTime = tr->trTime + tr->trDuration; + } + deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds + if ( deltaTime < 0 ) { + deltaTime = 0; + } + VectorMA( tr->trBase, deltaTime, tr->trDelta, result ); + break; + case TR_GRAVITY: + deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds + VectorMA( tr->trBase, deltaTime, tr->trDelta, result ); + result[2] -= 0.5 * DEFAULT_GRAVITY * deltaTime * deltaTime; // FIXME: local gravity... + break; + default: +#ifdef QAGAME + Com_Error( ERR_DROP, "BG_EvaluateTrajectory: [GAME SIDE] unknown trType: %i", tr->trType ); +#else + Com_Error( ERR_DROP, "BG_EvaluateTrajectory: [CLIENTGAME SIDE] unknown trType: %i", tr->trType ); +#endif + break; + } +} + +/* +================ +BG_EvaluateTrajectoryDelta + +For determining velocity at a given time +================ +*/ +void BG_EvaluateTrajectoryDelta( const trajectory_t *tr, int atTime, vec3_t result ) { + float deltaTime; + float phase; + + switch( tr->trType ) { + case TR_STATIONARY: + case TR_INTERPOLATE: + VectorClear( result ); + break; + case TR_LINEAR: + VectorCopy( tr->trDelta, result ); + break; + case TR_SINE: + deltaTime = ( atTime - tr->trTime ) / (float) tr->trDuration; + phase = cos( deltaTime * M_PI * 2 ); // derivative of sin = cos + phase *= 0.5; + VectorScale( tr->trDelta, phase, result ); + break; + case TR_LINEAR_STOP: + if ( atTime > tr->trTime + tr->trDuration ) { + VectorClear( result ); + return; + } + VectorCopy( tr->trDelta, result ); + break; + case TR_GRAVITY: + deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds + VectorCopy( tr->trDelta, result ); + result[2] -= DEFAULT_GRAVITY * deltaTime; // FIXME: local gravity... + break; + default: + Com_Error( ERR_DROP, "BG_EvaluateTrajectoryDelta: unknown trType: %i", tr->trTime ); + break; + } +} + +char *eventnames[] = { + "EV_NONE", + + "EV_CLIENTJOIN", + + "EV_FOOTSTEP", + "EV_FOOTSTEP_METAL", + "EV_FOOTSPLASH", + "EV_FOOTWADE", + "EV_SWIM", + + "EV_STEP_4", + "EV_STEP_8", + "EV_STEP_12", + "EV_STEP_16", + + "EV_FALL", + + "EV_JUMP_PAD", // boing sound at origin", jump sound on player + + "EV_PRIVATE_DUEL", + + "EV_JUMP", + "EV_ROLL", + "EV_WATER_TOUCH", // foot touches + "EV_WATER_LEAVE", // foot leaves + "EV_WATER_UNDER", // head touches + "EV_WATER_CLEAR", // head leaves + + "EV_ITEM_PICKUP", // normal item pickups are predictable + "EV_GLOBAL_ITEM_PICKUP", // powerup / team sounds are broadcast to everyone + + "EV_NOAMMO", + "EV_CHANGE_WEAPON", + "EV_FIRE_WEAPON", + "EV_ALT_FIRE", + "EV_SABER_ATTACK", + "EV_SABER_HIT", + "EV_SABER_BLOCK", + "EV_SABER_UNHOLSTER", + "EV_BECOME_JEDIMASTER", + "EV_DISRUPTOR_MAIN_SHOT", + "EV_DISRUPTOR_SNIPER_SHOT", + "EV_DISRUPTOR_SNIPER_MISS", + "EV_DISRUPTOR_HIT", + "EV_DISRUPTOR_ZOOMSOUND", + + "EV_PREDEFSOUND", + + "EV_TEAM_POWER", + + "EV_SCREENSHAKE", + + "EV_USE", // +Use key + + "EV_USE_ITEM0", + "EV_USE_ITEM1", + "EV_USE_ITEM2", + "EV_USE_ITEM3", + "EV_USE_ITEM4", + "EV_USE_ITEM5", + "EV_USE_ITEM6", + "EV_USE_ITEM7", + "EV_USE_ITEM8", + "EV_USE_ITEM9", + "EV_USE_ITEM10", + "EV_USE_ITEM11", + "EV_USE_ITEM12", + "EV_USE_ITEM13", + "EV_USE_ITEM14", + "EV_USE_ITEM15", + + "EV_ITEMUSEFAIL", + + "EV_ITEM_RESPAWN", + "EV_ITEM_POP", + "EV_PLAYER_TELEPORT_IN", + "EV_PLAYER_TELEPORT_OUT", + + "EV_GRENADE_BOUNCE", // eventParm will be the soundindex + "EV_MISSILE_STICK", + + "EV_PLAY_EFFECT", + "EV_PLAY_EFFECT_ID", //finally gave in and added it.. + + "EV_MUTE_SOUND", + "EV_GENERAL_SOUND", + "EV_GLOBAL_SOUND", // no attenuation + "EV_GLOBAL_TEAM_SOUND", + "EV_ENTITY_SOUND", + + "EV_PLAY_ROFF", + + "EV_GLASS_SHATTER", + "EV_DEBRIS", + + "EV_MISSILE_HIT", + "EV_MISSILE_MISS", + "EV_MISSILE_MISS_METAL", + "EV_BULLET", // otherEntity is the shooter + + "EV_PAIN", + "EV_DEATH1", + "EV_DEATH2", + "EV_DEATH3", + "EV_OBITUARY", + + "EV_POWERUP_QUAD", + "EV_POWERUP_BATTLESUIT", + //"EV_POWERUP_REGEN", + + "EV_FORCE_DRAINED", + + "EV_GIB_PLAYER", // gib a previously living player + "EV_SCOREPLUM", // score plum + + "EV_CTFMESSAGE", + + "EV_SAGA_ROUNDOVER", + "EV_SAGA_OBJECTIVECOMPLETE", + + "EV_DESTROY_GHOUL2_INSTANCE", + + "EV_DESTROY_WEAPON_MODEL", + + "EV_GIVE_NEW_RANK", + "EV_SET_FREE_SABER", + "EV_SET_FORCE_DISABLE", + + "EV_WEAPON_CHARGE", + "EV_WEAPON_CHARGE_ALT", + + "EV_SHIELD_HIT", + + "EV_DEBUG_LINE", + "EV_TESTLINE", + "EV_STOPLOOPINGSOUND", + "EV_STARTLOOPINGSOUND", + "EV_TAUNT", + + "EV_TAUNT_YES", + "EV_TAUNT_NO", + "EV_TAUNT_FOLLOWME", + "EV_TAUNT_GETFLAG", + "EV_TAUNT_GUARDBASE", + "EV_TAUNT_PATROL", + + "EV_BODY_QUEUE_COPY" + +}; + +/* +=============== +BG_AddPredictableEventToPlayerstate + +Handles the sequence numbers +=============== +*/ + +void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int bufsize ); + +void BG_AddPredictableEventToPlayerstate( int newEvent, int eventParm, playerState_t *ps ) { + +#ifdef _DEBUG + { + char buf[256]; + trap_Cvar_VariableStringBuffer("showevents", buf, sizeof(buf)); + if ( atof(buf) != 0 ) { +#ifdef QAGAME + Com_Printf(" game event svt %5d -> %5d: num = %20s parm %d\n", ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence, eventnames[newEvent], eventParm); +#else + Com_Printf("Cgame event svt %5d -> %5d: num = %20s parm %d\n", ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence, eventnames[newEvent], eventParm); +#endif + } + } +#endif + ps->events[ps->eventSequence & (MAX_PS_EVENTS-1)] = newEvent; + ps->eventParms[ps->eventSequence & (MAX_PS_EVENTS-1)] = eventParm; + ps->eventSequence++; +} + +/* +======================== +BG_TouchJumpPad +======================== +*/ +void BG_TouchJumpPad( playerState_t *ps, entityState_t *jumppad ) { + vec3_t angles; + float p; + int effectNum; + + // spectators don't use jump pads + if ( ps->pm_type != PM_NORMAL && ps->pm_type != PM_FLOAT ) { + return; + } + + // if we didn't hit this same jumppad the previous frame + // then don't play the event sound again if we are in a fat trigger + if ( ps->jumppad_ent != jumppad->number ) { + + vectoangles( jumppad->origin2, angles); + p = fabs( AngleNormalize180( angles[PITCH] ) ); + if( p < 45 ) { + effectNum = 0; + } else { + effectNum = 1; + } + } + // remember hitting this jumppad this frame + ps->jumppad_ent = jumppad->number; + ps->jumppad_frame = ps->pmove_framecount; + // give the player the velocity from the jumppad + VectorCopy( jumppad->origin2, ps->velocity ); +} + +/* +======================== +BG_PlayerStateToEntityState + +This is done after each set of usercmd_t on the server, +and after local prediction on the client +======================== +*/ +void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean snap ) { + int i; + + if ( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR ) { + s->eType = ET_INVISIBLE; + } else if ( ps->stats[STAT_HEALTH] <= GIB_HEALTH ) { + s->eType = ET_INVISIBLE; + } else { + s->eType = ET_PLAYER; + } + + s->number = ps->clientNum; + + s->pos.trType = TR_INTERPOLATE; + VectorCopy( ps->origin, s->pos.trBase ); + if ( snap ) { + SnapVector( s->pos.trBase ); + } + // set the trDelta for flag direction + VectorCopy( ps->velocity, s->pos.trDelta ); + + s->apos.trType = TR_INTERPOLATE; + VectorCopy( ps->viewangles, s->apos.trBase ); + if ( snap ) { + SnapVector( s->apos.trBase ); + } + + s->trickedentindex = ps->fd.forceMindtrickTargetIndex; + s->trickedentindex2 = ps->fd.forceMindtrickTargetIndex2; + s->trickedentindex3 = ps->fd.forceMindtrickTargetIndex3; + s->trickedentindex4 = ps->fd.forceMindtrickTargetIndex4; + + s->forceFrame = ps->saberLockFrame; + + s->emplacedOwner = ps->electrifyTime; + + s->speed = ps->speed; + + s->genericenemyindex = ps->genericEnemyIndex; + + s->activeForcePass = ps->activeForcePass; + + s->angles2[YAW] = ps->movementDir; + s->legsAnim = ps->legsAnim; + s->torsoAnim = ps->torsoAnim; + s->clientNum = ps->clientNum; // ET_PLAYER looks here instead of at number + // so corpses can also reference the proper config + s->eFlags = ps->eFlags; + + s->saberInFlight = ps->saberInFlight; + s->saberEntityNum = ps->saberEntityNum; + s->saberMove = ps->saberMove; + s->forcePowersActive = ps->fd.forcePowersActive; + + if (ps->duelInProgress) + { + s->bolt1 = 1; + } + else + { + s->bolt1 = 0; + } + + if (ps->dualBlade) + { + s->bolt2 = 1; + } + else + { + s->bolt2 = 0; + } + + s->otherEntityNum2 = ps->emplacedIndex; + + s->shouldtarget = ps->saberHolstered; //reuse bool in entitystate for players differently + s->teamowner = ps->usingATST; + + if (ps->genericEnemyIndex != -1) + { + s->eFlags |= EF_SEEKERDRONE; + } + + if ( ps->stats[STAT_HEALTH] <= 0 ) { + s->eFlags |= EF_DEAD; + } else { + s->eFlags &= ~EF_DEAD; + } + + if ( ps->externalEvent ) { + s->event = ps->externalEvent; + s->eventParm = ps->externalEventParm; + } else if ( ps->entityEventSequence < ps->eventSequence ) { + int seq; + + if ( ps->entityEventSequence < ps->eventSequence - MAX_PS_EVENTS) { + ps->entityEventSequence = ps->eventSequence - MAX_PS_EVENTS; + } + seq = ps->entityEventSequence & (MAX_PS_EVENTS-1); + s->event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 ); + s->eventParm = ps->eventParms[ seq ]; + ps->entityEventSequence++; + } + + + s->weapon = ps->weapon; + s->groundEntityNum = ps->groundEntityNum; + + s->powerups = 0; + for ( i = 0 ; i < MAX_POWERUPS ; i++ ) { + if ( ps->powerups[ i ] ) { + s->powerups |= 1 << i; + } + } + + s->loopSound = ps->loopSound; + s->generic1 = ps->generic1; + + //NOT INCLUDED IN ENTITYSTATETOPLAYERSTATE: + s->modelindex2 = ps->weaponstate; + s->constantLight = ps->weaponChargeTime; + + VectorCopy(ps->lastHitLoc, s->origin2); + + s->isJediMaster = ps->isJediMaster; + + s->time2 = ps->holocronBits; + + s->fireflag = ps->fd.saberAnimLevel; +} + +/* +======================== +BG_PlayerStateToEntityStateExtraPolate + +This is done after each set of usercmd_t on the server, +and after local prediction on the client +======================== +*/ +void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s, int time, qboolean snap ) { + int i; + + if ( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPECTATOR ) { + s->eType = ET_INVISIBLE; + } else if ( ps->stats[STAT_HEALTH] <= GIB_HEALTH ) { + s->eType = ET_INVISIBLE; + } else { + s->eType = ET_PLAYER; + } + + s->number = ps->clientNum; + + s->pos.trType = TR_LINEAR_STOP; + VectorCopy( ps->origin, s->pos.trBase ); + if ( snap ) { + SnapVector( s->pos.trBase ); + } + // set the trDelta for flag direction and linear prediction + VectorCopy( ps->velocity, s->pos.trDelta ); + // set the time for linear prediction + s->pos.trTime = time; + // set maximum extra polation time + s->pos.trDuration = 50; // 1000 / sv_fps (default = 20) + + s->apos.trType = TR_INTERPOLATE; + VectorCopy( ps->viewangles, s->apos.trBase ); + if ( snap ) { + SnapVector( s->apos.trBase ); + } + + s->trickedentindex = ps->fd.forceMindtrickTargetIndex; + s->trickedentindex2 = ps->fd.forceMindtrickTargetIndex2; + s->trickedentindex3 = ps->fd.forceMindtrickTargetIndex3; + s->trickedentindex4 = ps->fd.forceMindtrickTargetIndex4; + + s->forceFrame = ps->saberLockFrame; + + s->emplacedOwner = ps->electrifyTime; + + s->speed = ps->speed; + + s->genericenemyindex = ps->genericEnemyIndex; + + s->activeForcePass = ps->activeForcePass; + + s->angles2[YAW] = ps->movementDir; + s->legsAnim = ps->legsAnim; + s->torsoAnim = ps->torsoAnim; + s->clientNum = ps->clientNum; // ET_PLAYER looks here instead of at number + // so corpses can also reference the proper config + s->eFlags = ps->eFlags; + + s->saberInFlight = ps->saberInFlight; + s->saberEntityNum = ps->saberEntityNum; + s->saberMove = ps->saberMove; + s->forcePowersActive = ps->fd.forcePowersActive; + + if (ps->duelInProgress) + { + s->bolt1 = 1; + } + else + { + s->bolt1 = 0; + } + + if (ps->dualBlade) + { + s->bolt2 = 1; + } + else + { + s->bolt2 = 0; + } + + s->otherEntityNum2 = ps->emplacedIndex; + + s->shouldtarget = ps->saberHolstered; //reuse bool in entitystate for players differently + s->teamowner = ps->usingATST; + + if (ps->genericEnemyIndex != -1) + { + s->eFlags |= EF_SEEKERDRONE; + } + + if ( ps->stats[STAT_HEALTH] <= 0 ) { + s->eFlags |= EF_DEAD; + } else { + s->eFlags &= ~EF_DEAD; + } + + if ( ps->externalEvent ) { + s->event = ps->externalEvent; + s->eventParm = ps->externalEventParm; + } else if ( ps->entityEventSequence < ps->eventSequence ) { + int seq; + + if ( ps->entityEventSequence < ps->eventSequence - MAX_PS_EVENTS) { + ps->entityEventSequence = ps->eventSequence - MAX_PS_EVENTS; + } + seq = ps->entityEventSequence & (MAX_PS_EVENTS-1); + s->event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 ); + s->eventParm = ps->eventParms[ seq ]; + ps->entityEventSequence++; + } + s->weapon = ps->weapon; + s->groundEntityNum = ps->groundEntityNum; + + s->powerups = 0; + for ( i = 0 ; i < MAX_POWERUPS ; i++ ) { + if ( ps->powerups[ i ] ) { + s->powerups |= 1 << i; + } + } + + s->loopSound = ps->loopSound; + s->generic1 = ps->generic1; + + //NOT INCLUDED IN ENTITYSTATETOPLAYERSTATE: + s->modelindex2 = ps->weaponstate; + s->constantLight = ps->weaponChargeTime; + + VectorCopy(ps->lastHitLoc, s->origin2); + + s->isJediMaster = ps->isJediMaster; + + s->time2 = ps->holocronBits; + + s->fireflag = ps->fd.saberAnimLevel; +} + +/* +============================================================================= + +PLAYER ANGLES + +============================================================================= +*/ +#define MAX_POOL_SIZE 2048000 //1024000 + +static char bg_pool[MAX_POOL_SIZE]; +static int bg_poolSize = 0; +static int bg_poolTail = MAX_POOL_SIZE; + +void *BG_Alloc ( int size ) +{ + bg_poolSize = ((bg_poolSize + 0x00000003) & 0xfffffffc); + + if (bg_poolSize + size > bg_poolTail) + { + Com_Error( ERR_DROP, "BG_Alloc: buffer exceeded tail (%d > %d)", bg_poolSize + size, bg_poolTail); + return 0; + } + + bg_poolSize += size; + + return &bg_pool[bg_poolSize-size]; +} + +void *BG_AllocUnaligned ( int size ) +{ + if (bg_poolSize + size > bg_poolTail) + { + Com_Error( ERR_DROP, "BG_AllocUnaligned: buffer exceeded tail (%d > %d)", bg_poolSize + size, bg_poolTail); + return 0; + } + + bg_poolSize += size; + + return &bg_pool[bg_poolSize-size]; +} + +void *BG_TempAlloc( int size ) +{ + size = ((size + 0x00000003) & 0xfffffffc); + + if (bg_poolTail - size < bg_poolSize) + { + Com_Error( ERR_DROP, "BG_TempAlloc: buffer exceeded head (%d > %d)", bg_poolTail - size, bg_poolSize); + return 0; + } + + bg_poolTail -= size; + + return &bg_pool[bg_poolTail]; +} + +void BG_TempFree( int size ) +{ + size = ((size + 0x00000003) & 0xfffffffc); + + if (bg_poolTail+size > MAX_POOL_SIZE) + { + Com_Error( ERR_DROP, "BG_TempFree: tail greater than size (%d > %d)", bg_poolTail+size, MAX_POOL_SIZE ); + } + + bg_poolTail += size; +} + +char *BG_StringAlloc ( const char *source ) +{ + char *dest; + + dest = BG_Alloc ( strlen ( source ) + 1 ); + strcpy ( dest, source ); + return dest; +} + +qboolean BG_OutOfMemory ( void ) +{ + return bg_poolSize >= MAX_POOL_SIZE; +} diff --git a/code/game/bg_panimate.c b/code/game/bg_panimate.c new file mode 100644 index 0000000..9c56912 --- /dev/null +++ b/code/game/bg_panimate.c @@ -0,0 +1,1206 @@ +// BG_PAnimate.c + +#include "q_shared.h" +#include "bg_public.h" +#include "bg_local.h" +#include "anims.h" +#include "../cgame/animtable.h" + +/* +============================================================================== +BEGIN: Animation utility functions (sequence checking) +============================================================================== +*/ +//Called regardless of pm validity: +qboolean BG_InSpecialJump( int anim ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_WALL_RUN_RIGHT: + case BOTH_WALL_RUN_RIGHT_FLIP: + case BOTH_WALL_RUN_LEFT: + case BOTH_WALL_RUN_LEFT_FLIP: + case BOTH_WALL_FLIP_RIGHT: + case BOTH_WALL_FLIP_LEFT: + case BOTH_FLIP_BACK1: + case BOTH_FLIP_BACK2: + case BOTH_FLIP_BACK3: + case BOTH_WALL_FLIP_BACK1: + case BOTH_BUTTERFLY_LEFT: + case BOTH_BUTTERFLY_RIGHT: + return qtrue; + } + return qfalse; +} + +qboolean BG_InSaberStandAnim( int anim ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_SABERFAST_STANCE: + case BOTH_STAND2: + case BOTH_SABERSLOW_STANCE: + return qtrue; + default: + return qfalse; + } +} + +qboolean BG_DirectFlippingAnim( int anim ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_FLIP_F: //# Flip forward + case BOTH_FLIP_B: //# Flip backwards + case BOTH_FLIP_L: //# Flip left + case BOTH_FLIP_R: //# Flip right + return qtrue; + break; + } + + return qfalse; +} + +qboolean BG_SaberInAttack( int move ) +{ + if ( move >= LS_A_TL2BR && move <= LS_A_T2B ) + { + return qtrue; + } + switch ( move ) + { + case LS_A_BACK: + case LS_A_BACK_CR: + case LS_A_BACKSTAB: + case LS_A_LUNGE: + case LS_A_JUMP_T__B_: + case LS_A_FLIP_STAB: + case LS_A_FLIP_SLASH: + return qtrue; + break; + } + return qfalse; +} + +qboolean BG_SaberInSpecial( int move ) +{ + switch( move ) + { + case LS_A_BACK: + case LS_A_BACK_CR: + case LS_A_BACKSTAB: + case LS_A_LUNGE: + case LS_A_JUMP_T__B_: + case LS_A_FLIP_STAB: + case LS_A_FLIP_SLASH: + return qtrue; + } + return qfalse; +} + +qboolean BG_SaberInIdle( int move ) +{ + switch ( move ) + { + case LS_NONE: + case LS_READY: + case LS_DRAW: + case LS_PUTAWAY: + return qtrue; + break; + } + return qfalse; +} + +qboolean BG_FlippingAnim( int anim ) +{ + switch ( anim&~ANIM_TOGGLEBIT ) + { + case BOTH_FLIP_F: //# Flip forward + case BOTH_FLIP_B: //# Flip backwards + case BOTH_FLIP_L: //# Flip left + case BOTH_FLIP_R: //# Flip right + case BOTH_WALL_RUN_RIGHT_FLIP: + case BOTH_WALL_RUN_LEFT_FLIP: + case BOTH_WALL_FLIP_RIGHT: + case BOTH_WALL_FLIP_LEFT: + case BOTH_FLIP_BACK1: + case BOTH_FLIP_BACK2: + case BOTH_FLIP_BACK3: + case BOTH_WALL_FLIP_BACK1: + //Not really flips, but... + case BOTH_WALL_RUN_RIGHT: + case BOTH_WALL_RUN_LEFT: + case BOTH_WALL_RUN_RIGHT_STOP: + case BOTH_WALL_RUN_LEFT_STOP: + case BOTH_BUTTERFLY_LEFT: + case BOTH_BUTTERFLY_RIGHT: + // + case BOTH_ARIAL_LEFT: + case BOTH_ARIAL_RIGHT: + case BOTH_ARIAL_F1: + case BOTH_CARTWHEEL_LEFT: + case BOTH_CARTWHEEL_RIGHT: + case BOTH_JUMPFLIPSLASHDOWN1: + case BOTH_JUMPFLIPSTABDOWN: + return qtrue; + break; + } + return qfalse; +} + +qboolean BG_SpinningSaberAnim( int anim ) +{ + switch ( anim&~ANIM_TOGGLEBIT ) + { + //level 1 - FIXME: level 1 will have *no* spins + case BOTH_T1_BR_BL: + case BOTH_T1__R__L: + case BOTH_T1__R_BL: + case BOTH_T1_TR_BL: + case BOTH_T1_BR_TL: + case BOTH_T1_BR__L: + case BOTH_T1_TL_BR: + case BOTH_T1__L_BR: + case BOTH_T1__L__R: + case BOTH_T1_BL_BR: + case BOTH_T1_BL__R: + case BOTH_T1_BL_TR: + //level 2 + case BOTH_T2_BR__L: + case BOTH_T2_BR_BL: + case BOTH_T2__R_BL: + case BOTH_T2__L_BR: + case BOTH_T2_BL_BR: + case BOTH_T2_BL__R: + //level 3 + case BOTH_T3_BR__L: + case BOTH_T3_BR_BL: + case BOTH_T3__R_BL: + case BOTH_T3__L_BR: + case BOTH_T3_BL_BR: + case BOTH_T3_BL__R: + //level 4 + case BOTH_T4_BR__L: + case BOTH_T4_BR_BL: + case BOTH_T4__R_BL: + case BOTH_T4__L_BR: + case BOTH_T4_BL_BR: + case BOTH_T4_BL__R: + //level 5 + case BOTH_T5_BR_BL: + case BOTH_T5__R__L: + case BOTH_T5__R_BL: + case BOTH_T5_TR_BL: + case BOTH_T5_BR_TL: + case BOTH_T5_BR__L: + case BOTH_T5_TL_BR: + case BOTH_T5__L_BR: + case BOTH_T5__L__R: + case BOTH_T5_BL_BR: + case BOTH_T5_BL__R: + case BOTH_T5_BL_TR: + //special + //case BOTH_A2_STABBACK1: + case BOTH_ATTACK_BACK: + case BOTH_CROUCHATTACKBACK1: + case BOTH_BUTTERFLY_LEFT: + case BOTH_BUTTERFLY_RIGHT: + case BOTH_FJSS_TR_BL: + case BOTH_FJSS_TL_BR: + case BOTH_JUMPFLIPSLASHDOWN1: + case BOTH_JUMPFLIPSTABDOWN: + return qtrue; + break; + } + return qfalse; +} + +qboolean BG_SaberInSpecialAttack( int anim ) +{ + switch ( anim&~ANIM_TOGGLEBIT ) + { + case BOTH_A2_STABBACK1: + case BOTH_ATTACK_BACK: + case BOTH_CROUCHATTACKBACK1: + case BOTH_BUTTERFLY_LEFT: + case BOTH_BUTTERFLY_RIGHT: + case BOTH_FJSS_TR_BL: + case BOTH_FJSS_TL_BR: + case BOTH_LUNGE2_B__T_: + case BOTH_FORCELEAP2_T__B_: + case BOTH_JUMPFLIPSLASHDOWN1://# + case BOTH_JUMPFLIPSTABDOWN://# + return qtrue; + } + return qfalse; +} + +int BG_BrokenParryForAttack( int move ) +{ + //Our attack was knocked away by a knockaway parry + //FIXME: need actual anims for this + //FIXME: need to know which side of the saber was hit! For now, we presume the saber gets knocked away from the center + switch ( saberMoveData[move].startQuad ) + { + case Q_B: + return LS_V1_B_; + break; + case Q_BR: + return LS_V1_BR; + break; + case Q_R: + return LS_V1__R; + break; + case Q_TR: + return LS_V1_TR; + break; + case Q_T: + return LS_V1_T_; + break; + case Q_TL: + return LS_V1_TL; + break; + case Q_L: + return LS_V1__L; + break; + case Q_BL: + return LS_V1_BL; + break; + } + return LS_NONE; +} + +int BG_BrokenParryForParry( int move ) +{ + //FIXME: need actual anims for this + //FIXME: need to know which side of the saber was hit! For now, we presume the saber gets knocked away from the center + switch ( move ) + { + case LS_PARRY_UP: + //Hmm... since we don't know what dir the hit came from, randomly pick knock down or knock back + if ( Q_irand( 0, 1 ) ) + { + return LS_H1_B_; + } + else + { + return LS_H1_T_; + } + break; + case LS_PARRY_UR: + return LS_H1_TR; + break; + case LS_PARRY_UL: + return LS_H1_TL; + break; + case LS_PARRY_LR: + return LS_H1_BR; + break; + case LS_PARRY_LL: + return LS_H1_BL; + break; + case LS_READY: + return LS_H1_B_;//??? + break; + } + return LS_NONE; +} + +int BG_KnockawayForParry( int move ) +{ + //FIXME: need actual anims for this + //FIXME: need to know which side of the saber was hit! For now, we presume the saber gets knocked away from the center + switch ( move ) + { + case BLOCKED_TOP://LS_PARRY_UP: + return LS_K1_T_;//push up + break; + case BLOCKED_UPPER_RIGHT://LS_PARRY_UR: + default://case LS_READY: + return LS_K1_TR;//push up, slightly to right + break; + case BLOCKED_UPPER_LEFT://LS_PARRY_UL: + return LS_K1_TL;//push up and to left + break; + case BLOCKED_LOWER_RIGHT://LS_PARRY_LR: + return LS_K1_BR;//push down and to left + break; + case BLOCKED_LOWER_LEFT://LS_PARRY_LL: + return LS_K1_BL;//push down and to right + break; + } + //return LS_NONE; +} + +qboolean BG_InRoll( playerState_t *ps, int anim ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_ROLL_F: + case BOTH_ROLL_B: + case BOTH_ROLL_R: + case BOTH_ROLL_L: + if ( ps->legsTimer > 0 ) + { + return qtrue; + } + break; + } + return qfalse; +} + +qboolean BG_InDeathAnim( int anim ) +{ + switch((anim&~ANIM_TOGGLEBIT)) + { + case BOTH_DIVE1: + case BOTH_DEATHBACKWARD1: + case BOTH_DEATHBACKWARD2: + case BOTH_DEATHFORWARD1: + case BOTH_DEATHFORWARD2: + case BOTH_DEATH1: + case BOTH_DEATH2: + case BOTH_DEATH3: + case BOTH_DEATH4: + case BOTH_DEATH5: + case BOTH_DEATH6: + case BOTH_DEATH7: + + case BOTH_DEATH1IDLE: + case BOTH_LYINGDEATH1: + case BOTH_STUMBLEDEATH1: + case BOTH_FALLDEATH1: + case BOTH_FALLDEATH1INAIR: + case BOTH_FALLDEATH1LAND: + return qtrue; + break; + default: + return qfalse; + break; + } +} + +//Called only where pm is valid (not all require pm, but some do): +int PM_SaberBounceForAttack( int move ) +{ + switch ( saberMoveData[move].startQuad ) + { + case Q_B: + case Q_BR: + return LS_B1_BR; + break; + case Q_R: + return LS_B1__R; + break; + case Q_TR: + return LS_B1_TR; + break; + case Q_T: + return LS_B1_T_; + break; + case Q_TL: + return LS_B1_TL; + break; + case Q_L: + return LS_B1__L; + break; + case Q_BL: + return LS_B1_BL; + break; + } + return LS_NONE; +} + +int PM_SaberDeflectionForQuad( int quad ) +{ + switch ( quad ) + { + case Q_B: + return LS_D1_B_; + break; + case Q_BR: + return LS_D1_BR; + break; + case Q_R: + return LS_D1__R; + break; + case Q_TR: + return LS_D1_TR; + break; + case Q_T: + return LS_D1_T_; + break; + case Q_TL: + return LS_D1_TL; + break; + case Q_L: + return LS_D1__L; + break; + case Q_BL: + return LS_D1_BL; + break; + } + return LS_NONE; +} + +qboolean PM_SaberInDeflect( int move ) +{ + if ( move >= LS_D1_BR && move <= LS_D1_B_ ) + { + return qtrue; + } + return qfalse; +} + +qboolean PM_SaberInParry( int move ) +{ + if ( move >= LS_PARRY_UP && move <= LS_PARRY_LL ) + { + return qtrue; + } + return qfalse; +} + +qboolean PM_SaberInKnockaway( int move ) +{ + if ( move >= LS_K1_T_ && move <= LS_K1_BL ) + { + return qtrue; + } + return qfalse; +} + +qboolean PM_SaberInReflect( int move ) +{ + if ( move >= LS_REFLECT_UP && move <= LS_REFLECT_LL ) + { + return qtrue; + } + return qfalse; +} + +qboolean PM_SaberInStart( int move ) +{ + if ( move >= LS_S_TL2BR && move <= LS_S_T2B ) + { + return qtrue; + } + return qfalse; +} + +qboolean PM_SaberInReturn( int move ) +{ + if ( move >= LS_R_TL2BR && move <= LS_R_TL2BR ) + { + return qtrue; + } + return qfalse; +} + +qboolean PM_InSaberAnim( int anim ) +{ + if ( (anim&~ANIM_TOGGLEBIT) >= BOTH_A1_T__B_ && (anim&~ANIM_TOGGLEBIT) <= BOTH_H1_S1_BR ) + { + return qtrue; + } + return qfalse; +} + +qboolean PM_InKnockDown( playerState_t *ps ) +{ + switch ( (ps->legsAnim&~ANIM_TOGGLEBIT) ) + { + case BOTH_KNOCKDOWN1: + case BOTH_KNOCKDOWN2: + case BOTH_KNOCKDOWN3: + case BOTH_KNOCKDOWN4: + case BOTH_KNOCKDOWN5: + return qtrue; + break; + case BOTH_GETUP1: + case BOTH_GETUP2: + case BOTH_GETUP3: + case BOTH_GETUP4: + case BOTH_GETUP5: + case BOTH_FORCE_GETUP_F1: + case BOTH_FORCE_GETUP_F2: + case BOTH_FORCE_GETUP_B1: + case BOTH_FORCE_GETUP_B2: + case BOTH_FORCE_GETUP_B3: + case BOTH_FORCE_GETUP_B4: + case BOTH_FORCE_GETUP_B5: + if ( ps->legsTimer ) + { + return qtrue; + } + break; + } + return qfalse; +} + +qboolean PM_PainAnim( int anim ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_PAIN1: //# First take pain anim + case BOTH_PAIN2: //# Second take pain anim + case BOTH_PAIN3: //# Third take pain anim + case BOTH_PAIN4: //# Fourth take pain anim + case BOTH_PAIN5: //# Fifth take pain anim - from behind + case BOTH_PAIN6: //# Sixth take pain anim - from behind + case BOTH_PAIN7: //# Seventh take pain anim - from behind + case BOTH_PAIN8: //# Eigth take pain anim - from behind + case BOTH_PAIN9: //# + case BOTH_PAIN10: //# + case BOTH_PAIN11: //# + case BOTH_PAIN12: //# + case BOTH_PAIN13: //# + case BOTH_PAIN14: //# + case BOTH_PAIN15: //# + case BOTH_PAIN16: //# + case BOTH_PAIN17: //# + case BOTH_PAIN18: //# + case BOTH_PAIN19: //# + return qtrue; + break; + } + return qfalse; +} + +qboolean PM_JumpingAnim( int anim ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_JUMP1: //# Jump - wind-up and leave ground + case BOTH_INAIR1: //# In air loop (from jump) + case BOTH_LAND1: //# Landing (from in air loop) + case BOTH_LAND2: //# Landing Hard (from a great height) + case BOTH_JUMPBACK1: //# Jump backwards - wind-up and leave ground + case BOTH_INAIRBACK1: //# In air loop (from jump back) + case BOTH_LANDBACK1: //# Landing backwards(from in air loop) + case BOTH_JUMPLEFT1: //# Jump left - wind-up and leave ground + case BOTH_INAIRLEFT1: //# In air loop (from jump left) + case BOTH_LANDLEFT1: //# Landing left(from in air loop) + case BOTH_JUMPRIGHT1: //# Jump right - wind-up and leave ground + case BOTH_INAIRRIGHT1: //# In air loop (from jump right) + case BOTH_LANDRIGHT1: //# Landing right(from in air loop) + case BOTH_FORCEJUMP1: //# Jump - wind-up and leave ground + case BOTH_FORCEINAIR1: //# In air loop (from jump) + case BOTH_FORCELAND1: //# Landing (from in air loop) + case BOTH_FORCEJUMPBACK1: //# Jump backwards - wind-up and leave ground + case BOTH_FORCEINAIRBACK1: //# In air loop (from jump back) + case BOTH_FORCELANDBACK1: //# Landing backwards(from in air loop) + case BOTH_FORCEJUMPLEFT1: //# Jump left - wind-up and leave ground + case BOTH_FORCEINAIRLEFT1: //# In air loop (from jump left) + case BOTH_FORCELANDLEFT1: //# Landing left(from in air loop) + case BOTH_FORCEJUMPRIGHT1: //# Jump right - wind-up and leave ground + case BOTH_FORCEINAIRRIGHT1: //# In air loop (from jump right) + case BOTH_FORCELANDRIGHT1: //# Landing right(from in air loop) + return qtrue; + break; + } + return qfalse; +} + +qboolean PM_LandingAnim( int anim ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_LAND1: //# Landing (from in air loop) + case BOTH_LAND2: //# Landing Hard (from a great height) + case BOTH_LANDBACK1: //# Landing backwards(from in air loop) + case BOTH_LANDLEFT1: //# Landing left(from in air loop) + case BOTH_LANDRIGHT1: //# Landing right(from in air loop) + case BOTH_FORCELAND1: //# Landing (from in air loop) + case BOTH_FORCELANDBACK1: //# Landing backwards(from in air loop) + case BOTH_FORCELANDLEFT1: //# Landing left(from in air loop) + case BOTH_FORCELANDRIGHT1: //# Landing right(from in air loop) + return qtrue; + break; + } + return qfalse; +} + +qboolean PM_SpinningAnim( int anim ) +{ + /* + switch ( anim ) + { + //FIXME: list any other spinning anims + default: + break; + } + */ + return BG_SpinningSaberAnim( anim ); +} + +qboolean PM_InOnGroundAnim ( int anim ) +{ + switch( anim&~ANIM_TOGGLEBIT ) + { + case BOTH_DEAD1: + case BOTH_DEAD2: + case BOTH_DEAD3: + case BOTH_DEAD4: + case BOTH_DEAD5: + case BOTH_DEADFORWARD1: + case BOTH_DEADBACKWARD1: + case BOTH_DEADFORWARD2: + case BOTH_DEADBACKWARD2: + case BOTH_LYINGDEATH1: + case BOTH_LYINGDEAD1: + case BOTH_PAIN2WRITHE1: //# Transition from upright position to writhing on ground anim + case BOTH_WRITHING1: //# Lying on ground writhing in pain + case BOTH_WRITHING1RLEG: //# Lying on ground writhing in pain: holding right leg + case BOTH_WRITHING1LLEG: //# Lying on ground writhing in pain: holding left leg + case BOTH_WRITHING2: //# Lying on stomache writhing in pain + case BOTH_INJURED1: //# Lying down: against wall - can also be sleeping + case BOTH_CRAWLBACK1: //# Lying on back: crawling backwards with elbows + case BOTH_INJURED2: //# Injured pose 2 + case BOTH_INJURED3: //# Injured pose 3 + case BOTH_INJURED6: //# Injured pose 6 + case BOTH_INJURED6ATTACKSTART: //# Start attack while in injured 6 pose + case BOTH_INJURED6ATTACKSTOP: //# End attack while in injured 6 pose + case BOTH_INJURED6COMBADGE: //# Hit combadge while in injured 6 pose + case BOTH_INJURED6POINT: //# Chang points to door while in injured state + case BOTH_KNOCKDOWN1: //# + case BOTH_KNOCKDOWN2: //# + return qtrue; + break; + } + + return qfalse; +} + +qboolean PM_InRollComplete( playerState_t *ps, int anim ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_ROLL_F: + case BOTH_ROLL_B: + case BOTH_ROLL_R: + case BOTH_ROLL_L: + if ( ps->legsTimer < 1 ) + { + return qtrue; + } + break; + } + return qfalse; +} + +int PM_AnimLength( int index, animNumber_t anim ) +{ + if (anim >= MAX_ANIMATIONS) + { + return -1; + } + return pm->animations[anim].numFrames * fabs(pm->animations[anim].frameLerp); +} + +void PM_DebugLegsAnim(int anim) +{ + int oldAnim = (pm->ps->legsAnim & ~ANIM_TOGGLEBIT); + int newAnim = (anim & ~ANIM_TOGGLEBIT); + + if (oldAnim < MAX_TOTALANIMATIONS && oldAnim >= BOTH_DEATH1 && + newAnim < MAX_TOTALANIMATIONS && newAnim >= BOTH_DEATH1) + { + Com_Printf("OLD: %s\n", animTable[oldAnim]); + Com_Printf("NEW: %s\n", animTable[newAnim]); + } +} +/* +============================================================================== +END: Animation utility functions (sequence checking) +============================================================================== +*/ + +/* +====================== +BG_ParseAnimationFile + +Read a configuration file containing animation coutns and rates +models/players/visor/animation.cfg, etc + +====================== +*/ +char BGPAFtext[40000]; +qboolean BGPAFtextLoaded = qfalse; +animation_t bgGlobalAnimations[MAX_TOTALANIMATIONS]; + +//#define CONVENIENT_ANIMATION_FILE_DEBUG_THING + +#ifdef CONVENIENT_ANIMATION_FILE_DEBUG_THING +void SpewDebugStuffToFile() +{ + fileHandle_t f; + int i = 0; + + trap_FS_FOpenFile("file_of_debug_stuff_MP.txt", &f, FS_WRITE); + + if (!f) + { + return; + } + + BGPAFtext[0] = 0; + + while (i < MAX_ANIMATIONS) + { + strcat(BGPAFtext, va("%i %i\n", i, bgGlobalAnimations[i].frameLerp)); + i++; + } + + trap_FS_Write(BGPAFtext, strlen(BGPAFtext), f); + trap_FS_FCloseFile(f); +} +#endif + +qboolean BG_ParseAnimationFile(const char *filename) +{ + char *text_p; + int len; + int i; + char *token; + float fps; + int skip; + + fileHandle_t f; + int animNum; + + + // load the file + if (!BGPAFtextLoaded) + { //rww - We are always using the same animation config now. So only load it once. + len = trap_FS_FOpenFile( filename, &f, FS_READ ); + if ( len <= 0 ) + { + return qfalse; + } + if ( len >= sizeof( BGPAFtext ) - 1 ) + { + //Com_Printf( "File %s too long\n", filename ); + return qfalse; + } + + trap_FS_Read( BGPAFtext, len, f ); + BGPAFtext[len] = 0; + trap_FS_FCloseFile( f ); + } + else + { + return qtrue; + } + + // parse the text + text_p = BGPAFtext; + skip = 0; // quiet the compiler warning + + //FIXME: have some way of playing anims backwards... negative numFrames? + + //initialize anim array so that from 0 to MAX_ANIMATIONS, set default values of 0 1 0 100 + for(i = 0; i < MAX_ANIMATIONS; i++) + { + bgGlobalAnimations[i].firstFrame = 0; + bgGlobalAnimations[i].numFrames = 0; + bgGlobalAnimations[i].loopFrames = -1; + bgGlobalAnimations[i].frameLerp = 100; + bgGlobalAnimations[i].initialLerp = 100; + } + + // read information for each frame + while(1) + { + token = COM_Parse( (const char **)(&text_p) ); + + if ( !token || !token[0]) + { + break; + } + + animNum = GetIDForString(animTable, token); + if(animNum == -1) + { +//#ifndef FINAL_BUILD +#ifdef _DEBUG + Com_Printf(S_COLOR_RED"WARNING: Unknown token %s in %s\n", token, filename); +#endif + continue; + } + + token = COM_Parse( (const char **)(&text_p) ); + if ( !token ) + { + break; + } + bgGlobalAnimations[animNum].firstFrame = atoi( token ); + + token = COM_Parse( (const char **)(&text_p) ); + if ( !token ) + { + break; + } + bgGlobalAnimations[animNum].numFrames = atoi( token ); + + token = COM_Parse( (const char **)(&text_p) ); + if ( !token ) + { + break; + } + bgGlobalAnimations[animNum].loopFrames = atoi( token ); + + token = COM_Parse( (const char **)(&text_p) ); + if ( !token ) + { + break; + } + fps = atof( token ); + if ( fps == 0 ) + { + fps = 1;//Don't allow divide by zero error + } + if ( fps < 0 ) + {//backwards + bgGlobalAnimations[animNum].frameLerp = floor(1000.0f / fps); + } + else + { + bgGlobalAnimations[animNum].frameLerp = ceil(1000.0f / fps); + } + + bgGlobalAnimations[animNum].initialLerp = ceil(1000.0f / fabs(fps)); + } + +#ifdef _DEBUG + //Check the array, and print the ones that have nothing in them. + for(i = 0; i < MAX_ANIMATIONS; i++) + { + if (animTable[i].name != NULL) // This animation reference exists. + { + if (bgGlobalAnimations[i].firstFrame <= 0 && bgGlobalAnimations[i].numFrames <=0) + { // This is an empty animation reference. + Com_Printf("***ANIMTABLE reference #%d (%s) is empty!\n", i, animTable[i].name); + } + } + } +#endif // _DEBUG + +#ifdef CONVENIENT_ANIMATION_FILE_DEBUG_THING + SpewDebugStuffToFile(); +#endif + BGPAFtextLoaded = qtrue; + return qtrue; +} + + + +/* +=================== +LEGS Animations +Base animation for overall body +=================== +*/ +static void PM_StartLegsAnim( int anim ) { + if ( pm->ps->pm_type >= PM_DEAD ) { + return; + } + if ( pm->ps->legsTimer > 0 ) { + return; // a high priority animation is running + } + + if (pm->ps->usingATST) + { //animation is handled mostly client-side with only a few exceptions + return; + } + + if (BG_InSaberStandAnim(anim) && pm->ps->weapon == WP_SABER && pm->ps->dualBlade) + { //a bit of a hack, but dualblade is cheat-only anyway + anim = BOTH_STAND1; + } + + pm->ps->legsAnim = ( ( pm->ps->legsAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) + | anim; + + if ( pm->debugLevel ) { + Com_Printf("%d: StartLegsAnim %d, on client#%d\n", pm->cmd.serverTime, anim, pm->ps->clientNum); + } +} + +void PM_ContinueLegsAnim( int anim ) { + if ( ( pm->ps->legsAnim & ~ANIM_TOGGLEBIT ) == anim ) { + return; + } + if ( pm->ps->legsTimer > 0 ) { + return; // a high priority animation is running + } + + PM_StartLegsAnim( anim ); +} + +void PM_ForceLegsAnim( int anim) { + if (BG_InSpecialJump(pm->ps->legsAnim) && + pm->ps->legsTimer > 0 && + !BG_InSpecialJump(anim)) + { + return; + } + + if (BG_InRoll(pm->ps, pm->ps->legsAnim) && + pm->ps->legsTimer > 0 && + !BG_InRoll(pm->ps, anim)) + { + return; + } + + pm->ps->legsTimer = 0; + PM_StartLegsAnim( anim ); +} + + + +/* +=================== +TORSO Animations +Override animations for upper body +=================== +*/ +void PM_StartTorsoAnim( int anim ) { + if ( pm->ps->pm_type >= PM_DEAD ) { + return; + } + + if (pm->ps->usingATST) + { //animation is handled mostly client-side with only a few exceptions + return; + } + + //cm NOTE: Causes problems with blocking. + /*if (BG_InSaberStandAnim(anim) && pm->ps->weapon == WP_SABER && pm->ps->dualBlade) + { //a bit of a hack, but dualblade is cheat-only anyway + anim = BOTH_STAND1; + }*/ + + pm->ps->torsoAnim = ( ( pm->ps->torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) + | anim; +} + + +/* +------------------------- +PM_SetLegsAnimTimer +------------------------- +*/ + +void PM_SetLegsAnimTimer(int time ) +{ + pm->ps->legsTimer = time; + + if (pm->ps->legsTimer < 0 && time != -1 ) + {//Cap timer to 0 if was counting down, but let it be -1 if that was intentional. NOTENOTE Yeah this seems dumb, but it mirrors SP. + pm->ps->legsTimer = 0; + } +} + +/* +------------------------- +PM_SetTorsoAnimTimer +------------------------- +*/ + +void PM_SetTorsoAnimTimer(int time ) +{ + pm->ps->torsoTimer = time; + + if (pm->ps->torsoTimer < 0 && time != -1 ) + {//Cap timer to 0 if was counting down, but let it be -1 if that was intentional. NOTENOTE Yeah this seems dumb, but it mirrors SP. + pm->ps->torsoTimer = 0; + } +} + +void BG_SaberStartTransAnim( int saberAnimLevel, int anim, float *animSpeed ) +{ + if ( ( (anim&~ANIM_TOGGLEBIT) >= BOTH_T1_BR__R && + (anim&~ANIM_TOGGLEBIT) <= BOTH_T1_BL_TL ) || + ( (anim&~ANIM_TOGGLEBIT) >= BOTH_T2_BR__R && + (anim&~ANIM_TOGGLEBIT) <= BOTH_T2_BL_TL ) || + ( (anim&~ANIM_TOGGLEBIT) >= BOTH_T3_BR__R && + (anim&~ANIM_TOGGLEBIT) <= BOTH_T3_BL_TL ) ) + { + if ( saberAnimLevel == FORCE_LEVEL_1 ) + { + *animSpeed *= 1.5; + } + else if ( saberAnimLevel == FORCE_LEVEL_3 ) + { + *animSpeed *= 0.75; + } + } +} + +/* +------------------------- +PM_SetAnimFinal +------------------------- +*/ +void PM_SetAnimFinal(int setAnimParts,int anim,int setAnimFlags, + int blendTime) // default blendTime=350 +{ + animation_t *animations = pm->animations; + + float editAnimSpeed = 1; + + if (!animations) + { + return; + } + + //NOTE: Setting blendTime here breaks actual blending.. + blendTime = 0; + + BG_SaberStartTransAnim(pm->ps->fd.saberAnimLevel, anim, &editAnimSpeed); + + // Set torso anim + if (setAnimParts & SETANIM_TORSO) + { + // Don't reset if it's already running the anim + if( !(setAnimFlags & SETANIM_FLAG_RESTART) && (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT ) == anim ) + { + goto setAnimLegs; + } + // or if a more important anim is running + if( !(setAnimFlags & SETANIM_FLAG_OVERRIDE) && ((pm->ps->torsoTimer > 0)||(pm->ps->torsoTimer == -1)) ) + { + goto setAnimLegs; + } + + PM_StartTorsoAnim( anim ); + + if (setAnimFlags & SETANIM_FLAG_HOLD) + { + if (setAnimFlags & SETANIM_FLAG_HOLDLESS) + { // Make sure to only wait in full 1/20 sec server frame intervals. + int dur; + int speedDif; + + dur = (animations[anim].numFrames-1) * fabs(animations[anim].frameLerp); + speedDif = dur - (dur * editAnimSpeed); + dur += speedDif; + if (dur > 1) + { + pm->ps->torsoTimer = dur-1; + } + else + { + pm->ps->torsoTimer = fabs(animations[anim].frameLerp); + } + } + else + { + pm->ps->torsoTimer = ((animations[anim].numFrames ) * fabs(animations[anim].frameLerp)); + } + + if (pm->ps->fd.forcePowersActive & (1 << FP_RAGE)) + { + pm->ps->torsoTimer /= 1.7; + } + } + } + +setAnimLegs: + // Set legs anim + if (setAnimParts & SETANIM_LEGS) + { + // Don't reset if it's already running the anim + if( !(setAnimFlags & SETANIM_FLAG_RESTART) && (pm->ps->legsAnim & ~ANIM_TOGGLEBIT ) == anim ) + { + goto setAnimDone; + } + // or if a more important anim is running + if( !(setAnimFlags & SETANIM_FLAG_OVERRIDE) && ((pm->ps->legsTimer > 0)||(pm->ps->legsTimer == -1)) ) + { + goto setAnimDone; + } + + PM_StartLegsAnim(anim); + + if (setAnimFlags & SETANIM_FLAG_HOLD) + { + if (setAnimFlags & SETANIM_FLAG_HOLDLESS) + { // Make sure to only wait in full 1/20 sec server frame intervals. + int dur; + int speedDif; + + dur = (animations[anim].numFrames-1) * fabs(animations[anim].frameLerp); + speedDif = dur - (dur * editAnimSpeed); + dur += speedDif; + if (dur > 1) + { + pm->ps->legsTimer = dur-1; + } + else + { + pm->ps->legsTimer = fabs(animations[anim].frameLerp); + } + } + else + { + pm->ps->legsTimer = ((animations[anim].numFrames ) * fabs(animations[anim].frameLerp)); + } + + if (pm->ps->fd.forcePowersActive & (1 << FP_RAGE)) + { + pm->ps->legsTimer /= 1.3; + } + else if (pm->ps->fd.forcePowersActive & (1 << FP_SPEED)) + { + pm->ps->legsTimer /= 1.7; + } + } + } + +setAnimDone: + return; +} + + + +// Imported from single-player, this function is mainly intended to make porting from SP easier. +void PM_SetAnim(int setAnimParts,int anim,int setAnimFlags, int blendTime) +{ + assert( bgGlobalAnimations[anim].firstFrame != 0 || + bgGlobalAnimations[anim].numFrames != 0); + + if (BG_InSpecialJump(anim)) + { + setAnimFlags |= SETANIM_FLAG_RESTART; + } + + if (BG_InRoll(pm->ps, pm->ps->legsAnim)) + { //never interrupt a roll + return; + } + + if (setAnimFlags&SETANIM_FLAG_OVERRIDE) + { + if (setAnimParts & SETANIM_TORSO) + { + if( (setAnimFlags & SETANIM_FLAG_RESTART) || (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT ) != anim ) + { + PM_SetTorsoAnimTimer(0); + } + } + if (setAnimParts & SETANIM_LEGS) + { + if( (setAnimFlags & SETANIM_FLAG_RESTART) || (pm->ps->legsAnim & ~ANIM_TOGGLEBIT ) != anim ) + { + PM_SetLegsAnimTimer(0); + } + } + } + + PM_SetAnimFinal(setAnimParts, anim, setAnimFlags, blendTime); +} + + diff --git a/code/game/bg_pmove.c b/code/game/bg_pmove.c new file mode 100644 index 0000000..190c835 --- /dev/null +++ b/code/game/bg_pmove.c @@ -0,0 +1,4662 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// bg_pmove.c -- both games player movement code +// takes a playerstate and a usercmd as input and returns a modifed playerstate + +#include "q_shared.h" +#include "bg_public.h" +#include "bg_local.h" + +#define MAX_WEAPON_CHARGE_TIME 5000 + +pmove_t *pm; +pml_t pml; + +qboolean gPMDoSlowFall = qfalse; + +// movement parameters +float pm_stopspeed = 100.0f; +float pm_duckScale = 0.50f; +float pm_swimScale = 0.50f; +float pm_wadeScale = 0.70f; + +float pm_accelerate = 10.0f; +float pm_airaccelerate = 1.0f; +float pm_wateraccelerate = 4.0f; +float pm_flyaccelerate = 8.0f; + +float pm_friction = 6.0f; +float pm_waterfriction = 1.0f; +float pm_flightfriction = 3.0f; +float pm_spectatorfriction = 5.0f; + +int c_pmove = 0; + +float forceSpeedLevels[4] = +{ + 1, //rank 0? + 1.25, + 1.5, + 1.75 +}; + +int forcePowerNeeded[NUM_FORCE_POWER_LEVELS][NUM_FORCE_POWERS] = +{ + { //nothing should be usable at rank 0.. + 999,//FP_HEAL,//instant + 999,//FP_LEVITATION,//hold/duration + 999,//FP_SPEED,//duration + 999,//FP_PUSH,//hold/duration + 999,//FP_PULL,//hold/duration + 999,//FP_TELEPATHY,//instant + 999,//FP_GRIP,//hold/duration + 999,//FP_LIGHTNING,//hold/duration + 999,//FP_RAGE,//duration + 999,//FP_PROTECT,//duration + 999,//FP_ABSORB,//duration + 999,//FP_TEAM_HEAL,//instant + 999,//FP_TEAM_FORCE,//instant + 999,//FP_DRAIN,//hold/duration + 999,//FP_SEE,//duration + 999,//FP_SABERATTACK, + 999,//FP_SABERDEFEND, + 999//FP_SABERTHROW, + //NUM_FORCE_POWERS + }, + { + 65,//FP_HEAL,//instant //was 25, but that was way too little + 10,//FP_LEVITATION,//hold/duration + 50,//FP_SPEED,//duration + 20,//FP_PUSH,//hold/duration + 20,//FP_PULL,//hold/duration + 20,//FP_TELEPATHY,//instant + 30,//FP_GRIP,//hold/duration + 1,//FP_LIGHTNING,//hold/duration + 50,//FP_RAGE,//duration + 50,//FP_PROTECT,//duration + 50,//FP_ABSORB,//duration + 50,//FP_TEAM_HEAL,//instant + 50,//FP_TEAM_FORCE,//instant + 20,//FP_DRAIN,//hold/duration + 20,//FP_SEE,//duration + 0,//FP_SABERATTACK, + 2,//FP_SABERDEFEND, + 20//FP_SABERTHROW, + //NUM_FORCE_POWERS + }, + { + 60,//FP_HEAL,//instant + 10,//FP_LEVITATION,//hold/duration + 50,//FP_SPEED,//duration + 20,//FP_PUSH,//hold/duration + 20,//FP_PULL,//hold/duration + 20,//FP_TELEPATHY,//instant + 30,//FP_GRIP,//hold/duration + 1,//FP_LIGHTNING,//hold/duration + 50,//FP_RAGE,//duration + 25,//FP_PROTECT,//duration + 25,//FP_ABSORB,//duration + 33,//FP_TEAM_HEAL,//instant + 33,//FP_TEAM_FORCE,//instant + 20,//FP_DRAIN,//hold/duration + 20,//FP_SEE,//duration + 0,//FP_SABERATTACK, + 1,//FP_SABERDEFEND, + 20//FP_SABERTHROW, + //NUM_FORCE_POWERS + }, + { + 50,//FP_HEAL,//instant //You get 5 points of health.. for 50 force points! + 10,//FP_LEVITATION,//hold/duration + 50,//FP_SPEED,//duration + 20,//FP_PUSH,//hold/duration + 20,//FP_PULL,//hold/duration + 20,//FP_TELEPATHY,//instant + 60,//FP_GRIP,//hold/duration + 1,//FP_LIGHTNING,//hold/duration + 50,//FP_RAGE,//duration + 10,//FP_PROTECT,//duration + 10,//FP_ABSORB,//duration + 25,//FP_TEAM_HEAL,//instant + 25,//FP_TEAM_FORCE,//instant + 20,//FP_DRAIN,//hold/duration + 20,//FP_SEE,//duration + 0,//FP_SABERATTACK, + 0,//FP_SABERDEFEND, + 20//FP_SABERTHROW, + //NUM_FORCE_POWERS + } +}; + +float forceJumpHeight[NUM_FORCE_POWER_LEVELS] = +{ + 32,//normal jump (+stepheight+crouchdiff = 66) + 96,//(+stepheight+crouchdiff = 130) + 192,//(+stepheight+crouchdiff = 226) + 384//(+stepheight+crouchdiff = 418) +}; + +float forceJumpStrength[NUM_FORCE_POWER_LEVELS] = +{ + JUMP_VELOCITY,//normal jump + 420, + 590, + 840 +}; + +int PM_GetSaberStance(void) +{ + //cm NOTE: This fixes the dualblade freeze problem. + if (pm->ps->dualBlade) + { //dual blades + return BOTH_STAND1; + } + else if ((pm->ps->fd.saberAnimLevel == FORCE_LEVEL_1) && !(pm->ps->dualBlade)) + { //fast + return BOTH_SABERFAST_STANCE; + } + else if ((pm->ps->fd.saberAnimLevel == FORCE_LEVEL_2) && !(pm->ps->dualBlade)) + { //medium + return BOTH_STAND2; + } + else if ((pm->ps->fd.saberAnimLevel == FORCE_LEVEL_3) && !(pm->ps->dualBlade)) + { //strong + return BOTH_SABERSLOW_STANCE; + } + + //fast + return BOTH_SABERFAST_STANCE; +} + +qboolean PM_DoSlowFall(void) +{ + if ( ( (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT ) && pm->ps->legsTimer > 500 ) + { + return qtrue; + } + + return qfalse; +} + +/* +=============== +PM_AddEvent + +=============== +*/ +void PM_AddEvent( int newEvent ) { + BG_AddPredictableEventToPlayerstate( newEvent, 0, pm->ps ); +} + +void PM_AddEventWithParm( int newEvent, int parm ) +{ + BG_AddPredictableEventToPlayerstate( newEvent, parm, pm->ps ); +} + +/* +=============== +PM_AddTouchEnt +=============== +*/ +void PM_AddTouchEnt( int entityNum ) { + int i; + + if ( entityNum == ENTITYNUM_WORLD ) { + return; + } + if ( pm->numtouch == MAXTOUCH ) { + return; + } + + // see if it is already added + for ( i = 0 ; i < pm->numtouch ; i++ ) { + if ( pm->touchents[ i ] == entityNum ) { + return; + } + } + + // add it + pm->touchents[pm->numtouch] = entityNum; + pm->numtouch++; +} + + +/* +================== +PM_ClipVelocity + +Slide off of the impacting surface +================== +*/ +void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, float overbounce ) { + float backoff; + float change; + int i; + + backoff = DotProduct (in, normal); + + if ( backoff < 0 ) { + backoff *= overbounce; + } else { + backoff /= overbounce; + } + + for ( i=0 ; i<3 ; i++ ) { + change = normal[i]*backoff; + out[i] = in[i] - change; + } +} + + +/* +================== +PM_Friction + +Handles both ground friction and water friction +================== +*/ +static void PM_Friction( void ) { + vec3_t vec; + float *vel; + float speed, newspeed, control; + float drop; + + vel = pm->ps->velocity; + + VectorCopy( vel, vec ); + if ( pml.walking ) { + vec[2] = 0; // ignore slope movement + } + + speed = VectorLength(vec); + if (speed < 1) { + vel[0] = 0; + vel[1] = 0; // allow sinking underwater + // FIXME: still have z friction underwater? + return; + } + + drop = 0; + + // apply ground friction + if ( pm->waterlevel <= 1 ) { + if ( pml.walking && !(pml.groundTrace.surfaceFlags & SURF_SLICK) ) { + // if getting knocked back, no friction + if ( ! (pm->ps->pm_flags & PMF_TIME_KNOCKBACK) ) { + control = speed < pm_stopspeed ? pm_stopspeed : speed; + drop += control*pm_friction*pml.frametime; + } + } + } + + // apply water friction even if just wading + if ( pm->waterlevel ) { + drop += speed*pm_waterfriction*pm->waterlevel*pml.frametime; + } + + if ( pm->ps->pm_type == PM_SPECTATOR || pm->ps->pm_type == PM_FLOAT ) + { + if (pm->ps->pm_type == PM_FLOAT) + { //almost no friction while floating + drop += speed*0.1*pml.frametime; + } + else + { + drop += speed*pm_spectatorfriction*pml.frametime; + } + } + + // scale the velocity + newspeed = speed - drop; + if (newspeed < 0) { + newspeed = 0; + } + newspeed /= speed; + + vel[0] = vel[0] * newspeed; + vel[1] = vel[1] * newspeed; + vel[2] = vel[2] * newspeed; +} + + +/* +============== +PM_Accelerate + +Handles user intended acceleration +============== +*/ +static void PM_Accelerate( vec3_t wishdir, float wishspeed, float accel ) { +#if 1 + // q2 style + int i; + float addspeed, accelspeed, currentspeed; + + currentspeed = DotProduct (pm->ps->velocity, wishdir); + addspeed = wishspeed - currentspeed; + if (addspeed <= 0) { + return; + } + accelspeed = accel*pml.frametime*wishspeed; + if (accelspeed > addspeed) { + accelspeed = addspeed; + } + + for (i=0 ; i<3 ; i++) { + pm->ps->velocity[i] += accelspeed*wishdir[i]; + } +#else + // proper way (avoids strafe jump maxspeed bug), but feels bad + vec3_t wishVelocity; + vec3_t pushDir; + float pushLen; + float canPush; + + VectorScale( wishdir, wishspeed, wishVelocity ); + VectorSubtract( wishVelocity, pm->ps->velocity, pushDir ); + pushLen = VectorNormalize( pushDir ); + + canPush = accel*pml.frametime*wishspeed; + if (canPush > pushLen) { + canPush = pushLen; + } + + VectorMA( pm->ps->velocity, canPush, pushDir, pm->ps->velocity ); +#endif +} + + + +/* +============ +PM_CmdScale + +Returns the scale factor to apply to cmd movements +This allows the clients to use axial -127 to 127 values for all directions +without getting a sqrt(2) distortion in speed. +============ +*/ +static float PM_CmdScale( usercmd_t *cmd ) { + int max; + float total; + float scale; + int umove = 0; //cmd->upmove; + //don't factor upmove into scaling speed + + max = abs( cmd->forwardmove ); + if ( abs( cmd->rightmove ) > max ) { + max = abs( cmd->rightmove ); + } + if ( abs( umove ) > max ) { + max = abs( umove ); + } + if ( !max ) { + return 0; + } + + total = sqrt( cmd->forwardmove * cmd->forwardmove + + cmd->rightmove * cmd->rightmove + umove * umove ); + scale = (float)pm->ps->speed * max / ( 127.0 * total ); + + return scale; +} + + +/* +================ +PM_SetMovementDir + +Determine the rotation of the legs reletive +to the facing dir +================ +*/ +static void PM_SetMovementDir( void ) { + if ( pm->cmd.forwardmove || pm->cmd.rightmove ) { + if ( pm->cmd.rightmove == 0 && pm->cmd.forwardmove > 0 ) { + pm->ps->movementDir = 0; + } else if ( pm->cmd.rightmove < 0 && pm->cmd.forwardmove > 0 ) { + pm->ps->movementDir = 1; + } else if ( pm->cmd.rightmove < 0 && pm->cmd.forwardmove == 0 ) { + pm->ps->movementDir = 2; + } else if ( pm->cmd.rightmove < 0 && pm->cmd.forwardmove < 0 ) { + pm->ps->movementDir = 3; + } else if ( pm->cmd.rightmove == 0 && pm->cmd.forwardmove < 0 ) { + pm->ps->movementDir = 4; + } else if ( pm->cmd.rightmove > 0 && pm->cmd.forwardmove < 0 ) { + pm->ps->movementDir = 5; + } else if ( pm->cmd.rightmove > 0 && pm->cmd.forwardmove == 0 ) { + pm->ps->movementDir = 6; + } else if ( pm->cmd.rightmove > 0 && pm->cmd.forwardmove > 0 ) { + pm->ps->movementDir = 7; + } + } else { + // if they aren't actively going directly sideways, + // change the animation to the diagonal so they + // don't stop too crooked + if ( pm->ps->movementDir == 2 ) { + pm->ps->movementDir = 1; + } else if ( pm->ps->movementDir == 6 ) { + pm->ps->movementDir = 7; + } + } +} + +#define METROID_JUMP 1 + +qboolean PM_ForceJumpingUp(void) +{ + if ( !(pm->ps->fd.forcePowersActive&(1<ps->fd.forceJumpCharge ) + {//already jumped and let go + return qfalse; + } + + if ( BG_InSpecialJump( pm->ps->legsAnim ) ) + { + return qfalse; + } + + if (BG_SaberInSpecial(pm->ps->saberMove)) + { + return qfalse; + } + + if (BG_SaberInSpecialAttack(pm->ps->legsAnim)) + { + return qfalse; + } + + if (BG_HasYsalamiri(pm->gametype, pm->ps)) + { + return qfalse; + } + + if (!BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_LEVITATION)) + { + return qfalse; + } + + if ( pm->ps->groundEntityNum == ENTITYNUM_NONE && //in air + (pm->ps->pm_flags & PMF_JUMP_HELD) && //jumped + pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_0 && //force-jump capable + pm->ps->velocity[2] > 0 )//going up + { + return qtrue; + } + return qfalse; +} + +static void PM_JumpForDir( void ) +{ + int anim = BOTH_JUMP1; + if ( pm->cmd.forwardmove > 0 ) + { + anim = BOTH_JUMP1; + pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; + } + else if ( pm->cmd.forwardmove < 0 ) + { + anim = BOTH_JUMPBACK1; + pm->ps->pm_flags |= PMF_BACKWARDS_JUMP; + } + else if ( pm->cmd.rightmove > 0 ) + { + anim = BOTH_JUMPRIGHT1; + pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; + } + else if ( pm->cmd.rightmove < 0 ) + { + anim = BOTH_JUMPLEFT1; + pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; + } + else + { + anim = BOTH_JUMP1; + pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; + } + if(!BG_InDeathAnim(pm->ps->legsAnim)) + { + PM_SetAnim(SETANIM_LEGS,anim,SETANIM_FLAG_OVERRIDE, 100); + } +} + +void PM_SetPMViewAngle(playerState_t *ps, vec3_t angle, usercmd_t *ucmd) +{ + int i; + + for (i=0 ; i<3 ; i++) + { // set the delta angle + int cmdAngle; + + cmdAngle = ANGLE2SHORT(angle[i]); + ps->delta_angles[i] = cmdAngle - ucmd->angles[i]; + } + VectorCopy (angle, ps->viewangles); +} + +qboolean PM_AdjustAngleForWallRun( playerState_t *ps, usercmd_t *ucmd, qboolean doMove ) +{ + if (( (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT || (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT ) && ps->legsTimer > 500 ) + {//wall-running and not at end of anim + //stick to wall, if there is one + vec3_t rt, traceTo, mins, maxs, fwdAngles; + trace_t trace; + float dist, yawAdjust; + + VectorSet(mins, -15, -15, 0); + VectorSet(maxs, 15, 15, 24); + VectorSet(fwdAngles, 0, pm->ps->viewangles[YAW], 0); + + AngleVectors( fwdAngles, NULL, rt, NULL ); + if ( (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT ) + { + dist = 128; + yawAdjust = -90; + } + else + { + dist = -128; + yawAdjust = 90; + } + VectorMA( ps->origin, dist, rt, traceTo ); + + pm->trace( &trace, ps->origin, mins, maxs, traceTo, ps->clientNum, MASK_PLAYERSOLID ); + + if ( trace.fraction < 1.0f ) + {//still a wall there + if ( (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT ) + { + ucmd->rightmove = 127; + } + else + { + ucmd->rightmove = -127; + } + if ( ucmd->upmove < 0 ) + { + ucmd->upmove = 0; + } + //make me face perpendicular to the wall + ps->viewangles[YAW] = vectoyaw( trace.plane.normal )+yawAdjust; + + PM_SetPMViewAngle(ps, ps->viewangles, ucmd); + + ucmd->angles[YAW] = ANGLE2SHORT( ps->viewangles[YAW] ) - ps->delta_angles[YAW]; + if ( doMove ) + { + //push me forward + vec3_t fwd; + float zVel = ps->velocity[2]; + if ( ps->legsTimer > 500 ) + {//not at end of anim yet + float speed = 175; + + fwdAngles[YAW] = ps->viewangles[YAW]; + AngleVectors( fwdAngles, fwd, NULL, NULL ); + + if ( ucmd->forwardmove < 0 ) + {//slower + speed = 100; + } + else if ( ucmd->forwardmove > 0 ) + { + speed = 250;//running speed + } + VectorScale( fwd, speed, ps->velocity ); + } + ps->velocity[2] = zVel;//preserve z velocity + //pull me toward the wall, too + VectorMA( ps->velocity, dist, rt, ps->velocity ); + } + ucmd->forwardmove = 0; + return qtrue; + } + else if ( doMove ) + {//stop it + if ( (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT ) + { + PM_SetAnim(SETANIM_BOTH, BOTH_WALL_RUN_RIGHT_STOP, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0); + } + else if ( (ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT ) + { + PM_SetAnim(SETANIM_BOTH, BOTH_WALL_RUN_LEFT_STOP, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0); + } + } + } + + return qfalse; +} + +//Set the height for when a force jump was started. If it's 0, nuge it up (slight hack to prevent holding jump over slopes) +void PM_SetForceJumpZStart(float value) +{ + pm->ps->fd.forceJumpZStart = value; + if (!pm->ps->fd.forceJumpZStart) + { + pm->ps->fd.forceJumpZStart -= 0.1; + } +} + +/* +============= +PM_CheckJump +============= +*/ +static qboolean PM_CheckJump( void ) +{ + if (pm->ps->usingATST) + { + return qfalse; + } + + if (pm->ps->forceHandExtend == HANDEXTEND_KNOCKDOWN) + { + return qfalse; + } + + //Don't allow jump until all buttons are up + if ( pm->ps->pm_flags & PMF_RESPAWNED ) { + return qfalse; + } + + if ( PM_InKnockDown( pm->ps ) || BG_InRoll( pm->ps, pm->ps->legsAnim ) ) + {//in knockdown + return qfalse; + } + + if (pm->ps->groundEntityNum != ENTITYNUM_NONE || pm->ps->origin[2] < pm->ps->fd.forceJumpZStart) + { + pm->ps->fd.forcePowersActive &= ~(1<ps->fd.forcePowersActive & (1 << FP_LEVITATION)) + { //Force jump is already active.. continue draining power appropriately until we land. + if (pm->ps->fd.forcePowerDebounce[FP_LEVITATION] < pm->cmd.serverTime) + { + BG_ForcePowerDrain( pm->ps, FP_LEVITATION, 5 ); + if (pm->ps->fd.forcePowerLevel[FP_LEVITATION] >= FORCE_LEVEL_2) + { + pm->ps->fd.forcePowerDebounce[FP_LEVITATION] = pm->cmd.serverTime + 300; + } + else + { + pm->ps->fd.forcePowerDebounce[FP_LEVITATION] = pm->cmd.serverTime + 200; + } + } + } + + if (pm->ps->forceJumpFlip) + { //Forced jump anim + int anim = BOTH_FORCEINAIR1; + int parts = SETANIM_BOTH; + + if ( pm->cmd.forwardmove > 0 ) + { + anim = BOTH_FLIP_F; + } + else if ( pm->cmd.forwardmove < 0 ) + { + anim = BOTH_FLIP_B; + } + else if ( pm->cmd.rightmove > 0 ) + { + anim = BOTH_FLIP_R; + } + else if ( pm->cmd.rightmove < 0 ) + { + anim = BOTH_FLIP_L; + } + if ( pm->ps->weaponTime ) + {//FIXME: really only care if we're in a saber attack anim... + parts = SETANIM_LEGS; + } + + PM_SetAnim( parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150 ); + pm->ps->forceJumpFlip = qfalse; + return qtrue; + } +#if METROID_JUMP + if ( pm->waterlevel < 2 ) + { + if ( pm->ps->gravity > 0 ) + {//can't do this in zero-G + if ( PM_ForceJumpingUp() ) + {//holding jump in air + float curHeight = pm->ps->origin[2] - pm->ps->fd.forceJumpZStart; + //check for max force jump level and cap off & cut z vel + if ( ( curHeight<=forceJumpHeight[0] ||//still below minimum jump height + (pm->ps->fd.forcePower&&pm->cmd.upmove>=10) ) &&////still have force power available and still trying to jump up + curHeight < forceJumpHeight[pm->ps->fd.forcePowerLevel[FP_LEVITATION]] && + pm->ps->fd.forceJumpZStart)//still below maximum jump height + {//can still go up + if ( curHeight > forceJumpHeight[0] ) + {//passed normal jump height *2? + if ( !(pm->ps->fd.forcePowersActive&(1<ps->fd.forcePowersActive |= (1<ps->fd.forceJumpSound = 1; + //play flip + if ((pm->cmd.forwardmove || pm->cmd.rightmove) && //pushing in a dir + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_FLIP_F &&//not already flipping + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_FLIP_B && + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_FLIP_R && + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_FLIP_L ) + { + int anim = BOTH_FORCEINAIR1; + int parts = SETANIM_BOTH; + + if ( pm->cmd.forwardmove > 0 ) + { + anim = BOTH_FLIP_F; + } + else if ( pm->cmd.forwardmove < 0 ) + { + anim = BOTH_FLIP_B; + } + else if ( pm->cmd.rightmove > 0 ) + { + anim = BOTH_FLIP_R; + } + else if ( pm->cmd.rightmove < 0 ) + { + anim = BOTH_FLIP_L; + } + if ( pm->ps->weaponTime ) + { + parts = SETANIM_LEGS; + } + + PM_SetAnim( parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150 ); + } + else if ( pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_1 ) + { + vec3_t facingFwd, facingRight, facingAngles; + int anim = -1; + float dotR, dotF; + + VectorSet(facingAngles, 0, pm->ps->viewangles[YAW], 0); + + AngleVectors( facingAngles, facingFwd, facingRight, NULL ); + dotR = DotProduct( facingRight, pm->ps->velocity ); + dotF = DotProduct( facingFwd, pm->ps->velocity ); + + if ( fabs(dotR) > fabs(dotF) * 1.5 ) + { + if ( dotR > 150 ) + { + anim = BOTH_FORCEJUMPRIGHT1; + } + else if ( dotR < -150 ) + { + anim = BOTH_FORCEJUMPLEFT1; + } + } + else + { + if ( dotF > 150 ) + { + anim = BOTH_FORCEJUMP1; + } + else if ( dotF < -150 ) + { + anim = BOTH_FORCEJUMPBACK1; + } + } + if ( anim != -1 ) + { + int parts = SETANIM_BOTH; + if ( pm->ps->weaponTime ) + {//FIXME: really only care if we're in a saber attack anim... + parts = SETANIM_LEGS; + } + + PM_SetAnim( parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150 ); + } + } + } + else + { //jump is already active (the anim has started) + if ( pm->ps->legsTimer < 1 ) + {//not in the middle of a legsAnim + int anim = (pm->ps->legsAnim&~ANIM_TOGGLEBIT); + int newAnim = -1; + switch ( anim ) + { + case BOTH_FORCEJUMP1: + newAnim = BOTH_FORCELAND1;//BOTH_FORCEINAIR1; + break; + case BOTH_FORCEJUMPBACK1: + newAnim = BOTH_FORCELANDBACK1;//BOTH_FORCEINAIRBACK1; + break; + case BOTH_FORCEJUMPLEFT1: + newAnim = BOTH_FORCELANDLEFT1;//BOTH_FORCEINAIRLEFT1; + break; + case BOTH_FORCEJUMPRIGHT1: + newAnim = BOTH_FORCELANDRIGHT1;//BOTH_FORCEINAIRRIGHT1; + break; + } + if ( newAnim != -1 ) + { + int parts = SETANIM_BOTH; + if ( pm->ps->weaponTime ) + { + parts = SETANIM_LEGS; + } + + PM_SetAnim( parts, newAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150 ); + } + } + } + } + + //need to scale this down, start with height velocity (based on max force jump height) and scale down to regular jump vel + pm->ps->velocity[2] = (forceJumpHeight[pm->ps->fd.forcePowerLevel[FP_LEVITATION]]-curHeight)/forceJumpHeight[pm->ps->fd.forcePowerLevel[FP_LEVITATION]]*forceJumpStrength[pm->ps->fd.forcePowerLevel[FP_LEVITATION]];//JUMP_VELOCITY; + pm->ps->velocity[2] /= 10; + pm->ps->velocity[2] += JUMP_VELOCITY; + pm->ps->pm_flags |= PMF_JUMP_HELD; + } + else if ( curHeight > forceJumpHeight[0] && curHeight < forceJumpHeight[pm->ps->fd.forcePowerLevel[FP_LEVITATION]] - forceJumpHeight[0] ) + {//still have some headroom, don't totally stop it + if ( pm->ps->velocity[2] > JUMP_VELOCITY ) + { + pm->ps->velocity[2] = JUMP_VELOCITY; + } + } + else + { + //pm->ps->velocity[2] = 0; + //rww - changed for the sake of balance in multiplayer + + if ( pm->ps->velocity[2] > JUMP_VELOCITY ) + { + pm->ps->velocity[2] = JUMP_VELOCITY; + } + } + pm->cmd.upmove = 0; + return qfalse; + } + } + } + +#endif + + //Not jumping + if ( pm->cmd.upmove < 10 && pm->ps->groundEntityNum != ENTITYNUM_NONE) { + return qfalse; + } + + // must wait for jump to be released + if ( pm->ps->pm_flags & PMF_JUMP_HELD ) + { + // clear upmove so cmdscale doesn't lower running speed + pm->cmd.upmove = 0; + return qfalse; + } + + if ( pm->ps->gravity <= 0 ) + {//in low grav, you push in the dir you're facing as long as there is something behind you to shove off of + vec3_t forward, back; + trace_t trace; + + AngleVectors( pm->ps->viewangles, forward, NULL, NULL ); + VectorMA( pm->ps->origin, -8, forward, back ); + pm->trace( &trace, pm->ps->origin, pm->mins, pm->maxs, back, pm->ps->clientNum, pm->tracemask ); + + if ( trace.fraction <= 1.0f ) + { + VectorMA( pm->ps->velocity, JUMP_VELOCITY*2, forward, pm->ps->velocity ); + PM_SetAnim(SETANIM_LEGS,BOTH_FORCEJUMP1,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART, 150); + }//else no surf close enough to push off of + pm->cmd.upmove = 0; + } + else if ( pm->cmd.upmove > 0 && pm->waterlevel < 2 && + pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_0 && + !(pm->ps->pm_flags&PMF_JUMP_HELD) && + pm->ps->weapon == WP_SABER && + !BG_HasYsalamiri(pm->gametype, pm->ps) && + BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_LEVITATION) ) + { + if ( pm->ps->groundEntityNum != ENTITYNUM_NONE ) + {//on the ground + //check for left-wall and right-wall special jumps + int anim = -1; + float vertPush = 0; + if ( pm->cmd.rightmove > 0 && pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_1 ) + {//strafing right + if ( pm->cmd.forwardmove > 0 ) + {//wall-run + vertPush = forceJumpStrength[FORCE_LEVEL_2]/2.0f; + anim = BOTH_WALL_RUN_RIGHT; + } + else if ( pm->cmd.forwardmove == 0 ) + {//wall-flip + vertPush = forceJumpStrength[FORCE_LEVEL_2]/2.25f; + anim = BOTH_WALL_FLIP_RIGHT; + } + } + else if ( pm->cmd.rightmove < 0 && pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_1 ) + {//strafing left + if ( pm->cmd.forwardmove > 0 ) + {//wall-run + vertPush = forceJumpStrength[FORCE_LEVEL_2]/2.0f; + anim = BOTH_WALL_RUN_LEFT; + } + else if ( pm->cmd.forwardmove == 0 ) + {//wall-flip + vertPush = forceJumpStrength[FORCE_LEVEL_2]/2.25f; + anim = BOTH_WALL_FLIP_LEFT; + } + } + else if ( pm->cmd.forwardmove < 0 && !(pm->cmd.buttons&BUTTON_ATTACK) ) + {//backflip + vertPush = JUMP_VELOCITY; + anim = BOTH_FLIP_BACK1;//PM_PickAnim( BOTH_FLIP_BACK1, BOTH_FLIP_BACK3 ); + } + + vertPush += 128; //give them an extra shove + + if ( anim != -1 ) + { + vec3_t fwd, right, traceto, mins, maxs, fwdAngles; + vec3_t idealNormal; + trace_t trace; + qboolean doTrace = qfalse; + int contents = MASK_PLAYERSOLID; + + VectorSet(mins, pm->mins[0],pm->mins[1],0); + VectorSet(maxs, pm->maxs[0],pm->maxs[1],24); + VectorSet(fwdAngles, 0, pm->ps->viewangles[YAW], 0); + + memset(&trace, 0, sizeof(trace)); //to shut the compiler up + + AngleVectors( fwdAngles, fwd, right, NULL ); + + //trace-check for a wall, if necc. + switch ( anim ) + { + case BOTH_WALL_FLIP_LEFT: + //NOTE: purposely falls through to next case! + case BOTH_WALL_RUN_LEFT: + doTrace = qtrue; + VectorMA( pm->ps->origin, -16, right, traceto ); + break; + + case BOTH_WALL_FLIP_RIGHT: + //NOTE: purposely falls through to next case! + case BOTH_WALL_RUN_RIGHT: + doTrace = qtrue; + VectorMA( pm->ps->origin, 16, right, traceto ); + break; + + case BOTH_WALL_FLIP_BACK1: + doTrace = qtrue; + VectorMA( pm->ps->origin, 16, fwd, traceto ); + break; + } + + if ( doTrace ) + { + pm->trace( &trace, pm->ps->origin, mins, maxs, traceto, pm->ps->clientNum, contents ); + VectorSubtract( pm->ps->origin, traceto, idealNormal ); + VectorNormalize( idealNormal ); + } + + if ( !doTrace || (trace.fraction < 1.0f && (trace.entityNum < MAX_CLIENTS || DotProduct(trace.plane.normal,idealNormal) > 0.7)) ) + {//there is a wall there.. or hit a client + int parts; + //move me to side + if ( anim == BOTH_WALL_FLIP_LEFT ) + { + pm->ps->velocity[0] = pm->ps->velocity[1] = 0; + VectorMA( pm->ps->velocity, 150, right, pm->ps->velocity ); + } + else if ( anim == BOTH_WALL_FLIP_RIGHT ) + { + pm->ps->velocity[0] = pm->ps->velocity[1] = 0; + VectorMA( pm->ps->velocity, -150, right, pm->ps->velocity ); + } + else if ( anim == BOTH_FLIP_BACK1 + || anim == BOTH_FLIP_BACK2 + || anim == BOTH_FLIP_BACK3 + || anim == BOTH_WALL_FLIP_BACK1 ) + { + pm->ps->velocity[0] = pm->ps->velocity[1] = 0; + VectorMA( pm->ps->velocity, -150, fwd, pm->ps->velocity ); + } + + if ( doTrace && anim != BOTH_WALL_RUN_LEFT && anim != BOTH_WALL_RUN_RIGHT ) + { + if (trace.entityNum < MAX_CLIENTS) + { + pm->ps->forceKickFlip = trace.entityNum+1; //let the server know that this person gets kicked by this client + } + } + + //up + if ( vertPush ) + { + pm->ps->velocity[2] = vertPush; + pm->ps->fd.forcePowersActive |= (1 << FP_LEVITATION); + } + //animate me + parts = SETANIM_LEGS; + if ( anim == BOTH_BUTTERFLY_LEFT ) + { + parts = SETANIM_BOTH; + pm->cmd.buttons&=~BUTTON_ATTACK; + pm->ps->saberMove = LS_NONE; + } + else if ( !pm->ps->weaponTime ) + { + parts = SETANIM_BOTH; + } + PM_SetAnim( parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0 ); + if ( anim == BOTH_BUTTERFLY_LEFT ) + { + pm->ps->weaponTime = pm->ps->torsoTimer; + } + PM_SetForceJumpZStart(pm->ps->origin[2]);//so we don't take damage if we land at same height + pm->ps->pm_flags |= PMF_JUMP_HELD; + pm->cmd.upmove = 0; + pm->ps->fd.forceJumpSound = 1; + } + } + } + else + {//in the air + int legsAnim = (pm->ps->legsAnim&~ANIM_TOGGLEBIT); + if ( legsAnim == BOTH_WALL_RUN_LEFT || legsAnim == BOTH_WALL_RUN_RIGHT ) + {//running on a wall + vec3_t right, traceto, mins, maxs, fwdAngles; + trace_t trace; + int anim = -1; + + VectorSet(mins, pm->mins[0], pm->mins[0], 0); + VectorSet(maxs, pm->maxs[0], pm->maxs[0], 24); + VectorSet(fwdAngles, 0, pm->ps->viewangles[YAW], 0); + + AngleVectors( fwdAngles, NULL, right, NULL ); + + if ( legsAnim == BOTH_WALL_RUN_LEFT ) + { + if ( pm->ps->legsTimer > 400 ) + {//not at the end of the anim + float animLen = PM_AnimLength( 0, (animNumber_t)BOTH_WALL_RUN_LEFT ); + if ( pm->ps->legsTimer < animLen - 400 ) + {//not at start of anim + VectorMA( pm->ps->origin, -16, right, traceto ); + anim = BOTH_WALL_RUN_LEFT_FLIP; + } + } + } + else if ( legsAnim == BOTH_WALL_RUN_RIGHT ) + { + if ( pm->ps->legsTimer > 400 ) + {//not at the end of the anim + float animLen = PM_AnimLength( 0, (animNumber_t)BOTH_WALL_RUN_RIGHT ); + if ( pm->ps->legsTimer < animLen - 400 ) + {//not at start of anim + VectorMA( pm->ps->origin, 16, right, traceto ); + anim = BOTH_WALL_RUN_RIGHT_FLIP; + } + } + } + if ( anim != -1 ) + { + pm->trace( &trace, pm->ps->origin, mins, maxs, traceto, pm->ps->clientNum, CONTENTS_SOLID|CONTENTS_BODY ); + if ( trace.fraction < 1.0f ) + {//flip off wall + int parts = 0; + + if ( anim == BOTH_WALL_RUN_LEFT_FLIP ) + { + pm->ps->velocity[0] *= 0.5f; + pm->ps->velocity[1] *= 0.5f; + VectorMA( pm->ps->velocity, 150, right, pm->ps->velocity ); + } + else if ( anim == BOTH_WALL_RUN_RIGHT_FLIP ) + { + pm->ps->velocity[0] *= 0.5f; + pm->ps->velocity[1] *= 0.5f; + VectorMA( pm->ps->velocity, -150, right, pm->ps->velocity ); + } + parts = SETANIM_LEGS; + if ( !pm->ps->weaponTime ) + { + parts = SETANIM_BOTH; + } + PM_SetAnim( parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0 ); + pm->cmd.upmove = 0; + } + } + if ( pm->cmd.upmove != 0 ) + {//jump failed, so don't try to do normal jump code, just return + return qfalse; + } + } + else if ( pm->cmd.forwardmove > 0 //pushing forward + && pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_1 + && pm->ps->velocity[2] > 200 + && PM_GroundDistance() <= 80 //unfortunately we do not have a happy ground timer like SP (this would use up more bandwidth if we wanted prediction workign right), so we'll just use the actual ground distance. + && !BG_InSpecialJump(pm->ps->legsAnim)) + {//run up wall, flip backwards + vec3_t fwd, traceto, mins, maxs, fwdAngles; + trace_t trace; + vec3_t idealNormal; + + VectorSet(mins, pm->mins[0],pm->mins[1],pm->mins[2]); + VectorSet(maxs, pm->maxs[0],pm->maxs[1],pm->maxs[2]); + VectorSet(fwdAngles, 0, pm->ps->viewangles[YAW], 0); + + AngleVectors( fwdAngles, fwd, NULL, NULL ); + VectorMA( pm->ps->origin, 32, fwd, traceto ); + + pm->trace( &trace, pm->ps->origin, mins, maxs, traceto, pm->ps->clientNum, MASK_PLAYERSOLID );//FIXME: clip brushes too? + VectorSubtract( pm->ps->origin, traceto, idealNormal ); + VectorNormalize( idealNormal ); + + if ( trace.fraction < 1.0f ) + {//there is a wall there + int parts = SETANIM_LEGS; + + pm->ps->velocity[0] = pm->ps->velocity[1] = 0; + VectorMA( pm->ps->velocity, -150, fwd, pm->ps->velocity ); + pm->ps->velocity[2] += 128; + + if ( !pm->ps->weaponTime ) + { + parts = SETANIM_BOTH; + } + PM_SetAnim( parts, BOTH_WALL_FLIP_BACK1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0 ); + + pm->ps->legsTimer -= 600; //I force this anim to play to the end to prevent landing on your head and suddenly flipping over. + //It is a bit too long at the end though, so I'll just shorten it. + + PM_SetForceJumpZStart(pm->ps->origin[2]);//so we don't take damage if we land at same height + pm->cmd.upmove = 0; + pm->ps->fd.forceJumpSound = 1; + BG_ForcePowerDrain( pm->ps, FP_LEVITATION, 5 ); + + if (trace.entityNum < MAX_CLIENTS) + { + pm->ps->forceKickFlip = trace.entityNum+1; //let the server know that this person gets kicked by this client + } + } + } + } + } + + if ( pm->cmd.upmove > 0 + && pm->ps->weapon == WP_SABER + && (pm->ps->weaponTime > 0||pm->cmd.buttons&BUTTON_ATTACK) ) + {//okay, we just jumped and we're in an attack + if ( !BG_InRoll( pm->ps, pm->ps->legsAnim ) + && !PM_InKnockDown( pm->ps ) + && !BG_InDeathAnim(pm->ps->legsAnim) + && !BG_FlippingAnim( pm->ps->legsAnim ) + && !PM_SpinningAnim( pm->ps->legsAnim ) + && !BG_SaberInSpecialAttack( pm->ps->torsoAnim ) + && ( BG_SaberInAttack( pm->ps->saberMove ) ) ) + {//not in an anim we shouldn't interrupt + //see if it's not too late to start a special jump-attack + float animLength = PM_AnimLength( 0, (animNumber_t)pm->ps->torsoAnim ); + if ( animLength - pm->ps->torsoTimer < 500 ) + {//just started the saberMove + //check for special-case jump attacks + if ( pm->ps->fd.saberAnimLevel == FORCE_LEVEL_2 ) + {//using medium attacks + if (PM_GroundDistance() < 32 && + !BG_InSpecialJump(pm->ps->legsAnim)) + { //FLIP AND DOWNWARD ATTACK + trace_t tr; + + if (PM_SomeoneInFront(&tr)) + { + PM_SetSaberMove(PM_SaberFlipOverAttackMove(&tr)); + pml.groundPlane = qfalse; + pml.walking = qfalse; + pm->ps->pm_flags |= PMF_JUMP_HELD; + pm->ps->groundEntityNum = ENTITYNUM_NONE; + VectorClear(pml.groundTrace.plane.normal); + + pm->ps->weaponTime = pm->ps->torsoTimer; + } + } + } + else if ( pm->ps->fd.saberAnimLevel == FORCE_LEVEL_3 ) + {//using strong attacks + if ( pm->cmd.forwardmove > 0 && //going forward + (pm->cmd.buttons & BUTTON_ATTACK) && //must be holding attack still + PM_GroundDistance() < 32 && + !BG_InSpecialJump(pm->ps->legsAnim)) + {//strong attack: jump-hack + PM_SetSaberMove( PM_SaberJumpAttackMove() ); + pml.groundPlane = qfalse; + pml.walking = qfalse; + pm->ps->pm_flags |= PMF_JUMP_HELD; + pm->ps->groundEntityNum = ENTITYNUM_NONE; + VectorClear(pml.groundTrace.plane.normal); + + pm->ps->weaponTime = pm->ps->torsoTimer; + } + } + } + } + } + if ( pm->ps->groundEntityNum == ENTITYNUM_NONE ) + { + return qfalse; + } + if ( pm->cmd.upmove > 0 ) + {//no special jumps + pm->ps->velocity[2] = JUMP_VELOCITY; + PM_SetForceJumpZStart(pm->ps->origin[2]);//so we don't take damage if we land at same height + pm->ps->pm_flags |= PMF_JUMP_HELD; + } + + //Jumping + pml.groundPlane = qfalse; + pml.walking = qfalse; + pm->ps->pm_flags |= PMF_JUMP_HELD; + pm->ps->groundEntityNum = ENTITYNUM_NONE; + PM_SetForceJumpZStart(pm->ps->origin[2]); + + PM_AddEvent( EV_JUMP ); + + //Set the animations + if ( pm->ps->gravity > 0 && !BG_InSpecialJump( pm->ps->legsAnim ) ) + { + PM_JumpForDir(); + } + + return qtrue; +} +/* +============= +PM_CheckWaterJump +============= +*/ +static qboolean PM_CheckWaterJump( void ) { + vec3_t spot; + int cont; + vec3_t flatforward; + + if (pm->ps->pm_time) { + return qfalse; + } + + // check for water jump + if ( pm->waterlevel != 2 ) { + return qfalse; + } + + flatforward[0] = pml.forward[0]; + flatforward[1] = pml.forward[1]; + flatforward[2] = 0; + VectorNormalize (flatforward); + + VectorMA (pm->ps->origin, 30, flatforward, spot); + spot[2] += 4; + cont = pm->pointcontents (spot, pm->ps->clientNum ); + if ( !(cont & CONTENTS_SOLID) ) { + return qfalse; + } + + spot[2] += 16; + cont = pm->pointcontents (spot, pm->ps->clientNum ); + if ( cont ) { + return qfalse; + } + + // jump out of water + VectorScale (pml.forward, 200, pm->ps->velocity); + pm->ps->velocity[2] = 350; + + pm->ps->pm_flags |= PMF_TIME_WATERJUMP; + pm->ps->pm_time = 2000; + + return qtrue; +} + +//============================================================================ + + +/* +=================== +PM_WaterJumpMove + +Flying out of the water +=================== +*/ +static void PM_WaterJumpMove( void ) { + // waterjump has no control, but falls + + PM_StepSlideMove( qtrue ); + + pm->ps->velocity[2] -= pm->ps->gravity * pml.frametime; + if (pm->ps->velocity[2] < 0) { + // cancel as soon as we are falling down again + pm->ps->pm_flags &= ~PMF_ALL_TIMES; + pm->ps->pm_time = 0; + } +} + +/* +=================== +PM_WaterMove + +=================== +*/ +static void PM_WaterMove( void ) { + int i; + vec3_t wishvel; + float wishspeed; + vec3_t wishdir; + float scale; + float vel; + + if ( PM_CheckWaterJump() ) { + PM_WaterJumpMove(); + return; + } +#if 0 + // jump = head for surface + if ( pm->cmd.upmove >= 10 ) { + if (pm->ps->velocity[2] > -300) { + if ( pm->watertype == CONTENTS_WATER ) { + pm->ps->velocity[2] = 100; + } else if (pm->watertype == CONTENTS_SLIME) { + pm->ps->velocity[2] = 80; + } else { + pm->ps->velocity[2] = 50; + } + } + } +#endif + PM_Friction (); + + scale = PM_CmdScale( &pm->cmd ); + // + // user intentions + // + if ( !scale ) { + wishvel[0] = 0; + wishvel[1] = 0; + wishvel[2] = -60; // sink towards bottom + } else { + for (i=0 ; i<3 ; i++) + wishvel[i] = scale * pml.forward[i]*pm->cmd.forwardmove + scale * pml.right[i]*pm->cmd.rightmove; + + wishvel[2] += scale * pm->cmd.upmove; + } + + VectorCopy (wishvel, wishdir); + wishspeed = VectorNormalize(wishdir); + + if ( wishspeed > pm->ps->speed * pm_swimScale ) { + wishspeed = pm->ps->speed * pm_swimScale; + } + + PM_Accelerate (wishdir, wishspeed, pm_wateraccelerate); + + // make sure we can go up slopes easily under water + if ( pml.groundPlane && DotProduct( pm->ps->velocity, pml.groundTrace.plane.normal ) < 0 ) { + vel = VectorLength(pm->ps->velocity); + // slide along the ground plane + PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal, + pm->ps->velocity, OVERCLIP ); + + VectorNormalize(pm->ps->velocity); + VectorScale(pm->ps->velocity, vel, pm->ps->velocity); + } + + PM_SlideMove( qfalse ); +} + +/* +=================== +PM_FlyMove + +Only with the flight powerup +=================== +*/ +static void PM_FlyMove( void ) { + int i; + vec3_t wishvel; + float wishspeed; + vec3_t wishdir; + float scale; + + // normal slowdown + PM_Friction (); + + scale = PM_CmdScale( &pm->cmd ); + + if ( pm->ps->pm_type == PM_SPECTATOR && pm->cmd.buttons & BUTTON_ALT_ATTACK) { + //turbo boost + scale *= 10; + } + + // + // user intentions + // + if ( !scale ) { + wishvel[0] = 0; + wishvel[1] = 0; + wishvel[2] = pm->ps->speed * (pm->cmd.upmove/127.0f); + } else { + for (i=0 ; i<3 ; i++) { + wishvel[i] = scale * pml.forward[i]*pm->cmd.forwardmove + scale * pml.right[i]*pm->cmd.rightmove; + } + + wishvel[2] += scale * pm->cmd.upmove; + } + + VectorCopy (wishvel, wishdir); + wishspeed = VectorNormalize(wishdir); + + PM_Accelerate (wishdir, wishspeed, pm_flyaccelerate); + + PM_StepSlideMove( qfalse ); +} + + +/* +=================== +PM_AirMove + +=================== +*/ +static void PM_AirMove( void ) { + int i; + vec3_t wishvel; + float fmove, smove; + vec3_t wishdir; + float wishspeed; + float scale; + usercmd_t cmd; + + if (pm->ps->pm_type != PM_SPECTATOR) + { +#if METROID_JUMP + PM_CheckJump(); +#else + if (pm->ps->fd.forceJumpZStart && + pm->ps->forceJumpFlip) + { + PM_CheckJump(); + } +#endif + } + PM_Friction(); + + fmove = pm->cmd.forwardmove; + smove = pm->cmd.rightmove; + + cmd = pm->cmd; + scale = PM_CmdScale( &cmd ); + + // set the movementDir so clients can rotate the legs for strafing + PM_SetMovementDir(); + + // project moves down to flat plane + pml.forward[2] = 0; + pml.right[2] = 0; + VectorNormalize (pml.forward); + VectorNormalize (pml.right); + + if ( gPMDoSlowFall ) + {//no air-control + VectorClear( wishvel ); + } + else + { + for ( i = 0 ; i < 2 ; i++ ) + { + wishvel[i] = pml.forward[i]*fmove + pml.right[i]*smove; + } + wishvel[2] = 0; + } + + VectorCopy (wishvel, wishdir); + wishspeed = VectorNormalize(wishdir); + wishspeed *= scale; + + // not on ground, so little effect on velocity + PM_Accelerate (wishdir, wishspeed, pm_airaccelerate); + + // we may have a ground plane that is very steep, even + // though we don't have a groundentity + // slide along the steep plane + if ( pml.groundPlane ) { + PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal, + pm->ps->velocity, OVERCLIP ); + } + + PM_StepSlideMove ( qtrue ); +} + +/* +=================== +PM_WalkMove + +=================== +*/ +static void PM_WalkMove( void ) { + int i; + vec3_t wishvel; + float fmove, smove; + vec3_t wishdir; + float wishspeed; + float scale; + usercmd_t cmd; + float accelerate; + float vel; + float totalVel; + + if (pm->ps->velocity[0] < 0) + { + totalVel = -pm->ps->velocity[0]; + } + else + { + totalVel = pm->ps->velocity[0]; + } + + if (pm->ps->velocity[1] < 0) + { + totalVel += -pm->ps->velocity[1]; + } + else + { + totalVel += pm->ps->velocity[1]; + } + + if (totalVel < 200) + { + pm->ps->fd.forceSpeedSmash = 1; + } + + if ( pm->waterlevel > 2 && DotProduct( pml.forward, pml.groundTrace.plane.normal ) > 0 ) { + // begin swimming + PM_WaterMove(); + return; + } + + + if (pm->ps->pm_type != PM_SPECTATOR) + { + if ( PM_CheckJump () ) { + // jumped away + if ( pm->waterlevel > 1 ) { + PM_WaterMove(); + } else { + PM_AirMove(); + } + return; + } + } + + PM_Friction (); + + fmove = pm->cmd.forwardmove; + smove = pm->cmd.rightmove; + + cmd = pm->cmd; + scale = PM_CmdScale( &cmd ); + + // set the movementDir so clients can rotate the legs for strafing + PM_SetMovementDir(); + + // project moves down to flat plane + pml.forward[2] = 0; + pml.right[2] = 0; + + // project the forward and right directions onto the ground plane + PM_ClipVelocity (pml.forward, pml.groundTrace.plane.normal, pml.forward, OVERCLIP ); + PM_ClipVelocity (pml.right, pml.groundTrace.plane.normal, pml.right, OVERCLIP ); + // + VectorNormalize (pml.forward); + VectorNormalize (pml.right); + + for ( i = 0 ; i < 3 ; i++ ) { + wishvel[i] = pml.forward[i]*fmove + pml.right[i]*smove; + } + // when going up or down slopes the wish velocity should Not be zero + + VectorCopy (wishvel, wishdir); + wishspeed = VectorNormalize(wishdir); + wishspeed *= scale; + + // clamp the speed lower if ducking + if ( pm->ps->pm_flags & PMF_DUCKED ) { + if ( wishspeed > pm->ps->speed * pm_duckScale ) { + wishspeed = pm->ps->speed * pm_duckScale; + } + } + else if ( (pm->ps->pm_flags & PMF_ROLLING) && !BG_InRoll(pm->ps, pm->ps->legsAnim) && + !PM_InRollComplete(pm->ps, pm->ps->legsAnim)) + { + if ( wishspeed > pm->ps->speed * pm_duckScale ) { + wishspeed = pm->ps->speed * pm_duckScale; + } + } + + // clamp the speed lower if wading or walking on the bottom + if ( pm->waterlevel ) { + float waterScale; + + waterScale = pm->waterlevel / 3.0; + waterScale = 1.0 - ( 1.0 - pm_swimScale ) * waterScale; + if ( wishspeed > pm->ps->speed * waterScale ) { + wishspeed = pm->ps->speed * waterScale; + } + } + + // when a player gets hit, they temporarily lose + // full control, which allows them to be moved a bit + if ( ( pml.groundTrace.surfaceFlags & SURF_SLICK ) || pm->ps->pm_flags & PMF_TIME_KNOCKBACK ) { + accelerate = pm_airaccelerate; + } else { + accelerate = pm_accelerate; + } + + PM_Accelerate (wishdir, wishspeed, accelerate); + + //Com_Printf("velocity = %1.1f %1.1f %1.1f\n", pm->ps->velocity[0], pm->ps->velocity[1], pm->ps->velocity[2]); + //Com_Printf("velocity1 = %1.1f\n", VectorLength(pm->ps->velocity)); + + if ( ( pml.groundTrace.surfaceFlags & SURF_SLICK ) || pm->ps->pm_flags & PMF_TIME_KNOCKBACK ) + { + pm->ps->velocity[2] -= pm->ps->gravity * pml.frametime; + } + + vel = VectorLength(pm->ps->velocity); + + // slide along the ground plane + PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal, + pm->ps->velocity, OVERCLIP ); + + // don't decrease velocity when going up or down a slope + VectorNormalize(pm->ps->velocity); + VectorScale(pm->ps->velocity, vel, pm->ps->velocity); + + // don't do anything if standing still + if (!pm->ps->velocity[0] && !pm->ps->velocity[1]) { + pm->ps->fd.forceSpeedSmash = 1; + return; + } + + PM_StepSlideMove( qfalse ); + + //Com_Printf("velocity2 = %1.1f\n", VectorLength(pm->ps->velocity)); +} + + +/* +============== +PM_DeadMove +============== +*/ +static void PM_DeadMove( void ) { + float forward; + + if ( !pml.walking ) { + return; + } + + // extra friction + + forward = VectorLength (pm->ps->velocity); + forward -= 20; + if ( forward <= 0 ) { + VectorClear (pm->ps->velocity); + } else { + VectorNormalize (pm->ps->velocity); + VectorScale (pm->ps->velocity, forward, pm->ps->velocity); + } +} + + +/* +=============== +PM_NoclipMove +=============== +*/ +static void PM_NoclipMove( void ) { + float speed, drop, friction, control, newspeed; + int i; + vec3_t wishvel; + float fmove, smove; + vec3_t wishdir; + float wishspeed; + float scale; + + pm->ps->viewheight = DEFAULT_VIEWHEIGHT; + + // friction + + speed = VectorLength (pm->ps->velocity); + if (speed < 1) + { + VectorCopy (vec3_origin, pm->ps->velocity); + } + else + { + drop = 0; + + friction = pm_friction*1.5; // extra friction + control = speed < pm_stopspeed ? pm_stopspeed : speed; + drop += control*friction*pml.frametime; + + // scale the velocity + newspeed = speed - drop; + if (newspeed < 0) + newspeed = 0; + newspeed /= speed; + + VectorScale (pm->ps->velocity, newspeed, pm->ps->velocity); + } + + // accelerate + scale = PM_CmdScale( &pm->cmd ); + if (pm->cmd.buttons & BUTTON_ATTACK) { //turbo boost + scale *= 10; + } + if (pm->cmd.buttons & BUTTON_ALT_ATTACK) { //turbo boost + scale *= 10; + } + + fmove = pm->cmd.forwardmove; + smove = pm->cmd.rightmove; + + for (i=0 ; i<3 ; i++) + wishvel[i] = pml.forward[i]*fmove + pml.right[i]*smove; + wishvel[2] += pm->cmd.upmove; + + VectorCopy (wishvel, wishdir); + wishspeed = VectorNormalize(wishdir); + wishspeed *= scale; + + PM_Accelerate( wishdir, wishspeed, pm_accelerate ); + + // move + VectorMA (pm->ps->origin, pml.frametime, pm->ps->velocity, pm->ps->origin); +} + +//============================================================================ + +/* +================ +PM_FootstepForSurface + +Returns an event number apropriate for the groundsurface +================ +*/ +static int PM_FootstepForSurface( void ) +{ + if ( pml.groundTrace.surfaceFlags & SURF_NOSTEPS ) + { + return 0; + } + if ( pml.groundTrace.surfaceFlags & SURF_METALSTEPS ) + { + return EV_FOOTSTEP_METAL; + } + return EV_FOOTSTEP; +} + +static int PM_TryRoll( void ) +{ + trace_t trace; + int anim = -1; + vec3_t fwd, right, traceto, mins, maxs, fwdAngles; + + if ( BG_SaberInAttack( pm->ps->saberMove ) || BG_SaberInSpecialAttack( pm->ps->torsoAnim ) + || BG_SpinningSaberAnim( pm->ps->legsAnim ) + || PM_SaberInStart( pm->ps->saberMove ) ) + {//attacking or spinning (or, if player, starting an attack) + return 0; + } + + if (pm->ps->weapon != WP_SABER || BG_HasYsalamiri(pm->gametype, pm->ps) || + !BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_LEVITATION)) + { //Not using saber, or can't use jump + return 0; + } + + VectorSet(mins, pm->mins[0],pm->mins[1],pm->mins[2]+STEPSIZE); + VectorSet(maxs, pm->maxs[0],pm->maxs[1],CROUCH_MAXS_2); + + VectorSet(fwdAngles, 0, pm->ps->viewangles[YAW], 0); + + AngleVectors( fwdAngles, fwd, right, NULL ); + + if ( pm->cmd.forwardmove ) + { //check forward/backward rolls + if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) + { + anim = BOTH_ROLL_B; + VectorMA( pm->ps->origin, -64, fwd, traceto ); + } + else + { + anim = BOTH_ROLL_F; + VectorMA( pm->ps->origin, 64, fwd, traceto ); + } + } + else if ( pm->cmd.rightmove > 0 ) + { //right + anim = BOTH_ROLL_R; + VectorMA( pm->ps->origin, 64, right, traceto ); + } + else if ( pm->cmd.rightmove < 0 ) + { //left + anim = BOTH_ROLL_L; + VectorMA( pm->ps->origin, -64, right, traceto ); + } + + if ( anim != -1 ) + { //We want to roll. Perform a trace to see if we can, and if so, send us into one. + pm->trace( &trace, pm->ps->origin, mins, maxs, traceto, pm->ps->clientNum, CONTENTS_SOLID ); + if ( trace.fraction >= 1.0f ) + { + pm->ps->saberMove = LS_NONE; + return anim; + } + } + return 0; +} + +/* +================= +PM_CrashLand + +Check for hard landings that generate sound events +================= +*/ +static void PM_CrashLand( void ) { + float delta; + float dist; + float vel, acc; + float t; + float a, b, c, den; + qboolean didRoll = qfalse; + + // calculate the exact velocity on landing + dist = pm->ps->origin[2] - pml.previous_origin[2]; + vel = pml.previous_velocity[2]; + acc = -pm->ps->gravity; + + a = acc / 2; + b = vel; + c = -dist; + + den = b * b - 4 * a * c; + if ( den < 0 ) { + pm->ps->inAirAnim = qfalse; + return; + } + t = (-b - sqrt( den ) ) / ( 2 * a ); + + delta = vel + t * acc; + delta = delta*delta * 0.0001; + + // ducking while falling doubles damage + if ( pm->ps->pm_flags & PMF_DUCKED ) { + delta *= 2; + } + + // decide which landing animation to use + if (!BG_InRoll(pm->ps, pm->ps->legsAnim) && pm->ps->inAirAnim) + { //only play a land animation if we transitioned into an in-air animation while off the ground + if (!BG_SaberInSpecial(pm->ps->saberMove)) + { + if ( pm->ps->pm_flags & PMF_BACKWARDS_JUMP ) { + PM_ForceLegsAnim( BOTH_LANDBACK1 ); + } else { + PM_ForceLegsAnim( BOTH_LAND1 ); + } + } + } + + if (pm->ps->weapon != WP_SABER) + { //saber handles its own anims + //This will push us back into our weaponready stance from the land anim. + if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1) + { + PM_StartTorsoAnim( TORSO_WEAPONREADY4 ); + } + else + { + if (pm->ps->weapon == WP_EMPLACED_GUN) + { + PM_StartTorsoAnim( BOTH_GUNSIT1 ); + } + else + { + PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); + } + } + } + + if (!BG_InSpecialJump(pm->ps->legsAnim) || + pm->ps->legsTimer < 1 || + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_LEFT || + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_WALL_RUN_RIGHT) + { //Only set the timer if we're in an anim that can be interrupted (this would not be, say, a flip) + if (!BG_InRoll(pm->ps, pm->ps->legsAnim) && pm->ps->inAirAnim) + { + if (!BG_SaberInSpecial(pm->ps->saberMove) || pm->ps->weapon != WP_SABER) + { + pm->ps->legsTimer = TIMER_LAND; + } + } + } + + pm->ps->inAirAnim = qfalse; + + // never take falling damage if completely underwater + if ( pm->waterlevel == 3 ) { + return; + } + + // reduce falling damage if there is standing water + if ( pm->waterlevel == 2 ) { + delta *= 0.25; + } + if ( pm->waterlevel == 1 ) { + delta *= 0.5; + } + + if ( delta < 1 ) { + return; + } + + if ( pm->ps->pm_flags & PMF_DUCKED ) + { + if( delta >= 2 && !PM_InOnGroundAnim( pm->ps->legsAnim ) && !PM_InKnockDown( pm->ps ) && !BG_InRoll(pm->ps, pm->ps->legsAnim) && + pm->ps->forceHandExtend == HANDEXTEND_NONE ) + {//roll! + int anim = PM_TryRoll(); + + if (PM_InRollComplete(pm->ps, pm->ps->legsAnim)) + { + anim = 0; + pm->ps->legsTimer = 0; + pm->ps->legsAnim = 0; + PM_SetAnim(SETANIM_BOTH,BOTH_LAND1,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150); + pm->ps->legsTimer = TIMER_LAND; + } + + if ( anim ) + {//absorb some impact + pm->ps->legsTimer = 0; + delta /= 3; // /= 2 just cancels out the above delta *= 2 when landing while crouched, the roll itself should absorb a little damage + pm->ps->legsAnim = 0; + PM_SetAnim(SETANIM_BOTH,anim,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150); + didRoll = qtrue; + } + } + } + + // SURF_NODAMAGE is used for bounce pads where you don't ever + // want to take damage or play a crunch sound + if ( !(pml.groundTrace.surfaceFlags & SURF_NODAMAGE) ) { + if (delta > 7) + { + int delta_send = (int)delta; + + if (delta_send > 600) + { //will never need to know any value above this + delta_send = 600; + } + + if (pm->ps->fd.forceJumpZStart) + { + if ((int)pm->ps->origin[2] >= (int)pm->ps->fd.forceJumpZStart) + { //was force jumping, landed on higher or same level as when force jump was started + if (delta_send > 8) + { + delta_send = 8; + } + } + else + { + if (delta_send > 8) + { + int dif = ((int)pm->ps->fd.forceJumpZStart - (int)pm->ps->origin[2]); + int dmgLess = (forceJumpHeight[pm->ps->fd.forcePowerLevel[FP_LEVITATION]] - dif); + + if (dmgLess < 0) + { + dmgLess = 0; + } + + delta_send -= (dmgLess*0.3); + + if (delta_send < 8) + { + delta_send = 8; + } + + //Com_Printf("Damage sub: %i\n", (int)((dmgLess*0.1))); + } + } + } + + if (didRoll) + { //Add the appropriate event.. + PM_AddEventWithParm( EV_ROLL, delta_send ); + } + else + { + PM_AddEventWithParm( EV_FALL, delta_send ); + } + } + else + { + if (didRoll) + { + PM_AddEventWithParm( EV_ROLL, 0 ); + } + else + { + PM_AddEvent( PM_FootstepForSurface() ); + } + } + } + + // make sure velocity resets so we don't bounce back up again in case we miss the clear elsewhere + pm->ps->velocity[2] = 0; + + // start footstep cycle over + pm->ps->bobCycle = 0; +} + +/* +============= +PM_CorrectAllSolid +============= +*/ +static int PM_CorrectAllSolid( trace_t *trace ) { + int i, j, k; + vec3_t point; + + if ( pm->debugLevel ) { + Com_Printf("%i:allsolid\n", c_pmove); + } + + // jitter around + for (i = -1; i <= 1; i++) { + for (j = -1; j <= 1; j++) { + for (k = -1; k <= 1; k++) { + VectorCopy(pm->ps->origin, point); + point[0] += (float) i; + point[1] += (float) j; + point[2] += (float) k; + pm->trace (trace, point, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask); + if ( !trace->allsolid ) { + point[0] = pm->ps->origin[0]; + point[1] = pm->ps->origin[1]; + point[2] = pm->ps->origin[2] - 0.25; + + pm->trace (trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask); + pml.groundTrace = *trace; + return qtrue; + } + } + } + } + + pm->ps->groundEntityNum = ENTITYNUM_NONE; + pml.groundPlane = qfalse; + pml.walking = qfalse; + + return qfalse; +} + +/* +============= +PM_GroundTraceMissed + +The ground trace didn't hit a surface, so we are in freefall +============= +*/ +static void PM_GroundTraceMissed( void ) { + trace_t trace; + vec3_t point; + + //rww - don't want to do this when handextend_choke, because you can be standing on the ground + //while still holding your throat. + if ( pm->ps->pm_type == PM_FLOAT ) + { + //we're assuming this is because you're being choked + int parts = SETANIM_LEGS; + + //rww - also don't use SETANIM_FLAG_HOLD, it will cause the legs to float around a bit before going into + //a proper anim even when on the ground. + PM_SetAnim(parts, BOTH_CHOKE3, SETANIM_FLAG_OVERRIDE, 100); + } + //If the anim is choke3, act like we just went into the air because we aren't in a float + else if ( pm->ps->groundEntityNum != ENTITYNUM_NONE || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_CHOKE3 ) + { + // we just transitioned into freefall + if ( pm->debugLevel ) { + Com_Printf("%i:lift\n", c_pmove); + } + + // if they aren't in a jumping animation and the ground is a ways away, force into it + // if we didn't do the trace, the player would be backflipping down staircases + VectorCopy( pm->ps->origin, point ); + point[2] -= 64; + + pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask); + if ( trace.fraction == 1.0 || pm->ps->pm_type == PM_FLOAT ) { + if ( pm->ps->velocity[2] <= 0 && !(pm->ps->pm_flags&PMF_JUMP_HELD)) + { + PM_SetAnim(SETANIM_LEGS,BOTH_INAIR1,SETANIM_FLAG_OVERRIDE, 100); + pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; + } + else if ( pm->cmd.forwardmove >= 0 ) + { + PM_SetAnim(SETANIM_LEGS,BOTH_JUMP1,SETANIM_FLAG_OVERRIDE, 100); + pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; + } + else + { + PM_SetAnim(SETANIM_LEGS,BOTH_JUMPBACK1,SETANIM_FLAG_OVERRIDE, 100); + pm->ps->pm_flags |= PMF_BACKWARDS_JUMP; + } + + pm->ps->inAirAnim = qtrue; + } + } + else if (!pm->ps->inAirAnim) + { + // if they aren't in a jumping animation and the ground is a ways away, force into it + // if we didn't do the trace, the player would be backflipping down staircases + VectorCopy( pm->ps->origin, point ); + point[2] -= 64; + + pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask); + if ( trace.fraction == 1.0 || pm->ps->pm_type == PM_FLOAT ) + { + pm->ps->inAirAnim = qtrue; + } + } + + if (PM_InRollComplete(pm->ps, pm->ps->legsAnim)) + { //Client won't catch an animation restart because it only checks frame against incoming frame, so if you roll when you land after rolling + //off of something it won't replay the roll anim unless we switch it off in the air. This fixes that. + PM_SetAnim(SETANIM_BOTH,BOTH_INAIR1,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150); + pm->ps->inAirAnim = qtrue; + } + + pm->ps->groundEntityNum = ENTITYNUM_NONE; + pml.groundPlane = qfalse; + pml.walking = qfalse; +} + + +/* +============= +PM_GroundTrace +============= +*/ +static void PM_GroundTrace( void ) { + vec3_t point; + trace_t trace; + + point[0] = pm->ps->origin[0]; + point[1] = pm->ps->origin[1]; + point[2] = pm->ps->origin[2] - 0.25; + + pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask); + pml.groundTrace = trace; + + // do something corrective if the trace starts in a solid... + if ( trace.allsolid ) { + if ( !PM_CorrectAllSolid(&trace) ) + return; + } + + if (pm->ps->pm_type == PM_FLOAT) + { + PM_GroundTraceMissed(); + pml.groundPlane = qfalse; + pml.walking = qfalse; + return; + } + + // if the trace didn't hit anything, we are in free fall + if ( trace.fraction == 1.0 ) { + PM_GroundTraceMissed(); + pml.groundPlane = qfalse; + pml.walking = qfalse; + return; + } + + // check if getting thrown off the ground + if ( pm->ps->velocity[2] > 0 && DotProduct( pm->ps->velocity, trace.plane.normal ) > 10 ) { + if ( pm->debugLevel ) { + Com_Printf("%i:kickoff\n", c_pmove); + } + // go into jump animation + if ( pm->cmd.forwardmove >= 0 ) { + PM_ForceLegsAnim( BOTH_JUMP1 ); + pm->ps->pm_flags &= ~PMF_BACKWARDS_JUMP; + } else { + PM_ForceLegsAnim( BOTH_JUMPBACK1 ); + pm->ps->pm_flags |= PMF_BACKWARDS_JUMP; + } + + pm->ps->groundEntityNum = ENTITYNUM_NONE; + pml.groundPlane = qfalse; + pml.walking = qfalse; + return; + } + + // slopes that are too steep will not be considered onground + if ( trace.plane.normal[2] < MIN_WALK_NORMAL ) { + if ( pm->debugLevel ) { + Com_Printf("%i:steep\n", c_pmove); + } + pm->ps->groundEntityNum = ENTITYNUM_NONE; + pml.groundPlane = qtrue; + pml.walking = qfalse; + return; + } + + pml.groundPlane = qtrue; + pml.walking = qtrue; + + // hitting solid ground will end a waterjump + if (pm->ps->pm_flags & PMF_TIME_WATERJUMP) + { + pm->ps->pm_flags &= ~(PMF_TIME_WATERJUMP | PMF_TIME_LAND); + pm->ps->pm_time = 0; + } + + if ( pm->ps->groundEntityNum == ENTITYNUM_NONE ) { + // just hit the ground + if ( pm->debugLevel ) { + Com_Printf("%i:Land\n", c_pmove); + } + + PM_CrashLand(); + + // don't do landing time if we were just going down a slope + if ( pml.previous_velocity[2] < -200 ) { + // don't allow another jump for a little while + pm->ps->pm_flags |= PMF_TIME_LAND; + pm->ps->pm_time = 250; + } + } + + pm->ps->groundEntityNum = trace.entityNum; + pm->ps->lastOnGround = pm->cmd.serverTime; + + PM_AddTouchEnt( trace.entityNum ); +} + + +/* +============= +PM_SetWaterLevel +============= +*/ +static void PM_SetWaterLevel( void ) { + vec3_t point; + int cont; + int sample1; + int sample2; + + // + // get waterlevel, accounting for ducking + // + pm->waterlevel = 0; + pm->watertype = 0; + + point[0] = pm->ps->origin[0]; + point[1] = pm->ps->origin[1]; + point[2] = pm->ps->origin[2] + MINS_Z + 1; + cont = pm->pointcontents( point, pm->ps->clientNum ); + + if ( cont & MASK_WATER ) { + sample2 = pm->ps->viewheight - MINS_Z; + sample1 = sample2 / 2; + + pm->watertype = cont; + pm->waterlevel = 1; + point[2] = pm->ps->origin[2] + MINS_Z + sample1; + cont = pm->pointcontents (point, pm->ps->clientNum ); + if ( cont & MASK_WATER ) { + pm->waterlevel = 2; + point[2] = pm->ps->origin[2] + MINS_Z + sample2; + cont = pm->pointcontents (point, pm->ps->clientNum ); + if ( cont & MASK_WATER ){ + pm->waterlevel = 3; + } + } + } + +} + +/* +============== +PM_CheckDuck + +Sets mins, maxs, and pm->ps->viewheight +============== +*/ +static void PM_CheckDuck (void) +{ + trace_t trace; + + pm->mins[0] = -15; + pm->mins[1] = -15; + + pm->maxs[0] = 15; + pm->maxs[1] = 15; + + pm->mins[2] = MINS_Z; + + if (pm->ps->pm_type == PM_DEAD) + { + pm->maxs[2] = -8; + pm->ps->viewheight = DEAD_VIEWHEIGHT; + return; + } + + if (pm->ps->usingATST) + { + if (pm->cmd.upmove < 0) + { + pm->cmd.upmove = 0; + } + } + + if (BG_InRoll(pm->ps, pm->ps->legsAnim)) + { + pm->maxs[2] = CROUCH_MAXS_2; + pm->ps->viewheight = DEFAULT_VIEWHEIGHT; + pm->ps->pm_flags &= ~PMF_DUCKED; + pm->ps->pm_flags |= PMF_ROLLING; + return; + } + else if (pm->ps->pm_flags & PMF_ROLLING) + { + // try to stand up + pm->maxs[2] = DEFAULT_MAXS_2; + pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, pm->ps->origin, pm->ps->clientNum, pm->tracemask ); + if (!trace.allsolid) + pm->ps->pm_flags &= ~PMF_ROLLING; + } + else if (pm->cmd.upmove < 0 || + pm->ps->forceHandExtend == HANDEXTEND_KNOCKDOWN) + { // duck + pm->ps->pm_flags |= PMF_DUCKED; + } + else + { // stand up if possible + if (pm->ps->pm_flags & PMF_DUCKED) + { + // try to stand up + pm->maxs[2] = DEFAULT_MAXS_2; + pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, pm->ps->origin, pm->ps->clientNum, pm->tracemask ); + if (!trace.allsolid) + pm->ps->pm_flags &= ~PMF_DUCKED; + } + } + + if (pm->ps->pm_flags & PMF_DUCKED) + { + pm->maxs[2] = CROUCH_MAXS_2; + pm->ps->viewheight = CROUCH_VIEWHEIGHT; + } + else if (pm->ps->pm_flags & PMF_ROLLING) + { + pm->maxs[2] = CROUCH_MAXS_2; + pm->ps->viewheight = DEFAULT_VIEWHEIGHT; + } + else + { + pm->maxs[2] = DEFAULT_MAXS_2; + pm->ps->viewheight = DEFAULT_VIEWHEIGHT; + } + + if (pm->ps->usingATST) + { + pm->mins[0] = ATST_MINS0; + pm->mins[1] = ATST_MINS1; + pm->mins[2] = ATST_MINS2; + + pm->maxs[0] = ATST_MAXS0; + pm->maxs[1] = ATST_MAXS1; + pm->maxs[2] = ATST_MAXS2; + } +} + + + +//=================================================================== + + + +/* +============== +PM_Use + +Generates a use event +============== +*/ +#define USE_DELAY 2000 + +void PM_Use( void ) +{ + if ( pm->ps->useTime > 0 ) + pm->ps->useTime -= 100;//pm->cmd.msec; + + if ( pm->ps->useTime > 0 ) { + return; + } + + if ( ! (pm->cmd.buttons & BUTTON_USE ) ) + { + pm->useEvent = 0; + pm->ps->useTime = 0; + return; + } + + pm->useEvent = EV_USE; + pm->ps->useTime = USE_DELAY; +} + +qboolean PM_RunningAnim( int anim ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_RUN1: + case BOTH_RUN2: + case BOTH_RUNBACK1: + case BOTH_RUNBACK2: + case BOTH_RUNAWAY1: + return qtrue; + break; + } + return qfalse; +} + +/* +=============== +PM_Footsteps +=============== +*/ +static void PM_Footsteps( void ) { + float bobmove; + int old; + qboolean footstep; + int setAnimFlags = 0; + + if ( (PM_InSaberAnim( (pm->ps->legsAnim&~ANIM_TOGGLEBIT) ) && !BG_SpinningSaberAnim( (pm->ps->legsAnim&~ANIM_TOGGLEBIT) )) + || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_STAND1 + || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_STAND1TO2 + || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_STAND2TO1 + || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_STAND2 + || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_SABERFAST_STANCE + || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_SABERSLOW_STANCE + || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_BUTTON_HOLD + || (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_BUTTON_RELEASE + || PM_LandingAnim( (pm->ps->legsAnim&~ANIM_TOGGLEBIT) ) + || PM_PainAnim( (pm->ps->legsAnim&~ANIM_TOGGLEBIT) )) + {//legs are in a saber anim, and not spinning, be sure to override it + setAnimFlags |= SETANIM_FLAG_OVERRIDE; + } + + // + // calculate speed and cycle to be used for + // all cyclic walking effects + // + pm->xyspeed = sqrt( pm->ps->velocity[0] * pm->ps->velocity[0] + + pm->ps->velocity[1] * pm->ps->velocity[1] ); + + if ( pm->ps->groundEntityNum == ENTITYNUM_NONE ) { + + // airborne leaves position in cycle intact, but doesn't advance + if ( pm->waterlevel > 1 ) + { + if (pm->xyspeed > 60) + { + PM_ContinueLegsAnim( BOTH_SWIMFORWARD ); + } + else + { + PM_ContinueLegsAnim( BOTH_SWIM_IDLE1 ); + } + } + return; + } + + // if not trying to move + if ( !pm->cmd.forwardmove && !pm->cmd.rightmove ) { + if ( pm->xyspeed < 5 ) { + pm->ps->bobCycle = 0; // start at beginning of cycle again + if ( (pm->ps->pm_flags & PMF_DUCKED) || (pm->ps->pm_flags & PMF_ROLLING) ) { + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_CROUCH1IDLE) + { + PM_SetAnim(SETANIM_LEGS, BOTH_CROUCH1IDLE, setAnimFlags, 100); + } + else + { + PM_ContinueLegsAnim( BOTH_CROUCH1IDLE ); + } + } else { + if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1) + { + PM_ContinueLegsAnim( TORSO_WEAPONREADY4 ); + } + else + { + if (pm->ps->weapon == WP_SABER && pm->ps->saberHolstered) + { + PM_ContinueLegsAnim( BOTH_STAND1 ); + } + else + { + PM_ContinueLegsAnim( WeaponReadyAnim[pm->ps->weapon] ); + } + } + } + } + return; + } + + + footstep = qfalse; + + if ( pm->ps->pm_flags & PMF_DUCKED ) + { + int rolled = 0; + + bobmove = 0.5; // ducked characters bob much faster + + if ( PM_RunningAnim( pm->ps->legsAnim ) && !BG_InRoll(pm->ps, pm->ps->legsAnim) ) + {//roll! + rolled = PM_TryRoll(); + } + if ( !rolled ) + { //if the roll failed or didn't attempt, do standard crouching anim stuff. + if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) { + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_CROUCH1WALKBACK) + { + PM_SetAnim(SETANIM_LEGS, BOTH_CROUCH1WALKBACK, setAnimFlags, 100); + } + else + { + PM_ContinueLegsAnim( BOTH_CROUCH1WALKBACK ); + } + } + else { + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_CROUCH1WALK) + { + PM_SetAnim(SETANIM_LEGS, BOTH_CROUCH1WALK, setAnimFlags, 100); + } + else + { + PM_ContinueLegsAnim( BOTH_CROUCH1WALK ); + } + } + } + else + { //otherwise send us into the roll + pm->ps->legsTimer = 0; + pm->ps->legsAnim = 0; + PM_SetAnim(SETANIM_BOTH,rolled,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 150); + PM_AddEventWithParm( EV_ROLL, 0 ); + pm->maxs[2] = CROUCH_MAXS_2; + pm->ps->viewheight = DEFAULT_VIEWHEIGHT; + pm->ps->pm_flags &= ~PMF_DUCKED; + pm->ps->pm_flags |= PMF_ROLLING; + } + } + else if ((pm->ps->pm_flags & PMF_ROLLING) && !BG_InRoll(pm->ps, pm->ps->legsAnim) && + !PM_InRollComplete(pm->ps, pm->ps->legsAnim)) + { + bobmove = 0.5; // ducked characters bob much faster + + if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) + { + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_CROUCH1WALKBACK) + { + PM_SetAnim(SETANIM_LEGS, BOTH_CROUCH1WALKBACK, setAnimFlags, 100); + } + else + { + PM_ContinueLegsAnim( BOTH_CROUCH1WALKBACK ); + } + } + else + { + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_CROUCH1WALK) + { + PM_SetAnim(SETANIM_LEGS, BOTH_CROUCH1WALK, setAnimFlags, 100); + } + else + { + PM_ContinueLegsAnim( BOTH_CROUCH1WALK ); + } + } + } + else + { + if ( !( pm->cmd.buttons & BUTTON_WALKING ) ) { + bobmove = 0.4f; // faster speeds bob faster + if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) { + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_RUNBACK1) + { + PM_SetAnim(SETANIM_LEGS, BOTH_RUNBACK1, setAnimFlags, 100); + } + else + { + PM_ContinueLegsAnim( BOTH_RUNBACK1 ); + } + } + else { + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_RUN1) + { + PM_SetAnim(SETANIM_LEGS, BOTH_RUN1, setAnimFlags, 100); + } + else + { + PM_ContinueLegsAnim( BOTH_RUN1 ); + } + } + footstep = qtrue; + } else { + bobmove = 0.2f; // walking bobs slow + if ( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) { + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_WALKBACK1) + { + PM_SetAnim(SETANIM_LEGS, BOTH_WALKBACK1, setAnimFlags, 100); + } + else + { + PM_ContinueLegsAnim( BOTH_WALKBACK1 ); + } + } + else { + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) != BOTH_WALK1) + { + PM_SetAnim(SETANIM_LEGS, BOTH_WALK1, setAnimFlags, 100); + } + else + { + PM_ContinueLegsAnim( BOTH_WALK1 ); + } + } + } + } + + // check for footstep / splash sounds + old = pm->ps->bobCycle; + pm->ps->bobCycle = (int)( old + bobmove * pml.msec ) & 255; + + // if we just crossed a cycle boundary, play an apropriate footstep event + if ( ( ( old + 64 ) ^ ( pm->ps->bobCycle + 64 ) ) & 128 ) + { + pm->ps->footstepTime = pm->cmd.serverTime + 300; + if ( pm->waterlevel == 1 ) { + // splashing + PM_AddEvent( EV_FOOTSPLASH ); + } else if ( pm->waterlevel == 2 ) { + // wading / swimming at surface + PM_AddEvent( EV_SWIM ); + } else if ( pm->waterlevel == 3 ) { + // no sound when completely underwater + } + } +} + +/* +============== +PM_WaterEvents + +Generate sound events for entering and leaving water +============== +*/ +static void PM_WaterEvents( void ) { // FIXME? + // + // if just entered a water volume, play a sound + // + if (!pml.previous_waterlevel && pm->waterlevel) { + PM_AddEvent( EV_WATER_TOUCH ); + } + + // + // if just completely exited a water volume, play a sound + // + if (pml.previous_waterlevel && !pm->waterlevel) { + PM_AddEvent( EV_WATER_LEAVE ); + } + + // + // check for head just going under water + // + if (pml.previous_waterlevel != 3 && pm->waterlevel == 3) { + PM_AddEvent( EV_WATER_UNDER ); + } + + // + // check for head just coming out of water + // + if (pml.previous_waterlevel == 3 && pm->waterlevel != 3) { + PM_AddEvent( EV_WATER_CLEAR ); + } +} + + +/* +=============== +PM_BeginWeaponChange +=============== +*/ +void PM_BeginWeaponChange( int weapon ) { + if ( weapon <= WP_NONE || weapon >= WP_NUM_WEAPONS ) { + return; + } + + if ( !( pm->ps->stats[STAT_WEAPONS] & ( 1 << weapon ) ) ) { + return; + } + + if ( pm->ps->weaponstate == WEAPON_DROPPING ) { + return; + } + + // turn of any kind of zooming when weapon switching. + if (pm->ps->zoomMode) + { + pm->ps->zoomMode = 0; + pm->ps->zoomTime = pm->ps->commandTime; + } + + PM_AddEvent( EV_CHANGE_WEAPON ); + pm->ps->weaponstate = WEAPON_DROPPING; + pm->ps->weaponTime += 200; + PM_StartTorsoAnim( TORSO_DROPWEAP1 ); +} + + +/* +=============== +PM_FinishWeaponChange +=============== +*/ +void PM_FinishWeaponChange( void ) { + int weapon; + + weapon = pm->cmd.weapon; + if ( weapon < WP_NONE || weapon >= WP_NUM_WEAPONS ) { + weapon = WP_NONE; + } + + if ( !( pm->ps->stats[STAT_WEAPONS] & ( 1 << weapon ) ) ) { + weapon = WP_NONE; + } + + if (weapon == WP_SABER) + { + PM_SetSaberMove(LS_DRAW); + } + else + { + PM_StartTorsoAnim( TORSO_RAISEWEAP1); + } + pm->ps->weapon = weapon; + pm->ps->weaponstate = WEAPON_RAISING; + pm->ps->weaponTime += 250; +} + + + +//--------------------------------------- +static qboolean PM_DoChargedWeapons( void ) +//--------------------------------------- +{ + vec3_t ang; + trace_t tr; + qboolean charging = qfalse, + altFire = qfalse; + + // If you want your weapon to be a charging weapon, just set this bit up + switch( pm->ps->weapon ) + { + //------------------ + case WP_BRYAR_PISTOL: + + // alt-fire charges the weapon + if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) + { + charging = qtrue; + altFire = qtrue; + } + break; + + //------------------ + case WP_BOWCASTER: + + // primary fire charges the weapon + if ( pm->cmd.buttons & BUTTON_ATTACK ) + { + charging = qtrue; + } + break; + + //------------------ + case WP_ROCKET_LAUNCHER: + + // Not really a charge weapon, but we still want to delay fire until the button comes up so that we can + // implement our alt-fire locking stuff + if ( (pm->cmd.buttons & BUTTON_ALT_ATTACK) && pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] >= weaponData[pm->ps->weapon].altEnergyPerShot ) + { + vec3_t muzzleOffPoint, muzzlePoint, forward, right, up; + + AngleVectors( pm->ps->viewangles, forward, right, up ); + + charging = qtrue; + altFire = qtrue; + + AngleVectors(pm->ps->viewangles, ang, NULL, NULL); + + VectorCopy( pm->ps->origin, muzzlePoint ); + VectorCopy(WP_MuzzlePoint[WP_ROCKET_LAUNCHER], muzzleOffPoint); + + VectorMA(muzzlePoint, muzzleOffPoint[0], forward, muzzlePoint); + VectorMA(muzzlePoint, muzzleOffPoint[1], right, muzzlePoint); + muzzlePoint[2] += pm->ps->viewheight + muzzleOffPoint[2]; + + ang[0] = muzzlePoint[0] + ang[0]*2048; + ang[1] = muzzlePoint[1] + ang[1]*2048; + ang[2] = muzzlePoint[2] + ang[2]*2048; + + pm->trace(&tr, muzzlePoint, NULL, NULL, ang, pm->ps->clientNum, MASK_PLAYERSOLID); + + if (tr.fraction != 1 && tr.entityNum < MAX_CLIENTS && tr.entityNum != pm->ps->clientNum) + { + if (pm->ps->rocketLockIndex == MAX_CLIENTS) + { + pm->ps->rocketLockIndex = tr.entityNum; + pm->ps->rocketLockTime = pm->cmd.serverTime; + } + else if (pm->ps->rocketLockIndex != tr.entityNum && pm->ps->rocketTargetTime < pm->cmd.serverTime) + { + pm->ps->rocketLockIndex = tr.entityNum; + pm->ps->rocketLockTime = pm->cmd.serverTime; + } + else if (pm->ps->rocketLockIndex == tr.entityNum) + { + if (pm->ps->rocketLockTime == -1) + { + pm->ps->rocketLockTime = pm->ps->rocketLastValidTime; + } + } + + if (pm->ps->rocketLockIndex == tr.entityNum) + { + pm->ps->rocketTargetTime = pm->cmd.serverTime + 500; + } + } + else if (pm->ps->rocketTargetTime < pm->cmd.serverTime) + { + pm->ps->rocketLockIndex = MAX_CLIENTS; + pm->ps->rocketLockTime = 0; + } + else + { + if (pm->ps->rocketLockTime != -1) + { + pm->ps->rocketLastValidTime = pm->ps->rocketLockTime; + } + pm->ps->rocketLockTime = -1; + } + } + break; + + //------------------ + case WP_THERMAL: + + if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) + { + altFire = qtrue; // override default of not being an alt-fire + charging = qtrue; + } + else if ( pm->cmd.buttons & BUTTON_ATTACK ) + { + charging = qtrue; + } + break; + + case WP_DEMP2: + if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) + { + altFire = qtrue; // override default of not being an alt-fire + charging = qtrue; + } + break; + + case WP_DISRUPTOR: + if ((pm->cmd.buttons & BUTTON_ATTACK) && + pm->ps->zoomMode == 1 && + pm->ps->zoomLocked) + { + charging = qtrue; + altFire = qtrue; + } + + if (pm->ps->zoomMode != 1 && + pm->ps->weaponstate == WEAPON_CHARGING_ALT) + { + pm->ps->weaponstate = WEAPON_READY; + charging = qfalse; + altFire = qfalse; + } + + } // end switch + + + // set up the appropriate weapon state based on the button that's down. + // Note that we ALWAYS return if charging is set ( meaning the buttons are still down ) + if ( charging ) + { + if ( altFire ) + { + if ( pm->ps->weaponstate != WEAPON_CHARGING_ALT ) + { + // charge isn't started, so do it now + pm->ps->weaponstate = WEAPON_CHARGING_ALT; + pm->ps->weaponChargeTime = pm->cmd.serverTime; + pm->ps->weaponChargeSubtractTime = pm->cmd.serverTime + weaponData[pm->ps->weapon].altChargeSubTime; + +#ifdef _DEBUG + Com_Printf("Starting charge\n"); +#endif + assert(pm->ps->weapon > WP_NONE); + BG_AddPredictableEventToPlayerstate(EV_WEAPON_CHARGE_ALT, pm->ps->weapon, pm->ps); + } + + if (pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] < (weaponData[pm->ps->weapon].altChargeSub+weaponData[pm->ps->weapon].altEnergyPerShot)) + { + pm->ps->weaponstate = WEAPON_CHARGING_ALT; + + goto rest; + } + else if ((pm->cmd.serverTime - pm->ps->weaponChargeTime) < weaponData[pm->ps->weapon].altMaxCharge) + { + if (pm->ps->weaponChargeSubtractTime < pm->cmd.serverTime) + { + pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] -= weaponData[pm->ps->weapon].altChargeSub; + pm->ps->weaponChargeSubtractTime = pm->cmd.serverTime + weaponData[pm->ps->weapon].altChargeSubTime; + } + } + } + else + { + if ( pm->ps->weaponstate != WEAPON_CHARGING ) + { + // charge isn't started, so do it now + pm->ps->weaponstate = WEAPON_CHARGING; + pm->ps->weaponChargeTime = pm->cmd.serverTime; + pm->ps->weaponChargeSubtractTime = pm->cmd.serverTime + weaponData[pm->ps->weapon].chargeSubTime; + +#ifdef _DEBUG + Com_Printf("Starting charge\n"); +#endif + BG_AddPredictableEventToPlayerstate(EV_WEAPON_CHARGE, pm->ps->weapon, pm->ps); + } + + if (pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] < (weaponData[pm->ps->weapon].chargeSub+weaponData[pm->ps->weapon].energyPerShot)) + { + pm->ps->weaponstate = WEAPON_CHARGING; + + goto rest; + } + else if ((pm->cmd.serverTime - pm->ps->weaponChargeTime) < weaponData[pm->ps->weapon].maxCharge) + { + if (pm->ps->weaponChargeSubtractTime < pm->cmd.serverTime) + { + pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] -= weaponData[pm->ps->weapon].chargeSub; + pm->ps->weaponChargeSubtractTime = pm->cmd.serverTime + weaponData[pm->ps->weapon].chargeSubTime; + } + } + } + + return qtrue; // short-circuit rest of weapon code + } +rest: + // Only charging weapons should be able to set these states...so.... + // let's see which fire mode we need to set up now that the buttons are up + if ( pm->ps->weaponstate == WEAPON_CHARGING ) + { + // weapon has a charge, so let us do an attack +#ifdef _DEBUG + Com_Printf("Firing. Charge time=%d\n", pm->cmd.serverTime - pm->ps->weaponChargeTime); +#endif + + // dumb, but since we shoot a charged weapon on button-up, we need to repress this button for now + pm->cmd.buttons |= BUTTON_ATTACK; + pm->ps->eFlags |= EF_FIRING; + } + else if ( pm->ps->weaponstate == WEAPON_CHARGING_ALT ) + { + // weapon has a charge, so let us do an alt-attack +#ifdef _DEBUG + Com_Printf("Firing. Charge time=%d\n", pm->cmd.serverTime - pm->ps->weaponChargeTime); +#endif + + // dumb, but since we shoot a charged weapon on button-up, we need to repress this button for now + pm->cmd.buttons |= BUTTON_ALT_ATTACK; + pm->ps->eFlags |= (EF_FIRING|EF_ALT_FIRING); + } + + return qfalse; // continue with the rest of the weapon code +} + + +#define BOWCASTER_CHARGE_UNIT 200.0f // bowcaster charging gives us one more unit every 200ms--if you change this, you'll have to do the same in g_weapon +#define BRYAR_CHARGE_UNIT 200.0f // bryar charging gives us one more unit every 200ms--if you change this, you'll have to do the same in g_weapon + +int PM_ItemUsable(playerState_t *ps, int forcedUse) +{ + vec3_t fwd, fwdorg, dest, pos; + vec3_t yawonly; + vec3_t mins, maxs; + vec3_t trtest; + trace_t tr; + + if (ps->usingATST) + { + return 0; + } + + if (ps->pm_flags & PMF_USE_ITEM_HELD) + { //force to let go first + return 0; + } + + if (ps->duelInProgress) + { //not allowed to use holdables while in a private duel. + return 0; + } + + if (!forcedUse) + { + forcedUse = bg_itemlist[ps->stats[STAT_HOLDABLE_ITEM]].giTag; + } + + switch (forcedUse) + { + case HI_MEDPAC: + if (ps->stats[STAT_HEALTH] >= ps->stats[STAT_MAX_HEALTH]) + { + return 0; + } + if (ps->stats[STAT_HEALTH] <= 0 || + (ps->eFlags & EF_DEAD)) + { + return 0; + } + + return 1; + case HI_SEEKER: + if (ps->eFlags & EF_SEEKERDRONE) + { + PM_AddEventWithParm(EV_ITEMUSEFAIL, SEEKER_ALREADYDEPLOYED); + return 0; + } + + return 1; + case HI_SENTRY_GUN: + if (ps->fd.sentryDeployed) + { + PM_AddEventWithParm(EV_ITEMUSEFAIL, SENTRY_ALREADYPLACED); + return 0; + } + + yawonly[ROLL] = 0; + yawonly[PITCH] = 0; + yawonly[YAW] = ps->viewangles[YAW]; + + VectorSet( mins, -8, -8, 0 ); + VectorSet( maxs, 8, 8, 24 ); + + AngleVectors(yawonly, fwd, NULL, NULL); + + fwdorg[0] = ps->origin[0] + fwd[0]*64; + fwdorg[1] = ps->origin[1] + fwd[1]*64; + fwdorg[2] = ps->origin[2] + fwd[2]*64; + + trtest[0] = fwdorg[0] + fwd[0]*16; + trtest[1] = fwdorg[1] + fwd[1]*16; + trtest[2] = fwdorg[2] + fwd[2]*16; + + pm->trace(&tr, ps->origin, mins, maxs, trtest, ps->clientNum, MASK_PLAYERSOLID); + + if ((tr.fraction != 1 && tr.entityNum != ps->clientNum) || tr.startsolid || tr.allsolid) + { + PM_AddEventWithParm(EV_ITEMUSEFAIL, SENTRY_NOROOM); + return 0; + } + + return 1; + case HI_SHIELD: + mins[0] = -8; + mins[1] = -8; + mins[2] = 0; + + maxs[0] = 8; + maxs[1] = 8; + maxs[2] = 8; + + AngleVectors (ps->viewangles, fwd, NULL, NULL); + fwd[2] = 0; + VectorMA(ps->origin, 64, fwd, dest); + pm->trace(&tr, ps->origin, mins, maxs, dest, ps->clientNum, MASK_SHOT ); + if (tr.fraction > 0.9 && !tr.startsolid && !tr.allsolid) + { + VectorCopy(tr.endpos, pos); + VectorSet( dest, pos[0], pos[1], pos[2] - 4096 ); + pm->trace( &tr, pos, mins, maxs, dest, ps->clientNum, MASK_SOLID ); + if ( !tr.startsolid && !tr.allsolid ) + { + return 1; + } + } + PM_AddEventWithParm(EV_ITEMUSEFAIL, SHIELD_NOROOM); + return 0; + default: + return 1; + } +} + +/* +============== +PM_Weapon + +Generates weapon events and modifes the weapon counter +============== +*/ +static void PM_Weapon( void ) +{ + int addTime; + int amount; + int killAfterItem = 0; + + if (pm->ps->usingATST) + { + if ( pm->ps->weaponTime > 0 ) + { + pm->ps->weaponTime -= pml.msec; + } + + if (pm->ps->weaponTime < 1 && (pm->cmd.buttons & (BUTTON_ATTACK|BUTTON_ALT_ATTACK))) + { + pm->ps->weaponTime += 500; + + if (pm->ps->atstAltFire) + { + PM_AddEvent( EV_ALT_FIRE ); + pm->ps->atstAltFire = qfalse; + } + else + { + PM_AddEvent( EV_FIRE_WEAPON ); + pm->ps->atstAltFire = qtrue; + } + } + + return; + } + + if (pm->ps->weapon != WP_DISRUPTOR && pm->ps->weapon != WP_ROCKET_LAUNCHER) + { //check for exceeding max charge time if not using disruptor or rocket launcher + if ( pm->ps->weaponstate == WEAPON_CHARGING_ALT ) + { + int timeDif = (pm->cmd.serverTime - pm->ps->weaponChargeTime); + + if (timeDif > MAX_WEAPON_CHARGE_TIME) + { + pm->cmd.buttons &= ~BUTTON_ALT_ATTACK; + } + } + + if ( pm->ps->weaponstate == WEAPON_CHARGING ) + { + int timeDif = (pm->cmd.serverTime - pm->ps->weaponChargeTime); + + if (timeDif > MAX_WEAPON_CHARGE_TIME) + { + pm->cmd.buttons &= ~BUTTON_ATTACK; + } + } + } + + if (pm->ps->forceHandExtend == HANDEXTEND_WEAPONREADY) + { //reset into weapon stance + if (pm->ps->weapon != WP_SABER) + { //saber handles its own anims + if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1) + { + //PM_StartTorsoAnim( TORSO_WEAPONREADY4 ); + PM_StartTorsoAnim( TORSO_RAISEWEAP1); + } + else + { + if (pm->ps->weapon == WP_EMPLACED_GUN) + { + PM_StartTorsoAnim( BOTH_GUNSIT1 ); + } + else + { + //PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); + PM_StartTorsoAnim( TORSO_RAISEWEAP1); + } + } + } + + //we now go into a weapon raise anim after every force hand extend. + //this is so that my holster-view-weapon-when-hand-extend stuff works. + pm->ps->weaponstate = WEAPON_RAISING; + pm->ps->weaponTime += 250; + + pm->ps->forceHandExtend = HANDEXTEND_NONE; + } + else if (pm->ps->forceHandExtend != HANDEXTEND_NONE) + { //nothing else should be allowed to happen during this time, including weapon fire + int desiredAnim = 0; + qboolean seperateOnTorso = qfalse; + int desiredOnTorso = 0; + + switch(pm->ps->forceHandExtend) + { + case HANDEXTEND_FORCEPUSH: + desiredAnim = BOTH_FORCEPUSH; + break; + case HANDEXTEND_FORCEPULL: + desiredAnim = BOTH_FORCEPULL; + break; + case HANDEXTEND_FORCEGRIP: + desiredAnim = BOTH_FORCEGRIP_HOLD; + break; + case HANDEXTEND_SABERPULL: + desiredAnim = BOTH_SABERPULL; + break; + case HANDEXTEND_CHOKE: + desiredAnim = BOTH_CHOKE3; //left-handed choke + break; + case HANDEXTEND_DODGE: + desiredAnim = pm->ps->forceDodgeAnim; + break; + case HANDEXTEND_KNOCKDOWN: + if (pm->ps->forceDodgeAnim) + { + if (pm->ps->forceDodgeAnim > 4) + { //this means that we want to play a sepereate anim on the torso + int originalDAnim = pm->ps->forceDodgeAnim-8; //-8 is the original legs anim + if (originalDAnim == 2) + { + desiredAnim = BOTH_FORCE_GETUP_B1; + } + else if (originalDAnim == 3) + { + desiredAnim = BOTH_FORCE_GETUP_B3; + } + else + { + desiredAnim = BOTH_GETUP1; + } + + //now specify the torso anim + seperateOnTorso = qtrue; + desiredOnTorso = BOTH_FORCEPUSH; + } + else if (pm->ps->forceDodgeAnim == 2) + { + desiredAnim = BOTH_FORCE_GETUP_B1; + } + else if (pm->ps->forceDodgeAnim == 3) + { + desiredAnim = BOTH_FORCE_GETUP_B3; + } + else + { + desiredAnim = BOTH_GETUP1; + } + } + else + { + desiredAnim = BOTH_KNOCKDOWN1; + } + break; + case HANDEXTEND_DUELCHALLENGE: + desiredAnim = BOTH_ENGAGETAUNT; + break; + case HANDEXTEND_TAUNT: + desiredAnim = pm->ps->forceDodgeAnim; + break; + //Hmm... maybe use these, too? + //BOTH_FORCEHEAL_QUICK //quick heal (SP level 2 & 3) + //BOTH_MINDTRICK1 // wave (maybe for mind trick 2 & 3 - whole area, and for force seeing) + //BOTH_MINDTRICK2 // tap (maybe for mind trick 1 - one person) + //BOTH_FORCEGRIP_START //start grip + //BOTH_FORCEGRIP_HOLD //hold grip + //BOTH_FORCEGRIP_RELEASE //release grip + //BOTH_FORCELIGHTNING //quick lightning burst (level 1) + //BOTH_FORCELIGHTNING_START //start lightning + //BOTH_FORCELIGHTNING_HOLD //hold lightning + //BOTH_FORCELIGHTNING_RELEASE //release lightning + default: + desiredAnim = BOTH_FORCEPUSH; + break; + } + + if (!seperateOnTorso) + { //of seperateOnTorso, handle it after setting the legs + PM_SetAnim(SETANIM_TORSO, desiredAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); + pm->ps->torsoTimer = 1; + } + + if (pm->ps->forceHandExtend == HANDEXTEND_DODGE || pm->ps->forceHandExtend == HANDEXTEND_KNOCKDOWN || + (pm->ps->forceHandExtend == HANDEXTEND_CHOKE && pm->ps->groundEntityNum == ENTITYNUM_NONE) ) + { //special case, play dodge anim on whole body, choke anim too if off ground + if (seperateOnTorso) + { + PM_SetAnim(SETANIM_LEGS, desiredAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); + pm->ps->legsTimer = 1; + + PM_SetAnim(SETANIM_TORSO, desiredOnTorso, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); + pm->ps->torsoTimer = 1; + } + else + { + PM_SetAnim(SETANIM_LEGS, desiredAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); + pm->ps->legsTimer = 1; + } + } + + return; + } + + if (BG_InSpecialJump(pm->ps->legsAnim) || + BG_InRoll(pm->ps, pm->ps->legsAnim) || + PM_InRollComplete(pm->ps, pm->ps->legsAnim)) + { + pm->cmd.weapon = WP_SABER; + pm->ps->weapon = WP_SABER; + } + + if (pm->ps->duelInProgress) + { + pm->cmd.weapon = WP_SABER; + pm->ps->weapon = WP_SABER; + + if (pm->ps->duelTime >= pm->cmd.serverTime) + { + pm->cmd.upmove = 0; + pm->cmd.forwardmove = 0; + pm->cmd.rightmove = 0; + } + } + + if (pm->ps->weapon == WP_SABER && pm->ps->saberMove != LS_READY && pm->ps->saberMove != LS_NONE) + { + pm->cmd.weapon = WP_SABER; //don't allow switching out mid-attack + } + + if (pm->ps->weapon == WP_SABER) + { + //rww - we still need the item stuff, so we won't return immediately + PM_WeaponLightsaber(); + killAfterItem = 1; + } + else + { + pm->ps->saberHolstered = qfalse; + } + + if (pm->ps->weapon == WP_THERMAL || + pm->ps->weapon == WP_TRIP_MINE || + pm->ps->weapon == WP_DET_PACK) + { + if (pm->ps->weapon == WP_THERMAL) + { + if ((pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == WeaponAttackAnim[pm->ps->weapon] && + (pm->ps->weaponTime-200) <= 0) + { + PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); + } + } + else + { + if ((pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == WeaponAttackAnim[pm->ps->weapon] && + (pm->ps->weaponTime-700) <= 0) + { + PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); + } + } + } + + // don't allow attack until all buttons are up + if ( pm->ps->pm_flags & PMF_RESPAWNED ) { + return; + } + + // ignore if spectator + if ( pm->ps->persistant[PERS_TEAM] == TEAM_SPECTATOR ) { + return; + } + + // check for dead player + if ( pm->ps->stats[STAT_HEALTH] <= 0 ) { + pm->ps->weapon = WP_NONE; + return; + } + + // check for item using + if ( pm->cmd.buttons & BUTTON_USE_HOLDABLE ) { + if ( ! ( pm->ps->pm_flags & PMF_USE_ITEM_HELD ) ) { + + if (!pm->ps->stats[STAT_HOLDABLE_ITEM]) + { + return; + } + + if (!PM_ItemUsable(pm->ps, 0)) + { + pm->ps->pm_flags |= PMF_USE_ITEM_HELD; + return; + } + else + { + if (pm->ps->stats[STAT_HOLDABLE_ITEMS] & (1 << bg_itemlist[pm->ps->stats[STAT_HOLDABLE_ITEM]].giTag)) + { + if (bg_itemlist[pm->ps->stats[STAT_HOLDABLE_ITEM]].giTag != HI_BINOCULARS) + { //never use up the binoculars + pm->ps->stats[STAT_HOLDABLE_ITEMS] -= (1 << bg_itemlist[pm->ps->stats[STAT_HOLDABLE_ITEM]].giTag); + } + } + else + { + return; //this should not happen... + } + + pm->ps->pm_flags |= PMF_USE_ITEM_HELD; + PM_AddEvent( EV_USE_ITEM0 + bg_itemlist[pm->ps->stats[STAT_HOLDABLE_ITEM]].giTag ); + + if (bg_itemlist[pm->ps->stats[STAT_HOLDABLE_ITEM]].giTag != HI_BINOCULARS) + { + pm->ps->stats[STAT_HOLDABLE_ITEM] = 0; + BG_CycleInven(pm->ps, 1); + } + } + return; + } + } else { + pm->ps->pm_flags &= ~PMF_USE_ITEM_HELD; + } + + if (pm->ps->weapon == WP_SABER) + { //we can't toggle zoom while using saber (for obvious reasons) so make sure it's always off + pm->ps->zoomMode = 0; + pm->ps->zoomFov = 0; + pm->ps->zoomLocked = qfalse; + pm->ps->zoomLockTime = 0; + } + + if (killAfterItem) + { + return; + } + + // make weapon function + if ( pm->ps->weaponTime > 0 ) { + pm->ps->weaponTime -= pml.msec; + } + + if (pm->ps->isJediMaster && pm->ps->emplacedIndex) + { + pm->ps->emplacedIndex = 0; + } + + if (pm->ps->duelInProgress && pm->ps->emplacedIndex) + { + pm->ps->emplacedIndex = 0; + } + + if (pm->ps->weapon == WP_EMPLACED_GUN && pm->ps->emplacedIndex) + { + pm->cmd.weapon = WP_EMPLACED_GUN; //No switch for you! + PM_StartTorsoAnim( BOTH_GUNSIT1 ); + } + + if (pm->ps->isJediMaster || pm->ps->duelInProgress || pm->ps->trueJedi) + { + pm->cmd.weapon = WP_SABER; + pm->ps->weapon = WP_SABER; + + if (pm->ps->isJediMaster || pm->ps->trueJedi) + { + pm->ps->stats[STAT_WEAPONS] = (1 << WP_SABER); + } + } + + amount = weaponData[pm->ps->weapon].energyPerShot; + + // take an ammo away if not infinite + if ( pm->ps->weapon != WP_NONE && + pm->ps->weapon == pm->cmd.weapon && + (pm->ps->weaponTime <= 0 || pm->ps->weaponstate != WEAPON_FIRING) ) + { + if ( pm->ps->ammo[ weaponData[pm->ps->weapon].ammoIndex ] != -1 ) + { + // enough energy to fire this weapon? + if (pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] < weaponData[pm->ps->weapon].energyPerShot && + pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] < weaponData[pm->ps->weapon].altEnergyPerShot) + { //the weapon is out of ammo essentially because it cannot fire primary or secondary, so do the switch + //regardless of if the player is attacking or not + PM_AddEventWithParm( EV_NOAMMO, WP_NUM_WEAPONS+pm->ps->weapon ); + + if (pm->ps->weaponTime < 500) + { + pm->ps->weaponTime += 500; + } + return; + } + + if (pm->ps->weapon == WP_DET_PACK && !pm->ps->hasDetPackPlanted && pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] < 1) + { + PM_AddEventWithParm( EV_NOAMMO, WP_NUM_WEAPONS+pm->ps->weapon ); + + if (pm->ps->weaponTime < 500) + { + pm->ps->weaponTime += 500; + } + return; + } + } + } + + // check for weapon change + // can't change if weapon is firing, but can change + // again if lowering or raising + if ( pm->ps->weaponTime <= 0 || pm->ps->weaponstate != WEAPON_FIRING ) { + if ( pm->ps->weapon != pm->cmd.weapon ) { + PM_BeginWeaponChange( pm->cmd.weapon ); + } + } + + if ( pm->ps->weaponTime > 0 ) { + return; + } + + // change weapon if time + if ( pm->ps->weaponstate == WEAPON_DROPPING ) { + PM_FinishWeaponChange(); + return; + } + + if ( pm->ps->weaponstate == WEAPON_RAISING ) { + pm->ps->weaponstate = WEAPON_READY; + if ( pm->ps->weapon == WP_SABER ) { + PM_StartTorsoAnim( PM_GetSaberStance() ); + } else { + if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1) + { + PM_StartTorsoAnim( TORSO_WEAPONREADY4 ); + } + else + { + if (pm->ps->weapon == WP_EMPLACED_GUN) + { + PM_StartTorsoAnim( BOTH_GUNSIT1 ); + } + else + { + PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); + } + } + } + return; + } + + if (((pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) == TORSO_WEAPONREADY4 || + (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_ATTACK4) && + (pm->ps->weapon != WP_DISRUPTOR || pm->ps->zoomMode != 1)) + { + if (pm->ps->weapon == WP_EMPLACED_GUN) + { + PM_StartTorsoAnim( BOTH_GUNSIT1 ); + } + else + { + PM_StartTorsoAnim( WeaponReadyAnim[pm->ps->weapon] ); + } + } + else if (((pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) != TORSO_WEAPONREADY4 && + (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) != BOTH_ATTACK4) && + (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1)) + { + PM_StartTorsoAnim( TORSO_WEAPONREADY4 ); + } + + + if (pm->ps->weapon != WP_ROCKET_LAUNCHER) + { + pm->ps->rocketLockIndex = MAX_CLIENTS; + pm->ps->rocketLockTime = 0; + pm->ps->rocketTargetTime = 0; + } + + if ( PM_DoChargedWeapons()) + { + // In some cases the charged weapon code may want us to short circuit the rest of the firing code + return; + } + + // check for fire + if ( ! (pm->cmd.buttons & (BUTTON_ATTACK|BUTTON_ALT_ATTACK))) + { + pm->ps->weaponTime = 0; + pm->ps->weaponstate = WEAPON_READY; + return; + } + + if (pm->ps->weapon == WP_EMPLACED_GUN) + { + addTime = weaponData[pm->ps->weapon].fireTime; + pm->ps->weaponTime += addTime; + PM_AddEvent( EV_FIRE_WEAPON ); + return; + } + + if (pm->ps->weapon == WP_DISRUPTOR && + (pm->cmd.buttons & BUTTON_ALT_ATTACK) && + !pm->ps->zoomLocked) + { + return; + } + + if (pm->ps->weapon == WP_DISRUPTOR && + (pm->cmd.buttons & BUTTON_ALT_ATTACK) && + pm->ps->zoomMode == 2) + { //can't use disruptor secondary while zoomed binoculars + return; + } + + if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1) + { + PM_StartTorsoAnim( BOTH_ATTACK4 ); + } + else + { + PM_StartTorsoAnim( WeaponAttackAnim[pm->ps->weapon] ); + } + + if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) + { + amount = weaponData[pm->ps->weapon].altEnergyPerShot; + } + else + { + amount = weaponData[pm->ps->weapon].energyPerShot; + } + + pm->ps->weaponstate = WEAPON_FIRING; + + // take an ammo away if not infinite + if ( pm->ps->ammo[ weaponData[pm->ps->weapon].ammoIndex ] != -1 ) + { + // enough energy to fire this weapon? + if ((pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] - amount) >= 0) + { + pm->ps->ammo[weaponData[pm->ps->weapon].ammoIndex] -= amount; + } + else // Not enough energy + { + // Switch weapons + if (pm->ps->weapon != WP_DET_PACK || !pm->ps->hasDetPackPlanted) + { + PM_AddEventWithParm( EV_NOAMMO, WP_NUM_WEAPONS+pm->ps->weapon ); + if (pm->ps->weaponTime < 500) + { + pm->ps->weaponTime += 500; + } + } + return; + } + } + + if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) { + if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode != 1) + { + PM_AddEvent( EV_FIRE_WEAPON ); + addTime = weaponData[pm->ps->weapon].fireTime; + } + else + { + PM_AddEvent( EV_ALT_FIRE ); + addTime = weaponData[pm->ps->weapon].altFireTime; + } + } + else { + PM_AddEvent( EV_FIRE_WEAPON ); + addTime = weaponData[pm->ps->weapon].fireTime; + } + + if ( pm->ps->powerups[PW_HASTE] ) { + addTime /= 1.3; + } + + if (pm->ps->fd.forcePowersActive & (1 << FP_RAGE)) + { + addTime *= 0.75; + } + else if (pm->ps->fd.forceRageRecoveryTime > pm->cmd.serverTime) + { + addTime *= 1.5; + } + + pm->ps->weaponTime += addTime; +} + +/* +================ +PM_Animate +================ +*/ + +static void PM_Animate( void ) { + if ( pm->cmd.buttons & BUTTON_GESTURE ) { + if ( pm->ps->torsoTimer < 1 && pm->ps->forceHandExtend == HANDEXTEND_NONE && + pm->ps->legsTimer < 1 && pm->ps->weaponTime < 1 && pm->ps->saberLockTime < pm->cmd.serverTime) { + + pm->ps->forceHandExtend = HANDEXTEND_TAUNT; + + //FIXME: random taunt anims? + pm->ps->forceDodgeAnim = BOTH_ENGAGETAUNT; + + pm->ps->forceHandExtendTime = pm->cmd.serverTime + 1000; + + pm->ps->weaponTime = 100; + + PM_AddEvent( EV_TAUNT ); + } +#if 0 +// Here's an interesting bit. The bots in TA used buttons to do additional gestures. +// I ripped them out because I didn't want too many buttons given the fact that I was already adding some for JK2. +// We can always add some back in if we want though. + } else if ( pm->cmd.buttons & BUTTON_GETFLAG ) { + if ( pm->ps->torsoTimer == 0 ) { + PM_StartTorsoAnim( TORSO_GETFLAG ); + pm->ps->torsoTimer = 600; //TIMER_GESTURE; + } + } else if ( pm->cmd.buttons & BUTTON_GUARDBASE ) { + if ( pm->ps->torsoTimer == 0 ) { + PM_StartTorsoAnim( TORSO_GUARDBASE ); + pm->ps->torsoTimer = 600; //TIMER_GESTURE; + } + } else if ( pm->cmd.buttons & BUTTON_PATROL ) { + if ( pm->ps->torsoTimer == 0 ) { + PM_StartTorsoAnim( TORSO_PATROL ); + pm->ps->torsoTimer = 600; //TIMER_GESTURE; + } + } else if ( pm->cmd.buttons & BUTTON_FOLLOWME ) { + if ( pm->ps->torsoTimer == 0 ) { + PM_StartTorsoAnim( TORSO_FOLLOWME ); + pm->ps->torsoTimer = 600; //TIMER_GESTURE; + } + } else if ( pm->cmd.buttons & BUTTON_AFFIRMATIVE ) { + if ( pm->ps->torsoTimer == 0 ) { + PM_StartTorsoAnim( TORSO_AFFIRMATIVE); + pm->ps->torsoTimer = 600; //TIMER_GESTURE; + } + } else if ( pm->cmd.buttons & BUTTON_NEGATIVE ) { + if ( pm->ps->torsoTimer == 0 ) { + PM_StartTorsoAnim( TORSO_NEGATIVE ); + pm->ps->torsoTimer = 600; //TIMER_GESTURE; + } +#endif // + } +} + + +/* +================ +PM_DropTimers +================ +*/ +static void PM_DropTimers( void ) { + // drop misc timing counter + if ( pm->ps->pm_time ) { + if ( pml.msec >= pm->ps->pm_time ) { + pm->ps->pm_flags &= ~PMF_ALL_TIMES; + pm->ps->pm_time = 0; + } else { + pm->ps->pm_time -= pml.msec; + } + } + + // drop animation counter + if ( pm->ps->legsTimer > 0 ) { + pm->ps->legsTimer -= pml.msec; + if ( pm->ps->legsTimer < 0 ) { + pm->ps->legsTimer = 0; + } + } + + if ( pm->ps->torsoTimer > 0 ) { + pm->ps->torsoTimer -= pml.msec; + if ( pm->ps->torsoTimer < 0 ) { + pm->ps->torsoTimer = 0; + } + } +} + +/* +================ +PM_UpdateViewAngles + +This can be used as another entry point when only the viewangles +are being updated isntead of a full move +================ +*/ +void PM_UpdateViewAngles( playerState_t *ps, const usercmd_t *cmd ) { + short temp; + int i; + + if ( ps->pm_type == PM_INTERMISSION || ps->pm_type == PM_SPINTERMISSION) { + return; // no view changes at all + } + + if ( ps->pm_type != PM_SPECTATOR && ps->stats[STAT_HEALTH] <= 0 ) { + return; // no view changes at all + } + + // circularly clamp the angles with deltas + for (i=0 ; i<3 ; i++) { + temp = cmd->angles[i] + ps->delta_angles[i]; + if ( i == PITCH ) { + // don't let the player look up or down more than 90 degrees + if ( temp > 16000 ) { + ps->delta_angles[i] = 16000 - cmd->angles[i]; + temp = 16000; + } else if ( temp < -16000 ) { + ps->delta_angles[i] = -16000 - cmd->angles[i]; + temp = -16000; + } + } + ps->viewangles[i] = SHORT2ANGLE(temp); + } + +} + +//------------------------------------------- +void PM_AdjustAttackStates( pmove_t *pm ) +//------------------------------------------- +{ + int amount; + + // get ammo usage + if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) + { + amount = pm->ps->ammo[weaponData[ pm->ps->weapon ].ammoIndex] - weaponData[pm->ps->weapon].altEnergyPerShot; + } + else + { + amount = pm->ps->ammo[weaponData[ pm->ps->weapon ].ammoIndex] - weaponData[pm->ps->weapon].energyPerShot; + } + + // disruptor alt-fire should toggle the zoom mode, but only bother doing this for the player? + if ( pm->ps->weapon == WP_DISRUPTOR && pm->ps->weaponstate == WEAPON_READY ) + { + if ( !(pm->ps->eFlags & EF_ALT_FIRING) && (pm->cmd.buttons & BUTTON_ALT_ATTACK) /*&& + pm->cmd.upmove <= 0 && !pm->cmd.forwardmove && !pm->cmd.rightmove*/) + { + // We just pressed the alt-fire key + if ( !pm->ps->zoomMode ) + { + // not already zooming, so do it now + pm->ps->zoomMode = 1; + pm->ps->zoomLocked = qfalse; + pm->ps->zoomFov = 80.0f;//cg_fov.value; + pm->ps->zoomLockTime = pm->cmd.serverTime + 50; + PM_AddEvent(EV_DISRUPTOR_ZOOMSOUND); + } + else if (pm->ps->zoomMode == 1 && pm->ps->zoomLockTime < pm->cmd.serverTime) + { //check for == 1 so we can't turn binoculars off with disruptor alt fire + // already zooming, so must be wanting to turn it off + pm->ps->zoomMode = 0; + pm->ps->zoomTime = pm->ps->commandTime; + pm->ps->zoomLocked = qfalse; + PM_AddEvent(EV_DISRUPTOR_ZOOMSOUND); + } + } + else if ( !(pm->cmd.buttons & BUTTON_ALT_ATTACK ) && pm->ps->zoomLockTime < pm->cmd.serverTime) + { + // Not pressing zoom any more + if ( pm->ps->zoomMode ) + { + if (pm->ps->zoomMode == 1 && !pm->ps->zoomLocked) + { //approximate what level the client should be zoomed at based on how long zoom was held + pm->ps->zoomFov = ((pm->cmd.serverTime+50) - pm->ps->zoomLockTime) * 0.035f; + if (pm->ps->zoomFov > 50) + { + pm->ps->zoomFov = 50; + } + if (pm->ps->zoomFov < 1) + { + pm->ps->zoomFov = 1; + } + } + // were zooming in, so now lock the zoom + pm->ps->zoomLocked = qtrue; + } + } + //This seemed like a good idea, but apparently it confuses people. So disabled for now. + /* + else if (!(pm->ps->eFlags & EF_ALT_FIRING) && (pm->cmd.buttons & BUTTON_ALT_ATTACK) && + (pm->cmd.upmove > 0 || pm->cmd.forwardmove || pm->cmd.rightmove)) + { //if you try to zoom while moving, just convert it into a primary attack + pm->cmd.buttons &= ~BUTTON_ALT_ATTACK; + pm->cmd.buttons |= BUTTON_ATTACK; + } + */ + + if (pm->cmd.upmove > 0 || pm->cmd.forwardmove || pm->cmd.rightmove) + { + if (pm->ps->zoomMode == 1 && pm->ps->zoomLockTime < pm->cmd.serverTime) + { //check for == 1 so we can't turn binoculars off with disruptor alt fire + pm->ps->zoomMode = 0; + pm->ps->zoomTime = pm->ps->commandTime; + pm->ps->zoomLocked = qfalse; + PM_AddEvent(EV_DISRUPTOR_ZOOMSOUND); + } + } + + if ( pm->cmd.buttons & BUTTON_ATTACK ) + { + // If we are zoomed, we should switch the ammo usage to the alt-fire, otherwise, we'll + // just use whatever ammo was selected from above + if ( pm->ps->zoomMode ) + { + amount = pm->ps->ammo[weaponData[ pm->ps->weapon ].ammoIndex] - + weaponData[pm->ps->weapon].altEnergyPerShot; + } + } + else + { + // alt-fire button pressing doesn't use any ammo + amount = 0; + } + } + else if (pm->ps->weapon == WP_DISRUPTOR) //still perform certain checks, even if the weapon is not ready + { + if (pm->cmd.upmove > 0 || pm->cmd.forwardmove || pm->cmd.rightmove) + { + if (pm->ps->zoomMode == 1 && pm->ps->zoomLockTime < pm->cmd.serverTime) + { //check for == 1 so we can't turn binoculars off with disruptor alt fire + pm->ps->zoomMode = 0; + pm->ps->zoomTime = pm->ps->commandTime; + pm->ps->zoomLocked = qfalse; + PM_AddEvent(EV_DISRUPTOR_ZOOMSOUND); + } + } + } + + // set the firing flag for continuous beam weapons, saber will fire even if out of ammo + if ( !(pm->ps->pm_flags & PMF_RESPAWNED) && + pm->ps->pm_type != PM_INTERMISSION && + ( pm->cmd.buttons & (BUTTON_ATTACK|BUTTON_ALT_ATTACK)) && + ( amount >= 0 || pm->ps->weapon == WP_SABER )) + { + if ( pm->cmd.buttons & BUTTON_ALT_ATTACK ) + { + pm->ps->eFlags |= EF_ALT_FIRING; + } + else + { + pm->ps->eFlags &= ~EF_ALT_FIRING; + } + + // This flag should always get set, even when alt-firing + pm->ps->eFlags |= EF_FIRING; + } + else + { + // Clear 'em out + pm->ps->eFlags &= ~(EF_FIRING|EF_ALT_FIRING); + } + + // disruptor should convert a main fire to an alt-fire if the gun is currently zoomed + if ( pm->ps->weapon == WP_DISRUPTOR) + { + if ( pm->cmd.buttons & BUTTON_ATTACK && pm->ps->zoomMode == 1 && pm->ps->zoomLocked) + { + // converting the main fire to an alt-fire + pm->cmd.buttons |= BUTTON_ALT_ATTACK; + pm->ps->eFlags |= EF_ALT_FIRING; + } + else if ( pm->cmd.buttons & BUTTON_ALT_ATTACK && pm->ps->zoomMode == 1 && pm->ps->zoomLocked) + { + pm->cmd.buttons &= ~BUTTON_ALT_ATTACK; + pm->ps->eFlags &= ~EF_ALT_FIRING; + } + } +} + +void BG_CmdForRoll( int anim, usercmd_t *pCmd ) +{ + switch ( (anim&~ANIM_TOGGLEBIT) ) + { + case BOTH_ROLL_F: + pCmd->forwardmove = 127; + pCmd->rightmove = 0; + break; + case BOTH_ROLL_B: + pCmd->forwardmove = -127; + pCmd->rightmove = 0; + break; + case BOTH_ROLL_R: + pCmd->forwardmove = 0; + pCmd->rightmove = 127; + break; + case BOTH_ROLL_L: + pCmd->forwardmove = 0; + pCmd->rightmove = -127; + break; + } + pCmd->upmove = 0; +} + +qboolean PM_SaberInTransition( int move ); + +void BG_AdjustClientSpeed(playerState_t *ps, usercmd_t *cmd, int svTime) +{ + //For prediction, always reset speed back to the last known server base speed + //If we didn't do this, under lag we'd eventually dwindle speed down to 0 even though + //that would not be the correct predicted value. + ps->speed = ps->basespeed; + + if (ps->forceHandExtend == HANDEXTEND_DODGE) + { + ps->speed = 0; + } + + if (ps->forceHandExtend == HANDEXTEND_KNOCKDOWN) + { + ps->speed = 0; + } + + if (ps->usingATST && (cmd->rightmove || + cmd->forwardmove)) + { + if (!ps->holdMoveTime) + { + ps->torsoAnim = ( ( ps->torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) + | BOTH_RUN1START; + ps->holdMoveTime = svTime; + } + } + else + { + ps->holdMoveTime = 0; + + if (ps->usingATST) + { + ps->torsoAnim = ( ( ps->torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) + | BOTH_STAND1; + } + } + + if (ps->usingATST && + ((svTime - ps->holdMoveTime) < 500 || + !ps->holdMoveTime)) + { + ps->speed = 0; + } + else if (ps->usingATST) + { + if ((svTime - ps->holdMoveTime) < 600) + { + ps->speed *= 0.4; + } + else if ((svTime - ps->holdMoveTime) < 1000) + { + ps->speed *= 0.5; + } + else if ((svTime - ps->holdMoveTime) < 1400) + { + ps->speed *= 0.6; + } + else if ((svTime - ps->holdMoveTime) < 1700) + { + ps->speed *= 0.7; + } + else if ((svTime - ps->holdMoveTime) < 1900) + { + ps->speed *= 0.8; + } + + if (cmd->forwardmove < 0) + { + ps->torsoAnim = ( ( ps->torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) + | BOTH_WALKBACK1; + ps->speed *= 0.6; + } + else + { + ps->torsoAnim = ( ( ps->torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) + | BOTH_RUN1; + } + } + else if ( cmd->forwardmove < 0 && !(cmd->buttons&BUTTON_WALKING) && pm->ps->groundEntityNum != ENTITYNUM_NONE ) + {//running backwards is slower than running forwards (like SP) + ps->speed *= 0.75; + } + + if (ps->fd.forcePowersActive & (1 << FP_GRIP)) + { + ps->speed *= 0.4; + } + + if (ps->fd.forcePowersActive & (1 << FP_SPEED)) + { + if (ps->fd.forceSpeedSmash < 1.2) + { + ps->fd.forceSpeedSmash = 1.2; + } + if (ps->fd.forceSpeedSmash > forceSpeedLevels[ps->fd.forcePowerLevel[FP_SPEED]]) //2.8 + { + ps->fd.forceSpeedSmash = forceSpeedLevels[ps->fd.forcePowerLevel[FP_SPEED]]; + } + ps->speed *= ps->fd.forceSpeedSmash; + ps->fd.forceSpeedSmash += 0.005f; + } + + if (ps->fd.forcePowersActive & (1 << FP_RAGE)) + { + ps->speed *= 1.3; + } + else if (ps->fd.forceRageRecoveryTime > svTime) + { + ps->speed *= 0.75; + } + + if (ps->fd.forceGripCripple) + { + if (ps->fd.forcePowersActive & (1 << FP_RAGE)) + { + ps->speed *= 0.9; + } + else if (ps->fd.forcePowersActive & (1 << FP_SPEED)) + { //force speed will help us escape + ps->speed *= 0.8; + } + else + { + ps->speed *= 0.2; + } + } + + if ( BG_SaberInAttack( ps->saberMove ) && cmd->forwardmove < 0 ) + {//if running backwards while attacking, don't run as fast. + switch( ps->fd.saberAnimLevel ) + { + case FORCE_LEVEL_1: + ps->speed *= 0.75f; + break; + case FORCE_LEVEL_2: + ps->speed *= 0.60f; + break; + case FORCE_LEVEL_3: + ps->speed *= 0.45f; + break; + default: + break; + } + } + else if ( BG_SpinningSaberAnim( ps->legsAnim ) ) + { + if (ps->fd.saberAnimLevel == FORCE_LEVEL_3) + { + ps->speed *= 0.3f; + } + else + { + ps->speed *= 0.5f; + } + } + else if ( ps->weapon == WP_SABER && BG_SaberInAttack( ps->saberMove ) ) + {//if attacking with saber while running, drop your speed + switch( ps->fd.saberAnimLevel ) + { + case FORCE_LEVEL_2: + ps->speed *= 0.85f; + break; + case FORCE_LEVEL_3: + ps->speed *= 0.55f; + break; + default: + break; + } + } + else if (ps->weapon == WP_SABER && ps->fd.saberAnimLevel == FORCE_LEVEL_3 && + PM_SaberInTransition(ps->saberMove)) + { //Now, we want to even slow down in transitions for level 3 (since it has chains and stuff now) + if (cmd->forwardmove < 0) + { + ps->speed *= 0.4f; + } + else + { + ps->speed *= 0.6f; + } + } + + + if ( BG_InRoll( ps, ps->legsAnim ) && ps->speed > 200 ) + { //can't roll unless you're able to move normally + BG_CmdForRoll( ps->legsAnim, cmd ); + if ((ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_ROLL_B) + { //backwards roll is pretty fast, should also be slower + ps->speed = ps->legsTimer/2.5; + } + else + { + ps->speed = ps->legsTimer/1.5;//450; + } + if (ps->speed > 600) + { + ps->speed = 600; + } + //Automatically slow down as the roll ends. + } +} + +/* +================ +PmoveSingle + +================ +*/ +void trap_SnapVector( float *v ); + +void PmoveSingle (pmove_t *pmove) { + pm = pmove; + + gPMDoSlowFall = PM_DoSlowFall(); + + // this counter lets us debug movement problems with a journal + // by setting a conditional breakpoint fot the previous frame + c_pmove++; + + // clear results + pm->numtouch = 0; + pm->watertype = 0; + pm->waterlevel = 0; + + if (pm->ps->pm_type == PM_FLOAT) + { //You get no control over where you go in grip movement + pm->cmd.forwardmove = 0; + pm->cmd.rightmove = 0; + pm->cmd.upmove = 0; + } + + if (pm->ps->eFlags & EF_DISINTEGRATION) + { + pm->cmd.forwardmove = 0; + pm->cmd.rightmove = 0; + pm->cmd.upmove = 0; + } + + if ( pm->ps->saberMove == LS_A_LUNGE ) + {//can't move during lunge + pm->cmd.rightmove = pm->cmd.upmove = 0; + if ( pm->ps->legsTimer > 500 ) + { + pm->cmd.forwardmove = 127; + } + else + { + pm->cmd.forwardmove = 0; + } + } + + if ( pm->ps->saberMove == LS_A_JUMP_T__B_ ) + {//can't move during leap + if ( pm->ps->groundEntityNum != ENTITYNUM_NONE ) + {//hit the ground + pm->cmd.forwardmove = 0; + } + pm->cmd.rightmove = pm->cmd.upmove = 0; + } + + if ( pm->ps->saberMove == LS_A_BACK || pm->ps->saberMove == LS_A_BACK_CR + || pm->ps->saberMove == LS_A_BACKSTAB || pm->ps->saberMove == LS_A_FLIP_STAB || + pm->ps->saberMove == LS_A_FLIP_SLASH || pm->ps->saberMove == LS_A_JUMP_T__B_ ) + { + pm->cmd.forwardmove = 0; + pm->cmd.rightmove = 0; + pm->cmd.upmove = 0; + } + + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_A2_STABBACK1) || + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_ATTACK_BACK) || + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_CROUCHATTACKBACK1) || + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_FORCELEAP2_T__B_) || + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_JUMPFLIPSTABDOWN) || + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == (BOTH_JUMPFLIPSLASHDOWN1)) + { + pm->cmd.forwardmove = 0; + pm->cmd.rightmove = 0; + pm->cmd.upmove = 0; + } + + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_KISSER1LOOP || + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_KISSEE1LOOP) + { + pm->cmd.forwardmove = 0; + pm->cmd.rightmove = 0; + pm->cmd.upmove = 0; + } + + if (pm->ps->emplacedIndex) + { + if (pm->cmd.forwardmove < 0) + { + pm->ps->emplacedIndex = 0; + } + else + { + pm->cmd.forwardmove = 0; + pm->cmd.rightmove = 0; + pm->cmd.upmove = 0; + } + } + + if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->weaponstate == WEAPON_CHARGING_ALT) + { //not allowed to move while charging the disruptor + pm->cmd.forwardmove = 0; + pm->cmd.rightmove = 0; + if (pm->cmd.upmove > 0) + { + pm->cmd.upmove = 0; + } + } + + BG_AdjustClientSpeed(pm->ps, &pm->cmd, pm->cmd.serverTime); + + if ( pm->ps->stats[STAT_HEALTH] <= 0 ) { + pm->tracemask &= ~CONTENTS_BODY; // corpses can fly through bodies + } + + // make sure walking button is clear if they are running, to avoid + // proxy no-footsteps cheats + if ( abs( pm->cmd.forwardmove ) > 64 || abs( pm->cmd.rightmove ) > 64 ) { + pm->cmd.buttons &= ~BUTTON_WALKING; + } + + // set the talk balloon flag + if ( pm->cmd.buttons & BUTTON_TALK ) { + pm->ps->eFlags |= EF_TALK; + } else { + pm->ps->eFlags &= ~EF_TALK; + } + + // In certain situations, we may want to control which attack buttons are pressed and what kind of functionality + // is attached to them + PM_AdjustAttackStates( pm ); + + // clear the respawned flag if attack and use are cleared + if ( pm->ps->stats[STAT_HEALTH] > 0 && + !( pm->cmd.buttons & (BUTTON_ATTACK | BUTTON_USE_HOLDABLE) ) ) { + pm->ps->pm_flags &= ~PMF_RESPAWNED; + } + + // if talk button is down, dissallow all other input + // this is to prevent any possible intercept proxy from + // adding fake talk balloons + if ( pmove->cmd.buttons & BUTTON_TALK ) { + // keep the talk button set tho for when the cmd.serverTime > 66 msec + // and the same cmd is used multiple times in Pmove + pmove->cmd.buttons = BUTTON_TALK; + pmove->cmd.forwardmove = 0; + pmove->cmd.rightmove = 0; + pmove->cmd.upmove = 0; + } + + // clear all pmove local vars + memset (&pml, 0, sizeof(pml)); + + // determine the time + pml.msec = pmove->cmd.serverTime - pm->ps->commandTime; + if ( pml.msec < 1 ) { + pml.msec = 1; + } else if ( pml.msec > 200 ) { + pml.msec = 200; + } + pm->ps->commandTime = pmove->cmd.serverTime; + + // save old org in case we get stuck + VectorCopy (pm->ps->origin, pml.previous_origin); + + // save old velocity for crashlanding + VectorCopy (pm->ps->velocity, pml.previous_velocity); + + pml.frametime = pml.msec * 0.001; + + PM_AdjustAngleForWallRun(pm->ps, &pm->cmd, qtrue); + + if (pm->ps->saberMove == LS_A_JUMP_T__B_ || pm->ps->saberMove == LS_A_LUNGE || + pm->ps->saberMove == LS_A_BACK_CR || pm->ps->saberMove == LS_A_BACK || + pm->ps->saberMove == LS_A_BACKSTAB) + { + PM_SetPMViewAngle(pm->ps, pm->ps->viewangles, &pm->cmd); + } + + if ((pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_KISSER1LOOP || + (pm->ps->legsAnim&~ANIM_TOGGLEBIT) == BOTH_KISSEE1LOOP) + { + pm->ps->viewangles[PITCH] = 0; + PM_SetPMViewAngle(pm->ps, pm->ps->viewangles, &pm->cmd); + } + + // update the viewangles + PM_UpdateViewAngles( pm->ps, &pm->cmd ); + + AngleVectors (pm->ps->viewangles, pml.forward, pml.right, pml.up); + + if ( pm->cmd.upmove < 10 ) { + // not holding jump + pm->ps->pm_flags &= ~PMF_JUMP_HELD; + } + + // decide if backpedaling animations should be used + if ( pm->cmd.forwardmove < 0 ) { + pm->ps->pm_flags |= PMF_BACKWARDS_RUN; + } else if ( pm->cmd.forwardmove > 0 || ( pm->cmd.forwardmove == 0 && pm->cmd.rightmove ) ) { + pm->ps->pm_flags &= ~PMF_BACKWARDS_RUN; + } + + if ( pm->ps->pm_type >= PM_DEAD ) { + pm->cmd.forwardmove = 0; + pm->cmd.rightmove = 0; + pm->cmd.upmove = 0; + } + + if (pm->ps->saberLockTime >= pm->cmd.serverTime) + { + pm->cmd.upmove = 0; + pm->cmd.forwardmove = 50; + pm->cmd.rightmove = 0;//*= 0.1; + } + + if ( pm->ps->pm_type == PM_SPECTATOR ) { + PM_CheckDuck (); + PM_FlyMove (); + PM_DropTimers (); + return; + } + + if ( pm->ps->pm_type == PM_NOCLIP ) { + PM_NoclipMove (); + PM_DropTimers (); + return; + } + + if (pm->ps->pm_type == PM_FREEZE) { + return; // no movement at all + } + + if ( pm->ps->pm_type == PM_INTERMISSION || pm->ps->pm_type == PM_SPINTERMISSION) { + return; // no movement at all + } + + if (gPMDoSlowFall) + { + pm->ps->gravity *= 0.5; + } + + // set watertype, and waterlevel + PM_SetWaterLevel(); + pml.previous_waterlevel = pmove->waterlevel; + + // set mins, maxs, and viewheight + PM_CheckDuck (); + + // set groundentity + PM_GroundTrace(); + + if ( pm->ps->groundEntityNum != ENTITYNUM_NONE ) + {//on ground + pm->ps->fd.forceJumpZStart = 0; + } + + if ( pm->ps->pm_type == PM_DEAD ) { + PM_DeadMove (); + } + + PM_DropTimers(); + + if (pm->ps->pm_type == PM_FLOAT) + { + PM_FlyMove (); + } + else + { + if (pm->ps->pm_flags & PMF_TIME_WATERJUMP) { + PM_WaterJumpMove(); + } else if ( pm->waterlevel > 1 ) { + // swimming + PM_WaterMove(); + } else if ( pml.walking ) { + // walking on ground + PM_WalkMove(); + } else { + // airborne + PM_AirMove(); + } + } + + PM_Animate(); + + // set groundentity, watertype, and waterlevel + PM_GroundTrace(); + PM_SetWaterLevel(); + + if (pm->cmd.forcesel != -1 && (pm->ps->fd.forcePowersKnown & (1 << pm->cmd.forcesel))) + { + pm->ps->fd.forcePowerSelected = pm->cmd.forcesel; + } + if (pm->cmd.invensel != -1 && (pm->ps->stats[STAT_HOLDABLE_ITEMS] & (1 << pm->cmd.invensel))) + { + pm->ps->stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(pm->cmd.invensel, IT_HOLDABLE); + } + + // weapons + PM_Weapon(); + + PM_Use(); + + // footstep events / legs animations + PM_Footsteps(); + + // entering / leaving water splashes + PM_WaterEvents(); + + // snap some parts of playerstate to save network bandwidth + trap_SnapVector( pm->ps->velocity ); + + if (gPMDoSlowFall) + { + pm->ps->gravity *= 2; + } +} + + +/* +================ +Pmove + +Can be called by either the server or the client +================ +*/ +void Pmove (pmove_t *pmove) { + int finalTime; + + finalTime = pmove->cmd.serverTime; + + if ( finalTime < pmove->ps->commandTime ) { + return; // should not happen + } + + if ( finalTime > pmove->ps->commandTime + 1000 ) { + pmove->ps->commandTime = finalTime - 1000; + } + + if (pmove->ps->fallingToDeath) + { + pmove->cmd.forwardmove = 0; + pmove->cmd.rightmove = 0; + pmove->cmd.upmove = 0; + pmove->cmd.buttons = 0; + } + + pmove->ps->pmove_framecount = (pmove->ps->pmove_framecount+1) & ((1<ps->commandTime != finalTime ) { + int msec; + + msec = finalTime - pmove->ps->commandTime; + + if ( pmove->pmove_fixed ) { + if ( msec > pmove->pmove_msec ) { + msec = pmove->pmove_msec; + } + } + else { + if ( msec > 66 ) { + msec = 66; + } + } + pmove->cmd.serverTime = pmove->ps->commandTime + msec; + PmoveSingle( pmove ); + + if ( pmove->ps->pm_flags & PMF_JUMP_HELD ) { + pmove->cmd.upmove = 20; + } + } +} + diff --git a/code/game/bg_public.h b/code/game/bg_public.h new file mode 100644 index 0000000..aa511d9 --- /dev/null +++ b/code/game/bg_public.h @@ -0,0 +1,1065 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// bg_public.h -- definitions shared by both the server game and client game modules + +// because games can change separately from the main system version, we need a +// second version that must match between game and cgame + +#ifndef __BG_PUBLIC_H__ +#define __BG_PUBLIC_H__ + +#include "bg_weapons.h" +#include "anims.h" +#include "../qcommon/gamedefs.h" + +#define GAME_VERSION "basejk-1" + +#define DEFAULT_GRAVITY 800 +#define GIB_HEALTH -40 +#define ARMOR_PROTECTION 0.50 // Shields only stop 50% of armor-piercing dmg +#define ARMOR_REDUCTION_FACTOR 0.50 // Certain damage doesn't take off armor as efficiently + +#define JUMP_VELOCITY 225//270 + +#define MAX_ITEMS 256 + +#define RANK_TIED_FLAG 0x4000 + +#define ITEM_RADIUS 15 // item sizes are needed for client side pickup detection + +#define SCORE_NOT_PRESENT -9999 // for the CS_SCORES[12] when only one player is present + +#define VOTE_TIME 30000 // 30 seconds before vote times out + +#define DEFAULT_MINS_2 -24 +#define DEFAULT_MAXS_2 40 +#define CROUCH_MAXS_2 16 +#define STANDARD_VIEWHEIGHT_OFFSET -4 + +#define MINS_Z -24 +#define DEFAULT_VIEWHEIGHT (DEFAULT_MAXS_2+STANDARD_VIEWHEIGHT_OFFSET)//26 +#define CROUCH_VIEWHEIGHT (CROUCH_MAXS_2+STANDARD_VIEWHEIGHT_OFFSET)//12 +#define DEAD_VIEWHEIGHT -16 + +#define MAX_CLIENT_SCORE_SEND 20 + +// +// config strings are a general means of communicating variable length strings +// from the server to all connected clients. +// + +// CS_SERVERINFO and CS_SYSTEMINFO are defined in q_shared.h +#define CS_MUSIC 2 +#define CS_MESSAGE 3 // from the map worldspawn's message field +#define CS_MOTD 4 // g_motd string for server message of the day +#define CS_WARMUP 5 // server time when the match will be restarted +#define CS_SCORES1 6 +#define CS_SCORES2 7 +#define CS_VOTE_TIME 8 +#define CS_VOTE_STRING 9 +#define CS_VOTE_YES 10 +#define CS_VOTE_NO 11 + +#define CS_TEAMVOTE_TIME 12 +#define CS_TEAMVOTE_STRING 14 +#define CS_TEAMVOTE_YES 16 +#define CS_TEAMVOTE_NO 18 + +#define CS_GAME_VERSION 20 +#define CS_LEVEL_START_TIME 21 // so the timer only shows the current level +#define CS_INTERMISSION 22 // when 1, fraglimit/timelimit has been hit and intermission will start in a second or two +#define CS_FLAGSTATUS 23 // string indicating flag status in CTF +#define CS_SHADERSTATE 24 +#define CS_BOTINFO 25 + +#define CS_ITEMS 27 // string of 0's and 1's that tell which items are present + +#define CS_CLIENT_JEDIMASTER 28 // current jedi master +#define CS_CLIENT_DUELWINNER 29 // current duel round winner - needed for printing at top of scoreboard +#define CS_CLIENT_DUELISTS 30 // client numbers for both current duelists. Needed for a number of client-side things. + +// these are also in be_aas_def.h - argh (rjr) +#define CS_MODELS 32 +#define CS_SOUNDS (CS_MODELS+MAX_MODELS) +#define CS_PLAYERS (CS_SOUNDS+MAX_SOUNDS) +/* +Ghoul2 Insert Start +*/ +#define CS_CHARSKINS (CS_PLAYERS+MAX_CLIENTS) +/* +Ghoul2 Insert End +*/ +#define CS_LOCATIONS (CS_CHARSKINS+MAX_CHARSKINS) +#define CS_PARTICLES (CS_LOCATIONS+MAX_LOCATIONS) +#define CS_EFFECTS (CS_PARTICLES+MAX_LOCATIONS) +#define CS_LIGHT_STYLES (CS_EFFECTS + MAX_FX) +#define CS_STRING_PACKAGES (CS_LIGHT_STYLES + (MAX_LIGHT_STYLES*3)) + +#define CS_MAX (CS_STRING_PACKAGES+MAX_STRING_PACKAGES) + +#if (CS_MAX) > MAX_CONFIGSTRINGS +#error overflow: (CS_MAX) > MAX_CONFIGSTRINGS +#endif + +typedef enum { + G2_MODELPART_HEAD = 10, + G2_MODELPART_WAIST, + G2_MODELPART_LARM, + G2_MODELPART_RARM, + G2_MODELPART_RHAND, + G2_MODELPART_LLEG, + G2_MODELPART_RLEG +} g2ModelParts_t; + +#define G2_MODEL_PART 50 + +typedef enum { + HANDEXTEND_NONE = 0, + HANDEXTEND_FORCEPUSH, + HANDEXTEND_FORCEPULL, + HANDEXTEND_FORCEGRIP, + HANDEXTEND_SABERPULL, + HANDEXTEND_CHOKE, //use handextend priorities to choke someone being gripped + HANDEXTEND_WEAPONREADY, + HANDEXTEND_DODGE, + HANDEXTEND_KNOCKDOWN, + HANDEXTEND_DUELCHALLENGE, + HANDEXTEND_TAUNT +} forceHandAnims_t; + +typedef enum { + GT_FFA, // free for all + GT_HOLOCRON, // holocron ffa + GT_JEDIMASTER, // jedi master + GT_TOURNAMENT, // one on one tournament + GT_SINGLE_PLAYER, // single player ffa + + //-- team games go after this -- + + GT_TEAM, // team deathmatch + GT_SAGA, // saga + GT_CTF, // capture the flag + GT_CTY, + GT_MAX_GAME_TYPE +} gametype_t; + +typedef enum { GENDER_MALE, GENDER_FEMALE, GENDER_NEUTER } gender_t; + +extern vec3_t WP_MuzzlePoint[WP_NUM_WEAPONS]; + +extern int forcePowerSorted[NUM_FORCE_POWERS]; + +/* +=================================================================================== + +PMOVE MODULE + +The pmove code takes a player_state_t and a usercmd_t and generates a new player_state_t +and some other output data. Used for local prediction on the client game and true +movement on the server game. +=================================================================================== +*/ + + +typedef struct animation_s { + int firstFrame; + int numFrames; + int loopFrames; // 0 to numFrames + int frameLerp; // msec between frames + int initialLerp; // msec to get to first frame + int reversed; // true if animation is reversed + int flipflop; // true if animation should flipflop back to base +} animation_t; + +extern qboolean BGPAFtextLoaded; +extern animation_t bgGlobalAnimations[MAX_TOTALANIMATIONS]; + +// flip the togglebit every time an animation +// changes so a restart of the same anim can be detected +#define ANIM_TOGGLEBIT 2048 // Maximum number of animation sequences is 2048 (0-2047). 12th bit is the toggle + + +typedef enum { + PM_NORMAL, // can accelerate and turn + PM_FLOAT, // float with no gravity in general direction of velocity (intended for gripping) + PM_NOCLIP, // noclip movement + PM_SPECTATOR, // still run into walls + PM_DEAD, // no acceleration or turning, but free falling + PM_FREEZE, // stuck in place with no control + PM_INTERMISSION, // no movement or status bar + PM_SPINTERMISSION // no movement or status bar +} pmtype_t; + +typedef enum { + WEAPON_READY, + WEAPON_RAISING, + WEAPON_DROPPING, + WEAPON_FIRING, + WEAPON_CHARGING, + WEAPON_CHARGING_ALT, + WEAPON_IDLE, //lowered // NOTENOTE Added with saber +} weaponstate_t; + + +typedef enum { + FORCE_MASTERY_UNINITIATED, + FORCE_MASTERY_INITIATE, + FORCE_MASTERY_PADAWAN, + FORCE_MASTERY_JEDI, + FORCE_MASTERY_JEDI_GUARDIAN, + FORCE_MASTERY_JEDI_ADEPT, + FORCE_MASTERY_JEDI_KNIGHT, + FORCE_MASTERY_JEDI_MASTER, + NUM_FORCE_MASTERY_LEVELS +}; +extern char *forceMasteryLevels[NUM_FORCE_MASTERY_LEVELS]; +extern int forceMasteryPoints[NUM_FORCE_MASTERY_LEVELS]; + +extern int bgForcePowerCost[NUM_FORCE_POWERS][NUM_FORCE_POWER_LEVELS]; + +// pmove->pm_flags +#define PMF_DUCKED 1 +#define PMF_JUMP_HELD 2 +#define PMF_ROLLING 4 +#define PMF_BACKWARDS_JUMP 8 // go into backwards land +#define PMF_BACKWARDS_RUN 16 // coast down to backwards run +#define PMF_TIME_LAND 32 // pm_time is time before rejump +#define PMF_TIME_KNOCKBACK 64 // pm_time is an air-accelerate only time +#define PMF_TIME_WATERJUMP 256 // pm_time is waterjump +#define PMF_RESPAWNED 512 // clear after attack and jump buttons come up +#define PMF_USE_ITEM_HELD 1024 +#define PMF_UPDATE_ANIM 2048 // The server updated the animation, the pmove should set the ghoul2 anim to match. +#define PMF_FOLLOW 4096 // spectate following another player +#define PMF_SCOREBOARD 8192 // spectate as a scoreboard + +#define PMF_ALL_TIMES (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK) + +#define MAXTOUCH 32 +typedef struct { + // state (in / out) + playerState_t *ps; + + // command (in) + usercmd_t cmd; + int tracemask; // collide against these types of surfaces + int debugLevel; // if set, diagnostic output will be printed + qboolean noFootsteps; // if the game is setup for no footsteps by the server + qboolean gauntletHit; // true if a gauntlet attack would actually hit something + + int framecount; + + // results (out) + int numtouch; + int touchents[MAXTOUCH]; + + int useEvent; + + vec3_t mins, maxs; // bounding box size + + int watertype; + int waterlevel; + + int gametype; + + animation_t *animations; + + float xyspeed; + + // for fixed msec Pmove + int pmove_fixed; + int pmove_msec; + + // callbacks to test the world + // these will be different functions during game and cgame + void (*trace)( trace_t *results, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int passEntityNum, int contentMask ); + int (*pointcontents)( const vec3_t point, int passEntityNum ); + + playerState_t *bgClients[MAX_CLIENTS]; + int checkDuelLoss; +} pmove_t; + +extern pmove_t *pm; + +#define SETANIM_TORSO 1 +#define SETANIM_LEGS 2 +#define SETANIM_BOTH SETANIM_TORSO|SETANIM_LEGS//3 + +#define SETANIM_FLAG_NORMAL 0//Only set if timer is 0 +#define SETANIM_FLAG_OVERRIDE 1//Override previous +#define SETANIM_FLAG_HOLD 2//Set the new timer +#define SETANIM_FLAG_RESTART 4//Allow restarting the anim if playing the same one (weapon fires) +#define SETANIM_FLAG_HOLDLESS 8//Set the new timer + + +// if a full pmove isn't done on the client, you can just update the angles +void PM_UpdateViewAngles( playerState_t *ps, const usercmd_t *cmd ); +void Pmove (pmove_t *pmove); + +//=================================================================================== + + +// player_state->stats[] indexes +// NOTE: may not have more than 16 +typedef enum { + STAT_HEALTH, + STAT_HOLDABLE_ITEM, + STAT_HOLDABLE_ITEMS, + STAT_PERSISTANT_POWERUP, + STAT_WEAPONS, // 16 bit fields + STAT_ARMOR, + STAT_DEAD_YAW, // look this direction when dead (FIXME: get rid of?) + STAT_CLIENTS_READY, // bit mask of clients wishing to exit the intermission (FIXME: configstring?) + STAT_MAX_HEALTH // health / armor limit, changable by handicap +} statIndex_t; + + +// player_state->persistant[] indexes +// these fields are the only part of player_state that isn't +// cleared on respawn +// NOTE: may not have more than 16 +typedef enum { + PERS_SCORE, // !!! MUST NOT CHANGE, SERVER AND GAME BOTH REFERENCE !!! + PERS_HITS, // total points damage inflicted so damage beeps can sound on change + PERS_RANK, // player rank or team rank + PERS_TEAM, // player team + PERS_SPAWN_COUNT, // incremented every respawn + PERS_PLAYEREVENTS, // 16 bits that can be flipped for events + PERS_ATTACKER, // clientnum of last damage inflicter + PERS_ATTACKEE_ARMOR, // health/armor of last person we attacked + PERS_KILLED, // count of the number of times you died + // player awards tracking + PERS_IMPRESSIVE_COUNT, // two railgun hits in a row + PERS_EXCELLENT_COUNT, // two successive kills in a short amount of time + PERS_DEFEND_COUNT, // defend awards + PERS_ASSIST_COUNT, // assist awards + PERS_GAUNTLET_FRAG_COUNT, // kills with the guantlet + PERS_CAPTURES // captures +} persEnum_t; + + +// entityState_t->eFlags +#define EF_DEAD 0x00000001 // don't draw a foe marker over players with EF_DEAD +#define EF_BOUNCE_SHRAPNEL 0x00000002 // special shrapnel flag +#define EF_TELEPORT_BIT 0x00000004 // toggled every time the origin abruptly changes + +//doesn't do anything +#define EF_AWARD_EXCELLENT 0x00000008 // draw an excellent sprite + +#define EF_PLAYER_EVENT 0x00000010 +#define EF_BOUNCE 0x00000010 // for missiles + +#define EF_BOUNCE_HALF 0x00000020 // for missiles + +//doesn't do anything +#define EF_AWARD_GAUNTLET 0x00000040 // draw a gauntlet sprite + +#define EF_NODRAW 0x00000080 // may have an event, but no model (unspawned items) +#define EF_FIRING 0x00000100 // for lightning gun +#define EF_ALT_FIRING 0x00000200 // for alt-fires, mostly for lightning guns though +#define EF_MOVER_STOP 0x00000400 // will push otherwise + +//doesn't do anything +#define EF_AWARD_CAP 0x00000800 // draw the capture sprite + +#define EF_TALK 0x00001000 // draw a talk balloon +#define EF_CONNECTION 0x00002000 // draw a connection trouble sprite +#define EF_VOTED 0x00004000 // already cast a vote + +//next 4 don't actually do anything +#define EF_AWARD_IMPRESSIVE 0x00008000 // draw an impressive sprite +#define EF_AWARD_DEFEND 0x00010000 // draw a defend sprite +#define EF_AWARD_ASSIST 0x00020000 // draw a assist sprite +#define EF_AWARD_DENIED 0x00040000 // denied + +#define EF_TEAMVOTED 0x00080000 // already cast a team vote +#define EF_SEEKERDRONE 0x00100000 // show seeker drone floating around head +#define EF_MISSILE_STICK 0x00200000 // missiles that stick to the wall. +#define EF_ITEMPLACEHOLDER 0x00400000 // item effect +#define EF_SOUNDTRACKER 0x00800000 // sound position needs to be updated in relation to another entity +#define EF_DROPPEDWEAPON 0x01000000 // it's a dropped weapon +#define EF_DISINTEGRATION 0x02000000 // being disintegrated by the disruptor +#define EF_INVULNERABLE 0x04000000 // just spawned in or whatever, so is protected + + + +typedef enum { + EFFECT_NONE = 0, + EFFECT_SMOKE, + EFFECT_EXPLOSION, + EFFECT_EXPLOSION_PAS, + EFFECT_SPARK_EXPLOSION, + EFFECT_EXPLOSION_TRIPMINE, + EFFECT_EXPLOSION_DETPACK, + EFFECT_EXPLOSION_FLECHETTE, + EFFECT_STUNHIT, + EFFECT_EXPLOSION_DEMP2ALT, + EFFECT_MAX +} effectTypes_t; + +// NOTE: may not have more than 16 +typedef enum { + PW_NONE, + + PW_QUAD, + PW_BATTLESUIT, + PW_HASTE, + //PW_INVIS, //rww - removed + //PW_REGEN, //rww - removed + //PW_FLIGHT, //rww - removed + + PW_REDFLAG, + PW_BLUEFLAG, + PW_NEUTRALFLAG, + + PW_SHIELDHIT, + + //PW_SCOUT, //rww - removed + //PW_GUARD, //rww - removed + //PW_DOUBLER, //rww - removed + //PW_AMMOREGEN, //rww - removed + PW_SPEEDBURST, + PW_DISINT_4, + PW_SPEED, + PW_FORCE_LIGHTNING, + PW_FORCE_ENLIGHTENED_LIGHT, + PW_FORCE_ENLIGHTENED_DARK, + PW_FORCE_BOON, + PW_YSALAMIRI, + + PW_NUM_POWERUPS + +} powerup_t; + +typedef enum { + HI_NONE, + + HI_SEEKER, + HI_SHIELD, + HI_MEDPAC, + HI_DATAPAD, + HI_BINOCULARS, + HI_SENTRY_GUN, + + HI_NUM_HOLDABLE +} holdable_t; + + +typedef enum { + CTFMESSAGE_FRAGGED_FLAG_CARRIER, + CTFMESSAGE_FLAG_RETURNED, + CTFMESSAGE_PLAYER_RETURNED_FLAG, + CTFMESSAGE_PLAYER_CAPTURED_FLAG, + CTFMESSAGE_PLAYER_GOT_FLAG +} ctfMsg_t; + +// reward sounds (stored in ps->persistant[PERS_PLAYEREVENTS]) +#define PLAYEREVENT_DENIEDREWARD 0x0001 +#define PLAYEREVENT_GAUNTLETREWARD 0x0002 + +// entityState_t->event values +// entity events are for effects that take place reletive +// to an existing entities origin. Very network efficient. + +// two bits at the top of the entityState->event field +// will be incremented with each change in the event so +// that an identical event started twice in a row can +// be distinguished. And off the value with ~EV_EVENT_BITS +// to retrieve the actual event number +#define EV_EVENT_BIT1 0x00000100 +#define EV_EVENT_BIT2 0x00000200 +#define EV_EVENT_BITS (EV_EVENT_BIT1|EV_EVENT_BIT2) + +#define EVENT_VALID_MSEC 300 + +typedef enum +{ + PDSOUND_NONE, + PDSOUND_PROTECTHIT, + PDSOUND_PROTECT, + PDSOUND_ABSORBHIT, + PDSOUND_ABSORB, + PDSOUND_FORCEJUMP, + PDSOUND_FORCEGRIP +} pdSounds_t; + +typedef enum { + EV_NONE, + + EV_CLIENTJOIN, + + EV_FOOTSTEP, + EV_FOOTSTEP_METAL, + EV_FOOTSPLASH, + EV_FOOTWADE, + EV_SWIM, + + EV_STEP_4, + EV_STEP_8, + EV_STEP_12, + EV_STEP_16, + + EV_FALL, + + EV_JUMP_PAD, // boing sound at origin, jump sound on player + + EV_PRIVATE_DUEL, + + EV_JUMP, + EV_ROLL, + EV_WATER_TOUCH, // foot touches + EV_WATER_LEAVE, // foot leaves + EV_WATER_UNDER, // head touches + EV_WATER_CLEAR, // head leaves + + EV_ITEM_PICKUP, // normal item pickups are predictable + EV_GLOBAL_ITEM_PICKUP, // powerup / team sounds are broadcast to everyone + + EV_NOAMMO, + EV_CHANGE_WEAPON, + EV_FIRE_WEAPON, + EV_ALT_FIRE, + EV_SABER_ATTACK, + EV_SABER_HIT, + EV_SABER_BLOCK, + EV_SABER_UNHOLSTER, + EV_BECOME_JEDIMASTER, + EV_DISRUPTOR_MAIN_SHOT, + EV_DISRUPTOR_SNIPER_SHOT, + EV_DISRUPTOR_SNIPER_MISS, + EV_DISRUPTOR_HIT, + EV_DISRUPTOR_ZOOMSOUND, + + EV_PREDEFSOUND, + + EV_TEAM_POWER, + + EV_SCREENSHAKE, + + EV_USE, // +Use key + + EV_USE_ITEM0, + EV_USE_ITEM1, + EV_USE_ITEM2, + EV_USE_ITEM3, + EV_USE_ITEM4, + EV_USE_ITEM5, + EV_USE_ITEM6, + EV_USE_ITEM7, + EV_USE_ITEM8, + EV_USE_ITEM9, + EV_USE_ITEM10, + EV_USE_ITEM11, + EV_USE_ITEM12, + EV_USE_ITEM13, + EV_USE_ITEM14, + EV_USE_ITEM15, + + EV_ITEMUSEFAIL, + + EV_ITEM_RESPAWN, + EV_ITEM_POP, + EV_PLAYER_TELEPORT_IN, + EV_PLAYER_TELEPORT_OUT, + + EV_GRENADE_BOUNCE, // eventParm will be the soundindex + EV_MISSILE_STICK, // eventParm will be the soundindex + + EV_PLAY_EFFECT, + EV_PLAY_EFFECT_ID, + + EV_MUTE_SOUND, + EV_GENERAL_SOUND, + EV_GLOBAL_SOUND, // no attenuation + EV_GLOBAL_TEAM_SOUND, + EV_ENTITY_SOUND, + + EV_PLAY_ROFF, + + EV_GLASS_SHATTER, + EV_DEBRIS, + + EV_MISSILE_HIT, + EV_MISSILE_MISS, + EV_MISSILE_MISS_METAL, + EV_BULLET, // otherEntity is the shooter + + EV_PAIN, + EV_DEATH1, + EV_DEATH2, + EV_DEATH3, + EV_OBITUARY, + + EV_POWERUP_QUAD, + EV_POWERUP_BATTLESUIT, + //EV_POWERUP_REGEN, + + EV_FORCE_DRAINED, + + EV_GIB_PLAYER, // gib a previously living player + EV_SCOREPLUM, // score plum + + EV_CTFMESSAGE, + + EV_SAGA_ROUNDOVER, + EV_SAGA_OBJECTIVECOMPLETE, + + EV_DESTROY_GHOUL2_INSTANCE, + + EV_DESTROY_WEAPON_MODEL, + + EV_GIVE_NEW_RANK, + EV_SET_FREE_SABER, + EV_SET_FORCE_DISABLE, + + EV_WEAPON_CHARGE, + EV_WEAPON_CHARGE_ALT, + + EV_SHIELD_HIT, + + EV_DEBUG_LINE, + EV_TESTLINE, + EV_STOPLOOPINGSOUND, + EV_STARTLOOPINGSOUND, + EV_TAUNT, + EV_TAUNT_YES, + EV_TAUNT_NO, + EV_TAUNT_FOLLOWME, + EV_TAUNT_GETFLAG, + EV_TAUNT_GUARDBASE, + EV_TAUNT_PATROL, + + EV_BODY_QUEUE_COPY, + +} entity_event_t; // There is a maximum of 256 events (8 bits transmission, 2 high bits for uniqueness) + + +typedef enum { + GTS_RED_CAPTURE, + GTS_BLUE_CAPTURE, + GTS_RED_RETURN, + GTS_BLUE_RETURN, + GTS_RED_TAKEN, + GTS_BLUE_TAKEN, + GTS_REDTEAM_SCORED, + GTS_BLUETEAM_SCORED, + GTS_REDTEAM_TOOK_LEAD, + GTS_BLUETEAM_TOOK_LEAD, + GTS_TEAMS_ARE_TIED +} global_team_sound_t; + + + +typedef enum { + TEAM_FREE, + TEAM_RED, + TEAM_BLUE, + TEAM_SPECTATOR, + + TEAM_NUM_TEAMS +} team_t; + +// Time between location updates +#define TEAM_LOCATION_UPDATE_TIME 1000 + +// How many players on the overlay +#define TEAM_MAXOVERLAY 32 + +//team task +typedef enum { + TEAMTASK_NONE, + TEAMTASK_OFFENSE, + TEAMTASK_DEFENSE, + TEAMTASK_PATROL, + TEAMTASK_FOLLOW, + TEAMTASK_RETRIEVE, + TEAMTASK_ESCORT, + TEAMTASK_CAMP +} teamtask_t; + +// means of death +typedef enum { + MOD_UNKNOWN, + MOD_STUN_BATON, + MOD_MELEE, + MOD_SABER, + MOD_BRYAR_PISTOL, + MOD_BRYAR_PISTOL_ALT, + MOD_BLASTER, + MOD_DISRUPTOR, + MOD_DISRUPTOR_SPLASH, + MOD_DISRUPTOR_SNIPER, + MOD_BOWCASTER, + MOD_REPEATER, + MOD_REPEATER_ALT, + MOD_REPEATER_ALT_SPLASH, + MOD_DEMP2, + MOD_DEMP2_ALT, + MOD_FLECHETTE, + MOD_FLECHETTE_ALT_SPLASH, + MOD_ROCKET, + MOD_ROCKET_SPLASH, + MOD_ROCKET_HOMING, + MOD_ROCKET_HOMING_SPLASH, + MOD_THERMAL, + MOD_THERMAL_SPLASH, + MOD_TRIP_MINE_SPLASH, + MOD_TIMED_MINE_SPLASH, + MOD_DET_PACK_SPLASH, + MOD_FORCE_DARK, + MOD_SENTRY, + MOD_WATER, + MOD_SLIME, + MOD_LAVA, + MOD_CRUSH, + MOD_TELEFRAG, + MOD_FALLING, + MOD_SUICIDE, + MOD_TARGET_LASER, + MOD_TRIGGER_HURT, + MOD_MAX +} meansOfDeath_t; + + +//--------------------------------------------------------- + +// gitem_t->type +typedef enum { + IT_BAD, + IT_WEAPON, // EFX: rotate + upscale + minlight + IT_AMMO, // EFX: rotate + IT_ARMOR, // EFX: rotate + minlight + IT_HEALTH, // EFX: static external sphere + rotating internal + IT_POWERUP, // instant on, timer based + // EFX: rotate + external ring that rotates + IT_HOLDABLE, // single use, holdable item + // EFX: rotate + bob + IT_PERSISTANT_POWERUP, + IT_TEAM +} itemType_t; + +#define MAX_ITEM_MODELS 4 + +typedef struct gitem_s { + char *classname; // spawning name + char *pickup_sound; + char *world_model[MAX_ITEM_MODELS]; + char *view_model; + + char *icon; +// char *pickup_name; // for printing on pickup + + int quantity; // for ammo how much, or duration of powerup + itemType_t giType; // IT_* flags + + int giTag; + + char *precaches; // string of all models and images this item will use + char *sounds; // string of all sounds this item will use +} gitem_t; + +// included in both the game dll and the client +extern gitem_t bg_itemlist[]; +extern int bg_numItems; + +float vectoyaw( const vec3_t vec ); + +gitem_t *BG_FindItem( const char *classname ); +gitem_t *BG_FindItemForWeapon( weapon_t weapon ); +gitem_t *BG_FindItemForPowerup( powerup_t pw ); +gitem_t *BG_FindItemForHoldable( holdable_t pw ); +#define ITEM_INDEX(x) ((x)-bg_itemlist) + +qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const playerState_t *ps ); + + + +#define SABER_BLOCK_DUR 150 // number of milliseconds a block animation should take. + + + +// g_dmflags->integer flags +#define DF_NO_FALLING 8 +#define DF_FIXED_FOV 16 +#define DF_NO_FOOTSTEPS 32 + +// content masks +#define MASK_ALL (-1) +#define MASK_SOLID (CONTENTS_SOLID) +#define MASK_PLAYERSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY) +#define MASK_DEADSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP) +#define MASK_WATER (CONTENTS_WATER|CONTENTS_LAVA|CONTENTS_SLIME) +#define MASK_OPAQUE (CONTENTS_SOLID|CONTENTS_SLIME|CONTENTS_LAVA) +#define MASK_SHOT (CONTENTS_SOLID|CONTENTS_BODY|CONTENTS_CORPSE) + + +// +// entityState_t->eType +// +typedef enum { + ET_GENERAL, + ET_PLAYER, + ET_ITEM, + ET_MISSILE, + ET_SPECIAL, // rww - force fields + ET_HOLOCRON, // rww - holocron icon displays + ET_MOVER, + ET_BEAM, + ET_PORTAL, + ET_SPEAKER, + ET_PUSH_TRIGGER, + ET_TELEPORT_TRIGGER, + ET_INVISIBLE, + ET_GRAPPLE, // grapple hooked on wall + ET_TEAM, + ET_BODY, + + ET_EVENTS // any of the EV_* events can be added freestanding + // by setting eType to ET_EVENTS + eventNum + // this avoids having to set eFlags and eventNum +} entityType_t; + +// Okay, here lies the much-dreaded Pat-created FSM movement chart... Heretic II strikes again! +// Why am I inflicting this on you? Well, it's better than hardcoded states. +// Ideally this will be replaced with an external file or more sophisticated move-picker +// once the game gets out of prototype stage. + +// rww - Moved all this to bg_public so that we can access the saberMoveData stuff on the cgame +// which is currently used for determining if a saber trail should be rendered in a given frame + +typedef enum { + // Invalid, or saber not armed + LS_NONE = 0, + + // General movements with saber + LS_READY, + LS_DRAW, + LS_PUTAWAY, + + // Attacks + LS_A_TL2BR,//4 + LS_A_L2R, + LS_A_BL2TR, + LS_A_BR2TL, + LS_A_R2L, + LS_A_TR2BL, + LS_A_T2B, + LS_A_BACKSTAB, + LS_A_BACK, + LS_A_BACK_CR, + LS_A_LUNGE, + LS_A_JUMP_T__B_, + LS_A_FLIP_STAB, + LS_A_FLIP_SLASH, + + //starts + LS_S_TL2BR,//26 + LS_S_L2R, + LS_S_BL2TR,//# Start of attack chaining to SLASH LR2UL + LS_S_BR2TL,//# Start of attack chaining to SLASH LR2UL + LS_S_R2L, + LS_S_TR2BL, + LS_S_T2B, + + //returns + LS_R_TL2BR,//33 + LS_R_L2R, + LS_R_BL2TR, + LS_R_BR2TL, + LS_R_R2L, + LS_R_TR2BL, + LS_R_T2B, + + //transitions + LS_T1_BR__R,//40 + LS_T1_BR_TR, + LS_T1_BR_T_, + LS_T1_BR_TL, + LS_T1_BR__L, + LS_T1_BR_BL, + LS_T1__R_BR,//46 + LS_T1__R_TR, + LS_T1__R_T_, + LS_T1__R_TL, + LS_T1__R__L, + LS_T1__R_BL, + LS_T1_TR_BR,//52 + LS_T1_TR__R, + LS_T1_TR_T_, + LS_T1_TR_TL, + LS_T1_TR__L, + LS_T1_TR_BL, + LS_T1_T__BR,//58 + LS_T1_T___R, + LS_T1_T__TR, + LS_T1_T__TL, + LS_T1_T___L, + LS_T1_T__BL, + LS_T1_TL_BR,//64 + LS_T1_TL__R, + LS_T1_TL_TR, + LS_T1_TL_T_, + LS_T1_TL__L, + LS_T1_TL_BL, + LS_T1__L_BR,//70 + LS_T1__L__R, + LS_T1__L_TR, + LS_T1__L_T_, + LS_T1__L_TL, + LS_T1__L_BL, + LS_T1_BL_BR,//76 + LS_T1_BL__R, + LS_T1_BL_TR, + LS_T1_BL_T_, + LS_T1_BL_TL, + LS_T1_BL__L, + + //Bounces + LS_B1_BR, + LS_B1__R, + LS_B1_TR, + LS_B1_T_, + LS_B1_TL, + LS_B1__L, + LS_B1_BL, + + //Deflected attacks + LS_D1_BR, + LS_D1__R, + LS_D1_TR, + LS_D1_T_, + LS_D1_TL, + LS_D1__L, + LS_D1_BL, + LS_D1_B_, + + //Reflected attacks + LS_V1_BR, + LS_V1__R, + LS_V1_TR, + LS_V1_T_, + LS_V1_TL, + LS_V1__L, + LS_V1_BL, + LS_V1_B_, + + // Broken parries + LS_H1_T_,// + LS_H1_TR, + LS_H1_TL, + LS_H1_BR, + LS_H1_B_, + LS_H1_BL, + + // Knockaways + LS_K1_T_,// + LS_K1_TR, + LS_K1_TL, + LS_K1_BR, + LS_K1_BL, + + // Parries + LS_PARRY_UP,// + LS_PARRY_UR, + LS_PARRY_UL, + LS_PARRY_LR, + LS_PARRY_LL, + + // Projectile Reflections + LS_REFLECT_UP,// + LS_REFLECT_UR, + LS_REFLECT_UL, + LS_REFLECT_LR, + LS_REFLECT_LL, + + LS_MOVE_MAX// +} saberMoveName_t; + +typedef enum { + Q_BR, + Q_R, + Q_TR, + Q_T, + Q_TL, + Q_L, + Q_BL, + Q_B, + Q_NUM_QUADS +} saberQuadrant_t; + +typedef struct +{ + char *name; + int animToUse; + int startQuad; + int endQuad; + unsigned animSetFlags; + int blendTime; + int blocking; + saberMoveName_t chain_idle; // What move to call if the attack button is not pressed at the end of this anim + saberMoveName_t chain_attack; // What move to call if the attack button (and nothing else) is pressed + qboolean trailLength; +} saberMoveData_t; + +extern saberMoveData_t saberMoveData[LS_MOVE_MAX]; + +qboolean BG_LegalizedForcePowers(char *powerOut, int maxRank, qboolean freeSaber, int teamForce, int gametype, int fpDisabled); + +//BG anim utility functions: +qboolean BG_InSpecialJump( int anim ); +qboolean BG_InSaberStandAnim( int anim ); +qboolean BG_DirectFlippingAnim( int anim ); +qboolean BG_SaberInAttack( int move ); +qboolean BG_SaberInSpecial( int move ); +qboolean BG_SaberInIdle( int move ); +qboolean BG_FlippingAnim( int anim ); +qboolean BG_SpinningSaberAnim( int anim ); +qboolean BG_SaberInSpecialAttack( int anim ); +int BG_BrokenParryForAttack( int move ); +int BG_BrokenParryForParry( int move ); +int BG_KnockawayForParry( int move ); +qboolean BG_InRoll( playerState_t *ps, int anim ); +qboolean BG_InDeathAnim( int anim ); + +void BG_SaberStartTransAnim( int saberAnimLevel, int anim, float *animSpeed ); + +void BG_ForcePowerDrain( playerState_t *ps, forcePowers_t forcePower, int overrideAmt ); + +void BG_EvaluateTrajectory( const trajectory_t *tr, int atTime, vec3_t result ); +void BG_EvaluateTrajectoryDelta( const trajectory_t *tr, int atTime, vec3_t result ); + +void BG_AddPredictableEventToPlayerstate( int newEvent, int eventParm, playerState_t *ps ); + +void BG_TouchJumpPad( playerState_t *ps, entityState_t *jumppad ); + +void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean snap ); +void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s, int time, qboolean snap ); + +qboolean BG_PlayerTouchesItem( playerState_t *ps, entityState_t *item, int atTime ); + +qboolean BG_ParseAnimationFile(const char *filename); + +int BG_GetItemIndexByTag(int tag, int type); + +qboolean BG_HasYsalamiri(int gametype, playerState_t *ps); +qboolean BG_CanUseFPNow(int gametype, playerState_t *ps, int time, forcePowers_t power); + +void *BG_Alloc ( int size ); +void *BG_AllocUnaligned ( int size ); +void *BG_TempAlloc( int size ); +void BG_TempFree( int size ); +char *BG_StringAlloc ( const char *source ); +qboolean BG_OutOfMemory ( void ); + +extern int WeaponReadyAnim[WP_NUM_WEAPONS]; +extern int WeaponAttackAnim[WP_NUM_WEAPONS]; + +extern int forcePowerDarkLight[NUM_FORCE_POWERS]; + +#define ARENAS_PER_TIER 4 +#define MAX_ARENAS 1024 +#define MAX_ARENAS_TEXT 8192 + +#define MAX_BOTS 1024 +#define MAX_BOTS_TEXT 8192 + +#endif //__BG_PUBLIC_H__ diff --git a/code/game/bg_saber.c b/code/game/bg_saber.c new file mode 100644 index 0000000..e51e95c --- /dev/null +++ b/code/game/bg_saber.c @@ -0,0 +1,2007 @@ +#include "q_shared.h" +#include "bg_public.h" +#include "bg_local.h" + +int PM_irand_timesync(int val1, int val2) +{ + int i; + + i = (val1-1) + (Q_random( &pm->cmd.serverTime )*(val2 - val1)) + 1; + if (i < val1) + { + i = val1; + } + if (i > val2) + { + i = val2; + } + + return i; +} + +void BG_ForcePowerDrain( playerState_t *ps, forcePowers_t forcePower, int overrideAmt ) +{ + //take away the power + int drain = overrideAmt; + + /* + if (ps->powerups[PW_FORCE_BOON]) + { + return; + } + */ + //No longer grant infinite force with boon. + + if ( !drain ) + { + drain = forcePowerNeeded[ps->fd.forcePowerLevel[forcePower]][forcePower]; + } + if ( !drain ) + { + return; + } + + if (forcePower == FP_LEVITATION) + { //special case + int jumpDrain = 0; + + if (ps->velocity[2] > 250) + { + jumpDrain = 20; + } + else if (ps->velocity[2] > 200) + { + jumpDrain = 16; + } + else if (ps->velocity[2] > 150) + { + jumpDrain = 12; + } + else if (ps->velocity[2] > 100) + { + jumpDrain = 8; + } + else if (ps->velocity[2] > 50) + { + jumpDrain = 6; + } + else if (ps->velocity[2] > 0) + { + jumpDrain = 4; + } + + if (jumpDrain) + { + jumpDrain /= ps->fd.forcePowerLevel[FP_LEVITATION]; + } + + ps->fd.forcePower -= jumpDrain; + if ( ps->fd.forcePower < 0 ) + { + ps->fd.forcePower = 0; + } + + return; + } + + ps->fd.forcePower -= drain; + if ( ps->fd.forcePower < 0 ) + { + ps->fd.forcePower = 0; + } +} + +// Silly, but I'm replacing these macros so they are shorter! +#define AFLAG_IDLE (SETANIM_FLAG_NORMAL) +#define AFLAG_ACTIVE (/*SETANIM_FLAG_OVERRIDE | */SETANIM_FLAG_HOLD | SETANIM_FLAG_HOLDLESS) +#define AFLAG_WAIT (SETANIM_FLAG_HOLD | SETANIM_FLAG_HOLDLESS) +#define AFLAG_FINISH (SETANIM_FLAG_HOLD) + +saberMoveData_t saberMoveData[LS_MOVE_MAX] = {// NB:randomized + // name anim startQ endQ setanimflag blend, blocking chain_idle chain_attack trailLen + {"None", BOTH_STAND1, Q_R, Q_R, AFLAG_IDLE, 350, BLK_NO, LS_NONE, LS_NONE, 0 }, // LS_NONE = 0, + + // General movements with saber + {"Ready", BOTH_STAND2, Q_R, Q_R, AFLAG_IDLE, 350, BLK_WIDE, LS_READY, LS_S_R2L, 0 }, // LS_READY, + {"Draw", BOTH_STAND1TO2, Q_R, Q_R, AFLAG_FINISH, 350, BLK_NO, LS_READY, LS_S_R2L, 0 }, // LS_DRAW, + {"Putaway", BOTH_STAND2TO1, Q_R, Q_R, AFLAG_FINISH, 350, BLK_NO, LS_READY, LS_S_R2L, 0 }, // LS_PUTAWAY, + + // Attacks + //UL2LR + {"TL2BR Att", BOTH_A1_TL_BR, Q_TL, Q_BR, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_TL2BR, LS_R_TL2BR, 200 }, // LS_A_TL2BR + //SLASH LEFT + {"L2R Att", BOTH_A1__L__R, Q_L, Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_L2R, LS_R_L2R, 200 }, // LS_A_L2R + //LL2UR + {"BL2TR Att", BOTH_A1_BL_TR, Q_BL, Q_TR, AFLAG_ACTIVE, 50, BLK_TIGHT, LS_R_BL2TR, LS_R_BL2TR, 200 }, // LS_A_BL2TR + //LR2UL + {"BR2TL Att", BOTH_A1_BR_TL, Q_BR, Q_TL, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_BR2TL, LS_R_BR2TL, 200 }, // LS_A_BR2TL + //SLASH RIGHT + {"R2L Att", BOTH_A1__R__L, Q_R, Q_L, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_R2L, LS_R_R2L, 200 },// LS_A_R2L + //UR2LL + {"TR2BL Att", BOTH_A1_TR_BL, Q_TR, Q_BL, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_TR2BL, LS_R_TR2BL, 200 }, // LS_A_TR2BL + //SLASH DOWN + {"T2B Att", BOTH_A1_T__B_, Q_T, Q_B, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_R_T2B, LS_R_T2B, 200 }, // LS_A_T2B + //special attacks + {"Back Stab", BOTH_A2_STABBACK1, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_A_BACKSTAB + {"Back Att", BOTH_ATTACK_BACK, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_A_BACK + {"CR Back Att", BOTH_CROUCHATTACKBACK1,Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_A_BACK_CR + {"Lunge Att", BOTH_LUNGE2_B__T_, Q_B, Q_T, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_A_LUNGE + {"Jump Att", BOTH_FORCELEAP2_T__B_,Q_T, Q_B, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_A_JUMP_T__B_ + {"Flip Stab", BOTH_JUMPFLIPSTABDOWN,Q_R, Q_T, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_T1_T___R, 200 }, // LS_A_FLIP_STAB + {"Flip Slash", BOTH_JUMPFLIPSLASHDOWN1,Q_L,Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_READY, LS_T1__R_T_, 200 }, // LS_A_FLIP_SLASH + + //starts + {"TL2BR St", BOTH_S1_S1_TL, Q_R, Q_TL, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_TL2BR, LS_A_TL2BR, 200 }, // LS_S_TL2BR + {"L2R St", BOTH_S1_S1__L, Q_R, Q_L, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_L2R, LS_A_L2R, 200 }, // LS_S_L2R + {"BL2TR St", BOTH_S1_S1_BL, Q_R, Q_BL, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_BL2TR, LS_A_BL2TR, 200 }, // LS_S_BL2TR + {"BR2TL St", BOTH_S1_S1_BR, Q_R, Q_BR, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_BR2TL, LS_A_BR2TL, 200 }, // LS_S_BR2TL + {"R2L St", BOTH_S1_S1__R, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_R2L, LS_A_R2L, 200 }, // LS_S_R2L + {"TR2BL St", BOTH_S1_S1_TR, Q_R, Q_TR, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_TR2BL, LS_A_TR2BL, 200 }, // LS_S_TR2BL + {"T2B St", BOTH_S1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 100, BLK_TIGHT, LS_A_T2B, LS_A_T2B, 200 }, // LS_S_T2B + + //returns + {"TL2BR Ret", BOTH_R1_BR_S1, Q_BR, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_TL2BR + {"L2R Ret", BOTH_R1__R_S1, Q_R, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_L2R + {"BL2TR Ret", BOTH_R1_TR_S1, Q_TR, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_BL2TR + {"BR2TL Ret", BOTH_R1_TL_S1, Q_TL, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_BR2TL + {"R2L Ret", BOTH_R1__L_S1, Q_L, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_R2L + {"TR2BL Ret", BOTH_R1_BL_S1, Q_BL, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_TR2BL + {"T2B Ret", BOTH_R1_B__S1, Q_B, Q_R, AFLAG_FINISH, 100, BLK_TIGHT, LS_READY, LS_READY, 200 }, // LS_R_T2B + + //Transitions + {"BR2R Trans", BOTH_T1_BR__R, Q_BR, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast arc bottom right to right + {"BR2TR Trans", BOTH_T1_BR_TR, Q_BR, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast arc bottom right to top right (use: BOTH_T1_TR_BR) + {"BR2T Trans", BOTH_T1_BR_T_, Q_BR, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast arc bottom right to top (use: BOTH_T1_T__BR) + {"BR2TL Trans", BOTH_T1_BR_TL, Q_BR, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast weak spin bottom right to top left + {"BR2L Trans", BOTH_T1_BR__L, Q_BR, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast weak spin bottom right to left + {"BR2BL Trans", BOTH_T1_BR_BL, Q_BR, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast weak spin bottom right to bottom left + {"R2BR Trans", BOTH_T1__R_BR, Q_R, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast arc right to bottom right (use: BOTH_T1_BR__R) + {"R2TR Trans", BOTH_T1__R_TR, Q_R, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast arc right to top right + {"R2T Trans", BOTH_T1__R_T_, Q_R, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast ar right to top (use: BOTH_T1_T___R) + {"R2TL Trans", BOTH_T1__R_TL, Q_R, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast arc right to top left + {"R2L Trans", BOTH_T1__R__L, Q_R, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast weak spin right to left + {"R2BL Trans", BOTH_T1__R_BL, Q_R, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast weak spin right to bottom left + {"TR2BR Trans", BOTH_T1_TR_BR, Q_TR, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast arc top right to bottom right + {"TR2R Trans", BOTH_T1_TR__R, Q_TR, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast arc top right to right (use: BOTH_T1__R_TR) + {"TR2T Trans", BOTH_T1_TR_T_, Q_TR, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast arc top right to top (use: BOTH_T1_T__TR) + {"TR2TL Trans", BOTH_T1_TR_TL, Q_TR, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast arc top right to top left + {"TR2L Trans", BOTH_T1_TR__L, Q_TR, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast arc top right to left + {"TR2BL Trans", BOTH_T1_TR_BL, Q_TR, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast weak spin top right to bottom left + {"T2BR Trans", BOTH_T1_T__BR, Q_T, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast arc top to bottom right + {"T2R Trans", BOTH_T1_T___R, Q_T, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast arc top to right + {"T2TR Trans", BOTH_T1_T__TR, Q_T, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast arc top to top right + {"T2TL Trans", BOTH_T1_T__TL, Q_T, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast arc top to top left + {"T2L Trans", BOTH_T1_T___L, Q_T, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast arc top to left + {"T2BL Trans", BOTH_T1_T__BL, Q_T, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast arc top to bottom left + {"TL2BR Trans", BOTH_T1_TL_BR, Q_TL, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast weak spin top left to bottom right + {"TL2R Trans", BOTH_T1_TL__R, Q_TL, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast arc top left to right (use: BOTH_T1__R_TL) + {"TL2TR Trans", BOTH_T1_TL_TR, Q_TL, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast arc top left to top right (use: BOTH_T1_TR_TL) + {"TL2T Trans", BOTH_T1_TL_T_, Q_TL, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast arc top left to top (use: BOTH_T1_T__TL) + {"TL2L Trans", BOTH_T1_TL__L, Q_TL, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast arc top left to left (use: BOTH_T1__L_TL) + {"TL2BL Trans", BOTH_T1_TL_BL, Q_TL, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast arc top left to bottom left + {"L2BR Trans", BOTH_T1__L_BR, Q_L, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast weak spin left to bottom right + {"L2R Trans", BOTH_T1__L__R, Q_L, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast weak spin left to right + {"L2TR Trans", BOTH_T1__L_TR, Q_L, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast arc left to top right (use: BOTH_T1_TR__L) + {"L2T Trans", BOTH_T1__L_T_, Q_L, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast arc left to top (use: BOTH_T1_T___L) + {"L2TL Trans", BOTH_T1__L_TL, Q_L, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast arc left to top left + {"L2BL Trans", BOTH_T1__L_BL, Q_L, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_A_BL2TR, 150 }, //# Fast arc left to bottom left (use: BOTH_T1_BL__L) + {"BL2BR Trans", BOTH_T1_BL_BR, Q_BL, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_A_BR2TL, 150 }, //# Fast weak spin bottom left to bottom right + {"BL2R Trans", BOTH_T1_BL__R, Q_BL, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_A_R2L, 150 }, //# Fast weak spin bottom left to right + {"BL2TR Trans", BOTH_T1_BL_TR, Q_BL, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_TR2BL, 150 }, //# Fast weak spin bottom left to top right + {"BL2T Trans", BOTH_T1_BL_T_, Q_BL, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_A_T2B, 150 }, //# Fast arc bottom left to top (use: BOTH_T1_T__BL) + {"BL2TL Trans", BOTH_T1_BL_TL, Q_BL, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_A_TL2BR, 150 }, //# Fast arc bottom left to top left (use: BOTH_T1_TL_BL) + {"BL2L Trans", BOTH_T1_BL__L, Q_BL, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_A_L2R, 150 }, //# Fast arc bottom left to left + + //Bounces + {"Bounce BR", BOTH_B1_BR___, Q_BR, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_T1_BR_TR, 150 }, + {"Bounce R", BOTH_B1__R___, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_T1__R__L, 150 }, + {"Bounce TR", BOTH_B1_TR___, Q_TR, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_T1_TR_TL, 150 }, + {"Bounce T", BOTH_B1_T____, Q_T, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_T1_T__BL, 150 }, + {"Bounce TL", BOTH_B1_TL___, Q_TL, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_T1_TL_TR, 150 }, + {"Bounce L", BOTH_B1__L___, Q_L, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_T1__L__R, 150 }, + {"Bounce BL", BOTH_B1_BL___, Q_BL, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_T1_BL_TR, 150 }, + + //Deflected attacks (like bounces, but slide off enemy saber, not straight back) + {"Deflect BR", BOTH_D1_BR___, Q_BR, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TL2BR, LS_T1_BR_TR, 150 }, + {"Deflect R", BOTH_D1__R___, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_R_L2R, LS_T1__R__L, 150 }, + {"Deflect TR", BOTH_D1_TR___, Q_TR, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_T1_TR_TL, 150 }, + {"Deflect T", BOTH_B1_T____, Q_T, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_T1_T__BL, 150 }, + {"Deflect TL", BOTH_D1_TL___, Q_TL, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BR2TL, LS_T1_TL_TR, 150 }, + {"Deflect L", BOTH_D1__L___, Q_L, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_R_R2L, LS_T1__L__R, 150 }, + {"Deflect BL", BOTH_D1_BL___, Q_BL, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_R_TR2BL, LS_T1_BL_TR, 150 }, + {"Deflect B", BOTH_D1_B____, Q_B, Q_B, AFLAG_ACTIVE, 100, BLK_NO, LS_R_BL2TR, LS_T1_T__BL, 150 }, + + //Reflected attacks + {"Reflected BR",BOTH_V1_BR_S1, Q_BR, Q_BR, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_BR + {"Reflected R", BOTH_V1__R_S1, Q_R, Q_R, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1__R + {"Reflected TR",BOTH_V1_TR_S1, Q_TR, Q_TR, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_TR + {"Reflected T", BOTH_V1_T__S1, Q_T, Q_T, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_T_ + {"Reflected TL",BOTH_V1_TL_S1, Q_TL, Q_TL, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_TL + {"Reflected L", BOTH_V1__L_S1, Q_L, Q_L, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1__L + {"Reflected BL",BOTH_V1_BL_S1, Q_BL, Q_BL, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_BL + {"Reflected B", BOTH_V1_B__S1, Q_B, Q_B, AFLAG_ACTIVE, 100, BLK_NO, LS_READY, LS_READY, 150 },// LS_V1_B_ + + // Broken parries + {"BParry Top", BOTH_H1_S1_T_, Q_T, Q_B, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UP, + {"BParry UR", BOTH_H1_S1_TR, Q_TR, Q_BL, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UR, + {"BParry UL", BOTH_H1_S1_TL, Q_TL, Q_BR, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UL, + {"BParry LR", BOTH_H1_S1_BL, Q_BL, Q_TR, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LR, + {"BParry Bot", BOTH_H1_S1_B_, Q_B, Q_T, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LL + {"BParry LL", BOTH_H1_S1_BR, Q_BR, Q_TL, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LL + + // Knockaways + {"Knock Top", BOTH_K1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_T1_T__BR, 150 }, // LS_PARRY_UP, + {"Knock UR", BOTH_K1_S1_TR, Q_R, Q_TR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_T1_TR__R, 150 }, // LS_PARRY_UR, + {"Knock UL", BOTH_K1_S1_TL, Q_R, Q_TL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BR2TL, LS_T1_TL__L, 150 }, // LS_PARRY_UL, + {"Knock LR", BOTH_K1_S1_BL, Q_R, Q_BL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TL2BR, LS_T1_BL_TL, 150 }, // LS_PARRY_LR, + {"Knock LL", BOTH_K1_S1_BR, Q_R, Q_BR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TR2BL, LS_T1_BR_TR, 150 }, // LS_PARRY_LL + + // Parry + {"Parry Top", BOTH_P1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_T2B, 150 }, // LS_PARRY_UP, + {"Parry UR", BOTH_P1_S1_TR, Q_R, Q_TL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_TR2BL, 150 }, // LS_PARRY_UR, + {"Parry UL", BOTH_P1_S1_TL, Q_R, Q_TR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BR2TL, LS_A_TL2BR, 150 }, // LS_PARRY_UL, + {"Parry LR", BOTH_P1_S1_BL, Q_R, Q_BR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TL2BR, LS_A_BR2TL, 150 }, // LS_PARRY_LR, + {"Parry LL", BOTH_P1_S1_BR, Q_R, Q_BL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TR2BL, LS_A_BL2TR, 150 }, // LS_PARRY_LL + + // Reflecting a missile + {"Reflect Top", BOTH_P1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_T2B, 300 }, // LS_PARRY_UP, + {"Reflect UR", BOTH_P1_S1_TL, Q_R, Q_TR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BR2TL, LS_A_TL2BR, 300 }, // LS_PARRY_UR, + {"Reflect UL", BOTH_P1_S1_TR, Q_R, Q_TL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_TR2BL, 300 }, // LS_PARRY_UL, + {"Reflect LR", BOTH_P1_S1_BR, Q_R, Q_BL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TR2BL, LS_A_BL2TR, 300 }, // LS_PARRY_LR + {"Reflect LL", BOTH_P1_S1_BL, Q_R, Q_BR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TL2BR, LS_A_BR2TL, 300 }, // LS_PARRY_LL, +}; + + +int transitionMove[Q_NUM_QUADS][Q_NUM_QUADS] = +{ + LS_NONE, //Can't transition to same pos! + LS_T1_BR__R,//40 + LS_T1_BR_TR, + LS_T1_BR_T_, + LS_T1_BR_TL, + LS_T1_BR__L, + LS_T1_BR_BL, + LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any + LS_T1__R_BR,//46 + LS_NONE, //Can't transition to same pos! + LS_T1__R_TR, + LS_T1__R_T_, + LS_T1__R_TL, + LS_T1__R__L, + LS_T1__R_BL, + LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any + LS_T1_TR_BR,//52 + LS_T1_TR__R, + LS_NONE, //Can't transition to same pos! + LS_T1_TR_T_, + LS_T1_TR_TL, + LS_T1_TR__L, + LS_T1_TR_BL, + LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any + LS_T1_T__BR,//58 + LS_T1_T___R, + LS_T1_T__TR, + LS_NONE, //Can't transition to same pos! + LS_T1_T__TL, + LS_T1_T___L, + LS_T1_T__BL, + LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any + LS_T1_TL_BR,//64 + LS_T1_TL__R, + LS_T1_TL_TR, + LS_T1_TL_T_, + LS_NONE, //Can't transition to same pos! + LS_T1_TL__L, + LS_T1_TL_BL, + LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any + LS_T1__L_BR,//70 + LS_T1__L__R, + LS_T1__L_TR, + LS_T1__L_T_, + LS_T1__L_TL, + LS_NONE, //Can't transition to same pos! + LS_T1__L_BL, + LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any + LS_T1_BL_BR,//76 + LS_T1_BL__R, + LS_T1_BL_TR, + LS_T1_BL_T_, + LS_T1_BL_TL, + LS_T1_BL__L, + LS_NONE, //Can't transition to same pos! + LS_NONE, //No transitions to bottom, and no anims start there, so shouldn't need any + LS_T1_BL_BR,//NOTE: there are no transitions from bottom, so re-use the bottom right transitions + LS_T1_BR__R, + LS_T1_BR_TR, + LS_T1_BR_T_, + LS_T1_BR_TL, + LS_T1_BR__L, + LS_T1_BR_BL, + LS_NONE //No transitions to bottom, and no anims start there, so shouldn't need any +}; + +saberMoveName_t PM_AttackMoveForQuad( int quad ) +{ + switch ( quad ) + { + case Q_B: + case Q_BR: + return LS_A_BR2TL; + break; + case Q_R: + return LS_A_R2L; + break; + case Q_TR: + return LS_A_TR2BL; + break; + case Q_T: + return LS_A_T2B; + break; + case Q_TL: + return LS_A_TL2BR; + break; + case Q_L: + return LS_A_L2R; + break; + case Q_BL: + return LS_A_BL2TR; + break; + } + return LS_NONE; +} + +qboolean PM_SaberKataDone(int curmove, int newmove); + +int PM_SaberAnimTransitionAnim( int curmove, int newmove ) +{ + int retmove = newmove; + if ( curmove == LS_READY ) + {//just standing there + switch ( newmove ) + { + case LS_A_TL2BR: + case LS_A_L2R: + case LS_A_BL2TR: + case LS_A_BR2TL: + case LS_A_R2L: + case LS_A_TR2BL: + case LS_A_T2B: + //transition is the start + retmove = LS_S_TL2BR + (newmove-LS_A_TL2BR); + break; + } + } + else + { + switch ( newmove ) + { + //transitioning to ready pose + case LS_READY: + switch ( curmove ) + { + //transitioning from an attack + case LS_A_TL2BR: + case LS_A_L2R: + case LS_A_BL2TR: + case LS_A_BR2TL: + case LS_A_R2L: + case LS_A_TR2BL: + case LS_A_T2B: + //transition is the return + retmove = LS_R_TL2BR + (newmove-LS_A_TL2BR); + break; + } + break; + //transitioning to an attack + case LS_A_TL2BR: + case LS_A_L2R: + case LS_A_BL2TR: + case LS_A_BR2TL: + case LS_A_R2L: + case LS_A_TR2BL: + case LS_A_T2B: + if ( newmove == curmove ) + { + //going into an attack + if ( PM_SaberKataDone( curmove, newmove ) ) + {//done with this kata, must return to ready before attack again + retmove = LS_R_TL2BR + (newmove-LS_A_TL2BR); + } + else + {//okay to chain to another attack + retmove = transitionMove[saberMoveData[curmove].endQuad][saberMoveData[newmove].startQuad]; + } + } + else if ( saberMoveData[curmove].endQuad == saberMoveData[newmove].startQuad ) + {//new move starts from same quadrant + retmove = newmove; + } + else + { + switch ( curmove ) + { + //transitioning from an attack + case LS_A_TL2BR: + case LS_A_L2R: + case LS_A_BL2TR: + case LS_A_BR2TL: + case LS_A_R2L: + case LS_A_TR2BL: + case LS_A_T2B: + case LS_D1_BR: + case LS_D1__R: + case LS_D1_TR: + case LS_D1_T_: + case LS_D1_TL: + case LS_D1__L: + case LS_D1_BL: + case LS_D1_B_: + retmove = transitionMove[saberMoveData[curmove].endQuad][saberMoveData[newmove].startQuad]; + break; + //transitioning from a return + case LS_R_TL2BR: + case LS_R_L2R: + case LS_R_BL2TR: + case LS_R_BR2TL: + case LS_R_R2L: + case LS_R_TR2BL: + case LS_R_T2B: + //transitioning from a bounce + /* + case LS_BOUNCE_UL2LL: + case LS_BOUNCE_LL2UL: + case LS_BOUNCE_L2LL: + case LS_BOUNCE_L2UL: + case LS_BOUNCE_UR2LR: + case LS_BOUNCE_LR2UR: + case LS_BOUNCE_R2LR: + case LS_BOUNCE_R2UR: + case LS_BOUNCE_TOP: + case LS_OVER_UR2UL: + case LS_OVER_UL2UR: + case LS_BOUNCE_UR: + case LS_BOUNCE_UL: + case LS_BOUNCE_LR: + case LS_BOUNCE_LL: + */ + //transitioning from a parry/reflection/knockaway/broken parry + case LS_PARRY_UP: + case LS_PARRY_UR: + case LS_PARRY_UL: + case LS_PARRY_LR: + case LS_PARRY_LL: + case LS_REFLECT_UP: + case LS_REFLECT_UR: + case LS_REFLECT_UL: + case LS_REFLECT_LR: + case LS_REFLECT_LL: + case LS_K1_T_: + case LS_K1_TR: + case LS_K1_TL: + case LS_K1_BR: + case LS_K1_BL: + case LS_V1_BR: + case LS_V1__R: + case LS_V1_TR: + case LS_V1_T_: + case LS_V1_TL: + case LS_V1__L: + case LS_V1_BL: + case LS_V1_B_: + case LS_H1_T_: + case LS_H1_TR: + case LS_H1_TL: + case LS_H1_BR: + case LS_H1_BL: + retmove = transitionMove[saberMoveData[curmove].endQuad][saberMoveData[newmove].startQuad]; + break; + //NB: transitioning from transitions is fine + } + } + break; + //transitioning to any other anim is not supported + } + } + + if ( retmove == LS_NONE ) + { + return newmove; + } + + return retmove; +} + +int PM_SaberMoveQuadrantForMovement( usercmd_t *ucmd ) +{ + if ( ucmd->rightmove > 0 ) + {//moving right + if ( ucmd->forwardmove > 0 ) + {//forward right = TL2BR slash + return Q_TL; + } + else if ( ucmd->forwardmove < 0 ) + {//backward right = BL2TR uppercut + return Q_BL; + } + else + {//just right is a left slice + return Q_L; + } + } + else if ( ucmd->rightmove < 0 ) + {//moving left + if ( ucmd->forwardmove > 0 ) + {//forward left = TR2BL slash + return Q_TR; + } + else if ( ucmd->forwardmove < 0 ) + {//backward left = BR2TL uppercut + return Q_BR; + } + else + {//just left is a right slice + return Q_R; + } + } + else + {//not moving left or right + if ( ucmd->forwardmove > 0 ) + {//forward= T2B slash + return Q_T; + } + else if ( ucmd->forwardmove < 0 ) + {//backward= T2B slash //or B2T uppercut? + return Q_T; + } + else + {//Not moving at all + return Q_R; + } + } +} + +//=================================================================== +qboolean PM_SaberInBounce( int move ) +{ + if ( move >= LS_B1_BR && move <= LS_B1_BL ) + { + return qtrue; + } + if ( move >= LS_D1_BR && move <= LS_D1_BL ) + { + return qtrue; + } + return qfalse; +} + +qboolean PM_SaberInTransition( int move ) +{ + if ( move >= LS_T1_BR__R && move <= LS_T1_BL__L ) + { + return qtrue; + } + return qfalse; +} + +int saberMoveTransitionAngle[Q_NUM_QUADS][Q_NUM_QUADS] = +{ + 0,//Q_BR,Q_BR, + 45,//Q_BR,Q_R, + 90,//Q_BR,Q_TR, + 135,//Q_BR,Q_T, + 180,//Q_BR,Q_TL, + 215,//Q_BR,Q_L, + 270,//Q_BR,Q_BL, + 45,//Q_BR,Q_B, + 45,//Q_R,Q_BR, + 0,//Q_R,Q_R, + 45,//Q_R,Q_TR, + 90,//Q_R,Q_T, + 135,//Q_R,Q_TL, + 180,//Q_R,Q_L, + 215,//Q_R,Q_BL, + 90,//Q_R,Q_B, + 90,//Q_TR,Q_BR, + 45,//Q_TR,Q_R, + 0,//Q_TR,Q_TR, + 45,//Q_TR,Q_T, + 90,//Q_TR,Q_TL, + 135,//Q_TR,Q_L, + 180,//Q_TR,Q_BL, + 135,//Q_TR,Q_B, + 135,//Q_T,Q_BR, + 90,//Q_T,Q_R, + 45,//Q_T,Q_TR, + 0,//Q_T,Q_T, + 45,//Q_T,Q_TL, + 90,//Q_T,Q_L, + 135,//Q_T,Q_BL, + 180,//Q_T,Q_B, + 180,//Q_TL,Q_BR, + 135,//Q_TL,Q_R, + 90,//Q_TL,Q_TR, + 45,//Q_TL,Q_T, + 0,//Q_TL,Q_TL, + 45,//Q_TL,Q_L, + 90,//Q_TL,Q_BL, + 135,//Q_TL,Q_B, + 215,//Q_L,Q_BR, + 180,//Q_L,Q_R, + 135,//Q_L,Q_TR, + 90,//Q_L,Q_T, + 45,//Q_L,Q_TL, + 0,//Q_L,Q_L, + 45,//Q_L,Q_BL, + 90,//Q_L,Q_B, + 270,//Q_BL,Q_BR, + 215,//Q_BL,Q_R, + 180,//Q_BL,Q_TR, + 135,//Q_BL,Q_T, + 90,//Q_BL,Q_TL, + 45,//Q_BL,Q_L, + 0,//Q_BL,Q_BL, + 45,//Q_BL,Q_B, + 45,//Q_B,Q_BR, + 90,//Q_B,Q_R, + 135,//Q_B,Q_TR, + 180,//Q_B,Q_T, + 135,//Q_B,Q_TL, + 90,//Q_B,Q_L, + 45,//Q_B,Q_BL, + 0//Q_B,Q_B, +}; + +int PM_SaberAttackChainAngle( int move1, int move2 ) +{ + if ( move1 == -1 || move2 == -1 ) + { + return -1; + } + return saberMoveTransitionAngle[saberMoveData[move1].endQuad][saberMoveData[move2].startQuad]; +} + +qboolean PM_SaberKataDone(int curmove, int newmove) +{ + if ( pm->ps->fd.saberAnimLevel == FORCE_LEVEL_3 ) + { + if ( curmove == LS_NONE || newmove == LS_NONE ) + { + if ( pm->ps->fd.saberAnimLevel >= FORCE_LEVEL_3 && pm->ps->saberAttackChainCount > PM_irand_timesync( 0, 1 ) ) + { + return qtrue; + } + } + else if ( pm->ps->saberAttackChainCount > PM_irand_timesync( 2, 3 ) ) + { + return qtrue; + } + else if ( pm->ps->saberAttackChainCount > 0 ) + { + int chainAngle = PM_SaberAttackChainAngle( curmove, newmove ); + if ( chainAngle < 135 || chainAngle > 215 ) + {//if trying to chain to a move that doesn't continue the momentum + return qtrue; + } + else if ( chainAngle == 180 ) + {//continues the momentum perfectly, allow it to chain 66% of the time + if ( pm->ps->saberAttackChainCount > 1 ) + { + return qtrue; + } + } + else + {//would continue the movement somewhat, 50% chance of continuing + if ( pm->ps->saberAttackChainCount > 2 ) + { + return qtrue; + } + } + } + } + else + {//Perhaps have chainAngle influence fast and medium chains as well? For now, just do level 3. + if (newmove == LS_A_TL2BR || + newmove == LS_A_L2R || + newmove == LS_A_BL2TR || + newmove == LS_A_BR2TL || + newmove == LS_A_R2L || + newmove == LS_A_TR2BL ) + { //lower chaining tolerance for spinning saber anims + int chainTolerance; + + if (pm->ps->fd.saberAnimLevel == FORCE_LEVEL_1) + { + chainTolerance = 5; + } + else + { + chainTolerance = 3; + } + + if (pm->ps->saberAttackChainCount >= chainTolerance && PM_irand_timesync(1, pm->ps->saberAttackChainCount) > chainTolerance) + { + return qtrue; + } + } + if ( pm->ps->fd.saberAnimLevel == FORCE_LEVEL_2 && pm->ps->saberAttackChainCount > PM_irand_timesync( 2, 5 ) ) + { + return qtrue; + } + } + return qfalse; +} + +void PM_SetAnimFrame( playerState_t *gent, int frame, qboolean torso, qboolean legs ) +{ + gent->saberLockFrame = frame; +} + +void PM_SaberLockBreak( playerState_t *genemy, qboolean victory ) +{ + int winAnim = BOTH_STAND1, loseAnim = BOTH_STAND1; + qboolean punishLoser = qfalse; + + switch ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) ) + { + case BOTH_BF2LOCK: + pm->ps->saberMove = LS_A_T2B; + winAnim = BOTH_A3_T__B_; + if ( !victory ) + {//no-one won + genemy->saberMove = LS_A_T2B; + loseAnim = winAnim; + } + else + { + punishLoser = qtrue; + } + break; + case BOTH_BF1LOCK: + pm->ps->saberMove = LS_K1_T_; + winAnim = BOTH_K1_S1_T_; + if ( !victory ) + {//no-one won + genemy->saberMove = LS_K1_T_; + loseAnim = winAnim; + } + else + { + punishLoser = qtrue; + } + break; + case BOTH_CWCIRCLELOCK: + winAnim = BOTH_CWCIRCLEBREAK; + if ( !victory ) + {//no-one won + loseAnim = winAnim; + } + else + { + genemy->saberMove = LS_H1_BL; + genemy->saberBlocked = BLOCKED_PARRY_BROKEN; + punishLoser = qtrue; + } + break; + case BOTH_CCWCIRCLELOCK: + winAnim = BOTH_CCWCIRCLEBREAK; + if ( !victory ) + {//no-one won + loseAnim = winAnim; + } + else + { + genemy->saberMove = LS_H1_BR; + genemy->saberBlocked = BLOCKED_PARRY_BROKEN; + punishLoser = qtrue; + } + break; + } + PM_SetAnim( SETANIM_BOTH, winAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, -1 ); + + if (punishLoser) + { //someone lost the lock, so punish them by knocking them down + vec3_t oppDir; + + int strength = 8; + + VectorSubtract(genemy->origin, pm->ps->origin, oppDir); + VectorNormalize(oppDir); + + genemy->forceHandExtend = HANDEXTEND_KNOCKDOWN; + genemy->forceHandExtendTime = pm->cmd.serverTime + 1100; + genemy->forceDodgeAnim = 0; //this toggles between 1 and 0, when it's 1 we should play the get up anim + + genemy->otherKiller = pm->ps->clientNum; + genemy->otherKillerTime = pm->cmd.serverTime + 5000; + genemy->otherKillerDebounceTime = pm->cmd.serverTime + 100; + + genemy->velocity[0] = oppDir[0]*(strength*40); + genemy->velocity[1] = oppDir[1]*(strength*40); + genemy->velocity[2] = 100; + + pm->checkDuelLoss = genemy->clientNum+1; + } + else + { //If no one lost, then shove each player away from the other + vec3_t oppDir; + + int strength = 4; + + VectorSubtract(genemy->origin, pm->ps->origin, oppDir); + VectorNormalize(oppDir); + genemy->velocity[0] = oppDir[0]*(strength*40); + genemy->velocity[1] = oppDir[1]*(strength*40); + genemy->velocity[2] = 150; + + VectorSubtract(pm->ps->origin, genemy->origin, oppDir); + VectorNormalize(oppDir); + pm->ps->velocity[0] = oppDir[0]*(strength*40); + pm->ps->velocity[1] = oppDir[1]*(strength*40); + pm->ps->velocity[2] = 150; + + genemy->forceHandExtend = HANDEXTEND_WEAPONREADY; + } + + pm->ps->weaponTime = 0; + genemy->weaponTime = 0; + + pm->ps->saberLockTime = genemy->saberLockTime = 0; + pm->ps->saberLockFrame = genemy->saberLockFrame = 0; + pm->ps->saberLockEnemy = genemy->saberLockEnemy = 0; + + pm->ps->forceHandExtend = HANDEXTEND_WEAPONREADY; + + PM_AddEvent( EV_JUMP ); + if ( !victory ) + {//no-one won + BG_AddPredictableEventToPlayerstate(EV_JUMP, 0, genemy); + } + else + { + if ( PM_irand_timesync( 0, 1 ) ) + { + BG_AddPredictableEventToPlayerstate(EV_JUMP, PM_irand_timesync( 0, 75 ), genemy); + } + } +} + +extern qboolean ValidAnimFileIndex ( int index ); +void PM_SaberLocked( void ) +{ + int remaining = 0; + + playerState_t *genemy = pm->bgClients[pm->ps->saberLockEnemy]; + if ( !genemy ) + { + return; + } + if ( ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF2LOCK || + (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF1LOCK || + (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CWCIRCLELOCK || + (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CCWCIRCLELOCK ) + && ( (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF2LOCK || + (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF1LOCK || + (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CWCIRCLELOCK || + (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CCWCIRCLELOCK ) + ) + { + float dist = 0; + + pm->ps->torsoTimer = 0; + pm->ps->weaponTime = 0; + genemy->torsoTimer = 0; + genemy->weaponTime = 0; + + dist = DistanceSquared(pm->ps->origin,genemy->origin); + if ( dist < 64 || dist > 6400 ) + {//between 8 and 80 from each other + PM_SaberLockBreak( genemy, qfalse ); + return; + } + if ( (pm->cmd.buttons & BUTTON_ATTACK) || pm->ps->saberLockAdvance ) + {//holding attack + animation_t *anim; + + if (pm->ps->saberLockAdvance) + {//tapping + animation_t *anim; + float currentFrame; + int curFrame; + int strength = 1; + + pm->ps->saberLockAdvance = qfalse; + + anim = &pm->animations[pm->ps->torsoAnim&~ANIM_TOGGLEBIT]; + + currentFrame = pm->ps->saberLockFrame; + + strength = pm->ps->fd.forcePowerLevel[FP_SABERATTACK]+1; + + if ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CCWCIRCLELOCK || + (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF2LOCK ) + { + curFrame = floor( currentFrame )-strength; + //drop my frame one + if ( curFrame <= anim->firstFrame ) + {//I won! Break out + PM_SaberLockBreak( genemy, qtrue ); + return; + } + else + { + PM_SetAnimFrame( pm->ps, curFrame, qtrue, qtrue ); + remaining = curFrame-anim->firstFrame; + } + } + else + { + curFrame = ceil( currentFrame )+strength; + //advance my frame one + if ( curFrame >= anim->firstFrame+anim->numFrames ) + {//I won! Break out + PM_SaberLockBreak( genemy, qtrue ); + return; + } + else + { + PM_SetAnimFrame( pm->ps, curFrame, qtrue, qtrue ); + remaining = anim->firstFrame+anim->numFrames-curFrame; + } + } + if ( !PM_irand_timesync( 0, 2 ) ) + { + PM_AddEvent( EV_JUMP ); + } + } + else + { + return; + } + + anim = &pm->animations[(genemy->torsoAnim&~ANIM_TOGGLEBIT)]; + + if ( (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CWCIRCLELOCK || + (genemy->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF1LOCK ) + { + if ( !PM_irand_timesync( 0, 2 ) ) + { + BG_AddPredictableEventToPlayerstate(EV_PAIN, floor((float)80/100*100.0f), genemy); + } + PM_SetAnimFrame( genemy, anim->firstFrame+remaining, qtrue, qtrue ); + } + else + { + PM_SetAnimFrame( genemy, anim->firstFrame+anim->numFrames-remaining, qtrue, qtrue ); + } + } + } + else + {//something broke us out of it + PM_SaberLockBreak( genemy, qfalse ); + } +} + +qboolean PM_SaberInBrokenParry( int move ) +{ + if ( move >= LS_V1_BR && move <= LS_V1_B_ ) + { + return qtrue; + } + if ( move >= LS_H1_T_ && move <= LS_H1_BL ) + { + return qtrue; + } + return qfalse; +} + + +int PM_BrokenParryForParry( int move ) +{ + switch ( move ) + { + case LS_PARRY_UP: + return LS_H1_T_; + break; + case LS_PARRY_UR: + return LS_H1_TR; + break; + case LS_PARRY_UL: + return LS_H1_TL; + break; + case LS_PARRY_LR: + return LS_H1_BL; + break; + case LS_PARRY_LL: + return LS_H1_BR; + break; + case LS_READY: + return LS_H1_B_; + break; + } + return LS_NONE; +} + +#define BACK_STAB_DISTANCE 128 + +qboolean PM_CanBackstab(void) +{ + trace_t tr; + vec3_t flatAng; + vec3_t fwd, back; + vec3_t trmins = {-15, -15, -8}; + vec3_t trmaxs = {15, 15, 8}; + + VectorCopy(pm->ps->viewangles, flatAng); + flatAng[PITCH] = 0; + + AngleVectors(flatAng, fwd, 0, 0); + + back[0] = pm->ps->origin[0] - fwd[0]*BACK_STAB_DISTANCE; + back[1] = pm->ps->origin[1] - fwd[1]*BACK_STAB_DISTANCE; + back[2] = pm->ps->origin[2] - fwd[2]*BACK_STAB_DISTANCE; + + pm->trace(&tr, pm->ps->origin, trmins, trmaxs, back, pm->ps->clientNum, MASK_PLAYERSOLID); + + if (tr.fraction != 1.0 && tr.entityNum >= 0 && tr.entityNum < MAX_CLIENTS) + { //We don't have real entity access here so we can't do an indepth check. But if it's a client and it's behind us, I guess that's reason enough to stab backward + return qtrue; + } + + return qfalse; +} + +saberMoveName_t PM_SaberFlipOverAttackMove(trace_t *tr) +{ + vec3_t fwdAngles, jumpFwd; + float zDiff = 0; + playerState_t *psData; + + VectorCopy( pm->ps->viewangles, fwdAngles ); + fwdAngles[PITCH] = fwdAngles[ROLL] = 0; + AngleVectors( fwdAngles, jumpFwd, NULL, NULL ); + VectorScale( jumpFwd, 50, pm->ps->velocity ); + pm->ps->velocity[2] = 400; + + psData = pm->bgClients[tr->entityNum]; + + //go higher for enemies higher than you, lower for those lower than you + if (psData) + { + zDiff = psData->origin[2] - pm->ps->origin[2]; + } + else + { + zDiff = 0; + } + pm->ps->velocity[2] += (zDiff)*1.5f; + + //clamp to decent-looking values + if ( zDiff <= 0 && pm->ps->velocity[2] < 200 ) + {//if we're on same level, don't let me jump so low, I clip into the ground + pm->ps->velocity[2] = 200; + } + else if ( pm->ps->velocity[2] < 100 ) + { + pm->ps->velocity[2] = 100; + } + else if ( pm->ps->velocity[2] > 400 ) + { + pm->ps->velocity[2] = 400; + } + + PM_SetForceJumpZStart(pm->ps->origin[2]);//so we don't take damage if we land at same height + + PM_AddEvent( EV_JUMP ); + pm->ps->fd.forceJumpSound = 1; + pm->cmd.upmove = 0; + + if ( PM_irand_timesync( 0, 1 ) ) + { + return LS_A_FLIP_STAB; + } + else + { + return LS_A_FLIP_SLASH; + } +} + +#define FLIPHACK_DISTANCE 200 + +qboolean PM_SomeoneInFront(trace_t *tr) +{ //Also a very simplified version of the sp counterpart + vec3_t flatAng; + vec3_t fwd, back; + vec3_t trmins = {-15, -15, -8}; + vec3_t trmaxs = {15, 15, 8}; + + VectorCopy(pm->ps->viewangles, flatAng); + flatAng[PITCH] = 0; + + AngleVectors(flatAng, fwd, 0, 0); + + back[0] = pm->ps->origin[0] + fwd[0]*FLIPHACK_DISTANCE; + back[1] = pm->ps->origin[1] + fwd[1]*FLIPHACK_DISTANCE; + back[2] = pm->ps->origin[2] + fwd[2]*FLIPHACK_DISTANCE; + + pm->trace(tr, pm->ps->origin, trmins, trmaxs, back, pm->ps->clientNum, MASK_PLAYERSOLID); + + if (tr->fraction != 1.0 && tr->entityNum >= 0 && tr->entityNum < MAX_CLIENTS) + { + return qtrue; + } + + return qfalse; +} + +saberMoveName_t PM_SaberLungeAttackMove( void ) +{ + vec3_t fwdAngles, jumpFwd; + + VectorCopy( pm->ps->viewangles, fwdAngles ); + fwdAngles[PITCH] = fwdAngles[ROLL] = 0; + //do the lunge + AngleVectors( fwdAngles, jumpFwd, NULL, NULL ); + VectorScale( jumpFwd, 150, pm->ps->velocity ); + PM_AddEvent( EV_JUMP ); + + return LS_A_LUNGE; +} + +saberMoveName_t PM_SaberJumpAttackMove( void ) +{ + vec3_t fwdAngles, jumpFwd; + + VectorCopy( pm->ps->viewangles, fwdAngles ); + fwdAngles[PITCH] = fwdAngles[ROLL] = 0; + AngleVectors( fwdAngles, jumpFwd, NULL, NULL ); + VectorScale( jumpFwd, 300, pm->ps->velocity ); + pm->ps->velocity[2] = 280; + PM_SetForceJumpZStart(pm->ps->origin[2]);//so we don't take damage if we land at same height + + PM_AddEvent( EV_JUMP ); + pm->ps->fd.forceJumpSound = 1; + pm->cmd.upmove = 0; + + return LS_A_JUMP_T__B_; +} + +float PM_GroundDistance(void) +{ + trace_t tr; + vec3_t down; + + VectorCopy(pm->ps->origin, down); + + down[2] -= 4096; + + pm->trace(&tr, pm->ps->origin, pm->mins, pm->maxs, down, pm->ps->clientNum, MASK_SOLID); + + VectorSubtract(pm->ps->origin, tr.endpos, down); + + return VectorLength(down); +} + +saberMoveName_t PM_SaberAttackForMovement(saberMoveName_t curmove) +{ + saberMoveName_t newmove = -1; + + if ( pm->cmd.rightmove > 0 ) + {//moving right + if ( pm->cmd.forwardmove > 0 ) + {//forward right = TL2BR slash + newmove = LS_A_TL2BR; + } + else if ( pm->cmd.forwardmove < 0 ) + {//backward right = BL2TR uppercut + newmove = LS_A_BL2TR; + } + else + {//just right is a left slice + newmove = LS_A_L2R; + } + } + else if ( pm->cmd.rightmove < 0 ) + {//moving left + if ( pm->cmd.forwardmove > 0 ) + {//forward left = TR2BL slash + newmove = LS_A_TR2BL; + } + else if ( pm->cmd.forwardmove < 0 ) + {//backward left = BR2TL uppercut + newmove = LS_A_BR2TL; + } + else + {//just left is a right slice + newmove = LS_A_R2L; + } + } + else + {//not moving left or right + if ( pm->cmd.forwardmove > 0 ) + {//forward= T2B slash + if (pm->ps->fd.saberAnimLevel == FORCE_LEVEL_2 && + pm->ps->velocity[2] > 100 && + PM_GroundDistance() < 32 && + !BG_InSpecialJump(pm->ps->legsAnim) && + !BG_SaberInSpecialAttack(pm->ps->torsoAnim)) + { //FLIP AND DOWNWARD ATTACK + trace_t tr; + + if (PM_SomeoneInFront(&tr)) + { + newmove = PM_SaberFlipOverAttackMove(&tr); + } + } + else if (pm->ps->fd.saberAnimLevel == FORCE_LEVEL_1 && + pm->ps->groundEntityNum != ENTITYNUM_NONE && + (pm->ps->pm_flags & PMF_DUCKED) && + pm->ps->weaponTime <= 0 && + !BG_SaberInSpecialAttack(pm->ps->torsoAnim)) + { //LUNGE (weak) + newmove = PM_SaberLungeAttackMove(); + } + else + { + newmove = LS_A_T2B; + } + } + else if ( pm->cmd.forwardmove < 0 ) + {//backward= T2B slash//B2T uppercut? + if (PM_CanBackstab() && !BG_SaberInSpecialAttack(pm->ps->torsoAnim)) + { //BACKSTAB (attack varies by level) + if (pm->ps->fd.saberAnimLevel >= FORCE_LEVEL_2) + {//medium and higher attacks + if ( (pm->ps->pm_flags&PMF_DUCKED) || pm->cmd.upmove < 0 ) + { + newmove = LS_A_BACK_CR; + } + else + { + newmove = LS_A_BACK; + } + } + else + { //weak attack + newmove = LS_A_BACKSTAB; + } + } + else + { + newmove = LS_A_T2B; + } + } + else if ( PM_SaberInBounce( curmove ) ) + {//bounces should go to their default attack if you don't specify a direction but are attacking + newmove = saberMoveData[curmove].chain_attack; + + if ( PM_SaberKataDone(curmove, newmove) ) + { + newmove = saberMoveData[curmove].chain_idle; + } + else + { + newmove = saberMoveData[curmove].chain_attack; + } + } + else if ( curmove == LS_READY ) + {//Not moving at all, shouldn't have gotten here...? + //for now, just pick a random attack + //newmove = Q_irand( LS_A_TL2BR, LS_A_T2B ); + //rww - If we don't seed with a "common" value, the client and server will get mismatched + //prediction values. Under laggy conditions this will cause the appearance of rapid swing + //sequence changes. + + newmove = LS_A_T2B; //decided we don't like random attacks when idle, use an overhead instead. + } + } + + return newmove; +} +/* +================= +PM_WeaponLightsaber + +Consults a chart to choose what to do with the lightsaber. +While this is a little different than the Quake 3 code, there is no clean way of using the Q3 code for this kind of thing. +================= +*/ +// Ultimate goal is to set the sabermove to the proper next location +// Note that if the resultant animation is NONE, then the animation is essentially "idle", and is set in WP_TorsoAnim +void PM_WeaponLightsaber(void) +{ + int addTime,amount; + qboolean delayed_fire = qfalse; + int anim=-1, curmove, newmove=LS_NONE; + + qboolean saberInAir = qtrue; + qboolean checkOnlyWeap = qfalse; + + if ( pm->ps->saberLockTime > pm->cmd.serverTime ) + { + pm->ps->saberMove = LS_NONE; + PM_SaberLocked(); + return; + } + else + { + if ( ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF2LOCK || + (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF1LOCK || + (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CWCIRCLELOCK || + (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CCWCIRCLELOCK || + pm->ps->saberLockFrame ) + ) + { + if (pm->ps->saberLockEnemy < ENTITYNUM_NONE && + pm->ps->saberLockEnemy >= 0) + { + playerState_t *en; + + en = pm->bgClients[pm->ps->saberLockEnemy]; + + if (en) + { + PM_SaberLockBreak(en, qfalse); + return; + } + } + + if ( ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF2LOCK || + (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_BF1LOCK || + (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CWCIRCLELOCK || + (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == BOTH_CCWCIRCLELOCK || + pm->ps->saberLockFrame ) + ) + { + pm->ps->torsoTimer = 0; + PM_SetAnim(SETANIM_TORSO,BOTH_STAND1,SETANIM_FLAG_OVERRIDE, 100); + pm->ps->saberLockFrame = 0; + } + } + } + + if (pm->ps->saberHolstered) + { + if (pm->ps->saberMove != LS_READY) + { + PM_SetSaberMove( LS_READY ); + } + + if ((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) != (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT)) + { + PM_SetAnim(SETANIM_TORSO,(pm->ps->legsAnim & ~ANIM_TOGGLEBIT),SETANIM_FLAG_OVERRIDE, 100); + } + + if (BG_InSaberStandAnim(pm->ps->torsoAnim)) + { + PM_SetAnim(SETANIM_TORSO,BOTH_STAND1,SETANIM_FLAG_OVERRIDE, 100); + } + + if (pm->ps->weaponTime < 1 && ((pm->cmd.buttons & BUTTON_ALT_ATTACK) || (pm->cmd.buttons & BUTTON_ATTACK))) + { + if (pm->ps->duelTime < pm->cmd.serverTime) + { + pm->ps->saberHolstered = qfalse; + PM_AddEvent(EV_SABER_UNHOLSTER); + } + } + + if ( pm->ps->weaponTime > 0 ) + { + pm->ps->weaponTime -= pml.msec; + } + + checkOnlyWeap = qtrue; + goto weapChecks; + } + + if ((pm->cmd.buttons & BUTTON_ALT_ATTACK) && + pm->ps->weaponTime < 1 && + pm->ps->saberCanThrow && + pm->ps->fd.forcePower >= forcePowerNeeded[pm->ps->fd.forcePowerLevel[FP_SABERTHROW]][FP_SABERTHROW] && + !BG_HasYsalamiri(pm->gametype, pm->ps) && + BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_SABERTHROW) + ) + { //might as well just check for a saber throw right here + //This will get set to false again once the saber makes it back to its owner game-side + if (!pm->ps->saberInFlight) + { + pm->ps->fd.forcePower -= forcePowerNeeded[pm->ps->fd.forcePowerLevel[FP_SABERTHROW]][FP_SABERTHROW]; + } + + pm->ps->saberInFlight = qtrue; + } + + if ( pm->ps->saberInFlight ) + {//guiding saber + PM_SetAnim(SETANIM_TORSO, BOTH_SABERPULL, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); + pm->ps->torsoTimer = 1; + return; + } + + // don't allow attack until all buttons are up + //This is bad. It freezes the attack state and the animations if you hold the button after respawning, and it looks strange. + /* + if ( pm->ps->pm_flags & PMF_RESPAWNED ) { + return; + } + */ + + // check for dead player + if ( pm->ps->stats[STAT_HEALTH] <= 0 ) { + return; + } + + if (pm->ps->weaponstate == WEAPON_READY || + pm->ps->weaponstate == WEAPON_IDLE) + { + if (pm->ps->saberMove != LS_READY && pm->ps->weaponTime <= 0 && !pm->ps->saberBlocked) + { + PM_SetSaberMove( LS_READY ); + } + } + + if( (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN2 || + (pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN1 ) + { + if ((pm->ps->torsoAnim & ~ANIM_TOGGLEBIT) != (pm->ps->legsAnim & ~ANIM_TOGGLEBIT)) + { + PM_SetAnim(SETANIM_TORSO,(pm->ps->legsAnim & ~ANIM_TOGGLEBIT),SETANIM_FLAG_OVERRIDE, 100); + } + } + + // make weapon function + if ( pm->ps->weaponTime > 0 ) { + pm->ps->weaponTime -= pml.msec; + + if (pm->ps->saberBlocked && pm->ps->torsoAnim != saberMoveData[pm->ps->saberMove].animToUse) + { //rww - keep him in the blocking pose until he can attack again + PM_SetAnim(SETANIM_TORSO,saberMoveData[pm->ps->saberMove].animToUse,saberMoveData[pm->ps->saberMove].animSetFlags|SETANIM_FLAG_HOLD, saberMoveData[pm->ps->saberMove].blendTime); + return; + } + } + else + { + pm->ps->weaponstate = WEAPON_READY; + } + + // Now we react to a block action by the player's lightsaber. + if ( pm->ps->saberBlocked ) + { + int firstSet = 0; + + if (!pm->ps->weaponTime) + { + firstSet = 1; + } + + switch ( pm->ps->saberBlocked ) + { + case BLOCKED_BOUNCE_MOVE: + { //act as a bounceMove and reset the saberMove instead of using a seperate value for it + PM_SetSaberMove( pm->ps->saberMove ); + pm->ps->weaponTime = pm->ps->torsoTimer; + pm->ps->saberBlocked = 0; + } + break; + case BLOCKED_PARRY_BROKEN: + //whatever parry we were is in now broken, play the appropriate knocked-away anim + { + int nextMove; + + if ( PM_SaberInBrokenParry( pm->ps->saberMove ) ) + {//already have one...? + nextMove = pm->ps->saberMove; + } + else + { + nextMove = PM_BrokenParryForParry( pm->ps->saberMove ); + } + if ( nextMove != LS_NONE ) + { + PM_SetSaberMove( nextMove ); + pm->ps->weaponTime = pm->ps->torsoTimer; + } + else + {//Maybe in a knockaway? + if (pm->ps->weaponTime <= 0) + { + pm->ps->saberBlocked = 0; + } + } + } + break; + case BLOCKED_ATK_BOUNCE: + // If there is absolutely no blocked move in the chart, don't even mess with the animation. + // OR if we are already in a block or parry. + if (pm->ps->saberMove >= LS_T1_BR__R) + {//an actual bounce? Other bounces before this are actually transitions? + pm->ps->saberBlocked = BLOCKED_NONE; + } + else + { + int bounceMove; + + if ( pm->cmd.buttons & BUTTON_ATTACK ) + {//transition to a new attack + int newQuad = PM_SaberMoveQuadrantForMovement( &pm->cmd ); + while ( newQuad == saberMoveData[pm->ps->saberMove].startQuad ) + {//player is still in same attack quad, don't repeat that attack because it looks bad, + //FIXME: try to pick one that might look cool? + //newQuad = Q_irand( Q_BR, Q_BL ); + newQuad = PM_irand_timesync( Q_BR, Q_BL ); + //FIXME: sanity check, just in case? + }//else player is switching up anyway, take the new attack dir + bounceMove = transitionMove[saberMoveData[pm->ps->saberMove].startQuad][newQuad]; + } + else + {//return to ready + if ( saberMoveData[pm->ps->saberMove].startQuad == Q_T ) + { + bounceMove = LS_R_BL2TR; + } + else if ( saberMoveData[pm->ps->saberMove].startQuad < Q_T ) + { + bounceMove = LS_R_TL2BR+saberMoveData[pm->ps->saberMove].startQuad-Q_BR; + } + else// if ( saberMoveData[pm->ps->saberMove].startQuad > Q_T ) + { + bounceMove = LS_R_BR2TL+saberMoveData[pm->ps->saberMove].startQuad-Q_TL; + } + } + PM_SetSaberMove( bounceMove ); + + pm->ps->weaponTime = pm->ps->torsoTimer;//+saberMoveData[bounceMove].blendTime+SABER_BLOCK_DUR; + + } + break; + case BLOCKED_UPPER_RIGHT: + PM_SetSaberMove( LS_PARRY_UR ); + break; + case BLOCKED_UPPER_RIGHT_PROJ: + PM_SetSaberMove( LS_REFLECT_UR ); + break; + case BLOCKED_UPPER_LEFT: + PM_SetSaberMove( LS_PARRY_UL ); + break; + case BLOCKED_UPPER_LEFT_PROJ: + PM_SetSaberMove( LS_REFLECT_UL ); + break; + case BLOCKED_LOWER_RIGHT: + PM_SetSaberMove( LS_PARRY_LR ); + break; + case BLOCKED_LOWER_RIGHT_PROJ: + PM_SetSaberMove( LS_REFLECT_LR ); + break; + case BLOCKED_LOWER_LEFT: + PM_SetSaberMove( LS_PARRY_LL ); + break; + case BLOCKED_LOWER_LEFT_PROJ: + PM_SetSaberMove( LS_REFLECT_LL); + break; + case BLOCKED_TOP: + PM_SetSaberMove( LS_PARRY_UP ); + break; + case BLOCKED_TOP_PROJ: + PM_SetSaberMove( LS_REFLECT_UP ); + break; + default: + pm->ps->saberBlocked = BLOCKED_NONE; + break; + } + + if (pm->ps->saberBlocked != BLOCKED_ATK_BOUNCE && pm->ps->saberBlocked != BLOCKED_PARRY_BROKEN && pm->ps->weaponTime < 1) + { + pm->ps->torsoTimer = SABER_BLOCK_DUR; + pm->ps->weaponTime = pm->ps->torsoTimer; + } + + if (firstSet) + { + return; + } + + // Charging is like a lead-up before attacking again. This is an appropriate use, or we can create a new weaponstate for blocking + pm->ps->weaponstate = WEAPON_READY; + + // Done with block, so stop these active weapon branches. + return; + } + +weapChecks: + // check for weapon change + // can't change if weapon is firing, but can change again if lowering or raising + if ( pm->ps->weaponTime <= 0 || pm->ps->weaponstate != WEAPON_FIRING ) { + if ( pm->ps->weapon != pm->cmd.weapon ) { + PM_BeginWeaponChange( pm->cmd.weapon ); + } + } + + if ( pm->ps->weaponTime > 0 ) + { + return; + } + + // ********************************************************* + // WEAPON_DROPPING + // ********************************************************* + + // change weapon if time + if ( pm->ps->weaponstate == WEAPON_DROPPING ) { + PM_FinishWeaponChange(); + return; + } + + // ********************************************************* + // WEAPON_RAISING + // ********************************************************* + + if ( pm->ps->weaponstate == WEAPON_RAISING ) + {//Just selected the weapon + pm->ps->weaponstate = WEAPON_IDLE; + if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_WALK1 ) + { + PM_SetAnim(SETANIM_TORSO,BOTH_WALK1,SETANIM_FLAG_NORMAL, 100); + } + else if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN2 ) + { + PM_SetAnim(SETANIM_TORSO,BOTH_RUN2,SETANIM_FLAG_NORMAL, 100); + } + else if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_WALK2 ) + { + PM_SetAnim(SETANIM_TORSO,BOTH_WALK2,SETANIM_FLAG_NORMAL, 100); + } + else + { + PM_SetAnim(SETANIM_TORSO,PM_GetSaberStance(),SETANIM_FLAG_NORMAL, 100); + } + + if (pm->ps->weaponstate == WEAPON_RAISING) + { + return; + } + + } + + if (checkOnlyWeap) + { + return; + } + + // ********************************************************* + // Check for WEAPON ATTACK + // ********************************************************* + + if(!delayed_fire) + { + // Start with the current move, and cross index it with the current control states. + if ( pm->ps->saberMove > LS_NONE && pm->ps->saberMove < LS_MOVE_MAX ) + { + curmove = pm->ps->saberMove; + } + else + { + curmove = LS_READY; + } + // check for fire + if ( !(pm->cmd.buttons & (BUTTON_ATTACK)) ) + { + if (pm->ps->weaponTime != 0) + {//Still firing + pm->ps->weaponstate = WEAPON_FIRING; + } + else if ( pm->ps->weaponstate != WEAPON_READY ) + { + pm->ps->weaponstate = WEAPON_IDLE; + } + //Check for finishing an anim if necc. + if ( curmove >= LS_S_TL2BR && curmove <= LS_S_T2B ) + {//started a swing, must continue from here + newmove = LS_A_TL2BR + (curmove-LS_S_TL2BR); + } + else if ( curmove >= LS_A_TL2BR && curmove <= LS_A_T2B ) + {//finished an attack, must continue from here + newmove = LS_R_TL2BR + (curmove-LS_A_TL2BR); + } + else if ( PM_SaberInTransition( curmove ) ) + {//in a transition, must play sequential attack + newmove = saberMoveData[curmove].chain_attack; + } + else if ( PM_SaberInBounce( curmove ) ) + {//in a bounce + newmove = saberMoveData[curmove].chain_idle;//oops, not attacking, so don't chain + } + else + {//FIXME: what about returning from a parry? + PM_SetSaberMove( LS_READY ); + return; + } + } + + // *************************************************** + // Pressing attack, so we must look up the proper attack move. + + saberInAir = qtrue; + + if ( pm->ps->weaponTime > 0 ) + { // Last attack is not yet complete. + pm->ps->weaponstate = WEAPON_FIRING; + return; + } + else + { + int both = qfalse; + + if ( curmove >= LS_PARRY_UP && curmove <= LS_REFLECT_LL ) + {//from a parry or deflection, can go directly into an attack (?) + switch ( saberMoveData[curmove].endQuad ) + { + case Q_T: + newmove = LS_A_T2B; + break; + case Q_TR: + newmove = LS_A_TL2BR; + break; + case Q_TL: + newmove = LS_A_TR2BL; + break; + case Q_BR: + newmove = LS_A_BR2TL; + break; + case Q_BL: + newmove = LS_A_BL2TR; + break; + //shouldn't be a parry that ends at L, R or B + } + } + + if ( newmove != LS_NONE ) + {//have a valid, final LS_ move picked, so skip findingt he transition move and just get the anim + anim = saberMoveData[newmove].animToUse; + } + + //FIXME: diagonal dirs use the figure-eight attacks from ready pose? + if ( anim == -1 ) + { + //FIXME: take FP_SABER_OFFENSE into account here somehow? + if ( PM_SaberInTransition( curmove ) ) + {//in a transition, must play sequential attack + newmove = saberMoveData[curmove].chain_attack; + } + else if ( curmove >= LS_S_TL2BR && curmove <= LS_S_T2B ) + {//started a swing, must continue from here + newmove = LS_A_TL2BR + (curmove-LS_S_TL2BR); + } + else if ( PM_SaberInBrokenParry( curmove ) ) + {//broken parries must always return to ready + newmove = LS_READY; + } + else//if ( pm->cmd.buttons&BUTTON_ATTACK && !(pm->ps->pm_flags&PMF_ATTACK_HELD) )//only do this if just pressed attack button? + {//get attack move from movement command + saberMoveName_t checkMove = PM_SaberAttackForMovement(curmove); + if (checkMove != -1) + { + newmove = checkMove; + } + + if ( (PM_SaberInBounce( curmove )||PM_SaberInBrokenParry( curmove )) + && saberMoveData[newmove].startQuad == saberMoveData[curmove].endQuad ) + {//this attack would be a repeat of the last (which was blocked), so don't actually use it, use the default chain attack for this bounce + newmove = saberMoveData[curmove].chain_attack; + } + + if ( PM_SaberKataDone(curmove, newmove) ) + {//we came from a bounce and cannot chain to another attack because our kata is done + newmove = saberMoveData[curmove].chain_idle; + } + } + + if ( newmove != LS_NONE ) + { + //Now get the proper transition move + newmove = PM_SaberAnimTransitionAnim( curmove, newmove ); + + assert( bgGlobalAnimations[saberMoveData[newmove].animToUse].firstFrame != 0 || + bgGlobalAnimations[saberMoveData[newmove].animToUse].numFrames != 0); + + anim = saberMoveData[newmove].animToUse; + } + } + + if (anim == -1) + {//not side-stepping, pick neutral anim + // Add randomness for prototype? + newmove = saberMoveData[curmove].chain_attack; + + anim= saberMoveData[newmove].animToUse; + + if ( !pm->cmd.forwardmove && !pm->cmd.rightmove && pm->cmd.upmove >= 0 && pm->ps->groundEntityNum != ENTITYNUM_NONE ) + {//not moving at all, so set the anim on entire body + both = qtrue; + } + + } + + if ( anim == -1) + { + if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_WALK1 ) + { + anim = BOTH_WALK1; + } + else if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_RUN2 ) + { + anim = BOTH_RUN2; + } + else if((pm->ps->legsAnim & ~ANIM_TOGGLEBIT) == BOTH_WALK2 ) + { + anim = BOTH_WALK2; + } + else + { + anim = PM_GetSaberStance(); + } + + if (anim == BOTH_RUN2 && !pm->cmd.forwardmove && !pm->cmd.rightmove) + { //semi-hacky (if not moving on x-y and still playing the running anim, force the player out of it) + anim = PM_GetSaberStance(); + } + newmove = LS_READY; + } + + if ( !pm->ps->saberActive ) + {//turn on the saber if it's not on + pm->ps->saberActive = qtrue; + } + + PM_SetSaberMove( newmove ); + + if ( both ) + { + PM_SetAnim(SETANIM_LEGS,anim,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); + } + + //don't fire again until anim is done + pm->ps->weaponTime = pm->ps->torsoTimer; + } + } + + // ********************************************************* + // WEAPON_FIRING + // ********************************************************* + + pm->ps->weaponstate = WEAPON_FIRING; + + amount = weaponData[pm->ps->weapon].energyPerShot; + + addTime = pm->ps->weaponTime; + + pm->ps->saberAttackSequence = pm->ps->torsoAnim; + if ( !addTime ) + { + addTime = weaponData[pm->ps->weapon].fireTime; + } + pm->ps->weaponTime = addTime; +} + +void PM_SetSaberMove(short newMove) +{ + unsigned int setflags = saberMoveData[newMove].animSetFlags; + int anim = saberMoveData[newMove].animToUse; + int parts = SETANIM_TORSO; + + if ( newMove == LS_READY || newMove == LS_A_FLIP_STAB || newMove == LS_A_FLIP_SLASH ) + {//finished with a kata (or in a special move) reset attack counter + pm->ps->saberAttackChainCount = 0; + } + else if ( BG_SaberInAttack( newMove ) ) + {//continuing with a kata, increment attack counter + pm->ps->saberAttackChainCount++; + } + + if (pm->ps->saberAttackChainCount > 16) + { //for the sake of being able to send the value over the net within a reasonable bit count + pm->ps->saberAttackChainCount = 16; + } + + if ( pm->ps->fd.saberAnimLevel > FORCE_LEVEL_1 && + !BG_SaberInIdle( newMove ) && !PM_SaberInParry( newMove ) && !PM_SaberInKnockaway( newMove ) && !PM_SaberInBrokenParry( newMove ) && !PM_SaberInReflect( newMove ) && !BG_SaberInSpecial(newMove)) + {//readies, parries and reflections have only 1 level + //increment the anim to the next level of saber anims + anim += (pm->ps->fd.saberAnimLevel-FORCE_LEVEL_1) * SABER_ANIM_GROUP_SIZE; + } + + // If the move does the same animation as the last one, we need to force a restart... + if ( saberMoveData[pm->ps->saberMove].animToUse == anim && newMove > LS_PUTAWAY) + { + setflags |= SETANIM_FLAG_RESTART; + } + + //saber torso anims should always be highest priority (4/12/02 - for special anims only) + if ( newMove == LS_A_LUNGE + || newMove == LS_A_JUMP_T__B_ + || newMove == LS_A_BACKSTAB + || newMove == LS_A_BACK + || newMove == LS_A_BACK_CR + || newMove == LS_A_FLIP_STAB + || newMove == LS_A_FLIP_SLASH ) + { + setflags |= SETANIM_FLAG_OVERRIDE; + } + + if ( BG_InSaberStandAnim(anim) || anim == BOTH_STAND1 ) + { + anim = (pm->ps->legsAnim & ~ANIM_TOGGLEBIT); + + if ((anim >= BOTH_STAND1 && anim <= BOTH_STAND4TOATTACK2) || + (anim >= TORSO_DROPWEAP1 && anim <= TORSO_WEAPONIDLE12)) + { //If standing then use the special saber stand anim + anim = PM_GetSaberStance(); + } + + if (pm->ps->pm_flags & PMF_DUCKED) + { //Playing torso walk anims while crouched makes you look like a monkey + anim = PM_GetSaberStance(); + } + + if (anim == BOTH_WALKBACK1 || anim == BOTH_WALKBACK2) + { //normal stance when walking backward so saber doesn't look like it's cutting through leg + anim = PM_GetSaberStance(); + } + + parts = SETANIM_TORSO; + } + + if ( newMove == LS_A_LUNGE + || newMove == LS_A_JUMP_T__B_ + || newMove == LS_A_BACKSTAB + || newMove == LS_A_BACK + || newMove == LS_A_BACK_CR + || newMove == LS_A_FLIP_STAB + || newMove == LS_A_FLIP_SLASH ) + { + parts = SETANIM_BOTH; + } + else if ( BG_SpinningSaberAnim( anim ) ) + {//spins must be played on entire body + parts = SETANIM_BOTH; + } + else if ( (!pm->cmd.forwardmove&&!pm->cmd.rightmove&&!pm->cmd.upmove)) + {//not trying to run, duck or jump + if ( !BG_FlippingAnim( pm->ps->legsAnim ) && + !BG_InRoll( pm->ps, pm->ps->legsAnim ) && + !PM_InKnockDown( pm->ps ) && + !PM_JumpingAnim( pm->ps->legsAnim ) && + !BG_InSpecialJump( pm->ps->legsAnim ) && + anim != PM_GetSaberStance() && + pm->ps->groundEntityNum != ENTITYNUM_NONE && + !(pm->ps->pm_flags & PMF_DUCKED)) + { + parts = SETANIM_BOTH; + } + } + + PM_SetAnim(parts, anim, setflags, saberMoveData[newMove].blendTime); + + if ( (pm->ps->torsoAnim&~ANIM_TOGGLEBIT) == anim ) + {//successfully changed anims + //special check for *starting* a saber swing + //playing at attack + if ( BG_SaberInAttack( newMove ) || BG_SaberInSpecialAttack( anim ) ) + { + if ( pm->ps->saberMove != newMove ) + {//wasn't playing that attack before + PM_AddEvent(EV_SABER_ATTACK); + } + } + + pm->ps->saberMove = newMove; + pm->ps->saberBlocking = saberMoveData[newMove].blocking; + + pm->ps->torsoAnim = anim; + + if (pm->ps->weaponTime <= 0) + { + pm->ps->saberBlocked = BLOCKED_NONE; + } + } +} + diff --git a/code/game/bg_saga.h b/code/game/bg_saga.h new file mode 100644 index 0000000..dcdbd01 --- /dev/null +++ b/code/game/bg_saga.h @@ -0,0 +1,8 @@ +#define MAX_SAGA_INFO_SIZE 8192 //128000 + +#define SAGATEAM_IMPERIAL 1 //e.g. TEAM_RED +#define SAGATEAM_REBEL 2 //e.g. TEAM_BLUE + +#define SAGA_POINTS_OBJECTIVECOMPLETED 3 +#define SAGA_POINTS_FINALOBJECTIVECOMPLETED 5 +#define SAGA_POINTS_TEAMWONROUND 5 diff --git a/code/game/bg_slidemove.c b/code/game/bg_slidemove.c new file mode 100644 index 0000000..5db9b0b --- /dev/null +++ b/code/game/bg_slidemove.c @@ -0,0 +1,404 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// bg_slidemove.c -- part of bg_pmove functionality + +#include "q_shared.h" +#include "bg_public.h" +#include "bg_local.h" + +/* + +input: origin, velocity, bounds, groundPlane, trace function + +output: origin, velocity, impacts, stairup boolean + +*/ + +/* +================== +PM_SlideMove + +Returns qtrue if the velocity was clipped in some way +================== +*/ +#define MAX_CLIP_PLANES 5 +qboolean PM_SlideMove( qboolean gravity ) { + int bumpcount, numbumps; + vec3_t dir; + float d; + int numplanes; + vec3_t planes[MAX_CLIP_PLANES]; + vec3_t primal_velocity; + vec3_t clipVelocity; + int i, j, k; + trace_t trace; + vec3_t end; + float time_left; + float into; + vec3_t endVelocity; + vec3_t endClipVelocity; + + numbumps = 4; + + VectorCopy (pm->ps->velocity, primal_velocity); + + if ( gravity ) { + VectorCopy( pm->ps->velocity, endVelocity ); + endVelocity[2] -= pm->ps->gravity * pml.frametime; + pm->ps->velocity[2] = ( pm->ps->velocity[2] + endVelocity[2] ) * 0.5; + primal_velocity[2] = endVelocity[2]; + if ( pml.groundPlane ) { + // slide along the ground plane + PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal, + pm->ps->velocity, OVERCLIP ); + } + } + + time_left = pml.frametime; + + // never turn against the ground plane + if ( pml.groundPlane ) { + numplanes = 1; + VectorCopy( pml.groundTrace.plane.normal, planes[0] ); + } else { + numplanes = 0; + } + + // never turn against original velocity + VectorNormalize2( pm->ps->velocity, planes[numplanes] ); + numplanes++; + + for ( bumpcount=0 ; bumpcount < numbumps ; bumpcount++ ) { + + // calculate position we are trying to move to + VectorMA( pm->ps->origin, time_left, pm->ps->velocity, end ); + + // see if we can make it there + pm->trace ( &trace, pm->ps->origin, pm->mins, pm->maxs, end, pm->ps->clientNum, pm->tracemask); + + if (trace.allsolid) { + // entity is completely trapped in another solid + pm->ps->velocity[2] = 0; // don't build up falling damage, but allow sideways acceleration + return qtrue; + } + + if (trace.fraction > 0) { + // actually covered some distance + VectorCopy (trace.endpos, pm->ps->origin); + } + + if (trace.fraction == 1) { + break; // moved the entire distance + } + + // save entity for contact + PM_AddTouchEnt( trace.entityNum ); + + time_left -= time_left * trace.fraction; + + if (numplanes >= MAX_CLIP_PLANES) { + // this shouldn't really happen + VectorClear( pm->ps->velocity ); + return qtrue; + } + + // + // if this is the same plane we hit before, nudge velocity + // out along it, which fixes some epsilon issues with + // non-axial planes + // + for ( i = 0 ; i < numplanes ; i++ ) { + if ( DotProduct( trace.plane.normal, planes[i] ) > 0.99 ) { + VectorAdd( trace.plane.normal, pm->ps->velocity, pm->ps->velocity ); + break; + } + } + if ( i < numplanes ) { + continue; + } + VectorCopy (trace.plane.normal, planes[numplanes]); + numplanes++; + + // + // modify velocity so it parallels all of the clip planes + // + + // find a plane that it enters + for ( i = 0 ; i < numplanes ; i++ ) { + into = DotProduct( pm->ps->velocity, planes[i] ); + if ( into >= 0.1 ) { + continue; // move doesn't interact with the plane + } + + // see how hard we are hitting things + if ( -into > pml.impactSpeed ) { + pml.impactSpeed = -into; + } + + // slide along the plane + PM_ClipVelocity (pm->ps->velocity, planes[i], clipVelocity, OVERCLIP ); + + // slide along the plane + PM_ClipVelocity (endVelocity, planes[i], endClipVelocity, OVERCLIP ); + + // see if there is a second plane that the new move enters + for ( j = 0 ; j < numplanes ; j++ ) { + if ( j == i ) { + continue; + } + if ( DotProduct( clipVelocity, planes[j] ) >= 0.1 ) { + continue; // move doesn't interact with the plane + } + + // try clipping the move to the plane + PM_ClipVelocity( clipVelocity, planes[j], clipVelocity, OVERCLIP ); + PM_ClipVelocity( endClipVelocity, planes[j], endClipVelocity, OVERCLIP ); + + // see if it goes back into the first clip plane + if ( DotProduct( clipVelocity, planes[i] ) >= 0 ) { + continue; + } + + // slide the original velocity along the crease + CrossProduct (planes[i], planes[j], dir); + VectorNormalize( dir ); + d = DotProduct( dir, pm->ps->velocity ); + VectorScale( dir, d, clipVelocity ); + + CrossProduct (planes[i], planes[j], dir); + VectorNormalize( dir ); + d = DotProduct( dir, endVelocity ); + VectorScale( dir, d, endClipVelocity ); + + // see if there is a third plane the the new move enters + for ( k = 0 ; k < numplanes ; k++ ) { + if ( k == i || k == j ) { + continue; + } + if ( DotProduct( clipVelocity, planes[k] ) >= 0.1 ) { + continue; // move doesn't interact with the plane + } + + // stop dead at a tripple plane interaction + VectorClear( pm->ps->velocity ); + return qtrue; + } + } + + // if we have fixed all interactions, try another move + VectorCopy( clipVelocity, pm->ps->velocity ); + VectorCopy( endClipVelocity, endVelocity ); + break; + } + } + + if ( gravity ) { + VectorCopy( endVelocity, pm->ps->velocity ); + } + + // don't change velocity if in a timer (FIXME: is this correct?) + if ( pm->ps->pm_time ) { + VectorCopy( primal_velocity, pm->ps->velocity ); + } + + return ( bumpcount != 0 ); +} + +/* +================== +PM_StepSlideMove + +================== +*/ +void PM_StepSlideMove( qboolean gravity ) { + vec3_t start_o, start_v; + vec3_t down_o, down_v; + trace_t trace; +// float down_dist, up_dist; +// vec3_t delta, delta2; + vec3_t up, down; + vec3_t nvel, prevel; + float stepSize; + float totalVel; + float pre_z; + int usingspeed; + int i; + + i = 0; + + usingspeed = 0; + + VectorCopy (pm->ps->origin, start_o); + VectorCopy (pm->ps->velocity, start_v); + + if ( PM_SlideMove( gravity ) == 0 ) { + return; // we got exactly where we wanted to go first try + } + + if (pm->ps->fd.forcePowersActive & (1 << FP_SPEED)) + { + usingspeed = 1; + } + + VectorCopy(start_o, down); + down[2] -= STEPSIZE; + pm->trace (&trace, start_o, pm->mins, pm->maxs, down, pm->ps->clientNum, pm->tracemask); + VectorSet(up, 0, 0, 1); + // never step up when you still have up velocity + if ( pm->ps->velocity[2] > 0 && (trace.fraction == 1.0 || + DotProduct(trace.plane.normal, up) < 0.7)) { + + if (!usingspeed) + { + return; + } + } + + VectorCopy (pm->ps->origin, down_o); + VectorCopy (pm->ps->velocity, down_v); + + VectorCopy (start_o, up); + up[2] += STEPSIZE; + + // test the player position if they were a stepheight higher + pm->trace (&trace, start_o, pm->mins, pm->maxs, up, pm->ps->clientNum, pm->tracemask); + if ( trace.allsolid ) { + if ( pm->debugLevel ) { + Com_Printf("%i:bend can't step\n", c_pmove); + } + if (!usingspeed) + { + return; // can't step up + } + } + + stepSize = trace.endpos[2] - start_o[2]; + // try slidemove from this position + VectorCopy (trace.endpos, pm->ps->origin); + VectorCopy (start_v, pm->ps->velocity); + + VectorCopy(pm->ps->velocity, prevel); + + pre_z = prevel[2]; + + PM_SlideMove( gravity ); + + VectorSubtract(pm->ps->velocity, prevel, prevel); + if (prevel[0] < 0) + { + prevel[0] = -prevel[0]; + } + if (prevel[1] < 0) + { + prevel[1] = -prevel[1]; + } + + totalVel = prevel[0]+prevel[1]; + + if (pre_z > 480 && (pre_z - pm->ps->velocity[2]) >= 480 && pm->ps->fd.forceJumpZStart) + { //smashed head on the ceiling during a force jump + pm->ps->fd.forceSpeedDoDamage = (pre_z - pm->ps->velocity[2])*0.04; + if (pm->numtouch) + { //do damage to the other player if we hit one + while (i < pm->numtouch) + { + if (pm->touchents[i] < MAX_CLIENTS && pm->touchents[i] != pm->ps->clientNum) + { + pm->ps->fd.forceSpeedHitIndex = pm->touchents[i]; + break; + } + + i++; + } + } + + i = 0; + } + + if (usingspeed) + { + if (pm->ps->fd.forceSpeedSmash > 1.3 && totalVel > 500) + { //if we were going fast enough and hadn't hit a while in a while then smash into it hard + //the difference between our velocity pre and post colide must also be greater than 600 to do damage + //Com_Printf("SMASH %f\n", pm->ps->fd.forceSpeedSmash); + VectorCopy(start_v, nvel); //then bounce the player back a bit in the opposite of the direction he was going + nvel[0] += start_o[0]; + nvel[1] += start_o[1]; + nvel[2] += start_o[2]; + VectorSubtract(start_o, nvel, nvel); + pm->ps->velocity[0] = nvel[0]*0.1; + pm->ps->velocity[1] = nvel[1]*0.1; + pm->ps->velocity[2] = 64; + pm->ps->fd.forceSpeedDoDamage = pm->ps->fd.forceSpeedSmash*10; //do somewhere in the range of 15-25 damage, depending on speed + pm->ps->fd.forceSpeedSmash = 0; + + if (pm->numtouch) + { + while (i < pm->numtouch) + { + if (pm->touchents[i] < MAX_CLIENTS && pm->touchents[i] != pm->ps->clientNum) + { + pm->ps->fd.forceSpeedHitIndex = pm->touchents[i]; + break; + } + + i++; + } + } + return; + } + + pm->ps->fd.forceSpeedSmash -= 0.1; + //we hit a wall so decrease speed + + if (pm->ps->fd.forceSpeedSmash < 1) + { + pm->ps->fd.forceSpeedSmash = 1; + } + } + + // push down the final amount + VectorCopy (pm->ps->origin, down); + down[2] -= stepSize; + pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, down, pm->ps->clientNum, pm->tracemask); + if ( !trace.allsolid ) { + VectorCopy (trace.endpos, pm->ps->origin); + } + if ( trace.fraction < 1.0 ) { + PM_ClipVelocity( pm->ps->velocity, trace.plane.normal, pm->ps->velocity, OVERCLIP ); + } + +#if 0 + // if the down trace can trace back to the original position directly, don't step + pm->trace( &trace, pm->ps->origin, pm->mins, pm->maxs, start_o, pm->ps->clientNum, pm->tracemask); + if ( trace.fraction == 1.0 ) { + // use the original move + VectorCopy (down_o, pm->ps->origin); + VectorCopy (down_v, pm->ps->velocity); + if ( pm->debugLevel ) { + Com_Printf("%i:bend\n", c_pmove); + } + } else +#endif + { + // use the step move + float delta; + + delta = pm->ps->origin[2] - start_o[2]; + if ( delta > 2 ) { + if ( delta < 7 ) { + PM_AddEvent( EV_STEP_4 ); + } else if ( delta < 11 ) { + PM_AddEvent( EV_STEP_8 ); + } else if ( delta < 15 ) { + PM_AddEvent( EV_STEP_12 ); + } else { + PM_AddEvent( EV_STEP_16 ); + } + } + if ( pm->debugLevel ) { + Com_Printf("%i:stepped\n", c_pmove); + } + } +} + diff --git a/code/game/bg_weapons.c b/code/game/bg_weapons.c new file mode 100644 index 0000000..0cd9691 --- /dev/null +++ b/code/game/bg_weapons.c @@ -0,0 +1,331 @@ +// Copyright (C) 2001-2002 Raven Software +// +// bg_weapons.c -- part of bg_pmove functionality + +#include "q_shared.h" +#include "bg_public.h" +#include "bg_local.h" + +// Muzzle point table... +vec3_t WP_MuzzlePoint[WP_NUM_WEAPONS] = +{// Fwd, right, up. + {0, 0, 0 }, // WP_NONE, + {0 , 8, 0 }, // WP_STUN_BATON, + {8 , 16, 0 }, // WP_SABER, + {12, 6, -6 }, // WP_BRYAR_PISTOL, + {12, 6, -6 }, // WP_BLASTER, + {12, 6, -6 }, // WP_DISRUPTOR, + {12, 2, -6 }, // WP_BOWCASTER, + {12, 4.5, -6 }, // WP_REPEATER, + {12, 6, -6 }, // WP_DEMP2, + {12, 6, -6 }, // WP_FLECHETTE, + {12, 8, 0 }, // WP_ROCKET_LAUNCHER, + {12, 0, -4 }, // WP_THERMAL, + {12, 0, -10 }, // WP_TRIP_MINE, + {12, 0, -4 }, // WP_DET_PACK, +}; + +weaponData_t weaponData[WP_NUM_WEAPONS] = +{ + { // WP_NONE +// "No Weapon", // char classname[32]; // Spawning name + AMMO_NONE, // int ammoIndex; // Index to proper ammo slot + 0, // int ammoLow; // Count when ammo is low + 0, // int energyPerShot; // Amount of energy used per shot + 0, // int fireTime; // Amount of time between firings + 0, // int range; // Range of weapon + 0, // int altEnergyPerShot; // Amount of energy used for alt-fire + 0, // int altFireTime; // Amount of time between alt-firings + 0, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + }, + { // WP_STUN_BATON +// "Stun Baton", // char classname[32]; // Spawning name + AMMO_NONE, // int ammoIndex; // Index to proper ammo slot + 5, // int ammoLow; // Count when ammo is low + 0, // int energyPerShot; // Amount of energy used per shot + 400, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 0, // int altEnergyPerShot; // Amount of energy used for alt-fire + 400, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + }, + { // WP_SABER, +// "Lightsaber", // char classname[32]; // Spawning name + AMMO_NONE, // int ammoIndex; // Index to proper ammo slot + 5, // int ammoLow; // Count when ammo is low + 0, // int energyPerShot; // Amount of energy used per shot + 100, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 0, // int altEnergyPerShot; // Amount of energy used for alt-fire + 100, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + }, + { // WP_BRYAR_PISTOL, +// "Bryar Pistol", // char classname[32]; // Spawning name + AMMO_BLASTER, // int ammoIndex; // Index to proper ammo slot + 15, // int ammoLow; // Count when ammo is low + 2, // int energyPerShot; // Amount of energy used per shot + 400, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 2, // int altEnergyPerShot; // Amount of energy used for alt-fire + 400, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 200, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 1, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 1500 // int altMaxCharge; // above for secondary + }, + { // WP_BLASTER +// "E11 Blaster Rifle", // char classname[32]; // Spawning name + AMMO_BLASTER, // int ammoIndex; // Index to proper ammo slot + 5, // int ammoLow; // Count when ammo is low + 2, // int energyPerShot; // Amount of energy used per shot + 350, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 3, // int altEnergyPerShot; // Amount of energy used for alt-fire + 150, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + }, + { // WP_DISRUPTOR +// "Tenloss Disruptor Rifle",// char classname[32]; // Spawning name + AMMO_POWERCELL, // int ammoIndex; // Index to proper ammo slot + 5, // int ammoLow; // Count when ammo is low + 5, // int energyPerShot; // Amount of energy used per shot + 600, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 6, // int altEnergyPerShot; // Amount of energy used for alt-fire + 1300, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 200, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 3, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 1700 // int altMaxCharge; // above for secondary + }, + { // WP_BOWCASTER +// "Wookiee Bowcaster", // char classname[32]; // Spawning name + AMMO_POWERCELL, // int ammoIndex; // Index to proper ammo slot + 5, // int ammoLow; // Count when ammo is low + 5, // int energyPerShot; // Amount of energy used per shot + 1000, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 5, // int altEnergyPerShot; // Amount of energy used for alt-fire + 750, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 400, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 5, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 1700, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + }, + { // WP_REPEATER +// "Imperial Heavy Repeater",// char classname[32]; // Spawning name + AMMO_METAL_BOLTS, // int ammoIndex; // Index to proper ammo slot + 5, // int ammoLow; // Count when ammo is low + 1, // int energyPerShot; // Amount of energy used per shot + 100, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 15, // int altEnergyPerShot; // Amount of energy used for alt-fire + 800, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + }, + { // WP_DEMP2 +// "DEMP2", // char classname[32]; // Spawning name + AMMO_POWERCELL, // int ammoIndex; // Index to proper ammo slot + 5, // int ammoLow; // Count when ammo is low + 8, // int energyPerShot; // Amount of energy used per shot + 500, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 6, // int altEnergyPerShot; // Amount of energy used for alt-fire + 900, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 250, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 3, // int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 2100 // int altMaxCharge; // above for secondary + }, + { // WP_FLECHETTE +// "Golan Arms Flechette", // char classname[32]; // Spawning name + AMMO_METAL_BOLTS, // int ammoIndex; // Index to proper ammo slot + 5, // int ammoLow; // Count when ammo is low + 10, // int energyPerShot; // Amount of energy used per shot + 700, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 15, // int altEnergyPerShot; // Amount of energy used for alt-fire + 800, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + }, + { // WP_ROCKET_LAUNCHER +// "Merr-Sonn Missile System", // char classname[32]; // Spawning name + AMMO_ROCKETS, // int ammoIndex; // Index to proper ammo slot + 5, // int ammoLow; // Count when ammo is low + 1, // int energyPerShot; // Amount of energy used per shot + 900, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 2, // int altEnergyPerShot; // Amount of energy used for alt-fire + 1200, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + }, + { // WP_THERMAL +// "Thermal Detonator", // char classname[32]; // Spawning name + AMMO_THERMAL, // int ammoIndex; // Index to proper ammo slot + 0, // int ammoLow; // Count when ammo is low + 1, // int energyPerShot; // Amount of energy used per shot + 800, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 1, // int altEnergyPerShot; // Amount of energy used for alt-fire + 400, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + }, + { // WP_TRIP_MINE +// "Trip Mine", // char classname[32]; // Spawning name + AMMO_TRIPMINE, // int ammoIndex; // Index to proper ammo slot + 0, // int ammoLow; // Count when ammo is low + 1, // int energyPerShot; // Amount of energy used per shot + 800, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 1, // int altEnergyPerShot; // Amount of energy used for alt-fire + 400, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + }, + { // WP_DET_PACK +// "Det Pack", // char classname[32]; // Spawning name + AMMO_DETPACK, // int ammoIndex; // Index to proper ammo slot + 0, // int ammoLow; // Count when ammo is low + 1, // int energyPerShot; // Amount of energy used per shot + 800, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + 0, // int altEnergyPerShot; // Amount of energy used for alt-fire + 400, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + }, + { // WP_EMPLCACED_GUN +// "Emplaced Gun", // char classname[32]; // Spawning name + /*AMMO_BLASTER*/0, // int ammoIndex; // Index to proper ammo slot + /*5*/0, // int ammoLow; // Count when ammo is low + /*2*/0, // int energyPerShot; // Amount of energy used per shot + 100, // int fireTime; // Amount of time between firings + 8192, // int range; // Range of weapon + /*3*/0, // int altEnergyPerShot; // Amount of energy used for alt-fire + 100, // int altFireTime; // Amount of time between alt-firings + 8192, // int altRange; // Range of alt-fire + 0, // int chargeSubTime; // ms interval for subtracting ammo during charge + 0, // int altChargeSubTime; // above for secondary + 0, // int chargeSub; // amount to subtract during charge on each interval + 0, //int altChargeSub; // above for secondary + 0, // int maxCharge; // stop subtracting once charged for this many ms + 0 // int altMaxCharge; // above for secondary + } +}; + +ammoData_t ammoData[AMMO_MAX] = +{ + { // AMMO_NONE +// "", // char icon[32]; // Name of ammo icon file + 0 // int max; // Max amount player can hold of ammo + }, + { // AMMO_FORCE +// "", // char icon[32]; // Name of ammo icon file + 100 // int max; // Max amount player can hold of ammo + }, + { // AMMO_BLASTER +// "", // char icon[32]; // Name of ammo icon file + 300 // int max; // Max amount player can hold of ammo + }, + { // AMMO_POWERCELL +// "", // char icon[32]; // Name of ammo icon file + 300 // int max; // Max amount player can hold of ammo + }, + { // AMMO_METAL_BOLTS +// "", // char icon[32]; // Name of ammo icon file + 300 // int max; // Max amount player can hold of ammo + }, + { // AMMO_ROCKETS +// "", // char icon[32]; // Name of ammo icon file + 25 // int max; // Max amount player can hold of ammo + }, + { // AMMO_EMPLACED +// "", // char icon[32]; // Name of ammo icon file + 800 // int max; // Max amount player can hold of ammo + }, + { // AMMO_THERMAL +// "", // char icon[32]; // Name of ammo icon file + 10 // int max; // Max amount player can hold of ammo + }, + { // AMMO_TRIPMINE +// "", // char icon[32]; // Name of ammo icon file + 10 // int max; // Max amount player can hold of ammo + }, + { // AMMO_DETPACK +// "", // char icon[32]; // Name of ammo icon file + 10 // int max; // Max amount player can hold of ammo + } +}; + + diff --git a/code/game/bg_weapons.h b/code/game/bg_weapons.h new file mode 100644 index 0000000..3a42fbc --- /dev/null +++ b/code/game/bg_weapons.h @@ -0,0 +1,107 @@ +// Filename:- bg_weapons.h +// +// This crosses both client and server. It could all be crammed into bg_public, but isolation of this type of data is best. + +#ifndef __WEAPONS_H__ +#define __WEAPONS_H__ + +typedef enum { + WP_NONE, + + WP_STUN_BATON, + WP_SABER, // NOTE: lots of code assumes this is the first weapon (... which is crap) so be careful -Ste. + WP_BRYAR_PISTOL, + WP_BLASTER, + WP_DISRUPTOR, + WP_BOWCASTER, + WP_REPEATER, + WP_DEMP2, + WP_FLECHETTE, + WP_ROCKET_LAUNCHER, + WP_THERMAL, + WP_TRIP_MINE, + WP_DET_PACK, + WP_EMPLACED_GUN, + WP_TURRET, + +// WP_GAUNTLET, +// WP_MACHINEGUN, // Bryar +// WP_SHOTGUN, // Blaster +// WP_GRENADE_LAUNCHER, // Thermal +// WP_LIGHTNING, // +// WP_RAILGUN, // +// WP_GRAPPLING_HOOK, + + WP_NUM_WEAPONS +} weapon_t; + + +typedef enum //# ammo_e +{ + AMMO_NONE, + AMMO_FORCE, // AMMO_PHASER + AMMO_BLASTER, // AMMO_STARFLEET, + AMMO_POWERCELL, // AMMO_ALIEN, + AMMO_METAL_BOLTS, + AMMO_ROCKETS, + AMMO_EMPLACED, + AMMO_THERMAL, + AMMO_TRIPMINE, + AMMO_DETPACK, + AMMO_MAX +} ammo_t; + + +typedef struct weaponData_s +{ +// char classname[32]; // Spawning name + + int ammoIndex; // Index to proper ammo slot + int ammoLow; // Count when ammo is low + + int energyPerShot; // Amount of energy used per shot + int fireTime; // Amount of time between firings + int range; // Range of weapon + + int altEnergyPerShot; // Amount of energy used for alt-fire + int altFireTime; // Amount of time between alt-firings + int altRange; // Range of alt-fire + + int chargeSubTime; // ms interval for subtracting ammo during charge + int altChargeSubTime; // above for secondary + + int chargeSub; // amount to subtract during charge on each interval + int altChargeSub; // above for secondary + + int maxCharge; // stop subtracting once charged for this many ms + int altMaxCharge; // above for secondary +} weaponData_t; + + +typedef struct ammoData_s +{ +// char icon[32]; // Name of ammo icon file + int max; // Max amount player can hold of ammo +} ammoData_t; + + +extern weaponData_t weaponData[WP_NUM_WEAPONS]; +extern ammoData_t ammoData[AMMO_MAX]; + + +// Specific weapon information + +#define FIRST_WEAPON WP_BRYAR_PISTOL // this is the first weapon for next and prev weapon switching +#define MAX_PLAYER_WEAPONS WP_NUM_WEAPONS-1 // this is the max you can switch to and get with the give all. + + +#define DEFAULT_SHOTGUN_SPREAD 700 +#define DEFAULT_SHOTGUN_COUNT 11 + +#define LIGHTNING_RANGE 768 + + + + + +#endif//#ifndef __WEAPONS_H__ diff --git a/code/game/botlib.h b/code/game/botlib.h new file mode 100644 index 0000000..bbb240f --- /dev/null +++ b/code/game/botlib.h @@ -0,0 +1,508 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +/***************************************************************************** + * name: botlib.h + * + * desc: bot AI library + * + * $Archive: /source/code/game/botai.h $ + * $Author: Mrelusive $ + * $Revision: 2 $ + * $Modtime: 03/01/00 3:32p $ + * $Date: 03/01/00 3:42p $ + * + *****************************************************************************/ + +#define BOTLIB_API_VERSION 2 + +struct aas_clientmove_s; +struct aas_entityinfo_s; +struct aas_areainfo_s; +struct aas_altroutegoal_s; +struct aas_predictroute_s; +struct bot_consolemessage_s; +struct bot_match_s; +struct bot_goal_s; +struct bot_moveresult_s; +struct bot_initmove_s; +struct weaponinfo_s; + +#define BOTFILESBASEFOLDER "botfiles" +//debug line colors +#define LINECOLOR_NONE -1 +#define LINECOLOR_RED 1//0xf2f2f0f0L +#define LINECOLOR_GREEN 2//0xd0d1d2d3L +#define LINECOLOR_BLUE 3//0xf3f3f1f1L +#define LINECOLOR_YELLOW 4//0xdcdddedfL +#define LINECOLOR_ORANGE 5//0xe0e1e2e3L + +//Print types +#define PRT_MESSAGE 1 +#define PRT_WARNING 2 +#define PRT_ERROR 3 +#define PRT_FATAL 4 +#define PRT_EXIT 5 + +//console message types +#define CMS_NORMAL 0 +#define CMS_CHAT 1 + +//botlib error codes +#define BLERR_NOERROR 0 //no error +#define BLERR_LIBRARYNOTSETUP 1 //library not setup +#define BLERR_INVALIDENTITYNUMBER 2 //invalid entity number +#define BLERR_NOAASFILE 3 //no AAS file available +#define BLERR_CANNOTOPENAASFILE 4 //cannot open AAS file +#define BLERR_WRONGAASFILEID 5 //incorrect AAS file id +#define BLERR_WRONGAASFILEVERSION 6 //incorrect AAS file version +#define BLERR_CANNOTREADAASLUMP 7 //cannot read AAS file lump +#define BLERR_CANNOTLOADICHAT 8 //cannot load initial chats +#define BLERR_CANNOTLOADITEMWEIGHTS 9 //cannot load item weights +#define BLERR_CANNOTLOADITEMCONFIG 10 //cannot load item config +#define BLERR_CANNOTLOADWEAPONWEIGHTS 11 //cannot load weapon weights +#define BLERR_CANNOTLOADWEAPONCONFIG 12 //cannot load weapon config + +//action flags +#define ACTION_ATTACK 0x0000001 +#define ACTION_USE 0x0000002 +#define ACTION_RESPAWN 0x0000008 +#define ACTION_JUMP 0x0000010 +#define ACTION_MOVEUP 0x0000020 +#define ACTION_CROUCH 0x0000080 +#define ACTION_MOVEDOWN 0x0000100 +#define ACTION_MOVEFORWARD 0x0000200 +#define ACTION_MOVEBACK 0x0000800 +#define ACTION_MOVELEFT 0x0001000 +#define ACTION_MOVERIGHT 0x0002000 +#define ACTION_DELAYEDJUMP 0x0008000 +#define ACTION_TALK 0x0010000 +#define ACTION_GESTURE 0x0020000 +#define ACTION_WALK 0x0080000 +#define ACTION_FORCEPOWER 0x0100000 +#define ACTION_ALT_ATTACK 0x0200000 +/* +#define ACTION_AFFIRMATIVE 0x0100000 +#define ACTION_NEGATIVE 0x0200000 +#define ACTION_GETFLAG 0x0800000 +#define ACTION_GUARDBASE 0x1000000 +#define ACTION_PATROL 0x2000000 +#define ACTION_FOLLOWME 0x8000000 +*/ + +//the bot input, will be converted to an usercmd_t +typedef struct bot_input_s +{ + float thinktime; //time since last output (in seconds) + vec3_t dir; //movement direction + float speed; //speed in the range [0, 400] + vec3_t viewangles; //the view angles + int actionflags; //one of the ACTION_? flags + int weapon; //weapon to use +} bot_input_t; + +#ifndef BSPTRACE + +#define BSPTRACE + +//bsp_trace_t hit surface +typedef struct bsp_surface_s +{ + char name[16]; + int flags; + int value; +} bsp_surface_t; + +//remove the bsp_trace_s structure definition l8r on +//a trace is returned when a box is swept through the world +typedef struct bsp_trace_s +{ + qboolean allsolid; // if true, plane is not valid + qboolean startsolid; // if true, the initial point was in a solid area + float fraction; // time completed, 1.0 = didn't hit anything + vec3_t endpos; // final position + cplane_t plane; // surface normal at impact + float exp_dist; // expanded plane distance + int sidenum; // number of the brush side hit + bsp_surface_t surface; // the hit point surface + int contents; // contents on other side of surface hit + int ent; // number of entity hit +} bsp_trace_t; + +#endif // BSPTRACE + +//entity state +typedef struct bot_entitystate_s +{ + int type; // entity type + int flags; // entity flags + vec3_t origin; // origin of the entity + vec3_t angles; // angles of the model + vec3_t old_origin; // for lerping + vec3_t mins; // bounding box minimums + vec3_t maxs; // bounding box maximums + int groundent; // ground entity + int solid; // solid type + int modelindex; // model used + int modelindex2; // weapons, CTF flags, etc + int frame; // model frame number + int event; // impulse events -- muzzle flashes, footsteps, etc + int eventParm; // even parameter + int powerups; // bit flags + int weapon; // determines weapon and flash model, etc + int legsAnim; // mask off ANIM_TOGGLEBIT + int torsoAnim; // mask off ANIM_TOGGLEBIT +} bot_entitystate_t; + +//bot AI library exported functions +typedef struct botlib_import_s +{ + //print messages from the bot library + void (QDECL *Print)(int type, char *fmt, ...); + //trace a bbox through the world + void (*Trace)(bsp_trace_t *trace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int passent, int contentmask); + //trace a bbox against a specific entity + void (*EntityTrace)(bsp_trace_t *trace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int entnum, int contentmask); + //retrieve the contents at the given point + int (*PointContents)(vec3_t point); + //check if the point is in potential visible sight + int (*inPVS)(vec3_t p1, vec3_t p2); + //retrieve the BSP entity data lump + char *(*BSPEntityData)(void); + // + void (*BSPModelMinsMaxsOrigin)(int modelnum, vec3_t angles, vec3_t mins, vec3_t maxs, vec3_t origin); + //send a bot client command + void (*BotClientCommand)(int client, char *command); + //memory allocation + void *(*GetMemory)(int size); // allocate from Zone + void (*FreeMemory)(void *ptr); // free memory from Zone + int (*AvailableMemory)(void); // available Zone memory + void *(*HunkAlloc)(int size); // allocate from hunk + //file system access + int (*FS_FOpenFile)( const char *qpath, fileHandle_t *file, fsMode_t mode ); + int (*FS_Read)( void *buffer, int len, fileHandle_t f ); + int (*FS_Write)( const void *buffer, int len, fileHandle_t f ); + void (*FS_FCloseFile)( fileHandle_t f ); + int (*FS_Seek)( fileHandle_t f, long offset, int origin ); + //debug visualisation stuff + int (*DebugLineCreate)(void); + void (*DebugLineDelete)(int line); + void (*DebugLineShow)(int line, vec3_t start, vec3_t end, int color); + // + int (*DebugPolygonCreate)(int color, int numPoints, vec3_t *points); + void (*DebugPolygonDelete)(int id); +} botlib_import_t; + +typedef struct aas_export_s +{ + //----------------------------------- + // be_aas_entity.h + //----------------------------------- + void (*AAS_EntityInfo)(int entnum, struct aas_entityinfo_s *info); + //----------------------------------- + // be_aas_main.h + //----------------------------------- + int (*AAS_Initialized)(void); + void (*AAS_PresenceTypeBoundingBox)(int presencetype, vec3_t mins, vec3_t maxs); + float (*AAS_Time)(void); + //-------------------------------------------- + // be_aas_sample.c + //-------------------------------------------- + int (*AAS_PointAreaNum)(vec3_t point); + int (*AAS_PointReachabilityAreaIndex)( vec3_t point ); + int (*AAS_TraceAreas)(vec3_t start, vec3_t end, int *areas, vec3_t *points, int maxareas); + int (*AAS_BBoxAreas)(vec3_t absmins, vec3_t absmaxs, int *areas, int maxareas); + int (*AAS_AreaInfo)( int areanum, struct aas_areainfo_s *info ); + //-------------------------------------------- + // be_aas_bspq3.c + //-------------------------------------------- + int (*AAS_PointContents)(vec3_t point); + int (*AAS_NextBSPEntity)(int ent); + int (*AAS_ValueForBSPEpairKey)(int ent, char *key, char *value, int size); + int (*AAS_VectorForBSPEpairKey)(int ent, char *key, vec3_t v); + int (*AAS_FloatForBSPEpairKey)(int ent, char *key, float *value); + int (*AAS_IntForBSPEpairKey)(int ent, char *key, int *value); + //-------------------------------------------- + // be_aas_reach.c + //-------------------------------------------- + int (*AAS_AreaReachability)(int areanum); + //-------------------------------------------- + // be_aas_route.c + //-------------------------------------------- + int (*AAS_AreaTravelTimeToGoalArea)(int areanum, vec3_t origin, int goalareanum, int travelflags); + int (*AAS_EnableRoutingArea)(int areanum, int enable); + int (*AAS_PredictRoute)(struct aas_predictroute_s *route, int areanum, vec3_t origin, + int goalareanum, int travelflags, int maxareas, int maxtime, + int stopevent, int stopcontents, int stoptfl, int stopareanum); + //-------------------------------------------- + // be_aas_altroute.c + //-------------------------------------------- + int (*AAS_AlternativeRouteGoals)(vec3_t start, int startareanum, vec3_t goal, int goalareanum, int travelflags, + struct aas_altroutegoal_s *altroutegoals, int maxaltroutegoals, + int type); + //-------------------------------------------- + // be_aas_move.c + //-------------------------------------------- + int (*AAS_Swimming)(vec3_t origin); + int (*AAS_PredictClientMovement)(struct aas_clientmove_s *move, + int entnum, vec3_t origin, + int presencetype, int onground, + vec3_t velocity, vec3_t cmdmove, + int cmdframes, + int maxframes, float frametime, + int stopevent, int stopareanum, int visualize); +} aas_export_t; + +typedef struct ea_export_s +{ + //ClientCommand elementary actions + void (*EA_Command)(int client, char *command ); + void (*EA_Say)(int client, char *str); + void (*EA_SayTeam)(int client, char *str); + // + void (*EA_Action)(int client, int action); + void (*EA_Gesture)(int client); + void (*EA_Talk)(int client); + void (*EA_Attack)(int client); + void (*EA_Use)(int client); + void (*EA_Respawn)(int client); + void (*EA_MoveUp)(int client); + void (*EA_MoveDown)(int client); + void (*EA_MoveForward)(int client); + void (*EA_MoveBack)(int client); + void (*EA_MoveLeft)(int client); + void (*EA_MoveRight)(int client); + void (*EA_Crouch)(int client); + void (*EA_Alt_Attack)(int client); + void (*EA_ForcePower)(int client); + + void (*EA_SelectWeapon)(int client, int weapon); + void (*EA_Jump)(int client); + void (*EA_DelayedJump)(int client); + void (*EA_Move)(int client, vec3_t dir, float speed); + void (*EA_View)(int client, vec3_t viewangles); + //send regular input to the server + void (*EA_EndRegular)(int client, float thinktime); + void (*EA_GetInput)(int client, float thinktime, bot_input_t *input); + void (*EA_ResetInput)(int client); +} ea_export_t; + +typedef struct ai_export_s +{ + //----------------------------------- + // be_ai_char.h + //----------------------------------- + int (*BotLoadCharacter)(char *charfile, float skill); + void (*BotFreeCharacter)(int character); + float (*Characteristic_Float)(int character, int index); + float (*Characteristic_BFloat)(int character, int index, float min, float max); + int (*Characteristic_Integer)(int character, int index); + int (*Characteristic_BInteger)(int character, int index, int min, int max); + void (*Characteristic_String)(int character, int index, char *buf, int size); + //----------------------------------- + // be_ai_chat.h + //----------------------------------- + int (*BotAllocChatState)(void); + void (*BotFreeChatState)(int handle); + void (*BotQueueConsoleMessage)(int chatstate, int type, char *message); + void (*BotRemoveConsoleMessage)(int chatstate, int handle); + int (*BotNextConsoleMessage)(int chatstate, struct bot_consolemessage_s *cm); + int (*BotNumConsoleMessages)(int chatstate); + void (*BotInitialChat)(int chatstate, char *type, int mcontext, char *var0, char *var1, char *var2, char *var3, char *var4, char *var5, char *var6, char *var7); + int (*BotNumInitialChats)(int chatstate, char *type); + int (*BotReplyChat)(int chatstate, char *message, int mcontext, int vcontext, char *var0, char *var1, char *var2, char *var3, char *var4, char *var5, char *var6, char *var7); + int (*BotChatLength)(int chatstate); + void (*BotEnterChat)(int chatstate, int client, int sendto); + void (*BotGetChatMessage)(int chatstate, char *buf, int size); + int (*StringContains)(char *str1, char *str2, int casesensitive); + int (*BotFindMatch)(char *str, struct bot_match_s *match, unsigned long int context); + void (*BotMatchVariable)(struct bot_match_s *match, int variable, char *buf, int size); + void (*UnifyWhiteSpaces)(char *string); + void (*BotReplaceSynonyms)(char *string, unsigned long int context); + int (*BotLoadChatFile)(int chatstate, char *chatfile, char *chatname); + void (*BotSetChatGender)(int chatstate, int gender); + void (*BotSetChatName)(int chatstate, char *name, int client); + //----------------------------------- + // be_ai_goal.h + //----------------------------------- + void (*BotResetGoalState)(int goalstate); + void (*BotResetAvoidGoals)(int goalstate); + void (*BotRemoveFromAvoidGoals)(int goalstate, int number); + void (*BotPushGoal)(int goalstate, struct bot_goal_s *goal); + void (*BotPopGoal)(int goalstate); + void (*BotEmptyGoalStack)(int goalstate); + void (*BotDumpAvoidGoals)(int goalstate); + void (*BotDumpGoalStack)(int goalstate); + void (*BotGoalName)(int number, char *name, int size); + int (*BotGetTopGoal)(int goalstate, struct bot_goal_s *goal); + int (*BotGetSecondGoal)(int goalstate, struct bot_goal_s *goal); + int (*BotChooseLTGItem)(int goalstate, vec3_t origin, int *inventory, int travelflags); + int (*BotChooseNBGItem)(int goalstate, vec3_t origin, int *inventory, int travelflags, + struct bot_goal_s *ltg, float maxtime); + int (*BotTouchingGoal)(vec3_t origin, struct bot_goal_s *goal); + int (*BotItemGoalInVisButNotVisible)(int viewer, vec3_t eye, vec3_t viewangles, struct bot_goal_s *goal); + int (*BotGetLevelItemGoal)(int index, char *classname, struct bot_goal_s *goal); + int (*BotGetNextCampSpotGoal)(int num, struct bot_goal_s *goal); + int (*BotGetMapLocationGoal)(char *name, struct bot_goal_s *goal); + float (*BotAvoidGoalTime)(int goalstate, int number); + void (*BotSetAvoidGoalTime)(int goalstate, int number, float avoidtime); + void (*BotInitLevelItems)(void); + void (*BotUpdateEntityItems)(void); + int (*BotLoadItemWeights)(int goalstate, char *filename); + void (*BotFreeItemWeights)(int goalstate); + void (*BotInterbreedGoalFuzzyLogic)(int parent1, int parent2, int child); + void (*BotSaveGoalFuzzyLogic)(int goalstate, char *filename); + void (*BotMutateGoalFuzzyLogic)(int goalstate, float range); + int (*BotAllocGoalState)(int client); + void (*BotFreeGoalState)(int handle); + //----------------------------------- + // be_ai_move.h + //----------------------------------- + void (*BotResetMoveState)(int movestate); + void (*BotMoveToGoal)(struct bot_moveresult_s *result, int movestate, struct bot_goal_s *goal, int travelflags); + int (*BotMoveInDirection)(int movestate, vec3_t dir, float speed, int type); + void (*BotResetAvoidReach)(int movestate); + void (*BotResetLastAvoidReach)(int movestate); + int (*BotReachabilityArea)(vec3_t origin, int testground); + int (*BotMovementViewTarget)(int movestate, struct bot_goal_s *goal, int travelflags, float lookahead, vec3_t target); + int (*BotPredictVisiblePosition)(vec3_t origin, int areanum, struct bot_goal_s *goal, int travelflags, vec3_t target); + int (*BotAllocMoveState)(void); + void (*BotFreeMoveState)(int handle); + void (*BotInitMoveState)(int handle, struct bot_initmove_s *initmove); + void (*BotAddAvoidSpot)(int movestate, vec3_t origin, float radius, int type); + //----------------------------------- + // be_ai_weap.h + //----------------------------------- + int (*BotChooseBestFightWeapon)(int weaponstate, int *inventory); + void (*BotGetWeaponInfo)(int weaponstate, int weapon, struct weaponinfo_s *weaponinfo); + int (*BotLoadWeaponWeights)(int weaponstate, char *filename); + int (*BotAllocWeaponState)(void); + void (*BotFreeWeaponState)(int weaponstate); + void (*BotResetWeaponState)(int weaponstate); + //----------------------------------- + // be_ai_gen.h + //----------------------------------- + int (*GeneticParentsAndChildSelection)(int numranks, float *ranks, int *parent1, int *parent2, int *child); +} ai_export_t; + +//bot AI library imported functions +typedef struct botlib_export_s +{ + //Area Awareness System functions + aas_export_t aas; + //Elementary Action functions + ea_export_t ea; + //AI functions + ai_export_t ai; + //setup the bot library, returns BLERR_ + int (*BotLibSetup)(void); + //shutdown the bot library, returns BLERR_ + int (*BotLibShutdown)(void); + //sets a library variable returns BLERR_ + int (*BotLibVarSet)(char *var_name, char *value); + //gets a library variable returns BLERR_ + int (*BotLibVarGet)(char *var_name, char *value, int size); + + //sets a C-like define returns BLERR_ + int (*PC_AddGlobalDefine)(char *string); + int (*PC_LoadSourceHandle)(const char *filename); + int (*PC_FreeSourceHandle)(int handle); + int (*PC_ReadTokenHandle)(int handle, pc_token_t *pc_token); + int (*PC_SourceFileAndLine)(int handle, char *filename, int *line); + int (*PC_LoadGlobalDefines)(const char* filename ); + void (*PC_RemoveAllGlobalDefines) ( void ); + + //start a frame in the bot library + int (*BotLibStartFrame)(float time); + //load a new map in the bot library + int (*BotLibLoadMap)(const char *mapname); + //entity updates + int (*BotLibUpdateEntity)(int ent, bot_entitystate_t *state); + //just for testing + int (*Test)(int parm0, char *parm1, vec3_t parm2, vec3_t parm3); +} botlib_export_t; + +//linking of bot library +botlib_export_t *GetBotLibAPI( int apiVersion, botlib_import_t *import ); + +/* Library variables: + +name: default: module(s): description: + +"basedir" "" l_utils.c base directory +"gamedir" "" l_utils.c game directory +"cddir" "" l_utils.c CD directory + +"log" "0" l_log.c enable/disable creating a log file +"maxclients" "4" be_interface.c maximum number of clients +"maxentities" "1024" be_interface.c maximum number of entities +"bot_developer" "0" be_interface.c bot developer mode + +"phys_friction" "6" be_aas_move.c ground friction +"phys_stopspeed" "100" be_aas_move.c stop speed +"phys_gravity" "800" be_aas_move.c gravity value +"phys_waterfriction" "1" be_aas_move.c water friction +"phys_watergravity" "400" be_aas_move.c gravity in water +"phys_maxvelocity" "320" be_aas_move.c maximum velocity +"phys_maxwalkvelocity" "320" be_aas_move.c maximum walk velocity +"phys_maxcrouchvelocity" "100" be_aas_move.c maximum crouch velocity +"phys_maxswimvelocity" "150" be_aas_move.c maximum swim velocity +"phys_walkaccelerate" "10" be_aas_move.c walk acceleration +"phys_airaccelerate" "1" be_aas_move.c air acceleration +"phys_swimaccelerate" "4" be_aas_move.c swim acceleration +"phys_maxstep" "18" be_aas_move.c maximum step height +"phys_maxsteepness" "0.7" be_aas_move.c maximum floor steepness +"phys_maxbarrier" "32" be_aas_move.c maximum barrier height +"phys_maxwaterjump" "19" be_aas_move.c maximum waterjump height +"phys_jumpvel" "270" be_aas_move.c jump z velocity +"phys_falldelta5" "40" be_aas_move.c +"phys_falldelta10" "60" be_aas_move.c +"rs_waterjump" "400" be_aas_move.c +"rs_teleport" "50" be_aas_move.c +"rs_barrierjump" "100" be_aas_move.c +"rs_startcrouch" "300" be_aas_move.c +"rs_startgrapple" "500" be_aas_move.c +"rs_startwalkoffledge" "70" be_aas_move.c +"rs_startjump" "300" be_aas_move.c +"rs_rocketjump" "500" be_aas_move.c +"rs_bfgjump" "500" be_aas_move.c +"rs_jumppad" "250" be_aas_move.c +"rs_aircontrolledjumppad" "300" be_aas_move.c +"rs_funcbob" "300" be_aas_move.c +"rs_startelevator" "50" be_aas_move.c +"rs_falldamage5" "300" be_aas_move.c +"rs_falldamage10" "500" be_aas_move.c +"rs_maxjumpfallheight" "450" be_aas_move.c + +"max_aaslinks" "4096" be_aas_sample.c maximum links in the AAS +"max_routingcache" "4096" be_aas_route.c maximum routing cache size in KB +"forceclustering" "0" be_aas_main.c force recalculation of clusters +"forcereachability" "0" be_aas_main.c force recalculation of reachabilities +"forcewrite" "0" be_aas_main.c force writing of aas file +"aasoptimize" "0" be_aas_main.c enable aas optimization +"sv_mapChecksum" "0" be_aas_main.c BSP file checksum +"bot_visualizejumppads" "0" be_aas_reach.c visualize jump pads + +"bot_reloadcharacters" "0" - reload bot character files +"ai_gametype" "0" be_ai_goal.c game type +"droppedweight" "1000" be_ai_goal.c additional dropped item weight +"weapindex_rocketlauncher" "5" be_ai_move.c rl weapon index for rocket jumping +"weapindex_bfg10k" "9" be_ai_move.c bfg weapon index for bfg jumping +"weapindex_grapple" "10" be_ai_move.c grapple weapon index for grappling +"entitytypemissile" "3" be_ai_move.c ET_MISSILE +"offhandgrapple" "0" be_ai_move.c enable off hand grapple hook +"cmd_grappleon" "grappleon" be_ai_move.c command to activate off hand grapple +"cmd_grappleoff" "grappleoff" be_ai_move.c command to deactivate off hand grapple +"itemconfig" "items.c" be_ai_goal.c item configuration file +"weaponconfig" "weapons.c" be_ai_weap.c weapon configuration file +"synfile" "syn.c" be_ai_chat.c file with synonyms +"rndfile" "rnd.c" be_ai_chat.c file with random strings +"matchfile" "match.c" be_ai_chat.c file with match strings +"nochat" "0" be_ai_chat.c disable chats +"max_messages" "1024" be_ai_chat.c console message heap size +"max_weaponinfo" "32" be_ai_weap.c maximum number of weapon info +"max_projectileinfo" "32" be_ai_weap.c maximum number of projectile info +"max_iteminfo" "256" be_ai_goal.c maximum number of item info +"max_levelitems" "256" be_ai_goal.c maximum number of level items + +*/ + diff --git a/code/game/chars.h b/code/game/chars.h new file mode 100644 index 0000000..98d046e --- /dev/null +++ b/code/game/chars.h @@ -0,0 +1,124 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +//=========================================================================== +// +// Name: chars.h +// Function: bot characteristics +// Programmer: Mr Elusive (MrElusive@idsoftware.com) +// Last update: 1999-09-08 +// Tab Size: 4 (real tabs) +//=========================================================================== + + +//======================================================== +//======================================================== +//name +#define CHARACTERISTIC_NAME 0 //string +//gender of the bot +#define CHARACTERISTIC_GENDER 1 //string ("male", "female", "it") +//attack skill +// > 0.0 && < 0.2 = don't move +// > 0.3 && < 1.0 = aim at enemy during retreat +// > 0.0 && < 0.4 = only move forward/backward +// >= 0.4 && < 1.0 = circle strafing +// > 0.7 && < 1.0 = random strafe direction change +#define CHARACTERISTIC_ATTACK_SKILL 2 //float [0, 1] +//weapon weight file +#define CHARACTERISTIC_WEAPONWEIGHTS 3 //string +//view angle difference to angle change factor +#define CHARACTERISTIC_VIEW_FACTOR 4 //float <0, 1] +//maximum view angle change +#define CHARACTERISTIC_VIEW_MAXCHANGE 5 //float [1, 360] +//reaction time in seconds +#define CHARACTERISTIC_REACTIONTIME 6 //float [0, 5] +//accuracy when aiming +#define CHARACTERISTIC_AIM_ACCURACY 7 //float [0, 1] +//weapon specific aim accuracy +#define CHARACTERISTIC_AIM_ACCURACY_MACHINEGUN 8 //float [0, 1] +#define CHARACTERISTIC_AIM_ACCURACY_SHOTGUN 9 //float [0, 1] +#define CHARACTERISTIC_AIM_ACCURACY_ROCKETLAUNCHER 10 //float [0, 1] +#define CHARACTERISTIC_AIM_ACCURACY_GRENADELAUNCHER 11 //float [0, 1] +#define CHARACTERISTIC_AIM_ACCURACY_LIGHTNING 12 +#define CHARACTERISTIC_AIM_ACCURACY_PLASMAGUN 13 //float [0, 1] +#define CHARACTERISTIC_AIM_ACCURACY_RAILGUN 14 +#define CHARACTERISTIC_AIM_ACCURACY_BFG10K 15 //float [0, 1] +//skill when aiming +// > 0.0 && < 0.9 = aim is affected by enemy movement +// > 0.4 && <= 0.8 = enemy linear leading +// > 0.8 && <= 1.0 = enemy exact movement leading +// > 0.5 && <= 1.0 = prediction shots when enemy is not visible +// > 0.6 && <= 1.0 = splash damage by shooting nearby geometry +#define CHARACTERISTIC_AIM_SKILL 16 //float [0, 1] +//weapon specific aim skill +#define CHARACTERISTIC_AIM_SKILL_ROCKETLAUNCHER 17 //float [0, 1] +#define CHARACTERISTIC_AIM_SKILL_GRENADELAUNCHER 18 //float [0, 1] +#define CHARACTERISTIC_AIM_SKILL_PLASMAGUN 19 //float [0, 1] +#define CHARACTERISTIC_AIM_SKILL_BFG10K 20 //float [0, 1] +//======================================================== +//chat +//======================================================== +//file with chats +#define CHARACTERISTIC_CHAT_FILE 21 //string +//name of the chat character +#define CHARACTERISTIC_CHAT_NAME 22 //string +//characters per minute type speed +#define CHARACTERISTIC_CHAT_CPM 23 //integer [1, 4000] +//tendency to insult/praise +#define CHARACTERISTIC_CHAT_INSULT 24 //float [0, 1] +//tendency to chat misc +#define CHARACTERISTIC_CHAT_MISC 25 //float [0, 1] +//tendency to chat at start or end of level +#define CHARACTERISTIC_CHAT_STARTENDLEVEL 26 //float [0, 1] +//tendency to chat entering or exiting the game +#define CHARACTERISTIC_CHAT_ENTEREXITGAME 27 //float [0, 1] +//tendency to chat when killed someone +#define CHARACTERISTIC_CHAT_KILL 28 //float [0, 1] +//tendency to chat when died +#define CHARACTERISTIC_CHAT_DEATH 29 //float [0, 1] +//tendency to chat when enemy suicides +#define CHARACTERISTIC_CHAT_ENEMYSUICIDE 30 //float [0, 1] +//tendency to chat when hit while talking +#define CHARACTERISTIC_CHAT_HITTALKING 31 //float [0, 1] +//tendency to chat when bot was hit but didn't dye +#define CHARACTERISTIC_CHAT_HITNODEATH 32 //float [0, 1] +//tendency to chat when bot hit the enemy but enemy didn't dye +#define CHARACTERISTIC_CHAT_HITNOKILL 33 //float [0, 1] +//tendency to randomly chat +#define CHARACTERISTIC_CHAT_RANDOM 34 //float [0, 1] +//tendency to reply +#define CHARACTERISTIC_CHAT_REPLY 35 //float [0, 1] +//======================================================== +//movement +//======================================================== +//tendency to crouch +#define CHARACTERISTIC_CROUCHER 36 //float [0, 1] +//tendency to jump +#define CHARACTERISTIC_JUMPER 37 //float [0, 1] +//tendency to walk +#define CHARACTERISTIC_WALKER 48 //float [0, 1] +//tendency to jump using a weapon +#define CHARACTERISTIC_WEAPONJUMPING 38 //float [0, 1] +//tendency to use the grapple hook when available +#define CHARACTERISTIC_GRAPPLE_USER 39 //float [0, 1] //use this!! +//======================================================== +//goal +//======================================================== +//item weight file +#define CHARACTERISTIC_ITEMWEIGHTS 40 //string +//the aggression of the bot +#define CHARACTERISTIC_AGGRESSION 41 //float [0, 1] +//the self preservation of the bot (rockets near walls etc.) +#define CHARACTERISTIC_SELFPRESERVATION 42 //float [0, 1] +//how likely the bot is to take revenge +#define CHARACTERISTIC_VENGEFULNESS 43 //float [0, 1] //use this!! +//tendency to camp +#define CHARACTERISTIC_CAMPER 44 //float [0, 1] +//======================================================== +//======================================================== +//tendency to get easy frags +#define CHARACTERISTIC_EASY_FRAGGER 45 //float [0, 1] +//how alert the bot is (view distance) +#define CHARACTERISTIC_ALERTNESS 46 //float [0, 1] +//how much the bot fires it's weapon +#define CHARACTERISTIC_FIRETHROTTLE 47 //float [0, 1] + diff --git a/code/game/g_active.c b/code/game/g_active.c new file mode 100644 index 0000000..adf4f32 --- /dev/null +++ b/code/game/g_active.c @@ -0,0 +1,2007 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// + +#include "g_local.h" + +qboolean PM_SaberInTransition( int move ); +qboolean PM_SaberInStart( int move ); +qboolean PM_SaberInReturn( int move ); + +void P_SetTwitchInfo(gclient_t *client) +{ + client->ps.painTime = level.time; + client->ps.painDirection ^= 1; +} +/* +================= +M_StringEscapeToEnters + +================= +*/ +void M_StringEscapeToEnters( char * source, char * dest, int bufsize ) +{ + int is, id; // source and destination + + is = 0; + id = 0; + + while ( source[is] != 0 && is < bufsize - 1) + { + char toCopy; + if( source[is] == '\\' ){ // Found escape character? + if( is + 1 < bufsize && source[is + 1] == 'n'){ + // Found new line + toCopy = '\n'; + is ++; + } + else { + // No new line, just copy backslash: + toCopy = '\\'; + } + } + else{ + // Just copy character. + toCopy = source[is]; + } + + dest[id] = toCopy; + id ++; + is ++; + } + + dest[id] = 0; +} + + +/* +=============== +G_DamageFeedback + +Called just before a snapshot is sent to the given player. +Totals up all damage and generates both the player_state_t +damage values to that client for pain blends and kicks, and +global pain sound events for all clients. +=============== +*/ +void P_DamageFeedback( gentity_t *player ) { + gclient_t *client; + float count; + vec3_t angles; + + client = player->client; + if ( client->ps.pm_type == PM_DEAD ) { + return; + } + + // total points of damage shot at the player this frame + count = client->damage_blood + client->damage_armor; + if ( count == 0 ) { + return; // didn't take any damage + } + + if ( count > 255 ) { + count = 255; + } + + // send the information to the client + + // world damage (falling, slime, etc) uses a special code + // to make the blend blob centered instead of positional + if ( client->damage_fromWorld ) { + client->ps.damagePitch = 255; + client->ps.damageYaw = 255; + + client->damage_fromWorld = qfalse; + } else { + vectoangles( client->damage_from, angles ); + client->ps.damagePitch = angles[PITCH]/360.0 * 256; + client->ps.damageYaw = angles[YAW]/360.0 * 256; + } + + // play an apropriate pain sound + if ( (level.time > player->pain_debounce_time) && !(player->flags & FL_GODMODE) ) { + + // don't do more than two pain sounds a second + if ( level.time - client->ps.painTime < 500 ) { + return; + } + P_SetTwitchInfo(client); + player->pain_debounce_time = level.time + 700; + G_AddEvent( player, EV_PAIN, player->health ); + client->ps.damageEvent++; + + if (client->damage_armor && !client->damage_blood) + { + client->ps.damageType = 1; //pure shields + } + else if (client->damage_armor) + { + client->ps.damageType = 2; //shields and health + } + else + { + client->ps.damageType = 0; //pure health + } + } + + + client->ps.damageCount = count; + + // + // clear totals + // + client->damage_blood = 0; + client->damage_armor = 0; + client->damage_knockback = 0; +} + + + +/* +============= +P_WorldEffects + +Check for lava / slime contents and drowning +============= +*/ +void P_WorldEffects( gentity_t *ent ) { + qboolean envirosuit; + int waterlevel; + + if ( ent->client->noclip ) { + ent->client->airOutTime = level.time + 12000; // don't need air + return; + } + + waterlevel = ent->waterlevel; + + envirosuit = ent->client->ps.powerups[PW_BATTLESUIT] > level.time; + + // + // check for drowning + // + if ( waterlevel == 3 ) { + // envirosuit give air + if ( envirosuit ) { + ent->client->airOutTime = level.time + 10000; + } + + // if out of air, start drowning + if ( ent->client->airOutTime < level.time) { + // drown! + ent->client->airOutTime += 1000; + if ( ent->health > 0 ) { + // take more damage the longer underwater + ent->damage += 2; + if (ent->damage > 15) + ent->damage = 15; + + // play a gurp sound instead of a normal pain sound + if (ent->health <= ent->damage) { + G_Sound(ent, CHAN_VOICE, G_SoundIndex(/*"*drown.wav"*/"sound/player/gurp1.wav")); + } else if (rand()&1) { + G_Sound(ent, CHAN_VOICE, G_SoundIndex("sound/player/gurp1.wav")); + } else { + G_Sound(ent, CHAN_VOICE, G_SoundIndex("sound/player/gurp2.wav")); + } + + // don't play a normal pain sound + ent->pain_debounce_time = level.time + 200; + + G_Damage (ent, NULL, NULL, NULL, NULL, + ent->damage, DAMAGE_NO_ARMOR, MOD_WATER); + } + } + } else { + ent->client->airOutTime = level.time + 12000; + ent->damage = 2; + } + + // + // check for sizzle damage (move to pmove?) + // + if (waterlevel && + (ent->watertype&(CONTENTS_LAVA|CONTENTS_SLIME)) ) { + if (ent->health > 0 + && ent->pain_debounce_time <= level.time ) { + + if ( envirosuit ) { + G_AddEvent( ent, EV_POWERUP_BATTLESUIT, 0 ); + } else { + if (ent->watertype & CONTENTS_LAVA) { + G_Damage (ent, NULL, NULL, NULL, NULL, + 30*waterlevel, 0, MOD_LAVA); + } + + if (ent->watertype & CONTENTS_SLIME) { + G_Damage (ent, NULL, NULL, NULL, NULL, + 10*waterlevel, 0, MOD_SLIME); + } + } + } + } +} + + + + + +//============================================================== +extern void G_ApplyKnockback( gentity_t *targ, vec3_t newDir, float knockback ); +void DoImpact( gentity_t *self, gentity_t *other, qboolean damageSelf ) +{ + float magnitude, my_mass; + vec3_t velocity; + int cont; + + if( self->client ) + { + VectorCopy( self->client->ps.velocity, velocity ); + my_mass = self->mass; + } + else + { + VectorCopy( self->s.pos.trDelta, velocity ); + if ( self->s.pos.trType == TR_GRAVITY ) + { + velocity[2] -= 0.25f * g_gravity.value; + } + if( !self->mass ) + { + my_mass = 1; + } + else if ( self->mass <= 10 ) + { + my_mass = 10; + } + else + { + my_mass = self->mass;///10; + } + } + + magnitude = VectorLength( velocity ) * my_mass / 10; + + /* + if(pointcontents(self.absmax)==CONTENT_WATER)//FIXME: or other watertypes + magnitude/=3; //water absorbs 2/3 velocity + + if(self.classname=="barrel"&&self.aflag)//rolling barrels are made for impacts! + magnitude*=3; + + if(self.frozen>0&&magnitude<300&&self.flags&FL_ONGROUND&&loser==world&&self.velocity_z<-20&&self.last_onground+0.3client || self->client->ps.lastOnGround+300client->ps.lastOnGround+100 < level.time && other->material >= MAT_GLASS ) ) + { + vec3_t dir1, dir2; + float force = 0, dot; + + if ( other->material >= MAT_GLASS ) + magnitude *= 2; + + //damage them + if ( magnitude >= 100 && other->s.number < ENTITYNUM_WORLD ) + { + VectorCopy( velocity, dir1 ); + VectorNormalize( dir1 ); + if( VectorCompare( other->r.currentOrigin, vec3_origin ) ) + {//a brush with no origin + VectorCopy ( dir1, dir2 ); + } + else + { + VectorSubtract( other->r.currentOrigin, self->r.currentOrigin, dir2 ); + VectorNormalize( dir2 ); + } + + dot = DotProduct( dir1, dir2 ); + + if ( dot >= 0.2 ) + { + force = dot; + } + else + { + force = 0; + } + + force *= (magnitude/50); + + cont = trap_PointContents( other->r.absmax, other->s.number ); + if( (cont&CONTENTS_WATER) )//|| (self.classname=="barrel"&&self.aflag))//FIXME: or other watertypes + { + force /= 3; //water absorbs 2/3 velocity + } + + /* + if(self.frozen>0&&force>10) + force=10; + */ + + if( ( force >= 1 && other->s.number != 0 ) || force >= 10) + { + /* + dprint("Damage other ("); + dprint(loser.classname); + dprint("): "); + dprint(ftos(force)); + dprint("\n"); + */ + if ( other->r.svFlags & SVF_GLASS_BRUSH ) + { + other->splashRadius = (float)(self->r.maxs[0] - self->r.mins[0])/4.0f; + } + if ( other->takedamage ) + { + G_Damage( other, self, self, velocity, self->r.currentOrigin, force, DAMAGE_NO_ARMOR, MOD_CRUSH);//FIXME: MOD_IMPACT + } + else + { + G_ApplyKnockback( other, dir2, force ); + } + } + } + + if ( damageSelf && self->takedamage ) + { + //Now damage me + //FIXME: more lenient falling damage, especially for when driving a vehicle + if ( self->client && self->client->ps.fd.forceJumpZStart ) + {//we were force-jumping + if ( self->r.currentOrigin[2] >= self->client->ps.fd.forceJumpZStart ) + {//we landed at same height or higher than we landed + magnitude = 0; + } + else + {//FIXME: take off some of it, at least? + magnitude = (self->client->ps.fd.forceJumpZStart-self->r.currentOrigin[2])/3; + } + } + //if(self.classname!="monster_mezzoman"&&self.netname!="spider")//Cats always land on their feet + if( ( magnitude >= 100 + self->health && self->s.number != 0 && self->s.weapon != WP_SABER ) || ( magnitude >= 700 ) )//&& self.safe_time < level.time ))//health here is used to simulate structural integrity + { + if ( (self->s.weapon == WP_SABER || self->s.number == 0) && self->client && self->client->ps.groundEntityNum < ENTITYNUM_NONE && magnitude < 1000 ) + {//players and jedi take less impact damage + //allow for some lenience on high falls + magnitude /= 2; + /* + if ( self.absorb_time >= time )//crouching on impact absorbs 1/2 the damage + { + magnitude/=2; + } + */ + } + magnitude /= 40; + magnitude = magnitude - force/2;//If damage other, subtract half of that damage off of own injury + if ( magnitude >= 1 ) + { + //FIXME: Put in a thingtype impact sound function + /* + dprint("Damage self ("); + dprint(self.classname); + dprint("): "); + dprint(ftos(magnitude)); + dprint("\n"); + */ + /* + if ( self.classname=="player_sheep "&& self.flags&FL_ONGROUND && self.velocity_z > -50 ) + return; + */ + G_Damage( self, NULL, NULL, NULL, self->r.currentOrigin, magnitude/2, DAMAGE_NO_ARMOR, MOD_FALLING );//FIXME: MOD_IMPACT + } + } + } + + //FIXME: slow my velocity some? + + // NOTENOTE We don't use lastimpact as of yet +// self->lastImpact = level.time; + + /* + if(self.flags&FL_ONGROUND) + self.last_onground=time; + */ + } +} + +/* +=============== +G_SetClientSound +=============== +*/ +void G_SetClientSound( gentity_t *ent ) { + if (ent->waterlevel && (ent->watertype&(CONTENTS_LAVA|CONTENTS_SLIME)) ) { + ent->client->ps.loopSound = level.snd_fry; + } else { + ent->client->ps.loopSound = 0; + } +} + + + +//============================================================== + +/* +============== +ClientImpacts +============== +*/ +void ClientImpacts( gentity_t *ent, pmove_t *pm ) { + int i, j; + trace_t trace; + gentity_t *other; + + memset( &trace, 0, sizeof( trace ) ); + for (i=0 ; inumtouch ; i++) { + for (j=0 ; jtouchents[j] == pm->touchents[i] ) { + break; + } + } + if (j != i) { + continue; // duplicated + } + other = &g_entities[ pm->touchents[i] ]; + + if ( ( ent->r.svFlags & SVF_BOT ) && ( ent->touch ) ) { + ent->touch( ent, other, &trace ); + } + + if ( !other->touch ) { + continue; + } + + other->touch( other, ent, &trace ); + } + +} + +/* +============ +G_TouchTriggers + +Find all trigger entities that ent's current position touches. +Spectators will only interact with teleporters. +============ +*/ +void G_TouchTriggers( gentity_t *ent ) { + int i, num; + int touch[MAX_GENTITIES]; + gentity_t *hit; + trace_t trace; + vec3_t mins, maxs; + static vec3_t range = { 40, 40, 52 }; + + if ( !ent->client ) { + return; + } + + // dead clients don't activate triggers! + if ( ent->client->ps.stats[STAT_HEALTH] <= 0 ) { + return; + } + + VectorSubtract( ent->client->ps.origin, range, mins ); + VectorAdd( ent->client->ps.origin, range, maxs ); + + num = trap_EntitiesInBox( mins, maxs, touch, MAX_GENTITIES ); + + // can't use ent->r.absmin, because that has a one unit pad + VectorAdd( ent->client->ps.origin, ent->r.mins, mins ); + VectorAdd( ent->client->ps.origin, ent->r.maxs, maxs ); + + for ( i=0 ; itouch && !ent->touch ) { + continue; + } + if ( !( hit->r.contents & CONTENTS_TRIGGER ) ) { + continue; + } + + // ignore most entities if a spectator + if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) { + if ( hit->s.eType != ET_TELEPORT_TRIGGER && + // this is ugly but adding a new ET_? type will + // most likely cause network incompatibilities + hit->touch != Touch_DoorTrigger) { + continue; + } + } + + // use seperate code for determining if an item is picked up + // so you don't have to actually contact its bounding box + if ( hit->s.eType == ET_ITEM ) { + if ( !BG_PlayerTouchesItem( &ent->client->ps, &hit->s, level.time ) ) { + continue; + } + } else { + if ( !trap_EntityContact( mins, maxs, hit ) ) { + continue; + } + } + + memset( &trace, 0, sizeof(trace) ); + + if ( hit->touch ) { + hit->touch (hit, ent, &trace); + } + + if ( ( ent->r.svFlags & SVF_BOT ) && ( ent->touch ) ) { + ent->touch( ent, hit, &trace ); + } + } + + // if we didn't touch a jump pad this pmove frame + if ( ent->client->ps.jumppad_frame != ent->client->ps.pmove_framecount ) { + ent->client->ps.jumppad_frame = 0; + ent->client->ps.jumppad_ent = 0; + } +} + + +/* +============ +G_MoverTouchTriggers + +Find all trigger entities that ent's current position touches. +Spectators will only interact with teleporters. +============ +*/ +void G_MoverTouchPushTriggers( gentity_t *ent, vec3_t oldOrg ) +{ + int i, num; + float step, stepSize, dist; + int touch[MAX_GENTITIES]; + gentity_t *hit; + trace_t trace; + vec3_t mins, maxs, dir, size, checkSpot; + const vec3_t range = { 40, 40, 52 }; + + // non-moving movers don't hit triggers! + if ( !VectorLengthSquared( ent->s.pos.trDelta ) ) + { + return; + } + + VectorSubtract( ent->r.mins, ent->r.maxs, size ); + stepSize = VectorLength( size ); + if ( stepSize < 1 ) + { + stepSize = 1; + } + + VectorSubtract( ent->r.currentOrigin, oldOrg, dir ); + dist = VectorNormalize( dir ); + for ( step = 0; step <= dist; step += stepSize ) + { + VectorMA( ent->r.currentOrigin, step, dir, checkSpot ); + VectorSubtract( checkSpot, range, mins ); + VectorAdd( checkSpot, range, maxs ); + + num = trap_EntitiesInBox( mins, maxs, touch, MAX_GENTITIES ); + + // can't use ent->r.absmin, because that has a one unit pad + VectorAdd( checkSpot, ent->r.mins, mins ); + VectorAdd( checkSpot, ent->r.maxs, maxs ); + + for ( i=0 ; is.eType != ET_PUSH_TRIGGER ) + { + continue; + } + + if ( hit->touch == NULL ) + { + continue; + } + + if ( !( hit->r.contents & CONTENTS_TRIGGER ) ) + { + continue; + } + + + if ( !trap_EntityContact( mins, maxs, hit ) ) + { + continue; + } + + memset( &trace, 0, sizeof(trace) ); + + if ( hit->touch != NULL ) + { + hit->touch(hit, ent, &trace); + } + } + } +} + +/* +================= +SpectatorThink +================= +*/ +void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) { + pmove_t pm; + gclient_t *client; + + client = ent->client; + + if ( client->sess.spectatorState != SPECTATOR_FOLLOW ) { + client->ps.pm_type = PM_SPECTATOR; + client->ps.speed = 400; // faster than normal + client->ps.basespeed = 400; + + // set up for pmove + memset (&pm, 0, sizeof(pm)); + pm.ps = &client->ps; + pm.cmd = *ucmd; + pm.tracemask = MASK_PLAYERSOLID & ~CONTENTS_BODY; // spectators can fly through bodies + pm.trace = trap_Trace; + pm.pointcontents = trap_PointContents; + + pm.animations = NULL; + + // perform a pmove + Pmove (&pm); + // save results of pmove + VectorCopy( client->ps.origin, ent->s.origin ); + + G_TouchTriggers( ent ); + trap_UnlinkEntity( ent ); + } + + client->oldbuttons = client->buttons; + client->buttons = ucmd->buttons; + + // attack button cycles through spectators + if ( ( client->buttons & BUTTON_ATTACK ) && ! ( client->oldbuttons & BUTTON_ATTACK ) ) { + Cmd_FollowCycle_f( ent, 1 ); + } + + if (client->sess.spectatorState == SPECTATOR_FOLLOW && (ucmd->upmove > 0)) + { //jump now removes you from follow mode + StopFollowing(ent); + } +} + + + +/* +================= +ClientInactivityTimer + +Returns qfalse if the client is dropped +================= +*/ +qboolean ClientInactivityTimer( gclient_t *client ) { + if ( ! g_inactivity.integer ) { + // give everyone some time, so if the operator sets g_inactivity during + // gameplay, everyone isn't kicked + client->inactivityTime = level.time + 60 * 1000; + client->inactivityWarning = qfalse; + } else if ( client->pers.cmd.forwardmove || + client->pers.cmd.rightmove || + client->pers.cmd.upmove || + (client->pers.cmd.buttons & (BUTTON_ATTACK|BUTTON_ALT_ATTACK)) ) { + client->inactivityTime = level.time + g_inactivity.integer * 1000; + client->inactivityWarning = qfalse; + } else if ( !client->pers.localClient ) { + if ( level.time > client->inactivityTime ) { + trap_DropClient( client - level.clients, "Dropped due to inactivity" ); + return qfalse; + } + if ( level.time > client->inactivityTime - 10000 && !client->inactivityWarning ) { + client->inactivityWarning = qtrue; + trap_SendServerCommand( client - level.clients, "cp \"Ten seconds until inactivity drop!\n\"" ); + } + } + return qtrue; +} + +/* +================== +ClientTimerActions + +Actions that happen once a second +================== +*/ +//char *Q_stristr(const char *s, const char *find); +void uwRename(gentity_t *player, const char *newname); +void ClientTimerActions( gentity_t *ent, int msec ) { + gclient_t *client; + char motdWithNewLines[MAX_STRING_CHARS]; + char motdString[MAX_STRING_CHARS]; + int clientNum = ent-g_entities; + + client = ent->client; + client->timeResidual += msec; + + while ( client->timeResidual >= 1000 ) + { + client->timeResidual -= 1000; + + // count down health when over max + if ( ent->health > client->ps.stats[STAT_MAX_HEALTH] ) { + ent->health--; + } + + // count down armor when over max + if ( client->ps.stats[STAT_ARMOR] > client->ps.stats[STAT_MAX_HEALTH] ) { + client->ps.stats[STAT_ARMOR]--; + } + + if ( cm_autoprotecttime.integer != 0 && client->ps.duelInProgress == qfalse ) { + if ( client->pers.cmd.forwardmove || client->pers.cmd.rightmove || + client->pers.cmd.upmove || (client->pers.cmd.buttons & (BUTTON_ATTACK|BUTTON_ALT_ATTACK)) ) { + client->cmIdleTimer = cm_autoprotecttime.integer; + } + else if ( !client->pers.cmd.forwardmove || !client->pers.cmd.rightmove || + !client->pers.cmd.upmove || !(client->pers.cmd.buttons & (BUTTON_ATTACK|BUTTON_ALT_ATTACK)) ) { + if (client->cmIdleTimer == 0) { + client->ps.eFlags |= EF_INVULNERABLE; + client->invulnerableTimer = level.time + Q3_INFINITE; + } + if (client->cmIdleTimer != 0){ + client->cmIdleTimer--; + } + } + } + + if (client->cmClanTimer >= 1 && /*client->csTimeLeft == 0 &&*/ client->pers.amclanreserved == 1 && + !(ent->r.svFlags & SVF_BOT) && *cm_clanTag.string && cm_clanTag.string[0] && !(ent->r.svFlags & SVF_CLAN)){ + trap_SendServerCommand( ent-g_entities, va("cp \"^1Your clan tag is reserved for members only!\n^1Please change it, or login in ^3%d seconds^1,\n^1or your clan name will be removed.\n\"", client->cmClanTimer )); + client->cmClanTimer--; + } + + if (client->cmClanTimer == 0 && client->pers.amclanreserved == 1 && !(ent->r.svFlags & SVF_CLAN)){ + client->pers.amclanreserved = 0; + uwRename(&g_entities[clientNum], "Padawan"); + trap_SendServerCommand( ent-g_entities, va("print \"The clan name you were using was protected, you have been forcefully renamed.\n\"") ); + } + + //cm Center Screen MOTD + if (client->csTimeLeft && client->pers.amclanreserved == 0 && *cm_motd.string && cm_motd.string[0]) { + trap_Cvar_VariableStringBuffer( "cm_motd", motdString, MAX_STRING_CHARS ); + M_StringEscapeToEnters( motdString, motdWithNewLines, MAX_STRING_CHARS ); + trap_SendServerCommand( ent->client->ps.clientNum, va ( "cp \"^1%s\n%s\nTimeLeft: ^3%d\"", GAMEVERSION, motdWithNewLines, ent->client->csTimeLeft ) ); + client->csTimeLeft--; + } + } +} + +/* +==================== +ClientIntermissionThink +==================== +*/ +void ClientIntermissionThink( gclient_t *client ) { + client->ps.eFlags &= ~EF_TALK; + client->ps.eFlags &= ~EF_FIRING; + + // the level will exit when everyone wants to or after timeouts + + // swap and latch button actions + client->oldbuttons = client->buttons; + client->buttons = client->pers.cmd.buttons; + if ( client->buttons & ( BUTTON_ATTACK | BUTTON_USE_HOLDABLE ) & ( client->oldbuttons ^ client->buttons ) ) { + // this used to be an ^1 but once a player says ready, it should stick + client->readyToExit = 1; + } +} + + +/* +================ +ClientEvents + +Events will be passed on to the clients for presentation, +but any server game effects are handled here +================ +*/ +void ClientEvents( gentity_t *ent, int oldEventSequence ) { + int i;//, j; + int event; + gclient_t *client; + int damage; + vec3_t dir; +// vec3_t origin, angles; +// qboolean fired; +// gitem_t *item; +// gentity_t *drop; + + client = ent->client; + + if ( oldEventSequence < client->ps.eventSequence - MAX_PS_EVENTS ) { + oldEventSequence = client->ps.eventSequence - MAX_PS_EVENTS; + } + for ( i = oldEventSequence ; i < client->ps.eventSequence ; i++ ) { + event = client->ps.events[ i & (MAX_PS_EVENTS-1) ]; + + switch ( event ) { + case EV_FALL: + case EV_ROLL: + { + int delta = client->ps.eventParms[ i & (MAX_PS_EVENTS-1) ]; + + if (ent->client && ent->client->ps.fallingToDeath) + { + break; + } + + if ( ent->s.eType != ET_PLAYER ) + { + break; // not in the player model + } + + if ( g_dmflags.integer & DF_NO_FALLING ) + { + break; + } + + if (delta <= 44) + { + break; + } + + damage = delta*0.16; //good enough for now, I guess + + VectorSet (dir, 0, 0, 1); + ent->pain_debounce_time = level.time + 200; // no normal pain sound + G_Damage (ent, NULL, NULL, NULL, NULL, damage, DAMAGE_NO_ARMOR, MOD_FALLING); + } + break; + case EV_FIRE_WEAPON: + FireWeapon( ent, qfalse ); + ent->client->dangerTime = level.time; + ent->client->ps.eFlags &= ~EF_INVULNERABLE; + ent->client->invulnerableTimer = 0; + break; + + case EV_ALT_FIRE: + FireWeapon( ent, qtrue ); + ent->client->dangerTime = level.time; + ent->client->ps.eFlags &= ~EF_INVULNERABLE; + ent->client->invulnerableTimer = 0; + break; + + case EV_SABER_ATTACK: + ent->client->dangerTime = level.time; + ent->client->ps.eFlags &= ~EF_INVULNERABLE; + ent->client->invulnerableTimer = 0; + break; + + //rww - Note that these must be in the same order (ITEM#-wise) as they are in holdable_t + case EV_USE_ITEM1: //seeker droid + ItemUse_Seeker(ent); + break; + case EV_USE_ITEM2: //shield + ItemUse_Shield(ent); + break; + case EV_USE_ITEM3: //medpack + ItemUse_MedPack(ent); + break; + case EV_USE_ITEM4: //datapad + //G_Printf("Used Datapad\n"); + break; + case EV_USE_ITEM5: //binoculars + ItemUse_Binoculars(ent); + break; + case EV_USE_ITEM6: //sentry gun + ItemUse_Sentry(ent); + break; + + default: + break; + } + } + +} + +/* +============== +SendPendingPredictableEvents +============== +*/ +void SendPendingPredictableEvents( playerState_t *ps ) { + gentity_t *t; + int event, seq; + int extEvent, number; + + // if there are still events pending + if ( ps->entityEventSequence < ps->eventSequence ) { + // create a temporary entity for this event which is sent to everyone + // except the client who generated the event + seq = ps->entityEventSequence & (MAX_PS_EVENTS-1); + event = ps->events[ seq ] | ( ( ps->entityEventSequence & 3 ) << 8 ); + // set external event to zero before calling BG_PlayerStateToEntityState + extEvent = ps->externalEvent; + ps->externalEvent = 0; + // create temporary entity for event + t = G_TempEntity( ps->origin, event ); + number = t->s.number; + BG_PlayerStateToEntityState( ps, &t->s, qtrue ); + t->s.number = number; + t->s.eType = ET_EVENTS + event; + t->s.eFlags |= EF_PLAYER_EVENT; + t->s.otherEntityNum = ps->clientNum; + // send to everyone except the client who generated the event + t->r.svFlags |= SVF_NOTSINGLECLIENT; + t->r.singleClient = ps->clientNum; + // set back external event + ps->externalEvent = extEvent; + } +} + +extern int saberOffSound; +extern int saberOnSound; + +/* +================== +G_UpdateClientBroadcasts + +Determines whether this client should be broadcast to any other clients. +A client is broadcast when another client is using force sight or is +================== +*/ +#define MAX_JEDIMASTER_DISTANCE 2500 +#define MAX_JEDIMASTER_FOV 100 + +#define MAX_SIGHT_DISTANCE 1500 +#define MAX_SIGHT_FOV 100 + +static void G_UpdateForceSightBroadcasts ( gentity_t *self ) +{ + int i; + + // Any clients with force sight on should see this client + for ( i = 0; i < level.numConnectedClients; i ++ ) + { + gentity_t *ent = &g_entities[level.sortedClients[i]]; + float dist; + vec3_t angles; + + if ( ent == self ) + { + continue; + } + + // Not using force sight so we shouldnt broadcast to this one + if ( !(ent->client->ps.fd.forcePowersActive & (1<client->ps.origin, ent->client->ps.origin, angles ); + dist = VectorLengthSquared ( angles ); + vectoangles ( angles, angles ); + + // Too far away then just forget it + if ( dist > MAX_SIGHT_DISTANCE * MAX_SIGHT_DISTANCE ) + { + continue; + } + + // If not within the field of view then forget it + if ( !InFieldOfVision ( ent->client->ps.viewangles, MAX_SIGHT_FOV, angles ) ) + { + break; + } + + // Turn on the broadcast bit for the master and since there is only one + // master we are done + self->r.broadcastClients[ent->s.clientNum/32] |= (1 << (ent->s.clientNum%32)); + + break; + } +} + +static void G_UpdateJediMasterBroadcasts ( gentity_t *self ) +{ + int i; + + // Not jedi master mode then nothing to do + if ( g_gametype.integer != GT_JEDIMASTER ) + { + return; + } + + // This client isnt the jedi master so it shouldnt broadcast + if ( !self->client->ps.isJediMaster ) + { + return; + } + + // Broadcast ourself to all clients within range + for ( i = 0; i < level.numConnectedClients; i ++ ) + { + gentity_t *ent = &g_entities[level.sortedClients[i]]; + float dist; + vec3_t angles; + + if ( ent == self ) + { + continue; + } + + VectorSubtract( self->client->ps.origin, ent->client->ps.origin, angles ); + dist = VectorLengthSquared ( angles ); + vectoangles ( angles, angles ); + + // Too far away then just forget it + if ( dist > MAX_JEDIMASTER_DISTANCE * MAX_JEDIMASTER_DISTANCE ) + { + continue; + } + + // If not within the field of view then forget it + if ( !InFieldOfVision ( ent->client->ps.viewangles, MAX_JEDIMASTER_FOV, angles ) ) + { + continue; + } + + // Turn on the broadcast bit for the master and since there is only one + // master we are done + self->r.broadcastClients[ent->s.clientNum/32] |= (1 << (ent->s.clientNum%32)); + } +} + +void G_UpdateClientBroadcasts ( gentity_t *self ) +{ + // Clear all the broadcast bits for this client + memset ( self->r.broadcastClients, 0, sizeof ( self->r.broadcastClients ) ); + + // The jedi master is broadcast to everyone in range + G_UpdateJediMasterBroadcasts ( self ); + + // Anyone with force sight on should see this client + G_UpdateForceSightBroadcasts ( self ); +} + +/* +============== +ClientThink + +This will be called once for each client frame, which will +usually be a couple times for each server frame on fast clients. + +If "g_synchronousClients 1" is set, this will be called exactly +once for each server frame, which makes for smooth demo recording. +============== +*/ +void ClientThink_real( gentity_t *ent ) { + gclient_t *client; + pmove_t pm; + int oldEventSequence; + int msec; + int i; + usercmd_t *ucmd; + unsigned static int TimeReswitch = 0; + + client = ent->client; + + // don't think if the client is not yet connected (and thus not yet spawned in) + if (client->pers.connected != CON_CONNECTED) { + return; + } + //JediDog + if (TimeReswitch < level.time) + { + ClientUserinfoChanged(ent->client->ps.clientNum); + } + TimeReswitch = level.time + 500; + + // mark the time, so the connection sprite can be removed + ucmd = &ent->client->pers.cmd; + + // sanity check the command time to prevent speedup cheating + if ( ucmd->serverTime > level.time + 200 ) { + ucmd->serverTime = level.time + 200; +// G_Printf("serverTime <<<<<\n" ); + } + if ( ucmd->serverTime < level.time - 1000 ) { + ucmd->serverTime = level.time - 1000; +// G_Printf("serverTime >>>>>\n" ); + } + + msec = ucmd->serverTime - client->ps.commandTime; + // following others may result in bad times, but we still want + // to check for follow toggles + if ( msec < 1 && client->sess.spectatorState != SPECTATOR_FOLLOW ) { + return; + } + if ( msec > 200 ) { + msec = 200; + } + + if ( pmove_msec.integer < 8 ) { + trap_Cvar_Set("pmove_msec", "8"); + } + else if (pmove_msec.integer > 33) { + trap_Cvar_Set("pmove_msec", "33"); + } + + if ( pmove_fixed.integer || client->pers.pmoveFixed ) { + ucmd->serverTime = ((ucmd->serverTime + pmove_msec.integer-1) / pmove_msec.integer) * pmove_msec.integer; + //if (ucmd->serverTime - client->ps.commandTime <= 0) + // return; + } + + // + // check for exiting intermission + // + if ( level.intermissiontime ) { + ClientIntermissionThink( client ); + return; + } + + // spectators don't do much + if ( client->sess.sessionTeam == TEAM_SPECTATOR ) { + if ( client->sess.spectatorState == SPECTATOR_SCOREBOARD ) { + return; + } + SpectatorThink( ent, ucmd ); + return; + } + + if (ent && ent->client && (ent->client->ps.eFlags & EF_INVULNERABLE)) + { + if (ent->client->invulnerableTimer <= level.time) + { + ent->client->ps.eFlags &= ~EF_INVULNERABLE; + } + } + + // check for inactivity timer, but never drop the local client of a non-dedicated server + if ( !ClientInactivityTimer( client ) ) { + return; + } + + // clear the rewards if time + if ( level.time > client->rewardTime ) { + client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP ); + } + + if ( client->noclip ) { + client->ps.pm_type = PM_NOCLIP; + } else if ( client->ps.eFlags & EF_DISINTEGRATION ) { + client->ps.pm_type = PM_NOCLIP; + } else if ( client->ps.stats[STAT_HEALTH] <= 0 ) { + client->ps.pm_type = PM_DEAD; + } else { + if (client->ps.forceGripChangeMovetype) + { + client->ps.pm_type = client->ps.forceGripChangeMovetype; + } + else + { + if (client->freeze==1) + { + if (client->pers.cmd.forwardmove || client->pers.cmd.rightmove || client->pers.cmd.upmove) { + client->ps.saberCanThrow = qtrue; + client->ps.pm_type = PM_NORMAL; + client->freeze=0; + } else { + client->ps.pm_type = PM_FREEZE; + } + } + else + { + client->ps.pm_type = PM_NORMAL; + } + } + } + + client->ps.gravity = g_gravity.value; + + // set speed + client->ps.speed = g_speed.value; + client->ps.basespeed = g_speed.value; + + if (ent->client->pers.ampunish == qtrue) { + ent->client->ps.pm_type = PM_FLOAT; + ent->client->ps.weaponTime = 100; + } + + if (level.meetingMode == qtrue || level.matchMode == qtrue){ + if( ent->r.svFlags & SVF_BOT ){ + if (ent->client->sess.sessionTeam != TEAM_SPECTATOR){ + SetTeam(ent, "spectator" ); + } + } + } + if (level.meetingMode == qtrue){ + ent->client->ps.weaponTime = 100; + ent->client->ps.forceRestricted = qtrue; + ent->client->ps.saberHolstered = qtrue; + } + + if (ent->client->ps.duelInProgress) + { + gentity_t *duelAgainst = &g_entities[ent->client->ps.duelIndex]; + + //Keep the time updated, so once this duel ends this player can't engage in a duel for another + //10 seconds. This will give other people a chance to engage in duels in case this player wants + //to engage again right after he's done fighting and someone else is waiting. + //cm NOTE: duel time removal + //ent->client->ps.fd.privateDuelTime = level.time + 10000; + + if (ent->client->ps.duelTime < level.time) + { + //Bring out the sabers + if (ent->client->ps.weapon == WP_SABER && ent->client->ps.saberHolstered && + ent->client->ps.duelTime) + { + if (cm_duelbeginsaberoff.integer == 0) { + if (!saberOffSound || !saberOnSound) + { + saberOffSound = G_SoundIndex("sound/weapons/saber/saberoffquick.wav"); + saberOnSound = G_SoundIndex("sound/weapons/saber/saberon.wav"); + } + + ent->client->ps.saberHolstered = qfalse; + G_Sound(ent, CHAN_AUTO, saberOnSound); + } + + G_AddEvent(ent, EV_PRIVATE_DUEL, 2); + + ent->client->ps.duelTime = 0; + } + + if (duelAgainst && duelAgainst->client && duelAgainst->inuse && + duelAgainst->client->ps.weapon == WP_SABER && duelAgainst->client->ps.saberHolstered && + duelAgainst->client->ps.duelTime) + { + if (cm_duelbeginsaberoff.integer == 0) { + if (!saberOffSound || !saberOnSound) + { + saberOffSound = G_SoundIndex("sound/weapons/saber/saberoffquick.wav"); + saberOnSound = G_SoundIndex("sound/weapons/saber/saberon.wav"); + } + + duelAgainst->client->ps.saberHolstered = qfalse; + G_Sound(duelAgainst, CHAN_AUTO, saberOnSound); + } + + G_AddEvent(duelAgainst, EV_PRIVATE_DUEL, 2); + + duelAgainst->client->ps.duelTime = 0; + } + } + else + { + client->ps.speed = 0; + client->ps.basespeed = 0; + ucmd->forwardmove = 0; + ucmd->rightmove = 0; + ucmd->upmove = 0; + } + + if (!duelAgainst || !duelAgainst->client || !duelAgainst->inuse || + duelAgainst->client->ps.duelIndex != ent->s.number) + { + ent->client->ps.duelInProgress = 0; + G_AddEvent(ent, EV_PRIVATE_DUEL, 0); + } + else if (duelAgainst->health < 1 || duelAgainst->client->ps.stats[STAT_HEALTH] < 1) + { + if (cm_duelstatus.integer >= 1) + { + trap_SendServerCommand( -1, va("print \"%s ^7survived with ^5%d ^7health and ^5%d ^7shield\n\"", + ent->client->pers.netname, ent->client->ps.stats[STAT_HEALTH], ent->client->ps.stats[STAT_ARMOR] ) ); + /*trap_SendServerCommand( ent-g_entities, va("cp \"^7You survived with\n^1%d^7/^2%d\n\"", + ent->client->ps.stats[STAT_HEALTH], ent->client->ps.stats[STAT_ARMOR] ) );*/ + } + + ent->client->ps.duelInProgress = 0; + duelAgainst->client->ps.duelInProgress = 0; + + G_AddEvent(ent, EV_PRIVATE_DUEL, 0); + G_AddEvent(duelAgainst, EV_PRIVATE_DUEL, 0); + + //Winner gets full health.. providing he's still alive + if (ent->health > 0 && ent->client->ps.stats[STAT_HEALTH] > 0) + { + /*if (ent->health < ent->client->ps.stats[STAT_MAX_HEALTH]) + { + ent->client->ps.stats[STAT_HEALTH] = ent->health = ent->client->ps.stats[STAT_MAX_HEALTH]; + }*/ + //cm NOTE: FULL heal + ent->client->ps.stats[STAT_HEALTH] = ent->health = ent->client->ps.stats[STAT_MAX_HEALTH] + 25; + ent->client->ps.stats[STAT_ARMOR] = 25; + + if (g_spawnInvulnerability.integer) + { + ent->client->ps.eFlags |= EF_INVULNERABLE; + ent->client->invulnerableTimer = level.time + g_spawnInvulnerability.integer; + } + } + + /* + trap_SendServerCommand( ent-g_entities, va("print \"%s %s\n\"", ent->client->pers.netname, G_GetStripEdString("SVINGAME", "PLDUELWINNER")) ); + trap_SendServerCommand( duelAgainst-g_entities, va("print \"%s %s\n\"", ent->client->pers.netname, G_GetStripEdString("SVINGAME", "PLDUELWINNER")) ); + */ + //Private duel announcements are now made globally because we only want one duel at a time. + if (ent->health > 0 && ent->client->ps.stats[STAT_HEALTH] > 0) + { + if (cm_multiduels.integer==0){ + trap_SendServerCommand( -1, va("cp \"%s %s %s!\n\"", ent->client->pers.netname, G_GetStripEdString("SVINGAME", "PLDUELWINNER"), duelAgainst->client->pers.netname) ); + } else { + trap_SendServerCommand( ent-g_entities, va("cp \"%s %s %s!\n\"", ent->client->pers.netname, G_GetStripEdString("SVINGAME", "PLDUELWINNER"), duelAgainst->client->pers.netname) ); + trap_SendServerCommand( duelAgainst-g_entities, va("cp \"%s %s %s!\n\"", ent->client->pers.netname, G_GetStripEdString("SVINGAME", "PLDUELWINNER"), duelAgainst->client->pers.netname) ); + } + trap_SendServerCommand( -1, va("print \"%s %s %s!\n\"", ent->client->pers.netname, G_GetStripEdString("SVINGAME", "PLDUELWINNER"), duelAgainst->client->pers.netname) ); + } + else + { //it was a draw, because we both managed to die in the same frame + if (cm_multiduels.integer==0){ + trap_SendServerCommand( -1, va("cp \"%s\n\"", G_GetStripEdString("SVINGAME", "PLDUELTIE")) ); + } else { + trap_SendServerCommand( ent-g_entities, va("cp \"%s\n\"", G_GetStripEdString("SVINGAME", "PLDUELTIE")) ); + trap_SendServerCommand( duelAgainst-g_entities, va("cp \"%s\n\"", G_GetStripEdString("SVINGAME", "PLDUELTIE")) ); + } + trap_SendServerCommand( -1, va("cp \"%s\n\"", G_GetStripEdString("SVINGAME", "PLDUELTIE")) ); + } + } + else + { + vec3_t vSub; + float subLen = 0; + + VectorSubtract(ent->client->ps.origin, duelAgainst->client->ps.origin, vSub); + subLen = VectorLength(vSub); + + if (cm_duelradius.integer == 0) { + if (subLen >= 1024) + { + ent->client->ps.duelInProgress = 0; + duelAgainst->client->ps.duelInProgress = 0; + + G_AddEvent(ent, EV_PRIVATE_DUEL, 0); + G_AddEvent(duelAgainst, EV_PRIVATE_DUEL, 0); + + trap_SendServerCommand( -1, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "PLDUELSTOP")) ); + } + } + } + } + + /* + if ( client->ps.powerups[PW_HASTE] ) { + client->ps.speed *= 1.3; + } + */ + + if (client->ps.usingATST && ent->health > 0) + { //we have special shot clip boxes as an ATST + ent->r.contents |= CONTENTS_NOSHOT; + ATST_ManageDamageBoxes(ent); + } + else + { + ent->r.contents &= ~CONTENTS_NOSHOT; + client->damageBoxHandle_Head = 0; + client->damageBoxHandle_RLeg = 0; + client->damageBoxHandle_LLeg = 0; + } + + //rww - moved this stuff into the pmove code so that it's predicted properly + //BG_AdjustClientSpeed(&client->ps, &client->pers.cmd, level.time); + + // set up for pmove + oldEventSequence = client->ps.eventSequence; + + memset (&pm, 0, sizeof(pm)); + + if ( ent->flags & FL_FORCE_GESTURE ) { + ent->flags &= ~FL_FORCE_GESTURE; + ent->client->pers.cmd.buttons |= BUTTON_GESTURE; + } + + if (ent->client && ent->client->ps.fallingToDeath && + (level.time - FALL_FADE_TIME) > ent->client->ps.fallingToDeath) + { //die! + player_die(ent, ent, ent, 100000, MOD_FALLING); + respawn(ent); + ent->client->ps.fallingToDeath = 0; + + G_MuteSound(ent->s.number, CHAN_VOICE); //stop screaming, because you are dead! + } + + if (ent->client->ps.otherKillerTime > level.time && + ent->client->ps.groundEntityNum != ENTITYNUM_NONE && + ent->client->ps.otherKillerDebounceTime < level.time) + { + ent->client->ps.otherKillerTime = 0; + ent->client->ps.otherKiller = ENTITYNUM_NONE; + } + else if (ent->client->ps.otherKillerTime > level.time && + ent->client->ps.groundEntityNum == ENTITYNUM_NONE) + { + if (ent->client->ps.otherKillerDebounceTime < (level.time + 100)) + { + ent->client->ps.otherKillerDebounceTime = level.time + 100; + } + } + +// WP_ForcePowersUpdate( ent, msec, ucmd); //update any active force powers +// WP_SaberPositionUpdate(ent, ucmd); //check the server-side saber point, do apprioriate server-side actions (effects are cs-only) + + if ((ent->client->pers.cmd.buttons & BUTTON_USE) && ent->client->ps.useDelay < level.time) + { + TryUse(ent); + ent->client->ps.useDelay = level.time + 100; + } + + pm.ps = &client->ps; + pm.cmd = *ucmd; + if ( pm.ps->pm_type == PM_DEAD ) { + pm.tracemask = MASK_PLAYERSOLID & ~CONTENTS_BODY; + } + else if ( ent->r.svFlags & SVF_BOT ) { + pm.tracemask = MASK_PLAYERSOLID | CONTENTS_MONSTERCLIP; + } + else { + pm.tracemask = MASK_PLAYERSOLID; + } + pm.trace = trap_Trace; + pm.pointcontents = trap_PointContents; + pm.debugLevel = g_debugMove.integer; + pm.noFootsteps = ( g_dmflags.integer & DF_NO_FOOTSTEPS ) > 0; + + pm.pmove_fixed = pmove_fixed.integer | client->pers.pmoveFixed; + pm.pmove_msec = pmove_msec.integer; + + pm.animations = bgGlobalAnimations;//NULL; + + pm.gametype = g_gametype.integer; + + VectorCopy( client->ps.origin, client->oldOrigin ); + + if (level.intermissionQueued != 0 && g_singlePlayer.integer) { + if ( level.time - level.intermissionQueued >= 1000 ) { + pm.cmd.buttons = 0; + pm.cmd.forwardmove = 0; + pm.cmd.rightmove = 0; + pm.cmd.upmove = 0; + if ( level.time - level.intermissionQueued >= 2000 && level.time - level.intermissionQueued <= 2500 ) { + trap_SendConsoleCommand( EXEC_APPEND, "centerview\n"); + } + ent->client->ps.pm_type = PM_SPINTERMISSION; + } + } + + for ( i = 0 ; i < MAX_CLIENTS ; i++ ) + { + if (g_entities[i].inuse && g_entities[i].client) + { + pm.bgClients[i] = &g_entities[i].client->ps; + } + } + + if (ent->client->ps.saberLockTime > level.time) + { + gentity_t *blockOpp = &g_entities[ent->client->ps.saberLockEnemy]; + + if (blockOpp && blockOpp->inuse && blockOpp->client) + { + vec3_t lockDir, lockAng; + + //VectorClear( ent->client->ps.velocity ); + VectorSubtract( blockOpp->r.currentOrigin, ent->r.currentOrigin, lockDir ); + //lockAng[YAW] = vectoyaw( defDir ); + vectoangles(lockDir, lockAng); + SetClientViewAngle( ent, lockAng ); + } + + if ( ( ent->client->buttons & BUTTON_ATTACK ) && ! ( ent->client->oldbuttons & BUTTON_ATTACK ) ) + { + ent->client->ps.saberLockHits++; + } + if (ent->client->ps.saberLockHits > 2) + { + if (!ent->client->ps.saberLockAdvance) + { + ent->client->ps.saberLockHits -= 3; + } + ent->client->ps.saberLockAdvance = qtrue; + } + } + else + { + ent->client->ps.saberLockFrame = 0; + //check for taunt + if ( (pm.cmd.generic_cmd == GENCMD_ENGAGE_DUEL) && (g_gametype.integer == GT_TOURNAMENT) ) + {//already in a duel, make it a taunt command + pm.cmd.buttons |= BUTTON_GESTURE; + } + } + + Pmove (&pm); + + if (pm.checkDuelLoss) + { + if (pm.checkDuelLoss > 0 && pm.checkDuelLoss <= MAX_CLIENTS) + { + gentity_t *clientLost = &g_entities[pm.checkDuelLoss-1]; + + if (clientLost && clientLost->inuse && clientLost->client && Q_irand(0, 40) > clientLost->health) + { + vec3_t attDir; + VectorSubtract(ent->client->ps.origin, clientLost->client->ps.origin, attDir); + VectorNormalize(attDir); + + VectorClear(clientLost->client->ps.velocity); + clientLost->client->ps.forceHandExtend = HANDEXTEND_NONE; + clientLost->client->ps.forceHandExtendTime = 0; + + gGAvoidDismember = 1; + G_Damage(clientLost, ent, ent, attDir, clientLost->client->ps.origin, 9999, DAMAGE_NO_PROTECTION, MOD_SABER); + + if (clientLost->health < 1) + { + gGAvoidDismember = 2; + G_CheckForDismemberment(clientLost, clientLost->client->ps.origin, 999, (clientLost->client->ps.legsAnim&~ANIM_TOGGLEBIT)); + } + + gGAvoidDismember = 0; + } + } + + pm.checkDuelLoss = 0; + } + + switch(pm.cmd.generic_cmd) + { + case 0: + break; + case GENCMD_SABERSWITCH: + Cmd_ToggleSaber_f(ent); + break; + case GENCMD_ENGAGE_DUEL: + if ( g_gametype.integer == GT_TOURNAMENT ) + {//already in a duel, made it a taunt command + } + else + { + Cmd_EngageDuel_f(ent); + } + break; + case GENCMD_FORCE_HEAL: + ForceHeal(ent); + break; + case GENCMD_FORCE_SPEED: + ForceSpeed(ent, 0); + break; + case GENCMD_FORCE_THROW: + ForceThrow(ent, qfalse); + break; + case GENCMD_FORCE_PULL: + ForceThrow(ent, qtrue); + break; + case GENCMD_FORCE_DISTRACT: + ForceTelepathy(ent); + break; + case GENCMD_FORCE_RAGE: + ForceRage(ent); + break; + case GENCMD_FORCE_PROTECT: + ForceProtect(ent); + break; + case GENCMD_FORCE_ABSORB: + ForceAbsorb(ent); + break; + case GENCMD_FORCE_HEALOTHER: + ForceTeamHeal(ent); + break; + case GENCMD_FORCE_FORCEPOWEROTHER: + ForceTeamForceReplenish(ent); + break; + case GENCMD_FORCE_SEEING: + ForceSeeing(ent); + break; + case GENCMD_USE_SEEKER: + if ( (ent->client->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << HI_SEEKER)) && + G_ItemUsable(&ent->client->ps, HI_SEEKER) ) + { + ItemUse_Seeker(ent); + G_AddEvent(ent, EV_USE_ITEM0+HI_SEEKER, 0); + ent->client->ps.stats[STAT_HOLDABLE_ITEMS] &= ~(1 << HI_SEEKER); + } + break; + case GENCMD_USE_FIELD: + if ( (ent->client->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << HI_SHIELD)) && + G_ItemUsable(&ent->client->ps, HI_SHIELD) ) + { + ItemUse_Shield(ent); + G_AddEvent(ent, EV_USE_ITEM0+HI_SHIELD, 0); + ent->client->ps.stats[STAT_HOLDABLE_ITEMS] &= ~(1 << HI_SHIELD); + } + break; + case GENCMD_USE_BACTA: + if ( (ent->client->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << HI_MEDPAC)) && + G_ItemUsable(&ent->client->ps, HI_MEDPAC) ) + { + ItemUse_MedPack(ent); + G_AddEvent(ent, EV_USE_ITEM0+HI_MEDPAC, 0); + ent->client->ps.stats[STAT_HOLDABLE_ITEMS] &= ~(1 << HI_MEDPAC); + } + break; + case GENCMD_USE_ELECTROBINOCULARS: + if ( (ent->client->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << HI_BINOCULARS)) && + G_ItemUsable(&ent->client->ps, HI_BINOCULARS) ) + { + ItemUse_Binoculars(ent); + if (ent->client->ps.zoomMode == 0) + { + G_AddEvent(ent, EV_USE_ITEM0+HI_BINOCULARS, 1); + } + else + { + G_AddEvent(ent, EV_USE_ITEM0+HI_BINOCULARS, 2); + } + } + break; + case GENCMD_ZOOM: + if ( (ent->client->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << HI_BINOCULARS)) && + G_ItemUsable(&ent->client->ps, HI_BINOCULARS) ) + { + ItemUse_Binoculars(ent); + if (ent->client->ps.zoomMode == 0) + { + G_AddEvent(ent, EV_USE_ITEM0+HI_BINOCULARS, 1); + } + else + { + G_AddEvent(ent, EV_USE_ITEM0+HI_BINOCULARS, 2); + } + } + break; + case GENCMD_USE_SENTRY: + if ( (ent->client->ps.stats[STAT_HOLDABLE_ITEMS] & (1 << HI_SENTRY_GUN)) && + G_ItemUsable(&ent->client->ps, HI_SENTRY_GUN) ) + { + ItemUse_Sentry(ent); + G_AddEvent(ent, EV_USE_ITEM0+HI_SENTRY_GUN, 0); + ent->client->ps.stats[STAT_HOLDABLE_ITEMS] &= ~(1 << HI_SENTRY_GUN); + } + break; + case GENCMD_SABERATTACKCYCLE: + Cmd_SaberAttackCycle_f(ent); + break; + default: + break; + } + + // save results of pmove + if ( ent->client->ps.eventSequence != oldEventSequence ) { + ent->eventTime = level.time; + } + if (g_smoothClients.integer) { + BG_PlayerStateToEntityStateExtraPolate( &ent->client->ps, &ent->s, ent->client->ps.commandTime, qtrue ); + } + else { + BG_PlayerStateToEntityState( &ent->client->ps, &ent->s, qtrue ); + } + SendPendingPredictableEvents( &ent->client->ps ); + + /*if ( !( ent->client->ps.eFlags & EF_FIRING ) ) { + client->fireHeld = qfalse; // for grapple + }*/ + + // use the snapped origin for linking so it matches client predicted versions + VectorCopy( ent->s.pos.trBase, ent->r.currentOrigin ); + + VectorCopy (pm.mins, ent->r.mins); + VectorCopy (pm.maxs, ent->r.maxs); + + ent->waterlevel = pm.waterlevel; + ent->watertype = pm.watertype; + + // execute client events + ClientEvents( ent, oldEventSequence ); + + if ( pm.useEvent ) + { + //TODO: Use +// TryUse( ent ); + } + + // link entity now, after any personal teleporters have been used + trap_LinkEntity (ent); + if ( !ent->client->noclip ) { + G_TouchTriggers( ent ); + } + + // NOTE: now copy the exact origin over otherwise clients can be snapped into solid + VectorCopy( ent->client->ps.origin, ent->r.currentOrigin ); + + //test for solid areas in the AAS file +// BotTestAAS(ent->r.currentOrigin); + + // touch other objects + ClientImpacts( ent, &pm ); + + // save results of triggers and client events + if (ent->client->ps.eventSequence != oldEventSequence) { + ent->eventTime = level.time; + } + + // swap and latch button actions + client->oldbuttons = client->buttons; + client->buttons = ucmd->buttons; + client->latched_buttons |= client->buttons & ~client->oldbuttons; + + // Did we kick someone in our pmove sequence? + if (client->ps.forceKickFlip) + { + gentity_t *faceKicked = &g_entities[client->ps.forceKickFlip-1]; + + if (faceKicked && faceKicked->client && (!OnSameTeam(ent, faceKicked) || g_friendlyFire.integer) && + (!faceKicked->client->ps.duelInProgress || faceKicked->client->ps.duelIndex == ent->s.number) && + (!ent->client->ps.duelInProgress || ent->client->ps.duelIndex == faceKicked->s.number)) + { + if ( faceKicked && faceKicked->client && faceKicked->health && faceKicked->takedamage ) + {//push them away and do pain + vec3_t oppDir; + int strength = (int)VectorNormalize2( client->ps.velocity, oppDir ); + + strength *= 0.05; + + VectorScale( oppDir, -1, oppDir ); + + G_Damage( faceKicked, ent, ent, oppDir, client->ps.origin, strength, DAMAGE_NO_ARMOR, MOD_MELEE ); + + ent->client->ps.eFlags &= ~EF_INVULNERABLE; + ent->client->invulnerableTimer = 0; + + if ( faceKicked->client->ps.weapon != WP_SABER || + faceKicked->client->ps.fd.saberAnimLevel < FORCE_LEVEL_3 || + (!BG_SaberInAttack(faceKicked->client->ps.saberMove) && !PM_SaberInStart(faceKicked->client->ps.saberMove) && !PM_SaberInReturn(faceKicked->client->ps.saberMove) && !PM_SaberInTransition(faceKicked->client->ps.saberMove)) ) + { + if (faceKicked->health > 0 && + faceKicked->client->ps.stats[STAT_HEALTH] > 0 && + faceKicked->client->ps.forceHandExtend != HANDEXTEND_KNOCKDOWN) + { + if (Q_irand(1, 10) <= 3) + { //only actually knock over sometimes, but always do velocity hit + faceKicked->client->ps.forceHandExtend = HANDEXTEND_KNOCKDOWN; + faceKicked->client->ps.forceHandExtendTime = level.time + 1100; + faceKicked->client->ps.forceDodgeAnim = 0; //this toggles between 1 and 0, when it's 1 we should play the get up anim + } + + faceKicked->client->ps.otherKiller = ent->s.number; + faceKicked->client->ps.otherKillerTime = level.time + 5000; + faceKicked->client->ps.otherKillerDebounceTime = level.time + 100; + + faceKicked->client->ps.velocity[0] = oppDir[0]*(strength*40); + faceKicked->client->ps.velocity[1] = oppDir[1]*(strength*40); + faceKicked->client->ps.velocity[2] = 200; + } + } + + G_Sound( faceKicked, CHAN_AUTO, G_SoundIndex( va("sound/weapons/melee/punch%d", Q_irand(1, 4)) ) ); + } + } + + client->ps.forceKickFlip = 0; + } + + // check for respawning + if ( client->ps.stats[STAT_HEALTH] <= 0 ) { + // wait for the attack button to be pressed + if ( level.time > client->respawnTime && !gDoSlowMoDuel ) { + // forcerespawn is to prevent users from waiting out powerups + if ( g_forcerespawn.integer > 0 && + ( level.time - client->respawnTime ) > g_forcerespawn.integer * 1000 ) { + respawn( ent ); + return; + } + + // pressing attack or use is the normal respawn method + if ( ucmd->buttons & ( BUTTON_ATTACK | BUTTON_USE_HOLDABLE ) ) { + respawn( ent ); + } + } + else if (gDoSlowMoDuel) + { + client->respawnTime = level.time + 1000; + } + return; + } + + // perform once-a-second actions + ClientTimerActions( ent, msec ); + + G_UpdateClientBroadcasts ( ent ); +} + +/* +================== +G_CheckClientTimeouts + +Checks whether a client has exceded any timeouts and act accordingly +================== +*/ +void G_CheckClientTimeouts ( gentity_t *ent ) +{ + // Only timeout supported right now is the timeout to spectator mode + if ( !g_timeouttospec.integer ) + { + return; + } + + // Already a spectator, no need to boot them to spectator + if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) + { + return; + } + + // See how long its been since a command was received by the client and if its + // longer than the timeout to spectator then force this client into spectator mode + if ( level.time - ent->client->pers.cmd.serverTime > g_timeouttospec.integer * 1000 ) + { + SetTeam ( ent, "spectator" ); + } +} + +/* +================== +ClientThink + +A new command has arrived from the client +================== +*/ +void ClientThink( int clientNum ) { + gentity_t *ent; + + ent = g_entities + clientNum; + trap_GetUsercmd( clientNum, &ent->client->pers.cmd ); + + // mark the time we got info, so we can display the + // phone jack if they don't get any for a while + ent->client->lastCmdTime = level.time; + + if ( !(ent->r.svFlags & SVF_BOT) && !g_synchronousClients.integer ) { + ClientThink_real( ent ); + } +} + + +void G_RunClient( gentity_t *ent ) { + if ( !(ent->r.svFlags & SVF_BOT) && !g_synchronousClients.integer ) { + return; + } + ent->client->pers.cmd.serverTime = level.time; + ClientThink_real( ent ); +} + + +/* +================== +SpectatorClientEndFrame + +================== +*/ +void SpectatorClientEndFrame( gentity_t *ent ) { + gclient_t *cl; + + // if we are doing a chase cam or a remote view, grab the latest info + if ( ent->client->sess.spectatorState == SPECTATOR_FOLLOW ) { + int clientNum, flags; + + clientNum = ent->client->sess.spectatorClient; + + // team follow1 and team follow2 go to whatever clients are playing + if ( clientNum == -1 ) { + clientNum = level.follow1; + } else if ( clientNum == -2 ) { + clientNum = level.follow2; + } + if ( clientNum >= 0 ) { + cl = &level.clients[ clientNum ]; + if ( cl->pers.connected == CON_CONNECTED && cl->sess.sessionTeam != TEAM_SPECTATOR ) { + flags = (cl->ps.eFlags & ~(EF_VOTED | EF_TEAMVOTED)) | (ent->client->ps.eFlags & (EF_VOTED | EF_TEAMVOTED)); + ent->client->ps = cl->ps; + ent->client->ps.pm_flags |= PMF_FOLLOW; + ent->client->ps.eFlags = flags; + return; + } else { + // drop them to free spectators unless they are dedicated camera followers + if ( ent->client->sess.spectatorClient >= 0 ) { + ent->client->sess.spectatorState = SPECTATOR_FREE; + ClientBegin( ent->client - level.clients, qtrue ); + } + } + } + } + + if ( ent->client->sess.spectatorState == SPECTATOR_SCOREBOARD ) { + ent->client->ps.pm_flags |= PMF_SCOREBOARD; + } else { + ent->client->ps.pm_flags &= ~PMF_SCOREBOARD; + } +} + +/* +============== +ClientEndFrame + +Called at the end of each server frame for each connected client +A fast client will have multiple ClientThink for each ClientEdFrame, +while a slow client may have multiple ClientEndFrame between ClientThink. +============== +*/ +void ClientEndFrame( gentity_t *ent ) { + int i; + clientPersistant_t *pers; + + if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) { + SpectatorClientEndFrame( ent ); + return; + } + + pers = &ent->client->pers; + + // turn off any expired powerups + for ( i = 0 ; i < MAX_POWERUPS ; i++ ) { + if ( ent->client->ps.powerups[ i ] < level.time ) { + ent->client->ps.powerups[ i ] = 0; + } + } + + // save network bandwidth +#if 0 + if ( !g_synchronousClients->integer && (ent->client->ps.pm_type == PM_NORMAL || ent->client->ps.pm_type == PM_FLOAT) ) { + // FIXME: this must change eventually for non-sync demo recording + VectorClear( ent->client->ps.viewangles ); + } +#endif + + // + // If the end of unit layout is displayed, don't give + // the player any normal movement attributes + // + if ( level.intermissiontime ) { + return; + } + + // burn from lava, etc + P_WorldEffects (ent); + + // apply all the damage taken this frame + P_DamageFeedback (ent); + + // add the EF_CONNECTION flag if we haven't gotten commands recently + if ( level.time - ent->client->lastCmdTime > 1000 ) { + ent->s.eFlags |= EF_CONNECTION; + } else { + ent->s.eFlags &= ~EF_CONNECTION; + } + + ent->client->ps.stats[STAT_HEALTH] = ent->health; // FIXME: get rid of ent->health... + + G_SetClientSound (ent); + + // set the latest infor + if (g_smoothClients.integer) { + BG_PlayerStateToEntityStateExtraPolate( &ent->client->ps, &ent->s, ent->client->ps.commandTime, qtrue ); + } + else { + BG_PlayerStateToEntityState( &ent->client->ps, &ent->s, qtrue ); + } + SendPendingPredictableEvents( &ent->client->ps ); + + // set the bit for the reachability area the client is currently in +// i = trap_AAS_PointReachabilityAreaIndex( ent->client->ps.origin ); +// ent->client->areabits[i >> 3] |= 1 << (i & 7); +} + + diff --git a/code/game/g_arenas.c b/code/game/g_arenas.c new file mode 100644 index 0000000..8d9d187 --- /dev/null +++ b/code/game/g_arenas.c @@ -0,0 +1,343 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// +// g_arenas.c +// + +#include "g_local.h" + + +gentity_t *podium1; +gentity_t *podium2; +gentity_t *podium3; + + +/* +================== +UpdateTournamentInfo +================== +*/ +void UpdateTournamentInfo( void ) { + int i; + gentity_t *player; + int playerClientNum; + int n, accuracy, perfect, msglen; + int buflen; + int score1, score2; + qboolean won; + char buf[32]; + char msg[MAX_STRING_CHARS]; + + // find the real player + player = NULL; + for (i = 0; i < level.maxclients; i++ ) { + player = &g_entities[i]; + if ( !player->inuse ) { + continue; + } + if ( !( player->r.svFlags & SVF_BOT ) ) { + break; + } + } + // this should never happen! + if ( !player || i == level.maxclients ) { + return; + } + playerClientNum = i; + + CalculateRanks(); + + if ( level.clients[playerClientNum].sess.sessionTeam == TEAM_SPECTATOR ) { + Com_sprintf( msg, sizeof(msg), "postgame %i %i 0 0 0 0 0 0 0 0 0 0 0", level.numNonSpectatorClients, playerClientNum ); + } + else { + if( player->client->accuracy_shots ) { + accuracy = player->client->accuracy_hits * 100 / player->client->accuracy_shots; + } + else { + accuracy = 0; + } + won = qfalse; + if (g_gametype.integer >= GT_CTF) { + score1 = level.teamScores[TEAM_RED]; + score2 = level.teamScores[TEAM_BLUE]; + if (level.clients[playerClientNum].sess.sessionTeam == TEAM_RED) { + won = (level.teamScores[TEAM_RED] > level.teamScores[TEAM_BLUE]); + } else { + won = (level.teamScores[TEAM_BLUE] > level.teamScores[TEAM_RED]); + } + } else { + if (&level.clients[playerClientNum] == &level.clients[ level.sortedClients[0] ]) { + won = qtrue; + score1 = level.clients[ level.sortedClients[0] ].ps.persistant[PERS_SCORE]; + score2 = level.clients[ level.sortedClients[1] ].ps.persistant[PERS_SCORE]; + } else { + score2 = level.clients[ level.sortedClients[0] ].ps.persistant[PERS_SCORE]; + score1 = level.clients[ level.sortedClients[1] ].ps.persistant[PERS_SCORE]; + } + } + if (won && player->client->ps.persistant[PERS_KILLED] == 0) { + perfect = 1; + } else { + perfect = 0; + } + Com_sprintf( msg, sizeof(msg), "postgame %i %i %i %i %i %i %i %i %i %i %i %i %i %i", level.numNonSpectatorClients, playerClientNum, accuracy, + player->client->ps.persistant[PERS_IMPRESSIVE_COUNT], player->client->ps.persistant[PERS_EXCELLENT_COUNT],player->client->ps.persistant[PERS_DEFEND_COUNT], + player->client->ps.persistant[PERS_ASSIST_COUNT], player->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT], player->client->ps.persistant[PERS_SCORE], + perfect, score1, score2, level.time, player->client->ps.persistant[PERS_CAPTURES] ); + } + + msglen = strlen( msg ); + for( i = 0; i < level.numNonSpectatorClients; i++ ) { + n = level.sortedClients[i]; + Com_sprintf( buf, sizeof(buf), " %i %i %i", n, level.clients[n].ps.persistant[PERS_RANK], level.clients[n].ps.persistant[PERS_SCORE] ); + buflen = strlen( buf ); + if( msglen + buflen + 1 >= sizeof(msg) ) { + break; + } + strcat( msg, buf ); + } + trap_SendConsoleCommand( EXEC_APPEND, msg ); +} + + +/* +static gentity_t *SpawnModelOnVictoryPad( gentity_t *pad, vec3_t offset, gentity_t *ent, int place ) { + gentity_t *body; + vec3_t vec; + vec3_t f, r, u; + + body = G_Spawn(); + if ( !body ) { + G_Printf( S_COLOR_RED "ERROR: out of gentities\n" ); + return NULL; + } + + body->classname = ent->client->pers.netname; + body->client = ent->client; + body->s = ent->s; + body->s.eType = ET_PLAYER; // could be ET_INVISIBLE + body->s.eFlags = 0; // clear EF_TALK, etc + body->s.powerups = 0; // clear powerups + body->s.loopSound = 0; // clear lava burning + body->s.number = body - g_entities; + body->timestamp = level.time; + body->physicsObject = qtrue; + body->physicsBounce = 0; // don't bounce + body->s.event = 0; + body->s.pos.trType = TR_STATIONARY; + body->s.groundEntityNum = ENTITYNUM_WORLD; + body->s.legsAnim = WeaponReadyAnim[ent->s.weapon]; + body->s.torsoAnim = WeaponReadyAnim[ent->s.weapon]; + if( body->s.weapon == WP_NONE ) { + body->s.weapon = WP_BRYAR_PISTOL; + } + if( body->s.weapon == WP_SABER) { + body->s.torsoAnim = BOTH_STAND2; + } + body->s.event = 0; + body->r.svFlags = ent->r.svFlags; + VectorCopy (ent->r.mins, body->r.mins); + VectorCopy (ent->r.maxs, body->r.maxs); + VectorCopy (ent->r.absmin, body->r.absmin); + VectorCopy (ent->r.absmax, body->r.absmax); + body->clipmask = CONTENTS_SOLID | CONTENTS_PLAYERCLIP; + body->r.contents = CONTENTS_BODY; + body->r.ownerNum = ent->r.ownerNum; + body->takedamage = qfalse; + + VectorSubtract( level.intermission_origin, pad->r.currentOrigin, vec ); + vectoangles( vec, body->s.apos.trBase ); + body->s.apos.trBase[PITCH] = 0; + body->s.apos.trBase[ROLL] = 0; + + AngleVectors( body->s.apos.trBase, f, r, u ); + VectorMA( pad->r.currentOrigin, offset[0], f, vec ); + VectorMA( vec, offset[1], r, vec ); + VectorMA( vec, offset[2], u, vec ); + + G_SetOrigin( body, vec ); + + trap_LinkEntity (body); + + body->count = place; + + return body; +} + + +static void CelebrateStop( gentity_t *player ) { + int anim; + + if( player->s.weapon == WP_SABER) { + anim = BOTH_STAND2; + } + else { + anim = WeaponReadyAnim[player->s.weapon]; + } + player->s.torsoAnim = ( ( player->s.torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) | anim; +} + + +#define TIMER_GESTURE (34*66+50) +static void CelebrateStart( gentity_t *player ) { + player->s.torsoAnim = ( ( player->s.torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) | BOTH_TALKGESTURE1; + player->nextthink = level.time + TIMER_GESTURE; + player->think = CelebrateStop; + + +// player->client->ps.events[player->client->ps.eventSequence & (MAX_PS_EVENTS-1)] = EV_TAUNT; +// player->client->ps.eventParms[player->client->ps.eventSequence & (MAX_PS_EVENTS-1)] = 0; +// player->client->ps.eventSequence++; + + G_AddEvent(player, EV_TAUNT, 0); +} + + +static vec3_t offsetFirst = {0, 0, 74}; +static vec3_t offsetSecond = {-10, 60, 54}; +static vec3_t offsetThird = {-19, -60, 45}; + +static void PodiumPlacementThink( gentity_t *podium ) { + vec3_t vec; + vec3_t origin; + vec3_t f, r, u; + + podium->nextthink = level.time + 100; + + AngleVectors( level.intermission_angle, vec, NULL, NULL ); + VectorMA( level.intermission_origin, trap_Cvar_VariableIntegerValue( "g_podiumDist" ), vec, origin ); + origin[2] -= trap_Cvar_VariableIntegerValue( "g_podiumDrop" ); + G_SetOrigin( podium, origin ); + + if( podium1 ) { + VectorSubtract( level.intermission_origin, podium->r.currentOrigin, vec ); + vectoangles( vec, podium1->s.apos.trBase ); + podium1->s.apos.trBase[PITCH] = 0; + podium1->s.apos.trBase[ROLL] = 0; + + AngleVectors( podium1->s.apos.trBase, f, r, u ); + VectorMA( podium->r.currentOrigin, offsetFirst[0], f, vec ); + VectorMA( vec, offsetFirst[1], r, vec ); + VectorMA( vec, offsetFirst[2], u, vec ); + + G_SetOrigin( podium1, vec ); + } + + if( podium2 ) { + VectorSubtract( level.intermission_origin, podium->r.currentOrigin, vec ); + vectoangles( vec, podium2->s.apos.trBase ); + podium2->s.apos.trBase[PITCH] = 0; + podium2->s.apos.trBase[ROLL] = 0; + + AngleVectors( podium2->s.apos.trBase, f, r, u ); + VectorMA( podium->r.currentOrigin, offsetSecond[0], f, vec ); + VectorMA( vec, offsetSecond[1], r, vec ); + VectorMA( vec, offsetSecond[2], u, vec ); + + G_SetOrigin( podium2, vec ); + } + + if( podium3 ) { + VectorSubtract( level.intermission_origin, podium->r.currentOrigin, vec ); + vectoangles( vec, podium3->s.apos.trBase ); + podium3->s.apos.trBase[PITCH] = 0; + podium3->s.apos.trBase[ROLL] = 0; + + AngleVectors( podium3->s.apos.trBase, f, r, u ); + VectorMA( podium->r.currentOrigin, offsetThird[0], f, vec ); + VectorMA( vec, offsetThird[1], r, vec ); + VectorMA( vec, offsetThird[2], u, vec ); + + G_SetOrigin( podium3, vec ); + } +} + + +static gentity_t *SpawnPodium( void ) { + gentity_t *podium; + vec3_t vec; + vec3_t origin; + + podium = G_Spawn(); + if ( !podium ) { + return NULL; + } + + podium->classname = "podium"; + podium->s.eType = ET_GENERAL; + podium->s.number = podium - g_entities; + podium->clipmask = CONTENTS_SOLID; + podium->r.contents = CONTENTS_SOLID; + podium->s.modelindex = G_ModelIndex( SP_PODIUM_MODEL ); + + AngleVectors( level.intermission_angle, vec, NULL, NULL ); + VectorMA( level.intermission_origin, trap_Cvar_VariableIntegerValue( "g_podiumDist" ), vec, origin ); + origin[2] -= trap_Cvar_VariableIntegerValue( "g_podiumDrop" ); + G_SetOrigin( podium, origin ); + + VectorSubtract( level.intermission_origin, podium->r.currentOrigin, vec ); + podium->s.apos.trBase[YAW] = vectoyaw( vec ); + trap_LinkEntity (podium); + + podium->think = PodiumPlacementThink; + podium->nextthink = level.time + 100; + return podium; +} + + + +//================== +//SpawnModelsOnVictoryPads +//================== + +void SpawnModelsOnVictoryPads( void ) { + gentity_t *player; + gentity_t *podium; + + podium1 = NULL; + podium2 = NULL; + podium3 = NULL; + + podium = SpawnPodium(); + + player = SpawnModelOnVictoryPad( podium, offsetFirst, &g_entities[level.sortedClients[0]], + level.clients[ level.sortedClients[0] ].ps.persistant[PERS_RANK] &~ RANK_TIED_FLAG ); + if ( player ) { + player->nextthink = level.time + 2000; + player->think = CelebrateStart; + podium1 = player; + } + + player = SpawnModelOnVictoryPad( podium, offsetSecond, &g_entities[level.sortedClients[1]], + level.clients[ level.sortedClients[1] ].ps.persistant[PERS_RANK] &~ RANK_TIED_FLAG ); + if ( player ) { + podium2 = player; + } + + if ( level.numNonSpectatorClients > 2 ) { + player = SpawnModelOnVictoryPad( podium, offsetThird, &g_entities[level.sortedClients[2]], + level.clients[ level.sortedClients[2] ].ps.persistant[PERS_RANK] &~ RANK_TIED_FLAG ); + if ( player ) { + podium3 = player; + } + } +} + + + +//=============== +//Svcmd_AbortPodium_f +//=============== + +void Svcmd_AbortPodium_f( void ) { + if( g_gametype.integer != GT_SINGLE_PLAYER ) { + return; + } + + if( podium1 ) { + podium1->nextthink = level.time; + podium1->think = CelebrateStop; + } +} +*/ \ No newline at end of file diff --git a/code/game/g_bot.c b/code/game/g_bot.c new file mode 100644 index 0000000..9f6934a --- /dev/null +++ b/code/game/g_bot.c @@ -0,0 +1,1195 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +// g_bot.c + +#include "g_local.h" + + +static int g_numBots; +static char *g_botInfos[MAX_BOTS]; + + +int g_numArenas; +static char *g_arenaInfos[MAX_ARENAS]; + + +#define BOT_BEGIN_DELAY_BASE 2000 +#define BOT_BEGIN_DELAY_INCREMENT 1500 + +#define BOT_SPAWN_QUEUE_DEPTH 16 + +typedef struct { + int clientNum; + int spawnTime; +} botSpawnQueue_t; + +//static int botBeginDelay = 0; // bk001206 - unused, init +static botSpawnQueue_t botSpawnQueue[BOT_SPAWN_QUEUE_DEPTH]; + +vmCvar_t bot_minplayers; + +extern gentity_t *podium1; +extern gentity_t *podium2; +extern gentity_t *podium3; + +float trap_Cvar_VariableValue( const char *var_name ) { + char buf[128]; + + trap_Cvar_VariableStringBuffer(var_name, buf, sizeof(buf)); + return atof(buf); +} + + + +/* +=============== +G_ParseInfos +=============== +*/ +int G_ParseInfos( char *buf, int max, char *infos[] ) { + char *token; + int count; + char key[MAX_TOKEN_CHARS]; + char info[MAX_INFO_STRING]; + + count = 0; + + while ( 1 ) { + token = COM_Parse( (const char **)(&buf) ); + if ( !token[0] ) { + break; + } + if ( strcmp( token, "{" ) ) { + Com_Printf( "Missing { in info file\n" ); + break; + } + + if ( count == max ) { + Com_Printf( "Max infos exceeded\n" ); + break; + } + + info[0] = '\0'; + while ( 1 ) { + token = COM_ParseExt( (const char **)(&buf), qtrue ); + if ( !token[0] ) { + Com_Printf( "Unexpected end of info file\n" ); + break; + } + if ( !strcmp( token, "}" ) ) { + break; + } + Q_strncpyz( key, token, sizeof( key ) ); + + token = COM_ParseExt( (const char **)(&buf), qfalse ); + if ( !token[0] ) { + strcpy( token, "" ); + } + Info_SetValueForKey( info, key, token ); + } + //NOTE: extra space for arena number + infos[count] = G_Alloc(strlen(info) + strlen("\\num\\") + strlen(va("%d", MAX_ARENAS)) + 1); + if (infos[count]) { + strcpy(infos[count], info); + count++; + } + } + return count; +} + +/* +=============== +G_LoadArenasFromFile +=============== +*/ +static void G_LoadArenasFromFile( char *filename ) { + int len; + fileHandle_t f; + char buf[MAX_ARENAS_TEXT]; + + len = trap_FS_FOpenFile( filename, &f, FS_READ ); + if ( !f ) { + trap_Printf( va( S_COLOR_RED "file not found: %s\n", filename ) ); + return; + } + if ( len >= MAX_ARENAS_TEXT ) { + trap_Printf( va( S_COLOR_RED "file too large: %s is %i, max allowed is %i", filename, len, MAX_ARENAS_TEXT ) ); + trap_FS_FCloseFile( f ); + return; + } + + trap_FS_Read( buf, len, f ); + buf[len] = 0; + trap_FS_FCloseFile( f ); + + g_numArenas += G_ParseInfos( buf, MAX_ARENAS - g_numArenas, &g_arenaInfos[g_numArenas] ); +} + +int G_GetMapTypeBits(char *type) +{ + int typeBits = 0; + + if( *type ) { + if( strstr( type, "ffa" ) ) { + typeBits |= (1 << GT_FFA); + typeBits |= (1 << GT_TEAM); + } + if( strstr( type, "holocron" ) ) { + typeBits |= (1 << GT_HOLOCRON); + } + if( strstr( type, "jedimaster" ) ) { + typeBits |= (1 << GT_JEDIMASTER); + } + if( strstr( type, "duel" ) ) { + typeBits |= (1 << GT_TOURNAMENT); + } + if( strstr( type, "saga" ) ) { + typeBits |= (1 << GT_SAGA); + } + if( strstr( type, "ctf" ) ) { + typeBits |= (1 << GT_CTF); + } + if( strstr( type, "cty" ) ) { + typeBits |= (1 << GT_CTY); + } + } else { + typeBits |= (1 << GT_FFA); + } + + return typeBits; +} + +qboolean G_DoesMapSupportGametype(const char *mapname, int gametype) +{ + int typeBits = 0; + int thisLevel = -1; + int n = 0; + char *type = NULL; + + if (!g_arenaInfos[0]) + { + return qfalse; + } + + if (!mapname || !mapname[0]) + { + return qfalse; + } + + for( n = 0; n < g_numArenas; n++ ) + { + type = Info_ValueForKey( g_arenaInfos[n], "map" ); + + if (Q_stricmp(mapname, type) == 0) + { + thisLevel = n; + break; + } + } + + if (thisLevel == -1) + { + return qfalse; + } + + type = Info_ValueForKey(g_arenaInfos[thisLevel], "type"); + + typeBits = G_GetMapTypeBits(type); + if (typeBits & (1 << gametype)) + { //the map in question supports the gametype in question, so.. + return qtrue; + } + + return qfalse; +} + +//rww - auto-obtain nextmap. I could've sworn Q3 had something like this, but I guess not. +const char *G_RefreshNextMap(int gametype, qboolean forced) +{ + int typeBits = 0; + int thisLevel = 0; + int desiredMap = 0; + int n = 0; + char *type = NULL; + qboolean loopingUp = qfalse; + vmCvar_t mapname; + + if (!g_autoMapCycle.integer && !forced) + { + return NULL; + } + + if (!g_arenaInfos[0]) + { + return NULL; + } + + trap_Cvar_Register( &mapname, "mapname", "", CVAR_SERVERINFO | CVAR_ROM ); + for( n = 0; n < g_numArenas; n++ ) + { + type = Info_ValueForKey( g_arenaInfos[n], "map" ); + + if (Q_stricmp(mapname.string, type) == 0) + { + thisLevel = n; + break; + } + } + + desiredMap = thisLevel; + + n = thisLevel+1; + while (n != thisLevel) + { //now cycle through the arena list and find the next map that matches the gametype we're in + if (!g_arenaInfos[n] || n >= g_numArenas) + { + if (loopingUp) + { //this shouldn't happen, but if it does we have a null entry break in the arena file + //if this is the case just break out of the loop instead of sticking in an infinite loop + break; + } + n = 0; + loopingUp = qtrue; + } + + type = Info_ValueForKey(g_arenaInfos[n], "type"); + + typeBits = G_GetMapTypeBits(type); + if (typeBits & (1 << gametype)) + { + desiredMap = n; + break; + } + + n++; + } + + if (desiredMap == thisLevel) + { //If this is the only level for this game mode or we just can't find a map for this game mode, then nextmap + //will always restart. + trap_Cvar_Set( "nextmap", "map_restart 0"); + } + else + { //otherwise we have a valid nextmap to cycle to, so use it. + type = Info_ValueForKey( g_arenaInfos[desiredMap], "map" ); + trap_Cvar_Set( "nextmap", va("map %s", type)); + } + + return Info_ValueForKey( g_arenaInfos[desiredMap], "map" ); +} + +/* +=============== +G_LoadArenas +=============== +*/ +static void G_LoadArenas( void ) { + int numdirs; + vmCvar_t arenasFile; + char filename[128]; + char dirlist[1024]; + char* dirptr; + int i, n; + int dirlen; + + g_numArenas = 0; + + trap_Cvar_Register( &arenasFile, "g_arenasFile", "", CVAR_INIT|CVAR_ROM ); + if( *arenasFile.string ) { + G_LoadArenasFromFile(arenasFile.string); + } + else { + G_LoadArenasFromFile("scripts/arenas.txt"); + } + + // get all arenas from .arena files + numdirs = trap_FS_GetFileList("scripts", ".arena", dirlist, 1024 ); + dirptr = dirlist; + for (i = 0; i < numdirs; i++, dirptr += dirlen+1) { + dirlen = strlen(dirptr); + strcpy(filename, "scripts/"); + strcat(filename, dirptr); + G_LoadArenasFromFile(filename); + } + trap_Printf( va( "%i arenas parsed\n", g_numArenas ) ); + + for( n = 0; n < g_numArenas; n++ ) { + Info_SetValueForKey( g_arenaInfos[n], "num", va( "%i", n ) ); + } + + G_RefreshNextMap(g_gametype.integer, qfalse); +} + + +/* +=============== +G_GetArenaInfoByNumber +=============== +*/ +const char *G_GetArenaInfoByMap( const char *map ) { + int n; + + for( n = 0; n < g_numArenas; n++ ) { + if( Q_stricmp( Info_ValueForKey( g_arenaInfos[n], "map" ), map ) == 0 ) { + return g_arenaInfos[n]; + } + } + + return NULL; +} + +#if 0 +/* +================= +PlayerIntroSound +================= +*/ +static void PlayerIntroSound( const char *modelAndSkin ) { + char model[MAX_QPATH]; + char *skin; + + Q_strncpyz( model, modelAndSkin, sizeof(model) ); + skin = Q_strrchr( model, '/' ); + if ( skin ) { + *skin++ = '\0'; + } + else { + skin = model; + } + + if( Q_stricmp( skin, "default" ) == 0 ) { + skin = model; + } + + trap_SendConsoleCommand( EXEC_APPEND, va( "play sound/player/announce/%s.wav\n", skin ) ); +} +#endif + +/* +=============== +G_AddRandomBot +=============== +*/ +void G_AddRandomBot( int team ) { + int i, n, num; + float skill; + char *value, netname[36], *teamstr; + gclient_t *cl; + + num = 0; + for ( n = 0; n < g_numBots ; n++ ) { + value = Info_ValueForKey( g_botInfos[n], "name" ); + // + for ( i=0 ; i< g_maxclients.integer ; i++ ) { + cl = level.clients + i; + if ( cl->pers.connected != CON_CONNECTED ) { + continue; + } + if ( !(g_entities[cl->ps.clientNum].r.svFlags & SVF_BOT) ) { + continue; + } + if ( team >= 0 && cl->sess.sessionTeam != team ) { + continue; + } + if ( !Q_stricmp( value, cl->pers.netname ) ) { + break; + } + } + if (i >= g_maxclients.integer) { + num++; + } + } + num = random() * num; + for ( n = 0; n < g_numBots ; n++ ) { + value = Info_ValueForKey( g_botInfos[n], "name" ); + // + for ( i=0 ; i< g_maxclients.integer ; i++ ) { + cl = level.clients + i; + if ( cl->pers.connected != CON_CONNECTED ) { + continue; + } + if ( !(g_entities[cl->ps.clientNum].r.svFlags & SVF_BOT) ) { + continue; + } + if ( team >= 0 && cl->sess.sessionTeam != team ) { + continue; + } + if ( !Q_stricmp( value, cl->pers.netname ) ) { + break; + } + } + if (i >= g_maxclients.integer) { + num--; + if (num <= 0) { + skill = trap_Cvar_VariableValue( "g_spSkill" ); + if (team == TEAM_RED) teamstr = "red"; + else if (team == TEAM_BLUE) teamstr = "blue"; + else teamstr = ""; + strncpy(netname, value, sizeof(netname)-1); + netname[sizeof(netname)-1] = '\0'; + Q_CleanStr(netname); + trap_SendConsoleCommand( EXEC_INSERT, va("addbot %s %f %s %i\n", netname, skill, teamstr, 0) ); + return; + } + } + } +} + +/* +=============== +G_RemoveRandomBot +=============== +*/ +int G_RemoveRandomBot( int team ) { + int i; + char netname[36]; + gclient_t *cl; + + for ( i=0 ; i< g_maxclients.integer ; i++ ) { + cl = level.clients + i; + if ( cl->pers.connected != CON_CONNECTED ) { + continue; + } + if ( !(g_entities[cl->ps.clientNum].r.svFlags & SVF_BOT) ) { + continue; + } + //[BugFix9] + if ( cl->sess.sessionTeam == TEAM_SPECTATOR + && cl->sess.spectatorState == SPECTATOR_FOLLOW ) + {//this entity is actually following another entity so the ps data is for a + //different entity. Bots never spectate like this so, skip this player. + continue; + } + //[/BugFix9] + if ( team >= 0 && cl->sess.sessionTeam != team ) { + continue; + } + strcpy(netname, cl->pers.netname); + Q_CleanStr(netname); + trap_SendConsoleCommand( EXEC_INSERT, va("kick %s\n", netname) ); + return qtrue; + } + return qfalse; +} + +/* +=============== +G_CountHumanPlayers +=============== +*/ +int G_CountHumanPlayers( int team ) { + int i, num; + gclient_t *cl; + + num = 0; + for ( i=0 ; i< g_maxclients.integer ; i++ ) { + cl = level.clients + i; + if ( cl->pers.connected != CON_CONNECTED ) { + continue; + } + //[BugFix17] + //can't use cl->ps.clientNum since the ps.clientNum might be for the clientNum of the player that this client is specing. + if ( g_entities[i].r.svFlags & SVF_BOT ) { + //if ( g_entities[cl->ps.clientNum].r.svFlags & SVF_BOT ) { + //[/BugFix17] + continue; + } + if ( team >= 0 && cl->sess.sessionTeam != team ) { + continue; + } + num++; + } + return num; +} + +/* +=============== +G_CountBotPlayers +=============== +*/ +int G_CountBotPlayers( int team ) { + int i, n, num; + gclient_t *cl; + + num = 0; + for ( i=0 ; i< g_maxclients.integer ; i++ ) { + cl = level.clients + i; + if ( cl->pers.connected != CON_CONNECTED ) { + continue; + } + //[BugFix17] + //can't use cl->ps.clientNum since the ps.clientNum might be for the clientNum of the player that this client is specing. + if ( !(g_entities[i].r.svFlags & SVF_BOT) ) { + //if ( !(g_entities[cl->ps.clientNum].r.svFlags & SVF_BOT) ) { + continue; + } + //[/BugFix17] + if ( team >= 0 && cl->sess.sessionTeam != team ) { + continue; + } + num++; + } + for( n = 0; n < BOT_SPAWN_QUEUE_DEPTH; n++ ) { + if( !botSpawnQueue[n].spawnTime ) { + continue; + } + if ( botSpawnQueue[n].spawnTime > level.time ) { + continue; + } + num++; + } + return num; +} + +/* +=============== +G_CheckMinimumPlayers +=============== +*/ +void G_CheckMinimumPlayers( void ) { + int minplayers; + int humanplayers, botplayers; + static int checkminimumplayers_time; + + if (level.intermissiontime) return; + //only check once each 10 seconds + if (checkminimumplayers_time > level.time - 10000) { + return; + } + checkminimumplayers_time = level.time; + trap_Cvar_Update(&bot_minplayers); + minplayers = bot_minplayers.integer; + if (minplayers <= 0) return; + + if (g_gametype.integer >= GT_TEAM) { + if (minplayers >= g_maxclients.integer / 2) { + minplayers = (g_maxclients.integer / 2) -1; + } + + humanplayers = G_CountHumanPlayers( TEAM_RED ); + botplayers = G_CountBotPlayers( TEAM_RED ); + // + if (humanplayers + botplayers < minplayers) { + G_AddRandomBot( TEAM_RED ); + } else if (humanplayers + botplayers > minplayers && botplayers) { + G_RemoveRandomBot( TEAM_RED ); + } + // + humanplayers = G_CountHumanPlayers( TEAM_BLUE ); + botplayers = G_CountBotPlayers( TEAM_BLUE ); + // + if (humanplayers + botplayers < minplayers) { + G_AddRandomBot( TEAM_BLUE ); + } else if (humanplayers + botplayers > minplayers && botplayers) { + G_RemoveRandomBot( TEAM_BLUE ); + } + } + else if (g_gametype.integer == GT_TOURNAMENT ) { + if (minplayers >= g_maxclients.integer) { + minplayers = g_maxclients.integer-1; + } + humanplayers = G_CountHumanPlayers( -1 ); + botplayers = G_CountBotPlayers( -1 ); + // + if (humanplayers + botplayers < minplayers) { + G_AddRandomBot( TEAM_FREE ); + } else if (humanplayers + botplayers > minplayers && botplayers) { + // try to remove spectators first + if (!G_RemoveRandomBot( TEAM_SPECTATOR )) { + // just remove the bot that is playing + G_RemoveRandomBot( -1 ); + } + } + } + else if (g_gametype.integer == GT_FFA) { + if (minplayers >= g_maxclients.integer) { + minplayers = g_maxclients.integer-1; + } + humanplayers = G_CountHumanPlayers( TEAM_FREE ); + botplayers = G_CountBotPlayers( TEAM_FREE ); + // + if (humanplayers + botplayers < minplayers) { + G_AddRandomBot( TEAM_FREE ); + } else if (humanplayers + botplayers > minplayers && botplayers) { + G_RemoveRandomBot( TEAM_FREE ); + } + } + else if (g_gametype.integer == GT_HOLOCRON || g_gametype.integer == GT_JEDIMASTER) { + if (minplayers >= g_maxclients.integer) { + minplayers = g_maxclients.integer-1; + } + humanplayers = G_CountHumanPlayers( TEAM_FREE ); + botplayers = G_CountBotPlayers( TEAM_FREE ); + // + if (humanplayers + botplayers < minplayers) { + G_AddRandomBot( TEAM_FREE ); + } else if (humanplayers + botplayers > minplayers && botplayers) { + G_RemoveRandomBot( TEAM_FREE ); + } + } +} + +/* +=============== +G_CheckBotSpawn +=============== +*/ +void G_CheckBotSpawn( void ) { + int n; + + G_CheckMinimumPlayers(); + + for( n = 0; n < BOT_SPAWN_QUEUE_DEPTH; n++ ) { + if( !botSpawnQueue[n].spawnTime ) { + continue; + } + if ( botSpawnQueue[n].spawnTime > level.time ) { + continue; + } + ClientBegin( botSpawnQueue[n].clientNum, qfalse ); + botSpawnQueue[n].spawnTime = 0; + + /* + if( g_gametype.integer == GT_SINGLE_PLAYER ) { + trap_GetUserinfo( botSpawnQueue[n].clientNum, userinfo, sizeof(userinfo) ); + PlayerIntroSound( Info_ValueForKey (userinfo, "model") ); + } + */ + } +} + + +/* +=============== +AddBotToSpawnQueue +=============== +*/ +static void AddBotToSpawnQueue( int clientNum, int delay ) { + int n; + + for( n = 0; n < BOT_SPAWN_QUEUE_DEPTH; n++ ) { + if( !botSpawnQueue[n].spawnTime ) { + botSpawnQueue[n].spawnTime = level.time + delay; + botSpawnQueue[n].clientNum = clientNum; + return; + } + } + + G_Printf( S_COLOR_YELLOW "Unable to delay spawn\n" ); + ClientBegin( clientNum, qfalse ); +} + + +/* +=============== +G_RemoveQueuedBotBegin + +Called on client disconnect to make sure the delayed spawn +doesn't happen on a freed index +=============== +*/ +void G_RemoveQueuedBotBegin( int clientNum ) { + int n; + + for( n = 0; n < BOT_SPAWN_QUEUE_DEPTH; n++ ) { + if( botSpawnQueue[n].clientNum == clientNum ) { + botSpawnQueue[n].spawnTime = 0; + return; + } + } +} + + +/* +=============== +G_BotConnect +=============== +*/ +qboolean G_BotConnect( int clientNum, qboolean restart ) { + bot_settings_t settings; + char userinfo[MAX_INFO_STRING]; + + trap_GetUserinfo( clientNum, userinfo, sizeof(userinfo) ); + + Q_strncpyz( settings.personalityfile, Info_ValueForKey( userinfo, "personality" ), sizeof(settings.personalityfile) ); + settings.skill = atof( Info_ValueForKey( userinfo, "skill" ) ); + Q_strncpyz( settings.team, Info_ValueForKey( userinfo, "team" ), sizeof(settings.team) ); + + if (!BotAISetupClient( clientNum, &settings, restart )) { + trap_DropClient( clientNum, "BotAISetupClient failed" ); + return qfalse; + } + + return qtrue; +} + + +/* +=============== +G_AddBot +=============== +*/ +static void G_AddBot( const char *name, float skill, const char *team, int delay, char *altname) { + int clientNum; + char *botinfo; + gentity_t *bot; + char *key; + char *s; + char *botname; + char *model; +// char *headmodel; + char userinfo[MAX_INFO_STRING]; + int preTeam = 0; + + // get the botinfo from bots.txt + botinfo = G_GetBotInfoByName( name ); + if ( !botinfo ) { + G_Printf( S_COLOR_RED "Error: Bot '%s' not defined\n", name ); + return; + } + + // create the bot's userinfo + userinfo[0] = '\0'; + + botname = Info_ValueForKey( botinfo, "funname" ); + if( !botname[0] ) { + botname = Info_ValueForKey( botinfo, "name" ); + } + // check for an alternative name + if (altname && altname[0]) { + botname = altname; + } + Info_SetValueForKey( userinfo, "name", botname ); + Info_SetValueForKey( userinfo, "rate", "25000" ); + Info_SetValueForKey( userinfo, "snaps", "20" ); + Info_SetValueForKey( userinfo, "skill", va("%1.2f", skill) ); + + if ( skill >= 1 && skill < 2 ) { + Info_SetValueForKey( userinfo, "handicap", "50" ); + } + else if ( skill >= 2 && skill < 3 ) { + Info_SetValueForKey( userinfo, "handicap", "70" ); + } + else if ( skill >= 3 && skill < 4 ) { + Info_SetValueForKey( userinfo, "handicap", "90" ); + } + + key = "model"; + model = Info_ValueForKey( botinfo, key ); + if ( !*model ) { + model = "visor/default"; + } + Info_SetValueForKey( userinfo, key, model ); + key = "team_model"; + Info_SetValueForKey( userinfo, key, model ); + +/* key = "headmodel"; + headmodel = Info_ValueForKey( botinfo, key ); + if ( !*headmodel ) { + headmodel = model; + } + Info_SetValueForKey( userinfo, key, headmodel ); + key = "team_headmodel"; + Info_SetValueForKey( userinfo, key, headmodel ); +*/ + key = "gender"; + s = Info_ValueForKey( botinfo, key ); + if ( !*s ) { + s = "male"; + } + Info_SetValueForKey( userinfo, "sex", s ); + + key = "color1"; + s = Info_ValueForKey( botinfo, key ); + if ( !*s ) { + s = "4"; + } + Info_SetValueForKey( userinfo, key, s ); + + key = "color2"; + s = Info_ValueForKey( botinfo, key ); + if ( !*s ) { + s = "5"; + } + Info_SetValueForKey( userinfo, key, s ); + + s = Info_ValueForKey(botinfo, "personality"); + if (!*s ) + { + Info_SetValueForKey( userinfo, "personality", "botfiles/default.jkb" ); + } + else + { + Info_SetValueForKey( userinfo, "personality", s ); + } + + // have the server allocate a client slot + clientNum = trap_BotAllocateClient(); + if ( clientNum == -1 ) { +// G_Printf( S_COLOR_RED "Unable to add bot. All player slots are in use.\n" ); +// G_Printf( S_COLOR_RED "Start server with more 'open' slots.\n" ); + trap_SendServerCommand( -1, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "UNABLE_TO_ADD_BOT"))); + return; + } + + // initialize the bot settings + if( !team || !*team ) { + if( g_gametype.integer >= GT_TEAM ) { + if( PickTeam(clientNum) == TEAM_RED) { + team = "red"; + } + else { + team = "blue"; + } + } + else { + team = "red"; + } + } +// Info_SetValueForKey( userinfo, "characterfile", Info_ValueForKey( botinfo, "aifile" ) ); + Info_SetValueForKey( userinfo, "skill", va( "%5.2f", skill ) ); + Info_SetValueForKey( userinfo, "team", team ); + + bot = &g_entities[ clientNum ]; + bot->r.svFlags |= SVF_BOT; + bot->inuse = qtrue; + + // register the userinfo + trap_SetUserinfo( clientNum, userinfo ); + + if (g_gametype.integer >= GT_TEAM) + { + if (team && Q_stricmp(team, "red") == 0) + { + bot->client->sess.sessionTeam = TEAM_RED; + } + else if (team && Q_stricmp(team, "blue") == 0) + { + bot->client->sess.sessionTeam = TEAM_BLUE; + } + else + { + bot->client->sess.sessionTeam = PickTeam( -1 ); + } + } + + preTeam = bot->client->sess.sessionTeam; + + // have it connect to the game as a normal client + if ( ClientConnect( clientNum, qtrue, qtrue ) ) { + return; + } + + if (bot->client->sess.sessionTeam != preTeam) + { + trap_GetUserinfo(clientNum, userinfo, MAX_INFO_STRING); + + if (bot->client->sess.sessionTeam == TEAM_SPECTATOR) + { + bot->client->sess.sessionTeam = preTeam; + } + + if (bot->client->sess.sessionTeam == TEAM_RED) + { + team = "Red"; + } + else + { + team = "Blue"; + } + + Info_SetValueForKey( userinfo, "team", team ); + + trap_SetUserinfo( clientNum, userinfo ); + + bot->client->ps.persistant[ PERS_TEAM ] = bot->client->sess.sessionTeam; + + G_ReadSessionData( bot->client ); + ClientUserinfoChanged( clientNum ); + } + + if( delay == 0 ) { + ClientBegin( clientNum, qfalse ); + return; + } + + AddBotToSpawnQueue( clientNum, delay ); +} + + +/* +=============== +Svcmd_AddBot_f +=============== +*/ +void Svcmd_AddBot_f( void ) { + float skill; + int delay; + char name[MAX_TOKEN_CHARS]; + char altname[MAX_TOKEN_CHARS]; + char string[MAX_TOKEN_CHARS]; + char team[MAX_TOKEN_CHARS]; + + // are bots enabled? + if ( !trap_Cvar_VariableIntegerValue( "bot_enable" ) ) { + return; + } + + // name + trap_Argv( 1, name, sizeof( name ) ); + if ( !name[0] ) { + trap_Printf( "Usage: Addbot [skill 1-5] [team] [msec delay] [altname]\n" ); + return; + } + + // skill + trap_Argv( 2, string, sizeof( string ) ); + if ( !string[0] ) { + skill = 4; + } + else { + skill = atof( string ); + } + + // team + trap_Argv( 3, team, sizeof( team ) ); + + // delay + trap_Argv( 4, string, sizeof( string ) ); + if ( !string[0] ) { + delay = 0; + } + else { + delay = atoi( string ); + } + + // alternative name + trap_Argv( 5, altname, sizeof( altname ) ); + + G_AddBot( name, skill, team, delay, altname ); + + // if this was issued during gameplay and we are playing locally, + // go ahead and load the bot's media immediately + if ( level.time - level.startTime > 1000 && + trap_Cvar_VariableIntegerValue( "cl_running" ) ) { + trap_SendServerCommand( -1, "loaddefered\n" ); // FIXME: spelled wrong, but not changing for demo + } +} + +/* +=============== +Svcmd_BotList_f +=============== +*/ +void Svcmd_BotList_f( void ) { + int i; + char name[MAX_TOKEN_CHARS]; + char funname[MAX_TOKEN_CHARS]; + char model[MAX_TOKEN_CHARS]; + char personality[MAX_TOKEN_CHARS]; + + trap_Printf("^1name model personality funname\n"); + for (i = 0; i < g_numBots; i++) { + strcpy(name, Info_ValueForKey( g_botInfos[i], "name" )); + if ( !*name ) { + strcpy(name, "Padawan"); + } + strcpy(funname, Info_ValueForKey( g_botInfos[i], "funname" )); + if ( !*funname ) { + strcpy(funname, ""); + } + strcpy(model, Info_ValueForKey( g_botInfos[i], "model" )); + if ( !*model ) { + strcpy(model, "visor/default"); + } + strcpy(personality, Info_ValueForKey( g_botInfos[i], "personality")); + if (!*personality ) { + strcpy(personality, "botfiles/default.jkb"); + } + trap_Printf(va("%-16s %-16s %-20s %-20s\n", name, model, personality, funname)); + } +} + +#if 0 +/* +=============== +G_SpawnBots +=============== +*/ +static void G_SpawnBots( char *botList, int baseDelay ) { + char *bot; + char *p; + float skill; + int delay; + char bots[MAX_INFO_VALUE]; + + podium1 = NULL; + podium2 = NULL; + podium3 = NULL; + + skill = trap_Cvar_VariableValue( "g_spSkill" ); + if( skill < 1 ) { + trap_Cvar_Set( "g_spSkill", "1" ); + skill = 1; + } + else if ( skill > 5 ) { + trap_Cvar_Set( "g_spSkill", "5" ); + skill = 5; + } + + Q_strncpyz( bots, botList, sizeof(bots) ); + p = &bots[0]; + delay = baseDelay; + while( *p ) { + //skip spaces + while( *p && *p == ' ' ) { + p++; + } + if( !p ) { + break; + } + + // mark start of bot name + bot = p; + + // skip until space of null + while( *p && *p != ' ' ) { + p++; + } + if( *p ) { + *p++ = 0; + } + + // we must add the bot this way, calling G_AddBot directly at this stage + // does "Bad Things" + trap_SendConsoleCommand( EXEC_INSERT, va("addbot %s %f free %i\n", bot, skill, delay) ); + + delay += BOT_BEGIN_DELAY_INCREMENT; + } +} +#endif + + +/* +=============== +G_LoadBotsFromFile +=============== +*/ +static void G_LoadBotsFromFile( char *filename ) { + int len; + fileHandle_t f; + char buf[MAX_BOTS_TEXT]; + + len = trap_FS_FOpenFile( filename, &f, FS_READ ); + if ( !f ) { + trap_Printf( va( S_COLOR_RED "file not found: %s\n", filename ) ); + return; + } + if ( len >= MAX_BOTS_TEXT ) { + trap_Printf( va( S_COLOR_RED "file too large: %s is %i, max allowed is %i", filename, len, MAX_BOTS_TEXT ) ); + trap_FS_FCloseFile( f ); + return; + } + + trap_FS_Read( buf, len, f ); + buf[len] = 0; + trap_FS_FCloseFile( f ); + + g_numBots += G_ParseInfos( buf, MAX_BOTS - g_numBots, &g_botInfos[g_numBots] ); +} + +/* +=============== +G_LoadBots +=============== +*/ +static void G_LoadBots( void ) { + vmCvar_t botsFile; + int numdirs; + char filename[128]; + char dirlist[1024]; + char* dirptr; + int i; + int dirlen; + + if ( !trap_Cvar_VariableIntegerValue( "bot_enable" ) ) { + return; + } + + g_numBots = 0; + + trap_Cvar_Register( &botsFile, "g_botsFile", "", CVAR_INIT|CVAR_ROM ); + if( *botsFile.string ) { + G_LoadBotsFromFile(botsFile.string); + } + else { + //G_LoadBotsFromFile("scripts/bots.txt"); + G_LoadBotsFromFile("botfiles/bots.txt"); + } + + // get all bots from .bot files + numdirs = trap_FS_GetFileList("scripts", ".bot", dirlist, 1024 ); + dirptr = dirlist; + for (i = 0; i < numdirs; i++, dirptr += dirlen+1) { + dirlen = strlen(dirptr); + strcpy(filename, "scripts/"); + strcat(filename, dirptr); + G_LoadBotsFromFile(filename); + } + trap_Printf( va( "%i bots parsed\n", g_numBots ) ); +} + + + +/* +=============== +G_GetBotInfoByNumber +=============== +*/ +char *G_GetBotInfoByNumber( int num ) { + if( num < 0 || num >= g_numBots ) { + trap_Printf( va( S_COLOR_RED "Invalid bot number: %i\n", num ) ); + return NULL; + } + return g_botInfos[num]; +} + + +/* +=============== +G_GetBotInfoByName +=============== +*/ +char *G_GetBotInfoByName( const char *name ) { + int n; + char *value; + + for ( n = 0; n < g_numBots ; n++ ) { + value = Info_ValueForKey( g_botInfos[n], "name" ); + if ( !Q_stricmp( value, name ) ) { + return g_botInfos[n]; + } + } + + return NULL; +} + +//rww - pd +void LoadPath_ThisLevel(void); +//end rww + +/* +=============== +G_InitBots +=============== +*/ +void G_InitBots( qboolean restart ) { + G_LoadBots(); + G_LoadArenas(); + + trap_Cvar_Register( &bot_minplayers, "bot_minplayers", "0", CVAR_SERVERINFO ); + + //rww - new bot route stuff + LoadPath_ThisLevel(); + //end rww +} diff --git a/code/game/g_client.c b/code/game/g_client.c new file mode 100644 index 0000000..1f59cf5 --- /dev/null +++ b/code/game/g_client.c @@ -0,0 +1,2310 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +#include "g_local.h" +#include "..\ghoul2\g2.h" + +// g_client.c -- client functions that don't happen every frame + +static vec3_t playerMins = {-15, -15, DEFAULT_MINS_2}; +static vec3_t playerMaxs = {15, 15, DEFAULT_MAXS_2}; + +extern qboolean G_CheckMaxConnections( char *from ); + +forcedata_t Client_Force[MAX_CLIENTS]; + +/*QUAKED info_player_deathmatch (1 0 1) (-16 -16 -24) (16 16 32) initial +potential spawning position for deathmatch games. +The first time a player enters the game, they will be at an 'initial' spot. +Targets will be fired when someone spawns in on them. +"nobots" will prevent bots from using this spot. +"nohumans" will prevent non-bots from using this spot. +*/ +void SP_info_player_deathmatch( gentity_t *ent ) { + int i; + + G_SpawnInt( "nobots", "0", &i); + if ( i ) { + ent->flags |= FL_NO_BOTS; + } + G_SpawnInt( "nohumans", "0", &i ); + if ( i ) { + ent->flags |= FL_NO_HUMANS; + } +} + +/*QUAKED info_player_start (1 0 0) (-16 -16 -24) (16 16 32) +equivelant to info_player_deathmatch +*/ +void SP_info_player_start(gentity_t *ent) { + ent->classname = "info_player_deathmatch"; + SP_info_player_deathmatch( ent ); +} + +/*QUAKED info_player_imperial (1 0 0) (-16 -16 -24) (16 16 32) +saga start point - imperial +*/ +void SP_info_player_imperial(gentity_t *ent) { + if (g_gametype.integer != GT_SAGA) + { //turn into a DM spawn if not in saga game mode + ent->classname = "info_player_deathmatch"; + SP_info_player_deathmatch( ent ); + } +} + +/*QUAKED info_player_rebel (1 0 0) (-16 -16 -24) (16 16 32) +saga start point - rebel +*/ +void SP_info_player_rebel(gentity_t *ent) { + if (g_gametype.integer != GT_SAGA) + { //turn into a DM spawn if not in saga game mode + ent->classname = "info_player_deathmatch"; + SP_info_player_deathmatch( ent ); + } +} + +/*QUAKED info_player_intermission (1 0 1) (-16 -16 -24) (16 16 32) +The intermission will be viewed from this point. Target an info_notnull for the view direction. +*/ +void SP_info_player_intermission( gentity_t *ent ) { + +} + +#define JMSABER_RESPAWN_TIME 20000 //in case it gets stuck somewhere no one can reach + +void ThrowSaberToAttacker(gentity_t *self, gentity_t *attacker) +{ + gentity_t *ent = &g_entities[self->client->ps.saberIndex]; + vec3_t a; + int altVelocity = 0; + + if (!ent || ent->enemy != self) + { //something has gone very wrong (this should never happen) + //but in case it does.. find the saber manually +#ifdef _DEBUG + Com_Printf("Lost the saber! Attempting to use global pointer..\n"); +#endif + ent = gJMSaberEnt; + + if (!ent) + { +#ifdef _DEBUG + Com_Printf("The global pointer was NULL. This is a bad thing.\n"); +#endif + return; + } + +#ifdef _DEBUG + Com_Printf("Got it (%i). Setting enemy to client %i.\n", ent->s.number, self->s.number); +#endif + + ent->enemy = self; + self->client->ps.saberIndex = ent->s.number; + } + + trap_SetConfigstring ( CS_CLIENT_JEDIMASTER, "-1" ); + + if (attacker && attacker->client && self->client->ps.saberInFlight) + { //someone killed us and we had the saber thrown, so actually move this saber to the saber location + //if we killed ourselves with saber thrown, however, same suicide rules of respawning at spawn spot still + //apply. + gentity_t *flyingsaber = &g_entities[self->client->ps.saberEntityNum]; + + if (flyingsaber && flyingsaber->inuse) + { + VectorCopy(flyingsaber->s.pos.trBase, ent->s.pos.trBase); + VectorCopy(flyingsaber->s.pos.trDelta, ent->s.pos.trDelta); + VectorCopy(flyingsaber->s.apos.trBase, ent->s.apos.trBase); + VectorCopy(flyingsaber->s.apos.trDelta, ent->s.apos.trDelta); + + VectorCopy(flyingsaber->r.currentOrigin, ent->r.currentOrigin); + VectorCopy(flyingsaber->r.currentAngles, ent->r.currentAngles); + altVelocity = 1; + } + } + + self->client->ps.saberInFlight = qtrue; //say he threw it anyway in order to properly remove from dead body + + ent->s.modelindex = G_ModelIndex("models/weapons2/saber/saber_w.glm"); + ent->s.eFlags &= ~(EF_NODRAW); + ent->s.modelGhoul2 = 1; + ent->s.eType = ET_MISSILE; + ent->enemy = NULL; + + if (!attacker || !attacker->client) + { + VectorCopy(ent->s.origin2, ent->s.pos.trBase); + VectorCopy(ent->s.origin2, ent->s.origin); + VectorCopy(ent->s.origin2, ent->r.currentOrigin); + ent->pos2[0] = 0; + trap_LinkEntity(ent); + return; + } + + if (!altVelocity) + { + VectorCopy(self->s.pos.trBase, ent->s.pos.trBase); + VectorCopy(self->s.pos.trBase, ent->s.origin); + VectorCopy(self->s.pos.trBase, ent->r.currentOrigin); + + VectorSubtract(attacker->client->ps.origin, ent->s.pos.trBase, a); + + VectorNormalize(a); + + ent->s.pos.trDelta[0] = a[0]*256; + ent->s.pos.trDelta[1] = a[1]*256; + ent->s.pos.trDelta[2] = 256; + } + + trap_LinkEntity(ent); +} + +void JMSaberThink(gentity_t *ent) +{ + gJMSaberEnt = ent; + + if (ent->enemy) + { + if (!ent->enemy->client || !ent->enemy->inuse) + { //disconnected? + VectorCopy(ent->enemy->s.pos.trBase, ent->s.pos.trBase); + VectorCopy(ent->enemy->s.pos.trBase, ent->s.origin); + VectorCopy(ent->enemy->s.pos.trBase, ent->r.currentOrigin); + ent->s.modelindex = G_ModelIndex("models/weapons2/saber/saber_w.glm"); + ent->s.eFlags &= ~(EF_NODRAW); + ent->s.modelGhoul2 = 1; + ent->s.eType = ET_MISSILE; + ent->enemy = NULL; + + ent->pos2[0] = 1; + ent->pos2[1] = 0; //respawn next think + trap_LinkEntity(ent); + } + else + { + ent->pos2[1] = level.time + JMSABER_RESPAWN_TIME; + } + } + else if (ent->pos2[0] && ent->pos2[1] < level.time) + { + VectorCopy(ent->s.origin2, ent->s.pos.trBase); + VectorCopy(ent->s.origin2, ent->s.origin); + VectorCopy(ent->s.origin2, ent->r.currentOrigin); + ent->pos2[0] = 0; + trap_LinkEntity(ent); + } + + ent->nextthink = level.time + 50; + G_RunObject(ent); +} + +void JMSaberTouch(gentity_t *self, gentity_t *other, trace_t *trace) +{ + int i = 0; +// gentity_t *te; + + if (!other || !other->client || other->health < 1) + { + return; + } + + if (self->enemy) + { + return; + } + + if (!self->s.modelindex) + { + return; + } + + if (other->client->ps.stats[STAT_WEAPONS] & (1 << WP_SABER)) + { + return; + } + + if (other->client->ps.isJediMaster) + { + return; + } + + self->enemy = other; + other->client->ps.stats[STAT_WEAPONS] = (1 << WP_SABER); + other->client->ps.weapon = WP_SABER; + other->s.weapon = WP_SABER; + G_AddEvent(other, EV_BECOME_JEDIMASTER, 0); + + // Track the jedi master + trap_SetConfigstring ( CS_CLIENT_JEDIMASTER, va("%i", other->s.number ) ); + + if (g_spawnInvulnerability.integer) + { + other->client->ps.eFlags |= EF_INVULNERABLE; + other->client->invulnerableTimer = level.time + g_spawnInvulnerability.integer; + } + + trap_SendServerCommand( -1, va("cp \"%s %s\n\"", other->client->pers.netname, G_GetStripEdString("SVINGAME", "BECOMEJM")) ); + + other->client->ps.isJediMaster = qtrue; + other->client->ps.saberIndex = self->s.number; + + if (other->health < 200 && other->health > 0) + { //full health when you become the Jedi Master + other->client->ps.stats[STAT_HEALTH] = other->health = 200; + } + + if (other->client->ps.fd.forcePower < 100) + { + other->client->ps.fd.forcePower = 100; + } + + while (i < NUM_FORCE_POWERS) + { + other->client->ps.fd.forcePowersKnown |= (1 << i); + other->client->ps.fd.forcePowerLevel[i] = FORCE_LEVEL_3; + + i++; + } + + self->pos2[0] = 1; + self->pos2[1] = level.time + JMSABER_RESPAWN_TIME; + + self->s.modelindex = 0; + self->s.eFlags |= EF_NODRAW; + self->s.modelGhoul2 = 0; + self->s.eType = ET_GENERAL; + + /* + te = G_TempEntity( vec3_origin, EV_DESTROY_GHOUL2_INSTANCE ); + te->r.svFlags |= SVF_BROADCAST; + te->s.eventParm = self->s.number; + */ + G_KillG2Queue(self->s.number); + + return; +} + +gentity_t *gJMSaberEnt = NULL; + +/*QUAKED info_jedimaster_start (1 0 0) (-16 -16 -24) (16 16 32) +"jedi master" saber spawn point +*/ +void SP_info_jedimaster_start(gentity_t *ent) +{ + if (g_gametype.integer != GT_JEDIMASTER) + { + gJMSaberEnt = NULL; + G_FreeEntity(ent); + return; + } + + ent->enemy = NULL; + + ent->s.eFlags = EF_BOUNCE_HALF; + + ent->s.modelindex = G_ModelIndex("models/weapons2/saber/saber_w.glm"); + ent->s.modelGhoul2 = 1; + ent->s.g2radius = 20; + //ent->s.eType = ET_GENERAL; + ent->s.eType = ET_MISSILE; + ent->s.weapon = WP_SABER; + ent->s.pos.trType = TR_GRAVITY; + ent->s.pos.trTime = level.time; + VectorSet( ent->r.maxs, 3, 3, 3 ); + VectorSet( ent->r.mins, -3, -3, -3 ); + ent->r.contents = CONTENTS_TRIGGER; + ent->clipmask = MASK_SOLID; + + ent->isSaberEntity = qtrue; + + ent->bounceCount = -5; + + ent->physicsObject = qtrue; + + VectorCopy(ent->s.pos.trBase, ent->s.origin2); //remember the spawn spot + + ent->touch = JMSaberTouch; + + trap_LinkEntity(ent); + + ent->think = JMSaberThink; + ent->nextthink = level.time + 50; +} + +/* +======================================================================= + + SelectSpawnPoint + +======================================================================= +*/ + +/* +================ +SpotWouldTelefrag + +================ +*/ +qboolean SpotWouldTelefrag( gentity_t *spot ) { + int i, num; + int touch[MAX_GENTITIES]; + gentity_t *hit; + vec3_t mins, maxs; + + VectorAdd( spot->s.origin, playerMins, mins ); + VectorAdd( spot->s.origin, playerMaxs, maxs ); + num = trap_EntitiesInBox( mins, maxs, touch, MAX_GENTITIES ); + + for (i=0 ; iclient && hit->client->ps.stats[STAT_HEALTH] > 0 ) { + if ( hit->client) { + return qtrue; + } + + } + + return qfalse; +} + +/* +================ +SelectNearestDeathmatchSpawnPoint + +Find the spot that we DON'T want to use +================ +*/ +#define MAX_SPAWN_POINTS 128 +gentity_t *SelectNearestDeathmatchSpawnPoint( vec3_t from ) { + gentity_t *spot; + vec3_t delta; + float dist, nearestDist; + gentity_t *nearestSpot; + + nearestDist = 999999; + nearestSpot = NULL; + spot = NULL; + + while ((spot = G_Find (spot, FOFS(classname), "info_player_deathmatch")) != NULL) { + + VectorSubtract( spot->s.origin, from, delta ); + dist = VectorLength( delta ); + if ( dist < nearestDist ) { + nearestDist = dist; + nearestSpot = spot; + } + } + + return nearestSpot; +} + + +/* +================ +SelectRandomDeathmatchSpawnPoint + +go to a random point that doesn't telefrag +================ +*/ +#define MAX_SPAWN_POINTS 128 +gentity_t *SelectRandomDeathmatchSpawnPoint( void ) { + gentity_t *spot; + int count; + int selection; + gentity_t *spots[MAX_SPAWN_POINTS]; + + count = 0; + spot = NULL; + + while ((spot = G_Find (spot, FOFS(classname), "info_player_deathmatch")) != NULL) { + if ( SpotWouldTelefrag( spot ) ) { + continue; + } + spots[ count ] = spot; + count++; + } + + if ( !count ) { // no spots that won't telefrag + return G_Find( NULL, FOFS(classname), "info_player_deathmatch"); + } + + selection = rand() % count; + return spots[ selection ]; +} + +/* +=========== +SelectRandomFurthestSpawnPoint + +Chooses a player start, deathmatch start, etc +============ +*/ +gentity_t *SelectRandomFurthestSpawnPoint ( vec3_t avoidPoint, vec3_t origin, vec3_t angles ) { + gentity_t *spot; + vec3_t delta; + float dist; + float list_dist[64]; + gentity_t *list_spot[64]; + int numSpots, rnd, i, j; + + numSpots = 0; + spot = NULL; + + while ((spot = G_Find (spot, FOFS(classname), "info_player_deathmatch")) != NULL) { + if ( SpotWouldTelefrag( spot ) ) { + continue; + } + VectorSubtract( spot->s.origin, avoidPoint, delta ); + dist = VectorLength( delta ); + for (i = 0; i < numSpots; i++) { + if ( dist > list_dist[i] ) { + if ( numSpots >= 64 ) + numSpots = 64-1; + for (j = numSpots; j > i; j--) { + list_dist[j] = list_dist[j-1]; + list_spot[j] = list_spot[j-1]; + } + list_dist[i] = dist; + list_spot[i] = spot; + numSpots++; + if (numSpots > 64) + numSpots = 64; + break; + } + } + if (i >= numSpots && numSpots < 64) { + list_dist[numSpots] = dist; + list_spot[numSpots] = spot; + numSpots++; + } + } + if (!numSpots) { + spot = G_Find( NULL, FOFS(classname), "info_player_deathmatch"); + if (!spot) + G_Error( "Couldn't find a spawn point" ); + VectorCopy (spot->s.origin, origin); + origin[2] += 9; + VectorCopy (spot->s.angles, angles); + return spot; + } + + // select a random spot from the spawn points furthest away + rnd = random() * (numSpots / 2); + + VectorCopy (list_spot[rnd]->s.origin, origin); + origin[2] += 9; + VectorCopy (list_spot[rnd]->s.angles, angles); + + return list_spot[rnd]; +} + +/* +=========== + +G_FindClientByName - MJN + +============ +*/ +gclient_t *G_FindClientByName ( const char* name, int ignoreNum ) +{ + int i; + + for ( i = 0; i < level.numConnectedClients; i ++ ) + { + gentity_t* ent = &g_entities[level.sortedClients[i]]; + + if ( level.sortedClients[i] == ignoreNum ) + { + continue; + } + + if ( Q_stricmp ( name, ent->client->pers.netname ) == 0 ) + { + return ent->client; + } + } + + return NULL; +} + +/* +=========== +SelectSpawnPoint + +Chooses a player start, deathmatch start, etc +============ +*/ +gentity_t *SelectSpawnPoint ( vec3_t avoidPoint, vec3_t origin, vec3_t angles ) { + return SelectRandomFurthestSpawnPoint( avoidPoint, origin, angles ); + + /* + gentity_t *spot; + gentity_t *nearestSpot; + + nearestSpot = SelectNearestDeathmatchSpawnPoint( avoidPoint ); + + spot = SelectRandomDeathmatchSpawnPoint ( ); + if ( spot == nearestSpot ) { + // roll again if it would be real close to point of death + spot = SelectRandomDeathmatchSpawnPoint ( ); + if ( spot == nearestSpot ) { + // last try + spot = SelectRandomDeathmatchSpawnPoint ( ); + } + } + + // find a single player start spot + if (!spot) { + G_Error( "Couldn't find a spawn point" ); + } + + VectorCopy (spot->s.origin, origin); + origin[2] += 9; + VectorCopy (spot->s.angles, angles); + + return spot; + */ +} + +/* +=========== +SelectInitialSpawnPoint + +Try to find a spawn point marked 'initial', otherwise +use normal spawn selection. +============ +*/ +gentity_t *SelectInitialSpawnPoint( vec3_t origin, vec3_t angles ) { + gentity_t *spot; + + spot = NULL; + while ((spot = G_Find (spot, FOFS(classname), "info_player_deathmatch")) != NULL) { + if ( spot->spawnflags & 1 ) { + break; + } + } + + if ( !spot || SpotWouldTelefrag( spot ) ) { + return SelectSpawnPoint( vec3_origin, origin, angles ); + } + + VectorCopy (spot->s.origin, origin); + origin[2] += 9; + VectorCopy (spot->s.angles, angles); + + return spot; +} + +/* +=========== +SelectSpectatorSpawnPoint + +============ +*/ +gentity_t *SelectSpectatorSpawnPoint( vec3_t origin, vec3_t angles ) { + FindIntermissionPoint(); + + VectorCopy( level.intermission_origin, origin ); + VectorCopy( level.intermission_angle, angles ); + + return NULL; +} + +/* +======================================================================= + +BODYQUE + +======================================================================= +*/ + +/* +======================================================================= + +BODYQUE + +======================================================================= +*/ + +#define BODY_SINK_TIME 45000 + +/* +=============== +InitBodyQue +=============== +*/ +void InitBodyQue (void) { + int i; + gentity_t *ent; + + level.bodyQueIndex = 0; + for (i=0; iclassname = "bodyque"; + ent->neverFree = qtrue; + level.bodyQue[i] = ent; + } +} + +/* +============= +BodySink + +After sitting around for five seconds, fall into the ground and dissapear +============= +*/ +void BodySink( gentity_t *ent ) { + if ( level.time - ent->timestamp > BODY_SINK_TIME + 1500 ) { + // the body ques are never actually freed, they are just unlinked + trap_UnlinkEntity( ent ); + ent->physicsObject = qfalse; + return; + } + ent->nextthink = level.time + 100; + ent->s.pos.trBase[2] -= 1; +} + +/* +============= +CopyToBodyQue + +A player is respawning, so make an entity that looks +just like the existing corpse to leave behind. +============= +*/ +void CopyToBodyQue( gentity_t *ent ) { + gentity_t *body; + int contents; + + if (level.intermissiontime) + { + return; + } + + trap_UnlinkEntity (ent); + + // if client is in a nodrop area, don't leave the body + contents = trap_PointContents( ent->s.origin, -1 ); + if ( contents & CONTENTS_NODROP ) { + return; + } + + if (ent->client && (ent->client->ps.eFlags & EF_DISINTEGRATION)) + { //for now, just don't spawn a body if you got disint'd + return; + } + + // grab a body que and cycle to the next one + body = level.bodyQue[ level.bodyQueIndex ]; + level.bodyQueIndex = (level.bodyQueIndex + 1) % BODY_QUEUE_SIZE; + + trap_UnlinkEntity (body); + body->s = ent->s; + + //avoid oddly angled corpses floating around + body->s.angles[PITCH] = body->s.angles[ROLL] = body->s.apos.trBase[PITCH] = body->s.apos.trBase[ROLL] = 0; + + body->s.g2radius = 100; + + body->s.eType = ET_BODY; + body->s.eFlags = EF_DEAD; // clear EF_TALK, etc + + if (ent->client && (ent->client->ps.eFlags & EF_DISINTEGRATION)) + { + body->s.eFlags |= EF_DISINTEGRATION; + } + + VectorCopy(ent->client->ps.lastHitLoc, body->s.origin2); + + body->s.powerups = 0; // clear powerups + body->s.loopSound = 0; // clear lava burning + body->s.number = body - g_entities; + body->timestamp = level.time; + body->physicsObject = qtrue; + body->physicsBounce = 0; // don't bounce + if ( body->s.groundEntityNum == ENTITYNUM_NONE ) { + body->s.pos.trType = TR_GRAVITY; + body->s.pos.trTime = level.time; + VectorCopy( ent->client->ps.velocity, body->s.pos.trDelta ); + } else { + body->s.pos.trType = TR_STATIONARY; + } + body->s.event = 0; + + body->s.weapon = ent->s.bolt2; + + if (body->s.weapon == WP_SABER && ent->client->ps.saberInFlight) + { + body->s.weapon = WP_BLASTER; //lie to keep from putting a saber on the corpse, because it was thrown at death + } + + G_AddEvent(body, EV_BODY_QUEUE_COPY, ent->s.clientNum); + + body->r.svFlags = ent->r.svFlags | SVF_BROADCAST; + VectorCopy (ent->r.mins, body->r.mins); + VectorCopy (ent->r.maxs, body->r.maxs); + VectorCopy (ent->r.absmin, body->r.absmin); + VectorCopy (ent->r.absmax, body->r.absmax); + + body->s.torsoAnim = body->s.legsAnim = ent->client->ps.legsAnim & ~ANIM_TOGGLEBIT; + + body->clipmask = CONTENTS_SOLID | CONTENTS_PLAYERCLIP; + body->r.contents = CONTENTS_CORPSE; + body->r.ownerNum = ent->s.number; + + body->nextthink = level.time + BODY_SINK_TIME; + body->think = BodySink; + + body->die = body_die; + + // don't take more damage if already gibbed + if ( ent->health <= GIB_HEALTH ) { + body->takedamage = qfalse; + } else { + body->takedamage = qtrue; + } + + VectorCopy ( body->s.pos.trBase, body->r.currentOrigin ); + trap_LinkEntity (body); +} + +//====================================================================== + + +/* +================== +SetClientViewAngle + +================== +*/ +void SetClientViewAngle( gentity_t *ent, vec3_t angle ) { + int i; + + // set the delta angle + for (i=0 ; i<3 ; i++) { + int cmdAngle; + + cmdAngle = ANGLE2SHORT(angle[i]); + ent->client->ps.delta_angles[i] = cmdAngle - ent->client->pers.cmd.angles[i]; + } + VectorCopy( angle, ent->s.angles ); + VectorCopy (ent->s.angles, ent->client->ps.viewangles); +} + +/* +================ +respawn +================ +*/ +void respawn( gentity_t *ent ) { + gentity_t *tent; + int i, t; + int num = 999; + + CopyToBodyQue (ent); + + if (gEscaping) + { + ent->client->sess.sessionTeam = TEAM_SPECTATOR; + ent->client->sess.spectatorState = SPECTATOR_FREE; + ent->client->sess.spectatorClient = 0; + + ent->client->pers.teamState.state = TEAM_BEGIN; + } + + trap_UnlinkEntity (ent); + ClientSpawn(ent); + + // add a teleportation effect + tent = G_TempEntity( ent->client->ps.origin, EV_PLAYER_TELEPORT_IN ); + tent->s.clientNum = ent->s.clientNum; + + if (ent->client->pers.amempower == qtrue){ + ent->client->ps.isJediMaster = qtrue; + if ( g_gametype.integer >= GT_TEAM) { + ent->client->ps.fd.forcePowersKnown = ( 1 << FP_HEAL | 1 << FP_SPEED | 1 << FP_PUSH | 1 << FP_PULL | + 1 << FP_TELEPATHY | 1 << FP_GRIP | 1 << FP_LIGHTNING | 1 << FP_RAGE | + 1 << FP_PROTECT | 1 << FP_ABSORB | 1 << FP_TEAM_HEAL | 1 << FP_TEAM_FORCE | + 1 << FP_DRAIN | 1 << FP_SEE); + } + else{ + ent->client->ps.fd.forcePowersKnown = ( 1 << FP_HEAL | 1 << FP_SPEED | 1 << FP_PUSH | 1 << FP_PULL | + 1 << FP_TELEPATHY | 1 << FP_GRIP | 1 << FP_LIGHTNING | 1 << FP_RAGE | + 1 << FP_PROTECT | 1 << FP_ABSORB | 1 << FP_DRAIN | 1 << FP_SEE); + } + for( i = 0; i < NUM_FORCE_POWERS; i ++ ){ + ent->client->ps.fd.forcePowerLevel[i] = FORCE_LEVEL_3; + } + } else if (ent->client->pers.amterminator == qtrue) { + for ( t = 0 ; t < MAX_WEAPONS ; t++ ) { + ent->client->ps.ammo[t] = num; + } + ent->client->ps.weapon = WP_STUN_BATON; + ent->client->ps.forceRestricted = qtrue; + ent->client->ps.stats[STAT_WEAPONS] &= ~( 1 << WP_SABER ); + ent->client->ps.stats[STAT_WEAPONS] |= (1 << WP_STUN_BATON) | (1 << WP_BRYAR_PISTOL) | (1 << WP_BLASTER) | (1 << WP_DISRUPTOR) + | (1 << WP_BOWCASTER) | (1 << WP_REPEATER) | (1 << WP_DEMP2) | (1 << WP_FLECHETTE) | (1 << WP_ROCKET_LAUNCHER) | (1 << WP_THERMAL) + | (1 << WP_TRIP_MINE) | (1 << WP_DET_PACK); + ent->client->ps.stats[STAT_HOLDABLE_ITEMS] |= (1 << HI_BINOCULARS) | (1 << HI_SEEKER) | (1 << HI_MEDPAC) | (1 << HI_SHIELD) | (1 << HI_SENTRY_GUN); + } + if ( cm_autoprotecttime.integer != 0 ) { + ent->client->cmIdleTimer = cm_autoprotecttime.integer; + } + if (ent->client->pers.ampunish == qtrue) { + ent->flags |= FL_GODMODE; + ent->client->ps.forceRestricted = qtrue; + ent->client->ps.saberHolstered = qtrue; + } + if (ent->client->pers.amsleep == qtrue) { + ent->client->ps.forceHandExtend = HANDEXTEND_KNOCKDOWN; + ent->client->ps.forceDodgeAnim = 0; + ent->client->ps.forceHandExtendTime = Q3_INFINITE; + ent->client->ps.quickerGetup = qfalse; + ent->client->ps.saberHolstered = qtrue; + ent->flags |= FL_GODMODE; + } +} + +/* +================ +TeamCount + +Returns number of players on a team +================ +*/ +team_t TeamCount( int ignoreClientNum, int team ) { + int i; + int count = 0; + + for ( i = 0 ; i < level.maxclients ; i++ ) { + if ( i == ignoreClientNum ) { + continue; + } + if ( level.clients[i].pers.connected == CON_DISCONNECTED ) { + continue; + } + if ( level.clients[i].sess.sessionTeam == team ) { + count++; + } + } + + return count; +} + +/* +================ +TeamLeader + +Returns the client number of the team leader +================ +*/ +int TeamLeader( int team ) { + int i; + + for ( i = 0 ; i < level.maxclients ; i++ ) { + if ( level.clients[i].pers.connected == CON_DISCONNECTED ) { + continue; + } + if ( level.clients[i].sess.sessionTeam == team ) { + if ( level.clients[i].sess.teamLeader ) + return i; + } + } + + return -1; +} + + +/* +================ +PickTeam + +================ +*/ +team_t PickTeam( int ignoreClientNum ) { + int counts[TEAM_NUM_TEAMS]; + + counts[TEAM_BLUE] = TeamCount( ignoreClientNum, TEAM_BLUE ); + counts[TEAM_RED] = TeamCount( ignoreClientNum, TEAM_RED ); + + if (( counts[TEAM_BLUE] > counts[TEAM_RED] ) && (!level.isLockedred) ){ + return TEAM_RED; + } + + if (( counts[TEAM_RED] > counts[TEAM_BLUE] )&& (!level.isLockedblue) ) { + return TEAM_BLUE; + } + + // equal team count, so join the team with the lowest score + if (( level.teamScores[TEAM_BLUE] > level.teamScores[TEAM_RED] ) && (!level.isLockedred) ){ + return TEAM_RED; + } + + if (!level.isLockedblue){ + return TEAM_BLUE; + } + else { + return TEAM_SPECTATOR; // We gotta go SOMEWHERE! mine as well be spec. + } +} + +/* +=========== +ForceClientSkin + +Forces a client's skin (for teamplay) +=========== +*/ +/* +static void ForceClientSkin( gclient_t *client, char *model, const char *skin ) { + char *p; + + if ((p = Q_strrchr(model, '/')) != 0) { + *p = 0; + } + + Q_strcat(model, MAX_QPATH, "/"); + Q_strcat(model, MAX_QPATH, skin); +} +*/ + +/* +=========== +ClientCheckName +============ +*/ +static void ClientCleanName( const char *in, char *out, int outSize ) { + int len, colorlessLen; + char ch; + char *p; + int spaces; + + //save room for trailing null byte + outSize--; + + len = 0; + colorlessLen = 0; + p = out; + *p = 0; + spaces = 0; + + while( 1 ) { + ch = *in++; + if( !ch ) { + break; + } + + // don't allow leading spaces + if( (colorlessLen == 0 || !*p) && ch == ' ' ) { //JAKES NOTE: Color + Space is not a character + continue; + } + + if (ch == 255 || ch == -96){ //JAKES NOTE: Character 255 is a blank character (ALT+255) + continue; + } + + // check colors + if( ch == Q_COLOR_ESCAPE ) { + // solo trailing carat is not a color prefix + if( !*in ) { + break; + } + + // don't allow black in a name, period + //cm NOTE: I want to allow black names sometimes + if (cm_blacknames.integer == 0) { + if( ColorIndex(*in) == 0 ) { + in++; + continue; + } + } + + // make sure room in dest for both chars + if( len > outSize - 2 ) { + break; + } + + *out++ = ch; + *out++ = *in++; + len += 2; + continue; + } + + // don't allow too many consecutive spaces + if( ch == ' ' ) { + spaces++; + if( spaces > 3 ) { + continue; + } + } + else { + spaces = 0; + } + + if( len > outSize - 1 ) { + break; + } + + *out++ = ch; + colorlessLen++; + len++; + } + *out = 0; + + // don't allow empty names + if( *p == 0 || colorlessLen == 0 ) { + Q_strncpyz( p, "Padawan", outSize ); + } +} + +#ifdef _DEBUG +void G_DebugWrite(const char *path, const char *text) +{ + fileHandle_t f; + + trap_FS_FOpenFile( path, &f, FS_APPEND ); + trap_FS_Write(text, strlen(text), f); + trap_FS_FCloseFile(f); +} +#endif + +/* +=========== +SetupGameGhoul2Model + +There are two ghoul2 model instances per player (actually three). One is on the clientinfo (the base for the client side +player, and copied for player spawns and for corpses). One is attached to the centity itself, which is the model acutally +animated and rendered by the system. The final is the game ghoul2 model. This is animated by pmove on the server, and +is used for determining where the lightsaber should be, and for per-poly collision tests. +=========== +*/ +void *g2SaberInstance = NULL; +void SetupGameGhoul2Model(gclient_t *client, char *modelname) +{ + int handle; + char afilename[MAX_QPATH]; + char /**GLAName,*/ *slash; + char GLAName[MAX_QPATH]; + vec3_t tempVec = {0,0,0}; + + // First things first. If this is a ghoul2 model, then let's make sure we demolish this first. + if (client->ghoul2 && trap_G2_HaveWeGhoul2Models(client->ghoul2)) + { + trap_G2API_CleanGhoul2Models(&(client->ghoul2)); + } + + /* + Com_sprintf( afilename, sizeof( afilename ), "models/players/%s/model.glm", modelname ); + handle = trap_G2API_InitGhoul2Model(&client->ghoul2, afilename, 0, 0, -20, 0, 0); + if (handle<0) + { + Com_sprintf( afilename, sizeof( afilename ), "models/players/kyle/model.glm" ); + handle = trap_G2API_InitGhoul2Model(&client->ghoul2, afilename, 0, 0, -20, 0, 0); + + if (handle<0) + { + return; + } + } + */ + + //rww - just load the "standard" model for the server" + if (!precachedKyle) + { + Com_sprintf( afilename, sizeof( afilename ), "models/players/kyle/model.glm" ); + handle = trap_G2API_InitGhoul2Model(&precachedKyle, afilename, 0, 0, -20, 0, 0); + + if (handle<0) + { + return; + } + } + + if (precachedKyle && trap_G2_HaveWeGhoul2Models(precachedKyle)) + { + trap_G2API_DuplicateGhoul2Instance(precachedKyle, &client->ghoul2); + } + else + { + return; + } + + // The model is now loaded. + + GLAName[0] = 0; + + if (!BGPAFtextLoaded) + { + //get the location of the animation.cfg + //GLAName = trap_G2API_GetGLAName( client->ghoul2, 0); + trap_G2API_GetGLAName( client->ghoul2, 0, GLAName); + + if (!GLAName[0]) + { + if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg")) + { + Com_Printf( "Failed to load animation file %s\n", afilename ); + return; + } + return; + } + Q_strncpyz( afilename, GLAName, sizeof( afilename )); + slash = Q_strrchr( afilename, '/' ); + if ( slash ) + { + strcpy(slash, "/animation.cfg"); + } // Now afilename holds just the path to the animation.cfg + else + { // Didn't find any slashes, this is a raw filename right in base (whish isn't a good thing) + return; + } + + // Try to load the animation.cfg for this model then. + if ( !BG_ParseAnimationFile( afilename ) ) + { // The GLA's animations failed + if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg")) + { + Com_Printf( "Failed to load animation file %s\n", afilename ); + return; + } + } + } + + trap_G2API_AddBolt(client->ghoul2, 0, "*r_hand"); + trap_G2API_AddBolt(client->ghoul2, 0, "*l_hand"); + + // NOTE - ensure this sequence of bolt and bone accessing are always the same because the client expects them in a certain order + trap_G2API_SetBoneAnim(client->ghoul2, 0, "model_root", 0, 12, BONE_ANIM_OVERRIDE_LOOP, 1.0f, level.time, -1, -1); + trap_G2API_SetBoneAngles(client->ghoul2, 0, "upper_lumbar", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, NULL, 0, level.time); + trap_G2API_SetBoneAngles(client->ghoul2, 0, "cranium", tempVec, BONE_ANGLES_POSTMULT, POSITIVE_Z, NEGATIVE_Y, POSITIVE_X, NULL, 0, level.time); + + if (!g2SaberInstance) + { + trap_G2API_InitGhoul2Model(&g2SaberInstance, "models/weapons2/saber/saber_w.glm", 0, 0, -20, 0, 0); + + if (g2SaberInstance) + { + // indicate we will be bolted to model 0 (ie the player) on bolt 0 (always the right hand) when we get copied + trap_G2API_SetBoltInfo(g2SaberInstance, 0, 0); + // now set up the gun bolt on it + trap_G2API_AddBolt(g2SaberInstance, 0, "*flash"); + } + } + + if (g2SaberInstance) + { + trap_G2API_CopySpecificGhoul2Model(g2SaberInstance, 0, client->ghoul2, 1); + } +} + +/* +=========== +ClientUserInfoChanged + +Called from ClientConnect when the player first connects and +directly by the server system when the player updates a userinfo variable. + +The game can override any of the settings and call trap_SetUserinfo +if desired. +============ +*/ +char *Q_stristr(const char *s, const char *find); +void ClientUserinfoChanged( int clientNum ) { + gentity_t *ent; + int teamTask, teamLeader, team, health; + char *s; + char model[MAX_QPATH]; + //char headModel[MAX_QPATH]; + char forcePowers[MAX_QPATH]; + char oldname[MAX_STRING_CHARS]; + char origname[MAX_NETNAME]; + int namecount = 1; + gclient_t *client; + char c1[MAX_INFO_STRING]; + char c2[MAX_INFO_STRING]; + char redTeam[MAX_INFO_STRING]; + char blueTeam[MAX_INFO_STRING]; + char userinfo[MAX_INFO_STRING]; + //JediDog: Anti Name crash declarations + static const char validChars[] = " ~QqWwEeRrTtYyUuIiOoPpAaSsDdFfGgHhJjKkLlZzXxCcVvBbNnMm1234567890<>?,./';:][{}`-=!@#$^&*()_+|"; + static const char Replacement[] = "."; + int i, c, j, jdIllegalName; + //end + + ent = g_entities + clientNum; + client = ent->client; + + trap_GetUserinfo( clientNum, userinfo, sizeof( userinfo ) ); + + //JediDog: This is the anti saber, model and name flood... + if (ent->client->TimeReswitch < level.time && ent->client->TimeReswitch > 0 && ent->client->TimeReswitch > level.time-500) { + trap_SendServerCommand(clientNum, va("print\"^3Don't Flood. ^5Allow ^21 ^5second between changes.\n\"")); + return; + } + ent->client->TimeReswitch = level.time; + //End of the anti flood. + + // check for malformed or illegal info strings + if ( !Info_Validate(userinfo) ) { + strcpy (userinfo, "\\name\\badinfo"); + } + + // check for local client + s = Info_ValueForKey( userinfo, "ip" ); + if ( !strcmp( s, "localhost" ) ) { + client->pers.localClient = qtrue; + } + + // check the item prediction + s = Info_ValueForKey( userinfo, "cg_predictItems" ); + if ( !atoi( s ) ) { + client->pers.predictItemPickup = qfalse; + } else { + client->pers.predictItemPickup = qtrue; + } + + // set name + Q_strncpyz ( oldname, client->pers.netname, sizeof( oldname ) ); + s = Info_ValueForKey (userinfo, "name"); + //JediDog: Anti Name Crash + for(i = 0; (c = s[i]); i++) { + jdIllegalName = 0; + for(j = 0; validChars[j]; j++) { + if(c == validChars[j]) { + jdIllegalName = 1; + } + } + if (jdIllegalName == 0) { + s[i] = Replacement[0]; + } + }//End of Anti Name Crash + ClientCleanName( s, client->pers.netname, sizeof(client->pers.netname) ); + if (Q_stristr(client->pers.netname, cm_clanTag.string)){ + if (!(ent->r.svFlags & SVF_CLAN) && *cm_clanTag.string && cm_clanTag.string[0]){ + client->cmClanTimer = 30; + client->pers.amclanreserved = 1; + } + } else { + client->pers.amclanreserved = 0; + } + + if ( client->sess.sessionTeam == TEAM_SPECTATOR ) { + if ( client->sess.spectatorState == SPECTATOR_SCOREBOARD ) { + Q_strncpyz( client->pers.netname, "scoreboard", sizeof(client->pers.netname) ); + } + } + + if(cm_samenames.integer == 0){ + Q_strncpyz ( origname, client->pers.netname, MAX_NETNAME - 5 ); + while ( G_FindClientByName ( client->pers.netname, clientNum ) ) + { + Com_sprintf ( client->pers.netname, MAX_NETNAME, "%s(%d)", origname, namecount ); + namecount++; + } + } + + if ( client->pers.connected == CON_CONNECTED ) { + if ( strcmp( oldname, client->pers.netname ) ) { + trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " %s %s\n\"", oldname, G_GetStripEdString("SVINGAME", "PLRENAME"), + client->pers.netname) ); + } + } + + // set max health + health = 100; //atoi( Info_ValueForKey( userinfo, "handicap" ) ); + client->pers.maxHealth = health; + if ( client->pers.maxHealth < 1 || client->pers.maxHealth > 100 ) { + client->pers.maxHealth = 100; + } + client->ps.stats[STAT_MAX_HEALTH] = client->pers.maxHealth; + + // set model + if( g_gametype.integer >= GT_TEAM ) { + Q_strncpyz( model, Info_ValueForKey (userinfo, "team_model"), sizeof( model ) ); + //Q_strncpyz( headModel, Info_ValueForKey (userinfo, "team_headmodel"), sizeof( headModel ) ); + } else { + Q_strncpyz( model, Info_ValueForKey (userinfo, "model"), sizeof( model ) ); + //Q_strncpyz( headModel, Info_ValueForKey (userinfo, "headmodel"), sizeof( headModel ) ); + } + + // set force powers + Q_strncpyz( forcePowers, Info_ValueForKey (userinfo, "forcepowers"), sizeof( forcePowers ) ); + + // bots set their team a few frames later + if (g_gametype.integer >= GT_TEAM && g_entities[clientNum].r.svFlags & SVF_BOT) { + s = Info_ValueForKey( userinfo, "team" ); + if ( !Q_stricmp( s, "red" ) || !Q_stricmp( s, "r" ) ) { + team = TEAM_RED; + } else if ( !Q_stricmp( s, "blue" ) || !Q_stricmp( s, "b" ) ) { + team = TEAM_BLUE; + } else { + // pick the team with the least number of players + team = PickTeam( clientNum ); + } + } + else { + team = client->sess.sessionTeam; + } + +/* NOTE: all client side now + + // team + switch( team ) { + case TEAM_RED: + ForceClientSkin(client, model, "red"); +// ForceClientSkin(client, headModel, "red"); + break; + case TEAM_BLUE: + ForceClientSkin(client, model, "blue"); +// ForceClientSkin(client, headModel, "blue"); + break; + } + // don't ever use a default skin in teamplay, it would just waste memory + // however bots will always join a team but they spawn in as spectator + if ( g_gametype.integer >= GT_TEAM && team == TEAM_SPECTATOR) { + ForceClientSkin(client, model, "red"); +// ForceClientSkin(client, headModel, "red"); + } +*/ + + if (g_gametype.integer >= GT_TEAM) { + client->pers.teamInfo = qtrue; + } else { + s = Info_ValueForKey( userinfo, "teamoverlay" ); + if ( ! *s || atoi( s ) != 0 ) { + client->pers.teamInfo = qtrue; + } else { + client->pers.teamInfo = qfalse; + } + } + /* + s = Info_ValueForKey( userinfo, "cg_pmove_fixed" ); + if ( !*s || atoi( s ) == 0 ) { + client->pers.pmoveFixed = qfalse; + } + else { + client->pers.pmoveFixed = qtrue; + } + */ + + // team task (0 = none, 1 = offence, 2 = defence) + teamTask = atoi(Info_ValueForKey(userinfo, "teamtask")); + // team Leader (1 = leader, 0 is normal player) + teamLeader = client->sess.teamLeader; + + // colors + strcpy(c1, Info_ValueForKey( userinfo, "color1" )); + strcpy(c2, Info_ValueForKey( userinfo, "color2" )); + + strcpy(redTeam, Info_ValueForKey( userinfo, "g_redteam" )); + strcpy(blueTeam, Info_ValueForKey( userinfo, "g_blueteam" )); + + // send over a subset of the userinfo keys so other clients can + // print scoreboards, display models, and play custom sounds + if ( ent->r.svFlags & SVF_BOT ) { + s = va("n\\%s\\t\\%i\\model\\%s\\c1\\%s\\c2\\%s\\hc\\%i\\w\\%i\\l\\%i\\skill\\%s\\tt\\%d\\tl\\%d", + client->pers.netname, team, model, c1, c2, + client->pers.maxHealth, client->sess.wins, client->sess.losses, + Info_ValueForKey( userinfo, "skill" ), teamTask, teamLeader ); + } else { + s = va("n\\%s\\t\\%i\\model\\%s\\g_redteam\\%s\\g_blueteam\\%s\\c1\\%s\\c2\\%s\\hc\\%i\\w\\%i\\l\\%i\\tt\\%d\\tl\\%d", + client->pers.netname, client->sess.sessionTeam, model, redTeam, blueTeam, c1, c2, + client->pers.maxHealth, client->sess.wins, client->sess.losses, teamTask, teamLeader); + } + + trap_SetConfigstring( CS_PLAYERS+clientNum, s ); + + if (g_logClientInfo.integer) + { + G_LogPrintf( "ClientUserinfoChanged: %i %s\n", clientNum, s ); + } +} + +/* +=========== +ClientConnect + +Called when a player begins connecting to the server. +Called again for every map change or tournement restart. + +The session information will be valid after exit. + +Return NULL if the client should be allowed, otherwise return +a string with the reason for denial. + +Otherwise, the client will be sent the current gamestate +and will eventually get to ClientBegin. + +firstTime will be qtrue the very first time a client connects +to the server machine, but qfalse on map changes and tournement +restarts. +============ +*/ +char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot ) { + char *value; + char *value2; //cm BanClients +// char *areabits; + gclient_t *client; + char userinfo[MAX_INFO_STRING]; + char tmpIP[22]; //cm BanClients + gentity_t *ent; + gentity_t *te; + int i; //cm BanClients + + ent = &g_entities[ clientNum ]; + + trap_GetUserinfo( clientNum, userinfo, sizeof( userinfo ) ); + + // check to see if they are on the banned IP list + //cm BanClients + Q_strncpyz(tmpIP, Info_ValueForKey (userinfo, "ip"),sizeof(tmpIP) ); + if ( G_FilterPacket( tmpIP ) ) { + return "Banned."; + } + + if ( firstTime ) { + if (strcmp(tmpIP, "") == 0 && !isBot) { + return "You don't have an IP address!"; + } + } + + /*value = Info_ValueForKey (userinfo, "ip"); + if ( G_FilterPacket( value ) ) { + return "Banned."; + }*/ + //END + + if ( !( ent->r.svFlags & SVF_BOT ) && !isBot && g_needpass.integer ) { + // check for a password + value = Info_ValueForKey (userinfo, "password"); + if ( g_password.string[0] && Q_stricmp( g_password.string, "none" ) && + strcmp( g_password.string, value) != 0) { + static char sTemp[1024]; + Q_strncpyz(sTemp, G_GetStripEdString("SVINGAME","INVALID_PASSWORD"), sizeof (sTemp) ); + return sTemp;// return "Invalid password"; + } + } + if (strcmp(Info_ValueForKey (userinfo, "cl_punkbuster"),"") != 0 || strcmp(Info_ValueForKey (userinfo, "cl_guid"),"") != 0) { + return "Fake Player Settings Detected."; + }//JediDog: End of fake players detection + + // they can connect + ent->client = level.clients + clientNum; + client = ent->client; + +// areabits = client->areabits; + + memset( client, 0, sizeof(*client) ); + + client->pers.connected = CON_CONNECTING; + + // read or initialize the session data + if ( firstTime || level.newSession ) { + G_InitSessionData( client, userinfo, isBot, firstTime ); + } + G_ReadSessionData( client ); + + if ( firstTime || level.newSession ) { + if ( Q_stricmp(tmpIP, "" ) || tmpIP[0] != 0 ) { + i=0; + while(++isess.IPstring, tmpIP, sizeof(client->sess.IPstring)); + } + } + + if ( firstTime && G_CheckMaxConnections( tmpIP ) ) { + return va("Maximum Connections Per IP: %d.", sv_maxConnections.integer ); + } + + if( isBot ) { + ent->r.svFlags |= SVF_BOT; + ent->inuse = qtrue; + if( !G_BotConnect( clientNum, !firstTime ) ) { + return "BotConnectfailed"; + } + } + + // get and distribute relevent paramters + G_LogPrintf( "ClientConnect: %i\n", clientNum ); + ClientUserinfoChanged( clientNum ); + + // don't do the "xxx connected" messages if they were caried over from previous level + if ( firstTime ) { + trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " %s\n\"", client->pers.netname, G_GetStripEdString("SVINGAME", "PLCONNECT")) ); + value2 = Info_ValueForKey (userinfo, "name"); + if( !isBot ){ + G_LogPrintf( "ClientConnect: %i '%s' -> '%s'\n", clientNum, value2, client->sess.IPstring ); + } + } + + if ( g_gametype.integer >= GT_TEAM && + client->sess.sessionTeam != TEAM_SPECTATOR ) { + BroadcastTeamChange( client, -1 ); + } + + // count current clients and rank for scoreboard + CalculateRanks(); + + te = G_TempEntity( vec3_origin, EV_CLIENTJOIN ); + te->r.svFlags |= SVF_BROADCAST; + te->s.eventParm = clientNum; + + // for statistics +// client->areabits = areabits; +// if ( !client->areabits ) +// client->areabits = G_Alloc( (trap_AAS_PointReachabilityAreaIndex( NULL ) + 7) / 8 ); + + return NULL; +} + +void G_WriteClientSessionData( gclient_t *client ); + +/* +=========== +ClientBegin + +called when a client has finished connecting, and is ready +to be placed into the level. This will happen every level load, +and on transition between teams, but doesn't happen on respawns +============ +*/ +void ClientBegin( int clientNum, qboolean allowTeamReset ) { + gentity_t *ent; + gclient_t *client; + gentity_t *tent; + int flags, i; + char userinfo[MAX_INFO_VALUE], *modelname; + + ent = g_entities + clientNum; + + if ((ent->r.svFlags & SVF_BOT) && g_gametype.integer >= GT_TEAM) + { + if (allowTeamReset) + { + const char *team = "Red"; + int preSess; + + //SetTeam(ent, ""); + ent->client->sess.sessionTeam = PickTeam(-1); + trap_GetUserinfo(clientNum, userinfo, MAX_INFO_STRING); + + if (ent->client->sess.sessionTeam == TEAM_SPECTATOR) + { + ent->client->sess.sessionTeam = TEAM_RED; + } + + if (ent->client->sess.sessionTeam == TEAM_RED) + { + team = "Red"; + } + else + { + team = "Blue"; + } + + Info_SetValueForKey( userinfo, "team", team ); + + trap_SetUserinfo( clientNum, userinfo ); + + ent->client->ps.persistant[ PERS_TEAM ] = ent->client->sess.sessionTeam; + + preSess = ent->client->sess.sessionTeam; + G_ReadSessionData( ent->client ); + ent->client->sess.sessionTeam = preSess; + G_WriteClientSessionData(ent->client); + ClientUserinfoChanged( clientNum ); + ClientBegin(clientNum, qfalse); + return; + } + } + + client = level.clients + clientNum; + + if ( ent->r.linked ) { + trap_UnlinkEntity( ent ); + } + G_InitGentity( ent ); + ent->touch = 0; + ent->pain = 0; + ent->client = client; + + client->pers.connected = CON_CONNECTED; + client->pers.enterTime = level.time; + client->pers.teamState.state = TEAM_BEGIN; + + // save eflags around this, because changing teams will + // cause this to happen with a valid entity, and we + // want to make sure the teleport bit is set right + // so the viewpoint doesn't interpolate through the + // world to the new position + flags = client->ps.eFlags; + + i = 0; + + while (i < NUM_FORCE_POWERS) + { + if (ent->client->ps.fd.forcePowersActive & (1 << i)) + { + WP_ForcePowerStop(ent, i); + } + i++; + } + + i = TRACK_CHANNEL_1; + + while (i < NUM_TRACK_CHANNELS) + { + if (ent->client->ps.fd.killSoundEntIndex[i-50] && ent->client->ps.fd.killSoundEntIndex[i-50] < MAX_GENTITIES && ent->client->ps.fd.killSoundEntIndex[i-50] > 0) + { + G_MuteSound(ent->client->ps.fd.killSoundEntIndex[i-50], CHAN_VOICE); + } + i++; + } + i = 0; + + memset( &client->ps, 0, sizeof( client->ps ) ); + client->ps.eFlags = flags; + + client->ps.hasDetPackPlanted = qfalse; + + //first-time force power initialization + WP_InitForcePowers( ent ); + + //init saber ent + WP_SaberInitBladeData( ent ); + + // First time model setup for that player. + trap_GetUserinfo( clientNum, userinfo, sizeof(userinfo) ); + modelname = Info_ValueForKey (userinfo, "model"); + SetupGameGhoul2Model(client, modelname); + + if (ent->client->ghoul2) + { + ent->bolt_Head = trap_G2API_AddBolt(ent->client->ghoul2, 0, "cranium"); + ent->bolt_Waist = trap_G2API_AddBolt(ent->client->ghoul2, 0, "thoracic"); + ent->bolt_LArm = trap_G2API_AddBolt(ent->client->ghoul2, 0, "lradius"); + ent->bolt_RArm = trap_G2API_AddBolt(ent->client->ghoul2, 0, "rradius"); + ent->bolt_LLeg = trap_G2API_AddBolt(ent->client->ghoul2, 0, "ltibia"); + ent->bolt_RLeg = trap_G2API_AddBolt(ent->client->ghoul2, 0, "rtibia"); + ent->bolt_Motion = trap_G2API_AddBolt(ent->client->ghoul2, 0, "Motion"); + } + + // locate ent at a spawn point + ClientSpawn( ent ); + + if ( client->sess.sessionTeam != TEAM_SPECTATOR ) { + // send event + tent = G_TempEntity( ent->client->ps.origin, EV_PLAYER_TELEPORT_IN ); + tent->s.clientNum = ent->s.clientNum; + + if (Q_stristr(client->pers.netname, cm_clanTag.string)){ + if (!(ent->r.svFlags & SVF_CLAN) && *cm_clanTag.string && cm_clanTag.string[0]){ + client->cmClanTimer = 30; + client->pers.amclanreserved = 1; + } + } + + if ( g_gametype.integer != GT_TOURNAMENT ) { + trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " %s\n\"", client->pers.netname, G_GetStripEdString("SVINGAME", "PLENTER")) ); + } + } + G_LogPrintf( "ClientBegin: %i\n", clientNum ); + + // count current clients and rank for scoreboard + CalculateRanks(); + + if (client->sess.sessionTeam != TEAM_SPECTATOR){ + trap_SendServerCommand( ent-g_entities, va("print \"\n\n^1Clan Mod\n^3===============================================\n^3||^1Author: ^6NeWaGe ^3||\n^3||^1Website: ^5http://www.ClanMod.org ^3||\n^3===============================================\n^1* ^3Type in /HELP for a command list! ^1*\n\n\"" ) ); + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\n\"", cm_console_motd.string ) ); + ent->client->csTimeLeft = cm_motd_time.integer; + if (level.matchMode == qtrue){ + trap_SendServerCommand( ent-g_entities, "print \"^5*** ^2CURRENT MODE: Clan Match ^5***\n\""); + } else if (level.meetingMode == qtrue){ + trap_SendServerCommand( ent-g_entities, "print \"^5*** ^2CURRENT MODE: Clan Meeting ^5***\n\""); + } + } + + G_ClearClientLog(clientNum); +} + +static qboolean AllForceDisabled(int force) +{ + int i; + + if (force) + { + for (i=0;iclient; + + if (client->ps.fd.forceDoInit) + { //force a reread of force powers + WP_InitForcePowers( ent ); + client->ps.fd.forceDoInit = 0; + } + // find a spawn point + // do it before setting health back up, so farthest + // ranging doesn't count this client + if ( client->sess.sessionTeam == TEAM_SPECTATOR ) { + spawnPoint = SelectSpectatorSpawnPoint ( + spawn_origin, spawn_angles); + } else if (g_gametype.integer == GT_CTF || g_gametype.integer == GT_CTY) { + // all base oriented team games use the CTF spawn points + spawnPoint = SelectCTFSpawnPoint ( + client->sess.sessionTeam, + client->pers.teamState.state, + spawn_origin, spawn_angles); + } + else if (g_gametype.integer == GT_SAGA) + { + spawnPoint = SelectSagaSpawnPoint ( + client->sess.sessionTeam, + client->pers.teamState.state, + spawn_origin, spawn_angles); + } + else { + do { + // the first spawn should be at a good looking spot + if ( !client->pers.initialSpawn && client->pers.localClient ) { + client->pers.initialSpawn = qtrue; + spawnPoint = SelectInitialSpawnPoint( spawn_origin, spawn_angles ); + } else { + // don't spawn near existing origin if possible + spawnPoint = SelectSpawnPoint ( + client->ps.origin, + spawn_origin, spawn_angles); + } + + // Tim needs to prevent bots from spawning at the initial point + // on q3dm0... + if ( ( spawnPoint->flags & FL_NO_BOTS ) && ( ent->r.svFlags & SVF_BOT ) ) { + continue; // try again + } + // just to be symetric, we have a nohumans option... + if ( ( spawnPoint->flags & FL_NO_HUMANS ) && !( ent->r.svFlags & SVF_BOT ) ) { + continue; // try again + } + + break; + + } while ( 1 ); + } + client->pers.teamState.state = TEAM_ACTIVE; + + // toggle the teleport bit so the client knows to not lerp + // and never clear the voted flag + flags = ent->client->ps.eFlags & (EF_TELEPORT_BIT | EF_VOTED | EF_TEAMVOTED); + flags ^= EF_TELEPORT_BIT; + + // clear everything but the persistant data + + saved = client->pers; + savedSess = client->sess; + savedPing = client->ps.ping; +// savedAreaBits = client->areabits; + accuracy_hits = client->accuracy_hits; + accuracy_shots = client->accuracy_shots; + for ( i = 0 ; i < MAX_PERSISTANT ; i++ ) { + persistant[i] = client->ps.persistant[i]; + } + eventSequence = client->ps.eventSequence; + + savedForce = client->ps.fd; + + ghoul2save = client->ghoul2; + + saveSaberNum = client->ps.saberEntityNum; + + memset (client, 0, sizeof(*client)); // bk FIXME: Com_Memset? + + //rww - Don't wipe the ghoul2 instance or the animation data + client->ghoul2 = ghoul2save; + + //or the saber ent num + client->ps.saberEntityNum = saveSaberNum; + + client->ps.fd = savedForce; + + client->ps.duelIndex = ENTITYNUM_NONE; + + client->pers = saved; + client->sess = savedSess; + client->ps.ping = savedPing; +// client->areabits = savedAreaBits; + client->accuracy_hits = accuracy_hits; + client->accuracy_shots = accuracy_shots; + client->lastkilled_client = -1; + + for ( i = 0 ; i < MAX_PERSISTANT ; i++ ) { + client->ps.persistant[i] = persistant[i]; + } + client->ps.eventSequence = eventSequence; + // increment the spawncount so the client will detect the respawn + client->ps.persistant[PERS_SPAWN_COUNT]++; + client->ps.persistant[PERS_TEAM] = client->sess.sessionTeam; + + client->airOutTime = level.time + 12000; + +// trap_GetUserinfo( index, userinfo, sizeof(userinfo) ); + // set max health + client->pers.maxHealth = 100;//atoi( Info_ValueForKey( userinfo, "handicap" ) ); + if ( client->pers.maxHealth < 1 || client->pers.maxHealth > 100 ) { + client->pers.maxHealth = 100; + } + // clear entity values + client->ps.stats[STAT_MAX_HEALTH] = client->pers.maxHealth; + client->ps.eFlags = flags; + + ent->s.groundEntityNum = ENTITYNUM_NONE; + ent->client = &level.clients[index]; + ent->takedamage = qtrue; + ent->inuse = qtrue; + ent->classname = "player"; + ent->r.contents = CONTENTS_BODY; + ent->clipmask = MASK_PLAYERSOLID; + ent->die = player_die; + ent->waterlevel = 0; + ent->watertype = 0; + ent->flags = 0; + + VectorCopy (playerMins, ent->r.mins); + VectorCopy (playerMaxs, ent->r.maxs); + + client->ps.clientNum = index; + //give default weapons + client->ps.stats[STAT_WEAPONS] = ( 1 << WP_NONE ); + + if (g_gametype.integer == GT_TOURNAMENT) + { + wDisable = g_duelWeaponDisable.integer; + } + else + { + wDisable = g_weaponDisable.integer; + } + + + + if ( g_gametype.integer != GT_HOLOCRON + && g_gametype.integer != GT_JEDIMASTER + && !HasSetSaberOnly() + && !AllForceDisabled( g_forcePowerDisable.integer ) + && g_trueJedi.integer ) + { + if ( g_gametype.integer >= GT_TEAM && (client->sess.sessionTeam == TEAM_BLUE || client->sess.sessionTeam == TEAM_RED) ) + {//In Team games, force one side to be merc and other to be jedi + if ( level.numPlayingClients > 0 ) + {//already someone in the game + int i, forceTeam = TEAM_SPECTATOR; + for ( i = 0 ; i < level.maxclients ; i++ ) + { + if ( level.clients[i].pers.connected == CON_DISCONNECTED ) { + continue; + } + if ( level.clients[i].sess.sessionTeam == TEAM_BLUE || level.clients[i].sess.sessionTeam == TEAM_RED ) + {//in-game + if ( WP_HasForcePowers( &level.clients[i].ps ) ) + {//this side is using force + forceTeam = level.clients[i].sess.sessionTeam; + } + else + {//other team is using force + if ( level.clients[i].sess.sessionTeam == TEAM_BLUE ) + { + forceTeam = TEAM_RED; + } + else + { + forceTeam = TEAM_BLUE; + } + } + break; + } + } + if ( WP_HasForcePowers( &client->ps ) && client->sess.sessionTeam != forceTeam ) + {//using force but not on right team, switch him over + const char *teamName = TeamName( forceTeam ); + //client->sess.sessionTeam = forceTeam; + SetTeam( ent, (char *)teamName ); + return; + } + } + } + + if ( WP_HasForcePowers( &client->ps ) ) + { + client->ps.trueNonJedi = qfalse; + client->ps.trueJedi = qtrue; + //make sure they only use the saber + client->ps.weapon = WP_SABER; + client->ps.stats[STAT_WEAPONS] = (1 << WP_SABER); + } + else + {//no force powers set + client->ps.trueNonJedi = qtrue; + client->ps.trueJedi = qfalse; + if (!wDisable || !(wDisable & (1 << WP_BRYAR_PISTOL))) + { + client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_BRYAR_PISTOL ); + } + if (!wDisable || !(wDisable & (1 << WP_BLASTER))) + { + client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_BLASTER ); + } + if (!wDisable || !(wDisable & (1 << WP_BOWCASTER))) + { + client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_BOWCASTER ); + } + client->ps.stats[STAT_WEAPONS] &= ~(1 << WP_SABER); + client->ps.stats[STAT_WEAPONS] |= (1 << WP_STUN_BATON); + client->ps.ammo[AMMO_POWERCELL] = ammoData[AMMO_POWERCELL].max; + client->ps.weapon = WP_BRYAR_PISTOL; + } + } + else + {//jediVmerc is incompatible with this gametype, turn it off! + trap_Cvar_Set( "g_jediVmerc", "0" ); + if (g_gametype.integer == GT_HOLOCRON) + { + //always get free saber level 1 in holocron + client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_SABER ); //these are precached in g_items, ClearRegisteredItems() + } + else + { + if (client->ps.fd.forcePowerLevel[FP_SABERATTACK]) + { + client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_SABER ); //these are precached in g_items, ClearRegisteredItems() + } + else + { //if you don't have saber attack rank then you don't get a saber + client->ps.stats[STAT_WEAPONS] |= (1 << WP_STUN_BATON); + } + } + + if (!wDisable || !(wDisable & (1 << WP_BRYAR_PISTOL))) + { + client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_BRYAR_PISTOL ); + } + else if (g_gametype.integer == GT_JEDIMASTER) + { + client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_BRYAR_PISTOL ); + } + + if (g_gametype.integer == GT_JEDIMASTER) + { + client->ps.stats[STAT_WEAPONS] &= ~(1 << WP_SABER); + client->ps.stats[STAT_WEAPONS] |= (1 << WP_STUN_BATON); + } + + if (client->ps.stats[STAT_WEAPONS] & (1 << WP_BRYAR_PISTOL)) + { + client->ps.weapon = WP_BRYAR_PISTOL; + } + else if (client->ps.stats[STAT_WEAPONS] & (1 << WP_SABER)) + { + client->ps.weapon = WP_SABER; + } + else + { + client->ps.weapon = WP_STUN_BATON; + } + } + + /* + client->ps.stats[STAT_HOLDABLE_ITEMS] |= ( 1 << HI_BINOCULARS ); + client->ps.stats[STAT_HOLDABLE_ITEM] = BG_GetItemIndexByTag(HI_BINOCULARS, IT_HOLDABLE); + */ + + client->ps.stats[STAT_HOLDABLE_ITEMS] = 0; + client->ps.stats[STAT_HOLDABLE_ITEM] = 0; + + if ( client->sess.sessionTeam == TEAM_SPECTATOR ) + { + client->ps.stats[STAT_WEAPONS] = 0; + client->ps.stats[STAT_HOLDABLE_ITEMS] = 0; + client->ps.stats[STAT_HOLDABLE_ITEM] = 0; + } + + client->ps.ammo[AMMO_BLASTER] = 100; //ammoData[AMMO_BLASTER].max; //100 seems fair. +// client->ps.ammo[AMMO_POWERCELL] = ammoData[AMMO_POWERCELL].max; +// client->ps.ammo[AMMO_FORCE] = ammoData[AMMO_FORCE].max; +// client->ps.ammo[AMMO_METAL_BOLTS] = ammoData[AMMO_METAL_BOLTS].max; +// client->ps.ammo[AMMO_ROCKETS] = ammoData[AMMO_ROCKETS].max; +/* + client->ps.stats[STAT_WEAPONS] = ( 1 << WP_BRYAR_PISTOL); + if ( g_gametype.integer == GT_TEAM ) { + client->ps.ammo[WP_BRYAR_PISTOL] = 50; + } else { + client->ps.ammo[WP_BRYAR_PISTOL] = 100; + } +*/ + client->ps.rocketLockIndex = MAX_CLIENTS; + client->ps.rocketLockTime = 0; + + //rww - Set here to initialize the circling seeker drone to off. + //A quick note about this so I don't forget how it works again: + //ps.genericEnemyIndex is kept in sync between the server and client. + //When it gets set then an entitystate value of the same name gets + //set along with an entitystate flag in the shared bg code. Which + //is why a value needs to be both on the player state and entity state. + //(it doesn't seem to just carry over the entitystate value automatically + //because entity state value is derived from player state data or some + //such) + client->ps.genericEnemyIndex = -1; + + client->ps.isJediMaster = qfalse; + + client->ps.fallingToDeath = 0; + + //Do per-spawn force power initialization + WP_SpawnInitForcePowers( ent ); + + // health will count down towards max_health + ent->health = client->ps.stats[STAT_HEALTH] = client->ps.stats[STAT_MAX_HEALTH] * 1.25; + + // Start with a small amount of armor as well. + client->ps.stats[STAT_ARMOR] = client->ps.stats[STAT_MAX_HEALTH] * 0.25; + + G_SetOrigin( ent, spawn_origin ); + VectorCopy( spawn_origin, client->ps.origin ); + + // the respawned flag will be cleared after the attack and jump keys come up + client->ps.pm_flags |= PMF_RESPAWNED; + + trap_GetUsercmd( client - level.clients, &ent->client->pers.cmd ); + SetClientViewAngle( ent, spawn_angles ); + + if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) { + + } else { + G_KillBox( ent ); + trap_LinkEntity (ent); + + // force the base weapon up + client->ps.weapon = WP_BRYAR_PISTOL; + client->ps.weaponstate = FIRST_WEAPON; + + } + + // don't allow full run speed for a bit + client->ps.pm_flags |= PMF_TIME_KNOCKBACK; + client->ps.pm_time = 100; + + client->respawnTime = level.time; + client->inactivityTime = level.time + g_inactivity.integer * 1000; + client->latched_buttons = 0; + + // set default animations + client->ps.torsoAnim = WeaponReadyAnim[client->ps.weapon]; + client->ps.legsAnim = WeaponReadyAnim[client->ps.weapon]; + + if ( level.intermissiontime ) { + MoveClientToIntermission( ent ); + } else { + // fire the targets of the spawn point + G_UseTargets( spawnPoint, ent ); + + // select the highest weapon number available, after any + // spawn given items have fired + client->ps.weapon = 1; + for ( i = WP_NUM_WEAPONS - 1 ; i > 0 ; i-- ) { + if ( client->ps.stats[STAT_WEAPONS] & ( 1 << i ) ) { + client->ps.weapon = i; + break; + } + } + } + + // run a client frame to drop exactly to the floor, + // initialize animations and other things + client->ps.commandTime = level.time - 100; + ent->client->pers.cmd.serverTime = level.time; + ClientThink( ent-g_entities ); + + // positively link the client, even if the command times are weird + if ( ent->client->sess.sessionTeam != TEAM_SPECTATOR ) { + BG_PlayerStateToEntityState( &client->ps, &ent->s, qtrue ); + VectorCopy( ent->client->ps.origin, ent->r.currentOrigin ); + trap_LinkEntity( ent ); + } + + if (g_spawnInvulnerability.integer) + { + ent->client->ps.eFlags |= EF_INVULNERABLE; + ent->client->invulnerableTimer = level.time + g_spawnInvulnerability.integer; + } + + if (cm_savedualblade.integer == 1 && ent->client->pers.dualBlade == qtrue) { + ent->client->ps.dualBlade = qtrue; + } + + // run the presend to set anything else + ClientEndFrame( ent ); + + // clear entity state values + BG_PlayerStateToEntityState( &client->ps, &ent->s, qtrue ); +} + + +/* +=========== +ClientDisconnect + +Called when a player drops from the server. +Will not be called between levels. + +This should NOT be called directly by any game logic, +call trap_DropClient(), which will call this and do +server system housekeeping. +============ +*/ +void ClientDisconnect( int clientNum ) { + gentity_t *ent; + gentity_t *tent; + int i; + + // cleanup if we are kicking a bot that + // hasn't spawned yet + G_RemoveQueuedBotBegin( clientNum ); + + ent = g_entities + clientNum; + if ( !ent->client ) { + return; + } + + i = 0; + + while (i < NUM_FORCE_POWERS) + { + if (ent->client->ps.fd.forcePowersActive & (1 << i)) + { + WP_ForcePowerStop(ent, i); + } + i++; + } + + i = TRACK_CHANNEL_1; + + while (i < NUM_TRACK_CHANNELS) + { + if (ent->client->ps.fd.killSoundEntIndex[i-50] && ent->client->ps.fd.killSoundEntIndex[i-50] < MAX_GENTITIES && ent->client->ps.fd.killSoundEntIndex[i-50] > 0) + { + G_MuteSound(ent->client->ps.fd.killSoundEntIndex[i-50], CHAN_VOICE); + } + i++; + } + i = 0; + + // stop any following clients + for ( i = 0 ; i < level.maxclients ; i++ ) { + if ( level.clients[i].sess.sessionTeam == TEAM_SPECTATOR + && level.clients[i].sess.spectatorState == SPECTATOR_FOLLOW + && level.clients[i].sess.spectatorClient == clientNum ) { + StopFollowing( &g_entities[i] ); + } + } + + // send effect if they were completely connected + if ( ent->client->pers.connected == CON_CONNECTED + && ent->client->sess.sessionTeam != TEAM_SPECTATOR ) { + tent = G_TempEntity( ent->client->ps.origin, EV_PLAYER_TELEPORT_OUT ); + tent->s.clientNum = ent->s.clientNum; + + // They don't get to take powerups with them! + // Especially important for stuff like CTF flags + TossClientItems( ent ); + } + + G_LogPrintf( "ClientDisconnect: %i\n", clientNum ); + + // if we are playing in tourney mode, give a win to the other player and clear his frags for this round + if ( (g_gametype.integer == GT_TOURNAMENT ) + && !level.intermissiontime + && !level.warmupTime ) { + if ( level.sortedClients[1] == clientNum ) { + level.clients[ level.sortedClients[0] ].ps.persistant[PERS_SCORE] = 0; + level.clients[ level.sortedClients[0] ].sess.wins++; + ClientUserinfoChanged( level.sortedClients[0] ); + } + else if ( level.sortedClients[0] == clientNum ) { + level.clients[ level.sortedClients[1] ].ps.persistant[PERS_SCORE] = 0; + level.clients[ level.sortedClients[1] ].sess.wins++; + ClientUserinfoChanged( level.sortedClients[1] ); + } + } + + trap_UnlinkEntity (ent); + ent->s.modelindex = 0; + ent->inuse = qfalse; + ent->classname = "disconnected"; + ent->client->pers.connected = CON_DISCONNECTED; + ent->client->ps.persistant[PERS_TEAM] = TEAM_FREE; + ent->client->sess.sessionTeam = TEAM_FREE; + + //cm NOTE: Don't forget to add persistant flags here + ent->client->pers.amempower = qfalse; + ent->client->pers.amterminator = qfalse; + ent->client->pers.amsilence = qfalse; + ent->client->pers.ampunish = qfalse; + ent->client->pers.amsleep = qfalse; + ent->client->pers.amclanreserved = 0; + ent->client->pers.dualBlade = qfalse; + ent->r.svFlags &= ~SVF_ADMIN1; // prevent admin from being carried over to new players and bots + ent->r.svFlags &= ~SVF_ADMIN2; + ent->r.svFlags &= ~SVF_ADMIN3; + ent->r.svFlags &= ~SVF_CLAN; + + trap_SetConfigstring( CS_PLAYERS + clientNum, ""); + + CalculateRanks(); + + if ( ent->r.svFlags & SVF_BOT ) { + BotAIShutdownClient( clientNum, qfalse ); + } + + G_ClearClientLog(clientNum); +} + + diff --git a/code/game/g_cmds.c b/code/game/g_cmds.c new file mode 100644 index 0000000..ef09b3a --- /dev/null +++ b/code/game/g_cmds.c @@ -0,0 +1,5668 @@ +// Copyright (C) 1999-2000 Id Software, Inc. +// +#include "g_local.h" + +#include "../../ui/menudef.h" // for the voice chats + +//rww - for getting bot commands... +int AcceptBotCommand(char *cmd, gentity_t *pl); +//end rww + +void BG_CycleInven(playerState_t *ps, int direction); +void BG_CycleForce(playerState_t *ps, int direction); +extern int G_ClientNumberFromArg( char *str); +extern void AddIP( char *str ); + +//cm Admin Control +typedef enum +{ + A_ADMINTELE = 0, + A_SILENCE, + A_PROTECT, + A_ADMINBAN, + A_ADMINKICK, + A_G2ANIMENT, + A_TERMINATOR, + A_SLAY, + A_CHANGEMAP, + A_EMPOWER, + A_RENAME, + A_FORCETEAM, + A_PUNISH, + A_SLEEP, + A_SLAP, + A_LOCKTEAM, + A_CSPRINT, + A_MODE +} admin_type_t; + +//cm Vote Control +typedef enum +{ + V_MAP_RESTART = 0, + V_NEXTMAP, + V_MAP, + V_G_GAMETYPE, + V_KICK, + V_CLIENTKICK, + V_G_DOWARMUP, + V_TIMELIMIT, + V_FRAGLIMIT +} vote_type_t; + +//cm Emote Control +typedef enum +{ + E_SIT = 0, + E_BEG, + E_FLIP, + E_COCKY, + E_BOUNCE, + E_BREAKDANCE, + E_KNEEL, + E_KISS, + E_SCRATCH, + E_DUNNO, + E_POWER, + E_LOL, + E_THROW, + E_THROW2, + E_THROW3, + E_SHRUG, + E_SUPER, + E_THUMBSDOWN, + E_DRAW, + E_DANCE, + E_DANCE2, + E_NOD, + E_SHAKE +} emote_type_t; + +//cm /rename admin command function +void uwRename(gentity_t *player, const char *newname) +{ + char userinfo[MAX_INFO_STRING]; + int clientNum = player-g_entities; + trap_GetUserinfo(clientNum, userinfo, sizeof(userinfo)); + Info_SetValueForKey(userinfo, "name", newname); + trap_SetUserinfo(clientNum, userinfo); + ClientUserinfoChanged(clientNum); +} + +/* +=========== +G_IgnoreClientChat + +Instructs all chat to be ignored by the given +============ +*/ +void G_IgnoreClientChat ( int ignorer, int ignoree, qboolean ignore ) +{ + // Cant ignore yourself + if ( ignorer == ignoree ) + { + return; + } + + // If there is no client connected then dont bother + if ( g_entities[ignoree].client->pers.connected != CON_CONNECTED ) + { + return; + } + + if ( ignore ) + { + g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] |= (1<<(ignorer%32)); + } + else + { + g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] &= ~(1<<(ignorer%32)); + } +} +/* +=========== +G_IsClientChatIgnored + +Checks to see if the given client is being ignored by a specific client +============ +*/ +qboolean G_IsClientChatIgnored ( int ignorer, int ignoree ) +{ + if ( g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] & (1<<(ignorer%32)) ) + { + return qtrue; + } + + return qfalse; +} +/* +=========== +G_RemoveFromAllIgnoreLists + +Clears any possible ignore flags that were set and not reset. +============ +*/ +void G_RemoveFromAllIgnoreLists( int ignorer ) +{ + int i; + + for( i = 0; i < level.maxclients; i++) { + g_entities[i].client->sess.chatIgnoreClients[ignorer/32] &= ~(1 << ( ignorer%32 )); + } +} + +void Admin_Teleport( gentity_t *ent ) { + vec3_t origin; + char buffer[MAX_TOKEN_CHARS]; + int i; + + if ( trap_Argc() != 4 ) { + trap_SendServerCommand( ent-g_entities, va("print \"usage: tele (X) (Y) (Z)\ntype in /origin OR /origin (name) to find out (X) (Y) (Z)\n\"")); + return; + } + + for ( i = 0 ; i < 3 ; i++ ) { + trap_Argv( i + 1, buffer, sizeof( buffer ) ); + origin[i] = atof( buffer ); + } + + TeleportPlayer( ent, origin, ent->client->ps.viewangles ); +} + +/* +================== +DeathmatchScoreboardMessage + +================== +*/ +void DeathmatchScoreboardMessage( gentity_t *ent ) { + char entry[1024]; + char string[1400]; + int stringlength; + int i, j; + gclient_t *cl; + int numSorted, scoreFlags, accuracy, perfect; + + // send the latest information on all clients + string[0] = 0; + stringlength = 0; + scoreFlags = 0; + + numSorted = level.numConnectedClients; + + if (numSorted > MAX_CLIENT_SCORE_SEND) + { + numSorted = MAX_CLIENT_SCORE_SEND; + } + + for (i=0 ; i < numSorted ; i++) { + int ping; + + cl = &level.clients[level.sortedClients[i]]; + + if ( cl->pers.connected == CON_CONNECTING ) { + ping = -1; + } else { + ping = cl->ps.ping < 999 ? cl->ps.ping : 999; + } + + if( cl->accuracy_shots ) { + accuracy = cl->accuracy_hits * 100 / cl->accuracy_shots; + } + else { + accuracy = 0; + } + perfect = ( cl->ps.persistant[PERS_RANK] == 0 && cl->ps.persistant[PERS_KILLED] == 0 ) ? 1 : 0; + + Com_sprintf (entry, sizeof(entry), + " %i %i %i %i %i %i %i %i %i %i %i %i %i %i", level.sortedClients[i], + cl->ps.persistant[PERS_SCORE], ping, (level.time - cl->pers.enterTime)/60000, + scoreFlags, g_entities[level.sortedClients[i]].s.powerups, accuracy, + cl->ps.persistant[PERS_IMPRESSIVE_COUNT], + cl->ps.persistant[PERS_EXCELLENT_COUNT], + cl->ps.persistant[PERS_GAUNTLET_FRAG_COUNT], + cl->ps.persistant[PERS_DEFEND_COUNT], + cl->ps.persistant[PERS_ASSIST_COUNT], + perfect, + cl->ps.persistant[PERS_CAPTURES]); + j = strlen(entry); + if (stringlength + j > 1022) + break; + strcpy (string + stringlength, entry); + stringlength += j; + } + + //still want to know the total # of clients + i = level.numConnectedClients; + + trap_SendServerCommand( ent-g_entities, va("scores %i %i %i%s", i, + level.teamScores[TEAM_RED], level.teamScores[TEAM_BLUE], + string ) ); +} + + +/* +================== +Cmd_Score_f + +Request current scoreboard information +================== +*/ +void Cmd_Score_f( gentity_t *ent ) { + DeathmatchScoreboardMessage( ent ); +} + + + +/* +================== +CheatsOk +================== +*/ +qboolean CheatsOk( gentity_t *ent ) { + if ( !g_cheats.integer ) { + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "NOCHEATS"))); + return qfalse; + } + if ( ent->health <= 0 ) { + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "MUSTBEALIVE"))); + return qfalse; + } + return qtrue; +} + + +/* +================== +ConcatArgs +================== +*/ +char *ConcatArgs( int start ) { + int i, c, tlen; + static char line[MAX_STRING_CHARS]; + int len; + char arg[MAX_STRING_CHARS]; + + len = 0; + c = trap_Argc(); + for ( i = start ; i < c ; i++ ) { + trap_Argv( i, arg, sizeof( arg ) ); + tlen = strlen( arg ); + if ( len + tlen >= MAX_STRING_CHARS - 1 ) { + break; + } + memcpy( line + len, arg, tlen ); + len += tlen; + if ( i != c - 1 ) { + line[len] = ' '; + len++; + } + } + + line[len] = 0; + + return line; +} + +/* +================== +SanitizeString + +Remove case and control characters +================== +*/ +void SanitizeString( char *in, char *out ) { + while ( *in ) { + if ( *in == 27 ) { + in += 2; // skip color code + continue; + } + if ( *in < 32 ) { + in++; + continue; + } + *out++ = tolower( *in++ ); + } + + *out = 0; +} + +/* +================== +ClientNumberFromString + +Returns a player number for either a number or name string +Returns -1 if invalid +================== +*/ +int ClientNumberFromString( gentity_t *to, char *s ) { + gclient_t *cl; + int idnum; + char s2[MAX_STRING_CHARS]; + char n2[MAX_STRING_CHARS]; + + // numeric values are just slot numbers + if (s[0] >= '0' && s[0] <= '9') { + idnum = atoi( s ); + if ( idnum < 0 || idnum >= level.maxclients ) { + trap_SendServerCommand( to-g_entities, va("print \"Bad client slot: %i\n\"", idnum)); + return -1; + } + + cl = &level.clients[idnum]; + if ( cl->pers.connected != CON_CONNECTED ) { + trap_SendServerCommand( to-g_entities, va("print \"Client %i is not active\n\"", idnum)); + return -1; + } + return idnum; + } + + // check for a name match + SanitizeString( s, s2 ); + for ( idnum=0,cl=level.clients ; idnum < level.maxclients ; idnum++,cl++ ) { + if ( cl->pers.connected != CON_CONNECTED ) { + continue; + } + SanitizeString( cl->pers.netname, n2 ); + if ( !strcmp( n2, s2 ) ) { + return idnum; + } + } + + trap_SendServerCommand( to-g_entities, va("print \"User %s is not on the server\n\"", s)); + return -1; +} + +/* +================== +Cmd_Give_f + +Give items to a client +================== +*/ +void Cmd_Give_f (gentity_t *ent) +{ + char name[MAX_TOKEN_CHARS]; + gitem_t *it; + int i; + qboolean give_all; + gentity_t *it_ent; + trace_t trace; + char arg[MAX_TOKEN_CHARS]; + + if ( !CheatsOk( ent ) ) { + return; + } + + trap_Argv( 1, name, sizeof( name ) ); + + if (Q_stricmp(name, "all") == 0) + give_all = qtrue; + else + give_all = qfalse; + + if (give_all) + { + i = 0; + while (i < HI_NUM_HOLDABLE) + { + ent->client->ps.stats[STAT_HOLDABLE_ITEMS] |= (1 << i); + i++; + } + i = 0; + } + + if (give_all || Q_stricmp( name, "health") == 0) + { + if (trap_Argc() == 3) { + trap_Argv( 2, arg, sizeof( arg ) ); + ent->health = atoi(arg); + if (ent->health > ent->client->ps.stats[STAT_MAX_HEALTH]) { + ent->health = ent->client->ps.stats[STAT_MAX_HEALTH]; + } + } + else { + ent->health = ent->client->ps.stats[STAT_MAX_HEALTH]; + } + if (!give_all) + return; + } + + if (give_all || Q_stricmp(name, "weapons") == 0) + { + ent->client->ps.stats[STAT_WEAPONS] = (1 << (WP_DET_PACK+1)) - ( 1 << WP_NONE ); + if (!give_all) + return; + } + + if ( !give_all && Q_stricmp(name, "weaponnum") == 0 ) + { + trap_Argv( 2, arg, sizeof( arg ) ); + ent->client->ps.stats[STAT_WEAPONS] |= (1 << atoi(arg)); + return; + } + + if (give_all || Q_stricmp(name, "ammo") == 0) + { + int num = 999; + if (trap_Argc() == 3) { + trap_Argv( 2, arg, sizeof( arg ) ); + num = atoi(arg); + } + for ( i = 0 ; i < MAX_WEAPONS ; i++ ) { + ent->client->ps.ammo[i] = num; + } + if (!give_all) + return; + } + + if (give_all || Q_stricmp(name, "armor") == 0) + { + if (trap_Argc() == 3) { + trap_Argv( 2, arg, sizeof( arg ) ); + ent->client->ps.stats[STAT_ARMOR] = atoi(arg); + } else { + ent->client->ps.stats[STAT_ARMOR] = ent->client->ps.stats[STAT_MAX_HEALTH]; + } + + if (!give_all) + return; + } + + if (Q_stricmp(name, "excellent") == 0) { + ent->client->ps.persistant[PERS_EXCELLENT_COUNT]++; + return; + } + if (Q_stricmp(name, "impressive") == 0) { + ent->client->ps.persistant[PERS_IMPRESSIVE_COUNT]++; + return; + } + if (Q_stricmp(name, "gauntletaward") == 0) { + ent->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT]++; + return; + } + if (Q_stricmp(name, "defend") == 0) { + ent->client->ps.persistant[PERS_DEFEND_COUNT]++; + return; + } + if (Q_stricmp(name, "assist") == 0) { + ent->client->ps.persistant[PERS_ASSIST_COUNT]++; + return; + } + + // spawn a specific item right on the player + if ( !give_all ) { + it = BG_FindItem (name); + if (!it) { + return; + } + + it_ent = G_Spawn(); + VectorCopy( ent->r.currentOrigin, it_ent->s.origin ); + it_ent->classname = it->classname; + G_SpawnItem (it_ent, it); + FinishSpawningItem(it_ent ); + memset( &trace, 0, sizeof( trace ) ); + Touch_Item (it_ent, ent, &trace); + if (it_ent->inuse) { + G_FreeEntity( it_ent ); + } + } +} + + +/* +================== +Cmd_God_f + +Sets client to godmode + +argv(0) god +================== +*/ +void Cmd_God_f (gentity_t *ent) +{ + char *msg; + + if ( !CheatsOk( ent ) ) { + return; + } + + ent->flags ^= FL_GODMODE; + if (!(ent->flags & FL_GODMODE) ) + msg = "godmode OFF\n"; + else + msg = "godmode ON\n"; + + trap_SendServerCommand( ent-g_entities, va("print \"%s\"", msg)); +} + + +/* +================== +Cmd_Notarget_f + +Sets client to notarget + +argv(0) notarget +================== +*/ +void Cmd_Notarget_f( gentity_t *ent ) { + char *msg; + + if ( !CheatsOk( ent ) ) { + return; + } + + ent->flags ^= FL_NOTARGET; + if (!(ent->flags & FL_NOTARGET) ) + msg = "notarget OFF\n"; + else + msg = "notarget ON\n"; + + trap_SendServerCommand( ent-g_entities, va("print \"%s\"", msg)); +} + + +/* +================== +Cmd_Noclip_f + +argv(0) noclip +================== +*/ +void Cmd_Noclip_f( gentity_t *ent ) { + char *msg; + + if ( !CheatsOk( ent ) ) { + return; + } + + if ( ent->client->noclip ) { + msg = "noclip OFF\n"; + } else { + msg = "noclip ON\n"; + } + ent->client->noclip = !ent->client->noclip; + + trap_SendServerCommand( ent-g_entities, va("print \"%s\"", msg)); +} + + +/* +================== +Cmd_LevelShot_f + +This is just to help generate the level pictures +for the menus. It goes to the intermission immediately +and sends over a command to the client to resize the view, +hide the scoreboard, and take a special screenshot +================== +*/ +void Cmd_LevelShot_f( gentity_t *ent ) { + if ( !CheatsOk( ent ) ) { + return; + } + + // doesn't work in single player + if ( g_gametype.integer != 0 ) { + trap_SendServerCommand( ent-g_entities, + "print \"Must be in g_gametype 0 for levelshot\n\"" ); + return; + } + + BeginIntermission(); + trap_SendServerCommand( ent-g_entities, "clientLevelShot" ); +} + + +/* +================== +Cmd_LevelShot_f + +This is just to help generate the level pictures +for the menus. It goes to the intermission immediately +and sends over a command to the client to resize the view, +hide the scoreboard, and take a special screenshot +================== +*/ +void Cmd_TeamTask_f( gentity_t *ent ) { + char userinfo[MAX_INFO_STRING]; + char arg[MAX_TOKEN_CHARS]; + int task; + int client = ent->client - level.clients; + + if ( trap_Argc() != 2 ) { + return; + } + trap_Argv( 1, arg, sizeof( arg ) ); + task = atoi( arg ); + + trap_GetUserinfo(client, userinfo, sizeof(userinfo)); + Info_SetValueForKey(userinfo, "teamtask", va("%d", task)); + trap_SetUserinfo(client, userinfo); + ClientUserinfoChanged(client); +} + + + +/* +================= +Cmd_Kill_f +================= +*/ +void Cmd_Kill_f( gentity_t *ent ) { + if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) { + return; + } + if (ent->health <= 0) { + return; + } + //cm NOTE: Punished ppl cant kill themselves + if (ent->client->pers.ampunish == qtrue || ent->client->pers.amsleep == qtrue) { + return; + } + + if (g_gametype.integer == GT_TOURNAMENT && level.numPlayingClients > 1 && !level.warmupTime) + { + if (!g_allowDuelSuicide.integer) + { + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "ATTEMPTDUELKILL")) ); + return; + } + } + + ent->flags &= ~FL_GODMODE; + ent->client->ps.stats[STAT_HEALTH] = ent->health = -999; + player_die (ent, ent, ent, 100000, MOD_SUICIDE); +} + +gentity_t *G_GetDuelWinner(gclient_t *client) +{ + gclient_t *wCl; + int i; + + for ( i = 0 ; i < level.maxclients ; i++ ) { + wCl = &level.clients[i]; + + if (wCl && wCl != client && /*wCl->ps.clientNum != client->ps.clientNum &&*/ + wCl->pers.connected == CON_CONNECTED && wCl->sess.sessionTeam != TEAM_SPECTATOR) + { + return &g_entities[wCl->ps.clientNum]; + } + } + + return NULL; +} + +/* +================= +BroadCastTeamChange + +Let everyone know about a team change +================= +*/ +void BroadcastTeamChange( gclient_t *client, int oldTeam ) +{ + client->ps.fd.forceDoInit = 1; //every time we change teams make sure our force powers are set right + + if ( client->sess.sessionTeam == TEAM_RED ) { + trap_SendServerCommand( -1, va("cp \"%s" S_COLOR_WHITE " %s\n\"", + client->pers.netname, G_GetStripEdString("SVINGAME", "JOINEDTHEREDTEAM")) ); + } else if ( client->sess.sessionTeam == TEAM_BLUE ) { + trap_SendServerCommand( -1, va("cp \"%s" S_COLOR_WHITE " %s\n\"", + client->pers.netname, G_GetStripEdString("SVINGAME", "JOINEDTHEBLUETEAM"))); + } else if ( client->sess.sessionTeam == TEAM_SPECTATOR && oldTeam != TEAM_SPECTATOR ) { + trap_SendServerCommand( -1, va("cp \"%s" S_COLOR_WHITE " %s\n\"", + client->pers.netname, G_GetStripEdString("SVINGAME", "JOINEDTHESPECTATORS"))); + } else if ( client->sess.sessionTeam == TEAM_FREE ) { + if (g_gametype.integer == GT_TOURNAMENT) + { + /* + gentity_t *currentWinner = G_GetDuelWinner(client); + + if (currentWinner && currentWinner->client) + { + trap_SendServerCommand( -1, va("cp \"%s" S_COLOR_WHITE " %s %s\n\"", + currentWinner->client->pers.netname, G_GetStripEdString("SVINGAME", "VERSUS"), client->pers.netname)); + } + else + { + trap_SendServerCommand( -1, va("cp \"%s" S_COLOR_WHITE " %s\n\"", + client->pers.netname, G_GetStripEdString("SVINGAME", "JOINEDTHEBATTLE"))); + } + */ + //NOTE: Just doing a vs. once it counts two players up + } + else + { + trap_SendServerCommand( -1, va("cp \"%s" S_COLOR_WHITE " %s\n\"", + client->pers.netname, G_GetStripEdString("SVINGAME", "JOINEDTHEBATTLE"))); + } + } + + G_LogPrintf ( "setteam: %i %s %s\n", + client - &level.clients[0], + TeamName ( oldTeam ), + TeamName ( client->sess.sessionTeam ) ); +} + +/* +================= +SetTeam +================= +*/ +void SetTeam( gentity_t *ent, char *s ) { + int team, oldTeam; + gclient_t *client; + int clientNum; + spectatorState_t specState; + int specClient; + int teamLeader; + + // + // see what change is requested + // + client = ent->client; + + clientNum = client - level.clients; + specClient = 0; + specState = SPECTATOR_NOT; + if ( !Q_stricmp( s, "scoreboard" ) || !Q_stricmp( s, "score" ) ) { + team = TEAM_SPECTATOR; + specState = SPECTATOR_SCOREBOARD; + } else if ( !Q_stricmp( s, "follow1" ) ) { + team = TEAM_SPECTATOR; + specState = SPECTATOR_FOLLOW; + specClient = -1; + } else if ( !Q_stricmp( s, "follow2" ) ) { + team = TEAM_SPECTATOR; + specState = SPECTATOR_FOLLOW; + specClient = -2; + } else if ( !Q_stricmp( s, "spectator" ) || !Q_stricmp( s, "s" ) ) { + if(level.isLockedspec ){ + trap_SendServerCommand( ent->client->ps.clientNum, va("print \"^7The ^3Spectator ^7Access has been locked!\n\"")); + trap_SendServerCommand( ent->client->ps.clientNum, va("cp \"^7Sorry, the ^3Spectator ^7Access is locked.\"")); + return; + } + else{ + team = TEAM_SPECTATOR; + specState = SPECTATOR_FREE; + } + } else if ( g_gametype.integer >= GT_TEAM ) { + // if running a team game, assign player to one of the teams + specState = SPECTATOR_NOT; + if ( !Q_stricmp( s, "red" ) || !Q_stricmp( s, "r" ) ) { + if(level.isLockedred){ + trap_SendServerCommand( ent->client->ps.clientNum, va("print \"^7The ^1Red ^7team is locked!\n\"")); + trap_SendServerCommand( ent->client->ps.clientNum, va("cp \"^7Sorry, the ^1Red ^7Team has been locked.\"")); + return; + } + else{ + team = TEAM_RED; + } + } else if ( !Q_stricmp( s, "blue" ) || !Q_stricmp( s, "b" ) ) { + if(level.isLockedblue){ + trap_SendServerCommand( ent->client->ps.clientNum, va("print \"^7The ^4Blue ^7team is locked!\n\"")); + trap_SendServerCommand( ent->client->ps.clientNum, va("cp \"^7Sorry, the ^4Blue ^7Team has been locked.\"")); + return; + } + else{ + team = TEAM_BLUE; + } + } else { + // pick the team with the least number of players + //For now, don't do this. The legalize function will set powers properly now. + /* + if (g_forceBasedTeams.integer) + { + if (ent->client->ps.fd.forceSide == FORCE_LIGHTSIDE) + { + team = TEAM_BLUE; + } + else + { + team = TEAM_RED; + } + } + else + { + */ + team = PickTeam( clientNum ); + //} + } + + if ( g_teamForceBalance.integer && !g_trueJedi.integer ) { + int counts[TEAM_NUM_TEAMS]; + + counts[TEAM_BLUE] = TeamCount( ent->client->ps.clientNum, TEAM_BLUE ); + counts[TEAM_RED] = TeamCount( ent->client->ps.clientNum, TEAM_RED ); + + // We allow a spread of two + if ( team == TEAM_RED && counts[TEAM_RED] - counts[TEAM_BLUE] > 1 ) { + //For now, don't do this. The legalize function will set powers properly now. + /* + if (g_forceBasedTeams.integer && ent->client->ps.fd.forceSide == FORCE_DARKSIDE) + { + trap_SendServerCommand( ent->client->ps.clientNum, + va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "TOOMANYRED_SWITCH")) ); + } + else + */ + { + trap_SendServerCommand( ent->client->ps.clientNum, + va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "TOOMANYRED")) ); + } + return; // ignore the request + } + if ( team == TEAM_BLUE && counts[TEAM_BLUE] - counts[TEAM_RED] > 1 ) { + //For now, don't do this. The legalize function will set powers properly now. + /* + if (g_forceBasedTeams.integer && ent->client->ps.fd.forceSide == FORCE_LIGHTSIDE) + { + trap_SendServerCommand( ent->client->ps.clientNum, + va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "TOOMANYBLUE_SWITCH")) ); + } + else + */ + { + trap_SendServerCommand( ent->client->ps.clientNum, + va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "TOOMANYBLUE")) ); + } + return; // ignore the request + } + + // It's ok, the team we are switching to has less or same number of players + } + + //For now, don't do this. The legalize function will set powers properly now. + /* + if (g_forceBasedTeams.integer) + { + if (team == TEAM_BLUE && ent->client->ps.fd.forceSide != FORCE_LIGHTSIDE) + { + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "MUSTBELIGHT")) ); + return; + } + if (team == TEAM_RED && ent->client->ps.fd.forceSide != FORCE_DARKSIDE) + { + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "MUSTBEDARK")) ); + return; + } + } + */ + + } else { + // force them to spectators if there aren't any spots free + if(level.isLockedjoin){ + trap_SendServerCommand( ent->client->ps.clientNum, va("print \"^7The ^2Join ^7team is locked!\n\"")); + trap_SendServerCommand( ent->client->ps.clientNum, va("cp \"^7Sorry, the ^2Join ^7Team has been locked.\"")); + return; + } + else{ + team = TEAM_FREE; + } + } + + // override decision if limiting the players + if ( (g_gametype.integer == GT_TOURNAMENT) + && level.numNonSpectatorClients >= 2 ) { + team = TEAM_SPECTATOR; + } else if ( g_maxGameClients.integer > 0 && + level.numNonSpectatorClients >= g_maxGameClients.integer ) { + team = TEAM_SPECTATOR; + } + + // + // decide if we will allow the change + // + oldTeam = client->sess.sessionTeam; + if ( team == oldTeam && team != TEAM_SPECTATOR ) { + return; + } + + // + // execute the team change + // + + // if the player was dead leave the body + if ( client->ps.stats[STAT_HEALTH] <= 0 ) { + CopyToBodyQue(ent); + } + + // he starts at 'base' + client->pers.teamState.state = TEAM_BEGIN; + if ( oldTeam != TEAM_SPECTATOR ) { + // Kill him (makes sure he loses flags, etc) + ent->flags &= ~FL_GODMODE; + ent->client->ps.stats[STAT_HEALTH] = ent->health = 0; + player_die (ent, ent, ent, 100000, MOD_SUICIDE); + + } + // they go to the end of the line for tournements + if ( team == TEAM_SPECTATOR ) { + if ( (g_gametype.integer != GT_TOURNAMENT) || (oldTeam != TEAM_SPECTATOR) ) {//so you don't get dropped to the bottom of the queue for changing skins, etc. + client->sess.spectatorTime = level.time; + } + } + + client->sess.sessionTeam = team; + client->sess.spectatorState = specState; + client->sess.spectatorClient = specClient; + + client->sess.teamLeader = qfalse; + if ( team == TEAM_RED || team == TEAM_BLUE ) { + teamLeader = TeamLeader( team ); + // if there is no team leader or the team leader is a bot and this client is not a bot + if ( teamLeader == -1 || ( !(g_entities[clientNum].r.svFlags & SVF_BOT) && (g_entities[teamLeader].r.svFlags & SVF_BOT) ) ) { + SetLeader( team, clientNum ); + } + } + // make sure there is a team leader on the team the player came from + if ( oldTeam == TEAM_RED || oldTeam == TEAM_BLUE ) { + CheckTeamLeader( oldTeam ); + } + + BroadcastTeamChange( client, oldTeam ); + + // get and distribute relevent paramters + ClientUserinfoChanged( clientNum ); + + ClientBegin( clientNum, qfalse ); +} + +/* +================= +StopFollowing + +If the client being followed leaves the game, or you just want to drop +to free floating spectator mode +================= +*/ +void StopFollowing( gentity_t *ent ) { + ent->client->ps.persistant[ PERS_TEAM ] = TEAM_SPECTATOR; + ent->client->sess.sessionTeam = TEAM_SPECTATOR; + ent->client->sess.spectatorState = SPECTATOR_FREE; + ent->client->ps.pm_flags &= ~PMF_FOLLOW; + ent->r.svFlags &= ~SVF_BOT; + ent->client->ps.clientNum = ent - g_entities; + ent->client->ps.weapon = WP_NONE; + ent->client->ps.isJediMaster = qfalse; // major exploit if you are spectating somebody and they are JM and you reconnect + ent->health = ent->client->ps.stats[STAT_HEALTH] = 100; // so that you don't keep dead angles if you were spectating a dead person +} + +/* +================= +Cmd_Team_f +================= +*/ +void Cmd_Team_f( gentity_t *ent ) { + int oldTeam; + char s[MAX_TOKEN_CHARS]; + + if ( trap_Argc() != 2 ) { + oldTeam = ent->client->sess.sessionTeam; + switch ( oldTeam ) { + case TEAM_BLUE: + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "PRINTBLUETEAM")) ); + break; + case TEAM_RED: + trap_SendServerCommand( ent-g_entities, va("print \"Red team\n\"", G_GetStripEdString("SVINGAME", "PRINTREDTEAM")) ); + break; + case TEAM_FREE: + trap_SendServerCommand( ent-g_entities, va("print \"Free team\n\"", G_GetStripEdString("SVINGAME", "PRINTFREETEAM")) ); + break; + case TEAM_SPECTATOR: + trap_SendServerCommand( ent-g_entities, va("print \"Spectator team\n\"", G_GetStripEdString("SVINGAME", "PRINTSPECTEAM")) ); + break; + } + return; + } + + if ( ent->client->switchTeamTime > level.time ) { + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "NOSWITCH")) ); + return; + } + + if (gEscaping) + { + return; + } + + // if they are playing a tournement game, count as a loss + if ( (g_gametype.integer == GT_TOURNAMENT ) + && ent->client->sess.sessionTeam == TEAM_FREE ) {//in a tournament game + //disallow changing teams + trap_SendServerCommand( ent-g_entities, "print \"Cannot switch teams in Duel\n\"" ); + return; + //FIXME: why should this be a loss??? + //ent->client->sess.losses++; + } + + trap_Argv( 1, s, sizeof( s ) ); + + SetTeam( ent, s ); + + ent->client->switchTeamTime = level.time + 5000; +} + +/* +================= +Cmd_Team_f +================= +*/ +void Cmd_ForceChanged_f( gentity_t *ent ) +{ + char fpChStr[1024]; + const char *buf; +// Cmd_Kill_f(ent); + if (ent->client->sess.sessionTeam == TEAM_SPECTATOR) + { //if it's a spec, just make the changes now + //trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "FORCEAPPLIED")) ); + //No longer print it, as the UI calls this a lot. + WP_InitForcePowers( ent ); + goto argCheck; + } + + buf = G_GetStripEdString("SVINGAME", "FORCEPOWERCHANGED"); + + strcpy(fpChStr, buf); + + trap_SendServerCommand( ent-g_entities, va("print \"%s%s\n\n\"", S_COLOR_GREEN, fpChStr) ); + + ent->client->ps.fd.forceDoInit = 1; +argCheck: + if (g_gametype.integer == GT_TOURNAMENT) + { //If this is duel, don't even bother changing team in relation to this. + return; + } + + if (trap_Argc() > 1) + { + char arg[MAX_TOKEN_CHARS]; + + trap_Argv( 1, arg, sizeof( arg ) ); + + if (arg && arg[0]) + { //if there's an arg, assume it's a combo team command from the UI. + Cmd_Team_f(ent); + } + } +} + +/* +================= +Cmd_Follow_f +================= +*/ +void Cmd_Follow_f( gentity_t *ent ) { + int i; + char arg[MAX_TOKEN_CHARS]; + + if ( trap_Argc() != 2 ) { + if ( ent->client->sess.spectatorState == SPECTATOR_FOLLOW ) { + StopFollowing( ent ); + } + return; + } + + trap_Argv( 1, arg, sizeof( arg ) ); + i = ClientNumberFromString( ent, arg ); + if ( i == -1 ) { + return; + } + + // can't follow self + if ( &level.clients[ i ] == ent->client ) { + return; + } + + // can't follow another spectator + if ( level.clients[ i ].sess.sessionTeam == TEAM_SPECTATOR ) { + return; + } + + // if they are playing a tournement game, count as a loss + if ( (g_gametype.integer == GT_TOURNAMENT ) + && ent->client->sess.sessionTeam == TEAM_FREE ) { + //WTF??? + ent->client->sess.losses++; + } + + // first set them to spectator + if ( ent->client->sess.sessionTeam != TEAM_SPECTATOR ) { + SetTeam( ent, "spectator" ); + } + + ent->client->sess.spectatorState = SPECTATOR_FOLLOW; + ent->client->sess.spectatorClient = i; +} + +/* +================= +Cmd_FollowCycle_f +================= +*/ +void Cmd_FollowCycle_f( gentity_t *ent, int dir ) { + int clientnum; + int original; + + // if they are playing a tournement game, count as a loss + if ( (g_gametype.integer == GT_TOURNAMENT ) + && ent->client->sess.sessionTeam == TEAM_FREE ) {\ + //WTF??? + ent->client->sess.losses++; + } + // first set them to spectator + if ( ent->client->sess.spectatorState == SPECTATOR_NOT ) { + SetTeam( ent, "spectator" ); + } + + if ( dir != 1 && dir != -1 ) { + G_Error( "Cmd_FollowCycle_f: bad dir %i", dir ); + } + + clientnum = ent->client->sess.spectatorClient; + original = clientnum; + do { + clientnum += dir; + if ( clientnum >= level.maxclients ) { + clientnum = 0; + } + if ( clientnum < 0 ) { + clientnum = level.maxclients - 1; + } + + // can only follow connected clients + if ( level.clients[ clientnum ].pers.connected != CON_CONNECTED ) { + continue; + } + + // can't follow another spectator + if ( level.clients[ clientnum ].sess.sessionTeam == TEAM_SPECTATOR ) { + continue; + } + + // this is good, we can use it + ent->client->sess.spectatorClient = clientnum; + ent->client->sess.spectatorState = SPECTATOR_FOLLOW; + return; + } while ( clientnum != original ); + + // leave it where it was +} + + +/* +================== +G_Say +================== +*/ + +static void G_SayTo( gentity_t *ent, gentity_t *other, int mode, int color, const char *name, const char *message ) { + if (!other) { + return; + } + if (!other->inuse) { + return; + } + if (!other->client) { + return; + } + if ( other->client->pers.connected != CON_CONNECTED ) { + return; + } + if ( mode == SAY_TEAM && !OnSameTeam(ent, other) ) { + return; + } + //cm NOTE: If we're not admin, dont hear the message. etc. + if ( mode == SAY_ADMIN && !(other->r.svFlags & SVF_ADMIN1) && !(other->r.svFlags & SVF_ADMIN2) + && !(other->r.svFlags & SVF_ADMIN3)) { + return; + } + if ( mode == SAY_REPORT && !(other->r.svFlags & SVF_ADMIN1) && !(other->r.svFlags & SVF_ADMIN2) + && !(other->r.svFlags & SVF_ADMIN3)) { + return; + } + if ( mode == SAY_CLAN && !(other->r.svFlags & SVF_CLAN) ) { + return; + } + // no chatting to players in tournements + if ( (g_gametype.integer == GT_TOURNAMENT ) + && other->client->sess.sessionTeam == TEAM_FREE + && ent->client->sess.sessionTeam != TEAM_FREE ) { + //Hmm, maybe some option to do so if allowed? Or at least in developer mode... + return; + } + + if ( G_IsClientChatIgnored ( other->s.number, ent->s.number ) ) + { + return; + } + + trap_SendServerCommand( other-g_entities, va("%s \"%s%c%c%s\"", + mode == SAY_TEAM ? "tchat" : "chat", + name, Q_COLOR_ESCAPE, color, message)); +} + +#define EC "\x19" + +void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chatText ) { + int j; + gentity_t *other; + int color; + char name[64]; + // don't let text be too long for malicious reasons + char text[MAX_SAY_TEXT]; + char location[64]; + + if ( g_gametype.integer < GT_TEAM && mode == SAY_TEAM ) { + mode = SAY_ALL; + } + + switch ( mode ) { + default: + case SAY_ALL: + G_LogPrintf( "say: %s: %s\n", ent->client->pers.netname, chatText ); + Com_sprintf (name, sizeof(name), "%s%c%c"EC": ", ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE ); + color = COLOR_GREEN; + break; + case SAY_TEAM: + G_LogPrintf( "sayteam: %s: %s\n", ent->client->pers.netname, chatText ); + if (Team_GetLocationMsg(ent, location, sizeof(location))) + Com_sprintf (name, sizeof(name), EC"(%s%c%c"EC") (%s)"EC": ", + ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE, location); + else + Com_sprintf (name, sizeof(name), EC"(%s%c%c"EC")"EC": ", + ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE ); + color = COLOR_CYAN; + break; + case SAY_TELL: + if (target && g_gametype.integer >= GT_TEAM && + target->client->sess.sessionTeam == ent->client->sess.sessionTeam && + Team_GetLocationMsg(ent, location, sizeof(location))) + Com_sprintf (name, sizeof(name), EC"[%s%c%c"EC"] (%s)"EC": ", ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE, location ); + else + Com_sprintf (name, sizeof(name), EC"[%s%c%c"EC"]"EC": ", ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE ); + color = COLOR_MAGENTA; + break; + //cm new chat types + case SAY_ADMIN: + if (ent->r.svFlags & SVF_ADMIN1 || ent->r.svFlags & SVF_ADMIN2 || ent->r.svFlags & SVF_ADMIN3){ + G_LogPrintf( "sayteam: [%s]: %s\n", ent->client->pers.netname, chatText ); + Com_sprintf (name, sizeof(name), EC"^3^7[%s^7]: %s", + ent->client->pers.netname, chatText ); + } + else { + return; + } + color = COLOR_YELLOW; + break; + case SAY_REPORT: + if (cm_report.integer == 1){ + G_LogPrintf( "sayteam: [%s]: %s\n", ent->client->pers.netname, chatText ); + Com_sprintf (name, sizeof(name), EC"^5^7[%s^7]: %s", + ent->client->pers.netname, chatText ); + } + else { + return; + } + color = COLOR_CYAN; + break; + case SAY_CLAN: + if (ent->r.svFlags & SVF_CLAN){ + G_LogPrintf( "sayteam: [%s]: %s\n", ent->client->pers.netname, chatText ); + Com_sprintf (name, sizeof(name), EC"^1^7[%s^7]: %s", + ent->client->pers.netname, chatText ); + } + else { + return; + } + color = COLOR_RED; + break; + } + + Q_strncpyz( text, chatText, sizeof(text) ); + + if ( target ) { + G_SayTo( ent, target, mode, color, name, text ); + return; + } + + // echo the text to the console + if ( g_dedicated.integer ) { + G_Printf( "%s%s\n", name, text); + } + + // send it to all the apropriate clients + for (j = 0; j < level.maxclients; j++) { + other = &g_entities[j]; + G_SayTo( ent, other, mode, color, name, text ); + } +} + + +/* +================== +Cmd_Say_f +================== +*/ +static void Cmd_Say_f( gentity_t *ent, int mode, qboolean arg0 ) { + char *p; + + if ( trap_Argc () < 2 && !arg0 ) { + return; + } + + if (arg0) + { + p = ConcatArgs( 0 ); + } + else + { + p = ConcatArgs( 1 ); + } + + G_Say( ent, NULL, mode, p ); +} + +/* +================== +Cmd_Tell_f +================== +*/ +static void Cmd_Tell_f( gentity_t *ent ) { + int targetNum; + gentity_t *target; + char *p; + char arg[MAX_TOKEN_CHARS]; + + if ( trap_Argc () < 2 ) { + return; + } + + trap_Argv( 1, arg, sizeof( arg ) ); + targetNum = G_ClientNumberFromArg( arg ); + if ( targetNum < 0 || targetNum >= level.maxclients ) { + return; + } + + target = &g_entities[targetNum]; + if ( !target || !target->inuse || !target->client ) { + return; + } + + p = ConcatArgs( 2 ); + + G_LogPrintf( "tell: %s to %s: %s\n", ent->client->pers.netname, target->client->pers.netname, p ); + G_Say( ent, target, SAY_TELL, p ); + // don't tell to the player self if it was already directed to this player + // also don't send the chat back to a bot + if ( ent != target && !(ent->r.svFlags & SVF_BOT)) { + G_Say( ent, ent, SAY_TELL, p ); + } +} + + +static void G_VoiceTo( gentity_t *ent, gentity_t *other, int mode, const char *id, qboolean voiceonly ) { + int color; + char *cmd; + + if (!other) { + return; + } + if (!other->inuse) { + return; + } + if (!other->client) { + return; + } + if ( mode == SAY_TEAM && !OnSameTeam(ent, other) ) { + return; + } + // no chatting to players in tournements + if ( (g_gametype.integer == GT_TOURNAMENT )) { + return; + } + + if (mode == SAY_TEAM) { + color = COLOR_CYAN; + cmd = "vtchat"; + } + else if (mode == SAY_TELL) { + color = COLOR_MAGENTA; + cmd = "vtell"; + } + else { + color = COLOR_GREEN; + cmd = "vchat"; + } + + trap_SendServerCommand( other-g_entities, va("%s %d %d %d %s", cmd, voiceonly, ent->s.number, color, id)); +} + +void G_Voice( gentity_t *ent, gentity_t *target, int mode, const char *id, qboolean voiceonly ) { + int j; + gentity_t *other; + + if ( g_gametype.integer < GT_TEAM && mode == SAY_TEAM ) { + mode = SAY_ALL; + } + + if ( target ) { + G_VoiceTo( ent, target, mode, id, voiceonly ); + return; + } + + // echo the text to the console + if ( g_dedicated.integer ) { + G_Printf( "voice: %s %s\n", ent->client->pers.netname, id); + } + + // send it to all the apropriate clients + for (j = 0; j < level.maxclients; j++) { + other = &g_entities[j]; + G_VoiceTo( ent, other, mode, id, voiceonly ); + } +} + +/* +================== +Cmd_Voice_f +================== +*/ +static void Cmd_Voice_f( gentity_t *ent, int mode, qboolean arg0, qboolean voiceonly ) { + char *p; + + if ( trap_Argc () < 2 && !arg0 ) { + return; + } + + if (arg0) + { + p = ConcatArgs( 0 ); + } + else + { + p = ConcatArgs( 1 ); + } + + G_Voice( ent, NULL, mode, p, voiceonly ); +} + +/* +================== +Cmd_VoiceTell_f +================== +*/ +static void Cmd_VoiceTell_f( gentity_t *ent, qboolean voiceonly ) { + int targetNum; + gentity_t *target; + char *id; + char arg[MAX_TOKEN_CHARS]; + + if ( trap_Argc () < 2 ) { + return; + } + + trap_Argv( 1, arg, sizeof( arg ) ); + targetNum = atoi( arg ); + if ( targetNum < 0 || targetNum >= level.maxclients ) { + return; + } + + target = &g_entities[targetNum]; + if ( !target || !target->inuse || !target->client ) { + return; + } + + id = ConcatArgs( 2 ); + + G_LogPrintf( "vtell: %s to %s: %s\n", ent->client->pers.netname, target->client->pers.netname, id ); + G_Voice( ent, target, SAY_TELL, id, voiceonly ); + // don't tell to the player self if it was already directed to this player + // also don't send the chat back to a bot + if ( ent != target && !(ent->r.svFlags & SVF_BOT)) { + G_Voice( ent, ent, SAY_TELL, id, voiceonly ); + } +} + + +/* +================== +Cmd_VoiceTaunt_f +================== +*/ +static void Cmd_VoiceTaunt_f( gentity_t *ent ) { + gentity_t *who; + int i; + + if (!ent->client) { + return; + } + + // insult someone who just killed you + if (ent->enemy && ent->enemy->client && ent->enemy->client->lastkilled_client == ent->s.number) { + // i am a dead corpse + if (!(ent->enemy->r.svFlags & SVF_BOT)) { + G_Voice( ent, ent->enemy, SAY_TELL, VOICECHAT_DEATHINSULT, qfalse ); + } + if (!(ent->r.svFlags & SVF_BOT)) { + G_Voice( ent, ent, SAY_TELL, VOICECHAT_DEATHINSULT, qfalse ); + } + ent->enemy = NULL; + return; + } + // insult someone you just killed + if (ent->client->lastkilled_client >= 0 && ent->client->lastkilled_client != ent->s.number) { + who = g_entities + ent->client->lastkilled_client; + if (who->client) { + // who is the person I just killed + if (who->client->lasthurt_mod == MOD_STUN_BATON) { + if (!(who->r.svFlags & SVF_BOT)) { + G_Voice( ent, who, SAY_TELL, VOICECHAT_KILLGAUNTLET, qfalse ); // and I killed them with a gauntlet + } + if (!(ent->r.svFlags & SVF_BOT)) { + G_Voice( ent, ent, SAY_TELL, VOICECHAT_KILLGAUNTLET, qfalse ); + } + } else { + if (!(who->r.svFlags & SVF_BOT)) { + G_Voice( ent, who, SAY_TELL, VOICECHAT_KILLINSULT, qfalse ); // and I killed them with something else + } + if (!(ent->r.svFlags & SVF_BOT)) { + G_Voice( ent, ent, SAY_TELL, VOICECHAT_KILLINSULT, qfalse ); + } + } + ent->client->lastkilled_client = -1; + return; + } + } + + if (g_gametype.integer >= GT_TEAM) { + // praise a team mate who just got a reward + for(i = 0; i < MAX_CLIENTS; i++) { + who = g_entities + i; + if (who->client && who != ent && who->client->sess.sessionTeam == ent->client->sess.sessionTeam) { + if (who->client->rewardTime > level.time) { + if (!(who->r.svFlags & SVF_BOT)) { + G_Voice( ent, who, SAY_TELL, VOICECHAT_PRAISE, qfalse ); + } + if (!(ent->r.svFlags & SVF_BOT)) { + G_Voice( ent, ent, SAY_TELL, VOICECHAT_PRAISE, qfalse ); + } + return; + } + } + } + } + + // just say something + G_Voice( ent, NULL, SAY_ALL, VOICECHAT_TAUNT, qfalse ); +} + + + +static char *gc_orders[] = { + "hold your position", + "hold this position", + "come here", + "cover me", + "guard location", + "search and destroy", + "report" +}; + +void Cmd_GameCommand_f( gentity_t *ent ) { + int player; + int order; + char str[MAX_TOKEN_CHARS]; + + trap_Argv( 1, str, sizeof( str ) ); + player = atoi( str ); + trap_Argv( 2, str, sizeof( str ) ); + order = atoi( str ); + + if ( player < 0 || player >= MAX_CLIENTS ) { + return; + } + if ( order < 0 || order > sizeof(gc_orders)/sizeof(char *) ) { + return; + } + G_Say( ent, &g_entities[player], SAY_TELL, gc_orders[order] ); + G_Say( ent, ent, SAY_TELL, gc_orders[order] ); +} + +/* +================== +Cmd_Where_f +================== +*/ +void Cmd_Where_f( gentity_t *ent ) { + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", vtos( ent->s.origin ) ) ); +} + +static const char *gameNames[] = { + "Free For All", + "Holocron FFA", + "Jedi Master", + "Duel", + "Single Player", + "Team FFA", + "N/A", + "Capture the Flag", + "Capture the Ysalamiri" +}; + +/* +================== +G_ClientNumberFromName + +Finds the client number of the client with the given name +================== +*/ +int G_ClientNumberFromName ( const char* name ) +{ + char s2[MAX_STRING_CHARS]; + char n2[MAX_STRING_CHARS]; + int i; + gclient_t* cl; + + // check for a name match + SanitizeString( (char*)name, s2 ); + for ( i=0, cl=level.clients ; i < level.numConnectedClients ; i++, cl++ ) + { + SanitizeString( cl->pers.netname, n2 ); + if ( !strcmp( n2, s2 ) ) + { + return i; + } + } + + return -1; +} + +/* +================== +SanitizeString2 + +Rich's revised version of SanitizeString +================== +*/ +void SanitizeString2( char *in, char *out ) +{ + int i = 0; + int r = 0; + + while (in[i]) + { + if (i >= MAX_NAME_LENGTH-1) + { //the ui truncates the name here.. + break; + } + + if (in[i] == '^') + { + if (in[i+1] >= 48 && //'0' + in[i+1] <= 57) //'9' + { //only skip it if there's a number after it for the color + i += 2; + continue; + } + else + { //just skip the ^ + i++; + continue; + } + } + + if (in[i] < 32) + { + i++; + continue; + } + + out[r] = tolower(in[i]); //in[i]; + r++; + i++; + } + out[r] = 0; +} + +/* +================== +G_ClientNumberFromStrippedSubstring + +Clan Mod's way to make admin command execution easier +================== +*/ +int G_ClientNumberFromStrippedSubstring ( const char* name ) +{ + char s2[MAX_STRING_CHARS]; + char n2[MAX_STRING_CHARS]; + int i, match = -1; + gclient_t *cl; + + // check for a name match + SanitizeString2( (char*)name, s2 ); + + for ( i=0 ; i < level.numConnectedClients ; i++ ) + { + cl=&level.clients[level.sortedClients[i]]; + SanitizeString2( cl->pers.netname, n2 ); + if ( strstr( n2, s2 ) ) + { + if( match != -1 ) + { //found more than one match + return -2; + } + match = level.sortedClients[i]; + } + } + + return match; +} + +/* +================== +G_ClientNumberFromArg + +Clan Mod's way to make admin command execution easier +================== +*/ +int G_ClientNumberFromArg ( char* name) +{ + int client_id = 0; + char *cp; + + cp = name; + while (*cp) + { + if ( *cp >= '0' && *cp <= '9' ) cp++; + else + { + client_id = -1; //mark as alphanumeric + break; + } + } + + if ( client_id == 0 ) + { // arg is assumed to be client number + client_id = atoi(name); + } + + else + { // arg is client name + if ( client_id == -1 ) + { + client_id = G_ClientNumberFromStrippedSubstring(name); + } + } + return client_id; +} + +/* +================== +G_ClientNumberFromStrippedName + +Same as above, but strips special characters out of the names before comparing. +================== +*/ +int G_ClientNumberFromStrippedName ( const char* name ) +{ + char s2[MAX_STRING_CHARS]; + char n2[MAX_STRING_CHARS]; + int i; + gclient_t* cl; + + // check for a name match + SanitizeString2( (char*)name, s2 ); + for ( i=0, cl=level.clients ; i < level.numConnectedClients ; i++, cl++ ) + { + SanitizeString2( cl->pers.netname, n2 ); + if ( !strcmp( n2, s2 ) ) + { + return i; + } + } + + return -1; +} + +/* +================== +Cmd_CallVote_f +================== +*/ +void Cmd_CallVote_f( gentity_t *ent ) { + int i; + char arg1[MAX_STRING_TOKENS]; + char arg2[MAX_STRING_TOKENS]; + + if ( !g_allowVote.integer ) { + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "NOVOTE")) ); + return; + } + + if ( level.voteTime ) { + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "VOTEINPROGRESS")) ); + return; + } + if ( ent->client->pers.voteCount >= MAX_VOTE_COUNT ) { + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "MAXVOTES")) ); + return; + } + if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) { + trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", G_GetStripEdString("SVINGAME", "NOSPECVOTE")) ); + return; + } + + // make sure it is a valid command to vote on + trap_Argv( 1, arg1, sizeof( arg1 ) ); + trap_Argv( 2, arg2, sizeof( arg2 ) ); + + if( strchr( arg1, ';' ) || strchr( arg2, ';' ) ) { + trap_SendServerCommand( ent-g_entities, "print \"Invalid vote string.\n\"" ); + return; + } + + if ( !Q_stricmp( arg1, "map_restart" ) ) { + } else if ( !Q_stricmp( arg1, "nextmap" ) ) { + } else if ( !Q_stricmp( arg1, "map" ) ) { + } else if ( !Q_stricmp( arg1, "g_gametype" ) ) { + } else if ( !Q_stricmp( arg1, "kick" ) ) { + } else if ( !Q_stricmp( arg1, "clientkick" ) ) { + } else if ( !Q_stricmp( arg1, "g_doWarmup" ) ) { + } else if ( !Q_stricmp( arg1, "timelimit" ) ) { + } else if ( !Q_stricmp( arg1, "fraglimit" ) ) { + } else { + trap_SendServerCommand( ent-g_entities, "print \"Invalid vote string.\n\"" ); + trap_SendServerCommand( ent-g_entities, "print \"Vote commands are: map_restart, nextmap, map , g_gametype , kick , clientkick , g_doWarmup, timelimit